Merge pull request #1713 from flatcar-linux/kai/no-lib-symlink

Split lib and lib64 for sysext support
This commit is contained in:
Kai Lüke 2022-03-17 17:06:13 +01:00 committed by GitHub
commit 28b13f4448
7 changed files with 19 additions and 4 deletions

View File

@ -0,0 +1 @@
- Enabled `systemd-sysext.service` to activate systemd-sysext images on boot, to disable you will need to mask it. Also added a helper service `ensure-sysext.service` which reloads the systemd units to reevaluate the `sockets`, `timers`, and `multi-user` targets when `systemd-sysext.service` is (re)started, making it possible to enable units that are part of a sysext image ([PR#65](https://github.com/flatcar-linux/init/pull/65))

View File

@ -0,0 +1 @@
- For amd64 `/usr/lib` used to be a symlink to `/usr/lib64` but now they became two separate folders as common in other distributions (and was the case for arm64 already). Compatibility symlinks exist in case `/usr/lib64` was used to access, e.g., the `modules` folder or the `systemd` folder ([PR#1713](https://github.com/flatcar-linux/coreos-overlay/pull/1713), [PR#255](https://github.com/flatcar-linux/scripts/pull/255))

View File

@ -10,7 +10,7 @@ CROS_WORKON_REPO="https://github.com"
if [[ "${PV}" == 9999 ]]; then
KEYWORDS="~amd64 ~arm ~arm64 ~x86"
else
CROS_WORKON_COMMIT="2231de798a7393dd8e864ff2ee5409484a81c1d3" # flatcar-master
CROS_WORKON_COMMIT="a22b550c7cf689661970a2a23dd457870dd84c97" # flatcar-master
KEYWORDS="amd64 arm arm64 x86"
fi
@ -52,4 +52,11 @@ src_install() {
# Enable some services that aren't enabled elsewhere.
systemd_enable_service rpcbind.target rpcbind.service
# Create compatibility symlinks in case /usr/lib64/ instead of /usr/lib/ was used
local compat
# os-release symlink is set up in scripts
for compat in modules systemd flatcar coreos kernel modprobe.d pam pam.d sysctl.d udev ; do
dosym "../lib/${compat}" "/usr/lib64/${compat}"
done
}

View File

@ -50,5 +50,5 @@ session optional pam_permit.so
EOF
# Don't bundle these paths, since they are useless to us.
mv usr/lib64/systemd/lib*.so* usr/lib64/
rm -fr boot etc/* usr/lib64/systemd var/db/pkg
mv usr/lib/systemd/lib*.so* usr/lib64/
rm -fr boot etc/* usr/lib/systemd var/db/pkg

View File

@ -98,3 +98,6 @@ ACCT_USER_SYSTEMD_RESOLVE_ID=245
# tss seems to be one of those users with a mismatching UID/GID
ACCT_GROUP_TSS_ID=252
ACCT_USER_TSS_ID=236
# Disable creation of /usr/lib as symlink
SYMLINK_LIB="no"

View File

@ -102,7 +102,7 @@ src_compile() {
local tmpfiles="${T}/baselayout-usr.conf"
echo -n > ${tmpfiles} || die
for sym in "${!USR_SYMS[@]}" ; do
echo "L ${sym} - - - - ${USR_SYMS[$sym]}" >> ${tmpfiles}
echo "L+ ${sym} - - - - ${USR_SYMS[$sym]}" >> ${tmpfiles}
done
fi
}

View File

@ -563,6 +563,9 @@ multilib_src_install_all() {
# Flatcar: enable reboot.target (not enabled - has no WantedBy
# entry)
# Flatcar: enable systemd-sysext.service by default
builddir_systemd_enable_service sysinit.target systemd-sysext.service
# Flatcar: Use an empty preset file, because systemctl
# preset-all puts symlinks in /etc, not in /usr. We don't use
# /etc, because it is not autoupdated. We do the "preset" above.