From: "Georgy Yakovlev" <gyakovlev@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: sys-apps/systemd-tmpfiles/, sys-apps/systemd-tmpfiles/files/
Date: Thu, 29 Oct 2020 05:03:35 +0000 (UTC) [thread overview]
Message-ID: <1603947799.06d012cc3dacb4a2c7ac2e28553c96965f9ddea9.gyakovlev@gentoo> (raw)
commit: 06d012cc3dacb4a2c7ac2e28553c96965f9ddea9
Author: Georgy Yakovlev <gyakovlev <AT> gentoo <DOT> org>
AuthorDate: Thu Oct 29 04:57:19 2020 +0000
Commit: Georgy Yakovlev <gyakovlev <AT> gentoo <DOT> org>
CommitDate: Thu Oct 29 05:03:19 2020 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=06d012cc
sys-apps/systemd-tmpfiles: new package
Package-Manager: Portage-3.0.8, Repoman-3.0.2
Signed-off-by: Georgy Yakovlev <gyakovlev <AT> gentoo.org>
sys-apps/systemd-tmpfiles/Manifest | 1 +
.../systemd-tmpfiles/files/stmpfiles-dev.confd | 2 +
.../systemd-tmpfiles/files/stmpfiles-dev.initd | 20 +++
.../systemd-tmpfiles/files/stmpfiles-setup.confd | 2 +
.../systemd-tmpfiles/files/stmpfiles-setup.initd | 19 +++
sys-apps/systemd-tmpfiles/metadata.xml | 8 +
.../systemd-tmpfiles/systemd-tmpfiles-246.ebuild | 173 +++++++++++++++++++++
7 files changed, 225 insertions(+)
diff --git a/sys-apps/systemd-tmpfiles/Manifest b/sys-apps/systemd-tmpfiles/Manifest
new file mode 100644
index 00000000000..0e7a4c8589d
--- /dev/null
+++ b/sys-apps/systemd-tmpfiles/Manifest
@@ -0,0 +1 @@
+DIST systemd-246.tar.gz 9534036 BLAKE2B 71b72abcd4d066d35d45d9835d41bec8faa9a7eddc80b48fe7073223f07d32f78a8442c52dc0800940f9750d9c5502123a633738981d797cf610d85df2035bf0 SHA512 7103f7da53f7ced3b5543c238f23bd11c82af8e37166c1720a90576b6b431b4329320c78726166c65a9f5e101dd465c0a86dd13c586c4e55e608a6273d8f324f
diff --git a/sys-apps/systemd-tmpfiles/files/stmpfiles-dev.confd b/sys-apps/systemd-tmpfiles/files/stmpfiles-dev.confd
new file mode 100644
index 00000000000..2ec4b5f0d8b
--- /dev/null
+++ b/sys-apps/systemd-tmpfiles/files/stmpfiles-dev.confd
@@ -0,0 +1,2 @@
+# Extra options to pass to stmpfiles
+#stmpfiles_opts=""
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 00000000000..0952ef12cc2
--- /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.confd b/sys-apps/systemd-tmpfiles/files/stmpfiles-setup.confd
new file mode 100644
index 00000000000..2ec4b5f0d8b
--- /dev/null
+++ b/sys-apps/systemd-tmpfiles/files/stmpfiles-setup.confd
@@ -0,0 +1,2 @@
+# Extra options to pass to stmpfiles
+#stmpfiles_opts=""
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 00000000000..a55163d3fd6
--- /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/metadata.xml b/sys-apps/systemd-tmpfiles/metadata.xml
new file mode 100644
index 00000000000..efcd58fe0b9
--- /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 00000000000..5b99c6958bc
--- /dev/null
+++ b/sys-apps/systemd-tmpfiles/systemd-tmpfiles-246.ebuild
@@ -0,0 +1,173 @@
+# Copyright 2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+MINKV="3.11"
+inherit meson
+
+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"
+
+LICENSE="BSD-2 GPL-2 LGPL-2.1 MIT public-domain"
+SLOT="0"
+KEYWORDS=""
+
+DEPEND="
+ >=sys-kernel/linux-headers-${MINKV}
+ sys-apps/acl:0=
+ >=sys-apps/util-linux-2.30:0=
+ sys-libs/libcap:0=
+"
+RDEPEND="${DEPEND}
+ !sys-apps/opentmpfiles
+ !sys-apps/systemd
+"
+
+S="${WORKDIR}/systemd-${PV}"
+
+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=(
+ -Dtmpfiles=true
+ -Dacl=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
+
+ newconfd "${FILESDIR}"/stmpfiles-dev.confd stmpfiles-dev
+ newconfd "${FILESDIR}"/stmpfiles-setup.confd stmpfiles-setup
+}
+
+# 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
+}
next reply other threads:[~2020-10-29 5:03 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-10-29 5:03 Georgy Yakovlev [this message]
-- strict thread matches above, loose matches on Subject: below --
2021-02-17 18:50 [gentoo-commits] repo/gentoo:master commit in: sys-apps/systemd-tmpfiles/, sys-apps/systemd-tmpfiles/files/ Georgy Yakovlev
2021-08-04 10:59 Georgy Yakovlev
2021-11-03 23:57 Sam James
2021-12-24 9:05 Georgy Yakovlev
2022-10-28 7:41 Sam James
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1603947799.06d012cc3dacb4a2c7ac2e28553c96965f9ddea9.gyakovlev@gentoo \
--to=gyakovlev@gentoo.org \
--cc=gentoo-commits@lists.gentoo.org \
--cc=gentoo-dev@lists.gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox