summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAge
* Update copyright year for 2013Allan McRae2013-01-03
| | | | Signed-off-by: Allan McRae <allan@archlinux.org>
* Remove leading "./" from filenames in mtree fileAllan McRae2012-12-14
| | | | | | | A properly formatted mtree file may stick a leading "./" in front of file names in the root directory. Strip this if present. Signed-off-by: Allan McRae <allan@archlinux.org>
* Check file types match before comparing propertiesAllan McRae2012-12-14
| | | | | | | Bail early in file validation checks if the file type given in the mtree file does not match that in the filesystem. Signed-off-by: Allan McRae <allan@archlinux.org>
* Check "install" and "changelog" files for changesAllan McRae2012-12-14
| | | | | | | The "install" and "changelog" entries for a package in the local database are now checked for changes with -Qkk. Signed-off-by: Allan McRae <allan@archlinux.org>
* Perform full checking of files with -QkkAllan McRae2012-12-14
| | | | | | | | | | | | The follow fields are checked: Directory: uid, gid, mode File: uid, gid, mode, size, time Symbolic Link: uid, gid, mode, link, time A skeleton is added for checking a files md5sum and sha256sum when reading this information is supported by libarchive. Signed-off-by: Allan McRae <allan@archlinux.org>
* Basic running of pacman -Qkk to check mtree filesAllan McRae2012-12-14
| | | | | | | | | If a package has an mtree file, using pacman -Qkk will read that file and use it to perform more in depth package checking. Currently this only checks for file presence. Signed-off-by: Allan McRae <allan@archlinux.org>
* Separate checking a files existence into a functionAllan McRae2012-12-14
| | | | Signed-off-by: Allan McRae <allan@archlinux.org>
* Move check function into its own fileAllan McRae2012-12-14
| | | | | | | | | There is going to be a lot of overlap in the code for the quick and full checks that can be abstracted into their own functions. Also many other file checking functions will be needed for the full check. Put all these in a separate source file. Signed-off-by: Allan McRae <allan@archlinux.org>
* Add public functions for accessing mtree dataAllan McRae2012-12-14
| | | | Signed-off-by: Allan McRae <allan@archlinux.org>
* Add internal functions for reading mtree file from local dbAllan McRae2012-12-14
| | | | Signed-off-by: Allan McRae <allan@archlinux.org>
* Extract .MTREE file into local package databaseAllan McRae2012-12-14
| | | | Signed-off-by: Allan McRae <allan@archlinux.org>
* makepkg: add mtree file into packageAllan McRae2012-12-14
| | | | | | | | Add an mtree file to the package with all file information. This can be added to the local pacman database on install allowing full package verification. Signed-off-by: Allan McRae <allan@archlinux.org>
* Do not warn about missing database if being downloadedAllan McRae2012-12-14
| | | | | | | | | When a configured repo database is not already downloaded, a warning message such as "warning: database file for 'testing' does not exist" is printed. Disable this warning when the database is scheduled to be downloaded in the transaction. Signed-off-by: Allan McRae <allan@archlinux.org>
* Fix future signature timestamp warningAllan McRae2012-12-14
| | | | | | | | | | | | The warning given for a signature timstamp being in the future compared to the system time stated the opposite. Also, move this warning to debug output. It is useless in its current form as the package or database that is giving the error is not mentioned and so other debug output is needed to find the offending signature. Signed-off-by: Allan McRae <allan@archlinux.org>
* Replace space-based indents in prototypes with tabsJason St. John2012-12-14
| | | | | | | | | | | The previous commit removed the Vim modelines which replaced tabs with spaces. This commit replaces the space-based indents with tabs. Tabs are generally more compatible with various user preferences regarding indentation of code. Using space-based indents is not flexible regarding user preferences at all. Signed-off-by: Jason St. John <jstjohn@purdue.edu>
* Remove Vim modelines in prototype filesJason St. John2012-12-14
| | | | | | | | | | It makes little sense to "force" users to replace tabs with spaces, with a width of 2. These settings should be configured by the user in their own ~/.vimrc. This is a resubmission based on Allan's feedback on the ML. Signed-off-by: Jason St. John <jstjohn@purdue.edu>
* Print package name before changelog entry with -QcSimon Gomizelj2012-12-14
| | | | | | | Fixes FS#32362 Signed-off-by: Simon Gomizelj <simongmzlj@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
* query.c: simplify is_foreignAndrew Gregory2012-12-14
| | | | | Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
* Added LOGDEST variableWilliam Giokas2012-12-14
| | | | | | | | | | Places logs in a pre-defined location. The logs are always neatly labeled with package names and numbers, and this way can be more easily sent to network shares as they are written or compressed/cleaned en masse. Signed-off-by: William Giokas <1007380@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
* Plug various minor memory leaksAndrew Gregory2012-12-14
| | | | | Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
* makepkg: normalize whitespace in $pkgdesc when writing .PKGINFODave Reisner2012-12-14
| | | | | | | | | | | | Specifically, we shouldn't allow newlines in the pkgdesc field, as pacman will ignore the continuation and end the description prematurely as written to the local DB. Normalize ALL whitespace, replacing it with single whitespace characters. Fixes strange errors as seen by FS#32852. Signed-off-by: Dave Reisner <dreisner@archlinux.org> Signed-off-by: Allan McRae <allan@archlinux.org>
* pkgdelta: avoid use of eval and IFS manipulationDave Reisner2012-12-14
| | | | | | | | | | | Instead of blindly consuming data from the .PKGINFO file, parse it more closely and only declare variables as needed. Should help to avoid nonsensical errors and possibly dangerous command execution as seen in FS#32852. Signed-off-by: Dave Reisner <dreisner@archlinux.org> Signed-off-by: Allan McRae <allan@archlinux.org>
* Display install status of optdependenciesAllan McRae2012-12-14
| | | | | | | | | When a packages (new) optdepends are printed in install (update), add a note of their current installation status. Packages currently installed are labelled with [installed] and packages to be installed in this transaction are labelled [pending]. Signed-off-by: Allan McRae <allan@archlinux.org>
* Make alpm_pkg_find publicAllan McRae2012-12-14
| | | | | | This function is particularly useful, so make it public. Signed-off-by: Allan McRae <allan@archlinux.org>
* Add pactest for "Optional for" outputBenedikt Morbach2012-12-14
| | | | Signed-off-by: Allan McRae <allan@archlinux.org>
* Add "Optional for" to package information outputAllan McRae2012-12-14
| | | | | | | | | Much like packages that require a give package are displayed in the "Required by" field of its information output, alos display packages that optionally require the package. Inspired-by: Benedikt Morbach <benedikt.morbach@googlemail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
* Add pactests for displaying optdep installation statusBenedikt Morbach2012-12-14
| | | | Signed-off-by: Allan McRae <allan@archlinux.org>
* Display optdep install status in package query outputAllan McRae2012-12-14
| | | | | | | Indicate which optional dependencies are installed when viewing local package information (-Qi). Signed-off-by: Allan McRae <allan@archlinux.org>
* Notify of removed package required as optdependAllan McRae2012-12-14
| | | | | | | When a package is being removed, provide a notification (via a callback) if any local package requires it as an optdepend. Signed-off-by: Allan McRae <allan@archlinux.org>
* It turns out we do care about directories...Allan McRae2012-12-14
| | | | | | | | | | This is a bug that has been around since at least 2007. On a package upgrade (either by -S or -U) a new directory could overwrite any file. This is caused by the filelist difference calculation ignoring all directories and thus no new directories were checked for conflicting files on the filesystem. Signed-off-by: Allan McRae <allan@archlinux.org>
* Add pactests for not detecting directory conflicts with upgradesFlorian Pritz2012-12-14
| | | | Signed-off-by: Allan McRae <allan@archlinux.org>
* Fix overzealous package removal with unmet dependenciesAndrew Gregory2012-12-14
| | | | | | | Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com> [Allan: Remove expected failure from fixed pactests] Signed-off-by: Allan McRae <allan@archlinux.org>
* pactest: variant of package removal due to unmet dependenciesAllan McRae2012-12-14
| | | | | | | Duplicate of sync140.py but with the alphabetical ordering of the packages changed. Signed-off-by: Allan McRae <allan@archlinux.org>
* pactest: removal of packages with unmet dependenciesAllan McRae2012-12-14
| | | | | | | | Provide a package for removing packages with unmet dependencies. Currently pacman removes too many packages from the transaction (FS#30649). Signed-off-by: Allan McRae <allan@archlinux.org>
* _alpm_filelist_resolve: add useful return codeAndrew Gregory2012-12-14
| | | | | | | Return -1 if a path is too long to resolve or we run out of memory. Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
* Avoid upgrade conflict with unchanged effective pathAllan McRae2012-12-14
| | | | | | | | | | | | This applies to a case such as when /lib is a symlink to /usr/lib. If a package is installed which contains /lib/libfoo.so, pacman will complain if this package is then "fixed" to contain /usr/lib/libfoo.so. Since these have the same effective path and it exists within the same package, ignore the conflict. Fixes FS#30681. Signed-off-by: Allan McRae <allan@archlinux.org>
* Resolve file paths during inter-package conflict checkAllan McRae2012-12-14
| | | | | | | | File paths are resolved if necessary during inter-package conflict checks so that packages carrying the same effective file due to directory symlinks on the filesystem are flagged as conflicting. Signed-off-by: Allan McRae <allan@archlinux.org>
* _alpm_filelist_resolve: use original filenames where possibleAndrew Gregory2012-12-14
| | | | | | | | If a filename isn't resolved, the original can be used instead of strdup()ing it. Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
* Add _alpm_filelist_resolveAndrew Gregory2012-12-14
| | | | | | | | The _alpm_filelist_resolve function takes a filelist and creates a list with any symlinks in directory paths resolved. Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
* Add resolved_path to alpm_filelist_tAllan McRae2012-12-14
| | | | | | | | Add an array to hold the resolved paths of the files in alpm_filelist_t. When the file name and its resolved file name are identical, the pointer to the original file name is used to avoid duplicate memory allocation. Signed-off-by: Allan McRae <allan@archlinux.org>
* Detect inter-package conflicts between files and directoriesAllan McRae2012-12-14
| | | | | | | | | | | | Detect a conflict between a file/symlink in one package and a directory in another when both are being installed at once. A side effect is the creation of conflicts between a directory symlink and a real directory (e.g lib -> usr/lib in pkg1 and /lib in pkg2). Given we can not guarantee pkg1 is installed before pkg2, this is a genuine conflict. Signed-off-by: Allan McRae <allan@archlinux.org>
* pactest: Provide a full filelist to the pactests that need itAllan McRae2012-12-14
| | | | | | | | | | It turns out when you set the filelist for a package to include "usr/lib/foo" in the pactest suite, it thinks there is only the file "usr/lib/foo" in there... No "usr/" or "usr/lib/" directory. This makes life difficult when testing code that scrolls through a filelist looking for directory entries. Signed-off-by: Allan McRae <allan@archlinux.org>
* makepkg: install debug symbol packages if requestedAllan McRae2012-11-27
| | | | | | | When using "makepkg -i", install the debugging symbol packages too if present. Signed-off-by: Allan McRae <allan@archlinux.org>
* makepkg: assign debugging symbol directory to a variableAllan McRae2012-11-27
| | | | | | Simplifies the stripping of files a lot. Signed-off-by: Allan McRae <allan@archlinux.org>
* makepkg: allow debug package suffix to be configurableAllan McRae2012-11-27
| | | | Signed-off-by: Allan McRae <allan@archlinux.org>
* makepkg: create package from stripped debug symbolsAllan McRae2012-11-27
| | | | Signed-off-by: Allan McRae <allan@archlinux.org>
* makepkg: output the name of the package being createdAllan McRae2012-11-27
| | | | | | | | | | Although it should be currently quite obvious what package is being created when "Creating package..." is printed, it will not be in the future when a debug package is potentially created too. Also, given $pkgname is always correctly set when split packaging now, we no longer need to pass that around. Signed-off-by: Allan McRae <allan@archlinux.org>
* makepkg: strip debugging symbols into separate folderAllan McRae2012-11-27
| | | | | | | | | | | When using the "debug" option in combination with "strip", move the debugging symbols into a separate directory ($pkgdir-debug/usr/lib/debug) suitable for creating a package from. Create hardlinks between debugging symbols of hardlinked files and add symlinks in the .build_id directory if the binary has a build ID. Signed-off-by: Allan McRae <allan@archlinux.org>
* makepkg: always use pkg/$pkgname as $pkgdirAllan McRae2012-11-27
| | | | | | | | Unify split and single packages to always use a folder within pkg/ as thier $pkgdir. This will allow a folder for storing a package with stripped debug symbols to be added within pkg/ too. Signed-off-by: Allan McRae <allan@archlinux.org>
* makepkg: move debug symbol stripping to separate functionAllan McRae2012-11-27
| | | | | | | Move stripping of files to a spearate function that will be expanded for the handling of creating debug symbol packages. Signed-off-by: Allan McRae <allan@archlinux.org>