Bug 1868991 - Review Request: jakarta-el - Jakarta Expression Language
Summary: Review Request: jakarta-el - Jakarta Expression Language
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:
Blocks: 1868992
TreeView+ depends on / blocked
 
Reported: 2020-08-14 23:01 UTC by Fabio Valentini
Modified: 2020-08-23 20:10 UTC (History)
2 users (show)

Fixed In Version: jakarta-el-4.0.0-1.fc33
Clone Of:
Environment:
Last Closed: 2020-08-23 20:10:39 UTC
Type: ---
Embargoed:
mat.booth: fedora-review+


Attachments (Terms of Use)

Description Fabio Valentini 2020-08-14 23:01:56 UTC
Spec URL: https://decathorpe.fedorapeople.org/packages/jakarta-el.spec
SRPM URL: https://decathorpe.fedorapeople.org/packages/jakarta-el-4.0.0-1.fc32.src.rpm

Description:
Jakarta Expression Language provides a specification document, API,
reference implementation and TCK that describes an expression language
for Java applications.

Fedora Account System Username: decathorpe

Note 1: This is a rename-review request. The current package is glassfish-el. Please verify that Provides and Obsoletes are correct.

Note 2: I'm currently going through non-responsive maintainer process for the maintainer of the old package:
https://bugzilla.redhat.com/show_bug.cgi?id=1868592
I will not retire the old and build the new package until this process is resolved.

Comment 1 Mat Booth 2020-08-18 13:41:48 UTC
Issues:

1)

Missing obsoletes/provides -- package does not obsolete/provide glassfish-el-api, even though it ships both api and impl jars. The package you are renaming split the impl and api into separate sub-packages, was the consolidation into a single binary RPM here intentional?

2)

Incorrect aliases -- it looks like you added "org.glassfish:javax.el" as an alias for the API jar, when it should be an alias for the impl jar. For example, comparing the old glassfish-el{,-api} packages:

$ xmvn-resolve org.glassfish:javax.el
/usr/share/java/glassfish-el.jar
$ xmvn-resolve org.glassfish:javax.el-api
/usr/share/java/glassfish-el-api.jar

With your new package:

# xmvn-resolve org.glassfish:javax.el
/usr/share/java/jakarta-el/jakarta.el-api.jar
# xmvn-resolve org.glassfish:javax.el-api
ERROR: Unable to resolve artifact org.glassfish:javax.el-api:jar:SYSTEM

So the "org.glassfish:javax.el" alias has different, incompatible behaviour.

I assume once again the aliases you omitted are not required by anything currently in Fedora :-)




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.
[x]: 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". 18 files
     have unknown license. Detailed output of licensecheck in
     /home/mbooth/fedora/1868991-jakarta-el/licensecheck.txt
