Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deprecate Lua posix.fork() and posix.exec() #2420

Closed
pmatilai opened this issue Mar 9, 2023 · 1 comment · Fixed by #2948
Closed

Deprecate Lua posix.fork() and posix.exec() #2420

pmatilai opened this issue Mar 9, 2023 · 1 comment · Fixed by #2948
Assignees
Labels
lua Lua bindings/interface v6 Related to rpm v6 (readiness)
Milestone

Comments

@pmatilai
Copy link
Member

pmatilai commented Mar 9, 2023

While we try to protect rpm from these footguns (in the context of rpm), it'd be better to not have them at all.

rpm.execute() which we have for five years now is a far saner and safer interface for executing helpers, both to the user and rpm itself.

@pmatilai pmatilai added the lua Lua bindings/interface label Mar 9, 2023
@pmatilai pmatilai added the v6 Related to rpm v6 (readiness) label Sep 27, 2023
@pmatilai pmatilai added this to the 4.20.0 milestone Sep 27, 2023
@pmatilai
Copy link
Member Author

pmatilai commented Sep 27, 2023

We should add deprecation warnings in 4.20.
Actually removing these belongs to v6.

pmatilai added a commit to pmatilai/rpm that referenced this issue Mar 6, 2024
Rpm scriptlets should have no business dealing with this level of
detail in process control, rpm.execut() is much saner and safer
for scriptlet needs. We can't just remove because this is a public
API with known users (eg glibc in Fedora), but we can at least document
these as deprecated.

fork() and exec() are the main "problems" here, but wait() and
redirect2null() become meaningless once you take the first two away.

Fixes: rpm-software-management#2420
@pmatilai pmatilai self-assigned this Mar 6, 2024
pmatilai added a commit to pmatilai/rpm that referenced this issue Mar 6, 2024
Rpm scriptlets should have no business dealing with this level of
detail in process control, rpm.execut() is much saner and safer
for scriptlet needs. We can't just remove because this is a public
API with known users (eg glibc in Fedora), but we can at least document
these as deprecated.

fork() and exec() are the main "problems" here, but wait() and
redirect2null() become meaningless once you take the first two away.

Fixes: rpm-software-management#2420
pmatilai added a commit to pmatilai/rpm that referenced this issue Mar 14, 2024
Rpm scriptlets should have no business dealing with this level of
detail in process control, rpm.execut() is much saner and safer
for scriptlet needs. We can't just remove because this is a public
API with known users (eg glibc in Fedora), but we can at least document
these as deprecated with noisy warnings.

fork() and exec() are the main "problems" here, but wait() and
redirect2null() become meaningless once you take the first two away.

Fixes: rpm-software-management#2420
ffesti pushed a commit that referenced this issue Mar 14, 2024
Rpm scriptlets should have no business dealing with this level of
detail in process control, rpm.execut() is much saner and safer
for scriptlet needs. We can't just remove because this is a public
API with known users (eg glibc in Fedora), but we can at least document
these as deprecated with noisy warnings.

fork() and exec() are the main "problems" here, but wait() and
redirect2null() become meaningless once you take the first two away.

Fixes: #2420
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
lua Lua bindings/interface v6 Related to rpm v6 (readiness)
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

2 participants
@pmatilai and others