public inbox for gentoo-portage-dev@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-portage-dev] [PATCH] QA-warn about systemd units using /etc/conf.d.
@ 2014-07-24 22:25 Michał Górny
  2014-08-11 21:04 ` Michał Górny
  0 siblings, 1 reply; 2+ messages in thread
From: Michał Górny @ 2014-07-24 22:25 UTC (permalink / raw
  To: gentoo-portage-dev; +Cc: Michał Górny

---
 bin/misc-functions.sh | 15 +++++++++++++++
 1 file changed, 15 insertions(+)

diff --git a/bin/misc-functions.sh b/bin/misc-functions.sh
index 5ccf7c2..f24e78c 100755
--- a/bin/misc-functions.sh
+++ b/bin/misc-functions.sh
@@ -595,6 +595,21 @@ install_qa_check() {
 		done
 	fi
 
+	# Common mistakes in systemd service files.
+	if type -P pkg-config >/dev/null && pkg-config --exists systemd; then
+		systemddir=$(pkg-config --variable=systemdsystemunitdir systemd)
+	else
+		systemddir=/usr/lib/systemd/system
+	fi
+	if [[ -d ${ED%/}${systemddir} ]]; then
+		f=$(grep -sH '^EnvironmentFile.*=.*/etc/conf\.d' "${ED%/}${systemddir}"/*.service)
+		if [[ -n ${f} ]] ; then
+			eqawarn "QA Notice: systemd units using /etc/conf.d detected:"
+			eqawarn "${f//${D}}"
+			eqawarn "See: https://wiki.gentoo.org/wiki/Project:Systemd/conf.d_files"
+		fi
+	fi
+
 	# Look for leaking LDFLAGS into pkg-config files
 	f=$(egrep -sH '^Libs.*-Wl,(-O[012]|--hash-style)' "${ED}"/usr/*/pkgconfig/*.pc)
 	if [[ -n ${f} ]] ; then
-- 
2.0.2



^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [gentoo-portage-dev] [PATCH] QA-warn about systemd units using /etc/conf.d.
  2014-07-24 22:25 [gentoo-portage-dev] [PATCH] QA-warn about systemd units using /etc/conf.d Michał Górny
@ 2014-08-11 21:04 ` Michał Górny
  0 siblings, 0 replies; 2+ messages in thread
From: Michał Górny @ 2014-08-11 21:04 UTC (permalink / raw
  To: gentoo-portage-dev

[-- Attachment #1: Type: text/plain, Size: 236 bytes --]

Dnia 2014-07-25, o godz. 00:25:38
Michał Górny <mgorny@gentoo.org> napisał(a):

> ---
>  bin/misc-functions.sh | 15 +++++++++++++++
>  1 file changed, 15 insertions(+)

This one's in git now.

-- 
Best regards,
Michał Górny

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 949 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2014-08-11 21:06 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-07-24 22:25 [gentoo-portage-dev] [PATCH] QA-warn about systemd units using /etc/conf.d Michał Górny
2014-08-11 21:04 ` 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