* [gentoo-dev] [PATCH systemd.eclass 1/3] Add systemd_newtmpfilesd().
@ 2012-08-20 22:24 Michał Górny
2012-08-20 22:24 ` [gentoo-dev] [PATCH systemd.eclass 2/3] tmpfiles.d: check for .conf suffix when installing Michał Górny
2012-08-20 22:24 ` [gentoo-dev] [PATCH systemd.eclass 3/3] Drop blockers for ancient systemd versions Michał Górny
0 siblings, 2 replies; 3+ messages in thread
From: Michał Górny @ 2012-08-20 22:24 UTC (permalink / raw
To: gentoo-dev; +Cc: Michał Górny
In pair with systemd_dotmpfilesd(), they will be the canonical functions
to install tmpfiles.d files.
I've talked with Sergei and we agreed to not move the functions around
but leave systemd.eclass as the canonical source of locations for
systemd-related files. The eclass will not introduce any dependencies or
other side effects.
Uses inline ( insinto; newins ) because of Diego's disapproval of
newinto function into eutils. Feel free to fix it as soon as we get such
a thing into EAPI and remove all EAPIs up to 4.
---
gx86/eclass/systemd.eclass | 14 ++++++++++++++
1 file changed, 14 insertions(+)
diff --git a/gx86/eclass/systemd.eclass b/gx86/eclass/systemd.eclass
index 1ddc9b0..4066e31 100644
--- a/gx86/eclass/systemd.eclass
+++ b/gx86/eclass/systemd.eclass
@@ -95,6 +95,20 @@ systemd_dotmpfilesd() {
)
}
+# @FUNCTION: systemd_newtmpfilesd
+# @USAGE: oldname newname.conf
+# @DESCRIPTION:
+# 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} "${@}"
+
+ (
+ insinto /usr/lib/tmpfiles.d/
+ newins "${@}"
+ )
+}
+
# @FUNCTION: systemd_enable_service
# @USAGE: target service
# @DESCRIPTION:
--
1.7.11.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [gentoo-dev] [PATCH systemd.eclass 2/3] tmpfiles.d: check for .conf suffix when installing.
2012-08-20 22:24 [gentoo-dev] [PATCH systemd.eclass 1/3] Add systemd_newtmpfilesd() Michał Górny
@ 2012-08-20 22:24 ` Michał Górny
2012-08-20 22:24 ` [gentoo-dev] [PATCH systemd.eclass 3/3] Drop blockers for ancient systemd versions Michał Górny
1 sibling, 0 replies; 3+ messages in thread
From: Michał Górny @ 2012-08-20 22:24 UTC (permalink / raw
To: gentoo-dev; +Cc: Michał Górny
This could help a few users avoid debugging why the rules don't work for
them.
---
gx86/eclass/systemd.eclass | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/gx86/eclass/systemd.eclass b/gx86/eclass/systemd.eclass
index 4066e31..1ccaadc 100644
--- a/gx86/eclass/systemd.eclass
+++ b/gx86/eclass/systemd.eclass
@@ -89,6 +89,11 @@ systemd_newunit() {
systemd_dotmpfilesd() {
debug-print-function ${FUNCNAME} "${@}"
+ for f; do
+ [[ ${f} == *.conf ]] \
+ || die 'tmpfiles.d files need to have .conf suffix.'
+ done
+
(
insinto /usr/lib/tmpfiles.d/
doins "${@}"
@@ -103,6 +108,9 @@ systemd_dotmpfilesd() {
systemd_newtmpfilesd() {
debug-print-function ${FUNCNAME} "${@}"
+ [[ ${2} == *.conf ]] \
+ || die 'tmpfiles.d files need to have .conf suffix.'
+
(
insinto /usr/lib/tmpfiles.d/
newins "${@}"
--
1.7.11.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [gentoo-dev] [PATCH systemd.eclass 3/3] Drop blockers for ancient systemd versions.
2012-08-20 22:24 [gentoo-dev] [PATCH systemd.eclass 1/3] Add systemd_newtmpfilesd() Michał Górny
2012-08-20 22:24 ` [gentoo-dev] [PATCH systemd.eclass 2/3] tmpfiles.d: check for .conf suffix when installing Michał Górny
@ 2012-08-20 22:24 ` Michał Górny
1 sibling, 0 replies; 3+ messages in thread
From: Michał Górny @ 2012-08-20 22:24 UTC (permalink / raw
To: gentoo-dev; +Cc: Michał Górny
The current systemd versions don't provide the mentioned feature
anymore, so there's no point in blocking those who didn't as well.
---
gx86/eclass/systemd.eclass | 4 ----
1 file changed, 4 deletions(-)
diff --git a/gx86/eclass/systemd.eclass b/gx86/eclass/systemd.eclass
index 1ccaadc..09275dc 100644
--- a/gx86/eclass/systemd.eclass
+++ b/gx86/eclass/systemd.eclass
@@ -30,10 +30,6 @@ case ${EAPI:-0} in
*) die "${ECLASS}.eclass API in EAPI ${EAPI} not yet established."
esac
-# Block systemd version without the migration helper.
-DEPEND="!<sys-apps/systemd-29-r4
- !=sys-apps/systemd-37-r1"
-
# @FUNCTION: _systemd_get_unitdir
# @INTERNAL
# @DESCRIPTION:
--
1.7.11.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
end of thread, other threads:[~2012-08-20 22:26 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-08-20 22:24 [gentoo-dev] [PATCH systemd.eclass 1/3] Add systemd_newtmpfilesd() Michał Górny
2012-08-20 22:24 ` [gentoo-dev] [PATCH systemd.eclass 2/3] tmpfiles.d: check for .conf suffix when installing Michał Górny
2012-08-20 22:24 ` [gentoo-dev] [PATCH systemd.eclass 3/3] Drop blockers for ancient systemd versions Michał Górny
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox