summaryrefslogtreecommitdiff
path: root/src/pacman/check.c
AgeCommit message (Collapse)Author
2018-05-14Remove all modelines from the projectEli Schwartz
Many of these are pointless (e.g. there is no need to explicitly turn on spellchecking and language dictionaries for the manpages by default). The only useful modelines are the ones enforcing the project coding standards for indentation style (and "maybe" filetype/syntax, but everything except the asciidoc manpages and makepkg.conf is already autodetected), and indent style can be applied more easily with .editorconfig Signed-off-by: Eli Schwartz <eschwartz@archlinux.org> Signed-off-by: Allan McRae <allan@archlinux.org>
2018-03-14Update coyrights for 2018Allan McRae
make update-copyright OLD=2017 NEW=201 Signed-off-by: Allan McRae <allan@archlinux.org>
2017-01-04Update copyright yearsAllan McRae
Signed-off-by: Allan McRae <allan@archlinux.org>
2016-08-30Remove obsolete TODOAllan McRae
Signed-off-by: Allan McRae <allan@archlinux.org>
2016-03-28Do not add root prefix twice when checking database filesAllan McRae
When checking .INSTALL and .CHANGELOG files in the mtree file, we need to find the path they are stored in the local database. This was appending the root prefix twice as alpm_option_get_dbpath already returns the absolute path to the database. While fixing that issue I added checks that the paths for the database files were not longer than PATH_MAX. Fixes FS#48563. Signed-off-by: Allan McRae <allan@archlinux.org>
2016-01-04Update copyright years for 2016Allan McRae
make update-copyright OLD=2015 NEW=2016 Signed-off-by: Allan McRae <allan@archlinux.org>
2015-02-01Update copyright notices for 2015Allan McRae
Signed-off-by: Allan McRae <allan@archlinux.org>
2014-11-18Do not warn about missing files in NoExtractAllan McRae
When checking a packages files, ignore any missing files in NoExtract Signed-off-by: Allan McRae <allan@archlinux.org>
2014-08-03check_pkg_fast: check file typeAndrew Gregory
Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com>
2014-08-03check_file_exists: replace lstat with llstatAndrew Gregory
Paths are constructed directly from package file lists and may contain trailing slashes, causing lstat to dereference symlinks. Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com>
2014-01-28Remove ts and sw from vim modeline when noet is setFlorian Pritz
Forcing vim users to view files with a tabstop of 2 seems really unnecessary when noet is set. I find it much easier to read code with ts=4 and I dislike having to override the modeline by hand. Command run: find . -type f -exec sed -i '/vim.* noet/s# ts=2 sw=2##' {} + Signed-off-by: Florian Pritz <bluewind@xinu.at> Signed-off-by: Allan McRae <allan@archlinux.org>
2014-01-06Update copyright years for 2014Allan McRae
Signed-off-by: Allan McRae <allan@archlinux.org>
2013-08-21check.c: break backup file search loop after matchAndrew Gregory
Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
2013-07-30Warn when directory ownership differs between filesystem and packageAllan McRae
We currently only warn if a directory's permissions differ, but using -Qkk on my system shows that directory permissions tend to change in packages reasonably frequently without notice. Provide a warning in such cases so that it can be altered. Example output: (1/1) reinstalling nginx warning: directory ownership differs on /var/lib/nginx/proxy/ filesystem: 33:0 package: 0:0 Signed-off-by: Allan McRae <allan@archlinux.org>
2013-07-30Only note backup file changes with -QkkAllan McRae
Backup files are expected to be changed and should not be flagged by -Qkk. Note changed back-up files in -Qkk but do not count them as altered. Do not report backup files in -Qqkk. Signed-off-by: Allan McRae <allan@archlinux.org>
2013-01-29Restore libarchive 2.8.x compatibilityDan McGee
We still call some of these 'deprecated' methods elsewhere, so this shouldn't present a problem. When we decide 2.x support is to be dropped, we should update all of the code to not call deprecated methods. Allan: Adjusted with respect to previous patches adding libarchive compatibilty layer. Signed-off-by: Allan McRae <allan@archlinux.org>
2013-01-04fix comment style // -> /* */Gerardo Exequiel Pozzi
Signed-off-by: Gerardo Exequiel Pozzi <vmlinuz386@yahoo.com.ar> Signed-off-by: Allan McRae <allan@archlinux.org>
2013-01-03Update copyright year for 2013Allan McRae
Signed-off-by: Allan McRae <allan@archlinux.org>
2012-12-14Remove leading "./" from filenames in mtree fileAllan McRae
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>
2012-12-14Check file types match before comparing propertiesAllan McRae
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>
2012-12-14Check "install" and "changelog" files for changesAllan McRae
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>
2012-12-14Perform full checking of files with -QkkAllan McRae
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>
2012-12-14Basic running of pacman -Qkk to check mtree filesAllan McRae
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>
2012-12-14Separate checking a files existence into a functionAllan McRae
Signed-off-by: Allan McRae <allan@archlinux.org>
2012-12-14Move check function into its own fileAllan McRae
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>