]> err.no Git - util-linux/commitdiff
build libuuid binary packages
authorScott James Remnant <scott@ubuntu.com>
Thu, 16 Jul 2009 14:42:40 +0000 (15:42 +0100)
committerScott James Remnant <scott@ubuntu.com>
Thu, 16 Jul 2009 14:42:40 +0000 (15:42 +0100)
The libuuid library and tools have moved from e2fsprogs to
util-linux-ng, and are now built and used by default.

Take the packaging data from e2fsprogs to create those packages.

16 files changed:
debian/control
debian/libuuid.copyright [new file with mode: 0644]
debian/libuuid1-udeb.dirs [new file with mode: 0644]
debian/libuuid1.files [new file with mode: 0644]
debian/libuuid1.postinst [new file with mode: 0644]
debian/libuuid1.postrm [new file with mode: 0644]
debian/libuuid1.symbols [new file with mode: 0644]
debian/rules
debian/shlibs.local
debian/uuid-dev.README.Debian [new file with mode: 0644]
debian/uuid-dev.files [new file with mode: 0644]
debian/uuid-runtime.files [new file with mode: 0644]
debian/uuid-runtime.lintian-overrides [new file with mode: 0644]
debian/uuid-runtime.postinst [new file with mode: 0644]
debian/uuid-runtime.postrm [new file with mode: 0644]
debian/uuid-runtime.prerm [new file with mode: 0644]

index 3d8192f84b74d5b10733fcc7d216c1ba2f946bf1..0ead573e317295acb5481b88cea4130c7b7c689d 100644 (file)
@@ -1,5 +1,5 @@
 Source: util-linux
-Build-Depends: libncurses5-dev, libslang2-dev (>=2.0.4), gettext, zlib1g-dev, uuid-dev, dpkg-dev (>=1.13.12), libselinux1-dev [!kfreebsd-i386 !kfreebsd-amd64 !hurd-i386], debhelper (>=5), lsb-release, pkg-config
+Build-Depends: libncurses5-dev, libslang2-dev (>=2.0.4), gettext, zlib1g-dev, dpkg-dev (>=1.13.12), libselinux1-dev [!kfreebsd-i386 !kfreebsd-amd64 !hurd-i386], debhelper (>=5), lsb-release, pkg-config
 Section: base
 Priority: required
 Uploaders: Scott James Remnant <scott@ubuntu.com>
@@ -118,6 +118,70 @@ Description: block device id library - headers and static libraries
  .
  This package contains the development environment for the blkid library.
 
+Package: libuuid1
+Section: libs
+Depends: passwd, ${shlibs:Depends}
+Recommends: uuid-runtime
+Replaces: e2fsprogs (<< 1.34-1)
+Architecture: any
+Description: Universally Unique ID library
+ The libuuid library generates and parses 128-bit universally unique
+ ids (UUIDs).  A UUID is an identifier that is unique across both
+ space and time, with respect to the space of all UUIDs.  A UUID can
+ be used for multiple purposes, from tagging objects with an extremely
+ short lifetime, to reliably identifying very persistent objects
+ across a network.
+ .
+ See RFC 4122 for more information.
+
+Package: uuid-runtime
+Section: libs
+Priority: optional
+Depends: passwd, libuuid1 (>> 1.40.3-1), ${shlibs:Depends}
+Replaces: e2fsprogs (<= 1.40.3-1ubuntu1)
+Architecture: any
+Description: runtime components for the Universally Unique ID library
+ The libuuid library generates and parses 128-bit universally unique
+ ids (UUIDs).  A UUID is an identifier that is unique across both
+ space and time, with respect to the space of all UUIDs.  A UUID can
+ be used for multiple purposes, from tagging objects with an extremely
+ short lifetime, to reliably identifying very persistent objects
+ across a network.
+ .
+ See RFC 4122 for more information.
+ .
+ This package contains the uuidgen program and the uuidd daemon.
+ .
+ The uuidd daemon is used to generate UUIDs, especially time-based
+ UUID’s, in a secure and guaranteed-unique fashion, even in the face
+ of large numbers of threads trying to grab UUID’s running on
+ different CPU’s. It is used by libuuid as well as the uuidgen
+ program.
+
+Package: libuuid1-udeb
+XC-Package-Type: udeb
+Section: debian-installer
+Priority: optional
+Depends: ${shlibs:Depends}
+Architecture: any
+Description: stripped down universally unique id library, for debian-installer
+ libuuid generates and parses 128-bit universally unique ids (UUIDs).
+ See RFC 4122 for more information.
+ .
+ This is a minimal package for debian-installer.
+
+Package: uuid-dev
+Section: libdevel
+Priority: extra
+Depends: libc6-dev | libc-dev, libuuid1 (= ${binary:Version})
+Replaces: e2fslibs-dev (<< 1.15)
+Architecture: any
+Description: universally unique id library - headers and static libraries
+ libuuid generates and parses 128-bit universally unique ids (UUIDs).
+ See RFC 4122 for more information.
+ .
+ This package contains the development environment for the uuid library.
+
 Package: util-linux-udeb
 Architecture: any
 Priority: optional
