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

mock: avoid the %pre scriptlet if possible #1498

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

praiskup
Copy link
Member

@praiskup praiskup commented Nov 1, 2024

The script for generating the %pre scriptlet is non-existing on new distributions (like Mageia now, but Fedora will drop that sooner or later, too). The build of Mock on Mageia previously relied on sysusers.generate-pre.sh, and failed.

The sysusers feature is an RPM built-in anyway (on modern systems), so there's no reason to duplicate the logic in %pre. Generate the %pre scriptlet only for older distributions.

Complements: #1367
Relates: #289
Relates: fedora-copr/copr#2789

@Conan-Kudo
Copy link
Member

Wouldn't it be simpler to just vendor the script in the packaging so that it works everywhere?

@praiskup
Copy link
Member Author

praiskup commented Nov 1, 2024

Nah, what a tiring dark packaging corner :-( I'm not sure. Not sure I understand what you are saying;
forget about %sysusers_create_compat, and start hardwiring of the getent group 'mock' >/dev/null || groupadd -f -g '135' -r 'mock' || : ?

@praiskup
Copy link
Member Author

praiskup commented Nov 1, 2024

@Conan-Kudo PTAL

@praiskup
Copy link
Member Author

praiskup commented Nov 8, 2024

@Conan-Kudo does it make sense now?

@praiskup
Copy link
Member Author

praiskup commented Nov 8, 2024

I think I did what you mentioned (not sure). This is tricky though, it would be nice to see a "reference" implementation.

mock/mock.spec Outdated Show resolved Hide resolved
@praiskup
Copy link
Member Author

ptal

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants