]> git.donarmstrong.com Git - debhelper.git/commitdiff
r17: Initial Import
authorjoey <joey>
Tue, 17 Aug 1999 04:36:40 +0000 (04:36 +0000)
committerjoey <joey>
Tue, 17 Aug 1999 04:36:40 +0000 (04:36 +0000)
README
debian/changelog
debian/copyright
debian/rules
dh_lib
dh_md5sums
dh_md5sums.1
examples/rules
examples/rules.multi

diff --git a/README b/README
index e43ee33625d8f5d7d995acf8505cf6dc8b3dfa26..21ecd5192edc10305581f8eaf2060e953b3abbec 100644 (file)
--- a/README
+++ b/README
@@ -8,6 +8,58 @@ that uses debhelper commands extensivly. See
 one good order you can run the different debhelper scripts in (though other
 variations are possible).
 
+
+Converting from debstd to debhelper:
+-----------------------------------
+
+Debhelper is designed to be mostly backwards compatable to debstd. I say
+mostly becuase I haven't made debhelper handle everything that debstd does
+yet, and in a few cases, it does things differently (and I hope, better).
+
+In general, you can switch over to using debhelper as follows. In your
+debian/rules, where you used to have some lines that read something like:
+
+       debstd CHANGES TODO README
+       dpkg-gencontrol
+       dpkg --build debian/tmp ..
+
+Remove that and replace it with something like:
+
+       dh_installdocs TODO README
+       dh_installexamples
+       dh_installmenu
+       dh_installcron
+       dh_installmanpages
+       dh_installchangelogs CHANGES
+       dh_strip
+       dh_compress
+       dh_fixperms
+       dh_suidregister
+       dh_installdebfiles
+       dh_m5dsums
+       dh_builddeb
+
+Notice that the parameters sent to debstd get split up among the dh_*
+programs. The upstream changelog is passed to dh_installchangelogs, and the
+docs are passed to dh_installdocs.
+
+Debstd has many switches, that turn off differnt parts of it. So if you 
+were using debstd -m to tell it not to automatically install manpages,
+for example, you can just comment out the dh_installmanpages line.
+
+Finally, debstd automatically modified postinst, postrm, etc scripts. Some
+of the dehelper apps do that too, but they do it differnently. Debstd just
+appends its commands to the end of the script. Debhelper reqyires that you
+insert a tag into your scripts, that will tell debhelper where to insert
+commands. So if you have postinst, postrm, etc scripts, add a line reading
+"#DEBHELPER" to the end of them.
+
+Once you think it's all set up properly, do a test build of your package. If 
+it works ok, I reccommend that you compare the new package and the old 
+debstd-generated package very closely. Pay special attention to the postint, 
+postrm, etc scripts.
+
+
 Automatic generation of debian install scripts:
 ----------------------------------------------
 
@@ -23,6 +75,7 @@ by the -n parameter.
 Note that it will be shell code, so you cannot directly use it in a perl 
 script.
 
+
 Notes on multiple binary packages:
 ---------------------------------
 
index e70ccf07d1979cadf7da9bdf2b3f1ec368f0003a..a1b0990868b6de1cb2cbb8656c16213204557c36 100644 (file)
@@ -1,3 +1,13 @@
+debhelper (0.11) unstable; urgency=low
+
+  * dh_md5sums: behavior modification: do not generate md5sums for conffiles.
+    (Thanks to Charles Briscoe-Smith <cpb4@ukc.ac.uk>) #14048.
+  * dh_md5sums: can generate conffile md5sums with -x parameter.
+  * Added a "converting from debstd" section to the README.
+  * Added dh_du, generates a DEBIAN/du file with disk usage stats (#14048).
+
+ -- Joey Hess <joeyh@master.debian.org>  Tue, 21 Oct 1997 13:17:28 -0400
+
 debhelper (0.10) unstable; urgency=medium
 
   * dh_installdebfiles: fixed *bad* bug that messed up the names of all
index 0feed1b2dbc0bdc6161bcc45f0cf1802bcd3e55b..2845a267f92141ea5579356ebf42f24df933e53d 100644 (file)
@@ -1,5 +1,9 @@
 Debhelper is written by Joey Hess <joeyh@master.debian.org>.
-Parts of the code came from debmake, by Christoph Lameter 
-<clameter@debian.org>.
 
-The copyright of this package is GPL.
+Parts of the code (and certianly my inspiration from the whole thing) came 
+from debmake, by Christoph Lameter <clameter@debian.org>. 
+
+Some of the dh_md5sums and dh_du commands is from a program by Charles 
+Briscoe-Smith <cpb4@ukc.ac.uk>.
+
+The copyright of this package is GPL, version 2 or later.
index 8b635e7b252efa6aa00493094377777506d3d4bf..eaaeb54dd8b3a251e15d910d8670fda73ac94f27 100755 (executable)
@@ -45,6 +45,7 @@ binary-indep: build
        ./dh_fixperms
        ./dh_suidregister
        ./dh_installdebfiles
+       ./dh_du
        ./dh_md5sums
        ./dh_builddeb
 
diff --git a/dh_lib b/dh_lib
index 618953d8b5fd0ee9adc913f34f918e4c8c7b6929..1cc7e308a7e3c11ab2b1ae0bc51ddb754f2b7291 100644 (file)
--- a/dh_lib
+++ b/dh_lib
@@ -77,7 +77,7 @@ autoscript() {
 # Argument processing and global variable initialization is below.
 
 # Parse command line.
-set -- `getopt vianp: $*`
+set -- `getopt xvianp: $*`
 
 for i; do
        case "$i"
@@ -103,6 +103,10 @@ for i; do
                        DH_NOSCRIPTS=1
                        shift
                        ;;
+               -x)     
+                       DH_EXCLUDE=1
+                       shift
+                       ;;
                --)
                        shift
                        break
