Hello community, here is the log from the commit of package inst-source-utils for openSUSE:Factory checked in at 2014-03-05 15:36:41 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/inst-source-utils (Old) and /work/SRC/openSUSE:Factory/.inst-source-utils.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "inst-source-utils" Changes: -------- --- /work/SRC/openSUSE:Factory/inst-source-utils/inst-source-utils.changes 2014-02-28 16:22:23.000000000 +0100 +++ /work/SRC/openSUSE:Factory/.inst-source-utils.new/inst-source-utils.changes 2014-03-05 15:36:44.000000000 +0100 @@ -1,0 +2,7 @@ +Tue Mar 4 16:47:58 CET 2014 - [email protected] + +- add ABXML.pm and ABStructured.pm +- rewrite rezip_repo_rsyncable to keep checksum type +- add requires for perl-XML-Parser + +------------------------------------------------------------------- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ inst-source-utils.spec ++++++ --- /var/tmp/diff_new_pack.g0hHI0/_old 2014-03-05 15:36:45.000000000 +0100 +++ /var/tmp/diff_new_pack.g0hHI0/_new 2014-03-05 15:36:45.000000000 +0100 @@ -29,6 +29,7 @@ Obsoletes: autoyast2-utils <= 2.14.10 Provides: autoyast2-utils = 2.14.10 Recommends: create-repo-utils +Requires: perl-XML-Parser Source: inst-source-utils.tar.bz2 Source1: split.pl BuildRoot: %{_tmppath}/%{name}-%{version}-build ++++++ inst-source-utils.tar.bz2 ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/inst-source-utils/usr/bin/rezip_repo_rsyncable new/inst-source-utils/usr/bin/rezip_repo_rsyncable --- old/inst-source-utils/usr/bin/rezip_repo_rsyncable 2014-02-25 15:36:17.000000000 +0100 +++ new/inst-source-utils/usr/bin/rezip_repo_rsyncable 2014-03-04 13:37:49.000000000 +0100 @@ -1,45 +1,56 @@ #!/usr/bin/perl +BEGIN { + $abuild_base_dir = "/usr/share/inst-source-utils"; + unshift @INC, "$abuild_base_dir/modules"; +} + + use strict; use File::stat; +use ABStructured ':bytes'; +use ABXML; +use Digest; + sub GenerateRepomdXml { - my ($patches_directory) = @_; - opendir(PDIR,"$patches_directory"); - my @all_patches = grep {/\.xml(\.gz)?$/} readdir(PDIR); - closedir(PDIR); - open (NEWDIR,">$patches_directory/repomd.xml"); - print NEWDIR "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n"; - print NEWDIR "<repomd xmlns=\"http://linux.duke.edu/metadata/repo\">\n"; - my $pdirname = $patches_directory; - $pdirname =~ s/^.*\///; - for (@all_patches) { - next if (/^patch-/); - next if (/^repomd/); - my ($checksum,$dummy) = split('\s+',`sha1sum "$patches_directory/$_"`); - my $o_checksum = $checksum; - if ( /\.gz/ ) { - ($o_checksum,my $dummy) = split('\s+',`gzip -dc "$patches_directory/$_" | sha1sum`); - } - my $timestamp = stat("$patches_directory/$_")->mtime; - my $filename = $_; - $_ =~ s/.xml(\.gz)?$//; - print NEWDIR " <data type=\"$_\">\n"; - print NEWDIR " <location href=\"$pdirname/$filename\"/>\n"; - print NEWDIR " <checksum type=\"sha\">$checksum</checksum>\n"; - print NEWDIR " <timestamp>$timestamp</timestamp>\n"; - print NEWDIR " <open-checksum type=\"sha\">$o_checksum</open-checksum>\n"; - print NEWDIR " </data>\n"; + my ($repodir) = @_; + my $repobase = $repodir; + $repobase =~ s/\/repodata//; + open (REPOMD, "<", "$repodir/repomd.xml"); + my $repomd_raw = join("",<REPOMD>); + close (REPOMD); + my $repomd = XMLin($ABXML::repomd, $repomd_raw); + for my $record (@{$repomd->{'data'}}) { + my $filename = $record->{'location'}->{'href'}; + my $checksumstring = $record->{'checksum'}->{'type'}; + my $checksumtype = uc($checksumstring); + $checksumtype =~ s/([0-9]+)/-$1/; + $checksumtype .= "-1" unless $checksumtype =~ /[0-9]/; + open(REC, "<", "$repobase/$filename"); + my $ctx = Digest->new($checksumtype); + $ctx->addfile(*REC); + my $newfilechksum = $ctx->hexdigest(); + close (REC); + my $nstat = stat("$repobase/$filename"); + my $newfiletime = $nstat->mtime; + my $newfilesize = $nstat->size; + $record->{'checksum'} = { 'type' => $checksumstring, '_content' => $newfilechksum }; + $record->{'timestamp'} = $newfiletime; + $record->{'size'} = $newfilesize if $record->{'size'}; } - print NEWDIR "</repomd>\n"; - close ( NEWDIR ); + + open (REPOMD, ">", "$repodir/repomd.xml"); + print REPOMD "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n"; + print REPOMD XMLout($ABXML::repomd, $repomd); + close (REPOMD); } my $rsyncable = ""; my $arg = shift @ARGV; -my $tmpdir = `mktemp -d /tmp/mk_listings.XXXXXX`; +my $tmpdir = `mktemp -d /tmp/rezip_repo_rsyncable.XXXXXX`; chomp ($tmpdir); if ( $arg ) { die("need an argument") unless ( -d $arg ); @@ -51,6 +62,8 @@ $arg = "$pwd/$arg"; } +$arg .= "/repodata" unless $arg =~ /\/repodata/; + system ("touch", "$tmpdir/fff"); system (`gzip --rsyncable "$tmpdir/fff" >/dev/null 2>/dev/null`); if ( -f "$tmpdir/fff.gz" ) { @@ -69,7 +82,6 @@ $has_sign = "1" if ( -f "$arg/repomd.xml.asc" ); system ("cp", "-a", "$arg/repomd.xml.key", $tmpdir) if ( -f "$arg/repomd.xml.key" ); if ( -f "$arg/repomd.xml" ) { - unlink "$arg/repomd.xml"; GenerateRepomdXml($arg); } if ( $has_sign ) { diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/inst-source-utils/usr/share/inst-source-utils/modules/ABStructured.pm new/inst-source-utils/usr/share/inst-source-utils/modules/ABStructured.pm --- old/inst-source-utils/usr/share/inst-source-utils/modules/ABStructured.pm 1970-01-01 01:00:00.000000000 +0100 +++ new/inst-source-utils/usr/share/inst-source-utils/modules/ABStructured.pm 2014-03-04 13:37:49.000000000 +0100 @@ -0,0 +1,532 @@ + +package ABStructured; + +use vars qw($VERSION @ISA @EXPORT); + +require Exporter; +@ISA = qw(Exporter); +@EXPORT = qw(XMLin XMLinfile XMLout); +$VERSION = '1.0'; + +use XML::Parser; +use Encode; + +use strict; + +our $bytes; + +sub import { + $bytes = 1 if grep {$_ eq ':bytes'} @_; + __PACKAGE__->export_to_level(1, grep {$_ ne ':bytes'} @_); +} + +sub _workin { + my ($how, $out, $ain, @in) = @_; + my @how = @$how; + my $am = shift @how; + + my %known = map {ref($_) ? (!@$_ ? () : (ref($_->[0]) ? $_->[0]->[0] : $_->[0] => $_)) : ($_=> $_)} @how; + for my $a (keys %$ain) { + die("unknown attribute: $a\n") unless $known{$a}; + if (ref($known{$a})) { + die("attribute '$a' must be element\n") if @{$known{$a}} > 1 || ref($known{$a}->[0]); + push @{$out->{$a}}, $ain->{$a}; + } else { + die("attribute '$a' must be singleton\n") if exists $out->{$a}; + $out->{$a} = $ain->{$a}; + Encode::_utf8_off($out->{$a}) if $bytes; + } + } + while (@in) { + my ($e, $v) = splice(@in, 0, 2); + my $ke = $known{$e}; + if ($e eq '0') { + next if $v =~ /^\s*$/s; + die("element '$am' contains content\n") unless $known{'_content'}; + Encode::_utf8_off($v) if $bytes; + $v =~ s/\s+$/ /s; + $v =~ s/^\s+/ /s; + if (exists $out->{'_content'}) { + $out->{'_content'} =~ s/ $//s if $v =~ /^ /s; + $out->{'_content'} .= $v; + } else { + $out->{'_content'} = $v; + } + next; + } + if (!$ke && $known{''}) { + $ke = $known{''}; + $v = [{}, $e, $v]; + $e = ''; + } + die("unknown element: $e\n") unless $ke; + if (!ref($ke)) { + push @$v, '0', '' if @$v == 1; + die("element '$e' contains attributes @{[keys %{$v->[0]}]}\n") if %{$v->[0]}; + die("element '$e' has subelements\n") if $v->[1] ne '0'; + die("element '$e' must be singleton\n") if exists $out->{$e}; + Encode::_utf8_off($v->[2]) if $bytes; + $out->{$e} = $v->[2]; + } elsif (@$ke == 1 && !ref($ke->[0])) { + push @$v, '0', '' if @$v == 1; + die("element '$e' contains attributes\n") if %{$v->[0]}; + die("element '$e' has subelements\n") if $v->[1] ne '0'; + Encode::_utf8_off($v->[2]) if $bytes; + push @{$out->{$e}}, $v->[2]; + } else { + if (@$ke == 1) { + push @{$out->{$e}}, {}; + _workin($ke->[0], $out->{$e}->[-1], @$v); + } else { + die("element '$e' must be singleton\n") if exists $out->{$e}; + $out->{$e} = {}; + _workin($ke, $out->{$e}, @$v); + } + } + } + if (exists $out->{'_content'}) { + $out->{'_content'} =~ s/^ //s; + $out->{'_content'} =~ s/ $//s; + } +} + +sub _escape { + my ($d) = @_; + $d =~ s/&/&/sg; + $d =~ s/</</sg; + $d =~ s/>/>/sg; + $d =~ s/"/"/sg; + return $d; +} + +sub _workout { + my ($how, $d, $indent) = @_; + my @how = @$how; + my $am = _escape(shift @how); + my $ret = "$indent<$am"; + my $inelem; + my %d2 = %$d; + my $gotel = 0; + if ($am eq '') { + $ret = ''; + $gotel = $inelem = 1; + $indent = substr($indent, 2); + } + for my $e (@how) { + if (!$inelem && !ref($e) && $e ne '_content') { + next unless exists $d2{$e}; + $ret .= _escape(" $e=").'"'._escape($d2{$e}).'"'; + delete $d2{$e}; + next; + } + $inelem = 1; + next if ref($e) && !@$e; # magic inelem marker + my $en = $e; + $en = $en->[0] if ref($en); + $en = $en->[0] if ref($en); + next unless exists $d2{$en}; + my $ee = _escape($en); + if (!ref($e) && $e eq '_content' && !$gotel) { + $gotel = 2; # special marker to strip indent + $ret .= ">"._escape($d2{$e})."\n"; + delete $d2{$e}; + next; + } + $ret .= ">\n" unless $gotel; + $gotel = 1; + if (!ref($e)) { + die("'$e' must be scalar\n") if ref($d2{$e}); + if ($e eq '_content') { + my $c = $d2{$e}; + $ret .= "$indent "._escape("$c\n"); + delete $d2{$e}; + next; + } + if (defined($d2{$e})) { + $ret .= "$indent <$ee>"._escape($d2{$e})."</$ee>\n"; + } else { + $ret .= "$indent <$ee/>\n"; + } + delete $d2{$e}; + next; + } elsif (@$e == 1 && !ref($e->[0])) { + die("'$en' must be array\n") unless UNIVERSAL::isa($d2{$en}, 'ARRAY'); + for my $se (@{$d2{$en}}) { + $ret .= "$indent <$ee>"._escape($se)."</$ee>\n"; + } + delete $d2{$en}; + } elsif (@$e == 1) { + die("'$en' must be array\n") unless UNIVERSAL::isa($d2{$en}, 'ARRAY'); + for my $se (@{$d2{$en}}) { + die("'$en' must be array of hashes\n") unless UNIVERSAL::isa($se, 'HASH'); + $ret .= _workout($e->[0], $se, "$indent "); + } + delete $d2{$en}; + } else { + die("'$en' must be hash\n") unless UNIVERSAL::isa($d2{$en}, 'HASH'); + $ret .= _workout($e, $d2{$en}, "$indent "); + delete $d2{$en}; + } + } + die("excess hash entries: ".join(', ', sort keys %d2)."\n") if %d2; + if ($gotel == 2 && $ret =~ s/\n$//s) { + $ret .= "</$am>\n" unless $am eq ''; + } elsif ($gotel) { + $ret .= "$indent</$am>\n" unless $am eq ''; + } else { + $ret .= " />\n"; + } + return $ret; +} + +package ABStructured::saxparser; + +sub new { + return bless []; +} + +sub start_document { + my ($self) = @_; + $self->[0] = []; +} + +sub start_element { + my ($self, $e) = @_; + my %as = map {$_->{'Name'} => $_->{'Value'}} values %{$e->{'Attributes'} || {}}; + push @{$self->[0]}, $e->{'Name'}, [ $self->[0], \%as ]; + $self->[0] = $self->[0]->[-1]; +} + +sub end_element { + my ($self) = @_; + $self->[0] = shift @{$self->[0]}; +} + +sub characters { + my ($self, $c) = @_; + + my $cl = $self->[0]; + if (@$cl > 2 && $cl->[-2] eq '0') { + $cl->[-1] .= $c->{'Data'}; + } else { + push @$cl, '0' => $c->{'Data'}; + } +} + +sub end_document { + my ($self) = @_; + return $self->[0]; +} + +package ABStructured; + +my $xmlinparser; + +sub _xmlparser { + my ($str) = @_; + my $p = new XML::Parser(Style => 'Tree'); + return $p->parse($str); +} + +sub _saxparser { + my ($str) = @_; + my $handler = new ABStructured::saxparser; + my $sp = XML::SAX::ParserFactory->parser('Handler' => $handler); + if (ref(\$str) eq 'GLOB' || UNIVERSAL::isa($str, 'IO::Handle')) { + return $sp->parse_file($str); + } + return $sp->parse_string($str); +} + +sub _chooseparser { + eval { require XML::SAX; }; + my $saxok; + if (!$@) { + $saxok = 1; + my $parsers = XML::SAX->parsers(); + return \&_saxparser if $parsers && @$parsers && (@$parsers > 1 || $parsers->[0]->{'Name'} ne 'XML::SAX::PurePerl'); + } + eval { require XML::Parser; }; + return \&_xmlparser unless $@; + return \&_saxparser if $saxok; + die("ABStructured needs either XML::SAX or XML::Parser\n"); +} + +sub XMLin { + my ($dtd, $str) = @_; + $xmlinparser = _chooseparser() unless defined $xmlinparser; + my $d = $xmlinparser->($str); + my $out = {}; + $d = ['', [{}, @$d]] if $dtd->[0] eq ''; + die("document element must be '$dtd->[0]', was '$d->[0]'\n") if $d->[0] ne $dtd->[0]; + _workin($dtd, $out, @{$d->[1]}); + return $out; +} + +sub XMLinfile { + my ($dtd, $fn) = @_; + local *F; + open(F, '<', $fn) || die("$fn: $!\n"); + my $out = XMLin($dtd, *F); + close F; + return $out; +} + +sub XMLout { + my ($dtd, $d) = @_; + die("parameter is not a hash\n") unless UNIVERSAL::isa($d, 'HASH'); + if ($dtd->[0] eq '') { + die("excess hash elements\n") if keys %$d > 1; + for my $el (@$dtd) { + return _workout($el, $d->{$el->[0]}, '') if ref($el) && $d->{$el->[0]}; + } + die("no match for alternative\n"); + } + return _workout($dtd, $d, ''); +} + +1; + +__END__ + +=head1 NAME + +ABStructured - simple conversion API from XML to perl structures and back + +=head1 SYNOPSIS + + use ABStructured; + + $dtd = [ + 'element' => + 'attribute1', + 'attribute2', + [], + 'element1', + [ 'element2' ], + [ 'element3' => + ... + ], + [[ 'element4' => + ... + ]], + ]; + + $hashref = XMLin($dtd, $xmlstring); + $hashref = XMLinfile($dtd, $filename_or_glob); + $xmlstring = XMLout($dtd, $hashref); + +=head1 DESCRIPTION + +The ABStructured module provides a way to convert xml data into +a predefined perl data structure and back to xml. Unlike with modules +like XML::Simple it is an error if the xml data does not match +the provided skeleton (the "dtd"). Another advantage is that the +order of the attributes and elements is taken from the dtd when +converting back to xml. + +=head2 XMLin() + +The XMLin() function takes the dtd and a string as arguments and +returns a hash reference containing the data. + +=head2 XMLinfile() + +This function works like C<XMLin()>, but takes a filename or a +file descriptor glob as second argument. + +=head2 XMLout() + +C<XMLout()> provides the reverse operation to C<XMLin()>, it takes +a dtd and a hash reference as arguments and returns an XML string. + +=head1 The DTD + +The dtd parameter specifies the structure of the allowed xml data. +It consists of nested perl arrays. + +=head2 simple attributes and elements + +The very simple example for a dtd is: + + $dtd = [ 'user' => + 'login', + 'password', + ]; + +This dtd will accept/create XML like: + + <user login="foo" password="bar" /> + +XMLin doesn't care if "login" or "password" are attributes or +elements, so + + <user> + <login>foo</login> + <password>bar</password> + </user> + +is also valid input (but doesn't get re-created by C<XMLout()>). + +=head2 multiple elements of the same name + +If an element may appear multiple times, it must be declared as +an array in the dtd: + + $dtd = [ 'user' => + 'login', + [ 'favorite_fruits' ], + ]; + +XMLin will create an array reference as value in this case, even if +the xml data contains only one element. Valid XML looks like: + + <user login="foo"> + <favorite_fruits>apple</favorite_fruits> + <favorite_fruits>peach</favorite_fruits> + </user> + +As attributes may not appear multiple times, XMLout will create +elements for this case. Note also that all attributes must come +before the first element, thus the first array in the dtd ends +the attribute list. As an example, the following dtd + + $dtd = [ 'user' => + 'login', + [ 'favorite_fruits' ], + 'password', + ]; + +will create xml like: + + <user login="foo"> + <favorite_fruits>apple</favorite_fruits> + <favorite_fruits>peach</favorite_fruits> + <password>bar</password> + </user> + +"login" is translated to an attribute and "password" to an element. + +You can use an empty array reference to force the end of the attribute +list, e.g.: + + $dtd = [ 'user' => + [], + 'login', + 'password', + ]; + +will translate to + + <user> + <login>foo</login> + <password>bar</password> + </user> + +instead of + + <user login="foo" password="bar" /> + +=head2 sub-elements + +sub-elements are elements that also contain attributes or other +elements. They are specified in the dtd as arrays with more than +one element. Here is an example: + + $dtd = [ 'user' => + 'login', + [ 'address' => + 'street', + 'city', + ], + ]; + +Valid xml for this dtd looks like: + + <user login="foo"> + <address street="broadway 7" city="new york" /> + </user> + +It is sometimes useful to specify such dtds in multiple steps: + + $addressdtd = [ 'address' => + 'street', + 'city', + ]; + + $dtd = [ 'user' => + 'login', + $addressdtd, + ]; + +=head2 multiple sub-elements with the same name + +As with simple elements, one can allow sub-elements to occur multiple +times. C<XMLin()> creates an array of hash references in this case. +The dtd specification uses an array reference to an array for this +case, for example: + + $dtd = [ 'user' => + 'login', + [[ 'address' => + 'street', + 'city', + ]], + ]; +Or, with the $addressdtd definition used in the previous example: + + $dtd = [ 'user' => + 'login', + [ $addressdtd ], + ]; + +Accepted XML is: + + <user login="foo"> + <address street="broadway 7" city="new york" /> + <address street="rural road 12" city="tempe" /> + </user> + +=head2 the _content pseudo-element + +All of the non-whitespace parts between elements get collected +into a single "_content" element. As example, + + <user login="foo"> + <address street="broadway 7" city="new york"/>hello + <address street="rural road 12" city="tempe"/>world + </user> + +would set the _content element to C<hello world> (the dtd must allow +a _content element, of course). If the dtd is + + $dtd = [ 'user' => + 'login', + [ $addressdtd ], + '_content', + ]; + +the xml string created by XMLout() will be: + + <user login="foo"> + <address street="broadway 7" city="new york" /> + <address street="rural road 12" city="tempe" /> + hello world + </user> + +The exact input cannot be re-created, as the positions and the +fragmentation of the content data is lost. + +=head1 SEE ALSO + +B<ABStructured> requires either L<XML::Parser> or L<XML::SAX>. + +=head1 COPYRIGHT + +Copyright 2006 Michael Schroeder E<lt>[email protected]<gt> + +This library is free software; you can redistribute it and/or modify it +under the same terms as Perl itself. + +=cut + diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/inst-source-utils/usr/share/inst-source-utils/modules/ABXML.pm new/inst-source-utils/usr/share/inst-source-utils/modules/ABXML.pm --- old/inst-source-utils/usr/share/inst-source-utils/modules/ABXML.pm 1970-01-01 01:00:00.000000000 +0100 +++ new/inst-source-utils/usr/share/inst-source-utils/modules/ABXML.pm 2014-03-04 13:37:49.000000000 +0100 @@ -0,0 +1,722 @@ + +package ABXML; + +our $opstatus = [ + 'status' => + 'code', + [], + 'summary', + 'details', +]; + +our $patchinfodir = [ + 'patchinfodir' => + 'name', + [[ 'entry' => + 'name', + 'md5', + 'status', + 'docu', + ]] +]; + +our $patchinfo = [ + 'patchinfo' => + [], + 'Filename', + 'MD5SUM', + 'ISSUEDATE', + 'FILEOWNER', + 'PACKAGER', + 'ARCH', + 'CATEGORY', + 'INDICATIONS', + 'CONTRAINDICATIONS', + 'PRE', + 'POST', + 'ScriptsInline', + 'License', + 'Confirm', + 'UpdateOnlyInstalled', + 'ForceInstall', + 'RebootNeeded', + 'ReloginSuggested', + 'AlwaysInstallPackages', + 'InstallOnly', + 'PATCHFILENAME', + 'LEAVEOLDRPMS', + 'PRE_DE', + 'POST_DE', + 'SUMMARY', + 'SUMMARY_DE', + 'SWAMPID', + 'SUBSWAMPID', + 'SWAMPSTATUS', + 'APPROVED', + 'RATING', + 'BS-REQUESTID', + [ 'DISTRIBUTION' ], + [ 'PACKAGE' ], + [ 'PACKAGE-GA' ], + [ 'SCRIPT' ], + [ 'PRESCRIPT' ], + [ 'POSTSCRIPT' ], + [ 'CD-Produkt-Name' ], + [ 'CD-Produkt-Version' ], + [ 'BUGZILLA' ], + [ 'CVE' ], + [ 'UPDATESCRIPT' ], + [ 'OBSOLETES' ], + [ 'REQUIRES' ], + [ 'Freshens' ], + [ 'IMAGE' ], + [ 'FILES' ], + [ 'DESCRIPTION' ], + [ 'DESCRIPTION_DE' ], + [ 'DIRECTORIES' ], +]; + +our $patchdocu = [ + 'patchdocu' => + [], + 'description', + 'keywords', + 'abstract', + 'swampid', + 'priority', + 'lastchanged', + [ 'bugzilla' => + [ 'bnum', ] + ], + [ 'products' => + [[ 'product', => + [], + 'name', + 'longname', + 'source', + 'patchname', + ]], + ], + [ 'body', => + [], + 'html', + 'ascii', + 'description', + ], +]; + +our $approve_pi = [ + 'approve_pi' => + [], + 'user', + 'behalf', + 'md5sum', +]; + +our $reject_pi = [ + 'reject_pi' => + [], + 'user', + 'reason', + 'md5sum', +]; + +our $maintlist = [ + 'maintlist' => + [], + 'package', + 'type', + [ 'DISTRIBUTION' ], +]; + +our @rpm_entry = ( + [[ 'rpm:entry' => + 'kind', + 'name', + 'flags', + 'epoch', + 'ver', + 'rel', + 'pre', + ]], +); + +our @rpm_entry_2 = ( + [[ 'rpm:entry' => + 'kind', + 'name', + 'epoch', + 'ver', + 'rel', + 'pre', + 'flags', + ]], +); + +our @suse_entry = ( + [[ 'suse:entry' => + 'kind', + 'name', + 'flags', + 'epoch', + 'ver', + 'rel', + 'pre', + ]], +); + +our $repomd = [ + 'repomd' => + 'xmlns', + 'xmlns:rpm', + 'xmlns:suse', + [], + 'revision', + [ 'tags' => + [ 'content' ], + [ 'repo' ], + [[ 'distro' => + 'cpeid', + '_content', + ]], + ], + [[ 'data' => + 'type', + [ 'location' => + 'href', + ], + [ 'checksum' => + 'type', + '_content', + ], + 'timestamp', + 'size', + 'open-size', + [ 'open-checksum' => + 'type', + '_content', + ], + ]], +]; + +our $primary = [ + 'metadata' => + 'xmlns', + 'xmlns:rpm', + 'xmlns:suse', + 'packages', + [[ 'package' => + 'xmlns', + 'type', + [], + 'name', + 'arch', + [ 'version' => + 'epoch', + 'ver', + 'rel', + ], + [[ 'checksum', => + 'type', + 'pkgid', + '_content', + ]], + [[ 'summary' => + 'lang', + '_content', + ]], + [[ 'description' => + 'lang', + '_content', + ]], + 'packager', + 'url', + [ 'time' => + 'file', + 'build', + ], + [ 'size' => + 'package', + 'installed', + 'archive', + ], + [ 'location' => + 'xml:base', + 'href', + ], + [ 'format' => + [], + 'rpm:license', + 'rpm:vendor', + 'rpm:group', + 'rpm:buildhost', + 'rpm:sourcerpm', + [ 'rpm:header-range' => + 'start', + 'end', + ], + [ 'rpm:provides' => @rpm_entry ], + [ 'rpm:requires' => @rpm_entry ], + [ 'rpm:conflicts' => @rpm_entry ], + [ 'rpm:obsoletes' => @rpm_entry ], + [ 'rpm:suggests' => @rpm_entry ], + [ 'rpm:recommends' => @rpm_entry ], + [ 'rpm:supplements' => @rpm_entry ], + [ 'rpm:enhances' => @rpm_entry ], + [[ 'file' => + 'type', + '_content', + ]], + ], + 'suse:license-to-confirm', + ]], +]; + +our $susedata = [ + 'susedata' => + 'xmlns', + 'packages', + [[ 'package' => + 'pkgid', + 'name', + 'arch', + [ 'version' => + 'epoch', + 'ver', + 'rel', + ], + 'eula', + [[ 'keyword' => + '_content', + ]], + ]], +]; + +our $filelists = [ + 'filelists' => + 'xmlns', + 'packages', + [[ 'package' => + 'pkgid', + 'name', + 'arch', + [ 'version' => + 'epoch', + 'ver', + 'rel', + ], + [[ 'file' => + 'type', + '_content', + ]], + ]], +]; + +our $otherdata = [ + 'otherdata' => + 'xmlns', + 'packages', + [], + [[ 'package' => + 'pkgid', + 'name', + 'arch', + [], + [ 'version' => + 'epoch', + 'ver', + 'rel', + ], + [[ 'changelog' => + 'author', + 'date', + '_content', + ]], + ]], +]; + +our $suseinfo = [ + 'suseinfo' => + 'xmlns', + [], + 'expire', +]; + +our $patch_zypp = [ + 'patch' => + 'xmlns', + 'xmlns:yum', + 'xmlns:rpm', + 'xmlns:suse', + 'patchid', + 'timestamp', + 'engine', + [], + 'yum:name', + [[ 'summary' => + 'lang', + '_content', + ]], + [[ 'description' => + 'lang', + '_content', + ]], + [ 'yum:version' => + 'ver', + 'rel', + ], + [ 'rpm:provides' => @rpm_entry_2 ], + [ 'rpm:requires' => @rpm_entry_2 ], + [ 'rpm:conflicts' => @rpm_entry_2 ], + [ 'rpm:obsoletes' => @rpm_entry_2 ], + [ 'rpm:suggests' => @rpm_entry_2 ], + [ 'rpm:enhances' => @rpm_entry_2 ], + [ 'rpm:recommends' => @rpm_entry_2 ], + [ 'rpm:supplements' => @rpm_entry_2 ], + 'reboot-needed', + 'package-manager', + 'category', + [ 'update-script' => + [], + 'do', + [ 'do-location' => + 'href', + ], + [ 'do-checksum' => + 'type', + '_content', + ], + ], + [[ 'license-to-confirm', + 'lang', + '_content', + ]], + [ 'atoms' => + [[ 'package' => + 'xmlns', + 'type', + [], + 'name', + 'arch', + [ 'version' => + 'epoch', + 'ver', + 'rel', + ], + [[ 'checksum', => + 'type', + 'pkgid', + '_content', + ]], + [ 'time' => + 'file', + 'build', + ], + [ 'size' => + 'package', + 'installed', + 'archive', + ], + [ 'location' => + 'xml:base', + 'href', + ], + [ 'format' => + [ 'rpm:provides' => @rpm_entry_2 ], + [ 'rpm:requires' => @rpm_entry_2 ], + [ 'rpm:conflicts' => @rpm_entry_2 ], + [ 'rpm:obsoletes' => @rpm_entry_2 ], + [ 'rpm:suggests' => @rpm_entry_2 ], + [ 'rpm:enhances' => @rpm_entry_2 ], + [ 'rpm:recommends' => @rpm_entry_2 ], + [ 'rpm:supplements' => @rpm_entry_2 ], + [ 'suse:freshens' => @suse_entry ], + 'install-only', + ], + [ 'pkgfiles' => + 'xmlns', + [[ 'patchrpm' => + [ 'location' => + 'href', + ], + [[ 'checksum', => + 'type', + 'pkgid', + '_content', + ]], + [ 'time' => + 'file', + 'build', + ], + [ 'size' => + 'package', + 'installed', + 'archive', + ], + [[ 'base-version' => + 'epoch', + 'ver', + 'rel', + ]], + ]], + [[ 'deltarpm' => + [ 'location' => + 'href', + ], + [[ 'checksum', => + 'type', + 'pkgid', + '_content', + ]], + [ 'time' => + 'file', + 'build', + ], + [ 'size' => + 'package', + 'installed', + 'archive', + ], + [ 'base-version' => + 'epoch', + 'ver', + 'rel', + 'md5sum', + 'buildtime', + 'sequence_info', + ], + ]], + ], + ]], + [[ 'message' => + 'xmlns', + 'yum:name', + [ 'yum:version' => + 'epoch', + 'ver', + 'rel', + ], + [ 'text' => + 'lang', + '_content', + ], + [ 'rpm:requires' => + 'pre', + @rpm_entry_2 + ], + [ 'suse:freshens' => @suse_entry ], + ]], + [[ 'script' => + 'xmlns', + 'yum:name', + [ 'yum:version' => + 'epoch', + 'ver', + 'rel', + ], + 'do', + [ 'do-location' => + 'href', + ], + [ 'do-checksum' => + 'type', + '_content', + ], + [ 'rpm:requires' => + 'pre', + @rpm_entry_2 + ], + [ 'suse:freshens' => @suse_entry ], + ]], + ], +]; + +our $patch_sat = [ + 'update' => + 'status', + 'from', + 'type', + 'version', + [], + 'id', + 'title', + 'severity', + 'release', + [ 'issued' => + 'date', + ], + [ 'references' => + [[ 'reference' => + 'href', + 'id', + 'title', + 'type', + ]], + ], + [ 'description' => + '_content', + ], + [ 'pkglist' => + [ 'collection' => + [[ 'package' => + 'name', + 'arch', + 'version', + 'release', + [], + 'filename', + 'reboot_suggested', + 'relogin_suggested', + 'restart_suggested', + ]], + ], + ], +]; + +our $bsinfo; + +if ($BSXML::request) { +$bsinfo = [ + 'bsinfo' => + 'instance', + $BSXML::request, +]; +}; + +our $prodfile = [ + 'product' => + 'id', + 'schemeversion', + [], + 'vendor', + 'name', + 'version', + 'baseversion', + 'patchlevel', + 'migrationtarget', + 'release', + 'arch', + 'productline', + [ 'register' => + [], + 'target', + 'release', + [ 'repositories' => + [[ 'repository' => + 'path', + ]], + ], + ], + [ 'upgrades' => + [], + [ 'upgrade' => + [], + 'name', + 'summary', + 'product', + 'notify', + 'status', + ], + ], + 'updaterepokey', + 'summary', + 'shortsummary', + 'description', + [ 'linguas' => + [[ 'language' => '_content' ]], + ], + [ 'urls' => + [[ 'url' => + 'name', + '_content', + ]], + ], + [ 'buildconfig' => + 'producttheme', + 'betaversion', + 'allowresolving', + 'mainproduct', + ], + [ 'installconfig' => + 'defaultlang', + 'datadir', + 'descriptiondir', + [], + [ 'releasepackage' => + 'name', + 'flag', + 'version', + 'release', + ], + 'distribution', + [ 'obsoletepackage' ], + ], + 'runtimeconfig', +]; + +our $productsfile = [ + 'products' => + [[ 'product' => + [], + 'name', + [ 'version' => + 'ver', + 'rel', + 'epoch', + ], + 'arch', + 'vendor', + 'summary', + 'description', + ]], +]; + +our $patchprotocol = [ + 'protocol' => + [], + 'title', + 'suse', + 'descr', + [[ 'product' => + 'name', + 'version', + 'arch', + 'maint', + [], + 'marketing', + 'path', + 'nppid', + [[ 'package' => + 'type', + 'path', + 'name', + ]], + [[ 'metadata' => + 'type', + 'cat', + 'path', + 'name', + ]], + ]], + 'had_errors', +]; + +our $patches = [ + 'patches' => + 'xmlns', + [[ 'patch' => + 'id', + [], + [ 'checksum' => + 'type', + '_content', + ], + [ 'location' => + 'href', + ], + 'category', + ]], +]; + + +1; ++++++ pre_checkin.sh ++++++ --- /var/tmp/diff_new_pack.g0hHI0/_old 2014-03-05 15:36:45.000000000 +0100 +++ /var/tmp/diff_new_pack.g0hHI0/_new 2014-03-05 15:36:45.000000000 +0100 @@ -34,7 +34,9 @@ done # needed perl module -for i in /mounts/work/abuild/lib/abuild/modules/RPMQ.pm ; do +for i in /mounts/work/abuild/lib/abuild/modules/RPMQ.pm \ + /mounts/work/abuild/lib/abuild/modules/ABXML.pm \ + /mounts/work/abuild/lib/abuild/modules/ABStructured.pm ; do echo "Preparing: $(basename $i)" sed -e "s|/work/abuild|$BINDIR|g" $i > $TOPDIR$MODULEDIR/modules/`basename $i` done -- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
