summaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)AuthorFilesLines
2019-12-11libmakepkg: use readelf instead of file for finding ELF file typesEthan Sommer1-14/+12
Signed-off-by: Ethan Sommer <e5ten.arch@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
2019-12-02pacman: print error when -Fx is given invalid regexmorganamilo1-13/+44
When processing the targets for -Fx, compile all the regex ahead of time, printing an error for each that failed to compile. Then, if they all compiled successfully, continue with printing files. Signed-off-by: morganamilo <morganamilo@archlinux.org> Signed-off-by: Allan McRae <allan@archlinux.org>
2019-11-26makepkg: add the $startdir to package .BUILDINFOEli Schwartz2-1/+5
This value is needed for reproducible builds. The reason is because $BUILDDIR changes its behavior depending on whether it is the same as $startdir, and the result is that we cannot know whether $srcdir (the path that is potentially embedded into the final package) is actually "$BUILDDIR/src" or "$BUILDDIR/$pkgbase/src". Signed-off-by: Eli Schwartz <eschwartz@archlinux.org> Signed-off-by: Allan McRae <allan@archlinux.org>
2019-11-26Fix documentation of alpm_mtree_next and remove libarchive exposureAllan McRae3-4/+18
The documentation of the return types of alpm_mtree_next was incorrect. This extended into the relevant function in be_local.c. Also, return explicit integer values, rather than the ARCHIVE_xxx values, to avoid unnecessarily exposing frontends to libarchive internals (even though it makes no functional difference). Original-work-by: morganamilo <morganamilo@archlinux.org> Signed-off-by: Allan McRae <allan@archlinux.org>
2019-11-26pactest: add environment option to run tests with valgrindEli Schwartz1-1/+1
In autotools, if we wanted to run tests with valgrind, we used some Make magic which passed arguments to pactest.py, but that doesn't work in meson, because all arguments are encoded at configure time. Instead, let's short-circuit the build runner logic entirely, and teach pactest to default to running valgrind, when it detects an environment variable set independent of the build system. To run the tests with valgrind, we can now use: PACTEST_VALGRIND=1 meson test -C builddir/ or PACTEST_VALGRIND=1 make check It is also possible, but confusing/inconsistent, to use make check PY_LOG_FLAGS=--valgrind We *could* add a meson option -Dvalgrind=true, but that is annoying to reconfigure between test runs, and overall the consensus is it seems simpler to opt in each time we want to run valgrind, as was already the case. Signed-off-by: Eli Schwartz <eschwartz@archlinux.org> Signed-off-by: Allan McRae <allan@archlinux.org>
2019-11-26meson: make non-symlink scripts install for real, and use a better wrapperEli Schwartz4-29/+32
We now generate the scripts using their real name, install them using meson's builtin facility instead of an install_script, and generate the wrapper scripts in the root of the build directory, instead of a subdirectory. This gets us closer to resolving FS#64394. Signed-off-by: Eli Schwartz <eschwartz@archlinux.org> Signed-off-by: Allan McRae <allan@archlinux.org>
2019-11-26makepkg: fix regression that broke extraction of file:// sourcesEli Schwartz2-3/+3
In commit 9c817b654996249b8022e189ee7e2692f4668431 we made these sources extendable, and heuristically determined the correct extraction functions to use. But our fallback for protos that didn't have an exact extract_* function didn't take into account that 'extract_file' matches an actual proto... so we passed the netfile in while the function expected a file. Solution: the function should expect a netfile too, thereby allowing us to delay an attempted resolution of netfile -> file, to the one case where it is actually used. This makes us slightly more efficient in the non-file case, makes our functions a bit more consistent, and makes file:// extraction work again. Fixes FS#64648 Signed-off-by: Eli Schwartz <eschwartz@archlinux.org> Signed-off-by: Allan McRae <allan@archlinux.org>
2019-11-22Improved documentation for alpm_db_search() parametersAllan McRae1-1/+2
Signed-off-by: Allan McRae <allan@archlinux.org>
2019-11-21Fix leak in _alpm_db_search on error conditionAllan McRae1-1/+4
2019-11-16Dereference double pointer before assigning NULLDaniel T. Borelli1-2/+2
Daniel T. Borelli <danieltborelli@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
2019-11-15Add Eli to current maintainersAllan McRae1-1/+2
Also retire Dan into past major contributors. Signed-off-by: Allan McRae <allan@archlinux.org>
2019-11-15Handle .part files that are the size of the correct packageAllan McRae2-2/+18
In rare cases, likely due to a well timed Ctrl+C, but possibly due to a broken mirror, a ".part" file may have size at least that of the correct package size. When encountering this issue, currently pacman fails in different ways depending on where the package falls in the list to download. If last, "wrong or NULL argument passed" error is reported, or a "invalid or corrupt package" issue if not. Capture these .part files, and remove the extension. This lets pacman either use the package if valid, or offer to remove it if it fails checksum or signature verification. Signed-off-by: Allan McRae <allan@archlinux.org>
2019-11-12pactest: set package tar format to GNU_FORMATAllan McRae1-1/+1
python-3.8 changed the default tar format to PAX_FORMAT. This caused issues in our testsuite with package extraction of files with UTF-8 characters as we run the tests under the C locale. sycn600.py: error: error while reading package /tmp/pactest-xuhri4xa/var/cache/pacman/pkg/unicodechars-2.0-1.pkg.tar.gz: Pathname can't be converted from UTF-8 to current locale. Set format back to GNU_FORMAT. Signed-off-by: Allan McRae <allan@archlinux.org>
2019-11-11libalpm/sync.c: Do not download missing keys multiple timesAllan McRae1-2/+10
We now store key structs of our missing key info, so can not search the list for string matches. This caused missing keys to be downloaded once for every package they signed. Signed-off-by: Allan McRae <allan@archlinux.org>
2019-11-08pacman+libalpm: handle search errorsmorganamilo6-18/+42
Previously, pacman treated no matches and an error during search the same. To fix this, alpm_db_search now returns its status as an int and instead takes the to be returned list as a param. Allowing front ends to easily differentiate between errors and no matches. Signed-off-by: morganamilo <morganamilo@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
2019-11-07pacman: make exact_file an intmorganamilo1-5/+5
We only ever use it as a bool, no need to pass a char* around. Signed-off-by: morganamilo <morganamilo@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
2019-11-07repo-add: use wc -c on stdin instead of file to avoid use of cutEthan Sommer1-2/+2
Redirect file to stdin so wc -c doesn't print a file name that needs to be stripped. Signed-off-by: Ethan Sommer <e5ten.arch@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
2019-11-06build: remove use of handcrafted m4 in configuring scriptsEli Schwartz3-11/+3
Now that library/ is fully gone, we don't need this anymore. Signed-off-by: Eli Schwartz <eschwartz@archlinux.org> Signed-off-by: Allan McRae <allan@archlinux.org>
2019-11-06scripts/library: remove human_to_sizeEli Schwartz9-131/+1
pkgdelta was the last user, and it is gone now. Signed-off-by: Eli Schwartz <eschwartz@archlinux.org> Signed-off-by: Allan McRae <allan@archlinux.org>
2019-11-06Remove "Generated from ...; do not edit by hand" from scriptsAllan McRae7-8/+1
This is a useless piece of information. Signed-off-by: Allan McRae <allan@archlinux.org>
2019-11-06makepkg: replaces sed in-place with built in substitutionEthan Sommer6-32/+5
Reads PKGBUILD into an array and replaces the pkgver and pkgrel with bash parameter substitution, then uses shell redirection to write to to the file. Because shell redirection follows symlinks, this accomplishes the same thing as the previous default of using the GNU-specific --follow-symlinks sed flag. Removes SEDPATH and SEDINPLACEFLAGS from the build systems as they are not used elsewhere. Signed-off-by: Ethan Sommer <e5ten.arch@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
2019-11-06pacman: clarify error when alpm fails to initmorganamilo1-2/+2
Currently pacman is hard coded to print the dbpath, then the error alpm returned. Even though the error could really be caused by anything. So instead just print the arugemnts given to alpm and not assume the resulting error message is releated to either path. Fixes FS#59595 Signed-off-by: morganamilo <morganamilo@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
2019-11-05Move update-copyright into build-auxAllan McRae2-6/+9
This is a useful function to update all our copyright years. Move it into build-aux so that it is not lost in the switch to meson. Signed-off-by: Allan McRae <allan@archlinux.org>
2019-11-05libmakepkg: fix empty arguments in parseoptsEthan Sommer2-5/+8
Previously parseopts checked if there was an argument by checking that the string was non-empty, resulting in empty arguments being incorrectly considered non-existent. This change makes parseopts check if arguments exist at all, rather than checking that they are non-empty Signed-off-by: Ethan Sommer <e5ten.arch@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
2019-11-05pacman-key: ignore already lsigned/deleted keysMatthew Sexton1-3/+38
Added two new functions, key_is_lsigned() and key_is_revoked() that check whether a key has been locally signed or revoked respectively during --populate. If the key is already signed or revoked, it is quietly ignored. Suggested-by: Eli Schwartz <eschwartz@archlinux.org> Signed-off-by: Matthew Sexton <wsdmatty@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
2019-11-05pacman-key: hide lsign and revoke output behind --verboseMatthew Sexton1-3/+16
To cut down on spam during --populate, both locally signing and revoking keys now hide the specific keys being signed or revoked, but can be shown with --verbose. A count was added, to show the number of keys signed/revoked during the process. Partially Implements: FS#64142 - pacman-key: make populate less noisy Signed-off-by: Matthew Sexton <wsdmatty@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
2019-11-04libmakepkg: add optional argument support to parseoptsEthan Sommer2-45/+83
Adds a "?" suffix that can be used to indicate that an option's argument is optional. This allows options to have a default behaviour when the user doesn't specify one, e.g.: --color=[when] being able to behave like --color=auto when only --color is passed Options with optional arguments given on the command line will be returned in the form "--opt=optarg" and "-o=optarg". Despite that not being the syntax for passing an argument with a shortopt (trying to pass -o=foo would make -o's argument "=foo"), this is done to allow the caller to split the option and its optarg easily Signed-off-by: Ethan Sommer <e5ten.arch@gmail.com> Reviewed-by: Dave Reisner <dreisner@archlinux.org> Signed-off-by: Allan McRae <allan@archlinux.org>
2019-11-01Release 5.2.1v5.2.1Allan McRae3-4/+5
Signed-off-by: Allan McRae <allan@archlinux.org>
2019-11-01Pull latest translations from TransifexAllan McRae42-104/+133
Signed-off-by: Allan McRae <allan@archlinux.org>
2019-11-01Update NEWS for pacman-5.2.1Allan McRae1-0/+11
Signed-off-by: Allan McRae <allan@archlinux.org>
2019-10-30Comma failAllan McRae1-1/+1
2019-10-30autotools: be more templated when getting list of doc dist filesEli Schwartz1-13/+2
Distribute asciidoc sources for all manpages instead of remembering to add files to both variables. Fixes regression in 377d47142f7aaa01ca782e6587f2d4caf663865b which broke building the website from a dist tarball: make: *** No rule to make target 'pacman-conf.8.html', needed by 'html'. Stop. (Technically this regression is already fixed by commit 942b909829d529409216939b36af11e8480726f5, but this is just going to keep happening, I suspect, so we should fix the root cause.) Signed-off-by: Eli Schwartz <eschwartz@archlinux.org> Signed-off-by: Allan McRae <allan@archlinux.org>
2019-10-30makepkg: only run --clean actions if we built a packageEli Schwartz1-1/+1
Fixes issue where users were allowed to run cleanup while running --geninteg or --printsrcinfo or --packagelist, thus mixing invalid responses into stdout. Signed-off-by: Eli Schwartz <eschwartz@archlinux.org> Signed-off-by: Allan McRae <allan@archlinux.org>
2019-10-30makepkg: do not count hard links multiple times when calculating pkg sizeEli Schwartz4-1/+44
Exclude files with hardlinks when cat'ing all the files, and do a second run to look at each file with hardlinks, keep track of the ones we've already operated on, and only cat each inode once. Then use "wc -c" to get the size of all (deduplicated) files the same way we were already doing. Original-patch-by: Ronan Pigott <rpigott@berkeley.edu> Signed-off-by: Eli Schwartz <eschwartz@archlinux.org> Signed-off-by: Allan McRae <allan@archlinux.org>
2019-10-30makepkg: protect against unexpected whitespace in filenamesEli Schwartz4-11/+11
zipman: read -r protects against those evil manpages whose filenames contain backslash escapes, (muahahaha?) IFS= read protects against filenames with: - leading whitespace (but no one is actually stupid enough to configure their MAN_DIRS=() in makepkg.conf with such silly directories, *right*?) - trailing whitespace (but likewise, no one should be stupid enough to write an uncompressed manpage for section '1 ' or something) Also fix several other cases where we read filenames without protecting against surrounding whitespace, or without using null-delimited filenames when we could trivially do so. Signed-off-by: Eli Schwartz <eschwartz@archlinux.org> Signed-off-by: Allan McRae <allan@archlinux.org>
2019-10-30meson: fix inodecmd for darwin/bsdEli Schwartz1-2/+2
The BSD stat command uses %N, not %n, and was incorrectly ported to meson. Signed-off-by: Eli Schwartz <eschwartz@archlinux.org> Signed-off-by: Allan McRae <allan@archlinux.org>
2019-10-27Fix segfault importing PGP key for pacman -U operationsAllan McRae1-2/+2
Use after free. Signed-off-by: Allan McRae <allan@archlinux.org>
2019-10-24Add pacman-conf(8) to the documentation indexEvangelos Foutras1-0/+1
Signed-off-by: Allan McRae <allan@archlinux.org>
2019-10-23Update copyright yearsAllan McRae176-182/+182
make update-copyright OLD=2018 NEW=2019 Signed-off-by: Allan McRae <allan@archlinux.org>
2019-10-23Remove --force from completionAllan McRae2-4/+2
Signed-off-by: Allan McRae <allan@archlinux.org>
2019-10-23Update completion for -F changesAllan McRae2-4/+1
Signed-off-by: Allan McRae <allan@archlinux.org>
2019-10-22makepkg: don't warn when PACKAGER is unsetmorganamilo1-1/+1
makepkg now complains when PACKAGER is not in the format "name <email>". Hide this warning when PACKAGER is unset but still warn if it is set to something out of format. Signed-off-by: Allan McRae <allan@archlinux.org>
2019-10-22Fix compression of package databases with zstdNick Cao1-6/+6
Commit 7afe51171 attempted to add zstd compression support to repo-add, but failed... FS#64213 Signed-off-by: Allan McRae <allan@archlinux.org>
2019-10-22Fix distribution of meson filesAllan McRae2-1/+4
Also caught the source of a man page not being distributed. Signed-off-by: Allan McRae <allan@archlinux.org>
2019-10-21Release v5.2.0v5.2.0Allan McRae3-6/+8
Signed-off-by: Allan McRae <allan@archlinux.org>
2019-10-21Final translation updates for pacman-5.2.0Allan McRae123-939/+2674
Signed-off-by: Allan McRae <allan@archlinux.org>
2019-10-17document changes between 5.1 and 5.2Eli Schwartz1-0/+116
Signed-off-by: Eli Schwartz <eschwartz@archlinux.org>
2019-10-15Update README for pacman 5.2.0 releaseAllan McRae1-0/+25
This is the first major release without any additions to the libalpm API! Signed-off-by: Allan McRae <allan@archlinux.org>
2019-10-15libalpm: set errno in signing dummy functionsmorganamilo1-3/+6
This allows pacman to print the correct error message when checking keys and libalpm has been compiled without gpgme support. Signed-off-by: Allan McRae <allan@archlinux.org>
2019-10-15libalpm: fix segfault when -Qip'ing a packagemorganamilo1-1/+2
The dummy checksigs function never sets count to 0, leaving it unitialized. This caused the siglist cleanup to try and free the empty list. Signed-off-by: Allan McRae <allan@archlinux.org>