summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAge
* Only check necessary signatures and checksumsDan McGee2011-08-15
| | | | | | | | | | | The precedence goes as follows: signature > sha256sum > md5sum Add some logic and helper methods to check what we have available when loading a package, and then only check what is necessary to verify the package. This should speed up sync database verifies as we no longer will be doing both a checksum and a signature validation. Signed-off-by: Dan McGee <dan@archlinux.org>
* libalpm: fix a remaining old syntax of RET_ERR() macroRémy Oudompheng2011-08-15
| | | | | | | | It would prevent compilation of pacman on FreeBSD, and possibly other systems. Signed-off-by: Rémy Oudompheng <remy@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
* lib/sync: ignore download errors for as long as possibleDave Reisner2011-08-15
| | | | | | | | | | | | | | | | | | Previously, the behavior was such that if a sync operation required packages from multiple repos, a download error in the first repo would cause a hard repo, ignoring the remainder of the repositories. Change this behavior so that we do a better job of fetching as many packages as possible before aborting the transaction. There's a little bit of refactoring mixed in here to get rid of some useless variables. Since we now depend heavily on the value of handle->pm_errno being accurate the determine the function's return value, we clear it when the transaction state is set. Fixes FS#25532. Signed-off-by: Dave Reisner <dreisner@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
* Further fixes to replacement iterationDan McGee2011-08-15
| | | | | | | | | | A partial fix for this was in commit 7de92cb22, but this should fix the remaining cases. There are still several issues dealing with "provision as replacement" selection however. Addresses FS#25538 and FS#25527. Signed-off-by: Dan McGee <dan@archlinux.org>
* Add short example signature config to pacman.confDan McGee2011-08-15
| | | | | | This is similar to what we do with every other option. Signed-off-by: Dan McGee <dan@archlinux.org>
* build-sys: always use $(RM) instead of rm -fDave Reisner2011-08-15
| | | | | | | These are equivalent. Use the autoconf macro for consistency. Signed-off-by: Dave Reisner <dreisner@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
* dist: preserve symlinks on installationDave Reisner2011-08-15
| | | | | | | | | This applies to the repo-remove man page as well as the script itself. Yes Dan, I ran distcheck afterwards. Signed-off-by: Dave Reisner <dreisner@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
* Parse conflicts/provides/replaces at database load timeDan McGee2011-08-15
| | | | | | | | | | | | | | | | | | | | | | We did this with depends way back in commit c244cfecf654d3 in 2007. We can do it with these fields as well. Of note is the inclusion of provides even though only '=' is supported- we'll parse other things, but no guarantees are given as to behavior, which is more or less similar to before since we only looked for the equals sign. Also of note is the non-inclusion of optdepends; this will likely be resolved down the road. The biggest benefactors of this change will be the resolving code that formerly had to parse and reparse several of these fields; it only happens once now at load time. This does lead to the disadvantage that we will now always be parsing this information up front even if we never need it in the split form, but as these are uncommon fields and our parser is quite efficient it shouldn't be a big concern. Signed-off-by: Dan McGee <dan@archlinux.org>
* Validate the sha256sum if availableDan McGee2011-08-15
| | | | | | Adjust load_internal() to check the sha256sum value if we have it. Signed-off-by: Dan McGee <dan@archlinux.org>
* Show 'None' in Signatures -Qip/-Si output if none foundDan McGee2011-08-15
| | | | | | This is to be as consistent as possible across both types of display. Signed-off-by: Dan McGee <dan@archlinux.org>
* decode_signature: guess signature data length for efficiencyDan McGee2011-08-15
| | | | | | | | | We may end up allocating 1 or 2 extra bytes this way, but it is worth it to simplify the method and not have to call base64_decode() a second time. Use the hueristic that base64 encoding produces 3 bytes of decoded data for every 4 bytes of encoded data. Signed-off-by: Dan McGee <dan@archlinux.org>
* Remove checksum access indirectionDan McGee2011-08-15
| | | | | | | | | These items are never present in anything but sync databases, nor do we even try to load them from the local database. Remvoe the indirection meant to allow the caching layer to work since it will never do anything anyway. Signed-off-by: Dan McGee <dan@archlinux.org>
* lib/sync: reset flag after rejecting a replaceDave Reisner2011-08-15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This prevents iteration through the remainder of the current tree, with pacman claiming that they're all replacements to the original replacement candidate. :: Synchronizing package databases... allanbrokeit is up to date testing is up to date core is up to date extra is up to date community-testing is up to date community is up to date :: Starting full system upgrade... :: Replace util-linux-git with core/util-linux? [Y/n] n :: Replace util-linux-git with core/vi? [Y/n] n :: Replace util-linux-git with core/vpnc? [Y/n] n :: Replace util-linux-git with core/wget? [Y/n] n :: Replace util-linux-git with core/which? [Y/n] n :: Replace util-linux-git with core/wireless-regdb? [Y/n] n :: Replace util-linux-git with core/wireless_tools? [Y/n] n :: Replace util-linux-git with core/wpa_actiond? [Y/n] n :: Replace util-linux-git with core/wpa_supplicant? [Y/n] n :: Replace util-linux-git with core/xfsprogs? [Y/n] n :: Replace util-linux-git with core/xinetd? [Y/n] n :: Replace util-linux-git with core/xz? [Y/n] n :: Replace util-linux-git with core/zd1211-firmware? [Y/n] n :: Replace util-linux-git with core/zlib? [Y/n] n there is nothing to do Signed-off-by: Dave Reisner <dreisner@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
* Load and allow access to sha256sumDan McGee2011-08-15
| | | | | | | | | This adds a field in the package struct for this checksum type as well as allowing access via the API to it. The frontend is now able to display any read value. Note that this does not implement any use or verification of the value internally. Signed-off-by: Dan McGee <dan@archlinux.org>
* Add ALPM sha256sum routinesDan McGee2011-08-15
| | | | | | These mirror ones we already have for md5sums. Signed-off-by: Dan McGee <dan@archlinux.org>
* Add sha2 (sha256) routines from PolarSSLDan McGee2011-08-15
| | | | Signed-off-by: Dan McGee <dan@archlinux.org>
* repo-add: indicate whether package signature is foundAllan McRae2011-08-15
| | | | | | | | | | When adding a package to a repo, it is useful to be able to see that repo-add has indeed found the signature file. [Dan: update text to be more in line with other messages] Signed-off-by: Allan McRae <allan@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
* pacman/package: show presence of signature in in -SiDave Reisner2011-08-15
| | | | | | | | | adds a new API method: alpm_pkg_get_base64_sig [Dan: don't use a new header string in frontend] Signed-off-by: Dave Reisner <dreisner@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
* README: update with 3.5.0 -> 4.0.0 API changesDave Reisner2011-08-15
| | | | Signed-off-by: Dan McGee <dan@archlinux.org>
* makepkg: don't hardcode path to stripDave Reisner2011-08-15
| | | | | Signed-off-by: Dave Reisner <dreisner@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
* alpm.h: fix inconsistency in function prototypeDave Reisner2011-08-15
| | | | | Signed-off-by: Dave Reisner <dreisner@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
* add pactest for replacing a shared providerDave Reisner2011-08-15
| | | | | | | This is currently expected to fail. Signed-off-by: Dave Reisner <dreisner@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
* pactest/sync200: check for curl instead of fetchDave Reisner2011-08-15
| | | | | | | | We can't just check for LIBS as curl won't be listed. Instead, look at the length of the LIBCURL var from the Makefile. Signed-off-by: Dave Reisner <dreisner@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
* lib/dload: avoid deleting .part file on too-slow xferDave Reisner2011-08-15
| | | | | | | | | | | Take this opportunity to refactor the if/then/else logic into a switch/case which is likely going to be needed to fine tune more exceptions in the future. Fixes FS#25531 Signed-off-by: Dave Reisner <dreisner@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
* Update base64 PolarSSL codeDan McGee2011-08-15
| | | | | | | Also adjust our code using it for the size_t adjustments made by upstream. Signed-off-by: Dan McGee <dan@archlinux.org>
* Update MD5 routines with changes from PolarSSLDan McGee2011-08-11
| | | | Signed-off-by: Dan McGee <dan@archlinux.org>
* pacman/query.c: avoid variable redeclarationDan McGee2011-08-11
| | | | | | | We were using i as the loop variable in both the inner and outer loop. Use j in the inner loop instead for clarity. Signed-off-by: Dan McGee <dan@archlinux.org>
* pactest: -U --recursivePang Yan Han2011-08-11
| | | | Signed-off-by: Dan McGee <dan@archlinux.org>
* scripts/pkgdelta: fix `make distcheck`Dan McGee2011-08-11
| | | | | | | --help and --version are required by the sanity checks performed by `make distcheck`. Signed-off-by: Dan McGee <dan@archlinux.org>
* Bump version to 4.0.0rc1Dan McGee2011-08-11
| | | | Signed-off-by: Dan McGee <dan@archlinux.org>
* pactest: add sync302 to test recursive syncfirstDave Reisner2011-08-11
| | | | | Signed-off-by: Dave Reisner <dreisner@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
* Enable recursive/needed sync on SyncFirstDan McGee2011-08-11
| | | | Signed-off-by: Dan McGee <dan@archlinux.org>
* Merge branch 'maint'Dan McGee2011-08-11
|\ | | | | | | | | Conflicts: scripts/repo-add.sh.in
| * makepkg: fix removing symbolic linkAllan McRae2011-08-10
| | | | | | | | | | | | | | | | | | | | The path was not being stripped from $file before prefixing with $srcdir resulting in the attempted removal of a very weird filename. Signed-off-by: Allan McRae <allan@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org> (cherry picked from commit e92905a2c8c14c7855e2841f44d3c139aa40844c)
| * Fix stupid typo in NEWS file updatesDan McGee2011-08-09
| | | | | | | | Signed-off-by: Dan McGee <dan@archlinux.org>
| * 3.5.4 release preparationDan McGee2011-08-09
| | | | | | | | Signed-off-by: Dan McGee <dan@archlinux.org>
| * Remove -f option from ln for POSIX complianceEric Bélanger2011-08-09
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Fixes FS#24893. Conflicts: scripts/makepkg.sh.in scripts/repo-add.sh.in Signed-off-by: Eric Bélanger <snowmaniscool@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org> (cherry picked from commit 51ed7dff0d30a5dcb73ce271e5d02bdb0d119cb9)
| * pacman/util: flush terminal input before reading responseDave Reisner2011-08-09
| | | | | | | | | | | | | | | | | | | | | | | | Addresses FS#20538 Conflicts: src/pacman/util.c Signed-off-by: Dave Reisner <d@falconindy.com> Signed-off-by: Dan McGee <dan@archlinux.org> (cherry picked from commit 9477abc3591905a20acbfe7b8ce7832617d72701)
| * Document group and providers selectionAllan McRae2011-08-09
| | | | | | | | | | | | | | | | | | | | The format required for selection of packages within the group selection dialog is not entirely obvious, so provide some documentation. Fixes FS#24134. Signed-off-by: Allan McRae <allan@archlinux.org> (cherry picked from commit 94d22f93096e210cd00d2e9c97c65f77d49ae387)
* | Attempt to update zsh_completionDan McGee2011-08-11
| | | | | | | | Signed-off-by: Dan McGee <dan@archlinux.org>
* | bash_completion: update for adjusted optionsDave Reisner2011-08-11
| | | | | | | | | | | | | | | | Remove -k option excepting query operations and add --recursive for sync and upgrade operations. Signed-off-by: Dave Reisner <dreisner@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
* | pacman: remove --dbonly shortoptDave Reisner2011-08-11
| | | | | | | | | | | | | | | | This is somewhat of a dangerous option with limited use cases. Don't advertise it as an easily accessibly option. Signed-off-by: Dave Reisner <dreisner@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
* | Update trust level strings in -Qi displayDan McGee2011-08-11
| | | | | | | | | | | | | | It makes more sense to use the same tense and construction on all of these. Signed-off-by: Dan McGee <dan@archlinux.org>
* | Allow --needed and --recursive on -U operationsDan McGee2011-08-11
| | | | | | | | | | | | | | Trivial to implement as the same backend machinery is used anyway. Document it and add it to the accepted options. Signed-off-by: Dan McGee <dan@archlinux.org>
* | Add -S --recursive operationDan McGee2011-08-11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This closely matches what we had before for -R --recursive. Basically, when specifying a target (e.g., pacman), we can now recursively pull all dependencies, regardless of version specifiers and whether they are already satisfied in the local database. This could be used to update pacman on a system with an old glibc, for example, as both pacman and glibc would get pulled into the transaction. This is most useful with --needed to prevent needless reinstalls as described in the man page changes. The end goal of this change is to wire it into SyncFirst and have it be the default mode of operation there, but that belongs in a separate changeset. Signed-off-by: Dan McGee <dan@archlinux.org>
* | Dependency code style cleanupsDan McGee2011-08-11
| | | | | | | | Signed-off-by: Dan McGee <dan@archlinux.org>
* | configure: simplify CARCH generation madnessDan McGee2011-08-11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Rather than a hardcoded list of only a few select architectures (of the 250+ case statements in config.guess), simply define CARCH to be the first component of the "target triplet". This introduces one "regression"- powerpc will no longer become ppc. However, this is easily worked around in downstream distros if wanted. This was the only CPU architecture with this oddity so it was felt worth the price to make this change. Note that 'ppc64' wasn't handled in this same odd fashion before anyway. Signed-off-by: Dan McGee <dan@archlinux.org>
* | build: remove mucking with CARCHFLAGSDan McGee2011-08-11
| | | | | | | | | | | | | | | | | | We've never received an update to this, and gcc has sane defaults out of the box anyway, as do most projects in their build systems. Remove the magic here and just let downstream distros handle any changes or additions necessary, as we already do for LDFLAGS. Signed-off-by: Dan McGee <dan@archlinux.org>
* | stop progress callbacks after curl_easy_perform returnsDave Reisner2011-08-11
| | | | | | | | | | | | | | | | | | | | This prevents possible null dereferences in FTP transfers when the progress callback is touched during connection teardown. http://curl.haxx.se/mail/lib-2011-08/0128.html Signed-off-by: Dave Reisner <dreisner@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
* | dload: remove unnecessary cast in alpm_load_payload_freeDave Reisner2011-08-11
| | | | | | | | | | | | | | Dan: make it compile, s/load/payload/. Signed-off-by: Dave Reisner <dreisner@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>