Bug 1971512 - Review Request: jigawatts - Java CRIU helper
Summary: Review Request: jigawatts - Java CRIU helper
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: Package Review
Version: rawhide
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Severin Gehwolf
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2021-06-14 08:42 UTC by jiri vanek
Modified: 2021-07-17 01:50 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2021-07-17 01:38:00 UTC
Type: ---
Embargoed:
jerboaa: fedora-review+


Attachments (Terms of Use)
Script to properly smoke test the jigawatts package (4.68 KB, application/x-shellscript)
2021-07-01 14:09 UTC, Severin Gehwolf
no flags Details
Script to properly smoke test the jigawatts package (4.95 KB, application/x-shellscript)
2021-07-02 09:29 UTC, Severin Gehwolf
no flags Details

Description jiri vanek 2021-06-14 08:42:40 UTC
Spec URL: https://jvanek.fedorapeople.org/jiggawats-fedora/jigawatts.spec
SRPM URL: https://jvanek.fedorapeople.org/jiggawats-fedora/jigawatts-0-0.0.pre.1.c15dd4c19e81cbcefe419a99ebaa3af7c5c60c5e.fc33.src.rpm
Description: CRIU is a Linux utility that allows the checkpointing and restoring of processes. You can read more about CRIU at criu.org. CRIU for Java is a package which makes it more convenient to use CRIU from Java.
Fedora Account System Username: jvanek

Comment 1 jiri vanek 2021-06-16 15:36:36 UTC
Made criu-devel runtime depndece:

Spec URL: https://jvanek.fedorapeople.org/jiggawats-fedora/jigawatts.spec
SRPM URL: https://jvanek.fedorapeople.org/jiggawats-fedora/jigawatts-0-0.0.pre.1.c15dd4c19e81cbcefe419a99ebaa3af7c5c60c5e.fc33.src.rpm
Description: CRIU is a Linux utility that allows the checkpointing and restoring of processes. You can read more about CRIU at criu.org. CRIU for Java is a package which makes it more convenient to use CRIU from Java.
Fedora Account System Username: jvanek

Comment 2 Severin Gehwolf 2021-06-24 17:28:13 UTC
Please set flag 'fedora-review' => ?

Comment 3 Severin Gehwolf 2021-06-29 13:44:11 UTC
Package Review
==============

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

Issues:
=======
- JNI shared objects MUST be placed in %{_libdir}/%{name}. See:
  https://docs.fedoraproject.org/en-US/packaging-guidelines/Java/#JNI
  Right now the JNI so file is embedded in the jar.
- Please remove RH internal content from the spec. There are two
  comments pointing to internal resources. Its not clear how relevant
  this is.
- Why the criu-devel *runtime* dependency?
- The source URL doesn't seem to work
  $ spectool --gf -S jigawatts.spec
  Downloading: https://github.com/chflood/jigawatts/archive/jigawatts-c15dd4c19e81cbcefe419a99ebaa3af7c5c60c5e.zip
  Download failed:
  404 Client Error: Not Found for url: https://codeload.github.com/chflood/jigawatts/zip/jigawatts-c15dd4c19e81cbcefe419a99ebaa3af7c5c60c5e  -   0.0 B Elapsed Time: 0:00:00            
- The latest tagged upstream version is 0.1-alpha, Fedora's version
  should use a similar scheme. It's currently using
  '0-0.0.pre.1.c15dd4c19e81cbcefe419a99ebaa3af7c5c60c5e' version.


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

C/C++:
[x]: Package does not contain kernel modules.
[x]: Package contains no static executables.
[x]: If your application is a C or C++ application you must list a
     BuildRequires against gcc, gcc-c++ or clang.
[x]: Package does not contain any libtool archives (.la)
[x]: Rpath absent or only used for internal libs.

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.
[?]: License file installed when any subpackage combination is installed.
[-]: %build honors applicable compiler flags or justifies otherwise.
[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.
[!]: Requires correct, justified where necessary.
     Why does jiggawatts depend on criu-devel? Isn't criu sufficient?
[x]: Spec file is legible and written in American English.
[-]: Package contains systemd file(s) if in need.
[!]: Useful -debuginfo package or justification otherwise.
     I believe the shared (JNI) library should have -debuginfo.
[x]: Package is not known to require an ExcludeArch tag.
[x]: 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.
[!]: 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:
[!]: Sources can be downloaded from URI in Source: tag
     Note: Could not download Source0:
     https://github.com/chflood/jigawatts/archive/jigawatts-c15dd4c19e81cbcefe419a99ebaa3af7c5c60c5e.zip
     See: https://docs.fedoraproject.org/en-US/packaging-
     guidelines/SourceURL/
[-]: 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).
[?]: Package functions as described.
[x]: Latest version is packaged.
[x]: Package does not include license text files separate from upstream.
[x]: SourceX tarball generation or download is documented.
[?]: 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.
[!]: Package should compile and build into binary rpms on all supported
     architectures.
     Please provide a link to a scratch build
[-]: %check is present and all tests pass.
[?]: Packages should try to preserve timestamps of original installed
     files.
[!]: Spec use %global instead of %define unless justified.
     Note: %define requiring justification: %define debug_package %{nil}
