buildout.cfg 7.62 KB
Newer Older
Alain Takoudjou's avatar
Alain Takoudjou committed
1
[buildout]
2
parts =
Alain Takoudjou's avatar
Alain Takoudjou committed
3 4
  firewalld-patch

5
extends =
6
  ../defaults.cfg
Alain Takoudjou's avatar
Alain Takoudjou committed
7 8 9 10 11 12
  ../libtool/buildout.cfg
  ../intltool/buildout.cfg
  ../glib/buildout.cfg
  ../python-slip/buildout.cfg
  ../dbus/buildout.cfg
  ../flex/buildout.cfg
13
  ../nftables/buildout.cfg
Alain Takoudjou's avatar
Alain Takoudjou committed
14 15 16

[firewalld]
recipe = slapos.recipe.cmmi
17 18
url = https://github.com/firewalld/firewalld/releases/download/v0.8.6/firewalld-0.8.6.tar.gz
md5sum = a120286a2c2bc12ece24d719ef2879b5
19
python-egg = ${buildout:parts-directory}/${:_buildout_section_name_}/lib/python${python:version}/site-packages
20 21
location = @@LOCATION@@
sbin-dir = sbin-orig
22 23
pre-configure =
  sed -i -E 's,(^SUBDIRS *=.*) doc(\b.*),\1\2,' Makefile.am
Alain Takoudjou's avatar
Alain Takoudjou committed
24 25
  aclocal -I${pkgconfig:location}/share/aclocal -I${gettext:location}/share/aclocal -I${libtool:location}/share/aclocal
  ./autogen.sh
26 27 28 29 30 31 32 33 34 35
configure-options =
  --sbindir=${:location}/${:sbin-dir}
  --disable-docs
  --with-iptables=${iptables:location}/sbin/iptables-legacy
  --with-iptables-restore=${iptables:location}/sbin/iptables-legacy-restore
  --with-ip6tables=${iptables:location}/sbin/ip6tables-legacy
  --with-ip6tables-restore=${iptables:location}/sbin/ip6tables-legacy-restore
  --with-ebtables=${iptables:location}/sbin/ebtables-legacy
  --with-ebtables-restore=${iptables:location}/sbin/ebtables-legacy-restore
  --with-ipset=/bin/false
Alain Takoudjou's avatar
Alain Takoudjou committed
36 37

environment =
38
  PKG_CONFIG_PATH=${glib:location}/lib/pkgconfig:${pcre:location}/lib/pkgconfig
Kazuhiko Shiozaki's avatar
Kazuhiko Shiozaki committed
39
  PATH=${autoconf:location}/bin:${automake:location}/bin:${pkgconfig:location}/bin:${libtool:location}/bin:${intltool:location}/bin:${gettext:location}/bin:${glib:location}/bin:${perl:location}/bin:%(PATH)s
Alain Takoudjou's avatar
Alain Takoudjou committed
40 41 42 43 44 45 46 47
  CPPFLAGS=-I${gettext:location}/include
  M4=${m4:location}/bin/m4
  ACLOCAL_PATH=${pkgconfig:location}/share/aclocal:${gettext:location}/share/aclocal:${libtool:location}/share/aclocal:${glib:location}/share/aclocal:${intltool:location}/share/aclocal
  FIREWALLD_DEVEL_ENV=${buildout:parts-directory}/${:_buildout_section_name_}/src
  PYTHONPATH=${buildout:parts-directory}/${:_buildout_section_name_}/src

[dbus-python]
recipe = slapos.recipe.cmmi
48
version = 1.2.16
Alain Takoudjou's avatar
Alain Takoudjou committed
49
url = http://dbus.freedesktop.org/releases/dbus-python/dbus-python-${:version}.tar.gz
50
md5sum = 51a45c973d82bedff033a4b57d69d5d8
51
python-egg = ${buildout:parts-directory}/${:_buildout_section_name_}/lib/python${python:version}/site-packages
Alain Takoudjou's avatar
Alain Takoudjou committed
52
environment =
53
  PKG_CONFIG_PATH=${dbus:location}/lib/pkgconfig:${dbus-glib:location}/lib/pkgconfig:${glib:location}/lib/pkgconfig:${pcre:location}/lib/pkgconfig
54
  PATH=${pkgconfig:location}/bin:%(PATH)s
55
  DBUS_CFLAGS=-I${dbus:location}/include/dbus-1.0 -I${dbus:location}/lib/dbus-1.0/include
Alain Takoudjou's avatar
Alain Takoudjou committed
56 57 58 59 60 61 62 63
  DBUS_LIBS=-L${dbus:location}/lib -ldbus-1
  DBUS_GLIB_CFLAGS=-I${dbus-glib:location}/include/dbus-1.0
  DBUS_GLIB_LIBS=-L${dbus-glib:location}/lib -ldbus-glib-1
  CPPFLAGS=-I${glib:location}/include/glib-2.0 -I${glib:location}/lib/glib-2.0/include
  LDFLAGS=-L${glib:location}/lib -Wl,-rpath=${glib:location}/lib

[gobject-introspection]
recipe = slapos.recipe.cmmi
64 65
url = http://ftp.gnome.org/pub/gnome/core/3.22/3.22.2/sources/gobject-introspection-1.50.0.tar.xz
md5sum = 5af8d724f25d0c9cfbe6df41b77e5dc0
66
configure-options =
Alain Takoudjou's avatar
Alain Takoudjou committed
67 68 69
  --disable-static

environment =
70
  PATH=${pkgconfig:location}/bin:${gettext:location}/bin:${glib:location}/bin:${xz-utils:location}/bin:${flex:location}/bin:${bison:location}/bin:%(PATH)s
71
  PKG_CONFIG_PATH=${glib:location}/lib/pkgconfig:${pcre:location}/lib/pkgconfig
Alain Takoudjou's avatar
Alain Takoudjou committed
72 73 74 75 76 77
  CPPFLAGS=-I${glib:location}/include/glib-2.0 -I${glib:location}/lib/glib-2.0/include
  LDFLAGS=-L${glib:location}/lib -Wl,-rpath=${glib:location}/lib -L${libffi:location}/lib -Wl,-rpath=${libffi:location}/lib -lffi
  GLIB_CFLAGS=-I${glib:location}/include/glib-2.0 -I${glib:location}/lib/glib-2.0/include
  GLIB_LIBS=-L${glib:location}/lib -lglib-2.0 -lintl -lgobject-2.0
  FFI_CFLAGS=-I${libffi:location}/include
  FFI_LIBS=-L${libffi:location}/lib -Wl,-rpath=${libffi:location}/lib -lffi
78
  GIR_DIR=${buildout:parts-directory}/${:_buildout_section_name_}/share/gir-1.0
Alain Takoudjou's avatar
Alain Takoudjou committed
79 80 81

[pygobject3]
recipe = slapos.recipe.cmmi
82
url = http://ftp.gnome.org/pub/gnome/core/3.22/3.22.2/sources/pygobject-3.22.0.tar.xz
83
python-egg = ${buildout:parts-directory}/${:_buildout_section_name_}/lib/python${python:version}/site-packages
84
md5sum = ed4117ed5d554d25fd7718807fbf819f
85
pre-configure =
Alain Takoudjou's avatar
Alain Takoudjou committed
86
  sed -i 's#/usr/local#${gobject-introspection:location}#g' ${gobject-introspection:location}/lib/pkgconfig/gobject-introspection-1.0.pc
87
configure-options =
Alain Takoudjou's avatar
Alain Takoudjou committed
88 89 90 91
  --disable-static
  --disable-cairo

environment =
92
  PATH=${pkgconfig:location}/bin:${libtool:location}/bin:${glib:location}/bin:${xz-utils:location}/bin:%(PATH)s
93
  PKG_CONFIG_PATH=${glib:location}/lib/pkgconfig:${gobject-introspection:location}/lib/pkgconfig:${pcre:location}/lib/pkgconfig
Alain Takoudjou's avatar
Alain Takoudjou committed
94 95 96 97 98 99 100 101 102 103
  FFI_CFLAGS=-I${libffi:location}/include
  FFI_LIBS=-L${libffi:location}/lib -Wl,-rpath=${libffi:location}/lib -lffi
  CPPFLAGS=-I${glib:location}/include/glib-2.0 -I${glib:location}/lib/glib-2.0/include -I${gettext:location}/include -I${libffi:location}/include
  LDFLAGS=-L${glib:location}/lib -Wl,-rpath=${glib:location}/lib -L${gettext:location}/lib -Wl,-rpath=${gettext:location}/lib
  GIO_LIBS=-L${glib:location}/lib -lgio-2.0
  GI_CFLAGS=-I${gobject-introspection:location}/include/gobject-introspection-1.0
  GI_LIBS=-L${gobject-introspection:location}/lib -lgirepository-1.0

