On Wed, Mar 05, 2025 at 10:47:36AM +0100, Jarek Prokop via packaging wrote:
> Hi,
> 
> recently we were faced with a bug that caused an infinite loop in a
> container. It was from a package (node.js) retaining a scriptlet to replace
> a directory as recommended in Fedora Guidelines [0].
> Thoughts? Feedback?

Let's take a step back. Does it make sense to implement complicated
and fragile scriptlets in packages? Or even: will packagers remember
to check if the package update they are doing replaces directories by
symlinks or vice versa and remember to add the complicated scriptlet?

The answer to the second question is no: quite naturally we forget
about this all the time, and only add the scriptlet when somebody
reports an rpm transaction error.

The answer to the first question is more subjective, but IMO, it's
also "no". Can we *please* get rid of this footgun that has been a
continous source of problems?

We are making efforts to move away from scriptlets in packaging.
With the ongoing sysusers change we managed to absorb a significant
percentage of complex scriptlets into rpm.

Let's do the same with the directory/symlink replacement scriptlets:
let rpm do the rename to '.rpmmoved' if it detects a type mismatch.
The end result will be _exactly_ the same as if we had the scriptlet
in the package, but it'll only be implemented once.

Zbyszek
-- 
_______________________________________________
devel mailing list -- devel@lists.fedoraproject.org
To unsubscribe send an email to devel-le...@lists.fedoraproject.org
Fedora Code of Conduct: 
https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: 
https://lists.fedoraproject.org/archives/list/devel@lists.fedoraproject.org
Do not reply to spam, report it: 
https://pagure.io/fedora-infrastructure/new_issue

Reply via email to