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

Fixes #7182: Deprecate methods that should never be used #231

Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
16 commits
Select commit Hold shift + click to select a range
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
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ site/content/generic_methods.md
site/pelican-bootstrap3/templates/includes/generic_methods.html
site/content/index.md
site/output/*
site/cache/*
site/*.pid
*.pyc
*.swp
59 changes: 56 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,51 @@
all: clean test doc
#####################################################################################
# Copyright 2015 Normation SAS
#####################################################################################
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, Version 3.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
#####################################################################################


DESTDIR = /usr
INSTALL := $(shell type ginstall >/dev/null 2>&1 && echo ginstall || echo install)
CP_A := cp -rp

all: install

# no dependency
depend: localdepends
localdepends:

build: doc doc/ncf.1

# Install ncf in DESTDIR
install: build
mkdir -p $(DESTDIR)
mkdir -p $(DESTDIR)/share/doc/ncf
$(CP_A) doc $(DESTDIR)/share/doc/ncf/
$(CP_A) examples $(DESTDIR)/share/doc/ncf/
$(INSTALL) -m 644 README.md $(DESTDIR)/share/doc/ncf/
mkdir -p $(DESTDIR)/share/ncf
$(CP_A) tree $(DESTDIR)/share/ncf/
$(CP_A) tools $(DESTDIR)/share/ncf/
$(CP_A) builder $(DESTDIR)/share/ncf/
$(CP_A) api $(DESTDIR)/share/ncf/
$(INSTALL) -m 755 ncf $(DESTDIR)/share/ncf/
mkdir -p $(DESTDIR)/bin
ln -s ../share/ncf/ncf $(DESTDIR)/bin/ncf
mkdir -p $(DESTDIR)/share/man/man1
$(INSTALL) -m 644 doc/ncf.1 $(DESTDIR)/share/man/man1/

test:
type fakeroot 2>/dev/null || { echo "fakeroot is required but not found." ; exit 1 ; }
Expand All @@ -7,9 +54,14 @@ test:
cd tests/acceptance/ && ./testall --no-network
cd tests/acceptance/ && ./testall

doc:
doc:
ls tree/30_generic_methods/*.cf | xargs egrep -h "^\s*bundle\s+agent\s+" | sed -r "s/\s*bundle\s+agent\s+//" | sort > doc/all_generic_methods.txt
tools/ncf_doc.py
rm -f tools/ncf_doc.pyc
rm -f tools/ncf.pyc

doc/ncf.1:
cd doc && a2x --doctype manpage --format manpage ncf.asciidoc

html: doc
# To use this, run pip install pelican Markdown
Expand Down Expand Up @@ -44,8 +96,9 @@ clean:
rm -rf tests/acceptance/workdir/
rm -f doc/all_generic_methods.txt
rm -f doc/generic_methods.md
rm -f doc/ncf.1
find $(CURDIR) -iname "*.pyc" -delete

distclean: clean

.PHONY: all test doc clean distclean
.PHONY: all test doc clean distclean depend localdepend build install
2 changes: 1 addition & 1 deletion api/run.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!flask/bin/python
#!/usr/bin/python

# This file is only present for development/ local test and should not be used in production
# To deploy ncf api you should use it with a virtual environment and a wsgi file
Expand Down
Empty file modified builder/README.md
100755 → 100644
Empty file.
Empty file modified builder/css/bootstrap.min.css
100755 → 100644
Empty file.
Empty file modified builder/css/custom.css
100755 → 100644
Empty file.
Empty file modified builder/fonts/glyphicons-halflings-regular.eot
100755 → 100644
Empty file.
Empty file modified builder/fonts/glyphicons-halflings-regular.svg
100755 → 100644
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified builder/fonts/glyphicons-halflings-regular.ttf
100755 → 100644
Empty file.
Empty file modified builder/fonts/glyphicons-halflings-regular.woff
100755 → 100644
Empty file.
Empty file modified builder/index.html
100755 → 100644
Empty file.
Empty file modified builder/js/bootstrap.min.js
100755 → 100644
Empty file.
Empty file modified builder/js/jquery-1.11.1.min.js
100755 → 100644
Empty file.
2 changes: 1 addition & 1 deletion builder/js/ncf.js
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -485,7 +485,7 @@ app.controller('ncf-builder', function ($scope, $modal, $http, $log, $location,
// Get the class value generated from a class prefix and a class kind (kept,repaired,error, ...)
$scope.getClassKind= function(method_call,kind) {
// do not canonify what is between ${ }
var param = $scope.getClassParameter(method_call).replace(/[^\${}\w](?![^{}]+})|\$(?!{)/g,"_");
var param = $scope.getClassParameter(method_call).replace(/\\'/g, "'").replace(/\\"/g, '"').replace(/[^\${}\w](?![^{}]+})|\$(?!{)/g,"_");
return $scope.getClassPrefix(method_call)+"_"+param +"_"+kind
}

Expand Down
11 changes: 11 additions & 0 deletions debian/changelog
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
ncf (0.201507210500) jessie; urgency=low

* First official version

-- Benoît PECCATTE <benoit.peccatte@normation.com> Tue, 21 Jul 2015 11:55:00 +0100

ncf (0.2013120500) squeeze; urgency=low

* Initial release

-- Matthieu CERDA <matthieu.cerda@normation.com> Thu, 05 Dec 2013 15:50:24 +0100
1 change: 1 addition & 0 deletions debian/compat
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
7
16 changes: 16 additions & 0 deletions debian/control
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
Source: ncf
Section: admin
Priority: extra
Maintainer: Rudder packaging team <rudder-packaging@rudder-project.org>
Build-Depends: debhelper (>= 7), python, asciidoc, libxml2-utils, xsltproc, docbook-xml, docbook-xsl
Standards-Version: 3.8.0
Homepage: http://www.ncf.io

Package: ncf
Architecture: all
Depends: ${misc:Depends}
Suggests: cfengine3 (>=3.5.0), cfengine-community (>=3.5.0), rudder-agent (>=2.8.0), python (>=2.6)
Description: CFEngine framework
ncf is a CFEngine framework aimed at helping newcomers on CFEngine
to be more quickly operationnal and old timers to spend less time
focusing on low level details and have more time for fun things.
23 changes: 23 additions & 0 deletions debian/copyright
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
This package was debianized by:

Matthieu CERDA <matthieu.cerda@normation.com> on Thu, 05 Dec 2013 15:50:24 +0100

It was downloaded from:

http://www.ncf.io/

Copyright:

Copyright (C) 2013 Normation SAS

License:

GNU General Public Licence version 3

On Debian systems, the complete text of the GNU General
Public License can be found in `/usr/share/common-licenses/GPL-3'.

The Debian packaging is:

Copyright (C) 2013 Normation SAS

75 changes: 75 additions & 0 deletions debian/rules
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
#!/usr/bin/make -f
# -*- makefile -*-
# Sample debian/rules that uses debhelper.
# This file was originally written by Joey Hess and Craig Small.
# As a special exception, when this file is copied by dh-make into a
# dh-make output file, you may use that output file without restriction.
# This special exception was added by Craig Small in version 0.37 of dh-make.

# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1

configure: configure-stamp
configure-stamp:
dh_testdir

# Add here commands to configure the package.

build: build-arch build-indep
build-arch: build-stamp
build-indep: build-stamp

build-stamp: configure-stamp
dh_testdir

touch $@

clean:
dh_testdir
dh_testroot
rm -f build-stamp configure-stamp

# Add here commands to clean up after the build process.
dh_clean

install: build
dh_testdir
dh_testroot
dh_prep
dh_installdirs
make install DESTDIR=$(CURDIR)/debian/tmp/usr

# Build architecture-dependent files here.
binary-arch: install
# We have nothing to do by default.

# Build architecture-independent files here.
binary-indep: install
dh_testdir
dh_testroot
dh_installchangelogs
dh_install debian/copyright /usr/share/doc/ncf/
dh_install usr /

# dh_installmenu
# dh_installdebconf
# dh_installlogrotate
# dh_installmime
# dh_python
# dh_installcron
# dh_installinfo
dh_installman
dh_link
dh_strip
dh_compress
dh_fixperms
# dh_perl
# dh_makeshlibs
dh_installdeb
dh_shlibdeps
dh_gencontrol
dh_md5sums
dh_builddeb

binary: binary-indep binary-arch
.PHONY: build clean binary-indep binary-arch binary install configure
Empty file removed doc/.placeholder
Empty file.
34 changes: 34 additions & 0 deletions doc/ncf.asciidoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
= ncf(1)
:doctype: manpage

== NAME

ncf - CFEngine framework

== SYNOPSIS

*ncf* init [path]

== DESCRIPTION

Initialize a new ncf repository.
This will copy the tree content in a new directory.
This allows you to have a live content that can be used and modified on a CFEngine server.

== OPTIONS

Running ncf without arguments gives a basic help line.

== AUTHOR

Normation SAS (contact@normation.com)

== RESOURCES

Main web site: https://ncf.io/

Sources: https://github.com/Normation/ncf/

== COPYING

Copyright \(C) 2014-2015 Normation SAS.
111 changes: 111 additions & 0 deletions ncf.spec
Original file line number Diff line number Diff line change
@@ -0,0 +1,111 @@
#####################################################################################
# Copyright 2012 Normation SAS
#####################################################################################
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, Version 3.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
#####################################################################################

#=================================================
# Specification file for ncf
#
# Install the ncf framework
#
# Copyright (C) 2013 Normation
#=================================================

#=================================================
# Variables
#=================================================
#%define installdir /usr

#=================================================
# Header
#=================================================
Summary: CFEngine framework
Name: ncf
Version: %{real_version}
Release: 1%{?dist}
Epoch: 0
License: GPLv3
URL: http://www.ncf.io
Source: ncf-%{version}.tar.gz

Group: Applications/System

BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildArch: noarch

# Add Requires here - order is important
BuildRequires: python, asciidoc, libxml2, libxslt, docbook-dtds, docbook-style-xsl

%description
ncf is a CFEngine framework aimed at helping newcomers on CFEngine
to be more quickly operationnal and old timers to spend less time
focusing on low level details and have more time for fun things.

#=================================================
# Source preparation
#=================================================
%prep
%setup

#=================================================
# Building
#=================================================
%build

#=================================================
# Installation
#=================================================
%install

rm -rf %{buildroot}
ls
cat Makefile
make install DESTDIR=%{buildroot}/usr

%pre -n ncf
#=================================================
# Pre Installation
#=================================================


%post -n ncf
#=================================================
# Post Installation
#=================================================


#=================================================
# Cleaning
#=================================================
%clean
rm -rf %{buildroot}

#=================================================
# Files
#=================================================
%files
%defattr(-, root, root, 0755)
/usr/


#=================================================
# Changelog
#=================================================
%changelog
* Tue Jul 21 2015 - Benoît PECCATTE <benoit.peccatte@normation.com> 0.201507210500-1
- First official version
* Thu Dec 05 2013 - Matthieu CERDA <matthieu.cerda@normation.com> 0.2013120500-1
- Initial release
6 changes: 6 additions & 0 deletions site/content/bugtracker.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
Title: Bugtracker

For a full-sized experience, please click <a href="http://www.rudder-project.org/redmine/projects/ncf?jump=welcome">here</a>

<iframe width="100%" height="768" src="http://www.rudder-project.org/redmine/projects/ncf?jump=welcome"></iframe>

3 changes: 3 additions & 0 deletions tests/unit/test_expected_reports_with_quote.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# This file contains one line per report expected by Rudder from this technique
# Format: technique_name;;class_prefix_${key};;@@RUDDER_ID@@;;component name;;component key
Technique_with_quote;;command_execution_/bin/echo 'Executing echo';;@@RUDDER_ID@@;;Command execution;;/bin/echo \'Executing echo\'
Loading