[x]: License file installed when any subpackage combination is installed.
[x]: 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.
[!]: 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.
[-]: 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: No rpmlint messages.
[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:
[-]: If the source package does not include license text(s) as a separate
     file from upstream, the packager SHOULD query upstream to include it.
[!]: Final provides and requires are sane (see attachments).
[x]: 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.
[x]: 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]: Fully versioned dependency in subpackages if applicable.
[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.


Rpmlint
-------
Checking: jakarta-el-4.0.0-1.fc33.noarch.rpm
          jakarta-el-javadoc-4.0.0-1.fc33.noarch.rpm
          jakarta-el-4.0.0-1.fc33.src.rpm
3 packages and 0 specfiles checked; 0 errors, 0 warnings.


Rpmlint (installed packages)
----------------------------
jakarta-el-javadoc.noarch: W: invalid-url URL: https://github.com/eclipse-ee4j/el-ri <urlopen error [Errno -3] Temporary failure in name resolution>
jakarta-el.noarch: W: invalid-url URL: https://github.com/eclipse-ee4j/el-ri <urlopen error [Errno -3] Temporary failure in name resolution>
2 packages and 0 specfiles checked; 0 errors, 2 warnings.


Source checksums
----------------
https://github.com/eclipse-ee4j/el-ri/archive/4.0.0-RELEASE/el-ri-4.0.0.tar.gz :
  CHECKSUM(SHA256) this package     : 39d020607371113c2cc2bf1545906017989d435700cd822091aab184eca8c422
  CHECKSUM(SHA256) upstream package : 39d020607371113c2cc2bf1545906017989d435700cd822091aab184eca8c422


Requires
--------
jakarta-el (rpmlib, GLIBC filtered):
    java-headless
    javapackages-filesystem

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


Provides
--------
jakarta-el:
    glassfish-el
    jakarta-el
    mvn(jakarta.el:jakarta.el-api)
    mvn(jakarta.el:jakarta.el-api:pom:)
    mvn(org.glassfish:jakarta.el)
    mvn(org.glassfish:jakarta.el:pom:)
    mvn(org.glassfish:javax.el)
    mvn(org.glassfish:javax.el-impl)
    mvn(org.glassfish:javax.el-impl:pom:)
    mvn(org.glassfish:javax.el:pom:)
    osgi(jakarta.el-api)
    osgi(org.glassfish.jakarta.el)

jakarta-el-javadoc:
    glassfish-el-javadoc
    jakarta-el-javadoc

Comment 2 Fabio Valentini 2020-08-18 15:28:13 UTC
(In reply to Mat Booth from comment #1)
> Issues:
> 
> 1)
> 
> Missing obsoletes/provides -- package does not obsolete/provide
> glassfish-el-api, even though it ships both api and impl jars. The package
> you are renaming split the impl and api into separate sub-packages, was the
> consolidation into a single binary RPM here intentional?

No, that was not intentional. I missed it when creating a clean package from scratch.
I'll build with `%mvn_build -s` and add an -api subpackage.

> 2)
> 
> Incorrect aliases -- it looks like you added "org.glassfish:javax.el" as an
> alias for the API jar, when it should be an alias for the impl jar. For
> example, comparing the old glassfish-el{,-api} packages:
> 
> $ xmvn-resolve org.glassfish:javax.el
> /usr/share/java/glassfish-el.jar
> $ xmvn-resolve org.glassfish:javax.el-api
> /usr/share/java/glassfish-el-api.jar
> 
> With your new package:
> 
> # xmvn-resolve org.glassfish:javax.el
> /usr/share/java/jakarta-el/jakarta.el-api.jar
> # xmvn-resolve org.glassfish:javax.el-api
> ERROR: Unable to resolve artifact org.glassfish:javax.el-api:jar:SYSTEM
> 
> So the "org.glassfish:javax.el" alias has different, incompatible behaviour.

Good catch. I'll re-check the artifact coordinates in glassfish-el and glassfish-el-api and map them to the new artifact coordinates (correctly this time, I hope).

> I assume once again the aliases you omitted are not required by anything
> currently in Fedora :-)

Yes. Any aliases I dropped were not depended on by anything.
But I will check that again, too, since I clearly was tired when I made this package :-)


Thanks for the first review, I'll update files and come back here once I' ve fixed the issues.

Comment 3 Fabio Valentini 2020-08-19 15:50:37 UTC
- created -api subpackage, shipping implementation in jakarta-el and API in jakarta-el-api
- corrected %mvn_alias calls for impl and api

I've checked all the Provides that are currently there in glassfish-el{,-api}:

# provided as part of rename
glassfish-el = 3.0.1-0.13.b08.fc32
# no dependents in fedora
mvn(org.eclipse.jetty.orbit:com.sun.el) = 3.0.1.b08
# no dependents in fedora
mvn(org.eclipse.jetty.orbit:com.sun.el:pom:) = 3.0.1.b08
# no dependents in fedora
mvn(org.glassfish.web:javax.el) = 3.0.1.b08
# no dependents in fedora
mvn(org.glassfish.web:javax.el:pom:) = 3.0.1.b08
# %mvn_alias org.glassfish:jakarta.el org.glassfish:javax.el
mvn(org.glassfish:javax.el) = 3.0.1.b08
# no dependents in fedora
mvn(org.glassfish:javax.el-impl) = 3.0.1.b08
# no dependents in fedora
mvn(org.glassfish:javax.el-impl:pom:) = 3.0.1.b08
# no dependents in fedora
mvn(org.glassfish:javax.el:pom:) = 3.0.1.b08
osgi(com.sun.el.javax.el) = 3.0.0


# provided as part of rename
glassfish-el-api = 3.0.1-0.13.b08.fc32
# no dependents in fedora
mvn(javax.el:el-api) = 3.0.1.b08
# no dependents in fedora
mvn(javax.el:el-api:pom:) = 3.0.1.b08
# %mvn_alias jakarta.el:jakarta.el-api javax.el:javax.el-api
mvn(javax.el:javax.el-api) = 3.0.1.b08
# no dependents in fedora
mvn(javax.el:javax.el-api:pom:) = 3.0.1.b08
# no dependents in fedora
mvn(org.glassfish:javax.el-api) = 3.0.1.b08
# no dependents in fedora
mvn(org.glassfish:javax.el-api:pom:) = 3.0.1.b08
osgi(javax.el-api) = 3.0.0


