mojohaus / rpm-maven-plugin

http://www.mojohaus.org/rpm-maven-plugin/
Other
56 stars 48 forks source link

Configure parameters for `rpmbuild` #47

Closed nknapp closed 8 years ago

nknapp commented 8 years ago

Hello and thanks for your plugin. It has helped me a lot in the last months.

I have a minor problem though: Building larger RPMs take pretty long and I noticed that Checking for unpackaged files is responsible for that. I would like to try to disable this part by adding the nocheck argument to the rpmbuild-call, but there is no way to configure additional parameters in the POM. I have already added the configuration

<defineStatements>
   <defineStatement>_unpackaged_files_terminate_build 0</defineStatement>
</defineStatements>

but this does not prevent `check-files' from being called.

Could you add an configuration option for CLI arguments that are appended to the rpmbuild-commandline?

dantran commented 8 years ago

@nknapp how my files do you have? are they large? what is the final size?

what is the command are you looking for? also i think think _unpackaged_files_terminate_build has anything to do you your issue. See https://docs.fedoraproject.org/ro/Fedora_Draft_Documentation/0.1/html/RPM_Guide/ch09s05s07.html

dantran commented 8 years ago

try this http://stackoverflow.com/questions/9292243/rpmbuild-change-compression-format

rickard-von-essen commented 8 years ago

This is related to a fix for brp-repack-jars.

nknapp commented 8 years ago

@dantran The total size of the package is about 128 MB with default compression and about 600 MB with "%define _binary_payload w0.gzdio". The build time seems to be about the same for both alternatives. The package contains 182 files. The 8 largest files are 41M to 86M, 5 other files are larger than 1M, the rest is smaller.

I had put _unpackaged_files_terminate_build 0 in the configuration because I had hoped that rpmbuild would not run check-files if the result didn't matter anyway, but I was wrong...

nknapp commented 8 years ago

I have found a way to omit check-files with a define-statement:

<defineStatement>__check_files /bin/true</defineStatement>

This calls bin/true instead of calling the check-files script. It does reduce the build duration about 15 seconds for my build. I had hoped for more. I closing this issue, since it the statement achieves my goal.

If anybody is interested: I found out about this, using the hint from this stack-overflow question. I dumped the whole configuration with rpm --showrc and looked for check-files and there it was.

Thanks for your kind help

minusdavid commented 7 years ago

Does this solution still work for you? I've tried it elsewhere and it just seems to cause rpmbuild to crash.