summaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)AuthorFilesLines
2014-10-13makepkg: show full fingerprint on pgp failureDave Reisner2-3/+4
Rather than implementing suffix matching, which might clash, let's just print the full fingerprint of the err'ing key so that the user can copy/paste it into validpgpkeys. Also, make it clear in the manpage that validpgpkeys needs full fingerprints, and nothing else. Signed-off-by: Allan McRae <allan@archlinux.org>
2014-10-13Revert "makepkg: allow less than the full fingerprint in validpgpkeys"Dave Reisner2-23/+2
This reverts commit 50296576d006d433fbfd4a6c57d5f95a942f7833. Signed-off-by: Allan McRae <allan@archlinux.org>
2014-10-10There are not hooks!Allan McRae1-1/+1
Refer to install scripts as scripts and not hooks. Signed-off-by: Allan McRae <allan@archlinux.org>
2014-10-06pacman-db-upgrade: do not mangle file listsAndrew Gregory1-7/+22
grep'ing out blank lines and sorting output thoroughly breaks any file lists with %BACKUP% entries which must be separated from the file list by a blank line. Adds a custom function to ensure that all paths printed are non-empty and unique. Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
2014-10-02alpm: Fix wrong xferred/total sizes when resuming downloadsOlivier Brunel1-1/+3
When a package is already partially downloaded in the cache, its download size will only be of what's left to be downloaded. Since pkg->download_size is what's used when calculating the total download size for the totaldl callback, same thing apply. However, the download progress callback was including this initial size, which would thus lead to invalid values (and percentage) used in frontends. That is, the progress bar could e.g. go further than 100% In the case of pacman, there is a sanity check for different historical reason (44a57c89), so before the possible "overflow" was noticed, the total download size/progress reported was wrong. Once caught, the TotalDownload option was ignored and it would use individual file download values as fallback instead. Signed-off-by: Olivier Brunel <jjk@jjacky.com> Signed-off-by: Allan McRae <allan@archlinux.org>
2014-10-02doc/translation-help.txt: Remove link to tutorial on sarovar.orgMiguel de Val-Borro1-3/+1
The website sarovar.org has been shut down and the tutorial is not relevant any more. Signed-off-by: Miguel de Val-Borro <miguel@archlinux.net> Signed-off-by: Allan McRae <allan@archlinux.org>
2014-10-01_alpm_key_in_keychain: cache known keysAndrew Gregory3-0/+14
Implements FS#38042 Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com>
2014-10-01check_keyring: skip keys known to be missingAndrew Gregory1-4/+3
Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com>
2014-10-01remove retry check from signature validationAndrew Gregory1-8/+2
The retry path was removed by 4ccf16dff589ce9f369d377bb5d3f490bd27c624 Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com>
2014-09-30Add --assume-installed optionFlorian Pritz12-3/+152
This allows to ignore specific dependencies. Signed-off-by: Florian Pritz <bluewind@xinu.at>
2014-09-30libalpm: export alpm_splitdep as alpm_dep_from_depstring and alpm_dep_freeFlorian Pritz8-23/+32
Signed-off-by: Florian Pritz <bluewind@xinu.at>
2014-09-30deps.c: split _alpm_depcmp into _alpm_depcmp_providesFlorian Pritz2-7/+15
This allows to reuse the provision checker for a simple list of provisions without a package. Signed-off-by: Florian Pritz <bluewind@xinu.at>
2014-09-30table_display: only check width when non-zeroAndrew Gregory1-1/+1
A width of 0 indicates that either pacman is not attached to a tty or the user does not want line wrapping. Either way pacman should not fall back to the basic display. Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com>
2014-09-30avoid line wrapping if not in a tty or COLUMNS=0Andrew Gregory1-8/+16
Scripts that parse pacman's output (like pacsearch) generally do not want wrapped lines. Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com>
2014-09-30makepkg: allow less than the full fingerprint in validpgpkeysDave Reisner2-2/+23
I found this feature confusing, and the documentation wasn't any help. It was pointed out to me on IRC that validpgpkeys expects full fingerprints, and won't accept shorter forms. This makes the documentation insufficient, and the variable name itself misleading. This patch bolsters the documentation to explain more about what the contents should be, and implements suffix matching to allow matching on shorters fingerprint suffices. Now, when makepkg tells you that a key ID isn't valid, it's sufficient to manually check the key ID against the known good ID, and add it as is to validpgpkeys. Signed-off-by: Allan McRae <allan@archlinux.org>
2014-09-30makepkg: move negation in inequality comparisonsDave Reisner1-5/+5
This commit changes the few remaining instances of: [[ ! $foo = "$bar" ]] to the more common: [[ $foo != "$bar" ]] Signed-off-by: Allan McRae <allan@archlinux.org>
2014-09-30paccache: parse_filename bug fixMaxim Andersson1-1/+6
Filenames got parsed wrongly, causing whitelist- and blacklist-checks to always return false. Caused by 8122fae51a when full path names to pkgs were introduced. Signed-off-by: Maxim Andersson <thesilentboatman@gmail.com>
2014-09-30makepkg: abort if we can't add install/changelog to packageDave Reisner1-1/+4
2014-09-30updpkgsums: update to recognize arch-specific sourcesDave Reisner1-1/+1
This change reveals a bootstrapping bug -- since we call the bare "makepkg" and rely on PATH lookup, we might not have a makepkg which can generate architecture-specific checksums.
2014-09-30PKGBUILD: add support for arch-specific sourcesDave Reisner2-35/+151
This implements support for declarations such as: arch=('i686' 'x86_64') ... source=("somescript.sh") source_i686=("http://evilmonster.com/i686/ponies-9001-1.i686.bin") source_x86_64=("http://evilmonster.com/i686/ponies-9001-1.x86_64.bin") md5sums=('d41d8cd98f00b204e9800998ecf8427e') md5sums_i686=('e4ca381035a34b7a852184cc0dd89baa') md5sums_x86_64=('4019740e6998f30a3c534bac6a83f582') Just the same as the "untagged" sources, multiple integrity algorithms are supported. The manpage is updated to reflect support for these suffices. This commit also refactors download_sources slightly: 1) to use the otherwise preferred convention of lowercase local variable names, and to make the handling of $1 more clear. 2) rename the "fast" parameter to "novcs", to make it more clear what this token does. 3) add a new possible token "allarch" to ensure that download_sources will fetch all sources, for all architectures.
2014-09-30makepkg: break out checksum generation to its own functionDave Reisner1-32/+41
This also fixes a "bug" in which a PKGBUILD without any source array would generate "md5sums=()". While not technically wrong, we can easily do better and emit nothing at all.
2014-09-30makepkg: break out check_checksums to reasonably sized functionsDave Reisner1-41/+54
2014-09-30Revert "Remove log_cb, add ALPM_EVENT_LOG instead"Andrew Gregory10-72/+75
Moving logging to the event callback caused warnings under clang due to non-literal format strings and silenced all log messages when --print was used. This reverts commit cd793c5ab7689cc8cbc18277375b368060e5acfe. Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com> Conflicts: lib/libalpm/alpm.h src/pacman/callback.c Signed-off-by: Allan McRae <allan@archlinux.org>
2014-09-23pacman.c: Add -gg, -ii, and -yy to help summaryJohannes Löthberg1-4/+6
The sync help summaries was missing the information about: * -gg: View all groups and members * -ii: View extended information * -yy: Force refresh even if DBs are up to date Fixes FS#41388. Original-work-by: Earnestly <zibeon@gmail.com> Signed-off-by: Johannes Löthberg <johannes@kyriasis.com> Signed-off-by: Allan McRae <allan@archlinux.org>
2014-09-23pacman: set SA_RESTART for signal handlerAndrew Gregory1-1/+1
Calling a signal handler interrupts some functions, most notably read() and therefore fgets(). Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com>
2014-09-23wrap fgets to retry on EINTRAndrew Gregory7-14/+43
The read() underlying fgets() can be interrupted by a signal handler causing fgets() to return NULL. Before we started handling SIGWINCH, the odds of interrupting a read were low and typically resulted in termination anyway. Replace all fgets calls with a wrapper that retries in EINTR. Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com>
2014-09-23makepkg: disallow values of 'arch' which might be problematicDave Reisner1-3/+11
We rely on values in the arch array to be valid as part of variable names, so extend the arch lint check to catch this. This also cleans up lint_arch to restrict the use of "lint" only to the package-specific architecture checks. It previously had an odd declaration with a conditional expansion that would never be true.
2014-09-23makepkg: let --source imply --ignorearchDave Reisner1-4/+10
Since source package creation is architecture independent, we should ignore architecture-dependent behaviors such as the lint check which will halt execution when the host machine is not a supported arch. https://github.com/falconindy/pkgbuild-introspection/issues/15
2014-09-23makepkg: use correct terminologyDave Reisner1-1/+1
unix has no "folders".
2014-09-23replace --reference on chmod/chown commandsWolfgang Bumiller3-2/+14
Signed-off-by: Allan McRae <allan@archlinux.org>
2014-09-23alpm.h: remove outdated pkg_get_backup doxygenAndrew Gregory1-3/+0
alpm_pkg_get_backup hasn't returned strings since 54ef162a1a9e27e362732d873f0739bc0a2cf1bf in 2011. Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
2014-09-23Check the version of the local database during validationAllan McRae2-19/+12
When we check the database version directly, there is no longer a need to scan for depends files. Signed-off-by: Allan McRae <allan@archlinux.org>
2014-09-23Add version file to empty local databaseAllan McRae2-12/+35
If a user manually creates the local database directory, or has an empty local database for some other reason, we silently add a version file Signed-off-by: Allan McRae <allan@archlinux.org>
2014-09-23Add version file when creating local database directoryAllan McRae2-0/+20
The version of the local pacman database is stored in its root in the file ALPM_DB_VERSION. The version is starting at 9, corresponding to the next libalpm library version. Signed-off-by: Allan McRae <allan@archlinux.org>
2014-09-23Create local database directory if it is missingAllan McRae1-14/+26
This means that a missing local database becomes an error (as it should be immediately created). Note this only creates the "local" directory and not its parent, which is checked for during locking. Signed-off-by: Allan McRae <allan@archlinux.org>
2014-09-23Extend database upgrade script to handle alpm db version 9Andrew Gregory1-10/+86
Original-work-by: Allan McRae <allan@archlinux.org> Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
2014-09-16pacman-db-upgrade: use pacman-style optionsAndrew Gregory2-21/+53
* convert dbpath from argument to option * add --config and --root options * read dbpath and root from config file * if root is set but not dbpath, dbpath is set relative to root Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
2014-09-16fix improper FREELIST callsAndrew Gregory2-3/+6
* conflicts need to be freed with alpm_conflict_free * sync dbs need to be unregistered and are handled by alpm_release Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
2014-09-15updpkgsums: use a throwaway build dirDave Reisner1-0/+2
This prevents updpkgsums from potentially dirtying an otherwise pristine directory (likely $PWD) when makepkg creates the srclinks. Signed-off-by: Allan McRae <allan@archlinux.org>
2014-09-15makepkg: do not eval dlcmdlolilolicon1-11/+10
This eval enables the following in a PKGBUILD to "just work": source=('$pkgname-$pkgver.tar.gz'::'https://host/$pkgver.tar.gz') This has at least two problems: - It violated the principle of least surprise. - It could be a security issue since URLs are arbitrary input. Instead, expand the dlagent command line into an array, replace the %o, %u place holders, and run the resultant command line as is. Embedded spaces in the DLAGENTS entry can be escaped with a backslash. Fixes FS#41682 Signed-off-by: Allan McRae <allan@archlinux.org>
2014-09-15makepkg: Allow using sources with :: in themWilliam Giokas1-3/+3
Git has the ability to use helper applications for interfacing with hg, and from what we had before, the following url:: foo::git+hg::http://foo.bar/foobar would get converted to something along the lines of: filename: foo URL: http://foo.bar/foobar and the 'git+hg' part would essentially be ignored when it's getting set up in the 'get_protocol' and 'get_downloadclient' functions. With this patch it is possible to have a source link with '::' in it, however it is not possible to have a filename with '::', which is the current behavior. Signed-off-by: Allan McRae <allan@archlinux.org>
2014-09-15paccache: read default cachedir from pacman.confDave Reisner1-2/+21
Implements FS#40738.
2014-09-15paccache: add support for multiple cachedirsMaxim Andersson1-23/+37
Signed-off-by: Maxim Andersson <thesilentboatman@gmail.com>
2014-09-15PKGBUILD(5): arch-specific fields are always additionalDave Reisner1-2/+2
Change e10775340 should have included this. Signed-off-by: Allan McRae <allan@archlinux.org>
2014-08-09pacman-key: stricter parsing for -verifyAllan McRae1-1/+1
Prevents trust being spoofed by using TRUST_FULLY in the signatory's name or in an added notation. Fixes FS#41147. Signed-off-by: Allan McRae <allan@archlinux.org>
2014-08-09pkgdelta(8): Fix broken example of --min-pkg-size with human-readable valuesJason St. John1-2/+2
The example for human-readable values must not contain a space between the value and the unit; otherwise, pkgdelta will not recognize the command options and will error out. In prose, however, there should be a space between the value and the unit. Signed-off-by: Jason St. John <jstjohn@purdue.edu> Signed-off-by: Allan McRae <allan@archlinux.org>
2014-08-09man: Improve grammar and add missing single quotes around command optionsJason St. John11-47/+49
Signed-off-by: Jason St. John <jstjohn@purdue.edu> Signed-off-by: Allan McRae <allan@archlinux.org>
2014-08-09man: Use uniform line spacing between sectionsJason St. John12-6/+30
Remove blank lines immediately following section headings. Ensure two blank lines before the start of a new section. Signed-off-by: Jason St. John <jstjohn@purdue.edu> Signed-off-by: Allan McRae <allan@archlinux.org>
2014-08-09pacman(8): Improve grammar and quotingJason St. John1-5/+5
Notable changes: * Add double quotes around printf-like formatting options for "--print-format" * Add a missing backslash in '--force' Signed-off-by: Jason St. John <jstjohn@purdue.edu> Signed-off-by: Allan McRae <allan@archlinux.org>
2014-08-09Fix loading invalid packageOlivier Brunel1-1/+3
In 5acfa65f when adding a new variable (hit_mtree), the initialization of a variable (config) was dropped, which could lead to loading invalid package files, i.e. files that aren't archive (no metadata loaded) would return a new alpm_pkg_t with everything set to 0/NULL. Depending on the operation/use of the package, this could lead to segfault. Signed-off-by: Olivier Brunel <jjk@jjacky.com> Signed-off-by: Allan McRae <allan@archlinux.org>