[trusted-config]
recipe = hexagonit.recipe.download
104
ignore-existing = true
Alain Takoudjou's avatar
Alain Takoudjou committed
105 106 107 108 109 110 111
url = https://raw.githubusercontent.com/t-woerner/firewalld/v0.3.14/config/zones/trusted.xml
download-only = true
filename = trusted.xml
md5sum = 893752ba2e93a1e96334dfee19f884ad

[firewalld-patch]
recipe = plone.recipe.command
112
python = ${buildout:bin-directory}/${firewalld-eggs:interpreter}
113
command =
114 115 116 117 118 119 120 121
  sed -i 's#python2.7#${:python}#' ${firewalld:location}/bin/firewall-applet
  sed -i 's#python2.7#${:python}#' ${firewalld:location}/bin/firewall-cmd
  sed -i 's#python2.7#${:python}#' ${firewalld:location}/bin/firewall-config
  sed -i 's#python2.7#${:python}#' ${firewalld:location}/bin/firewall-offline-cmd
  sed -i 's#python2.7#${:python}#' ${firewalld:location}/${firewalld:sbin-dir}/firewalld

  sed -i 's#python2.7 /usr/bin/firewall-config#${:python} ${firewalld:location}/bin/firewall-config#' ${firewalld:location}/etc/firewalld/lockdown-whitelist.xml

Alain Takoudjou's avatar
Alain Takoudjou committed
122
  sed -i 's#DefaultZone=public#DefaultZone=trusted#' ${firewalld:location}/etc/firewalld/firewalld.conf
123 124

  sed -i 's#/etc/firewalld#${firewalld:location}/etc/firewalld#'     ${firewalld:python-egg}/firewall/config/__init__.py
125
  sed -i 's#/usr/lib/firewalld#${firewalld:location}/lib/firewalld#' ${firewalld:python-egg}/firewall/config/__init__.py
126 127
  sed -i 's#/usr/share/#${firewalld:location}/share#'                ${firewalld:python-egg}/firewall/config/__init__.py

Alain Takoudjou's avatar
Alain Takoudjou committed
128 129
  sed -i "s#import sys#import sys, os\n\nos.environ['GI_TYPELIB_PATH'] = '${gobject-introspection:location}/lib/girepository-1.0/'#" ${:python}
  sed -i 's#<syslog/>#<!-- no syslog -->#' ${dbus:location}/etc/dbus-1/system.conf
130
  sed -i 's#<user>messagebus</user>#<user>slapsoft</user>#' ${dbus:location}/share/dbus-1/system.conf
Alain Takoudjou's avatar
Alain Takoudjou committed
131
  cp -f ${firewalld:location}/lib/firewalld/zones/trusted.xml ${firewalld:location}/etc/firewalld/zones/
132 133 134 135 136
  cp -f ${firewalld:location}/share/dbus-1/system.d/FirewallD.conf ${dbus:location}/share/dbus-1/system.d/
  mkdir -p ${firewalld:location}/sbin
  echo -n '#!/bin/sh\nLD_LIBRARY_PATH=${nftables:location}/lib ${firewalld:location}/${firewalld:sbin-dir}/firewalld "$@"' > ${firewalld:location}/sbin/firewalld
  chmod a+x ${firewalld:location}/sbin/firewalld

Alain Takoudjou's avatar
Alain Takoudjou committed
137
update-command = ${:command}
138
stop-on-error = true
Alain Takoudjou's avatar
Alain Takoudjou committed
139 140 141 142

[firewalld-eggs]
recipe = zc.recipe.egg:scripts
interpreter = python.eggs
143
eggs =
Alain Takoudjou's avatar
Alain Takoudjou committed
144 145 146 147 148 149 150 151
  decorator
  six
  ${python-slip-egg:eggs}

extra-paths =
  ${dbus-python:python-egg}
  ${firewalld:python-egg}
  ${pygobject3:python-egg}
152
  ${nftables:python-egg}