I think the two aliases take care of the transition.


(Updated files at the original URLs.)

Comment 4 Fabio Valentini 2020-08-19 21:14:01 UTC
I've also added the same transitionary jakarta.el → javax.el copy in the -api subpackage (similar to what you did for jakarta-servlet).

Another issue I came across was missing .jar symlinks for packages that construct the classpath manually.
I've fixed that in jakarta-servlet and added the corresponding fix in this package as well.

Comment 5 Fabio Valentini 2020-08-20 09:01:42 UTC
After discussion on IRC:

I can confirm that glassfish-el and glassfish-el-api currently ship JAR files in the /usr/share/java/ base directory:
- /usr/share/java/glassfish-el.jar
- /usr/share/java/glassfish-el-api.jar

So adding the compat symlinks with %mvn_file should do the correct thing in the .spec.
These are the resulting symlinks:
- /usr/share/java/glassfish-el.jar → ./jakarta.el.jar
- /usr/share/java/glassfish-el-api.jar → ./jakarta.el-api.jar

Comment 6 Mat Booth 2020-08-20 10:27:02 UTC
Thanks for the updates, just two nits remaining:


1) The OSGi metadata does not export the jakarta.el package, because line 69 completely overwrites the Export-Package value, not append to it. On line 69 you want:

'<Export-Package>jakarta.el,javax.el;version="3.0.0"</Export-Package>'

To ensure it exports both old and new packages.

2) The Java guidelines state that if the package provides multiple JAR files, they SHOULD be installed in a %{name} subdirectory (of %{_javadir})

So I would prefer if lines 85 and 86 read like this instead:

%mvn_file :jakarta.el %{name}/jakarta.el glassfish-el
%mvn_file :jakarta.el-api %{name}/jakarta.el-api glassfish-el-api

Or slightly more concisely:

%mvn_file :{jakarta.el} %{name}/@1 glassfish-el
%mvn_file :{jakarta.el-api} %{name}/@1 glassfish-el-api

And that would result in the following:

/usr/share/java/glassfish-el.jar -> ./jakarta-el/jakarta.el.jar
/usr/share/java/glassfish-el-api.jar -> ./jakarta-el/jakarta.el-api.jar
/usr/share/java/jakarta-el
/usr/share/java/jakarta-el/jakarta.el.jar
/usr/share/java/jakarta-el/jakarta.el-api.jar

Comment 7 Fabio Valentini 2020-08-20 10:32:13 UTC
(In reply to Mat Booth from comment #6)
> Thanks for the updates, just two nits remaining:
> 
> 
> 1) The OSGi metadata does not export the jakarta.el package, because line 69
> completely overwrites the Export-Package value, not append to it. On line 69
> you want:
> 
> '<Export-Package>jakarta.el,javax.el;version="3.0.0"</Export-Package>'
> 
> To ensure it exports both old and new packages.

Good catch, will fix.

> 2) The Java guidelines state that if the package provides multiple JAR
> files, they SHOULD be installed in a %{name} subdirectory (of %{_javadir})
> 
> So I would prefer if lines 85 and 86 read like this instead:
> 
> %mvn_file :jakarta.el %{name}/jakarta.el glassfish-el
> %mvn_file :jakarta.el-api %{name}/jakarta.el-api glassfish-el-api
> 
> Or slightly more concisely:
> 
> %mvn_file :{jakarta.el} %{name}/@1 glassfish-el
> %mvn_file :{jakarta.el-api} %{name}/@1 glassfish-el-api
> 
> And that would result in the following:
> 
> /usr/share/java/glassfish-el.jar -> ./jakarta-el/jakarta.el.jar
> /usr/share/java/glassfish-el-api.jar -> ./jakarta-el/jakarta.el-api.jar
> /usr/share/java/jakarta-el
> /usr/share/java/jakarta-el/jakarta.el.jar
> /usr/share/java/jakarta-el/jakarta.el-api.jar

Well, those two JARs are shipped by two *different* packages though?
Wasn't that the whole reason for splitting out -api as a subpackage? It's also how it is currently handled in glassfish-el.

