summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2013-09-11 23:37:57 +0200
committerLudovic Courtès <ludo@gnu.org>2013-09-11 23:37:57 +0200
commit8eaa8a3bf048997288633191a278028a65d78ae3 (patch)
tree470c24447b4b15407aafc6be17eb2b2f4a4a140d
parent0ded70f37d47579ca058f2f4ca27335129a96e25 (diff)
gnu: avahi, dbus: Use /var as $localstatedir.
* gnu/packages/avahi.scm (avahi): Pass '--localstatedir'; add 'patch/localstatedir'. * gnu/packages/glib.scm (dbus): Pass '--localstatedir' and '--with-session-socket-dir'; add 'patch/localstatedir'. * gnu/packages/patches/avahi-localstatedir.patch, gnu/packages/patches/dbus-localstatedir.patch: New files. * gnu-system.am (dist_patch_DATA): Add them.
-rw-r--r--gnu-system.am2
-rw-r--r--gnu/packages/avahi.scm10
-rw-r--r--gnu/packages/glib.scm14
-rw-r--r--gnu/packages/patches/avahi-localstatedir.patch12
-rw-r--r--gnu/packages/patches/dbus-localstatedir.patch30
5 files changed, 65 insertions, 3 deletions
diff --git a/gnu-system.am b/gnu-system.am
index d88f6bf4e84..871254624a5 100644
--- a/gnu-system.am
+++ b/gnu-system.am
@@ -189,11 +189,13 @@ patchdir = $(guilemoduledir)/gnu/packages/patches
189dist_patch_DATA = \ 189dist_patch_DATA = \
190 gnu/packages/patches/apr-skip-getservbyname-test.patch \ 190 gnu/packages/patches/apr-skip-getservbyname-test.patch \
191 gnu/packages/patches/automake-skip-amhello-tests.patch \ 191 gnu/packages/patches/automake-skip-amhello-tests.patch \
192 gnu/packages/patches/avahi-localstatedir.patch \
192 gnu/packages/patches/bigloo-gc-shebangs.patch \ 193 gnu/packages/patches/bigloo-gc-shebangs.patch \
193 gnu/packages/patches/binutils-ld-new-dtags.patch \ 194 gnu/packages/patches/binutils-ld-new-dtags.patch \
194 gnu/packages/patches/cdparanoia-fpic.patch \ 195 gnu/packages/patches/cdparanoia-fpic.patch \
195 gnu/packages/patches/cmake-fix-tests.patch \ 196 gnu/packages/patches/cmake-fix-tests.patch \
196 gnu/packages/patches/cpio-gets-undeclared.patch \ 197 gnu/packages/patches/cpio-gets-undeclared.patch \
198 gnu/packages/patches/dbus-localstatedir.patch \
197 gnu/packages/patches/diffutils-gets-undeclared.patch \ 199 gnu/packages/patches/diffutils-gets-undeclared.patch \
198 gnu/packages/patches/emacs-configure-sh.patch \ 200 gnu/packages/patches/emacs-configure-sh.patch \
199 gnu/packages/patches/findutils-absolute-paths.patch \ 201 gnu/packages/patches/findutils-absolute-paths.patch \
diff --git a/gnu/packages/avahi.scm b/gnu/packages/avahi.scm
index fbdc0e2834e..14073b32a0f 100644
--- a/gnu/packages/avahi.scm
+++ b/gnu/packages/avahi.scm
@@ -21,6 +21,7 @@
21 #:use-module (guix packages) 21 #:use-module (guix packages)
22 #:use-module (guix download) 22 #:use-module (guix download)
23 #:use-module (guix build-system gnu) 23 #:use-module (guix build-system gnu)
24 #:use-module (gnu packages)
24 #:use-module (gnu packages gdbm) 25 #:use-module (gnu packages gdbm)
25 #:use-module (gnu packages libdaemon) 26 #:use-module (gnu packages libdaemon)
26 #:use-module (gnu packages pkg-config) 27 #:use-module (gnu packages pkg-config)
@@ -42,13 +43,15 @@
42 (build-system gnu-build-system) 43 (build-system gnu-build-system)
43 (arguments 44 (arguments
44 '(#:configure-flags '("--with-distro=none" 45 '(#:configure-flags '("--with-distro=none"
46 "--localstatedir=/var" ; for the DBus socket
45 "--disable-python" 47 "--disable-python"
46 "--disable-mono" 48 "--disable-mono"
47 "--disable-doxygen-doc" 49 "--disable-doxygen-doc"
48 "--disable-xmltoman" 50 "--disable-xmltoman"
49 "--enable-tests" 51 "--enable-tests"
50 "--disable-qt3" "--disable-qt4" 52 "--disable-qt3" "--disable-qt4"
51 "--disable-gtk" "--disable-gtk3"))) 53 "--disable-gtk" "--disable-gtk3")
54 #:patches (list (assoc-ref %build-inputs "patch/localstatedir"))))
52 (inputs 55 (inputs
53 `(("expat" ,expat) 56 `(("expat" ,expat)
54 ("glib" ,glib) 57 ("glib" ,glib)
@@ -56,7 +59,10 @@
56 ("libdaemon" ,libdaemon) 59 ("libdaemon" ,libdaemon)
57 ("intltool" ,intltool) 60 ("intltool" ,intltool)
58 ("pkg-config" ,pkg-config) 61 ("pkg-config" ,pkg-config)
59 ("gdbm" ,gdbm))) 62 ("gdbm" ,gdbm)
63
64 ("patch/localstatedir"
65 ,(search-patch "avahi-localstatedir.patch"))))
60 (synopsis "Avahi, an mDNS/DNS-SD implementation") 66 (synopsis "Avahi, an mDNS/DNS-SD implementation")
61 (description 67 (description
62 "Avahi is a system which facilitates service discovery on a local 68 "Avahi is a system which facilitates service discovery on a local
diff --git a/gnu/packages/glib.scm b/gnu/packages/glib.scm
index fee834f9f9f..dd4c036e4b4 100644
--- a/gnu/packages/glib.scm
+++ b/gnu/packages/glib.scm
@@ -50,9 +50,21 @@
50 (base32 50 (base32
51 "1wacqyfkcpayg7f8rvx9awqg275n5pksxq5q7y21lxjx85x6pfjz")))) 51 "1wacqyfkcpayg7f8rvx9awqg275n5pksxq5q7y21lxjx85x6pfjz"))))
52 (build-system gnu-build-system) 52 (build-system gnu-build-system)
53 (arguments
54 '(#:configure-flags (list ;; Install the system bus socket under /var.
55 "--localstatedir=/var"
56
57 ;; XXX: Fix the following to allow system-wide
58 ;; config.
59 ;; "--sysconfdir=/etc"
60
61 "--with-session-socket-dir=/tmp")
62 #:patches (list (assoc-ref %build-inputs "patch/localstatedir"))))
53 (inputs 63 (inputs
54 `(("expat" ,expat) 64 `(("expat" ,expat)
55 ("pkg-config" ,pkg-config))) 65 ("pkg-config" ,pkg-config)
66 ("patch/localstatedir"
67 ,(search-patch "dbus-localstatedir.patch"))))
56 (home-page "http://dbus.freedesktop.org/") 68 (home-page "http://dbus.freedesktop.org/")
57 (synopsis "Message bus for inter-process communication (IPC)") 69 (synopsis "Message bus for inter-process communication (IPC)")
58 (description 70 (description
diff --git a/gnu/packages/patches/avahi-localstatedir.patch b/gnu/packages/patches/avahi-localstatedir.patch
new file mode 100644
index 00000000000..76377d10570
--- /dev/null
+++ b/gnu/packages/patches/avahi-localstatedir.patch
@@ -0,0 +1,12 @@
1Don't "mkdir $(localstatedir)" since we can't do it (/var).
2
3--- avahi-0.6.27/avahi-daemon/Makefile.in 2010-07-13 05:06:35.000000000 +0200
4+++ avahi-0.6.27/avahi-daemon/Makefile.in 2010-07-13 18:03:45.000000000 +0200
5@@ -1554,7 +1554,6 @@ xmllint:
6 done
7
8 install-data-local:
9- test -z "$(localstatedir)/run" || $(mkdir_p) "$(DESTDIR)$(localstatedir)/run"
10
11 update-systemd:
12 curl http://cgit.freedesktop.org/systemd/plain/src/sd-daemon.c > sd-daemon.c
diff --git a/gnu/packages/patches/dbus-localstatedir.patch b/gnu/packages/patches/dbus-localstatedir.patch
new file mode 100644
index 00000000000..61bed91b5c8
--- /dev/null
+++ b/gnu/packages/patches/dbus-localstatedir.patch
@@ -0,0 +1,30 @@
1Do not try to create $localstatedir and $sysconfdir since we cannot do this
2when they are /var and /etc.
3
4--- dbus-1.6.4/bus/Makefile.in 2013-09-11 16:15:13.000000000 +0200
5+++ dbus-1.6.4/bus/Makefile.in 2013-09-11 16:15:15.000000000 +0200
6@@ -1510,9 +1510,6 @@ clean-local:
7 /bin/rm *.bb *.bbg *.da *.gcov || true
8
9 install-data-hook:
10- $(mkinstalldirs) $(DESTDIR)$(localstatedir)/run/dbus
11- $(mkinstalldirs) $(DESTDIR)$(configdir)/system.d
12- $(mkinstalldirs) $(DESTDIR)$(configdir)/session.d
13 $(mkinstalldirs) $(DESTDIR)$(datadir)/dbus-1/services
14 $(mkinstalldirs) $(DESTDIR)$(datadir)/dbus-1/system-services
15 # Install dbus.socket as default implementation of a D-Bus stack.
16
17--- dbus-1.6.4/tools/Makefile.in 2013-09-11 16:10:31.000000000 +0200
18+++ dbus-1.6.4/tools/Makefile.in 2013-09-11 16:10:32.000000000 +0200
19@@ -757,11 +757,6 @@ uninstall-am: uninstall-binPROGRAMS
20
21
22 # create the /var/lib/dbus directory for dbus-uuidgen
23-install-data-local:
24- $(MKDIR_P) $(DESTDIR)$(localstatedir)/lib/dbus
25-
26-installcheck-local:
27- test -d $(DESTDIR)$(localstatedir)/lib/dbus
28
29 # Tell versions [3.59,3.63) of GNU make to not export all variables.
30 # Otherwise a system limit (for SysV at least) may be exceeded.