6 Commits
8.86 ... 8.88

Author SHA1 Message Date
Joey Hess
db4ea6fa4a releasing version 8.88 2012-08-09 14:45:24 -04:00
Joey Hess
2fb28d27d2 Ensure that version numbers begin with well, a number, when building a deb, otherwise dpkg-deb will refuse to build it. 2012-08-09 14:14:59 -04:00
Joey Hess
363deec1c6 releasing version 8.87 2012-04-05 13:54:58 -04:00
Joey Hess
b69f536367 Fix adding of postinst script to deb, containing rpm permissions fixups code. Closes: #667651 2012-04-05 13:51:24 -04:00
Joey Hess
f717997da1 Use lsb-rpmbuild, not lsb-rpm. Closes: #667044
Note that lsb-rpm has been dropped from rpm in Debian unstable. So
this changes nothing really; it already fell back to rpmbuild.

And I can find no mention of either lsb-rpm or lsb-rpmbuild in the LSB
spec, although I didn't look very hard.
2012-04-04 13:36:18 -04:00
Joey Hess
3faa48b23f update copyright format url 2012-02-25 10:43:13 -04:00
5 changed files with 64 additions and 32 deletions

View File

@@ -443,17 +443,15 @@ 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") || else {
die "$dir/debian/$script: $!"; # There may be a postinst with permissions fixups even when
print OUT $data; # scripts are disabled.
close OUT; $this->savescript("postinst", undef);
}
} }
my %dirtrans=( # Note: no trailing slashes on these directory names! my %dirtrans=( # Note: no trailing slashes on these directory names!
@@ -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";

View File

@@ -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
View File

@@ -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
View File

@@ -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
View File

@@ -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: *