mirror of
https://github.com/flatcar/scripts.git
synced 2025-08-17 01:46:58 +02:00
Merge pull request #257 from flatcar-linux/krnowak/tmpfiles
Sync tmpfiles things with gentoo
This commit is contained in:
commit
5daae3252e
@ -2,9 +2,7 @@
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
|
||||
# Flatcar: this file is modified to still support old EAPIs and to
|
||||
# still provide the deprecated systemd_dotmpfilesd and
|
||||
# systemd_newtmpfilesd functions.
|
||||
# Flatcar: this file is modified to still support old EAPIs.
|
||||
|
||||
|
||||
# @ECLASS: systemd.eclass
|
||||
@ -263,48 +261,6 @@ systemd_install_serviced() {
|
||||
)
|
||||
}
|
||||
|
||||
# @FUNCTION: systemd_dotmpfilesd
|
||||
# @USAGE: <tmpfilesd>...
|
||||
# @DESCRIPTION:
|
||||
# Deprecated in favor of tmpfiles.eclass.
|
||||
#
|
||||
# Install systemd tmpfiles.d files. Uses doins, thus it is fatal
|
||||
# in EAPI 4 and non-fatal in earlier EAPIs.
|
||||
systemd_dotmpfilesd() {
|
||||
debug-print-function ${FUNCNAME} "${@}"
|
||||
|
||||
for f; do
|
||||
[[ ${f} == *.conf ]] \
|
||||
|| die 'tmpfiles.d files need to have .conf suffix.'
|
||||
done
|
||||
|
||||
(
|
||||
insopts -m 0644
|
||||
insinto /usr/lib/tmpfiles.d/
|
||||
doins "${@}"
|
||||
)
|
||||
}
|
||||
|
||||
# @FUNCTION: systemd_newtmpfilesd
|
||||
# @USAGE: <old-name> <new-name>.conf
|
||||
# @DESCRIPTION:
|
||||
# Deprecated in favor of tmpfiles.eclass.
|
||||
#
|
||||
# Install systemd tmpfiles.d file under a new name. Uses newins, thus it
|
||||
# is fatal in EAPI 4 and non-fatal in earlier EAPIs.
|
||||
systemd_newtmpfilesd() {
|
||||
debug-print-function ${FUNCNAME} "${@}"
|
||||
|
||||
[[ ${2} == *.conf ]] \
|
||||
|| die 'tmpfiles.d files need to have .conf suffix.'
|
||||
|
||||
(
|
||||
insopts -m 0644
|
||||
insinto /usr/lib/tmpfiles.d/
|
||||
newins "${@}"
|
||||
)
|
||||
}
|
||||
|
||||
# @FUNCTION: systemd_enable_service
|
||||
# @USAGE: <target> <service>
|
||||
# @DESCRIPTION:
|
||||
|
@ -1,4 +1,4 @@
|
||||
# Copyright 2016-2019 Gentoo Authors
|
||||
# Copyright 2016-2021 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
# @ECLASS: tmpfiles.eclass
|
||||
@ -60,10 +60,19 @@ case "${EAPI}" in
|
||||
*) die "API is undefined for EAPI ${EAPI}" ;;
|
||||
esac
|
||||
|
||||
RDEPEND="virtual/tmpfiles"
|
||||
# @ECLASS-VARIABLE: TMPFILES_OPTIONAL
|
||||
# @PRE_INHERIT
|
||||
# @DEFAULT_UNSET
|
||||
# @DESCRIPTION:
|
||||
# When not empty, disables the dependency on virtual/tmpfiles.
|
||||
# Ebuilds that call tmpfiles_process conditionally should declare a
|
||||
# conditional dependency themselves.
|
||||
if [[ -z ${TMPFILES_OPTIONAL} ]]; then
|
||||
RDEPEND="virtual/tmpfiles"
|
||||
fi
|
||||
|
||||
# @FUNCTION: dotmpfiles
|
||||
# @USAGE: dotmpfiles <tmpfiles.d_file> ...
|
||||
# @USAGE: <tmpfiles.d_file> ...
|
||||
# @DESCRIPTION:
|
||||
# Install one or more tmpfiles.d files into /usr/lib/tmpfiles.d.
|
||||
dotmpfiles() {
|
||||
@ -84,7 +93,7 @@ dotmpfiles() {
|
||||
}
|
||||
|
||||
# @FUNCTION: newtmpfiles
|
||||
# @USAGE: newtmpfiles <old-name> <new-name>.conf
|
||||
# @USAGE: <old-name> <new-name>.conf
|
||||
# @DESCRIPTION:
|
||||
# Install a tmpfiles.d file in /usr/lib/tmpfiles.d under a new name.
|
||||
newtmpfiles() {
|
||||
@ -102,7 +111,7 @@ newtmpfiles() {
|
||||
}
|
||||
|
||||
# @FUNCTION: tmpfiles_process
|
||||
# @USAGE: tmpfiles_process <filename> <filename> ...
|
||||
# @USAGE: <filename> <filename> ...
|
||||
# @DESCRIPTION:
|
||||
# Call a tmpfiles.d implementation to create new volatile and temporary
|
||||
# files and directories.
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -2,8 +2,7 @@
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
|
||||
# Flatcar: this file is modified to still support old EAPIs and to
|
||||
# still provide the deprecated systemd_dotmpfilesd functions.
|
||||
# Flatcar: this file is modified to still support old EAPIs.
|
||||
|
||||
|
||||
# @ECLASS: udev.eclass
|
||||
|
@ -1,8 +1,13 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
|
||||
<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
|
||||
<pkgmetadata>
|
||||
<maintainer type="person">
|
||||
<email>williamh@gentoo.org</email>
|
||||
<name>William Hubbs</name>
|
||||
</maintainer>
|
||||
<maintainer type="person">
|
||||
<email>gyakovlev@gentoo.org</email>
|
||||
<name>Georgy Yakovlev</name>
|
||||
</maintainer>
|
||||
<stabilize-allarches/>
|
||||
</pkgmetadata>
|
||||
|
17
sdk_container/src/third_party/portage-stable/virtual/tmpfiles/tmpfiles-0-r1.ebuild
vendored
Normal file
17
sdk_container/src/third_party/portage-stable/virtual/tmpfiles/tmpfiles-0-r1.ebuild
vendored
Normal file
@ -0,0 +1,17 @@
|
||||
# Copyright 1999-2021 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=7
|
||||
|
||||
DESCRIPTION="Virtual to select between different tmpfiles.d handlers"
|
||||
SLOT="0"
|
||||
KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
|
||||
|
||||
RDEPEND="
|
||||
!prefix-guest? (
|
||||
|| (
|
||||
sys-apps/systemd-tmpfiles
|
||||
sys-apps/opentmpfiles
|
||||
sys-apps/systemd
|
||||
)
|
||||
)"
|
@ -1,14 +0,0 @@
|
||||
# Copyright 1999-2018 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=6
|
||||
|
||||
DESCRIPTION="Virtual to select between different tmpfiles.d handlers"
|
||||
SLOT="0"
|
||||
KEYWORDS="alpha amd64 arm arm64 hppa ia64 m68k ~mips ppc ppc64 s390 sh sparc x86 ~x64-cygwin ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
|
||||
|
||||
RDEPEND="
|
||||
|| (
|
||||
sys-apps/opentmpfiles
|
||||
sys-apps/systemd
|
||||
)"
|
Loading…
Reference in New Issue
Block a user