Skip to content

Commit

Permalink
ifupdown2 2.0.0 release
Browse files Browse the repository at this point in the history
This is a major update coming all at once from master-next branch
master-next branch was started with --orphan option which is basically a new
branch without history.

The major changes are:
    - repackaging
    - cleanup the directory tree
    - rewritte setup.py to allow install from deb file or pypi (pip install)
    - add a Makefile to make things (like building a deb) easier
    - review all debian files

Signed-off-by: Julien Fortin <[email protected]>
  • Loading branch information
julienfortin committed Dec 13, 2018
1 parent a9c3c89 commit d486dd0
Show file tree
Hide file tree
Showing 126 changed files with 13,587 additions and 10,802 deletions.
6 changes: 0 additions & 6 deletions KNOWN_ISSUES

This file was deleted.

96 changes: 96 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,96 @@
.PHONY: clean clean-test clean-pyc clean-build docs help
.DEFAULT_GOAL := help

define BROWSER_PYSCRIPT
import os, webbrowser, sys

try:
from urllib import pathname2url
except:
from urllib.request import pathname2url

webbrowser.open("file://" + pathname2url(os.path.abspath(sys.argv[1])))
endef
export BROWSER_PYSCRIPT

define PRINT_HELP_PYSCRIPT
import re, sys

for line in sys.stdin:
match = re.match(r'^([a-zA-Z_-]+):.*?## (.*)$$', line)
if match:
target, help = match.groups()
print("%-20s %s" % (target, help))
endef
export PRINT_HELP_PYSCRIPT

BROWSER := python -c "$$BROWSER_PYSCRIPT"

help:
@python -c "$$PRINT_HELP_PYSCRIPT" < $(MAKEFILE_LIST)

clean: clean-build clean-pyc clean-test ## remove all build, test, coverage and Python artifacts

clean-build: ## remove build artifacts
rm -fr build/
rm -fr dist/
rm -fr .eggs/
find . -name '*.egg-info' -exec rm -fr {} +
find . -name '*.egg' -exec rm -f {} +

clean-pyc: ## remove Python file artifacts
find . -name '*.pyc' -exec rm -f {} +
find . -name '*.pyo' -exec rm -f {} +
find . -name '*~' -exec rm -f {} +
find . -name '__pycache__' -exec rm -fr {} +

clean-test: ## remove test and coverage artifacts
rm -fr .tox/
rm -f .coverage
rm -fr htmlcov/
rm -fr .pytest_cache

lint: ## check style with flake8
flake8 ifupdown2 tests

test: ## run tests quickly with the default Python
py.test

test-all: ## run tests on every Python version with tox
tox

coverage: ## check code coverage quickly with the default Python
coverage run --source ifupdown2 -m pytest
coverage report -m
coverage html
$(BROWSER) htmlcov/index.html

docs: ## generate Sphinx HTML documentation, including API docs
rm -f docs/ifupdown2.rst
rm -f docs/modules.rst
sphinx-apidoc -o docs/ ifupdown2
$(MAKE) -C docs clean
$(MAKE) -C docs html
$(BROWSER) docs/_build/html/index.html

servedocs: docs ## compile the docs watching for changes
watchmedo shell-command -p '*.rst' -c '$(MAKE) -C docs html' -R -D .

testpy: ## package and upload to testpy
python setup.py sdist bdist_wheel
twine upload --repository-url https://test.pypi.org/legacy/ dist/*
@echo "Install ifupdown2 from testpy 'pip install --index-url https://test.pypi.org/simple/ ifupdown2'"

release: dist ## package and upload a release
twine upload dist/*

dist: clean ## builds source and wheel package
python setup.py sdist
python setup.py bdist_wheel
ls -l dist

install: clean ## install the package to the active Python's site-packages
python setup.py install

deb: clean ## create a debian package (.deb)
debuild -b -rfakeroot -us -uc
162 changes: 162 additions & 0 deletions README
Original file line number Diff line number Diff line change
@@ -0,0 +1,162 @@
=========
ifupdown2
=========

Linux Interface Network Manager

* Free software: GNU General Public License v2

============
Installation
============

As of today (early june 2018), the preferred method to install ifupdown2, is by
building the source code (as it will always install the most recent stable
release). See `Installing latest stable release from sources`_ chapter.

Installing latest stable release from sources
---------------------------------------------

The sources for ifupdown2 can be downloaded from the `Github repo`_.

You can either clone the public repository:

.. code-block:: console

$ git clone git://github.com/CumulusNetworks/ifupdown2

Or download the `tarball`_:

.. code-block:: console

$ curl -OL https://github.com/CumulusNetworks/ifupdown2/tarball/master

Once you have a copy of the source, you should build a deb-package and install it

.. code-block:: console

$ cd ifupdown2 && make deb

The generated deb should be in the root directory (``../ifupdown2_2.0.0_all.deb``)

.. code-block:: console

$ dpkg -i ../ifupdown2_2.0.0_all.deb

We don't recommend using ``setup.py install`` directly, as it's still missing systemd/init.d scripts.
This capability should be added in the near future.

You might need to manually download dependencies. Mandatory dependencies:

.. code-block:: console

$ apt-get install dh-systemd python-all python-docutils rst2man iproute2 python-ipaddr python-argcomplete

Suggested dependencies:

.. code-block:: console

$ apt-get install ethtool bridge-utils python-gvgen python-mako

.. _Github repo: https://github.com/CumulusNetworks/ifupdown2
.. _tarball: https://github.com/CumulusNetworks/ifupdown2/tarball/master


============
Contributing
============

Contributions are welcome, and they are greatly appreciated! Every little bit
helps, and credit will always be given.

You can contribute in many ways:

Types of Contributions
----------------------

Report Bugs
~~~~~~~~~~~

Report bugs at https://github.com/CumulusNetworks/ifupdown2/issues.

If you are reporting a bug, please include:

* Your operating system name and version (``uname -a``).
* Any details about your setup that might be helpful in troubleshooting.
* Content of configuration files such as ``/etc/network/interfaces``
* Detailed steps to reproduce the bug.
* Debug output of the ifupdown2 command (see ``--debug`` option)

Write Documentation
~~~~~~~~~~~~~~~~~~~

ifupdown2 could always use more documentation, whether as part of the
official ifupdown2 docs, in docstrings, or even on the web in blog posts,
articles, and such.

Submit Feedback
~~~~~~~~~~~~~~~

The best way to send feedback is to file an issue at https://github.com/CumulusNetworks/ifupdown2/issues.

If you are proposing a feature:

* Explain in detail how it would work.
* Keep the scope as narrow as possible, to make it easier to implement.

=======
Credits
=======

Development Lead
----------------

* Roopa Prabhu <[email protected]>
* Julien Fortin <[email protected]>

Contributors
------------

* Nikhil Gajendrakumar <[email protected]>
* Maximilian Wilhelm <[email protected]>
* Sven Auhagen <[email protected]>
* skorpy <[email protected]>
* Sam Tannous <[email protected]>
* Wilson Kok <[email protected]>
* John Berezovik <[email protected]>
* Daniel Walton <[email protected]>
* Anuradha Karuppiah <[email protected]>
* Balakrishnan Raman <[email protected]>
* Scott Emery <[email protected]>
* Dave Olson <[email protected]>
* David Ahern <[email protected]>
* Jonathan Toppins <>
* Nolan Leake <[email protected]>
* Sergey Sudakovich <[email protected]>
* Andy Gospodarek <>
* Satish Ashok <[email protected]>
* Scott Laffer <[email protected]>
* Vidya Sagar Ravipati <[email protected]>
* Marek Grzybowski <[email protected]>
* Gaudenz Steinlin <[email protected]>
* Nigel Kukard <[email protected]>
* Jeffrey <[email protected]>
* kokel <[email protected]>

Why not you too? :)


=======
History
=======

See changelog here: https://github.com/CumulusNetworks/ifupdown2/blob/master/debian/changelog


Credits
-------

This package was created with Cookiecutter_ and the `audreyr/cookiecutter-pypackage`_ project template.

.. _Cookiecutter: https://github.com/audreyr/cookiecutter
.. _`audreyr/cookiecutter-pypackage`: https://github.com/audreyr/cookiecutter-pypackage
75 changes: 0 additions & 75 deletions README.md

This file was deleted.

Loading

0 comments on commit d486dd0

Please sign in to comment.