summaryrefslogtreecommitdiff
path: root/cron-jobs
diff options
context:
space:
mode:
Diffstat (limited to 'cron-jobs')
-rwxr-xr-xcron-jobs/devlist-mailer5
-rwxr-xr-xcron-jobs/ftpdir-cleanup10
-rwxr-xr-xcron-jobs/repo-sanity-check57
-rwxr-xr-xcron-jobs/sourceballs11
-rw-r--r--cron-jobs/sourceballs.skip24
5 files changed, 35 insertions, 72 deletions
diff --git a/cron-jobs/devlist-mailer b/cron-jobs/devlist-mailer
index 1a05521..7f298b9 100755
--- a/cron-jobs/devlist-mailer
+++ b/cron-jobs/devlist-mailer
@@ -2,9 +2,8 @@
#Dummy helper to send email to arch-dev
# It does nothing if no output
-LIST="arch-dev-public@archlinux.org"
-#LIST="aaronmgriffin@gmail.com"
-FROM="repomaint@archlinux.org"
+# Load $LIST and $FROM from the config file
+. "$(dirname "$(readlink -e "$0")")/../config"
SUBJECT="Repository Maintenance $(date +"%d-%m-%Y")"
if [ $# -ge 1 ]; then
diff --git a/cron-jobs/ftpdir-cleanup b/cron-jobs/ftpdir-cleanup
index 4a2b418..4063c09 100755
--- a/cron-jobs/ftpdir-cleanup
+++ b/cron-jobs/ftpdir-cleanup
@@ -22,6 +22,14 @@ clean_pkg() {
fi
}
+script_lock
+
+for repo in "${PKGREPOS[@]}"; do
+ for arch in "${ARCHES[@]}"; do
+ repo_lock "${repo}" "${arch}" || exit 1
+ done
+done
+
"${CLEANUP_DRYRUN}" && warning 'dry run mode is active'
for repo in "${PKGREPOS[@]}"; do
@@ -56,7 +64,7 @@ done
# get a list of all available packages in the pacakge pool
find "$FTP_BASE/${PKGPOOL}" -name "*${PKGEXT}" -printf '%f\n' | sort > "${WORKDIR}/pool"
# create a list of packages in our db
-cat "${WORKDIR}/db-"* | sort -u > "${WORKDIR}/db"
+find "${WORKDIR}" -maxdepth 1 -type f -name 'db-*' -exec cat {} \; | sort -u > "${WORKDIR}/db"
old_pkgs=($(comm -23 "${WORKDIR}/pool" "${WORKDIR}/db"))
if [ ${#old_pkgs[@]} -ge 1 ]; then
diff --git a/cron-jobs/repo-sanity-check b/cron-jobs/repo-sanity-check
deleted file mode 100755
index 239f042..0000000
--- a/cron-jobs/repo-sanity-check
+++ /dev/null
@@ -1,57 +0,0 @@
-#!/bin/bash
-# Solves issue165... on the old roundup install. From the database
-# backups, the title was "Older/deprecated packages never leave the
-# repo", I don't know how the body of the issue is stored in the DB,
-# but the title says enough, I think.
-
-. "$(dirname "$(readlink -e "$0")")/../config"
-. "$(dirname "$(readlink -e "$0")")/../db-functions"
-
-# Traverse all repos
-for _repo in "${PKGREPOS[@]}"; do
- msg "Cleaning up [%s]" "${_repo}"
-
- # Find all pkgnames on this repo's abs
- on_abs=($(
- find "${SVNREPO}/${_repo}" -name PKGBUILD | \
- while read pkgbuild; do
- source "${pkgbuild}" >/dev/null 2>&1
- # cleanup to save memory
- unset build package source md5sums pkgdesc pkgver pkgrel epoch \
- url license arch depends makedepends optdepends options \
- >/dev/null 2>&1
-
- # also cleanup package functions
- for _pkg in "${pkgname[@]}"; do
- unset "package_${pkg}" >/dev/null 2>&1
- done
-
- # this fills the on_abs array
- echo "${pkgname[@]}"
- done
- ))
-
- # quit if abs is empty
- if [ ${#on_abs[*]} -eq 0 ]; then
- warning "[%s]'s ABS tree is empty, skipping" "${_repo}"
- break
- fi
-
- # Find all pkgnames on repos
- on_repo=($(
- find "${FTP_BASE}/${_repo}" -name "*.pkg.tar.?z" \
- -printf "%f\n" | sed "s/^\(.\+\)-[^-]\+-[^-]\+-[^-]\+$/\1/"
- ))
-
- # Compares them, whatever is on repos but not on abs should be removed
- remove=($(comm -13 \
- <(printf '%s\n' "${on_abs[@]}" | sort -u) \
- <(printf '%s\n' "${on_repo[@]}" | sort -u) ))
-
- # Remove them from databases, ftpdir-cleanup will take care of the rest
- find "${FTP_BASE}/${_repo}" -name "*.db.tar.?z" \
- -exec repo-remove {} "${remove[@]}" \; >/dev/null 2>&1
-
- msg2 "Removed the following packages:"
- plain '%s' "${remove[@]}"
-done
diff --git a/cron-jobs/sourceballs b/cron-jobs/sourceballs
index c12a128..c02912a 100755
--- a/cron-jobs/sourceballs
+++ b/cron-jobs/sourceballs
@@ -63,11 +63,10 @@ for repo in "${PKGREPOS[@]}"; do
if grep -Fqx "${pkgbase}" "${dirname}/sourceballs.skip"; then
continue
fi
- # Commenting out, we'll sourceball everything
# Check if the license or .force file does not enforce creating a source package
-# if ! (chk_license ${pkglicense[@]} || grep -Fqx "${pkgbase}" "${dirname}/sourceballs.force"); then
-# continue
-# fi
+ if ! ([[ -z ${ALLOWED_LICENSES[*]} ]] || chk_license "${pkglicense[@]}" || grep -Fqx "${pkgbase}" "${dirname}/sourceballs.force"); then
+ continue
+ fi
# Store the expected file name of the source package
echo "${pkgbase}-${pkgver}${SRCEXT}" >> "${WORKDIR}/expected-src-pkgs"
@@ -118,8 +117,8 @@ for repo in "${PKGREPOS[@]}"; do
done
# Cleanup old source packages
-cat "${WORKDIR}/expected-src-pkgs" | sort -u > "${WORKDIR}/expected-src-pkgs.sort"
-cat "${WORKDIR}/available-src-pkgs" | sort -u > "${WORKDIR}/available-src-pkgs.sort"
+find "${WORKDIR}" -maxdepth 1 -type f -name 'expected-src-pkgs' -exec cat {} \; | sort -u > "${WORKDIR}/expected-src-pkgs.sort"
+find "${WORKDIR}" -maxdepth 1 -type f -name 'available-src-pkgs' -exec cat {} \; | sort -u > "${WORKDIR}/available-src-pkgs.sort"
old_pkgs=($(comm -23 "${WORKDIR}/available-src-pkgs.sort" "${WORKDIR}/expected-src-pkgs.sort"))
if [ ${#old_pkgs[@]} -ge 1 ]; then
diff --git a/cron-jobs/sourceballs.skip b/cron-jobs/sourceballs.skip
index 14d6f4b..0e1731c 100644
--- a/cron-jobs/sourceballs.skip
+++ b/cron-jobs/sourceballs.skip
@@ -1,14 +1,28 @@
-nexuiz-data
+0ad-data
+alienarena-data
+blobwars-data
+btanks-data
+dangerdeep-data
+egoboo-data
+fillets-ng-data
+flightgear-data
+frogatto-data
+gcompris-data
+naev-data
+openarena-data
+rocksndiamonds-data
+smc-data
+speed-dreams-data
torcs-data
tremulous-data
ufoai-data
-frogatto-data
vdrift-data
-naev-data
-btanks-data
+warmux-data
wesnoth-data
-texlive-bin
+widelands-data
+xonotic-data
texlive-bibtexextra
+texlive-bin
texlive-core
texlive-fontsextra
texlive-formatsextra