You can subscribe to this list here.
2006 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
(3) |
Dec
|
---|---|---|---|---|---|---|---|---|---|---|---|---|
2007 |
Jan
|
Feb
|
Mar
(4) |
Apr
(6) |
May
|
Jun
|
Jul
(1) |
Aug
(2) |
Sep
(13) |
Oct
(8) |
Nov
|
Dec
(1) |
2008 |
Jan
|
Feb
(2) |
Mar
(1) |
Apr
(3) |
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: <ar...@sy...> - 2008-04-12 11:17:29
|
Author: arighi Date: 2008-04-12 06:17:21 -0500 (Sat, 12 Apr 2008) New Revision: 716 Modified: trunk/Makefile.PL Log: allow to build systemconfigurator deb package as non-privileged user with fakeroot Modified: trunk/Makefile.PL =================================================================== --- trunk/Makefile.PL 2008-04-12 11:16:04 UTC (rev 715) +++ trunk/Makefile.PL 2008-04-12 11:17:21 UTC (rev 716) @@ -18,7 +18,7 @@ deb :: deb_prep dist \tmkdir -p /tmp/scdeb -\tmv systemconfigurator-$version.tar.gz /tmp/scdeb && cd /tmp/scdeb && tar -xvzf systemconfigurator-$version.tar.gz && cd systemconfigurator-$version && dpkg-buildpackage && rm -rf /tmp/scdeb/systemconfigurator-$version +\tmv systemconfigurator-$version.tar.gz /tmp/scdeb && cd /tmp/scdeb && tar -xvzf systemconfigurator-$version.tar.gz && cd systemconfigurator-$version && dpkg-buildpackage -rfakeroot && rm -rf /tmp/scdeb/systemconfigurator-$version \techo "Debian Packages have been built in /tmp/scdeb" rpm_prep :: |
From: <ar...@sy...> - 2008-04-12 11:16:25
|
Author: arighi Date: 2008-04-12 06:16:04 -0500 (Sat, 12 Apr 2008) New Revision: 715 Modified: trunk/Makefile.PL Log: correctly clean-up debian bak files with make realclean Modified: trunk/Makefile.PL =================================================================== --- trunk/Makefile.PL 2008-04-12 11:12:25 UTC (rev 714) +++ trunk/Makefile.PL 2008-04-12 11:16:04 UTC (rev 715) @@ -69,5 +69,5 @@ 'PREREQ_PM' => { AppConfig => 1.52, }, - 'realclean' => {FILES => "*.old *.bak *.tar.gz *.yml *.spec Makefile MANIFEST"}, + 'realclean' => {FILES => "*.old *.bak debian/*.bak *.tar.gz *.yml *.spec Makefile MANIFEST"}, ); |
From: <ar...@sy...> - 2008-04-12 11:12:35
|
Author: arighi Date: 2008-04-12 06:12:25 -0500 (Sat, 12 Apr 2008) New Revision: 714 Modified: trunk/lib/SCConfig.pm Log: - do not check if ROOTDEV exists in the running system systemconfigurator can be used to configure a client for autoinstall by si_updateclient (SystemImager). In this case ROOTDEV must be set to /dev/ram (known by BOEL or UYOK) even if this device doesn't exist in some distributions (like Ubuntu/Debian). See also: http://trac.systemimager.org/ticket/20 Moreover, in general, systemconfigurator could also be used at the end of imaging to setup a root device different from the device detected during the auto-installation (see sda/hda naming issue). In all these cases checking if ROOTDEV exists simply leads to errors. Bug reported by: Walter Tautz <wt...@cs...> Modified: trunk/lib/SCConfig.pm =================================================================== --- trunk/lib/SCConfig.pm 2008-03-05 15:58:29 UTC (rev 713) +++ trunk/lib/SCConfig.pm 2008-04-12 11:12:25 UTC (rev 714) @@ -285,13 +285,6 @@ my $boot_rootdev = $config->get('boot_rootdev'); my $boot_bootdev = $config->get('boot_bootdev'); - unless ( ($boot_rootdev) && ($boot_rootdev =~ /^UUID|^LABEL/) ) { - if ( $boot_rootdev && ! -e $boot_rootdev ) { - print("ROOTDEV $boot_rootdev under [BOOT] does not exist, please check your systemconfigurator config\n"); - exit 1; - } - } - unless ( ($boot_bootdev) && ($boot_bootdev =~ /^UUID|^LABEL/) ) { if ( $boot_bootdev && ! -e $boot_bootdev ) { print("BOOTDEV $boot_bootdev under [BOOT] does not exist, please check your systemconfigurator config\n"); |
From: <ar...@sy...> - 2008-03-05 15:58:39
|
Author: arighi Date: 2008-03-05 09:58:29 -0600 (Wed, 05 Mar 2008) New Revision: 713 Modified: trunk/lib/Initrd/Debian.pm Log: - support update-initramfs included in recent Debian/Ubuntu distributions to generate/refresh initial ramdisks Modified: trunk/lib/Initrd/Debian.pm =================================================================== --- trunk/lib/Initrd/Debian.pm 2008-02-04 16:53:08 UTC (rev 712) +++ trunk/lib/Initrd/Debian.pm 2008-03-05 15:58:29 UTC (rev 713) @@ -32,10 +32,14 @@ sub footprint { my $class = shift; - my $exe = "/usr/sbin/mkinitrd"; - my $debconf = "/etc/mkinitrd/mkinitrd.conf"; - if(-f $exe && -e $debconf) { - return 1; + my @exe = ('/usr/sbin/mkinitrd', + '/usr/sbin/update-initramfs'); + my @debconf = ('/etc/mkinitrd/mkinitrd.conf', + '/etc/initramfs-tools/update-initramfs.conf'); + for (my $i = 0; $i < $#exe + 1; $i++) { + if(-f $exe[$i] && -e $debconf[$i]) { + return 1; + } } return 0; } @@ -44,8 +48,14 @@ my ($class, $kernel) = @_; my $version = kernel_version($kernel); my $outfile = initrd_file($version); - - my $cmd = "mkinitrd -o $outfile /lib/modules/$version"; + + my $cmd; + if (-f '/usr/sbin/update-initramfs') { + $cmd = "/usr/sbin/update-initramfs -k $version -u"; + } else { + $cmd = "mkinitrd -o $outfile /lib/modules/$version"; + } + my $rc = system($cmd); if($rc != 0) { carp("Debian style ramdisk generation failed."); |
From: <ef...@sy...> - 2008-02-04 16:53:18
|
Author: efocht Date: 2008-02-04 10:53:08 -0600 (Mon, 04 Feb 2008) New Revision: 712 Modified: trunk/CHANGELOG trunk/Makefile.PL trunk/debian/changelog trunk/debian/control trunk/sc.spec.in Log: Added version and changelog info for tagging 2.2.12-1. Modified: trunk/CHANGELOG =================================================================== --- trunk/CHANGELOG 2008-02-04 15:53:03 UTC (rev 711) +++ trunk/CHANGELOG 2008-02-04 16:53:08 UTC (rev 712) @@ -1,5 +1,52 @@ +- 2.2.12-1 Jan 04 2008 Erich Focht + - creating device.map for grub only if not existing. Otherwise using old one. + * Thu Nov 29 2007 Bernard Li <be...@va...> + - Updated URL links (sisuite.org domain has expired) + +- 2.2.11-1 Nov 08 2007 Erich Focht + - allowing now UUID and LABEL devices + - fixed check for grub + +- 2.2.10-2 Oct 22 2007 Erich Focht + - added kboot support for PS3 + - sanity checking of devices (by Bernard) + - version 2.2.10-2 + +- 2.2.9 Apr 22 2007 Erich Focht + * Fri Mar 30 2007 Erich Focht + - Added debian support which was in the OSCAR pkgsrc repository, provided + by Geoffroy Vallee. Also added an extension of the syntax for supporting + xen virtual machines. + * Mon Mar 26 2007 Erich Focht + - Added scconf-tool, a tool for querying and manipulating the + /etc/systemconfig/systemconfig.conf file from shell scripts. + - Added scconf-bootinfo, a helper tool for detecting boot information. + Used by the kexec boot method of systemimager. + +- 2.2.7-12ef Mar 21 2007 Erich Focht + - Patches to bring systemconfigurator to the level of the version included + into OSCAR 5.0 (sc-2.2.7-12ef). In order to avoid confusion, updating the + version number to 2.2.8-1. Changes are listed below: + * Wed Oct 25 2006 Erich Focht] + - fixing issue with unknown additional scsi device (oscar bug #274). + * Fri Sep 15 2006 Erich Focht + - locating "env" with "which". Path to env is different in SuSE and RedHat. + * Wed Aug 23 2006 Erich Focht + - added check for --no-floppy support of grub (RHEL3 doesn't support it) + - made functions in Grub.pm more OO. Needed for storing "nofloppy" capability + centrally, in the object instance. + * Mon Aug 07 2006 Erich Focht + - added --no-floppy to grub calls as suggested by Andrea Righi. + * Mon Jul 17 2006 Erich Focht + - added <HOSTID>, <HOSTID+nnn> and <HOSTID-nnn> hostname dependent + variable replacement (in the global APPEND block of the BOOT section). + + * Fri Nov 24 2006 Erich Focht <ef...@hp...> + - first step in merging with changes from the OSCAR tree + - changes correspond to systemconfigurator distributed with OSCAR 4.2 + - 2.2.2 Mar 26 2005 - * added kernel version detection patch from Erik Jacobson + * added kernel version detection patch from Erich Focht * updated hardware detection module * support modprobe.conf for 2.6 kernels * 2.2.0 & 2.2.1 never released as they were test cuts for Modified: trunk/Makefile.PL =================================================================== --- trunk/Makefile.PL 2008-02-04 15:53:03 UTC (rev 711) +++ trunk/Makefile.PL 2008-02-04 16:53:08 UTC (rev 712) @@ -5,7 +5,7 @@ # Version is set here globally so we can be more tricky with it ### -my $version = '2.2.11'; +my $version = '2.2.12'; sub MY::postamble { my $string = <<EOF; Modified: trunk/debian/changelog =================================================================== --- trunk/debian/changelog 2008-02-04 15:53:03 UTC (rev 711) +++ trunk/debian/changelog 2008-02-04 16:53:08 UTC (rev 712) @@ -1,3 +1,9 @@ +systemconfigurator (2.2.12-1) unstable; urgency=low + + * rebuilding device.map only if not existing, otherwise using old one. + + -- Erich Focht <ef...@hp...> Mon, 04 Jan 2008 17:00:00 +0100 + systemconfigurator (2.2.11-1) unstable; urgency=low * allowing UUID and LABEL device names Modified: trunk/debian/control =================================================================== --- trunk/debian/control 2008-02-04 15:53:03 UTC (rev 711) +++ trunk/debian/control 2008-02-04 16:53:08 UTC (rev 712) @@ -3,7 +3,7 @@ Priority: optional Maintainer: Erich Focht <ef...@hp...> Build-Depends: debhelper (>= 4.0.0), perl, libappconfig-perl -Standards-Version: 2.2.10 +Standards-Version: 2.2.12 Package: systemconfigurator Architecture: all Modified: trunk/sc.spec.in =================================================================== --- trunk/sc.spec.in 2008-02-04 15:53:03 UTC (rev 711) +++ trunk/sc.spec.in 2008-02-04 16:53:08 UTC (rev 712) @@ -66,6 +66,8 @@ %dir /usr/lib/systemconfig %changelog +* Mon Jan 04 2008 Erich Focht -> 2.2.12-1 +- creating device.map for grub only if not existing. Otherwise using old one. * Thu Nov 29 2007 Bernard Li <be...@va...> - Updated URL links (sisuite.org domain has expired) * Thu Nov 08 2007 Erich Focht -> 2.2.11-1 |
From: <ef...@sy...> - 2008-02-04 15:53:12
|
Author: efocht Date: 2008-02-04 09:53:03 -0600 (Mon, 04 Feb 2008) New Revision: 711 Modified: trunk/lib/Boot/Grub.pm Log: Modified grub setup: if a device.map file exists in the image, it will be used for the grub-install step. If no device.map exists, it will be created by "grub-install --recheck". The behavior before this change was to allways create a device.map file. This leads to problems if the machine has many SCSI devices attached. On a setup with two internal disks and 12 external LUNs the detection of the internal disks failed and the installation of grub didn't succeed. Modified: trunk/lib/Boot/Grub.pm =================================================================== --- trunk/lib/Boot/Grub.pm 2007-12-17 22:53:25 UTC (rev 710) +++ trunk/lib/Boot/Grub.pm 2008-02-04 15:53:03 UTC (rev 711) @@ -250,6 +250,8 @@ verbose("Device: $dev; Part: $part"); $biosdev = $DEVICE_MAP->{$dev}; verbose("Biosdev: $biosdev"); + croak("Bios device could not be detected for $dev. Edit device.map manually!") + if !$biosdev; if ($part) { # grub 0 orders things my $biospart = $part - 1; @@ -267,39 +269,49 @@ sub device_map { my $this = shift; my $device_map = {}; - - my $file = "/tmp/grub.devices"; - if(-e $file) { - unlink $file; - } + my $file; - my $backup; - if (-f "/etc/mtab") { - copy("/etc/mtab","/etc/mtab.sc"); - $backup = 1; + if (-e "/boot/grub/device.map") { + + $file = "/boot/grub/device.map"; + verbose("using old, existing device map file $file"); + + } else { + + $file = "/tmp/grub.devices"; + if (-e $file) { + unlink $file; + } + + my $backup; + if (-f "/etc/mtab") { + copy("/etc/mtab","/etc/mtab.sc"); + $backup = 1; + } + copy("/proc/mounts","/etc/mtab") + or croak("Couldn't copy /proc/mounts. Is /proc mounted?"); + my $cmd = "$$this{grub} $$this{nofloppy} --batch --device-map=$file < /dev/null > /dev/null"; + my $err = system($cmd); + if ($backup) { + move("/etc/mtab.sc","/etc/mtab"); + } + croak("Couldn't run $cmd") if $err; + + verbose("generated device map file $file"); } - copy("/proc/mounts","/etc/mtab") - or croak("Couldn't copy /proc/mounts. Is /proc mounted?"); - my $cmd = "$$this{grub} $$this{nofloppy} --batch --device-map=$file < /dev/null > /dev/null"; - my $err = system($cmd); - if ($backup) { - move("/etc/mtab.sc","/etc/mtab"); - } - croak("Couldn't run $cmd") if $err; - verbose("generated device map file $file"); - open(IN,"<$file"); - while(<IN>) { - my ($grub, $real) = split; - $real = devfs_lookup($real); - $real =~ s{/dev/}{}; - verbose("$real => $grub"); - $device_map->{$real} = $grub; + my ($grub, $real) = split; + $real = devfs_lookup($real); + $real =~ s{/dev/}{}; + verbose("$real => $grub"); + $device_map->{$real} = $grub; } close(IN); - unlink $file; + if ($file ne "/boot/grub/device.map") { + unlink $file; + } return $device_map; } @@ -355,7 +367,7 @@ my $this = shift; my $bootpart = $this->find_boot_part(); - my $cmd = "$$this{bootloader_exe} $$this{nofloppy} --recheck $bootpart"; + my $cmd = "$$this{bootloader_exe} $$this{nofloppy} $bootpart"; my $devicemap = "/boot/grub/device.map"; # Create an empty device.map file to suppress warning message @@ -363,6 +375,7 @@ # is executed and /boot/grub/device.map does not exist (i.e. during imaging) if ( ! -e $devicemap ) { system("touch $devicemap"); + $cmd = "$$this{bootloader_exe} $$this{nofloppy} --recheck $bootpart"; } verbose("calling $cmd\n"); |
From: <ef...@sy...> - 2007-12-17 22:53:34
|
Author: efocht Date: 2007-12-17 16:53:25 -0600 (Mon, 17 Dec 2007) New Revision: 710 Added: tags/sc_2.2.11-1/ Log: The missing tag for sc-2.2.11-1. No idea how I could forget this :-/ As Geoffroy noticed, some things may be wrong with the debian changelog of this version. Copied: tags/sc_2.2.11-1 (from rev 708, trunk) |
From: <ef...@sy...> - 2007-10-22 15:42:50
|
Author: efocht Date: 2007-10-22 10:42:41 -0500 (Mon, 22 Oct 2007) New Revision: 702 Added: tags/sc-2.2.10-2/ Log: Tag for version 2.2.10-2. Copied: tags/sc-2.2.10-2 (from rev 701, trunk) |
From: <ef...@sy...> - 2007-10-22 15:40:39
|
Author: efocht Date: 2007-10-22 10:40:29 -0500 (Mon, 22 Oct 2007) New Revision: 701 Modified: trunk/debian/changelog trunk/sc.spec.in Log: Fixed debian version in debian/changelog. Updated release nr to 2: -> 2.2.10-2. Modified: trunk/debian/changelog =================================================================== --- trunk/debian/changelog 2007-10-16 12:26:53 UTC (rev 700) +++ trunk/debian/changelog 2007-10-22 15:40:29 UTC (rev 701) @@ -1,3 +1,10 @@ +systemconfigurator (2.2.10-2) unstable; urgency=low + + * added ps3 kboot support + * sanity checking config file (added by Bernard) + + -- Erich Focht <ef...@hp...> Mon, 22 Oct 2007 17:45:25 +0100 + systemconfigurator (2.2.9-1) unstable; urgency=low [ Geoffroy Vallee ] @@ -6,10 +13,6 @@ [ Erich Focht ] * Updated copyright info. * Updated maintainer info. - * Tue Oct 16 2007 Erich Focht - - added ps3 kboot support - - sanity checking config file (added by Bernard) - - version 2.2.10 tag/release * Mon Apr 22 2007 Erich Focht - version 2.2.9 tag/release * Fri Mar 30 2007 Erich Focht Modified: trunk/sc.spec.in =================================================================== --- trunk/sc.spec.in 2007-10-16 12:26:53 UTC (rev 700) +++ trunk/sc.spec.in 2007-10-22 15:40:29 UTC (rev 701) @@ -3,7 +3,7 @@ Summary: System Configurator Name: systemconfigurator Version: @VERSION@ -Release: 1 +Release: 2 License: GPL URL: http://systemconfig.sourceforge.net Group: Applications/System @@ -66,6 +66,10 @@ %dir /usr/lib/systemconfig %changelog +* Mon Oct 22 2007 Erich Focht +- added kboot support for PS3 +- sanity checking of devices (by Bernard) +- version 2.2.10-2 * Mon Apr 22 2007 Erich Focht - version 2.2.9 tag/release * Fri Mar 30 2007 Erich Focht |
From: <ef...@sy...> - 2007-10-16 12:43:15
|
Author: efocht Date: 2007-10-16 07:26:53 -0500 (Tue, 16 Oct 2007) New Revision: 700 Modified: trunk/debian/changelog trunk/debian/control Log: Updated version info for debian Modified: trunk/debian/changelog =================================================================== --- trunk/debian/changelog 2007-10-15 13:50:56 UTC (rev 699) +++ trunk/debian/changelog 2007-10-16 12:26:53 UTC (rev 700) @@ -6,6 +6,10 @@ [ Erich Focht ] * Updated copyright info. * Updated maintainer info. + * Tue Oct 16 2007 Erich Focht + - added ps3 kboot support + - sanity checking config file (added by Bernard) + - version 2.2.10 tag/release * Mon Apr 22 2007 Erich Focht - version 2.2.9 tag/release * Fri Mar 30 2007 Erich Focht Modified: trunk/debian/control =================================================================== --- trunk/debian/control 2007-10-15 13:50:56 UTC (rev 699) +++ trunk/debian/control 2007-10-16 12:26:53 UTC (rev 700) @@ -3,7 +3,7 @@ Priority: optional Maintainer: Erich Focht <ef...@hp...> Build-Depends: debhelper (>= 4.0.0), perl, libappconfig-perl -Standards-Version: 2.2.9 +Standards-Version: 2.2.10 Package: systemconfigurator Architecture: all |
From: <ef...@sy...> - 2007-10-15 13:51:08
|
Author: efocht Date: 2007-10-15 08:50:56 -0500 (Mon, 15 Oct 2007) New Revision: 699 Added: tags/sc_2.2.10/ Log: Tag for systemconfigurator version 2.2.10. Copied: tags/sc_2.2.10 (from rev 698, trunk) |
From: <ef...@sy...> - 2007-10-15 13:47:15
|
Author: efocht Date: 2007-10-15 08:47:07 -0500 (Mon, 15 Oct 2007) New Revision: 698 Modified: trunk/lib/Boot/Kboot.pm Log: Added Id and Revision keyword prpoperty to svn. Property changes on: trunk/lib/Boot/Kboot.pm ___________________________________________________________________ Name: svn:keywords + Revision Id |
From: <ef...@sy...> - 2007-10-15 13:29:36
|
Author: efocht Date: 2007-10-15 08:29:23 -0500 (Mon, 15 Oct 2007) New Revision: 697 Added: trunk/lib/Boot/Kboot.pm Modified: trunk/lib/Boot.pm Log: Adding support for PS3 kboot. First attempt, no guarantees... Added: trunk/lib/Boot/Kboot.pm =================================================================== --- trunk/lib/Boot/Kboot.pm (rev 0) +++ trunk/lib/Boot/Kboot.pm 2007-10-15 13:29:23 UTC (rev 697) @@ -0,0 +1,254 @@ +package Boot::Kboot; + +# $Header$ + +# Copyright (c) 2007 Erich Focht <ef...@hp...> +# All rights reserved. + +# 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + +=head1 NAME + +Boot::Kboot - Kboot bootloader configuration module. + +=head1 SYNOPSIS + + my $bootloader = new Boot::Kboot(%bootvars); + + if($bootloader->footprint_loader()) { + $bootloader->install_config(); + } + + if($bootloader->footprint_config() && $bootloader->footprint_loader()) { + $boot->install_loader(); + } + + my @fileschanged = $bootloader->files(); + +=cut + +use strict; +use Carp; +use vars qw($VERSION); +use Boot; +use Util::Cmd qw(:all); +use Util::Log qw(:print); + +$VERSION = sprintf("%d", q$Revision$ =~ /(\d+)/); + +push @Boot::boottypes, qw(Boot::Kboot); + +sub new { + my $class = shift; + my %this = ( + root => "", + filesmod => [], + boot_bootdev => "", ### device to which Kboot will be installed + boot_timeout => 50, + boot_rootdev => "", + @_, + default_root => "", + bootloader_exe => "", + platform_t => "", ### platform type identifier + ); + + $this{config_file} = "$this{root}" . "/etc/kboot.conf"; + + ### a PPC hardware? + if (open(PROC,"<$this{root}/proc/cpuinfo")) { + while(<PROC>) { + if(/^platform.*PS3/i) { ### We only support PS3 now. + $this{platform_t} = "ps3"; + last; + } + } + close(PROC); + } else { + ### Cannot open /proc/cpuinfo + verbose("Error opening $this{root}/proc/cpuinfo."); + verbose("If a PPC machine, be sure to have $this{root}/proc/cpuinfo readable."); + verbose("Cannot open $this{root}/proc/cpuinfo.\n"); + } + bless \%this, $class; +} + +=head1 METHODS + +The following methods exist in this module: + +=over 4 + +=item files() + +The files() method is merely an accessor method for the all files +touched by the instance during its run. + +=cut + +sub files { + my $this = shift; + return @{$this->{filesmod}}; +} + +=item footprint_loader() + +This method returns "TRUE" if a kboot.conf file is available. + +=cut + +sub footprint_loader { + my $this = shift; + return (($this->{platform_t}) && (-x $this->{config_file})); +} + +=item footprint_config() + +This method returns "TRUE" if YaBoot config file, i.e. "/etc/yaboot.conf", exists. + +=cut + +sub footprint_config { + my $this = shift; + return -e $this->{config_file}; +} + +=item install_config() + +This method reads the System Configurator's config file and creates YaBoot's +config file, i.e. "/etc/yaboot.conf". + +=cut + +sub install_config { + my $this = shift; + my $extra1 = $this->{boot_extras}; + my $extra2 = $this->{boot_extras2}; + my $extra3 = $this->{boot_extras3}; + + if(!$this->{boot_bootdev}) + { + croak("Error: BOOTDEV must be specified.\n"); + } + if(!$this->{boot_defaultboot}) + { + croak("Error: DEFAULTBOOT must be specified.\n"); + } + + my $file = $this->{root} . "/etc/kboot.conf"; + open(OUT,">$file") or croak("Couldn\'t open $file for writing"); + + print OUT "##################################################\n"; + print OUT "# This file is generated by System Configurator. #\n"; + print OUT "##################################################\n"; + print OUT "\n"; + + print OUT "#----- Global Options -----#\n"; + + ### Specify the root device. + if ($this->{boot_rootdev}) { + print OUT "# Device to be mounted as the root ('/') \n"; + print OUT "root=" . $this->{boot_rootdev} . "\n"; + } + + ### timeout + if ($this->{boot_timeout}) { + print OUT "# The number of seconds to wait before booting. \n"; + print OUT "timeout=" . $this->{boot_timeout}/10 . "\n"; + } + + ### default kernel image to boot with + unless ($this->{boot_defaultboot}) { + croak("Error: default kernel image not specified."); + } + print OUT "# The default kernel image to boot. \n"; + print OUT "default=" . $this->{boot_defaultboot} . "\n"; + + print OUT "$extra1\n" if $extra1 ne ""; + print OUT "$extra2\n" if $extra2 ne ""; + print OUT "$extra3\n" if $extra3 ne ""; + print OUT "\n"; + + foreach my $key (sort keys %$this) { + if ($key =~ /^(kernel\d+)_path/) { + $this->setup_kernel($1,\*OUT); + } + } + + close(OUT); + + push @{$this->{filesmod}}, "$file"; + + ### Indicate that kboot has been successfully installed. + 1; +} + +=item setup_kernel() + +An internal method. +This method sets up a kernel image as specified in the config file. + +=cut + +sub setup_kernel { + my ($this, $image, $outfh) = @_; + + ### If we cannot derive root device for the default boot image, croak. + if ($this->{boot_defaultboot} eq $this->{$image . "_label"}) { + unless ($this->{boot_rootdev} || $this->{$image . "_rootdev"}) { + croak("ROOTDEV cannot be derived for the default boot image.\n"); + } + } + + print $outfh "#------ $image --------#\n"; + print $outfh $this->{$image . "_label"} . "='" . + $this->{$image . "_path"} . " "; + ### Initrd image + if ($this->{$image. "_initrd"}) { + print $outfh "initrd=" . $this->{$image."_initrd"}." "; + } + if ($this->{$image. "_append"}) { + print $outfh $this->{$image."_append"} . " "; + } + if ($this->{boot_append}) { + print $outfh $this->{boot_append} . " "; + } + ### Override global rootdev option? + if ($this->{$image."_rootdev"} && + ($this->{$image."_rootdev"} ne $this->{boot_rootdev})) { + print $outfh "root=" . $this->{$image."_rootdev"} . " ro "; + } + print $outfh "init=/sbin/init'\n"; +} + +sub install_loader { + my $this = shift; + 1; +} + +=back + +=head1 AUTHOR + + Erich Focht <ef...@hp...> + +=head1 SEE ALSO + +L<SystemConfig::Boot>, L<perl> + +=cut + +1; + Modified: trunk/lib/Boot.pm =================================================================== --- trunk/lib/Boot.pm 2007-10-02 22:58:56 UTC (rev 696) +++ trunk/lib/Boot.pm 2007-10-15 13:29:23 UTC (rev 697) @@ -36,6 +36,7 @@ use Boot::Palo; use Boot::Aboot; use Boot::ZIPL; +use Boot::Kboot; use vars qw(@boottypes $VERSION); |
From: <bl...@sy...> - 2007-10-02 22:59:09
|
Author: bli Date: 2007-10-02 17:58:56 -0500 (Tue, 02 Oct 2007) New Revision: 696 Modified: trunk/lib/SCConfig.pm Log: Should also not sanity check config when specifying --help or if no arguments are given Modified: trunk/lib/SCConfig.pm =================================================================== --- trunk/lib/SCConfig.pm 2007-10-02 22:23:38 UTC (rev 695) +++ trunk/lib/SCConfig.pm 2007-10-02 22:58:56 UTC (rev 696) @@ -117,7 +117,7 @@ $config->file(@args); } -unless ($config->nocheck()) { +unless ( $config->nocheck() || $config->help() || $config->confignone() ) { check_config($config, $config->maxkernel); } |
From: <bl...@sy...> - 2007-10-02 22:23:49
|
Author: bli Date: 2007-10-02 17:23:38 -0500 (Tue, 02 Oct 2007) New Revision: 695 Modified: trunk/bin/systemconfigurator trunk/lib/SCConfig.pm trunk/t/01_sysconf0.t trunk/t/01_sysconf1.t trunk/t/01_sysconf2.t trunk/t/boot_aboot.t trunk/t/boot_elilo.t trunk/t/boot_grub.t trunk/t/boot_lilo.t trunk/t/boot_palo.t trunk/t/boot_yaboot.t trunk/t/boot_zipl.t trunk/t/hardware_cm.t trunk/t/hardware_ma.t trunk/t/hardware_mc.t trunk/t/hardware_mc2.t trunk/t/hardware_order.t trunk/t/initrd_01.t trunk/t/networking_interfaces.t trunk/t/networking_lc.t trunk/t/networking_rc.t trunk/t/networking_rn.t trunk/t/z_scbin.t Log: Add sanity checking to systemconfigurator - systemconfigurator will now sanity check the config file prior to execution - this includes checking whether the referenced files/block devices in the config file exists - added --nocheck option so that user can turn this default option off if they desire (dangerous!) - updated all the tests to use --nocheck (because the test config files contain files/block devices that don't actually exist on the build system) Modified: trunk/bin/systemconfigurator =================================================================== --- trunk/bin/systemconfigurator 2007-09-26 00:29:49 UTC (rev 694) +++ trunk/bin/systemconfigurator 2007-10-02 22:23:38 UTC (rev 695) @@ -27,7 +27,7 @@ =head1 SYNOPSIS systemconfigurator [--cfgfile=filename] - [--stdin] [--verbose] [--debug] + [--stdin] [--verbose] [--debug] [--nocheck] [--confignet] [--confighw] [--configrd] [--configboot] [--configtime] [--configuserexit] @@ -58,9 +58,17 @@ Give debugging information about what is happening on STDERR. For the most information, use --verbose and --debug. +=item --nocheck + +Do not sanity check systemconfigurator config file prior to execution of +systemconfigurator. If your configuration references files/block devices +that are not present on the file system, running with this option may +generate a bootloader configuration that will render your operating system +non-bootable. Use with caution. + =item --confignet -Configure networking scripts. This is pretty straight forward and just +configure networking scripts. This is pretty straight forward and just creates the right entries in /etc/sysconfig/network-scripts, /etc/rc.config, or /etc/init.d @@ -477,7 +485,9 @@ --stdin : take config file from STDIN --help : this message --verbose : generate more informational messages to STDERROR - --debug : generate debugging messages to STDERROR + --debug : generate debugging messages to STDERROR + --nocheck : do not sanity check systemconfigurator config file + before execution (dangerous!) --confignet : configure networking --confighw : configure hardware --configrd : configure initial ramdisks Modified: trunk/lib/SCConfig.pm =================================================================== --- trunk/lib/SCConfig.pm 2007-09-26 00:29:49 UTC (rev 694) +++ trunk/lib/SCConfig.pm 2007-10-02 22:23:38 UTC (rev 695) @@ -117,6 +117,10 @@ $config->file(@args); } +unless ($config->nocheck()) { + check_config($config, $config->maxkernel); +} + $config->getopt(\@AGAIN); # @@ -144,7 +148,7 @@ sub populate_main_switches { my ($config) = @_; - my @noargs = qw(stdin verbose debug version help quiet); + my @noargs = qw(stdin verbose debug version help quiet nocheck); my @configstages = qw(confignet configboot confighw runboot configrd confignone); my @config_on = qw(configkeyboard configtime configuserexit); @@ -274,6 +278,34 @@ } } +# Check if files specified in systemconfigurator config actually exists before continuing +sub check_config { + my ($config, $number) = @_; + + my $boot_rootdev = $config->get('boot_rootdev'); + my $boot_bootdev = $config->get('boot_bootdev'); + + if ( $boot_rootdev && ! -e $boot_rootdev ) { + print("ROOTDEV $boot_rootdev under [BOOT] does not exist, please check your systemconfigurator config\n"); + exit 1; + } + + if ( $boot_bootdev && ! -e $boot_bootdev ) { + print("BOOTDEV $boot_bootdev under [BOOT] does not exist, please check your systemconfigurator config\n"); + exit 1; + } + + for (my $i = 0; $i < $number; $i++) { + my $var = "kernel$i"."_path"; + my $kernel = $config->get("$var"); + + if ( $kernel && ! -e $kernel ) { + print("Kernel $kernel under [KERNEL$i] does not exist, please check your systemconfigurator config\n"); + exit 1; + } + } +} + =head1 NAME SCConfig - AppConfig Macros for systemconfigurator @@ -307,5 +339,4 @@ =cut - 1; Modified: trunk/t/01_sysconf0.t =================================================================== --- trunk/t/01_sysconf0.t 2007-09-26 00:29:49 UTC (rev 694) +++ trunk/t/01_sysconf0.t 2007-10-02 22:23:38 UTC (rev 695) @@ -5,7 +5,7 @@ use Data::Dumper; BEGIN {plan tests => 19; - @ARGV = qw(--quiet --cfgfile t/cfg/options.cfg); + @ARGV = qw(--quiet --nocheck --cfgfile t/cfg/options.cfg); } eval { Modified: trunk/t/01_sysconf1.t =================================================================== --- trunk/t/01_sysconf1.t 2007-09-26 00:29:49 UTC (rev 694) +++ trunk/t/01_sysconf1.t 2007-10-02 22:23:38 UTC (rev 695) @@ -5,7 +5,7 @@ use Data::Dumper; BEGIN {plan tests => 19; - @ARGV = qw(--quiet --maxkernel=20 --cfgfile t/cfg/options.cfg); + @ARGV = qw(--quiet --nocheck --maxkernel=20 --cfgfile t/cfg/options.cfg); } eval { Modified: trunk/t/01_sysconf2.t =================================================================== --- trunk/t/01_sysconf2.t 2007-09-26 00:29:49 UTC (rev 694) +++ trunk/t/01_sysconf2.t 2007-10-02 22:23:38 UTC (rev 695) @@ -5,7 +5,7 @@ use Data::Dumper; BEGIN {plan tests => 19; - @ARGV = qw(--quiet --maxkernel=150 --cfgfile t/cfg/options.cfg); + @ARGV = qw(--quiet --nocheck --maxkernel=150 --cfgfile t/cfg/options.cfg); } eval { Modified: trunk/t/boot_aboot.t =================================================================== --- trunk/t/boot_aboot.t 2007-09-26 00:29:49 UTC (rev 694) +++ trunk/t/boot_aboot.t 2007-10-02 22:23:38 UTC (rev 695) @@ -14,7 +14,7 @@ # Here is a trick to make it look like this was called with those args # on the command line before SCConfig runs. - @ARGV = qw(--norunboot --cfgfile t/cfg/boot.cfg); + @ARGV = qw(--nocheck --norunboot --cfgfile t/cfg/boot.cfg); } #Util::Log::start_verbose(); Modified: trunk/t/boot_elilo.t =================================================================== --- trunk/t/boot_elilo.t 2007-09-26 00:29:49 UTC (rev 694) +++ trunk/t/boot_elilo.t 2007-10-02 22:23:38 UTC (rev 695) @@ -14,7 +14,7 @@ # Here is a trick to make it look like this was called with those args # on the command line before SCConfig runs. - @ARGV = qw(--norunboot --cfgfile t/cfg/boot.cfg); + @ARGV = qw(--nocheck --norunboot --cfgfile t/cfg/boot.cfg); } #Util::Log::start_verbose(); Modified: trunk/t/boot_grub.t =================================================================== --- trunk/t/boot_grub.t 2007-09-26 00:29:49 UTC (rev 694) +++ trunk/t/boot_grub.t 2007-10-02 22:23:38 UTC (rev 695) @@ -16,7 +16,7 @@ # Here is a trick to make it look like this was called with those args # on the command line before SCConfig runs. - @ARGV = qw(--norunboot --cfgfile t/cfg/boot.cfg); + @ARGV = qw(--nocheck --norunboot --cfgfile t/cfg/boot.cfg); } eval { Modified: trunk/t/boot_lilo.t =================================================================== --- trunk/t/boot_lilo.t 2007-09-26 00:29:49 UTC (rev 694) +++ trunk/t/boot_lilo.t 2007-10-02 22:23:38 UTC (rev 695) @@ -14,7 +14,7 @@ # Here is a trick to make it look like this was called with those args # on the command line before SCConfig runs. - @ARGV = qw(--norunboot --cfgfile t/cfg/boot.cfg); + @ARGV = qw(--nocheck --norunboot --cfgfile t/cfg/boot.cfg); } #Util::Log::start_verbose(); Modified: trunk/t/boot_palo.t =================================================================== --- trunk/t/boot_palo.t 2007-09-26 00:29:49 UTC (rev 694) +++ trunk/t/boot_palo.t 2007-10-02 22:23:38 UTC (rev 695) @@ -14,7 +14,7 @@ # Here is a trick to make it look like this was called with those args # on the command line before SCConfig runs. - @ARGV = qw(--norunboot --cfgfile t/cfg/boot.cfg); + @ARGV = qw(--nocheck --norunboot --cfgfile t/cfg/boot.cfg); } #Util::Log::start_verbose(); Modified: trunk/t/boot_yaboot.t =================================================================== --- trunk/t/boot_yaboot.t 2007-09-26 00:29:49 UTC (rev 694) +++ trunk/t/boot_yaboot.t 2007-10-02 22:23:38 UTC (rev 695) @@ -13,7 +13,7 @@ # Here is a trick to make it look like this was called with those args # on the command line before SCConfig runs. - @ARGV = qw( --norunboot --cfgfile t/cfg/boot.cfg); + @ARGV = qw(--nocheck --norunboot --cfgfile t/cfg/boot.cfg); } eval { Modified: trunk/t/boot_zipl.t =================================================================== --- trunk/t/boot_zipl.t 2007-09-26 00:29:49 UTC (rev 694) +++ trunk/t/boot_zipl.t 2007-10-02 22:23:38 UTC (rev 695) @@ -14,7 +14,7 @@ # Here is a trick to make it look like this was called with those args # on the command line before SCConfig runs. - @ARGV = qw(--norunboot --cfgfile t/cfg/boot.cfg); + @ARGV = qw(--nocheck --norunboot --cfgfile t/cfg/boot.cfg); } #Util::Log::start_verbose(); Modified: trunk/t/hardware_cm.t =================================================================== --- trunk/t/hardware_cm.t 2007-09-26 00:29:49 UTC (rev 694) +++ trunk/t/hardware_cm.t 2007-10-02 22:23:38 UTC (rev 695) @@ -13,7 +13,7 @@ # Here is a trick to make it look like this was called with those args # on the command line before SCConfig runs. - @ARGV = qw(--confighw --cfgfile t/cfg/test.cfg); + @ARGV = qw(--nocheck --confighw --cfgfile t/cfg/test.cfg); } eval { Modified: trunk/t/hardware_ma.t =================================================================== --- trunk/t/hardware_ma.t 2007-09-26 00:29:49 UTC (rev 694) +++ trunk/t/hardware_ma.t 2007-10-02 22:23:38 UTC (rev 695) @@ -17,7 +17,7 @@ # Here is a trick to make it look like this was called with those args # on the command line before SCConfig runs. - @ARGV = qw(--confighw --cfgfile t/cfg/test.cfg); + @ARGV = qw(--nocheck --confighw --cfgfile t/cfg/test.cfg); } eval { Modified: trunk/t/hardware_mc.t =================================================================== --- trunk/t/hardware_mc.t 2007-09-26 00:29:49 UTC (rev 694) +++ trunk/t/hardware_mc.t 2007-10-02 22:23:38 UTC (rev 695) @@ -13,7 +13,7 @@ # Here is a trick to make it look like this was called with those args # on the command line before SCConfig runs. - @ARGV = qw(--confighw --cfgfile t/cfg/test.cfg); + @ARGV = qw(--nocheck --confighw --cfgfile t/cfg/test.cfg); } eval { Modified: trunk/t/hardware_mc2.t =================================================================== --- trunk/t/hardware_mc2.t 2007-09-26 00:29:49 UTC (rev 694) +++ trunk/t/hardware_mc2.t 2007-10-02 22:23:38 UTC (rev 695) @@ -13,7 +13,7 @@ # Here is a trick to make it look like this was called with those args # on the command line before SCConfig runs. - @ARGV = qw(--confighw --cfgfile t/cfg/hworder.cfg); + @ARGV = qw(--nocheck --confighw --cfgfile t/cfg/hworder.cfg); } eval { Modified: trunk/t/hardware_order.t =================================================================== --- trunk/t/hardware_order.t 2007-09-26 00:29:49 UTC (rev 694) +++ trunk/t/hardware_order.t 2007-10-02 22:23:38 UTC (rev 695) @@ -13,7 +13,7 @@ # Here is a trick to make it look like this was called with those args # on the command line before SCConfig runs. - @ARGV = qw(--confighw --cfgfile t/cfg/order.cfg); + @ARGV = qw(--nocheck --confighw --cfgfile t/cfg/order.cfg); } eval { Modified: trunk/t/initrd_01.t =================================================================== --- trunk/t/initrd_01.t 2007-09-26 00:29:49 UTC (rev 694) +++ trunk/t/initrd_01.t 2007-10-02 22:23:38 UTC (rev 695) @@ -15,7 +15,7 @@ # Here is a trick to make it look like this was called with those args # on the command line before SCConfig runs. - @ARGV = qw(--cfgfile t/cfg/initrd_01.cfg); + @ARGV = qw(--nocheck --cfgfile t/cfg/initrd_01.cfg); } Util::Log::start_verbose(); Modified: trunk/t/networking_interfaces.t =================================================================== --- trunk/t/networking_interfaces.t 2007-09-26 00:29:49 UTC (rev 694) +++ trunk/t/networking_interfaces.t 2007-10-02 22:23:38 UTC (rev 695) @@ -11,7 +11,7 @@ # Here is a trick to make it look like this was called with those args # on the command line before SCConfig runs. - @ARGV = qw(--cfgfile t/cfg/test.cfg); + @ARGV = qw(--nocheck --cfgfile t/cfg/test.cfg); } eval { Modified: trunk/t/networking_lc.t =================================================================== --- trunk/t/networking_lc.t 2007-09-26 00:29:49 UTC (rev 694) +++ trunk/t/networking_lc.t 2007-10-02 22:23:38 UTC (rev 695) @@ -11,7 +11,7 @@ # Here is a trick to make it look like this was called with those args # on the command line before SCConfig runs. - @ARGV = qw(--cfgfile t/cfg/test.cfg); + @ARGV = qw(--nocheck --cfgfile t/cfg/test.cfg); } eval { Modified: trunk/t/networking_rc.t =================================================================== --- trunk/t/networking_rc.t 2007-09-26 00:29:49 UTC (rev 694) +++ trunk/t/networking_rc.t 2007-10-02 22:23:38 UTC (rev 695) @@ -11,7 +11,7 @@ # Here is a trick to make it look like this was called with those args # on the command line before SCConfig runs. - @ARGV = qw(--cfgfile t/cfg/test.cfg); + @ARGV = qw(--nocheck --cfgfile t/cfg/test.cfg); } eval { Modified: trunk/t/networking_rn.t =================================================================== --- trunk/t/networking_rn.t 2007-09-26 00:29:49 UTC (rev 694) +++ trunk/t/networking_rn.t 2007-10-02 22:23:38 UTC (rev 695) @@ -11,7 +11,7 @@ # Here is a trick to make it look like this was called with those args # on the command line before SCConfig runs. - @ARGV = qw(--cfgfile t/cfg/test.cfg); + @ARGV = qw(--nocheck --cfgfile t/cfg/test.cfg); } eval { Modified: trunk/t/z_scbin.t =================================================================== --- trunk/t/z_scbin.t 2007-09-26 00:29:49 UTC (rev 694) +++ trunk/t/z_scbin.t 2007-10-02 22:23:38 UTC (rev 695) @@ -6,7 +6,7 @@ BEGIN { plan tests => 15; - @ARGV = qw(--cfgfile t/cfg/test.cfg); + @ARGV = qw(--nocheck --cfgfile t/cfg/test.cfg); } $PERL = "perl -w -Iblib/lib"; @@ -20,7 +20,7 @@ ok($@,'') or croak("No point in going any further"); -ok(!system("$PERL blib/script/systemconfigurator --cfgfile t/cfg/test.cfg --confignet > /dev/null")); +ok(!system("$PERL blib/script/systemconfigurator --nocheck --cfgfile t/cfg/test.cfg --confignet > /dev/null")); # Here is setup for generating linuxconf networking @@ -46,7 +46,7 @@ # Setup is done now -ok(!system("$PERL blib/script/systemconfigurator --confignet --confighw --cfgfile t/cfg/test.cfg --excludesto $root/excludes.log > /dev/null")); +ok(!system("$PERL blib/script/systemconfigurator --nocheck --confignet --confighw --cfgfile t/cfg/test.cfg --excludesto $root/excludes.log > /dev/null")); local $/ = undef; |
From: <bl...@sy...> - 2007-09-26 00:29:58
|
Author: bli Date: 2007-09-25 19:29:49 -0500 (Tue, 25 Sep 2007) New Revision: 694 Modified: trunk/lib/Boot/Grub.pm Log: Suppress the warning message "mv: cannot stat `/boot/grub/device.map': No such file or directory" when grub-install is executed and /boot/grub/device.map does not exist. Modified: trunk/lib/Boot/Grub.pm =================================================================== --- trunk/lib/Boot/Grub.pm 2007-09-20 22:08:36 UTC (rev 693) +++ trunk/lib/Boot/Grub.pm 2007-09-26 00:29:49 UTC (rev 694) @@ -356,6 +356,15 @@ my $bootpart = $this->find_boot_part(); my $cmd = "$$this{bootloader_exe} $$this{nofloppy} --recheck $bootpart"; + my $devicemap = "/boot/grub/device.map"; + + # Create an empty device.map file to suppress warning message + # "mv: cannot stat `/boot/grub/device.map': No such file or directory" when grub-install + # is executed and /boot/grub/device.map does not exist (i.e. during imaging) + if ( ! -e $devicemap ) { + system("touch $devicemap"); + } + verbose("calling $cmd\n"); system("$cmd"); |
From: <ef...@sy...> - 2007-09-20 22:08:44
|
Author: efocht Date: 2007-09-20 17:08:36 -0500 (Thu, 20 Sep 2007) New Revision: 693 Modified: trunk/lib/Boot/Grub.pm Log: Changed copy into move. Modified: trunk/lib/Boot/Grub.pm =================================================================== --- trunk/lib/Boot/Grub.pm 2007-09-20 21:45:35 UTC (rev 692) +++ trunk/lib/Boot/Grub.pm 2007-09-20 22:08:36 UTC (rev 693) @@ -283,7 +283,7 @@ my $cmd = "$$this{grub} $$this{nofloppy} --batch --device-map=$file < /dev/null > /dev/null"; my $err = system($cmd); if ($backup) { - copy("/etc/mtab.sc","/etc/mtab"); + move("/etc/mtab.sc","/etc/mtab"); } croak("Couldn't run $cmd") if $err; |
From: <bl...@sy...> - 2007-09-20 21:45:42
|
Author: bli Date: 2007-09-20 16:45:35 -0500 (Thu, 20 Sep 2007) New Revision: 692 Modified: trunk/Makefile.PL Log: Remove commented code. Delete *.spec when realclean target is called. Modified: trunk/Makefile.PL =================================================================== --- trunk/Makefile.PL 2007-09-20 21:19:45 UTC (rev 691) +++ trunk/Makefile.PL 2007-09-20 21:45:35 UTC (rev 692) @@ -10,17 +10,6 @@ sub MY::postamble { my $string = <<EOF; -# What madness lurks in the hearts of men? The following -# lets me redefine the way the man pages are autogenerated. - -#POD2MAN_EXE = /usr/bin/pod2man "--center=System Configurator" "--release=System Configurator v$version" -#POD2MAN = \$(PERL) -we '\%m=\@ARGV;for (keys \%m){' \\ -#-e 'next if -e \$\$m{\$\$_} && -M \$\$m{\$\$_} < -M \$\$_ && -M \$\$m{\$\$_} < -M "Makefile";' \\ -#-e 'print "Manifying \$\$m{\$\$_}\\n";' \\ -#-e 'system(qq[\$\$^X ].q["-I\$(PERL_ARCHLIB)" "-I\$(PERL_LIB)" \$(POD2MAN_EXE) ].qq[\$\$_>\$\$m{\$\$_}])==0 or warn "Couldn\\047t install \$\$m{\$\$_}\\n";' \\ -#-e 'chmod(oct(\$(PERM_RW))), \$\$m{\$\$_} or warn "chmod \$(PERM_RW) \$\$m{\$\$_}: \$\$!\\n";}' -#POD2MAN = \$(POD2MAN_EXE) - POD2MAN_EXE := \$(POD2MAN_EXE) "--center=System Configurator" "--release=v$version" POD2MAN5_EXE = \$(POD2MAN_EXE) "--section=5" @@ -80,5 +69,5 @@ 'PREREQ_PM' => { AppConfig => 1.52, }, - 'realclean' => {FILES => "*.old *.bak *.tar.gz *.yml Makefile MANIFEST"}, + 'realclean' => {FILES => "*.old *.bak *.tar.gz *.yml *.spec Makefile MANIFEST"}, ); |
From: <ef...@sy...> - 2007-09-20 21:19:58
|
Author: efocht Date: 2007-09-20 16:19:45 -0500 (Thu, 20 Sep 2007) New Revision: 691 Modified: trunk/lib/Boot/Grub.pm Log: Backing up /etc/mtab and restoring it after the grub call. Reported and suggested by Bernard Li. Modified: trunk/lib/Boot/Grub.pm =================================================================== --- trunk/lib/Boot/Grub.pm 2007-09-20 00:37:40 UTC (rev 690) +++ trunk/lib/Boot/Grub.pm 2007-09-20 21:19:45 UTC (rev 691) @@ -50,6 +50,7 @@ use Carp; use vars qw($VERSION $DEVICE_MAP $FSTAB); use File::Basename; +use File::Copy; use Boot; use Boot::Label; use Boot::Devfs; @@ -271,12 +272,21 @@ if(-e $file) { unlink $file; } - - !system("/bin/cp /proc/mounts /etc/mtab") + + my $backup; + if (-f "/etc/mtab") { + copy("/etc/mtab","/etc/mtab.sc"); + $backup = 1; + } + copy("/proc/mounts","/etc/mtab") or croak("Couldn't copy /proc/mounts. Is /proc mounted?"); my $cmd = "$$this{grub} $$this{nofloppy} --batch --device-map=$file < /dev/null > /dev/null"; - !system($cmd) or croak("Couldn't run $cmd"); - + my $err = system($cmd); + if ($backup) { + copy("/etc/mtab.sc","/etc/mtab"); + } + croak("Couldn't run $cmd") if $err; + verbose("generated device map file $file"); open(IN,"<$file"); |
From: <bl...@sy...> - 2007-09-20 00:37:47
|
Author: bli Date: 2007-09-19 19:37:40 -0500 (Wed, 19 Sep 2007) New Revision: 690 Modified: trunk/INSTALL Log: Update the INSTALL doc with instructions on building just the distribution tarball. Also fixed typo for RPM build instructions and mention that `make rpm` actually also builds the SRPM. Modified: trunk/INSTALL =================================================================== --- trunk/INSTALL 2007-09-20 00:34:29 UTC (rev 689) +++ trunk/INSTALL 2007-09-20 00:37:40 UTC (rev 690) @@ -30,11 +30,19 @@ If you get any errors during 'make test' please report them, along with the output of 'perl -V' to sis...@li.... +Building tarball +----------------------------- +The following steps will build just the distribution tarball + + perl Makefile.PL + make + make dist + Building RPMs ------------------------------ -The following steps will build the RPM +The following steps will build the (S)RPMs - perl Makefile.pl + perl Makefile.PL make rpm Cleanup |
From: <bl...@sy...> - 2007-09-20 00:34:37
|
Author: bli Date: 2007-09-19 19:34:29 -0500 (Wed, 19 Sep 2007) New Revision: 689 Added: trunk/sc.spec.in Removed: trunk/sc.spec Modified: trunk/Makefile.PL Log: This check-in fixes an issue where the spec file's Version tag was not correctly updated during the make process and thus when doing a release, the version number needs to be changed in both the Makefile.PL and the spec file. Now, one only needs to modify Makefile.PL and the version file will be propagated to the correct files. Deleted manifest dependency from rpm_prep and add it to srpm and all, since sc.spec is generated by rpm_prep via sc.spec.in and the manifest needs to be updated after the fact. For the 'realclean' target, delete *.yml. Modified: trunk/Makefile.PL =================================================================== --- trunk/Makefile.PL 2007-09-20 00:27:02 UTC (rev 688) +++ trunk/Makefile.PL 2007-09-20 00:34:29 UTC (rev 689) @@ -32,13 +32,13 @@ \tmv systemconfigurator-$version.tar.gz /tmp/scdeb && cd /tmp/scdeb && tar -xvzf systemconfigurator-$version.tar.gz && cd systemconfigurator-$version && dpkg-buildpackage && rm -rf /tmp/scdeb/systemconfigurator-$version \techo "Debian Packages have been built in /tmp/scdeb" -rpm_prep :: manifest -\tperl -pi.bak -e 's/\(\%define version\\\s*\).*/\%define version $version/' sc.spec +rpm_prep :: +\tcp -a ./sc.spec.in ./sc.spec && perl -pi -e 's/\\\@VERSION@/$version/' ./sc.spec rpm :: srpm \trpmbuild -tb \$(NAME)-\$(VERSION).tar.gz -srpm :: rpm_prep dist +srpm :: rpm_prep manifest dist \trpmbuild -ts \$(NAME)-\$(VERSION).tar.gz manext_install :: @@ -50,9 +50,9 @@ set_ver:: \tperl -pi -e 's/EXEVERSION =.*/EXEVERSION = "$version";/' ./blib/script/systemconfigurator \tperl -pi -e 's/EXEVERSION =.*/EXEVERSION = "$version";/' ./bin/systemconfigurator -\tperl -pi -e 's/ version\s+.*/ version\t$version/' ./sc.spec +\tcp -a ./sc.spec.in ./sc.spec && perl -pi -e 's/\\\@VERSION@/$version/' ./sc.spec -all :: set_ver +all :: set_ver manifest install :: manext_install @@ -80,5 +80,5 @@ 'PREREQ_PM' => { AppConfig => 1.52, }, - 'realclean' => {FILES => "*.old *.bak *.tar.gz Makefile MANIFEST"}, + 'realclean' => {FILES => "*.old *.bak *.tar.gz *.yml Makefile MANIFEST"}, ); Deleted: trunk/sc.spec =================================================================== --- trunk/sc.spec 2007-09-20 00:27:02 UTC (rev 688) +++ trunk/sc.spec 2007-09-20 00:34:29 UTC (rev 689) @@ -1,124 +0,0 @@ -%define prefix /usr - -Summary: System Configurator -Name: systemconfigurator -Version: 2.2.10 -Release: 1 -License: GPL -URL: http://systemconfig.sourceforge.net -Group: Applications/System -Source: %{name}-%{version}.tar.gz -Requires: perl perl-AppConfig -Vendor: sisuite.sourceforge.net -Distribution: OSCAR -Packager: Erich Focht <ef...@hp...> -Prefix: %prefix -Buildroot: /var/tmp/%{name}-%{version}-root -BuildArchitectures: noarch -BuildRequires: perl-AppConfig -AutoReqProv: no - -%description -Unified Configuration API for Linux Installation - -Provides an API for various installation and configuration processes that are -otherwise inconsistent between the many Linux distributions, and the many -architectures they run on. For example, you can configure the bootloader -on a system in a general way - you don't need to know anything about the -particular boot loader on the system. You can update the network settings -of a system, without knowing the distribution or the format of its network -configuration files. - -%prep -%setup -q - - -# No configure, no make, just copy files to the output dir. -%build -cd $RPM_BUILD_DIR/%{name}-%{version} -mkdir -p /var/tmp/%{name}-%{version}-root/usr/share/man/man5 -perl Makefile.PL PREFIX=/var/tmp/%{name}-%{version}-root%{prefix} INSTALLSITELIB=/var/tmp/%{name}-%{version}-root/usr/lib/systemconfig INSTALLMAN1DIR=/var/tmp/%{name}-%{version}-root/usr/share/man/man1 INSTALLMAN3DIR=/var/tmp/%{name}-%{version}-root/usr/share/man/man3 INSTALLSITEMAN1DIR=/var/tmp/%{name}-%{version}-root/usr/share/man/man1 INSTALLSITEMAN3DIR=/var/tmp/%{name}-%{version}-root/usr/share/man/man3 INSTALLSITEBIN=/var/tmp/%{name}-%{version}-root/usr/bin INSTALLSITESCRIPT=/var/tmp/%{name}-%{version}-root/usr/bin -make -make test -make install -#gzip /var/tmp/%{name}-%{version}-root/usr/share/man/*/* -rm -rf /var/tmp/%{name}-%{version}-root/usr/lib/systemconfig/auto* -find /var/tmp/%{name}-%{version}-root/ -name perllocal.pod | xargs rm -f - -%clean -rm -rf /var/tmp/%{name}-%{version}-root - -%files -%defattr(-,root,root) -%doc TODO -%doc CREDITS -%doc CHANGELOG -%doc README -%doc INSTALL -%doc README.yaboot -%doc COPYING -%doc sample.cfg -%doc docs/design.pod -%{prefix}/bin/* -%{prefix}/share/man/man1/* -%{prefix}/share/man/man5/* -/usr/lib/systemconfig/* -%dir /usr/lib/systemconfig - -%changelog -* Mon Apr 22 2007 Erich Focht -- version 2.2.9 tag/release -* Fri Mar 30 2007 Erich Focht -- Added debian support which was in the OSCAR pkgsrc repository, provided - by Geoffroy Vallee. Also added an extension of the syntax for supporting - xen virtual machines. -* Mon Mar 26 2007 Erich Focht -- Added scconf-tool, a tool for querying and manipulating the - /etc/systemconfig/systemconfig.conf file from shell scripts. -- Added scconf-bootinfo, a helper tool for detecting boot information. - Used by the kexec boot method of systemimager. -* Wed Mar 21 2007 Erich Focht -- Patches to bring systemconfigurator to the level of the version included - into OSCAR 5.0 (sc-2.2.7-12ef). In order to avoid confusion, updating the - version number to 2.2.8-1. Changes are listed below: - * Wed Oct 25 2006 Erich Focht] - - fixing issue with unknown additional scsi device (oscar bug #274). - * Fri Sep 15 2006 Erich Focht - - locating "env" with "which". Path to env is different in SuSE and RedHat. - * Wed Aug 23 2006 Erich Focht - - added check for --no-floppy support of grub (RHEL3 doesn't support it) - - made functions in Grub.pm more OO. Needed for storing "nofloppy" capability - centrally, in the object instance. - * Mon Aug 07 2006 Erich Focht - - added --no-floppy to grub calls as suggested by Andrea Righi. - * Mon Jul 17 2006 Erich Focht - - added <HOSTID>, <HOSTID+nnn> and <HOSTID-nnn> hostname dependent - variable replacement (in the global APPEND block of the BOOT section). - -* Fri Nov 24 2006 Erich Focht <ef...@hp...> -- first step in merging with changes from the OSCAR tree -- changes correspond to systemconfigurator distributed with OSCAR 4.2 - -* Sat Mar 26 2005 Sean Dague <se...@da...> 2.2.2-1 -- add Erich Focht's kernel version detector changes -- update hardware detection module to FC3 & Mandrake 10.1 based lists - -* Fri Mar 25 2005 Sean Dague <se...@da...> 2.2.1-1 -- fixed to work with fedora, which does this differently from mdk and suse - -* Thu Mar 24 2005 Sean Dague <se...@da...> 2.2.0-1 -- added support for modprobe.conf -- clean up spec file -- upped release number - -* Sun Sep 19 2004 dann frazier <da...@da...> 2.0.10-1 -- New release - -* Tue Aug 21 2001 Sean Dague <ja...@us...> -- Added %doc sections for devel docs - -* Tue Aug 14 2001 Sean Dague <ja...@us...> -- Added prebuild for man 5 directory - -* Mon Jul 16 2001 Sean Dague <ja...@us...> -- Initial spec file. Copied: trunk/sc.spec.in (from rev 680, trunk/sc.spec) =================================================================== --- trunk/sc.spec.in (rev 0) +++ trunk/sc.spec.in 2007-09-20 00:34:29 UTC (rev 689) @@ -0,0 +1,124 @@ +%define prefix /usr + +Summary: System Configurator +Name: systemconfigurator +Version: @VERSION@ +Release: 1 +License: GPL +URL: http://systemconfig.sourceforge.net +Group: Applications/System +Source: %{name}-%{version}.tar.gz +Requires: perl perl-AppConfig +Vendor: sisuite.sourceforge.net +Distribution: OSCAR +Packager: Erich Focht <ef...@hp...> +Prefix: %prefix +Buildroot: /var/tmp/%{name}-%{version}-root +BuildArchitectures: noarch +BuildRequires: perl-AppConfig +AutoReqProv: no + +%description +Unified Configuration API for Linux Installation + +Provides an API for various installation and configuration processes that are +otherwise inconsistent between the many Linux distributions, and the many +architectures they run on. For example, you can configure the bootloader +on a system in a general way - you don't need to know anything about the +particular boot loader on the system. You can update the network settings +of a system, without knowing the distribution or the format of its network +configuration files. + +%prep +%setup -q + + +# No configure, no make, just copy files to the output dir. +%build +cd $RPM_BUILD_DIR/%{name}-%{version} +mkdir -p /var/tmp/%{name}-%{version}-root/usr/share/man/man5 +perl Makefile.PL PREFIX=/var/tmp/%{name}-%{version}-root%{prefix} INSTALLSITELIB=/var/tmp/%{name}-%{version}-root/usr/lib/systemconfig INSTALLMAN1DIR=/var/tmp/%{name}-%{version}-root/usr/share/man/man1 INSTALLMAN3DIR=/var/tmp/%{name}-%{version}-root/usr/share/man/man3 INSTALLSITEMAN1DIR=/var/tmp/%{name}-%{version}-root/usr/share/man/man1 INSTALLSITEMAN3DIR=/var/tmp/%{name}-%{version}-root/usr/share/man/man3 INSTALLSITEBIN=/var/tmp/%{name}-%{version}-root/usr/bin INSTALLSITESCRIPT=/var/tmp/%{name}-%{version}-root/usr/bin +make +make test +make install +#gzip /var/tmp/%{name}-%{version}-root/usr/share/man/*/* +rm -rf /var/tmp/%{name}-%{version}-root/usr/lib/systemconfig/auto* +find /var/tmp/%{name}-%{version}-root/ -name perllocal.pod | xargs rm -f + +%clean +rm -rf /var/tmp/%{name}-%{version}-root + +%files +%defattr(-,root,root) +%doc TODO +%doc CREDITS +%doc CHANGELOG +%doc README +%doc INSTALL +%doc README.yaboot +%doc COPYING +%doc sample.cfg +%doc docs/design.pod +%{prefix}/bin/* +%{prefix}/share/man/man1/* +%{prefix}/share/man/man5/* +/usr/lib/systemconfig/* +%dir /usr/lib/systemconfig + +%changelog +* Mon Apr 22 2007 Erich Focht +- version 2.2.9 tag/release +* Fri Mar 30 2007 Erich Focht +- Added debian support which was in the OSCAR pkgsrc repository, provided + by Geoffroy Vallee. Also added an extension of the syntax for supporting + xen virtual machines. +* Mon Mar 26 2007 Erich Focht +- Added scconf-tool, a tool for querying and manipulating the + /etc/systemconfig/systemconfig.conf file from shell scripts. +- Added scconf-bootinfo, a helper tool for detecting boot information. + Used by the kexec boot method of systemimager. +* Wed Mar 21 2007 Erich Focht +- Patches to bring systemconfigurator to the level of the version included + into OSCAR 5.0 (sc-2.2.7-12ef). In order to avoid confusion, updating the + version number to 2.2.8-1. Changes are listed below: + * Wed Oct 25 2006 Erich Focht] + - fixing issue with unknown additional scsi device (oscar bug #274). + * Fri Sep 15 2006 Erich Focht + - locating "env" with "which". Path to env is different in SuSE and RedHat. + * Wed Aug 23 2006 Erich Focht + - added check for --no-floppy support of grub (RHEL3 doesn't support it) + - made functions in Grub.pm more OO. Needed for storing "nofloppy" capability + centrally, in the object instance. + * Mon Aug 07 2006 Erich Focht + - added --no-floppy to grub calls as suggested by Andrea Righi. + * Mon Jul 17 2006 Erich Focht + - added <HOSTID>, <HOSTID+nnn> and <HOSTID-nnn> hostname dependent + variable replacement (in the global APPEND block of the BOOT section). + +* Fri Nov 24 2006 Erich Focht <ef...@hp...> +- first step in merging with changes from the OSCAR tree +- changes correspond to systemconfigurator distributed with OSCAR 4.2 + +* Sat Mar 26 2005 Sean Dague <se...@da...> 2.2.2-1 +- add Erich Focht's kernel version detector changes +- update hardware detection module to FC3 & Mandrake 10.1 based lists + +* Fri Mar 25 2005 Sean Dague <se...@da...> 2.2.1-1 +- fixed to work with fedora, which does this differently from mdk and suse + +* Thu Mar 24 2005 Sean Dague <se...@da...> 2.2.0-1 +- added support for modprobe.conf +- clean up spec file +- upped release number + +* Sun Sep 19 2004 dann frazier <da...@da...> 2.0.10-1 +- New release + +* Tue Aug 21 2001 Sean Dague <ja...@us...> +- Added %doc sections for devel docs + +* Tue Aug 14 2001 Sean Dague <ja...@us...> +- Added prebuild for man 5 directory + +* Mon Jul 16 2001 Sean Dague <ja...@us...> +- Initial spec file. |
From: <bl...@sy...> - 2007-09-20 00:27:11
|
Author: bli Date: 2007-09-19 19:27:02 -0500 (Wed, 19 Sep 2007) New Revision: 688 Modified: trunk/MANIFEST.SKIP Log: Do not include pm_to_blib in manifest (generated by make) Modified: trunk/MANIFEST.SKIP =================================================================== --- trunk/MANIFEST.SKIP 2007-09-19 19:01:34 UTC (rev 687) +++ trunk/MANIFEST.SKIP 2007-09-20 00:27:02 UTC (rev 688) @@ -10,4 +10,4 @@ \.emacs \.\# \.svn - +^pm_to_blib$ |
From: <bl...@sy...> - 2007-09-19 19:01:41
|
Author: bli Date: 2007-09-19 14:01:34 -0500 (Wed, 19 Sep 2007) New Revision: 687 Modified: trunk/lib/Util/FileMod.pm Log: Fix typo: $file.luibak -> $file.scbak Modified: trunk/lib/Util/FileMod.pm =================================================================== --- trunk/lib/Util/FileMod.pm 2007-09-19 19:00:06 UTC (rev 686) +++ trunk/lib/Util/FileMod.pm 2007-09-19 19:01:34 UTC (rev 687) @@ -104,7 +104,7 @@ if(-e $file) { system("cp $file $file.scbak") and croak("Couldn't backup $file to $file.scbak"); - open(IN,"<$file.scbak") or croak("Could not open $file.luibak for reading"); + open(IN,"<$file.scbak") or croak("Could not open $file.scbak for reading"); open(OUT,">$file") or croak("Could not open $file for writing"); while(<IN>) { |
From: <bl...@sy...> - 2007-09-19 19:00:13
|
Author: bli Date: 2007-09-19 14:00:06 -0500 (Wed, 19 Sep 2007) New Revision: 686 Modified: trunk/bin/systemconfigurator Log: The last check-in broke testing -- can only shift the @files array after it is no longer being used by anything else Modified: trunk/bin/systemconfigurator =================================================================== --- trunk/bin/systemconfigurator 2007-09-18 21:52:27 UTC (rev 685) +++ trunk/bin/systemconfigurator 2007-09-19 19:00:06 UTC (rev 686) @@ -457,9 +457,6 @@ # print Dumper($config); -shift(@files); # /etc/systemconfig/systemconfig.conf is not modified so get rid of it from the list -verbose("All done. I have modified the following files:\n" . join "\n", (sort @files)); - if (my $excludes = $config->get('excludesto')) { open(OUT,">$excludes"); print OUT "# System Configurator generated excludes file \n\n"; @@ -467,6 +464,9 @@ close(OUT); } +shift(@files); # /etc/systemconfig/systemconfig.conf is not modified so get rid of it from the list +verbose("All done. I have modified the following files:\n" . join "\n", (sort @files)); + sub usage { print <<USAGE; usage: $0 [options] |
From: <bl...@sy...> - 2007-09-18 21:52:37
|
Author: bli Date: 2007-09-18 16:52:27 -0500 (Tue, 18 Sep 2007) New Revision: 685 Modified: trunk/bin/systemconfigurator Log: /etc/systemconfig/systemconfig.conf should only be used as input, and never modified Modified: trunk/bin/systemconfigurator =================================================================== --- trunk/bin/systemconfigurator 2007-09-18 21:23:44 UTC (rev 684) +++ trunk/bin/systemconfigurator 2007-09-18 21:52:27 UTC (rev 685) @@ -457,6 +457,7 @@ # print Dumper($config); +shift(@files); # /etc/systemconfig/systemconfig.conf is not modified so get rid of it from the list verbose("All done. I have modified the following files:\n" . join "\n", (sort @files)); if (my $excludes = $config->get('excludesto')) { |