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>
Consolidate --foreign/--native filtering

Also fix a small bug where pacman won't check if the sync dbs are first
downloaded when invoked with --native (it should).

Signed-off-by: Simon Gomizelj <simongmzlj@gmail.com>
Signed-off-by: Allan McRae <allan@archlinux.org>
Relax requirement of what constitutes a dead connection

Users have hit issues behind corporate firewalls that initially throttle
downloads to ~1B/sec.

Signed-off-by: Olivier Langlois < olivier.pis.langlois@transport.alstom.com>
Signed-off-by: Allan McRae <allan@archlinux.org>
dload: pass back the effective URL to callers of _alpm_download

I suspect that eventually we're going to end up returning a pointer to
an allocated struct to describe the download result, but that's for
another patch when the need arises...

Fixes FS#33508.

Signed-off-by: Dave Reisner <dreisner@archlinux.org>
Signed-off-by: Allan McRae <allan@archlinux.org>
makepkg: Integrate check_install into tidy_install

Rearrange tidy_install so we first remove docs, unwanted files,
libtool files, and empty directories.  Then check for missing backup
files and references to $srcdir and $pkgdir.  Finally compress manpages,
strip debug symbols, and compress executables with upx.

Fixes FS33318

Signed-off-by: Chirantan Ekbote <chirantan.ekbote@gmail.com>
Signed-off-by: Allan McRae <allan@archlinux.org>
add libarchive compatability object

This allows us to support both libarchive 2.8.x as well as 3.x without
deprecation warnings on compile.

Signed-off-by: Dave Reisner <dreisner@archlinux.org>
Signed-off-by: Allan McRae <allan@archlinux.org>
Use libarchive compat header for relevant symbols

Signed-off-by: Dave Reisner <dreisner@archlinux.org>
Signed-off-by: Allan McRae <allan@archlinux.org>
Restore libarchive 2.8.x compatibility

We still call some of these 'deprecated' methods elsewhere, so this
shouldn't present a problem. When we decide 2.x support is to be dropped,
we should update all of the code to not call deprecated methods.

Allan: Adjusted with respect to previous patches adding libarchive
compatibilty layer.

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>