- 15 Mar, 2018 2 commits
-
-
In commit c6b04c04 package signing was moved out of fakeroot, and as part of this process, the global pkgname variable was modified in order to extract the built package names. However, if a debug package was not available and added to the list of packages, the function was aborted early, before the pkgname array was restored, thereby corrupting the later stages of makepkg and specifically the install_package function which needs to know which pkgnames to install. Fix this by inlining the debug package signing inside the `if` check, and as added security switch to using `for pkg in "${pkgname[@]}"` as is done in many other parts of makepkg, since package signing does not depend on the value of pkgname for anything. Additionally, since debug packages may not actually exist, check if the package file exists first. Signed-off-by:
Eli Schwartz <eschwartz@archlinux.org> Signed-off-by:
Allan McRae <allan@archlinux.org>
-
Followup on c6b04c04 which refactored the signing function to run outside of fakeroot, and in the process moved the status message to outside the $SIGNPKG check. Signed-off-by:
Eli Schwartz <eschwartz@archlinux.org> Signed-off-by:
Allan McRae <allan@archlinux.org>
-
- 14 Mar, 2018 17 commits
-
-
Additionally provide a separate error for failure to create the directory vs lack of write permissions on a pre-existing directory. This also means we now consistently try to create any nonexistent *DEST directories as needed before aborting with E_FS_PERMISSIONS. Previously only $BUILDDIR received that kindness. Fixes FS#43537 Signed-off-by:
Eli Schwartz <eschwartz@archlinux.org> Signed-off-by:
Allan McRae <allan@archlinux.org>
-
This fixes an issue where smartcards, such a Yubikey, would cause the keyring to fail locally signing, thus also failing to verify signed packages. Signed-off-by:
Eric Renfro <psi-jack@linux-help.org> Signed-off-by:
Allan McRae <allan@archlinux.org>
-
Allan McRae authored
This prevents a valgrind warning from deep inside wcstombs. Signed-off-by:
Allan McRae <allan@archlinux.org>
-
Signed-off-by:
Rikard Falkeborn <rikard.falkeborn@gmail.com> Signed-off-by:
Allan McRae <allan@archlinux.org>
-
Allan McRae authored
make update-copyright OLD=2017 NEW=201 Signed-off-by:
Allan McRae <allan@archlinux.org>
-
Signed-off-by:
Stefan Klinger <git@stefan-klinger.de> Signed-off-by:
Allan McRae <allan@archlinux.org>
-
makepkg configures the umask 0022 as a sane default for building packages. After installing dependencies, it sources `/etc/profile` again. If the user configured a umask other than Arch's default of 0022 (or 022) in `/etc/profile`, this sane default is now gone and needs to be set again. Signed-off-by:
Allan McRae <allan@archlinux.org>
-
In order to detect if pkgver contains whitespace, we need to quote it. Previously, only the characters up to the first whitespace was checked. Signed-off-by:
Rikard Falkeborn <rikard.falkeborn@gmail.com> Signed-off-by:
Allan McRae <allan@archlinux.org>
-
Signed-off-by:
Rikard Falkeborn <rikard.falkeborn@gmail.com> Signed-off-by:
Allan McRae <allan@archlinux.org>
-
Before this change, LC_TIME=zh_TW.UTF-8 makepkg has the following line: ==> Making package: foobar 1-1 (日 2月 11 01:13:42 CST 2018) With this patch, this line becomes: ==> Making package: foobar 1-1 (西元2018年02月11日 (週日) 01時13分57秒) The latter is more natural for a Chinese native speaker. Signed-off-by:
Chih-Hsuan Yen <yan12125@gmail.com> Signed-off-by:
Allan McRae <allan@archlinux.org>
-
The acinclude.m4 uses AS_VAR_APPEND macro. This marco is introduced in 2.64[1], hence we bump AC_PREREQ to 2.64 to avoid undefined marco on 2.63 autoconf. [1] https://lists.gnu.org/archive/html/autoconf/2009-07/msg00079.html Signed-off-by:
Huáng Jùnliàng <i@jhuang.me> Signed-off-by:
Allan McRae <allan@archlinux.org>
-
bump libarchive requirement to >= 3.0.0 as we use `archive_write_free` available from 3.0.0 Signed-off-by:
Huáng Jùnliàng <i@jhuang.me> Signed-off-by:
Allan McRae <allan@archlinux.org>
-
They're all generated during make. Signed-off-by:
Allan McRae <allan@archlinux.org>
-
Signed-off-by:
Allan McRae <allan@archlinux.org>
-
Signed-off-by:
Allan McRae <allan@archlinux.org>
-
Signed-off-by:
Allan McRae <allan@archlinux.org>
-
Currently this seems to be only theoretically useful. The most likely reason for wanting a packagelist is in order to script makepkg and derive the filenames for the packages we want to install or repo-add, but in the current implementation this requires a lot of additional post-processing which must be duplicated in every utility to wrap makepkg. - It is of minimal use to know what packages might get created on some other device utilizing a different CPU/OS architecture, so don't list them. - It is non-trivial to reimplement makepkg's logic for sourcing any of several makepkg.conf configuration files, then applying environment overrides in order to get the PKGDEST and PKGEXT, so include them directly in the returned filenames. - Output is delimited by newlines, for readability. For maximum parsing reliability, libmakepkg needs to learn how to lint the PKGDEST and PKGEXT variables to ensure they do not contain newlines, which will be submitted in a separate patch. Signed-off-by:
Eli Schwartz <eschwartz@archlinux.org> Signed-off-by:
Allan McRae <allan@archlinux.org>
-
- 06 Feb, 2018 2 commits
-
-
Query operations act on the local db, not the filesystem. Also, a valid use case for -Qo is to discover what package owns a deleted file so it can be reinstalled. Closes FS#55856. Signed-off-by:
Ivy Foster <iff@escondida.tk> Signed-off-by:
Allan McRae <allan@archlinux.org>
-
S_ISDIR is int and "returns non-zero" if the file is a directory. Signed-off-by:
Ivy Foster <iff@escondida.tk> Signed-off-by:
Allan McRae <allan@archlinux.org>
-
- 19 Jan, 2018 8 commits
-
-
Allan McRae authored
The --root option was widely misunderstood, and is now replaced by --sysroot. Signed-off-by:
Allan McRae <allan@archlinux.org>
-
Add a new man page which describes the structure of a BUILDINFO file included in a package produced by makepkg. Signed-off-by:
Jelle van der Waa <jelle@vdwaa.nl> Signed-off-by:
Allan McRae <allan@archlinux.org>
-
Recent versions of GnuPG are perfectly capable of using sane defaults, and the default SKS keyserver over hkps:// is better than hardcoding the same keyserver over hkp:// anyway. Fixes FS#55278 Signed-off-by:
Eli Schwartz <eschwartz@archlinux.org> Signed-off-by:
Allan McRae <allan@archlinux.org>
-
Fixes FS#49093 Signed-off-by:
Eli Schwartz <eschwartz@archlinux.org> Signed-off-by:
Allan McRae <allan@archlinux.org>
-
In commit ab2be579 return codes were implemented, and the output of install_package was improperly assigned to a variable when the return code was wanted. All we need to do is restore the previous exit handling, but return $? instead of hardcoding "0". Reported-by:
xftroxgpx <xftroxgpx@protonmail.com> Signed-off-by:
Eli Schwartz <eschwartz@archlinux.org> Signed-off-by:
Allan McRae <allan@archlinux.org>
-
Signed-off-by:
Joel Teichroeb <joel@teichroeb.net> Signed-off-by:
Allan McRae <allan@archlinux.org>
-
Because parsing pacman.conf is so difficult that even we can't do it right. Signed-off-by:
Andrew Gregory <andrew.gregory.8@gmail.com> Signed-off-by:
Allan McRae <allan@archlinux.org>
-
Parsing pacman's configuration file is non-trivial and extremely difficult to do correctly from scripts; even our own do it incorrectly. pacman-conf is a dedicated tool specifically to allow scripts to parse config files, getting the same value that pacman itself would use. Signed-off-by:
Andrew Gregory <andrew.gregory.8@gmail.com> Signed-off-by:
Allan McRae <allan@archlinux.org>
-
- 18 Jan, 2018 2 commits
-
-
Default values for configuration settings were being set during alpm setup and in some cases were never saved back to the original config struct. Refactoring all default settings into a separate function and saving them onto the original config struct will allow pacman-conf to resolve the defaults without having to setup alpm. Signed-off-by:
Andrew Gregory <andrew.gregory.8@gmail.com> Signed-off-by:
Allan McRae <allan@archlinux.org>
-
To allow pacman-conf to parse the configuration file without having to also setup alpm. Signed-off-by:
Andrew Gregory <andrew.gregory.8@gmail.com> Signed-off-by:
Allan McRae <allan@archlinux.org>
-
- 11 Jan, 2018 1 commit
-
-
Allan McRae authored
RFC 4880 defines two packet formats for OpenPGP. Pacman aborted its key in keyring check with an error message if it encountered the new format. This was fine until some annoying Arch Trusted User generated a key using the new format! Implement the new format. This also required parsing the hashed sub packets. requiring the parsing code to moved to its own function. Signed-off-by:
Allan McRae <allan@archlinux.org>
-
- 10 Jan, 2018 3 commits
-
-
Allan McRae authored
Commit 8bec63bf attempted to switch to using -fdebug-prefix-map to set file locations in debug packages. It make a few mistakes... 1) Adding debug C{,XX}FLAGS only worked if DBGSRCDIR was defined in makepkg.conf. Fix this by falling back to the default value. 2) Using -fdebug-prefix-map altered a lot of assumptions about file locations when copying source files into debug packages. This resulted in lots of messages of failed cp in packaging output. 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>
-
If rehash ever failed with a full hash it would return the old hash that is already full. get_hash_position would then loop forever because it would never find an empty bucket. Signed-off-by:
Andrew Gregory <andrew.gregory.8@gmail.com> Signed-off-by:
Allan McRae <allan@archlinux.org>
-
- 09 Jan, 2018 2 commits
-
-
Allan McRae authored
If you manage to download a bad database (e.g. an html file when behind a proxy or with a badly configured webserver), pacman makes sure you know about it. Here is some example output: error: could not open file /var/lib/pacman/sync/extra.db: Unrecognized archive format error: could not open file /var/lib/pacman/sync/extra.db: Unrecognized archive format error: could not open file /var/lib/pacman/sync/extra.db: Unrecognized archive format error: could not open file /var/lib/pacman/sync/extra.db: Unrecognized archive format error: could not open file /var/lib/pacman/sync/extra.db: Unrecognized archive format error: could not open file /var/lib/pacman/sync/extra.db: Unrecognized archive format error: could not open file /var/lib/pacman/sync/extra.db: Unrecognized archive format error: could not open file /var/lib/pacman/sync/extra.db: Unrecognized archive format error: could not open file /var/lib/pacman/sync/extra.db: Unrecognized archive format error: could not open file /var/lib/pacman/sync/extra.db: Unrecognized archive format error: could not open file /var/lib/pacman/sync/extra.db: Unrecognized archive format error: could not open file /var/lib/pacman/sync/extra.db: Unrecognized archive format error: could not open file /var/lib/pacman/sync/extra.db: Unrecognized archive format error: could not open file /var/lib/pacman/sync/extra.db: Unrecognized archive format error: could not open file /var/lib/pacman/sync/extra.db: Unrecognized archive format error: could not open file /var/lib/pacman/sync/extra.db: Unrecognized archive format error: could not open file /var/lib/pacman/sync/extra.db: Unrecognized archive format error: could not open file /var/lib/pacman/sync/extra.db: Unrecognized archive format error: could not open file /var/lib/pacman/sync/extra.db: Unrecognized archive format error: could not open file /var/lib/pacman/sync/extra.db: Unrecognized archive format error: could not open file /var/lib/pacman/sync/extra.db: Unrecognized archive format error: could not open file /var/lib/pacman/sync/extra.db: Unrecognized archive format error: could not open file /var/lib/pacman/sync/extra.db: Unrecognized archive format error: could not open file /var/lib/pacman/sync/extra.db: Unrecognized archive format I don't know how many times that gets printed because it goes beyond my scrollback buffer. Flag a database that we can "open" and "fstat" but not read from as invalid to avoid this. Signed-off-by:
Allan McRae <allan@archlinux.org>
-
Allan McRae authored
Passing an empty string to pacman -Qo results in: error: No package owns <first directory in $PATH> Catch empty strings and report an error. Signed-off-by:
Allan McRae <allan@archlinux.org>
-
- 06 Jan, 2018 3 commits
-
-
6cfc4757 was overzealous in attempting to optimize away a call to strcmp based on a comparison of hashes. The call can be skipped if the hashes are different, but different strings could have the same hash. Signed-off-by:
Andrew Gregory <andrew.gregory.8@gmail.com> Signed-off-by:
Allan McRae <allan@archlinux.org>
-
Signed-off-by:
Eli Schwartz <eschwartz@archlinux.org> Signed-off-by:
Allan McRae <allan@archlinux.org>
-
I think two ways to ask for this are enough for everyone, and we have never documented this anyway. Signed-off-by:
Eli Schwartz <eschwartz@archlinux.org> Signed-off-by:
Allan McRae <allan@archlinux.org>
-