guardicore / monkey

Infection Monkey - An open-source adversary emulation platform
https://www.guardicore.com/infectionmonkey/
GNU General Public License v3.0
6.56k stars 765 forks source link

Debian package missing python-dev dependency #121

Closed giantcow closed 6 years ago

giantcow commented 6 years ago

Expected Behavior

$ sudo dpkg -i monkey_island.deb
(Reading database ... 54114 files and directories currently installed.)
Preparing to unpack monkey_island.deb ...
Unpacking gc-monkey-island (1.0) over (1.0) ...
Setting up gc-monkey-island (1.0) ...
Requirement already satisfied: virtualenv in /usr/local/lib/python2.7/dist-packages
Running virtualenv with interpreter /usr/bin/python2.7
New python executable in /var/monkey_island/bin/python/bin/python2.7
Also creating executable in /var/monkey_island/bin/python/bin/python
Installing setuptools, pip, wheel...done.
Looking in links: file:///var/monkey_island/installation
...
Monkey Island installation ended

Actual Behavior

...

building 'netifaces' extension x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fno-strict-aliasing -Wdate-time -D_FORTIFY_SOURCE=2 -g -fdebug-prefix-map=/build/python2.7-2.7.13=. -fstack-protector-strong -Wformat -Werror=format-security -fPIC -DNETIFACES_VERSION=0.10.6 -DHAVE_GETIFADDRS=1 -DHAVE_GETNAMEINFO=1 -DHAVE_NETASH_ASH_H=1 -DHAVE_NETATALK_AT_H=1 -DHAVE_NETAX25_AX25_H=1 -DHAVE_NETECONET_EC_H=1 -DHAVE_NETIPX_IPX_H=1 -DHAVE_NETPACKET_PACKET_H=1 -DHAVE_LINUX_IRDA_H=1 -DHAVE_LINUX_ATM_H=1 -DHAVE_LINUX_LLC_H=1 -DHAVE_LINUX_TIPC_H=1 -DHAVE_LINUX_DN_H=1 -DHAVE_SOCKADDR_AT=1 -DHAVE_SOCKADDR_AX25=1 -DHAVE_SOCKADDR_IN=1 -DHAVE_SOCKADDR_IN6=1 -DHAVE_SOCKADDR_IPX=1 -DHAVE_SOCKADDR_UN=1 -DHAVE_SOCKADDR_ASH=1 -DHAVE_SOCKADDR_EC=1 -DHAVE_SOCKADDR_LL=1 -DHAVE_SOCKADDR_ATMPVC=1 -DHAVE_SOCKADDR_ATMSVC=1 -DHAVE_SOCKADDR_DN=1 -DHAVE_SOCKADDR_IRDA=1 -DHAVE_SOCKADDR_LLC=1 -DHAVE_PF_NETLINK=1 -I/usr/include/python2.7 -c netifaces.c -o build/temp.linux-x86_64-2.7/netifaces.o netifaces.c:1:20: fatal error: Python.h: No such file or directory

include

                  ^

compilation terminated. error: command 'x86_64-linux-gnu-gcc' failed with exit status 1


Failed building wheel for netifaces

...

building 'Crypto.PublicKey._fastmath' extension creating build/temp.linux-x86_64-2.7 creating build/temp.linux-x86_64-2.7/src x86_64-linux-gnu-gcc -pthread -fwrapv -Wall -Wstrict-prototypes -fno-strict-aliasing -Wdate-time -D_FORTIFY_SOURCE=2 -fdebug-prefix-map=/build/python2.7-2.7.13=. -fstack-protector-strong -Wformat -Werror=format-security -fPIC -std=c99 -O3 -fomit-frame-pointer -Isrc/ -I/usr/include/ -I/usr/include/python2.7 -c src/_fastmath.c -o build/temp.linux-x86_64-2.7/src/_fastmath.o src/_fastmath.c:31:20: fatal error: Python.h: No such file or directory

include "Python.h"

                  ^

compilation terminated. error: command 'x86_64-linux-gnu-gcc' failed with exit status 1


Failed building wheel for PyCrypto

## Steps to Reproduce the Problem

  1. `sudo dpkg -i monkey_island.deb`
  1. `sudo apt install -f`

## Steps to Fix the Problem
  1. `sudo apt install python-dev`
  1. `sudo dpkg -i ./money_island.deb`

## Resolution
  - Add `python-dev` as a dependency

## Specifications

  - Version: gc-monkey-island (1.0)
```bash
$ dpkg -I ./monkey_island.deb 
 new debian package, version 2.0.
 size 58988976 bytes: control archive=839 bytes.
     235 bytes,     8 lines   *  control              
    1105 bytes,    36 lines   *  postinst             #!/bin/bash
     388 bytes,    12 lines   *  prerm                #!/bin/sh
 Package: gc-monkey-island
 Architecture: amd64
 Maintainer: Guardicore
 Homepage: http://www.guardicore.com
 Priority: optional
 Version: 1.0
 Description: Guardicore Infection Monkey Island installation package
 Depends: openssl, python-pip
acepace commented 6 years ago

Can repro, will have a fix soon

danielguardicore commented 6 years ago

Fixed in develop version, will release new bugfix version