Revert execvp and related commits

This reverts commit 4a8c2852a887d2b1aaa43be3071ab586eb24b9e3.
This reverts commit 993700bc6b12cd291544d2a22845f480e8a7925e.
This reverts commit bb4d2b72c1d35ab9d65d632be0dcaf00cfa7d600.
This reverts commit 60b192e3836a150eb6950ce52241efebbee00f11.

Signed-off-by: Allan McRae <allan@archlinux.org>
pactest: handle non-default scriptlet shells

pacman can be configured to use a different shell than /bin/sh for
scriplets.  Pass the cnfigured value to the pactest suite and make the
necessary "copy" of the shell in the test root.

Also update all copyright years in the pactest suite.

Signed-off-by: Allan McRae <allan@archlinux.org>
Remove leading / for pactest paths

The leading / makes the pactest suite look for the file in the users
filesystem.  This meant the ldconfig tests always passed (even when
broken in pacman...).

Signed-off-by: Allan McRae <allan@archlinux.org>
Make path to ldconfig configurable

The FHS (2.3) says having ldconfig in /sbin is optional and it is usually
located in /usr/sbin.  So /sbin/ldconfig should not be hard coded in
pacman.  Instead, provide a configure option --with-ldconfig that defaults
to the current path.

Signed-off-by: Allan McRae <allan@archlinux.org>
pacsort: add -f, --files option for sorting filenames

Teach pacsort to understand package filenames and optionally strip away
some of the context. alpm_pkg_vercmp() intentionally only understands
pure versions, so strings such as '18.0-2-x86_64' and '18.0.1-1-x86_64'
will be compared wrongly.

Partially addresses FS#33455.

Signed-off-by: Dave Reisner <dreisner@archlinux.org>
Signed-off-by: Allan McRae <allan@archlinux.org>
paccache: pass the --file option to pacsort

Resolves FS#33455.

Signed-off-by: Dave Reisner <dreisner@archlinux.org>
Signed-off-by: Allan McRae <allan@archlinux.org>
add doxygen comments to conflict.c

Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com>
Signed-off-by: Allan McRae <allan@archlinux.org>
Fix printing of paths

Originally printed a leading \ before all path names as the `' would be
removed during the make. Using '' should be just as good as using `'.

paccache.sh.in:
die "cachedir \`%s' does not exist or is not a directory" "$cachedir"

paccache
die "cachedir \%s does not exist or is not a directory" "$cachedir"

Signed-off-by: William Giokas <1007380@gmail.com>
Signed-off-by: Allan McRae <allan@archlinux.org>
Update "missing" file

The latest automake release causes complaints about an out of date
'missing' file during configure.  Sync with upstream.

Signed-off-by: Allan McRae <allan@archlinux.org>
add caller prefix to alpm_logaction

prefix defaults to "UNKOWN" if null or an empty string is provided.

Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com>
Signed-off-by: Allan McRae <allan@archlinux.org>
paclog-pkglist: parse entries with caller info

Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com>
Signed-off-by: Allan McRae <allan@archlinux.org>
Make sed follow symlinks on Linux

Signed-off-by: Maxime Gauduin <alucryd@gmail.com>
Signed-off-by: Allan McRae <allan@archlinux.org>
Skip reading sync db deltas files if UseDelta is unset

Signed-off-by: Allan McRae <allan@archlinux.org>
Add configuration option for Upgrade operation SigLevel

Add LocalFileSigLevel and RemoteFileSigLevel to control the signature
checking for "pacman -U <file>" and "pacman -U <url>" operations
respectively. The starting value for both these options is SigLevel,
if it is specified in the [options] section, or the built-in system
default. The specified values override and/or supplement this initial
value. Note there is no distinction between setting "Required" and
"PackageRequired" as there are no database options for Upgrade
operations.

Signed-off-by: Allan McRae <allan@archlinux.org>
Quieten the build process some more

Signed-off-by: Allan McRae <allan@archlinux.org>
pacman: print version information in debug output

Signed-off-by: Allan McRae <allan@archlinux.org>
Make key_in_keychain available in library

In preparation for checking key presence and downloading needed keys
before conflict checking.

Signed-off-by: Allan McRae <allan@archlinux.org>
Move key importing into separate function

This will be useful for checking the availablity of all keys before
perfoming validation in sync operations and for downloading a needed
key in upgrade operations.

Signed-off-by: Allan McRae <allan@archlinux.org>
Add function to extract key id from signatures

This does not support all possibilities of RFC4880, but it does
cover every key currently used in Arch Linux.

Signed-off-by: Allan McRae <allan@archlinux.org>
Make decode_signature available to the library

Signed-off-by: Allan McRae <allan@archlinux.org>