Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2019-01-10Add [ignored] to -Qu output for packages in repos that are not Usage = UpgradeAllan McRae
List all available updates in -Qu output, but include [ignored] beside those that will not be updated in a -Su operation due to thier repo Usage value (in addition to those that are Ignored). Fixes FS#59854. The following people provided initial patches to print [ignored] on -Qu operations, which highlighted a larger problem to be fixed first: With-thanks-to: morganamilo <morganamilo@gmail.com> With-thanks-to: Michael Straube <michael.straube@posteo.de> Signed-off-by: Allan McRae <allan@archlinux.org>
2019-01-10libalpm/sync.c: change alpm_sync_newversion() to alpm_sync_get_new_version()Allan McRae
The behaviour of "pacman -Qu" was very strange... It would only consider packages from repos with Usage = Search (or All), and ignore those with Usage = Sync, Install or Upgrade. This is because the function alpm_sync_newversion() used ALPM_DB_USAGE_SEARCH for its filtering. Given this function is documented (at least in the source) to "Check for new version of pkg in sync repos", I would expect that to look at all repos. However, just changing this parameter, would result in a fairly silent change in behaviour of this function. Instead, rename the function and remove this filtering altogether. Users of this function can filter the dbs passed to this function to achieve their desired output. Signed-off-by: Allan McRae <allan@archlinux.org>
2019-01-10Add -fstack-clash-protection to CFLAGS in debug builds if availableAllan McRae
Signed-off-by: Allan McRae <allan@archlinux.org>
2019-01-10be_local.c: remove aligment in local_pkg_opsAllan McRae
The alignment was not overly helpful and caused unnecessary churn when a new value with longer name was added. Signed-off-by: Allan McRae <allan@archlinux.org>
2019-01-10libalpm: parse {check, make}depends when reading databasemorganamilo
Commit 0994893b0e6b627d45a63884ac01af7d0967eff2 added the alpm_pkg_get_{make,check}depends functions but forgot to include logic for parsing these fields from the database. As a result these functions will always return an empty list. This commit adds the parsing logic. Signed-off-by: morganamilo <morganamilo@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
2019-01-10makepkg: fix broken check for the fakeroot binaryEli Schwartz
In commit d8ee8d0c99c3820951e2e49dbdb71a5390bd1dc4 we made use of fakeroot absolutely mandatory, and disabled a lot of the code which checked to see if this now-defunct BUILDENV option was set, before setting up the environment to use fakeroot. Unfortunately, we missed one spot. The check_software routine still checked to see if fakeroot was enabled, but due to the option being removed, thought that it was in fact disabled, and as a result this check would never run. Fix by checking to see if we are trying to build either a package or a source package, and if so, checking for fakeroot. These are the only two situations where fakeroot is needed. Signed-off-by: Eli Schwartz <eschwartz@archlinux.org> Signed-off-by: Allan McRae <allan@archlinux.org>
2019-01-10makepkg: add internal variable to track when we're building a packageEli Schwartz
There are state variables for everything else, and we use them to do conditional checks on things, but it's currently a bit difficult to test whether a package is being built, as it's the default action if *no* options are specified. Signed-off-by: Eli Schwartz <eschwartz@archlinux.org> Signed-off-by: Allan McRae <allan@archlinux.org>
2019-01-04makepkg: Make pkgdir a localJan Alexander Steffens (heftig)
Causes it to be reset (to $pkgdirbase/$pkgbase) between subpackages. This shouldn't be visible. Signed-off-by: Allan McRae <allan@archlinux.org>
2019-01-04makepkg: Create a single-package packaging functionJan Alexander Steffens (heftig)
Merge the similar code handling unsplit PKGBUILDs and individual packages in a split PKGBUILD and make it a new function. Signed-off-by: Allan McRae <allan@archlinux.org>
2019-01-04makepkg: Only backup package variables onceJan Alexander Steffens (heftig)
We don't need to re-backup the variables we restored on the previous iteration. Signed-off-by: Allan McRae <allan@archlinux.org>
2019-01-04libalpm/add.c: move assignment into conditional in alpm_add_pkgMichael Straube
While at it and for consistency move the assignment of the variable 'local' into the subsequent conditional. Signed-off-by: Michael Straube <michael.straube@posteo.de> Signed-off-by: Allan McRae <allan@archlinux.org>
2019-01-04Move skipping of duplicate sync/remove targets into libalpmMichael Straube
sync: As pointed out by Andrew Gregory there could be an error when adding duplicates if they are two separate packages with the same name. Add a check in alpm_add_pkg() to test whether the duplicate is actually the same package, and if so, log a debug message and return success to skip the package. If the duplicate is a different package return ALPM_ERR_TRANS_DUP_TARGET and treat that error just like any other error in pacman. remove: Change alpm_remove_pkg() to just log a debug message and return success to skip duplicates. Remove the handling of ALPM_ERR_TRANS_DUP_TARGET in pacman. Also fixes FS#49377. Suggested-by: Andrew Gregory <andrew.gregory.8@gmail.com> Signed-off-by: Michael Straube <michael.straube@posteo.de> Signed-off-by: Allan McRae <allan@archlinux.org>
2019-01-04repo-add: don't break if delta package sources contain epochEli Schwartz
Our sed parser for xdelta3 headers will greedily match on ":" which coincidentally is also the character we use to define a version with an epoch. While we are at it, simply use sed for the whole pipeline, rather than using both grep and sed. Fixes FS#61195 Signed-off-by: Eli Schwartz <eschwartz@archlinux.org> Signed-off-by: Allan McRae <allan@archlinux.org>
2019-01-04repo-remove: fix removing packages with deltasEli Schwartz
We have code in order to remove deltas when removing a package, but it is never run, since we try to remove the wrong file. This was broken in commit cb0f2bd0385f447e045e2b2aab9ffa55df3c2d8a which modified the internal layout we use to modify the db, changing "tree" to "db", but did not update all locations where it was used. This worked swimmingly well as long as only repo-add updates were handling the backup and restore of the delta file, as the delta file therefore got backed up to the correct location (db) in the shared db_remove_entry() function. But later on in the repo-remove logic, we tried removing a different file that will never exist (tree). Fixes FS#53041 Signed-off-by: Eli Schwartz <eschwartz@archlinux.org> Signed-off-by: Allan McRae <allan@archlinux.org>
2019-01-04allow tests for disabled features to be skippedAndrew Gregory
Previously, pacman's test suite would fail when compiled without signature support. Adds a require_capability method to pmtest objects. Currently recognized values are 'gpg', 'curl', and 'nls'; although only gpg is used presently. Missing features are indicated by running pactest with one of the --without-<feature> options. This modifies pmenv to run each case as independent tests. Previously, a single pmenv could run multiple tests, combining there output into a single TAP stream but making it impossible to properly skip an entire test case. This change does not affect running pactest.py with a single test (as both autotools and meson do), but will affect anybody manually running pactest.py with multiple tests at once. Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
2019-01-04tap.py: add skip_all functionAndrew Gregory
Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
2019-01-04remove unused test summary codeAndrew Gregory
Unused since 12e00af5315135a29a66c9aaa01e141a32d4634b Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
2019-01-04silence warning when built without curlAndrew Gregory
Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
2018-12-25update NEWS for v5.1.2Andrew Gregory
Signed-off-by: Andrew Gregory <andrew@archlinux.org> (cherry picked from commit f8c73464c9cf86d6b917542585d74514f150c67b)
2018-12-25update NEWS for v5.0.2Andrew Gregory
Signed-off-by: Andrew Gregory <andrew@archlinux.org> (cherry picked from commit fdf53393bc996a514bbfc9fcd6ea19a8bb2f02ed)
2018-12-12meson: add trailing slashes to directory components in configuration definesEli Schwartz
This matches what we currently do in the autotools build configuration, and ensures that the default pacman-conf definitions for unspecified values consistently end with the trailing directory slashes. This has ramifications for thirdparty tools that up to now, have relied on this slash being there. Those tools should be fixed to prevent breaking when custom locations are set, but this is no reason not to fix it on our end as well. An extra trailng slash should never cause harm. Signed-off-by: Eli Schwartz <eschwartz@archlinux.org> Signed-off-by: Allan McRae <allan@archlinux.org>
2018-12-12meson: install the directories needed for successful pacman operationEli Schwartz
This was neglected in the initial meson port. We need these directories to exist in order to bootstrap a new installation. Signed-off-by: Eli Schwartz <eschwartz@archlinux.org> Signed-off-by: Allan McRae <allan@archlinux.org>
2018-12-12meson: remove useless mkdir -pEli Schwartz
directories are created by install_dir within the subdir custom_target installation targets. Signed-off-by: Eli Schwartz <eschwartz@archlinux.org> Signed-off-by: Allan McRae <allan@archlinux.org>
2018-12-10Enable additional debug flags/logging with debugoptimized buildsDave Reisner
This lets developers run a local build with optimizations but also the added debug logging that comes with PACMAN_DEBUG being defined. Signed-off-by: Allan McRae <allan@archlinux.org>
2018-12-10scripts/library: fix typo in READMEMichael Straube
Simply fix a typo: in written -> is written Signed-off-by: Michael Straube <michael.straube@posteo.de> Signed-off-by: Allan McRae <allan@archlinux.org>
2018-12-10check localdb before upgrading packageAndrew Gregory
Commit 2ee7a8d89ad693617307260604e1d58757fd2978 replaced a manual check for a local package with a check for the "oldpkg" member, which gets set at the beginning of the transaction. If the package was also in the remove list, such as when a package gets replaced, it would no longer be in the local db and pacman would try to remove it twice, resulting in superfluous error messages. Fixes: FS#50875, FS#55534 Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
2018-12-04libmakepkg/executable: don't rely on scoped value of $ret to flag outcomesEli Schwartz
Elsewhere, we return 1 if a library dropin fails, and when running functions in a loop, we use `|| ret=1` to preserve scope. This ensures the return value of the function remains useful in isolation. Do the same thing here as well. Drop trivial function which wraps a dropin that also uses $ret, since it's no longer needed. Signed-off-by: Eli Schwartz <eschwartz@archlinux.org> Signed-off-by: Allan McRae <allan@archlinux.org>
2018-12-04Make `make distcheck` work when bash-completion is installed.Eli Schwartz
bash-completion uses pkg-config to determine the best installation directory, but this does not take --prefix into account (although it works fine with DESTDIR). The fallback value does attempt to set this based on --prefix. The distcheck uses --prefix, though, which means when attempting to install the results and bash-completion support for pkg-config was detected, it errors out on trying to write to, usually, /usr/share. Tell distcheck to use the prefix-based fallback location instead, as the PKG_CHECK_* override. Signed-off-by: Eli Schwartz <eschwartz@archlinux.org> Signed-off-by: Allan McRae <allan@archlinux.org>
2018-12-03configure.ac: use $datarootdir instead of $prefix/shareAllan McRae
Even worse, makepkg-template ignored $prefix completely.
2018-11-28scripts: make repo-add utilize a wrapper as wellEli Schwartz
Now that repo-add uses libmakepkg, it needs to have $LIBRARY set before testing it in-tree. [Allan: fix "make distcheck"] Signed-off-by: Allan McRae <allan@archlinux.org>
2018-11-28autotools: be more accurate in comments when generating processed scriptsEli Schwartz
Instead of assuming all scripts are .sh.in and leaving a comment to that effect, just take the input file directly. This depends on the first dependency for the target being the source of the script. Signed-off-by: Allan McRae <allan@archlinux.org>
2018-11-28scripts: fix some inaccurate Makefile targets, and be more templatedEli Schwartz
All of our scripts depend on the same pattern .sh.in, and since commit b5d62d2c91a2caf5c18945921cdf12af6f36b2d4, they also all (not just makepkg itself) depend on libmakepkg. There's no real reason to include separate targets for them just to establish dependency rules. While we are at it, fix a longstanding bug where generated wrapper scripts did not depend on wrapper.sh.in (which due to moving to .lib, requires we regenerate the script too), by making the shared target pattern depend on it. All our generated scripts now require the wrapper, even repo-add which now uses libmakepkg. Signed-off-by: Allan McRae <allan@archlinux.org>
2018-11-28scripts: fix repo-remove/elephant Makefile targetsEli Schwartz
repo-remove and repo-elephant don't care whether repo-add.sh.in is updated... but they do require the repo-add target to be up to date, so use that instead. As a bonus, use the same rule for both of them.
2018-11-28meson: be more accurate in comments when generating processed scriptsEli Schwartz
Instead of assuming all scripts are .sh.in and leaving a comment to that effect, just take the input file directly. Signed-off-by: Allan McRae <allan@archlinux.org>
2018-11-28build-aux: rm annoying and useless fileEli Schwartz
tap-driver.sh is added to the build tree by autoreconf, and contains upstream modifications as such. This results in dirty working trees. It was originally added in commit 403c175dbc84a8198b92bbe76f66eade613cff48 which made the testsuite use automake, but as far as I can tell, never served any purpose. Signed-off-by: Allan McRae <allan@archlinux.org>
2018-11-28add missing tests to meson.buildAndrew Gregory
Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
2018-11-28common/ini: remove unnecessary alpm includeAndrew Gregory
Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
2018-11-27require actual siglevel for defaultAndrew Gregory
ALPM_SIG_USE_DEFAULT does not refer to an actual siglevel, rather it indicates that the global default should be used in place of the operation-specific one. Setting this value for the global default itself makes no sense. Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
2018-11-27always allow explicit empty siglevel for sync dbsAndrew Gregory
An empty siglevel does not do any signature verification which is exactly what we want when compiled without gpg support. This is already allowed in other parts of the codebase and required for the test suite to pass when compiled without gpg support. Fixes: FS#60880 Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
2018-11-27add specific error for missing gpg supportAndrew Gregory
"wrong or NULL argument passed" is a useless error for end users. Fixes FS#60880. Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
2018-11-27Split prepare_buildenv() to libmakepkgQue Quotion
This opens the door for third parties to provide libmakepkg extentions for the purpose of altering the build environment. Signed-off-by: Que Quotion <quequotion@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
2018-11-27Split check_software() to libmakepkgQue Quotion
This opens the door for third parties who provide extensions to libmakepkg to supply scripts that confirm the presence of their dependant executables. Signed-off-by: Que Quotion <quequotion@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
2018-11-27scripts/meson: ensure wrapper scripts are executableDave Reisner
2018-11-27makepkg: if "!buildflags" and "debug" coincide, unset the debug buildflags tooEli Schwartz
If a user has a makepkg.conf policy to enable debug builds, but a PKGBUILD has disabled buildflags, we would unset the *FLAGS but then later append the debug *FLAGS anyway, which would result in some *FLAGS being used, against the wishes of the PKGBUILD author. Signed-off-by: Eli Schwartz <eschwartz@archlinux.org> Signed-off-by: Allan McRae <allan@archlinux.org>
2018-11-27buildsys: remove size_to_humanDave Reisner
This was only ever used by paccache, and paccache has since been moved to pacman-contrib.
2018-11-27meson: separate out wrapped from non-wrapped scriptsDave Reisner
makepkg-template is a perl script and doesn't get wrapped by our shell wrapper. It (wrongly) reads from the host machine rather than the build root, but this is working as implemented.
2018-11-27Remove Doxyfile from EXTRA_DISTAllan McRae
We generate this now, so no need to distribute. Fixes "make dist". Signed-off-by: Allan McRae <allan@archlinux.org>
2018-11-03repo-add: print the name of the database when extractingEli Schwartz
Currently this prints the following message: ==> Extracting database to a temporary location... ==> Extracting database to a temporary location... This redundancy is potentially confusing and may cause people to think something is wrong. Historically, this message came from a time when we only extracted one database, but repo-add was changed to always create the files database in commit cb0f2bd0385f447e045e2b2aab9ffa55df3c2d8a and whole code block with message intact was moved into a for loop and run (and printed) twice. Signed-off-by: Eli Schwartz <eschwartz@archlinux.org> Signed-off-by: Allan McRae <allan@archlinux.org>
2018-11-03makepkg: fix .PKGINFO/.BUILDINFO files swallowing status printingEli Schwartz
The respective write_* functions are low-level and shouldn't be outputting statuses; move these to the logic flow where they are used. This ensures the functions can be used in the future wherever, and also solves an issue where, as fallout from the message.sh retrofitting in commit 882e707e40bbade0111cf3bdedbdac4d4b70453b, the statuses got redirected to the actual files. The resulting package was technically correct, except that it contained useless lines which pacman ignored, and repo-add also ignored but at the same time generated an error message: /usr/bin/repo-add: line 335: declare: `=-> Generating .PKGINFO file...': not a valid identifier Thirdparty package tools with stricter parsers may abort with errors, and "repose" is known to do so. Signed-off-by: Eli Schwartz <eschwartz@archlinux.org> Signed-off-by: Allan McRae <allan@archlinux.org>
2018-11-03pacman-key: just accept one file to verify, and enforce detached sigsEli Schwartz
Simply pass options on to gpg the same way gpg uses them -- no looping through and checking lots of signatures. This prevents a situation where the signature file to be verified is manipulated to contain an embedded signature which is valid, but not a detached signature for the file you are actually trying to verify. gpg does not offer an option to verify many files at once by naming each signature/file pair, and there's no reason for us to do so either, since it would be quite tiresome to do so. In the event that there is no signature/file pair specified to pacman-key itself, - preserve gpg's behavior, *if* the matching file does not exist, by - assuming the signature is an embedded signature - deviate from gpg's behavior, by - offering a security warning about which one is happening - when there is an embedded signature *and* a matching detached file, assume the latter is desired Signed-off-by: Eli Schwartz <eschwartz@archlinux.org> Signed-off-by: Allan McRae <allan@archlinux.org>