Compare commits

...

14 Commits
0.6 ... 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
Aaron Griffin
ba6e6648e9 Copy only the HEAD revision when releasing
This prevents the copying of local files and only
copies versioned files

Signed-off-by: Aaron Griffin <aaronmgriffin@gmail.com>
2008-04-08 01:53:18 -05:00
Aaron Griffin
d01f3d53e8 Add '64' suffix back to extrapkg
This was accidentally scrubbed, breaking 64bit uploads

Signed-off-by: Aaron Griffin <aaronmgriffin@gmail.com>
2008-04-08 01:48:43 -05:00
Aaron Griffin
fd04791f5b archrelease modifications to auto-commit handling
Signed-off-by: Aaron Griffin <aaronmgriffin@gmail.com>
2008-04-08 01:46:29 -05:00
3 changed files with 79 additions and 26 deletions

View File

@@ -5,15 +5,44 @@ if [ "$1" = "" ]; then
exit 1
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
pushd ..
svn copy trunk ../repos/$1
[ -d repos ] || mkdir repos
svn copy -r HEAD trunk repos/$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
else
svnmerge merge ../repos/$1
pushd ..
if [ -f trunk/svnmerge-commit-message.txt ]; then
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
else
echo "Nothing to commit"
fi
popd
fi
pushd ..
svn commit -F trunk/svnmerge-commit-message.txt
popd
rm svnmerge-commit-message.txt

View File

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

View File

@@ -14,6 +14,7 @@ MAKEPKG_ARGS="-sr"
REPACK=""
WORKDIR=$PWD
clean_first="0"
install_pkg=""
chrootdir="$CHROOT_SHELL"
@@ -45,9 +46,10 @@ usage ()
exit 1
}
while getopts ':r:h:c' arg; do
while getopts ':r:i:h:c' arg; do
case "${arg}" in
r) chrootdir="$OPTARG" ;;
i) install_pkg="$OPTARG" ;;
c) clean_first=1 ;;
h|?) usage ;;
*) MAKEPKG_ARGS="$MAKEPKG_ARGS -$arg $OPTARG" ;;
@@ -114,6 +116,17 @@ fi
mount -t unionfs none -o "dirs=$chrootdir/rw=rw:$chrootdir/root=ro" "$uniondir"
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"
[ -d "$uniondir/build" ] || mkdir "$uniondir/build"
@@ -168,8 +181,13 @@ if [ "$install" != "" -a -f "$install" ]; then
cp "$install" "$uniondir/build/"
fi
if [ -f "ChangeLog" ]; then
cp ChangeLog "$uniondir/build/"
fi
if ! grep "^nobody" "$uniondir/etc/sudoers" >/dev/null 2>&1; then
echo "allowing 'nobody' sudo rights in the chroot"
touch "$uniondir/etc/sudoers"
echo "nobody ALL=(ALL) NOPASSWD: ALL" >> "$uniondir/etc/sudoers"
chmod 440 "$uniondir/etc/sudoers"
fi
@@ -188,22 +206,23 @@ chmod +x "$uniondir/chrootbuild"
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
echo "Build failed, check \$CHROOT_DIR/rw/build"
rm ${chrootdir}/rw/build/BUILD_FAILED
exit 1
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/*
echo "Build complete"
fi
# vim:ft=sh:ts=4:sw=4:et: