summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAge
* libmakepkg: update .gitignoreAllan McRae2015-09-22
| | | | Signed-off-by: Allan McRae <allan@archlinux.org>
* makepkg: remove FORCE_VER variableAllan McRae2015-09-22
| | | | | | This variable is no longer in VCS building. Signed-off-by: Allan McRae <allan@archlinux.org>
* check fileconflicts and diskspace outside commitAndrew Gregory2015-09-20
| | | | | | | | | This is necessary in order to be able to run PreTransaction hooks as close to the actual commit as possible so that we don't prematurely run hooks for a transaction that ultimately never happens. Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
* move ini parser into commonAndrew Gregory2015-09-20
| | | | | Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
* move strtrim to util-commonAndrew Gregory2015-09-20
| | | | | Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
* sortbydeps: skip local packages being updatedAndrew Gregory2015-09-19
| | | | | Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
* libmakepkg: check if PKGBUILD variables are arrays or not as appropriateAllan McRae2015-09-07
| | | | | | | | When extracting variables from PKGBUILD (e.g. for .SRCINFO creation) we make assumptions about whether variables are arrays or not. This adds a check to the PKGBUILD linter to ensure variables are arrays or not as appropriate. Signed-off-by: Allan McRae <allan@archlinux.org>
* libmakepkg: util/pkgbuild.sh needs processing on buildAllan McRae2015-09-07
| | | | | | | pkgbuild.sh contained @DEBUGSUFFIX@ and so needs to be run through the sed command on build. Signed-off-by: Allan McRae <allan@archlinux.org>
* pacman.8: Consistently refer to the package databaseAllan McRae2015-09-07
| | | | | | We use "package database" everywhere apart from in the description of "-y". Signed-off-by: Allan McRae <allan@archlinux.org>
* libalpm: Force update when database is marked as corrupted.Sebastian Lackner2015-08-08
| | | | | | | | | | | | | When a database and its signature is updated non-atomically on a server, there is a window where a user may update the database but grab the old signature. The database is marked as invalid by libalpm, which can be fixed by forcing a refresh (assuming the server has caught up and the user realizes what has happened) or with a future update of the repo. Work around this by forcing a repository refresh whenever a database is invalid. Signed-off-by: Sebastian Lackner <sebastian@fds-team.de> Signed-off-by: Allan McRae <allan@archlinux.org>
* fill in name_hash for assumeinstalled optionsAndrew Gregory2015-08-08
| | | | | | | | | alpm_depend_t is an exposed data type. Front-ends may opt for alloc'ing one and filling the fields manually, but alpm's _alpm_hash_sdbm is not exposed, making it impossible for them to fill in the name_hash field. Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
* copy assumeinstalled optionsAndrew Gregory2015-08-08
| | | | | | | All other option setters copy their input. Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
* check assumeinstalled for meaningful modAndrew Gregory2015-08-08
| | | | | | | | assumeinstalled options are used as provisions for which MOD_EQ and MOD_ANY are the only meaningful settings. Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
* check dep versions before calling strcmpAndrew Gregory2015-08-08
| | | | | | | | Fixes a segfault when trying to remove an assumeinstalled option without a version. Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
* pacman/util.c: Fix memory leak if realloc failsRikard Falkeborn2015-08-08
| | | | Signed-off-by: Allan McRae <allan@archlinux.org>
* Remove ko_KR translationAllan McRae2015-08-08
| | | | | | | The "ko_KR" locale is the same as the "ko" locale. Remove the "ko_KR" variant as it is incomplete and has been superseded by "ko" on transifex. Signed-off-by: Allan McRae <allan@archlinux.org>
* libmakepkg: move color settings to functionAllan McRae2015-07-20
| | | | Signed-off-by: Allan McRae <allan@archlinux.org>
* pacman/files.c: fix memory leak on regex errorAllan McRae2015-07-20
| | | | Signed-off-by: Allan McRae <allan@archlinux.org>
* ensure matching database and package versionLevente Polyak2015-07-20
| | | | | | | | | | | | | | | While loading each package ensure that the internal version matches the expected database version to avoid the possibility to circumvent the version check. This issue can be used by an attacker to trick the software into installing an older version. The behavior can be exploited by a man-in-the-middle attack through specially crafted database tarball containing a higher version, yet actually delivering an older and vulnerable version, which was previously shipped. Signed-off-by: Levente Polyak <anthraxx@archlinux.org> Signed-off-by: Remi Gacogne <rgacogne@archlinux.org> Signed-off-by: Allan McRae <allan@archlinux.org>
* dont remove x bit when marking pkgdir RODave Reisner2015-07-20
| | | | | | | | f170a94c137d355 potentially causes $pkgdirbase/$pkg to be undeleteable with -R or -C if a previous build was interrupted. We simply can't traverse to this directory, and rm blows up. Signed-off-by: Allan McRae <allan@archlinux.org>
* libmakepkg: lint_package requires cd_safeAllan McRae2015-07-20
| | | | Signed-off-by: Allan McRae <allan@archlinux.org>
* Handle repo/pkg style arguments to sync repo file listingAllan McRae2015-07-15
| | | | | | | | Passing "-Fl pkg" will print the filelist for the first occurance of "pkg" in the sync repos. Other version of the package can be printed using "-Fl repo/pkg". Signed-off-by: Allan McRae <allan@archlinux.org>
* Add regex search option to sync database file searchingAllan McRae2015-07-15
| | | | | | e.g. pacman -Fsx kcm.*print.*\.so Signed-off-by: Allan McRae <allan@archlinux.org>
* Implement searching for a file in the sync databasesAllan McRae2015-07-15
| | | | | | | Locates all packages that contain the listed file e.g. pacman -Fs libpng.so Signed-off-by: Allan McRae <allan@archlinux.org>
* Implement listing files from sync packagesAllan McRae2015-07-15
| | | | | | | | Does the equivalent of the -Ql option for local packages e.g. pacman -Fl glibc Signed-off-by: Allan McRae <allan@archlinux.org>
* Implement locating file owner in sync files databaseAllan McRae2015-07-15
| | | | | | | Equivalent to -Qo but for packages in the sync database e.g. pacman -Fo /usr/bin/pacman Signed-off-by: Allan McRae <allan@archlinux.org>
* Prototype pacman files database operationsAllan McRae2015-07-15
| | | | | | | Add the -F/--files operations, -s/--sync support and nd provide dummy functions for -s/--search, -l/-list and -o/--owns. Signed-off-by: Allan McRae <allan@archlinux.org>
* pacman: move database syncing to util.cAllan McRae2015-07-15
| | | | Signed-off-by: Allan McRae <allan@archlinux.org>
* Add pacman support for .files databasesAllan McRae2015-07-15
| | | | Signed-off-by: Allan McRae <allan@archlinux.org>
* Read file lists from databasesAllan McRae2015-07-15
| | | | | | | | | | If a sync database contains a "files" file, the file list will be read. Currently, there is no known demand for the file list to be lazy loaded by any libalpm frontend, so these files are read whenever present. Lazy loading can be implemented when a demand exists. Signed-off-by: Allan McRae <allan@archlinux.org>
* Allow frontends to specify the sync database extensionAllan McRae2015-07-15
| | | | | | | This allows frontends to select between the .db and .files databases currently supplied by repo-add or any other compatible database. Signed-off-by: Allan McRae <allan@archlinux.org>
* Fix formatting in parsearg_upgradeAllan McRae2015-07-14
| | | | Signed-off-by: Allan McRae <allan@archlinux.org>
* Simplify sync_cleandbAllan McRae2015-07-14
| | | | | | | | 1) Remove checks for removing pre-tardb files 2) Remove the long redundant keep_used parameter 3) Fix pacman error due to removing .sig file along with database Signed-off-by: Allan McRae <allan@archlinux.org>
* Do not warn about packages that optionally require a removal when ignoring depsAllan McRae2015-07-14
| | | | | | | If a transaction is removing a package while ignoring all dependencies, there should not be any warning about other packages optionally requiring it. Signed-off-by: Allan McRae <allan@archlinux.org>
* Do not warn about downgrades when only downloading packageAllan McRae2015-07-12
| | | | Signed-off-by: Allan McRae <allan@archlinux.org>
* Fix overflow warningsAndrew Gregory2015-07-12
| | | | | | | Fix new warnings generated by gcc-5 about potential overflows. Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
* Match providers when showing optdep install statusLukas Fleischer2015-06-20
| | | | | | | | | | Use alpm_find_satisfier() instead of alpm_db_get_pkg() when retrieving the install status of a package to make sure we spot providers as well. Fixes FS#36412 Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org> Signed-off-by: Allan McRae <allan@archlinux.org>
* repo-add: Reject armored signaturesJohannes Löthberg2015-06-20
| | | | | | | | Pacman cannot handle armored signatures, so make repo-add error out if one is detected. Signed-off-by: Johannes Löthberg <johannes@kyriasis.com> Signed-off-by: Allan McRae <allan@archlinux.org>
* makepkg: Add flag for printing SRCINFO to stdoutJohannes Löthberg2015-06-20
| | | | | | | | | | | | | | | This commit adds a makepkg option to generate and print the SRCINFO file for a PKGBUILD, required by the new AUR, to stdout. AUR 4.0 will use Git instead of source tarballs for uploading packages, so making makepkg capable of printing the SRCINFO would simplify package management, instead of having to extract it from a source tarball. It is also useful for scripting other things, so that instead of having to parse PKGBUILDs, one can make makepkg generate the SRCINFO and then you can parse that instead, which is much simpler and less error-prone. Signed-off-by: Allan McRae <allan@archlinux.org>
* repo-add: Generate unarmored DB signatureJohannes Löthberg2015-06-20
| | | | | | | Pacman cannot handle armored signatures, so use gpg's --no-armor flag to force an unarmored signature. Signed-off-by: Allan McRae <allan@archlinux.org>
* util.c: table_display: Fix incorrect docstringJohannes Löthberg2015-06-20
| | | | | | | | Commit 7b8f8753 removed the title parameter but forgot to remove it from the docstring. Signed-off-by: Johannes Löthberg <johannes@kyriasis.com> Signed-off-by: Allan McRae <allan@archlinux.org>
* makepkg-template.1: Clarify which file version-less markers useWieland Hoffmann2015-06-20
| | | | | | | | | The old text could be interpreted such that makepkg-template compares the version numbers of the templates to find the most recent one. Rephrase this to make it explicit that "$template_name.template" is used. Signed-off-by: Florian Pritz <bluewind@xinu.at>
* libmakepkg: extract functions for source download and extractionAllan McRae2015-05-19
| | | | Signed-off-by: Allan McRae <allan@archlinux.org>
* libmakepkg: extract functions for handling source URLsAllan McRae2015-05-19
| | | | Signed-off-by: Allan McRae <allan@archlinux.org>
* libmakepkg: fix test styleAllan McRae2015-05-19
| | | | Signed-off-by: Allan McRae <allan@archlinux.org>
* libmakepkg: move more functions for extracting information from PKGBIULDsAllan McRae2015-05-19
| | | | Signed-off-by: Allan McRae <allan@archlinux.org>
* libmakepkg: extract more utility functionsAllan McRae2015-05-19
| | | | Signed-off-by: Allan McRae <allan@archlinux.org>
* libmakepkg: extract get_full_version and get_pkg_archAllan McRae2015-05-16
| | | | | | | These functions group in with other functions that extract PKGBUILD information. Signed-off-by: Allan McRae <allan@archlinux.org>
* Simplify libmakepkg .gitignoreAllan McRae2015-05-16
|
* makepkg: put further restrictions on pkgbaseAllan McRae2015-05-16
| | | | | | pkgbase should be subject to the same restrictions as pkgname Signed-off-by: Allan McRae <allan@archlinux.org>