Commit Graph

11 Commits

Author SHA1 Message Date
Allan McRae 640324f1d4 Only note backup file changes with -Qkk
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-07-30 13:00:58 +10:00
Dan McGee 3aece8f0ee Restore libarchive 2.8.x compatibility
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-29 13:37:32 +10:00
Gerardo Exequiel Pozzi 46e9afdd74 fix comment style // -> /* */
Signed-off-by: Gerardo Exequiel Pozzi <vmlinuz386@yahoo.com.ar>
Signed-off-by: Allan McRae <allan@archlinux.org>
2013-01-04 21:49:37 +10:00
Allan McRae 1dd3405813 Update copyright year for 2013
Signed-off-by: Allan McRae <allan@archlinux.org>
2013-01-03 12:03:09 +10:00
Allan McRae 5186f702d3 Remove leading "./" from filenames in mtree file
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-14 13:45:12 +10:00
Allan McRae 7d27b2b0f4 Check file types match before comparing properties
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-14 13:45:12 +10:00
Allan McRae ddd2b9e6f6 Check "install" and "changelog" files for changes
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-14 13:45:12 +10:00
Allan McRae 01e093d0ae Perform full checking of files with -Qkk
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-14 13:45:12 +10:00
Allan McRae 327c272bb4 Basic running of pacman -Qkk to check mtree files
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-14 13:45:12 +10:00
Allan McRae cfd9f1cc69 Separate checking a files existence into a function
Signed-off-by: Allan McRae <allan@archlinux.org>
2012-12-14 13:45:12 +10:00
Allan McRae 18ddf90ff4 Move check function into its own file
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>
2012-12-14 13:45:12 +10:00