Package: json-c
Version: 0.10-1.1
Severity: normal
Tags: patch
User: ubuntu-de...@lists.ubuntu.com
Usertags: origin-ubuntu raring ubuntu-patch

Hi Fabien,

As you may be aware, upstart now uses json-c for serializing its state on
re-exec.  This means that on at least some systems, /sbin/init has a
dependency on libjson.so.0; so per the FHS, libjson ought to be in /lib
rather than in /usr/lib.

I believe that in the not-too-distant future, we will wish to follow
Fedora's lead and drop the separation between / and /usr in Debian and
Ubuntu.  But for right now, this isn't possible without breaking users'
systems; so I've pushed the attached patch to the json-c package in Ubuntu.
I would appreciate it if you could apply the same patch in Debian, so users
with /usr on a separate partition will also be able to use upstart.

Thanks for considering the patch.
-- 
Steve Langasek                   Give me a lever long enough and a Free OS
Debian Developer                   to set it on, and I can move the world.
Ubuntu Developer                                    http://www.debian.org/
slanga...@ubuntu.com                                     vor...@debian.org
=== modified file 'debian/control'
--- debian/control	2012-08-27 12:56:32 +0000
+++ debian/control	2012-12-10 08:29:16 +0000
@@ -1,7 +1,7 @@
 Source: json-c
 Priority: extra
 Maintainer: fabien boucher <fabien.dot.bouc...@gmail.com>
-Build-Depends: debhelper (>= 9)
+Build-Depends: debhelper (>= 9), dh-exec
 Standards-Version: 3.9.3.0
 Section: libs
 Homepage: http://oss.metaparadigm.com/json-c/

=== modified file 'debian/libjson0.install' (properties changed: -x to +x)
--- debian/libjson0.install	2012-05-18 17:21:25 +0000
+++ debian/libjson0.install	2012-12-10 03:23:21 +0000
@@ -1 +1,2 @@
-usr/lib/*/libjson.so.0*
+#!/usr/bin/dh-exec
+usr/lib/${DEB_HOST_MULTIARCH}/libjson.so.0* lib/${DEB_HOST_MULTIARCH}/

=== modified file 'debian/rules'
--- debian/rules	2012-08-27 12:56:32 +0000
+++ debian/rules	2012-12-10 07:12:19 +0000
@@ -1,6 +1,8 @@
 #!/usr/bin/make -f
 #export DH_VERBOSE=1
 
+DEB_HOST_MULTIARCH ?= $(shell dpkg-architecture -qDEB_HOST_MULTIARCH)
+
 override_dh_auto_clean:
 	if test -e Makefile; then \
 	    make clean; \
@@ -14,6 +16,13 @@
 	    rm -R tests/testSubDir; \
 	fi
 
+override_dh_auto_install:
+	dh_auto_install
+	# we install libjson into /lib, so fix the link
+	T=$$(readlink debian/tmp/usr/lib/$(DEB_HOST_MULTIARCH)/libjson.so); \
+	rm debian/tmp/usr/lib/$(DEB_HOST_MULTIARCH)/libjson.so; \
+	ln -s /lib/$(DEB_HOST_MULTIARCH)/$$(basename $$T) debian/tmp/usr/lib/$(DEB_HOST_MULTIARCH)/libjson.so
+
 override_dh_strip:
 	dh_strip --dbg-package=libjson0-dbg
 

Reply via email to