diff options
author | V3n3RiX <venerix@redcorelinux.org> | 2021-05-31 20:59:14 +0100 |
---|---|---|
committer | V3n3RiX <venerix@redcorelinux.org> | 2021-05-31 20:59:14 +0100 |
commit | e748ba9741f6540f4675c23e3e37b73e822c13a4 (patch) | |
tree | 23dece8beabb3a3d7c6c0273b0eb40b21c62a889 /sys-apps/systemd-tmpfiles | |
parent | 908778078736bd36f7a60a2d576d415cb8e000fa (diff) |
gentoo resync : 31.05.2021
Diffstat (limited to 'sys-apps/systemd-tmpfiles')
-rw-r--r-- | sys-apps/systemd-tmpfiles/Manifest | 3 | ||||
-rw-r--r-- | sys-apps/systemd-tmpfiles/systemd-tmpfiles-248.3.ebuild | 238 |
2 files changed, 241 insertions, 0 deletions
diff --git a/sys-apps/systemd-tmpfiles/Manifest b/sys-apps/systemd-tmpfiles/Manifest index 2ad3c58c60ef..437e2715b9c1 100644 --- a/sys-apps/systemd-tmpfiles/Manifest +++ b/sys-apps/systemd-tmpfiles/Manifest @@ -3,6 +3,9 @@ AUX stmpfiles-dev.initd 421 BLAKE2B af962a76a2f3985aff460193a9bdcb7d340a3cf0a5c7 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-stable-248.3.tar.gz 10320940 BLAKE2B 725494e0197dd182de55e4967088f4b4b709e6b2242723368b6cd95606582e01a57322b1f18fa194149055140a90993696734ad3c004843bfaceb72cd04a3a84 SHA512 8e7ff0d5e63cc933e4dc23f7e0bef9707fde90396605eb8822d34de90d7abe8fd37e5739e33b657868218aa7281147cc944c096c007324c3e6fb54d833a83485 DIST systemd-tmpfiles-246-musl.tar.xz 25860 BLAKE2B 87fc4ca37abec9c1a0cee48bf78c575bd53e16a50d427eff338159dc6d5474ffd328af533ccf90a0e1e160a16baa7378070f418f2be0d7f77e00907a5d07d30e SHA512 4a93d9f0cb2df2dd0a2f91820615dd3a95d19583f45dc0589e37ceaedfc2040112310a6e3fc525e28e222e96a91498af2fe8541b5bf86a635c0f52dd1a84deb7 +DIST systemd-tmpfiles-248.3-musl.tar.xz 22904 BLAKE2B a277ce86577644cecbca5dbfde34aec494e3e14075ab4f7fcbb02f9307d714a93ca63f38e346a1e98391ca9c55860c7e90789cd5edb9b196cf638d54bfe1153b SHA512 d3db6a90bed6b6c1a9f6bce138137554742d1bc60da142fbadbd49b64677a562e47d8140b9c413857106e053d740476744b7f7e05af9dd4a1329058c78cef940 EBUILD systemd-tmpfiles-246.ebuild 4706 BLAKE2B 9cdf5cea7dc7e3984c81f2b706b078e5b3a0354d70e387b7df5df413ebf1c5fd6b60ba56b3cf202ca07b4c2e62733e522cfcfe23012216c0c092be5e1c6e7707 SHA512 6fd016811da2db42a7c7a418cc5c5807c84ac1b5b8a8f538c3810d1225d4a9de03a3c435b5f3b9dba7a7730a147b7efba8ca25a0d6e83818de877254e20eedea +EBUILD systemd-tmpfiles-248.3.ebuild 5458 BLAKE2B c72526bd3f6d1cacb5a6365e357cba731c99ce0123b946e9219f46c4dfcc87f840fa61d7f82b5c927d5a84b04448b4fcf7d5b392e0aa95e8fdd03203fd747480 SHA512 4871258fb38aba79ce92d44af7fc27b1d0b8371b29032b10c3dacc17378cf01c99e09d15ecbde4c6127befb68ac9e56af27e66d76cc3c225a3b309aff7ca3c4c MISC metadata.xml 251 BLAKE2B e9e9d48943645d8b737bc1f7ab0efb05db0f8eddad759c9bb40d07dc008fbfb8f5cca2020de71a9ff6945f5d66292ac02355773545010cd49c77fe6dd5ab7b40 SHA512 1b6a6955118c1a74cc89a77d6de9be8f4ff9c7137c186753462670a5b93457dfd034ad5d1f4d2507ac95cc149c2a042fa5324220b58702a56b09d91de40151c9 diff --git a/sys-apps/systemd-tmpfiles/systemd-tmpfiles-248.3.ebuild b/sys-apps/systemd-tmpfiles/systemd-tmpfiles-248.3.ebuild new file mode 100644 index 000000000000..1e8065ab5c17 --- /dev/null +++ b/sys-apps/systemd-tmpfiles/systemd-tmpfiles-248.3.ebuild @@ -0,0 +1,238 @@ +# Copyright 2020-2021 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +if [[ ${PV} == *.* ]]; then + MY_PN=systemd-stable +else + MY_PN=systemd +fi + +MINKV="3.11" +PYTHON_COMPAT=( python3_{8..10} ) +inherit flag-o-matic 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/${MY_PN}/archive/v${PV}.tar.gz -> ${MY_PN}-${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="~alpha ~amd64 ~arm ~arm64 ~hppa ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86" +IUSE="selinux 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= + selinux? ( sys-libs/libselinux:0= ) +" +RDEPEND="${DEPEND} + !sys-apps/opentmpfiles + !sys-apps/systemd +" + +BDEPEND=" + ${PYTHON_DEPS} + 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/gperf + >=dev-util/meson-0.46 + >=dev-util/intltool-0.50 + >=sys-apps/coreutils-8.16 + sys-devel/m4 + virtual/pkgconfig +" + +S="${WORKDIR}/${MY_PN}-${PV}" + +pkg_setup() { + python-any-r1_pkg_setup +} + +src_prepare() { + # musl patchset from: + # http://cgit.openembedded.org/openembedded-core/tree/meta/recipes-core/systemd/systemd + # check SRC_URI_MUSL in systemd_${PV}.bb file for exact list of musl patches + if use elibc_musl; then + einfo "applying musl patches and workarounds" + eapply "${WORKDIR}/${P}-musl" + + # avoids re-definition of struct ethhdr, also 0006-Include-netinet-if_ether.h.patch + append-cflags '-D__UAPI_DEF_ETHHDR=0' + + # src/basic/rlimit-util.c:46:19: error: format ‘%lu’ expects argument of type ‘long unsigned int’, + # but argument 9 has type ‘rlim_t’ {aka ‘long long unsigned int’} + # not a nice workaround, but it comes from debug messages and we don't really use this component. + append-cflags '-Wno-error=format' + fi + + default + + # https://bugs.gentoo.org/767403 + python_fix_shebang src/test/*.py + python_fix_shebang test/*.py + python_fix_shebang tools/*.py +} + +src_configure() { + # disable everything until configure says "enabled features: ACL, tmpfiles, standalone-binaries" + # and optionally selinux feature can be enabled to make tmpfiles secontext-aware + 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 + nscd + nss-myhostname + nss-resolve + nss-systemd + oomd + openssl + p11kit + pam + pcre2 + polkit + portabled + pstore + pwquality + randomseed + resolve + rfkill + seccomp + smack + sysext + 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_use selinux) + ) + meson_src_configure +} + +src_compile() { + # tmpfiles and sysusers can be built as standalone and 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 + "${EPYTHON}" test/test-systemd-tmpfiles.py \ + "${BUILD_DIR}"/systemd-tmpfiles.standalone || die "${FUNCNAME} failed" +} + +# stolen 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 "${EPREFIX}/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 +} |