Community Packages

Please read this before reporting a bug:

Do NOT report bugs when a package is just outdated, or it is in the AUR. Use the 'flag out of date' link on the package page, or the Mailing List.

REPEAT: Do NOT report bugs for outdated packages!

FS#72066 - arch-audit request: hook is backed up by PKGBUILD to preserve local edits

Attached to Project: Community Packages
Opened by Matthew Armand (heylookmatt) - Tuesday, 07 September 2021, 15:51 GMT
Last edited by Andreas Radke (AndyRTR) - Saturday, 11 September 2021, 08:53 GMT
Task Type Feature Request
Category Packages
Status Assigned
Assigned To Christian Rebischke (Shibumi)
Levente Polyak (anthraxx)
Architecture All
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 0%
Votes 1
Private No



I've made a couple modifications to the pacman hook which is installed by arch-audit to /usr/share/arch-audit/arch-audit.hook. These are simple; just adding the flag to show CVEs, etc. I modify the file directly and symlink it to /etc/pacman.d/hooks/.
When arch-audit updates, these modifications are overwritten by the version of the hook shipped with the package.

In order for pacman to realize there's changes and prompt my update process to reconcile the updates with pacdiff, could we add the hook to the "backups" line in the [PKGBUILD]( I believe it would look something like this:

backup=('etc/arch-audit/settings.toml', 'usr/share/arch-audit/arch-audit.hook')

If I'm reading pacman's docs correctly, this would cause newer changes to be installed as a `.pacnew` and the user could resolve the updates to preserve their changes.

Additional info:
* arch-audit 0.1.20-1
* glibc 2.33-5
* gcc-libs 11.1.0-1
* curl 7.78.0-1
* pacman 6.0.1-1
* Did this work at one time? No, has always behaved this way.

Steps to reproduce:

1. Install arch-audit

2. Modify /usr/share/arch-audit/arch-audit.hook

3. Update arch-audit (pacman -Syu)

4. Currently, modifications are overwritten. Ideally they'd persist.
This task depends upon