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.
This commit is contained in:
Ludovic Courtès 2013-09-11 23:37:57 +02:00
parent 0ded70f37d
commit 8eaa8a3bf0
5 changed files with 65 additions and 3 deletions

View File

@ -189,11 +189,13 @@ patchdir = $(guilemoduledir)/gnu/packages/patches
dist_patch_DATA = \
gnu/packages/patches/apr-skip-getservbyname-test.patch \
gnu/packages/patches/automake-skip-amhello-tests.patch \
gnu/packages/patches/avahi-localstatedir.patch \
gnu/packages/patches/bigloo-gc-shebangs.patch \
gnu/packages/patches/binutils-ld-new-dtags.patch \
gnu/packages/patches/cdparanoia-fpic.patch \
gnu/packages/patches/cmake-fix-tests.patch \
gnu/packages/patches/cpio-gets-undeclared.patch \
gnu/packages/patches/dbus-localstatedir.patch \
gnu/packages/patches/diffutils-gets-undeclared.patch \
gnu/packages/patches/emacs-configure-sh.patch \
gnu/packages/patches/findutils-absolute-paths.patch \

View File

@ -21,6 +21,7 @@
#:use-module (guix packages)
#:use-module (guix download)
#:use-module (guix build-system gnu)
#:use-module (gnu packages)
#:use-module (gnu packages gdbm)
#:use-module (gnu packages libdaemon)
#:use-module (gnu packages pkg-config)
@ -42,13 +43,15 @@
(build-system gnu-build-system)
(arguments
'(#:configure-flags '("--with-distro=none"
"--localstatedir=/var" ; for the DBus socket
"--disable-python"
"--disable-mono"
"--disable-doxygen-doc"
"--disable-xmltoman"
"--enable-tests"
"--disable-qt3" "--disable-qt4"
"--disable-gtk" "--disable-gtk3")))
"--disable-gtk" "--disable-gtk3")
#:patches (list (assoc-ref %build-inputs "patch/localstatedir"))))
(inputs
`(("expat" ,expat)
("glib" ,glib)
@ -56,7 +59,10 @@
("libdaemon" ,libdaemon)
("intltool" ,intltool)
("pkg-config" ,pkg-config)
("gdbm" ,gdbm)))
("gdbm" ,gdbm)
("patch/localstatedir"
,(search-patch "avahi-localstatedir.patch"))))
(synopsis "Avahi, an mDNS/DNS-SD implementation")
(description
"Avahi is a system which facilitates service discovery on a local

View File

@ -50,9 +50,21 @@
(base32
"1wacqyfkcpayg7f8rvx9awqg275n5pksxq5q7y21lxjx85x6pfjz"))))
(build-system gnu-build-system)
(arguments
'(#:configure-flags (list ;; Install the system bus socket under /var.
"--localstatedir=/var"
;; XXX: Fix the following to allow system-wide
;; config.
;; "--sysconfdir=/etc"
"--with-session-socket-dir=/tmp")
#:patches (list (assoc-ref %build-inputs "patch/localstatedir"))))
(inputs
`(("expat" ,expat)
("pkg-config" ,pkg-config)))
("pkg-config" ,pkg-config)
("patch/localstatedir"
,(search-patch "dbus-localstatedir.patch"))))
(home-page "http://dbus.freedesktop.org/")
(synopsis "Message bus for inter-process communication (IPC)")
(description

View File

@ -0,0 +1,12 @@
Don't "mkdir $(localstatedir)" since we can't do it (/var).
--- avahi-0.6.27/avahi-daemon/Makefile.in 2010-07-13 05:06:35.000000000 +0200
+++ avahi-0.6.27/avahi-daemon/Makefile.in 2010-07-13 18:03:45.000000000 +0200
@@ -1554,7 +1554,6 @@ xmllint:
done
install-data-local:
- test -z "$(localstatedir)/run" || $(mkdir_p) "$(DESTDIR)$(localstatedir)/run"
update-systemd:
curl http://cgit.freedesktop.org/systemd/plain/src/sd-daemon.c > sd-daemon.c

View File

@ -0,0 +1,30 @@
Do not try to create $localstatedir and $sysconfdir since we cannot do this
when they are /var and /etc.
--- dbus-1.6.4/bus/Makefile.in 2013-09-11 16:15:13.000000000 +0200
+++ dbus-1.6.4/bus/Makefile.in 2013-09-11 16:15:15.000000000 +0200
@@ -1510,9 +1510,6 @@ clean-local:
/bin/rm *.bb *.bbg *.da *.gcov || true
install-data-hook:
- $(mkinstalldirs) $(DESTDIR)$(localstatedir)/run/dbus
- $(mkinstalldirs) $(DESTDIR)$(configdir)/system.d
- $(mkinstalldirs) $(DESTDIR)$(configdir)/session.d
$(mkinstalldirs) $(DESTDIR)$(datadir)/dbus-1/services
$(mkinstalldirs) $(DESTDIR)$(datadir)/dbus-1/system-services
# Install dbus.socket as default implementation of a D-Bus stack.
--- dbus-1.6.4/tools/Makefile.in 2013-09-11 16:10:31.000000000 +0200
+++ dbus-1.6.4/tools/Makefile.in 2013-09-11 16:10:32.000000000 +0200
@@ -757,11 +757,6 @@ uninstall-am: uninstall-binPROGRAMS
# create the /var/lib/dbus directory for dbus-uuidgen
-install-data-local:
- $(MKDIR_P) $(DESTDIR)$(localstatedir)/lib/dbus
-
-installcheck-local:
- test -d $(DESTDIR)$(localstatedir)/lib/dbus
# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.