Debianization.
authormdw <mdw>
Sat, 29 Nov 2003 23:47:33 +0000 (23:47 +0000)
committermdw <mdw>
Sat, 29 Nov 2003 23:47:33 +0000 (23:47 +0000)
12 files changed:
.cvsignore
Makefile.m4
configure.in
debian/.cvsignore [new file with mode: 0644]
debian/catacomb-bin.config [new file with mode: 0644]
debian/catacomb-bin.postinst [new file with mode: 0644]
debian/catacomb-bin.prerm [new file with mode: 0644]
debian/catacomb-bin.templates [new file with mode: 0644]
debian/changelog [new file with mode: 0644]
debian/control [new file with mode: 0644]
debian/copyright [new file with mode: 0644]
debian/rules [new file with mode: 0755]

index b0f0f68..b8a967d 100644 (file)
@@ -280,3 +280,4 @@ xtea-ecb.h
 xtea-ofb.c
 xtea-ofb.h
 junk
+deb-build
index 1be844e..4428442 100644 (file)
@@ -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
index 019bff4..555e0ef 100644 (file)
@@ -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 (file)
index 0000000..0af825e
--- /dev/null
@@ -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 (file)
index 0000000..49d6dbf
--- /dev/null
@@ -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 (file)
index 0000000..c78ee62
--- /dev/null
@@ -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 (file)
index 0000000..2cdd63b
--- /dev/null
@@ -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 (file)
index 0000000..d4fb741
--- /dev/null
@@ -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 (file)
index 0000000..c00b120
--- /dev/null
@@ -0,0 +1,5 @@
+catacomb (2.0.1) experimental; urgency=low
+
+  * Debianization!
+
+ -- Mark Wooding <mdw@nsict.org>  Mon, 10 Nov 2003 22:02:52 +0000
diff --git a/debian/control b/debian/control
new file mode 100644 (file)
index 0000000..9a8d75b
--- /dev/null
@@ -0,0 +1,62 @@
+Source: catacomb
+Section: libs
+Priority: extra
+Build-Depends: mlib-dev (>= 2.0.2), debhelper (>= 4.0.2)
+Maintainer: Mark Wooding <mdw@nsict.org>
+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 (file)
index 0000000..2b1f4b6
--- /dev/null
@@ -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 (executable)
index 0000000..8116163
--- /dev/null
@@ -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