summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAge
...
* filelist_sort: check if filelist is presortedAndrew Gregory2017-01-04
| | | | | Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
* add _alpm_filelist_sortAndrew Gregory2017-01-04
| | | | | Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
* repo-add: sort file list entriesAndrew Gregory2017-01-04
| | | | | Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
* makepkg: sort package contentsAndrew Gregory2017-01-04
| | | | | | | | | | By passing a NUL-separated filelist, this also fixes a bug where files that look like bsdtar options in the package root could break the package ("-C" was particularly troublesome because bsdtar interprets it as an option anywhere in the file list, even following "--"). Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
* find_fileconflicts: rename tmpfiles -> newfilesAndrew Gregory2017-01-04
| | | | | | | | The files belong to the new version of a package being installed, they are not temporary in any way. Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
* conflict: skip dir children when replacing a fileAndrew Gregory2017-01-04
| | | | | | | | | | | | | When replacing a file with a directory, any files under that directory do not need to be checked for conflicts. This prevents possible false-positive conflicts where the file being replaced is a symlink. We were already skipping the directory children when the file was owned by the previous version of a package being upgraded. This extends that to other packages being removed. Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
* ini: only recognize comments at beginning of lineAndrew Gregory2017-01-04
| | | | | | | | | Allows the hash sign to be used in values in config files and hooks. Fixes #48702 Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
* dload: s/CURLOPT_WRITEHEADER/CURLOPT_HEADERDATA/Dave Reisner2017-01-04
| | | | | | The former is really old, and should be avoided. Signed-off-by: Allan McRae <allan@archlinux.org>
* pacman: ensure linkage against libarchiveDave Reisner2017-01-04
| | | | | | Fixes build on ubuntu/debian platforms. Signed-off-by: Allan McRae <allan@archlinux.org>
* configure.ac: Use POSIX compatible equality checksDave Reisner2017-01-04
| | | | Signed-off-by: Allan McRae <allan@archlinux.org>
* makepkg: warn about dotfiles in package rootAndrew Gregory2017-01-04
| | | | | | | | libalpm reserves paths starting with '.' for its own use and will not extract any other than those it recognizes. Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
* extract db files with dbonlyAndrew Gregory2017-01-04
| | | | | | | | | | | Some database files (install, mtree, and changelog) are extracted directly from the package, but DBONLY was skipping extraction altogether, causing those files to be missing after the transaction. Fixes #52052 Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
* Update copyright yearsAllan McRae2017-01-04
| | | | Signed-off-by: Allan McRae <allan@archlinux.org>
* Fix documentation of -DqAllan McRae2017-01-04
| | | | Signed-off-by: Allan McRae <allan@archlinux.org>
* makepkg: Disallow forward slashes in pkgverSteef Hegeman2017-01-04
| | | | | | | | | | | scripts/libmakepkg/lint_pkgbuild/pkgver.sh.in now raises an error when pkgver contains forward slashes. pkgver containing a forward slash results in a package filename containing a forward slash, which isn't a valid filename. Signed-off-by: Steef Hegeman <steefhegeman@hotmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
* Build a single debug package for all packages from a PKGBUILDAllan McRae2016-12-05
| | | | | | | | | | | | | | | | | | We want to provide source files with debug symbol packages to allow easy stepping through the program. This becomes difficult with split packages due to the binaries in many of these sharing source files across packages. There are (at least) two solutions to this problem. #1: ensure common source files are located in the debug package for the package lowest in the dependency chain and add dependencies to the debug packages so all require source files are present, or #2: create one debug package for all split packages in a PKGBUILD. The second is a more robust approach despite potentially creating very large debug packages. This patch creates a single $pkgbase-debug package and adds provides such that installing $pkgname-debug will always work. Signed-off-by: Allan McRae <allan@archlinux.org>
* be_local: remove unused error returnAndrew Gregory2016-12-05
| | | | | | | | LAZY_LOAD has completely ignored the errret value since commit 307a6de17a3bca9f8666b33aa3fb9a8dd88c300b in 2011. Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
* add generated scripts to gitignoreChristian Hesse2016-12-05
| | | | | | | These files are generated at build time. Ignore in git. Signed-off-by: Christian Hesse <mail@eworm.de> Signed-off-by: Allan McRae <allan@archlinux.org>
* Make DUFLAGS be overrideable during configureAlastair Hughes2016-12-05
| | | | | | | | | | Not all du implementations on linux accept --apparent-size, so let the user configure the arguments passed to du if required. This fixes FS#47943. Signed-off-by: Alastair Hughes <hobbitalastair@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
* Suppress more output messages on successful -D options with -qAllan McRae2016-12-05
| | | | | | Suppress output on successful use of --asdeps and --asexplicit. Signed-off-by: Allan McRae <allan@archlinux.org>
* Give a "success!" message on database checkPatrick Eigensatz2016-12-05
| | | | | | | | | | 'pacman -Dk' prints a "success!" message if there were no errors. It is possible to suppress the output using the '-q / --quiet' flag. This implements the feature discussed at https://bugs.archlinux.org/task/50087 Signed-off-by: Patrick Eigensatz <patrick.eigensatz@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
* Parametrise the different ways in which the payload is resetMartin Kühne2016-12-05
| | | | | | | | | | | | | | | | | | | In FS#43434, Downloads which fail and are restarted on a different server will resume and may display a negative download speed. The payload's progress in libalpm was not properly reset which ultimately caused terminal noise because the line width calculation assumes positive download speeds. This patch fixes the incomplete reset of the payload by mimicing what be_sync.c:alpm_db_update() does over in sync.c:download_single_file(). The new dload.c:_alpm_dload_payload_reset_for_retry() extends beyond the current behavior by updating initial_size and prevprogress for this case. This makes pacman reset the progress properly in the next invocation of the callback and display positive download speeds. Fixes FS#43434. Signed-off-by: Martin Kühne <mysatyre@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
* libalpm/signing: support EDDSA from gpgme 1.7.0Christian Hesse2016-12-05
| | | | | Signed-off-by: Christian Hesse <mail@eworm.de> Signed-off-by: Allan McRae <allan@archlinux.org>
* makepkg: reject packages with newlines in pathsAndrew Gregory2016-12-05
| | | | | | | libalpm's local database format does not support paths with newlines. Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
* makepkg: abort on lint_package errorsAndrew Gregory2016-12-05
| | | | | | | Allows lint_package to prevent makepkg from creating an invalid package. Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
* makepkg: reject package data with newlinesAndrew Gregory2016-12-05
| | | | | | | The PKGINFO format cannot handle values that contain newlines. Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
* makepkg: fix find_lib{depends, provides} resultsAndrew Gregory2016-12-05
| | | | | | | | | Neither function was checking for the existence of actual results before calling printf, resulting in them returning a list with a single empty value if there were no depends/provides. Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
* dload: use curl's keepalive mechanismDave Reisner2016-12-05
| | | | | | | This does exactly the same thing as it code it replaces, but punt to curl to do it for brevity. Requires curl 7.25.0, which we already cover. Signed-off-by: Allan McRae <allan@archlinux.org>
* makepkg: unset potentially architecture-specific varsDave Reisner2016-12-05
| | | | | | I'm not convinced this is a worthwhile goal, but let's follow suit. Since we can't know the names of all the vars that might exist, unset them by pattern.
* makepkg: fix quoting in calls to dependency checkingDave Reisner2016-12-05
|
* makepkg: fix quoting in calls to check_depsDave Reisner2016-12-05
| | | | | The inside needs quoting, and this is separate from the declartion, which does not (in these cases).
* makepkg: make run_function_safe more robustDave Reisner2016-12-05
| | | | | | | | | | | | | | | | | | | Use shopt to set/reset errexit and errtrace, which lets us: 1) be more vigilant, resetting anything the user might do to us in PKGBUILD functions. 2) use human-readable words (errexit vs. -e) On top of this, introduce a new save/restore for the shell's other shopts. A user should not have any expectations that what happens in one function is available in another function, if it isn't explicitly defined in the PKGBUILD. While this change does not make that assertion, it gets us closer. We also replace a variable which comes from out of nowhere (pkgfunc) with the positional parameter containing the same value. Quoting is adjusted to make the expansion happen at the time the trap is set, rather than later on.
* makepkg: remove vestiges of global errexitDave Reisner2016-12-05
| | | | | These 'set +E' diversions haven't been needed since global errexit was disabled in dca10b062f2 (January 2012).
* makepkg.conf: add -g to default curl optionsDave Reisner2016-12-05
| | | | | | This disables globbing, which should never be used in source URL specifications as it would lead to mismatches in the checksum mapping and un-checked sources.
* Make sure all proper scripts are installed instead of the wrappersJohannes Löthberg2016-12-05
| | | | | | | | | | After 1f8f0bd9ac4c11cdc1b9506f9f64d8192ecad4ee all scripts that were changed to using the wrapper for in-tree use have the wrappers installed to the system instead of the actual script, so change the install command to support all wrapped scripts instead of just makepkg. Signed-off-by: Johannes Löthberg <johannes@kyriasis.com> Signed-off-by: Allan McRae <allan@archlinux.org>
* Remove pacsortAllan McRae2016-12-05
| | | | | | Moved to the pacman-contrib project Signed-off-by: Allan McRae <allan@archlinux.org>
* Revert "[RFC] Provide source files for useful debug packages"Allan McRae2016-12-05
| | | | | | This reverts commit a79c0038ae84c38fe063bd7426a839f3c01c10e8. I merged the wrong branch into master...
* [RFC] Provide source files for useful debug packagesAllan McRae2016-11-02
| | | | | | | | | | | Debug packages are fairly useless currently because the soucre files needed for stepping through code etc are not packaged with them. This patch adds the needed source files to the debug package and adjusts the debug info to look at the /usr/src/debug/ directory for them rather than the build location. This requires using the "debugedit" program which is provided as part of the RPM sources. Signed-off-by: Allan McRae <allan@archlinux.org>
* Represent bitfields as ints, not enumsIvy Foster2016-10-22
| | | | | | | | | | Many bitfield variables are declared to be enums, because they are generated using bitwise operations on enums such. However, their actual values aren't necessary members of their parent enum, so declaring them 'int' is more accurate. Signed-off-by: Ivy Foster <ivy.foster@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
* Add ALPM_ERR_OK to _alpm_errno_tIvy Foster2016-10-22
| | | | | | | | | | This allows functions which return an _alpm_errno_t to always return a genuine _alpm_errno_t for consistency, even in cases where there are no errors. Since ALPM_ERR_OK = 0, their callers can still simply check 'err = some_fn(); if (!err) { ... }'. Signed-off-by: Ivy Foster <ivy.foster@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
* doc/pacman.8.txt: improve description of -QtIvy Foster2016-10-22
| | | | | | | | Though correct, the wording of the description of Query's -t/--unrequired option was confusing. Closes FS#48144. Signed-off-by: Ivy Foster <ivy.foster@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
* makepkg: print files with refs to $srcdir/$pkgdirIvy Foster2016-10-22
| | | | | | | | Since rewriting build_references() anyway, tweaked quoting. Implements FS#31558. Signed-off-by: Ivy Foster <ivy.foster@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
* Remove pactreeAllan McRae2016-10-22
| | | | | | This has been moved to the pacman-contrib project. Signed-off-by: Allan McRae <allan@archlinux.org>
* Use coreutils binaries for checking/generating checksumsAllan McRae2016-10-22
| | | | | | | | | | | | | | | | | If pacman is build against a crypto library other than openssl, it makes no sense to require makepkg to use it. The only currently considered alternative to openssl is nettle, which has no binary for base64 encode/decode. This means that we could replace the hashing cacluations with nettle-hash, but would require base64 from coreutils. Given makepkg already relies heavily on coreutils, we might as well use all the coreutils hashing binaries too. This patch also improves the checking of required binaries for hashing operations. Signed-off-by: Allan McRae <allan@archlinux.org>
* Allow replacing libcrypto with libnettle in pacmanFlorian Weigelt2016-10-22
| | | | | | | | | Add a --with-nettle configure option that directs pacman to use the libnettle hashing functions. Only one of the --with-libssl and --with-nettle configure options can be specified. [Allan: rewrote configure check] Signed-off-by: Allan McRae <allan@archlinux.org>
* 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>
* Use f_bavail for diskspace calculationsMartin Kühne2016-10-12
| | | | | | | | | | | This should make pacman's behavior consistent with GNU coreutils df, as well as follow advice from affected filesystems' devs as well as `man statvfs`. This fixes FS#37402 Signed-off-by: Martin Kühne <mysatyre@gmail.com> 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>