public inbox for gentoo-dev@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Michał Górny" <mgorny@gentoo.org>
To: gentoo-dev@lists.gentoo.org
Cc: "Michał Górny" <mgorny@gentoo.org>
Subject: [gentoo-dev] [PATCH v2 6/8] systemd.eclass: Sanitize insopts
Date: Fri,  8 Jun 2018 14:00:25 +0200	[thread overview]
Message-ID: <20180608120027.8976-6-mgorny@gentoo.org> (raw)
In-Reply-To: <20180608120027.8976-1-mgorny@gentoo.org>

Sanitize insopts when calling doins, in order to avoid prior insopts
calls accidentally affecting do*/new* functions defined by the eclass.
---
 eclass/systemd.eclass | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/eclass/systemd.eclass b/eclass/systemd.eclass
index 6dda4353064a..72f4845efc45 100644
--- a/eclass/systemd.eclass
+++ b/eclass/systemd.eclass
@@ -151,6 +151,7 @@ systemd_dounit() {
 	debug-print-function ${FUNCNAME} "${@}"
 
 	(
+		insopts -m 0644
 		insinto "$(_systemd_get_systemunitdir)"
 		doins "${@}"
 	)
@@ -165,6 +166,7 @@ systemd_newunit() {
 	debug-print-function ${FUNCNAME} "${@}"
 
 	(
+		insopts -m 0644
 		insinto "$(_systemd_get_systemunitdir)"
 		newins "${@}"
 	)
@@ -179,6 +181,7 @@ systemd_douserunit() {
 	debug-print-function ${FUNCNAME} "${@}"
 
 	(
+		insopts -m 0644
 		insinto "$(_systemd_get_userunitdir)"
 		doins "${@}"
 	)
@@ -193,6 +196,7 @@ systemd_newuserunit() {
 	debug-print-function ${FUNCNAME} "${@}"
 
 	(
+		insopts -m 0644
 		insinto "$(_systemd_get_userunitdir)"
 		newins "${@}"
 	)
@@ -222,6 +226,7 @@ systemd_install_serviced() {
 	[[ ${service} == *.d ]] && die "Service must not have .d suffix"
 
 	(
+		insopts -m 0644
 		insinto /etc/systemd/system/"${service}".d
 		newins "${src}" 00gentoo.conf
 	)
@@ -241,6 +246,7 @@ systemd_dotmpfilesd() {
 	done
 
 	(
+		insopts -m 0644
 		insinto /usr/lib/tmpfiles.d/
 		doins "${@}"
 	)
@@ -258,6 +264,7 @@ systemd_newtmpfilesd() {
 		|| die 'tmpfiles.d files need to have .conf suffix.'
 
 	(
+		insopts -m 0644
 		insinto /usr/lib/tmpfiles.d/
 		newins "${@}"
 	)
@@ -320,6 +327,7 @@ systemd_enable_ntpunit() {
 	done
 
 	(
+		insopts -m 0644
 		insinto "$(_systemd_get_utildir)"/ntp-units.d
 		doins "${T}"/${ntpunit_name}.list
 	)
-- 
2.18.0.rc1



  parent reply	other threads:[~2018-06-08 12:03 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-06-08 12:00 [gentoo-dev] [PATCH v2 1/8] bash-completion-r1.eclass: Sanitize insopts Michał Górny
2018-06-08 12:00 ` [gentoo-dev] [PATCH v2 2/8] desktop.eclass: " Michał Górny
2018-06-08 12:00 ` [gentoo-dev] [PATCH v2 3/8] eutils.eclass: Sanitize exeopts Michał Górny
2018-06-08 12:00 ` [gentoo-dev] [PATCH v2 4/8] python-r1.eclass: " Michał Górny
2018-06-08 12:00 ` [gentoo-dev] [PATCH v2 5/8] python-utils-r1.eclass: Sanitize insopts/exeopts Michał Górny
2018-06-08 12:00 ` Michał Górny [this message]
2018-06-08 12:00 ` [gentoo-dev] [PATCH v2 7/8] tmpfiles.eclass: Sanitize insopts Michał Górny
2018-06-08 12:00 ` [gentoo-dev] [PATCH v2 8/8] udev.eclass: " Michał Górny

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=20180608120027.8976-6-mgorny@gentoo.org \
    --to=mgorny@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