summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAge
* return resolved paths from filelist_intersectionAndrew Gregory2013-02-24
| | | | | | | | | | We were comparing files based on resolved paths but returning the original file_t structures, which were not necessarily in the same order. The additional file_t information was never used, so just return the resolved path. Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
* add fileconflict tests for cases with symlinksAndrew Gregory2013-02-24
| | | | | Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
* use alpm_list_free on filelist intersectionAndrew Gregory2013-02-24
| | | | | | | | alpm_filelist_intersection returns a list of pointers to internal file_t struct's, so only the list itself should be freed. Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
* pmtest: install filesystem entries before packagesAndrew Gregory2013-02-16
| | | | | | | | | | | | | | | | Installing filesystem entries first allows the filesystem to provide a symlink to a directory. Packages will then be able to use the symlink as if it were a directory instead of causing an error. For example: self.filesystem = ["dir/", "link -> dir/"] pkg = pmpkg("pkg1") pkg.files = ["link/file"] self.addpkg2db("local", pkg) Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
* fix off-by-one error in _alpm_filelist_resolveAndrew Gregory2013-02-16
| | | | | | | '/' should not be appended to the resolved root when root is "/". Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
* fix style violationsAndrew Gregory2013-02-16
| | | | | Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
* fix alpm_validation_t commentAndrew Gregory2013-02-16
| | | | | Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
* add alpm_logaction to API updatesAndrew Gregory2013-02-16
| | | | | Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
* find_fileconflicts: reduce path resolution callsAndrew Gregory2013-02-16
| | | | | Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
* makepkg: add support for .pkg.tar.lzoDave Reisner2013-02-16
| | | | | | | | Supported by libarchive as of version 3.1.0 when compiled against lzo2 or in the presence of the lzop binary. Signed-off-by: Dave Reisner <dreisner@archlinux.org> Signed-off-by: Allan McRae <allan@archlinux.org>
* makepkg.conf.5: fix bulletted list item formattingDave Reisner2013-02-16
| | | | | Signed-off-by: Dave Reisner <dreisner@archlinux.org> Signed-off-by: Allan McRae <allan@archlinux.org>
* libalpm: never attempt to remove a mountpointDave Reisner2013-02-16
| | | | | | | | | | | | | | | | | | | | | | | Arch Linux typically runs into this with /sys when upgrading the filesystem package in build chroots, but LXC users might also run into this, since their /sys is shared from the host and must, for security reasons, be mounted RO. I've neglected to add any tests for this because they would require root in order to run. Current tests all pass with this patch and I've confirmed the desired behavior in a VM. Incidentally, the first hunk of this patch (skipping can_remove_file checks for directories) resolves the case of API mountpoints being removed since they eventually fall into unlink_file and fail with "contains files". However, this patch should still be the Right Thing To Do™, as we can't possibly remove a directory that is also a mountpoint. Signed-off-by: Dave Reisner <dreisner@archlinux.org> [Allan] Do not skip checking if directories can be removed. Instead test if directories are mountpoints in can_remove_file. Signed-off-by: Allan McRae <allan@archlinux.org>
* Fix registering database with non-gpgme buildsAllan McRae2013-02-13
| | | | | | | | | | We record whether the default SigLevel is set in order to add upon it for the *FileSigLevel entries. When using the only valid value of "SigLevel = Never" with non-gpgme builds, we need to ignore the ALPM_SIG_PACKAGE_SET flag when determining if we have a valid value for the database SigLevel. Signed-off-by: Allan McRae <allan@archlinux.org>
* Fix --without-gpgme buildAllan McRae2013-02-13
| | | | Signed-off-by: Allan McRae <allan@archlinux.org>
* Fix gpgme detectionAllan McRae2013-02-13
| | | | | | | | | | | | The gpgme detection had a couple of issues which are fixed: 1) In some cases it would not error out when gpgme was missing and --with-gpgme was passed. 2) In some cases, the CFLAGS/LDFLAGS etc would not be properly restored. Signed-off-by: Allan McRae <allan@archlinux.org>
* Add format attributes to all required functionsAllan McRae2013-02-13
| | | | | | | | | Fixes all clang warnings with -Wformat-literal. Also, fix genuine formating issue discovered once adding these attributes and add a cast to prevent a gcc warning. Signed-off-by: Allan McRae <allan@archlinux.org>
* Fix --enable-warningflagsAllan McRae2013-02-13
| | | | | | | | gcc gives an error on an unknown warning flag, but clang just gives a warning. Upgrade the warning in clang to an error by activating -Werror=unknown-warning-option if available. Signed-off-by: Allan McRae <allan@archlinux.org>
* makepkg: fix -r and --needed conflictWilliam Giokas2013-02-13
| | | | | | | | | | | In makepkg, passing -sr --needed causes there to be a conflict when pacman goes to remove the dependencies, as the --needed flag is not an option for pacman -R. This patch makes --needed not get added to the PACMAN_OPTS array, but it acts like ASDEPS, and is only added to an install function. Signed-off-by: William Giokas <1007380@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
* Fix compilation error on clangAllan McRae2013-02-13
| | | | | | | | This also lead me to notice that in _alpm_gpgme_checksig many things were not being cleaned up. Fix this by having CHECK_ERR goto gpg_error and make the required adjustments. Signed-off-by: Allan McRae <allan@archlinux.org>
* makepkg: add lrzip compression supportAllan McRae2013-02-13
| | | | Signed-off-by: Allan McRae <allan@archlinux.org>
* Exit with failure status if download or installation is not confirmedMartin Panter2013-02-09
| | | | Signed-off-by: Allan McRae <allan@archlinux.org>
* pacman: print version information in debug outputAllan McRae2013-02-09
| | | | Signed-off-by: Allan McRae <allan@archlinux.org>
* Quieten the build process some moreAllan McRae2013-02-09
| | | | Signed-off-by: Allan McRae <allan@archlinux.org>
* Skip reading sync db deltas files if UseDelta is unsetAllan McRae2013-02-09
| | | | Signed-off-by: Allan McRae <allan@archlinux.org>
* Update NEWS for pacman-4.1Allan McRae2013-02-09
| | | | Signed-off-by: Allan McRae <allan@archlinux.org>
* README: update with 4.0 -> 4.1 API changesAllan McRae2013-02-09
| | | | Signed-off-by: Allan McRae <allan@archlinux.org>
* README: update alpm optionsAndrew Gregory2013-02-09
| | | | | Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
* Import key if needed when installing package from fileAllan McRae2013-02-09
| | | | | | | | When installing a package with "pacman -U" that has a detached signature, check if the needed key is in the keyring and download if necessary. Signed-off-by: Allan McRae <allan@archlinux.org>
* Prompt to delete packages with signature failsAllan McRae2013-02-09
| | | | | | | Offer to remove the bad package when a signature fails to validate as is done for checksum failures. Signed-off-by: Allan McRae <allan@archlinux.org>
* Remove retry path from signature validationAllan McRae2013-02-09
| | | | | | | | Now that the keyring is checked for all needed keys before the validation, we can not reach a point of a missing key when doing validity checks for sync operations. Signed-off-by: Allan McRae <allan@archlinux.org>
* Check keys are in keyring before package validationAllan McRae2013-02-09
| | | | | | | | | | | | Keys used to create signatures are checked for presence in the keyring before package validation is performed. Signed-off-by: Allan McRae <allan@archlinux.org> Conflicts: lib/libalpm/alpm.h Signed-off-by: Allan McRae <allan@archlinux.org>
* Make decode_signature available to the libraryAllan McRae2013-02-09
| | | | Signed-off-by: Allan McRae <allan@archlinux.org>
* Add function to extract key id from signaturesAllan McRae2013-02-09
| | | | | | | This does not support all possibilities of RFC4880, but it does cover every key currently used in Arch Linux. Signed-off-by: Allan McRae <allan@archlinux.org>
* Move key importing into separate functionAllan McRae2013-02-09
| | | | | | | | This will be useful for checking the availablity of all keys before perfoming validation in sync operations and for downloading a needed key in upgrade operations. Signed-off-by: Allan McRae <allan@archlinux.org>
* Make key_in_keychain available in libraryAllan McRae2013-02-09
| | | | | | | In preparation for checking key presence and downloading needed keys before conflict checking. Signed-off-by: Allan McRae <allan@archlinux.org>
* Additions to .mailmapAllan McRae2013-02-07
| | | | | | | Standardize on the most common name for email addresses with multiple name variants. Signed-off-by: Allan McRae <allan@archlinux.org>
* Document fakeroot and fakechroot as dependenciesChirantan Ekbote2013-02-07
| | | | Signed-off-by: Allan McRae <allan@archlinux.org>
* Remove outdated instructions in pactest READMEAllan McRae2013-02-07
| | | | Signed-off-by: Allan McRae <allan@archlinux.org>
* Remove conditional checks for fakechroot from test filesChirantan Ekbote2013-02-07
| | | | | | | | We don't want test files to do any checks for fakechroot since we will print a warning if it is not found. Signed-off-by: Chirantan Ekbote <chirantan.ekbote@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
* Print a warning if fakechroot is not foundChirantan Ekbote2013-02-07
| | | | | | | Fixes FS#33551. Signed-off-by: Chirantan Ekbote <chirantan.ekbote@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
* use strtok_r to parse multi-value config optionsAndrew Gregory2013-02-07
| | | | | | | | This prevents multiple spaces between values from being parsed as empty values. Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
* document that stdin must not be a tty to read from itAndrew Gregory2013-02-07
| | | | | Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
* Better error message with "-" is specified without stdinAllan McRae2013-02-07
| | | | Signed-off-by: Allan McRae <allan@archlinux.org>
* doc: update PKGBUILD man pageAllan McRae2013-02-07
| | | | | | | | | Rearrange the functions section of the PKGBUILD man package. Clarify that the package() function is a requirement and the rest are all optional. Note that $pkgdir should only be used in the package() function. Signed-off-by: Allan McRae <allan@archlinux.org>
* makepkg: make $pkgdir non-accessible during build()Allan McRae2013-02-07
| | | | | | | | | | | | | | | The idea of having separate build() and package() functions is that build() is run as a normal uses and package() as (fake)root. Any files placed in $pkgdir during build() can have the wrong permissions. Restrict access to $pkgdir during build() - unless there is no package() function. Also, set $pkgdir to something "useful" during build(). For split packages, this uses "<path>/pkg/$pkgbase" because it is not obvious which $pkgdir is being referred to. Signed-off-by: Allan McRae <allan@archlinux.org>
* make test/scripts/human_to_size.sh executableAndrew Gregory2013-02-07
| | | | | Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
* add missing utilities to contrib/READMEAndrew Gregory2013-02-07
| | | | | Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
* unset executable bit on updpkgsums.sh.inAndrew Gregory2013-02-07
| | | | | | | No other contrib script is executable. Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
* inline libarchive compat wrappersDave Reisner2013-02-07
| | | | | | Suggested-by: Dan McGee <dan@archlinux.org> Signed-off-by: Dave Reisner <dreisner@archlinux.org> Signed-off-by: Allan McRae <allan@archlinux.org>
* Document LocalFileSigLevel and RemoteFileSigLevelAllan McRae2013-02-07
| | | | Signed-off-by: Allan McRae <allan@archlinux.org>