summaryrefslogtreecommitdiffstats
path: root/src/installer/OpenSLX/OSExport/Distro
diff options
context:
space:
mode:
Diffstat (limited to 'src/installer/OpenSLX/OSExport/Distro')
-rw-r--r--src/installer/OpenSLX/OSExport/Distro/Any.pm66
-rw-r--r--src/installer/OpenSLX/OSExport/Distro/Base.pm71
-rw-r--r--src/installer/OpenSLX/OSExport/Distro/Debian.pm60
-rw-r--r--src/installer/OpenSLX/OSExport/Distro/Fedora.pm65
-rw-r--r--src/installer/OpenSLX/OSExport/Distro/Gentoo.pm59
-rw-r--r--src/installer/OpenSLX/OSExport/Distro/SciLin.pm94
-rw-r--r--src/installer/OpenSLX/OSExport/Distro/Suse.pm145
-rw-r--r--src/installer/OpenSLX/OSExport/Distro/Ubuntu.pm108
8 files changed, 668 insertions, 0 deletions
diff --git a/src/installer/OpenSLX/OSExport/Distro/Any.pm b/src/installer/OpenSLX/OSExport/Distro/Any.pm
new file mode 100644
index 00000000..dc3c7c8b
--- /dev/null
+++ b/src/installer/OpenSLX/OSExport/Distro/Any.pm
@@ -0,0 +1,66 @@
+# Copyright (c) 2006, 2007 - OpenSLX GmbH
+#
+# This program is free software distributed under the GPL version 2.
+# See http://openslx.org/COPYING
+#
+# If you have any feedback please consult http://openslx.org/feedback and
+# send your suggestions, praise, or complaints to feedback@openslx.org
+#
+# General information about OpenSLX can be found at http://openslx.org/
+# -----------------------------------------------------------------------------
+# OSExport/Distro/Any.pm
+# - provides generic overrides of the OSExport Distro API.
+# -----------------------------------------------------------------------------
+package OpenSLX::OSExport::Distro::Any;
+
+use strict;
+use warnings;
+
+use base qw(OpenSLX::OSExport::Distro::Base);
+
+use OpenSLX::Basics;
+
+################################################################################
+### implementation
+################################################################################
+sub new
+{
+ my $class = shift;
+ my $self = {
+ 'base-name' => 'any',
+ };
+ return bless $self, $class;
+}
+
+sub initDistroInfo
+{
+ my $self = shift;
+
+ $self->{'export-filter'} = "
+ + /var
+ - /var/tmp/*
+ - /var/spool/*
+ - /var/run/*
+ - /var/lock/*
+ - /var/log/*
+ - /var/lib/xdm
+ - /var/lib/smart
+ - /var/cache/yum
+ - /var/cache/man/*
+ - /usr/share/vmware/*
+ - /tmp/*
+ - /sys/*
+ - /proc/*
+ - /mnt/*
+ - /media/*
+ + /lib/modules/*/misc/vmblock.o
+ + /lib/modules/*/misc/vmnet.o
+ + /lib/modules/*/misc/vmmon.o
+ - /lib/klibc/events/*
+ - /boot/initrd*
+ - /boot/grub
+ ";
+ return;
+}
+
+1; \ No newline at end of file
diff --git a/src/installer/OpenSLX/OSExport/Distro/Base.pm b/src/installer/OpenSLX/OSExport/Distro/Base.pm
new file mode 100644
index 00000000..5223ce95
--- /dev/null
+++ b/src/installer/OpenSLX/OSExport/Distro/Base.pm
@@ -0,0 +1,71 @@
+# Copyright (c) 2006, 2007 - OpenSLX GmbH
+#
+# This program is free software distributed under the GPL version 2.
+# See http://openslx.org/COPYING
+#
+# If you have any feedback please consult http://openslx.org/feedback and
+# send your suggestions, praise, or complaints to feedback@openslx.org
+#
+# General information about OpenSLX can be found at http://openslx.org/
+# -----------------------------------------------------------------------------
+# OSExport/Distro/Base.pm
+# - provides base implementation of the OSExport Distro API.
+# -----------------------------------------------------------------------------
+package OpenSLX::OSExport::Distro::Base;
+
+use strict;
+use warnings;
+
+our $VERSION = 1.01; # API-version . implementation-version
+
+use Scalar::Util qw( weaken );
+
+use OpenSLX::Basics;
+
+################################################################################
+### interface methods
+################################################################################
+sub new
+{
+ confess "Creating OpenSLX::OSExport::Distro::Base-objects directly makes no sense!";
+}
+
+sub initialize
+{
+ my $self = shift;
+ my $engine = shift;
+
+ $self->{'engine'} = $engine;
+ weaken($self->{'engine'});
+ # avoid circular reference between distro and its engine
+
+ $self->initDistroInfo();
+ return;
+}
+
+sub initDistroInfo
+{
+}
+
+sub getSquashfsVersion
+{
+ my $self = shift;
+ my $distroVersion = shift;
+
+ return "4.0";
+}
+
+1;
+################################################################################
+
+=pod
+
+=head1 NAME
+
+OpenSLX::OSExport::Distro::Base
+
+=head1 SYNOPSIS
+
+...
+
+=cut
diff --git a/src/installer/OpenSLX/OSExport/Distro/Debian.pm b/src/installer/OpenSLX/OSExport/Distro/Debian.pm
new file mode 100644
index 00000000..98e9b42f
--- /dev/null
+++ b/src/installer/OpenSLX/OSExport/Distro/Debian.pm
@@ -0,0 +1,60 @@
+# Copyright (c) 2006, 2007 - OpenSLX GmbH
+#
+# This program is free software distributed under the GPL version 2.
+# See http://openslx.org/COPYING
+#
+# If you have any feedback please consult http://openslx.org/feedback and
+# send your suggestions, praise, or complaints to feedback@openslx.org
+#
+# General information about OpenSLX can be found at http://openslx.org/
+# -----------------------------------------------------------------------------
+# OSExport/Distro/Debian.pm
+# - provides Debian-specific overrides of the OSExport Distro API.
+# -----------------------------------------------------------------------------
+package OpenSLX::OSExport::Distro::Debian;
+
+use strict;
+use warnings;
+
+use base qw(OpenSLX::OSExport::Distro::Base);
+
+use OpenSLX::Basics;
+
+################################################################################
+### implementation
+################################################################################
+sub new
+{
+ my $class = shift;
+ my $self = {
+ 'base-name' => 'debian',
+ };
+ return bless $self, $class;
+}
+
+sub initDistroInfo
+{
+ my $self = shift;
+
+ $self->{'export-filter'} = "
+ - /var/tmp/*
+ - /var/spool/*
+ - /var/run/*
+ - /var/log/*
+ - /var/lib/xdm
+ - /var/cache/man/*
+ - /var/cache/apt/archives/*
+ - /usr/share/vmware/*
+ - /tmp/*
+ - /sys/*
+ - /proc/*
+ - /mnt/*
+ - /media/*
+ - /lib/klibc/events/*
+ - /boot/initrd*
+ - /boot/grub
+ ";
+ return;
+}
+
+1;
diff --git a/src/installer/OpenSLX/OSExport/Distro/Fedora.pm b/src/installer/OpenSLX/OSExport/Distro/Fedora.pm
new file mode 100644
index 00000000..4c196bd1
--- /dev/null
+++ b/src/installer/OpenSLX/OSExport/Distro/Fedora.pm
@@ -0,0 +1,65 @@
+# Copyright (c) 2006, 2007 - OpenSLX GmbH
+#
+# This program is free software distributed under the GPL version 2.
+# See http://openslx.org/COPYING
+#
+# If you have any feedback please consult http://openslx.org/feedback and
+# send your suggestions, praise, or complaints to feedback@openslx.org
+#
+# General information about OpenSLX can be found at http://openslx.org/
+# -----------------------------------------------------------------------------
+# OSExport/Distro/Fedora.pm
+# - provides Fedora-specific overrides of the OSExport Distro API.
+# -----------------------------------------------------------------------------
+package OpenSLX::OSExport::Distro::Fedora;
+
+use strict;
+use warnings;
+
+use base qw(OpenSLX::OSExport::Distro::Base);
+
+use OpenSLX::Basics;
+
+################################################################################
+### implementation
+################################################################################
+sub new
+{
+ my $class = shift;
+ my $self = {
+ 'base-name' => 'fedora',
+ };
+ return bless $self, $class;
+}
+
+sub initDistroInfo
+{
+ my $self = shift;
+
+ # TODO: check and refine this!
+ $self->{'export-filter'} = "
+ - /var/tmp/*
+ - /var/spool/*
+ - /var/run/*
+ - /var/lock/*
+ - /var/log/*
+ - /var/lib/xdm
+ - /var/lib/smart
+ - /var/cache/yum
+ - /var/cache/man/*
+ - /usr/share/vmware/*
+ - /tmp/*
+ - /sys/*
+ - /proc/*
+ - /mnt/*
+ - /media/*
+ - /lib/klibc/events/*
+ - /boot/initrd*
+ - /boot/grub
+ - *.rpmsave
+ - *.rpmnew
+ ";
+ return;
+}
+
+1; \ No newline at end of file
diff --git a/src/installer/OpenSLX/OSExport/Distro/Gentoo.pm b/src/installer/OpenSLX/OSExport/Distro/Gentoo.pm
new file mode 100644
index 00000000..79fa2210
--- /dev/null
+++ b/src/installer/OpenSLX/OSExport/Distro/Gentoo.pm
@@ -0,0 +1,59 @@
+# Copyright (c) 2006, 2007 - OpenSLX GmbH
+#
+# This program is free software distributed under the GPL version 2.
+# See http://openslx.org/COPYING
+#
+# If you have any feedback please consult http://openslx.org/feedback and
+# send your suggestions, praise, or complaints to feedback@openslx.org
+#
+# General information about OpenSLX can be found at http://openslx.org/
+# -----------------------------------------------------------------------------
+# OSExport/Distro/Gentoo.pm
+# - provides Gentoo-specific overrides of the OSExport Distro API.
+# -----------------------------------------------------------------------------
+package OpenSLX::OSExport::Distro::Gentoo;
+
+use strict;
+use warnings;
+
+use base qw(OpenSLX::OSExport::Distro::Base);
+
+use OpenSLX::Basics;
+
+################################################################################
+### implementation
+################################################################################
+sub new
+{
+ my $class = shift;
+ my $self = {
+ 'base-name' => 'gentoo',
+ };
+ return bless $self, $class;
+}
+
+sub initDistroInfo
+{
+ my $self = shift;
+
+ $self->{'export-filter'} = "
+ - /var/tmp/*
+ - /var/spool/*
+ - /var/run/*
+ - /var/log/*
+ - /var/lib/xdm
+ - /var/lib/init.d/*
+ - /var/cache/man/*
+ - /usr/share/vmware/*
+ - /tmp/*
+ - /sys/*
+ - /proc/*
+ - /mnt/*
+ - /media/*
+ - /boot/initrd*
+ - /boot/grub
+ ";
+ return;
+}
+
+1; \ No newline at end of file
diff --git a/src/installer/OpenSLX/OSExport/Distro/SciLin.pm b/src/installer/OpenSLX/OSExport/Distro/SciLin.pm
new file mode 100644
index 00000000..272b5cef
--- /dev/null
+++ b/src/installer/OpenSLX/OSExport/Distro/SciLin.pm
@@ -0,0 +1,94 @@
+# Copyright (c) 2006, 2007 - OpenSLX GmbH
+#
+# This program is free software distributed under the GPL version 2.
+# See http://openslx.org/COPYING
+#
+# If you have any feedback please consult http://openslx.org/feedback and
+# send your suggestions, praise, or complaints to feedback@openslx.org
+#
+# General information about OpenSLX can be found at http://openslx.org/
+# -----------------------------------------------------------------------------
+# OSExport/Distro/SciLin.pm
+# - provides SciLin-specific overrides of the OSExport Distro API.
+# -----------------------------------------------------------------------------
+package OpenSLX::OSExport::Distro::SciLin;
+
+use strict;
+use warnings;
+
+use base qw(OpenSLX::OSExport::Distro::Base);
+
+use OpenSLX::Basics;
+
+################################################################################
+### implementation
+################################################################################
+sub new
+{
+ my $class = shift;
+ my $self = {
+ 'base-name' => 'scilin',
+ };
+ return bless $self, $class;
+}
+
+sub initDistroInfo
+{
+ my $self = shift;
+
+ $self->{'export-filter'} = "
+ - /var/tmp/*
+ - /var/spool/*
+ - /var/run/*
+ - /var/mail
+ - /var/log/*
+ - /var/lock/*
+ - /var/lib/xdm
+ - /var/lib/vm*
+ - /var/lib/suspend*
+ - /var/lib/smart
+ - /var/lib/gdm/*
+ - /var/lib/dhcp*
+ - /var/lib/bluetooth/
+ - /var/cache/yum
+ - /var/cache/man/*
+ - /var/cache/zypp/*
+ + /usr/lib/python*/*/*.o
+ + /usr/lib/perl5/*/*/*/*.o
+ + /usr/lib/gcc/*/*/*.o
+ + /usr/lib/*.o
+ + /usr/X11R6/lib/modules/drivers/*.o
+ + /usr/X11R6/lib/modules/drivers/linux/*.o
+ - /usr/bin/BackGround
+ - /tmp/*
+ - /sys/*
+ - /proc/*
+ - /opt/kde3/share/apps/kdm/read_sysconfig.sh
+ - /opt/kde3/share/autostart/runupdater.desktop
+ - /opt/kde3/share/autostart/profile_chooser-autostart.desktop
+ - /opt/kde3/share/autostart/kinternet.desktop
+ - /usr/share/gnome/autostart/gpk-update-icon*.desktop
+ - /mnt/*
+ - /media/*
+ + /media
+ + /lib/modules/*/misc/vmblock.o
+ + /lib/modules/*/misc/vmnet.o
+ + /lib/modules/*/misc/vmmon.o
+ - /etc/*rpmnew
+ - /etc/*rpmorig
+ - /etc/*pptp*
+ - /etc/*ppp*
+ - /etc/dhcp*
+ - /etc/cron.*/*
+ - /etc/netplug*
+ - /etc/sysconfig/network*
+ - /etc/X11/xkb
+ - /boot/initrd*
+ - /boot/grub
+ - *.rpmsave
+ - *.rpmnew
+ ";
+ return;
+}
+
+1;
diff --git a/src/installer/OpenSLX/OSExport/Distro/Suse.pm b/src/installer/OpenSLX/OSExport/Distro/Suse.pm
new file mode 100644
index 00000000..9e62e6e5
--- /dev/null
+++ b/src/installer/OpenSLX/OSExport/Distro/Suse.pm
@@ -0,0 +1,145 @@
+# Copyright (c) 2006, 2007 - OpenSLX GmbH
+#
+# This program is free software distributed under the GPL version 2.
+# See http://openslx.org/COPYING
+#
+# If you have any feedback please consult http://openslx.org/feedback and
+# send your suggestions, praise, or complaints to feedback@openslx.org
+#
+# General information about OpenSLX can be found at http://openslx.org/
+# -----------------------------------------------------------------------------
+# OSExport/Distro/Suse.pm
+# - provides SUSE-specific overrides of the OSExport Distro API.
+# -----------------------------------------------------------------------------
+package OpenSLX::OSExport::Distro::Suse;
+
+use strict;
+use warnings;
+
+use base qw(OpenSLX::OSExport::Distro::Base);
+
+use OpenSLX::Basics;
+
+################################################################################
+### implementation
+################################################################################
+sub new
+{
+ my $class = shift;
+ my $self = {
+ 'base-name' => 'suse',
+ };
+ return bless $self, $class;
+}
+
+sub initDistroInfo
+{
+ my $self = shift;
+
+ $self->{'export-filter'} = "
+ - /var/tmp/*
+ - /var/spool/*
+ - /var/run/*
+ + /var/run/screen
+ - /var/mail
+ - /var/log/*
+ - /var/lock/*
+ - /var/lib/zypp/*
+ - /var/lib/zmd
+ - /var/lib/xdm
+ - /var/lib/vm*
+ - /var/lib/suspend*
+ - /var/lib/smart
+ - /var/lib/sax
+ - /var/lib/hardware/*
+ - /var/lib/gdm/*
+ - /var/lib/dhcp*
+ - /var/lib/bluetooth/
+ - /var/lib/YaST2/you/mnt/*
+ - /var/lib/YaST2/backup_boot_sectors
+ - /var/cache/sax
+ - /var/cache/libx11/compose/*
+ - /var/cache/beagle
+ - /var/cache/yum
+ - /var/cache/man/*
+ - /var/cache/zypp/*
+ - /var/adm/backup/rpmdb/*
+ - /var/adm/mount/AP*
+ - /var/adm/SuSEconfig
+ - /usr/share/vmware/*
+ - /usr/lib/zen-updater
+ + /usr/lib/python*/*/*.o
+ + /usr/lib/perl5/*/*/*/*.o
+ + /usr/lib/gcc/*/*/*.o
+ + /usr/lib/*.o
+ + /usr/X11R6/lib/modules/drivers/*.o
+ + /usr/X11R6/lib/modules/drivers/linux/*.o
+ - /usr/bin/zen-*
+ - /usr/bin/nw-manager
+ - /usr/X11R6/bin/BackGround
+ - /usr/bin/BackGround
+ - /usr/share/autostart/SUSEgreeter.desktop
+ - /tmp/*
+ - /sys/*
+ - /proc/*
+ - /opt/kde3/share/apps/kdm/read_sysconfig.sh
+ - */autostart/suseplugger.desktop
+ - */autostart/susewatcher.desktop
+ - */autostart/runupdater.desktop
+ - */autostart/profile_chooser-autostart.desktop
+ - */autostart/opensuseupdater.desktop
+ - */autostart/knetworkmanager-autostart.desktop
+ - */autostart/kerry.autostart.desktop
+ - */autostart/kinternet.desktop
+ - */autostart/SUSEgreeter.desktop
+ - */autostart/zen-updater-auto.desktop
+ - */autostart/beagle*.desktop
+ - */autostart/gpk-update-icon*.desktop
+ - */autostart/kupdateapplet.desktop
+ - */config/SuSE/default/kupdateapplet.*
+ - */config/SuSE/default/*.live
+ - */config/SuSE/default/*beagle*
+ - /mnt/*
+ - /media/*
+ + /media
+ + /lib/modules/*/misc/vmblock.o
+ + /lib/modules/*/misc/vmnet.o
+ + /lib/modules/*/misc/vmmon.o
+ - /etc/*rpmnew
+ - /etc/*rpmorig
+ - /etc/*YaST2save
+ - /etc/*pptp*
+ - /etc/*ppp*
+ - /etc/dhcp*
+ - /etc/cron.*/*
+ - /etc/sysconfig/network/ifcfg-*
+ - /etc/X11/xdm/SuSEconfig.xdm
+ - /boot/initrd*
+ - /boot/grub
+ - *.rpmsave
+ - *.rpmnew
+ - *.YaST2save
+ ";
+ return;
+}
+
+
+sub getSquashfsVersion
+{
+ my $self = shift;
+ my $distroVersion = shift;
+
+ my %versionMap = (
+ '11.0' => '3.2',
+ '11.1' => '3.2',
+ '11.2' => '3.3',
+ '11.3' => '4.0'
+ );
+
+ my $distroDefault = '4.0';
+
+ return $versionMap{$distroVersion} || $distroDefault;
+}
+
+
+1;
diff --git a/src/installer/OpenSLX/OSExport/Distro/Ubuntu.pm b/src/installer/OpenSLX/OSExport/Distro/Ubuntu.pm
new file mode 100644
index 00000000..3826f019
--- /dev/null
+++ b/src/installer/OpenSLX/OSExport/Distro/Ubuntu.pm
@@ -0,0 +1,108 @@
+# Copyright (c) 2006, 2007 - OpenSLX GmbH
+#
+# This program is free software distributed under the GPL version 2.
+# See http://openslx.org/COPYING
+#
+# If you have any feedback please consult http://openslx.org/feedback and
+# send your suggestions, praise, or complaints to feedback@openslx.org
+#
+# General information about OpenSLX can be found at http://openslx.org/
+# -----------------------------------------------------------------------------
+# OSExport/Distro/Ubuntu.pm
+# - provides Ubuntu-specific overrides of the OSExport Distro API.
+# -----------------------------------------------------------------------------
+package OpenSLX::OSExport::Distro::Ubuntu;
+
+use strict;
+use warnings;
+
+use base qw(OpenSLX::OSExport::Distro::Base);
+
+use OpenSLX::Basics;
+
+################################################################################
+### implementation
+################################################################################
+sub new
+{
+ my $class = shift;
+ my $self = {
+ 'base-name' => 'ubuntu',
+ };
+ return bless $self, $class;
+}
+
+sub initDistroInfo
+{
+ my $self = shift;
+
+ $self->{'export-filter'} = "
+ - /var/tmp/*
+ - /var/spool/*
+ - /var/run/*
+ + /var/run/screen
+ - /var/log/*
+ - /var/log/apt/*
+ + /var/log/apt
+ - /var/lib/*dm/*
+ - /var/lib/libnss-ldap/*
+ - /var/cache/apt/archives/*
+ + /var/cache/apt/archives/partial
+ - /var/cache/man/*
+ - /var/cache/nscd/*
+ - /usr/share/vmware/*
+ - /usr/share/autostart/trackerd.desktop
+ - /usr/share/autostart/knetworkmanager.desktop
+ - /etc/update-motd.d/90*
+ - /etc/update-motd.d/91*
+ - /etc/update-motd.d/98*
+ - /tmp/*
+ - /sys/*
+ - /proc/*
+ - /mnt/*
+ - /media/*
+ - /lib/udev/devices
+ - /initrd*
+ - /etc/cron.*/*
+ - /boot/initrd*
+ - /boot/grub
+ - /etc/xdg/compiz
+ - /etc/xdg/autostart/adept_notifier_auto.desktop
+ - /etc/xdg/autostart/evolution*alarm*notify*
+ - /etc/xdg/autostart/knetworkmanager*
+ - /etc/xdg/autostart/nm-applet.desktop
+ - /etc/xdg/autostart/system-config-printer-applet-kde.desktop
+ - /etc/xdg/autostart/tracker*
+ - /etc/xdg/autostart/jockey-*
+ - /etc/xdg/autostart/ica*
+ - /etc/xdg/autostart/hplip*
+ - /etc/xdg/autostart/redhat*
+ - /etc/xdg/autostart/gnome-power-manager*
+ - /etc/xdg/autostart/update*
+ - /etc/xdg/update-notifier.desktop
+ - /etc/xdg/user-dirs-update-gtk.desktop
+ ";
+ return;
+}
+
+
+sub getSquashfsVersion
+{
+ my $self = shift;
+ my $distroVersion = shift;
+
+ my %versionMap = (
+ '8.04' => '3.3',
+ '8.10' => '3.3',
+ '9.04' => '3.3',
+ '9.10' => '4.0',
+ '10.04' => '4.0'
+ );
+
+ my $distroDefault = '4.0';
+
+ return $versionMap{$distroVersion} || $distroDefault;
+}
+
+
+1;