+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
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
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
(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
.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>
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
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.
.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
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
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.
.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
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
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.
.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
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() {
}
# 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
# 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"
shift
shift
;;
+ -V)
+ DH_V_FLAG=1
+ shift
+ ;;
+ -A)
+ DH_PARAMS_ALL=1
+ shift
+ ;;
--)
shift
break
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
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
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.
.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
.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
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
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
.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
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
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
.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