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 Toolybird (Toolybird) - Tuesday, 09 May 2023, 05:35 GMT
Task Type Feature Request
Category Packages
Status Closed
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 100%
Votes 1
Private No

Details

Description:

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](https://github.com/archlinux/svntogit-community/blob/packages/arch-audit/trunk/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

Closed by  Toolybird (Toolybird)
Tuesday, 09 May 2023, 05:35 GMT
Reason for closing:  Won't implement
Additional comments about closing:  In general, files under /usr are not meant to be editable. Simply copy your modified hook to /etc/pac... job done.

Loading...