[iwhd] work around systemd F16/F17 unitdir difference

Jim Meyering meyering at fedoraproject.org
Tue Mar 6 15:51:14 UTC 2012


commit f1cfab914e868e8e18cb1eea99c24b65c1c04f1f
Author: Jim Meyering <meyering at redhat.com>
Date:   Tue Mar 6 16:15:05 2012 +0100

    work around systemd F16/F17 unitdir difference

 iwhd.spec                |    3 +++
 systemd-f16-vs-f17.patch |   21 +++++++++++++++++++++
 2 files changed, 24 insertions(+), 0 deletions(-)
---
diff --git a/iwhd.spec b/iwhd.spec
index 774bc78..12e0826 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
 * Tue Mar  6 2012 Jim Meyering <meyering at redhat.com> - 1.4-1
 - use just-released upstream iwhd-1.4
+- 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/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