Compare commits

...

11 Commits
0.6.1 ... 0.6.3

Author SHA1 Message Date
Thomas Bächler
80d0aa8912 Aaron broke it 2008-08-24 07:13:40 +02:00
Jason Chu
0dec86c4c3 Fix a typo in extrapkg 2008-05-10 11:05:20 -07:00
Aaron Griffin
182c12ec4a Remove suffix usage from extrapkg
The new dbscripts do not need this. All info can
be gathered from the $CARCH variable in the filename.

Signed-off-by: Aaron Griffin <aaronmgriffin@gmail.com>
2008-05-06 18:31:19 -04:00
Aaron Griffin
4c56be5601 Allow makechrootpkg to install package files in the chroot
This is a very very hackish way to deal with rebuilds for
right now.

The intent is the following:
    First build foobar-1.2
    makechrootpkg -i foobar-1.2-1-i686.pkg.tar.gz
    Now build packages that depend on foobar-1.2

Signed-off-by: Aaron Griffin <aaronmgriffin@gmail.com>
2008-04-21 23:13:47 -05:00
Aaron Griffin
17ecb862f2 makechrootpkg: Always attempt to move pkg/src
Sometimes makepkg fails, but a package is built - for
instance, when makepkg cannot remove deps. In this case we
will attempt to move the pkg/src files regardless.

Signed-off-by: Aaron Griffin <aaronmgriffin@gmail.com>
2008-04-21 22:56:58 -05:00
Aaron Griffin
6805bc54f4 Ensure archrelease is always run from a proper directory
It should only be run from a trunk dir containing a PKGBUILD

Signed-off-by: Aaron Griffin <aaronmgriffin@gmail.com>
2008-04-21 21:31:51 -05:00
Aaron Griffin
b54ddd2cf4 Create the 'repos' dir if it doesn't exist
Signed-off-by: Aaron Griffin <aaronmgriffin@gmail.com>
2008-04-21 21:25:41 -05:00
Jason Chu
0b36e8ecb3 Add a message that explains what to do when a merge conflict is detected and needs to be dealt with. 2008-04-20 13:30:00 -07:00
Travis Willard
f71a0fabb7 Copy ChangeLog into chroot too.
Signed-off-by: Travis Willard <travis@archlinux.org>
Signed-off-by: Aaron Griffin <aaronmgriffin@gmail.com>
2008-04-14 11:19:33 -05:00
Aaron Griffin
718a6d802d Temporary workaround for unionfs issues
The latest incarnations of unionfs have issues appending
text via shell redirection, so to work around it, we can
touch the file before-hand to move it to the RW portion
of the union.

Signed-off-by: Aaron Griffin <aaronmgriffin@gmail.com>
2008-04-14 11:18:09 -05:00
Jason Chu
bd6a5df0ab Start tracking svnmerge info when we create a branch
I thought it was tracked by default
2008-04-09 12:23:11 -07:00
3 changed files with 60 additions and 22 deletions

View File

@@ -5,16 +5,40 @@ if [ "$1" = "" ]; then
exit 1 exit 1
fi fi
if [ ! -f "PKGBUILD" ]; then
echo "archrelease: PKGBUILD not found"
exit 1
fi
if [ "$(basename $(readlink -f .))" != "trunk" ]; then
echo "archrelease: Not in a package trunk dir"
exit 1
fi
if [ ! -d ../repos/$1 ]; then if [ ! -d ../repos/$1 ]; then
pushd .. pushd ..
[ -d repos ] || mkdir repos
svn copy -r HEAD trunk repos/$1 svn copy -r HEAD trunk repos/$1
svn commit -m "archrelease: new repo $1" svn commit -m "archrelease: new repo $1"
pushd repos/$1
svnmerge init
svn commit -F svnmerge-commit-message.txt
rm svnmerge-commit-message.txt
popd
popd popd
else else
svnmerge merge ../repos/$1 svnmerge merge ../repos/$1
pushd .. pushd ..
if [ -f trunk/svnmerge-commit-message.txt ]; then if [ -f trunk/svnmerge-commit-message.txt ]; then
svn commit -F trunk/svnmerge-commit-message.txt svn commit -F trunk/svnmerge-commit-message.txt
if [ $? -ne 0 ]; then
# The user is going to have to clean things up a bit
echo "*** ATTENTION: There was a problem merging the package changes ***"
echo "To fix it, edit the conflicting files in repos/$1 (the ones that are C in svn status)."
echo "Once you have resolved conflicts, execute 'svn resolved <path to file>' to tell svn the error was resolved."
echo "Then to finish the merge commit, execute 'svn commit -F trunk/svnmerge-commit-message.txt' and, if there are no problems, delete trunk/svnmerge-commit-message.txt"
exit $?
fi
rm trunk/svnmerge-commit-message.txt rm trunk/svnmerge-commit-message.txt
else else
echo "Nothing to commit" echo "Nothing to commit"

