Open
Description
Describe the bug
rpm task fails on fedora 40 due to rpmbuild is setting arch as fc40.x86_64
To Reproduce
- build on fedora
$ ./gradlew linux64
> Task :linux64.min FAILED
FAILURE: Build failed with an exception.
* Where:
Build file '/home/alberto/projects/java/ipscan/build.gradle' line: 223
* What went wrong:
Execution failed for task ':linux64.min'.
> Warning: Could not find file /home/alberto/projects/java/ipscan/build/libs/rpm/RPMS/x86_64/ipscan-3.9.1.9.gff097334-1.x86_64.rpm to copy.
that file do not exists. Showing here the difference:
/home/alberto/projects/java/ipscan/build/libs/rpm/RPMS/x86_64/ipscan-3.9.1.9.gff097334-1.x86_64.rpm
/home/alberto/projects/java/ipscan/build/libs/rpm/RPMS/x86_64/ipscan-3.9.1.9.gff097334-1.fc40.x86_64.rpm
I solved with a regex match, not sure if rpmbuild can be setup to avoid that fedora specific "arch"
diff --git a/build.gradle b/build.gradle
index 9606a90f..d0a31904 100644
--- a/build.gradle
+++ b/build.gradle
@@ -220,7 +220,9 @@ def rpm(def platform, def arch) {
ant.replacefilter(token: "VERSION", value: version)
}
exec(new String[] {"sh", "-c", "rpmbuild --target ${arch} --define \"_topdir ${new File(dist).absolutePath}\" --define \"platform ${platform}\" -bb SPECS/ipscan.spec"}, dist)
- ant.move(file: "${dist}/RPMS/${arch}/ipscan-${rpmVersion}-1.${arch}.rpm", todir:'build/libs')
+ ant.move(todir:'build/libs') {
+ ant.fileset(file: "${dist}/RPMS/${arch}/ipscan-${rpmVersion}-1.*${arch}.rpm")
+ }
ant.delete(dir: dist)
}
Expected behavior
build on fedora
Versions (please copy from the About dialog or complete manually):
- Version of Angry IP Scanner: master
- OS, version, CPU architecture: linux fedora 40
- java version:
openjdk version "21.0.3" 2024-04-16
OpenJDK Runtime Environment (Red_Hat-21.0.3.0.9-1) (build 21.0.3+9)
OpenJDK 64-Bit Server VM (Red_Hat-21.0.3.0.9-1) (build 21.0.3+9, mixed mode, sharing)
Metadata
Metadata
Assignees
Labels
No labels