Add "copy" compressor, which skips compression#101
Draft
totph wants to merge 6 commits intogoogle:masterfrom
Draft
Add "copy" compressor, which skips compression#101totph wants to merge 6 commits intogoogle:masterfrom
totph wants to merge 6 commits intogoogle:masterfrom
Conversation
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>
Collaborator
|
Thanks for the contribution! I wonder - in what usecases do you need a copy compressor? it looks very lightweight, so I don't mind the addition, but I just have to wonder. Why is this PR mixing in a lot of unrelated changes? Can you keep only the parts that relate to the copy compressor? |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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