1 |
slords |
1.1 |
#!/bin/bash |
2 |
|
|
|
3 |
slords |
1.5 |
prefix=sme |
4 |
slords |
1.10 |
ver=$(basename $(readlink -f /build/smeserver/stage/${1:-9})) |
5 |
slords |
1.5 |
isos=${2:-false} |
6 |
slords |
1.10 |
dest=testing |
7 |
slords |
1.1 |
|
8 |
slords |
1.10 |
mkdir -p /build/smeserver/repo/$dest/$ver/{${prefix}os,iso} |
9 |
slords |
1.5 |
if $isos |
10 |
slords |
1.1 |
then |
11 |
slords |
1.10 |
rsync -avhHP --delete /build/smeserver/stage/iso/${ver:0:1}/ /build/smeserver/repo/$dest/$ver/iso/ |
12 |
slords |
1.5 |
else |
13 |
slords |
1.10 |
rsync -avhHP --exclude '*.iso*' --delete-excluded --delete /build/smeserver/stage/iso/${ver:0:1}/ /build/smeserver/repo/$dest/$ver/iso/ |
14 |
slords |
1.1 |
fi |
15 |
slords |
1.10 |
rsync -avhHP --exclude 'product/' --exclude 'updates/' --delete-excluded --delete \ |
16 |
|
|
--exclude 'pkgorder.*' --exclude 'build_*' --exclude '*.jigdo/' \ |
17 |
|
|
/build/smeserver/stage/${ver:0:1}/ /build/smeserver/repo/$dest/$ver/${prefix}os/ |
18 |
|
|
|
19 |
|
|
if [ ${ver:0:1} -eq 8 ] |
20 |
slords |
1.1 |
then |
21 |
slords |
1.10 |
createrepo --update --database --checksum sha --groupfile repodata/comps.xml /build/smeserver/repo/$dest/$ver/${prefix}os/i386/ |
22 |
|
|
createrepo --update --database --checksum sha --groupfile repodata/comps.xml /build/smeserver/repo/$dest/$ver/${prefix}os/x86_64/ |
23 |
slords |
1.1 |
fi |
24 |
|
|
|
25 |
slords |
1.9 |
ls /build > /dev/null |
26 |
|
|
find /build/builds/ /build/smeserver/repo/ /build/smeserver//stage/ \ |
27 |
|
|
-not -user releases -exec chown -h releases {} \+ \ |
28 |
|
|
, -not -regex ".*/${prefix}\(contribs\|updates-testing\)/i386/RPMS" \ |
29 |
|
|
-not -group releases -exec chgrp -h releases {} \+ \ |
30 |
|
|
, -type f -\( -not -perm -664 -o -perm -002 -\) -exec chmod u+rw,g+rw,o+r,o-w {} \+ \ |
31 |
|
|
, -type d -\( -not -perm -2775 -o -perm -002 -\) -exec chmod u+rwx,g+rwxs,o+rx,o-w {} \+ \ |
32 |
|
|
, -regex ".*/${prefix}updates-testing/i386/RPMS" -exec chgrp updates {} \+ \ |
33 |
|
|
, -regex ".*/${prefix}contribs/i386/RPMS" -exec chgrp contribs {} \+ |