/[smeserver]/builds_bin/rsync_sme
ViewVC logotype

Diff of /builds_bin/rsync_sme

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

Revision 1.5 by slords, Wed Aug 18 14:49:19 2010 UTC Revision 1.11 by jpp, Sun Jun 14 05:54:38 2020 UTC
# Line 1  Line 1 
1  #!/bin/bash  #!/bin/bash
2    #change the release number on the ver line
3    # run this as root
4    # set det to testing or empty
5  prefix=sme  prefix=sme
6  ver=$(basename $(readlink -f /stage/${1:-8}))  ver=$(basename $(readlink -f /build/smeserver/stage/${1:-10}))
7  isos=${2:-false}  isos=${2:-false}
8    dest="testing"
9    
10  mkdir -p  /releases/testing/$ver/{${prefix}os,iso}  mkdir -p  /build/smeserver/repo/$dest/$ver/{${prefix}os,iso}
11  if $isos  if $isos
12  then  then
13      rsync -avhHP --delete /stage/iso/${ver:0:1}/ /releases/testing/$ver/iso/      rsync -avhHP --delete /build/smeserver/stage/iso/${ver%%.*}/ /build/smeserver/repo/$dest/$ver/iso/
14  else  else
15      rsync -avhHP --exclude '*.iso*' --delete-excluded --delete /stage/iso/${ver:0:1}/ /releases/testing/$ver/iso/      rsync -avhHP --exclude '*.iso*' --delete-excluded --delete /build/smeserver/stage/iso/${ver%%.*}/ /build/smeserver/repo/$dest/$ver/iso/
16  fi  fi
17  rsync -avhHP --exclude 'product/' --exclude 'updates/' --exclude 'pkgorder.*' --exclude 'build_*' --exclude '*.jigdo/' --delete-excluded --delete /stage/${ver:0:1}/ /releases/testing/$ver/${prefix}os/  rsync -avhHP --exclude 'product/' --exclude 'updates/' --delete-excluded --delete \
18  if [ -f /releases/testing/$ver/${prefix}os/i386/repodata/comps.xml ]      --exclude 'pkgorder.*' --exclude 'build_*' --exclude '*.jigdo/' \
19        /build/smeserver/stage/${ver%%.*}/ /build/smeserver/repo/$dest/$ver/${prefix}os/
20    
21    if [ ${ver%%.*} -eq 8 ]
22  then  then
23      createrepo --update --database --groupfile repodata/comps.xml /releases/testing/$ver/${prefix}os/i386/      createrepo --update --database --checksum sha --groupfile repodata/comps.xml /build/smeserver/repo/$dest/$ver/${prefix}os/i386/
24      createrepo --update --database --groupfile repodata/comps.xml /releases/testing/$ver/${prefix}os/x86_64/      createrepo --update --database --checksum sha --groupfile repodata/comps.xml /build/smeserver/repo/$dest/$ver/${prefix}os/x86_64/
25  fi  fi
26    
27  ls /builds /releases /stage > /dev/null  ls /build > /dev/null
28  find /builds/ /releases/ /stage/ -not -user releases -exec chown releases {} \+ -o -not -group releases -exec chgrp releases {} \+  if [ ${ver%%.*} -eq 10 ]
29  chgrp updates $(ls -d /releases{/,/testing}/[0-9]/${prefix}updates-testing/i386/RPMS 2> /dev/null)  then
30  chgrp contribs $(ls -d /releases{/,/testing}/[0-9]/${prefix}contribs/i386/RPMS 2> /dev/null)  
31  find /builds/ /releases/ /stage/ -type f -\( -not -perm -664 -o -perm -002 -\) -print0 | xargs -r0 chmod u+rw,g+rw,o+r,o-w  find /build/builds/ /build/smeserver/repo/ /build/smeserver//stage/ \
32  find /builds/ /releases/ /stage/ -type d -\( -not -perm -2775 -o -perm -002 -\) -print0 | xargs -r0 chmod u+rwx,g+rwxs,o+rx,o-w        -not -user releases -exec chown -h releases {} \+ \
33        , -not -regex ".*/${prefix}\(contribs\|updates-testing\)/x86_64/RPMS" \
34          -not -group releases -exec chgrp -h releases {} \+ \
35        , -type f -\( -not -perm -664 -o -perm -002 -\) -exec chmod u+rw,g+rw,o+r,o-w {} \+ \
36        , -type d -\( -not -perm -2775 -o -perm -002 -\) -exec chmod u+rwx,g+rwxs,o+rx,o-w {} \+ \
37        , -regex ".*/${prefix}updates-testing/x86_64/RPMS" -exec chgrp updates {} \+ \
38        , -regex ".*/${prefix}contribs/x86_64/RPMS" -exec chgrp contribs {} \+
39    else
40    find /build/builds/ /build/smeserver/repo/ /build/smeserver//stage/ \
41          -not -user releases -exec chown -h releases {} \+ \
42        , -not -regex ".*/${prefix}\(contribs\|updates-testing\)/\(i386\|x86_64\)/RPMS" \
43          -not -group releases -exec chgrp -h releases {} \+ \
44        , -type f -\( -not -perm -664 -o -perm -002 -\) -exec chmod u+rw,g+rw,o+r,o-w {} \+ \
45        , -type d -\( -not -perm -2775 -o -perm -002 -\) -exec chmod u+rwx,g+rwxs,o+rx,o-w {} \+ \
46        , -regex ".*/${prefix}updates-testing/i386/RPMS" -exec chgrp updates {} \+ \
47        , -regex ".*/${prefix}contribs/i386/RPMS" -exec chgrp contribs {} \+
48    fi


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