Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/scripts
AgeCommit message (Collapse)Author
2011-07-27pacman-key: Add --import and --import-trustdbPang Yan Han
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 Mills
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 McRae
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 McRae
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 McRae
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 Hoffmann
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 McRae
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 McRae
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 McRae
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 McRae
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 McRae
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 Reisner
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 Reisner
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 Reisner
Signed-off-by: Dave Reisner <dreisner@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
2011-07-21pacman-key: return $ret, not errorsDave Reisner
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 Han
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 Han
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 McRae
Signed-off-by: Allan McRae <allan@archlinux.org>
2011-07-19pacman-key: check required permissions on keyringAllan McRae
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 McRae
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 Reisner
Signed-off-by: Allan McRae <allan@archlinux.org>
2011-07-19pacman-key: refactor get_fromDave Reisner
This function had a variety of pitfalls, including the inability to successfully find a key=value pair where no whitespace surrounded the equals sign. Make it more robust by splitting the line on the equals itself, and performing whitespace trimming on the resulting key/value pair. Signed-off-by: Dave Reisner <dreisner@archlinux.org> Signed-off-by: Allan McRae <allan@archlinux.org>
2011-07-19pacman-key: add --verify optionAllan McRae
Signed-off-by: Allan McRae <allan@archlinux.org>
2011-07-19pacman-key: check only a single operation has been specifiedAllan McRae
Follow the example of gpg and only allow a single operation to be specified each time. Prevents having to deal with conflicting variable names and potential issues due to the order in which the operations are run. Signed-off-by: Allan McRae <allan@archlinux.org>
2011-07-19pacman-key: move verifying keyring files to own functionAllan McRae
Also check all files before bailing on errors. Signed-off-by: Allan McRae <allan@archlinux.org>
2011-07-19pacman-key: move --edit-key and --receive processing to functionsAllan McRae
This moves the processing of the --edit-key and --receive options to functions, keeping the final option processing to be all single line statements. Also rework the --edit-key option to validate all input before processing. Signed-off-by: Allan McRae <allan@archlinux.org>
2011-07-19pacman-key: hide output of executed commands on logic checksIvan Kanakarakis
This commit correctly redirects to /dev/null the output of several commands that get executed on logic checks. Original-patch-by: Denis A. Altoé Falqueto <denisfalqueto@gmail.com> Signed-off-by: Ivan Kanakarakis <ivan.kanak@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
2011-07-19pacman-key: rename --trust to --edit-keyAllan McRae
This keeps the naming of the option more consistent with what is actually being called by gpg. Original-patch-by: Denis A. Altoé Falqueto <denisfalqueto@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
2011-07-19pacman-key: fix quotation on several variable assignmentsIvan Kanakarakis
This commit adds quotes to several variable assignments. Unquoted values can cause problems on several occasions if the value is empty. It is safer to have every assignment quoted. Signed-off-by: Ivan Kanakarakis <ivan.kanak@gmail.com>
2011-07-19pacman-key: allow the export of all key idsAllan McRae
The gpg --export will exprt all keys if none are specified. Replicate this behavior in pacman-key. Signed-off-by: Allan McRae <allan@archlinux.org>
2011-07-19pacman-key: rename --del to --deleteAllan McRae
There is already the short -d alias provided, so stay verbose with the longer option name. Signed-off-by: Allan McRae <allan@archlinux.org>
2011-07-19pacman-key: remove the --adv optionAllan McRae
The conversion to using parse_options causes this option to break. It is preferable to remove the option rather than fix it as it is simply a wrapper for "gpg --homedir @sysconfdir@/pacman.d/gnupg". Any user using more advanced keyring management than provided by pacman-key can manage to point gpg at the right place themselves... How to manually edit the keyring with gpg will instead be documented in the man page in a later commit. Signed-off-by: Allan McRae <allan@archlinux.org>
2011-07-19pacman-key: use our option parserAllan McRae
The pacman-key script is complicated enough to warrent usage of the parse_options script. This is especially helpful in dealing with all the configuration file override flags as the no longer need to be specified first. It also allows us to do the right thing early with --help/--version and no option cases cleanly. This change also makde the check for root privileges only occur on operations where they are needed. This patch is inspired by and supercedes some patches submitted by Denis A. Altoé Falqueto and Ivan Kanakarakis who were altering the previous option handling in an attempt to deal with the above issues. Signed-off-by: Allan McRae <allan@archlinux.org>
2011-07-18Merge branch 'maint'Dan McGee
2011-07-18makepkg: fix issue with filenames with spaces and noextractAllan McRae
Specifying a filename with spaces in a PKGBUILDs noextract array fails due to a lack of quoting. Fixes FS#25100. Reported-by: Thomas Weißschuh <thomas_weissschuh@lavabit.com> Signed-off-by: Allan McRae <allan@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
2011-07-18repo-add: do not print full path of signature fileAllan McRae
The full path to the signature file when it is created is in a temporary directory so only print the filename. Signed-off-by: Allan McRae <allan@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
2011-07-18repo-add: always remove repo signature symlinkAllan McRae
This prevents a dangling symlink being left behind if the repo goes from being signed to unsigned. Signed-off-by: Allan McRae <allan@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
2011-07-18makepkg: only test for writable PKGDEST when needed.Rogutės Sparnuotos
There is no need for a writable PKGDEST when using the --nobuild or --geninteg flags. Allan: added --geninteg Signed-off-by: Allan McRae <allan@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
2011-07-18Move some .gitignore entriesAllan McRae
Put a .gitignore entry at the right level and sort that file alphabetically. Signed-off-by: Allan McRae <allan@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
2011-07-14makepkg: remove unused -C option from option listDave Reisner
We nuke it from the completion file as well along with its longopt. Signed-off-by: Dave Reisner <dreisner@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
2011-07-14makepkg: skip devel_check when reading from a pipeDave Reisner
Signed-off-by: Dave Reisner <dreisner@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
2011-07-14makepkg: Remove pre-optimization from in_array()DJ Mills
The '[[ -z' test in in_array() is redundant, so remove it. Signed-off-by: DJ Mills <danielmills1@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
2011-07-14makepkg: Remove OPT_TEMP hack in parse_options callDJ Mills
Instead of hacking around the error trap, simply do an explicit test for failure. Signed-off-by: DJ Mills <danielmills1@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
2011-07-14Add 'compress' compression format as an available optionDan McGee
This adds the '.tar.Z' option to both repo-add and makepkg for no other reason than "why not", and because bsdtar supports it natively with the '-Z' flag. Also update the documentation accordingly. Signed-off-by: Dan McGee <dan@archlinux.org>
2011-07-05repo-add: backup old database signature tooAllan McRae
If you are keeping a copy of the old database, you probably want to keep a copy of its signature too. Also, delete the previously backed-up database signature if no new one is being copied. Signed-off-by: Allan McRae <allan@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
2011-07-05pacman-key: fix syntax highlightingAllan McRae
The lone quotation mark in "pacman's" causes issues for some syntax highlighting. Change the printing of the nessage from echo to printf so we can invisibly escape it. Signed-off-by: Allan McRae <allan@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
2011-07-05Add library files to POTFILES.inAllan McRae
Signed-off-by: Allan McRae <allan@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
2011-07-05parse_options: accept multiple argumentsAllan McRae
Allow command-line options to accept multiple arguments without additional quoting by taking the list of arguments until one starting with a "-" is reached. The only current use of this is the --pkg option in makepkg. This allows (e.g.) makepkg --pkg foo bar and packages "foo" and "bar" will be built. Signed-off-by: Allan McRae <allan@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
2011-07-05parse_options: implement optional argumentsAllan McRae
This allows options specified with a trailing "::" to optionally take arguments. Signed-off-by: Allan McRae <allan@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
2011-07-05parse_options: add missing newlinesAllan McRae
Signed-off-by: Allan McRae <allan@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>