Commit Graph

24 Commits

Author SHA1 Message Date
Eli Schwartz b2cbb8628e
checkpkg: fix support for http:// url comparisons
Broken in commit c14338c0fe.

Signed-off-by: Eli Schwartz <eschwartz@archlinux.org>
Signed-off-by: Levente Polyak <anthraxx@archlinux.org>
2020-02-27 14:50:14 +01:00
Levente Polyak 5dd90ef848
checkpkg: add option to print a warning in case of differences
Sometimes its desired to be explicitly made aware of differences
reporter by checkpkg via printing a warning instead of a regular
message.

Automatically use --warn for makechrootpkg builds so packagers are made
visibly aware of a soname bump by simply looking out for colors
indicating non success messages.

Signed-off-by: Levente Polyak <anthraxx@archlinux.org>
2019-09-28 00:15:51 +02:00
Levente Polyak 5246cb9aa5
checkpkg: add option to avoid keeping the tmp dir
In some cases, like default makechrootpkg execution, the temporary
directory used to assemble the differences is not required. Add an
option to checkpkg that allows to get rid of that directory after
run and call it automatically like that in makechrootpkg.

Signed-off-by: Levente Polyak <anthraxx@archlinux.org>
2019-09-28 00:15:48 +02:00
Eli Schwartz c14338c0fe
checkpkg: implement comparison against alternative targets
This allows comparing the currently built set of packages against
targets named by filename, url, or pkgname. One example use is to
compare a package against a different version that was never in the
repos; another example use is to compare a *-git package against the
non-git version.

Signed-off-by: Eli Schwartz <eschwartz@archlinux.org>
Signed-off-by: Levente Polyak <anthraxx@archlinux.org>
2019-08-09 19:41:52 +02:00
Luke Shumaker a9dab95334
Add `# shellcheck` directives to quiet shellcheck, add PKGBUILD.proto
The added PKGBUILD.proto file is so that shellcheck can know know what
to expect that a PKGBUILD sets.
2017-07-05 18:21:56 +02:00
Luke Shumaker 78fabcfa06
Quote strings that shellcheck warns about.
These changes are all strictly "slap some double-quotes in there".
Anything more than that is not included in this commit.
2017-07-05 18:21:56 +02:00
Luke Shumaker 3f72579b28
Make purely stylistic changes to make shellcheck happier.
These are purely stylistic changes that make shellcheck complain less.

This does NOT include things like quoting currently unquoted variables.
2017-07-05 18:21:55 +02:00
lukeshu@parabola.nu 6098253f6f
Handle makepkg.conf more consistently 2017-04-05 22:17:51 +02:00
Luke Shumaker cb35d74f8c
Avoid using string interpolation; use printf format strings instead.
This involves extending the signature of lib/common.sh's `stat_busy()`,
`lock()`, and `slock()`. The `mesg=$1; shift` in stat_busy even suggests
that this is what was originally intended from it.
2017-04-05 22:11:16 +02:00
Luke Shumaker 14d5e1c21b
Add a "License:" tag to all code files.
In cases where there is no license specified, the file is tagged as
"License: Unspecified".  Obviously, that is not ideal, but it
highlights the fact, and I hope that it encourages whoever has the
authority to specify the license to do so.

On that note, to anyone who may have the authority to specify the
license of files in devtools: the current licence of many files is
GPLv2 with no option for later versions; I impore you to re-license
them to have the "or any later version" option.
2017-04-05 22:10:03 +02:00
Dave Reisner b58fb33482 checkpkg: mask errors from lib-provides
bsdtar doesn't consider it an error when your --include doesn't match
anything in the archive, so we're forced to dump stderr to /dev/null
here.

Fixes: https://bugs.archlinux.org/task/42551
2014-10-25 11:36:28 -04:00
Doug Newgard cae954ddb5 checkpkg: improve soname checking
This makes soname checking much more robust and is explicit when a
soname change is found.
2014-10-01 20:25:59 -04:00
Pierre Schmitz 3029c8e4bc checkpkg: Fix usage of local mirrors 2013-11-01 21:13:43 +01:00
Dave Reisner 27441f201c 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>
2013-11-01 18:52:03 +01:00
Eric Bélanger e3cf64ad2f 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>
2013-11-01 18:35:54 +01:00
Eric Bélanger 7524bec6d9 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>
2013-10-27 15:57:16 +01:00
Eric Bélanger 70309118ab 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>
2013-10-27 15:54:41 +01:00
Dave Reisner 9c85d116f0 checkpkg: avoid using PKGEXT to guess tarball name
We can't rely on PKGEXT since it's not sourced from a controlled
location. Case in point, if a user sets PKGEXT=.pkg.tar.gz, checkpkg
fails and offers no easy workaround.

Instead, use glob expansion to resolve the name of the tarball, bailing
if it can't be found definitively. This involves some refactoring to
avoid modifying PWD (which is advisable regardless).

Signed-off-by: Dave Reisner <dreisner@archlinux.org>
Signed-off-by: Pierre Schmitz <pierre@archlinux.de>
2013-08-18 18:19:12 +02:00
Dave Reisner 914ebe3a74 ensure that PKGBUILDs aren't sourced via PATH
Fixes FS#36378.

Signed-off-by: Dave Reisner <dreisner@archlinux.org>
Signed-off-by: Pierre Schmitz <pierre@archlinux.de>
2013-08-18 18:17:31 +02:00
Dave Reisner be3c71fa81 avoid injecting code into the format string
Now that die() properly forwards arguments to error(), we can expect
that the first arg is a format string and not the entirety of the
output.

Signed-off-by: Dave Reisner <dreisner@archlinux.org>
Signed-off-by: Pierre Schmitz <pierre@archlinux.de>
2013-08-08 21:28:10 +02:00
Eric Bélanger 54bad4c91d checkpkg: replace wget usage by curl
Signed-off-by: Eric Bélanger <snowmaniscool@gmail.com>
Signed-off-by: Pierre Schmitz <pierre@archlinux.de>
2012-11-15 14:27:20 +01:00
Pierre Schmitz aaa68e49e8 Move common functions to a shared file
* common.sh is included on build time
* most functions are copied from makepkg
2011-11-01 15:33:08 +01:00
Lukas Fleischer a0c6bf4556 Honor TMPDIR environment variable
Replace all mktemp(1) invocations that hardcode "/tmp" with `mktemp
--tmpdir` and change templates accordingly.

Note that "--tmpdir" is GNU-ish which is okay given that we currently
support Arch Linux only anyway.

Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2011-10-13 11:10:09 +02:00
Lukas Fleischer 46c4def073 Support non-standard install locations
This build system overhaul allows for adding (define-style) macros to
our scripts. All source files are now suffixed with ".in" to clarify
that they might contain unprocessed defines. The Makefile provides a new
rule to preprocess source files and generate proper output scripts.

Also, add a "@pkgdatadir@" define (as used in GNU Autotools) and use it
instead of hardcoded paths to "/usr/share/devtools" everywhere. We
missed this when adding PREFIX support to the build system in commit
35fc83ce7d.

Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2011-10-07 21:53:02 +02:00