summaryrefslogtreecommitdiff
path: root/scripts/makepkg.sh.in
Commit message (Collapse)AuthorAge
...
* libmakepkg: move color settings to functionAllan McRae2015-07-20
| | | | Signed-off-by: Allan McRae <allan@archlinux.org>
* dont remove x bit when marking pkgdir RODave Reisner2015-07-20
| | | | | | | | 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>
* makepkg: Add flag for printing SRCINFO to stdoutJohannes Löthberg2015-06-20
| | | | | | | | | | | | | | | 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>
* 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: move more functions for extracting information from PKGBIULDsAllan McRae2015-05-19
| | | | Signed-off-by: Allan McRae <allan@archlinux.org>
* libmakepkg: extract more utility functionsAllan McRae2015-05-19
| | | | Signed-off-by: Allan McRae <allan@archlinux.org>
* libmakepkg: extract get_full_version and get_pkg_archAllan McRae2015-05-16
| | | | | | | These functions group in with other functions that extract PKGBUILD information. Signed-off-by: Allan McRae <allan@archlinux.org>
* makepkg: merge validate_pkgver into check_pkgverAllan McRae2015-05-16
| | | | | | | | 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>
* 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>
* makepkg: Empty/create only $pkgdir's relevant to current PKGBUILDDavid Macek2015-05-12
| | | | | | | | | | | | | | | 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>
* Add makepkg option --packagelistIvy Foster2015-03-26
| | | | | | | | | | 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>
* makepkg: write validpgpkeys to .SRCINFOAllan McRae2015-03-26
| | | | Signed-off-by: Allan McRae <allan@archlinux.org>
* Merge branch 'maint'Allan McRae2015-03-26
|\
| * Make get_pkg_arch treat arch as an arrayIvy Foster2015-03-26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| * fix source package signing with SRCPKGDIR setChristian Hesse2015-03-26
| | | | | | | | | | Signed-off-by: Christian Hesse <mail@eworm.de> Signed-off-by: Allan McRae <allan@archlinux.org>
* | libmakepkg: move helper functions into tidy/stripAllan McRae2015-03-15
| | | | | | | | Signed-off-by: Allan McRae <allan@archlinux.org>
* | Merge branch 'maint'Allan McRae2015-02-20
|\|
| * Fix Bazaar cloning in makepkg.Renato Silva2015-02-14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There was some manual check to know if the local repository was really a clone of the one specified in PKGBUILD. This check has been removed because it is buggy and not necessary. It is buggy because this check needs to be semantic, not a simple string comparison. For example, I was blocked from building a PKGBUILD because Bazaar was returning two different strings for the same location (for HTTP one was url-encoded while the other was not, and for local paths one was absolute while the other was relative). While this may be a bug in Bazaar, the check is unreliable since the comparison is not semantic (http://foo.com/%2Bplus and http://foo.com/+plus obviously refer to the same location for example). Specially, it is useless because the intention is updating the existing local clone. However, if the local clone is not a real clone of the repository specified in PKGBUILD (which was what this buggy check tried to tell), next step which is a pull operation will fail anyway. This is because bzr pull does not perform merges, it just makes one branch into a mirror of another. There was a reason provided when this manual check was added for Git, but no reason provided for copying such check when Bazaar support was added, see commits below. In fact, Mercurial lacks such manual check. * c926c39b0481ec3db931fff1f86db0c49d78976b * 3b02f80dcb3159a7ab0c673d5eae971ad7504e7f Fixes FS#43448. 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: rename other_options to build_optionsAllan 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>
* | add option to optimize PNG images with optipngChristian Hesse2015-02-01
| | | | | | | | | | | | | | | | | | | | | | | | This can decrease package size by optimizing PNG image size. Images are just stored with better compression and/or filter options. The actual image content is not altered. Additionally this can automatically fix broken PNG images which caused some trouble lately. Signed-off-by: Christian Hesse <mail@eworm.de> Signed-off-by: Allan McRae <allan@archlinux.org>
* | remove globbing for upx and make UPXFLAGS an array variableChristian Hesse2015-02-01
| | | | | | | | | | Signed-off-by: Christian Hesse <mail@eworm.de> Signed-off-by: Allan McRae <allan@archlinux.org>
* | Update copyright notices for 2015Allan McRae2015-02-01
| | | | | | | | Signed-off-by: Allan McRae <allan@archlinux.org>
* | Merge branch 'maint'Allan McRae2015-02-01
|\|
| * makepkg: refix removing static libraries when shared uses absolute symlinksAllan McRae2015-02-01
| | | | | | | | | | | | | | | | Commit 9e5e86aa was supposed to fix this. Instead I picked another [[ -f ]] statement in the same region and added the hardlink test to it instead, thus not fixing the bug. Signed-off-by: Allan McRae <allan@archlinux.org>
| * makepkg: Set the working copy destination explicitly when cloning in extract_gitLukáš Jirkovský2015-02-01
| | | | | | | | | | | | | | | | | | This fixes the issue where if the user explicitly set the name of the cloned source to eg. foo.git, the directory name in $SRCDEST would be foo.git as expected, but the clone in $srcdir would be stripped of the .git suffix. Signed-off-by: Lukáš Jirkovský <l.jirkovsky@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
* | Merge branch 'maint'Allan McRae2015-01-12
|\|
| * makepkg: clear destination array in array_buildAllan McRae2015-01-12
| | | | | | | | | | | | | | | | | | | | | | If an already used array is passed array_build, some entries from the old array could be carried over if the old array was longer than the new one. Clear the destination array before adding elements to it to prevent this issue. Fixes: https://bugs.archlinux.org/task/43387 Signed-off-by: Allan McRae <allan@archlinux.org>
* | Merge branch 'maint'Allan McRae2015-01-11
|\|
| * makepkg: restore attr merging for write_pkginfoDave Reisner2015-01-11
| | | | | | | | | | | | acc639adf20d removed this, but shouldn't have. Signed-off-by: Allan McRae <allan@archlinux.org>
| * makepkg: avoid nested quoting in string replacementDave Reisner2015-01-11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | I suspect this is just wrong -- you never need to quote the replacement side of a PE. In bash 4.3, this is essentially a no-op, but because of a bug in bash 4.2, we get embedded quotes as a result of this replacement. The relevant changelog item in bash is: Fixed a bug that caused single quotes that resulted from $'...' quoting in the replacement portion of a double-quoted ${word/pat/rep} expansion to be treated as quote characters. But this doesn't apply to us. Let's just drop the excessive quoting... Signed-off-by: Allan McRae <allan@archlinux.org>
| * makepkg: fix removing static libraries when shared use absolute symlinksAllan McRae2015-01-11
| | | | | | | | | | | | | | | | When a shared library uses an absolute symlink for its its .so file, the check if the shared version of a static library exists fails. Test for the presence of a broken symlink too. Signed-off-by: Allan McRae <allan@archlinux.org>
* | Merge branch 'maint'Allan McRae2015-01-02
|\|
| * makepkg: avoid expansion of var in arithmetic contextDave Reisner2015-01-02
| | | | | | | | | | | | | | | | | | | | This bombs out when "$trusted" expands to the empty string. We're better off passing the var by name and letting bash default to "0" when the var is empty Fixes: https://bugs.archlinux.org/task/43269 Signed-off-by: Allan McRae <allan@archlinux.org>
* | Merge branch 'maint'Allan McRae2014-12-28
|\|
| * Fix .SRCINFO output with architecture specific fieldsAllan McRae2014-12-28
| | | | | | | | | | | | Do not merge the architecture specific fields when creating a .SRCINFO file. Signed-off-by: Allan McRae <allan@archlinux.org>
* | makepkg: print the name of the source array being checkedDave Reisner2014-12-27
| | | | | | | | | | | | | | | | I don't see an easy fix to avoid printing this more than once, so let's at least differentiate the messaging so that it's more clear what's going on. Signed-off-by: Allan McRae <allan@archlinux.org>
* | makepkg: call out the source array(s) missing checksumsDave Reisner2014-12-27
|/ | | | Signed-off-by: Allan McRae <allan@archlinux.org>
* makepkg: fix typo in dep array nameDave Reisner2014-12-27
| | | | | | | We fixed this up to check architecture specific sources in ec679e09b2, but fudged the array name in the in_array call. Signed-off-by: Allan McRae <allan@archlinux.org>
* makepkg: properly correlate checksums for multiple sourcesDave Reisner2014-12-24
| | | | | | | | | | | | | | | | Previously, we used a single boolean value to determine correlation of sources to checksums. Since the introduction of arch-specific sources, this is no longer sufficient, as we must ensure that we have checksums for (potentially) multiple source arrays. This change inlines the logic of have_sources to build an associative array of source array names, unsetting them as we discover their checksums. The error condition then becomes a non-empty correlation array. Fixes: https://bugs.archlinux.org/task/43192 Signed-off-by: Allan McRae <allan@archlinux.org>
* makepkg: download sources for all architectures when making source packageAllan McRae2014-12-24
| | | | | | | We validated all sources when making a source package, whether or not they are included in the tarball. Signed-off-by: Allan McRae <allan@archlinux.org>
* Check architecture specific fields for VCS supportAllan McRae2014-12-22
| | | | Signed-off-by: Allan McRae <allan@archlinux.org>
* Fix double spaces in "Running %s as root is not allowed" messageTimothy Redaelli2014-12-21
| | | | Signed-off-by: Allan McRae <allan@archlinux.org>
* makepkg: correctly add changelog filesDave Reisner2014-12-18
| | | | | | | | | | | | | | Before this, we'd see bizzare behavior of: -> Adding changelog file (systemd.install)... And, changelog files in the global section would not be added at all. The code is clearly wrong here, as it references 'install' within a loop of 'changelog' and 'install'. Let's use parameter indirection to ensure that the proper file is identified and added. Signed-off-by: Allan McRae <allan@archlinux.org>