Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/scripts
AgeCommit message (Collapse)Author
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>
2011-03-22makepkg: place signature symlink in build dirAllan McRae
Be consistent in package and signature placements when using PKGDEST. Signed-off-by: Allan McRae <allan@archlinux.org>
2011-03-22makepkg: allow signatures to work with split packagesDan McGee
Signed-off-by: Dan McGee <dan@archlinux.org>
2011-03-22Add GPG signature support to makepkgGeoffroy Carrier
This is a rather simple patch to add signing support to makepkg. Add a create_signature() to makepkg, add a 'sign' BUILDENV option in makepkg.conf, and document the changes in the makepkg.conf manpage. Signed-off-by: Geoffroy Carrier <geoffroy.carrier@koon.fr> Signed-off-by: Dan McGee <dan@archlinux.org>
2011-03-20makepkg: Improve optdepends extractionAllan McRae
Prevents issues where optdepends descriptions contain a bracket. Also, strip all comments from arrays before joining them. Fixes FS#23307. Signed-off-by: Allan McRae <allan@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
2011-02-28Fix some easy to find double translationsDan McGee
A lot of these were places that should have used the same message but didn't, or were very easy to convert to using the same message and letting some of the burden off of the translators. Signed-off-by: Dan McGee <dan@archlinux.org>
2011-02-11Ensure pkgbase/epoch are defined before doing anythingDan McGee
When generating integrity sums, we could get some weird output before due to epoch being uninitialized: /usr/bin/makepkg: line 234: [[: 2.6.37: syntax error: invalid arithmetic operator (error token is ".6.37") Signed-off-by: Dan McGee <dan@archlinux.org>
2011-02-06makepkg: more bash-3.2 compatibilityAllan McRae
Adding the "|| true" to the subshell prevents bash-3.2 setting off the error_trap but requires changing the if statement. Signed-off-by: Allan McRae <allan@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
2011-02-02makepkg: initialize local arrays to emptyAllan McRae
Fixes bash-3.2 compatibility. Thanks-to: Dave Reisner <d@falconindy.com> Signed-off-by: Allan McRae <allan@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
2011-02-02makepkg: error on invalid optdependsAllan McRae
Missed in commit a88cb03a. Signed-off-by: Allan McRae <allan@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
2011-02-02makepkg: make SRCPKGDEST default to $startdirCedric Staniewski
The current behaviour, which is placing source packages in PKGDEST if SRCPKGDEST is not set, is inconsistent with {SRC,PKG}DEST handling and there is no real advantage in doing so. Signed-off-by: Allan McRae <allan@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
2011-02-02makepkg: Fix the check for references to srcdir/pkgdirNezmer
At least in FreeBSD, find always returns 0 if it finds stuff (imagine that). It doesn't care about the exit status of whatever is passed to -exec. This patch makes the checks compatible with this behaviour. Using xargs and not using grep directly because packages with too many files would cause grep to complain about argument list being too long. This should also fix the false positive in packages with no files. Signed-off-by: Nezmer <git@nezmer.info> Signed-off-by: Allan McRae <allan@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
2011-02-01makepkg: fix indention to follow style guideCedric Staniewski
Signed-off-by: Dan McGee <dan@archlinux.org>
2011-01-22Merge branch 'epoch-work'Dan McGee
2011-01-22Makefile: Use git describe --dirty for GIT VERSIONXavier Chantry
dirty indicates if the repo has uncommited changes or not when building, so dont hardcode this info. Signed-off-by: Xavier Chantry <chantry.xavier@gmail.com> Signed-off-by: Dan McGee <dan@archlinux.org>
2011-01-22repo-add: only attempt to create deltas when askedAllan McRae
repo-add should only attempt to create the delta file when using the -d option. Also adjust a couple of tests to use the "double bracket" syntax. Signed-off-by: Allan McRae <allan@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
2011-01-22makepkg: encode epoch in version specifier if > 0Dan McGee
This makes things consistent with everywhere else we are incorporating the new optional epoch field. Add a helper function that forms the version string for you and use it in makepkg where I found 'pkgver.*-.*pkgrel'. This exposes a few shortcomings in a previous "Override pkgver" patch (2020e629) in the install package and check if built functions. Signed-off-by: Dan McGee <dan@archlinux.org>
2011-01-21Remove epoch as an independent fieldDan McGee
Instead, go the same route we have always taken with version-release in libalpm and treat it all as one piece of information. Makepkg is the only script that knows about epoch as a distinct value; from there on out we will parse out the components as necessary. This makes the code a lot simpler as far as epoch handling goes. The downside here is that we are tossing some compatibility to the wind; packages using force will have to be rebuilt with an incremented epoch to keep their special status. Signed-off-by: Dan McGee <dan@archlinux.org>
2011-01-14makepkg: perform all sanity checks before erroring outDan McGee
It is pretty annoying to get one, fix it, and then get another. We should be able to continue on through most of the sanity checks in one go so the user gets all the error messages at once. Also ensure $pkgbase is defined by the time we call this function; previously we printed nothing where a package name should have been due to this oversight. Signed-off-by: Dan McGee <dan@archlinux.org>
2011-01-13repo-add: fix misguided conditional correctionDan McGee
I tried to move things around here when testing and did a bit too much; the warning message always showed regardless of delta inclusion in the call. Fix it so we only warn if we have a filename, but the file couldn't be located. Signed-off-by: Dan McGee <dan@archlinux.org>
2011-01-11repo-add: Create/modify files databasesPyroPeter
Implements FS#11302. Dan: updated docs to not reference pkgfile. Signed-off-by: PyroPeter <abi1789@googlemail.com> Signed-off-by: Dan McGee <dan@archlinux.org>
2011-01-11repo-add: use pushd/popdDan McGee
Rather than explicit cd calls, we can use the directory stack to our advantage. This also removes the need to store and restore $startdir, so kill the variable entirely. Signed-off-by: Dan McGee <dan@archlinux.org>
2011-01-07Update copyright years for 2011Allan McRae
Signed-off-by: Allan McRae <allan@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
2010-12-29makepkg: add option to clear buildflagsAllan McRae
Add the "buildflags" option, which is useful in its negative form for disabling CFLAGS, CXXFLAGS and LDFLAGS when building a package. This is useful when determining of one of these flags is causing an issue with a package. Signed-off-by: Allan McRae <allan@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
2010-12-29makepkg: Add check() function for running test suitesAllan McRae
A PKGBUILD can have an option check() function for running test suites between the build() and package() stages. This function is run by default but can be disabled globally in with "!check" in BUILDENV in makepkg.conf. This setting can be controlled on an individual package basis using makepkg's --check and --nocheck flags. Addition dependencies needed for running the test suite can be specified in the checkdepends array and are only checked when running the check() function. Original-work-by: Jeff C <jeff@kcaccess.com> Signed-off-by: Allan McRae <allan@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
2010-12-29makepkg: escape closing bash array paren for awkDave Reisner
The closing parenthesis of bash arrays needs to be escaped in the ending address of awk expressions in order to play nicely with implementations of awk other than gawk. This change provides compatibility with gawk, nawk and mawk. Signed-off-by: Dave Reisner <d@falconindy.com> Signed-off-by: Allan McRae <allan@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
2010-12-29makepkg: allow pkgname usage in split package functionsAllan McRae
Currently, using $pkgname in a split package package_*() function always returns the first value in the pkgname array rather than the name of tha package being packaged. Fix this so $pkgname gives the expected value. Fixes FS#22174 Signed-off-by: Allan McRae <allan@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
2010-12-20makepkg: remove last inappropriate PKGBUILD usageAllan McRae
We should always use $BUILDSCRIPT instead of PKGBUILD. The only remaining uses of PKGBUILD in makekg are in comments. Signed-off-by: Allan McRae <allan@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
2010-12-12Update scripts/ .gitignoreDan McGee
Signed-off-by: Dan McGee <dan@archlinux.org>
2010-12-12pacman-optimize: ensure database directory contains local/Dan McGee
And also default dbpath to the one we may find in pacman.conf. Signed-off-by: Dan McGee <dan@archlinux.org>
2010-12-12Add script to update pacman database formatAllan McRae
The pacman-db-upgrade script was added to detect old pacman database formats and upgrade them. Currently performs the merging of depends files into desc files in the local database. Signed-off-by: Allan McRae <allan@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
2010-12-12makepkg: perform sanity checks on variables in package functionsAllan McRae
Check the over-ridden entries for provides, backup, optdepends and options for illegal entries. Partially fixes FS#16004. Signed-off-by: Allan McRae <allan@archlinux.org>
2010-12-12makepkg: remove dead code from handle_depsAndres P
The error message that has been removed never gets to print because, given the same condition, handle_deps throws the same error and then immediately exits makepkg. Signed-off-by: Andres P <aepd87@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
2010-12-12makepkg: do not ignore errors from pacman when checking depsAndres P
As check_deps is run in a subshell, exit had the same meaning as return. Since the intention is to halt makepkg when pacman throws an error other than 127, the enclosing function has to handle error control instead. Fixes FS#19840 Signed-off-by: Andres P <aepd87@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
2010-12-12makepkg: use portable escape sequence for terminal escapesCarlos Diaz
The escape string isn't necesarily \033; it's determined by what the particular termcap/info entry for that terminal contains. Bash uses ncurses functions to expand \e to the _correct_ terminal escape. Signed-off-by: Carlos Diaz <839273@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
2010-10-13Add epoch verification to makepkgDan McGee
If defined, it must be an integer. Signed-off-by: Dan McGee <dan@archlinux.org>
2010-10-13Make repo-add and makepkg epoch-awareDan McGee
Allow it to be a variable in the PKGBUILD as well as propagating it through to the built package and the package database. We leave some backward compatibility in place by placing the '%FORCE%' option in the database if the package contains an epoch; this will be used by older versions of pacman and more or less ignored by versions that use epoch. Signed-off-by: Dan McGee <dan@archlinux.org>