diff --git a/debian/libuuid.copyright b/debian/libuuid.copyright
new file mode 100644 (file)
index 0000000..fcb9afc
--- /dev/null
@@ -0,0 +1,35 @@
+This is libuuid, previously part of e2fsprogs this is now part of
+util-linux-ng and has thus moved to the util-linux Debian source
+package.
+
+Upstream Author: Theodore Ts'o <tytso@mit.edu>
+
+Copyright:
+
+Copyright (C) 1999, 2000, 2003, 2004 by Theodore Ts'o
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+1. Redistributions of source code must retain the above copyright
+   notice, and the entire permission notice in its entirety,
+   including the disclaimer of warranties.
+2. Redistributions in binary form must reproduce the above copyright
+   notice, this list of conditions and the following disclaimer in the
+   documentation and/or other materials provided with the distribution.
+3. The name of the author may not be used to endorse or promote
+   products derived from this software without specific prior
+   written permission.
+
+THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED
+WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ALL OF
+WHICH ARE HEREBY DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR BE
+LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
+OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
+BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
+USE OF THIS SOFTWARE, EVEN IF NOT ADVISED OF THE POSSIBILITY OF SUCH
+DAMAGE.
diff --git a/debian/libuuid1-udeb.dirs b/debian/libuuid1-udeb.dirs
new file mode 100644 (file)
index 0000000..bf90b05
--- /dev/null
@@ -0,0 +1,2 @@
+lib
+sbin
diff --git a/debian/libuuid1.files b/debian/libuuid1.files
new file mode 100644 (file)
index 0000000..da600dc
--- /dev/null
@@ -0,0 +1 @@
+lib/libuuid*
diff --git a/debian/libuuid1.postinst b/debian/libuuid1.postinst
new file mode 100644 (file)
index 0000000..5336fcf
--- /dev/null
@@ -0,0 +1,40 @@
+#!/bin/sh
+
+set -e
+
+ADDUSERCONF='/etc/adduser.conf'
+
+if test -f $ADDUSERCONF; then
+    FIRST_SYSTEM_UID=$(sed -n "s/^[[:space:]]*FIRST_SYSTEM_UID[[:space:]]*=[[:space:]]*[\"']\?\([^\"']*\)[\"']\?/\1/p" $ADDUSERCONF)
+    LAST_SYSTEM_UID=$(sed -n "s/^[[:space:]]*LAST_SYSTEM_UID[[:space:]]*=[[:space:]]*[\"']\?\([^\"']*\)[\"']\?/\1/p" $ADDUSERCONF)
+    FIRST_SYSTEM_GID=$(sed -n "s/^[[:space:]]*FIRST_SYSTEM_GID[[:space:]]*=[[:space:]]*[\"']\?\([^\"']*\)[\"']\?/\1/p" $ADDUSERCONF)
+    LAST_SYSTEM_GID=$(sed -n "s/^[[:space:]]*LAST_SYSTEM_GID[[:space:]]*=[[:space:]]*[\"']\?\([^\"']*\)[\"']\?/\1/p" $ADDUSERCONF)
+fi
+
+if test -z "$FIRST_SYSTEM_UID"; then
+    FIRST_SYSTEM_UID=100
+fi
+if test -z "$LAST_SYSTEM_UID"; then
+    LAST_SYSTEM_UID=999
+fi
+if test -z "$FIRST_SYSTEM_GID"; then
+    FIRST_SYSTEM_GID=100
+fi
+if test -z "$LAST_SYSTEM_GID"; then
+    LAST_SYSTEM_GID=999
+fi
+
+if ! getent group | grep -q libuuid; then
+  groupadd -f -K GID_MIN=$FIRST_SYSTEM_GID -K GID_MAX=$LAST_SYSTEM_GID libuuid
+fi
+if ! getent passwd | grep -q libuuid; then
+   useradd -d /var/lib/libuuid -K UID_MIN=$FIRST_SYSTEM_UID -K UID_MAX=$LAST_SYSTEM_UID -g libuuid libuuid
+fi
+
+mkdir -p /var/lib/libuuid
+chown libuuid:libuuid /var/lib/libuuid
+chmod 2775 /var/lib/libuuid
+
+#DEBHELPER#
+
+exit 0
diff --git a/debian/libuuid1.postrm b/debian/libuuid1.postrm
new file mode 100644 (file)
index 0000000..8c286ee
--- /dev/null
@@ -0,0 +1,10 @@
+#!/bin/sh
+set -e
+if [ "$1" = purge ]
+then
+       rm -rf /var/lib/libuuid
+fi
+
+#DEBHELPER#
+
+exit 0
diff --git a/debian/libuuid1.symbols b/debian/libuuid1.symbols
new file mode 100644 (file)
index 0000000..03f8a61
--- /dev/null
@@ -0,0 +1,20 @@
+libuuid.so.1 libuuid1 #MINVER#
+ UUID_1.0@UUID_1.0 2.16-1
+ uuid__generate_random@UUID_1.0 2.16-1
+ uuid__generate_time@UUID_1.0 2.16-1
+ uuid_clear@UUID_1.0 2.16-1
+ uuid_compare@UUID_1.0 2.16-1
+ uuid_copy@UUID_1.0 2.16-1
+ uuid_generate@UUID_1.0 2.16-1
+ uuid_generate_random@UUID_1.0 2.16-1
+ uuid_generate_time@UUID_1.0 2.16-1
+ uuid_is_null@UUID_1.0 2.16-1
+ uuid_pack@UUID_1.0 2.16-1
+ uuid_parse@UUID_1.0 2.16-1
+ uuid_time@UUID_1.0 2.16-1
+ uuid_type@UUID_1.0 2.16-1
+ uuid_unpack@UUID_1.0 2.16-1
+ uuid_unparse@UUID_1.0 2.16-1
+ uuid_unparse_lower@UUID_1.0 2.16-1
+ uuid_unparse_upper@UUID_1.0 2.16-1
+ uuid_variant@UUID_1.0 2.16-1
index 441646ae394fe2313ef5c77068b3f80a32f77c95..05808bd1e9724878f771249661abdcf891e446f3 100755 (executable)
@@ -110,19 +110,30 @@ endif
        if [ -f debian/util-linux/sbin/hwclock ] ; then \
            install -m 644 debian/hwclock.rules debian/util-linux/lib/udev/rules.d/85-hwclock.rules; \
        fi
