24 Commits
8.64 ... 8.70

Author SHA1 Message Date
Joey Hess
3c8631f8fd don't try to modify a constant value 2008-03-12 11:10:09 -04:00
Joey Hess
17bcd710f7 * Extract prefixes field before extracting scripts so that
RPM_INSTALL_PREFIX gets set.
2008-03-12 11:05:39 -04:00
Joey Hess
ac38739a74 lintin fixes 2008-01-05 14:50:46 -05:00
Joey Hess
dbf7fdfa5b typo 2007-11-27 15:47:42 -05:00
Joey Hess
15b2f7ff92 add homepage field 2007-11-06 15:54:02 -05:00
Joey Hess
7a06220ed7 * Improve the short description. 2007-10-19 20:34:22 -04:00
Joey Hess
d39d884f1b * Minor improvement to debian/rules clean. 2007-10-19 20:32:58 -04:00
Joey Hess
9edefc1c48 add 2007-10-19 20:32:35 -04:00
Joey Hess
13b74f3141 * Alien's repository has moved from subversion to git. 2007-10-15 23:35:16 -04:00
joey
6230493dfe Vcs- fields now official 2007-10-10 22:24:21 +00:00
joey
cfc242e886 releasing version 8.68 2007-05-24 18:11:25 +00:00
joey
ffcb91fa04 * Show output of installation of package with -i, since some packages
install scripts may have important output or even be interactive.
  Closes; #425732
2007-05-23 18:03:47 +00:00
joey
f0c859c1c4 typo 2007-05-23 17:30:22 +00:00
joey
2ea474e531 releasing version 8.67 2007-05-17 17:35:16 +00:00
joey
f81986d554 * Correct a bug that caused alien to ignore failing commands. Closes: #424858 2007-05-17 17:34:20 +00:00
joey
0f3f0ab92c * Update the url to the web page, and remove several other broken urls from
the README.
2007-05-17 04:11:15 +00:00
joey
a712ba401f releasing version 8.66 2007-03-22 21:46:04 +00:00
joey
cc5c0ade81 releasing version 8.65 2006-12-15 18:47:58 +00:00
joey
4697a558d0 * When converting LSB packages, do not increment the release number.
* Use rpmbuild to build lsb packages, not rpm.
2006-12-15 18:46:37 +00:00
joey
c1a3316e71 * Add support for rpm scripts that use RPM_INSTALL_PREFIX, by setting
RPM_INSTALL_PREFIX as part of the converted script. Closes: #400863
2006-12-15 18:34:39 +00:00
joey
7382aaf75f * Fix alien's own spec file, s/Copyright/License/. 2006-12-14 22:35:37 +00:00
joey
ebf2cb2f06 add XS-Vcs-Svn fields 2006-10-04 17:25:11 +00:00
joey
50908ed5ed foo 2006-04-23 03:06:10 +00:00
joey
f84c8a6b7e new announcement system 2006-03-30 20:15:44 +00:00
15 changed files with 141 additions and 57 deletions

2
.gitignore vendored Normal file
View File

@@ -0,0 +1,2 @@
alien.lsm
alien.spec

View File

@@ -306,6 +306,21 @@ the filename of the generated package.
sub build {} 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 =item DESTROY
When an object is destroyed, it cleans some stuff up. In particular, if the When an object is destroyed, it cleans some stuff up. In particular, if the
@@ -431,7 +446,8 @@ sub do {
} }
else { else {
# parent # parent
return (waitpid($pid, 0) > 0); my $ret=(waitpid($pid, 0) > 0);
return ! $ret || ! $?;
} }
} }

View File

