summaryrefslogtreecommitdiff
path: root/scripts
Commit message (Collapse)AuthorAge
* makepkg: reorder source handling functionsAllan McRae2012-08-04
| | | | | | | There is no actual code change here, but these related functions were all over the place which makes this code difficult to adjust. Signed-off-by: Allan McRae <allan@archlinux.org>
* makepkg: remove VCS package supportAllan McRae2012-08-04
| | | | | | | The current VCS packaging support is really, really, really bad. It is best to strip it out completely before rewriting it. Signed-off-by: Allan McRae <allan@archlinux.org>
* pacman-key: Use lsign_keys function in --populatePierre Schmitz2012-08-02
| | | | | | This reduces code duplication and also makes --populate a non-interactive function. Signed-off-by: Pierre Schmitz <pierre@archlinux.de>
* Merge branch 'maint'Dan McGee2012-08-01
|\
| * makepkg: remove unnecessary formattingAllan McRae2012-08-01
| | | | | | | | | | | | | | | | This extra newline leaves a gap that looks strange in of itself, but is highlighted when piping -g output to a PKGBUILD. Signed-off-by: Allan McRae <allan@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
* | Add a function prepare() to PKGBUILDEnjolras2012-08-01
| | | | | | | | | | | | | | prepare is run after the source extraction, and is not run with --noextract option. Signed-off-by: Dan McGee <dan@archlinux.org>
* | asdeps flag passed from makepkg to pacmanDaniel Wallace2012-08-01
| | | | | | | | | | | | | | | | | | add the asdeps flag for makepkg so that it does pacman -U --asdeps [Allan: clean-up whitespace] Signed-off-by: Daniel Wallace <daniel.wallace12@gmail.com> Signed-off-by: Dan McGee <dan@archlinux.org>
* | paccache: adopt size_to_humanDave Reisner2012-06-25
| | | | | | | | Signed-off-by: Dave Reisner <dreisner@archlinux.org>
* | scripts/library: add size_to_humanDave Reisner2012-06-25
| | | | | | | | | | | | | | | | | | | | | | This function is the reverse of human_to_size, and converts integer byte sizes to human readable SI prefixed values. A logical extension of this might be to mimic the formatter that pacman uses and allow a second argument to be passed in which can coerce the size, rather than reducing until the unit count is below 1024. Signed-off-by: Dave Reisner <dreisner@archlinux.org>
* | pkgdelta: use human_to_size to parse --min-pkg-sizeDave Reisner2012-06-25
| | | | | | | | | | | | | | Update the documentation accordingly to mention that users can expect huamn readable sizes to be acceptable. Signed-off-by: Dave Reisner <dreisner@archlinux.org>
* | scripts/library: add human_to_sizeDave Reisner2012-06-25
| | | | | | | | | | | | | | | | This is a bash wrapper around an awk function that parses human readable sizes and returns their representative values in bytes, as a string. A small test harness is added to validate the functionality. Signed-off-by: Dave Reisner <dreisner@archlinux.org>
* | repo-add: add checkdepends informationAllan McRae2012-06-25
| | | | | | | | | | | | | | Similar to the case for makedepends, it is useful to be able to access this information without parsing a PKGBUILD. Signed-off-by: Allan McRae <allan@archlinux.org>
* | makepkg: install deps with --repackageAllan McRae2012-06-25
| | | | | | | | | | | | | | | | | | I have noticed that quite a number of packages fail with "makepkg -R" when their (make)dependencies are not installed. Adjust makepkg to check for dependencies when used with -R. This can still be avoided by using --nodeps/-d. Signed-off-by: Allan McRae <allan@archlinux.org>
* | Allow wildcards in PURGE_TARGETS to match any type of file except for ↵Jeremy Huntwork2012-06-25
| | | | | | | | | | | | directories. Signed-off-by: Jeremy Huntwork <jhuntwork@lightcubesolutions.com>
* | makepkg: allow url to be overridden in split packagesAllan McRae2012-06-25
| | | | | | | | | | | | | | | | This is already being used (despite not working...) in packages in the Arch Linux repos. Signed-off-by: Allan McRae <allan@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
* | Portability fixes for makepkgJeremy Huntwork2012-06-25
| | | | | | | | | | | | | | | | Allow makepkg to work correctly when used with find from busybox. Fix handling of cross directory symlinks. Signed-off-by: Jeremy Huntwork <jhuntwork@lightcubesolutions.com> Signed-off-by: Allan McRae <allan@archlinux.org>
* | pkgdelta: add missing --version longoptDave Reisner2012-06-25
| | | | | | | | | | | | | | This was missed in the switch to parseopts, and was caught by distcheck. Signed-off-by: Dave Reisner <dreisner@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
* | Create repo-remove symlink in scripts dirAllan McRae2012-06-25
| | | | | | | | | | | | | | | | Fix the creation of the repo-remove symlink in the scripts/ dir on building. Signed-off-by: Allan McRae <allan@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
* | makepkg: rework libdependsAllan McRae2012-05-20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Rewrite the handling of libdepends. The primary advantage are: - Moves functionality from write_pkginfo() to find_libdepends(). - The order of the depends array in the PKGBUILD is kept in the package. - An unneeded libdepends is only a warning and not an error. This allows putting a libdepend on a library that is dlopened. - It is now modular so can be extended to library types other than ELF *.so. - Finding the list of libraries a package depends only occurs when a libdepend is specified in the depends array. Signed-off-by: Allan McRae <allan@archlinux.org>
* | repo-add: add makedepends informationAllan McRae2012-05-20
| | | | | | | | | | | | | | | | | | This is useful for tools that automatically rebuild packages and thus require to generate a build order. These entries are skipped by pacman. Signed-off-by: Allan McRae <allan@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
* | makepkg: write makedepends into .PKGINFOAllan McRae2012-05-20
| | | | | | | | | | | | | | | | | | | | Currently there is no way to access the makedepends for a package apart from parsing its PKGBUILD. Put these into the .PKGINFO file with the idea of making them available in the repo dbs so that automated build tools can readily determine build order. Signed-off-by: Allan McRae <allan@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
* | makepkg: Add CPPFLAGS supportAllan McRae2012-05-20
| | | | | | | | | | | | | | | | | | Add CPPFLAGS support in addition to the current CFLAGS and CXXFLAGS. This keeps compiler flags split up in the same logical way done everywhere else. Signed-off-by: Allan McRae <allan@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
* | Merge branch 'maint'Dan McGee2012-05-20
|\| | | | | | | | | Conflicts: scripts/pacman-key.sh.in
| * pacman-key: test for content in keyring filesDave Reisner2012-05-20
| | | | | | | | | | | | | | | | | | | | | | | | Test for file content (-s) rather than just existance (-f). This fixes a bug that manifests itself in the case of an empty -revoked file. A zero element 'keys' array would be passed to gpg, forcing it to list and, subsequently, revoke all known keys. Bug introduced in d1240f67eab6. Signed-off-by: Dave Reisner <dreisner@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
| * Fix gettext usage in pkgdelta help instructionsDan McGee2012-05-20
| | | | | | | | Signed-off-by: Dan McGee <dan@archlinux.org>
| * Update pacman-scripts message catalogDan McGee2012-05-20
| | | | | | | | Signed-off-by: Dan McGee <dan@archlinux.org>
| * pacman-key: clarify messages, s/keychain/keyring/Dan McGee2012-05-04
| | | | | | | | Signed-off-by: Dan McGee <dan@archlinux.org>
* | pacman-key: use mapfile over readDave Reisner2012-05-20
| | | | | | | | Signed-off-by: Dave Reisner <dreisner@archlinux.org>
* | makepkg: use mapfile where plausibleDave Reisner2012-05-20
| | | | | | | | | | | | | | | | | | With bash4 as a requirement, we can use mapfile when reading command output into an array. mapfile has the advantage of using block buffered I/O rather than line buffered I/O, making it slightly faster for most jobs. Signed-off-by: Dave Reisner <dreisner@archlinux.org>
* | pkgdelta: adopt parseopts for option parsingDave Reisner2012-05-20
| | | | | | | | | | Signed-off-by: Dave Reisner <dreisner@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
* | makepkg: fix package arch detectionAllan McRae2012-04-30
| | | | | | | | | | | | | | | | | | get_pkg_arch checked for the arch variable being overridden in the package_$1() function when used with a package as a parameter. However, when there was no override, it did not fall back to the global value. Signed-off-by: Allan McRae <allan@archlinux.org>
* | pkgdelta/repo-add: quoting fixesFlorian Pritz2012-04-29
| | | | | | | | | | | | Finish the job on master; most of these were applied to maint already. Signed-off-by: Florian Pritz <bluewind@xinu.at>
* | Merge remote-tracking branch 'dave/buildsys'Dan McGee2012-04-29
|\ \
| * | rankmirrors: move to contrib/Dave Reisner2012-04-24
| | | | | | | | | | | | | | | | | | | | | | | | | | | This script is of questionable value, as it ranks mirrors by an uninteresting attribute: ping. While the script itself is interesting, people should be encouraged to rank mirrors by more useful measures, such as actual speed, locality, or up to date-ness. Signed-off-by: Dave Reisner <dreisner@archlinux.org>
| * | validate bash scripts with 'bash -n' during build.Dave Reisner2012-04-24
| | | | | | | | | | | | | | | | | | | | | | | | | | | Use the no-exec mode of $(BASH_SHELL) to check for syntax errors in shell scripts. Since we use the extglob feature in various places, this requires that we pass -O extglob to the shell as well, to ensure that the parser is armed to handle this syntax. Signed-off-by: Dave Reisner <dreisner@archlinux.org>
* | | makepkg: remove subshelling from check_option and friendsDave Reisner2012-04-29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Instead of creating a subshell for each of these checks (of which there are many), pass in an expected value and make the check_* function do the comparison for us, returning 0 (match), 1, (mismatch), or 127 (not found). For a measureable benefit, I tested this on a fairly simple package, perl-term-readkey, and counted the number of clone(2) syscalls to try and isolate those generated by makepkg itself, rather than the user defined functions. Results as shown below: 336 before 180 after So, roughly a 50% reduction, which makes sense given that a single check_option() call could be up to 3 subprocesses in total. Signed-off-by: Dave Reisner <dreisner@archlinux.org>
* | | makepkg: null terminate filenames to stripDave Reisner2012-04-29
| | | | | | | | | | | | Signed-off-by: Dave Reisner <dreisner@archlinux.org>
* | | makepkg: Be more consistent with missing program messageAllan McRae2012-04-24
| | | | | | | | | | | | | | | | | | Also prevent "sudo" and "su" from being translated. Signed-off-by: Allan McRae <allan@archlinux.org>
* | | makepkg: treat list of packages to be installed as an arrayAllan McRae2012-04-24
| | | | | | | | | | | | Signed-off-by: Allan McRae <allan@archlinux.org>
* | | makepkg: deal with overriden package arch properlyAllan McRae2012-04-24
|/ / | | | | | | | | | | | | | | | | | | This fixes a lot of checks done by makepkg (e.g. to see if a package is already built and choosing which package to install). Previously, if a package had both "i686" and "any" versions, the "i686" one always took precidence regardless of the value of "arch" in the PKGBUILD for that package. Fixes FS#27204. Signed-off-by: Allan McRae <allan@archlinux.org>
* | pacman-key: lookup keys before receivingDave Reisner2012-04-24
| | | | | | | | | | | | | | | | Perform a search for keys that clearly aren't key IDs. This allows receiving keys by name or email address, but only if the key resolves unambiguously. Signed-off-by: Dave Reisner <dreisner@archlinux.org>
* | Merge branch 'maint'Dan McGee2012-04-24
|\| | | | | | | | | Conflicts: scripts/repo-add.sh.in
| * makepkg: restrict allowed characters in pkgnameDave Reisner2012-04-20
| | | | | | | | | | Signed-off-by: Dave Reisner <dreisner@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
| * pkgdelta/repo-add: quoting fixesFlorian Pritz2012-04-20
| | | | | | | | | | | | | | | | This removes some unnecessary quotes and adds quotes in a few places to hopefully work correctly if the tempdir has spaces. Signed-off-by: Florian Pritz <bluewind@xinu.at> Signed-off-by: Dan McGee <dan@archlinux.org>
| * pkgdelta: implement requirments for delta generationFlorian Pritz2012-04-20
| | | | | | | | | | | | | | | | Big deltas or deltas for very small packages are not needed so we should check that and not generate any. Signed-off-by: Florian Pritz <bluewind@xinu.at> Signed-off-by: Dan McGee <dan@archlinux.org>
| * pkgdelta: rework option/argument parserFlorian Pritz2012-04-20
| | | | | | | | | | Signed-off-by: Florian Pritz <bluewind@xinu.at> Signed-off-by: Dan McGee <dan@archlinux.org>
* | pacman-key: allow verification of multiple sig filesDave Reisner2012-04-24
| | | | | | | | | | | | | | | | Loop through arguments passed to verify_sig and treat each as a signature to be verified against a source file. Output each file as its checked to avoid ambiguity. Signed-off-by: Dave Reisner <dreisner@archlinux.org>
* | scripts/library: remove parse_optionsDave Reisner2012-04-24
| | | | | | | | | | | | | | This is retired, as the two consumers of this function are now using the new parseopts instead. Signed-off-by: Dave Reisner <dreisner@archlinux.org>
* | scripts: avoid dumping usage on parser failDave Reisner2012-04-24
| | | | | | | | | | Avoid letting the error message from parseopts get lost in the usage output from pacman-key and makepkg (which is already verbose).
* | pacman-key: adopt parseopts for option parsingDave Reisner2012-04-24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This requires an ugly amount of reworking of how pacman-key handles options. The change simply to avoid passing keys, files, and directories as arguments to options, but to leave them as arguments to the overall program. This is reasonable since pacman-key limits the user to essentially one operation per invocation (like pacman). Since we now pass around the positional parameters to the various operations, we can add some better sanity checking. Each operation is responsible for testing input and making sure it can operate properly, otherwise it throws an error and exits. The doc is updated to reflect this, and uses similar verbiage as pacman, describing the non-option arguments now passed to pacman-key as targets. Similar to the doc, --help is reorganized to separate operations and options and remove argument tokens from operations. Signed-off-by: Dave Reisner <dreisner@archlinux.org>