alien/0000755000000000000000000000000012303660355007037 5ustar alien/alien.lsm.in0000644000000000000000000000111212211426754011245 0ustar Begin3 Title: alien Version: @version@ Entered-date: 31MAR97 Description: Alien converts Slackware .tgz packages, Red Hat .rpm packages, Debian .deb packages, and Stampede .slp packages. It can convert from any of the formats to any other format. It works only on binary packages. It also support LSB packages. Keywords: debian dpkg deb red hat redhat rpm slackware tgz stampede slp convert package LSB Author: joey@kitenet.net Primary-site: sunsite.unc.edu /pub/Linux/utils/package 80 alien-@version@.tar.gz Copying-policy: GPL End alien/Alien/0000755000000000000000000000000012211426754010070 5ustar alien/Alien/Package.pm0000644000000000000000000002455212211426754011771 0ustar #!/usr/bin/perl -w =head1 NAME Alien::Package - an object that represents a package =cut package Alien::Package; use strict; use vars qw($AUTOLOAD); our $verbose=0; =head1 DESCRIPTION This is a perl object class that represents a package in an internal format usable by alien. The package may be a deb, a rpm, a tgz, or a slp package, etc. Objects in this class hold various fields of metadata from the actual packages they represent, as well as some fields pointing to the actual contents of the package. They can also examine an actual package on disk, and populate those fields. And they can build the actual package using the data stored in the fields. A typical use of this object class will be to instantiate an object from a class derived from this one, such as Alien::Package::Rpm. Feed the object a rpm file, thus populating all of its fields. Then rebless the object into the destination class, such as Alien::Package::Deb. Finally, ask the object to build a package, and the package has been converted. =head1 FIELDS These fields are of course really just methods that all act similarly; allowing a value to be passed in to set them, or simply returning the value of the field if nothing is passed in. Child classes may override these fields to process input data, or to format output data. The general rule is that input data is modified to get things into a package-independant form, which is how the data is stored in the fields. When the value of a field is read, it too may be modified before it is returned, to change things into a form more suitable for the particular type of package. =over 4 =item name The package's name. =item version The package's upstream version. =item release The package's distribution specific release number. =item arch The package's architecture, in the format used by Debian. =item maintainer The package's maintainer. =item depends The package's dependancies. Only dependencies that should exist on all target distributions can be put in here though (ie: lsb). =item group The section the package is in. =item summary A one line description of the package. =item description A longer description of the package. May contain multiple paragraphs. =item copyright A short statement of copyright. =item origformat What format the package was originally in. =item distribution What distribution family the package originated from. =item binary_info Whatever the package's package tool says when told to display info about the package. =item conffiles A reference to a list of all the conffiles in the package. =item files A reference to a list of all the files in the package. =item changelogtext The text of the changelog =item postinst The postinst script of the package. =item postrm The postrm script of the package. =item preinst The preinst script of the package. =item prerm The prerm script of the package. =item usescripts Only use the above scripts fields when generating the package if this is set to a true value. =item unpacked_tree Points to a directory where the package has been unpacked. =item owninfo If set this will be a reference to a hash, with filename as key, that holds ownership/group information for files that cannot be represented on the filesystem. Typically that is because the owners or groups just don't exist yet. It will be set at unpack time. =item modeinfo If set this will be a reference to a hash, with filename as key, that holds mode information for setuid files that have an entry in owninfo. It will be set at unpack time. =back =head1 METHODS =over 4 =item init This is called by new(). It's a handy place to set fields, etc, without having to write your own new() method. =cut sub init {} =item install Simply installs a package file. The filename is passed. This has to be overridden in child classes. =cut sub install { my $this=shift; } =item test Test a package file. The filename is passed, should return an array of lines of test results. Child classses may implement this. =cut sub test { my $this=shift; return; } =item filename Set/get the filename of the package the object represents. When it is set, it performs a scan of the file, populating most other fields with data from it. (This is just a stub; child classes should override it to actually do something.) =cut sub filename { my $this=shift; # set if (@_) { $this->{filename} = shift; $this->scan; } return $this->{filename}; } =item scripts Returns a list of all non-empty maintainer scripts in the package. =cut sub scripts { my $this=shift; my @ret; foreach my $s (qw{postinst postrm preinst prerm}) { my $val=$this->$s; push(@ret, $s) if defined $val && length $val; } return @ret; } =item scan This method scans the file associated with an object, and populates as many other fields as it can with data from it. =cut sub scan { my $this=shift; my $file=$this->filename; if (! -e $file) { die "$file does not exist; cannot read."; } } =item unpack This method unpacks the package into a temporary directory. It sets unpacked_tree to point to that directory. (This is just a stub method that makes a directory below the current working directory, and sets unpacked_tree to point to it. It should be overridden by child classes to actually unpack the package as well.) =cut sub unpack { my $this=shift; my $workdir = $this->name."-".$this->version; $this->do("mkdir $workdir") or die "unable to mkdir $workdir: $!"; # If the parent directory is suid/sgid, mkdir will make the root # directory of the package inherit those bits. That is a bad thing, # so explicitly force perms to 755. $this->do("chmod 755 $workdir"); $this->unpacked_tree($workdir); } =item prep This method causes the object to prepare a build tree to be used in building the object. It expects that the unpack method has already been called. It takes the tree generated by that method, and mangles it somehow, to produce a suitable build tree. (This is just a stub method that all child classes should override.) =cut sub prep {} =item cleantree This method should clean the unpacked_tree of any effects the prep and build methods might have on it. =cut sub cleantree {} =item revert This method should ensure that the object is in the same state it was in before the prep method was called. =cut sub revert {} =item build This method takes a prepped build tree, and simply builds a package from it. It should put the package in the current directory, and should return the filename of the generated package. (This is just a stub method that all child classes should override.) =cut 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 package was unpacked, it is time now to wipe out the temporary directory. =cut sub DESTROY { my $this=shift; my $exitcode=$?; return if (! defined $this->unpacked_tree || $this->unpacked_tree eq ''); # This should never happen, but it pays to check. if ($this->unpacked_tree eq '/') { die "alien internal error: unpacked_tree is set to '/'. Please file a bug report!"; } if (-d $this->unpacked_tree) { # Just in case some dir perms are too screwed up for # rm to work and we're not running as root. NB: can't # use xargs $this->do('find', $this->unpacked_tree, '-type', 'd', '-exec', 'chmod', '755', '{}', ';'); $this->do('rm', '-rf', $this->unpacked_tree) or die "unable to delete temporary directory '".$this->unpacked_tree."': $!"; $this->unpacked_tree(''); } $?=$exitcode; } =item AUTOLOAD Handles all fields, by creating accessor methods for them the first time they are accessed. =cut sub AUTOLOAD { my $field; ($field = $AUTOLOAD) =~ s/.*://; no strict 'refs'; *$AUTOLOAD = sub { my $this=shift; return $this->{$field} unless @_; return $this->{$field}=shift; }; goto &$AUTOLOAD; } =back =head1 CLASS DATA =over 4 =item $Alien::Package::verbose If set to a nonzero value, the shell commands that are run should be output. If set to a value greater than 1, any output of the commands should also be output. =back =head1 CLASS METHODS These methods can be called on either an object or on the class itself. =cut =over 4 =item new Returns a new object of this class. Optionally, you can pass in named parameters that specify the values of any fields in the class. =cut sub new { my $proto = shift; my $class = ref($proto) || $proto; my $this=bless ({}, $class); $this->init; $this->$_(shift) while $_=shift; # run named parameters as methods return $this; } =item checkfile Pass it a filename, and it will return true if it looks like the file is a package of the type handled by the class. =cut sub checkfile { my $this=shift; my $file=shift; return ''; # children override this. } =item do Runs a shell command. Is verbose or not depending on the value of $Alien::Package::verbose. Returns true if the command succeeds, false on failure. =cut sub do { my $whatever=shift; my @command=@_; if ($Alien::Package::verbose) { print "\t@command\n"; } my $pid=fork; if (!$pid) { # child if ($Alien::Package::verbose < 2) { # just closing it won't do open(STDOUT, ">/dev/null"); } exec(@command); exit 1; } else { # parent my $ret=(waitpid($pid, 0) > 0); return ! $ret || ! $?; } } =item runpipe This is similar to backticks, but honors $Alien::Package::verbose, logging the command run if asked to. The output of the command is returned. The first parameter controls what to do on error. If it's true then any errors from the command will be ignored (and $? will be set). If it's false, errors will abort alien. =cut sub runpipe { my $whatever=shift; my $ignoreerror=shift; my @command=@_; if ($Alien::Package::verbose) { print "\t@command\n"; } if (wantarray) { my @ret=`@command`; die "Error executing \"@command\": $!" if ! $ignoreerror && $? ne 0; if ($Alien::Package::verbose >= 2) { print @ret; } return @ret; } else { my $ret=`@command`; die "Error executing \"@command\": $!" if ! $ignoreerror && $? ne 0; if ($Alien::Package::verbose >= 2) { print $ret."\n"; } return $ret; } } =back =head1 AUTHOR Joey Hess =cut 1 alien/Alien/Package/0000755000000000000000000000000012303660344011420 5ustar alien/Alien/Package/Deb.pm0000644000000000000000000004311712211426754012461 0ustar #!/usr/bin/perl -w =head1 NAME Alien::Package::Deb - an object that represents a deb package =cut package Alien::Package::Deb; use strict; use base qw(Alien::Package); =head1 DESCRIPTION This is an object class that represents a deb package. It is derived from Alien::Package. =head1 FIELDS =over 4 =item have_dpkg_deb Set to a true value if dpkg-deb is available. =item dirtrans 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. =item fixperms If this is set to true, the generated debian/rules will run dh_fixperms. =back =head1 METHODS =over 4 =item init Sets have_dpkg_deb if dpkg-deb is in the path. I prefer to use dpkg-deb, if it is available since it is a lot more future-proof. =cut sub _inpath { my $this=shift; my $program=shift; foreach (split(/:/,$ENV{PATH})) { if (-x "$_/$program") { return 1; } } return ''; } sub init { my $this=shift; $this->SUPER::init(@_); $this->have_dpkg_deb($this->_inpath('dpkg-deb')); } =item checkfile Detect deb files by their extention. =cut sub checkfile { my $this=shift; my $file=shift; return $file =~ m/.*\.u?deb$/; } =item install Install a deb with dpkg. Pass in the filename of the deb to install. =cut 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 Test a deb with lintian. Pass in the filename of the deb to test. =cut sub test { my $this=shift; my $deb=shift; if ($this->_inpath("lintian")) { # Ignore some lintian warnings that don't matter for # aliened packages. return map { s/\n//; $_ } grep { ! /unknown-section alien/ } $this->runpipe(1, "lintian '$deb'"); } else { return "lintian not available, so not testing"; } } =item getcontrolfile Helper method. Pass it the name of a control file, and it will pull it out of the deb and return it. =cut sub getcontrolfile { my $this=shift; my $controlfile=shift; my $file=$this->filename; if ($this->have_dpkg_deb) { return $this->runpipe(1, "dpkg-deb --info '$file' $controlfile 2>/dev/null"); } else { # Solaris tar doesn't support O sub tar_out { my $file = shift; return "(mkdir /tmp/tar_out.$$ &&". " cd /tmp/tar_out.$$ &&". " tar xf - './$file' &&". " cat '$file'; cd /; rm -rf /tmp/tar_out.$$)"; } my $getcontrol = "ar -p '$file' control.tar.gz | gzip -dc | ".tar_out($controlfile)." 2>/dev/null"; return $this->runpipe(1, $getcontrol); } } =item scan Implement the scan method to read a deb file. =cut sub scan { my $this=shift; $this->SUPER::scan(@_); my $file=$this->filename; my @control=$this->getcontrolfile('control'); die "Control file couldn't be read!" if @control == 0; # Parse control file and extract fields. Use a translation table # to map between the debian names and the internal field names, # which more closely resemble those used by rpm (for historical # reasons; TODO: change to deb style names). my $description=''; my $field; my %fieldtrans=( Package => 'name', Version => 'version', Architecture => 'arch', Maintainer => 'maintainer', Section => 'group', Description => 'summary', ); for (my $i=0; $i <= $#control; $i++) { $_ = $control[$i]; chomp; if (/^(\w.*?):\s+(.*)/) { # Really old debs might have oddly capitalized # field names. $field=ucfirst(lc($1)); if (exists $fieldtrans{$field}) { $field=$fieldtrans{$field}; $this->$field($2); } } elsif (/^ / && $field eq 'summary') { # Handle extended description. s/^ //g; $_="" if $_ eq "."; $description.="$_\n"; } } $this->description($description); $this->copyright("see /usr/share/doc/".$this->name."/copyright"); $this->group("unknown") if ! $this->group; $this->distribution("Debian"); $this->origformat("deb"); $this->binary_info(scalar $this->getcontrolfile('control')); # Read in the list of conffiles, if any. my @conffiles; @conffiles=map { chomp; $_ } $this->getcontrolfile('conffiles'); $this->conffiles(\@conffiles); # Read in the list of all files. # Note that tar doesn't supply a leading '/', so we have to add that. my @filelist; if ($this->have_dpkg_deb) { @filelist=map { chomp; s:\./::; "/$_" } $this->runpipe(0, "dpkg-deb --fsys-tarfile '$file' | tar tf -"); } else { @filelist=map { chomp; s:\./::; "/$_" } $this->runpipe(0, "ar -p '$file' data.tar.gz | gzip -dc | tar tf -"); } $this->filelist(\@filelist); # Read in the scripts, if any. foreach my $field (qw{postinst postrm preinst prerm}) { $this->$field(scalar $this->getcontrolfile($field)); } return 1; } =item unpack Implement the unpack method to unpack a deb file. =cut sub unpack { my $this=shift; $this->SUPER::unpack(@_); my $file=$this->filename; if ($this->have_dpkg_deb) { $this->do("dpkg-deb", "-x", $file, $this->unpacked_tree) or die "Unpacking of '$file' failed: $!"; } else { $this->do("ar -p $file data.tar.gz | gzip -dc | (cd ".$this->unpacked_tree."; tar xpf -)") or die "Unpacking of '$file' failed: $!"; } return 1; } =item getpatch This method tries to find a patch file to use in the prep stage. If it finds one, it returns it. Pass in a list of directories to search for patches in. =cut sub getpatch { my $this=shift; my $anypatch=shift; my @patches; foreach my $dir (@_) { push @patches, glob("$dir/".$this->name."_".$this->version."-".$this->release."*.diff.gz"); } if (! @patches) { # Try not matching the release, see if that helps. foreach my $dir (@_) { push @patches,glob("$dir/".$this->name."_".$this->version."*.diff.gz"); } if (@patches && $anypatch) { # Fallback to anything that matches the name. foreach my $dir (@_) { push @patches,glob("$dir/".$this->name."_*.diff.gz"); } } } # If we ended up with multiple matches, return the first. return $patches[0]; } =item prep Adds a populated debian directory the unpacked package tree, making it ready for building. This can either be done automatically, or via a patch file. =cut sub prep { my $this=shift; my $dir=$this->unpacked_tree || die "The package must be unpacked first!"; $this->do("mkdir $dir/debian") || die "mkdir $dir/debian failed: $!"; # Use a patch file to debianize? if (defined $this->patchfile) { # The -f passed to zcat makes it pass uncompressed files # through without error. $this->do("zcat -f ".$this->patchfile." | (cd $dir; patch -p1)") or die "patch error: $!"; # Look for .rej files. die "patch failed with .rej files; giving up" if $this->runpipe(1, "find '$dir' -name \"*.rej\""); $this->do('find', '.', '-name', '*.orig', '-exec', 'rm', '{}', ';'); $this->do("chmod", 755, "$dir/debian/rules"); # It's possible that the patch file changes the debian # release or version. Parse changelog to detect that. open (my $changelog, "<$dir/debian/changelog") || return; my $line=<$changelog>; if ($line=~/^[^ ]+\s+\(([^)]+)\)\s/) { my $version=$1; $version=~s/\s+//; # ensure no whitespace if ($version=~/(.*)-(.*)/) { $version=$1; $this->release($2); } $this->version($1); } close $changelog; return; } # Automatic debianization. # Changelog file. open (OUT, ">$dir/debian/changelog") || die "$dir/debian/changelog: $!"; 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"; close OUT; # Control file. open (OUT, ">$dir/debian/control") || die "$dir/debian/control: $!"; print OUT "Source: ".$this->name."\n"; print OUT "Section: alien\n"; print OUT "Priority: extra\n"; print OUT "Maintainer: ".$this->username." <".$this->email.">\n"; print OUT "\n"; print OUT "Package: ".$this->name."\n"; print OUT "Architecture: ".$this->arch."\n"; if (defined $this->depends) { print OUT "Depends: ".join(", ", "\${shlibs:Depends}", $this->depends)."\n"; } else { print OUT "Depends: \${shlibs:Depends}\n"; } print OUT "Description: ".$this->summary."\n"; print OUT $this->description."\n"; close OUT; # Copyright file. open (OUT, ">$dir/debian/copyright") || die "$dir/debian/copyright: $!"; print OUT "This package was debianized by the alien program by converting\n"; print OUT "a binary .".$this->origformat." package on ".$this->date."\n"; print OUT "\n"; print OUT "Copyright: ".$this->copyright."\n"; print OUT "\n"; print OUT "Information from the binary package:\n"; print OUT $this->binary_info."\n"; close OUT; # Conffiles, if any. Note that debhelper takes care of files in /etc. my @conffiles=grep { $_ !~ /^\/etc/ } @{$this->conffiles}; if (@conffiles) { open (OUT, ">$dir/debian/conffiles") || die "$dir/debian/conffiles: $!"; print OUT join("\n", @conffiles)."\n"; close OUT; } # Use debhelper v7 open (OUT, ">$dir/debian/compat") || die "$dir/debian/compat: $!"; print OUT "7\n"; close OUT; # A minimal rules file. open (OUT, ">$dir/debian/rules") || die "$dir/debian/rules: $!"; my $fixpermscomment = $this->fixperms ? "" : "#"; print OUT << "EOF"; #!/usr/bin/make -f # debian/rules for alien PACKAGE=\$(shell dh_listpackages) build: dh_testdir clean: dh_testdir dh_testroot dh_clean -d binary-indep: build binary-arch: build dh_testdir dh_testroot dh_prep dh_installdirs dh_installdocs dh_installchangelogs # Copy the packages's files. find . -maxdepth 1 -mindepth 1 -not -name debian -print0 | \\ xargs -0 -r -i cp -a {} debian/\$(PACKAGE) # # If you need to move files around in debian/\$(PACKAGE) or do some # binary patching, do it here # # This has been known to break on some wacky binaries. # dh_strip dh_compress $fixpermscomment dh_fixperms dh_makeshlibs dh_installdeb -dh_shlibdeps dh_gencontrol dh_md5sums dh_builddeb binary: binary-indep binary-arch .PHONY: build clean binary-indep binary-arch binary EOF close OUT; $this->do("chmod", 755, "$dir/debian/rules"); if ($this->usescripts) { foreach my $script (qw{postinst postrm preinst prerm}) { $this->savescript($script, $this->$script()); } } 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! # Move files to FHS-compliant locations, if possible. '/usr/man' => '/usr/share/man', '/usr/info' => '/usr/share/info', '/usr/doc' => '/usr/share/doc', ); foreach my $olddir (keys %dirtrans) { if (-d "$dir/$olddir" && ! -e "$dir/$dirtrans{$olddir}") { # Ignore failure.. my ($dirbase)=$dirtrans{$olddir}=~/(.*)\//; $this->do("install", "-d", "$dir/$dirbase"); $this->do("mv", "$dir/$olddir", "$dir/$dirtrans{$olddir}"); if (-d "$dir/$olddir") { $this->do("rmdir", "-p", "$dir/$olddir"); } } else { delete $dirtrans{$olddir}; } } $this->dirtrans(\%dirtrans); # store for cleantree } =item build Build a deb. =cut sub build { my $this=shift; # Detect architecture mismatch and abort with a comprehensible # error message. my $arch=$this->arch; if ($arch ne 'all') { my $ret=system("dpkg-architecture", "-i".$arch); if ($ret != 0) { die $this->filename." is for architecture ".$this->arch." ; the package cannot be built on this system"."\n"; } } chdir $this->unpacked_tree; my $log=$this->runpipe(1, "debian/rules binary 2>&1"); chdir ".."; my $err=$?; if ($err) { if (! defined $log) { die "Package build failed; could not run generated debian/rules file.\n"; } die "Package build failed. Here's the log:\n", $log; } return $this->name."_".$this->version."-".$this->release."_".$this->arch.".deb"; } =item cleantree Delete the entire debian/ directory. =cut sub cleantree { my $this=shift; my $dir=$this->unpacked_tree || die "The package must be unpacked first!"; my %dirtrans=%{$this->dirtrans}; foreach my $olddir (keys %dirtrans) { if (! -e "$dir/$olddir" && -d "$dir/$dirtrans{$olddir}") { # Ignore failure.. (should I?) my ($dirbase)=$dir=~/(.*)\//; $this->do("install", "-d", "$dir/$dirbase"); $this->do("mv", "$dir/$dirtrans{$olddir}", "$dir/$olddir"); if (-d "$dir/$dirtrans{$olddir}") { $this->do("rmdir", "-p", "$dir/$dirtrans{$olddir}"); } } } $this->do("rm", "-rf", "$dir/debian"); } =item package Set/get package name. Always returns the packge name in lowercase with all invalid characters rmoved. The name is however, stored unchanged. =cut sub name { my $this=shift; # set $this->{name} = shift if @_; return unless defined wantarray; # optimization # get $_=lc($this->{name}); tr/_/-/; s/[^a-z0-9-\.\+]//g; return $_; } =item version Set/get package version. When the version is set, it will be stripped of any epoch. If there is a release, the release will be stripped away and used to set the release field as a side effect. Otherwise, the release will be set to 1. More sanitization of the version is done when the field is retrieved, to make sure it is a valid debian version field. =cut sub version { my $this=shift; # set if (@_) { my $version=shift; if ($version =~ /(.+)-(.+)/) { $version=$1; $this->release($2); } else { $this->release(1); } # Kill epochs. $version=~s/^\d+://; $this->{version}=$version; } # get return unless defined wantarray; # optimization $_=$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 s/[^-.+~:A-Za-z0-9]//g; # see lib/dpkg/parsehelp.c parseversion return $_; } =item release Set/get package release. Always returns a sanitized release version. The release is however, stored unchanged. =cut sub release { my $this=shift; # set $this->{release} = shift if @_; # get return unless defined wantarray; # optimization $_=$this->{release}; # Make sure the release contains digets. return $_."-1" unless /[0-9]/; return $_; } =item description Set/get description Although the description is stored internally unchanged, this will always return a sanitized form of it that is compliant with Debian standards. =cut sub description { my $this=shift; # set $this->{description} = shift if @_; # get return unless defined wantarray; # optimization my $ret=''; foreach (split /\n/,$this->{description}) { s/\t/ /g; # change tabs to spaces s/\s+$//g; # remove trailing whitespace $_="." if $_ eq ''; # empty lines become dots $ret.=" $_\n"; } $ret=~s/^\n+//g; # kill leading blank lines $ret.=" .\n" if length $ret; $ret.=" (Converted from a ".$this->origformat." package by alien version $Alien::Version.)"; return $ret; } =item date Returns the date, in rfc822 format. =cut sub date { my $this=shift; my $date=$this->runpipe(1, "date -R"); chomp $date; if (!$date) { die "date -R did not return a valid result."; } return $date; } =item email Returns an email address for the current user. =cut sub email { my $this=shift; return $ENV{EMAIL} if exists $ENV{EMAIL}; my $login = getlogin || (getpwuid($<))[0] || $ENV{USER}; my $mailname=''; if (open (MAILNAME,"; if (defined $mailname) { chomp $mailname; } close MAILNAME; } if (!$mailname) { $mailname=$this->runpipe(1, "hostname"); chomp $mailname; } return "$login\@$mailname"; } =item username Returns the user name of the real uid. =cut sub username { my $this=shift; my $username; my $login = getlogin || (getpwuid($<))[0] || $ENV{USER}; (undef, undef, undef, undef, undef, undef, $username) = getpwnam($login); # Remove GECOS fields from username. $username=~s/,.*//g; # The ultimate fallback. if ($username eq '') { $username=$login; } return $username; } =item savescript Saves script to debian directory. =cut sub savescript { my $this=shift; my $script=shift; my $data=shift; if ($script eq 'postinst') { $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 $modeinfo = $this->modeinfo; return $postinst unless ref $owninfo && %$owninfo; # If there is no postinst, let's make one up.. $postinst="#!/bin/sh\n" unless defined $postinst && length $postinst; my ($firstline, $rest)=split(/\n/, $postinst, 2); 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; } my $permscript="# alien added permissions fixup code\n"; foreach my $file (sort keys %$owninfo) { my $quotedfile=$file; $quotedfile=~s/'/'"'"'/g; # no single quotes in single quotes.. $permscript.="chown '".$owninfo->{$file}."' '$quotedfile'\n"; $permscript.="chmod '".$modeinfo->{$file}."' '$quotedfile'\n" if (defined $modeinfo->{$file}); } return "$firstline\n$permscript\n$rest"; } =back =head1 AUTHOR Joey Hess =cut 1 alien/Alien/Package/Rpm.pm0000644000000000000000000004020712303417623012517 0ustar #!/usr/bin/perl -w =head1 NAME Alien::Package::Rpm - an object that represents a rpm package =cut package Alien::Package::Rpm; use strict; use base qw(Alien::Package); =head1 DESCRIPTION This is an object class that represents a rpm package. It is derived from Alien::Package. =head1 FIELDS =over 4 =item prefixes Relocatable rpm packages have a prefixes field. =back =head1 METHODS =over 4 =item checkfile Detect rpm files by their extention. =cut sub checkfile { my $this=shift; my $file=shift; return $file =~ m/.*\.rpm$/; } =item install Install a rpm. If RPMINSTALLOPT is set in the environement, the options in it are passed to rpm on its command line. =cut 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 Implement the scan method to read a rpm file. =cut sub scan { my $this=shift; $this->SUPER::scan(@_); my $file=$this->filename; my %fieldtrans=( PREIN => 'preinst', POSTIN => 'postinst', PREUN => 'prerm', POSTUN => 'postrm', LICENSE => 'copyright', ); # Use --queryformat to pull out all the fields we need. foreach my $field (qw{NAME VERSION RELEASE ARCH CHANGELOGTEXT SUMMARY DESCRIPTION PREFIXES}, keys(%fieldtrans)) { my $value=$this->runpipe(0, "LANG=C rpm -qp --queryformat \%{$field} '$file'"); next if $? || $value eq '(none)'; my $key; if (exists $fieldtrans{$field}) { $key=$fieldtrans{$field}; } else { $key=lc($field); } $this->$key($value); } # Get the conffiles list. $this->conffiles([map { chomp; $_ } $this->runpipe(0, "LANG=C rpm -qcp '$file'")]); if (defined $this->conffiles->[0] && $this->conffiles->[0] eq '(contains no files)') { $this->conffiles([]); } $this->binary_info(scalar $this->runpipe(0, "rpm -qpi '$file'")); # Get the filelist. $this->filelist([map { chomp; $_ } $this->runpipe(0, "LANG=C rpm -qpl '$file'")]); if (defined $this->filelist->[0] && $this->filelist->[0] eq '(contains no files)') { $this->filelist([]); } # Sanity check and sanitize fields. unless (defined $this->summary) { # Older rpms will have no summary, but will have a # description. We'll take the 1st line out of the # description, and use it for the summary. $this->summary($this->description."\n")=~m/(.*?)\n/m; # Fallback. if (! $this->summary) { $this->summary('Converted RPM package'); } } unless (defined $this->description) { $this->description($this->summary); } unless (defined $this->copyright) { # Older rpms have no licence tag, but have a copyright. $this->copyright($this->runpipe(0, "LANG=C rpm -qp --queryformat \%{COPYRIGHT} '$file'")); # Fallback. if (! $this->copyright) { $this->copyright('unknown'); } } if (! defined $this->release || ! defined $this->version || ! defined $this->name) { die "Error querying rpm file"; } $this->distribution("Red Hat"); $this->origformat("rpm"); return 1; } =item unpack Implement the unpack method to unpack a rpm file. This is a little nasty because it has to handle relocatable rpms and has to do a bit of permissions fixing as well. =cut sub unpack { my $this=shift; $this->SUPER::unpack(@_); my $workdir=$this->unpacked_tree; # Check if we need to use lzma to uncompress the cpio archive my $decomp=''; if ($this->do("rpm2cpio '".$this->filename."' | lzma -t -q > /dev/null 2>&1")) { $decomp = 'lzma -d -q |'; } $this->do("rpm2cpio '".$this->filename."' | (cd $workdir; $decomp cpio --extract --make-directories --no-absolute-filenames --preserve-modification-time) 2>&1") or die "Unpacking of '".$this->filename."' failed"; # cpio does not necessarily store all parent directories in an # archive, and so some directories, if it has to make them and has # no permission info, will come out with some random permissions. # Find those directories and make them mode 755, which is more # reasonable. my %seenfiles; open (RPMLIST, "rpm2cpio '".$this->filename."' | $decomp cpio -it --quiet |") or die "File list of '".$this->filename."' failed"; while () { chomp; $seenfiles{$_}=1; } close RPMLIST; foreach my $file (`cd $workdir; find ./`) { chomp $file; if (! $seenfiles{$file} && -d "$workdir/$file" && ! -l "$workdir/$file") { $this->do("chmod 755 '$workdir/$file'"); } } # If the package is relocatable. We'd like to move it to be under # the $this->prefixes directory. However, it's possible that that # directory is in the package - it seems some rpm's are marked as # relocatable and unpack already in the directory they can relocate # to, while some are marked relocatable and the directory they can # relocate to is removed from all filenames in the package. I # suppose this is due to some change between versions of rpm, but # none of this is adequatly documented, so we'll just muddle # through. # # 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: $!"; } } 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]); } } # rpm files have two sets of permissions; the set in the cpio # archive, and the set in the control data; which override them. # The set in the control data are more correct, so let's use those. # Some permissions setting may have to be postponed until the # postinst. my %owninfo = (); my %modeinfo = (); open (GETPERMS, 'rpm --queryformat \'[%{FILEMODES} %{FILEUSERNAME} %{FILEGROUPNAME} %{FILENAMES}\n]\' -qp \''.$this->filename.'\' |'); while () { chomp; my ($mode, $owner, $group, $file) = split(/ /, $_, 4); next if -l "$workdir/$file"; $mode = $mode & 07777; # remove filetype my $uid = getpwnam($owner); if (! defined $uid || $uid != 0) { $owninfo{$file}=$owner; $uid=0; } my $gid = getgrnam($group); if (! defined $gid || $gid != 0) { if (exists $owninfo{$file}) { $owninfo{$file}.=":$group"; } else { $owninfo{$file}=":$group"; } $gid=0; } if (defined($owninfo{$file}) && (($mode & 07000) > 0)) { $modeinfo{$file} = sprintf "%lo", $mode; } # Note that ghost files exist in the metadata but not # in the cpio archive, so check that the file exists # before trying to access it if (-e "$workdir/$file") { if ($> == 0) { $this->do("chown", "$uid:$gid", "$workdir/$file") || die "failed chowning $file to $uid\:$gid\: $!"; } $this->do("chmod", sprintf("%lo", $mode), "$workdir/$file") || die "failed changing mode of $file to $mode\: $!"; } } $this->owninfo(\%owninfo); $this->modeinfo(\%modeinfo); return 1; } =item prep Prepare for package building by generating the spec file. =cut sub prep { my $this=shift; my $dir=$this->unpacked_tree || die "The package must be unpacked first!"; # Place %config in front of files that are conffiles. my @conffiles = @{$this->conffiles}; my $filelist; foreach my $fn (@{$this->filelist}) { # Unquote any escaped characters in filenames - needed for # non ascii characters. (eg. iso_8859-1 latin set) if ($fn =~ /\\/) { $fn=eval qq{"$fn"}; } # Note all filenames are quoted in case they contain # spaces. if ($fn =~ m:/$:) { $filelist.=qq{%dir "$fn"\n}; } elsif (grep(m:^\Q$fn\E$:,@conffiles)) { # it's a conffile $filelist.=qq{%config "$fn"\n}; } else { # normal file $filelist.=qq{"$fn"\n}; } } # Write out the spec file. my $spec="$dir/".$this->name."-".$this->version."-".$this->release.".spec"; open (OUT, ">$spec") || die "$spec: $!"; my $pwd=`pwd`; chomp $pwd; print OUT "Buildroot: $pwd/$dir\n"; # must be absolute dirname print OUT "Name: ".$this->name."\n"; print OUT "Version: ".$this->version."\n"; print OUT "Release: ".$this->release."\n"; print OUT "Requires: ".$this->depends."\n" if defined $this->depends && length $this->depends; print OUT "Summary: ".$this->summary."\n"; print OUT "License: ".$this->copyright."\n"; print OUT "Distribution: ".$this->distribution."\n"; print OUT "Group: Converted/".$this->group."\n"; print OUT "\n"; print OUT "\%define _rpmdir ../\n"; # write rpm to current directory print OUT "\%define _rpmfilename %%{NAME}-%%{VERSION}-%%{RELEASE}.%%{ARCH}.rpm\n"; print OUT "\%define _unpackaged_files_terminate_build 0\n"; # work on SuSE print OUT "\n"; if ($this->usescripts) { if ($this->preinst) { print OUT "\%pre\n"; print OUT $this->preinst."\n"; print OUT "\n"; } if ($this->postinst) { print OUT "\%post\n"; print OUT $this->postinst."\n"; print OUT "\n"; } if ($this->prerm) { print OUT "\%preun\n"; print OUT $this->prerm."\n"; print OUT "\n"; } if ($this->postrm) { print OUT "\%postun\n"; print OUT $this->postrm."\n"; print OUT "\n"; } } print OUT "\%description\n"; print OUT $this->description."\n"; print OUT "\n"; print OUT "(Converted from a ".$this->origformat." package by alien version $Alien::Version.)\n"; print OUT "\n"; print OUT "%files\n"; print OUT $filelist if defined $filelist; close OUT; } =item cleantree Delete the spec file. =cut sub cleantree { my $this=shift; my $dir=$this->unpacked_tree || die "The package must be unpacked first!"; unlink "$dir/".$this->name."-".$this->version."-".$this->release.".spec"; } =item build Build a rpm. If RPMBUILDOPT is set in the environement, the options in it are passed to rpm on its command line. An optional parameter, if passed, can be used to specify the program to use to build the rpm. It defaults to rpmbuild. =cut sub build { my $this=shift; my $buildcmd=shift || 'rpmbuild'; my $dir=$this->unpacked_tree || die "The package must be unpacked first!"; # Ask rpm how it's set up. We want to know where it will place rpms. my $rpmdir; foreach ($this->runpipe(1, "rpm --showrc")) { chomp; if (/^rpmdir\s+:\s(.*)$/) { $rpmdir=$1; } } my $rpm=$this->name."-".$this->version."-".$this->release.".".$this->arch.".rpm"; my $opts=''; if ($rpmdir) { # Old versions of rpm toss it off in the middle of nowhere. $rpm="$rpmdir/".$this->arch."/$rpm"; # This is the old command line argument to set the arch. $opts="--buildarch ".$this->arch; } else { # Presumably we're dealing with rpm 3.0 or above, which # doesn't output rpmdir in any format I'd care to try to # parse. Instead, rpm is now of a late enough version to # notice the %define's in the spec file, that will make the # file end up in the directory we started in. # Anyway, let's assume this is version 3 or above. # This is the new command line arcgument to set the arch # rpms. It appeared in rpm version 3. $opts="--target ".$this->arch; } $opts.=" $ENV{RPMBUILDOPT}" if exists $ENV{RPMBUILDOPT}; my $pwd=`pwd`; chomp $pwd; my $command="cd $dir; $buildcmd --buildroot='$pwd/$dir' -bb $opts '".$this->name."-".$this->version."-".$this->release.".spec'"; my $log=$this->runpipe(1, "$command 2>&1"); if ($?) { die "Package build failed. Here's the log of the command ($command):\n", $log; } return $rpm; } =item version Set/get version. When retreiving the version, remove any dashes in it. =cut sub version { my $this=shift; # set $this->{version} = shift if @_; # get return unless defined wantarray; # optimization $_=$this->{version}; tr/-/_/; return $_; } =item postinst =item postrm =item preinst =item prerm Set/get script fields. When retrieving a value, we have to do some truely sick mangling. Since 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 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. sub _script_helper { my $this=shift; my $script=shift; # 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/bash\n$prefixcode$value"; } else { $value=~s@^#!\s*/bin/sh(\s)@#!/bin/bash$1@; $value=~s/\n/\n$prefixcode/s; } $this->{$script} = $value; } $this->{$script} = shift if @_; # get return unless defined wantarray; # optimization $_=$this->{$script}; return '' unless defined $_; return $_ if m/^\s*$/; return $_ if m/^#!\s*\/bin\/sh/; # looks like a shell script already my $f = pack("u",$_); $f =~ s/%/%%/g; # Rpm expands %S, so escape such things. return "#!/bin/sh\n". "set -e\n". "mkdir /tmp/alien.\$\$\n". qq{perl -pe '\$_=unpack("u",\$_)' << '__EOF__' > /tmp/alien.\$\$/script\n}. $f."__EOF__\n". "chmod 755 /tmp/alien.\$\$/script\n". "/tmp/alien.\$\$/script \"\$@\"\n". "rm -f /tmp/alien.\$\$/script\n". "rmdir /tmp/alien.\$\$"; } sub postinst { my $this=shift; $this->_script_helper('postinst', @_); } sub postrm { my $this=shift; $this->_script_helper('postrm', @_); } sub preinst { my $this=shift; $this->_script_helper('preinst', @_); } sub prerm { my $this=shift; $this->_script_helper('prerm', @_); } =item arch Set/get arch field. When the arch field is set, some sanitizing is done first to convert it to the debian format used internally. When it's retreived it's converted back to rpm form from the internal form. =cut sub arch { my $this=shift; my $arch; if (@_) { $arch=shift; if ($arch eq 1) { $arch='i386'; } elsif ($arch eq 2) { $arch='alpha'; } elsif ($arch eq 3) { $arch='sparc'; } elsif ($arch eq 6) { $arch='m68k'; } elsif ($arch eq 'noarch') { $arch='all'; } elsif ($arch eq 'ppc') { $arch='powerpc'; } elsif ($arch eq 'x86_64') { $arch='amd64'; } elsif ($arch eq 'em64t') { $arch='amd64'; } elsif ($arch =~ m/i\d86/i || $arch =~ m/pentium/i) { # Treat 486, 586, etc, as 386. $arch='i386'; } elsif ($arch eq 'armv4l') { # Treat armv4l as arm. $arch='arm'; } elsif ($arch eq 'armv7l') { # Treat armv7l as armel. $arch='armel'; } elsif ($arch eq 'parisc') { $arch='hppa'; } elsif ($arch eq 'ppc64le') { $arch='ppc64el'; } $this->{arch}=$arch; } $arch=$this->{arch}; if ($arch eq 'amd64') { $arch='x86_64'; } elsif ($arch eq 'powerpc') { # XXX is this the canonical name for powerpc on rpm # systems? $arch='ppc'; } elsif ($arch eq 'hppa') { $arch='parisc'; } elsif ($arch eq 'all') { $arch='noarch'; } elsif ($arch eq 'ppc64el') { $arch='ppc64le'; } return $arch } =back =head1 AUTHOR Joey Hess =cut 1 alien/Alien/Package/Tgz.pm0000644000000000000000000001120312211426754012522 0ustar #!/usr/bin/perl -w =head1 NAME Alien::Package::Tgz - an object that represents a tgz package =cut 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 =over 4 =item scripttrans Translation table between canoical script names and the names used in tgz's. =cut use constant scripttrans => { postinst => 'doinst.sh', postrm => 'delete.sh', prerm => 'predelete.sh', preinst => 'predoinst.sh', }; =back =head1 METHODS =over 4 =item checkfile Detect tgz files by their extention. =cut sub checkfile { my $this=shift; my $file=shift; return $file =~ m/$tarext$/; } =item install Install a tgz with installpkg. Pass in the filename of the tgz to install. installpkg (a slackware program) is used because I'm not sanguine about just untarring a tgz file. It might trash a system. =cut sub install { my $this=shift; 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" } } =item scan Scan a tgz file for fields. Has to scan the filename for most of the information, since there is little useful metadata in the file itself. =cut sub scan { my $this=shift; $this->SUPER::scan(@_); my $file=$this->filename; # Get basename of the filename. my ($basename)=('/'.$file)=~m#^/?.*/(.*?)$#; # Strip out any tar extentions. $basename=~s/$tarext//; if ($basename=~m/([\w-]+)-([0-9\.?]+).*/) { $this->name($1); $this->version($2); } else { $this->name($basename); $this->version(1); } $this->arch('all'); $this->summary("Converted tgz package"); $this->description($this->summary); $this->copyright('unknown'); $this->release(1); $this->distribution("Slackware/tarball"); $this->group("unknown"); $this->origformat('tgz'); $this->changelogtext(''); $this->binary_info($this->runpipe(0, "ls -l '$file'")); # Now figure out the conffiles. Assume anything in etc/ is a # conffile. my @conffiles; open (FILELIST,"tar vtf $file | grep etc/ |") || die "getting filelist: $!"; while () { # Make sure it's a normal file. This is looking at the # permissions, and making sure the first character is '-'. # Ie: -rw-r--r-- if (m:^-:) { # Strip it down to the filename. m/^(.*) (.*)$/; push @conffiles, "/$2"; } } $this->conffiles(\@conffiles); # 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 tf $file |") || die "getting filelist: $!"; while () { chomp; unless (m:^install/:) { push @filelist, "/$_"; } } $this->filelist(\@filelist); # Now get the scripts. foreach my $script (keys %{scripttrans()}) { $this->$script(scalar $this->runpipe(1, "tar Oxf '$file' install/${scripttrans()}{$script} 2>/dev/null")); } return 1; } =item unpack Unpack tgz. =cut sub unpack { my $this=shift; $this->SUPER::unpack(@_); my $file=abs_path($this->filename); $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"); return 1; } =item prep Adds a populated install directory to the build tree. =cut sub prep { my $this=shift; my $dir=$this->unpacked_tree || die "The package must be unpacked first!"; my $install_made=0; if ($this->usescripts) { foreach my $script (keys %{scripttrans()}) { my $data=$this->$script(); my $out=$this->unpacked_tree."/install/".${scripttrans()}{$script}; next if ! defined $data || $data =~ m/^\s*$/; if (!$install_made) { mkdir($this->unpacked_tree."/install", 0755) || die "unable to mkdir ".$this->unpacked_tree."/install: $!"; $install_made=1; } open (OUT, ">$out") || die "$out: $!"; print OUT $data; close OUT; $this->do("chmod", 755, $out); } } } =item build Build a tgz. =cut sub build { my $this=shift; my $tgz=$this->name."-".$this->version.".tgz"; $this->do("cd ".$this->unpacked_tree."; tar czf ../$tgz .") or die "Package build failed"; return $tgz; } =back =head1 AUTHOR Joey Hess =cut 1 alien/Alien/Package/Slp.pm0000644000000000000000000001650312211426754012524 0ustar #!/usr/bin/perl -w =head1 NAME Alien::Package::Slp - an object that represents a slp package =cut package Alien::Package::Slp; use strict; use base qw(Alien::Package); =head1 DESCRIPTION This is an object class that represents a slp package. It is derived from Alien::Package. =head1 CLASS DATA The following data is global to the class, and is used to describe the slp package format, which this class processes directly. =over 4 =item footer_size Complete sizeof(slpformat) from slp.h in the stampede package manager source. =item footer_packstring This is the pack format string for the footer. (A=space terminated character, I=unsigned integer.) =item footer_version What package format are we up to now? (Lowest one this is still compatable with.) =item archtrans This is a translation table between architectures and the number that represents them in a slp package. =item fieldlist This is a list of all the fields in the order they appear in the footer. =cut use constant footer_size => 3784; use constant footer_packstring => "A756IIIIA128A128A80A1536A512A512A30A30IA20A20III"; use constant footer_version => 5; use constant archtrans => { 0 => 'all', 1 => 'i386', 2 => 'sparc', 3 => 'alpha', 4 => 'powerpc', 5 => 'm68k', }; use constant copyrighttrans => { 0 => 'GPL', 1 => 'BSD', 2 => 'LGPL', 3 => 'unknown', 254 => 'unknown', }; use constant fieldlist => [qw{conffiles priority compresstype release copyright conflicts setupscript summary description depends provides maintainer date compiler version name arch group slpkgversion}]; =back =head1 FIELDS =over 4 =item compresstype Holds the compression type used in the slp file. =item slpkgversion Holds the slp package format version of the slp file. =back =head1 METHODS =over 4 =item checkfile Detect slp files by their extention. =cut sub checkfile { my $this=shift; my $file=shift; return $file =~ m/.*\.slp$/; } =item install Install a slp. Pass in the filename of the slp to install. =cut 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 Pulls the footer out of the slp file and returns it. =cut sub getfooter { my $this=shift; my $file=$this->filename; open (SLP,"<$file") || die "$file: $!"; # position at beginning of footer (2 = seek from EOF) seek SLP,(- footer_size),2; read SLP,$_,footer_size; close SLP; return $_; } =item scan Implement the scan method to read a slp file. =cut sub scan { my $this=shift; $this->SUPER::scan(@_); my $file=$this->filename; # Decode the footer. my @values=unpack(footer_packstring(),$this->getfooter); # Populate fields. foreach my $field (@{fieldlist()}) { $_=shift @values; $this->$field($_); } # A simple sanity check. if (! defined $this->slpkgversion || $this->slpkgversion < footer_version()) { die "unsupported stampede package version"; } # Read in the file list. my @filelist; # FIXME: support gzip files too! foreach ($this->runpipe(0, "bzip2 -d < '$file' | tar -tf -")) { chomp; s:^\./:/:; $_="/$_" unless m:^/:; push @filelist, $_; } $this->filelist(\@filelist); # TODO: read in postinst script. $this->distribution('Stampede'); $this->origformat('slp'); $this->changelogtext(''); $this->binary_info($this->runpipe(0, "ls -l '$file'")); return 1; } =item unpack Unpack a slp file. They can be compressed in various ways, depending on what is in the compresstype field. =cut sub unpack { my $this=shift; $this->SUPER::unpack(@_); my $file=$this->filename; my $compresstype=$this->compresstype; if ($compresstype == 0) { $this->do("bzip2 -d < $file | (cd ".$this->unpacked_tree."; tar xpf -)") } elsif ($compresstype == 1) { $this->do("gzip -dc $file | (cd ".$this->unpacked_tree."; tar xpf -)") } else { die "package uses an unknown compression type, $compresstype (please file a bug report)"; } return 1; } =item build Build a slp. =cut sub build { my $this=shift; my $slp=$this->name."-".$this->version.".slp"; # Now generate the footer. # We cannot use the actual $slp::footer_packstring, becuase it uses # space terminated strings (A) instead of null terminated strings # (a). That is good for decoding, but not for encoding. my $fmt=footer_packstring(); $fmt=~tr/A/a/; my $footer=pack($fmt, $this->conffiles, 2, # Use priority optional for alien packages. 0, # Always use bzip2 as the compression type. $this->release, 254, # Don't try to guess copyright, just use unknown. '', # Conflicts. '', # Set up script. TODO $this->summary, $this->description, '', # $this->depends would go here, but slp uses some weird format '', # Provides. $this->maintainer, scalar localtime, # Use current date. 252, # Unknown compiler. $this->version, $this->name, $this->arch, 252, # Unknown group. footer_version(), ); # Generate .tar.bz2 file. # Note that it's important I use "./*" instead of just "." or # something like that, becuase it results in a tar file where all # the files in it start with "./", which is consitent with how # normal stampede files look. $this->do("(cd ".$this->unpacked_tree."; tar cf - ./*) | bzip2 - > $slp") or die "package build failed: $!"; # Now append the footer. open (OUT,">>$slp") || die "$slp: $!"; print OUT $footer; close OUT; return $slp; } =item conffiles Set/get conffiles. When the conffiles are set, the format used by slp (a colon-delimited list) is turned into the real list that is used internally. The list is changed back into slp's internal format when it is retreived. =cut sub conffiles { my $this=shift; # set $this->{conffiles}=[split /:/, shift] if @_; # get return unless defined wantarray; # optimization return join(':',@{$this->{conffiles}}); } =item copyright Set/get copyright. When the copyright is set, the number used by slp is changed into a textual description. This is changed back into a number when the value is retreived. =cut sub copyright { my $this=shift; # set $this->{copyright}=(${copyrighttrans()}{shift} || 'unknown') if @_; # get return unless defined wantarray; # optimization my %transcopyright=reverse %{copyrighttrans()}; return $transcopyright{$this->{copyright}} if (exists $transcopyright{$this->{copyright}}); return 254; # unknown } =item arch Set/get arch. When the arch is set, the number used by slp is changed into a textual description. This is changed back into a number when the value is retreived. =cut sub arch { my $this=shift; # set if (@_) { my $arch=shift; $this->{arch}=${archtrans()}{$arch}; die "unknown architecture $arch" unless defined $this->{arch}; } # get return unless defined wantarray; # optimization my %transarch=reverse %{archtrans()}; return $transarch{$this->{arch}} if (exists $transarch{$this->{arch}}); die "Stampede does not support architecture ".$this->{arch}." packages"; } =item release Set/get release version. When the release version is retreived, it is converted to an unsigned integer, as is required by the slp package format. =cut sub release { my $this=shift; # set $this->{release}=shift if @_; # get return unless defined wantarray; # optimization return int($this->{release}); } =back =head1 AUTHOR Joey Hess =cut 1 alien/Alien/Package/Pkg.pm0000644000000000000000000001606512211426754012512 0ustar #!/usr/bin/perl -w =head1 NAME Alien::Package::Pkg - an object that represents a Solaris pkg package =cut package Alien::Package::Pkg; use strict; use base qw(Alien::Package); =head1 DESCRIPTION This is an object class that represents a pkg package, as used in Solaris. It is derived from Alien::Package. =head1 CLASS DATA =over 4 =item scripttrans Translation table between canoical script names and the names used in pkg's. =cut use constant scripttrans => { postinst => 'postinstall', preinst => 'preinstall', }; =back =head1 METHODS =over 4 =item init This class needs the Solaris pkginfo and kgtrans tools to work. =cut sub init { foreach (qw(/usr/bin/pkginfo /usr/bin/pkgtrans)) { -x || die "$_ is needed to use ".__PACKAGE__."\n"; } } =item converted_name Convert name from something debian-like to something that the Solaris constraints will handle (i.e. 9 chars max). =cut sub converted_name { my $this = shift; my $prefix = "ALN"; my $name = $this->name; for ($name) { # A Short list to start us off. # Still, this is risky since we need # unique names. s/^lib/l/; s/-perl$/p/; s/^perl-/pl/; } $name = substr($name, 0, 9); return $prefix.$name; } =item checkfile Detect pkg files by their contents. =cut sub checkfile { my $this=shift; my $file=shift; open(F, $file) || die "Couldn't open $file: $!\n"; my $line = ; close F; return unless defined $line; if($line =~ "# PaCkAgE DaTaStReAm") { return 1; } } =item install Install a pkg with pkgadd. Pass in the filename of the pkg to install. =cut sub install { my $this=shift; 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"; } } =item scan Scan a pkg file for fields. =cut sub scan { my $this=shift; $this->SUPER::scan(@_); my $file=$this->filename; my $tdir="pkg-scan-tmp.$$"; $this->do("mkdir", $tdir) || die "Error making $tdir: $!\n"; my $pkgname; if (-x "/usr/bin/pkginfo" && -x "/usr/bin/pkgtrans") { my $pkginfo; open(INFO, "/usr/bin/pkginfo -d $file|") || die "Couldn't open pkginfo: $!\n"; $_ = ; ($pkgname) = /\S+\s+(\S+)/; close INFO; # Extract the files $this->do("/usr/bin/pkgtrans -i $file $tdir $pkgname") || die "Error running pkgtrans: $!\n"; open(INFO, "$tdir/$pkgname/pkginfo") || die "Couldn't open pkgparam: $!\n"; my ($key, $value); while () { if (/^([^=]+)=(.*)$/) { $key = $1; $value = $2; } else { $value = $_; } push @{$pkginfo->{$key}}, $value } close INFO; $file =~ m,([^/]+)-[^-]+(?:.pkg)$,; $this->name($1); $this->arch($pkginfo->{ARCH}->[0]); $this->summary("Converted Solaris pkg package"); $this->description(join("", @{[$pkginfo->{DESC} || "."]})); $this->version($pkginfo->{VERSION}->[0]); $this->distribution("Solaris"); $this->group("unknown"); # *** FIXME $this->origformat('pkg'); $this->changelogtext(''); $this->binary_info('unknown'); # *** FIXME if (-f "$tdir/$pkgname/copyright") { open (COPYRIGHT, "$file/install/copyright") || die "Couldn't open copyright: $!\n"; $this->copyright(join("\n",)); close(COPYRIGHT); } else { $this->copyright("unknown"); } } # Now figure out the conffiles. Assume anything in etc/ is a # conffile. my @conffiles; my @filelist; my @scripts; open (FILELIST,"$tdir/$pkgname/pkgmap") || die "getting filelist ($file/pkgmap): $!"; while () { if (m,^1 f \S+ etc/([^\s=]+),) { push @conffiles, "/etc/$1"; } if (m,^1 [fd] \S+ ([^\s=]+),) { push @filelist, $1; } if (m,^1 i (\S+),) { push @scripts, $1; } } $this->filelist(\@filelist); $this->conffiles(\@conffiles); # Now get the scripts. foreach my $script (keys %{scripttrans()}) { $this->$script(scripttrans()->{$script}) if -e "$file/".scripttrans()->{$script}; } $this->do("rm -rf $tdir"); return 1; } =item unpack Unpack pkg. =cut sub unpack { my $this=shift; $this->SUPER::unpack(@_); my $file=$this->filename; my $pkgname; open(INFO, "/usr/bin/pkginfo -d $file|") || die "Couldn't open pkginfo: $!\n"; $_ = ; ($pkgname) = /\S+\s+(\S+)/; close INFO; if (-x "/usr/bin/pkgtrans") { my $workdir = $this->name."-".$this->version;; $this->do("mkdir", $workdir) || die "unable to mkdir $workdir: $!\n"; $this->do("/usr/bin/pkgtrans $file $workdir $pkgname") || die "unable to extract $file: $!\n"; rename("$workdir/$pkgname", "$ {workdir}_1") || die "unable rename $workdir/$pkgname: $!\n"; rmdir $workdir; rename("$ {workdir}_1", $workdir) || die "unable to rename $ {workdir}_1: $!\n"; $this->unpacked_tree($workdir); } } =item prep Adds a populated install directory to the build tree. =cut sub prep { my $this=shift; my $dir=$this->unpacked_tree || die "The package must be unpacked first!"; # opendir(DIR, $this->unpacked_tree); # my @sub = map {$this->unpacked_tree . "$_"} # grep {/^\./} readdir DIR; # closedir DIR; $this->do("cd $dir; find . -print | sed -e '/.\\/prototype\$/d' | pkgproto > ./prototype") || die "error during pkgproto: $!\n"; open(PKGPROTO, ">>$dir/prototype") || die "error appending to prototype: $!\n"; open(PKGINFO, ">$dir/pkginfo") || die "error creating pkginfo: $!\n"; print PKGINFO qq{PKG="}.$this->converted_name.qq{"\n}; print PKGINFO qq{NAME="}.$this->name.qq{"\n}; print PKGINFO qq{ARCH="}.$this->arch.qq{"\n}; print PKGINFO qq{VERSION="}.$this->version.qq{"\n}; print PKGINFO qq{CATEGORY="application"\n}; print PKGINFO qq{VENDOR="Alien-converted package"\n}; print PKGINFO qq{EMAIL=\n}; print PKGINFO qq{PSTAMP=alien\n}; print PKGINFO qq{MAXINST=1000\n}; print PKGINFO qq{BASEDIR="/"\n}; print PKGINFO qq{CLASSES="none"\n}; print PKGINFO qq{DESC="}.$this->description.qq{"\n}; close PKGINFO; print PKGPROTO "i pkginfo=./pkginfo\n"; $this->do("mkdir", "$dir/install") || die "unable to mkdir $dir/install: $!"; open(COPYRIGHT, ">$dir/install/copyright") || die "error creating copyright: $!\n"; print COPYRIGHT $this->copyright; close COPYRIGHT; print PKGPROTO "i copyright=./install/copyright\n"; foreach my $script (keys %{scripttrans()}) { my $data=$this->$script(); my $out=$this->unpacked_tree."/install/".${scripttrans()}{$script}; next if ! defined $data || $data =~ m/^\s*$/; open (OUT, ">$out") || die "$out: $!"; print OUT $data; close OUT; $this->do("chmod", 755, $out); print PKGPROTO "i $script=$out\n"; } close PKGPROTO; } =item build Build a pkg. =cut sub build { my $this = shift; my $dir = $this->unpacked_tree; $this->do("cd $dir; pkgmk -r / -d .") || die "Error during pkgmk: $!\n"; my $pkgname = $this->converted_name; my $name = $this->name."-".$this->version.".pkg"; $this->do("pkgtrans $dir $name $pkgname") || die "Error during pkgtrans: $!\n"; $this->do("mv", "$dir/$name", $name); return $name; } =back =head1 AUTHOR Mark Hershberger =cut 1 alien/Alien/Package/Lsb.pm0000644000000000000000000000432512211426754012505 0ustar #!/usr/bin/perl -w =head1 NAME Alien::Package::Lsb - an object that represents a lsb package =cut package Alien::Package::Lsb; use strict; use base qw(Alien::Package::Rpm); =head1 DESCRIPTION This is an object class that represents a lsb package. It is derived from Alien::Package::Rpm. =head1 METHODS =over 4 =item checkfile Lsb files are rpm's with a lsb- prefix, that depend on a package called 'lsb' and nothing else. =cut sub checkfile { my $this=shift; my $file=shift; return unless $file =~ m/^lsb-.*\.rpm$/; my @deps=$this->runpipe(1, "LANG=C rpm -qp -R '$file'"); return 1 if grep { s/\s+//g; $_ eq 'lsb' } @deps; return; } =item scan Uses the parent scan method to read the file. lsb is added to the depends. =cut sub scan { my $this=shift; $this->SUPER::scan(@_); $this->distribution("Linux Standard Base"); $this->origformat("lsb"); $this->depends("lsb"); # Converting from lsb, so the scripts should be portable and safe. # Haha. $this->usescripts(1); return 1; } =item prep The parent's prep method is used to generate the spec file. First though, the package's name is munged to make it lsb compliant (sorta) and lsb is added to its dependencies. =cut sub prep { my $this=shift; $this->_orig_name($this->name); if ($this->name !~ /^lsb-/) { $this->name("lsb-".$this->name); } $this->_orig_depends($this->depends); $this->depends("lsb"); # Always include scripts when generating lsb package. $this->_orig_usescripts($this->usescripts); $this->usescripts(1); $this->SUPER::prep(@_); } =item revert Undo the changes made by prep. =cut sub revert { my $this=shift; $this->name($this->_orig_name); $this->depends($this->_orig_depends); $this->usescripts($this->_orig_usescripts); $this->SUPER::revert(@_); } =item build Uses the parent's build method. If a lsb-rpmbuild is available, uses it to build the package. =cut sub build { my $this=shift; my $buildcmd=shift || 'rpmbuild'; foreach (split(/:/,$ENV{PATH})) { if (-x "$_/lsb-rpmbuild") { $buildcmd='lsb-rpmbuild'; last; } } $this->SUPER::build($buildcmd); } =item incrementrelease LSB package versions are not changed. =cut sub incrementrelease {} =back =head1 AUTHOR Joey Hess =cut 1 alien/TODO0000644000000000000000000000070012211426754007525 0ustar * handling postinst script when converting to/from .slp packages. * alien needs to handle relocatable conffiles, partially relocatable packages, and packages that have maultiple parts that relocate differently. * rpm ghost file support. On conversion, make preinst move file out of the way, postinst put it back. Thus emulating the behavior of rpm. * seems slackware packages may now incliude an install/slack-desc with a description in it alien/INSTALL0000644000000000000000000000043312211426754010071 0ustar To try alien before installing, just run ./alien.pl from this directory. Most features will work prior to installation. To install alien, become root and type: perl Makefile.PL; make; make install To use alien, you'll need a variety of other software. See the README for details. alien/gendiff.txt0000644000000000000000000000134312211426754011204 0ustar Alien can use special diff files to help make alien packages conform to debian policy. This is only used when you are converting to deb format. This document briefly explains how to make them. It assumes you are familiar with working with debian source packages. * Use "alien -g file.rpm" to generate a "source" directory tree. * Make whatever changes you need to make to debian/rules, add other files, etc. * Use dpkg-buildpackage to generate a standard debian .diff.gz file, and stick it in /var/lib/alien. * Test "alien file.rpm" - it should use your diff. If it works properly, (it's best if lintian is happy with the resulting .deb too), send the .diff.gz file to me for inclusion in alien. -- Joey Hess alien/alien.spec.in0000644000000000000000000000162512211426754011415 0ustar Summary: Install Debian, Slackware, and Stampede packages with rpm. Name: alien Packager: Joey Hess Version: @version@ Release: 1 Source: ftp://kitenet.net/pub/code/debian/alien_@version@.tar.gz License: GPL Group: Utilities/File Buildroot: /tmp/alien-@version@.build Requires: perl BuildArchitectures: noarch %description Alien allows you to convert Debian, Slackware, and Stampede Packages into Red Hat packages, which can be installed with rpm. It can also generate Slackware, Debian and Stampede packages. This is a tool only suitable for binary packages. %prep %setup -n alien rm -rf /tmp/alien-@version@.build %install perl Makefile.PL PREFIX=$RPM_BUILD_ROOT/usr make make pure_install VARPREFIX=$RPM_BUILD_ROOT find $RPM_BUILD_ROOT -not -type d -printf "/%%P\n" | \ sed '/\/man\//s/$/\*/' > manifest %files -f manifest %defattr(-,root,root) %doc debian/changelog GPL README alien.lsm alien/Makefile.PL0000755000000000000000000000163312211426754011020 0ustar #!/usr/bin/perl -w use ExtUtils::MakeMaker; use strict; # Just to make it ignore editor backup files. sub MY::libscan { $_ = $_[1]; return '' if $_ eq 'alien.pl'; return '' if m/\/(RCS|CVS|SCCS)\// || m/[~%]$/ || m/\.(orig|rej)$/; return $_; } # Add a few more targets. sub MY::postamble { return q{ VER=$(shell perl -e '$$_=<>;print m/\((.*?)\)/'alien.lsm perl -i -pe "s/\@version\@/$(VER)/g" alien.spec extra_install: install -d $(PREFIX)/share/alien/patches \ $(VARPREFIX)/var/lib/alien alien: perl -pe '$$_="" if /use lib/; $$_="our \$$Version=\"$(VER)\";\n" if /VERSION_AUTOREPLACE/' alien.pl > alien } } WriteMakefile( 'NAME' => 'Alien', 'EXE_FILES' => ['alien'], 'clean' => {FILES => 'alien'}, ); alien/alien.pl0000755000000000000000000004040112303417710010461 0ustar #!/usr/bin/perl -w =head1 NAME alien - Convert or install an alien binary package =head1 SYNOPSIS alien [--to-deb] [--to-rpm] [--to-tgz] [--to-slp] [options] file [...] =head1 DESCRIPTION B is a program that converts between Red Hat rpm, Debian deb, Stampede slp, Slackware tgz, and Solaris pkg file formats. If you want to use a package from another linux distribution than the one you have installed on your system, you can use B to convert it to your preferred package format and install it. It also supports LSB packages. =head1 WARNING B 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 different distributions, and packages from the different distributions cannot be used interchangeably. In general, if you can't remove a package without breaking your system, don't try to replace it with an alien version. =head1 PACKAGE FORMAT NOTES =over 4 =item rpm For converting to and from rpm format the Red Hat Package Manager must be installed. =item lsb Unlike the other package formats, B can handle the depenendencies of lsb packages if the destination package format supports dependencies. Note that this means that the package generated from a lsb package will depend on a package named "lsb" -- your distribution should provide a package by that name, if it is lsb compliant. The scripts in the lsb package will be converted by default as well. To generate lsb packages, the Red Hat Package Manager must be installed, and B will use by preference a program named lsb-rpm, if it exists. 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, dpkg-dev, and dpkg packages must be installed. =item tgz Note that when converting from the tgz format, B will simply generate an output package that has the same files in it as are in the tgz file. This only works well if the tgz file has precompiled binaries in it in a standard linux directory tree. Do NOT run B on tar files with source code in them, unless you want this source code to be installed in your root directory when you install the package! When using B to convert a tgz package, all files in /etc in are assumed to be configuration files. =item pkg To manipulate packages in the Solaris pkg format (which is really the SV datastream package format), you will need the Solaris pkginfo and pkgtrans tools. =back =head1 OPTIONS B will convert all the files you pass into it into all the output types you specify. If no output type is specified, it defaults to converting to deb format. =over 4 =item file [...] The list of package files to convert. =item B<-d>, B<--to-deb> Make debian packages. This is the default. =item B<-r>, B<--to-rpm> Make rpm packages. =item B<-t>, B<--to-tgz> Make tgz packages. =item B<--to-slp> Make slp packages. =item B<-p>, B<--to-pkg> Make Solaris pkg packages. =item B<-i>, B<--install> Automatically install each generated package, and remove the package file after it has been installed. =item B<-g>, B<--generate> Generate a temporary directory suitable for building a package from, but do not actually create the package. This is useful if you want to move files around in the package before building it. The package can be built from this temporary directory by running "debian/rules binary", if you were creating a Debian package, or by running "rpmbuild -bb .spec" if you were creating a Red Hat package. =item B<-s>, B<--single> Like B<-g>, but do not generate the packagename.orig directory. This is only useful when you are very low on disk space and are generating a debian package. =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, 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. This is enabled by default when converting from lsb packages. =item B<--patch=>I Specify the patch to be used instead of automatically looking the patch up in B. This has no effect unless a debian package is being built. =item B<--anypatch> 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 not necessarily work with newer packages. =item B<--nopatch> Do not use any patch files. =item B<--description=>I Specifiy a description for the package. This only has an effect when converting from the tgz package format, which lacks descriptions. =item B<--version=>I Specifiy a version for the package. This only has an effect when converting from the tgz package format, which may lack version information. Note that without an argument, this displays the version of B instead. =item B<-T>, B<--test> Test the generated packages. Currently this is only supported for debian packages, which, if lintian is installed, will be tested with lintian and lintian's output displayed. =item B<-k>, B<--keep-version> By default, B adds one to the minor version number of each package it converts. If this option is given, B will not do this. =item B<--bump=>I Instead of incrementing the version number of the converted package by 1, increment it by the given number. =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<--target=>I Force the architecture of the generated package to the given string. =item B<-v>, B<--verbose> Be verbose: Display each command B runs in the process of converting a package. =item B<--veryverbose> Be verbose as with --verbose, but also display the output of each command run. Some commands may generate a lot of output. =item B<-h>, B<--help> Display a short usage summary. =item B<-V>, B<--version> Display the version of B. =back =head1 EXAMPLES Here are some examples of the use of B: =over 4 =item alien --to-deb package.rpm Convert the package.rpm into a package.deb =item alien --to-rpm package.deb Convert the package.deb into a package.rpm =item alien -i package.rpm Convert the package.rpm into a package.deb (converting to a .deb package is default, so you need not specify --to-deb), and install the generated package. =item alien --to-deb --to-rpm --to-tgz --to-slp foo.deb bar.rpm baz.tgz Creates 9 new packages. When it is done, foo bar and baz are available in all 4 package formats. =back =head1 ENVIRONMENT B recognizes the following environment variables: =over 4 =item RPMBUILDOPT Options to pass to rpm when it is building a package. =item RPMINSTALLOPT Options to pass to rpm when it is installing a package. =item EMAIL If set, B assumes this is your email address. Email addresses are included in generated debian packages. =back =head1 AUTHOR B was written by Christoph Lameter, B<>. deb to rpm conversion code was taken from the martian program by Randolph Chung, B<>. The Solaris pkg code was written by Mark A. Hershberger B<>. alien has been extensively rewritten (3 times) and is now maintained by Joey Hess, B<>. =head1 COPYRIGHT alien may be copied and modified under the terms of the GNU General Public License. =cut package Alien; our $Version='unknown'; # VERSION_AUTOREPLACE done by Makefile, DNE use strict; use lib '.'; # For debugging, removed by Makefile. use Getopt::Long; use Alien::Package::Deb; use Alien::Package::Rpm; use Alien::Package::Tgz; use Alien::Package::Slp; use Alien::Package::Pkg; use Alien::Package::Lsb; # Display alien's version number. sub version { print "alien version $Alien::Version\n"; exit; } # Returns a list of directories to search for patches. sub patchdirs { return '/var/lib/alien',"/usr/share/alien/patches"; } # Display usage help. sub usage { print STDERR < Specify patch file to use instead of automatically looking for patch in /var/lib/alien. --nopatch Do not use patches. --anypatch Use even old version os patches. -s, --single Like --generate, but do not create .orig directory. --fixperms Munge/fix permissions and owners. --test Test generated packages with lintian. -r, --to-rpm Generate a Red Hat rpm package. --to-slp Generate a Stampede slp package. -l, --to-lsb Generate a LSB package. -t, --to-tgz Generate a Slackware tgz package. Enables these options: --description= Specify package description. --version= Specify package version. -p, --to-pkg Generate a Solaris pkg package. -i, --install Install generated package. -g, --generate Generate build tree, but do not build package. -c, --scripts Include scripts in package. --target= Set architecture of the generated package. -v, --verbose Display each command alien runs. --veryverbose Be verbose, and also display output of run commands. -k, --keep-version Do not change version of generated package. --bump=number Increment package version by this number. -h, --help Display this help message. -V, --version Display alien's version number. EOF exit 1; } # Start by processing the parameters. my (%destformats, $generate, $install, $single, $scripts, $patchfile, $nopatch, $tgzdescription, $tgzversion, $keepversion, $fixperms, $test, $anypatch, $target); my $versionbump=1; # Bundling is nice anyway, and it is required or Getopt::Long will confuse # -T and -t. Getopt::Long::Configure("bundling"); GetOptions( "to-deb|d" => sub { $destformats{deb}=1 }, "to-rpm|r" => sub { $destformats{rpm}=1 }, "to-lsb|l" => sub { $destformats{lsb}=1 }, "to-tgz|t" => sub { $destformats{tgz}=1 }, "to-slp" => sub { $destformats{slp}=1 }, "to-pkg|p" => sub { $destformats{pkg}=1 }, "test|T" => \$test, "generate|g" => \$generate, "install|i" => \$install, "single|s" => sub { $single=1; $generate=1 }, "scripts|c" => \$scripts, "patch=s" => \$patchfile, "nopatch" => \$nopatch, "anypatch" => \$anypatch, "target=s" => \$target, "description=s" => \$tgzdescription, "V" => \&version, "version:s" => sub { length $_[1] ? $tgzversion=$_[1] : version() }, "verbose|v" => \$Alien::Package::verbose, "veryverbose" => sub { $Alien::Package::verbose=2 }, "keep-version|k" => \$keepversion, "bump=s" => \$versionbump, "fixperms" => \$fixperms, "help|h" => \&usage, ) || usage(); # Default to deb conversion. if (! %destformats) { $destformats{deb}=1; } # A few sanity checks. if (($generate || $single) && $install) { die "You can not use --generate or --single with --install.\n"; } if (($generate || $single) && keys %destformats > 1) { die "--generate and --single may only be used when converting to a single format.\n"; } if ($patchfile && ! -f $patchfile) { die "Specified patch file, \"$patchfile\" cannot be found.\n"; } if ($patchfile && $nopatch) { die "The options --nopatch and --patchfile cannot be used together.\n"; } unless (@ARGV) { print STDERR "You must specify a file to convert.\n\n"; usage(); } # Check alien's working anvironment. if (! -w '.') { die("Cannot write to current directory. Try moving to /tmp and re-running alien.\n"); } if ($> != 0) { if ($destformats{deb} && ! $generate && ! $single) { die "Must run as root to convert to deb format (or you may use fakeroot).\n"; } print STDERR "Warning: alien is not running as root!\n"; print STDERR "Warning: Ownerships of files in the generated packages will probably be wrong.\n"; } foreach my $file (@ARGV) { if (! -e $file) { die "File \"$file\" not found.\n"; } # Figure out what kind of file this is. my $package; # Check lsb before rpm, since lsb packages are really just # glorified rpms. if (Alien::Package::Lsb->checkfile($file)) { $package=Alien::Package::Lsb->new(filename => $file); } elsif (Alien::Package::Rpm->checkfile($file)) { $package=Alien::Package::Rpm->new(filename => $file); } elsif (Alien::Package::Deb->checkfile($file)) { $package=Alien::Package::Deb->new(filename => $file); } elsif (Alien::Package::Tgz->checkfile($file)) { $package=Alien::Package::Tgz->new(filename => $file); $package->description($tgzdescription) if defined $tgzdescription; $package->version($tgzversion) if defined $tgzversion; } elsif (Alien::Package::Slp->checkfile($file)) { $package=Alien::Package::Slp->new(filename => $file); } elsif (Alien::Package::Pkg->checkfile($file)) { $package=Alien::Package::Pkg->new(filename => $file); } else { die "Unknown type of package, $file.\n"; } if ($target) { $package->arch($target); } if (! $package->usescripts && $package->scripts) { $package->usescripts($scripts); if (! $scripts) { print STDERR "Warning: Skipping conversion of scripts in package ".$package->name.": ".join(" ", $package->scripts)."\n"; print STDERR "Warning: Use the --scripts parameter to include the scripts.\n"; } } # Increment release. unless (defined $keepversion) { $package->incrementrelease($versionbump); } foreach my $format (keys %destformats) { # Skip conversion if package is already the correct format. # Howver, generate build tree even if the format is # unchanged. if ($package->origformat ne $format || $generate) { # Only unpack once. if ($package->unpacked_tree) { $package->cleantree; } else { $package->unpack; } # Mutate package into desired format. bless($package, "Alien::Package::".ucfirst($format)); # Make .orig.tar.gz directory? if ($format eq 'deb' && ! $single && $generate) { # Make .orig.tar.gz directory. Alien::Package->do("cp", "-fa", "--", $package->unpacked_tree, $package->unpacked_tree.".orig") or die "cp -fa failed"; } # See if a patch file should be used. if ($format eq 'deb' && ! $nopatch) { if (defined $patchfile) { $package->patchfile($patchfile) } else { $package->patchfile($package->getpatch($anypatch, patchdirs())); } } $package->fixperms($fixperms); $package->prep; # If generating build tree only, stop here # with message. if ($generate) { if ($format eq 'deb' && ! $single) { print "Directories ".$package->unpacked_tree." and ".$package->unpacked_tree.".orig prepared.\n" } else { print "Directory ".$package->unpacked_tree." prepared.\n"; } # Make sure $package does not wipe out the # directory when it is destroyed. $package->unpacked_tree(''); next; } my $newfile=$package->build; if ($test) { my @results = $package->test($newfile); if (@results) { print "Test results:\n"; print "\t$_\n" foreach @results; } } if ($install) { $package->install($newfile); unlink $newfile; } else { # Tell them where the package ended up. print "$newfile generated\n"; } } elsif ($install) { # Don't convert the package, but do install it. $package->install($file); # Note I don't unlink it. I figure that might annoy # people, since it was an input file. } $package->revert; } } alien/.gitattributes0000644000000000000000000000005412211426754011732 0ustar debian/changelog merge=dpkg-mergechangelogs alien/README0000644000000000000000000000523712211426754007727 0ustar 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/~joey/code/alien/ Other things you'll need: To use alien, you will need several other programs. Alien is a perl program, and requires perl version 5.004 or greater. If you use slackware, make sure you get perl 5.004, the perl 5.003 in slackware does not work with alien! To convert packages to or from rpms, you need the Red Hat Package Manager; get it from Red Hat's ftp site. If your distribution (eg, Red Hat) provides a rpm-build package, you will need it as well to generate rpms. If you want to convert packages into debian packages, you will need the 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. Attention, Slackware, Red Hat, and Stampede users: Bruce S. Babcock has put together an "alien-extra" package of all the extra files you need to use alien on a Red Hat or Slackware system. (Debian systems automatically have all required files.) The Slackware version is at ftp://ykbsb2.yk.psu.edu/pub/alien/alien-extra.tgz The RedHat version is at ftp://ykbsb2.yk.psu.edu/pub/alien/alien-extra.rpm The Stampede version is at ftp://ykbsb2.yk.psu.edu/pub/alien/alien-extra.slp Note: Alien is really designed to be used to convert from alien file formats to the packaging format used by the distribution you run it on. Of course, it can also convert from your distribution's native format to alien formats, or from one alien format to another. Do be warned though, that if these latter types of conversions are done, the generated packages may have incorrect dependancy information. This is known to be true if you convert a rpm into a deb on a Red Hat system, for example. Even with alien-extra installed, dpkg will be unable to properly calculate library dependancies for the deb it is creating, and you will get a package without any library dependancies. Programs that use alien: I know of one program that acts as a frontend to alien - kpackviewer is a package viewer that can convert between package formats by using alien. Its homepage is at http://www.momentus.com.br/users/hook/kpackviewer.html Corel also appears to have (or had) something in Corel linux that uses alien. Please report any bugs in alien to the author: Joey Hess It is helpful to provide a log of alien --veryverbose reproducing the bug. I may also ask for the package that exposes the problem you saw. alien/debian/0000755000000000000000000000000012303660436010261 5ustar alien/debian/copyright0000644000000000000000000000051312211426754012214 0ustar Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ Source: native package Files: * Copyright: 1996, 1997 Christoph Lameter 1997 Randolph Chung 2001 Mark A. Hershberger 1997-2011 Joey Hess License: GPL-2+ On Debian systems, the complete text of the GPL can be found in /usr/share/common-licenses/GPL. alien/debian/changelog0000644000000000000000000027306712303660411012143 0ustar alien (8.90) unstable; urgency=medium * Add --target= option for setting architecture. Closes: #260948 (Thanks, Teemu Ikonen) * Add conversion from ppc64le (rpm) to ppc64el (deb). * debhelper v9 -- Joey Hess Thu, 27 Feb 2014 11:59:07 -0400 alien (8.89) unstable; urgency=low * Correct man page to say RPMBUILDOPT (not RPMBUILDOPTS). Closes: #701106 * Handle whitespace in path to RPMs. Closes: #719776 (Thanks, Christopher Huhn) -- Joey Hess Thu, 22 Aug 2013 21:53:44 -0400 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 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 Thu, 05 Apr 2012 13:53:29 -0400 alien (8.86) unstable; urgency=low * Filter out illegal characters in version number when building a deb. Closes: #648531 -- Joey Hess Sat, 12 Nov 2011 13:12:35 -0400 alien (8.85) unstable; urgency=low * Avoid breaking on spaces in filenames. Closes: #618636 -- Joey Hess Sun, 19 Jun 2011 15:43:49 -0400 alien (8.84) unstable; urgency=low * Silence error message when deleting build tree after making an rpm, if rpmbuild has already deleted it. Closes: #622846 * Squash an uninitialized value when creating a deb. -- Joey Hess Fri, 15 Apr 2011 14:13:20 -0400 alien (8.83) unstable; urgency=low * Correct handling of arch all packages in deb arch check. Closes: #596209 -- Joey Hess Thu, 09 Sep 2010 08:24:58 -0400 alien (8.82) unstable; urgency=low * Use debhelper compat level v7 when building packages. All changes since v4 seem safe for alien's generated rules files. * Use dh_prep instead of deprecated dh_clean -k. * Print a nice error message when attempting to build a deb from a package of an unsupported architecture. Closes: #592625 -- Joey Hess Mon, 30 Aug 2010 17:04:24 -0400 alien (8.81) unstable; urgency=low * Avoid uninitialized value warning when debian/rules fails to run due to alien being run in a noexec directory. Closes: #579216 * Prevent DESTROY stomping on alien's exit code sometimes. * Support extracting lzma compressed RPMs. (Patch by unnamed person on some bug tracking system I don't frequent.) * Suggest lzma. If not installed, alien will still fail to decompress RPMs using it, but will support most rpms, which are not. * Fix precedence problem that prevented alien from preserving permissions of suid/sgid binaries that are not owned by root. (Patch by Duane Waddle, on a bug tracking system I don't frequent, that was about the "expire" it 4 days from now. We got lucky Duane, but please use the Debian BTS next time!) * Support RPMs containing ghost files. (Patch by Ben Webb, who would get his patches applied quicker if he actually communicated them to the program's author.) -- Joey Hess Mon, 17 May 2010 20:56:59 -0400 alien (8.80) unstable; urgency=low * Support querying rpm LICENSE field. (Alexey Khoroshilov) -- Joey Hess Sun, 18 Apr 2010 15:44:52 -0400 alien (8.79) unstable; urgency=low * Typo. Closes: #554379 * Modify -g and -s to support running on multiple packages at once. Closes: #554404 * Removed all built-in patches for converting specific packages (j2sdk, jdk, lgtoclnt, motif) with alien. These were out of date, and not maintained. Alien will not include such patches going forward. * Depend on the new rpm2cpio package. Closes: #559061 -- Joey Hess Tue, 01 Dec 2009 13:23:55 -0500 alien (8.78) unstable; urgency=low * Add support for rpm 4.7.0, which ignores the buildroot setting in the spec file, by passing --buildroot. (Thanks, Pavel Roskin) -- Joey Hess Wed, 08 Jul 2009 13:53:05 -0400 alien (8.77) unstable; urgency=low * Don't allow whitespace in package version when parsing debian/changelog. * In rpm permission fixup code, avoid processing symlinks since that would result in the file the link points to being "fixed". Closes: #535586 -- Joey Hess Mon, 06 Jul 2009 13:37:01 -0400 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 from runpipe not defaulting to a scalar). -- Joey Hess Thu, 2 Feb 2006 15:12:51 -0500 alien (8.61) unstable; urgency=low * Add em64t as another alias for amd64. * Makefile.PL fix for new make line wrapping. -- Joey Hess Sat, 7 Jan 2006 13:37:07 -0500 alien (8.60) unstable; urgency=low * Make cpio leading directory permission fixup code work with new cpio default permissions too. Closes: #340588 -- Joey Hess Sun, 27 Nov 2005 17:02:41 -0500 alien (8.59) unstable; urgency=low * Hmm, seems rpm renamed Copyright to License and fails w/o the new field. Fix. -- Joey Hess Fri, 11 Nov 2005 11:26:35 -0500 alien (8.58) unstable; urgency=low * Remove Copyright: from generated alien spec file since for some reason rpm has obsoleted and begun falling over on that line. (Inert profanity here.) Closes: #337028 * debian/copyright verbosification patch from tbm. Closes: #337363 -- Joey Hess Tue, 8 Nov 2005 16:06:39 -0500 alien (8.57) unstable; urgency=low * hppa <=> parisc conversion for rpm. Closes: #338187 -- Joey Hess Tue, 8 Nov 2005 13:39:06 -0500 alien (8.56) unstable; urgency=low * Warn if a package contains maintainer scripts which are not converted, since this can result in broken packages. * Many small fixes. -- Joey Hess Tue, 19 Jul 2005 20:21:42 -0400 alien (8.55) unstable; urgency=low * Add lgtoclnt patch from Clint. Closes: #276365 * Remove old openmotif patches. It's in non-free now. * Update other patches to use debhelper v4. * Fix deb package postinst retreival, was broken by the permissions fixup code. Closes: #304828 * Use postrm when generating a rpm spec file with scripts enabled. Before this never worked. -- Joey Hess Tue, 19 Jul 2005 16:03:27 -0400 alien (8.54) unstable; urgency=low * Patch from Alexander Jolk adding a --bump option. Closes: #311681 -- Joey Hess Tue, 19 Jul 2005 14:20:31 -0400 alien (8.53) unstable; urgency=low * Build packages using debhelper v4 mode. -- Joey Hess Mon, 13 Jun 2005 14:10:26 -0400 alien (8.52) unstable; urgency=low * Add a new parameter to runpipe to control whether it automatically checks the return code of the command (and exits). Turn this on for many runpipe calls that are not expected to fail in normal operation, but can fail if the input file is empty, corrupt, or not readable. Previous behavior for rpm files was a cascading failure that created weird directories in cwd. Closes: #305592 -- Joey Hess Thu, 21 Apr 2005 11:34:41 -0400 alien (8.51) unstable; urgency=low * In rpm unpack permission fixup code, do not call chmod on symlinks, as it will follow the links. -- Joey Hess Wed, 9 Mar 2005 16:21:14 -0500 alien (8.50) unstable; urgency=low * Recognise udebs and treat them like debs. Closes: #284693 -- Joey Hess Wed, 8 Dec 2004 16:20:42 -0500 alien (8.49) unstable; urgency=low * Add support for config files in relocatale directories. Relocate filenames in the conffiles list. Closes: #283774 * Correct permissions fixup code for parent directories from rpms to take the umask into account when searching for such directories. And make such directories mode 755, not 700. Closes: #271903 -- Joey Hess Mon, 6 Dec 2004 16:09:11 -0500 alien (8.48) unstable; urgency=low * Support cross-building rpms, output rpm should always be same arch as input package now. -- Joey Hess Wed, 24 Nov 2004 17:35:28 -0500 alien (8.47) unstable; urgency=low * x86_64 rpms become amd64 debs * Add new java 1.5.0 diffs from Gerald Turner. * Clean out old j2sdk diffs. -- Joey Hess Sun, 3 Oct 2004 13:59:49 -0400 alien (8.46) unstable; urgency=low * Unset _unpackaged_files_terminate_build when building rpms, at least SuSE sets this, which breaks alien due to its placement of the spec file in the build directory. -- Joey Hess Sun, 1 Aug 2004 20:50:37 -0400 alien (8.45) unstable; urgency=low * Run dh_clean with -d to avoid cleaning up any oddly named files from rpms, like .orig files. Closes: #261964 -- Joey Hess Thu, 29 Jul 2004 13:14:39 -0400 alien (8.44) unstable; urgency=low * Don't add line about permissions fixup code to postinst if there is not code to add. * Don't assume that just because we know of a user or are root, that files can go into the deb owned by that user, and come out right on install. Instead, assume that any non-root user will not be on the target system the rpm is installed on, and that it might be created in the preinst or something, so add permissions fixup code for all such users. -- Joey Hess Wed, 24 Mar 2004 22:51:48 -0500 alien (8.43) unstable; urgency=low * Added a new j2sdk_1.4.2_03-1.diff from Gerald Turner. -- Joey Hess Mon, 19 Jan 2004 20:05:17 -0500 alien (8.42) unstable; urgency=low * Do not register conffiles in /etc when generating a deb; debhelper v3 takes care of that. -- Joey Hess Thu, 15 Jan 2004 22:25:48 -0500 alien (8.41) unstable; urgency=low * Generate a build tree on request even when the source and dest formats are the same. Closes: #222311 -- Joey Hess Sat, 29 Nov 2003 18:29:29 -0500 alien (8.40) unstable; urgency=low * Include the version of alien that generated a deb or rpm in the description. Closes: #220763 * Also put it in the changelog of debian packages. -- Joey Hess Mon, 17 Nov 2003 20:57:44 -0500 alien (8.39) unstable; urgency=low * Fix a couple more mistakes in the code added in 8.36. -- Joey Hess Tue, 11 Nov 2003 21:53:36 -0500 alien (8.38) unstable; urgency=low * Fix a couple of typos in the code added in 8.36; it should actually work now. -- Joey Hess Mon, 3 Nov 2003 16:21:40 -0500 alien (8.37) unstable; urgency=low * Make sure the working directory's subdirs have sane modes before trying to delete it, in case it has unwritable dirs and alien is not running as root. Closes: #217330 -- Joey Hess Tue, 28 Oct 2003 15:45:31 -0500 alien (8.36) unstable; urgency=low * Patch from aj to fix permissions of setuid files that have their owners created in the preinst. * Alien's repository has moved from CVS to subversion. -- Joey Hess Wed, 15 Oct 2003 16:04:17 -0400 alien (8.35) unstable; urgency=low * Move from build-depends-indep to build-depends, to meet current policy. -- Joey Hess Wed, 3 Sep 2003 12:14:58 -0400 alien (8.34) unstable; urgency=low * Fixed changelog parsing regexp. Noticed by Gerald Turner who is sure turning up in this changelog a lot. * Updated j2sdk patch fixes some ControlPanel shell script incompatabilities. Closes: #200731 -- Joey Hess Sat, 12 Jul 2003 20:35:09 +0200 alien (8.33) unstable; urgency=low * Added a new j2sdk patch that does not rename the package. -- Joey Hess Sun, 6 Jul 2003 19:49:25 -0400 alien (8.32) unstable; urgency=low * Removed the two newest j2sdk patches, which both rename the package, breaking alien -i. Closes: #199992 -- Joey Hess Sun, 6 Jul 2003 19:44:45 -0400 alien (8.31) unstable; urgency=low * Updated the j2sdk patch for version 1.4.2. (From Gerald Turner.) -- Joey Hess Mon, 30 Jun 2003 20:55:10 -0400 alien (8.30) unstable; urgency=low * Added -v to enable verbose mode, which lists each shell command as it is run. Also added --veryverbose for verbose with command output too. * Use -V for version. (-v used to be documented, but never worked) -- Joey Hess Wed, 14 May 2003 00:12:00 -0400 alien (8.26) unstable; urgency=low * alien.spec: pass PREFIX to Makefile.PL so it works on systems (such as red hat 8) where the generated Makefile does not use $PREFIX in all paths. -- Joey Hess Tue, 29 Apr 2003 23:12:32 -0400 alien (8.25) unstable; urgency=low * Support rpms that contain no files. Closes: #184714 -- Joey Hess Sat, 15 Mar 2003 21:34:33 -0800 alien (8.24) unstable; urgency=low * Corrected precidence problem that made alien not catch mkdir of the work directory failing if the directory already existed (and let it delete the existing directory). Closes: #181061 * Fixed several other instances of the same precidence problem in the code. -- Joey Hess Sat, 15 Feb 2003 14:18:44 -0500 alien (8.23) unstable; urgency=low * Updated j2sdk patch again. -- Joey Hess Mon, 3 Feb 2003 22:51:11 -0500 alien (8.22) unstable; urgency=low * Use rpmbuild -bb instead of rpm -bb, as it seems that rpm -bb has stopped working in recent versions of rpm, as shipped by red hat (Debian's rpm, confusingly, continues to support rpm -bb, possibly because of how I hack its popt stuff up for debian.) This may fail with older, pre-rpmbuild rpm's; if so you should upgrade to a more current version I guess. * Updated js2k patch from Gerald Turner. -- Joey Hess Mon, 3 Feb 2003 14:35:40 -0500 alien (8.21) unstable; urgency=low * Pach from Erwan MAS that allows specification of the version of a tgz file, for files that don't have a parseable version number. For consistency with --description, I made the otpino be called --version -- if no argument is specified to this option, it retains its old behavior of displaying alien's version, but it is now overloaded if given an argument. Closes: #165584 -- Joey Hess Sun, 20 Oct 2002 20:51:51 -0400 alien (8.20) unstable; urgency=low * Added support inspired by aj for converted rpm packages that create users/groups in their preinst, and which alien therefore cannot ship the files with proper ownerships in the .deb. In this case alien will now insert appropriate chown commands into the postinst script of the converted package. * That only works when converting rpm to deb, not the other way around, for now. * Removed the cpio directory permissions fixup code, which was probably broken, and is obsolete since I get directory perms from the rpm now. -- Joey Hess Sun, 25 Aug 2002 15:17:57 -0400 alien (8.19) unstable; urgency=low * Added upsated jdk patches from Gerald Turner. * Allow fallback to different debian revisions w/o --anypatch. * Add a changelog parser so I can work out the built version of a package. Ugh. Closes: #157971 -- Joey Hess Fri, 23 Aug 2002 19:58:36 -0400 alien (8.18) unstable; urgency=low * Be stricter about which patch files to apply by default. For old behavior use --anypatch. * Minor perl 5.8 fix. -- Joey Hess Thu, 22 Aug 2002 12:10:39 -0400 alien (8.17) unstable; urgency=low * When converting from rpm, do parent directory 755 chmods first, then known permissions setting from rpm --queryformat, so that it can override any directories that do indeed have a permission set. * Fixed MakeFile.PL to work with perl 5.8. -- Joey Hess Mon, 19 Aug 2002 12:49:04 -0400 alien (8.16) unstable; urgency=low * Fixed rpm unpacking. -- Joey Hess Fri, 12 Jul 2002 19:35:06 -0400 alien (8.15) unstable; urgency=low * Fix a longstanding bug I was only recently told about: When converting from rpm, ignore the icky file owners and perms from the cpio archive, and query rpm for the real set that it overrides in the control data structure. Closes: #151546 -- Joey Hess Mon, 8 Jul 2002 21:03:16 -0400 alien (8.14) unstable; urgency=low * Enabled Getopt::Long Bundling, see comment in alien.pl. Closes: #152148 -- Joey Hess Sun, 7 Jul 2002 16:40:07 -0400 alien (8.13) unstable; urgency=low * Made tgz version parsing greedier so it will match sub-versions. -- Joey Hess Sat, 6 Jul 2002 08:05:45 -0400 alien (8.12) unstable; urgency=low * Fixed slp conversion to not use uninitialized value. Closes: #150840 -- Joey Hess Mon, 24 Jun 2002 13:20:51 -0400 alien (8.11) unstable; urgency=low * Fix for extracting control files from debs on systems w/o dpkg-deb. Don't try to extract "file", just "./file". -- Joey Hess Wed, 12 Jun 2002 13:34:09 -0400 alien (8.10) unstable; urgency=low * Build alien with debhelper v4. -- Joey Hess Sat, 1 Jun 2002 17:56:52 -0400 alien (8.09) unstable; urgency=low * Deal with packages with strange characters in their filenames. Closes: #146017 -- Joey Hess Thu, 23 May 2002 22:35:25 -0400 alien (8.08) unstable; urgency=low * Gerald Turner contributed a .diff file for conversion of the j2sdk (Java 2 Software Development Kit) -- Joey Hess Wed, 22 May 2002 20:07:41 -0400 alien (8.07) unstable; urgency=low * Added --test parameter, Closes: #145520 -- Joey Hess Thu, 2 May 2002 20:03:21 -0400 alien (8.06) unstable; urgency=low * Added --fixperms option. Closes: #142850 -- Joey Hess Sun, 21 Apr 2002 22:19:12 -0400 alien (8.05) unstable; urgency=low * Support rpms with a description consisting of just blank lines. -- Joey Hess Mon, 1 Apr 2002 13:36:45 -0500 alien (8.04) unstable; urgency=low * Fixed an unfortunate typo in Rpm.pm, Closes: #140742 -- Joey Hess Sun, 31 Mar 2002 23:05:30 -0500 alien (8.03) unstable; urgency=low * Should avoid warning message, Closes: #140286 * README and description updates. -- Joey Hess Thu, 28 Mar 2002 14:27:10 -0500 alien (8.02) unstable; urgency=low * Made more robust in the face of empty rpms. Closes: #138969 -- Joey Hess Tue, 19 Mar 2002 11:29:23 -0500 alien (8.01) unstable; urgency=low * The "vmware and dpkg on drugs" release. * If a preinstall script in a rpm starts like this: # BEGINNING_OF_POST_DOT_SH #!/bin/sh Add anther hashbang at the top, so dpkg doesn't croak on it. Closes: #137032 -- Joey Hess Wed, 6 Mar 2002 12:57:06 -0500 alien (8.00) unstable; urgency=low * LSB package support. It can generate LSB packages (not guarenteed fully conformant with the LSB), and it can take LSB packages and convert them into other formats. Unlike all the other conversions, lsb packages's dependancy (on lsb) and their package scripts are preserved in the generated packages (when allowed by the target package format). This means your distribution will need to have a package named 'lsb' for the result to be installable. (Debian will have one soon..) * Suggest rpm-lsb, which is the preferred rpm to build lsb packages with. Use it if it's present, plain old rpm otherwise. -- Joey Hess Mon, 11 Feb 2002 12:55:42 -0500 alien (7.32) unstable; urgency=low * Support ancient (bo-era) debs with upper-case field names. Closes: #130736 -- Joey Hess Thu, 24 Jan 2002 23:38:57 -0500 alien (7.31) unstable; urgency=low * Use --target noarch instead of --target=noarch when building rpms. The latter used to work, but no longer does, due to some change in rpm or popt. It also has to come after the -bb. * Trap stderr of rpm and debian/rules building packages, and only display if the build fails. -- Joey Hess Fri, 4 Jan 2002 13:53:04 -0500 alien (7.30) unstable; urgency=low * Thanks to the excellent work of Mark A. Hershberger , alien now supports converting to and from Solaris "pkg" packages (which are really SysV packages). You probably need to run it on Solaris for this to work, though. This brings the number of possible conversions alien can do up from 12 to a monstrous 20! * Mark also had to patch Deb.pm a bit so the by-hand deb extraction could work with solaris's ar and tar. * Documented the EMAIL environment variable. Closes: #116754 * Threw out a lot of old patches, circa 1999. Probably useless today. * When converting to debs, move files as follows, if possible, for better FHS compliance: /usr/man => /usr/share/man /usr/info => /usr/share/info /usr/doc' => /usr/share/doc * Also moves files as follows, to avoid possibly confusing dpkg with installing over symlinks (?). Closes: #40012 /usr/bin/X11 should be /usr/X11R6/bin /usr/lib/X11 should be /usr/X11R6/lib/X11 /usr/include/X11 should be /usr/X11R6/include/X11 * Reverse these moves in the cleantree stage. * Debian users who have installed alien packages in the past may want to re-convert and reinstall them, to take advantage of the new FHS conversions. -- Joey Hess Thu, 25 Oct 2001 20:53:33 -0400 alien (7.27) unstable; urgency=low * Moved as many system calls as I can over to shellless execution. There are still a lot that use shell tricks. Should deal with screwey rpms and file names better though. Closes: #105283 * Display build logs after build failures. -- Joey Hess Sun, 15 Jul 2001 10:16:20 -0400 alien (7.25) unstable; urgency=low * Treat 'armv4l' arch rpm's as arm architecture. -- Joey Hess Mon, 18 Jun 2001 13:40:20 -0400 alien (7.24) unstable; urgency=low * Patch from Raul Miller to make it use gzip -dc | tar everywhere it used to use tar zxvf. The problem with the latter is that, on Red Hat anyway, when tar is reading from stdin, tar or gzip seems to be broken, and tar does not see an end-of-file marker, causing alien to hang when converting rpms to debs. Closes: #96200 -- Joey Hess Wed, 9 May 2001 11:09:16 -0400 alien (7.23) unstable; urgency=low * Moved files out of perl privlib, Closes: #95512 -- Joey Hess Sat, 28 Apr 2001 23:15:18 -0400 alien (7.22) unstable; urgency=low * Modification to match changes in rpm 4's parser; need to use --target=noarch, rather than --target noarch. -- Joey Hess Tue, 10 Apr 2001 13:43:56 -0700 alien (7.21) unstable; urgency=low * Deal with empty /etc/mailname, Closes: #90727 -- Joey Hess Sat, 24 Mar 2001 14:19:17 -0800 alien (7.20) unstable; urgency=low * Updated to use debhelper v3 when converting packages. This automatically should make it start adding ldconfig calls as appropriate to maintainer scripts. Closes: #86088 * It does mean you need debhelper 3.x for alien to convert to deb now, so alien-extra will need an update. * Rebuilt with newer perl, so it will work with newer perl (bug filed; this should not have been necessary). -- Joey Hess Thu, 15 Feb 2001 15:33:07 -0800 alien (7.18) unstable; urgency=low * Build with debhelper v3. -- Joey Hess Fri, 9 Feb 2001 17:58:55 -0800 alien (7.17) unstable; urgency=low * Munge in #!/bin/sh entries at the top of rpm maintainer scripts that appear to be shell scripts. Closes: #76124 -- Joey Hess Wed, 7 Feb 2001 18:58:56 -0800 alien (7.16) unstable; urgency=low * Updated motif patches again. -- Joey Hess Wed, 17 Jan 2001 11:18:20 -0800 alien (7.15) unstable; urgency=low * Removed dh_suidregister call -- bitten my by own program! :-) Closes: #82230 -- Joey Hess Sun, 14 Jan 2001 14:12:49 -0800 alien (7.14) unstable; urgency=low * Added rpm spec file fix. -- Joey Hess Wed, 10 Jan 2001 12:31:54 -0800 alien (7.13) unstable; urgency=low * Patch from Pavel Roskin for misc specfile issues, including nastly comppressed man page munging. * Updaed motif patches from Andreas Voegele . -- Joey Hess Mon, 11 Dec 2000 15:15:41 -0800 alien (7.12) unstable; urgency=low * Modified Rpm.pm to not bother with the scripts stanzas if there are no scripts. -- Joey Hess Fri, 8 Dec 2000 14:50:51 -0800 alien (7.11) unstable; urgency=low * Use ls -1 instead of plain ls when copying files to debian/tmp in rpm conversion. Since that output is grep'ed, items might have been accidentually excuded before (although ls seems to output one file per line when run inside makefiles, probably because it notices it is not at a tty). Anyway, I had a report that there was a problem here, and this should fix it. -- Joey Hess Thu, 23 Nov 2000 13:02:52 -0800 alien (7.10) unstable; urgency=low * Use dh_perl for automatic, correct perl dependancies, Closes: #77669 -- Joey Hess Tue, 21 Nov 2000 15:52:08 -0800 alien (7.9) unstable; urgency=low * Whoops, alien was still trying to use /usr/lib/alien/pactches, corrected. -- Joey Hess Thu, 16 Nov 2000 11:59:04 -0800 alien (7.8) unstable; urgency=low * Use debhelper v2 for debian/rules, but not when converting packages to deb format. -- Joey Hess Mon, 25 Sep 2000 12:36:25 -0700 alien (7.7) unstable; urgency=low * Corrected return code of system check. * Corrected logic error in relocatable rpm handling that was making converting such rpms not work. (Closes: #71155) -- Joey Hess Mon, 11 Sep 2000 16:19:22 -0700 alien (7.6) unstable; urgency=low * Added a note about a sticky library dependancy issue that I can't fix. * Applied a patch from Chris Gorman to deal with spaces in directory names, spaces in conffile names (!!), and accented characters everywhere in deb -> rpm conversions. * Fixed numerous problems when converting from .deb w/o dpkg installed. * Fixed "2 files on 1 line" error when converting deb -> rpm. -- Joey Hess Thu, 20 Jul 2000 15:12:08 -0700 alien (7.5) unstable; urgency=low * Fixed an uninitialized value when converting from a .src.rpm. -- Joey Hess Mon, 29 May 2000 21:42:38 -0700 alien (7.4) unstable; urgency=low * Corrected typo that broke Deb.pm, Closes: #64559 -- Joey Hess Tue, 23 May 2000 19:30:04 -0700 alien (7.3) unstable; urgency=low * Changed all invocations of programs to be in posix-complient form. Ie, no options after args, so people who set POSIX_ME_HARDER can still use alien. * Bahave better if there is no /etc/mailname. -- Joey Hess Mon, 22 May 2000 16:04:07 -0700 alien (7.2) unstable; urgency=low * When reloating files from a rpm, run the mv command directly, not in a subshell; this is safer especially if odd filenames are involved. * When converting from rpm, only chmod each directory once, it was doing it many times for some directories before. * Fixed chmodding to use the correct path to the directory. This fixes file permissions in rpm's converted to other formats, a bug introduced at 7.0. * Fixed some undefined value warnings (which pointed out real but rare bugs). * Fixed a rare, but bad little bug. If you ran alien in a directory that had the suid/sgid bit set (as my home directory does), and generated debs and probably other formats, it generated packages with the root directory suid/sgid. -- Joey Hess Tue, 9 May 2000 14:13:15 -0700 alien (7.1) unstable; urgency=low * Corrected checking of system() in Deb::prep. Closes: #63396 -- Joey Hess Mon, 1 May 2000 19:42:01 -0700 alien (7.0) unstable; urgency=low * This is a fully rewritten version, now belived to be stable enough for a dot-0 release. -- Joey Hess Sat, 29 Apr 2000 23:27:24 -0700 alien (6.99999) unstable; urgency=low * I despise MakeMaker. -- Joey Hess Sun, 23 Apr 2000 21:44:05 -0700 alien (6.9999) unstable; urgency=low * Major typo fix in Tgz.pm. * Fixed newlines in tgz filelist. * Fixed some undefined value warnings. * Put the rpm spec file back in. Converting the debs to rpms fails because rpm doesn't use the same perl include path. Bummer. * Fixed duplicate alien man page problem. -- Joey Hess Sat, 22 Apr 2000 16:12:44 -0700 alien (6.99) unstable; urgency=low * The great rewrite. Alien is now based on pure object oriented package objects. These objects can read all relevant details about a package, and can generate packages based on that information. Thus, converting from one format to another becomes a simple matter of generating one of these objects, pointing it at a package, mutating it into the destination class, and telling it to write the new package out! A basic alien can now be written using these objects in one "line" of perl -- in fact, here is one: perl -MAlien::Package::Deb -MAlien::Package::Rpm -e ' $p=Alien::Package::Rpm->new(filename => shift); $p->unpack; bless($p, "Alien::Package::Deb"); $p->prep; $p->build' * Almost every line of code has been rewritten. * Package descriptions now include a note that they were converted with alien. There are other numerous changes to the converted packages, for instance, generated .deb's now have more info in their copyright file. * The template files were all moved inside the objects, which is actually cleaner and is certainly easier to deal with. * Usernames are now looked up the way POSIX intended. * alien.1 is now generated from POD docs. * Alien can now convert into multiple formats at once. * Alien now always cleans up after failed converts, Closes: #62331 * Alien can now be used to just install a package with no conversion. Closes: #53441 * Use a Makefile.PL because that seems to make sense, which means lots of the build system had to be changed. -- Joey Hess Thu, 20 Apr 2000 18:52:41 -0700 alien (6.59) unstable; urgency=low * Fixed typo, Closes: #60424 -- Joey Hess Tue, 14 Mar 2000 20:30:01 -0800 alien (6.58) unstable; urgency=low * Patch from Michael Barabanov to make -n work by preventing rpm from expanding stuff like %S in the uuencoded scripts. -- Joey Hess Sun, 12 Mar 2000 15:39:07 -0800 alien (6.57) unstable; urgency=low * Corrected priority in control file to optional; ftp admins, please take note! This pakage has never belonged in extra.. -- Joey Hess Sat, 11 Mar 2000 04:08:05 -0800 alien (6.56) unstable; urgency=low * Corrected a problem triggered by wordperfect's deb: rpm can't deal with files that have spaces, unless they are quoted. Thus, quote all filenames. * Handles empty directories now when converting to rpm. -- Joey Hess Thu, 20 Jan 2000 16:25:27 -0800 alien (6.55) unstable; urgency=low * Patch from Jan Nieuwenhuizen to fix control file extraction on non-debian systems. Not for frozen. -- Joey Hess Sun, 16 Jan 2000 14:45:31 -0800 alien (6.54) unstable; urgency=low * Added metrolink motif diffs from Andreas Voegele -- Joey Hess Mon, 3 Jan 2000 13:57:47 -0800 alien (6.53) unstable; urgency=low * Fixed the problem I thought I fixed in 6.50. Hmm. Closes: #52402 -- Joey Hess Fri, 10 Dec 1999 10:21:43 -0800 alien (6.52) unstable; urgency=low * Added (very simple) build dep. -- Joey Hess Fri, 3 Dec 1999 23:34:10 -0800 alien (6.51) unstable; urgency=low * Fixes to my build system. -- Joey Hess Wed, 1 Dec 1999 14:19:52 -0800 alien (6.50) unstable; urgency=low * Fixed problem with relocatable packages, and probably several other unrelated problems that were introduced last version. -- Joey Hess Wed, 1 Dec 1999 13:52:55 -0800 alien (6.49) unstable; urgency=low * Removed an obsolete note from the man page. * Set locale to C while using rpm to pick at the .rpm file we are going to convert, Closes: #42282 * Moved /usr/lib/alien to /usr/share/alien * Added --nopatch option, Closes: #47069 -- Joey Hess Thu, 18 Nov 1999 12:42:00 -0800 alien (6.48) unstable; urgency=low * Patch from Benjamin Cant to make it work even if there is no space after control file lines in a debian package. -- Joey Hess Thu, 23 Sep 1999 11:41:59 -0700 alien (6.47) unstable; urgency=low * Now FHS compliant. But the packages it builds will probably not be.. -- Joey Hess Mon, 6 Sep 1999 14:25:01 -0700 alien (6.46) unstable; urgency=low * Fixed alien.slp file generation. -- Joey Hess Sat, 4 Sep 1999 23:49:10 -0700 alien (6.45) unstable; urgency=low * Checked into cvs. Added a fixlinks script to generate all symlinks. * Integrated into my build system for automatic home page updates. -- Joey Hess Sat, 4 Sep 1999 23:17:50 -0700 alien (6.44) unstable; urgency=low * Depend on cpio. It is used in the rpm unpack phase after all, since alien uses rpm2cpio (Closes: #38969) -- Joey Hess Mon, 12 Jul 1999 11:15:38 -0700 alien (6.43) unstable; urgency=low * Now depends on perl5 | perl, I'll kill the | perl bit later on, but it seems to make sense for the transition. -- Joey Hess Sun, 4 Jul 1999 10:57:20 -0700 alien (6.42) unstable; urgency=low * Don't call dh_fixperms. As bug #36700 points out, some things you'll want to convert have odd permissions intentionally. I suppose this change will make a lot of stuff that has odd permissions accidentially come through with bad perms, but that's life.. -- Joey Hess Mon, 28 Jun 1999 15:51:37 -0700 alien (6.41) unstable; urgency=low * Fixed the makefile so it doesn't keep files owned by 500.500. * --version, -v works. -- Joey Hess Thu, 24 Jun 1999 11:30:22 -0700 alien (6.40) unstable; urgency=low * D'oh corrected powerpc problem. -- Joey Hess Wed, 16 Jun 1999 10:41:46 -0700 alien (6.39) unstable; urgency=low * When converting from rpm, ppc -> powerpc (Closes: #39550), patch by Chris Lawrence -- Joey Hess Tue, 15 Jun 1999 09:12:03 -0700 alien (6.38) unstable; urgency=low * Disable localization when getting the rpm --version output. -- Joey Hess Thu, 20 May 1999 14:55:29 -0700 alien (6.37) unstable; urgency=low * If the package that is being made into a deb has a release with no number in it, dpkg-deb barfs, so add "-1" to the release in that case. (#3755) -- Joey Hess Sun, 16 May 1999 17:44:01 -0700 alien (6.36) unstable; urgency=low * Updated XBF-i740 xserver diff. -- Joey Hess Wed, 5 May 1999 13:44:03 -0700 alien (6.35) unstable; urgency=low * Fixed rpm minor version test. -- Joey Hess Mon, 3 May 1999 13:35:18 -0700 alien (6.34) unstable; urgency=low * Adjusted the rpm version test - rpm 2.92 and above need --target. -- Joey Hess Fri, 30 Apr 1999 13:04:03 -0700 alien (6.33) unstable; urgency=low * Fixes for rpm 3.0: - Since rpm --showrc has changed to a format that is now very difficult to machine parse for the topdir value, don't. Instead, force rpm to output the rpm into the cirrent directory. This is more consistent anyway. - Detect rpm version and use --target or --buildarch appropriatly. - Fixed alien.rpm's own build process to work again (stupid macro substitutions...). -- Joey Hess Fri, 23 Apr 1999 13:20:27 -0700 alien (6.32) unstable; urgency=low * Dropped in diff files for the XBF-i740 xserver, thanks to Agustin Martin -- Joey Hess Thu, 22 Apr 1999 12:57:54 -0700 alien (6.31) unstable; urgency=low * Actually included the fixed file to make the relocatrable packages work. -- Joey Hess Sat, 10 Apr 1999 14:14:27 -0700 alien (6.30) unstable; urgency=low * Fixed applix 4.4.1 menu. * Fixed a problem with converting relocatable packages that contained the directory they claimed they could relocate into. This fixes the problem someone was having converting a Glide rpm - I forget who. -- Joey Hess Sat, 10 Apr 1999 00:02:53 -0700 alien (6.29) unstable; urgency=low * You don't need to be root to run alien -g or alien -s, so disabled the check there. * Removed extraneous install -d in debian/rules template file. * Added support for applix 4.4.1. * Fixed patch support, it's been broken. -- Joey Hess Wed, 7 Apr 1999 19:43:51 -0700 alien (6.28) unstable; urgency=low * Don't call dh_installmanpages when converting to .deb, it can do the wrong thing in some instances. * Handling of relocatable packages was broken. (#31868) Fixed it by looking at the rpm PREFIXES tag. -- Joey Hess Thu, 14 Jan 1999 13:28:41 -0800 alien (6.27) unstable; urgency=low * Depends on debhelper >= 0.88 so it can use -X option. -- Joey Hess Sun, 27 Dec 1998 21:00:36 -0800 alien (6.26) unstable; urgency=low * If 822-date fails, the error now suggests installing dpkg-dev. This is way up there in the alien faw and I'm tired of answering it. -- Joey Hess Mon, 7 Dec 1998 19:02:26 -0800 alien (6.25) unstable; urgency=low * Alien can now be installed into eg, /usr/local via a PREFIX variaible in the Makefile, based on work by Roman Shterenzon . * Typo fix from Roman Shterenzon. * Moved the patch files that come with alien out of /var/lib/alien into /usr/lib/alien/patches. Alien will now check both directories for patches, /var first. -- Joey Hess Mon, 30 Nov 1998 17:12:10 -0800 alien (6.24) unstable; urgency=low * I hope this will work with i586.deb files. -- Joey Hess Wed, 25 Nov 1998 21:19:19 -0800 alien (6.23) unstable; urgency=low * It seems perl 5.003 breaks alien, so I set up dependancies on 5.004, and updated documentation accordingly. -- Joey Hess Tue, 24 Nov 1998 00:26:21 -0800 alien (6.22) unstable; urgency=low * Updated urls to the alien-extra stuff, it's now hosted on Bruce S. Babcock's machine. -- Joey Hess Tue, 24 Nov 1998 00:04:53 -0800 alien (6.21) unstable; urgency=low * Exclude .Z files from compression by dh_compress when converting to .deb package. -- Joey Hess Fri, 20 Nov 1998 15:54:01 -0800 alien (6.20) unstable; urgency=low * Convert tar.Z files too. -- Joey Hess Wed, 18 Nov 1998 19:32:13 -0800 alien (6.19) unstable; urgency=low * Don't fail even if dh_shlibdeps fails. -- Joey Hess Sun, 1 Nov 1998 21:44:32 -0800 alien (6.18) unstable; urgency=low * Hack so it'll work on packages where the upstream version doesn't contain any digets. -- Joey Hess Tue, 15 Sep 1998 18:06:13 -0700 alien (6.17) unstable; urgency=low * Rebuilt with debhelper 1.1.15 so that patches arn't installed as man pages. -- Joey Hess Mon, 31 Aug 1998 13:31:56 -0700 alien (6.16) unstable; urgency=low * When converting from .tgz files, use arch: all. Sort of a hack, but since we don't know what arch of stuff is in them, it's as good a guess as any. This will let people use the conversion on other architectures. (#26253). -- Joey Hess Sun, 30 Aug 1998 21:57:39 -0700 alien (6.15) unstable; urgency=low * Fixed a bug converting slp -> rpm, where filenames in the generated filelist didn't start with "/". -- Joey Hess Mon, 17 Aug 1998 15:39:31 -0700 alien (6.14) unstable; urgency=low * Die early if converting to a .deb and not root. Debhelper command will cause it to die later on, anyway. (#25775) -- Joey Hess Sun, 16 Aug 1998 17:45:38 -0700 alien (6.13) unstable; urgency=low * Don't bother calling dh_strip when converting to a .deb. This has caused more trouble than it's worth. -- Joey Hess Thu, 13 Aug 1998 13:13:50 -0700 alien (6.12) unstable; urgency=low * Will now properly convert rpm's that have things like + in their name. (#25656). -- Joey Hess Wed, 12 Aug 1998 15:09:30 -0700 alien (6.11) unstable; urgency=low * There was a problem converting rpm packages to tgz and slp formats (and to a much lesser degree converting them to dpkg format): any parent directories that were not in the rpm, but did have children in the rpm, would end up with bad permissions (700). Alien now does a smart scan to detect this and changes the permissions to a more sane 755. * When converting to slp or tgz, with -g or -s, output informative message, same as when converting to rpm or deb. -- Joey Hess Sat, 20 Jun 1998 21:06:37 -0700 alien (6.10) unstable; urgency=low * Remove a junk file that crept in in the last version. -- Joey Hess Wed, 17 Jun 1998 18:00:32 -0700 alien (6.09) unstable; urgency=low * Added a short document on how to generate a diff file for use by alien. * Fixed a security hole in alien generated rpm files that had scripts in them, that could allow a user to clobber files on the filesystem. Any such alien generated rpm files currently in existence already contain this bug, so be careful with them. Such files should be rare, they have to be generated by "alien --to-rpm --scripts". * That bug is even less likely, becuase it turns out --scripts has been broken since alien version 6.0. Oops. Fixed. * --single and --description were also broken since 6.0, and are fixed now. * It used to be that only shell scripts could be converted to rpm format, because of a stupid bug. Fixed. * There has been a change in how rpm outputs the file list for a relocatable package - it used to strip the prefix from each filename, and I could get at it in the DEFAULTPREFIX tag. Now it doesn't, and that tag doesn't exist. The only change I actually had to make was to make alien send rpm's error about DEFAULTPREFIX not being a valid tag to /dev/null. All the code for dealing with DEFAULTPREFIX has been left in, for backwards compatability. -- Joey Hess Wed, 10 Jun 1998 14:33:17 -0500 alien (6.08) unstable; urgency=low * Automatic installation of .tgz and .rpm files was broken. * Removed yet another use of tar -I. * Generated .slp files now properly contain filenames all starting with "./", just like normal Stampede packages. -- Joey Hess Sat, 9 May 1998 14:28:54 -0700 alien (6.07) unstable; urgency=low * New alien-extra's are available; updated the README to point to them. -- Joey Hess Fri, 8 May 1998 23:01:37 -0700 alien (6.06) unstable; urgency=low * Noted in README that you need bzip2 for stampede conversions. * For compatability with non-debian systems, don't use tar -I, pipe bzip2, instead. * Fixed Toslp.pm to generate slp packages with the correct BINFORMAT settings. -- Joey Hess Thu, 7 May 1998 16:36:48 -0700 alien (6.05) unstable; urgency=low * Fixed -k switch (#22168). -- Joey Hess Wed, 6 May 1998 12:22:02 -0700 alien (6.04) unstable; urgency=low * Added support for generating slp packages -- alien is now capable of 16 different types of conversions! * Cleaned up some of Fromslp.pm. * Added support for converting from .slp packages that use .gz compression, as well as .bz2. * Still TODO: handling postinst script when converting to/from .slp packages. * Updated Makefile to build .slp package of alien too, it will now appear on alien's homepage. -- Joey Hess Sun, 3 May 1998 12:35:45 -0700 alien (6.03) unstable; urgency=low * Added support for converting from v5 Stampede linux packages. Still a little rough and mostly untested. * Note that though the documentation says it can convert to Stampede packages as well, this isn't implemented yet. But I wanted to get a snapshot of my work so far out for testing by the Stampede people. * Changed hard links back to symlinks. * Got rid of standards-version in the created .deb files, that was stilly to have in there. * Standardized warnings. * Fixed some documentation. -- Joey Hess Sat, 2 May 1998 21:25:05 -0700 alien (6.02) frozen unstable; urgency=low * Fixed typo in README (#21126). -- Joey Hess Tue, 14 Apr 1998 23:25:17 -0700 alien (6.01) frozen unstable; urgency=low * alien -i was broken, now fixed. -- Joey Hess Thu, 9 Apr 1998 19:03:38 -0700 alien (6.00) unstable; urgency=low * Changed the module interface to be much cleaner. Probably broke many things in the process. * use strict throughout. * It is now possible to do multiple conversions with a single run of alien. * Reworked the rules file used to convert to a debian package so it uses debhelper. Alien no longer uses debstd at all. Adjusted dependancies accordingly. -- Joey Hess Sun, 8 Mar 1998 16:22:50 -0800 alien (5.21) unstable; urgency=low * Updated standards-version. * Fixed how it handles symlinks so the kernel 2.1.8x symlink bug doesn't prevent the package from building, by using hardlinks instead. -- Joey Hess Mon, 9 Feb 1998 13:39:49 -0800 alien (5.20) unstable; urgency=low * added --description= flag, that lets the description of slackware packages be set. * Put packages converted to .deb format into a section called "alien". * s/kite.ml.org/kitenet.net/g -- Joey Hess Sun, 23 Nov 1997 18:05:14 -0500 alien (5.19) unstable; urgency=low * Applied fix to preserve modification time when converting from rpm format. Thanks to Oberhumer Markus * Modified lsm to place alien into /pub/Linux/utils/packages. * Added md5sums file back in. -- Joey Hess Mon, 20 Oct 1997 22:30:29 -0400 alien (5.18) unstable; urgency=low * Use debhelper to build alien (still uses debstd to convert packages). * Use dpkg-deb if available, instead of using ar. This fixes #12318: alien can now handle old format deb files. -- Joey Hess Sat, 27 Sep 1997 15:52:08 -0400 alien (5.17) unstable; urgency=low * Added version info to filename of generated .tgz files. * Added --keep-version flag, which makes alien not increment the release number/debian version number. * Man page fixups. * Fixes for epochs (for now, just remove epochs, since rpm cannot handle them.) -- Joey Hess Fri, 12 Sep 1997 13:08:03 -0400 alien (5.16) unstable; urgency=low * Fixed binary-indep target. -- Joey Hess Thu, 4 Sep 1997 18:33:18 -0400 alien (5.15) unstable; urgency=low * Exit with an understandable error if we can't write to the pwd. * Standardized error messages. -- Joey Hess Sat, 30 Aug 1997 20:20:18 -0400 alien (5.14) unstable; urgency=low * Reccommend rpm >= 2.4.4-2, so noarch works, and /usr/src/redhat/BUILD/ and /usr/src/redhat/RPMS/{noarch,} exist. Fixes #12220 and #12218. * Escape out variables in m// and s/// operators, fixes Bug #12219. -- Joey Hess Fri, 22 Aug 1997 12:31:06 -0400 alien (5.13) unstable; urgency=low * Preliminary support for converting install scripts with the --scripts option. We have to uuencode them for rpm's. * Revised documentation. * Routine update of debian/rules: Fakeroot and sudo fixes (#11325). -- Joey Hess Sat, 26 Jul 1997 21:24:49 -0400 alien (5.12) unstable; urgency=low * Fixed problem converting tgz files that contained files in the install/ directory into rpm. * Ok, I'll announce this version to cola, instead of 5.11.. * Updated .lsm description. -- Joey Hess Sun, 13 Jul 1997 13:26:13 -0400 alien (5.11) unstable; urgency=low * Announce on cola again. * Added noarch support into alien. * Changed rpm package to noarch version. * Other fixes to spec file. * Routine update of debian/rules: Only run sudo when really necessary - makes fakeroot work. -- Joey Hess Wed, 9 Jul 1997 20:58:56 -0400 alien (5.10) unstable; urgency=low * Fixed an error in rpm package - all symlinks were being omitted from the package. -- Joey Hess Thu, 26 Jun 1997 18:23:53 -0400 alien (5.9) unstable; urgency=low * Fixed stupid ugly bug in last version. "=~ tr" and "= ~tr" are very different things! * Reorganized some of the code. -- Joey Hess Mon, 23 Jun 1997 11:57:38 -0400 alien (5.8) unstable; urgency=low * Rpm doesn't like version numbers that contain dashes, so change to underscores when converting to rpm. Thanks to Arne Elofsson. * Added some examples to the man page. -- Joey Hess Sun, 22 Jun 1997 23:05:51 -0400 alien (5.7) unstable; urgency=low * Use installpkg to install slackware packages. -- Joey Hess Tue, 3 Jun 1997 17:55:51 -0400 alien (5.6) unstable; urgency=low * For slackware systems: added docs to README about alien-extra slackware package. * For redhat systems: include CHANGES, COPYING, lsm file in alien.rpm. -- Joey Hess Mon, 2 Jun 1997 13:06:40 -0400 alien (5.5) unstable; urgency=low * Added some more documentation and warnings about file ownerships getting screwed up if you run alien as non-root. * Added basic support for converting to Slackware tgz format. Mostly untested. I confess, I did this just to simplify the documentation of what alien can do. It was only 10 lines of code to add this, anyway. :-) * Had a hard drive crash and reassembled this package from bits and pieces. Hope it's not broken.. -- Joey Hess Sat, 31 May 1997 17:31:26 -0400 alien (5.4) unstable; urgency=low * Fixed a bug that occurred if the full name field in the password file was empty, and ypmatch was installed. * Fixed another bug, that occurred if NIS is actually being used, where alien hung forever. * For non-debian systems, fix upgrades. -- Joey Hess Mon, 26 May 1997 20:01:03 -0400 alien (5.3) unstable; urgency=low * For non-debian systems: falls back to the hostname if /etc/mailname isn't set -- Joey Hess Sun, 25 May 1997 19:50:07 -0400 alien (5.2) unstable; urgency=low * Turns out alien has been broken for processing slackware packages since version 3.0. It was leaving an /install directory behind. Fixed this. -- Joey Hess Tue, 20 May 1997 21:10:50 -0400 alien (5.1) unstable; urgency=low * Added partial support for relocatable packages: DEFAULTPREFIX is examined, and if set, a subdirectory by the same name is created in the build directory of the package. This means relocatable packages end up in a sane location, not scattered in the root directory as they were previously. * Smarter guessing of patch file name to use, now looks at version number and revision number if neccessary. * Added a patch file for applix 4.3 (and one for the applix-english package). -- Joey Hess Thu, 15 May 1997 18:35:46 -0400 alien (5.0) unstable; urgency=low * Added some cautions to man page about not using alien to replace important packages. * This version will be released to the linux community at large, not just debian. * Added a README file. -- Joey Hess Wed, 7 May 1997 16:02:53 -0400 alien (4.3) unstable; urgency=low * Fixed a bug that made alien choke on packages that had 0 for their release or version number. * Removed obsolete alien.sh from the source package. -- Joey Hess Wed, 7 May 1997 15:17:33 -0400 alien (4.2) unstable; urgency=low * When installing deb file, alien will use --no-force-overwrite The idea behind this is to make it difficult to trash your debian system by installing alien packages that overwrite files in it. This only works if you use alien --install, not if you install the resulting .deb file by hand. This is a temporary fix until dpkg has --force-overwrite turned off by default. -- Joey Hess Wed, 16 Apr 1997 17:03:27 -0400 alien (4.1) unstable; urgency=low * If a package has underscores in it's name and is being converted to deb format, change the underscores to dashes. Thanks to Robert Coie * Strip out any other disallowed characters in package name when converting to deb. -- Joey Hess Fri, 4 Apr 1997 20:12:07 -0500 alien (4.00) unstable; urgency=low * Added support for converting deb to rpm, based on the "martian" program by Randolph Chung . * Huge reorganization, rewrite, and code cleanup. * As a side effect of the above, alien can also convert tgz into rpm now. * Use rpm -qcp to list conffiles from rpm files. * Reworked how conffiles are found from tar files. * Removed --noinstall option, changed alien to default to not installing generated packages, added --install option to make it install packages. * Removed --nopatch/--auto option, and changed patch lookup behavior. See the man page for an explination of the new behavior. * Now Recommends: dpkg-dev and make and Suggests: patch * Dropped feature of making slackware package install scripts into postinst. If there is any demand, I'll try to work this back into the program. * Rewrote most of the man page. * Fixed the version number so there are two digets in the minor revision number. -- Joey Hess Sat, 29 Mar 1997 21:49:30 -0500 alien (3.2) frozen unstable; urgency=low * Fixed bug that was preventing alien from figuring out the version number of a tar file. (#8284) * Man page fixes, related to #8284. * Fixed a bug, present since 3.0, which was messing up conffile detection. * Removed README.debian. (It just pointed users to the man page, which is rather pointless.) -- Joey Hess Mon, 24 Mar 1997 14:03:04 -0500 alien (3.1) unstable; urgency=low * Force package names to lowercase. * Fixed --noinstall option. -- Joey Hess Mon, 17 Mar 1997 18:35:46 -0500 alien (3.00) unstable; urgency=low * Rewrote alien in perl. * Command line options can be specified in any order. * -ppatch will no longer work. use --patch= instead. * Improved usage help. * Include extended description from rpm, if available. * Fixed a bug with descriptions/summaries/changelogs/copyrights on rpms that contained the '/' character crashing alien. * Increment revision number of rpms when they are alianized. * Recommends: cpio becuase it is needed for rpm2cpio extraction. * Patch files do not have to be compressed. * Routine update of debian/rules: Clean up junk files in subdirs. -- Joey Hess Fri, 7 Mar 1997 16:08:02 -0500 alien (2.82) unstable; urgency=low * Use CHANGELOGTEXT, not CHANGELOG, when querying rpm files for changelogs. Fixes bug #7445. * Modification to work with rpm verison 2.3.7. This breaks compatability with previous versions of rpm. Modified control file to reflect this. -- Joey Hess Tue, 25 Feb 1997 21:09:18 -0500 alien (2.81) unstable; urgency=low * Corrected maintainer in debian/control. * Routine update of debian/rules: Modifications for multiple binary package support. -- Joey Hess Fri, 7 Feb 1997 22:25:40 -0500 alien (2.80) unstable; urgency=low * Added a patch file for Applixware. * I'm looking for patch files for other commercial software, to add to the package. If you own commerical linux software and would like to contribute a patch, please contact me. * Generated debian/rules files will no longer pass package name to debstd (And neither does the debian/rules file for this package.) * Added -s switch for low disk space situations. * Added -i switch to build a package but not install it. * Added long options (--option), as I can never remember the short ones. * Fixed bug in guessing name of patch file to use. * Fixed bug that would not let you specify a patch file in the current directory, or a relative path to a patch file. * Don't use /etc/rpmrc as an indiciation of whether rpm is present, as this is a conffile, and might be deleted. Test for actual rpm binary. * More friendly error message if patch file is not found, suggesting that you try -n option. * Rewrote the code that figures out information about the rpm files so it uses rpm --queryformat to determine everything. * If a rpm has a changelog, add it to the end of debian/changelog. * Add summary to the Description: field of generated control files. * Add info from a rpm's copyright field to to the copyright file. -- Joey Hess Thu, 30 Jan 1997 20:35:10 -0500 alien (2.79) unstable; urgency=low * New maintainer. * Updated man page with new author info. * Changes to debian/rules to make current maintainer more comfortable. * Improvements to follow when I find the time.. -- Joey Hess Mon, 27 Jan 1997 20:54:47 -0500 alien (2.78) unstable; urgency=low * Corrected Priority * Cleanup debmake remnants -- Christoph Lameter Sat, 25 Jan 1997 10:51:48 -0800 alien (2.77) unstable; urgency=low * alien source package completely split off from debmake. Looking for a new maintainer to provide some fresh ideas. -- Christoph Lameter Sat, 25 Jan 1997 10:23:21 -0800 debmake (2.76) unstable; urgency=low * debstd: Multi-binary support: Generate necessary subdirectories on the fly from files names subpackage.filename (if such files exist) to comply with Policy. This results in an alternate way of storing files for sub-package generation. Remember to erase those directories in the rules file if using this scheme! -- Christoph Lameter Sat, 25 Jan 1997 09:04:21 -0800 debmake (2.75) unstable; urgency=low * debchange: Fix bug introduced in 2.74 * debstd: support for configure script * adpkg: support for package configuration before installation -- Christoph Lameter Fri, 24 Jan 1997 13:17:49 -0800 debmake (2.74) unstable; urgency=low * debstd: Output warning if scripts do not use /bin/sh as its interpreter #6062 * bug: default to ae editor if joe is not present #5675, #6811 * debchange: default to ae editor if joe is not present #6794 -- Christoph Lameter Thu, 23 Jan 1997 21:47:39 -0800 debmake (2.73) unstable; urgency=low * made dependant on perl * Description in control file updated * debchange: automatically rename native debian package directories on generating the next version. Fixes some problems with warnings at package generation time. * alien: some minor fixes update of manpage. * Document nodeps option of debstd * Fixes to the way uupdate recognizes new version numbers (again!) -- Christoph Lameter Mon, 20 Jan 1997 19:51:11 -0800 debmake (2.72) unstable; urgency=low * Fix Bug #6690: release not able to handle multiple bug numbers. * Fix Bug #6669 * debstd: check for debian/changelog and abort if not found -- Christoph Lameter Sat, 18 Jan 1997 09:24:43 -0800 debmake (2.71) unstable; urgency=low * adpkg: support for virtual package recognition * lots of fixes to adpkg. Add functionality to figure out which installed packages need to be updated. Rudimentary replacement for dselect. * Fix to init.d template -- Christoph Lameter Fri, 17 Jan 1997 20:24:11 -0800 debmake (2.70) unstable; urgency=low * new tool: adpkg a front end to dpkg which will install all depending packages, locate packages on its own and install packages one by one in order to insure minimum downtime for daemons on mission critical servers. * bug: give a correct errormessage if packagename not specified instead of failing with a shell error. -- Christoph Lameter Fri, 17 Jan 1997 15:40:01 -0800 debmake (2.62) unstable; urgency=low * Sue Campbell contributes a HOWTO.first_time * new tools: todo and done by Hakan Ardo * Automatically install a debian/TODO if present -- Christoph Lameter Thu, 16 Jan 1997 22:07:10 -0800 debmake (2.61) unstable; urgency=low * debstd: fix recognition of .so in manpages -- Christoph Lameter Thu, 16 Jan 1997 09:18:26 -0800 debmake (2.60) unstable; urgency=low * new tools: deb2asc, asc2deb and asc2debinst allowing the conversion and easy modification of already packed up debian packages. Also allows writing of packages with an editor. asc2debinst does not yet work as intended. * release: change Bug number matching to match #[0-9]{4,5}. -- Christoph Lameter Tue, 14 Jan 1997 10:02:07 -0800 debmake (2.59) unstable; urgency=low * release: update manpage. * release: bug clearing did not work right... sigh.... -- Christoph Lameter Mon, 13 Jan 1997 22:28:59 -0800 debmake (2.58) unstable; urgency=low * release: Check for Bug# in changes files and ask maintainer if these bugs ought to be cleared. (Test Bug#4711) * debstd: 2.57 broke library scan functionality * uupdate: allow + characters in upstream packagename -- Christoph Lameter Mon, 13 Jan 1997 21:08:03 -0800 debmake (2.57) unstable; urgency=low * bug: Bug#5619 treat conffiles without \n at the end correctly * debstd: install maintainer generated shlibs file. Skip Library scan for that case * better directory name matching when looking for undocumented binaries. * link to undocumented.7.gz instead of undoc.7 -- Christoph Lameter Sat, 11 Jan 1997 21:15:27 -0800 debmake (2.56) unstable; urgency=low * bug: -z option added to forbid removal of comments and empty lines from configfiles. * debstd: look for manpages also in /usr/X11R6/man -- Christoph Lameter Thu, 9 Jan 1997 07:35:10 -0800 debmake (2.55) unstable; urgency=low * deb-make: Support specialities for native packages (such as copyright file for example) * debstd: reverse function of the -u option. Default is now no symlinks for undocumented binaries. * build: allow passing of options to dpkg-buildpackage * patch of Roman Hodek for some problems in debstd -- Christoph Lameter Tue, 7 Jan 1997 10:49:19 -0800 debmake (2.54) unstable; urgency=low * debstd: Wrong warnings about a package not having executables fixed * two packages bug and alien split out from debmake. Dependencies reworked. * debstd: recognize games as a valid location for binaries and put links into section 6 for those binaries. * deb-make: fix to package name parsing * bug: Christian Schwarz: Ability to redirect bug report to stdout. * deb-make: Fix to document recognition by Christian Schwarz * uupdate: Diagnostics for existing original archives -- Christoph Lameter Sun, 5 Jan 1997 21:17:23 -0800 debmake (2.53) unstable; urgency=low * made a template from Lars example manpage for debian. Thanks! template will be customized with packagename, emailname, maintainername * uupdate: Fix version number recognition for tar files. -- Christoph Lameter Sun, 5 Jan 1997 18:46:16 -0800 debmake (2.52) unstable; urgency=low * uupdate: Fixes to the way the upstream version is recognized * uupdate: Figure out the new upstream version from patchname. * uupdate: Fixes to allow using a patch rather than a new archive. * uupdate: clean archive before patching it. -- Christoph Lameter Thu, 2 Jan 1997 20:14:41 -0800 debmake (2.51) unstable; urgency=low * debstd: sometimes the associated manpage to a binary was not found and an undocumented.7 link installed despite of the presence of a manpage! * debstd: if first parameter was not the package name that documentation file was not installed. * deb-make: Better matching for documentation -- Christoph Lameter Wed, 1 Jan 1997 17:40:54 -0800 debmake (2.50) unstable; urgency=low * deb-make: probe for common forms of documentation in a sourcecode package and generate a rules file to install those by default. * debian/rules templates updated to reflect changes. * debstd: generate /usr/doc/package/changelog for native packages * debstd: does not need packagename anymore on invocation * debstd: Generate manpage symlinks for executables without corresponding manpages. * debchange: Fix bug #6380. * changelog fixed to spell Santiago's name correctly etc. -- Christoph Lameter Wed, 1 Jan 1997 13:12:11 -0800 debmake (2.41) unstable; urgency=low * Check for /etc/suid.conf instead for /usr/bin/suidregister for suid binaries to avoid pre-dependency problems for suidmanager. * strip -g only for libraries instead of a full strip (Santiago Vila) * Changes to the rules template according to suggestion by Santiago Vila. -- Christoph Lameter Sun, 29 Dec 1996 12:43:11 -0800 debmake (2.40) unstable; urgency=low * uscan watch template provided. * new tool uscan: Scan upstream ftp sites for new releases and then dowload upstream releases, perform upstream update (using "uupdate"), rebuild package(s) (using "build") and upload new package (using "release") (Actions customizable, full automatic operation discouraged). Experimental status right now. -- Christoph Lameter Wed, 25 Dec 1996 12:06:32 -0800 debmake (2.30) unstable; urgency=low * debchange: -v option to set the version number provided * new tool uupdate: automatize upstream updates for sourcecode packages -- Christoph Lameter Tue, 24 Dec 1996 22:33:02 -0800 debmake (2.21) unstable; urgency=low * debstd: shlib generation: .shlibs file does not belong into -dev package as previously claimed. .shlibs file put into library package restoring what previous versions of debmake did. The versions 2.17-2.20 produced unusable .shlibs files! -- Christoph Lameter Mon, 23 Dec 1996 19:59:16 -0800 debmake (2.20) unstable; urgency=low * debstd: examples / docs documents were moved with directory. * Bug in inetd.conf postrm handling -- Christoph Lameter Sun, 22 Dec 1996 16:26:32 -0800 debmake (2.19) unstable; urgency=low * example .forward file for the exim mailer provided * debstd: diversions set the wrong package name * build: use gid=0 when building packages to avoid generating wrong ownerships. -- Christoph Lameter Thu, 19 Dec 1996 10:17:33 -0800 debmake (2.18) unstable; urgency=low * check dependencies of provided sharable libraries in addition to executables when calling dpkg-shlibdeps for a package. * info.ex: wrong spelling * debstd: manpage updated. * debstd: generate a changelog entry if debian/RELEASED is present. * shlibs management cleaned up. -- Christoph Lameter Mon, 16 Dec 1996 22:21:56 -0800 debmake (2.17) unstable; urgency=low * deb-make: add capability to copy sample libraries. Samples for multi-binary and library revised. * If first documentation file for debstd has "change" in its name install that file as changelog.upstream (according to standard). Please be sure in the future to list the upstream changelog first after the package name * Changed Library Templates according to Guy's advice -- Christoph Lameter Mon, 16 Dec 1996 21:14:56 -0800 debmake (2.16) unstable; urgency=low * Library link for library.so was not generated. * Message regarding tar of debstd cleaned up. -- Christoph Lameter Mon, 16 Dec 1996 10:02:40 -0800 debmake (2.15) unstable; urgency=low * added instruction regarding tar problem * .shlibs file not correctly generated (Major Number screwed up) -- Christoph Lameter Mon, 16 Dec 1996 08:01:43 -0800 debmake (2.14) unstable; urgency=low * deb-make asks for the type of package (single,multi,library) to generate and does not clutter the debian directory so much with .ex files. * Templates updated to use easier method for generating directories through a "dirs" file in the debian directory listing all necessary directories. * Incorrect menu template * Update Standards number to current -- Christoph Lameter Sat, 14 Dec 1996 18:08:03 -0800 debmake (2.13) unstable; urgency=low * debstd: bug in processing of menus * deb-make gave an errormessage about not finding a file. Did not affect functionality. -- Christoph Lameter Sat, 14 Dec 1996 10:04:50 -0800 debmake (2.12) unstable; urgency=low * Prototype for library rules simplified * debstd: strip static libraries * debstd: automatically generate symlinks for sharable elf libraries -- Christoph Lameter Sat, 14 Dec 1996 04:25:14 -0800 debmake (2.11) unstable; urgency=low * Automatically strip libraries found. * Prototypes provided for ELF Library development -- Christoph Lameter Fri, 13 Dec 1996 21:08:32 -0800 debmake (2.10) unstable; urgency=low * menu package support: deb-make installs an template for the menu package. * debstd: Clean up package by removing empty directories if a file "clean" exists. * Joey: Support for Joost's menu package. -- Christoph Lameter Fri, 13 Dec 1996 18:24:35 -0800 debmake (2.09) unstable; urgency=low * debstd: bug in info file processing * debstd multi-binary support: package tmp directory was not created. The control file "files" used to fail. * debstd manpage revised . -- Christoph Lameter Fri, 13 Dec 1996 10:42:40 -0800 debmake (2.08) unstable; urgency=low * template inetd.conf.ex updated with example how to place an entry in a section * release: post the processed control file from debian/tmp/DEBIAN instead of the one from the debian directory when announcing packages. * debstd: warn if empty /usr/info -- Christoph Lameter Thu, 12 Dec 1996 05:24:39 -0800 debmake (2.07) unstable; urgency=low * debstd: manpage updated * inetd.conf processor added (allows specification of sections and multiple entries) -- Christoph Lameter Wed, 11 Dec 1996 21:01:19 -0800 debmake (2.06) unstable; urgency=low * debstd: support for adding sections to /etc/aliases * bug: manpage + errormessage updated for filing bug reports as root -- Christoph Lameter Wed, 11 Dec 1996 08:43:48 -0800 debmake (2.05) unstable; urgency=low * debstd: Dont install copyright file if already installed by maintainer * debstd: Do not compress .gif and .html. New switch -c to switch off all compression for docs since there might be other html stuff not to be compressed. * release: Check environment variable DEBIAN_RELEASE_DESTINATION and uploads to that site. Default to master. * release: Consults a database of possible upload sites in /usr/lib/deb-make/upload.sites. Need to have the data for chiark! -- Christoph Lameter Sun, 8 Dec 1996 20:18:29 -0800 debmake (2.04) unstable; urgency=low * bug: set -v was accidentally left in the script -- Christoph Lameter Sun, 8 Dec 1996 19:16:01 -0800 debmake (2.03) unstable; urgency=low * added the possibility to upload to other hosts using scp (ftp.fuller.edu and lalug.org available right now. Could someone sent me the data on chiark?) * depend on package file * debstd: info files not in main distribution directory were not installed. -- Christoph Lameter Wed, 4 Dec 1996 20:56:35 -0800 debmake (2.02) unstable; urgency=low * bug: some more changes to the way subject lines are handled * debstd: some bugfixes relating to suid processing pointed out by Johnie Ingram * bug: Follow symlinks when trying to figure out the type of configfile * bug: Subject line can be edited when in the editor. * bug: debug switch (-d) added to send mail to postmaster@localhost * bug: manpage updated * fix some issues with multi-binary packages in debstd * template rules.multi updated -- Christoph Lameter Sat, 23 Nov 1996 07:01:17 -0800 debmake (2.01) experimental; urgency=low * debstd manpage updated regarding suidmanager processing. -- Christoph Lameter Fri, 22 Nov 1996 16:22:19 -0800 debmake (2.00) experimental; urgency=low * Support for suidmanager (Generated scripts will check for presence of suidmanager and not use it if no suidmanager exists). A package can simply be rebuild and will use suidmanager if any setsid or setgid binaries are present. (ppp 2.3 is an example) Not documented yet. * debmake uses suidmanager to register build and debpkg with REGULAR permissions so that they can be changed in /etc/suid.conf * deb-make: Message on completion of debmake did not display intended text * bug: allow maintonly (-m) or quiet (-q) bug reports * bug: wrong matches on dependency parenthesis * bug: check if called with UID=0 and abort * control files reworked * Manual Pages updated * Multi-Binary capabilities now available from debstd. debmstd ceases to exist. -- Christoph Lameter Tue, 19 Nov 1996 11:28:38 -0800 debmake (1.99) unstable; urgency=low * procmail examples for filtering debian mailing lists included * README.debian revised: Made it clearer that debmake does not install any setuid programs. * build: include path for X11 binaries * bug: check if options given AFTER the packagename and give an errormessage if this is the case -- Christoph Lameter Fri, 15 Nov 1996 12:18:45 -0800 debmake (1.98) unstable; urgency=low * bug: artistics to figure out versions of virtual packages (Thanks to the support by Joey + Guy). Not sure if this will work for all packages though. * debmstd: add analysis of executable formats and warn if unknown. * bug: add options to suppress config files and supply a subject * bug: dont list configfiles that are binaries -- Christoph Lameter Thu, 14 Nov 1996 18:02:16 -0800 debmake (1.97) unstable; urgency=low * bug: speedup (circumvents dpkg now) * bug: allows filing a bug report against anything -- Christoph Lameter Tue, 12 Nov 1996 20:51:37 -0800 debmake (1.96) unstable; urgency=low * release: use dupload if installed (One always needs to specify the host to upload to though.) * bug: removed some lines from the bugreports that were not really essential. -- Christoph Lameter Tue, 12 Nov 1996 13:22:14 -0800 debmake (1.95) unstable; urgency=low * release: Changes file was not uploaded (why is it not listed in the changesfile itself if it is to be uploaded ????) -- Christoph Lameter Mon, 11 Nov 1996 21:30:20 -0800 debmake (1.94) unstable; urgency=low * alien: bug when building rpm packages * deb-make does no longer accept strange characters in directorynames. -- Christoph Lameter Fri, 8 Nov 1996 19:41:30 -0800 debmake (1.93) unstable; urgency=low * bug: Depends: field was required in the description of the package processed. * debstd: bug in info processing. copied from debian instead of the main sourcedirectory. -- Christoph Lameter Fri, 8 Nov 1996 15:44:33 -0800 debmake (1.92) unstable; urgency=low * build: manpage updated * build: add support for targets binary-indep and binary-arch -- Christoph Lameter Fri, 8 Nov 1996 06:12:18 -0800 debmake (1.91) unstable; urgency=low * suidwrappers will be disabled on installation/upgrade. Instructions are provided on how to use these wrappers from sudo, super or directly in README.debian. -- Christoph Lameter Thu, 7 Nov 1996 13:39:50 -0800 debmake (1.90) unstable; urgency=low * depend on dpkg and dpkg-dev * debmstd: New command for experimental support of multi-binary packages (debmstd will replace debstd when tested and found stable) * debmake: Generates templates for multi-binary packages * release: improved handling of files for multi-binary support * Example setup for multi-binary support included (mgetty) -- Christoph Lameter Wed, 6 Nov 1996 10:06:41 -0800 debmake (1.23) unstable; urgency=low * release: add an option "announce" to manually specify that debian/control should be posted. * bug in release: Announcement generated for releases -- Christoph Lameter Tue, 5 Nov 1996 10:54:34 -0800 debmake (1.22) unstable; urgency=low * New directive in init scripts: NO_RESTART_ON_UPGRADE * Location of check for conffiles moved in debstd -- Christoph Lameter Tue, 5 Nov 1996 06:26:27 -0800 debmake (1.21) unstable; urgency=low * control prototype: standards made current * rules prototype chmod changed (Brian C. White) -- Christoph Lameter Mon, 4 Nov 1996 09:13:54 -0800 debmake (1.20) unstable; urgency=low * debclean: can be called as a regular user * build: Added clean option -- Christoph Lameter Mon, 4 Nov 1996 05:42:37 -0800 debmake (1.19) unstable; urgency=low * build: Fixed behavior in case invoked in the wrong directory * debstd: Build /usr/doc/package/buildinfo.Debian with information regarding the system it was build on. (Chris Fearnley) * rules prototype revised * Removed junk from changelog prototype -- Christoph Lameter Sun, 3 Nov 1996 16:54:09 -0800 debmake (1.18) unstable; urgency=low * debc does both dpkg -I and dpkg -c -- Christoph Lameter Sun, 3 Nov 1996 16:04:35 -0800 debmake (1.17) unstable; urgency=low * deb-make + alien: Username lookup now possible via NIS -- Christoph Lameter Sat, 2 Nov 1996 17:29:14 -0800 debmake (1.16) unstable; urgency=low * Some fixes to README.debian * Fixed bugs in the way debian/changelog is located in debi,debc,release -- Christoph Lameter Sat, 2 Nov 1996 09:52:59 -0800 debmake (1.15) unstable; urgency=low * New: "debi" installs generated .deb file (convenience script) * New: "debc" views contents of generated .deb file (convenience script) * Typical developmental cycle documented in README.debian * release: print scp error message and the e-mail address the announcement goes to -- Christoph Lameter Sat, 2 Nov 1996 08:48:25 -0800 debmake (1.14) unstable; urgency=low * New: "build" a suid wrapper for dpkg-buildpackage and "debian/rules binary" * New: "debpkg" a suid wrapper for dpkg. * debmake includes C code now and thus is architecture dependent * Suid wrappers accessible for users of group "root" only. * Complete development cycle possible from a regular account without having to "su". * Added check for the presence of ssh to "release" before trying do to an upload to master. * bug: filters comments and empty lines out of conffiles so that the included conffiles are not that long anymore. -- Christoph Lameter Sat, 2 Nov 1996 06:27:15 -0800 debmake (1.13) unstable; urgency=low * Bug in release: Announce to wrong mailing list+ Bruces suggestions -- Christoph Lameter Fri, 1 Nov 1996 15:54:08 -0800 debmake (1.12) unstable; urgency=low * debchange: RELEASED file not erased * More errorchecking in release * Removed creation of /etc from prototype * Updated docs -- Christoph Lameter Fri, 1 Nov 1996 11:21:24 -0800 debmake (1.11) unstable; urgency=low * release script was not included -- Christoph Lameter Fri, 1 Nov 1996 11:15:23 -0800 debmake (1.10) unstable; urgency=low * Added a new tool "release" which will upload to master announce changes and record the fact that a release has been done in debian/RELEASED. * debchange: Generate a new release without specifically told so if the software has been released and a debian/RELEASED file is present. * debmake now takes the "Did I already upload this or not?" worry from you. and manages releases on its own. -- Christoph Lameter Fri, 1 Nov 1996 11:03:53 -0800 debmake (1.09) unstable; urgency=low * bug tool reworked: It now automatically includes Debian Version, Kernel version, a list of the version numbers of packages this package depends on and includes all modified conffiles. -- Christoph Lameter Fri, 1 Nov 1996 09:58:11 -0800 debmake (1.08) unstable; urgency=low * Bug in etc.postrm * Made sure that documentation is installed mode 644 owned by root. * Updated Docs -- Christoph Lameter Thu, 31 Oct 1996 15:06:22 -0800 debmake (1.07) unstable; urgency=low * check for EDITOR environment variable * debstd warn on /etc files not in conffiles and conffiles not provided in /etc and on having files in /etc but no conffile (Bruce) * exceptions for library dependencies possible -- Christoph Lameter Thu, 31 Oct 1996 10:32:26 -0800 debmake (1.06) unstable; urgency=low * structure of alien .orig file changes to be more or less conformant with the way source .orig files are done. Diffs better readable now and the customization includes the generators e-mail and name into the control files. -- Christoph Lameter Thu, 31 Oct 1996 06:08:50 -0800 debmake (1.05) unstable; urgency=low * rpminstall, tgzinstall replaced by alien command * alien structure allows moving around of binaries and patching them in debian/rules. * alien command needs testing and some real life experiences -- Christoph Lameter Wed, 30 Oct 1996 21:43:35 -0800 debmake (1.04) unstable; urgency=low * bug in generation of modifications for files in /etc -- Christoph Lameter Wed, 30 Oct 1996 17:46:35 -0800 debmake (1.03) unstable; urgency=low * debchange: no output in batch mode anymore * rpminstall, tgzinstall: -d option switches of calling debian/rules binary * debstd bug when giving the -m option. * On Bruces advice: advanced stripping of all binaries -- Christoph Lameter Wed, 30 Oct 1996 08:02:30 -0800 debmake (1.02) unstable; urgency=low * Revised description in control * If the package provides libraries those are detected, appropriate information is generated for dpkg in "DEBIAN/shlibs" and a call to ldconfig is placed into the automatically generated postinst script. -- Christoph Lameter Mon, 28 Oct 1996 09:23:05 -0800 debmake (1.01) unstable; urgency=low * new command tgzinstall: Converts / installs a Slackware .tgz package with dpkg using the same technique as rpminstall. * rpminstall: diverse fixes * Bug: debmake installed X11 manpages twice and did not compress them * rpminstall generated .deb not erased -- Christoph Lameter Sun, 27 Oct 1996 14:20:25 -0800 debmake (1.00) unstable; urgency=low * rpminstall : convert a package to debian (semi)sourcepackage, build it and install with dpkg. Does not do installation scripts right now. I was able to install gated like a debian package. * rpminstall enables a direct installation of Red Hat packages into the debian package maintenance system! All dpkg commands will work on it! * rpminstall uses debstd and thus compresses manpages + documentation and computes dependencies according to the libraries referenced by the ELF binaries in the Red Hat package. -- Christoph Lameter Sun, 27 Oct 1996 12:17:51 -0800 debmake (0.99) unstable; urgency=low * debstd gives message for unstripped binaries and strips them -- Christoph Lameter Sat, 26 Oct 1996 19:20:58 -0700 debmake (0.98) unstable; urgency=low * New command bug to assist in sending bug reports * debchange: added batch mode f.e. : dch -n Bug fixed reults in generating a new release number and putting "bug fixed" in the correct place in changelog -- Christoph Lameter Sat, 26 Oct 1996 09:42:00 -0700 debmake (0.97) unstable; urgency=low * Example file for inetd.conf configuration provided * Recognize package names with a - * Manpages reworked. Manpage for debclean added -- Christoph Lameter Fri, 25 Oct 1996 09:37:17 -0700 debmake (0.96) unstable; urgency=low * debstd seaches for all executable binaries in package and runs dpkg-shlibdeps on all ELF binaries. No need to separately run dpkg-shlibdeps anymore. -- Christoph Lameter Thu, 24 Oct 1996 19:45:44 -0700 debmake (0.95) unstable; urgency=low * bugs in deb-make fixed. Checks for existing .orig archive -- Christoph Lameter Thu, 24 Oct 1996 14:33:07 -0700 debmake (0.94) unstable; urgency=low * Set executable bit on debian/rules -- Christoph Lameter Wed, 23 Oct 1996 17:57:51 -0700 debmake (0.93) unstable; urgency=low * bug in deb-make. Failed with cannot find X -- Christoph Lameter Wed, 23 Oct 1996 10:39:11 -0700 debmake (0.92) unstable; urgency=low * backup files removed * use /etc/mailname to figure out e-mail address -- Christoph Lameter Tue, 22 Oct 1996 20:06:46 -0700 debmake (0.91) unstable; urgency=low * inetd.conf script generation added * Got rid of all temp files to speed up debstd * Updated debstd manpage * Fixed diversions so that they really work. * Added -m option to switch of the automatic installation of manpages -- Christoph Lameter Tue, 22 Oct 1996 16:29:17 -0700 debmake (0.9) unstable; urgency=low * Generate scripts for diversions (not sure if the code is up to standard) * Cleanup debstd * 822-date instead of date used to generate the date info. * Ability to generate scripts to add to config files in /etc included * example files and documentation files can be listed in file in debian -- Christoph Lameter Tue, 22 Oct 1996 00:41:08 -0800 debmake (0.8) unstable; urgency=low * Generates maintenance scripts for info files, init.d scripts, purging of files. -- Christoph Lameter Mon, 21 Oct 1996 09:20:23 -0800 debmake (0.7) unstable; urgency=low * Updated documentation * Progress indicator * Some errormessages from gzip avoided * converts manpages just having .so in it to symlinks * Gzipping separated for manpages (all), info (all) and docs (>4K) so we can easily adapt in case of future changes of policies. -- Christoph Lameter Sun, 20 Oct 1996 14:51:06 -0800 debmake (0.6) unstable; urgency=low * debmake did not install scripts in debian directory! -- Christoph Lameter Thu, 17 Oct 1996 06:47:16 -0800 debmake (0.5) unstable; urgency=low * Manpages were installed as executables * Display of redirected links was not correct -- Christoph Lameter Wed, 16 Oct 1996 22:12:56 -0800 debmake (0.4) unstable; urgency=low * Added automatic compression of documentation in /usr/man and /usr/doc if files are >1K. * Checks for dangling symlinks and redirects symlinks to filenames that were changed due to compression. * Added rc.boot handling * Permissions for documentation were set to executable when debstd was used. -- Christoph Lameter Wed, 16 Oct 1996 08:44:26 -0800 debmake (0.3) unstable; urgency=low * Added a perl script debchanges which does maintenance of debian/changelog * Added manpage for debchanges and an alias "dch" since it is frequently used. -- Christoph Lameter Fri, 11 Oct 1996 14:00:15 -0800 debmake (0.2) unstable; urgency=low * Added a native mode to have a package that does not need an .orig directory * Put debstd into /usr/bin so that it does not have to be included in the source archives. * Added manpages for debstd and deb-make -- Christoph Lameter Thu, 10 Oct 1996 13:21:48 -0800 debmake (0.1) experimental; urgency=low * Initial Release. -- Christoph Lameter Thu, 10 Oct 1996 13:21:48 -0800 alien/debian/rules0000755000000000000000000000100712303660416011335 0ustar #!/usr/bin/make -f %: dh $@ override_dh_auto_test: # simple smoke test ./alien.pl -V 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 override_dh_auto_clean: # distclean moans about MANIFEST, this is quieter if [ -e Makefile ]; then $(MAKE) realclean; fi # Not intended for use by anyone except the author. announcedir: @echo ${HOME}/src/joeywiki/code/alien/news alien/debian/control0000644000000000000000000000134512303660423011663 0ustar Source: alien Section: admin Priority: optional Build-Depends: debhelper (>= 9) Maintainer: Joey Hess Standards-Version: 3.9.5 Vcs-Git: git://git.kitenet.net/alien Homepage: http://kitenet.net/~joey/code/alien/ Package: alien Architecture: all Section: admin Depends: debhelper (>= 7), ${misc:Depends}, ${perl:Depends}, rpm (>= 2.4.4-2), dpkg-dev, make, cpio, rpm2cpio Suggests: patch, bzip2, lsb-rpm, lintian, lzma 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. . It can also generate packages of any of the other formats. . This is a tool only suitable for binary packages. alien/debian/docs0000644000000000000000000000002312211426754011130 0ustar README gendiff.txt alien/debian/compat0000644000000000000000000000000212303660414011453 0ustar 9 alien/GPL0000644000000000000000000004307012211426754007411 0ustar GNU GENERAL PUBLIC LICENSE Version 2, June 1991 Copyright (C) 1989, 1991 Free Software Foundation, Inc. 675 Mass Ave, Cambridge, MA 02139, USA Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. Preamble The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users. This General Public License applies to most of the Free Software Foundation's software and to any other program whose authors commit to using it. (Some other Free Software Foundation software is covered by the GNU Library General Public License instead.) You can apply it to your programs, too. When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for this service if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs; and that you know you can do these things. To protect your rights, we need to make restrictions that forbid anyone to deny you these rights or to ask you to surrender the rights. These restrictions translate to certain responsibilities for you if you distribute copies of the software, or if you modify it. For example, if you distribute copies of such a program, whether gratis or for a fee, you must give the recipients all the rights that you have. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights. We protect your rights with two steps: (1) copyright the software, and (2) offer you this license which gives you legal permission to copy, distribute and/or modify the software. Also, for each author's protection and ours, we want to make certain that everyone understands that there is no warranty for this free software. If the software is modified by someone else and passed on, we want its recipients to know that what they have is not the original, so that any problems introduced by others will not reflect on the original authors' reputations. Finally, any free program is threatened constantly by software patents. We wish to avoid the danger that redistributors of a free program will individually obtain patent licenses, in effect making the program proprietary. To prevent this, we have made it clear that any patent must be licensed for everyone's free use or not licensed at all. The precise terms and conditions for copying, distribution and modification follow. GNU GENERAL PUBLIC LICENSE TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 0. This License applies to any program or other work which contains a notice placed by the copyright holder saying it may be distributed under the terms of this General Public License. The "Program", below, refers to any such program or work, and a "work based on the Program" means either the Program or any derivative work under copyright law: that is to say, a work containing the Program or a portion of it, either verbatim or with modifications and/or translated into another language. (Hereinafter, translation is included without limitation in the term "modification".) Each licensee is addressed as "you". Activities other than copying, distribution and modification are not covered by this License; they are outside its scope. The act of running the Program is not restricted, and the output from the Program is covered only if its contents constitute a work based on the Program (independent of having been made by running the Program). Whether that is true depends on what the Program does. 1. You may copy and distribute verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this License and to the absence of any warranty; and give any other recipients of the Program a copy of this License along with the Program. You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee. 2. You may modify your copy or copies of the Program or any portion of it, thus forming a work based on the Program, and copy and distribute such modifications or work under the terms of Section 1 above, provided that you also meet all of these conditions: a) You must cause the modified files to carry prominent notices stating that you changed the files and the date of any change. b) You must cause any work that you distribute or publish, that in whole or in part contains or is derived from the Program or any part thereof, to be licensed as a whole at no charge to all third parties under the terms of this License. c) If the modified program normally reads commands interactively when run, you must cause it, when started running for such interactive use in the most ordinary way, to print or display an announcement including an appropriate copyright notice and a notice that there is no warranty (or else, saying that you provide a warranty) and that users may redistribute the program under these conditions, and telling the user how to view a copy of this License. (Exception: if the Program itself is interactive but does not normally print such an announcement, your work based on the Program is not required to print an announcement.) These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Program, and can be reasonably considered independent and separate works in themselves, then this License, and its terms, do not apply to those sections when you distribute them as separate works. But when you distribute the same sections as part of a whole which is a work based on the Program, the distribution of the whole must be on the terms of this License, whose permissions for other licensees extend to the entire whole, and thus to each and every part regardless of who wrote it. Thus, it is not the intent of this section to claim rights or contest your rights to work written entirely by you; rather, the intent is to exercise the right to control the distribution of derivative or collective works based on the Program. In addition, mere aggregation of another work not based on the Program with the Program (or with a work based on the Program) on a volume of a storage or distribution medium does not bring the other work under the scope of this License. 3. You may copy and distribute the Program (or a work based on it, under Section 2) in object code or executable form under the terms of Sections 1 and 2 above provided that you also do one of the following: a) Accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, b) Accompany it with a written offer, valid for at least three years, to give any third party, for a charge no more than your cost of physically performing source distribution, a complete machine-readable copy of the corresponding source code, to be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, c) Accompany it with the information you received as to the offer to distribute corresponding source code. (This alternative is allowed only for noncommercial distribution and only if you received the program in object code or executable form with such an offer, in accord with Subsection b above.) The source code for a work means the preferred form of the work for making modifications to it. For an executable work, complete source code means all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the executable. However, as a special exception, the source code distributed need not include anything that is normally distributed (in either source or binary form) with the major components (compiler, kernel, and so on) of the operating system on which the executable runs, unless that component itself accompanies the executable. If distribution of executable or object code is made by offering access to copy from a designated place, then offering equivalent access to copy the source code from the same place counts as distribution of the source code, even though third parties are not compelled to copy the source along with the object code. 4. You may not copy, modify, sublicense, or distribute the Program except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense or distribute the Program is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance. 5. You are not required to accept this License, since you have not signed it. However, nothing else grants you permission to modify or distribute the Program or its derivative works. These actions are prohibited by law if you do not accept this License. Therefore, by modifying or distributing the Program (or any work based on the Program), you indicate your acceptance of this License to do so, and all its terms and conditions for copying, distributing or modifying the Program or works based on it. 6. Each time you redistribute the Program (or any work based on the Program), the recipient automatically receives a license from the original licensor to copy, distribute or modify the Program subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. You are not responsible for enforcing compliance by third parties to this License. 7. If, as a consequence of a court judgment or allegation of patent infringement or for any other reason (not limited to patent issues), conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot distribute so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not distribute the Program at all. For example, if a patent license would not permit royalty-free redistribution of the Program by all those who receive copies directly or indirectly through you, then the only way you could satisfy both it and this License would be to refrain entirely from distribution of the Program. If any portion of this section is held invalid or unenforceable under any particular circumstance, the balance of the section is intended to apply and the section as a whole is intended to apply in other circumstances. It is not the purpose of this section to induce you to infringe any patents or other property right claims or to contest validity of any such claims; this section has the sole purpose of protecting the integrity of the free software distribution system, which is implemented by public license practices. Many people have made generous contributions to the wide range of software distributed through that system in reliance on consistent application of that system; it is up to the author/donor to decide if he or she is willing to distribute software through any other system and a licensee cannot impose that choice. This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License. 8. If the distribution and/or use of the Program is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Program under this License may add an explicit geographical distribution limitation excluding those countries, so that distribution is permitted only in or among countries not thus excluded. In such case, this License incorporates the limitation as if written in the body of this License. 9. The Free Software Foundation may publish revised and/or new versions of the General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Program specifies a version number of this License which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of this License, you may choose any version ever published by the Free Software Foundation. 10. If you wish to incorporate parts of the Program into other free programs whose distribution conditions are different, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally. NO WARRANTY 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. END OF TERMS AND CONDITIONS How to Apply These Terms to Your New Programs If you develop a new program, and you want it to be of the greatest possible use to the public, the best way to achieve this is to make it free software which everyone can redistribute and change under these terms. To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively convey the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. Copyright (C) 19yy This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. Also add information on how to contact you by electronic and paper mail. If the program is interactive, make it output a short notice like this when it starts in an interactive mode: Gnomovision version 69, Copyright (C) 19yy name of author Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details. The hypothetical commands `show w' and `show c' should show the appropriate parts of the General Public License. Of course, the commands you use may be called something other than `show w' and `show c'; they could even be mouse-clicks or menu items--whatever suits your program. You should also get your employer (if you work as a programmer) or your school, if any, to sign a "copyright disclaimer" for the program, if necessary. Here is a sample; alter the names: Yoyodyne, Inc., hereby disclaims all copyright interest in the program `Gnomovision' (which makes passes at compilers) written by James Hacker. , 1 April 1989 Ty Coon, President of Vice This General Public License does not permit incorporating your program into proprietary programs. If your program is a subroutine library, you may consider it more useful to permit linking proprietary applications with the library. If this is what you want to do, use the GNU Library General Public License instead of this License. alien/alien.lsm0000644000000000000000000000110012303660355010634 0ustar Begin3 Title: alien Version: 8.90 Entered-date: 31MAR97 Description: Alien converts Slackware .tgz packages, Red Hat .rpm packages, Debian .deb packages, and Stampede .slp packages. It can convert from any of the formats to any other format. It works only on binary packages. It also support LSB packages. Keywords: debian dpkg deb red hat redhat rpm slackware tgz stampede slp convert package LSB Author: joey@kitenet.net Primary-site: sunsite.unc.edu /pub/Linux/utils/package 80 alien-8.90.tar.gz Copying-policy: GPL End alien/alien.spec0000644000000000000000000000160112303660355011001 0ustar Summary: Install Debian, Slackware, and Stampede packages with rpm. Name: alien Packager: Joey Hess Version: 8.90 Release: 1 Source: ftp://kitenet.net/pub/code/debian/alien_8.90.tar.gz License: GPL Group: Utilities/File Buildroot: /tmp/alien-8.90.build Requires: perl BuildArchitectures: noarch %description Alien allows you to convert Debian, Slackware, and Stampede Packages into Red Hat packages, which can be installed with rpm. It can also generate Slackware, Debian and Stampede packages. This is a tool only suitable for binary packages. %prep %setup -n alien rm -rf /tmp/alien-8.90.build %install perl Makefile.PL PREFIX=$RPM_BUILD_ROOT/usr make make pure_install VARPREFIX=$RPM_BUILD_ROOT find $RPM_BUILD_ROOT -not -type d -printf "/%%P\n" | \ sed '/\/man\//s/$/\*/' > manifest %files -f manifest %defattr(-,root,root) %doc debian/changelog GPL README alien.lsm