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'}}); |
133 |
|
if ( grep $_ eq 'i386', @{$distrepo->{$ver}->{'archs'}} ) { |
134 |
|
push @{$distrepo->{$ver}->{all_archs}}, ('i586', 'i686'); |
135 |
|
} |
136 |
|
|
137 |
foreach my $dir ( sort { $repos->{$baserepo->{$b}}->{prio} <=> $repos->{$baserepo->{$a}}->{prio} || $a cmp $b } keys %$baserepo ) { |
foreach my $dir ( sort { $repos->{$baserepo->{$b}}->{prio} <=> $repos->{$baserepo->{$a}}->{prio} || $a cmp $b } keys %$baserepo ) { |
138 |
my $bdir = $dir; |
my $bdir = $dir; |
139 |
$bdir =~ s/~S/$distrepo->{$ver}->{repo}/; |
$bdir =~ s/~S/$distrepo->{$ver}->{repo}/; |
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 |
} |
} |
308 |
} |
} |
309 |
} elsif ( $repos->{$cmp->{repo}}->{stage} ) { |
} elsif ( $repos->{$cmp->{repo}}->{stage} ) { |
310 |
$cmp->{delete}++; |
$cmp->{delete}++; |
311 |
} elsif ( $cmp->{src} || ( $cmp->{rpm}->arch =~ m{^(i[356]86)$} && grep $_ eq 'i386', @{$distrepo->{$ver}->{'archs'}} ) || |
} elsif ( $cmp->{src} || grep $_ eq $cmp->{rpm}->arch, @{$distrepo->{$ver}->{all_archs}} ) { |
|
grep $_ eq $cmp->{rpm}->arch, @{$distrepo->{$ver}->{'archs'}} ) { |
|
312 |
$srpm = $cmp if ! $srpm && $cmp->{src}; |
$srpm = $cmp if ! $srpm && $cmp->{src}; |
313 |
my $dest = $repos->{$track{repo}}->{prio} > $repos->{$devel2}->{prio} ? $track{repo} : $devel2; |
my $dest = $repos->{$track{repo}}->{prio} > $repos->{$devel2}->{prio} ? $track{repo} : $devel2; |
314 |
$dest = pkgdest($cmp, $devel1, $dest, $rpms->{$base}->{rpms}); |
$dest = pkgdest($cmp, $devel1, $dest, $rpms->{$base}->{rpms}); |
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 { |
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 |
|
|