diff options
-rwxr-xr-x | clean_repo.py | 4 | ||||
-rw-r--r-- | config | 19 | ||||
-rwxr-xr-x | config.py | 2 | ||||
-rwxr-xr-x | filter.py | 4 | ||||
-rwxr-xr-x | list_nonfree_in_db.py | 4 | ||||
-rwxr-xr-x | migrate-repo | 29 | ||||
-rwxr-xr-x | repo-add | 2 | ||||
-rwxr-xr-x | repo-update | 48 |
8 files changed, 73 insertions, 39 deletions
diff --git a/clean_repo.py b/clean_repo.py index cc8e811..076de60 100755 --- a/clean_repo.py +++ b/clean_repo.py @@ -1,6 +1,6 @@ -#! /usr/bin/python +#! /usr/bin/python2 #-*- encoding: utf-8 -*- -from repm.filter import * +from filter import * import argparse def mkpending(packages_iterable, pending_file, blacklisted_names, @@ -1,27 +1,27 @@ #!/bin/bash -FTP_BASE="/srv/http/repo/public/temprepo" -ARCH_BASE="/srv/http/repo/public/temprepo" +FTP_BASE="/srv/http/repo/public" +ARCH_BASE="/srv/http/repo/public" SVNREPO="/var/abs" # Repos from Arch -ARCHREPOS=('core' 'testing') #'extra' 'community' 'testing' 'multilib') +ARCHREPOS=('core' 'testing' 'extra' 'community' 'multilib') # Official Parabola repos OURREPOS=('libre' 'libre-testing') # User repos -USERREPOS=('~fauno' '~smv' '~xihh' '~mtjm') +USERREPOS=('~fauno' '~smv' '~xihh' '~mtjm' '~brendan') # Community project repos -PROJREPOS=('social' 'elementary' 'kernels' 'radio' 'security' 'social') +PROJREPOS=('social' 'elementary' 'kernels' 'radio' 'security' 'sugar') PKGREPOS=(${ARCHREPOS[@]} ${OURREPOS[@]} ${USERREPOS[@]} ${PROJREPOS[@]}) PKGPOOL='pool/packages' SRCPOOL='sources/packages' CLEANUP_DESTDIR="$FTP_BASE/old/packages" -CLEANUP_DRYRUN=false +CLEANUP_DRYRUN=true # Time in days to keep moved packages CLEANUP_KEEP=30 SOURCE_CLEANUP_DESTDIR="$FTP_BASE/old/sources" -SOURCE_CLEANUP_DRYRUN=false +SOURCE_CLEANUP_DRYRUN=true # Time in days to keep moved sourcepackages SOURCE_CLEANUP_KEEP=30 @@ -33,11 +33,12 @@ LOCK_TIMEOUT=300 STAGING="$FTP_BASE/staging" TMPDIR="/tmp" ARCHARCHES=(i686 x86_64) -ARCHES=(${ARCHARCHES[@]} mips64el) +OURARCHES=(mips64el) +ARCHES=(${ARCHARCHES[@]} ${OURARCHES[@]}) DBEXT=".db.tar.gz" FILESEXT=".files.tar.gz" PKGEXT=".pkg.tar.?z" SRCEXT=".src.tar.gz" -MAKEPKGCONF="/etc/makepkg.conf" +MAKEPKGCONF="~/.makepkg.conf" BLACKLIST_FILE="$HOME/blacklist/blacklist.txt" @@ -1,4 +1,4 @@ -#!/usr/bin/python +#!/usr/bin/python2 # -*- coding: utf-8 -*- try: from subprocess import check_output @@ -1,7 +1,7 @@ -#! /usr/bin/python +#! /usr/bin/python2 #-*- encoding: utf-8 -*- from glob import glob -from repm.config import * +from config import * import tarfile def listado(filename, start=0, end=None): diff --git a/list_nonfree_in_db.py b/list_nonfree_in_db.py index 598a2e7..4e1b164 100755 --- a/list_nonfree_in_db.py +++ b/list_nonfree_in_db.py @@ -1,6 +1,6 @@ -#! /usr/bin/python +#! /usr/bin/python2 #-*- encoding: utf-8 -*- -from repm.filter import * +from filter import * import argparse if __name__ == "__main__": diff --git a/migrate-repo b/migrate-repo new file mode 100755 index 0000000..2e44adb --- /dev/null +++ b/migrate-repo @@ -0,0 +1,29 @@ +#!/bin/bash + +source $(dirname $0)/config + +#dryrun="--dry-run" + +# Sync our repos +#for parabola_repo in ${OURREPOS[@]} ${USERREPOS[@]} ${PROJREPOS[@]}; do +for parabola_repo in ${USERREPOS[@]} ${PROJREPOS[@]}; do + echo ":: Syncing ${parabola_repo}/ => ${FTP_BASE}/${parabola_repo}/" + rsync -avL ${dryrun} --progress -e ssh parabolavnx@69.163.153.218:repo/${parabola_repo}/ ${FTP_BASE}/${parabola_repo}/ +done + +# Sync our arches +#for parabola_arch in ${OURARCHES[@]}; do +#for arch_repo in ${ARCHREPOS[@]}; do + #echo ":: Syncing ${arch_repo}/os/${parabola_arch}/ => ${FTP_BASE}/${arch_repo}/os/${parabola_arch}/" +# rsync -avL ${dryrun} --progress -e ssh parabolavnx@69.163.153.218:repo/${arch_repo}/os/${parabola_arch}/ ${FTP_BASE}/${arch_repo}/os/${parabola_arch}/ +#done +#done +# +# Sync other dirs last +#for other in screenshots isos; do +for other in other; do + echo ":: Syncing ${other}/ => ${FTP_BASE}/${other}/" + rsync -avL ${dryrun} --progress -e ssh parabolavnx@69.163.153.218:repo/${other}/ ${FTP_BASE}/${other} +done + +exit $? @@ -20,7 +20,7 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see <http://www.gnu.org/licenses/>. -LICENSESDIR=/home/parabolavnx/licenses +LICENSESDIR=/srv/http/repo/licenses # gettext initialization export TEXTDOMAIN='pacman' diff --git a/repo-update b/repo-update index a44ae87..bf8d73c 100755 --- a/repo-update +++ b/repo-update @@ -6,28 +6,32 @@ source $(dirname $0)/local_config source $(dirname $0)/libremessages for repo in ${ARCHREPOS[@]}; do + msg "Syncing ${repo}" - for arch in ${ARCHARCHES[@]} 'any'; do - msg2 "${repo} ${arch}" - # makes a file containing rsync output for filter.py - ${rsync_list_command} \ - rsync://${mirror}/${mirrorpath}/${repo}/os/${arch}/ \ - ${repodir}/staging/${repo}/ > ${rsout_file} - # reads blacklist and rsout_file and makes an rsync exclude-from - # list - filter.py -r ${rsync_blacklist} -k ${blacklist} \ - -f ${rsout_file} - # list files in ${repodir}/${repo} and write their names on - # rsync_not_needed for using as an rsync exclude-from - find ${repodir}/${repo} -name "*${PKGEXT}" \ - -fprintf ${rsync_not_needed} '%f\n' - # Actual rsync command - ${rsync_update_command} \ - --exclude-from=${rsync_blacklist} \ - --exclude-from=${rsync_not_needed} \ - rsync://${mirror}/${mirrorpath}/${repo}/os/${arch}/ \ - ${repodir}/staging/${repo}/ - done + for arch in ${ARCHARCHES[@]}; do + msg2 "${repo} ${arch}" + # makes a file containing rsync output for filter.py + ${rsync_list_command} \ + rsync://${mirror}/${mirrorpath}/${repo}/os/${arch}/ \ + ${repodir}/staging/${repo}/os/${arch}/ > ${rsout_file}-${repo}-${arch} || exit 1 + # reads blacklist and rsout_file and makes an rsync exclude-from + # list + filter.py -r ${rsync_blacklist} -k ${blacklist} \ + -f ${rsout_file}-${repo}-${arch} || exit 1 + # list files in ${repodir}/${repo} and write their names on + # rsync_not_needed for using as an rsync exclude-from + #find ${repodir}/${repo}/os/${arch}/ -name "*${PKGEXT}" \ + # -fprintf ${rsync_not_needed}-${repo}-${arch} '%f\n' || exit 1 + #find ${repodir}/${PKGPOOL}/ -name "*${PKGEXT}" \ + find ${repodir}/${repo}/os/${arch}/ -name "*${PKGEXT}" \ + -fprintf ${rsync_not_needed}-${repo}-${arch} '%f\n' || exit 1 + # Actual rsync command + ${rsync_update_command} \ + --exclude-from=${rsync_blacklist} \ + --exclude-from=${rsync_not_needed}-${repo}-${arch} \ + rsync://${mirror}/${mirrorpath}/${repo}/os/${arch}/ \ + ${repodir}/staging/${repo}/ || exit 1 + done for arch in ${ARCHARCHES[@]}; do msg2 "Making pending list for $repo $arch" # if there is a db in repo (db is created on rsync) @@ -42,7 +46,7 @@ for repo in ${ARCHREPOS[@]}; do done # if some nonfree files got pass the filter this command delete them msg2 "Fallback cleaning repo" - $(dirname $0)/clean_repo.py -k ${blacklist} -d ${repodir}/staging/${repo} + $(dirname $0)/clean_repo.py -k ${blacklist} -d ${repodir}/staging/${repo} || exit 1 done msg "Removing leftover files..." |