summaryrefslogtreecommitdiffstats
path: root/scripts
AgeCommit message (Collapse)AuthorFilesLines
2011-08-29pacman-key: have --init add more options to default gpg.confDan McGee1-5/+22
This adds a add_gpg_conf_option() helper function which tries to be intelligent and only add not found options, and those which have not been explicitly commented out. The new options added are 'no-greeting', 'no-permission-warning', and a default 'keyserver'. Signed-off-by: Dan McGee <dan@archlinux.org>
2011-08-29pacman-key: refine permission and locking checksDan McGee1-3/+3
* secring.gpg can be 600, readable by root user only * ensure grep for lock-never option in check_keyring doesn't catch comments Signed-off-by: Dan McGee <dan@archlinux.org>
2011-08-29pacman-key: rework and document holding keys in keyringAllan McRae1-7/+5
The HoldKey option was undocumented and was not suited for pacman.conf. Instead use the file "/etc/pacman.d/gnupg/heldkeys" to contain a list of keys not to be removed from the pacman keyring with the --populate option. Signed-off-by: Allan McRae <allan@archlinux.org>
2011-08-29pacman-key: update trust database for relevant operationsAllan McRae1-12/+9
After most operations that touch the keyring, it is a good idea to always run a check on the trustdb as this prevents gpg complaining on later operations. Inspiration-from: Dave Reisner <dreisner@archlinux.org> Signed-off-by: Allan McRae <allan@archlinux.org>
2011-08-29pacman-key: import everything then revoke on --populateAllan McRae1-13/+10
The optimization of only importing keys that were not to be later revoked was a not smart enough. For example, if a key was in both a repos keyring and its revoke list, alternate runs of pacman-key --populate would add then remove the key from the pacman keyring. This problem is made worse when considering the possibility of multiple keyrings being imported. Instead, import all keys followed by the revoking of all keys. This may result in a key being added then revoked, but that is not much of an issue given that is a very fast operation. Signed-off-by: Allan McRae <allan@archlinux.org>
2011-08-29pacman-key: rework importing distro/repo provided keyringsAllan McRae2-74/+77
The current --reload option, apart from being non-clear in its naming, is very limited in that only one keyring can be provided. A distribution may want to provide multiple keyrings for various subsets of its organisation or custom repo providers may also want to provide a keyring. This patch adds a --populate option that reads keyrings from (by default) /usr/share/pacman/keyrings. A keyring is named foo.gpg, with optional foo-revoked file providing a list of revoked key ids. These files are required to be signed (detached) by a key trusted by pacman-key, in practice probably by the key that signed the package providing these files. The --populate flag either updates the pacman keyring using all keyrings in the directory or individual keyrings can be specified. Signed-off-by: Allan McRae <allan@archlinux.org>
2011-08-25Add new 'lt' and 'zh_TW' translations from transifexDan McGee3-0/+2086
Signed-off-by: Dan McGee <dan@archlinux.org>
2011-08-25Update existing translations from TransifexDan McGee25-107/+239
Signed-off-by: Dan McGee <dan@archlinux.org>
2011-08-19makepkg: quote re-evaluation of simple varsDave Reisner1-6/+6
This is a safety measure to prevent simple code injection. $ i="foo bar" $ eval i="$i" bash: bar: command not found $ eval i=\"$i\" $ echo "|$i|" |foo bar| Signed-off-by: Dave Reisner <dreisner@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
2011-08-18makepkg: deal with variable substitution when checking sanityAllan McRae1-0/+3
If any of pkgver, pkgrel or epoch contained a variable substitution, then it needed to be evaluated before checking its value conformed to the rules. [Dan: add quotes around RHS] Signed-off-by: Allan McRae <allan@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
2011-08-18Add makepkg -S which is an alias to makepkg --sourceSebastien Luttringer1-3/+3
makepkg --source is a often used go make source package like for AUR. Have a -S shortcut will save the world. Signed-off-by: Sebastien Luttringer <seblu@seblu.net> Signed-off-by: Dan McGee <dan@archlinux.org>
2011-08-18Fix trailing whitespace in whole codebaseDan McGee1-3/+3
Signed-off-by: Dan McGee <dan@archlinux.org>
2011-08-16repo-add: fix creation of signature symlinkAllan McRae1-1/+1
When creating a repo outside the current directory, the signature symlink was not created. Reported-by: Gaetan Bisson <bisson@archlinux.org> Signed-off-by: Allan McRae <allan@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
2011-08-15Update message catalogsDan McGee1-3/+6
Signed-off-by: Dan McGee <dan@archlinux.org>
2011-08-15Update translations from TransifexDan McGee6-494/+621
Signed-off-by: Dan McGee <dan@archlinux.org>
2011-08-15repo-add: reorganize output messages for clarityDan McGee1-17/+17
The use of warning once we had already started adding a package was confusing as it broke the standard indent pattern. It was especially bad if adding multiple packages as it wasn't clear what sub-messages applied to which package being added. This should be an output change only from: ==> Adding package '/tmp/sync/netcfg-2.6.7-1-any.pkg.tar.xz' -> Computing checksums... -> Adding package signature... ==> WARNING: An entry for 'netcfg-2.6.7-1' already existed -> Removing existing entry 'netcfg-2.6.7-1'... -> Creating 'desc' db entry... -> Creating 'depends' db entry... to: ==> Adding package '/tmp/sync/netcfg-2.6.7-1-any.pkg.tar.xz' ==> WARNING: An entry for 'netcfg-2.6.7-1' already existed -> Computing checksums... -> Adding package signature... -> Removing existing entry 'netcfg-2.6.7-1'... -> Creating 'desc' db entry... -> Creating 'depends' db entry... Signed-off-by: Dan McGee <dan@archlinux.org>
2011-08-15build-sys: always use $(RM) instead of rm -fDave Reisner1-3/+3
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>
2011-08-15dist: preserve symlinks on installationDave Reisner1-3/+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>
2011-08-15repo-add: indicate whether package signature is foundAllan McRae1-0/+1
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>
2011-08-15makepkg: don't hardcode path to stripDave Reisner1-3/+3
Signed-off-by: Dave Reisner <dreisner@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
2011-08-11scripts/pkgdelta: fix `make distcheck`Dan McGee1-1/+3
--help and --version are required by the sanity checks performed by `make distcheck`. Signed-off-by: Dan McGee <dan@archlinux.org>
2011-08-09Update string catalogs after string tweaksDan McGee26-6978/+2660
This also pulls in some early translations we had entered in Transifex in the last day so those would not be lost. The diffstat is huge and not very telling as usual, as all sorts of fuzzyness switches happened this time around for some reason. Signed-off-by: Dan McGee <dan@archlinux.org>
2011-08-09Update several translation stringsDan McGee3-16/+16
* Fix typos/capitalization * Make sure large blocks of text are translated in one unit Signed-off-by: Dan McGee <dan@archlinux.org>
2011-08-09Update all translation filesDan McGee26-3582/+7927
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>
2011-08-09Merge branch 'maint'Dan McGee1-1/+1
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
2011-08-08makepkg: ignore epoch when undeclaredDave Reisner1-1/+1
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>
2011-08-02pacman-key: follow gpg options for listing keysAllan McRae1-8/+13
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>
2011-07-28scripts/pkgdelta: exit properly on missing argsDave Reisner1-2/+1
Removes usage of 'nounset' which, when combined with 'errexit' can cause undesirable early exits. Signed-off-by: Dave Reisner <dreisner@archlinux.org>
2011-07-28scripts/repo-add: show usage when no DB file specifiedDave Reisner1-1/+5
Signed-off-by: Dave Reisner <dreisner@archlinux.org>
2011-07-27pacman-key: Add --import and --import-trustdbPang Yan Han1-3/+40
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>
2011-07-27pacman-key: change GPG_PACMAN and GPG_NOKEYRING to arraysDJ Mills1-24/+24
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>
2011-07-27pacman-key: fix syntax error in -r arg parsingAllan McRae1-1/+1
Previous fix did not work... Signed-off-by: Allan McRae <allan@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
2011-07-27makepkg: refactor checking source integrityAllan McRae1-24/+17
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>
2011-07-27makepkg: more control of skipping integrity checksAllan McRae1-13/+31
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>
2011-07-27makepkg: Add support for verifying pgp signaturesWieland Hoffmann1-2/+93
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>
2011-07-27makepkg: get package version with overridesAllan McRae1-18/+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>
2011-07-27makepkg: allow epoch to be overriddenAllan McRae1-7/+10
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>
2011-07-27makepkg: check arch overrides for required architectureAllan McRae1-0/+15
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>
2011-07-27makepkg: check overrides for pkgrel and pkgverAllan McRae1-8/+14
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>
2011-07-27makepkg: pkgver and pkgrel can not have whitespaceAllan McRae1-4/+6
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>
2011-07-21pacman-key: refactor post parse opt check into a caseDave Reisner1-12/+11
This is a cleaner expression of the same information. Signed-off-by: Dave Reisner <dreisner@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
2011-07-21pacman-key: s/UPDATEBD/UPDATEDB/Dave Reisner1-1/+1
Signed-off-by: Dave Reisner <dreisner@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
2011-07-21pacman-key: fix syntax error in -r arg parsingDave Reisner1-1/+1
Signed-off-by: Dave Reisner <dreisner@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
2011-07-21pacman-key: return $ret, not errorsDave Reisner1-1/+1
fixes: /usr/bin/pacman-key: line 286: return: errors: numeric argument required Signed-off-by: Dave Reisner <dreisner@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
2011-07-19pacman-key: --init: correct creation of gpg.confPang Yan Han1-1/+1
Signed-off-by: Pang Yan Han <pangyanhan@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
2011-07-19pacman-key: correct spelling mistakePang Yan Han1-1/+1
Signed-off-by: Pang Yan Han <pangyanhan@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
2011-07-19pacman-key: add dependency on parse_options to MakefileAllan McRae1-1/+2
Signed-off-by: Allan McRae <allan@archlinux.org>
2011-07-19pacman-key: check required permissions on keyringAllan McRae1-0/+20
Makes sure that the pacman keyring is readable and that the user has permissions to create a lock file if lock-never is not specified in the gpg.conf file. Signed-off-by: Allan McRae <allan@archlinux.org>
2011-07-19pacman-key: add --init optionAllan McRae1-8/+26
Add an --init option that ensures that the pacman keyring has all the necessary files and they have the correct permissions for being read as a user. Signed-off-by: Allan McRae <allan@archlinux.org>
2011-07-19pacman-key: tidy up logic for finding pacman keyring directoryDave Reisner1-5/+3
Signed-off-by: Allan McRae <allan@archlinux.org>