mirror of
https://github.com/Project-OSS-Revival/alien.git
synced 2026-04-25 14:00:17 +00:00
Compare commits
43 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
f680d3af91 | ||
|
|
5b605e1960 | ||
|
|
cbf330f982 | ||
|
|
bcd8dae206 | ||
|
|
edcd96f80f | ||
|
|
c21645ddfa | ||
|
|
0f8fa0df54 | ||
|
|
2a84d6e8ec | ||
|
|
66a1247dfd | ||
|
|
e921e1417f | ||
|
|
d15598e944 | ||
|
|
ee792cb76c | ||
|
|
ecabe240bc | ||
|
|
b2421b584a | ||
|
|
7893ffb4ed | ||
|
|
5e1d2c9fa4 | ||
|
|
3c8631f8fd | ||
|
|
17bcd710f7 | ||
|
|
ac38739a74 | ||
|
|
dbf7fdfa5b | ||
|
|
15b2f7ff92 | ||
|
|
7a06220ed7 | ||
|
|
d39d884f1b | ||
|
|
9edefc1c48 | ||
|
|
13b74f3141 | ||
|
|
6230493dfe | ||
|
|
cfc242e886 | ||
|
|
ffcb91fa04 | ||
|
|
f0c859c1c4 | ||
|
|
2ea474e531 | ||
|
|
f81986d554 | ||
|
|
0f3f0ab92c | ||
|
|
a712ba401f | ||
|
|
cc5c0ade81 | ||
|
|
4697a558d0 | ||
|
|
c1a3316e71 | ||
|
|
7382aaf75f | ||
|
|
ebf2cb2f06 | ||
|
|
50908ed5ed | ||
|
|
f84c8a6b7e | ||
|
|
2bb90cb16a | ||
|
|
00018b6425 | ||
|
|
33a60c1974 |
2
.gitignore
vendored
Normal file
2
.gitignore
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
alien.lsm
|
||||
alien.spec
|
||||
@@ -306,6 +306,21 @@ the filename of the generated package.
|
||||
|
||||
sub build {}
|
||||
|
||||
=item incrementrelease
|
||||
|
||||
This method should increment the release field of the package by
|
||||
the specified number.
|
||||
|
||||
=cut
|
||||
|
||||
sub incrementrelease {
|
||||
my $this=shift;
|
||||
my $number=shift;
|
||||
$^W=0; # Shut of possible "is not numeric" warning.
|
||||
$this->release($this->release + $number);
|
||||
$^W=1; # Re-enable warnings.
|
||||
}
|
||||
|
||||
=item DESTROY
|
||||
|
||||
When an object is destroyed, it cleans some stuff up. In particular, if the
|
||||
@@ -431,7 +446,8 @@ sub do {
|
||||
}
|
||||
else {
|
||||
# parent
|
||||
return (waitpid($pid, 0) > 0);
|
||||
my $ret=(waitpid($pid, 0) > 0);
|
||||
return ! $ret || ! $?;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -87,8 +87,11 @@ sub install {
|
||||
my $this=shift;
|
||||
my $deb=shift;
|
||||
|
||||
my $v=$Alien::Package::verbose;
|
||||
$Alien::Package::verbose=2;
|
||||
$this->do("dpkg", "--no-force-overwrite", "-i", $deb)
|
||||
or die "Unable to install";
|
||||
$Alien::Package::verbose=$v;
|
||||
}
|
||||
|
||||
=item test
|
||||
@@ -227,7 +230,7 @@ sub scan {
|
||||
|
||||
=item unpack
|
||||
|
||||
Implment the unpack method to unpack a deb file.
|
||||
Implement the unpack method to unpack a deb file.
|
||||
|
||||
=cut
|
||||
|
||||
@@ -331,10 +334,14 @@ sub prep {
|
||||
print OUT $this->name." (".$this->version."-".$this->release.") experimental; urgency=low\n";
|
||||
print OUT "\n";
|
||||
print OUT " * Converted from .".$this->origformat." format to .deb by alien version $Alien::Version\n";
|
||||
print OUT " \n";
|
||||
if (defined $this->changelogtext) {
|
||||
my $ct=$this->changelogtext;
|
||||
$ct=~s/^/ /gm;
|
||||
print OUT $ct."\n";
|
||||
}
|
||||
print OUT "\n";
|
||||
print OUT " -- ".$this->username." <".$this->email."> ".$this->date."\n";
|
||||
print OUT "\n";
|
||||
print OUT $this->changelogtext."\n" if defined $this->changelogtext;
|
||||
close OUT;
|
||||
|
||||
# Control file.
|
||||
@@ -522,7 +529,7 @@ sub cleantree {
|
||||
Set/get package name.
|
||||
|
||||
Always returns the packge name in lowercase with all invalid characters
|
||||
returned. The name is however, stored unchanged.
|
||||
rmoved. The name is however, stored unchanged.
|
||||
|
||||
=cut
|
||||
|
||||
@@ -578,7 +585,7 @@ sub version {
|
||||
# Make sure the version contains digets.
|
||||
unless (/[0-9]/) {
|
||||
# Drat. Well, add some. dpkg-deb won't work
|
||||
# # on a version w/o numbers!
|
||||
# on a version w/o numbers!
|
||||
return $_."0";
|
||||
}
|
||||
return $_;
|
||||
@@ -646,10 +653,10 @@ Returns the date, in rfc822 format.
|
||||
sub date {
|
||||
my $this=shift;
|
||||
|
||||
my $date=$this->runpipe(1, "822-date");
|
||||
my $date=$this->runpipe(1, "date -R");
|
||||
chomp $date;
|
||||
if (!$date) {
|
||||
die "822-date did not return a valid result. You probably need to install the dpkg-dev debian package";
|
||||
die "date -R did not return a valid result.";
|
||||
}
|
||||
|
||||
return $date;
|
||||
@@ -676,7 +683,7 @@ sub email {
|
||||
close MAILNAME;
|
||||
}
|
||||
if (!$mailname) {
|
||||
$mailname=$this->runpipe(1, "hostname -f");
|
||||
$mailname=$this->runpipe(1, "hostname");
|
||||
chomp $mailname;
|
||||
}
|
||||
return "$login\@$mailname";
|
||||
@@ -731,7 +738,7 @@ sub postinst {
|
||||
return $postinst unless %$owninfo;
|
||||
|
||||
my ($firstline, $rest)=split(/\n/, $postinst, 2);
|
||||
if ($firstline !~ m/^#!\s*\/bin\/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";
|
||||
return $postinst;
|
||||
}
|
||||
@@ -747,7 +754,7 @@ sub postinst {
|
||||
return "$firstline\n$permscript\n$rest";
|
||||
}
|
||||
|
||||
=cut
|
||||
=back
|
||||
|
||||
=head1 AUTHOR
|
||||
|
||||
|
||||
@@ -103,7 +103,7 @@ the package.
|
||||
|
||||
sub build {
|
||||
my $this=shift;
|
||||
my $buildcmd=shift || 'rpm';
|
||||
my $buildcmd=shift || 'rpmbuild';
|
||||
foreach (split(/:/,$ENV{PATH})) {
|
||||
if (-x "$_/lsb-rpm") {
|
||||
$buildcmd='lsb-rpm';
|
||||
@@ -113,6 +113,14 @@ sub build {
|
||||
$this->SUPER::build($buildcmd);
|
||||
}
|
||||
|
||||
=item incrementrelease
|
||||
|
||||
LSB package versions are not changed.
|
||||
|
||||
=cut
|
||||
|
||||
sub incrementrelease {}
|
||||
|
||||
=back
|
||||
|
||||
=head1 AUTHOR
|
||||
|
||||
@@ -106,8 +106,11 @@ sub install {
|
||||
my $pkg=shift;
|
||||
|
||||
if (-x "/usr/sbin/pkgadd") {
|
||||
my $v=$Alien::Package::verbose;
|
||||
$Alien::Package::verbose=2;
|
||||
$this->do("/usr/sbin/pkgadd", "-d .", "$pkg")
|
||||
or die "Unable to install";
|
||||
$Alien::Package::verbose=$v;
|
||||
}
|
||||
else {
|
||||
die "Sorry, I cannot install the generated .pkg file because /usr/sbin/pkgadd is not present.\n";
|
||||
@@ -259,7 +262,7 @@ sub prep {
|
||||
# grep {/^\./} readdir DIR;
|
||||
# closedir DIR;
|
||||
|
||||
$this->do("cd $dir; find . -print | pkgproto > ./prototype")
|
||||
$this->do("cd $dir; find . -print | sed -e '/.\\/prototype\$/d' | pkgproto > ./prototype")
|
||||
|| die "error during pkgproto: $!\n";
|
||||
|
||||
open(PKGPROTO, ">>$dir/prototype")
|
||||
@@ -324,6 +327,8 @@ sub build {
|
||||
return $name;
|
||||
}
|
||||
|
||||
=back
|
||||
|
||||
=head1 AUTHOR
|
||||
|
||||
Mark Hershberger <mah@everybody.org>
|
||||
|
||||
@@ -53,8 +53,11 @@ sub install {
|
||||
my $this=shift;
|
||||
my $rpm=shift;
|
||||
|
||||
my $v=$Alien::Package::verbose;
|
||||
$Alien::Package::verbose=2;
|
||||
$this->do("rpm -ivh ".(exists $ENV{RPMINSTALLOPT} ? $ENV{RPMINSTALLOPT} : '').$rpm)
|
||||
or die "Unable to install";
|
||||
$Alien::Package::verbose=$v;
|
||||
}
|
||||
|
||||
=item scan
|
||||
@@ -75,18 +78,20 @@ sub scan {
|
||||
POSTUN => 'postrm',
|
||||
);
|
||||
|
||||
# These fields need no translation except case.
|
||||
foreach (qw{name version release arch changelogtext summary
|
||||
description copyright prefixes}) {
|
||||
$fieldtrans{uc $_}=$_;
|
||||
}
|
||||
|
||||
# Use --queryformat to pull out all the fields we need.
|
||||
foreach my $field (keys(%fieldtrans)) {
|
||||
$_=$this->runpipe(0, "LANG=C rpm -qp --queryformat \%{$field} $file");
|
||||
$field=$fieldtrans{$field};
|
||||
$_='' if $_ eq '(none)';
|
||||
$this->$field($_);
|
||||
foreach my $field (qw{NAME VERSION RELEASE ARCH CHANGELOGTEXT
|
||||
SUMMARY DESCRIPTION COPYRIGHT PREFIXES},
|
||||
keys(%fieldtrans)) {
|
||||
my $value=$this->runpipe(0, "LANG=C rpm -qp --queryformat \%{$field} $file");
|
||||
my $key;
|
||||
if (exists $fieldtrans{$field}) {
|
||||
$key=$fieldtrans{$field};
|
||||
}
|
||||
else {
|
||||
$key=lc($field);
|
||||
}
|
||||
$value='' if $value eq '(none)';
|
||||
$this->$key($value);
|
||||
}
|
||||
|
||||
# Get the conffiles list.
|
||||
@@ -165,8 +170,8 @@ sub unpack {
|
||||
close RPMLIST;
|
||||
foreach my $file (`cd $workdir; find ./`) {
|
||||
chomp $file;
|
||||
if (! $seenfiles{$file} && -d $file && ! -l $file) {
|
||||
$this->do("chmod 755 $file");
|
||||
if (! $seenfiles{$file} && -d "$workdir/$file" && ! -l "$workdir/$file") {
|
||||
$this->do("chmod 755 $workdir/$file");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -182,30 +187,45 @@ sub unpack {
|
||||
#
|
||||
# Test to see if the package contains the prefix directory already.
|
||||
if (defined $this->prefixes && ! -e "$workdir/".$this->prefixes) {
|
||||
my $relocate=1;
|
||||
|
||||
# Get the files to move.
|
||||
my @filelist=glob("$workdir/*");
|
||||
|
||||
|
||||
# Now, make the destination directory.
|
||||
my $collect=$workdir;
|
||||
foreach (split m:/:, $this->prefixes) {
|
||||
if ($_ ne '') { # this keeps us from using anything but relative paths.
|
||||
$collect.="/$_";
|
||||
if (-d $collect) {
|
||||
# The package contains a parent
|
||||
# directory of the relocation
|
||||
# directory. Since it's impossible
|
||||
# to move a parent directory into
|
||||
# its child, bail out and do
|
||||
# nothing.
|
||||
$relocate=0;
|
||||
last;
|
||||
}
|
||||
$this->do("mkdir", $collect) || die "unable to mkdir $collect: $!";
|
||||
}
|
||||
}
|
||||
# Now move all files in the package to the directory we made.
|
||||
if (@filelist) {
|
||||
$this->do("mv", @filelist, "$workdir/".$this->prefixes)
|
||||
or die "error moving unpacked files into the default prefix directory: $!";
|
||||
}
|
||||
|
||||
# Deal with relocating conffiles.
|
||||
my @cf;
|
||||
foreach my $cf (@{$this->conffiles}) {
|
||||
$cf=$this->prefixes.$cf;
|
||||
push @cf, $cf;
|
||||
if ($relocate) {
|
||||
# Now move all files in the package to the directory we made.
|
||||
if (@filelist) {
|
||||
$this->do("mv", @filelist, "$workdir/".$this->prefixes)
|
||||
or die "error moving unpacked files into the default prefix directory: $!";
|
||||
}
|
||||
|
||||
# Deal with relocating conffiles.
|
||||
my @cf;
|
||||
foreach my $cf (@{$this->conffiles}) {
|
||||
$cf=$this->prefixes.$cf;
|
||||
push @cf, $cf;
|
||||
}
|
||||
$this->conffiles([@cf]);
|
||||
}
|
||||
$this->conffiles([@cf]);
|
||||
}
|
||||
|
||||
# rpm files have two sets of permissions; the set in the cpio
|
||||
@@ -397,7 +417,7 @@ sub build {
|
||||
$opts="--target ".$this->arch;
|
||||
}
|
||||
|
||||
$opts.=" $ENV{RPMBUILDOPTS}" if exists $ENV{RPMBUILDOPTS};
|
||||
$opts.=" $ENV{RPMBUILDOPT}" if exists $ENV{RPMBUILDOPT};
|
||||
my $command="cd $dir; $buildcmd -bb $opts ".$this->name."-".$this->version."-".$this->release.".spec";
|
||||
my $log=$this->runpipe(1, "$command 2>&1");
|
||||
if ($?) {
|
||||
@@ -443,11 +463,20 @@ debian/slackware scripts can be anything -- perl programs or binary files
|
||||
-- and rpm is limited to only shell scripts, we need to encode the files
|
||||
and add a scrap of shell script to make it unextract and run on the fly.
|
||||
|
||||
When setting a value, we do some mangling too. Rpm maitainer scripts
|
||||
are typically shell scripts, but often lack the leading #!/bin/sh
|
||||
This can confuse dpkg, so add the #!/bin/sh if it looks like there
|
||||
When setting a value, we do some mangling too. Rpm maintainer scripts
|
||||
are typically shell scripts, but often lack the leading shebang line.
|
||||
This can confuse dpkg, so add the shebang if it looks like there
|
||||
is no shebang magic already in place.
|
||||
|
||||
Additionally, it's not uncommon for rpm maintainer scripts to contain
|
||||
bashisms, which can be triggered when they are ran on systems where /bin/sh
|
||||
is not bash. To work around this, the shebang line of the scripts is
|
||||
changed to use bash.
|
||||
|
||||
Also, if the rpm is relocatable, the script could refer to
|
||||
RPM_INSTALL_PREFIX, which is set by rpm at run time. Deal with this by
|
||||
adding code to the script to set RPM_INSTALL_PREFIX.
|
||||
|
||||
=cut
|
||||
|
||||
# This helper function deals with all the scripts.
|
||||
@@ -457,9 +486,19 @@ sub _script_helper {
|
||||
|
||||
# set
|
||||
if (@_) {
|
||||
my $prefixcode="";
|
||||
if (defined $this->prefixes) {
|
||||
$prefixcode="RPM_INSTALL_PREFIX=".$this->prefixes."\n";
|
||||
$prefixcode.="export RPM_INSTALL_PREFIX\n";
|
||||
}
|
||||
|
||||
my $value=shift;
|
||||
if (length $value and $value !~ m/^#!\s*\//) {
|
||||
$value="#!/bin/sh\n$value";
|
||||
$value="#!/bin/bash\n$prefixcode$value";
|
||||
}
|
||||
else {
|
||||
$value=~s@^#!\s*/bin/sh(\s)@#!/bin/bash$1@;
|
||||
$value=~s/\n/\n$prefixcode/s;
|
||||
}
|
||||
$this->{$script} = $value;
|
||||
}
|
||||
|
||||
@@ -114,8 +114,11 @@ sub install {
|
||||
my $this=shift;
|
||||
my $slp=shift;
|
||||
|
||||
my $v=$Alien::Package::verbose;
|
||||
$Alien::Package::verbose=2;
|
||||
$this->do("slpi", $slp)
|
||||
or die "Unable to install";
|
||||
$Alien::Package::verbose=$v;
|
||||
}
|
||||
|
||||
=item getfooter
|
||||
@@ -355,6 +358,8 @@ sub release {
|
||||
}
|
||||
|
||||
|
||||
=back
|
||||
|
||||
=head1 AUTHOR
|
||||
|
||||
Joey Hess <joey@kitenet.net>
|
||||
|
||||
@@ -9,10 +9,14 @@ Alien::Package::Tgz - an object that represents a tgz package
|
||||
package Alien::Package::Tgz;
|
||||
use strict;
|
||||
use base qw(Alien::Package);
|
||||
use Cwd qw(abs_path);
|
||||
|
||||
my $tarext=qr/\.(?:tgz|tar(?:\.(?:gz|Z|z|bz|bz2))?|taz)$/;
|
||||
|
||||
=head1 DESCRIPTION
|
||||
|
||||
This is an object class that represents a tgz package, as used in Slackware.
|
||||
It also allows conversion of raw tar files.
|
||||
It is derived from Alien::Package.
|
||||
|
||||
=head1 CLASS DATA
|
||||
@@ -49,7 +53,7 @@ sub checkfile {
|
||||
my $this=shift;
|
||||
my $file=shift;
|
||||
|
||||
return $file =~ m/.*\.(?:tgz|tar\.(?:gz|Z|z)|taz)$/;
|
||||
return $file =~ m/$tarext$/;
|
||||
}
|
||||
|
||||
=item install
|
||||
@@ -66,8 +70,11 @@ sub install {
|
||||
my $tgz=shift;
|
||||
|
||||
if (-x "/sbin/installpkg") {
|
||||
my $v=$Alien::Package::verbose;
|
||||
$Alien::Package::verbose=2;
|
||||
$this->do("/sbin/installpkg", "$tgz")
|
||||
or die "Unable to install";
|
||||
$Alien::Package::verbose=$v;
|
||||
}
|
||||
else {
|
||||
die "Sorry, I cannot install the generated .tgz file because /sbin/installpkg is not present. You can use tar to install it yourself.\n"
|
||||
@@ -90,9 +97,9 @@ sub scan {
|
||||
my ($basename)=('/'.$file)=~m#^/?.*/(.*?)$#;
|
||||
|
||||
# Strip out any tar extentions.
|
||||
$basename=~s/\.(tgz|tar\.(gz|Z))$//;
|
||||
$basename=~s/$tarext//;
|
||||
|
||||
if ($basename=~m/(.*)-(.*?[0-9]+.*)/) {
|
||||
if ($basename=~m/([\w-]+)-([0-9\.?]+).*/) {
|
||||
$this->name($1);
|
||||
$this->version($2);
|
||||
}
|
||||
@@ -103,11 +110,11 @@ sub scan {
|
||||
|
||||
$this->arch('all');
|
||||
|
||||
$this->summary("Converted Slackware tgz package");
|
||||
$this->summary("Converted tgz package");
|
||||
$this->description($this->summary);
|
||||
$this->copyright('unknown');
|
||||
$this->release(1);
|
||||
$this->distribution("Slackware");
|
||||
$this->distribution("Slackware/tarball");
|
||||
$this->group("unknown");
|
||||
$this->origformat('tgz');
|
||||
$this->changelogtext('');
|
||||
@@ -116,7 +123,7 @@ sub scan {
|
||||
# Now figure out the conffiles. Assume anything in etc/ is a
|
||||
# conffile.
|
||||
my @conffiles;
|
||||
open (FILELIST,"tar zvtf $file | grep etc/ |") ||
|
||||
open (FILELIST,"tar vtf $file | grep etc/ |") ||
|
||||
die "getting filelist: $!";
|
||||
while (<FILELIST>) {
|
||||
# Make sure it's a normal file. This is looking at the
|
||||
@@ -133,7 +140,7 @@ sub scan {
|
||||
# Now get the whole filelist. We have to add leading /'s to the
|
||||
# filenames. We have to ignore all files under /install/
|
||||
my @filelist;
|
||||
open (FILELIST, "tar ztf $file |") ||
|
||||
open (FILELIST, "tar tf $file |") ||
|
||||
die "getting filelist: $!";
|
||||
while (<FILELIST>) {
|
||||
chomp;
|
||||
@@ -145,7 +152,7 @@ sub scan {
|
||||
|
||||
# Now get the scripts.
|
||||
foreach my $script (keys %{scripttrans()}) {
|
||||
$this->$script(scalar $this->runpipe(1, "tar Oxzf $file install/${scripttrans()}{$script} 2>/dev/null"));
|
||||
$this->$script(scalar $this->runpipe(1, "tar Oxf $file install/${scripttrans()}{$script} 2>/dev/null"));
|
||||
}
|
||||
|
||||
return 1;
|
||||
@@ -160,9 +167,9 @@ Unpack tgz.
|
||||
sub unpack {
|
||||
my $this=shift;
|
||||
$this->SUPER::unpack(@_);
|
||||
my $file=$this->filename;
|
||||
my $file=abs_path($this->filename);
|
||||
|
||||
$this->do("cat $file | (cd ".$this->unpacked_tree."; tar zxpf -)")
|
||||
$this->do("cd ".$this->unpacked_tree."; tar xpf $file")
|
||||
or die "Unpacking of '$file' failed: $!";
|
||||
# Delete the install directory that has slackware info in it.
|
||||
$this->do("cd ".$this->unpacked_tree."; rm -rf ./install");
|
||||
@@ -215,6 +222,8 @@ sub build {
|
||||
return $tgz;
|
||||
}
|
||||
|
||||
=back
|
||||
|
||||
=head1 AUTHOR
|
||||
|
||||
Joey Hess <joey@kitenet.net>
|
||||
|
||||
16
README
16
README
@@ -3,14 +3,7 @@ Please read alien's man page for general documentation.
|
||||
Getting alien:
|
||||
|
||||
The newest versions of alien are available at the alien home page; drop by
|
||||
http://kitenet.net/programs/alien/
|
||||
|
||||
On metalab and its mirrors, alien is located in the
|
||||
pub/Linux/utils/scripts/ directory.
|
||||
|
||||
You can also get rpm or deb packages of alien:
|
||||
deb: ftp://ftp.debian.org/debian/unstable/binary-all/admin/alien_*.deb
|
||||
rpm: ftp://ftp.redhat.com/pub/contrib/noarch/alien-*.rpm
|
||||
http://kitenet.net/~joey/code/alien/
|
||||
|
||||
Other things you'll need:
|
||||
|
||||
@@ -27,8 +20,7 @@ Other things you'll need:
|
||||
dpkg, dpkg-dev, and debhelper (version 3 or above) packages, which are
|
||||
available on http://packages.debian.org
|
||||
|
||||
To convert to/from stampede packages, you will need bzip2, get it from
|
||||
http://sourceware.cygnus.com/bzip2/index.html
|
||||
To convert to/from stampede packages, you will need bzip2.
|
||||
|
||||
Attention, Slackware, Red Hat, and Stampede users: Bruce S. Babcock
|
||||
<babcock@math.psu.edu> has put together an "alien-extra"
|
||||
@@ -43,10 +35,6 @@ Other things you'll need:
|
||||
The Stampede version is at
|
||||
ftp://ykbsb2.yk.psu.edu/pub/alien/alien-extra.slp
|
||||
|
||||
Solaris users can find pkg's of much of the above software,
|
||||
at http://mah.everybody.org/hacks/os/solaris/ , thanks to Mark
|
||||
A. Hershberger <mah@everybody.org>.
|
||||
|
||||
Note:
|
||||
|
||||
Alien is really designed to be used to convert from alien file formats to
|
||||
|
||||
19
alien.pl
19
alien.pl
@@ -18,10 +18,6 @@ package format and install it. It also supports LSB packages.
|
||||
|
||||
=head1 WARNING
|
||||
|
||||
Despite the high version number, B<alien> is still (and will probably always
|
||||
be) rather experimental software. It's been under development for many
|
||||
years now, but there are still many bugs and limitations.
|
||||
|
||||
B<alien> should not be used to replace important system packages, like
|
||||
init, libc, or other things that are essential for the functioning of
|
||||
your system. Many of these packages are set up differently by the
|
||||
@@ -54,6 +50,9 @@ No guarantees are made that the generated lsb packages will be fully LSB
|
||||
compliant, and it's rather unlikely they will unless you build them in the
|
||||
lsbdev environment.
|
||||
|
||||
Note that unlike other package formats, converting an LSB package to
|
||||
another format will not cause its minor version number to be changed.
|
||||
|
||||
=item deb
|
||||
|
||||
For converting to (but not from) deb format, the gcc, make, debhelper,
|
||||
@@ -138,7 +137,7 @@ built.
|
||||
|
||||
Be less strict about which patch file is used, perhaps attempting to use a patch
|
||||
file for an older verson of the package. This is not guaranteed to always work;
|
||||
older patches may necessarily not work with newer packages.
|
||||
older patches may not necessarily work with newer packages.
|
||||
|
||||
=item B<--nopatch>
|
||||
|
||||
@@ -160,7 +159,7 @@ Note that without an argument, this displays the version of B<alien> instead.
|
||||
=item B<-c>, B<--scripts>
|
||||
|
||||
Try to convert the scripts that are meant to be run when the
|
||||
package is installed and removed. Use this with caution, becuase these
|
||||
package is installed and removed. Use this with caution, because these
|
||||
scripts might be designed to work on a system unlike your own, and could
|
||||
cause problems. It is recommended that you examine the scripts by hand
|
||||
and check to see what they do before using this option.
|
||||
@@ -244,7 +243,7 @@ B<alien> recognizes the following environemnt variables:
|
||||
|
||||
=over 4
|
||||
|
||||
=item RPMBUILDOPT
|
||||
=item RPMBUILDOPTS
|
||||
|
||||
Options to pass to rpm when it is building a package.
|
||||
|
||||
@@ -334,7 +333,7 @@ Usage: alien [options] file [...]
|
||||
--version=<version> Specify package version.
|
||||
-p, --to-pkg Generate a Solaris pkg package.
|
||||
-i, --install Install generated package.
|
||||
-g, --generate Unpack, but do not generate a new package.
|
||||
-g, --generate Generate build tree, but do not build package.
|
||||
-c, --scripts Include scripts in package.
|
||||
-v, --verbose Display each command alien runs.
|
||||
--veryverbose Be verbose, and also display output of run commands.
|
||||
@@ -462,9 +461,7 @@ foreach my $file (@ARGV) {
|
||||
|
||||
# Increment release.
|
||||
unless (defined $keepversion) {
|
||||
$^W=0; # Shut of possible "is not numeric" warning.
|
||||
$package->release($package->release + $versionbump);
|
||||
$^W=1; # Re-enable warnings.
|
||||
$package->incrementrelease($versionbump);
|
||||
}
|
||||
|
||||
foreach my $format (keys %destformats) {
|
||||
|
||||
@@ -4,7 +4,7 @@ Packager: Joey Hess <joey@kitenet.net>
|
||||
Version: @version@
|
||||
Release: 1
|
||||
Source: ftp://kitenet.net/pub/code/debian/alien_@version@.tar.gz
|
||||
Copyright: GPL
|
||||
License: GPL
|
||||
Group: Utilities/File
|
||||
Buildroot: /tmp/alien-@version@.build
|
||||
Requires: perl
|
||||
|
||||
115
debian/changelog
vendored
115
debian/changelog
vendored
@@ -1,3 +1,118 @@
|
||||
alien (8.76) unstable; urgency=low
|
||||
|
||||
* Avoid using hostname -f for portability to unix systems,
|
||||
such as Solaris, where any options _set_ the hostname.
|
||||
* Fix bash shebang and recognise bash scripts as editable
|
||||
shell scripts when converting to deb. Closes: #532330
|
||||
(Thanks, Bruce Stephens)
|
||||
|
||||
-- Joey Hess <joeyh@debian.org> Mon, 08 Jun 2009 13:22:35 -0400
|
||||
|
||||
alien (8.75) unstable; urgency=low
|
||||
|
||||
* Simplified rules file.
|
||||
* Modify maintainer scripts from rpm files to use /bin/bash rather
|
||||
than /bin/sh. Many such scripts are only tested on systems where /bin/sh
|
||||
is bash, and contain bashisms, which can cause trouble when converting
|
||||
the rpm to be used on eg, the Debian family of distributions, where
|
||||
/bin/sh can legitimatly be dash. Closes: #495971
|
||||
|
||||
-- Joey Hess <joeyh@debian.org> Wed, 06 May 2009 17:22:02 -0400
|
||||
|
||||
alien (8.74) unstable; urgency=low
|
||||
|
||||
* Support bzipped and uncompressed tar files, using tar's auto-compression
|
||||
detection. (Requires gnu tar 1.14.91)
|
||||
* pod fixes
|
||||
|
||||
-- Joey Hess <joeyh@debian.org> Sun, 15 Feb 2009 19:51:54 -0500
|
||||
|
||||
alien (8.73) unstable; urgency=low
|
||||
|
||||
* Fix pkg generation to not include /prototype in all packages.
|
||||
(Kim Bisgaard)
|
||||
|
||||
-- Joey Hess <joeyh@debian.org> Sun, 26 Oct 2008 23:43:47 -0400
|
||||
|
||||
alien (8.72) unstable; urgency=low
|
||||
|
||||
* Use debhelper 7, rules file minimisation.
|
||||
* Improve parsing of tgz filenames, to avoid confusion when the filename
|
||||
includes the package type (ie, "noarch"). Patch from Andrej Ricnik-Bay.
|
||||
* When generating a debian changelog file, work around bug #478925 by
|
||||
including the alien changelog text inside the debian changelog entry.
|
||||
|
||||
-- Joey Hess <joeyh@debian.org> Thu, 01 May 2008 15:40:34 -0400
|
||||
|
||||
alien (8.71) unstable; urgency=low
|
||||
|
||||
* Deal with rpms that relocate ie, /usr into /usr/local, and don't
|
||||
try to move /usr into /usr/local in this case. Closes: #470905
|
||||
|
||||
-- Joey Hess <joeyh@debian.org> Fri, 14 Mar 2008 13:35:33 -0400
|
||||
|
||||
alien (8.70) unstable; urgency=low
|
||||
|
||||
* Extract prefixes field before extracting scripts so that
|
||||
RPM_INSTALL_PREFIX gets set.
|
||||
|
||||
-- Joey Hess <joeyh@debian.org> Wed, 12 Mar 2008 11:05:40 -0400
|
||||
|
||||
alien (8.69) unstable; urgency=low
|
||||
|
||||
* Alien's repository has moved from subversion to git.
|
||||
* Minor improvement to debian/rules clean.
|
||||
* Improve the short description.
|
||||
|
||||
-- Joey Hess <joeyh@debian.org> Fri, 19 Oct 2007 20:27:53 -0400
|
||||
|
||||
alien (8.68) unstable; urgency=low
|
||||
|
||||
* Show output of installation of package with -i, since some packages
|
||||
install scripts may have important output or even be interactive.
|
||||
Closes: #425732
|
||||
|
||||
-- Joey Hess <joeyh@debian.org> Thu, 24 May 2007 14:08:39 -0400
|
||||
|
||||
alien (8.67) unstable; urgency=low
|
||||
|
||||
* Update the url to the web page, and remove several other broken urls from
|
||||
the README.
|
||||
* Correct a bug that caused alien to ignore failing commands. Closes: #424858
|
||||
|
||||
-- Joey Hess <joeyh@debian.org> Thu, 17 May 2007 13:34:36 -0400
|
||||
|
||||
alien (8.66) unstable; urgency=low
|
||||
|
||||
* Use date -R as 822-date will soon be deprecated.
|
||||
|
||||
-- Joey Hess <joeyh@debian.org> Thu, 22 Mar 2007 17:45:24 -0400
|
||||
|
||||
alien (8.65) unstable; urgency=low
|
||||
|
||||
* Fix alien's own spec file, s/Copyright/License/.
|
||||
* Add support for rpm scripts that use RPM_INSTALL_PREFIX, by setting
|
||||
RPM_INSTALL_PREFIX as part of the converted script. Closes: #400863
|
||||
* When converting LSB packages, do not increment the release number.
|
||||
* Use rpmbuild to build lsb packages, not rpm, if lsb-rpm is not available.
|
||||
|
||||
-- Joey Hess <joeyh@debian.org> Fri, 15 Dec 2006 13:46:38 -0500
|
||||
|
||||
alien (8.64) unstable; urgency=low
|
||||
|
||||
* Minor improvement to usage message as reported in [some random blog
|
||||
somewhere that I happened to read by accident].
|
||||
|
||||
-- Joey Hess <joeyh@debian.org> Thu, 30 Mar 2006 12:51:45 -0500
|
||||
|
||||
alien (8.63) unstable; urgency=low
|
||||
|
||||
* Correct code to properly use RPMBUILDOPT (not RPMBUILDOPTS). Closes: #352816
|
||||
* Corrected fix for bug #352810 to look at and chmod the right directories.
|
||||
Closes: #352810
|
||||
|
||||
-- Joey Hess <joeyh@debian.org> Tue, 14 Feb 2006 13:28:22 -0500
|
||||
|
||||
alien (8.62) unstable; urgency=low
|
||||
|
||||
* Fix a bug in conffile script extraction from tgz files (caused by return
|
||||
|
||||
2
debian/compat
vendored
2
debian/compat
vendored
@@ -1 +1 @@
|
||||
4
|
||||
7
|
||||
|
||||
8
debian/control
vendored
8
debian/control
vendored
@@ -1,16 +1,18 @@
|
||||
Source: alien
|
||||
Section: admin
|
||||
Priority: optional
|
||||
Build-Depends: debhelper (>= 4), dpkg-dev (>= 1.9.0)
|
||||
Build-Depends: debhelper (>= 7.0.50)
|
||||
Maintainer: Joey Hess <joeyh@debian.org>
|
||||
Standards-Version: 3.6.2
|
||||
Standards-Version: 3.8.1
|
||||
Vcs-Git: git://git.kitenet.net/alien
|
||||
Homepage: http://kitenet.net/~joey/code/alien/
|
||||
|
||||
Package: alien
|
||||
Architecture: all
|
||||
Section: admin
|
||||
Depends: debhelper (>= 3), ${misc:Depends}, ${perl:Depends}, rpm (>= 2.4.4-2), dpkg-dev, make, cpio
|
||||
Suggests: patch, bzip2, lsb-rpm, lintian
|
||||
Description: install non-native packages with dpkg
|
||||
Description: convert and install rpm and other packages
|
||||
Alien allows you to convert LSB, Red Hat, Stampede and Slackware Packages
|
||||
into Debian packages, which can be installed with dpkg.
|
||||
.
|
||||
|
||||
2
debian/copyright
vendored
2
debian/copyright
vendored
@@ -12,7 +12,7 @@ This program is now maintained by Joey Hess <joeyh@debian.org>.
|
||||
Copyright 1996, 1997 Christoph Lameter
|
||||
Portions copyright 1997 Randolph Chung
|
||||
Portions copyright 2001 Mark A. Hershberger
|
||||
Copyright 1997-2005 Joey Hess
|
||||
Copyright 1997-2007 Joey Hess
|
||||
|
||||
License:
|
||||
|
||||
|
||||
2
debian/docs
vendored
Normal file
2
debian/docs
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
README
|
||||
gendiff.txt
|
||||
53
debian/rules
vendored
53
debian/rules
vendored
@@ -1,53 +1,20 @@
|
||||
#!/usr/bin/make -f
|
||||
%:
|
||||
dh $@
|
||||
|
||||
build: build-stamp
|
||||
build-stamp:
|
||||
dh_testdir
|
||||
perl Makefile.PL
|
||||
$(MAKE)
|
||||
override_dh_auto_test:
|
||||
# simple smoke test
|
||||
./alien.pl -V
|
||||
touch build-stamp
|
||||
|
||||
clean:
|
||||
dh_testdir
|
||||
dh_testroot
|
||||
rm -f build-stamp
|
||||
perl Makefile.PL
|
||||
-$(MAKE) realclean
|
||||
dh_clean
|
||||
|
||||
binary-arch: build
|
||||
|
||||
binary-indep: build
|
||||
dh_testdir
|
||||
dh_testroot
|
||||
dh_clean -k
|
||||
override_dh_auto_install:
|
||||
$(MAKE) pure_install INSTALLDIRS=vendor \
|
||||
PREFIX=$(shell pwd)/debian/alien/$(shell perl -MConfig -e 'print $$Config{prefix}') \
|
||||
VARPREFIX=$(shell pwd)/debian/alien
|
||||
# Why does it make this empty directory? Sigh.
|
||||
rm -rf debian/alien/usr/lib
|
||||
dh_installdocs README gendiff.txt
|
||||
dh_installexamples
|
||||
dh_installchangelogs
|
||||
dh_compress
|
||||
dh_fixperms
|
||||
dh_perl
|
||||
dh_installdeb
|
||||
dh_gencontrol
|
||||
dh_md5sums
|
||||
dh_builddeb
|
||||
|
||||
VERSION=$(shell expr "`dpkg-parsechangelog 2>/dev/null |grep Version:`" : '.*Version: \(.*\)')
|
||||
override_dh_auto_clean:
|
||||
# distclean moans about MANIFEST, this is quieter
|
||||
if [ -e Makefile ]; then $(MAKE) realclean; fi
|
||||
|
||||
# Update the web page. Not intended for use by anyone except the author.
|
||||
DIR=/home/web/kitenet.net/programs/alien
|
||||
installhook:
|
||||
cp debian/changelog $(DIR)/CHANGES
|
||||
echo -n $(VERSION) > $(DIR)/LATEST-VERSION-IS
|
||||
rm -f $(DIR)/*.tar.gz
|
||||
ln -sf /home/joey/lib/debian/unstable/alien_$(VERSION).tar.gz $(DIR)
|
||||
|
||||
binary: binary-indep binary-arch
|
||||
.PHONY: build clean binary-indep binary-arch binary
|
||||
# Not intended for use by anyone except the author.
|
||||
announcedir:
|
||||
@echo ${HOME}/src/joeywiki/code/alien/news
|
||||
|
||||
Reference in New Issue
Block a user