jakartaee / servlet

Jakarta Servlet
https://eclipse.org/ee4j/servlet
Other
250 stars 79 forks source link

jakarta.servlet-api.jar MANIFEST.MF contains path to builder's current directory #578

Closed hboutemy closed 3 months ago

hboutemy commented 4 months ago

in META-INF/MANIFEST.MF, for entries META-INF/LICENSE.md and META-INF/NOTICE.md, there is a syntax that says =/home/jenkins/agent/workspace/1_servlet-api-build-and-stage/ + file name

extract from jakarta.servlet-api-6.1.0-M2.jar META-INF/MANIFEST.MF:

3_1.xsd,META-INF/LICENSE.md=/home/jenkins/agent/workspace/1_servlet-api
-build-and-stage/LICENSE.md,META-INF/NOTICE.md=/home/jenkins/agent/work
- space/1_servlet-api-build-and-stage/NOTICE.md

see full reference https://github.com/jvm-repo-rebuild/reproducible-central/blob/master/content/jakarta/servlet/jakarta.servlet-api/README.md

olamy commented 4 months ago

@hboutemy I'm not clear with your report. you are mentioning META-INF/LICENSE.md and META-INF/NOTICE.md but I cannot see any issues with those files, But I can see issues with META-INF/MANIFEST.MF

unzip -p jakarta.servlet-api-6.1.0-M2.jar META-INF/MANIFEST.MF | grep jenkins
 3_1.xsd,META-INF/LICENSE.md=/home/jenkins/agent/workspace/1_servlet-api
 -build-and-stage/LICENSE.md,META-INF/NOTICE.md=/home/jenkins/agent/work

Is it your concern? I guess yes :)

hboutemy commented 3 months ago

@olamy yes, I was not clear, updated the description to clarify any idea what creates this?

olamy commented 3 months ago

@hboutemy the guilty is osgi instruction Include-Resource. And I'm not quite sure how to fix it actually. The easiest fix is to change the bundle plugin instruction to <_removeheaders>Bnd-LastModified,Include-Resource</_removeheaders> @markt-asf do we need the Include-Resource osgi instruction to be there? Because ATM it's really wrong and the whole content including

Include-Resource: jakarta/servlet/LocalStrings.properties=src/main/java/
 jakarta/servlet/LocalStrings.properties,jakarta/servlet/LocalStrings_fr
 .properties=src/main/java/jakarta/servlet/LocalStrings_fr.properties

the file is definitely not within the jar in the src/main/java/jakarta/servlet/LocalStrings_fr.properties

A fix could be these instruction:

                        <Include-Resource>
                            {maven-resources},
                            META-INF/LICENSE.md=META-INF/LICENSE.md,
                            META-INF/NOTICE.md=META-INF/NOTICE.md
                        </Include-Resource>
olamy commented 3 months ago

see https://github.com/jakartaee/servlet/pull/579

olamy commented 3 months ago

PR merged

markt-asf commented 3 months ago

Sorry it is late but I can confirm that the updated PR fixes the issue. Thanks for taking care of this.