Skip to content

Commit

Permalink
patch to prevent conflicts with bloodhound-python package (#4442)
Browse files Browse the repository at this point in the history
  • Loading branch information
noraj authored Jan 6, 2025
1 parent 61c32aa commit 2d4a74c
Showing 1 changed file with 14 additions and 1 deletion.
15 changes: 14 additions & 1 deletion packages/bloodhound-python-ce/PKGBUILD
Original file line number Diff line number Diff line change
Expand Up @@ -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')
Expand All @@ -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"

Expand Down

0 comments on commit 2d4a74c

Please sign in to comment.