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

Conversation

tykling
Copy link

@tykling tykling commented Apr 17, 2018

Patches to add FreeBSD support.

Mainly handles path issues in setup.py files, also changes some shebang lines to /usr/bin/env instead of hardcoding python paths.

nipapd, nipap-www and nipap-cli all build, install and run well on FreeBSD with this patch. Changes have not been tested on Debian but I expect no issues.

I am open to discussing whether "if sys.platform.startswith('freebsd'):" is the right way to do this, but at least it works.

@@ -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

( '/etc/nipap/', [ 'nipap-www.ini', ] ),
( '/etc/nipap/www', [ 'nipap-www.wsgi', ] ),
( etcdir + '/nipap/', [ 'nipap-www.ini', ] ),
( 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 ')'

@@ -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 ')'

@@ -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

('/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)

@tykling
Copy link
Author

tykling commented Apr 23, 2018

Is there anything else I need to do before this can get merged? Thanks!

The CI build image is now shipped with PostgreSQL 9.2 pre-installed.
Updated the install phase to match this.
Update CI install phase to install PostgreSQL 9.2
@garberg
Copy link
Member

garberg commented Apr 27, 2018

Looks fine to me! Now that the CI pipeline is working again, can you please rebase on the latest master and push anew to verify that the tests pass?

garberg and others added 17 commits May 31, 2018 15:17
Remove the default hash prefix ("!") introduced in AngularJS 1.6 (see
https://docs.angularjs.org/guide/migration#-location-). For the sake of
backwards compatibility, I chose to remove the new default rather than
to change the URLs to match the new default.
The .success() and .error() functions used for handling HTTP queries
have been depricated in favor of .then() and .catch().
Remove a few jQuery-UI classes to make buttons look the same as they did
before the upgrade.
Use the Bootstrap button classes user everywhere else also in dialogs.
Clean up other badges.
Add a "Reviewed by Hound" badge and clean up other badges
Clarified where the xmlrpc_uri config option should be set.
Make the remove button beside an extra attribute in the prefix form
remove the right entry, instead of always removing the last one.
Many users have reported the delay from typing a character to a search
being performed is too short. Increasing from 200 to 500 ms.
@garberg
Copy link
Member

garberg commented Mar 12, 2019

Friendly reminder! 😄

@@ -1,4 +1,4 @@
__version__ = "0.29.6"
__version__ = "0.29.8"

Choose a reason for hiding this comment

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

multiple spaces before operator

@@ -1,4 +1,4 @@
__version__ = "0.29.6"
__version__ = "0.29.8"

Choose a reason for hiding this comment

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

multiple spaces before operator

@@ -1,6 +1,6 @@
import os

__version__ = "0.29.6"
__version__ = "0.29.8"

Choose a reason for hiding this comment

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

tab before operator

@@ -212,7 +212,7 @@
else:
import xmlrpc.client as xmlrpclib

__version__ = "0.29.6"
__version__ = "0.29.8"

Choose a reason for hiding this comment

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

tab before operator

@@ -1,4 +1,4 @@
__version__ = "0.29.6"
__version__ = "0.29.8"

Choose a reason for hiding this comment

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

tab before operator

$(this).parents(".ui-dialog:first").find(":button").removeClass("ui-button");
$(this).parents(".ui-dialog:first").find(":button").removeClass("ui-widget");
$(this).parents(".ui-dialog:first").find(":button").removeClass("ui-corner-all");
$(this).parents(".ui-dialog:first").find(":button:eq(0)").addClass("btn btn-success");

Choose a reason for hiding this comment

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

Line is too long.
Mixed double and single quotes.

$(this).parents(".ui-dialog:first").find(":button:eq(0)").addClass("button button_green");
$(this).parents(".ui-dialog:first").find(":button").removeClass("ui-button");
$(this).parents(".ui-dialog:first").find(":button").removeClass("ui-widget");
$(this).parents(".ui-dialog:first").find(":button").removeClass("ui-corner-all");

Choose a reason for hiding this comment

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

Line is too long.
Mixed double and single quotes.

var msg = data || "Unknown failure";
showDialogNotice('Error', stat + ': ' + msg);
.catch(function (response) {
var msg = response.data || "Unknown failure";

Choose a reason for hiding this comment

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

Mixed double and single quotes.

var msg = data || "Unknown failure";
showDialogNotice('Error', stat + ': ' + msg);
.catch(function (response) {
var msg = response.data || "Unknown failure";

Choose a reason for hiding this comment

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

Mixed double and single quotes.

$scope.from_prefix = data[0];
$scope.prefix_family = data[0].family;
$scope.from_prefix = response.data[0];
$scope.prefix_family = response.data[0].family;

Choose a reason for hiding this comment

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

Identifier 'prefix_family' is not in camel case.

} else {
$scope.from_prefix = data[0];
$scope.prefix_family = data[0].family;
$scope.from_prefix = response.data[0];

Choose a reason for hiding this comment

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

Identifier 'from_prefix' is not in camel case.

var msg = data || "Unknown failure";
showDialogNotice('Error', stat + ': ' + msg);
.catch(function (response) {
var msg = response.data || "Unknown failure";

Choose a reason for hiding this comment

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

Mixed double and single quotes.

} else {
$scope.from_pool = data[0];
$scope.from_pool = response.data[0];

Choose a reason for hiding this comment

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

Identifier 'from_pool' is not in camel case.

var msg = data || "Unknown failure";
showDialogNotice('Error', stat + ': ' + msg);
.catch(function (response) {
var msg = response.data || "Unknown failure";

Choose a reason for hiding this comment

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

Mixed double and single quotes.

var msg = data || "Unknown failure";
showDialogNotice('Error', stat + ': ' + msg);
.catch(function (response) {
var msg = response.data || "Unknown failure";

Choose a reason for hiding this comment

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

Mixed double and single quotes.

var msg = data || "Unknown failure";
showDialogNotice('Error', stat + ': ' + msg);
.catch(function (response) {
var msg = response.data || "Unknown failure";

Choose a reason for hiding this comment

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

Mixed double and single quotes.

} else {
var index = $scope.vrfs.indexOf(vrf);
$scope.vrfs.splice(index, 1);

// Update VRF filter - the removed VRF might be in the
// VRF filter list
$http.get('/xhr/get_current_vrfs')
.success(receiveCurrentVRFs);
.then(function(response) { receiveCurrentVRFs(response.data); });

Choose a reason for hiding this comment

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

Line is too long.

/*
* Remove default hash prefix ("!") introduced in AngularJS 1.6
*/
$locationProvider.hashPrefix("");

Choose a reason for hiding this comment

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

Mixed double and single quotes.

@@ -14,7 +14,7 @@ var nipapApp = angular.module('nipapApp', [
/*
* App configuration
*/
nipapApp.config(function($routeProvider, $uibTooltipProvider, $sceProvider) {
nipapApp.config(function($routeProvider, $uibTooltipProvider, $sceProvider, $locationProvider) {

Choose a reason for hiding this comment

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

Line is too long.

*/
(function(J,d){'use strict';function A(d){k&&d.get("$route")}function B(t,u,g){return{restrict:"ECA",terminal:!0,priority:400,transclude:"element",link:function(a,f,b,c,m){function v(){l&&(g.cancel(l),l=null);p&&(p.$destroy(),p=null);q&&(l=g.leave(q),l.done(function(a){!1!==a&&(l=null)}),q=null)}function E(){var b=t.current&&t.current.locals;if(d.isDefined(b&&b.$template)){var b=a.$new(),c=t.current;q=m(b,function(b){g.enter(b,null,q||f).done(function(b){!1===b||!d.isDefined(w)||w&&!a.$eval(w)||u()});
v()});p=c.scope=b;p.$emit("$viewContentLoaded");p.$eval(k)}else v()}var p,q,l,w=b.autoscroll,k=b.onload||"";a.$on("$routeChangeSuccess",E);E()}}}function C(d,k,g){return{restrict:"ECA",priority:-400,link:function(a,f){var b=g.current,c=b.locals;f.html(c.$template);var m=d(f.contents());if(b.controller){c.$scope=a;var v=k(b.controller,c);b.controllerAs&&(a[b.controllerAs]=v);f.data("$ngControllerController",v);f.children().data("$ngControllerController",v)}a[b.resolveAs||"$resolve"]=c;m(a)}}}var x,
y,F,G,z=d.module("ngRoute",[]).info({angularVersion:"1.7.2"}).provider("$route",function(){function t(a,f){return d.extend(Object.create(a),f)}function u(a,d){var b=d.caseInsensitiveMatch,c={originalPath:a,regexp:a},g=c.keys=[];a=a.replace(/([().])/g,"\\$1").replace(/(\/)?:(\w+)(\*\?|[?*])?/g,function(a,b,d,c){a="?"===c||"*?"===c?"?":null;c="*"===c||"*?"===c?"*":null;g.push({name:d,optional:!!a});b=b||"";return""+(a?"":b)+"(?:"+(a?b:"")+(c&&"(.+?)"||"([^/]+)")+(a||"")+")"+(a||"")}).replace(/([/$*])/g,

Choose a reason for hiding this comment

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

Line is too long.
Missing semicolon.
Mixed double and single quotes.
Too many errors. (44% scanned).

License: MIT
*/
(function(J,d){'use strict';function A(d){k&&d.get("$route")}function B(t,u,g){return{restrict:"ECA",terminal:!0,priority:400,transclude:"element",link:function(a,f,b,c,m){function v(){l&&(g.cancel(l),l=null);p&&(p.$destroy(),p=null);q&&(l=g.leave(q),l.done(function(a){!1!==a&&(l=null)}),q=null)}function E(){var b=t.current&&t.current.locals;if(d.isDefined(b&&b.$template)){var b=a.$new(),c=t.current;q=m(b,function(b){g.enter(b,null,q||f).done(function(b){!1===b||!d.isDefined(w)||w&&!a.$eval(w)||u()});
v()});p=c.scope=b;p.$emit("$viewContentLoaded");p.$eval(k)}else v()}var p,q,l,w=b.autoscroll,k=b.onload||"";a.$on("$routeChangeSuccess",E);E()}}}function C(d,k,g){return{restrict:"ECA",priority:-400,link:function(a,f){var b=g.current,c=b.locals;f.html(c.$template);var m=d(f.contents());if(b.controller){c.$scope=a;var v=k(b.controller,c);b.controllerAs&&(a[b.controllerAs]=v);f.data("$ngControllerController",v);f.children().data("$ngControllerController",v)}a[b.resolveAs||"$resolve"]=c;m(a)}}}var x,

Choose a reason for hiding this comment

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

'k' was used before it was defined.
'l' was used before it was defined.
'p' was used before it was defined.
'q' was used before it was defined.
'w' was used before it was defined.
Expected '{' and instead saw 'v'.
Expected an assignment or function call and instead saw an expression.
Line is too long.
Missing semicolon.
Mixed double and single quotes.

(c) 2010-2018 Google, Inc. http://angularjs.org
License: MIT
*/
(function(J,d){'use strict';function A(d){k&&d.get("$route")}function B(t,u,g){return{restrict:"ECA",terminal:!0,priority:400,transclude:"element",link:function(a,f,b,c,m){function v(){l&&(g.cancel(l),l=null);p&&(p.$destroy(),p=null);q&&(l=g.leave(q),l.done(function(a){!1!==a&&(l=null)}),q=null)}function E(){var b=t.current&&t.current.locals;if(d.isDefined(b&&b.$template)){var b=a.$new(),c=t.current;q=m(b,function(b){g.enter(b,null,q||f).done(function(b){!1===b||!d.isDefined(w)||w&&!a.$eval(w)||u()});

Choose a reason for hiding this comment

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

'b' is already defined.
Confusing use of '!'.
Expected an assignment or function call and instead saw an expression.
Line is too long.
Missing semicolon.
Mixed double and single quotes.

@tykling
Copy link
Author

tykling commented Dec 16, 2019

Sorry, I had not seen your message until now. I think I have rebased with master now.

@tommarcoen
Copy link

Any update on this? I would like to test NIPAP and preferably so on FreeBSD.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants