Bug 1868992 - Review Request: jakarta-server-pages - Jakarta Server Pages (JSP)
Summary: Review Request: jakarta-server-pages - Jakarta Server Pages (JSP)
Keywords:
Status: CLOSED NEXTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: Package Review
Version: rawhide
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Mat Booth
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On: 1868991
Blocks:
TreeView+ depends on / blocked
 
Reported: 2020-08-14 23:04 UTC by Fabio Valentini
Modified: 2020-08-25 15:52 UTC (History)
2 users (show)

Fixed In Version: jakarta-server-pages-2.3.6-1.fc33
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2020-08-25 15:52:43 UTC
Type: ---
Embargoed:
mat.booth: fedora-review+


Attachments (Terms of Use)

Description Fabio Valentini 2020-08-14 23:04:23 UTC
Spec URL: https://decathorpe.fedorapeople.org/packages/jakarta-server-pages.spec
SRPM URL: https://decathorpe.fedorapeople.org/packages/jakarta-server-pages-3.0.0-1.fc32.src.rpm

Description:
Jakarta Server Pages provides a container-independent implementation of
the JSP API.

Fedora Account System Username: decathorpe

Note: This is a rename-review request, but for merging two old packages (glassfish-jsp, glassfish-jsp-api) into one new package, since the upstream projects have merged and moved and were renamed. Please verify that Provides and Obsoletes are correct.

Comment 1 Mat Booth 2020-08-17 12:03:50 UTC
Ah yeah looks like this one requires:

mvn(jakarta.el:jakarta.el-api)
mvn(jakarta.servlet:jakarta.servlet-api)

Comment 2 Mat Booth 2020-08-25 00:49:19 UTC
Issues:

1)

Hmm, just like jakarta-servlet package, half the source files have "ASL 2.0" headers instead of the "EPL-2.0 or GPLv2", so I think the license field would be more accurate as this:

ASL 2.0 and (EPL-2.0 or GPLv2 with exceptions)

I read the upstream bug you filed for servlet-api ( https://github.com/eclipse-ee4j/servlet-api/issues/347 ) and it seemed to take them by surprise! So probably worth filing a bug upstream for this one too.


2)

For some boring technical reasons, Eclipse requires the JDTJavaCompiler adapter implementation, which in the old package was enabled by this patch:

https://src.fedoraproject.org/rpms/glassfish-jsp/blob/84ff3bc904d196045bbbba9ec2d5140391847dd3/f/0001-Enable-Eclipse-JDT-compiler-support-for-runtime-JSP-.patch

This does not appear to have made the transition. The new package instead deletes JDTJavaCompiler and removes the dep on ecj. Any chance this can be restored?

I know it's a deviation from the upstream's distribution available from maven central, but the Eclipse Foundation ships it's own build with this addition to allow JSP to use Eclipse's built-in ECJ Java compiler for compiling JSP pages at runtime.


3)

The "compat namespace" (cp -pr && sed s/javax/jakarta/) causes compilation errors in Eclipse. The problem is due to mixed usage of javax.* and jakarta.* classes when referencing classes directly from the implementation jar.

Eclipse does stuff like this example:

import javax.servlet.Servlet; // An API class
import org.apache.jasper.servlet.JspServlet; // An impl class

Servlet s = new JspServlet;

HOWEVER, JspServlet extends "jakarta.servlet.Servlet" and NOT "javax.servlet.Servlet" which makes JspServlet unassignable to Servlet in this context (type mismatch, compilation error)

So although this compat "hack" works fine when only the API classes are used (javax.* classes) it fails when we try to use classes from the implementation jar without fully migrating to jakarta.* APIs.

I need a bit of time to think about how best to solve this. It looks like we only reference JSP implementation classes a couple times in Eclipse code, so perhaps I will be able to come up with a concise patch there. Or do something cleverer in this package and jakarta-servlet package. Hmmm....




For completion, the full review tool output follows below. FTR, obsoletes/provides look fine to me, I don't know why the review tool does not enumerate the obsoletes as it does with the provides...


Package Review
==============

