summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAge
...
* dload: allow curl to response to any auth challengeDave Reisner2013-12-19
| | | | | | | | | | | Previously, we only allowed the default of responding to basic auth challenges. Mirrors requiring authorization are far and away the edge case, but there's no sense in preventing access to them. Implements FS#38184. Signed-off-by: Dave Reisner <dreisner@archlinux.org> Signed-off-by: Allan McRae <allan@archlinux.org>
* alpm: Rename a variable for future clarityOlivier Brunel2013-12-15
| | | | | | | We will be adding event structs in the following patches. Signed-off-by: Olivier Brunel <jjk@jjacky.com> Signed-off-by: Allan McRae <allan@archlinux.org>
* Fix pactest READMEAllan McRae2013-12-15
| | | | | | The --test option no longer exists. Signed-off-by: Allan McRae <allan@archlinux.org>
* remove useless continueAndrew Gregory2013-12-15
| | | | | Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
* db.c: require unique database namesAndrew Gregory2013-12-15
| | | | | | | | | Allowing multiple databases with the same name causes conflicts as they both point to the same database file but may use different servers, usages, or siglevels. Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
* makepkg: fix consistency of downloaded sources permissionsSébastien Luttringer2013-12-15
| | | | | | | | | | Running 'makepkg -g' or 'makepkg' to download source files results in different permissions on the files if the user has a non-default umask. Put the umask definition at the "beginning" of the makepkg script to ensure all files generated by makepkg have a 0022 umask. Signed-off-by: Allan McRae <allan@archlinux.org>
* alpm_sync_sysupgrade: skip packages being removedAndrew Gregory2013-12-15
| | | | | Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
* Color output from pm_vasprintfAllan McRae2013-12-15
| | | | | | | This makes sure warning and error messages from _alpm_log are colored. Fixes FS#35160. Signed-off-by: Allan McRae <allan@archlinux.org>
* Fix misspellings and some grammar issues in output of some pacman contrib ↵Jason St. John2013-12-15
| | | | | | | | | | | | | scripts Affected files: -- contrib/bacman.sh.in -- contrib/paccache.sh.in -- contrib/pacdiff.sh.in -- contrib/rankmirrors.sh.in Signed-off-by: Jason St. John <jstjohn@purdue.edu> Signed-off-by: Allan McRae <allan@archlinux.org>
* pacdiff: do not remove pacfile after viewingVasiliy Korchagin2013-12-15
| | | | | | | Automatically removing the file after viewing is not good if on viewing you decide to deal with it later. Signed-off-by: Allan McRae <allan@archlinux.org>
* pacscripts: Improve error message when sudo binary is not foundJason St. John2013-12-15
| | | | | Signed-off-by: Jason St. John <jstjohn@purdue.edu> Signed-off-by: Allan McRae <allan@archlinux.org>
* Close file descirptor before forkWolfgang Bumiller2013-12-15
| | | | | | | | | | | | | FreeBSD chroot(2) fails with EPERM when a directory file descriptor is open with either `kern.chroot_allow_open_directories` being 0, or when the process already is inside a chroot. This is exposed in alpm_run_chroot that uses opendir() to open a file descriptor to the current directory before doing the forking and chrooting. Since the file descriptor is not used in the forked process, we close it. Fixes FS#36161. Signed-off-by: Allan McRae <allan@archlinux.org>
* .gitignore: Add intl directory.Allan McRae2013-12-15
| | | | Signed-off-by: Allan McRae <allan@archlinux.org>
* paccache: clarify help outputAllan McRae2013-12-15
| | | | | | | The help output referred to variables in the script rather than what they were labelled in the parameter argument. Signed-off-by: Allan McRae <allan@archlinux.org>
* Improve --help switch output for pacman contrib and pacman scriptsJason St. John2013-11-15
| | | | | | | | | | | | | | | | | | | Unify the formatting of the --help switch for pacman utils, if it exists. All of the pacman utils will now output help text using the following format: util-name (pacman) v<pacman version> one line description of util's purpose Usage: util-name [options] -b, --bar whatever --bar does -f, --foo whatever --foo does -h, --help display this help message Reported-by: Karol Błażewicz <karol.blazewicz at gmail.com> Signed-off-by: Jason St. John <jstjohn@purdue.edu>
* Replace "echo" command with "printf" in human_to_size_test.shJason St. John2013-11-15
| | | | | Signed-off-by: Jason St. John <jstjohn@purdue.edu> Signed-off-by: Allan McRae <allan@archlinux.org>
* Fix typo in pacman-optimizeJason St. John2013-11-15
| | | | | Signed-off-by: Jason St. John <jstjohn@purdue.edu> Signed-off-by: Allan McRae <allan@archlinux.org>
* Fix whitespace and other formatting issuesJason St. John2013-11-15
| | | | | | | | | This commit: -- replaces space-based indents with tabs per the coding standards -- removes extraneous whitespace (e.g. extra spaces between function args) -- adds missing braces for a one-line if statement Signed-off-by: Jason St. John <jstjohn@purdue.edu>
* Fix minor grammatical issues in doc/index.txtJason St. John2013-11-15
| | | | | Signed-off-by: Jason St. John <jstjohn@purdue.edu> Signed-off-by: Allan McRae <allan@archlinux.org>
* log important events from the backendAndrew Gregory2013-11-15
| | | | | | | | | | | | | This ensures that important events will be logged and consistent regardless of the frontend. The need for global context in the event callback is also removed. The event is logged before any post_* scripts run, so this also moves the post_* script output underneath the event in the log. Fixes FS#36504 Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
* Makefile.am: fix typo in LOG_DRIVER variableAndrew Gregory2013-11-15
| | | | | | | | | | | | Self-executing tests were not being run through the tap log driver. This caused `make check` to ignore discrepancies between the expected number of tests and the actual number of tests. Also, fix some uncommented output from test scripts that could confuse TAP parsers. Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
* Ignore makedepend and checkdepend entries when parsing .PKGINFO fileAllan McRae2013-11-15
| | | | Signed-off-by: Allan McRae <allan@archlinux.org>
* makepkg: move update_pkgver out of extract_sourcesAllan McRae2013-11-15
| | | | | | The extract_sources function should be just extracting sources. Signed-off-by: Allan McRae <allan@archlinux.org>
* Return zero from extract_file with local source fileAllan McRae2013-11-15
| | | | | | | | The call to bsdtar to check if a file needs extracted returns 1 if it does not. We then propegate this return value accidentally which can cause makepkg to report an error later on. Explicitly return 0 in this case. Signed-off-by: Allan McRae <allan@archlinux.org>
* alpm_handle: store lock file descriptorAndrew Gregory2013-11-08
| | | | | | | | | | | | | | There was a brief window between opening the file descriptor and creating a stream to it. If the process was interrupted during that window the lock file would not be removed correctly. The pid is no longer printed to the lock file as this was virtually meaningless for lock files on NFS. Fixes FS#35603 Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
* support ALPM_SIG_USE_DEFAULT for file siglevelsAndrew Gregory2013-11-08
| | | | | | | This brings file siglevels in line with how db siglevels are handled. Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
* Remove spaces between the opening "if" and the opening parenthesisJason St. John2013-11-08
| | | | | Signed-off-by: Jason St. John <jstjohn@purdue.edu> Signed-off-by: Allan McRae <allan@archlinux.org>
* Use title case for a heading in HACKING; fix capitalization of "Vim" in HACKINGJason St. John2013-11-08
| | | | | Signed-off-by: Jason St. John <jstjohn@purdue.edu> Signed-off-by: Allan McRae <allan@archlinux.org>
* version: fix formatting in file to RPM upstreamDave Reisner2013-11-08
| | | | | | | This reverts a portion of 86eefc1a3a341. Signed-off-by: Dave Reisner <dreisner@archlinux.org> Signed-off-by: Allan McRae <allan@archlinux.org>
* makepkg: only remove static libraries if they have a shared versionAllan McRae2013-11-08
| | | | | | | It is fairly common that packages contain static libraries with no shared counterpart. These should not be removed with !staticlibs. Signed-off-by: Allan McRae <allan@archlinux.org>
* makepkg: Allow "static library" to be translatedAllan McRae2013-11-01
| | | | Signed-off-by: Allan McRae <allan@archlinux.org>
* upgrade.c: use iterator variableAndrew Gregory2013-10-31
| | | | | | | | remote was being used to loop over itself, making the FREELIST ineffective. Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
* deps.c: pass alpm_list** to _alpm_recursedepsAndrew Gregory2013-10-31
| | | | | | | | Improves consistency and makes it clear that targs will be modified by _alpm_recursedeps. Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
* check for -1 return value from getopt_longAndrew Gregory2013-10-31
| | | | | | | | | getopt_long returns -1 when it has finished parsing all args. A return value of 0 indicates that a flag was set directly by getopt_long and parsing should continue. Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
* callback.c: check for negative xfered sizeAndrew Gregory2013-10-31
| | | | | Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
* makepkg: do not allow badly formatted arch linesAllan McRae2013-10-31
| | | | | | | | It appears there are a lot of packages with arch=('i686 x86_64') floating around. Quote the arch array when passing as a parameter to detect such things. Signed-off-by: Allan McRae <allan@archlinux.org>
* pacman -Si/-Qi: Autodetect best fitting file size unitFlorian Pritz2013-10-31
| | | | | | | | | | | | | I've tracked this back to e223366 and it looks like this just forces KiB because back then humanize_size didn't exist, but the size was just divided by 1024 to keep it somewhat readable. When humanize_size got introduced in 3c8a448 this was just carried over. The unit detected for "Download Size" is reused for "Installed Size" to make it easier to read. Signed-off-by: Florian Pritz <bluewind@xinu.at> Signed-off-by: Allan McRae <allan@archlinux.org>
* Use getuid instead of geteuidVladimir A. Nazarenko2013-10-31
| | | | | | | | | | | If someone gives the pacman binary setuid permissions, the geteuid check allows it to start running but subsequently fail. As we do not support setting pacman setuid, use getuid to check permissions instead. FS#37174. Signed-off-by: Vladimir A. Nazarenko <naszar@ya.ru> Signed-off-by: Allan McRae <allan@archlinux.org>
* libalpm/db.c: default to ALPM_DB_USAGE_ALLAndrew Gregory2013-10-31
| | | | | | | | This allows existing front-ends other than pacman to continue working normally. Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
* makepkg: allow empty source arraysAndrew Gregory2013-10-31
| | | | | | | Necessary for metapackages. Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
* sortbydeps: include local pkgs in dep graphAndrew Gregory2013-10-31
| | | | | | | | | | | | | | | | Detecting indirect dependencies by traversing a package's entire dependency tree is prohibitively slow for larger transactions. Instead add local packages to the dependency graph. This additionally requires delaying dependency ordering for sync operations so that removed packages may be excluded from dependency detection. tests/sync012.py was also updated to ensure that the dependency cycle was actually detected. Fixes FS#37380 Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
* Indicate ignored packages in -Qu outputAllan McRae2013-10-31
| | | | | | | Add "[ignored]" in the "pacman -Qu" output after packages that have their upgrades ignored. Signed-off-by: Allan McRae <allan@archlinux.org>
* Expose alpm_pkg_should_ignoreAllan McRae2013-10-31
| | | | | | | This function is useful for frontends to annotate package upgrades that will be ignored. Signed-off-by: Allan McRae <allan@archlinux.org>
* repo-add.8: Provide example usageAllan McRae2013-10-31
| | | | | | | Detail the current standard of generating two databases - with and without the file list. Signed-off-by: Allan McRae <allan@archlinux.org>
* makepkg.8: Document remaining environmental variablesAllan McRae2013-10-31
| | | | Signed-off-by: Allan McRae <allan@archlinux.org>
* makepkg.8: document environmental variables that affect gpg signingAllan McRae2013-10-31
| | | | Signed-off-by: Allan McRae <allan@archlinux.org>
* Fix detection of joint --native and --foreign usageAllan McRae2013-10-31
| | | | Signed-off-by: Allan McRae <allan@archlinux.org>
* List signiture keyids in -Sii outputAllan McRae2013-10-31
| | | | Signed-off-by: Allan McRae <allan@archlinux.org>
* Make functions to decode a signature and extract keyid publicAllan McRae2013-10-31
| | | | | | These are useful for frontends. Signed-off-by: Allan McRae <allan@archlinux.org>
* makepkg: validate updated pkgver before replacementDave Reisner2013-10-15
| | | | | | | | | | | | | | | | Validate the new pkgver efore blindly ramming it into the PKGBUILD. This gives us good feedback and prevents corrupting the PKGBUILD, e.g. ==> Starting pkgver()... ==> ERROR: pkgver is not allowed to contain colons, hyphens or whitespace. ==> ERROR: pkgver() generated an invalid version: a horse is not a pkgver As an additional failsafe, exchange a valid for invalid character as command separator in @SEDINPLACE@ expressions. For even more paranoia, exit if sed fails for any reason. Signed-off-by: Dave Reisner <dreisner@archlinux.org> Signed-off-by: Allan McRae <allan@archlinux.org>