summaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)AuthorFilesLines
2012-04-09Merge remote-tracking branch 'dave/buildsys'Dan McGee24-343/+335
Oh god, what are we thinking thinking merging this. Hopefully this works with only a few follow-up patches necessary.
2012-04-09makepkg: save and restore shopts when sourcing /etc/profileAllan McRae1-0/+4
Signed-off-by: Allan McRae <allan@archlinux.org>
2012-04-09makepkg: complain when the buildfile isn't writeableDave Reisner1-7/+7
If the PKGBUILD isn't writeable for devel_update, throw a warning instead of silently ignoring it. Some logical reordering is present in this patch to reduce the number of nested if's. Signed-off-by: Dave Reisner <dreisner@archlinux.org>
2012-04-09makepkg: catch errors sourcing filesDave Reisner1-9/+14
create source_safe() function which temporarily disables extglob and exits on error. Signed-off-by: Dave Reisner <dreisner@archlinux.org>
2012-04-09makepkg: restrict usage of errexit to user functionsDave Reisner1-23/+23
It's expected that this will lead to unwanted behavior, and needs widespread testing. It's desirable to commit this for a few reasons: - there's no reason we can't do our own error checking for code that we write. - it avoids the need for ||true hacks scattered about in the code. - it makes us immune to upstream changes in exit codes (FS#28248) Signed-off-by: Dave Reisner <dreisner@archlinux.org>
2012-04-09Merge branch 'maint'Dan McGee1-5/+1
2012-04-09pacman-key: avoid use of tempfile in verify_sigDave Reisner1-5/+1
Use --status-fd rather than --status-file to keep this contained in a pipeline. Signed-off-by: Dave Reisner <dreisner@archlinux.org>
2012-04-09Add a new configure option for excessive compiler warning flagsDan McGee2-0/+61
This adds a bunch of warning flags to the list used when compiling. Signed-off-by: Dan McGee <dan@archlinux.org>
2012-04-09Various tweaks to support building with excessive GCC warning flagsDan McGee8-24/+33
This fixes a bunch of small issues in order to enable a clean successful build with a crazy number of GCC warning flags. A lot of these changes are covered by -Wshadow, -Wformat-security, and -Wstrict-overflow=5. Signed-off-by: Dan McGee <dan@archlinux.org>
2012-04-09autoclean.sh: abide by POSIX shebangDave Reisner1-17/+7
Avoid non-POSIX brace expansion and rely on find to locate and destroy files outside the root. Signed-off-by: Dave Reisner <dreisner@archlinux.org>
2012-04-09buildsys: move autotools bloat to build-auxDave Reisner9-0/+1
Signed-off-by: Dave Reisner <dreisner@archlinux.org>
2012-04-09buildsys: move acinclude.m4 to m4/Dave Reisner1-0/+0
Signed-off-by: Dave Reisner <dreisner@archlinux.org>
2012-04-09buildsys: cleanup libtool and autoconf initializationDave Reisner1-5/+2
- Use LT_INIT over AC_PROG_LIBTOOL, as the latter is a deprecated alias for the former. - Remove redundant macros which are called implicitly by LT_INIT. - Remove unneeded AC_PROG_CXX call (we don't use c++ anywhere) - Add AC_CONFIG_MACRO_DIR([m4]) -- not strictly necessary, but added for consistency with autogen.sh and Makefile.am ref: http://www.gnu.org/software/libtool/manual/html_node/LT_005fINIT.html Signed-off-by: Dave Reisner <dreisner@archlinux.org>
2012-04-09buildsys: define warning CFLAGS in separate varDave Reisner4-6/+6
Continue the trend of not touching the environment CFLAGS, ensuring that the user always has the final say. Signed-off-by: Dave Reisner <dreisner@archlinux.org>
2012-04-09buildsys: use AC_DEFINE for CYGWIN macroDave Reisner1-1/+1
Instead of directly modifying CFLAGS, use config.h for its intended purpose. Signed-off-by: Dave Reisner <dreisner@archlinux.org>
2012-04-09buildsys: cleanup gpgme compile time checkDave Reisner2-20/+23
- handle gpgme libs and cflags separately rather than appending to CFLAGS and LDFLAGS - be consistent in AC_LINK_IFELSE check for gpgme 1.3.0 (though this is irrelephant since we don't actually run) - be consistent with usage of "have" and "with" variables (this actually ends up reducing SLOC) - when voluntary detection fails, unset GPGME_CFLAGS and GPGME_LIBS - when requested support fails the version check, complain about the min version. Signed-off-by: Dave Reisner <dreisner@archlinux.org>
2012-04-09buildsys: use pkg-config for libcurl detectionDave Reisner3-255/+20
Signed-off-by: Dave Reisner <dreisner@archlinux.org>
2012-04-09buildsys: use pkg-config for libarchive detectionDave Reisner2-3/+5
This also introduces a versioned dependency of >=2.8.0. Signed-off-by: Dave Reisner <dreisner@archlinux.org>
2012-04-09buildsys: use pkg-config for openssl detectionDave Reisner3-15/+20
Signed-off-by: Dave Reisner <dreisner@archlinux.org>
2012-04-09buildsys: add pkg-config m4 macrosDave Reisner1-0/+159
We'll need these for a small revamp to library detection. Signed-off-by: Dave Reisner <dreisner@archlinux.org>
2012-04-09pacman-key: verify TRUST_ULTIMATE keys as goodDave Reisner1-1/+1
Extend our grep pattern to match TRUST_ULTIMATE, not just TRUST_FULLY, as these keys are to be trusted as well. Signed-off-by: Dave Reisner <dreisner@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
2012-04-09makepkg: treat lib{provides,depends} returns as proper arraysDave Reisner1-6/+6
Make these functions more whitespace space by treating newlines as the element delimiter rather than every form of whitespace. Signed-off-by: Dave Reisner <dreisner@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
2012-04-09makepkg: use proper array addition in libdepsDave Reisner1-7/+7
Signed-off-by: Dave Reisner <dreisner@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
2012-04-09makepkg: add missing newline from libprovides outputDave Reisner1-1/+1
This was a small oversight from 1917c845 which causes makepkg to write provides entries to the .PKGINFO file improperly, e.g. provides = systemdlibsystemdudev=999 Add a newline in the printf format to ensure that these are spaced appropriately. Signed-off-by: Dave Reisner <dreisner@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
2012-04-07repo-remove: remove deltas file if it becomes emptyFlorian Pritz1-0/+5
Signed-off-by: Florian Pritz <bluewind@xinu.at> Signed-off-by: Dan McGee <dan@archlinux.org>
2012-04-07Prefix alpm_pkgfrom_t members with ALPM_Allan McRae7-31/+31
Signed-off-by: Allan McRae <allan@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
2012-04-07Return more useful error codes on package open failuresDan McGee2-2/+13
Failure isn't always due to the package file location not existing; permission issues can also play a part on something like a FUSE-based filesystem inaccessible to root. Signed-off-by: Dan McGee <dan@archlinux.org>
2012-04-07Check minimum required gpgme versionAllan McRae1-1/+1
We use interfaces first introduced in gpgme-1.3.0 so test we have at least that version. Signed-off-by: Allan McRae <allan@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
2012-04-07Make selecting scriptlet shell workAllan McRae2-4/+4
The initial patch to implement this achieved nothing apart from adding a configure option. This patch makes that configure option do what it advertises. Note that specifing any shell apart from /bin/sh causes testsuite failures as /bin/sh is the only shell in the testing environment. Bug-found-by: Dave Reisner <dreisner@archlinux.org> Signed-off-by: Allan McRae <allan@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
2012-04-07makepkg: safely change directoriesAllan McRae1-13/+21
In preparation for the removal of the global error trap we need a way to ensure changing directories succeeds. Add a "cd_safe" wrapper that performs the necessary check. Signed-off-by: Allan McRae <allan@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
2012-04-07makepkg: use printf rather than echo to output variableAllan McRae1-31/+31
Also make sure the strings passed to %s in printf are always quoted. Signed-off-by: Allan McRae <allan@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
2012-04-07makepkg: the rhs in string comparisons should be quotedAllan McRae1-12/+12
Signed-off-by: Allan McRae <allan@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
2012-04-07makepkg: devel_check(): cleanup for hg versionMatthew Monaco1-5/+7
Use pushd/popd, quote args, handle some more errors
2012-04-07makepkg: devel_check(): set newpkgver (cleanup)Matthew Monaco1-27/+34
The case structure allows the syntax to focus on what's actually being done here.
2012-04-07makepkg: devel_check(): consolidate common codeMatthew Monaco1-30/+7
2012-04-07makepkg: devel_check(): determine vcsMatthew Monaco1-0/+16
Rather than prioritizing an arbitrary VCS, collect all development directives. If there is more than one, give a warning and abort.
2012-04-07makepkg: remove unused variableMatthew Monaco1-1/+0
Signed-off-by: Dan McGee <dan@archlinux.org>
2012-04-07Merge branch 'maint'Dan McGee92-1473/+1197
Conflicts: lib/libalpm/signing.c lib/libalpm/sync.c
2012-04-07Revert "makepkg: calculate exact total file size"Dan McGee3-1/+4
This reverts commit b264fb9e9ddcc31dc8782390309421965e507383. With our "fix" of sleeping for BTRFS, we can go back to using `du` to calculate total installed size.
2012-04-07pacman: show groups once with -SgPierre1-2/+6
Only displays groups that haven't appeared yet.. Previously 'pacman -Sg' iterated over syncs, printed every group. This change does not affect '-Sgg' which still orders by sync first. To reproduce, on a current Arch Linux with [extra] and [community]: $ pacman -Sg|sort|uniq -c|sort -n [...] 1 xorg-fonts 2 vim-plugins 2 xfce4-goodies Signed-off-by: Pierre <pierre@spotify.com> Signed-off-by: Dan McGee <dan@archlinux.org>
2012-04-07makepkg.conf: enable curl's cookie engine for httpDave Reisner1-2/+2
Implements FS#28098. Signed-off-by: Dave Reisner <dreisner@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
2012-04-074.0.3 release NEWS, version bumps, etc.v4.0.3working-maintDan McGee3-3/+28
Signed-off-by: Dan McGee <dan@archlinux.org>
2012-04-07Revert "parseopts: normalize options into an array"Dave Reisner3-17/+27
This was really only half a fix for FS#28445, as it still doesn't correctly handle the case of filenames with spaces. In the short term, there is no obvious fix for this. In the long term, I believe the correct decision is to rewrite the options parser to be more in line with GNU getopt_long. This reverts commits: ca4142714137b16feabac09c4cda86b0a75036f8. 969dcddbdf9d5dbd91aa414cdd193f3fb26b644b.
2012-04-07pkgdelta: exit 1 upon errorFlorian Pritz1-2/+2
This has been 0 since 9fa18d9a4b4ce5217842c71d8a45676e3fb9d3f4, but it doesn't makes sense because we are raising an error. Signed-off-by: Florian Pritz <bluewind@xinu.at> Signed-off-by: Dan McGee <dan@archlinux.org>
2012-04-07pacman-key: Actually verify signatures and exit with correct codesPierre Schmitz1-1/+5
We cannot rely on gpg's exit code. Instead we have to check the status-fd to figure out whether a signature is valid or not. In addition to this pacman-key --verify can now be used in scripts as it will return an exit code of 1 if the signature is invalid. Signed-off-by: Pierre Schmitz <pierre@archlinux.de> Signed-off-by: Dan McGee <dan@archlinux.org>
2012-04-07pkgdelta: use bsdtar -q optionDan McGee1-1/+1
This matches the optimization made to repo-add in commit 8bbaf045b9ce way back in 2009. We don't need to read the whole package file to ensure multiple .PKGINFO entries don't exist, as well-formed packages should have this file first in the archive. Signed-off-by: Dan McGee <dan@archlinux.org>
2012-04-07sync: fix crash on failed downloadsDave Reisner1-1/+1
Dan was right. This should have been FREE(), not free(). Signed-off-by: Dave Reisner <dreisner@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
2012-04-07parse_options: initialize unused_options as arrayDave Reisner1-1/+1
Since we treat this as an array, we need to initialize it as one. This avoids addition of an empty element to the option string when we set the option array from the calling program, e.g. +/usr/bin/makepkg[2033]: set -- -i --pkg vim -- '' Signed-off-by: Dave Reisner <dreisner@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
2012-04-07Updates from TransifexDan McGee15-478/+598
This encompasses a few languages that have had changes since 4.0.2 available on Transifex. Signed-off-by: Dan McGee <dan@archlinux.org>
2012-03-29pacman-key: change to more reliable default keyserverAllan McRae1-1/+1
User reports indicate that the SKS keyservers are more reliable than both the gnupg.net and mit.edu ones. Signed-off-by: Allan McRae <allan@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>