summaryrefslogtreecommitdiff
path: root/scripts
Commit message (Collapse)AuthorAge
* pacman-key: allow the export of all key idsAllan McRae2011-07-19
| | | | | | | 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>
* pacman-key: rename --del to --deleteAllan McRae2011-07-19
| | | | | | | There is already the short -d alias provided, so stay verbose with the longer option name. Signed-off-by: Allan McRae <allan@archlinux.org>
* pacman-key: remove the --adv optionAllan McRae2011-07-19
| | | | | | | | | | | | | 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>
* pacman-key: use our option parserAllan McRae2011-07-19
| | | | | | | | | | | | | | | | 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>
* Merge branch 'maint'Dan McGee2011-07-18
|\
| * makepkg: fix issue with filenames with spaces and noextractAllan McRae2011-07-18
| | | | | | | | | | | | | | | | | | | | | | 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>
* | repo-add: do not print full path of signature fileAllan McRae2011-07-18
| | | | | | | | | | | | | | | | 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>
* | repo-add: always remove repo signature symlinkAllan McRae2011-07-18
| | | | | | | | | | | | | | | | 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>
* | makepkg: only test for writable PKGDEST when needed.Rogutės Sparnuotos2011-07-18
| | | | | | | | | | | | | | | | | | 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>
* | Move some .gitignore entriesAllan McRae2011-07-18
| | | | | | | | | | | | | | | | 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>
* | makepkg: remove unused -C option from option listDave Reisner2011-07-14
| | | | | | | | | | | | | | 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>
* | makepkg: skip devel_check when reading from a pipeDave Reisner2011-07-14
| | | | | | | | | | Signed-off-by: Dave Reisner <dreisner@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
* | makepkg: Remove pre-optimization from in_array()DJ Mills2011-07-14
| | | | | | | | | | | | | | 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>
* | makepkg: Remove OPT_TEMP hack in parse_options callDJ Mills2011-07-14
| | | | | | | | | | | | | | | | 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>
* | Add 'compress' compression format as an available optionDan McGee2011-07-14
| | | | | | | | | | | | | | | | 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>
* | repo-add: backup old database signature tooAllan McRae2011-07-05
| | | | | | | | | | | | | | | | | | 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>
* | pacman-key: fix syntax highlightingAllan McRae2011-07-05
| | | | | | | | | | | | | | | | | | 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>
* | Add library files to POTFILES.inAllan McRae2011-07-05
| | | | | | | | | | Signed-off-by: Allan McRae <allan@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
* | parse_options: accept multiple argumentsAllan McRae2011-07-05
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | parse_options: implement optional argumentsAllan McRae2011-07-05
| | | | | | | | | | | | | | | | 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>
* | parse_options: add missing newlinesAllan McRae2011-07-05
| | | | | | | | | | Signed-off-by: Allan McRae <allan@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
* | fix vim syntax highlighting of .sh filesFlorian Pritz2011-06-30
| | | | | | | | | | | | | | | | | | | | vim recognises what type of shell script it's dealing with by looking at the shebang. If detection fails it falls back to sh which doesn't support some bash features. Adding a normal, possibly broken, shebang which gets fixed by the Makefile allows vim to detect bash syntax. Signed-off-by: Florian Pritz <bluewind@xinu.at> Signed-off-by: Dan McGee <dan@archlinux.org>
* | Merge remote-tracking branch 'dave/makepkg'Dan McGee2011-06-30
|\ \
| * | makepkg: simplify SIGNPKG checkDave Reisner2011-06-28
| | | | | | | | | | | | Signed-off-by: Dave Reisner <d@falconindy.com>
| * | makepkg: fix vim syntax highlightingDave Reisner2011-06-28
| | | | | | | | | | | | Signed-off-by: Dave Reisner <d@falconindy.com>
| * | makepkg: remove unneeded echoDave Reisner2011-06-28
| | | | | | | | | | | | Signed-off-by: Dave Reisner <d@falconindy.com>
* | | repo-add.sh.in: avoid being clever with repo repackingDave Reisner2011-06-30
| | | | | | | | | | | | | | | | | | | | | | | | | | | Revert to the old behavior that 6f5a90 attempted to simplify and go with the original proposed solution of using "ugly" bash to detect empty directories. Signed-off-by: Dave Reisner <dreisner@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
* | | repo-add: fix db creation one last timeDan McGee2011-06-30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We fubar-ed this pretty good. 1. The whole old/new move shuffle was totally busted if you used a relative path to your database, as we would just build the database in place. 2. Our prior temp directory layout had the database files extracted directly into it. When we tried to create a xxx.db.tar.gz file in this same directory, due to the fact that we were no longer using a shell wildcard, we tried to include the db in ourself, which is a big failure. Fix all this by extracting to tree/ so we can have a clean top-level temp directory. 3. Fix the inclusion of the './' directory entry; ensure the regex prunes both leading paths of '.' as well as './'. Where is that test suite again? Signed-off-by: Dan McGee <dan@archlinux.org>
* | | makepkg: only source user override if using default config fileDan McGee2011-06-30
| | | | | | | | | | | | | | | | | | | | | Otherwise there is no way to easily test or run with a standalone config file without outside interference. Signed-off-by: Dan McGee <dan@archlinux.org>
* | | makepkg: fix typo (missing quotes)Rémy Oudompheng2011-06-30
| | | | | | | | | | | | | | | | | | Signed-off-by: Rémy Oudompheng <remy@archlinux.org> Signed-off-by: Allan McRae <allan@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
* | | makepkg: fix removing symbolic linkAllan McRae2011-06-30
|/ / | | | | | | | | | | | | | | | | 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>
* | Revert "Merge branch 'master' of git://projects.archlinux.org/pacman"Dan McGee2011-06-27
| | | | | | | | | | | | | | This reverts the merge of 2d32a9a3a348d25d6d0f3d12752399bf7fdf6570, which reverts the commit 8581694ceb63f4ed2854206b38574599c3d9df28. Thanks Dave for the dirty branch and non-clean rebase! :) Dave broke it.
* | repo-add: remove extra exit callDan McGee2011-06-27
| | | | | | | | Signed-off-by: Dan McGee <dan@archlinux.org>
* | pacman-optimize: use output libraryDan McGee2011-06-27
| | | | | | | | | | | | | | | | We already use msg() and error() in here, might as well just use the standard functions. In addition, fix one translated message that would have printed ERROR twice if anyone ever saw it. Signed-off-by: Dan McGee <dan@archlinux.org>
* | Merge remote-tracking branch 'dave/repo-add'Dan McGee2011-06-27
|\ \
| * | repo-add: add new command, repo-elephantDave Reisner2011-06-27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | _ _ / \__/ \_____ / / \ \ `\ ) \''/ ( |\ `\__)/__/'_\ / ` //_|_|~|_|_| ^""'"' ""'"' Signed-off-by: Dave Reisner <d@falconindy.com>
| * | repo-add: enforce file extensionsDave Reisner2011-06-27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Allow one of 4 archive extensions: .tar{,.gz,.xz,.bz2} for each of the 2 valid repo extensions: .db and .files. Check for this via 'verify_repo_extension' directly after option parsing to assert that this extension is present, and again after files have been added to get the proper archive option for bsdtar. Signed-off-by: Dave Reisner <d@falconindy.com>
| * | repo-add: move command invocation out of arg parsing loopDave Reisner2011-06-27
| | | | | | | | | | | | Signed-off-by: Dave Reisner <d@falconindy.com>
| * | repo-add: refactor repacking of repo fileDave Reisner2011-06-27
| | | | | | | | | | | | | | | | | | | | | Dump the whole conditional and filter the contents of the directory to create an empty or non-empty archive. Signed-off-by: Dave Reisner <d@falconindy.com>
| * | repo-add: use format_entry for all desc/depends fieldsDave Reisner2011-06-24
| | | | | | | | | | | | | | | | | | | | | This ranks high on the code readability scale. The same function formats all of our data and writes to the metadata file at once. Signed-off-by: Dave Reisner <d@falconindy.com>
| * | repo-add: store multi-value fields as arraysDave Reisner2011-06-24
| | | | | | | | | | | | | | | | | | | | | | | | Fields like groups and depends should be stored as arrays. This requires rewriting our write_list_entry function to accomodate our new data type. This new function will not write to a file, but rather only format it. Signed-off-by: Dave Reisner <d@falconindy.com>
| * | repo-add: bashify reading of .PKGINFO fileDave Reisner2011-06-24
| | | | | | | | | | | | | | | | | | | | | | | | | | | grep and sed aren't needed here, and this removes the truly ugly manipulation of IFS. The process substituion could just as well be a herestring, but it breaks vim's syntax highlighting. Style over substance, mang. Signed-off-by: Dave Reisner <d@falconindy.com>
| * | Merge branch 'master' of git://projects.archlinux.org/pacmanDave Reisner2011-06-24
| |\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 'master' of git://projects.archlinux.org/pacman: pactree: carry a list of databases for dep resolution makepkg: Remove a lone quotation mark makepkg: remove the cleancache option Don't require a transaction for sync DB updates Move locking functions to handle Add a 'valid' flag to the database object Move database 'version' check to registration time Do database signature checking at load time
| * | | makepkg: fix incorrect parenthesis in gettext callDave Reisner2011-06-24
| | | | | | | | | | | | | | | | | | | | | | | | allan broke it in 4bdb868a. Signed-off-by: Dave Reisner <d@falconindy.com>
* | | | Remove -f option from ln for POSIX complianceEric Bélanger2011-06-27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fixes FS#24893. 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>
* | | | makepkg: Add warning if VCS tool is not present when determining latest VCS ↵Eric Bélanger2011-06-27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | revision 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>
* | | | makepkg: Move check for sudo into check_software functionEric Bélanger2011-06-27
| |/ / |/| | | | | | | | | | | | | | 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>
* | | makepkg: Remove a lone quotation markWieland Hoffmann2011-06-24
| | | | | | | | | | | | | | | | | | | | | Allan broke it in 4bdb868. Signed-off-by: Allan McRae <allan@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
* | | makepkg: remove the cleancache optionAllan McRae2011-06-24
|/ / | | | | | | | | | | | | | | | | This is a fairly useless feature given all it does is an "rm" on a directory. It is also unlikely that you would want to remove the entire SRCDEST anyway, but rather just the old files. Signed-off-by: Allan McRae <allan@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
* | makepkg: clean-up of output messagesAllan McRae2011-06-24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There was a lot of inconsistency in how strings that should not be translated (program names, option flags, PKGBUILD directives, etc) were handled. This patch moves them all outside the gettext invocation for consistency and to prevent accidental translation. Note that some of these may need reverted if they cause difficulties in translation due to gettext usage in bash not taking positional parameters for arguments. A quick survey of current translations indicates that this issue will be rare. Also, we should be able to catch these before a full string freeze given we are going to probably need a "developer preview" release before the next release series. Signed-off-by: Allan McRae <allan@archlinux.org>