Gentoo Archives: gentoo-portage-dev

From: "Michał Górny" <mgorny@g.o>
To: gentoo-portage-dev@l.g.o
Cc: "Michał Górny" <mgorny@g.o>
Subject: [gentoo-portage-dev] [PATCH] QA-warn about systemd units using /etc/conf.d.
Date: Thu, 24 Jul 2014 22:25:47
Message-Id: 1406240738-4586-1-git-send-email-mgorny@gentoo.org
1 ---
2 bin/misc-functions.sh | 15 +++++++++++++++
3 1 file changed, 15 insertions(+)
4
5 diff --git a/bin/misc-functions.sh b/bin/misc-functions.sh
6 index 5ccf7c2..f24e78c 100755
7 --- a/bin/misc-functions.sh
8 +++ b/bin/misc-functions.sh
9 @@ -595,6 +595,21 @@ install_qa_check() {
10 done
11 fi
12
13 + # Common mistakes in systemd service files.
14 + if type -P pkg-config >/dev/null && pkg-config --exists systemd; then
15 + systemddir=$(pkg-config --variable=systemdsystemunitdir systemd)
16 + else
17 + systemddir=/usr/lib/systemd/system
18 + fi
19 + if [[ -d ${ED%/}${systemddir} ]]; then
20 + f=$(grep -sH '^EnvironmentFile.*=.*/etc/conf\.d' "${ED%/}${systemddir}"/*.service)
21 + if [[ -n ${f} ]] ; then
22 + eqawarn "QA Notice: systemd units using /etc/conf.d detected:"
23 + eqawarn "${f//${D}}"
24 + eqawarn "See: https://wiki.gentoo.org/wiki/Project:Systemd/conf.d_files"
25 + fi
26 + fi
27 +
28 # Look for leaking LDFLAGS into pkg-config files
29 f=$(egrep -sH '^Libs.*-Wl,(-O[012]|--hash-style)' "${ED}"/usr/*/pkgconfig/*.pc)
30 if [[ -n ${f} ]] ; then
31 --
32 2.0.2

Replies