checkpkg: Create symlinks to old packages in $TEMPDIR instead of $PWD

Signed-off-by: Eric Bélanger <snowmaniscool@gmail.com>
Signed-off-by: Pierre Schmitz <pierre@archlinux.de>
checkpkg: Fix soname check

The bsdtar options were in the incorrect order and objdump couldn't find the files.

Signed-off-by: Eric Bélanger <snowmaniscool@gmail.com>
Signed-off-by: Pierre Schmitz <pierre@archlinux.de>
checkpkg: Only match .so at end of filenames for soname check

Signed-off-by: Eric Bélanger <snowmaniscool@gmail.com>
Signed-off-by: Pierre Schmitz <pierre@archlinux.de>
makechrootpkg: Look harder for -R argument

We shouldn't be in the business of reparsing makepkg's arguments, but
since we have to treat the case of repackaging separately, do a better
job of trying to find signs of it happening. This change lets you pass
the longopt, --repackage, or multiple shortopts such as -RA, and still
get the intended effect.

Signed-off-by: Dave Reisner <dreisner@archlinux.org>
Signed-off-by: Pierre Schmitz <pierre@archlinux.de>
commitpkg: check all files at once for version control

Instead of dying at the first sight of an unversioned file, this lets
commitpkg dump all known unversioned files at once.

Signed-off-by: Dave Reisner <dreisner@archlinux.org>
Signed-off-by: Pierre Schmitz <pierre@archlinux.de>
common: implement find_cached_package

This function (currently) searches through $PWD and $PKGDEST looking
for a tarball matching the requested package name, architecture, and
pkgver. If found, it writes the full path to the located package to
stdout and returns 0, else 1. If more than 1 match is found, it's
treated as an error and the user will need to figure out what to do.

Use this in checkpkg and commitpkg, which previously implemented their
own less complete logic, to locate the build artifacts they rely on.

Signed-off-by: Dave Reisner <dreisner@archlinux.org>
Signed-off-by: Pierre Schmitz <pierre@archlinux.de>
Add mountpoint check to btrfs subvol logic

Signed-off-by: Pierre Schmitz <pierre@archlinux.de>
Add support for building bzr packages

Fixes FS#36654: https://bugs.archlinux.org/task/36654.

Signed-off-by: Maxime Gauduin <alucryd@gmail.com>
Signed-off-by: Pierre Schmitz <pierre@archlinux.de>
Prepare release
checkpkg: Fix usage of local mirrors
find_cached_package: avoid adding duplicates

If PKGDEST is set when makepkg was run, the package will be present in
find_cached_package's search path by default, causing an error.

This also fixes a display bug which causes no output to be shown when
multiple packages are found.

Fixes FS#37626.

Signed-off-by: Dave Reisner <dreisner@archlinux.org>
Signed-off-by: Pierre Schmitz <pierre@archlinux.de>
makechrootpkg: Don't copy the logpipe

Signed-off-by: Pierre Schmitz <pierre@archlinux.de>
FS#37656 - [devtools] add SRCPKGDEST to makechrootpkg

Signed-off-by: Markus M. May <mmay@javafreedom.org>
Signed-off-by: Pierre Schmitz <pierre@archlinux.de>
Prepare release
Use -fstack-protector-strong

Signed-off-by: Allan McRae <allan@archlinux.org>
Signed-off-by: Pierre Schmitz <pierre@archlinux.de>
Remove broken unknown arguments check and fix usage

If getopts comes across an unknown argument, $arg it set to '?' and
$OPTARG is unset. Therefore the getopts line detecting unknown arguments
doesn't work. Arguments to pass to makepkg are already handled by
passing all the aguments after the end-of-options marker (--), but this
wasn't documented in the usage text.

Signed-off-by: Pierre Schmitz <pierre@archlinux.de>
Update mtime of chroot when building

Makes the chroot mtime a useful indicator of last usage.

Signed-off-by: Pierre Schmitz <pierre@archlinux.de>
abort and die are serious errors so throw 255 out

Signed-off-by: BlackEagle <ike.devolder@gmail.com>
Signed-off-by: Pierre Schmitz <pierre@archlinux.de>
when cleanup is called without code exit with 0

Signed-off-by: BlackEagle <ike.devolder@gmail.com>
Signed-off-by: Pierre Schmitz <pierre@archlinux.de>
get_full_version :: remove duplicated epoch check

Signed-off-by: BlackEagle <ike.devolder@gmail.com>
Signed-off-by: Pierre Schmitz <pierre@archlinux.de>