summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAge
* Fix compile error when curl is not usedDan McGee2011-08-09
| | | | | | | | | | Noticed in my PowerPC Linux VM: cc1: warnings being treated as errors dload.c:45: error: 'get_filename' defined but not used make[3]: *** [dload.lo] Error 1 Signed-off-by: Dan McGee <dan@archlinux.org>
* Depend on name_hash being setDan McGee2011-08-09
| | | | | | | This is a fairly valid assumption at this point, or at least as good of one as assuming packages all have names. Signed-off-by: Dan McGee <dan@archlinux.org>
* pactest: improve speed of local DB dependent rulesDan McGee2011-08-09
| | | | | | | | | | | | | | We were doing some really silly stuff before and abusing the os.walk() call, having to walk the entire local database for every single PKG rule. We really only need top level directories, and we can cache any generated package since calls to db_read() are well-defined and only happen in one place. This speeds up the running of tests that may want to add 100 PKG_VERSION rules at once, where before we had to limit how many we used in order to not put a serious cramp in the speed of the test suite run. Signed-off-by: Dan McGee <dan@archlinux.org>
* Add reason to corrupted package callbackDan McGee2011-08-08
| | | | Signed-off-by: Dan McGee <dan@archlinux.org>
* Attempt to fix up some of the brokenness around failed package loadsDan McGee2011-08-08
| | | | | | | | | | | | | | | This is a bit of a mess, due to the fact that we have a progress meter running. It is also ironic that we are in the midst of a method named "commit" when we haven't done a damn thing yet, and can still fail hard if either a checksum or signature is invalid or unrecognized. Adapt the former test_md5sum method to be invoked for any of the various failure types, which at least gives the user some indication of what packages are failing. A second patch will be needed to actually show worthwhile error codes, but this is going to involve modifying the actual data passed with the callback. Signed-off-by: Dan McGee <dan@archlinux.org>
* Update several translation stringsDan McGee2011-08-08
| | | | | | | * Fix typos/capitalization * Make sure large blocks of text are translated in one unit Signed-off-by: Dan McGee <dan@archlinux.org>
* Update transifex config for new translation layoutDan McGee2011-08-08
| | | | Signed-off-by: Dan McGee <dan@archlinux.org>
* Update all translation filesDan McGee2011-08-08
| | | | | | | This moves us toward staring translations for the 4.0.0 release, although this should not be interpreted as a string freeze by any means. Signed-off-by: Dan McGee <dan@archlinux.org>
* _alpm_access(): don't call gettext() in debug level loggersDan McGee2011-08-08
| | | | | | | | This is standard procedure elsewhere and cuts down on translations that won't be seen (and we don't want if we need English debug output anyway). Signed-off-by: Dan McGee <dan@archlinux.org>
* Merge branch 'maint'Dan McGee2011-08-08
|\ | | | | | | | | | | | | | | | | | | | | Conflicts: lib/libalpm/dload.c lib/libalpm/po/fi.po lib/libalpm/po/libalpm.pot po/de.po po/fi.po src/pacman/po/pacman.pot src/pacman/util.c
| * Update translations from transifexDan McGee2011-08-08
| | | | | | | | Signed-off-by: Dan McGee <dan@archlinux.org>
| * doc/PKGBUILD: fix pkgver for -git packagesFlorian Pritz2011-08-08
| | | | | | | | | | Signed-off-by: Florian Pritz <bluewind@xinu.at> Signed-off-by: Dan McGee <dan@archlinux.org>
| * Fix group selection entry for large inputsDan McGee2011-07-25
| | | | | | | | | | | | | | | | | | | | | | | | Hardcoding anything always ends up burning you, and the arbitrary length of 64 here did just that. Add the ability to reallocate the readline buffer for longer inputs if necessary, and add other error checking as approprate. This also plugs one small memory leak of the group processing code selection array. Addresses FS#24253. Signed-off-by: Dan McGee <dan@archlinux.org>
| * libalpm: Set ret correctly in download_internal()Lukas Fleischer2011-07-25
| | | | | | | | | | | | | | | | | | Immediately jump to the cleanup code after setting the return code to -1 in case rename() fails. Otherwise, it will be reset to 0 right after we leave the if branch. Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de> Signed-off-by: Dan McGee <dan@archlinux.org>
* | Store a package info level flag if we fail to load dataDan McGee2011-08-08
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If we are missing a local database file, we get repeated messages over and over telling us the same thing, rather than being sane and erroring only once. This package adds an INFRQ_ERROR level that is added to the mask if we encounter any errors on a local_db_read() operation, and short circuits future calls if found in the value. This fixes FS#25313. Note that this does not make any behavior changes other than suppressing error messages and repeated code calls to failure cases; we still have more to do in the "local database is hosed" department. Also make a small update to the wrong but unused flags set in be_package; using INFRQ_ALL there was not totally correct. Signed-off-by: Dan McGee <dan@archlinux.org>
* | Add a test harness for new pacsort commandDan McGee2011-08-08
| | | | | | | | | | | | | | | | Note that this is meant to exercise pacsort more than the underlying version comparsion; that is better left to the standalone vercmptest.sh test script. Signed-off-by: Dan McGee <dan@archlinux.org>
* | mark option structs as constDave Reisner2011-08-08
| | | | | | | | | | | | | | | | These are never modified and even getopt_long's prototype shows this modifier on the parameter. Signed-off-by: Dave Reisner <dreisner@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
* | paccache: use pacsort instead of sort -VDave Reisner2011-08-08
| | | | | | | | | | Signed-off-by: Dave Reisner <dreisner@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
* | src/util/Makefile.am: alphabetize targetsDave Reisner2011-08-08
| | | | | | | | | | Signed-off-by: Dave Reisner <dreisner@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
* | pacsort: add new utilityDave Reisner2011-08-08
| | | | | | | | | | | | | | | | pacsort is a command line sorting utility that implements libalpm's alpm_pkg_vercmp algorithm. Signed-off-by: Dave Reisner <dreisner@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
* | Bash-ify test/util/vercmptest.shDan McGee2011-08-08
| | | | | | | | Signed-off-by: Dan McGee <dan@archlinux.org>
* | makepkg: ignore epoch when undeclaredDave Reisner2011-08-08
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In this case, we skip the epoch versioning entirely, as if it were declared as 0. Prevents errors such as: /usr/bin/makepkg: line 244: ((: ! : syntax error: operand expected (error token is " ") ==> Finished making: cower-git :20110808-1 (Mon Aug 8 17:17:27 EDT 2011) Signed-off-by: Dave Reisner <dreisner@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
* | contrib/paccache: misc cleanup and bugfixDave Reisner2011-08-08
| | | | | | | | | | | | | | | | | | | | * change error verbiage when run as root * delete sigs along with packages * fix bug in diskspace calculations * merge END block in pkgfilter Signed-off-by: Dave Reisner <dreisner@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
* | Check return value of rename() callsDan McGee2011-08-08
| | | | | | | | | | | | | | | | | | We did a good job checking this in add.c, but not necessarily anywhere else. Fix this up by adding checks into dload.c, remove.c, and conf.c in the frontend. Also add loggers where appropriate and make the message syntax more consistent. Signed-off-by: Dan McGee <dan@archlinux.org>
* | docs/pacman.conf: Document SigLevel optionDan McGee2011-08-02
| | | | | | | | | | | | | | | | | | This adds docs for SigLevel, which can exist in both [options] and [repository] sections. It also does a bit of reworking of the structure of this manpage and adds a labeled list under the repo sections where we didn't have one before. Signed-off-by: Dan McGee <dan@archlinux.org>
* | Implement parsing of the new SigLevel directiveDan McGee2011-08-02
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add code to conf.c that parses the new SigLevel directive. An overwhelming number of options are presented, but most users will still be fine with the Never/Optional/Required trio. More advanced users can combine these or any of the other options on a 'SigLevel = ' line, which is parsed in a left-to-right fashion and flags turned on and off accordingly. For example, all three of these will net the same config: SigLevel = Required PackageOptional SigLevel = Optional DatabaseRequired SigLevel = DatabaseRequired PackageOptional Additionally, database-specific lines assume you wish to start with any global default that has been set. For example, if any of the above lines were in the [options] section, something such as: SigLevel = PackageRequired PackageAllowMarginal Would continue to enforce required database signatures. Inspiration-by: Kerrick Staley <mail@kerrickstaley.com> Signed-off-by: Dan McGee <dan@archlinux.org>
* | paccache: add new contrib scriptDave Reisner2011-08-02
| | | | | | | | | | | | | | | | | | | | paccache is a robust and flexible package cache cleaner with a variety of options. Much credit goes to DJ Mills and Pat Brisbin for ideas behind this script. Signed-off-by: Dave Reisner <dreisner@archlinux.org> [Dan: add .gitignore entry] Signed-off-by: Dan McGee <dan@archlinux.org>
* | pacman-key: follow gpg options for listing keysAllan McRae2011-08-02
| | | | | | | | | | | | | | | | | | | | | | | | | | | | The current --list option outputed the keys and all their signatures which can be overly verbose. It also did not take a list of keys on the command line to limit its output (although the code suggests that was intended). That patch brings consistency with gpg, providing --list-keys and --list-sigs options that function equivalently to those provided by gpg. Signed-off-by: Allan McRae <allan@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
* | Don't trim whitespace when reading database entriesDan McGee2011-08-02
| | | | | | | | | | | | | | | | | | | | | | We don't write with extra or unknown whitespace, so there is little reason for us to trim it when reading either. This also fixes the hopefully never encountered "paths that start or end with spaces" issue, for which two pactests have been added. The tests also contain other evil characters that we have encountered before and handle just fine, but it doesn't hurt to ensure we don't break such support in the future. Signed-off-by: Dan McGee <dan@archlinux.org>
* | pactest: use subprocess module instead of os.systemDan McGee2011-08-02
| | | | | | | | | | | | | | | | | | This is more in line with standard Python practice, and makes keyboard interrupts behave a lot more sanely. It also prevents the useless spawning of a shell as well as simplifies the command building and working directory stuff. Signed-off-by: Dan McGee <dan@archlinux.org>
* | Revamp signing checksDan McGee2011-07-28
| | | | | | | | | | | | | | | | | | | | | | | | | | This ensures we are actually making correct use of the information gpgme is returning to us. Marginal being allowed was obvious before, but Unknown should deal with trust level, and not the presence or lack thereof of a public key to validate the signature with. Return status and validity information in two separate values so check methods and the frontend can use them independently. For now, we treat expired keys as valid, while expired signatures are invalid. Signed-off-by: Dan McGee <dan@archlinux.org>
* | Tidy up testdb to match coding stylesDan McGee2011-07-28
| | | | | | | | Signed-off-by: Dan McGee <dan@archlinux.org>
* | Make free_groupcache() privateDan McGee2011-07-28
| | | | | | | | Signed-off-by: Dan McGee <dan@archlinux.org>
* | Merge remote-tracking branch 'dave/scripts-fixup'Dan McGee2011-07-28
|\ \
| * | scripts/pkgdelta: exit properly on missing argsDave Reisner2011-07-28
| | | | | | | | | | | | | | | | | | | | | Removes usage of 'nounset' which, when combined with 'errexit' can cause undesirable early exits. Signed-off-by: Dave Reisner <dreisner@archlinux.org>
| * | scripts/repo-add: show usage when no DB file specifiedDave Reisner2011-07-28
| | | | | | | | | | | | Signed-off-by: Dave Reisner <dreisner@archlinux.org>
* | | Unify modelines in Asciidoc filesDan McGee2011-07-28
|/ / | | | | | | | | | | | | | | | | | | | | This gets us close to using the same modeline in all files we run through Asciidoc, as well as adding the spell and spelllang declarations, just as we had in NEWS already. The choice of 'en_us' is mainly for consistency and because the body of work already uses these spellings. Signed-off-by: Dan McGee <dan@archlinux.org>
* | pacman-key: Add --import and --import-trustdbPang Yan Han2011-07-27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently, pacman-key allows the user to import their keys using the --add option. However, no similar functionality exists for importing ownertrust values. The --import-trustdb option takes a list of directories and imports ownertrust values if the directories have a trustdb.gpg database. The --import option takes a list of directories and imports keys from pubring.gpg and ownertrust values from trustdb.gpg. Think of it as a combination of --add and --import-trustdb Signed-off-by: Pang Yan Han <pangyanhan@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
* | pacman-key: change GPG_PACMAN and GPG_NOKEYRING to arraysDJ Mills2011-07-27
| | | | | | | | | | | | | | | | | | Allows the commands to safely handle any possible arguments Signed-off-by: DJ Mills <danielmills1@gmail.com> Allan: rebase patch Signed-off-by: Allan McRae <allan@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
* | pacman-key: fix syntax error in -r arg parsingAllan McRae2011-07-27
| | | | | | | | | | | | | | Previous fix did not work... Signed-off-by: Allan McRae <allan@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
* | makepkg: refactor checking source integrityAllan McRae2011-07-27
| | | | | | | | | | | | | | | | | | Move the source integrity checking into its own function as the code was duplicated and is now more complicated with the separation of the two checks types. Signed-off-by: Allan McRae <allan@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
* | makepkg: more control of skipping integrity checksAllan McRae2011-07-27
| | | | | | | | | | | | | | | | | | Allows the skipping of all integrity checks (checksum and PGP) or either the checksum or PGP checks individually. Original-patch-by: Wieland Hoffman <theminew@googlemail.com> Signed-off-by: Allan McRae <allan@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
* | makepkg: Add support for verifying pgp signaturesWieland Hoffmann2011-07-27
| | | | | | | | | | | | | | | | | | | | | | | | | | Many projects provide signature files along with the source code archives. It's good to check these, too, when verifying the integrity of source code archives. Not everybody is using gpg so the verification can be disabled with --skippgpcheck. Additionally, only a warning is displayed when the key that signed the source file is unknown. Signed-off-by: Allan McRae <allan@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
* | Remove duplicate code shared between sync and upgradeDan McGee2011-07-27
| | | | | | | | | | | | | | | | | | Pacman did a great job of having almost (but not quite) duplicate code paths through the sync and upgrade code. We can use the same logic in both upgrade in sync once the targets are resolved, so extract a function and delete a bunch of code. Signed-off-by: Dan McGee <dan@archlinux.org>
* | makepkg: get package version with overridesAllan McRae2011-07-27
| | | | | | | | | | | | | | | | | | | | | | When epoch, pkgver and/or pkgrel were overridden in a split package function, makepkg failed hard finding the real version for checking if packages were already built or trying to install packages. Fix the get_full_version function to deal with overrides and return the actual package version. Signed-off-by: Allan McRae <allan@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
* | makepkg: allow epoch to be overriddenAllan McRae2011-07-27
| | | | | | | | | | | | | | | | We can override pkgver and pkgrel so it is only logical to add epoch to that list Signed-off-by: Allan McRae <allan@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
* | makepkg: check arch overrides for required architectureAllan McRae2011-07-27
| | | | | | | | | | | | | | | | Check any overrides of the "arch" variable contain the required architecture. Signed-off-by: Allan McRae <allan@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
* | makepkg: check overrides for pkgrel and pkgverAllan McRae2011-07-27
| | | | | | | | | | | | | | | | Enforce syntax checking for pkgrel and pkgver overrides in package functions. Signed-off-by: Allan McRae <allan@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
* | makepkg: pkgver and pkgrel can not have whitespaceAllan McRae2011-07-27
| | | | | | | | | | | | | | There is always someone who tries to break things (cough *Dave* cough...) Signed-off-by: Allan McRae <allan@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
* | contrib/pacsearch: skip non-matching linesDan McGee2011-07-27
| | | | | | | | | | | | | | This prevents some perl errors from popping up when pacman prints error or warning messages. Signed-off-by: Dan McGee <dan@archlinux.org>