summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOliver Tappe2007-05-29 19:35:03 +0200
committerOliver Tappe2007-05-29 19:35:03 +0200
commita463bb83d79e6d769962e53a1b677e93e03274c5 (patch)
tree92c586eacefe9550b0f424c468099650bd9c46a2
parentIncomplete hwdata/pcitable, for the problem see #100 ... (diff)
downloadcore-a463bb83d79e6d769962e53a1b677e93e03274c5.tar.gz
core-a463bb83d79e6d769962e53a1b677e93e03274c5.tar.xz
core-a463bb83d79e6d769962e53a1b677e93e03274c5.zip
* (hopefully) fixed problem with respect to wget repeatedly failing with
'files exists' errors under some circumstances: we now simply remove that file and try again * renamed 'export-filter.local' to 'export-filter' and 'clone-filter.local' to 'clone-filter' * completed example files for clone-filter and export-filter for all distros * split distro-info in two parts: the static, shared part (now living in /opt/openslx/share) and the configurable part living in /etc/opt/openslx. This is the last part of settings file related changes, closing ticket#122 git-svn-id: http://svn.openslx.org/svn/openslx/trunk@1106 95ad53e4-c205-0410-b2fa-d234c58c8868
-rw-r--r--Makefile18
-rw-r--r--installer/OpenSLX/OSExport/ExportType/Base.pm3
-rw-r--r--installer/OpenSLX/OSSetup/Engine.pm67
-rw-r--r--lib/distro-info/clone-filter.example14
-rw-r--r--lib/distro-info/fedora-6/export-filter.example15
-rw-r--r--lib/distro-info/fedora-6_x86_64/export-filter.example15
-rw-r--r--lib/distro-info/suse-10.1/export-filter.example15
-rw-r--r--lib/distro-info/suse-10.1_x86_64/export-filter.example15
-rw-r--r--lib/distro-info/suse-10.2/export-filter.example7
-rw-r--r--lib/distro-info/suse-10.2_x86_64/export-filter.example15
10 files changed, 150 insertions, 34 deletions
diff --git a/Makefile b/Makefile
index 323943bd..d84fcd6b 100644
--- a/Makefile
+++ b/Makefile
@@ -178,12 +178,18 @@ supported."; \
@cp bin/slx* $(DESTDIR)$(SLX_BIN_PATH)/; \
cp config-db/slx* $(DESTDIR)$(SLX_BIN_PATH)/; \
cp installer/slx* $(DESTDIR)$(SLX_BIN_PATH)/; \
- tar --exclude=.svn -cp -C lib OpenSLX distro-info | \
- tar -xp -C $(DESTDIR)$(SLX_BASE_PATH)/lib; \
- tar --exclude=.svn -cp -C config-db OpenSLX | \
- tar -xp -C $(DESTDIR)$(SLX_BASE_PATH)/lib; \
- tar --exclude=.svn -cp -C installer OpenSLX | \
- tar -xp -C $(DESTDIR)$(SLX_BASE_PATH)/lib; \
+ tar --exclude=.svn -cp -C lib OpenSLX \
+ | tar -xp -C $(DESTDIR)$(SLX_BASE_PATH)/lib; \
+ tar --exclude=.svn --exclude *.example \
+ -cp -C lib distro-info \
+ | tar -xp -C $(DESTDIR)$(SLX_SHARE_PATH); \
+ tar --exclude=.svn --exclude prereqfiles --exclude trusted-package-keys/* \
+ -cp -C lib distro-info \
+ | tar -xp -C $(DESTDIR)$(SLX_CONFIG_PATH); \
+ tar --exclude=.svn -cp -C config-db OpenSLX \
+ | tar -xp -C $(DESTDIR)$(SLX_BASE_PATH)/lib; \
+ tar --exclude=.svn -cp -C installer OpenSLX \
+ | tar -xp -C $(DESTDIR)$(SLX_BASE_PATH)/lib; \
@ # link all binaries & scripts into user-path:
@ln -sf $(SLX_BIN_PATH)/slx* $(DESTDIR)$(USR_BIN_PATH)/; \
diff --git a/installer/OpenSLX/OSExport/ExportType/Base.pm b/installer/OpenSLX/OSExport/ExportType/Base.pm
index a21d5499..e0f5c5be 100644
--- a/installer/OpenSLX/OSExport/ExportType/Base.pm
+++ b/installer/OpenSLX/OSExport/ExportType/Base.pm
@@ -79,7 +79,8 @@ sub determineIncludeExcludeList
# in front of the filterset given by the package (as the local filters
# should always overrule the vendor filters):
my $distroName = $self->{engine}->{'distro-name'};
- my $localFilterFile = "../lib/distro-info/$distroName/export-filter.local";
+ my $localFilterFile
+ = "$openslxConfig{'config-path'}/distro-info/$distroName/export-filter";
my $includeExcludeList = slurpFile($localFilterFile, 1);
$includeExcludeList .= $self->{engine}->{distro}->{'export-filter'};
$includeExcludeList =~ s[^\s+][]igms;
diff --git a/installer/OpenSLX/OSSetup/Engine.pm b/installer/OpenSLX/OSSetup/Engine.pm
index 4240c5f5..35dbb32e 100644
--- a/installer/OpenSLX/OSSetup/Engine.pm
+++ b/installer/OpenSLX/OSSetup/Engine.pm
@@ -137,11 +137,20 @@ sub initialize
if ($actionType ne 'clone') {
# setup path to distribution-specific info:
- my $distroInfoDir = "../lib/distro-info/$distro->{'base-name'}";
- if (!-d $distroInfoDir) {
- die _tr("unable to find distro-info for distro '%s'\n", $distro->{'base-name'});
+ my $sharedDistroInfoDir
+ = "$openslxConfig{'share-path'}/distro-info/$distro->{'base-name'}";
+ if (!-d $sharedDistroInfoDir) {
+ die _tr("unable to find shared distro-info in '%s'\n",
+ $sharedDistroInfoDir);
}
- $self->{'distro-info-dir'} = $distroInfoDir;
+ $self->{'shared-distro-info-dir'} = $sharedDistroInfoDir;
+ my $configDistroInfoDir
+ = "$openslxConfig{'config-path'}/distro-info/$distro->{'base-name'}";
+ if (!-d $configDistroInfoDir) {
+ die _tr("unable to find configurable distro-info in '%s'\n",
+ $configDistroInfoDir);
+ }
+ $self->{'config-distro-info-dir'} = $configDistroInfoDir;
$self->readDistroInfo();
}
@@ -407,7 +416,7 @@ sub readDistroInfo
my $bootstrap_packages = $self->{distro}->{config}->{'bootstrap-packages'};
my $metapackager_packages
= $self->{distro}->{config}->{'metapackager-packages'};
- my $file = "$self->{'distro-info-dir'}/settings";
+ my $file = "$self->{'config-distro-info-dir'}/settings";
if (-e $file) {
vlog 2, "reading configuration file $file...";
my $config = slurpFile($file);
@@ -554,6 +563,10 @@ try_next_url:
if (slxsystem("wget", @contFlags, "$url/$file") == 0) {
$foundFile = basename($file);
last;
+ } elsif ($! == 17) {
+ my $basefile = basename($file);
+ vlog 2, "removing left-over '$basefile' and trying again...";
+ unlink $basefile;
}
}
if (!defined $foundFile) {
@@ -706,13 +719,13 @@ sub stage1A_copyPrerequiredFiles
{
my $self = shift;
- return unless -d "$self->{'distro-info-dir'}/prereqfiles";
+ return unless -d "$self->{'shared-distro-info-dir'}/prereqfiles";
vlog 2, "copying folder with pre-required files...";
my $stage1cDir
= "$self->{'stage1aDir'}/$self->{'stage1bSubdir'}/$self->{'stage1cSubdir'}";
my $cmd = qq[
- tar --exclude=.svn -cp -C $self->{'distro-info-dir'}/prereqfiles . \\
+ tar -cp -C $self->{'shared-distro-info-dir'}/prereqfiles . \\
| tar -xp -C $stage1cDir
];
if (slxsystem($cmd)) {
@@ -726,27 +739,30 @@ sub stage1A_copyTrustedPackageKeys
{
my $self = shift;
- return unless -d "$self->{'distro-info-dir'}/trusted-package-keys";
-
vlog 2, "copying folder with trusted package keys...";
my $stage1bDir
= "$self->{'stage1aDir'}/$self->{'stage1bSubdir'}";
- my $cmd = qq[
- tar --exclude=.svn -cp -C $self->{'distro-info-dir'} trusted-package-keys \\
+ foreach my $folder (
+ $self->{'shared-distro-info-dir'}, $self->{'config-distro-info-dir'},
+ ) {
+ next unless -d "$folder/trusted-package-keys";
+ my $cmd = qq[
+ tar -cp -C $folder trusted-package-keys \\
| tar -xp -C $stage1bDir
- ];
- if (slxsystem($cmd)) {
- die _tr("unable to copy folder with trusted package keys to folder '%s' (%s)\n",
- $stage1bDir, $!);
- }
- slxsystem("chmod 444 $stage1bDir/trusted-package-keys/*");
-
- # install ultimately trusted keys (from distributor):
- my $stage1cDir
- = "$stage1bDir/$self->{'stage1cSubdir'}";
- my $keyDir = "$self->{'distro-info-dir'}/trusted-package-keys";
- if (-e "$keyDir/pubring.gpg") {
- copyFile("$keyDir/pubring.gpg", "$stage1cDir/usr/lib/rpm/gnupg");
+ ];
+ if (slxsystem($cmd)) {
+ die _tr("unable to copy folder with trusted package keys to folder '%s' (%s)\n",
+ "$stage1bDir/trusted-package-keys", $!);
+ }
+ slxsystem("chmod 444 $stage1bDir/trusted-package-keys/*");
+
+ # install ultimately trusted keys (from distributor):
+ my $stage1cDir
+ = "$stage1bDir/$self->{'stage1cSubdir'}";
+ my $keyDir = "$self->{'shared-distro-info-dir'}/trusted-package-keys";
+ if (-e "$keyDir/pubring.gpg") {
+ copyFile("$keyDir/pubring.gpg", "$stage1cDir/usr/lib/rpm/gnupg");
+ }
}
}
@@ -978,7 +994,8 @@ sub clone_determineIncludeExcludeList
{
my $self = shift;
- my $localFilterFile = "../lib/distro-info/clone-filter.local";
+ my $localFilterFile
+ = "$openslxConfig{'config-path'}/distro-info/clone-filter";
my $includeExcludeList = slurpFile($localFilterFile, 1);
$includeExcludeList .= $self->{distro}->{'clone-filter'};
$includeExcludeList =~ s[^\s+][]igms;
diff --git a/lib/distro-info/clone-filter.example b/lib/distro-info/clone-filter.example
new file mode 100644
index 00000000..14582c3c
--- /dev/null
+++ b/lib/distro-info/clone-filter.example
@@ -0,0 +1,14 @@
+# this file defines the filter rules used when cloning any vendor-OS
+#
+# copy this file to 'clone-filter' and add your own filters to it
+# in order to overrule the filters provided by openslx
+#
+#Examples:
+# the following line would include anything below /var/spool/
+#+ /var/spool/*
+#
+# this would exclude anything in /etc that starts with dhcpd.conf
+#- /etc/dhcpd.conf*
+#
+# and this would exclude all rpmnew-files:
+#- *.rpmnew
diff --git a/lib/distro-info/fedora-6/export-filter.example b/lib/distro-info/fedora-6/export-filter.example
new file mode 100644
index 00000000..a414fef4
--- /dev/null
+++ b/lib/distro-info/fedora-6/export-filter.example
@@ -0,0 +1,15 @@
+# this file defines the filter rules used when exporting a vendor-OS
+# of this distro
+#
+# copy this file to 'export-filter' and add your own filters to it
+# in order to overrule the filters provided by openslx
+#
+#Examples:
+# the following line would include anything below /var/spool/
+#+ /var/spool/*
+#
+# this would exclude anything in /etc that starts with dhcpd.conf
+#- /etc/dhcpd.conf*
+#
+# and this would exclude all rpmnew-files:
+#- *.rpmnew
diff --git a/lib/distro-info/fedora-6_x86_64/export-filter.example b/lib/distro-info/fedora-6_x86_64/export-filter.example
new file mode 100644
index 00000000..a414fef4
--- /dev/null
+++ b/lib/distro-info/fedora-6_x86_64/export-filter.example
@@ -0,0 +1,15 @@
+# this file defines the filter rules used when exporting a vendor-OS
+# of this distro
+#
+# copy this file to 'export-filter' and add your own filters to it
+# in order to overrule the filters provided by openslx
+#
+#Examples:
+# the following line would include anything below /var/spool/
+#+ /var/spool/*
+#
+# this would exclude anything in /etc that starts with dhcpd.conf
+#- /etc/dhcpd.conf*
+#
+# and this would exclude all rpmnew-files:
+#- *.rpmnew
diff --git a/lib/distro-info/suse-10.1/export-filter.example b/lib/distro-info/suse-10.1/export-filter.example
new file mode 100644
index 00000000..a414fef4
--- /dev/null
+++ b/lib/distro-info/suse-10.1/export-filter.example
@@ -0,0 +1,15 @@
+# this file defines the filter rules used when exporting a vendor-OS
+# of this distro
+#
+# copy this file to 'export-filter' and add your own filters to it
+# in order to overrule the filters provided by openslx
+#
+#Examples:
+# the following line would include anything below /var/spool/
+#+ /var/spool/*
+#
+# this would exclude anything in /etc that starts with dhcpd.conf
+#- /etc/dhcpd.conf*
+#
+# and this would exclude all rpmnew-files:
+#- *.rpmnew
diff --git a/lib/distro-info/suse-10.1_x86_64/export-filter.example b/lib/distro-info/suse-10.1_x86_64/export-filter.example
new file mode 100644
index 00000000..a414fef4
--- /dev/null
+++ b/lib/distro-info/suse-10.1_x86_64/export-filter.example
@@ -0,0 +1,15 @@
+# this file defines the filter rules used when exporting a vendor-OS
+# of this distro
+#
+# copy this file to 'export-filter' and add your own filters to it
+# in order to overrule the filters provided by openslx
+#
+#Examples:
+# the following line would include anything below /var/spool/
+#+ /var/spool/*
+#
+# this would exclude anything in /etc that starts with dhcpd.conf
+#- /etc/dhcpd.conf*
+#
+# and this would exclude all rpmnew-files:
+#- *.rpmnew
diff --git a/lib/distro-info/suse-10.2/export-filter.example b/lib/distro-info/suse-10.2/export-filter.example
index 96f0d3bc..a414fef4 100644
--- a/lib/distro-info/suse-10.2/export-filter.example
+++ b/lib/distro-info/suse-10.2/export-filter.example
@@ -1,5 +1,8 @@
-#add your own filters to this file and rename it to 'exclude-filter.local'
-#in order to overrule the filters provided by openslx
+# this file defines the filter rules used when exporting a vendor-OS
+# of this distro
+#
+# copy this file to 'export-filter' and add your own filters to it
+# in order to overrule the filters provided by openslx
#
#Examples:
# the following line would include anything below /var/spool/
diff --git a/lib/distro-info/suse-10.2_x86_64/export-filter.example b/lib/distro-info/suse-10.2_x86_64/export-filter.example
new file mode 100644
index 00000000..a414fef4
--- /dev/null
+++ b/lib/distro-info/suse-10.2_x86_64/export-filter.example
@@ -0,0 +1,15 @@
+# this file defines the filter rules used when exporting a vendor-OS
+# of this distro
+#
+# copy this file to 'export-filter' and add your own filters to it
+# in order to overrule the filters provided by openslx
+#
+#Examples:
+# the following line would include anything below /var/spool/
+#+ /var/spool/*
+#
+# this would exclude anything in /etc that starts with dhcpd.conf
+#- /etc/dhcpd.conf*
+#
+# and this would exclude all rpmnew-files:
+#- *.rpmnew