## The following tests may fail on Ubuntu18.04
------------------------------
tools/jpackage/linux/AppCategoryTest.java: jpackage with --linux-app-category
tools/jpackage/linux/LicenseTypeTest.java: jpackage with --linux-rpm-license-type
tools/jpackage/linux/LinuxBundleNameTest.java: jpackage with --linux-package-name
tools/jpackage/linux/PackageDepsTest.java: jpackage with --linux-package-deps
tools/jpackage/linux/ReleaseTest.java: jpackage with --linux-app-release
tools/jpackage/linux/ShortcutHintTest.java#id0: jpackage with --linux-shortcut
tools/jpackage/share/AdditionalLaunchersTest.java: jpackage with --add-launcher
tools/jpackage/share/AppImagePackageTest.java: jpackage with --app-image
tools/jpackage/share/FileAssociationsTest.java: jpackage with --file-associations
tools/jpackage/share/InstallDirTest.java#id0: jpackage with --install-dir
tools/jpackage/share/LicenseTest.java#id0: jpackage with --license-file
tools/jpackage/share/LicenseTest.java#id1: jpackage with --license-file
tools/jpackage/share/RuntimePackageTest.java: jpackage with --runtime-image
tools/jpackage/share/SimplePackageTest.java: Simple jpackage command run
tools/jpackage/share/jdk/jpackage/tests/BasicTest.java: jpackage basic testing
------------------------------
## Reproduce
1. Install rpm on Ubuntu18.04
------------------------------
sudo apt install rpm
------------------------------
2. Run
------------------------------
Ben="tools/jpackage/share/SimplePackageTest.java"
make test TEST="${Ben}" CONF=server-release
------------------------------
## Symptom
------------------------------
Running [rpm, -q, --queryformat, %{name}\n, -q, --whatprovides, /lib/x86_64-linux-gnu/libc.so.6]
file /lib/x86_64-linux-gnu/libc.so.6 is not owned by any package
java.io.IOException: Command [rpm, -q, --queryformat, %{name}\n, -q, --whatprovides, /lib/x86_64-linux-gnu/libc.so.6] exited with 1 code
at jdk.incubator.jpackage/jdk.incubator.jpackage.internal.Executor.executeExpectSuccess(Executor.java:68)
at jdk.incubator.jpackage/jdk.incubator.jpackage.internal.LinuxRpmBundler.lambda$initLibProvidersLookup$7(LinuxRpmBundler.java:187)
at jdk.incubator.jpackage/jdk.incubator.jpackage.internal.LibProvidersLookup.lambda$execute$1(LibProvidersLookup.java:67)
at java.base/java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:195)
at java.base/java.util.HashMap$KeySpliterator.forEachRemaining(HashMap.java:1694)
at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:484)
at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:474)
at java.base/java.util.stream.ReduceOps$ReduceOp.evaluateSequential(ReduceOps.java:913)
at java.base/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
at java.base/java.util.stream.ReferencePipeline.collect(ReferencePipeline.java:578)
at jdk.incubator.jpackage/jdk.incubator.jpackage.internal.LibProvidersLookup.execute(LibProvidersLookup.java:78)
at jdk.incubator.jpackage/jdk.incubator.jpackage.internal.LinuxPackageBundler.getListOfNeededPackages(LinuxPackageBundler.java:188)
at jdk.incubator.jpackage/jdk.incubator.jpackage.internal.LinuxPackageBundler.createDefaultReplacementData(LinuxPackageBundler.java:214)
at jdk.incubator.jpackage/jdk.incubator.jpackage.internal.LinuxPackageBundler.execute(LinuxPackageBundler.java:144)
at jdk.incubator.jpackage/jdk.incubator.jpackage.internal.Arguments.generateBundle(Arguments.java:628)
at jdk.incubator.jpackage/jdk.incubator.jpackage.internal.Arguments.processArguments(Arguments.java:514)
at jdk.incubator.jpackage/jdk.incubator.jpackage.main.Main.execute(Main.java:97)
at jdk.incubator.jpackage/jdk.incubator.jpackage.main.Main.main(Main.java:51)
...
TRACE: assertEquals(0): Check command [rpm -qp -R ./test/output/simplepackagetest-1.0-1.x86_64.rpm](4) exited with 0 code
ERROR: Failed: Check [libc] package is in the list of required packages [/bin/sh, /bin/sh, rpmlib(CompressedFileNames) <= 3.0.4-1, rpmlib(FileDigests) <= 4.6.0-1, rpmlib(PayloadFilesHavePrefix) <= 4.0-1] of [simplepackagetest] package
[ FAILED ] SimplePackageTest.test; checks=24
[==========] 1 tests ran
[ PASSED ] 0 tests
[ FAILED ] 1 test, listed below
[ FAILED ] SimplePackageTest.test; workDir=[./test]
1 FAILED TEST
STDERR:
WARNING: Using incubator modules: jdk.incubator.jpackage
WARNING: Using incubator modules: jdk.incubator.jpackage
WARNING: Using incubator modules: jdk.incubator.jpackage
java.lang.AssertionError: Failed: Check [libc] package is in the list of required packages [/bin/sh, /bin/sh, rpmlib(CompressedFileNames) <= 3.0.4-1, rpmlib(FileDigests) <= 4.6.0-1, rpmlib(PayloadFilesHavePrefix) <= 4.0-1] of [simplepackagetest] package
at jdk.jpackage.test.TKit.error(TKit.java:238)
at jdk.jpackage.test.TKit.assertTrue(TKit.java:610)
at jdk.jpackage.test.TKit.assertTrue(TKit.java:597)
at jdk.jpackage.test.LinuxHelper.verifyPackageBundleEssential(LinuxHelper.java:217)
at jdk.jpackage.test.PackageTest$Handler.verifyPackageBundle(PackageTest.java:381)
at jdk.jpackage.test.PackageTest$Handler.accept(PackageTest.java:360)
at jdk.jpackage.test.PackageTest.lambda$run$19(PackageTest.java:298)
at java.base/java.util.ArrayList.forEach(ArrayList.java:1510)
at jdk.jpackage.test.PackageTest.run(PackageTest.java:298)
at SimplePackageTest.test(SimplePackageTest.java:59)
...
------------------------------