Legend:
[x] = Pass, [!] = Fail, [-] = Not applicable, [?] = Not evaluated


===== MUST items =====

Generic:
[x]: Package is licensed with an open-source compatible license and meets
     other legal requirements as defined in the legal section of Packaging
     Guidelines.
[!]: License field in the package spec file matches the actual license.
     Note: Checking patched sources after %prep for licenses. Licenses
     found: "Unknown or generated", "*No copyright* Eclipse Public License
     2.0", "Eclipse Public License 2.0", "Apache License 2.0". 45 files
     have unknown license. Detailed output of licensecheck in
     /home/mbooth/fedora/1868992-jakarta-server-pages/licensecheck.txt
[x]: License file installed when any subpackage combination is installed.
[!]: If the package is under multiple licenses, the licensing breakdown
     must be documented in the spec.
[x]: Package contains no bundled libraries without FPC exception.
[x]: Changelog in prescribed format.
[x]: Sources contain only permissible code or content.
[-]: Package contains desktop file if it is a GUI application.
[-]: Development files must be in a -devel package
[x]: Package uses nothing in %doc for runtime.
[x]: Package consistently uses macros (instead of hard-coded directory
     names).
[x]: Package is named according to the Package Naming Guidelines.
[x]: Package does not generate any conflict.
[x]: Package obeys FHS, except libexecdir and /usr/target.
[x]: If the package is a rename of another package, proper Obsoletes and
     Provides are present.
[x]: Requires correct, justified where necessary.
[x]: Spec file is legible and written in American English.
[-]: Package contains systemd file(s) if in need.
[x]: Package is not known to require an ExcludeArch tag.
[-]: Large documentation must go in a -doc subpackage. Large could be size
     (~1MB) or number of files.
     Note: Documentation size is 10240 bytes in 1 files.
[x]: Package complies to the Packaging Guidelines
[x]: Package successfully compiles and builds into binary rpms on at least
     one supported primary architecture.
[x]: Package installs properly.
[x]: Rpmlint is run on all rpms the build produces.
     Note: There are rpmlint messages (see attachment).
[x]: If (and only if) the source package includes the text of the
     license(s) in its own file, then that file, containing the text of the
     license(s) for the package is included in %license.
[x]: Package requires other packages for directories it uses.
[x]: Package must own all directories that it creates.
[x]: Package does not own files or directories owned by other packages.
[x]: Package uses either %{buildroot} or $RPM_BUILD_ROOT
[x]: Package does not run rm -rf %{buildroot} (or $RPM_BUILD_ROOT) at the
     beginning of %install.
[x]: Macros in Summary, %description expandable at SRPM build time.
[x]: Dist tag is present.
[x]: Package does not contain duplicates in %files.
[x]: Permissions on files are set properly.
[x]: Package must not depend on deprecated() packages.
[x]: Package use %makeinstall only when make install DESTDIR=... doesn't
     work.
[x]: Package is named using only allowed ASCII characters.
[x]: Package does not use a name that already exists.
[x]: Package is not relocatable.
[x]: Sources used to build the package match the upstream source, as
     provided in the spec URL.
[x]: Spec file name must match the spec package %{name}, in the format
     %{name}.spec.
[x]: File names are valid UTF-8.
[x]: Packages must not store files under /srv, /opt or /usr/local

Java:
[x]: Bundled jar/class files should be removed before build

===== SHOULD items =====

Generic:
[x]: If the source package does not include license text(s) as a separate
     file from upstream, the packager SHOULD query upstream to include it.
[x]: Final provides and requires are sane (see attachments).
[-]: Fully versioned dependency in subpackages if applicable.
     Note: No Requires: %{name}%{?_isa} = %{version}-%{release} in jakarta-
     server-pages-api
[!]: Package functions as described.
[x]: Latest version is packaged.
[x]: Package does not include license text files separate from upstream.
[-]: Sources are verified with gpgverify first in %prep if upstream
     publishes signatures.
     Note: gpgverify is not used.
[-]: Description and summary sections in the package spec file contains
     translations for supported Non-English languages, if available.
