Merge pull request #356 from flatcar-linux/sayan/upgrade-systemd-alpha-243

sys-apps/systemd: Bump to v243 along with needed ebuild changes
This commit is contained in:
Sayan Chowdhury 2020-05-15 17:38:51 +05:30 committed by GitHub
commit fb44c9302b
4 changed files with 46 additions and 37 deletions

View File

@ -1,5 +1,5 @@
BDEPEND=app-arch/xz-utils:0 dev-util/gperf >=dev-util/meson-0.46 >=dev-util/intltool-0.50 >=sys-apps/coreutils-8.16 virtual/pkgconfig[abi_x86_32(-)?,abi_x86_64(-)?,abi_x86_x32(-)?,abi_mips_n32(-)?,abi_mips_n64(-)?,abi_mips_o32(-)?,abi_riscv_lp64d(-)?,abi_riscv_lp64(-)?,abi_s390_32(-)?,abi_s390_64(-)?] test? ( sys-apps/dbus ) app-text/docbook-xml-dtd:4.2 app-text/docbook-xml-dtd:4.5 app-text/docbook-xsl-stylesheets dev-libs/libxslt:0 || ( ( dev-lang/python:3.7 dev-python/lxml[python_targets_python3_7(-),python_single_target_python3_7(+)] ) ( dev-lang/python:3.6 dev-python/lxml[python_targets_python3_6(-),python_single_target_python3_6(+)] ) ( dev-lang/python:3.5 dev-python/lxml[python_targets_python3_5(-),python_single_target_python3_5(+)] ) ) >=dev-vcs/git-1.8.2.1[curl] >=dev-util/meson-0.48.2 >=dev-util/ninja-1.7.2 virtual/pkgconfig virtual/pkgconfig
DEFINED_PHASES=compile configure info install postinst prepare prerm pretend setup test unpack
DEFINED_PHASES=compile configure info install postinst preinst prepare prerm pretend setup test unpack
DEPEND=>=sys-kernel/linux-headers-3.11 gnuefi? ( >=sys-boot/gnu-efi-3.0.2 )
DESCRIPTION=System and service manager for Linux
EAPI=7
@ -13,4 +13,4 @@ REQUIRED_USE=importd? ( curl gcrypt lzma )
RESTRICT=!test? ( test )
SLOT=0/2
_eclasses_=bash-completion-r1 47a7402d95930413ce25ba8d857339bb cros-workon 4ad6e6491a1010ad7c875302b3be18ba eutils 6e6c2737b59a4b982de6fb3ecefd87f8 flag-o-matic a09389deba2c0a7108b581e02c7cecbf git-r3 0d4635eeb5a96cd5315597a47eba25c9 linux-info 953c3b1c472dcadbf62098a9301327f2 meson e53acc5913e5581a8a71be22731d8f36 multibuild 40fe59465edacd730c644ec2bc197809 multilib 1d91b03d42ab6308b5f4f6b598ed110e multilib-build 0d0c25170069d06d0eb233154229af97 multilib-minimal 8bddda43703ba94d8341f4e247f97566 multiprocessing cac3169468f893670dac3e7cb940e045 ninja-utils 132cbb376048d079b5a012f5467c4e7f pam 69b1cf8e80a877ad42a03042aaa66a5e python-any-r1 4900ae970f827a22d33d41bd8b8f9ace python-utils-r1 08e17157a6807add7db1f8d01e7e391f systemd 71fd8d2065d102753fb9e4d20eaf3e9f toolchain-funcs 8c7f9d80beedd16f2e5a7f612c609529 udev 7752f306eec7b286d00bdb47b763e7ac user 7b7fc6ec5eb1c1eee55b0609f01e7362 user-info a2abd4e2f4c3b9b06d64bf1329359a02
_md5_=ebd6749329e18fa076a4d08d725cb138
_md5_=fd5c7de4f60dc712cdc57c89afd8b401

View File

