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

Add "copy" compressor, which skips compression #101

Draft
wants to merge 6 commits into
base: master
Choose a base branch
from

Conversation

totph
Copy link
Contributor

@totph totph commented Feb 7, 2025

Add "copy" compressor, which skips compression

As seen in the rpm sources, this does not compress the data at all
and simply omits the payload compressor tag:

https://github.com/rpm-software-management/rpm/blob/40c53b6a/build/pack.cc#L328

totph added 6 commits February 7, 2025 16:48
The default interpreter '/bin/sh' can be changed via `SetDefaultScriptletInterpreter()`,
or on a per-scriptlet basis via `SetScriptletInterpreterFor()`

We use the more familiar name `interpreter`, RPM calls it `scriptlet program`.
These usually do not fork interpreters, so do not override them when calling
`SetDefaultScriptletInterpreter()`. Note that explicity setting /bin/sh also *seems*
to work, and so does setting <lua> for other scriptlet. Use at your own risk!

See <https://rpm-software-management.github.io/rpm/manual/lua.html>
Overriding the interpreter (defaults to /bin/sh) for all or a specific
scriptlet is possible via `-interpreter` or `-interpreter_for NAME:INTERPRETER`
where NAME is the type of scriptlet, one of:
prein postin preun postun pretrans posttrans verifyscript, e.g. `prein:/bin/ksh`

pretrans and posttrans, which should be lua code, are now handled. Their
interpreter '<lua>' is not overwritten, unless -interpreter_for is used.

Also added verifyscript support. When calling this during `rpm -V pkgname`
only the stderr output will be printed.

The scriptlets of an rpm can be checked via `rpm -qp --scripts RPMFILE`.
As seen in the rpm sources, this does not compress the data at all
and simply omits the payload compressor tag:

<https://github.com/rpm-software-management/rpm/blob/40c53b6a/build/pack.cc#L328>
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.

1 participant