aboutsummaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorMichał Górny <mgorny@gentoo.org>2014-07-24 10:03:52 +0200
committerMichał Górny <mgorny@gentoo.org>2014-08-11 22:44:10 +0200
commit852f5b5d7f2dd138a1d1b5dfa92b12bba51cf0a4 (patch)
treea0d1a458360773c12da20b12353511f8accf39af /bin
parentQA: Use pngfix to find broken PNG files (diff)
downloadportage-852f5b5d7f2dd138a1d1b5dfa92b12bba51cf0a4.tar.gz
portage-852f5b5d7f2dd138a1d1b5dfa92b12bba51cf0a4.tar.bz2
portage-852f5b5d7f2dd138a1d1b5dfa92b12bba51cf0a4.zip
QA: Warn when systemd units use /etc/conf.d
Acked-by: Alexander Berntsen <bernalex@gentoo.org> Acked-by: Brian Dolbec <dolsen@gentoo.org> Reviewed-by: Anthony G. Basile <blueness@gentoo.org>
Diffstat (limited to 'bin')
-rwxr-xr-xbin/misc-functions.sh15
1 files changed, 15 insertions, 0 deletions
diff --git a/bin/misc-functions.sh b/bin/misc-functions.sh
index 4e0f1fcb2..961738f6b 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