From 01fb98f402fdd703491c9f52414de2815d893cef Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Joshua=20Ismael=20Haase=20Hern=C3=A1ndez?= Date: Sat, 16 Apr 2011 10:59:13 -0700 Subject: Stable branch for repm --- .gitignore | 5 ++++- hide_unfree | 66 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ repo-update | 25 +++++++++++++++++++++++ sync-free | 11 +++++++++++ 4 files changed, 106 insertions(+), 1 deletion(-) create mode 100755 hide_unfree create mode 100755 repo-update create mode 100755 sync-free diff --git a/.gitignore b/.gitignore index e645833..869c26c 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,5 @@ *~ -*.pyc \ No newline at end of file +*.pyc +local_config +/config.local +test/packages/*/*.pkg.tar.* diff --git a/hide_unfree b/hide_unfree new file mode 100755 index 0000000..2dd02e8 --- /dev/null +++ b/hide_unfree @@ -0,0 +1,66 @@ +#!/bin/bash +# This script hides unfree packages that repo-maintainer takes read permissions off. + +repo_dir='/home/parabolavnx/parabolagnulinux.org/repo' + +there_are_packages_on_this_dirs=( + 'community/os/i686' + 'community/os/x86_64' + 'community-testing/os/i686' + 'community-testing/os/x86_64' + 'testing/os/i686' + 'testing/os/x86_64' + 'core/os/i686' + 'core/os/x86_64' + 'extra/os/i686' + 'extra/os/x86_64' + 'multilib/os/i686' + 'multilib/os/x86_64' +) + +copy_into_this_dirs=( + 'community/os/any' + 'community/os/i686' + 'community/os/x86_64' + 'core/os/any' + 'core/os/i686' + 'core/os/x86_64' + 'extra/os/any' + 'extra/os/i686' + 'extra/os/x86_64' + 'multilib/os/i686' + 'multilib/os/x86_64' + 'sources/packages' + 'sources/community' + 'community-testing/os/i686' + 'community-testing/os/x86_64' + 'testing/os/i686' + 'testing/os/x86_64' +) + +source_dirs=( + 'sources/packages' + 'sources/community' +) + +blacklist=($(cat /home/parabolavnx/parabolagnulinux.org/docs/{blacklist,pending-*}.txt | cut -d':' -f1)) +echo ${blacklist[@]} + +for dir in ${copy_into_this_dirs[@]}; do + cp --remove-destination ~/hide_unfree_index.php "${repo_dir}/${dir}/index.php" +done + +for unfree in ${blacklist[@]}; do + for source_dir in ${source_dirs[@]}; do + chmod -rx ${repo_dir}/${source_dir}/${unfree}-[0-9]*-*.src.tar.gz + done +done + +# Duplicate to avoid increasing the window of missing index.php that can show unfree packages +#for dir in ${there_are_packages_on_this_dirs[@]}; do +# # guess the repo name +# license-add ${repo_dir}/${dir}/$(echo "$dir" | cut -d'/' -f1).licenses.tar.gz ${repo_dir}/${dir}/*.pkg.tar.* +#done + + +exit 0 diff --git a/repo-update b/repo-update new file mode 100755 index 0000000..7038789 --- /dev/null +++ b/repo-update @@ -0,0 +1,25 @@ +#!/bin/sh + +source ~/.bashrc # the PATH is updated here + +# Updates free/ databases and releases packages on free/staging +# Also moves old packages to the old/packages dir +db-update +~/repm/cron-jobs/ftpdir-cleanup + +# Syncs repos +#python ~/usr/bin/repo-maintainer +python ~/repm/pato2.py + +# Copy free/pool to repo/pool +#for dir in community core extra libre libre-testing pool social sources sugar; do +# rsync -va --recursive --copy-links /home/parabolavnx/parabolagnulinux.org/free/$dir /home/parabolavnx/parabolagnulinux.org/repo/ +#done + +# Hide unfree packages on apache's dir view +#~/usr/bin/hide_unfree + +~/repm/sync-free +find ~/parabolagnulinux.org/repo -name '*.abs.tar.gz' -delete + +exit 0 diff --git a/sync-free b/sync-free new file mode 100755 index 0000000..cce97d9 --- /dev/null +++ b/sync-free @@ -0,0 +1,11 @@ +#!/bin/sh +# Copy free/pool to repo/pool +for dir in community core extra testing pool; do + rsync -va --exclude=*.db.tar.* --exclude=*.db --recursive --copy-links /home/parabolavnx/parabolagnulinux.org/free/$dir/ /home/parabolavnx/parabolagnulinux.org/repo/$dir/ +done + +for dir in libre libre-testing social sugar; do + rsync -va --delete-after --recursive --copy-links /home/parabolavnx/parabolagnulinux.org/free/$dir/ /home/parabolavnx/parabolagnulinux.org/repo/$dir/ +done + +exit $? -- cgit v1.1-4-g5e80