Compare commits

...

11 Commits
0.9.2 ... 0.9.5

Author SHA1 Message Date
Pierre Schmitz
17e875f6b3 makechrootpkg: Keep source files even if build fails
implementes FS#18437
2010-03-03 21:49:22 +01:00
Pierre Schmitz
a7c5010d24 Upload any pkg.tar.* file as long as it is canonical 2010-03-03 21:41:53 +01:00
Pierre Schmitz
f72775feac PKGEXT was not defined in the context 2010-03-03 21:38:59 +01:00
Pierre Schmitz
371f57b043 Don't check if package was released already
The checks aren't reliable enough and fail if the local repo is broken due to
network failures. So for now we just allways commit.
2010-02-22 19:11:17 +01:00
Pierre Schmitz
2fe5dbf904 be more fail safe 2010-02-22 08:13:43 +01:00
Eric Bélanger
5036f1250e mkarchroot: Added default pacman cache in usage help
Signed-off-by: Eric Bélanger <snowmaniscool@gmail.com>
Signed-off-by: Pierre Schmitz <pierre@archlinux.de>
2010-02-21 19:34:11 +01:00
Pierre Schmitz
f00c8f66bd escape line breaks in find command 2010-02-17 23:55:05 +01:00
Pierre Schmitz
df4310025b Use svnversion insead of svn info 2010-02-17 18:27:09 +01:00
Pierre Schmitz
53a864a5aa Use local information to determine if a commit is needed 2010-02-17 18:05:16 +01:00
Pierre Schmitz
849e6c6de5 Check if package was already released 2010-02-17 15:24:54 +01:00
Dan McGee
62e4272ca2 commitpkg: dereference symlinks on package upload
This is a regression introduced after switching to rsync in place of scp;
scp dereferenced symlinks automatically without need for a command-line
option.

Signed-off-by: Dan McGee <dan@archlinux.org>
Signed-off-by: Pierre Schmitz <pierre@archlinux.de>
2010-02-17 06:11:48 +01:00
5 changed files with 50 additions and 38 deletions

View File

@@ -1,34 +1,34 @@
#!/bin/bash #!/bin/bash
if [ "$1" = '' ]; then abort() {
echo 'Usage: archrelease <repo>' echo ${1:-'archrelease: Cancelled'}
exit 1 exit 1
}
if [ "$1" = '' ]; then
abort 'Usage: archrelease <repo>'
fi fi
if [ ! -f PKGBUILD ]; then if [ ! -f PKGBUILD ]; then
echo 'archrelease: PKGBUILD not found' abort 'archrelease: PKGBUILD not found'
exit 1
fi fi
if [ "$(basename $(readlink -f .))" != 'trunk' ]; then if [ "$(basename $(readlink -f .))" != 'trunk' ]; then
echo 'archrelease: Not in a package trunk dir' abort 'archrelease: Not in a package trunk dir'
exit 1
fi fi
if [ "$(svn diff)" != '' ]; then if [ ! -z "$(svn status -q)" ]; then
echo 'archrelease: You have not committed your changes yet!' abort 'archrelease: You have not committed your changes yet!'
echo ' Please run "svn commit" first'
exit 1
fi fi
echo -n 'releasing package...' echo -n 'releasing package...'
pushd .. >/dev/null pushd .. >/dev/null
if [ -d repos/$1 ]; then if [ -d "repos/${1}" ]; then
svn rm --force -q repos/$1 svn rm --force -q "repos/${1}"
svn commit -q -m "archrelease: remove $1" svn commit -q -m "archrelease: remove ${1}" || abort
fi fi
svn copy -q -r HEAD trunk repos/$1 svn copy -q -r HEAD trunk "repos/${1}"
svn commit -q -m "archrelease: copy trunk to $1" svn commit -q -m "archrelease: copy trunk to ${1}" || abort
popd >/dev/null popd >/dev/null
echo 'done' echo 'done'

View File

