summaryrefslogtreecommitdiff
path: root/scripts/Makefile.am
Commit message (Collapse)AuthorAge
* makepkg: Move parseopts from library to libmakepkgAlad Wenter2016-10-22
| | | | | | | | | | | | | | | parseopts is used in makepkg and other scripts such as pacman-key as a getopt replacement. Instead of including it in those scripts via a macro, move it to libmakepkg/util/parseopts.sh and have scripts source this file where appropriate. To keep the parseopts test, a new variable was introduced: PM_LIBMAKEPKG_DIR Signed-off-by: Alad Wenter <alad@archlinux.info> Signed-off-by: Allan McRae <allan@archlinux.org>
* Generalise makepkg-wrapper to handle any script using libmakepkgAllan McRae2016-10-22
| | | | Signed-off-by: Allan McRae <allan@archlinux.org>
* libmakepkg: generate all scriptsAlad Wenter2016-10-22
| | | | | | | | | In order for the scripts to be used in testsuites, it is easiest to generate all of them so they are found in the build directory (which may be different to the source directory). Signed-off-by: Alad Wenter <alad@archlinux.info> Signed-off-by: Allan McRae <allan@archlinux.org>
* Ensure makepkg-wrapper is built after makepkgAllan McRae2016-10-11
| | | | | | | | makepkg-wrapper did not get rebuilt if makepkg was regenerated due to library changes. Ensure makepkg-wrapper is always generated and linked any time makepkg changes. Signed-off-by: Allan McRae <allan@archlinux.org>
* Move bash/zsh completion out of contribAllan McRae2016-10-10
| | | | Signed-off-by: Allan McRae <allan@archlinux.org>
* Remove pacman-optimizeAllan McRae2016-10-10
| | | | | | | The people who believe that pacman-optimize is actually doing something useful are the same people who are voting for Trump. Signed-off-by: Allan McRae <allan@archlinux.org>
* libmakepkg: extract functions for integrity checkingAshley Whetter2016-05-18
| | | | | Signed-off-by: Ashley Whetter <ashley@awhetter.co.uk> Signed-off-by: Allan McRae <allan@archlinux.org>
* libmakepkg: extract functions for writing .SRCINFO filesAshley Whetter2016-03-28
| | | | | Signed-off-by: Ashley Whetter <ashley@awhetter.co.uk> Signed-off-by: Allan McRae <allan@archlinux.org>
* makepkg: Remove upx and optipng supportAllan McRae2016-02-26
| | | | | | | | | These options were added before libmakepkg allowed passes like this to be dropped in. I prefer only real core packaging tasks to be included in makepkg and additional things like this to be dropped in by a user or distribution that wants to support them. Signed-off-by: Allan McRae <allan@archlinux.org>
* libmakepkg: check if PKGBUILD variables are arrays or not as appropriateAllan McRae2015-09-07
| | | | | | | | When extracting variables from PKGBUILD (e.g. for .SRCINFO creation) we make assumptions about whether variables are arrays or not. This adds a check to the PKGBUILD linter to ensure variables are arrays or not as appropriate. Signed-off-by: Allan McRae <allan@archlinux.org>
* libmakepkg: util/pkgbuild.sh needs processing on buildAllan McRae2015-09-07
| | | | | | | pkgbuild.sh contained @DEBUGSUFFIX@ and so needs to be run through the sed command on build. Signed-off-by: Allan McRae <allan@archlinux.org>
* libmakepkg: extract functions for source download and extractionAllan McRae2015-05-19
| | | | Signed-off-by: Allan McRae <allan@archlinux.org>
* libmakepkg: extract functions for handling source URLsAllan McRae2015-05-19
| | | | Signed-off-by: Allan McRae <allan@archlinux.org>
* libmakepkg: extract PKGBUILD linting functionsAllan McRae2015-05-16
| | | | Signed-off-by: Allan McRae <allan@archlinux.org>
* libmakepkg: extract in_arrayAllan McRae2015-05-16
|
* libmakepkg: move functions for extracting pkgbuild attributesAllan McRae2015-05-16
| | | | | | | | | | Also rename some functions for clarity: funcgrep -> grep_function extract_global_var -> extract_global_variable extract_function_var -> extract_function_variable pkgbuild_get_attribute -> get_pkgbuild_attribute Signed-off-by: Allan McRae <allan@archlinux.org>
* libmakepkg: move package checking out of tidy_installAllan McRae2015-02-12
| | | | Signed-off-by: Allan McRae <allan@archlinux.org>
* makepkg: split package tidying into libmakepkgAllan McRae2015-02-01
| | | | Signed-off-by: Allan McRae <allan@archlinux.org>
* makepkg: split PKGBUILD/makepkg.conf option checking to libmakepkgAllan McRae2015-02-01
| | | | Signed-off-by: Allan McRae <allan@archlinux.org>
* makepkg: split message functions into libmakepkgAllan McRae2015-02-01
| | | | | | | | | | This performs all the needed work for libmakepkg to be included in tarballs, installed into the correct place, and read into makepkg. Also change the install root for libmakepkg to an architecture independant location. Signed-off-by: Allan McRae <allan@archlinux.org>
* replace --reference on chmod/chown commandsWolfgang Bumiller2014-09-23
| | | | Signed-off-by: Allan McRae <allan@archlinux.org>
* pacman-db-upgrade: use pacman-style optionsAndrew Gregory2014-09-16
| | | | | | | | | | * convert dbpath from argument to option * add --config and --root options * read dbpath and root from config file * if root is set but not dbpath, dbpath is set relative to root Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
* Do not check makepkg-wrapper for standard optionsAllan McRae2014-05-23
| | | | | | Fixes "make distcheck". Signed-off-by: Allan McRae <allan@archlinux.org>
* Fix install order in scripts MakefileAllan McRae2014-03-03
| | | | | We need to use install-exec-hook instead of install-data-hook to make sure the hook is run after the installation of the scripts into $BINDIR.
* Remove ts and sw from vim modeline when noet is setFlorian Pritz2014-01-28
| | | | | | | | | | | | Forcing vim users to view files with a tabstop of 2 seems really unnecessary when noet is set. I find it much easier to read code with ts=4 and I dislike having to override the modeline by hand. Command run: find . -type f -exec sed -i '/vim.* noet/s# ts=2 sw=2##' {} + Signed-off-by: Florian Pritz <bluewind@xinu.at> Signed-off-by: Allan McRae <allan@archlinux.org>
* makepkg: add LIBRARY variableAllan McRae2013-10-14
| | | | | | | | | This points makepkg to where is library is located. Can be overridden by value in the environment. Signed-off-by: Allan McRae <allan@archlinux.org> [Ashley: Rebased] Signed-off-by: Ashley Whetter <ashley@awhetter.co.uk>
* makepkg: run locally with libtool style wrapperAllan McRae2013-10-14
| | | | | | | | | | Build makepkg to scripts/.lib/makepkg and add a wrapper script to call it. This is not useful at the moment, but is the first step to allowing makepkg to be split into smaller pieces. Signed-off-by: Allan McRae <allan@archlinux.org> [Ashley: rebased] Signed-off-by: Ashley Whetter <ashley@awhetter.co.uk>
* Add makepkg-templateFlorian Pritz2013-05-29
| | | | | | | This allows for somewhat easy templating for PKGBUILDs. Signed-off-by: Florian Pritz <bluewind@xinu.at> Signed-off-by: Allan McRae <allan@archlinux.org>
* distribute library/term_colors.shAllan McRae2013-03-10
| | | | Signed-off-by: Allan McRae <allan@archlinux.org>
* makepkg: use --apparent-size when du supports itAllan McRae2013-01-03
| | | | | | | | | | | Amazingly, using "sleep 1" to convince btrfs to report correct file sizes is only a 90% fix. Sometimes more sleep is needed. Instead we use the --apparent-size argument to du to get actual file sizes. This is used only on Linux as the various BSDs do not support this argument. Signed-off-by: Allan McRae <allan@archlinux.org>
* makepkg: allow debug package suffix to be configurableAllan McRae2012-11-27
| | | | Signed-off-by: Allan McRae <allan@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>
* 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>
* 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>
* 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>
* 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>
* 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>
* 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>
* 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>
* makepkg: adopt parseopts for option parsingDave Reisner2012-04-24
| | | | Signed-off-by: Dave Reisner <dreisner@archlinux.org>
* scripts/library: introduce parseoptsDave Reisner2012-04-24
| | | | | | | | | | | | | | | | | | This will replace our current options parser used in pacman-key, makepkg, and ideally elsewhere. It follows heuristics closer to that of GNU getopt long (and thus pacman itself), with the exception that it does not allow for options with optional arguments. Due to the way this parser will be used, this sort of functionality will not be needed. Instead of relying on eval+set, options are normalized into an array, OPTRET, which callers should expect to be populated after returning from parseopts. This avoids problems with quotes and spaces in arguments, assuming that the user quotes properly when passing into the application. A new test harness for parseopts is added in test/scripts. Signed-off-by: Dave Reisner <dreisner@archlinux.org>
* Revert "makepkg: calculate exact total file size"Dan McGee2012-04-07
| | | | | | This reverts commit b264fb9e9ddcc31dc8782390309421965e507383. With our "fix" of sleeping for BTRFS, we can go back to using `du` to calculate total installed size.
* makepkg: calculate exact total file sizeAllan McRae2011-12-28
| | | | | | | | | | | | | | 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>
* Use automake verbose helpers in custom make rulesDan McGee2011-12-08
| | | | | | | | | | | | | | | | | | 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>
* buildsys: remove existing symlinks before installingDave Reisner2011-09-14
| | | | | | | | | This fixes build errors when performing a manual install straight to a filesystem where the files already exist. Reported-by: Sergej Pupykin <ml@sergej.pp.ru> Signed-off-by: Dave Reisner <dreisner@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
* pacman-key: rework importing distro/repo provided keyringsAllan McRae2011-08-29
| | | | | | | | | | | | | | | | | The current --reload option, apart from being non-clear in its naming, is very limited in that only one keyring can be provided. A distribution may want to provide multiple keyrings for various subsets of its organisation or custom repo providers may also want to provide a keyring. This patch adds a --populate option that reads keyrings from (by default) /usr/share/pacman/keyrings. A keyring is named foo.gpg, with optional foo-revoked file providing a list of revoked key ids. These files are required to be signed (detached) by a key trusted by pacman-key, in practice probably by the key that signed the package providing these files. The --populate flag either updates the pacman keyring using all keyrings in the directory or individual keyrings can be specified. Signed-off-by: Allan McRae <allan@archlinux.org>
* build-sys: always use $(RM) instead of rm -fDave Reisner2011-08-15
| | | | | | | These are equivalent. Use the autoconf macro for consistency. Signed-off-by: Dave Reisner <dreisner@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
* dist: preserve symlinks on installationDave Reisner2011-08-15
| | | | | | | | | This applies to the repo-remove man page as well as the script itself. Yes Dan, I ran distcheck afterwards. Signed-off-by: Dave Reisner <dreisner@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
* pacman-key: add dependency on parse_options to MakefileAllan McRae2011-07-19
| | | | Signed-off-by: Allan McRae <allan@archlinux.org>