[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]: SourceX is a working URL.

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

Generic:
[?]: Large data in /usr/share should live in a noarch subpackage if package
     is arched.
[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: jigawatts-0-0.0.pre.1.c15dd4c19e81cbcefe419a99ebaa3af7c5c60c5e.fc35.x86_64.rpm
          jigawatts-javadoc-0-0.0.pre.1.c15dd4c19e81cbcefe419a99ebaa3af7c5c60c5e.fc35.x86_64.rpm
          jigawatts-0-0.0.pre.1.c15dd4c19e81cbcefe419a99ebaa3af7c5c60c5e.fc35.src.rpm
jigawatts.x86_64: E: devel-dependency criu-devel
jigawatts.x86_64: W: spelling-error %description -l en_US checkpointing -> check pointing, check-pointing, checkpoint
jigawatts.x86_64: W: spelling-error %description -l en_US criu -> uric, crib, curium
jigawatts.x86_64: E: description-line-too-long C CRIU is a Linux utility that allows the checkpointing and restoring of processes. You can read more about CRIU at criu.org. CRIU for Java is a package which makes it more convenient to use CRIU from Java.
jigawatts.x86_64: W: incoherent-version-in-changelog 0.0.1.0-SNAPSHOT ['0-0.0.pre.1.c15dd4c19e81cbcefe419a99ebaa3af7c5c60c5e.fc35', '0-0.0.pre.1.c15dd4c19e81cbcefe419a99ebaa3af7c5c60c5e']
jigawatts.x86_64: E: no-binary
jigawatts.x86_64: W: only-non-binary-in-usr-lib
jigawatts.src: W: spelling-error %description -l en_US checkpointing -> check pointing, check-pointing, checkpoint
jigawatts.src: W: spelling-error %description -l en_US criu -> uric, crib, curium
jigawatts.src: E: description-line-too-long C CRIU is a Linux utility that allows the checkpointing and restoring of processes. You can read more about CRIU at criu.org. CRIU for Java is a package which makes it more convenient to use CRIU from Java.
jigawatts.src:15: W: mixed-use-of-spaces-and-tabs (spaces: line 2, tab: line 15)
jigawatts.src: W: invalid-url Source0: https://github.com/chflood/jigawatts/archive/jigawatts-c15dd4c19e81cbcefe419a99ebaa3af7c5c60c5e.zip HTTP Error 404: Not Found
3 packages and 0 specfiles checked; 4 errors, 8 warnings.




Requires
--------
jigawatts (rpmlib, GLIBC filtered):
    (java-headless or java-11-headless)
    criu-devel
    java-headless
    javapackages-filesystem

jigawatts-javadoc (rpmlib, GLIBC filtered):
    javapackages-filesystem



Provides
--------
jigawatts:
    jigawatts
    jigawatts(x86-64)
    mvn(org.openjdk:jigawatt)
    mvn(org.openjdk:jigawatt:pom:)

jigawatts-javadoc:
    jigawatts-javadoc
    jigawatts-javadoc(x86-64)

Comment 4 jiri vanek 2021-06-29 20:20:52 UTC
> - JNI shared objects MUST be placed in %{_libdir}/%{name}. See:
>   https://docs.fedoraproject.org/en-US/packaging-guidelines/Java/#JNI

quoting:
"Java programs that wish to make calls into native libraries do so via the Java Native Interface (JNI). A Java package uses JNI if it contains a .so file. Note that this file can be embedded within JAR files themselves."
!Note that this file can be embedded within JAR files themselves.!

>   Right now the JNI so file is embedded in the jar.
> - Please remove RH internal content from the spec. There are two
>   comments pointing to internal resources. Its not clear how relevant
>   this is.

Thanx. They both are very relevant, and probably the best would be to summ them up in github readme.MD

> - Why the criu-devel *runtime* dependency?

Right. It is indeed runtime dependence(thats why it is so highlighted), as according to Christine, it is not only header file, but the connector to the criu. I was not investigating more on this topic.
> - The source URL doesn't seem to work
>   $ spectool --gf -S jigawatts.spec
>   Downloading:
> https://github.com/chflood/jigawatts/archive/jigawatts-
> c15dd4c19e81cbcefe419a99ebaa3af7c5c60c5e.zip
>   Download failed:
>   404 Client Error: Not Found for url:
> https://codeload.github.com/chflood/jigawatts/zip/jigawatts-
> c15dd4c19e81cbcefe419a99ebaa3af7c5c60c5e  -   0.0 B Elapsed Time: 0:00:00   

Sorry, the {uname} macro slipped in. Correct url is https://github.com/chflood/jigawatts/archive/c15dd4c19e81cbcefe419a99ebaa3af7c5c60c5e.zip Will fix.

I hope there will be new tag soon. The tagged version is unusable right now.

Comment 5 jiri vanek 2021-06-29 20:28:31 UTC
> [!]: Requires correct, justified where necessary.
>      Why does jiggawatts depend on criu-devel? Isn't criu sufficient?

I'm folloing usptream i this decission. Will add comment.

> [x]: Spec file is legible and written in American English.
> [-]: Package contains systemd file(s) if in need.
> [!]: Useful -debuginfo package or justification otherwise.
>      I believe the shared (JNI) library should have -debuginfo.

I had failed to generate debuginfo for embedded jar. 
 * I have to extract the so from jar - most likely in upstream maven files
 * or to generate debuginfo for embedded jar, which I do nto know how.

In both cases, it is long run.

> [x]: Package is not known to require an ExcludeArch tag.
> [x]: 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.
> [!]: Package complies to the Packaging Guidelines

I must complain - the very same doc you posted as contraindication, I had used as approval: >   https://docs.fedoraproject.org/en-US/packaging-guidelines/Java/#JNI

quoting:
"Java programs that wish to make calls into native libraries do so via the Java Native Interface (JNI). A Java package uses JNI if it contains a .so file. Note that this file can be embedded within JAR files themselves."
!Note that this file can be embedded within JAR files themselves.!

Anyway, we will find a consensus



> 
> Generic:
> [!]: Sources can be downloaded from URI in Source: tag
>      Note: Could not download Source0:

Yas. Unhappy overlook. Will be fixed.
>     
> https://github.com/chflood/jigawatts/archive/jigawatts-
> c15dd4c19e81cbcefe419a99ebaa3af7c5c60c5e.zip
>      See: https://docs.fedoraproject.org/en-US/packaging-
>      guidelines/SourceURL/
> [-]: 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).

