summarylogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.SRCINFO15
-rw-r--r--PKGBUILD48
-rwxr-xr-xghidra-root.desktop9
-rw-r--r--ghidra.policy19
4 files changed, 70 insertions, 21 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 1e386fcb0d48..feb8deba532f 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,21 +1,26 @@
pkgbase = ghidra-git
pkgdesc = Software reverse engineering framework (git)
- pkgver = 9.2.4+r796+gf19811622
+ pkgver = 10.0.BETA.r25.52d07a8e6
pkgrel = 1
url = https://www.nsa.gov/ghidra
arch = x86_64
license = Apache
makedepends = git
- makedepends = gradle6
+ makedepends = gradle
+ makedepends = java-environment=11
makedepends = unzip
- depends = java-runtime-common
- depends = jdk11-openjdk
+ depends = bash
+ depends = java-environment>=11
+ depends = polkit
provides = ghidra
conflicts = ghidra
source = git+https://github.com/NationalSecurityAgency/ghidra
source = ghidra.desktop
+ source = ghidra-root.desktop
+ source = ghidra.policy
sha512sums = SKIP
sha512sums = a85b8b3276e2ff4ed8bda6470c15d02711ebaa48463c775cd2a36549fad738e9fe073dab80f8c57646490ffc959cdc27e9d25b1dc2a5810b0ddb249b5dc99a9b
+ sha512sums = c717029cf31860e27b5563c3ff4b2740d4b1997bc50481214e24c38f12d9acbfa9ca2cbfe594d43071fbf8420ac8f022119c2c23ddef0c717d96860e22eb35c3
+ sha512sums = 0a35f58b1820ac65ce37d09b0a6904ab7018c773c73ecd29bcfda37cbd27f34af868585084b5cd408b1066b7956df043cb1573a1e3d890e173be737d2de51401
pkgname = ghidra-git
-
diff --git a/PKGBUILD b/PKGBUILD
index cacfdf376116..e98c6d13ba32 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -4,30 +4,36 @@
# Contributor: Danny Bautista <pyrolagus@gmail.com>
pkgname=ghidra-git
-pkgver=9.2.4+r796+gf19811622
+pkgver=10.0.BETA.r25.52d07a8e6
pkgrel=1
pkgdesc='Software reverse engineering framework (git)'
arch=('x86_64')
url='https://www.nsa.gov/ghidra'
license=(Apache)
-provides=(ghidra)
-conflicts=(ghidra)
+provides=('ghidra')
+conflicts=('ghidra')
depends=(
- 'java-runtime-common'
- 'jdk11-openjdk'
+ 'bash'
+ 'java-environment>=11'
+ 'polkit'
)
makedepends=(
'git'
- 'gradle6' # gradle>=7 is currently not supported
+ 'gradle'
+ 'java-environment=11'
'unzip'
)
source=(
"git+https://github.com/NationalSecurityAgency/ghidra"
- ghidra.desktop
+ 'ghidra.desktop'
+ 'ghidra-root.desktop'
+ 'ghidra.policy'
)
sha512sums=(
'SKIP'
'a85b8b3276e2ff4ed8bda6470c15d02711ebaa48463c775cd2a36549fad738e9fe073dab80f8c57646490ffc959cdc27e9d25b1dc2a5810b0ddb249b5dc99a9b'
+ 'c717029cf31860e27b5563c3ff4b2740d4b1997bc50481214e24c38f12d9acbfa9ca2cbfe594d43071fbf8420ac8f022119c2c23ddef0c717d96860e22eb35c3'
+ '0a35f58b1820ac65ce37d09b0a6904ab7018c773c73ecd29bcfda37cbd27f34af868585084b5cd408b1066b7956df043cb1573a1e3d890e173be737d2de51401'
)
_pkgname="${pkgname/-*/}"
_stop='\e[m'
@@ -35,16 +41,22 @@ _color="\e[33m"
_bold='\e[1m'
_prefix=" ${_bold}${_color}==>$_stop "
+
+
pkgver() {
cd "$_pkgname"
- git describe --tags | sed 's#Ghidra_##;s#_build##;s#-#+#g;s#+#+r#'
+ printf "%s" "$(git describe --tags | sed 's/Ghidra_\([^_]*\)_build/\1/;s/^v//;s/\([^-]*-\)g/r\1/;s/-/./g')"
}
prepare() {
cd "$_pkgname"
+ # DEPRECATED PATCH - GP-793 corrected missing IP info - https://github.com/NationalSecurityAgency/ghidra/commit/70675fce99a4c6e6e650729e5dda6ccbbbbbd40d
+# echo -e "${_prefix}[PATCH] - GP-793 corrected missing IP info (https://github.com/NationalSecurityAgency/ghidra/commit/70675fce99a4c6e6e650729e5dda6ccbbbbbd40d)"
+# patch --no-backup-if-mismatch --forward --strip=2 --input="${srcdir}/0000-GP-793-corrected-missing-IP-info.patch"
+
echo -e "${_prefix}Setting up the build dependencies"
- gradle6 --parallel --init-script gradle/support/fetchDependencies.gradle init
+ gradle --parallel --init-script gradle/support/fetchDependencies.gradle init
##
## FOR GHIDRA DEVELOPERS
@@ -53,22 +65,22 @@ prepare() {
##
# echo -e "${_prefix}Setting up the developers environment"
-# gradle6 --parallel prepDev
+# gradle --parallel prepDev
#
# echo -e "${_prefix}Setting up the eclipse configurations"
-# gradle6 --parallel eclipse
+# gradle --parallel eclipse
#
# echo -e "${_prefix}Compiling the linux64 native binaries"
-# gradle6 --parallel buildNatives_linux64
+# gradle --parallel buildNatives_linux64
#
# echo -e "${_prefix}Compiling the precompile language modules"
-# gradle6 --parallel sleighCompile
+# gradle --parallel sleighCompile
}
build() {
cd "$_pkgname"
echo -e "${_prefix}Building Ghidra"
- gradle6 --parallel buildGhidra
+ gradle --parallel buildGhidra
}
package() {
@@ -89,9 +101,13 @@ package() {
ln -s /opt/ghidra/ghidraRun "$pkgdir"/usr/bin/ghidra
ln -s /opt/ghidra/support/analyzeHeadless "$pkgdir"/usr/bin/ghidra-headless
- echo -e "${_prefix}Setting up desktop shortcut"
+ echo -e "${_prefix}Setting up desktop shortcuts"
install -Dm 644 ../ghidra.desktop -t "$pkgdir"/usr/share/applications
+ install -Dm 644 ../ghidra-root.desktop -t "$pkgdir"/usr/share/applications
echo -e "${_prefix}Setting up desktop icon"
- install -Dm 644 Ghidra/Framework/Generic/src/main/resources/images/GhidraIcon256.png "$pkgdir"/usr/share/pixmaps/ghidra.png
+ install -Dm 644 Ghidra/Framework/Generic/src/main/resources/images/GhidraIcon64.png "$pkgdir"/usr/share/pixmaps/ghidra.png
+
+ echo -e "${_prefix}Setting up policy file for the \"run as root\" desktop shortcut"
+ install -Dm 644 ../ghidra.policy -t "$pkgdir"/usr/share/polkit-1/actions
}
diff --git a/ghidra-root.desktop b/ghidra-root.desktop
new file mode 100755
index 000000000000..d808cdb24850
--- /dev/null
+++ b/ghidra-root.desktop
@@ -0,0 +1,9 @@
+[Desktop Entry]
+Version=1.0
+Type=Application
+Name=Ghidra (root)
+Comment=Software reverse engineering framework (Run as root)
+Exec=pkexec /opt/ghidra/ghidraRun
+Icon=ghidra
+Categories=Utility;
+Terminal=false
diff --git a/ghidra.policy b/ghidra.policy
new file mode 100644
index 000000000000..9e6a1cbb2932
--- /dev/null
+++ b/ghidra.policy
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE policyconfig PUBLIC
+ "-//freedesktop//DTD PolicyKit Policy Configuration 1.0//EN"
+ "http://www.freedesktop.org/software/polkit/policyconfig-1.dtd">
+<policyconfig>
+
+ <action id="org.archlinux.pkexec.ghidra">
+ <message>Authentication is required to run Ghidra as root</message>
+ <icon_name>ghidra</icon_name>
+ <defaults>
+ <allow_any>auth_admin</allow_any>
+ <allow_inactive>auth_admin</allow_inactive>
+ <allow_active>auth_admin</allow_active>
+ </defaults>
+ <annotate key="org.freedesktop.policykit.exec.path">/opt/ghidra/ghidraRun</annotate>
+ <annotate key="org.freedesktop.policykit.exec.allow_gui">true</annotate>
+ </action>
+
+</policyconfig>