mirror of
https://github.com/Project-OSS-Revival/alien.git
synced 2026-04-24 14:00:17 +00:00
* Added --fixperms option. Closes: #142850
This commit is contained in:
@@ -28,6 +28,10 @@ Set to a true value if dpkg-deb is available.
|
|||||||
After the build stage, set to a hash reference of the directories we moved
|
After the build stage, set to a hash reference of the directories we moved
|
||||||
files from and to, so these moves can be reverted in the cleantree stage.
|
files from and to, so these moves can be reverted in the cleantree stage.
|
||||||
|
|
||||||
|
=item fixperms
|
||||||
|
|
||||||
|
If this is set to true, the generated debian/rules will run dh_fixperms.
|
||||||
|
|
||||||
=back
|
=back
|
||||||
|
|
||||||
=head1 METHODS
|
=head1 METHODS
|
||||||
@@ -330,7 +334,8 @@ sub prep {
|
|||||||
|
|
||||||
# A minimal rules file.
|
# A minimal rules file.
|
||||||
open (OUT, ">$dir/debian/rules") || die "$dir/debian/rules: $!";
|
open (OUT, ">$dir/debian/rules") || die "$dir/debian/rules: $!";
|
||||||
print OUT << 'EOF';
|
my $fixpermscomment = $this->fixperms ? "" : "#";
|
||||||
|
print OUT << "EOF";
|
||||||
#!/usr/bin/make -f
|
#!/usr/bin/make -f
|
||||||
# debian/rules for alien
|
# debian/rules for alien
|
||||||
|
|
||||||
@@ -340,8 +345,8 @@ sub prep {
|
|||||||
# Use v3 compatability mode, so ldconfig gets added to maint scripts.
|
# Use v3 compatability mode, so ldconfig gets added to maint scripts.
|
||||||
export DH_COMPAT=3
|
export DH_COMPAT=3
|
||||||
|
|
||||||
PACKAGE=$(shell dh_listpackages)
|
PACKAGE=\$(shell dh_listpackages)
|
||||||
PKGFILES=$(shell ls -1 |grep -v debian)
|
PKGFILES=\$(shell ls -1 |grep -v debian)
|
||||||
|
|
||||||
build:
|
build:
|
||||||
dh_testdir
|
dh_testdir
|
||||||
@@ -360,12 +365,12 @@ binary-arch: build
|
|||||||
dh_installdirs
|
dh_installdirs
|
||||||
|
|
||||||
# Copy the packages's files, if any.
|
# Copy the packages's files, if any.
|
||||||
ifneq "$(PKGFILES)" ""
|
ifneq "\$(PKGFILES)" ""
|
||||||
cp -a $(PKGFILES) debian/$(PACKAGE)
|
cp -a \$(PKGFILES) debian/\$(PACKAGE)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
#
|
#
|
||||||
# If you need to move files around in debian/$(PACKAGE) or do some
|
# If you need to move files around in debian/\$(PACKAGE) or do some
|
||||||
# binary patching, do it here
|
# binary patching, do it here
|
||||||
#
|
#
|
||||||
dh_installdocs
|
dh_installdocs
|
||||||
@@ -373,8 +378,7 @@ endif
|
|||||||
# This has been known to break on some wacky binaries.
|
# This has been known to break on some wacky binaries.
|
||||||
# dh_strip
|
# dh_strip
|
||||||
dh_compress
|
dh_compress
|
||||||
# This is too paranoid to be generally useful to alien.
|
$fixpermscomment dh_fixperms
|
||||||
# dh_fixperms
|
|
||||||
dh_makeshlibs
|
dh_makeshlibs
|
||||||
dh_installdeb
|
dh_installdeb
|
||||||
-dh_shlibdeps
|
-dh_shlibdeps
|
||||||
|
|||||||
14
alien.pl
14
alien.pl
@@ -159,6 +159,14 @@ This is enabled by default when converting from lsb packages.
|
|||||||
By default, alien adds one to the minor version number of each package it
|
By default, alien adds one to the minor version number of each package it
|
||||||
converts. If this option is given, alien will not do this.
|
converts. If this option is given, alien will not do this.
|
||||||
|
|
||||||
|
=item B<--fixperms>
|
||||||
|
|
||||||
|
Sanitize all file owners and permissions when building a deb. This may be
|
||||||
|
useful if the original package is a mess. On the other hand, it may break
|
||||||
|
some things to mess with their permissions and owners to the degree this does,
|
||||||
|
so it defaults to off. This can only be used when converting to debian
|
||||||
|
packages.
|
||||||
|
|
||||||
=item B<-h>, B<--help>
|
=item B<-h>, B<--help>
|
||||||
|
|
||||||
Display a short usage summary.
|
Display a short usage summary.
|
||||||
@@ -274,6 +282,7 @@ Usage: alien [options] file [...]
|
|||||||
--nopatch Do not use patches.
|
--nopatch Do not use patches.
|
||||||
--single Like --generate, but do not create .orig
|
--single Like --generate, but do not create .orig
|
||||||
directory.
|
directory.
|
||||||
|
--fixperms Munge/fix permissions and owners.
|
||||||
-r, --to-rpm Generate a RedHat rpm package.
|
-r, --to-rpm Generate a RedHat rpm package.
|
||||||
--to-slp Generate a Stampede slp package.
|
--to-slp Generate a Stampede slp package.
|
||||||
-l, --to-lsb Generate a LSB package.
|
-l, --to-lsb Generate a LSB package.
|
||||||
@@ -294,7 +303,7 @@ EOF
|
|||||||
|
|
||||||
# Start by processing the parameters.
|
# Start by processing the parameters.
|
||||||
my (%destformats, $generate, $install, $single, $scripts, $patchfile,
|
my (%destformats, $generate, $install, $single, $scripts, $patchfile,
|
||||||
$nopatch, $tgzdescription, $keepversion);
|
$nopatch, $tgzdescription, $keepversion, $fixperms);
|
||||||
|
|
||||||
GetOptions(
|
GetOptions(
|
||||||
"to-deb|d", sub { $destformats{deb}=1 },
|
"to-deb|d", sub { $destformats{deb}=1 },
|
||||||
@@ -311,6 +320,7 @@ GetOptions(
|
|||||||
"nopatch", \$nopatch,
|
"nopatch", \$nopatch,
|
||||||
"description=s", \$tgzdescription,
|
"description=s", \$tgzdescription,
|
||||||
"keep-version|k", \$keepversion,
|
"keep-version|k", \$keepversion,
|
||||||
|
"fixperms", \$fixperms,
|
||||||
"help|h", \&usage,
|
"help|h", \&usage,
|
||||||
"version|v", \&version,
|
"version|v", \&version,
|
||||||
) || usage();
|
) || usage();
|
||||||
@@ -423,6 +433,8 @@ foreach my $file (@ARGV) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$package->fixperms($fixperms);
|
||||||
|
|
||||||
$package->prep;
|
$package->prep;
|
||||||
|
|
||||||
# If generating build tree only, stop here with message.
|
# If generating build tree only, stop here with message.
|
||||||
|
|||||||
6
debian/changelog
vendored
6
debian/changelog
vendored
@@ -1,3 +1,9 @@
|
|||||||
|
alien (8.06) unstable; urgency=low
|
||||||
|
|
||||||
|
* Added --fixperms option. Closes: #142850
|
||||||
|
|
||||||
|
-- Joey Hess <joeyh@debian.org> Sun, 21 Apr 2002 22:19:12 -0400
|
||||||
|
|
||||||
alien (8.05) unstable; urgency=low
|
alien (8.05) unstable; urgency=low
|
||||||
|
|
||||||
* Support rpms with a description consisting of just blank lines.
|
* Support rpms with a description consisting of just blank lines.
|
||||||
|
|||||||
Reference in New Issue
Block a user