@@ -87,8 +87,11 @@ sub install {
my $this=shift; my $this=shift;
my $deb=shift; my $deb=shift;
my $v=$Alien::Package::verbose;
$Alien::Package::verbose=2;
$this->do("dpkg", "--no-force-overwrite", "-i", $deb) $this->do("dpkg", "--no-force-overwrite", "-i", $deb)
or die "Unable to install"; or die "Unable to install";
$Alien::Package::verbose=$v;
} }
=item test =item test
@@ -227,7 +230,7 @@ sub scan {
=item unpack =item unpack
Implment the unpack method to unpack a deb file. Implement the unpack method to unpack a deb file.
=cut =cut
@@ -522,7 +525,7 @@ sub cleantree {
Set/get package name. Set/get package name.
Always returns the packge name in lowercase with all invalid characters 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 =cut
@@ -578,7 +581,7 @@ sub version {
# Make sure the version contains digets. # Make sure the version contains digets.
unless (/[0-9]/) { unless (/[0-9]/) {
# Drat. Well, add some. dpkg-deb won't work # Drat. Well, add some. dpkg-deb won't work
# # on a version w/o numbers! # on a version w/o numbers!
return $_."0"; return $_."0";
} }
return $_; return $_;
@@ -646,10 +649,10 @@ Returns the date, in rfc822 format.
sub date { sub date {
my $this=shift; my $this=shift;
my $date=$this->runpipe(1, "822-date"); my $date=$this->runpipe(1, "date -R");
chomp $date; chomp $date;
if (!$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; return $date;

View File

@@ -103,7 +103,7 @@ the package.
sub build { sub build {
my $this=shift; my $this=shift;
my $buildcmd=shift || 'rpm'; my $buildcmd=shift || 'rpmbuild';
foreach (split(/:/,$ENV{PATH})) { foreach (split(/:/,$ENV{PATH})) {
if (-x "$_/lsb-rpm") { if (-x "$_/lsb-rpm") {
$buildcmd='lsb-rpm'; $buildcmd='lsb-rpm';
@@ -113,6 +113,14 @@ sub build {
$this->SUPER::build($buildcmd); $this->SUPER::build($buildcmd);
} }
=item incrementrelease
LSB package versions are not changed.
=cut
sub incrementrelease {}
=back =back
=head1 AUTHOR =head1 AUTHOR

View File

@@ -106,8 +106,11 @@ sub install {
my $pkg=shift; my $pkg=shift;
if (-x "/usr/sbin/pkgadd") { if (-x "/usr/sbin/pkgadd") {
my $v=$Alien::Package::verbose;
$Alien::Package::verbose=2;
$this->do("/usr/sbin/pkgadd", "-d .", "$pkg") $this->do("/usr/sbin/pkgadd", "-d .", "$pkg")
or die "Unable to install"; or die "Unable to install";
$Alien::Package::verbose=$v;
} }
else { else {
die "Sorry, I cannot install the generated .pkg file because /usr/sbin/pkgadd is not present.\n"; die "Sorry, I cannot install the generated .pkg file because /usr/sbin/pkgadd is not present.\n";

View File

@@ -53,8 +53,11 @@ sub install {
my $this=shift; my $this=shift;
my $rpm=shift; my $rpm=shift;
my $v=$Alien::Package::verbose;
$Alien::Package::verbose=2;
$this->do("rpm -ivh ".(exists $ENV{RPMINSTALLOPT} ? $ENV{RPMINSTALLOPT} : '').$rpm) $this->do("rpm -ivh ".(exists $ENV{RPMINSTALLOPT} ? $ENV{RPMINSTALLOPT} : '').$rpm)
or die "Unable to install"; or die "Unable to install";
$Alien::Package::verbose=$v;
} }
=item scan =item scan
@@ -75,18 +78,20 @@ sub scan {
POSTUN => 'postrm', 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. # Use --queryformat to pull out all the fields we need.
foreach my $field (keys(%fieldtrans)) { foreach my $field (qw{NAME VERSION RELEASE ARCH CHANGELOGTEXT
$_=$this->runpipe(0, "LANG=C rpm -qp --queryformat \%{$field} $file"); SUMMARY DESCRIPTION COPYRIGHT PREFIXES},
$field=$fieldtrans{$field}; keys(%fieldtrans)) {
$_='' if $_ eq '(none)'; my $value=$this->runpipe(0, "LANG=C rpm -qp --queryformat \%{$field} $file");
$this->$field($_); 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. # Get the conffiles list.
@@ -448,6 +453,10 @@ 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 This can confuse dpkg, so add the #!/bin/sh if it looks like there
is no shebang magic already in place. is no shebang magic already in place.
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 =cut
# This helper function deals with all the scripts. # This helper function deals with all the scripts.
@@ -457,9 +466,18 @@ sub _script_helper {
# set # set
if (@_) { if (@_) {
my $prefixcode="";
if (defined $this->prefixes) {
$prefixcode="RPM_INSTALL_PREFIX=".$this->prefixes."\n";
$prefixcode.="export RPM_INSTALL_PREFIX\n";
}
my $value=shift; my $value=shift;
if (length $value and $value !~ m/^#!\s*\//) { if (length $value and $value !~ m/^#!\s*\//) {
$value="#!/bin/sh\n$value"; $value="#!/bin/sh\n$prefixcode$value";
}
else {
$value=~s/\n/\n$prefixcode/s;
} }
$this->{$script} = $value; $this->{$script} = $value;
} }

View File

@@ -114,8 +114,11 @@ sub install {
my $this=shift; my $this=shift;
my $slp=shift; my $slp=shift;
my $v=$Alien::Package::verbose;
$Alien::Package::verbose=2;
$this->do("slpi", $slp) $this->do("slpi", $slp)
or die "Unable to install"; or die "Unable to install";
$Alien::Package::verbose=$v;
} }
=item getfooter =item getfooter

View File

@@ -66,8 +66,11 @@ sub install {
my $tgz=shift; my $tgz=shift;
if (-x "/sbin/installpkg") { if (-x "/sbin/installpkg") {
my $v=$Alien::Package::verbose;
$Alien::Package::verbose=2;
$this->do("/sbin/installpkg", "$tgz") $this->do("/sbin/installpkg", "$tgz")
or die "Unable to install"; or die "Unable to install";
$Alien::Package::verbose=$v;
} }
else { 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" die "Sorry, I cannot install the generated .tgz file because /sbin/installpkg is not present. You can use tar to install it yourself.\n"

16
README
View File

@@ -3,14 +3,7 @@ Please read alien's man page for general documentation.
Getting alien: Getting alien:
The newest versions of alien are available at the alien home page; drop by The newest versions of alien are available at the alien home page; drop by
http://kitenet.net/programs/alien/ http://kitenet.net/~joey/code/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
Other things you'll need: 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 dpkg, dpkg-dev, and debhelper (version 3 or above) packages, which are
available on http://packages.debian.org available on http://packages.debian.org
To convert to/from stampede packages, you will need bzip2, get it from To convert to/from stampede packages, you will need bzip2.
http://sourceware.cygnus.com/bzip2/index.html
Attention, Slackware, Red Hat, and Stampede users: Bruce S. Babcock Attention, Slackware, Red Hat, and Stampede users: Bruce S. Babcock
<babcock@math.psu.edu> has put together an "alien-extra" <babcock@math.psu.edu> has put together an "alien-extra"
@@ -43,10 +35,6 @@ Other things you'll need:
The Stampede version is at The Stampede version is at
ftp://ykbsb2.yk.psu.edu/pub/alien/alien-extra.slp 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: Note:
Alien is really designed to be used to convert from alien file formats to Alien is really designed to be used to convert from alien file formats to

View File

@@ -18,10 +18,6 @@ package format and install it. It also supports LSB packages.
=head1 WARNING =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 B<alien> should not be used to replace important system packages, like
init, libc, or other things that are essential for the functioning of init, libc, or other things that are essential for the functioning of
your system. Many of these packages are set up differently by the 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 compliant, and it's rather unlikely they will unless you build them in the
lsbdev environment. 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 =item deb
For converting to (but not from) deb format, the gcc, make, debhelper, 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 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; 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> =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> =item B<-c>, B<--scripts>
Try to convert the scripts that are meant to be run when the 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 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 cause problems. It is recommended that you examine the scripts by hand
and check to see what they do before using this option. and check to see what they do before using this option.
@@ -462,9 +461,7 @@ foreach my $file (@ARGV) {
# Increment release. # Increment release.
unless (defined $keepversion) { unless (defined $keepversion) {
$^W=0; # Shut of possible "is not numeric" warning. $package->incrementrelease($versionbump);
$package->release($package->release + $versionbump);
$^W=1; # Re-enable warnings.
} }
foreach my $format (keys %destformats) { foreach my $format (keys %destformats) {

View File

@@ -4,7 +4,7 @@ Packager: Joey Hess <joey@kitenet.net>
Version: @version@ Version: @version@
Release: 1 Release: 1
Source: ftp://kitenet.net/pub/code/debian/alien_@version@.tar.gz Source: ftp://kitenet.net/pub/code/debian/alien_@version@.tar.gz
Copyright: GPL License: GPL
Group: Utilities/File Group: Utilities/File
Buildroot: /tmp/alien-@version@.build Buildroot: /tmp/alien-@version@.build
Requires: perl Requires: perl

47
debian/changelog vendored
View File

@@ -1,3 +1,50 @@
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 alien (8.64) unstable; urgency=low
* Minor improvement to usage message as reported in [some random blog * Minor improvement to usage message as reported in [some random blog

8
debian/control vendored
View File

@@ -1,16 +1,18 @@
Source: alien Source: alien
Section: admin Section: admin
Priority: optional Priority: optional
Build-Depends: debhelper (>= 4), dpkg-dev (>= 1.9.0) Build-Depends: debhelper (>= 4)
Maintainer: Joey Hess <joeyh@debian.org> Maintainer: Joey Hess <joeyh@debian.org>
Standards-Version: 3.6.2 Standards-Version: 3.7.3
Vcs-Git: git://git.kitenet.net/alien
Homepage: http://kitenet.net/~joey/code/alien/
Package: alien Package: alien
Architecture: all Architecture: all
Section: admin Section: admin
Depends: debhelper (>= 3), ${misc:Depends}, ${perl:Depends}, rpm (>= 2.4.4-2), dpkg-dev, make, cpio Depends: debhelper (>= 3), ${misc:Depends}, ${perl:Depends}, rpm (>= 2.4.4-2), dpkg-dev, make, cpio
Suggests: patch, bzip2, lsb-rpm, lintian 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 Alien allows you to convert LSB, Red Hat, Stampede and Slackware Packages
into Debian packages, which can be installed with dpkg. into Debian packages, which can be installed with dpkg.
. .

2
debian/copyright vendored
View File

@@ -12,7 +12,7 @@ This program is now maintained by Joey Hess <joeyh@debian.org>.
Copyright 1996, 1997 Christoph Lameter Copyright 1996, 1997 Christoph Lameter
Portions copyright 1997 Randolph Chung Portions copyright 1997 Randolph Chung
Portions copyright 2001 Mark A. Hershberger Portions copyright 2001 Mark A. Hershberger
Copyright 1997-2005 Joey Hess Copyright 1997-2007 Joey Hess
License: License:

14
debian/rules vendored
View File

@@ -14,7 +14,7 @@ clean:
dh_testroot dh_testroot
rm -f build-stamp rm -f build-stamp
perl Makefile.PL perl Makefile.PL
-$(MAKE) realclean if [ -e Makefile ]; then $(MAKE) realclean; fi
dh_clean dh_clean
binary-arch: build binary-arch: build
@@ -39,15 +39,9 @@ binary-indep: build
dh_md5sums dh_md5sums
dh_builddeb dh_builddeb
VERSION=$(shell expr "`dpkg-parsechangelog 2>/dev/null |grep Version:`" : '.*Version: \(.*\)') # Not intended for use by anyone except the author.
announcedir:
# Update the web page. Not intended for use by anyone except the author. @echo ${HOME}/src/joeywiki/code/alien/news
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 binary: binary-indep binary-arch
.PHONY: build clean binary-indep binary-arch binary .PHONY: build clean binary-indep binary-arch binary