Drop the --usesudo option and use it by default if running as a non-root
user. Check the usage of the --asroot option and do not allow it to be used
as a normal user. A few other small fixes, including a typo in $confdir.
Signed-off-by: Dan McGee <dan@archlinux.org>
* etc/makepkg.conf.in: Add description for xdelta.
* doc/makepkg.conf.5: Add description for xdelta.
* scripts/makepkg.in: Various clean ups.
Signed-off-by: Andrew Fyfe <andrew@neptune-one.net>
Signed-off-by: Dan McGee <dan@archlinux.org>
Also cleaned up some duplicate printf lines related to the ShowSize option.
Signed-off-by: Nathan Jones <nathanj@insightbb.com>
Signed-off-by: Dan McGee <dan@archlinux.org>
* configure.ac: Add AC_SUBST() for ROOTDIR, PKGEXT, DBEXT so
they get exported to Makefiles.
* {makepkg,pacman}.conf.in: Remove extra / from paths.
Signed-off-by: Andrew Fyfe <andrew@neptune-one.net>
This change allows us to use all autoconf specified paths, most notably
$(localstatedir). It is quite a change and touches a lot of files, as
all references to the DB and cache were done with the ROOTDIR as a prefix.
* add --lock command-line option to pacman to specify the location of the
lockfile (this can now be specified at configure time by setting the
$localstatedir path).
* Rip quite a few settings out of configure.ac as they are now picked by
setting the paths during configure or make.
* Fix bug with /tmp fallback for sync downloads not working correctly
(related to root location, now the system tmp dir is used).
* Simplified the parameters to some libalpm functions, and added get/set
for the new lockfile option.
* Renamed several of the DEFS to names without the PM_ prefix.
Signed-off-by: Dan McGee <dan@archlinux.org>
Regression from 2.9.8 where a failed -Qi lookup did not return an error
on exit. The exit status is now incremented for each error encountered.
Signed-off-by: Dan McGee <dan@archlinux.org>
Signed-off-by: Dag Odenhall <dag.odenhall@gmail.com>
Signed-off-by: Andrew Fyfe <Andrew Fyfe andrew@neptune-one.net>
Signed-off-by: Dan McGee <dan@archlinux.org>
We already have $startdir, so this introduces two more shorthand variables
for the most commonly accessed directories.
Signed-off-by: Dan McGee <dan@archlinux.org>
Fix up everything in the etc/ directory so it is built at make-time and
not configure-time. This reduces configure generated files to just the
makefiles, which is the correct way to do things. This also allows a switch
from @@REPO@@ to the more sane @REPO@ in mirrorlist.in, and kills the
two-part generation of the mirror files.
Signed-off-by: Dan McGee <dan@archlinux.org>
This should finally get the path replacement in our scripts right. This
is the way the autoconf package itself does it and should not need much
further tweaking.
Threw in a few trailing whitespace corrections from the scripts as well.
Signed-off-by: Dan McGee <dan@archlinux.org>
Using the autoscan tool, ensure we are doing the checks we should be doing
in configure.ac. There is still more work to do, but this is a start at
cleaning up the file a bit to make it much easier to change in the future.
Signed-off-by: Dan McGee <dan@archlinux.org>
By setting up a few more AC_SUBST macros in configure.ac, we can fill in
paths in the scripts on the fly instead of having them in multiple places.
Other small fixes:
* Fix an oops on my last commit where I had some lines stil commented.
* Fix makepkg bug where the generated package name using PKGEXT had two
periods (..).
Signed-off-by: Dan McGee <dan@archlinux.org>
Added the autoconf option std-options to the scripts/ directory, which
checks to ensure all programs have both --help and --version options. A
few things needed cleaning up to get this working. To test these types
of options, use the 'make distcheck' target.
Signed-off-by: Dan McGee <dan@archlinux.org>
GCC-4.2.0 requires -mtune=generic to produce binaries optimized for
generic i686/x86_64. By default it tries to optimize a for the host
system building the package.
Signed-off-by: Andrew Fyfe <andrew@neptune-one.net>
Using printf we can avoid haveing to use eval_gettext and the ugly escape sequances required to use it.
Signed-off-by: Andrew Fyfe <andrew@neptune-one.net>
A few changes to undo my stupid mistake earlier wrt fakeroot checking,
and unify the output and usage of 'makepkg.conf'.
Signed-off-by: Dan McGee <dan@archlinux.org>
Only the following functions now run inside fakeroot
* run_build()
* tidy_install()
* create_package()
Added check for inproper use of '-F' option.
Added warning if makepkg is run as root. Added a new '--asroot' flag that
must be passed if you wish to run makepkg as the root user.
Signed-off-by: Andrew Fyfe <andrew@neptune-one.net>
Signed-off-by: Dan McGee <dan@archlinux.org>