Compare commits

..

16 Commits

Author SHA1 Message Date
Pierre Schmitz
2020fb406a prepare release 2012-11-15 14:38:03 +01:00
Eric Bélanger
4427b80aba crossrepomove: Fix dbscripts path for [community] move to nymeria
Signed-off-by: Eric Bélanger <snowmaniscool@gmail.com>
Signed-off-by: Pierre Schmitz <pierre@archlinux.de>
2012-11-15 14:32:34 +01:00
Eric Bélanger
41b54bdde5 mkarchroot: Remove unnecessary parameter for usage function
Fixes FS#28973

Signed-off-by: Eric Bélanger <snowmaniscool@gmail.com>
Signed-off-by: Pierre Schmitz <pierre@archlinux.de>
2012-11-15 14:28:50 +01:00
Eric Bélanger
54bad4c91d checkpkg: replace wget usage by curl
Signed-off-by: Eric Bélanger <snowmaniscool@gmail.com>
Signed-off-by: Pierre Schmitz <pierre@archlinux.de>
2012-11-15 14:27:20 +01:00
Pierre Schmitz
fc95a57556 prepare release 2012-11-12 18:44:26 +01:00
Pierre Schmitz
21458bd07b For now only packages and svn from sigurd will be moved to nymeria 2012-11-11 21:07:34 +01:00
Pierre Schmitz
a05969b29d prepare release 2012-11-03 18:26:45 +01:00
Pierre Schmitz
fdeaed894a Use nymeria.archlinux.org as shared host for developers and trusted users 2012-11-03 17:32:33 +01:00
Pierre Schmitz
3699321904 Prepare release 2012-10-27 20:31:05 +02:00
Pierre Schmitz
d8ec9c9066 Use sigurd.archlinux.org instead of the now moved aur.archlinux.org hostname 2012-10-27 20:30:24 +02:00
Jan Alexander Steffens (heftig)
fbb2bd2b8e Fix return code handling
Stop trap_exit from forcing a 0 exit code. This fixes makechrootpkg,
which used to always return success, even if the build failed.

Signed-off-by: Pierre Schmitz <pierre@archlinux.de>
2012-10-27 20:27:39 +02:00
Pierre Schmitz
d5c6bc7656 prepare release 2012-10-13 21:06:31 +02:00
Dan McGee
f7615fe7d7 Fix releasing files with '@' in name
SVN treats '@' as a revision specifier, so with the addition of systemd
spawning service files, we need to ensure it doesn't screw things up.

Signed-off-by: Dan McGee <dan@archlinux.org>
Signed-off-by: Pierre Schmitz <pierre@archlinux.de>
2012-10-13 20:40:09 +02:00
Pierre Schmitz
1703b92e1a mkarchroot: do not try to bind /etc/timezone from host
/etc/timezone is no longer used. We only need /etc/localtime.

This fixes FS#31929
2012-10-13 20:33:53 +02:00
Pierre Schmitz
cfd81ab563 prepare release 2012-10-04 21:19:31 +02:00
Pierre Schmitz
ac1ee41e4d mkarchroot: use a helper function to simplify bind mounts 2012-10-04 19:57:19 +02:00
10 changed files with 55 additions and 42 deletions

2
.gitignore vendored
View File

@@ -1,5 +1,5 @@
*~
devtools-*.tar.gz
devtools-*.tar.gz*
archbuild
archco
archrelease

View File

@@ -1,4 +1,4 @@
V=20121003
V=20121115
PREFIX = /usr/local

View File

@@ -13,7 +13,7 @@ case $scriptname in
archco)
SVNURL="svn+ssh://gerolde.archlinux.org/srv/svn-packages";;
communityco)
SVNURL="svn+ssh://aur.archlinux.org/srv/svn-packages";;
SVNURL="svn+ssh://svn-community@nymeria.archlinux.org/srv/repos/svn-community/svn";;
*)
die "Couldn't find svn url for $scriptname"
;;

View File

@@ -66,7 +66,7 @@ for tag in "$@"; do
while read -r file; do
trash+=("repos/$tag/$file")
done < <(svn ls "repos/$tag")
[[ $trash ]] && svn rm -q "${trash[@]}"
[[ $trash ]] && svn rm -q "${trash[@]/%/@}"
else
mkdir -p "repos/$tag"
svn add --parents -q "repos/$tag"

View File

@@ -58,7 +58,7 @@ for _pkgname in "${pkgname[@]}"; do
elif [[ -f "$STARTDIR/$oldpkg" ]]; then
ln -s "$STARTDIR/$oldpkg" "$oldpkg"
else
wget --quiet "$pkgurl"
curl -fsLC - --retry 3 --retry-delay 3 -o "$oldpkg" "$pkgurl"
fi
fi

View File

@@ -109,7 +109,7 @@ if [[ -z $server ]]; then
core|extra|testing|staging|kde-unstable|gnome-unstable)
server='gerolde.archlinux.org' ;;
community*|multilib*)
server='aur.archlinux.org' ;;
server='nymeria.archlinux.org' ;;
*)
server='gerolde.archlinux.org'
msg "Non-standard repository $repo in use, defaulting to server $server" ;;

View File

@@ -13,8 +13,8 @@ pkgbase="${1}"
packages_svn='svn+ssh://gerolde.archlinux.org/srv/svn-packages'
packages_server='gerolde.archlinux.org'
community_svn='svn+ssh://aur.archlinux.org/srv/svn-packages'
community_server='aur.archlinux.org'
community_svn='svn+ssh://svn-community@nymeria.archlinux.org/srv/repos/svn-community/svn'
community_server='nymeria.archlinux.org'
mirror='http://mirrors.kernel.org/archlinux'
case $scriptname in
@@ -72,11 +72,23 @@ svn -q commit -m"${scriptname}: Moving ${pkgbase} from ${source_repo} to ${targe
pushd "target_checkout/${pkgbase}/trunk" >/dev/null
archrelease "${arch[@]/#/$target_repo-}" || die
popd >/dev/null
ssh "${target_server}" '/arch/db-update' || die
if [[ "${target_server}" == "${community_server}" ]]; then
dbscripts_path='/srv/repos/svn-community/dbscripts'
else
dbscripts_path='/arch'
fi
ssh "${target_server}" "${dbscripts_path}/db-update" || die
msg "Removing ${pkgbase} from ${source_repo}"
if [[ "${source_server}" == "${community_server}" ]]; then
dbscripts_path='/srv/repos/svn-community/dbscripts'
else
dbscripts_path='/arch'
fi
for _arch in ${arch[@]}; do
ssh "${source_server}" "/arch/db-remove ${source_repo} ${_arch} ${pkgbase}"
ssh "${source_server}" "${dbscripts_path}/db-remove ${source_repo} ${_arch} ${pkgbase}"
done
svn -q checkout -N "${source_svn}" source_checkout
svn -q up "source_checkout/${pkgbase}"

View File

