Skip to content
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

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

Closed
hboutemy opened this issue Mar 2, 2024 · 6 comments

Comments

@hboutemy
Copy link
Contributor

hboutemy commented Mar 2, 2024

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
Copy link
Contributor

olamy commented Mar 4, 2024

@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
Copy link
Contributor Author

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

@olamy
Copy link
Contributor

olamy commented Mar 12, 2024

@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
Copy link
Contributor

olamy commented Mar 12, 2024

see #579

olamy added a commit that referenced this issue Mar 18, 2024
* remove OSGI header Include-Resource

Signed-off-by: Olivier Lamy <[email protected]>
@olamy
Copy link
Contributor

olamy commented Mar 18, 2024

PR merged

@olamy olamy closed this as completed Mar 18, 2024
@markt-asf
Copy link
Contributor

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants