updated to readme for building packages, update to makefile to install and build gui with one command
This commit is contained in:
parent
3ba8371282
commit
26b1b01505
5 changed files with 60 additions and 12 deletions
3
.gitignore
vendored
3
.gitignore
vendored
|
@ -17,6 +17,9 @@ core-*.tar.gz
|
||||||
debian
|
debian
|
||||||
stamp-h1
|
stamp-h1
|
||||||
|
|
||||||
|
# python build directory
|
||||||
|
dist
|
||||||
|
|
||||||
# intellij
|
# intellij
|
||||||
*.iml
|
*.iml
|
||||||
.idea
|
.idea
|
||||||
|
|
11
Changelog
11
Changelog
|
@ -1,3 +1,14 @@
|
||||||
|
2018-XX-XX CORE 5.1
|
||||||
|
* DAEMON:
|
||||||
|
- default nodes are now set in the node map
|
||||||
|
- moved ns3 and netns directories to the top of the repo
|
||||||
|
- changes to make use of fpm as the tool for building packages
|
||||||
|
- removed usage of logzero to avoid dependency issues for built packages
|
||||||
|
* TEST:
|
||||||
|
- fixed some broken tests
|
||||||
|
* BUGFIXES:
|
||||||
|
- #142 - duplication of custom services
|
||||||
|
|
||||||
2017-09-01 CORE 5.0
|
2017-09-01 CORE 5.0
|
||||||
* DEVELOPMENT:
|
* DEVELOPMENT:
|
||||||
- support for editorconfig to help standardize development across IDEs, from the defined configuration file
|
- support for editorconfig to help standardize development across IDEs, from the defined configuration file
|
||||||
|
|
|
@ -101,6 +101,7 @@ endef
|
||||||
|
|
||||||
define fpm-daemon-rpm =
|
define fpm-daemon-rpm =
|
||||||
fpm -s python -t rpm \
|
fpm -s python -t rpm \
|
||||||
|
--verbose \
|
||||||
-p NAME_$1_VERSION_ARCH.rpm \
|
-p NAME_$1_VERSION_ARCH.rpm \
|
||||||
--python-setup-py-arguments --service=$1 \
|
--python-setup-py-arguments --service=$1 \
|
||||||
-m "$(CORE_MAINTAINERS)" \
|
-m "$(CORE_MAINTAINERS)" \
|
||||||
|
@ -136,6 +137,7 @@ endef
|
||||||
|
|
||||||
.PHONY: fpm
|
.PHONY: fpm
|
||||||
fpm: clean-local-fpm
|
fpm: clean-local-fpm
|
||||||
|
$(MAKE) -C gui install DESTDIR=$(DESTDIR)
|
||||||
$(call fpm-gui,rpm,-d "tkimg")
|
$(call fpm-gui,rpm,-d "tkimg")
|
||||||
$(call fpm-gui,deb,-d "libtk-img")
|
$(call fpm-gui,deb,-d "libtk-img")
|
||||||
$(call fpm-python,rpm,ns3/setup.py)
|
$(call fpm-python,rpm,ns3/setup.py)
|
||||||
|
|
25
README.rst
25
README.rst
|
@ -44,8 +44,8 @@ Note: You may need to pass the proxy settings to sudo make install:
|
||||||
Here is what is installed with 'make install':
|
Here is what is installed with 'make install':
|
||||||
|
|
||||||
/usr/local/bin/core-gui
|
/usr/local/bin/core-gui
|
||||||
/usr/local/sbin/core-daemon
|
/usr/local/bin/core-daemon
|
||||||
/usr/local/sbin/[vcmd, vnoded, coresendmsg, core-cleanup.sh]
|
/usr/local/bin/[vcmd, vnoded, coresendmsg, core-cleanup.sh]
|
||||||
/usr/local/lib/core/*
|
/usr/local/lib/core/*
|
||||||
/usr/local/share/core/*
|
/usr/local/share/core/*
|
||||||
/usr/local/lib/python2.6/dist-packages/core/*
|
/usr/local/lib/python2.6/dist-packages/core/*
|
||||||
|
@ -66,6 +66,27 @@ Once that has been done you can run the following commands:
|
||||||
./configure
|
./configure
|
||||||
make html
|
make html
|
||||||
|
|
||||||
|
Building Packages
|
||||||
|
=================
|
||||||
|
|
||||||
|
Install fpm
|
||||||
|
|
||||||
|
http://fpm.readthedocs.io/en/latest/installing.html
|
||||||
|
|
||||||
|
Build package commands, DESTDIR is used for gui packaging only
|
||||||
|
|
||||||
|
* ./bootstrap.sh
|
||||||
|
* ./configure
|
||||||
|
* make
|
||||||
|
* mkdir /tmp/core-gui
|
||||||
|
* make fpm DESTDIR=/tmp/core-gui
|
||||||
|
|
||||||
|
This will produce:
|
||||||
|
|
||||||
|
* CORE GUI rpm/deb files
|
||||||
|
* CORE ns3 rpm/deb files
|
||||||
|
* CORE python rpm/deb files for SysV and systemd service types
|
||||||
|
|
||||||
Running CORE
|
Running CORE
|
||||||
============
|
============
|
||||||
|
|
||||||
|
|
|
@ -9,6 +9,13 @@ from setuptools import setup, find_packages
|
||||||
from distutils.command.install import install
|
from distutils.command.install import install
|
||||||
|
|
||||||
|
|
||||||
|
_CORE_DIR = "/etc/core"
|
||||||
|
_MAN_DIR = "/usr/local/share/man/man1"
|
||||||
|
_SHARE_DIR = "/usr/local/share/core"
|
||||||
|
_SYSV = "/etc/init.d"
|
||||||
|
_SYSTEMD = "/etc/systemd/system"
|
||||||
|
|
||||||
|
|
||||||
def recursive_files(data_path, files_path):
|
def recursive_files(data_path, files_path):
|
||||||
data_files = []
|
data_files = []
|
||||||
for path, directories, filenames in os.walk(files_path):
|
for path, directories, filenames in os.walk(files_path):
|
||||||
|
@ -40,15 +47,26 @@ class CustomInstall(install):
|
||||||
def run(self):
|
def run(self):
|
||||||
if self.service == "sysv":
|
if self.service == "sysv":
|
||||||
self.distribution.data_files.append((
|
self.distribution.data_files.append((
|
||||||
"/etc/init.d", ["../scripts/core-daemon"]
|
_SYSV, ["../scripts/core-daemon"]
|
||||||
))
|
))
|
||||||
else:
|
else:
|
||||||
self.distribution.data_files.append((
|
self.distribution.data_files.append((
|
||||||
"/etc/systemd/system", ["../scripts/core-daemon.service"]
|
_SYSTEMD, ["../scripts/core-daemon.service"]
|
||||||
))
|
))
|
||||||
install.run(self)
|
install.run(self)
|
||||||
|
|
||||||
|
|
||||||
|
data_files = [
|
||||||
|
(_CORE_DIR, [
|
||||||
|
"data/core.conf",
|
||||||
|
"data/xen.conf",
|
||||||
|
"data/logging.conf",
|
||||||
|
]),
|
||||||
|
(_MAN_DIR, glob_files("../doc/man/**.1")),
|
||||||
|
]
|
||||||
|
data_files.extend(recursive_files(_SHARE_DIR, "examples"))
|
||||||
|
|
||||||
|
|
||||||
setup(
|
setup(
|
||||||
name="core",
|
name="core",
|
||||||
version="5.1",
|
version="5.1",
|
||||||
|
@ -62,14 +80,7 @@ setup(
|
||||||
"pytest-cov",
|
"pytest-cov",
|
||||||
"mock",
|
"mock",
|
||||||
],
|
],
|
||||||
data_files=[
|
data_files=data_files,
|
||||||
("/etc/core", [
|
|
||||||
"data/core.conf",
|
|
||||||
"data/xen.conf",
|
|
||||||
"data/logging.conf",
|
|
||||||
]),
|
|
||||||
("/usr/local/share/man/man1", glob_files("../doc/man/**.1")),
|
|
||||||
] + recursive_files("/usr/local/share/core", "examples"),
|
|
||||||
scripts=[
|
scripts=[
|
||||||
"sbin/core-cleanup",
|
"sbin/core-cleanup",
|
||||||
"sbin/core-daemon",
|
"sbin/core-daemon",
|
||||||
|
|
Loading…
Reference in a new issue