[x]: Package should compile and build into binary rpms on all supported
     architectures.
[-]: %check is present and all tests pass.
[x]: Packages should try to preserve timestamps of original installed
     files.
[x]: Reviewer should test that the package builds in mock.
[x]: Buildroot is not present
[x]: Package has no %clean section with rm -rf %{buildroot} (or
     $RPM_BUILD_ROOT)
[x]: No file requires outside of /etc, /bin, /sbin, /usr/bin, /usr/sbin.
[x]: Packager, Vendor, PreReq, Copyright tags should not be in spec file
[x]: Sources can be downloaded from URI in Source: tag
[x]: SourceX is a working URL.
[x]: Spec use %global instead of %define unless justified.

===== EXTRA items =====

Generic:
[x]: Rpmlint is run on all installed packages.
     Note: There are rpmlint messages (see attachment).
[x]: Spec file according to URL is the same as in SRPM.


Requires
--------
jakarta-server-pages (rpmlib, GLIBC filtered):
    java-headless
    javapackages-filesystem
    mvn(jakarta.el:jakarta.el-api)
    mvn(jakarta.servlet.jsp:jakarta.servlet.jsp-api)

jakarta-server-pages-api (rpmlib, GLIBC filtered):
    java-headless
    javapackages-filesystem

jakarta-server-pages-javadoc (rpmlib, GLIBC filtered):
    javapackages-filesystem


Provides
--------
jakarta-server-pages:
    glassfish-jsp
    jakarta-server-pages
    mvn(org.eclipse.jetty.orbit:org.apache.jasper.glassfish)
    mvn(org.eclipse.jetty.orbit:org.apache.jasper.glassfish:pom:)
    mvn(org.glassfish.web:jakarta.servlet.jsp)
    mvn(org.glassfish.web:jakarta.servlet.jsp:pom:)
    mvn(org.glassfish.web:javax.servlet.jsp)
    mvn(org.glassfish.web:javax.servlet.jsp:pom:)
    osgi(org.glassfish.web.jakarta.servlet.jsp)

jakarta-server-pages-api:
    glassfish-jsp-api
    jakarta-server-pages-api
    mvn(jakarta.servlet.jsp:jakarta.servlet.jsp-api)
    mvn(jakarta.servlet.jsp:jakarta.servlet.jsp-api:pom:)
    mvn(javax.servlet.jsp:javax.servlet.jsp-api)
    mvn(javax.servlet.jsp:javax.servlet.jsp-api:pom:)
    mvn(javax.servlet:jsp-api)
    mvn(javax.servlet:jsp-api:pom:)
    osgi(jakarta.servlet.jsp-api)

jakarta-server-pages-javadoc:
    glassfish-jsp-api-javadoc
    glassfish-jsp-javadoc
    jakarta-server-pages-javadoc



Generated by fedora-review 0.7.5 (5fa5b7e) last change: 2020-02-16
Command line :/usr/bin/fedora-review -b 1868992 -m fedora-33-x86_64 -o --enablerepo local
Buildroot used: fedora-33-x86_64
Active plugins: Java, Generic, Shell-api
Disabled plugins: SugarActivity, R, fonts, Haskell, Ocaml, C/C++, PHP, Perl, Python
Disabled flags: EPEL6, EPEL7, DISTTAG, BATCH, EXARCH