@@ -78,7 +78,7 @@ trap_abort() {
trap_exit() {
trap - EXIT INT QUIT TERM HUP
cleanup 0
cleanup
}
die() {

View File

@@ -213,12 +213,12 @@ if ! grep -q 'SRCDEST="/srcdest"' "$copydir/etc/makepkg.conf"; then
echo 'SRCDEST="/srcdest"' >> "$copydir/etc/makepkg.conf"
fi
if [[ -n $MAKEFLAGS ]]; then
if [[ -n $MAKEFLAGS ]]; then
sed -i '/^MAKEFLAGS=/d' "$copydir/etc/makepkg.conf"
echo "MAKEFLAGS='${MAKEFLAGS}'" >> "$copydir/etc/makepkg.conf"
fi
if [[ -n $PACKAGER ]]; then
if [[ -n $PACKAGER ]]; then
sed -i '/^PACKAGER=/d' "$copydir/etc/makepkg.conf"
echo "PACKAGER='${PACKAGER}'" >> "$copydir/etc/makepkg.conf"
fi

View File

@@ -44,7 +44,7 @@ while getopts 'r:ufnhC:M:c:' arg; do
M) makepkg_conf="$OPTARG" ;;
n) NOCOPY='y' ;;
c) cache_dir="$OPTARG" ;;
h|?) usage 0 ;;
h|?) usage ;;
*) error "invalid argument '${arg}'"; usage ;;
esac
done
@@ -78,18 +78,32 @@ if echo "${host_mirror}" | grep -q 'file://'; then
fi
# {{{ functions
bind_mount() {
local mode="${2:-rw}"
local target="${working_dir}${1}"
if [[ ! -e "$target" ]]; then
if [[ -d "$1" ]]; then
install -d "$target"
else
install -D /dev/null "$target"
fi
fi
mount -o bind "$1" "$target"
mount -o remount,${mode},bind "$target"
mount --make-slave "$target"
}
chroot_mount() {
trap 'trap_chroot_umount' EXIT INT QUIT TERM HUP
if (( ! have_nspawn )); then
[[ -e "${working_dir}/sys" ]] || mkdir "${working_dir}/sys"
mount -o bind /sys "${working_dir}/sys"
mount -o remount,ro,bind "${working_dir}/sys"
bind_mount /sys ro
[[ -e "${working_dir}/proc" ]] || mkdir "${working_dir}/proc"
mount -t proc proc -o nosuid,noexec,nodev "${working_dir}/proc"
mount -o bind /proc/sys "${working_dir}/proc/sys"
mount -o remount,ro,bind "${working_dir}/proc/sys"
bind_mount /proc/sys ro
[[ -e "${working_dir}/dev" ]] || mkdir "${working_dir}/dev"
mount -t tmpfs dev "${working_dir}/dev" -o mode=0755,size=10M,nosuid,strictatime
@@ -112,35 +126,21 @@ chroot_mount() {
[[ -e "${working_dir}/dev/shm" ]] || mkdir "${working_dir}/dev/shm"
mount -t tmpfs shm "${working_dir}/dev/shm" -o nodev,nosuid,size=128M
[[ -e "${working_dir}/dev/pts" ]] || mkdir "${working_dir}/dev/pts"
mount -o bind /dev/pts "${working_dir}/dev/pts"
bind_mount /dev/pts
[[ -e "${working_dir}/run" ]] || mkdir "${working_dir}/run"
mount -t tmpfs tmpfs "${working_dir}/run" -o mode=0755,nodev,nosuid,strictatime,size=64M
for host_config in resolv.conf timezone localtime; do
[[ -e "${working_dir}/etc/${host_config}" ]] || touch "${working_dir}/etc/${host_config}"
mount -o bind /etc/${host_config} "${working_dir}/etc/${host_config}"
mount -o remount,ro,bind "${working_dir}/etc/${host_config}"
for host_config in resolv.conf localtime; do
bind_mount /etc/$host_config ro
done
fi
if [[ -n $host_mirror_path ]]; then
[[ -e "${working_dir}/${host_mirror_path}" ]] || mkdir -p "${working_dir}/${host_mirror_path}"
mount -o bind "${host_mirror_path}" "${working_dir}/${host_mirror_path}"
mount -o remount,ro,bind "${working_dir}/${host_mirror_path}"
fi
[[ -n $host_mirror_path ]] && bind_mount "$host_mirror_path" ro
local cache_dir_first=true
for cache_dir in ${cache_dirs[@]}; do
[[ -e $cache_dir ]] || mkdir -p "${cache_dir}"
[[ -e "${working_dir}/${cache_dir}" ]] || mkdir -p "${working_dir}/${cache_dir}"
mount -o bind "${cache_dir}" "${working_dir}/${cache_dir}"
if ! ${cache_dir_first}; then
mount -o remount,ro,bind "${working_dir}/${cache_dir}"
else
cache_dir_first=false
fi
bind_mount "${cache_dirs[0]}"
for cache_dir in ${cache_dirs[@]:1}; do
bind_mount "$cache_dir" ro
done
}
@@ -160,7 +160,8 @@ copy_hostconf () {
}
trap_chroot_umount () {
trap 'trap_exit' EXIT INT QUIT TERM HUP
trap 'trap_abort' INT QUIT TERM HUP
trap 'trap_exit' EXIT
for cache_dir in ${cache_dirs[@]}; do
umount "${working_dir}/${cache_dir}"
@@ -168,7 +169,7 @@ trap_chroot_umount () {
[[ -n $host_mirror_path ]] && umount "${working_dir}/${host_mirror_path}"
if (( ! have_nspawn )); then
for host_config in resolv.conf timezone localtime; do
for host_config in resolv.conf localtime; do
umount "${working_dir}/etc/${host_config}"
done
umount "${working_dir}/proc/sys"