mirror of
https://github.com/Project-OSS-Revival/alien.git
synced 2026-04-25 14:00:17 +00:00
Compare commits
6 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
db4ea6fa4a | ||
|
|
2fb28d27d2 | ||
|
|
363deec1c6 | ||
|
|
b69f536367 | ||
|
|
f717997da1 | ||
|
|
3faa48b23f |
@@ -443,18 +443,16 @@ EOF
|
|||||||
close OUT;
|
close OUT;
|
||||||
$this->do("chmod", 755, "$dir/debian/rules");
|
$this->do("chmod", 755, "$dir/debian/rules");
|
||||||
|
|
||||||
# Save any scripts.
|
|
||||||
if ($this->usescripts) {
|
if ($this->usescripts) {
|
||||||
foreach my $script (qw{postinst postrm preinst prerm}) {
|
foreach my $script (qw{postinst postrm preinst prerm}) {
|
||||||
my $data=$this->$script();
|
$this->savescript($script, $this->$script());
|
||||||
next unless defined $data;
|
|
||||||
next if $data =~ m/^\s*$/;
|
|
||||||
open (OUT,">$dir/debian/$script") ||
|
|
||||||
die "$dir/debian/$script: $!";
|
|
||||||
print OUT $data;
|
|
||||||
close OUT;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
else {
|
||||||
|
# There may be a postinst with permissions fixups even when
|
||||||
|
# scripts are disabled.
|
||||||
|
$this->savescript("postinst", undef);
|
||||||
|
}
|
||||||
|
|
||||||
my %dirtrans=( # Note: no trailing slashes on these directory names!
|
my %dirtrans=( # Note: no trailing slashes on these directory names!
|
||||||
# Move files to FHS-compliant locations, if possible.
|
# Move files to FHS-compliant locations, if possible.
|
||||||
@@ -596,14 +594,13 @@ sub version {
|
|||||||
# get
|
# get
|
||||||
return unless defined wantarray; # optimization
|
return unless defined wantarray; # optimization
|
||||||
$_=$this->{version};
|
$_=$this->{version};
|
||||||
|
# Make sure the version contains a digit at the start, as required
|
||||||
|
# by dpkg-deb.
|
||||||
|
unless (/^[0-9]/) {
|
||||||
|
$_="0".$_;
|
||||||
|
}
|
||||||
# filter out some characters not allowed in debian versions
|
# filter out some characters not allowed in debian versions
|
||||||
s/[^-.+~:A-Za-z0-9]//g; # see lib/dpkg/parsehelp.c parseversion
|
s/[^-.+~:A-Za-z0-9]//g; # see lib/dpkg/parsehelp.c parseversion
|
||||||
# Make sure the version contains digets.
|
|
||||||
unless (/[0-9]/) {
|
|
||||||
# Drat. Well, add some. dpkg-deb won't work
|
|
||||||
# on a version w/o numbers!
|
|
||||||
return $_."0";
|
|
||||||
}
|
|
||||||
return $_;
|
return $_;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -729,30 +726,50 @@ sub username {
|
|||||||
return $username;
|
return $username;
|
||||||
}
|
}
|
||||||
|
|
||||||
=item postinst
|
=item savescript
|
||||||
|
|
||||||
Returns the postinst. This may include generated shell code to set owners
|
Saves script to debian directory.
|
||||||
and groups from the owninfo field, and update modes from the modeinfo field.
|
|
||||||
|
|
||||||
=cut
|
=cut
|
||||||
|
|
||||||
sub postinst {
|
sub savescript {
|
||||||
my $this=shift;
|
my $this=shift;
|
||||||
|
my $script=shift;
|
||||||
|
my $data=shift;
|
||||||
|
|
||||||
if (@_) {
|
if ($script eq 'postinst') {
|
||||||
$this->{postinst}=shift;
|
$data=$this->gen_postinst($data);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
my $dir=$this->unpacked_tree;
|
||||||
|
|
||||||
|
return unless defined $data;
|
||||||
|
next if $data =~ m/^\s*$/;
|
||||||
|
open (OUT,">$dir/debian/$script") ||
|
||||||
|
die "$dir/debian/$script: $!";
|
||||||
|
print OUT $data;
|
||||||
|
close OUT;
|
||||||
|
}
|
||||||
|
|
||||||
|
=item gen_postinst
|
||||||
|
|
||||||
|
Modifies or creates a postinst. This may include generated shell code to set
|
||||||
|
owners and groups from the owninfo field, and update modes from the modeinfo
|
||||||
|
field.
|
||||||
|
|
||||||
|
=cut
|
||||||
|
|
||||||
|
sub gen_postinst {
|
||||||
|
my $this=shift;
|
||||||
|
my $postinst=shift;
|
||||||
|
|
||||||
my $owninfo = $this->owninfo;
|
my $owninfo = $this->owninfo;
|
||||||
my $modeinfo = $this->modeinfo;
|
my $modeinfo = $this->modeinfo;
|
||||||
my $postinst = $this->{postinst};
|
return $postinst unless ref $owninfo && %$owninfo;
|
||||||
return $postinst unless ref $owninfo;
|
|
||||||
|
|
||||||
# If there is no postinst, let's make one up..
|
# If there is no postinst, let's make one up..
|
||||||
$postinst="#!/bin/sh\n" unless defined $postinst && length $postinst;
|
$postinst="#!/bin/sh\n" unless defined $postinst && length $postinst;
|
||||||
|
|
||||||
return $postinst unless %$owninfo;
|
|
||||||
|
|
||||||
my ($firstline, $rest)=split(/\n/, $postinst, 2);
|
my ($firstline, $rest)=split(/\n/, $postinst, 2);
|
||||||
if ($firstline !~ m/^#!\s*\/bin\/(ba)?sh/) {
|
if ($firstline !~ m/^#!\s*\/bin\/(ba)?sh/) {
|
||||||
print STDERR "warning: unable to add ownership fixup code to postinst as the postinst is not a shell script!\n";
|
print STDERR "warning: unable to add ownership fixup code to postinst as the postinst is not a shell script!\n";
|
||||||
|
|||||||
@@ -96,8 +96,8 @@ sub revert {
|
|||||||
|
|
||||||
=item build
|
=item build
|
||||||
|
|
||||||
Uses the parent's build method. If a lsb-rpm is available, uses it to build
|
Uses the parent's build method. If a lsb-rpmbuild is available, uses it to
|
||||||
the package.
|
build the package.
|
||||||
|
|
||||||
=cut
|
=cut
|
||||||
|
|
||||||
@@ -105,8 +105,8 @@ sub build {
|
|||||||
my $this=shift;
|
my $this=shift;
|
||||||
my $buildcmd=shift || 'rpmbuild';
|
my $buildcmd=shift || 'rpmbuild';
|
||||||
foreach (split(/:/,$ENV{PATH})) {
|
foreach (split(/:/,$ENV{PATH})) {
|
||||||
if (-x "$_/lsb-rpm") {
|
if (-x "$_/lsb-rpmbuild") {
|
||||||
$buildcmd='lsb-rpm';
|
$buildcmd='lsb-rpmbuild';
|
||||||
last;
|
last;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
15
debian/changelog
vendored
15
debian/changelog
vendored
@@ -1,3 +1,18 @@
|
|||||||
|
alien (8.88) unstable; urgency=low
|
||||||
|
|
||||||
|
* Ensure that version numbers begin with well, a number, when building a
|
||||||
|
deb, otherwise dpkg-deb will refuse to build it.
|
||||||
|
|
||||||
|
-- Joey Hess <joeyh@debian.org> Thu, 09 Aug 2012 14:44:49 -0400
|
||||||
|
|
||||||
|
alien (8.87) unstable; urgency=low
|
||||||
|
|
||||||
|
* Use lsb-rpmbuild, not lsb-rpm. Closes: #667044
|
||||||
|
* Fix adding of postinst script to deb, containing rpm permissions
|
||||||
|
fixups code. Closes: #667651
|
||||||
|
|
||||||
|
-- Joey Hess <joeyh@debian.org> Thu, 05 Apr 2012 13:53:29 -0400
|
||||||
|
|
||||||
alien (8.86) unstable; urgency=low
|
alien (8.86) unstable; urgency=low
|
||||||
|
|
||||||
* Filter out illegal characters in version number when building a deb.
|
* Filter out illegal characters in version number when building a deb.
|
||||||
|
|||||||
2
debian/control
vendored
2
debian/control
vendored
@@ -3,7 +3,7 @@ Section: admin
|
|||||||
Priority: optional
|
Priority: optional
|
||||||
Build-Depends: debhelper (>= 7.0.50)
|
Build-Depends: debhelper (>= 7.0.50)
|
||||||
Maintainer: Joey Hess <joeyh@debian.org>
|
Maintainer: Joey Hess <joeyh@debian.org>
|
||||||
Standards-Version: 3.9.2
|
Standards-Version: 3.9.3
|
||||||
Vcs-Git: git://git.kitenet.net/alien
|
Vcs-Git: git://git.kitenet.net/alien
|
||||||
Homepage: http://kitenet.net/~joey/code/alien/
|
Homepage: http://kitenet.net/~joey/code/alien/
|
||||||
|
|
||||||
|
|||||||
2
debian/copyright
vendored
2
debian/copyright
vendored
@@ -1,4 +1,4 @@
|
|||||||
Format: http://dep.debian.net/deps/dep5/
|
Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
|
||||||
Source: native package
|
Source: native package
|
||||||
|
|
||||||
Files: *
|
Files: *
|
||||||
|
|||||||
Reference in New Issue
Block a user