public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] repo/gentoo:master commit in: sys-apps/systemd-utils/files/, sys-apps/systemd-utils/
@ 2022-04-16 23:13 Mike Gilbert
  0 siblings, 0 replies; 10+ messages in thread
From: Mike Gilbert @ 2022-04-16 23:13 UTC (permalink / raw
  To: gentoo-commits

commit:     c640ffc50506ebdc83e654169ba0ef0a512e31b3
Author:     Mike Gilbert <floppym <AT> gentoo <DOT> org>
AuthorDate: Tue Apr 12 15:13:46 2022 +0000
Commit:     Mike Gilbert <floppym <AT> gentoo <DOT> org>
CommitDate: Sat Apr 16 23:10:08 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c640ffc5

sys-apps/systemd-utils: new package

Signed-off-by: Mike Gilbert <floppym <AT> gentoo.org>

 sys-apps/systemd-utils/Manifest                    |   2 +
 sys-apps/systemd-utils/files/40-gentoo.rules       |   3 +
 .../systemd-utils/files/systemd-tmpfiles-setup     |  18 +
 .../systemd-utils/files/systemd-tmpfiles-setup-dev |  20 +
 sys-apps/systemd-utils/metadata.xml                |  13 +
 sys-apps/systemd-utils/systemd-utils-250.4.ebuild  | 460 +++++++++++++++++++++
 6 files changed, 516 insertions(+)

diff --git a/sys-apps/systemd-utils/Manifest b/sys-apps/systemd-utils/Manifest
new file mode 100644
index 000000000000..36c4e1be52e1
--- /dev/null
+++ b/sys-apps/systemd-utils/Manifest
@@ -0,0 +1,2 @@
+DIST systemd-musl-patches-250.4.tar.gz 28065 BLAKE2B b8366c4bb29705e3f41f07d0105c4d252d543aaac178e968663660eeb573da034813aa50a96c74ac78ae5efeea379e00df33c5a039ec828cf93450ed23786252 SHA512 66e41fab1873021913c32e3f43300ea7babd18a36e6543838ab7fab4c44f5590c6a7414dd50c7ee81e5513b0e5aa01cb6df4231e8e06c609d63011a32b524213
+DIST systemd-stable-250.4.tar.gz 11132786 BLAKE2B 8fdfe1bad76e572dc1be0955f3d1c4080f2beb81a2f9670f80827899f5406ab8ed8675400c2f5e8ccef44cf1bceff42ceae12a42e1b67d46c0deb523e6495f25 SHA512 307ed0920da660b6c45d909fea66864fb98db8b2f6905d629fb2012fc4bf64dd25fd61168c22bf4098200be541be9b0e815fbde98806a99c85cb33d49d8b63d0

diff --git a/sys-apps/systemd-utils/files/40-gentoo.rules b/sys-apps/systemd-utils/files/40-gentoo.rules
new file mode 100644
index 000000000000..6b96bd07051e
--- /dev/null
+++ b/sys-apps/systemd-utils/files/40-gentoo.rules
@@ -0,0 +1,3 @@
+# Gentoo specific groups
+ACTION=="add", SUBSYSTEM=="block", KERNEL=="fd[0-9]", GROUP="floppy"
+ACTION=="add", SUBSYSTEM=="usb", ENV{DEVTYPE}=="usb_device", GROUP="usb"

diff --git a/sys-apps/systemd-utils/files/systemd-tmpfiles-setup b/sys-apps/systemd-utils/files/systemd-tmpfiles-setup
new file mode 100644
index 000000000000..a36c1020e0db
--- /dev/null
+++ b/sys-apps/systemd-utils/files/systemd-tmpfiles-setup
@@ -0,0 +1,18 @@
+#!/sbin/openrc-run
+# Copyright 2022 Gentoo Authors
+# Released under the 2-clause BSD license.
+
+description="Create Volatile Files and Directories"
+
+depend()
+{
+	provide tmpfiles-setup tmpfiles.setup
+	need localmount
+}
+
+start()
+{
+	ebegin "${description}"
+	systemd-tmpfiles --create --remove --boot --exclude-prefix=/dev
+	eend $?
+}

diff --git a/sys-apps/systemd-utils/files/systemd-tmpfiles-setup-dev b/sys-apps/systemd-utils/files/systemd-tmpfiles-setup-dev
new file mode 100644
index 000000000000..496de522d08d
--- /dev/null
+++ b/sys-apps/systemd-utils/files/systemd-tmpfiles-setup-dev
@@ -0,0 +1,20 @@
+#!/sbin/openrc-run
+# Copyright 2022 Gentoo Authors
+# Released under the 2-clause BSD license.
+
+description="Create Static Devices Nodes in /dev"
+
+depend()
+{
+	provide tmpfiles-dev tmpfiles.dev
+	use dev-mount
+	before dev
+	keyword -prefix -vserver
+}
+
+start()
+{
+	ebegin "${description}"
+	systemd-tmpfiles --prefix=/dev --create --boot
+	eend $?
+}

diff --git a/sys-apps/systemd-utils/metadata.xml b/sys-apps/systemd-utils/metadata.xml
new file mode 100644
index 000000000000..efdb151f4069
--- /dev/null
+++ b/sys-apps/systemd-utils/metadata.xml
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+	<maintainer type="project">
+		<email>systemd@gentoo.org</email>
+	</maintainer>
+	<use>
+		<flag name="boot">Enable systemd-boot (UEFI boot manager)</flag>
+		<flag name="sysusers">Enable systemd-sysusers</flag>
+		<flag name="tmpfiles">Enable systemd-tmpfiles</flag>
+		<flag name="udev">Enable systemd-udev (userspace device manager)</flag>
+	</use>
+</pkgmetadata>

diff --git a/sys-apps/systemd-utils/systemd-utils-250.4.ebuild b/sys-apps/systemd-utils/systemd-utils-250.4.ebuild
new file mode 100644
index 000000000000..a31cb2e5308a
--- /dev/null
+++ b/sys-apps/systemd-utils/systemd-utils-250.4.ebuild
@@ -0,0 +1,460 @@
+# Copyright 2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+PYTHON_COMPAT=( python3_{8..10} )
+
+inherit bash-completion-r1 flag-o-matic meson-multilib python-any-r1 toolchain-funcs usr-ldscript
+
+DESCRIPTION="Utilities taken from systemd"
+HOMEPAGE="https://systemd.io/"
+
+if [[ ${PV} == *.* ]]; then
+	MY_P="systemd-stable-${PV}"
+	S="${WORKDIR}/${MY_P}"
+	SRC_URI="https://github.com/systemd/systemd-stable/archive/refs/tags/v${PV}.tar.gz -> ${MY_P}.tar.gz"
+else
+	MY_P="systemd-${PV}"
+	S="${WORKDIR}/${MY_P}"
+	SRC_URI="https://github.com/systemd/systemd/archive/refs/tags/v${PV}.tar.gz -> ${MY_P}.tar.gz"
+fi
+
+MUSL_PATCHSET="systemd-musl-patches-250.4"
+SRC_URI+=" elibc_musl? ( https://dev.gentoo.org/~floppym/dist/${MUSL_PATCHSET}.tar.gz )"
+
+LICENSE="GPL-2 LGPL-2.1 MIT public-domain"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86"
+IUSE="+boot selinux +sysusers +tmpfiles test +udev"
+REQUIRED_USE="|| ( boot tmpfiles sysusers udev )"
+RESTRICT="!test? ( test )"
+
+COMMON_DEPEND="
+	sys-apps/acl:0=
+	>=sys-apps/kmod-15:0=
+	selinux? ( sys-libs/libselinux:0= )
+	udev? (
+		>=sys-apps/util-linux-2.30:0=[${MULTILIB_USEDEP}]
+		sys-libs/libcap:0=[${MULTILIB_USEDEP}]
+		virtual/libcrypt:=[${MULTILIB_USEDEP}]
+	)
+	!udev? (
+		>=sys-apps/util-linux-2.30:0=
+		sys-libs/libcap:0=
+		virtual/libcrypt:=
+	)
+"
+DEPEND="${COMMON_DEPEND}
+	boot? (
+		>=sys-boot/gnu-efi-3.0.2
+	)
+	>=sys-kernel/linux-headers-3.11
+"
+RDEPEND="${COMMON_DEPEND}
+	boot? ( !<sys-boot/systemd-boot-250 )
+	tmpfiles? ( !<sys-apps/systemd-tmpfiles-250 )
+	udev? (
+		acct-group/audio
+		acct-group/cdrom
+		acct-group/dialout
+		acct-group/disk
+		acct-group/input
+		acct-group/kmem
+		acct-group/kvm
+		acct-group/lp
+		acct-group/render
+		acct-group/sgx
+		acct-group/tape
+		acct-group/tty
+		acct-group/video
+		!sys-apps/gentoo-systemd-integration
+		!sys-apps/hwids[udev]
+		!<sys-fs/udev-250
+	)
+	!sys-apps/systemd
+"
+PDEPEND="
+	udev? ( >=sys-fs/udev-init-scripts-34 )
+"
+BDEPEND="
+	$(python_gen_any_dep 'dev-python/jinja[${PYTHON_USEDEP}]')
+	app-text/docbook-xml-dtd:4.2
+	app-text/docbook-xml-dtd:4.5
+	app-text/docbook-xsl-stylesheets
+	dev-libs/libxslt
+	dev-util/gperf
+	>=sys-apps/coreutils-8.16
+	sys-devel/gettext
+	virtual/pkgconfig
+"
+
+python_check_deps() {
+	has_version -b "dev-python/jinja[${PYTHON_USEDEP}]"
+}
+
+QA_EXECSTACK="usr/lib/systemd/boot/efi/*"
+QA_FLAGS_IGNORED="usr/lib/systemd/boot/efi/.*"
+
+src_prepare() {
+	local PATCHES=(
+	)
+	if use elibc_musl; then
+		PATCHES+=( "${WORKDIR}/${MUSL_PATCHSET}" )
+	fi
+	default
+
+	# Remove install_rpath; we link statically
+	local rpath_pattern="install_rpath : rootlibexecdir,"
+	grep -q -e "${rpath_pattern}" meson.build || die
+	sed -i -e "/${rpath_pattern}/d" meson.build || die
+}
+
+multilib_src_configure() {
+	local emesonargs=(
+		-Drootprefix="${EPREFIX:-/}"
+		-Dsysvinit-path=
+		$(meson_native_true acl)
+		$(meson_native_use_bool boot efi)
+		$(meson_native_use_bool boot gnu-efi)
+		$(meson_native_use_bool selinux)
+		$(meson_native_use_bool sysusers)
+		$(meson_use test tests)
+		$(meson_native_use_bool tmpfiles)
+		$(meson_use udev hwdb)
+
+		-Defi-libdir="${ESYSROOT}/usr/$(get_libdir)"
+
+		# Link staticly with libsystemd-shared
+		-Dlink-boot-shared=false
+		-Dlink-udev-shared=false
+
+		# systemd-tmpfiles has a separate "systemd-tmpfiles.standalone" target
+		-Dstandalone-binaries=true
+
+		# Disable all optional features
+		-Dadm-group=false
+		-Danalyze=false
+		-Dapparmor=false
+		-Daudit=false
+		-Dbacklight=false
+		-Dbinfmt=false
+		-Dbzip2=false
+		-Dcoredump=false
+		-Ddbus=false
+		-Delfutils=false
+		-Denvironment-d=false
+		-Dfdisk=false
+		-Dgcrypt=false
+		-Dglib=false
+		-Dgshadow=false
+		-Dgnutls=false
+		-Dhibernate=false
+		-Dhostnamed=false
+		-Didn=false
+		-Dima=false
+		-Dinitrd=false
+		-Dfirstboot=false
+		-Dkernel-install=false
+		-Dkmod=false
+		-Dldconfig=false
+		-Dlibcryptsetup=false
+		-Dlibcurl=false
+		-Dlibfido2=false
+		-Dlibidn=false
+		-Dlibidn2=false
+		-Dlibiptc=false
+		-Dlocaled=false
+		-Dlogind=false
+		-Dlz4=false
+		-Dmachined=false
+		-Dmicrohttpd=false
+		-Dnetworkd=false
+		-Dnscd=false
+		-Dnss-myhostname=false
+		-Dnss-resolve=false
+		-Dnss-systemd=false
+		-Doomd=false
+		-Dopenssl=false
+		-Dp11kit=false
+		-Dpam=false
+		-Dpcre2=false
+		-Dpolkit=false
+		-Dportabled=false
+		-Dpstore=false
+		-Dpwquality=false
+		-Drandomseed=false
+		-Dresolve=false
+		-Drfkill=false
+		-Dseccomp=false
+		-Dsmack=false
+		-Dsysext=false
+		-Dtimedated=false
+		-Dtimesyncd=false
+		-Dtpm=false
+		-Dqrencode=false
+		-Dquotacheck=false
+		-Duserdb=false
+		-Dutmp=false
+		-Dvconsole=false
+		-Dwheel-group=false
+		-Dxdg-autostart=false
+		-Dxkbcommon=false
+		-Dxz=false
+		-Dzlib=false
+		-Dzstd=false
+	)
+
+	if use elibc_musl; then
+		# Avoid redefinition of struct ethhdr.
+		append-cppflags -D__UAPI_DEF_ETHHDR=0
+	fi
+
+	if multilib_is_native_abi || use udev; then
+		meson_src_configure
+	fi
+}
+
+efi_arch() {
+	case "$(tc-arch)" in
+		amd64) echo x64 ;;
+		arm)   echo arm ;;
+		arm64) echo aa64 ;;
+		x86)   echo x86 ;;
+	esac
+}
+
+multilib_src_compile() {
+	local targets=()
+	if multilib_is_native_abi; then
+		if use boot; then
+			targets+=(
+				bootctl
+				man/bootctl.1
+				man/kernel-install.8
+				src/boot/efi/linux$(efi_arch).{efi,elf}.stub
+				src/boot/efi/systemd-boot$(efi_arch).efi
+			)
+		fi
+		if use sysusers; then
+			targets+=(
+				systemd-sysusers.standalone
+				man/sysusers.d.5
+				man/systemd-sysusers.8
+			)
+			if use test; then
+				targets+=(
+					systemd-runtest.env
+				)
+			fi
+		fi
+		if use tmpfiles; then
+			targets+=(
+				systemd-tmpfiles.standalone
+				man/tmpfiles.d.5
+				man/systemd-tmpfiles.8
+			)
+			if use test; then
+				targets+=( test-tmpfiles )
+			fi
+		fi
+		if use udev; then
+			targets+=(
+				udevadm
+				systemd-hwdb
+				src/udev/ata_id
+				src/udev/cdrom_id
+				src/udev/fido_id
+				src/udev/mtd_probe
+				src/udev/scsi_id
+				src/udev/udev.pc
+				src/udev/v4l_id
+				man/udev.conf.5
+				man/systemd.link.5
+				man/hwdb.7
+				man/udev.7
+				man/systemd-hwdb.8
+				man/systemd-udevd.service.8
+				man/udevadm.8
+				hwdb.d/60-autosuspend-chromiumos.hwdb
+				rules.d/50-udev-default.rules
+				rules.d/64-btrfs.rules
+			)
+			if use test; then
+				targets+=(
+					# Used by udev-test.pl
+					systemd-detect-virt
+					test/sys
+					test-udev
+
+					test-fido-id-desc
+					test-udev-builtin
+					test-udev-event
+					test-udev-netlink
+					test-udev-node
+					test-udev-util
+				)
+			fi
+		fi
+	fi
+	if use udev; then
+		targets+=(
+			udev:shared_library
+			src/libudev/libudev.pc
+		)
+		if use test; then
+			targets+=(
+				test-libudev
+				test-libudev-sym
+				test-udev-device-thread
+			)
+		fi
+	fi
+	if multilib_is_native_abi || use udev; then
+		meson_src_compile "${targets[@]}"
+	fi
+}
+
+multilib_src_test() {
+	local tests=()
+	if multilib_is_native_abi; then
+		if use sysusers; then
+			tests+=(
+				test-sysusers.standalone
+			)
+		fi
+		if use tmpfiles; then
+			tests+=(
+				test-systmed-tmpfiles
+				test-tmpfiles
+			)
+		fi
+		if use udev; then
+			tests+=(
+				rule-syntax-check
+				test-fido-id-desc
+				test-udev-builtin
+				test-udev-event
+				test-udev-netlink
+				test-udev-node
+				test-udev-util
+			)
+			if [[ -w /dev ]]; then
+				tests+=( udev-test )
+			else
+				ewarn "Skipping udev-test (needs write access to /dev)"
+			fi
+		fi
+	fi
+	if use udev; then
+		tests+=(
+			test-libudev
+			test-libudev-sym
+			test-udev-device-thread
+		)
+	fi
+	if [[ ${#tests[@]} -ne 0 ]]; then
+		meson_src_test "${tests[@]}"
+	fi
+}
+
+multilib_src_install() {
+	if multilib_is_native_abi; then
+		if use boot; then
+			into /usr
+			dobin bootctl
+			doman man/{bootctl.1,kernel-install.8}
+			insinto usr/lib/systemd/boot/efi
+			doins src/boot/efi/{linux$(efi_arch).{efi,elf}.stub,systemd-boot$(efi_arch).efi}
+		fi
+		if use sysusers; then
+			into /
+			newbin systemd-sysusers{.standalone,}
+			doman man/{systemd-sysusers.8,sysusers.d.5}
+		fi
+		if use tmpfiles; then
+			into /
+			newbin systemd-tmpfiles{.standalone,}
+			doman man/{systemd-tmpfiles.8,tmpfiles.d.5}
+		fi
+		if use udev; then
+			into /
+			dobin udevadm systemd-hwdb
+			dosym ../../bin/udevadm /lib/systemd/systemd-udevd
+			exeinto /lib/udev
+			doexe src/udev/{ata_id,cdrom_id,fido_id,mtd_probe,scsi_id,v4l_id}
+			insinto /lib/udev/rules.d
+			doins rules.d/*.rules
+			insinto /lib/udev/hwdb.d
+			doins hwdb.d/*.hwdb
+			insinto /usr/share/pkgconfig
+			doins src/udev/udev.pc
+			doman man/{udev.conf.5,systemd.link.5,hwdb.7,systemd-hwdb.8,udev.7,udevadm.8}
+			newman man/systemd-udevd.service.8 systemd-udevd.8
+
+		fi
+	fi
+	if use udev; then
+		into /usr
+		dolib.so "$(readlink libudev.so.1)" libudev.so{.1,}
+		gen_usr_ldscript -a udev
+		insinto "/usr/$(get_libdir)/pkgconfig"
+		doins src/libudev/libudev.pc
+	fi
+}
+
+multilib_src_install_all() {
+	einstalldocs
+	if use boot; then
+		into /usr
+		dobin src/kernel-install/kernel-install
+		exeinto usr/lib/kernel/install.d
+		doexe src/kernel-install/*.install
+		dobashcomp shell-completion/bash/bootctl
+		insinto /usr/share/zsh/site-functions
+		doins shell-completion/zsh/{_bootctl,_kernel-install}
+	fi
+	if use tmpfiles; then
+		doinitd "${FILESDIR}"/systemd-tmpfiles-setup
+		doinitd "${FILESDIR}"/systemd-tmpfiles-setup-dev
+		insinto /usr/share/zsh/site-functions
+		doins shell-completion/zsh/_systemd-tmpfiles
+	fi
+	if use udev; then
+		doheader src/libudev/libudev.h
+		insinto /etc/udev
+		doins src/udev/udev.conf
+		keepdir /etc/udev/{hwdb.d,rules.d}
+		insinto /lib/systemd/network
+		doins network/99-default.link
+		insinto /lib/udev/rules.d
+		doins rules.d/*.rules
+		doins "${FILESDIR}"/40-gentoo.rules
+		insinto /lib/udev/hwdb.d
+		doins hwdb.d/*.hwdb
+		dobashcomp shell-completion/bash/udevadm
+		insinto /usr/share/zsh/site-functions
+		doins shell-completion/zsh/_udevadm
+	fi
+}
+
+add_service() {
+	local initd=$1
+	local runlevel=$2
+
+	ebegin "Adding '${initd}' service to the '${runlevel}' runlevel"
+	mkdir -p "${EROOT}/etc/runlevels/${runlevel}" &&
+	ln -snf "${EPREFIX}/etc/init.d/${initd}" "${EROOT}/etc/runlevels/${runlevel}/${initd}"
+	eend $?
+}
+
+pkg_postinst() {
+	if [[ -z ${REPLACING_VERSIONS} ]]; then
+		add_service systemd-tmpfiles-setup-dev sysinit
+		add_service systemd-tmpfiles-setup boot
+	fi
+	if use udev; then
+		ebegin "Updating hwdb"
+		systemd-hwdb --root="${ROOT}" update
+		eend $?
+	fi
+}


^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: sys-apps/systemd-utils/files/, sys-apps/systemd-utils/
@ 2022-04-17 13:56 Mike Gilbert
  0 siblings, 0 replies; 10+ messages in thread
From: Mike Gilbert @ 2022-04-17 13:56 UTC (permalink / raw
  To: gentoo-commits

commit:     841cfaa31184136b10b4b3c1ebc86320a831966f
Author:     Mike Gilbert <floppym <AT> gentoo <DOT> org>
AuthorDate: Sun Apr 17 13:56:05 2022 +0000
Commit:     Mike Gilbert <floppym <AT> gentoo <DOT> org>
CommitDate: Sun Apr 17 13:56:54 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=841cfaa3

sys-apps/systemd-utils: fix test-systemd-tmpfiles

Signed-off-by: Mike Gilbert <floppym <AT> gentoo.org>

 .../250.4-test-systemd-tmpfiles.standalone.patch   | 40 ++++++++++++++++++++++
 sys-apps/systemd-utils/systemd-utils-250.4.ebuild  |  3 +-
 2 files changed, 42 insertions(+), 1 deletion(-)

diff --git a/sys-apps/systemd-utils/files/250.4-test-systemd-tmpfiles.standalone.patch b/sys-apps/systemd-utils/files/250.4-test-systemd-tmpfiles.standalone.patch
new file mode 100644
index 000000000000..a915cbb43115
--- /dev/null
+++ b/sys-apps/systemd-utils/files/250.4-test-systemd-tmpfiles.standalone.patch
@@ -0,0 +1,40 @@
+From 55bf689308ed00692494d3623bd2064f33c9bbbe Mon Sep 17 00:00:00 2001
+From: Mike Gilbert <floppym@gentoo.org>
+Date: Sun, 17 Apr 2022 09:48:28 -0400
+Subject: [PATCH] Add test support for  systemd-tmpfiles.standalone
+
+---
+ meson.build | 10 +++++++++-
+ 1 file changed, 9 insertions(+), 1 deletion(-)
+
+diff --git a/meson.build b/meson.build
+index 458370e83d..d60be1b050 100644
+--- a/meson.build
++++ b/meson.build
+@@ -3451,7 +3451,7 @@ if conf.get('ENABLE_TMPFILES') == 1
+         endif
+ 
+         if have_standalone_binaries
+-                public_programs += executable(
++                exe = executable(
+                         'systemd-tmpfiles.standalone',
+                         systemd_tmpfiles_sources,
+                         include_directories : includes,
+@@ -3463,6 +3463,14 @@ if conf.get('ENABLE_TMPFILES') == 1
+                         dependencies : [libacl],
+                         install : true,
+                         install_dir : rootbindir)
++                public_programs += exe
++
++                if want_tests != 'false'
++                        test('test-systemd-tmpfiles.standalone',
++                             test_systemd_tmpfiles_py,
++                             # https://github.com/mesonbuild/meson/issues/2681
++                             args : exe.full_path())
++                endif
+         endif
+ endif
+ 
+-- 
+2.35.1
+

diff --git a/sys-apps/systemd-utils/systemd-utils-250.4.ebuild b/sys-apps/systemd-utils/systemd-utils-250.4.ebuild
index cda7180f1b83..aee6304e1eaa 100644
--- a/sys-apps/systemd-utils/systemd-utils-250.4.ebuild
+++ b/sys-apps/systemd-utils/systemd-utils-250.4.ebuild
@@ -98,6 +98,7 @@ QA_FLAGS_IGNORED="usr/lib/systemd/boot/efi/.*"
 
 src_prepare() {
 	local PATCHES=(
+		"${FILESDIR}/250.4-test-systemd-tmpfiles.standalone.patch"
 	)
 	if use elibc_musl; then
 		PATCHES+=( "${WORKDIR}/${MUSL_PATCHSET}" )
@@ -325,7 +326,7 @@ multilib_src_test() {
 		fi
 		if use tmpfiles; then
 			tests+=(
-				test-systemd-tmpfiles
+				test-systemd-tmpfiles.standalone
 				test-tmpfiles
 			)
 		fi


^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: sys-apps/systemd-utils/files/, sys-apps/systemd-utils/
@ 2022-08-08 20:14 Sam James
  0 siblings, 0 replies; 10+ messages in thread
From: Sam James @ 2022-08-08 20:14 UTC (permalink / raw
  To: gentoo-commits

commit:     a82f57a0e358e78b0fdfc88f0f75b4fc4e9431d2
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Mon Aug  8 20:14:00 2022 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Mon Aug  8 20:14:06 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a82f57a0

sys-apps/systemd-utils: add 251.4

Closes: https://bugs.gentoo.org/863872
Signed-off-by: Sam James <sam <AT> gentoo.org>

 sys-apps/systemd-utils/Manifest                   |   1 +
 sys-apps/systemd-utils/files/251-glibc-2.36.patch | 154 -------
 sys-apps/systemd-utils/systemd-utils-251.4.ebuild | 514 ++++++++++++++++++++++
 3 files changed, 515 insertions(+), 154 deletions(-)

diff --git a/sys-apps/systemd-utils/Manifest b/sys-apps/systemd-utils/Manifest
index 3ad23a287f3f..ba1726b9a6b2 100644
--- a/sys-apps/systemd-utils/Manifest
+++ b/sys-apps/systemd-utils/Manifest
@@ -4,3 +4,4 @@ DIST systemd-stable-250.7.tar.gz 11214975 BLAKE2B 5d94b4b1f8b0cd6e8284a89ac0d4bd
 DIST systemd-stable-250.8.tar.gz 11215608 BLAKE2B 2a66a2d8cb70f265b59640ace907b8d927018fe11c8977e134a33d67683f06b26c1eb3fd5afe40431bc2c15827ba60c46a37ff1a0a4c716dd24b73aca1583d00 SHA512 653f527f10779a31213da06f7587a3617bd4b823bd3e5a43d626c5a4a7301e4a0fb42cf1fd056d28af6d87e52f258da59d5f0d4a2d98076905f9d3fcda6d18fd
 DIST systemd-stable-251.2.tar.gz 11434645 BLAKE2B a7e118649a7d27b789206ea9f6f2d0314e44561367506ee763a9e98fb97579b3fc49c7a402c8da142945dc98444558f0e311557f52c50863cebc7532c17c651f SHA512 0c4011b685a1e8d535af123cbaf79ab53d59ea665ca5350ab1077ad4e962b49c1fd5b1b5bb3f28c3e28145dfd02aa83023f78de5edec15afe84e3e06e742a67c
 DIST systemd-stable-251.3.tar.gz 11435458 BLAKE2B 544238536848ab390b2476d5ad95d33998674be50020b8db0627bb9d0c86be6576c404ce786b01ceec86f1c75b174c6fc2d7e0d7fbab802a78f48c9d0915c2b8 SHA512 fb5b8dc1742562ef95469e90d406cfb6dfcb337860ad1208b460414b88ff0565071bde797d195faa62761206abc881829de6b1009e5d727cad2dfe0764310d5f
+DIST systemd-stable-251.4.tar.gz 11440203 BLAKE2B 58a0ee4adcc9d35b15b9cc98b3da81d1103b61a6c0bee722468a5113cd7d6de1d40c46ef964ba9ecc4746e81b516ae4b2f1d046874d62db066735c652592612e SHA512 7bbfadd80b88a4c3510a5e4e3572e4eab71dafbf6289da038e552988e09ee8da16da3c9bb8a4fbbde6c6236e0e3c352b0a33f9ee0b84f10241f3499383387738

diff --git a/sys-apps/systemd-utils/files/251-glibc-2.36.patch b/sys-apps/systemd-utils/files/251-glibc-2.36.patch
deleted file mode 100644
index 65693d747ca3..000000000000
--- a/sys-apps/systemd-utils/files/251-glibc-2.36.patch
+++ /dev/null
@@ -1,154 +0,0 @@
-https://bugs.gentoo.org/863218
-https://github.com/systemd/systemd/issues/23984
-https://github.com/systemd/systemd/commit/3657d3a01c7e25ff86d7a4642065b367c4ff7484
-https://github.com/systemd/systemd/commit/0a58cd00454cc7b57b04f3a4a334584d743d7f7a
-
-From: Rudi Heitbaum <rudi@heitbaum.com>
-Date: Sat, 23 Jul 2022 10:38:49 +0000
-Subject: [PATCH] glibc: Remove #include <linux/fs.h> to resolve
- fsconfig_command/mount_attr conflict with glibc 2.36
-
---- a/meson.build
-+++ b/meson.build
-@@ -511,7 +511,6 @@ decl_headers = '''
- #include <uchar.h>
- #include <sys/mount.h>
- #include <sys/stat.h>
--#include <linux/fs.h>
- '''
- 
- foreach decl : ['char16_t',
-@@ -523,6 +522,17 @@ foreach decl : ['char16_t',
-         # We get -1 if the size cannot be determined
-         have = cc.sizeof(decl, prefix : decl_headers, args : '-D_GNU_SOURCE') > 0
- 
-+        if decl == 'struct mount_attr'
-+                if have
-+                        want_linux_fs_h = false
-+                else
-+                        have = cc.sizeof(decl,
-+                                         prefix : decl_headers + '#include <linux/fs.h>',
-+                                         args : '-D_GNU_SOURCE') > 0
-+                        want_linux_fs_h = have
-+                endif
-+        endif
-+
-         if decl == 'struct statx'
-                 if have
-                         want_linux_stat_h = false
-@@ -538,6 +548,7 @@ foreach decl : ['char16_t',
- endforeach
- 
- conf.set10('WANT_LINUX_STAT_H', want_linux_stat_h)
-+conf.set10('WANT_LINUX_FS_H', want_linux_fs_h)
- 
- foreach ident : ['secure_getenv', '__secure_getenv']
-         conf.set10('HAVE_' + ident.to_upper(), cc.has_function(ident))
---- a/src/basic/fd-util.c
-+++ b/src/basic/fd-util.c
-@@ -3,7 +3,9 @@
- #include <errno.h>
- #include <fcntl.h>
- #include <linux/btrfs.h>
-+#if WANT_LINUX_FS_H
- #include <linux/fs.h>
-+#endif
- #include <linux/magic.h>
- #include <sys/ioctl.h>
- #include <sys/resource.h>
---- a/src/core/namespace.c
-+++ b/src/core/namespace.c
-@@ -7,7 +7,9 @@
- #include <sys/file.h>
- #include <sys/mount.h>
- #include <unistd.h>
-+#if WANT_LINUX_FS_H
- #include <linux/fs.h>
-+#endif
- 
- #include "alloc-util.h"
- #include "base-filesystem.h"
---- a/src/shared/mount-util.c
-+++ b/src/shared/mount-util.c
-@@ -7,7 +7,9 @@
- #include <sys/statvfs.h>
- #include <unistd.h>
- #include <linux/loop.h>
-+#if WANT_LINUX_FS_H
- #include <linux/fs.h>
-+#endif
- 
- #include "alloc-util.h"
- #include "chase-symlinks.h"
-
-From 0a58cd00454cc7b57b04f3a4a334584d743d7f7a Mon Sep 17 00:00:00 2001
-From: Yu Watanabe <watanabe.yu+github@gmail.com>
-Date: Tue, 26 Jul 2022 20:03:12 +0900
-Subject: [PATCH] home: drop conflicted headers
-
-Fixes #24117.
---- a/src/basic/missing_fs.h
-+++ b/src/basic/missing_fs.h
-@@ -64,3 +64,8 @@
- #ifndef FS_PROJINHERIT_FL
- #define FS_PROJINHERIT_FL 0x20000000
- #endif
-+
-+/* linux/fscrypt.h */
-+#ifndef FS_KEY_DESCRIPTOR_SIZE
-+#define FS_KEY_DESCRIPTOR_SIZE 8
-+#endif
---- a/src/home/homework-cifs.c
-+++ b/src/home/homework-cifs.c
-@@ -1,5 +1,10 @@
- /* SPDX-License-Identifier: LGPL-2.1-or-later */
- 
-+#include <sys/mount.h>
-+#if WANT_LINUX_FS_H
-+#include <linux/fs.h>
-+#endif
-+
- #include "dirent-util.h"
- #include "fd-util.h"
- #include "fileio.h"
---- a/src/home/homework-luks.c
-+++ b/src/home/homework-luks.c
-@@ -4,7 +4,6 @@
- #include <poll.h>
- #include <sys/file.h>
- #include <sys/ioctl.h>
--#include <sys/mount.h>
- #include <sys/xattr.h>
- 
- #if HAVE_VALGRIND_MEMCHECK_H
---- a/src/home/homework-mount.c
-+++ b/src/home/homework-mount.c
-@@ -2,7 +2,9 @@
- 
- #include <sched.h>
- #include <sys/mount.h>
-+#if WANT_LINUX_FS_H
- #include <linux/fs.h>
-+#endif
- 
- #include "alloc-util.h"
- #include "fd-util.h"
---- a/src/home/homework.h
-+++ b/src/home/homework.h
-@@ -1,13 +1,14 @@
- /* SPDX-License-Identifier: LGPL-2.1-or-later */
- #pragma once
- 
--#include <linux/fs.h>
- #include <sys/vfs.h>
- 
- #include "sd-id128.h"
- 
-+#include "cryptsetup-util.h"
- #include "homework-password-cache.h"
- #include "loop-util.h"
-+#include "missing_fs.h" /* for FS_KEY_DESCRIPTOR_SIZE, do not include linux/fs.h */
- #include "missing_keyctl.h"
- #include "missing_syscall.h"
- #include "user-record.h"
-

diff --git a/sys-apps/systemd-utils/systemd-utils-251.4.ebuild b/sys-apps/systemd-utils/systemd-utils-251.4.ebuild
new file mode 100644
index 000000000000..d66f463cc001
--- /dev/null
+++ b/sys-apps/systemd-utils/systemd-utils-251.4.ebuild
@@ -0,0 +1,514 @@
+# Copyright 2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+PYTHON_COMPAT=( python3_{8..11} )
+
+QA_PKGCONFIG_VERSION=$(ver_cut 1)
+
+inherit bash-completion-r1 flag-o-matic meson-multilib python-any-r1 toolchain-funcs udev usr-ldscript
+
+DESCRIPTION="Utilities split out from systemd for OpenRC users"
+HOMEPAGE="https://systemd.io/"
+
+if [[ ${PV} == *.* ]]; then
+	MY_P="systemd-stable-${PV}"
+	S="${WORKDIR}/${MY_P}"
+	SRC_URI="https://github.com/systemd/systemd-stable/archive/refs/tags/v${PV}.tar.gz -> ${MY_P}.tar.gz"
+else
+	MY_P="systemd-${PV}"
+	S="${WORKDIR}/${MY_P}"
+	SRC_URI="https://github.com/systemd/systemd/archive/refs/tags/v${PV}.tar.gz -> ${MY_P}.tar.gz"
+fi
+
+MUSL_PATCHSET="systemd-musl-patches-251.2"
+SRC_URI+=" elibc_musl? ( https://dev.gentoo.org/~floppym/dist/${MUSL_PATCHSET}.tar.gz )"
+
+LICENSE="GPL-2 LGPL-2.1 MIT public-domain"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86"
+IUSE="+acl boot +kmod selinux sysusers +tmpfiles test +udev"
+REQUIRED_USE="|| ( boot tmpfiles sysusers udev )"
+RESTRICT="!test? ( test )"
+
+COMMON_DEPEND="
+	elibc_musl? ( >=sys-libs/musl-1.2.3 )
+	selinux? ( sys-libs/libselinux:0= )
+	tmpfiles? (
+		acl? ( sys-apps/acl:0= )
+	)
+	udev? (
+		>=sys-apps/util-linux-2.30:0=[${MULTILIB_USEDEP}]
+		sys-libs/libcap:0=[${MULTILIB_USEDEP}]
+		virtual/libcrypt:=[${MULTILIB_USEDEP}]
+		acl? ( sys-apps/acl:0= )
+		kmod? ( >=sys-apps/kmod-15:0= )
+	)
+	!udev? (
+		>=sys-apps/util-linux-2.30:0=
+		sys-libs/libcap:0=
+		virtual/libcrypt:=
+	)
+"
+DEPEND="${COMMON_DEPEND}
+	>=sys-kernel/linux-headers-3.11
+	boot? ( >=sys-boot/gnu-efi-3.0.2 )
+"
+RDEPEND="${COMMON_DEPEND}
+	boot? ( !<sys-boot/systemd-boot-250 )
+	tmpfiles? ( !<sys-apps/systemd-tmpfiles-250 )
+	udev? (
+		acct-group/audio
+		acct-group/cdrom
+		acct-group/dialout
+		acct-group/disk
+		acct-group/input
+		acct-group/kmem
+		acct-group/kvm
+		acct-group/lp
+		acct-group/render
+		acct-group/sgx
+		acct-group/tape
+		acct-group/tty
+		acct-group/video
+		!sys-apps/gentoo-systemd-integration
+		!sys-apps/hwids[udev]
+		!<sys-fs/udev-250
+		!sys-fs/eudev
+	)
+	!sys-apps/systemd
+"
+PDEPEND="
+	udev? ( >=sys-fs/udev-init-scripts-34 )
+"
+BDEPEND="
+	$(python_gen_any_dep 'dev-python/jinja[${PYTHON_USEDEP}]')
+	app-text/docbook-xml-dtd:4.2
+	app-text/docbook-xml-dtd:4.5
+	app-text/docbook-xsl-stylesheets
+	dev-libs/libxslt
+	dev-util/gperf
+	>=sys-apps/coreutils-8.16
+	sys-devel/gettext
+	virtual/pkgconfig
+"
+
+TMPFILES_OPTIONAL=1
+UDEV_OPTIONAL=1
+
+python_check_deps() {
+	python_has_version "dev-python/jinja[${PYTHON_USEDEP}]"
+}
+
+QA_EXECSTACK="usr/lib/systemd/boot/efi/*"
+QA_FLAGS_IGNORED="usr/lib/systemd/boot/efi/.*"
+
+src_prepare() {
+	local PATCHES=(
+	)
+
+	if use elibc_musl; then
+		PATCHES+=( "${WORKDIR}/${MUSL_PATCHSET}" )
+		# Applied upstream in 251.3
+		rm "${WORKDIR}/${MUSL_PATCHSET}/0001-Add-sys-file.h-for-LOCK_.patch" || die
+	fi
+	default
+
+	# Remove install_rpath; we link statically
+	local rpath_pattern="install_rpath : rootlibexecdir,"
+	grep -q -e "${rpath_pattern}" meson.build || die
+	sed -i -e "/${rpath_pattern}/d" meson.build || die
+}
+
+multilib_src_configure() {
+	# When bumping to 251, please keep this, but add the revert patch
+	# like in sys-apps/systemd!
+	#
+	# Broken with FORTIFY_SOURCE=3 without a patch. And the patch
+	# wasn't backported to 250.x, but it turns out to break Clang
+	# anyway:  bug #841770.
+	#
+	# Our toolchain sets F_S=2 by default w/ >= -O2, so we need
+	# to unset F_S first, then explicitly set 2, to negate any default
+	# and anything set by the user if they're choosing 3 (or if they've
+	# modified GCC to set 3).
+	#
+	if is-flagq '-O[23]' || is-flagq '-Ofast' ; then
+		# We can't unconditionally do this b/c we fortify needs
+		# some level of optimisation.
+		filter-flags -D_FORTIFY_SOURCE=3
+		append-cppflags -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2
+	fi
+
+	local emesonargs=(
+		-Drootprefix="${EPREFIX:-/}"
+		-Drootlibdir="${EPREFIX}/usr/$(get_libdir)"
+		-Dsysvinit-path=
+		$(meson_native_use_bool boot efi)
+		$(meson_native_use_bool boot gnu-efi)
+		$(meson_native_use_bool boot kernel-install)
+		$(meson_native_use_bool selinux)
+		$(meson_native_use_bool sysusers)
+		$(meson_use test tests)
+		$(meson_native_use_bool tmpfiles)
+		$(meson_use udev hwdb)
+
+		-Defi-libdir="${ESYSROOT}/usr/$(get_libdir)"
+
+		# Link staticly with libsystemd-shared
+		-Dlink-boot-shared=false
+		-Dlink-udev-shared=false
+
+		# systemd-tmpfiles has a separate "systemd-tmpfiles.standalone" target
+		-Dstandalone-binaries=true
+
+		# Disable all optional features
+		-Dadm-group=false
+		-Danalyze=false
+		-Dapparmor=false
+		-Daudit=false
+		-Dbacklight=false
+		-Dbinfmt=false
+		-Dbzip2=false
+		-Dcoredump=false
+		-Ddbus=false
+		-Delfutils=false
+		-Denvironment-d=false
+		-Dfdisk=false
+		-Dgcrypt=false
+		-Dglib=false
+		-Dgshadow=false
+		-Dgnutls=false
+		-Dhibernate=false
+		-Dhostnamed=false
+		-Didn=false
+		-Dima=false
+		-Dinitrd=false
+		-Dfirstboot=false
+		-Dldconfig=false
+		-Dlibcryptsetup=false
+		-Dlibcurl=false
+		-Dlibfido2=false
+		-Dlibidn=false
+		-Dlibidn2=false
+		-Dlibiptc=false
+		-Dlocaled=false
+		-Dlogind=false
+		-Dlz4=false
+		-Dmachined=false
+		-Dmicrohttpd=false
+		-Dnetworkd=false
+		-Dnscd=false
+		-Dnss-myhostname=false
+		-Dnss-resolve=false
+		-Dnss-systemd=false
+		-Doomd=false
+		-Dopenssl=false
+		-Dp11kit=false
+		-Dpam=false
+		-Dpcre2=false
+		-Dpolkit=false
+		-Dportabled=false
+		-Dpstore=false
+		-Dpwquality=false
+		-Drandomseed=false
+		-Dresolve=false
+		-Drfkill=false
+		-Dseccomp=false
+		-Dsmack=false
+		-Dsysext=false
+		-Dtimedated=false
+		-Dtimesyncd=false
+		-Dtpm=false
+		-Dqrencode=false
+		-Dquotacheck=false
+		-Duserdb=false
+		-Dutmp=false
+		-Dvconsole=false
+		-Dwheel-group=false
+		-Dxdg-autostart=false
+		-Dxkbcommon=false
+		-Dxz=false
+		-Dzlib=false
+		-Dzstd=false
+	)
+
+	if use tmpfiles || use udev; then
+		emesonargs+=( $(meson_native_use_bool acl) )
+	else
+		emesonargs+=( -Dacl=false )
+	fi
+
+	if use udev; then
+		emesonargs+=( $(meson_native_use_bool kmod) )
+	else
+		emesonargs+=( -Dkmod=false )
+	fi
+
+	if use elibc_musl; then
+		# Avoid redefinition of struct ethhdr.
+		append-cppflags -D__UAPI_DEF_ETHHDR=0
+	fi
+
+	if multilib_is_native_abi || use udev; then
+		meson_src_configure
+	fi
+}
+
+efi_arch() {
+	case "$(tc-arch)" in
+		amd64) echo x64 ;;
+		arm)   echo arm ;;
+		arm64) echo aa64 ;;
+		x86)   echo x86 ;;
+	esac
+}
+
+multilib_src_compile() {
+	local targets=()
+	if multilib_is_native_abi; then
+		if use boot; then
+			targets+=(
+				bootctl
+				kernel-install
+				man/bootctl.1
+				man/kernel-install.8
+				src/boot/efi/linux$(efi_arch).{efi,elf}.stub
+				src/boot/efi/systemd-boot$(efi_arch).efi
+			)
+		fi
+		if use sysusers; then
+			targets+=(
+				systemd-sysusers.standalone
+				man/sysusers.d.5
+				man/systemd-sysusers.8
+			)
+			if use test; then
+				targets+=(
+					systemd-runtest.env
+				)
+			fi
+		fi
+		if use tmpfiles; then
+			targets+=(
+				systemd-tmpfiles.standalone
+				man/tmpfiles.d.5
+				man/systemd-tmpfiles.8
+			)
+			if use test; then
+				targets+=( test-tmpfiles )
+			fi
+		fi
+		if use udev; then
+			targets+=(
+				udevadm
+				systemd-hwdb
+				src/udev/ata_id
+				src/udev/cdrom_id
+				src/udev/fido_id
+				src/udev/mtd_probe
+				src/udev/scsi_id
+				src/udev/udev.pc
+				src/udev/v4l_id
+				man/udev.conf.5
+				man/systemd.link.5
+				man/hwdb.7
+				man/udev.7
+				man/systemd-hwdb.8
+				man/systemd-udevd.service.8
+				man/udevadm.8
+				hwdb.d/60-autosuspend-chromiumos.hwdb
+				rules.d/50-udev-default.rules
+				rules.d/64-btrfs.rules
+			)
+			if use test; then
+				targets+=(
+					# Used by udev-test.pl
+					systemd-detect-virt
+					test/sys
+					test-udev
+
+					test-fido-id-desc
+					test-udev-builtin
+					test-udev-event
+					test-udev-netlink
+					test-udev-node
+					test-udev-util
+				)
+			fi
+		fi
+	fi
+	if use udev; then
+		targets+=(
+			udev:shared_library
+			src/libudev/libudev.pc
+		)
+		if use test; then
+			targets+=(
+				test-libudev
+				test-libudev-sym
+				test-udev-device-thread
+			)
+		fi
+	fi
+	if multilib_is_native_abi || use udev; then
+		meson_src_compile "${targets[@]}"
+	fi
+}
+
+multilib_src_test() {
+	local tests=()
+	if multilib_is_native_abi; then
+		if use sysusers; then
+			tests+=(
+				test-sysusers.standalone
+			)
+		fi
+		if use tmpfiles; then
+			tests+=(
+				test-systemd-tmpfiles.standalone
+				test-tmpfiles
+			)
+		fi
+		if use udev; then
+			tests+=(
+				rule-syntax-check
+				test-fido-id-desc
+				test-udev-builtin
+				test-udev-event
+				test-udev-netlink
+				test-udev-node
+				test-udev-util
+			)
+			if [[ -w /dev ]]; then
+				tests+=( udev-test )
+			else
+				ewarn "Skipping udev-test (needs write access to /dev)"
+			fi
+		fi
+	fi
+	if use udev; then
+		tests+=(
+			test-libudev
+			test-libudev-sym
+			test-udev-device-thread
+		)
+	fi
+	if [[ ${#tests[@]} -ne 0 ]]; then
+		meson_src_test "${tests[@]}"
+	fi
+}
+
+multilib_src_install() {
+	if multilib_is_native_abi; then
+		if use boot; then
+			into /usr
+			dobin bootctl kernel-install
+			doman man/{bootctl.1,kernel-install.8}
+			insinto usr/lib/systemd/boot/efi
+			doins src/boot/efi/{linux$(efi_arch).{efi,elf}.stub,systemd-boot$(efi_arch).efi}
+		fi
+		if use sysusers; then
+			into /
+			newbin systemd-sysusers{.standalone,}
+			doman man/{systemd-sysusers.8,sysusers.d.5}
+		fi
+		if use tmpfiles; then
+			into /
+			newbin systemd-tmpfiles{.standalone,}
+			doman man/{systemd-tmpfiles.8,tmpfiles.d.5}
+		fi
+		if use udev; then
+			into /
+			dobin udevadm systemd-hwdb
+			dosym ../../bin/udevadm /lib/systemd/systemd-udevd
+
+			exeinto /lib/udev
+			doexe src/udev/{ata_id,cdrom_id,fido_id,mtd_probe,scsi_id,v4l_id}
+
+			insinto /lib/udev/rules.d
+			doins rules.d/*.rules
+
+			insinto /lib/udev/hwdb.d
+			doins hwdb.d/*.hwdb
+
+			insinto /usr/share/pkgconfig
+			doins src/udev/udev.pc
+
+			doman man/{udev.conf.5,systemd.link.5,hwdb.7,systemd-hwdb.8,udev.7,udevadm.8}
+			newman man/systemd-udevd.service.8 systemd-udevd.8
+		fi
+	fi
+	if use udev; then
+		meson_install --no-rebuild --tags libudev
+		gen_usr_ldscript -a udev
+		insinto "/usr/$(get_libdir)/pkgconfig"
+		doins src/libudev/libudev.pc
+	fi
+}
+
+multilib_src_install_all() {
+	einstalldocs
+	if use boot; then
+		into /usr
+		exeinto usr/lib/kernel/install.d
+		doexe src/kernel-install/*.install
+		dobashcomp shell-completion/bash/bootctl
+		insinto /usr/share/zsh/site-functions
+		doins shell-completion/zsh/{_bootctl,_kernel-install}
+	fi
+	if use tmpfiles; then
+		doinitd "${FILESDIR}"/systemd-tmpfiles-setup
+		doinitd "${FILESDIR}"/systemd-tmpfiles-setup-dev
+		insinto /usr/share/zsh/site-functions
+		doins shell-completion/zsh/_systemd-tmpfiles
+	fi
+	if use udev; then
+		doheader src/libudev/libudev.h
+
+		insinto /etc/udev
+		doins src/udev/udev.conf
+		keepdir /etc/udev/{hwdb.d,rules.d}
+
+		insinto /lib/systemd/network
+		doins network/99-default.link
+
+		# Remove to avoid conflict with elogind
+		# https://bugs.gentoo.org/856433
+		rm rules.d/70-power-switch.rules || die
+		insinto /lib/udev/rules.d
+		doins rules.d/*.rules
+		doins "${FILESDIR}"/40-gentoo.rules
+
+		insinto /lib/udev/hwdb.d
+		doins hwdb.d/*.hwdb
+
+		dobashcomp shell-completion/bash/udevadm
+
+		insinto /usr/share/zsh/site-functions
+		doins shell-completion/zsh/_udevadm
+	fi
+}
+
+add_service() {
+	local initd=$1
+	local runlevel=$2
+
+	ebegin "Adding '${initd}' service to the '${runlevel}' runlevel"
+	mkdir -p "${EROOT}/etc/runlevels/${runlevel}" &&
+	ln -snf "${EPREFIX}/etc/init.d/${initd}" "${EROOT}/etc/runlevels/${runlevel}/${initd}"
+	eend $?
+}
+
+pkg_postinst() {
+	if [[ -z ${REPLACING_VERSIONS} ]]; then
+		add_service systemd-tmpfiles-setup-dev sysinit
+		add_service systemd-tmpfiles-setup boot
+	fi
+	if use udev; then
+		ebegin "Updating hwdb"
+		systemd-hwdb --root="${ROOT}" update
+		eend $?
+		udev_reload
+	fi
+}


^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: sys-apps/systemd-utils/files/, sys-apps/systemd-utils/
@ 2022-09-18 15:48 Mike Gilbert
  0 siblings, 0 replies; 10+ messages in thread
From: Mike Gilbert @ 2022-09-18 15:48 UTC (permalink / raw
  To: gentoo-commits

commit:     05e25e63567cfb77adde5e4c05ba99c907cb7f96
Author:     Mike Gilbert <floppym <AT> gentoo <DOT> org>
AuthorDate: Sun Sep 18 15:39:56 2022 +0000
Commit:     Mike Gilbert <floppym <AT> gentoo <DOT> org>
CommitDate: Sun Sep 18 15:47:07 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=05e25e63

sys-apps/systemd-utils: copy revert-fortify-source patch from systemd

Closes: https://bugs.gentoo.org/870262
Signed-off-by: Mike Gilbert <floppym <AT> gentoo.org>

 .../files/251-revert-fortify-source-3-fix.patch    | 40 ++++++++++++++++++++++
 ...1.4-r1.ebuild => systemd-utils-251.4-r2.ebuild} |  8 ++++-
 2 files changed, 47 insertions(+), 1 deletion(-)

diff --git a/sys-apps/systemd-utils/files/251-revert-fortify-source-3-fix.patch b/sys-apps/systemd-utils/files/251-revert-fortify-source-3-fix.patch
new file mode 100644
index 000000000000..bbe45f85dcf2
--- /dev/null
+++ b/sys-apps/systemd-utils/files/251-revert-fortify-source-3-fix.patch
@@ -0,0 +1,40 @@
+From: Sam James <sam@gentoo.org>
+Date: Tue, 24 May 2022 23:21:50 +0100
+Subject: [PATCH] Revert "Support -D_FORTIFY_SOURCE=3 by using
+ __builtin_dynamic_object_size."
+
+Breaks Clang (even without F_S=3).
+
+This reverts commit 0bd292567a543d124cd303f7dd61169a209cae64.
+
+Bug: https://bugs.gentoo.org/841770
+Bug: https://github.com/systemd/systemd/issues/23150
+--- a/src/basic/alloc-util.h
++++ b/src/basic/alloc-util.h
+@@ -174,23 +174,13 @@ void* greedy_realloc0(void **p, size_t need, size_t size);
+  * is compatible with _FORTIFY_SOURCES. If _FORTIFY_SOURCES is used many memory operations will take the
+  * object size as returned by __builtin_object_size() into account. Hence, let's return the smaller size of
+  * malloc_usable_size() and __builtin_object_size() here, so that we definitely operate in safe territory by
+- * both the compiler's and libc's standards. Note that _FORTIFY_SOURCES=3 handles also dynamically allocated
+- * objects and thus it's safer using __builtin_dynamic_object_size if _FORTIFY_SOURCES=3 is used (#22801).
+- * Moreover, when NULL is passed malloc_usable_size() is documented to return zero, and
++ * both the compiler's and libc's standards. Note that __builtin_object_size() evaluates to SIZE_MAX if the
++ * size cannot be determined, hence the MIN() expression should be safe with dynamically sized memory,
++ * too. Moreover, when NULL is passed malloc_usable_size() is documented to return zero, and
+  * __builtin_object_size() returns SIZE_MAX too, hence we also return a sensible value of 0 in this corner
+  * case. */
+-
+-#if defined __has_builtin
+-#  if __has_builtin(__builtin_dynamic_object_size)
+-#    define MALLOC_SIZEOF_SAFE(x) \
+-        MIN(malloc_usable_size(x), __builtin_dynamic_object_size(x, 0))
+-#  endif
+-#endif
+-
+-#ifndef MALLOC_SIZEOF_SAFE
+ #define MALLOC_SIZEOF_SAFE(x) \
+         MIN(malloc_usable_size(x), __builtin_object_size(x, 0))
+-#endif
+ 
+ /* Inspired by ELEMENTSOF() but operates on malloc()'ed memory areas: typesafely returns the number of items
+  * that fit into the specified memory block */

diff --git a/sys-apps/systemd-utils/systemd-utils-251.4-r1.ebuild b/sys-apps/systemd-utils/systemd-utils-251.4-r2.ebuild
similarity index 98%
rename from sys-apps/systemd-utils/systemd-utils-251.4-r1.ebuild
rename to sys-apps/systemd-utils/systemd-utils-251.4-r2.ebuild
index 9cb9d0cb2ceb..9aa951a441cd 100644
--- a/sys-apps/systemd-utils/systemd-utils-251.4-r1.ebuild
+++ b/sys-apps/systemd-utils/systemd-utils-251.4-r2.ebuild
@@ -105,6 +105,8 @@ QA_FLAGS_IGNORED="usr/lib/systemd/boot/efi/.*"
 
 src_prepare() {
 	local PATCHES=(
+		# Breaks Clang. Revert the commit for now and force off F_S=3.
+		"${FILESDIR}/251-revert-fortify-source-3-fix.patch"
 	)
 
 	if use elibc_musl; then
@@ -120,7 +122,7 @@ src_prepare() {
 	sed -i -e "/${rpath_pattern}/d" meson.build || die
 }
 
-multilib_src_configure() {
+src_configure() {
 	# When bumping to 251, please keep this, but add the revert patch
 	# like in sys-apps/systemd!
 	#
@@ -140,6 +142,10 @@ multilib_src_configure() {
 		append-cppflags -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2
 	fi
 
+	multilib-minimal_src_configure
+}
+
+multilib_src_configure() {
 	local emesonargs=(
 		$(meson_use split-usr)
 		$(meson_use split-usr split-bin)


^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: sys-apps/systemd-utils/files/, sys-apps/systemd-utils/
@ 2022-10-14 21:18 Sam James
  0 siblings, 0 replies; 10+ messages in thread
From: Sam James @ 2022-10-14 21:18 UTC (permalink / raw
  To: gentoo-commits

commit:     d8714ab03dec8f9f709e940ee21e8cd66a029d2e
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Fri Oct 14 21:17:50 2022 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Fri Oct 14 21:17:57 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d8714ab0

sys-apps/systemd-utils: add 251.6

Signed-off-by: Sam James <sam <AT> gentoo.org>

 sys-apps/systemd-utils/Manifest                    |   1 +
 .../files/251-gpt-auto-no-cryptsetup.patch         |  28 ++
 sys-apps/systemd-utils/systemd-utils-251.6.ebuild  | 525 +++++++++++++++++++++
 3 files changed, 554 insertions(+)

diff --git a/sys-apps/systemd-utils/Manifest b/sys-apps/systemd-utils/Manifest
index 794bd4bfb8d0..6652b985f843 100644
--- a/sys-apps/systemd-utils/Manifest
+++ b/sys-apps/systemd-utils/Manifest
@@ -1,3 +1,4 @@
 DIST systemd-musl-patches-251.2.tar.gz 28512 BLAKE2B 4ac6a5220dab8409962a3954af2fb2484af718d0f282129957236ce241fbe8538a90d507a96c7c3d86f4f408ab784a6888b37486405d3276e7734a1bd5aa9680 SHA512 6e56b62234ac54929faea5a7cad699d0b932f869b48e3ba4e1f349a88653b7c787efec24a09b00290c3dc566614e3c1dc2f3c04f04e943f513108a91eca1be82
 DIST systemd-stable-251.4.tar.gz 11440203 BLAKE2B 58a0ee4adcc9d35b15b9cc98b3da81d1103b61a6c0bee722468a5113cd7d6de1d40c46ef964ba9ecc4746e81b516ae4b2f1d046874d62db066735c652592612e SHA512 7bbfadd80b88a4c3510a5e4e3572e4eab71dafbf6289da038e552988e09ee8da16da3c9bb8a4fbbde6c6236e0e3c352b0a33f9ee0b84f10241f3499383387738
 DIST systemd-stable-251.5.tar.gz 11444428 BLAKE2B 96df35dae789b11ead1960e1139046972a29c41f74ca800e0fafd84e6a8c238f8d4a30e2991ee94e07e866bc0c3137774ee116f276ac1203cca85254ccf91913 SHA512 2c645a694d45a2670920115529c5f34001153dafe26e5c4e65f8d1a37922a351569d056fc002f1af72dfc173988f93e11893460f64b497e3d5fc339083dcb2fa
+DIST systemd-stable-251.6.tar.gz 11448383 BLAKE2B 987ea88ea23662fd4119e3c796cc2e5f428fcce6cf0b033a5f8da7974c0026d41851f517e489354bbc22973b33c3932ac7280c56527f03a1fcbce3092148b638 SHA512 2da41ac7e939a893ada3ce682a6fe7dd326e8e0132221589da3d2b1d994e1a879118e0c6025f03351dac6567d754223a5f5401d64a5ca9256ab95512800370f8

diff --git a/sys-apps/systemd-utils/files/251-gpt-auto-no-cryptsetup.patch b/sys-apps/systemd-utils/files/251-gpt-auto-no-cryptsetup.patch
new file mode 100644
index 000000000000..f56f2febfd2b
--- /dev/null
+++ b/sys-apps/systemd-utils/files/251-gpt-auto-no-cryptsetup.patch
@@ -0,0 +1,28 @@
+https://github.com/systemd/systemd/commit/d0523bb0d12766485fde3b87bb42db8dfc3c45d3
+https://github.com/systemd/systemd/issues/24978
+
+From d0523bb0d12766485fde3b87bb42db8dfc3c45d3 Mon Sep 17 00:00:00 2001
+From: David Seifert <soap@gentoo.org>
+Date: Wed, 12 Oct 2022 21:47:29 +0200
+Subject: [PATCH] gpt-auto: allow using without cryptsetup
+
+Fixes #24978
+--- a/src/gpt-auto-generator/gpt-auto-generator.c
++++ b/src/gpt-auto-generator/gpt-auto-generator.c
+@@ -571,11 +571,15 @@ static int add_root_rw(DissectedPartition *p) {
+ 
+ #if ENABLE_EFI
+ static int add_root_cryptsetup(void) {
++#if HAVE_LIBCRYPTSETUP
+ 
+         /* If a device /dev/gpt-auto-root-luks appears, then make it pull in systemd-cryptsetup-root.service, which
+          * sets it up, and causes /dev/gpt-auto-root to appear which is all we are looking for. */
+ 
+         return add_cryptsetup("root", "/dev/gpt-auto-root-luks", true, false, NULL);
++#else
++        return 0;
++#endif
+ }
+ #endif
+ 
+

diff --git a/sys-apps/systemd-utils/systemd-utils-251.6.ebuild b/sys-apps/systemd-utils/systemd-utils-251.6.ebuild
new file mode 100644
index 000000000000..a59e868762b9
--- /dev/null
+++ b/sys-apps/systemd-utils/systemd-utils-251.6.ebuild
@@ -0,0 +1,525 @@
+# Copyright 2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+PYTHON_COMPAT=( python3_{8..11} )
+
+QA_PKGCONFIG_VERSION=$(ver_cut 1)
+
+inherit bash-completion-r1 flag-o-matic meson-multilib python-any-r1 toolchain-funcs udev usr-ldscript
+
+DESCRIPTION="Utilities split out from systemd for OpenRC users"
+HOMEPAGE="https://systemd.io/"
+
+if [[ ${PV} == *.* ]]; then
+	MY_P="systemd-stable-${PV}"
+	S="${WORKDIR}/${MY_P}"
+	SRC_URI="https://github.com/systemd/systemd-stable/archive/refs/tags/v${PV}.tar.gz -> ${MY_P}.tar.gz"
+else
+	MY_P="systemd-${PV}"
+	S="${WORKDIR}/${MY_P}"
+	SRC_URI="https://github.com/systemd/systemd/archive/refs/tags/v${PV}.tar.gz -> ${MY_P}.tar.gz"
+fi
+
+MUSL_PATCHSET="systemd-musl-patches-251.2"
+SRC_URI+=" elibc_musl? ( https://dev.gentoo.org/~floppym/dist/${MUSL_PATCHSET}.tar.gz )"
+
+LICENSE="GPL-2 LGPL-2.1 MIT public-domain"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86"
+IUSE="+acl boot +kmod selinux split-usr sysusers +tmpfiles test +udev"
+REQUIRED_USE="|| ( boot tmpfiles sysusers udev )"
+RESTRICT="!test? ( test )"
+
+COMMON_DEPEND="
+	elibc_musl? ( >=sys-libs/musl-1.2.3 )
+	selinux? ( sys-libs/libselinux:0= )
+	tmpfiles? (
+		acl? ( sys-apps/acl:0= )
+	)
+	udev? (
+		>=sys-apps/util-linux-2.30:0=[${MULTILIB_USEDEP}]
+		sys-libs/libcap:0=[${MULTILIB_USEDEP}]
+		virtual/libcrypt:=[${MULTILIB_USEDEP}]
+		acl? ( sys-apps/acl:0= )
+		kmod? ( >=sys-apps/kmod-15:0= )
+	)
+	!udev? (
+		>=sys-apps/util-linux-2.30:0=
+		sys-libs/libcap:0=
+		virtual/libcrypt:=
+	)
+"
+DEPEND="${COMMON_DEPEND}
+	>=sys-kernel/linux-headers-3.11
+	boot? ( >=sys-boot/gnu-efi-3.0.2 )
+"
+RDEPEND="${COMMON_DEPEND}
+	boot? ( !<sys-boot/systemd-boot-250 )
+	tmpfiles? ( !<sys-apps/systemd-tmpfiles-250 )
+	udev? (
+		acct-group/audio
+		acct-group/cdrom
+		acct-group/dialout
+		acct-group/disk
+		acct-group/input
+		acct-group/kmem
+		acct-group/kvm
+		acct-group/lp
+		acct-group/render
+		acct-group/sgx
+		acct-group/tape
+		acct-group/tty
+		acct-group/video
+		!sys-apps/gentoo-systemd-integration
+		!sys-apps/hwids[udev]
+		!<sys-fs/udev-250
+		!sys-fs/eudev
+	)
+	!sys-apps/systemd
+"
+PDEPEND="
+	udev? ( >=sys-fs/udev-init-scripts-34 )
+"
+BDEPEND="
+	$(python_gen_any_dep 'dev-python/jinja[${PYTHON_USEDEP}]')
+	app-text/docbook-xml-dtd:4.2
+	app-text/docbook-xml-dtd:4.5
+	app-text/docbook-xsl-stylesheets
+	dev-libs/libxslt
+	dev-util/gperf
+	>=sys-apps/coreutils-8.16
+	sys-devel/gettext
+	virtual/pkgconfig
+"
+
+TMPFILES_OPTIONAL=1
+UDEV_OPTIONAL=1
+
+python_check_deps() {
+	python_has_version "dev-python/jinja[${PYTHON_USEDEP}]"
+}
+
+QA_EXECSTACK="usr/lib/systemd/boot/efi/*"
+QA_FLAGS_IGNORED="usr/lib/systemd/boot/efi/.*"
+
+src_prepare() {
+	local PATCHES=(
+		# Breaks Clang. Revert the commit for now and force off F_S=3.
+		"${FILESDIR}/251-revert-fortify-source-3-fix.patch"
+		"${FILESDIR}/251-gpt-auto-no-cryptsetup.patch"
+	)
+
+	if use elibc_musl; then
+		PATCHES+=( "${WORKDIR}/${MUSL_PATCHSET}" )
+		# Applied upstream in 251.3
+		rm "${WORKDIR}/${MUSL_PATCHSET}/0001-Add-sys-file.h-for-LOCK_.patch" || die
+	fi
+	default
+
+	# Remove install_rpath; we link statically
+	local rpath_pattern="install_rpath : rootlibexecdir,"
+	grep -q -e "${rpath_pattern}" meson.build || die
+	sed -i -e "/${rpath_pattern}/d" meson.build || die
+}
+
+src_configure() {
+	# Broken with FORTIFY_SOURCE=3 without a patch. And the patch
+	# wasn't backported to 250.x, but it turns out to break Clang
+	# anyway:  bug #841770.
+	#
+	# Our toolchain sets F_S=2 by default w/ >= -O2, so we need
+	# to unset F_S first, then explicitly set 2, to negate any default
+	# and anything set by the user if they're choosing 3 (or if they've
+	# modified GCC to set 3).
+	#
+	if is-flagq '-O[23]' || is-flagq '-Ofast' ; then
+		# We can't unconditionally do this b/c we fortify needs
+		# some level of optimisation.
+		filter-flags -D_FORTIFY_SOURCE=3
+		append-cppflags -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2
+	fi
+
+	multilib-minimal_src_configure
+}
+
+multilib_src_configure() {
+	local emesonargs=(
+		$(meson_use split-usr)
+		$(meson_use split-usr split-bin)
+		-Drootprefix="$(usex split-usr "${EPREFIX:-/}" "${EPREFIX}/usr")"
+		-Drootlibdir="${EPREFIX}/usr/$(get_libdir)"
+		-Dsysvinit-path=
+		$(meson_native_use_bool boot efi)
+		$(meson_native_use_bool boot gnu-efi)
+		$(meson_native_use_bool boot kernel-install)
+		$(meson_native_use_bool selinux)
+		$(meson_native_use_bool sysusers)
+		$(meson_use test tests)
+		$(meson_native_use_bool tmpfiles)
+		$(meson_use udev hwdb)
+
+		-Defi-libdir="${ESYSROOT}/usr/$(get_libdir)"
+
+		# Link staticly with libsystemd-shared
+		-Dlink-boot-shared=false
+		-Dlink-udev-shared=false
+
+		# systemd-tmpfiles has a separate "systemd-tmpfiles.standalone" target
+		-Dstandalone-binaries=true
+
+		# Disable all optional features
+		-Dadm-group=false
+		-Danalyze=false
+		-Dapparmor=false
+		-Daudit=false
+		-Dbacklight=false
+		-Dbinfmt=false
+		-Dbzip2=false
+		-Dcoredump=false
+		-Ddbus=false
+		-Delfutils=false
+		-Denvironment-d=false
+		-Dfdisk=false
+		-Dgcrypt=false
+		-Dglib=false
+		-Dgshadow=false
+		-Dgnutls=false
+		-Dhibernate=false
+		-Dhostnamed=false
+		-Didn=false
+		-Dima=false
+		-Dinitrd=false
+		-Dfirstboot=false
+		-Dldconfig=false
+		-Dlibcryptsetup=false
+		-Dlibcurl=false
+		-Dlibfido2=false
+		-Dlibidn=false
+		-Dlibidn2=false
+		-Dlibiptc=false
+		-Dlocaled=false
+		-Dlogind=false
+		-Dlz4=false
+		-Dmachined=false
+		-Dmicrohttpd=false
+		-Dnetworkd=false
+		-Dnscd=false
+		-Dnss-myhostname=false
+		-Dnss-resolve=false
+		-Dnss-systemd=false
+		-Doomd=false
+		-Dopenssl=false
+		-Dp11kit=false
+		-Dpam=false
+		-Dpcre2=false
+		-Dpolkit=false
+		-Dportabled=false
+		-Dpstore=false
+		-Dpwquality=false
+		-Drandomseed=false
+		-Dresolve=false
+		-Drfkill=false
+		-Dseccomp=false
+		-Dsmack=false
+		-Dsysext=false
+		-Dtimedated=false
+		-Dtimesyncd=false
+		-Dtpm=false
+		-Dqrencode=false
+		-Dquotacheck=false
+		-Duserdb=false
+		-Dutmp=false
+		-Dvconsole=false
+		-Dwheel-group=false
+		-Dxdg-autostart=false
+		-Dxkbcommon=false
+		-Dxz=false
+		-Dzlib=false
+		-Dzstd=false
+	)
+
+	if use tmpfiles || use udev; then
+		emesonargs+=( $(meson_native_use_bool acl) )
+	else
+		emesonargs+=( -Dacl=false )
+	fi
+
+	if use udev; then
+		emesonargs+=( $(meson_native_use_bool kmod) )
+	else
+		emesonargs+=( -Dkmod=false )
+	fi
+
+	if use elibc_musl; then
+		# Avoid redefinition of struct ethhdr.
+		append-cppflags -D__UAPI_DEF_ETHHDR=0
+	fi
+
+	if multilib_is_native_abi || use udev; then
+		meson_src_configure
+	fi
+}
+
+efi_arch() {
+	case "$(tc-arch)" in
+		amd64) echo x64 ;;
+		arm)   echo arm ;;
+		arm64) echo aa64 ;;
+		x86)   echo x86 ;;
+	esac
+}
+
+multilib_src_compile() {
+	local targets=()
+	if multilib_is_native_abi; then
+		if use boot; then
+			targets+=(
+				bootctl
+				kernel-install
+				man/bootctl.1
+				man/kernel-install.8
+				src/boot/efi/linux$(efi_arch).{efi,elf}.stub
+				src/boot/efi/systemd-boot$(efi_arch).efi
+			)
+		fi
+		if use sysusers; then
+			targets+=(
+				systemd-sysusers.standalone
+				man/sysusers.d.5
+				man/systemd-sysusers.8
+			)
+			if use test; then
+				targets+=(
+					systemd-runtest.env
+				)
+			fi
+		fi
+		if use tmpfiles; then
+			targets+=(
+				systemd-tmpfiles.standalone
+				man/tmpfiles.d.5
+				man/systemd-tmpfiles.8
+			)
+			if use test; then
+				targets+=( test-tmpfiles )
+			fi
+		fi
+		if use udev; then
+			targets+=(
+				udevadm
+				systemd-hwdb
+				src/udev/ata_id
+				src/udev/cdrom_id
+				src/udev/fido_id
+				src/udev/mtd_probe
+				src/udev/scsi_id
+				src/udev/udev.pc
+				src/udev/v4l_id
+				man/udev.conf.5
+				man/systemd.link.5
+				man/hwdb.7
+				man/udev.7
+				man/systemd-hwdb.8
+				man/systemd-udevd.service.8
+				man/udevadm.8
+				hwdb.d/60-autosuspend-chromiumos.hwdb
+				rules.d/50-udev-default.rules
+				rules.d/64-btrfs.rules
+			)
+			if use test; then
+				targets+=(
+					# Used by udev-test.pl
+					systemd-detect-virt
+					test/sys
+					test-udev
+
+					test-fido-id-desc
+					test-udev-builtin
+					test-udev-event
+					test-udev-netlink
+					test-udev-node
+					test-udev-util
+				)
+			fi
+		fi
+	fi
+	if use udev; then
+		targets+=(
+			udev:shared_library
+			src/libudev/libudev.pc
+		)
+		if use test; then
+			targets+=(
+				test-libudev
+				test-libudev-sym
+				test-udev-device-thread
+			)
+		fi
+	fi
+	if multilib_is_native_abi || use udev; then
+		meson_src_compile "${targets[@]}"
+	fi
+}
+
+multilib_src_test() {
+	local tests=()
+	if multilib_is_native_abi; then
+		if use sysusers; then
+			tests+=(
+				test-sysusers.standalone
+			)
+		fi
+		if use tmpfiles; then
+			tests+=(
+				test-systemd-tmpfiles.standalone
+				test-tmpfiles
+			)
+		fi
+		if use udev; then
+			tests+=(
+				rule-syntax-check
+				test-fido-id-desc
+				test-udev-builtin
+				test-udev-event
+				test-udev-netlink
+				test-udev-node
+				test-udev-util
+			)
+			if [[ -w /dev ]]; then
+				tests+=( udev-test )
+			else
+				ewarn "Skipping udev-test (needs write access to /dev)"
+			fi
+		fi
+	fi
+	if use udev; then
+		tests+=(
+			test-libudev
+			test-libudev-sym
+			test-udev-device-thread
+		)
+	fi
+	if [[ ${#tests[@]} -ne 0 ]]; then
+		meson_src_test "${tests[@]}"
+	fi
+}
+
+src_install() {
+	local rootprefix="$(usex split-usr '' /usr)"
+	meson-multilib_src_install
+}
+
+multilib_src_install() {
+	if multilib_is_native_abi; then
+		if use boot; then
+			into /usr
+			dobin bootctl kernel-install
+			doman man/{bootctl.1,kernel-install.8}
+			insinto usr/lib/systemd/boot/efi
+			doins src/boot/efi/{linux$(efi_arch).{efi,elf}.stub,systemd-boot$(efi_arch).efi}
+		fi
+		if use sysusers; then
+			into "${rootprefix:-/}"
+			newbin systemd-sysusers{.standalone,}
+			doman man/{systemd-sysusers.8,sysusers.d.5}
+		fi
+		if use tmpfiles; then
+			into "${rootprefix:-/}"
+			newbin systemd-tmpfiles{.standalone,}
+			doman man/{systemd-tmpfiles.8,tmpfiles.d.5}
+		fi
+		if use udev; then
+			into "${rootprefix:-/}"
+			dobin udevadm systemd-hwdb
+			dosym ../../bin/udevadm "${rootprefix}"/lib/systemd/systemd-udevd
+
+			exeinto "${rootprefix}"/lib/udev
+			doexe src/udev/{ata_id,cdrom_id,fido_id,mtd_probe,scsi_id,v4l_id}
+
+			insinto "${rootprefix}"/lib/udev/rules.d
+			doins rules.d/*.rules
+
+			insinto "${rootprefix}"/lib/udev/hwdb.d
+			doins hwdb.d/*.hwdb
+
+			insinto /usr/share/pkgconfig
+			doins src/udev/udev.pc
+
+			doman man/{udev.conf.5,systemd.link.5,hwdb.7,systemd-hwdb.8,udev.7,udevadm.8}
+			newman man/systemd-udevd.service.8 systemd-udevd.8
+		fi
+	fi
+	if use udev; then
+		meson_install --no-rebuild --tags libudev
+		gen_usr_ldscript -a udev
+		insinto "/usr/$(get_libdir)/pkgconfig"
+		doins src/libudev/libudev.pc
+	fi
+}
+
+multilib_src_install_all() {
+	einstalldocs
+	if use boot; then
+		into /usr
+		exeinto usr/lib/kernel/install.d
+		doexe src/kernel-install/*.install
+		dobashcomp shell-completion/bash/bootctl
+		insinto /usr/share/zsh/site-functions
+		doins shell-completion/zsh/{_bootctl,_kernel-install}
+	fi
+	if use tmpfiles; then
+		doinitd "${FILESDIR}"/systemd-tmpfiles-setup
+		doinitd "${FILESDIR}"/systemd-tmpfiles-setup-dev
+		insinto /usr/share/zsh/site-functions
+		doins shell-completion/zsh/_systemd-tmpfiles
+	fi
+	if use udev; then
+		doheader src/libudev/libudev.h
+
+		insinto /etc/udev
+		doins src/udev/udev.conf
+		keepdir /etc/udev/{hwdb.d,rules.d}
+
+		insinto "${rootprefix}"/lib/systemd/network
+		doins network/99-default.link
+
+		# Remove to avoid conflict with elogind
+		# https://bugs.gentoo.org/856433
+		rm rules.d/70-power-switch.rules || die
+		insinto /lib/udev/rules.d
+		doins rules.d/*.rules
+		doins "${FILESDIR}"/40-gentoo.rules
+
+		insinto /lib/udev/hwdb.d
+		doins hwdb.d/*.hwdb
+
+		dobashcomp shell-completion/bash/udevadm
+
+		insinto /usr/share/zsh/site-functions
+		doins shell-completion/zsh/_udevadm
+	fi
+}
+
+add_service() {
+	local initd=$1
+	local runlevel=$2
+
+	ebegin "Adding '${initd}' service to the '${runlevel}' runlevel"
+	mkdir -p "${EROOT}/etc/runlevels/${runlevel}" &&
+	ln -snf "${EPREFIX}/etc/init.d/${initd}" "${EROOT}/etc/runlevels/${runlevel}/${initd}"
+	eend $?
+}
+
+pkg_postinst() {
+	if [[ -z ${REPLACING_VERSIONS} ]]; then
+		add_service systemd-tmpfiles-setup-dev sysinit
+		add_service systemd-tmpfiles-setup boot
+	fi
+	if use udev; then
+		ebegin "Updating hwdb"
+		systemd-hwdb --root="${ROOT}" update
+		eend $?
+		udev_reload
+	fi
+}


^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: sys-apps/systemd-utils/files/, sys-apps/systemd-utils/
@ 2023-01-11  7:50 Sam James
  0 siblings, 0 replies; 10+ messages in thread
From: Sam James @ 2023-01-11  7:50 UTC (permalink / raw
  To: gentoo-commits

commit:     646922c6fd43ff7a0daa3f5f28cc24888dc6dc15
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Wed Jan 11 07:48:57 2023 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Wed Jan 11 07:49:44 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=646922c6

sys-apps/systemd-utils: drop 251.7, 251.9

Signed-off-by: Sam James <sam <AT> gentoo.org>

 sys-apps/systemd-utils/Manifest                   |   2 -
 sys-apps/systemd-utils/files/251-meson-0.64.patch |  26 --
 sys-apps/systemd-utils/systemd-utils-251.7.ebuild | 527 ----------------------
 sys-apps/systemd-utils/systemd-utils-251.9.ebuild | 524 ---------------------
 4 files changed, 1079 deletions(-)

diff --git a/sys-apps/systemd-utils/Manifest b/sys-apps/systemd-utils/Manifest
index fe5d34db75c7..cd1e7db96718 100644
--- a/sys-apps/systemd-utils/Manifest
+++ b/sys-apps/systemd-utils/Manifest
@@ -1,5 +1,3 @@
 DIST systemd-musl-patches-251.2.tar.gz 28512 BLAKE2B 4ac6a5220dab8409962a3954af2fb2484af718d0f282129957236ce241fbe8538a90d507a96c7c3d86f4f408ab784a6888b37486405d3276e7734a1bd5aa9680 SHA512 6e56b62234ac54929faea5a7cad699d0b932f869b48e3ba4e1f349a88653b7c787efec24a09b00290c3dc566614e3c1dc2f3c04f04e943f513108a91eca1be82
 DIST systemd-stable-251.10.tar.gz 11461671 BLAKE2B a351b6dd9fc307e4bdcf0323b16e7f58c714392cfa466180a81196309c289b54767bfe5d03037eb1bd6b273d7eb8f6f42b927aabaa1310be04266675d1a3dd06 SHA512 49e33dbbc1b2ebe123b2f722070c87524b3126d1e605fb3e24a3f9f328ab67de506dc4588a92caf157428c21b9c73c3884726c4a5b1f67bb997d4a68bb871e5b
-DIST systemd-stable-251.7.tar.gz 11448429 BLAKE2B 959ac7944d778c8e6d7a3c67ea6adc89e5e7ac1cc3b163e2af2a582211b91316da5ffba37b854978b7b2a5b3f9aae3651701a23e4391da6676e078747df1a37b SHA512 a4c06b2d25c47af58abb1e1dc85737b2fb0eb394f09d2bb7c6b7b716cb4b1383a145885bbc8e5ffcdc26611fd44d362fba2152c4dd0ead6a03a93965b82bb9a4
 DIST systemd-stable-251.8.tar.gz 11457551 BLAKE2B d4ca799a5b22164362fa8948bbec95215d6ebc04380f13f755916c4bfd4e1cc43a82177c21d2c56aa9d8440b44872b773f21682fc127c7f6d2b3542661c27d80 SHA512 c337fad3cf2beef11401850ddd6418efef035d4ec6405049084302738042f77ac1f8bfd7eb3611668a13038878389c9617e63278ec0b37782b3e0242e69c4843
-DIST systemd-stable-251.9.tar.gz 11461131 BLAKE2B ba8fa2d70cc992ded3d1aa354e36d9815c6ae87a6f438f8879771e9e5ae9f7d10591956cf8c617ba0c5c13fdc229bc23a7ea173aa9849bfdf6476cc0721d62be SHA512 27df2076445a826911274101286a3555528ebd0894a5c32f2dea71a075b5fcde3931f4d04f5726c5b39d482357939d2fbd2b52ac9a894b6853f48833984f4c17

diff --git a/sys-apps/systemd-utils/files/251-meson-0.64.patch b/sys-apps/systemd-utils/files/251-meson-0.64.patch
deleted file mode 100644
index 6cc200bbd87d..000000000000
--- a/sys-apps/systemd-utils/files/251-meson-0.64.patch
+++ /dev/null
@@ -1,26 +0,0 @@
-From cddbc850270415a818aadabd71fe12dc0dddd508 Mon Sep 17 00:00:00 2001
-From: Jan Janssen <medhefgo@web.de>
-Date: Sun, 9 Oct 2022 17:16:12 +0200
-Subject: [PATCH] meson: Fix build with --optimization=plain
-
-Note that -O0 is deliberately filtered out as we have to compile with at
-least -O1 due to #24202.
-
-Fixes: #24323
----
- src/boot/efi/meson.build | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/src/boot/efi/meson.build b/src/boot/efi/meson.build
-index e0cd4ebad993..395386d3eda7 100644
---- a/src/boot/efi/meson.build
-+++ b/src/boot/efi/meson.build
-@@ -223,7 +223,7 @@ endif
- if get_option('debug') and get_option('mode') == 'developer'
-         efi_cflags += ['-ggdb', '-DEFI_DEBUG']
- endif
--if get_option('optimization') != '0'
-+if get_option('optimization') in ['1', '2', '3', 's', 'g']
-         efi_cflags += ['-O' + get_option('optimization')]
- endif
- if get_option('b_ndebug') == 'true' or (

diff --git a/sys-apps/systemd-utils/systemd-utils-251.7.ebuild b/sys-apps/systemd-utils/systemd-utils-251.7.ebuild
deleted file mode 100644
index 71637af6ed33..000000000000
--- a/sys-apps/systemd-utils/systemd-utils-251.7.ebuild
+++ /dev/null
@@ -1,527 +0,0 @@
-# Copyright 2022 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-PYTHON_COMPAT=( python3_{8..11} )
-
-QA_PKGCONFIG_VERSION=$(ver_cut 1)
-
-inherit bash-completion-r1 flag-o-matic meson-multilib python-any-r1 toolchain-funcs udev usr-ldscript
-
-DESCRIPTION="Utilities split out from systemd for OpenRC users"
-HOMEPAGE="https://systemd.io/"
-
-if [[ ${PV} == *.* ]]; then
-	MY_P="systemd-stable-${PV}"
-	S="${WORKDIR}/${MY_P}"
-	SRC_URI="https://github.com/systemd/systemd-stable/archive/refs/tags/v${PV}.tar.gz -> ${MY_P}.tar.gz"
-else
-	MY_P="systemd-${PV}"
-	S="${WORKDIR}/${MY_P}"
-	SRC_URI="https://github.com/systemd/systemd/archive/refs/tags/v${PV}.tar.gz -> ${MY_P}.tar.gz"
-fi
-
-MUSL_PATCHSET="systemd-musl-patches-251.2"
-SRC_URI+=" elibc_musl? ( https://dev.gentoo.org/~floppym/dist/${MUSL_PATCHSET}.tar.gz )"
-
-LICENSE="GPL-2 LGPL-2.1 MIT public-domain"
-SLOT="0"
-KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86"
-IUSE="+acl boot +kmod selinux split-usr sysusers +tmpfiles test +udev"
-REQUIRED_USE="|| ( boot tmpfiles sysusers udev )"
-RESTRICT="!test? ( test )"
-
-COMMON_DEPEND="
-	elibc_musl? ( >=sys-libs/musl-1.2.3 )
-	selinux? ( sys-libs/libselinux:0= )
-	tmpfiles? (
-		acl? ( sys-apps/acl:0= )
-	)
-	udev? (
-		>=sys-apps/util-linux-2.30:0=[${MULTILIB_USEDEP}]
-		sys-libs/libcap:0=[${MULTILIB_USEDEP}]
-		virtual/libcrypt:=[${MULTILIB_USEDEP}]
-		acl? ( sys-apps/acl:0= )
-		kmod? ( >=sys-apps/kmod-15:0= )
-	)
-	!udev? (
-		>=sys-apps/util-linux-2.30:0=
-		sys-libs/libcap:0=
-		virtual/libcrypt:=
-	)
-"
-DEPEND="${COMMON_DEPEND}
-	>=sys-kernel/linux-headers-3.11
-	boot? ( >=sys-boot/gnu-efi-3.0.2 )
-"
-RDEPEND="${COMMON_DEPEND}
-	boot? ( !<sys-boot/systemd-boot-250 )
-	tmpfiles? ( !<sys-apps/systemd-tmpfiles-250 )
-	udev? (
-		acct-group/audio
-		acct-group/cdrom
-		acct-group/dialout
-		acct-group/disk
-		acct-group/input
-		acct-group/kmem
-		acct-group/kvm
-		acct-group/lp
-		acct-group/render
-		acct-group/sgx
-		acct-group/tape
-		acct-group/tty
-		acct-group/video
-		!sys-apps/gentoo-systemd-integration
-		!sys-apps/hwids[udev]
-		!<sys-fs/udev-250
-		!sys-fs/eudev
-	)
-	!sys-apps/systemd
-"
-PDEPEND="
-	udev? ( >=sys-fs/udev-init-scripts-34 )
-"
-BDEPEND="
-	$(python_gen_any_dep 'dev-python/jinja[${PYTHON_USEDEP}]')
-	app-text/docbook-xml-dtd:4.2
-	app-text/docbook-xml-dtd:4.5
-	app-text/docbook-xsl-stylesheets
-	dev-libs/libxslt
-	dev-util/gperf
-	>=sys-apps/coreutils-8.16
-	sys-devel/gettext
-	virtual/pkgconfig
-"
-
-TMPFILES_OPTIONAL=1
-UDEV_OPTIONAL=1
-
-python_check_deps() {
-	python_has_version "dev-python/jinja[${PYTHON_USEDEP}]"
-}
-
-QA_EXECSTACK="usr/lib/systemd/boot/efi/*"
-QA_FLAGS_IGNORED="usr/lib/systemd/boot/efi/.*"
-
-src_prepare() {
-	local PATCHES=(
-		# Breaks Clang. Revert the commit for now and force off F_S=3.
-		"${FILESDIR}/251-revert-fortify-source-3-fix.patch"
-		"${FILESDIR}/251-gpt-auto-no-cryptsetup.patch"
-		"${FILESDIR}/251-meson-0.64.patch"
-	)
-
-	if use elibc_musl; then
-		PATCHES+=( "${WORKDIR}/${MUSL_PATCHSET}" )
-		# Applied upstream in 251.3
-		rm "${WORKDIR}/${MUSL_PATCHSET}/0001-Add-sys-file.h-for-LOCK_.patch" || die
-	fi
-	default
-
-	# Remove install_rpath; we link statically
-	local rpath_pattern="install_rpath : rootlibexecdir,"
-	grep -q -e "${rpath_pattern}" meson.build || die
-	sed -i -e "/${rpath_pattern}/d" meson.build || die
-}
-
-src_configure() {
-	# Broken with FORTIFY_SOURCE=3 without a patch. And the patch
-	# wasn't backported to 250.x, but it turns out to break Clang
-	# anyway:  bug #841770.
-	#
-	# Our toolchain sets F_S=2 by default w/ >= -O2, so we need
-	# to unset F_S first, then explicitly set 2, to negate any default
-	# and anything set by the user if they're choosing 3 (or if they've
-	# modified GCC to set 3).
-	#
-	if is-flagq '-O[23]' || is-flagq '-Ofast' ; then
-		# We can't unconditionally do this b/c we fortify needs
-		# some level of optimisation.
-		filter-flags -D_FORTIFY_SOURCE=3
-		append-cppflags -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2
-	fi
-
-	multilib-minimal_src_configure
-}
-
-multilib_src_configure() {
-	local emesonargs=(
-		$(meson_use split-usr)
-		$(meson_use split-usr split-bin)
-		-Drootprefix="$(usex split-usr "${EPREFIX:-/}" "${EPREFIX}/usr")"
-		-Drootlibdir="${EPREFIX}/usr/$(get_libdir)"
-		-Dsysvinit-path=
-		$(meson_native_use_bool boot efi)
-		$(meson_native_use_bool boot gnu-efi)
-		$(meson_native_use_bool boot kernel-install)
-		$(meson_native_use_bool selinux)
-		$(meson_native_use_bool sysusers)
-		$(meson_use test tests)
-		$(meson_native_use_bool tmpfiles)
-		$(meson_use udev hwdb)
-
-		-Defi-libdir="${ESYSROOT}/usr/$(get_libdir)"
-
-		# Link staticly with libsystemd-shared
-		-Dlink-boot-shared=false
-		-Dlink-udev-shared=false
-
-		# systemd-tmpfiles has a separate "systemd-tmpfiles.standalone" target
-		-Dstandalone-binaries=true
-
-		# Disable all optional features
-		-Dadm-group=false
-		-Danalyze=false
-		-Dapparmor=false
-		-Daudit=false
-		-Dbacklight=false
-		-Dbinfmt=false
-		-Dbpf-framework=false
-		-Dbzip2=false
-		-Dcoredump=false
-		-Ddbus=false
-		-Delfutils=false
-		-Denvironment-d=false
-		-Dfdisk=false
-		-Dgcrypt=false
-		-Dglib=false
-		-Dgshadow=false
-		-Dgnutls=false
-		-Dhibernate=false
-		-Dhostnamed=false
-		-Didn=false
-		-Dima=false
-		-Dinitrd=false
-		-Dfirstboot=false
-		-Dldconfig=false
-		-Dlibcryptsetup=false
-		-Dlibcurl=false
-		-Dlibfido2=false
-		-Dlibidn=false
-		-Dlibidn2=false
-		-Dlibiptc=false
-		-Dlocaled=false
-		-Dlogind=false
-		-Dlz4=false
-		-Dmachined=false
-		-Dmicrohttpd=false
-		-Dnetworkd=false
-		-Dnscd=false
-		-Dnss-myhostname=false
-		-Dnss-resolve=false
-		-Dnss-systemd=false
-		-Doomd=false
-		-Dopenssl=false
-		-Dp11kit=false
-		-Dpam=false
-		-Dpcre2=false
-		-Dpolkit=false
-		-Dportabled=false
-		-Dpstore=false
-		-Dpwquality=false
-		-Drandomseed=false
-		-Dresolve=false
-		-Drfkill=false
-		-Dseccomp=false
-		-Dsmack=false
-		-Dsysext=false
-		-Dtimedated=false
-		-Dtimesyncd=false
-		-Dtpm=false
-		-Dqrencode=false
-		-Dquotacheck=false
-		-Duserdb=false
-		-Dutmp=false
-		-Dvconsole=false
-		-Dwheel-group=false
-		-Dxdg-autostart=false
-		-Dxkbcommon=false
-		-Dxz=false
-		-Dzlib=false
-		-Dzstd=false
-	)
-
-	if use tmpfiles || use udev; then
-		emesonargs+=( $(meson_native_use_bool acl) )
-	else
-		emesonargs+=( -Dacl=false )
-	fi
-
-	if use udev; then
-		emesonargs+=( $(meson_native_use_bool kmod) )
-	else
-		emesonargs+=( -Dkmod=false )
-	fi
-
-	if use elibc_musl; then
-		# Avoid redefinition of struct ethhdr.
-		append-cppflags -D__UAPI_DEF_ETHHDR=0
-	fi
-
-	if multilib_is_native_abi || use udev; then
-		meson_src_configure
-	fi
-}
-
-efi_arch() {
-	case "$(tc-arch)" in
-		amd64) echo x64 ;;
-		arm)   echo arm ;;
-		arm64) echo aa64 ;;
-		x86)   echo x86 ;;
-	esac
-}
-
-multilib_src_compile() {
-	local targets=()
-	if multilib_is_native_abi; then
-		if use boot; then
-			targets+=(
-				bootctl
-				kernel-install
-				man/bootctl.1
-				man/kernel-install.8
-				src/boot/efi/linux$(efi_arch).{efi,elf}.stub
-				src/boot/efi/systemd-boot$(efi_arch).efi
-			)
-		fi
-		if use sysusers; then
-			targets+=(
-				systemd-sysusers.standalone
-				man/sysusers.d.5
-				man/systemd-sysusers.8
-			)
-			if use test; then
-				targets+=(
-					systemd-runtest.env
-				)
-			fi
-		fi
-		if use tmpfiles; then
-			targets+=(
-				systemd-tmpfiles.standalone
-				man/tmpfiles.d.5
-				man/systemd-tmpfiles.8
-			)
-			if use test; then
-				targets+=( test-tmpfiles )
-			fi
-		fi
-		if use udev; then
-			targets+=(
-				udevadm
-				systemd-hwdb
-				src/udev/ata_id
-				src/udev/cdrom_id
-				src/udev/fido_id
-				src/udev/mtd_probe
-				src/udev/scsi_id
-				src/udev/udev.pc
-				src/udev/v4l_id
-				man/udev.conf.5
-				man/systemd.link.5
-				man/hwdb.7
-				man/udev.7
-				man/systemd-hwdb.8
-				man/systemd-udevd.service.8
-				man/udevadm.8
-				hwdb.d/60-autosuspend-chromiumos.hwdb
-				rules.d/50-udev-default.rules
-				rules.d/64-btrfs.rules
-			)
-			if use test; then
-				targets+=(
-					# Used by udev-test.pl
-					systemd-detect-virt
-					test/sys
-					test-udev
-
-					test-fido-id-desc
-					test-udev-builtin
-					test-udev-event
-					test-udev-netlink
-					test-udev-node
-					test-udev-util
-				)
-			fi
-		fi
-	fi
-	if use udev; then
-		targets+=(
-			udev:shared_library
-			src/libudev/libudev.pc
-		)
-		if use test; then
-			targets+=(
-				test-libudev
-				test-libudev-sym
-				test-udev-device-thread
-			)
-		fi
-	fi
-	if multilib_is_native_abi || use udev; then
-		meson_src_compile "${targets[@]}"
-	fi
-}
-
-multilib_src_test() {
-	local tests=()
-	if multilib_is_native_abi; then
-		if use sysusers; then
-			tests+=(
-				test-sysusers.standalone
-			)
-		fi
-		if use tmpfiles; then
-			tests+=(
-				test-systemd-tmpfiles.standalone
-				test-tmpfiles
-			)
-		fi
-		if use udev; then
-			tests+=(
-				rule-syntax-check
-				test-fido-id-desc
-				test-udev-builtin
-				test-udev-event
-				test-udev-netlink
-				test-udev-node
-				test-udev-util
-			)
-			if [[ -w /dev ]]; then
-				tests+=( udev-test )
-			else
-				ewarn "Skipping udev-test (needs write access to /dev)"
-			fi
-		fi
-	fi
-	if use udev; then
-		tests+=(
-			test-libudev
-			test-libudev-sym
-			test-udev-device-thread
-		)
-	fi
-	if [[ ${#tests[@]} -ne 0 ]]; then
-		meson_src_test "${tests[@]}"
-	fi
-}
-
-src_install() {
-	local rootprefix="$(usex split-usr '' /usr)"
-	meson-multilib_src_install
-}
-
-multilib_src_install() {
-	if multilib_is_native_abi; then
-		if use boot; then
-			into /usr
-			dobin bootctl kernel-install
-			doman man/{bootctl.1,kernel-install.8}
-			insinto usr/lib/systemd/boot/efi
-			doins src/boot/efi/{linux$(efi_arch).{efi,elf}.stub,systemd-boot$(efi_arch).efi}
-		fi
-		if use sysusers; then
-			into "${rootprefix:-/}"
-			newbin systemd-sysusers{.standalone,}
-			doman man/{systemd-sysusers.8,sysusers.d.5}
-		fi
-		if use tmpfiles; then
-			into "${rootprefix:-/}"
-			newbin systemd-tmpfiles{.standalone,}
-			doman man/{systemd-tmpfiles.8,tmpfiles.d.5}
-		fi
-		if use udev; then
-			into "${rootprefix:-/}"
-			dobin udevadm systemd-hwdb
-			dosym ../../bin/udevadm "${rootprefix}"/lib/systemd/systemd-udevd
-
-			exeinto "${rootprefix}"/lib/udev
-			doexe src/udev/{ata_id,cdrom_id,fido_id,mtd_probe,scsi_id,v4l_id}
-
-			insinto "${rootprefix}"/lib/udev/rules.d
-			doins rules.d/*.rules
-
-			insinto "${rootprefix}"/lib/udev/hwdb.d
-			doins hwdb.d/*.hwdb
-
-			insinto /usr/share/pkgconfig
-			doins src/udev/udev.pc
-
-			doman man/{udev.conf.5,systemd.link.5,hwdb.7,systemd-hwdb.8,udev.7,udevadm.8}
-			newman man/systemd-udevd.service.8 systemd-udevd.8
-		fi
-	fi
-	if use udev; then
-		meson_install --no-rebuild --tags libudev
-		gen_usr_ldscript -a udev
-		insinto "/usr/$(get_libdir)/pkgconfig"
-		doins src/libudev/libudev.pc
-	fi
-}
-
-multilib_src_install_all() {
-	einstalldocs
-	if use boot; then
-		into /usr
-		exeinto usr/lib/kernel/install.d
-		doexe src/kernel-install/*.install
-		dobashcomp shell-completion/bash/bootctl
-		insinto /usr/share/zsh/site-functions
-		doins shell-completion/zsh/{_bootctl,_kernel-install}
-	fi
-	if use tmpfiles; then
-		doinitd "${FILESDIR}"/systemd-tmpfiles-setup
-		doinitd "${FILESDIR}"/systemd-tmpfiles-setup-dev
-		insinto /usr/share/zsh/site-functions
-		doins shell-completion/zsh/_systemd-tmpfiles
-	fi
-	if use udev; then
-		doheader src/libudev/libudev.h
-
-		insinto /etc/udev
-		doins src/udev/udev.conf
-		keepdir /etc/udev/{hwdb.d,rules.d}
-
-		insinto "${rootprefix}"/lib/systemd/network
-		doins network/99-default.link
-
-		# Remove to avoid conflict with elogind
-		# https://bugs.gentoo.org/856433
-		rm rules.d/70-power-switch.rules || die
-		insinto "${rootprefix}"/lib/udev/rules.d
-		doins rules.d/*.rules
-		doins "${FILESDIR}"/40-gentoo.rules
-
-		insinto "${rootprefix}"/lib/udev/hwdb.d
-		doins hwdb.d/*.hwdb
-
-		dobashcomp shell-completion/bash/udevadm
-
-		insinto /usr/share/zsh/site-functions
-		doins shell-completion/zsh/_udevadm
-	fi
-}
-
-add_service() {
-	local initd=$1
-	local runlevel=$2
-
-	ebegin "Adding '${initd}' service to the '${runlevel}' runlevel"
-	mkdir -p "${EROOT}/etc/runlevels/${runlevel}" &&
-	ln -snf "${EPREFIX}/etc/init.d/${initd}" "${EROOT}/etc/runlevels/${runlevel}/${initd}"
-	eend $?
-}
-
-pkg_postinst() {
-	if [[ -z ${REPLACING_VERSIONS} ]]; then
-		add_service systemd-tmpfiles-setup-dev sysinit
-		add_service systemd-tmpfiles-setup boot
-	fi
-	if use udev; then
-		ebegin "Updating hwdb"
-		systemd-hwdb --root="${ROOT}" update
-		eend $?
-		udev_reload
-	fi
-}

diff --git a/sys-apps/systemd-utils/systemd-utils-251.9.ebuild b/sys-apps/systemd-utils/systemd-utils-251.9.ebuild
deleted file mode 100644
index e3565a14d72b..000000000000
--- a/sys-apps/systemd-utils/systemd-utils-251.9.ebuild
+++ /dev/null
@@ -1,524 +0,0 @@
-# Copyright 2022 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-PYTHON_COMPAT=( python3_{8..11} )
-
-QA_PKGCONFIG_VERSION=$(ver_cut 1)
-
-inherit bash-completion-r1 flag-o-matic meson-multilib python-any-r1 toolchain-funcs udev usr-ldscript
-
-DESCRIPTION="Utilities split out from systemd for OpenRC users"
-HOMEPAGE="https://systemd.io/"
-
-if [[ ${PV} == *.* ]]; then
-	MY_P="systemd-stable-${PV}"
-	S="${WORKDIR}/${MY_P}"
-	SRC_URI="https://github.com/systemd/systemd-stable/archive/refs/tags/v${PV}.tar.gz -> ${MY_P}.tar.gz"
-else
-	MY_P="systemd-${PV}"
-	S="${WORKDIR}/${MY_P}"
-	SRC_URI="https://github.com/systemd/systemd/archive/refs/tags/v${PV}.tar.gz -> ${MY_P}.tar.gz"
-fi
-
-MUSL_PATCHSET="systemd-musl-patches-251.2"
-SRC_URI+=" elibc_musl? ( https://dev.gentoo.org/~floppym/dist/${MUSL_PATCHSET}.tar.gz )"
-
-LICENSE="GPL-2 LGPL-2.1 MIT public-domain"
-SLOT="0"
-KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86"
-IUSE="+acl boot +kmod selinux split-usr sysusers +tmpfiles test +udev"
-REQUIRED_USE="|| ( boot tmpfiles sysusers udev )"
-RESTRICT="!test? ( test )"
-
-COMMON_DEPEND="
-	elibc_musl? ( >=sys-libs/musl-1.2.3 )
-	selinux? ( sys-libs/libselinux:0= )
-	tmpfiles? (
-		acl? ( sys-apps/acl:0= )
-	)
-	udev? (
-		>=sys-apps/util-linux-2.30:0=[${MULTILIB_USEDEP}]
-		sys-libs/libcap:0=[${MULTILIB_USEDEP}]
-		virtual/libcrypt:=[${MULTILIB_USEDEP}]
-		acl? ( sys-apps/acl:0= )
-		kmod? ( >=sys-apps/kmod-15:0= )
-	)
-	!udev? (
-		>=sys-apps/util-linux-2.30:0=
-		sys-libs/libcap:0=
-		virtual/libcrypt:=
-	)
-"
-DEPEND="${COMMON_DEPEND}
-	>=sys-kernel/linux-headers-3.11
-	boot? ( >=sys-boot/gnu-efi-3.0.2 )
-"
-RDEPEND="${COMMON_DEPEND}
-	boot? ( !<sys-boot/systemd-boot-250 )
-	tmpfiles? ( !<sys-apps/systemd-tmpfiles-250 )
-	udev? (
-		acct-group/audio
-		acct-group/cdrom
-		acct-group/dialout
-		acct-group/disk
-		acct-group/input
-		acct-group/kmem
-		acct-group/kvm
-		acct-group/lp
-		acct-group/render
-		acct-group/sgx
-		acct-group/tape
-		acct-group/tty
-		acct-group/video
-		!sys-apps/gentoo-systemd-integration
-		!sys-apps/hwids[udev]
-		!<sys-fs/udev-250
-		!sys-fs/eudev
-	)
-	!sys-apps/systemd
-"
-PDEPEND="
-	udev? ( >=sys-fs/udev-init-scripts-34 )
-"
-BDEPEND="
-	$(python_gen_any_dep 'dev-python/jinja[${PYTHON_USEDEP}]')
-	app-text/docbook-xml-dtd:4.2
-	app-text/docbook-xml-dtd:4.5
-	app-text/docbook-xsl-stylesheets
-	dev-libs/libxslt
-	dev-util/gperf
-	>=sys-apps/coreutils-8.16
-	sys-devel/gettext
-	virtual/pkgconfig
-"
-
-TMPFILES_OPTIONAL=1
-UDEV_OPTIONAL=1
-
-python_check_deps() {
-	python_has_version "dev-python/jinja[${PYTHON_USEDEP}]"
-}
-
-QA_EXECSTACK="usr/lib/systemd/boot/efi/*"
-QA_FLAGS_IGNORED="usr/lib/systemd/boot/efi/.*"
-
-src_prepare() {
-	local PATCHES=(
-		"${FILESDIR}/251-gpt-auto-no-cryptsetup.patch"
-	)
-
-	if use elibc_musl; then
-		PATCHES+=( "${WORKDIR}/${MUSL_PATCHSET}" )
-		# Applied upstream in 251.3
-		rm "${WORKDIR}/${MUSL_PATCHSET}/0001-Add-sys-file.h-for-LOCK_.patch" || die
-	fi
-	default
-
-	# Remove install_rpath; we link statically
-	local rpath_pattern="install_rpath : rootlibexecdir,"
-	grep -q -e "${rpath_pattern}" meson.build || die
-	sed -i -e "/${rpath_pattern}/d" meson.build || die
-}
-
-src_configure() {
-	# Broken with FORTIFY_SOURCE=3: bug #841770.
-	#
-	# Our toolchain sets F_S=2 by default w/ >= -O2, so we need
-	# to unset F_S first, then explicitly set 2, to negate any default
-	# and anything set by the user if they're choosing 3 (or if they've
-	# modified GCC to set 3).
-	#
-	if is-flagq '-O[23]' || is-flagq '-Ofast' ; then
-		# We can't unconditionally do this b/c we fortify needs
-		# some level of optimisation.
-		filter-flags -D_FORTIFY_SOURCE=3
-		append-cppflags -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2
-	fi
-
-	multilib-minimal_src_configure
-}
-
-multilib_src_configure() {
-	local emesonargs=(
-		$(meson_use split-usr)
-		$(meson_use split-usr split-bin)
-		-Drootprefix="$(usex split-usr "${EPREFIX:-/}" "${EPREFIX}/usr")"
-		-Drootlibdir="${EPREFIX}/usr/$(get_libdir)"
-		-Dsysvinit-path=
-		$(meson_native_use_bool boot efi)
-		$(meson_native_use_bool boot gnu-efi)
-		$(meson_native_use_bool boot kernel-install)
-		$(meson_native_use_bool selinux)
-		$(meson_native_use_bool sysusers)
-		$(meson_use test tests)
-		$(meson_native_use_bool tmpfiles)
-		$(meson_use udev hwdb)
-
-		-Defi-libdir="${ESYSROOT}/usr/$(get_libdir)"
-
-		# Link staticly with libsystemd-shared
-		-Dlink-boot-shared=false
-		-Dlink-udev-shared=false
-
-		# systemd-tmpfiles has a separate "systemd-tmpfiles.standalone" target
-		-Dstandalone-binaries=true
-
-		# Disable all optional features
-		-Dadm-group=false
-		-Danalyze=false
-		-Dapparmor=false
-		-Daudit=false
-		-Dbacklight=false
-		-Dbinfmt=false
-		-Dbpf-framework=false
-		-Dbzip2=false
-		-Dcoredump=false
-		-Ddbus=false
-		-Delfutils=false
-		-Denvironment-d=false
-		-Dfdisk=false
-		-Dgcrypt=false
-		-Dglib=false
-		-Dgshadow=false
-		-Dgnutls=false
-		-Dhibernate=false
-		-Dhostnamed=false
-		-Didn=false
-		-Dima=false
-		-Dinitrd=false
-		-Dfirstboot=false
-		-Dldconfig=false
-		-Dlibcryptsetup=false
-		-Dlibcurl=false
-		-Dlibfido2=false
-		-Dlibidn=false
-		-Dlibidn2=false
-		-Dlibiptc=false
-		-Dlocaled=false
-		-Dlogind=false
-		-Dlz4=false
-		-Dmachined=false
-		-Dmicrohttpd=false
-		-Dnetworkd=false
-		-Dnscd=false
-		-Dnss-myhostname=false
-		-Dnss-resolve=false
-		-Dnss-systemd=false
-		-Doomd=false
-		-Dopenssl=false
-		-Dp11kit=false
-		-Dpam=false
-		-Dpcre2=false
-		-Dpolkit=false
-		-Dportabled=false
-		-Dpstore=false
-		-Dpwquality=false
-		-Drandomseed=false
-		-Dresolve=false
-		-Drfkill=false
-		-Dseccomp=false
-		-Dsmack=false
-		-Dsysext=false
-		-Dtimedated=false
-		-Dtimesyncd=false
-		-Dtpm=false
-		-Dqrencode=false
-		-Dquotacheck=false
-		-Duserdb=false
-		-Dutmp=false
-		-Dvconsole=false
-		-Dwheel-group=false
-		-Dxdg-autostart=false
-		-Dxkbcommon=false
-		-Dxz=false
-		-Dzlib=false
-		-Dzstd=false
-	)
-
-	if use tmpfiles || use udev; then
-		emesonargs+=( $(meson_native_use_bool acl) )
-	else
-		emesonargs+=( -Dacl=false )
-	fi
-
-	if use udev; then
-		emesonargs+=( $(meson_native_use_bool kmod) )
-	else
-		emesonargs+=( -Dkmod=false )
-	fi
-
-	if use elibc_musl; then
-		# Avoid redefinition of struct ethhdr.
-		append-cppflags -D__UAPI_DEF_ETHHDR=0
-	fi
-
-	if multilib_is_native_abi || use udev; then
-		meson_src_configure
-	fi
-}
-
-efi_arch() {
-	case "$(tc-arch)" in
-		amd64) echo x64 ;;
-		arm)   echo arm ;;
-		arm64) echo aa64 ;;
-		x86)   echo x86 ;;
-	esac
-}
-
-multilib_src_compile() {
-	local targets=()
-	if multilib_is_native_abi; then
-		if use boot; then
-			targets+=(
-				bootctl
-				kernel-install
-				man/bootctl.1
-				man/kernel-install.8
-				src/boot/efi/linux$(efi_arch).{efi,elf}.stub
-				src/boot/efi/systemd-boot$(efi_arch).efi
-			)
-		fi
-		if use sysusers; then
-			targets+=(
-				systemd-sysusers.standalone
-				man/sysusers.d.5
-				man/systemd-sysusers.8
-			)
-			if use test; then
-				targets+=(
-					systemd-runtest.env
-				)
-			fi
-		fi
-		if use tmpfiles; then
-			targets+=(
-				systemd-tmpfiles.standalone
-				man/tmpfiles.d.5
-				man/systemd-tmpfiles.8
-			)
-			if use test; then
-				targets+=( test-tmpfiles )
-			fi
-		fi
-		if use udev; then
-			targets+=(
-				udevadm
-				systemd-hwdb
-				src/udev/ata_id
-				src/udev/cdrom_id
-				src/udev/fido_id
-				src/udev/mtd_probe
-				src/udev/scsi_id
-				src/udev/udev.pc
-				src/udev/v4l_id
-				man/udev.conf.5
-				man/systemd.link.5
-				man/hwdb.7
-				man/udev.7
-				man/systemd-hwdb.8
-				man/systemd-udevd.service.8
-				man/udevadm.8
-				hwdb.d/60-autosuspend-chromiumos.hwdb
-				rules.d/50-udev-default.rules
-				rules.d/64-btrfs.rules
-			)
-			if use test; then
-				targets+=(
-					# Used by udev-test.pl
-					systemd-detect-virt
-					test/sys
-					test-udev
-
-					test-fido-id-desc
-					test-udev-builtin
-					test-udev-event
-					test-udev-netlink
-					test-udev-node
-					test-udev-util
-				)
-			fi
-		fi
-	fi
-	if use udev; then
-		targets+=(
-			udev:shared_library
-			src/libudev/libudev.pc
-		)
-		if use test; then
-			targets+=(
-				test-libudev
-				test-libudev-sym
-				test-udev-device-thread
-			)
-		fi
-	fi
-	if multilib_is_native_abi || use udev; then
-		meson_src_compile "${targets[@]}"
-	fi
-}
-
-multilib_src_test() {
-	local tests=()
-	if multilib_is_native_abi; then
-		if use sysusers; then
-			tests+=(
-				test-sysusers.standalone
-			)
-		fi
-		if use tmpfiles; then
-			tests+=(
-				test-systemd-tmpfiles.standalone
-				test-tmpfiles
-			)
-		fi
-		if use udev; then
-			tests+=(
-				rule-syntax-check
-				test-fido-id-desc
-				test-udev-builtin
-				test-udev-event
-				test-udev-netlink
-				test-udev-node
-				test-udev-util
-			)
-			if [[ -w /dev ]]; then
-				tests+=( udev-test )
-			else
-				ewarn "Skipping udev-test (needs write access to /dev)"
-			fi
-		fi
-	fi
-	if use udev; then
-		tests+=(
-			test-libudev
-			test-libudev-sym
-			test-udev-device-thread
-		)
-	fi
-	if [[ ${#tests[@]} -ne 0 ]]; then
-		meson_src_test "${tests[@]}"
-	fi
-}
-
-src_install() {
-	local rootprefix="$(usex split-usr '' /usr)"
-	meson-multilib_src_install
-}
-
-multilib_src_install() {
-	if multilib_is_native_abi; then
-		if use boot; then
-			into /usr
-			dobin bootctl kernel-install
-			doman man/{bootctl.1,kernel-install.8}
-			insinto usr/lib/systemd/boot/efi
-			doins src/boot/efi/{linux$(efi_arch).{efi,elf}.stub,systemd-boot$(efi_arch).efi}
-		fi
-		if use sysusers; then
-			into "${rootprefix:-/}"
-			newbin systemd-sysusers{.standalone,}
-			doman man/{systemd-sysusers.8,sysusers.d.5}
-		fi
-		if use tmpfiles; then
-			into "${rootprefix:-/}"
-			newbin systemd-tmpfiles{.standalone,}
-			doman man/{systemd-tmpfiles.8,tmpfiles.d.5}
-		fi
-		if use udev; then
-			into "${rootprefix:-/}"
-			dobin udevadm systemd-hwdb
-			dosym ../../bin/udevadm "${rootprefix}"/lib/systemd/systemd-udevd
-
-			exeinto "${rootprefix}"/lib/udev
-			doexe src/udev/{ata_id,cdrom_id,fido_id,mtd_probe,scsi_id,v4l_id}
-
-			insinto "${rootprefix}"/lib/udev/rules.d
-			doins rules.d/*.rules
-
-			insinto "${rootprefix}"/lib/udev/hwdb.d
-			doins hwdb.d/*.hwdb
-
-			insinto /usr/share/pkgconfig
-			doins src/udev/udev.pc
-
-			doman man/{udev.conf.5,systemd.link.5,hwdb.7,systemd-hwdb.8,udev.7,udevadm.8}
-			newman man/systemd-udevd.service.8 systemd-udevd.8
-		fi
-	fi
-	if use udev; then
-		meson_install --no-rebuild --tags libudev
-		gen_usr_ldscript -a udev
-		insinto "/usr/$(get_libdir)/pkgconfig"
-		doins src/libudev/libudev.pc
-	fi
-}
-
-multilib_src_install_all() {
-	einstalldocs
-	if use boot; then
-		into /usr
-		exeinto usr/lib/kernel/install.d
-		doexe src/kernel-install/*.install
-		dobashcomp shell-completion/bash/bootctl
-		insinto /usr/share/zsh/site-functions
-		doins shell-completion/zsh/{_bootctl,_kernel-install}
-	fi
-	if use tmpfiles; then
-		doinitd "${FILESDIR}"/systemd-tmpfiles-setup
-		doinitd "${FILESDIR}"/systemd-tmpfiles-setup-dev
-		exeinto /etc/cron.daily
-		doexe "${FILESDIR}"/systemd-tmpfiles-clean
-		insinto /usr/share/zsh/site-functions
-		doins shell-completion/zsh/_systemd-tmpfiles
-	fi
-	if use udev; then
-		doheader src/libudev/libudev.h
-
-		insinto /etc/udev
-		doins src/udev/udev.conf
-		keepdir /etc/udev/{hwdb.d,rules.d}
-
-		insinto "${rootprefix}"/lib/systemd/network
-		doins network/99-default.link
-
-		# Remove to avoid conflict with elogind
-		# https://bugs.gentoo.org/856433
-		rm rules.d/70-power-switch.rules || die
-		insinto "${rootprefix}"/lib/udev/rules.d
-		doins rules.d/*.rules
-		doins "${FILESDIR}"/40-gentoo.rules
-
-		insinto "${rootprefix}"/lib/udev/hwdb.d
-		doins hwdb.d/*.hwdb
-
-		dobashcomp shell-completion/bash/udevadm
-
-		insinto /usr/share/zsh/site-functions
-		doins shell-completion/zsh/_udevadm
-	fi
-}
-
-add_service() {
-	local initd=$1
-	local runlevel=$2
-
-	ebegin "Adding '${initd}' service to the '${runlevel}' runlevel"
-	mkdir -p "${EROOT}/etc/runlevels/${runlevel}" &&
-	ln -snf "${EPREFIX}/etc/init.d/${initd}" "${EROOT}/etc/runlevels/${runlevel}/${initd}"
-	eend $?
-}
-
-pkg_postinst() {
-	if [[ -z ${REPLACING_VERSIONS} ]]; then
-		add_service systemd-tmpfiles-setup-dev sysinit
-		add_service systemd-tmpfiles-setup boot
-	fi
-	if use udev; then
-		ebegin "Updating hwdb"
-		systemd-hwdb --root="${ROOT}" update
-		eend $?
-		udev_reload
-	fi
-}


^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: sys-apps/systemd-utils/files/, sys-apps/systemd-utils/
@ 2023-06-23 20:32 Sam James
  0 siblings, 0 replies; 10+ messages in thread
From: Sam James @ 2023-06-23 20:32 UTC (permalink / raw
  To: gentoo-commits

commit:     2e79ca9fe960a5423a4d357654a250cf201b8665
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Fri Jun 23 20:32:26 2023 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Fri Jun 23 20:32:26 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=2e79ca9f

sys-apps/systemd-utils: drop 253.4-r1

Signed-off-by: Sam James <sam <AT> gentoo.org>

 sys-apps/systemd-utils/Manifest                    |   1 -
 .../files/systemd-utils-253.4-musl-lfs.patch       |  52 --
 .../systemd-utils/systemd-utils-253.4-r1.ebuild    | 534 ---------------------
 3 files changed, 587 deletions(-)

diff --git a/sys-apps/systemd-utils/Manifest b/sys-apps/systemd-utils/Manifest
index a5e2dfea0514..205566eb4ea7 100644
--- a/sys-apps/systemd-utils/Manifest
+++ b/sys-apps/systemd-utils/Manifest
@@ -2,5 +2,4 @@ DIST systemd-musl-patches-252.4.tar.gz 25053 BLAKE2B 1d75f85ea0c48c788e9199e2d91
 DIST systemd-musl-patches-253.3.tar.gz 28384 BLAKE2B 2736a4ddc36b2ce087c08c57c0b995db2dcf6f82a4ae6f20b07609657bc5ea1e4a12ec78da1576b364e03260577b4f9fc85fae8c0f7497eca564c6fb857e06d8 SHA512 4b556975f25393cbeb5df495267c68edf14bef0f8baae20955151c900f200d1402b54630cab7dd3a69bbb82bef3f7464869222e2022c60faa2311444fa87ec80
 DIST systemd-stable-252.10.tar.gz 11841052 BLAKE2B 33ebca90ff17ef5983677c08c93a80350908aa4f4f1860d8e69c234ead926f0e21a4c4692c171f061e05e41c94d8fe2ba3a3be75fb7b582b86e851194a1f0203 SHA512 5309d8df51b5cda694e03e2ded574d4e3606916fab5d190b21fcd0284d8d8f56cab8b3423d7d0b90e44cd9775cc62bc26198f3d2a43f8aa545959b5c27b0dd9d
 DIST systemd-stable-252.9.tar.gz 11829389 BLAKE2B a45a72bfe113f8cb7424d731692f548c389f59d34b649e874db2f85868943b0a9c33ef62185c83c41a9c220caddd65c44ff328026eff19c3c7efda5efbd73574 SHA512 fa34b9c2f692af8f70dffc5044fe502ff5e21625af5b27cad7fc5e833570b180f53c5d03a0add785e83a5b4e7564117fe4728931df4ef599888c73e92c7f2103
-DIST systemd-stable-253.4.tar.gz 12010733 BLAKE2B 166ce3f089a9fc3d5d374566258d05ddc9ad1e6a06f5d171ee4e3462e30dd996ed45eccac9e27a8ce75ddf591d81ad2af8ce3bd214709cc0b816422f3960f52a SHA512 cbd572330871fe938307cdead57637e9a03fcdb95b62dd12506f13f48fddcacfaf1e7b179bc9e1c1889a07d3bf21f840aafc773df3a1ab05b37d28950cb94ee1
 DIST systemd-stable-253.5.tar.gz 12015672 BLAKE2B 3b09bc1a63bc3321c51ea05080f95958ab55064596c13ab967a182cdaace302cc85c19e2cdabd9bdc8ba0a1a04999ae588fbce2fe2626c0f792ee22836feddf4 SHA512 39709b485cd9287e26ac8e973fa1692b280bec3b96e1da6667e4a4f2ac2228aa072b22802720a254698d32c82f5306d7feb32229e4b6d54cc0e2b1e2caa4cc2e

diff --git a/sys-apps/systemd-utils/files/systemd-utils-253.4-musl-lfs.patch b/sys-apps/systemd-utils/files/systemd-utils-253.4-musl-lfs.patch
deleted file mode 100644
index 312232d0b3a5..000000000000
--- a/sys-apps/systemd-utils/files/systemd-utils-253.4-musl-lfs.patch
+++ /dev/null
@@ -1,52 +0,0 @@
-https://github.com/systemd/systemd/pull/27599
-
-From d096e05c625ea825eb4d781216ded717b7f71cca Mon Sep 17 00:00:00 2001
-From: Sam James <sam@gentoo.org>
-Date: Wed, 10 May 2023 01:47:13 +0100
-Subject: [PATCH] dirent: conditionalize dirent assert based on dirent64
- existence
-
->=musl-1.2.4 doesn't define dirent64 and its LFS friends as its "native"
-functions are already LFS-aware.
-
-Check for dirent64 in meson.build and only assert if it exists.
-
-Bug: https://bugs.gentoo.org/905900
-Closes: https://github.com/systemd/systemd/pull/25809
---- a/meson.build
-+++ b/meson.build
-@@ -544,6 +544,7 @@ assert(long_max > 100000)
- conf.set_quoted('LONG_MAX_STR', '@0@'.format(long_max))
- 
- decl_headers = '''
-+#include <dirent.h>
- #include <uchar.h>
- #include <sys/mount.h>
- #include <sys/stat.h>
-@@ -553,6 +554,7 @@ foreach decl : ['char16_t',
-                 'char32_t',
-                 'struct mount_attr',
-                 'struct statx',
-+                'struct dirent64',
-                ]
- 
-         # We get -1 if the size cannot be determined
---- a/src/basic/dirent-util.h
-+++ b/src/basic/dirent-util.h
-@@ -36,6 +36,7 @@ struct dirent *readdir_no_dot(DIR *dirp);
- /* Only if 64bit off_t is enabled struct dirent + struct dirent64 are actually the same. We require this, and
-  * we want them to be interchangeable to make getdents64() work, hence verify that. */
- assert_cc(_FILE_OFFSET_BITS == 64);
-+#if HAVE_STRUCT_DIRENT64
- assert_cc(sizeof(struct dirent) == sizeof(struct dirent64));
- assert_cc(offsetof(struct dirent, d_ino) == offsetof(struct dirent64, d_ino));
- assert_cc(sizeof_field(struct dirent, d_ino) == sizeof_field(struct dirent64, d_ino));
-@@ -47,6 +48,7 @@ assert_cc(offsetof(struct dirent, d_type) == offsetof(struct dirent64, d_type));
- assert_cc(sizeof_field(struct dirent, d_type) == sizeof_field(struct dirent64, d_type));
- assert_cc(offsetof(struct dirent, d_name) == offsetof(struct dirent64, d_name));
- assert_cc(sizeof_field(struct dirent, d_name) == sizeof_field(struct dirent64, d_name));
-+#endif
- 
- #define FOREACH_DIRENT_IN_BUFFER(de, buf, sz)                           \
-         for (void *_end = (uint8_t*) ({ (de) = (buf); }) + (sz);        \
-

diff --git a/sys-apps/systemd-utils/systemd-utils-253.4-r1.ebuild b/sys-apps/systemd-utils/systemd-utils-253.4-r1.ebuild
deleted file mode 100644
index f196ebea3aa4..000000000000
--- a/sys-apps/systemd-utils/systemd-utils-253.4-r1.ebuild
+++ /dev/null
@@ -1,534 +0,0 @@
-# Copyright 2022-2023 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-PYTHON_COMPAT=( python3_{10..11} )
-
-QA_PKGCONFIG_VERSION=$(ver_cut 1)
-
-inherit bash-completion-r1 flag-o-matic linux-info meson-multilib python-any-r1
-inherit toolchain-funcs udev usr-ldscript
-
-DESCRIPTION="Utilities split out from systemd for OpenRC users"
-HOMEPAGE="https://systemd.io/"
-
-if [[ ${PV} == *.* ]]; then
-	MY_P="systemd-stable-${PV}"
-	S="${WORKDIR}/${MY_P}"
-	SRC_URI="https://github.com/systemd/systemd-stable/archive/refs/tags/v${PV}.tar.gz -> ${MY_P}.tar.gz"
-else
-	MY_P="systemd-${PV}"
-	S="${WORKDIR}/${MY_P}"
-	SRC_URI="https://github.com/systemd/systemd/archive/refs/tags/v${PV}.tar.gz -> ${MY_P}.tar.gz"
-fi
-
-MUSL_PATCHSET="systemd-musl-patches-253.3"
-SRC_URI+=" elibc_musl? ( https://dev.gentoo.org/~floppym/dist/${MUSL_PATCHSET}.tar.gz )"
-
-LICENSE="GPL-2 LGPL-2.1 MIT public-domain"
-SLOT="0"
-KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86"
-IUSE="+acl boot +kmod selinux split-usr sysusers +tmpfiles test +udev"
-REQUIRED_USE="|| ( boot tmpfiles sysusers udev )"
-RESTRICT="!test? ( test )"
-
-COMMON_DEPEND="
-	elibc_musl? ( >=sys-libs/musl-1.2.3 )
-	selinux? ( sys-libs/libselinux:0= )
-	tmpfiles? (
-		acl? ( sys-apps/acl:0= )
-	)
-	udev? (
-		>=sys-apps/util-linux-2.30:0=[${MULTILIB_USEDEP}]
-		sys-libs/libcap:0=[${MULTILIB_USEDEP}]
-		virtual/libcrypt:=[${MULTILIB_USEDEP}]
-		acl? ( sys-apps/acl:0= )
-		kmod? ( >=sys-apps/kmod-15:0= )
-	)
-	!udev? (
-		>=sys-apps/util-linux-2.30:0=
-		sys-libs/libcap:0=
-		virtual/libcrypt:=
-	)
-"
-DEPEND="${COMMON_DEPEND}
-	>=sys-kernel/linux-headers-3.11
-	boot? ( >=sys-boot/gnu-efi-3.0.2 )
-"
-RDEPEND="${COMMON_DEPEND}
-	boot? ( !<sys-boot/systemd-boot-250 )
-	tmpfiles? ( !<sys-apps/systemd-tmpfiles-250 )
-	udev? (
-		acct-group/audio
-		acct-group/cdrom
-		acct-group/dialout
-		acct-group/disk
-		acct-group/floppy
-		acct-group/input
-		acct-group/kmem
-		acct-group/kvm
-		acct-group/lp
-		acct-group/render
-		acct-group/sgx
-		acct-group/tape
-		acct-group/tty
-		acct-group/usb
-		acct-group/video
-		!sys-apps/gentoo-systemd-integration
-		!sys-apps/hwids[udev]
-		!<sys-fs/udev-250
-		!sys-fs/eudev
-	)
-	!sys-apps/systemd
-"
-PDEPEND="
-	udev? ( >=sys-fs/udev-init-scripts-34 )
-"
-BDEPEND="
-	$(python_gen_any_dep 'dev-python/jinja[${PYTHON_USEDEP}]')
-	app-text/docbook-xml-dtd:4.2
-	app-text/docbook-xml-dtd:4.5
-	app-text/docbook-xsl-stylesheets
-	dev-libs/libxslt
-	dev-util/gperf
-	>=sys-apps/coreutils-8.16
-	sys-devel/gettext
-	virtual/pkgconfig
-"
-
-TMPFILES_OPTIONAL=1
-UDEV_OPTIONAL=1
-
-python_check_deps() {
-	python_has_version "dev-python/jinja[${PYTHON_USEDEP}]"
-}
-
-QA_EXECSTACK="usr/lib/systemd/boot/efi/*"
-QA_FLAGS_IGNORED="usr/lib/systemd/boot/efi/.*"
-
-CONFIG_CHECK="~BLK_DEV_BSG ~DEVTMPFS ~!IDE ~INOTIFY_USER ~!SYSFS_DEPRECATED
-	~!SYSFS_DEPRECATED_V2 ~SIGNALFD ~EPOLL ~FHANDLE ~NET ~UNIX"
-
-pkg_setup() {
-	if [[ ${MERGE_TYPE} != buildonly ]] && use udev; then
-		linux-info_pkg_setup
-	fi
-}
-
-src_prepare() {
-	local PATCHES=(
-	)
-
-	if use elibc_musl; then
-		PATCHES+=(
-			"${WORKDIR}/${MUSL_PATCHSET}"
-			# The LFS patch should be fine unconditionally but
-			# let's keep it conditional until merged upstream.
-			"${FILESDIR}"/${PN}-253.4-musl-lfs.patch
-		)
-	fi
-	default
-
-	# Remove install_rpath; we link statically
-	local rpath_pattern="install_rpath : rootpkglibdir,"
-	grep -q -e "${rpath_pattern}" meson.build || die
-	sed -i -e "/${rpath_pattern}/d" meson.build || die
-}
-
-src_configure() {
-	python_setup
-	meson-multilib_src_configure
-}
-
-multilib_src_configure() {
-	local emesonargs=(
-		$(meson_use split-usr)
-		$(meson_use split-usr split-bin)
-		-Drootprefix="$(usex split-usr "${EPREFIX:-/}" "${EPREFIX}/usr")"
-		-Drootlibdir="${EPREFIX}/usr/$(get_libdir)"
-		-Dsysvinit-path=
-		$(meson_native_use_bool boot efi)
-		$(meson_native_use_bool boot gnu-efi)
-		$(meson_native_use_bool boot kernel-install)
-		$(meson_native_use_bool selinux)
-		$(meson_native_use_bool sysusers)
-		$(meson_use test tests)
-		$(meson_native_use_bool tmpfiles)
-		$(meson_use udev hwdb)
-
-		-Defi-libdir="${ESYSROOT}/usr/$(get_libdir)"
-
-		# Link staticly with libsystemd-shared
-		-Dlink-boot-shared=false
-		-Dlink-udev-shared=false
-
-		# systemd-tmpfiles has a separate "systemd-tmpfiles.standalone" target
-		-Dstandalone-binaries=true
-
-		# Disable all optional features
-		-Dadm-group=false
-		-Danalyze=false
-		-Dapparmor=false
-		-Daudit=false
-		-Dbacklight=false
-		-Dbinfmt=false
-		-Dbpf-framework=false
-		-Dbzip2=false
-		-Dcoredump=false
-		-Ddbus=false
-		-Delfutils=false
-		-Denvironment-d=false
-		-Dfdisk=false
-		-Dgcrypt=false
-		-Dglib=false
-		-Dgshadow=false
-		-Dgnutls=false
-		-Dhibernate=false
-		-Dhostnamed=false
-		-Didn=false
-		-Dima=false
-		-Dinitrd=false
-		-Dfirstboot=false
-		-Dldconfig=false
-		-Dlibcryptsetup=false
-		-Dlibcurl=false
-		-Dlibfido2=false
-		-Dlibidn=false
-		-Dlibidn2=false
-		-Dlibiptc=false
-		-Dlocaled=false
-		-Dlogind=false
-		-Dlz4=false
-		-Dmachined=false
-		-Dmicrohttpd=false
-		-Dnetworkd=false
-		-Dnscd=false
-		-Dnss-myhostname=false
-		-Dnss-resolve=false
-		-Dnss-systemd=false
-		-Doomd=false
-		-Dopenssl=false
-		-Dp11kit=false
-		-Dpam=false
-		-Dpcre2=false
-		-Dpolkit=false
-		-Dportabled=false
-		-Dpstore=false
-		-Dpwquality=false
-		-Drandomseed=false
-		-Dresolve=false
-		-Drfkill=false
-		-Dseccomp=false
-		-Dsmack=false
-		-Dsysext=false
-		-Dtimedated=false
-		-Dtimesyncd=false
-		-Dtpm=false
-		-Dqrencode=false
-		-Dquotacheck=false
-		-Duserdb=false
-		-Dutmp=false
-		-Dvconsole=false
-		-Dwheel-group=false
-		-Dxdg-autostart=false
-		-Dxkbcommon=false
-		-Dxz=false
-		-Dzlib=false
-		-Dzstd=false
-	)
-
-	if use tmpfiles || use udev; then
-		emesonargs+=( $(meson_native_use_bool acl) )
-	else
-		emesonargs+=( -Dacl=false )
-	fi
-
-	if use udev; then
-		emesonargs+=( $(meson_native_use_bool kmod) )
-	else
-		emesonargs+=( -Dkmod=false )
-	fi
-
-	if use elibc_musl; then
-		# Avoid redefinition of struct ethhdr.
-		append-cppflags -D__UAPI_DEF_ETHHDR=0
-	fi
-
-	if multilib_is_native_abi || use udev; then
-		meson_src_configure
-	fi
-}
-
-efi_arch() {
-	case "$(tc-arch)" in
-		amd64) echo x64 ;;
-		arm)   echo arm ;;
-		arm64) echo aa64 ;;
-		x86)   echo x86 ;;
-	esac
-}
-
-multilib_src_compile() {
-	local targets=()
-	if multilib_is_native_abi; then
-		if use boot; then
-			targets+=(
-				bootctl
-				kernel-install
-				man/bootctl.1
-				man/kernel-install.8
-				90-loaderentry.install
-				src/boot/efi/linux$(efi_arch).{efi,elf}.stub
-				src/boot/efi/systemd-boot$(efi_arch).efi
-			)
-		fi
-		if use sysusers; then
-			targets+=(
-				systemd-sysusers.standalone
-				man/sysusers.d.5
-				man/systemd-sysusers.8
-			)
-			if use test; then
-				targets+=(
-					systemd-runtest.env
-				)
-			fi
-		fi
-		if use tmpfiles; then
-			targets+=(
-				systemd-tmpfiles.standalone
-				man/tmpfiles.d.5
-				man/systemd-tmpfiles.8
-				tmpfiles.d/{etc,static-nodes-permissions,var}.conf
-			)
-			if use test; then
-				targets+=( test-tmpfiles )
-			fi
-		fi
-		if use udev; then
-			targets+=(
-				udevadm
-				systemd-hwdb
-				src/udev/ata_id
-				src/udev/cdrom_id
-				src/udev/fido_id
-				src/udev/mtd_probe
-				src/udev/scsi_id
-				src/udev/udev.pc
-				src/udev/v4l_id
-				man/udev.conf.5
-				man/systemd.link.5
-				man/hwdb.7
-				man/udev.7
-				man/systemd-hwdb.8
-				man/systemd-udevd.service.8
-				man/udevadm.8
-				hwdb.d/60-autosuspend-chromiumos.hwdb
-				rules.d/50-udev-default.rules
-				rules.d/64-btrfs.rules
-			)
-			if use test; then
-				targets+=(
-					# Used by udev-test.pl
-					systemd-detect-virt
-					test/sys
-					test-udev
-
-					test-fido-id-desc
-					test-udev-builtin
-					test-udev-event
-					test-udev-node
-					test-udev-util
-				)
-			fi
-		fi
-	fi
-	if use udev; then
-		targets+=(
-			udev:shared_library
-			src/libudev/libudev.pc
-		)
-		if use test; then
-			targets+=(
-				test-libudev
-				test-libudev-sym
-				test-udev-device-thread
-			)
-		fi
-	fi
-	if multilib_is_native_abi || use udev; then
-		meson_src_compile "${targets[@]}"
-	fi
-}
-
-multilib_src_test() {
-	local tests=()
-	if multilib_is_native_abi; then
-		if use sysusers; then
-			tests+=(
-				test-sysusers.standalone
-			)
-		fi
-		if use tmpfiles; then
-			tests+=(
-				test-systemd-tmpfiles.standalone
-				test-tmpfiles
-			)
-		fi
-		if use udev; then
-			tests+=(
-				rule-syntax-check
-				test-fido-id-desc
-				test-udev-builtin
-				test-udev-event
-				test-udev-netlink
-				test-udev-node
-				test-udev-util
-			)
-			if [[ -w /dev ]]; then
-				tests+=( udev-test )
-			else
-				ewarn "Skipping udev-test (needs write access to /dev)"
-			fi
-		fi
-	fi
-	if use udev; then
-		tests+=(
-			test-libudev
-			test-libudev-sym
-			test-udev-device-thread
-		)
-	fi
-	if [[ ${#tests[@]} -ne 0 ]]; then
-		meson_src_test "${tests[@]}"
-	fi
-}
-
-src_install() {
-	local rootprefix="$(usex split-usr '' /usr)"
-	meson-multilib_src_install
-}
-
-multilib_src_install() {
-	if multilib_is_native_abi; then
-		if use boot; then
-			into /usr
-			dobin bootctl kernel-install
-			doman man/{bootctl.1,kernel-install.8}
-			# 90-loaderentry.install is generated from 90-loaderentry.install.in
-			exeinto usr/lib/kernel/install.d
-			doexe src/kernel-install/*.install
-			insinto usr/lib/systemd/boot/efi
-			doins src/boot/efi/{linux$(efi_arch).{efi,elf}.stub,systemd-boot$(efi_arch).efi}
-		fi
-		if use sysusers; then
-			into "${rootprefix:-/}"
-			newbin systemd-sysusers{.standalone,}
-			doman man/{systemd-sysusers.8,sysusers.d.5}
-		fi
-		if use tmpfiles; then
-			into "${rootprefix:-/}"
-			newbin systemd-tmpfiles{.standalone,}
-			doman man/{systemd-tmpfiles.8,tmpfiles.d.5}
-			insinto /usr/lib/tmpfiles.d
-			doins tmpfiles.d/{etc,static-nodes-permissions,var}.conf
-		fi
-		if use udev; then
-			into "${rootprefix:-/}"
-			dobin udevadm systemd-hwdb
-			dosym ../../bin/udevadm "${rootprefix}"/lib/systemd/systemd-udevd
-
-			exeinto "${rootprefix}"/lib/udev
-			doexe src/udev/{ata_id,cdrom_id,fido_id,mtd_probe,scsi_id,v4l_id}
-
-			insinto "${rootprefix}"/lib/udev/rules.d
-			doins rules.d/*.rules
-
-			insinto "${rootprefix}"/lib/udev/hwdb.d
-			doins hwdb.d/*.hwdb
-
-			insinto /usr/share/pkgconfig
-			doins src/udev/udev.pc
-
-			doman man/{udev.conf.5,systemd.link.5,hwdb.7,systemd-hwdb.8,udev.7,udevadm.8}
-			newman man/systemd-udevd.service.8 systemd-udevd.8
-		fi
-	fi
-	if use udev; then
-		meson_install --no-rebuild --tags libudev
-		gen_usr_ldscript -a udev
-		insinto "/usr/$(get_libdir)/pkgconfig"
-		doins src/libudev/libudev.pc
-	fi
-}
-
-multilib_src_install_all() {
-	einstalldocs
-	if use boot; then
-		into /usr
-		exeinto usr/lib/kernel/install.d
-		doexe src/kernel-install/*.install
-		dobashcomp shell-completion/bash/bootctl
-		insinto /usr/share/zsh/site-functions
-		doins shell-completion/zsh/{_bootctl,_kernel-install}
-	fi
-	if use tmpfiles; then
-		doinitd "${FILESDIR}"/systemd-tmpfiles-setup
-		doinitd "${FILESDIR}"/systemd-tmpfiles-setup-dev
-		exeinto /etc/cron.daily
-		doexe "${FILESDIR}"/systemd-tmpfiles-clean
-		insinto /usr/share/zsh/site-functions
-		doins shell-completion/zsh/_systemd-tmpfiles
-		insinto /usr/lib/tmpfiles.d
-		doins tmpfiles.d/{tmp,x11}.conf
-		doins "${FILESDIR}"/legacy.conf
-	fi
-	if use udev; then
-		doheader src/libudev/libudev.h
-
-		insinto /etc/udev
-		doins src/udev/udev.conf
-		keepdir /etc/udev/{hwdb.d,rules.d}
-
-		insinto "${rootprefix}"/lib/systemd/network
-		doins network/99-default.link
-
-		# Remove to avoid conflict with elogind
-		# https://bugs.gentoo.org/856433
-		rm rules.d/70-power-switch.rules || die
-		insinto "${rootprefix}"/lib/udev/rules.d
-		doins rules.d/*.rules
-		doins "${FILESDIR}"/40-gentoo.rules
-
-		insinto "${rootprefix}"/lib/udev/hwdb.d
-		doins hwdb.d/*.hwdb
-
-		dobashcomp shell-completion/bash/udevadm
-
-		insinto /usr/share/zsh/site-functions
-		doins shell-completion/zsh/_udevadm
-	fi
-}
-
-add_service() {
-	local initd=$1
-	local runlevel=$2
-
-	ebegin "Adding '${initd}' service to the '${runlevel}' runlevel"
-	mkdir -p "${EROOT}/etc/runlevels/${runlevel}" &&
-	ln -snf "${EPREFIX}/etc/init.d/${initd}" "${EROOT}/etc/runlevels/${runlevel}/${initd}"
-	eend $?
-}
-
-pkg_postinst() {
-	if [[ -z ${REPLACING_VERSIONS} ]]; then
-		add_service systemd-tmpfiles-setup-dev sysinit
-		add_service systemd-tmpfiles-setup boot
-	fi
-	if use udev; then
-		ebegin "Updating hwdb"
-		systemd-hwdb --root="${ROOT}" update
-		eend $?
-		udev_reload
-	fi
-}


^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: sys-apps/systemd-utils/files/, sys-apps/systemd-utils/
@ 2023-09-09 20:24 Mike Gilbert
  0 siblings, 0 replies; 10+ messages in thread
From: Mike Gilbert @ 2023-09-09 20:24 UTC (permalink / raw
  To: gentoo-commits

commit:     48a49e120fc72a0ef39916c1c7ccffca75751530
Author:     Violet Purcell <vimproved <AT> inventati <DOT> org>
AuthorDate: Sat Sep  9 17:41:11 2023 +0000
Commit:     Mike Gilbert <floppym <AT> gentoo <DOT> org>
CommitDate: Sat Sep  9 20:24:44 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=48a49e12

sys-apps/systemd-utils: add 254.3

Signed-off-by: Violet Purcell <vimproved <AT> inventati.org>
Closes: https://github.com/gentoo/gentoo/pull/32237
Signed-off-by: Mike Gilbert <floppym <AT> gentoo.org>

 sys-apps/systemd-utils/Manifest                    |   2 +
 ...4.3-add-link-kernel-install-shared-option.patch |  58 +++
 sys-apps/systemd-utils/systemd-utils-254.3.ebuild  | 544 +++++++++++++++++++++
 3 files changed, 604 insertions(+)

diff --git a/sys-apps/systemd-utils/Manifest b/sys-apps/systemd-utils/Manifest
index 4f39da4a1f9c..285c8dbc2eff 100644
--- a/sys-apps/systemd-utils/Manifest
+++ b/sys-apps/systemd-utils/Manifest
@@ -1,5 +1,6 @@
 DIST systemd-musl-patches-252.4.tar.gz 25053 BLAKE2B 1d75f85ea0c48c788e9199e2d919bac90edce16a9788a349332cf308c32fb9510ac2883f8e09f21e7f37fbac2e557dc39cdf44dcd7a986587c40dedd2d1b5df5 SHA512 1dc8e220eae1869eb4bb50f9c701392542b053099cf9b6bde13f12a2d26fa29984819a8b4ce1b6c57e38a71f86324469a87cf9e22abe0f6d67ac3e84c6b9a3ba
 DIST systemd-musl-patches-253.3.tar.gz 28384 BLAKE2B 2736a4ddc36b2ce087c08c57c0b995db2dcf6f82a4ae6f20b07609657bc5ea1e4a12ec78da1576b364e03260577b4f9fc85fae8c0f7497eca564c6fb857e06d8 SHA512 4b556975f25393cbeb5df495267c68edf14bef0f8baae20955151c900f200d1402b54630cab7dd3a69bbb82bef3f7464869222e2022c60faa2311444fa87ec80
+DIST systemd-musl-patches-254.3.tar.gz 28640 BLAKE2B 54837f49cdb8cf025e367ad13bab0d0509c2e11ad84d29724bb6baa226c54e0ab97a91035361f66009dd9b1a22f7b3e82f90b1c14adf4aa20d576b9410589d38 SHA512 07d028a57025b2626471d6f48507f2dfc50658db24efaac93bafae9a1d4cdc3ec82e80da426d2a6280c32af2d813565609dab7df5538260ba809b63309a0ffed
 DIST systemd-stable-252.10.tar.gz 11841052 BLAKE2B 33ebca90ff17ef5983677c08c93a80350908aa4f4f1860d8e69c234ead926f0e21a4c4692c171f061e05e41c94d8fe2ba3a3be75fb7b582b86e851194a1f0203 SHA512 5309d8df51b5cda694e03e2ded574d4e3606916fab5d190b21fcd0284d8d8f56cab8b3423d7d0b90e44cd9775cc62bc26198f3d2a43f8aa545959b5c27b0dd9d
 DIST systemd-stable-252.9.tar.gz 11829389 BLAKE2B a45a72bfe113f8cb7424d731692f548c389f59d34b649e874db2f85868943b0a9c33ef62185c83c41a9c220caddd65c44ff328026eff19c3c7efda5efbd73574 SHA512 fa34b9c2f692af8f70dffc5044fe502ff5e21625af5b27cad7fc5e833570b180f53c5d03a0add785e83a5b4e7564117fe4728931df4ef599888c73e92c7f2103
 DIST systemd-stable-253.10.tar.gz 12116663 BLAKE2B 9232067c5fb4ceb3c941d9840a043f34ca3c6eee6e696743715e9f36d47a58e98046ffb6af19084bbd7e8b4edf40c67132a3fa967f37785eb988a18530ca89b1 SHA512 dab45496586a9a78ba46a3c03c02e6bd97a8b832e28f96fdf052ecf1906c8c1bdc55967fc243ca837d0371e81730a92bb230e59a43e2ab6bc1b62fbd42a051d4
@@ -7,3 +8,4 @@ DIST systemd-stable-253.5.tar.gz 12015672 BLAKE2B 3b09bc1a63bc3321c51ea05080f959
 DIST systemd-stable-253.6.tar.gz 12069024 BLAKE2B 7dfb28127bf6c091180a6cfbae1eb657b99896920cc6b74d1e86586f51bf312d6c2647582a635a479048cadceb0b5ed508918ddff42b2639cec6234a656762f4 SHA512 c81f7ac0cca9073878026d6a3024ebad8bf38c4745fe7bac5a156906ba9fd7b78b90fdc69376821c9927dd60173dd6604684e2ea7dcb55dc2e60a0e20ee01735
 DIST systemd-stable-253.7.tar.gz 12111722 BLAKE2B 2007653c264d615fbef52cd91d173597f175ba05c1b961c6035d51c1a28ff663151a72d858115536c316a2644d880dfe94e6d00809bf3a2abe3e2f5532df565b SHA512 6935508f511930d6e980a7f0a3319295acbbc482cbce4f8f407af399259fe04b095dabd470f8825d84328a7d0f39efe6d5926022c1bdf18ec7fffe43b2586aa1
 DIST systemd-stable-253.8.tar.gz 12112413 BLAKE2B 0edf5d2fdb47ef4c2fd9257642a719cb3cf70096d74ae0002f4df2696f3efd591ddf239f2ac9762aa53ebcee5bf31295739f8176313b8260e97fe99cc51722f6 SHA512 628db658ccf01e6cf09c6832735ad08c3d0dd906798e3366d42621fb08ad8b72aa7a51ae4874d76acf6c56282c63dc5fdce677cde3d4e102ce0036571ccabcc4
+DIST systemd-stable-254.3.tar.gz 14329148 BLAKE2B 10b947e04a4ef9ccaeb7adaa67ac0f391927fb172c0750ffb93d4df69d970fd91f26b052f8bfdfb4f81ae69566d0a3459cbc87cc86b624014cfb8781a2914121 SHA512 a0c361c993ac9a121823bdd58e29ef7bd25ccfd206ae0c3e1eed9833b3ddf24f53afe6f669eb9fbff5078977403236b0e4ef5a5f6fde56c504caed1d411e71fe

diff --git a/sys-apps/systemd-utils/files/systemd-utils-254.3-add-link-kernel-install-shared-option.patch b/sys-apps/systemd-utils/files/systemd-utils-254.3-add-link-kernel-install-shared-option.patch
new file mode 100644
index 000000000000..17e4ea4832a2
--- /dev/null
+++ b/sys-apps/systemd-utils/files/systemd-utils-254.3-add-link-kernel-install-shared-option.patch
@@ -0,0 +1,58 @@
+From 5973e4b237e7b50dca1c9f3157db459ef1ee6da5 Mon Sep 17 00:00:00 2001
+From: Violet Purcell <vimproved@inventati.org>
+Date: Sat, 9 Sep 2023 13:22:54 -0400
+Subject: [PATCH] meson: add link-kernel-install-shared option
+
+Signed-off-by: Violet Purcell <vimproved@inventati.org>
+---
+ meson.build       | 9 ++++++++-
+ meson_options.txt | 2 ++
+ 2 files changed, 10 insertions(+), 1 deletion(-)
+
+diff --git a/meson.build b/meson.build
+index 053e772567..003a34574a 100644
+--- a/meson.build
++++ b/meson.build
+@@ -4420,11 +4420,17 @@ executable(
+         install : true,
+         install_dir : rootlibexecdir)
+ 
++if get_option('link-kernel-install-shared')
++        kernel_install_link_with = [libshared]
++else
++        kernel_install_link_with = [libsystemd_static, libshared_static]
++endif
++
+ kernel_install = executable(
+         'kernel-install',
+         'src/kernel-install/kernel-install.c',
+         include_directories : includes,
+-        link_with : [libshared],
++        link_with : kernel_install_link_with,
+         dependencies : [userspace,
+                         versiondep],
+         install_rpath : rootpkglibdir,
+@@ -5059,6 +5065,7 @@ foreach tuple : [
+         ['link-timesyncd-shared',  get_option('link-timesyncd-shared')],
+         ['link-journalctl-shared', get_option('link-journalctl-shared')],
+         ['link-boot-shared',       get_option('link-boot-shared')],
++        ['link-kernel-install-shared', get_option('link-kernel-install-shared')],
+         ['link-portabled-shared',  get_option('link-portabled-shared')],
+         ['first-boot-full-preset'],
+         ['fexecve'],
+diff --git a/meson_options.txt b/meson_options.txt
+index 1909323850..36794e6d98 100644
+--- a/meson_options.txt
++++ b/meson_options.txt
+@@ -29,6 +29,8 @@ option('link-journalctl-shared', type: 'boolean',
+        description : 'link journalctl against libsystemd-shared.so')
+ option('link-boot-shared', type: 'boolean',
+        description : 'link bootctl and systemd-bless-boot against libsystemd-shared.so')
++option('link-kernel-install-shared', type: 'boolean',
++       description : 'link kernel-install against libsystemd-shared.so')
+ option('link-portabled-shared', type: 'boolean',
+        description : 'link systemd-portabled and its helpers to libsystemd-shared.so')
+ option('first-boot-full-preset', type: 'boolean', value: false,
+-- 
+2.42.0
+

diff --git a/sys-apps/systemd-utils/systemd-utils-254.3.ebuild b/sys-apps/systemd-utils/systemd-utils-254.3.ebuild
new file mode 100644
index 000000000000..594ed9e2a554
--- /dev/null
+++ b/sys-apps/systemd-utils/systemd-utils-254.3.ebuild
@@ -0,0 +1,544 @@
+# Copyright 2022-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+PYTHON_COMPAT=( python3_{10..11} )
+
+QA_PKGCONFIG_VERSION=$(ver_cut 1)
+
+inherit bash-completion-r1 flag-o-matic linux-info meson-multilib python-single-r1
+inherit secureboot toolchain-funcs udev usr-ldscript
+
+DESCRIPTION="Utilities split out from systemd for OpenRC users"
+HOMEPAGE="https://systemd.io/"
+
+if [[ ${PV} == *.* ]]; then
+	MY_P="systemd-stable-${PV}"
+	S="${WORKDIR}/${MY_P}"
+	SRC_URI="https://github.com/systemd/systemd-stable/archive/refs/tags/v${PV}.tar.gz -> ${MY_P}.tar.gz"
+else
+	MY_P="systemd-${PV}"
+	S="${WORKDIR}/${MY_P}"
+	SRC_URI="https://github.com/systemd/systemd/archive/refs/tags/v${PV}.tar.gz -> ${MY_P}.tar.gz"
+fi
+
+MUSL_PATCHSET="systemd-musl-patches-254.3"
+SRC_URI+=" elibc_musl? ( https://github.com/vimproved/systemd-musl-patches/archive/refs/tags/${MUSL_PATCHSET##*-}.tar.gz -> ${MUSL_PATCHSET}.tar.gz )"
+
+LICENSE="GPL-2 LGPL-2.1 MIT public-domain"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86"
+IUSE="+acl boot +kmod selinux split-usr sysusers +tmpfiles test +udev"
+REQUIRED_USE="
+	|| ( boot tmpfiles sysusers udev )
+	${PYTHON_REQUIRED_USE}
+"
+RESTRICT="!test? ( test )"
+
+COMMON_DEPEND="
+	elibc_musl? ( >=sys-libs/musl-1.2.3 )
+	selinux? ( sys-libs/libselinux:0= )
+	tmpfiles? (
+		acl? ( sys-apps/acl:0= )
+	)
+	udev? (
+		>=sys-apps/util-linux-2.30:0=[${MULTILIB_USEDEP}]
+		sys-libs/libcap:0=[${MULTILIB_USEDEP}]
+		virtual/libcrypt:=[${MULTILIB_USEDEP}]
+		acl? ( sys-apps/acl:0= )
+		kmod? ( >=sys-apps/kmod-15:0= )
+	)
+	!udev? (
+		>=sys-apps/util-linux-2.30:0=
+		sys-libs/libcap:0=
+		virtual/libcrypt:=
+	)
+"
+DEPEND="${COMMON_DEPEND}
+	>=sys-kernel/linux-headers-3.11
+"
+
+PEFILE_DEPEND='dev-python/pefile[${PYTHON_USEDEP}]'
+
+RDEPEND="${COMMON_DEPEND}
+	boot? (
+		!<sys-boot/systemd-boot-250
+		${PYTHON_DEPS}
+		$(python_gen_cond_dep "${PEFILE_DEPEND}")
+	)
+	tmpfiles? ( !<sys-apps/systemd-tmpfiles-250 )
+	udev? (
+		acct-group/audio
+		acct-group/cdrom
+		acct-group/dialout
+		acct-group/disk
+		acct-group/floppy
+		acct-group/input
+		acct-group/kmem
+		acct-group/kvm
+		acct-group/lp
+		acct-group/render
+		acct-group/sgx
+		acct-group/tape
+		acct-group/tty
+		acct-group/usb
+		acct-group/video
+		!sys-apps/gentoo-systemd-integration
+		!sys-apps/hwids[udev]
+		!<sys-fs/udev-250
+		!sys-fs/eudev
+	)
+	!sys-apps/systemd
+"
+PDEPEND="
+	udev? ( >=sys-fs/udev-init-scripts-34 )
+"
+BDEPEND="
+	app-text/docbook-xml-dtd:4.2
+	app-text/docbook-xml-dtd:4.5
+	app-text/docbook-xsl-stylesheets
+	dev-libs/libxslt
+	dev-util/gperf
+	>=sys-apps/coreutils-8.16
+	sys-devel/gettext
+	virtual/pkgconfig
+	$(python_gen_cond_dep "
+		dev-python/jinja[\${PYTHON_USEDEP}]
+		dev-python/lxml[\${PYTHON_USEDEP}]
+		boot? (
+			>=dev-python/pyelftools-0.30[\${PYTHON_USEDEP}]
+			test? ( ${PEFILE_DEPEND} )
+		)
+	")
+"
+
+TMPFILES_OPTIONAL=1
+UDEV_OPTIONAL=1
+
+QA_EXECSTACK="usr/lib/systemd/boot/efi/*"
+QA_FLAGS_IGNORED="usr/lib/systemd/boot/efi/.*"
+
+CONFIG_CHECK="~BLK_DEV_BSG ~DEVTMPFS ~!IDE ~INOTIFY_USER ~!SYSFS_DEPRECATED
+	~!SYSFS_DEPRECATED_V2 ~SIGNALFD ~EPOLL ~FHANDLE ~NET ~UNIX"
+
+pkg_setup() {
+	if [[ ${MERGE_TYPE} != buildonly ]] && use udev; then
+		linux-info_pkg_setup
+	fi
+	use boot && secureboot_pkg_setup
+}
+
+src_prepare() {
+	local PATCHES=(
+		"${FILESDIR}/${PN}-254.3-add-link-kernel-install-shared-option.patch"
+	)
+
+	if use elibc_musl; then
+		PATCHES+=(
+			"${WORKDIR}/${MUSL_PATCHSET}"
+		)
+	fi
+	default
+
+	# Remove install_rpath; we link statically
+	local rpath_pattern="install_rpath : rootpkglibdir,"
+	grep -q -e "${rpath_pattern}" meson.build || die
+	sed -i -e "/${rpath_pattern}/d" meson.build || die
+}
+
+src_configure() {
+	python_setup
+	meson-multilib_src_configure
+}
+
+multilib_src_configure() {
+	local emesonargs=(
+		$(meson_use split-usr)
+		$(meson_use split-usr split-bin)
+		-Drootprefix="$(usex split-usr "${EPREFIX:-/}" "${EPREFIX}/usr")"
+		-Drootlibdir="${EPREFIX}/usr/$(get_libdir)"
+		-Dsysvinit-path=
+		$(meson_native_use_bool boot bootloader)
+		$(meson_native_use_bool selinux)
+		$(meson_native_use_bool sysusers)
+		$(meson_use test tests)
+		$(meson_native_use_bool tmpfiles)
+		$(meson_use udev hwdb)
+
+		# Link staticly with libsystemd-shared
+		-Dlink-boot-shared=false
+		-Dlink-kernel-install-shared=false
+		-Dlink-udev-shared=false
+
+		# systemd-tmpfiles has a separate "systemd-tmpfiles.standalone" target
+		-Dstandalone-binaries=true
+
+		# Disable all optional features
+		-Dadm-group=false
+		-Danalyze=false
+		-Dapparmor=false
+		-Daudit=false
+		-Dbacklight=false
+		-Dbinfmt=false
+		-Dbpf-framework=false
+		-Dbzip2=false
+		-Dcoredump=false
+		-Ddbus=false
+		-Delfutils=false
+		-Denvironment-d=false
+		-Dfdisk=false
+		-Dgcrypt=false
+		-Dglib=false
+		-Dgshadow=false
+		-Dgnutls=false
+		-Dhibernate=false
+		-Dhostnamed=false
+		-Didn=false
+		-Dima=false
+		-Dinitrd=false
+		-Dfirstboot=false
+		-Dldconfig=false
+		-Dlibcryptsetup=false
+		-Dlibcurl=false
+		-Dlibfido2=false
+		-Dlibidn=false
+		-Dlibidn2=false
+		-Dlibiptc=false
+		-Dlocaled=false
+		-Dlogind=false
+		-Dlz4=false
+		-Dmachined=false
+		-Dmicrohttpd=false
+		-Dnetworkd=false
+		-Dnscd=false
+		-Dnss-myhostname=false
+		-Dnss-resolve=false
+		-Dnss-systemd=false
+		-Doomd=false
+		-Dopenssl=false
+		-Dp11kit=false
+		-Dpam=false
+		-Dpcre2=false
+		-Dpolkit=false
+		-Dportabled=false
+		-Dpstore=false
+		-Dpwquality=false
+		-Drandomseed=false
+		-Dresolve=false
+		-Drfkill=false
+		-Dseccomp=false
+		-Dsmack=false
+		-Dsysext=false
+		-Dtimedated=false
+		-Dtimesyncd=false
+		-Dtpm=false
+		-Dqrencode=false
+		-Dquotacheck=false
+		-Duserdb=false
+		-Dutmp=false
+		-Dvconsole=false
+		-Dwheel-group=false
+		-Dxdg-autostart=false
+		-Dxkbcommon=false
+		-Dxz=false
+		-Dzlib=false
+		-Dzstd=false
+	)
+
+	if use tmpfiles || use udev; then
+		emesonargs+=( $(meson_native_use_bool acl) )
+	else
+		emesonargs+=( -Dacl=false )
+	fi
+
+	if use udev; then
+		emesonargs+=( $(meson_native_use_bool kmod) )
+	else
+		emesonargs+=( -Dkmod=false )
+	fi
+
+	if use elibc_musl; then
+		# Avoid redefinition of struct ethhdr.
+		append-cppflags -D__UAPI_DEF_ETHHDR=0
+	fi
+
+	if multilib_is_native_abi || use udev; then
+		meson_src_configure
+	fi
+}
+
+efi_arch() {
+	case "$(tc-arch)" in
+		amd64) echo x64 ;;
+		arm)   echo arm ;;
+		arm64) echo aa64 ;;
+		x86)   echo x86 ;;
+	esac
+}
+
+multilib_src_compile() {
+	local targets=()
+	if multilib_is_native_abi; then
+		if use boot; then
+			targets+=(
+				bootctl
+				kernel-install
+				man/bootctl.1
+				man/kernel-install.8
+				90-loaderentry.install
+				src/boot/efi/linux$(efi_arch).efi.stub
+				src/boot/efi/systemd-boot$(efi_arch).efi
+			)
+		fi
+		if use sysusers; then
+			targets+=(
+				systemd-sysusers.standalone
+				man/sysusers.d.5
+				man/systemd-sysusers.8
+			)
+			if use test; then
+				targets+=(
+					systemd-runtest.env
+				)
+			fi
+		fi
+		if use tmpfiles; then
+			targets+=(
+				systemd-tmpfiles.standalone
+				man/tmpfiles.d.5
+				man/systemd-tmpfiles.8
+				tmpfiles.d/{etc,static-nodes-permissions,var}.conf
+			)
+			if use test; then
+				targets+=( test-tmpfiles )
+			fi
+		fi
+		if use udev; then
+			targets+=(
+				udevadm
+				systemd-hwdb
+				src/udev/ata_id
+				src/udev/cdrom_id
+				src/udev/fido_id
+				src/udev/mtd_probe
+				src/udev/scsi_id
+				src/udev/udev.pc
+				src/udev/v4l_id
+				man/udev.conf.5
+				man/systemd.link.5
+				man/hwdb.7
+				man/udev.7
+				man/systemd-hwdb.8
+				man/systemd-udevd.service.8
+				man/udevadm.8
+				hwdb.d/60-autosuspend-chromiumos.hwdb
+				rules.d/50-udev-default.rules
+				rules.d/60-persistent-storage.rules
+				rules.d/64-btrfs.rules
+			)
+			if use test; then
+				targets+=(
+					# Used by udev-test.pl
+					systemd-detect-virt
+					test/sys
+					test-udev
+
+					test-fido-id-desc
+					test-udev-builtin
+					test-udev-event
+					test-udev-node
+					test-udev-util
+				)
+			fi
+		fi
+	fi
+	if use udev; then
+		targets+=(
+			udev:shared_library
+			src/libudev/libudev.pc
+		)
+		if use test; then
+			targets+=(
+				test-libudev
+				test-libudev-sym
+				test-udev-device-thread
+			)
+		fi
+	fi
+	if multilib_is_native_abi || use udev; then
+		meson_src_compile "${targets[@]}"
+	fi
+}
+
+multilib_src_test() {
+	local tests=()
+	if multilib_is_native_abi; then
+		if use sysusers; then
+			tests+=(
+				test-sysusers.standalone
+			)
+		fi
+		if use tmpfiles; then
+			tests+=(
+				test-systemd-tmpfiles.standalone
+				test-tmpfiles
+			)
+		fi
+		if use udev; then
+			tests+=(
+				rule-syntax-check
+				test-fido-id-desc
+				test-udev-builtin
+				test-udev-event
+				test-udev-node
+				test-udev-util
+			)
+			if [[ -w /dev ]]; then
+				tests+=( udev-test )
+			else
+				ewarn "Skipping udev-test (needs write access to /dev)"
+			fi
+		fi
+	fi
+	if use udev; then
+		tests+=(
+			test-libudev
+			test-libudev-sym
+			test-udev-device-thread
+		)
+	fi
+	if [[ ${#tests[@]} -ne 0 ]]; then
+		meson_src_test "${tests[@]}"
+	fi
+}
+
+src_install() {
+	local rootprefix="$(usex split-usr '' /usr)"
+	meson-multilib_src_install
+}
+
+multilib_src_install() {
+	if multilib_is_native_abi; then
+		if use boot; then
+			into /usr
+			dobin bootctl kernel-install
+			doman man/{bootctl.1,kernel-install.8}
+			# 90-loaderentry.install is generated from 90-loaderentry.install.in
+			exeinto usr/lib/kernel/install.d
+			doexe src/kernel-install/*.install
+			insinto usr/lib/systemd/boot/efi
+			doins src/boot/efi/{linux$(efi_arch).{efi,elf}.stub,systemd-boot$(efi_arch).efi}
+		fi
+		if use sysusers; then
+			into "${rootprefix:-/}"
+			newbin systemd-sysusers{.standalone,}
+			doman man/{systemd-sysusers.8,sysusers.d.5}
+		fi
+		if use tmpfiles; then
+			into "${rootprefix:-/}"
+			newbin systemd-tmpfiles{.standalone,}
+			doman man/{systemd-tmpfiles.8,tmpfiles.d.5}
+			insinto /usr/lib/tmpfiles.d
+			doins tmpfiles.d/{etc,static-nodes-permissions,var}.conf
+		fi
+		if use udev; then
+			into "${rootprefix:-/}"
+			dobin udevadm systemd-hwdb
+			dosym ../../bin/udevadm "${rootprefix}"/lib/systemd/systemd-udevd
+
+			exeinto "${rootprefix}"/lib/udev
+			doexe src/udev/{ata_id,cdrom_id,fido_id,mtd_probe,scsi_id,v4l_id}
+
+			insinto "${rootprefix}"/lib/udev/rules.d
+			doins rules.d/*.rules
+
+			insinto "${rootprefix}"/lib/udev/hwdb.d
+			doins hwdb.d/*.hwdb
+
+			insinto /usr/share/pkgconfig
+			doins src/udev/udev.pc
+
+			doman man/{udev.conf.5,systemd.link.5,hwdb.7,systemd-hwdb.8,udev.7,udevadm.8}
+			newman man/systemd-udevd.service.8 systemd-udevd.8
+		fi
+	fi
+	if use udev; then
+		meson_install --no-rebuild --tags libudev
+		gen_usr_ldscript -a udev
+		insinto "/usr/$(get_libdir)/pkgconfig"
+		doins src/libudev/libudev.pc
+	fi
+}
+
+multilib_src_install_all() {
+	einstalldocs
+	if use boot; then
+		into /usr
+		exeinto usr/lib/kernel/install.d
+		doexe src/kernel-install/*.install
+		dobashcomp shell-completion/bash/bootctl
+		insinto /usr/share/zsh/site-functions
+		doins shell-completion/zsh/{_bootctl,_kernel-install}
+	fi
+	if use tmpfiles; then
+		doinitd "${FILESDIR}"/systemd-tmpfiles-setup
+		doinitd "${FILESDIR}"/systemd-tmpfiles-setup-dev
+		exeinto /etc/cron.daily
+		doexe "${FILESDIR}"/systemd-tmpfiles-clean
+		insinto /usr/share/zsh/site-functions
+		doins shell-completion/zsh/_systemd-tmpfiles
+		insinto /usr/lib/tmpfiles.d
+		doins tmpfiles.d/{tmp,x11}.conf
+		doins "${FILESDIR}"/legacy.conf
+	fi
+	if use udev; then
+		doheader src/libudev/libudev.h
+
+		insinto /etc/udev
+		doins src/udev/udev.conf
+		keepdir /etc/udev/{hwdb.d,rules.d}
+
+		insinto "${rootprefix}"/lib/systemd/network
+		doins network/99-default.link
+
+		# Remove to avoid conflict with elogind
+		# https://bugs.gentoo.org/856433
+		rm rules.d/70-power-switch.rules || die
+		insinto "${rootprefix}"/lib/udev/rules.d
+		doins rules.d/*.rules
+		doins "${FILESDIR}"/40-gentoo.rules
+
+		insinto "${rootprefix}"/lib/udev/hwdb.d
+		doins hwdb.d/*.hwdb
+
+		dobashcomp shell-completion/bash/udevadm
+
+		insinto /usr/share/zsh/site-functions
+		doins shell-completion/zsh/_udevadm
+	fi
+
+	use boot && secureboot_auto_sign
+}
+
+add_service() {
+	local initd=$1
+	local runlevel=$2
+
+	ebegin "Adding '${initd}' service to the '${runlevel}' runlevel"
+	mkdir -p "${EROOT}/etc/runlevels/${runlevel}" &&
+	ln -snf "${EPREFIX}/etc/init.d/${initd}" "${EROOT}/etc/runlevels/${runlevel}/${initd}"
+	eend $?
+}
+
+pkg_postinst() {
+	if [[ -z ${REPLACING_VERSIONS} ]]; then
+		add_service systemd-tmpfiles-setup-dev sysinit
+		add_service systemd-tmpfiles-setup boot
+	fi
+	if use udev; then
+		ebegin "Updating hwdb"
+		systemd-hwdb --root="${ROOT}" update
+		eend $?
+		udev_reload
+	fi
+}


^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: sys-apps/systemd-utils/files/, sys-apps/systemd-utils/
@ 2024-03-28 21:12 Mike Gilbert
  0 siblings, 0 replies; 10+ messages in thread
From: Mike Gilbert @ 2024-03-28 21:12 UTC (permalink / raw
  To: gentoo-commits

commit:     dafe17091a2bfa128ee7f706d63e76cc42e4c58f
Author:     Mike Gilbert <floppym <AT> gentoo <DOT> org>
AuthorDate: Thu Mar 28 21:09:36 2024 +0000
Commit:     Mike Gilbert <floppym <AT> gentoo <DOT> org>
CommitDate: Thu Mar 28 21:12:06 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=dafe1709

sys-apps/systemd-utils: disable auto-cleanup of /tmp and /var/tmp

This can go awry when people have non-standard mount options for these
paths.

Closes: https://bugs.gentoo.org/910233
Bug: https://bugs.gentoo.org/916623
Closes: https://bugs.gentoo.org/917777
Signed-off-by: Mike Gilbert <floppym <AT> gentoo.org>

 sys-apps/systemd-utils/files/tmp.conf                                 | 2 ++
 .../{systemd-utils-254.10.ebuild => systemd-utils-254.10-r1.ebuild}   | 4 ++--
 .../{systemd-utils-254.8.ebuild => systemd-utils-254.8-r1.ebuild}     | 4 ++--
 sys-apps/systemd-utils/systemd-utils-255.4.ebuild                     | 4 ++--
 4 files changed, 8 insertions(+), 6 deletions(-)

diff --git a/sys-apps/systemd-utils/files/tmp.conf b/sys-apps/systemd-utils/files/tmp.conf
new file mode 100644
index 000000000000..9f3d19bb7a2d
--- /dev/null
+++ b/sys-apps/systemd-utils/files/tmp.conf
@@ -0,0 +1,2 @@
+q /tmp 1777 root root
+q /var/tmp 1777 root root

diff --git a/sys-apps/systemd-utils/systemd-utils-254.10.ebuild b/sys-apps/systemd-utils/systemd-utils-254.10-r1.ebuild
similarity index 99%
rename from sys-apps/systemd-utils/systemd-utils-254.10.ebuild
rename to sys-apps/systemd-utils/systemd-utils-254.10-r1.ebuild
index 93436b880f05..80c11bee8adc 100644
--- a/sys-apps/systemd-utils/systemd-utils-254.10.ebuild
+++ b/sys-apps/systemd-utils/systemd-utils-254.10-r1.ebuild
@@ -517,8 +517,8 @@ multilib_src_install_all() {
 		insinto /usr/share/zsh/site-functions
 		doins shell-completion/zsh/_systemd-tmpfiles
 		insinto /usr/lib/tmpfiles.d
-		doins tmpfiles.d/{tmp,x11}.conf
-		doins "${FILESDIR}"/legacy.conf
+		doins tmpfiles.d/x11.conf
+		doins "${FILESDIR}"/{legacy,tmp}.conf
 	fi
 	if use udev; then
 		doheader src/libudev/libudev.h

diff --git a/sys-apps/systemd-utils/systemd-utils-254.8.ebuild b/sys-apps/systemd-utils/systemd-utils-254.8-r1.ebuild
similarity index 99%
rename from sys-apps/systemd-utils/systemd-utils-254.8.ebuild
rename to sys-apps/systemd-utils/systemd-utils-254.8-r1.ebuild
index b73e1d640a89..bbe8dec823b3 100644
--- a/sys-apps/systemd-utils/systemd-utils-254.8.ebuild
+++ b/sys-apps/systemd-utils/systemd-utils-254.8-r1.ebuild
@@ -518,8 +518,8 @@ multilib_src_install_all() {
 		insinto /usr/share/zsh/site-functions
 		doins shell-completion/zsh/_systemd-tmpfiles
 		insinto /usr/lib/tmpfiles.d
-		doins tmpfiles.d/{tmp,x11}.conf
-		doins "${FILESDIR}"/legacy.conf
+		doins tmpfiles.d/x11.conf
+		doins "${FILESDIR}"/{legacy,tmp}.conf
 	fi
 	if use udev; then
 		doheader src/libudev/libudev.h

diff --git a/sys-apps/systemd-utils/systemd-utils-255.4.ebuild b/sys-apps/systemd-utils/systemd-utils-255.4.ebuild
index b258f5748243..a4f60f47e7f3 100644
--- a/sys-apps/systemd-utils/systemd-utils-255.4.ebuild
+++ b/sys-apps/systemd-utils/systemd-utils-255.4.ebuild
@@ -517,8 +517,8 @@ multilib_src_install_all() {
 		insinto /usr/share/zsh/site-functions
 		doins shell-completion/zsh/_systemd-tmpfiles
 		insinto /usr/lib/tmpfiles.d
-		doins tmpfiles.d/{tmp,x11}.conf
-		doins "${FILESDIR}"/legacy.conf
+		doins tmpfiles.d/x11.conf
+		doins "${FILESDIR}"/{legacy,tmp}.conf
 	fi
 	if use udev; then
 		doheader src/libudev/libudev.h


^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: sys-apps/systemd-utils/files/, sys-apps/systemd-utils/
@ 2024-06-10 16:20 Mike Gilbert
  0 siblings, 0 replies; 10+ messages in thread
From: Mike Gilbert @ 2024-06-10 16:20 UTC (permalink / raw
  To: gentoo-commits

commit:     8c128ff779a89ca0f9559f72e23a43db15058583
Author:     Mike Gilbert <floppym <AT> gentoo <DOT> org>
AuthorDate: Mon Jun 10 16:19:28 2024 +0000
Commit:     Mike Gilbert <floppym <AT> gentoo <DOT> org>
CommitDate: Mon Jun 10 16:19:28 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=8c128ff7

sys-apps/systemd-utils: fix sysusers on musl

Signed-off-by: Mike Gilbert <floppym <AT> gentoo.org>

 .../files/systemd-utils-255-musl-fgetxxent.patch   | 61 ++++++++++++++++++++++
 ...5.7-r1.ebuild => systemd-utils-255.7-r2.ebuild} |  1 +
 2 files changed, 62 insertions(+)

diff --git a/sys-apps/systemd-utils/files/systemd-utils-255-musl-fgetxxent.patch b/sys-apps/systemd-utils/files/systemd-utils-255-musl-fgetxxent.patch
new file mode 100644
index 000000000000..682c0c7c21af
--- /dev/null
+++ b/sys-apps/systemd-utils/files/systemd-utils-255-musl-fgetxxent.patch
@@ -0,0 +1,61 @@
+https://github.com/systemd/systemd/pull/33252
+
+From 85277a97b222ce19cf951d2c99b1693e8c34fc45 Mon Sep 17 00:00:00 2001
+From: Mike Gilbert <floppym@gentoo.org>
+Date: Fri, 7 Jun 2024 12:28:41 -0400
+Subject: [PATCH] user-util: fix fgetxxent_sane on musl
+
+musl's implementation does not set errno to ENOENT when the end of file
+is reached. It returns NULL and leaves errno unchanged.
+---
+ src/basic/user-util.c | 16 ++++++++--------
+ 1 file changed, 8 insertions(+), 8 deletions(-)
+
+diff --git a/src/basic/user-util.c b/src/basic/user-util.c
+index b3df413be6b06..6bdf5bf1cdc9a 100644
+--- a/src/basic/user-util.c
++++ b/src/basic/user-util.c
+@@ -977,8 +977,8 @@ int fgetpwent_sane(FILE *stream, struct passwd **pw) {
+ 
+         errno = 0;
+         struct passwd *p = fgetpwent(stream);
+-        if (!p && errno != ENOENT)
+-                return errno_or_else(EIO);
++        if (!p && !IN_SET(errno, 0, ENOENT))
++                return -errno;
+ 
+         *pw = p;
+         return !!p;
+@@ -990,8 +990,8 @@ int fgetspent_sane(FILE *stream, struct spwd **sp) {
+ 
+         errno = 0;
+         struct spwd *s = fgetspent(stream);
+-        if (!s && errno != ENOENT)
+-                return errno_or_else(EIO);
++        if (!s && !IN_SET(errno, 0, ENOENT))
++                return -errno;
+ 
+         *sp = s;
+         return !!s;
+@@ -1003,8 +1003,8 @@ int fgetgrent_sane(FILE *stream, struct group **gr) {
+ 
+         errno = 0;
+         struct group *g = fgetgrent(stream);
+-        if (!g && errno != ENOENT)
+-                return errno_or_else(EIO);
++        if (!g && !IN_SET(errno, 0, ENOENT))
++                return -errno;
+ 
+         *gr = g;
+         return !!g;
+@@ -1017,8 +1017,8 @@ int fgetsgent_sane(FILE *stream, struct sgrp **sg) {
+ 
+         errno = 0;
+         struct sgrp *s = fgetsgent(stream);
+-        if (!s && errno != ENOENT)
+-                return errno_or_else(EIO);
++        if (!s && !IN_SET(errno, 0, ENOENT))
++                return -errno;
+ 
+         *sg = s;
+         return !!s;

diff --git a/sys-apps/systemd-utils/systemd-utils-255.7-r1.ebuild b/sys-apps/systemd-utils/systemd-utils-255.7-r2.ebuild
similarity index 99%
rename from sys-apps/systemd-utils/systemd-utils-255.7-r1.ebuild
rename to sys-apps/systemd-utils/systemd-utils-255.7-r2.ebuild
index 0d6be4c5b60d..5eada6a19240 100644
--- a/sys-apps/systemd-utils/systemd-utils-255.7-r1.ebuild
+++ b/sys-apps/systemd-utils/systemd-utils-255.7-r2.ebuild
@@ -132,6 +132,7 @@ pkg_setup() {
 
 src_prepare() {
 	local PATCHES=(
+		"${FILESDIR}/systemd-utils-255-musl-fgetxxent.patch"
 	)
 
 	if use elibc_musl; then


^ permalink raw reply related	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2024-06-10 16:20 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-09-18 15:48 [gentoo-commits] repo/gentoo:master commit in: sys-apps/systemd-utils/files/, sys-apps/systemd-utils/ Mike Gilbert
  -- strict thread matches above, loose matches on Subject: below --
2024-06-10 16:20 Mike Gilbert
2024-03-28 21:12 Mike Gilbert
2023-09-09 20:24 Mike Gilbert
2023-06-23 20:32 Sam James
2023-01-11  7:50 Sam James
2022-10-14 21:18 Sam James
2022-08-08 20:14 Sam James
2022-04-17 13:56 Mike Gilbert
2022-04-16 23:13 Mike Gilbert

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox