Closed mpi3d closed 2 years ago
Started test build 82596
But now that it works...
I can hazard a guess and say that it won't build.
If you have tested the patch locally though, I would be grateful if you could file a PR for it upstream so it gets in the next point release, which we could then pick up.
But now that it works...
I can hazard a guess and say that it won't build.
If you have tested the patch locally though, I would be grateful if you could file a PR for it upstream so it gets in the next point release, which we could then pick up.
I've tested that locally. And it works. Really.
I'll find another way to resolve this network issue.
I'll find another way to resolve this network issue.
Ideally gradle support would be added to the flatpak-builder-tools: https://github.com/flatpak/flatpak-builder-tools/issues/37 So that tarballs could be prefetched.
Build 82596 failed
Ok, so I thought that removing gradle -I gradle/support/fetchDependencies.gradle init
and download them manualy as described here would work. But it seems that gradle buildGhidra
also need network to download somes dependencies too.
We could download all dependences that Gradle needs and put them in the cache. But this is a very hacky method. Instead I'm proposing to fork the Ghidra repo to apply the patchs and setup an automated build bot that would release the Ghidra zip file. @hadess Maybe you have a better idea? We can also wait for Gradle to be supported by Flatpak Builder. But it doesn't seems to be supported any time soon.
Started test build 83473
I did found a more pleasant way to download dependencies using Flatpak Builder and then build with gradle
offline.
I also improved the patch
Build 83473 successful To test this build, install it from the testing repository:
flatpak install --user https://dl.flathub.org/build-repo/81340/org.ghidra_sre.Ghidra.flatpakref
Sounds like the build works fine! @hadess Is it ok for merging?
It will need reviewing. As a quick review, given the number of changes, the changes would need to be split up in as many commits as it makes sense, first adding the json files with the dependencies (and explaining how they were generated), updating the build system, adding the missing releases, etc. all in small, trivial, commits so that the review is easier.
Thanks for working on that!
Ok. I'll try to make that.
Started test build 83525
Build 83525 successful To test this build, install it from the testing repository:
flatpak install --user https://dl.flathub.org/build-repo/81390/org.ghidra_sre.Ghidra.flatpakref
I split this in multiples commits. Just ping me if you don't understand something.
Concerning the deps, for Ghidra (f3e4088ab26929ba48bc4a1be8d53f609429f007), I just followed the Ghidra Dev Guide and also fetchDependencies.gradle
.
For Gradle (3639edce785ebbc2232c7c0b444755ea3474d1e6) it was more hard. I had to run Gradle offline and add deps for each network error concerning dependences downloads. It sounds hacky but I don't think that Gradle support listing the deps for a project because it just resolve them at compile time.
Started test build 84486
Forgot to mention NationalSecurityAgency/ghidra#4107
Build 84486 successful To test this build, install it from the testing repository:
flatpak install --user https://dl.flathub.org/build-repo/82347/org.ghidra_sre.Ghidra.flatpakref
Started test build 84488
Build 84488 successful To test this build, install it from the testing repository:
flatpak install --user https://dl.flathub.org/build-repo/82349/org.ghidra_sre.Ghidra.flatpakref
@hadess This has been a long time. What's happening? Do I need to do something else?
@hadess This has been a long time. What's happening? Do I need to do something else?
I've been waiting for your updates on my review comments since the beginning of April, in particular, this one: https://github.com/flathub/org.ghidra_sre.Ghidra/pull/18#discussion_r836394197 which I can't merge your changes without, because it would then be impossible for me to update the dependencies.
Once you've reviewed all the comments, and as you fix them, please make sure to mark the threads as "resolved" along with a comment explaining how you fixed it (eg. whether you modified an existing commit, dropped a patch, or something else).
@hadess Oh, ok. I did forget to mark them as resolved. Sorry, I'm not an expert in Git.
I did resolve them all. https://github.com/flathub/org.ghidra_sre.Ghidra/pull/18#discussion_r836394197 is solved too.
Also, you should know that I will still be there after this merge. So in case of any future problem with dependencies I can help. You just need to contact me.
Tell me if there is something else to do.
I'll look at this on Monday, but I'm still not happy with the way gradle-dependencies.json
is generated. We need a better way to do this.
I don't think there is any better way to generate this. No one is providing such script:
Started test build 90463
Build 90463 successful To test this build, install it from the testing repository:
flatpak install --user https://dl.flathub.org/build-repo/88248/org.ghidra_sre.Ghidra.flatpakref
I don't think there is any better way to generate this. No one is providing such script:
* https://github.com/flathub/com.tonikelope.MegaBasterd/blob/master/maven-dependencies.yaml * https://github.com/flathub/es.estoes.wallpaperDownloader/blob/master/maven-dependencies.yaml
I made some notes at https://github.com/flatpak/flatpak-builder-tools/issues/37#issuecomment-1121368390
Can you please check whether this works? https://github.com/flatpak/flatpak-builder-tools/pull/276
You might need to declare the .exe
downloads separately.
Can you please check whether this works? flatpak/flatpak-builder-tools#276
You might need to declare the
.exe
downloads separately.
I'm on it
I made a script to generate gradle deps:
#!/usr/bin/env bash
git clone https://github.com/NationalSecurityAgency/ghidra.git -b Ghidra_10.1.2_build deps-build
cd deps-build
echo "source /usr/lib/sdk/openjdk11/enable.sh && gradle -g gradle-cache -I gradle/support/fetchDependencies.gradle init && rm -rf gradle-cache && gradle -g gradle-cache --info --console plain buildGhidra > gradle-log.txt" | flatpak run --share=network --filesystem=`pwd` --devel org.freedesktop.Sdk//21.08 < /dev/stdin
# wget {gradle script}
./flatpak-gradle-generator.py gradle-log.txt ../gradle-dependencies.json --destdir dependencies/flatRepo --arches linux-x86_64 linux-aarch_64
cd ..
rm -rf deps-build
I'm waiting for flatpak/flatpak-builder-tools#276 to be merged.
Started test build 90865
Build 90865 successful To test this build, install it from the testing repository:
flatpak install --user https://dl.flathub.org/build-repo/88647/org.ghidra_sre.Ghidra.flatpakref
Started test build 90870
Build 90870 failed
@hadess Sounds like the build failed because of an internal error.
bot, build
Queued test build for org.ghidra_sre.Ghidra.
Started test build 90872
Build 90872 successful To test this build, install it from the testing repository:
flatpak install --user https://dl.flathub.org/build-repo/88654/org.ghidra_sre.Ghidra.flatpakref
Better
bot, build
Queued test build for org.ghidra_sre.Ghidra.
I hope this is ok for the merge.
Started test build 90953
Build 90953 successful To test this build, install it from the testing repository:
flatpak install --user https://dl.flathub.org/build-repo/88732/org.ghidra_sre.Ghidra.flatpakref
Started test build 90981
Started test build 90983
I've reworked the commit messages and contents to my liking. I'll wait for the last 10.1.3 build to finish and will run a quick test. If all that passes, I'll push all this. Thanks very much for your help in getting all this updated.
After spending some time updating this Flatpak, I've managed to make it work with the latest Ghidra version.
This should solve #6, #12, #14, #15, #16, and also NationalSecurityAgency/ghidra#3726.
I changed many things: For exemple Ghidra is installed in
/app/ghidra
. I removedghidra.properties
options. Also I usecp
instead ofinstall
. Fell free to revert those changes. I've just cleaned all those things to make it work in a first place. But now that it works...