mirror of
https://gitlab.archlinux.org/archlinux/devtools.git
synced 2025-09-13 18:06:19 +02:00
Compare commits
6 Commits
Author | SHA1 | Date | |
---|---|---|---|
![]() |
d2ec5ab67d | ||
![]() |
a23d93ce7f | ||
![]() |
246b8ead60 | ||
![]() |
b14a1b1bcc | ||
![]() |
0cd9e1ae7e | ||
![]() |
3734c80bf7 |
13
archbuild.in
13
archbuild.in
@@ -43,16 +43,19 @@ if ${clean_first} || [[ ! -d "${chroots}/${repo}-${arch}" ]]; then
|
|||||||
[[ -d $copy ]] || continue
|
[[ -d $copy ]] || continue
|
||||||
msg2 "Deleting chroot copy '$(basename "${copy}")'..."
|
msg2 "Deleting chroot copy '$(basename "${copy}")'..."
|
||||||
|
|
||||||
# Lock the copy
|
exec 9>"$copydir.lock"
|
||||||
exec 9>"${copy}.lock"
|
if ! flock -n 9; then
|
||||||
flock 9
|
stat_busy "Locking chroot copy '$copy'"
|
||||||
|
flock 9
|
||||||
|
stat_done
|
||||||
|
fi
|
||||||
|
|
||||||
{ type -P btrfs && btrfs subvolume delete "${copy}"; } &>/dev/null
|
{ type -P btrfs && btrfs subvolume delete "${copy}"; } &>/dev/null
|
||||||
rm -rf "${copy}"
|
rm -rf --one-file-system "${copy}"
|
||||||
done
|
done
|
||||||
exec 9>&-
|
exec 9>&-
|
||||||
|
|
||||||
rm -rf "${chroots}/${repo}-${arch}"
|
rm -rf --one-file-system "${chroots}/${repo}-${arch}"
|
||||||
mkdir -p "${chroots}/${repo}-${arch}"
|
mkdir -p "${chroots}/${repo}-${arch}"
|
||||||
setarch "${arch}" mkarchroot \
|
setarch "${arch}" mkarchroot \
|
||||||
-C "@pkgdatadir@/pacman-${repo}.conf" \
|
-C "@pkgdatadir@/pacman-${repo}.conf" \
|
||||||
|
22
commitpkg.in
22
commitpkg.in
@@ -183,19 +183,21 @@ for _arch in ${arch[@]}; do
|
|||||||
commit_arches+=($_arch)
|
commit_arches+=($_arch)
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
archrelease "${archreleaseopts[@]}" "${commit_arches[@]/#/$repo-}" || die
|
|
||||||
|
|
||||||
new_uploads=()
|
if [[ ${#commit_arches[*]} -gt 0 ]]; then
|
||||||
|
archrelease "${archreleaseopts[@]}" "${commit_arches[@]/#/$repo-}" || die
|
||||||
# convert to absolute paths so rsync can work with colons (epoch)
|
fi
|
||||||
while read -r -d '' upload; do
|
|
||||||
new_uploads+=("$upload")
|
|
||||||
done < <(realpath -z "${uploads[@]}")
|
|
||||||
|
|
||||||
uploads=("${new_uploads[@]}")
|
|
||||||
unset new_uploads
|
|
||||||
|
|
||||||
if [[ ${#uploads[*]} -gt 0 ]]; then
|
if [[ ${#uploads[*]} -gt 0 ]]; then
|
||||||
|
new_uploads=()
|
||||||
|
|
||||||
|
# convert to absolute paths so rsync can work with colons (epoch)
|
||||||
|
while read -r -d '' upload; do
|
||||||
|
new_uploads+=("$upload")
|
||||||
|
done < <(realpath -z "${uploads[@]}")
|
||||||
|
|
||||||
|
uploads=("${new_uploads[@]}")
|
||||||
|
unset new_uploads
|
||||||
msg 'Uploading all package and signature files'
|
msg 'Uploading all package and signature files'
|
||||||
rsync "${rsyncopts[@]}" "${uploads[@]}" "$server:staging/$repo/" || die
|
rsync "${rsyncopts[@]}" "${uploads[@]}" "$server:staging/$repo/" || die
|
||||||
fi
|
fi
|
||||||
|
@@ -62,7 +62,7 @@ setup_workdir() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
cleanup() {
|
cleanup() {
|
||||||
trap - EXIT INT QUIT TERM
|
trap - EXIT INT QUIT TERM HUP
|
||||||
|
|
||||||
[[ -n $WORKDIR ]] && rm -rf "$WORKDIR"
|
[[ -n $WORKDIR ]] && rm -rf "$WORKDIR"
|
||||||
[[ $1 ]] && exit $1
|
[[ $1 ]] && exit $1
|
||||||
|
@@ -113,7 +113,7 @@ chroot_mount() {
|
|||||||
mount -o bind /dev/pts "${working_dir}/dev/pts"
|
mount -o bind /dev/pts "${working_dir}/dev/pts"
|
||||||
|
|
||||||
[[ -e "${working_dir}/run" ]] || mkdir "${working_dir}/run"
|
[[ -e "${working_dir}/run" ]] || mkdir "${working_dir}/run"
|
||||||
mount -t tmpfs tmpfs "${working_dir}/run" -o nodev,nosuid,strictatime,size=64M
|
mount -t tmpfs tmpfs "${working_dir}/run" -o mode=0755,nodev,nosuid,strictatime,size=64M
|
||||||
|
|
||||||
if [[ -n $host_mirror_path ]]; then
|
if [[ -n $host_mirror_path ]]; then
|
||||||
[[ -e "${working_dir}/${host_mirror_path}" ]] || mkdir -p "${working_dir}/${host_mirror_path}"
|
[[ -e "${working_dir}/${host_mirror_path}" ]] || mkdir -p "${working_dir}/${host_mirror_path}"
|
||||||
@@ -153,6 +153,7 @@ copy_hostconf () {
|
|||||||
}
|
}
|
||||||
|
|
||||||
chroot_umount () {
|
chroot_umount () {
|
||||||
|
trap - EXIT INT QUIT TERM HUP
|
||||||
umount "${working_dir}/proc/sys"
|
umount "${working_dir}/proc/sys"
|
||||||
umount "${working_dir}/proc"
|
umount "${working_dir}/proc"
|
||||||
umount "${working_dir}/sys"
|
umount "${working_dir}/sys"
|
||||||
|
Reference in New Issue
Block a user