Rpmbuild: brp-java-repack-jars change jar permissions

Consider a SPEC file containing:

%install
install -m u=rwx,g=rx,o= -D bin/blah.jar ${RPM_BUILD_ROOT}%{_libexecdir}/foo/blah.jar

      

Then in the section, the %files

permissions are not changed (for example %defattr(-,bubba,users,-)

).

Installing RPM results in blah.jar

with permissions 644

instead of 640

. Indeed, no matter what permissions are used in the command install

, they are reset to the default 640

. I found that the repackaging of the jar was the cause, as permissions are maintained if I disable repackaging by adding %define __jar_repack %{nil}

to the SPEC file.

This is a nasty error of the repactor

How do I get both the repackaging to work and the permissions that need to be preserved (and I mean saving rather than setting them in a section %files

, since then I have to mention individual files not only in %install

but also in %files

, not just entire directories in the second)?

+3
linux jar file-permissions rpm rpmbuild


source to share


No one has answered this question yet

Check out similar questions:

1528
How to change the output echo color in Linux
838
Unable to execute jar file: "no main manifest attribute"
599
How can I exclude all "denied permissions" message from "find"?
526
How do I get the path to the running JAR file?
423
Difference between Bank and Java War
nineteen
Rpmbuild compression format
4
Can't change permissions when running rpmbuild
1
rpmbuild creates tmp files and crashes due to "Permission denied" when trying to delete them
0
rpmbuild does not preserve directory permissions
0
Is there an RPM Spec section to run before checking file dependencies?



All Articles
Loading...
X
Show
Funny
Dev
Pics