alarm/devtools-alarm to 20141224-1

This commit is contained in:
Kevin Mihelich 2014-12-30 02:41:19 +00:00
parent 91769652ba
commit fbd2adf70e
7 changed files with 148 additions and 71 deletions

View file

@ -1,22 +1,31 @@
diff -urN a/makechrootpkg.in b/makechrootpkg.in From b75cef2844996db5f326b6945b757aa623777611 Mon Sep 17 00:00:00 2001
--- a/makechrootpkg.in 2013-11-07 06:57:03.000000000 -0700 From: Kevin Mihelich <kevin@archlinuxarm.org>
+++ b/makechrootpkg.in 2014-01-21 18:25:01.778675214 -0700 Date: Sun, 28 Dec 2014 22:25:58 -0700
@@ -48,6 +48,7 @@ Subject: [PATCH 1/6] makechrootpkg: cache dir
echo ''
echo "Default makepkg args: $makepkg_args" ---
echo '' makechrootpkg.in | 10 ++++++++--
+ echo '-C <dir> Set pacman cache to pass to arch-nspawn' 1 file changed, 8 insertions(+), 2 deletions(-)
diff --git a/makechrootpkg.in b/makechrootpkg.in
index 26deaca..c0a15c0 100644
--- a/makechrootpkg.in
+++ b/makechrootpkg.in
@@ -51,6 +51,7 @@ usage() {
echo 'Flags:' echo 'Flags:'
echo '-h This help' echo '-h This help'
echo '-c Clean the chroot before building' echo '-c Clean the chroot before building'
@@ -66,13 +67,14 @@ + echo '-C <dir> Set pacman cache to pass to arch-nspawn'
exit 1 echo '-d <dir> Bind directory into build chroot as read-write'
} echo '-D <dir> Bind directory into build chroot as read-only'
echo '-u Update the working copy of the chroot before building'
@@ -68,12 +69,13 @@ usage() {
orig_argv=("$@")
-while getopts 'hcur:I:l:nTD:d:' arg; do -while getopts 'hcur:I:l:nTD:d:' arg; do
+while getopts 'hcuC:r:I:l:nTD:d:' arg; do +while getopts 'hcuC:r:I:l:nTD:d:' arg; do
case "$arg" in case "$arg" in
h) usage ;;
c) clean_first=true ;; c) clean_first=true ;;
D) bindmounts_ro+=(--bind-ro="$OPTARG") ;; D) bindmounts_ro+=(--bind-ro="$OPTARG") ;;
d) bindmounts_rw+=(--bind="$OPTARG") ;; d) bindmounts_rw+=(--bind="$OPTARG") ;;
@ -25,7 +34,7 @@ diff -urN a/makechrootpkg.in b/makechrootpkg.in
r) passeddir="$OPTARG" ;; r) passeddir="$OPTARG" ;;
I) install_pkgs+=("$OPTARG") ;; I) install_pkgs+=("$OPTARG") ;;
l) copy="$OPTARG" ;; l) copy="$OPTARG" ;;
@@ -91,6 +93,10 @@ @@ -92,6 +94,10 @@ chrootdir=$(readlink -e "$passeddir")
[[ ! -d $chrootdir ]] && die "No chroot dir defined, or invalid path '%s'" "$passeddir" [[ ! -d $chrootdir ]] && die "No chroot dir defined, or invalid path '%s'" "$passeddir"
[[ ! -d $chrootdir/root ]] && die "Missing chroot dir root directory. Try using: mkarchroot %s/root base-devel" "$chrootdir" [[ ! -d $chrootdir/root ]] && die "Missing chroot dir root directory. Try using: mkarchroot %s/root base-devel" "$chrootdir"
@ -36,7 +45,7 @@ diff -urN a/makechrootpkg.in b/makechrootpkg.in
# Detect chrootdir filesystem type # Detect chrootdir filesystem type
chroottype=$(stat -f -c %T "$chrootdir") chroottype=$(stat -f -c %T "$chrootdir")
@@ -373,7 +379,7 @@ @@ -386,7 +392,7 @@ prepare_chroot
download_sources download_sources
@ -45,3 +54,6 @@ diff -urN a/makechrootpkg.in b/makechrootpkg.in
--bind-ro="$PWD:/startdir_host" \ --bind-ro="$PWD:/startdir_host" \
--bind-ro="$SRCDEST:/srcdest_host" \ --bind-ro="$SRCDEST:/srcdest_host" \
"${bindmounts_ro[@]}" "${bindmounts_rw[@]}" \ "${bindmounts_ro[@]}" "${bindmounts_rw[@]}" \
--
2.2.1

View file

