summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* WIP: pkgdelta changeworkingDan McGee2012-04-081-20/+43
|
* WIP: make signing take fd, not pathDan McGee2012-04-084-39/+54
|
* Refactor database path and fd handlingDan McGee2012-04-089-104/+111
| | | | | | | | | | | | | | | | This returns db->path to be "protected", e.g., available for use inside the library, and removes the need to go through _alpm_db_path(), which no longer exists. This was added due to us needing to do lazy resolving because of config parsing, where DBPath settings could come after repos were already established. However, we have since changed this and require dbpath to be specified when calling alpm_initialize(), so the lazy logic is no longer required. This also adds a db->fd item to the database struct; sync databases are wired up so we always have a permanent file handle to the database object that we can use as necessary. Signed-off-by: Dan McGee <dan@archlinux.org>
* Merge remote-tracking branch 'dave/buildsys'Dan McGee2012-04-0824-343/+335
|\ | | | | | | | | 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-082-0/+61
| | | | | | | | | | | | 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-088-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>
| * autoclean.sh: abide by POSIX shebangDave Reisner2012-04-081-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>
| * buildsys: move autotools bloat to build-auxDave Reisner2012-04-089-0/+1
| | | | | | | | Signed-off-by: Dave Reisner <dreisner@archlinux.org>
| * buildsys: move acinclude.m4 to m4/Dave Reisner2012-04-081-0/+0
| | | | | | | | Signed-off-by: Dave Reisner <dreisner@archlinux.org>
| * buildsys: cleanup libtool and autoconf initializationDave Reisner2012-04-081-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>
| * buildsys: define warning CFLAGS in separate varDave Reisner2012-04-084-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>
| * buildsys: use AC_DEFINE for CYGWIN macroDave Reisner2012-04-081-1/+1
| | | | | | | | | | | | | | 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-082-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>
| * buildsys: use pkg-config for libcurl detectionDave Reisner2012-04-083-255/+20
| | | | | | | | Signed-off-by: Dave Reisner <dreisner@archlinux.org>
| * buildsys: use pkg-config for libarchive detectionDave Reisner2012-04-082-3/+5
| | | | | | | | | | | | 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-083-15/+20
| | | | | | | | Signed-off-by: Dave Reisner <dreisner@archlinux.org>
| * buildsys: add pkg-config m4 macrosDave Reisner2012-04-081-0/+159
| | | | | | | | | | | | 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-081-0/+4
| | | | | | | | Signed-off-by: Allan McRae <allan@archlinux.org>
* | makepkg: complain when the buildfile isn't writeableDave Reisner2012-04-081-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>
* | makepkg: catch errors sourcing filesDave Reisner2012-04-081-9/+14
| | | | | | | | | | | | | | 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-081-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>
* | Merge branch 'maint'Dan McGee2012-04-081-5/+1
|\ \ | |/ |/|
| * pacman-key: avoid use of tempfile in verify_sigDave Reisner2012-04-081-5/+1
| | | | | | | | | | | | | | 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-081-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>
* | makepkg: treat lib{provides,depends} returns as proper arraysDave Reisner2012-04-081-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>
* | makepkg: use proper array addition in libdepsDave Reisner2012-04-081-7/+7
| | | | | | | | | | 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-081-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>
* | repo-remove: remove deltas file if it becomes emptyFlorian Pritz2012-04-071-0/+5
| | | | | | | | | | 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-077-31/+31
| | | | | | | | | | 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-072-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>
* | Check minimum required gpgme versionAllan McRae2012-04-071-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>
* | Make selecting scriptlet shell workAllan McRae2012-04-072-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>
* | makepkg: safely change directoriesAllan McRae2012-04-071-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>
* | makepkg: use printf rather than echo to output variableAllan McRae2012-04-071-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>
* | makepkg: the rhs in string comparisons should be quotedAllan McRae2012-04-071-12/+12
| | | | | | | | | | 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-071-5/+7
| | | | | | | | Use pushd/popd, quote args, handle some more errors
* | makepkg: devel_check(): set newpkgver (cleanup)Matthew Monaco2012-04-071-27/+34
| | | | | | | | | | The case structure allows the syntax to focus on what's actually being done here.
* | makepkg: devel_check(): consolidate common codeMatthew Monaco2012-04-071-30/+7
| |
* | makepkg: devel_check(): determine vcsMatthew Monaco2012-04-071-0/+16
| | | | | | | | | | 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-071-1/+0
| | | | | | | | Signed-off-by: Dan McGee <dan@archlinux.org>
* | Merge branch 'maint'Dan McGee2012-04-0792-1473/+1197
|\| | | | | | | | | | | Conflicts: lib/libalpm/signing.c lib/libalpm/sync.c
| * 4.0.3 release NEWS, version bumps, etc.v4.0.3Dan McGee2012-04-073-3/+28
| | | | | | | | Signed-off-by: Dan McGee <dan@archlinux.org>
| * Revert "parseopts: normalize options into an array"Dave Reisner2012-04-073-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.
| * pkgdelta: exit 1 upon errorFlorian Pritz2012-04-071-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>
| * pacman-key: Actually verify signatures and exit with correct codesPierre Schmitz2012-04-071-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>
| * pkgdelta: use bsdtar -q optionDan McGee2012-04-071-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>
| * sync: fix crash on failed downloadsDave Reisner2012-04-071-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>
| * parse_options: initialize unused_options as arrayDave Reisner2012-04-071-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>
| * Updates from TransifexDan McGee2012-04-0715-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>
| * pacman-key: change to more reliable default keyserverAllan McRae2012-03-291-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>