summaryrefslogtreecommitdiff
path: root/sys-apps/systemd-tmpfiles
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2020-11-25 22:39:15 +0000
committerV3n3RiX <venerix@redcorelinux.org>2020-11-25 22:39:15 +0000
commitd934827bf44b7cfcf6711964418148fa60877668 (patch)
tree0625f358789b5e015e49db139cc1dbc9be00428f /sys-apps/systemd-tmpfiles
parent2e34d110f164bf74d55fced27fe0000201b3eec5 (diff)
gentoo resync : 25.11.2020
Diffstat (limited to 'sys-apps/systemd-tmpfiles')
-rw-r--r--sys-apps/systemd-tmpfiles/Manifest7
-rw-r--r--sys-apps/systemd-tmpfiles/files/stmpfiles-dev.initd20
-rw-r--r--sys-apps/systemd-tmpfiles/files/stmpfiles-setup.initd19
-rw-r--r--sys-apps/systemd-tmpfiles/files/stmpfiles.confd2
-rw-r--r--sys-apps/systemd-tmpfiles/metadata.xml8
-rw-r--r--sys-apps/systemd-tmpfiles/systemd-tmpfiles-246.ebuild209
6 files changed, 265 insertions, 0 deletions
diff --git a/sys-apps/systemd-tmpfiles/Manifest b/sys-apps/systemd-tmpfiles/Manifest
new file mode 100644
index 000000000000..dceb3e6dc611
--- /dev/null
+++ b/sys-apps/systemd-tmpfiles/Manifest
@@ -0,0 +1,7 @@
+AUX stmpfiles-dev.initd 421 BLAKE2B af962a76a2f3985aff460193a9bdcb7d340a3cf0a5c7cb65150dade564dc780d91634028b5f8a87750be66e6c47bbe519088fbc0c46047f180e93c3eabffc16d SHA512 1eac910984bda9ba5d8e9c5b17718c356f90b41ccf22bb68393b4f00901c8999501e1b482decbf22e6a16157f430eee159b3332f6e82a9442423adc884057475
+AUX stmpfiles-setup.initd 396 BLAKE2B 54796d5db9fc350a98e467cf763afaa82bc27f547755f0631f5f37f2d6e1382e361878aed80545bbb5ba198b564337e4083c073f73552d8bed4a8732ff6b819f SHA512 12201b6a3d7f4a178ca9504638cbbc7e518c5075ce9a3b2653650960b54225f3516381dd4e0366d13f16aecaa1dec40ad1a41ef1f849b6c45be81c49108bdccd
+AUX stmpfiles.confd 56 BLAKE2B c26aafd0e47b01354c7f20869cd71d36d7a8560e9013863eca6abb736d78c1eeb3eec00427c6bc8d37ab5b9bb88155d11b9e18809da9110ed40c77a34ebb1a82 SHA512 464cb238b87a8fbeb57e6534d0f2d861e8ade4219be9b7e2faf05c799f717cd2f23d176393bdd3c3b236058aa6f8bda837ad947fbe8f9489405760e9bfedbe40
+DIST systemd-246.tar.gz 9534036 BLAKE2B 71b72abcd4d066d35d45d9835d41bec8faa9a7eddc80b48fe7073223f07d32f78a8442c52dc0800940f9750d9c5502123a633738981d797cf610d85df2035bf0 SHA512 7103f7da53f7ced3b5543c238f23bd11c82af8e37166c1720a90576b6b431b4329320c78726166c65a9f5e101dd465c0a86dd13c586c4e55e608a6273d8f324f
+DIST systemd-tmpfiles-246-musl.tar.xz 25860 BLAKE2B 87fc4ca37abec9c1a0cee48bf78c575bd53e16a50d427eff338159dc6d5474ffd328af533ccf90a0e1e160a16baa7378070f418f2be0d7f77e00907a5d07d30e SHA512 4a93d9f0cb2df2dd0a2f91820615dd3a95d19583f45dc0589e37ceaedfc2040112310a6e3fc525e28e222e96a91498af2fe8541b5bf86a635c0f52dd1a84deb7
+EBUILD systemd-tmpfiles-246.ebuild 4485 BLAKE2B 23af3c77dec65abe104e3b3a6c094194181dde0121b7ffb86b23085bab5cd1c1fd16b7ccf6facfb20ad149a11e7235e85d20fc8b7e89572da0815a1e5bdcc353 SHA512 53197d3537a783ecd136ebf482886596ffc00f6daf36b11395be9ef6c097b7be649f4fdd8608cc1814b90b34fe8b4b8990246f79beac09a9de8e7a5df539aa0b
+MISC metadata.xml 251 BLAKE2B e9e9d48943645d8b737bc1f7ab0efb05db0f8eddad759c9bb40d07dc008fbfb8f5cca2020de71a9ff6945f5d66292ac02355773545010cd49c77fe6dd5ab7b40 SHA512 1b6a6955118c1a74cc89a77d6de9be8f4ff9c7137c186753462670a5b93457dfd034ad5d1f4d2507ac95cc149c2a042fa5324220b58702a56b09d91de40151c9
diff --git a/sys-apps/systemd-tmpfiles/files/stmpfiles-dev.initd b/sys-apps/systemd-tmpfiles/files/stmpfiles-dev.initd
new file mode 100644
index 000000000000..0952ef12cc2c
--- /dev/null
+++ b/sys-apps/systemd-tmpfiles/files/stmpfiles-dev.initd
@@ -0,0 +1,20 @@
+#!/sbin/openrc-run
+# Copyright 1999-2020 Gentoo Authors
+# Released under the 2-clause BSD license.
+
+description="Set up tmpfiles.d entries for /dev"
+
+depend()
+{
+ provide stmpfiles-dev stmpfiles.dev tmpfiles-dev tmpfiles.dev
+ use dev-mount
+ before dev
+ keyword -prefix -vserver
+}
+
+start()
+{
+ ebegin "Setting up tmpfiles.d entries for /dev"
+ /bin/systemd-tmpfiles --prefix=/dev --create --boot ${stmpfiles_opts}
+ eend $?
+}
diff --git a/sys-apps/systemd-tmpfiles/files/stmpfiles-setup.initd b/sys-apps/systemd-tmpfiles/files/stmpfiles-setup.initd
new file mode 100644
index 000000000000..a55163d3fd65
--- /dev/null
+++ b/sys-apps/systemd-tmpfiles/files/stmpfiles-setup.initd
@@ -0,0 +1,19 @@
+#!/sbin/openrc-run
+# Copyright 1999-2020 Gentoo Authors
+# Released under the 2-clause BSD license.
+
+description="Set up tmpfiles.d entries"
+
+depend()
+{
+ provide stmpfiles-setup stmpfiles.setup tmpfiles-setup tmpfiles.setup
+ need localmount
+}
+
+start()
+{
+ ebegin "Setting up tmpfiles.d entries"
+ /bin/systemd-tmpfiles --exclude-prefix=/dev --create --remove --boot \
+ ${stmpfiles_opts}
+ eend $?
+}
diff --git a/sys-apps/systemd-tmpfiles/files/stmpfiles.confd b/sys-apps/systemd-tmpfiles/files/stmpfiles.confd
new file mode 100644
index 000000000000..2ec4b5f0d8b8
--- /dev/null
+++ b/sys-apps/systemd-tmpfiles/files/stmpfiles.confd
@@ -0,0 +1,2 @@
+# Extra options to pass to stmpfiles
+#stmpfiles_opts=""
diff --git a/sys-apps/systemd-tmpfiles/metadata.xml b/sys-apps/systemd-tmpfiles/metadata.xml
new file mode 100644
index 000000000000..efcd58fe0b9b
--- /dev/null
+++ b/sys-apps/systemd-tmpfiles/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person">
+ <email>gyakovlev@gentoo.org</email>
+ <name>Georgy Yakovlev</name>
+ </maintainer>
+</pkgmetadata>
diff --git a/sys-apps/systemd-tmpfiles/systemd-tmpfiles-246.ebuild b/sys-apps/systemd-tmpfiles/systemd-tmpfiles-246.ebuild
new file mode 100644
index 000000000000..1aa64e928f2b
--- /dev/null
+++ b/sys-apps/systemd-tmpfiles/systemd-tmpfiles-246.ebuild
@@ -0,0 +1,209 @@
+# Copyright 2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+MINKV="3.11"
+PYTHON_COMPAT=( python3_{7..9} )
+inherit meson python-any-r1
+
+DESCRIPTION="Creates, deletes and cleans up volatile and temporary files and directories"
+HOMEPAGE="https://www.freedesktop.org/wiki/Software/systemd"
+SRC_URI="https://github.com/systemd/systemd/archive/v${PV}.tar.gz -> systemd-${PV}.tar.gz
+ elibc_musl? ( https://dev.gentoo.org/~gyakovlev/distfiles/${P}-musl.tar.xz )"
+
+LICENSE="BSD-2 GPL-2 LGPL-2.1 MIT public-domain"
+SLOT="0"
+KEYWORDS="amd64 arm arm64 ppc ppc64 sparc x86"
+IUSE="test"
+RESTRICT="!test? ( test )"
+
+DEPEND="
+ sys-apps/acl:0=
+ >=sys-apps/util-linux-2.30:0=
+ >=sys-kernel/linux-headers-${MINKV}
+ sys-libs/libcap:0=
+"
+RDEPEND="${DEPEND}
+ !sys-apps/opentmpfiles
+ !sys-apps/systemd
+"
+
+BDEPEND="
+ app-text/docbook-xml-dtd:4.2
+ app-text/docbook-xml-dtd:4.5
+ app-text/docbook-xsl-stylesheets
+ dev-libs/libxslt:0
+ >=dev-util/meson-0.46
+ >=dev-util/intltool-0.50
+ >=sys-apps/coreutils-8.16
+ sys-devel/m4
+ virtual/pkgconfig
+ test? ( ${PYTHON_DEPS} )
+"
+
+S="${WORKDIR}/systemd-${PV}"
+
+pkg_setup() {
+ use test && python-any-r1_pkg_setup
+}
+
+src_prepare() {
+ # musl patchset from:
+ # http://cgit.openembedded.org/openembedded-core/tree/meta/recipes-core/systemd/systemd
+ use elibc_musl && eapply "${WORKDIR}/${P}-musl"
+ default
+}
+
+src_configure() {
+ # disable everything until configure says "enabled features: ACL, tmpfiles"
+ local systemd_disable_options=(
+ adm-group
+ analyze
+ apparmor
+ audit
+ backlight
+ binfmt
+ blkid
+ bzip2
+ coredump
+ dbus
+ efi
+ elfutils
+ environment-d
+ fdisk
+ gcrypt
+ glib
+ gshadow
+ gnutls
+ hibernate
+ hostnamed
+ hwdb
+ idn
+ ima
+ initrd
+ firstboot
+ kernel-install
+ kmod
+ ldconfig
+ libcryptsetup
+ libcurl
+ libfido2
+ libidn
+ libidn2
+ libiptc
+ link-networkd-shared
+ link-systemctl-shared
+ link-timesyncd-shared
+ link-udev-shared
+ localed
+ logind
+ lz4
+ machined
+ microhttpd
+ networkd
+ nss-myhostname
+ nss-resolve
+ nss-systemd
+ openssl
+ p11kit
+ pam
+ pcre2
+ polkit
+ portabled
+ pstore
+ pwquality
+ randomseed
+ resolve
+ rfkill
+ seccomp
+ selinux
+ smack
+ sysusers
+ timedated
+ timesyncd
+ tpm
+ qrencode
+ quotacheck
+ userdb
+ utmp
+ vconsole
+ wheel-group
+ xdg-autostart
+ xkbcommon
+ xz
+ zlib
+ zstd
+ )
+
+ # prepend -D and append =false, e.g. zstd becomes -Dzstd=false
+ systemd_disable_options=( ${systemd_disable_options[@]/#/-D} )
+ systemd_disable_options=( ${systemd_disable_options[@]/%/=false} )
+
+ local emesonargs=(
+ -Dacl=true
+ -Dtmpfiles=true
+ -Dstandalone-binaries=true # this and below option does the magic
+ -Dstatic-libsystemd=true
+ -Dsysvinit-path=''
+ ${systemd_disable_options[@]}
+ )
+ meson_src_configure
+}
+
+src_compile() {
+ # tmpfiles and sysusers can be built as standalone, link systemd-shared in statically.
+ # https://github.com/systemd/systemd/pull/16061 original implementation
+ # we just need to pass -Dstandalone-binaries=true and
+ # use <name>.standalone target below.
+ # check meson.build for if have_standalone_binaries condition per target.
+ local mytargets=(
+ systemd-tmpfiles.standalone
+ man/tmpfiles.d.5
+ man/systemd-tmpfiles.8
+ )
+ meson_src_compile "${mytargets[@]}"
+}
+
+src_install() {
+ # lean and mean installation, single binary and man-pages
+ pushd "${BUILD_DIR}" > /dev/null || die
+ into /
+ newbin systemd-tmpfiles.standalone systemd-tmpfiles
+
+ doman man/{systemd-tmpfiles.8,tmpfiles.d.5}
+
+ popd > /dev/null || die
+
+ # service files adapter from opentmpfiles
+ newinitd "${FILESDIR}"/stmpfiles-dev.initd stmpfiles-dev
+ newinitd "${FILESDIR}"/stmpfiles-setup.initd stmpfiles-setup
+
+ # same content, but install as different file
+ newconfd "${FILESDIR}"/stmpfiles.confd stmpfiles-dev
+ newconfd "${FILESDIR}"/stmpfiles.confd stmpfiles-setup
+}
+
+src_test() {
+ # 'meson test' will compile full systemd, but we can still outsmart it
+ python_fix_shebang src/test/test-systemd-tmpfiles.py
+ "${EPYTHON}" src/test/test-systemd-tmpfiles.py \
+ "${BUILD_DIR}"/systemd-tmpfiles.standalone || die "${FUNCNAME} failed"
+}
+
+# adapted from opentmpfiles ebuild
+add_service() {
+ local initd=$1
+ local runlevel=$2
+
+ elog "Auto-adding '${initd}' service to your ${runlevel} runlevel"
+ mkdir -p "${EROOT}/etc/runlevels/${runlevel}"
+ ln -snf "${EROOT}/etc/init.d/${initd}" "${EROOT}/etc/runlevels/${runlevel}/${initd}"
+}
+
+pkg_postinst() {
+ if [[ -z $REPLACING_VERSIONS ]]; then
+ add_service stmpfiles-dev sysinit
+ add_service stmpfiles-setup boot
+ fi
+}