summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAge
* Document alpm_list files are to be stand aloneAllan McRae2013-06-06
| | | | Signed-off-by: Allan McRae <allan@archlinux.org>
* die if '-' is given with empty stdinAndrew Gregory2013-06-06
| | | | | | | | | | Several operations default to all packages/repos/etc if no targets are provided. If a user provides '-' they almost certainly expect there to be targets on stdin and will be surprised if pacman falls back to the default because there are none. Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
* Merge branch 'maint'Allan McRae2013-06-06
|\
| * Pull translation updates and regenerateAllan McRae2013-06-06
| | | | | | | | Signed-off-by: Allan McRae <allan@archlinux.org>
| * pacman-key: Do not reinterpret keys from revoked keyringsDave Reisner2013-06-04
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Given a revoked keyring containing only: BC1FBE4D2826A0B51E47ED62E2539214C6C11350 We should only disable this specific keyid. This change enforces that the contents of the -revoked keyring file are full fingerprints which can uniquely identify a key. Before: # pacman-key --populate archlinux ==> Appending keys from archlinux.gpg... ==> Locally signing trusted keys in keyring... -> Locally signing key 0E8B644079F599DFC1DDC3973348882F6AC6A4C2... -> Locally signing key 684148BB25B49E986A4944C55184252D824B18E8... -> Locally signing key 44D4A033AC140143927397D47EFD567D4C7EA887... -> Locally signing key 27FFC4769E19F096D41D9265A04F9397CDFD6BB0... -> Locally signing key AB19265E5D7D20687D303246BA1DFB64FFF979E7... ==> Importing owner trust values... ==> Disabling revoked keys in keyring... -> Disabling key 1390420191... -> Disabling key E2539214C6C11350... -> Disabling key 8544EA82113502DE... ==> Updating trust database... gpg: next trustdb check due at 2014-01-22 After: # pacman-key --populate archlinux ==> Appending keys from archlinux.gpg... ==> Locally signing trusted keys in keyring... -> Locally signing key 0E8B644079F599DFC1DDC3973348882F6AC6A4C2... -> Locally signing key 684148BB25B49E986A4944C55184252D824B18E8... -> Locally signing key 44D4A033AC140143927397D47EFD567D4C7EA887... -> Locally signing key 27FFC4769E19F096D41D9265A04F9397CDFD6BB0... -> Locally signing key AB19265E5D7D20687D303246BA1DFB64FFF979E7... ==> Importing owner trust values... ==> Disabling revoked keys in keyring... -> Disabling key BC1FBE4D2826A0B51E47ED62E2539214C6C11350... ==> Updating trust database... gpg: next trustdb check due at 2014-01-22 Partially addresses FS#35478. This does nothing to confirm whether or not the key was successfully disabled -- a ridiculously simple request which appears to be far too difficult for gpg to manage. Signed-off-by: Dave Reisner <dreisner@archlinux.org> Signed-off-by: Allan McRae <allan@archlinux.org>
| * validate %FILEPATH% when parsing repo dbsSimon Gomizelj2013-06-04
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently we make no effort to validate the %FILENAME% field in the repo db. This allows for relative paths to be considered valid. A carefully crafted db entry with a malicious relative path, (e.g. `../../../../etc/passwd`) will cause pacman to to overwrite _any_ file on the target's machine. Add the following validation: - doesn't start with '.' - doesn't contain a '/' - won't overflow PATH_MAX Signed-off-by: Simon Gomizelj <simongmzlj@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
| * Restrict pkgname from starting with a dot.Allan McRae2013-06-04
| | | | | | | | | | | | | | | | | | Adding this restriction means we can filter any FILENAME entry from starting with a "/" or a ".". Use the term "dot" as it is more computing relevant compared to "full stop" or "period" which vary depending on English locale. Signed-off-by: Allan McRae <allan@archlinux.org>
| * Remove backslash typo from makepkg man pageEric Bélanger2013-05-29
| | | | | | | | | | Signed-off-by: Eric Bélanger <snowmaniscool@gmail.com> Signed-off-by: Dan McGee <dan@archlinux.org>
* | improve dir->file transition conflict resolutionAndrew Gregory2013-06-03
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Packages removed due to conflicts are always removed at the beginning of the transaction and as such can be included in the check for whether all owners of a directory will be removed in a transaction. Installed versions of packages being upgraded, other than the one with the conflict, cannot be used because our transaction ordering is not intelligent enough to ensure that they are removed prior to the installation of the conflicted package. Also, return false from dir_belongsto_pkgs on errors. Previously, we simply continued which could return true even if we were unable to actually establish that the package owned the entire tree. Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
* | query_fileowner: remove symlink supportAndrew Gregory2013-06-03
| | | | | | | | | | Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
* | unlink_file: treat symlinks like normal filesAndrew Gregory2013-06-03
| | | | | | | | | | | | | | | | We always want to work with the package file itself, not its target if it's a symlink. Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
* | extract_single_file: consolidate symlink casesAndrew Gregory2013-06-03
| | | | | | | | | | Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
* | conflict.c: check for file -> dir replacementsAndrew Gregory2013-06-03
| | | | | | | | | | Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
* | conflict.c: exclude trailing slash from file pathAndrew Gregory2013-06-03
| | | | | | | | | | | | | | | | | | After the initial checks, we either use the path as a directory and have to append the trailing slash anyway or use it as a file in which case the trailing slash should be excluded. Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
* | conflict.c: do not ignore symlink<->dir conflictsAndrew Gregory2013-06-03
| | | | | | | | | | Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
* | alpm_filelist: remove resolved_pathAndrew Gregory2013-06-03
| | | | | | | | | | Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
* | update tests for symlink support removalAndrew Gregory2013-06-03
| | | | | | | | | | Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
* | Revise pacman(8)Jason St. John2013-05-30
| | | | | | | | | | | | | | | | | | Resolve several grammatical errors and minor formatting consistency issues in pacman(8). Generalize the "FTP servers" and package file extension information. Signed-off-by: Jason St. John <jstjohn@purdue.edu> Signed-off-by: Allan McRae <allan@archlinux.org>
* | Revise PKGBUILD(5)Jason St. John2013-05-30
| | | | | | | | | | | | | | | | Resolve several grammatical errors and minor formatting consistency issues in PKGBUILD(5). Signed-off-by: Jason St. John <jstjohn@purdue.edu> Signed-off-by: Allan McRae <allan@archlinux.org>
* | makepkg-template: add --version and some license infoFlorian Pritz2013-05-30
| | | | | | | | | | Signed-off-by: Florian Pritz <bluewind@xinu.at> Signed-off-by: Allan McRae <allan@archlinux.org>
* | makepkg-template: Stop using given/whenFlorian Pritz2013-05-29
| | | | | | | | | | | | | | | | | | given/when has been marked experimental in perl 5.18 because it will change it 5.20. if/else is ugly, but hiding the generated warning is no good solution either, so we us if/else for now. Signed-off-by: Florian Pritz <bluewind@xinu.at> Signed-off-by: Allan McRae <allan@archlinux.org>
* | makepkg-template: Add gettext supportFlorian Pritz2013-05-29
| | | | | | | | | | | | | | | | This also slighty changes the word order in the description for --newest. Signed-off-by: Florian Pritz <bluewind@xinu.at> Signed-off-by: Allan McRae <allan@archlinux.org>
* | Add makepkg-templateFlorian Pritz2013-05-29
| | | | | | | | | | | | | | This allows for somewhat easy templating for PKGBUILDs. Signed-off-by: Florian Pritz <bluewind@xinu.at> Signed-off-by: Allan McRae <allan@archlinux.org>
* | Update example PKGBUILDJason St. John2013-05-29
| | | | | | | | | | | | | | | | | | | | | | | | Update doc/PKGBUILD-example.txt with several changes from the official Arch Linux package for patch-2.7.1-1, including other changes shown below: -- replaces spaces with tabs in functions -- replaces 'make prefix=' with 'make DESTDIR=' -- improves quoting of the "cd" command in functions Signed-off-by: Jason St. John <jstjohn@purdue.edu> Signed-off-by: Allan McRae <allan@archlinux.org>
* | Quote sources in PKGBUILD prototypes and example PKGBUILDJason St. John2013-05-29
| | | | | | | | | | Signed-off-by: Jason St. John <jstjohn@purdue.edu> Signed-off-by: Allan McRae <allan@archlinux.org>
* | Improve error message when package is missing required signatureAllan McRae2013-05-29
| | | | | | | | | | | | | | | | | | | | | | When attempting to install a package (either via -S or -U) and the signature is missing, the current error message "invalid or corrupted package (PGP signature)" is very unclear. Instead inform the user that the package is missing the required signature. Partial fix for FS#34741. Signed-off-by: Allan McRae <allan@archlinux.org>
* | pacman.8: document .pacorig filesAndrew Gregory2013-05-29
| | | | | | | | | | Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
* | add.c: refactor backup file modification checksAndrew Gregory2013-05-29
| | | | | | | | | | | | | | | | | | | | | | | | | | The previous implementation was overly complex with unnecessary checks and nested conditionals. By reordering the tests and changing them to all be checks for positive hash matches rather than non-matches, we can collapse several cases and make the process much more linear. This removes the need to set hash_orig = "" just to reach some of the checks and corrects a faulty assumption that files are equivalent when the hashing process fails. Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
* | makepkg: add support for CARCH environment varPhillip Smith2013-05-29
| | | | | | | | | | | | | | | | | | | | Add support for overriding configuration in /etc/makepkg.conf and ~/.makepkg.conf by setting the environment variable CARCH similar to how SRCDEST and PKGDEST behave. Fixes FS#35030. Signed-off-by: Allan McRae <allan@archlinux.org>
* | Clean partial downloads from cacheAllan McRae2013-05-29
| | | | | | | | | | | | | | | | | | When using "pacman -Sc" to clean the cache, it make sense to also remove partially downloaded files. Fixes FS#34317. Signed-off-by: Allan McRae <allan@archlinux.org>
* | makepkg: remove support for PKGBUILDs without a package() functionAllan McRae2013-05-29
| | | | | | | | | | | | | | | | | | | | | | Not having a package() function means all building occurs as root and repackaging can lose permissions. Given the use of package() functions has been around for years and we deprecated not having one in pacman-4.1, we can remove support for PKGBUILDs without package() functions altogether. However, keep PKGBUILDs that have neither a build() or package() function working. Signed-off-by: Allan McRae <allan@archlinux.org>
* | makepkg: Add helper to test for functions in build scriptAllan McRae2013-05-29
| | | | | | | | Signed-off-by: Allan McRae <allan@archlinux.org>
* | makepkg: remove sourcing PKGBUILD from stdinAllan McRae2013-05-29
| | | | | | | | | | | | | | | | | | Using PKGBUILDs from stdin means that we can not use pkgver() in packages. Given we have the "-p" option to pass any file to makepkg and passing a PKGBUILD in the form "cat foo | makepkg" does not work, this feature is unneeded. Signed-off-by: Allan McRae <allan@archlinux.org>
* | pmtest: set LC_ALL=C in subprocess.callAndrew Gregory2013-05-29
| | | | | | | | | | | | | | | | | | | | | | | | LC_ALL=C is required to force pacman's output to English for tests that rely on that output, but setting it in Makefile.am results in those tests breaking under different locales when pactest.py is run directly. This will also ease an eventual transition to python3 which LC_ALL=C causes to default to ascii encoded strings, creating problems for tests with unicode strings. Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
* | Merge branch 'maint'Allan McRae2013-05-29
|\|
| * Fix various typos in NEWSJason St. John2013-05-29
| | | | | | | | | | | | | | | | | | | | | | imporve -> improve diskspace -> disk space BTRFS -> Btrfs filelists -> file lists filesize -> file size Signed-off-by: Jason St. John <jstjohn@purdue.edu> Signed-off-by: Allan McRae <allan@archlinux.org>
| * Remove incorrect bug number from NEWSAllan McRae2013-05-19
| | | | | | | | | | | | | | The wrong bug number is mentioned in commit 32327dc8 and this was perpetuated into the NEWS file. Signed-off-by: Allan McRae <allan@archlinux.org>
| * makepkg: Use LOGDEST for logpipeAllan McRae2013-05-18
| | | | | | | | | | | | | | If LOGDEST is set, we may not check that $startdir is writable. Store the log pipe in LOGDEST instead. Signed-off-by: Allan McRae <allan@archlinux.org>
| * Fix comment typoAllan McRae2013-05-18
| | | | | | | | Signed-off-by: Allan McRae <allan@archlinux.org>
| * contrib: Remove harcoded /etc/pacman.confWilliam Giokas2013-05-18
| | | | | | | | | | Signed-off-by: William Giokas <1007380@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
| * Revert "paccache: avoid subshell in calling runcmd"Dave Reisner2013-05-18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | su is terribad. In addition to reverting, this also removes support for privilege escalation via su. If you want to use paccache as root and fail to comprehend how much better sudo is than su, then run paccache directly via su. Fixes FS#35173. This reverts commit 597286eb258f841dfc00f65474138fc6192f0092. Signed-off-by: Dave Reisner <dreisner@archlinux.org> Signed-off-by: Allan McRae <allan@archlinux.org>
| * makepkg: fixup broken revision and repo referencesDave Reisner2013-05-18
| | | | | | | | | | | | | | | | | | | | | | | | bzr support "worked", but didn't handle any of the actual features we wanted with makepkg. This moves the revision specification to the proper place (extraction, rather than download), and fixes an additional broken reference to $repo which was never set. Fixes FS#35281. Signed-off-by: Dave Reisner <dreisner@archlinux.org> Signed-off-by: Allan McRae <allan@archlinux.org>
* | Merge branch 'maint'Allan McRae2013-05-07
|\|
| * 4.1.1 release NEWS, version bumps, etc.Allan McRae2013-05-07
| | | | | | | | Signed-off-by: Allan McRae <allan@archlinux.org>
| * More translation updatesAllan McRae2013-05-07
| | | | | | | | Signed-off-by: Allan McRae <allan@archlinux.org>
| * pacman/util.c: add missing bracesAndrew Gregory2013-05-07
| | | | | | | | | | Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
| * pacman/util.c: fix output flushing in questionsAndrew Gregory2013-05-07
| | | | | | | | | | | | | | | | | | Flush stream before taking input in select_question() and only flush once during question(). Also fix some tabs inside related fprintf statements. Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
| * Pull translation updates from transifexAllan McRae2013-04-30
| | | | | | | | Signed-off-by: Allan McRae <allan@archlinux.org>
| * Add -V/--version option to makepkg's usage function and man pageEric Bélanger2013-04-30
| | | | | | | | | | Signed-off-by: Eric Bélanger <snowmaniscool@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
| * makepkg: avoid redirecting stdoutDave Reisner2013-04-28
| | | | | | | | | | | | | | | | | | | | If stdout is already redirected, redirecting stderr to stdout can lead to undesirable results. Fixes FS#34974. Signed-off-by: Dave Reisner <dreisner@archlinux.org> Signed-off-by: Allan McRae <allan@archlinux.org>