Package: libowfat-dev Version: 0.28-2 Severity: normal Hi,
I know that this was not the original intention of the upstream author, but consider the following: Another package in Debian (in this case, gatling) links against libowfat. The binary executable originally links against dietlibc and libowfat. But we want to link against libssl/OpenSSL also. In Debian, libssl is available as shared library and statically, both linked against glibc. So we can't easily (and sensibly) follow the static approach. Linking dynamically is possible since I can make the program (gatling) link against shared glibc. But since it also uses libowfat (which includes some dietlibc symbols), there's some symbol clash between glibc and dietlibc symbols. Therefore, I linked libowfat dynamically against glibc and everything runs smoothly. I'm attaching a patch that adds the additional binary package libowfat0 with the respective shared library libowfat.so.0. Considering that Debian's standard way of delivering libs is shared - why not? ;-) Further, security updates to libowfat would minimize recompiling dependent packages (e.g. gatling). I'm using libowfat and gatling in a separate project (using OpenSSL), so if you integrate the attached patch, I don't need the hassle of continued forking. (And yes, gatling has the necessary license exception of linking against openssl while being GPL'ed.) Thanks for considering! bye, Roland -- System Information: Debian Release: squeeze/sid APT prefers unstable APT policy: (500, 'unstable'), (1, 'experimental') Architecture: i386 (x86_64) Kernel: Linux 2.6.35-trunk-amd64 (SMP w/1 CPU core) Locale: LANG=en_GB.UTF-8, LC_CTYPE=en_GB.UTF-8 (charmap=UTF-8) (ignored: LC_ALL set to en_GB.UTF-8) Shell: /bin/sh linked to /bin/bash Versions of packages libowfat-dev depends on: ii dietlibc-dev 0.32-5 diet libc - a libc optimized for s ii libowfat0 0.28-2 A reimplementation of libdjb, shar libowfat-dev recommends no packages. libowfat-dev suggests no packages. -- no debconf information
diff -ruN libowfat-0.28/debian/changelog debian/libowfat-0.28/debian/changelog --- libowfat-0.28/debian/changelog 2010-12-16 00:08:58.000000000 +0100 +++ debian/libowfat-0.28/debian/changelog 2010-12-16 15:23:18.000000000 +0100 @@ -1,3 +1,9 @@ +libowfat (0.28-3) unstable; urgency=low + + * Added shared library libowfat.so.0 in package libowfat0 + + -- Roland Stigge <[email protected]> Thu, 16 Dec 2010 11:54:15 +0100 + libowfat (0.28-2) unstable; urgency=medium * debian/control: Build-Depends: dietlibc-dev (>= 0.32-5) [sparc] diff -ruN libowfat-0.28/debian/control debian/libowfat-0.28/debian/control --- libowfat-0.28/debian/control 2010-12-16 00:08:58.000000000 +0100 +++ debian/libowfat-0.28/debian/control 2010-12-16 15:23:34.000000000 +0100 @@ -8,9 +8,9 @@ Package: libowfat-dev Section: libdevel Architecture: any -Depends: dietlibc-dev +Depends: dietlibc-dev, libowfat0 (= ${binary:Version}) Conflicts: libdjbdns1-dev -Description: A reimplementation of libdjb +Description: A reimplementation of libdjb, development files This library is a reimplementation of libdjb, which means that it provides Daniel Bernstein's interfaces (with some extensions). . @@ -21,3 +21,20 @@ layer of mmap and sendfile. . The library is available for use with the diet libc. + +Package: libowfat0 +Section: libs +Architecture: any +Depends: ${shlibs:Depends}, ${misc:Depends} +Description: A reimplementation of libdjb, shared library + This library is a reimplementation of libdjb, which means that it provides + Daniel Bernstein's interfaces (with some extensions). + . + It contains wrappers around memory allocation, buffered I/O, routines for + formatting and scanning, a full DNS resolver, several socket routines, + wrappers for socket functions, mkfifo, opendir, wait, and an abstraction + around errno. It also includes wrappers for Unix signal functions and a + layer of mmap and sendfile. + . + This package contains the shared library linked against glibc. The library is + also available for use with the diet libc (see libowfat-dev). diff -ruN libowfat-0.28/debian/libowfat0.postinst debian/libowfat-0.28/debian/libowfat0.postinst --- libowfat-0.28/debian/libowfat0.postinst 1970-01-01 01:00:00.000000000 +0100 +++ debian/libowfat-0.28/debian/libowfat0.postinst 2010-12-16 11:49:25.000000000 +0100 @@ -0,0 +1,8 @@ +#!/bin/sh + +set -e + +if [ "$1" = "configure" ] ; then + ldconfig +fi + diff -ruN libowfat-0.28/debian/libowfat0.shlibs debian/libowfat-0.28/debian/libowfat0.shlibs --- libowfat-0.28/debian/libowfat0.shlibs 1970-01-01 01:00:00.000000000 +0100 +++ debian/libowfat-0.28/debian/libowfat0.shlibs 2010-12-16 10:36:16.000000000 +0100 @@ -0,0 +1 @@ +libowfat 0 libowfat0 diff -ruN libowfat-0.28/debian/rules debian/libowfat-0.28/debian/rules --- libowfat-0.28/debian/rules 2010-12-16 00:08:58.000000000 +0100 +++ debian/libowfat-0.28/debian/rules 2010-12-16 15:40:53.000000000 +0100 @@ -6,6 +6,7 @@ endif DIR =$(shell pwd)/debian/libowfat-dev +DIR2 =$(shell pwd)/debian/libowfat0 patch: deb-checkdir patch-stamp patch-stamp: @@ -16,19 +17,23 @@ build: deb-checkdir build-stamp build-stamp: patch-stamp + $(MAKE) DIET='' SHARED=1 libowfat.so + strip --strip-unneeded libowfat.so.* + $(MAKE) clean $(MAKE) DIET='diet -v -Os' touch build-stamp clean: deb-checkdir deb-checkuid $(MAKE) clean DIET='diet -v -Os' + rm -f libowfat.so* test ! -e patch-stamp || \ for i in `ls -1r debian/diff/*.diff || :`; do patch -p1 -R <$$i; done - rm -rf '$(DIR)' .diet + rm -rf '$(DIR)' '$(DIR2)' .diet rm -f build-stamp install-stamp patch-stamp - rm -f debian/files changelog + rm -f debian/files changelog debian/substvars install: deb-checkdir deb-checkuid build-stamp - rm -rf '$(DIR)' + rm -rf '$(DIR)' '$(DIR2)' install -d -m0755 '$(DIR)'/usr/lib/diet/lib install -d -m0755 '$(DIR)'/usr/include/diet install -m0644 libowfat.a '$(DIR)'/usr/lib/diet/lib/ @@ -43,11 +48,20 @@ # changelog test -r changelog || ln -s CHANGES changelog + install -d -m0755 '$(DIR)'/usr/lib + cp -a libowfat.so '$(DIR)'/usr/lib/ + + install -d -m0755 '$(DIR2)'/usr/lib + install -m0644 libowfat.so.* '$(DIR2)'/usr/lib/ + binary-indep: -binary-arch: install libowfat-dev.deb +binary-arch: install libowfat-dev.deb libowfat0.deb + dpkg-shlibdeps libowfat.so.* dpkg-gencontrol -isp -plibowfat-dev -P'$(DIR)' dpkg -b '$(DIR)' .. + dpkg-gencontrol -isp -plibowfat0 -P'$(DIR2)' + dpkg -b '$(DIR2)' .. binary: binary-indep binary-arch .PHONY: build clean install binary-indep binary-arch binary diff -ruN libowfat-0.28/debian/substvars debian/libowfat-0.28/debian/substvars --- libowfat-0.28/debian/substvars 1970-01-01 01:00:00.000000000 +0100 +++ debian/libowfat-0.28/debian/substvars 2010-12-16 15:21:53.000000000 +0100 @@ -0,0 +1 @@ +shlibs:Depends=libc6 (>= 2.3.2) diff -ruN libowfat-0.28/GNUmakefile debian/libowfat-0.28/GNUmakefile --- libowfat-0.28/GNUmakefile 2010-12-16 15:34:39.000000000 +0100 +++ debian/libowfat-0.28/GNUmakefile 2010-12-16 15:34:02.000000000 +0100 @@ -15,10 +15,15 @@ all: t $(LIBS) libowfat.a libsocket +SONAME=libowfat.so.0 + CROSS= #CROSS=i686-mingw- CC=$(CROSS)gcc CFLAGS=-pipe -W -Wall -O2 -fomit-frame-pointer +ifeq ($(SHARED),1) +CFLAGS+=-fPIC +endif #CFLAGS=-pipe -Os -march=pentiumpro -mcpu=pentiumpro -fomit-frame-pointer -fschedule-insns2 -Wall # CFLAGS += -fstrict-aliasing -Wstrict-aliasing=2 @@ -299,3 +304,9 @@ windoze: $(MAKE) DIET= CROSS=i686-mingw32- + +libowfat.so: $(SONAME) + ln -sf $< $@ + +$(SONAME): $(ALL_OBJS) + $(CC) -shared -Wl,-soname=$(SONAME) $(CFLAGS) $^ -o $@

