summaryrefslogtreecommitdiff
path: root/scripts
AgeCommit message (Collapse)Author
2011-06-09Fix bracket type in makefileAllan McRae
Signed-off-by: Allan McRae <allan@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
2011-06-08Fix name of original files in scriptsAllan McRae
Our scripts all currently say: Generated from foo.in; do not edit by hand. Fix this to say foo.sh.in, which is the actual original file name. Signed-off-by: Allan McRae <allan@archlinux.org>
2011-06-08pacman-key: add vim modeline and fix whitespace issuesAllan McRae
Signed-off-by: Allan McRae <allan@archlinux.org>
2011-06-08pkgdelta: add vim modelineAllan McRae
Signed-off-by: Allan McRae <allan@archlinux.org>
2011-06-07Merge branch 'maint'Dan McGee
Conflicts: lib/libalpm/add.c
2011-06-07pacman-key: update copyrightAllan McRae
Signed-off-by: Allan McRae <allan@archlinux.org>
2011-06-07makepkg: fix creation of source package with -pAllan McRae
When creating a source package using an non-local buildscript via the -p option, the inclusion of changelog and install files would fail. Fixes FS#24567. Signed-off-by: Allan McRae <allan@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
2011-06-02Merge branch 'maint'Dan McGee
Conflicts: src/pacman/callback.c
2011-06-02repo-add: anchor exclusion pattern when generating filelistDan McGee
Fixes FS#24534. Dotfiles, such as /etc/skel/.bash_profile, were not being included in generated files entries. bsdtar --exclude option supports anchors on the pattern, so using "^.*" instead of ".*" solves our problem and still excludes all root-level dotfiles (e.g. .PKGINFO). Signed-off-by: Dan McGee <dan@archlinux.org>
2011-06-01pacman-key: print default gpgdir in usagePang Yan Han
Signed-off-by: Pang Yan Han <pangyanhan@gmail.com> Signed-off-by: Dan McGee <dan@archlinux.org>
2011-05-04Merge branch 'maint'Dan McGee
2011-05-02makepkg: quote variable that may contain spacesAllan McRae
Prevents failures when $PKGDEST contains spaces (FS#24002) Patch-by: Sebastien Duthil Signed-off-by: Allan McRae <allan@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
2011-04-24repo-add: update copyright messageAllan McRae
Signed-off-by: Allan McRae <allan@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
2011-04-24repo-add: check for gpg earlyAllan McRae
Check for the presence of gpg as soon as we know we need it. Signed-off-by: Allan McRae <allan@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
2011-04-24repo-add: check for valid key when signing is requestedAllan McRae
Follow the example of makepkg Signed-off-by: Allan McRae <allan@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
2011-04-24repo-add: add option to specify a different key to sign withDenis A. Altoé Falqueto
Add -k/--key option to specify a non-default key for signing a package database. Original-patch-by: Denis A. Altoé Falqueto <denisfalqueto@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
2011-04-24repo-add: simplify usage messageAllan McRae
Listing every option on the usage line becomes unweildly as more options get added so simplify it. Also, provide a standard package name in the repo-add example. Dan: just use 'options' as we use elsewhere, not 'option(s)'. Signed-off-by: Allan McRae <allan@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
2011-04-21pacman-key: improved reading of the configuration fileIvan Kanakarakis
This commit replaces the find_config() function with the get_from() function. get_from expects two arguments, the first is the file to read and the second is the key to look for in the given file. get_from returns the first matching value for the given key. The file is expected to be in the format: key = value Each of 'key' 'equal sign' 'value' can be surrounded be random whitespace. Signed-off-by: Ivan Kanakarakis <ivan.kanak@gmail.com> Signed-off-by: Dan McGee <dan@archlinux.org>
2011-04-21pacman-key: display the unsupported command to the userIvan Kanakarakis
If the user provides an unsupported command, inform the user that this switch is unknown, display usage and exit. Signed-off-by: Ivan Kanakarakis <ivan.kanak@gmail.com> Signed-off-by: Dan McGee <dan@archlinux.org>
2011-04-21makepkg, pacman-key: unify help message with other scriptsIvan Kanakarakis
The help message changed to match the one rankmirrors script has. It's clearer as to what the --help switch does. Signed-off-by: Ivan Kanakarakis <ivan.kanak@gmail.com> Signed-off-by: Dan McGee <dan@archlinux.org>
2011-04-20Add configure option to specify package signing keyAllan McRae
Add the "GPGKEY" option to makepkg.conf for specifying signing packages with the non-default key from the keyring. Is overridded by makepkg's --key option. Signed-off-by: Allan McRae <allan@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
2011-04-15Merge branch 'maint'Dan McGee
Conflicts: lib/libalpm/alpm.h lib/libalpm/trans.c Signed-off-by: Dan McGee <dan@archlinux.org>
2011-04-13makepkg.sh.in: fix a GNU-ism in su invocationRémy Oudompheng
GNU su supports the -c option to specify a command to execute. However, other flavours of su may have a different interpretation of the '-c' flag (e.g. FreeBSD and OpenBSD). The behaviour is correct when '-c' follows an explicit username. 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>
2011-04-05Merge branch 'maint'Dan McGee
Conflicts: lib/libalpm/be_sync.c lib/libalpm/db.c src/pacman/util.c
2011-04-04makepkg: fix a GNU-ism in awk usageRémy Oudompheng
A non-GNU version of awk may not support the (|...) syntax for an optional group and require '()' to match an empty string. The (...)? syntax is more appropriate for this usage. 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>
2011-04-04makepkg: improve parsing for sanity checksAllan McRae
Trailing backslahses can lead to additional spaces at the front of extracted entries. See FS#23524. Strip these while parsing the PKGBUILD entries. Signed-off-by: Allan McRae <allan@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
2011-03-30makepkg: remove unnecessary tr usageAllan McRae
The use of "tr" only leads to trouble. Remove unnecessary usage of it from within makepkg. Signed-off-by: Allan McRae <allan@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
2011-03-30makepkg: avoid usage of tr to sidestep locale issuesDave Reisner
to quote dan: "turkish will FUCK YOU UP. this is not the first or the last time" Signed-off-by: Dave Reisner <d@falconindy.com> Signed-off-by: Allan McRae <allan@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
2011-03-28makepkg: command line options for signing packagesDenis A. Altoé Falqueto
Three new command line options were added: --sign: forces the generation of a signature for the resulting package, taking precedence over the value in makepkg.conf --nosign: do not sign the resulting package --key <key>: use a different key than the user's default for signing the package. A check is performed to ensure the user has (provided) a valid gpg key for signing. Signed-off-by: Allan McRae <allan@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
2011-03-27Create pacman keyring directory if missingRay Kohler
Use mode 755, so non-root users can see inside. Add "--no-permission-warning" to GPG_PACMAN to suppress the noise that otherwise comes of not using mode 700 - this is not private data. GPGme turns out not to issue this warning itself, so no problem there. TODO: should non-root users be allowed to use the read-only operations (--list, --export, --finger)? Signed-off-by: Ray Kohler <ataraxia937@gmail.com> Signed-off-by: Dan McGee <dan@archlinux.org>
2011-03-27Clean up repo-add usage messageRay Kohler
This now includes -s and -v, tailors itself to the current command, and is formatted more like that of other pacman commands. Signed-off-by: Ray Kohler <ataraxia937@gmail.com> Signed-off-by: Dan McGee <dan@archlinux.org>
2011-03-27Merge branch 'maint'Dan McGee
Conflicts: lib/libalpm/deps.c
2011-03-27Sign database even if emptyRay Kohler
Move the create_signature() call outside the case of non-empty databases, so it will be called regardless. Signed-off-by: Ray Kohler <ataraxia937@gmail.com> Signed-off-by: Dan McGee <dan@archlinux.org>
2011-03-27makepkg: allow PKGEXT and SRCEXT to be overridden by env variablesRay Kohler
Signed-off-by: Ray Kohler <ataraxia937@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
2011-03-27Rely on the return value of type instead of its outputDave Reisner
Signed-off-by: Dave Reisner <d@falconindy.com> Signed-off-by: Dan McGee <dan@archlinux.org>
2011-03-27Clarify error message in pacman-db-upgradeDan McGee
Addresses FS#23451. Signed-off-by: Dan McGee <dan@archlinux.org>
2011-03-24Merge branch 'maint'Dan McGee
2011-03-24Make log redirection sanerJan Steffens
My main motivation was to remove the "sync", which can stall for minutes on a busy machine (FS#23378). I also cleaned up the redirection. Signed-off-by: Jan Steffens <jan.steffens@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
2011-03-24Fix use of relative paths for packages in repo-addRay Kohler
Move checksum and pgpsig calcluation before changing into the tmpdir, otherwise we can't find the files if a relative path was used. Signed-off-by: Ray Kohler <ataraxia937@gmail.com> Signed-off-by: Dan McGee <dan@archlinux.org>
2011-03-23Merge branch 'gpg-build-tools'Dan McGee
2011-03-23repo-add: add sha256sum values to repo databaseDan McGee
Implements FS#23103. Also modify libalpm so it ignores this value without any warning as we know it is likely to exist. Signed-off-by: Dan McGee <dan@archlinux.org>
2011-03-23pacman-key help, round threeDan McGee
Make it actually like all our other tools rather than some homegrown format. Also make it translator friendly by not wrapping messages across lines in different strings. Signed-off-by: Dan McGee <dan@archlinux.org>
2011-03-23pacman-key: improve usage outputAllan McRae
Make the usage output display nicely on 80 character width terminals. Also fix parsing of "-h" and "-v" options and avoid root check when run with no commands. Signed-off-by: Allan McRae <allan@archlinux.org>
2011-03-23pacman-key: remake of --reload commandDenis A. Altoé Falqueto
The --reload command was refactored to allow a more flexible management. There are two sets of keys that will be added, one that will be removed and one that will be kept. The set of keys to be kept are configured in pacman.conf, with the option HoldKeys, with the same meaning of HoldPkgs. It can be repeated and several values can be put in the same entry. The new behavior allows a key to be marked for removal, but the user can decide if that key must be kept. For example, if a developer has a public repository, signed with his own key, that key must be added to the HoldKeys option. If the key is marked for removal from pacman's keyring, it will not be removed for the users that have configured HoldKeys correctly. There are other minor fixes, mainly in the handling of --add command when there is no aditional parameter. In that case, pacman-key will behave just like gpg, adding the contents of stdin into pacman's keyring. Signed-off-by: Denis A. Altoé Falqueto <denisfalqueto@gmail.com>
2011-03-23pacman-key: keyring management toolDenis A. Altoé Falqueto
The script pacman-key will manage pacman's keyring. It imports, exports, fetches from keyservers, helps in the process of trusting and updates the trust database. Signed-off-by: Denis A. Altoé Falqueto <denisfalqueto@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
2011-03-23repo-add: add symlink to signature fileAllan McRae
Signed-off-by: Allan McRae <allan@archlinux.org>
2011-03-23repo-add: Fix up usage with GPG optionsDan McGee
Signed-off-by: Dan McGee <dan@archlinux.org>
2011-03-23repo-add: add -v/--verify optionDan McGee
This is intended to verify an existing signature on a database before making further changes to it and performing updates. Rarely would you use this without immediately resigning it via the -s/--sign option. Instead, it is intended as a "chain of trust" operation where the previous signature is verified to give you some sense that what you sign off on is also safe. Still todo: don't make changes unless the signature is not only good, but also in the accepted list of keys. Signed-off-by: Dan McGee <dan@archlinux.org>
2011-03-23repo-add: allow signing of the package databaseDan McGee
In order to be fully secure, we can't only sign packages. We also need to sign our repository metadata to prevent database falsification, dependency injection, etc. Add an '-s/--sign' option that allows this functionality, and will generate a .sig file side-by-side with the package database. While at it, fix the issue where a signature file would never be found because of 'cd' madness (this needs fixing in another commit). Signed-off-by: Dan McGee <dan@archlinux.org>
2011-03-23Add PGPSIG field in repo-addGeoffroy Carrier
Use base64 encoding to store the value in the database if a .sig file exists for the package being added. Signed-off-by: Geoffroy Carrier <geoffroy.carrier@koon.fr> Signed-off-by: Dan McGee <dan@archlinux.org>