View File

@@ -20,12 +20,7 @@ if [ ! -f PKGBUILD ]; then
exit 1 exit 1
fi fi
# define staging areas based on architecture if [ -z "$CARCH" ]; then
if [ "$CARCH" = "i686" ]; then
suffix=''
elif [ "$CARCH" = "x86_64" ]; then
suffix='64'
else
echo "CARCH must be set to a recognized value!" echo "CARCH must be set to a recognized value!"
exit 1 exit 1
fi fi
@@ -68,8 +63,8 @@ if [ "$1" = "-l" ]; then
fi fi
if [ "$repo" != "community" ]; then if [ "$repo" != "community" ]; then
# combine what we know into a variable (suffix defined based on $CARCH) # combine what we know into a variable
uploadto="staging/${repo}${suffix}/add/$(basename ${pkgfile})" uploadto="staging/${repo}/add/$(basename ${pkgfile})"
scp ${scpopts} "${pkgfile}" "archlinux.org:${uploadto}" scp ${scpopts} "${pkgfile}" "archlinux.org:${uploadto}"
if [ "$(md5sum "${pkgfile}" | cut -d' ' -f1)" != "$(ssh archlinux.org md5sum "${uploadto}" | cut -d' ' -f1)" ]; then if [ "$(md5sum "${pkgfile}" | cut -d' ' -f1)" != "$(ssh archlinux.org md5sum "${uploadto}" | cut -d' ' -f1)" ]; then
echo "File got corrupted during upload, cancelled." echo "File got corrupted during upload, cancelled."
@@ -83,7 +78,7 @@ else
exit 1 exit 1
fi fi
if [ "$(basename $pkgfile)" != "$(basename $oldstylepkgfile)" ]; then if [ "$(basename $pkgfile)" != "$(basename $oldstylepkgfile)" ]; then
echo "Renaming makepkg3 package for compatability" echo "Renaming makepkg3 package for compatibility"
mv $pkgfile $oldstylepkgfile mv $pkgfile $oldstylepkgfile
pkgfile=$oldstylepkgfile pkgfile=$oldstylepkgfile
fi fi

View File

