Changes of Revision 10
[-] | Changed | rinse.spec |
x 1
2 Name: rinse 3 -Version: 1.7 4 +Version: 1.9.1 5 Release: 1 6 Summary: debootstraps a rpm based distribution 7 8
9 %{_prefix}/lib/%{name} 10 11 %changelog 12 +* Sat Jan 14 2012 Carsten Schoene <cs@linux-administrator.com> - 1.9.1-1 13 +- update to release 1.9.1 14 + 15 * Wed Apr 22 2009 Carsten Schoene <cs@linux-administrator.com> - 1.7-1 16 - new upstream release 1.7 17 - This release has been updated to correctly install new versions of Centos 5.x 18 |
||
[+] | Deleted | rinse-1.0.tar.gz/.release ^ |
@@ -1,30 +0,0 @@ -# -# Configuration file for 'release', a utility to make release more -# easily: -# -# http://release.repository.steve.org.uk/ -# -# Steve -# -- -# - -# -# Command to run -# -preupload="make release" - -# -# -# Pattern for our release tarball. -# -pattern=rinse-[0-9].[0-9].tar.gz* - -# -# Pattern for our GPG-signature. -# -signature=rinse-[0-9].[0-9].tar.gz.asc - -# -# Upload location. -# -upload=steve@www.xen-tools.org:/home/www/www.xen-tools.org/htdocs/software/rinse/ | ||
Deleted | rinse-1.1.tar.gz ^ | |
Deleted | rinse-1.3.tar.gz ^ | |
Deleted | rinse-1.4.tar.gz ^ | |
Deleted | rinse-1.5.tar.gz ^ | |
[+] | Added | rinse-1.9.1.tar.gz/.version ^ |
@@ -0,0 +1 @@ +1.9.1 | ||
[+] | Changed | rinse-1.9.1.tar.gz/BUGS ^ |
@@ -3,7 +3,13 @@ Reporting Bugs -------------- - To report a bug please use the xen-tools mailing list: + I prefer a bug report to the Debian bug tracking system (BTS). + Use the tool reportbug or read the instructions at + + http://bugs.debian.org + + + You may also use the xen-tools mailing list: http://xen-tools.org/lists/ @@ -11,5 +17,5 @@ and a test case would be a useful bonus. -Steve +Thomas -- | ||
[+] | Changed | rinse-1.9.1.tar.gz/Makefile ^ |
@@ -10,7 +10,7 @@ # Only used to build distribution tarballs. # DIST_PREFIX = ${TMP} -VERSION = 1.0 +VERSION = 1.9.1 BASE = rinse PREFIX = @@ -63,11 +63,14 @@ install: fixupperms install-manpage mkdir -p ${PREFIX}/etc/bash_completion.d mkdir -p ${PREFIX}/etc/rinse - mkdir -p ${PREFIX}/usr/bin + mkdir -p ${PREFIX}/usr/sbin mkdir -p ${PREFIX}/usr/lib/rinse + mkdir -p ${PREFIX}/usr/lib/rinse/common + cp ./scripts.common/* ${PREFIX}/usr/lib/rinse/common + chmod 755 ${PREFIX}/usr/lib/rinse/common/*.sh mkdir -p ${PREFIX}/var/cache/rinse - cp bin/rinse ${PREFIX}/usr/bin/ - chmod 755 ${PREFIX}/usr/bin/rinse + cp bin/rinse ${PREFIX}/usr/sbin/ + chmod 755 ${PREFIX}/usr/sbin/rinse cp etc/*.packages ${PREFIX}/etc/rinse cp etc/*.conf ${PREFIX}/etc/rinse for i in scripts/*/; do name=`basename $$i`; if [ "$$name" != "CVS" ]; then mkdir -p ${PREFIX}/usr/lib/rinse/$$name ; cp $$i/*.sh ${PREFIX}/usr/lib/rinse/$$name ; fi ; done @@ -87,13 +90,17 @@ rm -rf $(DIST_PREFIX)/$(BASE)-$(VERSION) rm -f $(DIST_PREFIX)/$(BASE)-$(VERSION).tar.gz cp -R . $(DIST_PREFIX)/$(BASE)-$(VERSION) + perl -pi -e "s/XXUNRELEASEDXX/$(VERSION)/g" $(DIST_PREFIX)/$(BASE)-$(VERSION)/bin/rinse* rm -rf $(DIST_PREFIX)/$(BASE)-$(VERSION)/debian rm -rf $(DIST_PREFIX)/$(BASE)-$(VERSION)/.hg* + rm -rf $(DIST_PREFIX)/$(BASE)-$(VERSION)/.release cd $(DIST_PREFIX) && tar -cvf $(DIST_PREFIX)/$(BASE)-$(VERSION).tar $(BASE)-$(VERSION)/ gzip $(DIST_PREFIX)/$(BASE)-$(VERSION).tar mv $(DIST_PREFIX)/$(BASE)-$(VERSION).tar.gz . rm -rf $(DIST_PREFIX)/$(BASE)-$(VERSION) gpg --armour --detach-sign $(BASE)-$(VERSION).tar.gz + echo $(VERSION) > .version + # @@ -122,7 +129,7 @@ # Remove the software. # uninstall: - rm -f ${PREFIX}/usr/bin/rinse + rm -f ${PREFIX}/usr/sbin/rinse rm -f ${PREFIX}/etc/rinse/*.conf rm -f ${PREFIX}/etc/rinse/*.packages rm -rf ${PREFIX}/var/cache/rinse | ||
[+] | Changed | rinse-1.9.1.tar.gz/README ^ |
@@ -1,13 +1,10 @@ Homepage: - http://www.xen-tools.org/software/rinse + http://steve.org.uk/Software/rinse/ Mercurial Repository: http://rinse.repository.steve.org.uk/ -Mailing Lists: - http://xen-tools.org/lists/ - Rinse ----- | ||
[+] | Changed | rinse-1.9.1.tar.gz/bin/rinse ^ |
@@ -8,22 +8,44 @@ rinse [options] + Help Options: --help Show help information. --manual Read the manual for this script. --version Show the version information and exit. + Mandatory Options: + --directory The directory to install the distribution within. --distribution The distribution to install. + + Customization Options: + + --add-pkg-list Additional packages to download and install + + --after-post-install Additionally run the specified script after + the post install script. + --before-post-install Additionally run the specified script before + the post install script. + --post-install Run the given post-install script instead of the + default files in /usr/lib/rinse/$distro + Misc Options: + --arch Specify the architecture to install. --cache Should we use a local cache? (Default is 1) --cache-dir Specify the directory we should use for the cache. --clean-cache Clean our cache of .rpm files. + --config Specify a different configuration file. + (Default is /etc/rinse/rinse.conf) + --pkgs-dir Specify a different directory containing + <distribution>.packages files. --list-distributions Show installable distributions. --print-uris Only show the RPMs which should be downloaded. + default files in /usr/lib/rinse/$distro + --verbose Enable verbose output. =cut @@ -35,6 +57,9 @@ =item B<--arch> Specify the architecture to install. Valid choices are 'amd64' and 'i386' only. +=item B<--add-pkg-list> +Add a list of additional packages. + =item B<--cache> Specify whether to cache packages (1) or not (0). @@ -62,6 +87,9 @@ =item B<--print-uris> Only show the files we would download, don't actually do so. +=item B<--verbose> +Enable verbose output. + =item B<--version> Show the version number and exit. @@ -76,7 +104,7 @@ a minimal working installation of an RPM-based distribution into a directory. - The tool is analagous to the standard Debian GNU/Linux debootstrap + The tool is analogous to the standard Debian GNU/Linux debootstrap utility. =cut @@ -104,7 +132,7 @@ may run the following: -=for example beging +=for example begin rinse --distribution fedora-core-6 --print-uris @@ -132,7 +160,8 @@ =head1 LICENSE -Copyright (c) 2007-2008 by Steve Kemp. All rights reserved. +Copyright (c) 2007-2010 by Steve Kemp. All rights reserved. +Copyright (c) 2011 by Thomas Lange. This module is free software; you can redistribute it and/or modify it under @@ -156,36 +185,37 @@ use File::Copy; use File::Path; use File::Find; +use File::Basename; use Getopt::Long; use Pod::Usage; use LWP::UserAgent; - - # # Release number. # -my $RELEASE = '0.8'; +my $RELEASE = '1.9.1'; # -# Our confiuration options. +# Our configuration options. # my %CONFIG; # # Default options. # -$CONFIG{'arch'} = 'i386'; -$CONFIG{'cache'} = 1; -$CONFIG{'cache-dir'} = "/var/cache/rinse/"; +$CONFIG{ 'arch' } = 'i386'; +$CONFIG{ 'cache' } = 1; +$CONFIG{ 'cache-dir' } = "/var/cache/rinse/"; +$CONFIG{ 'config' } = "/etc/rinse/rinse.conf"; +$CONFIG{ 'pkgs-dir' } = "/etc/rinse"; # # Find the size of our terminal # -( $CONFIG{'width'}, $CONFIG{'height'} ) = getTerminalSize(); +( $CONFIG{ 'width' }, $CONFIG{ 'height' } ) = getTerminalSize(); # @@ -204,12 +234,12 @@ # # Handle special case first. # -if ( $CONFIG{'list-distributions'} ) +if ( $CONFIG{ 'list-distributions' } ) { listDistributions(); exit; } -if ( $CONFIG{'clean-cache'} ) +if ( $CONFIG{ 'clean-cache' } ) { cleanCache(); exit; @@ -226,34 +256,35 @@ # Ensure we're started by root at this point. This is required # to make sure we mount /proc, etc. # -testRootUser() unless( $CONFIG{'print-uris'} ); +testRootUser() unless ( $CONFIG{ 'print-uris' } ); # # Make sure the directory we're installing into exists. # -if ( ( !$CONFIG{'print-uris'} ) && ( ! -d $CONFIG{'directory'} ) ) +if ( ( !$CONFIG{ 'print-uris' } ) && ( !-d $CONFIG{ 'directory' } ) ) { + # # Make the directory, including all required parent(s) directories. # - mkpath( $CONFIG{'directory'}, 0, 0755 ); + mkpath( $CONFIG{ 'directory' }, 0, 0755 ); } # # Find the list of packages to download # -my @packages = getDistributionPackageList( $CONFIG{'distribution'} ); +my @packages = getDistributionPackageList( $CONFIG{ 'distribution' } ); # # Find the mirror, if not specified already. # -if ( ! $CONFIG{'mirror'} ) +if ( !$CONFIG{ 'mirror' } ) { - $CONFIG{'mirror'} = getDistributionMirror( $CONFIG{'distribution'}, - $CONFIG{'arch'} ); + $CONFIG{ 'mirror' } = + getDistributionMirror( $CONFIG{ 'distribution' }, $CONFIG{ 'arch' } ); } @@ -261,25 +292,27 @@ # # Download the packages into the specified directory # -downloadPackagesToDirectory( $CONFIG{'directory'}, $CONFIG{'mirror'}, @packages ); +downloadPackagesToDirectory( $CONFIG{ 'directory' }, + $CONFIG{ 'mirror' }, @packages ); # # If we're only printing then exit here. # -exit if ( $CONFIG{'print-uris'} ); +exit if ( $CONFIG{ 'print-uris' } ); # # Unpack the packages # -unpackPackages( $CONFIG{'directory'} ); +unpackPackages( $CONFIG{ 'directory' } ); # -# Now run the post-installation customization. +# Now run the post-installation customisation. # -postInstallationCustomization( $CONFIG{'distribution'}, $CONFIG{'directory'} ); +postInstallationCustomization( $CONFIG{ 'distribution' }, + $CONFIG{ 'directory' } ); # @@ -290,10 +323,6 @@ - - - - =begin doc This routine is designed to test that the host system we're running @@ -310,10 +339,10 @@ my @required = qw/ rpm rpm2cpio wget /; - foreach my $file ( @required ) + foreach my $file (@required) { - if ( ( ! -x "/bin/$file" ) && - ( ! -x "/usr/bin/$file" ) ) + if ( ( !-x "/bin/$file" ) && + ( !-x "/usr/bin/$file" ) ) { print "The following (required) binary appears to be missing:\n"; print "\t" . $file . "\n"; @@ -337,7 +366,7 @@ { if ( $EFFECTIVE_USER_ID != 0 ) { - print<<E_O_ROOT; + print <<E_O_ROOT; In order to use this script you must be running with root privileges. @@ -369,39 +398,42 @@ # Parse options. # GetOptions( - # Main options - "directory=s", \$CONFIG{'directory'}, - "distribution=s", \$CONFIG{'distribution'}, - - # Misc options. - "arch=s", \$CONFIG{'arch'}, - "cache=s", \$CONFIG{'cache'}, - "cache-dir=s", \$CONFIG{'cache-dir'}, - "clean-cache", \$CONFIG{'clean-cache'}, - "list-distributions", \$CONFIG{'list-distributions'}, - "print-uris", \$CONFIG{'print-uris'}, - - # Help options - "help", \$HELP, - "manual", \$MANUAL, - "verbose", \$CONFIG{'verbose'}, - "version", \$VERSION - ); + # configuration options + "config=s", \$CONFIG{ 'config' }, + "pkgs-dir=s", \$CONFIG{ 'pkgs-dir' }, + + # Main options + "directory=s", \$CONFIG{ 'directory' }, + "distribution=s", \$CONFIG{ 'distribution' }, + + # Misc options. + "arch=s", \$CONFIG{ 'arch' }, + "cache=s", \$CONFIG{ 'cache' }, + "cache-dir=s", \$CONFIG{ 'cache-dir' }, + "clean-cache", \$CONFIG{ 'clean-cache' }, + "list-distributions", \$CONFIG{ 'list-distributions' }, + "print-uris", \$CONFIG{ 'print-uris' }, + "post-install=s", \$CONFIG{ 'post-install' }, + "before-post-install=s", \$CONFIG{ 'before-post-install' }, + "after-post-install=s", \$CONFIG{ 'after-post-install' }, + "add-pkg-list=s", \$CONFIG{ 'add-pkg-list' }, + + # Help options + "help", \$HELP, + "manual", \$MANUAL, + "verbose", \$CONFIG{ 'verbose' }, + "version", \$VERSION + + ); pod2usage(1) if $HELP; - pod2usage(-verbose => 2 ) if $MANUAL; + pod2usage( -verbose => 2 ) if $MANUAL; - if ( $VERSION ) + if ($VERSION) { - my $REVISION = '$Revision: 1.31 $'; - if ( $REVISION =~ /1.([0-9.]+) / ) - { - $REVISION = $1; - } - - print( "rinse release $RELEASE - CVS: $REVISION\n" ); + print("rinse release $RELEASE\n"); exit; } } @@ -420,10 +452,11 @@ sub sanityCheckArguments { + # # Distribution is mandatory # - if ( ! $CONFIG{'distribution'} ) + if ( !$CONFIG{ 'distribution' } ) { print <<EOF; @@ -442,8 +475,8 @@ # Installation root is mandatory *unless* we're just printing # the URLs we'd download # - if ( ( ! $CONFIG{'directory'} ) && - ( ! $CONFIG{'print-uris'} ) ) + if ( ( !$CONFIG{ 'directory' } ) && + ( !$CONFIG{ 'print-uris' } ) ) { print <<EOF; @@ -454,17 +487,19 @@ exit; } - if ( $CONFIG{'arch'} ) + if ( $CONFIG{ 'arch' } ) { - if ( ( $CONFIG{'arch'} ne "i386" ) && - ( $CONFIG{'arch'} ne "amd64" ) ) + if ( ( $CONFIG{ 'arch' } ne "i386" ) && + ( $CONFIG{ 'arch' } ne "amd64" ) && + ( $CONFIG{ 'arch' } ne "x86_64" ) ) + { print <<EOARCH; Only two architectures are supported: i386 - amd64 + amd64 or x86_64 EOARCH exit; @@ -493,8 +528,9 @@ # # 2. A scripts directory. (Even if empty!) # - foreach my $file ( glob( "/etc/rinse/*.packages" ) ) + foreach my $file ( glob("$CONFIG{'pkgs-dir'}/*.packages") ) { + # # Get the name - so that we can test for the directory. # @@ -504,10 +540,10 @@ } } - if ( @avail ) + if (@avail) { print "The following distributions are available:\n"; - foreach my $a ( @avail ) + foreach my $a (@avail) { print "\t$a\n"; } @@ -526,7 +562,7 @@ sub cleanCache { - my $dir = $CONFIG{'cache-dir'}; + my $dir = $CONFIG{ 'cache-dir' }; # # Nested function to remove .rpm files. @@ -536,8 +572,8 @@ my $file = $File::Find::name; if ( $file =~ /\.rpm$/ ) { - $CONFIG{'verbose'} && print "Removing: $file\n"; - unlink( $file ); + $CONFIG{ 'verbose' } && print "Removing: $file\n"; + unlink($file); } } @@ -552,7 +588,7 @@ =begin doc - Return the list of packagse which are required for a basic + Return the list of packages which are required for a basic installation of the specified distribution. These packages are located in the configuration file in /etc/rinse. @@ -563,11 +599,14 @@ sub getDistributionPackageList { - my( $distribution ) = (@_); + my ($distribution) = (@_); - my $file = "/etc/rinse/$distribution.packages"; + my $file = "$CONFIG{'pkgs-dir'}/$distribution.packages"; - if ( ! -e $file ) + my @additional; + my $adt_file = $CONFIG{ 'add-pkg-list' }; + + if ( !-e $file ) { print <<EOF; @@ -583,6 +622,17 @@ exit; } + if ( ($adt_file) && ( !-e $adt_file ) ) + { + print <<EOF; + The file $adt_file was not found. + + Aborting. + +EOF + exit; + } + # # Read the file, skipping blank lines and comments # @@ -590,21 +640,36 @@ open( FILE, "<", $file ) or die "Failed to open $file - $!"; - foreach my $line ( <FILE> ) + foreach my $line (<FILE>) { next if ( !$line ); - chomp( $line ); + chomp($line); next if ( $line =~ /^#/ ); - next if ( !length( $line ) ); + next if ( !length($line) ); push( @packages, $line ); } - close( FILE ); + close(FILE); + + if ($adt_file) + { + open( ADT, "<", $adt_file ) or die "Failed to open $adt_file - $!"; + foreach my $line (<ADT>) + { + next if ( !$line ); + chomp($line); + next if ( $line =~ /^#/ ); + next if ( !length($line) ); + + push( @packages, $line ); + } + close(ADT); + } # # Return the list in a sorted fashion. # - return( sort {lc($a) cmp lc($b) } @packages ); + return ( sort {lc($a) cmp lc($b)} @packages ); } @@ -619,19 +684,15 @@ sub getDistributionMirror { - my( $dist, $arch ) = (@_); + my ( $dist, $arch ) = (@_); - my $file = "/etc/rinse/rinse.conf"; + my $file = $CONFIG{ 'config' }; - if ( ! -e $file ) + if ( !-e $file ) { print <<EOF; - The configuration file was not found. - - We expected to find: - - $file + The configuration file $CONFIG{'config'} was not found. Aborting. @@ -651,11 +712,11 @@ # my %options; - foreach my $line ( <INPUT> ) + foreach my $line (<INPUT>) { - next if ( !$line || !length($line ) ); + next if ( !$line || !length($line) ); next if $line =~ /^#/; - chomp( $line ); + chomp($line); if ( $line =~ /^\[([^]]+)\]/ ) { @@ -679,17 +740,17 @@ $val =~ s/^\s+//; $val =~ s/\s+$//; - $options{$key} = $val; + $options{ $key } = $val; } } - close( INPUT ); + close(INPUT); # # Did we find it? # my $key = "mirror." . $arch; - return( $options{$key} ) if ( $options{$key} ); - return( $options{'mirror'} ) if ( $options{'mirror'} ); + return ( $options{ $key } ) if ( $options{ $key } ); + return ( $options{ 'mirror' } ) if ( $options{ 'mirror' } ); # # Error if we didn't. @@ -719,7 +780,7 @@ sub downloadPackagesToDirectory { - my( $dir, $mirror, @packages ) = ( @_ ); + my ( $dir, $mirror, @packages ) = (@_); # # Cache directory. @@ -730,14 +791,16 @@ # Unless we've been told not to then copy packages from # the cache. # - if ( ( $CONFIG{'cache'} ) && !$CONFIG{'print-uris'} ) + if ( ( $CONFIG{ 'cache' } ) && !$CONFIG{ 'print-uris' } ) { + # # Make sure we have a cache directory. # if ( -d $cache ) { - $CONFIG{'verbose'} && print "Copying files from cache directory: $cache\n"; + $CONFIG{ 'verbose' } && + print "Copying files from cache directory: $cache\n"; copyPackageFiles( $cache, $dir ); } } @@ -745,11 +808,11 @@ # # Find the links available for download on our mirror. # - my %links = findMirrorContents( $mirror ); + my %links = findMirrorContents($mirror); # - # Count of links, and the currently active download. + # Count of links, and the currently active download. # Used purely for the status updates.. # my $count = 0; @@ -758,89 +821,126 @@ # # Process each package we're supposed to fetch. # - foreach my $package ( @packages ) + PACKAGE: + foreach my $package (@packages) { - my $found = 0; - - $CONFIG{'verbose'} && print "-Download $package\n"; + $CONFIG{ 'verbose' } && print "-Download $package\n"; # # Find the candidate package to download from our list of links. # foreach my $key ( keys %links ) { + + # Matching a package to a key from the URL relies on packages + # being named in the defacto RPM way: # - # If we have haven't found the package yet, and the name - # of the link is *longer* than the name of the package we're - # looking for. + # <name>-<version>-<release>.<arch>.rpm # - # (ie. to cope with -$ver.$arch.$rpm). + # Unfortunately the version and release are unknown (and can + # change) and therefore cannot be used to compare - they must + # be discarded. The string can be split on '-' to find the + # version and release. The name portion should exactly match + # the package and the remainder + + # See if the key is long enough to be split and still have + # '-<version>-<release>.<arch>.rpm' + if ( length($key) <= length($package) ) + { + next; + } + + my $name_part = substr( $key, 0, length($package) ); + + # See if the name part compares + if ( $name_part ne $package ) + { + next; + } + + my $remainder_part = substr( $key, length($package) ); + my @remainder_parts = split( /-/, $remainder_part ); + + # See if there are exactly three elements leftover and if they are + # a reasonable approximation of what is expected: # - if ( ( ! $found ) && - ( length( $key ) > length( $package ) ) ) + # '' The remainder part starts with '-' + # <version> + # <release>.<arch>.rpm + + my $arch = $CONFIG{ 'arch' }; + if ( $CONFIG{ 'arch' } eq 'amd64' ) + { + $arch = 'x86_64'; + } + if ( $CONFIG{ 'arch' } eq 'i386' ) { - # get the substring of the link we've got - my $pre = substr( $key, 0, length( $package ) ); - my $post= substr( $key, length( $package ), 2 ); + $arch = 'i386|i686'; + } - if ( ( lc( $pre ) eq lc( $package ) ) && - $post =~ /-[0-9]/ ) - { - $found += 1; + if ( $#remainder_parts != 2 || + $remainder_parts[0] ne '' || + $remainder_parts[1] !~ /^[\d\w][\d\w.+]*$/ || + $remainder_parts[2] !~ + /^[\d\w][\d\w.+]*\.(${arch}|noarch)\.rpm$/ ) + { - if ( $CONFIG{'print-uris'} ) - { - print $mirror . "/" . $key . "\n"; - } - else - { - # - # Print message and padding. - # - my $msg = "\r[$count:$total] Downloading: $key .."; - while( length( $msg ) < ( $CONFIG{'width'} -1) ) - { - $msg .= " "; - } - print $msg; - - # download - unless already present. - if ( ! -e "$dir/$key" ) - { - system( "wget --quiet -O $dir/$key $mirror/$key" ); - } - } - } + # Don't have enough parts or they don't look right + next; } - } + # Match found! - if ( !$found ) - { - print "[Harmless] Failed to find download link for $package\n"; - } + if ( $CONFIG{ 'print-uris' } ) + { + print $mirror . "/" . $key . "\n"; + } + else + { - $CONFIG{'verbose'} && print "+Download $package\n"; + # + # Print message and padding. + # + my $msg = "\r[$count:$total] Downloading: $key .."; + while ( length($msg) < ( $CONFIG{ 'width' } - 1 ) ) + { + $msg .= " "; + } + print $msg; + # download - unless already present. + if ( !-e "$dir/$key" ) + { + system("wget --quiet -O $dir/$key $mirror/$key"); + } + } + $CONFIG{ 'verbose' } && print "+Download $package\n"; + next PACKAGE; + } + print "[Harmless] Failed to find download link for $package\n"; + } + continue + { $count += 1; } # newline. print "\r"; - print " " x ($CONFIG{'width'} - 1 ); + print " " x ( $CONFIG{ 'width' } - 1 ); print "\n"; # # Now update the cache. # - if ( ( $CONFIG{'cache'} ) && !$CONFIG{'print-uris'} ) + if ( ( $CONFIG{ 'cache' } ) && !$CONFIG{ 'print-uris' } ) { - $CONFIG{'verbose'} && print "Copying files to cache directory: $cache\n"; + $CONFIG{ 'verbose' } && + print "Copying files to cache directory: $cache\n"; # # Make sure we have a cache directory. # - mkpath( $cache, 0, 0755 ) if ( ! -d $cache ); + mkpath( $cache, 0, 0755 ) if ( !-d $cache ); copyPackageFiles( $dir, $cache ); } @@ -859,12 +959,12 @@ sub findMirrorContents { - my ( $mirror ) = ( @_ ); + my ($mirror) = (@_); # # Download # - my $index = downloadURL( $mirror ); + my $index = downloadURL($mirror); # # Now we want to store all the links we've found. @@ -876,6 +976,7 @@ # foreach my $line ( split( /\n/, $index ) ) { + # # Look for contents of the form: # @@ -884,7 +985,7 @@ while ( $line =~ /href=\"([^\"]+)\">(.*)/i ) { my $link = $1; - $line = $2; + $line = $2; # strip any path from the link. $link = $2 if ( $link =~ /^(.*)\/(.*)$/ ); @@ -893,10 +994,10 @@ next if ( $link !~ /\.rpm$/i ); # Decode entities. eg. libstd++ - $link = uri_unescape( $link ); + $link = uri_unescape($link); # store - $links{$link} = 1; + $links{ $link } = 1; } } @@ -907,25 +1008,26 @@ # then we need to *only* return those things. # my $i386 = undef; - $i386 = 1 if ( $CONFIG{'arch'} =~ /i386/ ); - $i386 = 0 if ( $CONFIG{'arch'} =~ /amd64/ ); + $i386 = 1 if ( $CONFIG{ 'arch' } =~ /i386/ ); + $i386 = 0 if ( $CONFIG{ 'arch' } =~ /amd64/ ); foreach my $key ( sort keys %links ) { + # i386/i486/i586/i686 packages when we're dealing with amd64 installs. - if ( ( $key =~ /\.i[3456]86\./ ) && !$i386 ) + if ( ( $key =~ /\.i[3456]86\.rpm/ ) && !$i386 ) { - delete( $links{$key} ); + delete( $links{ $key } ); } # amd64 packages when we're dealing with i386 installs. - if ( $key =~ /\.x86_64\./ && ($i386) ) + if ( $key =~ /\.x86_64\.rpm/ && ($i386) ) { - delete( $links{$key} ); + delete( $links{ $key } ); } } - return( %links ); + return (%links); } @@ -940,7 +1042,7 @@ sub downloadURL { - my( $URL ) = ( @_ ); + my ($URL) = (@_); # # Create the helper. @@ -952,19 +1054,19 @@ # # Fetch the URI # - my $response = $ua->get( $URL ); + my $response = $ua->get($URL); # # If it worked then return it # - if ($response->is_success) + if ( $response->is_success ) { - return( $response->content ); + return ( $response->content ); } else { print "Failed to fetch : $URL\n"; - print "\t" . $response->status_line . "\n\n"; + print "\t" . $response->status_line . "\n\n"; exit; } } @@ -983,20 +1085,23 @@ sub unpackPackages { - my( $dir ) = ( @_ ); + my ($dir) = (@_); # # Get a sorted list of the RPMs # my @rpms = glob( $dir . "/*.rpm" ); - @rpms = sort {lc($a) cmp lc($b) } @rpms; + @rpms = sort {lc($a) cmp lc($b)} @rpms; + + # Command to execute after extraction + my $postcmd = ""; # # For each RPM file: convert to .tgz # - foreach my $file ( @rpms ) + foreach my $file (@rpms) { - $CONFIG{'verbose'} && print "-extract $file\n"; + $CONFIG{ 'verbose' } && print "-extract $file\n"; # # Show status @@ -1010,8 +1115,8 @@ # # Show status output. # - my $msg = "\rExtracting .rpm file : $name"; - while( length( $msg ) < ( $CONFIG{'width'} -1) ) + my $msg = "\rExtracting .rpm file : $name"; + while ( length($msg) < ( $CONFIG{ 'width' } - 1 ) ) { $msg .= " "; } @@ -1020,61 +1125,139 @@ # # Run the unpacking command. # - my $cmd = "rpm2cpio $file | (cd $CONFIG{'directory'} ; cpio --extract --make-directories --no-absolute-filenames --preserve-modification-time) 2>/dev/null >/dev/null"; - system( $cmd ); + my $cmd = + "rpm2cpio $file | (cd $CONFIG{'directory'} ; cpio --extract --make-directories --no-absolute-filenames --preserve-modification-time) 2>/dev/null >/dev/null"; + if ( $file =~ /(fedora|centos|redhat|mandriva)-release-/ ) + { + my $rpmname = basename($file); + $postcmd = + "cp $file $CONFIG{'directory'}/tmp ; chroot $CONFIG{'directory'} rpm -ivh --force --nodeps /tmp/$rpmname ; rm $CONFIG{'directory'}/tmp/$rpmname"; + } + system($cmd ); - $CONFIG{'verbose'} && print "+extract $file\n"; + $CONFIG{ 'verbose' } && print "+extract $file\n"; } print "\r"; - print " " x $CONFIG{'width'}; + print " " x $CONFIG{ 'width' }; print "\n"; + # + # In order to be setup correctly, yum needs an installed package + # providing distroverpkg this is provided by a *-release package + # such as redhat-release, centos-release, fedora-release ... + # + # So here we force the install with rpm of the one we previously found + # + if ( $postcmd ne "" ) + { + system($postcmd); + $CONFIG{ 'verbose' } && print "+execute $postcmd\n"; + } } =begin doc - Run the post-installation customization scripts for the given + Run the post-installation customisation scripts for the given distribution. + We might have been given a distinct file to run, instead of the + default via --post-install. + + Or we might have pre/post post-install scripts to run if the + options --before-post-install or --after-post-install were used + =end doc =cut sub postInstallationCustomization { - my( $distribution, $prefix ) = (@_); + my ( $distribution, $prefix ) = (@_); - my $scriptDir = "/usr/lib/rinse/$distribution/"; # # Setup environment for the post-install scripts. # - $ENV{'ARCH'} = $CONFIG{'arch'}; - $ENV{'mirror'} = $CONFIG{'mirror'}; - $ENV{'dist'} = $CONFIG{'distribution'}; - $ENV{'directory'} = $CONFIG{'directory'}; + $ENV{ 'ARCH' } = $CONFIG{ 'arch' }; + $ENV{ 'mirror' } = $CONFIG{ 'mirror' }; + $ENV{ 'dist' } = $CONFIG{ 'distribution' }; + $ENV{ 'directory' } = $CONFIG{ 'directory' }; + $ENV{ 'cache_dir' } = $CONFIG{ 'cache-dir' }; - foreach my $file ( sort( glob( $scriptDir . "/*" ) ) ) + # + # Did we get a custom file to execute before? + # + if ( ( defined $CONFIG{ 'before-post-install' } ) && + ( -x $CONFIG{ 'before-post-install' } ) ) { - $CONFIG{'verbose'} && print "-script $file\n"; + print "Running custom script: $CONFIG{'before-post-install'}\n"; - # - # Report on progress all the time. - # - my $name = $file; - if ( $name =~ /(.*)\/(.*)/ ) + system( $CONFIG{ 'before-post-install' }, $prefix ); + } + + # + # Did we get a custom file to execute? + # + if ( ( defined $CONFIG{ 'post-install' } ) && + ( -x $CONFIG{ 'post-install' } ) ) + { + print "Running custom script: $CONFIG{'post-install'}\n"; + + system( $CONFIG{ 'post-install' }, $prefix ); + return; + } + + + # + # OK we run the per-distro file(s), along with any + # common files. + # + my @scripts; + push( @scripts, "/usr/lib/rinse/common" ); + push( @scripts, "/usr/lib/rinse/" . lc ( $distribution ) ); + + # + # For each one + # + foreach my $script ( @scripts ) + { + $CONFIG{'verbose'} && print "Dir: $script\n"; + + foreach my $file ( sort( glob( $script . "/*" ) ) ) { - $name = $2; + $CONFIG{ 'verbose' } && print "-script $file\n"; + + # + # Report on progress all the time. + # + my $name = $file; + if ( $name =~ /(.*)\/(.*)/ ) + { + $name = $2; + } + print "Running post-install script $name:\n"; + my $cmd = "$file $prefix"; + system($cmd ); + + $CONFIG{ 'verbose' } && print "+script $file\n"; } - print "Running post-install script $name:\n"; - my $cmd = "$file $prefix"; - system( $cmd ); + } + + + # + # Did we get a custom file to execute after? + # + if ( ( defined $CONFIG{ 'after-post-install' } ) && + ( -x $CONFIG{ 'after-post-install' } ) ) + { + print "Running custom script: $CONFIG{'after-post-install'}\n"; - $CONFIG{'verbose'} && print "+script $file\n"; + system( $CONFIG{ 'after-post-install' }, $prefix ); } + } @@ -1089,12 +1272,13 @@ sub copyPackageFiles { - my( $src, $dest ) = (@_); + my ( $src, $dest ) = (@_); - $CONFIG{'verbose'} && print "- archiving from $src - $dest\n"; + $CONFIG{ 'verbose' } && print "- archiving from $src - $dest\n"; foreach my $file ( sort( glob( $src . "/*.rpm" ) ) ) { + # strip path. if ( $file =~ /^(.*)\/(.*)$/ ) { @@ -1105,19 +1289,17 @@ # if the file isn't already present in the destination then # copy it there. # - if ( ! -e $dest . "/" . $file ) + if ( !-e $dest . "/" . $file ) { - copy( $src . "/" . $file, - $dest . "/" . $file ); + copy( $src . "/" . $file, $dest . "/" . $file ); } } - $CONFIG{'verbose'} && print "+ archiving from $src - $dest\n"; + $CONFIG{ 'verbose' } && print "+ archiving from $src - $dest\n"; } - =begin doc Find and return the width of the current terminal. This makes @@ -1131,7 +1313,7 @@ sub getTerminalSize { - my $testModule = "use Term::Size;"; + my $testModule = "use Term::Size;"; my $width = 80; my $height = 25; @@ -1140,20 +1322,21 @@ # Test loading the size module. If this fails # then we will use the defaults sizes. # - eval( $testModule ); - if ( $@ ) + eval($testModule); + if ($@) { } else { + # # Term::Size is available, so use it to find # the current terminal size. # - ($width, $height ) = Term::Size::chars(); + ( $width, $height ) = Term::Size::chars(); } - return( $width, $height ); + return ( $width, $height ); } @@ -1175,14 +1358,16 @@ sub uri_unescape { + # Note from RFC1630: "Sequences which start with a percent sign # but are not followed by two hexadecimal characters are reserved # for future extension" my $str = shift; - if (@_ && wantarray) + if ( @_ && wantarray ) { + # not executed for the common case of a single argument - my @str = ($str, @_); # need to copy + my @str = ( $str, @_ ); # need to copy foreach (@str) { s/%([0-9A-Fa-f]{2})/chr(hex($1))/eg; | ||
[+] | Changed | rinse-1.9.1.tar.gz/bin/rinse-unpack ^ |
@@ -53,7 +53,7 @@ =head1 DESCRIPTION - rinse-unpack is a simple utilty which will "unpack" all the files + rinse-unpack is a simple utility which will "unpack" all the files in the specified directory. It isn't used by rinse itself, instead it is supplied as a utility @@ -98,18 +98,17 @@ - # # Release number. # -my $RELEASE = '0.8'; +my $RELEASE = '1.9.1'; # -# Our confiuration options. +# Our configuration options. # my %CONFIG; -$CONFIG{'directory'} = '.'; # default to the current directory. +$CONFIG{ 'directory' } = '.'; # default to the current directory. # @@ -128,7 +127,7 @@ # # Make sure the directory we've been given actually exists. # -if ( ! -d $CONFIG{'directory'} ) +if ( !-d $CONFIG{ 'directory' } ) { print "The directory specified doesn't exist. Aborting\n"; exit; @@ -139,14 +138,14 @@ # Convert *.rpm -> *.tgz # print "Converting *.rpm -> *.tgz\n"; -convertRPM2TGZ( $CONFIG{'directory'} ); +convertRPM2TGZ( $CONFIG{ 'directory' } ); # # Unpack *.tgz # -print "Unpackage *.tgz\n"; -unpackTGZ( $CONFIG{'directory'} ); +print "Unpacking *.tgz\n"; +unpackTGZ( $CONFIG{ 'directory' } ); # @@ -157,8 +156,6 @@ - - =begin doc Convert each .rpm file into a .tgz file, via the use of the alien tool. @@ -169,14 +166,16 @@ sub convertRPM2TGZ { - my( $directory ) = ( @_ ); + my ($directory) = (@_); foreach my $file ( sort( glob( $directory . "/*.rpm" ) ) ) { + # convert - system( "cd $directory && alien --to-tgz $file 2>/dev/null >/dev/null" ); + system("cd $directory && alien --to-tgz $file 2>/dev/null >/dev/null"); + # delete - unlink( $file ) unless( $CONFIG{'keep-rpm'} ); + unlink($file) unless ( $CONFIG{ 'keep-rpm' } ); } } @@ -192,15 +191,16 @@ sub unpackTGZ { - my( $directory ) = ( @_ ); + my ($directory) = (@_); foreach my $file ( sort( glob( $directory . "/*.tgz" ) ) ) { + # unpack - system( "cd $directory && tar -zxf $file 2>/dev/null >/dev/null" ); + system("cd $directory && tar -zxf $file 2>/dev/null >/dev/null"); # delete - unlink( $file ) unless( $CONFIG{'keep-tgz'} ); + unlink($file) unless ( $CONFIG{ 'keep-tgz' } ); } } @@ -222,10 +222,10 @@ my @required = qw/ alien rpm wget /; - foreach my $file ( @required ) + foreach my $file (@required) { - if ( ( ! -x "/bin/$file" ) && - ( ! -x "/usr/bin/$file" ) ) + if ( ( !-x "/bin/$file" ) && + ( !-x "/usr/bin/$file" ) ) { print "The following (required) binary appears to be missing:\n"; print "\t" . $file . "\n"; @@ -255,34 +255,29 @@ # Parse options. # GetOptions( - # Main options - "directory=s", \$CONFIG{'directory'}, - # misc options - "keep-rpm", \$CONFIG{'keep-rpm'}, - "keep-tgz", \$CONFIG{'keep-tgz'}, - - # Help options - "help", \$HELP, - "manual", \$MANUAL, - "verbose", \$CONFIG{'verbose'}, - "version", \$VERSION + # Main options + "directory=s", \$CONFIG{ 'directory' }, + + # misc options + "keep-rpm", \$CONFIG{ 'keep-rpm' }, + "keep-tgz", \$CONFIG{ 'keep-tgz' }, + + # Help options + "help", \$HELP, + "manual", \$MANUAL, + "verbose", \$CONFIG{ 'verbose' }, + "version", \$VERSION - ); + ); pod2usage(1) if $HELP; - pod2usage(-verbose => 2 ) if $MANUAL; + pod2usage( -verbose => 2 ) if $MANUAL; - if ( $VERSION ) + if ($VERSION) { - my $REVISION = '$Revision: 1.6 $'; - if ( $REVISION =~ /1.([0-9.]+) / ) - { - $REVISION = $1; - } - - print( "rinse-unpack release $RELEASE - CVS: $REVISION\n" ); + print("rinse-unpack release $RELEASE\n"); exit; } } | ||
[+] | Changed | rinse-1.9.1.tar.gz/etc/centos-4.packages ^ |
@@ -77,4 +77,5 @@ udev util-linux yum +yum-metadata-parser zlib | ||
[+] | Changed | rinse-1.9.1.tar.gz/etc/centos-5.packages ^ |
@@ -1,6 +1,6 @@ # # Packages which we'll need to download for a minimal installation -# CentOS 5.0 +# CentOS 5.6 # @@ -19,6 +19,7 @@ device-mapper e2fsprogs elfutils-libelf +e2fsprogs-libs ethtool expat filesystem @@ -53,6 +54,8 @@ ncurses neon net-tools +nss +nspr openssl pam pcre @@ -61,8 +64,10 @@ psmisc python python-elementtree +python-libs python-sqlite python-urlgrabber +python-iniparse readline rpm rpm-libs @@ -77,4 +82,5 @@ udev util-linux yum +yum-metadata-parser zlib | ||
[+] | Added | rinse-1.9.1.tar.gz/etc/centos-6.packages ^ |
@@ -0,0 +1,112 @@ +# +# packages which we will need to download for a minimal installation for +# CentOS 6.0 +# + +MAKEDEV +upstart +audit-libs +basesystem +bash +binutils +bzip2-libs +chkconfig +cracklib +cracklib-dicts +crontabs +coreutils +db4 +device-mapper +e2fsprogs +e2fsprogs-libs +elfutils-libelf +ethtool +expat +file-libs +filesystem +findutils +gawk +gdbm +glib2 +glibc +glibc-common +grep +info +initscripts +iputils +keyutils-libs +krb5-libs +libacl +libattr +libcap +libcom_err +libgcc +libidn +libselinux +libsepol +libstdc++ +libsysfs +libgcrypt +libnih +dbus-libs +libcurl +lua +compat-libtermcap +libutempter +libxml2 +libxml2-python +logrotate +m2crypto +mcstrans +mingetty +mlocate +module-init-tools +ncurses +ncurses-libs +neon +net-tools +nss +nss-sysinit +nss-softokn +nss-softokn-freebl +openldap +libssh2 +cyrus-sasl-lib +nss-util +nspr +openssl +pam +passwd +libuser +pcre +popt +procps +psmisc +python +python-libs +python-pycurl +python-iniparse +python-urlgrabber +readline +rpm +rpm-libs +rpm-python +sed +setup +shadow-utils +centos-release +sqlite +rsyslog +tzdata +udev +util-linux-ng +xz +xz-libs +yum +yum-plugin-fastestmirror +yum-plugin-keys +yum-plugin-protect-packages +yum-plugin-protectbase +yum-metadata-parser +yum-utils +zlib | ||
[+] | Added | rinse-1.9.1.tar.gz/etc/fedora-core-10.packages ^ |
@@ -0,0 +1,106 @@ +audit-libs +basesystem +bash +bzip2-libs +chkconfig +compat-db45 +ConsoleKit-libs +coreutils +cpio +cracklib +cracklib-dicts +crontabs +cyrus-sasl-lib +db4 +dbus +dbus-libs +device-mapper +device-mapper-libs +dhclient +dirmngr +e2fsprogs +e2fsprogs-libs +elfutils-libelf +ethtool +expat +fedora-release +fedora-release-notes +file +file-libs +filesystem +findutils +gamin +gawk +gdbm +glib2 +glibc +glibc-common +gnupg2 +gpgme +grep +info +initscripts +iproute +iputils +keyutils-libs +krb5-libs +libacl +libattr +libcap +libcurl +libgcc +libgcrypt +libgpg-error +libidn +libksba +libselinux +libsepol +libstdc++ +libusb +libvolume_id +libxml2 +linux-atm-libs +logrotate +lua +MAKEDEV +mingetty +module-init-tools +ncurses +ncurses-base +ncurses-libs +net-tools +nspr +nss +openldap +openssl +pam +passwd +pcre +pinentry +popt +procps +psmisc +pth +pygpgme +python +python-iniparse +python-libs +python-urlgrabber +readline +rpm +rpm-libs +rpm-python +rsyslog +sed +setup +shadow-utils +sqlite +sysvinit-tools +tzdata +udev +upstart +util-linux-ng +vim-minimal +yum +yum-metadata-parser +zlib | ||
[+] | Added | rinse-1.9.1.tar.gz/etc/fedora-core-9.packages ^ |
@@ -0,0 +1,103 @@ +audit-libs +basesystem +bash +bzip2-libs +chkconfig +ConsoleKit-libs +coreutils +cpio +cracklib +cracklib-dicts +crontabs +cyrus-sasl-lib +db4 +dbus +dbus-libs +device-mapper +device-mapper-libs +dhclient +dirmngr +e2fsprogs +e2fsprogs-libs +elfutils-libelf +ethtool +event-compat-sysv +expat +fedora-release +fedora-release-notes +filesystem +findutils +gamin +gawk +gdbm +glib2 +glibc +glibc-common +gnupg2 +gpgme +grep +info +initscripts +iproute +iputils +keyutils-libs +krb5-libs +libacl +libattr +libcap +libcurl +libgcc +libgcrypt +libgpg-error +libidn +libksba +libselinux +libsepol +libstdc++ +libsysfs +libusb +libvolume_id +libxml2 +linux-atm-libs +logrotate +MAKEDEV +mingetty +module-init-tools +ncurses +ncurses-base +ncurses-libs +net-tools +nspr +nss +openldap +openssl +pam +pcre +pinentry +popt +procps +psmisc +pth +pygpgme +python +python-iniparse +python-libs +python-urlgrabber +readline +rpm +rpm-libs +rpm-python +rsyslog +sed +setup +shadow-utils +sqlite +sysvinit-tools +tzdata +udev +upstart +util-linux-ng +vim-minimal +yum +yum-metadata-parser +zlib | ||
[+] | Added | rinse-1.9.1.tar.gz/etc/opensuse-10.1.packages ^ |
@@ -0,0 +1,93 @@ +# +# Packages which we'll need to download for a minimal installation +# OpenSuSE 10.1 +# + + +aaa_base +audit-libs +bash +boost +bzip2 +coreutils +cpio +cracklib +curl +cyrus-sasl +db +dbus-1 +dbus-1-glib +device-mapper +diffutils +dirmngr +e2fsprogs +ethtool +expat +filesystem +fillup +findutils +gawk +gdbm +glib2 +glibc +gpg2 +grep +gzip +hal +info +insserv +krb5 +libacl +libattr +libcom_err +libicu +libgcc +libgcrypt +libgpg-error +libidn +libksba +libnscd +libreiserfs +libstdc++ +libusb +libxcrypt +libxml2 +libxml2-python +libzio +libzypp +mingetty +module-init-tools +ncurses +neon +net-tools +openldap2-client +openslp +pam +pam-modules +parted +pciutils +pcre +perl +permissions +pinentry +pmtools +popt +procps +psmisc +pwdutils +python +python-elementtree +python-sqlite +python-urlgrabber +rpm +rpm-python +sed +setserial +sqlite +suse-release +sysvinit +termcap +udev +util-linux +yum +zlib | ||
[+] | Added | rinse-1.9.1.tar.gz/etc/opensuse-10.2.packages ^ |
@@ -0,0 +1,101 @@ +# +# Packages which we'll need to download for a minimal installation +# OpenSuSE 10.2 +# + + +aaa_base +aaa_skel +audit-libs +bash +boost +bzip2 +coreutils +cpio +cracklib +curl +cyrus-sasl +db +dbus-1 +dbus-1-glib +device-mapper +diffutils +dirmngr +e2fsprogs +ethtool +expat +filesystem +fillup +findutils +gawk +gdbm +glib2 +glibc +gpg +gpg2 +grep +gzip +hal +info +insserv +keyutils-libs +krb5 +libacl +libattr +libcom_err +libicu +libgcc41 +libgcrypt +libgpg-error +libidn +libksba +libnscd +libreiserfs +libstdc++41 +libusb +libvolume_id +libxcrypt +libxml2 +libxml2-python +libzio +libzypp +logrotate +mingetty +mktemp +module-init-tools +ncurses +neon +net-tools +openldap2-client +openSUSE-release +openslp +pam +pam-config +pam-modules +parted +pciutils +pcre +perl +permissions +pinentry +pm-utils +pmtools +PolicyKit +popt +procps +psmisc +pwdutils +python +python-urlgrabber +rpm +rpm-python +sed +setserial +sqlite +strace +sysvinit +termcap +udev +util-linux +zlib +zypper | ||
[+] | Added | rinse-1.9.1.tar.gz/etc/opensuse-10.3.packages ^ |
@@ -0,0 +1,105 @@ +# +# Packages which we'll need to download for a minimal installation +# OpenSuSE 10.3 +# + + +aaa_base +audit-libs +bash +boost +bzip2 +ConsoleKit +coreutils +cpio +cracklib +cracklib-dict-small +cyrus-sasl +dbus-1 +dbus-1-glib +device-mapper +diffutils +dirmngr +e2fsprogs +ethtool +expat +filesystem +fillup +findutils +gawk +gdbm +glib2 +glib2-lang +glibc +gpg2 +grep +gzip +hal +info +insserv +keyutils-libs +krb5 +libacl +libattr +libbz2-1 +libcom_err2 +libcurl4 +libdb-4_5 +libexpat1 +libicu +libgcc42 +libgcrypt +libgpg-error +libidn +libksba +libnscd +libopenssl0_9_8 +libreadline5 +libreiserfs +libstdc++42 +libusb +libuuid1 +libvolume_id +libxcrypt +libxml2 +libxml2-python +libzio +libzypp +mingetty +module-init-tools +ncurses +neon +net-tools +openldap2-client +openSUSE-release +openslp +pam +pam-config +pam-modules +parted +pciutils +pcre +perl-base +permissions +pinentry +pm-utils +pmtools +PolicyKit +popt +procps +psmisc +pth +pwdutils +python +python-urlgrabber +rpm +rpm-python +sed +setserial +sqlite +sysvinit +termcap +udev +util-linux +zlib +zypper | ||
[+] | Added | rinse-1.9.1.tar.gz/etc/opensuse-11.0.packages ^ |
@@ -0,0 +1,114 @@ +# +# Packages which we'll need to download for a minimal installation +# OpenSuSE 11.0 +# + + +aaa_base +audit-libs +bash +bzip2 +ConsoleKit +coreutils +coreutils-lang +cpio +cpio-lang +cracklib +cracklib-dict-small +cyrus-sasl +dbus-1 +dbus-1-glib +device-mapper +diffutils +dirmngr +e2fsprogs +ethtool +expat +filesystem +fillup +findutils +gawk +gdbm +glib2 +glib2-lang +glib2-branding-upstream +glibc +gpg2 +gpg2-lang +grep +gzip +hal +info +insserv +keyutils-libs +krb5 +libacl +libattr +libbz2-1 +libcom_err2 +libcurl4 +libdb-4_5 +libexpat1 +libgcc43 +libgcrypt11 +libglib-2_0-0 +libgobject-2_0-0 +libgthread-2_0-0 +libgpg-error0 +libidn +libksba +libncurses5 +libnscd +libopenssl0_9_8 +libreadline5 +libreiserfs +libstdc++43 +libusb +libuuid1 +libvolume_id +libxcrypt +libxml2 +libxml2-python +libzio +libzypp +login +mingetty +module-init-tools +ncurses-utils +neon +net-tools +openldap2-client +openSUSE-release +openslp +pam +pam-config +pam-modules +parted +pciutils +pcre +perl-base +permissions +pinentry +pm-utils +pmtools +PolicyKit +popt +procps +psmisc +pth +pwdutils +python +python-urlgrabber +rpm +rpm-python +satsolver-tools +sed +setserial +sysvinit +termcap +terminfo-base +udev +util-linux +uuid-runtime +zlib +zypper | ||
[+] | Added | rinse-1.9.1.tar.gz/etc/opensuse-11.1.packages ^ |
@@ -0,0 +1,120 @@ +# +# Packages which we'll need to download for a minimal installation +# OpenSuSE 11.1 +# + + +aaa_base +audit-libs +bash +boost-license +bzip2 +ConsoleKit +coreutils +coreutils-lang +cpio +cpio-lang +cracklib +cracklib-dict-small +cyrus-sasl +dbus-1 +dbus-1-glib +device-mapper +diffutils +dirmngr +e2fsprogs +ethtool +expat +filesystem +fillup +findutils +gawk +gdbm +glib2 +glib2-lang +glib2-branding-upstream +glibc +gpg2 +gpg2-lang +grep +gzip +hal +info +insserv +keyutils-libs +krb5 +libacl +libattr +libboost_signals1_36_0 +libbz2-1 +libcom_err2 +libcurl4 +libdb-4_5 +libexpat1 +libgcc43 +libgcrypt11 +libglib-2_0-0 +libgobject-2_0-0 +libgthread-2_0-0 +libgpg-error0 +libidn +libksba +libldap-2_4-2 +libncurses5 +libnscd +libopenssl0_9_8 +libreadline5 +libreiserfs +libselinux1 +libsepol1 +libsmbios2 +libstdc++43 +libusb-0_1-4 +libuuid1 +libvolume_id1 +libxcrypt +libxml2 +libxml2-python +libzio +libzypp +login +mingetty +module-init-tools +ncurses-utils +neon +net-tools +openSUSE-release +openSUSE-release-ftp +openslp +pam +pam-config +pam-modules +parted +pciutils +pcre +perl-base +permissions +pinentry +pm-utils +pmtools +PolicyKit +popt +procps +psmisc +pth +pwdutils +python +python-urlgrabber +rpm +rpm-python +satsolver-tools +sed +setserial +sysvinit +termcap +terminfo-base +udev +util-linux +uuid-runtime +zlib +zypper | ||
[+] | Added | rinse-1.9.1.tar.gz/etc/rhel-5.packages ^ |
@@ -0,0 +1,86 @@ +# +# Packages which we'll need to download for a minimal installation +# RHEL 5 +# + + +MAKEDEV +SysVinit +audit-libs +basesystem +bash +beecrypt +bzip2-libs +redhat-release +coreutils +cracklib +cracklib-dicts +db4 +device-mapper +e2fsprogs +elfutils-libelf +e2fsprogs-libs +ethtool +expat +filesystem +findutils +gawk +gdbm +glib2 +glibc +glibc-common +grep +info +initscripts +iproute +iputils +krb5-libs +libacl +libattr +libcap +libgcc +libidn +libselinux +libsepol +libstdc++ +libsysfs +libtermcap +libxml2 +libxml2-python +mcstrans +mingetty +mktemp +module-init-tools +ncurses +neon +net-tools +nss +nspr +openssl +pam +pcre +popt +procps +psmisc +python +python-libs +python-elementtree +python-sqlite +python-urlgrabber +python-iniparse +readline +rpm +rpm-libs +rpm-python +sed +setup +shadow-utils +sqlite +sysklogd +termcap +tzdata +udev +util-linux +yum +yum-metadata-parser +zlib | ||
[+] | Changed | rinse-1.9.1.tar.gz/etc/rinse.conf ^ |
@@ -9,38 +9,92 @@ # +# RedHat Enterprise Linux 5 (RHEL-5) +[rhel-5] +mirror = http://your.mirror.to.rhel5.repository.here/rhel/5/i386/Server/ +mirror.amd64 = http://your.mirror.to.rhel5.repository.here/rhel/5/x86_64/Server/ -[centos-4] -mirror = http://anorien.csc.warwick.ac.uk/mirrors/centOS/4.6/os/i386/CentOS/RPMS/ -mirror.amd64 = http://anorien.csc.warwick.ac.uk/mirrors/CentOS/4.6/os/x86_64/CentOS/RPMS/ +[centos-4] +mirror = http://mirror.bytemark.co.uk/centos/4/os/i386/CentOS/RPMS/ +mirror.amd64 = http://mirror.bytemark.co.uk/centos/4/os/x86_64/CentOS/RPMS/ [centos-5] -mirror = http://anorien.csc.warwick.ac.uk/mirrors/centos/5/os/i386/CentOS/ -mirror.amd64 = http://anorien.csc.warwick.ac.uk/mirrors/centos/5/os/x86_64/CentOS/ +mirror = http://mirror.bytemark.co.uk/centos/5/os/i386/CentOS/ +mirror.amd64 = http://mirror.bytemark.co.uk/centos/5/os/x86_64/CentOS/ + +[centos-6] +mirror = http://mirror.bytemark.co.uk/centos/6/os/i386/Packages/ +mirror.amd64 = http://mirror.bytemark.co.uk/centos/6/os/x86_64/Packages/ + +# Scientific Linux CERN 5 (SLC-5) +[slc-5] +mirror = http://linuxsoft.cern.ch/cern/slc5X/i386/SL/ +mirror.amd64 = http://linuxsoft.cern.ch/cern/slc5X/x86_64/SL/ + +# Scientific Linux CERN 6 (SLC-6) +[slc-6] +mirror = http://linuxsoft.cern.ch/cern/slc6X/i386/SLC/Packages/ +mirror.amd64 = http://linuxsoft.cern.ch/cern/slc6X/x86_64/SLC/Packages/ [fedora-core-4] -mirror = http://ftp.heanet.ie/pub/fedora/linux/core/4/i386/os/Fedora/RPMS/ +mirror = http://ftp.heanet.ie/pub/fedora/linux/core/4/i386/os/Fedora/RPMS/ mirror.amd64 = http://ftp.heanet.ie/pub/fedora/linux/core/4/x86_64/os/Fedora/RPMS/ [fedora-core-5] -mirror = http://ftp.heanet.ie/pub/fedora/linux/core/5/i386/os/Fedora/RPMS/ +mirror = http://ftp.heanet.ie/pub/fedora/linux/core/5/i386/os/Fedora/RPMS/ mirror.amd64 = http://ftp.heanet.ie/pub/fedora/linux/core/5/x86_64/os/Fedora/RPMS/ [fedora-core-6] -mirror = http://ftp.heanet.ie/pub/fedora/linux/core/6/i386/os/Fedora/RPMS/ +mirror = http://ftp.heanet.ie/pub/fedora/linux/core/6/i386/os/Fedora/RPMS/ mirror.amd64 = http://ftp.heanet.ie/pub/fedora/linux/core/6/x86_64/os/Fedora/RPMS/ [fedora-core-7] -mirror = http://mirror.bytemark.co.uk/fedora/linux/releases/7/Fedora/i386/os/Fedora/ -mirror.amd64 = http://mirror.bytemark.co.uk/fedora/linux/releases/7/Fedora/x86_64/os/Fedora/ +mirror = http://ftp.heanet.ie/pub/fedora-archive/fedora/linux/releases/7/Fedora/i386/os/Fedora/ +mirror.amd64 = http://ftp.heanet.ie/pub/fedora-archive/fedora/linux/releases/7/Fedora/x86_64/os/Fedora/ [fedora-core-8] -mirror = http://ftp.heanet.ie/pub/fedora/linux/releases/8/Fedora/i386/os/Packages/ -mirror.amd64 = http://ftp.heanet.ie/pub/fedora/linux/releases/8/Fedora/x86_64/os/Packages/ +mirror = http://ftp.heanet.ie/pub/fedora-archive/fedora/linux/releases/8/Fedora/i386/os/Packages/ +mirror.amd64 = http://ftp.heanet.ie/pub/fedora-archive/fedora/linux/releases/8/Fedora/x86_64/os/Packages/ + + + +[fedora-core-9] +mirror = http://ftp.heanet.ie/pub/fedora-archive/fedora/linux/releases/9/Fedora/i386/os/Packages/ +mirror.amd64 = http://ftp.heanet.ie/pub/fedora-archive/fedora/linux/releases/9/Fedora/x86_64/os/Packages/ + + +[fedora-core-10] +mirror = http://ftp.heanet.ie/pub/fedora-archive/fedora/linux/releases/10/Fedora/i386/os/Packages/ +mirror.amd64 = http://ftp.heanet.ie/pub/fedora-archive/fedora/linux/releases/10/Fedora/x86_64/os/Packages/ + + +[opensuse-10.1] +mirror = http://ftp.hosteurope.de/mirror/ftp.opensuse.org/discontinued/SL-10.1/inst-source/suse/i686/ +mirror.amd64 = http://ftp.hosteurope.de/mirror/ftp.opensuse.org/discontinued/SL-10.1/inst-source/suse/x86_64/ + + +[opensuse-10.2] +mirror = http://download.opensuse.org/distribution/10.2/repo/oss/suse/i686/ +mirror.amd64 = http://download.opensuse.org/distribution/10.2/repo/oss/suse/x86_64/ + + +[opensuse-10.3] +mirror = http://download.opensuse.org/distribution/10.3/repo/oss/suse/i686/ +mirror.amd64 = http://download.opensuse.org/distribution/10.3/repo/oss/suse/x86_64/ + + +[opensuse-11.0] +mirror = http://download.opensuse.org/distribution/11.0/repo/oss/suse/i686/ +mirror.amd64 = http://download.opensuse.org/distribution/11.0/repo/oss/suse/x86_64/ + + +[opensuse-11.1] +mirror = http://download.opensuse.org/distribution/11.1/repo/oss/suse/i686/ +mirror.amd64 = http://download.opensuse.org/distribution/11.1/repo/oss/suse/x86_64/ | ||
[+] | Added | rinse-1.9.1.tar.gz/etc/slc-5.packages ^ |
@@ -0,0 +1,98 @@ +# +# packages which we will need to download for a minimal installation for +# Scientific Linux CERN 5 (http://linux.web.cern.ch/linux/scientific5/) +# + +MAKEDEV +SysVinit +audit-libs +basesystem +bash +binutils +bzip2-libs +chkconfig +cracklib +cracklib-dicts +crontabs +coreutils +db4 +device-mapper +e2fsprogs +e2fsprogs-libs +elfutils-libelf +ethtool +expat +filesystem +findutils +gawk +gdbm +glib2 +glibc +glibc-common +grep +info +initscripts +iputils +keyutils-libs +krb5-libs +libacl +libattr +libcap +libgcc +libidn +libselinux +libsepol +libstdc++ +libsysfs +libtermcap +libutempter +libxml2 +libxml2-python +logrotate +m2crypto +mcstrans +mingetty +mktemp +mlocate +module-init-tools +ncurses +neon +net-tools +nss +nspr +openssl +pam +pcre +popt +procps +psmisc +python +python-libs +python-elementtree +python-sqlite +python-numeric +python-iniparse +python-urlgrabber +readline +rpm +rpm-libs +rpm-python +sed +setup +shadow-utils +sl-release +sqlite +sysklogd +termcap +tzdata +udev +util-linux +yum +yum-conf +yum-fastestmirror +yum-keys +yum-protect-packages +yum-protectbase +yum-metadata-parser +yum-utils +zlib | ||
[+] | Added | rinse-1.9.1.tar.gz/etc/slc-6.packages ^ |
@@ -0,0 +1,112 @@ +# +# packages which we will need to download for a minimal installation for +# Scientific Linux CERN 6 (http://linux.web.cern.ch/linux/scientific6/) +# + +MAKEDEV +upstart +audit-libs +basesystem +bash +binutils +bzip2-libs +chkconfig +cracklib +cracklib-dicts +crontabs +coreutils +db4 +device-mapper +e2fsprogs +e2fsprogs-libs +elfutils-libelf +ethtool +expat +file-libs +filesystem +findutils +gawk +gdbm +glib2 +glibc +glibc-common +grep +info +initscripts +iputils +keyutils-libs +krb5-libs +libacl +libattr +libcap +libcom_err +libgcc +libidn +libselinux +libsepol +libstdc++ +libsysfs +libgcrypt +libnih +dbus-libs +libcurl +lua +compat-libtermcap +libutempter +libxml2 +libxml2-python +logrotate +m2crypto +mcstrans +mingetty +mlocate +module-init-tools +ncurses +ncurses-libs +neon +net-tools +nss +nss-sysinit +nss-softokn +nss-softokn-freebl +openldap +libssh2 +cyrus-sasl-lib +nss-util +nspr +openssl +pam +passwd +libuser +pcre +popt +procps +psmisc +python +python-libs +python-pycurl +python-iniparse +python-urlgrabber +readline +rpm +rpm-libs +rpm-python +sed +setup +shadow-utils +sl-release +sqlite +rsyslog +tzdata +udev +util-linux-ng +xz +xz-libs +yum +yum-plugin-fastestmirror +yum-plugin-keys +yum-plugin-protect-packages +yum-plugin-protectbase +yum-metadata-parser +yum-utils +zlib | ||
[+] | Added | rinse-1.9.1.tar.gz/scripts.common ^ |
+(directory) | ||
[+] | Added | rinse-1.9.1.tar.gz/scripts.common/10-resolv.conf.sh ^ |
@@ -0,0 +1,28 @@ +#!/bin/sh +# +# Ensure the chroot has an /etc/resolv.conf file. +# +# Steve +# -- + + +# +# Get the root of the chroot. +# +prefix=$1 + +# +# Ensure it exists. +# +if [ ! -d "${prefix}" ]; then + echo "Serious error - the named directory doesn't exist." + exit +fi + +echo " Creating resolv.conf" +if [ ! -d "${prefix}/etc/" ]; then + mkdir -p "${prefix}/etc/" +fi + +cp /etc/resolv.conf "${prefix}/etc/" + | ||
[+] | Added | rinse-1.9.1.tar.gz/scripts.common/15-mount-proc.sh ^ |
@@ -0,0 +1,35 @@ +#!/bin/sh +# +# Ensure the chroot has /proc + /sys mounted. +# +# Steve +# -- + + +# +# Get the root of the chroot. +# +prefix=$1 + +# +# Ensure it exists. +# +if [ ! -d "${prefix}" ]; then + echo "Serious error - the named directory doesn't exist." + exit +fi + +# +# Mount /proc + /sys +# +for i in /proc /sys; do + echo " Mounting $i" + if [ ! -d "${prefix}/$i" ]; then + mkdir -p "${prefix}/$i" + fi + + # + # Bind-mount + # + mount -o bind $i ${prefix}/${i} +done \ No newline at end of file | ||
[+] | Added | rinse-1.9.1.tar.gz/scripts.common/20-dev-zero.sh ^ |
@@ -0,0 +1,37 @@ +#!/bin/sh +# +# Ensure the chroot has /dev/zero +# +# Steve +# -- + + +# +# Get the root of the chroot. +# +prefix=$1 + +# +# Ensure it exists. +# +if [ ! -d "${prefix}" ]; then + echo "Serious error - the named directory doesn't exist." + exit +fi + +# +# Ensure we have /dev +# +if [ ! -d "${prefix}/dev" ]; then + mkdir "${prefix}/dev" +fi + + +# +# Create the node +# +echo " Creating devices in /dev" +if [ ! -e "${prefix}/dev/zero" ]; then + mknod -m 666 "${prefix}/dev/zero" c 1 5 +fi + | ||
[+] | Changed | rinse-1.9.1.tar.gz/scripts/centos-4/post-install.sh ^ |
@@ -12,109 +12,13 @@ -# -# 1. Make sure there is a resolv.conf file present, such that -# DNS lookups succeed. -# -echo " Creating resolv.conf" -if [ ! -d "${prefix}/etc/" ]; then - mkdir -p "${prefix}/etc/" -fi -cp /etc/resolv.conf "${prefix}/etc/" - - -# -# 2. Setup yum.conf -# -arch=i386 -if [ $ARCH == "amd64" ] ; then - arch=x86_64 -fi - -cat >>${prefix}/etc/yum.conf <<EOF -[base] -name=CentOS-4.6 - Base -mirrorlist=http://mirrorlist.centos.org/?release=4.6&arch=$arch&repo=os -baseurl=http://mirror.centos.org/centos/4.6/os/$arch/ -gpgcheck=0 -gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-centos4 -priority=1 -protect=1 -enabled=1 - - -#released updates -[update] -name=CentOS-4.6 - Updates -mirrorlist=http://mirrorlist.centos.org/?release=4.6&arch=$arch&repo=updates -baseurl=http://mirror.centos.org/centos/4.6/updates/$arch/ -gpgcheck=0 -gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-centos4 -priority=1 -protect=1 -enabled=1 - -#packages used/produced in the build but not released -[addons] -name=CentOS-4.6 - Addons -mirrorlist=http://mirrorlist.centos.org/?release=4.6&arch=$arch&repo=addons -baseurl=http://mirror.centos.org/centos/4.6/addons/$arch/ -gpgcheck=0 -gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-centos4 -priority=1 -protect=1 - -#additional packages that may be useful -[extras] -name=CentOS-4.6 - Extras -mirrorlist=http://mirrorlist.centos.org/?release=4.6&arch=$arch&repo=extras -baseurl=http://mirror.centos.org/centos/4.6/extras/$arch/ -gpgcheck=0 -gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-centos4 -priority=1 -protect=1 - -#additional packages that extend functionality of existing packages -[centosplus] -name=CentOS-4.6 - Plus -mirrorlist=http://mirrorlist.centos.org/?release=4.6&arch=$arch&repo=centosplus -baseurl=http://mirror.centos.org/centos/4.6/centosplus/$arch/ -gpgcheck=0 -enabled=0 -gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-centos4 -priority=2 -protect=1 - -#contrib - packages by Centos Users -[contrib] -name=CentOS-4.6 - Contrib -mirrorlist=http://mirrorlist.centos.org/?release=4.6&arch=$arch&repo=contrib -baseurl=http://mirror.centos.org/centos/4.6/contrib/$arch/ -gpgcheck=0 -enabled=0 -gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-centos4 -priority=2 -protect=1 - -EOF - - -# -# 4. Run "yum install yum". -# -echo " Mounting /proc" -if [ ! -d "${prefix}/proc" ]; then - mkdir -p "${prefix}/proc" -fi -mount -o bind /proc ${prefix}/proc - echo " Bootstrapping yum" chroot ${prefix} /usr/bin/yum -y install yum passwd 2>/dev/null chroot ${prefix} /usr/bin/yum -y install vim-minimal dhclient 2>/dev/null # -# 4.5 make 'passwd' work. +# make 'passwd' work. # echo " Authfix" chroot ${prefix} /usr/bin/yum -y install authconfig @@ -122,11 +26,12 @@ # -# 5. Clean up +# Clean up # echo " Cleaning up" chroot ${prefix} /usr/bin/yum clean all umount ${prefix}/proc +umount ${prefix}/sys # | ||
[+] | Changed | rinse-1.9.1.tar.gz/scripts/centos-5/post-install.sh ^ |
@@ -10,21 +10,12 @@ exit fi +# rpm's can now be removed +rm -f ${prefix}/*.rpm - -# -# 1. Make sure there is a resolv.conf file present, such that -# DNS lookups succeed. # -echo " Creating resolv.conf" -if [ ! -d "${prefix}/etc/" ]; then - mkdir -p "${prefix}/etc/" -fi -cp /etc/resolv.conf "${prefix}/etc/" - - +# BUGFIX: # -# 3.5 BUGFIX: echo "BUGFIX" mkdir -p ${prefix}/usr/lib/python2.4/site-packages/urlgrabber.skx for i in ${prefix}/usr/lib/python2.4/site-packages/urlgrabber/keepalive.*; do @@ -32,22 +23,13 @@ done # +# Run "yum install yum". # -# 4. Run "yum install yum". -# -echo " Mounting /proc" -if [ ! -d "${prefix}/proc" ]; then - mkdir -p "${prefix}/proc" -fi -mount -o bind /proc ${prefix}/proc - echo " Bootstrapping yum" -chroot ${prefix} /usr/bin/yum -y install yum 2>/dev/null -chroot ${prefix} /usr/bin/yum -y install vim-minimal 2>/dev/null -chroot ${prefix} /usr/bin/yum -y install dhclient 2>/dev/null +chroot ${prefix} /usr/bin/yum -y install yum vim-minimal dhclient 2>/dev/null # -# 4.5 make 'passwd' work. +# make 'passwd' work. # echo " Authfix" chroot ${prefix} /usr/bin/yum -y install authconfig @@ -59,14 +41,17 @@ echo " Cleaning up" chroot ${prefix} /usr/bin/yum clean all umount ${prefix}/proc +umount ${prefix}/sys # # 6. Remove the .rpm files from the prefix root. # echo " Final tidy..." -for i in ${prefix}/*.rpm; do - rm -f $i -done find ${prefix} -name '*.rpmorig' -delete find ${prefix} -name '*.rpmnew' -delete + +# Install modprobe +if [ -e "${prefix}/etc/modprobe.d/modprobe.conf.dist" ]; then + cp "${prefix}/etc/modprobe.d/modprobe.conf.dist" "${prefix}/etc/modprobe.conf" +fi | ||
[+] | Added | rinse-1.9.1.tar.gz/scripts/centos-6 ^ |
+(directory) | ||
[+] | Added | rinse-1.9.1.tar.gz/scripts/centos-6/post-install.sh ^ |
@@ -0,0 +1,31 @@ +#!/bin/sh +# +# post-install.sh +# CentOS 6 + +prefix=$1 + +if [ ! -d "${prefix}" ]; then + echo "Serious error - the named directory doesn't exist." + exit +fi + +# rpm's can now be removed +rm -f ${prefix}/*.rpm + +touch ${prefix}/etc/mtab + +echo " Bootstrapping yum" +chroot ${prefix} /usr/bin/yum -y install yum vim-minimal dhclient 2>/dev/null + +echo " cleaning up..." +chroot ${prefix} /usr/bin/yum clean all +umount ${prefix}/proc +umount ${prefix}/sys + +# Install modprobe +if [ -e "${prefix}/etc/modprobe.d/modprobe.conf.dist" ]; then + cp "${prefix}/etc/modprobe.d/modprobe.conf.dist" "${prefix}/etc/modprobe.conf" +fi + +echo " post-install.sh : done." | ||
[+] | Added | rinse-1.9.1.tar.gz/scripts/fedora-core-10 ^ |
+(directory) | ||
[+] | Added | rinse-1.9.1.tar.gz/scripts/fedora-core-10/post-install.sh ^ |
@@ -0,0 +1,97 @@ +#!/bin/sh +# +# Customise the distribution post-install. +# + + + +prefix=$1 + +if [ ! -d "${prefix}" ]; then + echo "Serious error - the named directory doesn't exist." + exit +fi + + +# +# 2. Copy the cached .RPM files into the yum directory, so that +# yum doesn't need to make them again. +# +echo " Setting up YUM cache" +if [ ! -d ${prefix}/var/cache/yum/core/packages/ ]; then + mkdir -p ${prefix}/var/cache/yum/core/packages/ +fi +if [ ! -d ${prefix}/var/cache/yum/updates-released/packages/ ]; then + mkdir -p ${prefix}/var/cache/yum/updates-released/packages/ +fi + +for i in ${prefix}/*.rpm ; do + cp $i ${prefix}/var/cache/yum/core/packages/ + cp $i ${prefix}/var/cache/yum/updates-released/packages/ +done + + + +# +# 3. Ensure that Yum has a working configuration file. +# +arch=i386 +if [ $ARCH = "amd64" ] ; then + arch=x86_64 +fi + +echo " Creating yum.conf" +cat > ${prefix}/etc/yum.conf <<EOF +[main] +cachedir=/var/cache/yum +debuglevel=1 +reposdir=/dev/null +logfile=/var/log/yum.log +retries=20 +obsoletes=1 +gpgcheck=0 +assumeyes=1 + +# repos + +[core] +name=core +baseurl=$mirror + +EOF + + +# +# 4. Run "yum install yum". +# +echo " Priming the yum cache" +if [ ! -d "${prefix}/var/cache/yum/core/packages/" ]; then + mkdir -p ${prefix}/var/cache/yum/core/packages +fi +cp /var/cache/rinse/fedora-core-9.$ARCH/* ${prefix}/var/cache/yum/core/packages/ + +echo " Bootstrapping yum" +chroot ${prefix} /sbin/ldconfig +chroot ${prefix} /usr/bin/yum -y install yum 2>/dev/null +chroot ${prefix} /usr/bin/yum -y install vim-minimal 2>/dev/null +chroot ${prefix} /usr/bin/yum -y install dhclient 2>/dev/null + + +# +# 5. Clean up +# +echo " Cleaning up" +chroot ${prefix} /usr/bin/yum clean all +umount ${prefix}/proc +umount ${prefix}/sys + + +# +# 6. Remove the .rpm files from the prefix root. +# +echo " Final tidy..." +for i in ${prefix}/*.rpm; do + rm -f $i +done +find ${prefix} -name '*.rpmorig' -delete +find ${prefix} -name '*.rpmnew' -delete | ||
[+] | Changed | rinse-1.9.1.tar.gz/scripts/fedora-core-4/post-install.sh ^ |
@@ -12,19 +12,6 @@ exit fi - - -# -# 1. Make sure there is a resolv.conf file present, such that -# DNS lookups succeed. -# -echo " Creating resolv.conf" -if [ ! -d "${prefix}/etc/" ]; then - mkdir -p "${prefix}/etc/" -fi -cp /etc/resolv.conf "${prefix}/etc/" - - # # 2. Copy the cached .RPM files into the yum directory, so that # yum doesn't need to make them again. @@ -48,7 +35,7 @@ # 3. Ensure that Yum has a working configuration file. # arch=i386 -if [ $ARCH == "amd64" ] ; then +if [ $ARCH = "amd64" ] ; then arch=x86_64 fi @@ -79,12 +66,6 @@ # # 4. Run "yum install yum". # -echo " Mounting /proc" -if [ ! -d "${prefix}/proc" ]; then - mkdir -p "${prefix}/proc" -fi -mount -o bind /proc ${prefix}/proc - echo " Bootstrapping yum" chroot ${prefix} /sbin/ldconfig chroot ${prefix} /usr/bin/yum -y install yum 2>/dev/null @@ -105,7 +86,7 @@ # 6. Remove the .rpm files from the prefix root. # echo " Final tidy..." -for i in ${prefix}/*.rpm; do +for i in ${prefix}/*.rpm; do rm -f $i done find ${prefix} -name '*.rpmorig' -delete | ||
[+] | Changed | rinse-1.9.1.tar.gz/scripts/fedora-core-5/post-install.sh ^ |
@@ -15,17 +15,6 @@ # -# 1. Make sure there is a resolv.conf file present, such that -# DNS lookups succeed. -# -echo " Creating resolv.conf" -if [ ! -d "${prefix}/etc/" ]; then - mkdir -p "${prefix}/etc/" -fi -cp /etc/resolv.conf "${prefix}/etc/" - - -# # 2. Copy the cached .RPM files into the yum directory, so that # yum doesn't need to make them again. # @@ -48,7 +37,7 @@ # 3. Ensure that Yum has a working configuration file. # arch=i386 -if [ $ARCH == "amd64" ] ; then +if [ $ARCH = "amd64" ] ; then arch=x86_64 fi @@ -79,14 +68,8 @@ # # 4. Run "yum install yum". # -echo " Mounting /proc" -if [ ! -d "${prefix}/proc" ]; then - mkdir -p "${prefix}/proc" -fi -mount -o bind /proc ${prefix}/proc - echo " Bootstrapping yum" -chroot ${prefix} /sbin/ldconfig +chroot ${prefix} /sbin/ldconfig chroot ${prefix} /usr/bin/yum -y install yum 2>/dev/null chroot ${prefix} /usr/bin/yum -y install vim-minimal 2>/dev/null chroot ${prefix} /usr/bin/yum -y install dhclient 2>/dev/null @@ -98,14 +81,22 @@ echo " Cleaning up" chroot ${prefix} /usr/bin/yum clean all umount ${prefix}/proc +umount ${prefix}/sys # # 6. Remove the .rpm files from the prefix root. # echo " Final tidy..." -for i in ${prefix}/*.rpm; do +for i in ${prefix}/*.rpm; do rm -f $i done find ${prefix} -name '*.rpmorig' -delete find ${prefix} -name '*.rpmnew' -delete + + +if [ -e "${prefix}/etc/modprobe.d/modprobe.conf.dist" ]; then + cp "${prefix}/etc/modprobe.d/modprobe.conf.dist" "${prefix}/etc/modprobe.conf" +fi + + | ||
[+] | Changed | rinse-1.9.1.tar.gz/scripts/fedora-core-6/post-install.sh ^ |
@@ -15,17 +15,6 @@ # -# 1. Make sure there is a resolv.conf file present, such that -# DNS lookups succeed. -# -echo " Creating resolv.conf" -if [ ! -d "${prefix}/etc/" ]; then - mkdir -p "${prefix}/etc/" -fi -cp /etc/resolv.conf "${prefix}/etc/" - - -# # 2. Copy the cached .RPM files into the yum directory, so that # yum doesn't need to make them again. # @@ -48,7 +37,7 @@ # 3. Ensure that Yum has a working configuration file. # arch=i386 -if [ $ARCH == "amd64" ] ; then +if [ $ARCH = "amd64" ] ; then arch=x86_64 fi @@ -79,14 +68,8 @@ # # 4. Run "yum install yum". # -echo " Mounting /proc" -if [ ! -d "${prefix}/proc" ]; then - mkdir -p "${prefix}/proc" -fi -mount -o bind /proc ${prefix}/proc - echo " Bootstrapping yum" -chroot ${prefix} /sbin/ldconfig +chroot ${prefix} /sbin/ldconfig chroot ${prefix} /usr/bin/yum -y install yum 2>/dev/null chroot ${prefix} /usr/bin/yum -y install vim-minimal 2>/dev/null chroot ${prefix} /usr/bin/yum -y install dhclient 2>/dev/null @@ -97,15 +80,15 @@ # echo " Cleaning up" chroot ${prefix} /usr/bin/yum clean all - umount ${prefix}/proc +umount ${prefix}/sys # # 6. Remove the .rpm files from the prefix root. # echo " Final tidy..." -for i in ${prefix}/*.rpm; do +for i in ${prefix}/*.rpm; do rm -f $i done find ${prefix} -name '*.rpmorig' -delete | ||
[+] | Changed | rinse-1.9.1.tar.gz/scripts/fedora-core-7/post-install.sh ^ |
@@ -13,18 +13,6 @@ fi - -# -# 1. Make sure there is a resolv.conf file present, such that -# DNS lookups succeed. -# -echo " Creating resolv.conf" -if [ ! -d "${prefix}/etc/" ]; then - mkdir -p "${prefix}/etc/" -fi -cp /etc/resolv.conf "${prefix}/etc/" - - # # 2. Copy the cached .RPM files into the yum directory, so that # yum doesn't need to make them again. @@ -48,7 +36,7 @@ # 3. Ensure that Yum has a working configuration file. # arch=i386 -if [ $ARCH == "amd64" ] ; then +if [ $ARCH = "amd64" ] ; then arch=x86_64 fi @@ -68,25 +56,19 @@ [core] name=core -baseurl=http://mirror.bytemark.co.uk/fedora/linux/releases/7/Fedora/$arch/os +baseurl=$mirror [updates-released] name=updates -baseurl=http://mirror.bytemark.co.uk/fedora/linux/releases/7/Fedora/$arch/os +baseurl=$mirror EOF # # 4. Run "yum install yum". # -echo " Mounting /proc" -if [ ! -d "${prefix}/proc" ]; then - mkdir -p "${prefix}/proc" -fi -mount -o bind /proc ${prefix}/proc - echo " Bootstrapping yum" -chroot ${prefix} /sbin/ldconfig +chroot ${prefix} /sbin/ldconfig chroot ${prefix} /usr/bin/yum -y install yum 2>/dev/null chroot ${prefix} /usr/bin/yum -y install vim-minimal 2>/dev/null chroot ${prefix} /usr/bin/yum -y install dhclient 2>/dev/null @@ -97,15 +79,15 @@ # echo " Cleaning up" chroot ${prefix} /usr/bin/yum clean all - umount ${prefix}/proc +umount ${prefix}/sys # # 6. Remove the .rpm files from the prefix root. # echo " Final tidy..." -for i in ${prefix}/*.rpm; do +for i in ${prefix}/*.rpm; do rm -f $i done find ${prefix} -name '*.rpmorig' -delete | ||
[+] | Changed | rinse-1.9.1.tar.gz/scripts/fedora-core-8/post-install.sh ^ |
@@ -13,18 +13,6 @@ fi - -# -# 1. Make sure there is a resolv.conf file present, such that -# DNS lookups succeed. -# -echo " Creating resolv.conf" -if [ ! -d "${prefix}/etc/" ]; then - mkdir -p "${prefix}/etc/" -fi -cp /etc/resolv.conf "${prefix}/etc/" - - # # 2. Copy the cached .RPM files into the yum directory, so that # yum doesn't need to make them again. @@ -48,7 +36,7 @@ # 3. Ensure that Yum has a working configuration file. # arch=i386 -if [ $ARCH == "amd64" ] ; then +if [ $ARCH = "amd64" ] ; then arch=x86_64 fi @@ -68,25 +56,25 @@ [core] name=core -baseurl=http://mirror.bytemark.co.uk/fedora/linux/releases/8/Fedora/$arch/os +baseurl=$mirror [updates-released] name=updates -baseurl=http://mirror.bytemark.co.uk/fedora/linux/releases/8/Fedora/$arch/os +baseurl=$mirror EOF # # 4. Run "yum install yum". # -echo " Mounting /proc" -if [ ! -d "${prefix}/proc" ]; then - mkdir -p "${prefix}/proc" +echo " Priming the yum cache" +if [ ! -d "${prefix}/var/cache/yum/core/packages/" ]; then + mkdir -p ${prefix}/var/cache/yum/core/packages fi -mount -o bind /proc ${prefix}/proc +cp /var/cache/rinse/fedora-core-8.$ARCH/* ${prefix}/var/cache/yum/core/packages/ echo " Bootstrapping yum" -chroot ${prefix} /sbin/ldconfig +chroot ${prefix} /sbin/ldconfig chroot ${prefix} /usr/bin/yum -y install yum 2>/dev/null chroot ${prefix} /usr/bin/yum -y install vim-minimal 2>/dev/null chroot ${prefix} /usr/bin/yum -y install dhclient 2>/dev/null @@ -97,15 +85,15 @@ # echo " Cleaning up" chroot ${prefix} /usr/bin/yum clean all - umount ${prefix}/proc +umount ${prefix}/sys # # 6. Remove the .rpm files from the prefix root. # echo " Final tidy..." -for i in ${prefix}/*.rpm; do +for i in ${prefix}/*.rpm; do rm -f $i done find ${prefix} -name '*.rpmorig' -delete | ||
[+] | Added | rinse-1.9.1.tar.gz/scripts/fedora-core-9 ^ |
+(directory) | ||
[+] | Added | rinse-1.9.1.tar.gz/scripts/fedora-core-9/post-install.sh ^ |
@@ -0,0 +1,97 @@ +#!/bin/sh +# +# Customise the distribution post-install. +# + + + +prefix=$1 + +if [ ! -d "${prefix}" ]; then + echo "Serious error - the named directory doesn't exist." + exit +fi + + +# +# 2. Copy the cached .RPM files into the yum directory, so that +# yum doesn't need to make them again. +# +echo " Setting up YUM cache" +if [ ! -d ${prefix}/var/cache/yum/core/packages/ ]; then + mkdir -p ${prefix}/var/cache/yum/core/packages/ +fi +if [ ! -d ${prefix}/var/cache/yum/updates-released/packages/ ]; then + mkdir -p ${prefix}/var/cache/yum/updates-released/packages/ +fi + +for i in ${prefix}/*.rpm ; do + cp $i ${prefix}/var/cache/yum/core/packages/ + cp $i ${prefix}/var/cache/yum/updates-released/packages/ +done + + + +# +# 3. Ensure that Yum has a working configuration file. +# +arch=i386 +if [ $ARCH = "amd64" ] ; then + arch=x86_64 +fi + +echo " Creating yum.conf" +cat > ${prefix}/etc/yum.conf <<EOF +[main] +cachedir=/var/cache/yum +debuglevel=1 +reposdir=/dev/null +logfile=/var/log/yum.log +retries=20 +obsoletes=1 +gpgcheck=0 +assumeyes=1 + +# repos + +[core] +name=core +baseurl=$mirror + +EOF + + +# +# 4. Run "yum install yum". +# +echo " Priming the yum cache" +if [ ! -d "${prefix}/var/cache/yum/core/packages/" ]; then + mkdir -p ${prefix}/var/cache/yum/core/packages +fi +cp /var/cache/rinse/fedora-core-9.$ARCH/* ${prefix}/var/cache/yum/core/packages/ + +echo " Bootstrapping yum" +chroot ${prefix} /sbin/ldconfig +chroot ${prefix} /usr/bin/yum -y install yum 2>/dev/null +chroot ${prefix} /usr/bin/yum -y install vim-minimal 2>/dev/null +chroot ${prefix} /usr/bin/yum -y install dhclient 2>/dev/null + + +# +# 5. Clean up +# +echo " Cleaning up" +chroot ${prefix} /usr/bin/yum clean all +umount ${prefix}/proc +umount ${prefix}/sys + + +# +# 6. Remove the .rpm files from the prefix root. +# +echo " Final tidy..." +for i in ${prefix}/*.rpm; do + rm -f $i +done +find ${prefix} -name '*.rpmorig' -delete +find ${prefix} -name '*.rpmnew' -delete | ||
[+] | Added | rinse-1.9.1.tar.gz/scripts/opensuse-10.1 ^ |
+(directory) | ||
[+] | Added | rinse-1.9.1.tar.gz/scripts/opensuse-10.1/post-install.sh ^ |
@@ -0,0 +1,101 @@ +#!/bin/sh +# +# Customise the distribution post-install. +# + + + +prefix=$1 + +if [ ! -d "${prefix}" ]; then + echo "Serious error - the named directory doesn't exist." + exit +fi + + +# +# 2. Copy the cached .RPM files into the yum directory, so that +# yum doesn't need to make them again. +# +echo " Setting up YUM cache" +if [ ! -d ${prefix}/var/cache/yum/core/packages/ ]; then + mkdir -p ${prefix}/var/cache/yum/core/packages/ +fi +if [ ! -d ${prefix}/var/cache/yum/updates-released/packages/ ]; then + mkdir -p ${prefix}/var/cache/yum/updates-released/packages/ +fi + +for i in ${prefix}/*.rpm ; do + cp $i ${prefix}/var/cache/yum/core/packages/ + cp $i ${prefix}/var/cache/yum/updates-released/packages/ +done + + + +# +# 3. Ensure that Yum has a working configuration file. +# +arch=i386 +if [ $ARCH = "amd64" ] ; then + arch=x86_64 +fi + +echo " Creating yum.conf" +cat > ${prefix}/etc/yum.conf <<EOF +[main] +cachedir=/var/cache/yum +debuglevel=1 +reposdir=/dev/null +logfile=/var/log/yum.log +retries=20 +obsoletes=1 +gpgcheck=0 +assumeyes=1 + +# repos + +[core] +name=core +baseurl=$(dirname ${mirror}) + +[updates-released] +name=updates +baseurl=$(dirname ${mirror}) +EOF + + +# +# 4. Run "yum install yum". +# +echo " Priming the yum cache" +if [ ! -d "${prefix}/var/cache/yum/core/packages/" ]; then + mkdir -p ${prefix}/var/cache/yum/core/packages +fi +cp ${cache_dir}/${dist}.${ARCH}/* ${prefix}/var/cache/yum/core/packages/ + +echo " Bootstrapping yum" +chroot ${prefix} /sbin/ldconfig +chroot ${prefix} /usr/bin/yum -y install yum 2>/dev/null +chroot ${prefix} /usr/bin/yum -y install vim-minimal 2>/dev/null +chroot ${prefix} /usr/bin/yum -y install dhclient 2>/dev/null +chroot ${prefix} /usr/bin/yum -y update 2>/dev/null + + +# +# 5. Clean up +# +echo " Cleaning up" +chroot ${prefix} /usr/bin/yum clean all +umount ${prefix}/proc +umount ${prefix}/sys + + +# +# 6. Remove the .rpm files from the prefix root. +# +echo " Final tidy..." +for i in ${prefix}/*.rpm; do + rm -f $i +done +find ${prefix} -name '*.rpmorig' -delete +find ${prefix} -name '*.rpmnew' -delete | ||
[+] | Added | rinse-1.9.1.tar.gz/scripts/opensuse-10.2 ^ |
+(directory) | ||
[+] | Added | rinse-1.9.1.tar.gz/scripts/opensuse-10.2/post-install.sh ^ |
@@ -0,0 +1,74 @@ +#!/bin/sh +# +# Customise the distribution post-install. +# + +prefix=$1 + +if [ ! -d "${prefix}" ]; then + echo "Serious error - the named directory doesn't exist." + exit +fi + +# +# 2. Copy the cached .RPM files into the zypper directory, so that +# zypper doesn't need to fetch them again. +# +echo " Setting up zypper cache" + +if [ ! -d "${prefix}/var/cache/zypp/packages/opensuse/suse/${arch}" ]; then + mkdir -p ${prefix}/var/cache/zypp/packages/opensuse/suse/${arch} +fi +cp ${cache_dir}/${dist}.${ARCH}/* ${prefix}/var/cache/zypp/packages/opensuse/suse/${arch} + + +# +# 3. Ensure that zypper has a working configuration file. +# +arch=i386 +if [ $ARCH = "amd64" ] ; then + arch=x86_64 +fi + +echo " Creating zypper repo entry" +[ -d "${prefix}/etc/zypp/repos.d" ] || mkdir -p ${prefix}/etc/zypp/repos.d +cat > ${prefix}/etc/zypp/repos.d/${dist}.repo <<EOF +[opensuse] +name=${dist} +baseurl=$(dirname $(dirname ${mirror})) +enabled=1 +gpgcheck=1 + +EOF + + +# +# 4. Run "zypper install zypper". +# +# FIXME - Figure out a better way to bootstrap/prime zypper so it doesn't take so long +echo " Bootstrapping zypper - this will take some time!" +chroot ${prefix} /sbin/ldconfig +chroot ${prefix} /bin/sh -c "/usr/bin/yes | /usr/bin/zypper sa $(dirname $(dirname ${mirror})) ${dist}" +chroot ${prefix} /bin/sh -c "/usr/bin/yes | /usr/bin/zypper install zypper" 2>/dev/null +chroot ${prefix} /bin/sh -c "/usr/bin/yes | /usr/bin/zypper install vim-minimal" 2>/dev/null +chroot ${prefix} /bin/sh -c "/usr/bin/yes | /usr/bin/zypper install dhclient" 2>/dev/null +chroot ${prefix} /bin/sh -c "/usr/bin/yes | /usr/bin/zypper update" 2>/dev/null + + +# +# 5. Clean up +# +echo " Cleaning up" +rm -f ${prefix}/var/cache/zypp/packages/opensuse/suse/${arch}/*.rpm +umount ${prefix}/proc +umount ${prefix}/sys + + +# +# 6. Remove the .rpm files from the prefix root. +# +echo " Final tidy..." +rm -f ${prefix}/*.rpm + +find ${prefix} -name '*.rpmorig' -delete +find ${prefix} -name '*.rpmnew' -delete | ||
[+] | Added | rinse-1.9.1.tar.gz/scripts/opensuse-10.3 ^ |
+(directory) | ||
[+] | Added | rinse-1.9.1.tar.gz/scripts/opensuse-10.3/post-install.sh ^ |
@@ -0,0 +1,74 @@ +#!/bin/sh +# +# Customise the distribution post-install. +# + +prefix=$1 + +if [ ! -d "${prefix}" ]; then + echo "Serious error - the named directory doesn't exist." + exit +fi + + +# +# 2. Copy the cached .RPM files into the zypper directory, so that +# zypper doesn't need to fetch them again. +# +echo " Setting up zypper cache" + +if [ ! -d "${prefix}/var/cache/zypp/packages/opensuse/suse/${arch}" ]; then + mkdir -p ${prefix}/var/cache/zypp/packages/opensuse/suse/${arch} +fi +cp ${cache_dir}/${dist}.${ARCH}/* ${prefix}/var/cache/zypp/packages/opensuse/suse/${arch} + + +# +# 3. Ensure that zypper has a working configuration file. +# +arch=i386 +if [ $ARCH = "amd64" ] ; then + arch=x86_64 +fi + +echo " Creating zypper repo entry" +[ -d "${prefix}/etc/zypp/repos.d" ] || mkdir -p ${prefix}/etc/zypp/repos.d +cat > ${prefix}/etc/zypp/repos.d/${dist}.repo <<EOF +[opensuse] +name=${dist} +baseurl=$(dirname $(dirname ${mirror})) +enabled=1 +gpgcheck=1 + +EOF + + +# +# 4. Run "zypper install zypper". +# +echo " Bootstrapping zypper" +chroot ${prefix} /sbin/ldconfig +chroot ${prefix} /usr/bin/zypper -n --no-gpg-checks install zypper 2>/dev/null +chroot ${prefix} /usr/bin/zypper -n --no-gpg-checks install vim-minimal 2>/dev/null +chroot ${prefix} /usr/bin/zypper -n --no-gpg-checks install dhclient 2>/dev/null +chroot ${prefix} /usr/bin/zypper -n --no-gpg-checks update 2>/dev/null + + +# +# 5. Clean up +# +echo " Cleaning up" +rm -f ${prefix}/var/cache/zypp/packages/opensuse/suse/${arch}/*.rpm +umount ${prefix}/proc +umount ${prefix}/sys + + +# +# 6. Remove the .rpm files from the prefix root. +# +echo " Final tidy..." +for i in ${prefix}/*.rpm; do + rm -f $i +done +find ${prefix} -name '*.rpmorig' -delete +find ${prefix} -name '*.rpmnew' -delete | ||
[+] | Added | rinse-1.9.1.tar.gz/scripts/opensuse-11.0 ^ |
+(directory) | ||
[+] | Added | rinse-1.9.1.tar.gz/scripts/opensuse-11.0/post-install.sh ^ |
@@ -0,0 +1,73 @@ +#!/bin/sh +# +# Customise the distribution post-install. +# + +prefix=$1 + +if [ ! -d "${prefix}" ]; then + echo "Serious error - the named directory doesn't exist." + exit +fi + +# +# 2. Copy the cached .RPM files into the zypper directory, so that +# zypper doesn't need to fetch them again. +# +echo " Setting up zypper cache" + +if [ ! -d "${prefix}/var/cache/zypp/packages/opensuse/suse/${arch}" ]; then + mkdir -p ${prefix}/var/cache/zypp/packages/opensuse/suse/${arch} +fi +cp ${cache_dir}/${dist}.${ARCH}/* ${prefix}/var/cache/zypp/packages/opensuse/suse/${arch} + + +# +# 3. Ensure that zypper has a working configuration file. +# +arch=i386 +if [ $ARCH = "amd64" ] ; then + arch=x86_64 +fi + +echo " Creating zypper repo entry" +[ -d "${prefix}/etc/zypp/repos.d" ] || mkdir -p ${prefix}/etc/zypp/repos.d +cat > ${prefix}/etc/zypp/repos.d/${dist}.repo <<EOF +[opensuse] +name=${dist} +baseurl=$(dirname $(dirname ${mirror})) +enabled=1 +gpgcheck=1 + +EOF + + +# +# 4. Run "zypper install zypper". +# +echo " Bootstrapping zypper" +chroot ${prefix} /sbin/ldconfig +chroot ${prefix} /usr/bin/zypper -n --no-gpg-checks install zypper 2>/dev/null +chroot ${prefix} /usr/bin/zypper -n --no-gpg-checks install vim-minimal 2>/dev/null +chroot ${prefix} /usr/bin/zypper -n --no-gpg-checks install dhclient 2>/dev/null +chroot ${prefix} /usr/bin/zypper -n --no-gpg-checks update 2>/dev/null + + +# +# 5. Clean up +# +echo " Cleaning up" +chroot ${prefix} /usr/bin/zypper clean +umount ${prefix}/proc +umount ${prefix}/sys + + +# +# 6. Remove the .rpm files from the prefix root. +# +echo " Final tidy..." +for i in ${prefix}/*.rpm; do + rm -f $i +done +find ${prefix} -name '*.rpmorig' -delete +find ${prefix} -name '*.rpmnew' -delete | ||
[+] | Added | rinse-1.9.1.tar.gz/scripts/opensuse-11.1 ^ |
+(directory) | ||
[+] | Added | rinse-1.9.1.tar.gz/scripts/opensuse-11.1/post-install.sh ^ |
@@ -0,0 +1,73 @@ +#!/bin/sh +# +# Customise the distribution post-install. +# + +prefix=$1 + +if [ ! -d "${prefix}" ]; then + echo "Serious error - the named directory doesn't exist." + exit +fi + +# +# 2. Copy the cached .RPM files into the zypper directory, so that +# zypper doesn't need to fetch them again. +# +echo " Setting up zypper cache" + +if [ ! -d "${prefix}/var/cache/zypp/packages/opensuse/suse/${arch}" ]; then + mkdir -p ${prefix}/var/cache/zypp/packages/opensuse/suse/${arch} +fi +cp ${cache_dir}/${dist}.${ARCH}/* ${prefix}/var/cache/zypp/packages/opensuse/suse/${arch} + + +# +# 3. Ensure that zypper has a working configuration file. +# +arch=i386 +if [ $ARCH = "amd64" ] ; then + arch=x86_64 +fi + +echo " Creating zypper repo entry" +[ -d "${prefix}/etc/zypp/repos.d" ] || mkdir -p ${prefix}/etc/zypp/repos.d +cat > ${prefix}/etc/zypp/repos.d/${dist}.repo <<EOF +[opensuse] +name=${dist} +baseurl=$(dirname $(dirname ${mirror})) +enabled=1 +gpgcheck=1 + +EOF + + +# +# 4. Run "zypper install zypper". +# +echo " Bootstrapping zypper" +chroot ${prefix} /sbin/ldconfig +chroot ${prefix} /usr/bin/zypper -n --no-gpg-checks install zypper 2>/dev/null +chroot ${prefix} /usr/bin/zypper -n --no-gpg-checks install vim-minimal 2>/dev/null +chroot ${prefix} /usr/bin/zypper -n --no-gpg-checks install dhclient 2>/dev/null +chroot ${prefix} /usr/bin/zypper -n --no-gpg-checks update 2>/dev/null + + +# +# 5. Clean up +# +echo " Cleaning up" +chroot ${prefix} /usr/bin/zypper clean +umount ${prefix}/proc +umount ${prefix}/sys + + +# +# 6. Remove the .rpm files from the prefix root. +# +echo " Final tidy..." +for i in ${prefix}/*.rpm; do + rm -f $i +done +find ${prefix} -name '*.rpmorig' -delete +find ${prefix} -name '*.rpmnew' -delete | ||
[+] | Added | rinse-1.9.1.tar.gz/scripts/rhel-5 ^ |
+(directory) | ||
[+] | Added | rinse-1.9.1.tar.gz/scripts/rhel-5/post-install.sh ^ |
@@ -0,0 +1,68 @@ +#!/bin/sh +# +# + + +prefix=$1 + +if [ ! -d "${prefix}" ]; then + echo "Serious error - the named directory doesn't exist." + exit +fi + +# rpm's can now be removed +rm -f ${prefix}/*.rpm + +# +# 1. Make sure there is a resolv.conf file present, such that +# DNS lookups succeed. +# +echo " Creating resolv.conf" +if [ ! -d "${prefix}/etc/" ]; then + mkdir -p "${prefix}/etc/" +fi +cp /etc/resolv.conf "${prefix}/etc/" + + +# +# BUGFIX: +# +echo "BUGFIX" +mkdir -p ${prefix}/usr/lib/python2.4/site-packages/urlgrabber.skx +for i in ${prefix}/usr/lib/python2.4/site-packages/urlgrabber/keepalive.*; do + mv $i ${prefix}/usr/lib/python2.4/site-packages/urlgrabber.skx/ +done + +# +# Run "yum install yum". +# +echo " Mounting /proc" +if [ ! -d "${prefix}/proc" ]; then + mkdir -p "${prefix}/proc" +fi +mount -o bind /proc ${prefix}/proc + +echo " Bootstrapping yum" +chroot ${prefix} /usr/bin/yum -y install yum vim-minimal dhclient 2>/dev/null + +# +# make 'passwd' work. +# +echo " Authfix" +chroot ${prefix} /usr/bin/yum -y install authconfig +chroot ${prefix} /usr/bin/authconfig --enableshadow --update + +# +# 5. Clean up +# +echo " Cleaning up" +chroot ${prefix} /usr/bin/yum clean all +umount ${prefix}/proc + + +# +# 6. Remove the .rpm files from the prefix root. +# +echo " Final tidy..." +find ${prefix} -name '*.rpmorig' -delete +find ${prefix} -name '*.rpmnew' -delete | ||
[+] | Added | rinse-1.9.1.tar.gz/scripts/slc-5 ^ |
+(directory) | ||
[+] | Added | rinse-1.9.1.tar.gz/scripts/slc-5/post-install.sh ^ |
@@ -0,0 +1,31 @@ +#!/bin/sh +# +# post-install.sh +# Scientific Linux CERN (SLC5) + +prefix=$1 + +if [ ! -d "${prefix}" ]; then + echo "Serious error - the named directory doesn't exist." + exit +fi + +# rpm's can now be removed +rm -f ${prefix}/*.rpm + +touch ${prefix}/etc/mtab + +echo " Bootstrapping yum" +chroot ${prefix} /usr/bin/yum -y install yum vim-minimal dhclient 2>/dev/null + +echo " cleaning up..." +chroot ${prefix} /usr/bin/yum clean all +umount ${prefix}/proc +umount ${prefix}/sys + +# Install modprobe +if [ -e "${prefix}/etc/modprobe.d/modprobe.conf.dist" ]; then + cp "${prefix}/etc/modprobe.d/modprobe.conf.dist" "${prefix}/etc/modprobe.conf" +fi + +echo " post-install.sh : done." | ||
[+] | Added | rinse-1.9.1.tar.gz/scripts/slc-6 ^ |
+(directory) | ||
[+] | Added | rinse-1.9.1.tar.gz/scripts/slc-6/post-install.sh ^ |
@@ -0,0 +1,31 @@ +#!/bin/sh +# +# post-install.sh +# Scientific Linux CERN (SLC-6) + +prefix=$1 + +if [ ! -d "${prefix}" ]; then + echo "Serious error - the named directory doesn't exist." + exit +fi + +# rpm's can now be removed +rm -f ${prefix}/*.rpm + +touch ${prefix}/etc/mtab + +echo " Bootstrapping yum" +chroot ${prefix} /usr/bin/yum -y install yum vim-minimal dhclient 2>/dev/null + +echo " cleaning up..." +chroot ${prefix} /usr/bin/yum clean all +umount ${prefix}/proc +umount ${prefix}/sys + +# Install modprobe +if [ -e "${prefix}/etc/modprobe.d/modprobe.conf.dist" ]; then + cp "${prefix}/etc/modprobe.d/modprobe.conf.dist" "${prefix}/etc/modprobe.conf" +fi + +echo " post-install.sh : done." | ||
[+] | Changed | rinse-1.9.1.tar.gz/tests/modules.sh ^ |
@@ -29,6 +29,6 @@ do \ echo "BEGIN{ use_ok( '$i' ); }"; \ echo "require_ok( '$i' );" ; \ - echo -e "\n" ; \ + printf "\n" ; \ done | ||
[+] | Changed | rinse-1.9.1.tar.gz/tests/test-trailing-whitespace.t ^ |
@@ -17,7 +17,6 @@ my $dir = undef; $dir = "./bin/" if ( -d "./bin/" ); -$dir = "../bin/" if ( -d "../bin/" ); plan skip_all => "No bin directory found" if (!defined( $dir ) ); | ||
[+] | Added | rinse-1.9.1.tar.gz/tests/urls.t ^ |
@@ -0,0 +1,46 @@ +#!/usr/bin/perl -w +# +# Test that our URLs are "neat" +# +# Steve +# -- + + +use strict; +use Test::More qw( no_plan ); + + + +# +# Find the file +# +my $file = undef; + +foreach my $f ( qw! ../etc/rinse.conf ./etc/rinse.conf ! ) +{ + $file = $f if ( -e $f ); +} + +ok( $file, "Found configuration file" ); + + +# +# Open the file +# +open( FILE, "<", $file ) or die "Failed to open $file - $!"; + +foreach my $line ( <FILE> ) +{ + next if ( !$line ); + chomp( $line ); + + if( my ( $key , $val ) = split( /=/, $line ) ) + { + next if ( !$val ); + $val =~ s!http://!!g; + + ok( $val !~ /\/\//, "URL is neat: $val" ); + } +} + +close ( FILE ); |