Hi,

attached you will find our openSUSE 10.2 patch.
Could you please test it?

Regards
-- 
Marvin Stark, Berater
Tel.: +49 (0)21 61 / 46 43-194

credativ GmbH, HRB Mönchengladbach 12080
Hohenzollernstr. 133, 41061 Mönchengladbach
Geschäftsführung: Dr. Michael Meskes, Jörg Folz
diff -ru oscar-5.0/lib/OSCAR/OCA/OS_Detect/openSUSE.pm oscar-5.0-openSUSE-10.2/lib/OSCAR/OCA/OS_Detect/openSUSE.pm
--- oscar-5.0/lib/OSCAR/OCA/OS_Detect/openSUSE.pm	2007-08-24 14:31:20.000000000 +0200
+++ oscar-5.0-openSUSE-10.2/lib/OSCAR/OCA/OS_Detect/openSUSE.pm	2007-08-24 14:25:38.000000000 +0200
@@ -0,0 +1,95 @@
+#!/usr/bin/env perl
+#
+# Copyright (c) 2005 The Trustees of Indiana University.  
+#                    All rights reserved.
+# Copyright (c) 2005-2006 Bernard Li <[EMAIL PROTECTED]>
+#                         All rights reserved.
+# Copyright (c) 2005, Revolution Linux
+#
+# Copyright (c) Erich Focht <[EMAIL PROTECTED]>
+#                    All rights reserved.
+#      - complete rewrite to enable use on top of images
+#      - enabled use on top of package pools
+#
+# Copyright (c) 2007 Marvin Stark <[EMAIL PROTECTED]>
+#      - Changed SuSE.pm file for detecting openSUSE
+# 
+# This file is part of the OSCAR software package.  For license
+# information, see the COPYING file in the top level directory of the
+# OSCAR source distribution.
+#
+# $Id: SuSE.pm 5398 2006-10-10 16:21:55Z efocht $
+#
+
+package OCA::OS_Detect::SuSE;
+
+use strict;
+
+my $distro = "suse";
+my $compat_distro = "suse";
+my $pkg = "rpm";
+my $detect_package = "openSUSE-release";
+my $detect_file = "/bin/bash";
+
+sub detect_dir {
+    my ($root) = @_;
+    my $release_string;
+
+    # If /etc/SuSE-release exists, continue, otherwise, quit.
+    if (-f "$root/etc/SuSE-release") {
+	$release_string = `cat $root/etc/SuSE-release`;
+    } else {
+	return undef;
+    }
+
+    my $id = {
+	os => "linux",
+	chroot => $root,
+    };
+
+    if (($release_string =~ /SUSE LINUX (\d+.\d+)/) ||
+	($release_string =~ /openSUSE (\d+.\d+)/)){
+	my $os_version = $1;
+        $id->{distro} = $distro;
+        $id->{distro_version} = $os_version;
+        $id->{compat_distro} = $compat_distro;
+        $id->{compat_distrover} = $os_version;
+        $id->{pkg} = $pkg;
+    } else {
+	return undef;
+    }
+
+    # this hash contains all info necessary for identifying the OS
+
+    # determine architecture
+    my $arch = main::OSCAR::OCA::OS_Detect::detect_arch_file($root,$detect_file);
+    $id->{arch} = $arch;
+
+    # Make final string
+    $id->{ident} = "$id->{os}-$id->{arch}-$id->{distro}-$id->{distro_version}";
+
+    return $id;
+}
+
+sub detect_pool {
+    my ($pool) = @_;
+
+    my $id = main::OSCAR::OCA::OS_Detect::detect_pool_rpm($pool,
+							  $detect_package,
+							  $distro,
+							  $compat_distro);
+
+    return $id;
+}
+
+sub detect_fake {
+    my ($fake) = @_;
+    my $id = main::OSCAR::OCA::OS_Detect::detect_fake_common($fake,
+							     $distro,
+							     $compat_distro,
+							     $pkg);
+    return $id;
+}
+
+# If we got here, we're happy
+1;
diff -ru oscar-5.0/lib/OSCAR/OCA/OS_Detect.pm oscar-5.0-openSUSE-10.2/lib/OSCAR/OCA/OS_Detect.pm
--- oscar-5.0/lib/OSCAR/OCA/OS_Detect.pm	2006-09-27 20:09:42.000000000 +0200
+++ oscar-5.0-openSUSE-10.2/lib/OSCAR/OCA/OS_Detect.pm	2007-08-24 14:26:15.000000000 +0200
@@ -119,17 +119,28 @@
 
 # Determine architecture by checking the executable type of a wellknown
 # program