-       # copy library and symlink into udeb
+       # copy blkid library and symlink into udeb
        ln debian/libblkid1/lib/libblkid.so.1.* debian/libblkid1-udeb/lib/
        ln debian/libblkid1/lib/libblkid.so.1   debian/libblkid1-udeb/lib/
        ln debian/util-linux/sbin/blkid debian/util-linux-udeb/sbin/
        # overwrite copyright
        install -m 644 debian/libblkid.copyright debian/libblkid1/usr/share/doc/libblkid1/copyright
        install -m 644 debian/libblkid.copyright debian/libblkid-dev/usr/share/doc/libblkid-dev/copyright
+       # copy uuid library and symlink into udeb
+       ln debian/libuuid1/lib/libuuid.so.1.* debian/libuuid1-udeb/lib/
+       ln debian/libuuid1/lib/libuuid.so.1   debian/libuuid1-udeb/lib/
+       # overwrite copyright
+       install -m 644 debian/libuuid.copyright debian/libuuid1/usr/share/doc/libuuid1/copyright
+       install -m 644 debian/libuuid.copyright debian/uuid-dev/usr/share/doc/uuid-dev/copyright
+       install -m 644 debian/libuuid.copyright debian/uuid-runtime/usr/share/doc/uuid-runtime/copyright
        # dpkg symbol handling
