summaryrefslogtreecommitdiff
path: root/scripts
Commit message (Collapse)AuthorAge
* Merge branch 'maint'Dan McGee2012-03-16
|\ | | | | | | | | Conflicts: lib/libalpm/sync.c
| * makepkg: quote removed filename as it can have spacesAllan McRae2012-03-16
| | | | | | | | | | Signed-off-by: Allan McRae <allan@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
* | makepkg: abort when failing to create BUILDDIRAllan McRae2012-03-16
| | | | | | | | | | Signed-off-by: Allan McRae <allan@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
* | makepkg: prevent issues with files starting with a hyphenAllan McRae2012-03-16
| | | | | | | | | | | | | | | | | | Most places in makepkg deal with full file paths, but a few use the file name only. Protect from potential issues when a file name starts with a hyphen. Signed-off-by: Allan McRae <allan@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
* | makepkg: append pkgbase to BUILDDIR if specifiedAllan McRae2012-03-16
| | | | | | | | | | | | | | | | | | This means multiple packages can be build using the same BUILDDIR without their source files all ending up extracted in the same directory. Fixes FS#28417. Signed-off-by: Allan McRae <allan@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
* | Merge branch 'maint'Dan McGee2012-03-08
|\| | | | | | | | | Conflicts: lib/libalpm/be_package.c
| * makepkg: exit via default signal handler in trap_exitDave Reisner2012-03-08
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Similar to how we manage receipt of SIGINT in pacman's internal downloader, catch the signal and invoke our own trap handler before unsetting it and calling the default. This requires a slight modification to the arguments passed to trap_exit so we can pass the raised signal to trap_exit (note that we substitue USR1 for ERR since the latter is unique to bash). Fixes FS#28491. Signed-off-by: Dave Reisner <dreisner@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
| * pacman-key: Remove useless signature verification in --populate commandPierre Schmitz2012-03-05
| | | | | | | | | | | | | | | | Verifing the keyring at this point is useless as a malicious package is already installed and as such has several options to bypass this check anyway. Signed-off-by: Pierre Schmitz <pierre@archlinux.de> Signed-off-by: Dan McGee <dan@archlinux.org>
| * Translation updates from TransifexDan McGee2012-03-05
| | | | | | | | | | | | | | | | * it updates to all translations * minor fr, pt_BR, de, lt, sk and uk updates * add new strings in pacman translation catalog Signed-off-by: Dan McGee <dan@archlinux.org>
| * Do not dereference symlinks when calculating sizeAllan McRae2012-03-05
| | | | | | | | | | | | | | | | | | | | Passing the "-L" flag to stat means we get the size of the file being pointed to for symlinks instead of the size of the symlink. Keep "-L" usage in repo-add as we want the actual size of the package/delta/signature there. Signed-off-by: Allan McRae <allan@archlinux.org>
| * makepkg: fix false error with multiple libdepsFlorian Pritz2012-03-05
| | | | | | | | | | | | | | | | | | With multiple items in $libdepends this check only worked for the first one, everything after this returned an error. This was probably an issue with \s being treated wrong. Fix-by: Dave Reisner <dreisner@archlinux.org> Signed-off-by: Florian Pritz <bluewind@xinu.at>
| * makepkg: fix extraction of soname in find_libdependsFlorian Pritz2012-03-05
| | | | | | | | | | | | | | | | | | libperl.so results in soname="libperl.so.so" which is wrong. This returns the correct string: "libperl.so" Fix-by: Dave Reisner <dreisner@archlinux.org> Signed-off-by: Florian Pritz <bluewind@xinu.at>
* | makepkg: use array instead of stringDave Reisner2012-03-08
| | | | | | | | Signed-off-by: Dave Reisner <dreisner@archlinux.org>
* | makepkg: avoid use of eval in run_pacmanDave Reisner2012-03-08
| | | | | | | | Signed-off-by: Dave Reisner <dreisner@archlinux.org>
* | makepkg: enforce decimal format for pkgrelDave Reisner2012-03-08
| | | | | | | | Signed-off-by: Dave Reisner <dreisner@archlinux.org>
* | makepkg: allow specifying compression optionsChristian Hesse2012-03-08
| | | | | | | | | | | | | | | | | | | | | | Adds the ability to override the commands used to compressing compiled and source packages. This is useful for those wanting to use alternative implementations of the compression tools or non-default compression options. Allan: documented options in man page Signed-off-by: Allan McRae <allan@archlinux.org>
* | pacman-optimize: standardize on openssl usage, only touch local/Dan McGee2012-03-08
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The rest of our scripts have been using `openssl dgst` rather than tools like `md5sum` for some time, so convert this one too. We also make the following other adjustments: * Use a `find -print0 | xargs -0` pipeline so paths with spaces and or newlines don't totally kill us. * Ensure the files we write out contain only paths relative to the database root, where we know the filenames should all be sane. * Remove use of `diff`, this was the only time we used it in scripts and we can get a cheap substitute by comparing file checksums instead. * Only touch the local/ part of the database. It makes little sense to do anything to the sync/ directory anymore as they are compressed single files that should be regularly written out in full and won't be fragmented on any sane filesystem. Signed-off-by: Dan McGee <dan@archlinux.org>
* | Merge branch 'maint'Dan McGee2012-02-20
|\| | | | | | | | | | | Conflicts: contrib/pacsysclean.in src/pacman/conf.h
| * parseopts: normalize options into an arrayDave Reisner2012-02-16
| | | | | | | | | | | | | | | | | | | | Modify parse_options logic to fill an array instead of printing parsed options. Avoid eval like the plague. Because it is the plague. Fixes bugs such as FS#28445. Signed-off-by: Dave Reisner <dreisner@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
| * makepkg: fix syntax error in remove_depsChristoph Vigano2012-02-15
| | | | | | | | | | | | | | | | | | | | | | | | This fixes a problem that occurs if you tell makepkg to remove installed dependencies (just to be sure) but there are none. As the $ was missing in front of deplist, the check never happened and 'pacman -Rn' was called which obviously failed. Dan: later reported as FS#28448. Signed-off-by: Christoph Vigano <mail@cvigano.de> Signed-off-by: Dan McGee <dan@archlinux.org>
| * scripts: unset CDPATH if cd is usedDan McGee2012-02-14
| | | | | | | | | | | | | | | | | | This wonderful/awful little bash shell variable wrecks havoc on `cd` calls in shell scripts. Unset CDPATH in makepkg where we use `cd` quite heavily. In pacman-optimize, we can move the change directory logic into the bsdtar call so we are left with no usages of `cd` in the script. Signed-off-by: Dan McGee <dan@archlinux.org>
* | makepkg: rework libprovidesAllan McRae2012-02-20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reworks the implmentation of libprovides for the following benefits: - Moves functionality from write_pkginfo() to find_libprovides() - Only calculates the version for libraries specifically requested and not all libraries. This has the disadvantage of running find over the $pkgdir for as many libraries as needed, but is unlikely to be an issue due to caching. - The order of the provides array in the PKGBUILD is kept in the package - There are more warning messages when things fail and those that were there are no longer errors (as I do not think failure of libprovides should result in complete packaging failure) - It is now modular so can be easy extended to other library types other than ELF *.so. Signed-off-by: Allan McRae <allan@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
* | Merge branch 'maint'Dan McGee2012-02-13
|\| | | | | | | | | | | Conflicts: lib/libalpm/sync.c src/util/pactree.c
| * Final pre-release Transifex updatesDan McGee2012-02-11
| | | | | | | | Signed-off-by: Dan McGee <dan@archlinux.org>
| * makepkg: disable extglob when sourcing BUILDSCRIPTAllan McRae2012-02-11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | PKGBUILDs are advertised as being pure bash so it would be expected that the default bash options are in effect when sourcing it. This inadvertantly "fixes" FS#27780 where enabling extglob causes the bash parser to error on non-valid bash function names like package_libxml++(). Note that these function names are unsupported in bash and could break again even with this "fix" in future bash releases. Signed-off-by: Allan McRae <allan@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
| * makepkg: deal with mercurial exit codesAllan McRae2012-02-11
| | | | | | | | | | | | | | | | | | From mercurial-2.1, "hg pull" returns 1 when there are no updates. Catch the return code and either pull the update or return an error as appropriate. Signed-off-by: Allan McRae <allan@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
| * Translation updates from Transifex, mostly scriptsDan McGee2012-02-06
| | | | | | | | | | | | | | This is after some manual massaging to fix issues with newlines in some translations of the script catalogs. Signed-off-by: Dan McGee <dan@archlinux.org>
* | Merge branch 'maint'Dan McGee2012-02-06
|\| | | | | | | | | Conflicts: lib/libalpm/alpm_list.c
| * makepkg.sh.in - if both -r and -i are provided, only remove makedepsAndrew Gregory2012-02-06
| | | | | | | | Signed-off-by: Dan McGee <dan@archlinux.org>
| * makepkg.sh.in - fix remove_deps test for deps to be removedAndrew Gregory2012-02-06
| | | | | | | | Signed-off-by: Dan McGee <dan@archlinux.org>
| * makepkg: add forgotten newline in help outputMantas Mikulėnas2012-02-06
| | | | | | | | | | Signed-off-by: Allan McRae <allan@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
| * makepkg: Fix non-writable SRCPKGDEST error messageAllan McRae2012-01-31
| | | | | | | | | | | | | | | | | | | | Provide a helpful error message for when creating a source tarball and SRCPKGDEST is not writable. Fixes FS#28197. Signed-off-by: Allan McRae <allan@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
* | Merge branch 'maint'Dan McGee2012-01-30
|\| | | | | | | | | Conflicts: scripts/makepkg.sh.in
| * Update translationsDan McGee2012-01-30
| | | | | | | | Signed-off-by: Dan McGee <dan@archlinux.org>
| * Update pot translation catalogsDan McGee2012-01-30
| | | | | | | | Signed-off-by: Dan McGee <dan@archlinux.org>
| * Make a few more copyright date tweaksDan McGee2012-01-30
| | | | | | | | Signed-off-by: Dan McGee <dan@archlinux.org>
| * scripts: always use printf with embedded gettextDave Reisner2012-01-30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This addresses two problems: 1) echo's behavior is inconsistent when dealing with flags, and can potentially be problematic. $ echo -n $ echo -- -n -- -n 2) Always using the end of options markers prevents translated strings from throwing errors, as shown in FS#28069. The remaining "inconsistencies" are because printf is being used in a guaranteed safe manner, e.g. printf '%s\n' "$(gettext "--this can never break")" Signed-off-by: Dave Reisner <dreisner@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
| * makepkg: workaround for zipman issuesAllan McRae2012-01-30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This "fixes" two issues: 1) MAN_DIRS contains a glob by default so should not be quoted. It is not quoted anywhere else so this should not cause breakage... 2) the find statement returns 1 when some of MAN_DIRS are missing. This appears to only be exposed when running makepkg as root (which it appears some wrappers do...). Signed-off-by: Allan McRae <allan@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
* | pacman-key: call gpg fewer times for revocation keysDave Reisner2012-01-30
| | | | | | | | | | | | | | | | | | Instead of iterating over the revocation keyfile and calling gpg once for each key, map the file into an array and call gpg once, iterating over this output to mark each key as revoked. Signed-off-by: Dave Reisner <dreisner@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
* | pacman-key: simplify trusted keyring iterationDave Reisner2012-01-30
| | | | | | | | | | Signed-off-by: Dave Reisner <dreisner@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
* | makepkg: check for license when creating srcpackageDave Reisner2012-01-23
| | | | | | | | Signed-off-by: Dave Reisner <dreisner@archlinux.org>
* | makepkg: abstract license check into separate functionDave Reisner2012-01-23
| | | | | | | | Signed-off-by: Dave Reisner <dreisner@archlinux.org>
* | Merge branch 'maint'Dan McGee2012-01-23
|\| | | | | | | | | | | Conflicts: lib/libalpm/diskspace.c src/pacman/util.h
| * makepkg: restrict usage of flags passed to pacmanAllan McRae2012-01-23
| | | | | | | | | | | | | | | | | | With pacman-4.0, using --noconfirm or --noprogressbar with -Q or -T results in pacman reporting an "invalid option" error. Restrict the passing of these options to pacman. Fixes FS#28012. Signed-off-by: Allan McRae <allan@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
| * makepkg: fix error on unnecessary -rAllan McRae2012-01-23
| | | | | | | | | | | | | | | | | | | | The grep statement used to check for a difference between the installed package list before and after resolving dependencies returns 1 if there is no difference. This sets of the error trap when "-r" is used "unnecessarily". Signed-off-by: Allan McRae <allan@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
| * Update copyright on changed files since beginning of yearDan McGee2012-01-18
| | | | | | | | Signed-off-by: Dan McGee <dan@archlinux.org>
| * Improve exit statuses and error messages in pacman-keycanyonknight2012-01-18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Return codes from gpg commands are currently lost. This adds the functionality of taking non-zero exit statuses from gpg. This includes error reporting for all gpg commands that are run individually, run in a loop, and run through a pipe. Includes the check_keyids_exist function which verifies a key exists locally prior to attempted local manipulation of the key. If a gpg command has a non-zero status, pacman-key will now exit with a non-zero status. It will print a gettext error message of gpg's failure. Signed-off-by: canyonknight <canyonknight@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
| * Turn gpg commands into functions in pacman-keycanyonknight2012-01-18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Adds functions for every gpg command. By pulling out the gpg commands from the "program start" section, additional commands can be run before or after a specific gpg command without adding additional clutter to the function call section. Adds an explicit exit status of 0 to prevent arithmetic expansions from returning non-zero, thereby falsely causing pacman-key to have a non-zero exit status. This change creates the framework for additional error messages and better exit statuses being added to every pacman-key gpg call. Signed-off-by: canyonknight <canyonknight@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
| * repo-add: clean up help messagesDan McGee2012-01-18
| | | | | | | | | | | | | | | | Use consistent blank lines across all commands, get rid of the translated double newlines which only serve to confuse translators, and fix -h/--help for that extra special third command this script offers. Signed-off-by: Dan McGee <dan@archlinux.org>
* | Merge branch 'maint'Dan McGee2012-01-08
|\| | | | | | | | | | | | | Conflicts: lib/libalpm/signing.c Signed-off-by: Dan McGee <dan@archlinux.org>