summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAge
* 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: fix test styleAllan 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>
* Simplify libmakepkg .gitignoreAllan McRae2015-05-16
|
* makepkg: put further restrictions on pkgbaseAllan McRae2015-05-16
| | | | | | pkgbase should be subject to the same restrictions as pkgname 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>
* libalpm: Do a sanity check before manipulating final DB URLDavid Macek2015-05-12
| | | | | | | | | The change in commit 9d96bed9d6b57 causes download errors for the .db.sig file in case the final URL for the .db file contains query strings or other unexpected stuff. This commit isn't intended to be a total solution, but it should eliminate the problem in the most obvious cases. Signed-off-by: Allan McRae <allan@archlinux.org>
* Fix comment in alpm_db_updateDavid Macek2015-05-12
| | | | | | | Fix comment to better explain the magic constant used when allocating a buffer for ".db.sig" URL. Signed-off-by: Allan McRae <allan@archlinux.org>
* libmakepkg: fix test bracket styleAllan McRae2015-05-12
| | | | Signed-off-by: Allan McRae <allan@archlinux.org>
* alpm_logaction: implement documented return valueAndrew Gregory2015-05-12
| | | | | | | "return 0 on success, -1 on error (pm_errno is set accordingly)" Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
* alpm_logaction: allow falling back to syslogAndrew Gregory2015-05-12
| | | | | | | | | Even if opening the log file fails, if a user has enabled syslog we may still be able to log to that. Set the error return value and continue instead of bailing out. Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
* alpm_logaction: check logfile before openingAndrew Gregory2015-05-12
| | | | | | | | valgrind does not like calling open(NULL, ...). This also makes the return value 0 if logfile has not been set. Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
* merge _alpm_logaction into alpm_logactionAndrew Gregory2015-05-12
| | | | | Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com> 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>
* Fix compilation if libarchive headers are not in standard locationCharles Duffy2015-05-12
| | | | | | | | | | | | | With commit 097d5a478b32, including alpm.h also drags in archive.h. Ensure the tools we build that depend on ALPM also include the necessary flags to find libarchive headers if they are not installed in a standard location. [Dan: Add commit message] Signed-off-by: Dan McGee <dan@archlinux.org> Signed-off-by: Allan McRae <allan@archlinux.org> Signed-off-by: Allan McRae <allan@archlinux.org>
* makepkg-template: support multiple --template-dirsDominik Fischer2015-05-12
| | | | | | | | | | | | | | | | | | | | | | 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>
* pacsort: fix warning about signed overflow potential during comparison.Andrew Gregory2015-05-12
| | | | | | Some crazy person assumed we would have fewer than INT_MAX columns. Signed-off-by: Allan McRae <allan@archlinux.org>
* Silence warning from clangAllan McRae2015-05-12
| | | | | | | | clang is wrong - dbfile is always used initialized in that function. Signed-off-by: Allan McRae <allan@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org> Signed-off-by: Allan McRae <allan@archlinux.org>
* Pluralize callback stringAllan McRae2015-05-12
| | | | | | | In English, this string only has it plural form. However, we need to use the pluralized translation as some languages can have multiple plural formats. Signed-off-by: Allan McRae <allan@archlinux.org>
* Update source URLAllan McRae2015-05-12
| | | | Signed-off-by: Allan McRae <allan@archlinux.org>
* close stdin before running install scriptsAndrew Gregory2015-03-26
| | | | | | | | | libalpm does not guarantee that script output will be presented to the user or that stdin will be connected to a terminal. Close stdin so that scripts do not attempt to use it for user interaction. Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
* be_package: fallback to standard filelist loadingAndrew Gregory2015-03-26
| | | | | | | | | | | | | | | | In order to work properly, loading the filelist from an mtree file requires a libarchive patch that has not yet been included in an official release.[1] Under certain circumstances, an unpatched libarchive may refuse to read the mtree file due to inconsistencies between it and the user's file system. In order to allow alpm to recover in this situation, read the mtree data into a temporary filelist that is only copied over to the package if the entire read is successful. [1] https://github.com/libarchive/libarchive/commit/661684170b970ef7d6eff135b57e58a537e8bc53 Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
* add_entry_to_files_list: pass filelist directlyAndrew Gregory2015-03-26
| | | | | | | | Allows entries to be added to arbitrary filelists not connected to a package. Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com> 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>
* repo-add: merge desc and depends filesAllan McRae2015-03-26
| | | | | | | 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>
* makepkg: write validpgpkeys to .SRCINFOAllan McRae2015-03-26
| | | | Signed-off-by: Allan McRae <allan@archlinux.org>
* PKGBUILD.5: have epoch directly following pkgver/pkgrelAllan McRae2015-03-26
| | | | | | These three fields should be grouped together. Signed-off-by: Allan McRae <allan@archlinux.org>
* update repo-add documentation for removal of -f flagAllan McRae2015-03-26
| | | | Signed-off-by: Allan McRae <allan@archlinux.org>
* Always create files databaseAllan McRae2015-03-26
| | | | | | | 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>
* repo-add: remove duplication finding old package detailsAllan McRae2015-03-26
| | | | | | | 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>
* repo-add: check early for xdelta if it is neededAllan McRae2015-03-26
| | | | | | | 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>
* repo-add: only update database if entire command succeededAllan McRae2015-03-26
| | | | | | | | 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>
* repo-add: move database creation into its own functionAllan McRae2015-03-26
| | | | Signed-off-by: Allan McRae <allan@archlinux.org>
* repo-add: move database rotation into its own functionAllan 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>
| * Update PKGBUILD-split.proto allowed overridesAllan McRae2015-03-26
| | | | | | | | | | | | | | Commit 8a02abcf194 disallowed overridding pkgver/pkgrel/epoch. Update the split package prototype to refelct this change. 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>
* | Actually return the error value of check_db_localCharles Pigott2015-03-15
| | | | | | | | | | Signed-off-by: Charles Pigott <charlespigott@googlemail.com> 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>
* | PKGBUILD.5.txt: Clarify note about variables availableJohannes Löthberg2015-03-15
| | | | | | | | | | | | Reported-by: Florian Pritz <bluewind@xinu.at> Signed-off-by: Johannes Löthberg <johannes@kyriasis.com> Signed-off-by: Allan McRae <allan@archlinux.org>
* | PKGBUILD.5.txt: Add note about functions starting in $srcdirJohannes Löthberg2015-03-15
| | | | | | | | | | Signed-off-by: Johannes Löthberg <johannes@kyriasis.com> Signed-off-by: Allan McRae <allan@archlinux.org>
* | remove: use strcmp for files in skip_removeAndrew Gregory2015-03-03
| | | | | | | | | | | | | | | | | | Paths from noupgrade, the transaction skip_remove, and package backup lists were combined into a single list matched using fnmatch causing paths with glob characters to match unrelated files. Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
* | sync_prepare: exclude removals from resolvedepsAndrew Gregory2015-03-03
| | | | | | | | | | Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>