summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAge
* Merge branch 'maint'Dan McGee2012-04-12
|\
| * Fix issues with unintialized variable value usageDan McGee2012-04-09
| | | | | | | | | | | | | | | | | | | | | | | | Detected by clang scan-build static code analyzer. * Don't attempt to free an uninitialized gpgme key variable * Initialize answer variable before asking frontend a question * Pass by reference instead of value if uninitialized fields are possible in download signal handler code * Ensure we never call strlen() on NULL payload->remote_name value Signed-off-by: Dan McGee <dan@archlinux.org>
* | Remove SyncFirst optionDan McGee2012-04-12
| | | | | | | | | | | | | | | | | | | | | | This has outlived its usefulness and causes more problems than it solves. It has historically only ever been used to install pacman first. That should not be needed given we provide the vercmp utility (which has no library dependencies) and so calling pacman in install scripts is a sign of poor packaging. Work-duplicated-by: Allan McRae <allan@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
* | Add more warning flagsAllan McRae2012-04-09
| | | | | | | | Signed-off-by: Allan McRae <allan@archlinux.org>
* | Fix a signed overflow error on i686 with GCC 4.7.0Dan McGee2012-04-08
| | | | | | | | | | | | | | | | | | | | | | Not sure why this one wasn't showing up on x86_64, but this fixes the compile on i686. diskspace.c: In function 'calculate_removed_size': diskspace.c:247:4: error: assuming signed overflow does not occur when negating a division [-Werror=strict-overflow] cc1: all warnings being treated as errors Signed-off-by: Dan McGee <dan@archlinux.org>
* | Merge remote-tracking branch 'dave/buildsys'Dan McGee2012-04-08
|\ \ | | | | | | | | | | | | Oh god, what are we thinking thinking merging this. Hopefully this works with only a few follow-up patches necessary.
| * | Add a new configure option for excessive compiler warning flagsDan McGee2012-04-08
| | | | | | | | | | | | | | | | | | This adds a bunch of warning flags to the list used when compiling. Signed-off-by: Dan McGee <dan@archlinux.org>
| * | Various tweaks to support building with excessive GCC warning flagsDan McGee2012-04-08
| | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| * | autoclean.sh: abide by POSIX shebangDave Reisner2012-04-08
| | | | | | | | | | | | | | | | | | | | | 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>
| * | buildsys: move autotools bloat to build-auxDave Reisner2012-04-08
| | | | | | | | | | | | Signed-off-by: Dave Reisner <dreisner@archlinux.org>
| * | buildsys: move acinclude.m4 to m4/Dave Reisner2012-04-08
| | | | | | | | | | | | Signed-off-by: Dave Reisner <dreisner@archlinux.org>
| * | buildsys: cleanup libtool and autoconf initializationDave Reisner2012-04-08
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - 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>
| * | buildsys: define warning CFLAGS in separate varDave Reisner2012-04-08
| | | | | | | | | | | | | | | | | | | | | 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>
| * | buildsys: use AC_DEFINE for CYGWIN macroDave Reisner2012-04-08
| | | | | | | | | | | | | | | | | | | | | Instead of directly modifying CFLAGS, use config.h for its intended purpose. Signed-off-by: Dave Reisner <dreisner@archlinux.org>
| * | buildsys: cleanup gpgme compile time checkDave Reisner2012-04-08
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - 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>
| * | buildsys: use pkg-config for libcurl detectionDave Reisner2012-04-08
| | | | | | | | | | | | Signed-off-by: Dave Reisner <dreisner@archlinux.org>
| * | buildsys: use pkg-config for libarchive detectionDave Reisner2012-04-08
| | | | | | | | | | | | | | | | | | This also introduces a versioned dependency of >=2.8.0. Signed-off-by: Dave Reisner <dreisner@archlinux.org>
| * | buildsys: use pkg-config for openssl detectionDave Reisner2012-04-08
| | | | | | | | | | | | Signed-off-by: Dave Reisner <dreisner@archlinux.org>
| * | buildsys: add pkg-config m4 macrosDave Reisner2012-04-08
| | | | | | | | | | | | | | | | | | We'll need these for a small revamp to library detection. Signed-off-by: Dave Reisner <dreisner@archlinux.org>
* | | makepkg: save and restore shopts when sourcing /etc/profileAllan McRae2012-04-08
| | | | | | | | | | | | Signed-off-by: Allan McRae <allan@archlinux.org>
* | | makepkg: complain when the buildfile isn't writeableDave Reisner2012-04-08
| | | | | | | | | | | | | | | | | | | | | | | | 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>
* | | makepkg: catch errors sourcing filesDave Reisner2012-04-08
| | | | | | | | | | | | | | | | | | | | | create source_safe() function which temporarily disables extglob and exits on error. Signed-off-by: Dave Reisner <dreisner@archlinux.org>
* | | makepkg: restrict usage of errexit to user functionsDave Reisner2012-04-08
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | | Merge branch 'maint'Dan McGee2012-04-08
|\ \ \ | |/ / |/| / | |/
| * pacman-key: avoid use of tempfile in verify_sigDave Reisner2012-04-08
| | | | | | | | | | | | | | Use --status-fd rather than --status-file to keep this contained in a pipeline. Signed-off-by: Dave Reisner <dreisner@archlinux.org>
| * pacman-key: verify TRUST_ULTIMATE keys as goodDave Reisner2012-04-08
| | | | | | | | | | | | | | | | 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>
* | makepkg: treat lib{provides,depends} returns as proper arraysDave Reisner2012-04-08
| | | | | | | | | | | | | | | | 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>
* | makepkg: use proper array addition in libdepsDave Reisner2012-04-08
| | | | | | | | | | Signed-off-by: Dave Reisner <dreisner@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
* | makepkg: add missing newline from libprovides outputDave Reisner2012-04-08
| | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | repo-remove: remove deltas file if it becomes emptyFlorian Pritz2012-04-07
| | | | | | | | | | Signed-off-by: Florian Pritz <bluewind@xinu.at> Signed-off-by: Dan McGee <dan@archlinux.org>
* | Prefix alpm_pkgfrom_t members with ALPM_Allan McRae2012-04-07
| | | | | | | | | | Signed-off-by: Allan McRae <allan@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
* | Return more useful error codes on package open failuresDan McGee2012-04-07
| | | | | | | | | | | | | | | | 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>
* | Check minimum required gpgme versionAllan McRae2012-04-07
| | | | | | | | | | | | | | | | 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>
* | Make selecting scriptlet shell workAllan McRae2012-04-07
| | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | makepkg: safely change directoriesAllan McRae2012-04-07
| | | | | | | | | | | | | | | | | | 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>
* | makepkg: use printf rather than echo to output variableAllan McRae2012-04-07
| | | | | | | | | | | | | | 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>
* | makepkg: the rhs in string comparisons should be quotedAllan McRae2012-04-07
| | | | | | | | | | Signed-off-by: Allan McRae <allan@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
* | makepkg: devel_check(): cleanup for hg versionMatthew Monaco2012-04-07
| | | | | | | | Use pushd/popd, quote args, handle some more errors
* | makepkg: devel_check(): set newpkgver (cleanup)Matthew Monaco2012-04-07
| | | | | | | | | | The case structure allows the syntax to focus on what's actually being done here.
* | makepkg: devel_check(): consolidate common codeMatthew Monaco2012-04-07
| |
* | makepkg: devel_check(): determine vcsMatthew Monaco2012-04-07
| | | | | | | | | | Rather than prioritizing an arbitrary VCS, collect all development directives. If there is more than one, give a warning and abort.
* | makepkg: remove unused variableMatthew Monaco2012-04-07
| | | | | | | | Signed-off-by: Dan McGee <dan@archlinux.org>
* | Merge branch 'maint'Dan McGee2012-04-07
|\| | | | | | | | | | | Conflicts: lib/libalpm/signing.c lib/libalpm/sync.c
| * 4.0.3 release NEWS, version bumps, etc.Dan McGee2012-04-07
| | | | | | | | Signed-off-by: Dan McGee <dan@archlinux.org>
| * Revert "parseopts: normalize options into an array"Dave Reisner2012-04-07
| | | | | | | | | | | | | | | | | | | | | | | | 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.
| * pkgdelta: exit 1 upon errorFlorian Pritz2012-04-07
| | | | | | | | | | | | | | | | 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>
| * pacman-key: Actually verify signatures and exit with correct codesPierre Schmitz2012-04-07
| | | | | | | | | | | | | | | | | | | | | | 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>
| * pkgdelta: use bsdtar -q optionDan McGee2012-04-07
| | | | | | | | | | | | | | | | | | 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>
| * sync: fix crash on failed downloadsDave Reisner2012-04-07
| | | | | | | | | | | | | | 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>
| * parse_options: initialize unused_options as arrayDave Reisner2012-04-07
| | | | | | | | | | | | | | | | | | | | | | 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>