- Mar 07, 2022
-
-
db and pkg store a pointer to the handle for internal use but don't actually provide a way for a user to get it. Making this accessible is more convenient for front ends and FFI wrappers. For example, in other languages it's common to return the error value directly. To achieve this the python and rust wrappers also store their own pointer to the handle inside their own pkg/db wrappers. Exposing this would allow the wrappers to forgo the extra pointer and just return `pkg.get_handle().last_error()`.
-
Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
-
Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
-
- Mar 06, 2022
-
-
Allan McRae authored
Parsing of Content-Disposition relies on well formed headers. A malformed header such as: Content-Disposition=""; will result in a strnduppayload->content_disp_name, -1, ptr), which will copy memory until it hits a \0. Prevent this by only copying the value if it exists. Fixes FS#73704. Signed-off-by: Allan McRae <allan@archlinux.org>
-
Allan McRae authored
In order to use WKD in pacman -U/--upgrade operations, we need to get the packager information from the .PKGINFO within the package. That has obvious security implications. e.g. something like this could convince a user to download a different key to what they expect: packager = foo bar <>^[[2K^[[0G:: Import PGP key DEADBEEF, "foo <bar> While downloading an untrusted key has little impact due to the web-of-trust model used by pacman, this could be bad in combination with an exploit that allowed trust of keys in the keyring to be altered. To be safe, do not use WKD when installing using -U. Fixes FS#73703. Signed-off-by: Allan McRae <allan@archlinux.org>
-
Allan McRae authored
Avoid a segfault when a search of the keyserver returns that the key is found but returns no primary IDs. We are then likely going to fail the import, but attempt anyway because no-one know what a keyserver will do! Fixes FS#73534. Signed-off-by: Allan McRae <allan@archlinux.org>
-
Allan McRae authored
Looking up a key using WKD just ensures you have a key with the same email address, it does not ensure that a key with the correct fingerprint has been downloaded. Check a key with the relevant fingerprint is available after a WKD import.
-
This is useful for bindings as it guarantees the value will not be changed. Signed-off-by: Allan McRae <allan@archlinux.org>
-
Allan McRae authored
Signed-off-by: Allan McRae <allan@archlinux.org>
-
Allan McRae authored
Using meson.source_root() and meson.build_root() are deprectated in meson-0.56. Using current_source_dir() or current_build_dir() (which have been available in all Meson versions) would require manually adding "../" in some places. Instead, use project_source_root() and project_build_root() and require meson-0.56. Signed-off-by: Allan McRae <allan@archlinux.org>
-
Allan McRae authored
Removes "Future-deprecated features used", but reuires meson-0.55 Signed-off-by: Allan McRae <allan@archlinux.org>
-
Allan McRae authored
Signed-off-by: Allan McRae <allan@archlinux.org>
-
Allan McRae authored
Signed-off-by: Allan McRae <allan@archlinux.org>
-
Allan McRae authored
Signed-off-by: Allan McRae <allan@archlinux.org>
-
Allan McRae authored
Upstream is changing the default from false to true. This makes no difference to us, so just set as the future default. Signed-off-by: Allan McRae <allan@archlinux.org>
-
Allan McRae authored
Upsteam is warning about future change in the run_command check argument. Ref: https://github.com/mesonbuild/meson/issues/9300 Signed-off-by: Allan McRae <allan@archlinux.org>
-
We want to use -flto=auto in Arch Linux to speed up building, but we can't hardcode it in buildenv/lto.sh because other downstreams might have clang < 13.0.0 which did not recognize -flto=auto as equivalent to -flto=full. Introducing an LTOFLAGS variable to makepkg.conf seems the way to go. Signed-off-by: Allan McRae <allan@archlinux.org>
-
- Jan 13, 2022
-
-
Allan McRae authored
Signed-off-by: Allan McRae <allan@archlinux.org>
-
- Jan 09, 2022
-
-
This implements pkgtype into .PKGINFO. This is useful to ensure tools parsing packages do not miss important context on the creation of the package. For instance discovering if a given .pkg.tar is a debug package, one would have to do heuristics on the pkgdesc and "${pkgbase}-debug". However both of these values are controlled by the packager. Similarly, the heuristic for discovering split packages is if pkgbase and pkgname differ, which can happen in any package as both values are packager controlled. This should ensure we don't need to rely on heuristics and instead include the context of how the package was created. Signed-off-by: Morten Linderud <morten@linderud.pw> Signed-off-by: Allan McRae <allan@archlinux.org>
-
This moves us from the fairly ugly AWK parsing line to debugedit which originally comes out of the rpm project. The original code has issues parsing anything that was not straight C/C++ and languages like Rust or Go would return invalid source code files. debugedit handles all these cases better. Fixes FS#66755 Fixes FS#66888 Fixes FS#65677 Signed-off-by: Morten Linderud <morten@linderud.pw> Signed-off-by: Allan McRae <allan@archlinux.org>
-
Allan McRae authored
This means options=('!buildflags') will disable the addition of CFLAG etc for LTO and debug building. Signed-off-by: Allan McRae <allan@archlinux.org>
-
- Jan 02, 2022
-
-
Adds the %a format specifier to allow printing of a target's arch when using --print-format. Signed-off-by: Jonathan Sköld <arch@skold.dev> Signed-off-by: Allan McRae <allan@archlinux.org>
-
Signed-off-by: Allan McRae <allan@archlinux.org>
-
When two progressbars are present, one of them always had c while the other always had C as the mouth Signed-off-by: Allan McRae <allan@archlinux.org>
-
When trying to identify debug packages among other packages we discovered that it's pkgname used in pkgdesc. Since pkgname can sometimes be an array when building debug packages for a split package, this could potentially include a pkgname that might not make sense depending on the order of the array. This patch simply uses pkgbase as it seems more correct. Signed-off-by: Morten Linderud <morten@linderud.pw> Signed-off-by: Allan McRae <allan@archlinux.org>
-
Allan McRae authored
These fields have not existed for many years. Signed-off-by: Allan McRae <allan@archlinux.org>
-
>From gcc(1): -ffile-prefix-map=old=new [...] Specifying this option is equivalent to specifying all the individual -f*-prefix-map options. This can be used to make reproducible builds that are location independent. Specifically, this additionally enables -fmacro-prefix-map=, which causes prefix mapping to be applied to expansions of __FILE__ and similar macros. Without this option, if source files are compiled by passing the absolute file path to the compiler (as done by e.g. cmake), any expansions of __FILE__ (e.g. from uses of assert()) will contain $srcdir. Signed-off-by: Allan McRae <allan@archlinux.org>
-
Allan McRae authored
./build-aux/update-copyright 2021 2022 Signed-off-by: Allan McRae <allan@archlinux.org>
-
- Dec 29, 2021
-
-
Prints extra information provided by file conflict or corrupt package messages to stderr instead of stdout Signed-off-by: Oskar Roesler (bionade24) <o.roesler@oscloud.info> Signed-off-by: Allan McRae <allan@archlinux.org>
-
This is the error value generally used and the calling function explicitly checks for -1, later causing the error to be missed and the transaction to continue. > pacman -S xterm warning: xterm-369-1 is up to date -- reinstalling resolving dependencies... looking for conflicting packages... Package (1) Old Version New Version Net Change Download Size extra/xterm 369-1 369-1 0.00 MiB 0.42 MiB Total Download Size: 0.42 MiB Total Installed Size: 1.05 MiB Net Upgrade Size: 0.00 MiB :: Proceed with installation? [Y/n] error: no servers configured for repository: extra (1/1) checking keys in keyring [--------------------------------------------------------] 100% (1/1) checking package integrity [--------------------------------------------------------] 100% error: failed to commit transaction (wrong or NULL argument passed) Errors occurred, no packages were upgraded.
-
The current backup printing does not fit in with the rest of the info at all. Change to be more consistant. Old: Backup Files : MODIFIED /etc/pacman.conf UNMODIFIED /etc/makepkg.conf New: Backup Files : /etc/pacman.conf [modified] /etc/makepkg.conf [unmodified] Signed-off-by: morganamilo <morganamilo@archlinux.org> Signed-off-by: Allan McRae <allan@archlinux.org>
-
Allan McRae authored
Add linked libraries to a packages dependency list. This is the partner to automatically generated library provides, and thus depends take the same format. To help with bootstrapping, library dependencies are only added if the relevant provide exists. Signed-off-by: Allan McRae <allan@archlinux.org>
-
Allan McRae authored
When the option "autodeps" is enabled, makepkg will add provides entries for libraries found in the directories specified in LIB_DIRS in makepkg.conf. The entries LIB_DIRS array have the format "prefix:directory". For example, the entry "lib:usr/lib" will search $pkgdir/usr/lib for library sonames and add "lib:libfoo.so.1" to the provides array. Signed-off-by: Allan McRae <allan@archlinux.org>
-
Allan McRae authored
Signed-off-by: Allan McRae <allan@archlinux.org>
-
Allan McRae authored
This will be replaced by a better system Signed-off-by: Allan McRae <allan@archlinux.org>
-
- Dec 24, 2021
-
-
Allan McRae authored
GCC automatically detects when it is linking LTO objects, but clang does not. Add -flto to LDFLAGS to make this work for clang too. Signed-off-by: Allan McRae <allan@archlinux.org>
-
- Dec 12, 2021
-
-
Allan McRae authored
-
- Nov 21, 2021
-
-
Allan McRae authored
Catch build warnings in the CI. Signed-off-by: Allan McRae <allan@archlinux.org>
-
- Nov 20, 2021
-
-
Allan McRae authored
Signed-off-by: Allan McRae <allan@archlinux.org>
-
Morgan Adamiec authored
When removing files we check _alpm_access() to see if we can write (delete) the file. If not, we check if the file exists because if the file does not exist then we don't actually need to remove it so there's no issue. However the second call uses acess() instead of _alpm_access() which does not the rootdir into account.
-