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 |