Fix typo in acinclude.m4 fs_old_*flags

Introduced in commit d2669b47.

Signed-off-by: Dan McGee <dan@archlinux.org>
Signed-off-by: Allan McRae <allan@archlinux.org>
Fix thinko in configure.ac CFLAGS empty checking

Since commit d2669b47, CFLAGS specified on the command line haven't been
respected at all, resulting in no optimization being applied to builds.
This exposed one warning flag issue in some new code, which is also
fixed here.

Signed-off-by: Dan McGee <dan@archlinux.org>
Signed-off-by: Allan McRae <allan@archlinux.org>
m4/po.m4: Remove use of deprecated macro

Switch from AM_PROG_MKDIR_P to AC_PROG_MKDIR_P to avoid automake warning.

Signed-off-by: Allan McRae <allan@archlinux.org>
configure.ac: cleanup duplication in --enable-git-version

Avoid adding our own messaging, as autoconf will add this for us with
the result of the AC_CHECK_FILE test. Reuse the cache variable from
autoconf to set our local variable.

Signed-off-by: Dave Reisner <dreisner@archlinux.org>
Signed-off-by: Allan McRae <allan@archlinux.org>
buildsys: eschew use of DEFS, prefer AM_CPPFLAGS

This is redundant, and any usage of -D should belong to CPPFLAGS.

Signed-off-by: Dave Reisner <dreisner@archlinux.org>
Signed-off-by: Allan McRae <allan@archlinux.org>
etc/Makefile: simplify build rule for conf files

This lets us define the build rule and the dependency all at once, and
additionally removes the need for an intermediate temp file.

Signed-off-by: Dave Reisner <dreisner@archlinux.org>
Signed-off-by: Allan McRae <allan@archlinux.org>
repo-add: quote filename for consistent output style

Signed-off-by: Allan McRae <allan@archlinux.org>
fixed erroneous memory access to newurl in alpm_db_remove_server

Signed-off-by: Barbu Paul - Gheorghe <barbu.paul.gheorghe@gmail.com>
Signed-off-by: Allan McRae <allan@archlinux.org>
doc: PKGBUILD.5 - fix output of bzr command

Add quotes around 'bzr help revisionspec' to make it clearer that
this is a command to be run.

Signed-off-by: Allan McRae <allan@archlinux.org>
pacman: add -n/--native filter to -Q

Signed-off-by: Simon Gomizelj <simongmzlj@gmail.com>
Signed-off-by: Allan McRae <allan@archlinux.org>
makepkg: use last match in BUILDENV/OPTIONS array

Using the last match in the BUILDENV and OPTIONS arrays allows the
user to easily override these values without specifying the entire
array. For example add "BUILDENV+=(sign)" in ~/.makepkg.conf.

Fixes FS#26701.

Signed-off-by: Allan McRae <allan@archlinux.org>
makepkg: print "SKIP" for signature checksums

There are valid reasons for a source files PGP signature to be changed
(expired key, expired signature, additional person signing...). Thus
providing a checksum for signature files can potentially cause a
PKGBUILD to require unnecessary updating.

Avoid this issue by using "SKIP" for the signature checksum.
Fixes FS#31590.

Signed-off-by: Allan McRae <allan@archlinux.org>
makepkg: deprecate PKGBUILDs without a package() function

The package() function has been around since pacman-3.3 and has
significant advantages including limited fakeroot usage and correct
repackaging.  The ability to use PKGBUILDs without a package function
will be removed in a future release.

Signed-off-by: Allan McRae <allan@archlinux.org>
makepkg: fix signing built package

Fixes issue introduced in 9dd42dc0

Signed-off-by: Allan McRae <allan@archlinux.org>
Remove last traces of handling command arguments in $PACMAN

This resolves an inconsistency with how the $PACMAN variable was interpreted.
Previously “makepkg” would extract the first word from the $PACMAN variable
and check that it existed as a command. This appears to have been happening
ever since the variable was implemented in revision 66c6d28 (makepkg: allow
to specify an alternative pacman command). Thus it looks like command
arguments were originally allowed in the variable.

However the run_pacman() function now quotes $PACMAN, so the whole variable
has to be just the command name. This quoting was introduced more recently,
perhaps in revision 622326b (makepkg: fix sudo/su calling of pacman).

Signed-off-by: Allan McRae <allan@archlinux.org>
makepkg: save path to PACMAN and test availability

After we install dependencies, we source /etc/profile so that new
elements get added to the path. As this can override any local setting
of PATH, we store the full path of the PACMAN variable passed to makepkg.

Also, add a check for PACMAN availability if it is needed to deal with any
dependency operations.

Reported-by: Martin Panter <vadmium à gmail·com>
Signed-off-by: Allan McRae <allan@archlinux.org>
Use sentence case in makepkg

Most of makepkg already uses sentence case. This cleans up the last few
stragglers.

Signed-off-by: Jason St. John <jstjohn@purdue.edu>
Signed-off-by: Allan McRae <allan@archlinux.org>
Add --needed option to makepkg

Simply add the option to pass the --needed flag to pacman when using -i
with makepkg. When using makepkg in scripts, particularly for git
packages with the new version functions and not just a date, this can
save disk io and time instead of reinstalling.

This would mostly be useful with the --noconfirm option.

Signed-off-by: wgiokas <1007380@gmail.com>
Signed-off-by: Allan McRae <allan@archlinux.org>
pactree: fix --sync getopt value

The long --sync options has apparently never worked.

Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com>
Signed-off-by: Allan McRae <allan@archlinux.org>
pactree: style last branch node differently

Also removes the less helpful provides-specific branch tip.

  Old:                        New:
  |--pkg                      |--pkg
     +--dep1 provides dep5       |--dep1 provides dep5
     |  |--dep2                  |  `--dep2
     |--dep3                     `--dep3
        |--dep4                     `--dep4

[dreisner@archlinux.org: switch original suggestion of \-- to `--]

Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com>
Signed-off-by: Dave Reisner <dreisner@archlinux.org>
Signed-off-by: Allan McRae <allan@archlinux.org>