From 381814ef8606aea4ee8b7f698380aec1f393a682 Mon Sep 17 00:00:00 2001 From: noraj Date: Tue, 7 Jan 2025 00:21:47 +0100 Subject: [PATCH] patch to prevent conflicts with bloodhound-python package --- packages/bloodhound-python-ce/PKGBUILD | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/packages/bloodhound-python-ce/PKGBUILD b/packages/bloodhound-python-ce/PKGBUILD index 55dfe61bed6..44bf551e6ae 100644 --- a/packages/bloodhound-python-ce/PKGBUILD +++ b/packages/bloodhound-python-ce/PKGBUILD @@ -4,7 +4,7 @@ pkgname=bloodhound-ce-python _pkgname=BloodHound.py pkgver=v1.0.1.r182.g3def775 -pkgrel=1 +pkgrel=2 pkgdesc='Python data collector for Bloodhound community edition (v5)' arch=('any') groups=('blackarch' 'blackarch-recon' 'blackarch-windows') @@ -22,6 +22,19 @@ pkgver() { git describe --long | sed 's/\([^-]*-g\)/r\1/;s/-/./g' } +prepare() { + cd "$_pkgname" + + # prevent conflicts with bloodhound-python package + # workaround patch until solved upstream https://github.com/dirkjanm/BloodHound.py/issues/206 + mv bloodhound/ bloodhound_ce/ + sed -i -E "s/'(bloodhound)(|\..+)'/'\1_ce\2'/g" setup.py # for the 4 packages=[] lines + sed -i "s/=bloodhound:/=bloodhound_ce:/g" setup.py # for the console_scripts line + # rename all import + find bloodhound_ce/ -type f -name '*.py' -exec sed -i 's/import bloodhound/import bloodhound_ce/g' {} \+ \ + -exec sed -i 's/from bloodhound/from bloodhound_ce/g' {} \+ +} + build() { cd "$_pkgname"