Comment 3 Fabio Valentini 2020-08-25 06:31:53 UTC
Hm. Well, we could switch to shipping an older version of jsp-api for now (one that doesn't have the package name transition yet). According to an upstream developer, those latest "stable" releases aren't even meant for public consumption yet :(

https://github.com/eclipse-ee4j/jaf/issues/49

No idea why they're tagged as "x.0.0" releases in GitHub if they're not ready yet :D

Comment 4 Mat Booth 2020-08-25 09:13:38 UTC
(In reply to Fabio Valentini from comment #3)
> Hm. Well, we could switch to shipping an older version of jsp-api for now
> (one that doesn't have the package name transition yet). According to an
> upstream developer, those latest "stable" releases aren't even meant for
> public consumption yet :(
> 

That might be the easiest thing to do. I suspect there won't be many differences except the package name refactoring between the last 2.x.x release and 3.0.0.


> https://github.com/eclipse-ee4j/jaf/issues/49
> 
> No idea why they're tagged as "x.0.0" releases in GitHub if they're not
> ready yet :D

I suppose they expect people to check maven central, the canonical distribution method for java, where the github-tagged release is not yet available: https://search.maven.org/artifact/jakarta.servlet.jsp/jakarta.servlet.jsp-api

Comment 5 Fabio Valentini 2020-08-25 10:00:29 UTC
Downgraded to 2.3.6, enabled JDTJavaCompiler (and AntJavaCompiler while I was at it).

- Patch1 is adapted from glassfish-jsp but rebased for 2.3.6 with additional enablement of AntJavaCompiler.
- Patch2 is copied from glassfish-jsp.

Spec URL: https://decathorpe.fedorapeople.org/packages/jakarta-server-pages.spec
SRPM URL: https://decathorpe.fedorapeople.org/packages/jakarta-server-pages-2.3.6-1.fc32.src.rpm

Comment 6 Mat Booth 2020-08-25 11:02:44 UTC
(In reply to Fabio Valentini from comment #5)
> Downgraded to 2.3.6, enabled JDTJavaCompiler (and AntJavaCompiler while I
> was at it).
> 
> - Patch1 is adapted from glassfish-jsp but rebased for 2.3.6 with additional
> enablement of AntJavaCompiler.
> - Patch2 is copied from glassfish-jsp.
> 
> Spec URL:
> https://decathorpe.fedorapeople.org/packages/jakarta-server-pages.spec
> SRPM URL:
> https://decathorpe.fedorapeople.org/packages/jakarta-server-pages-2.3.6-1.
> fc32.src.rpm


Great stuff I built Eclipse against this version and it all works fine.

There is just the license quibble (issue 1 in comment 2 above) remaining to be addressed.

Assuming you address that, then this package is APPROVED :-)

Comment 7 Mat Booth 2020-08-25 11:11:45 UTC
Oh cripes I just spotted one more minor problem:

On a fully up to date F33 system, the obsoletes are off by one:

$ rpm -q glassfish-jsp{,-api}
glassfish-jsp-2.3.4-8.fc33.noarch
glassfish-jsp-api-2.3.3-5.fc33.noarch

$ rpm -qp --obsoletes ./jakarta-server-pages-2.3.6-1.fc33.noarch.rpm 
glassfish-jsp < 2.3.4-8

$ rpm -qp --obsoletes ./jakarta-server-pages-api-2.3.6-1.fc33.noarch.rpm 
glassfish-jsp-api < 2.3.3-5


Please bump the release component of the obsoletes tags

Comment 8 Fabio Valentini 2020-08-25 11:25:24 UTC
Fixed license tag, and bumped the obsoleted versions for both glassfish-jsp and glassfish-jsp by 1.
Reported ASL 2.0 snafu also upstream: https://github.com/eclipse-ee4j/jsp-api/issues/180

Thanks for the review!

Comment 9 Gwyn Ciesla 2020-08-25 13:24:22 UTC
(fedscm-admin):  The Pagure repository was created at https://src.fedoraproject.org/rpms/jakarta-server-pages

Comment 10 Fabio Valentini 2020-08-25 15:52:43 UTC
Built for rawhide:
https://koji.fedoraproject.org/koji/buildinfo?buildID=1600830
And for fedora 33:
https://koji.fedoraproject.org/koji/buildinfo?buildID=1600831

Looks like I lost the race against the beta freeze.
So I'll submit an update and a buildroot override for the f33 build.

Update:
https://bodhi.fedoraproject.org/updates/FEDORA-2020-fdedbb4dbb
Buildroot override:
https://bodhi.fedoraproject.org/overrides/jakarta-server-pages-2.3.6-1.fc33

I will proceed with retiring glassfish-jsp and glassfish-jsp-api.


Note You need to log in before you can comment on or make changes to this bug.