summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--README3
-rw-r--r--config2
-rw-r--r--config.orig54
-rwxr-xr-xdb-move24
-rwxr-xr-xdb-sync15
5 files changed, 70 insertions, 28 deletions
diff --git a/README b/README
new file mode 100644
index 0000000..9ce2d3f
--- /dev/null
+++ b/README
@@ -0,0 +1,3 @@
+* Script to run if there is error and for update
+
+ - db-sync
diff --git a/config b/config
index 20ad307..42842de 100644
--- a/config
+++ b/config
@@ -10,7 +10,7 @@ OURREPOS=('libre' 'libre-testing')
# User repos
USERREPOS=('~fauno' '~smv' '~xihh' '~mtjm' '~brendan' '~lukeshu' '~emulatorman' '~aurelien' '~jorginho' '~coadde')
# Community project repos
-PROJREPOS=('pcr' 'social' 'gis' 'artistic' 'elementary' 'kernels' 'radio' 'security' 'sugar' 'gnu' 'cross')
+PROJREPOS=('pcr' 'social' 'gis' 'artistic' 'elementary' 'kernels' 'radio' 'security' 'sugar' 'gnu' 'cross' 'java' 'java-ugly' 'coherence')
# Remote repos
RMTREPOS=('connos' 'connos-extra')
PKGREPOS=(${ARCHREPOS[@]} ${OURREPOS[@]} ${USERREPOS[@]} ${PROJREPOS[@]})
diff --git a/config.orig b/config.orig
new file mode 100644
index 0000000..a32f82f
--- /dev/null
+++ b/config.orig
@@ -0,0 +1,54 @@
+#!/bin/bash
+<<<<<<< HEAD
+FTP_BASE="/srv/http/repo/public"
+ARCH_BASE="/srv/http/repo/public"
+SVNREPO="/srv/http/repo/abslibre"
+=======
+FTP_BASE="/srv/http/repo/public/temprepo"
+ARCH_BASE="/srv/http/repo/public/temprepo"
+SVNREPO="/var/abs"
+>>>>>>> 801ea2c927ace5ee892209dd8e3c1044e1b3842e
+
+# Repos from Arch
+ARCHREPOS=('core' 'testing') #'extra' 'community' 'testing' 'multilib')
+# Official Parabola repos
+OURREPOS=('libre' 'libre-testing')
+# User repos
+USERREPOS=('~fauno' '~smv' '~xihh' '~mtjm' '~brendan')
+# Community project repos
+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=true
+# Time in days to keep moved packages
+CLEANUP_KEEP=30
+
+SOURCE_CLEANUP_DESTDIR="$FTP_BASE/old/sources"
+SOURCE_CLEANUP_DRYRUN=true
+# Time in days to keep moved sourcepackages
+SOURCE_CLEANUP_KEEP=30
+
+REQUIRE_SIGNATURE=true
+
+LOCK_DELAY=10
+LOCK_TIMEOUT=300
+
+STAGING="$FTP_BASE/staging"
+TMPDIR="/tmp"
+ARCHARCHES=(i686 x86_64)
+OURARCHES=(mips64el)
+ARCHES=(${ARCHARCHES[@]} ${OURARCHES[@]})
+DBEXT=".db.tar.gz"
+FILESEXT=".files.tar.gz"
+PKGEXT=".pkg.tar.?z"
+SRCEXT=".src.tar.gz"
+
+<<<<<<< HEAD
+MAKEPKGCONF="~/.makepkg.conf"
+=======
+MAKEPKGCONF="/etc/makepkg.conf"
+>>>>>>> 801ea2c927ace5ee892209dd8e3c1044e1b3842e
+BLACKLIST_FILE="$HOME/blacklist/blacklist.txt"
diff --git a/db-move b/db-move
index 019faa2..010d941 100755
--- a/db-move
+++ b/db-move
@@ -24,12 +24,10 @@ for pkgarch in ${ARCHES[@]}; do
repo_lock ${repo_from} ${pkgarch} || exit 1
done
-# check if packages to be moved exist in svn and ftp dir
-/usr/bin/svn checkout -q -N "${SVNREPO}" "${WORKDIR}/svn" >/dev/null
+# No idea why we loop twice... -- fauno
for pkgbase in ${args[@]:2}; do
- /usr/bin/svn up -q "${WORKDIR}/svn/${pkgbase}" >/dev/null
for pkgarch in ${ARCHES[@]} 'any'; do
- svnrepo_from="${WORKDIR}/svn/${pkgbase}/repos/${repo_from}-${pkgarch}"
+ svnrepo_from="${SVNREPO}/${repo_from}/${pkgbase}"
if [ -r "${svnrepo_from}/PKGBUILD" ]; then
pkgnames=($(. "${svnrepo_from}/PKGBUILD"; echo ${pkgname[@]}))
if [ ${#pkgnames[@]} -lt 1 ]; then
@@ -64,8 +62,7 @@ declare -A add_pkgs
declare -A remove_pkgs
for pkgbase in ${args[@]:2}; do
for pkgarch in ${ARCHES[@]} 'any'; do
- svnrepo_from="${WORKDIR}/svn/${pkgbase}/repos/${repo_from}-${pkgarch}"
- svnrepo_to="${WORKDIR}/svn/${pkgbase}/repos/${repo_to}-${pkgarch}"
+ svnrepo_from="${SVNREPO}/${repo_from}/${pkgbase}"
if [ -f "${svnrepo_from}/PKGBUILD" ]; then
if [ "${pkgarch}" == 'any' ]; then
@@ -77,21 +74,6 @@ for pkgbase in ${args[@]:2}; do
pkgnames=($(. "${svnrepo_from}/PKGBUILD"; echo ${pkgname[@]}))
pkgver=$(. "${svnrepo_from}/PKGBUILD"; echo $(get_full_version ${epoch:-0} ${pkgver} ${pkgrel}))
- if [ -d "${svnrepo_to}" ]; then
- for file in $(/usr/bin/svn ls "${svnrepo_to}"); do
- /usr/bin/svn rm -q "${svnrepo_to}/$file"
- done
- else
- mkdir "${svnrepo_to}"
- /usr/bin/svn add -q "${svnrepo_to}"
- fi
-
- for file in $(svn ls "${svnrepo_from}"); do
- /usr/bin/svn mv -q -r HEAD "${svnrepo_from}/$file" "${svnrepo_to}/"
- done
- /usr/bin/svn rm --force -q "${svnrepo_from}"
- /usr/bin/svn commit -q "${WORKDIR}/svn/${pkgbase}" -m "$(basename $0): moved ${pkgbase} from [${repo_from}] to [${repo_to}] (${pkgarch})"
-
for pkgname in ${pkgnames[@]}; do
for tarch in ${tarches[@]}; do
pkgpath=$(getpkgfile "${ftppath_from}/${tarch}/"${pkgname}-${pkgver}-${pkgarch}${PKGEXT})
diff --git a/db-sync b/db-sync
index d86d348..81dee24 100755
--- a/db-sync
+++ b/db-sync
@@ -12,15 +12,18 @@
# * Sync repo => repo
# TODO
-# * verbose mode
# * make a tarball of files used for forensics
# * get files db
+# Run as `V=true db-sync` to get verbose output
+VERBOSE=${V}
+${VERBOSE} && extra="-v"
+
# Returns contents of a repo
get_repos() {
mkdir -p ${TMPDIR}/$0.$$.cache
# Exclude everything but db files
- rsync -vmrtlH --no-p --include="*/" \
+ rsync ${extra} -mrtlH --no-p --include="*/" \
--include="*.db" \
--include="*${DBEXT}" \
--exclude="*" \
@@ -93,7 +96,7 @@ init() {
# Sync excluding everything but whitelist
# We delete here for cleanup
- rsync -vrtlH \
+ rsync ${extra} -rtlH \
--delete-after \
--delete-excluded \
--delay-updates \
@@ -106,7 +109,7 @@ init() {
whitelists+=(/tmp/${_repo}-${_arch}.whitelist)
msg "Putting databases back in place"
- rsync -vrtlH \
+ rsync ${extra} -rtlH \
--delay-updates \
--safe-links \
${TMPDIR}/$0.$$.cache/${_repo}/os/${_arch}/ \
@@ -128,7 +131,7 @@ init() {
# *Don't delete-after*, this is the job of cleanup scripts. It will remove our
# packages too
for PKGPOOL in ${PKGPOOLS[@]}; do
- rsync -vrtlH \
+ rsync ${extra} -rtlH \
--delay-updates \
--safe-links \
--include-from=/tmp/any.whitelist \
@@ -146,7 +149,7 @@ init() {
# *Don't delete-after*, this is the job of cleanup scripts. It will remove our
# packages too
for SRCPOOL in ${SRCPOOLS[@]}; do
- rsync -vrtlH \
+ rsync ${extra} -rtlH \
--delay-updates \
--safe-links \
--include-from=/tmp/any.whitelist \