45 |
keyname => 'SME Server 7 signing key <bugteam@contribs.org>', |
keyname => 'SME Server 7 signing key <bugteam@contribs.org>', |
46 |
checksum => 'sha256', |
checksum => 'sha256', |
47 |
}, |
}, |
48 |
'10' => { active => 0, |
'10' => { active => 1, |
49 |
centos => 7, |
centos => 7, |
50 |
archs => [ 'x86_64' ], |
archs => [ 'x86_64' ], |
51 |
repo => '/build/smeserver/repo/testing/10/', |
repo => '/build/smeserver/repo/testing/10/', |
53 |
community => '/build/builds/smeserver-10-contribs/', |
community => '/build/builds/smeserver-10-contribs/', |
54 |
stage => '/build/smeserver/stage/10/', |
stage => '/build/smeserver/stage/10/', |
55 |
sign => 1, |
sign => 1, |
56 |
keyname => 'SME Server 7 signing key <bugteam@contribs.org>', |
keyname => 'Koozali SME Server signing key (10) <bugteam@koozali.org>', |
57 |
checksum => 'sha256', |
checksum => 'sha256', |
58 |
}, |
}, |
59 |
}; |
}; |
129 |
%sources = (); |
%sources = (); |
130 |
%base = (); |
%base = (); |
131 |
|
|
132 |
@{$distrepo->{$ver}->{all_archs}} = ('noarch', @{$distrepo->{$ver}->{archs}}); |
@{$distrepo->{$ver}->{all_archs}} = ('noarch', @{$distrepo->{$ver}->{'archs'}}); |
133 |
if ( grep $_ eq 'i386', @{$distrepo->{$ver}->{archs}} ) { |
if ( grep $_ eq 'i386', @{$distrepo->{$ver}->{'archs'}} ) { |
134 |
push @{$distrepo->{$ver}->{all_archs}}, ('i586', 'i686'); |
push @{$distrepo->{$ver}->{all_archs}}, ('i586', 'i686'); |
135 |
} |
} |
136 |
|
|
139 |
$bdir =~ s/~S/$distrepo->{$ver}->{repo}/; |
$bdir =~ s/~S/$distrepo->{$ver}->{repo}/; |
140 |
$bdir =~ s/~s/$ver/; |
$bdir =~ s/~s/$ver/; |
141 |
$bdir =~ s/~C/$distrepo->{$ver}->{centos}/; |
$bdir =~ s/~C/$distrepo->{$ver}->{centos}/; |
142 |
for my $arch ( @{$distrepo->{$ver}->{archs}}, 'SRPMS/' ) { |
for my $arch ( @{$distrepo->{$ver}->{'archs'}}, 'SRPMS/' ) { |
143 |
my $adir = $bdir; |
my $adir = $bdir; |
144 |
if ( $arch eq 'SRPMS/' ) { |
if ( $arch eq 'SRPMS/' ) { |
145 |
$adir =~ s/~A.*//; |
$adir =~ s/~A.*//; |
162 |
} |
} |
163 |
next unless -d $adir; |
next unless -d $adir; |
164 |
opendir DIR, $adir or next; |
opendir DIR, $adir or next; |
165 |
process_rpm("$adir$_", $ver, $baserepo->{$dir}) foreach readdir DIR; |
my @txt = grep { /\.rpm$/ && -f "$adir/$_" } readdir DIR; |
166 |
closedir DIR; |
closedir DIR; |
167 |
|
if (scalar(@txt)) { |
168 |
|
opendir DIR, $adir or next; |
169 |
|
process_rpm("$adir$_", $ver, $baserepo->{$dir}) foreach readdir DIR; |
170 |
|
closedir DIR; |
171 |
|
} elsif ($baserepo->{$dir} eq 'epel') { |
172 |
|
# EPEL 7 uses a structure with subfolders of first letter of package |
173 |
|
find( { wanted => sub { process_rpm($_, $ver, $baserepo->{$dir}) if ($_ =~ m/\.rpm$/);}, no_chdir => 1, follow_fast => 1 }, $adir ); |
174 |
|
} |
175 |
last unless $dir =~ m{~A}; |
last unless $dir =~ m{~A}; |
176 |
} |
} |
177 |
} |
} |
178 |
find( { wanted => sub { process_rpm($_, $ver, 'builds'); }, no_chdir => 1, follow_fast => 1 }, "$_" ) foreach @{$distrepo->{$ver}->{builds}}; |
find( { wanted => sub { process_rpm($_, $ver, 'builds'); }, no_chdir => 1, follow_fast => 1 }, "$_" ) foreach @{$distrepo->{$ver}->{'builds'}}; |
179 |
find( { wanted => sub { process_rpm($_, $ver, 'community'); }, no_chdir => 1, follow_fast => 1 }, $distrepo->{$ver}->{community} ) if $distrepo->{$ver}->{community}; |
find( { wanted => sub { process_rpm($_, $ver, 'community'); }, no_chdir => 1, follow_fast => 1 }, $distrepo->{$ver}->{'community'} ) if $distrepo->{$ver}->{'community'}; |
180 |
|
|
181 |
foreach my $base ( sort keys %$rpms ) { |
foreach my $base ( sort keys %$rpms ) { |
182 |
next unless $rpms->{$base}->{rpms}; |
next unless $rpms->{$base}->{rpms}; |
402 |
foreach my $a ( keys %{$acnt->{$r}->{$p}} ) { |
foreach my $a ( keys %{$acnt->{$r}->{$p}} ) { |
403 |
if ( $a eq 'noarch' ) { |
if ( $a eq 'noarch' ) { |
404 |
my $p2 = ${$acnt->{$r}->{$p}->{$a}}[0]; |
my $p2 = ${$acnt->{$r}->{$p}->{$a}}[0]; |
405 |
if ( ! $p2->{repos} && scalar @{$acnt->{$r}->{$p}->{$a}} != scalar @{$distrepo->{$ver}->{archs}} ) { |
if ( ! $p2->{repos} && scalar @{$acnt->{$r}->{$p}->{$a}} != scalar @{$distrepo->{$ver}->{'archs'}} ) { |
406 |
$p2->{oldrepo} = $p2->{repo}; |
$p2->{oldrepo} = $p2->{repo}; |
407 |
push @{$p2->{repos}}, $p2->{repo}; |
push @{$p2->{repos}}, $p2->{repo}; |
408 |
} |
} |
460 |
if ( $pkg->{src} ) { |
if ( $pkg->{src} ) { |
461 |
push @d, "${head}SRPMS/" . basename($pkg->{rpm}->filename); |
push @d, "${head}SRPMS/" . basename($pkg->{rpm}->filename); |
462 |
} elsif ( $pkg->{rpm}->arch eq 'noarch' ) { |
} elsif ( $pkg->{rpm}->arch eq 'noarch' ) { |
463 |
push @d, map { "${head}$_/$tail" . basename($pkg->{rpm}->filename) } @{$distrepo->{$ver}->{archs}}; |
push @d, map { "${head}$_/$tail" . basename($pkg->{rpm}->filename) } @{$distrepo->{$ver}->{'archs'}}; |
464 |
|
} elsif ($ver>=10 && $pkg->{rpm}->arch =~ m{^(i[356]86)$} && $pkg->{arch} =~ m{^(x86_64)$} ) { |
465 |
|
#add copy of i686 packages in x86_64 folder for SME>=10 |
466 |
|
push @d, map { "${head}$_/$tail" . basename($pkg->{rpm}->filename) } @{$distrepo->{$ver}->{'archs'}}; |
467 |
} elsif ( $pkg->{rpm}->arch =~ m{^(i[356]86)$} ) { |
} elsif ( $pkg->{rpm}->arch =~ m{^(i[356]86)$} ) { |
468 |
push @d, "${head}i386/$tail" . basename($pkg->{rpm}->filename); |
push @d, "${head}i386/$tail" . basename($pkg->{rpm}->filename); |
469 |
} else { |
} else { |
507 |
} |
} |
508 |
foreach my $repo ( sort { $repos->{$b}->{prio} <=> $repos->{$a}->{prio} } keys %repochg ) { |
foreach my $repo ( sort { $repos->{$b}->{prio} <=> $repos->{$a}->{prio} } keys %repochg ) { |
509 |
next if $repos->{$repo}->{orig} || $repos->{$repo}->{stage}; |
next if $repos->{$repo}->{orig} || $repos->{$repo}->{stage}; |
510 |
foreach my $arch ( @{$distrepo->{$ver}->{archs}} ) { |
foreach my $arch ( @{$distrepo->{$ver}->{'archs'}} ) { |
511 |
my $dir = $distrepo->{$ver}->{repo} . "$repo/$arch"; |
my $dir = $distrepo->{$ver}->{repo} . "$repo/$arch"; |
512 |
$dir = qx(readlink -f $dir); |
$dir = qx(readlink -f $dir); |
513 |
if ( $dir ) { |
if ( $dir ) { |
538 |
} |
} |
539 |
} |
} |
540 |
unless ( $opts{t} ) { |
unless ( $opts{t} ) { |
541 |
foreach (@{$distrepo->{$ver}->{builds}}) |
foreach (@{$distrepo->{$ver}->{'builds'}}) |
542 |
{ |
{ |
543 |
finddepth(sub{rmdir}, "$_") if -d "$_"; |
finddepth(sub{rmdir}, "$_") if -d "$_"; |
544 |
} |
} |
545 |
finddepth(sub{rmdir}, $distrepo->{$ver}->{community}) if -d "$distrepo->{$ver}->{community}"; |
finddepth(sub{rmdir}, $distrepo->{$ver}->{'community'}) if -d "$distrepo->{$ver}->{'community'}"; |
546 |
} |
} |
547 |
} |
} |
548 |
|
|