-
Notifications
You must be signed in to change notification settings - Fork 446
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
rpmBrpJavaRepackJars issue #964
Comments
Thanks for your report. I'll take a look next week when I'm back home from Dublin. Do you have a guess if the script is not correctly applied or itself incorrect? |
Sorry, I have no clue why it happens like this. |
It's a different one than native-packager uses, right? |
Yes. In nutshell currently packager adds in RPM's SPEC file:
My hack adds:
According to http://livecipher.blogspot.com/2012/06/disable-binary-stripping-in-rpmbuild.html, I understood (but didn't test), my hack could be added anywhere in SPEC file and it will disable all BRP related jobs, not only JAR repacking, but also all other repacking tasks, but this option is not exposed in In my case, I'd like to have those repacking options as |
Sorry for my late reply. Busy days.
Absolutely. We had the solution mentioned in the blog post. e793228 reverted this. @YuvalItzchakov what was the reason for that? |
The previous implementation did not remove all packing, only jar repackaging. My modification was only meant to shorten the code required to do that. I think it would be a good idea to expose "advanced flags" to be able to remove these repackaging processes completely. |
@YuvalItzchakov thanks for the fast reply 😮 Hm. @mr-git can you check that the |
@mr-git My fix made jar repackaging disabled by default, so there's no need to explicitly set the flag to |
Not sure why this is closed. I get the same results with 1.2.2 and 0.13.16 sbt. Maybe I'm "doing it wrong"? The relevant settings my build are: rpmBrpJavaRepackJars in Rpm := false,
maintainerScripts in Rpm := {
MaintainerScriptHelper
.maintainerScriptsAppend((maintainerScripts in Rpm).value)(
// See:
// http://livecipher.blogspot.com/2012/06/disable-binary-stripping-in-rpmbuild.html
// http://www.developersite.org/103-214194-rpm
Pre -> "%global __os_install_post %{nil}",
Pre -> "%global _binaries_in_noarch_packages_terminate_build 0",
Post → s"echo 'installing ${(packageName in Rpm).value}'"
)
} Any thoughts? |
Oy, and I figured it out. The double Pre entry in the maintainerScriptsAppend method parameter means only the last line is retained so the __os_install_post %{nil} was not included. Putting both in one string fixes the issue. Not sure why maintainerScriptAppend doesn't take a Seq[(String -> Seq[String])] as was the practice in prior releases. |
Expected behaviour
When I set
rpmBrpJavaRepackJars in Rpm := false,
, I expect that JAR repacking is not happening.Actual behaviour
In our project with about 250MB of dependency JARs, this is in log:
This took a bit more than 11 minutes to repack all JARs
In
1.1.5
version, I hack-disabled repacking like this (hack works for 1.2.0-M9 too):With my custom BRP disabling in place, same part of log looks as follows:
Just under 1 minute, no JARs repacked at all.
Information
The text was updated successfully, but these errors were encountered: