mojohaus/rpm-maven-plugin

Wrong RPM signed

Opened this issue · 0 comments

Setting the advanced parameter keyname leaves the RPM in the target directory unsigned, it only signs the one in the buildroot.

Here's the output from my build:

[INFO] 
[INFO] --- rpm-maven-plugin:2.2.1-SNAPSHOT:rpm (generate-rpm) @ ScreamingFrogTestApp ---
[WARNING] rpm version string truncated to 1.0
[INFO] Directory /tmp/screamingfrogtestapp/BUILD already exists. Deleting all contents.
[INFO] Directory /tmp/screamingfrogtestapp/RPMS already exists. Deleting all contents.
[INFO] Directory /tmp/screamingfrogtestapp/SOURCES already exists. Deleting all contents.
[INFO] Directory /tmp/screamingfrogtestapp/SPECS already exists. Deleting all contents.
[INFO] Directory /tmp/screamingfrogtestapp/SRPMS already exists. Deleting all contents.
[INFO] Directory /tmp/screamingfrogtestapp/tmp-buildroot already exists. Deleting all contents.
[INFO] Directory /tmp/screamingfrogtestapp/buildroot already exists. Deleting all contents.
[INFO] Copying files to /tmp/screamingfrogtestapp/tmp-buildroot/usr/bin
[INFO] Copying files to /tmp/screamingfrogtestapp/tmp-buildroot/usr/share/metainfo
[INFO] Copying files to /tmp/screamingfrogtestapp/tmp-buildroot/usr/share/screamingfrogtestapp/1.0-alpha-1/lib
[INFO] Copying files to /tmp/screamingfrogtestapp/tmp-buildroot/usr/share/screamingfrogtestapp/1.0-alpha-1/jre
[INFO] Copying files to /tmp/screamingfrogtestapp/tmp-buildroot/usr/share/screamingfrogtestapp/1.0-alpha-1
[INFO] Copying files to /tmp/screamingfrogtestapp/tmp-buildroot/usr/share/icons/hicolor
[INFO] Creating spec file /tmp/screamingfrogtestapp/SPECS/screamingfrogtestapp.spec
[INFO] About to execute '/bin/sh -c cd '/tmp/screamingfrogtestapp/SPECS' && 'rpmbuild' '-bb' '--target' 'x86_64-unknown-linux' '--buildroot' '/tmp/screamingfrogtestapp/buildroot' '--define' '_topdir /tmp/screamingfrogtestapp' '--define' '_build_name_fmt %%{ARCH}/%%{NAME}-%%{VERSION}-%%{RELEASE}.%%{ARCH}.rpm' '--define' '_builddir %{_topdir}/BUILD' '--define' '_rpmdir %{_topdir}/RPMS' '--define' '_sourcedir %{_topdir}/SOURCES' '--define' '_specdir %{_topdir}/SPECS' '--define' '_srcrpmdir %{_topdir}/SRPMS' 'screamingfrogtestapp.spec''
[INFO] Building target platforms: x86_64-unknown-linux
[INFO] Building for target x86_64-unknown-linux
[INFO] Executing(%install): /bin/sh -e /var/tmp/rpm-tmp.aDxJj9
[INFO] + umask 022
[INFO] + cd /tmp/screamingfrogtestapp/BUILD
[INFO] + /bin/rm -rf /tmp/screamingfrogtestapp/buildroot
[INFO] + /bin/mkdir -p /tmp/screamingfrogtestapp
[INFO] + /bin/mkdir /tmp/screamingfrogtestapp/buildroot
[INFO] + [ -d /tmp/screamingfrogtestapp/buildroot ]
[INFO] + mv /tmp/screamingfrogtestapp/tmp-buildroot/usr /tmp/screamingfrogtestapp/buildroot
[INFO] + /usr/lib/rpm/brp-compress /usr
[INFO] + /usr/lib/rpm/brp-elfperms
[INFO] + /usr/lib/rpm/brp-strip /usr/bin/strip
[INFO] + /usr/lib/rpm/brp-strip-static-archive /usr/bin/strip
[INFO] + /usr/lib/rpm/brp-strip-comment-note /usr/bin/strip /usr/bin/objdump
[INFO] + /usr/lib/rpm/brp-remove-la-files
[INFO] Processing files: screamingfrogtestapp-1.0-alpha_1_1.x86_64
[INFO] warning: Missing build-id in /tmp/screamingfrogtestapp/buildroot/usr/share/screamingfrogtestapp/1.0-alpha-1/jre/lib/jspawnhelper
[INFO] warning: Missing build-id in /tmp/screamingfrogtestapp/buildroot/usr/share/screamingfrogtestapp/1.0-alpha-1/jre/lib/jexec
[INFO] warning: Missing build-id in /tmp/screamingfrogtestapp/buildroot/usr/share/screamingfrogtestapp/1.0-alpha-1/jre/bin/javac
[INFO] warning: Missing build-id in /tmp/screamingfrogtestapp/buildroot/usr/share/screamingfrogtestapp/1.0-alpha-1/jre/bin/jhsdb
[INFO] warning: Missing build-id in /tmp/screamingfrogtestapp/buildroot/usr/share/screamingfrogtestapp/1.0-alpha-1/jre/bin/jmod
[INFO] warning: Missing build-id in /tmp/screamingfrogtestapp/buildroot/usr/share/screamingfrogtestapp/1.0-alpha-1/jre/bin/jdb
[INFO] warning: Missing build-id in /tmp/screamingfrogtestapp/buildroot/usr/share/screamingfrogtestapp/1.0-alpha-1/jre/bin/jshell
[INFO] warning: Missing build-id in /tmp/screamingfrogtestapp/buildroot/usr/share/screamingfrogtestapp/1.0-alpha-1/jre/bin/jfr
[INFO] warning: Missing build-id in /tmp/screamingfrogtestapp/buildroot/usr/share/screamingfrogtestapp/1.0-alpha-1/jre/bin/jar
[INFO] warning: Missing build-id in /tmp/screamingfrogtestapp/buildroot/usr/share/screamingfrogtestapp/1.0-alpha-1/jre/bin/jstat
[INFO] warning: Missing build-id in /tmp/screamingfrogtestapp/buildroot/usr/share/screamingfrogtestapp/1.0-alpha-1/jre/bin/jps
[INFO] warning: Missing build-id in /tmp/screamingfrogtestapp/buildroot/usr/share/screamingfrogtestapp/1.0-alpha-1/jre/bin/serialver
[INFO] warning: Missing build-id in /tmp/screamingfrogtestapp/buildroot/usr/share/screamingfrogtestapp/1.0-alpha-1/jre/bin/jstack
[INFO] warning: Missing build-id in /tmp/screamingfrogtestapp/buildroot/usr/share/screamingfrogtestapp/1.0-alpha-1/jre/bin/jdeps
[INFO] warning: Missing build-id in /tmp/screamingfrogtestapp/buildroot/usr/share/screamingfrogtestapp/1.0-alpha-1/jre/bin/jarsigner
[INFO] warning: Missing build-id in /tmp/screamingfrogtestapp/buildroot/usr/share/screamingfrogtestapp/1.0-alpha-1/jre/bin/jimage
[INFO] warning: Missing build-id in /tmp/screamingfrogtestapp/buildroot/usr/share/screamingfrogtestapp/1.0-alpha-1/jre/bin/jpackage
[INFO] warning: Missing build-id in /tmp/screamingfrogtestapp/buildroot/usr/share/screamingfrogtestapp/1.0-alpha-1/jre/bin/jcmd
[INFO] warning: Missing build-id in /tmp/screamingfrogtestapp/buildroot/usr/share/screamingfrogtestapp/1.0-alpha-1/jre/bin/jstatd
[INFO] warning: Missing build-id in /tmp/screamingfrogtestapp/buildroot/usr/share/screamingfrogtestapp/1.0-alpha-1/jre/bin/java
[INFO] warning: Missing build-id in /tmp/screamingfrogtestapp/buildroot/usr/share/screamingfrogtestapp/1.0-alpha-1/jre/bin/javadoc
[INFO] warning: Missing build-id in /tmp/screamingfrogtestapp/buildroot/usr/share/screamingfrogtestapp/1.0-alpha-1/jre/bin/jinfo
[INFO] warning: Missing build-id in /tmp/screamingfrogtestapp/buildroot/usr/share/screamingfrogtestapp/1.0-alpha-1/jre/bin/keytool
[INFO] warning: Missing build-id in /tmp/screamingfrogtestapp/buildroot/usr/share/screamingfrogtestapp/1.0-alpha-1/jre/bin/jrunscript
[INFO] warning: Missing build-id in /tmp/screamingfrogtestapp/buildroot/usr/share/screamingfrogtestapp/1.0-alpha-1/jre/bin/jdeprscan
[INFO] warning: Missing build-id in /tmp/screamingfrogtestapp/buildroot/usr/share/screamingfrogtestapp/1.0-alpha-1/jre/bin/javap
[INFO] warning: Missing build-id in /tmp/screamingfrogtestapp/buildroot/usr/share/screamingfrogtestapp/1.0-alpha-1/jre/bin/jlink
[INFO] warning: Missing build-id in /tmp/screamingfrogtestapp/buildroot/usr/share/screamingfrogtestapp/1.0-alpha-1/jre/bin/jmap
[INFO] warning: Missing build-id in /tmp/screamingfrogtestapp/buildroot/usr/share/screamingfrogtestapp/1.0-alpha-1/jre/bin/jconsole
[INFO] warning: Missing build-id in /tmp/screamingfrogtestapp/buildroot/usr/share/screamingfrogtestapp/1.0-alpha-1/jre/bin/rmiregistry
[INFO] Provides: screamingfrogtestapp = 1.0-alpha_1_1 screamingfrogtestapp(x86-64) = 1.0-alpha_1_1
[INFO] Requires(interp): /bin/sh /bin/sh
[INFO] Requires(rpmlib): rpmlib(CompressedFileNames) <= 3.0.4-1 rpmlib(FileDigests) <= 4.6.0-1 rpmlib(PayloadFilesHavePrefix) <= 4.0-1
[INFO] Requires(post): /bin/sh
[INFO] Requires(postun): /bin/sh
[INFO] Checking for unpackaged file(s): /usr/lib/rpm/check-files /tmp/screamingfrogtestapp/buildroot
[INFO] Wrote: /tmp/screamingfrogtestapp/RPMS/x86_64/screamingfrogtestapp-1.0-alpha_1_1.x86_64.rpm
[INFO] Executing(%clean): /bin/sh -e /var/tmp/rpm-tmp.I9QTCq
[INFO] Moving RPM
[INFO] + umask 022
[INFO] + cd /tmp/screamingfrogtestapp/BUILD
[INFO] + echo Moving RPM
[INFO] + cp -r /tmp/screamingfrogtestapp/RPMS/x86_64/. /home/parallels/git/screamingfrog/main/products/test-app/target/
[INFO] + echo Done
[INFO] + RPM_EC=0
[INFO] Done
[INFO] + jobs -p
[INFO] + exit 0
[INFO] *** Done
[INFO] About to execute signing '/bin/sh -c cd '/tmp/screamingfrogtestapp/RPMS/x86_64' && 'rpmsign' '--define' '_gpg_name Liam Sharp' '--addsign' 'screamingfrogtestapp-1.0-alpha_1_1.x86_64.rpm''
[WARNING] gpg: writing to 'screamingfrogtestapp-1.0-alpha_1_1.x86_64.rpm.sig'
[WARNING] gpg: RSA/SHA256 signature from: "AEA17D029C44945D Liam Sharp <liam.sharp@screamingfrog.co.uk>"
[INFO] screamingfrogtestapp-1.0-alpha_1_1.x86_64.rpm:
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  10.454 s
[INFO] Finished at: 2023-07-06T15:06:12+01:00
[INFO] ------------------------------------------------------------------------

This leaves the one in target unsigned:

rpm -qpi  products/test-app/target/screamingfrogtestapp-1.0-alpha_1_1.x86_64.rpm  | grep Sig
Signature   : (none)

and the one in /tmp/ signed:

rpm -qpi  /tmp/screamingfrogtestapp/RPMS/x86_64/screamingfrogtestapp-1.0-alpha_1_1.x86_64.rpm  | grep Sig
Signature   : RSA/SHA256, Thu Jul  6 15:06:11 2023, Key ID aea17d029c44945d