@ -1,5 +1,5 @@
BDEPEND=app-arch/xz-utils:0 dev-util/gperf >=dev-util/meson-0.46 >=dev-util/intltool-0.50 >=sys-apps/coreutils-8.16 virtual/pkgconfig[abi_x86_32(-)?,abi_x86_64(-)?,abi_x86_x32(-)?,abi_mips_n32(-)?,abi_mips_n64(-)?,abi_mips_o32(-)?,abi_riscv_lp64d(-)?,abi_riscv_lp64(-)?,abi_s390_32(-)?,abi_s390_64(-)?] test? ( sys-apps/dbus ) app-text/docbook-xml-dtd:4.2 app-text/docbook-xml-dtd:4.5 app-text/docbook-xsl-stylesheets dev-libs/libxslt:0 || ( ( dev-lang/python:3.7 dev-python/lxml[python_targets_python3_7(-),python_single_target_python3_7(+)] ) ( dev-lang/python:3.6 dev-python/lxml[python_targets_python3_6(-),python_single_target_python3_6(+)] ) ( dev-lang/python:3.5 dev-python/lxml[python_targets_python3_5(-),python_single_target_python3_5(+)] ) ) >=dev-vcs/git-1.8.2.1[curl] >=dev-util/meson-0.48.2 >=dev-util/ninja-1.7.2 virtual/pkgconfig virtual/pkgconfig
DEFINED_PHASES=compile configure info install postinst prepare prerm pretend setup test unpack
DEFINED_PHASES=compile configure info install postinst preinst prepare prerm pretend setup test unpack
DEPEND=>=sys-kernel/linux-headers-3.11 gnuefi? ( >=sys-boot/gnu-efi-3.0.2 )
DESCRIPTION=System and service manager for Linux
EAPI=7
@ -13,4 +13,4 @@ REQUIRED_USE=importd? ( curl gcrypt lzma )
RESTRICT=!test? ( test )
SLOT=0/2
_eclasses_=bash-completion-r1 47a7402d95930413ce25ba8d857339bb cros-workon 4ad6e6491a1010ad7c875302b3be18ba eutils 6e6c2737b59a4b982de6fb3ecefd87f8 flag-o-matic a09389deba2c0a7108b581e02c7cecbf git-r3 0d4635eeb5a96cd5315597a47eba25c9 linux-info 953c3b1c472dcadbf62098a9301327f2 meson e53acc5913e5581a8a71be22731d8f36 multibuild 40fe59465edacd730c644ec2bc197809 multilib 1d91b03d42ab6308b5f4f6b598ed110e multilib-build 0d0c25170069d06d0eb233154229af97 multilib-minimal 8bddda43703ba94d8341f4e247f97566 multiprocessing cac3169468f893670dac3e7cb940e045 ninja-utils 132cbb376048d079b5a012f5467c4e7f pam 69b1cf8e80a877ad42a03042aaa66a5e python-any-r1 4900ae970f827a22d33d41bd8b8f9ace python-utils-r1 08e17157a6807add7db1f8d01e7e391f systemd 71fd8d2065d102753fb9e4d20eaf3e9f toolchain-funcs 8c7f9d80beedd16f2e5a7f612c609529 udev 7752f306eec7b286d00bdb47b763e7ac user 7b7fc6ec5eb1c1eee55b0609f01e7362 user-info a2abd4e2f4c3b9b06d64bf1329359a02
_md5_=ebd6749329e18fa076a4d08d725cb138
_md5_=fd5c7de4f60dc712cdc57c89afd8b401

View File

