Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Freebsd support #1187

Open
wants to merge 32 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 4 commits
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
acadb25
support FreeBSD hier(7) paths in setup.py files
tykling Mar 26, 2018
aad4f8a
fix remaining hardcoded shebang lines to use '/usr/bin/env python' in…
tykling Mar 26, 2018
b5013b2
fix OS detection
tykling Apr 7, 2018
71d325a
add missing import
tykling Apr 9, 2018
ce28666
fix warnings: imports on seperate lines, remove whitespace before (, …
tykling Apr 17, 2018
cc1494d
Update CI install phase to install PostgreSQL 9.2
garberg Apr 27, 2018
aaa7d32
Merge pull request #1188 from garberg/fix_travis
garberg Apr 27, 2018
759afd1
Bumped version to v0.29.7
garberg May 31, 2018
7edd1eb
Merge pull request #1191 from garberg/release_0.29.7
garberg May 31, 2018
ca5c684
Upgraded AngularJS and jQuery
garberg Sep 18, 2018
2b83e8b
www: Remove default hash prefix
garberg Oct 1, 2018
907878f
www: Changed from success/error to then/catch
garberg Oct 3, 2018
62e2d9b
Upgraded jQuery UI to v1.12.1
garberg Oct 4, 2018
c694bcb
www: Remove more jQuery-UI classes
garberg Oct 18, 2018
c591266
www: Use Bootstrap button classes in dialogs
garberg Oct 18, 2018
d07cfe3
Merge pull request #1201 from garberg/upgrade_jslibs
plajjan Oct 22, 2018
007a0d3
Add a "Reviewed by Hound" badge
salbertson Nov 11, 2018
e5eb2b3
Merge pull request #1203 from salbertson/patch-1
garberg Nov 27, 2018
c91eb79
docs: Clarified WWW installation instructions
garberg Jan 26, 2019
75d47e7
www: Fixed removal of extra attributes
garberg Jan 29, 2019
d8b57a1
www: Increase search delay to 500 ms
garberg Feb 22, 2019
5fd24c0
Merge pull request #1213 from garberg/increase_search_delay
plajjan Mar 5, 2019
2963e3d
Merge pull request #1209 from garberg/update_www_install_doc
plajjan Mar 5, 2019
ccc18dc
Merge pull request #1211 from garberg/fix_remove_prefix_avp
plajjan Mar 5, 2019
1b98d66
Bumped version to v0.29.8
garberg Mar 13, 2019
f96069f
Merge pull request #1215 from garberg/release_v0.29.8
garberg Mar 13, 2019
b2bbcfb
support FreeBSD hier(7) paths in setup.py files
tykling Mar 26, 2018
3bb9317
fix remaining hardcoded shebang lines to use '/usr/bin/env python' in…
tykling Mar 26, 2018
48a4759
fix OS detection
tykling Apr 7, 2018
c741b4e
add missing import
tykling Apr 9, 2018
64494dd
fix warnings: imports on seperate lines, remove whitespace before (, …
tykling Apr 17, 2018
e5582b2
Merge branch 'freebsd-support' of github.com:tykling/NIPAP into freeb…
tykling Dec 16, 2019
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 11 additions & 4 deletions nipap-cli/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,18 @@ def get_data_files():
print("rst2man failed to run:", str(exc), file=sys.stderr)
sys.exit(1)

if sys.platform.startswith('freebsd'):
localbase = '/usr/local'
etcdir = localbase + '/etc'
else:
localbase = '/usr'
etcdir = '/etc'

files = [
('/etc/skel/', ['.nipaprc']),
('/usr/bin/', ['helper-nipap', 'nipap']),
('/usr/share/doc/nipap-cli/', ['bash_complete', 'nipaprc']),
('/usr/share/man/man1/', ['nipap.1'])
(etcdir + '/skel/', ['.nipaprc']),
(localbase + '/bin/', ['helper-nipap', 'nipap']),
(localbase + '/share/doc/nipap-cli/', ['bash_complete', 'nipaprc']),

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

line too long (80 > 79 characters)

(localbase + '/share/man/man1/', ['nipap.1'])
]

return files
Expand Down
14 changes: 11 additions & 3 deletions nipap-www/setup.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
from setuptools import setup, find_packages
import nipapwww
import nipapwww, sys

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

multiple imports on one line


if sys.platform.startswith('freebsd'):
localbase = '/usr/local'
etcdir = localbase + '/etc'
else:
localbase = '/usr'
etcdir = '/etc'

setup(
name='nipap-www',
Expand All @@ -21,8 +28,8 @@
test_suite='nose.collector',
package_data={'nipapwww': ['i18n/*/LC_MESSAGES/*.mo']},
data_files = [
( '/etc/nipap/', [ 'nipap-www.ini', ] ),
( '/etc/nipap/www', [ 'nipap-www.wsgi', ] ),
( etcdir + '/nipap/', [ 'nipap-www.ini', ] ),

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

whitespace after '('
whitespace after '['
whitespace before ')'

( etcdir + '/nipap/www', [ 'nipap-www.wsgi', ] ),

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

whitespace after '('
whitespace after '['
whitespace before ')'

( '/var/cache/nipap-www/', [] )
],
#message_extractors={'nipapwww': [
Expand All @@ -38,3 +45,4 @@
main = pylons.util:PylonsInstaller
""",
)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

blank line at end of file

2 changes: 1 addition & 1 deletion nipap/nipap/smart_parsing.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/python
#!/usr/bin/env python
# -*- coding: utf-8 -*-

from itertools import izip_longest
Expand Down
17 changes: 12 additions & 5 deletions nipap/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,17 @@ def get_data_files():
print >> sys.stderr, "rst2man failed to run:", str(exc)
sys.exit(1)

if sys.platform.startswith('freebsd'):
localbase = '/usr/local'
etcdir = localbase + '/etc'
else:
localbase = '/usr'
etcdir = '/etc'

files = [
('/etc/nipap/', ['nipap.conf.dist']),
('/usr/sbin/', ['nipapd', 'nipap-passwd']),
('/usr/share/nipap/sql/', [
(etcdir + '/nipap/', ['nipap.conf.dist']),
(localbase + '/sbin/', ['nipapd', 'nipap-passwd']),
(localbase + '/share/nipap/sql/', [
'sql/upgrade-1-2.plsql',
'sql/upgrade-2-3.plsql',
'sql/upgrade-3-4.plsql',
Expand All @@ -30,8 +37,8 @@ def get_data_files():
'sql/triggers.plsql',
'sql/ip_net.plsql'
]),
('/usr/share/man/man8/', ['nipapd.8']),
('/usr/share/man/man1/', ['nipap-passwd.1'])
(localbase + '/share/man/man8/', ['nipapd.8']),
(localbase + '/share/man/man1/', ['nipap-passwd.1'])
]

return files
Expand Down
2 changes: 1 addition & 1 deletion utilities/boilerplate.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/python
#!/usr/bin/env python
""" This is a boilerplate for interacting with NIPAP using Pynipap

It provides things such as basic command line parsing of connection options
Expand Down
2 changes: 1 addition & 1 deletion utilities/export-template.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/python
#!/usr/bin/env python
""" This is a generic file exporter for NIPAP

It fetches prefixes based on a provided query string and feeds that into a
Expand Down
2 changes: 1 addition & 1 deletion utilities/remove-all.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/python
#!/usr/bin/env python
""" This script helps you remove all pools, prefixes or VRFs stored in NIPAP

It can be useful when working on import script and you want to run many
Expand Down