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
|
||||
stamp-h1
|
||||
|
||||
# python build directory
|
||||
dist
|
||||
|
||||
# intellij
|
||||
*.iml
|
||||
.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
|
||||
* DEVELOPMENT:
|
||||
- support for editorconfig to help standardize development across IDEs, from the defined configuration file
|
||||
|
|
|
@ -101,6 +101,7 @@ endef
|
|||
|
||||
define fpm-daemon-rpm =
|
||||
fpm -s python -t rpm \
|
||||
--verbose \
|
||||
-p NAME_$1_VERSION_ARCH.rpm \
|
||||
--python-setup-py-arguments --service=$1 \
|
||||
-m "$(CORE_MAINTAINERS)" \
|
||||
|
@ -136,6 +137,7 @@ endef
|
|||
|
||||
.PHONY: fpm
|
||||
fpm: clean-local-fpm
|
||||
$(MAKE) -C gui install DESTDIR=$(DESTDIR)
|
||||
$(call fpm-gui,rpm,-d "tkimg")
|
||||
$(call fpm-gui,deb,-d "libtk-img")
|
||||
$(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':
|
||||
|
||||
/usr/local/bin/core-gui
|
||||
/usr/local/sbin/core-daemon
|
||||
/usr/local/sbin/[vcmd, vnoded, coresendmsg, core-cleanup.sh]
|
||||
/usr/local/bin/core-daemon
|
||||
/usr/local/bin/[vcmd, vnoded, coresendmsg, core-cleanup.sh]
|
||||
/usr/local/lib/core/*
|
||||
/usr/local/share/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
|
||||
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
|
||||
============
|
||||
|
||||
|
|
|
@ -9,6 +9,13 @@ from setuptools import setup, find_packages
|
|||
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):
|
||||
data_files = []
|
||||
for path, directories, filenames in os.walk(files_path):
|
||||
|
@ -40,15 +47,26 @@ class CustomInstall(install):
|
|||
def run(self):
|
||||
if self.service == "sysv":
|
||||
self.distribution.data_files.append((
|
||||
"/etc/init.d", ["../scripts/core-daemon"]
|
||||
_SYSV, ["../scripts/core-daemon"]
|
||||
))
|
||||
else:
|
||||
self.distribution.data_files.append((
|
||||
"/etc/systemd/system", ["../scripts/core-daemon.service"]
|
||||
_SYSTEMD, ["../scripts/core-daemon.service"]
|
||||
))
|
||||
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(
|
||||
name="core",
|
||||
version="5.1",
|
||||
|
@ -62,14 +80,7 @@ setup(
|
|||
"pytest-cov",
|
||||
"mock",
|
||||
],
|
||||
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"),
|
||||
data_files=data_files,
|
||||
scripts=[
|
||||
"sbin/core-cleanup",
|
||||
"sbin/core-daemon",
|
||||
|
|
Loading…
Reference in a new issue