Hello community, here is the log from the commit of package suseRegister checked in at Fri Jul 7 11:23:41 CEST 2006. -------- --- suseRegister/suseRegister.changes 2006-05-09 19:08:29.000000000 +0200 +++ suseRegister/suseRegister.changes 2006-07-07 11:03:08.000000000 +0200 @@ -1,0 +2,20 @@ +Fri Jul 7 10:59:32 CEST 2006 - mc@suse.de + +- use uuidgen to create a guid if zmd is not available. + +------------------------------------------------------------------- +Mon Jul 3 16:42:51 CEST 2006 - mc@suse.de + +- add suseRegister-1.0.dif + - add unsupported type rce [#189444, #189781] + - fix incorrect sentence of a help text [#189408] + - make zmd-ostarget available to the registration server + [make fix possible for Bug #186220] + +------------------------------------------------------------------- +Fri Jun 2 11:22:29 CEST 2006 - mc@suse.de + +- partly fix for Bug #180820 + suse_register, rug/zmd, key signing problem + +------------------------------------------------------------------- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ suseRegister.spec ++++++ --- /var/tmp/diff_new_pack.xYjl4j/_old 2006-07-07 11:23:29.000000000 +0200 +++ /var/tmp/diff_new_pack.xYjl4j/_new 2006-07-07 11:23:29.000000000 +0200 @@ -11,9 +11,8 @@ # norootforbuild Name: suseRegister -BuildRequires: mono-core Version: 1.0 -Release: 62 +Release: 63 Summary: Registration tool Group: Productivity/Other License: GPL @@ -23,7 +22,7 @@ Requires: perl-XML-Parser Requires: perl-XML-Writer Requires: perl-URI -Requires: mono-core +Requires: /usr/bin/uuidgen Requires: coreutils Requires: sysconfig Requires: hwinfo @@ -67,6 +66,17 @@ /usr/lib/suseRegister/bin/* %changelog -n suseRegister +* Fri Jul 07 2006 - mc@suse.de +- use uuidgen to create a guid if zmd is not available. +* Mon Jul 03 2006 - mc@suse.de +- add suseRegister-1.0.dif +- add unsupported type rce [#189444, #189781] +- fix incorrect sentence of a help text [#189408] +- make zmd-ostarget available to the registration server + [make fix possible for Bug #186220] +* Fri Jun 02 2006 - mc@suse.de +- partly fix for Bug #180820 + suse_register, rug/zmd, key signing problem * Tue May 09 2006 - mc@suse.de - set connection timeout to 60 sec - do not print the secret to syslog ++++++ suseRegister-1.0.tar.bz2 ++++++ diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/suseRegister-1.0/Makefile new/suseRegister-1.0/Makefile --- old/suseRegister-1.0/Makefile 2006-05-09 19:02:01.000000000 +0200 +++ new/suseRegister-1.0/Makefile 2006-07-07 10:49:20.000000000 +0200 @@ -5,29 +5,22 @@ SYSCONFIGDIR = /etc LIBDIR = /usr/lib/suseRegister -SOURCE = create-guid.cs - BINARY = suse_register SRELEASE = suse_release -CGUID = create-guid.exe CONFIG = suseRegister.conf EXTRAS = COPYING COPYRIGHT.english Makefile TODO README -all: - mcs ${SOURCE} - -install: all +install: mkdir -p ${DESTDIR}/${BINDIR} mkdir -p ${DESTDIR}/${SYSCONFIGDIR} mkdir -p ${DESTDIR}/${LIBDIR}/bin install -m 755 ${BINARY} ${DESTDIR}/${BINDIR} install -m 755 ${SRELEASE} ${DESTDIR}/${LIBDIR}/bin/ - install -m 755 ${CGUID} ${DESTDIR}/${LIBDIR}/bin/ install -m 644 ${CONFIG} ${DESTDIR}/${SYSCONFIGDIR} dist: clean mkdir suseRegister-${VERSION} - cp -f ${EXTRAS} ${BINARY} ${SRELEASE} ${SOURCE} ${CONFIG} suseRegister-${VERSION}/ + cp -f ${EXTRAS} ${BINARY} ${SRELEASE} ${CONFIG} suseRegister-${VERSION}/ tar cfvj suseRegister-${VERSION}.tar.bz2 suseRegister-${VERSION}/ clean: diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/suseRegister-1.0/create-guid.cs new/suseRegister-1.0/create-guid.cs --- old/suseRegister-1.0/create-guid.cs 2006-05-09 19:02:01.000000000 +0200 +++ new/suseRegister-1.0/create-guid.cs 1970-01-01 01:00:00.000000000 +0100 @@ -1,11 +0,0 @@ -using System; - -public class CreateGuid -{ - public static void Main() - { - string guid = Guid.NewGuid ().ToString ("N"); - - Console.WriteLine(guid); - } -} \ No newline at end of file diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/suseRegister-1.0/suse_register new/suseRegister-1.0/suse_register --- old/suseRegister-1.0/suse_register 2006-05-09 19:02:01.000000000 +0200 +++ new/suseRegister-1.0/suse_register 2006-07-07 10:49:20.000000000 +0200 @@ -45,6 +45,7 @@ my $xmlout = 0; my $dumpfilehack = ""; my $dumpxmlfilehack = ""; +my $nozypp = 0; my $nooptional = 0; my $acceptmand = 0; my $forcereg = 0; @@ -73,6 +74,7 @@ my $zmdConfig = {}; my %availableSources = (); +my $ostarget = ""; my $recursion = 0; my $redirects = 0; @@ -91,8 +93,7 @@ #my $xenstoreread = "/usr/bin/xenstore-read"; #my $xenstorewrite = "/usr/bin/xenstore-write"; -my $mono = "/usr/bin/mono"; -my $createGuid = "/usr/lib/suseRegister/bin/create-guid.exe"; +my $createGuid = "/usr/bin/uuidgen"; my $initnooptional = 0; my $lastResponse = ""; @@ -400,6 +401,14 @@ } close SEC; } + elsif ($command =~ /^zmd-ostarget$/) + { + $cmd = undef; + + rugOSTarget(); + + $out = $ostarget; + } else { $out = "DISCARDED"; # command not allowed; reply DISCARDED @@ -1234,11 +1243,14 @@ mkdir "/etc/zmd" or logPrintExit("cannot create directory /etc/zmd: $!\n", 12); } - my $guid = `$mono $createGuid 2>/dev/null`; + my $guid = `$createGuid 2>/dev/null`; if(!defined $guid || $guid eq "") { logPrintExit("Cannot create guid", 13); } + chomp $guid; + $guid =~ s/-//g; # remove the - + open(ZMD, "> $GUID_FILE") or do { logPrintExit("cannot open file $GUID_FILE for write: $!\n", 12); }; @@ -1280,14 +1292,52 @@ if(defined $name && $name ne "" && defined $num && $num ne "") + { + if(defined $type && lc($type) eq "rce") + { + $availableSources{$num} = $uri; + } + else { $availableSources{$num} = $name; } + } } return 0; } +sub rugOSTarget +{ + my $msg = ""; + my $code = 1; + + $code = rugStart(); + + if(!$rugzmdInstalled) + { + # If rug/zmd are not installed we are done here. + syslog("info", "rug/zmd are not installed. finish."); + return 0; + } + + $msg = `LANG=en_US $rug --terse ping`; + $code = ($?>>8); + + foreach my $line (split("\n", $msg)) + { + if($line =~ /^OS\s+Target:\s*(.+)/) + { + if(defined $1 && $1 ne "") + { + $ostarget = $1; + } + } + } + + return $code; +} + sub rugProducts { my $t0 = [gettimeofday] if($time); @@ -1689,7 +1739,8 @@ print XMLD $zmdConfig->{$service}->{url}."\n"; syslog("info", "dumpfile write(zypp/yum):".$zmdConfig->{$service}->{url}); } - elsif($zmdConfig->{$service}->{type} eq "nu") + elsif($zmdConfig->{$service}->{type} eq "nu" || + $zmdConfig->{$service}->{type} eq "rce") { my $secret = ""; open(SEC, "< $SECRET_FILE") or do { @@ -1740,10 +1791,14 @@ my $catalogs = {}; next if($service eq "globalzmdoptions"); - + if($zmdConfig->{$service}->{type} eq "yum" || $zmdConfig->{$service}->{type} eq "zypp") { + # do not add sources of type zypp or yum if parameter --nozypp + # is given + next if($nozypp); + if(exists $zmdConfig->{$service}->{catalog} && ref($zmdConfig->{$service}->{catalog}) eq "HASH") @@ -1763,7 +1818,8 @@ $catalogs->{$name} = undef; } elsif($zmdConfig->{$service}->{type} eq "zenworks" || - $zmdConfig->{$service}->{type} eq "nu") + $zmdConfig->{$service}->{type} eq "nu" || + $zmdConfig->{$service}->{type} eq "rce") { $name = $zmdConfig->{$service}->{url}; $catalogs = $zmdConfig->{$service}->{catalog}; @@ -1894,8 +1950,7 @@ push @registerReadableText, "You can use the '-a' option multiple times.\n\n"; push @registerReadableText, "Example:\n\n"; push @registerReadableText, 'suse_register -a email="me@example.com"'."\n"; - push @registerReadableText, "\nIf you like to register your product manually,\n". - "you could use the following URL:\n\n"; + push @registerReadableText, "\nTo register your product manually, use the following URL:\n\n"; push @registerReadableText, "$registerManuallyURL\n\n"; } @@ -1903,8 +1958,7 @@ { unshift @registerReadableText, "<pre>"; push @registerReadableText, "</pre>"; - push @registerReadableText, "<p>If you like to register your product manually, ". - "you could use the following URL:</p>\n"; + push @registerReadableText, "<p>To register your product manually, use the following URL:</p>\n"; push @registerReadableText, "<pre>$registerManuallyURL</pre>\n\n"; } @@ -2168,6 +2222,7 @@ "xml-output" => \$xmlout, "dumpfile=s" => \$dumpfilehack, "dumpxmlfile=s" => \$dumpxmlfilehack, + "nozypp" => \$nozypp, "no-optional|n" => \$nooptional, "force-registration|f" => \$forcereg, "no-hw-data" => \$nohwdata, @@ -2247,6 +2302,7 @@ print STDERR "xml-output: $xmlout\n" if($debug); print STDERR "dumpfile: $dumpfilehack\n" if($debug); print STDERR "dumpxmlfile: $dumpxmlfilehack\n" if($debug); +print STDERR "nozypp: $nozypp\n" if($debug); print STDERR "no-optional: $nooptional\n" if($debug); print STDERR "forcereg: $forcereg\n" if($debug); print STDERR "no-hw-data: $nohwdata\n" if($debug); ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Remember to have fun... --------------------------------------------------------------------- To unsubscribe, e-mail: opensuse-commit-unsubscribe@opensuse.org For additional commands, e-mail: opensuse-commit-help@opensuse.org