Commit graph

55392 commits

Author SHA1 Message Date
Yu Watanabe 1bd0cc452c meson: obtain dbus directories from pkg-config 2021-12-28 23:00:58 +09:00
Yu Watanabe 7e560e79eb meson: show dbus interfaces directory in summary 2021-12-28 22:52:24 +09:00
Yu Watanabe 320848a6ba meson: move dbus-interfaces-dir 2021-12-28 22:52:24 +09:00
Luca Boccassi e99f8605e2
Merge pull request #21916 from medhefgo/boot-fix
boot: Fixes
2021-12-28 11:48:19 +00:00
Jan Janssen 2198a77391 boot: Fix name length comparison 2021-12-27 22:49:02 +01:00
Jan Janssen c3c5b93a0c boot: Fix off-by-one offset sanity checks 2021-12-27 22:46:40 +01:00
Jan Janssen fab8275646 boot: Fix off-by-one NUL-termination 2021-12-27 22:41:50 +01:00
dependabot[bot] 987202b2c1 build(deps): bump github/super-linter from 4.8.4 to 4.8.5
Bumps [github/super-linter](https://github.com/github/super-linter) from 4.8.4 to 4.8.5.
- [Release notes](https://github.com/github/super-linter/releases)
- [Changelog](https://github.com/github/super-linter/blob/main/docs/release-process.md)
- [Commits](563be7dc55...b8641364ca)

---
updated-dependencies:
- dependency-name: github/super-linter
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-12-27 12:33:34 +03:00
Luca Boccassi 7c3b51c469 chrattr-util: return EOPNOTSUPP from chrattr_full if no other failure was observed
When chattr_full tries to apply flags one-by-one, and one fails,
record which errno was returned. But record EOPNOTSUPP(&friends)
only if no other error is observed, and return it only in that case
(otherwise keep returning ENOANO), so that callers can respond
appropriately to EOPNOTSUPP vs more relevant errors.
For example, this lets tmpfiles.d log at debug level when a filesystem
flag cannot be applied because the filesystem does not support it,
but at warning level if something else went wrong when applying it.
Restores logging behaviour of tmpfiles.d to pre-250.

Follow-up for: c1631ee124

Fixes: https://github.com/systemd/systemd/issues/21901
2021-12-27 08:28:26 +09:00
Luca Boccassi a2ccfc9ccb
Merge pull request #21881 from yuwata/update-linux-headers
Update linux headers
2021-12-26 17:30:47 +00:00
Luca Boccassi 4ac8526215
Merge pull request #21892 from yuwata/network-vxlan-automatic-local-address-selection
network: vxlan: automatic local address selection
2021-12-26 17:27:41 +00:00
Evgeny Vereshchagin bfa6bd1be0 ci: replace apt-key with signed-by
to limit the scope of the key to apt.llvm.org only.

This is mostly inspired by https://blog.cloudflare.com/dont-use-apt-key/
2021-12-26 15:38:42 +00:00
Hans de Goede 04b457d8ef hwdb: 60-keyboard: Fix volume-button mapping on Asus TF103C
The Asus TF103C misses the home button in its PNP0C40 GPIO resources
causing the button mappings for the volume buttons to be off by one,
leading to the volume-up button sending home button presses and the
volume-down button sending volume-up button presses.

Add a 60-keyboard hwdb entry to correct the mappings. Note this is
split over 2 input devices because the soc_button_array driver
creates separate input devices for power + home and vol up/down.
This is done because power/home act as wakeup buttons where as
the volume buttons do not.

This means that after this fixup the home -> volume-up button
still acts as a wakeup button, there is nothing which can be done
about this without adding a kludge to the kernel which is not
worth the trouble (IMHO).
2021-12-26 10:15:25 +09:00
Mike Gilbert 289b41aae7 random-util: use ssize_t for getrandom return value
This matches the prototype provided by glibc.
2021-12-26 10:13:56 +09:00
James Hilliard 4b7b73c714 meson: don't try to guess versioned clang/llvm-strip bins for cross compile
This should simplify overriding the program locations as the binary
names should now not change if cross compiling.

It's likely any attempts at autodetecting these in cross environments will
be brittle at best so lets just disable it.
2021-12-25 22:37:04 +09:00
Yu Watanabe 3e7bf8535f tree-wide: fix typo 2021-12-25 18:32:22 +09:00
Yu Watanabe 61d99ab9fb
Merge pull request #21774 from keszybz/make-libcore-shared-and-add-lib-tag-option
Make libcore shared and add private shared lib tag option
2021-12-25 18:02:54 +09:00
Yu Watanabe 1de6d117ef
Merge pull request #21765 from yuwata/udev-warn-truncation
udev: warn string truncation
2021-12-25 18:02:32 +09:00
Yu Watanabe 254a7d66c6 shared/linux: update linux headers from v5.16-rc6 2021-12-25 15:34:02 +09:00
Yu Watanabe d25cc8321c basic/linux: update linux headers from v5.16-rc6 2021-12-25 15:34:02 +09:00
Yu Watanabe 49ad8da779 test-network: add testcase for vxlan local address auto selection 2021-12-25 15:32:06 +09:00
Yu Watanabe b886649c95 network: vxlan: support to select an address assigned on underlying interface as local address 2021-12-25 15:32:06 +09:00
Yu Watanabe 8585b7ca65
Merge pull request #20833 from pdmorrow/onfailure_env
service: pass exiting service state to triggered On{Failure,Success}= dependencies
2021-12-25 15:29:42 +09:00
Zbigniew Jędrzejewski-Szmek ff254eea8f test: ignore the error about our own libraries missing during image creation
19:50:59 F: Missing a shared library required by /var/tmp/systemd-test.NIPT2q/root/lib/systemd/libsystemd-core-250.so.
19:50:59 F: Run "ldd /var/tmp/systemd-test.NIPT2q/root/lib/systemd/libsystemd-core-250.so" to find out what it is.
19:50:59 F: libsystemd-shared-250.so => not found
19:50:59 F: Cannot create a test image.
2021-12-25 15:18:50 +09:00
Zbigniew Jędrzejewski-Szmek a2b0cd3f5a meson: allow specifying a custom "tag" for the private shared libaries
We have /usr/lib/systemd/libsystemd-{shared,core}-nnn.so. With this
path the 'nnn' part can be changed to something different. The idea
is that during a package build this will be set to the package version.

This way during in-place upgrades with the same major version both
the new and old libraries can cooexit. This should fix the issue
when systemd programs are called during package upgrades and fail
to exec because the expect different symbols in the library they
are linked to.

This should fix https://bugzilla.redhat.com/show_bug.cgi?id=1906010.
2021-12-25 15:18:50 +09:00
Zbigniew Jędrzejewski-Szmek 4287c85589 meson: create new libsystemd-core.so private shared library
The scheme is very similar to libsystemd-shared.so: instead of building a
static library, we build a shared library from the same objects and link the
two users to it. Both systemd and systemd-analyze consist mostly of the fairly
big code in libcore, so we save a bit on the installation:

(-0g, no strip)
-rwxr-xr-x 5238864 Dec 14 12:52 /var/tmp/inst1/usr/lib/systemd/systemd
-rwxr-xr-x 5399600 Dec 14 12:52 /var/tmp/inst1/usr/bin/systemd-analyze
-rwxr-xr-x  244912 Dec 14 13:17 /var/tmp/inst2/usr/lib/systemd/systemd
-rwxr-xr-x  461224 Dec 14 13:17 /var/tmp/inst2/usr/bin/systemd-analyze
-rwxr-xr-x 5271568 Dec 14 13:17 /var/tmp/inst2/usr/lib/systemd/libsystemd-core-250.so

(-0g, strip)
-rwxr-xr-x 2522080 Dec 14 13:19 /var/tmp/inst1/usr/lib/systemd/systemd
-rwxr-xr-x 2604160 Dec 14 13:19 /var/tmp/inst1/usr/bin/systemd-analyze
-rwxr-xr-x  113304 Dec 14 13:19 /var/tmp/inst2/usr/lib/systemd/systemd
-rwxr-xr-x  207656 Dec 14 13:19 /var/tmp/inst2/usr/bin/systemd-analyze
-rwxr-xr-x 2648520 Dec 14 13:19 /var/tmp/inst2/usr/lib/systemd/libsystemd-core-250.so

So for systemd itself we grow a bit (2522080 → 2648520+113304=2761824), but
overall we save. The most is saved on all the test files that link to libcore,
if they are installed, because there's 15 of them:

$ du -s /var/tmp/inst?
220096	/var/tmp/inst1
122960	/var/tmp/inst2

I also considered making systemd-analyze a symlink to /usr/lib/systemd/systemd
and turning systemd into a multicall binary. We did something like this with
udevd and udevadm. But that solution doesn't fit well in this case.
systemd-analyze has a bunch of functionality that is not used in systemd,
so the systemd binary would need to grow quite a bit. And we're likely to
add new types of verification or introspection features in analyze, and this
baggage would only grow. In addition, there are the test binaries which also
benefit from this.
2021-12-25 15:18:47 +09:00
Yu Watanabe b0c01c9846 test: add test for truncation of program result invoked by udev 2021-12-25 15:13:19 +09:00
Yu Watanabe 567c19a62c udev: refuse to process line when invalid program output is obtained 2021-12-25 15:13:19 +09:00
Yu Watanabe 6b6e471a32 udev: do not import property value from truncated line of program result 2021-12-25 15:13:19 +09:00
Yu Watanabe 7056adbf16 udev: warn about truncation of program result
Closes #21078.
2021-12-25 15:13:19 +09:00
Yu Watanabe f6caab8995 udev: warn when result of string substitution is truncated 2021-12-25 15:13:17 +09:00
Yu Watanabe 648a799fc9 test: add tests for strnpcpy_full() and friends 2021-12-25 15:12:46 +09:00
Yu Watanabe e70151c94d util: introduce strnpcpy_full() and friends to provide whether result is truncated or not 2021-12-25 15:12:45 +09:00
Yu Watanabe 2588920059
Merge pull request #21868 from lucab/ups/factory-locale-conf
factory: populate /etc/locale.conf with systemd build-time setting
2021-12-25 15:09:35 +09:00
Yu Watanabe 37057fe93e
Merge pull request #21762 from yuwata/udev-ctrl-do-not-kill
udev: do not kill "udevadm control" processes in the same cgroup
2021-12-25 15:08:13 +09:00
Stephen Hemminger 7c4bd9ac98
bus-dump: change capture output to use pcapng (#21738)
This patch changes busctl capture to generate pcapng format
instead of the legacy pcap format files. It includes basic
meta-data in the file and still uses microsecond time
resolution. In future, more things can be added such as
high resolution timestams, statistics, etc.

PCAP Next Generation capture file format is what tshark uses
and is in process of being standardized in IETF. It is also
readable with libpcap.

$ capinfos /tmp/new.pcapng
File name:           /tmp/new.pcapng
File type:           Wireshark/... - pcapng
File encapsulation:  D-Bus
File timestamp precision:  microseconds (6)
Packet size limit:   file hdr: (not set)
Packet size limit:   inferred: 4096 bytes
Number of packets:   22
File size:           21kB
Data size:           20kB
Capture duration:    0.005694 seconds
First packet time:   2021-12-11 11:57:42.788374
Last packet time:    2021-12-11 11:57:42.794068
Data byte rate:      3,671kBps
Data bit rate:       29Mbps
Average packet size: 950.27 bytes
Average packet rate: 3,863 packets/s
SHA256:              b85ed8b094af60c64aa6d9db4a91404e841736d36b9e662d707db9e4096148f1
RIPEMD160:           81f9bac7ec0ec5cd1d55ede136a5c90413894e3a
SHA1:                8400822ef724b934d6000f5b7604b9e6e91be011
Strict time order:   True
Capture oper-sys:    Linux 5.14.0-0.bpo.2-amd64
Capture application: systemd 250 (250-rc2-33-gdc79ae2+)
Number of interfaces in file: 1
Interface #0 info:
                     Encapsulation = D-Bus (146 - dbus)
                     Capture length = 4096
                     Time precision = microseconds (6)
                     Time ticks per second = 1000000
                     Number of stat entries = 0
                     Number of packets = 22
2021-12-25 15:07:40 +09:00
Yu Watanabe 402b81ffd8
Merge pull request #21737 from yuwata/network-wait-dsa-master-up
network: wait for DSA master up
2021-12-25 15:05:36 +09:00
Yu Watanabe 7726526cc6
Merge pull request #21648 from yuwata/network-tunnel-local-automatic-address-selection
network: tunnel: automatic local address selection
2021-12-25 15:05:13 +09:00
Yu Watanabe d3d6b38f46
Merge pull request #21871 from keszybz/meson-sbat-report
Report sbat settings in meson summary
2021-12-25 15:03:50 +09:00
Yu Watanabe 61cdbd8d76
Merge pull request #21888 from mrc0mmand/ci-more-build-coverage
ci: test build with supported cryptolibs to some degree
2021-12-25 15:03:08 +09:00
Yu Watanabe cbf8fc90d5 list: drop unnecessary line continuation
Fixes #21886.
2021-12-25 00:47:37 +09:00
Frantisek Sumsal 298cff6171 ci: test build with supported cryptolibs to some degree
Let's assign a specific -Dcryptolib= value to each job to have at least
some coverage for all supported cryptolibs without unnecessarily
multiplying the test matrix.

Should provide coverage for #21880.
2021-12-24 16:24:16 +01:00
Frantisek Sumsal 7b55f29797 ci: drop build test with -O2, since it's covered by -O3 tests 2021-12-24 16:24:16 +01:00
Yu Watanabe 9bcf483b11 meson: fix build with -Dcryptolib=openssl -Ddns-over-tls=false
Previously, when -Ddns-over-tls=false, libopenssl was missing in the
dependency of resolved.
Also, this drops libgpg_error when it is not necessary.

Replaces #21878.
2021-12-24 15:23:39 +00:00
Yu Watanabe 34b5684846 man: also add anotations for methods
Fixes #21882.
2021-12-24 10:18:11 +00:00
Yu Watanabe 0764e3a327 missing-syscall: define all MOUNT_ATTR_* if missing
Fixes #21876.
2021-12-24 10:12:25 +00:00
Zbigniew Jędrzejewski-Szmek a420d71793 NEWS: finalize release 2021-12-23 21:09:35 +01:00
Yu Watanabe 558ad6bd38
analyze: fix segfault when malloc() fails (#21874)
Fixes #21872.

log_syntax_callback sets 's', a.k.a. '*userdata', to POINTER_MAX to signal allocation failure.
If the error does not cause immediate failure of the program, and log_syntax_callback is called
again, it would try to use 's' as a pointer to a set and fail badly.
2021-12-23 21:03:16 +01:00
Zbigniew Jędrzejewski-Szmek 10c8c32f13
Merge pull request #21869 from yuwata/sd-journal-fix-segfault
sd-journal: fix segfault
2021-12-23 20:07:41 +01:00
Zbigniew Jędrzejewski-Szmek e4e44a0107 meson: report SBAT settings 2021-12-23 20:06:17 +01:00