summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoshua Ismael Haase Hernández <hahj87@gmail.com>2011-04-16 10:59:13 -0700
committerJoshua Ismael Haase Hernández <hahj87@gmail.com>2011-04-16 10:59:13 -0700
commit01fb98f402fdd703491c9f52414de2815d893cef (patch)
tree6d394918db9dd9a05de89ed34ce89fed7da62419
parent748600bf8dfba34b336ad642a6b26dae674db85f (diff)
Stable branch for repm
-rw-r--r--.gitignore5
-rwxr-xr-xhide_unfree66
-rwxr-xr-xrepo-update25
-rwxr-xr-xsync-free11
4 files changed, 106 insertions, 1 deletions
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 $?