summaryrefslogtreecommitdiffstats
path: root/scripts
AgeCommit message (Collapse)AuthorFilesLines
2012-03-09makepkg: use array instead of stringDave Reisner1-3/+3
Signed-off-by: Dave Reisner <dreisner@archlinux.org>
2012-03-09makepkg: avoid use of eval in run_pacmanDave Reisner1-5/+5
Signed-off-by: Dave Reisner <dreisner@archlinux.org>
2012-03-09makepkg: enforce decimal format for pkgrelDave Reisner1-2/+2
Signed-off-by: Dave Reisner <dreisner@archlinux.org>
2012-03-09makepkg: allow specifying compression optionsChristian Hesse1-4/+4
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>
2012-03-09pacman-optimize: standardize on openssl usage, only touch local/Dan McGee1-22/+23
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>
2012-02-21Merge branch 'maint'Dan McGee4-30/+21
Conflicts: contrib/pacsysclean.in src/pacman/conf.h
2012-02-20makepkg: rework libprovidesAllan McRae1-39/+50
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>
2012-02-17parseopts: normalize options into an arrayDave Reisner3-27/+17
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>
2012-02-15makepkg: fix syntax error in remove_depsChristoph Vigano1-1/+1
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>
2012-02-14scripts: unset CDPATH if cd is usedDan McGee2-2/+3
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>
2012-02-13Merge branch 'maint'Dan McGee29-1427/+1020
Conflicts: lib/libalpm/sync.c src/util/pactree.c
2012-02-11Final pre-release Transifex updatesDan McGee2-101/+154
Signed-off-by: Dan McGee <dan@archlinux.org>
2012-02-11makepkg: disable extglob when sourcing BUILDSCRIPTAllan McRae1-0/+4
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>
2012-02-11makepkg: deal with mercurial exit codesAllan McRae1-2/+7
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>
2012-02-07Translation updates from Transifex, mostly scriptsDan McGee28-1358/+889
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>
2012-02-06Merge branch 'maint'Dan McGee1-3/+12
Conflicts: lib/libalpm/alpm_list.c
2012-02-06makepkg.sh.in - if both -r and -i are provided, only remove makedepsAndrew Gregory1-1/+5
Signed-off-by: Dan McGee <dan@archlinux.org>
2012-02-06makepkg.sh.in - fix remove_deps test for deps to be removedAndrew Gregory1-1/+1
Signed-off-by: Dan McGee <dan@archlinux.org>
2012-02-06makepkg: add forgotten newline in help outputMantas Mikulėnas1-1/+1
Signed-off-by: Allan McRae <allan@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
2012-01-31makepkg: Fix non-writable SRCPKGDEST error messageAllan McRae1-0/+5
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>
2012-01-31Merge branch 'maint'Dan McGee34-698/+2368
Conflicts: scripts/makepkg.sh.in
2012-01-31pacman-key: call gpg fewer times for revocation keysDave Reisner1-6/+5
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>
2012-01-31pacman-key: simplify trusted keyring iterationDave Reisner1-8/+6
Signed-off-by: Dave Reisner <dreisner@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
2012-01-31Update translationsDan McGee27-583/+2208
Signed-off-by: Dan McGee <dan@archlinux.org>
2012-01-31Update pot translation catalogsDan McGee1-14/+58
Signed-off-by: Dan McGee <dan@archlinux.org>
2012-01-31Make a few more copyright date tweaksDan McGee2-4/+4
Signed-off-by: Dan McGee <dan@archlinux.org>
2012-01-31scripts: always use printf with embedded gettextDave Reisner6-96/+96
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>
2012-01-31makepkg: workaround for zipman issuesAllan McRae1-1/+2
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>
2012-01-23makepkg: check for license when creating srcpackageDave Reisner1-0/+2
Signed-off-by: Dave Reisner <dreisner@archlinux.org>
2012-01-23makepkg: abstract license check into separate functionDave Reisner1-6/+10
Signed-off-by: Dave Reisner <dreisner@archlinux.org>
2012-01-23Merge branch 'maint'Dan McGee3-44/+171
Conflicts: lib/libalpm/diskspace.c src/pacman/util.h
2012-01-23makepkg: restrict usage of flags passed to pacmanAllan McRae1-1/+5
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>
2012-01-23makepkg: fix error on unnecessary -rAllan McRae1-3/+4
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>
2012-01-19Update copyright on changed files since beginning of yearDan McGee3-6/+6
Signed-off-by: Dan McGee <dan@archlinux.org>
2012-01-19Improve exit statuses and error messages in pacman-keycanyonknight1-23/+95
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>
2012-01-19Turn gpg commands into functions in pacman-keycanyonknight1-16/+58
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>
2012-01-19repo-add: clean up help messagesDan McGee1-6/+14
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>
2012-01-08Merge branch 'maint'Dan McGee29-211/+368
Conflicts: lib/libalpm/signing.c Signed-off-by: Dan McGee <dan@archlinux.org>
2012-01-08makepkg: abort on missing download agentAllan McRae1-1/+2
makepkg would not abort on a missing download agent due to the output variable being declared local on the same line as the function call in the assignment. That would result in strange output such as: ==> Retrieving Sources... ==> ERROR: There is no agent set up to handle foo URLs. Check /etc/makepkg.conf. Aborting... -> Downloading foobaz... /home/arch/code/pacman/scripts/makepkg: line 401: foo://foobaz: No such file or directory ==> ERROR: Failure while downloading foobaz Aborting... Signed-off-by: Allan McRae <allan@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
2012-01-08makepkg: fix missing source file detectionAllan McRae1-1/+2
Declaring the variable as local on the same line as the assignment results in result of the assignment being returned rather than the result of the function on the righthand side of the assignment. Declaring the variable as local on a separate line means the result of the function on the r.h.s. is returned and our error function will be invoked if necessary (although it is practically impossible to ever trigger it...). Signed-off-by: Allan McRae <allan@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
2012-01-08makepkg: simplify source archive generationAllan McRae1-5/+3
Simplify the source tarball generation by unifying the handling of local and remote files. This also allows local files to be found in $SRCDEST (FS#26580) and makepkg will abort on missing local source files (only possible to trigger in combination with --skipinteg). Signed-off-by: Allan McRae <allan@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
2012-01-06Update translations from TransifexDan McGee27-202/+356
Signed-off-by: Dan McGee <dan@archlinux.org>
2012-01-06Update scripts translation catalogDan McGee1-2/+5
Signed-off-by: Dan McGee <dan@archlinux.org>
2011-12-29makepkg: calculate exact total file sizeAllan McRae2-3/+1
The current calculation of the total file size for a package using "du" suffers from issues in portability and correctness. Especially on btrfs, this can result in clearly wrong package information such as: Download Size : 14684.29 KiB Installed Size : 7628.00 KiB Use an approach based on "stat" to calculate total file size. Signed-off-by: Allan McRae <allan@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
2011-12-29makepkg: Use SKIP in checksum to skip integrity checkAllan McRae1-7/+11
Using the value of "SKIP" in the checksum array will cause that integrity check to be skipped. This makes building packages that rely on user configurable sources less painful. Based-on-patch-by: Dan McGee <dan@archlinux.org> Based-on-patch-by: David Campbell <davekong@archlinux.us> Signed-off-by: Allan McRae <allan@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
2011-12-23Merge branch 'maint'Dan McGee1-3/+3
2011-12-23pacman-key: Add missing quotesTimothy Redaelli1-3/+3
Signed-off-by: Timothy Redaelli <timothy.redaelli@gmail.com> Signed-off-by: Dan McGee <dan@archlinux.org>
2011-12-12makepkg: split source elements when looking for sigsDave Reisner1-2/+2
Allows renamed .asc/.sig files to be still discovered by makepkg. This is needed for a package such as PuTTY, which provides abnormally named sig files (.DSA and .RSA) which are valid input for gpg --verify. Signed-off-by: Dave Reisner <dreisner@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
2011-12-08Use automake verbose helpers in custom make rulesDan McGee1-7/+3
This converts our script generation to use the built-in AM_V_GEN macro, which honors the V= setting passed to make and allows one to see the full command if they truly desire. The AM_V_at macro is also used in place of an explicit @ so verbose-mode compiles show all commands being run. We can also use these two macros in doc generation to quiet it down to the level we expect. Other minor changes: * a pointless test call is removed in test/pacman/tests/ * sed is used instead of dos2unix as we depend on it anyway * consecutive chmod calls are reduced to a single call (e.g., '+x,a-x') Signed-off-by: Dan McGee <dan@archlinux.org>
2011-12-07scripts/*: Declare several constant variables read-onlyLukas Fleischer6-10/+10
Be more semantically accurate and avoid accidental overwriting of some configuration variables that are considered to be constant. Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de> Signed-off-by: Dan McGee <dan@archlinux.org>