summaryrefslogtreecommitdiff
path: root/cron-jobs
diff options
context:
space:
mode:
Diffstat (limited to 'cron-jobs')
-rwxr-xr-xcron-jobs/check_archlinux/check_packages.py6
-rwxr-xr-xcron-jobs/ftpdir-cleanup26
-rwxr-xr-xcron-jobs/repo-sanity-check2
-rwxr-xr-xcron-jobs/sourceballs36
4 files changed, 35 insertions, 35 deletions
diff --git a/cron-jobs/check_archlinux/check_packages.py b/cron-jobs/check_archlinux/check_packages.py
index ac0194f..9f5a87b 100755
--- a/cron-jobs/check_archlinux/check_packages.py
+++ b/cron-jobs/check_archlinux/check_packages.py
@@ -22,7 +22,7 @@ import pdb
import ctypes
_alpm = ctypes.cdll.LoadLibrary("libalpm.so")
-DBEXT='.db.tar.gz'
+database_extension_suffixfile='.db.tar.gz'
packages = {} # pkgname : PacmanPackage
repopkgs = {} # pkgname : PacmanPackage
@@ -116,7 +116,7 @@ def parse_dbs(repos,arch):
dbpkgs = {}
for repo in repos:
pkgs = set([])
- db = tarfile.open(os.path.join(repodir,repo,'os',arch,repo + DBEXT))
+ db = tarfile.open(os.path.join(repodir,repo,'os',arch,repo + database_extension_suffixfile))
for line in db.getnames():
if not '/' in line:
pkgs.add(line.rsplit('-',2)[0])
@@ -423,7 +423,7 @@ if __name__ == "__main__":
print "Error: the repository directory %s does not exist" % repodir
sys.exit()
for repo in repos:
- path = os.path.join(repodir,repo,'os',arch,repo + DBEXT)
+ path = os.path.join(repodir,repo,'os',arch,repo + database_extension_suffixfile)
if not os.path.isfile(path):
print "Error : repo DB %s : File not found" % path
sys.exit()
diff --git a/cron-jobs/ftpdir-cleanup b/cron-jobs/ftpdir-cleanup
index 8718869..452aa83 100755
--- a/cron-jobs/ftpdir-cleanup
+++ b/cron-jobs/ftpdir-cleanup
@@ -7,32 +7,32 @@ clean_pkg() {
local pkg
local target
- if ! "${CLEANUP_DRYRUN}"; then
+ if ! "${cleanup_dryrun}"; then
for pkg in "$@"; do
if [ -h "$pkg" ]; then
rm -f "$pkg" "$pkg.sig"
else
- mv_acl "$pkg" "$CLEANUP_DESTDIR/${pkg##*/}"
+ mv_acl "$pkg" "${cleanup_destination_directory}/${pkg##*/}"
if [ -e "$pkg.sig" ]; then
- mv_acl "$pkg.sig" "$CLEANUP_DESTDIR/${pkg##*/}.sig"
+ mv_acl "$pkg.sig" "${cleanup_destination_directory}/${pkg##*/}.sig"
fi
- touch "${CLEANUP_DESTDIR}/${pkg##*/}"
+ touch "${cleanup_destination_directory}/${pkg##*/}"
fi
done
fi
}
-"${CLEANUP_DRYRUN}" && warning 'dry run mode is active'
+"${cleanup_dryrun}" && warning 'dry run mode is active'
for repo in "${PKGREPOS[@]}"; do
for arch in "${ARCHES[@]}"; do
- if [ ! -f "${root_dir}/${repo}/os/${arch}/${repo}${DBEXT}" ]; then
+ if [ ! -f "${root_dir}/${repo}/os/${arch}/${repo}${database_extension_suffixfile}" ]; then
continue
fi
# get a list of actual available package files
- find "${root_dir}/${repo}/os/${arch}" -xtype f -name "*${PKGEXT}" -printf '%f\n' | sort > "${WORKDIR}/repo-${repo}-${arch}"
+ find "${root_dir}/${repo}/os/${arch}" -xtype f -name "*${package_extension_suffixfile}" -printf '%f\n' | sort > "${WORKDIR}/repo-${repo}-${arch}"
# get a list of package files defined in the repo db
- bsdtar -xOf "${root_dir}/${repo}/os/${arch}/${repo}${DBEXT}" | awk '/^%FILENAME%/{getline;print}' | sort > "${WORKDIR}/db-${repo}-${arch}"
+ bsdtar -xOf "${root_dir}/${repo}/os/${arch}/${repo}${database_extension_suffixfile}" | awk '/^%FILENAME%/{getline;print}' | sort > "${WORKDIR}/db-${repo}-${arch}"
missing_pkgs=($(comm -13 "${WORKDIR}/repo-${repo}-${arch}" "${WORKDIR}/db-${repo}-${arch}"))
if [ ${#missing_pkgs[@]} -ge 1 ]; then
@@ -54,7 +54,7 @@ for repo in "${PKGREPOS[@]}"; do
done
# get a list of all available packages in the pacakge pool
-find "${root_dir}/${PKGPOOL}" -name "*${PKGEXT}" -printf '%f\n' | sort > "${WORKDIR}/pool"
+find "${root_dir}/${PKGPOOL}" -name "*${package_extension_suffixfile}" -printf '%f\n' | sort > "${WORKDIR}/pool"
# create a list of packages in our db
cat "${WORKDIR}/db-"* | sort -u > "${WORKDIR}/db"
@@ -67,14 +67,14 @@ if [ ${#old_pkgs[@]} -ge 1 ]; then
done
fi
-old_pkgs=($(find "${CLEANUP_DESTDIR}" -type f -name "*${PKGEXT}" -mtime +"${CLEANUP_KEEP}" -printf '%f\n'))
+old_pkgs=($(find "${cleanup_destination_directory}" -type f -name "*${package_extension_suffixfile}" -mtime +"${cleanup_keep}" -printf '%f\n'))
if [ ${#old_pkgs[@]} -ge 1 ]; then
msg "Removing old packages from the cleanup directory..."
for old_pkg in "${old_pkgs[@]}"; do
msg2 '%s' "${old_pkg}"
- if ! "${CLEANUP_DRYRUN}"; then
- rm -f "${CLEANUP_DESTDIR}/${old_pkg}"
- rm -f "${CLEANUP_DESTDIR}/${old_pkg}.sig"
+ if ! "${cleanup_dryrun}"; then
+ rm -f "${cleanup_destination_directory}/${old_pkg}"
+ rm -f "${cleanup_destination_directory}/${old_pkg}.sig"
fi
done
fi
diff --git a/cron-jobs/repo-sanity-check b/cron-jobs/repo-sanity-check
index 13f1ad1..203a740 100755
--- a/cron-jobs/repo-sanity-check
+++ b/cron-jobs/repo-sanity-check
@@ -13,7 +13,7 @@ for _repo in "${PKGREPOS[@]}"; do
# Find all pkgnames on this repo's abs
on_abs=($(
- find "${SVNREPO}/${_repo}" -name PKGBUILD | \
+ find "${SVN_repository}/${_repo}" -name PKGBUILD | \
while read pkgbuild; do
source "${pkgbuild}" >/dev/null 2>&1
# cleanup to save memory
diff --git a/cron-jobs/sourceballs b/cron-jobs/sourceballs
index 38104c7..7df349c 100755
--- a/cron-jobs/sourceballs
+++ b/cron-jobs/sourceballs
@@ -21,10 +21,10 @@ renice +10 -p $$ > /dev/null
for repo in "${PKGREPOS[@]}"; do
for arch in "${ARCHES[@]}"; do
# Repo does not exist; skip it
- if [ ! -f "${root_dir}/${repo}/os/${arch}/${repo}${DBEXT}" ]; then
+ if [ ! -f "${root_dir}/${repo}/os/${arch}/${repo}${database_extension_suffixfile}" ]; then
continue
fi
- bsdtar -xOf "${root_dir}/${repo}/os/${arch}/${repo}${DBEXT}" \
+ bsdtar -xOf "${root_dir}/${repo}/os/${arch}/${repo}${database_extension_suffixfile}" \
| awk '/^%NAME%/ { getline b };
/^%BASE%/ { getline b };
/^%VERSION%/ { getline v };
@@ -46,7 +46,7 @@ for repo in "${PKGREPOS[@]}"; do
done
# Create a list of all available source package file names
-find "${root_dir}/${SRCPOOL}" -xtype f -name "*${SRCEXT}" -printf '%f\n' | sort -u > "${WORKDIR}/available-src-pkgs"
+find "${root_dir}/${SRCPOOL}" -xtype f -name "*${source_extension_suffixfile}" -printf '%f\n' | sort -u > "${WORKDIR}/available-src-pkgs"
# Check for all packages if we need to build a source package
for repo in "${PKGREPOS[@]}"; do
@@ -69,12 +69,12 @@ for repo in "${PKGREPOS[@]}"; do
# continue
# fi
# Store the expected file name of the source package
- echo "${pkgbase}-${pkgver}${SRCEXT}" >> "${WORKDIR}/expected-src-pkgs"
+ echo "${pkgbase}-${pkgver}${source_extension_suffixfile}" >> "${WORKDIR}/expected-src-pkgs"
# Build the source package if its not already there
- if ! grep -Fqx "${pkgbase}-${pkgver}${SRCEXT}" "${WORKDIR}/available-src-pkgs"; then
+ if ! grep -Fqx "${pkgbase}-${pkgver}${source_extension_suffixfile}" "${WORKDIR}/available-src-pkgs"; then
# Check if we had failed before
- if in_array "${pkgbase}-${pkgver}${SRCEXT}" "${failedpkgs[@]}"; then
+ if in_array "${pkgbase}-${pkgver}${source_extension_suffixfile}" "${failedpkgs[@]}"; then
continue
fi
@@ -83,20 +83,20 @@ for repo in "${PKGREPOS[@]}"; do
cp -a "$(xbs releasepath "${pkgbase}" "${repo}" "${pkgarch}")" \
"${WORKDIR}/pkgbuilds/${repo}-${pkgarch}/${pkgbase}" >/dev/null 2>&1
if [ $? -ge 1 ]; then
- failedpkgs+=("${pkgbase}-${pkgver}${SRCEXT}")
+ failedpkgs+=("${pkgbase}-${pkgver}${source_extension_suffixfile}")
continue
fi
# Build the actual source package
pushd "${WORKDIR}/pkgbuilds/${repo}-${pkgarch}/${pkgbase}" >/dev/null
SRCPKGDEST=. makepkg --nocolor --allsource --ignorearch --skippgpcheck >"${WORKDIR}/${pkgbase}.log" 2>&1
- if [ $? -eq 0 ] && [ -f "${pkgbase}-${pkgver}${SRCEXT}" ]; then
- mv_acl "${pkgbase}-${pkgver}${SRCEXT}" "${root_dir}/${SRCPOOL}/${pkgbase}-${pkgver}${SRCEXT}"
+ if [ $? -eq 0 ] && [ -f "${pkgbase}-${pkgver}${source_extension_suffixfile}" ]; then
+ mv_acl "${pkgbase}-${pkgver}${source_extension_suffixfile}" "${root_dir}/${SRCPOOL}/${pkgbase}-${pkgver}${source_extension_suffixfile}"
# Avoid creating the same source package for every arch
- echo "${pkgbase}-${pkgver}${SRCEXT}" >> "${WORKDIR}/available-src-pkgs"
- newpkgs+=("${pkgbase}-${pkgver}${SRCEXT}")
+ echo "${pkgbase}-${pkgver}${source_extension_suffixfile}" >> "${WORKDIR}/available-src-pkgs"
+ newpkgs+=("${pkgbase}-${pkgver}${source_extension_suffixfile}")
else
- failedpkgs+=("${pkgbase}-${pkgver}${SRCEXT}")
+ failedpkgs+=("${pkgbase}-${pkgver}${source_extension_suffixfile}")
cat "${WORKDIR}/${pkgbase}.log" >> "${WORKDIR}/makepkg-fail.log"
fi
popd >/dev/null
@@ -124,22 +124,22 @@ old_pkgs=($(comm -23 "${WORKDIR}/available-src-pkgs.sort" "${WORKDIR}/expected-s
if [ ${#old_pkgs[@]} -ge 1 ]; then
msg "Removing old source packages..."
- "${SOURCE_CLEANUP_DRYRUN}" && warning 'dry run mode is active'
+ "${source_cleanup_dryrun}" && warning 'dry run mode is active'
for old_pkg in "${old_pkgs[@]}"; do
msg2 '%s' "${old_pkg}"
- if ! "${SOURCE_CLEANUP_DRYRUN}"; then
- mv_acl "${root_dir}/${SRCPOOL}/${old_pkg}" "${SOURCE_CLEANUP_DESTDIR}/${old_pkg}"
- touch "${SOURCE_CLEANUP_DESTDIR}/${old_pkg}"
+ if ! "${source_cleanup_dryrun}"; then
+ mv_acl "${root_dir}/${SRCPOOL}/${old_pkg}" "${source_cleanup_destination_directory}/${old_pkg}"
+ touch "${source_cleanup_destination_directory}/${old_pkg}"
fi
done
fi
-old_pkgs=($(find "${SOURCE_CLEANUP_DESTDIR}" -type f -name "*${SRCEXT}" -mtime +"${SOURCE_CLEANUP_KEEP}" -printf '%f\n'))
+old_pkgs=($(find "${source_cleanup_destination_directory}" -type f -name "*${source_extension_suffixfile}" -mtime +"${source_cleanup_keep}" -printf '%f\n'))
if [ ${#old_pkgs[@]} -ge 1 ]; then
msg "Removing old source packages from the cleanup directory..."
for old_pkg in "${old_pkgs[@]}"; do
msg2 '%s' "${old_pkg}"
- "${SOURCE_CLEANUP_DRYRUN}" || rm -f "${SOURCE_CLEANUP_DESTDIR}/${old_pkg}"
+ "${source_cleanup_dryrun}" || rm -f "${source_cleanup_destination_directory}/${old_pkg}"
done
fi