Using
--license-file license.txt
results in the following error :
java.io.IOException: Exec failed with code 1 command [[rpmbuild, -bb, /home/oco/rpm_demo/temp/images/linux-rpm.image/SwingSet2_Demo.spec, --define, %_sourcedir /home/goco/rpm_demo/temp/images/linux-rpm.image, --define, %_rpmdir /home/goco/rpm_demo/output, --define, %_topdir /home/oco/rpm_demo/temp/rmpbuildroot] in /home/oco/rpm_demo/temp/images/linux-rpm.image output: Executing(%prep): /bin/sh -e /var/tmp/rpm-tmp.XbteGN+ umask 022+ cd /home/oco/rpm_demo/temp/rmpbuildroot/BUILD+ exit 0Executing(%build): /bin/sh -e /var/tmp/rpm-tmp.49zWN1+ umask 022+ cd /home/oco/rpm_demo/temp/rmpbuildroot/BUILD+ exit 0Executing(%install): /bin/sh -e /var/tmp/rpm-tmp.3b0TVf+ umask 022+ cd /home/oco/rpm_demo/temp/rmpbuildroot/BUILD+ '[' /home/oco/rpm_demo/temp/rmpbuildroot/BUILDROOT/swingset-2.0.11-1.x86_64 '!=' / ']'+ rm -rf /home/oco/rpm_demo/temp/rmpbuildroot/BUILDROOT/swingset-2.0.11-1.x86_64++ dirname /home/oco/rpm_demo/temp/rmpbuildroot/BUILDROOT/swingset-2.0.11-1.x86_64+ mkdir -p /home/oco/rpm_demo/temp/rmpbuildroot/BUILDROOT+ mkdir /home/oco/rpm_demo/temp/rmpbuildroot/BUILDROOT/swingset-2.0.11-1.x86_64+ rm -rf /home/oco/rpm_demo/temp/rmpbuildroot/BUILDROOT/swingset-2.0.11-1.x86_64+ mkdir -p /home/oco/rpm_demo/temp/rmpbuildroot/BUILDROOT/swingset-2.0.11-1.x86_64/opt+ cp -r /home/oco/rpm_demo/temp/images/linux-rpm.image/SwingSet2_Demo /home/oco/rpm_demo/temp/rmpbuildroot/BUILDROOT/swingset-2.0.11-1.x86_64/opt+ install -d -m 755 /home/oco/rpm_demo/temp/rmpbuildroot/BUILDROOT/swingset-2.0.11-1.x86_64/usr/share/licenses/swingset-2.0.11+ install -m 644 license.txt /home/oco/rpm_demo/temp/rmpbuildroot/BUILDROOT/swingset-2.0.11-1.x86_64/usr/share/licenses/swingset-2.0.11/license.txtinstall: cannot stat 'license.txt': No such file or directoryerror: Bad exit status from /var/tmp/rpm-tmp.3b0TVf (%install)RPM build errors: Bad exit status from /var/tmp/rpm-tmp.3b0TVf (%install)
Changing it to a an absolute path resolves it.
So we should internally pass an absolute path to whatever tools require it since CWD seems to be changed.
--license-file license.txt
results in the following error :
java.io.IOException: Exec failed with code 1 command [[rpmbuild, -bb, /home/oco/rpm_demo/temp/images/linux-rpm.image/SwingSet2_Demo.spec, --define, %_sourcedir /home/goco/rpm_demo/temp/images/linux-rpm.image, --define, %_rpmdir /home/goco/rpm_demo/output, --define, %_topdir /home/oco/rpm_demo/temp/rmpbuildroot] in /home/oco/rpm_demo/temp/images/linux-rpm.image output: Executing(%prep): /bin/sh -e /var/tmp/rpm-tmp.XbteGN+ umask 022+ cd /home/oco/rpm_demo/temp/rmpbuildroot/BUILD+ exit 0Executing(%build): /bin/sh -e /var/tmp/rpm-tmp.49zWN1+ umask 022+ cd /home/oco/rpm_demo/temp/rmpbuildroot/BUILD+ exit 0Executing(%install): /bin/sh -e /var/tmp/rpm-tmp.3b0TVf+ umask 022+ cd /home/oco/rpm_demo/temp/rmpbuildroot/BUILD+ '[' /home/oco/rpm_demo/temp/rmpbuildroot/BUILDROOT/swingset-2.0.11-1.x86_64 '!=' / ']'+ rm -rf /home/oco/rpm_demo/temp/rmpbuildroot/BUILDROOT/swingset-2.0.11-1.x86_64++ dirname /home/oco/rpm_demo/temp/rmpbuildroot/BUILDROOT/swingset-2.0.11-1.x86_64+ mkdir -p /home/oco/rpm_demo/temp/rmpbuildroot/BUILDROOT+ mkdir /home/oco/rpm_demo/temp/rmpbuildroot/BUILDROOT/swingset-2.0.11-1.x86_64+ rm -rf /home/oco/rpm_demo/temp/rmpbuildroot/BUILDROOT/swingset-2.0.11-1.x86_64+ mkdir -p /home/oco/rpm_demo/temp/rmpbuildroot/BUILDROOT/swingset-2.0.11-1.x86_64/opt+ cp -r /home/oco/rpm_demo/temp/images/linux-rpm.image/SwingSet2_Demo /home/oco/rpm_demo/temp/rmpbuildroot/BUILDROOT/swingset-2.0.11-1.x86_64/opt+ install -d -m 755 /home/oco/rpm_demo/temp/rmpbuildroot/BUILDROOT/swingset-2.0.11-1.x86_64/usr/share/licenses/swingset-2.0.11+ install -m 644 license.txt /home/oco/rpm_demo/temp/rmpbuildroot/BUILDROOT/swingset-2.0.11-1.x86_64/usr/share/licenses/swingset-2.0.11/license.txtinstall: cannot stat 'license.txt': No such file or directoryerror: Bad exit status from /var/tmp/rpm-tmp.3b0TVf (%install)RPM build errors: Bad exit status from /var/tmp/rpm-tmp.3b0TVf (%install)
Changing it to a an absolute path resolves it.
So we should internally pass an absolute path to whatever tools require it since CWD seems to be changed.