summaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)AuthorFilesLines
2013-06-26Make --unrequired filter packages that are optdep as wellOlivier Brunel3-7/+15
Specify it twice to only filter direct dependencies. Signed-off-by: Olivier Brunel <i.am.jack.mail@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
2013-06-26Install unchanged backup files to get correct timestamps.Patrick Steinhardt1-5/+7
Fixes FS#35515. Signed-off-by: Allan McRae <allan@archlinux.org>
2013-06-26Merge branch 'maint'Allan McRae1-1/+1
2013-06-23Respect paths with spaces on --installAndrea Scarpino1-1/+1
makepkg --install doesn't quote the absolute path, so if the path contains spaces pacman -U fails. Signed-off-by: Allan McRae <allan@archlinux.org>
2013-06-18Merge branch 'maint'Allan McRae94-737/+898
2013-06-184.1.2 release preparationv4.1.2Allan McRae3-2/+17
Signed-off-by: Allan McRae <allan@archlinux.org>
2013-06-18contrib: update .gitignoreAllan McRae1-0/+1
Signed-off-by: Allan McRae <allan@archlinux.org>
2013-06-18Pull translation updatesAllan McRae87-720/+864
Signed-off-by: Allan McRae <allan@archlinux.org>
2013-06-18pacscripts: Update for pacman changesKarol Blazewicz1-2/+2
Changes to pacman mean that -Sp can be called without root permissions and '-d' needs passed twice to completely ignore dependencies. Signed-off-by: Karol Błażewicz <karol.blazewicz at gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
2013-06-18pacscripts: don't read the whole package from cacheKarol Blazewicz1-1/+2
'-q' means "Exit as soon as each specified pattern or filename has been matched." There is no reason to keep reading the whole package from the cache when the install script has already been printed to stdout. Signed-off-by: Karol Błażewicz <karol.blazewicz at gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
2013-06-18checkupdates: Consistency in environmental variable nameAllan McRae1-8/+8
Use CHECKUPDATES_DB rather than CHECKUPDATE_DB for consistency with the script name. Signed-off-by: Allan McRae <allan@archlinux.org>
2013-06-16contrib/checkupdates: fix typoAllan McRae1-1/+1
Signed-off-by: Allan McRae <allan@archlinux.org>
2013-06-16makepkg: fix typo for distcc testAllan McRae1-1/+1
Introduced in commit 9dd42dc0. Fixes FS#35741. Signed-off-by: Allan McRae <allan@archlinux.org>
2013-06-06Correct INODECMD for BSD and DarwinAllan McRae1-2/+2
Fixes FS#35469. Signed-off-by: Allan McRae <allan@archlinux.org>
2013-06-06paccache: make --help output look nice on 80 width terminalAllan McRae1-14/+17
Signed-off-by: Allan McRae <allan@archlinux.org>
2013-06-06repo-add; add option to remove existing package files from diskPhillip Smith2-0/+16
When maintaining a custom repo, often it is undesirable to retain older versions of packages. This patch adds the --remove option to remove the current package file and it's signature from disk before adding the new one to the database. Documentation is also updated. This is an optional flag and default behaviour (leaving ondisk files alone) is not changed. Signed-off-by: Phillip Smith <fukawi2@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
2013-06-06Document alpm_list files are to be stand aloneAllan McRae2-0/+8
Signed-off-by: Allan McRae <allan@archlinux.org>
2013-06-06die if '-' is given with empty stdinAndrew Gregory1-0/+8
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>
2013-06-06Merge branch 'maint'Allan McRae119-525/+1039
2013-06-06Pull translation updates and regenerateAllan McRae114-512/+999
Signed-off-by: Allan McRae <allan@archlinux.org>
2013-06-04pacman-key: Do not reinterpret keys from revoked keyringsDave Reisner1-11/+4
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>
2013-06-04validate %FILEPATH% when parsing repo dbsSimon Gomizelj1-0/+30
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>
2013-06-04Restrict pkgname from starting with a dot.Allan McRae2-1/+5
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>
2013-06-03improve dir->file transition conflict resolutionAndrew Gregory2-68/+82
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>
2013-06-03query_fileowner: remove symlink supportAndrew Gregory1-73/+64
Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
2013-06-03unlink_file: treat symlinks like normal filesAndrew Gregory1-5/+1
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>
2013-06-03extract_single_file: consolidate symlink casesAndrew Gregory2-40/+19
Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
2013-06-03conflict.c: check for file -> dir replacementsAndrew Gregory3-21/+40
Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
2013-06-03conflict.c: exclude trailing slash from file pathAndrew Gregory3-10/+6
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>
2013-06-03conflict.c: do not ignore symlink<->dir conflictsAndrew Gregory8-17/+4
Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
2013-06-03alpm_filelist: remove resolved_pathAndrew Gregory13-263/+24
Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
2013-06-03update tests for symlink support removalAndrew Gregory9-31/+40
Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
2013-05-30Revise pacman(8)Jason St. John1-72/+74
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>
2013-05-30Revise PKGBUILD(5)Jason St. John2-64/+70
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>
2013-05-30makepkg-template: add --version and some license infoFlorian Pritz1-2/+32
Signed-off-by: Florian Pritz <bluewind@xinu.at> Signed-off-by: Allan McRae <allan@archlinux.org>
2013-05-29Remove backslash typo from makepkg man pageEric Bélanger1-1/+1
Signed-off-by: Eric Bélanger <snowmaniscool@gmail.com> Signed-off-by: Dan McGee <dan@archlinux.org>
2013-05-29makepkg-template: Stop using given/whenFlorian Pritz1-14/+8
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>
2013-05-29makepkg-template: Add gettext supportFlorian Pritz2-27/+48
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>
2013-05-29Add makepkg-templateFlorian Pritz7-0/+324
This allows for somewhat easy templating for PKGBUILDs. Signed-off-by: Florian Pritz <bluewind@xinu.at> Signed-off-by: Allan McRae <allan@archlinux.org>
2013-05-29Update example PKGBUILDJason St. John1-10/+13
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>
2013-05-29Quote sources in PKGBUILD prototypes and example PKGBUILDJason St. John3-5/+5
Signed-off-by: Jason St. John <jstjohn@purdue.edu> Signed-off-by: Allan McRae <allan@archlinux.org>
2013-05-29Improve error message when package is missing required signatureAllan McRae3-1/+8
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>
2013-05-29pacman.8: document .pacorig filesAndrew Gregory1-0/+5
Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
2013-05-29add.c: refactor backup file modification checksAndrew Gregory1-60/+57
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>
2013-05-29makepkg: add support for CARCH environment varPhillip Smith2-0/+6
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>
2013-05-29Clean partial downloads from cacheAllan McRae1-3/+1
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>
2013-05-29makepkg: remove support for PKGBUILDs without a package() functionAllan McRae1-30/+11
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>
2013-05-29makepkg: Add helper to test for functions in build scriptAllan McRae1-7/+11
Signed-off-by: Allan McRae <allan@archlinux.org>
2013-05-29makepkg: remove sourcing PKGBUILD from stdinAllan McRae1-8/+2
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>
2013-05-29pmtest: set LC_ALL=C in subprocess.callAndrew Gregory2-2/+2
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>