@ -10,7 +10,7 @@ if [[ ${PV} == 9999 ]]; then
# Use ~arch instead of empty keywords for compatibility with cros-workon
KEYWORDS="~amd64 ~arm64 ~arm ~x86"
else
CROS_WORKON_COMMIT="be3cc547ebe95215d437dc11453e648d3ffb7a4d" # v241-flatcar
CROS_WORKON_COMMIT="171ebfdbcb79b1f42659d111b5a642e72ea02021" # v243-flatcar
KEYWORDS="~alpha amd64 ~arm arm64 ~ia64 ~ppc ~ppc64 ~sparc ~x86"
fi
@ -381,38 +381,9 @@ multilib_src_install_all() {
# Don't set any extra environment variables by default
rm "${ED}/usr/lib/environment.d/99-environment.conf" || die
# Move a few services enabled in /etc to /usr, delete files individually
# so builds fail if systemd adds any new unexpected stuff to /etc
local f
for f in \
getty.target.wants/getty@tty1.service \
multi-user.target.wants/machines.target \
$(usex cryptsetup multi-user.target.wants/remote-cryptsetup.target '') \
multi-user.target.wants/remote-fs.target \
multi-user.target.wants/systemd-networkd.service \
multi-user.target.wants/systemd-resolved.service \
network-online.target.wants/systemd-networkd-wait-online.service \
sockets.target.wants/systemd-networkd.socket \
sysinit.target.wants/systemd-timesyncd.service
do
local s="${f#*/}" t="${f%/*}"
local u="${s/@*.service/@.service}"
# systemd_enable_service doesn't understand template units
einfo "Enabling ${s} via ${t}"
dodir "${unitdir}/${t}"
dosym "../${u}" "${unitdir}/${t}/${s}"
rm "${ED}/etc/systemd/system/${f}" || die
done
rmdir "${ED}"/etc/systemd/system/*.wants || die
for f in \
systemd-networkd.service:dbus-org.freedesktop.network1.service \
systemd-resolved.service:dbus-org.freedesktop.resolve1.service
do
rm "${ED}/etc/systemd/system/${f#*:}" || die
dosym "${f%%:*}" "${unitdir}/${f#*:}"
done
systemd_enable_service multi-user.target systemd-networkd.service
systemd_enable_service multi-user.target systemd-resolved.service
systemd_enable_service sysinit.target systemd-timesyncd.service
# Do not enable random services if /etc was detected as empty!!!
rm "${ED}$(usex split-usr '' /usr)/lib/systemd/system-preset/90-systemd.preset" || die
@ -471,6 +442,20 @@ migrate_locale() {
fi
}
save_enabled_units() {
ENABLED_UNITS=()
type systemctl &>/dev/null || return
for x; do
if systemctl --quiet --root="${ROOT:-/}" is-enabled "${x}"; then
ENABLED_UNITS+=( "${x}" )
fi
done
}
pkg_preinst() {
save_enabled_units {machines,remote-{cryptsetup,fs}}.target getty@tty1.service
}
pkg_postinst() {
newusergroup() {
enewgroup "$1"
@ -501,6 +486,30 @@ pkg_postinst() {
# between OpenRC & systemd
migrate_locale
systemd_reenable systemd-networkd.service systemd-resolved.service systemd-timesyncd.service
if [[ ${ENABLED_UNITS[@]} ]]; then
systemctl --root="${ROOT:-/}" enable "${ENABLED_UNITS[@]}"
fi
if [[ -z ${REPLACING_VERSIONS} ]]; then
if type systemctl &>/dev/null; then
systemctl --root="${ROOT:-/}" enable getty@.service remote-fs.target || FAIL=1
fi
elog "To enable a useful set of services, run the following:"
elog " systemctl preset-all --preset-mode=enable-only"
fi
if [[ -L ${EROOT}/var/lib/systemd/timesync ]]; then
rm "${EROOT}/var/lib/systemd/timesync"
fi
if [[ -z ${ROOT} && -d /run/systemd/system ]]; then
ebegin "Reexecuting system manager"
systemctl daemon-reexec
eend $?
fi
if [[ ${FAIL} ]]; then
eerror "One of the postinst commands failed. Please check the postinst output"
eerror "for errors. You may need to clean up your system and/or try installing"