]> git.donarmstrong.com Git - debhelper.git/commitdiff
r45: Initial Import
authorjoey <joey>
Tue, 17 Aug 1999 04:41:45 +0000 (04:41 +0000)
committerjoey <joey>
Tue, 17 Aug 1999 04:41:45 +0000 (04:41 +0000)
17 files changed:
debian/changelog
debian/control
dh_fixperms
dh_fixperms.1
dh_installdirs
dh_installdirs.1
dh_installdocs
dh_installdocs.1
dh_installexamples
dh_installexamples.1
dh_lib
dh_makeshlibs
dh_makeshlibs.1
dh_suidregister
dh_suidregister.1
dh_undocumented
dh_undocumented.1

index 75e03daedd29c18df1cb98d09637fa7a1620439b..15b91d4625fa4ede478a011abb61c556b5f82d11 100644 (file)
@@ -1,3 +1,16 @@
+debhelper (0.51) unstable; urgency=low
+
+  * dh_fixperms: make shared libraries non-executable, in accordance with
+    policy. (#16644)
+  * dh_makeshlibs: introduced a -V flag, which allows you to specify explicit
+    version requirements in the shlibs file.
+  * dh_{installdirs,installdocs,installexamples,suidregister,undocumented}:
+    Added a -A flag, which makes any files/directories specified on the
+    command line apply to ALL packages acted on.
+  * Updated Standards-Version to latest.
+
+ -- Joey Hess <joeyh@master.debian.org>  Mon,  5 Jan 1998 16:15:01 -0500
+
 debhelper (0.50) unstable; urgency=low
 
   * dh_makeshlibs: added -m parameter, which can force the major number
index e22d969b9685af28a30e0566612abd2ec8f59b44..6883f62870b9f0549216f3c63f4fe23f8c8dda60 100644 (file)
@@ -2,7 +2,7 @@ Source: debhelper
 Section: devel
 Priority: optional
 Maintainer: Joey Hess <joeyh@master.debian.org>
-Standards-Version: 2.1.1.0
+Standards-Version: 2.3.0.1
 
 Package: debhelper
 Architecture: all
index 0534549ccd8299d8a84db6a01c1ae130a435e0ac..32c9dbefaa2ed62cf5bf451d2dff8f2c5e433d72 100755 (executable)
@@ -26,9 +26,15 @@ for PACKAGE in $DH_DOPACKAGES; do
                doit "chmod 755 $files"
        fi
 
-       # Executable man pages are a bad thing.
+       # Executable man pages are a bad thing..
        files=`find $TMP/usr/man/ $TMP/usr/X11*/man/ -type f 2>/dev/null | tr "\n" " "` || true
        if [ "$files" ]; then
                doit "chmod 644 $files"
        fi
+
+       # ..so are executable shared libraries.
+       files=`find $TMP -perm -5 -type f -name "*.so*" | tr "\n" " "` || true
+       if [ "$files" ]; then
+               doit "chmod a-X $files"
+       fi
 done
index c403836c15142e75afcf0633bef38960ad642dd3..1fac26c3630c3f5610862ed9cb23b9318e0d8fb2 100644 (file)
@@ -12,6 +12,7 @@ dh_fixperms makes all files in usr/doc in the package build directory
 (excluding files in the examples/ directory) be mode 644. It also changes 
 the permissions of all man pages to mode 644. It makes all files be owned by 
 root, and it removes group and other write permission from all files.
+Finally, it removes execute permissions from any libraries that have it set.
 .SH OPTIONS
 .TP
 .B \-v
@@ -43,6 +44,6 @@ Enables verbose mode
 .SH "SEE ALSO"
 .BR /usr/doc/debhelper/README
 .SH "CONFORMS TO"
-Debian policy, version 2.3.0.0
+Debian policy, version 2.3.0.1
 .SH AUTHOR
 Joey Hess <joeyh@master.debian.org>
index 51ef2ce7082762a2c61f806265df99add0fa3832..1ef311e7113e5c50d628ec69f0103ff7d65e4ace 100755 (executable)
@@ -19,7 +19,8 @@ for PACKAGE in $DH_DOPACKAGES; do
                dirs=`tr "\n" " " < debian/${EXT}dirs`
        fi
 
-       if [ "$PACKAGE" = "$DH_FIRSTPACKAGE" -a "$*" ]; then
+       if [ \( "$PACKAGE" = "$DH_FIRSTPACKAGE" -o "$DH_PARAMS_ALL" \) \
+            -a "$*" ]; then
                dirs="$* $dirs"
        fi
 
index fc5c8d623b632331fe788815aaabeddd92922a59..0fba87de8fde522dad77d56377c237deb8e79833 100644 (file)
@@ -3,7 +3,7 @@
 dh_installdirs \- create subdirectories in package build directories
 .SH SYNOPSIS
 .B dh_installdirs
-.I "[-v] [-a] [-i] [-ppackage] [-Ptmpdir] [dir ...]"
+.I "[-v] [-a] [-i] [-ppackage] [-Ptmpdir] [-A] [dir ...]"
 .SH "DESCRIPTION"
 dh_installdirs is a debhelper program that is responsible for creating
 subdirectories in package build directories.
@@ -37,9 +37,13 @@ Create directories for the package named "package".
 .B \-Ptmpdir
 Use "tmpdir" for package build directory. 
 .TP
+.B \-A
+Create any directories specified by command line parameters in ALL packages
+acted on.
+.TP
 .B dir ...
 Create these directories in the package build directory of the first package
-acted on.
+acted on. (Or in all packages if -A is specified.)
 .SH NOTES
 The
 .B \-a
index 11014229621363a72c035cdaded36928e20d42ce..f345a28218390426cc343c2f7f65000ac0200646 100755 (executable)
@@ -20,7 +20,8 @@ for PACKAGE in $DH_DOPACKAGES; do
                docs=`tr "\n" " " < debian/${EXT}docs`
        fi
 
-       if [ "$PACKAGE" = "$DH_FIRSTPACKAGE" -a "$*" ]; then
+       if [ \( "$PACKAGE" = "$DH_FIRSTPACKAGE" -o "$DH_PARAMS_ALL" \) \
+            -a "$*" ]; then
                docs="$* $docs"
        fi
 
index 86195b795fb67b223ca6275a30d569ffaa627757..ab9ed47679b504c237eace0d1272624233e8628b 100644 (file)
@@ -3,7 +3,7 @@
 dh_installdocs \- install documentation into package build directories
 .SH SYNOPSIS
 .B dh_installdocs
-.I "[-v] [-a] [-i] [-ppackage] [-Ptmpdir] [file ...]"
+.I "[-v] [-a] [-i] [-ppackage] [-Ptmpdir] [-A] [file ...]"
 .SH "DESCRIPTION"
 dh_installdocs is a debhelper program that is responsible for installing
 documentation into usr/doc/package in package build directories.
@@ -43,8 +43,13 @@ Install files for the package named "package".
 .B \-Ptmpdir
 Use "tmpdir" for package build directory. 
 .TP
+.B \-A
+Install all files specified by command line parameters in ALL packages
+acted on.
+.TP
 .B file ...
-Install these files as documentation into the first package acted on.
+Install these files as documentation into the first package acted on. (Or in
+all packages if -A is specified).
 .SH NOTES
 The
 .B \-a
index 98a752df107350804cf75073b2c451e3fbe2cb81..423c647a04ca893e7e262b193afb680d1a57236c 100755 (executable)
@@ -16,7 +16,8 @@ for PACKAGE in $DH_DOPACKAGES; do
                examples=`tr "\n" " " < debian/${EXT}examples`
        fi
 
-       if [ "$PACKAGE" = "$DH_FIRSTPACKAGE" -a "$*" ]; then
+       if [ \( "$PACKAGE" = "$DH_FIRSTPACKAGE" -o "$DH_PARAMS_ALL" \) \
+            -a "$*" ]; then
                examples="$* $examples"
        fi
 
index f70b98ceb640375c04502ca70e2cbe7f0655afe8..e46ed826fa63944c56401c97d42ffa3314fcf4ed 100644 (file)
@@ -3,7 +3,7 @@
 dh_installexamples \- install example files into package build directories
 .SH SYNOPSIS
 .B dh_installexamples
-.I "[-v] [-a] [-i] [-ppackage] [-Ptmpdir] [file ...]"
+.I "[-v] [-a] [-i] [-ppackage] [-Ptmpdir] [-A] [file ...]"
 .SH "DESCRIPTION"
 dh_installexamples is a debhelper program that is responsible for installing
 examples into usr/doc/package/examples in package build directories.
@@ -33,8 +33,13 @@ Install files for the package named "package".
 .B \-Ptmpdir
 Use "tmpdir" for package build directory. 
 .TP
+.B \-A
+Install any files specified by command line parameters in ALL packages
+acted on.
+.TP
 .B file ...
-Install these files as examples into the first package acted on.
+Install these files as examples into the first package acted on. (Or into all
+packages if -A is specified.)
 .SH NOTES
 The
 .B \-a
diff --git a/dh_lib b/dh_lib
index 2c2b995f5dabf312b12fd756669fbca96c27a75a..39dae2a5d6ecb4eccf553cd2bc693957b581efc1 100644 (file)
--- a/dh_lib
+++ b/dh_lib
@@ -10,6 +10,7 @@ doit() {
        eval '$@'
 }
 
+
 # This is an identical command to doit, except the parameter passed to it
 # are evaled with double quotes. This version can handle compound commands.
 complex_doit() {
@@ -52,6 +53,7 @@ pkgext() {
 }
 
 # Returns 1 if the package is a native debian package, null otherwise.
+# As a side effect, sets $VERSION to the version of this package.
 # Caches return code so it only needs to run dpkg-parsechangelog once.
 isnative() {
        if [ -z "$DH_ISNATIVE" ]; then
@@ -141,7 +143,7 @@ get_arch_indep_packages() {
 # Argument processing and global variable initialization is below.
 
 # Parse command line.
-set -- `getopt xvidrnakp:P:u:m: $*`
+set -- `getopt xvidrnakVAp:P:u:m: $*`
 
 for i; do
        case "$i"
@@ -202,6 +204,14 @@ for i; do
                        shift
                        shift
                        ;;
+               -V)
+                       DH_V_FLAG=1
+                       shift
+                       ;;
+               -A)
+                       DH_PARAMS_ALL=1
+                       shift
+                       ;;
                --)
                        shift
                        break
index 6cf9c80344427831395a607bdf9a877754337851..f96c327f7e80550aa989ea2b77ecc32b542b68d6 100755 (executable)
@@ -14,9 +14,9 @@ for PACKAGE in $DH_DOPACKAGES; do
 
        for file in `find $TMP -type f -name "*.so*" | tr "\n" " "` ; do
                LIBRARY=`expr $file : ".*/\(.*\)\.so\..*"` || true
-               VERSION=`expr $file : ".*/.*\.so\.\(.*\)"` || true
+               LIB_VERSION=`expr $file : ".*/.*\.so\.\(.*\)"` || true
                if [ -z "$DH_M_PARAMS" ]; then
-                       MAJOR=`expr $VERSION : "\([0-9]*\)\."` || true
+                       MAJOR=`expr $LIB_VERSION : "\([0-9]*\)\."` || true
                else
                        MAJOR="$DH_M_PARAMS"
                fi
@@ -24,6 +24,16 @@ for PACKAGE in $DH_DOPACKAGES; do
                if [ ! -d "$TMP/DEBIAN" ] ; then
                        doit "install -d $TMP/DEBIAN"
                fi
+               if [ "$DH_V_FLAG" ]; then
+                       if [ "$*" ]; then
+                               PACKAGE="$*"
+                       else
+                               # Call isnative becuase it sets $VERSION
+                               # as a side effect.
+                               isnative
+                               PACKAGE="$PACKAGE (>= $VERSION)"
+                       fi
+               fi
                complex_doit "echo '$LIBRARY $MAJOR $PACKAGE' >>$TMP/DEBIAN/shlibs"
        done
 
index 02c7ea8ae503df2aa180c8a4c3c15583781c880c..056cc0f2f339f39c2d4fe7b28c01ff19a3a622fd 100644 (file)
@@ -3,7 +3,7 @@
 dh_makeshlibs \- automatically create shlibs file
 .SH SYNOPSIS
 .B dh_makeshlibs
-.I "[-v] [-a] [-i] [-mmajor] [-Ptmpdir] [-ppackage]"
+.I "[-v] [-a] [-i] [-mmajor] [-Ptmpdir] [-ppackage] [-mmajor] [-V [dependancies]]"
 .SH "DESCRIPTION"
 dh_makeshlibs is a debhelper program that automatically scans for shared
 libraries, and generates a shlibs file for the libraries it finds.
@@ -30,6 +30,31 @@ Use "tmpdir" for package build directory.
 .B \-mmajor
 Instead of trying to guess the major number of the library from the filename
 of the library, use the major number specified after the -m parameter.
+.TP
+.B \-V [dependancies]
+By default, the shlibs file generated by this program does not make packages
+depend on any particular version of the package containing the shared
+library. It may be necessary for you to add some version dependancy
+information to the shlibs file. If -V is specified with no dependancy
+information, the current version of the package is plugged into a dependancy
+that looks like "packagename (>= packageversion)". If -V is specified with
+parameters, the parameters can be used to specify the exact dependancy
+information needed (be sure to include the package name).
+.SH EXAMPLES
+.TP
+.B dh_makeshlibs
+Assuming this is a package named libfoobar1, generates a shlibs file that
+looks something like:
+  libfoobar 1 libfoobar1
+.TP
+.B dh_makeshlibs \-V
+Assuming the current version of the package is 1.0-3, generates a shlibs
+file that looks something like:
+  libfoobar 1 libfoobar1 (>= 1.0-3)
+.TP
+.B dh_makeshlibs \-V "libfoobar1 (>= 1.0)"
+Generates a shlibs file that looks something like:
+  libfoobar 1 libfoobar1 (>= 1.0)
 .SH NOTES
 The
 .B \-a
@@ -45,6 +70,14 @@ Enables verbose mode
 .SH "SEE ALSO"
 .BR /usr/doc/debhelper/README
 .SH BUGS
+Due to limitations in
+.BR getopt (1)
+, I had to fudge a bit on how the -V parameter really works. When -V is
+specified, it's really examining the rest of the command line for any text
+that isn't a switch, and using that for the dependancy information. This
+means that the -V switch and any dependancy parameters should come last on
+the command line.
+.P
 There is no guarantee that the program will get the shlibs file right. For
 example, it may not correctly guess the major number of your package. In
 cases like these (and perhaps in general, just to be safe), it is better to
index 42e4d16da34f86b1550b7a3f71034608763f9b84..3f7622af367806ca255cbf50b1f8068aabd7d860 100755 (executable)
@@ -19,7 +19,8 @@ for PACKAGE in $DH_DOPACKAGES; do
                files=`tr "\n" " " < debian/${EXT}suid`
        fi
 
-       if [ "$PACKAGE" = "$DH_FIRSTPACKAGE" -a "$*" ]; then
+       if [ \( "$PACKAGE" = "$DH_FIRSTPACKAGE" -o "$DH_PARAMS_ALL" \) \
+            -a "$*" ]; then
                files="$* $files"
        fi
 
index d374a4c17411f1f3aa8b8db09d2e1b58aa1e944e..ef5b08dcfb0cf1b1e0f516aad1fec874cf8c7233 100644 (file)
@@ -3,7 +3,7 @@
 dh_suidregister \- set up package to register files with suidregister
 .SH SYNOPSIS
 .B dh_suidregister
-.I "[-v] [-a] [-i] [-ppackage] [-Ptmpdir] [file ...]"
+.I "[-v] [-a] [-i] [-ppackage] [-Ptmpdir] [-A] [file ...]"
 .SH "DESCRIPTION"
 dh_suidregister is a debhelper program that is responsible for modifying the
 postinst and postrm scripts of a package so the package will register files
@@ -44,8 +44,14 @@ Register files for the package named "package".
 .B \-Ptmpdir
 Use "tmpdir" for package build directory. 
 .TP
+.B \-A
+Register any files specified by command line parameters in ALL packages
+acted on. I doubt anyone will find this useful, it's here for consitency
+with other debhelper programs.
+.TP
 .B file ...
-Register these files in the first package acted on.
+Register these files in the first package acted on. (Or in all packages if
+-A is specified.)
 .SH NOTES
 The
 .B \-a
index e8ca0e010a1fd2d05c1f90463890038b16748e5d..31b2f987463b99cf3f049a925a359167d7ffdc21 100755 (executable)
@@ -19,7 +19,8 @@ for PACKAGE in $DH_DOPACKAGES; do
                undoc=`tr "\n" " " < debian/${EXT}undocumented`
        fi
 
-       if [ "$PACKAGE" = "$DH_FIRSTPACKAGE" -a "$*" ]; then
+       if [ \( "$PACKAGE" = "$DH_FIRSTPACKAGE" -o "$DH_PARAMS_ALL" \) \
+            -a "$*" ]; then
                undoc="$* $undoc"
        fi
 
index 2bbf24a1bdbdaba3dd7f953db96195a7636e3a64..9df8e311bcdc9c31454f850f9d3bf69eaf155a9c 100644 (file)
@@ -3,7 +3,7 @@
 dh_undocumented \- make symlinks to undocumented.7.gz man page
 .SH SYNOPSIS
 .B dh_undocumented
-.I "[-v] [-a] [-i] [-ppackage] [-Ptmpdir] [manpage ...]"
+.I "[-v] [-a] [-i] [-ppackage] [-Ptmpdir] [-A] [manpage ...]"
 .SH "DESCRIPTION"
 dh_undocumented is a debhelper program that is responsible for making
 symlinks to the
@@ -47,9 +47,15 @@ Install undocumented man page symlinks for the package named "package".
 .B \-Ptmpdir
 Use "tmpdir" for package build directory. 
 .TP
+.B \-A
+Install undocumented man page symlinks for any man pages specified by 
+command line parameters in ALL packages acted on. I doubt anyone will find
+this useful, it's here for consitency with other debhelper programs.
+.TP
 .B manpage ...
 Install undocumented man page symlinks for each of these man pages
-into the first package acted on.
+into the first package acted on. (Or in all packages acted on if -A is
+specified.)
 .SH NOTES
 The
 .B \-a