summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAge
* diskspace: canonicalize path to download dirDave Reisner2012-06-25
| | | | | | | With lazy loading in place, it's now quite obvious that we aren't necessarily checking the right mountpoint for necessary download space. Signed-off-by: Dave Reisner <dreisner@archlinux.org>
* libalpm/remove.c - add doxygenAndrew Gregory2012-05-21
| | | | | Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com> Signed-off-by: Dan McGee <dan@archlinux.org>
* paccache: allow running as rootDave Reisner2012-05-20
| | | | | | | | | The main motivation for this change is to allow this to be run as a cron job. Satisfies FS#29897 and some other undocumented requests for this. Signed-off-by: Dave Reisner <dreisner@archlinux.org>
* makepkg: rework libdependsAllan McRae2012-05-20
| | | | | | | | | | | | | | Rewrite the handling of libdepends. The primary advantage are: - Moves functionality from write_pkginfo() to find_libdepends(). - The order of the depends array in the PKGBUILD is kept in the package. - An unneeded libdepends is only a warning and not an error. This allows putting a libdepend on a library that is dlopened. - It is now modular so can be extended to library types other than ELF *.so. - Finding the list of libraries a package depends only occurs when a libdepend is specified in the depends array. Signed-off-by: Allan McRae <allan@archlinux.org>
* repo-add: add makedepends informationAllan McRae2012-05-20
| | | | | | | | | This is useful for tools that automatically rebuild packages and thus require to generate a build order. These entries are skipped by pacman. Signed-off-by: Allan McRae <allan@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
* makepkg: write makedepends into .PKGINFOAllan McRae2012-05-20
| | | | | | | | | | Currently there is no way to access the makedepends for a package apart from parsing its PKGBUILD. Put these into the .PKGINFO file with the idea of making them available in the repo dbs so that automated build tools can readily determine build order. Signed-off-by: Allan McRae <allan@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
* Define _FORTIFY_SOURCE in CPPFLAGSAllan McRae2012-05-20
| | | | | | | The -D_FORTIFY_SOURCE=2 define should be in CPPFLAGS and not CFLAGS Signed-off-by: Allan McRae <allan@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
* makepkg: Add CPPFLAGS supportAllan McRae2012-05-20
| | | | | | | | | Add CPPFLAGS support in addition to the current CFLAGS and CXXFLAGS. This keeps compiler flags split up in the same logical way done everywhere else. Signed-off-by: Allan McRae <allan@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
* updpkgsums: add new contrib scriptDave Reisner2012-05-20
| | | | | This updates checksums in a PKGBUILD in-place. If no sums are found, they are appended to the end.
* fix -Wshadow warnings as reported by gcc 4.4.3Dave Reisner2012-05-20
| | | | | | | | | Apparently gcc 4.7 has decided that -Wshadow warnings aren't worth reporting anymore even with the flag enabled. These were found on an Ubuntu 10.04 install. Signed-off-by: Dave Reisner <dreisner@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
* contrib/pacsysclean: use a standard vim modelineDave Reisner2012-05-20
| | | | | | | Fix indenting to something more familiar with the rest of the codebase. Signed-off-by: Dave Reisner <dreisner@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
* Merge branch 'maint'Dan McGee2012-05-20
|\ | | | | | | | | Conflicts: scripts/pacman-key.sh.in
| * pacman-key: test for content in keyring filesDave Reisner2012-05-20
| | | | | | | | | | | | | | | | | | | | | | | | Test for file content (-s) rather than just existance (-f). This fixes a bug that manifests itself in the case of an empty -revoked file. A zero element 'keys' array would be passed to gpg, forcing it to list and, subsequently, revoke all known keys. Bug introduced in d1240f67eab6. Signed-off-by: Dave Reisner <dreisner@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
| * contrib/pacsysclean: avoid setting bogus PACMAN_OPTSDave Reisner2012-05-20
| | | | | | | | | | | | | | | | PACMAN_OPTS would be erroneously set when it was undefined, causing pacsysclean to error out. Signed-off-by: Dave Reisner <dreisner@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
| * Fix gettext usage in pkgdelta help instructionsDan McGee2012-05-20
| | | | | | | | Signed-off-by: Dan McGee <dan@archlinux.org>
| * Update pacman-scripts message catalogDan McGee2012-05-20
| | | | | | | | Signed-off-by: Dan McGee <dan@archlinux.org>
| * docs: remove 'in the wild' sectionDan McGee2012-05-18
| | | | | | | | | | | | We haven't updated this info in years and it is out of date. Signed-off-by: Dan McGee <dan@archlinux.org>
| * pacman-key: clarify messages, s/keychain/keyring/Dan McGee2012-05-04
| | | | | | | | Signed-off-by: Dan McGee <dan@archlinux.org>
| * doc: remove --recursive documentation for non-remove operationsDan McGee2012-05-04
| | | | | | | | | | | | | | This documentation was added in commit 857357f9 so was not caught in the removal of this option in commit 85712814. Signed-off-by: Dan McGee <dan@archlinux.org>
| * Ensure pre_upgrade scriptlet gets old package versionDan McGee2012-05-04
| | | | | | | | | | | | | | | | This was accidentally broken in the refactor done in commit 73139ccb. Fixes FS#29371. Signed-off-by: Dan McGee <dan@archlinux.org>
* | pacman-key: use mapfile over readDave Reisner2012-05-20
| | | | | | | | Signed-off-by: Dave Reisner <dreisner@archlinux.org>
* | makepkg: use mapfile where plausibleDave Reisner2012-05-20
| | | | | | | | | | | | | | | | | | With bash4 as a requirement, we can use mapfile when reading command output into an array. mapfile has the advantage of using block buffered I/O rather than line buffered I/O, making it slightly faster for most jobs. Signed-off-by: Dave Reisner <dreisner@archlinux.org>
* | pacman: support group selection delimited by commasDave Reisner2012-05-20
| | | | | | | | | | | | | | | | | | We support multiple arguments being comma separated elsewhere, so this seems like a natural extension to support in our multiparse selection code. Signed-off-by: Dave Reisner <dreisner@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
* | pkgdelta: adopt parseopts for option parsingDave Reisner2012-05-20
| | | | | | | | | | Signed-off-by: Dave Reisner <dreisner@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
* | makepkg: fix package arch detectionAllan McRae2012-04-30
| | | | | | | | | | | | | | | | | | get_pkg_arch checked for the arch variable being overridden in the package_$1() function when used with a package as a parameter. However, when there was no override, it did not fall back to the global value. Signed-off-by: Allan McRae <allan@archlinux.org>
* | contrib: remove executable bit from input filesDave Reisner2012-04-30
| | | | | | | | | | | | | | | | There's no reason to make these executable, and this also mimics what we do in the scripts/ subdir. Signed-off-by: Dave Reisner <dreisner@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
* | zsh completion for makepkgDaniel Wallace2012-04-30
| | | | | | | | | | | | | | | | This adds zsh completion for makepkg to the _pacman file in /usr/share/zsh/site-functions/. it completes makepkg and allows for stacking of flags like -si, -sci, et cetera. Signed-off-by: Daniel Wallace <daniel.wallace@gatech.edu>
* | add zsh completion to pacman-keyDaniel Wallace2012-04-30
| | | | | | | | | | | | | | | | | | This patch adds zsh completion to pacman-key. It completes files/directories for --config or --gpgdir and just completes the command for --keyserver then it can complete keyids or files for all the other flags. Signed-off-by: Daniel Wallace <daniel.wallace@gatech.edu>
* | Convert ALLOC_FAIL macro into a functionDan McGee2012-04-29
| | | | | | | | | | | | | | | | | | | | | | | | | | This path is rarely (read: never) taken in any normal run of the code, so injecting the fprintf() call everywhere with the macro is a bit overkill. Instead, add a lightweight _alpm_alloc_fail() function that gets called instead. This does have a reasonable effect on the size of the generated code; most places using the macros provided by util.c have their code size reduced. Signed-off-by: Dan McGee <dan@archlinux.org>
* | be_local: use the right length value for filename in all casesDan McGee2012-04-29
| | | | | | | | | | | | | | Increment the strlen() provided value by 1 for the NULL byte so we use the right value in all three places we later reference it. Signed-off-by: Dan McGee <dan@archlinux.org>
* | pkgdelta/repo-add: quoting fixesFlorian Pritz2012-04-29
| | | | | | | | | | | | Finish the job on master; most of these were applied to maint already. Signed-off-by: Florian Pritz <bluewind@xinu.at>
* | Output "Packages" instead of "Targets"Allan McRae2012-04-29
| | | | | | | | | | | | | | | | | | | | Prefix the list of packages being installed/removed with "Packages" instead of "Targets" as they are package names by this stage. Fixes FS#23123. Signed-off-by: Allan McRae <allan@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
* | Merge remote-tracking branch 'dave/buildsys'Dan McGee2012-04-29
|\ \
| * | libalpm: add pkg-config fileDave Reisner2012-04-25
| | | | | | | | | | | | | | | | | | | | | | | | No one seems to do this "correctly", but for the sake of having an easy method of detecting the presence and version of libalpm on a given system, we provide a straightforward .pc file. Signed-off-by: Dave Reisner <dreisner@archlinux.org>
| * | rankmirrors: move to contrib/Dave Reisner2012-04-24
| | | | | | | | | | | | | | | | | | | | | | | | | | | This script is of questionable value, as it ranks mirrors by an uninteresting attribute: ping. While the script itself is interesting, people should be encouraged to rank mirrors by more useful measures, such as actual speed, locality, or up to date-ness. Signed-off-by: Dave Reisner <dreisner@archlinux.org>
| * | paccache: adopt parseopts for options parsingDave Reisner2012-04-24
| | | | | | | | | | | | | | | | | | | | | Add longopts and update usage. This removes the TODO item and incorporates --help/--version into the standard option set. Signed-off-by: Dave Reisner <dreisner@archlinux.org>
| * | configure: require bash >= 4.1 at compile timeDave Reisner2012-04-24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We've unofficially agreed to raise our minimum supported bash version to 4.1, and since added features that require it. Additionally, an earlier commit adds a syntax check to the builds of scripts/ and contrib/ which could conceivably fail with an earlier shell. Therefore, make this a hard requirement of the build process. Signed-off-by: Dave Reisner <dreisner@archlinux.org>
| * | validate bash scripts with 'bash -n' during build.Dave Reisner2012-04-24
| | | | | | | | | | | | | | | | | | | | | | | | | | | Use the no-exec mode of $(BASH_SHELL) to check for syntax errors in shell scripts. Since we use the extglob feature in various places, this requires that we pass -O extglob to the shell as well, to ensure that the parser is armed to handle this syntax. Signed-off-by: Dave Reisner <dreisner@archlinux.org>
| * | contrib: rename bash scripts: .in -> .sh.inDave Reisner2012-04-24
| | | | | | | | | | | | | | | | | | | | | For consistency with the scripts/ directory, ensure that all bash scripts use the same pre-build suffix. Signed-off-by: Dave Reisner <dreisner@archlinux.org>
| * | contrib: use a separate build rule for bash scriptsDave Reisner2012-04-24
| | | | | | | | | | | | | | | | | | | | | Treat bash scripts separately from the others to allow for a different build rule, which is reused from the scripts/ subdir. Signed-off-by: Dave Reisner <dreisner@archlinux.org>
* | | makepkg: remove subshelling from check_option and friendsDave Reisner2012-04-29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Instead of creating a subshell for each of these checks (of which there are many), pass in an expected value and make the check_* function do the comparison for us, returning 0 (match), 1, (mismatch), or 127 (not found). For a measureable benefit, I tested this on a fairly simple package, perl-term-readkey, and counted the number of clone(2) syscalls to try and isolate those generated by makepkg itself, rather than the user defined functions. Results as shown below: 336 before 180 after So, roughly a 50% reduction, which makes sense given that a single check_option() call could be up to 3 subprocesses in total. Signed-off-by: Dave Reisner <dreisner@archlinux.org>
* | | makepkg: null terminate filenames to stripDave Reisner2012-04-29
| | | | | | | | | | | | Signed-off-by: Dave Reisner <dreisner@archlinux.org>
* | | pacman/package.c: show checksums with -SiiDave Reisner2012-04-29
| | | | | | | | | | | | | | | | | | | | | | | | | | | These were removed entirely by f34864cc9e, but some people (myself included) still find them useful. Revive these details, but "demote" them, so that they're only displayed when extra sync data is requested. Signed-off-by: Dave Reisner <dreisner@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
* | | Move short-lived realpath buffers to the stackDan McGee2012-04-29
| | | | | | | | | | | | | | | | | | | | | | | | There is little reason here to grab 4K from the heap only to return it a few lines later. Instead, just use the stack to hold the returned value saving ourselves the malloc/free cycle. Signed-off-by: Dan McGee <dan@archlinux.org>
* | | Pointer coding style cleanupsDan McGee2012-04-24
| | | | | | | | | | | | | | | | | | 'foo_type_t *variable' rather than 'foo_type_t* variable'. Signed-off-by: Dan McGee <dan@archlinux.org>
* | | be_local: write all single-valued attributes firstDan McGee2012-04-24
| | | | | | | | | | | | | | | | | | | | | There isn't a whole lot of reason other than code clarity for this, but it makes it a bit more obvious where multivalued attributes start. Signed-off-by: Dan McGee <dan@archlinux.org>
* | | util/testdb: don't return crazy error valuesDan McGee2012-04-24
| | | | | | | | | | | | | | | | | | | | | | | | With some contrived examples, you could easily make testdb return a very high error count, which could easily overflow the 8-bit unsigned integer limit. Instead, simply return 1 or 0 based on whether errors were found. Signed-off-by: Dan McGee <dan@archlinux.org>
* | | Split check steps in Makefile into multiple targetsDan McGee2012-04-24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This allows a `make -j4 check` invocation to actually run in parallel, even though 95% of our test suite time is currently dominated by pactest. It also allows running something like `make test-vercmp`. Also, add some targets to the .PHONY list that belong in it. Signed-off-by: Dan McGee <dan@archlinux.org>
* | | makepkg: Be more consistent with missing program messageAllan McRae2012-04-24
| | | | | | | | | | | | | | | | | | Also prevent "sudo" and "su" from being translated. Signed-off-by: Allan McRae <allan@archlinux.org>
* | | makepkg: treat list of packages to be installed as an arrayAllan McRae2012-04-24
| | | | | | | | | | | | Signed-off-by: Allan McRae <allan@archlinux.org>