summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuke Shumaker <LukeShu@sbcglobal.net>2014-06-18 12:36:33 -0400
committerLuke Shumaker <LukeShu@sbcglobal.net>2014-06-18 12:36:33 -0400
commitdf49c9b89e56b6c8d2d20cdcc9e03dc80996fcdd (patch)
tree26a710fd24b38a953d662707d46445662ba0a29b
parent63381988ae8a0f4e0c8eaede88b43a5f685ec80f (diff)
use tab indent
-rwxr-xr-xany-to-ours78
-rwxr-xr-xcreate-repo18
-rwxr-xr-xcron-jobs/check_archlinux/parse_pkgbuilds.sh10
-rwxr-xr-xcron-jobs/devlist-mailer6
-rwxr-xr-xcron-jobs/repo-sanity-check88
-rwxr-xr-xcron-jobs/sourceballs248
-rwxr-xr-xdb-check-nonfree36
-rwxr-xr-xdb-cleanup44
-rwxr-xr-xdb-list-unsigned-packages4
-rwxr-xr-xlibremessages4
-rwxr-xr-xmkrepo8
11 files changed, 172 insertions, 172 deletions
diff --git a/any-to-ours b/any-to-ours
index a1697c7..6afc7b0 100755
--- a/any-to-ours
+++ b/any-to-ours
@@ -2,9 +2,9 @@
# Releases 'any' packages from Arch arches to ours
trap_exit() {
- echo
- error "$@"
- exit 1
+ echo
+ error "$@"
+ exit 1
}
source "$(dirname "$(readlink -e "$0")")/config"
@@ -22,51 +22,51 @@ BASEARCH='x86_64'
# Traverse all Arch repos
for _repo in ${ARCHREPOS[@]}; do
- msg "Processing ${_repo}..."
+ msg "Processing ${_repo}..."
-# Find 'any' packages
-# This is hardcoded but it could release other arches...
- PKGS=($(find "${FTP_BASE}/${_repo}/os/${BASEARCH}/" \
- -iname '*-any.pkg.tar.?z' \
- -printf "%f "))
+ # Find 'any' packages
+ # This is hardcoded but it could release other arches...
+ PKGS=($(find "${FTP_BASE}/${_repo}/os/${BASEARCH}/" \
+ -iname '*-any.pkg.tar.?z' \
+ -printf "%f "))
- if [ ${#PKGS[@]} -eq 0 ]; then
- msg2 "No 'any' packages here"
- continue
- fi
+ if [ ${#PKGS[@]} -eq 0 ]; then
+ msg2 "No 'any' packages here"
+ continue
+ fi
- for _arch in ${OURARCHES[@]}; do
- msg2 "Syncing ${_arch}..."
+ for _arch in ${OURARCHES[@]}; do
+ msg2 "Syncing ${_arch}..."
-# Sync 'any' only and extract the synced packages
- SYNCED=($(
- rsync -av \
- --include='*-any.pkg.tar.?z' \
- --include='*-any.pkg.tar.?z.sig' \
- --exclude='*' \
- ${FTP_BASE}/${_repo}/os/${BASEARCH}/ \
- ${FTP_BASE}/${_repo}/os/${_arch}/ 2>&1 | \
- grep 'any\.pkg\.tar\..z$' | \
- cut -d ' ' -f 1 ))
+ # Sync 'any' only and extract the synced packages
+ SYNCED=($(
+ rsync -av \
+ --include='*-any.pkg.tar.?z' \
+ --include='*-any.pkg.tar.?z.sig' \
+ --exclude='*' \
+ ${FTP_BASE}/${_repo}/os/${BASEARCH}/ \
+ ${FTP_BASE}/${_repo}/os/${_arch}/ 2>&1 | \
+ grep 'any\.pkg\.tar\..z$' | \
+ cut -d ' ' -f 1 ))
- if [ ${#SYNCED[@]} -eq 0 ]; then
- msg2 "Already synced (or error happened)"
- continue
- fi
+ if [ ${#SYNCED[@]} -eq 0 ]; then
+ msg2 "Already synced (or error happened)"
+ continue
+ fi
- msg2 "Synced ${#SYNCED[@]} packages: ${SYNCED[@]}"
+ msg2 "Synced ${#SYNCED[@]} packages: ${SYNCED[@]}"
- msg2 "Adding to db..."
+ msg2 "Adding to db..."
- pushd ${FTP_BASE}/${_repo}/os/${_arch}/ >/dev/null
+ pushd ${FTP_BASE}/${_repo}/os/${_arch}/ >/dev/null
-# Add the packages to the db
- repo-add ${_repo}${DBEXT} \
- ${SYNCED[@]}
+ # Add the packages to the db
+ repo-add ${_repo}${DBEXT} \
+ ${SYNCED[@]}
- popd >/dev/null
+ popd >/dev/null
-# Avoid mixups
- unset SYNCED PKGS
- done
+ # Avoid mixups
+ unset SYNCED PKGS
+ done
done
diff --git a/create-repo b/create-repo
index 1ec9798..cfdbc23 100755
--- a/create-repo
+++ b/create-repo
@@ -5,20 +5,20 @@
. "$(dirname "$(readlink -e "$0")")/db-functions"
if [ $# -eq 0 ]; then
- msg "Usage: ${0##*/} repo1 [repo2 ... repoX]"
- exit 1
+ msg "Usage: ${0##*/} repo1 [repo2 ... repoX]"
+ exit 1
fi
msg "Creating repos..."
for _repo in "$@"; do
- msg2 "Creating [${_repo}]"
- mkdir -p "${FTP_BASE}/staging/${_repo}" || \
- error "Failed creating staging dir"
+ msg2 "Creating [${_repo}]"
+ mkdir -p "${FTP_BASE}/staging/${_repo}" || \
+ error "Failed creating staging dir"
- for _arch in "${ARCHES[@]}"; do
- mkdir -p "${FTP_BASE}/${_repo}/os/${_arch}" || \
- error "Failed creating ${_arch} dir"
- done
+ for _arch in "${ARCHES[@]}"; do
+ mkdir -p "${FTP_BASE}/${_repo}/os/${_arch}" || \
+ error "Failed creating ${_arch} dir"
+ done
done
msg "Don't forget to add them to the PKGREPOS array on %s/config" "$(dirname "$(readlink -e "$0")")"
diff --git a/cron-jobs/check_archlinux/parse_pkgbuilds.sh b/cron-jobs/check_archlinux/parse_pkgbuilds.sh
index c8d8618..9b26f1e 100755
--- a/cron-jobs/check_archlinux/parse_pkgbuilds.sh
+++ b/cron-jobs/check_archlinux/parse_pkgbuilds.sh
@@ -118,11 +118,11 @@ source_pkgbuild() {
}
find_pkgbuilds() {
- #Skip over some dirs
- local d="${1##*/}"
- if [ "$d" = "CVS" -o "$d" = ".svn" ]; then
- return
- fi
+ #Skip over some dirs
+ local d="${1##*/}"
+ if [ "$d" = "CVS" -o "$d" = ".svn" ]; then
+ return
+ fi
if [ -f $1/PKGBUILD ]; then
source_pkgbuild $1
diff --git a/cron-jobs/devlist-mailer b/cron-jobs/devlist-mailer
index ca2e46b..32896f7 100755
--- a/cron-jobs/devlist-mailer
+++ b/cron-jobs/devlist-mailer
@@ -8,18 +8,18 @@ FROM="repomaint@archlinux.org"
SUBJECT="Repository Maintenance $(date +"%d-%m-%Y")"
if [ $# -ge 1 ]; then
- SUBJECT="$1 $(date +"%d-%m-%Y")"
+ SUBJECT="$1 $(date +"%d-%m-%Y")"
fi
if [ $# -ge 2 ]; then
- LIST="$2"
+ LIST="$2"
fi
stdin="$(cat)"
#echo used to strip whitespace for checking for actual data
if [ -n "$(echo $stdin)" ]; then
-echo "Subject: $SUBJECT
+ echo "Subject: $SUBJECT
To: $LIST
From: $FROM
diff --git a/cron-jobs/repo-sanity-check b/cron-jobs/repo-sanity-check
index 9d351df..f5f80c8 100755
--- a/cron-jobs/repo-sanity-check
+++ b/cron-jobs/repo-sanity-check
@@ -6,50 +6,50 @@
# Traverse all repos
for _repo in "${PKGREPOS[@]}"; do
- msg "Cleaning up [${_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 "[${_repo}]'s ABS tree is empty, skipping"
- 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 <(echo ${on_abs[@]} | tr ' ' "\n" | sort -u) \
- <(echo ${on_repo[@]} | tr ' ' "\n" | 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 "$(echo ${remove[@]} | tr ' ' "\n")"
+ msg "Cleaning up [${_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 "[${_repo}]'s ABS tree is empty, skipping"
+ 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 <(echo ${on_abs[@]} | tr ' ' "\n" | sort -u) \
+ <(echo ${on_repo[@]} | tr ' ' "\n" | 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 "$(echo ${remove[@]} | tr ' ' "\n")"
done
diff --git a/cron-jobs/sourceballs2 b/cron-jobs/sourceballs2
index 2a26e6a..49a2dac 100755
--- a/cron-jobs/sourceballs2
+++ b/cron-jobs/sourceballs2
@@ -22,41 +22,41 @@ find "${FTP_BASE}/${SRCPOOL}" -xtype f -name "*${SRCEXT}" -printf '%f\n' | sort
pushd "${SVNREPO}" >/dev/null
for repo in "${PKGREPOS[@]}"; do
- msg "Sourceballing [${repo}]"
+ msg "Sourceballing [${repo}]"
- pushd $repo >/dev/null
- find -maxdepth 1 -type d | while read pkg; do
- pushd "${SVNREPO}/$repo/$pkg" >/dev/null
+ pushd $repo >/dev/null
+ find -maxdepth 1 -type d | while read pkg; do
+ pushd "${SVNREPO}/$repo/$pkg" >/dev/null
- [[ ! -e PKGBUILD ]] && {
- warning "$repo/$pkg is not a package"
- continue
- }
+ [[ ! -e PKGBUILD ]] && {
+ warning "$repo/$pkg is not a package"
+ continue
+ }
-# Unset the previous data
- unset pkgbase pkgname pkgver pkgrel
- source PKGBUILD
+ # Unset the previous data
+ unset pkgbase pkgname pkgver pkgrel
+ source PKGBUILD
- unset build package url pkgdesc source md5sums depends makedepends \
- optdepends license arch options check mksource
+ unset build package url pkgdesc source md5sums depends makedepends \
+ optdepends license arch options check mksource
- for _pkg in "${pkgname[@]}"; do
- unset package_${_pkg} >/dev/null 2>&1
- done
+ for _pkg in "${pkgname[@]}"; do
+ unset package_${_pkg} >/dev/null 2>&1
+ done
- pkgbase=${pkgbase:-$pkgname}
- srcfile="${pkgbase}-${pkgver}-${pkgrel}${SRCEXT}"
+ pkgbase=${pkgbase:-$pkgname}
+ srcfile="${pkgbase}-${pkgver}-${pkgrel}${SRCEXT}"
echo "${srcfile}" >> "${WORKDIR}/expected-src-pkgs"
- # Skip already sourceballed
- [ -e "${SRCPKGDEST}/${srcfile}" ] && continue
+ # Skip already sourceballed
+ [ -e "${SRCPKGDEST}/${srcfile}" ] && continue
- makepkg --allsource --ignorearch -c >/dev/null 2>&1
+ makepkg --allsource --ignorearch -c >/dev/null 2>&1
- [ $? -ne 0 ] && plain ${srcfile}
+ [ $? -ne 0 ] && plain ${srcfile}
- done # end find pkgs
- popd >/dev/null
+ done # end find pkgs
+ popd >/dev/null
done # end repos
diff --git a/db-check-nonfree b/db-check-nonfree
index 6e2dc17..b08b7b1 100755
--- a/db-check-nonfree
+++ b/db-check-nonfree
@@ -18,25 +18,25 @@ done
msg "Check nonfree in repo:"
nonfree=($(cut -d: -f1 ${BLACKLIST_FILE} | sort -u))
for repo in "${ARCHREPOS[@]}"; do
- for pkgarch in "${ARCHES[@]}"; do
- msg2 "$repo $pkgarch"
- if [ ! -f "${FTP_BASE}/${repo}/os/${pkgarch}/${repo}${DBEXT}" ]; then
- continue
- fi
- unset dbpkgs
- unset cleanpkgs
- cleanpkgs=()
- dbpkgs=($(bsdtar -xOf "${FTP_BASE}/${repo}/os/${pkgarch}/${repo}${DBEXT}" | awk '/^%NAME%/{getline;print}' | sort -u ))
- for pkgname in "${dbpkgs[@]}"; do
- if in_array "${pkgname}" "${nonfree[@]}"; then
- cleanpkgs+=("${pkgname}")
- fi
+ for pkgarch in "${ARCHES[@]}"; do
+ msg2 "$repo $pkgarch"
+ if [ ! -f "${FTP_BASE}/${repo}/os/${pkgarch}/${repo}${DBEXT}" ]; then
+ continue
+ fi
+ unset dbpkgs
+ unset cleanpkgs
+ cleanpkgs=()
+ dbpkgs=($(bsdtar -xOf "${FTP_BASE}/${repo}/os/${pkgarch}/${repo}${DBEXT}" | awk '/^%NAME%/{getline;print}' | sort -u ))
+ for pkgname in "${dbpkgs[@]}"; do
+ if in_array "${pkgname}" "${nonfree[@]}"; then
+ cleanpkgs+=("${pkgname}")
+ fi
+ done
+ if [ ${#cleanpkgs[@]} -ge 1 ]; then
+ msg2 "Nonfree: ${cleanpkgs[*]}"
+ arch_repo_remove "${repo}" "${pkgarch}" "${cleanpkgs[@]}"
+ fi
done
- if [ ${#cleanpkgs[@]} -ge 1 ]; then
- msg2 "Nonfree: ${cleanpkgs[*]}"
- arch_repo_remove "${repo}" "${pkgarch}" "${cleanpkgs[@]}"
- fi
- done
done
for repo in "${repos[@]}"; do
diff --git a/db-cleanup b/db-cleanup
index 57ef36e..a35bdf2 100755
--- a/db-cleanup
+++ b/db-cleanup
@@ -10,9 +10,9 @@
# * Instant cleanup!
trap_exit() {
- echo
- error "$@"
- exit 1
+ echo
+ error "$@"
+ exit 1
}
source "$(dirname "$(readlink -e "$0")")/config"
@@ -28,35 +28,35 @@ trap 'trap_exit "$(gettext "An unknown error has occurred. Exiting...")"' ERR
${CLEANUP_DRYRUN} && EXTRAFLAGS+=" --dry-run"
for _repo in ${PKGREPOS[@]}; do
- for _arch in ${ARCHES[@]}; do
- msg "Getting ${_repo}-${_arch} database"
+ for _arch in ${ARCHES[@]}; do
+ msg "Getting ${_repo}-${_arch} database"
- dbfile="${FTP_BASE}/${_repo}/os/${_arch}/${_repo}${DBEXT}"
+ dbfile="${FTP_BASE}/${_repo}/os/${_arch}/${_repo}${DBEXT}"
- if [ ! -r "${dbfile}" ]; then
- warning "Not found"
- continue
- fi
+ if [ ! -r "${dbfile}" ]; then
+ warning "Not found"
+ continue
+ fi
-# Echo the contents into a filter file
- bsdtar tf "${dbfile}" | \
- cut -d'/' -f1 | \
- sort -u | \
- sed "s|$|*|" >> /tmp/${0##*/}.$$.filter
+ # Echo the contents into a filter file
+ bsdtar tf "${dbfile}" | \
+ cut -d'/' -f1 | \
+ sort -u | \
+ sed "s|$|*|" >> /tmp/${0##*/}.$$.filter
- done
+ done
done
msg "Removing old files:"
for POOL in ${PKGPOOLS[@]} ${SRCPOOLS[@]}; do
- msg2 "${POOL}"
+ msg2 "${POOL}"
- rsync ${EXTRAFLAGS} -va --delete-excluded \
- --include-from="/tmp/${0##*/}.$$.filter" \
- --exclude="*" \
- ${FTP_BASE}/${POOL}/ \
- ${FTP_BASE}/${POOL}/
+ rsync ${EXTRAFLAGS} -va --delete-excluded \
+ --include-from="/tmp/${0##*/}.$$.filter" \
+ --exclude="*" \
+ ${FTP_BASE}/${POOL}/ \
+ ${FTP_BASE}/${POOL}/
done
msg "Removing symlinks:"
diff --git a/db-list-unsigned-packages b/db-list-unsigned-packages
index f593686..c88203b 100755
--- a/db-list-unsigned-packages
+++ b/db-list-unsigned-packages
@@ -33,6 +33,6 @@ shift
for repo in "${PKGREPOS[@]}"
do
- db="${FTP_BASE}/${repo}/os/${arch}/${repo}.db"
- [ -f "$db" ] && "$(dirname "$(readlink -e "$0")")/db-list-unsigned-packages.py" "$repo" "$@" < "$db"
+ db="${FTP_BASE}/${repo}/os/${arch}/${repo}.db"
+ [ -f "$db" ] && "$(dirname "$(readlink -e "$0")")/db-list-unsigned-packages.py" "$repo" "$@" < "$db"
done
diff --git a/libremessages b/libremessages
index 0c6ded1..37df149 100755
--- a/libremessages
+++ b/libremessages
@@ -77,7 +77,7 @@ error() {
fatal_error() {
local mesg=$1; shift
- error "$mesg" "$@"
+ error "$mesg" "$@"
- exit 1
+ exit 1
}
diff --git a/mkrepo b/mkrepo
index f30ad00..b11dc0b 100755
--- a/mkrepo
+++ b/mkrepo
@@ -6,10 +6,10 @@
source "$(dirname "$(readlink -e "$0")")/config"
for repo in "$@"; do
- echo ":: Creating [$repo]"
- for arch in "${ARCHES[@]}"; do
- mkdir -pv "${FTP_BASE}/${repo}/os/${arch}"
- done
+ echo ":: Creating [$repo]"
+ for arch in "${ARCHES[@]}"; do
+ mkdir -pv "${FTP_BASE}/${repo}/os/${arch}"
+ done
done
echo ":: All done. Add the repo to the ParabolaWeb admin page."