@ -1,14 +1,25 @@
diff -urN a/arch-nspawn.in b/arch-nspawn.in From 909075d5bd73f8791e3ccb40c19ee92918c541fb Mon Sep 17 00:00:00 2001
--- a/arch-nspawn.in 2013-11-07 06:57:03.000000000 -0700 From: Kevin Mihelich <kevin@archlinuxarm.org>
+++ b/arch-nspawn.in 2014-01-21 18:33:11.817113085 -0700 Date: Sun, 28 Dec 2014 22:27:34 -0700
@@ -70,8 +70,8 @@ Subject: [PATCH 2/6] arch-nspawn: keep mirrorlist
}
---
arch-nspawn.in | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch-nspawn.in b/arch-nspawn.in
index 19f1410..20726e8 100644
--- a/arch-nspawn.in
+++ b/arch-nspawn.in
@@ -73,7 +73,7 @@ build_mount_args() {
copy_hostconf () { copy_hostconf () {
- cp -a /etc/pacman.d/gnupg "$working_dir/etc/pacman.d" cp -a /etc/pacman.d/gnupg "$working_dir/etc/pacman.d"
- echo "Server = $host_mirror" >"$working_dir/etc/pacman.d/mirrorlist" - echo "Server = $host_mirror" >"$working_dir/etc/pacman.d/mirrorlist"
+ #cp -a /etc/pacman.d/gnupg "$working_dir/etc/pacman.d"
+ #echo "Server = $host_mirror" >"$working_dir/etc/pacman.d/mirrorlist" + #echo "Server = $host_mirror" >"$working_dir/etc/pacman.d/mirrorlist"
[[ -n $pac_conf ]] && cp $pac_conf "$working_dir/etc/pacman.conf" [[ -n $pac_conf ]] && cp $pac_conf "$working_dir/etc/pacman.conf"
[[ -n $makepkg_conf ]] && cp $makepkg_conf "$working_dir/etc/makepkg.conf" [[ -n $makepkg_conf ]] && cp $makepkg_conf "$working_dir/etc/makepkg.conf"
--
2.2.1

View file

@ -1,14 +1,28 @@
diff -urN a/makechrootpkg.in b/makechrootpkg.in From 375082ca4e5c03e0ffa0d81ee3739cd131d58ca4 Mon Sep 17 00:00:00 2001
--- a/makechrootpkg.in 2014-01-21 18:14:12.156219500 -0700 From: Kevin Mihelich <kevin@archlinuxarm.org>
+++ b/makechrootpkg.in 2014-01-21 18:16:41.715633742 -0700 Date: Sun, 28 Dec 2014 22:32:15 -0700
@@ -324,7 +324,9 @@ Subject: [PATCH 3/6] makechrootpkg: distcc
---
makechrootpkg.in | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/makechrootpkg.in b/makechrootpkg.in
index c0a15c0..bdc9938 100644
--- a/makechrootpkg.in
+++ b/makechrootpkg.in
@@ -347,7 +347,10 @@ _chrootbuild() {
exit 1 exit 1
fi fi
- sudo -u nobody makepkg $makepkg_args || exit 1 - sudo -u builduser makepkg "$@"
+ mkdir /build/.distcc + mkdir /build/.distcc
+ chown nobody /build/.distcc + chown builduser /build/.distcc
+ sudo -u nobody DISTCC_IO_TIMEOUT=0 DISTCC_DIR='/build/.distcc' makepkg $makepkg_args || exit 1 +
+ sudo -u builduser DISTCC_IO_TIMEOUT=0 DISTCC_DIR='/build/.distcc' makepkg "$@"
}
if $run_namcap; then move_products() {
pacman -S --needed --noconfirm namcap --
2.2.1

View file

@ -1,19 +1,31 @@
diff -urN a/arch-nspawn.in b/arch-nspawn.in From 448f11996fc2c167084d96954746ab0153d26e9e Mon Sep 17 00:00:00 2001
--- a/arch-nspawn.in 2014-01-21 18:16:31.735672829 -0700 From: Kevin Mihelich <kevin@archlinuxarm.org>
+++ b/arch-nspawn.in 2014-01-21 18:17:31.245439755 -0700 Date: Sun, 28 Dec 2014 22:33:00 -0700
@@ -97,7 +97,7 @@ Subject: [PATCH 4/6] arch-nspawn: arm fix
machine_name="${working_dir//[![:alnum:]_-]/-}"
machine_name="${machine_name#-}" ---
arch-nspawn.in | 2 +-
makechrootpkg.in | 4 ++--
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/arch-nspawn.in b/arch-nspawn.in
index 20726e8..3f3d563 100644
--- a/arch-nspawn.in
+++ b/arch-nspawn.in
@@ -96,7 +96,7 @@ copy_hostconf
eval $(grep '^CARCH=' "$working_dir/etc/makepkg.conf")
-exec ${CARCH:+setarch "$CARCH"} systemd-nspawn 2>/dev/null \ -exec ${CARCH:+setarch "$CARCH"} systemd-nspawn 2>/dev/null \
+exec systemd-nspawn 2>/dev/null \ +exec systemd-nspawn 2>/dev/null \
-D "$working_dir" \ -D "$working_dir" \
--machine "$machine_name" \ --register=no \
"${mount_args[@]}" \ "${mount_args[@]}" \
diff -urN a/makechrootpkg.in b/makechrootpkg.in diff --git a/makechrootpkg.in b/makechrootpkg.in
--- a/makechrootpkg.in 2014-01-21 18:17:21.820476669 -0700 index bdc9938..46aff89 100644
+++ b/makechrootpkg.in 2014-01-21 18:17:31.245439755 -0700 --- a/makechrootpkg.in
@@ -272,10 +272,10 @@ +++ b/makechrootpkg.in
@@ -297,10 +297,10 @@ download_sources() {
# Ensure sources are downloaded # Ensure sources are downloaded
if [[ -n $SUDO_USER ]]; then if [[ -n $SUDO_USER ]]; then
sudo -u $SUDO_USER env SRCDEST="$SRCDEST" BUILDDIR="$builddir" \ sudo -u $SUDO_USER env SRCDEST="$SRCDEST" BUILDDIR="$builddir" \
@ -22,7 +34,10 @@ diff -urN a/makechrootpkg.in b/makechrootpkg.in
else else
( export SRCDEST BUILDDIR="$builddir" ( export SRCDEST BUILDDIR="$builddir"
- makepkg --asroot --config="$copydir/etc/makepkg.conf" --verifysource -o - makepkg --asroot --config="$copydir/etc/makepkg.conf" --verifysource -o
+ makepkg -A --asroot --config="$copydir/etc/makepkg.conf" --verifysource -o + makepkg -A --config="$copydir/etc/makepkg.conf" --verifysource -o
) )
fi fi
(( $? != 0 )) && die "Could not download sources." (( $? != 0 )) && die "Could not download sources."
--
2.2.1

View file

@ -1,12 +1,25 @@
diff -urN a/makechrootpkg.in b/makechrootpkg.in From b186821bb6ac5e7aee3c3b63074bae2a2ebbaabd Mon Sep 17 00:00:00 2001
--- a/makechrootpkg.in 2013-06-27 12:01:03.730856796 -0500 From: Kevin Mihelich <kevin@archlinuxarm.org>
+++ b/makechrootpkg.in 2013-06-27 12:01:29.209732875 -0500 Date: Sun, 28 Dec 2014 22:33:41 -0700
@@ -12,7 +12,7 @@ Subject: [PATCH 5/6] makechrootpkg: no default logging
---
makechrootpkg.in | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/makechrootpkg.in b/makechrootpkg.in
index 46aff89..e1da896 100644
--- a/makechrootpkg.in
+++ b/makechrootpkg.in
@@ -12,7 +12,7 @@ m4_include(lib/common.sh)
shopt -s nullglob shopt -s nullglob
-makepkg_args='-s --noconfirm -L --holdver' -makepkg_args=(-s --noconfirm -L --holdver)
+makepkg_args='-s --noconfirm --holdver' +makepkg_args=(-s --noconfirm --holdver)
repack=false repack=false
update_first=false update_first=false
clean_first=false clean_first=false
--
2.2.1

View file

@ -1,6 +1,17 @@
--- a/archbuild.in 2014-02-16 07:57:21.777365491 -0500 From efc9edfa8dc84799cbafd3c516ac31038bd7e847 Mon Sep 17 00:00:00 2001
+++ b/archbuild.in 2014-02-16 07:57:54.280700229 -0500 From: Kevin Mihelich <kevin@archlinuxarm.org>
@@ -62,7 +62,7 @@ Date: Sun, 28 Dec 2014 22:34:04 -0700
Subject: [PATCH 6/6] archbuild: no setarch
---
archbuild.in | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/archbuild.in b/archbuild.in
index 9c5d706..a4b5bed 100644
--- a/archbuild.in
+++ b/archbuild.in
@@ -62,7 +62,7 @@ if ${clean_first} || [[ ! -d "${chroots}/${repo}-${arch}" ]]; then
rm -rf --one-file-system "${chroots}/${repo}-${arch}" rm -rf --one-file-system "${chroots}/${repo}-${arch}"
mkdir -p "${chroots}/${repo}-${arch}" mkdir -p "${chroots}/${repo}-${arch}"
@ -9,3 +20,6 @@
-C "@pkgdatadir@/pacman-${repo}.conf" \ -C "@pkgdatadir@/pacman-${repo}.conf" \
-M "@pkgdatadir@/makepkg-${arch}.conf" \ -M "@pkgdatadir@/makepkg-${arch}.conf" \
"${chroots}/${repo}-${arch}/root" \ "${chroots}/${repo}-${arch}/root" \
--
2.2.1

View file

@ -6,7 +6,7 @@
pkgname=devtools-alarm pkgname=devtools-alarm
_pkgname=devtools _pkgname=devtools
pkgver=20140510 pkgver=20141224
pkgrel=1 pkgrel=1
pkgdesc='Tools for Arch Linux ARM package maintainers' pkgdesc='Tools for Arch Linux ARM package maintainers'
arch=('any') arch=('any')
@ -15,39 +15,37 @@ url='http://projects.archlinux.org/devtools.git/'
conflicts=('devtools') conflicts=('devtools')
provides=('devtools') provides=('devtools')
depends=('namcap' 'openssh' 'subversion' 'rsync' 'arch-install-scripts') depends=('namcap' 'openssh' 'subversion' 'rsync' 'arch-install-scripts')
source=("ftp://ftp.archlinux.org/other/${_pkgname}/${_pkgname}-${pkgver}.tar.gz" source=("ftp://ftp.archlinux.org/other/$_pkgname/$_pkgname-$pkgver.tar.gz"
"ftp://ftp.archlinux.org/other/${_pkgname}/${_pkgname}-${pkgver}.tar.gz.sig"
'0001-makechrootpkg-cache-dir.patch' '0001-makechrootpkg-cache-dir.patch'
'0002-arch-nspawn-keep-mirrorlist.patch' '0002-arch-nspawn-keep-mirrorlist.patch'
'0003-makechrootpkg-distcc.patch' '0003-makechrootpkg-distcc.patch'
'0004-arch-nspawn-arm-fix.patch' '0004-arch-nspawn-arm-fix.patch'
'0005-makechrootpkg-no-default-logging.patch' '0005-makechrootpkg-no-default-logging.patch'
'0006-archbuild-no-setarch.patch') '0006-archbuild-no-setarch.patch')
md5sums=('702376263627e594b5a7ff1970353de4' md5sums=('9b6e6ce9da5b8e861c77f9badc652553'
'SKIP' '587badc10432dd0db01f4c79344205d8'
'7b96700206f0832d8f9c72adeccb8f9f' '9cbf8c343b38d0b5a07f015218ecae6e'
'ac6a4477565030c8e2bea08068e7597f' 'c18f2a1b20388c4014536396ed56e3cb'
'97a011ae19be82b932ef8abab83f9b6a' '54abb054918968b47c81d1e0ade98e69'
'd7c5800ed19500e33e2c9cf89c41a86c' '100924fdcc75766d99a84f0f351ca79c'
'473f7128e088188121f5565e7ca34759' '503229d4055f4877bad0f9cf2a929b5d')
'a9f511668f1f8bb8f408017ec7dbabc9')
prepare() { prepare() {
cd ${srcdir}/${_pkgname}-${pkgver} cd "${_pkgname}-${pkgver}"
patch -p1 -i "${srcdir}"/0001-makechrootpkg-cache-dir.patch patch -p1 -i ../0001-makechrootpkg-cache-dir.patch
patch -p1 -i "${srcdir}"/0002-arch-nspawn-keep-mirrorlist.patch patch -p1 -i ../0002-arch-nspawn-keep-mirrorlist.patch
patch -p1 -i "${srcdir}"/0003-makechrootpkg-distcc.patch patch -p1 -i ../0003-makechrootpkg-distcc.patch
patch -p1 -i "${srcdir}"/0004-arch-nspawn-arm-fix.patch patch -p1 -i ../0004-arch-nspawn-arm-fix.patch
patch -p1 -i "${srcdir}"/0005-makechrootpkg-no-default-logging.patch patch -p1 -i ../0005-makechrootpkg-no-default-logging.patch
patch -p1 -i "${srcdir}"/0006-archbuild-no-setarch.patch patch -p1 -i ../0006-archbuild-no-setarch.patch
} }
build() { build() {
cd ${srcdir}/${_pkgname}-${pkgver} cd "${_pkgname}-${pkgver}"
make PREFIX=/usr make PREFIX=/usr
} }
package() { package() {
cd ${srcdir}/${_pkgname}-${pkgver} cd "${_pkgname}-${pkgver}"
make PREFIX=/usr DESTDIR=${pkgdir} install make PREFIX=/usr DESTDIR=${pkgdir} install
} }