[iwhd/f17] work around systemd F16/F17 unitdir difference

Jim Meyering meyering at fedoraproject.org
Tue Mar 6 14:50:20 UTC 2012


commit cbfd92b8cf6b48204c2b51e2f05b66bcb8fdc959
Author: Jim Meyering <meyering at redhat.com>
Date:   Tue Mar 6 15:49:58 2012 +0100

    work around systemd F16/F17 unitdir difference

 .gitignore               |    1 +
 iwhd.spec                |    3 +++
 sources                  |    2 +-
 systemd-f16-vs-f17.patch |   21 +++++++++++++++++++++
 4 files changed, 26 insertions(+), 1 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index 90141e6..33c5ce8 100644
--- a/.gitignore
+++ b/.gitignore
@@ -2,3 +2,4 @@
 /iwhd-0.990.tar.xz
 /iwhd-1.0.tar.xz
 /iwhd-1.1.tar.xz
+/iwhd-1.4.tar.xz
diff --git a/iwhd.spec b/iwhd.spec
index 695d074..4117529 100644
--- a/iwhd.spec
+++ b/iwhd.spec
@@ -12,6 +12,7 @@ ExcludeArch: ppc ppc64 s390 s390x
 
 Source0: http://people.redhat.com/meyering/iwhd/%{name}-%{version}.tar.xz
 Patch1: iwhd-1.0-debug.patch
+Patch2: systemd-f16-vs-f17.patch
 
 BuildRequires: boost-devel
 BuildRequires: boost-filesystem
@@ -45,6 +46,7 @@ The image-warehouse daemon for Aeolus
 %prep
 %setup -q
 %patch1 -p1
+%patch2 -p1
 
 %build
 %configure
@@ -84,6 +86,7 @@ rm -rf %{buildroot}
 %changelog
 * Mon Mar  5 2012 Jim Meyering <meyering at redhat.com> - 1.4-1
 - use just-released upstream iwhd-1.4, but disable the pesky t/auto test
+- also add systemd-f16-vs-f17.patch
 
 * Fri Jan 13 2012 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 1.1-2
 - Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
diff --git a/sources b/sources
index f18ec19..9163ab4 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-c449a9eed2bfd614a52f4431733f40ae  iwhd-1.1.tar.xz
+d196ff41735d8b764cf208e40e6dd875  iwhd-1.4.tar.xz
diff --git a/systemd-f16-vs-f17.patch b/systemd-f16-vs-f17.patch
new file mode 100644
index 0000000..4dca536
--- /dev/null
+++ b/systemd-f16-vs-f17.patch
@@ -0,0 +1,21 @@
+Based on upstream commit:
+  http://thread.gmane.org/gmane.comp.lib.iwhd.devel/1102
+
+--- a/Makefile.in~	2012-03-05 16:35:13.000000000 +0100
++++ b/Makefile.in	2012-03-05 22:45:23.994626384 +0100
+@@ -1206,8 +1206,14 @@ VERSION_no_hyphen = $$(echo $(VERSION)|t
+ DEFAULT_FS_DIR = $(localstatedir)/lib/iwhd
+ DISTCLEANFILES = iwhd.init iwhd-conf.js iwhd-users.js
+ 
++# F16's unitdir is /lib/systemd/system, in spite of $(prefix), but
++# on F17 it is /usr/lib/systemd/system
++# Account for that by testing rpm --eval '%{_unitdir}'.
++# When that evaluates to "/lib/systemd/system", ignore a prefix of "/usr".
+ # Honor $(prefix) in the expansion of $(unitdir), except when it is "/usr".
+-p = $$(echo '$(prefix)' | sed 's,^/usr$$,,')
++p = $$(case $$(rpm --eval '%{_unitdir}'):$(prefix) in \
++       /lib/systemd/system:/usr) ;; *) echo '$(prefix)';; esac)
++
+ unitdir = $(DESTDIR)$(p)/lib/systemd/system
+ logrotate_dir = $(DESTDIR)$(sysconfdir)/logrotate.d
+ AM_CPPFLAGS = $(HAIL_CFLAGS) -Ilib -I$(top_srcdir)/lib


More information about the scm-commits mailing list