index 273faf347338e48f7c84f68abf32c8a630c463fc..5400bad97c8a08e69b1de0f3fb462174dd8ec65e 100755 (executable)
@@ -13,10 +13,17 @@ for PACKAGE in $DH_DOPACKAGES; do
                doit "install -d debian/$TMP/DEBIAN"
        fi
 
-       doit "cd debian/$TMP"
        # Doit isn't smart enough to hande this next command so echo by hand. (sigh)
-       verbose_echo 'md5sum `find * -type f ! -regex "^DEBIAN/.*"` > DEBIAN/md5sums </dev/null'
-       md5sum `find * -type f ! -regex "^DEBIAN/.*"` >DEBIAN/md5sums </dev/null
-       doit "chown root.root DEBIAN/md5sums"
-       doit "cd ../.."
+       verbose_echo 'find debian/$TMP/* -type f ! -regex "^debian/$TMP/DEBIAN/.*" | sed s:debian/$TMP/:: | sort > debian/$TMP/DEBIAN/allfiles'
+       find debian/$TMP/* -type f ! -regex "^debian/$TMP/DEBIAN/.*" | sed s:debian/$TMP:: | sort > debian/$TMP/DEBIAN/allfiles
+       # Check if we should exclude conffiles.
+       if [ ! "$DH_EXCLUDE" -a -r debian/$TMP/DEBIAN/conffiles ]; then
+               verbose_echo "sort debian/$TMP/DEBIAN/conffiles | comm -13 - debian/$TMP/DEBIAN/allfiles > debian/$TMP/DEBIAN/allfiles.new"
+               sort debian/$TMP/DEBIAN/conffiles | comm -13 - debian/$TMP/DEBIAN/allfiles > debian/$TMP/DEBIAN/allfiles.new
+               doit "mv debian/$TMP/DEBIAN/allfiles.new debian/$TMP/DEBIAN/allfiles"
+       fi
+       verbose_echo "cd debian/$TMP ; sed 's:^/::' < DEBIAN/allfiles | xargs md5sum > DEBIAN/md5sums ; cd ../.."
+       cd debian/$TMP ; sed 's:^/::' < DEBIAN/allfiles | xargs md5sum > DEBIAN/md5sums ; cd ../..
+       doit "chown root.root debian/$TMP/DEBIAN/md5sums"
+       doit "rm -f debian/$TMP/DEBIAN/allfiles"
 done
index 422a4aa7c24e3a88673ddee0482cb7666267136b..a54c1c15a5319b797865031be825e1d5eda288dd 100644 (file)
@@ -3,12 +3,13 @@
 dh_md5sums \- generate DEBIAN/md5sums file
 .SH SYNOPSIS
 .B dh_md5sums
-.I "[-v] [-a] [-i] [-ppackage]"
+.I "[-x] [-v] [-a] [-i] [-ppackage]"
 .SH "DESCRIPTION"
 dh_md5sums is a debhelper program that is responsible for generating
 a DEBIAN/md5sums file, which lists the md5sums of each file in the package.
 .P
-All files in DEBIAN/ are omitted from the md5sums file.
+All files in DEBIAN/ are omitted from the md5sums file, as are all conffiles
+(unless you use the -x switch).
 .P
 The md5sums file is installed with proper permissions and ownerships.
 .SH OPTIONS
@@ -24,6 +25,10 @@ Generate md5sums files for all architecture independent packages.
 .TP
 .B \-ppackage
 Generate md5sums file for the package named "package".
+.TP
+.B \-x
+Include conffiles in the md5sums list. Note that this is redundant, and
+included elsewhere in debian packages.
 .SH NOTES
 The
 .B \-a
@@ -36,9 +41,6 @@ the control file will be effected.
 .TP
 .I DH_VERBOSE
 Enables verbose mode
-.SH BUGS
-It would be better if it did not include md5sums of conffiles, since this
-info is duplicated elsewhere.
 .SH "SEE ALSO"
 .BR /usr/doc/debhelper/README
 .SH AUTHOR
index 054e33aedceadd39216f161d6cd2532d3bcbd048..fc300e6a06df7cf14b8a142d6d2764f277a95d0b 100755 (executable)
@@ -42,6 +42,7 @@ binary-arch: build
        dh_fixperms
        dh_suidregister
        dh_installdebfiles
+       dh_du
        dh_m5dsums
        dh_builddeb
 
index bb0f4fec9a434769f0eb6135520eebb0ce3f6824..4e8b30edbcb77c7ca7562764e421745fd8db700c 100755 (executable)
@@ -40,6 +40,7 @@ binary-indep: build
        dh_fixperms -i
        dh_suidregister -i
        dh_installdebfiles -i
+       dh_du -a
        dh_md5sums -i
        dh_builddeb -i
 
@@ -62,6 +63,7 @@ binary-arch: build
        dh_fixperms -a
        dh_suidregister -a
        dh_installdebfiles -a
+       dh_du -a
        dh_md5sums -a
        dh_builddeb -a