Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xbin/build-packages13
-rwxr-xr-xbin/return-assignment26
2 files changed, 23 insertions, 16 deletions
diff --git a/bin/build-packages b/bin/build-packages
index 0fc20f7..826b93b 100755
--- a/bin/build-packages
+++ b/bin/build-packages
@@ -5,9 +5,9 @@
# https://github.com/archlinux32/builder/wiki/Build-system#build-packages
# TODOs:
-# include package customizations
# use different build commands for different repositories - do we need this actually?
# sign packages
+# send logs of failed builds
. "${0%/*}/../conf/default.conf"
@@ -27,6 +27,8 @@ while true; do
0)
repository="${package##* }"
package="${package% *}"
+ mod_git_revision="${package##* }"
+ package="${package% *}"
git_revision="${package##* }"
package="${package% *}"
@@ -34,11 +36,13 @@ while true; do
for repo in "${repo_paths[@]}"; do
git -C "${repo}" clean -df
+ git -C "${repo}" reset --hard
git -C "${repo}" checkout master
git -C "${repo}" pull
done
git -C "${repo_paths["$(find_repository_with_commit "${git_revision}")"]}" checkout "${git_revision}" &> /dev/null
+ git -C "${repo_paths["archlinux32"]}" checkout "${mod_git_revision}" &> /dev/null
PKGBUILD="$(find_pkgbuild "${package}" "${repository}")"
@@ -58,7 +62,7 @@ while true; do
-i "${master_build_server_identity}" \
-p "${master_build_server_port}" \
"${master_build_server_user}@${master_build_server}" \
- 'return-assignment' "${package}" "${git_revision}" "${repository}"
+ 'return-assignment' "${package}" "${git_revision}" "${mod_git_revision}" "${repository}"
success=true
break
fi
@@ -69,9 +73,12 @@ while true; do
-i "${master_build_server_identity}" \
-p "${master_build_server_port}" \
"${master_build_server_user}@${master_build_server}" \
- 'return-assignment' "${package}" "${git_revision}" "${repository}" 'ERROR'
+ 'return-assignment' "${package}" "${git_revision}" "${mod_git_revision}" "${repository}" 'ERROR'
fi
+echo 'This is the end.'
+exit 0
+
continue
;;
diff --git a/bin/return-assignment b/bin/return-assignment
index 2528b44..87be091 100755
--- a/bin/return-assignment
+++ b/bin/return-assignment
@@ -2,10 +2,10 @@
# report back on a build assignment
# either on success via:
-# "$0 $package $revision $repository" and tar'ed packages (= a tar of
+# "$0 $package $revision $mod_revision $repository" and tar'ed packages (= a tar of
# package(s) and signature(s)) on stdin
# or on failure via:
-# "$0 $package $revision $repository ERROR"
+# "$0 $package $revision $mod_revision $repository ERROR"
# TODO:
# properly handle if built package is out of date
@@ -14,16 +14,16 @@
. "${0%/*}/../conf/default.conf"
-if [ "$4" == 'ERROR' ]; then
+if [ "$5" == 'ERROR' ]; then
# the build failed on the build slave
- mv "${work_dir}/package-states/$1.$2.$3."{locked,broken}
+ mv "${work_dir}/package-states/$1.$2.$3.$4."{locked,broken}
# unlock every loop this package would have broken and which is not
# broken by another locked package
(
# loops broken by another locked package
- ls "${work_dir}/package-states/"{*.*.*,$1.$2.$3}.locked | \
+ ls "${work_dir}/package-states/"{*.*.*.*,$1.$2.$3.$4}.locked | \
sort | \
uniq -u | \
sed 's|\.locked$||' | \
@@ -31,7 +31,7 @@ if [ "$4" == 'ERROR' ]; then
sort -u | \
sed 'p'
# loops broken by this package
- sed '1d' "${work_dir}/package-states/$1.$2.$3"
+ sed '1d' "${work_dir}/package-states/$1.$2.$3.$4"
) | \
sort | \
uniq -u | \
@@ -45,21 +45,21 @@ fi
# the build was successful on the build slave
# extract package
-mkdir -p "${master_mirror_directory}/$3-staging/"
-cd "${master_mirror_directory}/$3-staging/"
+mkdir -p "${master_mirror_directory}/$4-staging/"
+cd "${master_mirror_directory}/$4-staging/"
new_files="$(tar -xv --wildcards '*.pkg.tar.xz')"
-repo-add "$3-staging.db.tar.gz" $(echo "${new_files}" | grep '\.pkg\.tar\.xz$')
+repo-add "$4-staging.db.tar.gz" $(echo "${new_files}" | grep '\.pkg\.tar\.xz$')
#new_files="$(tar -xv --wildcards '*.pkg.tar.xz'{,.sig})"
-#repo-add -v -s -k "${repo_key}" "$3-staging.tar.gz" $(echo "${new_files}" | grep '\.pkg\.tar\.xz$')
+#repo-add -v -s -k "${repo_key}" "$4-staging.tar.gz" $(echo "${new_files}" | grep '\.pkg\.tar\.xz$')
# remove all loops which are broken by this package
-sed '1d' "${work_dir}/package-states/$1.$2.$3.locked" | \
+sed '1d' "${work_dir}/package-states/$1.$2.$3.$4.locked" | \
sort -u | \
sed 'p;s|$|.locked|' | \
xargs -rn1 rm -f
# remove package from build list
-sed -i "/^$1 $2 $3\$/d" "${work_dir}/build-list"
+sed -i "/^${1//./\\.} $2 $3 $4\$/d" "${work_dir}/build-list"
# remove package lock file
-rm "${work_dir}/package-states/$1.$2.$3.locked"
+rm "${work_dir}/package-states/$1.$2.$3.$4.locked"