summaryrefslogtreecommitdiff
path: root/dh_fixperms
diff options
context:
space:
mode:
authorjoey <joey>2002-04-12 03:04:35 +0000
committerjoey <joey>2002-04-12 03:04:35 +0000
commit29fd2dcb7d861e78f8b5855abd06364e8d60c2ed (patch)
treeab18887fe7bba32e72f842d5b685181df239c93d /dh_fixperms
parentea383ca972213bdda50226c536e3224a361904b8 (diff)
r518: * dh_movefiles has long been a sore point in debhelper. Inherited
from debstd, its interface and implementation suck, and I have maintained it while never really deigning to use it. Now there is a remplacment: dh_install, which ... - copies files, doesn't move them. Closes: #75360, #82649 - doesn't have that whole annoying debian/package.files vs. debian/files mess, as it uses debian/install. - supports copying empty subdirs. Closes: #133037 - doesn't use tar, thus no error reproting problems. Closes: #112538 - files are listed relative to the pwd, debian/tmp need not be used at all, so no globbing issues. Closes: #100404 - supports -X. Closes: #116902 - the whole concept of moving files out of a directory is gone, so this bug doesn't really apply. Closes: #120026 - This is exactly what Bill Allombert asked for in #117383, even though I designed it seemingly independantly. Thank you Bill! Closes: #117383 * Made debhelper's debian/rules a lot simpler by means of the above. * Updated example rules file to use dh_install. Also some reordering and other minor changes. * dh_movefiles is lightly deprecated, and when you run into its bugs and bad design, you are incouraged to just use dh_install instead. * dh_fixperms: in v4 only, make all files in bin/ dirs +x. Closes: #119039 * dh_fixperms: in v4 only, make all files in etc/init.d executable (of course there's -X ..) * dh_link: in v4 only, finds existing, non-policy-conformant symlinks and corrects them. This has the side effect of making dh_link idempotent. * Added a -h/--help option. This seems very obvious, but it never occured to me before.. * use v4 for building debhelper itself * v4 mode is done, you may now use it without fear of it changing. (This idea of this upload is to get v4 into woody so people won't run into many issues backporting from sarge to woody later on. Packages targeted for woody should continue to use whatever compatability level they are using.)
Diffstat (limited to 'dh_fixperms')
-rwxr-xr-xdh_fixperms22
1 files changed, 17 insertions, 5 deletions
diff --git a/dh_fixperms b/dh_fixperms
index 6b58bab..145d736 100755
--- a/dh_fixperms
+++ b/dh_fixperms
@@ -23,7 +23,8 @@ dh_fixperms makes all files in usr/share/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.
-It removes execute permissions from any libraries that have it set. Finally,
+It removes execute permissions from any libraries that have it set. It makes
+all files in bin/ directories and etc/init.d executable (v4 only). Finally,
it removes the setuid and setgid bits from all files in the package.
=head1 OPTIONS
@@ -58,15 +59,26 @@ foreach my $package (@{$dh{DOPACKAGES}}) {
# Fix up premissions in usr/share/doc, setting everything to not
# executable by default, but leave examples directories alone.
- complex_doit("find $tmp/usr/share/doc $tmp/usr/doc -type f $find_options ! -regex '.*/examples/.*' -print0",
- "2>/dev/null | xargs -0r chmod 644");
- complex_doit("find $tmp/usr/share/doc $tmp/usr/doc -type d $find_options -print0",
- "2>/dev/null | xargs -0r chmod 755");
+ complex_doit("find $tmp/usr/share/doc $tmp/usr/doc -type f $find_options ! -regex '.*/examples/.*' -print0 2>/dev/null",
+ "| xargs -0r chmod 644");
+ complex_doit("find $tmp/usr/share/doc $tmp/usr/doc -type d $find_options -print0 2>/dev/null",
+ "| xargs -0r chmod 755");
# Executable man pages are a bad thing..
complex_doit("find $tmp/usr/share/man $tmp/usr/man/ $tmp/usr/X11*/man/ -type f",
"$find_options -print0 2>/dev/null | xargs -0r chmod 644");
+ # v4 only
+ if (! compat(3)) {
+ # Programs in the bin and init.d dirs should be executable..
+ for my $dir (qw{usr/bin bin usr/sbin sbin etc/init.d}) {
+ if (-d "$tmp/$dir") {
+ complex_doit("find $tmp/$dir -type f $find_options -print0 2>/dev/null",
+ "| xargs -0r chmod +x");
+ }
+ }
+ }
+
# ..and so are executable shared and static libraries
# (and .la files from libtool)
complex_doit("find $tmp -perm -5 -type f",