/[smeserver]/builds_bin/update_repos
ViewVC logotype

Diff of /builds_bin/update_repos

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph | View Patch Patch

Revision 1.66 by slords, Tue Jun 14 18:20:44 2011 UTC Revision 1.70 by slords, Fri Jul 27 18:07:11 2012 UTC
# Line 28  my @archs = ( 'i386', 'x86_64' ); Line 28  my @archs = ( 'i386', 'x86_64' );
28    
29  my $distrepo = { '7' => { active    => 1,  my $distrepo = { '7' => { active    => 1,
30                            centos    => 4,                            centos    => 4,
31                            repo      => '/releases/7/',                            repo      => '/build/smeserver/repo/7/',
32                            os        => 'RPMS/',                            os        => 'RPMS/',
33                            builds    => '/builds/smeserver-7-core/',                            builds    => '/build/builds/smeserver-7-core/',
34                            community => '/builds/smeserver-7-contribs/',                            community => '/build/builds/smeserver-7-contribs/',
35                            stage     => '/stage/7/',                            stage     => '/build/smeserver/stage/7/',
36                              sign      => 1,
37                            checksum  => 'sha',                            checksum  => 'sha',
38                          },                          },
39                   '8' => { active    => 1,                   '8' => { active    => 1,
40                            centos    => 5,                            centos    => 5,
41                            repo      => '/releases/testing/8/',                            repo      => '/build/smeserver/repo/8/',
42                            os        => '',                            os        => '',
43                            builds    => '/builds/smeserver-8-core/',                            builds    => '/build/builds/smeserver-8-core/',
44                            community => '/builds/smeserver-8-contribs/',                            community => '/build/builds/smeserver-8-contribs/',
45                            stage     => '/stage/8/',                            stage     => '/build/smeserver/stage/8/',
46                              sign      => 1,
47                            checksum  => 'sha',                            checksum  => 'sha',
48                          },                          },
49                 };                 };
50    
51  my $repos = { "${repotag}os"              => { prio => 18, inc => 1, ver => 1, rel => 1, os => 1 },  my $repos = { "${repotag}os"              => { prio => 19, inc => 1, ver => 1, rel => 1, os => 1 },
52                "${repotag}updates"         => { prio => 17, inc => 1, ver => 1, rel => 1 },                "${repotag}updates"         => { prio => 18, inc => 1, ver => 1, rel => 1 },
53                "${repotag}updates-testing" => { prio => 16, inc => 1, ver => 1, rel => 3 },                "${repotag}updates-testing" => { prio => 17, inc => 1, ver => 1, rel => 3 },
54                "${repotag}extras"          => { prio => 15, inc => 0, ver => 1, rel => 1 },                "${repotag}extras"          => { prio => 16, inc => 0, ver => 1, rel => 1 },
55                "${repotag}addons"          => { prio => 14, inc => 0, ver => 1, rel => 1 },                "${repotag}addons"          => { prio => 15, inc => 0, ver => 1, rel => 1 },
56                "${repotag}contribs"        => { prio => 13, inc => 0, ver => 1, rel => 1 },                "${repotag}contribs"        => { prio => 14, inc => 0, ver => 1, rel => 1 },
57                "${repotag}test"            => { prio => 12, inc => 0, ver => 2, rel => 3, devel => 2 },                "${repotag}test"            => { prio => 13, inc => 0, ver => 2, rel => 3, devel => 2 },
58                "${repotag}dev"             => { prio => 11, inc => 0, ver => 1, rel => 1, devel => 1 },                "${repotag}dev"             => { prio => 12, inc => 0, ver => 1, rel => 1, devel => 1 },
59                'centos'                    => { prio => 10, inc => 0, ver => 0, rel => 0, orig => 1, base => 1 },                'centos'                    => { prio => 10, inc => 0, ver => 0, rel => 0, orig => 1, base => 1 },
60                'epel'                      => { prio =>  9, inc => 0, ver => 0, rel => 0, orig => 1, base => 1 },                'epel'                      => { prio =>  9, inc => 0, ver => 0, rel => 0, orig => 1, base => 1 },
61                'rpmforge'                  => { prio =>  7, inc => 0, ver => 0, rel => 0, orig => 1, base => 1 },                'rpmforge'                  => { prio =>  7, inc => 0, ver => 0, rel => 0, orig => 1, base => 1 },
# Line 71  my $baserepo = { "~S${repotag}os/~A/$osd Line 73  my $baserepo = { "~S${repotag}os/~A/$osd
73                   "~S${repotag}contribs/~A/RPMS/" => "${repotag}contribs",                   "~S${repotag}contribs/~A/RPMS/" => "${repotag}contribs",
74                   "~S${repotag}test/~A/RPMS/" => "${repotag}test",                   "~S${repotag}test/~A/RPMS/" => "${repotag}test",
75                   "~S${repotag}dev/~A/RPMS/" => "${repotag}dev",                   "~S${repotag}dev/~A/RPMS/" => "${repotag}dev",
76                   "/stage/~s/~A/$osdir/~O" => 'stage',                   "/build/smeserver/stage/~s/~A/$osdir/~O" => 'stage',
77                   '/mirrors/centos/~C/fasttrack/~A/RPMS/' => 'centos',                   '/mirrors/centos/~C/fasttrack/~A/RPMS/' => 'centos',
78                   '/mirrors/centos/~C/updates/~A/RPMS/' => 'centos',                   '/mirrors/centos/~C/updates/~A/RPMS/' => 'centos',
79                   '/mirrors/centos/~C/os/~A/CentOS/~O' => 'centos',                   '/mirrors/centos/~C/os/~A/CentOS/~O' => 'centos',
80                   '/mirrors/centos/~C/extras/~A/RPMS/' => 'centos',                   '/mirrors/centos/~C/extras/~A/RPMS/' => 'centos',
81                     '/mirrors/centos-vault/~C/fasttrack/~A/RPMS/' => 'centos',
82                     '/mirrors/centos-vault/~C/updates/~A/RPMS/' => 'centos',
83                     '/mirrors/centos-vault/~C/os/~A/CentOS/~O' => 'centos',
84                     '/mirrors/centos-vault/~C/extras/~A/RPMS/' => 'centos',
85                   '/mirrors/fedora/epel/~C/~A/' => 'epel',                   '/mirrors/fedora/epel/~C/~A/' => 'epel',
86                   '/mirrors/fedora/epel/testing/~C/~A/' => 'epel',                   '/mirrors/fedora/epel/testing/~C/~A/' => 'epel',
87                   '/mirrors/rpmforge/redhat/el~C/en/~A/dag/RPMS/' => 'rpmforge',                   '/mirrors/rpmforge/redhat/el~C/en/~A/dag/RPMS/' => 'rpmforge',
# Line 96  if ( $opts{q} ) { Line 102  if ( $opts{q} ) {
102    
103  my $skippkg = { '7' => { 'centos'        => { map { $_ => 1 } ( 'horde', 'imp-h3', 'ingo-h3', 'turba-h3' ) },  my $skippkg = { '7' => { 'centos'        => { map { $_ => 1 } ( 'horde', 'imp-h3', 'ingo-h3', 'turba-h3' ) },
104                           'epel'          => { map { $_ => 1 } ( 'clamav', 'fping', 'ocsinventory', 'perl-Compress-Bzip2', 'perl-Compress-Raw-Zlib', 'perl-Compress-Raw-Bzip2', 'perl-Crypt-OpenSSL-Bignum', 'perl-Crypt-OpenSSL-Random', 'perl-Crypt-OpenSSL-RSA', 'perl-DateTime', 'perl-Razor-Agent', 'perl-Text-Iconv' ) },                           'epel'          => { map { $_ => 1 } ( 'clamav', 'fping', 'ocsinventory', 'perl-Compress-Bzip2', 'perl-Compress-Raw-Zlib', 'perl-Compress-Raw-Bzip2', 'perl-Crypt-OpenSSL-Bignum', 'perl-Crypt-OpenSSL-Random', 'perl-Crypt-OpenSSL-RSA', 'perl-DateTime', 'perl-Razor-Agent', 'perl-Text-Iconv' ) },
105                           'rpmforge'      => { map { $_ => 1 } ( 'dovecot', 'mod_auth_tkt', 'perl-Test-Inline', 'spamassassin' ) },                           'rpmforge'      => { map { $_ => 1 } ( 'dovecot', 'mod_auth_tkt', 'perl-Test-Inline', 'perl-libwww-perl', 'spamassassin' ) },
106                           'atrpms'        => { map { $_ => 1 } ( 'check4updates', 'dovecot', 'trac', 'yum' ) },                           'atrpms'        => { map { $_ => 1 } ( 'check4updates', 'dovecot', 'trac', 'yum' ) },
107                         },                         },
108                  '8' => { 'atrpms'        => { map { $_ => 1 } ( 'gnupg' ) },                  '8' => { 'atrpms'        => { map { $_ => 1 } ( 'gnupg' ) },
109                           'centos'        => { map { $_ => 1 } ( 'horde', 'imp-h3', 'ingo-h3', 'turba-h3' ) },                           'centos'        => { map { $_ => 1 } ( 'horde', 'imp-h3', 'ingo-h3', 'turba-h3' ) },
110                           'epel'          => { map { $_ => 1 } ( 'clamav', 'horde', 'libtalloc', 'libtdb', 'oidentd', 'perl-Compress-Bzip2', 'perl-Compress-Raw-Zlib', 'perl-Compress-Raw-Bzip2', 'perl-Crypt-OpenSSL-Bignum', 'perl-Crypt-OpenSSL-Random', 'perl-Crypt-OpenSSL-RSA', 'perl-Razor-Agent', 'smolt' ) },                           'epel'          => { map { $_ => 1 } ( 'clamav', 'fping', 'html2ps', 'horde', 'libtalloc', 'libtdb', 'oidentd', 'perl-Compress-Bzip2', 'perl-Compress-Raw-Zlib', 'perl-Compress-Raw-Bzip2', 'perl-Crypt-OpenSSL-Bignum', 'perl-Crypt-OpenSSL-Random', 'perl-Crypt-OpenSSL-RSA', 'perl-Razor-Agent', 'smolt' ) },
111                           'rpmforge'      => { map { $_ => 1 } ( 'libtalloc', 'mod_auth_tkt', 'perl-Test-Inline', 'spamassassin' ) },                           'rpmforge'      => { map { $_ => 1 } ( 'dovecot', 'libtalloc', 'mod_auth_tkt', 'perl-Test-Inline', 'spamassassin' ) },
112                         },                         },
113                };                };
114    
# Line 385  foreach my $ver ( sort { $a <=> $b } key Line 391  foreach my $ver ( sort { $a <=> $b } key
391                      push @{$pkg->{repos}}, $stage;                      push @{$pkg->{repos}}, $stage;
392                  }                  }
393              }              }
394              if ( ! $print && ($pkg->{delete} || $pkg->{repos} || $pkg->{nosig} ) ) {              if ( ! $print && ($pkg->{delete} || $pkg->{repos} || ( $pkg->{nosig} && $distrepo->{$ver}->{sign} ) ) ) {
395                  print "\n$base ($disttag$ver)\n", "=" x length("$base ($disttag$ver)"), "\n";                  print "\n$base ($disttag$ver)\n", "=" x length("$base ($disttag$ver)"), "\n";
396                  $print++;                  $print++;
397              }              }
398    
399              my $src = $pkg->{rpm}->filename;              my $src = $pkg->{rpm}->filename;
400              if ( $pkg->{nosig} ) {              if ( $pkg->{nosig} && $distrepo->{$ver}->{sign} ) {
401                  print "sign package (", basename($pkg->{rpm}->filename), ")\n";                  print "sign package (", basename($pkg->{rpm}->filename), ")\n";
402                  unless ( $opts{t} ) {                  unless ( $opts{t} ) {
403                      qx(cat $HOME/.rpmpass | setsid rpm --addsign $src >& /dev/null);                      qx(cat $HOME/.rpmpass | setsid rpm --addsign $src >& /dev/null);
# Line 451  foreach my $ver ( sort { $a <=> $b } key Line 457  foreach my $ver ( sort { $a <=> $b } key
457                  next if $pkg->{done} || $repos->{$pkg->{repo}}->{orig} || $repos->{$pkg->{repo}}->{base};                  next if $pkg->{done} || $repos->{$pkg->{repo}}->{orig} || $repos->{$pkg->{repo}}->{base};
458                  $pkg->{delete}++;                  $pkg->{delete}++;
459                  my $src = $pkg->{rpm}->filename;                  my $src = $pkg->{rpm}->filename;
460                  if ( ! $print && ($pkg->{delete} || $pkg->{repos} || $pkg->{nosig} ) ) {                  if ( ! $print && ($pkg->{delete} || $pkg->{repos} || ( $pkg->{nosig} && $distrepo->{$ver}->{sign} ) ) ) {
461                      print "\n$base ($disttag$ver)\n", "=" x length("$base ($disttag$ver)"), "\n";                      print "\n$base ($disttag$ver)\n", "=" x length("$base ($disttag$ver)"), "\n";
462                      $print++;                      $print++;
463                  }                  }
# Line 551  sub process_rpm { Line 557  sub process_rpm {
557      }      }
558      my ($src, $version, $release) = ($pkg->is_source_package ? $pkg->filename : $pkg->sourcerpm) =~ m{(?:^|/)([^/]*)-([^-]+)-([^-]+)\.\w+\.rpm$};      my ($src, $version, $release) = ($pkg->is_source_package ? $pkg->filename : $pkg->sourcerpm) =~ m{(?:^|/)([^/]*)-([^-]+)-([^-]+)\.\w+\.rpm$};
559      return if $skippkg->{$ver}->{$repo} && ( $skippkg->{$ver}->{$repo}->{$src} || $skippkg->{$ver}->{$repo}->{$pkg->name} );      return if $skippkg->{$ver}->{$repo} && ( $skippkg->{$ver}->{$repo}->{$src} || $skippkg->{$ver}->{$repo}->{$pkg->name} );
560      return if $repos->{$repo}->{base} && $nosig;      return if $repos->{$repo}->{base} &&  $nosig && $baserepo->{$ver}->{sign};
561      if ( $nosig && ! -f "$HOME/.rpmpass" ) { print " * missing signature (" .$pkg->filename . ")\n"; return; }      if ( $nosig && ! -f "$HOME/.rpmpass" ) { print " * missing signature (" .$pkg->filename . ")\n"; return; }
562      my $arch = 'unknown';      my $arch = 'unknown';
563      $arch = 'SRPMS' if $pkg->filename =~ m{[/-](SRPMS?|src|source)/};      $arch = 'SRPMS' if $pkg->filename =~ m{[/-](SRPMS?|src|source)/};


Legend:
Removed lines/characters  
Changed lines/characters
  Added lines/characters

admin@koozali.org
ViewVC Help
Powered by ViewVC 1.2.1 RSS 2.0 feed