Comment 8 Mat Booth 2020-08-20 10:58:11 UTC
Yeah, but I don't think the glassfish-el package was "correct." See maven-resolver for another example where jars from many subpackages are being installed into a single subdir:

$ ll /usr/share/java/maven-resolver
total 624
-rw-r--r-- 1 root root 151207 Jan 29  2020 maven-resolver-api.jar
-rw-r--r-- 1 root root  48152 Jan 29  2020 maven-resolver-connector-basic.jar
-rw-r--r-- 1 root root 185262 Jan 29  2020 maven-resolver-impl.jar
-rw-r--r-- 1 root root  40592 Jan 29  2020 maven-resolver-spi.jar
-rw-r--r-- 1 root root  35025 Jan 29  2020 maven-resolver-transport-wagon.jar
-rw-r--r-- 1 root root 169636 Jan 29  2020 maven-resolver-util.jar

$ for j in /usr/share/java/maven-resolver/* ; do rpm -qf $j ; done
maven-resolver-api-1.4.1-2.fc32.noarch
maven-resolver-connector-basic-1.4.1-2.fc32.noarch
maven-resolver-impl-1.4.1-2.fc32.noarch
maven-resolver-spi-1.4.1-2.fc32.noarch
maven-resolver-transport-wagon-1.4.1-2.fc32.noarch
maven-resolver-util-1.4.1-2.fc32.noarch

Note that the above is the default behaviour if there are no calls to mvn_file at all, and was what jakarta-el was doing before you added the call to mvn_file. So jakarta-el would be intentionally deviating from the default.

And I'll admit, I was rather enjoying the consistency all the jakarta-* packages had to date:

<mock-chroot> sh-5.0# ls -ld /usr/share/java/jakarta*
drwxr-xr-x 2 root root 4096 Aug 20 11:43 /usr/share/java/jakarta-activation
drwxr-xr-x 2 root root 4096 Aug 20 11:43 /usr/share/java/jakarta-annotations
drwxr-xr-x 2 root root 4096 Aug 20 11:43 /usr/share/java/jakarta-messaging
drwxr-xr-x 2 root root 4096 Aug 20 11:43 /usr/share/java/jakarta-persistence
drwxr-xr-x 2 root root 4096 Aug 20 11:43 /usr/share/java/jakarta-servlet
drwxr-xr-x 2 root root 4096 Aug 20 11:43 /usr/share/java/jakarta-ws-rs
drwxr-xr-x 2 root root 4096 Aug 20 11:43 /usr/share/java/jakarta-xml-ws

<mock-chroot> sh-5.0# ls -l /usr/share/java/jakarta*/*
-rw-r--r-- 1 root root  45062 Jul 29 23:33 /usr/share/java/jakarta-activation/jakarta.activation-api.jar
-rw-r--r-- 1 root root  67376 Jul 29 23:33 /usr/share/java/jakarta-activation/jakarta.activation.jar
-rw-r--r-- 1 root root  24176 Aug 13 22:21 /usr/share/java/jakarta-annotations/jakarta.annotation-api.jar
-rw-r--r-- 1 root root  55011 Aug 17 15:03 /usr/share/java/jakarta-messaging/jakarta.jms-api.jar
-rw-r--r-- 1 root root 160454 Aug 17 15:14 /usr/share/java/jakarta-persistence/jakarta.persistence-api.jar
-rw-r--r-- 1 root root 397542 Aug 20 09:31 /usr/share/java/jakarta-servlet/jakarta.servlet-api.jar
-rw-r--r-- 1 root root 136987 Aug 17 14:46 /usr/share/java/jakarta-ws-rs/jakarta.ws.rs-api.jar
-rw-r--r-- 1 root root  55516 Aug 14 15:15 /usr/share/java/jakarta-xml-ws/jaxws-api.jar

Ahh, inexplicably pleasing :-D

Comment 9 Fabio Valentini 2020-08-20 11:04:01 UTC
Alright, let's not break the pattern.

Though I don't think that having %{name} as the default subdirectory name is a good idea (as witnessed by the painful process of renaming some packages and keeping backwards compatibility).

I've updated the files with the less concise but less magical version of %mvn_alias :-)

Comment 10 Mat Booth 2020-08-20 11:47:45 UTC
APPROVED

Comment 11 Fabio Valentini 2020-08-20 12:46:49 UTC
Thanks!

Comment 12 Igor Raits 2020-08-23 12:04:35 UTC
(fedscm-admin):  The Pagure repository was created at https://src.fedoraproject.org/rpms/jakarta-el


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