rpmbuild change compression format

前端 未结 4 804
面向向阳花
面向向阳花 2020-12-14 02:41

I try to pack some map files for our geoserver in an internal rpm package. For the build part, this is just to copy the files. I think this works as expected. But it takes t

4条回答
  •  旧时难觅i
    2020-12-14 03:01

    I ran into the same issue with Ant building a runnable Jar RPM with Spring Boot Loader complaining of this:

    Caused by: java.lang.IllegalStateException: Unable to open nested entry 'BOOT-INF/lib/accessors-smart-1.2.jar'. It has been compressed and nested jar files must be stored without compression. Please check the mechanism used to create your executable jar file

    My ant build task was like this:

     
       
       
      
      
    
    

    My solution to build an RPM with a runnable JAR was to disable the repacking, setting the macro definitions on the spec file did not do it for me.

    Adding this to the spec file was what worked for me:

    #Disable jar unpacking
    %define __jar_repack 0
    

    Reference: https://bugzilla.redhat.com/show_bug.cgi?id=219731

    Thanks to the previous posters for helping to focus in on the issue too.

    Erion

提交回复
热议问题