Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade systemd from 255 to 256 #2145

Merged
merged 8 commits into from
Dec 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
- systemd ([256.9](https://github.com/systemd/system/releases/tag/v256.9) (from 255.8))
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ EGIT_REPO_URI="https://github.com/flatcar/update_engine.git"
if [[ "${PV}" == 9999 ]]; then
KEYWORDS="~amd64 ~arm ~arm64 ~x86"
else
EGIT_COMMIT="541576a4dcd56397597abef7d9ce4c539631ed65" # flatcar-master
EGIT_COMMIT="46e1984f2c91e3d14bad9323a6bf32a9c6662fbc" # flatcar-master
KEYWORDS="amd64 arm64"
fi

Expand Down
Original file line number Diff line number Diff line change
@@ -1 +1 @@
DIST systemd-stable-255.8.tar.gz 15070471 BLAKE2B b437404af7fd73ef527f80d9d14d46a781444103d1756c27494ecf2664c9c5efe1169c85b91148a3bf190dc7c5e31cf8d42a13c84102d101ea7e4a0570e8d719 SHA512 7692be761a393924669a90f6f343998a85707a9daa3ce169ce67f62ae2a39338c2c3496066b2659c6500849104fab0529fca5704a3eb32375f2f44131216d1f1
DIST systemd-256.9.tar.gz 15774953 BLAKE2B caeff33d0906583094a44ab89fe9a9c1832a665f8cc768f86c55c5100bdd5c2b1500b2cd65e9519ef21d79bff92d1da3e84240793099a0e0c508afba3669c46e SHA512 aba7a0f7149fe3d28d9f930f244d5b997c28721e93e6f0768b0f0f1c918c87a0e8b7b347cffb2faa4740ca3ee3b04984454e85757365090a2cf32aba09f70681

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
From 65e3f4e837001f6f00359a779b6c5801566aa750 Mon Sep 17 00:00:00 2001
From: Adrian Vladu <[email protected]>
Date: Wed, 25 Sep 2024 15:51:02 +0000
Subject: [PATCH] Revert "Revert "initrd-parse-etc: override argv[0] to avoid
dracut issue""

This reverts commit 1c585a4ccda3258088d7bc27b27a314e7ed8be80.
---
units/initrd-parse-etc.service.in | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/units/initrd-parse-etc.service.in b/units/initrd-parse-etc.service.in
index 1eef2bd9be..3dadab1123 100644
--- a/units/initrd-parse-etc.service.in
+++ b/units/initrd-parse-etc.service.in
@@ -23,7 +23,9 @@ OnFailureJobMode=replace-irreversibly
[Service]
Type=oneshot

-ExecStart={{LIBEXECDIR}}/systemd-sysroot-fstab-check
+# FIXME: once dracut is patched to install the symlink, change to:
+# ExecStart={{LIBEXECDIR}}/systemd-sysroot-fstab-check
+ExecStart=@{{SYSTEM_GENERATOR_DIR}}/systemd-fstab-generator systemd-sysroot-fstab-check

# We want to enqueue initrd-cleanup.service/start after we finished the part
# above. It can't be part of the initial transaction, because non-oneshot units
--
2.34.1

Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
https://github.com/systemd/systemd/commit/dde6f1d7456db7aa72d24b1d6956b419b6f9945c

From dde6f1d7456db7aa72d24b1d6956b419b6f9945c Mon Sep 17 00:00:00 2001
From: Sam James <[email protected]>
Date: Sat, 24 Aug 2024 13:09:47 +0100
Subject: [PATCH] meson: search for 'bpf-unknown-none' too

We currently search for 'bpf-gcc' and 'bpf-none-gcc'. Gentoo's
sys-devel/bpf-toolchain package uses 'bpf-unknown-none-gcc', as does Fedora's
cross-binutils. Search for this name too.
---
meson.build | 1 +
1 file changed, 1 insertion(+)

diff --git a/meson.build b/meson.build
index 5e0b666c64b17..fbc2bbdf2f22f 100644
--- a/meson.build
+++ b/meson.build
@@ -1109,6 +1109,7 @@ else
elif bpf_compiler == 'gcc'
bpf_gcc = find_program('bpf-gcc',
'bpf-none-gcc',
+ 'bpf-unknown-none-gcc',
required : true,
version : '>= 13.1.0')
bpf_gcc_found = bpf_gcc.found()
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

While at here, can you drop the following Flatcar modification:

+ # Flatcar: Drop sec-policy/selinux-ntp from deps (under selinux use
+ # flag). The image stage fails with "Failed to resolve
+ # typeattributeset statement at
+ # /var/lib/selinux/mcs/tmp/modules/400/ntp/cil:120"
selinux? (
		sec-policy/selinux-base-policy[systemd]
-		sec-policy/selinux-ntp

and add selinux-ntp to the selinux policies:

  1. Add the package to ::portage-stable
  2. Add the package to .github/workflows/portage-stable-packages-list
  3. Add the package to sdk_container/src/third_party/coreos-overlay/coreos-base/coreos/coreos-0.0.1-r316.ebuild

This will help in the SELinux effort.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can do it after this change in another patch, as it is already complicated to properly test as is.

Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# Distributed under the terms of the GNU General Public License v2

EAPI=8
PYTHON_COMPAT=( python3_{10..12} )
PYTHON_COMPAT=( python3_{10..13} )

# Avoid QA warnings
TMPFILES_OPTIONAL=1
Expand All @@ -14,15 +14,10 @@ if [[ ${PV} == 9999 ]]; then
EGIT_REPO_URI="https://github.com/systemd/systemd.git"
inherit git-r3
else
if [[ ${PV} == *.* ]]; then
MY_PN=systemd-stable
else
MY_PN=systemd
fi
MY_PV=${PV/_/-}
MY_P=${MY_PN}-${MY_PV}
MY_P=${PN}-${MY_PV}
S=${WORKDIR}/${MY_P}
SRC_URI="https://github.com/systemd/${MY_PN}/archive/v${MY_PV}/${MY_P}.tar.gz"
SRC_URI="https://github.com/systemd/${PN}/archive/refs/tags/v${MY_PV}.tar.gz -> ${MY_P}.tar.gz"

if [[ ${PV} != *rc* ]] ; then
# Flatcar: mark as stable
Expand All @@ -34,12 +29,12 @@ inherit bash-completion-r1 linux-info meson-multilib optfeature pam python-singl
inherit secureboot systemd tmpfiles toolchain-funcs udev

DESCRIPTION="System and service manager for Linux"
HOMEPAGE="http://systemd.io/"
HOMEPAGE="https://systemd.io/"

LICENSE="GPL-2 LGPL-2.1 MIT public-domain"
SLOT="0/2"
IUSE="
acl apparmor audit boot cgroup-hybrid cryptsetup curl +dns-over-tls elfutils
acl apparmor audit boot bpf cgroup-hybrid cryptsetup curl +dns-over-tls elfutils
fido2 +gcrypt gnutls homed http idn importd iptables +kernel-install +kmod
+lz4 lzma +openssl pam pcre pkcs11 policykit pwquality qrcode
+resolvconf +seccomp selinux split-usr +sysv-utils test tpm ukify vanilla xkb +zstd
Expand All @@ -65,6 +60,7 @@ COMMON_DEPEND="
acl? ( sys-apps/acl:0= )
apparmor? ( >=sys-libs/libapparmor-2.13:0= )
audit? ( >=sys-process/audit-2:0= )
bpf? ( >=dev-libs/libbpf-1.4.0:0= )
cryptsetup? ( >=sys-fs/cryptsetup-2.0.1:0= )
curl? ( >=net-misc/curl-7.32.0:0= )
elfutils? ( >=dev-libs/elfutils-0.158:0= )
Expand Down Expand Up @@ -148,11 +144,11 @@ RDEPEND="${COMMON_DEPEND}
)
sysv-utils? (
!sys-apps/openrc[sysv-utils(-)]
!sys-apps/openrc-navi[sysv-utils(-)]
!sys-apps/sysvinit
)
!sysv-utils? ( sys-apps/sysvinit )
resolvconf? ( !net-dns/openresolv )
!sys-apps/hwids[udev]
!sys-auth/nss-myhostname
!sys-fs/eudev
!sys-fs/udev
Expand All @@ -171,6 +167,10 @@ BDEPEND="
>=sys-apps/coreutils-8.16
sys-devel/gettext
virtual/pkgconfig
bpf? (
dev-util/bpftool
sys-devel/bpf-toolchain
)
test? (
app-text/tree
dev-lang/perl
Expand Down Expand Up @@ -211,6 +211,7 @@ pkg_pretend() {
~!SYSFS_DEPRECATED_V2"

use acl && CONFIG_CHECK+=" ~TMPFS_POSIX_ACL"
use bpf && CONFIG_CHECK+=" ~BPF ~BPF_SYSCALL ~BPF_LSM ~DEBUG_INFO_BTF"
use seccomp && CONFIG_CHECK+=" ~SECCOMP ~SECCOMP_FILTER"

if kernel_is -ge 5 10 20; then
Expand Down Expand Up @@ -256,21 +257,19 @@ src_unpack() {
src_prepare() {
local PATCHES=(
"${FILESDIR}/systemd-test-process-util.patch"
"${FILESDIR}/256-bpf-gcc.patch"
# Flatcar: Adding our own patches here.
"${FILESDIR}/0001-wait-online-set-any-by-default.patch"
"${FILESDIR}/0002-networkd-default-to-kernel-IPForwarding-setting.patch"
tormath1 marked this conversation as resolved.
Show resolved Hide resolved
"${FILESDIR}/0003-needs-update-don-t-require-strictly-newer-usr.patch"
"${FILESDIR}/0004-core-use-max-for-DefaultTasksMax.patch"
"${FILESDIR}/0005-systemd-Disable-SELinux-permissions-checks.patch"
"${FILESDIR}/0006-Revert-getty-Pass-tty-to-use-by-agetty-via-stdin.patch"
"${FILESDIR}/0007-units-Keep-using-old-journal-file-format.patch"
# Flatcar: This can be dropped when updating to 256.
"${FILESDIR}/0008-sysext-Mutable-overlays.patch"
"${FILESDIR}/0009-initrd-parse-etc.service.patch"
)

if ! use vanilla; then
PATCHES+=(
"${FILESDIR}/gentoo-generator-path-r2.patch"
"${FILESDIR}/gentoo-journald-audit-r1.patch"
)
fi
Expand Down Expand Up @@ -335,11 +334,8 @@ multilib_src_configure() {
# Disable compatibility with sysvinit
-Dsysvinit-path=
-Dsysvrcnd-path=
# Avoid infinite exec recursion, bug 642724
-Dtelinit-path="${EPREFIX}/lib/sysvinit/telinit"
# no deps
-Dima=true
-Ddefault-hierarchy=$(usex cgroup-hybrid hybrid unified)
# Match /etc/shells, bug 919749
-Ddebug-shell="${EPREFIX}/bin/sh"
-Ddefault-user-shell="${EPREFIX}/bin/bash"
Expand All @@ -348,6 +344,8 @@ multilib_src_configure() {
$(meson_native_use_bool apparmor)
$(meson_native_use_bool audit)
$(meson_native_use_bool boot bootloader)
$(meson_native_use_bool bpf bpf-framework)
-Dbpf-compiler=gcc
$(meson_native_use_bool cryptsetup libcryptsetup)
$(meson_native_use_bool curl libcurl)
$(meson_native_use_bool dns-over-tls dns-over-tls)
Expand Down Expand Up @@ -447,6 +445,14 @@ multilib_src_configure() {
-Ddefault-mdns=no
)

case $(tc-arch) in
amd64|arm|arm64|ppc|ppc64|s390|x86)
# src/vmspawn/vmspawn-util.h: QEMU_MACHINE_TYPE
myconf+=( $(meson_native_enabled vmspawn) ) ;;
*)
myconf+=( -Dvmspawn=disabled ) ;;
esac

meson_src_configure "${myconf[@]}"
}

Expand Down Expand Up @@ -504,7 +510,11 @@ multilib_src_install_all() {
# keepdir /var/log/journal

# if use pam; then
# newpamd "${FILESDIR}"/systemd-user.pam systemd-user
# if use selinux; then
# newpamd "${FILESDIR}"/systemd-user-selinux.pam systemd-user
# else
# newpamd "${FILESDIR}"/systemd-user.pam systemd-user
# fi
# fi

if use kernel-install; then
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ EGIT_REPO_URI="https://github.com/flatcar/bootengine.git"
if [[ "${PV}" == 9999 ]]; then
KEYWORDS="~amd64 ~arm ~arm64 ~x86"
else
EGIT_COMMIT="c9de038b73621165f81573c77ca0d0c2f9e886db" # flatcar-master
EGIT_COMMIT="229e279c1e1e480ccbfb33f254c23068941b1518" # flatcar-master
KEYWORDS="amd64 arm arm64 x86"
fi

Expand Down
Loading