Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2017-05-08Use f_bavail for diskspace calculationsMartin Kühne
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> (cherry picked from commit 8c55c0096c355e973ce6111cb25a1c4fa05953cf)
2017-05-08Ensure makepkg-wrapper is built after makepkgAllan McRae
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> (cherry picked from commit ad27aa30fbcac7a07586072d29d3db50009994e9)
2017-05-08Move bash/zsh completion out of contribAllan McRae
Signed-off-by: Allan McRae <allan@archlinux.org> (cherry picked from commit 2e76c184aac74c4848fa5ee092fe54c9954c4054)
2017-05-08fix --printsrcinfo unify arch and non-arch specific variablesLevente Polyak
This fixes the issue with --printsrcinfo that all arch specific variants of a variable get merged into their non arch specific variant. The .SRCINFO file ends up having $depends containing $depends_x86_64 and omitting the latter. Signed-off-by: Allan McRae <allan@archlinux.org> (cherry picked from commit 3190b87b65b038ce31a37f99fb058f3160007cbb)
2017-05-08Do not #define _RESERVED_IDENTIFIERSIvy Foster
Signed-off-by: Ivy Foster <ivy.foster@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org> (cherry picked from commit 0d2ba870c96d1b4b3d5fabfabe303bc6b1c989fd)
2017-05-08Add missing newline in paclog-pkglist help outputAlastair Hughes
Add missing newline in paclog-pkglist help output Signed-off-by: Alastair Hughes <hobbitalastair@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org> (cherry picked from commit 45b6a3074a482ed752b44b6d6cee635c05fb7f9b)
2017-05-08Change type of count in be_syncRikard Falkeborn
Making it size_t matches the return value of alpm_list_count() and avoids the implicit cast to int. Signed-off-by: Rikard Falkeborn <rikard.falkeborn@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org> (cherry picked from commit 6a5156eedc378057eb2ced2c6e6191c50286b1e1)
2017-05-08Return boolean from db_populateRikard Falkeborn
Since the number of packages is not used anywhere, just return a boolean to avoid the implicit cast from size_t to int in be_local.c. Use 0 as success to be consistent with db_validate. Signed-off-by: Rikard Falkeborn <rikard.falkeborn@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org> (cherry picked from commit 85171807c15fb5907d8337af2a50ab79392e1b8c)
2017-05-08Fix gcc strict-overflow errorRikard Falkeborn
Recent gcc (tested with 6.2.1) produces the following error when compiling with both --enable-warningflags and --enable-debug. In particular, it seems it is the combination of GCC_STACK_PROTECT_LIB and -Wstrict-overflow=5 produces the error. be_local.c:609:4: error: assuming signed overflow does not occur when simplifying conditional [-Werror=strict-overflow] if(count > 0) { Fix this by changing the type of count from int to size_t, which is fine since count is never negative. Signed-off-by: Rikard Falkeborn <rikard.falkeborn@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org> (cherry picked from commit 34f3f1e7a640488c4c32a3a825813afc1ad2ed68)
2017-05-08repo-add: fix error in directories with a space in their nameFabio Castell
Fixes FS#50285 Signed-off-by: Allan McRae <allan@archlinux.org> (cherry picked from commit 07d1e0441b53fffd4a600babe479e278a2fc50ee)
2017-05-08lib/libalpm/be_sync.c: Close memory leaks when mallocing while out of memoryIvy Foster
Signed-off-by: Ivy Foster <ivy.foster@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org> (cherry picked from commit 900a22b90c8f8c76b6d5acde9c1d55d7ba65afdb)
2017-05-08bash-completion: fix leaking "files" array into shell environmentEli Schwartz
Signed-off-by: Eli Schwartz <eschwartz93@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org> (cherry picked from commit 38e229e4dbcfe2aacbf9c5414432407f4f73bfc1)
2017-05-08Fix memory leak in remove_notify_needed_optdependsAllan McRae
Also add pactest which captures this leak when run under valgrind. Reported-by: Sergey Petrenko Signed-off-by: Allan McRae <allan@archlinux.org> (cherry picked from commit fac4831a091eda447780d5d1e1e572b14ebb0338)
2017-05-08Fix typo in pacman-db-upgrade usage messageAllan McRae
Signed-off-by: Allan McRae <allan@archlinux.org> (cherry picked from commit d560a9aecd4027bf23e3d5caf556624797e8f939)
2017-05-08Remove AC_FUNC_MALLOC check.Alastair Hughes
We weren't supplying the rpl_malloc function needed if this failed, and didn't check for realloc, so just remove. Signed-off-by: Alastair Hughes <hobbitalastair@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org> (cherry picked from commit 1dbfef7b1c7d104f2ca6c40060aa3cc18d2dc61a)
2017-05-08pacman.8: fix typo in the documentation of --asexplicitLukas Fleischer
Add a space between the option and its argument. Also, do not enclose the argument in asterisk characters. Fixes a typo introduced in aa4c61f (Document database checking options, 2014-12-28). Reported-by: Luca Weiss <luca.emanuel.weiss@gmail.com> Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org> Signed-off-by: Allan McRae <allan@archlinux.org> (cherry picked from commit 1e2b39840660eabb393162cd2fb79423793ee36d)
2017-05-08Merge Giolio Fidente into "Pacman Development Team" contributionGiulio Fidente
As discussed on mailing list: https://lists.archlinux.org/pipermail/pacman-dev/2016-July/021239.html Signed-off-by: Allan McRae <allan@archlinux.org> (cherry picked from commit 69aee3e391d85a1c44de1c2e78f62a1e27453bca)
2017-05-08libmakepkg: look for architecture-specific hashes in get_integlistJack O'Connor
`makepkg -g` looks for existing checksums in the PKGBUILD file, so that it can generate new sums of the same type. Previously it only checked variables of the form "sha256sums", and not "sha256sums_x86_64". That meant it would always fall back to MD5 for packages with only architecture-specific sources. This change makes it look at architecture-specific checksums too to determine the type. Signed-off-by: Jack O'Connor <oconnor663@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org> (cherry picked from commit 56de155296a57fb3fcd8ae64aed00fd18fe2f22e) [andrew@archlinux.org: patch adapted to makepkg.sh.in]
2017-05-08configure.ac: Fix handling --with-libcurlOlivier Brunel
It was reported being --with-libcurl in the help (and the check for libcurl being installed used $with_libcurl accordingly), but the option handling was set using $with_curl and, therefore, expected option --with-curl. In the end, --with-libcurl wasn't recognized, and --with-curl had no effect. Signed-off-by: Olivier Brunel <jjk@jjacky.com> Signed-off-by: Allan McRae <allan@archlinux.org> (cherry picked from commit 56ae9603768bdc850f32bc789a474ae836305033)
2017-05-08hook.c: replace fstatat with statAndrew Gregory
macOS < 10.10 do not provide fstatat. We were constructing the full path to the hook file for all other operations anyway, so there was no real benefit to using fstatat. Fixes FS#49771 Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org> (cherry picked from commit be1ffedaf6fc44aeb9da235d64889dac71e9bf24)
2017-05-08hook.c: replace readdir_r with readdirAndrew Gregory
glibc 2.24 deprecates readdir_r. Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org> (cherry picked from commit c981f5ad76cb77363dcb4ebcc199670c3378995f)
2017-05-08Handle all POSIX compliant systems in mbscasecmp.Tobias Stoeckmann
The width of wchar_t is allowed to be of the same width as long, according to standards. The return type of mbscasecmp is int though. On amd64 with a 32 bit int, this means that mbscasecmp can return zero (indicating that strings are equal) even though the input strings differ. Signed-off-by: Tobias Stoeckmann <tobias@stoeckmann.org> Signed-off-by: Allan McRae <allan@archlinux.org> (cherry picked from commit af83a585745d6108d7af2d4a2d1eae9b28a8c4b6)
2017-05-08Reject files larger than 16384 bytes in read_sigfile.Tobias Stoeckmann
If signature files are larger than SIZE_MAX, not enough memory could be allocated for this file. The script repo-add rejects files which are larger than 16384 bytes, therefore handle these as errors here, too. While at it, I also rearranged the code to avoid a quite harmless TOCTOU race condition between stat() and fopen(). Signed-off-by: Tobias Stoeckmann <tobias@stoeckmann.org> Signed-off-by: Allan McRae <allan@archlinux.org> (cherry picked from commit 5fcd60e2641c9293c2783aad509baf217e77aa6f)
2017-05-08Release resources on error paths.Tobias Stoeckmann
Some resources (memory or file descriptors) are not released on all error paths. Signed-off-by: Tobias Stoeckmann <tobias@stoeckmann.org> Signed-off-by: Allan McRae <allan@archlinux.org> (cherry picked from commit 681509fd445ed6012e6ecf89b49e9c00d83b70cd)
2017-05-08Always use proper error code in alpm_initialize.Tobias Stoeckmann
In out of memory conditions, an undefined error value is written into *err, because myerr is never explicitly set in these cases. I have also converted a calloc into a MALLOC call, because the memory will be properly filled by the snprintf call right after it. Signed-off-by: Tobias Stoeckmann <tobias@stoeckmann.org> Signed-off-by: Allan McRae <allan@archlinux.org> (cherry picked from commit 80d97fcf7526f16d9eb097b8061956662207ed78)
2017-05-08recursedeps: include cyclic dependenciesAndrew Gregory
Cyclic dependencies (A depends on B, B depends on A) were not selected because neither package could be removed individually, so can_remove_package would always return false for both. By preselecting all dependencies then filtering back out any dependencies still required by any packages that will not be uninstalled, groups of unneeded cyclic dependencies can be found. Fixes FS#41031 Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org> (cherry picked from commit 6ac2ee21b30f3c5f331d19349f96bb8e5b020b47)
2017-05-08pacman.8: add link to alpm-hooks(5) in see alsoChristian Hesse
Signed-off-by: Christian Hesse <mail@eworm.de> Signed-off-by: Allan McRae <allan@archlinux.org> (cherry picked from commit 839417e8c65e73e632c77d3ecd68539494850de1)
2017-05-08libalpm.3: add link to alpm-hooks(5) in see alsoChristian Hesse
Signed-off-by: Christian Hesse <mail@eworm.de> Signed-off-by: Allan McRae <allan@archlinux.org> (cherry picked from commit f018317f488e35f3a9a3ce43c977baceec13d08b)
2017-05-08makepkg: ignore the architecture for --printsrcinfoAlastair Hughes
Signed-off-by: Alastair Hughes <hobbitalastair@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org> (cherry picked from commit 87082e3f44c4f92c63d881db38a0fff0565fc9bc)
2017-05-08Avoid logical OR duplication warning from gcc-6Allan McRae
The value EAGAIN is allowed by POSIX to be the same as EWOULDBLOCK, but this is not guaranteed. Thus on some systems (e.g. glibc Linux), we get a warning that the logical OR is being performed on two expressions of the same type. We can not get rid of this test in case any system defines these as unique values. Suggested-by: Dave Reisner Signed-off-by: Allan McRae <allan@archlinux.org> (cherry picked from commit 3729ef7a9acf75080fb6f60d13ea80cfd36d855d)
2017-05-08pacsort help clearly states that files contain inputs to be sortedAshley Whetter
Fixes FS#44121 Signed-off-by: Ashley Whetter <ashley@awhetter.co.uk> Signed-off-by: Allan McRae <allan@archlinux.org> (cherry picked from commit 6c96ad36e082755e8a008b34aedde55a9a9f3dcd)
2017-04-27Prevent wrapping of enum itemsAllan McRae
GCC-6 points out that the value we use for the sentinal in enums is actually too large for the integer type. Reduce the bitshift by one to fix this. Signed-off-by: Allan McRae <allan@archlinux.org> (cherry picked from commit 5b9bc6024c246f232c64f6409088fedf558917af)
2017-04-27fix spelling mistakesEric Engestrom
Signed-off-by: Eric Engestrom <eric@engestrom.ch> Signed-off-by: Allan McRae <allan@archlinux.org> (cherry picked from commit 2694d17ad99bab1cea5aad0ea4781ea4d51e596b)
2017-04-27use multi-byte character matching for user inputAndrew Gregory
Fixes FS#47992 Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org> (cherry picked from commit 02731189f1ced6050238e4af7e76a54d4ac6f3bd)
2017-04-27repo-add: do not alter the database if only verifying signatureAllan McRae
Fixes FS#48085. Signed-off-by: Allan McRae <allan@archlinux.org> (cherry picked from commit f363cf78575cc4c54dee5801274e55d07e0971b1)
2017-04-27Use versions specified in optdependsAllan McRae
Checking install status and if a package is optionally required on removal now considers the version of the optdepend. Fixes FS#44957. Signed-off-by: Allan McRae <allan@archlinux.org> (cherry picked from commit 3da06c3519ad8df60ce8c067cdaeddb69a320a53)
2017-04-27Consider provides when warning about optdepnd removalAllan McRae
Signed-off-by: Allan McRae <allan@archlinux.org> (cherry picked from commit 59112e186b5c64350db79f39574c6927a10346b6)
2017-04-27Consider provides when labelling optdepends status as pending installAllan McRae
Signed-off-by: Allan McRae <allan@archlinux.org> (cherry picked from commit 76a7d2293c0e7a732254a1cfea6a62df07b8795e)
2016-05-18Use a more generic regexp when parsing output of gpg(1) in signature ↵Leonid Isaev
verification. The current way of extracting key trust from output of gpg --verify is not very robust against changes in the format of said output. As a result, pacman-key can return an error even if the signature is actuall good. This change relaxes the regexp when parsing output of gpg. Signed-off-by: Leonid Isaev <leonid.isaev@jila.colorado.edu> Signed-off-by: Allan McRae <allan@archlinux.org> (cherry picked from commit 892a1076c00a2b0097145c35f5d8ef590216dac0)
2016-05-05PKGBUILD.5: document that the pkgver() function runs after prepare()Allan McRae
Signed-off-by: Allan McRae <allan@archlinux.org> (cherry picked from commit 59010386106eded2ee67798fa80215f250a53761)
2016-05-05Do not add root prefix twice when checking database filesAllan McRae
When checking .INSTALL and .CHANGELOG files in the mtree file, we need to find the path they are stored in the local database. This was appending the root prefix twice as alpm_option_get_dbpath already returns the absolute path to the database. While fixing that issue I added checks that the paths for the database files were not longer than PATH_MAX. Fixes FS#48563. Signed-off-by: Allan McRae <allan@archlinux.org> (cherry picked from commit 2ee1706a72858ea365c0e7a1a72d92ef2dae2f75)
2016-05-05libmakepkg: ensure emptydir find command acts on individual directoriesAllan McRae
Using "-exec command {} +" systax exits on any error. Such errors occur when running rmdir on a non-empty directory. Switch to "{} ;" syntax instead which avoids exiting before the find command is completed. Fixes FS#48515. Note, we can not use "-empty" in the find command because it is not supported by Busybox find, and the "--ignore-fail-on-non-empty" flag for rmdir is not available on BSD rmdir variants. Signed-off-by: Allan McRae <allan@archlinux.org> (cherry picked from commit baf1ff64e6ea23e93f307480480d87159cd2e487)
2016-02-26libmakepkg: fix is_array functionAllan McRae
This happened to work for the majority of cases because the only calling function used a variable named "i" that was related to the variable being passed to the function. Fixes FS#48340. Signed-off-by: Allan McRae <allan@archlinux.org>
2016-02-26Update NEWS for pacman-5.0.1Allan McRae
Signed-off-by: Allan McRae <allan@archlinux.org>
2016-02-23Release 5.0.1v5.0.1Allan McRae
Signed-off-by: Allan McRae <allan@archlinux.org>
2016-02-23Regenerate translations for 5.0.1Allan McRae
2016-02-23Manually fix space before ellipses in translationsAllan McRae
Signed-off-by: Allan McRae <allan@archlinux.org>
2016-02-23Fix inconsistent status messagesStefan Tatschner
This patch fixes an inconsistency in the status messages. :: Proceed with installation? [Y/n] :: Retrieving packages ... <--- Space before "...". blas-3.6.0-4-x86_64 cblas-3.6.0-4-x86_64 lapack-3.6.0-4-x86_64 (3/3) checking keys in keyring (3/3) checking package integrity (3/3) loading package files (3/3) checking for file conflicts (3/3) checking available disk space :: Processing package changes... <--- No space before "..." (1/3) upgrading blas (2/3) upgrading cblas (3/3) upgrading lapack Signed-off-by: Allan McRae <allan@archlinux.org>
2016-02-23Pull translation updates from TransifexAllan McRae
Signed-off-by: Allan McRae <allan@archlinux.org>
2016-02-23makepkg: do not run prepare() with --noextractEvangelos Foutras
This is partial revert of 8454daa7feef (makepkg: run pkgver() and prepare() with --noextract). Reasoning for the reversion (copied from FS#43498): Running prepare() when --noextract is used no longer allows running 'makepkg -o && makepkg -e' with any PKGBUILD that applies patches in prepare(). [1] Sure there's --noprepare which restores the old behavior, but that's a lot of extra typing for what I believe is a much more common use of --noextract. For OP's use case of doing git bisects, you can specify the commit in the source array and thus skip --noextract since makepkg will checkout the correct commit each time. [1] I often extract the sources using 'makepkg -o', manually edit some source files, and then use 'makepkg -e' to package it (while possibly repeating the edit/package steps). Signed-off-by: Allan McRae <allan@archlinux.org>