Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/scripts
AgeCommit message (Collapse)Author
2015-11-05Refactor lint_source to work with earlier versions of BashAaron Campbell
Negative subscripts to indexed arrays are not supported before 4.2. However, since substring expansion works on arrays, we can specify an offset of -1 to be taken relative to one greater than the maximum index of the specified array (see Parameter Expansion section of the bash man page). This works with both Bash 4.1 and 4.2, and 4.1 is already the oldest supported by pacman. Signed-off-by: Aaron Campbell <aaron@monkey.org> Signed-off-by: Allan McRae <allan@archlinux.org>
2015-10-28scripts/po: fix translated file nameAllan McRae
This file was renamed during review and its entry in POTFILES.in was not updated. Signed-off-by: Allan McRae <allan@archlinux.org>
2015-10-28makepkg: fix $pkgname element duplicationBenjamin Yates
run_split_packaging did not preserve the $pkgname array correctly, and would create duplicate entries in the list during restore. After restoring the backup (a b c) would become (a b c b c). This probably went unnoticed because during --install, pacman would reconcile the duplicates. Signed-off-by: Allan McRae <allan@archlinux.org>
2015-10-27libmakepkg: fix pkgver checkingAllan McRae
Signed-off-by: Allan McRae <allan@archlinux.org>
2015-10-22makepkg: Fix hard-coded debug suffixMohammad Alsaleh
Signed-off-by: Mohammad Alsaleh <CE.Mohammad.AlSaleh@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
2015-10-19makepkg: Set CCACHE_BASEDIR to make paths in $srcdir relativeJan Alexander Steffens (heftig)
Signed-off-by: Allan McRae <allan@archlinux.org>
2015-10-19makepkg: Correctly layer distcc and ccacheJan Alexander Steffens (heftig)
ccache expects further compiler wrappers to be specified via CCACHE_PREFIX. Otherwise, ccache will hash the wrapper executable instead of the real one. Signed-off-by: Jan Alexander Steffens (heftig) <jan.steffens@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
2015-10-19libmakepkg: Add check_buildoption for distcc and ccacheJan Alexander Steffens (heftig)
makepkg used to check OPTIONS too, which could override BUILDENV. Implement a new function that handles these options more like OPTIONS. This also reduces code duplication a bit. Signed-off-by: Jan Alexander Steffens (heftig) <jan.steffens@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
2015-10-19makepkg: separate "sourcefile" into two wordsAllan McRae
Signed-off-by: Allan McRae <allan@archlinux.org>
2015-10-19Remove space before ellipsesAllan McRae
Makes all use of ellipses consistent... Signed-off-by: Allan McRae <allan@archlinux.org>
2015-09-23makepkg: remove ability to build individual packagesAllan McRae
Signed-off-by: Allan McRae <allan@archlinux.org>
2015-09-22libmakepkg: remove declaration of unused local variablesAllan McRae
Signed-off-by: Allan McRae <allan@archlinux.org>
2015-09-22libmakepkg: return 1 on error in arch arrayAllan McRae
The return value was being assigned when an error was found in a PKGBUILD's arch array but it never was returned. Also remove error message explaining about adding the arch array to a PKGBUILD. That was added a long time ago when the arch array first became compulsory. Signed-off-by: Allan McRae <allan@archlinux.org>
2015-09-22libmakepkg: update .gitignoreAllan McRae
Signed-off-by: Allan McRae <allan@archlinux.org>
2015-09-22makepkg: remove FORCE_VER variableAllan McRae
This variable is no longer in VCS building. Signed-off-by: Allan McRae <allan@archlinux.org>
2015-09-07libmakepkg: check if PKGBUILD variables are arrays or not as appropriateAllan McRae
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>
2015-09-07libmakepkg: util/pkgbuild.sh needs processing on buildAllan McRae
pkgbuild.sh contained @DEBUGSUFFIX@ and so needs to be run through the sed command on build. Signed-off-by: Allan McRae <allan@archlinux.org>
2015-08-08Remove ko_KR translationAllan McRae
The "ko_KR" locale is the same as the "ko" locale. Remove the "ko_KR" variant as it is incomplete and has been superseded by "ko" on transifex. Signed-off-by: Allan McRae <allan@archlinux.org>
2015-07-20libmakepkg: move color settings to functionAllan McRae
Signed-off-by: Allan McRae <allan@archlinux.org>
2015-07-20dont remove x bit when marking pkgdir RODave Reisner
f170a94c137d355 potentially causes $pkgdirbase/$pkg to be undeleteable with -R or -C if a previous build was interrupted. We simply can't traverse to this directory, and rm blows up. Signed-off-by: Allan McRae <allan@archlinux.org>
2015-07-20libmakepkg: lint_package requires cd_safeAllan McRae
Signed-off-by: Allan McRae <allan@archlinux.org>
2015-06-20repo-add: Reject armored signaturesJohannes Löthberg
Pacman cannot handle armored signatures, so make repo-add error out if one is detected. Signed-off-by: Johannes Löthberg <johannes@kyriasis.com> Signed-off-by: Allan McRae <allan@archlinux.org>
2015-06-20makepkg: Add flag for printing SRCINFO to stdoutJohannes Löthberg
This commit adds a makepkg option to generate and print the SRCINFO file for a PKGBUILD, required by the new AUR, to stdout. AUR 4.0 will use Git instead of source tarballs for uploading packages, so making makepkg capable of printing the SRCINFO would simplify package management, instead of having to extract it from a source tarball. It is also useful for scripting other things, so that instead of having to parse PKGBUILDs, one can make makepkg generate the SRCINFO and then you can parse that instead, which is much simpler and less error-prone. Signed-off-by: Allan McRae <allan@archlinux.org>
2015-06-20repo-add: Generate unarmored DB signatureJohannes Löthberg
Pacman cannot handle armored signatures, so use gpg's --no-armor flag to force an unarmored signature. Signed-off-by: Allan McRae <allan@archlinux.org>
2015-05-19libmakepkg: extract functions for source download and extractionAllan McRae
Signed-off-by: Allan McRae <allan@archlinux.org>
2015-05-19libmakepkg: extract functions for handling source URLsAllan McRae
Signed-off-by: Allan McRae <allan@archlinux.org>
2015-05-19libmakepkg: fix test styleAllan McRae
Signed-off-by: Allan McRae <allan@archlinux.org>
2015-05-19libmakepkg: move more functions for extracting information from PKGBIULDsAllan McRae
Signed-off-by: Allan McRae <allan@archlinux.org>
2015-05-19libmakepkg: extract more utility functionsAllan McRae
Signed-off-by: Allan McRae <allan@archlinux.org>
2015-05-16libmakepkg: extract get_full_version and get_pkg_archAllan McRae
These functions group in with other functions that extract PKGBUILD information. Signed-off-by: Allan McRae <allan@archlinux.org>
2015-05-16Simplify libmakepkg .gitignoreAllan McRae
2015-05-16makepkg: put further restrictions on pkgbaseAllan McRae
pkgbase should be subject to the same restrictions as pkgname Signed-off-by: Allan McRae <allan@archlinux.org>
2015-05-16makepkg: merge validate_pkgver into check_pkgverAllan McRae
The check that pkgver is non-empty done in check_pkgver should also be performed after running the pkgver() function. Merge validate_pkgver into check_pkgver and run check_pkgver after updating pkgver. Signed-off-by: Allan McRae <allan@archlinux.org>
2015-05-16libmakepkg: extract PKGBUILD linting functionsAllan McRae
Signed-off-by: Allan McRae <allan@archlinux.org>
2015-05-16libmakepkg: extract in_arrayAllan McRae
2015-05-16libmakepkg: move functions for extracting pkgbuild attributesAllan McRae
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>
2015-05-12libmakepkg: fix test bracket styleAllan McRae
Signed-off-by: Allan McRae <allan@archlinux.org>
2015-05-12makepkg: Empty/create only $pkgdir's relevant to current PKGBUILDDavid Macek
Currently makepkg clears the whole $pkgbasedir which is needless. Moreover, in the obscure case of multiple makepkg runs (with different $pkgname) that share a $pkgdirbase, only $pkgdir's from the last run will remain. Since I consider the contents of $pkgdir an important artifact, this commit restricts the deletion to individual $pkgdir's. When CLEANUP is set, the behavior is unchanged. Discussed in: https://lists.archlinux.org/pipermail/pacman-dev/2015-February/019939.html Signed-off-by: Allan McRae <allan@archlinux.org>
2015-05-12makepkg-template: support multiple --template-dirsDominik Fischer
Especially when maintaining local templates in addition to the ones stored in /usr/share/makepkg-template, it can be useful to include templates stored in multiple different locations into one PKGBUILD. This patch makes this possible by allowing --template-dir to be specified multiple times. This also introduces a dedicated error message when a template cannot be found, in contrast to the already existing "Couldn't detect version for template '%s'". If a template of the same name is present in more than one of the given directories, the last one always takes precedence. Neither the default behaviour without the option given, nor the handling of a single template dir is changed. Signed-off-by: Dominik Fischer <d.f.fischer@web.de> Signed-off-by: Florian Pritz <bluewind@xinu.at> Signed-off-by: Allan McRae <allan@archlinux.org>
2015-03-26Add makepkg option --packagelistIvy Foster
makepkg --packagelist prints the name of each package that would normally be produced, minus $PKGEXT, and exits. Implements FS#42150 Signed-off-by: Ivy Foster <joyfulgirl@archlinux.us> Signed-off-by: Allan McRae <allan@archlinux.org>
2015-03-26repo-add: merge desc and depends filesAllan McRae
There is little point in these two files being separated as the whole sync db is parsed at once. Signed-off-by: Allan McRae <allan@archlinux.org>
2015-03-26makepkg: write validpgpkeys to .SRCINFOAllan McRae
Signed-off-by: Allan McRae <allan@archlinux.org>
2015-03-26Always create files databaseAllan McRae
Both the "db" and "files" databases are created in one call to repo-add. Only the "foo.db.tar.xz" name is passed to repo-add. Signed-off-by: Allan McRae <allan@archlinux.org>
2015-03-26repo-add: remove duplication finding old package detailsAllan McRae
The information needed to create a delta entry and remove the old package from the filesystem are the same. Signed-off-by: Allan McRae <allan@archlinux.org>
2015-03-26repo-add: check early for xdelta if it is neededAllan McRae
The check for xdelta3 was done as needed (and not in all cases). Do this check early so that repo-add does not abort part way through. Signed-off-by: Allan McRae <allan@archlinux.org>
2015-03-26repo-add: only update database if entire command succeededAllan McRae
It is not hard to think of situations where the repo database should not be updated unless the whole operation succeeds. Error out before a partial database update occurs. Signed-off-by: Allan McRae <allan@archlinux.org>
2015-03-26repo-add: move database creation into its own functionAllan McRae
Signed-off-by: Allan McRae <allan@archlinux.org>
2015-03-26repo-add: move database rotation into its own functionAllan McRae
Signed-off-by: Allan McRae <allan@archlinux.org>
2015-03-26Merge branch 'maint'Allan McRae
2015-03-26Make get_pkg_arch treat arch as an arrayIvy Foster
We use the get_pkg_arch function with the package name parameter in two places: 1) checking if the package is already built 2) installing build packages Currently this failed when a package override for "arch" was an array, despite all our documentation stating that it is indeed an array. This change makes these two places fail if there is package override for arch that is not an array - i.e. of the form arch='i686'. Signed-off-by: Ivy Foster <joyfulgirl@archlinux.us> Signed-off-by: Allan McRae <allan@archlinux.org>