summaryrefslogtreecommitdiffstats
path: root/meta/recipes-core/systemd
AgeCommit message (Collapse)Author
2019-09-16systemd: upgrade to 243Scott Murray
PATCH REBASED: ============== 0001-binfmt-Don-t-install-dependency-links-at-install-tim.patch 0001-do-not-disable-buffer-in-writing-files.patch 0002-use-lnr-wrapper-instead-of-looking-for-relative-opti.patch 0004-add-fallback-parse_printf_format-implementation.patch 0004-rules-whitelist-hd-devices.patch 0005-rules-watch-metadata-changes-in-ide-devices.patch 0005-src-basic-missing.h-check-for-missing-strndupa.patch 0006-Include-netinet-if_ether.h.patch 0007-don-t-fail-if-GLOB_BRACE-and-GLOB_ALTDIRFUNC-is-not.patch 0017-Do-not-disable-buffering-when-writing-to-oom_score_a.patch PATCH DROPPED: ============== 0001-Replace-the-legacy-ULONG_LONG_MAX-with-the-C99-ULLON.patch 0001-src-udev-udev-event.c-must-include-sys-wait.h.patch 0023-socket-util.h-include-string.h.patch 0025-fs-utilh-add-missing-sys-stat-include.patch PATCH ADDED: ============ 0002-src-login-brightness.c-include-sys-wait.h.patch 0003-src-basic-copy.c-include-signal.h.patch 0004-src-shared-cpu-set-util.h-add-__cpu_mask-definition.patch Also applied libc-glibc over-ride to pkg_postinst and pkg_prerm function definitions, as musl does not provide nsswitch.conf. (From OE-Core rev: cd735ab1df78f7d21b6bb18bdf4707aec68a0295) Signed-off-by: Scott Murray <scott.murray@konsulko.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-09-16systemd: provides ${base_sbindir}/udevadmKai Kang
In some udev rules files such as 97-hid2hci.rules from bluez5, it calls /sbin/udevadm in a rule. eudev provides /usr/bin/udevadm and /sbin/udevadm which is a link to /usr/bin/udevadm. But systemd only provides /bin/udevadm. It is not convenient to update the rule file that udevadm reside in different directories for eudev and system. So create link file ${base_sbindir}/udevadm in systemd just the same as eudev to fix such kind of issues. (From OE-Core rev: c8bf23349af4972a76cb4b13179dac844812d75f) Signed-off-by: Kai Kang <kai.kang@windriver.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-09-06systemd: ensure reproducible builds by clearly exposing the time epoch supportRoss Burton
systemd has the ability to check the time on boot and if it's earlier than an epoch determined at build time, set the time to that epoch. This is useful for systems where the system time is January 1st 1970 (because the unix timestamp was 0 at boot) as then at least the time is reset to something approximating the right year at least. By default systemd uses the mtime of the NEWS file, which is static for tarballs and corresponds to the time the release was made, but for git checkouts this is simply the time do_unpack() was executed. Thus, rebuilding systemd will cause this embedded timestamp to change. Remove the PACKAGECONFIG time-epoch which has the logic reversed: enabling time-epoch will set the epoch to the unix timestamp 0). Replace with set-time-epoch with the following semantics: - When disabled, the time epoch is set to 0 (1st January 1970), so there is no time manipulation on boot. - When enabled, if reproducible builds are configured by setting SOURCE_DATE_EPOCH then that timestamp is used for the time epoch. If reproducible builds are not configured then the timestamp of NEWS (thus the build time) is used. The set-time-epoch flag is enabled by default. [ YOCTO #13473 ] (From OE-Core rev: 29afbd4f02354de7103ee3a88f4ce5336b95b88a) Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-09-06systemd: Update to the latest 242 branchAdrian Bunk
Remove patch for issue fixed upstream. (From OE-Core rev: 8f06385bb4a8244ca51daeef0018bfbdd0a93161) Signed-off-by: Adrian Bunk <bunk@stusta.de> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-09-06systemd: explicitly set the path to nologinRoss Burton
Set the path to nologin as with sulogin etc so we don't try to execute binaries from the build path on the target (as the build finds a nologin in the sysroot at build time). (From OE-Core rev: 15d57de00a5c2763cc9ddb71d3e6b52a57f3fcd1) Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-09-01serial-getty@.service: Allow device to fast fail if it does not existJason Wessel
Some BSPs use a USB serial port which may or may not actually be plugged all the time. It is quite useful to have a USB serial port have a getty running but it does not make sense to wait for it for 90 seconds before completing the system startup if it might never get plugged in. The typical example is that a USB serial device might only need to be plugged in when debugging, upgrading, or initially configuring a device. This change is somewhat subtle. Systemd uses the "BindsTo" directive to ensure existence of the device in order to start the service as well as to terminate the service if the device goes away. The "After" directive makes that same relationship stronger. When used together this has the undesired side effect that systemd will wait until its internal time out value of 90 seconds for the device to come on line before executing a fail operation or letting other tasks and groups continue. This is certainly the kind of behavior we want for a disk, but not for serial ports in general. The "BindsTo" directive is replaced by the combination of the "PartOf" and the "ConditionPathExists" directives. The "After" directive is unchanged because that will wait for the udev rules to process. The "PartOf" directive will issue a stop to the getty service if the device goes away, similar to the "BindsTo" directive. The "ConditionPathExists" is what allows the service to fail fast vs waiting for the timeout. When a USB device is not plugged in at boot you would find a message in the system journal like: systemd[1]: Condition check resulted in Serial Getty on \ ttyUSB0 being skipped. If you want to observe the problem with qemu, it is easy to replicate. Simply add the following line to your local.conf for a x86-64 qemu build. SERIAL_CONSOLES="115200;ttyS0 115200;ttyUSB0" Login right after the system boots and observe: root@qemux86-64:~# systemctl list-jobs |cat JOB UNIT TYPE STATE 1 multi-user.target start waiting 69 serial-getty@ttyUSB0.service start waiting 64 getty.target start waiting 71 dev-ttyUSB0.device start running 62 systemd-update-utmp-runlevel.service start waiting 5 jobs listed. You can see above that the dev-ttyUSB0.device will block for 1min 30 seconds. While that might not be a problem for this reference build. It is certainly a problem for images that have software watchdogs that verify the system booted up all the way to systemd completion in less than 90 seconds. This other nice effect of this change is that the fast fail device extend to additional serial ports that may not exist on ARM BSPs or that might be configured in or out by the dtb files on different boards. (From OE-Core rev: f0f359ec9210759f6b4dbfb35d3fba8af208c43a) Signed-off-by: Jason Wessel <jason.wessel@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-08-28systemd: Update to the latest 242 branchAdrian Bunk
Remove backported patches applied upstream. (From OE-Core rev: 5919729f1bd21ba8bf08ce02edb7cc3624c5d4b9) Signed-off-by: Adrian Bunk <bunk@stusta.de> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-08-28systemd: Print a buildtime warning about the status with muslAdrian Bunk
It is possible if a user really has to use it, but not recommended. (From OE-Core rev: 10c1a27501a32740a03c3c6c0684c7d24374af08) Signed-off-by: Adrian Bunk <bunk@stusta.de> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-08-21systemd: add PACKAGECONFIG for gnu-efiRoss Burton
Add a PACKAGECONFIG for gnu-efi, by default the meson.build looks explicitly in /usr/include and /usr/lib for gnu-efi, and if it is present on the host the build will fail. [ YOCTO #13487 ] Original patch by Chin Huat Ang. (From OE-Core rev: 050cda9f02c6a5c773edf092514b173839569a48) Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-08-21systemd: Refresh patch after removal of __secure_getenv patchKhem Raj
(From OE-Core rev: 5268ee5b0ae1a11bf3c6cf673c8c17932ba630d4) Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-08-21systemd: Drop musl __secure_getenv patchKhem Raj
This API is now implemented in musl [1] [1] https://git.musl-libc.org/cgit/musl/commit/?id=7844ecb590893f8344324837956718001402d297 (From OE-Core rev: 46e49b14b52ebc9c7076488ad858083f8270ce9f) Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-08-07systemd-boot: Add option to specify cross objcopy and use itKhem Raj
This is needed when build host != x86 box (From OE-Core rev: 5096f535561d2fd608d622abec5bc2ddb79d49b7) Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-07-26systemd: Add partial support of drop-in configuration files to ↵Frederic Ouellet
systemd-systemctl-native Support for serive-name.service.d/ folders containing .conf files It don't support all the partial folder names See https://www.freedesktop.org/software/systemd/man/systemd.unit.html (From OE-Core rev: 32ed8e53109f4384970fb540e44cc2f7fcafb2a5) Signed-off-by: Frederic Ouellet <fredericouellet@eaton.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-07-23pam_systemd: Include missing.h for secure_getenvKhem Raj
'secure_getenv' api is not uniformly implemented across all C libraries therefore its good to include missing.h so it can use the alternative implementation where its not awvailable Fixes ../git/src/login/pam_systemd.c:344:13: error: implicit declaration of function 'secure_getenv' is invalid in C99 [-Werror,-Wimplicit-function-declaration] v = secure_getenv(key); (From OE-Core rev: 6cdcb1488a84da6c15145944c2aab3c604252699) Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-07-19systemd-bootconf: Mark as machine specificRicardo Ribalda Delgado
APPEND is usually attached to a machine. This patch avoids multiconfig errors such as: | NOTE: Direct dependencies are ['multiconfig:qt5022:/workdir/repo/poky/meta/recipes-core/glibc/glibc_2.29.bb:do_populate_sysroot', 'multiconfig:qt5022:virtual:native:/workdir/repo/poky/meta/recipes-devtools/pseudo/pseudo_git.bb:do_populate_sysroot', 'multiconfig:qt5022:/workdir/repo/poky/meta/recipes-devtools/quilt/quilt-native_0.65.bb:do_populate_sysroot', 'multiconfig:qt5022:/workdir/repo/poky/meta/recipes-devtools/gcc/gcc-cross_8.3.bb:do_populate_sysroot', 'multiconfig:qt5022:/workdir/repo/poky/meta/recipes-devtools/gcc/gcc-runtime_8.3.bb:do_populate_sysroot'] | NOTE: Installed into sysroot: [] | NOTE: Skipping as already exists in sysroot: ['glibc', 'pseudo-native', 'quilt-native', 'gcc-cross-x86_64', 'gcc-runtime', 'libgcc', 'linux-libc-headers', 'libtool-native', 'texinfo-dummy-native', 'libmpc-native', 'flex-native', 'automake-native', 'zlib-native', 'mpfr-native', 'gmp-native', 'binutils-cross-x86_64', 'xz-native', 'autoconf-native', 'gnu-config-native', 'gettext-minimal-native', 'm4-native'] | DEBUG: Python function extend_recipe_sysroot finished | DEBUG: Executing shell function do_install | install: cannot stat 'loader.conf': No such file or directory | WARNING: exit code 1 from a shell command. | ERROR: Function failed: do_install (log file is located at /workdir/build/tmp/work/bobcat-poky-linux/systemd-bootconf/1.00-r0/temp/log.do_install.737) NOTE: recipe systemd-bootconf-1.00-r0: task do_install: Failed ERROR: Task (multiconfig:qt5022:/workdir/repo/poky/meta/recipes-core/systemd/systemd-bootconf_1.00.bb:do_install) failed with exit code '1' (From OE-Core rev: 84d08b0bed9e1c5f223f9ec437bb8d96a2bda599) Signed-off-by: Ricardo Ribalda Delgado <ricardo@ribalda.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-07-17systemd: Fix interface bring-up on kernels >= 5.2Ricardo Ribalda Delgado
With kernels >=5.2 systemd-networkd is unable to bring up the link. eth0: Could not bring up interface: Invalid argument This is already reported upstream and fixed on master: https://github.com/systemd/systemd/issues/12784 They recommend Debian to backport two patches. (From OE-Core rev: 536d54ab46708ef921dbdcb68d1cf644ec639be8) Signed-off-by: Ricardo Ribalda Delgado <ricardo@ribalda.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-07-16systemd: backport patch to fix sysctl warning on bootMatthias Schiffer
Due to improved validation of sysctl settings in recent kernels (5.2+, but also stable kernels like 4.19.53), systemd will log an error message like systemd[1]: Failed to bump fs.file-max, ignoring: Invalid argument during boot. Backport the bugfix from the systemd master. (From OE-Core rev: 289a29fc687d1224097f553a6f8c7f1baf903cae) Signed-off-by: Matthias Schiffer <matthias.schiffer@ew.tq-group.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-06-19systemd-conf: not configure network for nfs rootKai Kang
It fails to boot nfs root with systemd that systemd-networkd re-configures wired network and breaks the connection with nfs root. (From OE-Core rev: 2abfbf186989223d5d256c25e0b52b02f29d5bfb) Signed-off-by: Kai Kang <kai.kang@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-06-14systemd: Backport OpenSSL BUF_MEM fixAlex Kiernan
Building `systemd-resolve` from systemd 242 with OpenSSL 1.1.1c and enabling DNS over TLS ends up calling abort (on 32 bit armhf): Program terminated with signal SIGABRT, Aborted. #0 __libc_do_syscall () at libc-do-syscall.S:49 49 libc-do-syscall.S: No such file or directory. (gdb) where #0 __libc_do_syscall () at libc-do-syscall.S:49 #1 0xb6940ea4 in __libc_signal_restore_set (set=0xbec68b78) at ../sysdeps/unix/sysv/linux/internal-signals.h:84 #2 __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:48 #3 0xb69336e0 in __GI_abort () at abort.c:79 #4 0xb6968428 in __libc_message (action=action@entry=do_abort, fmt=<optimized out>) at ../sysdeps/posix/libc_fatal.c:181 #5 0xb696c7e6 in malloc_printerr (str=<optimized out>) at malloc.c:5352 #6 0xb696ca1a in munmap_chunk (p=<optimized out>) at malloc.c:2840 #7 0xb6bd1c4a in CRYPTO_clear_realloc (str=0xd0e59a, old_len=388, num=<optimized out>, file=0xb6c300dc "../../../../../../workspace/sources/openssl/crypto/buffer/buffer.c", line=135) at ../../../../../../workspace/sources/openssl/crypto/mem.c:290 #8 0xb6b5da3a in BUF_MEM_grow_clean (str=0xcfb960, len=len@entry=393) at ../../../../../../workspace/sources/openssl/crypto/buffer/buffer.c:135 #9 0xb6b486a0 in mem_write (b=0xcf8300, in=0xd07c6b "\027\003\003", inl=24) at ../../../../../../workspace/sources/openssl/crypto/bio/bss_mem.c:235 #10 0xb6b45c86 in bwrite_conv (bio=<optimized out>, data=<optimized out>, datal=<optimized out>, written=0xbec68ec8) at ../../../../../../workspace/sources/openssl/crypto/bio/bio_meth.c:77 #11 0xb6b452d4 in bio_write_intern (written=0xbec68ec8, dlen=24, data=0xd07c6b, b=0xcf8300) at ../../../../../../workspace/sources/openssl/crypto/bio/bio_lib.c:343 #12 bio_write_intern (b=0xcf8300, data=0xd07c6b, dlen=24, written=0xbec68ec8) at ../../../../../../workspace/sources/openssl/crypto/bio/bio_lib.c:320 #13 0xb6b455b2 in BIO_write (b=<optimized out>, data=<optimized out>, dlen=<optimized out>) at ../../../../../../workspace/sources/openssl/crypto/bio/bio_lib.c:363 #14 0xb6cabd1a in ssl3_write_pending (s=s@entry=0xcfd2d8, type=type@entry=23, buf=buf@entry=0xcfcc28 "", len=len@entry=2, written=written@entry=0xbec698b0) at ../../../../../../workspace/sources/openssl/ssl/record/rec_layer_s3.c:1146 #15 0xb6cac72e in do_ssl3_write (s=s@entry=0xcfd2d8, type=type@entry=23, buf=buf@entry=0xcfcc28 "", pipelens=pipelens@entry=0xbec698b4, numpipes=numpipes@entry=1, create_empty_fragment=create_empty_fragment@entry=0, written=written@entry=0xbec698b0) at ../../../../../../workspace/sources/openssl/ssl/record/rec_layer_s3.c:1107 #16 0xb6cac92e in ssl3_write_bytes (s=0xcfd2d8, type=23, buf_=0xcfcc28, len=<optimized out>, written=0xbec699c0) at ../../../../../../workspace/sources/openssl/ssl/record/rec_layer_s3.c:613 #17 0xb6cb1698 in ssl3_write (s=<optimized out>, buf=0xcfcc28, len=2, written=0xbec699c0) at ../../../../../../workspace/sources/openssl/ssl/s3_lib.c:4460 #18 0xb6cb87b2 in ssl_write_internal (s=<optimized out>, buf=buf@entry=0xcfcc28, num=num@entry=2, written=written@entry=0xbec699c0) at ../../../../../../workspace/sources/openssl/ssl/ssl_lib.c:1943 #19 0xb6cb8896 in SSL_write (s=<optimized out>, buf=buf@entry=0xcfcc28, num=num@entry=2) at ../../../../../../workspace/sources/openssl/ssl/ssl_lib.c:1957 #20 0x004ddac8 in dnstls_stream_write (stream=stream@entry=0xcfca60, buf=0xcfcc28 "", count=2) at ../git/src/resolve/resolved-dnstls-openssl.c:270 #21 0x004d8d5c in dns_stream_writev (s=s@entry=0xcfca60, iov=iov@entry=0xbec69b4c, iovcnt=iovcnt@entry=2, flags=flags@entry=0) at ../git/src/resolve/resolved-dns-stream.c:225 #22 0x004d9516 in on_stream_io (es=<optimized out>, fd=<optimized out>, revents=4, userdata=0xcfca60) at ../git/src/resolve/resolved-dns-stream.c:334 #23 0xb6e7f020 in source_dispatch (s=0xcf3658) at ../git/src/libsystemd/sd-event/sd-event.c:2821 #24 0xb6e806b0 in sd_event_dispatch (e=e@entry=0xced6d0) at ../git/src/libsystemd/sd-event/sd-event.c:3234 #25 0xb6e807f6 in sd_event_run (e=0xced6d0, timeout=<optimized out>) at ../git/src/libsystemd/sd-event/sd-event.c:3291 #26 0xb6e809bc in sd_event_loop (e=0xced6d0) at ../git/src/libsystemd/sd-event/sd-event.c:3312 #27 0x004bb64c in run (argv=<optimized out>, argc=<optimized out>) at ../git/src/resolve/resolved.c:84 #28 main (argc=<optimized out>, argv=<optimized out>) at ../git/src/resolve/resolved.c:91 (From OE-Core rev: b11ddab19bc7c0ce35b95345181de8a708268472) Signed-off-by: Alex Kiernan <alex.kiernan@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-06-04systemd-conf: configure wired network with dhcpKai Kang
Add a configure file for systemd.networkd to configure wired network interfaces with dhcp. It works with common network interfaces such eth0 and eno1. And do not install it for qemu bsps. Refer to https://github.com/YoeDistro/meta-yoe/tree/master/recipes-core/systemd [YOCTO #13057] (From OE-Core rev: d87efd14ce0471135c0aa7fd7b5da2808acb9c76) Signed-off-by: Kai Kang <kai.kang@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-05-30systemd: add rconflictsChangqing Li
add rconflicts since error during do_rootfs: file /sbin/resolvconf conflicts between attempted installs of resolvconf-1.79-r0.noarch and systemd-1:242+0+db2e367bfc-r0.i586 file /sbin/init conflicts between attempted installs of tiny-init-1.0-r3.i586 and systemd-1:242+0+db2e367bfc-r0.i586 (From OE-Core rev: 10d0a824ad9b835b6f5ec24a49d41aead613031b) Signed-off-by: Changqing Li <changqing.li@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-05-27systemd: avoid musl specific patches affect glibc systemsChen Qi
systemd upstream only care about glibc. We made musl specific patches so that systemd could work. But currently these patches contain potential security issues. So apply these patches only when the libc is musl. (From OE-Core rev: 464a1c16db1d7cc950eaee43bd8a47124dc4398f) Signed-off-by: Chen Qi <Qi.Chen@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-05-21systemd: Some upstreamable musl patches have been upstreamedAdrian Bunk
(From OE-Core rev: 71f99af0d05656a4546e691f6b6e876776c22b13) Signed-off-by: Adrian Bunk <bunk@stusta.de> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-05-17systemd: Disable idn properly for musl instead of NI_IDN workaroundsAdrian Bunk
(From OE-Core rev: e9d132c25c7e1feca1d078b0891c0f4baba70f81) Signed-off-by: Adrian Bunk <bunk@stusta.de> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-05-12systemd: Bump up SRCREV to systemd-stable top to include the fix for ↵He Zhe
shutdown now hang "shutdown now" makes systemd hang at the following line. [ OK ] Stopped Session c1 of user root. It's already been fixed by 03cb25525423 ("socket-util: make sure flush_accept() doesn't hang on unexpected EOPNOTSUPP") (From OE-Core rev: b8f175296905518d0222bd63bb44c93772afb8be) Signed-off-by: He Zhe <zhe.he@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-05-09systemd: move "machines" symlinks to systemd-containerMatthias Schiffer
Move symlinks to the machines.target and var-lib-machines.mount units to the systemd-container package, where the pointed at units are located as well. This avoids an implicit dependency of the systemd package on systemd-container, which prevented the use of systemd without installing systemd-container. (From OE-Core rev: ae3c8d938c261c92ecf06e2d09f7e32bc117ceb8) Signed-off-by: Matthias Schiffer <matthias.schiffer@ew.tq-group.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-05-09systemd: Use PACKAGECONFIG definition to depend on libnss-myhostnamePeter Kjellerstedt
Rather than adding the dependency on libnss-myhostname to RDEPENDS_${PN} if the myhostname PACKAGECONFIG is set, add the runtime dependency to myhostname's PACKAGECONFIG definition. (From OE-Core rev: e107feab1734d5751ea0d94ca6dbccc059709b55) Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-05-09systemd-systemctl: Restore support for enable commandAlex Kiernan
Refactor so that SystemdUnit is its own class, then add support for the enable command. This restores the ability of systemd.bbclass to create instances using syntax such as: SYSTEMD_SERVICE_${PN} = "serial-getty@ttyAMA0.service" (From OE-Core rev: 9ef6f326ad323b2687440b81b0a983cb3d86a3ab) Signed-off-by: Alex Kiernan <alex.kiernan@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-05-09systemd: Default to non-stateless imagesAlex Kiernan
When creating images, for anything other than the explicitly stateless case, touch /etc/machine-id so that the images can be booted without an initramfs and with `ro` set on the kernel command line, otherwise system refuses to start: [ 7.222134] systemd[1]: No hostname configured. [ 7.227266] systemd[1]: Set hostname to <localhost>. [ 7.232622] systemd[1]: System cannot boot: Missing /etc/machine-id and /etc is mounted read-only. [ 7.241750] systemd[1]: Booting up is supported only when: [ 7.247362] systemd[1]: 1) /etc/machine-id exists and is populated. [ 7.253752] systemd[1]: 2) /etc/machine-id exists and is empty. [ 7.259757] systemd[1]: 3) /etc/machine-id is missing and /etc is writable. If IMAGE_FEATURES includes `stateless-rootfs` then systemctl-native is not run on the image leaving the image for population at runtime by systemd. (From OE-Core rev: c5fb399f5894c16cf8eeadd507dc38c29b0fd657) Signed-off-by: Alex Kiernan <alex.kiernan@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-05-08systemd: Backport patch to fix build with gcc9Khem Raj
Do not disable the warning as error for overflow, which was a workaround until the real fix came in. (From OE-Core rev: d5e999616e2671442cfc678750bdfb990ef5728c) Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-05-08openssh/systemd/python/qemu: Fix patch Upstream-StatusRichard Purdie
Fix some missing or corrupted patch Upstream-Status values. (From OE-Core rev: 07bc5a5367e0dec45253fd849e0157094152fd31) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-05-08systemd: Add -Wno-error=format-overflow to fix build with gcc9Khem Raj
gcc9 throws additional warnings about format string overflow (From OE-Core rev: 59f93503dcec4e5b8ab46db73095d2669aba8c7e) Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-05-03systemctl-native: Rewrite in Python supporting preset-all and maskAlex Kiernan
Rewrite systemctl-native in Python so that extending/testing it is easier. Now that the systemd class sets up service presets instead of actively enabling services, the 'enable' and 'disable' subcommands for systemctl are not actually used anywhere. As such, we can remove these to make sure that nobody inadvertently introduces new uses of them. This implementation covers `preset-all` and `mask` which are the only options used in the current code, but should be readily extensible to other commands. We use `preset-all` at image construction time to populate the symlinks used by systemd. (From OE-Core rev: 86f5a2383692ac1ab01dce534c1a5c5f32ec4b35) Signed-off-by: Alex Kiernan <alex.kiernan@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-05-03systemd-conf: simplify creation of machine-specific configurationAlex Kiernan
The configuration files that systemd installs are just skeletons detailing the available options and their default values. The recommended means of changing the configuration is to provide snippets in configuration directories. For example, journald.conf settings are best set in /usr/lib/system.d/journald.conf.d/ and can be overridden by the user by providing overriding snippets in /etc/systemd/journald.conf.d/. The systemd-conf package is just providing machine-specific overrides for some systemd defaults. This patch restores the installation of config files by systemd and reduces systemd-conf to just providing the config snippets in /usr/lib/systemd/*.conf.d. This simpilfies the systemd-conf recipe considerably since it now just sets up a couple of text files and doesn't even need access to the systemd source anymore. License-Update: configuration snippets licensing is independent of systemd licensing (From OE-Core rev: 3150253898babce70333376d22090b56b4a70bfb) Signed-off-by: Alex Kiernan <alex.kiernan@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-05-03systemd: do not create machine-idJonas Bonn
There is no reason to have an emtpy machine-id as part of the systemd package. Either: i) the filesystem is writable and the file will be created automatically; or ii) the filesystem is read-only, in which case the empty machine-id file should be created as part of the read-only-rootfs tweaks. (From OE-Core rev: 76444b63e614baea33c044851a5859f6d1e69729) Signed-off-by: Jonas Bonn <jonas@norrbonn.se> Signed-off-by: Alex Kiernan <alex.kiernan@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-05-03systemd: don't build firstboot by defaultJonas Bonn
The firstboot service prompts the user for information about the host at first boot. Systemd determines whether or not a boot is a "first boot" by the existence of the file /etc/machine-id. Since oe-core always includes this file (it is part of the systemd package), the firstboot service never runs so this service is being built but never run. A follow-up patch to this one will remove the machine-id from the systemd build and allow it to be created automatically by systemd at "first boot". With that patch, we don't want the firstboot service to suddenly start being invoked and presenting a prompt to the user. With this patch, the firstboot service becomes a PACKAGECONFIG option that the user must actively select. (From OE-Core rev: 6f0072d34107f4d351c79b43ce71bf4489428a34) Signed-off-by: Jonas Bonn <jonas@norrbonn.se> Signed-off-by: Alex Kiernan <alex.kiernan@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-04-29systemd: add cgroupv2 PACKAGECONFIGLuca Boccassi
Allow users to change the default cgroup mode at build time and use the unified hierarchy mode. Disabled by default - hybrid is the default upstream value. (From OE-Core rev: 25dc64b8de20021de34ce02ce3855ec9dbade4a4) Signed-off-by: Luca Boccassi <luca.boccassi@microsoft.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-04-26systemd: upgrade to 242Andrej Valek
PATCH REBASED: ============== 0001-do-not-disable-buffer-in-writing-files.patch 0002-don-t-use-glibc-specific-qsort_r.patch 0003-missing_type.h-add-__compare_fn_t-and-comparison_fn_.patch 0004-add-fallback-parse_printf_format-implementation.patch 0005-rules-watch-metadata-changes-in-ide-devices.patch 0005-src-basic-missing.h-check-for-missing-strndupa.patch 0007-don-t-fail-if-GLOB_BRACE-and-GLOB_ALTDIRFUNC-is-not.patch 0009-socket-util-don-t-fail-if-libc-doesn-t-support-IDN.patch 0017-Do-not-disable-buffering-when-writing-to-oom_score_a.patch 0021-avoid-redefinition-of-prctl_mm_map-structure.patch 0024-test-json.c-define-M_PIl.patch PATCH DROPPED: ============== 0001-meson-declare-version.h-as-dep-for-various-targets-t.patch 0001-meson-declare-version.h-as-dependency-for-systemd.patch 0013-test-hexdecoct.c-Include-missing.h-for-strndupa.patch PATCH ADDED: 0025-fs-utilh-add-missing-sys-stat-include.patch (From OE-Core rev: 1d453c9087f92da1ceddc66a887941e4929b3448) Signed-off-by: Andrej Valek <andrej.valek@siemens.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-04-23systemd: change default locale from C.UTF-8 to CChangqing Li
current default locale is set to C.UTF-8, but glibc not support locale C.UTF-8. so set to the default locale C. [snip] if not meson.is_cross_build() choose_default_locale_sh = find_program('tools/choose-default-locale.sh') default_locale = run_command(choose_default_locale_sh).stdout().strip() else default_locale = 'C.UTF-8' endif if default locale set to C.UTF-8, it will cause libpcre ptest fail: re> //8+L ** Failed to set locale "" (From OE-Core rev: 48f1521de8d16971e8021d7bf551f0b88f392f43) Signed-off-by: Changqing Li <changqing.li@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-04-12systemd: install libnss-myhostname.so when myhostname be enabledWenlin Kang
This fixes the follow issue, the cause is that net-tools needs libnss-myhostname.so when run "hostname -s". root@qemuarm64:~# hostname -s hostname: Unknown host (From OE-Core rev: 5bad5eb5f41053e4963fb26972f56dbf67349378) Signed-off-by: Wenlin Kang <wenlin.kang@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-04-10systemd: fix predictable network interface names in initrdTomasz Meresiński
https://www.freedesktop.org/wiki/Software/systemd/PredictableNetworkInterfaceNames/ says, that udev is responsible for predictable network interface names, so udev package is a better place for its configuration file. (From OE-Core rev: 4cf7c6b86b26c8355054f93e2aa5e05a35e536c6) Signed-off-by: Tomasz Meresiński <tomasz.meresinski@comarch.pl> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-03-29systemd: Add pattern matching support to PACKAGECONFIGVincent Prince
libpcre2 is needed to enable grep option to journalctl. (From OE-Core rev: 623946c9b56d4a253e0e82936ec86595edc1da1b) Signed-off-by: Vincent Prince <vincent.prince.fr@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-03-25systemd: Add PACKAGECONFIG for opensslAlex Kiernan
(From OE-Core rev: 6b0daceda2aa42052f28aeac6b49a2a744d5e1b7) Signed-off-by: Alex Kiernan <alex.kiernan@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-03-21systemd: Update to systemd-stable v241-stable releaseOtavio Salvador
This changes the repository to use the systemd-stable, and update to the latest release from v241-stable branch. Following changes are included: c1f8ff8d0d login: mark nomodeset fb devices as master-of-seat 59f2213e45 login: HyperV requires master-of-seat to be set a09c170122 Allocate temporary strings to hold dbus paths on the heap 4f54afd5a1 Refuse dbus message paths longer than BUS_PATH_SIZE_MAX limit. b22a96ef2f NEWS: add entry about 'udevadm trigger --wait-daemon' bada94eb3e NEWS: fix release date e9f930b2f5 udev-event: make subst_format_var() always provide null-terminated string on success 66320aec80 sd-device: also store properties read from udev database to sd_device::properties_db dffc22c833 udev-rules: update log messages about OWNER= or GROUP= settings on --resolve=names=never (From OE-Core rev: 0111855d2c5029c93844e08fcd48592137bfb68a) Signed-off-by: Otavio Salvador <otavio@ossystems.com.br> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-03-18systemd: fix CVE-2019-6454Marcus Cooper
The original fix was deleted when systemd was bumped from v239 to v241, however not all of the patches have made it into the latest version. Refactor the original patch to contain the missing changes. (From OE-Core rev: 400a0468a0f12f7f92f5287053a5fee0bb257fc1) Signed-off-by: Marcus Cooper <marcusc@axis.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-03-18systemd: drop unused kill-path optionRoss Burton
This option isn't used and was dropped upstream in v240. (From OE-Core rev: 57154e8f8e65db82c5b75dc10635db308b525820) Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-03-12systemd: do not disable SELinux with muslLuca Boccassi
Building and running SELinux with musl works fine these days, so don't disable it in the systemd bitbake file. (From OE-Core rev: afea472cdc5e72e2794b30b00f68e59ffb1e104c) Signed-off-by: Luca Boccassi <luca.boccassi@microsoft.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-03-12systemd: backport one more patch to fix version.h parallel build failureChen Qi
We backported a patch to fix parallel build failure about version.h. But that is not enough. We need one more patch to really fix this issue. (From OE-Core rev: 9ed1dd6329b393e4f780fb88fea98bc930138a57) Signed-off-by: Chen Qi <Qi.Chen@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-03-07systemd: backport patch to fix parallel build failureChen Qi
Backport patch to fix parallel build failure like below. In file included from ../git/src/core/dbus-manager.c:10: ../git/src/basic/build.h:4:10: fatal error: version.h: No such file or directory #include "version.h" ^~~~~~~~~~~ compilation terminated. (From OE-Core rev: 89712946c10f1c762175053e1945b7d0f330c446) Signed-off-by: Chen Qi <Qi.Chen@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-03-03systemd-boot: upgrade to 241Chen Qi
The following two patches are added because I cannot figure out how to pass parameter to efi-cc if it's changed to be an array value. systemd/0001-Revert-meson-print-EFI-CC-configuration-nicely.patch systemd/0001-Revert-meson-use-an-array-option-for-efi-cc.patch (From OE-Core rev: 42ec27489135f5c2dbe708dacb5dadb0f5d9df5b) Signed-off-by: Chen Qi <Qi.Chen@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>