diff options
author | Yixun Lan <dlan@gentoo.org> | 2016-11-04 10:54:49 +0800 |
---|---|---|
committer | Yixun Lan <dlan@gentoo.org> | 2016-11-04 11:02:29 +0800 |
commit | 8651869c1abe8dc845ca153d3e779ab3892aa27c (patch) | |
tree | 89006087d4890a98e35cd5bc6c73af05969830f6 /sys-apps | |
parent | 3ff4e1ed71bc926898fa1f9eb09bf4f2a5ad2525 (diff) | |
download | gentoo-8651869c1abe8dc845ca153d3e779ab3892aa27c.tar.gz gentoo-8651869c1abe8dc845ca153d3e779ab3892aa27c.tar.xz |
sys-apps/tuned: fix wrong systemd path if rpm installed
Gentoo-Bug: 563396
Package-Manager: portage-2.3.2
Diffstat (limited to 'sys-apps')
-rw-r--r-- | sys-apps/tuned/files/tuned-2.7.1-makefile-rpm.patch | 19 | ||||
-rw-r--r-- | sys-apps/tuned/files/tuned-2.7.1-makefile.patch | 15 | ||||
-rw-r--r-- | sys-apps/tuned/tuned-2.7.1-r2.ebuild | 2 |
3 files changed, 20 insertions, 16 deletions
diff --git a/sys-apps/tuned/files/tuned-2.7.1-makefile-rpm.patch b/sys-apps/tuned/files/tuned-2.7.1-makefile-rpm.patch new file mode 100644 index 00000000000..408ef2b73c3 --- /dev/null +++ b/sys-apps/tuned/files/tuned-2.7.1-makefile-rpm.patch @@ -0,0 +1,19 @@ +diff --git a/Makefile b/Makefile +index df2a139..6200cae 100644 +--- a/Makefile ++++ b/Makefile +@@ -19,8 +19,12 @@ else + GIT_PSUFFIX = .$(GIT_SUFFIX) + RPM_VERSION = $(NAME)-$(VERSION)-1$(GIT_PSUFFIX) + endif +-UNITDIR = $(shell rpm --eval '%{_unitdir}' 2>/dev/null || echo /usr/lib/systemd/system) +-TMPFILESDIR = $(shell rpm --eval '%{_tmpfilesdir}' 2>/dev/null || echo /usr/lib/tmpfiles.d) ++UNITDIR_FALLBACK = /usr/lib/systemd/system ++UNITDIR_DETECT = $(shell rpm --eval '%{_unitdir}' 2>/dev/null || echo $(UNITDIR_FALLBACK)) ++UNITDIR = $(UNITDIR_DETECT:%{_unitdir}=$(UNITDIR_FALLBACK)) ++TMPFILESDIR_FALLBACK = /usr/lib/tmpfiles.d ++TMPFILESDIR_DETECT = $(shell rpm --eval '%{_tmpfilesdir}' 2>/dev/null || echo $(TMPFILESDIR_FALLBACK)) ++TMPFILESDIR = $(TMPFILESDIR_DETECT:%{_tmpfilesdir}=$(TMPFILESDIR_FALLBACK)) + VERSIONED_NAME = $(NAME)-$(VERSION)$(GIT_PSUFFIX) + + DATADIR = /usr/share diff --git a/sys-apps/tuned/files/tuned-2.7.1-makefile.patch b/sys-apps/tuned/files/tuned-2.7.1-makefile.patch deleted file mode 100644 index 54e89a11b69..00000000000 --- a/sys-apps/tuned/files/tuned-2.7.1-makefile.patch +++ /dev/null @@ -1,15 +0,0 @@ -diff --git a/Makefile b/Makefile -index 9e2d8fe..6de30d0 100644 ---- a/Makefile -+++ b/Makefile -@@ -19,8 +19,8 @@ else - GIT_PSUFFIX = .$(GIT_SUFFIX) - RPM_VERSION = $(NAME)-$(VERSION)-1$(GIT_PSUFFIX) - endif --UNITDIR = $(shell rpm --eval '%{_unitdir}' 2>/dev/null || echo /usr/lib/systemd/system) --TMPFILESDIR = $(shell rpm --eval '%{_tmpfilesdir}' 2>/dev/null || echo /usr/lib/tmpfiles.d) -+UNITDIR = $(shell if which rpm > /dev/null 2>&1; then rpm --eval '%{_unitdir}' 2>/dev/null; else echo /usr/lib/systemd/system; fi) -+TMPFILESDIR = $(shell if which rpm > /dev/null 2>&1; then rpm --eval '%{_tmpfilesdir}' 2>/dev/null; else echo /usr/lib/tmpfiles.d; fi) - VERSIONED_NAME = $(NAME)-$(VERSION)$(GIT_PSUFFIX) - - DATADIR = /usr/share diff --git a/sys-apps/tuned/tuned-2.7.1-r2.ebuild b/sys-apps/tuned/tuned-2.7.1-r2.ebuild index 6c58913ae03..eed443e0170 100644 --- a/sys-apps/tuned/tuned-2.7.1-r2.ebuild +++ b/sys-apps/tuned/tuned-2.7.1-r2.ebuild @@ -37,7 +37,7 @@ REQUIRED_USE="${PYTHON_REQUIRED_USE}" src_prepare() { epatch "${FILESDIR}"/${P}-sysctl.patch - epatch "${FILESDIR}"/${P}-makefile.patch + epatch "${FILESDIR}"/${P}-makefile-rpm.patch sed -i \ -e "/\$(DESTDIR)\/run\/tuned/d" \ |