As above, unless there is more then criu-devel.

> [?]: Package functions as described.

todo :) But it does something.


> [!]: Package should compile and build into binary rpms on all supported
>      architectures.
>      Please provide a link to a scratch build

Sure! https://koji.fedoraproject.org/koji/taskinfo?taskID=71043006

> [-]: %check is present and all tests pass.
> [?]: Packages should try to preserve timestamps of original installed
>      files.
> [!]: Spec use %global instead of %define unless justified.
>      Note: %define requiring justification: %define debug_package %{nil}

That is to skip debuginfo stripping on non-noarch pkg.


Tahnx a lot for eyball!

Comment 6 jiri vanek 2021-06-29 21:19:42 UTC
> > [!]: Package should compile and build into binary rpms on all supported
> >      architectures.
> >      Please provide a link to a scratch build
> 
> Sure! https://koji.fedoraproject.org/koji/taskinfo?taskID=71043006


The failure on aarch64 is unexpected!

Comment 7 Severin Gehwolf 2021-06-30 08:46:28 UTC
(In reply to jiri vanek from comment #4)
> > - JNI shared objects MUST be placed in %{_libdir}/%{name}. See:
> >   https://docs.fedoraproject.org/en-US/packaging-guidelines/Java/#JNI
> 
> quoting:
> "Java programs that wish to make calls into native libraries do so via the
> Java Native Interface (JNI). A Java package uses JNI if it contains a .so
> file. Note that this file can be embedded within JAR files themselves."
> !Note that this file can be embedded within JAR files themselves.!

This is from the "Applicability" section of the guidelines. I.e. how do I know whether or not a jar uses JNI. I'm working on a patch to not embed the JNI .so file and will keep you posted.

Comment 8 Severin Gehwolf 2021-06-30 08:51:03 UTC
(In reply to jiri vanek from comment #4)
> > - Why the criu-devel *runtime* dependency?
> 
> Right. It is indeed runtime dependence(thats why it is so highlighted), as
> according to Christine, it is not only header file, but the connector to the
> criu. I was not investigating more on this topic.

Well, it may be a *build* dependency, but my suspicion on why a runtime dep on criu-devel is needed is likely for the unversioned libcriu.so link so that System.loadLibrary("criu") works. If that's the case, it's not a good reason. We should be able to work around this limitation by using the versioned .so instead and depend only on criu-libs. I am looking into that too.

Comment 9 Severin Gehwolf 2021-06-30 09:09:16 UTC
(In reply to jiri vanek from comment #6)
> > > [!]: Package should compile and build into binary rpms on all supported
> > >      architectures.
> > >      Please provide a link to a scratch build
> > 
> > Sure! https://koji.fedoraproject.org/koji/taskinfo?taskID=71043006
> 
> 
> The failure on aarch64 is unexpected!

Two observations:

1.) It looks like java.library.path is wrong on aarch64 JDK 11 builds. It should
    include /usr/lib64 instead of /usr/lib. That's an OpenJDK bug. See bug 1977671.
2.) criu is not available for i686 so this package will have the same limitation.
    I.e. exclude arch i686

Comment 10 Severin Gehwolf 2021-06-30 16:40:57 UTC
(In reply to Severin Gehwolf from comment #9)
> 1.) It looks like java.library.path is wrong on aarch64 JDK 11 builds. It should
>     include /usr/lib64 instead of /usr/lib. That's an OpenJDK bug. See bug 1977671.

The work-around for this is to set LD_LIBRARY_PATH=/usr/lib64 prior to running the maven build on aarch64. Users will have to do the same when running jigawatts on aarch64 until the OpenJDK bug is fixed.

Comment 11 Severin Gehwolf 2021-06-30 19:04:29 UTC
Here is an SRPM which does proper installing of the .so JNI into %{_libdir},
produces proper debuginfo packages and doesn't *runtime* require criu-devel.

https://jerboaa.fedorapeople.org/rpm/jigawatts-0-0.0.pre.1.c15dd4c19e81cbcefe419a99ebaa3af7c5c60c5e.fc34.src.rpm

<mock-chroot> sh-5.1# rpm -ql jigawatts
/usr/lib/.build-id
/usr/lib/.build-id/1b
/usr/lib/.build-id/1b/10e64b7db2bbab054561633027911a0d27dd2e
/usr/lib/java/jigawatts
/usr/lib/java/jigawatts/jigawatt.jar
/usr/lib64/libJigawatts.so
/usr/share/doc/jigawatts
/usr/share/doc/jigawatts/README.md
/usr/share/licenses/jigawatts
/usr/share/licenses/jigawatts/LICENSE.md
/usr/share/maven-metadata/jigawatts.xml
/usr/share/maven-poms/jigawatts
/usr/share/maven-poms/jigawatts/jigawatt.pom

The aarch64 problem is not fixed, yet, though.

This works for me for a basic checkpoint/restore test.

Comment 12 Severin Gehwolf 2021-06-30 19:05:22 UTC
Please continue with this. Thanks!

Comment 13 Severin Gehwolf 2021-07-01 10:02:10 UTC
(In reply to Severin Gehwolf from comment #11)
> The aarch64 problem is not fixed, yet, though.

The latest version of the SRPM here:
https://jerboaa.fedorapeople.org/rpm/jigawatts-0-0.0.pre.1.c15dd4c19e81cbcefe419a99ebaa3af7c5c60c5e.fc34.src.rpm

... works around the aarch64 build failure.

https://koji.fedoraproject.org/koji/taskinfo?taskID=71125678

with:


# Work-around for RHBZ#1977671, /usr/lib64 missing on default java.library.path on aarch64
%ifarch %{aarch64}
%pom_xpath_inject "pom:build/pom:plugins/pom:plugin[pom:artifactId='maven-surefire-plugin']/pom:configuration" '<forkCount>1</forkCount>
        <environmentVariables>
            <LD_LIBRARY_PATH>/usr/lib64:${project.build.directory}</LD_LIBRARY_PATH>
        </environmentVariables>'
%else
%pom_xpath_inject "pom:build/pom:plugins/pom:plugin[pom:artifactId='maven-surefire-plugin']/pom:configuration" '<forkCount>1</forkCount>
        <environmentVariables>
            <LD_LIBRARY_PATH>${project.build.directory}</LD_LIBRARY_PATH>
        </environmentVariables>'
%endif

Comment 14 jiri vanek 2021-07-01 10:16:08 UTC
(In reply to Severin Gehwolf from comment #7)
> (In reply to jiri vanek from comment #4)
> > > - JNI shared objects MUST be placed in %{_libdir}/%{name}. See:
> > >   https://docs.fedoraproject.org/en-US/packaging-guidelines/Java/#JNI
> > 
> > quoting:
> > "Java programs that wish to make calls into native libraries do so via the
> > Java Native Interface (JNI). A Java package uses JNI if it contains a .so
> > file. Note that this file can be embedded within JAR files themselves."
> > !Note that this file can be embedded within JAR files themselves.!
> 
> This is from the "Applicability" section of the guidelines. I.e. how do I
> know whether or not a jar uses JNI. I'm working on a patch to not embed the
> JNI .so file and will keep you posted.

Ok. If you inisits, will be done.

(In reply to Severin Gehwolf from comment #8)
> (In reply to jiri vanek from comment #4)
> > > - Why the criu-devel *runtime* dependency?
> > 
> > Right. It is indeed runtime dependence(thats why it is so highlighted), as
> > according to Christine, it is not only header file, but the connector to the
> > criu. I was not investigating more on this topic.
> 
> Well, it may be a *build* dependency, but my suspicion on why a runtime dep
> on criu-devel is needed is likely for the unversioned libcriu.so link so
> that System.loadLibrary("criu") works. If that's the case, it's not a good
> reason. We should be able to work around this limitation by using the
> versioned .so instead and depend only on criu-libs. I am looking into that
> too.

Thanx a lot. 

(In reply to Severin Gehwolf from comment #9)
> (In reply to jiri vanek from comment #6)
> > > > [!]: Package should compile and build into binary rpms on all supported
> > > >      architectures.
> > > >      Please provide a link to a scratch build
> > > 
> > > Sure! https://koji.fedoraproject.org/koji/taskinfo?taskID=71043006
> > 
> > 
> > The failure on aarch64 is unexpected!
> 
> Two observations:
> 
> 1.) It looks like java.library.path is wrong on aarch64 JDK 11 builds. It
> should
>     include /usr/lib64 instead of /usr/lib. That's an OpenJDK bug. See bug
> 1977671.

Thanx!

> 2.) criu is not available for i686 so this package will have the same
> limitation.
>     I.e. exclude arch i686

Yup. I was aware. Thus mentioned only aarch64 as unexpected.

(In reply to Severin Gehwolf from comment #10)
> (In reply to Severin Gehwolf from comment #9)
> > 1.) It looks like java.library.path is wrong on aarch64 JDK 11 builds. It should
> >     include /usr/lib64 instead of /usr/lib. That's an OpenJDK bug. See bug 1977671.
> 
> The work-around for this is to set LD_LIBRARY_PATH=/usr/lib64 prior to
> running the maven build on aarch64. Users will have to do the same when
> running jigawatts on aarch64 until the OpenJDK bug is fixed.

Will be done.

(In reply to Severin Gehwolf from comment #11)
> Here is an SRPM which does proper installing of the .so JNI into %{_libdir},
> produces proper debuginfo packages and doesn't *runtime* require criu-devel.
> 
> https://jerboaa.fedorapeople.org/rpm/jigawatts-0-0.0.pre.1.
> c15dd4c19e81cbcefe419a99ebaa3af7c5c60c5e.fc34.src.rpm
> 
> <mock-chroot> sh-5.1# rpm -ql jigawatts
> /usr/lib/.build-id
> /usr/lib/.build-id/1b
> /usr/lib/.build-id/1b/10e64b7db2bbab054561633027911a0d27dd2e
> /usr/lib/java/jigawatts
> /usr/lib/java/jigawatts/jigawatt.jar
> /usr/lib64/libJigawatts.so
> /usr/share/doc/jigawatts
> /usr/share/doc/jigawatts/README.md
> /usr/share/licenses/jigawatts
> /usr/share/licenses/jigawatts/LICENSE.md
> /usr/share/maven-metadata/jigawatts.xml
> /usr/share/maven-poms/jigawatts
> /usr/share/maven-poms/jigawatts/jigawatt.pom
> 
> The aarch64 problem is not fixed, yet, though.
> 
> This works for me for a basic checkpoint/restore test.

Ok. THat is some proactive review. Thanx a lot! Will discuse posibilities of usptreaming this change.

(In reply to Severin Gehwolf from comment #12)
> Please continue with this. Thanks!

sure!

(In reply to Severin Gehwolf from comment #13)
> (In reply to Severin Gehwolf from comment #11)
> > The aarch64 problem is not fixed, yet, though.
> 
> The latest version of the SRPM here:
> https://jerboaa.fedorapeople.org/rpm/jigawatts-0-0.0.pre.1.
> c15dd4c19e81cbcefe419a99ebaa3af7c5c60c5e.fc34.src.rpm
> 
> ... works around the aarch64 build failure.
> 
> https://koji.fedoraproject.org/koji/taskinfo?taskID=71125678
> 
> with:
> 
> 
> # Work-around for RHBZ#1977671, /usr/lib64 missing on default
> java.library.path on aarch64
> %ifarch %{aarch64}
> %pom_xpath_inject
> "pom:build/pom:plugins/pom:plugin[pom:artifactId='maven-surefire-plugin']/
> pom:configuration" '<forkCount>1</forkCount>
>         <environmentVariables>
>            
> <LD_LIBRARY_PATH>/usr/lib64:${project.build.directory}</LD_LIBRARY_PATH>
>         </environmentVariables>'
> %else
> %pom_xpath_inject
> "pom:build/pom:plugins/pom:plugin[pom:artifactId='maven-surefire-plugin']/
> pom:configuration" '<forkCount>1</forkCount>
>         <environmentVariables>
>             <LD_LIBRARY_PATH>${project.build.directory}</LD_LIBRARY_PATH>
>         </environmentVariables>'
> %endif


Thanx a lot :) it is unexpected help.

Comment 16 jiri vanek 2021-07-01 13:49:41 UTC
Spec URL: https://jvanek.fedorapeople.org/jiggawats-fedora/v2/jigawatts.spec
SRPM URL: https://jvanek.fedorapeople.org/jiggawats-fedora/v2/jigawatts-0-0.0.pre.2.c15dd4c19e81cbcefe419a99ebaa3af7c5c60c5e.fc33.src.rpm
Description: CRIU is a Linux utility that allows the checkpointing and restoring of processes. You can read more about CRIU at criu.org. CRIU for Java is a package which makes it more convenient to use CRIU from Java.
Fedora Account System Username: jvanek


koji build --scratch f35 jigawatts-0-0.0.pre.2.c15dd4c19e81cbcefe419a99ebaa3af7c5c60c5e.fc33.src.rpm 
Uploading srpm: jigawatts-0-0.0.pre.2.c15dd4c19e81cbcefe419a99ebaa3af7c5c60c5e.fc33.src.rpm
[====================================] 100% 00:00:00  20.69 KiB  74.05 KiB/sec
Created task: 71135288
Task info: https://koji.fedoraproject.org/koji/taskinfo?taskID=71135288
Watching tasks (this may be safely interrupted)...
71135288 build (f35, jigawatts-0-0.0.pre.2.c15dd4c19e81cbcefe419a99ebaa3af7c5c60c5e.fc33.src.rpm): free
  71135400 buildArch (jigawatts-0-0.0.pre.2.c15dd4c19e81cbcefe419a99ebaa3af7c5c60c5e.fc35.src.rpm, armv7hl): free
  71135401 buildArch (jigawatts-0-0.0.pre.2.c15dd4c19e81cbcefe419a99ebaa3af7c5c60c5e.fc35.src.rpm, x86_64): free
  71135403 buildArch (jigawatts-0-0.0.pre.2.c15dd4c19e81cbcefe419a99ebaa3af7c5c60c5e.fc35.src.rpm, ppc64le): free
  71135404 buildArch (jigawatts-0-0.0.pre.2.c15dd4c19e81cbcefe419a99ebaa3af7c5c60c5e.fc35.src.rpm, s390x): free
  71135402 buildArch (jigawatts-0-0.0.pre.2.c15dd4c19e81cbcefe419a99ebaa3af7c5c60c5e.fc35.src.rpm, aarch64): free
...
  0 free  0 open  7 done  0 failed
71135288 build (f35, jigawatts-0-0.0.pre.2.c15dd4c19e81cbcefe419a99ebaa3af7c5c60c5e.fc33.src.rpm) completed successfully

Comment 18 Severin Gehwolf 2021-07-01 14:09:52 UTC
Created attachment 1796816 [details]
Script to properly smoke test the jigawatts package

Comment 19 Severin Gehwolf 2021-07-01 15:06:43 UTC
Please use a better version scheme. Currently we have (uversion is very long. too long, in fact[1]):

Version: 0
Release: 0.0.pre.2.%{uversion}%{?dist}

Upstream's latest tag is: v0.1-alpha. That's an unsortable version, but we could do a bit better than just calling it 0. I see a 0.1 in there.

I suggest calling it 0.2 (for next upstream version) and following the snapshot versioning scheme here:
https://docs.fedoraproject.org/en-US/packaging-guidelines/Versioning/#_snapshots

So something like this:

Version: 0.2
Release: 0.1.20210701gitc15dd4c%{?dist}

where 'c15dd4c' is output of `git rev-parse --short <sha>` of the revision packaged. Then we get changelog entries like that:

* Thu Jul 1 2021 Jiri Vanek <jvanek> - 0.2-0.1.20210701gitc15dd4c

Thanks!

[1] $ echo 0.0.pre.1.c15dd4c19e81cbcefe419a99ebaa3af7c5c60c5e | wc -c
    51
    So it's 51 chars long where only 25 characters are recommended by guidelines.
    https://docs.fedoraproject.org/en-US/packaging-guidelines/Versioning/#_snapshots

Comment 20 Severin Gehwolf 2021-07-01 15:40:50 UTC
Issues:
=======
- Please remove RH internal content from the spec. There are two
  comments pointing to internal resources. Its not clear how relevant
  this is.
- The source URL doesn't seem to work
  $ spectool --gf -S jigawatts.spec
  Downloading: https://github.com/chflood/jigawatts/archive/jigawatts-c15dd4c19e81cbcefe419a99ebaa3af7c5c60c5e.zip
  Download failed:
  404 Client Error: Not Found for url: https://codeload.github.com/chflood/jigawatts/zip/jigawatts-c15dd4c19e81cbcefe419a99ebaa3af7c5c60c5e  -   0.0 B Elapsed Time: 0:00:00            
- The latest tagged upstream version is 0.1-alpha, Fedora's version
  should use a similar scheme. It's currently using
  '0-0.0.pre.1.c15dd4c19e81cbcefe419a99ebaa3af7c5c60c5e' version.

These issues remain to be fixed.

Plus this one:

warning: bogus date in %changelog: Thu Jul 11 2021 Jiri Vanek <jvanek> - 0-0.0.pre.2.

Comment 22 Severin Gehwolf 2021-07-01 15:56:23 UTC
jigawatts.x86_64: E: explicit-lib-dependency criu-libs
jigawatts.x86_64: E: description-line-too-long C CRIU is a Linux utility that allows the checkpointing and restoring of processes. You can read more about CRIU at criu.org. CRIU for Java is a package which makes it more convenient to use CRIU from Java.
jigawatts.x86_64: W: incoherent-version-in-changelog 0-0.0.pre.2. ['0-0.0.pre.2.c15dd4c19e81cbcefe419a99ebaa3af7c5c60c5e.fc35', '0-0.0.pre.2.c15dd4c19e81cbcefe419a99ebaa3af7c5c60c5e']
jigawatts.x86_64: E: changelog-time-in-future 2021-07-11
jigawatts-javadoc.x86_64: E: changelog-time-in-future 2021-07-11
jigawatts-debuginfo.x86_64: E: changelog-time-in-future 2021-07-11
jigawatts-debugsource.x86_64: E: changelog-time-in-future 2021-07-11
jigawatts.src: E: description-line-too-long C CRIU is a Linux utility that allows the checkpointing and restoring of processes. You can read more about CRIU at criu.org. CRIU for Java is a package which makes it more convenient to use CRIU from Java.

--^ these should get fixed too.

For the first one it seems it's now obsolete by since the JNI so is "visible" now and the auto-requires does its job properly so the explicit "Requires: criu-libs" can get dropped.

Once you fix those issues I'll approve the review.

Comment 23 jiri vanek 2021-07-01 16:46:58 UTC
Spec URL: hhttps://jvanek.fedorapeople.org/jiggawats-fedora/v3/jigawatts.spec
SRPM URL: https://jvanek.fedorapeople.org/jiggawats-fedora/v3/jigawatts-0.2-0.1.20210701c15dd4c.fc33.src.rpm
Description: CRIU is a Linux utility that allows the checkpointing and restoring of processes. You can read more about CRIU at criu.org. CRIU for Java is a package which makes it more convenient to use CRIU from Java.
Fedora Account System Username: jvanek


 rpmlint   /home/jvanek/rpmbuild/RPMS/x86_64/jigawatts-debugsource-0.2-0.1.20210701c15dd4c.fc33.x86_64.rpm  /home/jvanek/rpmbuild/RPMS/x86_64/jigawatts-0.2-0.1.20210701c15dd4c.fc33.x86_64.rpm  /home/jvanek/rpmbuild/RPMS/x86_64/jigawatts-debuginfo-0.2-0.1.20210701c15dd4c.fc33.x86_64.rpm  /home/jvanek/rpmbuild/RPMS/x86_64/jigawatts-javadoc-0.2-0.1.20210701c15dd4c.fc33.x86_64.rpm /home/jvanek/rpmbuild/SRPMS/jigawatts-0.2-0.1.20210701c15dd4c.fc33.src.rpm jigawatts.spec 
jigawatts.x86_64: W: spelling-error %description -l en_US checkpointing -> check pointing, check-pointing, checkpoint
jigawatts.x86_64: W: spelling-error %description -l en_US criu -> uric, crib, curium
jigawatts.x86_64: W: no-soname /usr/lib64/libJigawatts.so
jigawatts.src: W: spelling-error %description -l en_US checkpointing -> check pointing, check-pointing, checkpoint
jigawatts.src: W: spelling-error %description -l en_US criu -> uric, crib, curium
5 packages and 1 specfiles checked; 0 errors, 5 warnings.

libcriu.so.2 correctly autorequired


Task info: https://koji.fedoraproject.org/koji/taskinfo?taskID=71142736
...
 0 free  0 open  7 done  0 failed
=>
jigawatts-0.2-0.1.20210701c15dd4c.fc35.x86_64.rpm
jigawatts-debuginfo-0.2-0.1.20210701c15dd4c.fc35.x86_64.rpm
jigawatts-debugsource-0.2-0.1.20210701c15dd4c.fc35.x86_64.rpm
jigawatts-javadoc-0.2-0.1.20210701c15dd4c.fc35.x86_64.rpm 
...


Actually sorry for that long hash. In all my pakcages I'm shorting it down to 7, telling it to everybody during review, and not doing it here..

TY for review!

Comment 24 jiri vanek 2021-07-01 16:47:30 UTC
fixing spec url
Spec URL: https://jvanek.fedorapeople.org/jiggawats-fedora/v3/jigawatts.spec
SRPM URL: https://jvanek.fedorapeople.org/jiggawats-fedora/v3/jigawatts-0.2-0.1.20210701c15dd4c.fc33.src.rpm
Description: CRIU is a Linux utility that allows the checkpointing and restoring of processes. You can read more about CRIU at criu.org. CRIU for Java is a package which makes it more convenient to use CRIU from Java.
Fedora Account System Username: jvanek

Comment 25 jiri vanek 2021-07-01 17:10:57 UTC
I noted:
- Development (unversioned) .so files in -devel subpackage, if present.
  Note: Unversioned so-files directly in %_libdir.
  See: https://docs.fedoraproject.org/en-US/packaging-
  guidelines/#_devel_packages

In review. Shouldn't it be fxed? I guess it means to mv libJigawats.so libJigawats.so.0   
Thougts?

Comment 26 Severin Gehwolf 2021-07-01 17:18:48 UTC
(In reply to jiri vanek from comment #25)
> I noted:
> - Development (unversioned) .so files in -devel subpackage, if present.
>   Note: Unversioned so-files directly in %_libdir.
>   See: https://docs.fedoraproject.org/en-US/packaging-
>   guidelines/#_devel_packages
> 
> In review. Shouldn't it be fxed? I guess it means to mv libJigawats.so
> libJigawats.so.0   
> Thougts?

This is fine for a JNI so file, IMHO.

Comment 27 Severin Gehwolf 2021-07-02 09:29:06 UTC
Created attachment 1797100 [details]
Script to properly smoke test the jigawatts package

Fixed the smoke test script (verify two stdout output files get created)

Comment 28 Severin Gehwolf 2021-07-02 09:31:30 UTC
This looks good now. Thanks for your patience. Reviewed!


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

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

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

C/C++:
[x]: Package does not contain kernel modules.
[x]: Package contains no static executables.
[x]: If your application is a C or C++ application you must list a
     BuildRequires against gcc, gcc-c++ or clang.
[x]: Package does not contain any libtool archives (.la)
[x]: Rpath absent or only used for internal libs.

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.
[?]: License file installed when any subpackage combination is installed.
[-]: %build honors applicable compiler flags or justifies otherwise.
[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.
[x]: Useful -debuginfo package or justification otherwise.
[x]: Package is not known to require an ExcludeArch tag.
[x]: 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]: Sources can be downloaded from URI in Source: tag
[-]: 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.
[x]: Package functions as described.
     Tested on a F34 rebuild on local system using the smoke test script
     from the review bug.
[x]: Latest version is packaged.
[x]: Package does not include license text files separate from upstream.
[x]: SourceX tarball generation or download is documented.
[?]: 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.
[?]: Packages should try to preserve timestamps of original installed
     files.
[x]: Spec use %global instead of %define unless justified.
[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]: SourceX is a working URL.

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

Generic:
[x]: Rpmlint is run on all installed packages.
     Note: There are rpmlint messages. Those should be fine to ignore.
[x]: Spec file according to URL is the same as in SRPM.


Rpmlint
-------
Checking: jigawatts-0.2-0.1.20210701c15dd4c.fc35.x86_64.rpm jigawatts-0.2-0.1.20210701c15dd4c.fc35.src.rpm jigawatts-javadoc-0.2-0.1.20210701c15dd4c.fc35.x86_64.rpm jigawatts-debuginfo-0.2-0.1.20210701c15dd4c.fc35.x86_64.rpm 
jigawatts.x86_64: W: spelling-error %description -l en_US checkpointing -> check pointing, check-pointing, checkpoint
jigawatts.x86_64: W: spelling-error %description -l en_US criu -> uric, crib, curium
jigawatts.x86_64: W: no-soname /usr/lib64/libJigawatts.so
jigawatts.src: W: spelling-error %description -l en_US checkpointing -> check pointing, check-pointing, checkpoint
jigawatts.src: W: spelling-error %description -l en_US criu -> uric, crib, curium
4 packages and 0 specfiles checked; 0 errors, 5 warnings.

Requires
--------
jigawatts (rpmlib, GLIBC filtered):
(java-headless or java-11-headless)
java-headless
javapackages-filesystem
libcriu.so.2()(64bit)


jigawatts-javadoc (rpmlib, GLIBC filtered):
    javapackages-filesystem



Provides
--------
jigawatts:

jigawatts = 0.2-0.1.20210701c15dd4c.fc35
jigawatts(x86-64) = 0.2-0.1.20210701c15dd4c.fc35
libJigawatts.so()(64bit)
mvn(org.openjdk:jigawatt) = 1.0.SNAPSHOT
mvn(org.openjdk:jigawatt:pom:) = 1.0.SNAPSHOT

jigawatts-javadoc:

jigawatts-javadoc = 0.2-0.1.20210701c15dd4c.fc35
jigawatts-javadoc(x86-64) = 0.2-0.1.20210701c15dd4c.fc35

Comment 29 Severin Gehwolf 2021-07-02 09:34:33 UTC
$ bash jigawatts-smoke-test.sh 

path = [..]/reviews/1971512-jigawatts/smoketest/jigawatts-smoke-test
Successful dump
RestoreTheWorld: file = [..]/reviews/1971512-jigawatts/smoketest/jigawatts-smoke-test fd = 6
Successful dump
Smoke tests PASSED!
$ rpm -q jigawatts
jigawatts-0.2-0.1.20210701c15dd4c.fc34.x86_64

Comment 30 jiri vanek 2021-07-02 11:20:01 UTC
$ fedpkg request-repo jigawatts 1971512  
https://pagure.io/releng/fedora-scm-requests/issue/35431
$ fedpkg request-branch --repo jigawatts --all-releases
https://pagure.io/releng/fedora-scm-requests/issue/35432
https://pagure.io/releng/fedora-scm-requests/issue/35433

Comment 31 Tomas Hrcka 2021-07-02 13:00:36 UTC
(fedscm-admin):  The Pagure repository was created at https://src.fedoraproject.org/rpms/jigawatts

Comment 33 Fedora Update System 2021-07-08 11:32:27 UTC
FEDORA-2021-66729b8ce9 has been submitted as an update to Fedora 33. https://bodhi.fedoraproject.org/updates/FEDORA-2021-66729b8ce9

Comment 34 Fedora Update System 2021-07-08 11:32:28 UTC
FEDORA-2021-cbc3e0c118 has been submitted as an update to Fedora 34. https://bodhi.fedoraproject.org/updates/FEDORA-2021-cbc3e0c118

Comment 35 Fedora Update System 2021-07-09 01:52:38 UTC
FEDORA-2021-cbc3e0c118 has been pushed to the Fedora 34 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --advisory=FEDORA-2021-cbc3e0c118`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2021-cbc3e0c118

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 36 Fedora Update System 2021-07-09 01:54:53 UTC
FEDORA-2021-66729b8ce9 has been pushed to the Fedora 33 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --advisory=FEDORA-2021-66729b8ce9`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2021-66729b8ce9

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 37 Fedora Update System 2021-07-17 01:38:00 UTC
FEDORA-2021-cbc3e0c118 has been pushed to the Fedora 34 stable repository.
If problem still persists, please make note of it in this bug report.

Comment 38 Fedora Update System 2021-07-17 01:50:01 UTC
FEDORA-2021-66729b8ce9 has been pushed to the Fedora 33 stable repository.
If problem still persists, please make note of it in this bug report.


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