+
 sub detect_arch_file {
     my ($root,$file) = @_;
     my $arch="unknown";
     my $q = `env LC_ALL=C file $root/$file`;
-    if ($q =~ m/executable,\ \S+\ (\S+),\ version/) {
-	$arch = $1;
-	if ($arch =~ m/386$/) {
-	    $arch = "i386";
-	} elsif ($arch =~ m/x86-64/) {
-	    $arch = "x86_64";
-	}
+    if ( ($q =~ m/executable,\ \S+\ (\S+),\ version/) ||
+         ($q =~ m/executable,\ (\S+),\ version/) ||
+         ($q =~ m/object,\ \S+ (\S+),\ version/) ) {
+        $arch = $1;
+        if ($arch =~ m/386$/) {
+            $arch = "i386";
+        } elsif ($arch =~ m/x86-64/) {
+            $arch = "x86_64";
+        }
+    }
+    # DIKIM added this for YDL5
+    if ($q =~ m/executable,\ (\S+)\ \S+\ \S+\ \S+,\ version/) {
+        $arch = $1;
+        if ($arch =~ m/PowerPC/){
+            chomp(my $q2 = `uname -p`);
+            $arch = $q2;
+        }
     }
     return $arch;
 }
@@ -187,10 +198,12 @@
     if (! -d "$pool") {
 	return undef;
     }
+    
     my @files = glob("$pool/$detect_package"."-"."*.rpm");
     if (!scalar(@files)) {
 	return undef;
     }
+
     # these packages have simple version strings!
     my ($version,$flavor);
     for my $f (@files) {
diff -ru oscar-5.0/oscarsamples/suse-10.2-x86_64.rpmlist oscar-5.0-openSUSE-10.2/oscarsamples/suse-10.2-x86_64.rpmlist
--- oscar-5.0/oscarsamples/suse-10.2-x86_64.rpmlist	2007-08-24 14:30:34.000000000 +0200
+++ oscar-5.0-openSUSE-10.2/oscarsamples/suse-10.2-x86_64.rpmlist	2007-08-24 14:23:58.000000000 +0200
@@ -0,0 +1,157 @@
+SuSEfirewall2
+aaa_base
+aaa_skel
+acl
+acpid
+alsa
+ash
+at
+attr
+bash
+bc
+bind-utils
+binutils
+busybox
+bzip2
+convmv
+coreutils
+cpio
+cpp
+cracklib
+cron
+curl
+cyrus-sasl
+db
+device-mapper
+devs
+dhcpcd
+dialog
+diffutils
+e2fsprogs
+ed
+eject
+ethtool
+evms
+fbset
+file
+filesystem
+fillup
+findutils
+finger
+gawk
+gdbm
+glibc
+glibc-locale
+gpart
+gpm
+grep
+groff
+grub
+gzip
+hdparm
+heimdal-lib
+hotplug
+hwinfo
+info
+initviocons
+insserv
+iproute2
+iptables
+iputils
+isapnp
+jfsutils
+kbd
+kernel-default
+ksymoops
+ldapcpplib
+less
+libacl
+libattr
+libgcc
+libstdc++
+libxcrypt
+libxml2
+libxslt
+liby2util
+logrotate
+lsof
+mailx
+man
+make
+mdadm
+mingetty
+mkinitrd
+mktemp
+module-init-tools
+ncurses
+net-tools
+netcfg
+ntfsprogs
+openldap2-client
+openslp
+openslp-server
+openssh
+openssl
+pam
+pam-modules
+parted
+pciutils
+pcre
+perl
+perl-Config-Crontab
+perl-Digest-SHA1
+perl-gettext
+perl-DBD-mysql
+perl-File-HomeDir
+permissions
+popt
+portmap
+postfix
+powersave
+procinfo
+procmail
+procps
+providers
+psmisc
+pwdutils
+readline
+recode
+reiserfs
+release-notes
+resmgr
+rpm
+rsh
+sash
+scpm
+scsi
+sed
+siga
+sitar
+src_vipa
+suse-build-key
+suse-release
+sysconfig
+syslogd
+sysvinit
+tar
+tcl
+tcpd
+tcsh
+telnet
+terminfo
+timezone
+udev
+usbutils
+utempter
+util-linux
+vim
+w3m
+xfsprogs
+zlib
+rsync 
+gcc
+gcc-c++
+gcc-fortran
+libcap
+glibc-devel
+libstdc++-devel
diff -ru oscar-5.0/packages/ntpconfig/config.xml oscar-5.0-openSUSE-10.2/packages/ntpconfig/config.xml
--- oscar-5.0/packages/ntpconfig/config.xml	2006-09-27 20:14:41.000000000 +0200
+++ oscar-5.0-openSUSE-10.2/packages/ntpconfig/config.xml	2007-08-24 14:23:58.000000000 +0200
@@ -37,29 +37,17 @@
   <binary-package-list>
       <filter>
         <distribution>
-          <name>fc</name>
+          <name>suse</name>
         </distribution>
       </filter>
 
       <filter>
         <distribution>
-          <name>mdk</name>
-        </distribution>
-      </filter>
-  
-      <filter>
-        <distribution>
-          <name>mdv</name>
-        </distribution>
-      </filter>
-
-      <filter>
-        <distribution>
-          <name>rhel</name>
+          <name>opensuse</name>
         </distribution>
       </filter>
 
-      <pkg>ntp</pkg>
+      <pkg>xntp</pkg>
   </binary-package-list>
 
 </oscar>
diff -ru oscar-5.0/packages/ntpconfig/scripts/post_rpm_install oscar-5.0-openSUSE-10.2/packages/ntpconfig/scripts/post_rpm_install
--- oscar-5.0/packages/ntpconfig/scripts/post_rpm_install	2006-09-27 20:14:41.000000000 +0200
+++ oscar-5.0-openSUSE-10.2/packages/ntpconfig/scripts/post_rpm_install	2007-08-24 14:23:58.000000000 +0200
@@ -33,7 +33,7 @@
 # SUSE Linux's ntpd initscript name is "ntp"
 $ntpd = "ntp" if -x "/etc/init.d/ntp";
 
-open(CONF, $ntp_conf) or croak("Error: unable to open ($ntp_conf)\n");
+open(CONF, $ntp_conf) or croak("Error: unable to open ($ntp_conf)\n" . `ls -l /etc`);
 
 while ($line = <CONF>) {
     $ntpBuffer = $ntpBuffer.$line;
diff -ru oscar-5.0/packages/sis/config.xml oscar-5.0-openSUSE-10.2/packages/sis/config.xml
--- oscar-5.0/packages/sis/config.xml	2006-11-08 00:55:59.000000000 +0100
+++ oscar-5.0-openSUSE-10.2/packages/sis/config.xml	2007-08-24 14:23:58.000000000 +0200
@@ -87,6 +87,17 @@
 
   <binary-package-list>
       <filter>
+        <group>oscar_clients</group>
+        <distribution>
+             <name>suse</name>
+             <version>10.2</version>
+        </distribution>
+      </filter>
+      <pkg>perl-File-HomeDir</pkg>
+  </binary-package-list>
+
+  <binary-package-list>
+      <filter>
         <group>oscar_server</group>
       </filter>
       <pkg>systeminstaller-oscar</pkg>
@@ -124,6 +135,17 @@
       <filter>
         <group>oscar_server</group>
         <distribution>
+             <name>suse</name>
+             <version>10.2</version>
+        </distribution>
+      </filter>
+      <pkg>perl-File-HomeDir</pkg>
+  </binary-package-list>
+
+  <binary-package-list>
+      <filter>
+        <group>oscar_server</group>
+        <distribution>
              <name>rhel</name>
         </distribution>
       </filter>
diff -ru oscar-5.0/share/prereqs/base/prereq.cfg oscar-5.0-openSUSE-10.2/share/prereqs/base/prereq.cfg
--- oscar-5.0/share/prereqs/base/prereq.cfg	2006-09-27 20:02:03.000000000 +0200
+++ oscar-5.0-openSUSE-10.2/share/prereqs/base/prereq.cfg	2007-08-24 14:23:58.000000000 +0200
@@ -70,6 +70,7 @@
 !lam
 
 [redhat*|centos*|scientificlinux*:*:*]
+bind
 dhcp
 gd
 nfs-utils
@@ -91,7 +92,7 @@
 !tftp-server.$arch
 !lam
 
-[*suse*:10*:*]
+[*suse*:10.0:*]
 dhcp-server
 gd
 nfs-utils
@@ -117,6 +118,32 @@
 !mpich-devel
 !OpenPBS*
 
+[*suse*:10.2:*]
+dhcp-server
+gd
+nfs-utils
+openssh
+openssl
+tcpdump
+xinetd
+apache2
+apache2-mod_php5
+php5
+expat
+python
+zlib
+zlib-devel
+pwdutils
+libcap
+xntp
+perl-libwww-perl
+!tftp-server.$arch
+!lam
+!lam-devel
+!mpich
+!mpich-devel
+!OpenPBS*
+
 [debian:3:i386]
 !tftpd
 libdbi-perl
-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/
_______________________________________________
Oscar-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/oscar-devel

Reply via email to