@@ -14,6 +14,7 @@ MAKEPKG_ARGS="-sr"
REPACK="" REPACK=""
WORKDIR=$PWD WORKDIR=$PWD
clean_first="0" clean_first="0"
install_pkg=""
chrootdir="$CHROOT_SHELL" chrootdir="$CHROOT_SHELL"
@@ -45,9 +46,10 @@ usage ()
exit 1 exit 1
} }
while getopts ':r:h:c' arg; do while getopts ':r:i:h:c' arg; do
case "${arg}" in case "${arg}" in
r) chrootdir="$OPTARG" ;; r) chrootdir="$OPTARG" ;;
i) install_pkg="$OPTARG" ;;
c) clean_first=1 ;; c) clean_first=1 ;;
h|?) usage ;; h|?) usage ;;
*) MAKEPKG_ARGS="$MAKEPKG_ARGS -$arg $OPTARG" ;; *) MAKEPKG_ARGS="$MAKEPKG_ARGS -$arg $OPTARG" ;;
@@ -114,6 +116,17 @@ fi
mount -t unionfs none -o "dirs=$chrootdir/rw=rw:$chrootdir/root=ro" "$uniondir" mount -t unionfs none -o "dirs=$chrootdir/rw=rw:$chrootdir/root=ro" "$uniondir"
trap 'cleanup' 0 1 2 15 trap 'cleanup' 0 1 2 15
if [ -n "$install_pkg" ]; then
pkgname="$(basename "$install_pkg")"
echo "installing '$pkgname' in chroot"
cp "$install_pkg" "$uniondir/$pkgname"
mkarchroot -r "pacman -U /$pkgname" "$uniondir"
ret=$?
rm "$uniondir/$pkgname"
#exit early, we've done all we need to
exit $ret
fi
echo "moving build files to chroot" echo "moving build files to chroot"
[ -d "$uniondir/build" ] || mkdir "$uniondir/build" [ -d "$uniondir/build" ] || mkdir "$uniondir/build"
@@ -168,8 +181,13 @@ if [ "$install" != "" -a -f "$install" ]; then
cp "$install" "$uniondir/build/" cp "$install" "$uniondir/build/"
fi fi
if [ -f "ChangeLog" ]; then
cp ChangeLog "$uniondir/build/"
fi
if ! grep "^nobody" "$uniondir/etc/sudoers" >/dev/null 2>&1; then if ! grep "^nobody" "$uniondir/etc/sudoers" >/dev/null 2>&1; then
echo "allowing 'nobody' sudo rights in the chroot" echo "allowing 'nobody' sudo rights in the chroot"
touch "$uniondir/etc/sudoers"
echo "nobody ALL=(ALL) NOPASSWD: ALL" >> "$uniondir/etc/sudoers" echo "nobody ALL=(ALL) NOPASSWD: ALL" >> "$uniondir/etc/sudoers"
chmod 440 "$uniondir/etc/sudoers" chmod 440 "$uniondir/etc/sudoers"
fi fi
@@ -188,22 +206,23 @@ chmod +x "$uniondir/chrootbuild"
mkarchroot -r "/chrootbuild" "$uniondir" mkarchroot -r "/chrootbuild" "$uniondir"
source ${WORKDIR}/PKGBUILD
if [ -z "$(mount | grep ${chrootdir}/union/pkgdest)" ]; then
echo "Moving completed package file to ${WORKDIR}"
mv ${chrootdir}/union/pkgdest/${pkgname}-${pkgver}-${pkgrel}-*.pkg.tar.gz ${WORKDIR}
fi
if [ -z "$(mount | grep ${chrootdir}/union/srcdest)" ]; then
echo "Moving downloaded source files to ${WORKDIR}"
mv ${chrootdir}/union/srcdest/* ${WORKDIR}
fi
if [ -e ${chrootdir}/rw/build/BUILD_FAILED ]; then if [ -e ${chrootdir}/rw/build/BUILD_FAILED ]; then
echo "Build failed, check \$CHROOT_DIR/rw/build" echo "Build failed, check \$CHROOT_DIR/rw/build"
rm ${chrootdir}/rw/build/BUILD_FAILED rm ${chrootdir}/rw/build/BUILD_FAILED
exit 1 else
else
source ${WORKDIR}/PKGBUILD
if [ -z "$(mount | grep ${chrootdir}/union/pkgdest)" ]; then
echo "Moving completed package file to ${WORKDIR}"
mv ${chrootdir}/union/pkgdest/${pkgname}-${pkgver}-${pkgrel}-*.pkg.tar.gz ${WORKDIR}
fi
if [ -z "$(mount | grep ${chrootdir}/union/srcdest)" ]; then
echo "Moving downloaded source files to ${WORKDIR}"
mv ${chrootdir}/union/srcdest/* ${WORKDIR}
fi
rm -rf ${chrootdir}/rw/build/* rm -rf ${chrootdir}/rw/build/*
echo "Build complete" echo "Build complete"
fi fi
# vim:ft=sh:ts=4:sw=4:et: # vim:ft=sh:ts=4:sw=4:et: