summaryrefslogtreecommitdiff
path: root/cron-jobs
diff options
context:
space:
mode:
Diffstat (limited to 'cron-jobs')
-rwxr-xr-xcron-jobs/ftpdir-cleanup12
-rwxr-xr-xcron-jobs/integrity-check2
-rwxr-xr-xcron-jobs/make_repo_torrents4
-rwxr-xr-xcron-jobs/repo-sanity-check4
-rwxr-xr-xcron-jobs/sourceballs10
5 files changed, 16 insertions, 16 deletions
diff --git a/cron-jobs/ftpdir-cleanup b/cron-jobs/ftpdir-cleanup
index 4a2b418..8718869 100755
--- a/cron-jobs/ftpdir-cleanup
+++ b/cron-jobs/ftpdir-cleanup
@@ -26,13 +26,13 @@ clean_pkg() {
for repo in "${PKGREPOS[@]}"; do
for arch in "${ARCHES[@]}"; do
- if [ ! -f "${FTP_BASE}/${repo}/os/${arch}/${repo}${DBEXT}" ]; then
+ if [ ! -f "${root_dir}/${repo}/os/${arch}/${repo}${DBEXT}" ]; then
continue
fi
# get a list of actual available package files
- find "${FTP_BASE}/${repo}/os/${arch}" -xtype f -name "*${PKGEXT}" -printf '%f\n' | sort > "${WORKDIR}/repo-${repo}-${arch}"
+ find "${root_dir}/${repo}/os/${arch}" -xtype f -name "*${PKGEXT}" -printf '%f\n' | sort > "${WORKDIR}/repo-${repo}-${arch}"
# get a list of package files defined in the repo db
- bsdtar -xOf "${FTP_BASE}/${repo}/os/${arch}/${repo}${DBEXT}" | awk '/^%FILENAME%/{getline;print}' | sort > "${WORKDIR}/db-${repo}-${arch}"
+ bsdtar -xOf "${root_dir}/${repo}/os/${arch}/${repo}${DBEXT}" | 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
@@ -47,14 +47,14 @@ for repo in "${PKGREPOS[@]}"; do
msg "Removing old packages from [%s] (%s)..." "${repo}" "${arch}"
for old_pkg in "${old_pkgs[@]}"; do
msg2 '%s' "${old_pkg}"
- clean_pkg "${FTP_BASE}/${repo}/os/${arch}/${old_pkg}"
+ clean_pkg "${root_dir}/${repo}/os/${arch}/${old_pkg}"
done
fi
done
done
# get a list of all available packages in the pacakge pool
-find "$FTP_BASE/${PKGPOOL}" -name "*${PKGEXT}" -printf '%f\n' | sort > "${WORKDIR}/pool"
+find "${root_dir}/${PKGPOOL}" -name "*${PKGEXT}" -printf '%f\n' | sort > "${WORKDIR}/pool"
# create a list of packages in our db
cat "${WORKDIR}/db-"* | sort -u > "${WORKDIR}/db"
@@ -63,7 +63,7 @@ if [ ${#old_pkgs[@]} -ge 1 ]; then
msg "Removing old packages from package pool..."
for old_pkg in "${old_pkgs[@]}"; do
msg2 '%s' "${old_pkg}"
- clean_pkg "$FTP_BASE/${PKGPOOL}/${old_pkg}"
+ clean_pkg "${root_dir}/${PKGPOOL}/${old_pkg}"
done
fi
diff --git a/cron-jobs/integrity-check b/cron-jobs/integrity-check
index 7459380..7896f32 100755
--- a/cron-jobs/integrity-check
+++ b/cron-jobs/integrity-check
@@ -16,7 +16,7 @@ check() {
"${dirname}"/check_archlinux/check_packages.py \
--repos="${repos}" \
--abs-tree="/srv/abs/rsync/${arch},/srv/abs/rsync/any" \
- --repo-dir="${FTP_BASE}" \
+ --repo-dir="${root_dir}" \
--arch="${arch}" \
2>&1 | "${dirname}"/devlist-mailer "Integrity Check ${arch}: ${repos}" "${mailto}"
}
diff --git a/cron-jobs/make_repo_torrents b/cron-jobs/make_repo_torrents
index 2eb0978..bb59d2f 100755
--- a/cron-jobs/make_repo_torrents
+++ b/cron-jobs/make_repo_torrents
@@ -34,8 +34,8 @@ esac
# so it's OK to just stuff all the torrents into a single directory.
script_directory="$(dirname "$(readlink -e "$0")")/.."
. "$(dirname "$(readlink -e "$0")")/../config"
-public_location="$FTP_BASE/"
-torrent_location="$FTP_BASE/torrents/"
+public_location="${root_dir}/"
+torrent_location="${root_dir}/torrents/"
cd "${torrent_location}"
diff --git a/cron-jobs/repo-sanity-check b/cron-jobs/repo-sanity-check
index 239f042..13f1ad1 100755
--- a/cron-jobs/repo-sanity-check
+++ b/cron-jobs/repo-sanity-check
@@ -39,7 +39,7 @@ for _repo in "${PKGREPOS[@]}"; do
# Find all pkgnames on repos
on_repo=($(
- find "${FTP_BASE}/${_repo}" -name "*.pkg.tar.?z" \
+ find "${root_dir}/${_repo}" -name "*.pkg.tar.?z" \
-printf "%f\n" | sed "s/^\(.\+\)-[^-]\+-[^-]\+-[^-]\+$/\1/"
))
@@ -49,7 +49,7 @@ for _repo in "${PKGREPOS[@]}"; do
<(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" \
+ find "${root_dir}/${_repo}" -name "*.db.tar.?z" \
-exec repo-remove {} "${remove[@]}" \; >/dev/null 2>&1
msg2 "Removed the following packages:"
diff --git a/cron-jobs/sourceballs b/cron-jobs/sourceballs
index c12a128..38104c7 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 "${FTP_BASE}/${repo}/os/${arch}/${repo}${DBEXT}" ]; then
+ if [ ! -f "${root_dir}/${repo}/os/${arch}/${repo}${DBEXT}" ]; then
continue
fi
- bsdtar -xOf "${FTP_BASE}/${repo}/os/${arch}/${repo}${DBEXT}" \
+ bsdtar -xOf "${root_dir}/${repo}/os/${arch}/${repo}${DBEXT}" \
| 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 "${FTP_BASE}/${SRCPOOL}" -xtype f -name "*${SRCEXT}" -printf '%f\n' | sort -u > "${WORKDIR}/available-src-pkgs"
+find "${root_dir}/${SRCPOOL}" -xtype f -name "*${SRCEXT}" -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
@@ -91,7 +91,7 @@ for repo in "${PKGREPOS[@]}"; do
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}" "${FTP_BASE}/${SRCPOOL}/${pkgbase}-${pkgver}${SRCEXT}"
+ mv_acl "${pkgbase}-${pkgver}${SRCEXT}" "${root_dir}/${SRCPOOL}/${pkgbase}-${pkgver}${SRCEXT}"
# Avoid creating the same source package for every arch
echo "${pkgbase}-${pkgver}${SRCEXT}" >> "${WORKDIR}/available-src-pkgs"
newpkgs+=("${pkgbase}-${pkgver}${SRCEXT}")
@@ -128,7 +128,7 @@ if [ ${#old_pkgs[@]} -ge 1 ]; then
for old_pkg in "${old_pkgs[@]}"; do
msg2 '%s' "${old_pkg}"
if ! "${SOURCE_CLEANUP_DRYRUN}"; then
- mv_acl "$FTP_BASE/${SRCPOOL}/${old_pkg}" "${SOURCE_CLEANUP_DESTDIR}/${old_pkg}"
+ mv_acl "${root_dir}/${SRCPOOL}/${old_pkg}" "${SOURCE_CLEANUP_DESTDIR}/${old_pkg}"
touch "${SOURCE_CLEANUP_DESTDIR}/${old_pkg}"
fi
done