From 2ee993fe2cade668f8047f37ee223430775e3a38 Mon Sep 17 00:00:00 2001 From: mdw Date: Sat, 29 Nov 2003 23:47:33 +0000 Subject: [PATCH] Debianization. --- .cvsignore | 1 + Makefile.m4 | 10 +++++-- configure.in | 7 +++-- debian/.cvsignore | 4 +++ debian/catacomb-bin.config | 5 ++++ debian/catacomb-bin.postinst | 17 ++++++++++++ debian/catacomb-bin.prerm | 2 ++ debian/catacomb-bin.templates | 14 ++++++++++ debian/changelog | 5 ++++ debian/control | 62 +++++++++++++++++++++++++++++++++++++++++++ debian/copyright | 16 +++++++++++ debian/rules | 61 ++++++++++++++++++++++++++++++++++++++++++ 12 files changed, 200 insertions(+), 4 deletions(-) create mode 100644 debian/.cvsignore create mode 100644 debian/catacomb-bin.config create mode 100644 debian/catacomb-bin.postinst create mode 100644 debian/catacomb-bin.prerm create mode 100644 debian/catacomb-bin.templates create mode 100644 debian/changelog create mode 100644 debian/control create mode 100644 debian/copyright create mode 100755 debian/rules diff --git a/.cvsignore b/.cvsignore index b0f0f68..b8a967d 100644 --- a/.cvsignore +++ b/.cvsignore @@ -280,3 +280,4 @@ xtea-ecb.h xtea-ofb.c xtea-ofb.h junk +deb-build diff --git a/Makefile.m4 b/Makefile.m4 index 1be844e..4428442 100644 --- a/Makefile.m4 +++ b/Makefile.m4 @@ -1,6 +1,6 @@ ## -*-m4-*- ## -## $Id: Makefile.m4,v 1.64 2003/11/10 22:18:30 mdw Exp $ +## $Id: Makefile.m4,v 1.65 2003/11/29 23:39:36 mdw Exp $ ## ## Makefile for Catacomb ## @@ -29,6 +29,9 @@ ##----- Revision history ---------------------------------------------------- ## ## $Log: Makefile.m4,v $ +## Revision 1.65 2003/11/29 23:39:36 mdw +## Debianization. +## ## Revision 1.64 2003/11/10 22:18:30 mdw ## Build fixes. ## @@ -462,7 +465,10 @@ man_MANS = key.1 hashsum.1 keyring.5 pixie.1 EXTRA_DIST = \ Makefile.m4 genmodes $(man_MANS) xpixie \ - README.cipher README.hash README.random README.mp + README.cipher README.hash README.random README.mp \ + debian/rules debian/copyright debian/control debian/changelog \ + debian/catacomb-bin.postinst debian/catacomb-bin.config \ + debian/catacomb-bin.prerm debian/catacomb-bin.templates dist-hook: @ln getdate.c $(distdir) || ln $(srcdir)/getdate.c $(distdir) || true diff --git a/configure.in b/configure.in index 019bff4..555e0ef 100644 --- a/configure.in +++ b/configure.in @@ -1,6 +1,6 @@ -dnl -*-fundamental-*- +dnl -*-m4-*- dnl -dnl $Id: configure.in,v 1.25 2003/10/11 21:02:33 mdw Exp $ +dnl $Id: configure.in,v 1.26 2003/11/29 23:39:36 mdw Exp $ dnl dnl Autoconfiguration for Catacomb dnl @@ -29,6 +29,9 @@ dnl MA 02111-1307, USA. dnl ----- Revision history -------------------------------------------------- dnl dnl $Log: configure.in,v $ +dnl Revision 1.26 2003/11/29 23:39:36 mdw +dnl Debianization. +dnl dnl Revision 1.25 2003/10/11 21:02:33 mdw dnl Import buf stuff from tripe. dnl diff --git a/debian/.cvsignore b/debian/.cvsignore new file mode 100644 index 0000000..0af825e --- /dev/null +++ b/debian/.cvsignore @@ -0,0 +1,4 @@ +files tmp substvars *.substvars *.debhelper +catacomb +catacomb-bin catacomb-dev +catacomb2 diff --git a/debian/catacomb-bin.config b/debian/catacomb-bin.config new file mode 100644 index 0000000..49d6dbf --- /dev/null +++ b/debian/catacomb-bin.config @@ -0,0 +1,5 @@ +#! /bin/sh -e +. /usr/share/debconf/confmodule +db_version 2.0 +db_input medium catacomb-bin/pixie-is-setuid || true +db_go || true diff --git a/debian/catacomb-bin.postinst b/debian/catacomb-bin.postinst new file mode 100644 index 0000000..c78ee62 --- /dev/null +++ b/debian/catacomb-bin.postinst @@ -0,0 +1,17 @@ +#! /bin/sh -e +. /usr/share/debconf/confmodule +db_version 2.0 +db_get catacomb-bin/pixie-is-setuid; setuid=$RET +dpkg-statoverride --remove /usr/bin/pixie 2>/dev/null || true +case $setuid in + true) + echo "Installing /usr/bin/pixie setuid-root." + dpkg-statoverride --add --update root root 4755 /usr/bin/pixie + ;; + false) + echo "Making /usr/bin/pixie non-setuid." + dpkg-statoverride --add --update root root 755 /usr/bin/pixie + ;; +esac + +#DEBHELPER# diff --git a/debian/catacomb-bin.prerm b/debian/catacomb-bin.prerm new file mode 100644 index 0000000..2cdd63b --- /dev/null +++ b/debian/catacomb-bin.prerm @@ -0,0 +1,2 @@ +#! /bin/sh -e +dpkg-statoverride --remove /usr/bin/pixie 2>/dev/null || true diff --git a/debian/catacomb-bin.templates b/debian/catacomb-bin.templates new file mode 100644 index 0000000..d4fb741 --- /dev/null +++ b/debian/catacomb-bin.templates @@ -0,0 +1,14 @@ +Template: catacomb-bin/pixie-is-setuid +Type: boolean +Default: true +Description: Install pixie setuid-root? + Catacomb provides a `passphrase pixie' which prompts for passphrases + (either on its terminal or using an external command) and remembers them + for a configurable period of time. + . + For added security, the pixie can ensure that the memory it uses for + passphrases is not swapped to disk. To do this, it must be installed + setuid root. While the pixie has been carefully written so that this + shouldn't be a security problem -- it allocates a small amount of memory, + marks it as unswappable and then drops privileges immediately -- it may + make some administrators nervous, so you have the option. diff --git a/debian/changelog b/debian/changelog new file mode 100644 index 0000000..c00b120 --- /dev/null +++ b/debian/changelog @@ -0,0 +1,5 @@ +catacomb (2.0.1) experimental; urgency=low + + * Debianization! + + -- Mark Wooding Mon, 10 Nov 2003 22:02:52 +0000 diff --git a/debian/control b/debian/control new file mode 100644 index 0000000..9a8d75b --- /dev/null +++ b/debian/control @@ -0,0 +1,62 @@ +Source: catacomb +Section: libs +Priority: extra +Build-Depends: mlib-dev (>= 2.0.2), debhelper (>= 4.0.2) +Maintainer: Mark Wooding +Standards-Version: 3.1.1 + +Package: catacomb2 +Architecture: any +Depends: ${shlibs:Depends} +Recommends: catacomb-bin +Description: A cryptographic library + Catacomb is a cryptographic library. It implements a large number of + encryption algorithms, hash functions, message authentication codes + and random number generators. It has a multi-precision maths library, + for implementing public key schemes such as RSA, DSA and Diffie-Hellman. + It contains rudimentary key-management tools. + . + The objective of Catacomb is to make a crypto library which is + relatively straightforward to audit for security. Its focus is on + clarity of source code and portability more than performance. + . + This package just contains the shared library. If you want to develop + programs which use the library, you need catacomb-dev. + +Package: catacomb-bin +Architecture: any +Depends: ${shlibs:Depends}, catacomb2 (= ${Source-Version}), ${misc:Depends} +Suggests: xtoys +Description: A cryptographic library + Catacomb is a cryptographic library. It implements a large number of + encryption algorithms, hash functions, message authentication codes + and random number generators. It has a multi-precision maths library, + for implementing public key schemes such as RSA, DSA and Diffie-Hellman. + It contains rudimentary key-management tools. + . + The objective of Catacomb is to make a crypto library which is + relatively straightforward to audit for security. Its focus is on + clarity of source code and portability more than performance. + . + This package contains a tool for key management, a passphrase + pixie, and other stuff. + . + The `xpixie' script uses `xgetline' from the `xtoys' package. + +Package: catacomb-dev +Architecture: any +Depends: catacomb2 (= ${Source-Version}) +Recommends: catacomb-bin +Description: A cryptographic library + Catacomb is a cryptographic library. It implements a large number of + encryption algorithms, hash functions, message authentication codes + and random number generators. It has a multi-precision maths library, + for implementing public key schemes such as RSA, DSA and Diffie-Hellman. + It contains rudimentary key-management tools. + . + The objective of Catacomb is to make a crypto library which is + relatively straightforward to audit for security. Its focus is on + clarity of source code and portability more than performance. + . + This package contains the headers and static libraries needed for + building programs which use the library. diff --git a/debian/copyright b/debian/copyright new file mode 100644 index 0000000..2b1f4b6 --- /dev/null +++ b/debian/copyright @@ -0,0 +1,16 @@ +Catacomb is copyright (c) 2003 Straylight/Edgeware + +Catacomb is free software; you can redistribute it and/or modify it under +the terms of the GNU Library General Public License as published by the +Free Software Foundation; either version 2 of the License, or (at your +option) any later version. + +Catacomb is distributed in the hope that it will be useful, but WITHOUT ANY +WARRANTY; without even the implied warranty of MERCHANTABILITY or +FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public +License for more details. + +You should have a copy of the GNU Library General Public License in +/usr/share/common-licenses/LGPL-2; if not, write to the Free Software +Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, +USA. diff --git a/debian/rules b/debian/rules new file mode 100755 index 0000000..8116163 --- /dev/null +++ b/debian/rules @@ -0,0 +1,61 @@ +#! /usr/bin/make -f + +export DH_COMPAT = 4 + +build: + rm -rf build deb-build + mkdir deb-build + cd deb-build; ../configure --prefix=/usr --mandir=/usr/share/man + make -C deb-build + make -C deb-build check + touch build + +clean: + dh_clean + rm -rf deb-build build + +install: build + dh_clean + make -C deb-build install DESTDIR=`pwd`/debian/catacomb2 + mkdir -p debian/catacomb-dev/usr + mv debian/catacomb2/usr/include debian/catacomb-dev/usr + mkdir -p debian/catacomb-dev/usr/lib + mv debian/catacomb2/usr/lib/catacomb debian/catacomb-dev/usr/lib + mv debian/catacomb2/usr/lib/*.a debian/catacomb-dev/usr/lib + mv debian/catacomb2/usr/lib/*.so debian/catacomb-dev/usr/lib + mv debian/catacomb2/usr/lib/*.la debian/catacomb-dev/usr/lib + mkdir -p debian/catacomb-bin/usr + mv debian/catacomb2/usr/bin debian/catacomb-bin/usr + mkdir -p debian/catacomb-bin/usr/share/man + mv debian/catacomb2/usr/share/man/man1 \ + debian/catacomb-bin/usr/share/man + +binary-indep: + +binary-arch: install + dh_testdir -a + dh_testroot -a + dh_compress -a + dh_installdocs -a + dh_strip -a + dh_makeshlibs -a -V + dh_undocumented -a + dh_shlibdeps -a + dh_installdebconf -a + dh_gencontrol -a + dh_fixperms -a + dh_installdeb -a + dh_md5sums -a + dh_builddeb -a + +binary: binary-indep binary-arch + +source: + rm -rf deb-build/*.tar.gz deb-build/=deb= + make -C deb-build dist + mkdir deb-build/=deb= + cd deb-build/=deb=; tar xvfz ../*.tar.gz + d=`pwd`; cd ..; dpkg-source -i -b $$d/deb-build/=deb=/* + rm -rf deb-build/=deb= + +.PHONY: binary binary-arch binary-indep clean install source -- 2.11.0