Created attachment 235525 [details] Update to version 4.0.5 Update to version 4.0.5. Git diff attached. Additional git commands: git rm files/patch-doc_Makefile git rm files/patch-doc_source___templates_indexcontent.html git rm files/patch-doc_source___util_cql.py git add files/patch-bin_cqlsh git add files/patch-test_conf_cassandra-murmur.yaml git add files/patch-test_conf_cassandra-seeds.yaml git add files/patch-test_conf_unit-test-conf_test-native-port.yaml The updated maven repo must be manually copied to distfiles for patch testing and uploaded to LOCAL as part of the commit process. It is available at the following link: https://drive.google.com/file/d/12sW-bAXUmEQCYxuT3viNq5nT8X5_QBJU
(In reply to Angelo Polo from comment #0) Thanks very much for the patch! While adding that maven repo file is of course fine and what we did for a long time, I'm thinking if it is possible for ports using maven repo can do something like yarn: https://cgit.freebsd.org/ports/tree/net-mgmt/chronograf/Makefile or go-post-fetch for GO_MODULE: https://cgit.freebsd.org/ports/tree/Mk/Uses/go.mk ?
No longer having to compile the maven repo beforehand would be nice, though recent improvements in the Cassandra build have made this less onerous than it used to be. I've worked to copy the technique used by chronograf, and it basically works, except the distinfo checksums of the repo don't match for any two invocations even though using a diff tool on the expanded archives shows no differences. The work in progress is here: https://github.com/polo-language/cassandra4/tree/mvn-pre-fetch Maybe need to modify file timestamps or something before tarring the repository (already modifying text timestamps within the files). If anyone has any ideas... otherwise maybe we could consider downloading the repo in fetch separately so that the update to 4.0.5 isn't held up indefinitely.
I have created a GitHub pull request to address the reproducibility of the repo archive. (achieves identical sha256 on different runs) https://github.com/polo-language/cassandra4/pull/2
(In reply to Lapo Luchini from comment #3) Thanks Lapo. I tried to tested your solution but didn't get that far because I've run into the separate problem that in a poudriere build, ant doesn't seem to be available at fetch time. This is different from the yarn example given in comment #1 because in that case, yarn is in FETCH_DEPENDS, whereas here we've got USE_ANT. Maybe ANT can also be included in FETCH_DEPENDS. This will require investigation.
I've set up `poudriere`, and this seems to work nicely: FETCH_DEPENDS= ${LOCALBASE}/bin/ant:devel/apache-ant (I inspired it to BUILD_DEPENDS from Mk/bsd.java.mk)
I've done further experiments here: https://github.com/polo-language/cassandra4/pull/3 (also, attempting upgrade to 4.1)
This branch is now (mostly) working on poudriere using pre-fetch… we agreed with Angelo Polo to upgrade to 4.0.5 (4.0.8 actually) first and then try 4.1 later. There is still one very strange error sometimes: pre-fetch creates the tar, then immediately after the just produced files doesn't get found and the build errors out. I don't know why that happens (and especially since that happens only sometimes). This branch could be potentially committable (or near that phase): https://github.com/polo-language/cassandra4/pull/2 If anyone has ideas regarding the sometimes-error, feel free to chime in. :)
Created attachment 242052 [details] Update to version 4.0.8 Patch updated to 4.0.8 and tested as working on poudriere.
Lapo's update looks good to me.
A commit in branch main references this bug: URL: https://cgit.FreeBSD.org/ports/commit/?id=678ef46e3abc2e8d6720bbb2eb60002294975cdf commit 678ef46e3abc2e8d6720bbb2eb60002294975cdf Author: Lapo Luchini <lapo@lapo.it> AuthorDate: 2023-05-15 21:23:57 +0000 Commit: Guido Falsi <madpilot@FreeBSD.org> CommitDate: 2023-05-15 21:23:57 +0000 databases/cassandra4: Update to 4.0.8 - Add pre-fetch target to download Maven dependencies to avoid network access during build PR: 265478 Approved by: Angelo Polo <language.devel@gmail.com> (maintainer) databases/cassandra4/Makefile | 52 +- databases/cassandra4/distinfo | 18 +- databases/cassandra4/files/cassandra.in | 9 +- .../cassandra4/files/maven/build-owasp.xml (new) | 86 + .../cassandra4/files/maven/build-rat.xml (new) | 105 + .../files/maven/build-resolver.xml (new) | 262 +++ .../files/maven/build.properties.default (new) | 4 + databases/cassandra4/files/maven/build.xml (new) | 2174 ++++++++++++++++++++ databases/cassandra4/files/patch-bin_cqlsh (new) | 11 + databases/cassandra4/files/patch-build.xml | 179 +- .../cassandra4/files/patch-conf_cassandra.yaml | 19 +- .../cassandra4/files/patch-doc_Makefile (gone) | 23 - ...doc_source___templates_indexcontent.html (gone) | 17 - .../files/patch-doc_source___util_cql.py (gone) | 10 - ...rc_java_org_apache_cassandra_config_Config.java | 4 +- ...e_cassandra_service_NativeTransportService.java | 4 +- ...org_apache_cassandra_service_StartupChecks.java | 2 +- ..._apache_cassandra_utils_FastByteOperations.java | 24 +- .../patch-test_conf_cassandra-murmur.yaml (new) | 10 + .../patch-test_conf_cassandra-seeds.yaml (new) | 10 + ...conf_unit-test-conf_test-native-port.yaml (new) | 10 + databases/cassandra4/pkg-plist | 114 +- 22 files changed, 2840 insertions(+), 307 deletions(-)
Patch committed. Thanks!