summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAge
* makepkg: handle "epoch=" in PKGBUILD with pkgver functionAllan McRae2014-06-29
| | | | | | | | | | After resourcing the PKGBUILD in update_pkgver(), set the epoch to 0 if it is empty. Also adjust the get_full_version function to be more robust if epoch somehow still is empty. Fixes FS#41022. Signed-off-by: Allan McRae <allan@archlinux.org>
* use monotonic clock for progress updatesAndrew Gregory2014-06-29
| | | | | | | | | | | | gettimeofday is susceptible to backwards system time adjustments, skewing or altogether breaking progress output. For the sake of platforms that lack clock_gettime support, gettimeofday is retained as a fallback. Fixes FS#36983 Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
* libalpm: check for valid public key algorithmChristian Hesse2014-06-29
|
* cache terminal size, add SIGWINCH handler to resetDave Reisner2014-06-29
| | | | | | | | | | | | | Refactoring getcols, yet again. We do the following: 1) Introduce a static global in src/pacman/util.c 2) getcols always prefers this cached value, but will derive it from the COLUMNS environment var, the characteristics of stdout, or a sane default (in that order). 3) Introduce a SIGWINCH signal handler to reset the cached value, meaning we only call ioctl when we don't know the value. On my machine, pacman -Syy goes from ~4300 ioctl calls to 3.
* Revert refactoring in fa0c1e14Allan McRae2014-06-29
| | | | | | | This will cause the code to break as soon as we handle another signal such as SIGWINCH... Signed-off-by: Allan McRae <allan@archlinux.org>
* pacman: Correct signal handler comment and refactorSilvan Jegen2014-06-24
| | | | | | | | | | | | | One of the comments for this function is out of sync with the code. Since the code exhibits the more sane behavior of treating SIGINT and SIGHUB the same way (by not exiting pacman when there is a commit in flight) we adjust the comment. Given this code flow, the if/else statements can be simplified somewhat as well. Signed-off-by: Silvan Jegen <s.jegen@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
* events: Make alpm_event_t an union of all event-specific structOlivier Brunel2014-06-24
| | | | | Signed-off-by: Olivier Brunel <jjk@jjacky.com> Signed-off-by: Allan McRae <allan@archlinux.org>
* Update the question callbackOlivier Brunel2014-06-24
| | | | | | | | | | | | Much like with events, instead of using a bunch of void* arguments for all questions, we now send one pointer to an alpm_question_t union. This contains the type of question that was triggered. With this information, a question-specific struct can be accessed in order to get additional arguments. Signed-off-by: Olivier Brunel <jjk@jjacky.com> Signed-off-by: Allan McRae <allan@archlinux.org>
* alpm.h: Move alpm_errno_t definition upOlivier Brunel2014-06-24
| | | | | | | | | | | Because for the new question types, we'll need to use alpm_errno_t let's move its definition up. Of course to do so, we also need to move that of alpm_handle_t as well, so move all opaque structures on top. Signed-off-by: Olivier Brunel <jjk@jjacky.com> Signed-off-by: Allan McRae <allan@archlinux.org>
* Move break to a new line for consistencyHong Shick Pak2014-06-23
| | | | | | | | This was the only break that didn't have its own line in the function parsearg_query. Signed-off-by: Hong Shick Pak <hong@hspak.com> Signed-off-by: Allan McRae <allan@archlinux.org>
* Use C locale for bsdtar calls during package creationAllan McRae2014-06-12
| | | | | | | This ensures packages build on a UTF-8 locale system with non-ASCII character names can be installed on non-UTF-8 systems. Signed-off-by: Allan McRae <allan@archlinux.org>
* makepkg: Remove redundant sig generation commentJohannes Löthberg2014-06-10
| | | | | | | Remove the comment above the signature generation command as the command is self explanatory and no longer does what the comment says. Signed-off-by: Allan McRae <allan@archlinux.org>
* Add test case for the perl 5.20 dependency breakageFlorian Pritz2014-06-10
| | | | | | | This test currently fails. Signed-off-by: Florian Pritz <bluewind@xinu.at> Signed-off-by: Allan McRae <allan@archlinux.org>
* Add compatibility with gpgme-1.5.0Allan McRae2014-06-02
| | | | Signed-off-by: Allan McRae <allan@archlinux.org>
* Clarify that -Ql prints a file listAllan McRae2014-05-25
| | | | | | FS#40234 Signed-off-by: Allan McRae <allan@archlinux.org>
* makepkg: pass "--nocolor" to pacmanAndrew DeMaria2014-05-25
| | | | | | FS#39982. Signed-off-by: Allan McRae <allan@archlinux.org>
* makepkg: Force buildscripts to be in startdirAllan McRae2014-05-25
| | | | | | | | | | | | We expect all source file to lie in $startdir. However, using "makepkg -p <buildscript>" can currently allows people to specify buildscripts in other directories. This results in confusion about where other sources should lie (in startdir or in the directory that the buildscript is in). Explicitly disable using -p for files in other directories to avoid this issue. Fixes FS#40293. 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>
* makepkg: Introduce validpgpkeys arrayThomas Bächler2014-05-23
| | | | | | | | | | If validpgpkeys is set in the PKGBUILD, signature checking fails if the fingerprint of the key used to create the signature is not listed in the array. The key's trust value is ignored. Signed-off-by: Allan McRae <allan@archlinux.org>
* makepkg: Treat a signature from an untrusted key as an errorThomas Bächler2014-05-23
| | | | Signed-off-by: Allan McRae <allan@archlinux.org>
* makepkg: Use read to parse status file during signature verification.Thomas Bächler2014-05-23
| | | | | | | | | | Instead of invoking grep multiple times, parse the status file once. This refactoring also changes the behvaiour when signature verification fails due to a missing public key: It is now an error instead of a warning. Signed-off-by: Allan McRae <allan@archlinux.org>
* dload: avoid using CURLOPT_FAILONERRORDave Reisner2014-05-22
| | | | | | | | | Use of this flag causes connections to be closed on 404s -- a common occurrence when your config sets DatabaseOptional. Handle the error gracefully, so that the connection can be reused. Signed-off-by: Dave Reisner <dreisner@archlinux.org> Signed-off-by: Allan McRae <allan@archlinux.org>
* util: Use off_t instead of int for size valuesFlorian Pritz2014-05-22
| | | | | | | | | | | | | Old output: > Total Installed Size: -1527.44 MiB Fixed: > Total Installed Size: 2568.56 MiB Bug introduced in 7b8f8753b15037bf4a88126ffde8195416432c72. Signed-off-by: Florian Pritz <bluewind@xinu.at> Signed-off-by: Allan McRae <allan@archlinux.org>
* remove.c: downgrade TRANS_DUP_TARGET to warningAndrew Gregory2014-05-07
| | | | | | | Matches the behavior for sync packages. Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
* pactest: treat arguments as files instead of globsAndrew Gregory2014-05-04
| | | | | | | | | | glob() returns an empty list if input does not match any files, causing non-existent test files to be silently skipped. Treating arguments as files causes pactest to immediately bail out with an appropriate error message on non-existent files. Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
* pmdb.py: change siglevel name to RequiredAndrew Gregory2014-05-04
| | | | | | | | | "Always" is not a valid siglevel. sign002.py was succeeding because pacman failed to parse the resulting config file rather than a failed signature check. Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
* register_syncdb: reject db names that contain /Andrew Gregory2014-05-04
| | | | | | | | | | alpm downloads databases based on basename causing [foo] and [bar/foo] to silently overwrite each other. Also remove an extra tab Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
* strtrim: reset pointer after trimming leading whitespaceDave Reisner2014-04-21
| | | | | | | | | Breakage introduced in 92216c5864efccac when we changed the signature of strtrim to return something more useful. Fixes FS#39976. Signed-off-by: Allan McRae <allan@archlinux.org>
* makepkg: use dash instead of underscore in /usr/lib/debug/.build-idSteven Noonan2014-04-21
| | | | Signed-off-by: Allan McRae <allan@archlinux.org>
* repo-add: declare pkgbase as localAllan McRae2014-03-27
|
* Always supply base name and version info in .PKGFILE if neededAllan McRae2014-03-27
| | | | | | | | Provide pkgbase information for non-split packages with pkgbase set. Also record the version of the "base" package. This is useful for matching package files to source packages. Signed-off-by: Allan McRae <allan@archlinux.org>
* makepkg: sign source packages with --signAllan McRae2014-03-27
| | | | Signed-off-by: Allan McRae <allan@archlinux.org>
* conf.c: remove extra indentationAndrew Gregory2014-03-27
| | | | | Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
* check config_new return valueAndrew Gregory2014-03-27
| | | | | Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
* pacman/upgrade: Fix memory leaksSören Brinkmann2014-03-27
| | | | | | | Make sure allocated memory is freed before returning. Signed-off-by: Sören Brinkmann <soeren.brinkmann@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
* pacman/upgrade: Refactor memory managementSören Brinkmann2014-03-27
| | | | | | | | Refactor the upgrade routine to use an array that can be allocated in one step instead of an alpm_list that is gradually extended in loops. Signed-off-by: Sören Brinkmann <soeren.brinkmann@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
* pacman/upgrade: Check malloc() return valueSören Brinkmann2014-03-16
| | | | | | | Check the return value of malloc() before dereferencing the returned pointer. Signed-off-by: Sören Brinkmann <soeren.brinkmann@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
* makepkg: Reorder some entries in usage() and getoptsPierre Neidhardt2014-03-13
| | | | | Signed-off-by: Pierre Neidhardt <ambrevar@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
* makepkg: enforce fakeroot usageAllan McRae2014-03-12
| | | | | | | | | | Packaging outside of fakeroot can result in incorrect permissions for package files. It has been years since fakeroot issues during packaging were common, so it is safe to enforce fakeroot usage. If using fakeroot is impossible for some reason, a two line wrapper script will suffice to fool makepkg. Signed-off-by: Allan McRae <allan@archlinux.org>
* makepkg: Remove --asroot optionAllan McRae2014-03-12
| | | | | | | The days of fakeroot being error ridden are long gone, so there is no valid reason to run makepkg as root. Signed-off-by: Allan McRae <allan@archlinux.org>
* makepkg: Add a --noarchive option to inhibit archive creationPierre Neidhardt2014-03-12
| | | | | | | | | | | | | | | | | | | | | | | | | | 1. Packagers who want to test the package() function, i.e. to check the content of the pkg/ folder. 2. Developers who want to check how the packaged version of a program looks, in other words how the pkg/ folder looks. 3. For users of systems with no port tree, makepkg can ease package creation. However the resulting archive of the whole makepkg process is often useless. For all situations, makepkg will usually be called several times. But no archive (the final package) is needed in any cases. The archive creation ends up being a waste of time and resource, especially for big applications and slow machines. Since this option aborts the process prematurely, it behaves like the -o,--nobuild option, i.e. any other option acting on later stages in the process will be automatically discarded. For --noarchive, it means that in $ makepkg --noarchive --install the '--install' option does not do anything. Signed-off-by: Pierre Neidhardt <ambrevar@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
* makepkg: Comment on install_package() return codePierre Neidhardt2014-03-12
| | | | | | | | | Previously, install_package() return code was either used as exit code or ignored. This was rather confusing. The return code is now always ignored and a comment on install_package() has been added. Signed-off-by: Pierre Neidhardt <ambrevar@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
* note that TotalDownload and XferCommand are incompatible.Matthias Krüger2014-03-08
| | | | | | | | | | | | | | | | | | | | Another small patch that I made long ago (but was too lazy to submit back then). When using XferCommand, TotalDownload option is not take into account. Regards, Matthias >From bff946cd9969b6bc6243875e0759f0ee02e487de Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matthias=20Kr=C3=BCger?= <matthias.krueger@famsik.de> Date: Thu, 9 May 2013 13:21:04 +0200 Subject: [PATCH] doc: pacman.conf: note that TotalDownload and XferCommand options are incompatible. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Matthias Krüger <matthias.krueger@famsik.de> Signed-off-by: Allan McRae <allan@archlinux.org>
* Use MALLOC throughtout libalpmAllan McRae2014-03-08
| | | | | | | | Use MALLOC instead of malloc for safety in libalpm. Some changes are pure refactoring, but for others this provides a success check for memory allocation. Signed-off-by: Allan McRae <allan@archlinux.org>
* remove check for unused ALPM_ERR_PKG_IGNOREDAndrew Gregory2014-03-04
| | | | | | | alpm_add_pkg does not ignore packages. Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
* simplify check for leading "local/"Andrew Gregory2014-03-04
| | | | | Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
* sync_prepare: ignore explicitly removed conflictsAndrew Gregory2014-03-04
| | | | | Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com> 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.
* makepkg.8: Fix typoPierre Neidhardt2014-03-03
| | | | | Signed-off-by: Pierre Neidhardt <ambrevar@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
* pactest: add prefix to temporary directoryAndrew Gregory2014-03-03
| | | | | | | This makes cleaning up /tmp after several --keep-root runs much easier. Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>