@@ -5,6 +5,17 @@ abort() {
exit 1 exit 1
} }
getpkgfile() {
if [[ ${#} -ne 1 ]]; then
echo 'ERROR: No canonical package found!' >&2
exit 1
elif [ ! -f "${1}" ]; then
echo "ERROR: Package ${1} not found!" >&2
exit 1
fi
echo ${1}
}
# Source makepkg.conf; fail if it is not found # Source makepkg.conf; fail if it is not found
if [ -r '/etc/makepkg.conf' ]; then if [ -r '/etc/makepkg.conf' ]; then
@@ -74,17 +85,18 @@ echo 'done'
for _arch in ${arch[@]}; do for _arch in ${arch[@]}; do
for _pkgname in ${pkgname[@]}; do for _pkgname in ${pkgname[@]}; do
pkgfile=$_pkgname-$pkgver-$pkgrel-${_arch}$PKGEXT pkgfile=$(getpkgfile "$_pkgname-$pkgver-$pkgrel-${_arch}".pkg.tar.* 2>/dev/null)
pkgdestfile=$(getpkgfile "$PKGDEST/$_pkgname-$pkgver-$pkgrel-${_arch}".pkg.tar.* 2>/dev/null)
if [ ! -f $pkgfile -a -f "$PKGDEST/$pkgfile" ]; then if [ ! -f "$pkgfile" -a -f "$pkgdestfile" ]; then
pkgfile="$PKGDEST/$pkgfile" pkgfile="$pkgdestfile"
elif [ ! -f $pkgfile ]; then elif [ ! -f "$pkgfile" ]; then
echo "skipping ${_arch}" echo "skipping ${_arch}"
continue 2 continue 2
fi fi
echo -n 'uploading ' echo -n 'uploading '
rsync -c -h --progress $rsyncopts "${pkgfile}" -e ssh $server:staging/$repo || abort rsync -c -h -L --progress $rsyncopts "${pkgfile}" -e ssh $server:staging/$repo || abort
done done
archrelease $repo-${_arch} || abort archrelease $repo-${_arch} || abort
done done

12
lddd
View File

@@ -19,12 +19,12 @@ for tree in $PATH $libdirs $extras; do
echo DIR $tree echo DIR $tree
# Get list of files in tree. # Get list of files in tree.
files=$(find $tree -type f ! -name '*.a' ! -name '*.la' ! -name '*.py*' ! -name '*.txt' ! -name '*.h' ! -name '*.ttf' ! files=$(find $tree -type f ! -name '*.a' ! -name '*.la' ! -name '*.py*' ! -name '*.txt' ! -name '*.h' ! -name '*.ttf' ! \
-name '*.rb' ! -name '*.ko' ! -name '*.pc' ! -name '*.enc' ! -name '*.cf' ! -name '*.def' ! -name '*.rules' ! -name -name '*.rb' ! -name '*.ko' ! -name '*.pc' ! -name '*.enc' ! -name '*.cf' ! -name '*.def' ! -name '*.rules' ! -name \
'*.cmi' ! -name '*.mli' ! -name '*.ml' ! -name '*.cma' ! -name '*.cmx' ! -name '*.cmxa' ! -name '*.pod' ! -name '*.pm' '*.cmi' ! -name '*.mli' ! -name '*.ml' ! -name '*.cma' ! -name '*.cmx' ! -name '*.cmxa' ! -name '*.pod' ! -name '*.pm' \
! -name '*.pl' ! -name '*.al' ! -name '*.tcl' ! -name '*.bs' ! -name '*.o' ! -name '*.png' ! -name '*.gif' ! -name '*.cmo' ! -name '*.pl' ! -name '*.al' ! -name '*.tcl' ! -name '*.bs' ! -name '*.o' ! -name '*.png' ! -name '*.gif' ! -name '*.cmo' \
! -name '*.cgi' ! -name '*.defs' ! -name '*.conf' ! -name '*_LOCALE' ! -name 'Compose' ! -name '*_OBJS' ! -name ! -name '*.cgi' ! -name '*.defs' ! -name '*.conf' ! -name '*_LOCALE' ! -name 'Compose' ! -name '*_OBJS' ! -name '*.msg' ! \
'*.msg' ! -name '*.mcopclass' ! -name '*.mcoptype') -name '*.mcopclass' ! -name '*.mcoptype')
IFS=$ifs IFS=$ifs
for i in $files; do for i in $files; do
if [ `file $i | grep -c 'ELF'` -ne 0 ]; then if [ `file $i | grep -c 'ELF'` -ne 0 ]; then

View File

@@ -196,14 +196,14 @@ cd /build
export HOME=/build export HOME=/build
sudo -u nobody makepkg $MAKEPKG_ARGS || touch BUILD_FAILED sudo -u nobody makepkg $MAKEPKG_ARGS || touch BUILD_FAILED
[ -f BUILD_FAILED ] && exit 1 [ -f BUILD_FAILED ] && exit 1
which namcap &>/dev/null && namcap /build/PKGBUILD /pkgdest/*${PKGEXT} > /pkgdest/namcap.log which namcap &>/dev/null && namcap /build/PKGBUILD /pkgdest/*.pkg.tar.* > /pkgdest/namcap.log
exit 0 exit 0
EOF EOF
) > "$copydir/chrootbuild" ) > "$copydir/chrootbuild"
chmod +x "$copydir/chrootbuild" chmod +x "$copydir/chrootbuild"
if mkarchroot -r "/chrootbuild" "$copydir"; then if mkarchroot -r "/chrootbuild" "$copydir"; then
for pkgfile in "${copydir}"/pkgdest/*${PKGEXT}; do for pkgfile in "${copydir}"/pkgdest/*.pkg.tar.*; do
[ -e "$pkgfile" ] || continue [ -e "$pkgfile" ] || continue
_pkgname=$(basename "$pkgfile") _pkgname=$(basename "$pkgfile")
if [ "$add_to_db" -eq "1" ]; then if [ "$add_to_db" -eq "1" ]; then
@@ -221,15 +221,6 @@ if mkarchroot -r "/chrootbuild" "$copydir"; then
fi fi
done done
for f in "${copydir}"/srcdest/*; do
[ -e "$f" ] || continue
if [ -d "$SRCDEST" ]; then
mv "$f" "${SRCDEST}"
else
mv "$f" "${WORKDIR}"
fi
done
for l in "${copydir}"/build/*-{build,package}.log; do for l in "${copydir}"/build/*-{build,package}.log; do
[ -f "$l" ] && mv "$l" "${WORKDIR}" [ -f "$l" ] && mv "$l" "${WORKDIR}"
done done
@@ -238,6 +229,15 @@ else
touch "${copydir}/build/BUILD_FAILED" touch "${copydir}/build/BUILD_FAILED"
fi fi
for f in "${copydir}"/srcdest/*; do
[ -e "$f" ] || continue
if [ -d "$SRCDEST" ]; then
mv "$f" "${SRCDEST}"
else
mv "$f" "${WORKDIR}"
fi
done
if [ -e "${copydir}/build/BUILD_FAILED" ]; then if [ -e "${copydir}/build/BUILD_FAILED" ]; then
echo "Build failed, check $copydir/build" echo "Build failed, check $copydir/build"
rm "${copydir}/build/BUILD_FAILED" rm "${copydir}/build/BUILD_FAILED"

View File

@@ -26,7 +26,7 @@ usage() {
echo ' -C <file> Location of a pacman config file' echo ' -C <file> Location of a pacman config file'
echo ' -M <file> Location of a makepkg config file' echo ' -M <file> Location of a makepkg config file'
echo ' -n Do not copy config files into the chroot' echo ' -n Do not copy config files into the chroot'
echo " -c <dir> Set pacman cache. Default: ${cache_dir}" echo " -c <dir> Set pacman cache. Default: /var/cache/pacman/pkg"
echo ' -h This message' echo ' -h This message'
exit $1 exit $1
} }