-       echo "Generating symbols for libblkid1..."
-       dpkg-gensymbols -plibblkid1 -Pdebian/libblkid1 > debian/libblkid1.tmp-patch
-       cat debian/libblkid1.tmp-patch
-       patch debian/libblkid1.symbols < debian/libblkid1.tmp-patch
-       rm debian/libblkid1.tmp-patch
+       for lib in libblkid1 libuuid1; \
+       do \
+               echo "Generating symbols for $$lib..."; \
+               dpkg-gensymbols -p$$lib -Pdebian/$$lib > debian/$$lib.tmp-patch; \
+               cat debian/$$lib.tmp-patch; \
+               patch debian/$$lib.symbols < debian/$$lib.tmp-patch; \
+               rm debian/$$lib.tmp-patch; \
+       done
+       #
        cd debian; if [ -f util-linux/sbin/fdisk ]; then \
            ln util-linux/sbin/*fdisk fdisk-udeb/usr/sbin/; \
            S=fdisk-udeb/usr/sbin/cfdisk; if [ -f $$S ]; then mv $$S cfdisk-udeb/usr/sbin/; fi; \
index eaaed72e95b8d562d85b0f573082b4137a6ed9e6..fdebb4f676a1e7f018bc73a23c8893cfe03fd674 100644 (file)
@@ -1,2 +1,4 @@
 libblkid 1 libblkid1 (>=1.37-1)
 udeb: libblkid 1 libblkid1-udeb
+libuuid 1 libuuid1 (> 1.40.3-1)
+udeb: libuuid 1 libuuid1-udeb
diff --git a/debian/uuid-dev.README.Debian b/debian/uuid-dev.README.Debian
new file mode 100644 (file)
index 0000000..3d8cc89
--- /dev/null
@@ -0,0 +1,23 @@
+
+In order to santize e2fsprogs to be DFSG free, the file
+draft-leach-uuids-guids-01.txt has been removed.  It can be obtained
+by downloading e2fsprogs from the upstream sources.  It may also be
+available from other sites on the network, if you do a quick web
+search for the string "draft-leach-uuids-guids-01".
+
+Note that debian/rules is set up to include the file on Ubuntu
+systems, so for people trying to build e2fsprogs on Ubuntu systems,
+they should start from the upstream sources, and not the
+Debian-expurgated sources found in the Debian repository.  (n.b., for
+WIP releases the command "./util/gen-tarball ubuntu" will help create
+tar file which is appropriately named to make life easier for
+dpkg-buildpackage.)  Since Ubuntu doesn't have the DFSG restrictions,
+the documentation which has been removed for Debian's DFSG license
+purity shouldn't be denied to Ubuntu users.
+
+                                       Theodore Ts'o
+                                       Ocotober 3, 2006
+
+
+
+
diff --git a/debian/uuid-dev.files b/debian/uuid-dev.files
new file mode 100644 (file)
index 0000000..966eed3
--- /dev/null
@@ -0,0 +1,4 @@
+usr/lib/libuuid.*
+usr/include/uuid
+usr/share/man/man3/uuid*
+usr/lib/pkgconfig/uuid.pc
diff --git a/debian/uuid-runtime.files b/debian/uuid-runtime.files
new file mode 100644 (file)
index 0000000..ff8d87a
--- /dev/null
@@ -0,0 +1,4 @@
+usr/bin/uuidgen
+usr/sbin/uuidd
+usr/share/man/man8/uuidd.*
+usr/share/man/man1/uuidgen.*
diff --git a/debian/uuid-runtime.lintian-overrides b/debian/uuid-runtime.lintian-overrides
new file mode 100644 (file)
index 0000000..4642d30
--- /dev/null
@@ -0,0 +1 @@
+uuid-runtime: command-with-path-in-maintainer-script prerm:5 /usr/sbin/uuidd
diff --git a/debian/uuid-runtime.postinst b/debian/uuid-runtime.postinst
new file mode 100644 (file)
index 0000000..3c1adb6
--- /dev/null
@@ -0,0 +1,15 @@
+#!/bin/sh
+
+set -e
+if ! getent group | grep -q libuuid; then
+groupadd -f -K GID_MIN=1 -K GID_MAX=999 libuuid
+fi
+if ! getent passwd | grep -q libuuid; then
+   useradd -d /var/lib/libuuid -K UID_MIN=1 -K UID_MAX=499 -g libuuid libuuid
+fi
+chown libuuid:libuuid /usr/sbin/uuidd
+chmod 6755 /usr/sbin/uuidd
+
+#DEBHELPER#
+
+exit 0
diff --git a/debian/uuid-runtime.postrm b/debian/uuid-runtime.postrm
new file mode 100644 (file)
index 0000000..f077001
--- /dev/null
@@ -0,0 +1,10 @@
+#!/bin/sh
+set -e
+if [ "$1" = purge ]
+then
+       rm -rf /var/run/uuidd
+fi
+
+#DEBHELPER#
+
+exit 0
diff --git a/debian/uuid-runtime.prerm b/debian/uuid-runtime.prerm
new file mode 100644 (file)
index 0000000..904e161
--- /dev/null
@@ -0,0 +1,10 @@
+#! /bin/sh
+set -e
+if [ -x /usr/sbin/uuidd ]
+then
+       /usr/sbin/uuidd -k || true
+fi
+
+#DEBHELPER#
+
+exit 0