summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xclean_repo.py4
-rw-r--r--config19
-rwxr-xr-xconfig.py2
-rwxr-xr-xfilter.py4
-rwxr-xr-xlist_nonfree_in_db.py4
-rwxr-xr-xmigrate-repo29
-rwxr-xr-xrepo-add2
-rwxr-xr-xrepo-update48
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,
diff --git a/config b/config
index 23b7bbb..7122aef 100644
--- a/config
+++ b/config
@@ -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"
diff --git a/config.py b/config.py
index 4e218a5..0ffc475 100755
--- a/config.py
+++ b/config.py
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/python2
# -*- coding: utf-8 -*-
try:
from subprocess import check_output
diff --git a/filter.py b/filter.py
index 5d90bdd..70d5e29 100755
--- a/filter.py
+++ b/filter.py
@@ -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 $?
diff --git a/repo-add b/repo-add
index c4bf96f..ef9c1e1 100755
--- a/repo-add
+++ b/repo-add
@@ -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..."