diff --git a/ChangeLog b/ChangeLog index d97bfe9a9ce..4a88f51c07d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -105,6 +105,38 @@ removed. You must now use the 6 parameters way. See file modMyModule.class.php f - Properties "civilite_id" were renamed into "civility_id". + +***** ChangeLog for 3.5.4 compared to 3.5.3 ***** +Fix: [ bug #1431 ] Reception and Send supplier order box has a weird top margin. +Fix: [ bug #1428 ] "Nothing" is shown in the middle of the screen in a supplier order. +Fix: The object deliverycompany was not used anymore and output of + details for delivery reports was lost during 3.5. Rewrite code to + restore feature. +Fix: [ bug #1445 ] html fix : missing +Fix: [ bug #1415 ] Intervention document model name and suppliers model names is not shown + properly in module configuration +Fix: [ bug #1416 ] Supplier order does not list document models in the select box of the + supplier order card +Fix: [ bug #1443 ] Payment conditions is erased after editing supplier invoice label or + limit date for payment +Fix: Filter on status was not visible when selected from url. +Fix: Filtering on status was last when asking to sort. +Fix: [ bug #1432 ] Trigger SHIPPING_CREATE ignores interception on error. +Fix: [ bug #1449 ] Trigger ORDER_CREATE, LINEORDER_DELETE, LINEORDER_UPDATE and LINEORDER_INSERT ignore interception on error. +Fix: [ bug #1450 ] Several Customer order's triggers do not report the error from the trigger handler. +Fix: [ bug #1451 ] Interrupted order clone through trigger, loads nonexistent order. +Fix: [ bug #1454 ] Mention de bas de page erroné +Fix: Do not display dictionnay for non activated module +Fix: Link element from element project pages +Fix: [ bug #1509 ] Expedition admin free text & watermark submit error +Fix: [ bug #1349 ] AJAX contact selector does not work fine in Project card +Fix: [ bug #1452 ] variable used but not defined +Fix: If multiprice level is used the VAT on addline is not correct +Fix: [ bug #1254 ] Error when using "Enter" on qty input box of a product (on supplier order part) +Fix: [ bug #1462, 1468, 1480, 1483, 1490, 1497] $this instead of $object +Fix: [ bug #1455 ] outstanding amount +Fix: [ bug #1425 ] + ***** ChangeLog for 3.5.3 compared to 3.5.2 ***** Fix: Error on field accountancy code for export profile of invoices. Fix: [ bug #1351 ] VIES verification link broken. @@ -133,6 +165,13 @@ Fix: [ bug #1393 ] PHP Warning when creating a supplier invoice. Fix: [ bug #1399 ] [pgsql] Silent warning when setting a propal as "facturée" in propal.php Fix: When number reach 9999 with default numbering module, next number will be 10000 instead of 0000 and error. +Fix: element page on project give wrong href link. +Fix: [ bug #1397 ] Filter by supplier orders with status Draft does not filter. +Fix: [ bug #1388 ] Wrong date when invoicing several orders. +Fix: [ bug #1411 ] Unable to set an expedition note if invoices module is not enabled. +Fix: [ bug #1407 ] Rouget pdf overlapped when using tracking number and public notes. +Fix: [ bug #1405 ] Rouget PDF expedition incorrect when two expeditions under the same commande +Fix: [ bug #1434 ] Muscadet supplier order document model linked objects overlap the text ***** ChangeLog for 3.5.2 compared to 3.5.1 ***** Fix: Can't add user for a task. @@ -220,6 +259,7 @@ Fix: [ bug #1306 ] Fatal error when adding an external calendar. New: Added es_CL language Fix: Margin tabs bad data show Fix: [ bug #1318 ] Problem with enter key when adding an existing product to a customer invoice. +Fix: [ bug #1410 ] Add customer order line asks for required Unit Price but doesn't interrupt the creation of the line ***** ChangeLog for 3.5 compared to 3.4.* ***** For users: diff --git a/build/debian/changelog b/build/debian/changelog index d4a3c561ee0..afa2aabf7ca 100644 --- a/build/debian/changelog +++ b/build/debian/changelog @@ -1,10 +1,17 @@ -dolibarr (3.6.0-1) unstable; urgency=low +dolibarr (3.6.0-2) unstable; urgency=low [ Laurent Destailleur (eldy) ] * New upstream release. -- Laurent Destailleur (eldy) Sat, 9 May 2014 12:00:00 +0100 +dolibarr (3.5.4-3) unstable; urgency=low + + [ Laurent Destailleur (eldy) ] + * New upstream release. + + -- Laurent Destailleur (eldy) Tue, 1 July 2014 12:00:00 +0100 + dolibarr (3.5.3-3) unstable; urgency=low [ Laurent Destailleur (eldy) ] diff --git a/build/debian/control b/build/debian/control index f573f64b812..d22f556acaa 100755 --- a/build/debian/control +++ b/build/debian/control @@ -39,10 +39,10 @@ Description: Web based software to manage a company or foundation It's a web software you can install as a standalone program or on any web hosting provider to use it from anywhere with any web browser. . - Dolibarr was designed to be easy to use. Only the features that you need are - visible, depending on which modules were activated. + Dolibarr was designed to be easy to use. Only the features that you need + are visible, depending on which modules were activated. . - Most common used modules are: + This is an example of most common used modules: . Customers, Suppliers or Prospects directory, Contacts directory, @@ -66,6 +66,6 @@ Description: Web based software to manage a company or foundation Wizards to export and import data, LDAP connectivity, PDF exports, - And a lot of more modules... + And a lot more modules... . You can also add third parties external modules or develop yours. diff --git a/build/rpm/dolibarr_fedora.spec b/build/rpm/dolibarr_fedora.spec index 4eb3a0b25c1..ffd60227596 100755 --- a/build/rpm/dolibarr_fedora.spec +++ b/build/rpm/dolibarr_fedora.spec @@ -333,6 +333,9 @@ fi # version x.y.z-0.1.a for alpha, x.y.z-0.2.b for beta, x.y.z-0.3 for release %changelog +* Wed Jun 20 2014 Laurent Destailleur 3.5.4-0.3 +- Upstream release + * Fri May 9 2014 Laurent Destailleur 3.6.0-0.2.b - Upstream release diff --git a/build/rpm/dolibarr_generic.spec b/build/rpm/dolibarr_generic.spec index 88a80996114..0a99f8180ac 100755 --- a/build/rpm/dolibarr_generic.spec +++ b/build/rpm/dolibarr_generic.spec @@ -569,6 +569,9 @@ fi # version x.y.z-0.1.a for alpha, x.y.z-0.2.b for beta, x.y.z-0.3 for release %changelog +* Wed Jun 20 2014 Laurent Destailleur 3.5.4-0.3 +- Upstream release + * Fri May 9 2014 Laurent Destailleur 3.6.0-0.2.b - Upstream release diff --git a/build/rpm/dolibarr_mandriva.spec b/build/rpm/dolibarr_mandriva.spec index 957190a23a1..3242d59a3da 100755 --- a/build/rpm/dolibarr_mandriva.spec +++ b/build/rpm/dolibarr_mandriva.spec @@ -338,6 +338,9 @@ fi # version x.y.z-0.1.a for alpha, x.y.z-0.2.b for beta, x.y.z-0.3 for release %changelog +* Wed Jun 20 2014 Laurent Destailleur 3.5.4-0.3 +- Upstream release + * Fri May 9 2014 Laurent Destailleur 3.6.0-0.2.b - Upstream release diff --git a/build/rpm/dolibarr_opensuse.spec b/build/rpm/dolibarr_opensuse.spec index 92bb1312840..2781f9b8dbf 100755 --- a/build/rpm/dolibarr_opensuse.spec +++ b/build/rpm/dolibarr_opensuse.spec @@ -349,6 +349,9 @@ fi # version x.y.z-0.1.a for alpha, x.y.z-0.2.b for beta, x.y.z-0.3 for release %changelog +* Wed Jun 20 2014 Laurent Destailleur 3.5.4-0.3 +- Upstream release + * Fri May 9 2014 Laurent Destailleur 3.6.0-0.2.b - Upstream release diff --git a/dev/deduplicatefilelinesrecursively.sh b/dev/deduplicatefilelinesrecursively.sh index ad64e546829..a0eb14974f0 100755 --- a/dev/deduplicatefilelinesrecursively.sh +++ b/dev/deduplicatefilelinesrecursively.sh @@ -15,7 +15,7 @@ fi # To detect if [ "x$1" = "xlist" ] then - for file in `find . -type f` + for file in `find . -type f -name *.lang` do if [ `sort "$file" | uniq -d | wc -l` -gt 0 ] then @@ -27,7 +27,7 @@ fi # To fix if [ "x$1" = "xfix" ] then - for file in `find . -type f` + for file in `find . -type f -name *.lang` do awk -i inplace ' !x[$0]++' "$file" done; diff --git a/dev/vagrant/README.md b/dev/vagrant/README.md index 1a84a8db4b3..8056643520e 100644 --- a/dev/vagrant/README.md +++ b/dev/vagrant/README.md @@ -45,9 +45,9 @@ Somewhat bleeding edge vagrant box for develop branch related work. - IP: 192.168.42.101 - Vhost: dev.dolibarr.org -- OS: Debian Wheezy 7.2 -- Webserver: Apache 2.2 -- PHP: mod_php 5.5 +- OS: Debian Wheezy 7.5 +- Webserver: Apache 2.2.22 +- PHP: mod_php 5.5.13-1~dotdeb.1 - Database: MySQL 5.5 - Root user: root - Root password: root @@ -57,6 +57,5 @@ Somewhat bleeding edge vagrant box for develop branch related work. - Initial data: dev/initdata/mysqldump_dolibarr-3.5.0.sql - Debugger: XDebug - Profiler: Xhprof -- phpMyAdmin: You can access MailCatcher to read all outgoing emails at http://192.168.42.101:1080 diff --git a/dev/vagrant/dolibarrdev/Vagrantfile b/dev/vagrant/dolibarrdev/Vagrantfile index e384eb2976b..f73476207d0 100644 --- a/dev/vagrant/dolibarrdev/Vagrantfile +++ b/dev/vagrant/dolibarrdev/Vagrantfile @@ -5,15 +5,11 @@ dir = File.dirname(File.expand_path(__FILE__)) configValues = YAML.load_file("#{dir}/puphpet/config.yaml") data = configValues['vagrantfile-local'] -if !data['vm']['provider']['virtualbox'].empty? - ENV['VAGRANT_DEFAULT_PROVIDER'] = 'virtualbox' -end - Vagrant.configure("2") do |config| config.vm.box = "#{data['vm']['box']}" config.vm.box_url = "#{data['vm']['box_url']}" - if data['vm']['hostname'].to_s != '' + if data['vm']['hostname'].to_s.strip.length != 0 config.vm.hostname = "#{data['vm']['hostname']}" end @@ -28,34 +24,96 @@ Vagrant.configure("2") do |config| end data['vm']['synced_folder'].each do |i, folder| - if folder['source'] != '' && folder['target'] != '' && folder['id'] != '' + if folder['source'] != '' && folder['target'] != '' nfs = (folder['nfs'] == "true") ? "nfs" : nil - config.vm.synced_folder "#{folder['source']}", "#{folder['target']}", id: "#{folder['id']}", type: nfs, :mount_options => ["dmode=777","fmode=666"] + if nfs == "nfs" + config.vm.synced_folder "#{folder['source']}", "#{folder['target']}", id: "#{i}", type: nfs + else + config.vm.synced_folder "#{folder['source']}", "#{folder['target']}", id: "#{i}", type: nfs, + group: 'www-data', owner: 'www-data', mount_options: ["dmode=775", "fmode=764"] + end end end config.vm.usable_port_range = (10200..10500) - if !data['vm']['provider']['virtualbox'].empty? + if data['vm']['chosen_provider'].empty? || data['vm']['chosen_provider'] == "virtualbox" + ENV['VAGRANT_DEFAULT_PROVIDER'] = 'virtualbox' + config.vm.provider :virtualbox do |virtualbox| data['vm']['provider']['virtualbox']['modifyvm'].each do |key, value| + if key == "memory" + next + end + if key == "natdnshostresolver1" value = value ? "on" : "off" end + virtualbox.customize ["modifyvm", :id, "--#{key}", "#{value}"] end + + virtualbox.customize ["modifyvm", :id, "--memory", "#{data['vm']['memory']}"] + + if data['vm']['hostname'].to_s.strip.length != 0 + virtualbox.customize ["modifyvm", :id, "--name", config.vm.hostname] + end end end + if data['vm']['chosen_provider'] == "vmware_fusion" || data['vm']['chosen_provider'] == "vmware_workstation" + ENV['VAGRANT_DEFAULT_PROVIDER'] = (data['vm']['chosen_provider'] == "vmware_fusion") ? "vmware_fusion" : "vmware_workstation" + + config.vm.provider "vmware_fusion" do |v| + data['vm']['provider']['vmware'].each do |key, value| + if key == "memsize" + next + end + + v.vmx["#{key}"] = "#{value}" + end + + v.vmx["memsize"] = "#{data['vm']['memory']}" + + if data['vm']['hostname'].to_s.strip.length != 0 + v.vmx["displayName"] = config.vm.hostname + end + end + end + + if data['vm']['chosen_provider'] == "parallels" + ENV['VAGRANT_DEFAULT_PROVIDER'] = "parallels" + + config.vm.provider "parallels" do |v| + data['vm']['provider']['parallels'].each do |key, value| + if key == "memsize" + next + end + + v.customize ["set", :id, "--#{key}", "#{value}"] + end + + v.memory = "#{data['vm']['memory']}" + + if data['vm']['hostname'].to_s.strip.length != 0 + v.name = config.vm.hostname + end + end + end + + ssh_username = !data['ssh']['username'].nil? ? data['ssh']['username'] : "vagrant" + config.vm.provision "shell" do |s| s.path = "puphpet/shell/initial-setup.sh" s.args = "/vagrant/puphpet" end + config.vm.provision "shell" do |kg| + kg.path = "puphpet/shell/ssh-keygen.sh" + kg.args = "#{ssh_username}" + end config.vm.provision :shell, :path => "puphpet/shell/update-puppet.sh" - config.vm.provision :shell, :path => "puphpet/shell/r10k.sh" config.vm.provision :puppet do |puppet| - ssh_username = !data['ssh']['username'].nil? ? data['ssh']['username'] : "vagrant" puppet.facter = { "ssh_username" => "#{ssh_username}", "provisioner_type" => ENV['VAGRANT_DEFAULT_PROVIDER'], @@ -63,12 +121,16 @@ Vagrant.configure("2") do |config| } puppet.manifests_path = "#{data['vm']['provision']['puppet']['manifests_path']}" puppet.manifest_file = "#{data['vm']['provision']['puppet']['manifest_file']}" + puppet.module_path = "#{data['vm']['provision']['puppet']['module_path']}" if !data['vm']['provision']['puppet']['options'].empty? puppet.options = data['vm']['provision']['puppet']['options'] end end + config.vm.provision :shell, :path => "puphpet/shell/execute-files.sh" + config.vm.provision :shell, :path => "puphpet/shell/important-notices.sh" + if File.file?("#{dir}/puphpet/files/dot/ssh/id_rsa") config.ssh.private_key_path = [ "#{dir}/puphpet/files/dot/ssh/id_rsa", @@ -76,15 +138,6 @@ Vagrant.configure("2") do |config| ] end - ssh_username = !data['ssh']['username'].nil? ? data['ssh']['username'] : "vagrant" - - config.vm.provision "shell" do |kg| - kg.path = "puphpet/shell/ssh-keygen.sh" - kg.args = "#{ssh_username}" - end - - config.vm.provision :shell, :path => "puphpet/shell/execute-files.sh" - if !data['ssh']['host'].nil? config.ssh.host = "#{data['ssh']['host']}" end diff --git a/dev/vagrant/dolibarrdev/puphpet/config.yaml b/dev/vagrant/dolibarrdev/puphpet/config.yaml index d5610f0928a..5cfb2601f21 100644 --- a/dev/vagrant/dolibarrdev/puphpet/config.yaml +++ b/dev/vagrant/dolibarrdev/puphpet/config.yaml @@ -1,32 +1,35 @@ --- vagrantfile-local: vm: - box: debian-wheezy72-x64-vbox43 - box_url: 'http://box.puphpet.com/debian-wheezy72-x64-vbox43.box' + box: puphpet/debian75-x64 + box_url: puphpet/debian75-x64 hostname: null + memory: '512' + chosen_provider: virtualbox network: private_network: 192.168.42.101 - forwarded_port: - XnCD0YcW5aic: - host: '9252' - guest: '22' + forwarded_port: { } provider: virtualbox: modifyvm: natdnshostresolver1: on - memory: '512' setextradata: VBoxInternal2/SharedFoldersEnableSymlinksCreate/v-root: 1 + vmware: + numvcpus: 1 + parallels: + cpus: 1 provision: puppet: manifests_path: puphpet/puppet manifest_file: manifest.pp + module_path: puphpet/puppet/modules options: - '--verbose' - '--hiera_config /vagrant/puphpet/puppet/hiera.yaml' - '--parser future' synced_folder: - bH8PX003LLNi: + PL1BkioqqvGY: source: ../../../ target: /var/www nfs: 'false' @@ -60,12 +63,15 @@ mailcatcher: http_port: '1080' mailcatcher_path: /usr/local/bin log_path: /var/log/mailcatcher/mailcatcher.log +firewall: + install: '1' + rules: null apache: install: '1' settings: user: www-data group: www-data - default_vhost: true + default_vhost: false manage_user: false manage_group: false sendfile: 0 @@ -73,7 +79,7 @@ apache: - php - rewrite vhosts: - 2iyFAvXD9OZU: + CGyWQB0fx4x0: servername: dev.dolibarr.org docroot: /var/www/htdocs port: '80' @@ -91,7 +97,7 @@ apache: nginx: install: 0 vhosts: - N7iqVXFhLCgi: + jeF1sybIJ3V2: server_name: awesome.dev server_aliases: - www.awesome.dev @@ -103,10 +109,13 @@ nginx: - index.php envvars: - 'APP_ENV dev' + ssl_cert: '' + ssl_key: '' php: install: '1' version: '55' composer: '1' + composer_home: '' modules: php: - cli @@ -141,10 +150,9 @@ drush: mysql: install: '1' root_password: root - phpmyadmin: '1' adminer: 0 databases: - 8oNQ7e6GCpdw: + 2OfuuapoIqsl: grant: - ALTER - CREATE @@ -171,7 +179,6 @@ postgresql: mariadb: install: 0 root_password: '123' - phpmyadmin: 0 adminer: 0 databases: { } version: '10.0' diff --git a/dev/vagrant/dolibarrdev/puphpet/files/dot/.bash_git b/dev/vagrant/dolibarrdev/puphpet/files/dot/.bash_git new file mode 100644 index 00000000000..853425d005c --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/files/dot/.bash_git @@ -0,0 +1,491 @@ +# bash/zsh git prompt support +# +# Copyright (C) 2006,2007 Shawn O. Pearce +# Distributed under the GNU General Public License, version 2.0. +# +# This script allows you to see repository status in your prompt. +# +# To enable: +# +# 1) Copy this file to somewhere (e.g. ~/.git-prompt.sh). +# 2) Add the following line to your .bashrc/.zshrc: +# source ~/.git-prompt.sh +# 3a) Change your PS1 to call __git_ps1 as +# command-substitution: +# Bash: PS1='[\u@\h \W$(__git_ps1 " (%s)")]\$ ' +# ZSH: setopt PROMPT_SUBST ; PS1='[%n@%m %c$(__git_ps1 " (%s)")]\$ ' +# the optional argument will be used as format string. +# 3b) Alternatively, for a slightly faster prompt, __git_ps1 can +# be used for PROMPT_COMMAND in Bash or for precmd() in Zsh +# with two parameters,
 and , which are strings
+#        you would put in $PS1 before and after the status string
+#        generated by the git-prompt machinery.  e.g.
+#        Bash: PROMPT_COMMAND='__git_ps1 "\u@\h:\w" "\\\$ "'
+#          will show username, at-sign, host, colon, cwd, then
+#          various status string, followed by dollar and SP, as
+#          your prompt.
+#        ZSH:  precmd () { __git_ps1 "%n" ":%~$ " "|%s" }
+#          will show username, pipe, then various status string,
+#          followed by colon, cwd, dollar and SP, as your prompt.
+#        Optionally, you can supply a third argument with a printf
+#        format string to finetune the output of the branch status
+#
+# The repository status will be displayed only if you are currently in a
+# git repository. The %s token is the placeholder for the shown status.
+#
+# The prompt status always includes the current branch name.
+#
+# In addition, if you set GIT_PS1_SHOWDIRTYSTATE to a nonempty value,
+# unstaged (*) and staged (+) changes will be shown next to the branch
+# name.  You can configure this per-repository with the
+# bash.showDirtyState variable, which defaults to true once
+# GIT_PS1_SHOWDIRTYSTATE is enabled.
+#
+# You can also see if currently something is stashed, by setting
+# GIT_PS1_SHOWSTASHSTATE to a nonempty value. If something is stashed,
+# then a '$' will be shown next to the branch name.
+#
+# If you would like to see if there're untracked files, then you can set
+# GIT_PS1_SHOWUNTRACKEDFILES to a nonempty value. If there're untracked
+# files, then a '%' will be shown next to the branch name.  You can
+# configure this per-repository with the bash.showUntrackedFiles
+# variable, which defaults to true once GIT_PS1_SHOWUNTRACKEDFILES is
+# enabled.
+#
+# If you would like to see the difference between HEAD and its upstream,
+# set GIT_PS1_SHOWUPSTREAM="auto".  A "<" indicates you are behind, ">"
+# indicates you are ahead, "<>" indicates you have diverged and "="
+# indicates that there is no difference. You can further control
+# behaviour by setting GIT_PS1_SHOWUPSTREAM to a space-separated list
+# of values:
+#
+#     verbose       show number of commits ahead/behind (+/-) upstream
+#     name          if verbose, then also show the upstream abbrev name
+#     legacy        don't use the '--count' option available in recent
+#                   versions of git-rev-list
+#     git           always compare HEAD to @{upstream}
+#     svn           always compare HEAD to your SVN upstream
+#
+# By default, __git_ps1 will compare HEAD to your SVN upstream if it can
+# find one, or @{upstream} otherwise.  Once you have set
+# GIT_PS1_SHOWUPSTREAM, you can override it on a per-repository basis by
+# setting the bash.showUpstream config variable.
+#
+# If you would like to see more information about the identity of
+# commits checked out as a detached HEAD, set GIT_PS1_DESCRIBE_STYLE
+# to one of these values:
+#
+#     contains      relative to newer annotated tag (v1.6.3.2~35)
+#     branch        relative to newer tag or branch (master~4)
+#     describe      relative to older annotated tag (v1.6.3.1-13-gdd42c2f)
+#     default       exactly matching tag
+#
+# If you would like a colored hint about the current dirty state, set
+# GIT_PS1_SHOWCOLORHINTS to a nonempty value. The colors are based on
+# the colored output of "git status -sb" and are available only when
+# using __git_ps1 for PROMPT_COMMAND or precmd.
+
+# check whether printf supports -v
+__git_printf_supports_v=
+printf -v __git_printf_supports_v -- '%s' yes >/dev/null 2>&1
+
+# stores the divergence from upstream in $p
+# used by GIT_PS1_SHOWUPSTREAM
+__git_ps1_show_upstream ()
+{
+	local key value
+	local svn_remote svn_url_pattern count n
+	local upstream=git legacy="" verbose="" name=""
+
+	svn_remote=()
+	# get some config options from git-config
+	local output="$(git config -z --get-regexp '^(svn-remote\..*\.url|bash\.showupstream)$' 2>/dev/null | tr '\0\n' '\n ')"
+	while read -r key value; do
+		case "$key" in
+		bash.showupstream)
+			GIT_PS1_SHOWUPSTREAM="$value"
+			if [[ -z "${GIT_PS1_SHOWUPSTREAM}" ]]; then
+				p=""
+				return
+			fi
+			;;
+		svn-remote.*.url)
+			svn_remote[$((${#svn_remote[@]} + 1))]="$value"
+			svn_url_pattern="$svn_url_pattern\\|$value"
+			upstream=svn+git # default upstream is SVN if available, else git
+			;;
+		esac
+	done <<< "$output"
+
+	# parse configuration values
+	for option in ${GIT_PS1_SHOWUPSTREAM}; do
+		case "$option" in
+		git|svn) upstream="$option" ;;
+		verbose) verbose=1 ;;
+		legacy)  legacy=1  ;;
+		name)    name=1 ;;
+		esac
+	done
+
+	# Find our upstream
+	case "$upstream" in
+	git)    upstream="@{upstream}" ;;
+	svn*)
+		# get the upstream from the "git-svn-id: ..." in a commit message
+		# (git-svn uses essentially the same procedure internally)
+		local -a svn_upstream
+		svn_upstream=($(git log --first-parent -1 \
+					--grep="^git-svn-id: \(${svn_url_pattern#??}\)" 2>/dev/null))
+		if [[ 0 -ne ${#svn_upstream[@]} ]]; then
+			svn_upstream=${svn_upstream[${#svn_upstream[@]} - 2]}
+			svn_upstream=${svn_upstream%@*}
+			local n_stop="${#svn_remote[@]}"
+			for ((n=1; n <= n_stop; n++)); do
+				svn_upstream=${svn_upstream#${svn_remote[$n]}}
+			done
+
+			if [[ -z "$svn_upstream" ]]; then
+				# default branch name for checkouts with no layout:
+				upstream=${GIT_SVN_ID:-git-svn}
+			else
+				upstream=${svn_upstream#/}
+			fi
+		elif [[ "svn+git" = "$upstream" ]]; then
+			upstream="@{upstream}"
+		fi
+		;;
+	esac
+
+	# Find how many commits we are ahead/behind our upstream
+	if [[ -z "$legacy" ]]; then
+		count="$(git rev-list --count --left-right \
+				"$upstream"...HEAD 2>/dev/null)"
+	else
+		# produce equivalent output to --count for older versions of git
+		local commits
+		if commits="$(git rev-list --left-right "$upstream"...HEAD 2>/dev/null)"
+		then
+			local commit behind=0 ahead=0
+			for commit in $commits
+			do
+				case "$commit" in
+				"<"*) ((behind++)) ;;
+				*)    ((ahead++))  ;;
+				esac
+			done
+			count="$behind	$ahead"
+		else
+			count=""
+		fi
+	fi
+
+	# calculate the result
+	if [[ -z "$verbose" ]]; then
+		case "$count" in
+		"") # no upstream
+			p="" ;;
+		"0	0") # equal to upstream
+			p="=" ;;
+		"0	"*) # ahead of upstream
+			p=">" ;;
+		*"	0") # behind upstream
+			p="<" ;;
+		*)	    # diverged from upstream
+			p="<>" ;;
+		esac
+	else
+		case "$count" in
+		"") # no upstream
+			p="" ;;
+		"0	0") # equal to upstream
+			p=" u=" ;;
+		"0	"*) # ahead of upstream
+			p=" u+${count#0	}" ;;
+		*"	0") # behind upstream
+			p=" u-${count%	0}" ;;
+		*)	    # diverged from upstream
+			p=" u+${count#*	}-${count%	*}" ;;
+		esac
+		if [[ -n "$count" && -n "$name" ]]; then
+			__git_ps1_upstream_name=$(git rev-parse \
+				--abbrev-ref "$upstream" 2>/dev/null)
+			if [ $pcmode = yes ]; then
+				# see the comments around the
+				# __git_ps1_branch_name variable below
+				p="$p \${__git_ps1_upstream_name}"
+			else
+				p="$p ${__git_ps1_upstream_name}"
+				# not needed anymore; keep user's
+				# environment clean
+				unset __git_ps1_upstream_name
+			fi
+		fi
+	fi
+
+}
+
+# Helper function that is meant to be called from __git_ps1.  It
+# injects color codes into the appropriate gitstring variables used
+# to build a gitstring.
+__git_ps1_colorize_gitstring ()
+{
+	if [[ -n ${ZSH_VERSION-} ]]; then
+		local c_red='%F{red}'
+		local c_green='%F{green}'
+		local c_lblue='%F{blue}'
+		local c_clear='%f'
+	else
+		# Using \[ and \] around colors is necessary to prevent
+		# issues with command line editing/browsing/completion!
+		local c_red='\[\e[31m\]'
+		local c_green='\[\e[32m\]'
+		local c_lblue='\[\e[1;34m\]'
+		local c_clear='\[\e[0m\]'
+	fi
+	local bad_color=$c_red
+	local ok_color=$c_green
+	local flags_color="$c_lblue"
+
+	local branch_color=""
+	if [ $detached = no ]; then
+		branch_color="$ok_color"
+	else
+		branch_color="$bad_color"
+	fi
+	c="$branch_color$c"
+
+	z="$c_clear$z"
+	if [ "$w" = "*" ]; then
+		w="$bad_color$w"
+	fi
+	if [ -n "$i" ]; then
+		i="$ok_color$i"
+	fi
+	if [ -n "$s" ]; then
+		s="$flags_color$s"
+	fi
+	if [ -n "$u" ]; then
+		u="$bad_color$u"
+	fi
+	r="$c_clear$r"
+}
+
+__git_eread ()
+{
+	f="$1"
+	shift
+	test -r "$f" && read "$@" <"$f"
+}
+
+# __git_ps1 accepts 0 or 1 arguments (i.e., format string)
+# when called from PS1 using command substitution
+# in this mode it prints text to add to bash PS1 prompt (includes branch name)
+#
+# __git_ps1 requires 2 or 3 arguments when called from PROMPT_COMMAND (pc)
+# in that case it _sets_ PS1. The arguments are parts of a PS1 string.
+# when two arguments are given, the first is prepended and the second appended
+# to the state string when assigned to PS1.
+# The optional third parameter will be used as printf format string to further
+# customize the output of the git-status string.
+# In this mode you can request colored hints using GIT_PS1_SHOWCOLORHINTS=true
+__git_ps1 ()
+{
+	local pcmode=no
+	local detached=no
+	local ps1pc_start='\u@\h:\w '
+	local ps1pc_end='\$ '
+	local printf_format=' (%s)'
+
+	case "$#" in
+		2|3)	pcmode=yes
+			ps1pc_start="$1"
+			ps1pc_end="$2"
+			printf_format="${3:-$printf_format}"
+		;;
+		0|1)	printf_format="${1:-$printf_format}"
+		;;
+		*)	return
+		;;
+	esac
+
+	local repo_info rev_parse_exit_code
+	repo_info="$(git rev-parse --git-dir --is-inside-git-dir \
+		--is-bare-repository --is-inside-work-tree \
+		--short HEAD 2>/dev/null)"
+	rev_parse_exit_code="$?"
+
+	if [ -z "$repo_info" ]; then
+		if [ $pcmode = yes ]; then
+			#In PC mode PS1 always needs to be set
+			PS1="$ps1pc_start$ps1pc_end"
+		fi
+		return
+	fi
+
+	local short_sha
+	if [ "$rev_parse_exit_code" = "0" ]; then
+		short_sha="${repo_info##*$'\n'}"
+		repo_info="${repo_info%$'\n'*}"
+	fi
+	local inside_worktree="${repo_info##*$'\n'}"
+	repo_info="${repo_info%$'\n'*}"
+	local bare_repo="${repo_info##*$'\n'}"
+	repo_info="${repo_info%$'\n'*}"
+	local inside_gitdir="${repo_info##*$'\n'}"
+	local g="${repo_info%$'\n'*}"
+
+	local r=""
+	local b=""
+	local step=""
+	local total=""
+	if [ -d "$g/rebase-merge" ]; then
+		__git_eread "$g/rebase-merge/head-name" b
+		__git_eread "$g/rebase-merge/msgnum" step
+		__git_eread "$g/rebase-merge/end" total
+		if [ -f "$g/rebase-merge/interactive" ]; then
+			r="|REBASE-i"
+		else
+			r="|REBASE-m"
+		fi
+	else
+		if [ -d "$g/rebase-apply" ]; then
+			__git_eread "$g/rebase-apply/next" step
+			__git_eread "$g/rebase-apply/last" total
+			if [ -f "$g/rebase-apply/rebasing" ]; then
+				__git_eread "$g/rebase-apply/head-name" b
+				r="|REBASE"
+			elif [ -f "$g/rebase-apply/applying" ]; then
+				r="|AM"
+			else
+				r="|AM/REBASE"
+			fi
+		elif [ -f "$g/MERGE_HEAD" ]; then
+			r="|MERGING"
+		elif [ -f "$g/CHERRY_PICK_HEAD" ]; then
+			r="|CHERRY-PICKING"
+		elif [ -f "$g/REVERT_HEAD" ]; then
+			r="|REVERTING"
+		elif [ -f "$g/BISECT_LOG" ]; then
+			r="|BISECTING"
+		fi
+
+		if [ -n "$b" ]; then
+			:
+		elif [ -h "$g/HEAD" ]; then
+			# symlink symbolic ref
+			b="$(git symbolic-ref HEAD 2>/dev/null)"
+		else
+			local head=""
+			if ! __git_eread "$g/HEAD" head; then
+				if [ $pcmode = yes ]; then
+					PS1="$ps1pc_start$ps1pc_end"
+				fi
+				return
+			fi
+			# is it a symbolic ref?
+			b="${head#ref: }"
+			if [ "$head" = "$b" ]; then
+				detached=yes
+				b="$(
+				case "${GIT_PS1_DESCRIBE_STYLE-}" in
+				(contains)
+					git describe --contains HEAD ;;
+				(branch)
+					git describe --contains --all HEAD ;;
+				(describe)
+					git describe HEAD ;;
+				(* | default)
+					git describe --tags --exact-match HEAD ;;
+				esac 2>/dev/null)" ||
+
+				b="$short_sha..."
+				b="($b)"
+			fi
+		fi
+	fi
+
+	if [ -n "$step" ] && [ -n "$total" ]; then
+		r="$r $step/$total"
+	fi
+
+	local w=""
+	local i=""
+	local s=""
+	local u=""
+	local c=""
+	local p=""
+
+	if [ "true" = "$inside_gitdir" ]; then
+		if [ "true" = "$bare_repo" ]; then
+			c="BARE:"
+		else
+			b="GIT_DIR!"
+		fi
+	elif [ "true" = "$inside_worktree" ]; then
+		if [ -n "${GIT_PS1_SHOWDIRTYSTATE-}" ] &&
+		   [ "$(git config --bool bash.showDirtyState)" != "false" ]
+		then
+			git diff --no-ext-diff --quiet --exit-code || w="*"
+			if [ -n "$short_sha" ]; then
+				git diff-index --cached --quiet HEAD -- || i="+"
+			else
+				i="#"
+			fi
+		fi
+		if [ -n "${GIT_PS1_SHOWSTASHSTATE-}" ] &&
+		   [ -r "$g/refs/stash" ]; then
+			s="$"
+		fi
+
+		if [ -n "${GIT_PS1_SHOWUNTRACKEDFILES-}" ] &&
+		   [ "$(git config --bool bash.showUntrackedFiles)" != "false" ] &&
+		   git ls-files --others --exclude-standard --error-unmatch -- '*' >/dev/null 2>/dev/null
+		then
+			u="%${ZSH_VERSION+%}"
+		fi
+
+		if [ -n "${GIT_PS1_SHOWUPSTREAM-}" ]; then
+			__git_ps1_show_upstream
+		fi
+	fi
+
+	local z="${GIT_PS1_STATESEPARATOR-" "}"
+
+	# NO color option unless in PROMPT_COMMAND mode
+	if [ $pcmode = yes ] && [ -n "${GIT_PS1_SHOWCOLORHINTS-}" ]; then
+		__git_ps1_colorize_gitstring
+	fi
+
+	b=${b##refs/heads/}
+	if [ $pcmode = yes ]; then
+		# In pcmode (and only pcmode) the contents of
+		# $gitstring are subject to expansion by the shell.
+		# Avoid putting the raw ref name in the prompt to
+		# protect the user from arbitrary code execution via
+		# specially crafted ref names (e.g., a ref named
+		# '$(IFS=_;cmd=sudo_rm_-rf_/;$cmd)' would execute
+		# 'sudo rm -rf /' when the prompt is drawn).  Instead,
+		# put the ref name in a new global variable (in the
+		# __git_ps1_* namespace to avoid colliding with the
+		# user's environment) and reference that variable from
+		# PS1.
+		__git_ps1_branch_name=$b
+		# note that the $ is escaped -- the variable will be
+		# expanded later (when it's time to draw the prompt)
+		b="\${__git_ps1_branch_name}"
+	fi
+
+	local f="$w$i$s$u"
+	local gitstring="$c$b${f:+$z$f}$r$p"
+
+	if [ $pcmode = yes ]; then
+		if [ "${__git_printf_supports_v-}" != yes ]; then
+			gitstring=$(printf -- "$printf_format" "$gitstring")
+		else
+			printf -v gitstring -- "$printf_format" "$gitstring"
+		fi
+		PS1="$ps1pc_start$gitstring$ps1pc_end"
+	else
+		printf -- "$printf_format" "$gitstring"
+	fi
+}
diff --git a/dev/vagrant/dolibarrdev/puphpet/files/dot/.gitignore b/dev/vagrant/dolibarrdev/puphpet/files/dot/.gitignore
index 2e403e0fae0..dcf60545594 100644
--- a/dev/vagrant/dolibarrdev/puphpet/files/dot/.gitignore
+++ b/dev/vagrant/dolibarrdev/puphpet/files/dot/.gitignore
@@ -1,3 +1,4 @@
 ssh/id_rsa
 ssh/id_rsa.pub
-ssh/insecure_private_key
\ No newline at end of file
+ssh/insecure_private_key
+ssh/id_rsa.ppk
\ No newline at end of file
diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/Puppetfile b/dev/vagrant/dolibarrdev/puphpet/puppet/Puppetfile
index a825c5617cb..ee7a39186bd 100644
--- a/dev/vagrant/dolibarrdev/puphpet/puppet/Puppetfile
+++ b/dev/vagrant/dolibarrdev/puphpet/puppet/Puppetfile
@@ -5,7 +5,7 @@ mod 'apt', :git => 'https://github.com/puphpet/puppetlabs-apt.git'
 mod 'yum', :git => 'https://github.com/puphpet/puppet-yum.git'
 mod 'vcsrepo', :git => 'https://github.com/puphpet/puppetlabs-vcsrepo.git'
 mod 'ntp', :git => 'https://github.com/puphpet/puppetlabs-ntp.git'
-mod 'iptables', :git => 'https://github.com/puphpet/puppet-iptables.git'
+mod 'firewall', :git => 'https://github.com/puppetlabs/puppetlabs-firewall.git'
 mod 'git', :git => 'https://github.com/puphpet/puppetlabs-git.git'
 mod 'mailcatcher', :git => 'https://github.com/puphpet/puppet-mailcatcher.git'
 mod 'supervisord', :git => 'https://github.com/puphpet/puppet-supervisord.git'
@@ -15,7 +15,7 @@ mod 'php', :git => 'https://github.com/puphpet/puppet-php.git'
 mod 'composer', :git => 'https://github.com/puphpet/puppet-composer.git'
 mod 'puphpet', :git => 'https://github.com/puphpet/puppet-puphpet.git'
 mod 'puppi', :git => 'https://github.com/puphpet/puppi.git'
-mod 'drush', :git => 'https://github.com/puphpet/puppet-drush.git', :ref => 'new'
+mod 'drush', :git => 'https://github.com/puphpet/puppet-drush.git'
 mod 'mysql', :git => 'https://github.com/puphpet/puppetlabs-mysql.git'
 mod 'postgresql', :git => 'https://github.com/puphpet/puppetlabs-postgresql.git'
 mod 'mongodb', :git => 'https://github.com/puphpet/puppetlabs-mongodb.git'
diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/manifest.pp b/dev/vagrant/dolibarrdev/puphpet/puppet/manifest.pp
index 50dc7fc0182..57f759e5531 100644
--- a/dev/vagrant/dolibarrdev/puphpet/puppet/manifest.pp
+++ b/dev/vagrant/dolibarrdev/puphpet/puppet/manifest.pp
@@ -33,8 +33,8 @@ user { ['apache', 'nginx', 'httpd', 'www-data']:
 }
 
 file { "/home/${::ssh_username}":
-    ensure => directory,
-    owner  => $::ssh_username,
+  ensure => directory,
+  owner  => $::ssh_username,
 }
 
 # copy dot files to ssh user's home directory
@@ -58,7 +58,11 @@ case $::osfamily {
     and title != 'software-properties-common'
     |>
 
-    ensure_packages( ['augeas-tools'] )
+    if ! defined(Package['augeas-tools']) {
+      package { 'augeas-tools':
+        ensure => present,
+      }
+    }
   }
   # redhat, centos
   'redhat': {
@@ -69,58 +73,39 @@ case $::osfamily {
 
     Class['::yum'] -> Yum::Managed_yumrepo <| |> -> Package <| |>
 
-    if defined(Package['git']) == false {
+    if ! defined(Package['git']) {
       package { 'git':
         ensure  => latest,
         require => Class['yum::repo::repoforgeextras']
       }
     }
 
-    exec { 'bash_git':
-      cwd     => "/home/${::ssh_username}",
-      command => "curl https://raw.github.com/git/git/master/contrib/completion/git-prompt.sh > /home/${::ssh_username}/.bash_git",
-      creates => "/home/${::ssh_username}/.bash_git"
-    }
-
-    exec { 'bash_git for root':
-      cwd     => '/root',
-      command => "cp /home/${::ssh_username}/.bash_git /root/.bash_git",
-      creates => '/root/.bash_git',
-      require => Exec['bash_git']
-    }
-
     file_line { 'link ~/.bash_git':
       ensure  => present,
       line    => 'if [ -f ~/.bash_git ] ; then source ~/.bash_git; fi',
       path    => "/home/${::ssh_username}/.bash_profile",
-      require => [
-        Exec['dotfiles'],
-        Exec['bash_git'],
-      ]
+      require => Exec['dotfiles'],
     }
 
     file_line { 'link ~/.bash_git for root':
       ensure  => present,
       line    => 'if [ -f ~/.bash_git ] ; then source ~/.bash_git; fi',
       path    => '/root/.bashrc',
-      require => [
-        Exec['dotfiles'],
-        Exec['bash_git'],
-      ]
+      require => Exec['dotfiles'],
     }
 
     file_line { 'link ~/.bash_aliases':
       ensure  => present,
       line    => 'if [ -f ~/.bash_aliases ] ; then source ~/.bash_aliases; fi',
       path    => "/home/${::ssh_username}/.bash_profile",
-      require => File_line['link ~/.bash_git']
+      require => Exec['dotfiles'],
     }
 
     file_line { 'link ~/.bash_aliases for root':
       ensure  => present,
       line    => 'if [ -f ~/.bash_aliases ] ; then source ~/.bash_aliases; fi',
       path    => '/root/.bashrc',
-      require => File_line['link ~/.bash_git for root']
+      require => Exec['dotfiles'],
     }
 
     ensure_packages( ['augeas'] )
@@ -171,15 +156,15 @@ case $::operatingsystem {
 
     if hash_key_equals($php_values, 'install', 1) {
       # Ubuntu Lucid 10.04, Precise 12.04, Quantal 12.10 and Raring 13.04 can do PHP 5.3 (default <= 12.10) and 5.4 (default <= 13.04)
-      if $lsbdistcodename in ['lucid', 'precise', 'quantal', 'raring'] and $php_values['version'] == '54' {
+      if $lsbdistcodename in ['lucid', 'precise', 'quantal', 'raring', 'trusty'] and $php_values['version'] == '54' {
         if $lsbdistcodename == 'lucid' {
           apt::ppa { 'ppa:ondrej/php5-oldstable': require => Apt::Key['4F4EA0AAE5267A6C'], options => '' }
         } else {
           apt::ppa { 'ppa:ondrej/php5-oldstable': require => Apt::Key['4F4EA0AAE5267A6C'] }
         }
       }
-      # Ubuntu Precise 12.04, Quantal 12.10 and Raring 13.04 can do PHP 5.5
-      elsif $lsbdistcodename in ['precise', 'quantal', 'raring'] and $php_values['version'] == '55' {
+      # Ubuntu 12.04/10, 13.04/10, 14.04 can do PHP 5.5
+      elsif $lsbdistcodename in ['precise', 'quantal', 'raring', 'saucy', 'trusty'] and $php_values['version'] == '55' {
         apt::ppa { 'ppa:ondrej/php5': require => Apt::Key['4F4EA0AAE5267A6C'] }
       }
       elsif $lsbdistcodename in ['lucid'] and $php_values['version'] == '55' {
@@ -201,8 +186,14 @@ case $::operatingsystem {
   }
 }
 
-if !empty($server_values['packages']) {
-  ensure_packages( $server_values['packages'] )
+if is_array($server_values['packages']) and count($server_values['packages']) > 0 {
+  each( $server_values['packages'] ) |$package| {
+    if ! defined(Package[$package]) {
+      package { $package:
+        ensure => present,
+      }
+    }
+  }
 }
 
 define add_dotdeb ($release){
@@ -217,23 +208,41 @@ define add_dotdeb ($release){
   }
 }
 
-# Begin open ports for Iptables
-if $::osfamily == 'redhat'
-  and has_key($vm_values, 'vm')
+# Begin open ports for iptables
+if has_key($vm_values, 'vm')
   and has_key($vm_values['vm'], 'network')
   and has_key($vm_values['vm']['network'], 'forwarded_port')
 {
   create_resources( iptables_port, $vm_values['vm']['network']['forwarded_port'] )
 }
 
+if has_key($vm_values, 'ssh') and has_key($vm_values['ssh'], 'port') {
+  $vm_values_ssh_port = $vm_values['ssh']['port'] ? {
+    ''      => 22,
+    undef   => 22,
+    0       => 22,
+    default => $vm_values['ssh']['port']
+  }
+
+  if ! defined(Firewall["100 tcp/${vm_values_ssh_port}"]) {
+    firewall { "100 tcp/${vm_values_ssh_port}":
+      port   => $vm_values_ssh_port,
+      proto  => tcp,
+      action => 'accept',
+      before => Class['my_fw::post']
+    }
+  }
+}
+
 define iptables_port (
   $host,
   $guest,
 ) {
-  if ( ! defined(Iptables::Allow["tcp/${guest}"]) ) {
-    iptables::allow { "tcp/${guest}":
-      port     => $guest,
-      protocol => 'tcp'
+  if ! defined(Firewall["100 tcp/${guest}"]) {
+    firewall { "100 tcp/${guest}":
+      port   => $guest,
+      proto  => tcp,
+      action => 'accept',
     }
   }
 }
@@ -253,23 +262,19 @@ if hash_key_equals($mailcatcher_values, 'install', 1) {
     }
   }
 
-  create_resources('class', { 'mailcatcher' => $mailcatcher_values['settings'] })
-
-  if $::osfamily == 'redhat'
-    and ! defined(Iptables::Allow["tcp/${mailcatcher_values['settings']['smtp_port']}"])
-  {
-    iptables::allow { "tcp/${mailcatcher_values['settings']['smtp_port']}":
-      port     => $mailcatcher_values['settings']['smtp_port'],
-      protocol => 'tcp'
+  if $::operatingsystem == 'ubuntu' and $lsbdistcodename == 'trusty' {
+    package { 'rubygems':
+      ensure => absent,
     }
   }
 
-  if $::osfamily == 'redhat'
-    and ! defined(Iptables::Allow["tcp/${mailcatcher_values['settings']['http_port']}"])
-  {
-    iptables::allow { "tcp/${mailcatcher_values['settings']['http_port']}":
-      port     => $mailcatcher_values['settings']['http_port'],
-      protocol => 'tcp'
+  create_resources('class', { 'mailcatcher' => $mailcatcher_values['settings'] })
+
+  if ! defined(Firewall["100 tcp/${mailcatcher_values['settings']['smtp_port']},${mailcatcher_values['settings']['http_port']}"]) {
+    firewall { "100 tcp/${mailcatcher_values['settings']['smtp_port']}, ${mailcatcher_values['settings']['http_port']}":
+      port   => [$mailcatcher_values['settings']['smtp_port'], $mailcatcher_values['settings']['http_port']],
+      proto  => tcp,
+      action => 'accept',
     }
   }
 
@@ -293,7 +298,7 @@ if hash_key_equals($mailcatcher_values, 'install', 1) {
     priority    => '100',
     user        => 'mailcatcher',
     autostart   => true,
-    autorestart => true,
+    autorestart => 'true',
     environment => {
       'PATH' => "/bin:/sbin:/usr/bin:/usr/sbin:${mailcatcher_values['settings']['path']}"
     },
@@ -301,6 +306,67 @@ if hash_key_equals($mailcatcher_values, 'install', 1) {
   }
 }
 
+## Begin Firewall manifest
+
+if $firewall_values == undef {
+  $firewall_values = hiera('firewall', false)
+}
+
+resources { 'firewall':
+  purge => true
+}
+
+Firewall {
+  before  => Class['my_fw::post'],
+  require => Class['my_fw::pre'],
+}
+
+class { ['my_fw::pre', 'my_fw::post']: }
+
+class { 'firewall': }
+
+class my_fw::pre {
+  Firewall {
+    require => undef,
+  }
+
+  # Default firewall rules
+  firewall { '000 accept all icmp':
+    proto  => 'icmp',
+    action => 'accept',
+  }->
+  firewall { '001 accept all to lo interface':
+    proto   => 'all',
+    iniface => 'lo',
+    action  => 'accept',
+  }->
+  firewall { '002 accept related established rules':
+    proto  => 'all',
+    state  => ['RELATED', 'ESTABLISHED'],
+    action => 'accept',
+  }
+}
+
+class my_fw::post {
+  firewall { '999 drop all':
+    proto   => 'all',
+    action  => 'drop',
+    before  => undef,
+  }
+}
+
+if is_hash($firewall_values['rules']) and count($firewall_values['rules']) > 0 {
+  each( $firewall_values['rules'] ) |$key, $rule| {
+    if ! defined(Firewall["${rule['priority']} ${rule['proto']}/${rule['port']}"]) {
+      firewall { "${rule['priority']} ${rule['proto']}/${rule['port']}":
+        port   => $rule['port'],
+        proto  => $rule['proto'],
+        action => $rule['action'],
+      }
+    }
+  }
+}
+
 ## Begin Apache manifest
 
 if $yaml_values == undef {
@@ -378,6 +444,7 @@ if hash_key_equals($apache_values, 'install', 1) {
   }
 
   $apache_settings = merge($apache_values['settings'], {
+    'default_vhost'  => false,
     'mpm_module'     => $mpm_module,
     'conf_template'  => $apache_conf_template,
     'sendfile'       => $apache_values['settings']['sendfile'] ? { 1 => 'On', default => 'Off' },
@@ -386,20 +453,6 @@ if hash_key_equals($apache_values, 'install', 1) {
 
   create_resources('class', { 'apache' => $apache_settings })
 
-  if $::osfamily == 'redhat' and ! defined(Iptables::Allow['tcp/80']) {
-    iptables::allow { 'tcp/80':
-      port     => '80',
-      protocol => 'tcp'
-    }
-  }
-
-  if $::osfamily == 'redhat' and ! defined(Iptables::Allow['tcp/443']) {
-    iptables::allow { 'tcp/443':
-      port     => '443',
-      protocol => 'tcp'
-    }
-  }
-
   if hash_key_equals($apache_values, 'mod_pagespeed', 1) {
     class { 'puphpet::apache::modpagespeed': }
   }
@@ -410,8 +463,27 @@ if hash_key_equals($apache_values, 'install', 1) {
     }
   }
 
-  if count($apache_values['vhosts']) > 0 {
-    each( $apache_values['vhosts'] ) |$key, $vhost| {
+  if $apache_values['settings']['default_vhost'] == true {
+    $apache_vhosts = merge($apache_values['vhosts'], {
+      'default_vhost_80'  => {
+        'servername'    => 'default',
+        'serveraliases' => ['*'],
+        'docroot'       => '/var/www/default',
+        'port'          => 80,
+      },
+      'default_vhost_443' => {
+        'servername'    => 'default',
+        'serveraliases' => ['*'],
+        'docroot'       => '/var/www/default',
+        'port'          => 443,
+      },
+    })
+  } else {
+    $apache_vhosts = $apache_values['vhosts']
+  }
+
+  if count($apache_vhosts) > 0 {
+    each( $apache_vhosts ) |$key, $vhost| {
       exec { "exec mkdir -p ${vhost['docroot']} @ key ${key}":
         command => "mkdir -p ${vhost['docroot']}",
         creates => $vhost['docroot'],
@@ -443,13 +515,29 @@ if hash_key_equals($apache_values, 'install', 1) {
 
       create_resources(apache::vhost, { "${key}" => merge($vhost, {
           'custom_fragment' => template('puphpet/apache/custom_fragment.erb'),
-          'ssl'             => 'ssl' in $vhost and str2bool($vhost['ssl']) ? { true => true, default => false },
-          'ssl_cert'        => $vhost['ssl_cert'] ? { undef => undef, '' => undef, default => $vhost['ssl_cert'] },
-          'ssl_key'         => $vhost['ssl_key'] ? { undef => undef, '' => undef, default => $vhost['ssl_key'] },
-          'ssl_chain'       => $vhost['ssl_chain'] ? { undef => undef, '' => undef, default => $vhost['ssl_chain'] },
-          'ssl_certs_dir'   => $vhost['ssl_certs_dir'] ? { undef => undef, '' => undef, default => $vhost['ssl_certs_dir'] }
+          'ssl'             => 'ssl'           in $vhost and str2bool($vhost['ssl']) ? { true => true, default => false },
+          'ssl_cert'        => 'ssl_cert'      in $vhost and $vhost['ssl_cert']      ? { undef => undef, '' => undef, default => $vhost['ssl_cert'] },
+          'ssl_key'         => 'ssl_key'       in $vhost and $vhost['ssl_key']       ? { undef => undef, '' => undef, default => $vhost['ssl_key'] },
+          'ssl_chain'       => 'ssl_chain'     in $vhost and $vhost['ssl_chain']     ? { undef => undef, '' => undef, default => $vhost['ssl_chain'] },
+          'ssl_certs_dir'   => 'ssl_certs_dir' in $vhost and $vhost['ssl_certs_dir'] ? { undef => undef, '' => undef, default => $vhost['ssl_certs_dir'] }
         })
       })
+
+      if ! defined(Firewall["100 tcp/${vhost['port']}"]) {
+        firewall { "100 tcp/${vhost['port']}":
+          port   => $vhost['port'],
+          proto  => tcp,
+          action => 'accept',
+        }
+      }
+    }
+  }
+
+  if ! defined(Firewall['100 tcp/443']) {
+    firewall { '100 tcp/443':
+      port   => 443,
+      proto  => tcp,
+      action => 'accept',
     }
   }
 
@@ -475,6 +563,13 @@ if $nginx_values == undef {
 }
 
 if hash_key_equals($nginx_values, 'install', 1) {
+  include nginx::params
+  include puphpet::params
+
+  Class['puphpet::ssl_cert'] -> Nginx::Resource::Vhost <| |>
+
+  class { 'puphpet::ssl_cert': }
+
   if $lsbdistcodename == 'lucid' and hash_key_equals($php_values, 'version', '53') {
     apt::key { '67E15F46': key_server => 'hkp://keyserver.ubuntu.com:80' }
     apt::ppa { 'ppa:l-mierzwa/lucid-php5':
@@ -487,7 +582,7 @@ if hash_key_equals($nginx_values, 'install', 1) {
 
   exec { "exec mkdir -p ${webroot_location}":
     command => "mkdir -p ${webroot_location}",
-    onlyif  => "test -d ${webroot_location}",
+    creates => $webroot_location,
   }
 
   if (downcase($::provisioner_type) in ['virtualbox', 'vmware_fusion'])
@@ -517,6 +612,17 @@ if hash_key_equals($nginx_values, 'install', 1) {
     }
   }
 
+  if $::osfamily == 'redhat' {
+      file { '/usr/share/nginx':
+        ensure  => directory,
+        mode    => 0775,
+        owner   => 'www-data',
+        group   => 'www-data',
+        require => Group['www-data'],
+        before  => Package['nginx']
+      }
+  }
+
   if hash_key_equals($php_values, 'install', 1) {
     $php5_fpm_sock = '/var/run/php5-fpm.sock'
 
@@ -528,17 +634,11 @@ if hash_key_equals($nginx_values, 'install', 1) {
       $fastcgi_pass = "unix:${php5_fpm_sock}"
     }
 
-    $fastcgi_param_parts = [
-      'PATH_INFO $fastcgi_path_info',
-      'PATH_TRANSLATED $document_root$fastcgi_path_info',
-      'SCRIPT_FILENAME $document_root$fastcgi_script_name'
-    ]
-
     if $::osfamily == 'redhat' and $fastcgi_pass == "unix:${php5_fpm_sock}" {
       exec { "create ${php5_fpm_sock} file":
-        command => "touch ${php5_fpm_sock} && chmod 777 ${php5_fpm_sock}",
+        command => "touch ${php5_fpm_sock}",
         onlyif  => ["test ! -f ${php5_fpm_sock}", "test ! -f ${php5_fpm_sock}="],
-        require => Package['nginx']
+        require => Package['nginx'],
       }
 
       exec { "listen = 127.0.0.1:9000 => listen = ${php5_fpm_sock}":
@@ -550,15 +650,24 @@ if hash_key_equals($nginx_values, 'install', 1) {
         ],
         require => Exec["create ${php5_fpm_sock} file"]
       }
+
+      set_php5_fpm_sock_group_and_user { 'php_rhel':
+        require => Exec["create ${php5_fpm_sock} file"],
+      }
+    } else {
+      set_php5_fpm_sock_group_and_user { 'php':
+        require   => Package['nginx'],
+        subscribe => Service['php5-fpm'],
+      }
     }
   } elsif hash_key_equals($hhvm_values, 'install', 1) {
     $fastcgi_pass        = '127.0.0.1:9000'
-    $fastcgi_param_parts = [
-      'SCRIPT_FILENAME $document_root$fastcgi_script_name'
-    ]
+
+    set_php5_fpm_sock_group_and_user { 'hhvm':
+      require => Package['nginx'],
+    }
   } else {
     $fastcgi_pass        = ''
-    $fastcgi_param_parts = []
   }
 
   class { 'nginx': }
@@ -567,7 +676,7 @@ if hash_key_equals($nginx_values, 'install', 1) {
     each( $nginx_values['vhosts'] ) |$key, $vhost| {
       exec { "exec mkdir -p ${vhost['www_root']} @ key ${key}":
         command => "mkdir -p ${vhost['www_root']}",
-        creates => $vhost['docroot'],
+        creates => $vhost['www_root'],
       }
 
       if ! defined(File[$vhost['www_root']]) {
@@ -576,15 +685,24 @@ if hash_key_equals($nginx_values, 'install', 1) {
           require => Exec["exec mkdir -p ${vhost['www_root']} @ key ${key}"]
         }
       }
+
+      if ! defined(Firewall["100 tcp/${vhost['listen_port']}"]) {
+        firewall { "100 tcp/${vhost['listen_port']}":
+          port   => $vhost['listen_port'],
+          proto  => tcp,
+          action => 'accept',
+        }
+      }
     }
 
     create_resources(nginx_vhost, $nginx_values['vhosts'])
   }
 
-  if $::osfamily == 'redhat' and ! defined(Iptables::Allow['tcp/80']) {
-    iptables::allow { 'tcp/80':
-      port     => '80',
-      protocol => 'tcp'
+  if ! defined(Firewall['100 tcp/443']) {
+    firewall { '100 tcp/443':
+      port   => 443,
+      proto  => tcp,
+      action => 'accept',
     }
   }
 }
@@ -596,6 +714,12 @@ define nginx_vhost (
   $listen_port,
   $index_files,
   $envvars = [],
+  $ssl = false,
+  $ssl_cert = $puphpet::params::ssl_cert_location,
+  $ssl_key = $puphpet::params::ssl_key_location,
+  $ssl_port = '443',
+  $rewrite_to_https = false,
+  $spdy = $nginx::params::nx_spdy,
 ){
   $merged_server_name = concat([$server_name], $server_aliases)
 
@@ -605,12 +729,68 @@ define nginx_vhost (
     $try_files = 'index.php'
   }
 
+  if hash_key_equals($php_values, 'install', 1) {
+    $fastcgi_param_parts = [
+      'PATH_INFO $fastcgi_path_info',
+      'PATH_TRANSLATED $document_root$fastcgi_path_info',
+      'SCRIPT_FILENAME $document_root$fastcgi_script_name'
+    ]
+  } elsif hash_key_equals($hhvm_values, 'install', 1) {
+    $fastcgi_param_parts = [
+      'SCRIPT_FILENAME $document_root$fastcgi_script_name'
+    ]
+  } else {
+    $fastcgi_param_parts = []
+  }
+
+  if $ssl == 0 or $ssl == false or $ssl == '' {
+    $ssl_set = false
+  } else {
+    $ssl_set = true
+  }
+
+  if $ssl_cert == 0 or $ssl_cert == false or $ssl_cert == '' {
+    $ssl_cert_set = $puphpet::params::ssl_cert_location
+  } else {
+    $ssl_cert_set = $ssl_cert
+  }
+
+  if $ssl_key == 0 or $ssl_key == false or $ssl_key == '' {
+    $ssl_key_set = $puphpet::params::ssl_key_location
+  } else {
+    $ssl_key_set = $ssl_key
+  }
+
+  if $ssl_port == 0 or $ssl_port == false or $ssl_port == '' {
+    $ssl_port_set = '443'
+  } else {
+    $ssl_port_set = $ssl_port
+  }
+
+  if $rewrite_to_https == 0 or $rewrite_to_https == false or $rewrite_to_https == '' {
+    $rewrite_to_https_set = false
+  } else {
+    $rewrite_to_https_set = true
+  }
+
+  if $spdy == off or $spdy == 0 or $spdy == false or $spdy == '' {
+    $spdy_set = off
+  } else {
+    $spdy_set = on
+  }
+
   nginx::resource::vhost { $server_name:
     server_name      => $merged_server_name,
     www_root         => $www_root,
     listen_port      => $listen_port,
     index_files      => $index_files,
     try_files        => ['$uri', '$uri/', "/${try_files}?\$args"],
+    ssl              => $ssl_set,
+    ssl_cert         => $ssl_cert_set,
+    ssl_key          => $ssl_key_set,
+    ssl_port         => $ssl_port_set,
+    rewrite_to_https => $rewrite_to_https_set,
+    spdy             => $spdy_set,
     vhost_cfg_append => {
        sendfile => 'off'
     }
@@ -624,6 +804,7 @@ define nginx_vhost (
     location            => '~ \.php$',
     proxy               => undef,
     try_files           => ['$uri', '$uri/', "/${try_files}?\$args"],
+    ssl                 => $ssl_set,
     www_root            => $www_root,
     location_cfg_append => {
       'fastcgi_split_path_info' => '^(.+\.php)(/.+)$',
@@ -636,6 +817,13 @@ define nginx_vhost (
   }
 }
 
+define set_php5_fpm_sock_group_and_user (){
+  exec { 'set php5_fpm_sock group and user':
+    command => "chmod 660 ${php5_fpm_sock} && chown www-data ${php5_fpm_sock} && chgrp www-data ${php5_fpm_sock} && touch /.puphpet-stuff/php5_fpm_sock",
+    creates => '/.puphpet-stuff/php5_fpm_sock',
+  }
+}
+
 ## Begin PHP manifest
 
 if $php_values == undef {
@@ -644,6 +832,8 @@ if $php_values == undef {
   $apache_values = hiera('apache', false)
 } if $nginx_values == undef {
   $nginx_values = hiera('nginx', false)
+} if $mailcatcher_values == undef {
+  $mailcatcher_values = hiera('mailcatcher', false)
 }
 
 if hash_key_equals($php_values, 'install', 1) {
@@ -746,15 +936,14 @@ if hash_key_equals($php_values, 'install', 1) {
     }
 
     if $php_values['ini']['session.save_path'] != undef {
-      exec {"mkdir -p ${php_values['ini']['session.save_path']}":
-        onlyif  => "test ! -d ${php_values['ini']['session.save_path']}",
-      }
+      $php_sess_save_path = $php_values['ini']['session.save_path']
 
-      file { $php_values['ini']['session.save_path']:
-        ensure  => directory,
-        group   => 'www-data',
-        mode    => 0775,
-        require => Exec["mkdir -p ${php_values['ini']['session.save_path']}"]
+      exec {"mkdir -p ${php_sess_save_path}":
+        onlyif => "test ! -d ${php_sess_save_path}",
+        before => Class['php']
+      }
+      exec {"chmod 775 ${php_sess_save_path} && chown www-data ${php_sess_save_path} && chgrp www-data ${php_sess_save_path}":
+        require => Class['php']
       }
     }
   }
@@ -767,6 +956,28 @@ if hash_key_equals($php_values, 'install', 1) {
   }
 
   if hash_key_equals($php_values, 'composer', 1) {
+    $php_composer_home = $php_values['composer_home'] ? {
+      false   => false,
+      undef   => false,
+      ''      => false,
+      default => $php_values['composer_home'],
+    }
+
+    if $php_composer_home {
+      file { $php_composer_home:
+        ensure  => directory,
+        owner   => 'www-data',
+        group   => 'www-data',
+        mode    => 0775,
+        require => [Group['www-data'], Group['www-user']]
+      }
+
+      file_line { "COMPOSER_HOME=${php_composer_home}":
+        path => '/etc/environment',
+        line => "COMPOSER_HOME=${php_composer_home}",
+      }
+    }
+
     class { 'composer':
       target_dir      => '/usr/local/bin',
       composer_file   => 'composer',
@@ -778,27 +989,45 @@ if hash_key_equals($php_values, 'install', 1) {
       suhosin_enabled => false,
     }
   }
+
+  # Usually this would go within the library that needs in (Mailcatcher)
+  # but the values required are sufficiently complex that it's easier to
+  # add here
+  if hash_key_equals($mailcatcher_values, 'install', 1)
+    and ! defined(Puphpet::Ini['sendmail_path'])
+  {
+    puphpet::ini { 'sendmail_path':
+      entry       => 'CUSTOM/sendmail_path',
+      value       => '/usr/bin/env catchmail',
+      php_version => $php_values['version'],
+      webserver   => $php_webserver_service_ini
+    }
+  }
 }
 
 define php_mod {
-  if ! defined(Php::Module[$name]) {
-    php::module { $name:
+  if ! defined(Puphpet::Php::Module[$name]) {
+    puphpet::php::module { $name:
       service_autorestart => $php_webserver_restart,
     }
   }
 }
 define php_pear_mod {
-  if ! defined(Php::Pear::Module[$name]) {
-    php::pear::module { $name:
-      use_package         => false,
+  if ! defined(Puphpet::Php::Pear[$name]) {
+    puphpet::php::pear { $name:
       service_autorestart => $php_webserver_restart,
     }
   }
 }
 define php_pecl_mod {
-  if ! defined(Php::Pecl::Module[$name]) {
-    php::pecl::module { $name:
-      use_package         => false,
+  if ! defined(Puphpet::Php::Extra_repos[$name]) {
+    puphpet::php::extra_repos { $name:
+      before => Puphpet::Php::Pecl[$name],
+    }
+  }
+
+  if ! defined(Puphpet::Php::Pecl[$name]) {
+    puphpet::php::pecl { $name:
       service_autorestart => $php_webserver_restart,
     }
   }
@@ -858,7 +1087,7 @@ if $php_values == undef {
 if hash_key_equals($xhprof_values, 'install', 1)
   and hash_key_equals($php_values, 'install', 1)
 {
-  if $::operatingsystem == 'ubuntu' {
+  if $::operatingsystem == 'ubuntu' and $lsbdistcodename in ['lucid', 'maverick', 'natty', 'oneiric', 'precise'] {
     apt::key { '8D0DC64F':
       key_server => 'hkp://keyserver.ubuntu.com:80'
     }
@@ -985,25 +1214,6 @@ if hash_key_equals($mysql_values, 'install', 1) {
     }
   }
 
-  if hash_key_equals($mysql_values, 'phpmyadmin', 1) and $mysql_php_installed {
-    if hash_key_equals($apache_values, 'install', 1) {
-      $mysql_pma_webroot_location = $puphpet::params::apache_webroot_location
-    } elsif hash_key_equals($nginx_values, 'install', 1) {
-      $mysql_pma_webroot_location = $puphpet::params::nginx_webroot_location
-
-      mysql_nginx_default_conf { 'override_default_conf':
-        webroot => $mysql_pma_webroot_location
-      }
-    } else {
-      $mysql_pma_webroot_location = '/var/www'
-    }
-
-    class { 'puphpet::phpmyadmin':
-      dbms             => 'mysql::server',
-      webroot_location => $mysql_pma_webroot_location,
-    }
-  }
-
   if hash_key_equals($mysql_values, 'adminer', 1) and $mysql_php_installed {
     if hash_key_equals($apache_values, 'install', 1) {
       $mysql_adminer_webroot_location = $puphpet::params::apache_webroot_location
@@ -1195,13 +1405,63 @@ if hash_key_equals($mariadb_values, 'install', 1) {
   }
 
   if has_key($mariadb_values, 'root_password') and $mariadb_values['root_password'] {
+    include 'mysql::params'
+
+    if (! defined(File[$mysql::params::datadir])) {
+      file { $mysql::params::datadir :
+        ensure => directory,
+        group  => $mysql::params::root_group,
+        before => Class['mysql::server']
+      }
+    }
+
+    if ! defined(Group['mysql']) {
+      group { 'mysql':
+        ensure => present
+      }
+    }
+
+    if ! defined(User['mysql']) {
+      user { 'mysql':
+        ensure => present,
+      }
+    }
+
+    if (! defined(File['/var/run/mysqld'])) {
+      file { '/var/run/mysqld' :
+        ensure  => directory,
+        group   => 'mysql',
+        owner   => 'mysql',
+        before  => Class['mysql::server'],
+        require => [User['mysql'], Group['mysql']],
+        notify  => Service['mysql'],
+      }
+    }
+
+    if ! defined(File[$mysql::params::socket]) {
+      file { $mysql::params::socket :
+        ensure  => file,
+        group   => $mysql::params::root_group,
+        before  => Class['mysql::server'],
+        require => File[$mysql::params::datadir]
+      }
+    }
+
+    if ! defined(Package['mysql-libs']) {
+      package { 'mysql-libs':
+        ensure => purged,
+        before => Class['mysql::server'],
+      }
+    }
+
     class { 'puphpet::mariadb':
       version => $mariadb_values['version']
     }
 
     class { 'mysql::server':
       package_name  => $puphpet::params::mariadb_package_server_name,
-      root_password => $mariadb_values['root_password']
+      root_password => $mariadb_values['root_password'],
+      service_name  => 'mysql',
     }
 
     class { 'mysql::client':
@@ -1229,25 +1489,6 @@ if hash_key_equals($mariadb_values, 'install', 1) {
     }
   }
 
-  if hash_key_equals($mariadb_values, 'phpmyadmin', 1) and $mariadb_php_installed {
-    if hash_key_equals($apache_values, 'install', 1) {
-      $mariadb_pma_webroot_location = $puphpet::params::apache_webroot_location
-    } elsif hash_key_equals($nginx_values, 'install', 1) {
-      $mariadb_pma_webroot_location = $puphpet::params::nginx_webroot_location
-
-      mariadb_nginx_default_conf { 'override_default_conf':
-        webroot => $mariadb_pma_webroot_location
-      }
-    } else {
-      $mariadb_pma_webroot_location = '/var/www'
-    }
-
-    class { 'puphpet::phpmyadmin':
-      dbms             => 'mysql::server',
-      webroot_location => $mariadb_pma_webroot_location,
-    }
-  }
-
   if hash_key_equals($mariadb_values, 'adminer', 1) and $mariadb_php_installed {
     if hash_key_equals($apache_values, 'install', 1) {
       $mariadb_adminer_webroot_location = $puphpet::params::apache_webroot_location
@@ -1328,6 +1569,12 @@ if hash_key_equals($apache_values, 'install', 1)
 }
 
 if hash_key_equals($mongodb_values, 'install', 1) {
+  file { ['/data', '/data/db']:
+    ensure  => directory,
+    mode    => 0775,
+    before  => Class['Mongodb::Globals'],
+  }
+
   Class['Mongodb::Globals'] -> Class['Mongodb::Server']
 
   class { 'mongodb::globals':
@@ -1336,16 +1583,9 @@ if hash_key_equals($mongodb_values, 'install', 1) {
 
   create_resources('class', { 'mongodb::server' => $mongodb_values['settings'] })
 
-  case $::osfamily {
-    'debian': {
-      $mongodb_pecl = 'mongo'
-    }
-    'redhat': {
-      class { '::mongodb::client':
-        require => Class['::Mongodb::Server']
-      }
-
-      $mongodb_pecl = 'pecl-mongo'
+  if $::osfamily == 'redhat' {
+    class { '::mongodb::client':
+      require => Class['::Mongodb::Server']
     }
   }
 
@@ -1353,11 +1593,8 @@ if hash_key_equals($mongodb_values, 'install', 1) {
     create_resources(mongodb_db, $mongodb_values['databases'])
   }
 
-  if hash_key_equals($php_values, 'install', 1)
-    and ! defined(Php::Pecl::Module[$mongodb_pecl])
-  {
-    php::pecl::module { $mongodb_pecl:
-      use_package         => false,
+  if hash_key_equals($php_values, 'install', 1) and ! defined(Puphpet::Php::Pecl['mongo']) {
+    puphpet::php::pecl { 'mongo':
       service_autorestart => $mongodb_webserver_restart,
       require             => Class['mongodb::server']
     }
@@ -1496,5 +1733,13 @@ if hash_key_equals($rabbitmq_values, 'install', 1) {
       require             => Class['rabbitmq']
     }
   }
+
+  if ! defined(Firewall['100 tcp/15672']) {
+    firewall { '100 tcp/15672':
+      port   => 15672,
+      proto  => tcp,
+      action => 'accept',
+    }
+  }
 }
 
diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/.fixtures.yml b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/.fixtures.yml
new file mode 100644
index 00000000000..b5f76c03ac5
--- /dev/null
+++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/.fixtures.yml
@@ -0,0 +1,6 @@
+fixtures:
+  repositories:
+    stdlib: "git://github.com/puppetlabs/puppetlabs-stdlib.git"
+    concat: "git://github.com/puppetlabs/puppetlabs-concat.git"
+  symlinks:
+    apache: "#{source_dir}"
diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/.nodeset.yml b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/.nodeset.yml
new file mode 100644
index 00000000000..767f9cd2f6e
--- /dev/null
+++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/.nodeset.yml
@@ -0,0 +1,31 @@
+---
+default_set: 'centos-64-x64'
+sets:
+  'centos-59-x64':
+    nodes:
+      "main.foo.vm":
+        prefab: 'centos-59-x64'
+  'centos-64-x64':
+    nodes:
+      "main.foo.vm":
+        prefab: 'centos-64-x64'
+  'fedora-18-x64':
+    nodes:
+      "main.foo.vm":
+        prefab: 'fedora-18-x64'
+  'debian-607-x64':
+    nodes:
+      "main.foo.vm":
+        prefab: 'debian-607-x64'
+  'debian-70rc1-x64':
+    nodes:
+      "main.foo.vm":
+        prefab: 'debian-70rc1-x64'
+  'ubuntu-server-10044-x64':
+    nodes:
+      "main.foo.vm":
+        prefab: 'ubuntu-server-10044-x64'
+  'ubuntu-server-12042-x64':
+    nodes:
+      "main.foo.vm":
+        prefab: 'ubuntu-server-12042-x64'
diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/.puppet-lint.rc b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/.puppet-lint.rc
new file mode 100644
index 00000000000..df733ca8119
--- /dev/null
+++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/.puppet-lint.rc
@@ -0,0 +1,5 @@
+--no-single_quote_string_with_variables-check
+--no-80chars-check
+--no-class_inherits_from_params_class-check
+--no-class_parameter_defaults-check
+--no-documentation-check
diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/.travis.yml b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/.travis.yml
new file mode 100644
index 00000000000..1d00b8eb041
--- /dev/null
+++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/.travis.yml
@@ -0,0 +1,32 @@
+---
+branches:
+  only:
+  - master
+language: ruby
+bundler_args: --without development
+script: "bundle exec rake spec SPEC_OPTS='--format documentation'"
+rvm:
+  - 1.8.7
+  - 1.9.3
+  - 2.0.0
+env:
+  matrix:
+    - PUPPET_GEM_VERSION="~> 2.7.0" FACTER_GEM_VERSION="~> 1.6.0"
+    - PUPPET_GEM_VERSION="~> 2.7.0" FACTER_GEM_VERSION="~> 1.7.0"
+    - PUPPET_GEM_VERSION="~> 3.0"
+    - PUPPET_GEM_VERSION="~> 3.5.0" STRICT_VARIABLES="yes"
+matrix:
+  fast_finish: true
+  exclude:
+    - rvm: 1.9.3
+      env: PUPPET_GEM_VERSION="~> 2.7.0" FACTER_GEM_VERSION="~> 1.6.0"
+    - rvm: 1.9.3
+      env: PUPPET_GEM_VERSION="~> 2.7.0" FACTER_GEM_VERSION="~> 1.7.0"
+    - rvm: 2.0.0
+      env: PUPPET_GEM_VERSION="~> 2.7.0" FACTER_GEM_VERSION="~> 1.6.0"
+    - rvm: 2.0.0
+      env: PUPPET_GEM_VERSION="~> 2.7.0" FACTER_GEM_VERSION="~> 1.7.0"
+    - rvm: 1.8.7
+      env: PUPPET_GEM_VERSION="~> 3.2.0"
+notifications:
+  email: false
diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/CHANGELOG.md b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/CHANGELOG.md
new file mode 100644
index 00000000000..26e8d75d4db
--- /dev/null
+++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/CHANGELOG.md
@@ -0,0 +1,246 @@
+## 2014-03-04 Supported Release 1.0.1
+###Summary
+
+This is a supported release.  This release removes a testing symlink that can
+cause trouble on systems where /var is on a seperate filesystem from the
+modulepath.
+
+####Features
+####Bugfixes
+####Known Bugs
+* By default, the version of Apache that ships with Ubuntu 10.04 does not work with `wsgi_import_script`.
+* SLES is unsupported.
+ 
+## 2014-03-04 Supported Release 1.0.0
+###Summary
+
+This is a supported release. This release introduces Apache 2.4 support for
+Debian and RHEL based osfamilies.
+
+####Features
+
+- Add apache24 support
+- Add rewrite_base functionality to rewrites
+- Updated README documentation
+- Add WSGIApplicationGroup and WSGIImportScript directives
+
+####Bugfixes
+
+- Replace mutating hashes with merge() for Puppet 3.5
+- Fix WSGI import_script and mod_ssl issues on Lucid
+
+####Known Bugs
+* By default, the version of Apache that ships with Ubuntu 10.04 does not work with `wsgi_import_script`.
+* SLES is unsupported.
+
+---
+
+## 2014-01-31 Release 0.11.0
+### Summary:
+
+This release adds preliminary support for Windows compatibility and multiple rewrite support.
+
+#### Backwards-incompatible Changes:
+
+- The rewrite_rule parameter is deprecated in favor of the new rewrite parameter
+  and will be removed in a future release.
+
+#### Features:
+
+- add Match directive
+- quote paths for windows compatibility
+- add auth_group_file option to README.md
+- allow AuthGroupFile directive for vhosts
+- Support Header directives in vhost context
+- Don't purge mods-available dir when separate enable dir is used
+- Fix the servername used in log file name
+- Added support for mod_include
+- Remove index parameters.
+- Support environment variable control for CustomLog
+- added redirectmatch support
+- Setting up the ability to do multiple rewrites and conditions.
+- Convert spec tests to beaker.
+- Support php_admin_(flag|value)s
+
+#### Bugfixes:
+
+- directories are either a Hash or an Array of Hashes
+- Configure Passenger in separate .conf file on RH so PassengerRoot isn't lost
+- (docs) Update list of `apache::mod::[name]` classes
+- (docs) Fix apache::namevirtualhost example call style
+- Fix $ports_file reference in apache::listen.
+- Fix $ports_file reference in Namevirtualhost.
+
+
+## 2013-12-05 Release 0.10.0
+### Summary:
+
+This release adds FreeBSD osfamily support and various other improvements to some mods.
+
+#### Features:
+
+- Add suPHP_UserGroup directive to directory context
+- Add support for ScriptAliasMatch directives
+- Set SSLOptions StdEnvVars in server context
+- No implicit  entry for ScriptAlias path
+- Add support for overriding ErrorDocument
+- Add support for AliasMatch directives
+- Disable default "allow from all" in vhost-directories
+- Add WSGIPythonPath as an optional parameter to mod_wsgi. 
+- Add mod_rpaf support
+- Add directives: IndexOptions, IndexOrderDefault
+- Add ability to include additional external configurations in vhost
+- need to use the provider variable not the provider key value from the directory hash for matches
+- Support for FreeBSD and few other features
+- Add new params to apache::mod::mime class
+- Allow apache::mod to specify module id and path
+- added $server_root parameter
+- Add Allow and ExtendedStatus support to mod_status
+- Expand vhost/_directories.pp directive support
+- Add initial support for nss module (no directives in vhost template yet)
+- added peruser and event mpms
+- added $service_name parameter
+- add parameter for TraceEnable
+- Make LogLevel configurable for server and vhost
+- Add documentation about $ip
+- Add ability to pass ip (instead of wildcard) in default vhost files
+
+#### Bugfixes:
+
+- Don't listen on port or set NameVirtualHost for non-existent vhost
+- only apply Directory defaults when provider is a directory
+- Working mod_authnz_ldap support on Debian/Ubuntu
+
+## 2013-09-06 Release 0.9.0
+### Summary:
+This release adds more parameters to the base apache class and apache defined
+resource to make the module more flexible. It also adds or enhances SuPHP,
+WSGI, and Passenger mod support, and support for the ITK mpm module.
+
+#### Backwards-incompatible Changes:
+- Remove many default mods that are not normally needed.
+- Remove `rewrite_base` `apache::vhost` parameter; did not work anyway.
+- Specify dependencies on stdlib >=2.4.0 (this was already the case, but
+making explicit)
+- Deprecate `a2mod` in favor of the `apache::mod::*` classes and `apache::mod`
+defined resource.
+
+#### Features:
+- `apache` class
+  - Add `httpd_dir` parameter to change the location of the configuration
+  files.
+  - Add `logroot` parameter to change the logroot
+  - Add `ports_file` parameter to changes the `ports.conf` file location
+  - Add `keepalive` parameter to enable persistent connections
+  - Add `keepalive_timeout` parameter to change the timeout
+  - Update `default_mods` to be able to take an array of mods to enable.
+- `apache::vhost`
+  - Add `wsgi_daemon_process`, `wsgi_daemon_process_options`,
+  `wsgi_process_group`, and `wsgi_script_aliases` parameters for per-vhost
+  WSGI configuration.
+  - Add `access_log_syslog` parameter to enable syslogging.
+  - Add `error_log_syslog` parameter to enable syslogging of errors.
+  - Add `directories` hash parameter. Please see README for documentation.
+  - Add `sslproxyengine` parameter to enable SSLProxyEngine
+  - Add `suphp_addhandler`, `suphp_engine`, and `suphp_configpath` for
+  configuring SuPHP.
+  - Add `custom_fragment` parameter to allow for arbitrary apache
+  configuration injection. (Feature pull requests are prefered over using
+  this, but it is available in a pinch.)
+- Add `apache::mod::suphp` class for configuring SuPHP.
+- Add `apache::mod::itk` class for configuring ITK mpm module.
+- Update `apache::mod::wsgi` class for global WSGI configuration with
+`wsgi_socket_prefix` and `wsgi_python_home` parameters.
+- Add README.passenger.md to document the `apache::mod::passenger` usage.
+Added `passenger_high_performance`, `passenger_pool_idle_time`,
+`passenger_max_requests`, `passenger_stat_throttle_rate`, `rack_autodetect`,
+and `rails_autodetect` parameters.
+- Separate the httpd service resource into a new `apache::service` class for
+dependency chaining of `Class['apache'] ->  ~>
+Class['apache::service']`
+- Added `apache::mod::proxy_balancer` class for `apache::balancer`
+
+#### Bugfixes:
+- Change dependency to puppetlabs-concat
+- Fix ruby 1.9 bug for `a2mod`
+- Change servername to be `$::hostname` if there is no `$::fqdn`
+- Make `/etc/ssl/certs` the default ssl certs directory for RedHat non-5.
+- Make `php` the default php package for RedHat non-5.
+- Made `aliases` able to take a single alias hash instead of requiring an
+array.
+
+## 2013-07-26 Release 0.8.1
+#### Bugfixes:
+- Update `apache::mpm_module` detection for worker/prefork
+- Update `apache::mod::cgi` and `apache::mod::cgid` detection for
+worker/prefork
+
+## 2013-07-16 Release 0.8.0
+#### Features:
+- Add `servername` parameter to `apache` class
+- Add `proxy_set` parameter to `apache::balancer` define
+
+#### Bugfixes:
+- Fix ordering for multiple `apache::balancer` clusters
+- Fix symlinking for sites-available on Debian-based OSs
+- Fix dependency ordering for recursive confdir management
+- Fix `apache::mod::*` to notify the service on config change
+- Documentation updates
+
+## 2013-07-09 Release 0.7.0
+#### Changes:
+- Essentially rewrite the module -- too many to list
+- `apache::vhost` has many abilities -- see README.md for details
+- `apache::mod::*` classes provide httpd mod-loading capabilities
+- `apache` base class is much more configurable
+
+#### Bugfixes:
+- Many. And many more to come
+
+## 2013-03-2 Release 0.6.0
+- update travis tests (add more supported versions)
+- add access log_parameter
+- make purging of vhost dir configurable
+
+## 2012-08-24 Release 0.4.0
+#### Changes:
+- `include apache` is now required when using `apache::mod::*`
+
+#### Bugfixes:
+- Fix syntax for validate_re
+- Fix formatting in vhost template
+- Fix spec tests such that they pass
+
+##2012-05-08 Puppet Labs  - 0.0.4
+* e62e362 Fix broken tests for ssl, vhost, vhost::*
+* 42c6363 Changes to match style guide and pass puppet-lint without error
+* 42bc8ba changed name => path for file resources in order to name namevar by it's name
+* 72e13de One end too much
+* 0739641 style guide fixes: 'true' <> true, $operatingsystem needs to be $::operatingsystem, etc.
+* 273f94d fix tests
+* a35ede5 (#13860) Make a2enmod/a2dismo commands optional
+* 98d774e (#13860) Autorequire Package['httpd']
+* 05fcec5 (#13073) Add missing puppet spec tests
+* 541afda (#6899) Remove virtual a2mod definition
+* 976cb69 (#13072) Move mod python and wsgi package names to params
+* 323915a (#13060) Add .gitignore to repo
+* fdf40af (#13060) Remove pkg directory from source tree
+* fd90015 Add LICENSE file and update the ModuleFile
+* d3d0d23 Re-enable local php class
+* d7516c7 Make management of firewalls configurable for vhosts
+* 60f83ba Explicitly lookup scope of apache_name in templates.
+* f4d287f (#12581) Add explicit ordering for vdir directory
+* 88a2ac6 (#11706) puppetlabs-apache depends on puppetlabs-firewall
+* a776a8b (#11071) Fix to work with latest firewall module
+* 2b79e8b (#11070) Add support for Scientific Linux
+* 405b3e9 Fix for a2mod
+* 57b9048 Commit apache::vhost::redirect Manifest
+* 8862d01 Commit apache::vhost::proxy Manifest
+* d5c1fd0 Commit apache::mod::wsgi Manifest
+* a825ac7 Commit apache::mod::python Manifest
+* b77062f Commit Templates
+* 9a51b4a Vhost File Declarations
+* 6cf7312 Defaults for Parameters
+* 6a5b11a Ensure installed
+* f672e46 a2mod fix
+* 8a56ee9 add pthon support to apache
diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/CONTRIBUTING.md b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/CONTRIBUTING.md
new file mode 100644
index 00000000000..e1288478a24
--- /dev/null
+++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/CONTRIBUTING.md
@@ -0,0 +1,234 @@
+Checklist (and a short version for the impatient)
+=================================================
+
+  * Commits:
+
+    - Make commits of logical units.
+
+    - Check for unnecessary whitespace with "git diff --check" before
+      committing.
+
+    - Commit using Unix line endings (check the settings around "crlf" in
+      git-config(1)).
+
+    - Do not check in commented out code or unneeded files.
+
+    - The first line of the commit message should be a short
+      description (50 characters is the soft limit, excluding ticket
+      number(s)), and should skip the full stop.
+
+    - Associate the issue in the message. The first line should include
+      the issue number in the form "(#XXXX) Rest of message".
+
+    - The body should provide a meaningful commit message, which:
+
+      - uses the imperative, present tense: "change", not "changed" or
+        "changes".
+
+      - includes motivation for the change, and contrasts its
+        implementation with the previous behavior.
+
+    - Make sure that you have tests for the bug you are fixing, or
+      feature you are adding.
+
+    - Make sure the test suites passes after your commit:
+      `bundle exec rspec spec/acceptance` More information on [testing](#Testing) below
+
+    - When introducing a new feature, make sure it is properly
+      documented in the README.md
+
+  * Submission:
+
+    * Pre-requisites:
+
+      - Sign the [Contributor License Agreement](https://cla.puppetlabs.com/)
+
+      - Make sure you have a [GitHub account](https://github.com/join)
+
+      - [Create a ticket](http://projects.puppetlabs.com/projects/modules/issues/new), or [watch the ticket](http://projects.puppetlabs.com/projects/modules/issues) you are patching for.
+
+    * Preferred method:
+
+      - Fork the repository on GitHub.
+
+      - Push your changes to a topic branch in your fork of the
+        repository. (the format ticket/1234-short_description_of_change is
+        usually preferred for this project).
+
+      - Submit a pull request to the repository in the puppetlabs
+        organization.
+
+The long version
+================
+
+  1.  Make separate commits for logically separate changes.
+
+      Please break your commits down into logically consistent units
+      which include new or changed tests relevant to the rest of the
+      change.  The goal of doing this is to make the diff easier to
+      read for whoever is reviewing your code.  In general, the easier
+      your diff is to read, the more likely someone will be happy to
+      review it and get it into the code base.
+
+      If you are going to refactor a piece of code, please do so as a
+      separate commit from your feature or bug fix changes.
+
+      We also really appreciate changes that include tests to make
+      sure the bug is not re-introduced, and that the feature is not
+      accidentally broken.
+
+      Describe the technical detail of the change(s).  If your
+      description starts to get too long, that is a good sign that you
+      probably need to split up your commit into more finely grained
+      pieces.
+
+      Commits which plainly describe the things which help
+      reviewers check the patch and future developers understand the
+      code are much more likely to be merged in with a minimum of
+      bike-shedding or requested changes.  Ideally, the commit message
+      would include information, and be in a form suitable for
+      inclusion in the release notes for the version of Puppet that
+      includes them.
+
+      Please also check that you are not introducing any trailing
+      whitespace or other "whitespace errors".  You can do this by
+      running "git diff --check" on your changes before you commit.
+
+  2.  Sign the Contributor License Agreement
+
+      Before we can accept your changes, we do need a signed Puppet
+      Labs Contributor License Agreement (CLA).
+
+      You can access the CLA via the [Contributor License Agreement link](https://cla.puppetlabs.com/)
+
+      If you have any questions about the CLA, please feel free to
+      contact Puppet Labs via email at cla-submissions@puppetlabs.com.
+
+  3.  Sending your patches
+
+      To submit your changes via a GitHub pull request, we _highly_
+      recommend that you have them on a topic branch, instead of
+      directly on "master".
+      It makes things much easier to keep track of, especially if
+      you decide to work on another thing before your first change
+      is merged in.
+
+      GitHub has some pretty good
+      [general documentation](http://help.github.com/) on using
+      their site.  They also have documentation on
+      [creating pull requests](http://help.github.com/send-pull-requests/).
+
+      In general, after pushing your topic branch up to your
+      repository on GitHub, you can switch to the branch in the
+      GitHub UI and click "Pull Request" towards the top of the page
+      in order to open a pull request.
+
+
+  4.  Update the related GitHub issue.
+
+      If there is a GitHub issue associated with the change you
+      submitted, then you should update the ticket to include the
+      location of your branch, along with any other commentary you
+      may wish to make.
+
+Testing
+=======
+
+Getting Started
+---------------
+
+Our puppet modules provide [`Gemfile`](./Gemfile)s which can tell a ruby
+package manager such as [bundler](http://bundler.io/) what Ruby packages,
+or Gems, are required to build, develop, and test this software.
+
+Please make sure you have [bundler installed](http://bundler.io/#getting-started)
+on your system, then use it to install all dependencies needed for this project,
+by running
+
+```shell
+% bundle install
+Fetching gem metadata from https://rubygems.org/........
+Fetching gem metadata from https://rubygems.org/..
+Using rake (10.1.0)
+Using builder (3.2.2)
+-- 8><-- many more --><8 --
+Using rspec-system-puppet (2.2.0)
+Using serverspec (0.6.3)
+Using rspec-system-serverspec (1.0.0)
+Using bundler (1.3.5)
+Your bundle is complete!
+Use `bundle show [gemname]` to see where a bundled gem is installed.
+```
+
+NOTE some systems may require you to run this command with sudo.
+
+If you already have those gems installed, make sure they are up-to-date:
+
+```shell
+% bundle update
+```
+
+With all dependencies in place and up-to-date we can now run the tests:
+
+```shell
+% rake spec
+```
+
+This will execute all the [rspec tests](http://rspec-puppet.com/) tests
+under [spec/defines](./spec/defines), [spec/classes](./spec/classes),
+and so on. rspec tests may have the same kind of dependencies as the
+module they are testing. While the module defines in its [Modulefile](./Modulefile),
+rspec tests define them in [.fixtures.yml](./fixtures.yml).
+
+Some puppet modules also come with [beaker](https://github.com/puppetlabs/beaker)
+tests. These tests spin up a virtual machine under
+[VirtualBox](https://www.virtualbox.org/)) with, controlling it with
+[Vagrant](http://www.vagrantup.com/) to actually simulate scripted test
+scenarios. In order to run these, you will need both of those tools
+installed on your system.
+
+You can run them by issuing the following command
+
+```shell
+% rake spec_clean
+% rspec spec/acceptance
+```
+
+This will now download a pre-fabricated image configured in the [default node-set](./spec/acceptance/nodesets/default.yml),
+install puppet, copy this module and install its dependencies per [spec/spec_helper_acceptance.rb](./spec/spec_helper_acceptance.rb)
+and then run all the tests under [spec/acceptance](./spec/acceptance).
+
+Writing Tests
+-------------
+
+XXX getting started writing tests.
+
+If you have commit access to the repository
+===========================================
+
+Even if you have commit access to the repository, you will still need to
+go through the process above, and have someone else review and merge
+in your changes.  The rule is that all changes must be reviewed by a
+developer on the project (that did not write the code) to ensure that
+all changes go through a code review process.
+
+Having someone other than the author of the topic branch recorded as
+performing the merge is the record that they performed the code
+review.
+
+
+Additional Resources
+====================
+
+* [Getting additional help](http://projects.puppetlabs.com/projects/puppet/wiki/Getting_Help)
+
+* [Writing tests](http://projects.puppetlabs.com/projects/puppet/wiki/Development_Writing_Tests)
+
+* [Patchwork](https://patchwork.puppetlabs.com)
+
+* [Contributor License Agreement](https://projects.puppetlabs.com/contributor_licenses/sign)
+
+* [General GitHub documentation](http://help.github.com/)
+
+* [GitHub pull request documentation](http://help.github.com/send-pull-requests/)
+
diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/Gemfile b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/Gemfile
new file mode 100644
index 00000000000..fc45295a102
--- /dev/null
+++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/Gemfile
@@ -0,0 +1,26 @@
+source ENV['GEM_SOURCE'] || "https://rubygems.org"
+
+group :development, :test do
+  gem 'rake', '10.1.1',          :require => false
+  gem 'rspec-puppet', '>=1.0.0', :require => false
+  gem 'puppetlabs_spec_helper',  :require => false
+  gem 'serverspec',              :require => false
+  gem 'puppet-lint',             :require => false
+  gem 'beaker',                  :require => false
+  gem 'beaker-rspec',            :require => false
+  gem 'rspec', '~> 2.11',        :require => false
+end  
+
+if facterversion = ENV['FACTER_GEM_VERSION']
+  gem 'facter', facterversion, :require => false
+else
+  gem 'facter', :require => false
+end
+
+if puppetversion = ENV['PUPPET_GEM_VERSION']
+  gem 'puppet', puppetversion, :require => false
+else
+  gem 'puppet', :require => false
+end
+
+# vim:ft=ruby
diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/LICENSE b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/LICENSE
new file mode 100644
index 00000000000..8961ce8a6d1
--- /dev/null
+++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/LICENSE
@@ -0,0 +1,15 @@
+Copyright (C) 2012 Puppet Labs Inc
+
+Puppet Labs can be contacted at: info@puppetlabs.com
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/Modulefile b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/Modulefile
new file mode 100644
index 00000000000..227947cbba4
--- /dev/null
+++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/Modulefile
@@ -0,0 +1,12 @@
+name 'puppetlabs-apache'
+version '1.0.1'
+source 'git://github.com/puppetlabs/puppetlabs-apache.git'
+author 'puppetlabs'
+license 'Apache 2.0'
+summary 'Puppet module for Apache'
+description 'Module for Apache configuration'
+project_page 'https://github.com/puppetlabs/puppetlabs-apache'
+
+## Add dependencies, if any:
+dependency 'puppetlabs/stdlib', '>= 2.4.0'
+dependency 'puppetlabs/concat', '>= 1.0.0'
diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/README.md b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/README.md
new file mode 100644
index 00000000000..385130df31f
--- /dev/null
+++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/README.md
@@ -0,0 +1,1958 @@
+#apache
+
+[![Build Status](https://travis-ci.org/puppetlabs/puppetlabs-apache.png?branch=master)](https://travis-ci.org/puppetlabs/puppetlabs-apache)
+
+####Table of Contents
+
+1. [Overview - What is the apache module?](#overview)
+2. [Module Description - What does the module do?](#module-description)
+3. [Setup - The basics of getting started with apache](#setup)
+    * [Beginning with apache - Installation](#beginning-with-apache)
+    * [Configure a virtual host - Basic options for getting started](#configure-a-virtual-host)
+4. [Usage - The classes and defined types available for configuration](#usage)
+    * [Classes and Defined Types](#classes-and-defined-types)
+        * [Class: apache](#class-apache)
+        * [Class: apache::default_mods](#class-apachedefault_mods)
+        * [Defined Type: apache::mod](#defined-type-apachemod)
+        * [Classes: apache::mod::*](#classes-apachemodname)
+        * [Class: apache::mod::pagespeed](#class-apachemodpagespeed)
+        * [Class: apache::mod::php](#class-apachemodphp)
+        * [Class: apache::mod::ssl](#class-apachemodssl)
+        * [Class: apache::mod::wsgi](#class-apachemodwsgi)
+        * [Class: apache::mod::fcgid](#class-apachemodfcgid)
+        * [Defined Type: apache::vhost](#defined-type-apachevhost)
+        * [Parameter: `directories` for apache::vhost](#parameter-directories-for-apachevhost)
+        * [SSL parameters for apache::vhost](#ssl-parameters-for-apachevhost)
+    * [Virtual Host Examples - Demonstrations of some configuration options](#virtual-host-examples)
+    * [Load Balancing](#load-balancing)
+        * [Defined Type: apache::balancer](#defined-type-apachebalancer)
+        * [Defined Type: apache::balancermember](#defined-type-apachebalancermember)
+        * [Examples - Load balancing with exported and non-exported resources](#examples)
+5. [Reference - An under-the-hood peek at what the module is doing and how](#reference)
+    * [Classes](#classes)
+        * [Public Classes](#public-classes)
+        * [Private Classes](#private-classes)
+    * [Defined Types](#defined-types)
+        * [Public Defined Types](#public-defined-types)
+        * [Private Defined Types](#private-defined-types)
+    * [Templates](#templates)
+6. [Limitations - OS compatibility, etc.](#limitations)
+7. [Development - Guide for contributing to the module](#development)
+    * [Contributing to the apache module](#contributing)
+    * [Running tests - A quick guide](#running-tests)
+
+##Overview
+
+The apache module allows you to set up virtual hosts and manage web services with minimal effort.
+
+##Module Description
+
+Apache is a widely-used web server, and this module provides a simplified way of creating configurations to manage your infrastructure. This includes the ability to configure and manage a range of different virtual host setups, as well as a streamlined way to install and configure Apache modules.
+
+##Setup
+
+**What apache affects:**
+
+* configuration files and directories (created and written to)
+    * **WARNING**: Configurations that are *not* managed by Puppet will be purged.
+* package/service/configuration files for Apache
+* Apache modules
+* virtual hosts
+* listened-to ports
+* `/etc/make.conf` on FreeBSD 
+
+###Beginning with Apache
+
+To install Apache with the default parameters
+
+```puppet
+    class { 'apache':  }
+```
+
+The defaults are determined by your operating system (e.g. Debian systems have one set of defaults, and RedHat systems have another, as do FreeBSD systems). These defaults will work well in a testing environment, but are not suggested for production. To establish customized parameters
+
+```puppet
+    class { 'apache':
+      default_mods        => false,
+      default_confd_files => false,
+    }
+```
+
+###Configure a virtual host
+
+Declaring the `apache` class will create a default virtual host by setting up a vhost on port 80, listening on all interfaces and serving `$apache::docroot`.
+
+```puppet
+    class { 'apache': }
+```
+
+To configure a very basic, name-based virtual host
+
+```puppet
+    apache::vhost { 'first.example.com':
+      port    => '80',
+      docroot => '/var/www/first',
+    }
+```
+
+*Note:* The default priority is 15. If nothing matches this priority, the alphabetically first name-based vhost will be used. This is also true if you pass a higher priority and no names match anything else.
+
+A slightly more complicated example, changes the docroot owner/group from the default 'root'
+
+```puppet
+    apache::vhost { 'second.example.com':
+      port          => '80',
+      docroot       => '/var/www/second',
+      docroot_owner => 'third',
+      docroot_group => 'third',
+    }
+```
+
+To set up a virtual host with SSL and default SSL certificates
+
+```puppet
+    apache::vhost { 'ssl.example.com':
+      port    => '443',
+      docroot => '/var/www/ssl',
+      ssl     => true,
+    }
+```
+
+To set up a virtual host with SSL and specific SSL certificates
+
+```puppet
+    apache::vhost { 'fourth.example.com':
+      port     => '443',
+      docroot  => '/var/www/fourth',
+      ssl      => true,
+      ssl_cert => '/etc/ssl/fourth.example.com.cert',
+      ssl_key  => '/etc/ssl/fourth.example.com.key',
+    }
+```
+
+Virtual hosts listen on '*' by default. To listen on a specific IP address
+
+```puppet
+    apache::vhost { 'subdomain.example.com':
+      ip      => '127.0.0.1',
+      port    => '80',
+      docroot => '/var/www/subdomain',
+    }
+```
+
+To set up a virtual host with a wildcard alias for the subdomain mapped to a same-named directory, for example: `http://example.com.loc` to `/var/www/example.com`
+
+```puppet
+    apache::vhost { 'subdomain.loc':
+      vhost_name       => '*',
+      port             => '80',
+      virtual_docroot' => '/var/www/%-2+',
+      docroot          => '/var/www',
+      serveraliases    => ['*.loc',],
+    }
+```
+
+To set up a virtual host with suPHP
+
+```puppet
+    apache::vhost { 'suphp.example.com':
+      port                => '80',
+      docroot             => '/home/appuser/myphpapp',
+      suphp_addhandler    => 'x-httpd-php',
+      suphp_engine        => 'on',
+      suphp_configpath    => '/etc/php5/apache2',
+      directories         => { path => '/home/appuser/myphpapp',
+        'suphp'           => { user => 'myappuser', group => 'myappgroup' },
+      }
+    }
+```
+
+To set up a virtual host with WSGI
+
+```puppet
+    apache::vhost { 'wsgi.example.com':
+      port                        => '80',
+      docroot                     => '/var/www/pythonapp',
+      wsgi_application_group      => '%{GLOBAL}',
+      wsgi_daemon_process         => 'wsgi',
+      wsgi_daemon_process_options => { 
+        processes    => '2', 
+        threads      => '15', 
+        display-name => '%{GROUP}',
+       },
+      wsgi_import_script          => '/var/www/demo.wsgi',
+      wsgi_import_script_options  =>
+        { process-group => 'wsgi', application-group => '%{GLOBAL}' },
+      wsgi_process_group          => 'wsgi',
+      wsgi_script_aliases         => { '/' => '/var/www/demo.wsgi' },
+    }
+```
+
+Starting in Apache 2.2.16, HTTPD supports [FallbackResource](https://httpd.apache.org/docs/current/mod/mod_dir.html#fallbackresource), a simple replacement for common RewriteRules.
+
+```puppet
+    apache::vhost { 'wordpress.example.com':
+      port                => '80',
+      docroot             => '/var/www/wordpress',
+      fallbackresource    => '/index.php',
+    }
+```
+
+Please note that the 'disabled' argument to FallbackResource is only supported since Apache 2.2.24.
+
+See a list of all [virtual host parameters](#defined-type-apachevhost). See an extensive list of [virtual host examples](#virtual-host-examples).
+
+##Usage
+
+###Classes and Defined Types
+
+This module modifies Apache configuration files and directories, and will purge any configuration not managed by Puppet. Configuration of Apache should be managed by Puppet, as non-Puppet configuration files can cause unexpected failures.
+
+It is possible to temporarily disable full Puppet management by setting the [`purge_configs`](#purge_configs) parameter within the base `apache` class to 'false'. This option should only be used as a temporary means of saving and relocating customized configurations. See the [`purge_configs` parameter](#purge_configs) for more information.
+
+####Class: `apache`
+
+The apache module's primary class, `apache`, guides the basic setup of Apache on your system.
+
+You may establish a default vhost in this class, the `vhost` class, or both. You may add additional vhost configurations for specific virtual hosts using a declaration of the `vhost` type.
+
+**Parameters within `apache`:**
+
+#####`apache_version`
+
+Configures the behavior of the module templates, package names, and default mods by setting the Apache version. Default is determined by the class `apache::version` using the OS family and release. It should not be configured manually without special reason.
+
+#####`confd_dir`
+
+Changes the location of the configuration directory your custom configuration files are placed in. Defaults to '/etc/httpd/conf' on RedHat, '/etc/apache2' on Debian, and '/usr/local/etc/apache22' on FreeBSD.
+
+#####`conf_template`
+
+Overrides the template used for the main apache configuration file. Defaults to 'apache/httpd.conf.erb'.
+
+*Note:* Using this parameter is potentially risky, as the module has been built for a minimal configuration file with the configuration primarily coming from conf.d/ entries.
+
+#####`default_confd_files`
+
+Generates default set of include-able Apache configuration files under  `${apache::confd_dir}` directory. These configuration files correspond to what is usually installed with the Apache package on a given platform.
+
+#####`default_mods`
+
+Sets up Apache with default settings based on your OS. Valid values are 'true', 'false', or an array of mod names. 
+
+Defaults to 'true', which will include the default [HTTPD mods](https://github.com/puppetlabs/puppetlabs-apache/blob/master/manifests/default_mods.pp).
+
+If false, it will only include the mods required to make HTTPD work, and any other mods can be declared on their own.
+
+If an array, the apache module will include the array of mods listed.
+
+#####`default_ssl_ca`
+
+The default certificate authority, which is automatically set to 'undef'. This default will work out of the box but must be updated with your specific certificate information before being used in production.
+
+#####`default_ssl_cert`
+
+The default SSL certification, which is automatically set based on your operating system  ('/etc/pki/tls/certs/localhost.crt' for RedHat, '/etc/ssl/certs/ssl-cert-snakeoil.pem' for Debian, and '/usr/local/etc/apache22/server.crt' for FreeBSD). This default will work out of the box but must be updated with your specific certificate information before being used in production.
+
+#####`default_ssl_chain`
+
+The default SSL chain, which is automatically set to 'undef'. This default will work out of the box but must be updated with your specific certificate information before being used in production.
+
+#####`default_ssl_crl`
+
+The default certificate revocation list to use, which is automatically set to 'undef'. This default will work out of the box but must be updated with your specific certificate information before being used in production.
+
+#####`default_ssl_crl_path`
+
+The default certificate revocation list path, which is automatically set to 'undef'. This default will work out of the box but must be updated with your specific certificate information before being used in production.
+
+#####`default_ssl_key`
+
+The default SSL key, which is automatically set based on your operating system ('/etc/pki/tls/private/localhost.key' for RedHat, '/etc/ssl/private/ssl-cert-snakeoil.key' for Debian, and '/usr/local/etc/apache22/server.key' for FreeBSD). This default will work out of the box but must be updated with your specific certificate information before being used in production.
+
+#####`default_ssl_vhost`
+
+Sets up a default SSL virtual host. Defaults to 'false'. If set to 'true', will set up the following vhost:
+
+```puppet
+    apache::vhost { 'default-ssl':
+      port            => 443,
+      ssl             => true,
+      docroot         => $docroot,
+      scriptalias     => $scriptalias,
+      serveradmin     => $serveradmin,
+      access_log_file => "ssl_${access_log_file}",
+      }
+```
+
+SSL vhosts only respond to HTTPS queries.
+
+#####`default_vhost`
+
+Sets up a default virtual host. Defaults to 'true', set to 'false' to set up [customized virtual hosts](#configure-a-virtual-host).
+
+#####`error_documents`
+
+Enables custom error documents. Defaults to 'false'.
+
+#####`httpd_dir`
+
+Changes the base location of the configuration directories used for the apache service. This is useful for specially repackaged HTTPD builds, but may have unintended consequences when used in combination with the default distribution packages. Defaults to '/etc/httpd' on RedHat, '/etc/apache2' on Debian, and '/usr/local/etc/apache22' on FreeBSD.
+
+#####`keepalive`
+
+Enables persistent connections.
+
+#####`keepalive_timeout`
+
+Sets the amount of time the server will wait for subsequent requests on a persistent connection. Defaults to '15'.
+
+#####`max_keepalive_requests`
+
+Sets the limit of the number of requests allowed per connection when KeepAlive is on. Defaults to '100'.
+
+#####`loadfile_name`
+
+Sets the file name for the module loadfile. Should be in the format *.load.  This can be used to set the module load order.
+
+#####`log_level`
+
+Changes the verbosity level of the error log. Defaults to 'warn'. Valid values are 'emerg', 'alert', 'crit', 'error', 'warn', 'notice', 'info', or 'debug'.
+
+#####`log_formats`
+
+Define additional [LogFormats](https://httpd.apache.org/docs/current/mod/mod_log_config.html#logformat). This is done in a Hash:
+
+```puppet
+  $log_formats = { vhost_common => '%v %h %l %u %t \"%r\" %>s %b' }
+```
+
+#####`logroot`
+
+Changes the directory where Apache log files for the virtual host are placed. Defaults to '/var/log/httpd' on RedHat, '/var/log/apache2' on Debian, and '/var/log/apache22' on FreeBSD.
+
+#####`manage_group`
+
+Setting this to 'false' will stop the group resource from being created. This is for when you have a group, created from another Puppet module, you want to use to run Apache. Without this parameter, attempting to use a previously established group would result in a duplicate resource error.
+
+#####`manage_user`
+
+Setting this to 'false' will stop the user resource from being created. This is for instances when you have a user, created from another Puppet module, you want to use to run Apache. Without this parameter, attempting to use a previously established user would result in a duplicate resource error.
+
+#####`mod_dir`
+
+Changes the location of the configuration directory your Apache modules configuration files are placed in. Defaults to '/etc/httpd/conf.d' for RedHat, '/etc/apache2/mods-available' for Debian, and '/usr/local/etc/apache22/Modules' for FreeBSD.
+
+#####`mpm_module`
+
+Determines which MPM is loaded and configured for the HTTPD process. Valid values are 'event', 'itk', 'peruser', 'prefork', 'worker', or 'false'. Defaults to 'prefork' on RedHat and FreeBSD, and 'worker' on Debian. Must be set to 'false' to explicitly declare the following classes with custom parameters:
+
+* `apache::mod::event`
+* `apache::mod::itk`
+* `apache::mod::peruser`
+* `apache::mod::prefork`
+* `apache::mod::worker` 
+
+*Note:* Switching between different MPMs on FreeBSD is possible but quite difficult. Before changing `$mpm_module` you must uninstall all packages that depend on your currently-installed Apache. 
+
+#####`package_ensure`
+
+Allows control over the package ensure attribute. Can be 'present','absent', or a version string.
+
+#####`ports_file`
+
+Changes the name of the file containing Apache ports configuration. Default is `${conf_dir}/ports.conf`.
+
+#####`purge_configs`
+
+Removes all other Apache configs and vhosts, defaults to 'true'. Setting this to 'false' is a stopgap measure to allow the apache module to coexist with existing or otherwise-managed configuration. It is recommended that you move your configuration entirely to resources within this module.
+
+#####`sendfile`
+
+Makes Apache use the Linux kernel sendfile to serve static files. Defaults to 'On'.
+
+#####`serveradmin`
+
+Sets the server administrator. Defaults to 'root@localhost'.
+
+#####`servername`
+
+Sets the server name. Defaults to `fqdn` provided by Facter.
+
+#####`server_root`
+
+Sets the root directory in which the server resides. Defaults to '/etc/httpd' on RedHat, '/etc/apache2' on Debian, and '/usr/local' on FreeBSD.
+
+#####`server_signature`
+
+Configures a trailing footer line under server-generated documents. More information about [ServerSignature](http://httpd.apache.org/docs/current/mod/core.html#serversignature). Defaults to 'On'.
+
+#####`server_tokens`
+
+Controls how much information Apache sends to the browser about itself and the operating system. More information about [ServerTokens](http://httpd.apache.org/docs/current/mod/core.html#servertokens). Defaults to 'OS'.
+
+#####`service_enable`
+
+Determines whether the HTTPD service is enabled when the machine is booted. Defaults to 'true'.
+
+#####`service_ensure`
+
+Determines whether the service should be running. Valid values are true, false, 'running' or 'stopped' when Puppet should manage the service. Any other value will set ensure to false for the Apache service, which is useful when you want to let the service be managed by some other application like Pacemaker. Defaults to 'running'.
+
+#####`service_name`
+
+Name of the Apache service to run. Defaults to: 'httpd' on RedHat, 'apache2' on Debian, and 'apache22' on FreeBSD.
+
+#####`trace_enable`
+
+Controls how TRACE requests per RFC 2616 are handled. More information about [TraceEnable](http://httpd.apache.org/docs/current/mod/core.html#traceenable). Defaults to 'On'.
+
+#####`vhost_dir`
+
+Changes the location of the configuration directory your virtual host configuration files are placed in. Defaults to 'etc/httpd/conf.d' on RedHat, '/etc/apache2/sites-available' on Debian, and '/usr/local/etc/apache22/Vhosts' on FreeBSD.
+
+####Class: `apache::default_mods`
+
+Installs default Apache modules based on what OS you are running.
+
+```puppet
+    class { 'apache::default_mods': }
+```
+
+####Defined Type: `apache::mod`
+
+Used to enable arbitrary Apache HTTPD modules for which there is no specific `apache::mod::[name]` class. The `apache::mod` defined type will also install the required packages to enable the module, if any.
+
+```puppet
+    apache::mod { 'rewrite': }
+    apache::mod { 'ldap': }
+```
+
+####Classes: `apache::mod::[name]`
+
+There are many `apache::mod::[name]` classes within this module that can be declared using `include`:
+
+* `actions`
+* `alias`
+* `auth_basic`
+* `auth_kerb`
+* `authnz_ldap`*
+* `autoindex`
+* `cache`
+* `cgi`
+* `cgid`
+* `dav`
+* `dav_fs`
+* `dav_svn`*
+* `deflate`
+* `dev`
+* `dir`*
+* `disk_cache`
+* `event`
+* `expires`
+* `fastcgi`
+* `fcgid`
+* `headers`
+* `include`
+* `info`
+* `itk`
+* `ldap`
+* `mime`
+* `mime_magic`*
+* `negotiation`
+* `nss`*
+* `pagespeed` (see [`apache::mod::pagespeed`](#class-apachemodpagespeed) below)
+* `passenger`*
+* `perl`
+* `peruser`
+* `php` (requires [`mpm_module`](#mpm_module) set to `prefork`)
+* `prefork`*
+* `proxy`*
+* `proxy_ajp`
+* `proxy_balancer`
+* `proxy_html`
+* `proxy_http`
+* `python`
+* `reqtimeout`
+* `rewrite`
+* `rpaf`*
+* `setenvif`
+* `speling`
+* `ssl`* (see [`apache::mod::ssl`](#class-apachemodssl) below)
+* `status`*
+* `suphp`
+* `userdir`*
+* `vhost_alias`
+* `worker`*
+* `wsgi` (see [`apache::mod::wsgi`](#class-apachemodwsgi) below)
+* `xsendfile`
+
+Modules noted with a * indicate that the module has settings and, thus, a template that includes parameters. These parameters control the module's configuration. Most of the time, these parameters will not require any configuration or attention.
+
+The modules mentioned above, and other Apache modules that have templates, will cause template files to be dropped along with the mod install and the module will not work without the template. Any module without a template will install the package but drop no files.
+
+####Class: `apache::mod::pagespeed`
+
+Installs and manages mod_pagespeed, which is a Google module that rewrites web pages to reduce latency and bandwidth.
+
+This module does *not* manage the software repositories needed to automatically install the
+mod-pagespeed-stable package. The module does however require that the package be installed,
+or be installable using the system's default package provider.  You should ensure that this
+pre-requisite is met or declaring `apache::mod::pagespeed` will cause the puppet run to fail.
+
+These are the defaults:
+
+```puppet
+    class { 'apache::mod::pagespeed':
+      inherit_vhost_config          => 'on',
+      filter_xhtml                  => false,
+      cache_path                    => '/var/cache/mod_pagespeed/',
+      log_dir                       => '/var/log/pagespeed',
+      memache_servers               => [],
+      rewrite_level                 => 'CoreFilters',
+      disable_filters               => [],
+      enable_filters                => [],
+      forbid_filters                => [],
+      rewrite_deadline_per_flush_ms => 10,
+      additional_domains            => undef,
+      file_cache_size_kb            => 102400,
+      file_cache_clean_interval_ms  => 3600000,
+      lru_cache_per_process         => 1024,
+      lru_cache_byte_limit          => 16384,
+      css_flatten_max_bytes         => 2048,
+      css_inline_max_bytes          => 2048,
+      css_image_inline_max_bytes    => 2048,
+      image_inline_max_bytes        => 2048,
+      js_inline_max_bytes           => 2048,
+      css_outline_min_bytes         => 3000,
+      js_outline_min_bytes          => 3000,
+      inode_limit                   => 500000,
+      image_max_rewrites_at_once    => 8,
+      num_rewrite_threads           => 4,
+      num_expensive_rewrite_threads => 4,
+      collect_statistics            => 'on',
+      statistics_logging            => 'on',
+      allow_view_stats              => [],
+      allow_pagespeed_console       => [],
+      allow_pagespeed_message       => [],
+      message_buffer_size           => 100000,
+      additional_configuration      => { }
+    }
+```
+
+Full documentation for mod_pagespeed is available from [Google](http://modpagespeed.com).
+
+####Class: `apache::mod::php`
+
+Installs and configures mod_php. The defaults are OS-dependant.
+
+Overriding the package name:
+```
+  class {'::apache::mod::php':
+    package_name => "php54-php",
+    path         => "${::apache::params::lib_path}/libphp54-php5.so",
+  }
+```
+
+Overriding the default configuartion:
+```puppet
+  class {'::apache::mod::php':
+    source => 'puppet:///modules/apache/my_php.conf',
+  }
+```
+
+or 
+```puppet
+  class {'::apache::mod::php':
+    template => 'apache/php.conf.erb',
+  }
+```
+
+or
+
+```puppet
+  class {'::apache::mod::php':
+    content => '
+AddHandler php5-script .php
+AddType text/html .php',
+  }
+```
+####Class: `apache::mod::ssl`
+
+Installs Apache SSL capabilities and uses the ssl.conf.erb template. These are the defaults:
+
+```puppet
+    class { 'apache::mod::ssl':
+      ssl_compression => false,
+      ssl_options     => [ 'StdEnvVars' ],
+  }
+```
+
+To *use* SSL with a virtual host, you must either set the`default_ssl_vhost` parameter in `::apache` to 'true' or set the `ssl` parameter in `apache::vhost` to 'true'.
+
+####Class: `apache::mod::wsgi`
+
+Enables Python support in the WSGI module. To use, simply `include 'apache::mod::wsgi'`. 
+
+For customized parameters, which tell Apache how Python is currently configured on the operating system,
+
+```puppet
+    class { 'apache::mod::wsgi':
+      wsgi_socket_prefix => "\${APACHE_RUN_DIR}WSGI",
+      wsgi_python_home   => '/path/to/venv',
+      wsgi_python_path   => '/path/to/venv/site-packages',
+    }
+```
+
+More information about [WSGI](http://modwsgi.readthedocs.org/en/latest/).
+
+####Class: `apache::mod::fcgid`
+
+Installs and configures mod_fcgid.
+
+The class makes no effort to list all available options, but rather uses an options hash to allow for ultimate flexibility:
+
+```puppet
+    class { 'apache::mod::fcgid':
+      options => {
+        'FcgidIPCDir'  => '/var/run/fcgidsock',
+        'SharememPath' => '/var/run/fcgid_shm',
+        'AddHandler'   => 'fcgid-script .fcgi',
+      },
+    }
+```
+
+For a full list op options, see the [official mod_fcgid documentation](https://httpd.apache.org/mod_fcgid/mod/mod_fcgid.html).
+
+It is also possible to set the FcgidWrapper per directory per vhost. You must ensure the fcgid module is loaded because there is no auto loading.
+
+```puppet
+    include apache::mod::fcgid
+    apache::vhost { 'example.org':
+      docroot     => '/var/www/html',
+      directories => {
+        path        => '/var/www/html',
+        fcgiwrapper => {
+          command => '/usr/local/bin/fcgiwrapper',
+        }
+      },
+    }
+```
+
+See [FcgidWrapper documentation](https://httpd.apache.org/mod_fcgid/mod/mod_fcgid.html#fcgidwrapper) for more information.
+
+####Defined Type: `apache::vhost`
+
+The Apache module allows a lot of flexibility in the setup and configuration of virtual hosts. This flexibility is due, in part, to `vhost`'s being a defined resource type, which allows it to be evaluated multiple times with different parameters.
+
+The `vhost` defined type allows you to have specialized configurations for virtual hosts that have requirements outside the defaults. You can set up a default vhost within the base `::apache` class, as well as set a customized vhost as default. Your customized vhost (priority 10) will be privileged over the base class vhost (15).
+
+If you have a series of specific configurations and do not want a base `::apache` class default vhost, make sure to set the base class `default_vhost` to 'false'.
+
+```puppet
+    class { 'apache':
+      default_vhost => false,
+    }
+```
+
+**Parameters within `apache::vhost`:**
+
+#####`access_log`
+
+Specifies whether `*_access.log` directives (`*_file`,`*_pipe`, or `*_syslog`) should be configured. Setting the value to 'false' will choose none. Defaults to 'true'. 
+
+#####`access_log_file`
+
+Sets the `*_access.log` filename that is placed in `$logroot`. Given a vhost, example.com, it defaults to 'example.com_ssl.log' for SSL vhosts and 'example.com_access.log' for non-SSL vhosts.
+
+#####`access_log_pipe`
+
+Specifies a pipe to send access log messages to. Defaults to 'undef'.
+
+#####`access_log_syslog`
+
+Sends all access log messages to syslog. Defaults to 'undef'.
+
+#####`access_log_format`
+
+Specifies the use of either a LogFormat nickname or a custom format string for the access log. Defaults to 'combined'. See [these examples](http://httpd.apache.org/docs/current/mod/mod_log_config.html).
+
+#####`access_log_env_var`
+
+Specifies that only requests with particular environment variables be logged. Defaults to 'undef'.
+
+#####`add_listen`
+
+Determines whether the vhost creates a Listen statement. The default value is 'true'.
+
+Setting `add_listen` to 'false' stops the vhost from creating a Listen statement, and this is important when you combine vhosts that are not passed an `ip` parameter with vhosts that *are* passed the `ip` parameter.
+
+#####`additional_includes`
+
+Specifies paths to additional static, vhost-specific Apache configuration files. Useful for implementing a unique, custom configuration not supported by this module. Can be an array. Defaults to '[]'.
+
+#####`aliases`
+
+Passes a list of hashes to the vhost to create Alias or AliasMatch directives as per the [mod_alias documentation](http://httpd.apache.org/docs/current/mod/mod_alias.html). These hashes are formatted as follows:
+
+```puppet
+aliases => [
+  { aliasmatch => '^/image/(.*)\.jpg$', 
+    path       => '/files/jpg.images/$1.jpg',
+  }
+  { alias      => '/image',
+    path       => '/ftp/pub/image', 
+  },
+],
+```
+
+For `alias` and `aliasmatch` to work, each will need a corresponding context, such as '< Directory /path/to/directory>' or ''. The Alias and AliasMatch directives are created in the order specified in the `aliases` parameter. As described in the [`mod_alias` documentation](http://httpd.apache.org/docs/current/mod/mod_alias.html), more specific `alias` or `aliasmatch` parameters should come before the more general ones to avoid shadowing.
+
+*Note:* If `apache::mod::passenger` is loaded and `PassengerHighPerformance => true` is set, then Alias may have issues honoring the `PassengerEnabled => off` statement. See [this article](http://www.conandalton.net/2010/06/passengerenabled-off-not-working.html) for details.
+
+#####`block`
+
+Specifies the list of things Apache will block access to. The default is an empty set, '[]'. Currently, the only option is 'scm', which blocks web access to .svn, .git and .bzr directories.
+
+#####`custom_fragment`
+
+Passes a string of custom configuration directives to be placed at the end of the vhost configuration. Defaults to 'undef'.
+
+#####`default_vhost`
+
+Sets a given `apache::vhost` as the default to serve requests that do not match any other `apache::vhost` definitions. The default value is 'false'.
+
+#####`directories`
+
+See the [`directories` section](#parameter-directories-for-apachevhost).
+
+#####`directoryindex`
+
+Sets the list of resources to look for when a client requests an index of the directory by specifying a '/' at the end of the directory name. [DirectoryIndex](http://httpd.apache.org/docs/current/mod/mod_dir.html#directoryindex) has more information. Defaults to 'undef'.
+
+#####`docroot`
+
+Provides the [DocumentRoot](http://httpd.apache.org/docs/current/mod/core.html#documentroot) directive, which identifies the directory Apache serves files from. Required. 
+
+#####`docroot_group`
+
+Sets group access to the docroot directory. Defaults to 'root'.
+
+#####`docroot_owner`
+
+Sets individual user access to the docroot directory. Defaults to 'root'.
+
+#####`docroot_mode`
+
+Sets access permissions of the docroot directory. Defaults to 'undef'.
+
+#####`error_log`
+
+Specifies whether `*_error.log` directives should be configured. Defaults to 'true'.
+
+#####`error_log_file`
+
+Points to the `*_error.log` file. Given a vhost, example.com, it defaults to 'example.com_ssl_error.log' for SSL vhosts and 'example.com_access_error.log' for non-SSL vhosts.
+
+#####`error_log_pipe`
+
+Specifies a pipe to send error log messages to. Defaults to 'undef'.
+
+#####`error_log_syslog`
+
+Sends all error log messages to syslog. Defaults to 'undef'.
+
+#####`error_documents`
+
+A list of hashes which can be used to override the [ErrorDocument](https://httpd.apache.org/docs/current/mod/core.html#errordocument) settings for this vhost. Defaults to '[]'. Example:
+
+```puppet
+    apache::vhost { 'sample.example.net':
+      error_documents => [
+        { 'error_code' => '503', 'document' => '/service-unavail' },
+        { 'error_code' => '407', 'document' => 'https://example.com/proxy/login' },
+      ],
+    }
+```
+
+#####`ensure`
+
+Specifies if the vhost file is present or absent. Defaults to 'present'.
+
+#####`fallbackresource`
+
+Sets the [FallbackResource](http://httpd.apache.org/docs/current/mod/mod_dir.html#fallbackresource) directive, which specifies an action to take for any URL that doesn't map to anything in your filesystem and would otherwise return 'HTTP 404 (Not Found)'. Valid values must either begin with a / or be 'disabled'. Defaults to 'undef'.
+
+#####`headers`
+
+Adds lines to replace, merge, or remove response headers. See [Header](http://httpd.apache.org/docs/current/mod/mod_headers.html#header) for more information. Can be an array. Defaults to 'undef'.
+
+#####`ip`
+
+Sets the IP address the vhost listens on. Defaults to listen on all IPs.
+
+#####`ip_based`
+
+Enables an [IP-based](http://httpd.apache.org/docs/current/vhosts/ip-based.html) vhost. This parameter inhibits the creation of a NameVirtualHost directive, since those are used to funnel requests to name-based vhosts. Defaults to 'false'.
+
+#####`itk`
+
+Configures [ITK](http://mpm-itk.sesse.net/) in a hash. Keys may be:
+
+* user + group
+* `assignuseridexpr`
+* `assigngroupidexpr`
+* `maxclientvhost`
+* `nice`
+* `limituidrange` (Linux 3.5.0 or newer)
+* `limitgidrange` (Linux 3.5.0 or newer)
+
+Usage will typically look like:
+
+```puppet
+    apache::vhost { 'sample.example.net':
+      docroot => '/path/to/directory',
+      itk     => {
+        user  => 'someuser',
+        group => 'somegroup',
+      },
+    }
+```
+
+#####`logroot`
+
+Specifies the location of the virtual host's logfiles. Defaults to '/var/log//'.
+
+#####`log_level`
+
+Specifies the verbosity of the error log. Defaults to 'warn' for the global server configuration and can be overridden on a per-vhost basis. Valid values are 'emerg', 'alert', 'crit', 'error', 'warn', 'notice', 'info' or 'debug'.
+
+#####`no_proxy_uris`
+
+Specifies URLs you do not want to proxy. This parameter is meant to be used in combination with [`proxy_dest`](#proxy_dest).
+
+#####`proxy_preserve_host`
+
+Sets the [ProxyPreserveHost Directive](http://httpd.apache.org/docs/2.2/mod/mod_proxy.html#proxypreservehost).  true Enables the Host: line from an incoming request to be proxied to the host instead of hostname .  false sets this option to off (default).
+
+#####`options`
+
+Sets the [Options](http://httpd.apache.org/docs/current/mod/core.html#options) for the specified virtual host. Defaults to '['Indexes','FollowSymLinks','MultiViews']', as demonstrated below:
+
+```puppet
+    apache::vhost { 'site.name.fdqn':
+      …
+      options => ['Indexes','FollowSymLinks','MultiViews'],
+    }
+```
+
+*Note:* If you use [`directories`](#parameter-directories-for-apachevhost), 'Options', 'Override', and 'DirectoryIndex' are ignored because they are parameters within `directories`.
+
+#####`override`
+
+Sets the overrides for the specified virtual host. Accepts an array of [AllowOverride](http://httpd.apache.org/docs/current/mod/core.html#allowoverride) arguments. Defaults to '[none]'.
+
+#####`php_admin_flags & values`
+
+Allows per-vhost setting [`php_admin_value`s or `php_admin_flag`s](http://php.net/manual/en/configuration.changes.php). These flags or values cannot be overwritten by a user or an application. Defaults to '[]'.
+
+#####`port`
+
+Sets the port the host is configured on. The module's defaults ensure the host listens on port 80 for non-SSL vhosts and port 443 for SSL vhosts. The host will only listen on the port set in this parameter. 
+
+#####`priority`
+
+Sets the relative load-order for Apache HTTPD VirtualHost configuration files. Defaults to '25'.
+
+If nothing matches the priority, the first name-based vhost will be used. Likewise, passing a higher priority will cause the alphabetically first name-based vhost to be used if no other names match.
+
+*Note:* You should not need to use this parameter. However, if you do use it, be aware that the `default_vhost` parameter for `apache::vhost` passes a priority of '15'.
+
+#####`proxy_dest`
+
+Specifies the destination address of a [ProxyPass](http://httpd.apache.org/docs/current/mod/mod_proxy.html#proxypass) configuration. Defaults to 'undef'.
+
+#####`proxy_pass`
+
+Specifies an array of `path => URI` for a [ProxyPass](http://httpd.apache.org/docs/current/mod/mod_proxy.html#proxypass) configuration. Defaults to 'undef'.
+
+```puppet
+apache::vhost { 'site.name.fdqn':
+  … 
+  proxy_pass => [
+    { 'path' => '/a', 'url' => 'http://backend-a/' },
+    { 'path' => '/b', 'url' => 'http://backend-b/' },
+    { 'path' => '/c', 'url' => 'http://backend-a/c' },
+  ],
+}
+```
+
+#####`rack_base_uris`
+
+Specifies the resource identifiers for a rack configuration. The file paths specified will be listed as rack application roots for [Phusion Passenger](http://www.modrails.com/documentation/Users%20guide%20Apache.html#_railsbaseuri_and_rackbaseuri) in the _rack.erb template. Defaults to 'undef'.
+
+#####`redirect_dest`
+
+Specifies the address to redirect to. Defaults to 'undef'.
+
+#####`redirect_source`
+
+Specifies the source URIs that will redirect to the destination specified in `redirect_dest`. If more than one item for redirect is supplied, the source and destination must be the same length and the items will be order-dependent. 
+
+```puppet
+    apache::vhost { 'site.name.fdqn':
+      …
+      redirect_source => ['/images','/downloads'],
+      redirect_dest   => ['http://img.example.com/','http://downloads.example.com/'],
+    }
+```
+
+#####`redirect_status`
+
+Specifies the status to append to the redirect. Defaults to 'undef'.
+
+```puppet
+    apache::vhost { 'site.name.fdqn':
+      …
+      redirect_status => ['temp','permanent'],
+    }
+```
+
+#####`redirectmatch_regexp` & `redirectmatch_status`
+
+Determines which server status should be raised for a given regular expression. Entered as an array. Defaults to 'undef'.
+
+```puppet
+    apache::vhost { 'site.name.fdqn':
+      …
+      redirectmatch_status => ['404','404'],
+      redirectmatch_regexp => ['\.git(/.*|$)/','\.svn(/.*|$)'],
+    }
+```
+
+#####`request_headers`
+
+Modifies collected [request headers](http://httpd.apache.org/docs/current/mod/mod_headers.html#requestheader) in various ways, including adding additional request headers, removing request headers, etc. Defaults to 'undef'.
+
+```puppet
+    apache::vhost { 'site.name.fdqn':
+      …
+      request_headers => [
+        'append MirrorID "mirror 12"',
+        'unset MirrorID',
+      ],
+    }
+```
+
+#####`rewrites`
+
+Creates URL rewrite rules. Expects an array of hashes, and the hash keys can be any of 'comment', 'rewrite_base', 'rewrite_cond', or 'rewrite_rule'. Defaults to 'undef'. 
+
+For example, you can specify that anyone trying to access index.html will be served welcome.html
+
+```puppet
+    apache::vhost { 'site.name.fdqn':
+      …
+      rewrites => [ { rewrite_rule => ['^index\.html$ welcome.html'] } ]
+    }
+```
+
+The parameter allows rewrite conditions that, when true, will execute the associated rule. For instance, if you wanted to rewrite URLs only if the visitor is using IE
+
+```puppet
+    apache::vhost { 'site.name.fdqn':
+      …
+      rewrites => [
+        {
+          comment      => 'redirect IE',
+          rewrite_cond => ['%{HTTP_USER_AGENT} ^MSIE'],
+          rewrite_rule => ['^index\.html$ welcome.html'],
+        },
+      ],
+    }
+```
+
+You can also apply multiple conditions. For instance, rewrite index.html to welcome.html only when the browser is Lynx or Mozilla (version 1 or 2)
+
+```puppet
+    apache::vhost { 'site.name.fdqn':
+      …
+      rewrites => [
+        {
+          comment      => 'Lynx or Mozilla v1/2',
+          rewrite_cond => ['%{HTTP_USER_AGENT} ^Lynx/ [OR]', '%{HTTP_USER_AGENT} ^Mozilla/[12]'],
+          rewrite_rule => ['^index\.html$ welcome.html'],
+        },
+      ],
+    }
+```
+
+Multiple rewrites and conditions are also possible
+
+```puppet
+    apache::vhost { 'site.name.fdqn':
+      …
+      rewrites => [
+        {
+          comment      => 'Lynx or Mozilla v1/2',
+          rewrite_cond => ['%{HTTP_USER_AGENT} ^Lynx/ [OR]', '%{HTTP_USER_AGENT} ^Mozilla/[12]'],
+          rewrite_rule => ['^index\.html$ welcome.html'],
+        },
+        {
+          comment      => 'Internet Explorer',
+          rewrite_cond => ['%{HTTP_USER_AGENT} ^MSIE'],
+          rewrite_rule => ['^index\.html$ /index.IE.html [L]'],
+        },
+        {
+          rewrite_base => /apps/,
+          rewrite_rule => ['^index\.cgi$ index.php', '^index\.html$ index.php', '^index\.asp$ index.html'],
+        },
+     ], 
+    }
+```
+
+Refer to the [`mod_rewrite` documentation](http://httpd.apache.org/docs/current/mod/mod_rewrite.html) for more details on what is possible with rewrite rules and conditions.
+
+#####`scriptalias`
+
+Defines a directory of CGI scripts to be aliased to the path '/cgi-bin', for example: '/usr/scripts'. Defaults to 'undef'.
+
+#####`scriptaliases`
+
+Passes an array of hashes to the vhost to create either ScriptAlias or ScriptAliasMatch statements as per the [`mod_alias` documentation](http://httpd.apache.org/docs/current/mod/mod_alias.html). These hashes are formatted as follows:
+
+```puppet
+    scriptaliases => [
+      {
+        alias => '/myscript',
+        path  => '/usr/share/myscript',
+      },
+      {
+        aliasmatch => '^/foo(.*)',
+        path       => '/usr/share/fooscripts$1',
+      },
+      {
+        aliasmatch => '^/bar/(.*)',
+        path       => '/usr/share/bar/wrapper.sh/$1',
+      },
+      {
+        alias => '/neatscript',
+        path  => '/usr/share/neatscript',
+      },
+    ]
+```
+
+The ScriptAlias and ScriptAliasMatch directives are created in the order specified. As with [Alias and AliasMatch](#aliases) directives, more specific aliases should come before more general ones to avoid shadowing.
+
+#####`serveradmin`
+
+Specifies the email address Apache will display when it renders one of its error pages. Defaults to 'undef'.
+
+#####`serveraliases`
+
+Sets the [ServerAliases](http://httpd.apache.org/docs/current/mod/core.html#serveralias) of the site. Defaults to '[]'.
+
+#####`servername`
+
+Sets the servername corresponding to the hostname you connect to the virtual host at. Defaults to the title of the resource.
+
+#####`setenv`
+
+Used by HTTPD to set environment variables for vhosts. Defaults to '[]'.
+
+#####`setenvif`
+
+Used by HTTPD to conditionally set environment variables for vhosts. Defaults to '[]'.
+
+#####`suphp_addhandler`, `suphp_configpath`, & `suphp_engine`
+
+Set up a virtual host with [suPHP](http://suphp.org/DocumentationView.html?file=apache/CONFIG). 
+
+`suphp_addhandler` defaults to 'php5-script' on RedHat and FreeBSD, and 'x-httpd-php' on Debian.
+
+`suphp_configpath` defaults to 'undef' on RedHat and FreeBSD, and '/etc/php5/apache2' on Debian.
+
+`suphp_engine` allows values 'on' or 'off'. Defaults to 'off'
+
+To set up a virtual host with suPHP
+
+```puppet
+    apache::vhost { 'suphp.example.com':
+      port                => '80',
+      docroot             => '/home/appuser/myphpapp',
+      suphp_addhandler    => 'x-httpd-php',
+      suphp_engine        => 'on',
+      suphp_configpath    => '/etc/php5/apache2',
+      directories         => { path => '/home/appuser/myphpapp',
+        'suphp'           => { user => 'myappuser', group => 'myappgroup' },
+      }
+    }
+```
+
+#####`vhost_name`
+
+Enables name-based virtual hosting. If no IP is passed to the virtual host but the vhost is assigned a port, then the vhost name will be 'vhost_name:port'. If the virtual host has no assigned IP or port, the vhost name will be set to the title of the resource. Defaults to '*'.
+
+#####`virtual_docroot` 
+
+Sets up a virtual host with a wildcard alias subdomain mapped to a directory with the same name. For example, 'http://example.com' would map to '/var/www/example.com'. Defaults to 'false'. 
+
+```puppet
+    apache::vhost { 'subdomain.loc':
+      vhost_name       => '*',
+      port             => '80',
+      virtual_docroot' => '/var/www/%-2+',
+      docroot          => '/var/www',
+      serveraliases    => ['*.loc',],
+    }
+```
+
+#####`wsgi_daemon_process`, `wsgi_daemon_process_options`, `wsgi_process_group`, `wsgi_script_aliases`, & `wsgi_pass_authorization`
+
+Set up a virtual host with [WSGI](https://code.google.com/p/modwsgi/).
+
+`wsgi_daemon_process` sets the name of the WSGI daemon. It is a hash, accepting [these keys](http://modwsgi.readthedocs.org/en/latest/configuration-directives/WSGIDaemonProcess.html), and it defaults to 'undef'.
+
+`wsgi_daemon_process_options` is optional and defaults to 'undef'.
+
+`wsgi_process_group` sets the group ID the virtual host will run under. Defaults to 'undef'.
+
+`wsgi_script_aliases` requires a hash of web paths to filesystem .wsgi paths. Defaults to 'undef'.
+
+`wsgi_pass_authorization` the WSGI application handles authorisation instead of Apache when set to 'On'. For more information see [here] (http://modwsgi.readthedocs.org/en/latest/configuration-directives/WSGIPassAuthorization.html).  Defaults to 'undef' where apache will set the defaults setting to 'Off'.
+
+To set up a virtual host with WSGI
+
+```puppet
+    apache::vhost { 'wsgi.example.com':
+      port                        => '80',
+      docroot                     => '/var/www/pythonapp',
+      wsgi_daemon_process         => 'wsgi',
+      wsgi_daemon_process_options =>
+        { processes    => '2', 
+          threads      => '15', 
+          display-name => '%{GROUP}',
+         },
+      wsgi_process_group          => 'wsgi',
+      wsgi_script_aliases         => { '/' => '/var/www/demo.wsgi' },
+    }
+```
+
+####Parameter `directories` for `apache::vhost`
+
+The `directories` parameter within the `apache::vhost` class passes an array of hashes to the vhost to create [Directory](http://httpd.apache.org/docs/current/mod/core.html#directory), [File](http://httpd.apache.org/docs/current/mod/core.html#files), and [Location](http://httpd.apache.org/docs/current/mod/core.html#location) directive blocks. These blocks take the form, '< Directory /path/to/directory>...< /Directory>'.
+
+Each hash passed to `directories` must contain `path` as one of the keys.  You may also pass in `provider` which, if missing, defaults to 'directory'. (A full list of acceptable keys is below.) General usage will look something like
+
+```puppet
+    apache::vhost { 'sample.example.net':
+      docroot     => '/path/to/directory',
+      directories => [
+        { path => '/path/to/directory',  =>  },
+        { path => '/path/to/another/directory',  =>  },
+      ],
+    }
+```
+
+*Note:* At least one directory should match the `docroot` parameter. Once you start declaring directories, `apache::vhost` assumes that all required Directory blocks will be declared. If not defined, a single default Directory block will be created that matches the `docroot` parameter.
+
+The `provider` key can be set to 'directory', 'files', or 'location'. If the path starts with a [~](https://httpd.apache.org/docs/current/mod/core.html#files), HTTPD will interpret this as the equivalent of DirectoryMatch, FilesMatch, or LocationMatch.
+
+```puppet
+    apache::vhost { 'files.example.net':
+      docroot     => '/var/www/files',
+      directories => [
+        { 'path'     => '/var/www/files', 
+          'provider' => 'files', 
+          'deny'     => 'from all' 
+         },
+      ],
+    }
+```
+
+Available handlers, represented as keys, should be placed within the  `directory`,`'files`, or `location` hashes.  This looks like
+
+```puppet
+  apache::vhost { 'sample.example.net':
+      docroot     => '/path/to/directory',
+      directories => [ { path => '/path/to/directory', handler => value } ],
+}
+```
+
+Any handlers you do not set in these hashes will be considered 'undefined' within Puppet and will not be added to the virtual host, resulting in the module using their default values. Currently this is the list of supported handlers:
+
+######`addhandlers`
+
+Sets [AddHandler](http://httpd.apache.org/docs/current/mod/mod_mime.html#addhandler) directives, which map filename extensions to the specified handler. Accepts a list of hashes, with `extensions` serving to list the extensions being managed by the handler, and takes the form: `{ handler => 'handler-name', extensions => ['extension']}`. 
+
+```puppet
+    apache::vhost { 'sample.example.net':
+      docroot     => '/path/to/directory',
+      directories => [ 
+        { path        => '/path/to/directory',
+          addhandlers => [{ handler => 'cgi-script', extensions => ['.cgi']}],
+        }, 
+      ],
+    }
+```
+
+######`allow`
+
+Sets an [Allow](http://httpd.apache.org/docs/2.2/mod/mod_authz_host.html#allow) directive, which groups authorizations based on hostnames or IPs. **Deprecated:** This parameter is being deprecated due to a change in Apache. It will only work with Apache 2.2 and lower. You can use it as a single string for one rule or as an array for more than one.
+
+```puppet
+    apache::vhost { 'sample.example.net':
+      docroot     => '/path/to/directory',
+      directories => [ 
+        { path  => '/path/to/directory', 
+          allow => 'from example.org', 
+        }, 
+      ],
+    }
+```
+
+######`allow_override`
+
+Sets the types of directives allowed in [.htaccess](http://httpd.apache.org/docs/current/mod/core.html#allowoverride) files. Accepts an array.
+
+```puppet
+    apache::vhost { 'sample.example.net':
+      docroot      => '/path/to/directory',
+      directories  => [ 
+        { path           => '/path/to/directory', 
+          allow_override => ['AuthConfig', 'Indexes'], 
+        }, 
+      ],
+    }
+```
+
+######`auth_basic_authoritative`
+
+Sets the value for [AuthBasicAuthoritative](https://httpd.apache.org/docs/current/mod/mod_auth_basic.html#authbasicauthoritative), which determines whether authorization and authentication are passed to lower level Apache modules.
+
+######`auth_basic_fake`
+
+Sets the value for [AuthBasicFake](http://httpd.apache.org/docs/current/mod/mod_auth_basic.html#authbasicfake), which statically configures authorization credentials for a given directive block.
+
+######`auth_basic_provider`
+
+Sets the value for [AuthBasicProvider] (http://httpd.apache.org/docs/current/mod/mod_auth_basic.html#authbasicprovider), which sets the authentication provider for a given location.
+
+######`auth_digest_algorithm`
+
+Sets the value for [AuthDigestAlgorithm](http://httpd.apache.org/docs/current/mod/mod_auth_digest.html#authdigestalgorithm), which selects the algorithm used to calculate the challenge and response hashes.
+
+######`auth_digest_domain`
+
+Sets the value for [AuthDigestDomain](http://httpd.apache.org/docs/current/mod/mod_auth_digest.html#authdigestdomain), which allows you to specify one or more URIs in the same protection space for digest authentication.
+
+######`auth_digest_nonce_lifetime`
+
+Sets the value for [AuthDigestNonceLifetime](http://httpd.apache.org/docs/current/mod/mod_auth_digest.html#authdigestnoncelifetime), which controls how long the server nonce is valid.
+
+######`auth_digest_provider`
+
+Sets the value for [AuthDigestProvider](http://httpd.apache.org/docs/current/mod/mod_auth_digest.html#authdigestprovider), which sets the authentication provider for a given location.
+
+######`auth_digest_qop`
+
+Sets the value for [AuthDigestQop](http://httpd.apache.org/docs/current/mod/mod_auth_digest.html#authdigestqop), which determines the quality-of-protection to use in digest authentication.
+
+######`auth_digest_shmem_size`
+
+Sets the value for [AuthAuthDigestShmemSize](http://httpd.apache.org/docs/current/mod/mod_auth_digest.html#authdigestshmemsize), which defines the amount of shared memory allocated to the server for keeping track of clients.
+
+######`auth_group_file`
+
+Sets the value for [AuthGroupFile](https://httpd.apache.org/docs/current/mod/mod_authz_groupfile.html#authgroupfile), which sets the name of the text file containing the list of user groups for authorization.
+
+######`auth_name`
+
+Sets the value for [AuthName](http://httpd.apache.org/docs/current/mod/mod_authn_core.html#authname), which sets the name of the authorization realm.
+
+######`auth_require`
+
+Sets the entity name you're requiring to allow access. Read more about [Require](http://httpd.apache.org/docs/current/mod/mod_authz_host.html#requiredirectives).
+
+######`auth_type`
+
+Sets the value for [AuthType](http://httpd.apache.org/docs/current/mod/mod_authn_core.html#authtype), which guides the type of user authentication.
+
+######`auth_user_file`
+
+Sets the value for [AuthUserFile](http://httpd.apache.org/docs/current/mod/mod_authn_file.html#authuserfile), which sets the name of the text file containing the users/passwords for authentication.
+
+######`custom_fragment`
+
+Pass a string of custom configuration directives to be placed at the end of the directory configuration.
+
+```puppet
+  apache::vhost { 'monitor':
+    … 
+    custom_fragment => '
+  
+    SetHandler balancer-manager
+    Order allow,deny
+    Allow from all
+  
+  
+    SetHandler server-status
+    Order allow,deny
+    Allow from all
+  
+  ProxyStatus On',
+}
+```
+
+######`deny`
+
+Sets a [Deny](http://httpd.apache.org/docs/2.2/mod/mod_authz_host.html#deny) directive, specifying which hosts are denied access to the server. **Deprecated:** This parameter is being deprecated due to a change in Apache. It will only work with Apache 2.2 and lower. 
+
+```puppet
+    apache::vhost { 'sample.example.net':
+      docroot     => '/path/to/directory',
+      directories => [ 
+        { path => '/path/to/directory', 
+          deny => 'from example.org', 
+        }, 
+      ],
+    }
+```
+
+######`error_documents`
+
+An array of hashes used to override the [ErrorDocument](https://httpd.apache.org/docs/current/mod/core.html#errordocument) settings for the directory. 
+
+```puppet
+    apache::vhost { 'sample.example.net':
+      directories => [ 
+        { path            => '/srv/www',
+          error_documents => [
+            { 'error_code' => '503', 
+              'document'   => '/service-unavail',
+            },
+          ],
+        },
+      ],
+    }
+```
+
+######`headers`
+
+Adds lines for [Header](http://httpd.apache.org/docs/current/mod/mod_headers.html#header) directives.
+
+```puppet
+    apache::vhost { 'sample.example.net':
+      docroot     => '/path/to/directory',
+      directories => {
+        path    => '/path/to/directory',
+        headers => 'Set X-Robots-Tag "noindex, noarchive, nosnippet"',
+      },
+    }
+```
+
+######`index_options`
+
+Allows configuration settings for [directory indexing](http://httpd.apache.org/docs/current/mod/mod_autoindex.html#indexoptions).
+
+```puppet
+    apache::vhost { 'sample.example.net':
+      docroot     => '/path/to/directory',
+      directories => [ 
+        { path          => '/path/to/directory', 
+          options       => ['Indexes','FollowSymLinks','MultiViews'], 
+          index_options => ['IgnoreCase', 'FancyIndexing', 'FoldersFirst', 'NameWidth=*', 'DescriptionWidth=*', 'SuppressHTMLPreamble'],
+        },
+      ],
+    }
+```
+
+######`index_order_default`
+
+Sets the [default ordering](http://httpd.apache.org/docs/current/mod/mod_autoindex.html#indexorderdefault) of the directory index.
+
+```puppet
+    apache::vhost { 'sample.example.net':
+      docroot     => '/path/to/directory',
+      directories => [ 
+        { path                => '/path/to/directory', 
+          order               => 'Allow,Deny', 
+          index_order_default => ['Descending', 'Date'],
+        }, 
+      ],
+    }
+```
+
+######`options`
+
+Lists the [Options](http://httpd.apache.org/docs/current/mod/core.html#options) for the given Directory block.
+
+```puppet
+    apache::vhost { 'sample.example.net':
+      docroot     => '/path/to/directory',
+      directories => [ 
+        { path    => '/path/to/directory', 
+          options => ['Indexes','FollowSymLinks','MultiViews'], 
+        },
+      ],
+    }
+```
+
+######`order`
+
+Sets the order of processing Allow and Deny statements as per [Apache core documentation](httpd.apache.org/docs/2.2/mod/mod_authz_host.html#order). **Deprecated:** This parameter is being deprecated due to a change in Apache. It will only work with Apache 2.2 and lower.
+
+```puppet
+    apache::vhost { 'sample.example.net':
+      docroot     => '/path/to/directory',
+      directories => [ 
+        { path  => '/path/to/directory', 
+          order => 'Allow,Deny', 
+        },
+      ],
+    }
+```
+
+######`sethandler`
+
+Sets a `SetHandler` directive as per the [Apache Core documentation](http://httpd.apache.org/docs/2.2/mod/core.html#sethandler). An example:
+
+```puppet
+    apache::vhost { 'sample.example.net':
+      docroot     => '/path/to/directory',
+      directories => [ 
+        { path       => '/path/to/directory', 
+          sethandler => 'None', 
+        }
+      ],
+    }
+```
+
+######`passenger_enabled`
+
+Sets the value for the [PassengerEnabled](http://www.modrails.com/documentation/Users%20guide%20Apache.html#PassengerEnabled) directory to 'on' or 'off'. Requires `apache::mod::passenger` to be included.
+
+```puppet
+    apache::vhost { 'sample.example.net':
+      docroot     => '/path/to/directory',
+      directories => [ 
+        { path              => '/path/to/directory', 
+          passenger_enabled => 'on',
+        }, 
+      ],
+    }
+```
+
+*Note:* Be aware that there is an [issue](http://www.conandalton.net/2010/06/passengerenabled-off-not-working.html) using the PassengerEnabled directive with the PassengerHighPerformance directive.
+
+######`php_admin_value` and `php_admin_flag`
+
+`php_admin_value` sets the value of the directory, and `php_admin_flag` uses a boolean to configure the directory. Further information can be found [here](http://php.net/manual/en/configuration.changes.php).
+
+######`ssl_options`
+
+String or list of [SSLOptions](https://httpd.apache.org/docs/current/mod/mod_ssl.html#ssloptions), which configure SSL engine run-time options. This handler takes precedence over SSLOptions set in the parent block of the vhost.
+
+```puppet
+    apache::vhost { 'secure.example.net':
+      docroot     => '/path/to/directory',
+      directories => [
+        { path        => '/path/to/directory', 
+          ssl_options => '+ExportCertData', 
+        },
+        { path        => '/path/to/different/dir', 
+          ssl_options => [ '-StdEnvVars', '+ExportCertData'],
+        },
+      ],
+    }
+```
+
+######`suphp`
+
+A hash containing the 'user' and 'group' keys for the [suPHP_UserGroup](http://www.suphp.org/DocumentationView.html?file=apache/CONFIG) setting. It must be used with `suphp_engine => on` in the vhost declaration, and may only be passed within `directories`.
+
+```puppet
+    apache::vhost { 'secure.example.net':
+      docroot     => '/path/to/directory',
+      directories => [
+        { path  => '/path/to/directory', 
+          suphp => 
+            { user  =>  'myappuser', 
+              group => 'myappgroup', 
+            },
+        },
+      ],
+    }
+```
+
+####SSL parameters for `apache::vhost`
+
+All of the SSL parameters for `::vhost` will default to whatever is set in the base `apache` class. Use the below parameters to tweak individual SSL settings for specific vhosts.
+
+#####`ssl`
+
+Enables SSL for the virtual host. SSL vhosts only respond to HTTPS queries. Valid values are 'true' or 'false'. Defaults to 'false'. 
+
+#####`ssl_ca`
+
+Specifies the SSL certificate authority. Defaults to 'undef'.
+
+#####`ssl_cert`
+
+Specifies the SSL certification. Defaults are based on your OS: '/etc/pki/tls/certs/localhost.crt' for RedHat, '/etc/ssl/certs/ssl-cert-snakeoil.pem' for Debian, and '/usr/local/etc/apache22/server.crt' for FreeBSD.
+
+#####`ssl_protocol`
+
+Specifies [SSLProtocol](http://httpd.apache.org/docs/current/mod/mod_ssl.html#sslprotocol). Defaults to 'undef'. 
+
+If you do not use this parameter, it will use the HTTPD default from ssl.conf.erb, 'all -SSLv2'.
+
+#####`ssl_cipher`
+
+Specifies [SSLCipherSuite](http://httpd.apache.org/docs/current/mod/mod_ssl.html#sslciphersuite). Defaults to 'undef'.
+
+If you do not use this parameter, it will use the HTTPD default from ssl.conf.erb, 'HIGH:MEDIUM:!aNULL:!MD5'.
+
+#####`ssl_honorcipherorder`
+
+Sets [SSLHonorCipherOrder](http://httpd.apache.org/docs/current/mod/mod_ssl.html#sslhonorcipherorder), which is used to prefer the server's cipher preference order. Defaults to 'On' in the base `apache` config.
+
+#####`ssl_certs_dir`
+
+Specifies the location of the SSL certification directory. Defaults to '/etc/ssl/certs' on Debian, '/etc/pki/tls/certs' on RedHat, and '/usr/local/etc/apache22' on FreeBSD.
+
+#####`ssl_chain`
+
+Specifies the SSL chain. Defaults to 'undef'. (This default will work out of the box but must be updated in the base `apache` class with your specific certificate information before being used in production.)
+
+#####`ssl_crl`
+
+Specifies the certificate revocation list to use. Defaults to 'undef'. (This default will work out of the box but must be updated in the base `apache` class with your specific certificate information before being used in production.)
+
+#####`ssl_crl_path`
+
+Specifies the location of the certificate revocation list. Defaults to 'undef'. (This default will work out of the box but must be updated in the base `apache` class with your specific certificate information before being used in production.)
+
+#####`ssl_key`
+
+Specifies the SSL key. Defaults are based on your operating system: '/etc/pki/tls/private/localhost.key' for RedHat, '/etc/ssl/private/ssl-cert-snakeoil.key' for Debian, and '/usr/local/etc/apache22/server.key' for FreeBSD. (This default will work out of the box but must be updated in the base `apache` class with your specific certificate information before being used in production.)
+
+#####`ssl_verify_client`
+
+Sets the [SSLVerifyClient](http://httpd.apache.org/docs/current/mod/mod_ssl.html#sslverifyclient) directive, which sets the certificate verification level for client authentication. Valid values are: 'none', 'optional', 'require', and 'optional_no_ca'. Defaults to 'undef'.
+
+```puppet
+    apache::vhost { 'sample.example.net':
+      …
+      ssl_verify_client => 'optional',
+    }
+```
+
+#####`ssl_verify_depth`
+
+Sets the [SSLVerifyDepth](http://httpd.apache.org/docs/current/mod/mod_ssl.html#sslverifydepth) directive, which specifies the maximum depth of CA certificates in client certificate verification. Defaults to 'undef'.
+
+```puppet
+    apache::vhost { 'sample.example.net':
+      …
+      ssl_verify_depth => 1,
+    }
+```
+
+#####`ssl_options`
+
+Sets the [SSLOptions](http://httpd.apache.org/docs/current/mod/mod_ssl.html#ssloptions) directive, which configures various SSL engine run-time options. This is the global setting for the given vhost and can be a string or an array. Defaults to 'undef'. 
+
+A string:
+
+```puppet
+    apache::vhost { 'sample.example.net':
+      …
+      ssl_options => '+ExportCertData',
+    }
+```
+
+An array:
+
+```puppet
+    apache::vhost { 'sample.example.net':
+      …
+      ssl_options => [ '+StrictRequire', '+ExportCertData' ],
+    }
+```
+
+#####`ssl_proxyengine`
+
+Specifies whether or not to use [SSLProxyEngine](http://httpd.apache.org/docs/current/mod/mod_ssl.html#sslproxyengine). Valid values are 'true' and 'false'. Defaults to 'false'.
+
+
+###Virtual Host Examples
+
+The apache module allows you to set up pretty much any configuration of virtual host you might need. This section will address some common configurations, but look at the [Tests section](https://github.com/puppetlabs/puppetlabs-apache/tree/master/tests) for even more examples.
+
+Configure a vhost with a server administrator
+
+```puppet
+    apache::vhost { 'third.example.com':
+      port        => '80',
+      docroot     => '/var/www/third',
+      serveradmin => 'admin@example.com',
+    }
+```
+
+- - -
+
+Set up a vhost with aliased servers
+
+```puppet
+    apache::vhost { 'sixth.example.com':
+      serveraliases => [
+        'sixth.example.org',
+        'sixth.example.net',
+      ],
+      port          => '80',
+      docroot       => '/var/www/fifth',
+    }
+```
+
+- - -
+
+Configure a vhost with a cgi-bin
+
+```puppet
+    apache::vhost { 'eleventh.example.com':
+      port        => '80',
+      docroot     => '/var/www/eleventh',
+      scriptalias => '/usr/lib/cgi-bin',
+    }
+```
+
+- - -
+
+Set up a vhost with a rack configuration
+
+```puppet
+    apache::vhost { 'fifteenth.example.com':
+      port           => '80',
+      docroot        => '/var/www/fifteenth',
+      rack_base_uris => ['/rackapp1', '/rackapp2'],
+    }
+```
+
+- - -
+
+Set up a mix of SSL and non-SSL vhosts at the same domain
+
+```puppet
+    #The non-ssl vhost
+    apache::vhost { 'first.example.com non-ssl':
+      servername => 'first.example.com',
+      port       => '80',
+      docroot    => '/var/www/first',
+    }
+
+    #The SSL vhost at the same domain
+    apache::vhost { 'first.example.com ssl':
+      servername => 'first.example.com',
+      port       => '443',
+      docroot    => '/var/www/first',
+      ssl        => true,
+    }
+```
+
+- - -
+
+Configure a vhost to redirect non-SSL connections to SSL
+
+```puppet
+    apache::vhost { 'sixteenth.example.com non-ssl':
+      servername      => 'sixteenth.example.com',
+      port            => '80',
+      docroot         => '/var/www/sixteenth',
+      redirect_status => 'permanent',
+      redirect_dest   => 'https://sixteenth.example.com/'
+    }
+    apache::vhost { 'sixteenth.example.com ssl':
+      servername => 'sixteenth.example.com',
+      port       => '443',
+      docroot    => '/var/www/sixteenth',
+      ssl        => true,
+    }
+```
+
+- - -
+
+Set up IP-based vhosts on any listen port and have them respond to requests on specific IP addresses. In this example, we will set listening on ports 80 and 81. This is required because the example vhosts are not declared with a port parameter.
+
+```puppet
+    apache::listen { '80': }
+    apache::listen { '81': }
+```
+
+Then we will set up the IP-based vhosts
+
+```puppet
+    apache::vhost { 'first.example.com':
+      ip       => '10.0.0.10',
+      docroot  => '/var/www/first',
+      ip_based => true,
+    }
+    apache::vhost { 'second.example.com':
+      ip       => '10.0.0.11',
+      docroot  => '/var/www/second',
+      ip_based => true,
+    }
+```
+
+- - -
+
+Configure a mix of name-based and IP-based vhosts. First, we will add two IP-based vhosts on 10.0.0.10, one SSL and one non-SSL
+
+```puppet
+    apache::vhost { 'The first IP-based vhost, non-ssl':
+      servername => 'first.example.com',
+      ip         => '10.0.0.10',
+      port       => '80',
+      ip_based   => true,
+      docroot    => '/var/www/first',
+    }
+    apache::vhost { 'The first IP-based vhost, ssl':
+      servername => 'first.example.com',
+      ip         => '10.0.0.10',
+      port       => '443',
+      ip_based   => true,
+      docroot    => '/var/www/first-ssl',
+      ssl        => true,
+    }
+```
+
+Then, we will add two name-based vhosts listening on 10.0.0.20
+
+```puppet
+    apache::vhost { 'second.example.com':
+      ip      => '10.0.0.20',
+      port    => '80',
+      docroot => '/var/www/second',
+    }
+    apache::vhost { 'third.example.com':
+      ip      => '10.0.0.20',
+      port    => '80',
+      docroot => '/var/www/third',
+    }
+```
+
+If you want to add two name-based vhosts so that they will answer on either 10.0.0.10 or 10.0.0.20, you **MUST** declare `add_listen => 'false'` to disable the otherwise automatic 'Listen 80', as it will conflict with the preceding IP-based vhosts.
+
+```puppet
+    apache::vhost { 'fourth.example.com':
+      port       => '80',
+      docroot    => '/var/www/fourth',
+      add_listen => false,
+    }
+    apache::vhost { 'fifth.example.com':
+      port       => '80',
+      docroot    => '/var/www/fifth',
+      add_listen => false,
+    }
+```
+
+###Load Balancing
+
+####Defined Type: `apache::balancer`
+
+`apache::balancer` creates an Apache balancer cluster. Each balancer cluster needs one or more balancer members, which are declared with [`apache::balancermember`](#defined-type-apachebalancermember). 
+
+One `apache::balancer` defined resource should be defined for each Apache load balanced set of servers. The `apache::balancermember` resources for all balancer members can be exported and collected on a single Apache load balancer server using exported resources.
+
+**Parameters within `apache::balancer`:**
+
+#####`name`
+
+Sets the balancer cluster's title. This parameter will also set the title of the conf.d file.
+
+#####`proxy_set`
+
+Configures key-value pairs as [ProxySet](http://httpd.apache.org/docs/current/mod/mod_proxy.html#proxyset) lines. Accepts a hash, and defaults to '{}'.
+
+#####`collect_exported`
+
+Determines whether or not to use exported resources. Valid values 'true' and 'false', defaults to 'true'. 
+
+If you statically declare all of your backend servers, you should set this to 'false' to rely on existing declared balancer member resources. Also make sure to use `apache::balancermember` with array arguments.
+
+If you wish to dynamically declare your backend servers via [exported resources](http://docs.puppetlabs.com/guides/exported_resources.html) collected on a central node, you must set this parameter to 'true' in order to collect the exported balancer member resources that were exported by the balancer member nodes.
+
+If you choose not to use exported resources, all balancer members will be configured in a single puppet run. If you are using exported resources, Puppet has to run on the balanced nodes, then run on the balancer.
+
+####Defined Type: `apache::balancermember`
+
+Defines members of [mod_proxy_balancer](http://httpd.apache.org/docs/current/mod/mod_proxy_balancer.html), which will set up a balancer member inside a listening service configuration block in etc/apache/apache.cfg on the load balancer.
+
+**Parameters within `apache::balancermember`:**
+
+#####`name`
+
+Sets the title of the resource. This name will also set the name of the concat fragment.
+
+#####`balancer_cluster`
+
+Sets the Apache service's instance name. This must match the name of a declared `apache::balancer` resource. Required.
+
+#####`url`
+
+Specifies the URL used to contact the balancer member server. Defaults to 'http://${::fqdn}/'.
+
+#####`options`
+
+An array of [options](http://httpd.apache.org/docs/2.2/mod/mod_proxy.html#balancermember) to be specified after the URL. Accepts any key-value pairs available to [ProxyPass](http://httpd.apache.org/docs/2.2/mod/mod_proxy.html#proxypass).
+
+####Examples
+
+To load balance with exported resources, export the `balancermember` from the balancer member
+
+```puppet
+      @@apache::balancermember { "${::fqdn}-puppet00":
+        balancer_cluster => 'puppet00',
+        url              => "ajp://${::fqdn}:8009"
+        options          => ['ping=5', 'disablereuse=on', 'retry=5', 'ttl=120'],
+      }
+```
+
+Then, on the proxy server, create the balancer cluster
+
+```puppet
+      apache::balancer { 'puppet00': }
+```
+
+To load balance without exported resources, declare the following on the proxy
+
+```puppet
+    apache::balancer { 'puppet00': }
+    apache::balancermember { "${::fqdn}-puppet00":
+        balancer_cluster => 'puppet00',
+        url              => "ajp://${::fqdn}:8009"
+        options          => ['ping=5', 'disablereuse=on', 'retry=5', 'ttl=120'],
+      }
+```
+
+Then declare `apache::balancer` and `apache::balancermember` on the proxy server.
+
+If you need to use ProxySet in the balancer config
+
+```puppet
+      apache::balancer { 'puppet01':
+        proxy_set => {'stickysession' => 'JSESSIONID'},
+      }
+```
+
+##Reference
+
+###Classes
+
+####Public Classes
+
+* [`apache`](#class-apache): Guides the basic setup of Apache.
+* `apache::dev`: Installs Apache development libraries. (*Note:* On FreeBSD, you must declare `apache::package` or `apache` before `apache::dev`.)
+* [`apache::mod::[name]`](#classes-apachemodname): Enables specific Apache HTTPD modules.
+ 
+####Private Classes
+
+* `apache::confd::no_accf`: Creates the no-accf.conf configuration file in conf.d, required by FreeBSD's Apache 2.4.
+* `apache::default_confd_files`: Includes conf.d files for FreeBSD.
+* `apache::default_mods`: Installs the Apache modules required to run the default configuration.
+* `apache::package`: Installs and configures basic Apache packages.
+* `apache::params`: Manages Apache parameters.
+* `apache::service`: Manages the Apache daemon.
+
+###Defined Types
+
+####Public Defined Types
+
+* `apache::balancer`: Creates an Apache balancer cluster.
+* `apache::balancermember`: Defines members of [mod_proxy_balancer](http://httpd.apache.org/docs/current/mod/mod_proxy_balancer.html).
+* `apache::listen`: Based on the title, controls which ports Apache binds to for listening. Adds [Listen](http://httpd.apache.org/docs/current/bind.html) directives to ports.conf in the Apache HTTPD configuration directory. Titles take the form '', ':', or ':'.
+* `apache::mod`: Used to enable arbitrary Apache HTTPD modules for which there is no specific `apache::mod::[name]` class.
+* `apache::namevirtualhost`: Enables name-based hosting of a virtual host. Adds all [NameVirtualHost](http://httpd.apache.org/docs/current/vhosts/name-based.html) directives to the `ports.conf` file in the Apache HTTPD configuration directory. Titles take the form '\*', '*:', '\_default_:, '', or ':'.
+* `apache::vhost`: Allows specialized configurations for virtual hosts that have requirements outside the defaults. 
+
+####Private Defined Types
+
+* `apache::peruser::multiplexer`: Enables the [Peruser](http://www.freebsd.org/cgi/url.cgi?ports/www/apache22-peruser-mpm/pkg-descr) module for FreeBSD only.
+* `apache::peruser::processor`: Enables the [Peruser](http://www.freebsd.org/cgi/url.cgi?ports/www/apache22-peruser-mpm/pkg-descr) module for FreeBSD only.
+
+###Templates
+
+The Apache module relies heavily on templates to enable the `vhost` and `apache::mod` defined types. These templates are built based on Facter facts around your operating system. Unless explicitly called out, most templates are not meant for configuration.
+
+##Limitations
+
+###Ubuntu 10.04
+
+The `apache::vhost::WSGIImportScript` parameter creates a statement inside the VirtualHost which is unsupported on older versions of Apache, causing this to fail.  This will be remedied in a future refactoring.
+
+###RHEL/CentOS 5
+
+The `apache::mod::passenger` and `apache::mod::proxy_html` classes are untested since repositories are missing compatible packages.   
+
+###RHEL/CentOS 7
+
+The `apache::mod::passenger` class is untested as the repository does not have packages for EL7 yet.  The fact that passenger packages aren't available also makes us unable to test the `rack_base_uri` parameter in `apache::vhost`.
+
+###General
+
+This module is CI tested on Centos 5 & 6, Ubuntu 12.04 & 14.04, Debian 7, and RHEL 5, 6 & 7 platforms against both the OSS and Enterprise version of Puppet. 
+
+The module contains support for other distributions and operating systems, such as FreeBSD and Amazon Linux, but is not formally tested on those and regressions may occur.
+
+###SELinux and Custom Paths
+
+If you are running with SELinux in enforcing mode and want to use custom paths for your `logroot`, `mod_dir`, `vhost_dir`, and `docroot`, you will need to manage the context for the files yourself.
+
+Something along the lines of:
+
+```puppet
+        exec { 'set_apache_defaults':
+          command => 'semanage fcontext -a -t httpd_sys_content_t "/custom/path(/.*)?"',
+          path    => '/bin:/usr/bin/:/sbin:/usr/sbin',
+          require => Package['policycoreutils-python'],
+        }
+        package { 'policycoreutils-python': ensure => installed }
+        exec { 'restorecon_apache':
+          command => 'restorecon -Rv /apache_spec',
+          path    => '/bin:/usr/bin/:/sbin:/usr/sbin',
+          before  => Service['httpd'],
+          require => Class['apache'],
+        }
+        class { 'apache': }
+        host { 'test.server': ip => '127.0.0.1' }
+        file { '/custom/path': ensure => directory, }
+        file { '/custom/path/include': ensure => present, content => '#additional_includes' }
+        apache::vhost { 'test.server':
+          docroot             => '/custom/path',
+          additional_includes => '/custom/path/include',
+        }
+```
+
+You need to set the contexts using `semanage fcontext` not `chcon` because `file {...}` resources will reset the context to the values in the database if the resource isn't specifying the context.
+
+##Development
+
+###Contributing
+
+Puppet Labs modules on the Puppet Forge are open projects, and community contributions are essential for keeping them great. We can’t access the huge number of platforms and myriad of hardware, software, and deployment configurations that Puppet is intended to serve.
+
+We want to keep it as easy as possible to contribute changes so that our modules work in your environment. There are a few guidelines that we need contributors to follow so that we can have a chance of keeping on top of things.
+
+You can read the complete module contribution guide [on the Puppet Labs wiki.](http://projects.puppetlabs.com/projects/module-site/wiki/Module_contributing)
+
+###Running tests
+
+This project contains tests for both [rspec-puppet](http://rspec-puppet.com/) and [beaker-rspec](https://github.com/puppetlabs/beaker-rspec) to verify functionality. For in-depth information please see their respective documentation.
+
+Quickstart:
+
+    gem install bundler
+    bundle install
+    bundle exec rake spec
+    bundle exec rspec spec/acceptance
+    RS_DEBUG=yes bundle exec rspec spec/acceptance
diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/README.passenger.md b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/README.passenger.md
new file mode 100644
index 00000000000..4b4caa8c09f
--- /dev/null
+++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/README.passenger.md
@@ -0,0 +1,278 @@
+# Passenger
+
+Just enabling the Passenger module is insufficient for the use of Passenger in
+production. Passenger should be tunable to better fit the environment in which
+it is run while being aware of the resources it required.
+
+To this end the Apache passenger module has been modified to apply system wide
+Passenger tuning declarations to `passenger.conf`. Declarations specific to a
+virtual host should be passed through when defining a `vhost` (e.g.
+`rack_base_uris` parameter on the `apache::vhost` type, check `README.md`).
+
+Also, general apache module loading parameters can be supplied to enable using
+a customized passenger module in place of a default-package-based version of
+the module.
+
+# Operating system support and Passenger versions
+
+The most important configuration directive for the Apache Passenger module is
+`PassengerRoot`. Its value depends on the Passenger version used (2.x, 3.x or
+4.x) and on the operating system package from which the Apache Passenger module
+is installed.
+
+The following table summarises the current *default versions* and
+`PassengerRoot` settings for the operating systems supported by
+puppetlabs-apache:
+
+OS               | Passenger version  | `PassengerRoot` 
+---------------- | ------------------ | ----------------
+Debian 7         | 3.0.13             | /usr
+Ubuntu 12.04     | 2.2.11             | /usr
+Ubuntu 14.04     | 4.0.37             | /usr/lib/ruby/vendor_ruby/phusion_passenger/locations.ini 
+RHEL with EPEL6  | 3.0.21             | /usr/lib/ruby/gems/1.8/gems/passenger-3.0.21 
+
+As mentioned in `README.md` there are no compatible packages available for
+RHEL/CentOS 5 or RHEL/CentOS 7.
+
+## Configuration files and locations on RHEL/CentOS
+
+Notice two important points:
+
+1. The Passenger version packaged in the EPEL repositories may change over time.
+2. The value of `PassengerRoot` depends on the Passenger version installed.
+
+To prevent the puppetlabs-apache module from having to keep up with these
+package versions the Passenger configuration files installed by the
+packages are left untouched by this module. All configuration is placed in an
+extra configuration file managed by puppetlabs-apache.
+
+This means '/etc/httpd/conf.d/passenger.conf' is installed by the
+`mod_passenger` package and contains correct values for `PassengerRoot` and
+`PassengerRuby`. Puppet will ignore this file. Additional configuration
+directives as described in the remainder of this document are placed in
+'/etc/httpd/conf.d/passenger_extra.conf', managed by Puppet.
+
+This pertains *only* to RHEL/CentOS, *not* Debian and Ubuntu.
+
+## Third-party and custom Passenger packages and versions
+
+The Passenger version distributed by the default OS packages may be too old to
+be useful. Newer versions may be installed via Gems, from source or from
+third-party OS packages.
+
+Most notably the Passenger developers officially provide Debian packages for a
+variety of Debian and Ubuntu releases in the [Passenger APT
+repository](https://oss-binaries.phusionpassenger.com/apt/passenger). Read more
+about [installing these packages in the offical user
+guide](http://www.modrails.com/documentation/Users%20guide%20Apache.html#install_on_debian_ubuntu).
+
+If you install custom Passenger packages and newer version make sure to set the
+directives `PassengerRoot`, `PassengerRuby` and/or `PassengerDefaultRuby`
+correctly, or Passenger and Apache will fail to function properly.
+
+For Passenger 4.x packages on Debian and Ubuntu the `PassengerRoot` directive
+should almost universally be set to
+`/usr/lib/ruby/vendor_ruby/phusion_passenger/locations.ini`.
+
+# Parameters for `apache::mod::passenger`
+
+The following class parameters configure Passenger in a global, server-wide
+context.
+
+Example:
+
+```puppet
+class { 'apache::mod::passenger':
+  passenger_root             => '/usr/lib/ruby/vendor_ruby/phusion_passenger/locations.ini',
+  passenger_default_ruby     => '/usr/bin/ruby1.9.3',
+  passenger_high_performance => 'on',
+  rails_autodetect           => 'off',
+  mod_lib_path               => '/usr/lib/apache2/custom_modules',
+}
+```
+
+The general form is using the all lower-case version of the configuration
+directive, with underscores instead of CamelCase.
+
+## Parameters used with passenger.conf
+
+If you pass a default value to `apache::mod::passenger` it will be ignored and
+not passed through to the configuration file. 
+
+### passenger_root
+
+The location to the Phusion Passenger root directory. This configuration option
+is essential to Phusion Passenger, and allows Phusion Passenger to locate its
+own data files. 
+
+The default depends on the Passenger version and the means of installation. See
+the above section on operating system support, versions and packages for more
+information.
+
+http://www.modrails.com/documentation/Users%20guide%20Apache.html#_passengerroot_lt_directory_gt
+
+### passenger_default_ruby
+
+This option specifies the default Ruby interpreter to use for web apps as well
+as for all sorts of internal Phusion Passenger helper scripts, e.g. the one
+used by PassengerPreStart.
+
+This directive was introduced in Passenger 4.0.0 and will not work in versions
+< 4.x. Do not set this parameter if your Passenger version is older than 4.0.0.
+
+Defaults to `undef` for all operating systems except Ubuntu 14.04, where it is
+set to '/usr/bin/ruby'.
+
+http://www.modrails.com/documentation/Users%20guide%20Apache.html#PassengerDefaultRuby
+
+### passenger_ruby
+
+This directive is the same as `passenger_default_ruby` for Passenger versions
+< 4.x and must be used instead of `passenger_default_ruby` for such versions.
+
+It makes no sense to set `PassengerRuby` for Passenger >= 4.x. That
+directive should only be used to override the value of `PassengerDefaultRuby`
+on a non-global context, i.e. in ``, ``, ``
+and so on.
+
+Defaults to `/usr/bin/ruby` for all supported operating systems except Ubuntu
+14.04, where it is set to `undef`.
+
+http://www.modrails.com/documentation/Users%20guide%20Apache.html#PassengerRuby
+
+### passenger_high_performance
+
+Default is `off`. When turned `on` Passenger runs in a higher performance mode
+that can be less compatible with other Apache modules.
+
+http://www.modrails.com/documentation/Users%20guide%20Apache.html#PassengerHighPerformance
+
+### passenger_max_pool_size
+
+Sets the maximum number of Passenger application processes that may
+simultaneously run. The default value is 6.
+
+http://www.modrails.com/documentation/Users%20guide%20Apache.html#_passengermaxpoolsize_lt_integer_gt
+
+### passenger_pool_idle_time
+
+The maximum number of seconds a Passenger Application process will be allowed
+to remain idle before being shut down. The default value is 300.
+
+http://www.modrails.com/documentation/Users%20guide%20Apache.html#PassengerPoolIdleTime
+
+### passenger_max_requests
+
+The maximum number of request a Passenger application will process before being
+restarted. The default value is 0, which indicates that a process will only
+shut down if the Pool Idle Time (see above) expires.
+
+http://www.modrails.com/documentation/Users%20guide%20Apache.html#PassengerMaxRequests
+
+### passenger_stat_throttle_rate
+
+Sets how often Passenger performs file system checks, at most once every _x_
+seconds. Default is 0, which means the checks are performed with every request.
+
+http://www.modrails.com/documentation/Users%20guide%20Apache.html#_passengerstatthrottlerate_lt_integer_gt
+
+### rack_autodetect
+
+Should Passenger automatically detect if the document root of a virtual host is
+a Rack application. Not set by default (`undef`). Note that this directive has
+been removed in Passenger 4.0.0 and `PassengerEnabled` should be used instead.
+Use this directive only on Passenger < 4.x.
+
+http://www.modrails.com/documentation/Users%20guide%20Apache.html#_rackautodetect_lt_on_off_gt
+
+### rails_autodetect
+
+Should Passenger automatically detect if the document root of a virtual host is
+a Rails application.  Not set by default (`undef`). Note that this directive
+has been removed in Passenger 4.0.0 and `PassengerEnabled` should be used
+instead. Use this directive only on Passenger < 4.x.
+
+http://www.modrails.com/documentation/Users%20guide%20Apache.html#_railsautodetect_lt_on_off_gt
+
+### passenger_use_global_queue
+
+Allows toggling of PassengerUseGlobalQueue.  NOTE: PassengerUseGlobalQueue is
+the default in Passenger 4.x and the versions >= 4.x have disabled this
+configuration option altogether.  Use with caution.
+
+## Parameters used to load the module
+
+Unlike the tuning parameters specified above, the following parameters are only
+used when loading customized passenger modules.
+
+### mod_package
+
+Allows overriding the default package name used for the passenger module
+package.
+
+### mod_package_ensure
+
+Allows overriding the package installation setting used by puppet when
+installing the passenger module. The default is 'present'.
+
+### mod_id
+
+Allows overriding the value used by apache to identify the passenger module.
+The default is 'passenger_module'.
+
+### mod_lib_path
+
+Allows overriding the directory path used by apache when loading the passenger
+module. The default is the value of `$apache::params::lib_path`.
+
+### mod_lib
+
+Allows overriding the library file name used by apache when loading the
+passenger module. The default is 'mod_passenger.so'.
+
+### mod_path
+
+Allows overriding the full path to the library file used by apache when loading
+the passenger module. The default is the concatenation of the `mod_lib_path`
+and `mod_lib` parameters.
+
+# Dependencies
+
+RedHat-based systems will need to configure additional package repositories in
+order to install Passenger, specifically:
+
+* [Extra Packages for Enterprise Linux](https://fedoraproject.org/wiki/EPEL)
+* [Phusion Passenger](http://passenger.stealthymonkeys.com)
+
+Configuration of these repositories is beyond the scope of this module and is
+left to the user.
+
+# Attribution
+
+The Passenger tuning parameters for the `apache::mod::passenger` Puppet class
+was modified by Aaron Hicks (hicksa@landcareresearch.co.nz) for work on the
+NeSI Project and the Tuakiri New Zealand Access Federation as a fork from the
+PuppetLabs Apache module on GitHub.
+
+* https://github.com/puppetlabs/puppetlabs-apache
+* https://github.com/nesi/puppetlabs-apache
+* http://www.nesi.org.nz//
+* https://tuakiri.ac.nz/confluence/display/Tuakiri/Home
+
+# Copyright and License
+
+Copyright (C) 2012 [Puppet Labs](https://www.puppetlabs.com/) Inc
+
+Puppet Labs can be contacted at: info@puppetlabs.com
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+  http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/Rakefile b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/Rakefile
new file mode 100644
index 00000000000..5868545f200
--- /dev/null
+++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/Rakefile
@@ -0,0 +1,10 @@
+require 'puppetlabs_spec_helper/rake_tasks'
+require 'puppet-lint/tasks/puppet-lint'
+
+PuppetLint.configuration.fail_on_warnings
+PuppetLint.configuration.send('disable_80chars')
+PuppetLint.configuration.send('disable_class_inherits_from_params_class')
+PuppetLint.configuration.send('disable_class_parameter_defaults')
+PuppetLint.configuration.send('disable_documentation')
+PuppetLint.configuration.send('disable_single_quote_string_with_variables')
+PuppetLint.configuration.ignore_paths = ["spec/**/*.pp", "pkg/**/*.pp"]
diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/files/httpd b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/files/httpd
new file mode 100644
index 00000000000..d65a8d445c0
--- /dev/null
+++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/files/httpd
@@ -0,0 +1,24 @@
+# Configuration file for the httpd service.
+
+#
+# The default processing model (MPM) is the process-based
+# 'prefork' model.  A thread-based model, 'worker', is also
+# available, but does not work with some modules (such as PHP).
+# The service must be stopped before changing this variable.
+#
+#HTTPD=/usr/sbin/httpd.worker
+
+#
+# To pass additional options (for instance, -D definitions) to the
+# httpd binary at startup, set OPTIONS here.
+#
+#OPTIONS=
+#OPTIONS=-DDOWN
+
+#
+# By default, the httpd process is started in the C locale; to 
+# change the locale in which the server runs, the HTTPD_LANG
+# variable can be set.
+#
+#HTTPD_LANG=C
+export SHORTHOST=`hostname -s`
diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/lib/puppet/provider/a2mod.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/lib/puppet/provider/a2mod.rb
new file mode 100644
index 00000000000..670aca3d03b
--- /dev/null
+++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/lib/puppet/provider/a2mod.rb
@@ -0,0 +1,34 @@
+class Puppet::Provider::A2mod < Puppet::Provider
+  def self.prefetch(mods)
+    instances.each do |prov|
+      if mod = mods[prov.name]
+        mod.provider = prov
+      end
+    end
+  end
+
+  def flush
+    @property_hash.clear
+  end
+
+  def properties
+    if @property_hash.empty?
+      @property_hash = query || {:ensure => :absent}
+      @property_hash[:ensure] = :absent if @property_hash.empty?
+    end
+    @property_hash.dup
+  end
+
+  def query
+    self.class.instances.each do |mod|
+      if mod.name == self.name or mod.name.downcase == self.name
+        return mod.properties
+      end
+    end
+    nil
+  end
+
+  def exists?
+    properties[:ensure] != :absent
+  end
+end
diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/lib/puppet/provider/a2mod/a2mod.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/lib/puppet/provider/a2mod/a2mod.rb
new file mode 100644
index 00000000000..e257a579e89
--- /dev/null
+++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/lib/puppet/provider/a2mod/a2mod.rb
@@ -0,0 +1,35 @@
+require 'puppet/provider/a2mod'
+
+Puppet::Type.type(:a2mod).provide(:a2mod, :parent => Puppet::Provider::A2mod) do
+    desc "Manage Apache 2 modules on Debian and Ubuntu"
+
+    optional_commands :encmd => "a2enmod"
+    optional_commands :discmd => "a2dismod"
+    commands :apache2ctl => "apache2ctl"
+
+    confine :osfamily => :debian
+    defaultfor :operatingsystem => [:debian, :ubuntu]
+
+    def self.instances
+      modules = apache2ctl("-M").lines.collect { |line|
+        m = line.match(/(\w+)_module \(shared\)$/)
+        m[1] if m
+      }.compact
+
+      modules.map do |mod|
+        new(
+          :name     => mod,
+          :ensure   => :present,
+          :provider => :a2mod
+        )
+      end
+    end
+
+    def create
+        encmd resource[:name]
+    end
+
+    def destroy
+        discmd resource[:name]
+    end
+end
diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/lib/puppet/provider/a2mod/gentoo.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/lib/puppet/provider/a2mod/gentoo.rb
new file mode 100644
index 00000000000..07319dfdc8f
--- /dev/null
+++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/lib/puppet/provider/a2mod/gentoo.rb
@@ -0,0 +1,116 @@
+require 'puppet/util/filetype'
+Puppet::Type.type(:a2mod).provide(:gentoo, :parent => Puppet::Provider) do
+  desc "Manage Apache 2 modules on Gentoo"
+
+  confine :operatingsystem => :gentoo
+  defaultfor :operatingsystem => :gentoo
+
+  attr_accessor :property_hash
+
+  def create
+    @property_hash[:ensure] = :present
+  end
+
+  def exists?
+    (!(@property_hash[:ensure].nil?) and @property_hash[:ensure] == :present)
+  end
+
+  def destroy
+    @property_hash[:ensure] = :absent
+  end
+
+  def flush
+    self.class.flush
+  end
+
+  class << self
+    attr_reader :conf_file
+  end
+
+  def self.clear
+    @mod_resources = []
+    @modules       = []
+    @other_args    = ""
+  end
+
+  def self.initvars
+    @conf_file     = "/etc/conf.d/apache2"
+    @filetype      = Puppet::Util::FileType.filetype(:flat).new(conf_file)
+    @mod_resources = []
+    @modules       = []
+    @other_args    = ""
+  end
+
+  self.initvars
+
+  # Retrieve an array of all existing modules
+  def self.modules
+    if @modules.length <= 0
+      # Locate the APACHE_OPTS variable
+      records = filetype.read.split(/\n/)
+      apache2_opts = records.grep(/^\s*APACHE2_OPTS=/).first
+
+      # Extract all defines
+      while apache2_opts.sub!(/-D\s+(\w+)/, '')
+        @modules << $1.downcase
+      end
+
+      # Hang on to any remaining options.
+      if apache2_opts.match(/APACHE2_OPTS="(.+)"/)
+        @other_args = $1.strip
+      end
+
+      @modules.sort!.uniq!
+    end
+
+    @modules
+  end
+
+  def self.prefetch(resources={})
+    # Match resources with existing providers
+    instances.each do |provider|
+      if resource = resources[provider.name]
+        resource.provider = provider
+      end
+    end
+
+    # Store all resources using this provider for flushing
+    resources.each do |name, resource|
+      @mod_resources << resource
+    end
+  end
+
+  def self.instances
+    modules.map {|mod| new(:name => mod, :provider => :gentoo, :ensure => :present)}
+  end
+
+  def self.flush
+
+    mod_list       = modules
+    mods_to_remove = @mod_resources.select {|mod| mod.should(:ensure) == :absent}.map {|mod| mod[:name]}
+    mods_to_add    = @mod_resources.select {|mod| mod.should(:ensure) == :present}.map {|mod| mod[:name]}
+
+    mod_list -= mods_to_remove
+    mod_list += mods_to_add
+    mod_list.sort!.uniq!
+
+    if modules != mod_list
+      opts = @other_args + " "
+      opts << mod_list.map {|mod| "-D #{mod.upcase}"}.join(" ")
+      opts.strip!
+      opts.gsub!(/\s+/, ' ')
+
+      apache2_opts = %Q{APACHE2_OPTS="#{opts}"}
+      Puppet.debug("Writing back \"#{apache2_opts}\" to #{conf_file}")
+
+      records = filetype.read.split(/\n/)
+
+      opts_index = records.find_index {|i| i.match(/^\s*APACHE2_OPTS/)}
+      records[opts_index] = apache2_opts
+
+      filetype.backup
+      filetype.write(records.join("\n"))
+      @modules = mod_list
+    end
+  end
+end
diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/lib/puppet/provider/a2mod/modfix.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/lib/puppet/provider/a2mod/modfix.rb
new file mode 100644
index 00000000000..8f35b2e4a15
--- /dev/null
+++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/lib/puppet/provider/a2mod/modfix.rb
@@ -0,0 +1,12 @@
+Puppet::Type.type(:a2mod).provide :modfix do
+    desc "Dummy provider for A2mod.
+
+    Fake nil resources when there is no crontab binary available. Allows
+    puppetd to run on a bootstrapped machine before a Cron package has been
+    installed. Workaround for: http://projects.puppetlabs.com/issues/2384
+    "
+
+    def self.instances
+        []
+    end
+end
\ No newline at end of file
diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/lib/puppet/provider/a2mod/redhat.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/lib/puppet/provider/a2mod/redhat.rb
new file mode 100644
index 00000000000..ea5494cb481
--- /dev/null
+++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/lib/puppet/provider/a2mod/redhat.rb
@@ -0,0 +1,60 @@
+require 'puppet/provider/a2mod'
+
+Puppet::Type.type(:a2mod).provide(:redhat, :parent => Puppet::Provider::A2mod) do
+  desc "Manage Apache 2 modules on RedHat family OSs"
+
+  commands :apachectl => "apachectl"
+
+  confine :osfamily => :redhat
+  defaultfor :osfamily => :redhat
+
+  require 'pathname'
+
+  # modpath: Path to default apache modules directory /etc/httpd/mod.d
+  # modfile: Path to module load configuration file; Default: resides under modpath directory
+  # libfile: Path to actual apache module library. Added in modfile LoadModule
+
+  attr_accessor :modfile, :libfile
+  class << self
+    attr_accessor :modpath
+    def preinit
+      @modpath = "/etc/httpd/mod.d"
+    end
+  end
+
+  self.preinit
+
+  def create
+    File.open(modfile,'w') do |f|
+      f.puts "LoadModule #{resource[:identifier]} #{libfile}"
+    end
+  end
+
+  def destroy
+    File.delete(modfile)
+  end
+
+  def self.instances
+    modules = apachectl("-M").lines.collect { |line|
+      m = line.match(/(\w+)_module \(shared\)$/)
+      m[1] if m
+    }.compact
+
+    modules.map do |mod|
+      new(
+        :name     => mod,
+        :ensure   => :present,
+        :provider => :redhat
+      )
+    end
+  end
+
+  def modfile
+    modfile ||= "#{self.class.modpath}/#{resource[:name]}.load"
+  end
+
+  # Set libfile path: If absolute path is passed, then maintain it. Else, make it default from 'modules' dir.
+  def libfile
+    libfile = Pathname.new(resource[:lib]).absolute? ? resource[:lib] : "modules/#{resource[:lib]}"
+  end
+end
diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/lib/puppet/type/a2mod.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/lib/puppet/type/a2mod.rb
new file mode 100644
index 00000000000..07a911e5ee1
--- /dev/null
+++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/lib/puppet/type/a2mod.rb
@@ -0,0 +1,30 @@
+Puppet::Type.newtype(:a2mod) do
+    @doc = "Manage Apache 2 modules"
+
+    ensurable
+
+    newparam(:name) do
+       Puppet.warning "The a2mod provider is deprecated, please use apache::mod instead"
+       desc "The name of the module to be managed"
+
+       isnamevar
+
+    end
+
+    newparam(:lib) do
+      desc "The name of the .so library to be loaded"
+
+      defaultto { "mod_#{@resource[:name]}.so" }
+    end
+ 
+    newparam(:identifier) do
+      desc "Module identifier string used by LoadModule. Default: module-name_module"
+
+      # http://httpd.apache.org/docs/2.2/mod/module-dict.html#ModuleIdentifier
+
+      defaultto { "#{resource[:name]}_module" }
+    end
+
+    autorequire(:package) { catalog.resource(:package, 'httpd')}
+
+end
diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/manifests/balancer.pp b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/manifests/balancer.pp
new file mode 100644
index 00000000000..173aaec2dd4
--- /dev/null
+++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/manifests/balancer.pp
@@ -0,0 +1,83 @@
+# == Define Resource Type: apache::balancer
+#
+# This type will create an apache balancer cluster file inside the conf.d
+# directory. Each balancer cluster needs one or more balancer members (that can
+# be declared with the apache::balancermember defined resource type). Using
+# storeconfigs, you can export the apache::balancermember resources on all
+# balancer members, and then collect them on a single apache load balancer
+# server.
+#
+# === Requirement/Dependencies:
+#
+# Currently requires the puppetlabs/concat module on the Puppet Forge and uses
+# storeconfigs on the Puppet Master to export/collect resources from all
+# balancer members.
+#
+# === Parameters
+#
+# [*name*]
+# The namevar of the defined resource type is the balancer clusters name.
+# This name is also used in the name of the conf.d file
+#
+# [*proxy_set*]
+# Hash, default empty. If given, each key-value pair will be used as a ProxySet
+# line in the configuration.
+#
+# [*collect_exported*]
+# Boolean, default 'true'. True means 'collect exported @@balancermember
+# resources' (for the case when every balancermember node exports itself),
+# false means 'rely on the existing declared balancermember resources' (for the
+# case when you know the full set of balancermembers in advance and use
+# apache::balancermember with array arguments, which allows you to deploy
+# everything in 1 run)
+#
+#
+# === Examples
+#
+# Exporting the resource for a balancer member:
+#
+# apache::balancer { 'puppet00': }
+#
+define apache::balancer (
+  $proxy_set = {},
+  $collect_exported = true,
+) {
+  include concat::setup
+  include ::apache::mod::proxy_balancer
+
+  $target = "${::apache::params::confd_dir}/balancer_${name}.conf"
+
+  concat { $target:
+    owner  => '0',
+    group  => '0',
+    mode   => '0644',
+    notify => Service['httpd'],
+  }
+
+  concat::fragment { "00-${name}-header":
+    ensure  => present,
+    target  => $target,
+    order   => '01',
+    content => "\n",
+  }
+
+  if $collect_exported {
+    Apache::Balancermember <<| balancer_cluster == $name |>>
+  }
+  # else: the resources have been created and they introduced their
+  # concat fragments. We don't have to do anything about them.
+
+  concat::fragment { "01-${name}-proxyset":
+    ensure  => present,
+    target  => $target,
+    order   => '19',
+    content => inline_template("<% proxy_set.keys.sort.each do |key| %> Proxyset <%= key %>=<%= proxy_set[key] %>\n<% end %>"),
+  }
+
+  concat::fragment { "01-${name}-footer":
+    ensure  => present,
+    target  => $target,
+    order   => '20',
+    content => "\n",
+  }
+}
diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/manifests/balancermember.pp b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/manifests/balancermember.pp
new file mode 100644
index 00000000000..121e2c55331
--- /dev/null
+++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/manifests/balancermember.pp
@@ -0,0 +1,53 @@
+# == Define Resource Type: apache::balancermember
+#
+# This type will setup a balancer member inside a listening service
+# configuration block in /etc/apache/apache.cfg on the load balancer.
+# currently it only has the ability to specify the instance name, url and an
+# array of options. More features can be added as needed. The best way to
+# implement this is to export this resource for all apache balancer member
+# servers, and then collect them on the main apache load balancer.
+#
+# === Requirement/Dependencies:
+#
+# Currently requires the puppetlabs/concat module on the Puppet Forge and
+# uses storeconfigs on the Puppet Master to export/collect resources
+# from all balancer members.
+#
+# === Parameters
+#
+# [*name*]
+# The title of the resource is arbitrary and only utilized in the concat
+# fragment name.
+#
+# [*balancer_cluster*]
+# The apache service's instance name (or, the title of the apache::balancer
+# resource). This must match up with a declared apache::balancer resource.
+#
+# [*url*]
+# The url used to contact the balancer member server.
+#
+# [*options*]
+# An array of options to be specified after the url.
+#
+# === Examples
+#
+# Exporting the resource for a balancer member:
+#
+# @@apache::balancermember { 'apache':
+#   balancer_cluster => 'puppet00',
+#   url              => "ajp://${::fqdn}:8009"
+#   options          => ['ping=5', 'disablereuse=on', 'retry=5', 'ttl=120'],
+# }
+#
+define apache::balancermember(
+  $balancer_cluster,
+  $url = "http://${::fqdn}/",
+  $options = [],
+) {
+
+  concat::fragment { "BalancerMember ${url}":
+    ensure  => present,
+    target  => "${::apache::params::confd_dir}/balancer_${balancer_cluster}.conf",
+    content => inline_template(" BalancerMember ${url} <%= @options.join ' ' %>\n"),
+  }
+}
diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/manifests/confd/no_accf.pp b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/manifests/confd/no_accf.pp
new file mode 100644
index 00000000000..f35c0c8b9d1
--- /dev/null
+++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/manifests/confd/no_accf.pp
@@ -0,0 +1,10 @@
+class apache::confd::no_accf {
+  # Template uses no variables
+  file { 'no-accf.conf':
+    ensure  => 'file',
+    path    => "${::apache::confd_dir}/no-accf.conf",
+    content => template('apache/confd/no-accf.conf.erb'),
+    require => Exec["mkdir ${::apache::confd_dir}"],
+    before  => File[$::apache::confd_dir],
+  }
+}
diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/manifests/default_confd_files.pp b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/manifests/default_confd_files.pp
new file mode 100644
index 00000000000..c06b30c83b8
--- /dev/null
+++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/manifests/default_confd_files.pp
@@ -0,0 +1,15 @@
+class apache::default_confd_files (
+  $all = true,
+) {
+  # The rest of the conf.d/* files only get loaded if we want them
+  if $all {
+    case $::osfamily {
+      'freebsd': {
+        include ::apache::confd::no_accf
+      }
+      default: {
+        # do nothing
+      }
+    }
+  }
+}
diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/manifests/default_mods.pp b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/manifests/default_mods.pp
new file mode 100644
index 00000000000..f665d7383e6
--- /dev/null
+++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/manifests/default_mods.pp
@@ -0,0 +1,158 @@
+class apache::default_mods (
+  $all            = true,
+  $mods           = undef,
+  $apache_version = $::apache::apache_version
+) {
+  # These are modules required to run the default configuration.
+  # They are not configurable at this time, so we just include
+  # them to make sure it works.
+  case $::osfamily {
+    'redhat', 'freebsd': {
+      ::apache::mod { 'log_config': }
+      if versioncmp($apache_version, '2.4') >= 0 {
+        # Lets fork it
+        ::apache::mod { 'systemd': }
+        ::apache::mod { 'unixd': }
+      }
+    }
+    default: {}
+  }
+  ::apache::mod { 'authz_host': }
+
+  # The rest of the modules only get loaded if we want all modules enabled
+  if $all {
+    case $::osfamily {
+      'debian': {
+        include ::apache::mod::reqtimeout
+      }
+      'redhat': {
+        include ::apache::mod::actions
+        include ::apache::mod::cache
+        include ::apache::mod::mime
+        include ::apache::mod::mime_magic
+        include ::apache::mod::vhost_alias
+        include ::apache::mod::suexec
+        include ::apache::mod::rewrite
+        include ::apache::mod::speling
+        ::apache::mod { 'auth_digest': }
+        ::apache::mod { 'authn_anon': }
+        ::apache::mod { 'authn_dbm': }
+        ::apache::mod { 'authz_dbm': }
+        ::apache::mod { 'authz_owner': }
+        ::apache::mod { 'expires': }
+        ::apache::mod { 'ext_filter': }
+        ::apache::mod { 'include': }
+        ::apache::mod { 'logio': }
+        ::apache::mod { 'substitute': }
+        ::apache::mod { 'usertrack': }
+        ::apache::mod { 'version': }
+
+        if versioncmp($apache_version, '2.4') >= 0 {
+          ::apache::mod { 'authn_core': }
+        }
+        else {
+          ::apache::mod { 'authn_alias': }
+          ::apache::mod { 'authn_default': }
+        }
+      }
+      'freebsd': {
+        include ::apache::mod::actions
+        include ::apache::mod::cache
+        include ::apache::mod::disk_cache
+        include ::apache::mod::headers
+        include ::apache::mod::info
+        include ::apache::mod::mime_magic
+        include ::apache::mod::reqtimeout
+        include ::apache::mod::rewrite
+        include ::apache::mod::userdir
+        include ::apache::mod::vhost_alias
+        include ::apache::mod::speling
+
+        ::apache::mod { 'asis': }
+        ::apache::mod { 'auth_digest': }
+        ::apache::mod { 'authn_alias': }
+        ::apache::mod { 'authn_anon': }
+        ::apache::mod { 'authn_dbm': }
+        ::apache::mod { 'authn_default': }
+        ::apache::mod { 'authz_dbm': }
+        ::apache::mod { 'authz_owner': }
+        ::apache::mod { 'cern_meta': }
+        ::apache::mod { 'charset_lite': }
+        ::apache::mod { 'dumpio': }
+        ::apache::mod { 'expires': }
+        ::apache::mod { 'file_cache': }
+        ::apache::mod { 'filter':}
+        ::apache::mod { 'imagemap':}
+        ::apache::mod { 'include': }
+        ::apache::mod { 'logio': }
+        ::apache::mod { 'unique_id': }
+        ::apache::mod { 'usertrack': }
+        ::apache::mod { 'version': }
+      }
+      default: {}
+    }
+    case $::apache::mpm_module {
+      'prefork': {
+        include ::apache::mod::cgi
+      }
+      'worker': {
+        include ::apache::mod::cgid
+      }
+      default: {
+        # do nothing
+      }
+    }
+    include ::apache::mod::alias
+    include ::apache::mod::autoindex
+    include ::apache::mod::dav
+    include ::apache::mod::dav_fs
+    include ::apache::mod::deflate
+    include ::apache::mod::dir
+    include ::apache::mod::mime
+    include ::apache::mod::negotiation
+    include ::apache::mod::setenvif
+    ::apache::mod { 'auth_basic': }
+    ::apache::mod { 'authn_file': }
+
+      if versioncmp($apache_version, '2.4') >= 0 {
+      # authz_core is needed for 'Require' directive
+      ::apache::mod { 'authz_core':
+        id => 'authz_core_module',
+      }
+
+      # filter is needed by mod_deflate
+      ::apache::mod { 'filter': }
+
+      # lots of stuff seems to break without access_compat
+      ::apache::mod { 'access_compat': }
+    } else {
+      ::apache::mod { 'authz_default': }
+    }
+
+    ::apache::mod { 'authz_groupfile': }
+    ::apache::mod { 'authz_user': }
+    ::apache::mod { 'env': }
+  } elsif $mods {
+    ::apache::default_mods::load { $mods: }
+
+    if versioncmp($apache_version, '2.4') >= 0 {
+      # authz_core is needed for 'Require' directive
+      ::apache::mod { 'authz_core':
+        id => 'authz_core_module',
+      }
+
+      # filter is needed by mod_deflate
+      ::apache::mod { 'filter': }
+    }
+  } else {
+    if versioncmp($apache_version, '2.4') >= 0 {
+      # authz_core is needed for 'Require' directive
+      ::apache::mod { 'authz_core':
+        id => 'authz_core_module',
+      }
+
+      # filter is needed by mod_deflate
+      ::apache::mod { 'filter': }
+    }
+  }
+}
diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/manifests/default_mods/load.pp b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/manifests/default_mods/load.pp
new file mode 100644
index 00000000000..356e9fa00ef
--- /dev/null
+++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/manifests/default_mods/load.pp
@@ -0,0 +1,8 @@
+# private define
+define apache::default_mods::load ($module = $title) {
+  if defined("apache::mod::${module}") {
+    include "::apache::mod::${module}"
+  } else {
+    ::apache::mod { $module: }
+  }
+}
diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/manifests/dev.pp b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/manifests/dev.pp
new file mode 100644
index 00000000000..4eaeb557829
--- /dev/null
+++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/manifests/dev.pp
@@ -0,0 +1,11 @@
+class apache::dev {
+  if $::osfamily == 'FreeBSD' and !defined(Class['apache::package']) {
+    fail('apache::dev requires apache::package; please include apache or apache::package class first')
+  }
+  include ::apache::params
+  $packages = $::apache::params::dev_packages
+  package { $packages:
+    ensure  => present,
+    require => Package['httpd'],
+  }
+}
diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/manifests/init.pp b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/manifests/init.pp
new file mode 100644
index 00000000000..9f77d5b4e7e
--- /dev/null
+++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/manifests/init.pp
@@ -0,0 +1,340 @@
+# Class: apache
+#
+# This class installs Apache
+#
+# Parameters:
+#
+# Actions:
+#   - Install Apache
+#   - Manage Apache service
+#
+# Requires:
+#
+# Sample Usage:
+#
+class apache (
+  $service_name         = $::apache::params::service_name,
+  $default_mods         = true,
+  $default_vhost        = true,
+  $default_confd_files  = true,
+  $default_ssl_vhost    = false,
+  $default_ssl_cert     = $::apache::params::default_ssl_cert,
+  $default_ssl_key      = $::apache::params::default_ssl_key,
+  $default_ssl_chain    = undef,
+  $default_ssl_ca       = undef,
+  $default_ssl_crl_path = undef,
+  $default_ssl_crl      = undef,
+  $ip                   = undef,
+  $service_enable       = true,
+  $service_ensure       = 'running',
+  $purge_configs        = true,
+  $purge_vdir           = false,
+  $serveradmin          = 'root@localhost',
+  $sendfile             = 'On',
+  $error_documents      = false,
+  $timeout              = '120',
+  $httpd_dir            = $::apache::params::httpd_dir,
+  $server_root          = $::apache::params::server_root,
+  $confd_dir            = $::apache::params::confd_dir,
+  $vhost_dir            = $::apache::params::vhost_dir,
+  $vhost_enable_dir     = $::apache::params::vhost_enable_dir,
+  $mod_dir              = $::apache::params::mod_dir,
+  $mod_enable_dir       = $::apache::params::mod_enable_dir,
+  $mpm_module           = $::apache::params::mpm_module,
+  $conf_template        = $::apache::params::conf_template,
+  $servername           = $::apache::params::servername,
+  $manage_user          = true,
+  $manage_group         = true,
+  $user                 = $::apache::params::user,
+  $group                = $::apache::params::group,
+  $keepalive            = $::apache::params::keepalive,
+  $keepalive_timeout    = $::apache::params::keepalive_timeout,
+  $max_keepalive_requests = $apache::params::max_keepalive_requests,
+  $logroot              = $::apache::params::logroot,
+  $log_level            = $::apache::params::log_level,
+  $log_formats          = {},
+  $ports_file           = $::apache::params::ports_file,
+  $apache_version       = $::apache::version::default,
+  $server_tokens        = 'OS',
+  $server_signature     = 'On',
+  $trace_enable         = 'On',
+  $package_ensure       = 'installed',
+) inherits ::apache::params {
+  validate_bool($default_vhost)
+  validate_bool($default_ssl_vhost)
+  validate_bool($default_confd_files)
+  # true/false is sufficient for both ensure and enable
+  validate_bool($service_enable)
+
+  $valid_mpms_re = $apache_version ? {
+    '2.4'   => '(event|itk|peruser|prefork|worker)',
+    default => '(event|itk|prefork|worker)'
+  }
+
+  if $mpm_module {
+    validate_re($mpm_module, $valid_mpms_re)
+  }
+
+  # NOTE: on FreeBSD it's mpm module's responsibility to install httpd package.
+  # NOTE: the same strategy may be introduced for other OSes. For this, you
+  # should delete the 'if' block below and modify all MPM modules' manifests
+  # such that they include apache::package class (currently event.pp, itk.pp,
+  # peruser.pp, prefork.pp, worker.pp).
+  if $::osfamily != 'FreeBSD' {
+    package { 'httpd':
+      ensure => $package_ensure,
+      name   => $::apache::params::apache_name,
+      notify => Class['Apache::Service'],
+    }
+  }
+  validate_re($sendfile, [ '^[oO]n$' , '^[oO]ff$' ])
+
+  # declare the web server user and group
+  # Note: requiring the package means the package ought to create them and not puppet
+  validate_bool($manage_user)
+  if $manage_user {
+    user { $user:
+      ensure  => present,
+      gid     => $group,
+      require => Package['httpd'],
+    }
+  }
+  validate_bool($manage_group)
+  if $manage_group {
+    group { $group:
+      ensure  => present,
+      require => Package['httpd']
+    }
+  }
+
+  $valid_log_level_re = '(emerg|alert|crit|error|warn|notice|info|debug)'
+
+  validate_re($log_level, $valid_log_level_re,
+  "Log level '${log_level}' is not one of the supported Apache HTTP Server log levels.")
+
+  class { '::apache::service':
+    service_name   => $service_name,
+    service_enable => $service_enable,
+    service_ensure => $service_ensure,
+  }
+
+  # Deprecated backwards-compatibility
+  if $purge_vdir {
+    warning('Class[\'apache\'] parameter purge_vdir is deprecated in favor of purge_configs')
+    $purge_confd = $purge_vdir
+  } else {
+    $purge_confd = $purge_configs
+  }
+
+  Exec {
+    path => '/bin:/sbin:/usr/bin:/usr/sbin',
+  }
+
+  exec { "mkdir ${confd_dir}":
+    creates => $confd_dir,
+    require => Package['httpd'],
+  }
+  file { $confd_dir:
+    ensure  => directory,
+    recurse => true,
+    purge   => $purge_confd,
+    notify  => Class['Apache::Service'],
+    require => Package['httpd'],
+  }
+
+  if ! defined(File[$mod_dir]) {
+    exec { "mkdir ${mod_dir}":
+      creates => $mod_dir,
+      require => Package['httpd'],
+    }
+    # Don't purge available modules if an enable dir is used
+    $purge_mod_dir = $purge_configs and !$mod_enable_dir
+    file { $mod_dir:
+      ensure  => directory,
+      recurse => true,
+      purge   => $purge_mod_dir,
+      notify  => Class['Apache::Service'],
+      require => Package['httpd'],
+    }
+  }
+
+  if $mod_enable_dir and ! defined(File[$mod_enable_dir]) {
+    $mod_load_dir = $mod_enable_dir
+    exec { "mkdir ${mod_enable_dir}":
+      creates => $mod_enable_dir,
+      require => Package['httpd'],
+    }
+    file { $mod_enable_dir:
+      ensure  => directory,
+      recurse => true,
+      purge   => $purge_configs,
+      notify  => Class['Apache::Service'],
+      require => Package['httpd'],
+    }
+  } else {
+    $mod_load_dir = $mod_dir
+  }
+
+  if ! defined(File[$vhost_dir]) {
+    exec { "mkdir ${vhost_dir}":
+      creates => $vhost_dir,
+      require => Package['httpd'],
+    }
+    file { $vhost_dir:
+      ensure  => directory,
+      recurse => true,
+      purge   => $purge_configs,
+      notify  => Class['Apache::Service'],
+      require => Package['httpd'],
+    }
+  }
+
+  if $vhost_enable_dir and ! defined(File[$vhost_enable_dir]) {
+    $vhost_load_dir = $vhost_enable_dir
+    exec { "mkdir ${vhost_load_dir}":
+      creates => $vhost_load_dir,
+      require => Package['httpd'],
+    }
+    file { $vhost_enable_dir:
+      ensure  => directory,
+      recurse => true,
+      purge   => $purge_configs,
+      notify  => Class['Apache::Service'],
+      require => Package['httpd'],
+    }
+  } else {
+    $vhost_load_dir = $vhost_dir
+  }
+
+  concat { $ports_file:
+    owner   => 'root',
+    group   => $::apache::params::root_group,
+    mode    => '0644',
+    notify  => Class['Apache::Service'],
+    require => Package['httpd'],
+  }
+  concat::fragment { 'Apache ports header':
+    ensure  => present,
+    target  => $ports_file,
+    content => template('apache/ports_header.erb')
+  }
+
+  if $::apache::params::conf_dir and $::apache::params::conf_file {
+    case $::osfamily {
+      'debian': {
+        $docroot              = '/var/www'
+        $pidfile              = '${APACHE_PID_FILE}'
+        $error_log            = 'error.log'
+        $error_documents_path = '/usr/share/apache2/error'
+        $scriptalias          = '/usr/lib/cgi-bin'
+        $access_log_file      = 'access.log'
+      }
+      'redhat': {
+        $docroot              = '/var/www/html'
+        $pidfile              = 'run/httpd.pid'
+        $error_log            = 'error_log'
+        $error_documents_path = '/var/www/error'
+        $scriptalias          = '/var/www/cgi-bin'
+        $access_log_file      = 'access_log'
+      }
+      'freebsd': {
+        $docroot              = '/usr/local/www/apache22/data'
+        $pidfile              = '/var/run/httpd.pid'
+        $error_log            = 'httpd-error.log'
+        $error_documents_path = '/usr/local/www/apache22/error'
+        $scriptalias          = '/usr/local/www/apache22/cgi-bin'
+        $access_log_file      = 'httpd-access.log'
+      }
+      default: {
+        fail("Unsupported osfamily ${::osfamily}")
+      }
+    }
+
+    $apxs_workaround = $::osfamily ? {
+      'freebsd' => true,
+      default   => false
+    }
+
+    # Template uses:
+    # - $pidfile
+    # - $user
+    # - $group
+    # - $logroot
+    # - $error_log
+    # - $sendfile
+    # - $mod_dir
+    # - $ports_file
+    # - $confd_dir
+    # - $vhost_dir
+    # - $error_documents
+    # - $error_documents_path
+    # - $apxs_workaround
+    # - $keepalive
+    # - $keepalive_timeout
+    # - $max_keepalive_requests
+    # - $server_root
+    # - $server_tokens
+    # - $server_signature
+    # - $trace_enable
+    file { "${::apache::params::conf_dir}/${::apache::params::conf_file}":
+      ensure  => file,
+      content => template($conf_template),
+      notify  => Class['Apache::Service'],
+      require => Package['httpd'],
+    }
+
+    # preserve back-wards compatibility to the times when default_mods was
+    # only a boolean value. Now it can be an array (too)
+    if is_array($default_mods) {
+      class { '::apache::default_mods':
+        all  => false,
+        mods => $default_mods,
+      }
+    } else {
+      class { '::apache::default_mods':
+        all => $default_mods,
+      }
+    }
+    class { '::apache::default_confd_files':
+      all => $default_confd_files
+    }
+    if $mpm_module {
+      class { "::apache::mod::${mpm_module}": }
+    }
+
+    $default_vhost_ensure = $default_vhost ? {
+      true  => 'present',
+      false => 'absent'
+    }
+    $default_ssl_vhost_ensure = $default_ssl_vhost ? {
+      true  => 'present',
+      false => 'absent'
+    }
+
+    ::apache::vhost { 'default':
+      ensure          => $default_vhost_ensure,
+      port            => 80,
+      docroot         => $docroot,
+      scriptalias     => $scriptalias,
+      serveradmin     => $serveradmin,
+      access_log_file => $access_log_file,
+      priority        => '15',
+      ip              => $ip,
+    }
+    $ssl_access_log_file = $::osfamily ? {
+      'freebsd' => $access_log_file,
+      default   => "ssl_${access_log_file}",
+    }
+    ::apache::vhost { 'default-ssl':
+      ensure          => $default_ssl_vhost_ensure,
+      port            => 443,
+      ssl             => true,
+      docroot         => $docroot,
+      scriptalias     => $scriptalias,
+      serveradmin     => $serveradmin,
+      access_log_file => $ssl_access_log_file,
+      priority        => '15',
+      ip              => $ip,
+    }
+  }
+}
diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/manifests/listen.pp b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/manifests/listen.pp
new file mode 100644
index 00000000000..e6a8a3c767c
--- /dev/null
+++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/manifests/listen.pp
@@ -0,0 +1,10 @@
+define apache::listen {
+  $listen_addr_port = $name
+
+  # Template uses: $listen_addr_port
+  concat::fragment { "Listen ${listen_addr_port}":
+    ensure  => present,
+    target  => $::apache::ports_file,
+    content => template('apache/listen.erb'),
+  }
+}
diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/manifests/mod.pp b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/manifests/mod.pp
new file mode 100644
index 00000000000..aa5ea3f3bd8
--- /dev/null
+++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/manifests/mod.pp
@@ -0,0 +1,130 @@
+define apache::mod (
+  $package        = undef,
+  $package_ensure = 'present',
+  $lib            = undef,
+  $lib_path       = $::apache::params::lib_path,
+  $id             = undef,
+  $path           = undef,
+  $loadfile_name  = undef,
+  $loadfiles      = undef,
+) {
+  if ! defined(Class['apache']) {
+    fail('You must include the apache base class before using any apache defined resources')
+  }
+
+  $mod = $name
+  #include apache #This creates duplicate resources in rspec-puppet
+  $mod_dir = $::apache::mod_dir
+
+  # Determine if we have special lib
+  $mod_libs = $::apache::params::mod_libs
+  $mod_lib = $mod_libs[$mod] # 2.6 compatibility hack
+  if $lib {
+    $_lib = $lib
+  } elsif $mod_lib {
+    $_lib = $mod_lib
+  } else {
+    $_lib = "mod_${mod}.so"
+  }
+
+  # Determine if declaration specified a path to the module
+  if $path {
+    $_path = $path
+  } else {
+    $_path = "${lib_path}/${_lib}"
+  }
+
+  if $id {
+    $_id = $id
+  } else {
+    $_id = "${mod}_module"
+  }
+
+  if $loadfile_name {
+    $_loadfile_name = $loadfile_name
+  } else {
+    $_loadfile_name = "${mod}.load"
+  }
+
+  # Determine if we have a package
+  $mod_packages = $::apache::params::mod_packages
+  $mod_package = $mod_packages[$mod] # 2.6 compatibility hack
+  if $package {
+    $_package = $package
+  } elsif $mod_package {
+    $_package = $mod_package
+  } else {
+    $_package = undef
+  }
+  if $_package and ! defined(Package[$_package]) {
+    # note: FreeBSD/ports uses apxs tool to activate modules; apxs clutters
+    # httpd.conf with 'LoadModule' directives; here, by proper resource
+    # ordering, we ensure that our version of httpd.conf is reverted after
+    # the module gets installed.
+    $package_before = $::osfamily ? {
+      'freebsd' => [
+        File[$_loadfile_name],
+        File["${::apache::params::conf_dir}/${::apache::params::conf_file}"]
+      ],
+      default => File[$_loadfile_name],
+    }
+    # $_package may be an array
+    package { $_package:
+      ensure  => $package_ensure,
+      require => Package['httpd'],
+      before  => $package_before,
+    }
+  }
+
+  file { "${_loadfile_name}":
+    ensure  => file,
+    path    => "${mod_dir}/${_loadfile_name}",
+    owner   => 'root',
+    group   => $::apache::params::root_group,
+    mode    => '0644',
+    content => template('apache/mod/load.erb'),
+    require => [
+      Package['httpd'],
+      Exec["mkdir ${mod_dir}"],
+    ],
+    before  => File[$mod_dir],
+    notify  => Service['httpd'],
+  }
+
+  if $::osfamily == 'Debian' {
+    $enable_dir = $::apache::mod_enable_dir
+    file{ "${_loadfile_name} symlink":
+      ensure  => link,
+      path    => "${enable_dir}/${_loadfile_name}",
+      target  => "${mod_dir}/${_loadfile_name}",
+      owner   => 'root',
+      group   => $::apache::params::root_group,
+      mode    => '0644',
+      require => [
+        File[$_loadfile_name],
+        Exec["mkdir ${enable_dir}"],
+      ],
+      before  => File[$enable_dir],
+      notify  => Service['httpd'],
+    }
+    # Each module may have a .conf file as well, which should be
+    # defined in the class apache::mod::module
+    # Some modules do not require this file.
+    if defined(File["${mod}.conf"]) {
+      file{ "${mod}.conf symlink":
+        ensure  => link,
+        path    => "${enable_dir}/${mod}.conf",
+        target  => "${mod_dir}/${mod}.conf",
+        owner   => 'root',
+        group   => $::apache::params::root_group,
+        mode    => '0644',
+        require => [
+          File["${mod}.conf"],
+          Exec["mkdir ${enable_dir}"],
+        ],
+        before  => File[$enable_dir],
+        notify  => Service['httpd'],
+      }
+    }
+  }
+}
diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/manifests/mod/actions.pp b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/manifests/mod/actions.pp
new file mode 100644
index 00000000000..3b60f297fdd
--- /dev/null
+++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/manifests/mod/actions.pp
@@ -0,0 +1,3 @@
+class apache::mod::actions {
+  apache::mod { 'actions': }
+}
diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/manifests/mod/alias.pp b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/manifests/mod/alias.pp
new file mode 100644
index 00000000000..ee017b490f8
--- /dev/null
+++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/manifests/mod/alias.pp
@@ -0,0 +1,19 @@
+class apache::mod::alias(
+  $apache_version = $apache::apache_version
+) {
+  $icons_path = $::osfamily ? {
+    'debian'  => '/usr/share/apache2/icons',
+    'redhat'  => '/var/www/icons',
+    'freebsd' => '/usr/local/www/apache22/icons',
+  }
+  apache::mod { 'alias': }
+  # Template uses $icons_path
+  file { 'alias.conf':
+    ensure  => file,
+    path    => "${::apache::mod_dir}/alias.conf",
+    content => template('apache/mod/alias.conf.erb'),
+    require => Exec["mkdir ${::apache::mod_dir}"],
+    before  => File[$::apache::mod_dir],
+    notify  => Service['httpd'],
+  }
+}
diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/manifests/mod/auth_basic.pp b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/manifests/mod/auth_basic.pp
new file mode 100644
index 00000000000..cacfafa4d3b
--- /dev/null
+++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/manifests/mod/auth_basic.pp
@@ -0,0 +1,3 @@
+class apache::mod::auth_basic {
+  ::apache::mod { 'auth_basic': }
+}
diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/manifests/mod/auth_kerb.pp b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/manifests/mod/auth_kerb.pp
new file mode 100644
index 00000000000..6b53262a1bd
--- /dev/null
+++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/manifests/mod/auth_kerb.pp
@@ -0,0 +1,5 @@
+class apache::mod::auth_kerb {
+  ::apache::mod { 'auth_kerb': }
+}
+
+
diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/manifests/mod/authnz_ldap.pp b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/manifests/mod/authnz_ldap.pp
new file mode 100644
index 00000000000..800e656e892
--- /dev/null
+++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/manifests/mod/authnz_ldap.pp
@@ -0,0 +1,19 @@
+class apache::mod::authnz_ldap (
+  $verifyServerCert = true,
+) {
+  include '::apache::mod::ldap'
+  ::apache::mod { 'authnz_ldap': }
+
+  validate_bool($verifyServerCert)
+
+  # Template uses:
+  # - $verifyServerCert
+  file { 'authnz_ldap.conf':
+    ensure  => file,
+    path    => "${::apache::mod_dir}/authnz_ldap.conf",
+    content => template('apache/mod/authnz_ldap.conf.erb'),
+    require => Exec["mkdir ${::apache::mod_dir}"],
+    before  => File[$::apache::mod_dir],
+    notify  => Service['httpd'],
+  }
+}
diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/manifests/mod/autoindex.pp b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/manifests/mod/autoindex.pp
new file mode 100644
index 00000000000..f5f0f07458b
--- /dev/null
+++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/manifests/mod/autoindex.pp
@@ -0,0 +1,12 @@
+class apache::mod::autoindex {
+  ::apache::mod { 'autoindex': }
+  # Template uses no variables
+  file { 'autoindex.conf':
+    ensure  => file,
+    path    => "${::apache::mod_dir}/autoindex.conf",
+    content => template('apache/mod/autoindex.conf.erb'),
+    require => Exec["mkdir ${::apache::mod_dir}"],
+    before  => File[$::apache::mod_dir],
+    notify  => Service['httpd'],
+  }
+}
diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/manifests/mod/cache.pp b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/manifests/mod/cache.pp
new file mode 100644
index 00000000000..4ab9f44bae0
--- /dev/null
+++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/manifests/mod/cache.pp
@@ -0,0 +1,3 @@
+class apache::mod::cache {
+  ::apache::mod { 'cache': }
+}
diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/manifests/mod/cgi.pp b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/manifests/mod/cgi.pp
new file mode 100644
index 00000000000..6c3c6aec8d4
--- /dev/null
+++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/manifests/mod/cgi.pp
@@ -0,0 +1,4 @@
+class apache::mod::cgi {
+  Class['::apache::mod::prefork'] -> Class['::apache::mod::cgi']
+  ::apache::mod { 'cgi': }
+}
diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/manifests/mod/cgid.pp b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/manifests/mod/cgid.pp
new file mode 100644
index 00000000000..5c89251a1c6
--- /dev/null
+++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/manifests/mod/cgid.pp
@@ -0,0 +1,23 @@
+class apache::mod::cgid {
+  Class['::apache::mod::worker'] -> Class['::apache::mod::cgid']
+
+  # Debian specifies it's cgid sock path, but RedHat uses the default value
+  # with no config file
+  $cgisock_path = $::osfamily ? {
+    'debian'  => '${APACHE_RUN_DIR}/cgisock',
+    'freebsd' => 'cgisock',
+    default   => undef,
+  }
+  ::apache::mod { 'cgid': }
+  if $cgisock_path {
+    # Template uses $cgisock_path
+    file { 'cgid.conf':
+      ensure  => file,
+      path    => "${::apache::mod_dir}/cgid.conf",
+      content => template('apache/mod/cgid.conf.erb'),
+      require => Exec["mkdir ${::apache::mod_dir}"],
+      before  => File[$::apache::mod_dir],
+      notify  => Service['httpd'],
+    }
+  }
+}
diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/manifests/mod/dav.pp b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/manifests/mod/dav.pp
new file mode 100644
index 00000000000..ade9c0809ca
--- /dev/null
+++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/manifests/mod/dav.pp
@@ -0,0 +1,3 @@
+class apache::mod::dav {
+  ::apache::mod { 'dav': }
+}
diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/manifests/mod/dav_fs.pp b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/manifests/mod/dav_fs.pp
new file mode 100644
index 00000000000..482f316171e
--- /dev/null
+++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/manifests/mod/dav_fs.pp
@@ -0,0 +1,20 @@
+class apache::mod::dav_fs {
+  $dav_lock = $::osfamily ? {
+    'debian'  => '${APACHE_LOCK_DIR}/DAVLock',
+    'freebsd' => '/usr/local/var/DavLock',
+    default   => '/var/lib/dav/lockdb',
+  }
+
+  Class['::apache::mod::dav'] -> Class['::apache::mod::dav_fs']
+  ::apache::mod { 'dav_fs': }
+
+  # Template uses: $dav_lock
+  file { 'dav_fs.conf':
+    ensure  => file,
+    path    => "${::apache::mod_dir}/dav_fs.conf",
+    content => template('apache/mod/dav_fs.conf.erb'),
+    require => Exec["mkdir ${::apache::mod_dir}"],
+    before  => File[$::apache::mod_dir],
+    notify  => Service['httpd'],
+  }
+}
diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/manifests/mod/dav_svn.pp b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/manifests/mod/dav_svn.pp
new file mode 100644
index 00000000000..0fd667bc3f3
--- /dev/null
+++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/manifests/mod/dav_svn.pp
@@ -0,0 +1,14 @@
+class apache::mod::dav_svn (
+  $authz_svn_enabled = false,
+) {
+    Class['::apache::mod::dav'] -> Class['::apache::mod::dav_svn']
+    include ::apache::mod::dav
+    ::apache::mod { 'dav_svn': } 
+    
+    if $authz_svn_enabled {
+      ::apache::mod { 'authz_svn':
+        loadfile_name => 'dav_svn_authz_svn.load',
+        require       => Apache::Mod['dav_svn'],
+      }
+    }
+}
diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/manifests/mod/deflate.pp b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/manifests/mod/deflate.pp
new file mode 100644
index 00000000000..9b597d94664
--- /dev/null
+++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/manifests/mod/deflate.pp
@@ -0,0 +1,12 @@
+class apache::mod::deflate {
+  ::apache::mod { 'deflate': }
+  # Template uses no variables
+  file { 'deflate.conf':
+    ensure  => file,
+    path    => "${::apache::mod_dir}/deflate.conf",
+    content => template('apache/mod/deflate.conf.erb'),
+    require => Exec["mkdir ${::apache::mod_dir}"],
+    before  => File[$::apache::mod_dir],
+    notify  => Service['httpd'],
+  }
+}
diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/manifests/mod/dev.pp b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/manifests/mod/dev.pp
new file mode 100644
index 00000000000..5abdedd3618
--- /dev/null
+++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/manifests/mod/dev.pp
@@ -0,0 +1,5 @@
+class apache::mod::dev {
+  # Development packages are not apache modules
+  warning('apache::mod::dev is deprecated; please use apache::dev')
+  include ::apache::dev
+}
diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/manifests/mod/dir.pp b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/manifests/mod/dir.pp
new file mode 100644
index 00000000000..11631305a44
--- /dev/null
+++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/manifests/mod/dir.pp
@@ -0,0 +1,21 @@
+# Note: this sets the global DirectoryIndex directive, it may be necessary to consider being able to modify the apache::vhost to declare DirectoryIndex statements in a vhost configuration
+# Parameters:
+# - $indexes provides a string for the DirectoryIndex directive http://httpd.apache.org/docs/current/mod/mod_dir.html#directoryindex
+class apache::mod::dir (
+  $dir     = 'public_html',
+  $indexes = ['index.html','index.html.var','index.cgi','index.pl','index.php','index.xhtml'],
+) {
+  validate_array($indexes)
+  ::apache::mod { 'dir': }
+
+  # Template uses
+  # - $indexes
+  file { 'dir.conf':
+    ensure  => file,
+    path    => "${::apache::mod_dir}/dir.conf",
+    content => template('apache/mod/dir.conf.erb'),
+    require => Exec["mkdir ${::apache::mod_dir}"],
+    before  => File[$::apache::mod_dir],
+    notify  => Service['httpd'],
+  }
+}
diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/manifests/mod/disk_cache.pp b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/manifests/mod/disk_cache.pp
new file mode 100644
index 00000000000..13c9c783523
--- /dev/null
+++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/manifests/mod/disk_cache.pp
@@ -0,0 +1,24 @@
+class apache::mod::disk_cache {
+  $cache_root = $::osfamily ? {
+    'debian'  => '/var/cache/apache2/mod_disk_cache',
+    'redhat'  => '/var/cache/mod_proxy',
+    'freebsd' => '/var/cache/mod_disk_cache',
+  }
+  if $::osfamily != 'FreeBSD' {
+    # FIXME: investigate why disk_cache was dependent on proxy
+    # NOTE: on FreeBSD disk_cache is compiled by default but proxy is not
+    Class['::apache::mod::proxy'] -> Class['::apache::mod::disk_cache']
+  }
+  Class['::apache::mod::cache'] -> Class['::apache::mod::disk_cache']
+
+  apache::mod { 'disk_cache': }
+  # Template uses $cache_proxy
+  file { 'disk_cache.conf':
+    ensure  => file,
+    path    => "${::apache::mod_dir}/disk_cache.conf",
+    content => template('apache/mod/disk_cache.conf.erb'),
+    require => Exec["mkdir ${::apache::mod_dir}"],
+    before  => File[$::apache::mod_dir],
+    notify  => Service['httpd'],
+  }
+}
diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/manifests/mod/event.pp b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/manifests/mod/event.pp
new file mode 100644
index 00000000000..cb7ed96cd61
--- /dev/null
+++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/manifests/mod/event.pp
@@ -0,0 +1,62 @@
+class apache::mod::event (
+  $startservers        = '2',
+  $maxclients          = '150',
+  $minsparethreads     = '25',
+  $maxsparethreads     = '75',
+  $threadsperchild     = '25',
+  $maxrequestsperchild = '0',
+  $serverlimit         = '25',
+  $apache_version      = $::apache::apache_version,
+) {
+  if defined(Class['apache::mod::itk']) {
+    fail('May not include both apache::mod::event and apache::mod::itk on the same node')
+  }
+  if defined(Class['apache::mod::peruser']) {
+    fail('May not include both apache::mod::event and apache::mod::peruser on the same node')
+  }
+  if defined(Class['apache::mod::prefork']) {
+    fail('May not include both apache::mod::event and apache::mod::prefork on the same node')
+  }
+  if defined(Class['apache::mod::worker']) {
+    fail('May not include both apache::mod::event and apache::mod::worker on the same node')
+  }
+  File {
+    owner => 'root',
+    group => $::apache::params::root_group,
+    mode  => '0644',
+  }
+
+  # Template uses:
+  # - $startservers
+  # - $maxclients
+  # - $minsparethreads
+  # - $maxsparethreads
+  # - $threadsperchild
+  # - $maxrequestsperchild
+  # - $serverlimit
+  file { "${::apache::mod_dir}/event.conf":
+    ensure  => file,
+    content => template('apache/mod/event.conf.erb'),
+    require => Exec["mkdir ${::apache::mod_dir}"],
+    before  => File[$::apache::mod_dir],
+    notify  => Service['httpd'],
+  }
+
+  case $::osfamily {
+    'redhat': {
+      if versioncmp($apache_version, '2.4') >= 0 {
+        apache::mpm{ 'event':
+          apache_version => $apache_version,
+        }
+      }
+    }
+    'debian','freebsd' : {
+      apache::mpm{ 'event':
+        apache_version => $apache_version,
+      }
+    }
+    default: {
+      fail("Unsupported osfamily ${::osfamily}")
+    }
+  }
+}
diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/manifests/mod/expires.pp b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/manifests/mod/expires.pp
new file mode 100644
index 00000000000..aae4c59d98a
--- /dev/null
+++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/manifests/mod/expires.pp
@@ -0,0 +1,3 @@
+class apache::mod::expires {
+  ::apache::mod { 'expires': }
+}
diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/manifests/mod/fastcgi.pp b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/manifests/mod/fastcgi.pp
new file mode 100644
index 00000000000..a185bb31fa1
--- /dev/null
+++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/manifests/mod/fastcgi.pp
@@ -0,0 +1,24 @@
+class apache::mod::fastcgi {
+
+  # Debian specifies it's fastcgi lib path, but RedHat uses the default value
+  # with no config file
+  $fastcgi_lib_path = $::apache::params::fastcgi_lib_path
+
+  ::apache::mod { 'fastcgi': }
+
+  if $fastcgi_lib_path {
+    # Template uses:
+    # - $fastcgi_server
+    # - $fastcgi_socket
+    # - $fastcgi_dir
+    file { 'fastcgi.conf':
+      ensure  => file,
+      path    => "${::apache::mod_dir}/fastcgi.conf",
+      content => template('apache/mod/fastcgi.conf.erb'),
+      require => Exec["mkdir ${::apache::mod_dir}"],
+      before  => File[$::apache::mod_dir],
+      notify  => Service['httpd'],
+    }
+  }
+
+}
diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/manifests/mod/fcgid.pp b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/manifests/mod/fcgid.pp
new file mode 100644
index 00000000000..70997768bc0
--- /dev/null
+++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/manifests/mod/fcgid.pp
@@ -0,0 +1,16 @@
+class apache::mod::fcgid(
+  $options = {},
+) {
+  ::apache::mod { 'fcgid': }
+
+  # Template uses:
+  # - $options
+  file { 'fcgid.conf':
+    ensure  => file,
+    path    => "${::apache::mod_dir}/fcgid.conf",
+    content => template('apache/mod/fcgid.conf.erb'),
+    require => Exec["mkdir ${::apache::mod_dir}"],
+    before  => File[$::apache::mod_dir],
+    notify  => Service['httpd'],
+  }
+}
diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/manifests/mod/headers.pp b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/manifests/mod/headers.pp
new file mode 100644
index 00000000000..d18c5e2793e
--- /dev/null
+++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/manifests/mod/headers.pp
@@ -0,0 +1,3 @@
+class apache::mod::headers {
+  ::apache::mod { 'headers': }
+}
diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/manifests/mod/include.pp b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/manifests/mod/include.pp
new file mode 100644
index 00000000000..edbe81f3241
--- /dev/null
+++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/manifests/mod/include.pp
@@ -0,0 +1,3 @@
+class apache::mod::include {
+  ::apache::mod { 'include': }
+}
diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/manifests/mod/info.pp b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/manifests/mod/info.pp
new file mode 100644
index 00000000000..18f9ea1dfe5
--- /dev/null
+++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/manifests/mod/info.pp
@@ -0,0 +1,17 @@
+class apache::mod::info (
+  $allow_from = ['127.0.0.1','::1'],
+  $apache_version = $::apache::apache_version,
+){
+  apache::mod { 'info': }
+  # Template uses
+  # $allow_from
+  # $apache_version
+  file { 'info.conf':
+    ensure  => file,
+    path    => "${::apache::mod_dir}/info.conf",
+    content => template('apache/mod/info.conf.erb'),
+    require => Exec["mkdir ${::apache::mod_dir}"],
+    before  => File[$::apache::mod_dir],
+    notify  => Service['httpd'],
+  }
+}
diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/manifests/mod/itk.pp b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/manifests/mod/itk.pp
new file mode 100644
index 00000000000..1083e5ed244
--- /dev/null
+++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/manifests/mod/itk.pp
@@ -0,0 +1,53 @@
+class apache::mod::itk (
+  $startservers        = '8',
+  $minspareservers     = '5',
+  $maxspareservers     = '20',
+  $serverlimit         = '256',
+  $maxclients          = '256',
+  $maxrequestsperchild = '4000',
+  $apache_version      = $::apache::apache_version,
+) {
+  if defined(Class['apache::mod::event']) {
+    fail('May not include both apache::mod::itk and apache::mod::event on the same node')
+  }
+  if defined(Class['apache::mod::peruser']) {
+    fail('May not include both apache::mod::itk and apache::mod::peruser on the same node')
+  }
+  if defined(Class['apache::mod::prefork']) {
+    fail('May not include both apache::mod::itk and apache::mod::prefork on the same node')
+  }
+  if defined(Class['apache::mod::worker']) {
+    fail('May not include both apache::mod::itk and apache::mod::worker on the same node')
+  }
+  File {
+    owner => 'root',
+    group => $::apache::params::root_group,
+    mode  => '0644',
+  }
+
+  # Template uses:
+  # - $startservers
+  # - $minspareservers
+  # - $maxspareservers
+  # - $serverlimit
+  # - $maxclients
+  # - $maxrequestsperchild
+  file { "${::apache::mod_dir}/itk.conf":
+    ensure  => file,
+    content => template('apache/mod/itk.conf.erb'),
+    require => Exec["mkdir ${::apache::mod_dir}"],
+    before  => File[$::apache::mod_dir],
+    notify  => Service['httpd'],
+  }
+
+  case $::osfamily {
+    'debian', 'freebsd': {
+      apache::mpm{ 'itk':
+        apache_version => $apache_version,
+      }
+    }
+    default: {
+      fail("Unsupported osfamily ${::osfamily}")
+    }
+  }
+}
diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/manifests/mod/ldap.pp b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/manifests/mod/ldap.pp
new file mode 100644
index 00000000000..d3b17ff5b85
--- /dev/null
+++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/manifests/mod/ldap.pp
@@ -0,0 +1,14 @@
+class apache::mod::ldap (
+  $apache_version = $::apache::apache_version,
+){
+  ::apache::mod { 'ldap': }
+  # Template uses $apache_version
+  file { 'ldap.conf':
+    ensure  => file,
+    path    => "${::apache::mod_dir}/ldap.conf",
+    content => template('apache/mod/ldap.conf.erb'),
+    require => Exec["mkdir ${::apache::mod_dir}"],
+    before  => File[$::apache::mod_dir],
+    notify  => Service['httpd'],
+  }
+}
diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/manifests/mod/mime.pp b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/manifests/mod/mime.pp
new file mode 100644
index 00000000000..ccdb5d4b3c7
--- /dev/null
+++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/manifests/mod/mime.pp
@@ -0,0 +1,21 @@
+class apache::mod::mime (
+  $mime_support_package = $::apache::params::mime_support_package,
+  $mime_types_config    = $::apache::params::mime_types_config,
+) {
+  apache::mod { 'mime': }
+  # Template uses $mime_types_config
+  file { 'mime.conf':
+    ensure  => file,
+    path    => "${::apache::mod_dir}/mime.conf",
+    content => template('apache/mod/mime.conf.erb'),
+    require => Exec["mkdir ${::apache::mod_dir}"],
+    before  => File[$::apache::mod_dir],
+    notify  => Service['httpd'],
+  }
+  if $mime_support_package {
+    package { $mime_support_package:
+      ensure => 'installed',
+      before => File['mime.conf'],
+    }
+  }
+}
diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/manifests/mod/mime_magic.pp b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/manifests/mod/mime_magic.pp
new file mode 100644
index 00000000000..9de8bc4bc6f
--- /dev/null
+++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/manifests/mod/mime_magic.pp
@@ -0,0 +1,14 @@
+class apache::mod::mime_magic (
+  $magic_file = "${::apache::params::conf_dir}/magic"
+) {
+  apache::mod { 'mime_magic': }
+  # Template uses $magic_file
+  file { 'mime_magic.conf':
+    ensure  => file,
+    path    => "${::apache::mod_dir}/mime_magic.conf",
+    content => template('apache/mod/mime_magic.conf.erb'),
+    require => Exec["mkdir ${::apache::mod_dir}"],
+    before  => File[$::apache::mod_dir],
+    notify  => Service['httpd'],
+  }
+}
diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/manifests/mod/negotiation.pp b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/manifests/mod/negotiation.pp
new file mode 100644
index 00000000000..eff685b15c3
--- /dev/null
+++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/manifests/mod/negotiation.pp
@@ -0,0 +1,12 @@
+class apache::mod::negotiation {
+  ::apache::mod { 'negotiation': }
+  # Template uses no variables
+  file { 'negotiation.conf':
+    ensure  => file,
+    path    => "${::apache::mod_dir}/negotiation.conf",
+    content => template('apache/mod/negotiation.conf.erb'),
+    require => Exec["mkdir ${::apache::mod_dir}"],
+    before  => File[$::apache::mod_dir],
+    notify  => Service['httpd'],
+  }
+}
diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/manifests/mod/nss.pp b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/manifests/mod/nss.pp
new file mode 100644
index 00000000000..f0eff1cdf73
--- /dev/null
+++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/manifests/mod/nss.pp
@@ -0,0 +1,25 @@
+class apache::mod::nss (
+  $transfer_log = "${::apache::params::logroot}/access.log",
+  $error_log    = "${::apache::params::logroot}/error.log",
+  $passwd_file  = undef
+) {
+  include ::apache::mod::mime
+
+  apache::mod { 'nss': }
+
+  $httpd_dir = $::apache::httpd_dir
+
+  # Template uses:
+  # $transfer_log
+  # $error_log
+  # $http_dir
+  # passwd_file
+  file { 'nss.conf':
+    ensure  => file,
+    path    => "${::apache::mod_dir}/nss.conf",
+    content => template('apache/mod/nss.conf.erb'),
+    require => Exec["mkdir ${::apache::mod_dir}"],
+    before  => File[$::apache::mod_dir],
+    notify  => Service['httpd'],
+  }
+}
diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/manifests/mod/pagespeed.pp b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/manifests/mod/pagespeed.pp
new file mode 100644
index 00000000000..8c1c03bd5d6
--- /dev/null
+++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/manifests/mod/pagespeed.pp
@@ -0,0 +1,55 @@
+class apache::mod::pagespeed (
+  $inherit_vhost_config          = 'on',
+  $filter_xhtml                  = false,
+  $cache_path                    = '/var/cache/mod_pagespeed/',
+  $log_dir                       = '/var/log/pagespeed',
+  $memache_servers               = [],
+  $rewrite_level                 = 'CoreFilters',
+  $disable_filters               = [],
+  $enable_filters                = [],
+  $forbid_filters                = [],
+  $rewrite_deadline_per_flush_ms = 10,
+  $additional_domains            = undef,
+  $file_cache_size_kb            = 102400,
+  $file_cache_clean_interval_ms  = 3600000,
+  $lru_cache_per_process         = 1024,
+  $lru_cache_byte_limit          = 16384,
+  $css_flatten_max_bytes         = 2048,
+  $css_inline_max_bytes          = 2048,
+  $css_image_inline_max_bytes    = 2048,
+  $image_inline_max_bytes        = 2048,
+  $js_inline_max_bytes           = 2048,
+  $css_outline_min_bytes         = 3000,
+  $js_outline_min_bytes          = 3000,
+  $inode_limit                   = 500000,
+  $image_max_rewrites_at_once    = 8,
+  $num_rewrite_threads           = 4,
+  $num_expensive_rewrite_threads = 4,
+  $collect_statistics            = 'on',
+  $statistics_logging            = 'on',
+  $allow_view_stats              = [],
+  $allow_pagespeed_console       = [],
+  $allow_pagespeed_message       = [],
+  $message_buffer_size           = 100000,
+  $additional_configuration      = {},
+  $apache_version                = $::apache::apache_version,
+){
+
+  $_lib = $::apache::apache_version ? {
+    '2.4'   => 'mod_pagespeed_ap24.so',
+    default => undef
+  }
+
+  apache::mod { 'pagespeed':
+    lib => $_lib,
+  }
+
+  file { 'pagespeed.conf':
+    ensure  => file,
+    path    => "${::apache::mod_dir}/pagespeed.conf",
+    content => template('apache/mod/pagespeed.conf.erb'),
+    require => Exec["mkdir ${::apache::mod_dir}"],
+    before  => File[$::apache::mod_dir],
+    notify  => Service['httpd'],
+  }
+}
diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/manifests/mod/passenger.pp b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/manifests/mod/passenger.pp
new file mode 100644
index 00000000000..12139cb2b49
--- /dev/null
+++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/manifests/mod/passenger.pp
@@ -0,0 +1,86 @@
+class apache::mod::passenger (
+  $passenger_conf_file            = $::apache::params::passenger_conf_file,
+  $passenger_conf_package_file    = $::apache::params::passenger_conf_package_file,
+  $passenger_high_performance     = undef,
+  $passenger_pool_idle_time       = undef,
+  $passenger_max_requests         = undef,
+  $passenger_stat_throttle_rate   = undef,
+  $rack_autodetect                = undef,
+  $rails_autodetect               = undef,
+  $passenger_root                 = $::apache::params::passenger_root,
+  $passenger_ruby                 = $::apache::params::passenger_ruby,
+  $passenger_default_ruby         = $::apache::params::passenger_default_ruby,
+  $passenger_max_pool_size        = undef,
+  $passenger_use_global_queue     = undef,
+  $mod_package                    = undef,
+  $mod_package_ensure             = undef,
+  $mod_lib                        = undef,
+  $mod_lib_path                   = undef,
+  $mod_id                         = undef,
+  $mod_path                       = undef,
+) {
+  # Managed by the package, but declare it to avoid purging
+  if $passenger_conf_package_file {
+    file { 'passenger_package.conf':
+      path => "${::apache::mod_dir}/${passenger_conf_package_file}",
+    }
+  } else {
+    # Remove passenger_extra.conf left over from before Passenger support was
+    # reworked for Debian. This is a temporary fix for users running this
+    # module from master after release 1.0.1 It will be removed in two
+    # releases from now.
+    $passenger_package_conf_ensure = $::osfamily ? {
+      'Debian' => 'absent',
+      default  => undef,
+    }
+
+    file { 'passenger_package.conf':
+      ensure => $passenger_package_conf_ensure,
+      path   => "${::apache::mod_dir}/passenger_extra.conf",
+    }
+  }
+
+  $_package = $mod_package
+  $_package_ensure = $mod_package_ensure
+  $_lib = $mod_lib
+  if $::osfamily == 'FreeBSD' {
+    if $mod_lib_path {
+      $_lib_path = $mod_lib_path
+    } else {
+      $_lib_path = "${passenger_root}/buildout/apache2"
+    }
+  } else {
+    $_lib_path = $mod_lib_path
+  }
+
+  $_id = $mod_id
+  $_path = $mod_path
+  ::apache::mod { 'passenger':
+    package        => $_package,
+    package_ensure => $_package_ensure,
+    lib            => $_lib,
+    lib_path       => $_lib_path,
+    id             => $_id,
+    path           => $_path,
+  }
+
+  # Template uses:
+  # - $passenger_root
+  # - $passenger_ruby
+  # - $passenger_default_ruby
+  # - $passenger_max_pool_size
+  # - $passenger_high_performance
+  # - $passenger_max_requests
+  # - $passenger_stat_throttle_rate
+  # - $passenger_use_global_queue
+  # - $rack_autodetect
+  # - $rails_autodetect
+  file { 'passenger.conf':
+    ensure  => file,
+    path    => "${::apache::mod_dir}/${passenger_conf_file}",
+    content => template('apache/mod/passenger.conf.erb'),
+    require => Exec["mkdir ${::apache::mod_dir}"],
+    before  => File[$::apache::mod_dir],
+    notify  => Service['httpd'],
+  }
+}
diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/manifests/mod/perl.pp b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/manifests/mod/perl.pp
new file mode 100644
index 00000000000..b57f25fd5fd
--- /dev/null
+++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/manifests/mod/perl.pp
@@ -0,0 +1,3 @@
+class apache::mod::perl {
+  ::apache::mod { 'perl': }
+}
diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/manifests/mod/peruser.pp b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/manifests/mod/peruser.pp
new file mode 100644
index 00000000000..518655a1d43
--- /dev/null
+++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/manifests/mod/peruser.pp
@@ -0,0 +1,73 @@
+class apache::mod::peruser (
+  $minspareprocessors = '2',
+  $minprocessors = '2',
+  $maxprocessors = '10',
+  $maxclients = '150',
+  $maxrequestsperchild = '1000',
+  $idletimeout = '120',
+  $expiretimeout = '120',
+  $keepalive = 'Off',
+) {
+  if defined(Class['apache::mod::event']) {
+    fail('May not include both apache::mod::peruser and apache::mod::event on the same node')
+  }
+  if defined(Class['apache::mod::itk']) {
+    fail('May not include both apache::mod::peruser and apache::mod::itk on the same node')
+  }
+  if defined(Class['apache::mod::prefork']) {
+    fail('May not include both apache::mod::peruser and apache::mod::prefork on the same node')
+  }
+  if defined(Class['apache::mod::worker']) {
+    fail('May not include both apache::mod::peruser and apache::mod::worker on the same node')
+  }
+  File {
+    owner => 'root',
+    group => $::apache::params::root_group,
+    mode  => '0644',
+  }
+
+  $mod_dir = $::apache::mod_dir
+
+  # Template uses:
+  # - $minspareprocessors
+  # - $minprocessors
+  # - $maxprocessors
+  # - $maxclients
+  # - $maxrequestsperchild
+  # - $idletimeout
+  # - $expiretimeout
+  # - $keepalive
+  # - $mod_dir
+  file { "${::apache::mod_dir}/peruser.conf":
+    ensure  => file,
+    content => template('apache/mod/peruser.conf.erb'),
+    require => Exec["mkdir ${::apache::mod_dir}"],
+    before  => File[$::apache::mod_dir],
+    notify  => Service['httpd'],
+  }
+  file { "${::apache::mod_dir}/peruser":
+    ensure  => directory,
+    require => File[$::apache::mod_dir],
+  }
+  file { "${::apache::mod_dir}/peruser/multiplexers":
+    ensure  => directory,
+    require => File["${::apache::mod_dir}/peruser"],
+  }
+  file { "${::apache::mod_dir}/peruser/processors":
+    ensure  => directory,
+    require => File["${::apache::mod_dir}/peruser"],
+  }
+
+  ::apache::peruser::multiplexer { '01-default': }
+
+  case $::osfamily {
+    'freebsd' : {
+      class { '::apache::package':
+        mpm_module => 'peruser'
+      }
+    }
+    default: {
+      fail("Unsupported osfamily ${::osfamily}")
+    }
+  }
+}
diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/manifests/mod/php.pp b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/manifests/mod/php.pp
new file mode 100644
index 00000000000..a94bfe50bd0
--- /dev/null
+++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/manifests/mod/php.pp
@@ -0,0 +1,55 @@
+class apache::mod::php (
+  $package_name   = undef,
+  $package_ensure = 'present',
+  $path           = undef,
+  $extensions     = ['.php'],
+  $content        = undef,
+  $template       = 'apache/mod/php5.conf.erb',
+  $source         = undef,
+) {
+  if ! defined(Class['apache::mod::prefork']) {
+    fail('apache::mod::php requires apache::mod::prefork; please enable mpm_module => \'prefork\' on Class[\'apache\']')
+  }
+  validate_array($extensions)
+
+  if $source and ($content or $template != 'apache/mod/php5.conf.erb') {
+    warning('source and content or template parameters are provided. source parameter will be used')
+  } elsif $content and $template != 'apache/mod/php5.conf.erb' {
+    warning('content and template parameters are provided. content parameter will be used')
+  }
+
+  $manage_content = $source ? {
+    undef   => $content ? {
+      undef   => template($template),
+      default => $content,
+    },
+    default => undef,
+  }
+
+  ::apache::mod { 'php5':
+    package        => $package_name,
+    package_ensure => $package_ensure,
+    path           => $path,
+  }
+
+  include ::apache::mod::mime
+  include ::apache::mod::dir
+  Class['::apache::mod::mime'] -> Class['::apache::mod::dir'] -> Class['::apache::mod::php']
+
+  # Template uses $extensions
+  file { 'php5.conf':
+    ensure  => file,
+    path    => "${::apache::mod_dir}/php5.conf",
+    owner   => 'root',
+    group   => 'root',
+    mode    => '0644',
+    content => $manage_content,
+    source  => $source,
+    require => [
+      Class['::apache::mod::prefork'],
+      Exec["mkdir ${::apache::mod_dir}"],
+    ],
+    before  => File[$::apache::mod_dir],
+    notify  => Service['httpd'],
+  }
+}
diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/manifests/mod/prefork.pp b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/manifests/mod/prefork.pp
new file mode 100644
index 00000000000..b3adeae8c88
--- /dev/null
+++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/manifests/mod/prefork.pp
@@ -0,0 +1,70 @@
+class apache::mod::prefork (
+  $startservers        = '8',
+  $minspareservers     = '5',
+  $maxspareservers     = '20',
+  $serverlimit         = '256',
+  $maxclients          = '256',
+  $maxrequestsperchild = '4000',
+  $apache_version      = $::apache::apache_version,
+) {
+  if defined(Class['apache::mod::event']) {
+    fail('May not include both apache::mod::prefork and apache::mod::event on the same node')
+  }
+  if defined(Class['apache::mod::itk']) {
+    fail('May not include both apache::mod::prefork and apache::mod::itk on the same node')
+  }
+  if defined(Class['apache::mod::peruser']) {
+    fail('May not include both apache::mod::prefork and apache::mod::peruser on the same node')
+  }
+  if defined(Class['apache::mod::worker']) {
+    fail('May not include both apache::mod::prefork and apache::mod::worker on the same node')
+  }
+  File {
+    owner => 'root',
+    group => $::apache::params::root_group,
+    mode  => '0644',
+  }
+
+  # Template uses:
+  # - $startservers
+  # - $minspareservers
+  # - $maxspareservers
+  # - $serverlimit
+  # - $maxclients
+  # - $maxrequestsperchild
+  file { "${::apache::mod_dir}/prefork.conf":
+    ensure  => file,
+    content => template('apache/mod/prefork.conf.erb'),
+    require => Exec["mkdir ${::apache::mod_dir}"],
+    before  => File[$::apache::mod_dir],
+    notify  => Service['httpd'],
+  }
+
+  case $::osfamily {
+    'redhat': {
+      if versioncmp($apache_version, '2.4') >= 0 {
+        ::apache::mpm{ 'prefork':
+          apache_version => $apache_version,
+        }
+      }
+      else {
+        file_line { '/etc/sysconfig/httpd prefork enable':
+          ensure  => present,
+          path    => '/etc/sysconfig/httpd',
+          line    => '#HTTPD=/usr/sbin/httpd.worker',
+          match   => '#?HTTPD=/usr/sbin/httpd.worker',
+          require => Package['httpd'],
+          notify  => Service['httpd'],
+        }
+      }
+    }
+    'debian', 'freebsd' : {
+      ::apache::mpm{ 'prefork':
+        apache_version => $apache_version,
+      }
+    }
+    default: {
+      fail("Unsupported osfamily ${::osfamily}")
+    }
+  }
+}
diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/manifests/mod/proxy.pp b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/manifests/mod/proxy.pp
new file mode 100644
index 00000000000..03c1e78c95f
--- /dev/null
+++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/manifests/mod/proxy.pp
@@ -0,0 +1,16 @@
+class apache::mod::proxy (
+  $proxy_requests = 'Off',
+  $allow_from = undef,
+  $apache_version = $::apache::apache_version,
+) {
+  ::apache::mod { 'proxy': }
+  # Template uses $proxy_requests, $apache_version
+  file { 'proxy.conf':
+    ensure  => file,
+    path    => "${::apache::mod_dir}/proxy.conf",
+    content => template('apache/mod/proxy.conf.erb'),
+    require => Exec["mkdir ${::apache::mod_dir}"],
+    before  => File[$::apache::mod_dir],
+    notify  => Service['httpd'],
+  }
+}
diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/manifests/mod/proxy_ajp.pp b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/manifests/mod/proxy_ajp.pp
new file mode 100644
index 00000000000..a011a178957
--- /dev/null
+++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/manifests/mod/proxy_ajp.pp
@@ -0,0 +1,4 @@
+class apache::mod::proxy_ajp {
+  Class['::apache::mod::proxy'] -> Class['::apache::mod::proxy_ajp']
+  ::apache::mod { 'proxy_ajp': }
+}
diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/manifests/mod/proxy_balancer.pp b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/manifests/mod/proxy_balancer.pp
new file mode 100644
index 00000000000..5a0768d8d01
--- /dev/null
+++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/manifests/mod/proxy_balancer.pp
@@ -0,0 +1,10 @@
+class apache::mod::proxy_balancer {
+
+  include ::apache::mod::proxy
+  include ::apache::mod::proxy_http
+
+  Class['::apache::mod::proxy'] -> Class['::apache::mod::proxy_balancer']
+  Class['::apache::mod::proxy_http'] -> Class['::apache::mod::proxy_balancer']
+  ::apache::mod { 'proxy_balancer': }
+
+}
diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/manifests/mod/proxy_html.pp b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/manifests/mod/proxy_html.pp
new file mode 100644
index 00000000000..549eb117faa
--- /dev/null
+++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/manifests/mod/proxy_html.pp
@@ -0,0 +1,37 @@
+class apache::mod::proxy_html {
+  Class['::apache::mod::proxy'] -> Class['::apache::mod::proxy_html']
+  Class['::apache::mod::proxy_http'] -> Class['::apache::mod::proxy_html']
+
+  # Add libxml2
+  case $::osfamily {
+    /RedHat|FreeBSD/: {
+      ::apache::mod { 'xml2enc': }
+      $loadfiles = undef
+    }
+    'Debian': {
+      $gnu_path = $::hardwaremodel ? {
+        'i686'  => 'i386',
+        default => $::hardwaremodel,
+      }
+      $loadfiles = $::apache::params::distrelease ? {
+        '6'     => ['/usr/lib/libxml2.so.2'],
+        '10'    => ['/usr/lib/libxml2.so.2'],
+        default => ["/usr/lib/${gnu_path}-linux-gnu/libxml2.so.2"],
+      }
+    }
+  }
+
+  ::apache::mod { 'proxy_html':
+    loadfiles => $loadfiles,
+  }
+
+  # Template uses $icons_path
+  file { 'proxy_html.conf':
+    ensure  => file,
+    path    => "${::apache::mod_dir}/proxy_html.conf",
+    content => template('apache/mod/proxy_html.conf.erb'),
+    require => Exec["mkdir ${::apache::mod_dir}"],
+    before  => File[$::apache::mod_dir],
+    notify  => Service['httpd'],
+  }
+}
diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/manifests/mod/proxy_http.pp b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/manifests/mod/proxy_http.pp
new file mode 100644
index 00000000000..1579e68ee20
--- /dev/null
+++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/manifests/mod/proxy_http.pp
@@ -0,0 +1,4 @@
+class apache::mod::proxy_http {
+  Class['::apache::mod::proxy'] -> Class['::apache::mod::proxy_http']
+  ::apache::mod { 'proxy_http': }
+}
diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/manifests/mod/python.pp b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/manifests/mod/python.pp
new file mode 100644
index 00000000000..e326c8d757d
--- /dev/null
+++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/manifests/mod/python.pp
@@ -0,0 +1,5 @@
+class apache::mod::python {
+  ::apache::mod { 'python': }
+}
+
+
diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/manifests/mod/reqtimeout.pp b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/manifests/mod/reqtimeout.pp
new file mode 100644
index 00000000000..80b30183062
--- /dev/null
+++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/manifests/mod/reqtimeout.pp
@@ -0,0 +1,12 @@
+class apache::mod::reqtimeout {
+  ::apache::mod { 'reqtimeout': }
+  # Template uses no variables
+  file { 'reqtimeout.conf':
+    ensure  => file,
+    path    => "${::apache::mod_dir}/reqtimeout.conf",
+    content => template('apache/mod/reqtimeout.conf.erb'),
+    require => Exec["mkdir ${::apache::mod_dir}"],
+    before  => File[$::apache::mod_dir],
+    notify  => Service['httpd'],
+  }
+}
diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/manifests/mod/rewrite.pp b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/manifests/mod/rewrite.pp
new file mode 100644
index 00000000000..694f0b6f5c3
--- /dev/null
+++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/manifests/mod/rewrite.pp
@@ -0,0 +1,4 @@
+class apache::mod::rewrite {
+  include ::apache::params
+  ::apache::mod { 'rewrite': }
+}
diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/manifests/mod/rpaf.pp b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/manifests/mod/rpaf.pp
new file mode 100644
index 00000000000..6fbc1d4e04e
--- /dev/null
+++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/manifests/mod/rpaf.pp
@@ -0,0 +1,20 @@
+class apache::mod::rpaf (
+  $sethostname = true,
+  $proxy_ips   = [ '127.0.0.1' ],
+  $header      = 'X-Forwarded-For'
+) {
+  ::apache::mod { 'rpaf': }
+
+  # Template uses:
+  # - $sethostname
+  # - $proxy_ips
+  # - $header
+  file { 'rpaf.conf':
+    ensure  => file,
+    path    => "${::apache::mod_dir}/rpaf.conf",
+    content => template('apache/mod/rpaf.conf.erb'),
+    require => Exec["mkdir ${::apache::mod_dir}"],
+    before  => File[$::apache::mod_dir],
+    notify  => Service['httpd'],
+  }
+}
diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/manifests/mod/setenvif.pp b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/manifests/mod/setenvif.pp
new file mode 100644
index 00000000000..15b1441d838
--- /dev/null
+++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/manifests/mod/setenvif.pp
@@ -0,0 +1,12 @@
+class apache::mod::setenvif {
+  ::apache::mod { 'setenvif': }
+  # Template uses no variables
+  file { 'setenvif.conf':
+    ensure  => file,
+    path    => "${::apache::mod_dir}/setenvif.conf",
+    content => template('apache/mod/setenvif.conf.erb'),
+    require => Exec["mkdir ${::apache::mod_dir}"],
+    before  => File[$::apache::mod_dir],
+    notify  => Service['httpd'],
+  }
+}
diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/manifests/mod/speling.pp b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/manifests/mod/speling.pp
new file mode 100644
index 00000000000..eb46d78f044
--- /dev/null
+++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/manifests/mod/speling.pp
@@ -0,0 +1,3 @@
+class apache::mod::speling {
+  ::apache::mod { 'speling': }
+}
diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/manifests/mod/ssl.pp b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/manifests/mod/ssl.pp
new file mode 100644
index 00000000000..dd178150c9d
--- /dev/null
+++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/manifests/mod/ssl.pp
@@ -0,0 +1,56 @@
+class apache::mod::ssl (
+  $ssl_compression = false,
+  $ssl_options     = [ 'StdEnvVars' ],
+  $ssl_cipher      = 'HIGH:MEDIUM:!aNULL:!MD5',
+  $apache_version  = $::apache::apache_version,
+) {
+  $session_cache = $::osfamily ? {
+    'debian'  => '${APACHE_RUN_DIR}/ssl_scache(512000)',
+    'redhat'  => '/var/cache/mod_ssl/scache(512000)',
+    'freebsd' => '/var/run/ssl_scache(512000)',
+  }
+
+  case $::osfamily {
+    'debian': {
+      if versioncmp($apache_version, '2.4') >= 0 and $::operatingsystem == 'Ubuntu' {
+        $ssl_mutex = 'default'
+      } elsif $::operatingsystem == 'Ubuntu' and $::operatingsystemrelease == '10.04' {
+        $ssl_mutex = 'file:/var/run/apache2/ssl_mutex'
+      } else {
+        $ssl_mutex = 'file:${APACHE_RUN_DIR}/ssl_mutex'
+      }
+    }
+    'redhat': {
+      $ssl_mutex = 'default'
+    }
+    'freebsd': {
+      $ssl_mutex = 'default'
+    }
+    default: {
+      fail("Unsupported osfamily ${::osfamily}")
+    }
+  }
+
+  ::apache::mod { 'ssl': }
+
+  if versioncmp($apache_version, '2.4') >= 0 {
+    ::apache::mod { 'socache_shmcb': }
+  }
+
+  # Template uses
+  #
+  # $ssl_compression
+  # $ssl_options
+  # $session_cache,
+  # $ssl_mutex
+  # $apache_version
+  #
+  file { 'ssl.conf':
+    ensure  => file,
+    path    => "${::apache::mod_dir}/ssl.conf",
+    content => template('apache/mod/ssl.conf.erb'),
+    require => Exec["mkdir ${::apache::mod_dir}"],
+    before  => File[$::apache::mod_dir],
+    notify  => Service['httpd'],
+  }
+}
diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/manifests/mod/status.pp b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/manifests/mod/status.pp
new file mode 100644
index 00000000000..cfab5d58eab
--- /dev/null
+++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/manifests/mod/status.pp
@@ -0,0 +1,43 @@
+# Class: apache::mod::status
+#
+# This class enables and configures Apache mod_status
+# See: http://httpd.apache.org/docs/current/mod/mod_status.html
+#
+# Parameters:
+# - $allow_from is an array of hosts, ip addresses, partial network numbers
+#   or networks in CIDR notation specifying what hosts can view the special
+#   /server-status URL.  Defaults to ['127.0.0.1', '::1'].
+# - $extended_status track and display extended status information. Valid
+#   values are 'On' or 'Off'.  Defaults to 'On'.
+#
+# Actions:
+# - Enable and configure Apache mod_status
+#
+# Requires:
+# - The apache class
+#
+# Sample Usage:
+#
+#  # Simple usage allowing access from localhost and a private subnet
+#  class { 'apache::mod::status':
+#    $allow_from => ['127.0.0.1', '10.10.10.10/24'],
+#  }
+#
+class apache::mod::status (
+  $allow_from      = ['127.0.0.1','::1'],
+  $extended_status = 'On',
+  $apache_version = $::apache::apache_version,
+){
+  validate_array($allow_from)
+  validate_re(downcase($extended_status), '^(on|off)$', "${extended_status} is not supported for extended_status.  Allowed values are 'On' and 'Off'.")
+  ::apache::mod { 'status': }
+  # Template uses $allow_from, $extended_status, $apache_version
+  file { 'status.conf':
+    ensure  => file,
+    path    => "${::apache::mod_dir}/status.conf",
+    content => template('apache/mod/status.conf.erb'),
+    require => Exec["mkdir ${::apache::mod_dir}"],
+    before  => File[$::apache::mod_dir],
+    notify  => Service['httpd'],
+  }
+}
diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/manifests/mod/suexec.pp b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/manifests/mod/suexec.pp
new file mode 100644
index 00000000000..ded013d4990
--- /dev/null
+++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/manifests/mod/suexec.pp
@@ -0,0 +1,3 @@
+class apache::mod::suexec {
+  ::apache::mod { 'suexec': }
+}
diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/manifests/mod/suphp.pp b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/manifests/mod/suphp.pp
new file mode 100644
index 00000000000..f9a572f4635
--- /dev/null
+++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/manifests/mod/suphp.pp
@@ -0,0 +1,14 @@
+class apache::mod::suphp (
+){
+  ::apache::mod { 'suphp': }
+
+  file {'suphp.conf':
+    ensure  => file,
+    path    => "${::apache::mod_dir}/suphp.conf",
+    content => template('apache/mod/suphp.conf.erb'),
+    require => Exec["mkdir ${::apache::mod_dir}"],
+    before  => File[$::apache::mod_dir],
+    notify  => Service['httpd']
+  }
+}
+
diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/manifests/mod/userdir.pp b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/manifests/mod/userdir.pp
new file mode 100644
index 00000000000..accfe64a794
--- /dev/null
+++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/manifests/mod/userdir.pp
@@ -0,0 +1,18 @@
+class apache::mod::userdir (
+  $home = '/home',
+  $dir = 'public_html',
+  $disable_root = true,
+  $apache_version = $::apache::apache_version,
+) {
+  ::apache::mod { 'userdir': }
+
+  # Template uses $home, $dir, $disable_root, $apache_version
+  file { 'userdir.conf':
+    ensure  => file,
+    path    => "${::apache::mod_dir}/userdir.conf",
+    content => template('apache/mod/userdir.conf.erb'),
+    require => Exec["mkdir ${::apache::mod_dir}"],
+    before  => File[$::apache::mod_dir],
+    notify  => Service['httpd'],
+  }
+}
diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/manifests/mod/vhost_alias.pp b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/manifests/mod/vhost_alias.pp
new file mode 100644
index 00000000000..30ae122e15e
--- /dev/null
+++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/manifests/mod/vhost_alias.pp
@@ -0,0 +1,3 @@
+class apache::mod::vhost_alias {
+  ::apache::mod { 'vhost_alias': }
+}
diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/manifests/mod/worker.pp b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/manifests/mod/worker.pp
new file mode 100644
index 00000000000..0d2815964bc
--- /dev/null
+++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/manifests/mod/worker.pp
@@ -0,0 +1,74 @@
+class apache::mod::worker (
+  $startservers        = '2',
+  $maxclients          = '150',
+  $minsparethreads     = '25',
+  $maxsparethreads     = '75',
+  $threadsperchild     = '25',
+  $maxrequestsperchild = '0',
+  $serverlimit         = '25',
+  $threadlimit         = '64',
+  $apache_version      = $::apache::apache_version,
+) {
+  if defined(Class['apache::mod::event']) {
+    fail('May not include both apache::mod::worker and apache::mod::event on the same node')
+  }
+  if defined(Class['apache::mod::itk']) {
+    fail('May not include both apache::mod::worker and apache::mod::itk on the same node')
+  }
+  if defined(Class['apache::mod::peruser']) {
+    fail('May not include both apache::mod::worker and apache::mod::peruser on the same node')
+  }
+  if defined(Class['apache::mod::prefork']) {
+    fail('May not include both apache::mod::worker and apache::mod::prefork on the same node')
+  }
+  File {
+    owner => 'root',
+    group => $::apache::params::root_group,
+    mode  => '0644',
+  }
+
+  # Template uses:
+  # - $startservers
+  # - $maxclients
+  # - $minsparethreads
+  # - $maxsparethreads
+  # - $threadsperchild
+  # - $maxrequestsperchild
+  # - $serverlimit
+  # - $threadLimit
+  file { "${::apache::mod_dir}/worker.conf":
+    ensure  => file,
+    content => template('apache/mod/worker.conf.erb'),
+    require => Exec["mkdir ${::apache::mod_dir}"],
+    before  => File[$::apache::mod_dir],
+    notify  => Service['httpd'],
+  }
+
+  case $::osfamily {
+    'redhat': {
+      if versioncmp($apache_version, '2.4') >= 0 {
+        ::apache::mpm{ 'worker':
+          apache_version => $apache_version,
+        }
+      }
+      else {
+        file_line { '/etc/sysconfig/httpd worker enable':
+          ensure  => present,
+          path    => '/etc/sysconfig/httpd',
+          line    => 'HTTPD=/usr/sbin/httpd.worker',
+          match   => '#?HTTPD=/usr/sbin/httpd.worker',
+          require => Package['httpd'],
+          notify  => Service['httpd'],
+        }
+      }
+    }
+    'debian', 'freebsd': {
+      ::apache::mpm{ 'worker':
+        apache_version => $apache_version,
+      }
+    }
+    default: {
+      fail("Unsupported osfamily ${::osfamily}")
+    }
+  }
+}
diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/manifests/mod/wsgi.pp b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/manifests/mod/wsgi.pp
new file mode 100644
index 00000000000..244a3458b43
--- /dev/null
+++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/manifests/mod/wsgi.pp
@@ -0,0 +1,21 @@
+class apache::mod::wsgi (
+  $wsgi_socket_prefix = undef,
+  $wsgi_python_path   = undef,
+  $wsgi_python_home   = undef,
+){
+  ::apache::mod { 'wsgi': }
+
+  # Template uses:
+  # - $wsgi_socket_prefix
+  # - $wsgi_python_path
+  # - $wsgi_python_home
+  file {'wsgi.conf':
+    ensure  => file,
+    path    => "${::apache::mod_dir}/wsgi.conf",
+    content => template('apache/mod/wsgi.conf.erb'),
+    require => Exec["mkdir ${::apache::mod_dir}"],
+    before  => File[$::apache::mod_dir],
+    notify  => Service['httpd']
+  }
+}
+
diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/manifests/mod/xsendfile.pp b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/manifests/mod/xsendfile.pp
new file mode 100644
index 00000000000..7c5e88437a6
--- /dev/null
+++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/manifests/mod/xsendfile.pp
@@ -0,0 +1,4 @@
+class apache::mod::xsendfile {
+  include ::apache::params
+  ::apache::mod { 'xsendfile': }
+}
diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/manifests/mpm.pp b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/manifests/mpm.pp
new file mode 100644
index 00000000000..6437016ba7f
--- /dev/null
+++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/manifests/mpm.pp
@@ -0,0 +1,68 @@
+define apache::mpm (
+  $lib_path       = $::apache::params::lib_path,
+  $apache_version = $::apache::apache_version,
+) {
+  if ! defined(Class['apache']) {
+    fail('You must include the apache base class before using any apache defined resources')
+  }
+
+  $mpm     = $name
+  $mod_dir = $::apache::mod_dir
+
+  $_lib  = "mod_mpm_${mpm}.so"
+  $_path = "${lib_path}/${_lib}"
+  $_id   = "mpm_${mpm}_module"
+
+  if versioncmp($apache_version, '2.4') >= 0 {
+    file { "${mod_dir}/${mpm}.load":
+      ensure  => file,
+      path    => "${mod_dir}/${mpm}.load",
+      content => "LoadModule ${_id} ${_path}\n",
+      require => [
+        Package['httpd'],
+        Exec["mkdir ${mod_dir}"],
+      ],
+      before  => File[$mod_dir],
+      notify  => Service['httpd'],
+    }
+  }
+
+  case $::osfamily {
+    'debian': {
+      file { "${::apache::mod_enable_dir}/${mpm}.conf":
+        ensure  => link,
+        target  => "${::apache::mod_dir}/${mpm}.conf",
+        require => Exec["mkdir ${::apache::mod_enable_dir}"],
+        before  => File[$::apache::mod_enable_dir],
+        notify  => Service['httpd'],
+      }
+
+      if versioncmp($apache_version, '2.4') >= 0 {
+        file { "${::apache::mod_enable_dir}/${mpm}.load":
+          ensure  => link,
+          target  => "${::apache::mod_dir}/${mpm}.load",
+          require => Exec["mkdir ${::apache::mod_enable_dir}"],
+          before  => File[$::apache::mod_enable_dir],
+          notify  => Service['httpd'],
+        }
+      }
+
+      if versioncmp($apache_version, '2.4') < 0 {
+        package { "apache2-mpm-${mpm}":
+          ensure => present,
+        }
+      }
+    }
+    'freebsd': {
+      class { '::apache::package':
+        mpm_module => $mpm
+      }
+    }
+    'redhat': {
+      # so we don't fail
+    }
+    default: {
+      fail("Unsupported osfamily ${::osfamily}")
+    }
+  }
+}
diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/manifests/namevirtualhost.pp b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/manifests/namevirtualhost.pp
new file mode 100644
index 00000000000..f8c3a80d859
--- /dev/null
+++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/manifests/namevirtualhost.pp
@@ -0,0 +1,10 @@
+define apache::namevirtualhost {
+  $addr_port = $name
+
+  # Template uses: $addr_port
+  concat::fragment { "NameVirtualHost ${addr_port}":
+    ensure  => present,
+    target  => $::apache::ports_file,
+    content => template('apache/namevirtualhost.erb'),
+  }
+}
diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/manifests/package.pp b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/manifests/package.pp
new file mode 100644
index 00000000000..a4e4015c527
--- /dev/null
+++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/manifests/package.pp
@@ -0,0 +1,48 @@
+class apache::package (
+  $ensure     = 'present',
+  $mpm_module = $::apache::params::mpm_module,
+) inherits ::apache::params {
+  case $::osfamily {
+    'freebsd' : {
+      $all_mpms = [
+        'www/apache22',
+        'www/apache22-worker-mpm',
+        'www/apache22-event-mpm',
+        'www/apache22-itk-mpm',
+        'www/apache22-peruser-mpm',
+      ]
+      if $mpm_module {
+        $apache_package = $mpm_module ? {
+          'prefork' => 'www/apache22',
+          default   => "www/apache22-${mpm_module}-mpm"
+        }
+      } else {
+        $apache_package = 'www/apache22'
+      }
+      $other_mpms = delete($all_mpms, $apache_package)
+      # Configure ports to have apache module packages dependent on correct
+      # version of apache package (apache22, apache22-worker-mpm, ...)
+      file_line { 'APACHE_PORT in /etc/make.conf':
+        ensure => $ensure,
+        path   => '/etc/make.conf',
+        line   => "APACHE_PORT=${apache_package}",
+        match  => '^\s*#?\s*APACHE_PORT\s*=\s*',
+        before => Package['httpd'],
+      }
+      # remove other packages
+      ensure_resource('package', $other_mpms, {
+        ensure  => absent,
+        before  => Package['httpd'],
+        require => File_line['APACHE_PORT in /etc/make.conf'],
+      })
+    }
+    default: {
+      $apache_package = $::apache::params::apache_name
+    }
+  }
+  package { 'httpd':
+    ensure => $ensure,
+    name   => $apache_package,
+    notify => Class['Apache::Service'],
+  }
+}
diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/manifests/params.pp b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/manifests/params.pp
new file mode 100644
index 00000000000..d272afb319c
--- /dev/null
+++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/manifests/params.pp
@@ -0,0 +1,258 @@
+# Class: apache::params
+#
+# This class manages Apache parameters
+#
+# Parameters:
+# - The $user that Apache runs as
+# - The $group that Apache runs as
+# - The $apache_name is the name of the package and service on the relevant
+#   distribution
+# - The $php_package is the name of the package that provided PHP
+# - The $ssl_package is the name of the Apache SSL package
+# - The $apache_dev is the name of the Apache development libraries package
+# - The $conf_contents is the contents of the Apache configuration file
+#
+# Actions:
+#
+# Requires:
+#
+# Sample Usage:
+#
+class apache::params inherits ::apache::version {
+  if($::fqdn) {
+    $servername = $::fqdn
+  } else {
+    $servername = $::hostname
+  }
+
+  # The default error log level
+  $log_level = 'warn'
+
+  if $::osfamily == 'RedHat' or $::operatingsystem == 'amazon' {
+    $user                 = 'apache'
+    $group                = 'apache'
+    $root_group           = 'root'
+    $apache_name          = 'httpd'
+    $service_name         = 'httpd'
+    $httpd_dir            = '/etc/httpd'
+    $server_root          = '/etc/httpd'
+    $conf_dir             = "${httpd_dir}/conf"
+    $confd_dir            = "${httpd_dir}/conf.d"
+    $mod_dir              = "${httpd_dir}/conf.d"
+    $mod_enable_dir       = undef
+    $vhost_dir            = "${httpd_dir}/conf.d"
+    $vhost_enable_dir     = undef
+    $conf_file            = 'httpd.conf'
+    $ports_file           = "${conf_dir}/ports.conf"
+    $logroot              = '/var/log/httpd'
+    $lib_path             = 'modules'
+    $mpm_module           = 'prefork'
+    $dev_packages         = 'httpd-devel'
+    $default_ssl_cert     = '/etc/pki/tls/certs/localhost.crt'
+    $default_ssl_key      = '/etc/pki/tls/private/localhost.key'
+    $ssl_certs_dir        = '/etc/pki/tls/certs'
+    $passenger_conf_file  = 'passenger_extra.conf'
+    $passenger_conf_package_file = 'passenger.conf'
+    $passenger_root       = undef
+    $passenger_ruby       = undef
+    $passenger_default_ruby = undef
+    $suphp_addhandler     = 'php5-script'
+    $suphp_engine         = 'off'
+    $suphp_configpath     = undef
+    $mod_packages         = {
+      'auth_kerb'   => 'mod_auth_kerb',
+      'authnz_ldap' => 'mod_authz_ldap',
+      'fastcgi'     => 'mod_fastcgi',
+      'fcgid'       => 'mod_fcgid',
+      'pagespeed'   => 'mod-pagespeed-stable',
+      'passenger'   => 'mod_passenger',
+      'perl'        => 'mod_perl',
+      'php5'        => $::apache::version::distrelease ? {
+        '5'     => 'php53',
+        default => 'php',
+      },
+      'proxy_html'  => 'mod_proxy_html',
+      'python'      => 'mod_python',
+      'shibboleth'  => 'shibboleth',
+      'ssl'         => 'mod_ssl',
+      'wsgi'        => 'mod_wsgi',
+      'dav_svn'     => 'mod_dav_svn',
+      'suphp'       => 'mod_suphp',
+      'xsendfile'   => 'mod_xsendfile',
+      'nss'         => 'mod_nss',
+    }
+    $mod_libs             = {
+      'php5' => 'libphp5.so',
+      'nss'  => 'libmodnss.so',
+    }
+    $conf_template        = 'apache/httpd.conf.erb'
+    $keepalive            = 'Off'
+    $keepalive_timeout    = 15
+    $max_keepalive_requests = 100
+    $fastcgi_lib_path     = undef
+    $mime_support_package = 'mailcap'
+    $mime_types_config    = '/etc/mime.types'
+  } elsif $::osfamily == 'Debian' {
+    $user                = 'www-data'
+    $group               = 'www-data'
+    $root_group          = 'root'
+    $apache_name         = 'apache2'
+    $service_name        = 'apache2'
+    $httpd_dir           = '/etc/apache2'
+    $server_root         = '/etc/apache2'
+    $conf_dir            = $httpd_dir
+    $confd_dir           = "${httpd_dir}/conf.d"
+    $mod_dir             = "${httpd_dir}/mods-available"
+    $mod_enable_dir      = "${httpd_dir}/mods-enabled"
+    $vhost_dir           = "${httpd_dir}/sites-available"
+    $vhost_enable_dir    = "${httpd_dir}/sites-enabled"
+    $conf_file           = 'apache2.conf'
+    $ports_file          = "${conf_dir}/ports.conf"
+    $logroot             = '/var/log/apache2'
+    $lib_path            = '/usr/lib/apache2/modules'
+    $mpm_module          = 'worker'
+    $dev_packages        = ['libaprutil1-dev', 'libapr1-dev', 'apache2-prefork-dev']
+    $default_ssl_cert    = '/etc/ssl/certs/ssl-cert-snakeoil.pem'
+    $default_ssl_key     = '/etc/ssl/private/ssl-cert-snakeoil.key'
+    $ssl_certs_dir       = '/etc/ssl/certs'
+    $suphp_addhandler    = 'x-httpd-php'
+    $suphp_engine        = 'off'
+    $suphp_configpath    = '/etc/php5/apache2'
+    $mod_packages        = {
+      'auth_kerb'   => 'libapache2-mod-auth-kerb',
+      'dav_svn'     => 'libapache2-svn',
+      'fastcgi'     => 'libapache2-mod-fastcgi',
+      'fcgid'       => 'libapache2-mod-fcgid',
+      'nss'         => 'libapache2-mod-nss',
+      'pagespeed'   => 'mod-pagespeed-stable',
+      'passenger'   => 'libapache2-mod-passenger',
+      'perl'        => 'libapache2-mod-perl2',
+      'php5'        => 'libapache2-mod-php5',
+      'proxy_html'  => 'libapache2-mod-proxy-html',
+      'python'      => 'libapache2-mod-python',
+      'rpaf'        => 'libapache2-mod-rpaf',
+      'suphp'       => 'libapache2-mod-suphp',
+      'wsgi'        => 'libapache2-mod-wsgi',
+      'xsendfile'   => 'libapache2-mod-xsendfile',
+    }
+    $mod_libs             = {
+      'php5' => 'libphp5.so',
+    }
+    $conf_template          = 'apache/httpd.conf.erb'
+    $keepalive              = 'Off'
+    $keepalive_timeout      = 15
+    $max_keepalive_requests = 100
+    $fastcgi_lib_path       = '/var/lib/apache2/fastcgi'
+    $mime_support_package = 'mime-support'
+    $mime_types_config    = '/etc/mime.types'
+
+    #
+    # Passenger-specific settings
+    #
+
+    $passenger_conf_file         = 'passenger.conf'
+    $passenger_conf_package_file = undef
+
+    case $::operatingsystem {
+      'Ubuntu': {
+        case $::lsbdistrelease {
+          '12.04': {
+            $passenger_root         = '/usr'
+            $passenger_ruby         = '/usr/bin/ruby'
+            $passenger_default_ruby = undef
+          }
+          '14.04': {
+            $passenger_root         = '/usr/lib/ruby/vendor_ruby/phusion_passenger/locations.ini'
+            $passenger_ruby         = undef
+            $passenger_default_ruby = '/usr/bin/ruby'
+          }
+          default: {
+            # The following settings may or may not work on Ubuntu releases not
+            # supported by this module.
+            $passenger_root         = '/usr'
+            $passenger_ruby         = '/usr/bin/ruby'
+            $passenger_default_ruby = undef
+          }
+        }
+      }
+      'Debian': {
+        case $::lsbdistcodename {
+          'wheezy': {
+            $passenger_root         = '/usr'
+            $passenger_ruby         = '/usr/bin/ruby'
+            $passenger_default_ruby = undef
+          }
+          default: {
+            # The following settings may or may not work on Debian releases not
+            # supported by this module.
+            $passenger_root         = '/usr'
+            $passenger_ruby         = '/usr/bin/ruby'
+            $passenger_default_ruby = undef
+          }
+        }
+      }
+    }
+  } elsif $::osfamily == 'FreeBSD' {
+    $user             = 'www'
+    $group            = 'www'
+    $root_group       = 'wheel'
+    $apache_name      = 'apache22'
+    $service_name     = 'apache22'
+    $httpd_dir        = '/usr/local/etc/apache22'
+    $server_root      = '/usr/local'
+    $conf_dir         = $httpd_dir
+    $confd_dir        = "${httpd_dir}/Includes"
+    $mod_dir          = "${httpd_dir}/Modules"
+    $mod_enable_dir   = undef
+    $vhost_dir        = "${httpd_dir}/Vhosts"
+    $vhost_enable_dir = undef
+    $conf_file        = 'httpd.conf'
+    $ports_file       = "${conf_dir}/ports.conf"
+    $logroot          = '/var/log/apache22'
+    $lib_path         = '/usr/local/libexec/apache22'
+    $mpm_module       = 'prefork'
+    $dev_packages     = undef
+    $default_ssl_cert = '/usr/local/etc/apache22/server.crt'
+    $default_ssl_key  = '/usr/local/etc/apache22/server.key'
+    $ssl_certs_dir    = '/usr/local/etc/apache22'
+    $passenger_conf_file = 'passenger.conf'
+    $passenger_conf_package_file = undef
+    $passenger_root   = '/usr/local/lib/ruby/gems/1.9/gems/passenger-4.0.10'
+    $passenger_ruby   = '/usr/bin/ruby'
+    $passenger_default_ruby = undef
+    $suphp_addhandler = 'php5-script'
+    $suphp_engine     = 'off'
+    $suphp_configpath = undef
+    $mod_packages     = {
+      # NOTE: I list here only modules that are not included in www/apache22
+      # NOTE: 'passenger' needs to enable APACHE_SUPPORT in make config
+      # NOTE: 'php' needs to enable APACHE option in make config
+      # NOTE: 'dav_svn' needs to enable MOD_DAV_SVN make config
+      # NOTE: not sure where the shibboleth should come from
+      # NOTE: don't know where the shibboleth module should come from
+      'auth_kerb'  => 'www/mod_auth_kerb2',
+      'fcgid'      => 'www/mod_fcgid',
+      'passenger'  => 'www/rubygem-passenger',
+      'perl'       => 'www/mod_perl2',
+      'php5'       => 'lang/php5',
+      'proxy_html' => 'www/mod_proxy_html',
+      'python'     => 'www/mod_python3',
+      'wsgi'       => 'www/mod_wsgi',
+      'dav_svn'    => 'devel/subversion',
+      'xsendfile'  => 'www/mod_xsendfile',
+      'rpaf'       => 'www/mod_rpaf2'
+    }
+    $mod_libs         = {
+      'php5' => 'libphp5.so',
+    }
+    $conf_template        = 'apache/httpd.conf.erb'
+    $keepalive            = 'Off'
+    $keepalive_timeout    = 15
+    $max_keepalive_requests = 100
+    $fastcgi_lib_path     = undef # TODO: revisit
+    $mime_support_package = 'misc/mime-support'
+    $mime_types_config    = '/usr/local/etc/mime.types'
+  } else {
+    fail("Class['apache::params']: Unsupported osfamily: ${::osfamily}")
+  }
+}
diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/manifests/peruser/multiplexer.pp b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/manifests/peruser/multiplexer.pp
new file mode 100644
index 00000000000..9e57ac30b2e
--- /dev/null
+++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/manifests/peruser/multiplexer.pp
@@ -0,0 +1,17 @@
+define apache::peruser::multiplexer (
+  $user = $::apache::user,
+  $group = $::apache::group,
+  $file = undef,
+) {
+  if ! $file {
+    $filename = "${name}.conf"
+  } else {
+    $filename = $file
+  }
+  file { "${::apache::mod_dir}/peruser/multiplexers/${filename}":
+    ensure  => file,
+    content => "Multiplexer ${user} ${group}\n",
+    require => File["${::apache::mod_dir}/peruser/multiplexers"],
+    notify  => Service['httpd'],
+  }
+}
diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/manifests/peruser/processor.pp b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/manifests/peruser/processor.pp
new file mode 100644
index 00000000000..1d68934657e
--- /dev/null
+++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/manifests/peruser/processor.pp
@@ -0,0 +1,17 @@
+define apache::peruser::processor (
+  $user,
+  $group,
+  $file = undef,
+) {
+  if ! $file {
+    $filename = "${name}.conf"
+  } else {
+    $filename = $file
+  }
+  file { "${::apache::mod_dir}/peruser/processors/${filename}":
+    ensure  => file,
+    content => "Processor ${user} ${group}\n",
+    require => File["${::apache::mod_dir}/peruser/processors"],
+    notify  => Service['httpd'],
+  }
+}
diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/manifests/php.pp b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/manifests/php.pp
new file mode 100644
index 00000000000..9fa9c682e23
--- /dev/null
+++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/manifests/php.pp
@@ -0,0 +1,18 @@
+# Class: apache::php
+#
+# This class installs PHP for Apache
+#
+# Parameters:
+# - $php_package
+#
+# Actions:
+#   - Install Apache PHP package
+#
+# Requires:
+#
+# Sample Usage:
+#
+class apache::php {
+  warning('apache::php is deprecated; please use apache::mod::php')
+  include ::apache::mod::php
+}
diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/manifests/proxy.pp b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/manifests/proxy.pp
new file mode 100644
index 00000000000..050f36c278a
--- /dev/null
+++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/manifests/proxy.pp
@@ -0,0 +1,15 @@
+# Class: apache::proxy
+#
+# This class enabled the proxy module for Apache
+#
+# Actions:
+#   - Enables Apache Proxy module
+#
+# Requires:
+#
+# Sample Usage:
+#
+class apache::proxy {
+  warning('apache::proxy is deprecated; please use apache::mod::proxy')
+  include ::apache::mod::proxy
+}
diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/manifests/python.pp b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/manifests/python.pp
new file mode 100644
index 00000000000..723a753f82c
--- /dev/null
+++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/manifests/python.pp
@@ -0,0 +1,18 @@
+# Class: apache::python
+#
+# This class installs Python for Apache
+#
+# Parameters:
+# - $php_package
+#
+# Actions:
+#   - Install Apache Python package
+#
+# Requires:
+#
+# Sample Usage:
+#
+class apache::python {
+  warning('apache::python is deprecated; please use apache::mod::python')
+  include ::apache::mod::python
+}
diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/manifests/service.pp b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/manifests/service.pp
new file mode 100644
index 00000000000..0c1f7b96aa2
--- /dev/null
+++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/manifests/service.pp
@@ -0,0 +1,44 @@
+# Class: apache::service
+#
+# Manages the Apache daemon
+#
+# Parameters:
+#
+# Actions:
+#   - Manage Apache service
+#
+# Requires:
+#
+# Sample Usage:
+#
+#    sometype { 'foo':
+#      notify => Class['apache::service'],
+#    }
+#
+#
+class apache::service (
+  $service_name   = $::apache::params::service_name,
+  $service_enable = true,
+  $service_ensure = 'running',
+) {
+  # The base class must be included first because parameter defaults depend on it
+  if ! defined(Class['apache::params']) {
+    fail('You must include the apache::params class before using any apache defined resources')
+  }
+  validate_bool($service_enable)
+
+  case $service_ensure {
+    true, false, 'running', 'stopped': {
+      $_service_ensure = $service_ensure
+    }
+    default: {
+      $_service_ensure = undef
+    }
+  }
+
+  service { 'httpd':
+    ensure => $_service_ensure,
+    name   => $service_name,
+    enable => $service_enable,
+  }
+}
diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/manifests/ssl.pp b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/manifests/ssl.pp
new file mode 100644
index 00000000000..d0b36593d63
--- /dev/null
+++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/manifests/ssl.pp
@@ -0,0 +1,18 @@
+# Class: apache::ssl
+#
+# This class installs Apache SSL capabilities
+#
+# Parameters:
+# - The $ssl_package name from the apache::params class
+#
+# Actions:
+#   - Install Apache SSL capabilities
+#
+# Requires:
+#
+# Sample Usage:
+#
+class apache::ssl {
+  warning('apache::ssl is deprecated; please use apache::mod::ssl')
+  include ::apache::mod::ssl
+}
diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/manifests/version.pp b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/manifests/version.pp
new file mode 100644
index 00000000000..a8592d5e958
--- /dev/null
+++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/manifests/version.pp
@@ -0,0 +1,35 @@
+# Class: apache::version
+#
+# Try to automatically detect the version by OS
+#
+class apache::version {
+  # This will be 5 or 6 on RedHat, 6 or wheezy on Debian, 12 or quantal on Ubuntu, 3 on Amazon, etc.
+  $osr_array = split($::operatingsystemrelease,'[\/\.]')
+  $distrelease = $osr_array[0]
+  if ! $distrelease {
+    fail("Class['apache::params']: Unparsable \$::operatingsystemrelease: ${::operatingsystemrelease}")
+  }
+
+  case $::osfamily {
+    'RedHat': {
+      if ($::operatingsystem == 'Fedora' and $distrelease >= 18) or ($::operatingsystem != 'Fedora' and $distrelease >= 7) {
+        $default = '2.4'
+      } else {
+        $default = '2.2'
+      }
+    }
+    'Debian': {
+      if $::operatingsystem == 'Ubuntu' and $::operatingsystemrelease >= 13.10 {
+        $default = '2.4'
+      } else {
+        $default = '2.2'
+      }
+    }
+    'FreeBSD': {
+      $default = '2.2'
+    }
+    default: {
+      fail("Class['apache::version']: Unsupported osfamily: ${::osfamily}")
+    }
+  }
+}
diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/manifests/vhost.pp b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/manifests/vhost.pp
new file mode 100644
index 00000000000..40edad7e21d
--- /dev/null
+++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/manifests/vhost.pp
@@ -0,0 +1,560 @@
+# Definition: apache::vhost
+#
+# This class installs Apache Virtual Hosts
+#
+# Parameters:
+# - The $port to configure the host on
+# - The $docroot provides the DocumentRoot variable
+# - The $virtual_docroot provides VirtualDocumentationRoot variable
+# - The $serveradmin will specify an email address for Apache that it will
+#   display when it renders one of it's error pages
+# - The $ssl option is set true or false to enable SSL for this Virtual Host
+# - The $priority of the site
+# - The $servername is the primary name of the virtual host
+# - The $serveraliases of the site
+# - The $ip to configure the host on, defaulting to *
+# - The $options for the given vhost
+# - The $override for the given vhost (list of AllowOverride arguments)
+# - The $vhost_name for name based virtualhosting, defaulting to *
+# - The $logroot specifies the location of the virtual hosts logfiles, default
+#   to /var/log//
+# - The $log_level specifies the verbosity of the error log for this vhost. Not
+#   set by default for the vhost, instead the global server configuration default
+#   of 'warn' is used.
+# - The $access_log specifies if *_access.log directives should be configured.
+# - The $ensure specifies if vhost file is present or absent.
+# - The $headers is a list of Header statement strings as per http://httpd.apache.org/docs/2.2/mod/mod_headers.html#header
+# - The $request_headers is a list of RequestHeader statement strings as per http://httpd.apache.org/docs/2.2/mod/mod_headers.html#requestheader
+# - $aliases is a list of Alias hashes for mod_alias as per http://httpd.apache.org/docs/current/mod/mod_alias.html
+#   each statement is a hash in the form of { alias => '/alias', path => '/real/path/to/directory' }
+# - $directories is a lost of hashes for creating  statements as per http://httpd.apache.org/docs/2.2/mod/core.html#directory
+#   each statement is a hash in the form of { path => '/path/to/directory',  => }
+#   see README.md for list of supported directives.
+#
+# Actions:
+# - Install Apache Virtual Hosts
+#
+# Requires:
+# - The apache class
+#
+# Sample Usage:
+#
+#  # Simple vhost definition:
+#  apache::vhost { 'site.name.fqdn':
+#    port => '80',
+#    docroot => '/path/to/docroot',
+#  }
+#
+#  # Multiple Mod Rewrites:
+#  apache::vhost { 'site.name.fqdn':
+#    port => '80',
+#    docroot => '/path/to/docroot',
+#    rewrites => [
+#      {
+#        comment       => 'force www domain',
+#        rewrite_cond => ['%{HTTP_HOST} ^([a-z.]+)?example.com$ [NC]', '%{HTTP_HOST} !^www. [NC]'],
+#        rewrite_rule => ['.? http://www.%1example.com%{REQUEST_URI} [R=301,L]']
+#      },
+#      {
+#        comment       => 'prevent image hotlinking',
+#        rewrite_cond => ['%{HTTP_REFERER} !^$', '%{HTTP_REFERER} !^http://(www.)?example.com/ [NC]'],
+#        rewrite_rule => ['.(gif|jpg|png)$ - [F]']
+#      },
+#    ]
+#  }
+#
+#  # SSL vhost with non-SSL rewrite:
+#  apache::vhost { 'site.name.fqdn':
+#    port    => '443',
+#    ssl     => true,
+#    docroot => '/path/to/docroot',
+#  }
+#  apache::vhost { 'site.name.fqdn':
+#    port            => '80',
+#    docroot         => '/path/to/other_docroot',
+#    custom_fragment => template("${module_name}/my_fragment.erb"),
+#  }
+#
+define apache::vhost(
+    $docroot,
+    $virtual_docroot             = false,
+    $port                        = undef,
+    $ip                          = undef,
+    $ip_based                    = false,
+    $add_listen                  = true,
+    $docroot_owner               = 'root',
+    $docroot_group               = $::apache::params::root_group,
+    $docroot_mode                = undef,
+    $serveradmin                 = undef,
+    $ssl                         = false,
+    $ssl_cert                    = $::apache::default_ssl_cert,
+    $ssl_key                     = $::apache::default_ssl_key,
+    $ssl_chain                   = $::apache::default_ssl_chain,
+    $ssl_ca                      = $::apache::default_ssl_ca,
+    $ssl_crl_path                = $::apache::default_ssl_crl_path,
+    $ssl_crl                     = $::apache::default_ssl_crl,
+    $ssl_certs_dir               = $::apache::params::ssl_certs_dir,
+    $ssl_protocol                = undef,
+    $ssl_cipher                  = undef,
+    $ssl_honorcipherorder        = undef,
+    $ssl_verify_client           = undef,
+    $ssl_verify_depth            = undef,
+    $ssl_options                 = undef,
+    $ssl_proxyengine             = false,
+    $priority                    = undef,
+    $default_vhost               = false,
+    $servername                  = $name,
+    $serveraliases               = [],
+    $options                     = ['Indexes','FollowSymLinks','MultiViews'],
+    $override                    = ['None'],
+    $directoryindex              = '',
+    $vhost_name                  = '*',
+    $logroot                     = $::apache::logroot,
+    $log_level                   = undef,
+    $access_log                  = true,
+    $access_log_file             = undef,
+    $access_log_pipe             = undef,
+    $access_log_syslog           = undef,
+    $access_log_format           = undef,
+    $access_log_env_var          = undef,
+    $aliases                     = undef,
+    $directories                 = undef,
+    $error_log                   = true,
+    $error_log_file              = undef,
+    $error_log_pipe              = undef,
+    $error_log_syslog            = undef,
+    $error_documents             = [],
+    $fallbackresource            = undef,
+    $scriptalias                 = undef,
+    $scriptaliases               = [],
+    $proxy_dest                  = undef,
+    $proxy_pass                  = undef,
+    $suphp_addhandler            = $::apache::params::suphp_addhandler,
+    $suphp_engine                = $::apache::params::suphp_engine,
+    $suphp_configpath            = $::apache::params::suphp_configpath,
+    $php_admin_flags             = [],
+    $php_admin_values            = [],
+    $no_proxy_uris               = [],
+    $proxy_preserve_host         = false,
+    $redirect_source             = '/',
+    $redirect_dest               = undef,
+    $redirect_status             = undef,
+    $redirectmatch_status        = undef,
+    $redirectmatch_regexp        = undef,
+    $rack_base_uris              = undef,
+    $headers                     = undef,
+    $request_headers             = undef,
+    $rewrites                    = undef,
+    $rewrite_base                = undef,
+    $rewrite_rule                = undef,
+    $rewrite_cond                = undef,
+    $setenv                      = [],
+    $setenvif                    = [],
+    $block                       = [],
+    $ensure                      = 'present',
+    $wsgi_application_group      = undef,
+    $wsgi_daemon_process         = undef,
+    $wsgi_daemon_process_options = undef,
+    $wsgi_import_script          = undef,
+    $wsgi_import_script_options  = undef,
+    $wsgi_process_group          = undef,
+    $wsgi_script_aliases         = undef,
+    $wsgi_pass_authorization     = undef,
+    $custom_fragment             = undef,
+    $itk                         = undef,
+    $action                      = undef,
+    $fastcgi_server              = undef,
+    $fastcgi_socket              = undef,
+    $fastcgi_dir                 = undef,
+    $additional_includes         = [],
+    $apache_version              = $::apache::apache_version,
+    $suexec_user_group           = undef,
+  ) {
+  # The base class must be included first because it is used by parameter defaults
+  if ! defined(Class['apache']) {
+    fail('You must include the apache base class before using any apache defined resources')
+  }
+
+  $apache_name = $::apache::params::apache_name
+
+  validate_re($ensure, '^(present|absent)$',
+  "${ensure} is not supported for ensure.
+  Allowed values are 'present' and 'absent'.")
+  validate_re($suphp_engine, '^(on|off)$',
+  "${suphp_engine} is not supported for suphp_engine.
+  Allowed values are 'on' and 'off'.")
+  validate_bool($ip_based)
+  validate_bool($access_log)
+  validate_bool($error_log)
+  validate_bool($ssl)
+  validate_bool($default_vhost)
+  validate_bool($ssl_proxyengine)
+  if $rewrites {
+    validate_array($rewrites)
+    validate_hash($rewrites[0])
+  }
+
+  if $suexec_user_group {
+    validate_re($suexec_user_group, '^\w+ \w+$',
+    "${suexec_user_group} is not supported for suexec_user_group.  Must be 'user group'.")
+  }
+
+  # Deprecated backwards-compatibility
+  if $rewrite_base {
+    warning('Apache::Vhost: parameter rewrite_base is deprecated in favor of rewrites')
+  }
+  if $rewrite_rule {
+    warning('Apache::Vhost: parameter rewrite_rule is deprecated in favor of rewrites')
+  }
+  if $rewrite_cond {
+    warning('Apache::Vhost parameter rewrite_cond is deprecated in favor of rewrites')
+  }
+
+  if $wsgi_script_aliases {
+    validate_hash($wsgi_script_aliases)
+  }
+  if $wsgi_daemon_process_options {
+    validate_hash($wsgi_daemon_process_options)
+  }
+  if $wsgi_import_script_options {
+    validate_hash($wsgi_import_script_options)
+  }
+  if $itk {
+    validate_hash($itk)
+  }
+
+  if $log_level {
+    validate_re($log_level, '^(emerg|alert|crit|error|warn|notice|info|debug)$',
+    "Log level '${log_level}' is not one of the supported Apache HTTP Server log levels.")
+  }
+
+  if $access_log_file and $access_log_pipe {
+    fail("Apache::Vhost[${name}]: 'access_log_file' and 'access_log_pipe' cannot be defined at the same time")
+  }
+
+  if $error_log_file and $error_log_pipe {
+    fail("Apache::Vhost[${name}]: 'error_log_file' and 'error_log_pipe' cannot be defined at the same time")
+  }
+
+  if $fallbackresource {
+    validate_re($fallbackresource, '^/|disabled', 'Please make sure fallbackresource starts with a / (or is "disabled")')
+  }
+
+  if $ssl and $ensure == 'present' {
+    include ::apache::mod::ssl
+    # Required for the AddType lines.
+    include ::apache::mod::mime
+  }
+
+  if $virtual_docroot {
+    include ::apache::mod::vhost_alias
+  }
+
+  if $wsgi_daemon_process {
+    include ::apache::mod::wsgi
+  }
+
+  if $suexec_user_group {
+    include ::apache::mod::suexec
+  }
+
+  # This ensures that the docroot exists
+  # But enables it to be specified across multiple vhost resources
+  if ! defined(File[$docroot]) {
+    file { $docroot:
+      ensure  => directory,
+      owner   => $docroot_owner,
+      group   => $docroot_group,
+      mode    => $docroot_mode,
+      require => Package['httpd'],
+    }
+  }
+
+  # Same as above, but for logroot
+  if ! defined(File[$logroot]) {
+    file { $logroot:
+      ensure  => directory,
+      require => Package['httpd'],
+    }
+  }
+
+
+  # Is apache::mod::passenger enabled (or apache::mod['passenger'])
+  $passenger_enabled = defined(Apache::Mod['passenger'])
+
+  # Define log file names
+  if $access_log_file {
+    $access_log_destination = "${logroot}/${access_log_file}"
+  } elsif $access_log_pipe {
+    $access_log_destination = $access_log_pipe
+  } elsif $access_log_syslog {
+    $access_log_destination = $access_log_syslog
+  } else {
+    if $ssl {
+      $access_log_destination = "${logroot}/${name}_access_ssl.log"
+    } else {
+      $access_log_destination = "${logroot}/${name}_access.log"
+    }
+  }
+
+  if $error_log_file {
+    $error_log_destination = "${logroot}/${error_log_file}"
+  } elsif $error_log_pipe {
+    $error_log_destination = $error_log_pipe
+  } elsif $error_log_syslog {
+    $error_log_destination = $error_log_syslog
+  } else {
+    if $ssl {
+      $error_log_destination = "${logroot}/${name}_error_ssl.log"
+    } else {
+      $error_log_destination = "${logroot}/${name}_error.log"
+    }
+  }
+
+  # Set access log format
+  if $access_log_format {
+    $_access_log_format = "\"${access_log_format}\""
+  } else {
+    $_access_log_format = 'combined'
+  }
+
+  if $access_log_env_var {
+    $_access_log_env_var = "env=${access_log_env_var}"
+  }
+
+  if $ip {
+    if $port {
+      $listen_addr_port = "${ip}:${port}"
+      $nvh_addr_port = "${ip}:${port}"
+    } else {
+      $listen_addr_port = undef
+      $nvh_addr_port = $ip
+      if ! $servername and ! $ip_based {
+        fail("Apache::Vhost[${name}]: must pass 'ip' and/or 'port' parameters for name-based vhosts")
+      }
+    }
+  } else {
+    if $port {
+      $listen_addr_port = $port
+      $nvh_addr_port = "${vhost_name}:${port}"
+    } else {
+      $listen_addr_port = undef
+      $nvh_addr_port = $name
+      if ! $servername {
+        fail("Apache::Vhost[${name}]: must pass 'ip' and/or 'port' parameters, and/or 'servername' parameter")
+      }
+    }
+  }
+  if $add_listen {
+    if $ip and defined(Apache::Listen[$port]) {
+      fail("Apache::Vhost[${name}]: Mixing IP and non-IP Listen directives is not possible; check the add_listen parameter of the apache::vhost define to disable this")
+    }
+    if ! defined(Apache::Listen[$listen_addr_port]) and $listen_addr_port and $ensure == 'present' {
+      ::apache::listen { $listen_addr_port: }
+    }
+  }
+  if ! $ip_based {
+    if ! defined(Apache::Namevirtualhost[$nvh_addr_port]) and $ensure == 'present' and (versioncmp($apache_version, '2.4') < 0) {
+      ::apache::namevirtualhost { $nvh_addr_port: }
+    }
+  }
+
+  # Load mod_rewrite if needed and not yet loaded
+  if $rewrites or $rewrite_cond {
+    if ! defined(Class['apache::mod::rewrite']) {
+      include ::apache::mod::rewrite
+    }
+  }
+
+  # Load mod_alias if needed and not yet loaded
+  if ($scriptalias or $scriptaliases != []) or ($redirect_source and $redirect_dest) {
+    if ! defined(Class['apache::mod::alias']) {
+      include ::apache::mod::alias
+    }
+  }
+
+  # Load mod_proxy if needed and not yet loaded
+  if ($proxy_dest or $proxy_pass) {
+    if ! defined(Class['apache::mod::proxy']) {
+      include ::apache::mod::proxy
+    }
+    if ! defined(Class['apache::mod::proxy_http']) {
+      include ::apache::mod::proxy_http
+    }
+  }
+
+  # Load mod_passenger if needed and not yet loaded
+  if $rack_base_uris {
+    if ! defined(Class['apache::mod::passenger']) {
+      include ::apache::mod::passenger
+    }
+  }
+
+  # Load mod_fastci if needed and not yet loaded
+  if $fastcgi_server and $fastcgi_socket {
+    if ! defined(Class['apache::mod::fastcgi']) {
+      include ::apache::mod::fastcgi
+    }
+  }
+
+  # Configure the defaultness of a vhost
+  if $priority {
+    $priority_real = $priority
+  } elsif $default_vhost {
+    $priority_real = '10'
+  } else {
+    $priority_real = '25'
+  }
+
+  # Check if mod_headers is required to process $headers/$request_headers
+  if $headers or $request_headers {
+    if ! defined(Class['apache::mod::headers']) {
+      include ::apache::mod::headers
+    }
+  }
+
+  ## Apache include does not always work with spaces in the filename
+  $filename = regsubst($name, ' ', '_', 'G')
+
+  ## Create a default directory list if none defined
+  if $directories {
+    if !is_hash($directories) and !(is_array($directories) and is_hash($directories[0])) {
+      fail("Apache::Vhost[${name}]: 'directories' must be either a Hash or an Array of Hashes")
+    }
+    $_directories = $directories
+  } else {
+    $_directory = {
+      provider       => 'directory',
+      path           => $docroot,
+      options        => $options,
+      allow_override => $override,
+      directoryindex => $directoryindex,
+    }
+
+    if versioncmp($apache_version, '2.4') >= 0 {
+      $_directory_version = {
+        require => 'all granted',
+      }
+    } else {
+      $_directory_version = {
+        order => 'allow,deny',
+        allow => 'from all',
+      }
+    }
+
+    $_directories = [ merge($_directory, $_directory_version) ]
+  }
+
+  # Template uses:
+  # - $nvh_addr_port
+  # - $servername
+  # - $serveradmin
+  # - $docroot
+  # - $virtual_docroot
+  # - $options
+  # - $override
+  # - $logroot
+  # - $name
+  # - $aliases
+  # - $_directories
+  # - $log_level
+  # - $access_log
+  # - $access_log_destination
+  # - $_access_log_format
+  # - $_access_log_env_var
+  # - $error_log
+  # - $error_log_destination
+  # - $error_documents
+  # - $fallbackresource
+  # - $custom_fragment
+  # - $additional_includes
+  # block fragment:
+  #   - $block
+  # directories fragment:
+  #   - $passenger_enabled
+  #   - $php_admin_flags
+  #   - $php_admin_values
+  #   - $directories (a list of key-value hashes is expected)
+  # fastcgi fragment:
+  #   - $fastcgi_server
+  #   - $fastcgi_socket
+  #   - $fastcgi_dir
+  # proxy fragment:
+  #   - $proxy_dest
+  #   - $no_proxy_uris
+  #   - $proxy_preserve_host (true to set ProxyPreserveHost to on and false to off
+  # rack fragment:
+  #   - $rack_base_uris
+  # redirect fragment:
+  #   - $redirect_source
+  #   - $redirect_dest
+  #   - $redirect_status
+  # header fragment
+  #   - $headers
+  # requestheader fragment:
+  #   - $request_headers
+  # rewrite fragment:
+  #   - $rewrites
+  # scriptalias fragment:
+  #   - $scriptalias
+  #   - $scriptaliases
+  #   - $ssl
+  # serveralias fragment:
+  #   - $serveraliases
+  # setenv fragment:
+  #   - $setenv
+  #   - $setenvif
+  # ssl fragment:
+  #   - $ssl
+  #   - $ssl_cert
+  #   - $ssl_key
+  #   - $ssl_chain
+  #   - $ssl_certs_dir
+  #   - $ssl_ca
+  #   - $ssl_crl
+  #   - $ssl_crl_path
+  #   - $ssl_verify_client
+  #   - $ssl_verify_depth
+  #   - $ssl_options
+  # suphp fragment:
+  #   - $suphp_addhandler
+  #   - $suphp_engine
+  #   - $suphp_configpath
+  # wsgi fragment:
+  #   - $wsgi_application_group
+  #   - $wsgi_daemon_process
+  #   - $wsgi_import_script
+  #   - $wsgi_process_group
+  #   - $wsgi_script_aliases
+  file { "${priority_real}-${filename}.conf":
+    ensure  => $ensure,
+    path    => "${::apache::vhost_dir}/${priority_real}-${filename}.conf",
+    content => template('apache/vhost.conf.erb'),
+    owner   => 'root',
+    group   => $::apache::params::root_group,
+    mode    => '0644',
+    require => [
+      Package['httpd'],
+      File[$docroot],
+      File[$logroot],
+    ],
+    notify  => Service['httpd'],
+  }
+  if $::osfamily == 'Debian' {
+    $vhost_enable_dir = $::apache::vhost_enable_dir
+    $vhost_symlink_ensure = $ensure ? {
+      present => link,
+      default => $ensure,
+    }
+    file{ "${priority_real}-${filename}.conf symlink":
+      ensure  => $vhost_symlink_ensure,
+      path    => "${vhost_enable_dir}/${priority_real}-${filename}.conf",
+      target  => "${::apache::vhost_dir}/${priority_real}-${filename}.conf",
+      owner   => 'root',
+      group   => $::apache::params::root_group,
+      mode    => '0644',
+      require => File["${priority_real}-${filename}.conf"],
+      notify  => Service['httpd'],
+    }
+  }
+}
diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/metadata.json b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/metadata.json
new file mode 100644
index 00000000000..92663a43c49
--- /dev/null
+++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/metadata.json
@@ -0,0 +1,65 @@
+{
+    "name": "puppetlabs-apache",
+    "version": "1.0.1",
+    "source": "https://github.com/puppetlabs/puppetlabs-apache",
+    "author": "Puppet Labs",
+    "license": "Apache-2.0",
+    "project_page": "https://github.com/puppetlabs/puppetlabs-apache",
+    "summary": "Puppet module for Apache",
+    "operatingsystem_support": [
+      {
+        "operatingsystem": "RedHat",
+        "operatingsystemrelease": [
+          "5",
+          "6",
+          "7"
+        ]
+      },
+      {
+        "operatingsystem": "CentOS",
+        "operatingsystemrelease": [
+          "5",
+          "6",
+          "7"
+
+        ]
+      },
+      {
+        "operatingsystem": "OracleLinux",
+        "operatingsystemrelease": [
+          "5",
+          "6",
+          "7"
+
+        ]
+      },
+      {
+        "operatingsystem": "Scientific",
+        "operatingsystemrelease": [
+          "5",
+          "6",
+          "7"
+
+        ]
+      },
+      {
+        "operatingsystem": "Debian",
+        "operatingsystemrelease": [
+          "6",
+          "7"
+        ]
+      },
+      {
+        "operatingsystem": "Ubuntu",
+        "operatingsystemrelease": [
+          "10.04",
+          "12.04",
+          "14.04"
+        ]
+      }
+    ],
+    "requirements": [
+      { "name": "puppet", "version_requirement": "3.x" }
+    ],
+    "dependencies": []
+}
diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/spec/acceptance/apache_parameters_spec.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/spec/acceptance/apache_parameters_spec.rb
new file mode 100644
index 00000000000..4fa3bf6ec6b
--- /dev/null
+++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/spec/acceptance/apache_parameters_spec.rb
@@ -0,0 +1,446 @@
+require 'spec_helper_acceptance'
+require_relative './version.rb'
+
+describe 'apache parameters', :unless => UNSUPPORTED_PLATFORMS.include?(fact('osfamily')) do
+
+  # Currently this test only does something on FreeBSD.
+  describe 'default_confd_files => false' do
+    it 'doesnt do anything' do
+      pp = "class { 'apache': default_confd_files => false }"
+      apply_manifest(pp, :catch_failures => true)
+    end
+
+    if fact('osfamily') == 'FreeBSD'
+      describe file("#{confd_dir}/no-accf.conf.erb") do
+        it { should_not be_file }
+      end
+    end
+  end
+  describe 'default_confd_files => true' do
+    it 'copies conf.d files' do
+      pp = "class { 'apache': default_confd_files => true }"
+      apply_manifest(pp, :catch_failures => true)
+    end
+
+    if fact('osfamily') == 'FreeBSD'
+      describe file("#{$confd_dir}/no-accf.conf.erb") do
+        it { should be_file }
+      end
+    end
+  end
+
+  describe 'when set adds a listen statement' do
+    it 'applys cleanly' do
+      pp = "class { 'apache': ip => '10.1.1.1', service_ensure => stopped }"
+      apply_manifest(pp, :catch_failures => true)
+    end
+
+    describe file($ports_file) do
+      it { should be_file }
+      it { should contain 'Listen 10.1.1.1' }
+    end
+  end
+
+  describe 'service tests => true' do
+    it 'starts the service' do
+      pp = <<-EOS
+        class { 'apache':
+          service_enable => true,
+          service_ensure => running,
+        }
+      EOS
+      apply_manifest(pp, :catch_failures => true)
+    end
+
+    describe service($service_name) do
+      it { should be_running }
+      it { should be_enabled }
+    end
+  end
+
+  describe 'service tests => false' do
+    it 'stops the service' do
+      pp = <<-EOS
+        class { 'apache':
+          service_enable => false,
+          service_ensure => stopped,
+        }
+      EOS
+      apply_manifest(pp, :catch_failures => true)
+    end
+
+    describe service($service_name) do
+      it { should_not be_running }
+      it { should_not be_enabled }
+    end
+  end
+
+  describe 'purge parameters => false' do
+    it 'applies cleanly' do
+      pp = <<-EOS
+        class { 'apache':
+          purge_configs => false,
+          purge_vdir    => false,
+        }
+      EOS
+      shell("touch #{$confd_dir}/test.conf")
+      apply_manifest(pp, :catch_failures => true)
+    end
+
+    # Ensure the file didn't disappear.
+    describe file("#{$confd_dir}/test.conf") do
+      it { should be_file }
+    end
+  end
+
+  if fact('osfamily') != 'Debian'
+    describe 'purge parameters => true' do
+      it 'applies cleanly' do
+        pp = <<-EOS
+          class { 'apache':
+            purge_configs => true,
+            purge_vdir    => true,
+          }
+        EOS
+        shell("touch #{$confd_dir}/test.conf")
+        apply_manifest(pp, :catch_failures => true)
+      end
+
+      # File should be gone
+      describe file("#{$confd_dir}/test.conf") do
+        it { should_not be_file }
+      end
+    end
+  end
+
+  describe 'serveradmin' do
+    it 'applies cleanly' do
+      pp = "class { 'apache': serveradmin => 'test@example.com' }"
+      apply_manifest(pp, :catch_failures => true)
+    end
+
+    describe file($vhost) do
+      it { should be_file }
+      it { should contain 'ServerAdmin test@example.com' }
+    end
+  end
+
+  describe 'sendfile' do
+    describe 'setup' do
+      it 'applies cleanly' do
+        pp = "class { 'apache': sendfile => 'On' }"
+        apply_manifest(pp, :catch_failures => true)
+      end
+    end
+
+    describe file($conf_file) do
+      it { should be_file }
+      it { should contain 'EnableSendfile On' }
+    end
+
+    describe 'setup' do
+      it 'applies cleanly' do
+        pp = "class { 'apache': sendfile => 'Off' }"
+        apply_manifest(pp, :catch_failures => true)
+      end
+    end
+
+    describe file($conf_file) do
+      it { should be_file }
+      it { should contain 'Sendfile Off' }
+    end
+  end
+
+  describe 'error_documents' do
+    describe 'setup' do
+      it 'applies cleanly' do
+        pp = "class { 'apache': error_documents => true }"
+        apply_manifest(pp, :catch_failures => true)
+      end
+    end
+
+    describe file($conf_file) do
+      it { should be_file }
+      it { should contain 'Alias /error/' }
+    end
+  end
+
+  describe 'timeout' do
+    describe 'setup' do
+      it 'applies cleanly' do
+        pp = "class { 'apache': timeout => '1234' }"
+        apply_manifest(pp, :catch_failures => true)
+      end
+    end
+
+    describe file($conf_file) do
+      it { should be_file }
+      it { should contain 'Timeout 1234' }
+    end
+  end
+
+  describe 'httpd_dir' do
+    describe 'setup' do
+      it 'applies cleanly' do
+        pp = <<-EOS
+          class { 'apache': httpd_dir => '/tmp', service_ensure => stopped }
+          include 'apache::mod::mime'
+        EOS
+        apply_manifest(pp, :catch_failures => true)
+      end
+    end
+
+    describe file("#{$confd_dir}/mime.conf") do
+      it { should be_file }
+      it { should contain 'AddLanguage eo .eo' }
+    end
+  end
+
+  describe 'server_root' do
+    describe 'setup' do
+      it 'applies cleanly' do
+        pp = "class { 'apache': server_root => '/tmp/root', service_ensure => stopped }"
+        apply_manifest(pp, :catch_failures => true)
+      end
+    end
+
+    describe file($conf_file) do
+      it { should be_file }
+      it { should contain 'ServerRoot "/tmp/root"' }
+    end
+  end
+
+  describe 'confd_dir' do
+    describe 'setup' do
+      it 'applies cleanly' do
+        pp = "class { 'apache': confd_dir => '/tmp/root', service_ensure => stopped }"
+        apply_manifest(pp, :catch_failures => true)
+      end
+    end
+
+    if $apache_version == '2.4'
+      describe file($conf_file) do
+        it { should be_file }
+        it { should contain 'IncludeOptional "/tmp/root/*.conf"' }
+      end
+    else
+      describe file($conf_file) do
+        it { should be_file }
+        it { should contain 'Include "/tmp/root/*.conf"' }
+      end
+    end
+  end
+
+  describe 'conf_template' do
+    describe 'setup' do
+      it 'applies cleanly' do
+        pp = "class { 'apache': conf_template => 'another/test.conf.erb', service_ensure => stopped }"
+        shell("mkdir -p #{default['distmoduledir']}/another/templates")
+        shell("echo 'testcontent' >> #{default['distmoduledir']}/another/templates/test.conf.erb")
+        apply_manifest(pp, :catch_failures => true)
+      end
+    end
+
+    describe file($conf_file) do
+      it { should be_file }
+      it { should contain 'testcontent' }
+    end
+  end
+
+  describe 'servername' do
+    describe 'setup' do
+      it 'applies cleanly' do
+        pp = "class { 'apache': servername => 'test.server', service_ensure => stopped }"
+        apply_manifest(pp, :catch_failures => true)
+      end
+    end
+
+    describe file($conf_file) do
+      it { should be_file }
+      it { should contain 'ServerName "test.server"' }
+    end
+  end
+
+  describe 'user' do
+    describe 'setup' do
+      it 'applies cleanly' do
+        pp = <<-EOS
+          class { 'apache':
+            manage_user  => true,
+            manage_group => true,
+            user         => 'testweb',
+            group        => 'testweb',
+          }
+        EOS
+        apply_manifest(pp, :catch_failures => true)
+      end
+    end
+
+    describe user('testweb') do
+      it { should exist }
+      it { should belong_to_group 'testweb' }
+    end
+
+    describe group('testweb') do
+      it { should exist }
+    end
+  end
+
+  describe 'logformats' do
+    describe 'setup' do
+      it 'applies cleanly' do
+        pp = <<-EOS
+          class { 'apache':
+            log_formats => {
+              'vhost_common'   => '%v %h %l %u %t \\\"%r\\\" %>s %b',
+              'vhost_combined' => '%v %h %l %u %t \\\"%r\\\" %>s %b \\\"%{Referer}i\\\" \\\"%{User-agent}i\\\"',
+            }
+          }
+        EOS
+        apply_manifest(pp, :catch_failures => true)
+      end
+    end
+
+    describe file($conf_file) do
+      it { should be_file }
+      it { should contain 'LogFormat "%v %h %l %u %t \"%r\" %>s %b" vhost_common' }
+      it { should contain 'LogFormat "%v %h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-agent}i\"" vhost_combined' }
+    end
+  end
+
+
+  describe 'keepalive' do
+    describe 'setup' do
+      it 'applies cleanly' do
+        pp = "class { 'apache': keepalive => 'On', keepalive_timeout => '30', max_keepalive_requests => '200' }"
+        apply_manifest(pp, :catch_failures => true)
+      end
+    end
+
+    describe file($conf_file) do
+      it { should be_file }
+      it { should contain 'KeepAlive On' }
+      it { should contain 'KeepAliveTimeout 30' }
+      it { should contain 'MaxKeepAliveRequests 200' }
+    end
+  end
+
+  describe 'logging' do
+    describe 'setup' do
+      it 'applies cleanly' do
+        pp = <<-EOS
+          if $::osfamily == 'RedHat' and $::selinux == 'true' {
+            $semanage_package = $::operatingsystemmajrelease ? {
+              '5'       => 'policycoreutils',
+              'default' => 'policycoreutils-python',
+            }
+
+            package { $semanage_package: ensure => installed }
+            exec { 'set_apache_defaults':
+              command => 'semanage fcontext -a -t httpd_log_t "/apache_spec(/.*)?"',
+              path    => '/bin:/usr/bin/:/sbin:/usr/sbin',
+              require => Package[$semanage_package],
+            }
+            exec { 'restorecon_apache':
+              command => 'restorecon -Rv /apache_spec',
+              path    => '/bin:/usr/bin/:/sbin:/usr/sbin',
+              before  => Service['httpd'],
+              require => Class['apache'],
+            }
+          }
+          file { '/apache_spec': ensure => directory, }
+          class { 'apache': logroot => '/apache_spec' }
+        EOS
+        apply_manifest(pp, :catch_failures => true)
+      end
+    end
+
+    describe file("/apache_spec/#{$error_log}") do
+      it { should be_file }
+    end
+  end
+
+  describe 'ports_file' do
+    it 'applys cleanly' do
+      pp = <<-EOS
+        file { '/apache_spec': ensure => directory, }
+        class { 'apache':
+          ports_file     => '/apache_spec/ports_file',
+          ip             => '10.1.1.1',
+          service_ensure => stopped
+        }
+      EOS
+      apply_manifest(pp, :catch_failures => true)
+    end
+
+    describe file('/apache_spec/ports_file') do
+      it { should be_file }
+      it { should contain 'Listen 10.1.1.1' }
+    end
+  end
+
+  describe 'server_tokens' do
+    it 'applys cleanly' do
+      pp = <<-EOS
+        class { 'apache':
+          server_tokens  => 'Minor',
+        }
+      EOS
+      apply_manifest(pp, :catch_failures => true)
+    end
+
+    describe file($conf_file) do
+      it { should be_file }
+      it { should contain 'ServerTokens Minor' }
+    end
+  end
+
+  describe 'server_signature' do
+    it 'applys cleanly' do
+      pp = <<-EOS
+        class { 'apache':
+          server_signature  => 'testsig',
+          service_ensure    => stopped,
+        }
+      EOS
+      apply_manifest(pp, :catch_failures => true)
+    end
+
+    describe file($conf_file) do
+      it { should be_file }
+      it { should contain 'ServerSignature testsig' }
+    end
+  end
+
+  describe 'trace_enable' do
+    it 'applys cleanly' do
+      pp = <<-EOS
+        class { 'apache':
+          trace_enable  => 'Off',
+        }
+      EOS
+      apply_manifest(pp, :catch_failures => true)
+    end
+
+    describe file($conf_file) do
+      it { should be_file }
+      it { should contain 'TraceEnable Off' }
+    end
+  end
+
+  describe 'package_ensure' do
+    it 'applys cleanly' do
+      pp = <<-EOS
+        class { 'apache':
+          package_ensure  => present,
+        }
+      EOS
+      apply_manifest(pp, :catch_failures => true)
+    end
+
+    describe package($package_name) do
+      it { should be_installed }
+    end
+  end
+
+end
diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/spec/acceptance/apache_ssl_spec.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/spec/acceptance/apache_ssl_spec.rb
new file mode 100644
index 00000000000..649c02d8412
--- /dev/null
+++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/spec/acceptance/apache_ssl_spec.rb
@@ -0,0 +1,87 @@
+require 'spec_helper_acceptance'
+
+case fact('osfamily')
+when 'RedHat'
+  vhostd = '/etc/httpd/conf.d'
+when 'Debian'
+  vhostd = '/etc/apache2/sites-available'
+end
+
+describe 'apache ssl', :unless => UNSUPPORTED_PLATFORMS.include?(fact('osfamily')) do
+
+  describe 'ssl parameters' do
+    it 'runs without error' do
+      pp = <<-EOS
+        class { 'apache':
+          service_ensure       => stopped,
+          default_ssl_vhost    => true,
+          default_ssl_cert     => '/tmp/ssl_cert',
+          default_ssl_key      => '/tmp/ssl_key',
+          default_ssl_chain    => '/tmp/ssl_chain',
+          default_ssl_ca       => '/tmp/ssl_ca',
+          default_ssl_crl_path => '/tmp/ssl_crl_path',
+          default_ssl_crl      => '/tmp/ssl_crl',
+        }
+      EOS
+      apply_manifest(pp, :catch_failures => true)
+    end
+
+    describe file("#{vhostd}/15-default-ssl.conf") do
+      it { should be_file }
+      it { should contain 'SSLCertificateFile      "/tmp/ssl_cert"' }
+      it { should contain 'SSLCertificateKeyFile   "/tmp/ssl_key"' }
+      it { should contain 'SSLCertificateChainFile "/tmp/ssl_chain"' }
+      it { should contain 'SSLCACertificateFile    "/tmp/ssl_ca"' }
+      it { should contain 'SSLCARevocationPath     "/tmp/ssl_crl_path"' }
+      it { should contain 'SSLCARevocationFile     "/tmp/ssl_crl"' }
+    end
+  end
+
+  describe 'vhost ssl parameters' do
+    it 'runs without error' do
+      pp = <<-EOS
+        class { 'apache':
+          service_ensure       => stopped,
+        }
+
+        apache::vhost { 'test_ssl':
+          docroot              => '/tmp/test',
+          ssl                  => true,
+          ssl_cert             => '/tmp/ssl_cert',
+          ssl_key              => '/tmp/ssl_key',
+          ssl_chain            => '/tmp/ssl_chain',
+          ssl_ca               => '/tmp/ssl_ca',
+          ssl_crl_path         => '/tmp/ssl_crl_path',
+          ssl_crl              => '/tmp/ssl_crl',
+          ssl_certs_dir        => '/tmp',
+          ssl_protocol         => 'test',
+          ssl_cipher           => 'test',
+          ssl_honorcipherorder => 'test',
+          ssl_verify_client    => 'test',
+          ssl_verify_depth     => 'test',
+          ssl_options          => ['test', 'test1'],
+          ssl_proxyengine      => true,
+        }
+      EOS
+      apply_manifest(pp, :catch_failures => true)
+    end
+
+    describe file("#{vhostd}/25-test_ssl.conf") do
+      it { should be_file }
+      it { should contain 'SSLCertificateFile      "/tmp/ssl_cert"' }
+      it { should contain 'SSLCertificateKeyFile   "/tmp/ssl_key"' }
+      it { should contain 'SSLCertificateChainFile "/tmp/ssl_chain"' }
+      it { should contain 'SSLCACertificateFile    "/tmp/ssl_ca"' }
+      it { should contain 'SSLCARevocationPath     "/tmp/ssl_crl_path"' }
+      it { should contain 'SSLCARevocationFile     "/tmp/ssl_crl"' }
+      it { should contain 'SSLProxyEngine On' }
+      it { should contain 'SSLProtocol             test' }
+      it { should contain 'SSLCipherSuite          test' }
+      it { should contain 'SSLHonorCipherOrder     test' }
+      it { should contain 'SSLVerifyClient         test' }
+      it { should contain 'SSLVerifyDepth          test' }
+      it { should contain 'SSLOptions test test1' }
+    end
+  end
+
+end
diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/spec/acceptance/basic_spec.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/spec/acceptance/basic_spec.rb
new file mode 100644
index 00000000000..6c2b3f462fc
--- /dev/null
+++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/spec/acceptance/basic_spec.rb
@@ -0,0 +1,12 @@
+require 'spec_helper_acceptance'
+
+describe 'disable selinux:', :unless => UNSUPPORTED_PLATFORMS.include?(fact('osfamily')) do
+  it "because otherwise apache won't work" do
+    apply_manifest(%{
+      exec { "setenforce 0":
+        path   => "/bin:/sbin:/usr/bin:/usr/sbin",
+        onlyif => "which setenforce && getenforce | grep Enforcing",
+      }
+    }, :catch_failures => true)
+  end
+end
diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/spec/acceptance/class_spec.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/spec/acceptance/class_spec.rb
new file mode 100644
index 00000000000..830e3ed5b6c
--- /dev/null
+++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/spec/acceptance/class_spec.rb
@@ -0,0 +1,78 @@
+require 'spec_helper_acceptance'
+
+describe 'apache class', :unless => UNSUPPORTED_PLATFORMS.include?(fact('osfamily')) do
+  case fact('osfamily')
+  when 'RedHat'
+    package_name = 'httpd'
+    service_name = 'httpd'
+  when 'Debian'
+    package_name = 'apache2'
+    service_name = 'apache2'
+  when 'FreeBSD'
+    package_name = 'apache22'
+    service_name = 'apache22'
+  end
+
+  context 'default parameters' do
+    it 'should work with no errors' do
+      pp = <<-EOS
+      class { 'apache': }
+      EOS
+
+      # Run it twice and test for idempotency
+      apply_manifest(pp, :catch_failures => true)
+      expect(apply_manifest(pp, :catch_failures => true).exit_code).to be_zero
+    end
+
+    describe package(package_name) do
+      it { should be_installed }
+    end
+
+    describe service(service_name) do
+      it { should be_enabled }
+      it { should be_running }
+    end
+  end
+
+  context 'custom site/mod dir parameters' do
+    # Using puppet_apply as a helper
+    it 'should work with no errors' do
+      pp = <<-EOS
+      if $::osfamily == 'RedHat' and $::selinux == 'true' {
+        $semanage_package = $::operatingsystemmajrelease ? {
+          '5'       => 'policycoreutils',
+          'default' => 'policycoreutils-python',
+        }
+
+        package { $semanage_package: ensure => installed }
+        exec { 'set_apache_defaults':
+          command => 'semanage fcontext -a -t httpd_sys_content_t "/apache_spec(/.*)?"',
+          path    => '/bin:/usr/bin/:/sbin:/usr/sbin',
+          require => Package[$semanage_package],
+        }
+        exec { 'restorecon_apache':
+          command => 'restorecon -Rv /apache_spec',
+          path    => '/bin:/usr/bin/:/sbin:/usr/sbin',
+          before  => Service['httpd'],
+          require => Class['apache'],
+        }
+      }
+      file { '/apache_spec': ensure => directory, }
+      file { '/apache_spec/apache_custom': ensure => directory, }
+      class { 'apache':
+        mod_dir   => '/apache_spec/apache_custom/mods',
+        vhost_dir => '/apache_spec/apache_custom/vhosts',
+      }
+      EOS
+
+      # Run it twice and test for idempotency
+      apply_manifest(pp, :catch_failures => true)
+      apply_manifest(pp, :catch_changes => true)
+    end
+
+    describe service(service_name) do
+      it { should be_enabled }
+      it { should be_running }
+    end
+  end
+end
diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/spec/acceptance/default_mods_spec.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/spec/acceptance/default_mods_spec.rb
new file mode 100644
index 00000000000..c7f87556051
--- /dev/null
+++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/spec/acceptance/default_mods_spec.rb
@@ -0,0 +1,120 @@
+require 'spec_helper_acceptance'
+
+case fact('osfamily')
+when 'RedHat'
+  mod_dir     = '/etc/httpd/conf.d'
+  servicename = 'httpd'
+when 'Debian'
+  mod_dir     = '/etc/apache2/mods-available'
+  servicename = 'apache2'
+when 'FreeBSD'
+  mod_dir     = '/usr/local/etc/apache22/Modules'
+  servicename = 'apache22'
+end
+
+describe 'apache::default_mods class', :unless => UNSUPPORTED_PLATFORMS.include?(fact('osfamily')) do
+  describe 'no default mods' do
+    # Using puppet_apply as a helper
+    it 'should apply with no errors' do
+      pp = <<-EOS
+        class { 'apache':
+          default_mods => false,
+        }
+      EOS
+
+      # Run it twice and test for idempotency
+      apply_manifest(pp, :catch_failures => true)
+      expect(apply_manifest(pp, :catch_failures => true).exit_code).to be_zero
+    end
+
+    describe service(servicename) do
+      it { should be_running }
+    end
+  end
+
+  describe 'no default mods and failing' do
+    # Using puppet_apply as a helper
+    it 'should apply with errors' do
+      pp = <<-EOS
+        class { 'apache':
+          default_mods => false,
+        }
+        apache::vhost { 'defaults.example.com':
+          docroot => '/var/www/defaults',
+          aliases => {
+            alias => '/css',
+            path  => '/var/www/css',
+          },
+          setenv  => 'TEST1 one',
+        }
+      EOS
+
+      apply_manifest(pp, { :expect_failures => true })
+    end
+
+    # Are these the same?
+    describe service(servicename) do
+      it { should_not be_running }
+    end
+    describe "service #{servicename}" do
+      it 'should not be running' do
+        shell("pidof #{servicename}", {:acceptable_exit_codes => 1})
+      end
+    end
+  end
+
+  describe 'alternative default mods' do
+    # Using puppet_apply as a helper
+    it 'should apply with no errors' do
+      pp = <<-EOS
+        class { 'apache':
+          default_mods => [
+            'info',
+            'alias',
+            'mime',
+            'env',
+            'expires',
+          ],
+        }
+        apache::vhost { 'defaults.example.com':
+          docroot => '/var/www/defaults',
+          aliases => {
+            alias => '/css',
+            path  => '/var/www/css',
+          },
+          setenv  => 'TEST1 one',
+        }
+      EOS
+
+      apply_manifest(pp, :catch_failures => true)
+      shell('sleep 10')
+      expect(apply_manifest(pp, :catch_failures => true).exit_code).to be_zero
+    end
+
+    describe service(servicename) do
+      it { should be_running }
+    end
+  end
+
+  describe 'change loadfile name' do
+    it 'should apply with no errors' do
+      pp = <<-EOS
+        class { 'apache': default_mods => false }
+        ::apache::mod { 'auth_basic': 
+          loadfile_name => 'zz_auth_basic.load',
+        }
+      EOS
+      # Run it twice and test for idempotency
+      apply_manifest(pp, :catch_failures => true)
+      expect(apply_manifest(pp, :catch_failures => true).exit_code).to be_zero
+    end
+
+    describe service(servicename) do
+      it { should be_running }
+    end
+
+    describe file("#{mod_dir}/zz_auth_basic.load") do
+      it { should be_file }
+    end
+  end
+end
diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/spec/acceptance/itk_spec.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/spec/acceptance/itk_spec.rb
new file mode 100644
index 00000000000..86fc2c01ce5
--- /dev/null
+++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/spec/acceptance/itk_spec.rb
@@ -0,0 +1,33 @@
+require 'spec_helper_acceptance'
+
+case fact('osfamily')
+when 'Debian'
+  service_name = 'apache2'
+when 'FreeBSD'
+  service_name = 'apache22'
+else
+  # Not implemented yet
+  service_name = :skip
+end
+
+describe 'apache::mod::itk class', :unless => UNSUPPORTED_PLATFORMS.include?(fact('osfamily')) or service_name.equal? :skip do
+  describe 'running puppet code' do
+    # Using puppet_apply as a helper
+    it 'should work with no errors' do
+      pp = <<-EOS
+          class { 'apache':
+            mpm_module => 'itk',
+          }
+      EOS
+
+      # Run it twice and test for idempotency
+      apply_manifest(pp, :catch_failures => true)
+      expect(apply_manifest(pp, :catch_failures => true).exit_code).to be_zero
+    end
+  end
+
+  describe service(service_name) do
+    it { should be_running }
+    it { should be_enabled }
+  end
+end
diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/spec/acceptance/mod_dav_svn_spec.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/spec/acceptance/mod_dav_svn_spec.rb
new file mode 100644
index 00000000000..412b794540b
--- /dev/null
+++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/spec/acceptance/mod_dav_svn_spec.rb
@@ -0,0 +1,55 @@
+require 'spec_helper_acceptance'
+
+describe 'apache::mod::dav_svn class' do
+  case fact('osfamily')
+  when 'Debian'
+    mod_dir      = '/etc/apache2/mods-available'
+    service_name = 'apache2'
+  when 'RedHat'
+    mod_dir      = '/etc/httpd/conf.d'
+    service_name = 'httpd'
+  when 'FreeBSD'
+    mod_dir      = '/usr/local/etc/apache22/Modules'
+    service_name = 'apache22'
+  end
+
+  context "default dav_svn config" do
+    it 'succeeds in puppeting dav_svn' do
+      pp= <<-EOS
+        class { 'apache': }
+        include apache::mod::dav_svn
+      EOS
+      apply_manifest(pp, :catch_failures => true)
+    end
+
+    describe service(service_name) do
+      it { should be_enabled }
+      it { should be_running }
+    end
+
+    describe file("#{mod_dir}/dav_svn.load") do
+      it { should contain "LoadModule dav_svn_module" }
+    end
+  end
+
+  context "dav_svn with enabled authz_svn config" do
+    it 'succeeds in puppeting dav_svn' do
+      pp= <<-EOS
+        class { 'apache': }
+        class { 'apache::mod::dav_svn':
+            authz_svn_enabled => true,
+        }
+      EOS
+      apply_manifest(pp, :catch_failures => true)
+    end
+
+    describe service(service_name) do
+      it { should be_enabled }
+      it { should be_running }
+    end
+
+    describe file("#{mod_dir}/dav_svn_authz_svn.load") do
+      it { should contain "LoadModule authz_svn_module" }
+    end
+  end
+end
diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/spec/acceptance/mod_deflate_spec.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/spec/acceptance/mod_deflate_spec.rb
new file mode 100644
index 00000000000..b2ffc1436a8
--- /dev/null
+++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/spec/acceptance/mod_deflate_spec.rb
@@ -0,0 +1,40 @@
+require 'spec_helper_acceptance'
+
+describe 'apache::mod::deflate class' do
+  case fact('osfamily')
+  when 'Debian'
+    mod_dir      = '/etc/apache2/mods-available'
+    service_name = 'apache2'
+  when 'RedHat'
+    mod_dir      = '/etc/httpd/conf.d'
+    service_name = 'httpd'
+  when 'FreeBSD'
+    mod_dir      = '/usr/local/etc/apache22/Modules'
+    service_name = 'apache22'
+  end
+
+  context "default deflate config" do
+    it 'succeeds in puppeting deflate' do
+      pp= <<-EOS
+        class { 'apache': }
+        include apache::mod::deflate
+      EOS
+      apply_manifest(pp, :catch_failures => true)
+    end
+
+    describe service(service_name) do
+      it { should be_enabled }
+      it { should be_running }
+    end
+
+    describe file("#{mod_dir}/deflate.conf") do
+      it { should contain "AddOutputFilterByType DEFLATE text/html text/plain text/xml" }
+      it { should contain "AddOutputFilterByType DEFLATE text/css" }
+      it { should contain "AddOutputFilterByType DEFLATE application/x-javascript application/javascript application/ecmascript" }
+      it { should contain "AddOutputFilterByType DEFLATE application/rss+xml" }
+      it { should contain "DeflateFilterNote Input instream" }
+      it { should contain "DeflateFilterNote Output outstream" }
+      it { should contain "DeflateFilterNote Ratio ratio" }
+    end
+  end
+end
diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/spec/acceptance/mod_fcgid_spec.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/spec/acceptance/mod_fcgid_spec.rb
new file mode 100644
index 00000000000..52f793be06d
--- /dev/null
+++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/spec/acceptance/mod_fcgid_spec.rb
@@ -0,0 +1,62 @@
+require 'spec_helper_acceptance'
+
+describe 'apache::mod::fcgid class', :unless => UNSUPPORTED_PLATFORMS.include?(fact('osfamily')) do
+  case fact('osfamily')
+  when 'Debian'
+    # Not implemented
+  when 'RedHat'
+    context "default fcgid config" do
+      it 'succeeds in puppeting fcgid' do
+        pp = <<-EOS
+          class { 'epel': } # mod_fcgid lives in epel
+          class { 'apache': }
+          class { 'apache::mod::php': } # For /usr/bin/php-cgi
+          class { 'apache::mod::fcgid':
+            options => {
+              'FcgidIPCDir'  => '/var/run/fcgidsock',
+            },
+          }
+          apache::vhost { 'fcgid.example.com':
+            port        => '80',
+            docroot     => '/var/www/fcgid',
+            directories => {
+              path        => '/var/www/fcgid',
+              options     => '+ExecCGI',
+              addhandlers => {
+                handler    => 'fcgid-script',
+                extensions => '.php',
+              },
+              fcgiwrapper => {
+                command => '/usr/bin/php-cgi',
+                suffix  => '.php',
+              }
+            },
+          }
+          file { '/var/www/fcgid/index.php':
+            ensure  => file,
+            owner   => 'root',
+            group   => 'root',
+            content => "\\n",
+          }
+        EOS
+        apply_manifest(pp, :catch_failures => true)
+      end
+
+      describe service('httpd') do
+        it { should be_enabled }
+        it { should be_running }
+      end
+
+      it 'should answer to fcgid.example.com' do
+        shell("/usr/bin/curl -H 'Host: fcgid.example.com' 127.0.0.1:80") do |r|
+          r.stdout.should =~ /^Hello world$/
+          r.exit_code.should == 0
+        end
+      end
+
+      it 'should run a php-cgi process' do
+        shell("pgrep -u apache php-cgi", :acceptable_exit_codes => [0])
+      end
+    end
+  end
+end
diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/spec/acceptance/mod_mime_spec.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/spec/acceptance/mod_mime_spec.rb
new file mode 100644
index 00000000000..71a7037a623
--- /dev/null
+++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/spec/acceptance/mod_mime_spec.rb
@@ -0,0 +1,34 @@
+require 'spec_helper_acceptance'
+
+describe 'apache::mod::mime class' do
+  case fact('osfamily')
+  when 'Debian'
+    mod_dir      = '/etc/apache2/mods-available'
+    service_name = 'apache2'
+  when 'RedHat'
+    mod_dir      = '/etc/httpd/conf.d'
+    service_name = 'httpd'
+  when 'FreeBSD'
+    mod_dir      = '/usr/local/etc/apache22/Modules'
+    service_name = 'apache22'
+  end
+
+  context "default mime config" do
+    it 'succeeds in puppeting mime' do
+      pp= <<-EOS
+        class { 'apache': }
+        include apache::mod::mime
+      EOS
+      apply_manifest(pp, :catch_failures => true)
+    end
+
+    describe service(service_name) do
+      it { should be_enabled }
+      it { should be_running }
+    end
+
+    describe file("#{mod_dir}/mime.conf") do
+      it { should contain "AddType application/x-compress .Z" }
+    end
+  end
+end
diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/spec/acceptance/mod_pagespeed_spec.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/spec/acceptance/mod_pagespeed_spec.rb
new file mode 100644
index 00000000000..de59a347c11
--- /dev/null
+++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/spec/acceptance/mod_pagespeed_spec.rb
@@ -0,0 +1,85 @@
+require 'spec_helper_acceptance'
+
+describe 'apache::mod::pagespeed class', :unless => UNSUPPORTED_PLATFORMS.include?(fact('osfamily')) do
+  case fact('osfamily')
+  when 'Debian'
+    vhost_dir    = '/etc/apache2/sites-enabled'
+    mod_dir      = '/etc/apache2/mods-available'
+    service_name = 'apache2'
+  when 'RedHat'
+    vhost_dir    = '/etc/httpd/conf.d'
+    mod_dir      = '/etc/httpd/conf.d'
+    service_name = 'httpd'
+  when 'FreeBSD'
+    vhost_dir    = '/usr/local/etc/apache22/Vhosts'
+    mod_dir      = '/usr/local/etc/apache22/Modules'
+    service_name = 'apache22'
+  end
+
+  context "default pagespeed config" do
+    it 'succeeds in puppeting pagespeed' do
+      pp= <<-EOS
+        if $::osfamily == 'Debian' {
+          class { 'apt': }
+
+          apt::source { 'mod-pagespeed':
+            key         => '7FAC5991',
+            key_server  => 'pgp.mit.edu',
+            location    => 'http://dl.google.com/linux/mod-pagespeed/deb/',
+            release     => 'stable',
+            repos       => 'main',
+            include_src => false,
+            before      => Class['apache'],
+          } 
+        } elsif $::osfamily == 'RedHat' {
+         yumrepo { 'mod-pagespeed':
+          baseurl  => 'http://dl.google.com/linux/mod-pagespeed/rpm/stable/x86_64',
+            enabled  => 1,
+            gpgcheck => 1,
+            gpgkey   => 'https://dl-ssl.google.com/linux/linux_signing_key.pub',
+            before   => Class['apache'],
+          }
+        }
+
+        class { 'apache':
+          mpm_module => 'prefork',
+        }
+        class { 'apache::mod::pagespeed':
+          enable_filters  => ['remove_comments'],
+          disable_filters => ['extend_cache'],
+          forbid_filters  => ['rewrite_javascript'],
+        }
+        apache::vhost { 'pagespeed.example.com':
+          port    => '80',
+          docroot => '/var/www/pagespeed',
+        }
+        host { 'pagespeed.example.com': ip => '127.0.0.1', }
+        file { '/var/www/pagespeed/index.html':
+          ensure  => file,
+          content => "\n\n\n

Hello World!

\n\n", + } + EOS + apply_manifest(pp, :catch_failures => true) + end + + describe service(service_name) do + it { should be_enabled } + it { should be_running } + end + + describe file("#{mod_dir}/pagespeed.conf") do + it { should contain "AddOutputFilterByType MOD_PAGESPEED_OUTPUT_FILTER text/html" } + it { should contain "ModPagespeedEnableFilters remove_comments" } + it { should contain "ModPagespeedDisableFilters extend_cache" } + it { should contain "ModPagespeedForbidFilters rewrite_javascript" } + end + + it 'should answer to pagespeed.example.com and include and be stripped of comments by mod_pagespeed' do + shell("/usr/bin/curl pagespeed.example.com:80") do |r| + r.stdout.should =~ // + r.stdout.should_not =~ // + r.exit_code.should == 0 + end + end + end +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/spec/acceptance/mod_passenger_spec.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/spec/acceptance/mod_passenger_spec.rb new file mode 100644 index 00000000000..fbfac1672a1 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/spec/acceptance/mod_passenger_spec.rb @@ -0,0 +1,294 @@ +require 'spec_helper_acceptance' + +describe 'apache::mod::passenger class', :unless => UNSUPPORTED_PLATFORMS.include?(fact('osfamily')) do + case fact('osfamily') + when 'Debian' + service_name = 'apache2' + mod_dir = '/etc/apache2/mods-available/' + conf_file = "#{mod_dir}passenger.conf" + load_file = "#{mod_dir}passenger.load" + + case fact('operatingsystem') + when 'Ubuntu' + case fact('lsbdistrelease') + when '10.04' + passenger_root = '/usr' + passenger_ruby = '/usr/bin/ruby' + when '12.04' + passenger_root = '/usr' + passenger_ruby = '/usr/bin/ruby' + when '14.04' + passenger_root = '/usr/lib/ruby/vendor_ruby/phusion_passenger/locations.ini' + passenger_ruby = '/usr/bin/ruby' + passenger_default_ruby = '/usr/bin/ruby' + else + # This may or may not work on Ubuntu releases other than the above + passenger_root = '/usr' + passenger_ruby = '/usr/bin/ruby' + end + when 'Debian' + case fact('lsbdistcodename') + when 'wheezy' + passenger_root = '/usr' + passenger_ruby = '/usr/bin/ruby' + else + # This may or may not work on Debian releases other than the above + passenger_root = '/usr' + passenger_ruby = '/usr/bin/ruby' + end + end + + passenger_module_path = '/usr/lib/apache2/modules/mod_passenger.so' + rackapp_user = 'www-data' + rackapp_group = 'www-data' + when 'RedHat' + service_name = 'httpd' + mod_dir = '/etc/httpd/conf.d/' + conf_file = "#{mod_dir}passenger.conf" + load_file = "#{mod_dir}passenger.load" + # sometimes installs as 3.0.12, sometimes as 3.0.19 - so just check for the stable part + passenger_root = '/usr/lib/ruby/gems/1.8/gems/passenger-3.0.1' + passenger_ruby = '/usr/bin/ruby' + passenger_tempdir = '/var/run/rubygem-passenger' + passenger_module_path = 'modules/mod_passenger.so' + rackapp_user = 'apache' + rackapp_group = 'apache' + end + + pp_rackapp = <<-EOS + /* a simple ruby rack 'hellow world' app */ + file { '/var/www/passenger': + ensure => directory, + owner => '#{rackapp_user}', + group => '#{rackapp_group}', + require => Class['apache::mod::passenger'], + } + file { '/var/www/passenger/config.ru': + ensure => file, + owner => '#{rackapp_user}', + group => '#{rackapp_group}', + content => "app = proc { |env| [200, { \\"Content-Type\\" => \\"text/html\\" }, [\\"hello world\\"]] }\\nrun app", + require => File['/var/www/passenger'] , + } + apache::vhost { 'passenger.example.com': + port => '80', + docroot => '/var/www/passenger/public', + docroot_group => '#{rackapp_group}' , + docroot_owner => '#{rackapp_user}' , + custom_fragment => "PassengerRuby #{passenger_ruby}\\nRailsEnv development" , + require => File['/var/www/passenger/config.ru'] , + } + host { 'passenger.example.com': ip => '127.0.0.1', } + EOS + + case fact('osfamily') + when 'Debian' + context "default passenger config" do + it 'succeeds in puppeting passenger' do + pp = <<-EOS + /* stock apache and mod_passenger */ + class { 'apache': } + class { 'apache::mod::passenger': } + #{pp_rackapp} + EOS + apply_manifest(pp, :catch_failures => true) + end + + describe service(service_name) do + it { should be_enabled } + it { should be_running } + end + + describe file(conf_file) do + it { should contain "PassengerRoot \"#{passenger_root}\"" } + + case fact('operatingsystem') + when 'Ubuntu' + case fact('lsbdistrelease') + when '10.04' + it { should contain "PassengerRuby \"#{passenger_ruby}\"" } + it { should_not contain "/PassengerDefaultRuby/" } + when '12.04' + it { should contain "PassengerRuby \"#{passenger_ruby}\"" } + it { should_not contain "/PassengerDefaultRuby/" } + when '14.04' + it { should contain "PassengerDefaultRuby \"#{passenger_ruby}\"" } + it { should_not contain "/PassengerRuby/" } + else + # This may or may not work on Ubuntu releases other than the above + it { should contain "PassengerRuby \"#{passenger_ruby}\"" } + it { should_not contain "/PassengerDefaultRuby/" } + end + when 'Debian' + case fact('lsbdistcodename') + when 'wheezy' + it { should contain "PassengerRuby \"#{passenger_ruby}\"" } + it { should_not contain "/PassengerDefaultRuby/" } + else + # This may or may not work on Debian releases other than the above + it { should contain "PassengerRuby \"#{passenger_ruby}\"" } + it { should_not contain "/PassengerDefaultRuby/" } + end + end + end + + describe file(load_file) do + it { should contain "LoadModule passenger_module #{passenger_module_path}" } + end + + it 'should output status via passenger-memory-stats' do + shell("sudo /usr/sbin/passenger-memory-stats") do |r| + r.stdout.should =~ /Apache processes/ + r.stdout.should =~ /Nginx processes/ + r.stdout.should =~ /Passenger processes/ + + # passenger-memory-stats output on Ubuntu 14.04 does not contain + # these two lines + unless fact('operatingsystem') == 'Ubuntu' && fact('operatingsystemrelease') == '14.04' + r.stdout.should =~ /### Processes: [0-9]+/ + r.stdout.should =~ /### Total private dirty RSS: [0-9\.]+ MB/ + end + + r.exit_code.should == 0 + end + end + + # passenger-status fails under stock ubuntu-server-12042-x64 + mod_passenger, + # even when the passenger process is successfully installed and running + unless fact('operatingsystem') == 'Ubuntu' && fact('operatingsystemrelease') == '12.04' + it 'should output status via passenger-status' do + # xml output not available on ubunutu <= 10.04, so sticking with default pool output + shell("sudo /usr/sbin/passenger-status") do |r| + # spacing may vary + r.stdout.should =~ /[\-]+ General information [\-]+/ + if fact('operatingsystem') == 'Ubuntu' && fact('operatingsystemrelease') == '14.04' + r.stdout.should =~ /Max pool size[ ]+: [0-9]+/ + r.stdout.should =~ /Processes[ ]+: [0-9]+/ + r.stdout.should =~ /Requests in top-level queue[ ]+: [0-9]+/ + else + r.stdout.should =~ /max[ ]+= [0-9]+/ + r.stdout.should =~ /count[ ]+= [0-9]+/ + r.stdout.should =~ /active[ ]+= [0-9]+/ + r.stdout.should =~ /inactive[ ]+= [0-9]+/ + r.stdout.should =~ /Waiting on global queue: [0-9]+/ + end + + r.exit_code.should == 0 + end + end + end + + it 'should answer to passenger.example.com' do + shell("/usr/bin/curl passenger.example.com:80") do |r| + r.stdout.should =~ /^hello world<\/b>$/ + r.exit_code.should == 0 + end + end + + end + + when 'RedHat' + # no fedora 18 passenger package yet, and rhel5 packages only exist for ruby 1.8.5 + unless (fact('operatingsystem') == 'Fedora' and fact('operatingsystemrelease').to_f >= 18) or (fact('osfamily') == 'RedHat' and fact('operatingsystemmajrelease') == '5' and fact('rubyversion') != '1.8.5') + + context "default passenger config" do + it 'succeeds in puppeting passenger' do + pp = <<-EOS + /* EPEL and passenger repositories */ + class { 'epel': } + exec { 'passenger.repo GPG key': + command => '/usr/bin/sudo /usr/bin/curl -o /etc/yum.repos.d/RPM-GPG-KEY-stealthymonkeys.asc http://passenger.stealthymonkeys.com/RPM-GPG-KEY-stealthymonkeys.asc', + creates => '/etc/yum.repos.d/RPM-GPG-KEY-stealthymonkeys.asc', + } + file { 'passenger.repo GPG key': + ensure => file, + path => '/etc/yum.repos.d/RPM-GPG-KEY-stealthymonkeys.asc', + require => Exec['passenger.repo GPG key'], + } + epel::rpm_gpg_key { 'passenger.stealthymonkeys.com': + path => '/etc/yum.repos.d/RPM-GPG-KEY-stealthymonkeys.asc', + require => [ + Class['epel'], + File['passenger.repo GPG key'], + ] + } + yumrepo { 'passenger': + baseurl => 'http://passenger.stealthymonkeys.com/rhel/$releasever/$basearch' , + descr => 'Red Hat Enterprise $releasever - Phusion Passenger', + enabled => 1, + gpgcheck => 1, + gpgkey => 'http://passenger.stealthymonkeys.com/RPM-GPG-KEY-stealthymonkeys.asc', + mirrorlist => 'http://passenger.stealthymonkeys.com/rhel/mirrors', + require => [ + Epel::Rpm_gpg_key['passenger.stealthymonkeys.com'], + ], + } + /* apache and mod_passenger */ + class { 'apache': + require => [ + Class['epel'], + ], + } + class { 'apache::mod::passenger': + require => [ + Yumrepo['passenger'] + ], + } + #{pp_rackapp} + EOS + apply_manifest(pp, :catch_failures => true) + end + + describe service(service_name) do + it { should be_enabled } + it { should be_running } + end + + describe file(conf_file) do + it { should contain "PassengerRoot #{passenger_root}" } + it { should contain "PassengerRuby #{passenger_ruby}" } + it { should contain "PassengerTempDir #{passenger_tempdir}" } + end + + describe file(load_file) do + it { should contain "LoadModule passenger_module #{passenger_module_path}" } + end + + it 'should output status via passenger-memory-stats' do + shell("sudo /usr/bin/passenger-memory-stats") do |r| + r.stdout.should =~ /Apache processes/ + r.stdout.should =~ /Nginx processes/ + r.stdout.should =~ /Passenger processes/ + r.stdout.should =~ /### Processes: [0-9]+/ + r.stdout.should =~ /### Total private dirty RSS: [0-9\.]+ MB/ + + r.exit_code.should == 0 + end + end + + it 'should output status via passenger-status' do + shell("sudo PASSENGER_TMPDIR=/var/run/rubygem-passenger /usr/bin/passenger-status") do |r| + # spacing may vary + r.stdout.should =~ /[\-]+ General information [\-]+/ + r.stdout.should =~ /max[ ]+= [0-9]+/ + r.stdout.should =~ /count[ ]+= [0-9]+/ + r.stdout.should =~ /active[ ]+= [0-9]+/ + r.stdout.should =~ /inactive[ ]+= [0-9]+/ + r.stdout.should =~ /Waiting on global queue: [0-9]+/ + + r.exit_code.should == 0 + end + end + + it 'should answer to passenger.example.com' do + shell("/usr/bin/curl passenger.example.com:80") do |r| + r.stdout.should =~ /^hello world<\/b>$/ + r.exit_code.should == 0 + end + end + end + + end + + end +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/spec/acceptance/mod_php_spec.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/spec/acceptance/mod_php_spec.rb new file mode 100644 index 00000000000..ca21fbcd7e5 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/spec/acceptance/mod_php_spec.rb @@ -0,0 +1,173 @@ +require 'spec_helper_acceptance' + +describe 'apache::mod::php class', :unless => UNSUPPORTED_PLATFORMS.include?(fact('osfamily')) do + case fact('osfamily') + when 'Debian' + vhost_dir = '/etc/apache2/sites-enabled' + mod_dir = '/etc/apache2/mods-available' + service_name = 'apache2' + when 'RedHat' + vhost_dir = '/etc/httpd/conf.d' + mod_dir = '/etc/httpd/conf.d' + service_name = 'httpd' + when 'FreeBSD' + vhost_dir = '/usr/local/etc/apache22/Vhosts' + mod_dir = '/usr/local/etc/apache22/Modules' + service_name = 'apache22' + end + + context "default php config" do + it 'succeeds in puppeting php' do + pp= <<-EOS + class { 'apache': + mpm_module => 'prefork', + } + class { 'apache::mod::php': } + apache::vhost { 'php.example.com': + port => '80', + docroot => '/var/www/php', + } + host { 'php.example.com': ip => '127.0.0.1', } + file { '/var/www/php/index.php': + ensure => file, + content => "\\n", + } + EOS + apply_manifest(pp, :catch_failures => true) + end + + describe service(service_name) do + it { should be_enabled } + it { should be_running } + end + + describe file("#{mod_dir}/php5.conf") do + it { should contain "DirectoryIndex index.php" } + end + + it 'should answer to php.example.com' do + shell("/usr/bin/curl php.example.com:80") do |r| + r.stdout.should =~ /PHP Version/ + r.exit_code.should == 0 + end + end + end + + context "custom extensions, php_admin_flag, and php_admin_value" do + it 'succeeds in puppeting php' do + pp= <<-EOS + class { 'apache': + mpm_module => 'prefork', + } + class { 'apache::mod::php': + extensions => ['.php','.php5'], + } + apache::vhost { 'php.example.com': + port => '80', + docroot => '/var/www/php', + php_admin_values => { 'open_basedir' => '/var/www/php/:/usr/share/pear/', }, + php_admin_flags => { 'engine' => 'on', }, + } + host { 'php.example.com': ip => '127.0.0.1', } + file { '/var/www/php/index.php5': + ensure => file, + content => "\\n", + } + EOS + apply_manifest(pp, :catch_failures => true) + end + + describe service(service_name) do + it { should be_enabled } + it { should be_running } + end + + describe file("#{vhost_dir}/25-php.example.com.conf") do + it { should contain " php_admin_flag engine on" } + it { should contain " php_admin_value open_basedir /var/www/php/:/usr/share/pear/" } + end + + it 'should answer to php.example.com' do + shell("/usr/bin/curl php.example.com:80") do |r| + r.stdout.should =~ /\/usr\/share\/pear\// + r.exit_code.should == 0 + end + end + end + + context "provide custom config file" do + it 'succeeds in puppeting php' do + pp= <<-EOS + class {'apache': + mpm_module => 'prefork', + } + class {'apache::mod::php': + content => '# somecontent', + } + EOS + apply_manifest(pp, :catch_failures => true) + end + + describe file("#{mod_dir}/php5.conf") do + it { should contain "# somecontent" } + end + end + + context "provide content and template config file" do + it 'succeeds in puppeting php' do + pp= <<-EOS + class {'apache': + mpm_module => 'prefork', + } + class {'apache::mod::php': + content => '# somecontent', + template => 'apache/mod/php5.conf.erb', + } + EOS + apply_manifest(pp, :catch_failures => true) + end + + describe file("#{mod_dir}/php5.conf") do + it { should contain "# somecontent" } + end + end + + context "provide source has priority over content" do + it 'succeeds in puppeting php' do + pp= <<-EOS + class {'apache': + mpm_module => 'prefork', + } + class {'apache::mod::php': + content => '# somecontent', + source => 'puppet:///modules/apache/spec', + } + EOS + apply_manifest(pp, :catch_failures => true) + end + + describe file("#{mod_dir}/php5.conf") do + it { should contain "# This is a file only for spec testing" } + end + end + + context "provide source has priority over template" do + it 'succeeds in puppeting php' do + pp= <<-EOS + class {'apache': + mpm_module => 'prefork', + } + class {'apache::mod::php': + template => 'apache/mod/php5.conf.erb', + source => 'puppet:///modules/apache/spec', + } + EOS + apply_manifest(pp, :catch_failures => true) + end + + describe file("#{mod_dir}/php5.conf") do + it { should contain "# This is a file only for spec testing" } + end + end + +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/spec/acceptance/mod_proxy_html_spec.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/spec/acceptance/mod_proxy_html_spec.rb new file mode 100644 index 00000000000..f015f999416 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/spec/acceptance/mod_proxy_html_spec.rb @@ -0,0 +1,39 @@ +require 'spec_helper_acceptance' + +describe 'apache::mod::proxy_html class', :unless => UNSUPPORTED_PLATFORMS.include?(fact('osfamily')) do + case fact('osfamily') + when 'Debian' + service_name = 'apache2' + when 'RedHat' + service_name = 'httpd' + when 'FreeBSD' + service_name = 'apache22' + end + + context "default proxy_html config" do + if fact('osfamily') == 'RedHat' and fact('operatingsystemmajrelease') =~ /(5|6)/ + it 'adds epel' do + pp = "class { 'epel': }" + apply_manifest(pp, :catch_failures => true) + end + end + + it 'succeeds in puppeting proxy_html' do + pp= <<-EOS + class { 'apache': } + class { 'apache::mod::proxy': } + class { 'apache::mod::proxy_http': } + # mod_proxy_html doesn't exist in RHEL5 + if $::osfamily == 'RedHat' and $::operatingsystemmajrelease != '5' { + class { 'apache::mod::proxy_html': } + } + EOS + apply_manifest(pp, :catch_failures => true) + end + + describe service(service_name) do + it { should be_enabled } + it { should be_running } + end + end +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/spec/acceptance/mod_suphp_spec.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/spec/acceptance/mod_suphp_spec.rb new file mode 100644 index 00000000000..9e26731d618 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/spec/acceptance/mod_suphp_spec.rb @@ -0,0 +1,44 @@ +require 'spec_helper_acceptance' + +describe 'apache::mod::suphp class', :unless => UNSUPPORTED_PLATFORMS.include?(fact('osfamily')) do + case fact('osfamily') + when 'Debian' + context "default suphp config" do + it 'succeeds in puppeting suphp' do + pp = <<-EOS + class { 'apache': + mpm_module => 'prefork', + } + class { 'apache::mod::php': } + class { 'apache::mod::suphp': } + apache::vhost { 'suphp.example.com': + port => '80', + docroot => '/var/www/suphp', + } + host { 'suphp.example.com': ip => '127.0.0.1', } + file { '/var/www/suphp/index.php': + ensure => file, + owner => 'daemon', + group => 'daemon', + content => "\\n", + } + EOS + apply_manifest(pp, :catch_failures => true) + end + + describe service('apache2') do + it { should be_enabled } + it { should be_running } + end + + it 'should answer to suphp.example.com' do + shell("/usr/bin/curl suphp.example.com:80") do |r| + r.stdout.should =~ /^daemon$/ + r.exit_code.should == 0 + end + end + end + when 'RedHat' + # Not implemented yet + end +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/spec/acceptance/nodesets/centos-59-x64.yml b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/spec/acceptance/nodesets/centos-59-x64.yml new file mode 100644 index 00000000000..cde1fe5a85b --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/spec/acceptance/nodesets/centos-59-x64.yml @@ -0,0 +1,11 @@ +HOSTS: + centos-59-x64: + roles: + - master + platform: el-5-x86_64 + box : centos-59-x64-vbox4210-nocm + box_url : http://puppet-vagrant-boxes.puppetlabs.com/centos-59-x64-vbox4210-nocm.box + hypervisor : vagrant +CONFIG: + log_level: debug + type: git diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/spec/acceptance/nodesets/centos-64-x64-pe.yml b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/spec/acceptance/nodesets/centos-64-x64-pe.yml new file mode 100644 index 00000000000..e408d1be779 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/spec/acceptance/nodesets/centos-64-x64-pe.yml @@ -0,0 +1,13 @@ +HOSTS: + centos-64-x64: + roles: + - master + - database + - dashboard + platform: el-6-x86_64 + box : centos-64-x64-vbox4210-nocm + box_url : http://puppet-vagrant-boxes.puppetlabs.com/centos-64-x64-vbox4210-nocm.box + hypervisor : vagrant +CONFIG: + log_level: debug + type: pe diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/spec/acceptance/nodesets/centos-64-x64.yml b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/spec/acceptance/nodesets/centos-64-x64.yml new file mode 100644 index 00000000000..ce47212a8c7 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/spec/acceptance/nodesets/centos-64-x64.yml @@ -0,0 +1,11 @@ +HOSTS: + centos-64-x64: + roles: + - master + platform: el-6-x86_64 + box : centos-64-x64-vbox4210-nocm + box_url : http://puppet-vagrant-boxes.puppetlabs.com/centos-64-x64-vbox4210-nocm.box + hypervisor : vagrant +CONFIG: + log_level: debug + type: git diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/spec/acceptance/nodesets/centos-65-x64.yml b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/spec/acceptance/nodesets/centos-65-x64.yml new file mode 100644 index 00000000000..ac763497368 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/spec/acceptance/nodesets/centos-65-x64.yml @@ -0,0 +1,11 @@ +HOSTS: + centos-65-x64: + roles: + - master + platform: el-6-x86_64 + box : centos-65-x64-virtualbox-nocm + box_url : http://puppet-vagrant-boxes.puppetlabs.com/centos-65-x64-virtualbox-nocm.box + hypervisor : vagrant +CONFIG: + log_level: debug + type: git diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/spec/acceptance/nodesets/debian-607-x64.yml b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/spec/acceptance/nodesets/debian-607-x64.yml new file mode 100644 index 00000000000..e642e099254 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/spec/acceptance/nodesets/debian-607-x64.yml @@ -0,0 +1,11 @@ +HOSTS: + debian-607-x64: + roles: + - master + platform: debian-6-amd64 + box : debian-607-x64-vbox4210-nocm + box_url : http://puppet-vagrant-boxes.puppetlabs.com/debian-607-x64-vbox4210-nocm.box + hypervisor : vagrant +CONFIG: + log_level: debug + type: git diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/spec/acceptance/nodesets/debian-70rc1-x64.yml b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/spec/acceptance/nodesets/debian-70rc1-x64.yml new file mode 100644 index 00000000000..cbbbfb2cc62 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/spec/acceptance/nodesets/debian-70rc1-x64.yml @@ -0,0 +1,11 @@ +HOSTS: + debian-70rc1-x64: + roles: + - master + platform: debian-7-amd64 + box : debian-70rc1-x64-vbox4210-nocm + box_url : http://puppet-vagrant-boxes.puppetlabs.com/debian-70rc1-x64-vbox4210-nocm.box + hypervisor : vagrant +CONFIG: + log_level: debug + type: git diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/spec/acceptance/nodesets/debian-73-i386.yml b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/spec/acceptance/nodesets/debian-73-i386.yml new file mode 100644 index 00000000000..a38902d8971 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/spec/acceptance/nodesets/debian-73-i386.yml @@ -0,0 +1,11 @@ +HOSTS: + debian-73-i386: + roles: + - master + platform: debian-7-i386 + box : debian-73-i386-virtualbox-nocm + box_url : http://puppet-vagrant-boxes.puppetlabs.com/debian-73-i386-virtualbox-nocm.box + hypervisor : vagrant +CONFIG: + log_level: debug + type: git diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/spec/acceptance/nodesets/debian-73-x64.yml b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/spec/acceptance/nodesets/debian-73-x64.yml new file mode 100644 index 00000000000..f9cf0c9b8a9 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/spec/acceptance/nodesets/debian-73-x64.yml @@ -0,0 +1,11 @@ +HOSTS: + debian-73-x64: + roles: + - master + platform: debian-7-amd64 + box : debian-73-x64-virtualbox-nocm + box_url : http://puppet-vagrant-boxes.puppetlabs.com/debian-73-x64-virtualbox-nocm.box + hypervisor : vagrant +CONFIG: + log_level: debug + type: git diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/spec/acceptance/nodesets/default.yml b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/spec/acceptance/nodesets/default.yml new file mode 100644 index 00000000000..ce47212a8c7 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/spec/acceptance/nodesets/default.yml @@ -0,0 +1,11 @@ +HOSTS: + centos-64-x64: + roles: + - master + platform: el-6-x86_64 + box : centos-64-x64-vbox4210-nocm + box_url : http://puppet-vagrant-boxes.puppetlabs.com/centos-64-x64-vbox4210-nocm.box + hypervisor : vagrant +CONFIG: + log_level: debug + type: git diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/spec/acceptance/nodesets/fedora-18-x64.yml b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/spec/acceptance/nodesets/fedora-18-x64.yml new file mode 100644 index 00000000000..086cae995c8 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/spec/acceptance/nodesets/fedora-18-x64.yml @@ -0,0 +1,11 @@ +HOSTS: + fedora-18-x64: + roles: + - master + platform: fedora-18-x86_64 + box : fedora-18-x64-vbox4210-nocm + box_url : http://puppet-vagrant-boxes.puppetlabs.com/fedora-18-x64-vbox4210-nocm.box + hypervisor : vagrant +CONFIG: + log_level: debug + type: git diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/spec/acceptance/nodesets/sles-11sp1-x64.yml b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/spec/acceptance/nodesets/sles-11sp1-x64.yml new file mode 100644 index 00000000000..a9f01d5f423 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/spec/acceptance/nodesets/sles-11sp1-x64.yml @@ -0,0 +1,11 @@ +HOSTS: + sles-11sp1-x64: + roles: + - master + platform: sles-11-x86_64 + box : sles-11sp1-x64-vbox4210-nocm + box_url : http://puppet-vagrant-boxes.puppetlabs.com/sles-11sp1-x64-vbox4210-nocm.box + hypervisor : vagrant +CONFIG: + log_level: debug + type: git diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/spec/acceptance/nodesets/ubuntu-server-10044-x64.yml b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/spec/acceptance/nodesets/ubuntu-server-10044-x64.yml new file mode 100644 index 00000000000..c1b8bdf8fa9 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/spec/acceptance/nodesets/ubuntu-server-10044-x64.yml @@ -0,0 +1,11 @@ +HOSTS: + ubuntu-server-10044-x64: + roles: + - master + platform: ubuntu-10.04-amd64 + box : ubuntu-server-10044-x64-vbox4210-nocm + box_url : http://puppet-vagrant-boxes.puppetlabs.com/ubuntu-server-10044-x64-vbox4210-nocm.box + hypervisor : vagrant +CONFIG: + log_level: debug + type: git diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/spec/acceptance/nodesets/ubuntu-server-12042-x64.yml b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/spec/acceptance/nodesets/ubuntu-server-12042-x64.yml new file mode 100644 index 00000000000..f7df2ccce12 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/spec/acceptance/nodesets/ubuntu-server-12042-x64.yml @@ -0,0 +1,11 @@ +HOSTS: + ubuntu-server-12042-x64: + roles: + - master + platform: ubuntu-12.04-amd64 + box : ubuntu-server-12042-x64-vbox4210-nocm + box_url : http://puppet-vagrant-boxes.puppetlabs.com/ubuntu-server-12042-x64-vbox4210-nocm.box + hypervisor : vagrant +CONFIG: + log_level: debug + type: git diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/spec/acceptance/nodesets/ubuntu-server-1310-x64.yml b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/spec/acceptance/nodesets/ubuntu-server-1310-x64.yml new file mode 100644 index 00000000000..f4b2366f3bd --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/spec/acceptance/nodesets/ubuntu-server-1310-x64.yml @@ -0,0 +1,11 @@ +HOSTS: + ubuntu-server-1310-x64: + roles: + - master + platform: ubuntu-13.10-amd64 + box : ubuntu-server-1310-x64-vbox4210-nocm + box_url : http://puppet-vagrant-boxes.puppetlabs.com/ubuntu-1310-x64-virtualbox-nocm.box + hypervisor : vagrant +CONFIG: + log_level : debug + type: git diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/spec/acceptance/nodesets/ubuntu-server-1404-x64.yml b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/spec/acceptance/nodesets/ubuntu-server-1404-x64.yml new file mode 100644 index 00000000000..cba1cd04c25 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/spec/acceptance/nodesets/ubuntu-server-1404-x64.yml @@ -0,0 +1,11 @@ +HOSTS: + ubuntu-server-1404-x64: + roles: + - master + platform: ubuntu-14.04-amd64 + box : puppetlabs/ubuntu-14.04-64-nocm + box_url : https://vagrantcloud.com/puppetlabs/ubuntu-14.04-64-nocm + hypervisor : vagrant +CONFIG: + log_level : debug + type: git diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/spec/acceptance/prefork_worker_spec.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/spec/acceptance/prefork_worker_spec.rb new file mode 100644 index 00000000000..beffe0a014b --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/spec/acceptance/prefork_worker_spec.rb @@ -0,0 +1,79 @@ +require 'spec_helper_acceptance' + +case fact('osfamily') +when 'RedHat' + servicename = 'httpd' +when 'Debian' + servicename = 'apache2' +when 'FreeBSD' + servicename = 'apache22' +end + +case fact('osfamily') +when 'FreeBSD' + describe 'apache::mod::event class' do + describe 'running puppet code' do + # Using puppet_apply as a helper + it 'should work with no errors' do + pp = <<-EOS + class { 'apache': + mpm_module => 'event', + } + EOS + + # Run it twice and test for idempotency + apply_manifest(pp, :catch_failures => true) + expect(apply_manifest(pp, :catch_failures => true).exit_code).to be_zero + end + end + + describe service(servicename) do + it { should be_running } + it { should be_enabled } + end + end +end + +describe 'apache::mod::worker class', :unless => UNSUPPORTED_PLATFORMS.include?(fact('osfamily')) do + describe 'running puppet code' do + # Using puppet_apply as a helper + it 'should work with no errors' do + pp = <<-EOS + class { 'apache': + mpm_module => 'worker', + } + EOS + + # Run it twice and test for idempotency + apply_manifest(pp, :catch_failures => true) + expect(apply_manifest(pp, :catch_failures => true).exit_code).to be_zero + end + end + + describe service(servicename) do + it { should be_running } + it { should be_enabled } + end +end + +describe 'apache::mod::prefork class', :unless => UNSUPPORTED_PLATFORMS.include?(fact('osfamily')) do + describe 'running puppet code' do + # Using puppet_apply as a helper + it 'should work with no errors' do + pp = <<-EOS + class { 'apache': + mpm_module => 'prefork', + } + EOS + + # Run it twice and test for idempotency + apply_manifest(pp, :catch_failures => true) + expect(apply_manifest(pp, :catch_failures => true).exit_code).to be_zero + end + end + + describe service(servicename) do + it { should be_running } + it { should be_enabled } + end +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/spec/acceptance/service_spec.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/spec/acceptance/service_spec.rb new file mode 100644 index 00000000000..b51ca386f0a --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/spec/acceptance/service_spec.rb @@ -0,0 +1,19 @@ +require 'spec_helper_acceptance' + +describe 'apache::service class', :unless => UNSUPPORTED_PLATFORMS.include?(fact('osfamily')) do + describe 'adding dependencies in between the base class and service class' do + it 'should work with no errors' do + pp = <<-EOS + class { 'apache': } + file { '/tmp/test': + require => Class['apache'], + notify => Class['apache::service'], + } + EOS + + # Run it twice and test for idempotency + apply_manifest(pp, :catch_failures => true) + expect(apply_manifest(pp, :catch_failures => true).exit_code).to be_zero + end + end +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/spec/acceptance/unsupported_spec.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/spec/acceptance/unsupported_spec.rb new file mode 100644 index 00000000000..085845dbfc0 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/spec/acceptance/unsupported_spec.rb @@ -0,0 +1,13 @@ +require 'spec_helper_acceptance' + +describe 'unsupported distributions and OSes', :if => UNSUPPORTED_PLATFORMS.include?(fact('osfamily')) do + it 'should fail' do + pp = <<-EOS + class { 'apache': } + apache::vhost { 'test.lan': + docroot => '/var/www', + } + EOS + expect(apply_manifest(pp, :expect_failures => true).stderr).to match(/unsupported/i) + end +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/spec/acceptance/version.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/spec/acceptance/version.rb new file mode 100644 index 00000000000..27498354b48 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/spec/acceptance/version.rb @@ -0,0 +1,57 @@ +_osfamily = fact('osfamily') +_operatingsystem = fact('operatingsystem') +_operatingsystemrelease = fact('operatingsystemrelease').to_f + +case _osfamily +when 'RedHat' + $confd_dir = '/etc/httpd/conf.d' + $conf_file = '/etc/httpd/conf/httpd.conf' + $ports_file = '/etc/httpd/conf/ports.conf' + $vhost_dir = '/etc/httpd/conf.d' + $vhost = '/etc/httpd/conf.d/15-default.conf' + $run_dir = '/var/run/httpd' + $service_name = 'httpd' + $package_name = 'httpd' + $error_log = 'error_log' + $suphp_handler = 'php5-script' + $suphp_configpath = 'undef' + + if (_operatingsystem == 'Fedora' and _operatingsystemrelease >= 18) or (_operatingsystem != 'Fedora' and _operatingsystemrelease >= 7) + $apache_version = '2.4' + else + $apache_version = '2.2' + end +when 'Debian' + $confd_dir = '/etc/apache2/mods-available' + $conf_file = '/etc/apache2/apache2.conf' + $ports_file = '/etc/apache2/ports.conf' + $vhost = '/etc/apache2/sites-available/15-default.conf' + $vhost_dir = '/etc/apache2/sites-enabled' + $run_dir = '/var/run/apache2' + $service_name = 'apache2' + $package_name = 'apache2' + $error_log = 'error.log' + $suphp_handler = 'x-httpd-php' + $suphp_configpath = '/etc/php5/apache2' + + if _operatingsystem == 'Ubuntu' and _operatingsystemrelease >= 13.10 + $apache_version = '2.4' + else + $apache_version = '2.2' + end +when 'FreeBSD' + $confd_dir = '/usr/local/etc/apache22/Includes' + $conf_file = '/usr/local/etc/apache22/httpd.conf' + $ports_file = '/usr/local/etc/apache22/Includes/ports.conf' + $vhost = '/usr/local/etc/apache22/Vhosts/15-default.conf' + $vhost_dir = '/usr/local/etc/apache22/Vhosts' + $run_dir = '/var/run/apache22' + $service_name = 'apache22' + $package_name = 'apache22' + $error_log = 'http-error.log' + + $apache_version = '2.2' +else + $apache_version = '0' +end + diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/spec/acceptance/vhost_spec.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/spec/acceptance/vhost_spec.rb new file mode 100644 index 00000000000..c43d3f9e9e7 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/spec/acceptance/vhost_spec.rb @@ -0,0 +1,1097 @@ +require 'spec_helper_acceptance' +require_relative './version.rb' + +describe 'apache::vhost define', :unless => UNSUPPORTED_PLATFORMS.include?(fact('osfamily')) do + context 'no default vhosts' do + it 'should create no default vhosts' do + pp = <<-EOS + class { 'apache': + default_vhost => false, + default_ssl_vhost => false, + service_ensure => stopped + } + EOS + + apply_manifest(pp, :catch_failures => true) + end + + describe file("#{$vhost_dir}/15-default.conf") do + it { should_not be_file } + end + + describe file("#{$vhost_dir}/15-default-ssl.conf") do + it { should_not be_file } + end + end + + context "default vhost without ssl" do + it 'should create a default vhost config' do + pp = <<-EOS + class { 'apache': } + EOS + + apply_manifest(pp, :catch_failures => true) + end + + describe file("#{$vhost_dir}/15-default.conf") do + it { should contain '' } + end + + describe file("#{$vhost_dir}/15-default-ssl.conf") do + it { should_not be_file } + end + end + + context 'default vhost with ssl' do + it 'should create default vhost configs' do + pp = <<-EOS + file { '#{$run_dir}': + ensure => 'directory', + recurse => true, + } + + class { 'apache': + default_ssl_vhost => true, + require => File['#{$run_dir}'], + } + EOS + apply_manifest(pp, :catch_failures => true) + end + + describe file("#{$vhost_dir}/15-default.conf") do + it { should contain '' } + end + + describe file("#{$vhost_dir}/15-default-ssl.conf") do + it { should contain '' } + it { should contain "SSLEngine on" } + end + end + + context 'new vhost on port 80' do + it 'should configure an apache vhost' do + pp = <<-EOS + class { 'apache': } + file { '#{$run_dir}': + ensure => 'directory', + recurse => true, + } + + apache::vhost { 'first.example.com': + port => '80', + docroot => '/var/www/first', + require => File['#{$run_dir}'], + } + EOS + apply_manifest(pp, :catch_failures => true) + end + + describe file("#{$vhost_dir}/25-first.example.com.conf") do + it { should contain '' } + it { should contain "ServerName first.example.com" } + end + end + + context 'new proxy vhost on port 80' do + it 'should configure an apache proxy vhost' do + pp = <<-EOS + class { 'apache': } + apache::vhost { 'proxy.example.com': + port => '80', + docroot => '/var/www/proxy', + proxy_pass => [ + { 'path' => '/foo', 'url' => 'http://backend-foo/'}, + ], + proxy_preserve_host => true, + } + EOS + apply_manifest(pp, :catch_failures => true) + end + + describe file("#{$vhost_dir}/25-proxy.example.com.conf") do + it { should contain '' } + it { should contain "ServerName proxy.example.com" } + it { should contain "ProxyPass" } + it { should contain "ProxyPreserveHost On" } + it { should_not contain "" } + end + end + + context 'new vhost on port 80' do + it 'should configure two apache vhosts' do + pp = <<-EOS + class { 'apache': } + apache::vhost { 'first.example.com': + port => '80', + docroot => '/var/www/first', + } + host { 'first.example.com': ip => '127.0.0.1', } + file { '/var/www/first/index.html': + ensure => file, + content => "Hello from first\\n", + } + apache::vhost { 'second.example.com': + port => '80', + docroot => '/var/www/second', + } + host { 'second.example.com': ip => '127.0.0.1', } + file { '/var/www/second/index.html': + ensure => file, + content => "Hello from second\\n", + } + EOS + apply_manifest(pp, :catch_failures => true) + end + + describe service($service_name) do + it { should be_enabled } + it { should be_running } + end + + it 'should answer to first.example.com' do + shell("/usr/bin/curl first.example.com:80", {:acceptable_exit_codes => 0}) do |r| + r.stdout.should == "Hello from first\n" + end + end + + it 'should answer to second.example.com' do + shell("/usr/bin/curl second.example.com:80", {:acceptable_exit_codes => 0}) do |r| + r.stdout.should == "Hello from second\n" + end + end + end + + context 'apache_directories' do + describe 'readme example, adapted' do + it 'should configure a vhost with Files' do + pp = <<-EOS + class { 'apache': } + + if versioncmp($apache::apache_version, '2.4') >= 0 { + $_files_match_directory = { 'path' => '(\.swp|\.bak|~)$', 'provider' => 'filesmatch', 'require' => 'all denied', } + } else { + $_files_match_directory = { 'path' => '(\.swp|\.bak|~)$', 'provider' => 'filesmatch', 'deny' => 'from all', } + } + + $_directories = [ + { 'path' => '/var/www/files', }, + $_files_match_directory, + ] + + apache::vhost { 'files.example.net': + docroot => '/var/www/files', + directories => $_directories, + } + file { '/var/www/files/index.html': + ensure => file, + content => "Hello World\\n", + } + file { '/var/www/files/index.html.bak': + ensure => file, + content => "Hello World\\n", + } + host { 'files.example.net': ip => '127.0.0.1', } + EOS + apply_manifest(pp, :catch_failures => true) + end + + describe service($service_name) do + it { should be_enabled } + it { should be_running } + end + + it 'should answer to files.example.net' do + shell("/usr/bin/curl -sSf files.example.net:80/index.html").stdout.should eq("Hello World\n") + shell("/usr/bin/curl -sSf files.example.net:80/index.html.bak", {:acceptable_exit_codes => 22}).stderr.should match(/curl: \(22\) The requested URL returned error: 403/) + end + end + + describe 'other Directory options' do + it 'should configure a vhost with multiple Directory sections' do + pp = <<-EOS + class { 'apache': } + + if versioncmp($apache::apache_version, '2.4') >= 0 { + $_files_match_directory = { 'path' => 'private.html$', 'provider' => 'filesmatch', 'require' => 'all denied' } + } else { + $_files_match_directory = [ + { 'path' => 'private.html$', 'provider' => 'filesmatch', 'deny' => 'from all' }, + { 'path' => '/bar/bar.html', 'provider' => 'location', allow => [ 'from 127.0.0.1', ] }, + ] + } + + $_directories = [ + { 'path' => '/var/www/files', }, + { 'path' => '/foo/', 'provider' => 'location', 'directoryindex' => 'notindex.html', }, + $_files_match_directory, + ] + + apache::vhost { 'files.example.net': + docroot => '/var/www/files', + directories => $_directories, + } + file { '/var/www/files/foo': + ensure => directory, + } + file { '/var/www/files/foo/notindex.html': + ensure => file, + content => "Hello Foo\\n", + } + file { '/var/www/files/private.html': + ensure => file, + content => "Hello World\\n", + } + file { '/var/www/files/bar': + ensure => directory, + } + file { '/var/www/files/bar/bar.html': + ensure => file, + content => "Hello Bar\\n", + } + host { 'files.example.net': ip => '127.0.0.1', } + EOS + apply_manifest(pp, :catch_failures => true) + end + + describe service($service_name) do + it { should be_enabled } + it { should be_running } + end + + it 'should answer to files.example.net' do + shell("/usr/bin/curl -sSf files.example.net:80/").stdout.should eq("Hello World\n") + shell("/usr/bin/curl -sSf files.example.net:80/foo/").stdout.should eq("Hello Foo\n") + shell("/usr/bin/curl -sSf files.example.net:80/private.html", {:acceptable_exit_codes => 22}).stderr.should match(/curl: \(22\) The requested URL returned error: 403/) + shell("/usr/bin/curl -sSf files.example.net:80/bar/bar.html").stdout.should eq("Hello Bar\n") + end + end + + describe 'SetHandler directive' do + it 'should configure a vhost with a SetHandler directive' do + pp = <<-EOS + class { 'apache': } + apache::mod { 'status': } + host { 'files.example.net': ip => '127.0.0.1', } + apache::vhost { 'files.example.net': + docroot => '/var/www/files', + directories => [ + { path => '/var/www/files', }, + { path => '/server-status', provider => 'location', sethandler => 'server-status', }, + ], + } + file { '/var/www/files/index.html': + ensure => file, + content => "Hello World\\n", + } + EOS + apply_manifest(pp, :catch_failures => true) + end + + describe service($service_name) do + it { should be_enabled } + it { should be_running } + end + + it 'should answer to files.example.net' do + shell("/usr/bin/curl -sSf files.example.net:80/index.html").stdout.should eq("Hello World\n") + shell("/usr/bin/curl -sSf files.example.net:80/server-status?auto").stdout.should match(/Scoreboard: /) + end + end + end + + case fact('lsbdistcodename') + when 'precise', 'wheezy' + context 'vhost fallbackresouce example' do + it 'should configure a vhost with Fallbackresource' do + pp = <<-EOS + class { 'apache': } + apache::vhost { 'fallback.example.net': + docroot => '/var/www/fallback', + fallbackresource => '/index.html' + } + file { '/var/www/fallback/index.html': + ensure => file, + content => "Hello World\\n", + } + host { 'fallback.example.net': ip => '127.0.0.1', } + EOS + apply_manifest(pp, :catch_failures => true) + end + + describe service($service_name) do + it { should be_enabled } + it { should be_running } + end + + it 'should answer to fallback.example.net' do + shell("/usr/bin/curl fallback.example.net:80/Does/Not/Exist") do |r| + r.stdout.should == "Hello World\n" + end + end + + end + else + # The current stable RHEL release (6.4) comes with Apache httpd 2.2.15 + # That was released March 6, 2010. + # FallbackResource was backported to 2.2.16, and released July 25, 2010. + # Ubuntu Lucid (10.04) comes with apache2 2.2.14, released October 3, 2009. + # https://svn.apache.org/repos/asf/httpd/httpd/branches/2.2.x/STATUS + end + + context 'virtual_docroot hosting separate sites' do + it 'should configure a vhost with VirtualDocumentRoot' do + pp = <<-EOS + class { 'apache': } + apache::vhost { 'virt.example.com': + vhost_name => '*', + serveraliases => '*virt.example.com', + port => '80', + docroot => '/var/www/virt', + virtual_docroot => '/var/www/virt/%1', + } + host { 'virt.example.com': ip => '127.0.0.1', } + host { 'a.virt.example.com': ip => '127.0.0.1', } + host { 'b.virt.example.com': ip => '127.0.0.1', } + file { [ '/var/www/virt/a', '/var/www/virt/b', ]: ensure => directory, } + file { '/var/www/virt/a/index.html': ensure => file, content => "Hello from a.virt\\n", } + file { '/var/www/virt/b/index.html': ensure => file, content => "Hello from b.virt\\n", } + EOS + apply_manifest(pp, :catch_failures => true) + end + + describe service($service_name) do + it { should be_enabled } + it { should be_running } + end + + it 'should answer to a.virt.example.com' do + shell("/usr/bin/curl a.virt.example.com:80", {:acceptable_exit_codes => 0}) do |r| + r.stdout.should == "Hello from a.virt\n" + end + end + + it 'should answer to b.virt.example.com' do + shell("/usr/bin/curl b.virt.example.com:80", {:acceptable_exit_codes => 0}) do |r| + r.stdout.should == "Hello from b.virt\n" + end + end + end + + context 'proxy_pass for alternative vhost' do + it 'should configure a local vhost and a proxy vhost' do + apply_manifest(%{ + class { 'apache': default_vhost => false, } + apache::vhost { 'localhost': + docroot => '/var/www/local', + ip => '127.0.0.1', + port => '8888', + } + apache::listen { '*:80': } + apache::vhost { 'proxy.example.com': + docroot => '/var/www', + port => '80', + add_listen => false, + proxy_pass => { + 'path' => '/', + 'url' => 'http://localhost:8888/subdir/', + }, + } + host { 'proxy.example.com': ip => '127.0.0.1', } + file { ['/var/www/local', '/var/www/local/subdir']: ensure => directory, } + file { '/var/www/local/subdir/index.html': + ensure => file, + content => "Hello from localhost\\n", + } + }, :catch_failures => true) + end + + describe service($service_name) do + it { should be_enabled } + it { should be_running } + end + + it 'should get a response from the back end' do + shell("/usr/bin/curl --max-redirs 0 proxy.example.com:80") do |r| + r.stdout.should == "Hello from localhost\n" + r.exit_code.should == 0 + end + end + end + + describe 'ip_based' do + it 'applies cleanly' do + pp = <<-EOS + class { 'apache': } + host { 'test.server': ip => '127.0.0.1' } + apache::vhost { 'test.server': + docroot => '/tmp', + ip_based => true, + servername => 'test.server', + } + EOS + apply_manifest(pp, :catch_failures => true) + end + + describe file($ports_file) do + it { should be_file } + it { should_not contain 'NameVirtualHost test.server' } + end + end + + describe 'add_listen' do + it 'applies cleanly' do + pp = <<-EOS + class { 'apache': default_vhost => false } + host { 'testlisten.server': ip => '127.0.0.1' } + apache::listen { '81': } + apache::vhost { 'testlisten.server': + docroot => '/tmp', + port => '80', + add_listen => false, + servername => 'testlisten.server', + } + EOS + apply_manifest(pp, :catch_failures => true) + end + + describe file($ports_file) do + it { should be_file } + it { should_not contain 'Listen 80' } + it { should contain 'Listen 81' } + end + end + + describe 'docroot' do + it 'applies cleanly' do + pp = <<-EOS + user { 'test_owner': ensure => present, } + group { 'test_group': ensure => present, } + class { 'apache': } + host { 'test.server': ip => '127.0.0.1' } + apache::vhost { 'test.server': + docroot => '/tmp/test', + docroot_owner => 'test_owner', + docroot_group => 'test_group', + docroot_mode => '0750', + } + EOS + apply_manifest(pp, :catch_failures => true) + end + + describe file('/tmp/test') do + it { should be_directory } + it { should be_owned_by 'test_owner' } + it { should be_grouped_into 'test_group' } + it { should be_mode 750 } + end + end + + describe 'default_vhost' do + it 'applies cleanly' do + pp = <<-EOS + class { 'apache': } + host { 'test.server': ip => '127.0.0.1' } + apache::vhost { 'test.server': + docroot => '/tmp', + default_vhost => true, + } + EOS + apply_manifest(pp, :catch_failures => true) + end + + describe file($ports_file) do + it { should be_file } + if fact('osfamily') == 'RedHat' and fact('operatingsystemmajrelease') == '7' + it { should_not contain 'NameVirtualHost test.server' } + elsif fact('operatingsystem') == 'Ubuntu' and fact('operatingsystemrelease') =~ /(14\.04|13\.10)/ + it { should_not contain 'NameVirtualHost test.server' } + else + it { should contain 'NameVirtualHost test.server' } + end + end + + describe file("#{$vhost_dir}/10-test.server.conf") do + it { should be_file } + end + end + + describe 'options' do + it 'applies cleanly' do + pp = <<-EOS + class { 'apache': } + host { 'test.server': ip => '127.0.0.1' } + apache::vhost { 'test.server': + docroot => '/tmp', + options => ['Indexes','FollowSymLinks', 'ExecCGI'], + } + EOS + apply_manifest(pp, :catch_failures => true) + end + + describe file("#{$vhost_dir}/25-test.server.conf") do + it { should be_file } + it { should contain 'Options Indexes FollowSymLinks ExecCGI' } + end + end + + describe 'override' do + it 'applies cleanly' do + pp = <<-EOS + class { 'apache': } + host { 'test.server': ip => '127.0.0.1' } + apache::vhost { 'test.server': + docroot => '/tmp', + override => ['All'], + } + EOS + apply_manifest(pp, :catch_failures => true) + end + + describe file("#{$vhost_dir}/25-test.server.conf") do + it { should be_file } + it { should contain 'AllowOverride All' } + end + end + + describe 'logroot' do + it 'applies cleanly' do + pp = <<-EOS + class { 'apache': } + host { 'test.server': ip => '127.0.0.1' } + apache::vhost { 'test.server': + docroot => '/tmp', + logroot => '/tmp', + } + EOS + apply_manifest(pp, :catch_failures => true) + end + + describe file("#{$vhost_dir}/25-test.server.conf") do + it { should be_file } + it { should contain ' CustomLog "/tmp' } + end + end + + ['access', 'error'].each do |logtype| + case logtype + when 'access' + logname = 'CustomLog' + when 'error' + logname = 'ErrorLog' + end + + describe "#{logtype}_log" do + it 'applies cleanly' do + pp = <<-EOS + class { 'apache': } + host { 'test.server': ip => '127.0.0.1' } + apache::vhost { 'test.server': + docroot => '/tmp', + logroot => '/tmp', + #{logtype}_log => false, + } + EOS + apply_manifest(pp, :catch_failures => true) + end + + describe file("#{$vhost_dir}/25-test.server.conf") do + it { should be_file } + it { should_not contain " #{logname} \"/tmp" } + end + end + + describe "#{logtype}_log_pipe" do + it 'applies cleanly' do + pp = <<-EOS + class { 'apache': } + host { 'test.server': ip => '127.0.0.1' } + apache::vhost { 'test.server': + docroot => '/tmp', + logroot => '/tmp', + #{logtype}_log_pipe => '|/bin/sh', + } + EOS + apply_manifest(pp, :catch_failures => true) + end + + describe file("#{$vhost_dir}/25-test.server.conf") do + it { should be_file } + it { should contain " #{logname} \"|/bin/sh" } + end + end + + describe "#{logtype}_log_syslog" do + it 'applies cleanly' do + pp = <<-EOS + class { 'apache': } + host { 'test.server': ip => '127.0.0.1' } + apache::vhost { 'test.server': + docroot => '/tmp', + logroot => '/tmp', + #{logtype}_log_syslog => 'syslog', + } + EOS + apply_manifest(pp, :catch_failures => true) + end + + describe file("#{$vhost_dir}/25-test.server.conf") do + it { should be_file } + it { should contain " #{logname} \"syslog\"" } + end + end + end + + describe 'access_log_format' do + it 'applies cleanly' do + pp = <<-EOS + class { 'apache': } + host { 'test.server': ip => '127.0.0.1' } + apache::vhost { 'test.server': + docroot => '/tmp', + logroot => '/tmp', + access_log_syslog => 'syslog', + access_log_format => '%h %l', + } + EOS + apply_manifest(pp, :catch_failures => true) + end + + describe file("#{$vhost_dir}/25-test.server.conf") do + it { should be_file } + it { should contain 'CustomLog "syslog" "%h %l"' } + end + end + + describe 'access_log_env_var' do + it 'applies cleanly' do + pp = <<-EOS + class { 'apache': } + host { 'test.server': ip => '127.0.0.1' } + apache::vhost { 'test.server': + docroot => '/tmp', + logroot => '/tmp', + access_log_syslog => 'syslog', + access_log_env_var => 'admin', + } + EOS + apply_manifest(pp, :catch_failures => true) + end + + describe file("#{$vhost_dir}/25-test.server.conf") do + it { should be_file } + it { should contain 'CustomLog "syslog" combined env=admin' } + end + end + + describe 'aliases' do + it 'applies cleanly' do + pp = <<-EOS + class { 'apache': } + host { 'test.server': ip => '127.0.0.1' } + apache::vhost { 'test.server': + docroot => '/tmp', + aliases => [{ alias => '/image', path => '/ftp/pub/image' }], + } + EOS + apply_manifest(pp, :catch_failures => true) + end + + describe file("#{$vhost_dir}/25-test.server.conf") do + it { should be_file } + it { should contain 'Alias /image "/ftp/pub/image"' } + end + end + + describe 'scriptaliases' do + it 'applies cleanly' do + pp = <<-EOS + class { 'apache': } + host { 'test.server': ip => '127.0.0.1' } + apache::vhost { 'test.server': + docroot => '/tmp', + scriptaliases => [{ alias => '/myscript', path => '/usr/share/myscript', }], + } + EOS + apply_manifest(pp, :catch_failures => true) + end + + describe file("#{$vhost_dir}/25-test.server.conf") do + it { should be_file } + it { should contain 'ScriptAlias /myscript "/usr/share/myscript"' } + end + end + + describe 'proxy' do + it 'applies cleanly' do + pp = <<-EOS + class { 'apache': service_ensure => stopped, } + host { 'test.server': ip => '127.0.0.1' } + apache::vhost { 'test.server': + docroot => '/tmp', + proxy_dest => 'test2', + } + EOS + apply_manifest(pp, :catch_failures => true) + end + + describe file("#{$vhost_dir}/25-test.server.conf") do + it { should be_file } + it { should contain 'ProxyPass / test2/' } + end + end + + describe 'actions' do + it 'applies cleanly' do + pp = <<-EOS + class { 'apache': } + host { 'test.server': ip => '127.0.0.1' } + apache::vhost { 'test.server': + docroot => '/tmp', + action => 'php-fastcgi', + } + EOS + pp = pp + "\nclass { 'apache::mod::actions': }" if fact('osfamily') == 'Debian' + apply_manifest(pp, :catch_failures => true) + end + + describe file("#{$vhost_dir}/25-test.server.conf") do + it { should be_file } + it { should contain 'Action php-fastcgi /cgi-bin virtual' } + end + end + + describe 'suphp' do + it 'applies cleanly' do + pp = <<-EOS + class { 'apache': service_ensure => stopped, } + host { 'test.server': ip => '127.0.0.1' } + apache::vhost { 'test.server': + docroot => '/tmp', + suphp_addhandler => '#{$suphp_handler}', + suphp_engine => 'on', + suphp_configpath => '#{$suphp_configpath}', + } + EOS + apply_manifest(pp, :catch_failures => true) + end + + describe file("#{$vhost_dir}/25-test.server.conf") do + it { should be_file } + it { should contain "suPHP_AddHandler #{$suphp_handler}" } + it { should contain 'suPHP_Engine on' } + it { should contain "suPHP_ConfigPath \"#{$suphp_configpath}\"" } + end + end + + describe 'no_proxy_uris' do + it 'applies cleanly' do + pp = <<-EOS + class { 'apache': service_ensure => stopped, } + host { 'test.server': ip => '127.0.0.1' } + apache::vhost { 'test.server': + docroot => '/tmp', + proxy_dest => 'http://test2', + no_proxy_uris => [ 'http://test2/test' ], + } + EOS + apply_manifest(pp, :catch_failures => true) + end + + describe file("#{$vhost_dir}/25-test.server.conf") do + it { should be_file } + it { should contain 'ProxyPass / http://test2/' } + it { should contain 'ProxyPass http://test2/test !' } + end + end + + describe 'redirect' do + it 'applies cleanly' do + pp = <<-EOS + class { 'apache': } + host { 'test.server': ip => '127.0.0.1' } + apache::vhost { 'test.server': + docroot => '/tmp', + redirect_source => ['/images'], + redirect_dest => ['http://test.server/'], + redirect_status => ['permanent'], + } + EOS + apply_manifest(pp, :catch_failures => true) + end + + describe file("#{$vhost_dir}/25-test.server.conf") do + it { should be_file } + it { should contain 'Redirect permanent /images http://test.server/' } + end + end + + # Passenger isn't even in EPEL on el-5 + if default['platform'] !~ /^el-5/ + describe 'rack_base_uris' do + if fact('osfamily') == 'RedHat' + it 'adds epel' do + pp = "class { 'epel': }" + apply_manifest(pp, :catch_failures => true) + end + end + + it 'applies cleanly' do + pp = <<-EOS + class { 'apache': } + host { 'test.server': ip => '127.0.0.1' } + apache::vhost { 'test.server': + docroot => '/tmp', + rack_base_uris => ['/test'], + } + EOS + apply_manifest(pp, :catch_failures => true) + end + + describe file("#{$vhost_dir}/25-test.server.conf") do + it { should be_file } + it { should contain 'RackBaseURI /test' } + end + end + end + + + describe 'request_headers' do + it 'applies cleanly' do + pp = <<-EOS + class { 'apache': } + host { 'test.server': ip => '127.0.0.1' } + apache::vhost { 'test.server': + docroot => '/tmp', + request_headers => ['append MirrorID "mirror 12"'], + } + EOS + apply_manifest(pp, :catch_failures => true) + end + + describe file("#{$vhost_dir}/25-test.server.conf") do + it { should be_file } + it { should contain 'append MirrorID "mirror 12"' } + end + end + + describe 'rewrite rules' do + it 'applies cleanly' do + pp = <<-EOS + class { 'apache': } + host { 'test.server': ip => '127.0.0.1' } + apache::vhost { 'test.server': + docroot => '/tmp', + rewrites => [ + { comment => 'test', + rewrite_cond => '%{HTTP_USER_AGENT} ^Lynx/ [OR]', + rewrite_rule => ['^index\.html$ welcome.html'], + } + ], + } + EOS + apply_manifest(pp, :catch_failures => true) + end + + describe file("#{$vhost_dir}/25-test.server.conf") do + it { should be_file } + it { should contain '#test' } + it { should contain 'RewriteCond %{HTTP_USER_AGENT} ^Lynx/ [OR]' } + it { should contain 'RewriteRule ^index.html$ welcome.html' } + end + end + + describe 'setenv/setenvif' do + it 'applies cleanly' do + pp = <<-EOS + class { 'apache': } + host { 'test.server': ip => '127.0.0.1' } + apache::vhost { 'test.server': + docroot => '/tmp', + setenv => ['TEST /test'], + setenvif => ['Request_URI "\.gif$" object_is_image=gif'] + } + EOS + apply_manifest(pp, :catch_failures => true) + end + + describe file("#{$vhost_dir}/25-test.server.conf") do + it { should be_file } + it { should contain 'SetEnv TEST /test' } + it { should contain 'SetEnvIf Request_URI "\.gif$" object_is_image=gif' } + end + end + + describe 'block' do + it 'applies cleanly' do + pp = <<-EOS + class { 'apache': } + host { 'test.server': ip => '127.0.0.1' } + apache::vhost { 'test.server': + docroot => '/tmp', + block => 'scm', + } + EOS + apply_manifest(pp, :catch_failures => true) + end + + describe file("#{$vhost_dir}/25-test.server.conf") do + it { should be_file } + it { should contain '' } + end + end + + describe 'wsgi' do + it 'import_script applies cleanly' do + pp = <<-EOS + class { 'apache': } + class { 'apache::mod::wsgi': } + host { 'test.server': ip => '127.0.0.1' } + apache::vhost { 'test.server': + docroot => '/tmp', + wsgi_application_group => '%{GLOBAL}', + wsgi_daemon_process => 'wsgi', + wsgi_daemon_process_options => {processes => '2'}, + wsgi_process_group => 'nobody', + wsgi_script_aliases => { '/test' => '/test1' }, + wsgi_pass_authorization => 'On', + } + EOS + apply_manifest(pp, :catch_failures => true) + end + + it 'import_script applies cleanly', :unless => (fact('lsbdistcodename') == 'lucid' or UNSUPPORTED_PLATFORMS.include?(fact('osfamily'))) do + pp = <<-EOS + class { 'apache': } + class { 'apache::mod::wsgi': } + host { 'test.server': ip => '127.0.0.1' } + apache::vhost { 'test.server': + docroot => '/tmp', + wsgi_application_group => '%{GLOBAL}', + wsgi_daemon_process => 'wsgi', + wsgi_daemon_process_options => {processes => '2'}, + wsgi_import_script => '/test1', + wsgi_import_script_options => { application-group => '%{GLOBAL}', process-group => 'wsgi' }, + wsgi_process_group => 'nobody', + wsgi_script_aliases => { '/test' => '/test1' }, + wsgi_pass_authorization => 'On', + } + EOS + apply_manifest(pp, :catch_failures => true) + end + + describe file("#{$vhost_dir}/25-test.server.conf"), :unless => (fact('lsbdistcodename') == 'lucid' or UNSUPPORTED_PLATFORMS.include?(fact('osfamily'))) do + it { should be_file } + it { should contain 'WSGIApplicationGroup %{GLOBAL}' } + it { should contain 'WSGIDaemonProcess wsgi processes=2' } + it { should contain 'WSGIImportScript /test1 application-group=%{GLOBAL} process-group=wsgi' } + it { should contain 'WSGIProcessGroup nobody' } + it { should contain 'WSGIScriptAlias /test "/test1"' } + it { should contain 'WSGIPassAuthorization On' } + end + end + + describe 'custom_fragment' do + it 'applies cleanly' do + pp = <<-EOS + class { 'apache': } + host { 'test.server': ip => '127.0.0.1' } + apache::vhost { 'test.server': + docroot => '/tmp', + custom_fragment => inline_template('#weird test string'), + } + EOS + apply_manifest(pp, :catch_failures => true) + end + + describe file("#{$vhost_dir}/25-test.server.conf") do + it { should be_file } + it { should contain '#weird test string' } + end + end + + describe 'itk' do + it 'applies cleanly' do + pp = <<-EOS + class { 'apache': } + host { 'test.server': ip => '127.0.0.1' } + apache::vhost { 'test.server': + docroot => '/tmp', + itk => { user => 'nobody', group => 'nobody' } + } + EOS + apply_manifest(pp, :catch_failures => true) + end + + describe file("#{$vhost_dir}/25-test.server.conf") do + it { should be_file } + it { should contain 'AssignUserId nobody nobody' } + end + end + + # So what does this work on? + if default['platform'] !~ /^(debian-(6|7)|el-(5|6|7))/ + describe 'fastcgi' do + it 'applies cleanly' do + pp = <<-EOS + class { 'apache': } + class { 'apache::mod::fastcgi': } + host { 'test.server': ip => '127.0.0.1' } + apache::vhost { 'test.server': + docroot => '/tmp', + fastcgi_server => 'localhost', + fastcgi_socket => '/tmp/fast/1234', + fastcgi_dir => '/tmp/fast', + } + EOS + apply_manifest(pp, :catch_failures => true) + end + + describe file("#{$vhost_dir}/25-test.server.conf") do + it { should be_file } + it { should contain 'FastCgiExternalServer localhost -socket /tmp/fast/1234' } + it { should contain '' } + end + end + end + + describe 'additional_includes' do + it 'applies cleanly' do + pp = <<-EOS + if $::osfamily == 'RedHat' and $::selinux == 'true' { + exec { 'set_apache_defaults': + command => 'semanage fcontext -a -t httpd_sys_content_t "/apache_spec(/.*)?"', + path => '/bin:/usr/bin/:/sbin:/usr/sbin', + require => Package[$semanage_package], + } + $semanage_package = $::operatingsystemmajrelease ? { + '5' => 'policycoreutils', + 'default' => 'policycoreutils-python', + } + + package { $semanage_package: ensure => installed } + exec { 'restorecon_apache': + command => 'restorecon -Rv /apache_spec', + path => '/bin:/usr/bin/:/sbin:/usr/sbin', + before => Service['httpd'], + require => Class['apache'], + } + } + class { 'apache': } + host { 'test.server': ip => '127.0.0.1' } + file { '/apache_spec': ensure => directory, } + file { '/apache_spec/include': ensure => present, content => '#additional_includes' } + apache::vhost { 'test.server': + docroot => '/apache_spec', + additional_includes => '/apache_spec/include', + } + EOS + apply_manifest(pp, :catch_failures => true) + end + + describe file("#{$vhost_dir}/25-test.server.conf") do + it { should be_file } + it { should contain 'Include "/apache_spec/include"' } + end + end + +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/spec/classes/apache_spec.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/spec/classes/apache_spec.rb new file mode 100644 index 00000000000..f32fec80886 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/spec/classes/apache_spec.rb @@ -0,0 +1,563 @@ +require 'spec_helper' + +describe 'apache', :type => :class do + context "on a Debian OS" do + let :facts do + { + :id => 'root', + :kernel => 'Linux', + :lsbdistcodename => 'squeeze', + :osfamily => 'Debian', + :operatingsystem => 'Debian', + :operatingsystemrelease => '6', + :path => '/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin', + :concat_basedir => '/dne', + } + end + it { should contain_class("apache::params") } + it { should contain_package("httpd").with( + 'notify' => 'Class[Apache::Service]', + 'ensure' => 'installed' + ) + } + it { should contain_user("www-data") } + it { should contain_group("www-data") } + it { should contain_class("apache::service") } + it { should contain_file("/etc/apache2/sites-enabled").with( + 'ensure' => 'directory', + 'recurse' => 'true', + 'purge' => 'true', + 'notify' => 'Class[Apache::Service]', + 'require' => 'Package[httpd]' + ) + } + it { should contain_file("/etc/apache2/mods-enabled").with( + 'ensure' => 'directory', + 'recurse' => 'true', + 'purge' => 'true', + 'notify' => 'Class[Apache::Service]', + 'require' => 'Package[httpd]' + ) + } + it { should contain_file("/etc/apache2/mods-available").with( + 'ensure' => 'directory', + 'recurse' => 'true', + 'purge' => 'false', + 'notify' => 'Class[Apache::Service]', + 'require' => 'Package[httpd]' + ) + } + it { should contain_concat("/etc/apache2/ports.conf").with( + 'owner' => 'root', + 'group' => 'root', + 'mode' => '0644', + 'notify' => 'Class[Apache::Service]' + ) + } + # Assert that load files are placed and symlinked for these mods, but no conf file. + [ + 'auth_basic', + 'authn_file', + 'authz_default', + 'authz_groupfile', + 'authz_host', + 'authz_user', + 'dav', + 'env' + ].each do |modname| + it { should contain_file("#{modname}.load").with( + 'path' => "/etc/apache2/mods-available/#{modname}.load", + 'ensure' => 'file' + ) } + it { should contain_file("#{modname}.load symlink").with( + 'path' => "/etc/apache2/mods-enabled/#{modname}.load", + 'ensure' => 'link', + 'target' => "/etc/apache2/mods-available/#{modname}.load" + ) } + it { should_not contain_file("#{modname}.conf") } + it { should_not contain_file("#{modname}.conf symlink") } + end + + context "with Apache version < 2.4" do + let :params do + { :apache_version => '2.2' } + end + + it { should contain_file("/etc/apache2/apache2.conf").with_content %r{^Include "/etc/apache2/conf\.d/\*\.conf"$} } + end + + context "with Apache version >= 2.4" do + let :params do + { :apache_version => '2.4' } + end + + it { should contain_file("/etc/apache2/apache2.conf").with_content %r{^IncludeOptional "/etc/apache2/conf\.d/\*\.conf"$} } + end + + # Assert that both load files and conf files are placed and symlinked for these mods + [ + 'alias', + 'autoindex', + 'dav_fs', + 'deflate', + 'dir', + 'mime', + 'negotiation', + 'setenvif', + ].each do |modname| + it { should contain_file("#{modname}.load").with( + 'path' => "/etc/apache2/mods-available/#{modname}.load", + 'ensure' => 'file' + ) } + it { should contain_file("#{modname}.load symlink").with( + 'path' => "/etc/apache2/mods-enabled/#{modname}.load", + 'ensure' => 'link', + 'target' => "/etc/apache2/mods-available/#{modname}.load" + ) } + it { should contain_file("#{modname}.conf").with( + 'path' => "/etc/apache2/mods-available/#{modname}.conf", + 'ensure' => 'file' + ) } + it { should contain_file("#{modname}.conf symlink").with( + 'path' => "/etc/apache2/mods-enabled/#{modname}.conf", + 'ensure' => 'link', + 'target' => "/etc/apache2/mods-available/#{modname}.conf" + ) } + end + + describe "Don't create user resource" do + context "when parameter manage_user is false" do + let :params do + { :manage_user => false } + end + + it { should_not contain_user('www-data') } + it { should contain_file("/etc/apache2/apache2.conf").with_content %r{^User www-data\n} } + end + end + describe "Don't create group resource" do + context "when parameter manage_group is false" do + let :params do + { :manage_group => false } + end + + it { should_not contain_group('www-data') } + it { should contain_file("/etc/apache2/apache2.conf").with_content %r{^Group www-data\n} } + end + end + + describe "Add extra LogFormats" do + context "When parameter log_formats is a hash" do + let :params do + { :log_formats => { + 'vhost_common' => "%v %h %l %u %t \"%r\" %>s %b", + 'vhost_combined' => "%v %h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-agent}i\"" + } } + end + + it { should contain_file("/etc/apache2/apache2.conf").with_content %r{^LogFormat "%v %h %l %u %t \"%r\" %>s %b" vhost_common\n} } + it { should contain_file("/etc/apache2/apache2.conf").with_content %r{^LogFormat "%v %h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-agent}i\"" vhost_combined\n} } + end + end + + context "on Ubuntu" do + let :facts do + super().merge({ + :operatingsystem => 'Ubuntu' + }) + end + + context "13.10" do + let :facts do + super().merge({ + :lsbdistrelease => '13.10', + :operatingsystemrelease => '13.10' + }) + end + it { should contain_class('apache').with_apache_version('2.4') } + end + context "12.04" do + let :facts do + super().merge({ + :lsbdistrelease => '12.04', + :operatingsystemrelease => '12.04' + }) + end + it { should contain_class('apache').with_apache_version('2.2') } + end + context "13.04" do + let :facts do + super().merge({ + :lsbdistrelease => '13.04', + :operatingsystemrelease => '13.04' + }) + end + it { should contain_class('apache').with_apache_version('2.2') } + end + end + end + context "on a RedHat 5 OS" do + let :facts do + { + :id => 'root', + :kernel => 'Linux', + :osfamily => 'RedHat', + :operatingsystem => 'RedHat', + :operatingsystemrelease => '5', + :concat_basedir => '/dne', + :path => '/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin', + } + end + it { should contain_class("apache::params") } + it { should contain_package("httpd").with( + 'notify' => 'Class[Apache::Service]', + 'ensure' => 'installed' + ) + } + it { should contain_user("apache") } + it { should contain_group("apache") } + it { should contain_class("apache::service") } + it { should contain_file("/etc/httpd/conf.d").with( + 'ensure' => 'directory', + 'recurse' => 'true', + 'purge' => 'true', + 'notify' => 'Class[Apache::Service]', + 'require' => 'Package[httpd]' + ) + } + it { should contain_concat("/etc/httpd/conf/ports.conf").with( + 'owner' => 'root', + 'group' => 'root', + 'mode' => '0644', + 'notify' => 'Class[Apache::Service]' + ) + } + describe "Alternate confd/mod/vhosts directory" do + let :params do + { + :vhost_dir => '/etc/httpd/site.d', + :confd_dir => '/etc/httpd/conf.d', + :mod_dir => '/etc/httpd/mod.d', + } + end + + ['mod.d','site.d','conf.d'].each do |dir| + it { should contain_file("/etc/httpd/#{dir}").with( + 'ensure' => 'directory', + 'recurse' => 'true', + 'purge' => 'true', + 'notify' => 'Class[Apache::Service]', + 'require' => 'Package[httpd]' + ) } + end + + # Assert that load files are placed for these mods, but no conf file. + [ + 'auth_basic', + 'authn_file', + 'authz_default', + 'authz_groupfile', + 'authz_host', + 'authz_user', + 'dav', + 'env', + ].each do |modname| + it { should contain_file("#{modname}.load").with_path( + "/etc/httpd/mod.d/#{modname}.load" + ) } + it { should_not contain_file("#{modname}.conf").with_path( + "/etc/httpd/mod.d/#{modname}.conf" + ) } + end + + # Assert that both load files and conf files are placed for these mods + [ + 'alias', + 'autoindex', + 'dav_fs', + 'deflate', + 'dir', + 'mime', + 'negotiation', + 'setenvif', + ].each do |modname| + it { should contain_file("#{modname}.load").with_path( + "/etc/httpd/mod.d/#{modname}.load" + ) } + it { should contain_file("#{modname}.conf").with_path( + "/etc/httpd/mod.d/#{modname}.conf" + ) } + end + + context "with Apache version < 2.4" do + let :params do + { :apache_version => '2.2' } + end + + it { should contain_file("/etc/httpd/conf/httpd.conf").with_content %r{^Include "/etc/httpd/conf\.d/\*\.conf"$} } + end + + context "with Apache version >= 2.4" do + let :params do + { :apache_version => '2.4' } + end + + it { should contain_file("/etc/httpd/conf/httpd.conf").with_content %r{^IncludeOptional "/etc/httpd/conf\.d/\*\.conf"$} } + end + + it { should contain_file("/etc/httpd/conf/httpd.conf").with_content %r{^Include "/etc/httpd/site\.d/\*"$} } + it { should contain_file("/etc/httpd/conf/httpd.conf").with_content %r{^Include "/etc/httpd/mod\.d/\*\.conf"$} } + it { should contain_file("/etc/httpd/conf/httpd.conf").with_content %r{^Include "/etc/httpd/mod\.d/\*\.load"$} } + end + + describe "Alternate conf.d directory" do + let :params do + { :confd_dir => '/etc/httpd/special_conf.d' } + end + + it { should contain_file("/etc/httpd/special_conf.d").with( + 'ensure' => 'directory', + 'recurse' => 'true', + 'purge' => 'true', + 'notify' => 'Class[Apache::Service]', + 'require' => 'Package[httpd]' + ) } + end + + describe "Alternate mpm_modules" do + context "when declaring mpm_module is false" do + let :params do + { :mpm_module => false } + end + it 'should not declare mpm modules' do + should_not contain_class('apache::mod::event') + should_not contain_class('apache::mod::itk') + should_not contain_class('apache::mod::peruser') + should_not contain_class('apache::mod::prefork') + should_not contain_class('apache::mod::worker') + end + end + context "when declaring mpm_module => prefork" do + let :params do + { :mpm_module => 'prefork' } + end + it { should contain_class('apache::mod::prefork') } + it { should_not contain_class('apache::mod::event') } + it { should_not contain_class('apache::mod::itk') } + it { should_not contain_class('apache::mod::peruser') } + it { should_not contain_class('apache::mod::worker') } + end + context "when declaring mpm_module => worker" do + let :params do + { :mpm_module => 'worker' } + end + it { should contain_class('apache::mod::worker') } + it { should_not contain_class('apache::mod::event') } + it { should_not contain_class('apache::mod::itk') } + it { should_not contain_class('apache::mod::peruser') } + it { should_not contain_class('apache::mod::prefork') } + end + context "when declaring mpm_module => breakme" do + let :params do + { :mpm_module => 'breakme' } + end + it { expect { subject }.to raise_error Puppet::Error, /does not match/ } + end + end + + describe "different templates for httpd.conf" do + context "with default" do + let :params do + { :conf_template => 'apache/httpd.conf.erb' } + end + it { should contain_file("/etc/httpd/conf/httpd.conf").with_content %r{^# Security\n} } + end + context "with non-default" do + let :params do + { :conf_template => 'site_apache/fake.conf.erb' } + end + it { should contain_file("/etc/httpd/conf/httpd.conf").with_content %r{^Fake template for rspec.$} } + end + end + + describe "default mods" do + context "without" do + let :params do + { :default_mods => false } + end + + it { should contain_apache__mod('authz_host') } + it { should_not contain_apache__mod('env') } + end + context "custom" do + let :params do + { :default_mods => [ + 'info', + 'alias', + 'mime', + 'env', + 'setenv', + 'expires', + ]} + end + + it { should contain_apache__mod('authz_host') } + it { should contain_apache__mod('env') } + it { should contain_class('apache::mod::info') } + it { should contain_class('apache::mod::mime') } + end + end + describe "Don't create user resource" do + context "when parameter manage_user is false" do + let :params do + { :manage_user => false } + end + + it { should_not contain_user('apache') } + it { should contain_file("/etc/httpd/conf/httpd.conf").with_content %r{^User apache\n} } + end + end + describe "Don't create group resource" do + context "when parameter manage_group is false" do + let :params do + { :manage_group => false } + end + + it { should_not contain_group('apache') } + it { should contain_file("/etc/httpd/conf/httpd.conf").with_content %r{^Group apache\n} } + + end + end + describe "sendfile" do + context "with invalid value" do + let :params do + { :sendfile => 'foo' } + end + it "should fail" do + expect do + subject + end.to raise_error(Puppet::Error, /"foo" does not match/) + end + end + context "On" do + let :params do + { :sendfile => 'On' } + end + it { should contain_file("/etc/httpd/conf/httpd.conf").with_content %r{^EnableSendfile On\n} } + end + context "Off" do + let :params do + { :sendfile => 'Off' } + end + it { should contain_file("/etc/httpd/conf/httpd.conf").with_content %r{^EnableSendfile Off\n} } + end + end + end + context "on a FreeBSD OS" do + let :facts do + { + :id => 'root', + :kernel => 'FreeBSD', + :osfamily => 'FreeBSD', + :operatingsystem => 'FreeBSD', + :operatingsystemrelease => '9', + :concat_basedir => '/dne', + :path => '/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin', + } + end + it { should contain_class("apache::params") } + it { should contain_class("apache::package").with({'ensure' => 'present'}) } + it { should contain_user("www") } + it { should contain_group("www") } + it { should contain_class("apache::service") } + it { should contain_file("/usr/local/etc/apache22/Vhosts").with( + 'ensure' => 'directory', + 'recurse' => 'true', + 'purge' => 'true', + 'notify' => 'Class[Apache::Service]', + 'require' => 'Package[httpd]' + ) } + it { should contain_file("/usr/local/etc/apache22/Modules").with( + 'ensure' => 'directory', + 'recurse' => 'true', + 'purge' => 'true', + 'notify' => 'Class[Apache::Service]', + 'require' => 'Package[httpd]' + ) } + it { should contain_concat("/usr/local/etc/apache22/ports.conf").with( + 'owner' => 'root', + 'group' => 'wheel', + 'mode' => '0644', + 'notify' => 'Class[Apache::Service]' + ) } + # Assert that load files are placed for these mods, but no conf file. + [ + 'auth_basic', + 'authn_file', + 'authz_default', + 'authz_groupfile', + 'authz_host', + 'authz_user', + 'dav', + 'env' + ].each do |modname| + it { should contain_file("#{modname}.load").with( + 'path' => "/usr/local/etc/apache22/Modules/#{modname}.load", + 'ensure' => 'file' + ) } + it { should_not contain_file("#{modname}.conf") } + end + + # Assert that both load files and conf files are placed for these mods + [ + 'alias', + 'autoindex', + 'dav_fs', + 'deflate', + 'dir', + 'mime', + 'negotiation', + 'setenvif', + ].each do |modname| + it { should contain_file("#{modname}.load").with( + 'path' => "/usr/local/etc/apache22/Modules/#{modname}.load", + 'ensure' => 'file' + ) } + it { should contain_file("#{modname}.conf").with( + 'path' => "/usr/local/etc/apache22/Modules/#{modname}.conf", + 'ensure' => 'file' + ) } + end + end + context 'on all OSes' do + let :facts do + { + :id => 'root', + :kernel => 'Linux', + :osfamily => 'RedHat', + :operatingsystem => 'RedHat', + :operatingsystemrelease => '6', + :concat_basedir => '/dne', + :path => '/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin', + } + end + context 'default vhost defaults' do + it { should contain_apache__vhost('default').with_ensure('present') } + it { should contain_apache__vhost('default-ssl').with_ensure('absent') } + end + context 'without default non-ssl vhost' do + let :params do { + :default_vhost => false + } + end + it { should contain_apache__vhost('default').with_ensure('absent') } + end + context 'with default ssl vhost' do + let :params do { + :default_ssl_vhost => true + } + end + it { should contain_apache__vhost('default-ssl').with_ensure('present') } + end + end +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/spec/classes/dev_spec.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/spec/classes/dev_spec.rb new file mode 100644 index 00000000000..eceadca4a72 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/spec/classes/dev_spec.rb @@ -0,0 +1,42 @@ +require 'spec_helper' + +describe 'apache::dev', :type => :class do + context "on a Debian OS" do + let :facts do + { + :lsbdistcodename => 'squeeze', + :osfamily => 'Debian', + :operatingsystem => 'Debian', + :operatingsystemrelease => '6', + } + end + it { should contain_class("apache::params") } + it { should contain_package("libaprutil1-dev") } + it { should contain_package("libapr1-dev") } + it { should contain_package("apache2-prefork-dev") } + end + context "on a RedHat OS" do + let :facts do + { + :osfamily => 'RedHat', + :operatingsystem => 'RedHat', + :operatingsystemrelease => '6', + } + end + it { should contain_class("apache::params") } + it { should contain_package("httpd-devel") } + end + context "on a FreeBSD OS" do + let :pre_condition do + 'include apache::package' + end + let :facts do + { + :osfamily => 'FreeBSD', + :operatingsystem => 'FreeBSD', + :operatingsystemrelease => '9', + } + end + it { should contain_class("apache::params") } + end +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/spec/classes/mod/auth_kerb_spec.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/spec/classes/mod/auth_kerb_spec.rb new file mode 100644 index 00000000000..6e2c16b7e9a --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/spec/classes/mod/auth_kerb_spec.rb @@ -0,0 +1,56 @@ +require 'spec_helper' + +describe 'apache::mod::auth_kerb', :type => :class do + let :pre_condition do + 'include apache' + end + context "on a Debian OS", :compile do + let :facts do + { + :id => 'root', + :kernel => 'Linux', + :lsbdistcodename => 'squeeze', + :osfamily => 'Debian', + :operatingsystem => 'Debian', + :operatingsystemrelease => '6', + :path => '/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin', + :concat_basedir => '/dne', + } + end + it { should contain_class("apache::params") } + it { should contain_apache__mod("auth_kerb") } + it { should contain_package("libapache2-mod-auth-kerb") } + end + context "on a RedHat OS", :compile do + let :facts do + { + :id => 'root', + :kernel => 'Linux', + :osfamily => 'RedHat', + :operatingsystem => 'RedHat', + :operatingsystemrelease => '6', + :path => '/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin', + :concat_basedir => '/dne', + } + end + it { should contain_class("apache::params") } + it { should contain_apache__mod("auth_kerb") } + it { should contain_package("mod_auth_kerb") } + end + context "on a FreeBSD OS", :compile do + let :facts do + { + :id => 'root', + :kernel => 'FreeBSD', + :osfamily => 'FreeBSD', + :operatingsystem => 'FreeBSD', + :operatingsystemrelease => '9', + :path => '/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin', + :concat_basedir => '/dne', + } + end + it { should contain_class("apache::params") } + it { should contain_apache__mod("auth_kerb") } + it { should contain_package("www/mod_auth_kerb2") } + end +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/spec/classes/mod/authnz_ldap_spec.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/spec/classes/mod/authnz_ldap_spec.rb new file mode 100644 index 00000000000..d9ca5398b15 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/spec/classes/mod/authnz_ldap_spec.rb @@ -0,0 +1,76 @@ +require 'spec_helper' + +describe 'apache::mod::authnz_ldap', :type => :class do + let :pre_condition do + 'include apache' + end + + context "on a Debian OS" do + let :facts do + { + :lsbdistcodename => 'squeeze', + :osfamily => 'Debian', + :operatingsystemrelease => '6', + :concat_basedir => '/dne', + :id => 'root', + :kernel => 'Linux', + :operatingsystem => 'Debian', + :path => '/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin', + } + end + it { should contain_class("apache::params") } + it { should contain_class("apache::mod::ldap") } + it { should contain_apache__mod('authnz_ldap') } + + context 'default verifyServerCert' do + it { should contain_file('authnz_ldap.conf').with_content(/^LDAPVerifyServerCert On$/) } + end + + context 'verifyServerCert = false' do + let(:params) { { :verifyServerCert => false } } + it { should contain_file('authnz_ldap.conf').with_content(/^LDAPVerifyServerCert Off$/) } + end + + context 'verifyServerCert = wrong' do + let(:params) { { :verifyServerCert => 'wrong' } } + it 'should raise an error' do + expect { should raise_error Puppet::Error } + end + end + end #Debian + + context "on a RedHat OS" do + let :facts do + { + :osfamily => 'RedHat', + :operatingsystemrelease => '6', + :concat_basedir => '/dne', + :id => 'root', + :kernel => 'Linux', + :operatingsystem => 'RedHat', + :path => '/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin', + } + end + it { should contain_class("apache::params") } + it { should contain_class("apache::mod::ldap") } + it { should contain_apache__mod('authnz_ldap') } + + context 'default verifyServerCert' do + it { should contain_file('authnz_ldap.conf').with_content(/^LDAPVerifyServerCert On$/) } + end + + context 'verifyServerCert = false' do + let(:params) { { :verifyServerCert => false } } + it { should contain_file('authnz_ldap.conf').with_content(/^LDAPVerifyServerCert Off$/) } + end + + context 'verifyServerCert = wrong' do + let(:params) { { :verifyServerCert => 'wrong' } } + it 'should raise an error' do + expect { should raise_error Puppet::Error } + end + end + end # Redhat + +end + diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/spec/classes/mod/dav_svn_spec.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/spec/classes/mod/dav_svn_spec.rb new file mode 100644 index 00000000000..4898cdece1c --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/spec/classes/mod/dav_svn_spec.rb @@ -0,0 +1,56 @@ +require 'spec_helper' + +describe 'apache::mod::dav_svn', :type => :class do + let :pre_condition do + 'include apache' + end + context "on a Debian OS" do + let :facts do + { + :lsbdistcodename => 'squeeze', + :osfamily => 'Debian', + :operatingsystemrelease => '6', + :concat_basedir => '/dne', + :operatingsystem => 'Debian', + :id => 'root', + :kernel => 'Linux', + :path => '/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin', + } + end + it { should contain_class("apache::params") } + it { should contain_apache__mod('dav_svn') } + it { should contain_package("libapache2-svn") } + end + context "on a RedHat OS" do + let :facts do + { + :osfamily => 'RedHat', + :operatingsystemrelease => '6', + :concat_basedir => '/dne', + :operatingsystem => 'RedHat', + :id => 'root', + :kernel => 'Linux', + :path => '/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin', + } + end + it { should contain_class("apache::params") } + it { should contain_apache__mod('dav_svn') } + it { should contain_package("mod_dav_svn") } + end + context "on a FreeBSD OS" do + let :facts do + { + :osfamily => 'FreeBSD', + :operatingsystemrelease => '9', + :concat_basedir => '/dne', + :operatingsystem => 'FreeBSD', + :id => 'root', + :kernel => 'Linux', + :path => '/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin', + } + end + it { should contain_class("apache::params") } + it { should contain_apache__mod('dav_svn') } + it { should contain_package("devel/subversion") } + end +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/spec/classes/mod/deflate_spec.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/spec/classes/mod/deflate_spec.rb new file mode 100644 index 00000000000..f8eb8810131 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/spec/classes/mod/deflate_spec.rb @@ -0,0 +1,90 @@ +require 'spec_helper' + +# This function is called inside the OS specific contexts +def general_deflate_specs + it { should contain_apache__mod("deflate") } + + it do + should contain_file("deflate.conf").with_content( + "AddOutputFilterByType DEFLATE text/html text/plain text/xml\n"\ + "AddOutputFilterByType DEFLATE text/css\n"\ + "AddOutputFilterByType DEFLATE application/x-javascript application/javascript application/ecmascript\n"\ + "AddOutputFilterByType DEFLATE application/rss+xml\n"\ + "\n"\ + "DeflateFilterNote Input instream\n"\ + "DeflateFilterNote Output outstream\n"\ + "DeflateFilterNote Ratio ratio\n" + ) + end +end + +describe 'apache::mod::deflate', :type => :class do + let :pre_condition do + 'include apache' + end + + context "On a Debian OS with default params" do + let :facts do + { + :id => 'root', + :lsbdistcodename => 'squeeze', + :osfamily => 'Debian', + :operatingsystem => 'Debian', + :operatingsystemrelease => '6', + :path => '/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin', + :concat_basedir => '/dne', + } + end + + # Load the more generic tests for this context + general_deflate_specs() + + it { should contain_file("deflate.conf").with({ + :ensure => 'file', + :path => '/etc/apache2/mods-available/deflate.conf', + } ) } + it { should contain_file("deflate.conf symlink").with({ + :ensure => 'link', + :path => '/etc/apache2/mods-enabled/deflate.conf', + } ) } + end + + context "on a RedHat OS with default params" do + let :facts do + { + :id => 'root', + :osfamily => 'RedHat', + :operatingsystem => 'RedHat', + :operatingsystemrelease => '6', + :path => '/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin', + :concat_basedir => '/dne', + } + end + + # Load the more generic tests for this context + general_deflate_specs() + + it { should contain_file("deflate.conf").with_path("/etc/httpd/conf.d/deflate.conf") } + end + + context "On a FreeBSD OS with default params" do + let :facts do + { + :id => 'root', + :osfamily => 'FreeBSD', + :operatingsystem => 'FreeBSD', + :operatingsystemrelease => '9', + :path => '/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin', + :concat_basedir => '/dne', + } + end + + # Load the more generic tests for this context + general_deflate_specs() + + it { should contain_file("deflate.conf").with({ + :ensure => 'file', + :path => '/usr/local/etc/apache22/Modules/deflate.conf', + } ) } + end +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/spec/classes/mod/dev_spec.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/spec/classes/mod/dev_spec.rb new file mode 100644 index 00000000000..0de62afcb53 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/spec/classes/mod/dev_spec.rb @@ -0,0 +1,26 @@ +require 'spec_helper' + +describe 'apache::mod::dev', :type => :class do + [ + ['RedHat', '6', 'Santiago'], + ['Debian', '6', 'squeeze'], + ['FreeBSD', '9', 'FreeBSD'], + ].each do |osfamily, operatingsystemrelease, lsbdistcodename| + if osfamily == 'FreeBSD' + let :pre_condition do + 'include apache::package' + end + end + context "on a #{osfamily} OS" do + let :facts do + { + :lsbdistcodename => lsbdistcodename, + :osfamily => osfamily, + :operatingsystem => osfamily, + :operatingsystemrelease => operatingsystemrelease, + } + end + it { should contain_class('apache::dev') } + end + end +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/spec/classes/mod/dir_spec.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/spec/classes/mod/dir_spec.rb new file mode 100644 index 00000000000..8bcdc0b6bea --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/spec/classes/mod/dir_spec.rb @@ -0,0 +1,103 @@ +require 'spec_helper' + +describe 'apache::mod::dir', :type => :class do + let :pre_condition do + 'class { "apache": + default_mods => false, + }' + end + context "on a Debian OS" do + let :facts do + { + :osfamily => 'Debian', + :operatingsystemrelease => '6', + :concat_basedir => '/dne', + :operatingsystem => 'Debian', + :id => 'root', + :kernel => 'Linux', + :path => '/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin', + :lsbdistcodename => 'squeeze', + } + end + context "passing no parameters" do + it { should contain_class("apache::params") } + it { should contain_apache__mod('dir') } + it { should contain_file('dir.conf').with_content(/^DirectoryIndex /) } + it { should contain_file('dir.conf').with_content(/ index\.html /) } + it { should contain_file('dir.conf').with_content(/ index\.html\.var /) } + it { should contain_file('dir.conf').with_content(/ index\.cgi /) } + it { should contain_file('dir.conf').with_content(/ index\.pl /) } + it { should contain_file('dir.conf').with_content(/ index\.php /) } + it { should contain_file('dir.conf').with_content(/ index\.xhtml$/) } + end + context "passing indexes => ['example.txt','fearsome.aspx']" do + let :params do + {:indexes => ['example.txt','fearsome.aspx']} + end + it { should contain_file('dir.conf').with_content(/ example\.txt /) } + it { should contain_file('dir.conf').with_content(/ fearsome\.aspx$/) } + end + end + context "on a RedHat OS" do + let :facts do + { + :osfamily => 'RedHat', + :operatingsystemrelease => '6', + :concat_basedir => '/dne', + :operatingsystem => 'Redhat', + :id => 'root', + :kernel => 'Linux', + :path => '/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin', + } + end + context "passing no parameters" do + it { should contain_class("apache::params") } + it { should contain_apache__mod('dir') } + it { should contain_file('dir.conf').with_content(/^DirectoryIndex /) } + it { should contain_file('dir.conf').with_content(/ index\.html /) } + it { should contain_file('dir.conf').with_content(/ index\.html\.var /) } + it { should contain_file('dir.conf').with_content(/ index\.cgi /) } + it { should contain_file('dir.conf').with_content(/ index\.pl /) } + it { should contain_file('dir.conf').with_content(/ index\.php /) } + it { should contain_file('dir.conf').with_content(/ index\.xhtml$/) } + end + context "passing indexes => ['example.txt','fearsome.aspx']" do + let :params do + {:indexes => ['example.txt','fearsome.aspx']} + end + it { should contain_file('dir.conf').with_content(/ example\.txt /) } + it { should contain_file('dir.conf').with_content(/ fearsome\.aspx$/) } + end + end + context "on a FreeBSD OS" do + let :facts do + { + :osfamily => 'FreeBSD', + :operatingsystemrelease => '9', + :concat_basedir => '/dne', + :operatingsystem => 'FreeBSD', + :id => 'root', + :kernel => 'FreeBSD', + :path => '/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin', + } + end + context "passing no parameters" do + it { should contain_class("apache::params") } + it { should contain_apache__mod('dir') } + it { should contain_file('dir.conf').with_content(/^DirectoryIndex /) } + it { should contain_file('dir.conf').with_content(/ index\.html /) } + it { should contain_file('dir.conf').with_content(/ index\.html\.var /) } + it { should contain_file('dir.conf').with_content(/ index\.cgi /) } + it { should contain_file('dir.conf').with_content(/ index\.pl /) } + it { should contain_file('dir.conf').with_content(/ index\.php /) } + it { should contain_file('dir.conf').with_content(/ index\.xhtml$/) } + end + context "passing indexes => ['example.txt','fearsome.aspx']" do + let :params do + {:indexes => ['example.txt','fearsome.aspx']} + end + it { should contain_file('dir.conf').with_content(/ example\.txt /) } + it { should contain_file('dir.conf').with_content(/ fearsome\.aspx$/) } + end + end +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/spec/classes/mod/event_spec.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/spec/classes/mod/event_spec.rb new file mode 100644 index 00000000000..850bd5c55b5 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/spec/classes/mod/event_spec.rb @@ -0,0 +1,103 @@ +require 'spec_helper' + +describe 'apache::mod::event', :type => :class do + let :pre_condition do + 'class { "apache": mpm_module => false, }' + end + context "on a FreeBSD OS" do + let :facts do + { + :osfamily => 'FreeBSD', + :operatingsystemrelease => '9', + :concat_basedir => '/dne', + :operatingsystem => 'FreeBSD', + :id => 'root', + :kernel => 'FreeBSD', + :path => '/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin', + } + end + it { should contain_class("apache::params") } + it { should_not contain_apache__mod('event') } + it { should contain_file("/usr/local/etc/apache22/Modules/event.conf").with_ensure('file') } + end + context "on a Debian OS" do + let :facts do + { + :lsbdistcodename => 'squeeze', + :osfamily => 'Debian', + :operatingsystemrelease => '6', + :concat_basedir => '/dne', + :operatingsystem => 'Debian', + :id => 'root', + :kernel => 'Linux', + :path => '/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin', + } + end + + it { should contain_class("apache::params") } + it { should_not contain_apache__mod('event') } + it { should contain_file("/etc/apache2/mods-available/event.conf").with_ensure('file') } + it { should contain_file("/etc/apache2/mods-enabled/event.conf").with_ensure('link') } + + context "with Apache version < 2.4" do + let :params do + { + :apache_version => '2.2', + } + end + + it { should_not contain_file("/etc/apache2/mods-available/event.load") } + it { should_not contain_file("/etc/apache2/mods-enabled/event.load") } + + it { should contain_package("apache2-mpm-event") } + end + + context "with Apache version >= 2.4" do + let :params do + { + :apache_version => '2.4', + } + end + + it { should contain_file("/etc/apache2/mods-available/event.load").with({ + 'ensure' => 'file', + 'content' => "LoadModule mpm_event_module /usr/lib/apache2/modules/mod_mpm_event.so\n" + }) + } + it { should contain_file("/etc/apache2/mods-enabled/event.load").with_ensure('link') } + end + end + context "on a RedHat OS" do + let :facts do + { + :osfamily => 'RedHat', + :operatingsystemrelease => '6', + :concat_basedir => '/dne', + :operatingsystem => 'RedHat', + :id => 'root', + :kernel => 'Linux', + :path => '/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin', + } + end + + context "with Apache version >= 2.4" do + let :params do + { + :apache_version => '2.4', + } + end + + it { should contain_class("apache::params") } + it { should_not contain_apache__mod('worker') } + it { should_not contain_apache__mod('prefork') } + + it { should contain_file("/etc/httpd/conf.d/event.conf").with_ensure('file') } + + it { should contain_file("/etc/httpd/conf.d/event.load").with({ + 'ensure' => 'file', + 'content' => "LoadModule mpm_event_module modules/mod_mpm_event.so\n", + }) + } + end + end +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/spec/classes/mod/fastcgi_spec.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/spec/classes/mod/fastcgi_spec.rb new file mode 100644 index 00000000000..98ad2e87060 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/spec/classes/mod/fastcgi_spec.rb @@ -0,0 +1,43 @@ +require 'spec_helper' + +describe 'apache::mod::fastcgi', :type => :class do + let :pre_condition do + 'include apache' + end + context "on a Debian OS" do + let :facts do + { + :osfamily => 'Debian', + :operatingsystemrelease => '6', + :concat_basedir => '/dne', + :lsbdistcodename => 'squeze', + :operatingsystem => 'Debian', + :id => 'root', + :kernel => 'Linux', + :path => '/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin', + } + end + it { should contain_class("apache::params") } + it { should contain_apache__mod('fastcgi') } + it { should contain_package("libapache2-mod-fastcgi") } + it { should contain_file('fastcgi.conf') } + end + + context "on a RedHat OS" do + let :facts do + { + :osfamily => 'RedHat', + :operatingsystemrelease => '6', + :concat_basedir => '/dne', + :operatingsystem => 'RedHat', + :id => 'root', + :kernel => 'Linux', + :path => '/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin', + } + end + it { should contain_class("apache::params") } + it { should contain_apache__mod('fastcgi') } + it { should contain_package("mod_fastcgi") } + it { should_not contain_file('fastcgi.conf') } + end +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/spec/classes/mod/fcgid_spec.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/spec/classes/mod/fcgid_spec.rb new file mode 100644 index 00000000000..16719415d56 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/spec/classes/mod/fcgid_spec.rb @@ -0,0 +1,86 @@ +require 'spec_helper' + +describe 'apache::mod::fcgid', :type => :class do + let :pre_condition do + 'include apache' + end + + context "on a Debian OS" do + let :facts do + { + :osfamily => 'Debian', + :operatingsystemrelease => '6', + :concat_basedir => '/dne', + :lsbdistcodename => 'squeeze', + :operatingsystem => 'Debian', + :id => 'root', + :kernel => 'Linux', + :path => '/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin', + } + end + it { should contain_class("apache::params") } + it { should contain_apache__mod('fcgid') } + it { should contain_package("libapache2-mod-fcgid") } + end + + context "on a RedHat OS" do + let :facts do + { + :osfamily => 'RedHat', + :operatingsystemrelease => '6', + :concat_basedir => '/dne', + :operatingsystem => 'RedHat', + :id => 'root', + :kernel => 'Linux', + :path => '/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin', + } + end + + describe 'without parameters' do + it { should contain_class("apache::params") } + it { should contain_apache__mod('fcgid') } + it { should contain_package("mod_fcgid") } + end + + describe 'with parameters' do + let :params do { + :options => { + 'FcgidIPCDir' => '/var/run/fcgidsock', + 'SharememPath' => '/var/run/fcgid_shm', + 'FcgidMinProcessesPerClass' => '0', + 'AddHandler' => 'fcgid-script .fcgi', + } + } end + + it 'should contain the correct config' do + content = subject.resource('file', 'fcgid.conf').send(:parameters)[:content] + content.split("\n").reject { |c| c =~ /(^#|^$)/ }.should == [ + '', + ' AddHandler fcgid-script .fcgi', + ' FcgidIPCDir /var/run/fcgidsock', + ' FcgidMinProcessesPerClass 0', + ' SharememPath /var/run/fcgid_shm', + '', + ] + end + end + end + + context "on a FreeBSD OS" do + let :facts do + { + :osfamily => 'FreeBSD', + :operatingsystemrelease => '9', + :concat_basedir => '/dne', + :operatingsystem => 'FreeBSD', + :id => 'root', + :kernel => 'FreeBSD', + :path => '/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin', + } + end + + it { should contain_class("apache::params") } + it { should contain_apache__mod('fcgid') } + it { should contain_package("www/mod_fcgid") } + end +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/spec/classes/mod/info_spec.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/spec/classes/mod/info_spec.rb new file mode 100644 index 00000000000..ed078c519fd --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/spec/classes/mod/info_spec.rb @@ -0,0 +1,119 @@ +require 'spec_helper' + +# This function is called inside the OS specific contexts +def general_info_specs + it { should contain_apache__mod("info") } + + it do + should contain_file("info.conf").with_content( + "\n"\ + " SetHandler server-info\n"\ + " Order deny,allow\n"\ + " Deny from all\n"\ + " Allow from 127.0.0.1 ::1\n"\ + "\n" + ) + end +end + +describe 'apache::mod::info', :type => :class do + let :pre_condition do + 'include apache' + end + + context "On a Debian OS with default params" do + let :facts do + { + :osfamily => 'Debian', + :operatingsystemrelease => '6', + :concat_basedir => '/dne', + :lsbdistcodename => 'squeeze', + :operatingsystem => 'Debian', + :id => 'root', + :kernel => 'Linux', + :path => '/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin', + } + end + + # Load the more generic tests for this context + general_info_specs() + + it { should contain_file("info.conf").with({ + :ensure => 'file', + :path => '/etc/apache2/mods-available/info.conf', + } ) } + it { should contain_file("info.conf symlink").with({ + :ensure => 'link', + :path => '/etc/apache2/mods-enabled/info.conf', + } ) } + end + + context "on a RedHat OS with default params" do + let :facts do + { + :osfamily => 'RedHat', + :operatingsystemrelease => '6', + :concat_basedir => '/dne', + :operatingsystem => 'RedHat', + :id => 'root', + :kernel => 'Linux', + :path => '/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin', + } + end + + # Load the more generic tests for this context + general_info_specs() + + it { should contain_file("info.conf").with_path("/etc/httpd/conf.d/info.conf") } + end + + context "On a FreeBSD OS with default params" do + let :facts do + { + :osfamily => 'FreeBSD', + :operatingsystemrelease => '9', + :concat_basedir => '/dne', + :operatingsystem => 'FreeBSD', + :id => 'root', + :kernel => 'FreeBSD', + :path => '/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin', + } + end + + # Load the more generic tests for this context + general_info_specs() + + it { should contain_file("info.conf").with({ + :ensure => 'file', + :path => '/usr/local/etc/apache22/Modules/info.conf', + } ) } + end + + context "with $allow_from => ['10.10.10.10','11.11.11.11']" do + let :facts do + { + :osfamily => 'Debian', + :operatingsystemrelease => '6', + :concat_basedir => '/dne', + :lsbdistcodename => 'squeeze', + :operatingsystem => 'Debian', + :id => 'root', + :kernel => 'Linux', + :path => '/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin', + } + end + let :params do + { :allow_from => ['10.10.10.10','11.11.11.11'] } + end + it do + should contain_file("info.conf").with_content( + "\n"\ + " SetHandler server-info\n"\ + " Order deny,allow\n"\ + " Deny from all\n"\ + " Allow from 10.10.10.10 11.11.11.11\n"\ + "\n" + ) + end + end +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/spec/classes/mod/itk_spec.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/spec/classes/mod/itk_spec.rb new file mode 100644 index 00000000000..d9fe2e3d128 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/spec/classes/mod/itk_spec.rb @@ -0,0 +1,69 @@ +require 'spec_helper' + +describe 'apache::mod::itk', :type => :class do + let :pre_condition do + 'class { "apache": mpm_module => false, }' + end + context "on a Debian OS" do + let :facts do + { + :osfamily => 'Debian', + :operatingsystemrelease => '6', + :concat_basedir => '/dne', + :lsbdistcodename => 'squeeze', + :operatingsystem => 'Debian', + :id => 'root', + :kernel => 'Linux', + :path => '/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin', + } + end + it { should contain_class("apache::params") } + it { should_not contain_apache__mod('itk') } + it { should contain_file("/etc/apache2/mods-available/itk.conf").with_ensure('file') } + it { should contain_file("/etc/apache2/mods-enabled/itk.conf").with_ensure('link') } + + context "with Apache version < 2.4" do + let :params do + { + :apache_version => '2.2', + } + end + + it { should_not contain_file("/etc/apache2/mods-available/itk.load") } + it { should_not contain_file("/etc/apache2/mods-enabled/itk.load") } + + it { should contain_package("apache2-mpm-itk") } + end + + context "with Apache version >= 2.4" do + let :params do + { + :apache_version => '2.4', + } + end + + it { should contain_file("/etc/apache2/mods-available/itk.load").with({ + 'ensure' => 'file', + 'content' => "LoadModule mpm_itk_module /usr/lib/apache2/modules/mod_mpm_itk.so\n" + }) + } + it { should contain_file("/etc/apache2/mods-enabled/itk.load").with_ensure('link') } + end + end + context "on a FreeBSD OS" do + let :facts do + { + :osfamily => 'FreeBSD', + :operatingsystemrelease => '9', + :concat_basedir => '/dne', + :operatingsystem => 'FreeBSD', + :id => 'root', + :kernel => 'FreeBSD', + :path => '/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin', + } + end + it { should contain_class("apache::params") } + it { should_not contain_apache__mod('itk') } + it { should contain_file("/usr/local/etc/apache22/Modules/itk.conf").with_ensure('file') } + end +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/spec/classes/mod/mime_magic_spec.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/spec/classes/mod/mime_magic_spec.rb new file mode 100644 index 00000000000..e9984ecbaf5 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/spec/classes/mod/mime_magic_spec.rb @@ -0,0 +1,109 @@ +require 'spec_helper' + +# This function is called inside the OS specific contexts +def general_mime_magic_specs + it { should contain_apache__mod("mime_magic") } +end + +describe 'apache::mod::mime_magic', :type => :class do + let :pre_condition do + 'include apache' + end + + context "On a Debian OS with default params" do + let :facts do + { + :osfamily => 'Debian', + :operatingsystemrelease => '6', + :concat_basedir => '/dne', + :lsbdistcodename => 'squeeze', + :operatingsystem => 'Debian', + :id => 'root', + :kernel => 'Linux', + :path => '/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin', + } + end + + general_mime_magic_specs() + + it do + should contain_file("mime_magic.conf").with_content( + "MIMEMagicFile \"/etc/apache2/magic\"\n" + ) + end + + it { should contain_file("mime_magic.conf").with({ + :ensure => 'file', + :path => '/etc/apache2/mods-available/mime_magic.conf', + } ) } + it { should contain_file("mime_magic.conf symlink").with({ + :ensure => 'link', + :path => '/etc/apache2/mods-enabled/mime_magic.conf', + } ) } + + context "with magic_file => /tmp/Debian_magic" do + let :params do + { :magic_file => "/tmp/Debian_magic" } + end + + it do + should contain_file("mime_magic.conf").with_content( + "MIMEMagicFile \"/tmp/Debian_magic\"\n" + ) + end + end + + end + + context "on a RedHat OS with default params" do + let :facts do + { + :osfamily => 'RedHat', + :operatingsystemrelease => '6', + :concat_basedir => '/dne', + :operatingsystem => 'RedHat', + :id => 'root', + :kernel => 'Linux', + :path => '/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin', + } + end + + general_mime_magic_specs() + + it do + should contain_file("mime_magic.conf").with_content( + "MIMEMagicFile \"/etc/httpd/conf/magic\"\n" + ) + end + + it { should contain_file("mime_magic.conf").with_path("/etc/httpd/conf.d/mime_magic.conf") } + + end + + context "with magic_file => /tmp/magic" do + let :facts do + { + :osfamily => 'Debian', + :operatingsystemrelease => '6', + :concat_basedir => '/dne', + :lsbdistcodename => 'squeeze', + :operatingsystem => 'Debian', + :id => 'root', + :kernel => 'Linux', + :path => '/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin', + } + end + + let :params do + { :magic_file => "/tmp/magic" } + end + + it do + should contain_file("mime_magic.conf").with_content( + "MIMEMagicFile \"/tmp/magic\"\n" + ) + end + end + + +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/spec/classes/mod/mime_spec.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/spec/classes/mod/mime_spec.rb new file mode 100644 index 00000000000..2b6154fb813 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/spec/classes/mod/mime_spec.rb @@ -0,0 +1,52 @@ +require 'spec_helper' + +# This function is called inside the OS specific conte, :compilexts +def general_mime_specs + it { should contain_apache__mod("mime") } +end + +describe 'apache::mod::mime', :type => :class do + let :pre_condition do + 'include apache' + end + + context "On a Debian OS with default params", :compile do + let :facts do + { + :osfamily => 'Debian', + :operatingsystemrelease => '6', + :concat_basedir => '/dne', + :lsbdistcodename => 'squeeze', + :operatingsystem => 'Debian', + :id => 'root', + :kernel => 'Linux', + :path => '/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin', + } + end + + general_mime_specs() + + it { should contain_file("mime.conf").with_path('/etc/apache2/mods-available/mime.conf') } + + end + + context "on a RedHat OS with default params", :compile do + let :facts do + { + :osfamily => 'RedHat', + :operatingsystemrelease => '6', + :concat_basedir => '/dne', + :operatingsystem => 'RedHat', + :id => 'root', + :kernel => 'Linux', + :path => '/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin', + } + end + + general_mime_specs() + + it { should contain_file("mime.conf").with_path("/etc/httpd/conf.d/mime.conf") } + + end + +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/spec/classes/mod/pagespeed_spec.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/spec/classes/mod/pagespeed_spec.rb new file mode 100644 index 00000000000..9439f719e65 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/spec/classes/mod/pagespeed_spec.rb @@ -0,0 +1,43 @@ +require 'spec_helper' + +describe 'apache::mod::pagespeed', :type => :class do + let :pre_condition do + 'include apache' + end + context "on a Debian OS" do + let :facts do + { + :osfamily => 'Debian', + :operatingsystemrelease => '6', + :concat_basedir => '/dne', + :lsbdistcodename => 'squeeze', + :operatingsystem => 'Debian', + :id => 'root', + :kernel => 'Linux', + :path => '/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin', + } + end + it { should contain_class("apache::params") } + it { should contain_apache__mod('pagespeed') } + it { should contain_package("mod-pagespeed-stable") } + it { should contain_file('pagespeed.conf') } + end + + context "on a RedHat OS" do + let :facts do + { + :osfamily => 'RedHat', + :operatingsystemrelease => '6', + :concat_basedir => '/dne', + :operatingsystem => 'RedHat', + :id => 'root', + :kernel => 'Linux', + :path => '/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin', + } + end + it { should contain_class("apache::params") } + it { should contain_apache__mod('pagespeed') } + it { should contain_package("mod-pagespeed-stable") } + it { should contain_file('pagespeed.conf') } + end +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/spec/classes/mod/passenger_spec.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/spec/classes/mod/passenger_spec.rb new file mode 100644 index 00000000000..3bf7d299520 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/spec/classes/mod/passenger_spec.rb @@ -0,0 +1,230 @@ +require 'spec_helper' + +describe 'apache::mod::passenger', :type => :class do + let :pre_condition do + 'include apache' + end + context "on a Debian OS" do + let :facts do + { + :osfamily => 'Debian', + :operatingsystemrelease => '6', + :concat_basedir => '/dne', + :lsbdistcodename => 'squeeze', + :operatingsystem => 'Debian', + :id => 'root', + :kernel => 'Linux', + :path => '/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin', + } + end + it { should contain_class("apache::params") } + it { should contain_apache__mod('passenger') } + it { should contain_package("libapache2-mod-passenger") } + it { should contain_file('passenger.load').with({ + 'path' => '/etc/apache2/mods-available/passenger.load', + }) } + it { should contain_file('passenger.conf').with({ + 'path' => '/etc/apache2/mods-available/passenger.conf', + }) } + it { should contain_file('passenger_package.conf').with_ensure('absent') } + describe "with passenger_root => '/usr/lib/example'" do + let :params do + { :passenger_root => '/usr/lib/example' } + end + it { should contain_file('passenger.conf').with_content(%r{PassengerRoot "/usr/lib/example"}) } + end + describe "with passenger_ruby => /usr/lib/example/ruby" do + let :params do + { :passenger_ruby => '/usr/lib/example/ruby' } + end + it { should contain_file('passenger.conf').with_content(%r{PassengerRuby "/usr/lib/example/ruby"}) } + end + describe "with passenger_default_ruby => /usr/lib/example/ruby1.9.3" do + let :params do + { :passenger_ruby => '/usr/lib/example/ruby1.9.3' } + end + it { should contain_file('passenger.conf').with_content(%r{PassengerRuby "/usr/lib/example/ruby1.9.3"}) } + end + describe "with passenger_high_performance => on" do + let :params do + { :passenger_high_performance => 'on' } + end + it { should contain_file('passenger.conf').with_content(/^ PassengerHighPerformance on$/) } + end + describe "with passenger_pool_idle_time => 1200" do + let :params do + { :passenger_pool_idle_time => 1200 } + end + it { should contain_file('passenger.conf').with_content(/^ PassengerPoolIdleTime 1200$/) } + end + describe "with passenger_max_requests => 20" do + let :params do + { :passenger_max_requests => 20 } + end + it { should contain_file('passenger.conf').with_content(/^ PassengerMaxRequests 20$/) } + end + describe "with passenger_stat_throttle_rate => 10" do + let :params do + { :passenger_stat_throttle_rate => 10 } + end + it { should contain_file('passenger.conf').with_content(/^ PassengerStatThrottleRate 10$/) } + end + describe "with passenger_max_pool_size => 16" do + let :params do + { :passenger_max_pool_size => 16 } + end + it { should contain_file('passenger.conf').with_content(/^ PassengerMaxPoolSize 16$/) } + end + describe "with rack_autodetect => on" do + let :params do + { :rack_autodetect => 'on' } + end + it { should contain_file('passenger.conf').with_content(/^ RackAutoDetect on$/) } + end + describe "with rails_autodetect => on" do + let :params do + { :rails_autodetect => 'on' } + end + it { should contain_file('passenger.conf').with_content(/^ RailsAutoDetect on$/) } + end + describe "with passenger_use_global_queue => on" do + let :params do + { :passenger_use_global_queue => 'on' } + end + it { should contain_file('passenger.conf').with_content(/^ PassengerUseGlobalQueue on$/) } + end + describe "with mod_path => '/usr/lib/foo/mod_foo.so'" do + let :params do + { :mod_path => '/usr/lib/foo/mod_foo.so' } + end + it { should contain_file('passenger.load').with_content(/^LoadModule passenger_module \/usr\/lib\/foo\/mod_foo\.so$/) } + end + describe "with mod_lib_path => '/usr/lib/foo'" do + let :params do + { :mod_lib_path => '/usr/lib/foo' } + end + it { should contain_file('passenger.load').with_content(/^LoadModule passenger_module \/usr\/lib\/foo\/mod_passenger\.so$/) } + end + describe "with mod_lib => 'mod_foo.so'" do + let :params do + { :mod_lib => 'mod_foo.so' } + end + it { should contain_file('passenger.load').with_content(/^LoadModule passenger_module \/usr\/lib\/apache2\/modules\/mod_foo\.so$/) } + end + describe "with mod_id => 'mod_foo'" do + let :params do + { :mod_id => 'mod_foo' } + end + it { should contain_file('passenger.load').with_content(/^LoadModule mod_foo \/usr\/lib\/apache2\/modules\/mod_passenger\.so$/) } + end + + context "with Ubuntu 12.04 defaults" do + let :facts do + { + :osfamily => 'Debian', + :operatingsystemrelease => '12.04', + :operatingsystem => 'Ubuntu', + :lsbdistrelease => '12.04', + :concat_basedir => '/dne', + :id => 'root', + :path => '/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin', + } + end + + it { should contain_file('passenger.conf').with_content(%r{PassengerRoot "/usr"}) } + it { should contain_file('passenger.conf').with_content(%r{PassengerRuby "/usr/bin/ruby"}) } + it { should contain_file('passenger.conf').without_content(/PassengerDefaultRuby/) } + end + + context "with Ubuntu 14.04 defaults" do + let :facts do + { + :osfamily => 'Debian', + :operatingsystemrelease => '14.04', + :operatingsystem => 'Ubuntu', + :lsbdistrelease => '14.04', + :concat_basedir => '/dne', + :id => 'root', + :path => '/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin', + } + end + + it { should contain_file('passenger.conf').with_content(%r{PassengerRoot "/usr/lib/ruby/vendor_ruby/phusion_passenger/locations.ini"}) } + it { should contain_file('passenger.conf').without_content(/PassengerRuby/) } + it { should contain_file('passenger.conf').with_content(%r{PassengerDefaultRuby "/usr/bin/ruby"}) } + end + + context "with Debian 7 defaults" do + let :facts do + { + :osfamily => 'Debian', + :operatingsystemrelease => '7.3', + :operatingsystem => 'Debian', + :lsbdistcodename => 'wheezy', + :concat_basedir => '/dne', + :id => 'root', + :path => '/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin', + } + end + + it { should contain_file('passenger.conf').with_content(%r{PassengerRoot "/usr"}) } + it { should contain_file('passenger.conf').with_content(%r{PassengerRuby "/usr/bin/ruby"}) } + it { should contain_file('passenger.conf').without_content(/PassengerDefaultRuby/) } + end + end + + context "on a RedHat OS" do + let :facts do + { + :osfamily => 'RedHat', + :operatingsystemrelease => '6', + :concat_basedir => '/dne', + :operatingsystem => 'RedHat', + :id => 'root', + :kernel => 'Linux', + :path => '/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin', + } + end + it { should contain_class("apache::params") } + it { should contain_apache__mod('passenger') } + it { should contain_package("mod_passenger") } + it { should contain_file('passenger_package.conf').with({ + 'path' => '/etc/httpd/conf.d/passenger.conf', + }) } + it { should contain_file('passenger_package.conf').without_content } + it { should contain_file('passenger_package.conf').without_source } + it { should contain_file('passenger.load').with({ + 'path' => '/etc/httpd/conf.d/passenger.load', + }) } + it { should contain_file('passenger.conf').without_content(/PassengerRoot/) } + it { should contain_file('passenger.conf').without_content(/PassengerRuby/) } + describe "with passenger_root => '/usr/lib/example'" do + let :params do + { :passenger_root => '/usr/lib/example' } + end + it { should contain_file('passenger.conf').with_content(/^ PassengerRoot "\/usr\/lib\/example"$/) } + end + describe "with passenger_ruby => /usr/lib/example/ruby" do + let :params do + { :passenger_ruby => '/usr/lib/example/ruby' } + end + it { should contain_file('passenger.conf').with_content(/^ PassengerRuby "\/usr\/lib\/example\/ruby"$/) } + end + end + context "on a FreeBSD OS" do + let :facts do + { + :osfamily => 'FreeBSD', + :operatingsystemrelease => '9', + :concat_basedir => '/dne', + :operatingsystem => 'FreeBSD', + :id => 'root', + :kernel => 'FreeBSD', + :path => '/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin', + } + end + it { should contain_class("apache::params") } + it { should contain_apache__mod('passenger') } + it { should contain_package("www/rubygem-passenger") } + end +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/spec/classes/mod/perl_spec.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/spec/classes/mod/perl_spec.rb new file mode 100644 index 00000000000..f674318e285 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/spec/classes/mod/perl_spec.rb @@ -0,0 +1,56 @@ +require 'spec_helper' + +describe 'apache::mod::perl', :type => :class do + let :pre_condition do + 'include apache' + end + context "on a Debian OS" do + let :facts do + { + :osfamily => 'Debian', + :operatingsystemrelease => '6', + :concat_basedir => '/dne', + :lsbdistcodename => 'squeeze', + :operatingsystem => 'Debian', + :id => 'root', + :kernel => 'Linux', + :path => '/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin', + } + end + it { should contain_class("apache::params") } + it { should contain_apache__mod('perl') } + it { should contain_package("libapache2-mod-perl2") } + end + context "on a RedHat OS" do + let :facts do + { + :osfamily => 'RedHat', + :operatingsystemrelease => '6', + :concat_basedir => '/dne', + :operatingsystem => 'RedHat', + :id => 'root', + :kernel => 'Linux', + :path => '/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin', + } + end + it { should contain_class("apache::params") } + it { should contain_apache__mod('perl') } + it { should contain_package("mod_perl") } + end + context "on a FreeBSD OS" do + let :facts do + { + :osfamily => 'FreeBSD', + :operatingsystemrelease => '9', + :concat_basedir => '/dne', + :operatingsystem => 'FreeBSD', + :id => 'root', + :kernel => 'FreeBSD', + :path => '/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin', + } + end + it { should contain_class("apache::params") } + it { should contain_apache__mod('perl') } + it { should contain_package("www/mod_perl2") } + end +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/spec/classes/mod/peruser_spec.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/spec/classes/mod/peruser_spec.rb new file mode 100644 index 00000000000..e1ee004e93a --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/spec/classes/mod/peruser_spec.rb @@ -0,0 +1,23 @@ +require 'spec_helper' + +describe 'apache::mod::peruser', :type => :class do + let :pre_condition do + 'class { "apache": mpm_module => false, }' + end + context "on a FreeBSD OS" do + let :facts do + { + :osfamily => 'FreeBSD', + :operatingsystemrelease => '9', + :concat_basedir => '/dne', + :operatingsystem => 'FreeBSD', + :id => 'root', + :kernel => 'FreeBSD', + :path => '/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin', + } + end + it { should contain_class("apache::params") } + it { should_not contain_apache__mod('peruser') } + it { should contain_file("/usr/local/etc/apache22/Modules/peruser.conf").with_ensure('file') } + end +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/spec/classes/mod/php_spec.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/spec/classes/mod/php_spec.rb new file mode 100644 index 00000000000..e42f4fcfe4b --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/spec/classes/mod/php_spec.rb @@ -0,0 +1,224 @@ +require 'spec_helper' + +describe 'apache::mod::php', :type => :class do + describe "on a Debian OS" do + let :facts do + { + :osfamily => 'Debian', + :operatingsystemrelease => '6', + :concat_basedir => '/dne', + :lsbdistcodename => 'squeeze', + :operatingsystem => 'Debian', + :id => 'root', + :kernel => 'Linux', + :path => '/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin', + } + end + context "with mpm_module => prefork" do + let :pre_condition do + 'class { "apache": mpm_module => prefork, }' + end + it { should contain_class("apache::params") } + it { should contain_apache__mod('php5') } + it { should contain_package("libapache2-mod-php5") } + it { should contain_file("php5.load").with( + :content => "LoadModule php5_module /usr/lib/apache2/modules/libphp5.so\n" + ) } + end + context 'with mpm_module => worker' do + let :pre_condition do + 'class { "apache": mpm_module => worker, }' + end + it 'should raise an error' do + expect { subject }.to raise_error Puppet::Error, /mpm_module => 'prefork'/ + end + end + end + describe "on a RedHat OS" do + let :facts do + { + :osfamily => 'RedHat', + :operatingsystemrelease => '6', + :concat_basedir => '/dne', + :operatingsystem => 'RedHat', + :id => 'root', + :kernel => 'Linux', + :path => '/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin', + } + end + context "with default params" do + let :pre_condition do + 'class { "apache": }' + end + it { should contain_class("apache::params") } + it { should contain_apache__mod('php5') } + it { should contain_package("php") } + it { should contain_file("php5.load").with( + :content => "LoadModule php5_module modules/libphp5.so\n" + ) } + end + context "with alternative package name" do let :pre_condition do + 'class { "apache": }' + end + let :params do + { :package_name => 'php54'} + end + it { should contain_package("php54") } + end + context "with alternative path" do let :pre_condition do + 'class { "apache": }' + end + let :params do + { :path => 'alternative-path'} + end + it { should contain_file("php5.load").with( + :content => "LoadModule php5_module alternative-path\n" + ) } + end + context "with alternative extensions" do let :pre_condition do + 'class { "apache": }' + end + let :params do + { :extensions => ['.php','.php5']} + end + it { should contain_file("php5.conf").with_content(/AddHandler php5-script .php .php5\n/) } + end + context "with specific version" do + let :pre_condition do + 'class { "apache": }' + end + let :params do + { :package_ensure => '5.3.13'} + end + it { should contain_package("php").with( + :ensure => '5.3.13' + ) } + end + context "with mpm_module => prefork" do + let :pre_condition do + 'class { "apache": mpm_module => prefork, }' + end + it { should contain_class("apache::params") } + it { should contain_apache__mod('php5') } + it { should contain_package("php") } + it { should contain_file("php5.load").with( + :content => "LoadModule php5_module modules/libphp5.so\n" + ) } + end + end + describe "on a FreeBSD OS" do + let :facts do + { + :osfamily => 'FreeBSD', + :operatingsystemrelease => '9', + :concat_basedir => '/dne', + :operatingsystem => 'FreeBSD', + :id => 'root', + :kernel => 'FreeBSD', + :path => '/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin', + } + end + context "with mpm_module => prefork" do + let :pre_condition do + 'class { "apache": mpm_module => prefork, }' + end + it { should contain_class('apache::params') } + it { should contain_apache__mod('php5') } + it { should contain_package("lang/php5") } + it { should contain_file('php5.load') } + end + # FIXME: not sure about the following context + context 'with mpm_module => worker' do + let :pre_condition do + 'class { "apache": mpm_module => worker, }' + end + it 'should raise an error' do + expect { subject.should contain_apache__mod('php5') }.to raise_error Puppet::Error, /mpm_module => 'prefork'/ + end + end + end + describe "OS independent tests" do + let :facts do + { + :osfamily => 'Debian', + :operatingsystemrelease => '6', + :concat_basedir => '/dne', + } + end + context 'with content param' do + let :pre_condition do + 'class { "apache": mpm_module => prefork, }' + end + let :params do + { :content => 'somecontent' } + end + it { should contain_file('php5.conf').with( + :content => 'somecontent' + ) } + end + context 'with template param' do + let :pre_condition do + 'class { "apache": mpm_module => prefork, }' + end + let :params do + { :template => 'apache/mod/php5.conf.erb' } + end + it { should contain_file('php5.conf').with( + :content => /^# PHP is an HTML-embedded scripting language which attempts to make it/ + ) } + end + context 'with source param' do + let :pre_condition do + 'class { "apache": mpm_module => prefork, }' + end + let :params do + { :source => 'some-path' } + end + it { should contain_file('php5.conf').with( + :source => 'some-path' + ) } + end + context 'content has priority over template' do + let :pre_condition do + 'class { "apache": mpm_module => prefork, }' + end + let :params do + { + :template => 'apache/mod/php5.conf.erb', + :content => 'somecontent' + } + end + it { should contain_file('php5.conf').with( + :content => 'somecontent' + ) } + end + context 'source has priority over template' do + let :pre_condition do + 'class { "apache": mpm_module => prefork, }' + end + let :params do + { + :template => 'apache/mod/php5.conf.erb', + :source => 'some-path' + } + end + it { should contain_file('php5.conf').with( + :source => 'some-path' + ) } + end + context 'source has priority over content' do + let :pre_condition do + 'class { "apache": mpm_module => prefork, }' + end + let :params do + { + :content => 'somecontent', + :source => 'some-path' + } + end + it { should contain_file('php5.conf').with( + :source => 'some-path' + ) } + end + end +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/spec/classes/mod/prefork_spec.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/spec/classes/mod/prefork_spec.rb new file mode 100644 index 00000000000..847aecf9c70 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/spec/classes/mod/prefork_spec.rb @@ -0,0 +1,114 @@ +require 'spec_helper' + +describe 'apache::mod::prefork', :type => :class do + let :pre_condition do + 'class { "apache": mpm_module => false, }' + end + context "on a Debian OS" do + let :facts do + { + :osfamily => 'Debian', + :operatingsystemrelease => '6', + :concat_basedir => '/dne', + :lsbdistcodename => 'squeeze', + :operatingsystem => 'Debian', + :id => 'root', + :kernel => 'Linux', + :path => '/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin', + } + end + it { should contain_class("apache::params") } + it { should_not contain_apache__mod('prefork') } + it { should contain_file("/etc/apache2/mods-available/prefork.conf").with_ensure('file') } + it { should contain_file("/etc/apache2/mods-enabled/prefork.conf").with_ensure('link') } + + context "with Apache version < 2.4" do + let :params do + { + :apache_version => '2.2', + } + end + + it { should_not contain_file("/etc/apache2/mods-available/prefork.load") } + it { should_not contain_file("/etc/apache2/mods-enabled/prefork.load") } + + it { should contain_package("apache2-mpm-prefork") } + end + + context "with Apache version >= 2.4" do + let :params do + { + :apache_version => '2.4', + } + end + + it { should contain_file("/etc/apache2/mods-available/prefork.load").with({ + 'ensure' => 'file', + 'content' => "LoadModule mpm_prefork_module /usr/lib/apache2/modules/mod_mpm_prefork.so\n" + }) + } + it { should contain_file("/etc/apache2/mods-enabled/prefork.load").with_ensure('link') } + end + end + context "on a RedHat OS" do + let :facts do + { + :osfamily => 'RedHat', + :operatingsystemrelease => '6', + :concat_basedir => '/dne', + :operatingsystem => 'RedHat', + :id => 'root', + :kernel => 'Linux', + :path => '/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin', + } + end + it { should contain_class("apache::params") } + it { should_not contain_apache__mod('prefork') } + it { should contain_file("/etc/httpd/conf.d/prefork.conf").with_ensure('file') } + + context "with Apache version < 2.4" do + let :params do + { + :apache_version => '2.2', + } + end + + it { should contain_file_line("/etc/sysconfig/httpd prefork enable").with({ + 'require' => 'Package[httpd]', + }) + } + end + + context "with Apache version >= 2.4" do + let :params do + { + :apache_version => '2.4', + } + end + + it { should_not contain_apache__mod('event') } + + it { should contain_file("/etc/httpd/conf.d/prefork.load").with({ + 'ensure' => 'file', + 'content' => "LoadModule mpm_prefork_module modules/mod_mpm_prefork.so\n", + }) + } + end + end + context "on a FreeBSD OS" do + let :facts do + { + :osfamily => 'FreeBSD', + :operatingsystemrelease => '9', + :concat_basedir => '/dne', + :operatingsystem => 'FreeBSD', + :id => 'root', + :kernel => 'FreeBSD', + :path => '/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin', + } + end + it { should contain_class("apache::params") } + it { should_not contain_apache__mod('prefork') } + it { should contain_file("/usr/local/etc/apache22/Modules/prefork.conf").with_ensure('file') } + end +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/spec/classes/mod/proxy_html_spec.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/spec/classes/mod/proxy_html_spec.rb new file mode 100644 index 00000000000..77e1ab15de8 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/spec/classes/mod/proxy_html_spec.rb @@ -0,0 +1,85 @@ +require 'spec_helper' + +describe 'apache::mod::proxy_html', :type => :class do + let :pre_condition do + [ + 'include apache', + 'include apache::mod::proxy', + 'include apache::mod::proxy_http', + ] + end + context "on a Debian OS" do + shared_examples "debian" do |loadfiles| + it { should contain_class("apache::params") } + it { should contain_apache__mod('proxy_html').with(:loadfiles => loadfiles) } + it { should contain_package("libapache2-mod-proxy-html") } + end + let :facts do + { + :osfamily => 'Debian', + :concat_basedir => '/dne', + :architecture => 'i386', + :lsbdistcodename => 'squeeze', + :operatingsystem => 'Debian', + :id => 'root', + :kernel => 'Linux', + :path => '/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin', + :hardwaremodel => 'i386', + } + end + + context "on squeeze" do + let(:facts) { super().merge({ :operatingsystemrelease => '6' }) } + it_behaves_like "debian", ['/usr/lib/libxml2.so.2'] + end + context "on wheezy" do + let(:facts) { super().merge({ :operatingsystemrelease => '7' }) } + context "i386" do + let(:facts) { super().merge({ + :hardwaremodel => 'i686', + :architecture => 'i386' + })} + it_behaves_like "debian", ["/usr/lib/i386-linux-gnu/libxml2.so.2"] + end + context "x64" do + let(:facts) { super().merge({ + :hardwaremodel => 'x86_64', + :architecture => 'amd64' + })} + it_behaves_like "debian", ["/usr/lib/x86_64-linux-gnu/libxml2.so.2"] + end + end + end + context "on a RedHat OS", :compile do + let :facts do + { + :osfamily => 'RedHat', + :operatingsystemrelease => '6', + :concat_basedir => '/dne', + :operatingsystem => 'RedHat', + :id => 'root', + :kernel => 'Linux', + :path => '/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin', + } + end + it { should contain_class("apache::params") } + it { should contain_apache__mod('proxy_html').with(:loadfiles => nil) } + it { should contain_package("mod_proxy_html") } + end + context "on a FreeBSD OS", :compile do + let :facts do + { + :osfamily => 'FreeBSD', + :operatingsystemrelease => '9', + :concat_basedir => '/dne', + :operatingsystem => 'FreeBSD', + :id => 'root', + :kernel => 'FreeBSD', + :path => '/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin', + } + end + it { should contain_class("apache::params") } + it { should contain_apache__mod('proxy_html').with(:loadfiles => nil) } + it { should contain_package("www/mod_proxy_html") } + end +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/spec/classes/mod/python_spec.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/spec/classes/mod/python_spec.rb new file mode 100644 index 00000000000..d2d1fca7b93 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/spec/classes/mod/python_spec.rb @@ -0,0 +1,56 @@ +require 'spec_helper' + +describe 'apache::mod::python', :type => :class do + let :pre_condition do + 'include apache' + end + context "on a Debian OS" do + let :facts do + { + :osfamily => 'Debian', + :operatingsystemrelease => '6', + :concat_basedir => '/dne', + :lsbdistcodename => 'squeeze', + :operatingsystem => 'Debian', + :id => 'root', + :kernel => 'Linux', + :path => '/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin', + } + end + it { should contain_class("apache::params") } + it { should contain_apache__mod("python") } + it { should contain_package("libapache2-mod-python") } + end + context "on a RedHat OS" do + let :facts do + { + :osfamily => 'RedHat', + :operatingsystemrelease => '6', + :concat_basedir => '/dne', + :operatingsystem => 'RedHat', + :id => 'root', + :kernel => 'Linux', + :path => '/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin', + } + end + it { should contain_class("apache::params") } + it { should contain_apache__mod("python") } + it { should contain_package("mod_python") } + end + context "on a FreeBSD OS" do + let :facts do + { + :osfamily => 'FreeBSD', + :operatingsystemrelease => '9', + :concat_basedir => '/dne', + :operatingsystem => 'FreeBSD', + :id => 'root', + :kernel => 'FreeBSD', + :path => '/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin', + } + end + it { should contain_class("apache::params") } + it { should contain_apache__mod("python") } + it { should contain_package("www/mod_python3") } + end +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/spec/classes/mod/rpaf_spec.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/spec/classes/mod/rpaf_spec.rb new file mode 100644 index 00000000000..949dd5702b4 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/spec/classes/mod/rpaf_spec.rb @@ -0,0 +1,88 @@ +require 'spec_helper' + +describe 'apache::mod::rpaf', :type => :class do + let :pre_condition do + [ + 'include apache', + ] + end + context "on a Debian OS" do + let :facts do + { + :osfamily => 'Debian', + :operatingsystemrelease => '6', + :concat_basedir => '/dne', + :lsbdistcodename => 'squeeze', + :operatingsystem => 'Debian', + :id => 'root', + :kernel => 'Linux', + :path => '/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin', + } + end + it { should contain_class("apache::params") } + it { should contain_apache__mod('rpaf') } + it { should contain_package("libapache2-mod-rpaf") } + it { should contain_file('rpaf.conf').with({ + 'path' => '/etc/apache2/mods-available/rpaf.conf', + }) } + it { should contain_file('rpaf.conf').with_content(/^RPAFenable On$/) } + + describe "with sethostname => true" do + let :params do + { :sethostname => 'true' } + end + it { should contain_file('rpaf.conf').with_content(/^RPAFsethostname On$/) } + end + describe "with proxy_ips => [ 10.42.17.8, 10.42.18.99 ]" do + let :params do + { :proxy_ips => [ '10.42.17.8', '10.42.18.99' ] } + end + it { should contain_file('rpaf.conf').with_content(/^RPAFproxy_ips 10.42.17.8 10.42.18.99$/) } + end + describe "with header => X-Real-IP" do + let :params do + { :header => 'X-Real-IP' } + end + it { should contain_file('rpaf.conf').with_content(/^RPAFheader X-Real-IP$/) } + end + end + context "on a FreeBSD OS" do + let :facts do + { + :osfamily => 'FreeBSD', + :operatingsystemrelease => '9', + :concat_basedir => '/dne', + :operatingsystem => 'FreeBSD', + :id => 'root', + :kernel => 'FreeBSD', + :path => '/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin', + } + end + it { should contain_class("apache::params") } + it { should contain_apache__mod('rpaf') } + it { should contain_package("www/mod_rpaf2") } + it { should contain_file('rpaf.conf').with({ + 'path' => '/usr/local/etc/apache22/Modules/rpaf.conf', + }) } + it { should contain_file('rpaf.conf').with_content(/^RPAFenable On$/) } + + describe "with sethostname => true" do + let :params do + { :sethostname => 'true' } + end + it { should contain_file('rpaf.conf').with_content(/^RPAFsethostname On$/) } + end + describe "with proxy_ips => [ 10.42.17.8, 10.42.18.99 ]" do + let :params do + { :proxy_ips => [ '10.42.17.8', '10.42.18.99' ] } + end + it { should contain_file('rpaf.conf').with_content(/^RPAFproxy_ips 10.42.17.8 10.42.18.99$/) } + end + describe "with header => X-Real-IP" do + let :params do + { :header => 'X-Real-IP' } + end + it { should contain_file('rpaf.conf').with_content(/^RPAFheader X-Real-IP$/) } + end + end +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/spec/classes/mod/speling_spec.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/spec/classes/mod/speling_spec.rb new file mode 100644 index 00000000000..e7e6e1d6401 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/spec/classes/mod/speling_spec.rb @@ -0,0 +1,37 @@ +require 'spec_helper' + +describe 'apache::mod::speling', :type => :class do + let :pre_condition do + 'include apache' + end + context "on a Debian OS" do + let :facts do + { + :osfamily => 'Debian', + :operatingsystemrelease => '6', + :concat_basedir => '/dne', + :lsbdistcodename => 'squeeze', + :operatingsystem => 'Debian', + :id => 'root', + :kernel => 'Linux', + :path => '/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin', + } + end + it { should contain_apache__mod('speling') } + end + + context "on a RedHat OS" do + let :facts do + { + :osfamily => 'RedHat', + :operatingsystemrelease => '6', + :concat_basedir => '/dne', + :operatingsystem => 'RedHat', + :id => 'root', + :kernel => 'Linux', + :path => '/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin', + } + end + it { should contain_apache__mod('speling') } + end +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/spec/classes/mod/ssl_spec.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/spec/classes/mod/ssl_spec.rb new file mode 100644 index 00000000000..11e7964dedb --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/spec/classes/mod/ssl_spec.rb @@ -0,0 +1,72 @@ +require 'spec_helper' + +describe 'apache::mod::ssl', :type => :class do + let :pre_condition do + 'include apache' + end + context 'on an unsupported OS' do + let :facts do + { + :osfamily => 'Magic', + :operatingsystemrelease => '0', + :concat_basedir => '/dne', + :operatingsystem => 'Magic', + :id => 'root', + :kernel => 'Linux', + :path => '/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin', + } + end + it { expect { subject }.to raise_error(Puppet::Error, /Unsupported osfamily:/) } + end + + context 'on a RedHat OS' do + let :facts do + { + :osfamily => 'RedHat', + :operatingsystemrelease => '6', + :concat_basedir => '/dne', + :operatingsystem => 'RedHat', + :id => 'root', + :kernel => 'Linux', + :path => '/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin', + } + end + it { should contain_class('apache::params') } + it { should contain_apache__mod('ssl') } + it { should contain_package('mod_ssl') } + end + + context 'on a Debian OS' do + let :facts do + { + :osfamily => 'Debian', + :operatingsystemrelease => '6', + :concat_basedir => '/dne', + :lsbdistcodename => 'squeeze', + :operatingsystem => 'Debian', + :id => 'root', + :kernel => 'Linux', + :path => '/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin', + } + end + it { should contain_class('apache::params') } + it { should contain_apache__mod('ssl') } + it { should_not contain_package('libapache2-mod-ssl') } + end + + context 'on a FreeBSD OS' do + let :facts do + { + :osfamily => 'FreeBSD', + :operatingsystemrelease => '9', + :concat_basedir => '/dne', + :operatingsystem => 'FreeBSD', + :id => 'root', + :kernel => 'FreeBSD', + :path => '/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin', + } + end + it { should contain_class('apache::params') } + it { should contain_apache__mod('ssl') } + end +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/spec/classes/mod/status_spec.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/spec/classes/mod/status_spec.rb new file mode 100644 index 00000000000..5023bc7bf17 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/spec/classes/mod/status_spec.rb @@ -0,0 +1,198 @@ +require 'spec_helper' + +# Helper function for testing the contents of `status.conf` +def status_conf_spec(allow_from, extended_status) + it do + should contain_file("status.conf").with_content( + "\n"\ + " SetHandler server-status\n"\ + " Order deny,allow\n"\ + " Deny from all\n"\ + " Allow from #{Array(allow_from).join(' ')}\n"\ + "\n"\ + "ExtendedStatus #{extended_status}\n"\ + "\n"\ + "\n"\ + " # Show Proxy LoadBalancer status in mod_status\n"\ + " ProxyStatus On\n"\ + "\n" + ) + end +end + +describe 'apache::mod::status', :type => :class do + let :pre_condition do + 'include apache' + end + + context "on a Debian OS with default params" do + let :facts do + { + :osfamily => 'Debian', + :operatingsystemrelease => '6', + :concat_basedir => '/dne', + :lsbdistcodename => 'squeeze', + :operatingsystem => 'Debian', + :id => 'root', + :kernel => 'Linux', + :path => '/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin', + } + end + + it { should contain_apache__mod("status") } + + status_conf_spec(["127.0.0.1", "::1"], "On") + + it { should contain_file("status.conf").with({ + :ensure => 'file', + :path => '/etc/apache2/mods-available/status.conf', + } ) } + + it { should contain_file("status.conf symlink").with({ + :ensure => 'link', + :path => '/etc/apache2/mods-enabled/status.conf', + } ) } + + end + + context "on a RedHat OS with default params" do + let :facts do + { + :osfamily => 'RedHat', + :operatingsystemrelease => '6', + :concat_basedir => '/dne', + :operatingsystem => 'RedHat', + :id => 'root', + :kernel => 'Linux', + :path => '/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin', + } + end + + it { should contain_apache__mod("status") } + + status_conf_spec(["127.0.0.1", "::1"], "On") + + it { should contain_file("status.conf").with_path("/etc/httpd/conf.d/status.conf") } + + end + + context "with custom parameters $allow_from => ['10.10.10.10','11.11.11.11'], $extended_status => 'Off'" do + let :facts do + { + :osfamily => 'Debian', + :operatingsystemrelease => '6', + :concat_basedir => '/dne', + :lsbdistcodename => 'squeeze', + :operatingsystem => 'Debian', + :id => 'root', + :kernel => 'Linux', + :path => '/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin', + } + end + let :params do + { + :allow_from => ['10.10.10.10','11.11.11.11'], + :extended_status => 'Off', + } + end + + status_conf_spec(["10.10.10.10", "11.11.11.11"], "Off") + + end + + context "with valid parameter type $allow_from => ['10.10.10.10']" do + let :facts do + { + :osfamily => 'Debian', + :operatingsystemrelease => '6', + :concat_basedir => '/dne', + :lsbdistcodename => 'squeeze', + :operatingsystem => 'Debian', + :id => 'root', + :kernel => 'Linux', + :path => '/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin', + } + end + let :params do + { :allow_from => ['10.10.10.10'] } + end + it 'should expect to succeed array validation' do + expect { + should contain_file("status.conf") + }.not_to raise_error() + end + end + + context "with invalid parameter type $allow_from => '10.10.10.10'" do + let :facts do + { + :osfamily => 'Debian', + :operatingsystemrelease => '6', + :concat_basedir => '/dne', + :operatingsystem => 'Debian', + :id => 'root', + :kernel => 'Linux', + :path => '/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin', + } + end + let :params do + { :allow_from => '10.10.10.10' } + end + it 'should expect to fail array validation' do + expect { + should contain_file("status.conf") + }.to raise_error(Puppet::Error) + end + end + + # Only On or Off are valid options + ['On', 'Off'].each do |valid_param| + context "with valid value $extended_status => '#{valid_param}'" do + let :facts do + { + :osfamily => 'Debian', + :operatingsystemrelease => '6', + :concat_basedir => '/dne', + :lsbdistcodename => 'squeeze', + :operatingsystem => 'Debian', + :id => 'root', + :kernel => 'Linux', + :path => '/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin', + } + end + let :params do + { :extended_status => valid_param } + end + it 'should expect to succeed regular expression validation' do + expect { + should contain_file("status.conf") + }.not_to raise_error() + end + end + end + + ['Yes', 'No'].each do |invalid_param| + context "with invalid value $extended_status => '#{invalid_param}'" do + let :facts do + { + :osfamily => 'Debian', + :operatingsystemrelease => '6', + :concat_basedir => '/dne', + :operatingsystem => 'Debian', + :id => 'root', + :kernel => 'Linux', + :path => '/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin', + } + end + let :params do + { :extended_status => invalid_param } + end + it 'should expect to fail regular expression validation' do + expect { + should contain_file("status.conf") + }.to raise_error(Puppet::Error) + end + end + end + +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/spec/classes/mod/suphp_spec.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/spec/classes/mod/suphp_spec.rb new file mode 100644 index 00000000000..cb91997ac16 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/spec/classes/mod/suphp_spec.rb @@ -0,0 +1,38 @@ +require 'spec_helper' + +describe 'apache::mod::suphp', :type => :class do + let :pre_condition do + 'include apache' + end + context "on a Debian OS" do + let :facts do + { + :osfamily => 'Debian', + :operatingsystemrelease => '6', + :concat_basedir => '/dne', + :lsbdistcodename => 'squeeze', + :operatingsystem => 'Debian', + :id => 'root', + :kernel => 'Linux', + :path => '/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin', + } + end + it { should contain_class("apache::params") } + it { should contain_package("libapache2-mod-suphp") } + end + context "on a RedHat OS" do + let :facts do + { + :osfamily => 'RedHat', + :operatingsystemrelease => '6', + :concat_basedir => '/dne', + :operatingsystem => 'RedHat', + :id => 'root', + :kernel => 'Linux', + :path => '/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin', + } + end + it { should contain_class("apache::params") } + it { should contain_package("mod_suphp") } + end +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/spec/classes/mod/worker_spec.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/spec/classes/mod/worker_spec.rb new file mode 100644 index 00000000000..4843a26e65a --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/spec/classes/mod/worker_spec.rb @@ -0,0 +1,161 @@ +require 'spec_helper' + +describe 'apache::mod::worker', :type => :class do + let :pre_condition do + 'class { "apache": mpm_module => false, }' + end + context "on a Debian OS" do + let :facts do + { + :osfamily => 'Debian', + :operatingsystemrelease => '6', + :concat_basedir => '/dne', + :lsbdistcodename => 'squeeze', + :operatingsystem => 'Debian', + :id => 'root', + :kernel => 'Linux', + :path => '/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin', + } + end + it { should contain_class("apache::params") } + it { should_not contain_apache__mod('worker') } + it { should contain_file("/etc/apache2/mods-available/worker.conf").with_ensure('file') } + it { should contain_file("/etc/apache2/mods-enabled/worker.conf").with_ensure('link') } + + context "with Apache version < 2.4" do + let :params do + { + :apache_version => '2.2', + } + end + + it { should_not contain_file("/etc/apache2/mods-available/worker.load") } + it { should_not contain_file("/etc/apache2/mods-enabled/worker.load") } + + it { should contain_package("apache2-mpm-worker") } + end + + context "with Apache version >= 2.4" do + let :params do + { + :apache_version => '2.4', + } + end + + it { should contain_file("/etc/apache2/mods-available/worker.load").with({ + 'ensure' => 'file', + 'content' => "LoadModule mpm_worker_module /usr/lib/apache2/modules/mod_mpm_worker.so\n" + }) + } + it { should contain_file("/etc/apache2/mods-enabled/worker.load").with_ensure('link') } + end + end + context "on a RedHat OS" do + let :facts do + { + :osfamily => 'RedHat', + :operatingsystemrelease => '6', + :concat_basedir => '/dne', + :operatingsystem => 'RedHat', + :id => 'root', + :kernel => 'Linux', + :path => '/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin', + } + end + it { should contain_class("apache::params") } + it { should_not contain_apache__mod('worker') } + it { should contain_file("/etc/httpd/conf.d/worker.conf").with_ensure('file') } + + context "with Apache version < 2.4" do + let :params do + { + :apache_version => '2.2', + } + end + + it { should contain_file_line("/etc/sysconfig/httpd worker enable").with({ + 'require' => 'Package[httpd]', + }) + } + end + + context "with Apache version >= 2.4" do + let :params do + { + :apache_version => '2.4', + } + end + + it { should_not contain_apache__mod('event') } + + it { should contain_file("/etc/httpd/conf.d/worker.load").with({ + 'ensure' => 'file', + 'content' => "LoadModule mpm_worker_module modules/mod_mpm_worker.so\n", + }) + } + end + end + context "on a FreeBSD OS" do + let :facts do + { + :osfamily => 'FreeBSD', + :operatingsystemrelease => '9', + :concat_basedir => '/dne', + :operatingsystem => 'FreeBSD', + :id => 'root', + :kernel => 'FreeBSD', + :path => '/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin', + } + end + it { should contain_class("apache::params") } + it { should_not contain_apache__mod('worker') } + it { should contain_file("/usr/local/etc/apache22/Modules/worker.conf").with_ensure('file') } + end + + # Template config doesn't vary by distro + context "on all distros" do + let :facts do + { + :osfamily => 'RedHat', + :operatingsystemrelease => '6', + :concat_basedir => '/dne', + } + end + + context 'defaults' do + it { should contain_file('/etc/httpd/conf.d/worker.conf').with(:content => /^$/) } + it { should contain_file('/etc/httpd/conf.d/worker.conf').with(:content => /^\s+ServerLimit\s+25$/) } + it { should contain_file('/etc/httpd/conf.d/worker.conf').with(:content => /^\s+StartServers\s+2$/) } + it { should contain_file('/etc/httpd/conf.d/worker.conf').with(:content => /^\s+MaxClients\s+150$/) } + it { should contain_file('/etc/httpd/conf.d/worker.conf').with(:content => /^\s+MinSpareThreads\s+25$/) } + it { should contain_file('/etc/httpd/conf.d/worker.conf').with(:content => /^\s+MaxSpareThreads\s+75$/) } + it { should contain_file('/etc/httpd/conf.d/worker.conf').with(:content => /^\s+ThreadsPerChild\s+25$/) } + it { should contain_file('/etc/httpd/conf.d/worker.conf').with(:content => /^\s+MaxRequestsPerChild\s+0$/) } + it { should contain_file('/etc/httpd/conf.d/worker.conf').with(:content => /^\s+ThreadLimit\s+64$/) } + end + + context 'setting params' do + let :params do + { + :serverlimit => 10, + :startservers => 11, + :maxclients => 12, + :minsparethreads => 13, + :maxsparethreads => 14, + :threadsperchild => 15, + :maxrequestsperchild => 16, + :threadlimit => 17 + } + end + it { should contain_file('/etc/httpd/conf.d/worker.conf').with(:content => /^$/) } + it { should contain_file('/etc/httpd/conf.d/worker.conf').with(:content => /^\s+ServerLimit\s+10$/) } + it { should contain_file('/etc/httpd/conf.d/worker.conf').with(:content => /^\s+StartServers\s+11$/) } + it { should contain_file('/etc/httpd/conf.d/worker.conf').with(:content => /^\s+MaxClients\s+12$/) } + it { should contain_file('/etc/httpd/conf.d/worker.conf').with(:content => /^\s+MinSpareThreads\s+13$/) } + it { should contain_file('/etc/httpd/conf.d/worker.conf').with(:content => /^\s+MaxSpareThreads\s+14$/) } + it { should contain_file('/etc/httpd/conf.d/worker.conf').with(:content => /^\s+ThreadsPerChild\s+15$/) } + it { should contain_file('/etc/httpd/conf.d/worker.conf').with(:content => /^\s+MaxRequestsPerChild\s+16$/) } + it { should contain_file('/etc/httpd/conf.d/worker.conf').with(:content => /^\s+ThreadLimit\s+17$/) } + end + end +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/spec/classes/mod/wsgi_spec.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/spec/classes/mod/wsgi_spec.rb new file mode 100644 index 00000000000..d4c391a2911 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/spec/classes/mod/wsgi_spec.rb @@ -0,0 +1,69 @@ +require 'spec_helper' + +describe 'apache::mod::wsgi', :type => :class do + let :pre_condition do + 'include apache' + end + context "on a Debian OS" do + let :facts do + { + :osfamily => 'Debian', + :operatingsystemrelease => '6', + :concat_basedir => '/dne', + :lsbdistcodename => 'squeeze', + :operatingsystem => 'Debian', + :id => 'root', + :kernel => 'Linux', + :path => '/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin', + } + end + it { should contain_class("apache::params") } + it { should contain_apache__mod('wsgi') } + it { should contain_package("libapache2-mod-wsgi") } + end + context "on a RedHat OS" do + let :facts do + { + :osfamily => 'RedHat', + :operatingsystemrelease => '6', + :concat_basedir => '/dne', + :operatingsystem => 'RedHat', + :id => 'root', + :kernel => 'Linux', + :path => '/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin', + } + end + it { should contain_class("apache::params") } + it { should contain_apache__mod('wsgi') } + it { should contain_package("mod_wsgi") } + + describe "with custom WSGISocketPrefix" do + let :params do + { :wsgi_socket_prefix => 'run/wsgi' } + end + it {should contain_file('wsgi.conf').with_content(/^ WSGISocketPrefix run\/wsgi$/)} + end + describe "with custom WSGIPythonHome" do + let :params do + { :wsgi_python_home => '/path/to/virtenv' } + end + it {should contain_file('wsgi.conf').with_content(/^ WSGIPythonHome "\/path\/to\/virtenv"$/)} + end + end + context "on a FreeBSD OS" do + let :facts do + { + :osfamily => 'FreeBSD', + :operatingsystemrelease => '9', + :concat_basedir => '/dne', + :operatingsystem => 'FreeBSD', + :id => 'root', + :kernel => 'FreeBSD', + :path => '/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin', + } + end + it { should contain_class("apache::params") } + it { should contain_apache__mod('wsgi') } + it { should contain_package("www/mod_wsgi") } + end +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/spec/classes/params_spec.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/spec/classes/params_spec.rb new file mode 100644 index 00000000000..eaa178c41d3 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/spec/classes/params_spec.rb @@ -0,0 +1,26 @@ +require 'spec_helper' + +describe 'apache::params', :type => :class do + context "On a Debian OS" do + let :facts do + { + :osfamily => 'Debian', + :operatingsystemrelease => '6', + :concat_basedir => '/dne', + :lsbdistcodename => 'squeeze', + :operatingsystem => 'Debian', + :id => 'root', + :kernel => 'Linux', + :path => '/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin', + } + end + it { should contain_apache__params } + + # There are 4 resources in this class currently + # there should not be any more resources because it is a params class + # The resources are class[apache::version], class[apache::params], class[main], class[settings], stage[main] + it "Should not contain any resources" do + subject.resources.size.should == 5 + end + end +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/spec/classes/service_spec.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/spec/classes/service_spec.rb new file mode 100644 index 00000000000..2cd075357d7 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/spec/classes/service_spec.rb @@ -0,0 +1,127 @@ +require 'spec_helper' + +describe 'apache::service', :type => :class do + let :pre_condition do + 'include apache::params' + end + context "on a Debian OS" do + let :facts do + { + :osfamily => 'Debian', + :operatingsystemrelease => '6', + :concat_basedir => '/dne', + :lsbdistcodename => 'squeeze', + :operatingsystem => 'Debian', + :id => 'root', + :kernel => 'Linux', + :path => '/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin', + } + end + it { should contain_service("httpd").with( + 'name' => 'apache2', + 'ensure' => 'running', + 'enable' => 'true' + ) + } + + context "with $service_name => 'foo'" do + let (:params) {{ :service_name => 'foo' }} + it { should contain_service("httpd").with( + 'name' => 'foo' + ) + } + end + + context "with $service_enable => true" do + let (:params) {{ :service_enable => true }} + it { should contain_service("httpd").with( + 'name' => 'apache2', + 'ensure' => 'running', + 'enable' => 'true' + ) + } + end + + context "with $service_enable => false" do + let (:params) {{ :service_enable => false }} + it { should contain_service("httpd").with( + 'name' => 'apache2', + 'ensure' => 'running', + 'enable' => 'false' + ) + } + end + + context "$service_enable must be a bool" do + let (:params) {{ :service_enable => 'not-a-boolean' }} + + it 'should fail' do + expect { subject }.to raise_error(Puppet::Error, /is not a boolean/) + end + end + + context "with $service_ensure => 'running'" do + let (:params) {{ :service_ensure => 'running', }} + it { should contain_service("httpd").with( + 'ensure' => 'running', + 'enable' => 'true' + ) + } + end + + context "with $service_ensure => 'stopped'" do + let (:params) {{ :service_ensure => 'stopped', }} + it { should contain_service("httpd").with( + 'ensure' => 'stopped', + 'enable' => 'true' + ) + } + end + + context "with $service_ensure => 'UNDEF'" do + let (:params) {{ :service_ensure => 'UNDEF' }} + it { should contain_service("httpd").without_ensure } + end + end + + + context "on a RedHat 5 OS" do + let :facts do + { + :osfamily => 'RedHat', + :operatingsystemrelease => '5', + :concat_basedir => '/dne', + :operatingsystem => 'RedHat', + :id => 'root', + :kernel => 'Linux', + :path => '/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin', + } + end + it { should contain_service("httpd").with( + 'name' => 'httpd', + 'ensure' => 'running', + 'enable' => 'true' + ) + } + end + + context "on a FreeBSD 5 OS" do + let :facts do + { + :osfamily => 'FreeBSD', + :operatingsystemrelease => '9', + :concat_basedir => '/dne', + :operatingsystem => 'FreeBSD', + :id => 'root', + :kernel => 'FreeBSD', + :path => '/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin', + } + end + it { should contain_service("httpd").with( + 'name' => 'apache22', + 'ensure' => 'running', + 'enable' => 'true' + ) + } + end +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/spec/defines/mod_spec.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/spec/defines/mod_spec.rb new file mode 100644 index 00000000000..e6d5214097d --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/spec/defines/mod_spec.rb @@ -0,0 +1,118 @@ +require 'spec_helper' + +describe 'apache::mod', :type => :define do + let :pre_condition do + 'include apache' + end + context "on a RedHat osfamily" do + let :facts do + { + :osfamily => 'RedHat', + :operatingsystemrelease => '6', + :concat_basedir => '/dne', + :operatingsystem => 'RedHat', + :id => 'root', + :kernel => 'Linux', + :path => '/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin', + } + end + + describe "for non-special modules" do + let :title do + 'spec_m' + end + it { should contain_class("apache::params") } + it "should manage the module load file" do + should contain_file('spec_m.load').with({ + :path => '/etc/httpd/conf.d/spec_m.load', + :content => "LoadModule spec_m_module modules/mod_spec_m.so\n", + :owner => 'root', + :group => 'root', + :mode => '0644', + } ) + end + end + + describe "with shibboleth module and package param passed" do + # name/title for the apache::mod define + let :title do + 'xsendfile' + end + # parameters + let(:params) { {:package => 'mod_xsendfile'} } + + it { should contain_class("apache::params") } + it { should contain_package('mod_xsendfile') } + end + end + + context "on a Debian osfamily" do + let :facts do + { + :osfamily => 'Debian', + :operatingsystemrelease => '6', + :concat_basedir => '/dne', + :lsbdistcodename => 'squeeze', + :operatingsystem => 'Debian', + :id => 'root', + :kernel => 'Linux', + :path => '/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin', + } + end + + describe "for non-special modules" do + let :title do + 'spec_m' + end + it { should contain_class("apache::params") } + it "should manage the module load file" do + should contain_file('spec_m.load').with({ + :path => '/etc/apache2/mods-available/spec_m.load', + :content => "LoadModule spec_m_module /usr/lib/apache2/modules/mod_spec_m.so\n", + :owner => 'root', + :group => 'root', + :mode => '0644', + } ) + end + it "should link the module load file" do + should contain_file('spec_m.load symlink').with({ + :path => '/etc/apache2/mods-enabled/spec_m.load', + :target => '/etc/apache2/mods-available/spec_m.load', + :owner => 'root', + :group => 'root', + :mode => '0644', + } ) + end + end + end + + context "on a FreeBSD osfamily" do + let :facts do + { + :osfamily => 'FreeBSD', + :operatingsystemrelease => '9', + :concat_basedir => '/dne', + :operatingsystem => 'FreeBSD', + :id => 'root', + :kernel => 'FreeBSD', + :path => '/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin', + } + end + + describe "for non-special modules" do + let :title do + 'spec_m' + end + it { should contain_class("apache::params") } + it "should manage the module load file" do + should contain_file('spec_m.load').with({ + :path => '/usr/local/etc/apache22/Modules/spec_m.load', + :content => "LoadModule spec_m_module /usr/local/libexec/apache22/mod_spec_m.so\n", + :owner => 'root', + :group => 'wheel', + :mode => '0644', + } ) + end + end + end +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/spec/defines/vhost_spec.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/spec/defines/vhost_spec.rb new file mode 100644 index 00000000000..4037b3011c2 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/spec/defines/vhost_spec.rb @@ -0,0 +1,1469 @@ +require 'spec_helper' + +describe 'apache::vhost', :type => :define do + let :pre_condition do + 'class { "apache": default_vhost => false, }' + end + let :title do + 'rspec.example.com' + end + let :default_params do + { + :docroot => '/rspec/docroot', + :port => '84', + } + end + describe 'os-dependent items' do + context "on RedHat based systems" do + let :default_facts do + { + :osfamily => 'RedHat', + :operatingsystemrelease => '6', + :concat_basedir => '/dne', + :operatingsystem => 'RedHat', + :id => 'root', + :kernel => 'Linux', + :path => '/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin', + } + end + let :params do default_params end + let :facts do default_facts end + it { should contain_class("apache") } + it { should contain_class("apache::params") } + end + context "on Debian based systems" do + let :default_facts do + { + :osfamily => 'Debian', + :operatingsystemrelease => '6', + :concat_basedir => '/dne', + :lsbdistcodename => 'squeeze', + :operatingsystem => 'Debian', + :id => 'root', + :kernel => 'Linux', + :path => '/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin', + } + end + let :params do default_params end + let :facts do default_facts end + it { should contain_class("apache") } + it { should contain_class("apache::params") } + it { should contain_file("25-rspec.example.com.conf").with( + :ensure => 'present', + :path => '/etc/apache2/sites-available/25-rspec.example.com.conf' + ) } + it { should contain_file("25-rspec.example.com.conf symlink").with( + :ensure => 'link', + :path => '/etc/apache2/sites-enabled/25-rspec.example.com.conf', + :target => '/etc/apache2/sites-available/25-rspec.example.com.conf' + ) } + end + context "on FreeBSD systems" do + let :default_facts do + { + :osfamily => 'FreeBSD', + :operatingsystemrelease => '9', + :concat_basedir => '/dne', + :operatingsystem => 'FreeBSD', + :id => 'root', + :kernel => 'FreeBSD', + :path => '/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin', + } + end + let :params do default_params end + let :facts do default_facts end + it { should contain_class("apache") } + it { should contain_class("apache::params") } + it { should contain_file("25-rspec.example.com.conf").with( + :ensure => 'present', + :path => '/usr/local/etc/apache22/Vhosts/25-rspec.example.com.conf' + ) } + end + end + describe 'os-independent items' do + let :facts do + { + :osfamily => 'Debian', + :operatingsystemrelease => '6', + :concat_basedir => '/dne', + :lsbdistcodename => 'squeeze', + :operatingsystem => 'Debian', + :id => 'root', + :kernel => 'Linux', + :path => '/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin', + } + end + describe 'basic assumptions' do + let :params do default_params end + it { should contain_class("apache") } + it { should contain_class("apache::params") } + it { should contain_apache__listen(params[:port]) } + it { should contain_apache__namevirtualhost("*:#{params[:port]}") } + end + + # All match and notmatch should be a list of regexs and exact match strings + context ".conf content" do + [ + { + :title => 'should contain docroot', + :attr => 'docroot', + :value => '/not/default', + :match => [/^ DocumentRoot "\/not\/default"$/,/ /], + }, + { + :title => 'should set a port', + :attr => 'port', + :value => '8080', + :match => [/^$/], + }, + { + :title => 'should set an ip', + :attr => 'ip', + :value => '10.0.0.1', + :match => [/^$/], + }, + { + :title => 'should set a serveradmin', + :attr => 'serveradmin', + :value => 'test@test.com', + :match => [/^ ServerAdmin test@test.com$/], + }, + { + :title => 'should enable ssl', + :attr => 'ssl', + :value => true, + :match => [/^ SSLEngine on$/], + }, + { + :title => 'should set a servername', + :attr => 'servername', + :value => 'param.test', + :match => [/^ ServerName param.test$/], + }, + { + :title => 'should accept server aliases', + :attr => 'serveraliases', + :value => ['one.com','two.com'], + :match => [ + /^ ServerAlias one\.com$/, + /^ ServerAlias two\.com$/ + ], + }, + { + :title => 'should accept setenv', + :attr => 'setenv', + :value => ['TEST1 one','TEST2 two'], + :match => [ + /^ SetEnv TEST1 one$/, + /^ SetEnv TEST2 two$/ + ], + }, + { + :title => 'should accept setenvif', + :attr => 'setenvif', + ## These are bugged in rspec-puppet; the $1 is droped + #:value => ['Host "^([^\.]*)\.website\.com$" CLIENT_NAME=$1'], + #:match => [' SetEnvIf Host "^([^\.]*)\.website\.com$" CLIENT_NAME=$1'], + :value => ['Host "^test\.com$" VHOST_ACCESS=test'], + :match => [/^ SetEnvIf Host "\^test\\.com\$" VHOST_ACCESS=test$/], + }, + { + :title => 'should accept options', + :attr => 'options', + :value => ['Fake','Options'], + :match => [/^ Options Fake Options$/], + }, + { + :title => 'should accept overrides', + :attr => 'override', + :value => ['Fake', 'Override'], + :match => [/^ AllowOverride Fake Override$/], + }, + { + :title => 'should accept logroot', + :attr => 'logroot', + :value => '/fake/log', + :match => [/CustomLog "\/fake\/log\//,/ErrorLog "\/fake\/log\//], + }, + { + :title => 'should accept log_level', + :attr => 'log_level', + :value => 'info', + :match => [/LogLevel info/], + }, + { + :title => 'should accept pipe destination for access log', + :attr => 'access_log_pipe', + :value => '| /bin/fake/logging', + :match => [/CustomLog "| \/bin\/fake\/logging" combined$/], + }, + { + :title => 'should accept pipe destination for error log', + :attr => 'error_log_pipe', + :value => '| /bin/fake/logging', + :match => [/ErrorLog "| \/bin\/fake\/logging" combined$/], + }, + { + :title => 'should accept syslog destination for access log', + :attr => 'access_log_syslog', + :value => 'syslog:local1', + :match => [/CustomLog "syslog:local1" combined$/], + }, + { + :title => 'should accept syslog destination for error log', + :attr => 'error_log_syslog', + :value => 'syslog', + :match => [/ErrorLog "syslog"$/], + }, + { + :title => 'should accept custom format for access logs', + :attr => 'access_log_format', + :value => '%h %{X-Forwarded-For}i %l %u %t \"%r\" %s %b \"%{Referer}i\" \"%{User-agent}i\" \"Host: %{Host}i\" %T %D', + :match => [/CustomLog "\/var\/log\/.+_access\.log" "%h %\{X-Forwarded-For\}i %l %u %t \\"%r\\" %s %b \\"%\{Referer\}i\\" \\"%\{User-agent\}i\\" \\"Host: %\{Host\}i\\" %T %D"$/], + }, + { + :title => 'should contain access logs', + :attr => 'access_log', + :value => true, + :match => [/CustomLog "\/var\/log\/.+_access\.log" combined$/], + }, + { + :title => 'should not contain access logs', + :attr => 'access_log', + :value => false, + :notmatch => [/CustomLog "\/var\/log\/.+_access\.log" combined$/], + }, + { + :title => 'should contain error logs', + :attr => 'error_log', + :value => true, + :match => [/ErrorLog.+$/], + }, + { + :title => 'should not contain error logs', + :attr => 'error_log', + :value => false, + :notmatch => [/ErrorLog.+$/], + }, + { + :title => 'should set ErrorDocument 503', + :attr => 'error_documents', + :value => [ { 'error_code' => '503', 'document' => '"Go away, the backend is broken."'}], + :match => [/^ ErrorDocument 503 "Go away, the backend is broken."$/], + }, + { + :title => 'should set ErrorDocuments 503 407', + :attr => 'error_documents', + :value => [ + { 'error_code' => '503', 'document' => '/service-unavail'}, + { 'error_code' => '407', 'document' => 'https://example.com/proxy/login'}, + ], + :match => [ + /^ ErrorDocument 503 \/service-unavail$/, + /^ ErrorDocument 407 https:\/\/example\.com\/proxy\/login$/, + ], + }, + { + :title => 'should set ErrorDocument 503 in directory', + :attr => 'directories', + :value => { 'path' => '/srv/www', 'error_documents' => [{ 'error_code' => '503', 'document' => '"Go away, the backend is broken."'}] }, + :match => [/^ ErrorDocument 503 "Go away, the backend is broken."$/], + }, + { + :title => 'should set ErrorDocuments 503 407 in directory', + :attr => 'directories', + :value => { 'path' => '/srv/www', 'error_documents' => + [ + { 'error_code' => '503', 'document' => '/service-unavail'}, + { 'error_code' => '407', 'document' => 'https://example.com/proxy/login'}, + ]}, + :match => [ + /^ ErrorDocument 503 \/service-unavail$/, + /^ ErrorDocument 407 https:\/\/example\.com\/proxy\/login$/, + ], + }, + { + :title => 'should accept a scriptalias', + :attr => 'scriptalias', + :value => '/usr/scripts', + :match => [ + /^ ScriptAlias \/cgi-bin "\/usr\/scripts"$/, + ], + }, + { + :title => 'should accept a single scriptaliases', + :attr => 'scriptaliases', + :value => { 'alias' => '/blah/', 'path' => '/usr/scripts' }, + :match => [ + /^ ScriptAlias \/blah\/ "\/usr\/scripts"$/, + ], + :nomatch => [/ScriptAlias \/cgi\-bin\//], + }, + { + :title => 'should accept multiple scriptaliases', + :attr => 'scriptaliases', + :value => [ { 'alias' => '/blah', 'path' => '/usr/scripts' }, { 'alias' => '/blah2', 'path' => '/usr/scripts' } ], + :match => [ + /^ ScriptAlias \/blah "\/usr\/scripts"$/, + /^ ScriptAlias \/blah2 "\/usr\/scripts"$/, + ], + :nomatch => [/ScriptAlias \/cgi\-bin\//], + }, + { + :title => 'should accept multiple scriptaliases with and without trailing slashes', + :attr => 'scriptaliases', + :value => [ { 'alias' => '/blah', 'path' => '/usr/scripts' }, { 'alias' => '/blah2/', 'path' => '/usr/scripts2/' } ], + :match => [ + /^ ScriptAlias \/blah "\/usr\/scripts"$/, + /^ ScriptAlias \/blah2\/ "\/usr\/scripts2\/"$/, + ], + :nomatch => [/ScriptAlias \/cgi\-bin\//], + }, + { + :title => 'should accept a ScriptAliasMatch directive', + :attr => 'scriptaliases', + ## XXX As mentioned above, rspec-puppet drops constructs like $1. + ## Thus, these tests don't work as they should. As a workaround we + ## use FOO instead of $1 here. + :value => [ { 'aliasmatch' => '^/cgi-bin(.*)', 'path' => '/usr/local/apache/cgi-binFOO' } ], + :match => [ + /^ ScriptAliasMatch \^\/cgi-bin\(\.\*\) "\/usr\/local\/apache\/cgi-binFOO"$/ + ], + }, + { + :title => 'should accept multiple ScriptAliasMatch directives', + :attr => 'scriptaliases', + ## XXX As mentioned above, rspec-puppet drops constructs like $1. + ## Thus, these tests don't work as they should. As a workaround we + ## use FOO instead of $1 here. + :value => [ + { 'aliasmatch' => '^/cgi-bin(.*)', 'path' => '/usr/local/apache/cgi-binFOO' }, + { 'aliasmatch' => '"(?x)^/git/(.*/(HEAD|info/refs|objects/(info/[^/]+|[0-9a-f]{2}/[0-9a-f]{38}|pack/pack-[0-9a-f]{40}\.(pack|idx))|git-(upload|receive)-pack))"', 'path' => '/var/www/bin/gitolite-suexec-wrapper/FOO' }, + ], + :match => [ + /^ ScriptAliasMatch \^\/cgi-bin\(\.\*\) "\/usr\/local\/apache\/cgi-binFOO"$/, + /^ ScriptAliasMatch "\(\?x\)\^\/git\/\(\.\*\/\(HEAD\|info\/refs\|objects\/\(info\/\[\^\/\]\+\|\[0-9a-f\]\{2\}\/\[0-9a-f\]\{38\}\|pack\/pack-\[0-9a-f\]\{40\}\\\.\(pack\|idx\)\)\|git-\(upload\|receive\)-pack\)\)" "\/var\/www\/bin\/gitolite-suexec-wrapper\/FOO"$/, + ], + }, + { + :title => 'should accept mixed ScriptAlias and ScriptAliasMatch directives', + :attr => 'scriptaliases', + ## XXX As mentioned above, rspec-puppet drops constructs like $1. + ## Thus, these tests don't work as they should. As a workaround we + ## use FOO instead of $1 here. + :value => [ + { 'aliasmatch' => '"(?x)^/git/(.*/(HEAD|info/refs|objects/(info/[^/]+|[0-9a-f]{2}/[0-9a-f]{38}|pack/pack-[0-9a-f]{40}\.(pack|idx))|git-(upload|receive)-pack))"', 'path' => '/var/www/bin/gitolite-suexec-wrapper/FOO' }, + { 'alias' => '/git', 'path' => '/var/www/gitweb/index.cgi' }, + { 'aliasmatch' => '^/cgi-bin(.*)', 'path' => '/usr/local/apache/cgi-binFOO' }, + { 'alias' => '/trac', 'path' => '/etc/apache2/trac.fcgi' }, + ], + :match => [ + /^ ScriptAliasMatch "\(\?x\)\^\/git\/\(\.\*\/\(HEAD\|info\/refs\|objects\/\(info\/\[\^\/\]\+\|\[0-9a-f\]\{2\}\/\[0-9a-f\]\{38\}\|pack\/pack-\[0-9a-f\]\{40\}\\\.\(pack\|idx\)\)\|git-\(upload\|receive\)-pack\)\)" "\/var\/www\/bin\/gitolite-suexec-wrapper\/FOO"$/, + /^ ScriptAlias \/git "\/var\/www\/gitweb\/index\.cgi"$/, + /^ ScriptAliasMatch \^\/cgi-bin\(\.\*\) "\/usr\/local\/apache\/cgi-binFOO"$/, + /^ ScriptAlias \/trac "\/etc\/apache2\/trac.fcgi"$/, + ], + }, + { + :title => 'should accept proxy destinations', + :attr => 'proxy_dest', + :value => 'http://fake.com', + :match => [ + /^ ProxyPass \/ http:\/\/fake.com\/$/, + /^ $/, + /^ ProxyPassReverse http:\/\/fake.com\/$/, + /^ <\/Location>$/, + ], + :notmatch => [/ProxyPass .+!$/], + }, + { + :title => 'should accept proxy_pass hash', + :attr => 'proxy_pass', + :value => { 'path' => '/path-a', 'url' => 'http://fake.com/a' }, + :match => [ + /^ ProxyPass \/path-a http:\/\/fake.com\/a$/, + /^ $/, + /^ ProxyPassReverse http:\/\/fake.com\/a$/, + /^ <\/Location>$/, + + ], + :notmatch => [/ProxyPass .+!$/], + }, + { + :title => 'should accept proxy_pass array of hash', + :attr => 'proxy_pass', + :value => [ + { 'path' => '/path-a/', 'url' => 'http://fake.com/a/' }, + { 'path' => '/path-b', 'url' => 'http://fake.com/b' }, + ], + :match => [ + /^ ProxyPass \/path-a\/ http:\/\/fake.com\/a\/$/, + /^ $/, + /^ ProxyPassReverse http:\/\/fake.com\/a\/$/, + /^ <\/Location>$/, + /^ ProxyPass \/path-b http:\/\/fake.com\/b$/, + /^ $/, + /^ ProxyPassReverse http:\/\/fake.com\/b$/, + /^ <\/Location>$/, + ], + :notmatch => [/ProxyPass .+!$/], + }, + { + :title => 'should enable rack', + :attr => 'rack_base_uris', + :value => ['/rack1','/rack2'], + :match => [ + /^ RackBaseURI \/rack1$/, + /^ RackBaseURI \/rack2$/, + ], + }, + { + :title => 'should accept headers', + :attr => 'headers', + :value => ['add something', 'merge something_else'], + :match => [ + /^ Header add something$/, + /^ Header merge something_else$/, + ], + }, + { + :title => 'should accept request headers', + :attr => 'request_headers', + :value => ['append something', 'unset something_else'], + :match => [ + /^ RequestHeader append something$/, + /^ RequestHeader unset something_else$/, + ], + }, + { + :title => 'should accept rewrite rules', + :attr => 'rewrite_rule', + :value => 'not a real rule', + :match => [/^ RewriteRule not a real rule$/], + }, + { + :title => 'should accept rewrite rules', + :attr => 'rewrites', + :value => [{'rewrite_rule' => ['not a real rule']}], + :match => [/^ RewriteRule not a real rule$/], + }, + { + :title => 'should accept rewrite comment', + :attr => 'rewrites', + :value => [{'comment' => 'rewrite comment', 'rewrite_rule' => ['not a real rule']}], + :match => [/^ #rewrite comment/], + }, + { + :title => 'should accept rewrite conditions', + :attr => 'rewrites', + :value => [{'comment' => 'redirect IE', 'rewrite_cond' => ['%{HTTP_USER_AGENT} ^MSIE'], 'rewrite_rule' => ['^index\.html$ welcome.html'],}], + :match => [ + /^ #redirect IE$/, + /^ RewriteCond %{HTTP_USER_AGENT} \^MSIE$/, + /^ RewriteRule \^index\\\.html\$ welcome.html$/, + ], + }, + { + :title => 'should accept multiple rewrites', + :attr => 'rewrites', + :value => [ + {'rewrite_rule' => ['not a real rule']}, + {'rewrite_rule' => ['not a real rule two']}, + ], + :match => [ + /^ RewriteRule not a real rule$/, + /^ RewriteRule not a real rule two$/, + ], + }, + { + :title => 'should block scm', + :attr => 'block', + :value => 'scm', + :match => [/^ $/], + }, + { + :title => 'should accept a custom fragment', + :attr => 'custom_fragment', + :value => " Some custom fragment line\n That spans multiple lines", + :match => [ + /^ Some custom fragment line$/, + /^ That spans multiple lines$/, + /^<\/VirtualHost>$/, + ], + }, + { + :title => 'should accept an array of alias hashes', + :attr => 'aliases', + :value => [ { 'alias' => '/', 'path' => '/var/www'} ], + :match => [/^ Alias \/ "\/var\/www"$/], + }, + { + :title => 'should accept an alias hash', + :attr => 'aliases', + :value => { 'alias' => '/', 'path' => '/var/www'}, + :match => [/^ Alias \/ "\/var\/www"$/], + }, + { + :title => 'should accept multiple aliases', + :attr => 'aliases', + :value => [ + { 'alias' => '/', 'path' => '/var/www'}, + { 'alias' => '/cgi-bin', 'path' => '/var/www/cgi-bin'}, + { 'alias' => '/css', 'path' => '/opt/someapp/css'}, + ], + :match => [ + /^ Alias \/ "\/var\/www"$/, + /^ Alias \/cgi-bin "\/var\/www\/cgi-bin"$/, + /^ Alias \/css "\/opt\/someapp\/css"$/, + ], + }, + { + :title => 'should accept an aliasmatch hash', + :attr => 'aliases', + ## XXX As mentioned above, rspec-puppet drops the $1. Thus, these + # tests don't work. + #:value => { 'aliasmatch' => '^/image/(.*).gif', 'path' => '/files/gifs/$1.gif' }, + #:match => [/^ AliasMatch \^\/image\/\(\.\*\)\.gif \/files\/gifs\/\$1\.gif$/], + }, + { + :title => 'should accept a array of alias and aliasmatch hashes mixed', + :attr => 'aliases', + ## XXX As mentioned above, rspec-puppet drops the $1. Thus, these + # tests don't work. + #:value => [ + # { 'alias' => '/css', 'path' => '/files/css' }, + # { 'aliasmatch' => '^/image/(.*).gif', 'path' => '/files/gifs/$1.gif' }, + # { 'aliasmatch' => '^/image/(.*).jpg', 'path' => '/files/jpgs/$1.jpg' }, + # { 'alias' => '/image', 'path' => '/files/images' }, + #], + #:match => [ + # /^ Alias \/css \/files\/css$/, + # /^ AliasMatch \^\/image\/\(.\*\)\.gif \/files\/gifs\/\$1\.gif$/, + # /^ AliasMatch \^\/image\/\(.\*\)\.jpg \/files\/jpgs\/\$1\.jpg$/, + # /^ Alias \/image \/files\/images$/ + #], + }, + { + :title => 'should accept multiple additional includes', + :attr => 'additional_includes', + :value => [ + '/tmp/proxy_group_a', + '/tmp/proxy_group_b', + '/tmp/proxy_group_c', + ], + :match => [ + /^ Include "\/tmp\/proxy_group_a"$/, + /^ Include "\/tmp\/proxy_group_b"$/, + /^ Include "\/tmp\/proxy_group_c"$/, + ], + }, + { + :title => 'should accept a suPHP_Engine', + :attr => 'suphp_engine', + :value => 'on', + :match => [/^ suPHP_Engine on$/], + }, + { + :title => 'should accept a php_admin_flags', + :attr => 'php_admin_flags', + :value => { 'engine' => 'on' }, + :match => [/^ php_admin_flag engine on$/], + }, + { + :title => 'should accept php_admin_values', + :attr => 'php_admin_values', + :value => { 'open_basedir' => '/srv/web/www.com/:/usr/share/pear/' }, + :match => [/^ php_admin_value open_basedir \/srv\/web\/www.com\/:\/usr\/share\/pear\/$/], + }, + { + :title => 'should accept php_admin_flags in directories', + :attr => 'directories', + :value => { + 'path' => '/srv/www', + 'php_admin_flags' => { 'php_engine' => 'on' } + }, + :match => [/^ php_admin_flag php_engine on$/], + }, + { + :title => 'should accept php_admin_values', + :attr => 'php_admin_values', + :value => { 'open_basedir' => '/srv/web/www.com/:/usr/share/pear/' }, + :match => [/^ php_admin_value open_basedir \/srv\/web\/www.com\/:\/usr\/share\/pear\/$/], + }, + { + :title => 'should accept php_admin_values in directories', + :attr => 'directories', + :value => { + 'path' => '/srv/www', + 'php_admin_values' => { 'open_basedir' => '/srv/web/www.com/:/usr/share/pear/' } + }, + :match => [/^ php_admin_value open_basedir \/srv\/web\/www.com\/:\/usr\/share\/pear\/$/], + }, + { + :title => 'should accept a wsgi script alias', + :attr => 'wsgi_script_aliases', + :value => { '/' => '/var/www/myapp.wsgi'}, + :match => [/^ WSGIScriptAlias \/ "\/var\/www\/myapp.wsgi"$/], + }, + { + :title => 'should accept multiple wsgi aliases', + :attr => 'wsgi_script_aliases', + :value => { + '/wiki' => '/usr/local/wsgi/scripts/mywiki.wsgi', + '/blog' => '/usr/local/wsgi/scripts/myblog.wsgi', + '/' => '/usr/local/wsgi/scripts/myapp.wsgi', + }, + :match => [ + /^ WSGIScriptAlias \/wiki "\/usr\/local\/wsgi\/scripts\/mywiki.wsgi"$/, + /^ WSGIScriptAlias \/blog "\/usr\/local\/wsgi\/scripts\/myblog.wsgi"$/, + /^ WSGIScriptAlias \/ "\/usr\/local\/wsgi\/scripts\/myapp.wsgi"$/, + ], + }, + { + :title => 'should accept a wsgi application group', + :attr => 'wsgi_application_group', + :value => '%{GLOBAL}', + :match => [/^ WSGIApplicationGroup %{GLOBAL}$/], + }, + { + :title => 'should set wsgi pass authorization', + :attr => 'wsgi_pass_authorization', + :value => 'On', + :match => [/^ WSGIPassAuthorization On$/], + }, + { + :title => 'should set wsgi pass authorization false', + :attr => 'wsgi_pass_authorization', + :value => 'Off', + :match => [/^ WSGIPassAuthorization Off$/], + }, + { + :title => 'should contain environment variables', + :attr => 'access_log_env_var', + :value => 'admin', + :match => [/CustomLog "\/var\/log\/.+_access\.log" combined env=admin$/] + }, + { + :title => 'should contain virtual_docroot', + :attr => 'virtual_docroot', + :value => '/not/default', + :match => [ + /^ VirtualDocumentRoot "\/not\/default"$/, + ], + }, + { + :title => 'should accept multiple directories', + :attr => 'directories', + :value => [ + { 'path' => '/opt/app' }, + { 'path' => '/var/www' }, + { 'path' => '/rspec/docroot'} + ], + :match => [ + /^ $/, + /^ $/, + /^ $/, + ], + }, + ].each do |param| + describe "when #{param[:attr]} is #{param[:value]}" do + let :params do default_params.merge({ param[:attr].to_sym => param[:value] }) end + + it { should contain_file("25-#{title}.conf").with_mode('0644') } + if param[:match] + it "#{param[:title]}: matches" do + param[:match].each do |match| + should contain_file("25-#{title}.conf").with_content( match ) + end + end + end + if param[:notmatch] + it "#{param[:title]}: notmatches" do + param[:notmatch].each do |notmatch| + should_not contain_file("25-#{title}.conf").with_content( notmatch ) + end + end + end + end + end + end + + # Apache below 2.4 (Default Version). All match and notmatch should be a list of regexs and exact match strings + context ".conf content with $apache_version < 2.4" do + [ + { + :title => 'should accept a directory', + :attr => 'directories', + :value => { 'path' => '/opt/app' }, + :notmatch => [' '], + :match => [ + /^ $/, + /^ AllowOverride None$/, + /^ Order allow,deny$/, + /^ Allow from all$/, + /^ <\/Directory>$/, + ], + }, + { + :title => 'should accept directory directives hash', + :attr => 'directories', + :value => { + 'path' => '/opt/app', + 'headers' => 'Set X-Robots-Tag "noindex, noarchive, nosnippet"', + 'allow' => 'from rspec.org', + 'allow_override' => 'Lol', + 'deny' => 'from google.com', + 'options' => '-MultiViews', + 'order' => 'deny,yned', + 'passenger_enabled' => 'onf', + 'sethandler' => 'None', + }, + :match => [ + /^ $/, + /^ Header Set X-Robots-Tag "noindex, noarchive, nosnippet"$/, + /^ Allow from rspec.org$/, + /^ AllowOverride Lol$/, + /^ Deny from google.com$/, + /^ Options -MultiViews$/, + /^ Order deny,yned$/, + /^ SetHandler None$/, + /^ PassengerEnabled onf$/, + /^ <\/Directory>$/, + ], + }, + { + :title => 'should accept directory directives with arrays and hashes', + :attr => 'directories', + :value => [ + { + 'path' => '/opt/app1', + 'allow' => 'from rspec.org', + 'allow_override' => ['AuthConfig','Indexes'], + 'deny' => 'from google.com', + 'options' => ['-MultiViews','+MultiViews'], + 'order' => ['deny','yned'], + 'passenger_enabled' => 'onf', + }, + { + 'path' => '/opt/app2', + 'addhandlers' => { + 'handler' => 'cgi-script', + 'extensions' => '.cgi', + }, + }, + ], + :match => [ + /^ $/, + /^ Allow from rspec.org$/, + /^ AllowOverride AuthConfig Indexes$/, + /^ Deny from google.com$/, + /^ Options -MultiViews \+MultiViews$/, + /^ Order deny,yned$/, + /^ PassengerEnabled onf$/, + /^ <\/Directory>$/, + /^ $/, + /^ AllowOverride None$/, + /^ Order allow,deny$/, + /^ Allow from all$/, + /^ AddHandler cgi-script .cgi$/, + /^ <\/Directory>$/, + ], + }, + { + :title => 'should accept location for provider', + :attr => 'directories', + :value => { + 'path' => '/', + 'provider' => 'location', + }, + :notmatch => [' AllowOverride None'], + :match => [ + /^ $/, + /^ Order allow,deny$/, + /^ Allow from all$/, + /^ <\/Location>$/, + ], + }, + { + :title => 'should accept files for provider', + :attr => 'directories', + :value => { + 'path' => 'index.html', + 'provider' => 'files', + }, + :notmatch => [' AllowOverride None'], + :match => [ + /^ $/, + /^ Order allow,deny$/, + /^ Allow from all$/, + /^ <\/Files>$/, + ], + }, + { + :title => 'should accept files match for provider', + :attr => 'directories', + :value => { + 'path' => 'index.html', + 'provider' => 'filesmatch', + }, + :notmatch => [' AllowOverride None'], + :match => [ + /^ $/, + /^ Order allow,deny$/, + /^ Allow from all$/, + /^ <\/FilesMatch>$/, + ], + }, + ].each do |param| + describe "when #{param[:attr]} is #{param[:value]}" do + let :params do default_params.merge({ + param[:attr].to_sym => param[:value], + :apache_version => '2.2', + }) end + + it { should contain_file("25-#{title}.conf").with_mode('0644') } + if param[:match] + it "#{param[:title]}: matches" do + param[:match].each do |match| + should contain_file("25-#{title}.conf").with_content( match ) + end + end + end + if param[:notmatch] + it "#{param[:title]}: notmatches" do + param[:notmatch].each do |notmatch| + should_not contain_file("25-#{title}.conf").with_content( notmatch ) + end + end + end + end + end + end + + # Apache equals or above 2.4. All match and notmatch should be a list of regexs and exact match strings + context ".conf content with $apache_version >= 2.4" do + [ + { + :title => 'should accept a directory', + :attr => 'directories', + :value => { 'path' => '/opt/app' }, + :notmatch => [' '], + :match => [ + /^ $/, + /^ AllowOverride None$/, + /^ Require all granted$/, + /^ <\/Directory>$/, + ], + }, + { + :title => 'should accept directory directives hash', + :attr => 'directories', + :value => { + 'path' => '/opt/app', + 'headers' => 'Set X-Robots-Tag "noindex, noarchive, nosnippet"', + 'allow_override' => 'Lol', + 'options' => '-MultiViews', + 'require' => 'something denied', + 'passenger_enabled' => 'onf', + }, + :match => [ + /^ $/, + /^ Header Set X-Robots-Tag "noindex, noarchive, nosnippet"$/, + /^ AllowOverride Lol$/, + /^ Options -MultiViews$/, + /^ Require something denied$/, + /^ PassengerEnabled onf$/, + /^ <\/Directory>$/, + ], + }, + { + :title => 'should accept directory directives with arrays and hashes', + :attr => 'directories', + :value => [ + { + 'path' => '/opt/app1', + 'allow_override' => ['AuthConfig','Indexes'], + 'options' => ['-MultiViews','+MultiViews'], + 'require' => ['host','example.org'], + 'passenger_enabled' => 'onf', + }, + { + 'path' => '/opt/app2', + 'addhandlers' => { + 'handler' => 'cgi-script', + 'extensions' => '.cgi', + }, + }, + ], + :match => [ + /^ $/, + /^ AllowOverride AuthConfig Indexes$/, + /^ Options -MultiViews \+MultiViews$/, + /^ Require host example.org$/, + /^ PassengerEnabled onf$/, + /^ <\/Directory>$/, + /^ $/, + /^ AllowOverride None$/, + /^ Require all granted$/, + /^ AddHandler cgi-script .cgi$/, + /^ <\/Directory>$/, + ], + }, + { + :title => 'should accept location for provider', + :attr => 'directories', + :value => { + 'path' => '/', + 'provider' => 'location', + }, + :notmatch => [' AllowOverride None'], + :match => [ + /^ $/, + /^ Require all granted$/, + /^ <\/Location>$/, + ], + }, + { + :title => 'should accept files for provider', + :attr => 'directories', + :value => { + 'path' => 'index.html', + 'provider' => 'files', + }, + :notmatch => [' AllowOverride None'], + :match => [ + /^ $/, + /^ Require all granted$/, + /^ <\/Files>$/, + ], + }, + { + :title => 'should accept files match for provider', + :attr => 'directories', + :value => { + 'path' => 'index.html', + 'provider' => 'filesmatch', + }, + :notmatch => [' AllowOverride None'], + :match => [ + /^ $/, + /^ Require all granted$/, + /^ <\/FilesMatch>$/, + ], + }, + ].each do |param| + describe "when #{param[:attr]} is #{param[:value]}" do + let :params do default_params.merge({ + param[:attr].to_sym => param[:value], + :apache_version => '2.4', + }) end + + it { should contain_file("25-#{title}.conf").with_mode('0644') } + if param[:match] + it "#{param[:title]}: matches" do + param[:match].each do |match| + should contain_file("25-#{title}.conf").with_content( match ) + end + end + end + if param[:notmatch] + it "#{param[:title]}: notmatches" do + param[:notmatch].each do |notmatch| + should_not contain_file("25-#{title}.conf").with_content( notmatch ) + end + end + end + end + end + end + + # All match and notmatch should be a list of regexs and exact match strings + context ".conf content with SSL" do + [ + { + :title => 'should accept setting SSLCertificateFile', + :attr => 'ssl_cert', + :value => '/path/to/cert.pem', + :match => [/^ SSLCertificateFile "\/path\/to\/cert\.pem"$/], + }, + { + :title => 'should accept setting SSLCertificateKeyFile', + :attr => 'ssl_key', + :value => '/path/to/cert.pem', + :match => [/^ SSLCertificateKeyFile "\/path\/to\/cert\.pem"$/], + }, + { + :title => 'should accept setting SSLCertificateChainFile', + :attr => 'ssl_chain', + :value => '/path/to/cert.pem', + :match => [/^ SSLCertificateChainFile "\/path\/to\/cert\.pem"$/], + }, + { + :title => 'should accept setting SSLCertificatePath', + :attr => 'ssl_certs_dir', + :value => '/path/to/certs', + :match => [/^ SSLCACertificatePath "\/path\/to\/certs"$/], + }, + { + :title => 'should accept setting SSLCertificateFile', + :attr => 'ssl_ca', + :value => '/path/to/ca.pem', + :match => [/^ SSLCACertificateFile "\/path\/to\/ca\.pem"$/], + }, + { + :title => 'should accept setting SSLRevocationPath', + :attr => 'ssl_crl_path', + :value => '/path/to/crl', + :match => [/^ SSLCARevocationPath "\/path\/to\/crl"$/], + }, + { + :title => 'should accept setting SSLRevocationFile', + :attr => 'ssl_crl', + :value => '/path/to/crl.pem', + :match => [/^ SSLCARevocationFile "\/path\/to\/crl\.pem"$/], + }, + { + :title => 'should accept setting SSLProxyEngine', + :attr => 'ssl_proxyengine', + :value => true, + :match => [/^ SSLProxyEngine On$/], + }, + { + :title => 'should accept setting SSLProtocol', + :attr => 'ssl_protocol', + :value => 'all -SSLv2', + :match => [/^ SSLProtocol all -SSLv2$/], + }, + { + :title => 'should accept setting SSLCipherSuite', + :attr => 'ssl_cipher', + :value => 'RC4-SHA:HIGH:!ADH:!SSLv2', + :match => [/^ SSLCipherSuite RC4-SHA:HIGH:!ADH:!SSLv2$/], + }, + { + :title => 'should accept setting SSLHonorCipherOrder', + :attr => 'ssl_honorcipherorder', + :value => 'On', + :match => [/^ SSLHonorCipherOrder On$/], + }, + { + :title => 'should accept setting SSLVerifyClient', + :attr => 'ssl_verify_client', + :value => 'optional', + :match => [/^ SSLVerifyClient optional$/], + }, + { + :title => 'should accept setting SSLVerifyDepth', + :attr => 'ssl_verify_depth', + :value => '1', + :match => [/^ SSLVerifyDepth 1$/], + }, + { + :title => 'should accept setting SSLOptions with a string', + :attr => 'ssl_options', + :value => '+ExportCertData', + :match => [/^ SSLOptions \+ExportCertData$/], + }, + { + :title => 'should accept setting SSLOptions with an array', + :attr => 'ssl_options', + :value => ['+StrictRequire','+ExportCertData'], + :match => [/^ SSLOptions \+StrictRequire \+ExportCertData/], + }, + { + :title => 'should accept setting SSLOptions with a string in directories', + :attr => 'directories', + :value => { 'path' => '/srv/www', 'ssl_options' => '+ExportCertData'}, + :match => [/^ SSLOptions \+ExportCertData$/], + }, + { + :title => 'should accept setting SSLOptions with an array in directories', + :attr => 'directories', + :value => { 'path' => '/srv/www', 'ssl_options' => ['-StdEnvVars','+ExportCertData']}, + :match => [/^ SSLOptions -StdEnvVars \+ExportCertData/], + }, + ].each do |param| + describe "when #{param[:attr]} is #{param[:value]} with SSL" do + let :params do + default_params.merge( { + param[:attr].to_sym => param[:value], + :ssl => true, + } ) + end + it { should contain_file("25-#{title}.conf").with_mode('0644') } + if param[:match] + it "#{param[:title]}: matches" do + param[:match].each do |match| + should contain_file("25-#{title}.conf").with_content( match ) + end + end + end + if param[:notmatch] + it "#{param[:title]}: notmatches" do + param[:notmatch].each do |notmatch| + should_not contain_file("25-#{title}.conf").with_content( notmatch ) + end + end + end + end + end + end + + context 'attribute resources' do + describe 'when access_log_file and access_log_pipe are specified' do + let :params do default_params.merge({ + :access_log_file => 'fake.log', + :access_log_pipe => '| /bin/fake', + }) end + it 'should cause a failure' do + expect { subject }.to raise_error(Puppet::Error, /'access_log_file' and 'access_log_pipe' cannot be defined at the same time/) + end + end + describe 'when error_log_file and error_log_pipe are specified' do + let :params do default_params.merge({ + :error_log_file => 'fake.log', + :error_log_pipe => '| /bin/fake', + }) end + it 'should cause a failure' do + expect { subject }.to raise_error(Puppet::Error, /'error_log_file' and 'error_log_pipe' cannot be defined at the same time/) + end + end + describe 'when docroot owner and mode is specified' do + let :params do default_params.merge({ + :docroot_owner => 'testuser', + :docroot_group => 'testgroup', + :docroot_mode => '0750', + }) end + it 'should set vhost ownership and permissions' do + should contain_file(params[:docroot]).with({ + :ensure => :directory, + :owner => 'testuser', + :group => 'testgroup', + :mode => '0750', + }) + end + end + + describe 'when wsgi_daemon_process and wsgi_daemon_process_options are specified' do + let :params do default_params.merge({ + :wsgi_daemon_process => 'example.org', + :wsgi_daemon_process_options => { 'processes' => '2', 'threads' => '15' }, + }) end + it 'should set wsgi_daemon_process_options' do + should contain_file("25-#{title}.conf").with_content( + /^ WSGIDaemonProcess example.org processes=2 threads=15$/ + ) + end + end + + describe 'when wsgi_import_script and wsgi_import_script_options are specified' do + let :params do default_params.merge({ + :wsgi_import_script => '/var/www/demo.wsgi', + :wsgi_import_script_options => { 'application-group' => '%{GLOBAL}', 'process-group' => 'wsgi' }, + }) end + it 'should set wsgi_import_script_options' do + should contain_file("25-#{title}.conf").with_content( + /^ WSGIImportScript \/var\/www\/demo.wsgi application-group=%{GLOBAL} process-group=wsgi$/ + ) + end + end + + describe 'when rewrites are specified' do + let :params do default_params.merge({ + :rewrites => [ + { + 'comment' => 'test rewrites', + 'rewrite_base' => '/mytestpath/', + 'rewrite_cond' => ['%{HTTP_USER_AGENT} ^Lynx/ [OR]', '%{HTTP_USER_AGENT} ^Mozilla/[12]'], + 'rewrite_rule' => ['^index\.html$ welcome.html', '^index\.cgi$ index.php'], + } + ] + }) end + it 'should set RewriteConds and RewriteRules' do + should contain_file("25-#{title}.conf").with_content( + /^ #test rewrites$/ + ) + should contain_file("25-#{title}.conf").with_content( + /^ RewriteCond %\{HTTP_USER_AGENT\} \^Lynx\/ \[OR\]$/ + ) + should contain_file("25-#{title}.conf").with_content( + /^ RewriteBase \/mytestpath\/$/ + ) + should contain_file("25-#{title}.conf").with_content( + /^ RewriteCond %\{HTTP_USER_AGENT\} \^Mozilla\/\[12\]$/ + ) + should contain_file("25-#{title}.conf").with_content( + /^ RewriteRule \^index\\.html\$ welcome.html$/ + ) + should contain_file("25-#{title}.conf").with_content( + /^ RewriteRule \^index\\.cgi\$ index.php$/ + ) + end + end + + describe 'when rewrite_rule and rewrite_cond are specified' do + let :params do default_params.merge({ + :rewrite_cond => '%{HTTPS} off', + :rewrite_rule => '(.*) https://%{HTTPS_HOST}%{REQUEST_URI}', + }) end + it 'should set RewriteCond' do + should contain_file("25-#{title}.conf").with_content( + /^ RewriteCond %\{HTTPS\} off$/ + ) + end + end + + describe 'when action is specified specified' do + let :params do default_params.merge({ + :action => 'php-fastcgi', + }) end + it 'should set Action' do + should contain_file("25-#{title}.conf").with_content( + /^ Action php-fastcgi \/cgi-bin virtual$/ + ) + end + end + + describe 'when suphp_engine is on and suphp_configpath is specified' do + let :params do default_params.merge({ + :suphp_engine => 'on', + :suphp_configpath => '/etc/php5/apache2', + }) end + it 'should set suphp_configpath' do + should contain_file("25-#{title}.conf").with_content( + /^ suPHP_ConfigPath "\/etc\/php5\/apache2"$/ + ) + end + end + + describe 'when suphp_engine is on and suphp_addhandler is specified' do + let :params do default_params.merge({ + :suphp_engine => 'on', + :suphp_addhandler => 'x-httpd-php', + }) end + it 'should set suphp_addhandler' do + should contain_file("25-#{title}.conf").with_content( + /^ suPHP_AddHandler x-httpd-php/ + ) + end + end + + describe 'when suphp_engine is on and suphp { user & group } is specified' do + let :params do default_params.merge({ + :suphp_engine => 'on', + :directories => { 'path' => '/srv/www', + 'suphp' => { 'user' => 'myappuser', 'group' => 'myappgroup' }, + } + }) end + it 'should set suphp_UserGroup' do + should contain_file("25-#{title}.conf").with_content( + /^ suPHP_UserGroup myappuser myappgroup/ + ) + end + end + + describe 'priority/default settings' do + describe 'when neither priority/default is specified' do + let :params do default_params end + it { should contain_file("25-#{title}.conf").with_path( + /25-#{title}.conf/ + ) } + end + describe 'when both priority/default_vhost is specified' do + let :params do + default_params.merge({ + :priority => 15, + :default_vhost => true, + }) + end + it { should contain_file("15-#{title}.conf").with_path( + /15-#{title}.conf/ + ) } + end + describe 'when only priority is specified' do + let :params do + default_params.merge({ :priority => 14, }) + end + it { should contain_file("14-#{title}.conf").with_path( + /14-#{title}.conf/ + ) } + end + describe 'when only default is specified' do + let :params do + default_params.merge({ :default_vhost => true, }) + end + it { should contain_file("10-#{title}.conf").with_path( + /10-#{title}.conf/ + ) } + end + end + + describe 'fcgid directory options' do + describe 'No fcgiwrapper' do + let :params do + default_params.merge({ + :directories => { 'path' => '/srv/www' }, + }) + end + + it { should_not contain_file("25-#{title}.conf").with_content(%r{FcgidWrapper}) } + end + + describe 'Only a command' do + let :params do + default_params.merge({ + :directories => { 'path' => '/srv/www', + 'fcgiwrapper' => { 'command' => '/usr/local/bin/fcgiwrapper' }, + } + }) + end + + it { should contain_file("25-#{title}.conf").with_content(%r{^ FcgidWrapper /usr/local/bin/fcgiwrapper $}) } + end + + describe 'All parameters' do + let :params do + default_params.merge({ + :directories => { 'path' => '/srv/www', + 'fcgiwrapper' => { 'command' => '/usr/local/bin/fcgiwrapper', 'suffix' => '.php', 'virtual' => 'virtual' }, + } + }) + end + + it { should contain_file("25-#{title}.conf").with_content(%r{^ FcgidWrapper /usr/local/bin/fcgiwrapper .php virtual$}) } + end + end + + describe 'various ip/port combos' do + describe 'when ip_based is true' do + let :params do default_params.merge({ :ip_based => true }) end + it 'should not specify a NameVirtualHost' do + should contain_apache__listen(params[:port]) + should_not contain_apache__namevirtualhost("*:#{params[:port]}") + end + end + + describe 'when ip_based is default' do + let :params do default_params end + it 'should specify a NameVirtualHost' do + should contain_apache__listen(params[:port]) + should contain_apache__namevirtualhost("*:#{params[:port]}") + end + end + + describe 'when an ip is set' do + let :params do default_params.merge({ :ip => '10.0.0.1' }) end + it 'should specify a NameVirtualHost for the ip' do + should_not contain_apache__listen(params[:port]) + should contain_apache__listen("10.0.0.1:#{params[:port]}") + should contain_apache__namevirtualhost("10.0.0.1:#{params[:port]}") + end + end + + describe 'an ip_based vhost without a port' do + let :params do + { + :docroot => '/fake', + :ip => '10.0.0.1', + :ip_based => true, + } + end + it 'should specify a NameVirtualHost for the ip' do + should_not contain_apache__listen(params[:ip]) + should_not contain_apache__namevirtualhost(params[:ip]) + should contain_file("25-#{title}.conf").with_content %r{} + end + end + end + + describe 'when suexec_user_group is specified' do + let :params do + default_params.merge({ + :suexec_user_group => 'nobody nogroup', + }) + end + + it { should contain_file("25-#{title}.conf").with_content %r{^ SuexecUserGroup nobody nogroup$} } + end + + describe 'redirect rules' do + describe 'without lockstep arrays' do + let :params do + default_params.merge({ + :redirect_source => [ + '/login', + '/logout', + ], + :redirect_dest => [ + 'http://10.0.0.10/login', + 'http://10.0.0.10/logout', + ], + :redirect_status => [ + 'permanent', + '', + ], + }) + end + + it { should contain_file("25-#{title}.conf").with_content %r{ Redirect permanent /login http://10\.0\.0\.10/login} } + it { should contain_file("25-#{title}.conf").with_content %r{ Redirect /logout http://10\.0\.0\.10/logout} } + end + describe 'redirect match rules' do + let :params do + default_params.merge({ + :redirectmatch_status => [ + '404', + ], + :redirectmatch_regexp => [ + '/\.git(/.*|$)', + ], + }) + end + + it { should contain_file("25-#{title}.conf").with_content %r{ RedirectMatch 404 } } + end + describe 'without a status' do + let :params do + default_params.merge({ + :redirect_source => [ + '/login', + '/logout', + ], + :redirect_dest => [ + 'http://10.0.0.10/login', + 'http://10.0.0.10/logout', + ], + }) + end + + it { should contain_file("25-#{title}.conf").with_content %r{ Redirect /login http://10\.0\.0\.10/login} } + it { should contain_file("25-#{title}.conf").with_content %r{ Redirect /logout http://10\.0\.0\.10/logout} } + end + describe 'with a single status and dest' do + let :params do + default_params.merge({ + :redirect_source => [ + '/login', + '/logout', + ], + :redirect_dest => 'http://10.0.0.10/test', + :redirect_status => 'permanent', + }) + end + + it { should contain_file("25-#{title}.conf").with_content %r{ Redirect permanent /login http://10\.0\.0\.10/test} } + it { should contain_file("25-#{title}.conf").with_content %r{ Redirect permanent /logout http://10\.0\.0\.10/test} } + end + + describe 'with a directoryindex specified' do + let :params do + default_params.merge({ + :directoryindex => 'index.php' + }) + end + it { should contain_file("25-#{title}.conf").with_content %r{DirectoryIndex index.php} } + end + end + end + end +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/spec/fixtures/files/spec b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/spec/fixtures/files/spec new file mode 100644 index 00000000000..76e9a144667 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/spec/fixtures/files/spec @@ -0,0 +1 @@ +# This is a file only for spec testing diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/spec/fixtures/modules/site_apache/templates/fake.conf.erb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/spec/fixtures/modules/site_apache/templates/fake.conf.erb new file mode 100644 index 00000000000..019debfe481 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/spec/fixtures/modules/site_apache/templates/fake.conf.erb @@ -0,0 +1 @@ +Fake template for rspec. diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/spec/spec.opts b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/spec/spec.opts new file mode 100644 index 00000000000..de653df4b3c --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/spec/spec.opts @@ -0,0 +1,4 @@ +--format s +--colour +--loadby mtime +--backtrace diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/spec/spec_helper.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/spec/spec_helper.rb new file mode 100644 index 00000000000..65379ee38a6 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/spec/spec_helper.rb @@ -0,0 +1,25 @@ +require 'puppetlabs_spec_helper/module_spec_helper' + +RSpec.configure do |c| + c.treat_symbols_as_metadata_keys_with_true_values = true + + c.before :each do + # Ensure that we don't accidentally cache facts and environment + # between test cases. + Facter::Util::Loader.any_instance.stubs(:load_all) + Facter.clear + Facter.clear_messages + + # Store any environment variables away to be restored later + @old_env = {} + ENV.each_key {|k| @old_env[k] = ENV[k]} + + if ENV['STRICT_VARIABLES'] == 'yes' + Puppet.settings[:strict_variables]=true + end + end +end + +shared_examples :compile, :compile => true do + it { should compile.with_all_deps } +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/spec/spec_helper_acceptance.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/spec/spec_helper_acceptance.rb new file mode 100644 index 00000000000..370de46c0d6 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/spec/spec_helper_acceptance.rb @@ -0,0 +1,45 @@ +require 'beaker-rspec/spec_helper' +require 'beaker-rspec/helpers/serverspec' + + +unless ENV['RS_PROVISION'] == 'no' + hosts.each do |host| + if host['platform'] =~ /debian/ + on host, 'echo \'export PATH=/var/lib/gems/1.8/bin/:${PATH}\' >> ~/.bashrc' + end + if host.is_pe? + install_pe + else + install_puppet + on host, "mkdir -p #{host['distmoduledir']}" + end + end +end + +UNSUPPORTED_PLATFORMS = ['Suse','windows','AIX','Solaris'] + +RSpec.configure do |c| + # Project root + proj_root = File.expand_path(File.join(File.dirname(__FILE__), '..')) + + # Readable test descriptions + c.formatter = :documentation + + # Configure all nodes in nodeset + c.before :suite do + # Install module and dependencies + puppet_module_install(:source => proj_root, :module_name => 'apache') + hosts.each do |host| + # Required for mod_passenger tests. + if fact('osfamily') == 'RedHat' + on host, puppet('module','install','stahnma/epel'), { :acceptable_exit_codes => [0,1] } + end + # Required for manifest to make mod_pagespeed repository available + if fact('osfamily') == 'Debian' + on host, puppet('module','install','puppetlabs-apt'), { :acceptable_exit_codes => [0,1] } + end + on host, puppet('module','install','puppetlabs-stdlib'), { :acceptable_exit_codes => [0,1] } + on host, puppet('module','install','puppetlabs-concat'), { :acceptable_exit_codes => [0,1] } + end + end +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/spec/unit/provider/a2mod/gentoo_spec.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/spec/unit/provider/a2mod/gentoo_spec.rb new file mode 100644 index 00000000000..ddb9dddda4b --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/spec/unit/provider/a2mod/gentoo_spec.rb @@ -0,0 +1,184 @@ +#!/usr/bin/env rspec + +require 'spec_helper' + +provider_class = Puppet::Type.type(:a2mod).provider(:gentoo) + +describe provider_class do + before :each do + provider_class.clear + end + + [:conf_file, :instances, :modules, :initvars, :conf_file, :clear].each do |method| + it "should respond to the class method #{method}" do + provider_class.should respond_to(method) + end + end + + describe "when fetching modules" do + before do + @filetype = mock() + end + + it "should return a sorted array of the defined parameters" do + @filetype.expects(:read).returns(%Q{APACHE2_OPTS="-D FOO -D BAR -D BAZ"\n}) + provider_class.expects(:filetype).returns(@filetype) + + provider_class.modules.should == %w{bar baz foo} + end + + it "should cache the module list" do + @filetype.expects(:read).once.returns(%Q{APACHE2_OPTS="-D FOO -D BAR -D BAZ"\n}) + provider_class.expects(:filetype).once.returns(@filetype) + + 2.times { provider_class.modules.should == %w{bar baz foo} } + end + + it "should normalize parameters" do + @filetype.expects(:read).returns(%Q{APACHE2_OPTS="-D FOO -D BAR -D BAR"\n}) + provider_class.expects(:filetype).returns(@filetype) + + provider_class.modules.should == %w{bar foo} + end + end + + describe "when prefetching" do + it "should match providers to resources" do + provider = mock("ssl_provider", :name => "ssl") + resource = mock("ssl_resource") + resource.expects(:provider=).with(provider) + + provider_class.expects(:instances).returns([provider]) + provider_class.prefetch("ssl" => resource) + end + end + + describe "when flushing" do + before :each do + @filetype = mock() + @filetype.stubs(:backup) + provider_class.expects(:filetype).at_least_once.returns(@filetype) + + @info = mock() + @info.stubs(:[]).with(:name).returns("info") + @info.stubs(:provider=) + + @mpm = mock() + @mpm.stubs(:[]).with(:name).returns("mpm") + @mpm.stubs(:provider=) + + @ssl = mock() + @ssl.stubs(:[]).with(:name).returns("ssl") + @ssl.stubs(:provider=) + end + + it "should add modules whose ensure is present" do + @filetype.expects(:read).at_least_once.returns(%Q{APACHE2_OPTS=""}) + @filetype.expects(:write).with(%Q{APACHE2_OPTS="-D INFO"}) + + @info.stubs(:should).with(:ensure).returns(:present) + provider_class.prefetch("info" => @info) + + provider_class.flush + end + + it "should remove modules whose ensure is present" do + @filetype.expects(:read).at_least_once.returns(%Q{APACHE2_OPTS="-D INFO"}) + @filetype.expects(:write).with(%Q{APACHE2_OPTS=""}) + + @info.stubs(:should).with(:ensure).returns(:absent) + @info.stubs(:provider=) + provider_class.prefetch("info" => @info) + + provider_class.flush + end + + it "should not modify providers without resources" do + @filetype.expects(:read).at_least_once.returns(%Q{APACHE2_OPTS="-D INFO -D MPM"}) + @filetype.expects(:write).with(%Q{APACHE2_OPTS="-D MPM -D SSL"}) + + @info.stubs(:should).with(:ensure).returns(:absent) + provider_class.prefetch("info" => @info) + + @ssl.stubs(:should).with(:ensure).returns(:present) + provider_class.prefetch("ssl" => @ssl) + + provider_class.flush + end + + it "should write the modules in sorted order" do + @filetype.expects(:read).at_least_once.returns(%Q{APACHE2_OPTS=""}) + @filetype.expects(:write).with(%Q{APACHE2_OPTS="-D INFO -D MPM -D SSL"}) + + @mpm.stubs(:should).with(:ensure).returns(:present) + provider_class.prefetch("mpm" => @mpm) + @info.stubs(:should).with(:ensure).returns(:present) + provider_class.prefetch("info" => @info) + @ssl.stubs(:should).with(:ensure).returns(:present) + provider_class.prefetch("ssl" => @ssl) + + provider_class.flush + end + + it "should write the records back once" do + @filetype.expects(:read).at_least_once.returns(%Q{APACHE2_OPTS=""}) + @filetype.expects(:write).once.with(%Q{APACHE2_OPTS="-D INFO -D SSL"}) + + @info.stubs(:should).with(:ensure).returns(:present) + provider_class.prefetch("info" => @info) + + @ssl.stubs(:should).with(:ensure).returns(:present) + provider_class.prefetch("ssl" => @ssl) + + provider_class.flush + end + + it "should only modify the line containing APACHE2_OPTS" do + @filetype.expects(:read).at_least_once.returns(%Q{# Comment\nAPACHE2_OPTS=""\n# Another comment}) + @filetype.expects(:write).once.with(%Q{# Comment\nAPACHE2_OPTS="-D INFO"\n# Another comment}) + + @info.stubs(:should).with(:ensure).returns(:present) + provider_class.prefetch("info" => @info) + provider_class.flush + end + + it "should restore any arbitrary arguments" do + @filetype.expects(:read).at_least_once.returns(%Q{APACHE2_OPTS="-Y -D MPM -X"}) + @filetype.expects(:write).once.with(%Q{APACHE2_OPTS="-Y -X -D INFO -D MPM"}) + + @info.stubs(:should).with(:ensure).returns(:present) + provider_class.prefetch("info" => @info) + provider_class.flush + end + + it "should backup the file once if changes were made" do + @filetype.expects(:read).at_least_once.returns(%Q{APACHE2_OPTS=""}) + @filetype.expects(:write).once.with(%Q{APACHE2_OPTS="-D INFO -D SSL"}) + + @info.stubs(:should).with(:ensure).returns(:present) + provider_class.prefetch("info" => @info) + + @ssl.stubs(:should).with(:ensure).returns(:present) + provider_class.prefetch("ssl" => @ssl) + + @filetype.unstub(:backup) + @filetype.expects(:backup) + provider_class.flush + end + + it "should not write the file or run backups if no changes were made" do + @filetype.expects(:read).at_least_once.returns(%Q{APACHE2_OPTS="-X -D INFO -D SSL -Y"}) + @filetype.expects(:write).never + + @info.stubs(:should).with(:ensure).returns(:present) + provider_class.prefetch("info" => @info) + + @ssl.stubs(:should).with(:ensure).returns(:present) + provider_class.prefetch("ssl" => @ssl) + + @filetype.unstub(:backup) + @filetype.expects(:backup).never + provider_class.flush + end + end +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/templates/confd/no-accf.conf.erb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/templates/confd/no-accf.conf.erb new file mode 100644 index 00000000000..10e51644ce8 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/templates/confd/no-accf.conf.erb @@ -0,0 +1,4 @@ + + AcceptFilter http none + AcceptFilter https none + diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/templates/httpd.conf.erb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/templates/httpd.conf.erb new file mode 100644 index 00000000000..cac3aaf1025 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/templates/httpd.conf.erb @@ -0,0 +1,109 @@ +# Security +ServerTokens <%= @server_tokens %> +ServerSignature <%= @server_signature %> +TraceEnable <%= @trace_enable %> + +ServerName "<%= @servername %>" +ServerRoot "<%= @server_root %>" +PidFile <%= @pidfile %> +Timeout <%= @timeout %> +KeepAlive <%= @keepalive %> +MaxKeepAliveRequests <%= @max_keepalive_requests %> +KeepAliveTimeout <%= @keepalive_timeout %> + +User <%= @user %> +Group <%= @group %> + +AccessFileName .htaccess + +<%- if scope.function_versioncmp([@apache_version, '2.4']) >= 0 -%> + Require all denied +<%- else -%> + Order allow,deny + Deny from all + Satisfy all +<%- end -%> + + + + Options FollowSymLinks + AllowOverride None + + +DefaultType none +HostnameLookups Off +ErrorLog "<%= @logroot %>/<%= @error_log %>" +LogLevel <%= @log_level %> +EnableSendfile <%= @sendfile %> + +#Listen 80 + +<% if @apxs_workaround -%> +# Workaround: without this hack apxs would be confused about where to put +# LoadModule directives and fail entire procedure of apache package +# installation/reinstallation. This problem was observed on FreeBSD (apache22). +#LoadModule fake_module libexec/apache22/mod_fake.so +<% end -%> + +Include "<%= @mod_load_dir %>/*.load" +<% if @mod_load_dir != @confd_dir and @mod_load_dir != @vhost_load_dir -%> +Include "<%= @mod_load_dir %>/*.conf" +<% end -%> +Include "<%= @ports_file %>" + +LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined +LogFormat "%h %l %u %t \"%r\" %>s %b" common +LogFormat "%{Referer}i -> %U" referer +LogFormat "%{User-agent}i" agent +<% if @log_formats and !@log_formats.empty? -%> + <%- @log_formats.each do |nickname,format| -%> +LogFormat "<%= format -%>" <%= nickname %> + <%- end -%> +<% end -%> + +<%- if scope.function_versioncmp([@apache_version, '2.4']) >= 0 -%> +IncludeOptional "<%= @confd_dir %>/*.conf" +<%- else -%> +Include "<%= @confd_dir %>/*.conf" +<%- end -%> +<% if @vhost_load_dir != @confd_dir -%> +Include "<%= @vhost_load_dir %>/*" +<% end -%> + +<% if @error_documents -%> +# /usr/share/apache2/error on debian +Alias /error/ "<%= @error_documents_path %>/" + +"> + AllowOverride None + Options IncludesNoExec + AddOutputFilter Includes html + AddHandler type-map var +<%- if scope.function_versioncmp([@apache_version, '2.4']) >= 0 -%> + Require all granted +<%- else -%> + Order allow,deny + Allow from all +<%- end -%> + LanguagePriority en cs de es fr it nl sv pt-br ro + ForceLanguagePriority Prefer Fallback + + +ErrorDocument 400 /error/HTTP_BAD_REQUEST.html.var +ErrorDocument 401 /error/HTTP_UNAUTHORIZED.html.var +ErrorDocument 403 /error/HTTP_FORBIDDEN.html.var +ErrorDocument 404 /error/HTTP_NOT_FOUND.html.var +ErrorDocument 405 /error/HTTP_METHOD_NOT_ALLOWED.html.var +ErrorDocument 408 /error/HTTP_REQUEST_TIME_OUT.html.var +ErrorDocument 410 /error/HTTP_GONE.html.var +ErrorDocument 411 /error/HTTP_LENGTH_REQUIRED.html.var +ErrorDocument 412 /error/HTTP_PRECONDITION_FAILED.html.var +ErrorDocument 413 /error/HTTP_REQUEST_ENTITY_TOO_LARGE.html.var +ErrorDocument 414 /error/HTTP_REQUEST_URI_TOO_LARGE.html.var +ErrorDocument 415 /error/HTTP_UNSUPPORTED_MEDIA_TYPE.html.var +ErrorDocument 500 /error/HTTP_INTERNAL_SERVER_ERROR.html.var +ErrorDocument 501 /error/HTTP_NOT_IMPLEMENTED.html.var +ErrorDocument 502 /error/HTTP_BAD_GATEWAY.html.var +ErrorDocument 503 /error/HTTP_SERVICE_UNAVAILABLE.html.var +ErrorDocument 506 /error/HTTP_VARIANT_ALSO_VARIES.html.var +<% end -%> diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/templates/listen.erb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/templates/listen.erb new file mode 100644 index 00000000000..8fc871b0ad7 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/templates/listen.erb @@ -0,0 +1,6 @@ +<%# Listen should always be one of: + - + - : + - [ +-%> +Listen <%= @listen_addr_port %> diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/templates/mod/alias.conf.erb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/templates/mod/alias.conf.erb new file mode 100644 index 00000000000..151a806c9f6 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/templates/mod/alias.conf.erb @@ -0,0 +1,13 @@ + +Alias /icons/ "<%= @icons_path %>/" +"> + Options Indexes MultiViews + AllowOverride None +<%- if scope.function_versioncmp([@apache_version, '2.4']) >= 0 -%> + Require all granted +<%- else -%> + Order allow,deny + Allow from all +<%- end -%> + + diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/templates/mod/authnz_ldap.conf.erb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/templates/mod/authnz_ldap.conf.erb new file mode 100644 index 00000000000..565fcf0df90 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/templates/mod/authnz_ldap.conf.erb @@ -0,0 +1,5 @@ +<% if @verifyServerCert == true -%> +LDAPVerifyServerCert On +<% else -%> +LDAPVerifyServerCert Off +<% end -%> diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/templates/mod/autoindex.conf.erb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/templates/mod/autoindex.conf.erb new file mode 100644 index 00000000000..ef6bbebea60 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/templates/mod/autoindex.conf.erb @@ -0,0 +1,56 @@ +IndexOptions FancyIndexing VersionSort HTMLTable NameWidth=* DescriptionWidth=* Charset=UTF-8 +AddIconByEncoding (CMP,/icons/compressed.gif) x-compress x-gzip x-bzip2 + +AddIconByType (TXT,/icons/text.gif) text/* +AddIconByType (IMG,/icons/image2.gif) image/* +AddIconByType (SND,/icons/sound2.gif) audio/* +AddIconByType (VID,/icons/movie.gif) video/* + +AddIcon /icons/binary.gif .bin .exe +AddIcon /icons/binhex.gif .hqx +AddIcon /icons/tar.gif .tar +AddIcon /icons/world2.gif .wrl .wrl.gz .vrml .vrm .iv +AddIcon /icons/compressed.gif .Z .z .tgz .gz .zip +AddIcon /icons/a.gif .ps .ai .eps +AddIcon /icons/layout.gif .html .shtml .htm .pdf +AddIcon /icons/text.gif .txt +AddIcon /icons/c.gif .c +AddIcon /icons/p.gif .pl .py +AddIcon /icons/f.gif .for +AddIcon /icons/dvi.gif .dvi +AddIcon /icons/uuencoded.gif .uu +AddIcon /icons/script.gif .conf .sh .shar .csh .ksh .tcl +AddIcon /icons/tex.gif .tex +AddIcon /icons/bomb.gif /core +AddIcon (SND,/icons/sound2.gif) .ogg +AddIcon (VID,/icons/movie.gif) .ogm + +AddIcon /icons/back.gif .. +AddIcon /icons/hand.right.gif README +AddIcon /icons/folder.gif ^^DIRECTORY^^ +AddIcon /icons/blank.gif ^^BLANKICON^^ + +AddIcon /icons/odf6odt-20x22.png .odt +AddIcon /icons/odf6ods-20x22.png .ods +AddIcon /icons/odf6odp-20x22.png .odp +AddIcon /icons/odf6odg-20x22.png .odg +AddIcon /icons/odf6odc-20x22.png .odc +AddIcon /icons/odf6odf-20x22.png .odf +AddIcon /icons/odf6odb-20x22.png .odb +AddIcon /icons/odf6odi-20x22.png .odi +AddIcon /icons/odf6odm-20x22.png .odm + +AddIcon /icons/odf6ott-20x22.png .ott +AddIcon /icons/odf6ots-20x22.png .ots +AddIcon /icons/odf6otp-20x22.png .otp +AddIcon /icons/odf6otg-20x22.png .otg +AddIcon /icons/odf6otc-20x22.png .otc +AddIcon /icons/odf6otf-20x22.png .otf +AddIcon /icons/odf6oti-20x22.png .oti +AddIcon /icons/odf6oth-20x22.png .oth + +DefaultIcon /icons/unknown.gif +ReadmeName README.html +HeaderName HEADER.html + +IndexIgnore .??* *~ *# HEADER* README* RCS CVS *,v *,t diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/templates/mod/cgid.conf.erb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/templates/mod/cgid.conf.erb new file mode 100644 index 00000000000..5f82d7424c9 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/templates/mod/cgid.conf.erb @@ -0,0 +1 @@ +ScriptSock "<%= @cgisock_path %>" diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/templates/mod/dav_fs.conf.erb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/templates/mod/dav_fs.conf.erb new file mode 100644 index 00000000000..3c53e9e14b2 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/templates/mod/dav_fs.conf.erb @@ -0,0 +1 @@ +DAVLockDB "<%= @dav_lock %>" diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/templates/mod/deflate.conf.erb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/templates/mod/deflate.conf.erb new file mode 100644 index 00000000000..a3cdf0552e4 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/templates/mod/deflate.conf.erb @@ -0,0 +1,8 @@ +AddOutputFilterByType DEFLATE text/html text/plain text/xml +AddOutputFilterByType DEFLATE text/css +AddOutputFilterByType DEFLATE application/x-javascript application/javascript application/ecmascript +AddOutputFilterByType DEFLATE application/rss+xml + +DeflateFilterNote Input instream +DeflateFilterNote Output outstream +DeflateFilterNote Ratio ratio diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/templates/mod/dir.conf.erb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/templates/mod/dir.conf.erb new file mode 100644 index 00000000000..741f6ae034a --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/templates/mod/dir.conf.erb @@ -0,0 +1 @@ +DirectoryIndex <%= @indexes.join(' ') %> diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/templates/mod/disk_cache.conf.erb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/templates/mod/disk_cache.conf.erb new file mode 100644 index 00000000000..0c7e2c4b73e --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/templates/mod/disk_cache.conf.erb @@ -0,0 +1,8 @@ + + + CacheEnable disk / + CacheRoot "<%= @cache_root %>" + CacheDirLevels 2 + CacheDirLength 1 + + diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/templates/mod/event.conf.erb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/templates/mod/event.conf.erb new file mode 100644 index 00000000000..40099543d5a --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/templates/mod/event.conf.erb @@ -0,0 +1,9 @@ + + ServerLimit <%= @serverlimit %> + StartServers <%= @startservers %> + MaxClients <%= @maxclients %> + MinSpareThreads <%= @minsparethreads %> + MaxSpareThreads <%= @maxsparethreads %> + ThreadsPerChild <%= @threadsperchild %> + MaxRequestsPerChild <%= @maxrequestsperchild %> + diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/templates/mod/fastcgi.conf.erb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/templates/mod/fastcgi.conf.erb new file mode 100644 index 00000000000..8d94a236141 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/templates/mod/fastcgi.conf.erb @@ -0,0 +1,6 @@ +# The Fastcgi Apache module configuration file is being +# managed by Puppet and changes will be overwritten. + + AddHandler fastcgi-script .fcgi + FastCgiIpcDir "<%= @fastcgi_lib_path %>" + diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/templates/mod/fcgid.conf.erb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/templates/mod/fcgid.conf.erb new file mode 100644 index 00000000000..a82bc30df90 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/templates/mod/fcgid.conf.erb @@ -0,0 +1,5 @@ + +<% @options.sort_by {|key, value| key}.each do |key, value| -%> + <%= key %> <%= value %> +<% end -%> + diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/templates/mod/info.conf.erb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/templates/mod/info.conf.erb new file mode 100644 index 00000000000..d5288fb8c92 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/templates/mod/info.conf.erb @@ -0,0 +1,10 @@ + + SetHandler server-info + <%- if scope.function_versioncmp([@apache_version, '2.4']) >= 0 -%> + Require ip <%= Array(@allow_from).join(" ") %> + <%- else -%> + Order deny,allow + Deny from all + Allow from <%= Array(@allow_from).join(" ") %> + <%- end -%> + diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/templates/mod/itk.conf.erb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/templates/mod/itk.conf.erb new file mode 100644 index 00000000000..f45f2b35dd4 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/templates/mod/itk.conf.erb @@ -0,0 +1,8 @@ + + StartServers <%= @startservers %> + MinSpareServers <%= @minspareservers %> + MaxSpareServers <%= @maxspareservers %> + ServerLimit <%= @serverlimit %> + MaxClients <%= @maxclients %> + MaxRequestsPerChild <%= @maxrequestsperchild %> + diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/templates/mod/ldap.conf.erb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/templates/mod/ldap.conf.erb new file mode 100644 index 00000000000..00197761753 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/templates/mod/ldap.conf.erb @@ -0,0 +1,11 @@ + + SetHandler ldap-status + <%- if scope.function_versioncmp([@apache_version, '2.4']) >= 0 -%> + Require ip 127.0.0.1 ::1 + <%- else -%> + Order deny,allow + Deny from all + Allow from 127.0.0.1 ::1 + Satisfy all + <%- end -%> + diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/templates/mod/load.erb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/templates/mod/load.erb new file mode 100644 index 00000000000..51f45edb21a --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/templates/mod/load.erb @@ -0,0 +1,7 @@ +<% if @loadfiles -%> +<% Array(@loadfiles).each do |loadfile| -%> +LoadFile <%= loadfile %> +<% end -%> + +<% end -%> +LoadModule <%= @_id %> <%= @_path %> diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/templates/mod/mime.conf.erb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/templates/mod/mime.conf.erb new file mode 100644 index 00000000000..a69a424a6a3 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/templates/mod/mime.conf.erb @@ -0,0 +1,36 @@ +TypesConfig <%= @mime_types_config %> + +AddType application/x-compress .Z +AddType application/x-gzip .gz .tgz +AddType application/x-bzip2 .bz2 + +AddLanguage ca .ca +AddLanguage cs .cz .cs +AddLanguage da .dk +AddLanguage de .de +AddLanguage el .el +AddLanguage en .en +AddLanguage eo .eo +AddLanguage es .es +AddLanguage et .et +AddLanguage fr .fr +AddLanguage he .he +AddLanguage hr .hr +AddLanguage it .it +AddLanguage ja .ja +AddLanguage ko .ko +AddLanguage ltz .ltz +AddLanguage nl .nl +AddLanguage nn .nn +AddLanguage no .no +AddLanguage pl .po +AddLanguage pt .pt +AddLanguage pt-BR .pt-br +AddLanguage ru .ru +AddLanguage sv .sv +AddLanguage zh-CN .zh-cn +AddLanguage zh-TW .zh-tw + +AddHandler type-map var +AddType text/html .shtml +AddOutputFilter INCLUDES .shtml diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/templates/mod/mime_magic.conf.erb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/templates/mod/mime_magic.conf.erb new file mode 100644 index 00000000000..1ce1bc3c169 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/templates/mod/mime_magic.conf.erb @@ -0,0 +1 @@ +MIMEMagicFile "<%= @magic_file %>" diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/templates/mod/mpm_event.conf.erb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/templates/mod/mpm_event.conf.erb new file mode 100644 index 00000000000..eb6f1ff5f51 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/templates/mod/mpm_event.conf.erb @@ -0,0 +1,9 @@ + + StartServers 2 + MinSpareThreads 25 + MaxSpareThreads 75 + ThreadLimit 64 + ThreadsPerChild 25 + MaxClients 150 + MaxRequestsPerChild 0 + diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/templates/mod/negotiation.conf.erb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/templates/mod/negotiation.conf.erb new file mode 100644 index 00000000000..50921019bcf --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/templates/mod/negotiation.conf.erb @@ -0,0 +1,2 @@ +LanguagePriority en ca cs da de el eo es et fr he hr it ja ko ltz nl nn no pl pt pt-BR ru sv zh-CN zh-TW +ForceLanguagePriority Prefer Fallback diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/templates/mod/nss.conf.erb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/templates/mod/nss.conf.erb new file mode 100644 index 00000000000..a5c81752f3e --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/templates/mod/nss.conf.erb @@ -0,0 +1,228 @@ +# +# This is the Apache server configuration file providing SSL support using. +# the mod_nss plugin. It contains the configuration directives to instruct +# the server how to serve pages over an https connection. +# +# Do NOT simply read the instructions in here without understanding +# what they do. They're here only as hints or reminders. If you are unsure +# consult the online docs. You have been warned. +# + +#LoadModule nss_module modules/libmodnss.so + +# +# When we also provide SSL we have to listen to the +# standard HTTP port (see above) and to the HTTPS port +# +# Note: Configurations that use IPv6 but not IPv4-mapped addresses need two +# Listen directives: "Listen [::]:8443" and "Listen 0.0.0.0:443" +# +Listen 8443 + +## +## SSL Global Context +## +## All SSL configuration in this context applies both to +## the main server and all SSL-enabled virtual hosts. +## + +# +# Some MIME-types for downloading Certificates and CRLs +# +AddType application/x-x509-ca-cert .crt +AddType application/x-pkcs7-crl .crl + +# Pass Phrase Dialog: +# Configure the pass phrase gathering process. +# The filtering dialog program (`builtin' is a internal +# terminal dialog) has to provide the pass phrase on stdout. +<% if @passwd_file -%> +NSSPassPhraseDialog "file:<%= @passwd_file %>" +<% else -%> +NSSPassPhraseDialog builtin +<% end -%> + +# Pass Phrase Helper: +# This helper program stores the token password pins between +# restarts of Apache. +NSSPassPhraseHelper /usr/sbin/nss_pcache + +# Configure the SSL Session Cache. +# NSSSessionCacheSize is the number of entries in the cache. +# NSSSessionCacheTimeout is the SSL2 session timeout (in seconds). +# NSSSession3CacheTimeout is the SSL3/TLS session timeout (in seconds). +NSSSessionCacheSize 10000 +NSSSessionCacheTimeout 100 +NSSSession3CacheTimeout 86400 + +# +# Pseudo Random Number Generator (PRNG): +# Configure one or more sources to seed the PRNG of the SSL library. +# The seed data should be of good random quality. +# WARNING! On some platforms /dev/random blocks if not enough entropy +# is available. Those platforms usually also provide a non-blocking +# device, /dev/urandom, which may be used instead. +# +# This does not support seeding the RNG with each connection. + +NSSRandomSeed startup builtin +#NSSRandomSeed startup file:/dev/random 512 +#NSSRandomSeed startup file:/dev/urandom 512 + +# +# TLS Negotiation configuration under RFC 5746 +# +# Only renegotiate if the peer's hello bears the TLS renegotiation_info +# extension. Default off. +NSSRenegotiation off + +# Peer must send Signaling Cipher Suite Value (SCSV) or +# Renegotiation Info (RI) extension in ALL handshakes. Default: off +NSSRequireSafeNegotiation off + +## +## SSL Virtual Host Context +## + + + +# General setup for the virtual host +#DocumentRoot "/etc/httpd/htdocs" +#ServerName www.example.com:8443 +#ServerAdmin you@example.com + +# mod_nss can log to separate log files, you can choose to do that if you'd like +# LogLevel is not inherited from httpd.conf. +ErrorLog "<%= @error_log %>" +TransferLog "<%= @transfer_log %>" +LogLevel warn + +# SSL Engine Switch: +# Enable/Disable SSL for this virtual host. +NSSEngine on + +# SSL Cipher Suite: +# List the ciphers that the client is permitted to negotiate. +# See the mod_nss documentation for a complete list. + +# SSL 3 ciphers. SSL 2 is disabled by default. +NSSCipherSuite +rsa_rc4_128_md5,+rsa_rc4_128_sha,+rsa_3des_sha,-rsa_des_sha,-rsa_rc4_40_md5,-rsa_rc2_40_md5,-rsa_null_md5,-rsa_null_sha,+fips_3des_sha,-fips_des_sha,-fortezza,-fortezza_rc4_128_sha,-fortezza_null,-rsa_des_56_sha,-rsa_rc4_56_sha,+rsa_aes_128_sha,+rsa_aes_256_sha + +# SSL 3 ciphers + ECC ciphers. SSL 2 is disabled by default. +# +# Comment out the NSSCipherSuite line above and use the one below if you have +# ECC enabled NSS and mod_nss and want to use Elliptical Curve Cryptography +#NSSCipherSuite +rsa_rc4_128_md5,+rsa_rc4_128_sha,+rsa_3des_sha,-rsa_des_sha,-rsa_rc4_40_md5,-rsa_rc2_40_md5,-rsa_null_md5,-rsa_null_sha,+fips_3des_sha,-fips_des_sha,-fortezza,-fortezza_rc4_128_sha,-fortezza_null,-rsa_des_56_sha,-rsa_rc4_56_sha,+rsa_aes_128_sha,+rsa_aes_256_sha,-ecdh_ecdsa_null_sha,+ecdh_ecdsa_rc4_128_sha,+ecdh_ecdsa_3des_sha,+ecdh_ecdsa_aes_128_sha,+ecdh_ecdsa_aes_256_sha,-ecdhe_ecdsa_null_sha,+ecdhe_ecdsa_rc4_128_sha,+ecdhe_ecdsa_3des_sha,+ecdhe_ecdsa_aes_128_sha,+ecdhe_ecdsa_aes_256_sha,-ecdh_rsa_null_sha,+ecdh_rsa_128_sha,+ecdh_rsa_3des_sha,+ecdh_rsa_aes_128_sha,+ecdh_rsa_aes_256_sha,-echde_rsa_null,+ecdhe_rsa_rc4_128_sha,+ecdhe_rsa_3des_sha,+ecdhe_rsa_aes_128_sha,+ecdhe_rsa_aes_256_sha + +# SSL Protocol: +# Cryptographic protocols that provide communication security. +# NSS handles the specified protocols as "ranges", and automatically +# negotiates the use of the strongest protocol for a connection starting +# with the maximum specified protocol and downgrading as necessary to the +# minimum specified protocol that can be used between two processes. +# Since all protocol ranges are completely inclusive, and no protocol in the +# middle of a range may be excluded, the entry "NSSProtocol SSLv3,TLSv1.1" +# is identical to the entry "NSSProtocol SSLv3,TLSv1.0,TLSv1.1". +NSSProtocol SSLv3,TLSv1.0,TLSv1.1 + +# SSL Certificate Nickname: +# The nickname of the RSA server certificate you are going to use. +NSSNickname Server-Cert + +# SSL Certificate Nickname: +# The nickname of the ECC server certificate you are going to use, if you +# have an ECC-enabled version of NSS and mod_nss +#NSSECCNickname Server-Cert-ecc + +# Server Certificate Database: +# The NSS security database directory that holds the certificates and +# keys. The database consists of 3 files: cert8.db, key3.db and secmod.db. +# Provide the directory that these files exist. +NSSCertificateDatabase "<%= @httpd_dir -%>/alias" + +# Database Prefix: +# In order to be able to store multiple NSS databases in one directory +# they need unique names. This option sets the database prefix used for +# cert8.db and key3.db. +#NSSDBPrefix my-prefix- + +# Client Authentication (Type): +# Client certificate verification type. Types are none, optional and +# require. +#NSSVerifyClient none + +# +# Online Certificate Status Protocol (OCSP). +# Verify that certificates have not been revoked before accepting them. +#NSSOCSP off + +# +# Use a default OCSP responder. If enabled this will be used regardless +# of whether one is included in a client certificate. Note that the +# server certificate is verified during startup. +# +# NSSOCSPDefaultURL defines the service URL of the OCSP responder +# NSSOCSPDefaultName is the nickname of the certificate to trust to +# sign the OCSP responses. +#NSSOCSPDefaultResponder on +#NSSOCSPDefaultURL http://example.com/ocsp/status +#NSSOCSPDefaultName ocsp-nickname + +# Access Control: +# With SSLRequire you can do per-directory access control based +# on arbitrary complex boolean expressions containing server +# variable checks and other lookup directives. The syntax is a +# mixture between C and Perl. See the mod_nss documentation +# for more details. +# +#NSSRequire ( %{SSL_CIPHER} !~ m/^(EXP|NULL)/ \ +# and %{SSL_CLIENT_S_DN_O} eq "Snake Oil, Ltd." \ +# and %{SSL_CLIENT_S_DN_OU} in {"Staff", "CA", "Dev"} \ +# and %{TIME_WDAY} >= 1 and %{TIME_WDAY} <= 5 \ +# and %{TIME_HOUR} >= 8 and %{TIME_HOUR} <= 20 ) \ +# or %{REMOTE_ADDR} =~ m/^192\.76\.162\.[0-9]+$/ +# + +# SSL Engine Options: +# Set various options for the SSL engine. +# o FakeBasicAuth: +# Translate the client X.509 into a Basic Authorisation. This means that +# the standard Auth/DBMAuth methods can be used for access control. The +# user name is the `one line' version of the client's X.509 certificate. +# Note that no password is obtained from the user. Every entry in the user +# file needs this password: `xxj31ZMTZzkVA'. +# o ExportCertData: +# This exports two additional environment variables: SSL_CLIENT_CERT and +# SSL_SERVER_CERT. These contain the PEM-encoded certificates of the +# server (always existing) and the client (only existing when client +# authentication is used). This can be used to import the certificates +# into CGI scripts. +# o StdEnvVars: +# This exports the standard SSL/TLS related `SSL_*' environment variables. +# Per default this exportation is switched off for performance reasons, +# because the extraction step is an expensive operation and is usually +# useless for serving static content. So one usually enables the +# exportation for CGI and SSI requests only. +# o StrictRequire: +# This denies access when "NSSRequireSSL" or "NSSRequire" applied even +# under a "Satisfy any" situation, i.e. when it applies access is denied +# and no other module can change it. +# o OptRenegotiate: +# This enables optimized SSL connection renegotiation handling when SSL +# directives are used in per-directory context. +#NSSOptions +FakeBasicAuth +ExportCertData +CompatEnvVars +StrictRequire + + NSSOptions +StdEnvVars + + + NSSOptions +StdEnvVars + + +# Per-Server Logging: +# The home of a custom SSL log file. Use this when you want a +# compact non-error SSL logfile on a virtual host basis. +#CustomLog /home/rcrit/redhat/apache/logs/ssl_request_log \ +# "%t %h %{SSL_PROTOCOL}x %{SSL_CIPHER}x \"%r\" %b" + + + diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/templates/mod/pagespeed.conf.erb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/templates/mod/pagespeed.conf.erb new file mode 100644 index 00000000000..a4d8a7220e9 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/templates/mod/pagespeed.conf.erb @@ -0,0 +1,98 @@ +ModPagespeed on + +ModPagespeedInheritVHostConfig <%= @inherit_vhost_config %> +AddOutputFilterByType MOD_PAGESPEED_OUTPUT_FILTER text/html +<% if @filter_xhtml -%> +AddOutputFilterByType MOD_PAGESPEED_OUTPUT_FILTER application/xhtml+xml +<% end -%> +ModPagespeedFileCachePath "<%= @cache_path %>" +ModPagespeedLogDir "<%= @log_dir %>" + +<% @memache_servers.each do |server| -%> +ModPagespeedMemcachedServers <%= server -%> +<% end -%> + +ModPagespeedRewriteLevel <%= @rewrite_level -%> + +<% @disable_filters.each do |filter| -%> +ModPagespeedDisableFilters <%= filter -%> +<% end -%> + +<% @enable_filters.each do |filter| -%> +ModPagespeedEnableFilters <%= filter -%> +<% end -%> + +<% @forbid_filters.each do |filter| -%> +ModPagespeedForbidFilters <%= filter -%> +<% end -%> + +ModPagespeedRewriteDeadlinePerFlushMs <%= @rewrite_deadline_per_flush_ms %> + +<% if @additional_domains -%> +ModPagespeedDomain <%= @additional_domains -%> +<% end -%> + +ModPagespeedFileCacheSizeKb <%= @file_cache_size_kb %> +ModPagespeedFileCacheCleanIntervalMs <%= @file_cache_clean_interval_ms %> +ModPagespeedLRUCacheKbPerProcess <%= @lru_cache_per_process %> +ModPagespeedLRUCacheByteLimit <%= @lru_cache_byte_limit %> +ModPagespeedCssFlattenMaxBytes <%= @css_flatten_max_bytes %> +ModPagespeedCssInlineMaxBytes <%= @css_inline_max_bytes %> +ModPagespeedCssImageInlineMaxBytes <%= @css_image_inline_max_bytes %> +ModPagespeedImageInlineMaxBytes <%= @image_inline_max_bytes %> +ModPagespeedJsInlineMaxBytes <%= @js_inline_max_bytes %> +ModPagespeedCssOutlineMinBytes <%= @css_outline_min_bytes %> +ModPagespeedJsOutlineMinBytes <%= @js_outline_min_bytes %> + + +ModPagespeedFileCacheInodeLimit <%= @inode_limit %> +ModPagespeedImageMaxRewritesAtOnce <%= @image_max_rewrites_at_once %> + +ModPagespeedNumRewriteThreads <%= @num_rewrite_threads %> +ModPagespeedNumExpensiveRewriteThreads <%= @num_expensive_rewrite_threads %> + +ModPagespeedStatistics <%= @collect_statistics %> + + + # You may insert other "Allow from" lines to add hosts you want to + # allow to look at generated statistics. Another possibility is + # to comment out the "Order" and "Allow" options from the config + # file, to allow any client that can reach your server to examine + # statistics. This might be appropriate in an experimental setup or + # if the Apache server is protected by a reverse proxy that will + # filter URLs in some fashion. + <%- if scope.function_versioncmp([@apache_version, '2.4']) >= 0 -%> + Require ip 127.0.0.1 ::1 <%= Array(@allow_view_stats).join(" ") %> + <%- else -%> + Order allow,deny + Allow from 127.0.0.1 ::1 <%= Array(@allow_view_stats).join(" ") %> + <%- end -%> + SetHandler mod_pagespeed_statistics + + +ModPagespeedStatisticsLogging <%= @statistics_logging %> + + <%- if scope.function_versioncmp([@apache_version, '2.4']) >= 0 -%> + Require ip 127.0.0.1 ::1 <%= Array(@allow_pagespeed_console).join(" ") %> + <%- else -%> + Order allow,deny + Allow from 127.0.0.1 ::1 <%= Array(@allow_pagespeed_console).join(" ") %> + <%- end -%> + SetHandler pagespeed_console + + +ModPagespeedMessageBufferSize <%= @message_buffer_size %> + + + <%- if scope.function_versioncmp([@apache_version, '2.4']) >= 0 -%> + Require ip 127.0.0.1 ::1 <%= Array(@allow_pagespeed_message).join(" ") %> + <%- else -%> + Order allow,deny + Allow from 127.0.0.1 ::1 <%= Array(@allow_pagespeed_message).join(" ") %> + <%- end -%> + SetHandler mod_pagespeed_message + + +<% @additional_configuration.each_pair do |key, value| -%> +<%= key %> <%= value %> +<% end -%> diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/templates/mod/passenger.conf.erb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/templates/mod/passenger.conf.erb new file mode 100644 index 00000000000..dd9eee3b134 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/templates/mod/passenger.conf.erb @@ -0,0 +1,37 @@ +# The Passanger Apache module configuration file is being +# managed by Puppet and changes will be overwritten. + + <%- if @passenger_root -%> + PassengerRoot "<%= @passenger_root %>" + <%- end -%> + <%- if @passenger_ruby -%> + PassengerRuby "<%= @passenger_ruby %>" + <%- end -%> + <%- if @passenger_default_ruby -%> + PassengerDefaultRuby "<%= @passenger_default_ruby %>" + <%- end -%> + <%- if @passenger_high_performance -%> + PassengerHighPerformance <%= @passenger_high_performance %> + <%- end -%> + <%- if @passenger_max_pool_size -%> + PassengerMaxPoolSize <%= @passenger_max_pool_size %> + <%- end -%> + <%- if @passenger_pool_idle_time -%> + PassengerPoolIdleTime <%= @passenger_pool_idle_time %> + <%- end -%> + <%- if @passenger_max_requests -%> + PassengerMaxRequests <%= @passenger_max_requests %> + <%- end -%> + <%- if @passenger_stat_throttle_rate -%> + PassengerStatThrottleRate <%= @passenger_stat_throttle_rate %> + <%- end -%> + <%- if @rack_autodetect -%> + RackAutoDetect <%= @rack_autodetect %> + <%- end -%> + <%- if @rails_autodetect -%> + RailsAutoDetect <%= @rails_autodetect %> + <%- end -%> + <%- if @passenger_use_global_queue -%> + PassengerUseGlobalQueue <%= @passenger_use_global_queue %> + <%- end -%> + diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/templates/mod/peruser.conf.erb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/templates/mod/peruser.conf.erb new file mode 100644 index 00000000000..13c8d708db4 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/templates/mod/peruser.conf.erb @@ -0,0 +1,12 @@ + + MinSpareProcessors <%= @minspareprocessors %> + MinProcessors <%= @minprocessors %> + MaxProcessors <%= @maxprocessors %> + MaxClients <%= @maxclients %> + MaxRequestsPerChild <%= @maxrequestsperchild %> + IdleTimeout <%= @idletimeout %> + ExpireTimeout <%= @expiretimeout %> + KeepAlive <%= @keepalive %> + Include "<%= @mod_dir %>/peruser/multiplexers/*.conf" + Include "<%= @mod_dir %>/peruser/processors/*.conf" + diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/templates/mod/php5.conf.erb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/templates/mod/php5.conf.erb new file mode 100644 index 00000000000..44df2ae066d --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/templates/mod/php5.conf.erb @@ -0,0 +1,30 @@ +# +# PHP is an HTML-embedded scripting language which attempts to make it +# easy for developers to write dynamically generated webpages. +# +# +# LoadModule php5_module modules/libphp5.so +# +# +# # Use of the "ZTS" build with worker is experimental, and no shared +# # modules are supported. +# LoadModule php5_module modules/libphp5-zts.so +# + +# +# Cause the PHP interpreter to handle files with a .php extension. +# +AddHandler php5-script <%= @extensions.flatten.compact.join(' ') %> +AddType text/html .php + +# +# Add index.php to the list of files that will be served as directory +# indexes. +# +DirectoryIndex index.php + +# +# Uncomment the following line to allow PHP to pretty-print .phps +# files as PHP source code: +# +#AddType application/x-httpd-php-source .phps diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/templates/mod/prefork.conf.erb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/templates/mod/prefork.conf.erb new file mode 100644 index 00000000000..aabfdf7b22a --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/templates/mod/prefork.conf.erb @@ -0,0 +1,8 @@ + + StartServers <%= @startservers %> + MinSpareServers <%= @minspareservers %> + MaxSpareServers <%= @maxspareservers %> + ServerLimit <%= @serverlimit %> + MaxClients <%= @maxclients %> + MaxRequestsPerChild <%= @maxrequestsperchild %> + diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/templates/mod/proxy.conf.erb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/templates/mod/proxy.conf.erb new file mode 100644 index 00000000000..5ea829eeb3a --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/templates/mod/proxy.conf.erb @@ -0,0 +1,27 @@ +# +# Proxy Server directives. Uncomment the following lines to +# enable the proxy server: +# + + # Do not enable proxying with ProxyRequests until you have secured your + # server. Open proxy servers are dangerous both to your network and to the + # Internet at large. + ProxyRequests <%= @proxy_requests %> + + <% if @proxy_requests != 'Off' or ( @allow_from and ! @allow_from.empty? ) -%> + + <%- if scope.function_versioncmp([@apache_version, '2.4']) >= 0 -%> + Require ip <%= Array(@allow_from).join(" ") %> + <%- else -%> + Order deny,allow + Deny from all + Allow from <%= Array(@allow_from).join(" ") %> + <%- end -%> + + <% end -%> + + # Enable/disable the handling of HTTP/1.1 "Via:" headers. + # ("Full" adds the server version; "Block" removes all outgoing Via: headers) + # Set to one of: Off | On | Full | Block + ProxyVia On + diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/templates/mod/proxy_html.conf.erb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/templates/mod/proxy_html.conf.erb new file mode 100644 index 00000000000..fea15f393f3 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/templates/mod/proxy_html.conf.erb @@ -0,0 +1,18 @@ +ProxyHTMLLinks a href +ProxyHTMLLinks area href +ProxyHTMLLinks link href +ProxyHTMLLinks img src longdesc usemap +ProxyHTMLLinks object classid codebase data usemap +ProxyHTMLLinks q cite +ProxyHTMLLinks blockquote cite +ProxyHTMLLinks ins cite +ProxyHTMLLinks del cite +ProxyHTMLLinks form action +ProxyHTMLLinks input src usemap +ProxyHTMLLinks head profileProxyHTMLLinks base href +ProxyHTMLLinks script src for + +ProxyHTMLEvents onclick ondblclick onmousedown onmouseup \ + onmouseover onmousemove onmouseout onkeypress \ + onkeydown onkeyup onfocus onblur onload \ + onunload onsubmit onreset onselect onchange diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/templates/mod/reqtimeout.conf.erb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/templates/mod/reqtimeout.conf.erb new file mode 100644 index 00000000000..9a18800da5a --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/templates/mod/reqtimeout.conf.erb @@ -0,0 +1,2 @@ +RequestReadTimeout header=20-40,minrate=500 +RequestReadTimeout body=10,minrate=500 diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/templates/mod/rpaf.conf.erb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/templates/mod/rpaf.conf.erb new file mode 100644 index 00000000000..56e2398b55b --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/templates/mod/rpaf.conf.erb @@ -0,0 +1,15 @@ +# Enable reverse proxy add forward +RPAFenable On +# RPAFsethostname will, when enabled, take the incoming X-Host header and +# update the virtual host settings accordingly. This allows to have the same +# hostnames as in the "real" configuration for the forwarding proxy. +<% if @sethostname -%> +RPAFsethostname On +<% else -%> +RPAFsethostname Off +<% end -%> +# Which IPs are forwarding requests to us +RPAFproxy_ips <%= Array(@proxy_ips).join(" ") %> +# Setting RPAFheader allows you to change the header name to parse from the +# default X-Forwarded-For to something of your choice. +RPAFheader <%= @header %> diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/templates/mod/setenvif.conf.erb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/templates/mod/setenvif.conf.erb new file mode 100644 index 00000000000..d31c79fe5d8 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/templates/mod/setenvif.conf.erb @@ -0,0 +1,34 @@ +# +# The following directives modify normal HTTP response behavior to +# handle known problems with browser implementations. +# +BrowserMatch "Mozilla/2" nokeepalive +BrowserMatch "MSIE 4\.0b2;" nokeepalive downgrade-1.0 force-response-1.0 +BrowserMatch "RealPlayer 4\.0" force-response-1.0 +BrowserMatch "Java/1\.0" force-response-1.0 +BrowserMatch "JDK/1\.0" force-response-1.0 + +# +# The following directive disables redirects on non-GET requests for +# a directory that does not include the trailing slash. This fixes a +# problem with Microsoft WebFolders which does not appropriately handle +# redirects for folders with DAV methods. +# Same deal with Apple's DAV filesystem and Gnome VFS support for DAV. +# +BrowserMatch "Microsoft Data Access Internet Publishing Provider" redirect-carefully +BrowserMatch "MS FrontPage" redirect-carefully +BrowserMatch "^WebDrive" redirect-carefully +BrowserMatch "^WebDAVFS/1.[0123]" redirect-carefully +BrowserMatch "^gnome-vfs/1.0" redirect-carefully +BrowserMatch "^gvfs/1" redirect-carefully +BrowserMatch "^XML Spy" redirect-carefully +BrowserMatch "^Dreamweaver-WebDAV-SCM1" redirect-carefully +BrowserMatch " Konqueror/4" redirect-carefully + + + BrowserMatch "MSIE [2-6]" \ + nokeepalive ssl-unclean-shutdown \ + downgrade-1.0 force-response-1.0 + # MSIE 7 and newer should be able to use keepalive + BrowserMatch "MSIE [17-9]" ssl-unclean-shutdown + diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/templates/mod/ssl.conf.erb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/templates/mod/ssl.conf.erb new file mode 100644 index 00000000000..24274050c28 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/templates/mod/ssl.conf.erb @@ -0,0 +1,28 @@ + + SSLRandomSeed startup builtin + SSLRandomSeed startup file:/dev/urandom 512 + SSLRandomSeed connect builtin + SSLRandomSeed connect file:/dev/urandom 512 + + AddType application/x-x509-ca-cert .crt + AddType application/x-pkcs7-crl .crl + + SSLPassPhraseDialog builtin + SSLSessionCache "shmcb:<%= @session_cache %>" + SSLSessionCacheTimeout 300 +<% if @ssl_compression -%> + SSLCompression On +<% end -%> + <% if scope.function_versioncmp([@apache_version, '2.4']) >= 0 -%> + Mutex <%= @ssl_mutex %> + <% else -%> + SSLMutex <%= @ssl_mutex %> + <% end -%> + SSLCryptoDevice builtin + SSLHonorCipherOrder On + SSLCipherSuite <%= @ssl_cipher %> + SSLProtocol all -SSLv2 +<% if @ssl_options -%> + SSLOptions <%= @ssl_options.compact.join(' ') %> +<% end -%> + diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/templates/mod/status.conf.erb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/templates/mod/status.conf.erb new file mode 100644 index 00000000000..84f2e034309 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/templates/mod/status.conf.erb @@ -0,0 +1,16 @@ + + SetHandler server-status + <%- if scope.function_versioncmp([@apache_version, '2.4']) >= 0 -%> + Require ip <%= Array(@allow_from).join(" ") %> + <%- else -%> + Order deny,allow + Deny from all + Allow from <%= Array(@allow_from).join(" ") %> + <%- end -%> + +ExtendedStatus <%= @extended_status %> + + + # Show Proxy LoadBalancer status in mod_status + ProxyStatus On + diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/templates/mod/suphp.conf.erb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/templates/mod/suphp.conf.erb new file mode 100644 index 00000000000..95fbf97c782 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/templates/mod/suphp.conf.erb @@ -0,0 +1,19 @@ + + AddType application/x-httpd-suphp .php .php3 .php4 .php5 .phtml + suPHP_AddHandler application/x-httpd-suphp + + + suPHP_Engine on + + + # By default, disable suPHP for debian packaged web applications as files + # are owned by root and cannot be executed by suPHP because of min_uid. + + suPHP_Engine off + + +# # Use a specific php config file (a dir which contains a php.ini file) +# suPHP_ConfigPath /etc/php4/cgi/suphp/ +# # Tells mod_suphp NOT to handle requests with the type . +# suPHP_RemoveHandler + diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/templates/mod/userdir.conf.erb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/templates/mod/userdir.conf.erb new file mode 100644 index 00000000000..add525d5eac --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/templates/mod/userdir.conf.erb @@ -0,0 +1,27 @@ + +<% if @disable_root -%> + UserDir disabled root +<% end -%> + UserDir <%= @dir %> + + /*/<%= @dir %>"> + AllowOverride FileInfo AuthConfig Limit Indexes + Options MultiViews Indexes SymLinksIfOwnerMatch IncludesNoExec + + <%- if scope.function_versioncmp([@apache_version, '2.4']) >= 0 -%> + Require all denied + <%- else -%> + Order allow,deny + Allow from all + <%- end -%> + + + <%- if scope.function_versioncmp([@apache_version, '2.4']) >= 0 -%> + Require all denied + <%- else -%> + Order allow,deny + Allow from all + <%- end -%> + + + diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/templates/mod/worker.conf.erb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/templates/mod/worker.conf.erb new file mode 100644 index 00000000000..597e05f8d55 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/templates/mod/worker.conf.erb @@ -0,0 +1,10 @@ + + ServerLimit <%= @serverlimit %> + StartServers <%= @startservers %> + MaxClients <%= @maxclients %> + MinSpareThreads <%= @minsparethreads %> + MaxSpareThreads <%= @maxsparethreads %> + ThreadsPerChild <%= @threadsperchild %> + MaxRequestsPerChild <%= @maxrequestsperchild %> + ThreadLimit <%= @threadlimit %> + diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/templates/mod/wsgi.conf.erb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/templates/mod/wsgi.conf.erb new file mode 100644 index 00000000000..18752d2c4a4 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/templates/mod/wsgi.conf.erb @@ -0,0 +1,13 @@ +# The WSGI Apache module configuration file is being +# managed by Puppet an changes will be overwritten. + + <%- if @wsgi_socket_prefix -%> + WSGISocketPrefix <%= @wsgi_socket_prefix %> + <%- end -%> + <%- if @wsgi_python_home -%> + WSGIPythonHome "<%= @wsgi_python_home %>" + <%- end -%> + <%- if @wsgi_python_path -%> + WSGIPythonPath "<%= @wsgi_python_path %>" + <%- end -%> + diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/templates/namevirtualhost.erb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/templates/namevirtualhost.erb new file mode 100644 index 00000000000..cf767680fc4 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/templates/namevirtualhost.erb @@ -0,0 +1,8 @@ +<%# NameVirtualHost should always be one of: + - * + - *: + - _default_: + - + - : +-%> +NameVirtualHost <%= @addr_port %> diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/templates/ports_header.erb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/templates/ports_header.erb new file mode 100644 index 00000000000..4908db4ad35 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/templates/ports_header.erb @@ -0,0 +1,5 @@ +# ************************************ +# Listen & NameVirtualHost resources in module puppetlabs-apache +# Managed by Puppet +# ************************************ + diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/templates/vhost.conf.erb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/templates/vhost.conf.erb new file mode 100644 index 00000000000..64024cfef3d --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/templates/vhost.conf.erb @@ -0,0 +1,66 @@ +# ************************************ +# Vhost template in module puppetlabs-apache +# Managed by Puppet +# ************************************ + +> + ServerName <%= @servername %> +<% if @serveradmin -%> + ServerAdmin <%= @serveradmin %> +<% end -%> + + ## Vhost docroot +<% if @virtual_docroot -%> + VirtualDocumentRoot "<%= @virtual_docroot %>" +<% else -%> + DocumentRoot "<%= @docroot %>" +<% end -%> +<%= scope.function_template(['apache/vhost/_aliases.erb']) -%> + +<%= scope.function_template(['apache/vhost/_itk.erb']) -%> + +<% if @fallbackresource -%> + FallbackResource <%= @fallbackresource %> +<% end -%> + + ## Directories, there should at least be a declaration for <%= @docroot %> +<%= scope.function_template(['apache/vhost/_directories.erb']) -%> + + ## Load additional static includes +<% Array(@additional_includes).each do |include| %> + Include "<%= include %>" +<% end %> + + ## Logging +<% if @error_log -%> + ErrorLog "<%= @error_log_destination %>" +<% end -%> +<% if @log_level -%> + LogLevel <%= @log_level %> +<% end -%> + ServerSignature Off +<% if @access_log and @_access_log_env_var -%> + CustomLog "<%= @access_log_destination %>" <%= @_access_log_format %> <%= @_access_log_env_var %> +<% elsif @access_log -%> + CustomLog "<%= @access_log_destination %>" <%= @_access_log_format %> +<% end -%> +<%= scope.function_template(['apache/vhost/_action.erb']) -%> +<%= scope.function_template(['apache/vhost/_block.erb']) -%> +<%= scope.function_template(['apache/vhost/_error_document.erb']) -%> +<%= scope.function_template(['apache/vhost/_proxy.erb']) -%> +<%= scope.function_template(['apache/vhost/_rack.erb']) -%> +<%= scope.function_template(['apache/vhost/_redirect.erb']) -%> +<%= scope.function_template(['apache/vhost/_rewrite.erb']) -%> +<%= scope.function_template(['apache/vhost/_scriptalias.erb']) -%> +<%= scope.function_template(['apache/vhost/_serveralias.erb']) -%> +<%= scope.function_template(['apache/vhost/_setenv.erb']) -%> +<%= scope.function_template(['apache/vhost/_ssl.erb']) -%> +<%= scope.function_template(['apache/vhost/_suphp.erb']) -%> +<%= scope.function_template(['apache/vhost/_php_admin.erb']) -%> +<%= scope.function_template(['apache/vhost/_header.erb']) -%> +<%= scope.function_template(['apache/vhost/_requestheader.erb']) -%> +<%= scope.function_template(['apache/vhost/_wsgi.erb']) -%> +<%= scope.function_template(['apache/vhost/_custom_fragment.erb']) -%> +<%= scope.function_template(['apache/vhost/_fastcgi.erb']) -%> +<%= scope.function_template(['apache/vhost/_suexec.erb']) -%> + diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/templates/vhost/_action.erb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/templates/vhost/_action.erb new file mode 100644 index 00000000000..8a022905950 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/templates/vhost/_action.erb @@ -0,0 +1,4 @@ +<% if @action -%> + + Action <%= @action %> /cgi-bin virtual +<% end -%> diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/templates/vhost/_aliases.erb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/templates/vhost/_aliases.erb new file mode 100644 index 00000000000..5fdd76ba240 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/templates/vhost/_aliases.erb @@ -0,0 +1,12 @@ +<% if @aliases and ! @aliases.empty? -%> + ## Alias declarations for resources outside the DocumentRoot + <%- [@aliases].flatten.compact.each do |alias_statement| -%> + <%- if alias_statement["path"] != '' -%> + <%- if alias_statement["alias"] and alias_statement["alias"] != '' -%> + Alias <%= alias_statement["alias"] %> "<%= alias_statement["path"] %>" + <%- elsif alias_statement["aliasmatch"] and alias_statement["aliasmatch"] != '' -%> + AliasMatch <%= alias_statement["aliasmatch"] %> "<%= alias_statement["path"] %>" + <%- end -%> + <%- end -%> + <%- end -%> +<% end -%> diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/templates/vhost/_block.erb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/templates/vhost/_block.erb new file mode 100644 index 00000000000..d0776829da3 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/templates/vhost/_block.erb @@ -0,0 +1,14 @@ +<% if @block and ! @block.empty? -%> + + ## Block access statements +<% if @block.include? 'scm' -%> + # Block access to SCM directories. + + <%- if scope.function_versioncmp([@apache_version, '2.4']) >= 0 -%> + Require all denied + <%- else -%> + Deny From All + <%- end -%> + +<% end -%> +<% end -%> diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/templates/vhost/_custom_fragment.erb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/templates/vhost/_custom_fragment.erb new file mode 100644 index 00000000000..973964655ec --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/templates/vhost/_custom_fragment.erb @@ -0,0 +1,5 @@ +<% if @custom_fragment -%> + + ## Custom fragment +<%= @custom_fragment %> +<% end -%> diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/templates/vhost/_directories.erb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/templates/vhost/_directories.erb new file mode 100644 index 00000000000..f4307c76187 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/templates/vhost/_directories.erb @@ -0,0 +1,171 @@ +<% if @_directories and ! @_directories.empty? -%> + <%- [@_directories].flatten.compact.each do |directory| -%> + <%- if directory['path'] and directory['path'] != '' -%> + <%- if directory['provider'] and directory['provider'].match('(directory|location|files)') -%> + <%- if /^(.*)match$/ =~ directory['provider'] -%> + <%- provider = $1.capitalize + 'Match' -%> + <%- else -%> + <%- provider = directory['provider'].capitalize -%> + <%- end -%> + <%- else -%> + <%- provider = 'Directory' -%> + <%- end -%> + <%- path = directory['path'] -%> + + <<%= provider %> "<%= path %>"> + <%- if directory['headers'] -%> + <%- Array(directory['headers']).each do |header| -%> + Header <%= header %> + <%- end -%> + <%- end -%> + <%- if directory['options'] -%> + Options <%= Array(directory['options']).join(' ') %> + <%- end -%> + <%- if provider == 'Directory' -%> + <%- if directory['index_options'] -%> + IndexOptions <%= Array(directory['index_options']).join(' ') %> + <%- end -%> + <%- if directory['index_order_default'] -%> + IndexOrderDefault <%= Array(directory['index_order_default']).join(' ') %> + <%- end -%> + <%- if directory['allow_override'] -%> + AllowOverride <%= Array(directory['allow_override']).join(' ') %> + <%- elsif provider == 'Directory' -%> + AllowOverride None + <%- end -%> + <%- end -%> + <%- if scope.function_versioncmp([@apache_version, '2.4']) >= 0 -%> + <%- if directory['require'] and directory['require'] != '' -%> + Require <%= Array(directory['require']).join(' ') %> + <%- else -%> + Require all granted + <%- end -%> + <%- else -%> + <%- if directory['order'] and directory['order'] != '' -%> + Order <%= Array(directory['order']).join(',') %> + <%- else -%> + Order allow,deny + <%- end -%> + <%- if directory['deny'] and directory['deny'] != '' -%> + Deny <%= directory['deny'] %> + <%- end -%> + <%- if directory['allow'] and ! [ false, 'false', '' ].include?(directory['allow']) -%> + <%- if directory['allow'].kind_of?(Array) -%> + <%- Array(directory['allow']).each do |access| -%> + Allow <%= access %> + <%- end -%> + <%- else -%> + Allow <%= directory['allow'] %> + <%- end -%> + <%- elsif [ 'from all', 'from All' ].include?(directory['deny']) -%> + <%- elsif ! directory['deny'] and [ false, 'false', '' ].include?(directory['allow']) -%> + Deny from all + <%- else -%> + Allow from all + <%- end -%> + <%- end -%> + <%- if directory['addhandlers'] and ! directory['addhandlers'].empty? -%> + <%- [directory['addhandlers']].flatten.compact.each do |addhandler| -%> + AddHandler <%= addhandler['handler'] %> <%= Array(addhandler['extensions']).join(' ') %> + <%- end -%> + <%- end -%> + <%- if directory['sethandler'] and directory['sethandler'] != '' -%> + SetHandler <%= directory['sethandler'] %> + <%- end -%> + <%- if directory['passenger_enabled'] and directory['passenger_enabled'] != '' -%> + PassengerEnabled <%= directory['passenger_enabled'] %> + <%- end -%> + <%- if directory['php_admin_flags'] and ! directory['php_admin_flags'].empty? -%> + <%- directory['php_admin_flags'].each do |flag,value| -%> + <%- value = if value =~ /true|yes|on|1/i then 'on' else 'off' end -%> + php_admin_flag <%= "#{flag} #{value}" %> + <%- end -%> + <%- end -%> + <%- if directory['php_admin_values'] and ! directory['php_admin_values'].empty? -%> + <%- directory['php_admin_values'].each do |key,value| -%> + php_admin_value <%= "#{key} #{value}" %> + <%- end -%> + <%- end -%> + <%- if directory['directoryindex'] and directory['directoryindex'] != '' -%> + DirectoryIndex <%= directory['directoryindex'] %> + <%- end -%> + <%- if directory['error_documents'] and ! directory['error_documents'].empty? -%> + <%- [directory['error_documents']].flatten.compact.each do |error_document| -%> + ErrorDocument <%= error_document['error_code'] %> <%= error_document['document'] %> + <%- end -%> + <%- end -%> + <%- if directory['auth_type'] -%> + AuthType <%= directory['auth_type'] %> + <%- end -%> + <%- if directory['auth_name'] -%> + AuthName "<%= directory['auth_name'] %>" + <%- end -%> + <%- if directory['auth_digest_algorithm'] -%> + AuthDigestAlgorithm <%= directory['auth_digest_algorithm'] %> + <%- end -%> + <%- if directory['auth_digest_domain'] -%> + AuthDigestDomain <%= Array(directory['auth_digest_domain']).join(' ') %> + <%- end -%> + <%- if directory['auth_digest_nonce_lifetime'] -%> + AuthDigestNonceLifetime <%= directory['auth_digest_nonce_lifetime'] %> + <%- end -%> + <%- if directory['auth_digest_provider'] -%> + AuthDigestProvider <%= directory['auth_digest_provider'] %> + <%- end -%> + <%- if directory['auth_digest_qop'] -%> + AuthDigestQop <%= directory['auth_digest_qop'] %> + <%- end -%> + <%- if directory['auth_digest_shmem_size'] -%> + AuthDigestShmemSize <%= directory['auth_digest_shmem_size'] %> + <%- end -%> + <%- if directory['auth_basic_authoritative'] -%> + AuthBasicAuthoritative <%= directory['auth_basic_authoritative'] %> + <%- end -%> + <%- if directory['auth_basic_fake'] -%> + AuthBasicFake <%= directory['auth_basic_fake'] %> + <%- end -%> + <%- if directory['auth_basic_provider'] -%> + AuthBasicProvider <%= directory['auth_basic_provider'] %> + <%- end -%> + <%- if directory['auth_user_file'] -%> + AuthUserFile <%= directory['auth_user_file'] %> + <%- end -%> + <%- if directory['auth_group_file'] -%> + AuthGroupFile <%= directory['auth_group_file'] %> + <%- end -%> + <%- if directory['auth_require'] -%> + Require <%= directory['auth_require'] %> + <%- end -%> + <%- if directory['fallbackresource'] -%> + FallbackResource <%= directory['fallbackresource'] %> + <%- end -%> + <%- if directory['expires_active'] -%> + ExpiresActive <%= directory['expires_active'] %> + <%- end -%> + <%- if directory['expires_default'] -%> + ExpiresDefault <%= directory['expires_default'] %> + <%- end -%> + <%- if directory['expires_by_type'] -%> + <%- Array(directory['expires_by_type']).each do |rule| -%> + ExpiresByType <%= rule %> + <%- end -%> + <%- end -%> + <%- if directory['force_type'] -%> + ForceType <%= directory['force_type'] %> + <%- end -%> + <%- if directory['ssl_options'] -%> + SSLOptions <%= Array(directory['ssl_options']).join(' ') %> + <%- end -%> + <%- if directory['suphp'] and @suphp_engine == 'on' -%> + suPHP_UserGroup <%= directory['suphp']['user'] %> <%= directory['suphp']['group'] %> + <%- end -%> + <%- if directory['fcgiwrapper'] -%> + FcgidWrapper <%= directory['fcgiwrapper']['command'] %> <%= directory['fcgiwrapper']['suffix'] %> <%= directory['fcgiwrapper']['virtual'] %> + <%- end -%> + <%- if directory['custom_fragment'] -%> + <%= directory['custom_fragment'] %> + <%- end -%> + > + <%- end -%> + <%- end -%> +<% end -%> diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/templates/vhost/_error_document.erb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/templates/vhost/_error_document.erb new file mode 100644 index 00000000000..654e72c6760 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/templates/vhost/_error_document.erb @@ -0,0 +1,7 @@ +<% if @error_documents and ! @error_documents.empty? -%> + <%- [@error_documents].flatten.compact.each do |error_document| -%> + <%- if error_document["error_code"] != '' and error_document["document"] != '' -%> + ErrorDocument <%= error_document["error_code"] %> <%= error_document["document"] %> + <%- end -%> + <%- end -%> +<% end -%> diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/templates/vhost/_fastcgi.erb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/templates/vhost/_fastcgi.erb new file mode 100644 index 00000000000..3a2baa5596a --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/templates/vhost/_fastcgi.erb @@ -0,0 +1,22 @@ +<% if @fastcgi_server -%> + + FastCgiExternalServer <%= @fastcgi_server %> -socket <%= @fastcgi_socket %> +<% end -%> +<% if @fastcgi_dir -%> + + "> + Options +ExecCGI + AllowOverride All + SetHandler fastcgi-script + <%- if scope.function_versioncmp([@apache_version, '2.4']) >= 0 -%> + Require all granted + <%- else -%> + Order allow,deny + Allow From All + <%- end -%> + AuthBasicAuthoritative Off + + + AllowEncodedSlashes On + ServerSignature Off +<% end -%> diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/templates/vhost/_header.erb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/templates/vhost/_header.erb new file mode 100644 index 00000000000..c0f68c82573 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/templates/vhost/_header.erb @@ -0,0 +1,10 @@ +<% if @headers and ! @headers.empty? -%> + + ## Header rules + ## as per http://httpd.apache.org/docs/2.2/mod/mod_headers.html#header + <%- Array(@headers).each do |header_statement| -%> + <%- if header_statement != '' -%> + Header <%= header_statement %> + <%- end -%> + <%- end -%> +<% end -%> diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/templates/vhost/_itk.erb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/templates/vhost/_itk.erb new file mode 100644 index 00000000000..2971c7a7d04 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/templates/vhost/_itk.erb @@ -0,0 +1,28 @@ +<% if @itk and ! @itk.empty? -%> + ## ITK statement + + <%- if @itk["user"] and @itk["group"] -%> + AssignUserId <%= @itk["user"] %> <%= @itk["group"] %> + <%- end -%> + <%- if @itk["assignuseridexpr"] -%> + AssignUserIdExpr <%= @itk["assignuseridexpr"] %> + <%- end -%> + <%- if @itk["assigngroupidexpr"] -%> + AssignGroupIdExpr <%= @itk["assigngroupidexpr"] %> + <%- end -%> + <%- if @itk["maxclientvhost"] -%> + MaxClientsVHost <%= @itk["maxclientvhost"] %> + <%- end -%> + <%- if @itk["nice"] -%> + NiceValue <%= @itk["nice"] %> + <%- end -%> + <%- if @kernelversion >= '3.5.0' -%> + <%- if @itk["limituidrange"] -%> + LimitUIDRange <%= @itk["limituidrange"] %> + <%- end -%> + <%- if @itk["limitgidrange"] -%> + LimitGIDRange <%= @itk["limitgidrange"] %> + <%- end -%> + <%- end -%> + +<% end -%> diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/templates/vhost/_php_admin.erb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/templates/vhost/_php_admin.erb new file mode 100644 index 00000000000..59536cbc990 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/templates/vhost/_php_admin.erb @@ -0,0 +1,12 @@ +<% if @php_admin_values and not @php_admin_values.empty? -%> +<% @php_admin_values.each do |key,value| -%> + php_admin_value <%= key %> <%= value %> +<% end -%> +<% end -%> +<% if @php_admin_flags and not @php_admin_flags.empty? -%> +<% @php_admin_flags.each do |key,flag| -%> +<%# normalize flag -%> +<% if flag =~ /true|yes|on|1/i then flag = 'on' else flag = 'off' end -%> + php_admin_flag <%= key %> <%= flag %> +<% end -%> +<% end -%> diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/templates/vhost/_proxy.erb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/templates/vhost/_proxy.erb new file mode 100644 index 00000000000..a1d2e52923e --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/templates/vhost/_proxy.erb @@ -0,0 +1,23 @@ +<% if @proxy_dest or @proxy_pass -%> + + ## Proxy rules + ProxyRequests Off +<%- end -%> +<% if @proxy_preserve_host %> + ProxyPreserveHost On +<%- end -%> +<%- [@proxy_pass].flatten.compact.each do |proxy| -%> + ProxyPass <%= proxy['path'] %> <%= proxy['url'] %> + > + ProxyPassReverse <%= proxy['url'] %> + +<% end %> +<% if @proxy_dest -%> +<%- Array(@no_proxy_uris).each do |uri| -%> + ProxyPass <%= uri %> ! +<% end %> + ProxyPass / <%= @proxy_dest %>/ + + ProxyPassReverse <%= @proxy_dest %>/ + +<% end -%> diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/templates/vhost/_rack.erb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/templates/vhost/_rack.erb new file mode 100644 index 00000000000..4a5b5f1cdcd --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/templates/vhost/_rack.erb @@ -0,0 +1,7 @@ +<% if @rack_base_uris -%> + + ## Enable rack +<% Array(@rack_base_uris).each do |uri| -%> + RackBaseURI <%= uri %> +<% end -%> +<% end -%> diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/templates/vhost/_redirect.erb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/templates/vhost/_redirect.erb new file mode 100644 index 00000000000..e865bd9afaf --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/templates/vhost/_redirect.erb @@ -0,0 +1,24 @@ +<% if @redirect_source and @redirect_dest -%> +<% @redirect_dest_a = Array(@redirect_dest) -%> +<% @redirect_source_a = Array(@redirect_source) -%> +<% @redirect_status_a = Array(@redirect_status) -%> + + ## Redirect rules +<% @redirect_source_a.each_with_index do |source, i| -%> +<% @redirect_dest_a[i] ||= @redirect_dest_a[0] -%> +<% @redirect_status_a[i] ||= @redirect_status_a[0] -%> + Redirect <%= "#{@redirect_status_a[i]} " %><%= source %> <%= @redirect_dest_a[i] %> +<% end -%> +<% end -%> + +<%- if @redirectmatch_status and @redirectmatch_regexp -%> +<% @redirectmatch_status_a = Array(@redirectmatch_status) -%> +<% @redirectmatch_regexp_a = Array(@redirectmatch_regexp) -%> + + ## RedirectMatch rules +<% @redirectmatch_status_a.each_with_index do |status, i| -%> +<% @redirectmatch_status_a[i] ||= @redirectmatch_status_a[0] -%> +<% @redirectmatch_regexp_a[i] ||= @redirectmatch_regexp_a[0] -%> + RedirectMatch <%= "#{@redirectmatch_status_a[i]} " %> <%= @redirectmatch_regexp_a[i] %> +<% end -%> +<% end -%> diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/templates/vhost/_requestheader.erb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/templates/vhost/_requestheader.erb new file mode 100644 index 00000000000..9f175052b59 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/templates/vhost/_requestheader.erb @@ -0,0 +1,10 @@ +<% if @request_headers and ! @request_headers.empty? -%> + + ## Request header rules + ## as per http://httpd.apache.org/docs/2.2/mod/mod_headers.html#requestheader + <%- Array(@request_headers).each do |request_statement| -%> + <%- if request_statement != '' -%> + RequestHeader <%= request_statement %> + <%- end -%> + <%- end -%> +<% end -%> diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/templates/vhost/_rewrite.erb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/templates/vhost/_rewrite.erb new file mode 100644 index 00000000000..af8b45001e2 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/templates/vhost/_rewrite.erb @@ -0,0 +1,43 @@ +<%- if @rewrites -%> + ## Rewrite rules + RewriteEngine On + <%- if @rewrite_base -%> + RewriteBase <%= @rewrite_base %> + <%- end -%> + + <%- [@rewrites].flatten.compact.each do |rewrite_details| -%> + <%- if rewrite_details['comment'] -%> + #<%= rewrite_details['comment'] %> + <%- end -%> + <%- if rewrite_details['rewrite_base'] -%> + RewriteBase <%= rewrite_details['rewrite_base'] %> + <%- end -%> + <%- if rewrite_details['rewrite_cond'] -%> + <%- Array(rewrite_details['rewrite_cond']).each do |commands| -%> + <%- Array(commands).each do |command| -%> + RewriteCond <%= command %> + <%- end -%> + <%- end -%> + <%- end -%> + <%- Array(rewrite_details['rewrite_rule']).each do |commands| -%> + <%- Array(commands).each do |command| -%> + RewriteRule <%= command %> + <%- end -%> + + <%- end -%> + <%- end -%> +<%- end -%> +<%# reverse compatibility %> +<% if @rewrite_rule and !@rewrites -%> + ## Rewrite rules + RewriteEngine On +<% if @rewrite_base -%> + RewriteBase <%= @rewrite_base %> +<% end -%> +<% if @rewrite_cond -%> +<% Array(@rewrite_cond).each do |cond| -%> + RewriteCond <%= cond %> +<% end -%> +<% end -%> + RewriteRule <%= @rewrite_rule %> +<%- end -%> diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/templates/vhost/_scriptalias.erb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/templates/vhost/_scriptalias.erb new file mode 100644 index 00000000000..bb4f6b316ef --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/templates/vhost/_scriptalias.erb @@ -0,0 +1,24 @@ +<%- if @scriptaliases.is_a?(Array) -%> +<%- aliases = @scriptaliases -%> +<%- elsif @scriptaliases.is_a?(Hash) -%> +<%- aliases = [@scriptaliases] -%> +<%- else -%> +<%- # Nothing to do with any other data type -%> +<%- aliases = [] -%> +<%- end -%> +<%- if @scriptalias or !aliases.empty? -%> + ## Script alias directives +<%# Combine scriptalais and scriptaliases into a single data structure -%> +<%# for backward compatibility and ease of implementation -%> +<%- aliases << { 'alias' => '/cgi-bin', 'path' => @scriptalias } if @scriptalias -%> +<%- aliases.flatten.compact! -%> +<%- aliases.each do |salias| -%> + <%- if salias["path"] != '' -%> + <%- if salias["alias"] and salias["alias"] != '' -%> + ScriptAlias <%= salias['alias'] %> "<%= salias['path'] %>" + <%- elsif salias["aliasmatch"] and salias["aliasmatch"] != '' -%> + ScriptAliasMatch <%= salias['aliasmatch'] %> "<%= salias['path'] %>" + <%- end -%> + <%- end -%> +<%- end -%> +<%- end -%> diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/templates/vhost/_serveralias.erb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/templates/vhost/_serveralias.erb new file mode 100644 index 00000000000..278b6ddc538 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/templates/vhost/_serveralias.erb @@ -0,0 +1,7 @@ +<% if @serveraliases and ! @serveraliases.empty? -%> + + ## Server aliases +<% Array(@serveraliases).each do |serveralias| -%> + ServerAlias <%= serveralias %> +<% end -%> +<% end -%> diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/templates/vhost/_setenv.erb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/templates/vhost/_setenv.erb new file mode 100644 index 00000000000..d5f9ea84501 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/templates/vhost/_setenv.erb @@ -0,0 +1,12 @@ +<% if @setenv and ! @setenv.empty? -%> + + ## SetEnv/SetEnvIf for environment variables +<% Array(@setenv).each do |envvar| -%> + SetEnv <%= envvar %> +<% end -%> +<% end -%> +<% if @setenvif and ! @setenvif.empty? -%> +<% Array(@setenvif).each do |envifvar| -%> + SetEnvIf <%= envifvar %> +<% end -%> +<% end -%> diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/templates/vhost/_ssl.erb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/templates/vhost/_ssl.erb new file mode 100644 index 00000000000..03c78ef427b --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/templates/vhost/_ssl.erb @@ -0,0 +1,41 @@ +<% if @ssl -%> + + ## SSL directives + SSLEngine on + SSLCertificateFile "<%= @ssl_cert %>" + SSLCertificateKeyFile "<%= @ssl_key %>" +<% if @ssl_chain -%> + SSLCertificateChainFile "<%= @ssl_chain %>" +<% end -%> + SSLCACertificatePath "<%= @ssl_certs_dir %>" +<% if @ssl_ca -%> + SSLCACertificateFile "<%= @ssl_ca %>" +<% end -%> +<% if @ssl_crl_path -%> + SSLCARevocationPath "<%= @ssl_crl_path %>" +<% end -%> +<% if @ssl_crl -%> + SSLCARevocationFile "<%= @ssl_crl %>" +<% end -%> +<% if @ssl_proxyengine -%> + SSLProxyEngine On +<% end -%> +<% if @ssl_protocol -%> + SSLProtocol <%= @ssl_protocol %> +<% end -%> +<% if @ssl_cipher -%> + SSLCipherSuite <%= @ssl_cipher %> +<% end -%> +<% if @ssl_honorcipherorder -%> + SSLHonorCipherOrder <%= @ssl_honorcipherorder %> +<% end -%> +<% if @ssl_verify_client -%> + SSLVerifyClient <%= @ssl_verify_client %> +<% end -%> +<% if @ssl_verify_depth -%> + SSLVerifyDepth <%= @ssl_verify_depth %> +<% end -%> +<% if @ssl_options -%> + SSLOptions <%= Array(@ssl_options).join(' ') %> +<% end -%> +<% end -%> diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/templates/vhost/_suexec.erb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/templates/vhost/_suexec.erb new file mode 100644 index 00000000000..8a7ae0f17fb --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/templates/vhost/_suexec.erb @@ -0,0 +1,4 @@ +<% if @suexec_user_group -%> + + SuexecUserGroup <%= @suexec_user_group %> +<% end -%> diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/templates/vhost/_suphp.erb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/templates/vhost/_suphp.erb new file mode 100644 index 00000000000..9389581805a --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/templates/vhost/_suphp.erb @@ -0,0 +1,11 @@ +<% if @suphp_engine == 'on' -%> +<% if @suphp_addhandler -%> + suPHP_AddHandler <%= @suphp_addhandler %> +<% end -%> +<% if @suphp_engine -%> + suPHP_Engine <%= @suphp_engine %> +<% end -%> +<% if @suphp_configpath -%> + suPHP_ConfigPath "<%= @suphp_configpath %>" +<% end -%> +<% end -%> diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/templates/vhost/_wsgi.erb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/templates/vhost/_wsgi.erb new file mode 100644 index 00000000000..473b223ab6d --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/templates/vhost/_wsgi.erb @@ -0,0 +1,24 @@ +<% if @wsgi_application_group -%> + WSGIApplicationGroup <%= @wsgi_application_group %> +<% end -%> +<% if @wsgi_daemon_process and @wsgi_daemon_process_options -%> + WSGIDaemonProcess <%= @wsgi_daemon_process %> <%= @wsgi_daemon_process_options.collect { |k,v| "#{k}=#{v}"}.sort.join(' ') %> +<% elsif @wsgi_daemon_process and !@wsgi_daemon_process_options -%> + WSGIDaemonProcess <%= @wsgi_daemon_process %> +<% end -%> +<% if @wsgi_import_script and @wsgi_import_script_options -%> + WSGIImportScript <%= @wsgi_import_script %> <%= @wsgi_import_script_options.collect { |k,v| "#{k}=#{v}"}.sort.join(' ') %> +<% end -%> +<% if @wsgi_process_group -%> + WSGIProcessGroup <%= @wsgi_process_group %> +<% end -%> +<% if @wsgi_script_aliases and ! @wsgi_script_aliases.empty? -%> + <%- @wsgi_script_aliases.each do |a, p| -%> + <%- if a != '' and p != ''-%> + WSGIScriptAlias <%= a %> "<%= p %>" + <%- end -%> + <%- end -%> +<% end -%> +<% if @wsgi_pass_authorization -%> + WSGIPassAuthorization <%= @wsgi_pass_authorization %> +<% end -%> diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/tests/apache.pp b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/tests/apache.pp new file mode 100644 index 00000000000..0d4543564c1 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/tests/apache.pp @@ -0,0 +1,6 @@ +include apache +include apache::mod::php +include apache::mod::cgi +include apache::mod::userdir +include apache::mod::disk_cache +include apache::mod::proxy_http diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/tests/dev.pp b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/tests/dev.pp new file mode 100644 index 00000000000..805ad7e373a --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/tests/dev.pp @@ -0,0 +1 @@ +include apache::dev diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/tests/init.pp b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/tests/init.pp new file mode 100644 index 00000000000..b3f9f13aac1 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/tests/init.pp @@ -0,0 +1 @@ +include apache diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/tests/mod_load_params.pp b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/tests/mod_load_params.pp new file mode 100644 index 00000000000..0e84c5efbf5 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/tests/mod_load_params.pp @@ -0,0 +1,11 @@ +# Tests the path and identifier parameters for the apache::mod class + +# Base class for clarity: +class { 'apache': } + + +# Exaple parameter usage: +apache::mod { 'testmod': + path => '/usr/some/path/mod_testmod.so', + id => 'testmod_custom_name', +} diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/tests/mods.pp b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/tests/mods.pp new file mode 100644 index 00000000000..59362bd9a00 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/tests/mods.pp @@ -0,0 +1,9 @@ +## Default mods + +# Base class. Declares default vhost on port 80 and default ssl +# vhost on port 443 listening on all interfaces and serving +# $apache::docroot, and declaring our default set of modules. +class { 'apache': + default_mods => true, +} + diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/tests/mods_custom.pp b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/tests/mods_custom.pp new file mode 100644 index 00000000000..0ae699c73d5 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/tests/mods_custom.pp @@ -0,0 +1,16 @@ +## custom mods + +# Base class. Declares default vhost on port 80 and default ssl +# vhost on port 443 listening on all interfaces and serving +# $apache::docroot, and declaring a custom set of modules. +class { 'apache': + default_mods => [ + 'info', + 'alias', + 'mime', + 'env', + 'setenv', + 'expires', + ], +} + diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/tests/php.pp b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/tests/php.pp new file mode 100644 index 00000000000..1d926bfb466 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/tests/php.pp @@ -0,0 +1,4 @@ +class { 'apache': + mpm_module => 'prefork', +} +include apache::mod::php diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/tests/vhost.pp b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/tests/vhost.pp new file mode 100644 index 00000000000..a6c61360a75 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/tests/vhost.pp @@ -0,0 +1,238 @@ +## Default vhosts, and custom vhosts +# NB: Please see the other vhost_*.pp example files for further +# examples. + +# Base class. Declares default vhost on port 80 and default ssl +# vhost on port 443 listening on all interfaces and serving +# $apache::docroot +class { 'apache': } + +# Most basic vhost +apache::vhost { 'first.example.com': + port => '80', + docroot => '/var/www/first', +} + +# Vhost with different docroot owner/group/mode +apache::vhost { 'second.example.com': + port => '80', + docroot => '/var/www/second', + docroot_owner => 'third', + docroot_group => 'third', + docroot_mode => '0770', +} + +# Vhost with serveradmin +apache::vhost { 'third.example.com': + port => '80', + docroot => '/var/www/third', + serveradmin => 'admin@example.com', +} + +# Vhost with ssl (uses default ssl certs) +apache::vhost { 'ssl.example.com': + port => '443', + docroot => '/var/www/ssl', + ssl => true, +} + +# Vhost with ssl and specific ssl certs +apache::vhost { 'fourth.example.com': + port => '443', + docroot => '/var/www/fourth', + ssl => true, + ssl_cert => '/etc/ssl/fourth.example.com.cert', + ssl_key => '/etc/ssl/fourth.example.com.key', +} + +# Vhost with english title and servername parameter +apache::vhost { 'The fifth vhost': + servername => 'fifth.example.com', + port => '80', + docroot => '/var/www/fifth', +} + +# Vhost with server aliases +apache::vhost { 'sixth.example.com': + serveraliases => [ + 'sixth.example.org', + 'sixth.example.net', + ], + port => '80', + docroot => '/var/www/fifth', +} + +# Vhost with alternate options +apache::vhost { 'seventh.example.com': + port => '80', + docroot => '/var/www/seventh', + options => [ + 'Indexes', + 'MultiViews', + ], +} + +# Vhost with AllowOverride for .htaccess +apache::vhost { 'eighth.example.com': + port => '80', + docroot => '/var/www/eighth', + override => 'All', +} + +# Vhost with access and error logs disabled +apache::vhost { 'ninth.example.com': + port => '80', + docroot => '/var/www/ninth', + access_log => false, + error_log => false, +} + +# Vhost with custom access and error logs and logroot +apache::vhost { 'tenth.example.com': + port => '80', + docroot => '/var/www/tenth', + access_log_file => 'tenth_vhost.log', + error_log_file => 'tenth_vhost_error.log', + logroot => '/var/log', +} + +# Vhost with a cgi-bin +apache::vhost { 'eleventh.example.com': + port => '80', + docroot => '/var/www/eleventh', + scriptalias => '/usr/lib/cgi-bin', +} + +# Vhost with a proxypass configuration +apache::vhost { 'twelfth.example.com': + port => '80', + docroot => '/var/www/twelfth', + proxy_dest => 'http://internal.example.com:8080/twelfth', + no_proxy_uris => ['/login','/logout'], +} + +# Vhost to redirect /login and /logout +apache::vhost { 'thirteenth.example.com': + port => '80', + docroot => '/var/www/thirteenth', + redirect_source => [ + '/login', + '/logout', + ], + redirect_dest => [ + 'http://10.0.0.10/login', + 'http://10.0.0.10/logout', + ], +} + +# Vhost to permamently redirect +apache::vhost { 'fourteenth.example.com': + port => '80', + docroot => '/var/www/fourteenth', + redirect_source => '/blog', + redirect_dest => 'http://blog.example.com', + redirect_status => 'permanent', +} + +# Vhost with a rack configuration +apache::vhost { 'fifteenth.example.com': + port => '80', + docroot => '/var/www/fifteenth', + rack_base_uris => ['/rackapp1', '/rackapp2'], +} + +# Vhost to redirect non-ssl to ssl +apache::vhost { 'sixteenth.example.com non-ssl': + servername => 'sixteenth.example.com', + port => '80', + docroot => '/var/www/sixteenth', + rewrites => [ + { + comment => 'redirect non-SSL traffic to SSL site', + rewrite_cond => ['%{HTTPS} off'], + rewrite_rule => ['(.*) https://%{HTTPS_HOST}%{REQUEST_URI}'], + } + ] +} +apache::vhost { 'sixteenth.example.com ssl': + servername => 'sixteenth.example.com', + port => '443', + docroot => '/var/www/sixteenth', + ssl => true, +} + +# Vhost to redirect non-ssl to ssl using old rewrite method +apache::vhost { 'sixteenth.example.com non-ssl old rewrite': + servername => 'sixteenth.example.com', + port => '80', + docroot => '/var/www/sixteenth', + rewrite_cond => '%{HTTPS} off', + rewrite_rule => '(.*) https://%{HTTPS_HOST}%{REQUEST_URI}', +} +apache::vhost { 'sixteenth.example.com ssl old rewrite': + servername => 'sixteenth.example.com', + port => '443', + docroot => '/var/www/sixteenth', + ssl => true, +} + +# Vhost to block repository files +apache::vhost { 'seventeenth.example.com': + port => '80', + docroot => '/var/www/seventeenth', + block => 'scm', +} + +# Vhost with special environment variables +apache::vhost { 'eighteenth.example.com': + port => '80', + docroot => '/var/www/eighteenth', + setenv => ['SPECIAL_PATH /foo/bin','KILROY was_here'], +} + +apache::vhost { 'nineteenth.example.com': + port => '80', + docroot => '/var/www/nineteenth', + setenvif => 'Host "^([^\.]*)\.website\.com$" CLIENT_NAME=$1', +} + +# Vhost with additional include files +apache::vhost { 'twentyieth.example.com': + port => '80', + docroot => '/var/www/twelfth', + additional_includes => ['/tmp/proxy_group_a','/tmp/proxy_group_b'], +} + +# Vhost with alias for subdomain mapped to same named directory +# http://example.com.loc => /var/www/example.com +apache::vhost { 'subdomain.loc': + vhost_name => '*', + port => '80', + virtual_docroot => '/var/www/%-2+', + docroot => '/var/www', + serveraliases => ['*.loc',], +} + +# Vhost with SSLProtocol,SSLCipherSuite, SSLHonorCipherOrder +apache::vhost { 'securedomain.com': + priority => '10', + vhost_name => 'www.securedomain.com', + port => '443', + docroot => '/var/www/secure', + ssl => true, + ssl_cert => '/etc/ssl/securedomain.cert', + ssl_key => '/etc/ssl/securedomain.key', + ssl_chain => '/etc/ssl/securedomain.crt', + ssl_protocol => '-ALL +SSLv3 +TLSv1', + ssl_cipher => 'ALL:!aNULL:!ADH:!eNULL:!LOW:!EXP:RC4+RSA:+HIGH:+MEDIUM', + ssl_honorcipherorder => 'On', + add_listen => false, +} + +# Vhost with access log environment variables writing control +apache::vhost { 'twentyfirst.example.com': + port => '80', + docroot => '/var/www/twentyfirst', + access_log_env_var => 'admin', +} + diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/tests/vhost_directories.pp b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/tests/vhost_directories.pp new file mode 100644 index 00000000000..b8953ee3217 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/tests/vhost_directories.pp @@ -0,0 +1,44 @@ +# Base class. Declares default vhost on port 80 and default ssl +# vhost on port 443 listening on all interfaces and serving +# $apache::docroot +class { 'apache': } + +# Example from README adapted. +apache::vhost { 'readme.example.net': + docroot => '/var/www/readme', + directories => [ + { + 'path' => '/var/www/readme', + 'ServerTokens' => 'prod' , + }, + { + 'path' => '/usr/share/empty', + 'allow' => 'from all', + }, + ], +} + +# location test +apache::vhost { 'location.example.net': + docroot => '/var/www/location', + directories => [ + { + 'path' => '/location', + 'provider' => 'location', + 'ServerTokens' => 'prod' + }, + ], +} + +# files test, curedly disable access to accidental backup files. +apache::vhost { 'files.example.net': + docroot => '/var/www/files', + directories => [ + { + 'path' => '(\.swp|\.bak|~)$', + 'provider' => 'filesmatch', + 'deny' => 'from all' + }, + ], +} + diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/tests/vhost_ip_based.pp b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/tests/vhost_ip_based.pp new file mode 100644 index 00000000000..dc0fa4f33ba --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/tests/vhost_ip_based.pp @@ -0,0 +1,25 @@ +## IP-based vhosts on any listen port +# IP-based vhosts respond to requests on specific IP addresses. + +# Base class. Turn off the default vhosts; we will be declaring +# all vhosts below. +class { 'apache': + default_vhost => false, +} + +# Listen on port 80 and 81; required because the following vhosts +# are not declared with a port parameter. +apache::listen { '80': } +apache::listen { '81': } + +# IP-based vhosts +apache::vhost { 'first.example.com': + ip => '10.0.0.10', + docroot => '/var/www/first', + ip_based => true, +} +apache::vhost { 'second.example.com': + ip => '10.0.0.11', + docroot => '/var/www/second', + ip_based => true, +} diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/tests/vhost_ssl.pp b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/tests/vhost_ssl.pp new file mode 100644 index 00000000000..8e7a2b279ec --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/tests/vhost_ssl.pp @@ -0,0 +1,23 @@ +## SSL-enabled vhosts +# SSL-enabled vhosts respond only to HTTPS queries. + +# Base class. Turn off the default vhosts; we will be declaring +# all vhosts below. +class { 'apache': + default_vhost => false, +} + +# Non-ssl vhost +apache::vhost { 'first.example.com non-ssl': + servername => 'first.example.com', + port => '80', + docroot => '/var/www/first', +} + +# SSL vhost at the same domain +apache::vhost { 'first.example.com ssl': + servername => 'first.example.com', + port => '443', + docroot => '/var/www/first', + ssl => true, +} diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/tests/vhosts_without_listen.pp b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/tests/vhosts_without_listen.pp new file mode 100644 index 00000000000..e7d6cc036c1 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/tests/vhosts_without_listen.pp @@ -0,0 +1,53 @@ +## Declare ip-based and name-based vhosts +# Mixing Name-based vhost with IP-specific vhosts requires `add_listen => +# 'false'` on the non-IP vhosts + +# Base class. Turn off the default vhosts; we will be declaring +# all vhosts below. +class { 'apache': + default_vhost => false, +} + + +# Add two an IP-based vhost on 10.0.0.10, ssl and non-ssl +apache::vhost { 'The first IP-based vhost, non-ssl': + servername => 'first.example.com', + ip => '10.0.0.10', + port => '80', + ip_based => true, + docroot => '/var/www/first', +} +apache::vhost { 'The first IP-based vhost, ssl': + servername => 'first.example.com', + ip => '10.0.0.10', + port => '443', + ip_based => true, + docroot => '/var/www/first-ssl', + ssl => true, +} + +# Two name-based vhost listening on 10.0.0.20 +apache::vhost { 'second.example.com': + ip => '10.0.0.20', + port => '80', + docroot => '/var/www/second', +} +apache::vhost { 'third.example.com': + ip => '10.0.0.20', + port => '80', + docroot => '/var/www/third', +} + +# Two name-based vhosts without IPs specified, so that they will answer on either 10.0.0.10 or 10.0.0.20 . It is requried to declare +# `add_listen => 'false'` to disable declaring "Listen 80" which will conflict +# with the IP-based preceeding vhosts. +apache::vhost { 'fourth.example.com': + port => '80', + docroot => '/var/www/fourth', + add_listen => false, +} +apache::vhost { 'fifth.example.com': + port => '80', + docroot => '/var/www/fifth', + add_listen => false, +} diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apt/.fixtures.yml b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apt/.fixtures.yml new file mode 100644 index 00000000000..2bb941de237 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apt/.fixtures.yml @@ -0,0 +1,7 @@ +fixtures: + repositories: + "stdlib": + "repo": "git://github.com/puppetlabs/puppetlabs-stdlib.git" + "ref": "v2.2.1" + symlinks: + "apt": "#{source_dir}" diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apt/.project b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apt/.project new file mode 100644 index 00000000000..6523c6dafad --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apt/.project @@ -0,0 +1,23 @@ + + + apt + + + + + + org.cloudsmith.geppetto.pp.dsl.ui.modulefileBuilder + + + + + org.eclipse.xtext.ui.shared.xtextBuilder + + + + + + org.cloudsmith.geppetto.pp.dsl.ui.puppetNature + org.eclipse.xtext.ui.shared.xtextNature + + diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apt/.puppet-lint.rc b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apt/.puppet-lint.rc new file mode 100644 index 00000000000..f4abb47dc59 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apt/.puppet-lint.rc @@ -0,0 +1 @@ +--no-single_quote_string_with_variables-check diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apt/.travis.yml b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apt/.travis.yml new file mode 100644 index 00000000000..582efdf70ad --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apt/.travis.yml @@ -0,0 +1,41 @@ +--- +branches: + only: + - master +language: ruby +bundler_args: --without development +script: bundle exec rake spec SPEC_OPTS='--format documentation' +after_success: + - git clone -q git://github.com/puppetlabs/ghpublisher.git .forge-release + - .forge-release/publish +rvm: + - 1.8.7 + - 1.9.3 + - 2.0.0 +env: + matrix: + - PUPPET_GEM_VERSION="~> 2.7.0" + - PUPPET_GEM_VERSION="~> 3.0.0" + - PUPPET_GEM_VERSION="~> 3.1.0" + - PUPPET_GEM_VERSION="~> 3.2.0" + global: + - PUBLISHER_LOGIN=puppetlabs + - secure: |- + ipB/CV1rVSTXU9ZDuzrFOlzJrRmJob36tKns2xszuH4r9s5P9qivNAngRGdV + msb69xvOlzQykM0WRF+4kJ6TZ7AbMiDI+VZ8GDtsRaU5/q3BpsvFe8aato+6 + QeyFtBG62OsosTEhGws4mqiFsPDu3dHlakuJc9zevlTuhNwbKSs= +matrix: + fast_finish: true + exclude: + - rvm: 1.9.3 + env: PUPPET_GEM_VERSION="~> 2.7.0" + - rvm: 2.0.0 + env: PUPPET_GEM_VERSION="~> 2.7.0" + - rvm: 2.0.0 + env: PUPPET_GEM_VERSION="~> 3.0.0" + - rvm: 2.0.0 + env: PUPPET_GEM_VERSION="~> 3.1.0" + - rvm: 1.8.7 + env: PUPPET_GEM_VERSION="~> 3.2.0" +notifications: + email: false diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apt/CHANGELOG.md b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apt/CHANGELOG.md new file mode 100644 index 00000000000..10503c9144c --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apt/CHANGELOG.md @@ -0,0 +1,222 @@ +##2014-03-04 - Supported Release 1.4.2 +###Summary + +This is a supported release. This release tidies up 1.4.1 and re-enables +support for Ubuntu 10.04 + +####Features + +####Bugfixes +- Fix apt:ppa to include the -y Ubuntu 10.04 requires. +- Documentation changes. +- Test fixups. + +####Known Bugs + +* No known issues. + + + +##2014-02-13 1.4.1 +###Summary +This is a bugfix release. + +####Bugfixes +- Fix apt::force unable to upgrade packages from releases other than its original +- Removed a few refeneces to aptitude instead of apt-get for portability +- Removed call to getparam() due to stdlib dependency +- Correct apt::source template when architecture is provided +- Retry package installs if apt is locked +- Use root to exec in apt::ppa +- Updated tests and converted acceptance tests to beaker + +##2013-10-08 - Release 1.4.0 + +###Summary + +Minor bugfix and allow the timeout to be adjusted. + +####Features +- Add an `updates_timeout` to apt::params + +####Bugfixes +- Ensure apt::ppa can read a ppa removed by hand. + + +##2013-10-08 - Release 1.3.0 +###Summary + +This major feature in this release is the new apt::unattended_upgrades class, +allowing you to handle Ubuntu's unattended feature. This allows you to select +specific packages to automatically upgrade without any further user +involvement. + +In addition we extend our Wheezy support, add proxy support to apt:ppa and do +various cleanups and tweaks. + +####Features +- Add apt::unattended_upgrades support for Ubuntu. +- Add wheezy backports support. +- Use the geoDNS http.debian.net instead of the main debian ftp server. +- Add `options` parameter to apt::ppa in order to pass options to apt-add-repository command. +- Add proxy support for apt::ppa (uses proxy_host and proxy_port from apt). + +####Bugfixes +- Fix regsubst() calls to quote single letters (for future parser). +- Fix lint warnings and other misc cleanup. + + +##2013-07-03 - Release 1.2.0 + +####Features +- Add geppetto `.project` natures +- Add GH auto-release +- Add `apt::key::key_options` parameter +- Add complex pin support using distribution properties for `apt::pin` via new properties: + - `apt::pin::codename` + - `apt::pin::release_version` + - `apt::pin::component` + - `apt::pin::originator` + - `apt::pin::label` +- Add source architecture support to `apt::source::architecture` + +####Bugfixes +- Use apt-get instead of aptitude in apt::force +- Update default backports location +- Add dependency for required packages before apt-get update + + +##2013-06-02 - Release 1.1.1 +###Summary + +This is a bug fix release that resolves a number of issues: + +* By changing template variable usage, we remove the deprecation warnings + for Puppet 3.2.x +* Fixed proxy file removal, when proxy absent + +Some documentation, style and whitespaces changes were also merged. This +release also introduced proper rspec-puppet unit testing on Travis-CI to help +reduce regression. + +Thanks to all the community contributors below that made this patch possible. + +#### Detail Changes + +* fix minor comment type (Chris Rutter) +* whitespace fixes (Michael Moll) +* Update travis config file (William Van Hevelingen) +* Build all branches on travis (William Van Hevelingen) +* Standardize travis.yml on pattern introduced in stdlib (William Van Hevelingen) +* Updated content to conform to README best practices template (Lauren Rother) +* Fix apt::release example in readme (Brian Galey) +* add @ to variables in template (Peter Hoeg) +* Remove deprecation warnings for pin.pref.erb as well (Ken Barber) +* Update travis.yml to latest versions of puppet (Ken Barber) +* Fix proxy file removal (Scott Barber) +* Add spec test for removing proxy configuration (Dean Reilly) +* Fix apt::key listing longer than 8 chars (Benjamin Knofe) + + + + +## Release 1.1.0 +###Summary + +This release includes Ubuntu 12.10 (Quantal) support for PPAs. + +--- + +##2012-05-25 - Puppet Labs - Release 0.0.4 +###Summary + + * Fix ppa list filename when there is a period in the PPA name + * Add .pref extension to apt preferences files + * Allow preferences to be purged + * Extend pin support + + +##2012-05-04 - Puppet Labs - Release 0.0.3 +###Summary + + * only invoke apt-get update once + * only install python-software-properties if a ppa is added + * support 'ensure => absent' for all defined types + * add apt::conf + * add apt::backports + * fixed Modulefile for module tool dependency resolution + * configure proxy before doing apt-get update + * use apt-get update instead of aptitude for apt::ppa + * add support to pin release + + +##2012-03-26 - Puppet Labs - Release 0.0.2 +###Summary + +* 41cedbb (#13261) Add real examples to smoke tests. +* d159a78 (#13261) Add key.pp smoke test +* 7116c7a (#13261) Replace foo source with puppetlabs source +* 1ead0bf Ignore pkg directory. +* 9c13872 (#13289) Fix some more style violations +* 0ea4ffa (#13289) Change test scaffolding to use a module & manifest dir fixture path +* a758247 (#13289) Clean up style violations and fix corresponding tests +* 99c3fd3 (#13289) Add puppet lint tests to Rakefile +* 5148cbf (#13125) Apt keys should be case insensitive +* b9607a4 Convert apt::key to use anchors + + +##2012-03-07 - Puppet Labs - Release 0.0.1 +###Summary + +* d4fec56 Modify apt::source release parameter test +* 1132a07 (#12917) Add contributors to README +* 8cdaf85 (#12823) Add apt::key defined type and modify apt::source to use it +* 7c0d10b (#12809) $release should use $lsbdistcodename and fall back to manual input +* be2cc3e (#12522) Adjust spec test for splitting purge +* 7dc60ae (#12522) Split purge option to spare sources.list +* 9059c4e Fix source specs to test all key permutations +* 8acb202 Add test for python-software-properties package +* a4af11f Check if python-software-properties is defined before attempting to define it. +* 1dcbf3d Add tests for required_packages change +* f3735d2 Allow duplicate $required_packages +* 74c8371 (#12430) Add tests for changes to apt module +* 97ebb2d Test two sources with the same key +* 1160bcd (#12526) Add ability to reverse apt { disable_keys => true } +* 2842d73 Add Modulefile to puppet-apt +* c657742 Allow the use of the same key in multiple sources +* 8c27963 (#12522) Adding purge option to apt class +* 997c9fd (#12529) Add unit test for apt proxy settings +* 50f3cca (#12529) Add parameter to support setting a proxy for apt +* d522877 (#12094) Replace chained .with_* with a hash +* 8cf1bd0 (#12094) Remove deprecated spec.opts file +* 2d688f4 (#12094) Add rspec-puppet tests for apt +* 0fb5f78 (#12094) Replace name with path in file resources +* f759bc0 (#11953) Apt::force passes $version to aptitude +* f71db53 (#11413) Add spec test for apt::force to verify changes to unless +* 2f5d317 (#11413) Update dpkg query used by apt::force +* cf6caa1 (#10451) Add test coverage to apt::ppa +* 0dd697d include_src parameter in example; Whitespace cleanup +* b662eb8 fix typos in "repositories" +* 1be7457 Fix (#10451) - apt::ppa fails to "apt-get update" when new PPA source is added +* 864302a Set the pin priority before adding the source (Fix #10449) +* 1de4e0a Refactored as per mlitteken +* 1af9a13 Added some crazy bash madness to check if the ppa is installed already. Otherwise the manifest tries to add it on every run! +* 52ca73e (#8720) Replace Apt::Ppa with Apt::Builddep +* 5c05fa0 added builddep command. +* a11af50 added the ability to specify the content of a key +* c42db0f Fixes ppa test. +* 77d2b0d reformatted whitespace to match recommended style of 2 space indentation. +* 27ebdfc ignore swap files. +* 377d58a added smoke tests for module. +* 18f614b reformatted apt::ppa according to recommended style. +* d8a1e4e Created a params class to hold global data. +* 636ae85 Added two params for apt class +* 148fc73 Update LICENSE. +* ed2d19e Support ability to add more than one PPA +* 420d537 Add call to apt-update after add-apt-repository in apt::ppa +* 945be77 Add package definition for python-software-properties +* 71fc425 Abs paths for all commands +* 9d51cd1 Adding LICENSE +* 71796e3 Heading fix in README +* 87777d8 Typo in README +* f848bac First commit diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apt/Gemfile b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apt/Gemfile new file mode 100644 index 00000000000..1e359d07b56 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apt/Gemfile @@ -0,0 +1,18 @@ +source ENV['GEM_SOURCE'] || 'https://rubygems.org' + +group :development, :test do + gem 'rake', :require => false + gem 'pry', :require => false + gem 'rspec-puppet', :require => false + gem 'puppet-lint', :require => false + gem 'puppetlabs_spec_helper', :require => false + gem 'serverspec', :require => false + gem 'beaker', :require => false + gem 'beaker-rspec', :require => false +end + +if puppetversion = ENV['PUPPET_GEM_VERSION'] + gem 'puppet', puppetversion, :require => false +else + gem 'puppet', :require => false +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apt/LICENSE b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apt/LICENSE new file mode 100644 index 00000000000..30ce036d5e0 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apt/LICENSE @@ -0,0 +1,34 @@ +Copyright (c) 2011 Evolving Web Inc. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. + + +Copyright 2014 Puppet Labs + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apt/Modulefile b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apt/Modulefile new file mode 100644 index 00000000000..40a87f4ef39 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apt/Modulefile @@ -0,0 +1,14 @@ +name 'puppetlabs-apt' +version '1.4.2' +source 'https://github.com/puppetlabs/puppetlabs-apt' +author 'Evolving Web / Puppet Labs' +license 'Apache License 2.0' +summary 'Puppet Labs Apt Module' +description 'APT Module for Puppet' +project_page 'https://github.com/puppetlabs/puppetlabs-apt' + +## Add dependencies, if any: +#dependency 'puppetlabs/stdlib', '2.x' +# The dependency should be written as above but librarian-puppet +# does not support the expression as the PMT does. +dependency 'puppetlabs/stdlib', '>= 2.2.1' diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apt/README.md b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apt/README.md new file mode 100644 index 00000000000..ec8b4c5e49b --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apt/README.md @@ -0,0 +1,236 @@ +apt +=== + +[![Build Status](https://travis-ci.org/puppetlabs/puppetlabs-apt.png?branch=master)](https://travis-ci.org/puppetlabs/puppetlabs-apt) + +## Description + +Provides helpful definitions for dealing with Apt. + +======= + +Overview +-------- + +The APT module provides a simple interface for managing APT source, key, and definitions with Puppet. + +Module Description +------------------ + +APT automates obtaining and installing software packages on \*nix systems. + +Setup +----- + +**What APT affects:** + +* package/service/configuration files for APT +* your system's `sources.list` file and `sources.list.d` directory + * NOTE: Setting the `purge_sources_list` and `purge_sources_list_d` parameters to 'true' will destroy any existing content that was not declared with Puppet. The default for these parameters is 'false'. +* system repositories +* authentication keys +* wget (optional) + +### Beginning with APT + +To begin using the APT module with default parameters, declare the class + + include apt + +Puppet code that uses anything from the APT module requires that the core apt class be declared/\s\+$//e + +Usage +----- + +Using the APT module consists predominantly in declaring classes that provide desired functionality and features. + +### apt + +`apt` provides a number of common resources and options that are shared by the various defined types in this module, so you MUST always include this class in your manifests. + +The parameters for `apt` are not required in general and are predominantly for development environment use-cases. + + class { 'apt': + always_apt_update => false, + disable_keys => undef, + proxy_host => false, + proxy_port => '8080', + purge_sources_list => false, + purge_sources_list_d => false, + purge_preferences_d => false, + update_timeout => undef + } + +Puppet will manage your system's `sources.list` file and `sources.list.d` directory but will do its best to respect existing content. + +If you declare your apt class with `purge_sources_list` and `purge_sources_list_d` set to 'true', Puppet will unapologetically purge any existing content it finds that wasn't declared with Puppet. + +### apt::builddep + +Installs the build depends of a specified package. + + apt::builddep { 'glusterfs-server': } + +### apt::force + +Forces a package to be installed from a specific release. This class is particularly useful when using repositories, like Debian, that are unstable in Ubuntu. + + apt::force { 'glusterfs-server': + release => 'unstable', + version => '3.0.3', + require => Apt::Source['debian_unstable'], + } + +### apt::key + +Adds a key to the list of keys used by APT to authenticate packages. + + apt::key { 'puppetlabs': + key => '4BD6EC30', + key_server => 'pgp.mit.edu', + } + + apt::key { 'jenkins': + key => 'D50582E6', + key_source => 'http://pkg.jenkins-ci.org/debian/jenkins-ci.org.key', + } + +Note that use of `key_source` requires wget to be installed and working. + +### apt::pin + +Adds an apt pin for a certain release. + + apt::pin { 'karmic': priority => 700 } + apt::pin { 'karmic-updates': priority => 700 } + apt::pin { 'karmic-security': priority => 700 } + +Note you can also specifying more complex pins using distribution properties. + + apt::pin { 'stable': + priority => -10, + originator => 'Debian', + release_version => '3.0', + component => 'main', + label => 'Debian' + } + +### apt::ppa + +Adds a ppa repository using `add-apt-repository`. + + apt::ppa { 'ppa:drizzle-developers/ppa': } + +### apt::release + +Sets the default apt release. This class is particularly useful when using repositories, like Debian, that are unstable in Ubuntu. + + class { 'apt::release': + release_id => 'precise', + } + +### apt::source + +Adds an apt source to `/etc/apt/sources.list.d/`. + + apt::source { 'debian_unstable': + location => 'http://debian.mirror.iweb.ca/debian/', + release => 'unstable', + repos => 'main contrib non-free', + required_packages => 'debian-keyring debian-archive-keyring', + key => '46925553', + key_server => 'subkeys.pgp.net', + pin => '-10', + include_src => true + } + +If you would like to configure your system so the source is the Puppet Labs APT repository + + apt::source { 'puppetlabs': + location => 'http://apt.puppetlabs.com', + repos => 'main', + key => '4BD6EC30', + key_server => 'pgp.mit.edu', + } + +### Testing + +The APT module is mostly a collection of defined resource types, which provide reusable logic that can be leveraged to manage APT. It does provide smoke tests for testing functionality on a target system, as well as spec tests for checking a compiled catalog against an expected set of resources. + +#### Example Test + +This test will set up a Puppet Labs apt repository. Start by creating a new smoke test in the apt module's test folder. Call it puppetlabs-apt.pp. Inside, declare a single resource representing the Puppet Labs APT source and gpg key + + apt::source { 'puppetlabs': + location => 'http://apt.puppetlabs.com', + repos => 'main', + key => '4BD6EC30', + key_server => 'pgp.mit.edu', + } + +This resource creates an apt source named puppetlabs and gives Puppet information about the repository's location and key used to sign its packages. Puppet leverages Facter to determine the appropriate release, but you can set it directly by adding the release type. + +Check your smoke test for syntax errors + + $ puppet parser validate tests/puppetlabs-apt.pp + +If you receive no output from that command, it means nothing is wrong. Then apply the code + + $ puppet apply --verbose tests/puppetlabs-apt.pp + notice: /Stage[main]//Apt::Source[puppetlabs]/File[puppetlabs.list]/ensure: defined content as '{md5}3be1da4923fb910f1102a233b77e982e' + info: /Stage[main]//Apt::Source[puppetlabs]/File[puppetlabs.list]: Scheduling refresh of Exec[puppetlabs apt update] + notice: /Stage[main]//Apt::Source[puppetlabs]/Exec[puppetlabs apt update]: Triggered 'refresh' from 1 events> + +The above example used a smoke test to easily lay out a resource declaration and apply it on your system. In production, you may want to declare your APT sources inside the classes where they’re needed. + +Implementation +-------------- + +### apt::backports + +Adds the necessary components to get backports for Ubuntu and Debian. The release name defaults to `$lsbdistcodename`. Setting this manually can cause undefined behavior (read: universe exploding). + +Limitations +----------- + +This module should work across all versions of Debian/Ubuntu and support all major APT repository management features. + +Development +------------ + +Puppet Labs modules on the Puppet Forge are open projects, and community contributions are essential for keeping them great. We can’t access the huge number of platforms and myriad of hardware, software, and deployment configurations that Puppet is intended to serve. + +We want to keep it as easy as possible to contribute changes so that our modules work in your environment. There are a few guidelines that we need contributors to follow so that we can have a chance of keeping on top of things. + +You can read the complete module contribution guide [on the Puppet Labs wiki.](http://projects.puppetlabs.com/projects/module-site/wiki/Module_contributing) + +License +------- + +The original code for this module comes from Evolving Web and was licensed under the MIT license. Code added since the fork of this module is licensed under the Apache 2.0 License like the rest of the Puppet Labs products. + +The LICENSE contains both licenses. + +Contributors +------------ + +A lot of great people have contributed to this module. A somewhat current list follows: + +* Ben Godfrey +* Branan Purvine-Riley +* Christian G. Warden +* Dan Bode +* Garrett Honeycutt +* Jeff Wallace +* Ken Barber +* Matthaus Litteken +* Matthias Pigulla +* Monty Taylor +* Peter Drake +* Reid Vandewiele +* Robert Navarro +* Ryan Coleman +* Scott McLeod +* Spencer Krum +* William Van Hevelingen +* Zach Leslie diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apt/Rakefile b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apt/Rakefile new file mode 100644 index 00000000000..6d067dc56c2 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apt/Rakefile @@ -0,0 +1,4 @@ +require 'puppetlabs_spec_helper/rake_tasks' +require 'puppet-lint/tasks/puppet-lint' + +PuppetLint.configuration.send('disable_single_quote_string_with_variables') diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apt/manifests/backports.pp b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apt/manifests/backports.pp new file mode 100644 index 00000000000..9cfa1c01130 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apt/manifests/backports.pp @@ -0,0 +1,48 @@ +# This adds the necessary components to get backports for ubuntu and debian +# +# == Parameters +# +# [*release*] +# The ubuntu/debian release name. Defaults to $lsbdistcodename. Setting this +# manually can cause undefined behavior. (Read: universe exploding) +# +# == Examples +# +# include apt::backports +# +# class { 'apt::backports': +# release => 'natty', +# } +# +# == Authors +# +# Ben Hughes, I think. At least blame him if this goes wrong. +# I just added puppet doc. +# +# == Copyright +# +# Copyright 2011 Puppet Labs Inc, unless otherwise noted. +class apt::backports( + $release = $::lsbdistcodename, + $location = $apt::params::backports_location +) inherits apt::params { + + $release_real = downcase($release) + $key = $::lsbdistid ? { + 'debian' => '46925553', + 'ubuntu' => '437D05B5', + } + $repos = $::lsbdistid ? { + 'debian' => 'main contrib non-free', + 'ubuntu' => 'main universe multiverse restricted', + } + + apt::source { 'backports': + location => $location, + release => "${release_real}-backports", + repos => $repos, + key => $key, + key_server => 'pgp.mit.edu', + pin => '200', + } +} diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apt/manifests/builddep.pp b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apt/manifests/builddep.pp new file mode 100644 index 00000000000..3294f713391 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apt/manifests/builddep.pp @@ -0,0 +1,16 @@ +# builddep.pp + +define apt::builddep() { + include apt::update + + exec { "apt-builddep-${name}": + command => "/usr/bin/apt-get -y --force-yes build-dep ${name}", + logoutput => 'on_failure', + notify => Exec['apt_update'], + } + + # Need anchor to provide containment for dependencies. + anchor { "apt::builddep::${name}": + require => Class['apt::update'], + } +} diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apt/manifests/conf.pp b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apt/manifests/conf.pp new file mode 100644 index 00000000000..3c4cb1975cb --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apt/manifests/conf.pp @@ -0,0 +1,18 @@ +define apt::conf ( + $content, + $ensure = present, + $priority = '50' +) { + + include apt::params + + $apt_conf_d = $apt::params::apt_conf_d + + file { "${apt_conf_d}/${priority}${name}": + ensure => $ensure, + content => $content, + owner => root, + group => root, + mode => '0644', + } +} diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apt/manifests/debian/testing.pp b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apt/manifests/debian/testing.pp new file mode 100644 index 00000000000..3a82b4f7fd9 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apt/manifests/debian/testing.pp @@ -0,0 +1,21 @@ +# testing.pp + +class apt::debian::testing { + include apt + + # deb http://debian.mirror.iweb.ca/debian/ testing main contrib non-free + # deb-src http://debian.mirror.iweb.ca/debian/ testing main contrib non-free + # Key: 46925553 Server: subkeys.pgp.net + # debian-keyring + # debian-archive-keyring + + apt::source { 'debian_testing': + location => 'http://debian.mirror.iweb.ca/debian/', + release => 'testing', + repos => 'main contrib non-free', + required_packages => 'debian-keyring debian-archive-keyring', + key => '46925553', + key_server => 'subkeys.pgp.net', + pin => '-10', + } +} diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apt/manifests/debian/unstable.pp b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apt/manifests/debian/unstable.pp new file mode 100644 index 00000000000..77df94b0af5 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apt/manifests/debian/unstable.pp @@ -0,0 +1,21 @@ +# unstable.pp + +class apt::debian::unstable { + include apt + + # deb http://debian.mirror.iweb.ca/debian/ unstable main contrib non-free + # deb-src http://debian.mirror.iweb.ca/debian/ unstable main contrib non-free + # Key: 46925553 Server: subkeys.pgp.net + # debian-keyring + # debian-archive-keyring + + apt::source { 'debian_unstable': + location => 'http://debian.mirror.iweb.ca/debian/', + release => 'unstable', + repos => 'main contrib non-free', + required_packages => 'debian-keyring debian-archive-keyring', + key => '46925553', + key_server => 'subkeys.pgp.net', + pin => '-10', + } +} diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apt/manifests/force.pp b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apt/manifests/force.pp new file mode 100644 index 00000000000..70b7d47239b --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apt/manifests/force.pp @@ -0,0 +1,42 @@ +# force.pp +# force a package from a specific release + +define apt::force( + $release = 'testing', + $version = false, + $timeout = 300 +) { + + $provider = $apt::params::provider + + $version_string = $version ? { + false => undef, + default => "=${version}", + } + + $release_string = $release ? { + false => undef, + default => "-t ${release}", + } + + if $version == false { + if $release == false { + $install_check = "/usr/bin/dpkg -s ${name} | grep -q 'Status: install'" + } else { + # If installed version and candidate version differ, this check returns 1 (false). + $install_check = "/usr/bin/test \$(/usr/bin/apt-cache policy -t ${release} ${name} | /bin/grep -E 'Installed|Candidate' | /usr/bin/uniq -s 14 | /usr/bin/wc -l) -eq 1" + } + } else { + if $release == false { + $install_check = "/usr/bin/dpkg -s ${name} | grep -q 'Version: ${version}'" + } else { + $install_check = "/usr/bin/apt-cache policy -t ${release} ${name} | /bin/grep -q 'Installed: ${version}'" + } + } + + exec { "${provider} -y ${release_string} install ${name}${version_string}": + unless => $install_check, + logoutput => 'on_failure', + timeout => $timeout, + } +} diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apt/manifests/init.pp b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apt/manifests/init.pp new file mode 100644 index 00000000000..364ce8cb4e1 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apt/manifests/init.pp @@ -0,0 +1,121 @@ +# Class: apt +# +# This module manages the initial configuration of apt. +# +# Parameters: +# The parameters listed here are not required in general and were +# added for use cases related to development environments. +# disable_keys - disables the requirement for all packages to be signed +# always_apt_update - rather apt should be updated on every run (intended +# for development environments where package updates are frequent) +# purge_sources_list - Accepts true or false. Defaults to false If set to +# true, Puppet will purge all unmanaged entries from sources.list +# purge_sources_list_d - Accepts true or false. Defaults to false. If set +# to true, Puppet will purge all unmanaged entries from sources.list.d +# update_timeout - Overrides the exec timeout in seconds for apt-get update. +# If not set defaults to Exec's default (300) +# +# Actions: +# +# Requires: +# puppetlabs/stdlib +# Sample Usage: +# class { 'apt': } + +class apt( + $always_apt_update = false, + $disable_keys = undef, + $proxy_host = undef, + $proxy_port = '8080', + $purge_sources_list = false, + $purge_sources_list_d = false, + $purge_preferences_d = false, + $update_timeout = undef +) { + + include apt::params + include apt::update + + validate_bool($purge_sources_list, $purge_sources_list_d, $purge_preferences_d) + + $sources_list_content = $purge_sources_list ? { + false => undef, + true => "# Repos managed by puppet.\n", + } + + if $always_apt_update == true { + Exec <| title=='apt_update' |> { + refreshonly => false, + } + } + + $root = $apt::params::root + $apt_conf_d = $apt::params::apt_conf_d + $sources_list_d = $apt::params::sources_list_d + $preferences_d = $apt::params::preferences_d + $provider = $apt::params::provider + + file { 'sources.list': + ensure => present, + path => "${root}/sources.list", + owner => root, + group => root, + mode => '0644', + content => $sources_list_content, + notify => Exec['apt_update'], + } + + file { 'sources.list.d': + ensure => directory, + path => $sources_list_d, + owner => root, + group => root, + purge => $purge_sources_list_d, + recurse => $purge_sources_list_d, + notify => Exec['apt_update'], + } + + file { 'preferences.d': + ensure => directory, + path => $preferences_d, + owner => root, + group => root, + purge => $purge_preferences_d, + recurse => $purge_preferences_d, + } + + case $disable_keys { + true: { + file { '99unauth': + ensure => present, + content => "APT::Get::AllowUnauthenticated 1;\n", + path => "${apt_conf_d}/99unauth", + } + } + false: { + file { '99unauth': + ensure => absent, + path => "${apt_conf_d}/99unauth", + } + } + undef: { } # do nothing + default: { fail('Valid values for disable_keys are true or false') } + } + + $proxy_set = $proxy_host ? { + undef => absent, + default => present + } + + file { 'configure-apt-proxy': + ensure => $proxy_set, + path => "${apt_conf_d}/proxy", + content => "Acquire::http::Proxy \"http://${proxy_host}:${proxy_port}\";", + notify => Exec['apt_update'], + } + + # Need anchor to provide containment for dependencies. + anchor { 'apt::update': + require => Class['apt::update'], + } +} diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apt/manifests/key.pp b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apt/manifests/key.pp new file mode 100644 index 00000000000..c78bf658ce9 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apt/manifests/key.pp @@ -0,0 +1,90 @@ +define apt::key ( + $key = $title, + $ensure = present, + $key_content = false, + $key_source = false, + $key_server = 'keyserver.ubuntu.com', + $key_options = false +) { + + include apt::params + + $upkey = upcase($key) + # trim the key to the last 8 chars so we can match longer keys with apt-key list too + $trimmedkey = regsubst($upkey, '^.*(.{8})$', '\1') + + if $key_content { + $method = 'content' + } elsif $key_source { + $method = 'source' + } elsif $key_server { + $method = 'server' + } + + # This is a hash of the parts of the key definition that we care about. + # It is used as a unique identifier for this instance of apt::key. It gets + # hashed to ensure that the resource name doesn't end up being pages and + # pages (e.g. in the situation where key_content is specified). + $digest = sha1("${upkey}/${key_content}/${key_source}/${key_server}/") + + # Allow multiple ensure => present for the same key to account for many + # apt::source resources that all reference the same key. + case $ensure { + present: { + + anchor { "apt::key/${title}": } + + if defined(Exec["apt::key ${upkey} absent"]) { + fail("Cannot ensure Apt::Key[${upkey}] present; ${upkey} already ensured absent") + } + + if !defined(Anchor["apt::key ${upkey} present"]) { + anchor { "apt::key ${upkey} present": } + } + + if $key_options{ + $options_string = "--keyserver-options ${key_options}" + } + else{ + $options_string = '' + } + + if !defined(Exec[$digest]) { + $digest_command = $method ? { + 'content' => "echo '${key_content}' | /usr/bin/apt-key add -", + 'source' => "wget -q '${key_source}' -O- | apt-key add -", + 'server' => "apt-key adv --keyserver '${key_server}' ${options_string} --recv-keys '${upkey}'", + } + exec { $digest: + command => $digest_command, + path => '/bin:/usr/bin', + unless => "/usr/bin/apt-key list | /bin/grep '${trimmedkey}'", + logoutput => 'on_failure', + before => Anchor["apt::key ${upkey} present"], + } + } + + Anchor["apt::key ${upkey} present"] -> Anchor["apt::key/${title}"] + + } + absent: { + + if defined(Anchor["apt::key ${upkey} present"]) { + fail("Cannot ensure Apt::Key[${upkey}] absent; ${upkey} already ensured present") + } + + exec { "apt::key ${upkey} absent": + command => "apt-key del '${upkey}'", + path => '/bin:/usr/bin', + onlyif => "apt-key list | grep '${trimmedkey}'", + user => 'root', + group => 'root', + logoutput => 'on_failure', + } + } + + default: { + fail "Invalid 'ensure' value '${ensure}' for aptkey" + } + } +} diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apt/manifests/params.pp b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apt/manifests/params.pp new file mode 100644 index 00000000000..b35bb1c8d91 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apt/manifests/params.pp @@ -0,0 +1,42 @@ +class apt::params { + $root = '/etc/apt' + $provider = '/usr/bin/apt-get' + $sources_list_d = "${root}/sources.list.d" + $apt_conf_d = "${root}/apt.conf.d" + $preferences_d = "${root}/preferences.d" + + case $::lsbdistid { + 'debian': { + case $::lsbdistcodename { + 'squeeze': { + $backports_location = 'http://backports.debian.org/debian-backports' + } + 'wheezy': { + $backports_location = 'http://ftp.debian.org/debian/' + } + default: { + $backports_location = 'http://http.debian.net/debian/' + } + } + } + 'ubuntu': { + case $::lsbdistcodename { + 'hardy','maverick','natty','oneiric','precise': { + $backports_location = 'http://us.archive.ubuntu.com/ubuntu' + $ppa_options = '-y' + } + 'lucid': { + $backports_location = 'http://us.archive.ubuntu.com/ubuntu' + $ppa_options = undef + } + default: { + $backports_location = 'http://old-releases.ubuntu.com/ubuntu' + $ppa_options = '-y' + } + } + } + default: { + fail("Unsupported osfamily (${::osfamily}) or lsbdistid (${::lsbdistid})") + } + } +} diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apt/manifests/pin.pp b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apt/manifests/pin.pp new file mode 100644 index 00000000000..402e79ede7a --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apt/manifests/pin.pp @@ -0,0 +1,73 @@ +# pin.pp +# pin a release in apt, useful for unstable repositories + +define apt::pin( + $ensure = present, + $explanation = "${::caller_module_name}: ${name}", + $order = '', + $packages = '*', + $priority = 0, + $release = '', # a= + $origin = '', + $version = '', + $codename = '', # n= + $release_version = '', # v= + $component = '', # c= + $originator = '', # o= + $label = '' # l= +) { + + include apt::params + + $preferences_d = $apt::params::preferences_d + + if $order != '' and !is_integer($order) { + fail('Only integers are allowed in the apt::pin order param') + } + + $pin_release_array = [ + $release, + $codename, + $release_version, + $component, + $originator, + $label] + $pin_release = join($pin_release_array, '') + + # Read the manpage 'apt_preferences(5)', especially the chapter + # 'Thea Effect of APT Preferences' to understand the following logic + # and the difference between specific and general form + if $packages != '*' { # specific form + + if ( $pin_release != '' and ( $origin != '' or $version != '' )) or + ( $origin != '' and ( $pin_release != '' or $version != '' )) or + ( $version != '' and ( $pin_release != '' or $origin != '' )) { + fail('parameters release, origin, and version are mutually exclusive') + } + + } else { # general form + + if $version != '' { + fail('parameter version cannot be used in general form') + } + + if ( $pin_release != '' and $origin != '' ) or + ( $origin != '' and $pin_release != '' ) { + fail('parmeters release and origin are mutually exclusive') + } + + } + + $path = $order ? { + '' => "${preferences_d}/${name}.pref", + default => "${preferences_d}/${order}-${name}.pref", + } + file { "${name}.pref": + ensure => $ensure, + path => $path, + owner => root, + group => root, + mode => '0644', + content => template('apt/pin.pref.erb'), + } +} diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apt/manifests/ppa.pp b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apt/manifests/ppa.pp new file mode 100644 index 00000000000..f2629809e0c --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apt/manifests/ppa.pp @@ -0,0 +1,81 @@ +# ppa.pp + +define apt::ppa( + $release = $::lsbdistcodename, + $options = $apt::params::ppa_options, +) { + $ensure = 'present' + include apt::params + include apt::update + + $sources_list_d = $apt::params::sources_list_d + + if ! $release { + fail('lsbdistcodename fact not available: release parameter required') + } + + if $::operatingsystem != 'Ubuntu' { + fail("apt::ppa is currently supported on Ubuntu only.") + } + + $filename_without_slashes = regsubst($name, '/', '-', 'G') + $filename_without_dots = regsubst($filename_without_slashes, '\.', '_', 'G') + $filename_without_ppa = regsubst($filename_without_dots, '^ppa:', '', 'G') + $sources_list_d_filename = "${filename_without_ppa}-${release}.list" + + if $ensure == 'present' { + $package = $::lsbdistrelease ? { + /^[1-9]\..*|1[01]\..*|12.04$/ => 'python-software-properties', + default => 'software-properties-common', + } + + if ! defined(Package[$package]) { + package { $package: } + } + + if defined(Class[apt]) { + $proxy_host = $apt::proxy_host + $proxy_port = $apt::proxy_port + case $proxy_host { + false, '': { + $proxy_env = [] + } + default: {$proxy_env = ["http_proxy=http://${proxy_host}:${proxy_port}", "https_proxy=http://${proxy_host}:${proxy_port}"]} + } + } else { + $proxy_env = [] + } + exec { "add-apt-repository-${name}": + environment => $proxy_env, + command => "/usr/bin/add-apt-repository ${options} ${name}", + unless => "/usr/bin/test -s ${sources_list_d}/${sources_list_d_filename}", + user => 'root', + logoutput => 'on_failure', + notify => Exec['apt_update'], + require => [ + File['sources.list.d'], + Package[$package], + ], + } + + file { "${sources_list_d}/${sources_list_d_filename}": + ensure => file, + require => Exec["add-apt-repository-${name}"], + } + } + else { + + file { "${sources_list_d}/${sources_list_d_filename}": + ensure => 'absent', + mode => '0644', + owner => 'root', + gruop => 'root', + notify => Exec['apt_update'], + } + } + + # Need anchor to provide containment for dependencies. + anchor { "apt::ppa::${name}": + require => Class['apt::update'], + } +} diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apt/manifests/release.pp b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apt/manifests/release.pp new file mode 100644 index 00000000000..6e0a38f73f7 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apt/manifests/release.pp @@ -0,0 +1,17 @@ +# release.pp + +class apt::release ( + $release_id +) { + + include apt::params + + $root = $apt::params::root + + file { "${root}/apt.conf.d/01release": + owner => root, + group => root, + mode => '0644', + content => "APT::Default-Release \"${release_id}\";" + } +} diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apt/manifests/source.pp b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apt/manifests/source.pp new file mode 100644 index 00000000000..bc93ad9d571 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apt/manifests/source.pp @@ -0,0 +1,87 @@ +# source.pp +# add an apt source + +define apt::source( + $ensure = present, + $location = '', + $release = 'UNDEF', + $repos = 'main', + $include_src = true, + $required_packages = false, + $key = false, + $key_server = 'keyserver.ubuntu.com', + $key_content = false, + $key_source = false, + $pin = false, + $architecture = undef +) { + + include apt::params + include apt::update + + $sources_list_d = $apt::params::sources_list_d + $provider = $apt::params::provider + + if $release == 'UNDEF' { + if $::lsbdistcodename == undef { + fail('lsbdistcodename fact not available: release parameter required') + } else { + $release_real = $::lsbdistcodename + } + } else { + $release_real = $release + } + + file { "${name}.list": + ensure => $ensure, + path => "${sources_list_d}/${name}.list", + owner => root, + group => root, + mode => '0644', + content => template("${module_name}/source.list.erb"), + notify => Exec['apt_update'], + } + + + if ($pin != false) { + # Get the host portion out of the url so we can pin to origin + $url_split = split($location, '/') + $host = $url_split[2] + + apt::pin { $name: + ensure => $ensure, + priority => $pin, + before => File["${name}.list"], + origin => $host, + } + } + + if ($required_packages != false) and ($ensure == 'present') { + exec { "Required packages: '${required_packages}' for ${name}": + command => "${provider} -y install ${required_packages}", + logoutput => 'on_failure', + refreshonly => true, + tries => 3, + try_sleep => 1, + subscribe => File["${name}.list"], + before => Exec['apt_update'], + } + } + + # We do not want to remove keys when the source is absent. + if ($key != false) and ($ensure == 'present') { + apt::key { "Add key: ${key} from Apt::Source ${title}": + ensure => present, + key => $key, + key_server => $key_server, + key_content => $key_content, + key_source => $key_source, + before => File["${name}.list"], + } + } + + # Need anchor to provide containment for dependencies. + anchor { "apt::source::${name}": + require => Class['apt::update'], + } +} diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apt/manifests/unattended_upgrades.pp b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apt/manifests/unattended_upgrades.pp new file mode 100644 index 00000000000..b0bd8ab1e09 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apt/manifests/unattended_upgrades.pp @@ -0,0 +1,69 @@ +# Class: apt::unattended_upgrades +# +# This class manages the unattended-upgrades package and related configuration +# files for ubuntu +# +# origins are the repositories to automatically upgrade included packages +# blacklist is a list of packages to not automatically upgrade +# update is how often to run "apt-get update" in days +# download is how often to run "apt-get upgrade --download-only" in days +# upgrade is how often to upgrade packages included in the origins list in days +# autoclean is how often to run "apt-get autoclean" in days +# +# information on the other options can be found in the 50unattended-upgrades +# file and in /etc/cron.daily/apt +# +class apt::unattended_upgrades ( + $origins = ['${distro_id}:${distro_codename}-security'], + $blacklist = [], + $update = "1", + $download = "1", + $upgrade = "1", + $autoclean = "7", + $auto_fix = true, + $minimal_steps = false, + $install_on_shutdown = false, + $mail_to = "NONE", + $mail_only_on_error = false, + $remove_unused = true, + $auto_reboot = false, + $dl_limit = "NONE", + $enable = "1", + $backup_interval = "0", + $backup_level = "3", + $max_age = "0", + $min_age = "0", + $max_size = "0", + $download_delta = "0", + $verbose = "0", +) { + include apt::params + + validate_bool( + $auto_fix, + $minimal_steps, + $install_on_shutdown, + $mail_only_on_error, + $remove_unused, + $auto_reboot + ) + + package { 'unattended-upgrades': + ensure => present, + } + + File { + ensure => file, + owner => 'root', + group => 'root', + mode => '0644', + require => Package['unattended-upgrades'], + } + + file { + '/etc/apt/apt.conf.d/50unattended-upgrades': + content => template('apt/50unattended-upgrades.erb'); + '/etc/apt/apt.conf.d/10periodic': + content => template('apt/10periodic.erb'); + } +} diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apt/manifests/update.pp b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apt/manifests/update.pp new file mode 100644 index 00000000000..ce0b78fbddb --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apt/manifests/update.pp @@ -0,0 +1,10 @@ +class apt::update { + include apt::params + + exec { 'apt_update': + command => "${apt::params::provider} update", + logoutput => 'on_failure', + refreshonly => true, + timeout => $apt::update_timeout, + } +} diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apt/metadata.json b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apt/metadata.json new file mode 100644 index 00000000000..f1e8663059b --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apt/metadata.json @@ -0,0 +1,30 @@ +{ + "name": "puppetlabs-apt", + "version": "1.4.1", + "source": "https://github.com/puppetlabs/puppetlabs-apt", + "author": "Puppet Labs", + "license": "Apache-2.0", + "project_page": "https://github.com/puppetlabs/puppetlabs-apt", + "summary": "Puppet Labs Apt Module", + "operatingsystem_support": [ + { + "operatingsystem": "Debian", + "operatingsystemrelease": [ + "6", + "7" + ] + }, + { + "operatingsystem": "Ubuntu", + "operatingsystemrelease": [ + "10.04", + "12.04" + ] + } + ], + "requirements": [ + { "name": "pe", "version_requirement": "3.2.x" }, + { "name": "puppet", "version_requirement": "3.x" } + ], + "dependencies": [] +} diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apt/spec/acceptance/apt_builddep_spec.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apt/spec/acceptance/apt_builddep_spec.rb new file mode 100644 index 00000000000..1e35e4aa68d --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apt/spec/acceptance/apt_builddep_spec.rb @@ -0,0 +1,36 @@ +require 'spec_helper_acceptance' + +describe 'apt::builddep', :unless => UNSUPPORTED_PLATFORMS.include?(fact('osfamily')) do + + context 'reset' do + it 'removes packages' do + shell('apt-get -y remove znc') + shell('apt-get -y remove g++') + end + end + + context 'apt::builddep' do + it 'should work with no errors' do + pp = <<-EOS + include '::apt' + apt::builddep { 'znc': } + EOS + + apply_manifest(pp, :catch_failures => true) + end + + describe 'should install g++ as a dependency' do + describe package('g++') do + it { should be_installed } + end + end + end + + context 'reset' do + it 'removes packages' do + shell('apt-get -y remove znc') + shell('apt-get -y remove g++') + end + end + +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apt/spec/acceptance/apt_key_spec.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apt/spec/acceptance/apt_key_spec.rb new file mode 100644 index 00000000000..9f2ba395ad5 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apt/spec/acceptance/apt_key_spec.rb @@ -0,0 +1,200 @@ +require 'spec_helper_acceptance' + +describe 'apt::key', :unless => UNSUPPORTED_PLATFORMS.include?(fact('osfamily')) do + context 'apt::key' do + it 'should work with no errors' do + pp = <<-EOS + include '::apt' + apt::key { 'puppetlabs': + key => '4BD6EC30', + key_server => 'pgp.mit.edu', + } + + apt::key { 'jenkins': + key => 'D50582E6', + key_source => 'http://pkg.jenkins-ci.org/debian/jenkins-ci.org.key', + } + EOS + + shell('apt-key del 4BD6EC30', :acceptable_exit_codes => [0,1,2]) + shell('apt-key del D50582E6', :acceptable_exit_codes => [0,1,2]) + apply_manifest(pp, :catch_failures => true) + end + + describe 'keys should exist' do + it 'finds puppetlabs key' do + shell('apt-key list | grep 4BD6EC30') + end + it 'finds jenkins key' do + shell('apt-key list | grep D50582E6') + end + end + end + context 'ensure' do + context 'absent' do + it 'should work with no errors' do + pp = <<-EOS + include '::apt' + apt::key { 'puppetlabs': + ensure => absent, + key => '4BD6EC30', + key_server => 'pgp.mit.edu', + } + + apt::key { 'jenkins': + ensure => absent, + key => 'D50582E6', + key_source => 'http://pkg.jenkins-ci.org/debian/jenkins-ci.org.key', + } + EOS + + apply_manifest(pp, :catch_failures => true) + end + + describe 'keys shouldnt exist' do + it 'fails' do + shell('apt-key list | grep 4BD6EC30', :acceptable_exit_codes => [1]) + end + it 'fails' do + shell('apt-key list | grep D50582E6', :acceptable_exit_codes => [1]) + end + end + end + end + + context 'reset' do + it 'clean up keys' do + shell('apt-key del 4BD6EC30', :acceptable_exit_codes => [0,1,2]) + shell('apt-key del D50582E6', :acceptable_exit_codes => [0,1,2]) + end + end + + context 'key options' do + context 'key_content' do + + it 'should work with no errors' do + pp = <<-EOS + include '::apt' + apt::key { 'puppetlabs': + key => '4BD6EC30', + key_content => '-----BEGIN PGP PUBLIC KEY BLOCK----- + Version: GnuPG v1.4.12 (GNU/Linux) + Comment: GPGTools - http://gpgtools.org + + mQINBEw3u0ABEAC1+aJQpU59fwZ4mxFjqNCgfZgDhONDSYQFMRnYC1dzBpJHzI6b + fUBQeaZ8rh6N4kZ+wq1eL86YDXkCt4sCvNTP0eF2XaOLbmxtV9bdpTIBep9bQiKg + 5iZaz+brUZlFk/MyJ0Yz//VQ68N1uvXccmD6uxQsVO+gx7rnarg/BGuCNaVtGwy+ + S98g8Begwxs9JmGa8pMCcSxtC7fAfAEZ02cYyrw5KfBvFI3cHDdBqrEJQKwKeLKY + GHK3+H1TM4ZMxPsLuR/XKCbvTyl+OCPxU2OxPjufAxLlr8BWUzgJv6ztPe9imqpH + Ppp3KuLFNorjPqWY5jSgKl94W/CO2x591e++a1PhwUn7iVUwVVe+mOEWnK5+Fd0v + VMQebYCXS+3dNf6gxSvhz8etpw20T9Ytg4EdhLvCJRV/pYlqhcq+E9le1jFOHOc0 + Nc5FQweUtHGaNVyn8S1hvnvWJBMxpXq+Bezfk3X8PhPT/l9O2lLFOOO08jo0OYiI + wrjhMQQOOSZOb3vBRvBZNnnxPrcdjUUm/9cVB8VcgI5KFhG7hmMCwH70tpUWcZCN + NlI1wj/PJ7Tlxjy44f1o4CQ5FxuozkiITJvh9CTg+k3wEmiaGz65w9jRl9ny2gEl + f4CR5+ba+w2dpuDeMwiHJIs5JsGyJjmA5/0xytB7QvgMs2q25vWhygsmUQARAQAB + tEdQdXBwZXQgTGFicyBSZWxlYXNlIEtleSAoUHVwcGV0IExhYnMgUmVsZWFzZSBL + ZXkpIDxpbmZvQHB1cHBldGxhYnMuY29tPokCPgQTAQIAKAUCTDe7QAIbAwUJA8Jn + AAYLCQgHAwIGFQgCCQoLBBYCAwECHgECF4AACgkQEFS3okvW7DAZaw//aLmE/eob + pXpIUVyCUWQxEvPtM/h/SAJsG3KoHN9u216ews+UHsL/7F91ceVXQQdD2e8CtYWF + eLNM0RSM9i/KM60g4CvIQlmNqdqhi1HsgGqInZ72/XLAXun0gabfC36rLww2kel+ + aMpRf58SrSuskY321NnMEJl4OsHV2hfNtAIgw2e/zm9RhoMpGKxoHZCvFhnP7u2M + 2wMq7iNDDWb6dVsLpzdlVf242zCbubPCxxQXOpA56rzkUPuJ85mdVw4i19oPIFIZ + VL5owit1SxCOxBg4b8oaMS36hEl3qtZG834rtLfcqAmqjhx6aJuJLOAYN84QjDEU + 3NI5IfNRMvluIeTcD4Dt5FCYahN045tW1Rc6s5GAR8RW45GYwQDzG+kkkeeGxwEh + qCW7nOHuwZIoVJufNhd28UFn83KGJHCQt4NBBr3K5TcY6bDQEIrpSplWSDBbd3p1 + IaoZY1WSDdP9OTVOSbsz0JiglWmUWGWCdd/CMSW/D7/3VUOJOYRDwptvtSYcjJc8 + 1UV+1zB+rt5La/OWe4UOORD+jU1ATijQEaFYxBbqBBkFboAEXq9btRQyegqk+eVp + HhzacP5NYFTMThvHuTapNytcCso5au/cMywqCgY1DfcMJyjocu4bCtrAd6w4kGKN + MUdwNDYQulHZDI+UjJInhramyngdzZLjdeGJARwEEAECAAYFAkw3wEYACgkQIVr+ + UOQUcDKvEwgAoBuOPnPioBwYp8oHVPTo/69cJn1225kfraUYGebCcrRwuoKd8Iyh + R165nXYJmD8yrAFBk8ScUVKsQ/pSnqNrBCrlzQD6NQvuIWVFegIdjdasrWX6Szj+ + N1OllbzIJbkE5eo0WjCMEKJVI/GTY2AnTWUAm36PLQC5HnSATykqwxeZDsJ/s8Rc + kd7+QN5sBVytG3qb45Q7jLJpLcJO6KYH4rz9ZgN7LzyyGbu9DypPrulADG9OrL7e + lUnsGDG4E1M8Pkgk9Xv9MRKao1KjYLD5zxOoVtdeoKEQdnM+lWMJin1XvoqJY7FT + DJk6o+cVqqHkdKL+sgsscFVQljgCEd0EgIkCHAQQAQgABgUCTPlA6QAKCRBcE9bb + kwUuAxdYD/40FxAeNCYByxkr/XRT0gFT+NCjPuqPWCM5tf2NIhSapXtb2+32WbAf + DzVfqWjC0G0RnQBve+vcjpY4/rJu4VKIDGIT8CtnKOIyEcXTNFOehi65xO4ypaei + BPSb3ip3P0of1iZZDQrNHMW5VcyL1c+PWT/6exXSGsePtO/89tc6mupqZtC05f5Z + XG4jswMF0U6Q5s3S0tG7Y+oQhKNFJS4sH4rHe1o5CxKwNRSzqccA0hptKy3MHUZ2 + +zeHzuRdRWGjb2rUiVxnIvPPBGxF2JHhB4ERhGgbTxRZ6wZbdW06BOE8r7pGrUpU + fCw/WRT3gGXJHpGPOzFAvr3Xl7VcDUKTVmIajnpd3SoyD1t2XsvJlSQBOWbViucH + dvE4SIKQ77vBLRlZIoXXVb6Wu7Vq+eQs1ybjwGOhnnKjz8llXcMnLzzN86STpjN4 + qGTXQy/E9+dyUP1sXn3RRwb+ZkdI77m1YY95QRNgG/hqh77IuWWg1MtTSgQnP+F2 + 7mfo0/522hObhdAe73VO3ttEPiriWy7tw3bS9daP2TAVbYyFqkvptkBb1OXRUSzq + UuWjBmZ35UlXjKQsGeUHlOiEh84aondF90A7gx0X/ktNIPRrfCGkHJcDu+HVnR7x + Kk+F0qb9+/pGLiT3rqeQTr8fYsb4xLHT7uEg1gVFB1g0kd+RQHzV74kCPgQTAQIA + KAIbAwYLCQgHAwIGFQgCCQoLBBYCAwECHgECF4AFAk/x5PoFCQtIMjoACgkQEFS3 + okvW7DAIKQ/9HvZyf+LHVSkCk92Kb6gckniin3+5ooz67hSr8miGBfK4eocqQ0H7 + bdtWjAILzR/IBY0xj6OHKhYP2k8TLc7QhQjt0dRpNkX+Iton2AZryV7vUADreYz4 + 4B0bPmhiE+LL46ET5IThLKu/KfihzkEEBa9/t178+dO9zCM2xsXaiDhMOxVE32gX + vSZKP3hmvnK/FdylUY3nWtPedr+lHpBLoHGaPH7cjI+MEEugU3oAJ0jpq3V8n4w0 + jIq2V77wfmbD9byIV7dXcxApzciK+ekwpQNQMSaceuxLlTZKcdSqo0/qmS2A863Y + ZQ0ZBe+Xyf5OI33+y+Mry+vl6Lre2VfPm3udgR10E4tWXJ9Q2CmG+zNPWt73U1FD + 7xBI7PPvOlyzCX4QJhy2Fn/fvzaNjHp4/FSiCw0HvX01epcersyun3xxPkRIjwwR + M9m5MJ0o4hhPfa97zibXSh8XXBnosBQxeg6nEnb26eorVQbqGx0ruu/W2m5/JpUf + REsFmNOBUbi8xlKNS5CZypH3Zh88EZiTFolOMEh+hT6s0l6znBAGGZ4m/Unacm5y + DHmg7unCk4JyVopQ2KHMoqG886elu+rm0ASkhyqBAk9sWKptMl3NHiYTRE/m9VAk + ugVIB2pi+8u84f+an4Hml4xlyijgYu05pqNvnLRyJDLd61hviLC8GYU= + =a34C + -----END PGP PUBLIC KEY BLOCK----- + ', + } + EOS + + shell('apt-key del 4BD6EC30', :acceptable_exit_codes => [0,1,2]) + apply_manifest(pp, :catch_failures => true) + end + end + describe 'keys should exist' do + it 'finds puppetlabs key' do + shell('apt-key list | grep 4BD6EC30') + end + end + + context 'key_source' do + + it 'should work with no errors' do + pp = <<-EOS + include '::apt' + apt::key { 'puppetlabs': + key => '4BD6EC30', + key_source => 'http://apt.puppetlabs.com/pubkey.gpg', + } + EOS + + shell('apt-key del 4BD6EC30', :acceptable_exit_codes => [0,1,2]) + apply_manifest(pp, :catch_failures => true) + end + + describe 'keys should exist' do + it 'finds puppetlabs key' do + shell('apt-key list | grep 4BD6EC30') + end + end + end + + context 'key_options' do + + it 'should work with no errors' do + pp = <<-EOS + include '::apt' + apt::key { 'puppetlabs': + key => '4BD6EC30', + key_source => 'http://apt.puppetlabs.com/pubkey.gpg', + key_options => 'debug' + } + EOS + + shell('apt-key del 4BD6EC30', :acceptable_exit_codes => [0,1,2]) + apply_manifest(pp, :catch_failures => true) + end + + describe 'keys should exist' do + it 'finds puppetlabs key' do + shell('apt-key list | grep 4BD6EC30') + end + end + end + end + +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apt/spec/acceptance/apt_ppa_spec.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apt/spec/acceptance/apt_ppa_spec.rb new file mode 100644 index 00000000000..c11da9123be --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apt/spec/acceptance/apt_ppa_spec.rb @@ -0,0 +1,98 @@ +require 'spec_helper_acceptance' + +if fact('operatingsystem') == 'Ubuntu' + describe 'apt::ppa', :unless => UNSUPPORTED_PLATFORMS.include?(fact('osfamily')) do + + context 'reset' do + it 'removes ppa' do + shell('rm /etc/apt/sources.list.d/canonical-kernel-team-ppa-*', :acceptable_exit_codes => [0,1,2]) + shell('rm /etc/apt/sources.list.d/raravena80-collectd5-*', :acceptable_exit_codes => [0,1,2]) + end + end + + context 'adding a ppa that doesnt exist' do + it 'should work with no errors' do + pp = <<-EOS + include '::apt' + apt::ppa { 'ppa:canonical-kernel-team/ppa': } + EOS + + apply_manifest(pp, :catch_failures => true) + end + + describe 'contains the source file' do + it 'contains a kernel ppa source' do + shell('ls /etc/apt/sources.list.d/canonical-kernel-team-ppa-*', :acceptable_exit_codes => [0]) + end + end + end + + context 'reading a removed ppa.' do + it 'setup' do + # This leaves a blank file + shell('echo > /etc/apt/sources.list.d/raravena80-collectd5-$(lsb_release -c -s).list') + end + + it 'should read it successfully' do + pp = <<-EOS + include '::apt' + apt::ppa { 'ppa:raravena80/collectd5': } + EOS + + apply_manifest(pp, :catch_failures => true) + end + end + + context 'reset' do + it 'removes added ppas' do + shell('rm /etc/apt/sources.list.d/canonical-kernel-team-ppa-*') + shell('rm /etc/apt/sources.list.d/raravena80-collectd5-*') + end + end + + context 'release' do + context 'precise' do + it 'works without failure' do + pp = <<-EOS + include '::apt' + apt::ppa { 'ppa:canonical-kernel-team/ppa': + release => precise, + } + EOS + + shell('rm -rf /etc/apt/sources.list.d/canonical-kernel-team-ppa*', :acceptable_exit_codes => [0,1,2]) + apply_manifest(pp, :catch_failures => true) + end + + describe file('/etc/apt/sources.list.d/canonical-kernel-team-ppa-precise.list') do + it { should be_file } + end + end + end + + context 'options' do + context '-y', :unless => default[:platform].match(/10\.04/) do + it 'works without failure' do + pp = <<-EOS + include '::apt' + apt::ppa { 'ppa:canonical-kernel-team/ppa': + release => precise, + options => '-y', + } + EOS + + shell('rm -rf /etc/apt/sources.list.d/canonical-kernel-team-ppa*', :acceptable_exit_codes => [0,1,2]) + apply_manifest(pp, :catch_failures => true) + end + + describe file('/etc/apt/sources.list.d/canonical-kernel-team-ppa-precise.list') do + it { should be_file } + end + end + end + + context 'reset' do + it { shell('rm -rf /etc/apt/sources.list.d/canonical-kernel-team-ppa*', :acceptable_exit_codes => [0,1,2]) } + end + end +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apt/spec/acceptance/apt_source_spec.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apt/spec/acceptance/apt_source_spec.rb new file mode 100644 index 00000000000..c2d076cbff4 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apt/spec/acceptance/apt_source_spec.rb @@ -0,0 +1,326 @@ +require 'spec_helper_acceptance' + +describe 'apt::source', :unless => UNSUPPORTED_PLATFORMS.include?(fact('osfamily')) do + + context 'apt::source' do + context 'ensure => present' do + it 'should work with no errors' do + pp = <<-EOS + include '::apt' + apt::source { 'puppetlabs': + ensure => present, + location => 'http://apt.puppetlabs.com', + repos => 'main', + key => '4BD6EC30', + key_server => 'pgp.mit.edu', + } + EOS + + shell('apt-key del 4BD6EC30', :acceptable_exit_codes => [0,1,2]) + shell('rm /etc/apt/sources.list.d/puppetlabs.list', :acceptable_exit_codes => [0,1,2]) + apply_manifest(pp, :catch_failures => true) + end + + describe 'key should exist' do + it 'finds puppetlabs key' do + shell('apt-key list | grep 4BD6EC30', :acceptable_exit_codes => [0]) + end + end + + describe file('/etc/apt/sources.list.d/puppetlabs.list') do + it { should be_file } + end + end + + context 'ensure => absent' do + it 'should work with no errors' do + pp = <<-EOS + include '::apt' + apt::source { 'puppetlabs': + ensure => absent, + location => 'http://apt.puppetlabs.com', + repos => 'main', + key => '4BD6EC30', + key_server => 'pgp.mit.edu', + } + EOS + + apply_manifest(pp, :catch_failures => true) + end + + # The key should remain -we don't delete those when deleting a source. + describe 'key should exist' do + it 'finds puppetlabs key' do + shell('apt-key list | grep 4BD6EC30', :acceptable_exit_codes => [0]) + end + end + describe file('/etc/apt/sources.list.d/puppetlabs.list') do + it { should_not be_file } + end + end + + end + + context 'release' do + context 'test' do + it 'should work with no errors' do + pp = <<-EOS + include '::apt' + apt::source { 'puppetlabs': + ensure => present, + location => 'http://apt.puppetlabs.com', + repos => 'main', + key => '4BD6EC30', + key_server => 'pgp.mit.edu', + release => 'precise', + } + EOS + + apply_manifest(pp, :catch_failures => true) + end + + describe file('/etc/apt/sources.list.d/puppetlabs.list') do + it { should be_file } + it { should contain 'deb http://apt.puppetlabs.com precise main' } + end + end + end + + context 'include_src' do + context 'true' do + it 'should work with no errors' do + pp = <<-EOS + include '::apt' + apt::source { 'puppetlabs': + ensure => present, + location => 'http://apt.puppetlabs.com', + repos => 'main', + key => '4BD6EC30', + key_server => 'pgp.mit.edu', + include_src => true, + } + EOS + + apply_manifest(pp, :catch_failures => true) + end + + describe file('/etc/apt/sources.list.d/puppetlabs.list') do + it { should be_file } + it { should contain 'deb-src http://apt.puppetlabs.com' } + end + end + + context 'false' do + it 'should work with no errors' do + pp = <<-EOS + include '::apt' + apt::source { 'puppetlabs': + ensure => present, + location => 'http://apt.puppetlabs.com', + repos => 'main', + key => '4BD6EC30', + key_server => 'pgp.mit.edu', + include_src => false, + } + EOS + + apply_manifest(pp, :catch_failures => true) + end + + describe file('/etc/apt/sources.list.d/puppetlabs.list') do + it { should be_file } + it { should_not contain 'deb-src http://apt.puppetlabs.com' } + end + end + end + + context 'required_packages' do + context 'vim' do + it 'should work with no errors' do + pp = <<-EOS + include '::apt' + apt::source { 'puppetlabs': + ensure => present, + location => 'http://apt.puppetlabs.com', + repos => 'main', + key => '4BD6EC30', + key_server => 'pgp.mit.edu', + required_packages => 'vim', + } + EOS + + shell('apt-get -y remove vim') + apply_manifest(pp, :catch_failures => true) + end + + describe package('vim') do + it { should be_installed } + end + end + end + + context 'key content' do + context 'giant key' do + it 'should work with no errors' do + pp = <<-EOS + include '::apt' + apt::source { 'puppetlabs': + ensure => present, + location => 'http://apt.puppetlabs.com', + repos => 'main', + key => '4BD6EC30', + key_content => '-----BEGIN PGP PUBLIC KEY BLOCK----- + Version: GnuPG v1.4.12 (GNU/Linux) + Comment: GPGTools - http://gpgtools.org + + mQINBEw3u0ABEAC1+aJQpU59fwZ4mxFjqNCgfZgDhONDSYQFMRnYC1dzBpJHzI6b + fUBQeaZ8rh6N4kZ+wq1eL86YDXkCt4sCvNTP0eF2XaOLbmxtV9bdpTIBep9bQiKg + 5iZaz+brUZlFk/MyJ0Yz//VQ68N1uvXccmD6uxQsVO+gx7rnarg/BGuCNaVtGwy+ + S98g8Begwxs9JmGa8pMCcSxtC7fAfAEZ02cYyrw5KfBvFI3cHDdBqrEJQKwKeLKY + GHK3+H1TM4ZMxPsLuR/XKCbvTyl+OCPxU2OxPjufAxLlr8BWUzgJv6ztPe9imqpH + Ppp3KuLFNorjPqWY5jSgKl94W/CO2x591e++a1PhwUn7iVUwVVe+mOEWnK5+Fd0v + VMQebYCXS+3dNf6gxSvhz8etpw20T9Ytg4EdhLvCJRV/pYlqhcq+E9le1jFOHOc0 + Nc5FQweUtHGaNVyn8S1hvnvWJBMxpXq+Bezfk3X8PhPT/l9O2lLFOOO08jo0OYiI + wrjhMQQOOSZOb3vBRvBZNnnxPrcdjUUm/9cVB8VcgI5KFhG7hmMCwH70tpUWcZCN + NlI1wj/PJ7Tlxjy44f1o4CQ5FxuozkiITJvh9CTg+k3wEmiaGz65w9jRl9ny2gEl + f4CR5+ba+w2dpuDeMwiHJIs5JsGyJjmA5/0xytB7QvgMs2q25vWhygsmUQARAQAB + tEdQdXBwZXQgTGFicyBSZWxlYXNlIEtleSAoUHVwcGV0IExhYnMgUmVsZWFzZSBL + ZXkpIDxpbmZvQHB1cHBldGxhYnMuY29tPokCPgQTAQIAKAUCTDe7QAIbAwUJA8Jn + AAYLCQgHAwIGFQgCCQoLBBYCAwECHgECF4AACgkQEFS3okvW7DAZaw//aLmE/eob + pXpIUVyCUWQxEvPtM/h/SAJsG3KoHN9u216ews+UHsL/7F91ceVXQQdD2e8CtYWF + eLNM0RSM9i/KM60g4CvIQlmNqdqhi1HsgGqInZ72/XLAXun0gabfC36rLww2kel+ + aMpRf58SrSuskY321NnMEJl4OsHV2hfNtAIgw2e/zm9RhoMpGKxoHZCvFhnP7u2M + 2wMq7iNDDWb6dVsLpzdlVf242zCbubPCxxQXOpA56rzkUPuJ85mdVw4i19oPIFIZ + VL5owit1SxCOxBg4b8oaMS36hEl3qtZG834rtLfcqAmqjhx6aJuJLOAYN84QjDEU + 3NI5IfNRMvluIeTcD4Dt5FCYahN045tW1Rc6s5GAR8RW45GYwQDzG+kkkeeGxwEh + qCW7nOHuwZIoVJufNhd28UFn83KGJHCQt4NBBr3K5TcY6bDQEIrpSplWSDBbd3p1 + IaoZY1WSDdP9OTVOSbsz0JiglWmUWGWCdd/CMSW/D7/3VUOJOYRDwptvtSYcjJc8 + 1UV+1zB+rt5La/OWe4UOORD+jU1ATijQEaFYxBbqBBkFboAEXq9btRQyegqk+eVp + HhzacP5NYFTMThvHuTapNytcCso5au/cMywqCgY1DfcMJyjocu4bCtrAd6w4kGKN + MUdwNDYQulHZDI+UjJInhramyngdzZLjdeGJARwEEAECAAYFAkw3wEYACgkQIVr+ + UOQUcDKvEwgAoBuOPnPioBwYp8oHVPTo/69cJn1225kfraUYGebCcrRwuoKd8Iyh + R165nXYJmD8yrAFBk8ScUVKsQ/pSnqNrBCrlzQD6NQvuIWVFegIdjdasrWX6Szj+ + N1OllbzIJbkE5eo0WjCMEKJVI/GTY2AnTWUAm36PLQC5HnSATykqwxeZDsJ/s8Rc + kd7+QN5sBVytG3qb45Q7jLJpLcJO6KYH4rz9ZgN7LzyyGbu9DypPrulADG9OrL7e + lUnsGDG4E1M8Pkgk9Xv9MRKao1KjYLD5zxOoVtdeoKEQdnM+lWMJin1XvoqJY7FT + DJk6o+cVqqHkdKL+sgsscFVQljgCEd0EgIkCHAQQAQgABgUCTPlA6QAKCRBcE9bb + kwUuAxdYD/40FxAeNCYByxkr/XRT0gFT+NCjPuqPWCM5tf2NIhSapXtb2+32WbAf + DzVfqWjC0G0RnQBve+vcjpY4/rJu4VKIDGIT8CtnKOIyEcXTNFOehi65xO4ypaei + BPSb3ip3P0of1iZZDQrNHMW5VcyL1c+PWT/6exXSGsePtO/89tc6mupqZtC05f5Z + XG4jswMF0U6Q5s3S0tG7Y+oQhKNFJS4sH4rHe1o5CxKwNRSzqccA0hptKy3MHUZ2 + +zeHzuRdRWGjb2rUiVxnIvPPBGxF2JHhB4ERhGgbTxRZ6wZbdW06BOE8r7pGrUpU + fCw/WRT3gGXJHpGPOzFAvr3Xl7VcDUKTVmIajnpd3SoyD1t2XsvJlSQBOWbViucH + dvE4SIKQ77vBLRlZIoXXVb6Wu7Vq+eQs1ybjwGOhnnKjz8llXcMnLzzN86STpjN4 + qGTXQy/E9+dyUP1sXn3RRwb+ZkdI77m1YY95QRNgG/hqh77IuWWg1MtTSgQnP+F2 + 7mfo0/522hObhdAe73VO3ttEPiriWy7tw3bS9daP2TAVbYyFqkvptkBb1OXRUSzq + UuWjBmZ35UlXjKQsGeUHlOiEh84aondF90A7gx0X/ktNIPRrfCGkHJcDu+HVnR7x + Kk+F0qb9+/pGLiT3rqeQTr8fYsb4xLHT7uEg1gVFB1g0kd+RQHzV74kCPgQTAQIA + KAIbAwYLCQgHAwIGFQgCCQoLBBYCAwECHgECF4AFAk/x5PoFCQtIMjoACgkQEFS3 + okvW7DAIKQ/9HvZyf+LHVSkCk92Kb6gckniin3+5ooz67hSr8miGBfK4eocqQ0H7 + bdtWjAILzR/IBY0xj6OHKhYP2k8TLc7QhQjt0dRpNkX+Iton2AZryV7vUADreYz4 + 4B0bPmhiE+LL46ET5IThLKu/KfihzkEEBa9/t178+dO9zCM2xsXaiDhMOxVE32gX + vSZKP3hmvnK/FdylUY3nWtPedr+lHpBLoHGaPH7cjI+MEEugU3oAJ0jpq3V8n4w0 + jIq2V77wfmbD9byIV7dXcxApzciK+ekwpQNQMSaceuxLlTZKcdSqo0/qmS2A863Y + ZQ0ZBe+Xyf5OI33+y+Mry+vl6Lre2VfPm3udgR10E4tWXJ9Q2CmG+zNPWt73U1FD + 7xBI7PPvOlyzCX4QJhy2Fn/fvzaNjHp4/FSiCw0HvX01epcersyun3xxPkRIjwwR + M9m5MJ0o4hhPfa97zibXSh8XXBnosBQxeg6nEnb26eorVQbqGx0ruu/W2m5/JpUf + REsFmNOBUbi8xlKNS5CZypH3Zh88EZiTFolOMEh+hT6s0l6znBAGGZ4m/Unacm5y + DHmg7unCk4JyVopQ2KHMoqG886elu+rm0ASkhyqBAk9sWKptMl3NHiYTRE/m9VAk + ugVIB2pi+8u84f+an4Hml4xlyijgYu05pqNvnLRyJDLd61hviLC8GYU= + =a34C + -----END PGP PUBLIC KEY BLOCK-----', + } + EOS + + shell('apt-key del 4BD6EC30', :acceptable_exit_codes => [0,1,2]) + apply_manifest(pp, :catch_failures => true) + end + + describe file('/etc/apt/sources.list.d/puppetlabs.list') do + it { should be_file } + end + describe 'keys should exist' do + it 'finds puppetlabs key' do + shell('apt-key list | grep 4BD6EC30') + end + end + end + end + + context 'key_source' do + context 'http://apt.puppetlabs.com/pubkey.gpg' do + it 'should work with no errors' do + pp = <<-EOS + include '::apt' + apt::source { 'puppetlabs': + ensure => present, + location => 'http://apt.puppetlabs.com', + release => 'precise', + repos => 'main', + key => '4BD6EC30', + key_source => 'http://apt.puppetlabs.com/pubkey.gpg', + } + EOS + + shell('apt-key del 4BD6EC30', :acceptable_exit_codes => [0,1,2]) + apply_manifest(pp, :catch_failures => true) + end + + describe file('/etc/apt/sources.list.d/puppetlabs.list') do + it { should be_file } + it { should contain 'deb http://apt.puppetlabs.com precise main' } + end + describe 'keys should exist' do + it 'finds puppetlabs key' do + shell('apt-key list | grep 4BD6EC30') + end + end + end + end + + context 'pin' do + context 'false' do + it 'should work with no errors' do + pp = <<-EOS + include '::apt' + apt::source { 'puppetlabs': + ensure => present, + location => 'http://apt.puppetlabs.com', + repos => 'main', + key => '4BD6EC30', + key_server => 'pgp.mit.edu', + pin => false, + } + EOS + + apply_manifest(pp, :catch_failures => true) + end + + describe file('/etc/apt/preferences.d/puppetlabs.pref') do + it { should_not be_file } + end + end + context 'true' do + it 'should work with no errors' do + pp = <<-EOS + include '::apt' + apt::source { 'puppetlabs': + ensure => present, + location => 'http://apt.puppetlabs.com', + repos => 'main', + key => '4BD6EC30', + key_server => 'pgp.mit.edu', + pin => true, + } + EOS + + apply_manifest(pp, :catch_failures => true) + end + + describe file('/etc/apt/preferences.d/puppetlabs.pref') do + it { should be_file } + end + end + end + +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apt/spec/acceptance/apt_spec.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apt/spec/acceptance/apt_spec.rb new file mode 100644 index 00000000000..775139145ec --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apt/spec/acceptance/apt_spec.rb @@ -0,0 +1,233 @@ +require 'spec_helper_acceptance' + +describe 'apt class', :unless => UNSUPPORTED_PLATFORMS.include?(fact('osfamily')) do + + context 'reset' do + it 'fixes the sources.list' do + shell('cp /etc/apt/sources.list /tmp') + end + end + + context 'always_apt_update => true' do + it 'should work with no errors' do + pp = <<-EOS + class { 'apt': always_apt_update => true } + EOS + + apply_manifest(pp, :catch_failures => true) do |r| + expect(r.stdout).to match(/apt_update/) + end + end + end + context 'always_apt_update => false' do + it 'should work with no errors' do + pp = <<-EOS + class { 'apt': always_apt_update => false } + EOS + + apply_manifest(pp, :catch_failures => true) do |r| + expect(r.stdout).to_not match(/apt_update/) + end + end + end + + # disable_keys drops in a 99unauth file to ignore keys in + # other files. + context 'disable_keys => true' do + it 'should work with no errors' do + pp = <<-EOS + class { 'apt': disable_keys => true } + EOS + + apply_manifest(pp, :catch_failures => true) + end + + describe file('/etc/apt/apt.conf.d/99unauth') do + it { should be_file } + it { should contain 'APT::Get::AllowUnauthenticated 1;' } + end + end + context 'disable_keys => false' do + it 'should work with no errors' do + pp = <<-EOS + class { 'apt': disable_keys => false } + EOS + + apply_manifest(pp, :catch_failures => true) + end + + describe file('/etc/apt/apt.conf.d/99unauth') do + it { should_not be_file } + end + end + + # proxy_host sets the proxy to use for transfers. + # proxy_port sets the proxy port to use. + context 'proxy settings' do + it 'should work with no errors' do + pp = <<-EOS + class { 'apt': + proxy_host => 'localhost', + proxy_port => '7042', + } + EOS + + apply_manifest(pp, :catch_failures => true) + end + + describe file('/etc/apt/apt.conf.d/proxy') do + it { should be_file } + it { should contain 'Acquire::http::Proxy "http://localhost:7042\";' } + end + end + + context 'purge_sources' do + it 'creates a fake apt file' do + shell('touch /etc/apt/sources.list.d/fake.list') + shell('echo "deb fake" >> /etc/apt/sources.list') + end + it 'purge_sources_list and purge_sources_list_d => true' do + pp = <<-EOS + class { 'apt': + purge_sources_list => true, + purge_sources_list_d => true, + } + EOS + + apply_manifest(pp, :catch_failures => true) + end + + describe file('/etc/apt/sources.list') do + it { should_not contain 'deb fake' } + end + + describe file('/etc/apt/sources.list.d/fake.list') do + it { should_not be_file } + end + end + context 'proxy settings' do + it 'should work with no errors' do + pp = <<-EOS + class { 'apt': + proxy_host => 'localhost', + proxy_port => '7042', + } + EOS + + apply_manifest(pp, :catch_failures => true) + end + + describe file('/etc/apt/apt.conf.d/proxy') do + it { should be_file } + it { should contain 'Acquire::http::Proxy "http://localhost:7042\";' } + end + end + + context 'purge_sources' do + context 'false' do + it 'creates a fake apt file' do + shell('touch /etc/apt/sources.list.d/fake.list') + shell('echo "deb fake" >> /etc/apt/sources.list') + end + it 'purge_sources_list and purge_sources_list_d => false' do + pp = <<-EOS + class { 'apt': + purge_sources_list => false, + purge_sources_list_d => false, + } + EOS + + apply_manifest(pp, :catch_failures => false) + end + + describe file('/etc/apt/sources.list') do + it { should contain 'deb fake' } + end + + describe file('/etc/apt/sources.list.d/fake.list') do + it { should be_file } + end + end + + context 'true' do + it 'creates a fake apt file' do + shell('touch /etc/apt/sources.list.d/fake.list') + shell('echo "deb fake" >> /etc/apt/sources.list') + end + it 'purge_sources_list and purge_sources_list_d => true' do + pp = <<-EOS + class { 'apt': + purge_sources_list => true, + purge_sources_list_d => true, + } + EOS + + apply_manifest(pp, :catch_failures => true) + end + + describe file('/etc/apt/sources.list') do + it { should_not contain 'deb fake' } + end + + describe file('/etc/apt/sources.list.d/fake.list') do + it { should_not be_file } + end + end + end + + context 'purge_preferences_d' do + context 'false' do + it 'creates a preferences file' do + shell('touch /etc/apt/preferences.d/test') + end + + it 'should work with no errors' do + pp = <<-EOS + class { 'apt': purge_preferences_d => false } + EOS + + apply_manifest(pp, :catch_failures => true) + end + + describe file('/etc/apt/preferences.d/test') do + it { should be_file } + end + end + context 'true' do + it 'creates a preferences file' do + shell('touch /etc/apt/preferences.d/test') + end + + it 'should work with no errors' do + pp = <<-EOS + class { 'apt': purge_preferences_d => true } + EOS + + apply_manifest(pp, :catch_failures => true) + end + + describe file('/etc/apt/preferences.d/test') do + it { should_not be_file } + end + end + end + + context 'update_timeout' do + context '5000' do + it 'should work with no errors' do + pp = <<-EOS + class { 'apt': update_timeout => '5000' } + EOS + + apply_manifest(pp, :catch_failures => true) + end + end + end + + context 'reset' do + it 'fixes the sources.list' do + shell('cp /tmp/sources.list /etc/apt') + end + end + +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apt/spec/acceptance/backports_spec.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apt/spec/acceptance/backports_spec.rb new file mode 100644 index 00000000000..6d3f7f0e687 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apt/spec/acceptance/backports_spec.rb @@ -0,0 +1,59 @@ +require 'spec_helper_acceptance' + +codename = fact('lsbdistcodename') +case fact('operatingsystem') +when 'Ubuntu' + repos = 'main universe multiverse restricted' +when 'Debian' + repos = 'main contrib non-free' +end + +describe 'apt::backports class', :unless => UNSUPPORTED_PLATFORMS.include?(fact('osfamily')) do + context 'defaults' do + it 'should work with no errors' do + pp = <<-EOS + class { 'apt::backports': } + EOS + + apply_manifest(pp, :catch_failures => true) + end + end + + context 'release' do + it 'should work with no errors' do + pp = <<-EOS + class { 'apt::backports': release => '#{codename}' } + EOS + + apply_manifest(pp, :catch_failures => true) + end + + describe file('/etc/apt/sources.list.d/backports.list') do + it { should be_file } + it { should contain "#{codename}-backports #{repos}" } + end + end + + context 'location' do + it 'should work with no errors' do + pp = <<-EOS + class { 'apt::backports': release => 'precise', location => 'http://localhost/ubuntu' } + EOS + + apply_manifest(pp, :catch_failures => true) + end + + describe file('/etc/apt/sources.list.d/backports.list') do + it { should be_file } + it { should contain "deb http://localhost/ubuntu precise-backports #{repos}" } + end + end + + context 'reset' do + it 'deletes backport files' do + shell('rm -rf /etc/apt/sources.list.d/backports.list') + shell('rm -rf /etc/apt/preferences.d/backports.pref') + end + end + +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apt/spec/acceptance/class_spec.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apt/spec/acceptance/class_spec.rb new file mode 100644 index 00000000000..e5994498b90 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apt/spec/acceptance/class_spec.rb @@ -0,0 +1,17 @@ +require 'spec_helper_acceptance' + +describe 'apt class', :unless => UNSUPPORTED_PLATFORMS.include?(fact('osfamily')) do + + context 'default parameters' do + # Using puppet_apply as a helper + it 'should work with no errors' do + pp = <<-EOS + class { 'apt': } + EOS + + # Run it twice and test for idempotency + apply_manifest(pp, :catch_failures => true) + apply_manifest(pp, :catch_failures => true) + end + end +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apt/spec/acceptance/conf_spec.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apt/spec/acceptance/conf_spec.rb new file mode 100644 index 00000000000..8a8ed63db4d --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apt/spec/acceptance/conf_spec.rb @@ -0,0 +1,66 @@ +require 'spec_helper_acceptance' + +describe 'apt::conf define', :unless => UNSUPPORTED_PLATFORMS.include?(fact('osfamily')) do + context 'defaults' do + it 'should work with no errors' do + pp = <<-EOS + apt::conf { 'test': + content => 'test', + } + EOS + + apply_manifest(pp, :catch_failures => true) + end + + describe file('/etc/apt/apt.conf.d/50test') do + it { should be_file } + it { should contain 'test' } + end + end + + context 'ensure' do + context 'absent' do + it 'should work with no errors' do + pp = <<-EOS + apt::conf { 'test': + ensure => absent, + content => 'test', + } + EOS + + apply_manifest(pp, :catch_failures => true) + end + + describe file('/etc/apt/apt.conf.d/50test') do + it { should_not be_file } + end + end + end + + context 'priority' do + context '99' do + it 'should work with no errors' do + pp = <<-EOS + apt::conf { 'test': + ensure => present, + content => 'test', + priority => '99', + } + EOS + + apply_manifest(pp, :catch_failures => true) + end + + describe file('/etc/apt/apt.conf.d/99test') do + it { should be_file } + it { should contain 'test' } + end + end + end + + context 'cleanup' do + it 'deletes 99test' do + shell ('rm -rf /etc/apt/apt.conf.d/99test') + end + end +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apt/spec/acceptance/force_spec.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apt/spec/acceptance/force_spec.rb new file mode 100644 index 00000000000..00572eae37d --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apt/spec/acceptance/force_spec.rb @@ -0,0 +1,76 @@ +require 'spec_helper_acceptance' + +codename = fact('lsbdistcodename') + +describe 'apt::force define', :unless => UNSUPPORTED_PLATFORMS.include?(fact('osfamily')) do + context 'defaults' do + it 'should work with no errors' do + pp = <<-EOS + include apt + apt::force { 'vim': release => false, } + EOS + + shell('apt-get remove -y vim') + apply_manifest(pp, :catch_failures => true) + end + + describe package('vim') do + it { should be_installed } + end + end + + context 'release' do + it 'should work with no errors' do + pp = <<-EOS + include apt + apt::force { 'vim': release => '#{codename}' } + EOS + + shell('apt-get remove -y vim') + apply_manifest(pp, :catch_failures => true) do |r| + expect(r.stdout).to match(/apt-get -y -t #{codename} install vim/) + end + end + + describe package('vim') do + it { should be_installed } + end + end + + context 'version' do + it 'should work with no errors' do + pp = <<-EOS + include apt + apt::force { 'vim': version => '1.1.1', release => false, } + EOS + + shell('apt-get remove -y vim') + apply_manifest(pp, :catch_failures => false) do |r| + expect(r.stdout).to match(/apt-get -y install vim=1.1.1/) + end + end + + describe package('vim') do + it { should_not be_installed } + end + end + + context 'timeout' do + it 'should work with no errors' do + pp = <<-EOS + include apt + apt::force { 'vim': release => false, timeout => '1' } + EOS + + shell('apt-get clean') + apply_manifest(pp, :expect_failures => true) do |r| + expect(r.stderr).to match(/Error: Command exceeded timeout/) + end + end + + describe package('vim') do + it { should_not be_installed } + end + end + +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apt/spec/acceptance/nodesets/debian-70rc1-x64.yml b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apt/spec/acceptance/nodesets/debian-70rc1-x64.yml new file mode 100644 index 00000000000..4b55677f4c6 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apt/spec/acceptance/nodesets/debian-70rc1-x64.yml @@ -0,0 +1,10 @@ +HOSTS: + debian-70rc1-x64: + roles: + - master + platform: debian-70rc1-x64 + box : debian-70rc1-x64-vbox4210-nocm + box_url : http://puppet-vagrant-boxes.puppetlabs.com/debian-70rc1-x64-vbox4210-nocm.box + hypervisor : vagrant +CONFIG: + type: foss diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apt/spec/acceptance/nodesets/default.yml b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apt/spec/acceptance/nodesets/default.yml new file mode 100644 index 00000000000..a5f38f784c8 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apt/spec/acceptance/nodesets/default.yml @@ -0,0 +1,10 @@ +HOSTS: + ubuntu-server-12042-x64: + roles: + - master + platform: ubuntu-server-12.04-amd64 + box : ubuntu-server-12042-x64-vbox4210-nocm + box_url : http://puppet-vagrant-boxes.puppetlabs.com/ubuntu-server-12042-x64-vbox4210-nocm.box + hypervisor : vagrant +CONFIG: + type: foss diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apt/spec/acceptance/nodesets/ubuntu-server-10044-x64.yml b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apt/spec/acceptance/nodesets/ubuntu-server-10044-x64.yml new file mode 100644 index 00000000000..c1b8bdf8fa9 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apt/spec/acceptance/nodesets/ubuntu-server-10044-x64.yml @@ -0,0 +1,11 @@ +HOSTS: + ubuntu-server-10044-x64: + roles: + - master + platform: ubuntu-10.04-amd64 + box : ubuntu-server-10044-x64-vbox4210-nocm + box_url : http://puppet-vagrant-boxes.puppetlabs.com/ubuntu-server-10044-x64-vbox4210-nocm.box + hypervisor : vagrant +CONFIG: + log_level: debug + type: git diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apt/spec/acceptance/nodesets/ubuntu-server-12042-x64.yml b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apt/spec/acceptance/nodesets/ubuntu-server-12042-x64.yml new file mode 100644 index 00000000000..a5f38f784c8 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apt/spec/acceptance/nodesets/ubuntu-server-12042-x64.yml @@ -0,0 +1,10 @@ +HOSTS: + ubuntu-server-12042-x64: + roles: + - master + platform: ubuntu-server-12.04-amd64 + box : ubuntu-server-12042-x64-vbox4210-nocm + box_url : http://puppet-vagrant-boxes.puppetlabs.com/ubuntu-server-12042-x64-vbox4210-nocm.box + hypervisor : vagrant +CONFIG: + type: foss diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apt/spec/acceptance/pin_spec.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apt/spec/acceptance/pin_spec.rb new file mode 100644 index 00000000000..6de11748d0e --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apt/spec/acceptance/pin_spec.rb @@ -0,0 +1,266 @@ +require 'spec_helper_acceptance' + +describe 'apt::pin define', :unless => UNSUPPORTED_PLATFORMS.include?(fact('osfamily')) do + context 'defaults' do + it 'should work with no errors' do + pp = <<-EOS + include apt + apt::pin { 'vim-puppet': } + EOS + + apply_manifest(pp, :catch_failures => true) + end + + describe file('/etc/apt/preferences.d/vim-puppet.pref') do + it { should be_file } + it { should contain 'Pin: release a=vim-puppet' } + end + end + + context 'ensure' do + context 'present' do + it 'should work with no errors' do + pp = <<-EOS + include apt + apt::pin { 'vim-puppet': ensure => present } + EOS + + apply_manifest(pp, :catch_failures => true) + end + + describe file('/etc/apt/preferences.d/vim-puppet.pref') do + it { should be_file } + it { should contain 'Pin: release a=vim-puppet' } + end + end + + context 'absent' do + it 'should work with no errors' do + pp = <<-EOS + include apt + apt::pin { 'vim-puppet': ensure => absent } + EOS + + apply_manifest(pp, :catch_failures => true) + end + + describe file('/etc/apt/preferences.d/vim-puppet.pref') do + it { should_not be_file } + end + end + end + + context 'order' do + context '99' do + it 'should work with no errors' do + pp = <<-EOS + include apt + apt::pin { 'vim-puppet': + ensure => present, + order => '99', + } + EOS + + apply_manifest(pp, :catch_failures => true) + end + + describe file('/etc/apt/preferences.d/99-vim-puppet.pref') do + it { should be_file } + it { should contain 'Pin: release a=vim-puppet' } + end + end + end + + context 'packages' do + context 'test' do + it 'should work with no errors' do + pp = <<-EOS + include apt + apt::pin { 'vim-puppet': + ensure => present, + packages => 'test', + } + EOS + + apply_manifest(pp, :catch_failures => true) + end + + describe file('/etc/apt/preferences.d/vim-puppet.pref') do + it { should be_file } + it { should contain 'Package: test' } + it { should contain 'Pin: release a=vim-puppet' } + end + end + end + + context 'release' do + context 'testrelease' do + it 'should work with no errors' do + pp = <<-EOS + include apt + apt::pin { 'vim-puppet': + ensure => present, + release => 'testrelease', + } + EOS + + apply_manifest(pp, :catch_failures => true) + end + + describe file('/etc/apt/preferences.d/vim-puppet.pref') do + it { should be_file } + it { should contain 'Pin: release a=testrelease' } + end + end + end + + context 'origin' do + context 'testrelease' do + it 'should work with no errors' do + pp = <<-EOS + include apt + apt::pin { 'vim-puppet': + ensure => present, + origin => 'testrelease', + } + EOS + + apply_manifest(pp, :catch_failures => true) + end + + describe file('/etc/apt/preferences.d/vim-puppet.pref') do + it { should be_file } + it { should contain 'Pin: origin testrelease' } + end + end + end + + context 'version' do + context '1.0.0' do + it 'should work with no errors' do + pp = <<-EOS + include apt + apt::pin { 'vim-puppet': + ensure => present, + packages => 'test', + version => '1.0.0', + } + EOS + + apply_manifest(pp, :catch_failures => true) + end + + describe file('/etc/apt/preferences.d/vim-puppet.pref') do + it { should be_file } + it { should contain 'Package: test' } + it { should contain 'Pin: version 1.0.0' } + end + end + end + + context 'codename' do + context 'testname' do + it 'should work with no errors' do + pp = <<-EOS + include apt + apt::pin { 'vim-puppet': + ensure => present, + codename => 'testname', + } + EOS + + apply_manifest(pp, :catch_failures => true) + end + + describe file('/etc/apt/preferences.d/vim-puppet.pref') do + it { should be_file } + it { should contain 'Pin: release n=testname' } + end + end + end + + context 'release_version' do + context '1.1.1' do + it 'should work with no errors' do + pp = <<-EOS + include apt + apt::pin { 'vim-puppet': + ensure => present, + release_version => '1.1.1', + } + EOS + + apply_manifest(pp, :catch_failures => true) + end + + describe file('/etc/apt/preferences.d/vim-puppet.pref') do + it { should be_file } + it { should contain 'Pin: release v=1.1.1' } + end + end + end + + context 'component' do + context 'testcomponent' do + it 'should work with no errors' do + pp = <<-EOS + include apt + apt::pin { 'vim-puppet': + ensure => present, + component => 'testcomponent', + } + EOS + + apply_manifest(pp, :catch_failures => true) + end + + describe file('/etc/apt/preferences.d/vim-puppet.pref') do + it { should be_file } + it { should contain 'Pin: release c=testcomponent' } + end + end + end + + context 'originator' do + context 'testorigin' do + it 'should work with no errors' do + pp = <<-EOS + include apt + apt::pin { 'vim-puppet': + ensure => present, + originator => 'testorigin', + } + EOS + + apply_manifest(pp, :catch_failures => true) + end + + describe file('/etc/apt/preferences.d/vim-puppet.pref') do + it { should be_file } + it { should contain 'Pin: release o=testorigin' } + end + end + end + + context 'label' do + context 'testlabel' do + it 'should work with no errors' do + pp = <<-EOS + include apt + apt::pin { 'vim-puppet': + ensure => present, + label => 'testlabel', + } + EOS + + apply_manifest(pp, :catch_failures => true) + end + + describe file('/etc/apt/preferences.d/vim-puppet.pref') do + it { should be_file } + it { should contain 'Pin: release l=testlabel' } + end + end + end + +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apt/spec/acceptance/release_spec.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apt/spec/acceptance/release_spec.rb new file mode 100644 index 00000000000..e7467bf62de --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apt/spec/acceptance/release_spec.rb @@ -0,0 +1,26 @@ +require 'spec_helper_acceptance' + +describe 'apt::release class', :unless => UNSUPPORTED_PLATFORMS.include?(fact('osfamily')) do + context 'release_id' do + it 'should work with no errors' do + pp = <<-EOS + include apt + class { 'apt::release': release_id => 'precise', } + EOS + + apply_manifest(pp, :catch_failures => true) + end + + describe file('/etc/apt/apt.conf.d/01release') do + it { should be_file } + it { should contain 'APT::Default-Release "precise";' } + end + end + + context 'reset' do + it 'cleans up' do + shell('rm -rf /etc/apt/apt.conf.d/01release') + end + end + +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apt/spec/acceptance/unattended_upgrade_spec.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apt/spec/acceptance/unattended_upgrade_spec.rb new file mode 100644 index 00000000000..6a19f4e74e0 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apt/spec/acceptance/unattended_upgrade_spec.rb @@ -0,0 +1,562 @@ +require 'spec_helper_acceptance' + +describe 'apt::unattended_upgrades class', :unless => UNSUPPORTED_PLATFORMS.include?(fact('osfamily')) do + context 'defaults' do + it 'should work with no errors' do + pp = <<-EOS + include apt + include apt::unattended_upgrades + EOS + + # Attempted workaround for problems seen on debian with + # something holding the package database open. + #shell('killall -9 apt-get') + #shell('killall -9 dpkg') + apply_manifest(pp, :catch_failures => true) + end + + describe file('/etc/apt/apt.conf.d/10periodic') do + it { should be_file } + end + describe file('/etc/apt/apt.conf.d/50unattended-upgrades') do + it { should be_file } + end + end + + context 'origins' do + it 'should work with no errors' do + pp = <<-EOS + include apt + class { 'apt::unattended_upgrades': + origins => ['${distro_id}:${distro_codename}-test'], + } + EOS + + apply_manifest(pp, :catch_failures => true) + end + + describe file('/etc/apt/apt.conf.d/50unattended-upgrades') do + it { should be_file } + it { should contain '${distro_id}:${distro_codename}-test' } + end + end + + context 'blacklist' do + it 'should work with no errors' do + pp = <<-EOS + include apt + class { 'apt::unattended_upgrades': + blacklist => ['puppet'] + } + EOS + + apply_manifest(pp, :catch_failures => true) + end + + describe file('/etc/apt/apt.conf.d/50unattended-upgrades') do + it { should be_file } + it { should contain 'puppet' } + end + end + + context 'update' do + it 'should work with no errors' do + pp = <<-EOS + include apt + class { 'apt::unattended_upgrades': + update => '99' + } + EOS + + apply_manifest(pp, :catch_failures => true) + end + + describe file('/etc/apt/apt.conf.d/10periodic') do + it { should be_file } + it { should contain 'APT::Periodic::Update-Package-Lists "99";' } + end + end + + context 'download' do + it 'should work with no errors' do + pp = <<-EOS + include apt + class { 'apt::unattended_upgrades': + download => '99' + } + EOS + + apply_manifest(pp, :catch_failures => true) + end + + describe file('/etc/apt/apt.conf.d/10periodic') do + it { should be_file } + it { should contain 'APT::Periodic::Download-Upgradeable-Packages "99";' } + end + end + + context 'upgrade' do + it 'should work with no errors' do + pp = <<-EOS + include apt + class { 'apt::unattended_upgrades': + upgrade => '99' + } + EOS + + apply_manifest(pp, :catch_failures => true) + end + + describe file('/etc/apt/apt.conf.d/10periodic') do + it { should be_file } + it { should contain 'APT::Periodic::Unattended-Upgrade "99";' } + end + end + + context 'autoclean' do + it 'should work with no errors' do + pp = <<-EOS + include apt + class { 'apt::unattended_upgrades': + autoclean => '99' + } + EOS + + apply_manifest(pp, :catch_failures => true) + end + + describe file('/etc/apt/apt.conf.d/10periodic') do + it { should be_file } + it { should contain 'APT::Periodic::AutocleanInterval "99";' } + end + end + + context 'auto_fix' do + context 'true' do + it 'should work with no errors' do + pp = <<-EOS + include apt + class { 'apt::unattended_upgrades': + auto_fix => true + } + EOS + + apply_manifest(pp, :catch_failures => true) + end + + describe file('/etc/apt/apt.conf.d/50unattended-upgrades') do + it { should be_file } + it { should contain 'Unattended-Upgrade::AutoFixInterruptedDpkg "true";' } + end + end + + context 'false' do + it 'should work with no errors' do + pp = <<-EOS + include apt + class { 'apt::unattended_upgrades': + auto_fix => false + } + EOS + + apply_manifest(pp, :catch_failures => true) + end + + describe file('/etc/apt/apt.conf.d/50unattended-upgrades') do + it { should be_file } + it { should contain 'Unattended-Upgrade::AutoFixInterruptedDpkg "false";' } + end + end + end + + context 'minimal_steps' do + context 'true' do + it 'should work with no errors' do + pp = <<-EOS + include apt + class { 'apt::unattended_upgrades': + minimal_steps => true + } + EOS + + apply_manifest(pp, :catch_failures => true) + end + + describe file('/etc/apt/apt.conf.d/50unattended-upgrades') do + it { should be_file } + it { should contain 'Unattended-Upgrade::MinimalSteps "true";' } + end + end + + context 'false' do + it 'should work with no errors' do + pp = <<-EOS + include apt + class { 'apt::unattended_upgrades': + minimal_steps => false + } + EOS + + apply_manifest(pp, :catch_failures => true) + end + + describe file('/etc/apt/apt.conf.d/50unattended-upgrades') do + it { should be_file } + it { should contain 'Unattended-Upgrade::MinimalSteps "false";' } + end + end + end + + context 'install_on_shutdown' do + context 'true' do + it 'should work with no errors' do + pp = <<-EOS + include apt + class { 'apt::unattended_upgrades': + install_on_shutdown => true + } + EOS + + apply_manifest(pp, :catch_failures => true) + end + + describe file('/etc/apt/apt.conf.d/50unattended-upgrades') do + it { should be_file } + it { should contain 'Unattended-Upgrade::InstallOnShutdown "true";' } + end + end + + context 'false' do + it 'should work with no errors' do + pp = <<-EOS + include apt + class { 'apt::unattended_upgrades': + install_on_shutdown => false + } + EOS + + apply_manifest(pp, :catch_failures => true) + end + + describe file('/etc/apt/apt.conf.d/50unattended-upgrades') do + it { should be_file } + it { should contain 'Unattended-Upgrade::InstallOnShutdown "false";' } + end + end + end + + context 'mail_to' do + it 'should work with no errors' do + pp = <<-EOS + include apt + class { 'apt::unattended_upgrades': + mail_to => 'test@example.com' + } + EOS + + apply_manifest(pp, :catch_failures => true) + end + + describe file('/etc/apt/apt.conf.d/50unattended-upgrades') do + it { should be_file } + it { should contain 'Unattended-Upgrade::Mail "test@example.com";' } + end + end + + context 'mail_only_on_error' do + context 'true' do + it 'should work with no errors' do + pp = <<-EOS + include apt + class { 'apt::unattended_upgrades': + mail_to => 'test@example.com', + mail_only_on_error => true + } + EOS + + apply_manifest(pp, :catch_failures => true) + end + + describe file('/etc/apt/apt.conf.d/50unattended-upgrades') do + it { should be_file } + it { should contain 'Unattended-Upgrade::MailOnlyOnError "true";' } + end + end + + context 'false' do + it 'should work with no errors' do + pp = <<-EOS + include apt + class { 'apt::unattended_upgrades': + mail_to => 'test@example.com', + mail_only_on_error => false, + } + EOS + + apply_manifest(pp, :catch_failures => true) + end + + describe file('/etc/apt/apt.conf.d/50unattended-upgrades') do + it { should be_file } + it { should contain 'Unattended-Upgrade::MailOnlyOnError "false";' } + end + end + + context 'mail_to missing' do + it 'should work with no errors' do + pp = <<-EOS + include apt + class { 'apt::unattended_upgrades': + mail_only_on_error => true, + } + EOS + + apply_manifest(pp, :catch_failures => true) + end + + describe file('/etc/apt/apt.conf.d/50unattended-upgrades') do + it { should be_file } + it { should_not contain 'Unattended-Upgrade::MailOnlyOnError "true";' } + end + end + end + + context 'remove_unused' do + context 'true' do + it 'should work with no errors' do + pp = <<-EOS + include apt + class { 'apt::unattended_upgrades': + remove_unused => true + } + EOS + + apply_manifest(pp, :catch_failures => true) + end + + describe file('/etc/apt/apt.conf.d/50unattended-upgrades') do + it { should be_file } + it { should contain 'Unattended-Upgrade::Remove-Unused-Dependencies "true";' } + end + end + + context 'false' do + it 'should work with no errors' do + pp = <<-EOS + include apt + class { 'apt::unattended_upgrades': + remove_unused => false, + } + EOS + + apply_manifest(pp, :catch_failures => true) + end + + describe file('/etc/apt/apt.conf.d/50unattended-upgrades') do + it { should be_file } + it { should contain 'Unattended-Upgrade::Remove-Unused-Dependencies "false";' } + end + end + end + + context 'auto_reboot' do + context 'true' do + it 'should work with no errors' do + pp = <<-EOS + include apt + class { 'apt::unattended_upgrades': + auto_reboot => true + } + EOS + + apply_manifest(pp, :catch_failures => true) + end + + describe file('/etc/apt/apt.conf.d/50unattended-upgrades') do + it { should be_file } + it { should contain 'Unattended-Upgrade::Automatic-Reboot "true";' } + end + end + + context 'false' do + it 'should work with no errors' do + pp = <<-EOS + include apt + class { 'apt::unattended_upgrades': + auto_reboot => false, + } + EOS + + apply_manifest(pp, :catch_failures => true) + end + + describe file('/etc/apt/apt.conf.d/50unattended-upgrades') do + it { should be_file } + it { should contain 'Unattended-Upgrade::Automatic-Reboot "false";' } + end + end + end + + context 'dl_limit' do + it 'should work with no errors' do + pp = <<-EOS + include apt + class { 'apt::unattended_upgrades': + dl_limit => '99' + } + EOS + + apply_manifest(pp, :catch_failures => true) + end + + describe file('/etc/apt/apt.conf.d/50unattended-upgrades') do + it { should be_file } + it { should contain 'Acquire::http::Dl-Limit "99"' } + end + end + + context 'enable' do + it 'should work with no errors' do + pp = <<-EOS + include apt + class { 'apt::unattended_upgrades': + enable => '2' + } + EOS + + apply_manifest(pp, :catch_failures => true) + end + + describe file('/etc/apt/apt.conf.d/10periodic') do + it { should be_file } + it { should contain 'APT::Periodic::Enable "2"' } + end + end + + context 'backup_interval' do + it 'should work with no errors' do + pp = <<-EOS + include apt + class { 'apt::unattended_upgrades': + backup_interval => '2' + } + EOS + + apply_manifest(pp, :catch_failures => true) + end + + describe file('/etc/apt/apt.conf.d/10periodic') do + it { should be_file } + it { should contain 'APT::Periodic::BackUpArchiveInterval "2";' } + end + end + + context 'backup_level' do + it 'should work with no errors' do + pp = <<-EOS + include apt + class { 'apt::unattended_upgrades': + backup_level => '2' + } + EOS + + apply_manifest(pp, :catch_failures => true) + end + + describe file('/etc/apt/apt.conf.d/10periodic') do + it { should be_file } + it { should contain 'APT::Periodic::BackUpLevel "2";' } + end + end + + context 'max_age' do + it 'should work with no errors' do + pp = <<-EOS + include apt + class { 'apt::unattended_upgrades': + max_age => '2' + } + EOS + + apply_manifest(pp, :catch_failures => true) + end + + describe file('/etc/apt/apt.conf.d/10periodic') do + it { should be_file } + it { should contain 'APT::Periodic::MaxAge "2";' } + end + end + + context 'min_age' do + it 'should work with no errors' do + pp = <<-EOS + include apt + class { 'apt::unattended_upgrades': + min_age => '2' + } + EOS + + apply_manifest(pp, :catch_failures => true) + end + + describe file('/etc/apt/apt.conf.d/10periodic') do + it { should be_file } + it { should contain 'APT::Periodic::MinAge "2";' } + end + end + + context 'max_size' do + it 'should work with no errors' do + pp = <<-EOS + include apt + class { 'apt::unattended_upgrades': + max_size => '2' + } + EOS + + apply_manifest(pp, :catch_failures => true) + end + + describe file('/etc/apt/apt.conf.d/10periodic') do + it { should be_file } + it { should contain 'APT::Periodic::MaxSize "2";' } + end + end + + context 'download_delta' do + it 'should work with no errors' do + pp = <<-EOS + include apt + class { 'apt::unattended_upgrades': + download_delta => '2' + } + EOS + + apply_manifest(pp, :catch_failures => true) + end + + describe file('/etc/apt/apt.conf.d/10periodic') do + it { should be_file } + it { should contain 'APT::Periodic::Download-Upgradeable-Packages-Debdelta "2";' } + end + end + + context 'verbose' do + it 'should work with no errors' do + pp = <<-EOS + include apt + class { 'apt::unattended_upgrades': + verbose => '2' + } + EOS + + apply_manifest(pp, :catch_failures => true) + end + + describe file('/etc/apt/apt.conf.d/10periodic') do + it { should be_file } + it { should contain 'APT::Periodic::Verbose "2";' } + end + end + +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apt/spec/acceptance/unsupported_spec.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apt/spec/acceptance/unsupported_spec.rb new file mode 100644 index 00000000000..08dca76b845 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apt/spec/acceptance/unsupported_spec.rb @@ -0,0 +1,10 @@ +require 'spec_helper_acceptance' + +describe 'unsupported distributions and OSes', :if => UNSUPPORTED_PLATFORMS.include?(fact('osfamily')) do + it 'class apt fails' do + pp = <<-EOS + class { 'apt': } + EOS + expect(apply_manifest(pp, :expect_failures => true).stderr).to match(/unsupported/i) + end +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apt/spec/classes/apt_spec.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apt/spec/classes/apt_spec.rb new file mode 100644 index 00000000000..080bc817602 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apt/spec/classes/apt_spec.rb @@ -0,0 +1,134 @@ +require 'spec_helper' +describe 'apt', :type => :class do + let(:facts) { { :lsbdistid => 'Debian' } } + let :default_params do + { + :disable_keys => :undef, + :always_apt_update => false, + :purge_sources_list => false, + :purge_sources_list_d => false, + } + end + + [{}, + { + :disable_keys => true, + :always_apt_update => true, + :proxy_host => true, + :proxy_port => '3128', + :purge_sources_list => true, + :purge_sources_list_d => true, + }, + { + :disable_keys => false + } + ].each do |param_set| + describe "when #{param_set == {} ? "using default" : "specifying"} class parameters" do + let :param_hash do + default_params.merge(param_set) + end + + let :params do + param_set + end + + let :refresh_only_apt_update do + if param_hash[:always_apt_update] + false + else + true + end + end + + it { should contain_class("apt::params") } + + it { + if param_hash[:purge_sources_list] + should contain_file("sources.list").with({ + 'path' => "/etc/apt/sources.list", + 'ensure' => "present", + 'owner' => "root", + 'group' => "root", + 'mode' => "0644", + "content" => "# Repos managed by puppet.\n" + }) + else + should contain_file("sources.list").with({ + 'path' => "/etc/apt/sources.list", + 'ensure' => "present", + 'owner' => "root", + 'group' => "root", + 'mode' => "0644", + 'content' => nil + }) + end + } + it { + if param_hash[:purge_sources_list_d] + should create_file("sources.list.d").with({ + 'path' => "/etc/apt/sources.list.d", + 'ensure' => "directory", + 'owner' => "root", + 'group' => "root", + 'purge' => true, + 'recurse' => true, + 'notify' => 'Exec[apt_update]' + }) + else + should create_file("sources.list.d").with({ + 'path' => "/etc/apt/sources.list.d", + 'ensure' => "directory", + 'owner' => "root", + 'group' => "root", + 'purge' => false, + 'recurse' => false, + 'notify' => 'Exec[apt_update]' + }) + end + } + + it { + should contain_exec("apt_update").with({ + 'command' => "/usr/bin/apt-get update", + 'refreshonly' => refresh_only_apt_update + }) + } + + it { + if param_hash[:disable_keys] == true + should create_file("99unauth").with({ + 'content' => "APT::Get::AllowUnauthenticated 1;\n", + 'ensure' => "present", + 'path' => "/etc/apt/apt.conf.d/99unauth" + }) + elsif param_hash[:disable_keys] == false + should create_file("99unauth").with({ + 'ensure' => "absent", + 'path' => "/etc/apt/apt.conf.d/99unauth" + }) + elsif param_hash[:disable_keys] != :undef + should_not create_file("99unauth").with({ + 'path' => "/etc/apt/apt.conf.d/99unauth" + }) + end + } + describe 'when setting a proxy' do + it { + if param_hash[:proxy_host] + should contain_file('configure-apt-proxy').with( + 'path' => '/etc/apt/apt.conf.d/proxy', + 'content' => "Acquire::http::Proxy \"http://#{param_hash[:proxy_host]}:#{param_hash[:proxy_port]}\";", + 'notify' => "Exec[apt_update]" + ) + else + should contain_file('configure-apt-proxy').with( + 'path' => '/etc/apt/apt.conf.d/proxy', + 'notify' => 'Exec[apt_update]', + 'ensure' => 'absent' + ) + end + } + end + end + end +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apt/spec/classes/backports_spec.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apt/spec/classes/backports_spec.rb new file mode 100644 index 00000000000..98ad873af54 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apt/spec/classes/backports_spec.rb @@ -0,0 +1,71 @@ +require 'spec_helper' +describe 'apt::backports', :type => :class do + + describe 'when turning on backports for ubuntu karmic' do + + let :facts do + { + 'lsbdistcodename' => 'Karmic', + 'lsbdistid' => 'Ubuntu' + } + end + + it { should contain_apt__source('backports').with({ + 'location' => 'http://old-releases.ubuntu.com/ubuntu', + 'release' => 'karmic-backports', + 'repos' => 'main universe multiverse restricted', + 'key' => '437D05B5', + 'key_server' => 'pgp.mit.edu', + 'pin' => '200', + }) + } + end + + describe "when turning on backports for debian squeeze" do + + let :facts do + { + 'lsbdistcodename' => 'Squeeze', + 'lsbdistid' => 'Debian', + } + end + + it { should contain_apt__source('backports').with({ + 'location' => 'http://backports.debian.org/debian-backports', + 'release' => 'squeeze-backports', + 'repos' => 'main contrib non-free', + 'key' => '46925553', + 'key_server' => 'pgp.mit.edu', + 'pin' => '200', + }) + } + end + + describe "when turning on backports for debian squeeze but using your own mirror" do + + let :facts do + { + 'lsbdistcodename' => 'Squeeze', + 'lsbdistid' => 'Debian' + } + end + + let :location do + 'http://mirrors.example.com/debian-backports' + end + + let :params do + { 'location' => location } + end + + it { should contain_apt__source('backports').with({ + 'location' => location, + 'release' => 'squeeze-backports', + 'repos' => 'main contrib non-free', + 'key' => '46925553', + 'key_server' => 'pgp.mit.edu', + 'pin' => '200', + }) + } + end +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apt/spec/classes/debian_testing_spec.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apt/spec/classes/debian_testing_spec.rb new file mode 100644 index 00000000000..20487333f67 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apt/spec/classes/debian_testing_spec.rb @@ -0,0 +1,15 @@ +require 'spec_helper' +describe 'apt::debian::testing', :type => :class do + let(:facts) { { :lsbdistid => 'Debian' } } + it { + should contain_apt__source("debian_testing").with({ + "location" => "http://debian.mirror.iweb.ca/debian/", + "release" => "testing", + "repos" => "main contrib non-free", + "required_packages" => "debian-keyring debian-archive-keyring", + "key" => "46925553", + "key_server" => "subkeys.pgp.net", + "pin" => "-10" + }) + } +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apt/spec/classes/debian_unstable_spec.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apt/spec/classes/debian_unstable_spec.rb new file mode 100644 index 00000000000..70724f90bd0 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apt/spec/classes/debian_unstable_spec.rb @@ -0,0 +1,15 @@ +require 'spec_helper' +describe 'apt::debian::unstable', :type => :class do + let(:facts) { { :lsbdistid => 'Debian' } } + it { + should contain_apt__source("debian_unstable").with({ + "location" => "http://debian.mirror.iweb.ca/debian/", + "release" => "unstable", + "repos" => "main contrib non-free", + "required_packages" => "debian-keyring debian-archive-keyring", + "key" => "46925553", + "key_server" => "subkeys.pgp.net", + "pin" => "-10" + }) + } +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apt/spec/classes/params_spec.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apt/spec/classes/params_spec.rb new file mode 100644 index 00000000000..2d3ec3c71aa --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apt/spec/classes/params_spec.rb @@ -0,0 +1,14 @@ +require 'spec_helper' +describe 'apt::params', :type => :class do + let(:facts) { { :lsbdistid => 'Debian' } } + let (:title) { 'my_package' } + + it { should contain_apt__params } + + # There are 4 resources in this class currently + # there should not be any more resources because it is a params class + # The resources are class[apt::params], class[main], class[settings], stage[main] + it "Should not contain any resources" do + subject.resources.size.should == 4 + end +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apt/spec/classes/release_spec.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apt/spec/classes/release_spec.rb new file mode 100644 index 00000000000..e43f449d626 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apt/spec/classes/release_spec.rb @@ -0,0 +1,23 @@ +require 'spec_helper' +describe 'apt::release', :type => :class do + let(:facts) { { :lsbdistid => 'Debian' } } + let (:title) { 'my_package' } + + let :param_set do + { :release_id => 'precise' } + end + + let (:params) { param_set } + + it { should contain_class("apt::params") } + + it { + should contain_file("/etc/apt/apt.conf.d/01release").with({ + "mode" => "0644", + "owner" => "root", + "group" => "root", + "content" => "APT::Default-Release \"#{param_set[:release_id]}\";" + }) + } +end + diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apt/spec/classes/unattended_upgrades_spec.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apt/spec/classes/unattended_upgrades_spec.rb new file mode 100644 index 00000000000..f5cad53a5b6 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apt/spec/classes/unattended_upgrades_spec.rb @@ -0,0 +1,205 @@ +require 'spec_helper' +describe 'apt::unattended_upgrades', :type => :class do + let(:file_unattended) { '/etc/apt/apt.conf.d/50unattended-upgrades' } + let(:file_periodic) { '/etc/apt/apt.conf.d/10periodic' } + let(:facts) { { :lsbdistid => 'Debian' } } + + it { should contain_package("unattended-upgrades") } + + it { + should create_file("/etc/apt/apt.conf.d/50unattended-upgrades").with({ + "owner" => "root", + "group" => "root", + "mode" => "0644", + "require" => "Package[unattended-upgrades]", + }) + } + + it { + should create_file("/etc/apt/apt.conf.d/10periodic").with({ + "owner" => "root", + "group" => "root", + "mode" => "0644", + "require" => "Package[unattended-upgrades]", + }) + } + + describe "origins" do + describe "with param defaults" do + let(:params) {{ }} + it { should contain_file(file_unattended).with_content(/^Unattended-Upgrade::Allowed-Origins \{\n\t"\$\{distro_id\}:\$\{distro_codename\}-security";\n\};$/) } + end + + describe "with origins => ['ubuntu:precise-security']" do + let :params do + { :origins => ['ubuntu:precise-security'] } + end + it { should contain_file(file_unattended).with_content(/^Unattended-Upgrade::Allowed-Origins \{\n\t"ubuntu:precise-security";\n\};$/) } + end + end + + describe "blacklist" do + describe "with param defaults" do + let(:params) {{ }} + it { should contain_file(file_unattended).with_content(/^Unattended-Upgrade::Package-Blacklist \{\n\};$/) } + end + + describe "with blacklist => []" do + let :params do + { :blacklist => ['libc6', 'libc6-dev'] } + end + it { should contain_file(file_unattended).with_content(/^Unattended-Upgrade::Package-Blacklist \{\n\t"libc6";\n\t"libc6-dev";\n\};$/) } + end + end + + describe "with update => 2" do + let :params do + { :update => "2" } + end + it { should contain_file(file_periodic).with_content(/^APT::Periodic::Update-Package-Lists "2";$/) } + end + + describe "with download => 2" do + let :params do + { :download => "2" } + end + it { should contain_file(file_periodic).with_content(/^APT::Periodic::Download-Upgradeable-Packages "2";$/) } + end + + describe "with upgrade => 2" do + let :params do + { :upgrade => "2" } + end + it { should contain_file(file_periodic).with_content(/^APT::Periodic::Unattended-Upgrade "2";$/) } + end + + describe "with autoclean => 2" do + let :params do + { :autoclean => "2" } + end + it { should contain_file(file_periodic).with_content(/^APT::Periodic::AutocleanInterval "2";$/) } + end + + describe "with auto_fix => false" do + let :params do + { :auto_fix => false } + end + it { should contain_file(file_unattended).with_content(/^Unattended-Upgrade::AutoFixInterruptedDpkg "false";$/) } + end + + describe "with minimal_steps => true" do + let :params do + { :minimal_steps => true } + end + it { should contain_file(file_unattended).with_content(/^Unattended-Upgrade::MinimalSteps "true";$/) } + end + + describe "with install_on_shutdown => true" do + let :params do + { :install_on_shutdown => true } + end + it { should contain_file(file_unattended).with_content(/^Unattended-Upgrade::InstallOnShutdown "true";$/) } + end + + describe "mail_to" do + describe "param defaults" do + let(:params) {{ }} + it { should_not contain_file(file_unattended).with_content(/^Unattended-Upgrade::Mail /) } + it { should_not contain_file(file_unattended).with_content(/^Unattended-Upgrade::MailOnlyOnError /) } + end + + describe "with mail_to => user@website, mail_only_on_error => true" do + let :params do + { :mail_to => "user@website", + :mail_only_on_error => true } + end + it { should contain_file(file_unattended).with_content(/^Unattended-Upgrade::Mail "user@website";$/) } + it { should contain_file(file_unattended).with_content(/^Unattended-Upgrade::MailOnlyOnError "true";$/) } + end + end + + describe "with remove_unused => false" do + let :params do + { :remove_unused => false } + end + it { should contain_file(file_unattended).with_content(/^Unattended-Upgrade::Remove-Unused-Dependencies "false";$/) } + end + + describe "with auto_reboot => true" do + let :params do + { :auto_reboot => true } + end + it { should contain_file(file_unattended).with_content(/^Unattended-Upgrade::Automatic-Reboot "true";$/) } + end + + describe "dl_limit" do + describe "param defaults" do + let(:params) {{ }} + it { should_not contain_file(file_unattended).with_content(/^Acquire::http::Dl-Limit /) } + end + + describe "with dl_limit => 70" do + let :params do + { :dl_limit => "70" } + end + it { should contain_file(file_unattended).with_content(/^Acquire::http::Dl-Limit "70";$/) } + end + end + + describe "with enable => 0" do + let :params do + { :enable => "0" } + end + it { should contain_file(file_periodic).with_content(/^APT::Periodic::Enable "0";$/) } + end + + describe "with backup_interval => 1" do + let :params do + { :backup_interval => "1" } + end + it { should contain_file(file_periodic).with_content(/^APT::Periodic::BackUpArchiveInterval "1";$/) } + end + + describe "with backup_level => 0" do + let :params do + { :backup_level => "0" } + end + it { should contain_file(file_periodic).with_content(/^APT::Periodic::BackUpLevel "0";$/) } + end + + describe "with max_age => 1" do + let :params do + { :max_age => "1" } + end + it { should contain_file(file_periodic).with_content(/^APT::Periodic::MaxAge "1";$/) } + end + + describe "with min_age => 1" do + let :params do + { :min_age => "1" } + end + it { should contain_file(file_periodic).with_content(/^APT::Periodic::MinAge "1";$/) } + end + + describe "with max_size => 1" do + let :params do + { :max_size => "1" } + end + it { should contain_file(file_periodic).with_content(/^APT::Periodic::MaxSize "1";$/) } + end + + describe "with download_delta => 2" do + let :params do + { :download_delta => "2" } + end + it { should contain_file(file_periodic).with_content(/^APT::Periodic::Download-Upgradeable-Packages-Debdelta "2";$/) } + end + + describe "with verbose => 2" do + let :params do + { :verbose => "2" } + end + it { should contain_file(file_periodic).with_content(/^APT::Periodic::Verbose "2";$/) } + end + +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apt/spec/defines/builddep_spec.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apt/spec/defines/builddep_spec.rb new file mode 100644 index 00000000000..a0cbaa4cc09 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apt/spec/defines/builddep_spec.rb @@ -0,0 +1,19 @@ +require 'spec_helper' +describe 'apt::builddep', :type => :define do + + let(:facts) { { :lsbdistid => 'Debian' } } + let(:title) { 'my_package' } + + describe "should require apt-get update" do + it { should contain_exec("apt_update").with({ + 'command' => "/usr/bin/apt-get update", + 'refreshonly' => true + }) + } + it { should contain_anchor("apt::builddep::my_package").with({ + 'require' => 'Class[Apt::Update]', + }) + } + end + +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apt/spec/defines/conf_spec.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apt/spec/defines/conf_spec.rb new file mode 100644 index 00000000000..cda5900c035 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apt/spec/defines/conf_spec.rb @@ -0,0 +1,58 @@ +require 'spec_helper' +describe 'apt::conf', :type => :define do + let(:facts) { { :lsbdistid => 'Debian' } } + let :title do + 'norecommends' + end + + describe "when creating an apt preference" do + let :params do + { + :priority => '00', + :content => "Apt::Install-Recommends 0;\nApt::AutoRemove::InstallRecommends 1;\n" + } + end + + let :filename do + "/etc/apt/apt.conf.d/00norecommends" + end + + it { should contain_apt__conf('norecommends').with({ + 'priority' => '00', + 'content' => "Apt::Install-Recommends 0;\nApt::AutoRemove::InstallRecommends 1;\n" + }) + } + + it { should contain_file(filename).with({ + 'ensure' => 'present', + 'content' => "Apt::Install-Recommends 0;\nApt::AutoRemove::InstallRecommends 1;\n", + 'owner' => 'root', + 'group' => 'root', + 'mode' => '0644', + }) + } + end + + describe "when removing an apt preference" do + let :params do + { + :ensure => 'absent', + :priority => '00', + :content => "Apt::Install-Recommends 0;\nApt::AutoRemove::InstallRecommends 1;\n" + } + end + + let :filename do + "/etc/apt/apt.conf.d/00norecommends" + end + + it { should contain_file(filename).with({ + 'ensure' => 'absent', + 'content' => "Apt::Install-Recommends 0;\nApt::AutoRemove::InstallRecommends 1;\n", + 'owner' => 'root', + 'group' => 'root', + 'mode' => '0644', + }) + } + end +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apt/spec/defines/force_spec.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apt/spec/defines/force_spec.rb new file mode 100644 index 00000000000..b8665e6dabe --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apt/spec/defines/force_spec.rb @@ -0,0 +1,58 @@ +require 'spec_helper' +describe 'apt::force', :type => :define do + let(:facts) { { :lsbdistid => 'Debian' } } + let :pre_condition do + 'include apt::params' + end + + let :title do + 'my_package' + end + + let :default_params do + { + :release => 'testing', + :version => false + } + end + + describe "when using default parameters" do + let :params do + default_params + end + it { should contain_exec("/usr/bin/apt-get -y -t #{params[:release]} install #{title}").with( + :unless => "/usr/bin/test \$(/usr/bin/apt-cache policy -t #{params[:release]} #{title} | /bin/grep -E 'Installed|Candidate' | /usr/bin/uniq -s 14 | /usr/bin/wc -l) -eq 1", + :timeout => '300' + ) } + end + + describe "when specifying false release parameter" do + let :params do + default_params.merge(:release => false) + end + it { should contain_exec("/usr/bin/apt-get -y install #{title}").with( + :unless => "/usr/bin/dpkg -s #{title} | grep -q 'Status: install'" + ) } + end + + describe "when specifying version parameter" do + let :params do + default_params.merge(:version => '1') + end + it { should contain_exec("/usr/bin/apt-get -y -t #{params[:release]} install #{title}=#{params[:version]}").with( + :unless => "/usr/bin/apt-cache policy -t #{params[:release]} #{title} | /bin/grep -q 'Installed: #{params[:version]}'" + ) } + end + + describe "when specifying false release and version parameters" do + let :params do + default_params.merge( + :release => false, + :version => '1' + ) + end + it { should contain_exec("/usr/bin/apt-get -y install #{title}=1").with( + :unless => "/usr/bin/dpkg -s #{title} | grep -q 'Version: #{params[:version]}'" + ) } + end +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apt/spec/defines/key_spec.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apt/spec/defines/key_spec.rb new file mode 100644 index 00000000000..4ba7b87eae6 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apt/spec/defines/key_spec.rb @@ -0,0 +1,124 @@ +require 'spec_helper' +describe 'apt::key', :type => :define do + let(:facts) { { :lsbdistid => 'Debian' } } + let :title do + '8347A27F' + end + + let :default_params do + { + :key => title, + :ensure => 'present', + :key_server => "keyserver.ubuntu.com", + :key_source => false, + :key_content => false + } + end + + [{}, + { + :ensure => 'absent' + }, + { + :ensure => 'random' + }, + { + :key_source => 'ftp://ftp.example.org/key', + }, + { + :key_content => 'deadbeef', + } + ].each do |param_set| + + let :param_hash do + param_hash = default_params.merge(param_set) + param_hash[:key].upcase! if param_hash[:key] + param_hash + end + + let :params do + param_set + end + + let :digest do + str = String.new + str << param_hash[:key].to_s << '/' + str << param_hash[:key_content].to_s << '/' + str << param_hash[:key_source].to_s << '/' + str << param_hash[:key_server].to_s << '/' + Digest::SHA1.hexdigest(str) + end + + describe "when #{param_set == {} ? "using default" : "specifying"} define parameters" do + + it { + if [:present, 'present', :absent, 'absent'].include? param_hash[:ensure] + should contain_apt__params + end + } + + it { + if [:present, 'present'].include? param_hash[:ensure] + should_not contain_exec("apt::key #{param_hash[:key]} absent") + should contain_anchor("apt::key #{param_hash[:key]} present") + should contain_exec(digest).with({ + "path" => "/bin:/usr/bin", + "unless" => "/usr/bin/apt-key list | /bin/grep '#{param_hash[:key]}'" + }) + elsif [:absent, 'absent'].include? param_hash[:ensure] + should_not contain_anchor("apt::key #{param_hash[:key]} present") + should contain_exec("apt::key #{param_hash[:key]} absent").with({ + "path" => "/bin:/usr/bin", + "onlyif" => "apt-key list | grep '#{param_hash[:key]}'", + "command" => "apt-key del '#{param_hash[:key]}'" + }) + else + expect { should raise_error(Puppet::Error) } + end + } + + it { + if [:present, 'present'].include? param_hash[:ensure] + if param_hash[:key_content] + should contain_exec(digest).with({ + "command" => "echo '#{param_hash[:key_content]}' | /usr/bin/apt-key add -" + }) + elsif param_hash[:key_source] + should contain_exec(digest).with({ + "command" => "wget -q '#{param_hash[:key_source]}' -O- | apt-key add -" + }) + elsif param_hash[:key_server] + should contain_exec(digest).with({ + "command" => "apt-key adv --keyserver '#{param_hash[:key_server]}' --recv-keys '#{param_hash[:key]}'" + }) + end + end + } + + end + end + + [{ :ensure => 'present' }, { :ensure => 'absent' }].each do |param_set| + describe "should correctly handle duplicate definitions" do + + let :pre_condition do + "apt::key { 'duplicate': key => '#{title}'; }" + end + + let(:params) { param_set } + + it { + if param_set[:ensure] == 'present' + should contain_anchor("apt::key #{title} present") + should contain_apt__key(title) + should contain_apt__key("duplicate") + elsif param_set[:ensure] == 'absent' + expect { should raise_error(Puppet::Error) } + end + } + + end + end + +end + diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apt/spec/defines/pin_spec.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apt/spec/defines/pin_spec.rb new file mode 100644 index 00000000000..78a9b12690b --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apt/spec/defines/pin_spec.rb @@ -0,0 +1,102 @@ +require 'spec_helper' +describe 'apt::pin', :type => :define do + let(:facts) { { :lsbdistid => 'Debian' } } + let(:title) { 'my_pin' } + + let :default_params do + { + :ensure => 'present', + :order => '', + :packages => '*', + :priority => '0', + :release => nil + } + end + + [ + { :params => {}, + :content => "# my_pin\nExplanation: : my_pin\nPackage: *\nPin: release a=my_pin\nPin-Priority: 0\n" + }, + { + :params => { + :packages => 'apache', + :priority => '1' + }, + :content => "# my_pin\nExplanation: : my_pin\nPackage: apache\nPin: release a=my_pin\nPin-Priority: 1\n" + }, + { + :params => { + :order => 50, + :packages => 'apache', + :priority => '1' + }, + :content => "# my_pin\nExplanation: : my_pin\nPackage: apache\nPin: release a=my_pin\nPin-Priority: 1\n" + }, + { + :params => { + :ensure => 'absent', + :packages => 'apache', + :priority => '1' + }, + :content => "# my_pin\nExplanation: : my_pin\nPackage: apache\nPin: release a=my_pin\nPin-Priority: 1\n" + }, + { + :params => { + :packages => 'apache', + :priority => '1', + :release => 'my_newpin' + }, + :content => "# my_pin\nExplanation: : my_pin\nPackage: apache\nPin: release a=my_newpin\nPin-Priority: 1\n" + }, + { + :params => { + :packages => 'apache', + :priority => '1', + :version => '2.2.16*' + }, + :content => "# my_pin\nExplanation: : my_pin\nPackage: apache\nPin: version 2.2.16*\nPin-Priority: 1\n" + }, + { + :params => { + :priority => '1', + :origin => 'ftp.de.debian.org' + }, + :content => "# my_pin\nExplanation: : my_pin\nPackage: *\nPin: origin ftp.de.debian.org\nPin-Priority: 1\n" + }, + { + :params => { + :packages => 'apache', + :priority => '1', + :release => 'stable', + :codename => 'wheezy', + :release_version => '3.0', + :component => 'main', + :originator => 'Debian', + :label => 'Debian' + }, + :content => "# my_pin\nExplanation: : my_pin\nPackage: apache\nPin: release a=stable, n=wheezy, v=3.0, c=main, o=Debian, l=Debian\nPin-Priority: 1\n" + }, + ].each do |param_set| + describe "when #{param_set == {} ? "using default" : "specifying"} define parameters" do + let :param_hash do + default_params.merge(param_set[:params]) + end + + let :params do + param_set[:params] + end + + it { should contain_class("apt::params") } + + it { should contain_file("#{title}.pref").with({ + 'ensure' => param_hash[:ensure], + 'path' => "/etc/apt/preferences.d/#{param_hash[:order] == '' ? "" : "#{param_hash[:order]}-"}#{title}.pref", + 'owner' => 'root', + 'group' => 'root', + 'mode' => '0644', + 'content' => param_set[:content], + }) + } + end + end +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apt/spec/defines/ppa_spec.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apt/spec/defines/ppa_spec.rb new file mode 100644 index 00000000000..0c3bd75ed77 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apt/spec/defines/ppa_spec.rb @@ -0,0 +1,156 @@ +require 'spec_helper' +describe 'apt::ppa', :type => :define do + [ + { + :lsbdistrelease => '11.04', + :lsbdistcodename => 'natty', + :operatingsystem => 'Ubuntu', + :lsbdistid => 'Ubuntu', + :package => 'python-software-properties' + }, + { + :lsbdistrelease => '12.10', + :lsbdistcodename => 'quantal', + :operatingsystem => 'Ubuntu', + :lsbdistid => 'Ubuntu', + :package => 'software-properties-common' + }, + ].each do |platform| + context "on #{platform[:lsbdistcodename]}" do + let :facts do + { + :lsbdistrelease => platform[:lsbdistrelease], + :lsbdistcodename => platform[:lsbdistcodename], + :operatingsystem => platform[:operatingsystem], + :lsbdistid => platform[:lsbdistid], + } + end + let :release do + "#{platform[:lsbdistcodename]}" + end + let :package do + "#{platform[:package]}" + end + let :options do + "-y" + end + ['ppa:dans_ppa', 'dans_ppa','ppa:dans-daily/ubuntu'].each do |t| + describe "with title #{t}" do + let :pre_condition do + 'class { "apt": }' + end + let :title do + t + end + let :filename do + t.sub(/^ppa:/,'').gsub('/','-') << "-" << "#{release}.list" + end + + it { should contain_package("#{package}") } + + it { should contain_exec("apt_update").with( + 'command' => '/usr/bin/apt-get update', + 'refreshonly' => true + ) + } + + it { should contain_exec("add-apt-repository-#{t}").with( + 'command' => "/usr/bin/add-apt-repository #{options} #{t}", + 'unless' => "/usr/bin/test -s /etc/apt/sources.list.d/#{filename}", + 'require' => ["File[sources.list.d]", "Package[#{package}]"], + 'notify' => "Exec[apt_update]" + ) + } + + it { should create_file("/etc/apt/sources.list.d/#{filename}").with( + 'ensure' => 'file', + 'require' => "Exec[add-apt-repository-#{t}]" + ) + } + end + end + describe 'without a proxy defined' do + let :title do + 'rspec_ppa' + end + let :pre_condition do + 'class { "apt": + proxy_host => false + }' + end + let :filename do + "#{title}-#{release}.list" + end + + it { should contain_exec("add-apt-repository-#{title}").with( + 'environment' => [], + 'command' => "/usr/bin/add-apt-repository #{options} #{title}", + 'unless' => "/usr/bin/test -s /etc/apt/sources.list.d/#{filename}", + 'require' => ["File[sources.list.d]", "Package[#{package}]"], + 'notify' => "Exec[apt_update]" + ) + } + end + + describe 'behind a proxy' do + let :title do + 'rspec_ppa' + end + let :pre_condition do + 'class { "apt": + proxy_host => "user:pass@proxy", + }' + end + let :filename do + "#{title}-#{release}.list" + end + + it { should contain_exec("add-apt-repository-#{title}").with( + 'environment' => [ + "http_proxy=http://user:pass@proxy:8080", + "https_proxy=http://user:pass@proxy:8080", + ], + 'command' => "/usr/bin/add-apt-repository #{options} #{title}", + 'unless' => "/usr/bin/test -s /etc/apt/sources.list.d/#{filename}", + 'require' => ["File[sources.list.d]", "Package[#{package}]"], + 'notify' => "Exec[apt_update]" + ) + } + end + end + end + + [ { :lsbdistcodename => 'natty', + :package => 'python-software-properties' }, + { :lsbdistcodename => 'quantal', + :package => 'software-properties-common'}, + ].each do |platform| + context "on #{platform[:lsbdistcodename]}" do + describe "it should not error if package['#{platform[:package]}'] is already defined" do + let :pre_condition do + 'class {"apt": }' + + 'package { "#{platform[:package]}": }->Apt::Ppa["ppa"]' + end + let :facts do + {:lsbdistcodename => '#{platform[:lsbdistcodename]}', + :operatingsystem => 'Ubuntu', + :lsbdistid => 'Ubuntu'} + end + let(:title) { "ppa" } + let(:release) { "#{platform[:lsbdistcodename]}" } + it { should contain_package('#{platform[:package]}') } + end + end + end + + describe "without Class[apt] should raise a Puppet::Error" do + let(:release) { "natty" } + let(:title) { "ppa" } + it { expect { should contain_apt__ppa(title) }.to raise_error(Puppet::Error) } + end + + describe "without release should raise a Puppet::Error" do + let(:title) { "ppa:" } + it { expect { should contain_apt__ppa(:release) }.to raise_error(Puppet::Error) } + end +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apt/spec/defines/source_spec.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apt/spec/defines/source_spec.rb new file mode 100644 index 00000000000..9da8b235fef --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apt/spec/defines/source_spec.rb @@ -0,0 +1,167 @@ +require 'spec_helper' +describe 'apt::source', :type => :define do + let(:facts) { { :lsbdistid => 'Debian' } } + let :title do + 'my_source' + end + + let :default_params do + { + :ensure => 'present', + :location => '', + :release => 'karmic', + :repos => 'main', + :include_src => true, + :required_packages => false, + :key => false, + :key_server => 'keyserver.ubuntu.com', + :key_content => false, + :key_source => false, + :pin => false + } + end + + [{}, + { + :location => 'http://example.com', + :release => 'precise', + :repos => 'security', + :include_src => false, + :required_packages => 'apache', + :key => 'key_name', + :key_server => 'keyserver.debian.com', + :pin => '600', + :key_content => 'ABCD1234' + }, + { + :key => 'key_name', + :key_server => 'keyserver.debian.com', + :key_content => false, + }, + { + :ensure => 'absent', + :location => 'http://example.com', + :release => 'precise', + :repos => 'security', + }, + { + :release => '', + }, + { + :release => 'custom', + }, + { + :architecture => 'amd64', + } + ].each do |param_set| + describe "when #{param_set == {} ? "using default" : "specifying"} class parameters" do + let :param_hash do + default_params.merge(param_set) + end + + let :facts do + {:lsbdistcodename => 'karmic', :lsbdistid => 'Ubuntu'} + end + + let :params do + param_set + end + + let :filename do + "/etc/apt/sources.list.d/#{title}.list" + end + + let :content do + content = "# #{title}" + if param_hash[:architecture] + arch = "[arch=#{param_hash[:architecture]}] " + end + content << "\ndeb #{arch}#{param_hash[:location]} #{param_hash[:release]} #{param_hash[:repos]}\n" + + if param_hash[:include_src] + content << "deb-src #{arch}#{param_hash[:location]} #{param_hash[:release]} #{param_hash[:repos]}\n" + end + content + end + + it { should contain_apt__params } + + it { should contain_file("#{title}.list").with({ + 'ensure' => param_hash[:ensure], + 'path' => filename, + 'owner' => 'root', + 'group' => 'root', + 'mode' => '0644', + 'content' => content, + }) + } + + it { + if param_hash[:pin] + should contain_apt__pin(title).with({ + "priority" => param_hash[:pin], + "before" => "File[#{title}.list]" + }) + else + should_not contain_apt__pin(title).with({ + "priority" => param_hash[:pin], + "before" => "File[#{title}.list]" + }) + end + } + + it { + should contain_exec("apt_update").with({ + "command" => "/usr/bin/apt-get update", + "refreshonly" => true + }) + } + + it { + if param_hash[:required_packages] + should contain_exec("Required packages: '#{param_hash[:required_packages]}' for #{title}").with({ + "command" => "/usr/bin/apt-get -y install #{param_hash[:required_packages]}", + "subscribe" => "File[#{title}.list]", + "refreshonly" => true, + "before" => 'Exec[apt_update]', + }) + else + should_not contain_exec("Required packages: '#{param_hash[:required_packages]}' for #{title}").with({ + "command" => "/usr/bin/apt-get -y install #{param_hash[:required_packages]}", + "subscribe" => "File[#{title}.list]", + "refreshonly" => true + }) + end + } + + it { + if param_hash[:key] + should contain_apt__key("Add key: #{param_hash[:key]} from Apt::Source #{title}").with({ + "key" => param_hash[:key], + "ensure" => :present, + "key_server" => param_hash[:key_server], + "key_content" => param_hash[:key_content], + "key_source" => param_hash[:key_source], + "before" => "File[#{title}.list]" + }) + else + should_not contain_apt__key("Add key: #{param_hash[:key]} from Apt::Source #{title}").with({ + "key" => param_hash[:key], + "ensure" => :present, + "key_server" => param_hash[:key_server], + "key_content" => param_hash[:key_content], + "key_source" => param_hash[:key_source], + "before" => "File[#{title}.list]" + }) + end + } + end + end + describe "without release should raise a Puppet::Error" do + let(:default_params) { Hash.new } + let(:facts) { Hash.new } + it { expect { should raise_error(Puppet::Error) } } + let(:facts) { { :lsbdistcodename => 'lucid', :lsbdistid => 'Ubuntu' } } + it { should contain_apt__source(title) } + end +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apt/spec/spec_helper.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apt/spec/spec_helper.rb new file mode 100644 index 00000000000..2c6f56649ae --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apt/spec/spec_helper.rb @@ -0,0 +1 @@ +require 'puppetlabs_spec_helper/module_spec_helper' diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apt/spec/spec_helper_acceptance.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apt/spec/spec_helper_acceptance.rb new file mode 100644 index 00000000000..3352564ce7b --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apt/spec/spec_helper_acceptance.rb @@ -0,0 +1,33 @@ +require 'beaker-rspec' + +# Install Puppet +unless ENV['RS_PROVISION'] == 'no' + hosts.each do |host| + if host.is_pe? + install_pe + else + install_puppet + on host, "mkdir -p #{host['distmoduledir']}" + end + end +end + +UNSUPPORTED_PLATFORMS = ['RedHat','Suse','windows','AIX','Solaris'] + +RSpec.configure do |c| + # Project root + proj_root = File.expand_path(File.join(File.dirname(__FILE__), '..')) + + # Readable test descriptions + c.formatter = :documentation + + # Configure all nodes in nodeset + c.before :suite do + # Install module and dependencies + puppet_module_install(:source => proj_root, :module_name => 'apt') + hosts.each do |host| + shell('/bin/touch /etc/puppet/hiera.yaml') + shell('puppet module install puppetlabs-stdlib --version 2.2.1', { :acceptable_exit_codes => [0,1] }) + end + end +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apt/templates/10periodic.erb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apt/templates/10periodic.erb new file mode 100644 index 00000000000..5737c9ac29f --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apt/templates/10periodic.erb @@ -0,0 +1,12 @@ +APT::Periodic::Enable "<%= @enable %>"; +APT::Periodic::BackUpArchiveInterval "<%= @backup_interval %>"; +APT::Periodic::BackUpLevel "<%= @backup_level %>"; +APT::Periodic::MaxAge "<%= @max_age %>"; +APT::Periodic::MinAge "<%= @min_age %>"; +APT::Periodic::MaxSize "<%= @max_size %>"; +APT::Periodic::Update-Package-Lists "<%= @update %>"; +APT::Periodic::Download-Upgradeable-Packages "<%= @download %>"; +APT::Periodic::Download-Upgradeable-Packages-Debdelta "<%= @download_delta %>"; +APT::Periodic::Unattended-Upgrade "<%= @upgrade %>"; +APT::Periodic::AutocleanInterval "<%= @autoclean %>"; +APT::Periodic::Verbose "<%= @verbose %>"; diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apt/templates/50unattended-upgrades.erb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apt/templates/50unattended-upgrades.erb new file mode 100644 index 00000000000..4df0f74401f --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apt/templates/50unattended-upgrades.erb @@ -0,0 +1,53 @@ +// Automatically upgrade packages from these (origin:archive) pairs +Unattended-Upgrade::Allowed-Origins { +<% @origins.each do |origin| -%> + "<%= origin %>"; +<% end -%> +}; + +// List of packages to not update +Unattended-Upgrade::Package-Blacklist { +<% @blacklist.each do |package| -%> + "<%= package %>"; +<% end -%> +}; + +// This option allows you to control if on a unclean dpkg exit +// unattended-upgrades will automatically run +// dpkg --force-confold --configure -a +// The default is true, to ensure updates keep getting installed +Unattended-Upgrade::AutoFixInterruptedDpkg "<%= @auto_fix %>"; + +// Split the upgrade into the smallest possible chunks so that +// they can be interrupted with SIGUSR1. This makes the upgrade +// a bit slower but it has the benefit that shutdown while a upgrade +// is running is possible (with a small delay) +Unattended-Upgrade::MinimalSteps "<%= @minimal_steps %>"; + +// Install all unattended-upgrades when the machine is shuting down +// instead of doing it in the background while the machine is running +// This will (obviously) make shutdown slower +Unattended-Upgrade::InstallOnShutdown "<%= @install_on_shutdown %>"; + +// Send email to this address for problems or packages upgrades +// If empty or unset then no email is sent, make sure that you +// have a working mail setup on your system. A package that provides +// 'mailx' must be installed. +<% if @mail_to != "NONE" %>Unattended-Upgrade::Mail "<%= @mail_to %>";<% end %> + +// Set this value to "true" to get emails only on errors. Default +// is to always send a mail if Unattended-Upgrade::Mail is set +<% if @mail_to != "NONE" %>Unattended-Upgrade::MailOnlyOnError "<%= @mail_only_on_error %>";<% end %> + +// Do automatic removal of new unused dependencies after the upgrade +// (equivalent to apt-get autoremove) +Unattended-Upgrade::Remove-Unused-Dependencies "<%= @remove_unused %>"; + +// Automatically reboot *WITHOUT CONFIRMATION* if a +// the file /var/run/reboot-required is found after the upgrade +Unattended-Upgrade::Automatic-Reboot "<%= @auto_reboot %>"; + + +// Use apt bandwidth limit feature, this example limits the download +// speed to 70kb/sec +<% if @dl_limit != "NONE" %>Acquire::http::Dl-Limit "<%= @dl_limit %>";<% end %> diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apt/templates/pin.pref.erb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apt/templates/pin.pref.erb new file mode 100644 index 00000000000..eed0c10db67 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apt/templates/pin.pref.erb @@ -0,0 +1,22 @@ +<%- +@pin = "release a=#{@name}" # default value +if @pin_release.length > 0 + options = [] + options.push("a=#{@release}") if @release.length > 0 + options.push("n=#{@codename}") if @codename.length > 0 + options.push("v=#{@release_version}") if @release_version.length > 0 + options.push("c=#{@component}") if @component.length > 0 + options.push("o=#{@originator}") if @originator.length > 0 + options.push("l=#{@label}") if @label.length > 0 + @pin = "release #{options.join(', ')}" +elsif @version.length > 0 + @pin = "version #{@version}" +elsif @origin.length > 0 + @pin = "origin #{@origin}" +end +-%> +# <%= @name %> +Explanation: <%= @explanation %> +Package: <%= @packages %> +Pin: <%= @pin %> +Pin-Priority: <%= @priority %> diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apt/templates/source.list.erb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apt/templates/source.list.erb new file mode 100644 index 00000000000..9946966ee53 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apt/templates/source.list.erb @@ -0,0 +1,5 @@ +# <%= @name %> +deb <% if @architecture %>[arch=<%= @architecture %>] <% end %><%= @location %> <%= @release_real %> <%= @repos %> +<%- if @include_src then -%> +deb-src <% if @architecture %>[arch=<%= @architecture %>] <% end %><%= @location %> <%= @release_real %> <%= @repos %> +<%- end -%> diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apt/tests/builddep.pp b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apt/tests/builddep.pp new file mode 100644 index 00000000000..8b4f7964081 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apt/tests/builddep.pp @@ -0,0 +1,2 @@ +class { 'apt': } +apt::builddep{ 'glusterfs-server': } diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apt/tests/debian/testing.pp b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apt/tests/debian/testing.pp new file mode 100644 index 00000000000..8245b3a337b --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apt/tests/debian/testing.pp @@ -0,0 +1,2 @@ +class { 'apt': } +class { 'apt::debian::testing': } diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apt/tests/debian/unstable.pp b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apt/tests/debian/unstable.pp new file mode 100644 index 00000000000..86051792951 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apt/tests/debian/unstable.pp @@ -0,0 +1,2 @@ +class { 'apt': } +class { 'apt::debian::unstable': } diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apt/tests/force.pp b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apt/tests/force.pp new file mode 100644 index 00000000000..59ad8f1b573 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apt/tests/force.pp @@ -0,0 +1,17 @@ +# force.pp + +# force a package from a specific release +apt::force { 'package1': + release => 'backports', +} + +# force a package to be a specific version +apt::force { 'package2': + version => '1.0.0-1', +} + +# force a package from a specific release to be a specific version +apt::force { 'package3': + release => 'sid', + version => '2.0.0-1', +} diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apt/tests/init.pp b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apt/tests/init.pp new file mode 100644 index 00000000000..abc75afa25a --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apt/tests/init.pp @@ -0,0 +1 @@ +class { 'apt': } diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apt/tests/key.pp b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apt/tests/key.pp new file mode 100644 index 00000000000..79e0e1b749a --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apt/tests/key.pp @@ -0,0 +1,6 @@ +# Declare Apt key for apt.puppetlabs.com source +apt::key { 'puppetlabs': + key => '4BD6EC30', + key_server => 'pgp.mit.edu', + key_options => 'http-proxy="http://proxyuser:proxypass@example.org:3128"', +} diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apt/tests/params.pp b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apt/tests/params.pp new file mode 100644 index 00000000000..5ddf3c65512 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apt/tests/params.pp @@ -0,0 +1 @@ +include apt::params diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apt/tests/pin.pp b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apt/tests/pin.pp new file mode 100644 index 00000000000..6a9024c2343 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apt/tests/pin.pp @@ -0,0 +1,5 @@ +# pin a release in apt, useful for unstable repositories +apt::pin { 'foo': + packages => '*', + priority => 0, +} diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apt/tests/ppa.pp b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apt/tests/ppa.pp new file mode 100644 index 00000000000..e728f6f10f5 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apt/tests/ppa.pp @@ -0,0 +1,4 @@ +class { 'apt': } + +# Example declaration of an Apt PPA +apt::ppa{ 'ppa:openstack-ppa/bleeding-edge': } diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apt/tests/release.pp b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apt/tests/release.pp new file mode 100644 index 00000000000..823f5861fa1 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apt/tests/release.pp @@ -0,0 +1,4 @@ +class { 'apt': } +class { 'apt::release': + release_id => 'karmic' +} diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apt/tests/source.pp b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apt/tests/source.pp new file mode 100644 index 00000000000..c20b59662a0 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apt/tests/source.pp @@ -0,0 +1,29 @@ +# Declare the apt class to manage /etc/apt/sources.list and /etc/sources.list.d +class { 'apt': } + +# Install the puppetlabs apt source +# Release is automatically obtained from lsbdistcodename fact if available. +apt::source { 'puppetlabs': + location => 'http://apt.puppetlabs.com', + repos => 'main', + key => '4BD6EC30', + key_server => 'pgp.mit.edu', +} + +# test two sources with the same key +apt::source { 'debian_testing': + location => 'http://debian.mirror.iweb.ca/debian/', + release => 'testing', + repos => 'main contrib non-free', + key => '46925553', + key_server => 'subkeys.pgp.net', + pin => '-10', +} +apt::source { 'debian_unstable': + location => 'http://debian.mirror.iweb.ca/debian/', + release => 'unstable', + repos => 'main contrib non-free', + key => '46925553', + key_server => 'subkeys.pgp.net', + pin => '-10', +} diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apt/tests/unattended_upgrades.pp b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apt/tests/unattended_upgrades.pp new file mode 100644 index 00000000000..3b9b49eb72a --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/apt/tests/unattended_upgrades.pp @@ -0,0 +1 @@ +include apt::unattended_upgrades diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/beanstalkd/.travis.yml b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/beanstalkd/.travis.yml new file mode 100644 index 00000000000..788946406c9 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/beanstalkd/.travis.yml @@ -0,0 +1,26 @@ +language: ruby +rvm: + - "1.8.7" +# life with later versions of ruby gets interesting with 2.6..so lets +# ignore them for now +# - "1.9.2" +# - "1.9.3" +# - ruby-head ..that doesnt work. would be nice to do "current" + +env: +#find versions here https://rubygems.org/gems/puppet/versions +# spec_helper pretty much fails on these earlier versions. +# - PUPPET_VERSION=0.24.5 +# - PUPPET_VERSION=0.25.5 + - PUPPET_VERSION=2.6.18 + - PUPPET_VERSION=2.7.21 + - PUPPET_VERSION=3.1.1 + + +before_script: + - cd beanstalkd + - bundle install + - bundle show + +script: + - bundle exec rake diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/beanstalkd/Gemfile b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/beanstalkd/Gemfile new file mode 100644 index 00000000000..c9aabd4b8ce --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/beanstalkd/Gemfile @@ -0,0 +1,12 @@ +source 'https://rubygems.org' + +puppetversion = ENV.key?('PUPPET_VERSION') ? "= #{ENV['PUPPET_VERSION']}" : ['>= 2.7'] + + +gem 'rake' +gem 'rspec-expectations' +gem 'rspec' +gem 'facter' +gem 'puppet', puppetversion +gem 'rspec-puppet' +gem 'puppetlabs_spec_helper' diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/beanstalkd/README.md b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/beanstalkd/README.md new file mode 100644 index 00000000000..6abbcb7fb2a --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/beanstalkd/README.md @@ -0,0 +1,68 @@ +puppet-beanstalkd +================= +[![Build Status](https://travis-ci.org/keen99/puppet-beanstalkd.png?branch=master)](https://travis-ci.org/keen99/puppet-beanstalkd) + +puppet module for managing beanstalkd, a simple and fast work queue - https://github.com/kr/beanstalkd + + +## Supported OSes + +redhat/centos and debian/ubuntu currently. Please PR updates for others! + +Requires packages (rpm, etc) with traditional init scripts supported by service{} for your OS. + + +## Basic Usage + +Drop the beanstalkd directory into your modules tree and realize the define: + + beanstalkd::config{"my beanstalk install": } + +## Optional parameters + + listenaddress => '0.0.0.0', + listenport => '13000', + maxjobsize => '65535', + maxconnections => '1024', + binlogdir => '/var/lib/beanstalkd/binlog', # set empty ( '' ) to disable binlog + binlogfsync => undef, + binlogsize => '10485760', + ensure => 'running', # running, stopped, absent + packageversion => 'latest', # latest, present, or specific version + packagename => undef, # override package name + servicename => undef # override service name + + + + + +## Tests + +To run unit tests, cd into beanstalkd and execute "run-tests.sh" + +Requires ruby and bundler, everything else should get installed by the test. + +``` +$$ puppet-beanstalkd/beanstalkd# ./run-tests.sh +Using rake (10.0.4) +Using diff-lcs (1.2.4) +Using facter (1.7.0) +Using json_pure (1.7.7) +Using hiera (1.2.1) +Using metaclass (0.0.1) +Using mocha (0.13.3) +Using puppet (3.1.1) +Using rspec-core (2.13.1) +Using rspec-expectations (2.13.0) +Using rspec-mocks (2.13.1) +Using rspec (2.13.0) +Using rspec-puppet (0.1.6) +Using puppetlabs_spec_helper (0.4.1) +Using bundler (1.1.4) +Your bundle is complete! Use `bundle show [gemname]` to see where a bundled gem is installed. +/usr/bin/ruby1.9.1 -S rspec spec/defines/config_spec.rb +................... + +Finished in 0.84772 seconds +19 examples, 0 failures +``` diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/beanstalkd/Rakefile b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/beanstalkd/Rakefile new file mode 100644 index 00000000000..f6d5a0c4636 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/beanstalkd/Rakefile @@ -0,0 +1,10 @@ +require 'rake' + +require 'rspec/core/rake_task' + +task :default => [:spec] + + +RSpec::Core::RakeTask.new(:spec) do |t| + t.pattern = 'spec/*/*_spec.rb' +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/beanstalkd/manifests/init.pp b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/beanstalkd/manifests/init.pp new file mode 100644 index 00000000000..fc57ab851a4 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/beanstalkd/manifests/init.pp @@ -0,0 +1,124 @@ + +# usage: +# +# beanstalkd::config { name: +# listenaddress => '0.0.0.0', +# listenport => '13000', +# maxjobsize => '65535', +# maxconnections => '1024', +# binlogdir => '/var/lib/beanstalkd/binlog', +# binlogfsync => undef, +# binlogsize => '10485760', +# ensure => 'running', # running, stopped, absent +# packageversion => 'latest', # latest, present, or specific version +# packagename => undef, # override package name +# servicename => undef # override service name +# } + + +define beanstalkd::config ( # name + $listenaddress = '0.0.0.0', + $listenport = '13000', + $maxjobsize = '65535', + $maxconnections = '1024', # results in open file limit + $binlogdir = '/var/lib/beanstalkd/binlog', # set empty ( '' ) to disable binlog + $binlogfsync = undef, # unset = no explicit fsync + $binlogsize = '10485760', + # + $ensure = 'running', # running, stopped, absent + $packageversion = 'latest', # latest, present, or specific version + $packagename = undef, # got your own custom package? override the default name/service here. + $servicename = undef +) { + + case $::operatingsystem { + ubuntu, debian: { + $defaultpackagename = 'beanstalkd' + $defaultservicename = 'beanstalkd' + $user = 'beanstalkd' + $configfile = '/etc/default/beanstalkd' + $configtemplate = "${module_name}/debian/beanstalkd_default.erb" # please create me! + $hasstatus = 'true' + $restart = '/etc/init.d/beanstalkd restart' + } + centos, redhat: { + $defaultpackagename = 'beanstalkd' + $defaultservicename = 'beanstalkd' + $user = 'beanstalkd' + $configfile = '/etc/sysconfig/beanstalkd' + $configtemplate = "${module_name}/redhat/beanstalkd_sysconfig.erb" + $hasstatus = 'true' + $restart = '/etc/init.d/beanstalkd restart' + } + # TODO: add more OS support! + default: { + fail("ERROR [${module_name}]: I don't know how to manage this OS: ${::operatingsystem}") + } + } + + # simply the users experience for running/stopped/absent, and use ensure to cover those bases + case $ensure { + absent: { + $ourpackageversion = 'absent' + $serviceenable = 'false' + $serviceensure = 'stopped' + $fileensure = 'absent' + } + running: { + $serviceenable = 'true' + $serviceensure = 'running' + $fileensure = 'present' + } + stopped: { + $serviceenable = 'false' + $serviceensure = 'stopped' + $fileensure = 'present' + } + default: { + fail("ERROR [${module_name}]: enable must be one of: running stopped absent") + } + } + + # for packageversion, use what's configured unless we're set (which should only be in the absent case..) + if ! $ourpackageversion { + $ourpackageversion = $packageversion + } + + # for service and package name - if we've specified one, use it. else use the default + if $packagename == undef { + $ourpackagename = $defaultpackagename + } else { + $ourpackagename = $packagename + } + + if $servicename == undef { + $ourservicename = $defaultservicename + } else { + $ourservicename = $servicename + } + + package { $ourpackagename: + ensure => $ourpackageversion + } + + service { $ourservicename: + enable => $serviceenable, + ensure => $serviceensure, + hasstatus => $hasstatus, + restart => $restart, + subscribe => [ + Package[$ourpackagename], + File[$configfile] + ], + } + + file { $configfile: + content => template($configtemplate), + owner => 'root', + group => 'root', + mode => 0644, + ensure => $fileensure, + require => Package[$ourpackagename], + } + +} diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/beanstalkd/run-tests.sh b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/beanstalkd/run-tests.sh new file mode 100755 index 00000000000..89896b94fba --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/beanstalkd/run-tests.sh @@ -0,0 +1,20 @@ +#!/usr/bin/env sh + +bundle="bundle" +gotbundle=0 +for i in $(echo "$PATH" | tr ":" " ") + do + if [ -e $i/$bundle ] + then + gotbundle=1 + break + fi +done +if [ $gotbundle = 0 ] + then + echo "ERROR: please install 'bundler' for ruby from http://gembundler.com/ and make sure '$bundle' is in your path" + exit 1 +fi + +$bundle install || exit $? +$bundle exec rake || exit $? diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/beanstalkd/spec/defines/config_spec.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/beanstalkd/spec/defines/config_spec.rb new file mode 100644 index 00000000000..e70c3fe40f3 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/beanstalkd/spec/defines/config_spec.rb @@ -0,0 +1,80 @@ +require 'spec_helper' + + +describe 'beanstalkd::config' do + let (:title) {'a title is required'} + + #basic OS support testing + context "on Debian" do + let (:facts) { { :operatingsystem => 'debian' } } + it { should contain_package('beanstalkd').with_ensure('latest') } + it { should contain_service('beanstalkd').with_ensure('running') } + end + context "on redhat" do + let (:facts) { { :operatingsystem => 'debian' } } + it { should contain_package('beanstalkd').with_ensure('latest') } + it { should contain_service('beanstalkd').with_ensure('running') } + end + context "on ubuntu" do + let (:facts) { { :operatingsystem => 'ubuntu' } } + it { should contain_package('beanstalkd').with_ensure('latest') } + it { should contain_service('beanstalkd').with_ensure('running') } + end + context "on centos" do + let (:facts) { { :operatingsystem => 'centos' } } + it { should contain_package('beanstalkd').with_ensure('latest') } + it { should contain_service('beanstalkd').with_ensure('running') } + end + context "on unsupported OS" do + let (:facts) { { :operatingsystem => 'unsupported' } } + it { expect { raise_error(Puppet::Error) } } + end + + #now lets test our various parameters - for the most part this shouldn't care what OS it is + #if your OS support needs more specific testing, do it! + + #ensure testing - remember this does both service and packages, so test both + context "on redhat, ensure absent" do + let (:facts) { { :operatingsystem => 'redhat' } } + let(:params) { { :ensure => 'absent' } } + it { should contain_package('beanstalkd').with_ensure('absent') } + it { should contain_service('beanstalkd').with_ensure('stopped') } + end + context "on redhat, ensure running" do + let (:facts) { { :operatingsystem => 'redhat' } } + let(:params) { { :ensure => 'running' } } + it { should contain_package('beanstalkd').with_ensure('latest') } + it { should contain_service('beanstalkd').with_ensure('running') } + end + context "on redhat, ensure stopped" do + let (:facts) { { :operatingsystem => 'redhat' } } + let(:params) { { :ensure => 'stopped' } } + it { should contain_package('beanstalkd').with_ensure('latest') } + it { should contain_service('beanstalkd').with_ensure('stopped') } + end + context "on redhat, ensure broken" do + let (:facts) { { :operatingsystem => 'redhat' } } + let(:params) { { :ensure => 'broken' } } + it { expect { raise_error(Puppet::Error) } } + end + + #custom package/service names + context "on redhat, servicename testbeans" do + let (:facts) { { :operatingsystem => 'redhat' } } + let(:params) { { :servicename => 'testbeans' } } + it { should contain_service('testbeans').with_ensure('running') } + end + context "on redhat, packagename testbeans" do + let (:facts) { { :operatingsystem => 'redhat' } } + let(:params) { { :packagename => 'testbeans' } } + it { should contain_package('testbeans').with_ensure('latest') } + end + #and custom version + context "on redhat, package version" do + let (:facts) { { :operatingsystem => 'redhat' } } + let(:params) { { :packageversion => 'testversion' } } + it { should contain_package('beanstalkd').with_ensure('testversion') } + end + + +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/beanstalkd/spec/fixtures/manifests/site.pp b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/beanstalkd/spec/fixtures/manifests/site.pp new file mode 100644 index 00000000000..e69de29bb2d diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/beanstalkd/spec/fixtures/modules/beanstalkd/manifests/init.pp b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/beanstalkd/spec/fixtures/modules/beanstalkd/manifests/init.pp new file mode 100644 index 00000000000..fc57ab851a4 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/beanstalkd/spec/fixtures/modules/beanstalkd/manifests/init.pp @@ -0,0 +1,124 @@ + +# usage: +# +# beanstalkd::config { name: +# listenaddress => '0.0.0.0', +# listenport => '13000', +# maxjobsize => '65535', +# maxconnections => '1024', +# binlogdir => '/var/lib/beanstalkd/binlog', +# binlogfsync => undef, +# binlogsize => '10485760', +# ensure => 'running', # running, stopped, absent +# packageversion => 'latest', # latest, present, or specific version +# packagename => undef, # override package name +# servicename => undef # override service name +# } + + +define beanstalkd::config ( # name + $listenaddress = '0.0.0.0', + $listenport = '13000', + $maxjobsize = '65535', + $maxconnections = '1024', # results in open file limit + $binlogdir = '/var/lib/beanstalkd/binlog', # set empty ( '' ) to disable binlog + $binlogfsync = undef, # unset = no explicit fsync + $binlogsize = '10485760', + # + $ensure = 'running', # running, stopped, absent + $packageversion = 'latest', # latest, present, or specific version + $packagename = undef, # got your own custom package? override the default name/service here. + $servicename = undef +) { + + case $::operatingsystem { + ubuntu, debian: { + $defaultpackagename = 'beanstalkd' + $defaultservicename = 'beanstalkd' + $user = 'beanstalkd' + $configfile = '/etc/default/beanstalkd' + $configtemplate = "${module_name}/debian/beanstalkd_default.erb" # please create me! + $hasstatus = 'true' + $restart = '/etc/init.d/beanstalkd restart' + } + centos, redhat: { + $defaultpackagename = 'beanstalkd' + $defaultservicename = 'beanstalkd' + $user = 'beanstalkd' + $configfile = '/etc/sysconfig/beanstalkd' + $configtemplate = "${module_name}/redhat/beanstalkd_sysconfig.erb" + $hasstatus = 'true' + $restart = '/etc/init.d/beanstalkd restart' + } + # TODO: add more OS support! + default: { + fail("ERROR [${module_name}]: I don't know how to manage this OS: ${::operatingsystem}") + } + } + + # simply the users experience for running/stopped/absent, and use ensure to cover those bases + case $ensure { + absent: { + $ourpackageversion = 'absent' + $serviceenable = 'false' + $serviceensure = 'stopped' + $fileensure = 'absent' + } + running: { + $serviceenable = 'true' + $serviceensure = 'running' + $fileensure = 'present' + } + stopped: { + $serviceenable = 'false' + $serviceensure = 'stopped' + $fileensure = 'present' + } + default: { + fail("ERROR [${module_name}]: enable must be one of: running stopped absent") + } + } + + # for packageversion, use what's configured unless we're set (which should only be in the absent case..) + if ! $ourpackageversion { + $ourpackageversion = $packageversion + } + + # for service and package name - if we've specified one, use it. else use the default + if $packagename == undef { + $ourpackagename = $defaultpackagename + } else { + $ourpackagename = $packagename + } + + if $servicename == undef { + $ourservicename = $defaultservicename + } else { + $ourservicename = $servicename + } + + package { $ourpackagename: + ensure => $ourpackageversion + } + + service { $ourservicename: + enable => $serviceenable, + ensure => $serviceensure, + hasstatus => $hasstatus, + restart => $restart, + subscribe => [ + Package[$ourpackagename], + File[$configfile] + ], + } + + file { $configfile: + content => template($configtemplate), + owner => 'root', + group => 'root', + mode => 0644, + ensure => $fileensure, + require => Package[$ourpackagename], + } + +} diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/beanstalkd/spec/fixtures/modules/beanstalkd/templates/debian/beanstalkd_default.erb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/beanstalkd/spec/fixtures/modules/beanstalkd/templates/debian/beanstalkd_default.erb new file mode 100644 index 00000000000..c532f47bd80 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/beanstalkd/spec/fixtures/modules/beanstalkd/templates/debian/beanstalkd_default.erb @@ -0,0 +1,123 @@ +#!/bin/sh +##based loosely on my sysconfig and initd scripts from centos, but tweaked to work without having to +##hack up the debian init script. -keen99 4/2013 + +<% if @maxconnections -%> +BEANSTALKD_MAXCONNECTIONS=<%= @maxconnections %> +<% else -%> +#use default ulimit +#BEANSTALKD_MAXCONNECTIONS=1024 +<% end -%> + + +BEANSTALKD_ADDR=<%= @listenaddress %> +BEANSTALKD_PORT=<%= @listenport %> +BEANSTALKD_USER=<%= @user %> + +# Job size is left to the default. Uncomment and set it +# to a value to have it take affect. +<% if @maxjobsize -%> +BEANSTALKD_MAX_JOB_SIZE=<%= @maxjobsize %> +<% else -%> +#use default +#BEANSTALKD_MAX_JOB_SIZE=65535 +<% end -%> + +# Using the binlog is off by default. +# +# The direcory to house the binlog. +<% if @binlogdir -%> +BEANSTALKD_BINLOG_DIR=<%= @binlogdir %> +<% else -%> +#use default +#BEANSTALKD_BINLOG_DIR=/var/lib/beanstalkd/binlog +<% end -%> + +# fsync the binlog at most once every N milliseconds. +# setting this to 0 means 'always fsync'. If this is unset, +# and the binlog is used, then no explicit fsync is ever +# performed. That is, the -F option is used. +<% if @binlogfsync -%> +BEANSTALKD_BINLOG_FSYNC_PERIOD=<%= @bbinlogfsync %> +<% else -%> +#use default +#BEANSTALKD_BINLOG_FSYNC_PERIOD= +<% end -%> + +# The size of each binlog file. This is rounded +# up to the nearest 512 byte boundary. +<% if @binlogsize -%> +BEANSTALKD_BINLOG_SIZE=<%= @binlogsize %> +<% else -%> +#use default +#BEANSTALKD_BINLOG_SIZE=10485760 +<% end -%> + + + + +##the debian init script leaves everything to be desired. so lets put our setup logic here. + +case "$1" in + start|restart|force-reload|reload) + exec=$DAEMON + [ -x $exec ] || exit 5 + + # if not running, start it up here, usually something like "daemon $exec" + options="-l ${BEANSTALKD_ADDR} -p ${BEANSTALKD_PORT} -u ${BEANSTALKD_USER}" + if [ "${BEANSTALKD_MAX_JOB_SIZE}" != "" ]; then + options="${options} -z ${BEANSTALKD_MAX_JOB_SIZE}" + fi + + if [ "${BEANSTALKD_BINLOG_DIR}" != "" ]; then + if [ ! -d "${BEANSTALKD_BINLOG_DIR}" ]; then + echo "Creating binlog directory (${BEANSTALKD_BINLOG_DIR})" + mkdir -p ${BEANSTALKD_BINLOG_DIR} && chown ${BEANSTALKD_USER}:${BEANSTALKD_USER} ${BEANSTALKD_BINLOG_DIR} + fi + options="${options} -b ${BEANSTALKD_BINLOG_DIR}" + if [ "${BEANSTALKD_BINLOG_FSYNC_PERIOD}" != "" ]; then + options="${options} -f ${BEANSTALKD_BINLOG_FSYNC_PERIOD}" + else + options="${options} -F" + fi + if [ "${BEANSTALKD_BINLOG_SIZE}" != "" ]; then + options="${options} -s ${BEANSTALKD_BINLOG_SIZE}" + fi + + ##1.4.6 at least is prone to leave a lock file around after shutting down + ##this breaks startup after upgrade to 1.5, so work around this + ##unknown if this happens w/o binlog enabled... + #check for stale lock file in binlog + if [ -e "${BEANSTALKD_BINLOG_DIR}/lock" ] + then + if ! ps xa| grep -v grep | grep -q $exec + then + echo "found old lock file and beanstalk isn't running - deleting it" + rm -f ${BEANSTALKD_BINLOG_DIR}/lock + fi + fi + fi + + if [ -n "${BEANSTALKD_MAXCONNECTIONS}" ]; then + #increase open files ulimit to support higher concurrent connections + echo "increasing open file limit to $BEANSTALKD_MAXCONNECTIONS" + ulimit -n $BEANSTALKD_MAXCONNECTIONS + fi + + DAEMON_OPTS="-l $BEANSTALKD_LISTEN_ADDR -p $BEANSTALKD_LISTEN_PORT" + DAEMON_OPTS="$options" + + ;; + *) + #nothing, please keep moving + ;; +esac + + + +DAEMONUSER=$BEANSTALKD_USER + + +## Uncomment to enable startup during boot. +START=yes + diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/beanstalkd/spec/fixtures/modules/beanstalkd/templates/redhat/beanstalkd_sysconfig.erb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/beanstalkd/spec/fixtures/modules/beanstalkd/templates/redhat/beanstalkd_sysconfig.erb new file mode 100644 index 00000000000..6e3bb422ec6 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/beanstalkd/spec/fixtures/modules/beanstalkd/templates/redhat/beanstalkd_sysconfig.erb @@ -0,0 +1,56 @@ +# System configuration for the beanstalkd daemon + +# Available options correspond to the options to the +# beanstalkd commandline. + +<% if @maxconnections -%> +BEANSTALKD_MAXCONNECTIONS=<%= @maxconnections %> +<% else -%> +#use default ulimit +#BEANSTALKD_MAXCONNECTIONS=1024 +<% end -%> + + +BEANSTALKD_ADDR=<%= @listenaddress %> +BEANSTALKD_PORT=<%= @listenport %> +BEANSTALKD_USER=<%= @user %> + +# Job size is left to the default. Uncomment and set it +# to a value to have it take affect. +<% if @maxjobsize -%> +BEANSTALKD_MAX_JOB_SIZE=<%= @maxjobsize %> +<% else -%> +#use default +#BEANSTALKD_MAX_JOB_SIZE=65535 +<% end -%> + +# Using the binlog is off by default. +# +# The direcory to house the binlog. +<% if @binlogdir -%> +BEANSTALKD_BINLOG_DIR=<%= @binlogdir %> +<% else -%> +#use default +#BEANSTALKD_BINLOG_DIR=/var/lib/beanstalkd/binlog +<% end -%> + +# fsync the binlog at most once every N milliseconds. +# setting this to 0 means 'always fsync'. If this is unset, +# and the binlog is used, then no explicit fsync is ever +# performed. That is, the -F option is used. +<% if @binlogfsync -%> +BEANSTALKD_BINLOG_FSYNC_PERIOD=<%= @bbinlogfsync %> +<% else -%> +#use default +#BEANSTALKD_BINLOG_FSYNC_PERIOD= +<% end -%> + +# The size of each binlog file. This is rounded +# up to the nearest 512 byte boundary. +<% if @binlogsize -%> +BEANSTALKD_BINLOG_SIZE=<%= @binlogsize %> +<% else -%> +#use default +#BEANSTALKD_BINLOG_SIZE=10485760 +<% end -%> + diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/beanstalkd/spec/spec_helper.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/beanstalkd/spec/spec_helper.rb new file mode 100644 index 00000000000..d3923f8306f --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/beanstalkd/spec/spec_helper.rb @@ -0,0 +1,8 @@ +require 'rspec-puppet' + +fixture_path = File.expand_path(File.join(__FILE__, '..', 'fixtures')) + +RSpec.configure do |c| + c.module_path = File.join(fixture_path, 'modules') + c.manifest_dir = File.join(fixture_path, 'manifests') +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/beanstalkd/templates/debian/beanstalkd_default.erb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/beanstalkd/templates/debian/beanstalkd_default.erb new file mode 100644 index 00000000000..c532f47bd80 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/beanstalkd/templates/debian/beanstalkd_default.erb @@ -0,0 +1,123 @@ +#!/bin/sh +##based loosely on my sysconfig and initd scripts from centos, but tweaked to work without having to +##hack up the debian init script. -keen99 4/2013 + +<% if @maxconnections -%> +BEANSTALKD_MAXCONNECTIONS=<%= @maxconnections %> +<% else -%> +#use default ulimit +#BEANSTALKD_MAXCONNECTIONS=1024 +<% end -%> + + +BEANSTALKD_ADDR=<%= @listenaddress %> +BEANSTALKD_PORT=<%= @listenport %> +BEANSTALKD_USER=<%= @user %> + +# Job size is left to the default. Uncomment and set it +# to a value to have it take affect. +<% if @maxjobsize -%> +BEANSTALKD_MAX_JOB_SIZE=<%= @maxjobsize %> +<% else -%> +#use default +#BEANSTALKD_MAX_JOB_SIZE=65535 +<% end -%> + +# Using the binlog is off by default. +# +# The direcory to house the binlog. +<% if @binlogdir -%> +BEANSTALKD_BINLOG_DIR=<%= @binlogdir %> +<% else -%> +#use default +#BEANSTALKD_BINLOG_DIR=/var/lib/beanstalkd/binlog +<% end -%> + +# fsync the binlog at most once every N milliseconds. +# setting this to 0 means 'always fsync'. If this is unset, +# and the binlog is used, then no explicit fsync is ever +# performed. That is, the -F option is used. +<% if @binlogfsync -%> +BEANSTALKD_BINLOG_FSYNC_PERIOD=<%= @bbinlogfsync %> +<% else -%> +#use default +#BEANSTALKD_BINLOG_FSYNC_PERIOD= +<% end -%> + +# The size of each binlog file. This is rounded +# up to the nearest 512 byte boundary. +<% if @binlogsize -%> +BEANSTALKD_BINLOG_SIZE=<%= @binlogsize %> +<% else -%> +#use default +#BEANSTALKD_BINLOG_SIZE=10485760 +<% end -%> + + + + +##the debian init script leaves everything to be desired. so lets put our setup logic here. + +case "$1" in + start|restart|force-reload|reload) + exec=$DAEMON + [ -x $exec ] || exit 5 + + # if not running, start it up here, usually something like "daemon $exec" + options="-l ${BEANSTALKD_ADDR} -p ${BEANSTALKD_PORT} -u ${BEANSTALKD_USER}" + if [ "${BEANSTALKD_MAX_JOB_SIZE}" != "" ]; then + options="${options} -z ${BEANSTALKD_MAX_JOB_SIZE}" + fi + + if [ "${BEANSTALKD_BINLOG_DIR}" != "" ]; then + if [ ! -d "${BEANSTALKD_BINLOG_DIR}" ]; then + echo "Creating binlog directory (${BEANSTALKD_BINLOG_DIR})" + mkdir -p ${BEANSTALKD_BINLOG_DIR} && chown ${BEANSTALKD_USER}:${BEANSTALKD_USER} ${BEANSTALKD_BINLOG_DIR} + fi + options="${options} -b ${BEANSTALKD_BINLOG_DIR}" + if [ "${BEANSTALKD_BINLOG_FSYNC_PERIOD}" != "" ]; then + options="${options} -f ${BEANSTALKD_BINLOG_FSYNC_PERIOD}" + else + options="${options} -F" + fi + if [ "${BEANSTALKD_BINLOG_SIZE}" != "" ]; then + options="${options} -s ${BEANSTALKD_BINLOG_SIZE}" + fi + + ##1.4.6 at least is prone to leave a lock file around after shutting down + ##this breaks startup after upgrade to 1.5, so work around this + ##unknown if this happens w/o binlog enabled... + #check for stale lock file in binlog + if [ -e "${BEANSTALKD_BINLOG_DIR}/lock" ] + then + if ! ps xa| grep -v grep | grep -q $exec + then + echo "found old lock file and beanstalk isn't running - deleting it" + rm -f ${BEANSTALKD_BINLOG_DIR}/lock + fi + fi + fi + + if [ -n "${BEANSTALKD_MAXCONNECTIONS}" ]; then + #increase open files ulimit to support higher concurrent connections + echo "increasing open file limit to $BEANSTALKD_MAXCONNECTIONS" + ulimit -n $BEANSTALKD_MAXCONNECTIONS + fi + + DAEMON_OPTS="-l $BEANSTALKD_LISTEN_ADDR -p $BEANSTALKD_LISTEN_PORT" + DAEMON_OPTS="$options" + + ;; + *) + #nothing, please keep moving + ;; +esac + + + +DAEMONUSER=$BEANSTALKD_USER + + +## Uncomment to enable startup during boot. +START=yes + diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/beanstalkd/templates/redhat/beanstalkd_sysconfig.erb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/beanstalkd/templates/redhat/beanstalkd_sysconfig.erb new file mode 100644 index 00000000000..6e3bb422ec6 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/beanstalkd/templates/redhat/beanstalkd_sysconfig.erb @@ -0,0 +1,56 @@ +# System configuration for the beanstalkd daemon + +# Available options correspond to the options to the +# beanstalkd commandline. + +<% if @maxconnections -%> +BEANSTALKD_MAXCONNECTIONS=<%= @maxconnections %> +<% else -%> +#use default ulimit +#BEANSTALKD_MAXCONNECTIONS=1024 +<% end -%> + + +BEANSTALKD_ADDR=<%= @listenaddress %> +BEANSTALKD_PORT=<%= @listenport %> +BEANSTALKD_USER=<%= @user %> + +# Job size is left to the default. Uncomment and set it +# to a value to have it take affect. +<% if @maxjobsize -%> +BEANSTALKD_MAX_JOB_SIZE=<%= @maxjobsize %> +<% else -%> +#use default +#BEANSTALKD_MAX_JOB_SIZE=65535 +<% end -%> + +# Using the binlog is off by default. +# +# The direcory to house the binlog. +<% if @binlogdir -%> +BEANSTALKD_BINLOG_DIR=<%= @binlogdir %> +<% else -%> +#use default +#BEANSTALKD_BINLOG_DIR=/var/lib/beanstalkd/binlog +<% end -%> + +# fsync the binlog at most once every N milliseconds. +# setting this to 0 means 'always fsync'. If this is unset, +# and the binlog is used, then no explicit fsync is ever +# performed. That is, the -F option is used. +<% if @binlogfsync -%> +BEANSTALKD_BINLOG_FSYNC_PERIOD=<%= @bbinlogfsync %> +<% else -%> +#use default +#BEANSTALKD_BINLOG_FSYNC_PERIOD= +<% end -%> + +# The size of each binlog file. This is rounded +# up to the nearest 512 byte boundary. +<% if @binlogsize -%> +BEANSTALKD_BINLOG_SIZE=<%= @binlogsize %> +<% else -%> +#use default +#BEANSTALKD_BINLOG_SIZE=10485760 +<% end -%> + diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/composer/.fixtures.yml b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/composer/.fixtures.yml new file mode 100644 index 00000000000..c0123415c78 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/composer/.fixtures.yml @@ -0,0 +1,5 @@ +fixtures: + repositories: + git: "git://github.com/puppetlabs/puppetlabs-git" + symlinks: + composer: "#{source_dir}" diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/composer/.travis.yml b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/composer/.travis.yml new file mode 100644 index 00000000000..033f11dd3da --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/composer/.travis.yml @@ -0,0 +1,13 @@ +language: ruby +rvm: + - 1.9.3 +before_script: +after_script: +script: "bundle exec rake spec" +env: + - PUPPET_VERSION=2.7.23 + - PUPPET_VERSION=3.0.2 + - PUPPET_VERSION=3.2.4 + - PUPPET_VERSION=3.3.0 +notifications: + email: false diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/composer/CHANGELOG.md b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/composer/CHANGELOG.md new file mode 100644 index 00000000000..bd8105b1274 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/composer/CHANGELOG.md @@ -0,0 +1,133 @@ +v1.2.1 +====== +f44b7e5 Now also supports Amazon Linux (RedHat) + +9341805 Now `suhosin_enabled` parameter is correctly documented. + +v1.2.0 +====== +66b071a (HEAD, tag: 1.2.0, master) Bumping version to 1.2.0 + +166ec87 Updated README.md + +626ee43 (origin/master, origin/HEAD) Updated CHANGELOG format + +1364058 Moved CHANGELOG to markdown format + +6f21dcb Updated LICENSE file + +6209eb8 Added CHANGELOG file + +6307d5a Add parameter 'php_bin' to override name or path of php binary + +9e484e9 (origin/rspec_head_fixes, rspec_head_fixes) just match on errorname, not specific exception + +db4176e update specs for latest rspec-puppet 1.0.1+ + +v1.1.1 +====== +17b2309 (tag: 1.1.1) Update Modulefile + +d848038 Used puppetlabs/git >= 0.0.2 + +0d75cff doc updates for 1.1.0 release + +v1.1.0 +====== +3b46e4d (tag: 1.1.0) bumping version to 1.1.0 for refreshonly and user features + +5290e8e support setting exec user for project and exec + +6af1e25 ignore puppet module package folder + +c2106ec Add refreshonly parameter to exec + +v1.0.1 +====== +fb1fd04 (tag: 1.0.1) Bumped version to 1.0.1 + +bf43913 (origin/deprecated_erb_variables) fix deprecated variables in the exec erb template + +342b898 (origin/documentation_refactor) document refactor, add spec test information + +3677acc adding tests for new suhosin_enable param and Debian family + +de86c0d Only run augeas commands if suhosin is enabled + +v1.0.0 +====== +f5d214a (tag: 1.0.0) Bumping version to 1.0.0 + +12589bf fixes for travis-ci building + +5279b92 spec testing using rspec-puppet + +3069608 documentation updates for composer_home and previous PRs + +b5faa45 add a composer_home fact and use it to set up environment + +v0.1.1 +====== +dbc0c74 Bumping version to 0.1.1 + +b4833d6 no-custom-installers is deprecated in favor of no-plugins + +acdc73c dry up the composer binary download code + +41f3a7b CentOS isn't actually an $::osfamily value + +d54c0db PHP binary is provided by php-cli on RHEL systems + +v0.1.0 +====== +1e8f9f1 (tag: 0.1.0) Adding License file. + +523c28f (igalic/option-names, igalic-option-names) update readme with the new options + +3d2ddda double-negating option names is confusing + +be518cf (igalic/style, igalic-style) Fix puppet lint complaints + +4050077 There's no need for these files to be executable + +522e93c Updated temp path. + +bf0f9e7 Support centos/redhat + +f45e9de Support redhat/centos + +920d1ca Support redhat/centos + +v0.0.6 +====== +78643ef (tag: 0.0.6) Bumping version to 0.0.6 + +0fbfb53 Fixing bug where global path is overwritten by local scope. + +v0.0.5 +====== +ee4e49b (tag: 0.0.5) Bumping version to 0.0.5 + +17ca5ee Added varaible composer path to exec calls. + +v0.0.4 +====== +e94be5e (tag: 0.0.4) Bumping version to 0.0.4 + +a27e45f Fixed dry_run parameter + +28cfee8 Adding version parameter to project task README + +v0.0.3 +====== +4787b24 Bumping version to 0.0.3 + +4ee9547 (tag: 0.0.3) Fixing type in exec manifest. + +v0.0.2 +====== +974d2ad (tag: 0.0.2) Bumping version to 0.0.2 + +667eb18 Fixed README + +925aa97 Fixed Modulefile. diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/composer/Gemfile b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/composer/Gemfile new file mode 100644 index 00000000000..992fecaab8c --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/composer/Gemfile @@ -0,0 +1,17 @@ +#ruby=1.9.3@puppet-composer + +if ENV.key?('PUPPET_VERSION') + puppetversion = "= #{ENV['PUPPET_VERSION']}" +else + puppetversion = ['>= 2.7'] +end + +source 'https://rubygems.org' + +ruby '1.9.3' + +gem 'puppet', puppetversion +gem 'puppetlabs_spec_helper' +gem 'rspec-puppet', :github => 'rodjek/rspec-puppet', :ref => '03e94422fb9bbdd950d5a0bec6ead5d76e06616b' +gem 'mocha' +gem 'puppet-lint' diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/composer/LICENSE b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/composer/LICENSE new file mode 100644 index 00000000000..3cff4803690 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/composer/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2013 - 2014 Thomas Ploch + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/composer/Modulefile b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/composer/Modulefile new file mode 100644 index 00000000000..b1a9c8c49d6 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/composer/Modulefile @@ -0,0 +1,8 @@ +name 'tPl0ch-composer' +version '1.2.1' +dependency 'puppetlabs/git', '>= 0.0.2' +summary "This module provides the 'Composer' PHP dependency manager." +description "This module installs the 'Composer' PHP dependency manager and provides some custom types to create, update + and install projects. Until now the Debian and Redhat OS families are supported." +project_page "https://github.com/tPl0ch/puppet-composer" +author "tPl0ch - Thomas Ploch " diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/composer/README.md b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/composer/README.md new file mode 100644 index 00000000000..c142e258f0a --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/composer/README.md @@ -0,0 +1,155 @@ +# Composer Puppet Module + +[![Build Status](https://travis-ci.org/tPl0ch/puppet-composer.png?branch=master)](https://travis-ci.org/tPl0ch/puppet-composer) + +## Description + +The `puppet-composer` module installs the latest version of Composer from http://getcomposer.org. Composer is a dependency manager for PHP. + +## Supported Platforms + +* `Debian` +* `Redhat` +* `Centos` +* `Amazon Linux` + +## Installation + +#### Puppet Forge +We recommend installing using the Puppet Forge as it automatically satisfies dependencies. + + puppet module install --target-dir=/your/path/to/modules tPl0ch-composer + +#### Installation via git submodule +You can also install as a git submodule and handle the dependencies manually. See the [Dependencies](#dependencies) section below. + + git submodule add git://github.com/tPl0ch/puppet-composer.git modules/composer + +## Dependencies + +This module requires the following Puppet modules: + +* [`puppetlabs-git`](https://github.com/puppetlabs/puppetlabs-git/) + +And additional (for puppet version lower than 3.0.0) you need: + +* [`libaugeas`](http://augeas.net/) (For automatically updating php.ini settings for suhosin patch) + +## Usage +To install the `composer` binary globally in `/usr/local/bin` you only need to declare the `composer` class. We try to set some sane defaults. There are also a number of parameters you can tweak should the defaults not be sufficient. + +### Simple Include +To install the binary with the defaults you just need to include the following in your manifests: + + include composer + +### Full Include +Alternatively, you can set a number of options by declaring the class with parameters: + +```puppet +class { 'composer': + target_dir => '/usr/local/bin', + composer_file => 'composer', # could also be 'composer.phar' + download_method => 'curl', # or 'wget' + logoutput => false, + tmp_path => '/tmp', + php_package => 'php5-cli', + curl_package => 'curl', + wget_package => 'wget', + composer_home => '/root', + php_bin => 'php', # could also i.e. be 'php -d "apc.enable_cli=0"' for more fine grained control + suhosin_enabled => true, +} +``` + +### Creating Projects + +The `composer::project` definition provides a way to create projects in a target directory. + +```puppet +composer::project { 'silex': + project_name => 'fabpot/silex-skeleton', # REQUIRED + target_dir => '/vagrant/silex', # REQUIRED + version => '2.1.x-dev', # Some valid version string + prefer_source => true, + stability => 'dev', # Minimum stability setting + keep_vcs => false, # Keep the VCS information + dev => true, # Install dev dependencies + repository_url => 'http://repo.example.com', # Custom repository URL + user => undef, # Set the user to run as +} +``` + +#### Updating Packages + +The `composer::exec` definition provides a more generic wrapper arround composer `update` and `install` commands. The following example will update the `silex/silex` and `symfony/browser-kit` packages in the `/vagrant/silex` directory. You can omit `packages` to update the entire project. + +```puppet +composer::exec { 'silex-update': + cmd => 'update', # REQUIRED + cwd => '/vagrant/silex', # REQUIRED + packages => ['silex/silex', 'symfony/browser-kit'], # leave empty or omit to update whole project + prefer_source => false, # Only one of prefer_source or prefer_dist can be true + prefer_dist => false, # Only one of prefer_source or prefer_dist can be true + dry_run => false, # Just simulate actions + custom_installers => false, # No custom installers + scripts => false, # No script execution + interaction => false, # No interactive questions + optimize => false, # Optimize autoloader + dev => false, # Install dev dependencies + user => undef, # Set the user to run as + refreshonly => false, # Only run on refresh +} +``` + +#### Installing Packages + +We support the `install` command in addition to `update`. The install command will ignore the `packages` parameter and the following example is the equivalent to running `composer install` in the `/vagrant/silex` directory. + +```puppet +composer::exec { 'silex-install': + cmd => 'install', # REQUIRED + cwd => '/vagrant/silex', # REQUIRED + prefer_source => false, + prefer_dist => false, + dry_run => false, # Just simulate actions + custom_installers => false, # No custom installers + scripts => false, # No script execution + interaction => false, # No interactive questions + optimize => false, # Optimize autoloader + dev => false, # Install dev dependencies +} +``` + +## Development + +We have `rspec-puppet` and Travis CI setup for the project. To run the spec tests locally you need `bundler` installed: + +``` +gem install bundler +``` + +Then you can install the required gems: + +``` +bundle install +``` + +Finally, the tests can be run: + +``` +rake spec +``` + +## Contributing + +We welcome everyone to help develop this module. To contribute: + +* Fork this repository +* Add features and spec tests for them +* Commit to feature named branch +* Open a pull request outlining your changes and the reasoning for them + +## Todo + +* Add a `composer::require` type diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/composer/Rakefile b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/composer/Rakefile new file mode 100644 index 00000000000..1a388518f2e --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/composer/Rakefile @@ -0,0 +1,2 @@ +require 'puppet-lint/tasks/puppet-lint' +require 'puppetlabs_spec_helper/rake_tasks' diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/composer/lib/facter/composer_home.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/composer/lib/facter/composer_home.rb new file mode 100644 index 00000000000..b815cfa404f --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/composer/lib/facter/composer_home.rb @@ -0,0 +1,5 @@ +Facter.add(:composer_home) do + setcode do + ENV['HOME'] + end +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/composer/manifests/exec.pp b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/composer/manifests/exec.pp new file mode 100644 index 00000000000..82039e85575 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/composer/manifests/exec.pp @@ -0,0 +1,55 @@ +# == Type: composer::exec +# +# Either installs from composer.json or updates project or specific packages +# +# === Authors +# +# Thomas Ploch +# +# === Copyright +# +# Copyright 2013 Thomas Ploch +# +define composer::exec ( + $cmd, + $cwd, + $packages = [], + $prefer_source = false, + $prefer_dist = false, + $dry_run = false, + $custom_installers = false, + $scripts = false, + $optimize = false, + $interaction = false, + $dev = false, + $logoutput = false, + $verbose = false, + $refreshonly = false, + $user = undef, +) { + require composer + require git + + Exec { + path => "/bin:/usr/bin/:/sbin:/usr/sbin:${composer::target_dir}", + environment => "COMPOSER_HOME=${composer::composer_home}", + user => $user, + } + + if $cmd != 'install' and $cmd != 'update' { + fail("Only types 'install' and 'update' are allowed, ${cmd} given") + } + + if $prefer_source and $prefer_dist { + fail('Only one of \$prefer_source or \$prefer_dist can be true.') + } + + $command = "${composer::php_bin} ${composer::target_dir}/${composer::composer_file} ${cmd}" + + exec { "composer_update_${title}": + command => template('composer/exec.erb'), + cwd => $cwd, + logoutput => $logoutput, + refreshonly => $refreshonly + } +} diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/composer/manifests/init.pp b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/composer/manifests/init.pp new file mode 100644 index 00000000000..5b3a431921c --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/composer/manifests/init.pp @@ -0,0 +1,156 @@ +# == Class: composer +# +# The parameters for the composer class and corresponding definitions +# +# === Parameters +# +# Document parameters here. +# +# [*target_dir*] +# The target dir that composer should be installed to. +# Defaults to ```/usr/local/bin```. +# +# [*composer_file*] +# The name of the composer binary, which will reside in ```target_dir```. +# +# [*download_method*] +# Either ```curl``` or ```wget```. +# +# [*logoutput*] +# If the output should be logged. Defaults to FALSE. +# +# [*tmp_path*] +# Where the composer.phar file should be temporarily put. +# +# [*php_package*] +# The Package name of tht PHP CLI package. +# +# [*curl_package*] +# The name of the curl package to override the default set in the +# composer::params class. +# +# [*wget_package*] +# The name of the wget package to override the default set in the +# composer::params class. +# +# [*composer_home*] +# Folder to use as the COMPOSER_HOME environment variable. Default comes +# from our composer::params class which derives from our own $composer_home +# fact. The fact returns the current users $HOME environment variable. +# +# [*php_bin*] +# The name or path of the php binary to override the default set in the +# composer::params class. +# +# === Authors +# +# Thomas Ploch +# +class composer( + $target_dir = $composer::params::target_dir, + $composer_file = $composer::params::composer_file, + $download_method = $composer::params::download_method, + $logoutput = $composer::params::logoutput, + $tmp_path = $composer::params::tmp_path, + $php_package = $composer::params::php_package, + $curl_package = $composer::params::curl_package, + $wget_package = $composer::params::wget_package, + $composer_home = $composer::params::composer_home, + $php_bin = $composer::params::php_bin, + $suhosin_enabled = $composer::params::suhosin_enabled +) inherits composer::params { + + Exec { path => "/bin:/usr/bin/:/sbin:/usr/sbin:${target_dir}" } + + if defined(Package[$php_package]) == false { + package { $php_package: ensure => present, } + } + + # download composer + case $download_method { + 'curl': { + $download_command = "curl -s http://getcomposer.org/installer | ${composer::php_bin}" + $download_require = $suhosin_enabled ? { + true => [ Package['curl', $php_package], Augeas['allow_url_fopen', 'whitelist_phar'] ], + false => [ Package['curl', $php_package] ] + } + $method_package = $curl_package + } + 'wget': { + $download_command = 'wget http://getcomposer.org/composer.phar -O composer.phar' + $download_require = $suhosin_enabled ? { + true => [ Package['wget', $php_package], Augeas['allow_url_fopen', 'whitelist_phar'] ], + false => [ Package['wget', $php_package] ] + } + $method_package = $wget_package + } + default: { + fail("The param download_method ${download_method} is not valid. Please set download_method to curl or wget.") + } + } + + if defined(Package[$method_package]) == false { + package { $method_package: ensure => present, } + } + + exec { 'download_composer': + command => $download_command, + cwd => $tmp_path, + require => $download_require, + creates => "${tmp_path}/composer.phar", + logoutput => $logoutput, + } + + # check if directory exists + file { $target_dir: + ensure => directory, + } + + # move file to target_dir + file { "${target_dir}/${composer_file}": + ensure => present, + source => "${tmp_path}/composer.phar", + require => [ Exec['download_composer'], File[$target_dir] ], + mode => 0755, + } + + if $suhosin_enabled { + case $family { + + 'Redhat','Centos': { + + # set /etc/php5/cli/php.ini/suhosin.executor.include.whitelist = phar + augeas { 'whitelist_phar': + context => '/files/etc/suhosin.ini/suhosin', + changes => 'set suhosin.executor.include.whitelist phar', + require => Package[$php_package], + } + + # set /etc/cli/php.ini/PHP/allow_url_fopen = On + augeas{ 'allow_url_fopen': + context => '/files/etc/php.ini/PHP', + changes => 'set allow_url_fopen On', + require => Package[$php_package], + } + + } + 'Debian': { + + # set /etc/php5/cli/php.ini/suhosin.executor.include.whitelist = phar + augeas { 'whitelist_phar': + context => '/files/etc/php5/conf.d/suhosin.ini/suhosin', + changes => 'set suhosin.executor.include.whitelist phar', + require => Package[$php_package], + } + + # set /etc/php5/cli/php.ini/PHP/allow_url_fopen = On + augeas{ 'allow_url_fopen': + context => '/files/etc/php5/cli/php.ini/PHP', + changes => 'set allow_url_fopen On', + require => Package[$php_package], + } + + } + } + } +} diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/composer/manifests/params.pp b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/composer/manifests/params.pp new file mode 100644 index 00000000000..54f752a43fd --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/composer/manifests/params.pp @@ -0,0 +1,53 @@ +# == Class: composer::params +# +# The parameters for the composer class and corresponding definitions +# +# === Authors +# +# Thomas Ploch +# Andrew Johnstone +# +# === Copyright +# +# Copyright 2013 Thomas Ploch +# +class composer::params { + $composer_home = $::composer_home + + # Support Amazon Linux which is supported by RedHat family + if $::osfamily == 'Linux' and $::operatingsystem == 'Amazon' { + $family = 'RedHat' + } else { + $family = $::osfamily + } + + case $family { + 'Debian': { + $target_dir = '/usr/local/bin' + $composer_file = 'composer' + $download_method = 'curl' + $logoutput = false + $tmp_path = '/tmp' + $php_package = 'php5-cli' + $curl_package = 'curl' + $wget_package = 'wget' + $php_bin = 'php' + $suhosin_enabled = true + } + 'RedHat', 'Centos': { + $target_dir = '/usr/local/bin' + $composer_file = 'composer' + $download_method = 'curl' + $logoutput = false + $tmp_path = '/tmp' + $php_package = 'php-cli' + $curl_package = 'curl' + $wget_package = 'wget' + $php_bin = 'php' + $suhosin_enabled = true + } + default: { + fail("Unsupported platform: ${family}") + } + } +} diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/composer/manifests/project.pp b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/composer/manifests/project.pp new file mode 100644 index 00000000000..594f67f1ba1 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/composer/manifests/project.pp @@ -0,0 +1,96 @@ +# == Type: composer::project +# +# Installs a given project with composer create-project +# +# === Parameters +# +# Document parameters here. +# +# [*target_dir*] +# The target dir that composer should be installed to. +# Defaults to ```/usr/local/bin```. +# +# [*composer_file*] +# The name of the composer binary, which will reside in ```target_dir```. +# +# [*download_method*] +# Either ```curl``` or ```wget```. +# +# [*logoutput*] +# If the output should be logged. Defaults to FALSE. +# +# [*tmp_path*] +# Where the composer.phar file should be temporarily put. +# +# [*php_package*] +# The Package name of the PHP CLI package. +# +# [*user*] +# The user name to exec the composer commands as. Default is undefined. +# +# === Authors +# +# Thomas Ploch +# +# === Copyright +# +# Copyright 2013 Thomas Ploch +# +define composer::project( + $project_name, + $target_dir, + $version = undef, + $dev = false, + $prefer_source = false, + $stability = 'dev', + $repository_url = undef, + $keep_vcs = false, + $tries = 3, + $timeout = 1200, + $user = undef, +) { + require git + require composer + + Exec { + path => "/bin:/usr/bin/:/sbin:/usr/sbin:${composer::target_dir}", + environment => "COMPOSER_HOME=${composer::composer_home}", + user => $user, + } + + $exec_name = "composer_create_project_${title}" + $base_command = "${composer::php_bin} ${composer::target_dir}/${composer::composer_file} --stability=${stability}" + $end_command = "${project_name} ${target_dir}" + + $dev_arg = $dev ? { + true => ' --dev', + default => '', + } + + $vcs = $keep_vcs? { + true => ' --keep-vcs', + default => '', + } + + $repo = $repository_url? { + undef => '', + default => " --repository-url=${repository_url}", + } + + $pref_src = $prefer_source? { + true => ' --prefer-source', + false => '' + } + + $v = $version? { + undef => '', + default => " ${version}", + } + + exec { $exec_name: + command => "${base_command}${dev_arg}${repo}${pref_src}${vcs} create-project ${end_command}${v}", + tries => $tries, + timeout => $timeout, + creates => $target_dir, + } +} diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/composer/spec/classes/composer_params_spec.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/composer/spec/classes/composer_params_spec.rb new file mode 100644 index 00000000000..914de7111fd --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/composer/spec/classes/composer_params_spec.rb @@ -0,0 +1,14 @@ +require 'spec_helper' + +describe 'composer::params' do + ['RedHat', 'Debian', 'Linux'].each do |osfamily| + context "on #{osfamily} operating system family" do + let(:facts) { { + :osfamily => osfamily, + :operatingsystem => 'Amazon', + } } + + it { should compile } + end + end +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/composer/spec/classes/composer_spec.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/composer/spec/classes/composer_spec.rb new file mode 100644 index 00000000000..a34e335e7a8 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/composer/spec/classes/composer_spec.rb @@ -0,0 +1,116 @@ +require 'spec_helper' + +describe 'composer' do + ['RedHat', 'Debian', 'Linux'].each do |osfamily| + case osfamily + when 'RedHat' + php_package = 'php-cli' + php_context = '/files/etc/php.ini/PHP' + suhosin_context = '/files/etc/suhosin.ini/suhosin' + when 'Linux' + php_package = 'php-cli' + php_context = '/files/etc/php.ini/PHP' + suhosin_context = '/files/etc/suhosin.ini/suhosin' + when 'Debian' + php_package = 'php5-cli' + php_context = '/files/etc/php5/cli/php.ini/PHP' + suhosin_context = '/files/etc/php5/conf.d/suhosin.ini/suhosin' + else + php_package = 'php-cli' + php_context = '/files/etc/php.ini/PHP' + suhosin_context = '/files/etc/suhosin.ini/suhosin' + end + + context "on #{osfamily} operating system family" do + let(:facts) { { + :osfamily => osfamily, + :operatingsystem => 'Amazon' + } } + + it { should contain_class('composer::params') } + + it { + should contain_exec('download_composer').with({ + :command => 'curl -s http://getcomposer.org/installer | php', + :cwd => '/tmp', + :creates => '/tmp/composer.phar', + :logoutput => false, + }) + } + + it { + should contain_augeas('whitelist_phar').with({ + :context => suhosin_context, + :changes => 'set suhosin.executor.include.whitelist phar', + }) + } + + it { + should contain_augeas('allow_url_fopen').with({ + :context => php_context, + :changes => 'set allow_url_fopen On', + }) + } + + context 'with default parameters' do + it 'should compile' do + compile + end + + it { should contain_package(php_package).with_ensure('present') } + it { should contain_package('curl').with_ensure('present') } + it { should contain_file('/usr/local/bin').with_ensure('directory') } + + it { + should contain_file('/usr/local/bin/composer').with({ + :source => 'present', + :source => '/tmp/composer.phar', + :mode => '0755', + }) + } + end + + context "on invalid operating system family" do + let(:facts) { { + :osfamily => 'Invalid', + :operatingsystem => 'Amazon' + } } + + it 'should not compile' do + expect { should compile }.to raise_error(/Unsupported platform: Invalid/) + end + end + + context 'with custom parameters' do + let(:params) { { + :target_dir => '/you_sir/lowcal/been', + :php_package => 'php8-cli', + :composer_file => 'compozah', + :curl_package => 'kerl', + :php_bin => 'pehpe', + :suhosin_enabled => false, + } } + + it 'should compile' do + compile + end + + it { should contain_package('php8-cli').with_ensure('present') } + it { should contain_package('kerl').with_ensure('present') } + it { should contain_file('/you_sir/lowcal/been').with_ensure('directory') } + + it { + should contain_file('/you_sir/lowcal/been/compozah').with({ + :source => 'present', + :source => '/tmp/composer.phar', + :mode => '0755', + }) + } + + it { should_not contain_augeas('whitelist_phar') } + it { should_not contain_augeas('allow_url_fopen') } + + end + end + end +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/composer/spec/defines/composer_exec_spec.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/composer/spec/defines/composer_exec_spec.rb new file mode 100644 index 00000000000..36a062f4069 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/composer/spec/defines/composer_exec_spec.rb @@ -0,0 +1,65 @@ +require 'spec_helper' + +describe 'composer::exec' do + ['RedHat', 'Debian'].each do |osfamily| + context "on #{osfamily} operating system family" do + let(:facts) { { + :osfamily => osfamily, + } } + + context 'using install command' do + it { should contain_class('git') } + it { should contain_class('composer') } + + let(:title) { 'myproject' } + let(:params) { { + :cmd => 'install', + :cwd => '/my/awesome/project', + :user => 'linus', + } } + + it { + should contain_exec('composer_update_myproject').with({ + :command => %r{php /usr/local/bin/composer install --no-plugins --no-scripts --no-interaction}, + :cwd => '/my/awesome/project', + :user => 'linus', + :logoutput => false, + }) + } + end + + context 'using update command' do + it { should contain_class('git') } + it { should contain_class('composer') } + + let(:title) { 'yourpr0ject' } + let(:params) { { + :cmd => 'update', + :cwd => '/just/in/time', + :packages => ['package1', 'packageinf'], + :logoutput => true, + } } + + it { + should contain_exec('composer_update_yourpr0ject').without_user.with({ + :command => %r{php /usr/local/bin/composer update --no-plugins --no-scripts --no-interaction package1 packageinf}, + :cwd => '/just/in/time', + :logoutput => true, + }) + } + end + end + end + + context 'on unsupported operating system family' do + let(:facts) { { + :osfamily => 'Darwin', + } } + + let(:title) { 'someproject' } + + it 'should not compile' do + expect { should compile }.to raise_error(/Unsupported platform: Darwin/) + end + end +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/composer/spec/defines/composer_project_spec.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/composer/spec/defines/composer_project_spec.rb new file mode 100644 index 00000000000..624f9111566 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/composer/spec/defines/composer_project_spec.rb @@ -0,0 +1,61 @@ +require 'spec_helper' + +describe 'composer::project' do + ['RedHat', 'Debian'].each do |osfamily| + context "on #{osfamily} operating system family" do + let(:facts) { { + :osfamily => osfamily, + } } + + context 'with default params' do + let(:title) { 'myproject' } + let(:params) { { + :project_name => 'projectzzz', + :target_dir => '/my/subpar/project', + } } + + it { should contain_class('git') } + it { should contain_class('composer') } + + it { + should contain_exec('composer_create_project_myproject').without_user.with({ + :command => "php /usr/local/bin/composer --stability=dev create-project projectzzz /my/subpar/project", + :tries => 3, + :timeout => 1200, + :creates => '/my/subpar/project', + }) + } + end + + context 'with all custom params' do + let(:title) { 'whoadawg' } + let(:params) { { + :project_name => 'whoadawg99', + :target_dir => '/my/mediocre/project', + :version => '0.0.8', + :dev => true, + :prefer_source => true, + :stability => 'dev', + :repository_url => 'git@github.com:trollface/whoadawg.git', + :keep_vcs => true, + :tries => 2, + :timeout => 600, + :user => 'mrploch', + } } + + it { should contain_class('git') } + it { should contain_class('composer') } + + it { + should contain_exec('composer_create_project_whoadawg').with({ + :command => %r{php /usr/local/bin/composer --stability=dev --dev --repository-url=git@github.com:trollface/whoadawg.git --prefer-source --keep-vcs create-project whoadawg99 /my/mediocre/project 0.0.8}, + :tries => 2, + :timeout => 600, + :creates => '/my/mediocre/project', + :user => 'mrploch', + }) + } + end + end + end +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/composer/spec/fixtures/manifests/site.pp b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/composer/spec/fixtures/manifests/site.pp new file mode 100644 index 00000000000..d669ee3889c --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/composer/spec/fixtures/manifests/site.pp @@ -0,0 +1,8 @@ +node default { + include composer + + composer::exec {'ohai': + cmd => 'install', + cwd => '/some/cool/dir', + } +} diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/composer/spec/spec.opts b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/composer/spec/spec.opts new file mode 100644 index 00000000000..22420e39c64 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/composer/spec/spec.opts @@ -0,0 +1,6 @@ +--format +s +--colour +--loadby +mtime +--backtrace \ No newline at end of file diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/composer/spec/spec_helper.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/composer/spec/spec_helper.rb new file mode 100644 index 00000000000..2c6f56649ae --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/composer/spec/spec_helper.rb @@ -0,0 +1 @@ +require 'puppetlabs_spec_helper/module_spec_helper' diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/composer/templates/exec.erb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/composer/templates/exec.erb new file mode 100644 index 00000000000..960002f94c9 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/composer/templates/exec.erb @@ -0,0 +1,17 @@ +<%= @command -%> +<% if @prefer_source %> --prefer-source<% end -%> +<% if @prefer_dist %> --prefer-dist<% end -%> +<% unless @custom_installers %> --no-plugins<% end -%> +<% unless @scripts %> --no-scripts<% end -%> +<% unless @interaction %> --no-interaction<% end -%> +<% if @dev %> --dev<% end -%> +<% if @verbose %> -v<% end -%> +<% if @dry_run %> --dry-run<% end -%> +<% if @cmd == 'update' -%> + <%- if @packages -%> + <%- @packages.each do |package| -%> + <%= ' ' + package -%> + <%- end -%> + <%- end -%> +<% end -%> + diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/composer/tests/init.pp b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/composer/tests/init.pp new file mode 100644 index 00000000000..36afe85fa20 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/composer/tests/init.pp @@ -0,0 +1,11 @@ +# The baseline for module testing used by Puppet Labs is that each manifest +# should have a corresponding test manifest that declares that class or defined +# type. +# +# Tests are then run by using puppet apply --noop (to check for compilation errors +# and view a log of events) or by fully applying the test in a virtual environment +# (to compare the resulting system state to the desired state). +# +# Learn more about module testing here: http://docs.puppetlabs.com/guides/tests_smoke.html +# +include composer diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/composer/tests/project.pp b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/composer/tests/project.pp new file mode 100644 index 00000000000..6208a5eeded --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/composer/tests/project.pp @@ -0,0 +1,23 @@ +# The baseline for module testing used by Puppet Labs is that each manifest +# should have a corresponding test manifest that declares that class or defined +# type. +# +# Tests are then run by using puppet apply --noop (to check for compilation errors +# and view a log of events) or by fully applying the test in a virtual environment +# (to compare the resulting system state to the desired state). +# +# Learn more about module testing here: http://docs.puppetlabs.com/guides/tests_smoke.html +# + +composer::project { 'my_first_test': + project_name => 'fabpot/silex-skeleton', + target_dir => '/tmp/first_test', +} + +composer::project { 'my_second_test': + project_name => 'fabpot/silex-skeleton', + target_dir => '/tmp/second_test', + prefer_source => true, + stability => 'dev', +} + diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/concat/.fixtures.yml b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/concat/.fixtures.yml new file mode 100644 index 00000000000..dc6b41f836c --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/concat/.fixtures.yml @@ -0,0 +1,7 @@ +fixtures: + repositories: + 'stdlib': + repo: 'git://github.com/puppetlabs/puppetlabs-stdlib.git' + ref: '4.0.0' + symlinks: + 'concat': '#{source_dir}' diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/concat/.gitattributes b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/concat/.gitattributes new file mode 100644 index 00000000000..2e05fd47ded --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/concat/.gitattributes @@ -0,0 +1 @@ +*.sh eol=lf diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/concat/.travis.yml b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/concat/.travis.yml new file mode 100644 index 00000000000..4e72cd4cf9f --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/concat/.travis.yml @@ -0,0 +1,40 @@ +--- +branches: + only: + - master +language: ruby +bundler_args: --without development +script: bundle exec rake spec SPEC_OPTS='--format documentation' +# work around RubyGems 2.2.0 breaking ruby 1.8.7 +# https://github.com/rubygems/rubygems/pull/763 +# https://github.com/freerange/mocha/commit/66bab2a8f4e7cd8734bf88e6f32157c0d5153125 +before_install: + - gem update --system 2.1.11 + - gem --version +rvm: + - 1.8.7 + - 1.9.3 + - 2.0.0 +env: + matrix: + - PUPPET_GEM_VERSION="2.7.3" FACTER_GEM_VERSION="1.6.0" + - PUPPET_GEM_VERSION="~> 2.7.0" FACTER_GEM_VERSION="~> 1.6.0" + - PUPPET_GEM_VERSION="~> 2.7.0" FACTER_GEM_VERSION="~> 1.7.0" + - PUPPET_GEM_VERSION="~> 3.0" +matrix: + fast_finish: true + exclude: + - rvm: 1.9.3 + env: PUPPET_GEM_VERSION="2.7.3" FACTER_GEM_VERSION="1.6.0" + - rvm: 1.9.3 + env: PUPPET_GEM_VERSION="~> 2.7.0" FACTER_GEM_VERSION="~> 1.6.0" + - rvm: 1.9.3 + env: PUPPET_GEM_VERSION="~> 2.7.0" FACTER_GEM_VERSION="~> 1.7.0" + - rvm: 2.0.0 + env: PUPPET_GEM_VERSION="2.7.3" FACTER_GEM_VERSION="1.6.0" + - rvm: 2.0.0 + env: PUPPET_GEM_VERSION="~> 2.7.0" FACTER_GEM_VERSION="~> 1.6.0" + - rvm: 2.0.0 + env: PUPPET_GEM_VERSION="~> 2.7.0" FACTER_GEM_VERSION="~> 1.7.0" +notifications: + email: false diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/concat/CHANGELOG b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/concat/CHANGELOG new file mode 100644 index 00000000000..c66b922d44c --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/concat/CHANGELOG @@ -0,0 +1,127 @@ +2014-05-14 1.1.0 + +Summary + +This release is primarily a bugfix release since 1.1.0-rc1. + +Features: +- Improved testing, with tests moved to beaker + +Bugfixes: +- No longer attempts to set fragment owner and mode on Windows +- Fix numeric sorting +- Fix incorrect quoting +- Fix newlines + +2014-01-03 1.1.0-rc1 + +Summary: + +This release of concat was 90% written by Joshua Hoblitt, and the module team +would like to thank him for the huge amount of work he put into this release. + +This module deprecates a bunch of old parameters and usage patterns, modernizes +much of the manifest code, simplifies a whole bunch of logic and makes +improvements to almost all parts of the module. + +The other major feature is windows support, courtesy of luisfdez, with an +alternative version of the concat bash script in ruby. We've attempted to +ensure that there are no backwards incompatible changes, all users of 1.0.0 +should be able to use 1.1.0 without any failures, but you may find deprecation +warnings and we'll be aggressively moving for a 2.0 to remove those too. + +For further information on deprecations, please read: +https://github.com/puppetlabs/puppetlabs-concat/blob/master/README.md#api-deprecations + +Removed: +- Puppet 0.24 support. +- Filebucket backup of all file resources except the target concatenated file. +- Default owner/user/group values. +- Purging of long unused /usr/local/bin/concatfragments.sh + +Features: +- Windows support via a ruby version of the concat bash script. +- Huge amount of acceptance testing work added. +- Documentation (README) completely rewritten. +- New parameters in concat: + - `ensure`: Controls if the file should be present/absent at all. +- Remove requirement to include concat::setup in manifests. +- Made `gnu` parameter deprecated. +- Added parameter validation. + +Bugfixes: +- Ensure concat::setup runs before concat::fragment in all cases. +- Pluginsync references updated for modern Puppet. +- Fix incorrect group parameter. +- Use $owner instead of $id to avoid confusion with $::id +- Compatibility fixes for Puppet 2.7/ruby 1.8.7 +- Use LC_ALL=C instead of LANG=C +- Always exec the concatfragments script as root when running as root. +- Syntax and other cleanup changes. + +2013-08-09 1.0.0 + +Summary: + +Many new features and bugfixes in this release, and if you're a heavy concat +user you should test carefully before upgrading. The features should all be +backwards compatible but only light testing has been done from our side before +this release. + +Features: +- New parameters in concat: + - `replace`: specify if concat should replace existing files. + - `ensure_newline`: controls if fragments should contain a newline at the end. +- Improved README documentation. +- Add rspec:system tests (rake spec:system to test concat) + +Bugfixes +- Gracefully handle \n in a fragment resource name. +- Adding more helpful message for 'pluginsync = true' +- Allow passing `source` and `content` directly to file resource, rather than +defining resource defaults. +- Added -r flag to read so that filenames with \ will be read correctly. +- sort always uses LANG=C. +- Allow WARNMSG to contain/start with '#'. +- Replace while-read pattern with for-do in order to support Solaris. + +CHANGELOG: +- 2010/02/19 - initial release +- 2010/03/12 - add support for 0.24.8 and newer + - make the location of sort configurable + - add the ability to add shell comment based warnings to + top of files + - add the ablity to create empty files +- 2010/04/05 - fix parsing of WARN and change code style to match rest + of the code + - Better and safer boolean handling for warn and force + - Don't use hard coded paths in the shell script, set PATH + top of the script + - Use file{} to copy the result and make all fragments owned + by root. This means we can chnage the ownership/group of the + resulting file at any time. + - You can specify ensure => "/some/other/file" in concat::fragment + to include the contents of a symlink into the final file. +- 2010/04/16 - Add more cleaning of the fragment name - removing / from the $name +- 2010/05/22 - Improve documentation and show the use of ensure => +- 2010/07/14 - Add support for setting the filebucket behavior of files +- 2010/10/04 - Make the warning message configurable +- 2010/12/03 - Add flags to make concat work better on Solaris - thanks Jonathan Boyett +- 2011/02/03 - Make the shell script more portable and add a config option for root group +- 2011/06/21 - Make base dir root readable only for security +- 2011/06/23 - Set base directory using a fact instead of hardcoding it +- 2011/06/23 - Support operating as non privileged user +- 2011/06/23 - Support dash instead of bash or sh +- 2011/07/11 - Better solaris support +- 2011/12/05 - Use fully qualified variables +- 2011/12/13 - Improve Nexenta support +- 2012/04/11 - Do not use any GNU specific extensions in the shell script +- 2012/03/24 - Comply to community style guides +- 2012/05/23 - Better errors when basedir isnt set +- 2012/05/31 - Add spec tests +- 2012/07/11 - Include concat::setup in concat improving UX +- 2012/08/14 - Puppet Lint improvements +- 2012/08/30 - The target path can be different from the $name +- 2012/08/30 - More Puppet Lint cleanup +- 2012/09/04 - RELEASE 0.2.0 +- 2012/12/12 - Added (file) $replace parameter to concat diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/concat/Gemfile b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/concat/Gemfile new file mode 100644 index 00000000000..56b977598c1 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/concat/Gemfile @@ -0,0 +1,20 @@ +source ENV['GEM_SOURCE'] || "https://rubygems.org" + +group :development, :test do + gem 'rake', :require => false + gem 'rspec-puppet', :require => false + gem 'puppetlabs_spec_helper', :require => false + gem 'beaker', :require => false + gem 'beaker-rspec', :require => false + gem 'puppet-lint', :require => false + gem 'serverspec', :require => false + gem 'pry', :require => false +end + +if puppetversion = ENV['PUPPET_GEM_VERSION'] + gem 'puppet', puppetversion, :require => false +else + gem 'puppet', :require => false +end + +# vim:ft=ruby diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/concat/LICENSE b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/concat/LICENSE new file mode 100644 index 00000000000..6a9e9a194b6 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/concat/LICENSE @@ -0,0 +1,14 @@ + Copyright 2012 R.I.Pienaar + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/concat/Modulefile b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/concat/Modulefile new file mode 100644 index 00000000000..ea9ef2c3e30 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/concat/Modulefile @@ -0,0 +1,9 @@ +name 'puppetlabs-concat' +version '1.1.0' +source 'git://github.com/puppetlabs/puppetlabs-concat.git' +author 'Puppetlabs' +license 'Apache 2.0' +summary 'Concat module' +description 'Concat module' +project_page 'http://github.com/puppetlabs/puppetlabs-concat' +dependency 'puppetlabs/stdlib', '>= 4.0.0' diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/concat/README.md b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/concat/README.md new file mode 100644 index 00000000000..60eca383002 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/concat/README.md @@ -0,0 +1,441 @@ +#Concat + +[![Build Status](https://travis-ci.org/puppetlabs/puppetlabs-concat.png?branch=master)](https://travis-ci.org/puppetlabs/puppetlabs-concat) + +####Table of Contents + +1. [Overview](#overview) +2. [Module Description - What the module does and why it is useful](#module-description) +3. [Setup - The basics of getting started with concat](#setup) + * [What concat affects](#what-concat-affects) + * [Setup requirements](#setup-requirements) + * [Beginning with concat](#beginning-with-concat) +4. [Usage - Configuration options and additional functionality](#usage) + * [API _deprecations_](#api-deprecations) +5. [Reference - An under-the-hood peek at what the module is doing and how](#reference) +5. [Limitations - OS compatibility, etc.](#limitations) +6. [Development - Guide for contributing to the module](#development) + +##Overview + +This module constructs files from multiple fragments in an ordered way. + +##Module Description + +This module lets you use many concat::fragment{} resources throughout +your modules to construct a single file at the end. It does this through +a shell (or ruby) script and a temporary holding space for the fragments. + +##Setup + +###What concat affects + +* Installs concatfragments.[sh|rb] based on platform. +* Adds a concat/ directory into Puppets `vardir`. + +###Beginning with concat + +To start using concat you need to create: + +* A concat{} resource for the final file. +* One or more concat::fragment{}'s. + +A minimal example might be: + +```puppet +concat { '/tmp/file': + ensure => present, +} + +concat::fragment { 'tmpfile': + target => '/tmp/file' + content => 'test contents', + order => '01' +} +``` + +##Usage + +Please be aware that there have been a number of [API +_deprecations_](#api-deprecations). + +If you wanted a /etc/motd file that listed all the major modules +on the machine. And that would be maintained automatically even +if you just remove the include lines for other modules you could +use code like below, a sample /etc/motd would be: + +
+Puppet modules on this server:
+
+    -- Apache
+    -- MySQL
+
+ +Local sysadmins can also append to the file by just editing /etc/motd.local +their changes will be incorporated into the puppet managed motd. + +```puppet +class motd { + $motd = '/etc/motd' + + concat { $motd: + owner => 'root', + group => 'root', + mode => '0644' + } + + concat::fragment{ 'motd_header': + target => $motd, + content => "\nPuppet modules on this server:\n\n", + order => '01' + } + + # local users on the machine can append to motd by just creating + # /etc/motd.local + concat::fragment{ 'motd_local': + target => $motd, + source => '/etc/motd.local', + order => '15' + } +} + +# used by other modules to register themselves in the motd +define motd::register($content="", $order=10) { + if $content == "" { + $body = $name + } else { + $body = $content + } + + concat::fragment{ "motd_fragment_$name": + target => '/etc/motd', + order => $order, + content => " -- $body\n" + } +} +``` + +To use this you'd then do something like: + +```puppet +class apache { + include apache::install, apache::config, apache::service + + motd::register{ 'Apache': } +} +``` + +##Reference + +###Classes + +####Public classes + +####Private classes +* `concat::setup`: Sets up the concat script/directories. + +###Parameters + +###Defines + +####concat + +#####`ensure` +Controls if the combined file is present or absent. + +######Example +- ensure => present +- ensure => absent + +#####`path` +Controls the destination of the file to create. + +######Example +- path => '/tmp/filename' + +#####`owner` +Set the owner of the combined file. + +######Example +- owner => 'root' + +#####`group` +Set the group of the combined file. + +######Example +- group => 'root' + +#####`mode` +Set the mode of the combined file. + +######Example +- mode => '0644' + +#####`warn` +Determine if a warning message should be added at the top of the file to let +users know it was autogenerated by Puppet. + +######Example +- warn => true +- warn => false + +#####`warn_message` +Set the contents of the warning message. + +######Example +- warn_message => 'This file is autogenerated!' + +#####`force` +Determine if empty files are allowed when no fragments were added. + +######Example +- force => true +- force => false + +#####`backup` +Controls the filebucket behavior used for the file. + +######Example +- backup => 'puppet' + +#####`replace` +Controls if Puppet should replace the destination file if it already exists. + +######Example +- replace => true +- replace => false + +#####`order` +Controls the way in which the shell script chooses to sort the files. It's +rare you'll need to adjust this. + +######Allowed Values +- order => 'alpha' +- order => 'numeric' + +#####`ensure_newline` +Ensure there's a newline at the end of the fragments. + +######Example +- ensure_newline => true +- ensure_newline => false + +####concat::fragment + +#####`target` +Choose the destination file of the fragment. + +######Example +- target => '/tmp/testfile' + +#####`content` +Create the content of the fragment. + +######Example +- content => 'test file contents' + +#####`source` +Find the sources within Puppet of the fragment. + +######Example +- source => 'puppet:///modules/test/testfile' +- source => ['puppet:///modules/test/1', 'puppet:///modules/test/2'] + +#####`order` +Order the fragments. + +######Example +- order => '01' + +#####`ensure` +Control the file of fragment created. + +######Example +- ensure => 'present' +- ensure => 'absent' +- ensure => 'file' +- ensure => 'directory' + +#####`mode` +Set the mode of the fragment. + +######Example +- mode => '0644' + +#####`owner` +Set the owner of the fragment. + +######Example +- owner => 'root' + +#####`group` +Set the group of the fragment. + +######Example +- group => 'root' + +#####`backup` +Control the filebucket behavior for the fragment. + +######Example +- backup => 'puppet' + +### API _deprecations_ + +#### Since version `1.0.0` + +##### `concat{}` `warn` parameter + +```puppet +concat { '/tmp/file': + ensure => present, + warn => 'true', # generates stringified boolean value warning +} +``` + +Using stringified Boolean values as the `warn` parameter to `concat` is +deprecated, generates a catalog compile time warning, and will be silently +treated as the concatenated file header/warning message in a future release. + +The following strings are considered a stringified Boolean value: + + * `'true'` + * `'yes'` + * `'on'` + * `'false'` + * `'no'` + * `'off'` + +Please migrate to using the Puppet DSL's native [Boolean data +type](http://docs.puppetlabs.com/puppet/3/reference/lang_datatypes.html#booleans). + +##### `concat{}` `gnu` parameter + +```puppet +concat { '/tmp/file': + ensure => present, + gnu => $foo, # generates deprecation warning +} +``` + +The `gnu` parameter to `concat` is deprecated, generates a catalog compile time +warning, and has no effect. This parameter will be removed in a future +release. + +Note that this parameter was silently ignored in the `1.0.0` release. + +##### `concat::fragment{}` `ensure` parameter + +```puppet +concat::fragment { 'cpuinfo': + ensure => '/proc/cpuinfo', # generates deprecation warning + target => '/tmp/file', +} +``` + +Passing a value other than `'present'` or `'absent'` as the `ensure` parameter +to `concat::fragment` is deprecated and generates a catalog compile time +warning. The warning will become a catalog compilation failure in a future +release. + +This type emulates the Puppet core `file` type's disfavored [`ensure` +semantics](http://docs.puppetlabs.com/references/latest/type.html#file-attribute-ensure) +of treating a file path as a directive to create a symlink. This feature is +problematic in several ways. It copies an API semantic of another type that is +both frowned upon and not generally well known. It's behavior may be +surprising in that the target concatenated file will not be a symlink nor is +there any common file system that has a concept of a section of a plain file +being symbolically linked to another file. Additionally, the behavior is +generally inconsistent with most Puppet types in that a missing source file +will be silently ignored. + +If you want to use the content of a file as a fragment please use the `source` +parameter. + +##### `concat::fragment{}` `mode/owner/group` parameters + +```puppet +concat::fragment { 'foo': + target => '/tmp/file', + content => 'foo', + mode => $mode, # generates deprecation warning + owner => $owner, # generates deprecation warning + group => $group, # generates deprecation warning +} +``` + +The `mode` parameter to `concat::fragment` is deprecated, generates a catalog compile time warning, and has no effect. + +The `owner` parameter to `concat::fragment` is deprecated, generates a catalog +compile time warning, and has no effect. + +The `group` parameter to `concat::fragment` is deprecated, generates a catalog +compile time warning, and has no effect. + +These parameters had no user visible effect in version `1.0.0` and will be +removed in a future release. + +##### `concat::fragment{}` `backup` parameter + +```puppet +concat::fragment { 'foo': + target => '/tmp/file', + content => 'foo', + backup => 'bar', # generates deprecation warning +} +``` + +The `backup` parameter to `concat::fragment` is deprecated, generates a catalog +compile time warning, and has no effect. It will be removed in a future +release. + +In the `1.0.0` release this parameter controlled file bucketing of the file +fragment. Bucketting the fragment(s) is redundant with bucketting the final +concatenated file and this feature has been removed. + +##### `class { 'concat::setup': }` + +```puppet +include concat::setup # generates deprecation warning + +class { 'concat::setup: } # generates deprecation warning +``` + +The `concat::setup` class is deprecated as a public API of this module and +should no longer be directly included in the manifest. This class may be +removed in a future release. + +##### Parameter validation + +While not an API depreciation, users should be aware that all public parameters +in this module are now validated for at least variable type. This may cause +validation errors in a manifest that was previously silently misbehaving. + +##Limitations + +This module has been tested on: + +* RedHat Enterprise Linux (and Centos) 5/6 +* Debian 6/7 +* Ubuntu 12.04 + +Testing on other platforms has been light and cannot be guaranteed. + +#Development + +Puppet Labs modules on the Puppet Forge are open projects, and community +contributions are essential for keeping them great. We can’t access the +huge number of platforms and myriad of hardware, software, and deployment +configurations that Puppet is intended to serve. + +We want to keep it as easy as possible to contribute changes so that our +modules work in your environment. There are a few guidelines that we need +contributors to follow so that we can have a chance of keeping on top of things. + +You can read the complete module contribution guide [on the Puppet Labs wiki.](http://projects.puppetlabs.com/projects/module-site/wiki/Module_contributing) + +###Contributors + +The list of contributors can be found at: + +https://github.com/puppetlabs/puppetlabs-concat/graphs/contributors diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/concat/Rakefile b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/concat/Rakefile new file mode 100644 index 00000000000..23aea87de25 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/concat/Rakefile @@ -0,0 +1,5 @@ +require 'puppetlabs_spec_helper/rake_tasks' +require 'puppet-lint/tasks/puppet-lint' + +PuppetLint.configuration.send('disable_80chars') +PuppetLint.configuration.send('disable_quoted_booleans') diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/concat/files/concatfragments.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/concat/files/concatfragments.rb new file mode 100755 index 00000000000..73fd7f9b2d4 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/concat/files/concatfragments.rb @@ -0,0 +1,137 @@ +# Script to concat files to a config file. +# +# Given a directory like this: +# /path/to/conf.d +# |-- fragments +# | |-- 00_named.conf +# | |-- 10_domain.net +# | `-- zz_footer +# +# The script supports a test option that will build the concat file to a temp location and +# use /usr/bin/cmp to verify if it should be run or not. This would result in the concat happening +# twice on each run but gives you the option to have an unless option in your execs to inhibit rebuilds. +# +# Without the test option and the unless combo your services that depend on the final file would end up +# restarting on each run, or in other manifest models some changes might get missed. +# +# OPTIONS: +# -o The file to create from the sources +# -d The directory where the fragments are kept +# -t Test to find out if a build is needed, basically concats the files to a temp +# location and compare with what's in the final location, return codes are designed +# for use with unless on an exec resource +# -w Add a shell style comment at the top of the created file to warn users that it +# is generated by puppet +# -f Enables the creation of empty output files when no fragments are found +# -n Sort the output numerically rather than the default alpha sort +# +# the command: +# +# concatfragments.rb -o /path/to/conffile.cfg -d /path/to/conf.d +# +# creates /path/to/conf.d/fragments.concat and copies the resulting +# file to /path/to/conffile.cfg. The files will be sorted alphabetically +# pass the -n switch to sort numerically. +# +# The script does error checking on the various dirs and files to make +# sure things don't fail. +require 'optparse' +require 'fileutils' + +settings = { + :outfile => "", + :workdir => "", + :test => false, + :force => false, + :warn => "", + :sortarg => "" +} + +OptionParser.new do |opts| + opts.banner = "Usage: #{$0} [options]" + opts.separator "Specific options:" + + opts.on("-o", "--outfile OUTFILE", String, "The file to create from the sources") do |o| + settings[:outfile] = o + end + + opts.on("-d", "--workdir WORKDIR", String, "The directory where the fragments are kept") do |d| + settings[:workdir] = d + end + + opts.on("-t", "--test", "Test to find out if a build is needed") do + settings[:test] = true + end + + opts.separator "Other options:" + opts.on("-w", "--warn WARNMSG", String, + "Add a shell style comment at the top of the created file to warn users that it is generated by puppet") do |w| + settings[:warn] = w + end + + opts.on("-f", "--force", "Enables the creation of empty output files when no fragments are found") do + settings[:force] = true + end + + opts.on("-n", "--sort", "Sort the output numerically rather than the default alpha sort") do + settings[:sortarg] = "-n" + end +end.parse! + +# do we have -o? +raise 'Please specify an output file with -o' unless !settings[:outfile].empty? + +# do we have -d? +raise 'Please specify fragments directory with -d' unless !settings[:workdir].empty? + +# can we write to -o? +if File.file?(settings[:outfile]) + if !File.writable?(settings[:outfile]) + raise "Cannot write to #{settings[:outfile]}" + end +else + if !File.writable?(File.dirname(settings[:outfile])) + raise "Cannot write to dirname #{File.dirname(settings[:outfile])} to create #{settings[:outfile]}" + end +end + +# do we have a fragments subdir inside the work dir? +if !File.directory?(File.join(settings[:workdir], "fragments")) && !File.executable?(File.join(settings[:workdir], "fragments")) + raise "Cannot access the fragments directory" +end + +# are there actually any fragments? +if (Dir.entries(File.join(settings[:workdir], "fragments")) - %w{ . .. }).empty? + if !settings[:force] + raise "The fragments directory is empty, cowardly refusing to make empty config files" + end +end + +Dir.chdir(settings[:workdir]) + +if settings[:warn].empty? + File.open("fragments.concat", 'w') {|f| f.write("") } +else + File.open("fragments.concat", 'w') {|f| f.write("#{settings[:warn]}\n") } +end + +# find all the files in the fragments directory, sort them numerically and concat to fragments.concat in the working dir +open('fragments.concat', 'a') do |f| + Dir.entries("fragments").sort.each{ |entry| + if File.file?(File.join("fragments", entry)) + f << File.read(File.join("fragments", entry)) + end + } +end + +if !settings[:test] + # This is a real run, copy the file to outfile + FileUtils.cp 'fragments.concat', settings[:outfile] +else + # Just compare the result to outfile to help the exec decide + if FileUtils.cmp 'fragments.concat', settings[:outfile] + exit 0 + else + exit 1 + end +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/concat/files/concatfragments.sh b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/concat/files/concatfragments.sh new file mode 100755 index 00000000000..7e6b0f5c565 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/concat/files/concatfragments.sh @@ -0,0 +1,140 @@ +#!/bin/sh + +# Script to concat files to a config file. +# +# Given a directory like this: +# /path/to/conf.d +# |-- fragments +# | |-- 00_named.conf +# | |-- 10_domain.net +# | `-- zz_footer +# +# The script supports a test option that will build the concat file to a temp location and +# use /usr/bin/cmp to verify if it should be run or not. This would result in the concat happening +# twice on each run but gives you the option to have an unless option in your execs to inhibit rebuilds. +# +# Without the test option and the unless combo your services that depend on the final file would end up +# restarting on each run, or in other manifest models some changes might get missed. +# +# OPTIONS: +# -o The file to create from the sources +# -d The directory where the fragments are kept +# -t Test to find out if a build is needed, basically concats the files to a temp +# location and compare with what's in the final location, return codes are designed +# for use with unless on an exec resource +# -w Add a shell style comment at the top of the created file to warn users that it +# is generated by puppet +# -f Enables the creation of empty output files when no fragments are found +# -n Sort the output numerically rather than the default alpha sort +# +# the command: +# +# concatfragments.sh -o /path/to/conffile.cfg -d /path/to/conf.d +# +# creates /path/to/conf.d/fragments.concat and copies the resulting +# file to /path/to/conffile.cfg. The files will be sorted alphabetically +# pass the -n switch to sort numerically. +# +# The script does error checking on the various dirs and files to make +# sure things don't fail. + +OUTFILE="" +WORKDIR="" +TEST="" +FORCE="" +WARN="" +SORTARG="" +ENSURE_NEWLINE="" + +PATH=/sbin:/usr/sbin:/bin:/usr/bin + +## Well, if there's ever a bad way to do things, Nexenta has it. +## http://nexenta.org/projects/site/wiki/Personalities +unset SUN_PERSONALITY + +while getopts "o:s:d:tnw:fl" options; do + case $options in + o ) OUTFILE=$OPTARG;; + d ) WORKDIR=$OPTARG;; + n ) SORTARG="-n";; + w ) WARNMSG="$OPTARG";; + f ) FORCE="true";; + t ) TEST="true";; + l ) ENSURE_NEWLINE="true";; + * ) echo "Specify output file with -o and fragments directory with -d" + exit 1;; + esac +done + +# do we have -o? +if [ "x${OUTFILE}" = "x" ]; then + echo "Please specify an output file with -o" + exit 1 +fi + +# do we have -d? +if [ "x${WORKDIR}" = "x" ]; then + echo "Please fragments directory with -d" + exit 1 +fi + +# can we write to -o? +if [ -f "${OUTFILE}" ]; then + if [ ! -w "${OUTFILE}" ]; then + echo "Cannot write to ${OUTFILE}" + exit 1 + fi +else + if [ ! -w `dirname "${OUTFILE}"` ]; then + echo "Cannot write to `dirname \"${OUTFILE}\"` to create ${OUTFILE}" + exit 1 + fi +fi + +# do we have a fragments subdir inside the work dir? +if [ ! -d "${WORKDIR}/fragments" ] && [ ! -x "${WORKDIR}/fragments" ]; then + echo "Cannot access the fragments directory" + exit 1 +fi + +# are there actually any fragments? +if [ ! "$(ls -A """${WORKDIR}/fragments""")" ]; then + if [ "x${FORCE}" = "x" ]; then + echo "The fragments directory is empty, cowardly refusing to make empty config files" + exit 1 + fi +fi + +cd "${WORKDIR}" + +if [ "x${WARNMSG}" = "x" ]; then + : > "fragments.concat" +else + printf '%s\n' "$WARNMSG" > "fragments.concat" +fi + +# find all the files in the fragments directory, sort them numerically and concat to fragments.concat in the working dir +IFS_BACKUP=$IFS +IFS=' +' +for fragfile in `find fragments/ -type f -follow -print0 | xargs -0 -n1 basename | LC_ALL=C sort ${SORTARG}` +do + cat "fragments/$fragfile" >> "fragments.concat" + # Handle newlines. + if [ "x${ENSURE_NEWLINE}" != "x" ]; then + echo >> "fragments.concat" + fi +done +IFS=$IFS_BACKUP + +if [ "x${TEST}" = "x" ]; then + # This is a real run, copy the file to outfile + cp fragments.concat "${OUTFILE}" + RETVAL=$? +else + # Just compare the result to outfile to help the exec decide + cmp "${OUTFILE}" fragments.concat + RETVAL=$? +fi + +exit $RETVAL diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/concat/lib/facter/concat_basedir.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/concat/lib/facter/concat_basedir.rb new file mode 100644 index 00000000000..bfac07102de --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/concat/lib/facter/concat_basedir.rb @@ -0,0 +1,11 @@ +# == Fact: concat_basedir +# +# A custom fact that sets the default location for fragments +# +# "${::vardir}/concat/" +# +Facter.add("concat_basedir") do + setcode do + File.join(Puppet[:vardir],"concat") + end +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/concat/manifests/fragment.pp b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/concat/manifests/fragment.pp new file mode 100644 index 00000000000..40baadd2348 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/concat/manifests/fragment.pp @@ -0,0 +1,121 @@ +# == Define: concat::fragment +# +# Puts a file fragment into a directory previous setup using concat +# +# === Options: +# +# [*target*] +# The file that these fragments belong to +# [*content*] +# If present puts the content into the file +# [*source*] +# If content was not specified, use the source +# [*order*] +# By default all files gets a 10_ prefix in the directory you can set it to +# anything else using this to influence the order of the content in the file +# [*ensure*] +# Present/Absent or destination to a file to include another file +# [*mode*] +# Deprecated +# [*owner*] +# Deprecated +# [*group*] +# Deprecated +# [*backup*] +# Deprecated +# +define concat::fragment( + $target, + $content = undef, + $source = undef, + $order = 10, + $ensure = undef, + $mode = undef, + $owner = undef, + $group = undef, + $backup = undef +) { + validate_string($target) + validate_string($content) + if !(is_string($source) or is_array($source)) { + fail('$source is not a string or an Array.') + } + validate_string($order) + if $mode { + warning('The $mode parameter to concat::fragment is deprecated and has no effect') + } + if $owner { + warning('The $owner parameter to concat::fragment is deprecated and has no effect') + } + if $group { + warning('The $group parameter to concat::fragment is deprecated and has no effect') + } + if $backup { + warning('The $backup parameter to concat::fragment is deprecated and has no effect') + } + if $ensure == undef { + $_ensure = getparam(Concat[$target], 'ensure') + } else { + if ! ($ensure in [ 'present', 'absent' ]) { + warning('Passing a value other than \'present\' or \'absent\' as the $ensure parameter to concat::fragment is deprecated. If you want to use the content of a file as a fragment please use the $source parameter.') + } + $_ensure = $ensure + } + + include concat::setup + + $safe_name = regsubst($name, '[/:\n]', '_', 'GM') + $safe_target_name = regsubst($target, '[/:\n]', '_', 'GM') + $concatdir = $concat::setup::concatdir + $fragdir = "${concatdir}/${safe_target_name}" + $fragowner = $concat::setup::fragment_owner + $fragmode = $concat::setup::fragment_mode + + # The file type's semantics are problematic in that ensure => present will + # not over write a pre-existing symlink. We are attempting to provide + # backwards compatiblity with previous concat::fragment versions that + # supported the file type's ensure => /target syntax + + # be paranoid and only allow the fragment's file resource's ensure param to + # be file, absent, or a file target + $safe_ensure = $_ensure ? { + '' => 'file', + undef => 'file', + 'file' => 'file', + 'present' => 'file', + 'absent' => 'absent', + default => $_ensure, + } + + # if it looks line ensure => /target syntax was used, fish that out + if ! ($_ensure in ['', 'present', 'absent', 'file' ]) { + $ensure_target = $_ensure + } else { + $ensure_target = undef + } + + # the file type's semantics only allows one of: ensure => /target, content, + # or source + if ($ensure_target and $source) or + ($ensure_target and $content) or + ($source and $content) { + fail('You cannot specify more than one of $content, $source, $ensure => /target') + } + + if ! ($content or $source or $ensure_target) { + crit('No content, source or symlink specified') + } + + # punt on group ownership until some point in the distant future when $::gid + # can be relied on to be present + file { "${fragdir}/fragments/${order}_${safe_name}": + ensure => $safe_ensure, + owner => $fragowner, + mode => $fragmode, + source => $source, + content => $content, + backup => false, + alias => "concat_fragment_${name}", + notify => Exec["concat_${target}"] + } +} diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/concat/manifests/init.pp b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/concat/manifests/init.pp new file mode 100644 index 00000000000..91d82ebd3e5 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/concat/manifests/init.pp @@ -0,0 +1,232 @@ +# == Define: concat +# +# Sets up so that you can use fragments to build a final config file, +# +# === Options: +# +# [*ensure*] +# Present/Absent +# [*path*] +# The path to the final file. Use this in case you want to differentiate +# between the name of a resource and the file path. Note: Use the name you +# provided in the target of your fragments. +# [*owner*] +# Who will own the file +# [*group*] +# Who will own the file +# [*mode*] +# The mode of the final file +# [*force*] +# Enables creating empty files if no fragments are present +# [*warn*] +# Adds a normal shell style comment top of the file indicating that it is +# built by puppet +# [*force*] +# [*backup*] +# Controls the filebucketing behavior of the final file and see File type +# reference for its use. Defaults to 'puppet' +# [*replace*] +# Whether to replace a file that already exists on the local system +# [*order*] +# [*ensure_newline*] +# [*gnu*] +# Deprecated +# +# === Actions: +# * Creates fragment directories if it didn't exist already +# * Executes the concatfragments.sh script to build the final file, this +# script will create directory/fragments.concat. Execution happens only +# when: +# * The directory changes +# * fragments.concat != final destination, this means rebuilds will happen +# whenever someone changes or deletes the final file. Checking is done +# using /usr/bin/cmp. +# * The Exec gets notified by something else - like the concat::fragment +# define +# * Copies the file over to the final destination using a file resource +# +# === Aliases: +# +# * The exec can notified using Exec["concat_/path/to/file"] or +# Exec["concat_/path/to/directory"] +# * The final file can be referenced as File["/path/to/file"] or +# File["concat_/path/to/file"] +# +define concat( + $ensure = 'present', + $path = $name, + $owner = undef, + $group = undef, + $mode = '0644', + $warn = false, + $force = false, + $backup = 'puppet', + $replace = true, + $order = 'alpha', + $ensure_newline = false, + $gnu = undef +) { + validate_re($ensure, '^present$|^absent$') + validate_absolute_path($path) + validate_string($owner) + validate_string($group) + validate_string($mode) + if ! (is_string($warn) or $warn == true or $warn == false) { + fail('$warn is not a string or boolean') + } + validate_bool($force) + validate_string($backup) + validate_bool($replace) + validate_re($order, '^alpha$|^numeric$') + validate_bool($ensure_newline) + if $gnu { + warning('The $gnu parameter to concat is deprecated and has no effect') + } + + include concat::setup + + $safe_name = regsubst($name, '[/:]', '_', 'G') + $concatdir = $concat::setup::concatdir + $fragdir = "${concatdir}/${safe_name}" + $concat_name = 'fragments.concat.out' + $script_command = $concat::setup::script_command + $default_warn_message = '# This file is managed by Puppet. DO NOT EDIT.' + $bool_warn_message = 'Using stringified boolean values (\'true\', \'yes\', \'on\', \'false\', \'no\', \'off\') to represent boolean true/false as the $warn parameter to concat is deprecated and will be treated as the warning message in a future release' + + case $warn { + true: { + $warn_message = $default_warn_message + } + 'true', 'yes', 'on': { + warning($bool_warn_message) + $warn_message = $default_warn_message + } + false: { + $warn_message = '' + } + 'false', 'no', 'off': { + warning($bool_warn_message) + $warn_message = '' + } + default: { + $warn_message = $warn + } + } + + $warnmsg_escaped = regsubst($warn_message, '\'', '\'\\\'\'', 'G') + $warnflag = $warnmsg_escaped ? { + '' => '', + default => "-w '${warnmsg_escaped}'" + } + + $forceflag = $force ? { + true => '-f', + false => '', + } + + $orderflag = $order ? { + 'numeric' => '-n', + 'alpha' => '', + } + + $newlineflag = $ensure_newline ? { + true => '-l', + false => '', + } + + File { + backup => false, + } + + if $ensure == 'present' { + file { $fragdir: + ensure => directory, + mode => '0750', + } + + file { "${fragdir}/fragments": + ensure => directory, + mode => '0750', + force => true, + ignore => ['.svn', '.git', '.gitignore'], + notify => Exec["concat_${name}"], + purge => true, + recurse => true, + } + + file { "${fragdir}/fragments.concat": + ensure => present, + mode => '0640', + } + + file { "${fragdir}/${concat_name}": + ensure => present, + mode => '0640', + } + + file { $name: + ensure => present, + owner => $owner, + group => $group, + mode => $mode, + replace => $replace, + path => $path, + alias => "concat_${name}", + source => "${fragdir}/${concat_name}", + backup => $backup, + } + + # remove extra whitespace from string interpolation to make testing easier + $command = strip(regsubst("${script_command} -o \"${fragdir}/${concat_name}\" -d \"${fragdir}\" ${warnflag} ${forceflag} ${orderflag} ${newlineflag}", '\s+', ' ', 'G')) + + # if puppet is running as root, this exec should also run as root to allow + # the concatfragments.sh script to potentially be installed in path that + # may not be accessible by a target non-root owner. + exec { "concat_${name}": + alias => "concat_${fragdir}", + command => $command, + notify => File[$name], + subscribe => File[$fragdir], + unless => "${command} -t", + path => $::path, + require => [ + File[$fragdir], + File["${fragdir}/fragments"], + File["${fragdir}/fragments.concat"], + ], + } + } else { + file { [ + $fragdir, + "${fragdir}/fragments", + "${fragdir}/fragments.concat", + "${fragdir}/${concat_name}" + ]: + ensure => absent, + force => true, + } + + file { $path: + ensure => absent, + backup => $backup, + } + + $absent_exec_command = $::kernel ? { + 'windows' => 'cmd.exe /c exit 0', + default => 'true', + } + + $absent_exec_path = $::kernel ? { + 'windows' => $::path, + default => '/bin:/usr/bin', + } + + exec { "concat_${name}": + alias => "concat_${fragdir}", + command => $absent_exec_command, + path => $absent_exec_path + } + } +} + +# vim:sw=2:ts=2:expandtab:textwidth=79 diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/concat/manifests/setup.pp b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/concat/manifests/setup.pp new file mode 100644 index 00000000000..17674003cef --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/concat/manifests/setup.pp @@ -0,0 +1,58 @@ +# === Class: concat::setup +# +# Sets up the concat system. This is a private class. +# +# [$concatdir] +# is where the fragments live and is set on the fact concat_basedir. +# Since puppet should always manage files in $concatdir and they should +# not be deleted ever, /tmp is not an option. +# +# It also copies out the concatfragments.sh file to ${concatdir}/bin +# +class concat::setup { + if $caller_module_name != $module_name { + warning("${name} is deprecated as a public API of the ${module_name} module and should no longer be directly included in the manifest.") + } + + if $::concat_basedir { + $concatdir = $::concat_basedir + } else { + fail ('$concat_basedir not defined. Try running again with pluginsync=true on the [master] and/or [main] section of your node\'s \'/etc/puppet/puppet.conf\'.') + } + + # owner and mode of fragment files (on windows owner and access rights should be inherited from concatdir and not explicitly set to avoid problems) + $fragment_owner = $osfamily ? { 'windows' => undef, default => $::id } + $fragment_mode = $osfamily ? { 'windows' => undef, default => '0640' } + + $script_name = $::kernel ? { + 'windows' => 'concatfragments.rb', + default => 'concatfragments.sh' + } + + $script_path = "${concatdir}/bin/${script_name}" + + $script_owner = $osfamily ? { 'windows' => undef, default => $::id } + + $script_mode = $osfamily ? { 'windows' => undef, default => '0755' } + + $script_command = $::kernel ? { + 'windows' => "ruby.exe ${script_path}", + default => $script_path + } + + File { + backup => false, + } + + file { $script_path: + ensure => file, + owner => $script_owner, + mode => $script_mode, + source => "puppet:///modules/concat/${script_name}", + } + + file { [ $concatdir, "${concatdir}/bin" ]: + ensure => directory, + mode => '0755', + } +} diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/concat/spec/acceptance/backup_spec.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/concat/spec/acceptance/backup_spec.rb new file mode 100644 index 00000000000..7b2858d8e90 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/concat/spec/acceptance/backup_spec.rb @@ -0,0 +1,101 @@ +require 'spec_helper_acceptance' + +describe 'concat backup parameter' do + context '=> puppet' do + before :all do + shell('rm -rf /tmp/concat') + shell('mkdir -p /tmp/concat') + shell("/bin/echo 'old contents' > /tmp/concat/file") + end + + pp = <<-EOS + concat { '/tmp/concat/file': + backup => 'puppet', + } + concat::fragment { 'new file': + target => '/tmp/concat/file', + content => 'new contents', + } + EOS + + it 'applies the manifest twice with "Filebucketed" stdout and no stderr' do + apply_manifest(pp, :catch_failures => true) do |r| + expect(r.stderr).to eq("") + expect(r.stdout).to match(/Filebucketed \/tmp\/concat\/file to puppet with sum 0140c31db86293a1a1e080ce9b91305f/) # sum is for file contents of 'old contents' + end + expect(apply_manifest(pp, :catch_changes => true).stderr).to eq("") + end + + describe file('/tmp/concat/file') do + it { should be_file } + it { should contain 'new contents' } + end + end + + context '=> .backup' do + before :all do + shell('rm -rf /tmp/concat') + shell('mkdir -p /tmp/concat') + shell("/bin/echo 'old contents' > /tmp/concat/file") + end + + pp = <<-EOS + concat { '/tmp/concat/file': + backup => '.backup', + } + concat::fragment { 'new file': + target => '/tmp/concat/file', + content => 'new contents', + } + EOS + + # XXX Puppet doesn't mention anything about filebucketing with a given + # extension like .backup + it 'applies the manifest twice no stderr' do + expect(apply_manifest(pp, :catch_failures => true).stderr).to eq("") + expect(apply_manifest(pp, :catch_changes => true).stderr).to eq("") + end + + describe file('/tmp/concat/file') do + it { should be_file } + it { should contain 'new contents' } + end + describe file('/tmp/concat/file.backup') do + it { should be_file } + it { should contain 'old contents' } + end + end + + # XXX The backup parameter uses validate_string() and thus can't be the + # boolean false value, but the string 'false' has the same effect in Puppet 3 + context "=> 'false'" do + before :all do + shell('rm -rf /tmp/concat') + shell('mkdir -p /tmp/concat') + shell("/bin/echo 'old contents' > /tmp/concat/file") + end + + pp = <<-EOS + concat { '/tmp/concat/file': + backup => '.backup', + } + concat::fragment { 'new file': + target => '/tmp/concat/file', + content => 'new contents', + } + EOS + + it 'applies the manifest twice with no "Filebucketed" stdout and no stderr' do + apply_manifest(pp, :catch_failures => true) do |r| + expect(r.stderr).to eq("") + expect(r.stdout).to_not match(/Filebucketed/) + end + expect(apply_manifest(pp, :catch_changes => true).stderr).to eq("") + end + + describe file('/tmp/concat/file') do + it { should be_file } + it { should contain 'new contents' } + end + end +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/concat/spec/acceptance/concat_spec.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/concat/spec/acceptance/concat_spec.rb new file mode 100644 index 00000000000..89919cc53b6 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/concat/spec/acceptance/concat_spec.rb @@ -0,0 +1,204 @@ +require 'spec_helper_acceptance' + +describe 'basic concat test' do + + shared_examples 'successfully_applied' do |pp| + it 'applies the manifest twice with no stderr' do + expect(apply_manifest(pp, :catch_failures => true).stderr).to eq("") + expect(apply_manifest(pp, :catch_changes => true).stderr).to eq("") + end + + describe file("#{default['puppetvardir']}/concat") do + it { should be_directory } + it { should be_owned_by 'root' } + it { should be_grouped_into 'root' } + it { should be_mode 755 } + end + describe file("#{default['puppetvardir']}/concat/bin") do + it { should be_directory } + it { should be_owned_by 'root' } + it { should be_grouped_into 'root' } + it { should be_mode 755 } + end + describe file("#{default['puppetvardir']}/concat/bin/concatfragments.sh") do + it { should be_file } + it { should be_owned_by 'root' } + #it { should be_grouped_into 'root' } + it { should be_mode 755 } + end + describe file("#{default['puppetvardir']}/concat/_tmp_concat_file") do + it { should be_directory } + it { should be_owned_by 'root' } + it { should be_grouped_into 'root' } + it { should be_mode 750 } + end + describe file("#{default['puppetvardir']}/concat/_tmp_concat_file/fragments") do + it { should be_directory } + it { should be_owned_by 'root' } + it { should be_grouped_into 'root' } + it { should be_mode 750 } + end + describe file("#{default['puppetvardir']}/concat/_tmp_concat_file/fragments.concat") do + it { should be_file } + it { should be_owned_by 'root' } + it { should be_grouped_into 'root' } + it { should be_mode 640 } + end + describe file("#{default['puppetvardir']}/concat/_tmp_concat_file/fragments.concat.out") do + it { should be_file } + it { should be_owned_by 'root' } + it { should be_grouped_into 'root' } + it { should be_mode 640 } + end + end + + context 'owner/group root' do + pp = <<-EOS + concat { '/tmp/concat/file': + owner => 'root', + group => 'root', + mode => '0644', + } + + concat::fragment { '1': + target => '/tmp/concat/file', + content => '1', + order => '01', + } + + concat::fragment { '2': + target => '/tmp/concat/file', + content => '2', + order => '02', + } + EOS + + it_behaves_like 'successfully_applied', pp + + describe file('/tmp/concat/file') do + it { should be_file } + it { should be_owned_by 'root' } + it { should be_grouped_into 'root' } + it { should be_mode 644 } + it { should contain '1' } + it { should contain '2' } + end + describe file("#{default['puppetvardir']}/concat/_tmp_concat_file/fragments/01_1") do + it { should be_file } + it { should be_owned_by 'root' } + it { should be_grouped_into 'root' } + it { should be_mode 640 } + end + describe file("#{default['puppetvardir']}/concat/_tmp_concat_file/fragments/02_2") do + it { should be_file } + it { should be_owned_by 'root' } + it { should be_grouped_into 'root' } + it { should be_mode 640 } + end + end + + context 'owner/group non-root' do + before(:all) do + shell "groupadd -g 64444 bob" + shell "useradd -u 42 -g 64444 bob" + end + after(:all) do + shell "userdel bob" + end + + pp=" + concat { '/tmp/concat/file': + owner => 'bob', + group => 'bob', + mode => '0644', + } + + concat::fragment { '1': + target => '/tmp/concat/file', + content => '1', + order => '01', + } + + concat::fragment { '2': + target => '/tmp/concat/file', + content => '2', + order => '02', + } + " + + it_behaves_like 'successfully_applied', pp + + describe file('/tmp/concat/file') do + it { should be_file } + it { should be_owned_by 'bob' } + it { should be_grouped_into 'bob' } + it { should be_mode 644 } + it { should contain '1' } + it { should contain '2' } + end + describe file("#{default['puppetvardir']}/concat/_tmp_concat_file/fragments/01_1") do + it { should be_file } + it { should be_owned_by 'root' } + it { should be_grouped_into 'root' } + it { should be_mode 640 } + it { should contain '1' } + end + describe file("#{default['puppetvardir']}/concat/_tmp_concat_file/fragments/02_2") do + it { should be_file } + it { should be_owned_by 'root' } + it { should be_grouped_into 'root' } + it { should be_mode 640 } + it { should contain '2' } + end + end + + context 'ensure' do + context 'works when set to present with path set' do + pp=" + concat { 'file': + ensure => present, + path => '/tmp/concat/file', + mode => '0644', + } + concat::fragment { '1': + target => 'file', + content => '1', + order => '01', + } + " + + it_behaves_like 'successfully_applied', pp + + describe file('/tmp/concat/file') do + it { should be_file } + it { should be_mode 644 } + it { should contain '1' } + end + end + context 'works when set to absent with path set' do + pp=" + concat { 'file': + ensure => absent, + path => '/tmp/concat/file', + mode => '0644', + } + concat::fragment { '1': + target => 'file', + content => '1', + order => '01', + } + " + + # Can't used shared examples as this will always trigger the exec when + # absent is set. + it 'applies the manifest twice with no stderr' do + expect(apply_manifest(pp, :catch_failures => true).stderr).to eq("") + expect(apply_manifest(pp, :catch_failures => true).stderr).to eq("") + end + + describe file('/tmp/concat/file') do + it { should_not be_file } + end + end + end +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/concat/spec/acceptance/deprecation_warnings_spec.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/concat/spec/acceptance/deprecation_warnings_spec.rb new file mode 100644 index 00000000000..f139d818c6b --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/concat/spec/acceptance/deprecation_warnings_spec.rb @@ -0,0 +1,230 @@ +require 'spec_helper_acceptance' + +describe 'deprecation warnings' do + + shared_examples 'has_warning'do |pp, w| + it 'applies the manifest twice with a stderr regex' do + expect(apply_manifest(pp, :catch_failures => true).stderr).to match(/#{Regexp.escape(w)}/m) + expect(apply_manifest(pp, :catch_changes => true).stderr).to match(/#{Regexp.escape(w)}/m) + end + end + + context 'concat gnu parameter' do + pp = <<-EOS + concat { '/tmp/concat/file': + gnu => 'foo', + } + concat::fragment { 'foo': + target => '/tmp/concat/file', + content => 'bar', + } + EOS + w = 'The $gnu parameter to concat is deprecated and has no effect' + + it_behaves_like 'has_warning', pp, w + end + + context 'concat warn parameter =>' do + ['true', 'yes', 'on'].each do |warn| + context warn do + pp = <<-EOS + concat { '/tmp/concat/file': + warn => '#{warn}', + } + concat::fragment { 'foo': + target => '/tmp/concat/file', + content => 'bar', + } + EOS + w = 'Using stringified boolean values (\'true\', \'yes\', \'on\', \'false\', \'no\', \'off\') to represent boolean true/false as the $warn parameter to concat is deprecated and will be treated as the warning message in a future release' + + it_behaves_like 'has_warning', pp, w + + describe file('/tmp/concat/file') do + it { should be_file } + it { should contain '# This file is managed by Puppet. DO NOT EDIT.' } + it { should contain 'bar' } + end + end + end + + ['false', 'no', 'off'].each do |warn| + context warn do + pp = <<-EOS + concat { '/tmp/concat/file': + warn => '#{warn}', + } + concat::fragment { 'foo': + target => '/tmp/concat/file', + content => 'bar', + } + EOS + w = 'Using stringified boolean values (\'true\', \'yes\', \'on\', \'false\', \'no\', \'off\') to represent boolean true/false as the $warn parameter to concat is deprecated and will be treated as the warning message in a future release' + + it_behaves_like 'has_warning', pp, w + + describe file('/tmp/concat/file') do + it { should be_file } + it { should_not contain '# This file is managed by Puppet. DO NOT EDIT.' } + it { should contain 'bar' } + end + end + end + end + + context 'concat::fragment ensure parameter' do + context 'target file exists' do + before(:all) do + shell("/bin/echo 'file1 contents' > /tmp/concat/file1") + end + after(:all) do + # XXX this test may leave behind a symlink in the fragment directory + # which could cause warnings and/or breakage from the subsequent tests + # unless we clean it up. + shell('rm -rf /tmp/concat /var/lib/puppet/concat') + shell('mkdir -p /tmp/concat') + end + + pp = <<-EOS + concat { '/tmp/concat/file': } + concat::fragment { 'foo': + target => '/tmp/concat/file', + ensure => '/tmp/concat/file1', + } + EOS + w = 'Passing a value other than \'present\' or \'absent\' as the $ensure parameter to concat::fragment is deprecated. If you want to use the content of a file as a fragment please use the $source parameter.' + + it_behaves_like 'has_warning', pp, w + + describe file('/tmp/concat/file') do + it { should be_file } + it { should contain 'file1 contents' } + end + + describe 'the fragment can be changed from a symlink to a plain file' do + pp = <<-EOS + concat { '/tmp/concat/file': } + concat::fragment { 'foo': + target => '/tmp/concat/file', + content => 'new content', + } + EOS + + it 'applies the manifest twice with no stderr' do + expect(apply_manifest(pp, :catch_failures => true).stderr).to eq("") + expect(apply_manifest(pp, :catch_changes => true).stderr).to eq("") + end + + describe file('/tmp/concat/file') do + it { should be_file } + it { should contain 'new content' } + it { should_not contain 'file1 contents' } + end + end + end # target file exists + + context 'target does not exist' do + pp = <<-EOS + concat { '/tmp/concat/file': } + concat::fragment { 'foo': + target => '/tmp/concat/file', + ensure => '/tmp/concat/file1', + } + EOS + w = 'Passing a value other than \'present\' or \'absent\' as the $ensure parameter to concat::fragment is deprecated. If you want to use the content of a file as a fragment please use the $source parameter.' + + it_behaves_like 'has_warning', pp, w + + describe file('/tmp/concat/file') do + it { should be_file } + end + + describe 'the fragment can be changed from a symlink to a plain file' do + pp = <<-EOS + concat { '/tmp/concat/file': } + concat::fragment { 'foo': + target => '/tmp/concat/file', + content => 'new content', + } + EOS + + it 'applies the manifest twice with no stderr' do + expect(apply_manifest(pp, :catch_failures => true).stderr).to eq("") + expect(apply_manifest(pp, :catch_changes => true).stderr).to eq("") + end + + describe file('/tmp/concat/file') do + it { should be_file } + it { should contain 'new content' } + end + end + end # target file exists + + end # concat::fragment ensure parameter + + context 'concat::fragment mode parameter' do + pp = <<-EOS + concat { '/tmp/concat/file': } + concat::fragment { 'foo': + target => '/tmp/concat/file', + content => 'bar', + mode => 'bar', + } + EOS + w = 'The $mode parameter to concat::fragment is deprecated and has no effect' + + it_behaves_like 'has_warning', pp, w + end + + context 'concat::fragment owner parameter' do + pp = <<-EOS + concat { '/tmp/concat/file': } + concat::fragment { 'foo': + target => '/tmp/concat/file', + content => 'bar', + owner => 'bar', + } + EOS + w = 'The $owner parameter to concat::fragment is deprecated and has no effect' + + it_behaves_like 'has_warning', pp, w + end + + context 'concat::fragment group parameter' do + pp = <<-EOS + concat { '/tmp/concat/file': } + concat::fragment { 'foo': + target => '/tmp/concat/file', + content => 'bar', + group => 'bar', + } + EOS + w = 'The $group parameter to concat::fragment is deprecated and has no effect' + + it_behaves_like 'has_warning', pp, w + end + + context 'concat::fragment backup parameter' do + pp = <<-EOS + concat { '/tmp/concat/file': } + concat::fragment { 'foo': + target => '/tmp/concat/file', + content => 'bar', + backup => 'bar', + } + EOS + w = 'The $backup parameter to concat::fragment is deprecated and has no effect' + + it_behaves_like 'has_warning', pp, w + end + + context 'include concat::setup' do + pp = <<-EOS + include concat::setup + EOS + w = 'concat::setup is deprecated as a public API of the concat module and should no longer be directly included in the manifest.' + + it_behaves_like 'has_warning', pp, w + end + +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/concat/spec/acceptance/empty_spec.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/concat/spec/acceptance/empty_spec.rb new file mode 100644 index 00000000000..09995282a33 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/concat/spec/acceptance/empty_spec.rb @@ -0,0 +1,24 @@ +require 'spec_helper_acceptance' + +describe 'concat force empty parameter' do + context 'should run successfully' do + pp = <<-EOS + concat { '/tmp/concat/file': + owner => root, + group => root, + mode => '0644', + force => true, + } + EOS + + it 'applies the manifest twice with no stderr' do + expect(apply_manifest(pp, :catch_failures => true).stderr).to eq("") + expect(apply_manifest(pp, :catch_changes => true).stderr).to eq("") + end + + describe file('/tmp/concat/file') do + it { should be_file } + it { should_not contain '1\n2' } + end + end +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/concat/spec/acceptance/fragment_source_spec.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/concat/spec/acceptance/fragment_source_spec.rb new file mode 100644 index 00000000000..3afd53430db --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/concat/spec/acceptance/fragment_source_spec.rb @@ -0,0 +1,134 @@ +require 'spec_helper_acceptance' + +describe 'concat::fragment source' do + context 'should read file fragments from local system' do + before(:all) do + shell("/bin/echo 'file1 contents' > /tmp/concat/file1") + shell("/bin/echo 'file2 contents' > /tmp/concat/file2") + end + + pp = <<-EOS + concat { '/tmp/concat/foo': } + + concat::fragment { '1': + target => '/tmp/concat/foo', + source => '/tmp/concat/file1', + } + concat::fragment { '2': + target => '/tmp/concat/foo', + content => 'string1 contents', + } + concat::fragment { '3': + target => '/tmp/concat/foo', + source => '/tmp/concat/file2', + } + EOS + + it 'applies the manifest twice with no stderr' do + expect(apply_manifest(pp, :catch_failures => true).stderr).to eq("") + expect(apply_manifest(pp, :catch_changes => true).stderr).to eq("") + end + + describe file('/tmp/concat/foo') do + it { should be_file } + it { should contain 'file1 contents' } + it { should contain 'string1 contents' } + it { should contain 'file2 contents' } + end + end # should read file fragments from local system + + context 'should create files containing first match only.' do + before(:all) do + shell('rm -rf /tmp/concat /var/lib/puppet/concat') + shell('mkdir -p /tmp/concat') + shell("/bin/echo 'file1 contents' > /tmp/concat/file1") + shell("/bin/echo 'file2 contents' > /tmp/concat/file2") + end + + pp = <<-EOS + concat { '/tmp/concat/result_file1': + owner => root, + group => root, + mode => '0644', + } + concat { '/tmp/concat/result_file2': + owner => root, + group => root, + mode => '0644', + } + concat { '/tmp/concat/result_file3': + owner => root, + group => root, + mode => '0644', + } + + concat::fragment { '1': + target => '/tmp/concat/result_file1', + source => [ '/tmp/concat/file1', '/tmp/concat/file2' ], + order => '01', + } + concat::fragment { '2': + target => '/tmp/concat/result_file2', + source => [ '/tmp/concat/file2', '/tmp/concat/file1' ], + order => '01', + } + concat::fragment { '3': + target => '/tmp/concat/result_file3', + source => [ '/tmp/concat/file1', '/tmp/concat/file2' ], + order => '01', + } + EOS + + it 'applies the manifest twice with no stderr' do + expect(apply_manifest(pp, :catch_failures => true).stderr).to eq("") + expect(apply_manifest(pp, :catch_changes => true).stderr).to eq("") + end + describe file('/tmp/concat/result_file1') do + it { should be_file } + it { should contain 'file1 contents' } + it { should_not contain 'file2 contents' } + end + describe file('/tmp/concat/result_file2') do + it { should be_file } + it { should contain 'file2 contents' } + it { should_not contain 'file1 contents' } + end + describe file('/tmp/concat/result_file3') do + it { should be_file } + it { should contain 'file1 contents' } + it { should_not contain 'file2 contents' } + end + end + + context 'should fail if no match on source.' do + before(:all) do + shell('rm -rf /tmp/concat /var/lib/puppet/concat') + shell('mkdir -p /tmp/concat') + shell('/bin/rm -rf /tmp/concat/fail_no_source /tmp/concat/nofilehere /tmp/concat/nothereeither') + end + + pp = <<-EOS + concat { '/tmp/concat/fail_no_source': + owner => root, + group => root, + mode => '0644', + } + + concat::fragment { '1': + target => '/tmp/concat/fail_no_source', + source => [ '/tmp/concat/nofilehere', '/tmp/concat/nothereeither' ], + order => '01', + } + EOS + + it 'applies the manifest with resource failures' do + apply_manifest(pp, :expect_failures => true) + end + describe file('/tmp/concat/fail_no_source') do + #FIXME: Serverspec::Type::File doesn't support exists? for some reason. so... hack. + it { should_not be_file } + it { should_not be_directory } + end + end +end + diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/concat/spec/acceptance/newline_spec.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/concat/spec/acceptance/newline_spec.rb new file mode 100644 index 00000000000..1e989df2ab1 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/concat/spec/acceptance/newline_spec.rb @@ -0,0 +1,57 @@ +require 'spec_helper_acceptance' + +describe 'concat ensure_newline parameter' do + context '=> false' do + pp = <<-EOS + concat { '/tmp/concat/file': + ensure_newline => false, + } + concat::fragment { '1': + target => '/tmp/concat/file', + content => '1', + } + concat::fragment { '2': + target => '/tmp/concat/file', + content => '2', + } + EOS + + it 'applies the manifest twice with no stderr' do + expect(apply_manifest(pp, :catch_failures => true).stderr).to eq("") + expect(apply_manifest(pp, :catch_changes => true).stderr).to eq("") + end + + describe file('/tmp/concat/file') do + it { should be_file } + it { should contain '12' } + end + end + + context '=> true' do + pp = <<-EOS + concat { '/tmp/concat/file': + ensure_newline => true, + } + concat::fragment { '1': + target => '/tmp/concat/file', + content => '1', + } + concat::fragment { '2': + target => '/tmp/concat/file', + content => '2', + } + EOS + + it 'applies the manifest twice with no stderr' do + expect(apply_manifest(pp, :catch_failures => true).stderr).to eq("") + expect(apply_manifest(pp, :catch_changes => true).stderr).to eq("") + #XXX ensure_newline => true causes changes on every run because the files + #are modified in place. + end + + describe file('/tmp/concat/file') do + it { should be_file } + it { should contain "1\n2\n" } + end + end +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/concat/spec/acceptance/nodesets/aix-71-vcloud.yml b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/concat/spec/acceptance/nodesets/aix-71-vcloud.yml new file mode 100644 index 00000000000..f0ae87a5c82 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/concat/spec/acceptance/nodesets/aix-71-vcloud.yml @@ -0,0 +1,19 @@ +HOSTS: + pe-aix-71-acceptance: + roles: + - master + - dashboard + - database + - agent + - default + platform: aix-7.1-power + hypervisor: aix + ip: pe-aix-71-acceptance.delivery.puppetlabs.net +CONFIG: + type: pe + nfs_server: NONE + consoleport: 443 + datastore: instance0 + folder: Delivery/Quality Assurance/Enterprise/Dynamic + resourcepool: delivery/Quality Assurance/Enterprise/Dynamic + pooling_api: http://vcloud.delivery.puppetlabs.net/ diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/concat/spec/acceptance/nodesets/centos-59-x64.yml b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/concat/spec/acceptance/nodesets/centos-59-x64.yml new file mode 100644 index 00000000000..2ad90b86aab --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/concat/spec/acceptance/nodesets/centos-59-x64.yml @@ -0,0 +1,10 @@ +HOSTS: + centos-59-x64: + roles: + - master + platform: el-5-x86_64 + box : centos-59-x64-vbox4210-nocm + box_url : http://puppet-vagrant-boxes.puppetlabs.com/centos-59-x64-vbox4210-nocm.box + hypervisor : vagrant +CONFIG: + type: git diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/concat/spec/acceptance/nodesets/centos-64-x64-pe.yml b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/concat/spec/acceptance/nodesets/centos-64-x64-pe.yml new file mode 100644 index 00000000000..7d9242f1b95 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/concat/spec/acceptance/nodesets/centos-64-x64-pe.yml @@ -0,0 +1,12 @@ +HOSTS: + centos-64-x64: + roles: + - master + - database + - dashboard + platform: el-6-x86_64 + box : centos-64-x64-vbox4210-nocm + box_url : http://puppet-vagrant-boxes.puppetlabs.com/centos-64-x64-vbox4210-nocm.box + hypervisor : vagrant +CONFIG: + type: pe diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/concat/spec/acceptance/nodesets/centos-64-x64.yml b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/concat/spec/acceptance/nodesets/centos-64-x64.yml new file mode 100644 index 00000000000..05540ed8c5a --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/concat/spec/acceptance/nodesets/centos-64-x64.yml @@ -0,0 +1,10 @@ +HOSTS: + centos-64-x64: + roles: + - master + platform: el-6-x86_64 + box : centos-64-x64-vbox4210-nocm + box_url : http://puppet-vagrant-boxes.puppetlabs.com/centos-64-x64-vbox4210-nocm.box + hypervisor : vagrant +CONFIG: + type: foss diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/concat/spec/acceptance/nodesets/debian-607-x64.yml b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/concat/spec/acceptance/nodesets/debian-607-x64.yml new file mode 100644 index 00000000000..4c8be42d033 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/concat/spec/acceptance/nodesets/debian-607-x64.yml @@ -0,0 +1,10 @@ +HOSTS: + debian-607-x64: + roles: + - master + platform: debian-6-amd64 + box : debian-607-x64-vbox4210-nocm + box_url : http://puppet-vagrant-boxes.puppetlabs.com/debian-607-x64-vbox4210-nocm.box + hypervisor : vagrant +CONFIG: + type: git diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/concat/spec/acceptance/nodesets/debian-70rc1-x64.yml b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/concat/spec/acceptance/nodesets/debian-70rc1-x64.yml new file mode 100644 index 00000000000..19181c123d0 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/concat/spec/acceptance/nodesets/debian-70rc1-x64.yml @@ -0,0 +1,10 @@ +HOSTS: + debian-70rc1-x64: + roles: + - master + platform: debian-7-amd64 + box : debian-70rc1-x64-vbox4210-nocm + box_url : http://puppet-vagrant-boxes.puppetlabs.com/debian-70rc1-x64-vbox4210-nocm.box + hypervisor : vagrant +CONFIG: + type: git diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/concat/spec/acceptance/nodesets/debian-73-x64.yml b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/concat/spec/acceptance/nodesets/debian-73-x64.yml new file mode 100644 index 00000000000..3e6a3a9dddf --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/concat/spec/acceptance/nodesets/debian-73-x64.yml @@ -0,0 +1,11 @@ +HOSTS: + debian-73-x64.localhost: + roles: + - master + platform: debian-7-amd64 + box : debian-73-x64-virtualbox-nocm + box_url : http://puppet-vagrant-boxes.puppetlabs.com/debian-73-x64-virtualbox-nocm.box + hypervisor : vagrant +CONFIG: + log_level: debug + type: foss diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/concat/spec/acceptance/nodesets/default.yml b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/concat/spec/acceptance/nodesets/default.yml new file mode 100644 index 00000000000..ae812b0aef9 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/concat/spec/acceptance/nodesets/default.yml @@ -0,0 +1,10 @@ +HOSTS: + centos-64-x64.localdomain: + roles: + - master + platform: el-6-x86_64 + box : centos-65-x64-virtualbox-nocm + box_url : http://puppet-vagrant-boxes.puppetlabs.com/centos-65-x64-virtualbox-nocm.box + hypervisor : vagrant +CONFIG: + type: foss diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/concat/spec/acceptance/nodesets/fedora-18-x64.yml b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/concat/spec/acceptance/nodesets/fedora-18-x64.yml new file mode 100644 index 00000000000..13616498307 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/concat/spec/acceptance/nodesets/fedora-18-x64.yml @@ -0,0 +1,10 @@ +HOSTS: + fedora-18-x64: + roles: + - master + platform: fedora-18-x86_64 + box : fedora-18-x64-vbox4210-nocm + box_url : http://puppet-vagrant-boxes.puppetlabs.com/fedora-18-x64-vbox4210-nocm.box + hypervisor : vagrant +CONFIG: + type: foss diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/concat/spec/acceptance/nodesets/sles-11-x64.yml b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/concat/spec/acceptance/nodesets/sles-11-x64.yml new file mode 100644 index 00000000000..41abe2135e2 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/concat/spec/acceptance/nodesets/sles-11-x64.yml @@ -0,0 +1,10 @@ +HOSTS: + sles-11-x64.local: + roles: + - master + platform: sles-11-x64 + box : sles-11sp1-x64-vbox4210-nocm + box_url : http://puppet-vagrant-boxes.puppetlabs.com/sles-11sp1-x64-vbox4210-nocm.box + hypervisor : vagrant +CONFIG: + type: foss diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/concat/spec/acceptance/nodesets/sles-11sp1-x64.yml b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/concat/spec/acceptance/nodesets/sles-11sp1-x64.yml new file mode 100644 index 00000000000..554c37a505c --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/concat/spec/acceptance/nodesets/sles-11sp1-x64.yml @@ -0,0 +1,10 @@ +HOSTS: + sles-11sp1-x64: + roles: + - master + platform: sles-11-x86_64 + box : sles-11sp1-x64-vbox4210-nocm + box_url : http://puppet-vagrant-boxes.puppetlabs.com/sles-11sp1-x64-vbox4210-nocm.box + hypervisor : vagrant +CONFIG: + type: git diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/concat/spec/acceptance/nodesets/ubuntu-server-10044-x64.yml b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/concat/spec/acceptance/nodesets/ubuntu-server-10044-x64.yml new file mode 100644 index 00000000000..5ca1514e407 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/concat/spec/acceptance/nodesets/ubuntu-server-10044-x64.yml @@ -0,0 +1,10 @@ +HOSTS: + ubuntu-server-10044-x64: + roles: + - master + platform: ubuntu-10.04-amd64 + box : ubuntu-server-10044-x64-vbox4210-nocm + box_url : http://puppet-vagrant-boxes.puppetlabs.com/ubuntu-server-10044-x64-vbox4210-nocm.box + hypervisor : vagrant +CONFIG: + type: foss diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/concat/spec/acceptance/nodesets/ubuntu-server-12042-x64.yml b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/concat/spec/acceptance/nodesets/ubuntu-server-12042-x64.yml new file mode 100644 index 00000000000..d065b304f83 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/concat/spec/acceptance/nodesets/ubuntu-server-12042-x64.yml @@ -0,0 +1,10 @@ +HOSTS: + ubuntu-server-12042-x64: + roles: + - master + platform: ubuntu-12.04-amd64 + box : ubuntu-server-12042-x64-vbox4210-nocm + box_url : http://puppet-vagrant-boxes.puppetlabs.com/ubuntu-server-12042-x64-vbox4210-nocm.box + hypervisor : vagrant +CONFIG: + type: foss diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/concat/spec/acceptance/nodesets/ubuntu-server-1404-x64.yml b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/concat/spec/acceptance/nodesets/ubuntu-server-1404-x64.yml new file mode 100644 index 00000000000..cba1cd04c25 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/concat/spec/acceptance/nodesets/ubuntu-server-1404-x64.yml @@ -0,0 +1,11 @@ +HOSTS: + ubuntu-server-1404-x64: + roles: + - master + platform: ubuntu-14.04-amd64 + box : puppetlabs/ubuntu-14.04-64-nocm + box_url : https://vagrantcloud.com/puppetlabs/ubuntu-14.04-64-nocm + hypervisor : vagrant +CONFIG: + log_level : debug + type: git diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/concat/spec/acceptance/order_spec.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/concat/spec/acceptance/order_spec.rb new file mode 100644 index 00000000000..8bcb7131ce8 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/concat/spec/acceptance/order_spec.rb @@ -0,0 +1,137 @@ +require 'spec_helper_acceptance' + +describe 'concat order' do + before(:all) do + shell('rm -rf /tmp/concat /var/lib/puppet/concat') + shell('mkdir -p /tmp/concat') + end + + context '=> alpha' do + pp = <<-EOS + concat { '/tmp/concat/foo': + order => 'alpha' + } + concat::fragment { '1': + target => '/tmp/concat/foo', + content => 'string1', + } + concat::fragment { '2': + target => '/tmp/concat/foo', + content => 'string2', + } + concat::fragment { '10': + target => '/tmp/concat/foo', + content => 'string10', + } + EOS + + it 'applies the manifest twice with no stderr' do + expect(apply_manifest(pp, :catch_failures => true).stderr).to eq("") + expect(apply_manifest(pp, :catch_changes => true).stderr).to eq("") + end + + describe file('/tmp/concat/foo') do + it { should be_file } + it { should contain "string10\nstring1\nsring2" } + end + end + + context '=> numeric' do + pp = <<-EOS + concat { '/tmp/concat/foo': + order => 'numeric' + } + concat::fragment { '1': + target => '/tmp/concat/foo', + content => 'string1', + } + concat::fragment { '2': + target => '/tmp/concat/foo', + content => 'string2', + } + concat::fragment { '10': + target => '/tmp/concat/foo', + content => 'string10', + } + EOS + + it 'applies the manifest twice with no stderr' do + expect(apply_manifest(pp, :catch_failures => true).stderr).to eq("") + expect(apply_manifest(pp, :catch_changes => true).stderr).to eq("") + end + + describe file('/tmp/concat/foo') do + it { should be_file } + it { should contain "string1\nstring2\nsring10" } + end + end +end # concat order + +describe 'concat::fragment order' do + before(:all) do + shell('rm -rf /tmp/concat /var/lib/puppet/concat') + shell('mkdir -p /tmp/concat') + end + + context '=> reverse order' do + pp = <<-EOS + concat { '/tmp/concat/foo': } + concat::fragment { '1': + target => '/tmp/concat/foo', + content => 'string1', + order => '15', + } + concat::fragment { '2': + target => '/tmp/concat/foo', + content => 'string2', + # default order 10 + } + concat::fragment { '3': + target => '/tmp/concat/foo', + content => 'string3', + order => '1', + } + EOS + + it 'applies the manifest twice with no stderr' do + expect(apply_manifest(pp, :catch_failures => true).stderr).to eq("") + expect(apply_manifest(pp, :catch_changes => true).stderr).to eq("") + end + + describe file('/tmp/concat/foo') do + it { should be_file } + it { should contain "string3\nstring2\nsring1" } + end + end + + context '=> normal order' do + pp = <<-EOS + concat { '/tmp/concat/foo': } + concat::fragment { '1': + target => '/tmp/concat/foo', + content => 'string1', + order => '01', + } + concat::fragment { '2': + target => '/tmp/concat/foo', + content => 'string2', + order => '02' + } + concat::fragment { '3': + target => '/tmp/concat/foo', + content => 'string3', + order => '03', + } + EOS + + it 'applies the manifest twice with no stderr' do + expect(apply_manifest(pp, :catch_failures => true).stderr).to eq("") + expect(apply_manifest(pp, :catch_changes => true).stderr).to eq("") + end + + describe file('/tmp/concat/foo') do + it { should be_file } + it { should contain "string1\nstring2\nsring3" } + end + end +end # concat::fragment order diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/concat/spec/acceptance/quoted_paths_spec.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/concat/spec/acceptance/quoted_paths_spec.rb new file mode 100644 index 00000000000..af352efce83 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/concat/spec/acceptance/quoted_paths_spec.rb @@ -0,0 +1,33 @@ +require 'spec_helper_acceptance' + +describe 'quoted paths' do + before(:all) do + shell('rm -rf "/tmp/concat test" /var/lib/puppet/concat') + shell('mkdir -p "/tmp/concat test"') + end + + context 'path with blanks' do + pp = <<-EOS + concat { '/tmp/concat test/foo': + } + concat::fragment { '1': + target => '/tmp/concat test/foo', + content => 'string1', + } + concat::fragment { '2': + target => '/tmp/concat test/foo', + content => 'string2', + } + EOS + + it 'applies the manifest twice with no stderr' do + expect(apply_manifest(pp, :catch_failures => true).stderr).to eq("") + expect(apply_manifest(pp, :catch_changes => true).stderr).to eq("") + end + + describe file('/tmp/concat test/foo') do + it { should be_file } + it { should contain "string1\nsring2" } + end + end +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/concat/spec/acceptance/replace_spec.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/concat/spec/acceptance/replace_spec.rb new file mode 100644 index 00000000000..7b31e09c440 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/concat/spec/acceptance/replace_spec.rb @@ -0,0 +1,241 @@ +require 'spec_helper_acceptance' + +describe 'replacement of' do + context 'file' do + context 'should not succeed' do + before(:all) do + shell('mkdir -p /tmp/concat') + shell('echo "file exists" > /tmp/concat/file') + end + after(:all) do + shell('rm -rf /tmp/concat /var/lib/puppet/concat') + end + + pp = <<-EOS + concat { '/tmp/concat/file': + replace => false, + } + + concat::fragment { '1': + target => '/tmp/concat/file', + content => '1', + } + + concat::fragment { '2': + target => '/tmp/concat/file', + content => '2', + } + EOS + + it 'applies the manifest twice with no stderr' do + expect(apply_manifest(pp, :catch_failures => true).stderr).to eq("") + expect(apply_manifest(pp, :catch_changes => true).stderr).to eq("") + end + + describe file('/tmp/concat/file') do + it { should be_file } + it { should contain 'file exists' } + it { should_not contain '1' } + it { should_not contain '2' } + end + end + + context 'should succeed' do + before(:all) do + shell('mkdir -p /tmp/concat') + shell('echo "file exists" > /tmp/concat/file') + end + after(:all) do + shell('rm -rf /tmp/concat /var/lib/puppet/concat') + end + + pp = <<-EOS + concat { '/tmp/concat/file': + replace => true, + } + + concat::fragment { '1': + target => '/tmp/concat/file', + content => '1', + } + + concat::fragment { '2': + target => '/tmp/concat/file', + content => '2', + } + EOS + + it 'applies the manifest twice with no stderr' do + expect(apply_manifest(pp, :catch_failures => true).stderr).to eq("") + expect(apply_manifest(pp, :catch_changes => true).stderr).to eq("") + end + + describe file('/tmp/concat/file') do + it { should be_file } + it { should_not contain 'file exists' } + it { should contain '1' } + it { should contain '2' } + end + end + end # file + + context 'symlink' do + context 'should not succeed' do + # XXX the core puppet file type will replace a symlink with a plain file + # when using ensure => present and source => ... but it will not when using + # ensure => present and content => ...; this is somewhat confusing behavior + before(:all) do + shell('mkdir -p /tmp/concat') + shell('ln -s /tmp/concat/dangling /tmp/concat/file') + end + after(:all) do + shell('rm -rf /tmp/concat /var/lib/puppet/concat') + end + + pp = <<-EOS + concat { '/tmp/concat/file': + replace => false, + } + + concat::fragment { '1': + target => '/tmp/concat/file', + content => '1', + } + + concat::fragment { '2': + target => '/tmp/concat/file', + content => '2', + } + EOS + + it 'applies the manifest twice with no stderr' do + expect(apply_manifest(pp, :catch_failures => true).stderr).to eq("") + expect(apply_manifest(pp, :catch_changes => true).stderr).to eq("") + end + + describe file('/tmp/concat/file') do + it { should be_linked_to '/tmp/concat/dangling' } + end + + describe file('/tmp/concat/dangling') do + # XXX serverspec does not have a matcher for 'exists' + it { should_not be_file } + it { should_not be_directory } + end + end + + context 'should succeed' do + # XXX the core puppet file type will replace a symlink with a plain file + # when using ensure => present and source => ... but it will not when using + # ensure => present and content => ...; this is somewhat confusing behavior + before(:all) do + shell('mkdir -p /tmp/concat') + shell('ln -s /tmp/concat/dangling /tmp/concat/file') + end + after(:all) do + shell('rm -rf /tmp/concat /var/lib/puppet/concat') + end + + pp = <<-EOS + concat { '/tmp/concat/file': + replace => true, + } + + concat::fragment { '1': + target => '/tmp/concat/file', + content => '1', + } + + concat::fragment { '2': + target => '/tmp/concat/file', + content => '2', + } + EOS + + it 'applies the manifest twice with no stderr' do + expect(apply_manifest(pp, :catch_failures => true).stderr).to eq("") + expect(apply_manifest(pp, :catch_changes => true).stderr).to eq("") + end + + describe file('/tmp/concat/file') do + it { should be_file } + it { should contain '1' } + it { should contain '2' } + end + end + end # symlink + + context 'directory' do + context 'should not succeed' do + before(:all) do + shell('mkdir -p /tmp/concat/file') + end + after(:all) do + shell('rm -rf /tmp/concat /var/lib/puppet/concat') + end + + pp = <<-EOS + concat { '/tmp/concat/file': } + + concat::fragment { '1': + target => '/tmp/concat/file', + content => '1', + } + + concat::fragment { '2': + target => '/tmp/concat/file', + content => '2', + } + EOS + + it 'applies the manifest twice with stderr for changing to file' do + expect(apply_manifest(pp, :expect_failures => true).stderr).to match(/change from directory to file failed/) + expect(apply_manifest(pp, :expect_failures => true).stderr).to match(/change from directory to file failed/) + end + + describe file('/tmp/concat/file') do + it { should be_directory } + end + end + + # XXX concat's force param currently enables the creation of empty files + # when there are no fragments, and the replace param will only replace + # files and symlinks, not directories. The semantics either need to be + # changed, extended, or a new param introduced to control directory + # replacement. + context 'should succeed', :pending => 'not yet implemented' do + before(:all) do + shell('mkdir -p /tmp/concat/file') + end + after(:all) do + shell('rm -rf /tmp/concat /var/lib/puppet/concat') + end + + pp = <<-EOS + concat { '/tmp/concat/file': + force => true, + } + + concat::fragment { '1': + target => '/tmp/concat/file', + content => '1', + } + + concat::fragment { '2': + target => '/tmp/concat/file', + content => '2', + } + EOS + + it 'applies the manifest twice with no stderr' do + expect(apply_manifest(pp, :catch_failures => true).stderr).to eq("") + expect(apply_manifest(pp, :catch_changes => true).stderr).to eq("") + end + + describe file('/tmp/concat/file') do + it { should be_file } + it { should contain '1' } + end + end + end # directory +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/concat/spec/acceptance/symbolic_name_spec.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/concat/spec/acceptance/symbolic_name_spec.rb new file mode 100644 index 00000000000..7267f5e6b43 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/concat/spec/acceptance/symbolic_name_spec.rb @@ -0,0 +1,32 @@ +require 'spec_helper_acceptance' + +describe 'symbolic name' do + pp = <<-EOS + concat { 'not_abs_path': + path => '/tmp/concat/file', + } + + concat::fragment { '1': + target => 'not_abs_path', + content => '1', + order => '01', + } + + concat::fragment { '2': + target => 'not_abs_path', + content => '2', + order => '02', + } + EOS + + it 'applies the manifest twice with no stderr' do + expect(apply_manifest(pp, :catch_failures => true).stderr).to eq("") + expect(apply_manifest(pp, :catch_changes => true).stderr).to eq("") + end + + describe file('/tmp/concat/file') do + it { should be_file } + it { should contain '1' } + it { should contain '2' } + end +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/concat/spec/acceptance/warn_spec.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/concat/spec/acceptance/warn_spec.rb new file mode 100644 index 00000000000..cb0b7430dc8 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/concat/spec/acceptance/warn_spec.rb @@ -0,0 +1,97 @@ +require 'spec_helper_acceptance' + +describe 'concat warn =>' do + context 'true should enable default warning message' do + pp = <<-EOS + concat { '/tmp/concat/file': + warn => true, + } + + concat::fragment { '1': + target => '/tmp/concat/file', + content => '1', + order => '01', + } + + concat::fragment { '2': + target => '/tmp/concat/file', + content => '2', + order => '02', + } + EOS + + it 'applies the manifest twice with no stderr' do + expect(apply_manifest(pp, :catch_failures => true).stderr).to eq("") + expect(apply_manifest(pp, :catch_changes => true).stderr).to eq("") + end + + describe file('/tmp/concat/file') do + it { should be_file } + it { should contain '# This file is managed by Puppet. DO NOT EDIT.' } + it { should contain '1' } + it { should contain '2' } + end + end + context 'false should not enable default warning message' do + pp = <<-EOS + concat { '/tmp/concat/file': + warn => false, + } + + concat::fragment { '1': + target => '/tmp/concat/file', + content => '1', + order => '01', + } + + concat::fragment { '2': + target => '/tmp/concat/file', + content => '2', + order => '02', + } + EOS + + it 'applies the manifest twice with no stderr' do + expect(apply_manifest(pp, :catch_failures => true).stderr).to eq("") + expect(apply_manifest(pp, :catch_changes => true).stderr).to eq("") + end + + describe file('/tmp/concat/file') do + it { should be_file } + it { should_not contain '# This file is managed by Puppet. DO NOT EDIT.' } + it { should contain '1' } + it { should contain '2' } + end + end + context '# foo should overide default warning message' do + pp = <<-EOS + concat { '/tmp/concat/file': + warn => '# foo', + } + + concat::fragment { '1': + target => '/tmp/concat/file', + content => '1', + order => '01', + } + + concat::fragment { '2': + target => '/tmp/concat/file', + content => '2', + order => '02', + } + EOS + + it 'applies the manifest twice with no stderr' do + expect(apply_manifest(pp, :catch_failures => true).stderr).to eq("") + expect(apply_manifest(pp, :catch_changes => true).stderr).to eq("") + end + + describe file('/tmp/concat/file') do + it { should be_file } + it { should contain '# foo' } + it { should contain '1' } + it { should contain '2' } + end + end +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/concat/spec/spec_helper.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/concat/spec/spec_helper.rb new file mode 100644 index 00000000000..2c6f56649ae --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/concat/spec/spec_helper.rb @@ -0,0 +1 @@ +require 'puppetlabs_spec_helper/module_spec_helper' diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/concat/spec/spec_helper_acceptance.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/concat/spec/spec_helper_acceptance.rb new file mode 100644 index 00000000000..22bd72f06a5 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/concat/spec/spec_helper_acceptance.rb @@ -0,0 +1,39 @@ +require 'beaker-rspec/spec_helper' +require 'beaker-rspec/helpers/serverspec' + +unless ENV['RS_PROVISION'] == 'no' or ENV['BEAKER_provision'] == 'no' + if hosts.first.is_pe? + install_pe + else + install_puppet + end + hosts.each do |host| + on hosts, "mkdir -p #{host['distmoduledir']}" + end +end + +RSpec.configure do |c| + # Project root + proj_root = File.expand_path(File.join(File.dirname(__FILE__), '..')) + + # Readable test descriptions + c.formatter = :documentation + + # Configure all nodes in nodeset + c.before :suite do + # Install module and dependencies + puppet_module_install(:source => proj_root, :module_name => 'concat') + hosts.each do |host| + on host, puppet('module','install','puppetlabs-stdlib'), { :acceptable_exit_codes => [0,1] } + end + end + + c.before(:all) do + shell('mkdir -p /tmp/concat') + end + c.after(:all) do + shell('rm -rf /tmp/concat /var/lib/puppet/concat') + end + + c.treat_symbols_as_metadata_keys_with_true_values = true +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/concat/spec/unit/classes/concat_setup_spec.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/concat/spec/unit/classes/concat_setup_spec.rb new file mode 100644 index 00000000000..bba455ab91d --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/concat/spec/unit/classes/concat_setup_spec.rb @@ -0,0 +1,42 @@ +require 'spec_helper' + +describe 'concat::setup', :type => :class do + + shared_examples 'setup' do |concatdir| + concatdir = '/foo' if concatdir.nil? + + let(:facts) {{ :concat_basedir => concatdir }} + + it do + should contain_file("#{concatdir}/bin/concatfragments.sh").with({ + :mode => '0755', + :source => 'puppet:///modules/concat/concatfragments.sh', + :backup => false, + }) + end + + [concatdir, "#{concatdir}/bin"].each do |file| + it do + should contain_file(file).with({ + :ensure => 'directory', + :mode => '0755', + :backup => false, + }) + end + end + end + + context 'facts' do + context 'concat_basedir =>' do + context '/foo' do + it_behaves_like 'setup', '/foo' + end + end + end # facts + + context 'deprecated as a public class' do + it 'should create a warning' do + pending('rspec-puppet support for testing warning()') + end + end +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/concat/spec/unit/defines/concat_fragment_spec.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/concat/spec/unit/defines/concat_fragment_spec.rb new file mode 100644 index 00000000000..3b5269e8d56 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/concat/spec/unit/defines/concat_fragment_spec.rb @@ -0,0 +1,267 @@ +require 'spec_helper' + +describe 'concat::fragment', :type => :define do + + shared_examples 'fragment' do |title, params| + params = {} if params.nil? + + p = { + :content => nil, + :source => nil, + :order => 10, + :ensure => 'present', + }.merge(params) + + safe_name = title.gsub(/[\/\n]/, '_') + safe_target_name = p[:target].gsub(/[\/\n]/, '_') + concatdir = '/var/lib/puppet/concat' + fragdir = "#{concatdir}/#{safe_target_name}" + id = 'root' + if p[:ensure] == 'absent' + safe_ensure = p[:ensure] + else + safe_ensure = 'file' + end + + let(:title) { title } + let(:facts) {{ :concat_basedir => concatdir, :id => id }} + let(:params) { params } + let(:pre_condition) do + "concat{ '#{p[:target]}': }" + end + + it do + should contain_class('concat::setup') + should contain_concat(p[:target]) + should contain_file("#{fragdir}/fragments/#{p[:order]}_#{safe_name}").with({ + :ensure => safe_ensure, + :owner => id, + :mode => '0640', + :source => p[:source], + :content => p[:content], + :alias => "concat_fragment_#{title}", + :backup => false, + }) + end + end + + context 'title' do + ['0', '1', 'a', 'z'].each do |title| + it_behaves_like 'fragment', title, { + :target => '/etc/motd', + } + end + end # title + + context 'target =>' do + ['./etc/motd', 'etc/motd', 'motd_header'].each do |target| + context target do + it_behaves_like 'fragment', target, { + :target => '/etc/motd', + } + end + end + + context 'false' do + let(:title) { 'motd_header' } + let(:facts) {{ :concat_basedir => '/tmp' }} + let(:params) {{ :target => false }} + + it 'should fail' do + expect { should }.to raise_error(Puppet::Error, /is not a string/) + end + end + end # target => + + context 'ensure =>' do + ['present', 'absent'].each do |ens| + context ens do + it_behaves_like 'fragment', 'motd_header', { + :ensure => ens, + :target => '/etc/motd', + } + end + end + + context 'any value other than \'present\' or \'absent\'' do + let(:title) { 'motd_header' } + let(:facts) {{ :concat_basedir => '/tmp' }} + let(:params) {{ :ensure => 'invalid', :target => '/etc/motd' }} + + it 'should create a warning' do + pending('rspec-puppet support for testing warning()') + end + end + end # ensure => + + context 'content =>' do + ['', 'ashp is our hero'].each do |content| + context content do + it_behaves_like 'fragment', 'motd_header', { + :content => content, + :target => '/etc/motd', + } + end + end + + context 'false' do + let(:title) { 'motd_header' } + let(:facts) {{ :concat_basedir => '/tmp' }} + let(:params) {{ :content => false, :target => '/etc/motd' }} + + it 'should fail' do + expect { should }.to raise_error(Puppet::Error, /is not a string/) + end + end + end # content => + + context 'source =>' do + ['', '/foo/bar', ['/foo/bar', '/foo/baz']].each do |source| + context source do + it_behaves_like 'fragment', 'motd_header', { + :source => source, + :target => '/etc/motd', + } + end + end + + context 'false' do + let(:title) { 'motd_header' } + let(:facts) {{ :concat_basedir => '/tmp' }} + let(:params) {{ :source => false, :target => '/etc/motd' }} + + it 'should fail' do + expect { should }.to raise_error(Puppet::Error, /is not a string or an Array/) + end + end + end # source => + + context 'order =>' do + ['', '42', 'a', 'z'].each do |order| + context '\'\'' do + it_behaves_like 'fragment', 'motd_header', { + :order => order, + :target => '/etc/motd', + } + end + end + + context 'false' do + let(:title) { 'motd_header' } + let(:facts) {{ :concat_basedir => '/tmp' }} + let(:params) {{ :order => false, :target => '/etc/motd' }} + + it 'should fail' do + expect { should }.to raise_error(Puppet::Error, /is not a string/) + end + end + end # order => + + context 'more than one content source' do + error_msg = 'You cannot specify more than one of $content, $source, $ensure => /target' + + context 'ensure => target and source' do + let(:title) { 'motd_header' } + let(:facts) {{ :concat_basedir => '/tmp' }} + let(:params) do + { + :target => '/etc/motd', + :ensure => '/foo', + :source => '/bar', + } + end + + it 'should fail' do + expect { should }.to raise_error(Puppet::Error, /#{Regexp.escape(error_msg)}/m) + end + end + + context 'ensure => target and content' do + let(:title) { 'motd_header' } + let(:facts) {{ :concat_basedir => '/tmp' }} + let(:params) do + { + :target => '/etc/motd', + :ensure => '/foo', + :content => 'bar', + } + end + + it 'should fail' do + expect { should }.to raise_error(Puppet::Error, /#{Regexp.escape(error_msg)}/m) + end + end + + context 'source and content' do + let(:title) { 'motd_header' } + let(:facts) {{ :concat_basedir => '/tmp' }} + let(:params) do + { + :target => '/etc/motd', + :source => '/foo', + :content => 'bar', + } + end + + it 'should fail' do + expect { should }.to raise_error(Puppet::Error, /#{Regexp.escape(error_msg)}/m) + end + end + + end # more than one content source + + describe 'deprecated parameter' do + context 'mode =>' do + context '1755' do + it_behaves_like 'fragment', 'motd_header', { + :mode => '1755', + :target => '/etc/motd', + } + + it 'should create a warning' do + pending('rspec-puppet support for testing warning()') + end + end + end # mode => + + context 'owner =>' do + context 'apenny' do + it_behaves_like 'fragment', 'motd_header', { + :owner => 'apenny', + :target => '/etc/motd', + } + + it 'should create a warning' do + pending('rspec-puppet support for testing warning()') + end + end + end # owner => + + context 'group =>' do + context 'apenny' do + it_behaves_like 'fragment', 'motd_header', { + :group => 'apenny', + :target => '/etc/motd', + } + + it 'should create a warning' do + pending('rspec-puppet support for testing warning()') + end + end + end # group => + + context 'backup =>' do + context 'foo' do + it_behaves_like 'fragment', 'motd_header', { + :backup => 'foo', + :target => '/etc/motd', + } + + it 'should create a warning' do + pending('rspec-puppet support for testing warning()') + end + end + end # backup => + end # deprecated params + +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/concat/spec/unit/defines/concat_spec.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/concat/spec/unit/defines/concat_spec.rb new file mode 100644 index 00000000000..9fdd7b26f12 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/concat/spec/unit/defines/concat_spec.rb @@ -0,0 +1,380 @@ +require 'spec_helper' + +describe 'concat', :type => :define do + + shared_examples 'concat' do |title, params, id| + params = {} if params.nil? + id = 'root' if id.nil? + + # default param values + p = { + :ensure => 'present', + :path => title, + :owner => nil, + :group => nil, + :mode => '0644', + :warn => false, + :force => false, + :backup => 'puppet', + :replace => true, + :order => 'alpha', + :ensure_newline => false, + }.merge(params) + + safe_name = title.gsub('/', '_') + concatdir = '/var/lib/puppet/concat' + fragdir = "#{concatdir}/#{safe_name}" + concat_name = 'fragments.concat.out' + default_warn_message = '# This file is managed by Puppet. DO NOT EDIT.' + + file_defaults = { + :backup => false, + } + + let(:title) { title } + let(:params) { params } + let(:facts) {{ :concat_basedir => concatdir, :id => id }} + + if p[:ensure] == 'present' + it do + should contain_file(fragdir).with(file_defaults.merge({ + :ensure => 'directory', + :mode => '0750', + })) + end + + it do + should contain_file("#{fragdir}/fragments").with(file_defaults.merge({ + :ensure => 'directory', + :mode => '0750', + :force => true, + :ignore => ['.svn', '.git', '.gitignore'], + :purge => true, + :recurse => true, + })) + end + + [ + "#{fragdir}/fragments.concat", + "#{fragdir}/#{concat_name}", + ].each do |file| + it do + should contain_file(file).with(file_defaults.merge({ + :ensure => 'present', + :mode => '0640', + })) + end + end + + it do + should contain_file(title).with(file_defaults.merge({ + :ensure => 'present', + :owner => p[:owner], + :group => p[:group], + :mode => p[:mode], + :replace => p[:replace], + :path => p[:path], + :alias => "concat_#{title}", + :source => "#{fragdir}/#{concat_name}", + :backup => p[:backup], + })) + end + + cmd = "#{concatdir}/bin/concatfragments.sh " + + "-o \"#{concatdir}/#{safe_name}/fragments.concat.out\" " + + "-d \"#{concatdir}/#{safe_name}\"" + + # flag order: fragdir, warnflag, forceflag, orderflag, newlineflag + if p.has_key?(:warn) + case p[:warn] + when TrueClass + message = default_warn_message + when 'true', 'yes', 'on' + # should generate a stringified boolean warning + message = default_warn_message + when FalseClass + message = nil + when 'false', 'no', 'off' + # should generate a stringified boolean warning + message = nil + else + message = p[:warn] + end + + unless message.nil? + cmd += " -w \'#{message}\'" + end + end + + cmd += " -f" if p[:force] + cmd += " -n" if p[:order] == 'numeric' + cmd += " -l" if p[:ensure_newline] == true + + it do + should contain_exec("concat_#{title}").with({ + :alias => "concat_#{fragdir}", + :command => cmd, + :unless => "#{cmd} -t", + }) + end + else + [ + fragdir, + "#{fragdir}/fragments", + "#{fragdir}/fragments.concat", + "#{fragdir}/#{concat_name}", + ].each do |file| + it do + should contain_file(file).with(file_defaults.merge({ + :ensure => 'absent', + :backup => false, + :force => true, + })) + end + end + + it do + should contain_file(title).with(file_defaults.merge({ + :ensure => 'absent', + :backup => p[:backup], + })) + end + + it do + should contain_exec("concat_#{title}").with({ + :alias => "concat_#{fragdir}", + :command => 'true', + :path => '/bin:/usr/bin', + }) + end + end + end + + context 'title' do + context 'without path param' do + # title/name is the default value for the path param. therefore, the + # title must be an absolute path unless path is specified + ['/foo', '/foo/bar', '/foo/bar/baz'].each do |title| + context title do + it_behaves_like 'concat', '/etc/foo.bar' + end + end + + ['./foo', 'foo', 'foo/bar'].each do |title| + context title do + let(:title) { title } + it 'should fail' do + expect { should }.to raise_error(Puppet::Error, /is not an absolute path/) + end + end + end + end + + context 'with path param' do + ['./foo', 'foo', 'foo/bar'].each do |title| + context title do + it_behaves_like 'concat', title, { :path => '/etc/foo.bar' } + end + end + end + end # title => + + context 'as non-root user' do + it_behaves_like 'concat', '/etc/foo.bar', {}, 'bob' + end + + context 'ensure =>' do + ['present', 'absent'].each do |ens| + context ens do + it_behaves_like 'concat', '/etc/foo.bar', { :ensure => ens } + end + end + + context 'invalid' do + let(:title) { '/etc/foo.bar' } + let(:params) {{ :ensure => 'invalid' }} + it 'should fail' do + expect { should }.to raise_error(Puppet::Error, /#{Regexp.escape('does not match "^present$|^absent$"')}/) + end + end + end # ensure => + + context 'path =>' do + context '/foo' do + it_behaves_like 'concat', '/etc/foo.bar', { :path => '/foo' } + end + + ['./foo', 'foo', 'foo/bar', false].each do |path| + context path do + let(:title) { '/etc/foo.bar' } + let(:params) {{ :path => path }} + it 'should fail' do + expect { should }.to raise_error(Puppet::Error, /is not an absolute path/) + end + end + end + end # path => + + context 'owner =>' do + context 'apenney' do + it_behaves_like 'concat', '/etc/foo.bar', { :owner => 'apenny' } + end + + context 'false' do + let(:title) { '/etc/foo.bar' } + let(:params) {{ :owner => false }} + it 'should fail' do + expect { should }.to raise_error(Puppet::Error, /is not a string/) + end + end + end # owner => + + context 'group =>' do + context 'apenney' do + it_behaves_like 'concat', '/etc/foo.bar', { :group => 'apenny' } + end + + context 'false' do + let(:title) { '/etc/foo.bar' } + let(:params) {{ :group => false }} + it 'should fail' do + expect { should }.to raise_error(Puppet::Error, /is not a string/) + end + end + end # group => + + context 'mode =>' do + context '1755' do + it_behaves_like 'concat', '/etc/foo.bar', { :mode => '1755' } + end + + context 'false' do + let(:title) { '/etc/foo.bar' } + let(:params) {{ :mode => false }} + it 'should fail' do + expect { should }.to raise_error(Puppet::Error, /is not a string/) + end + end + end # mode => + + context 'warn =>' do + [true, false, '# foo'].each do |warn| + context warn do + it_behaves_like 'concat', '/etc/foo.bar', { :warn => warn } + end + end + + context '(stringified boolean)' do + ['true', 'yes', 'on', 'false', 'no', 'off'].each do |warn| + context warn do + it_behaves_like 'concat', '/etc/foo.bar', { :warn => warn } + + it 'should create a warning' do + pending('rspec-puppet support for testing warning()') + end + end + end + end + + context '123' do + let(:title) { '/etc/foo.bar' } + let(:params) {{ :warn => 123 }} + it 'should fail' do + expect { should }.to raise_error(Puppet::Error, /is not a string or boolean/) + end + end + end # warn => + + context 'force =>' do + [true, false].each do |force| + context force do + it_behaves_like 'concat', '/etc/foo.bar', { :force => force } + end + end + + context '123' do + let(:title) { '/etc/foo.bar' } + let(:params) {{ :force => 123 }} + it 'should fail' do + expect { should }.to raise_error(Puppet::Error, /is not a boolean/) + end + end + end # force => + + context 'backup =>' do + context 'reverse' do + it_behaves_like 'concat', '/etc/foo.bar', { :backup => 'reverse' } + end + + context 'false' do + let(:title) { '/etc/foo.bar' } + let(:params) {{ :backup => false }} + it 'should fail' do + expect { should }.to raise_error(Puppet::Error, /is not a string/) + end + end + end # backup => + + context 'replace =>' do + [true, false].each do |replace| + context replace do + it_behaves_like 'concat', '/etc/foo.bar', { :replace => replace } + end + end + + context '123' do + let(:title) { '/etc/foo.bar' } + let(:params) {{ :replace => 123 }} + it 'should fail' do + expect { should }.to raise_error(Puppet::Error, /is not a boolean/) + end + end + end # replace => + + context 'order =>' do + ['alpha', 'numeric'].each do |order| + context order do + it_behaves_like 'concat', '/etc/foo.bar', { :order => order } + end + end + + context 'invalid' do + let(:title) { '/etc/foo.bar' } + let(:params) {{ :order => 'invalid' }} + it 'should fail' do + expect { should }.to raise_error(Puppet::Error, /#{Regexp.escape('does not match "^alpha$|^numeric$"')}/) + end + end + end # order => + + context 'ensure_newline =>' do + [true, false].each do |ensure_newline| + context 'true' do + it_behaves_like 'concat', '/etc/foo.bar', { :ensure_newline => ensure_newline} + end + end + + context '123' do + let(:title) { '/etc/foo.bar' } + let(:params) {{ :ensure_newline => 123 }} + it 'should fail' do + expect { should }.to raise_error(Puppet::Error, /is not a boolean/) + end + end + end # ensure_newline => + + describe 'deprecated parameter' do + context 'gnu =>' do + context 'foo' do + it_behaves_like 'concat', '/etc/foo.bar', { :gnu => 'foo'} + + it 'should create a warning' do + pending('rspec-puppet support for testing warning()') + end + end + end + end + +end + +# vim:sw=2:ts=2:expandtab:textwidth=79 diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/concat/spec/unit/facts/concat_basedir_spec.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/concat/spec/unit/facts/concat_basedir_spec.rb new file mode 100644 index 00000000000..41bc90f1594 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/concat/spec/unit/facts/concat_basedir_spec.rb @@ -0,0 +1,18 @@ +require 'spec_helper' + +describe 'concat_basedir', :type => :fact do + before(:each) { Facter.clear } + + context 'Puppet[:vardir] ==' do + it '/var/lib/puppet' do + Puppet.stubs(:[]).with(:vardir).returns('/var/lib/puppet') + Facter.fact(:concat_basedir).value.should == '/var/lib/puppet/concat' + end + + it '/home/apenny/.puppet/var' do + Puppet.stubs(:[]).with(:vardir).returns('/home/apenny/.puppet/var') + Facter.fact(:concat_basedir).value.should == '/home/apenny/.puppet/var/concat' + end + end + +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/concat/tests/fragment.pp b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/concat/tests/fragment.pp new file mode 100644 index 00000000000..a2dfaca2905 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/concat/tests/fragment.pp @@ -0,0 +1,19 @@ +concat { 'testconcat': + ensure => present, + path => '/tmp/concat', + owner => 'root', + group => 'root', + mode => '0664', +} + +concat::fragment { '1': + target => 'testconcat', + content => '1', + order => '01', +} + +concat::fragment { '2': + target => 'testconcat', + content => '2', + order => '02', +} diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/concat/tests/init.pp b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/concat/tests/init.pp new file mode 100644 index 00000000000..fd21427180f --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/concat/tests/init.pp @@ -0,0 +1,7 @@ +concat { '/tmp/concat': + ensure => present, + force => true, + owner => 'root', + group => 'root', + mode => '0644', +} diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/drush/Puppetfile b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/drush/Puppetfile new file mode 100644 index 00000000000..42968dff1bf --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/drush/Puppetfile @@ -0,0 +1,6 @@ +forge "http://forge.puppetlabs.com" + +mod 'php', :git => 'https://github.com/puphpet/puppet-php.git' +mod 'composer', :git => 'https://github.com/puphpet/puppet-composer.git' +mod 'puphpet', :git => 'https://github.com/puphpet/puppet-puphpet.git' +mod 'puppi', :git => 'https://github.com/puphpet/puppi.git' diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/drush/README b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/drush/README new file mode 100644 index 00000000000..d546e570ab3 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/drush/README @@ -0,0 +1,226 @@ +DRUSH PUPPET MODULE +=================== + +This module manages Drush, a command line shell and scripting interface for +Drupal. + +It can install and upgrade Drush from Debian packages or source, as well as +download, enable and disable Drupal modules and themes, build codebases from +Drush makefiles, run arbitrary Drush commands and optionally log its output. + + +DEPENDENCIES +------------ + +None. + + +REQUIREMENTS +------------ + +The Drush Puppet module is designed to work on Debian GNU/Linux systems and +derivatives. It provides rudimentary support for apt-get, but defaults to +letting the OS's default packaging system handle installation. As such, it +should work with other *nix systems, assuming Drush is available for install +in the OS's packaging system, or Drush is installed from source using the +provided 'drush::git' class. + + +INSTALLATION +------------ + +To use this module, follow these directions: + +1. Your modules directory will need all the files included in this + repository placed under a directory called "drush". + +2. To install Drush, add one of these entries to your manifests (such as in + manifests/nodes.pp): + + include drush + + or + + class {'drush': + ensure => latest, + } + + The following parameters are available: + + api: The major version of Drush to install. Currently supports '4' or '5'. + dist: The Debian distribution from which to install via apt-get. Defaults + to 'stable'. Set to false to suppres adding custom sources for install + via apt-get. + ensure: What state the package should be in. Valid values are 'present' + (also called 'installed'), 'absent', 'purged', 'held', of 'latest'. + +2a. To install Drush from source, add one of these entries to your manifests: + + include drush::git::drush + + or + + class {'drush::git::drush': + git_branch => '8.x-6.x', + update => true, + } + + + The following parameters are available: + + git_branch: The git branch to track. + git_tag: The git tag to check out. + git_url: The git URL from which to clone the repository. + update: Whether to update to the latest code with each Puppet run. + Defaults to false. + + +USAGE +----- + +1. To run a Drush command, use the drush::run defined type like so: + + drush::run { '@dev uli --uid=42': } + + The following parameters are all optional: + + command: The command to run. Defaults to the name of the resource. + site_alias: The alias against which to run the command. + options: Options to pass to Drush. + arguments: Arguments to pass to the command. + site_path: The path to the site or code-base in which to run the command. + drush_user: The user under which to execute the command. + drush_home: Set the drush_user's home directory, for alias search paths. + log: Path to the logfile in which to log all Drush output. + creates, unless, onlyif, refreshonly: Control whether the command is + executed at each Puppet run. Identical to these paramaters on the + built-in 'exec' resource. + timeout: The maximum time the command should take, specified in seconds. + Defaults to 300 seconds. Disable the timeout by setting to 0. + paths: provide alternative paths to search for your Drush executable. + +2. To download projects from drupal.org to a site, add lines such as the + following to your manifests: + + drush::dl {'token': + site_path => '/var/aegir/platforms/drupal/sites/example.com', + log => '/var/aegir/drush.log', + } + + The following parameters are all optional: + + type: The type of package to download. Defaults to 'module'. + version: The version of the package to download. + site_path: Operates the same as for drush::run. Set this parameter to avoid + having a package downloaded repeatedly, as it will allow Puppet to see + whether it already exists. Alternatively, do not set this parameter to + have the package continuously updated. + site_alias, options, arguments, drush_user, drush_home, log: All operate + the same as for drush::run. + +3. To enable or disable projects on a Drupal site, add lines such as the following to your + manifests: + + drush::en {'token': + site_alias => '@www.example.com', + } + + drush::dis {'@prod devel, devel-generate':} + + The following parameters are all optional: + + site_alias, options, arguments, site_path, drush_user, drush_home, log: All + operate the same as for drush::run. + +4. To display the status of a site in your Puppet log, add lines such as the + following to your manifests: + + drush::dis {'@prod status': + options => '--full', + } + + The following parameters are all optional: + + site_alias, options, arguments, site_path, drush_user, drush_home, log: All + operate the same as for drush::run. + + +5. To build a Drupal code-base using Drush Make, add lines such as the following to your + manifests: + + drush::make {'/var/aegir/platform/Drupal7': + makefile => '/var/aegir/makefiles/drupal7.make', + } + + There is one required parameter: + + makefile: The path to the makefile to use in building the code-base. + + The following parameters are all optional: + + make_path: The path to build the code-base. Defaults to the name of the + resource. + options, drush_user, drush_home, log: All operate the same as for + drush::run. + + +6. The module also provides a simple way to clone git repos and keep them up- + to-date: + + drush::git { 'git://git.drupal.org:project/provision': + path => '/var/aegir/.drush', + } + + There is one required parameter: + + path: Where to clone the git repo. + + The following parameters are all optional: + + git_branch: The git branch to checkout. + git_tag: The git tag to check out. Overrides 'branch' if also specified. + git_repo: The git repository to clone. Defaults to the resource name. + dir_name: The name of the directory in which to clone the git repo. + update: Run 'git pull -r' in this repo on every Puppet run. + paths: Alternative search paths for your git binary. + + +DEVELOPING +---------- + +The drush::run defined type provides a basis on which to build pretty much any +Drush command imagineable. The other provided commands build upon it to provide +convenience resources for common use-cases. While quite simple, they should +form a good basis for creating your own custom defined types. + +For more complex examples, take a look at the puppet-aegir module, which +extends this API further in the context of the Aegir Hosting System. It can be +found at: + + https://drupal.org/project/puppet-aegir + +Along similar lines, Skynet takes this way too far: + + https://drupal.org/project/skynet + +The drush::git resource is a minimalist general-purpose function to allow +cloning and updating git repositories. It is not intended to be a full-featured +git class/resource. It will not attempt to install git for you either, but this +should be sufficient: + + package {'git':} + +This Puppet module is published under the GNU GPLv2 (General Public License, +Version 2), and as such is, and will always remain, Free Software. Engagement +in the development process by users and other developers is very much appreci- +ated. So, please feel free to post to the issue queue, submit bug reports and +feature requests, and ask questions about how to use or extend it. + + +------------------------------------------------------------------------------- +Current maintainers: Christopher Gervais (mailto:chris@praxis.coop) + Guillaume Boudrias (mailto:gboudrias@praxis.coop) +Original authors: Christopher Gervais (mailto:chris@koumbit.org) + Antoine Beaupré (mailto:anarcat@koumbit.org) +Copyright:: Copyright (c) 2011-2013 Réseau Koumbit Networks +License:: GPLv2 or later diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/drush/manifests/apt.pp b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/drush/manifests/apt.pp new file mode 100644 index 00000000000..8d7ff585614 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/drush/manifests/apt.pp @@ -0,0 +1,49 @@ +class drush::apt ( $dist = false, $backports = false) { + + if $backports { + file { "/etc/apt/preferences.d/drush-${backports}.pref": + ensure => 'present', + content => "Package: drush\nPin: release a=${backports}-backports\nPin-Priority: 1001\n", + owner => root, group => root, mode => '0644', + notify => Exec['drush_update_apt'], + } + file { "/etc/apt/sources.list.d/drush-${backports}-backports.list" : + ensure => 'present', + content => "deb http://backports.debian.org/debian-backports ${backports}-backports main", + owner => root, group => root, mode => '0644', + notify => Exec['drush_update_apt'], + } + } + else { + file { [ + "/etc/apt/preferences.d/drush-${backports}.pref", + "/etc/apt/sources.list.d/drush-${backports}-backports.list", + ]: + ensure => 'absent', + notify => Exec['drush_update_apt'], + } + } + + if $dist { + file { "/etc/apt/sources.list.d/drush-${dist}.list" : + ensure => 'present', + content => "deb http://ftp.debian.org/debian ${dist} main", + owner => root, group => root, mode => '0644', + notify => Exec['drush_update_apt'], + before => Exec['drush_apt_update'], + } + } + + exec { 'drush_update_apt': + command => 'apt-get update & sleep 1', + path => [ '/bin/', '/sbin/' , '/usr/bin/', '/usr/sbin/' ], + refreshonly => true, + } + + exec { 'drush_apt_update': + command => 'apt-get update && /usr/bin/apt-get autoclean', + path => [ '/bin/', '/sbin/' , '/usr/bin/', '/usr/sbin/' ], + schedule => daily, + } + +} diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/drush/manifests/dis.pp b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/drush/manifests/dis.pp new file mode 100644 index 00000000000..9cbf1bcaabc --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/drush/manifests/dis.pp @@ -0,0 +1,25 @@ +define drush::dis ( + $site_alias = $drush::params::site_alias, + $options = $drush::params::options, + $arguments = $drush::params::arguments, + $site_path = $drush::params::site_path, + $drush_user = $drush::params::drush_user, + $drush_home = $drush::params::drush_home, + $log = $drush::params::log + ) { + + if $arguments { $real_args = $arguments } + else { $real_args = $name } + + drush::run {"drush-dis:${name}": + command => 'pm-disable', + site_alias => $site_alias, + options => $options, + arguments => $real_args, + site_path => $site_path, + drush_user => $drush_user, + drush_home => $drush_home, + log => $log, + } + +} diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/drush/manifests/dl.pp b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/drush/manifests/dl.pp new file mode 100644 index 00000000000..89a9a290599 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/drush/manifests/dl.pp @@ -0,0 +1,48 @@ +define drush::dl ( + $type = 'module', + $site_alias = $drush::params::site_alias, + $options = $drush::params::options, + $arguments = $drush::params::arguments, + $drush_user = $drush::params::drush_user, + $drush_home = $drush::params::drush_home, + $log = $drush::params::log + ) { + + if $arguments { $real_args = $arguments } + else { $real_args = "${name}" } + + # Always download drush extensions without a site alias. + if $type == 'extension' { $real_alias = '@none' } + else { $real_alias = "${site_alias}" } + + drush::run {"drush-dl:${name}": + command => 'pm-download', + site_alias => $real_alias, + options => $options, + arguments => $real_args, + drush_user => $drush_user, + drush_home => $drush_home, + log => $log, + } + + # Add an 'unless' argument depending on the project type. + case $type { + 'module', 'theme': { + Drush::Run["drush-dl:${name}"] { + unless => "drush ${site_alias} pm-list | grep ${name}", + } + } + 'extension': { + Drush::Run["drush-dl:${name}"] { + unless => "[ -d '${drush_home}/.drush/${name}' ]", + } + } + } + + if defined(Drush::Run["drush-en:${name}"]) { + Drush::Run["drush-dl:${name}"] { + before +> Exec["drush-en:${name}"], + } + } +} + diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/drush/manifests/en.pp b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/drush/manifests/en.pp new file mode 100644 index 00000000000..036074968f5 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/drush/manifests/en.pp @@ -0,0 +1,26 @@ +define drush::en ( + $site_alias = $drush::params::site_alias, + $options = $drush::params::options, + $arguments = $drush::params::arguments, + $drush_user = $drush::params::drush_user, + $drush_home = $drush::params::drush_home, + $log = $drush::params::log, + $refreshonly = false + ) { + + if $arguments { $real_args = $arguments } + else { $real_args = $name } + + drush::run {"drush-en:${name}": + command => 'pm-enable', + site_alias => $site_alias, + options => $options, + arguments => $real_args, + drush_user => $drush_user, + drush_home => $drush_home, + refreshonly => $refreshonly, + log => $log, + unless => "drush ${site_alias} pm-list --status=enabled | grep ${name}", + } + +} diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/drush/manifests/git.pp b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/drush/manifests/git.pp new file mode 100644 index 00000000000..dc0598121bb --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/drush/manifests/git.pp @@ -0,0 +1,60 @@ +define drush::git ( + $path, + $git_branch = '', + $git_tag = '', + $git_repo = false, + $dir_name = false, + $update = false, + $paths = $drush::params::paths, + $user = 'root', + ) { + + # Default to the resource name if no explicit git repo is provided. + if $git_repo { $real_git_repo = $git_repo } + else { $real_git_repo = $name } + + # Figure out the path and directory name. + if $dir_name { + $real_path = "${path}/${dir_name}" + $real_dir = $dir_name + } + else { + # Figure out the name of the cloned into directory from the git repo. + $repo_array = split($real_git_repo, '[/]') + $last_element = $repo_array[-1] + $real_dir = regsubst($last_element, '\.git$', '') + $real_path = "${path}/${real_dir}" + } + + exec {"drush-clone-repo:${name}": + command => "git clone ${real_git_repo} ${real_dir}", + creates => $real_path, + cwd => $path, + user => $user, + path => $paths, + timeout => 0, + } + + # The specific (tag) overrides the general (branch). + if $git_tag { $git_ref = $git_tag } + else { $git_ref = $git_branch } + + if $git_ref { + exec {"drush-checkout-ref:${name}": + command => "git checkout ${git_ref}", + cwd => $real_path, + path => $paths, + require => Exec["drush-clone-repo:${name}"], + } + } + + if $update { + exec {"drush-update-repo:${name}": + command => 'git pull -r', + cwd => $real_path, + path => $paths, + require => Exec["drush-clone-repo:${name}"], + } + } + +} diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/drush/manifests/git/drush.pp b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/drush/manifests/git/drush.pp new file mode 100644 index 00000000000..36680c63f4c --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/drush/manifests/git/drush.pp @@ -0,0 +1,61 @@ +class drush::git::drush ( + $git_branch = '', + $git_tag = '', + $git_repo = 'https://github.com/drush-ops/drush.git', + $update = false + ) inherits drush::params { + + include php::params + + Exec { path => ['/bin', '/usr/bin', '/usr/local/bin', '/usr/share'], } + + if ! defined(Package['git']) { + package { 'git': + ensure => present, + before => Drush::Git[$git_repo] + } + } + + if ! defined(Class['composer']) { + class { 'composer': + target_dir => '/usr/local/bin', + composer_file => 'composer', + download_method => 'curl', + logoutput => false, + tmp_path => '/tmp', + php_package => "${php::params::module_prefix}cli", + curl_package => 'curl', + suhosin_enabled => false, + } + } + + drush::git { $git_repo : + path => '/usr/share', + git_branch => $git_branch, + git_tag => $git_tag, + update => $update, + } + + composer::exec { 'drush': + cmd => 'install', + cwd => '/usr/share/drush', + require => Drush::Git[$git_repo], + notify => File['symlink drush'], + } + + file { 'symlink drush': + ensure => link, + path => '/usr/bin/drush', + target => '/usr/share/drush/drush', + require => Composer::Exec['drush'], + notify => Exec['first drush run'], + } + + # Needed to download a Pear library + exec { 'first drush run': + command => 'drush cache-clear drush', + refreshonly => true, + require => File['symlink drush'], + } + +} diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/drush/manifests/init.pp b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/drush/manifests/init.pp new file mode 100644 index 00000000000..53325d537a6 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/drush/manifests/init.pp @@ -0,0 +1,33 @@ +class drush ( + $api = $drush::params::api, + $dist = $drush::params::dist, + $ensure = $drush::params::ensure + ) inherits drush::params { + + include drush::params + + package { 'drush': + ensure => $ensure, + } + + case $operatingsystem { + /^(Debian|Ubuntu)$/: { + include drush::apt + Package['drush'] { require => Exec['drush_update_apt'] } + } + } + + if $dist { + + Package['drush'] { require => Class['drush::apt'] } + + if $api == 4 { $backports = 'squeeze' } + else { $backports = '' } + + class {'drush::apt': + dist => $dist, + backports => $backports, + } + } +} + diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/drush/manifests/make.pp b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/drush/manifests/make.pp new file mode 100644 index 00000000000..e09efdfbb57 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/drush/manifests/make.pp @@ -0,0 +1,26 @@ +define drush::make ( + $makefile, + $make_path = false, + $options = $drush::params::options, + $site_path = $drush::params::site_path, + $drush_user = $drush::params::drush_user, + $drush_home = $drush::params::drush_home, + $log = $drush::params::log + ) { + + if $make_path { $real_make_path = $make_path } + else { $real_make_path = $name } + $arguments = "${makefile} ${real_make_path}" + + drush::run {"drush-make:${name}": + command => 'make', + creates => $make_path, + options => $options, + arguments => $arguments, + drush_user => $drush_user, + drush_home => $drush_home, + log => $log, + timeout => 0, + } + +} diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/drush/manifests/params.pp b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/drush/manifests/params.pp new file mode 100644 index 00000000000..1af2e4ae7cb --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/drush/manifests/params.pp @@ -0,0 +1,35 @@ +class drush::params { + + case $::operatingsystem { + 'centos', 'redhat': { + $php_cli_package = 'php-cli' + } + 'ubuntu', 'debian': { + $php_cli_package = 'php5-cli' + } + default: { + fail('The puppet-drush module only supports RHEL and Debian systems') + } + } + + $drush_user = 'root' + $drush_home = '/root' + $site_alias = '@none' + $options = '' + $arguments = '' + $api = 5 + $dist = false + $ensure = 'present' + $site_path = false + $log = false + $creates = false + $paths = [ '/bin/', '/sbin/' , '/usr/bin/', '/usr/sbin/' ] + + if defined(Class['drush::git::drush']) { + $installed = Class['drush::git::drush'] + } + else { + $installed = Class['drush'] + } + +} diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/drush/manifests/run.pp b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/drush/manifests/run.pp new file mode 100644 index 00000000000..2b6c1d255ed --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/drush/manifests/run.pp @@ -0,0 +1,57 @@ +define drush::run ( + $command = false, + $site_alias = $drush::params::site_alias, + $options = $drush::params::options, + $arguments = $drush::params::arguments, + $site_path = $drush::params::site_path, + $drush_user = $drush::params::drush_user, + $drush_home = $drush::params::drush_home, + $log = $drush::params::log, + $installed = $drush::params::installed, + $creates = $drush::params::creates, + $paths = $drush::params::paths, + $timeout = false, + $unless = false, + $onlyif = false, + $refreshonly = false + ) { + + if $log { $log_output = " >> ${log} 2>&1" } + + if $command { $real_command = $command } + else { $real_command = $name} + + exec {"drush-run:${name}": + command => "drush ${site_alias} --yes ${options} ${real_command} ${arguments} ${log_output}", + user => $drush_user, + group => $drush_user, + path => $paths, + environment => "HOME=${drush_home}", + require => $installed, + } + + if $site_path { + Exec["drush-run:${name}"] { cwd => $site_path } + } + + if $creates { + Exec["drush-run:${name}"] { creates => $creates } + } + + if $timeout { + Exec["drush-run:${name}"] { timeout => $timeout } + } + + if $unless { + Exec["drush-run:${name}"] { unless => $unless } + } + + if $onlyif { + Exec["drush-run:${name}"] { onlyif => $onlyif } + } + + if $refreshonly { + Exec["drush-run:${name}"] { refreshonly => $refreshonly } + } + +} diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/drush/manifests/status.pp b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/drush/manifests/status.pp new file mode 100644 index 00000000000..3f7784bd4b3 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/drush/manifests/status.pp @@ -0,0 +1,22 @@ +define drush::status ( + $site_alias = $drush::params::site_alias, + $options = $drush::params::options, + $arguments = $drush::params::arguments, + $site_path = $drush::params::site_path, + $drush_user = $drush::params::drush_user, + $drush_home = $drush::params::drush_home, + $log = $drush::params::log + ) { + + drush::run {"drush-status:${name}": + command => 'core-status', + site_alias => $site_alias, + options => $options, + arguments => $arguments, + site_path => $site_path, + drush_user => $drush_user, + drush_home => $drush_home, + log => $log, + } + +} diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/drush/tests/.ci/.module b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/drush/tests/.ci/.module new file mode 100644 index 00000000000..e430fc6c1d5 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/drush/tests/.ci/.module @@ -0,0 +1 @@ +drush diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/drush/tests/.ci/Vagrantfile b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/drush/tests/.ci/Vagrantfile new file mode 100644 index 00000000000..6bb52efe911 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/drush/tests/.ci/Vagrantfile @@ -0,0 +1,11 @@ +# -*- mode: ruby -*- +# vi: set ft=ruby : + +Vagrant::Config.run do |config| + config.vm.box = "Debian 6.0.7 x64" + config.vm.box_url = "http://puppet-vagrant-boxes.puppetlabs.com/debian-607-x64-vbox4210.box" + + config.vm.provision :shell, + :path => "./tests/.ci/vagrant_test.sh" + +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/drush/tests/.ci/test.sh b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/drush/tests/.ci/test.sh new file mode 100644 index 00000000000..55ab628039f --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/drush/tests/.ci/test.sh @@ -0,0 +1,78 @@ +#!/bin/bash + +echo "Creating test environment..." +SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" +if [ -e $SCRIPT_DIR/.module ] +then + MODULE=`cat $SCRIPT_DIR/.module` +else + echo "ERROR: The test script expects the name of the module to be in a file" + echo " called '.module', in the same directory as the test script." + echo $SCRIPT_DIR + exit 1 +fi +cd $SCRIPT_DIR +cd ../.. +if [ -e manifests/init.pp ] +then + MODULE_DIR=`pwd` +else + echo "ERROR: The test script expects to be in /tests/.ci/, but" + echo " cannot find the module's 'init.pp', from its current location." + echo $SCRIPT_DIR + exit 1 +fi +rm -rf /tmp/$MODULE +cp $MODULE_DIR /tmp/$MODULE -r +cd /tmp/$MODULE +wget http://ansi-color.googlecode.com/svn/tags/0.6/ansi-color/color >> /dev/null 2>&1 +mv ./color /usr/local/bin +chmod a+x /usr/local/bin/color + +echo "Scanning for tests in '$MODULE' module..." +FILES=`find /tmp/$MODULE/tests -name *.pp` +COUNT=${#FILES[@]} +PASSED=0 +FAILED=0 +TOTAL=0 + +echo "Running tests..." +for f in $FILES +do + NAME=`basename $f` + echo "Running '$NAME' test..." + OUTPUT=`puppet apply --noop --modulepath=/tmp/ --color=ansi $f 2>&1` + STATUS=$? + if [ $STATUS -ne 0 ] + then + color red + echo "///////////////////////////////////////////////////////" + echo + echo " ERROR in '$NAME' test." + echo " Output from failed test:" + echo + echo $OUTPUT + echo + echo "///////////////////////////////////////////////////////" + color off + let FAILED++ + let TOTAL++ + else + color green + echo "'$NAME' test passed." + color off + let PASSED++ + let TOTAL++ + fi +done + +echo "Total tests run: $TOTAL" +color green +echo "Tests passed: $PASSED" +color red +echo "Tests failed: $FAILED" +color off + +rm -rf /tmp/$MODULE +rm /usr/local/bin/color +exit $FAILED diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/drush/tests/.ci/vagrant_test.sh b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/drush/tests/.ci/vagrant_test.sh new file mode 100644 index 00000000000..162b7041737 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/drush/tests/.ci/vagrant_test.sh @@ -0,0 +1,5 @@ +#!/bin/bash + +cd /vagrant +chmod a+x tests/.ci/test.sh +./tests/.ci/test.sh diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/drush/tests/apt.pp b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/drush/tests/apt.pp new file mode 100644 index 00000000000..4e5fa184044 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/drush/tests/apt.pp @@ -0,0 +1,4 @@ +class { 'drush::apt' : + dist => 'squeeze', + backports => 'squeeze', +} diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/drush/tests/defaults.pp b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/drush/tests/defaults.pp new file mode 100644 index 00000000000..da0c41ab8bd --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/drush/tests/defaults.pp @@ -0,0 +1 @@ +include drush::defaults diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/drush/tests/dis.pp b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/drush/tests/dis.pp new file mode 100644 index 00000000000..8b6519724dd --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/drush/tests/dis.pp @@ -0,0 +1,3 @@ +include drush + +drush::dis { 'devel': } diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/drush/tests/dl.pp b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/drush/tests/dl.pp new file mode 100644 index 00000000000..4a7d19897aa --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/drush/tests/dl.pp @@ -0,0 +1,2 @@ +include drush +drush::dl { 'token': } diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/drush/tests/en.pp b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/drush/tests/en.pp new file mode 100644 index 00000000000..c43afe3826f --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/drush/tests/en.pp @@ -0,0 +1,2 @@ +include drush +drush::en { 'views': } diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/drush/tests/git.pp b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/drush/tests/git.pp new file mode 100644 index 00000000000..d33d4a68940 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/drush/tests/git.pp @@ -0,0 +1,4 @@ +include drush +drush::git { 'git://git.drupal.org:project/provision.git' : + path => '/var/aegir/.drush', +} diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/drush/tests/git/drush.pp b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/drush/tests/git/drush.pp new file mode 100644 index 00000000000..6acc7e34d3c --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/drush/tests/git/drush.pp @@ -0,0 +1 @@ +include drush::git::drush diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/drush/tests/init.pp b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/drush/tests/init.pp new file mode 100644 index 00000000000..86f0b12cf02 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/drush/tests/init.pp @@ -0,0 +1 @@ +include drush diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/drush/tests/make.pp b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/drush/tests/make.pp new file mode 100644 index 00000000000..8df88a52532 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/drush/tests/make.pp @@ -0,0 +1,4 @@ +include drush +drush::make { '/var/aegir/platforms/drupal7' : + makefile => '/var/aegir/makefiles/drupal7.make', +} diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/drush/tests/run.pp b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/drush/tests/run.pp new file mode 100644 index 00000000000..b6f37a633d2 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/drush/tests/run.pp @@ -0,0 +1,2 @@ +include drush +drush::run { '@hostmaster hosting-dispatch' : } diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/drush/tests/status.pp b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/drush/tests/status.pp new file mode 100644 index 00000000000..9e562fa6bbe --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/drush/tests/status.pp @@ -0,0 +1,2 @@ +include drush +drush::status { '@none' : } diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/elasticsearch/.fixtures.yml b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/elasticsearch/.fixtures.yml new file mode 100644 index 00000000000..e16c4080a12 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/elasticsearch/.fixtures.yml @@ -0,0 +1,5 @@ +fixtures: + repositories: + stdlib: git://github.com/puppetlabs/puppetlabs-stdlib.git + symlinks: + elasticsearch: "#{source_dir}" diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/elasticsearch/.travis.yml b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/elasticsearch/.travis.yml new file mode 100644 index 00000000000..c4a322e03f4 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/elasticsearch/.travis.yml @@ -0,0 +1,33 @@ +language: ruby +rvm: + - 1.8.7 + - 1.9.3 + - 2.0.0 +script: + - "rake lint" + - "rake parser_validate" + - "rake template_verify" + - "rake spec SPEC_OPTS='--format documentation'" +env: + - PUPPET_VERSION="~> 2.7.0" + - PUPPET_VERSION="~> 3.0.0" + - PUPPET_VERSION="~> 3.1.0" + - PUPPET_VERSION="~> 3.2.0" + - PUPPET_VERSION="~> 3.3.0" +matrix: + allow_failures: + - rvm: 2.0.0 +gemfile: Gemfile +notifications: + email: + recipients: + - richard.pijnenburg@elasticsearch.com + on_success: change + on_failure: always + hipchat: + rooms: + secure: "gFaED3lu9MRrmoojO2iagrfOaKAbCeQSqVZ9TsIo+qkqem8hwOsMuxsYQ9evPbPbanXQoVNALXTd4fgQW16+hfg/ClqI3nDtVZZJSy0W+U0yVZtz9TXFpi9Q/Z4TwK5TMdNMjemt0l2idY2SE3leHBZEeaIAGfLf0v38tCsNI84=" + template: + - '@electrical %{repository}#%{build_number} (%{branch} - %{commit} : %{author}): %{message} %{build_url}' + on_success: change + on_failure: always diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/elasticsearch/CHANGELOG b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/elasticsearch/CHANGELOG new file mode 100644 index 00000000000..90a59fc9308 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/elasticsearch/CHANGELOG @@ -0,0 +1,91 @@ +0.2.2 ( Jan 23, 2014 ) + Ensure exec names are unique. This caused issues when using our logstash module + Add spec tests for plugin define + +0.2.1 ( Jan 22, 2014 ) + Simplify the management of the defaults file ( PR #64 ) + Doc improvements for the plugin define ( PR #66 ) + Allow creation of data directory ( PR #68 ) + Fail early when package version and package_url are defined + +0.2.0 ( Nov 19, 2013 ) + Large rewrite of the entire module described below + Make the core more dynamic for different service providers and multi instance capable + Add better testing and devided into different files + Fix template function. Replace of template is now only done when the file is changed + Add different ways to install the package except from the repository ( puppet/http/https/ftp/file ) + Update java class to install openjdk 1.7 + Add tests for python function + Update config file template to fix scoping issue ( from PR #57 ) + Add validation of templates + Small changes for preperation for system tests + Update readme for new functionality + Added more test scenario's + Added puppet parser validate task for added checking + Ensure we don't add stuff when removing the module + Update python client define + Add ruby client define + Add tests for ruby clients and update python client tests + +0.1.3 ( Sep 06, 2013 ) + Exec path settings has been updated to fix warnings ( PR #37, #47 ) + Adding define to install python bindings ( PR #43 ) + Scope deprecation fixes ( PR #41 ) + feature to install plugins ( PR #40 ) + +0.1.2 ( Jun 21, 2013 ) + Update rake file to ignore the param inherit + Added missing documentation to the template define + Fix for template define to allow multiple templates ( PR #36 by Bruce Morrison ) + +0.1.1 ( Jun 14, 2013 ) + Add Oracle Linux to the OS list ( PR #25 by Stas Alekseev ) + Respect the restart_on_change on the defaults ( PR #29 by Simon Effenberg ) + Make sure the config can be empty as advertised in the readme + Remove dependency cycle when the defaults file is updated ( PR #31 by Bruce Morrison ) + Enable retry on the template insert in case ES isn't started yet ( PR #32 by Bruce Morrison ) + Update templates to avoid deprecation notice with Puppet 3.2.x + Update template define to avoid auto insert issue with ES + Update spec tests to reflect changes to template define + +0.1.0 ( May 09, 2013 ) + Populate .gitignore ( PR #19 by Igor Galić ) + Add ability to install initfile ( PR #20 by Justin Lambert ) + Add ability to manage default file* service parameters ( PR #21 by Mathieu Bornoz ) + Providing complete containment of the module ( PR #24 by Brian Lalor ) + Add ability to specify package version ( PR #25 by Justin Lambert ) + Adding license file + +0.0.7 ( Mar 23, 2013 ) + Ensure config directory is created and managed ( PR #13 by Martin Seener ) + Dont backup package if it changes + Create explicit dependency on template directory ( PR #16 by Igor Galić ) + Make the config directory variable ( PR #17 by Igor Galić and PR #18 by Vincent Janelle ) + Fixing template define + +0.0.6 ( Mar 05, 2013 ) + Fixing issue with configuration not printing out arrays + New feature to write the config hash shorter + Updated readme to reflect the new feature + Adding spec tests for config file generation + +0.0.5 ( Mar 03, 2013 ) + Option to disable restart on config file change ( PR #10 by Chris Boulton ) + +0.0.4 ( Mar 02, 2013 ) + Fixed a major issue with the config template ( Issue #9 ) + +0.0.3 ( Mar 02, 2013 ) + Adding spec tests + Fixed init issue on Ubuntu ( Issue #6 by Marcus Furlong ) + Fixed config template problem ( Issue #8 by surfchris ) + New feature to manage templates + +0.0.2 ( Feb 16, 2013 ) + Feature to supply a package instead of being dependent on the repository + Feature to install java in case one doesn't manage it externally + Adding RedHat and Amazon as Operating systems + fixed a typo - its a shard not a shared :) ( PR #5 by Martin Seener ) + +0.0.1 ( Jan 13, 2013 ) + Initial release of the module diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/elasticsearch/CONTRIBUTING.md b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/elasticsearch/CONTRIBUTING.md new file mode 100644 index 00000000000..13f29e3307b --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/elasticsearch/CONTRIBUTING.md @@ -0,0 +1,18 @@ +If you have a bugfix or new feature that you would like to contribute to this puppet module, please find or open an issue about it first. Talk about what you would like to do. It may be that somebody is already working on it, or that there are particular issues that you should know about before implementing the change. + +We enjoy working with contributors to get their code accepted. There are many approaches to fixing a problem and it is important to find the best approach before writing too much code. + +The process for contributing to any of the Elasticsearch repositories is similar. + +1. Sign the contributor license agreement +Please make sure you have signed the [Contributor License Agreement](http://www.elasticsearch.org/contributor-agreement/). We are not asking you to assign copyright to us, but to give us the right to distribute your code without restriction. We ask this of all contributors in order to assure our users of the origin and continuing existence of the code. You only need to sign the CLA once. + +2. Run the rspec tests and ensure it completes without errors with your changes. + +3. Rebase your changes +Update your local repository with the most recent code from the main this puppet module repository, and rebase your branch on top of the latest master branch. We prefer your changes to be squashed into a single commit. + +4. Submit a pull request +Push your local changes to your forked copy of the repository and submit a pull request. In the pull request, describe what your changes do and mention the number of the issue where discussion has taken place, eg “Closes #123″. + +Then sit back and wait. There will probably be discussion about the pull request and, if any changes are needed, we would love to work with you to get your pull request merged into this puppet module. diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/elasticsearch/CONTRIBUTORS b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/elasticsearch/CONTRIBUTORS new file mode 100644 index 00000000000..ad0eb76c4d1 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/elasticsearch/CONTRIBUTORS @@ -0,0 +1,20 @@ +The following is a list of people who have contributed ideas, code, bug +reports, or in general have helped this puppet module along its way. + +Project Owner +* Richard Pijnenburg (electrical) + +Contributors: +Martin Seener (martinseener) +Marcus Furlong (furlongm) +Chris Boulton (chrisboulton) +Igor Galić (igalic) +Vincent Janelle (vjanelle) +Mathieu Bornoz (mbornoz) +Justin Lambert (jlambert121) +Brian Lalor (blalor) +Stas Alekseev (salekseev) +Simon Effenberg (Savar) +Bruce Morrison (brucem) +deanmalmgren +Matteo Sessa (msessa-cotd) diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/elasticsearch/Gemfile b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/elasticsearch/Gemfile new file mode 100644 index 00000000000..95b8d66d8f4 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/elasticsearch/Gemfile @@ -0,0 +1,7 @@ +source 'https://rubygems.org' + +puppetversion = ENV['PUPPET_VERSION'] +gem 'puppet', puppetversion, :require => false +gem 'puppet-lint' +gem 'rspec-puppet' +gem 'puppetlabs_spec_helper', '>= 0.1.0' diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/elasticsearch/LICENSE b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/elasticsearch/LICENSE new file mode 100644 index 00000000000..f8b711d55df --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/elasticsearch/LICENSE @@ -0,0 +1,13 @@ +Copyright (c) 2012-2014 Elasticsearch + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/elasticsearch/Modulefile b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/elasticsearch/Modulefile new file mode 100644 index 00000000000..44aae1c8bda --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/elasticsearch/Modulefile @@ -0,0 +1,9 @@ +name 'elasticsearch-elasticsearch' +version '0.2.2' +source 'https://github.com/elasticsearch/puppet-elasticsearch' +author 'elasticsearch' +license 'Apache License, Version 2.0' +summary 'Module for managing and configuring Elasticsearch nodes' +description 'Module for managing and configuring Elasticsearch nodes' +project_page 'https://github.com/elasticsearch/puppet-elasticsearch' +dependency 'puppetlabs/stdlib', '>= 3.0.0' diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/elasticsearch/README.md b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/elasticsearch/README.md new file mode 100644 index 00000000000..12a12759d94 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/elasticsearch/README.md @@ -0,0 +1,203 @@ +# puppet-elasticsearch + +A puppet module for managing elasticsearch nodes + +http://www.elasticsearch.org/ + +[![Build Status](https://travis-ci.org/elasticsearch/puppet-elasticsearch.png?branch=master)](https://travis-ci.org/elasticsearch/puppet-elasticsearch) + +## Usage + +Installation, make sure service is running and will be started at boot time: + + class { 'elasticsearch': } + +Install a certain version: + + class { 'elasticsearch': + version => '0.90.3' + } + +This assumes an elasticsearch package is already available to your distribution's package manager. To install it in a different way: + +To download from http/https/ftp source: + + class { 'elasticsearch': + package_url => 'https://download.elasticsearch.org/elasticsearch/elasticsearch/elasticsearch-0.90.7.deb' + } + +To download from a puppet:// source: + + class { 'elasticsearch': + package_url => 'puppet:///path/to/elasticsearch-0.90.7.deb' + } + +Or use a local file source: + + class { 'elasticsearch': + package_url => 'file:/path/to/elasticsearch-0.90.7.deb' + } + +Automatic upgrade of the software ( default set to false ): + + class { 'elasticsearch': + autoupgrade => true + } + +Removal/decommissioning: + + class { 'elasticsearch': + ensure => 'absent' + } + +Install everything but disable service(s) afterwards: + + class { 'elasticsearch': + status => 'disabled' + } + +Disable automated restart of Elasticsearch on config file change: + + class { 'elasticsearch': + restart_on_change => false + } + +For the config variable a hash needs to be passed: + + class { 'elasticsearch': + config => { + 'node' => { + 'name' => 'elasticsearch001' + }, + 'index' => { + 'number_of_replicas' => '0', + 'number_of_shards' => '5' + }, + 'network' => { + 'host' => $::ipaddress + } + } + } + +Short write up of the config hash is also possible. + +Instead of writing the full hash representation: + + class { 'elasticsearch': + config => { + 'cluster' => { + 'name' => 'ClusterName', + 'routing' => { + 'allocation' => { + 'awareness' => { + 'attributes' => 'rack' + } + } + } + } + } + } + +You can write the dotted key naming: + + class { 'elasticsearch': + config => { + 'cluster' => { + 'name' => 'ClusterName', + 'routing.allocation.awareness.attributes' => 'rack' + } + } + } + + +## Manage templates + +### Add a new template + +This will install and/or replace the template in Elasticearch + + elasticsearch::template { 'templatename': + file => 'puppet:///path/to/template.json' + } + +### Delete a template + + elasticsearch::template { 'templatename': + ensure => 'absent' + } + +### Host + + Default it uses localhost:9200 as host. you can change this with the 'host' and 'port' variables + + elasticsearch::template { 'templatename': + host => $::ipaddress, + port => 9200 + } + +## Bindings / clients + +Install a variety of [clients/bindings](http://www.elasticsearch.org/guide/clients/): + +### Python + + elasticsearch::python { 'rawes': } + +### Ruby + + elasticsearch::ruby { 'elasticsearch': } + +## Plugins + +Install [a variety of plugins](http://www.elasticsearch.org/guide/clients/): + +### From official repository: + + elasticsearch::plugin{'mobz/elasticsearch-head': + module_dir => 'head' + } + +### From custom url: + + elasticsearch::plugin{ 'elasticsearch-jetty': + module_dir => 'jetty', + url => 'https://oss-es-plugins.s3.amazonaws.com/elasticsearch-jetty/elasticsearch-jetty-0.90.0.zip' + } + +## Java install + +For those that have no separate module for installation of java: + + class { 'elasticsearch': + java_install => true + } + +If you want a specific java package/version: + + class { 'elasticsearch': + java_install => true, + java_package => 'packagename' + } + +## Service providers + +Currently only the 'init' service provider is supported but others can be implemented quite easy. + +### init + +#### Defaults file + +You can populate the defaults file ( /etc/defaults/elasticsearch or /etc/sysconfig/elasticsearch ) + +##### hash representation + + class { 'elasticsearch': + init_defaults => { 'ES_USER' => 'elasticsearch', 'ES_GROUP' => 'elasticsearch' } + } + +##### file source + + class { 'elasticsearch': + init_defaults_file => 'puppet:///path/to/defaults' + } + diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/elasticsearch/Rakefile b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/elasticsearch/Rakefile new file mode 100644 index 00000000000..425e032920f --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/elasticsearch/Rakefile @@ -0,0 +1,7 @@ +require 'rubygems' +require 'puppetlabs_spec_helper/rake_tasks' +require 'puppet-lint' +require './spec/lib/template_check_task.rb' +require './spec/lib/parser_validate_task.rb' +PuppetLint.configuration.send("disable_80chars") +PuppetLint.configuration.send("disable_class_inherits_from_params_class") diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/elasticsearch/manifests/config.pp b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/elasticsearch/manifests/config.pp new file mode 100644 index 00000000000..a26886d4f00 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/elasticsearch/manifests/config.pp @@ -0,0 +1,90 @@ +# == Class: elasticsearch::config +# +# This class exists to coordinate all configuration related actions, +# functionality and logical units in a central place. +# +# +# === Parameters +# +# This class does not provide any parameters. +# +# +# === Examples +# +# This class may be imported by other classes to use its functionality: +# class { 'elasticsearch::config': } +# +# It is not intended to be used directly by external resources like node +# definitions or other modules. +# +# +# === Authors +# +# * Richard Pijnenburg +# +class elasticsearch::config { + + #### Configuration + + File { + owner => $elasticsearch::elasticsearch_user, + group => $elasticsearch::elasticsearch_group + } + + Exec { + path => [ '/bin', '/usr/bin', '/usr/local/bin' ], + cwd => '/', + } + + if ( $elasticsearch::ensure == 'present' ) { + + $notify_service = $elasticsearch::restart_on_change ? { + true => Class['elasticsearch::service'], + false => undef, + } + + file { $elasticsearch::confdir: + ensure => directory, + mode => '0644', + purge => $elasticsearch::purge_confdir, + force => $elasticsearch::purge_confdir + } + + file { "${elasticsearch::confdir}/elasticsearch.yml": + ensure => file, + content => template("${module_name}/etc/elasticsearch/elasticsearch.yml.erb"), + mode => '0644', + notify => $notify_service + } + + exec { 'mkdir_templates_elasticsearch': + command => "mkdir -p ${elasticsearch::confdir}/templates_import", + creates => "${elasticsearch::confdir}/templates_import" + } + + file { "${elasticsearch::confdir}/templates_import": + ensure => 'directory', + mode => '0644', + require => Exec['mkdir_templates_elasticsearch'] + } + + if ( $elasticsearch::datadir != undef ) { + file { $elasticsearch::datadir: + ensure => 'directory', + owner => $elasticsearch::elasticsearch_user, + group => $elasticsearch::elasticsearch_group, + mode => '0770', + } + } + + } elsif ( $elasticsearch::ensure == 'absent' ) { + + file { $elasticsearch::confdir: + ensure => 'absent', + recurse => true, + force => true + } + + } + +} diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/elasticsearch/manifests/init.pp b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/elasticsearch/manifests/init.pp new file mode 100644 index 00000000000..fabfd78867e --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/elasticsearch/manifests/init.pp @@ -0,0 +1,208 @@ +# == Class: elasticsearch +# +# This class is able to install or remove elasticsearch on a node. +# It manages the status of the related service. +# +# === Parameters +# +# [*ensure*] +# String. Controls if the managed resources shall be present or +# absent. If set to absent: +# * The managed software packages are being uninstalled. +# * Any traces of the packages will be purged as good as possible. This may +# include existing configuration files. The exact behavior is provider +# dependent. Q.v.: +# * Puppet type reference: {package, "purgeable"}[http://j.mp/xbxmNP] +# * {Puppet's package provider source code}[http://j.mp/wtVCaL] +# * System modifications (if any) will be reverted as good as possible +# (e.g. removal of created users, services, changed log settings, ...). +# * This is thus destructive and should be used with care. +# Defaults to present. +# +# [*autoupgrade*] +# Boolean. If set to true, any managed package gets upgraded +# on each Puppet run when the package provider is able to find a newer +# version than the present one. The exact behavior is provider dependent. +# Q.v.: +# * Puppet type reference: {package, "upgradeable"}[http://j.mp/xbxmNP] +# * {Puppet's package provider source code}[http://j.mp/wtVCaL] +# Defaults to false. +# +# [*status*] +# String to define the status of the service. Possible values: +# * enabled: Service is running and will be started at boot time. +# * disabled: Service is stopped and will not be started at boot +# time. +# * running: Service is running but will not be started at boot time. +# You can use this to start a service on the first Puppet run instead of +# the system startup. +# * unmanaged: Service will not be started at boot time and Puppet +# does not care whether the service is running or not. For example, this may +# be useful if a cluster management software is used to decide when to start +# the service plus assuring it is running on the desired node. +# Defaults to enabled. The singular form ("service") is used for the +# sake of convenience. Of course, the defined status affects all services if +# more than one is managed (see service.pp to check if this is the +# case). +# +# [*version*] +# String to set the specific version you want to install. +# Defaults to false. +# +# [*restart_on_change*] +# Boolean that determines if the application should be automatically restarted +# whenever the configuration changes. Disabling automatic restarts on config +# changes may be desired in an environment where you need to ensure restarts +# occur in a controlled/rolling manner rather than during a Puppet run. +# +# Defaults to true, which will restart the application on any config +# change. Setting to false disables the automatic restart. +# +# [*confdir*] +# Path to directory containing the elasticsearch configuration. +# Use this setting if your packages deviate from the norm (/etc/elasticsearch) +# +# [*plugindir*] +# Path to directory containing the elasticsearch plugins +# Use this setting if your packages deviate from the norm (/usr/share/elasticsearch/plugins) +# +# [*plugintool*] +# Path to directory containing the elasticsearch plugin installation script +# Use this setting if your packages deviate from the norm (/usr/share/elasticsearch/bin/plugin) +# +# The default values for the parameters are set in elasticsearch::params. Have +# a look at the corresponding params.pp manifest file if you need more +# technical information about them. +# +# === Examples +# +# * Installation, make sure service is running and will be started at boot time: +# class { 'elasticsearch': } +# +# * Removal/decommissioning: +# class { 'elasticsearch': +# ensure => 'absent', +# } +# +# * Install everything but disable service(s) afterwards +# class { 'elasticsearch': +# status => 'disabled', +# } +# +# +# === Authors +# +# * Richard Pijnenburg +# +class elasticsearch( + $ensure = $elasticsearch::params::ensure, + $status = $elasticsearch::params::status, + $restart_on_change = $elasticsearch::params::restart_on_change, + $autoupgrade = $elasticsearch::params::autoupgrade, + $version = false, + $package_provider = 'package', + $package_url = undef, + $package_dir = $elasticsearch::params::package_dir, + $purge_package_dir = $elasticsearch::params::purge_package_dir, + $elasticsearch_user = $elasticsearch::params::elasticsearch_user, + $elasticsearch_group = $elasticsearch::params::elasticsearch_group, + $purge_confdir = $elasticsearch::params::purge_confdir, + $service_provider = 'init', + $init_defaults = undef, + $init_defaults_file = undef, + $init_template = undef, + $config = {}, + $confdir = $elasticsearch::params::confdir, + $datadir = undef, + $plugindir = $elasticsearch::params::plugindir, + $plugintool = $elasticsearch::params::plugintool, + $java_install = false, + $java_package = undef +) inherits elasticsearch::params { + + anchor {'elasticsearch::begin': } + anchor {'elasticsearch::end': } + + + #### Validate parameters + + # ensure + if ! ($ensure in [ 'present', 'absent' ]) { + fail("\"${ensure}\" is not a valid ensure parameter value") + } + + # autoupgrade + validate_bool($autoupgrade) + + # service status + if ! ($status in [ 'enabled', 'disabled', 'running', 'unmanaged' ]) { + fail("\"${status}\" is not a valid status parameter value") + } + + # restart on change + validate_bool($restart_on_change) + + # purge conf dir + validate_bool($purge_confdir) + + if ! ($service_provider in $elasticsearch::params::service_providers) { + fail("\"${service_provider}\" is not a valid provider for \"${::operatingsystem}\"") + } + + if ($package_url != undef and $version != false) { + fail('Unable to set the version number when using package_url option.') + } + + # validate config hash + validate_hash($config) + + # java install validation + validate_bool($java_install) + + #### Manage actions + + # package(s) + class { 'elasticsearch::package': } + + # configuration + class { 'elasticsearch::config': } + + # service(s) + class { 'elasticsearch::service': } + + if $java_install == true { + # Install java + class { 'elasticsearch::java': } + + # ensure we first java java and then manage the service + Anchor['elasticsearch::begin'] + -> Class['elasticsearch::java'] + -> Class['elasticsearch::service'] + } + + #### Manage relationships + + if $ensure == 'present' { + + # we need the software before configuring it + Anchor['elasticsearch::begin'] + -> Class['elasticsearch::package'] + -> Class['elasticsearch::config'] + + # we need the software and a working configuration before running a service + Class['elasticsearch::package'] -> Class['elasticsearch::service'] + Class['elasticsearch::config'] -> Class['elasticsearch::service'] + + Class['elasticsearch::service'] -> Anchor['elasticsearch::end'] + + } else { + + # make sure all services are getting stopped before software removal + Anchor['elasticsearch::begin'] + -> Class['elasticsearch::service'] + -> Class['elasticsearch::package'] + -> Anchor['elasticsearch::end'] + + } + +} diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/elasticsearch/manifests/java.pp b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/elasticsearch/manifests/java.pp new file mode 100644 index 00000000000..8d5149d381b --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/elasticsearch/manifests/java.pp @@ -0,0 +1,50 @@ +# == Class: elasticsearch::java +# +# This class exists to install java if its not managed from an other module +# +# +# === Parameters +# +# This class does not provide any parameters. +# +# +# === Examples +# +# This class may be imported by other classes to use its functionality: +# class { 'elasticsearch::java': } +# +# It is not intended to be used directly by external resources like node +# definitions or other modules. +# +# +# === Authors +# +# * Richard Pijnenburg +# +class elasticsearch::java { + + if $elasticsearch::java_package == undef { + # Default Java package + case $::operatingsystem { + 'CentOS', 'Fedora', 'Scientific', 'RedHat', 'Amazon', 'OracleLinux': { + $package = 'java-1.7.0-openjdk' + } + 'Debian', 'Ubuntu': { + $package = 'openjdk-7-jre-headless' + } + default: { + fail("\"${module_name}\" provides no java package + for \"${::operatingsystem}\"") + } + } + } else { + $package = $elasticsearch::java_package + } + + ## Install the java package unless already specified somewhere else + if !defined(Package[$package]) { + package { $package: + ensure => present + } + } +} diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/elasticsearch/manifests/package.pp b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/elasticsearch/manifests/package.pp new file mode 100644 index 00000000000..1cb5295d47c --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/elasticsearch/manifests/package.pp @@ -0,0 +1,145 @@ +# == Class: elasticsearch::package +# +# This class exists to coordinate all software package management related +# actions, functionality and logical units in a central place. +# +# +# === Parameters +# +# This class does not provide any parameters. +# +# +# === Examples +# +# This class may be imported by other classes to use its functionality: +# class { 'elasticsearch::package': } +# +# It is not intended to be used directly by external resources like node +# definitions or other modules. +# +# +# === Authors +# +# * Richard Pijnenburg +# +class elasticsearch::package { + + + #### Package management + + # set params: in operation + if $elasticsearch::ensure == 'present' { + + # Check if we want to install a specific version or not + if $elasticsearch::version == false { + + $package_ensure = $elasticsearch::autoupgrade ? { + true => 'latest', + false => 'present', + } + + } else { + + # install specific version + $package_ensure = $elasticsearch::version + + } + + # action + if ($elasticsearch::package_url != undef) { + + $package_dir = $elasticsearch::package_dir + + # Create directory to place the package file + exec { 'create_package_dir_elasticsearch': + cwd => '/', + path => ['/usr/bin', '/bin'], + command => "mkdir -p ${elasticsearch::package_dir}", + creates => $elasticsearch::package_dir; + } + + file { $package_dir: + ensure => 'directory', + purge => $elasticsearch::purge_package_dir, + force => $elasticsearch::purge_package_dir, + require => Exec['create_package_dir_elasticsearch'], + } + + $filenameArray = split($elasticsearch::package_url, '/') + $basefilename = $filenameArray[-1] + + $sourceArray = split($elasticsearch::package_url, ':') + $protocol_type = $sourceArray[0] + + $extArray = split($basefilename, '\.') + $ext = $extArray[-1] + + case $protocol_type { + + puppet: { + + file { "${package_dir}/${basefilename}": + ensure => present, + source => $elasticsearch::package_url, + require => File[$package_dir], + backup => false, + before => Package[$elasticsearch::params::package] + } + + } + ftp, https, http: { + + exec { 'download_package_elasticsearch': + command => "${elasticsearch::params::dlcmd} ${package_dir}/${basefilename} ${elasticsearch::package_url} 2> /dev/null", + path => ['/usr/bin', '/bin'], + creates => "${package_dir}/${basefilename}", + require => File[$package_dir], + before => Package[$elasticsearch::params::package] + } + + } + file: { + + $source_path = $sourceArray[1] + file { "${package_dir}/${basefilename}": + ensure => present, + source => $source_path, + require => File[$package_dir], + backup => false, + before => Package[$elasticsearch::params::package] + } + + } + default: { + fail("Protocol must be puppet, file, http, https, or ftp. You have given \"${protocol_type}\"") + } + } + + case $ext { + 'deb': { $pkg_provider = 'dpkg' } + 'rpm': { $pkg_provider = 'rpm' } + default: { fail("Unknown file extention \"${ext}\".") } + } + + $pkg_source = "${package_dir}/${basefilename}" + + } else { + $pkg_source = undef + $pkg_provider = undef + } + + # Package removal + } else { + + $pkg_source = undef + $pkg_provider = undef + $package_ensure = 'purged' + } + + package { $elasticsearch::params::package: + ensure => $package_ensure, + source => $pkg_source, + provider => $pkg_provider + } + +} diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/elasticsearch/manifests/params.pp b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/elasticsearch/manifests/params.pp new file mode 100644 index 00000000000..aea527f1b6b --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/elasticsearch/manifests/params.pp @@ -0,0 +1,122 @@ +# == Class: elasticsearch::params +# +# This class exists to +# 1. Declutter the default value assignment for class parameters. +# 2. Manage internally used module variables in a central place. +# +# Therefore, many operating system dependent differences (names, paths, ...) +# are addressed in here. +# +# +# === Parameters +# +# This class does not provide any parameters. +# +# +# === Examples +# +# This class is not intended to be used directly. +# +# +# === Links +# +# * {Puppet Docs: Using Parameterized Classes}[http://j.mp/nVpyWY] +# +# +# === Authors +# +# * Richard Pijnenburg +# +class elasticsearch::params { + + #### Default values for the parameters of the main module class, init.pp + + # ensure + $ensure = 'present' + + # autoupgrade + $autoupgrade = false + + # service status + $status = 'enabled' + + # restart on configuration change? + $restart_on_change = true + + # Package dir. Temporary place to download the package to for installation + $package_dir = '/var/lib/elasticsearch' + + # User and Group for the files and user to run the service as. + $elasticsearch_user = 'elasticsearch' + $elasticsearch_group = 'elasticsearch' + + # Purge configuration directory + $purge_confdir = true + + ## init service provider + + # configuration directory + $confdir = '/etc/elasticsearch' + + # plugins directory + $plugindir = '/usr/share/elasticsearch/plugins' + + # plugins helper binary + $plugintool = '/usr/share/elasticsearch/bin/plugin' + + # Download tool + $dlcmd = 'wget -O' + + $purge_package_dir = false + + #### Internal module values + + # packages + case $::operatingsystem { + 'RedHat', 'CentOS', 'Fedora', 'Scientific', 'Amazon', 'OracleLinux': { + # main application + $package = [ 'elasticsearch' ] + } + 'Debian', 'Ubuntu': { + # main application + $package = [ 'elasticsearch' ] + } + default: { + fail("\"${module_name}\" provides no package default value + for \"${::operatingsystem}\"") + } + } + + # service parameters + case $::operatingsystem { + 'RedHat', 'CentOS', 'Fedora', 'Scientific', 'Amazon', 'OracleLinux': { + $service_name = 'elasticsearch' + $service_hasrestart = true + $service_hasstatus = true + $service_pattern = $service_name + $service_providers = [ 'init' ] + $defaults_location = '/etc/sysconfig' + } + 'Debian', 'Ubuntu': { + $service_name = 'elasticsearch' + $service_hasrestart = true + $service_hasstatus = true + $service_pattern = $service_name + $service_providers = [ 'init' ] + $defaults_location = '/etc/default' + } + 'Darwin': { + $service_name = 'FIXME/TODO' + $service_hasrestart = true + $service_hasstatus = true + $service_pattern = $service_name + $service_providers = [ 'launchd' ] + $defaults_location = false + } + default: { + fail("\"${module_name}\" provides no service parameters + for \"${::operatingsystem}\"") + } + } + +} diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/elasticsearch/manifests/plugin.pp b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/elasticsearch/manifests/plugin.pp new file mode 100644 index 00000000000..025c3023324 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/elasticsearch/manifests/plugin.pp @@ -0,0 +1,96 @@ +# == Define: elasticsearch::plugin +# +# This define allows you to install arbitrary Elasticsearch plugins +# either by using the default repositories or by specifying an URL +# +# All default values are defined in the elasticsearch::params class. +# +# +# === Parameters +# +# [*module_dir*] +# Directory name where the module will be installed +# Value type is string +# Default value: None +# This variable is required +# +# [*ensure*] +# Whether the plugin will be installed or removed. +# Set to 'absent' to ensure a plugin is not installed +# Value type is string +# Default value: present +# This variable is optional +# +# [*url*] +# Specify an URL where to download the plugin from. +# Value type is string +# Default value: None +# This variable is optional +# +# +# === Examples +# +# # From official repository +# elasticsearch::plugin{'mobz/elasticsearch-head': module_dir => 'head'} +# +# # From custom url +# elasticsearch::plugin{ 'elasticsearch-jetty': +# module_dir => 'elasticsearch-jetty', +# url => 'https://oss-es-plugins.s3.amazonaws.com/elasticsearch-jetty/elasticsearch-jetty-0.90.0.zip', +# } +# +# === Authors +# +# * Matteo Sessa +# * Dennis Konert +# +define elasticsearch::plugin( + $module_dir, + $ensure = 'present', + $url = '' +) { + + Exec { + path => [ '/bin', '/usr/bin', '/usr/local/bin' ], + cwd => '/', + } + + $notify_service = $elasticsearch::restart_on_change ? { + false => undef, + default => Service['elasticsearch'], + } + + if ($module_dir != '') { + validate_string($module_dir) + } else { + fail("module_dir undefined for plugin ${name}") + } + + if ($url != '') { + validate_string($url) + $install_cmd = "${elasticsearch::plugintool} -install ${name} -url ${url}" + $exec_rets = [0,1] + } else { + $install_cmd = "${elasticsearch::plugintool} -install ${name}" + $exec_rets = [0,] + } + + case $ensure { + 'installed', 'present': { + exec {"install_plugin_${name}": + command => $install_cmd, + creates => "${elasticsearch::plugindir}/${module_dir}", + returns => $exec_rets, + notify => $notify_service, + require => Class['elasticsearch::package'] + } + } + default: { + exec {"remove_plugin_${name}": + command => "${elasticsearch::plugintool} --remove ${module_dir}", + onlyif => "test -d ${elasticsearch::plugindir}/${module_dir}", + notify => $notify_service, + } + } + } +} diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/elasticsearch/manifests/python.pp b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/elasticsearch/manifests/python.pp new file mode 100644 index 00000000000..e1d91a9aba6 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/elasticsearch/manifests/python.pp @@ -0,0 +1,73 @@ +# == Define: elasticsearch::python +# +# there are many python bindings for elasticsearch. This provides all +# the ones we know about http://www.elasticsearch.org/guide/clients/ +# +# +# === Parameters +# +# [*ensure*] +# String. Controls if the managed resources shall be present or +# absent. If set to absent: +# * The managed software packages are being uninstalled. +# * Any traces of the packages will be purged as good as possible. This may +# include existing configuration files. The exact behavior is provider +# dependent. Q.v.: +# * Puppet type reference: {package, "purgeable"}[http://j.mp/xbxmNP] +# * {Puppet's package provider source code}[http://j.mp/wtVCaL] +# * System modifications (if any) will be reverted as good as possible +# (e.g. removal of created users, services, changed log settings, ...). +# * This is thus destructive and should be used with care. +# Defaults to present. + +# +# +# === Examples +# +# elasticsearch::python { 'pyes':; } +# +# +# === Authors +# +# * Richard Pijnenburg +# +define elasticsearch::python ( + $ensure = 'present' +) { + + if ! ($ensure in [ 'present', 'absent' ]) { + fail("\"${ensure}\" is not a valid ensure parameter value") + } + + # make sure the package name is valid and setup the provider as + # necessary + case $name { + 'pyes': { + $provider = 'pip' + } + 'rawes': { + $provider = 'pip' + } + 'pyelasticsearch': { + $provider = 'pip' + } + 'ESClient': { + $provider = 'pip' + } + 'elasticutils': { + $provider = 'pip' + } + 'elasticsearch': { + $provider = 'pip' + } + default: { + fail("unknown python binding package '${name}'") + } + } + + package { $name: + ensure => $ensure, + provider => $provider, + } + +} diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/elasticsearch/manifests/ruby.pp b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/elasticsearch/manifests/ruby.pp new file mode 100644 index 00000000000..3e35f416f24 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/elasticsearch/manifests/ruby.pp @@ -0,0 +1,67 @@ +# == Define: elasticsearch::ruby +# +# there are many ruby bindings for elasticsearch. This provides all +# the ones we know about http://www.elasticsearch.org/guide/clients/ +# +# +# === Parameters +# +# [*ensure*] +# String. Controls if the managed resources shall be present or +# absent. If set to absent: +# * The managed software packages are being uninstalled. +# * Any traces of the packages will be purged as good as possible. This may +# include existing configuration files. The exact behavior is provider +# dependent. Q.v.: +# * Puppet type reference: {package, "purgeable"}[http://j.mp/xbxmNP] +# * {Puppet's package provider source code}[http://j.mp/wtVCaL] +# * System modifications (if any) will be reverted as good as possible +# (e.g. removal of created users, services, changed log settings, ...). +# * This is thus destructive and should be used with care. +# Defaults to present. + +# +# +# === Examples +# +# elasticsearch::ruby { 'elasticsearch':; } +# +# +# === Authors +# +# * Richard Pijnenburg +# +define elasticsearch::ruby ( + $ensure = 'present' +) { + + if ! ($ensure in [ 'present', 'absent' ]) { + fail("\"${ensure}\" is not a valid ensure parameter value") + } + + # make sure the package name is valid and setup the provider as + # necessary + case $name { + 'tire': { + $provider = 'gem' + } + 'stretcher': { + $provider = 'gem' + } + 'elastic_searchable': { + $provider = 'gem' + } + 'elasticsearch': { + $provider = 'gem' + } + default: { + fail("unknown ruby client package '${name}'") + } + } + + package { $name: + ensure => $ensure, + provider => $provider, + } + +} diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/elasticsearch/manifests/service.pp b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/elasticsearch/manifests/service.pp new file mode 100644 index 00000000000..891f5597994 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/elasticsearch/manifests/service.pp @@ -0,0 +1,43 @@ +# == Class: elasticsearch::service +# +# This class exists to coordinate all service management related actions, +# functionality and logical units in a central place. +# +# Note: "service" is the Puppet term and type for background processes +# in general and is used in a platform-independent way. E.g. "service" means +# "daemon" in relation to Unix-like systems. +# +# +# === Parameters +# +# This class does not provide any parameters. +# +# +# === Examples +# +# This class may be imported by other classes to use its functionality: +# class { 'elasticsearch::service': } +# +# It is not intended to be used directly by external resources like node +# definitions or other modules. +# +# +# === Authors +# +# * Richard Pijnenburg +# +class elasticsearch::service { + + case $elasticsearch::service_provider { + + init: { + elasticsearch::service::init { 'elasticsearch': } + } + + default: { + fail("Unknown service provider ${elasticsearch::service_provider}") + } + + } + +} diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/elasticsearch/manifests/service/init.pp b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/elasticsearch/manifests/service/init.pp new file mode 100644 index 00000000000..2db645c8de7 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/elasticsearch/manifests/service/init.pp @@ -0,0 +1,132 @@ +# == Define: elasticsearch::service::init +# +# This class exists to coordinate all service management related actions, +# functionality and logical units in a central place. +# +# Note: "service" is the Puppet term and type for background processes +# in general and is used in a platform-independent way. E.g. "service" means +# "daemon" in relation to Unix-like systems. +# +# +# === Parameters +# +# This class does not provide any parameters. +# +# +# === Examples +# +# === Authors +# +# * Richard Pijnenburg +# +define elasticsearch::service::init{ + + #### Service management + + # set params: in operation + if $elasticsearch::ensure == 'present' { + + case $elasticsearch::status { + # make sure service is currently running, start it on boot + 'enabled': { + $service_ensure = 'running' + $service_enable = true + } + # make sure service is currently stopped, do not start it on boot + 'disabled': { + $service_ensure = 'stopped' + $service_enable = false + } + # make sure service is currently running, do not start it on boot + 'running': { + $service_ensure = 'running' + $service_enable = false + } + # do not start service on boot, do not care whether currently running + # or not + 'unmanaged': { + $service_ensure = undef + $service_enable = false + } + # unknown status + # note: don't forget to update the parameter check in init.pp if you + # add a new or change an existing status. + default: { + fail("\"${elasticsearch::status}\" is an unknown service status value") + } + } + + # set params: removal + } else { + + # make sure the service is stopped and disabled (the removal itself will be + # done by package.pp) + $service_ensure = 'stopped' + $service_enable = false + + } + + $notify_service = $elasticsearch::restart_on_change ? { + true => Service[$name], + false => undef, + } + + + if ( $elasticsearch::status != 'unmanaged' ) { + + # defaults file content. Either from a hash or file + if ($elasticsearch::init_defaults_file != undef) { + $defaults_content = undef + $defaults_source = $elasticsearch::init_defaults_file + } elsif ($elasticsearch::init_defaults != undef and is_hash($elasticsearch::init_defaults) ) { + $defaults_content = template("${module_name}/etc/sysconfig/defaults.erb") + $defaults_source = undef + } else { + $defaults_content = undef + $defaults_source = undef + } + + # Check if we are going to manage the defaults file. + if ( $defaults_content != undef or $defaults_source != undef ) { + + file { "${elasticsearch::params::defaults_location}/${name}": + ensure => $elasticsearch::ensure, + source => $defaults_source, + content => $defaults_content, + owner => 'root', + group => 'root', + mode => '0644', + before => Service[$name], + notify => $notify_service + } + + } + + # init file from template + if ($elasticsearch::init_template != undef) { + + file { "/etc/init.d/${name}": + ensure => $elasticsearch::ensure, + content => template($elasticsearch::init_template), + owner => 'root', + group => 'root', + mode => '0755', + before => Service[$name], + notify => $notify_service + } + + } + + } + + # action + service { $name: + ensure => $service_ensure, + enable => $service_enable, + name => $elasticsearch::params::service_name, + hasstatus => $elasticsearch::params::service_hasstatus, + hasrestart => $elasticsearch::params::service_hasrestart, + pattern => $elasticsearch::params::service_pattern, + } + +} diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/elasticsearch/manifests/template.pp b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/elasticsearch/manifests/template.pp new file mode 100644 index 00000000000..b8ab2a61512 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/elasticsearch/manifests/template.pp @@ -0,0 +1,114 @@ +# == Define: elasticsearch::template +# +# This define allows you to insert, update or delete templates that are used within Elasticsearch for the indexes +# +# === Parameters +# +# [*file*] +# File path of the template ( json file ) +# Value type is string +# Default value: undef +# This variable is optional +# +# [*replace*] +# Set to 'true' if you intend to replace the existing template +# Value type is boolean +# Default value: false +# This variable is optional +# +# [*delete*] +# Set to 'true' if you intend to delete the existing template +# Value type is boolean +# Default value: false +# This variable is optional +# +# [*host*] +# Host name or IP address of the ES instance to connect to +# Value type is string +# Default value: localhost +# This variable is optional +# +# [*port*] +# Port number of the ES instance to connect to +# Value type is number +# Default value: 9200 +# This variable is optional +# +# === Authors +# +# * Richard Pijnenburg +# +define elasticsearch::template( + $ensure = 'present', + $file = undef, + $host = 'localhost', + $port = 9200 +) { + + require elasticsearch + + # ensure + if ! ($ensure in [ 'present', 'absent' ]) { + fail("\"${ensure}\" is not a valid ensure parameter value") + } + + if ! is_integer($port) { + fail("\"${port}\" is not an integer") + } + + Exec { + path => [ '/bin', '/usr/bin', '/usr/local/bin' ], + cwd => '/', + tries => 3, + try_sleep => 10 + } + + # Build up the url + $es_url = "http://${host}:${port}/_template/${name}" + + # Can't do a replace and delete at the same time + + if ($ensure == 'present') { + + # Fail when no file is supplied + if $file == undef { + fail('The variable "file" cannot be empty when inserting or updating a template') + + } else { # we are good to go. notify to insert in case we deleted + $insert_notify = Exec[ "insert_template_${name}" ] + } + + } else { + + $insert_notify = undef + + } + + # Delete the existing template + # First check if it exists of course + exec { "delete_template_${name}": + command => "curl -s -XDELETE ${es_url}", + onlyif => "test $(curl -s '${es_url}?pretty=true' | wc -l) -gt 1", + notify => $insert_notify, + refreshonly => true + } + + if ($ensure == 'present') { + + # place the template file + file { "${elasticsearch::confdir}/templates_import/elasticsearch-template-${name}.json": + ensure => 'present', + source => $file, + notify => Exec[ "delete_template_${name}" ], + require => Exec[ 'mkdir_templates' ], + } + + exec { "insert_template_${name}": + command => "curl -s -XPUT ${es_url} -d @${elasticsearch::confdir}/templates_import/elasticsearch-template-${name}.json", + unless => "test $(curl -s '${es_url}?pretty=true' | wc -l) -gt 1", + refreshonly => true + } + + } + +} diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/elasticsearch/spec/classes/001_elasticsearch_init_debian_spec.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/elasticsearch/spec/classes/001_elasticsearch_init_debian_spec.rb new file mode 100644 index 00000000000..dd4b5c1d206 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/elasticsearch/spec/classes/001_elasticsearch_init_debian_spec.rb @@ -0,0 +1,219 @@ +require 'spec_helper' + +describe 'elasticsearch', :type => 'class' do + + [ 'Debian', 'Ubuntu'].each do |distro| + + context "on #{distro} OS" do + + let :facts do { + :operatingsystem => distro + } end + + context 'main class tests' do + + # init.pp + it { should contain_class('elasticsearch::package') } + it { should contain_class('elasticsearch::config') } + it { should contain_class('elasticsearch::service') } + + end + + context 'package installation' do + + context 'via repository' do + + context 'with default settings' do + + it { should contain_package('elasticsearch').with(:ensure => 'present') } + + end + + context 'with specified version' do + + let :params do { + :version => '1.0' + } end + + it { should contain_package('elasticsearch').with(:ensure => '1.0') } + end + + context 'with auto upgrade enabled' do + + let :params do { + :autoupgrade => true + } end + + it { should contain_package('elasticsearch').with(:ensure => 'latest') } + end + + end + + context 'when setting package version and package_url' do + + let :params do { + :version => '0.90.10', + :package_url => 'puppet:///path/to/some/elasticsearch-0.90.10.deb' + } end + + it { expect { should raise_error(Puppet::Error) } } + + end + + context 'via package_url setting' do + + context 'using puppet:/// schema' do + + let :params do { + :package_url => 'puppet:///path/to/package.deb' + } end + + it { should contain_file('/var/lib/elasticsearch/package.deb').with(:source => 'puppet:///path/to/package.deb', :backup => false) } + it { should contain_package('elasticsearch').with(:ensure => 'present', :source => '/var/lib/elasticsearch/package.deb', :provider => 'dpkg') } + end + + context 'using http:// schema' do + + let :params do { + :package_url => 'http://www.domain.com/path/to/package.deb' + } end + + it { should contain_exec('create_package_dir_elasticsearch').with(:command => 'mkdir -p /var/lib/elasticsearch') } + it { should contain_file('/var/lib/elasticsearch').with(:purge => false, :force => false, :require => "Exec[create_package_dir_elasticsearch]") } + it { should contain_exec('download_package_elasticsearch').with(:command => 'wget -O /var/lib/elasticsearch/package.deb http://www.domain.com/path/to/package.deb 2> /dev/null', :require => 'File[/var/lib/elasticsearch]') } + it { should contain_package('elasticsearch').with(:ensure => 'present', :source => '/var/lib/elasticsearch/package.deb', :provider => 'dpkg') } + end + + context 'using https:// schema' do + + let :params do { + :package_url => 'https://www.domain.com/path/to/package.deb' + } end + + it { should contain_exec('create_package_dir_elasticsearch').with(:command => 'mkdir -p /var/lib/elasticsearch') } + it { should contain_file('/var/lib/elasticsearch').with(:purge => false, :force => false, :require => 'Exec[create_package_dir_elasticsearch]') } + it { should contain_exec('download_package_elasticsearch').with(:command => 'wget -O /var/lib/elasticsearch/package.deb https://www.domain.com/path/to/package.deb 2> /dev/null', :require => 'File[/var/lib/elasticsearch]') } + it { should contain_package('elasticsearch').with(:ensure => 'present', :source => '/var/lib/elasticsearch/package.deb', :provider => 'dpkg') } + end + + context 'using ftp:// schema' do + + let :params do { + :package_url => 'ftp://www.domain.com/path/to/package.deb' + } end + + it { should contain_exec('create_package_dir_elasticsearch').with(:command => 'mkdir -p /var/lib/elasticsearch') } + it { should contain_file('/var/lib/elasticsearch').with(:purge => false, :force => false, :require => 'Exec[create_package_dir_elasticsearch]') } + it { should contain_exec('download_package_elasticsearch').with(:command => 'wget -O /var/lib/elasticsearch/package.deb ftp://www.domain.com/path/to/package.deb 2> /dev/null', :require => 'File[/var/lib/elasticsearch]') } + it { should contain_package('elasticsearch').with(:ensure => 'present', :source => '/var/lib/elasticsearch/package.deb', :provider => 'dpkg') } + end + + context 'using file:// schema' do + + let :params do { + :package_url => 'file:/path/to/package.deb' + } end + + it { should contain_exec('create_package_dir_elasticsearch').with(:command => 'mkdir -p /var/lib/elasticsearch') } + it { should contain_file('/var/lib/elasticsearch').with(:purge => false, :force => false, :require => 'Exec[create_package_dir_elasticsearch]') } + it { should contain_file('/var/lib/elasticsearch/package.deb').with(:source => '/path/to/package.deb', :backup => false) } + it { should contain_package('elasticsearch').with(:ensure => 'present', :source => '/var/lib/elasticsearch/package.deb', :provider => 'dpkg') } + end + + end + + end # package + + context 'service setup' do + + context 'with provider \'init\'' do + + context 'and default settings' do + + it { should contain_service('elasticsearch').with(:ensure => 'running') } + + end + + context 'and set defaults via hash param' do + + let :params do { + :init_defaults => { 'SERVICE_USER' => 'root', 'SERVICE_GROUP' => 'root' } + } end + + it { should contain_file('/etc/default/elasticsearch').with(:content => "### MANAGED BY PUPPET ###\n\nSERVICE_GROUP=root\nSERVICE_USER=root\n", :notify => 'Service[elasticsearch]') } + + end + + context 'and set defaults via file param' do + + let :params do { + :init_defaults_file => 'puppet:///path/to/elasticsearch.defaults' + } end + + it { should contain_file('/etc/default/elasticsearch').with(:source => 'puppet:///path/to/elasticsearch.defaults', :notify => 'Service[elasticsearch]') } + + end + + context 'no service restart when defaults change' do + + let :params do { + :init_defaults => { 'SERVICE_USER' => 'root', 'SERVICE_GROUP' => 'root' }, + :restart_on_change => false + } end + + it { should contain_file('/etc/default/elasticsearch').with(:content => "### MANAGED BY PUPPET ###\n\nSERVICE_GROUP=root\nSERVICE_USER=root\n").without_notify } + + end + + context 'and set init file via template' do + + let :params do { + :init_template => "elasticsearch/etc/init.d/elasticsearch.Debian.erb" + } end + + it { should contain_file('/etc/init.d/elasticsearch').with(:notify => 'Service[elasticsearch]') } + + end + + context 'No service restart when restart_on_change is false' do + + let :params do { + :init_template => "elasticsearch/etc/init.d/elasticsearch.Debian.erb", + :restart_on_change => false + } end + + it { should contain_file('/etc/init.d/elasticsearch').without_notify } + + end + + context 'when its unmanaged do nothing with it' do + + let :params do { + :status => 'unmanaged' + } end + + it { should contain_service('elasticsearch').with(:ensure => nil, :enable => false) } + + end + + end # provider init + + end # Services + + context 'when setting the module to absent' do + + let :params do { + :ensure => 'absent' + } end + + it { should contain_file('/etc/elasticsearch').with(:ensure => 'absent', :force => true, :recurse => true) } + it { should contain_package('elasticsearch').with(:ensure => 'purged') } + it { should contain_service('elasticsearch').with(:ensure => 'stopped', :enable => false) } + + end + + end + + end + +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/elasticsearch/spec/classes/002_elasticsearch_init_redhat_spec.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/elasticsearch/spec/classes/002_elasticsearch_init_redhat_spec.rb new file mode 100644 index 00000000000..9151b20e6ca --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/elasticsearch/spec/classes/002_elasticsearch_init_redhat_spec.rb @@ -0,0 +1,219 @@ +require 'spec_helper' + +describe 'elasticsearch', :type => 'class' do + + [ 'RedHat', 'CentOS', 'Fedora', 'Scientific', 'Amazon', 'OracleLinux' ].each do |distro| + + context "on #{distro} OS" do + + let :facts do { + :operatingsystem => distro + } end + + context 'Main class' do + + # init.pp + it { should contain_class('elasticsearch::package') } + it { should contain_class('elasticsearch::config') } + it { should contain_class('elasticsearch::service') } + + end + + context 'package installation' do + + context 'via repository' do + + context 'with default settings' do + + it { should contain_package('elasticsearch').with(:ensure => 'present') } + + end + + context 'with specified version' do + + let :params do { + :version => '1.0' + } end + + it { should contain_package('elasticsearch').with(:ensure => '1.0') } + end + + context 'with auto upgrade enabled' do + + let :params do { + :autoupgrade => true + } end + + it { should contain_package('elasticsearch').with(:ensure => 'latest') } + end + + end + + context 'when setting package version and package_url' do + + let :params do { + :version => '0.90.10', + :package_url => 'puppet:///path/to/some/elasticsearch-0.90.10.rpm' + } end + + it { expect { should raise_error(Puppet::Error) } } + + end + + context 'via package_url setting' do + + context 'using puppet:/// schema' do + + let :params do { + :package_url => 'puppet:///path/to/package.rpm' + } end + + it { should contain_file('/var/lib/elasticsearch/package.rpm').with(:source => 'puppet:///path/to/package.rpm', :backup => false) } + it { should contain_package('elasticsearch').with(:ensure => 'present', :source => '/var/lib/elasticsearch/package.rpm', :provider => 'rpm') } + end + + context 'using http:// schema' do + + let :params do { + :package_url => 'http://www.domain.com/path/to/package.rpm' + } end + + it { should contain_exec('create_package_dir_elasticsearch').with(:command => 'mkdir -p /var/lib/elasticsearch') } + it { should contain_file('/var/lib/elasticsearch').with(:purge => false, :force => false, :require => "Exec[create_package_dir_elasticsearch]") } + it { should contain_exec('download_package_elasticsearch').with(:command => 'wget -O /var/lib/elasticsearch/package.rpm http://www.domain.com/path/to/package.rpm 2> /dev/null', :require => 'File[/var/lib/elasticsearch]') } + it { should contain_package('elasticsearch').with(:ensure => 'present', :source => '/var/lib/elasticsearch/package.rpm', :provider => 'rpm') } + end + + context 'using https:// schema' do + + let :params do { + :package_url => 'https://www.domain.com/path/to/package.rpm' + } end + + it { should contain_exec('create_package_dir_elasticsearch').with(:command => 'mkdir -p /var/lib/elasticsearch') } + it { should contain_file('/var/lib/elasticsearch').with(:purge => false, :force => false, :require => 'Exec[create_package_dir_elasticsearch]') } + it { should contain_exec('download_package_elasticsearch').with(:command => 'wget -O /var/lib/elasticsearch/package.rpm https://www.domain.com/path/to/package.rpm 2> /dev/null', :require => 'File[/var/lib/elasticsearch]') } + it { should contain_package('elasticsearch').with(:ensure => 'present', :source => '/var/lib/elasticsearch/package.rpm', :provider => 'rpm') } + end + + context 'using ftp:// schema' do + + let :params do { + :package_url => 'ftp://www.domain.com/path/to/package.rpm' + } end + + it { should contain_exec('create_package_dir_elasticsearch').with(:command => 'mkdir -p /var/lib/elasticsearch') } + it { should contain_file('/var/lib/elasticsearch').with(:purge => false, :force => false, :require => 'Exec[create_package_dir_elasticsearch]') } + it { should contain_exec('download_package_elasticsearch').with(:command => 'wget -O /var/lib/elasticsearch/package.rpm ftp://www.domain.com/path/to/package.rpm 2> /dev/null', :require => 'File[/var/lib/elasticsearch]') } + it { should contain_package('elasticsearch').with(:ensure => 'present', :source => '/var/lib/elasticsearch/package.rpm', :provider => 'rpm') } + end + + context 'using file:// schema' do + + let :params do { + :package_url => 'file:/path/to/package.rpm' + } end + + it { should contain_exec('create_package_dir_elasticsearch').with(:command => 'mkdir -p /var/lib/elasticsearch') } + it { should contain_file('/var/lib/elasticsearch').with(:purge => false, :force => false, :require => 'Exec[create_package_dir_elasticsearch]') } + it { should contain_file('/var/lib/elasticsearch/package.rpm').with(:source => '/path/to/package.rpm', :backup => false) } + it { should contain_package('elasticsearch').with(:ensure => 'present', :source => '/var/lib/elasticsearch/package.rpm', :provider => 'rpm') } + end + + end + + end # package + + context 'service setup' do + + context 'with provider \'init\'' do + + context 'and default settings' do + + it { should contain_service('elasticsearch').with(:ensure => 'running') } + + end + + context 'and set defaults via hash param' do + + let :params do { + :init_defaults => { 'SERVICE_USER' => 'root', 'SERVICE_GROUP' => 'root' } + } end + + it { should contain_file('/etc/sysconfig/elasticsearch').with(:content => "### MANAGED BY PUPPET ###\n\nSERVICE_GROUP=root\nSERVICE_USER=root\n", :notify => 'Service[elasticsearch]') } + + end + + context 'and set defaults via file param' do + + let :params do { + :init_defaults_file => 'puppet:///path/to/elasticsearch.defaults' + } end + + it { should contain_file('/etc/sysconfig/elasticsearch').with(:source => 'puppet:///path/to/elasticsearch.defaults', :notify => 'Service[elasticsearch]') } + + end + + context 'no service restart when defaults change' do + + let :params do { + :init_defaults => { 'SERVICE_USER' => 'root', 'SERVICE_GROUP' => 'root' }, + :restart_on_change => false + } end + + it { should contain_file('/etc/sysconfig/elasticsearch').with(:content => "### MANAGED BY PUPPET ###\n\nSERVICE_GROUP=root\nSERVICE_USER=root\n").without_notify } + + end + + context 'and set init file via template' do + + let :params do { + :init_template => "elasticsearch/etc/init.d/elasticsearch.RedHat.erb" + } end + + it { should contain_file('/etc/init.d/elasticsearch').with(:notify => 'Service[elasticsearch]') } + + end + + context 'No service restart when restart_on_change is false' do + + let :params do { + :init_template => "elasticsearch/etc/init.d/elasticsearch.RedHat.erb", + :restart_on_change => false + } end + + it { should contain_file('/etc/init.d/elasticsearch').without_notify } + + end + + context 'when its unmanaged do nothing with it' do + + let :params do { + :status => 'unmanaged' + } end + + it { should contain_service('elasticsearch').with(:ensure => nil, :enable => false) } + + end + + end + + end # Services + + context 'when setting the module to absent' do + + let :params do { + :ensure => 'absent' + } end + + it { should contain_file('/etc/elasticsearch').with(:ensure => 'absent', :force => true, :recurse => true) } + it { should contain_package('elasticsearch').with(:ensure => 'purged') } + it { should contain_service('elasticsearch').with(:ensure => 'stopped', :enable => false) } + + end + + end + + end + +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/elasticsearch/spec/classes/003_elasticsearch_init_unknown_spec.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/elasticsearch/spec/classes/003_elasticsearch_init_unknown_spec.rb new file mode 100644 index 00000000000..12bce8fef8d --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/elasticsearch/spec/classes/003_elasticsearch_init_unknown_spec.rb @@ -0,0 +1,18 @@ +require 'spec_helper' + +describe 'elasticsearch', :type => 'class' do + + context "on an unknown OS" do + + context "it should fail" do + let :facts do { + :operatingsystem => 'Windows' + } end + + it { expect { should raise_error(Puppet::Error) } } + + end + + end + +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/elasticsearch/spec/classes/004_elasticsearch_init_config_spec.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/elasticsearch/spec/classes/004_elasticsearch_init_config_spec.rb new file mode 100644 index 00000000000..2f01fb5b29d --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/elasticsearch/spec/classes/004_elasticsearch_init_config_spec.rb @@ -0,0 +1,112 @@ +require 'spec_helper' + +describe 'elasticsearch', :type => 'class' do + + let :facts do { + :operatingsystem => 'CentOS' + } end + + context "config file content" do + + context "with nothing set" do + + let :params do { + } end + + it { should contain_file('/etc/elasticsearch/elasticsearch.yml').with(:content => "### MANAGED BY PUPPET ###\n") } + + end + + context "set a value" do + + let :params do { + :config => { 'node' => { 'name' => 'test' } } + } end + + it { should contain_file('/etc/elasticsearch/elasticsearch.yml').with(:content => "### MANAGED BY PUPPET ###\n---\nnode: \n name: test\n") } + + end + + context "set a value to true" do + + let :params do { + :config => { 'node' => { 'master' => true } } + } end + + it { should contain_file('/etc/elasticsearch/elasticsearch.yml').with(:content => "### MANAGED BY PUPPET ###\n---\nnode: \n master: true\n") } + + end + + context "set a value to false" do + + let :params do { + :config => { 'node' => { 'data' => false } } + } end + + it { should contain_file('/etc/elasticsearch/elasticsearch.yml').with(:content => "### MANAGED BY PUPPET ###\n---\nnode: \n data: false\n") } + + end + + context "deeper hash and multiple keys" do + + let :params do { + :config => { 'index' => { 'routing' => { 'allocation' => { 'include' => 'tag1', 'exclude' => [ 'tag2', 'tag3' ] } } }, 'node' => { 'name' => 'somename' } } + } end + + it { should contain_file('/etc/elasticsearch/elasticsearch.yml').with(:content => "### MANAGED BY PUPPET ###\n---\nindex: \n routing: \n allocation: \n exclude: \n - tag2\n - tag3\n include: tag1\nnode: \n name: somename\n") } + + end + + context "Combination of full hash and shorted write up keys" do + + let :params do { + :config => { 'node' => { 'name' => 'NodeName', 'rack' => 46 }, 'boostrap.mlockall' => true, 'cluster' => { 'name' => 'ClusterName', 'routing.allocation.awareness.attributes' => 'rack' }, 'discovery.zen' => { 'ping.unicast.hosts'=> [ "host1", "host2" ], 'minimum_master_nodes' => 3, 'ping.multicast.enabled' => false }, 'gateway' => { 'expected_nodes' => 4, 'recover_after_nodes' => 3 }, 'network.host' => '123.123.123.123' } + } end + + it { should contain_file('/etc/elasticsearch/elasticsearch.yml').with(:content => "### MANAGED BY PUPPET ###\n---\nboostrap: \n mlockall: true\ncluster: \n name: ClusterName\n routing: \n allocation: \n awareness: \n attributes: rack\ndiscovery: \n zen: \n minimum_master_nodes: 3\n ping: \n multicast: \n enabled: false\n unicast: \n hosts: \n - host1\n - host2\ngateway: \n expected_nodes: 4\n recover_after_nodes: 3\nnetwork: \n host: 123.123.123.123\nnode: \n name: NodeName\n rack: 46\n") } + + end + + end + + context "service restarts" do + + let :facts do { + :operatingsystem => 'CentOS' + } end + + context "does not restart when restart_on_change is false" do + let :params do { + :config => { 'node' => { 'name' => 'test' } }, + :restart_on_change => false, + } end + + it { should contain_file('/etc/elasticsearch/elasticsearch.yml').without_notify } + end + + context "should happen restart_on_change is true (default)" do + let :params do { + :config => { 'node' => { 'name' => 'test' } }, + :restart_on_change => true, + } end + + it { should contain_file('/etc/elasticsearch/elasticsearch.yml').with(:notify => "Class[Elasticsearch::Service]") } + end + + end + + context 'data directory' do + let(:facts) do { + :operatingsystem => 'CentOS' + } end + + context 'should allow creating datadir' do + let(:params) do { + :datadir => '/foo' + } end + + it { should contain_file('/foo').with(:ensure => 'directory') } + end + + end +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/elasticsearch/spec/classes/005_elasticsearch_java_spec.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/elasticsearch/spec/classes/005_elasticsearch_java_spec.rb new file mode 100644 index 00000000000..d51108746d9 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/elasticsearch/spec/classes/005_elasticsearch_java_spec.rb @@ -0,0 +1,120 @@ +require 'spec_helper' + +describe 'elasticsearch', :type => 'class' do + + context "install java" do + + let :params do { + :java_install => true, + :config => { 'node' => { 'name' => 'test' } } + } end + + context "On Debian OS" do + + let :facts do { + :operatingsystem => 'Debian' + } end + + it { should contain_package('openjdk-7-jre-headless') } + + end + + context "On Ubuntu OS" do + + let :facts do { + :operatingsystem => 'Ubuntu' + } end + + it { should contain_package('openjdk-7-jre-headless') } + + end + + context "On CentOS OS " do + + let :facts do { + :operatingsystem => 'CentOS' + } end + + it { should contain_package('java-1.7.0-openjdk') } + + end + + context "On RedHat OS " do + + let :facts do { + :operatingsystem => 'Redhat' + } end + + it { should contain_package('java-1.7.0-openjdk') } + + end + + context "On Fedora OS " do + + let :facts do { + :operatingsystem => 'Fedora' + } end + + it { should contain_package('java-1.7.0-openjdk') } + + end + + context "On Scientific OS " do + + let :facts do { + :operatingsystem => 'Scientific' + } end + + it { should contain_package('java-1.7.0-openjdk') } + + end + + context "On Amazon OS " do + + let :facts do { + :operatingsystem => 'Amazon' + } end + + it { should contain_package('java-1.7.0-openjdk') } + + end + + context "On OracleLinux OS " do + + let :facts do { + :operatingsystem => 'OracleLinux' + } end + + it { should contain_package('java-1.7.0-openjdk') } + + end + + context "On an unknown OS" do + + let :facts do { + :operatingsystem => 'Windows' + } end + + it { expect { should raise_error(Puppet::Error) } } + + end + + context "Custom java package" do + + let :facts do { + :operatingsystem => 'CentOS' + } end + + let :params do { + :java_install => true, + :java_package => 'java-1.6.0-openjdk', + :config => { 'node' => { 'name' => 'test' } } + } end + + it { should contain_package('java-1.6.0-openjdk') } + + end + + end + +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/elasticsearch/spec/defines/001_elasticsearch_python_spec.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/elasticsearch/spec/defines/001_elasticsearch_python_spec.rb new file mode 100644 index 00000000000..56d0428067a --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/elasticsearch/spec/defines/001_elasticsearch_python_spec.rb @@ -0,0 +1,19 @@ +require 'spec_helper' + +describe 'elasticsearch::python', :type => 'define' do + + let(:facts) { {:operatingsystem => 'CentOS' }} + + [ 'pyes', 'rawes', 'pyelasticsearch', 'ESClient', 'elasticutils', 'elasticsearch' ].each do |pythonlib| + + context "installation of library #{pythonlib}" do + + let(:title) { pythonlib } + + it { should contain_package(pythonlib).with(:provider => 'pip') } + + end + + end + +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/elasticsearch/spec/defines/002_elasticsearch_ruby_spec.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/elasticsearch/spec/defines/002_elasticsearch_ruby_spec.rb new file mode 100644 index 00000000000..6de94f76b2c --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/elasticsearch/spec/defines/002_elasticsearch_ruby_spec.rb @@ -0,0 +1,19 @@ +require 'spec_helper' + +describe 'elasticsearch::ruby', :type => 'define' do + + let(:facts) { {:operatingsystem => 'CentOS' }} + + [ 'tire', 'stretcher', 'elastic_searchable', 'elasticsearch'].each do |rubylib| + + context "installation of library #{rubylib}" do + + let(:title) { rubylib } + + it { should contain_package(rubylib).with(:provider => 'gem') } + + end + + end + +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/elasticsearch/spec/defines/003_elasticsearch_template_spec.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/elasticsearch/spec/defines/003_elasticsearch_template_spec.rb new file mode 100644 index 00000000000..527fb118f0b --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/elasticsearch/spec/defines/003_elasticsearch_template_spec.rb @@ -0,0 +1,43 @@ +require 'spec_helper' + +describe 'elasticsearch::template', :type => 'define' do + + let(:title) { 'foo' } + let(:facts) { {:operatingsystem => 'CentOS' }} + let(:pre_condition) { 'class {"elasticsearch": config => { "node" => {"name" => "test" }}}'} + + context "Add a template" do + + let :params do { + :ensure => 'present', + :file => 'puppet:///path/to/foo.json', + } end + + it { should contain_file('/etc/elasticsearch/templates_import/elasticsearch-template-foo.json').with(:source => 'puppet:///path/to/foo.json', :notify => "Exec[delete_template_foo]", :require => "Exec[mkdir_templates]") } + it { should contain_exec('insert_template_foo').with(:command => 'curl -s -XPUT http://localhost:9200/_template/foo -d @/etc/elasticsearch/templates_import/elasticsearch-template-foo.json', :unless => 'test $(curl -s \'http://localhost:9200/_template/foo?pretty=true\' | wc -l) -gt 1') } + end + + context "Delete a template" do + + let :params do { + :ensure => 'absent' + } end + + it { should_not contain_file('/etc/elasticsearch/templates_import/elasticsearch-template-foo.json').with(:source => 'puppet:///path/to/foo.json') } + it { should_not contain_exec('insert_template_foo') } + it { should contain_exec('delete_template_foo').with(:command => 'curl -s -XDELETE http://localhost:9200/_template/foo', :notify => nil, :onlyif => 'test $(curl -s \'http://localhost:9200/_template/foo?pretty=true\' | wc -l) -gt 1' ) } + end + + context "Add template with alternative host and port" do + + let :params do { + :file => 'puppet:///path/to/foo.json', + :host => 'otherhost', + :port => '9201' + } end + + it { should contain_file('/etc/elasticsearch/templates_import/elasticsearch-template-foo.json').with(:source => 'puppet:///path/to/foo.json') } + it { should contain_exec('insert_template_foo').with(:command => 'curl -s -XPUT http://otherhost:9201/_template/foo -d @/etc/elasticsearch/templates_import/elasticsearch-template-foo.json', :unless => 'test $(curl -s \'http://otherhost:9201/_template/foo?pretty=true\' | wc -l) -gt 1') } + end + +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/elasticsearch/spec/defines/004_elasticsearch_plugin_spec.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/elasticsearch/spec/defines/004_elasticsearch_plugin_spec.rb new file mode 100644 index 00000000000..dcf2170ea70 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/elasticsearch/spec/defines/004_elasticsearch_plugin_spec.rb @@ -0,0 +1,29 @@ +require 'spec_helper' + +describe 'elasticsearch::plugin', :type => 'define' do + + let(:title) { 'mobz/elasticsearch-head' } + let(:facts) { {:operatingsystem => 'CentOS' }} + let(:pre_condition) { 'class {"elasticsearch": config => { "node" => {"name" => "test" }}}'} + + context "Add a plugin" do + + let :params do { + :ensure => 'present', + :module_dir => 'head', + } end + + it { should contain_exec('install_plugin_mobz/elasticsearch-head').with(:command => '/usr/share/elasticsearch/bin/plugin -install mobz/elasticsearch-head', :creates => '/usr/share/elasticsearch/plugins/head') } + end + + context "Remove a plugin" do + + let :params do { + :ensure => 'absent', + :module_dir => 'head' + } end + + it { should contain_exec('remove_plugin_mobz/elasticsearch-head').with(:command => '/usr/share/elasticsearch/bin/plugin --remove head', :onlyif => 'test -d /usr/share/elasticsearch/plugins/head') } + end + +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/elasticsearch/spec/lib/parser_validate_task.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/elasticsearch/spec/lib/parser_validate_task.rb new file mode 100644 index 00000000000..27ab76450a5 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/elasticsearch/spec/lib/parser_validate_task.rb @@ -0,0 +1,40 @@ +require 'find' +require 'pathname' +require 'rake' +require 'rspec/core/rake_task' + +desc "run Puppet parser validate" +task :parser_validate do + + pwd = ENV["PWD"] + puppet_file_paths = [] + Find.find(pwd) do |path| + puppet_file_paths << path if path =~ /.*\.pp$/ + end + + exit_code = 0 + puppet_file_paths.each do |puppetfile| + + pwdpath = Pathname.new(pwd) + pn = Pathname.new(puppetfile) + rel_path = pn.relative_path_from(pwdpath) + + print "Validating #{rel_path}.... " + $stdout.flush + + result = `puppet parser validate #{puppetfile}` + if $?.exitstatus == 0 + res = 'OK' + else + res = 'ERR' + end + + puts "#{res}" + + if $?.exitstatus != 0 + exit_code = 1 + end + end + exit exit_code + +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/elasticsearch/spec/lib/template_check_task.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/elasticsearch/spec/lib/template_check_task.rb new file mode 100644 index 00000000000..f4748236fba --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/elasticsearch/spec/lib/template_check_task.rb @@ -0,0 +1,31 @@ +require 'find' +require 'pathname' +require 'rake' +require 'rspec/core/rake_task' + +desc "Verify puppet templates" +task :template_verify do + + pwd = ENV["PWD"] + erb_file_paths = [] + Find.find(pwd) do |path| + erb_file_paths << path if path =~ /.*\.erb$/ + end + + exit_code = 0 + erb_file_paths.each do |erbfile| + + pwdpath = Pathname.new(pwd) + pn = Pathname.new(erbfile) + rel_path = pn.relative_path_from(pwdpath) + + result = `erb -P -x -T '-' #{erbfile} | ruby -c` + puts "Verifying #{rel_path}.... #{result}" + + if $?.exitstatus != 0 + exit_code = 1 + end + end + exit exit_code + +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/elasticsearch/spec/spec_helper.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/elasticsearch/spec/spec_helper.rb new file mode 100644 index 00000000000..dc7e9f4a0ef --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/elasticsearch/spec/spec_helper.rb @@ -0,0 +1,2 @@ +require 'rubygems' +require 'puppetlabs_spec_helper/module_spec_helper' diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/elasticsearch/templates/etc/elasticsearch/elasticsearch.yml.erb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/elasticsearch/templates/etc/elasticsearch/elasticsearch.yml.erb new file mode 100644 index 00000000000..b93ccdcb219 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/elasticsearch/templates/etc/elasticsearch/elasticsearch.yml.erb @@ -0,0 +1,93 @@ +<%- + + # Function to make a structured and sorted yaml representation out of a hash + def recursive_hash_to_yml_string(hash, depth=0) + spacer = "" + depth.times { spacer += " "} + hash.keys.sort.each do |sorted_key| + @yml_string += spacer + sorted_key + ": " + if hash[sorted_key].is_a?(Array) + keyspacer = "" + sorted_key.length.times { keyspacer += " " } + @yml_string += "\n" + hash[sorted_key].each do |item| + @yml_string += spacer + keyspacer + "- " + item +"\n" + end + elsif hash[sorted_key].is_a?(Hash) + @yml_string += "\n" + recursive_hash_to_yml_string(hash[sorted_key], depth+1) + else + @yml_string += "#{hash[sorted_key].to_s}\n" + end + end + end + + # Function to transform shorted write up of the keys into full hash representation + def transform(hash) + return_vals = [] + + hash.each do |key,val| + if m = /^([^.]+)\.(.*)$/.match(key) + temp = { m[1] => { m[2] => val } } + transform(temp).each do |stuff| + return_vals << stuff + end + else + if val.is_a?(Hash) + transform(val).each do |stuff| + return_vals << { key => stuff } + end + else + return_vals << { key => val } + end + end + end + + return_vals + end + + # Function to deep merge hashes with same keys + class ::Hash + def deep_merge_with_array_values_concatenated(hash) + target = dup + + hash.keys.each do |key| + if hash[key].is_a? Hash and self[key].is_a? Hash + target[key] = target[key].deep_merge_with_array_values_concatenated(hash[key]) + next + end + + if hash[key].is_a?(Array) && target[key].is_a?(Array) + target[key] = target[key] + hash[key] + else + target[key] = hash[key] + end + end + + target + end + end + + # initial string + @yml_string = "### MANAGED BY PUPPET ###\n" + + if !scope.lookupvar('elasticsearch::config').empty? + + @yml_string += "---\n" + + ## Transform shorted keys into full write up + transformed_config = transform(scope.lookupvar('elasticsearch::config')) + + # Merge it back into a hash + tmphash = { } + transformed_config.each do |subhash| + tmphash = tmphash.deep_merge_with_array_values_concatenated(subhash) + end + + # Transform it into yaml + recursive_hash_to_yml_string(tmphash) + + end + +-%> +<%= @yml_string -%> diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/elasticsearch/templates/etc/init.d/elasticsearch.Debian.erb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/elasticsearch/templates/etc/init.d/elasticsearch.Debian.erb new file mode 100644 index 00000000000..220c2f80b7d --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/elasticsearch/templates/etc/init.d/elasticsearch.Debian.erb @@ -0,0 +1,196 @@ +#!/bin/sh +# +# /etc/init.d/elasticsearch -- startup script for Elasticsearch +# +# Written by Miquel van Smoorenburg . +# Modified for Debian GNU/Linux by Ian Murdock . +# Modified for Tomcat by Stefan Gybas . +# Modified for Tomcat6 by Thierry Carrez . +# Additional improvements by Jason Brittain . +# Modified by Nicolas Huray for ElasticSearch . +# +### BEGIN INIT INFO +# Provides: elasticsearch +# Required-Start: $network $remote_fs $named +# Required-Stop: $network $remote_fs $named +# Default-Start: 2 3 4 5 +# Default-Stop: 0 1 6 +# Short-Description: Starts elasticsearch +# Description: Starts elasticsearch using start-stop-daemon +### END INIT INFO + +PATH=/bin:/usr/bin:/sbin:/usr/sbin +NAME=elasticsearch +DESC="ElasticSearch Server" +DEFAULT=/etc/default/$NAME + +if [ `id -u` -ne 0 ]; then + echo "You need root privileges to run this script" + exit 1 +fi + + +. /lib/lsb/init-functions + +if [ -r /etc/default/rcS ]; then + . /etc/default/rcS +fi + + +# The following variables can be overwritten in $DEFAULT + +# Run ElasticSearch as this user ID and group ID +ES_USER=elasticsearch +ES_GROUP=elasticsearch + +# The first existing directory is used for JAVA_HOME (if JAVA_HOME is not defined in $DEFAULT) +JDK_DIRS="/usr/lib/jvm/java-7-oracle /usr/lib/jvm/java-7-openjdk /usr/lib/jvm/java-7-openjdk-amd64/ /usr/lib/jvm/java-7-openjdk-armhf /usr/lib/jvm/java-7-openjdk-i386/ /usr/lib/jvm/java-6-sun /usr/lib/jvm/java-6-openjdk /usr/lib/jvm/java-6-openjdk-amd64 /usr/lib/jvm/java-6-openjdk-armhf /usr/lib/jvm/java-6-openjdk-i386 /usr/lib/jvm/default-java" + +# Look for the right JVM to use +for jdir in $JDK_DIRS; do + if [ -r "$jdir/bin/java" -a -z "${JAVA_HOME}" ]; then + JAVA_HOME="$jdir" + fi +done +export JAVA_HOME + +# Directory where the ElasticSearch binary distribution resides +ES_HOME=/usr/share/$NAME + +# Heap Size (defaults to 256m min, 1g max) +#ES_HEAP_SIZE=2g + +# Heap new generation +#ES_HEAP_NEWSIZE= + +# max direct memory +#ES_DIRECT_SIZE= + +# Additional Java OPTS +#ES_JAVA_OPTS= + +# Maximum number of open files +MAX_OPEN_FILES=65535 + +# Maximum amount of locked memory +#MAX_LOCKED_MEMORY= + +# ElasticSearch log directory +LOG_DIR=/var/log/$NAME + +# ElasticSearch data directory +DATA_DIR=/var/lib/$NAME + +# ElasticSearch work directory +WORK_DIR=/tmp/$NAME + +# ElasticSearch configuration directory +CONF_DIR=/etc/$NAME + +# ElasticSearch configuration file (elasticsearch.yml) +CONF_FILE=$CONF_DIR/elasticsearch.yml + +# End of variables that can be overwritten in $DEFAULT + +# overwrite settings from default file +if [ -f "$DEFAULT" ]; then + . "$DEFAULT" +fi + +# Define other required variables +PID_FILE=/var/run/$NAME.pid +DAEMON=$ES_HOME/bin/elasticsearch +DAEMON_OPTS="-p $PID_FILE -Des.default.config=$CONF_FILE -Des.default.path.home=$ES_HOME -Des.default.path.logs=$LOG_DIR -Des.default.path.data=$DATA_DIR -Des.default.path.work=$WORK_DIR -Des.default.path.conf=$CONF_DIR" + +export ES_HEAP_SIZE +export ES_HEAP_NEWSIZE +export ES_DIRECT_SIZE +export ES_JAVA_OPTS + +# Check DAEMON exists +test -x $DAEMON || exit 0 + +checkJava() { + if [ -x "$JAVA_HOME/bin/java" ]; then + JAVA="$JAVA_HOME/bin/java" + else + JAVA=`which java` + fi + + if [ ! -x "$JAVA" ]; then + echo "Could not find any executable java binary. Please install java in your PATH or set JAVA_HOME" + exit 1 + fi +} + +case "$1" in + start) + checkJava + + if [ -n "$MAX_LOCKED_MEMORY" -a -z "$ES_HEAP_SIZE" ]; then + log_failure_msg "MAX_LOCKED_MEMORY is set - ES_HEAP_SIZE must also be set" + exit 1 + fi + + log_daemon_msg "Starting $DESC" + + pid=`pidofproc -p $PID_FILE elasticsearch` + if [ -n "$pid" ] ; then + log_begin_msg "Already running." + log_end_msg 0 + exit 0 + fi + + # Prepare environment + mkdir -p "$LOG_DIR" "$DATA_DIR" "$WORK_DIR" && chown "$ES_USER":"$ES_GROUP" "$LOG_DIR" "$DATA_DIR" "$WORK_DIR" + touch "$PID_FILE" && chown "$ES_USER":"$ES_GROUP" "$PID_FILE" + + if [ -n "$MAX_OPEN_FILES" ]; then + ulimit -n $MAX_OPEN_FILES + fi + + if [ -n "$MAX_LOCKED_MEMORY" ]; then + ulimit -l $MAX_LOCKED_MEMORY + fi + + # Start Daemon + start-stop-daemon --start -b --user "$ES_USER" -c "$ES_USER" --pidfile "$PID_FILE" --exec $DAEMON -- $DAEMON_OPTS + log_end_msg $? + ;; + stop) + log_daemon_msg "Stopping $DESC" + + if [ -f "$PID_FILE" ]; then + start-stop-daemon --stop --pidfile "$PID_FILE" \ + --user "$ES_USER" \ + --retry=TERM/20/KILL/5 >/dev/null + if [ $? -eq 1 ]; then + log_progress_msg "$DESC is not running but pid file exists, cleaning up" + elif [ $? -eq 3 ]; then + PID="`cat $PID_FILE`" + log_failure_msg "Failed to stop $DESC (pid $PID)" + exit 1 + fi + rm -f "$PID_FILE" + else + log_progress_msg "(not running)" + fi + log_end_msg 0 + ;; + status) + status_of_proc -p $PID_FILE elasticsearch elasticsearch && exit 0 || exit $? + ;; + restart|force-reload) + if [ -f "$PID_FILE" ]; then + $0 stop + sleep 1 + fi + $0 start + ;; + *) + log_success_msg "Usage: $0 {start|stop|restart|force-reload|status}" + exit 1 + ;; +esac + +exit 0 diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/elasticsearch/templates/etc/init.d/elasticsearch.RedHat.erb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/elasticsearch/templates/etc/init.d/elasticsearch.RedHat.erb new file mode 100644 index 00000000000..8d611514a11 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/elasticsearch/templates/etc/init.d/elasticsearch.RedHat.erb @@ -0,0 +1,155 @@ +#!/bin/sh +# +# elasticsearch +# +# chkconfig: 2345 80 20 +# description: Starts and stops a single elasticsearch instance on this system +# + +### BEGIN INIT INFO +# Provides: Elasticsearch +# Required-Start: $network $named +# Required-Stop: $network $named +# Default-Start: 2 3 4 5 +# Default-Stop: 0 1 6 +# Short-Description: This service manages the elasticsearch daemon +# Description: Elasticsearch is a very scalable, schema-free and high-performance search solution supporting multi-tenancy and near realtime search. +### END INIT INFO + +# +# init.d / servicectl compatibility (openSUSE) +# +if [ -f /etc/rc.status ]; then + . /etc/rc.status + rc_reset +fi + +# +# Source function library. +# +if [ -f /etc/rc.d/init.d/functions ]; then + . /etc/rc.d/init.d/functions +fi + +exec="/usr/share/elasticsearch/bin/elasticsearch" +prog="elasticsearch" +pidfile=/var/run/elasticsearch/${prog}.pid + +[ -e /etc/sysconfig/$prog ] && . /etc/sysconfig/$prog + +export ES_HEAP_SIZE +export ES_HEAP_NEWSIZE +export ES_DIRECT_SIZE +export ES_JAVA_OPTS + +lockfile=/var/lock/subsys/$prog + +# backwards compatibility for old config sysconfig files, pre 0.90.1 +if [ -n $USER ] && [ -z $ES_USER ] ; then + ES_USER=$USER +fi + +checkJava() { + if [ -x "$JAVA_HOME/bin/java" ]; then + JAVA="$JAVA_HOME/bin/java" + else + JAVA=$(which java) + fi + + if [ ! -x "$JAVA" ]; then + echo "Could not find any executable java binary. Please install java in your PATH or set JAVA_HOME" + exit 1 + fi +} + +start() { + checkJava + [ -x $exec ] || exit 5 + [ -f $CONF_FILE ] || exit 6 + if [ -n "$MAX_LOCKED_MEMORY" -a -z "$ES_HEAP_SIZE" ]; then + echo "MAX_LOCKED_MEMORY is set - ES_HEAP_SIZE must also be set" + return 7 + fi + if [ -n "$MAX_OPEN_FILES" ]; then + ulimit -n $MAX_OPEN_FILES + fi + if [ -n "$MAX_LOCKED_MEMORY" ]; then + ulimit -l $MAX_LOCKED_MEMORY + fi + if [ -n "$WORK_DIR" ]; then + mkdir -p "$WORK_DIR" + chown "$ES_USER":"$ES_GROUP" "$WORK_DIR" + fi + echo -n $"Starting $prog: " + # if not running, start it up here, usually something like "daemon $exec" + daemon --user $ES_USER --pidfile $pidfile $exec -p $pidfile -Des.default.path.home=$ES_HOME -Des.default.path.logs=$LOG_DIR -Des.default.path.data=$DATA_DIR -Des.default.path.work=$WORK_DIR -Des.default.path.conf=$CONF_DIR + retval=$? + echo + [ $retval -eq 0 ] && touch $lockfile + return $retval +} + +stop() { + echo -n $"Stopping $prog: " + # stop it here, often "killproc $prog" + killproc -p $pidfile $prog + retval=$? + echo + [ $retval -eq 0 ] && rm -f $lockfile + return $retval +} + +restart() { + stop + start +} + +reload() { + restart +} + +force_reload() { + restart +} + +rh_status() { + # run checks to determine if the service is running or use generic status + status -p $pidfile $prog +} + +rh_status_q() { + rh_status >/dev/null 2>&1 +} + + +case "$1" in + start) + rh_status_q && exit 0 + $1 + ;; + stop) + rh_status_q || exit 0 + $1 + ;; + restart) + $1 + ;; + reload) + rh_status_q || exit 7 + $1 + ;; + force-reload) + force_reload + ;; + status) + rh_status + ;; + condrestart|try-restart) + rh_status_q || exit 0 + restart + ;; + *) + echo $"Usage: $0 {start|stop|status|restart|condrestart|try-restart|reload|force-reload}" + exit 2 +esac +exit $? diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/elasticsearch/templates/etc/sysconfig/defaults.erb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/elasticsearch/templates/etc/sysconfig/defaults.erb new file mode 100644 index 00000000000..b4e8af62dce --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/elasticsearch/templates/etc/sysconfig/defaults.erb @@ -0,0 +1,5 @@ +### MANAGED BY PUPPET ### + +<% scope.lookupvar('elasticsearch::init_defaults').sort.map do |key, value| -%> +<%= key %>=<%= value %> +<% end -%> diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/firewall/.fixtures.yml b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/firewall/.fixtures.yml new file mode 100644 index 00000000000..0d10d5cec14 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/firewall/.fixtures.yml @@ -0,0 +1,3 @@ +fixtures: + symlinks: + "firewall": "#{source_dir}" diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/firewall/.nodeset.yml b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/firewall/.nodeset.yml new file mode 100644 index 00000000000..767f9cd2f6e --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/firewall/.nodeset.yml @@ -0,0 +1,31 @@ +--- +default_set: 'centos-64-x64' +sets: + 'centos-59-x64': + nodes: + "main.foo.vm": + prefab: 'centos-59-x64' + 'centos-64-x64': + nodes: + "main.foo.vm": + prefab: 'centos-64-x64' + 'fedora-18-x64': + nodes: + "main.foo.vm": + prefab: 'fedora-18-x64' + 'debian-607-x64': + nodes: + "main.foo.vm": + prefab: 'debian-607-x64' + 'debian-70rc1-x64': + nodes: + "main.foo.vm": + prefab: 'debian-70rc1-x64' + 'ubuntu-server-10044-x64': + nodes: + "main.foo.vm": + prefab: 'ubuntu-server-10044-x64' + 'ubuntu-server-12042-x64': + nodes: + "main.foo.vm": + prefab: 'ubuntu-server-12042-x64' diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/firewall/.travis.yml b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/firewall/.travis.yml new file mode 100644 index 00000000000..0e94c2876c5 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/firewall/.travis.yml @@ -0,0 +1,29 @@ +--- +language: ruby +bundler_args: --without development +script: "bundle exec rake ci SPEC_OPTS='--format documentation'" +rvm: + - 1.8.7 + - 1.9.3 + - 2.0.0 +env: + - PUPPET_GEM_VERSION="~> 2.7.0" + - PUPPET_GEM_VERSION="~> 3.0.0" + - PUPPET_GEM_VERSION="~> 3.1.0" + - PUPPET_GEM_VERSION="~> 3.2.0" + - PUPPET_GEM_VERSION="~> 3.4.0" +matrix: + fast_finish: true + exclude: + - rvm: 1.9.3 + env: PUPPET_GEM_VERSION="~> 2.7.0" + - rvm: 2.0.0 + env: PUPPET_GEM_VERSION="~> 2.7.0" + - rvm: 2.0.0 + env: PUPPET_GEM_VERSION="~> 3.0.0" + - rvm: 2.0.0 + env: PUPPET_GEM_VERSION="~> 3.1.0" + - rvm: 1.8.7 + env: PUPPET_GEM_VERSION="~> 3.2.0" +notifications: + email: false diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/firewall/CHANGELOG.md b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/firewall/CHANGELOG.md new file mode 100644 index 00000000000..daf390e98d3 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/firewall/CHANGELOG.md @@ -0,0 +1,432 @@ +## 2014-05-16 Release 1.1.1 +###Summary + +This release reverts the alphabetical ordering of 1.1.0. We found this caused +a regression in the Openstack modules so in the interest of safety we have +removed this for now. + +## 2014-05-13 Release 1.1.0 +###Summary + +This release has a significant change from previous releases; we now apply the +firewall resources alphabetically by default, removing the need to create pre +and post classes just to enforce ordering. It only effects default ordering +and further information can be found in the README about this. Please test +this in development before rolling into production out of an abundance of +caution. + +We've also added `mask` which is required for --recent in recent (no pun +intended) versions of iptables, as well as connlimit and connmark. This +release has been validated against Ubuntu 14.04 and RHEL7 and should be fully +working on those platforms. + +####Features + +- Apply firewall resources alphabetically. +- Add support for connlimit and connmark. +- Add `mask` as a parameter. (Used exclusively with the recent parameter). + +####Bugfixes + +- Add systemd support for RHEL7. +- Replace &&'s with the correct and in manifests. +- Fix tests on Trusty and RHEL7 +- Fix for Fedora Rawhide. +- Fix boolean flag tests. +- Fix DNAT->SNAT typo in an error message. + +####Known Bugs + +* For Oracle, the `owner` and `socket` parameters require a workaround to function. Please see the Limitations section of the README. + + +## 2014-03-04 Supported Release 1.0.2 +###Summary + +This is a supported release. This release removes a testing symlink that can +cause trouble on systems where /var is on a seperate filesystem from the +modulepath. + +####Features +####Bugfixes +####Known Bugs + +* For Oracle, the `owner` and `socket` parameters require a workaround to function. Please see the Limitations section of the README. + +### Supported release - 2014-03-04 1.0.1 + +####Summary + +An important bugfix was made to the offset calculation for unmanaged rules +to handle rules with 9000+ in the name. + +####Features + +####Bugfixes +- Offset calculations assumed unmanaged rules were numbered 9000+. +- Gracefully fail to manage ip6tables on iptables 1.3.x + +####Known Bugs + +* For Oracle, the `owner` and `socket` parameters require a workaround to function. Please see the Limitations section of the README. + +--- +### 1.0.0 - 2014-02-11 + +No changes, just renumbering to 1.0.0. + +--- +### 0.5.0 - 2014-02-10 + +##### Summary: +This is a bigger release that brings in "recent" connection limiting (think +"port knocking"), firewall chain purging on a per-chain/per-table basis, and +support for a few other use cases. This release also fixes a major bug which +could cause modifications to the wrong rules when unmanaged rules are present. + +##### New Features: +* Add "recent" limiting via parameters `rdest`, `reap`, `recent`, `rhitcount`, + `rname`, `rseconds`, `rsource`, and `rttl` +* Add negation support for source and destination +* Add per-chain/table purging support to `firewallchain` +* IPv4 specific + * Add random port forwarding support + * Add ipsec policy matching via `ipsec_dir` and `ipsec_policy` +* IPv6 specific + * Add support for hop limiting via `hop_limit` parameter + * Add fragmentation matchers via `ishasmorefrags`, `islastfrag`, and `isfirstfrag` + * Add support for conntrack stateful firewall matching via `ctstate` + +##### Bugfixes: +- Boolean fixups allowing false values +- Better detection of unmanaged rules +- Fix multiport rule detection +- Fix sport/dport rule detection +- Make INPUT, OUTPUT, and FORWARD not autorequired for firewall chain filter +- Allow INPUT with the nat table +- Fix `src_range` & `dst_range` order detection +- Documentation clarifications +- Fixes to spec tests + +--------------------------------------- + +### 0.4.2 - 2013-09-10 + +Another attempt to fix the packaging issue. We think we understand exactly +what is failing and this should work properly for the first time. + +--------------------------------------- + +### 0.4.1 - 2013-08-09 + +Bugfix release to fix a packaging issue that may have caused puppet module +install commands to fail. + +--------------------------------------- + +### 0.4.0 - 2013-07-11 + +This release adds support for address type, src/dest ip ranges, and adds +additional testing and bugfixes. + +#### Features +* Add `src_type` and `dst_type` attributes (Nick Stenning) +* Add `src_range` and `dst_range` attributes (Lei Zhang) +* Add SL and SLC operatingsystems as supported (Steve Traylen) + +#### Bugfixes +* Fix parser for bursts other than 5 (Chris Rutter) +* Fix parser for -f in --comment (Georg Koester) +* Add doc headers to class files (Dan Carley) +* Fix lint warnings/errors (Wolf Noble) + +--------------------------------------- + +### 0.3.1 - 2013/6/10 + +This minor release provides some bugfixes and additional tests. + +#### Changes + +* Update tests for rspec-system-puppet 2 (Ken Barber) +* Update rspec-system tests for rspec-system-puppet 1.5 (Ken Barber) +* Ensure all services have 'hasstatus => true' for Puppet 2.6 (Ken Barber) +* Accept pre-existing rule with invalid name (Joe Julian) +* Swap log_prefix and log_level order to match the way it's saved (Ken Barber) +* Fix log test to replicate bug #182 (Ken Barber) +* Split argments while maintaining quoted strings (Joe Julian) +* Add more log param tests (Ken Barber) +* Add extra tests for logging parameters (Ken Barber) +* Clarify OS support (Ken Barber) + +--------------------------------------- + +### 0.3.0 - 2013/4/25 + +This release introduces support for Arch Linux and extends support for Fedora 15 and up. There are also lots of bugs fixed and improved testing to prevent regressions. + +##### Changes + +* Fix error reporting for insane hostnames (Tomas Doran) +* Support systemd on Fedora 15 and up (Eduardo Gutierrez) +* Move examples to docs (Ken Barber) +* Add support for Arch Linux platform (Ingmar Steen) +* Add match rule for fragments (Georg Koester) +* Fix boolean rules being recognized as changed (Georg Koester) +* Same rules now get deleted (Anastasis Andronidis) +* Socket params test (Ken Barber) +* Ensure parameter can disable firewall (Marc Tardif) + +--------------------------------------- + +### 0.2.1 - 2012/3/13 + +This maintenance release introduces the new README layout, and fixes a bug with iptables_persistent_version. + +##### Changes + +* (GH-139) Throw away STDERR from dpkg-query in Fact +* Update README to be consistent with module documentation template +* Fix failing spec tests due to dpkg change in iptables_persistent_version + +--------------------------------------- + +### 0.2.0 - 2012/3/3 + +This release introduces automatic persistence, removing the need for the previous manual dependency requirement for persistent the running rules to the OS persistence file. + +Previously you would have required the following in your site.pp (or some other global location): + + # Always persist firewall rules + exec { 'persist-firewall': + command => $operatingsystem ? { + 'debian' => '/sbin/iptables-save > /etc/iptables/rules.v4', + /(RedHat|CentOS)/ => '/sbin/iptables-save > /etc/sysconfig/iptables', + }, + refreshonly => true, + } + Firewall { + notify => Exec['persist-firewall'], + before => Class['my_fw::post'], + require => Class['my_fw::pre'], + } + Firewallchain { + notify => Exec['persist-firewall'], + } + resources { "firewall": + purge => true + } + +You only need: + + class { 'firewall': } + Firewall { + before => Class['my_fw::post'], + require => Class['my_fw::pre'], + } + +To install pre-requisites and to create dependencies on your pre & post rules. Consult the README for more information. + +##### Changes + +* Firewall class manifests (Dan Carley) +* Firewall and firewallchain persistence (Dan Carley) +* (GH-134) Autorequire iptables related packages (Dan Carley) +* Typo in #persist_iptables OS normalisation (Dan Carley) +* Tests for #persist_iptables (Dan Carley) +* (GH-129) Replace errant return in autoreq block (Dan Carley) + +--------------------------------------- + +### 0.1.1 - 2012/2/28 + +This release primarily fixes changing parameters in 3.x + +##### Changes + +* (GH-128) Change method_missing usage to define_method for 3.x compatibility +* Update travis.yml gem specifications to actually test 2.6 +* Change source in Gemfile to use a specific URL for Ruby 2.0.0 compatibility + +--------------------------------------- + +### 0.1.0 - 2012/2/24 + +This release is somewhat belated, so no summary as there are far too many changes this time around. Hopefully we won't fall this far behind again :-). + +##### Changes + +* Add support for MARK target and set-mark property (Johan Huysmans) +* Fix broken call to super for ruby-1.9.2 in munge (Ken Barber) +* simple fix of the error message for allowed values of the jump property (Daniel Black) +* Adding OSPF(v3) protocol to puppetlabs-firewall (Arnoud Vermeer) +* Display multi-value: port, sport, dport and state command seperated (Daniel Black) +* Require jump=>LOG for log params (Daniel Black) +* Reject and document icmp => "any" (Dan Carley) +* add firewallchain type and iptables_chain provider (Daniel Black) +* Various fixes for firewallchain resource (Ken Barber) +* Modify firewallchain name to be chain:table:protocol (Ken Barber) +* Fix allvalidchain iteration (Ken Barber) +* Firewall autorequire Firewallchains (Dan Carley) +* Tests and docstring for chain autorequire (Dan Carley) +* Fix README so setup instructions actually work (Ken Barber) +* Support vlan interfaces (interface containing ".") (Johan Huysmans) +* Add tests for VLAN support for iniface/outiface (Ken Barber) +* Add the table when deleting rules (Johan Huysmans) +* Fix tests since we are now prefixing -t) +* Changed 'jump' to 'action', commands to lower case (Jason Short) +* Support interface names containing "+" (Simon Deziel) +* Fix for when iptables-save spews out "FATAL" errors (Sharif Nassar) +* Fix for incorrect limit command arguments for ip6tables provider (Michael Hsu) +* Document Util::Firewall.host_to_ip (Dan Carley) +* Nullify addresses with zero prefixlen (Dan Carley) +* Add support for --tcp-flags (Thomas Vander Stichele) +* Make tcp_flags support a feature (Ken Barber) +* OUTPUT is a valid chain for the mangle table (Adam Gibbins) +* Enable travis-ci support (Ken Barber) +* Convert an existing test to CIDR (Dan Carley) +* Normalise iptables-save to CIDR (Dan Carley) +* be clearer about what distributions we support (Ken Barber) +* add gre protocol to list of acceptable protocols (Jason Hancock) +* Added pkttype property (Ashley Penney) +* Fix mark to not repeat rules with iptables 1.4.1+ (Sharif Nassar) +* Stub iptables_version for now so tests run on non-Linux hosts (Ken Barber) +* Stub iptables facts for set_mark tests (Dan Carley) +* Update formatting of README to meet Puppet Labs best practices (Will Hopper) +* Support for ICMP6 type code resolutions (Dan Carley) +* Insert order hash included chains from different tables (Ken Barber) +* rspec 2.11 compatibility (Jonathan Boyett) +* Add missing class declaration in README (sfozz) +* array_matching is contraindicated (Sharif Nassar) +* Convert port Fixnum into strings (Sharif Nassar) +* Update test framework to the modern age (Ken Barber) +* working with ip6tables support (wuwx) +* Remove gemfile.lock and add to gitignore (William Van Hevelingen) +* Update travis and gemfile to be like stdlib travis files (William Van Hevelingen) +* Add support for -m socket option (Ken Barber) +* Add support for single --sport and --dport parsing (Ken Barber) +* Fix tests for Ruby 1.9.3 from 3e13bf3 (Dan Carley) +* Mock Resolv.getaddress in #host_to_ip (Dan Carley) +* Update docs for source and dest - they are not arrays (Ken Barber) + +--------------------------------------- + +### 0.0.4 - 2011/12/05 + +This release adds two new parameters, 'uid' and 'gid'. As a part of the owner module, these params allow you to specify a uid, username, gid, or group got a match: + + firewall { '497 match uid': + port => '123', + proto => 'mangle', + chain => 'OUTPUT', + action => 'drop' + uid => '123' + } + +This release also adds value munging for the 'log_level', 'source', and 'destination' parameters. The 'source' and 'destination' now support hostnames: + + firewall { '498 accept from puppetlabs.com': + port => '123', + proto => 'tcp', + source => 'puppetlabs.com', + action => 'accept' + } + + +The 'log_level' parameter now supports using log level names, such as 'warn', 'debug', and 'panic': + + firewall { '499 logging': + port => '123', + proto => 'udp', + log_level => 'debug', + action => 'drop' + } + +Additional changes include iptables and ip6tables version facts, general whitespace cleanup, and adding additional unit tests. + +##### Changes + +* (#10957) add iptables_version and ip6tables_version facts +* (#11093) Improve log_level property so it converts names to numbers +* (#10723) Munge hostnames and IPs to IPs with CIDR +* (#10718) Add owner-match support +* (#10997) Add fixtures for ipencap +* (#11034) Whitespace cleanup +* (#10690) add port property support to ip6tables + +--------------------------------------- + +### 0.0.3 - 2011/11/12 + +This release introduces a new parameter 'port' which allows you to set both +source and destination ports for a match: + + firewall { "500 allow NTP requests": + port => "123", + proto => "udp", + action => "accept", + } + +We also have the limit parameter finally working: + + firewall { "500 limit HTTP requests": + dport => 80, + proto => tcp, + limit => "60/sec", + burst => 30, + action => accept, + } + +State ordering has been fixed now, and more characters are allowed in the +namevar: + +* Alphabetical +* Numbers +* Punctuation +* Whitespace + +##### Changes + +* (#10693) Ensure -m limit is added for iptables when using 'limit' param +* (#10690) Create new port property +* (#10700) allow additional characters in comment string +* (#9082) Sort iptables --state option values internally to keep it consistent across runs +* (#10324) Remove extraneous whitespace from iptables rule line in spec tests + +--------------------------------------- + +### 0.0.2 - 2011/10/26 + +This is largely a maintanence and cleanup release, but includes the ability to +specify ranges of ports in the sport/dport parameter: + + firewall { "500 allow port range": + dport => ["3000-3030","5000-5050"], + sport => ["1024-65535"], + action => "accept", + } + +##### Changes + +* (#10295) Work around bug #4248 whereby the puppet/util paths are not being loaded correctly on the puppetmaster +* (#10002) Change to dport and sport to handle ranges, and fix handling of name to name to port +* (#10263) Fix tests on Puppet 2.6.x +* (#10163) Cleanup some of the inline documentation and README file to align with general forge usage + +--------------------------------------- + +### 0.0.1 - 2011/10/18 + +Initial release. + +##### Changes + +* (#9362) Create action property and perform transformation for accept, drop, reject value for iptables jump parameter +* (#10088) Provide a customised version of CONTRIBUTING.md +* (#10026) Re-arrange provider and type spec files to align with Puppet +* (#10026) Add aliases for test,specs,tests to Rakefile and provide -T as default +* (#9439) fix parsing and deleting existing rules +* (#9583) Fix provider detection for gentoo and unsupported linuxes for the iptables provider +* (#9576) Stub provider so it works properly outside of Linux +* (#9576) Align spec framework with Puppet core +* and lots of other earlier development tasks ... diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/firewall/CONTRIBUTING.md b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/firewall/CONTRIBUTING.md new file mode 100644 index 00000000000..630ba8581eb --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/firewall/CONTRIBUTING.md @@ -0,0 +1,87 @@ +# How to contribute + +Third-party patches are essential for keeping puppet great. We simply can't +access the huge number of platforms and myriad configurations for running +puppet. We want to keep it as easy as possible to contribute changes that +get things working in your environment. There are a few guidelines that we +need contributors to follow so that we can have a chance of keeping on +top of things. + +## Getting Started + +* Make sure you have a [Jira account](http://tickets.puppetlabs.com) +* Make sure you have a [GitHub account](https://github.com/signup/free) +* Submit a ticket for your issue, assuming one does not already exist. + * Clearly describe the issue including steps to reproduce when it is a bug. + * Make sure you fill in the earliest version that you know has the issue. +* Fork the repository on GitHub + +## Making Changes + +* Create a topic branch from where you want to base your work. + * This is usually the master branch. + * Only target release branches if you are certain your fix must be on that + branch. + * To quickly create a topic branch based on master; `git branch + fix/master/my_contribution master` then checkout the new branch with `git + checkout fix/master/my_contribution`. Please avoid working directly on the + `master` branch. +* Make commits of logical units. +* Check for unnecessary whitespace with `git diff --check` before committing. +* Make sure your commit messages are in the proper format. + +```` + (MODULES-1234) Make the example in CONTRIBUTING imperative and concrete + + Without this patch applied the example commit message in the CONTRIBUTING + document is not a concrete example. This is a problem because the + contributor is left to imagine what the commit message should look like + based on a description rather than an example. This patch fixes the + problem by making the example concrete and imperative. + + The first line is a real life imperative statement with a ticket number + from our issue tracker. The body describes the behavior without the patch, + why this is a problem, and how the patch fixes the problem when applied. +```` + +* Make sure you have added the necessary tests for your changes. +* Run _all_ the tests to assure nothing else was accidentally broken. + +## Making Trivial Changes + +### Documentation + +For changes of a trivial nature to comments and documentation, it is not +always necessary to create a new ticket in Jira. In this case, it is +appropriate to start the first line of a commit with '(doc)' instead of +a ticket number. + +```` + (doc) Add documentation commit example to CONTRIBUTING + + There is no example for contributing a documentation commit + to the Puppet repository. This is a problem because the contributor + is left to assume how a commit of this nature may appear. + + The first line is a real life imperative statement with '(doc)' in + place of what would have been the ticket number in a + non-documentation related commit. The body describes the nature of + the new documentation or comments added. +```` + +## Submitting Changes + +* Sign the [Contributor License Agreement](http://links.puppetlabs.com/cla). +* Push your changes to a topic branch in your fork of the repository. +* Submit a pull request to the repository in the puppetlabs organization. +* Update your Jira ticket to mark that you have submitted code and are ready for it to be reviewed (Status: Ready for Merge). + * Include a link to the pull request in the ticket. + +# Additional Resources + +* [More information on contributing](http://projects.puppetlabs.com/projects/module-site/wiki/Module_contributing) +* [Bug tracker (Jira)](http://tickets.puppetlabs.com) +* [Contributor License Agreement](http://links.puppetlabs.com/cla) +* [General GitHub documentation](http://help.github.com/) +* [GitHub pull request documentation](http://help.github.com/send-pull-requests/) +* #puppet-dev IRC channel on freenode.org diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/firewall/Gemfile b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/firewall/Gemfile new file mode 100644 index 00000000000..9e6eaa54163 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/firewall/Gemfile @@ -0,0 +1,18 @@ +source ENV['GEM_SOURCE'] || "https://rubygems.org" + +group :development, :test do + gem 'puppetlabs_spec_helper', :require => false + gem 'rspec-puppet', :require => false + gem 'serverspec', :require => false + gem 'beaker-rspec', :require => false + gem 'puppet-lint', :require => false + gem 'pry', :require => false +end + +if puppetversion = ENV['PUPPET_GEM_VERSION'] + gem 'puppet', puppetversion, :require => false +else + gem 'puppet', :require => false +end + +# vim:ft=ruby diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/firewall/LICENSE b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/firewall/LICENSE new file mode 100644 index 00000000000..1d196fc30c9 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/firewall/LICENSE @@ -0,0 +1,25 @@ +Puppet Firewall Module - Puppet module for managing Firewalls + +Copyright (C) 2011-2013 Puppet Labs, Inc. +Copyright (C) 2011 Jonathan Boyett +Copyright (C) 2011 Media Temple, Inc. + +Some of the iptables code was taken from puppet-iptables which was: + +Copyright (C) 2011 Bob.sh Limited +Copyright (C) 2008 Camptocamp Association +Copyright (C) 2007 Dmitri Priimak + +Puppet Labs can be contacted at: info@puppetlabs.com + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/firewall/Modulefile b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/firewall/Modulefile new file mode 100644 index 00000000000..975614762f8 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/firewall/Modulefile @@ -0,0 +1,8 @@ +name 'puppetlabs-firewall' +version '1.1.1' +source 'git://github.com/puppetlabs/puppetlabs-firewall.git' +author 'puppetlabs' +license 'ASL 2.0' +summary 'Firewall Module' +description 'Manages Firewalls such as iptables' +project_page 'http://forge.puppetlabs.com/puppetlabs/firewall' diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/firewall/README.markdown b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/firewall/README.markdown new file mode 100644 index 00000000000..24705149e78 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/firewall/README.markdown @@ -0,0 +1,429 @@ +#firewall + +[![Build Status](https://travis-ci.org/puppetlabs/puppetlabs-firewall.png?branch=master)](https://travis-ci.org/puppetlabs/puppetlabs-firewall) + +####Table of Contents + +1. [Overview - What is the Firewall module?](#overview) +2. [Module Description - What does the module do?](#module-description) +3. [Setup - The basics of getting started with Firewall](#setup) + * [What Firewall affects](#what-firewall-affects) + * [Setup Requirements](#setup-requirements) + * [Beginning with Firewall](#beginning-with-firewall) + * [Upgrading](#upgrading) +4. [Usage - Configuration and customization options](#usage) + * [Default rules - Setting up general configurations for all firewalls](#default-rules) + * [Application-specific rules - Options for configuring and managing firewalls across applications](#application-specific-rules) + * [Other Rules](#other-rules) +5. [Reference - An under-the-hood peek at what the module is doing](#reference) +6. [Limitations - OS compatibility, etc.](#limitations) +7. [Development - Guide for contributing to the module](#development) + * [Tests - Testing your configuration](#tests) + +##Overview + +The Firewall module lets you manage firewall rules with Puppet. + +##Module Description + +PuppetLabs' Firewall introduces the resource `firewall`, which is used to manage and configure firewall rules from within the Puppet DSL. This module offers support for iptables, ip6tables, and ebtables. + +The module also introduces the resource `firewallchain`, which allows you to manage chains or firewall lists. At the moment, only iptables and ip6tables chains are supported. + +##Setup + +###What Firewall affects: + +* every node running a firewall +* system's firewall settings +* connection settings for managed nodes +* unmanaged resources (get purged) +* site.pp + +###Setup Requirements + +Firewall uses Ruby-based providers, so you must have [pluginsync enabled](http://docs.puppetlabs.com/guides/plugins_in_modules.html#enabling-pluginsync). + +###Beginning with Firewall + +To begin, you need to provide some initial top-scope configuration to ensure your firewall configurations are ordered properly and you do not lock yourself out of your box or lose any configuration. + +Persistence of rules between reboots is handled automatically, although there are known issues with ip6tables on older Debian/Ubuntu, as well as known issues with ebtables. + +In your `site.pp` (or some similarly top-scope file), set up a metatype to purge unmanaged firewall resources. This will clear any existing rules and make sure that only rules defined in Puppet exist on the machine. + + resources { "firewall": + purge => true + } + +Next, set up the default parameters for all of the firewall rules you will be establishing later. These defaults will ensure that the pre and post classes (you will be setting up in just a moment) are run in the correct order to avoid locking you out of your box during the first puppet run. + + Firewall { + before => Class['my_fw::post'], + require => Class['my_fw::pre'], + } + +You also need to declare the `my_fw::pre` & `my_fw::post` classes so that dependencies are satisfied. This can be achieved using an External Node Classifier or the following + + class { ['my_fw::pre', 'my_fw::post']: } + +Finally, you should include the `firewall` class to ensure the correct packages are installed. + + class { 'firewall': } + +Now to create the `my_fw::pre` and `my_fw::post` classes. Firewall acts on your running firewall, making immediate changes as the catalog executes. Defining default pre and post rules allows you provide global defaults for your hosts before and after any custom rules; it is also required to avoid locking yourself out of your own boxes when Puppet runs. This approach employs a whitelist setup, so you can define what rules you want and everything else is ignored rather than removed. + +The `pre` class should be located in `my_fw/manifests/pre.pp` and should contain any default rules to be applied first. + + class my_fw::pre { + Firewall { + require => undef, + } + + # Default firewall rules + firewall { '000 accept all icmp': + proto => 'icmp', + action => 'accept', + }-> + firewall { '001 accept all to lo interface': + proto => 'all', + iniface => 'lo', + action => 'accept', + }-> + firewall { '002 accept related established rules': + proto => 'all', + state => ['RELATED', 'ESTABLISHED'], + action => 'accept', + } + } + +The rules in `pre` should allow basic networking (such as ICMP and TCP), as well as ensure that existing connections are not closed. + +The `post` class should be located in `my_fw/manifests/post.pp` and include any default rules to be applied last. + + class my_fw::post { + firewall { '999 drop all': + proto => 'all', + action => 'drop', + before => undef, + } + } + +To put it all together: the `require` parameter in `Firewall {}` ensures `my_fw::pre` is run before any other rules and the `before` parameter ensures `my_fw::post` is run after any other rules. So the run order is: + +* run the rules in `my_fw::pre` +* run your rules (defined in code) +* run the rules in `my_fw::post` + +###Upgrading + +####Upgrading from version 0.2.0 and newer + +Upgrade the module with the puppet module tool as normal: + + puppet module upgrade puppetlabs/firewall + +####Upgrading from version 0.1.1 and older + +Start by upgrading the module using the puppet module tool: + + puppet module upgrade puppetlabs/firewall + +Previously, you would have required the following in your `site.pp` (or some other global location): + + # Always persist firewall rules + exec { 'persist-firewall': + command => $operatingsystem ? { + 'debian' => '/sbin/iptables-save > /etc/iptables/rules.v4', + /(RedHat|CentOS)/ => '/sbin/iptables-save > /etc/sysconfig/iptables', + }, + refreshonly => true, + } + Firewall { + notify => Exec['persist-firewall'], + before => Class['my_fw::post'], + require => Class['my_fw::pre'], + } + Firewallchain { + notify => Exec['persist-firewall'], + } + resources { "firewall": + purge => true + } + +With the latest version, we now have in-built persistence, so this is no longer needed. However, you will still need some basic setup to define pre & post rules. + + resources { "firewall": + purge => true + } + Firewall { + before => Class['my_fw::post'], + require => Class['my_fw::pre'], + } + class { ['my_fw::pre', 'my_fw::post']: } + class { 'firewall': } + +Consult the the documentation below for more details around the classes `my_fw::pre` and `my_fw::post`. + +##Usage + +There are two kinds of firewall rules you can use with Firewall: default rules and application-specific rules. Default rules apply to general firewall settings, whereas application-specific rules manage firewall settings of a specific application, node, etc. + +All rules employ a numbering system in the resource's title that is used for ordering. When titling your rules, make sure you prefix the rule with a number. + + 000 this runs first + 999 this runs last + +###Default rules + +You can place default rules in either `my_fw::pre` or `my_fw::post`, depending on when you would like them to run. Rules placed in the `pre` class will run first, rules in the `post` class, last. + +Depending on the provider, the title of the rule can be stored using the comment feature of the underlying firewall subsystem. Values can match `/^\d+[[:alpha:][:digit:][:punct:][:space:]]+$/`. + +####Examples of default rules + +Basic accept ICMP request example: + + firewall { "000 accept all icmp requests": + proto => "icmp", + action => "accept", + } + +Drop all: + + firewall { "999 drop all other requests": + action => "drop", + } + +###Application-specific rules + +Puppet doesn't care where you define rules, and this means that you can place +your firewall resources as close to the applications and services that you +manage as you wish. If you use the [roles and profiles +pattern](https://puppetlabs.com/learn/roles-profiles-introduction) then it +would make sense to create your firewall rules in the profiles, so that they +remain close to the services managed by the profile. + +An example of this might be: + +```puppet +class profile::apache { + include apache + apache::vhost { 'mysite': ensure => present } + + firewall { '100 allow http and https access': + port => [80, 443], + proto => tcp, + action => accept, + } +} +``` + + +However, if you're not using that pattern then you can place them directly into +the individual module that manages a service, such as: + +```puppet +class apache { + firewall { '100 allow http and https access': + port => [80, 443], + proto => tcp, + action => accept, + } + # ... the rest of your code ... +} +``` + +This means if someone includes either the profile: + +```puppet +include profile::apache +``` + +Or the module, if you're not using roles and profiles: + +```puppet + include ::apache +``` + +Then they would automatically get appropriate firewall rules. + +###Other rules + +You can also apply firewall rules to specific nodes. Usually, you will want to put the firewall rule in another class and apply that class to a node. But you can apply a rule to a node. + + node 'foo.bar.com' { + firewall { '111 open port 111': + dport => 111 + } + } + +You can also do more complex things with the `firewall` resource. Here we are doing some NAT configuration. + + firewall { '100 snat for network foo2': + chain => 'POSTROUTING', + jump => 'MASQUERADE', + proto => 'all', + outiface => "eth0", + source => '10.1.2.0/24', + table => 'nat', + } + +In the below example, we are creating a new chain and forwarding any port 5000 access to it. + + firewall { '100 forward to MY_CHAIN': + chain => 'INPUT', + jump => 'MY_CHAIN', + } + # The namevar here is in the format chain_name:table:protocol + firewallchain { 'MY_CHAIN:filter:IPv4': + ensure => present, + } + firewall { '100 my rule': + chain => 'MY_CHAIN', + action => 'accept', + proto => 'tcp', + dport => 5000, + } + +###Additional Information + +You can access the inline documentation: + + puppet describe firewall + +Or + + puppet doc -r type + (and search for firewall) + +##Reference + +Classes: + +* [firewall](#class-firewall) + +Types: + +* [firewall](#type-firewall) +* [firewallchain](#type-firewallchain) + +Facts: + +* [ip6tables_version](#fact-ip6tablesversion) +* [iptables_version](#fact-iptablesversion) +* [iptables_persistent_version](#fact-iptablespersistentversion) + +###Class: firewall + +This class is provided to do the basic setup tasks required for using the firewall resources. + +At the moment this takes care of: + +* iptables-persistent package installation + +You should include the class for nodes that need to use the resources in this module. For example + + class { 'firewall': } + +####`ensure` + +Indicates the state of `iptables` on your system, allowing you to disable `iptables` if desired. + +Can either be `running` or `stopped`. Default to `running`. + +###Type: firewall + +This type provides the capability to manage firewall rules within puppet. + +For more documentation on the type, access the 'Types' tab on the Puppet Labs Forge: + + + +###Type:: firewallchain + +This type provides the capability to manage rule chains for firewalls. + +For more documentation on the type, access the 'Types' tab on the Puppet Labs Forge: + + + +###Fact: ip6tables_version + +The module provides a Facter fact that can be used to determine what the default version of ip6tables is for your operating system/distribution. + +###Fact: iptables_version + +The module provides a Facter fact that can be used to determine what the default version of iptables is for your operating system/distribution. + +###Fact: iptables_persistent_version + +Retrieves the version of iptables-persistent from your OS. This is a Debian/Ubuntu specific fact. + +##Limitations + +###SLES + +The `socket` parameter is not supported on SLES. In this release it will cause +the catalog to fail with iptables failures, rather than correctly warn you that +the features are unusable. + +###Oracle Enterprise Linux + +The `socket` and `owner` parameters are unsupported on Oracle Enterprise Linux +when the "Unbreakable" kernel is used. These may function correctly when using +the stock RedHat kernel instead. Declaring either of these parameters on an +unsupported system will result in iptable rules failing to apply. + +###Other + +Bugs can be reported using JIRA issues + + + +##Development + +Puppet Labs modules on the Puppet Forge are open projects, and community contributions are essential for keeping them great. We can’t access the huge number of platforms and myriad of hardware, software, and deployment configurations that Puppet is intended to serve. + +We want to keep it as easy as possible to contribute changes so that our modules work in your environment. There are a few guidelines that we need contributors to follow so that we can have a chance of keeping on top of things. + +You can read the complete module contribution guide [on the Puppet Labs wiki.](http://projects.puppetlabs.com/projects/module-site/wiki/Module_contributing) + +For this particular module, please also read CONTRIBUTING.md before contributing. + +Currently we support: + +* iptables +* ip6tables +* ebtables (chains only) + +But plans are to support lots of other firewall implementations: + +* FreeBSD (ipf) +* Mac OS X (ipfw) +* OpenBSD (pf) +* Cisco (ASA and basic access lists) + +If you have knowledge in these technologies, know how to code, and wish to contribute to this project, we would welcome the help. + +###Testing + +Make sure you have: + +* rake +* bundler + +Install the necessary gems: + + bundle install + +And run the tests from the root of the source code: + + rake test + +If you have a copy of Vagrant 1.1.0 you can also run the system tests: + + RSPEC_SET=debian-606-x64 rake spec:system + RSPEC_SET=centos-58-x64 rake spec:system + +*Note:* system testing is fairly alpha at this point, your mileage may vary. diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/firewall/Rakefile b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/firewall/Rakefile new file mode 100644 index 00000000000..8b12070304c --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/firewall/Rakefile @@ -0,0 +1,14 @@ +require 'puppetlabs_spec_helper/rake_tasks' + +require 'puppet-lint/tasks/puppet-lint' +PuppetLint.configuration.ignore_paths = ['vendor/**/*.pp'] + +task :default do + sh %{rake -T} +end + +desc 'Run reasonably quick tests for CI' +task :ci => [ + :lint, + :spec, +] diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/firewall/lib/facter/ip6tables_version.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/firewall/lib/facter/ip6tables_version.rb new file mode 100644 index 00000000000..3dce27f70cb --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/firewall/lib/facter/ip6tables_version.rb @@ -0,0 +1,11 @@ +Facter.add(:ip6tables_version) do + confine :kernel => :linux + setcode do + version = Facter::Util::Resolution.exec('ip6tables --version') + if version + version.match(/\d+\.\d+\.\d+/).to_s + else + nil + end + end +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/firewall/lib/facter/iptables_persistent_version.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/firewall/lib/facter/iptables_persistent_version.rb new file mode 100644 index 00000000000..80bf9dea1a4 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/firewall/lib/facter/iptables_persistent_version.rb @@ -0,0 +1,15 @@ +Facter.add(:iptables_persistent_version) do + confine :operatingsystem => %w{Debian Ubuntu} + setcode do + # Throw away STDERR because dpkg >= 1.16.7 will make some noise if the + # package isn't currently installed. + cmd = "dpkg-query -Wf '${Version}' iptables-persistent 2>/dev/null" + version = Facter::Util::Resolution.exec(cmd) + + if version.nil? or !version.match(/\d+\.\d+/) + nil + else + version + end + end +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/firewall/lib/facter/iptables_version.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/firewall/lib/facter/iptables_version.rb new file mode 100644 index 00000000000..6f7ae564740 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/firewall/lib/facter/iptables_version.rb @@ -0,0 +1,11 @@ +Facter.add(:iptables_version) do + confine :kernel => :linux + setcode do + version = Facter::Util::Resolution.exec('iptables --version') + if version + version.match(/\d+\.\d+\.\d+/).to_s + else + nil + end + end +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/firewall/lib/puppet/provider/firewall.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/firewall/lib/puppet/provider/firewall.rb new file mode 100644 index 00000000000..c6b0b10bb13 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/firewall/lib/puppet/provider/firewall.rb @@ -0,0 +1,34 @@ +class Puppet::Provider::Firewall < Puppet::Provider + + # Prefetch our rule list. This is ran once every time before any other + # action (besides initialization of each object). + def self.prefetch(resources) + debug("[prefetch(resources)]") + instances.each do |prov| + if resource = resources[prov.name] || resources[prov.name.downcase] + resource.provider = prov + end + end + end + + # Look up the current status. This allows us to conventiently look up + # existing status with properties[:foo]. + def properties + if @property_hash.empty? + @property_hash = query || {:ensure => :absent} + @property_hash[:ensure] = :absent if @property_hash.empty? + end + @property_hash.dup + end + + # Pull the current state of the list from the full list. We're + # getting some double entendre here.... + def query + self.class.instances.each do |instance| + if instance.name == self.name or instance.name.downcase == self.name + return instance.properties + end + end + nil + end +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/firewall/lib/puppet/provider/firewall/ip6tables.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/firewall/lib/puppet/provider/firewall/ip6tables.rb new file mode 100644 index 00000000000..e1ce01af6ab --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/firewall/lib/puppet/provider/firewall/ip6tables.rb @@ -0,0 +1,136 @@ +Puppet::Type.type(:firewall).provide :ip6tables, :parent => :iptables, :source => :iptables do + @doc = "Ip6tables type provider" + + has_feature :iptables + has_feature :connection_limiting + has_feature :hop_limiting + has_feature :rate_limiting + has_feature :recent_limiting + has_feature :snat + has_feature :dnat + has_feature :interface_match + has_feature :icmp_match + has_feature :owner + has_feature :state_match + has_feature :reject_type + has_feature :log_level + has_feature :log_prefix + has_feature :mark + has_feature :tcp_flags + has_feature :pkttype + has_feature :ishasmorefrags + has_feature :islastfrag + has_feature :isfirstfrag + + optional_commands({ + :ip6tables => 'ip6tables', + :ip6tables_save => 'ip6tables-save', + }) + + def initialize(*args) + if Facter.fact('ip6tables_version').value.match /1\.3\.\d/ + raise ArgumentError, 'The ip6tables provider is not supported on version 1.3 of iptables' + else + super + end + end + + def self.iptables(*args) + ip6tables(*args) + end + + def self.iptables_save(*args) + ip6tables_save(*args) + end + + @protocol = "IPv6" + + @resource_map = { + :burst => "--limit-burst", + :connlimit_above => "-m connlimit --connlimit-above", + :connlimit_mask => "--connlimit-mask", + :connmark => "-m connmark --mark", + :ctstate => "-m conntrack --ctstate", + :destination => "-d", + :dport => "-m multiport --dports", + :gid => "-m owner --gid-owner", + :icmp => "-m icmp6 --icmpv6-type", + :iniface => "-i", + :jump => "-j", + :hop_limit => "-m hl --hl-eq", + :limit => "-m limit --limit", + :log_level => "--log-level", + :log_prefix => "--log-prefix", + :name => "-m comment --comment", + :outiface => "-o", + :port => '-m multiport --ports', + :proto => "-p", + :rdest => "--rdest", + :reap => "--reap", + :recent => "-m recent", + :reject => "--reject-with", + :rhitcount => "--hitcount", + :rname => "--name", + :rseconds => "--seconds", + :rsource => "--rsource", + :rttl => "--rttl", + :source => "-s", + :state => "-m state --state", + :sport => "-m multiport --sports", + :table => "-t", + :todest => "--to-destination", + :toports => "--to-ports", + :tosource => "--to-source", + :uid => "-m owner --uid-owner", + :pkttype => "-m pkttype --pkt-type", + :ishasmorefrags => "-m frag --fragid 0 --fragmore", + :islastfrag => "-m frag --fragid 0 --fraglast", + :isfirstfrag => "-m frag --fragid 0 --fragfirst", + } + + # These are known booleans that do not take a value, but we want to munge + # to true if they exist. + @known_booleans = [:ishasmorefrags, :islastfrag, :isfirstfrag, :rsource, :rdest, :reap, :rttl] + + # Create property methods dynamically + (@resource_map.keys << :chain << :table << :action).each do |property| + if @known_booleans.include?(property) then + # The boolean properties default to '' which should be read as false + define_method "#{property}" do + @property_hash[property] = :false if @property_hash[property] == nil + @property_hash[property.to_sym] + end + else + define_method "#{property}" do + @property_hash[property.to_sym] + end + end + + if property == :chain + define_method "#{property}=" do |value| + if @property_hash[:chain] != value + raise ArgumentError, "Modifying the chain for existing rules is not supported." + end + end + else + define_method "#{property}=" do |value| + @property_hash[:needs_change] = true + end + end + end + + # This is the order of resources as they appear in iptables-save output, + # we need it to properly parse and apply rules, if the order of resource + # changes between puppet runs, the changed rules will be re-applied again. + # This order can be determined by going through iptables source code or just tweaking and trying manually + # (Note: on my CentOS 6.4 ip6tables-save returns -m frag on the place + # I put it when calling the command. So compability with manual changes + # not provided with current parser [georg.koester]) + @resource_list = [:table, :source, :destination, :iniface, :outiface, + :proto, :ishasmorefrags, :islastfrag, :isfirstfrag, :gid, :uid, :sport, :dport, + :port, :pkttype, :name, :state, :ctstate, :icmp, :hop_limit, :limit, :burst, + :recent, :rseconds, :reap, :rhitcount, :rttl, :rname, :rsource, :rdest, + :jump, :todest, :tosource, :toports, :log_level, :log_prefix, :reject, + :connlimit_above, :connlimit_mask, :connmark] + +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/firewall/lib/puppet/provider/firewall/iptables.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/firewall/lib/puppet/provider/firewall/iptables.rb new file mode 100644 index 00000000000..5ad10125d7a --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/firewall/lib/puppet/provider/firewall/iptables.rb @@ -0,0 +1,501 @@ +require 'puppet/provider/firewall' +require 'digest/md5' + +Puppet::Type.type(:firewall).provide :iptables, :parent => Puppet::Provider::Firewall do + include Puppet::Util::Firewall + + @doc = "Iptables type provider" + + has_feature :iptables + has_feature :connection_limiting + has_feature :rate_limiting + has_feature :recent_limiting + has_feature :snat + has_feature :dnat + has_feature :interface_match + has_feature :icmp_match + has_feature :owner + has_feature :state_match + has_feature :reject_type + has_feature :log_level + has_feature :log_prefix + has_feature :mark + has_feature :tcp_flags + has_feature :pkttype + has_feature :isfragment + has_feature :socket + has_feature :address_type + has_feature :iprange + has_feature :ipsec_dir + has_feature :ipsec_policy + has_feature :mask + + optional_commands({ + :iptables => 'iptables', + :iptables_save => 'iptables-save', + }) + + defaultfor :kernel => :linux + + iptables_version = Facter.fact('iptables_version').value + if (iptables_version and Puppet::Util::Package.versioncmp(iptables_version, '1.4.1') < 0) + mark_flag = '--set-mark' + else + mark_flag = '--set-xmark' + end + + @protocol = "IPv4" + + @resource_map = { + :burst => "--limit-burst", + :connlimit_above => "-m connlimit --connlimit-above", + :connlimit_mask => "--connlimit-mask", + :connmark => "-m connmark --mark", + :ctstate => "-m conntrack --ctstate", + :destination => "-d", + :dst_type => "-m addrtype --dst-type", + :dst_range => "-m iprange --dst-range", + :dport => ["-m multiport --dports", "--dport"], + :gid => "-m owner --gid-owner", + :icmp => "-m icmp --icmp-type", + :iniface => "-i", + :jump => "-j", + :limit => "-m limit --limit", + :log_level => "--log-level", + :log_prefix => "--log-prefix", + :name => "-m comment --comment", + :outiface => "-o", + :port => '-m multiport --ports', + :proto => "-p", + :random => "--random", + :rdest => "--rdest", + :reap => "--reap", + :recent => "-m recent", + :reject => "--reject-with", + :rhitcount => "--hitcount", + :rname => "--name", + :rseconds => "--seconds", + :rsource => "--rsource", + :rttl => "--rttl", + :set_mark => mark_flag, + :socket => "-m socket", + :source => "-s", + :src_type => "-m addrtype --src-type", + :src_range => "-m iprange --src-range", + :sport => ["-m multiport --sports", "--sport"], + :state => "-m state --state", + :table => "-t", + :tcp_flags => "-m tcp --tcp-flags", + :todest => "--to-destination", + :toports => "--to-ports", + :tosource => "--to-source", + :uid => "-m owner --uid-owner", + :pkttype => "-m pkttype --pkt-type", + :isfragment => "-f", + :ipsec_dir => "-m policy --dir", + :ipsec_policy => "--pol", + :mask => '--mask', + } + + # These are known booleans that do not take a value, but we want to munge + # to true if they exist. + @known_booleans = [ + :isfragment, + :random, + :rdest, + :reap, + :rsource, + :rttl, + :socket + ] + + + # Create property methods dynamically + (@resource_map.keys << :chain << :table << :action).each do |property| + if @known_booleans.include?(property) then + # The boolean properties default to '' which should be read as false + define_method "#{property}" do + @property_hash[property] = :false if @property_hash[property] == nil + @property_hash[property.to_sym] + end + else + define_method "#{property}" do + @property_hash[property.to_sym] + end + end + + if property == :chain + define_method "#{property}=" do |value| + if @property_hash[:chain] != value + raise ArgumentError, "Modifying the chain for existing rules is not supported." + end + end + else + define_method "#{property}=" do |value| + @property_hash[:needs_change] = true + end + end + end + + # This is the order of resources as they appear in iptables-save output, + # we need it to properly parse and apply rules, if the order of resource + # changes between puppet runs, the changed rules will be re-applied again. + # This order can be determined by going through iptables source code or just tweaking and trying manually + @resource_list = [ + :table, :source, :destination, :iniface, :outiface, :proto, :isfragment, + :src_range, :dst_range, :tcp_flags, :gid, :uid, :sport, :dport, :port, + :dst_type, :src_type, :socket, :pkttype, :name, :ipsec_dir, :ipsec_policy, + :state, :ctstate, :icmp, :limit, :burst, :recent, :rseconds, :reap, + :rhitcount, :rttl, :rname, :mask, :rsource, :rdest, :jump, :todest, + :tosource, :toports, :random, :log_prefix, :log_level, :reject, :set_mark, + :connlimit_above, :connlimit_mask, :connmark + ] + + def insert + debug 'Inserting rule %s' % resource[:name] + iptables insert_args + end + + def update + debug 'Updating rule %s' % resource[:name] + iptables update_args + end + + def delete + debug 'Deleting rule %s' % resource[:name] + iptables delete_args + end + + def exists? + properties[:ensure] != :absent + end + + # Flush the property hash once done. + def flush + debug("[flush]") + if @property_hash.delete(:needs_change) + notice("Properties changed - updating rule") + update + end + persist_iptables(self.class.instance_variable_get(:@protocol)) + @property_hash.clear + end + + def self.instances + debug "[instances]" + table = nil + rules = [] + counter = 1 + + # String#lines would be nice, but we need to support Ruby 1.8.5 + iptables_save.split("\n").each do |line| + unless line =~ /^\#\s+|^\:\S+|^COMMIT|^FATAL/ + if line =~ /^\*/ + table = line.sub(/\*/, "") + else + if hash = rule_to_hash(line, table, counter) + rules << new(hash) + counter += 1 + end + end + end + end + rules + end + + def self.rule_to_hash(line, table, counter) + hash = {} + keys = [] + values = line.dup + + #################### + # PRE-PARSE CLUDGING + #################### + + # --tcp-flags takes two values; we cheat by adding " around it + # so it behaves like --comment + values = values.sub(/--tcp-flags (\S*) (\S*)/, '--tcp-flags "\1 \2"') + # we do a similar thing for negated address masks (source and destination). + values = values.sub(/(-\S+) (!)\s?(\S*)/,'\1 "\2 \3"') + # the actual rule will have the ! mark before the option. + values = values.sub(/(!)\s*(-\S+)\s*(\S*)/, '\2 "\1 \3"') + # The match extension for tcp & udp are optional and throws off the @resource_map. + values = values.sub(/-m (tcp|udp) (--(s|d)port|-m multiport)/, '\2') + + # Trick the system for booleans + @known_booleans.each do |bool| + # append "true" because all params are expected to have values + if bool == :isfragment then + # -f requires special matching: + # only replace those -f that are not followed by an l to + # distinguish between -f and the '-f' inside of --tcp-flags. + values = values.sub(/-f(?!l)(?=.*--comment)/, '-f true') + else + values = values.sub(/#{@resource_map[bool]}/, "#{@resource_map[bool]} true") + end + end + + ############ + # Populate parser_list with used value, in the correct order + ############ + map_index={} + @resource_map.each_pair do |map_k,map_v| + [map_v].flatten.each do |v| + ind=values.index(/\s#{v}/) + next unless ind + map_index[map_k]=ind + end + end + # Generate parser_list based on the index of the found option + parser_list=[] + map_index.sort_by{|k,v| v}.each{|mapi| parser_list << mapi.first } + + ############ + # MAIN PARSE + ############ + + # Here we iterate across our values to generate an array of keys + parser_list.reverse.each do |k| + resource_map_key = @resource_map[k] + [resource_map_key].flatten.each do |opt| + if values.slice!(/\s#{opt}/) + keys << k + break + end + end + end + + # Manually remove chain + values.slice!('-A') + keys << :chain + + # Here we generate the main hash + keys.zip(values.scan(/"[^"]*"|\S+/).reverse) { |f, v| hash[f] = v.gsub(/"/, '') } + + ##################### + # POST PARSE CLUDGING + ##################### + + # Normalise all rules to CIDR notation. + [:source, :destination].each do |prop| + next if hash[prop].nil? + m = hash[prop].match(/(!?)\s?(.*)/) + neg = "! " if m[1] == "!" + hash[prop] = "#{neg}#{Puppet::Util::IPCidr.new(m[2]).cidr}" + end + + [:dport, :sport, :port, :state, :ctstate].each do |prop| + hash[prop] = hash[prop].split(',') if ! hash[prop].nil? + end + + # Convert booleans removing the previous cludge we did + @known_booleans.each do |bool| + if hash[bool] != nil then + if hash[bool] != "true" then + raise "Parser error: #{bool} was meant to be a boolean but received value: #{hash[bool]}." + end + end + end + + # Our type prefers hyphens over colons for ranges so ... + # Iterate across all ports replacing colons with hyphens so that ranges match + # the types expectations. + [:dport, :sport, :port].each do |prop| + next unless hash[prop] + hash[prop] = hash[prop].collect do |elem| + elem.gsub(/:/,'-') + end + end + + # States should always be sorted. This ensures that the output from + # iptables-save and user supplied resources is consistent. + hash[:state] = hash[:state].sort unless hash[:state].nil? + hash[:ctstate] = hash[:ctstate].sort unless hash[:ctstate].nil? + + # This forces all existing, commentless rules or rules with invalid comments to be moved + # to the bottom of the stack. + # Puppet-firewall requires that all rules have comments (resource names) and match this + # regex and will fail if a rule in iptables does not have a comment. We get around this + # by appending a high level + if ! hash[:name] + num = 9000 + counter + hash[:name] = "#{num} #{Digest::MD5.hexdigest(line)}" + elsif not /^\d+[[:alpha:][:digit:][:punct:][:space:]]+$/ =~ hash[:name] + num = 9000 + counter + hash[:name] = "#{num} #{/([[:alpha:][:digit:][:punct:][:space:]]+)/.match(hash[:name])[1]}" + end + + # Iptables defaults to log_level '4', so it is omitted from the output of iptables-save. + # If the :jump value is LOG and you don't have a log-level set, we assume it to be '4'. + if hash[:jump] == 'LOG' && ! hash[:log_level] + hash[:log_level] = '4' + end + + # Iptables defaults to burst '5', so it is ommitted from the output of iptables-save. + # If the :limit value is set and you don't have a burst set, we assume it to be '5'. + if hash[:limit] && ! hash[:burst] + hash[:burst] = '5' + end + + hash[:line] = line + hash[:provider] = self.name.to_s + hash[:table] = table + hash[:ensure] = :present + + # Munge some vars here ... + + # Proto should equal 'all' if undefined + hash[:proto] = "all" if !hash.include?(:proto) + + # If the jump parameter is set to one of: ACCEPT, REJECT or DROP then + # we should set the action parameter instead. + if ['ACCEPT','REJECT','DROP'].include?(hash[:jump]) then + hash[:action] = hash[:jump].downcase + hash.delete(:jump) + end + + hash + end + + def insert_args + args = [] + args << ["-I", resource[:chain], insert_order] + args << general_args + args + end + + def update_args + args = [] + args << ["-R", resource[:chain], insert_order] + args << general_args + args + end + + def delete_args + # Split into arguments + line = properties[:line].gsub(/\-A/, '-D').split(/\s(?=(?:[^"]|"[^"]*")*$)/).map{|v| v.gsub(/"/, '')} + line.unshift("-t", properties[:table]) + end + + # This method takes the resource, and attempts to generate the command line + # arguments for iptables. + def general_args + debug "Current resource: %s" % resource.class + + args = [] + resource_list = self.class.instance_variable_get('@resource_list') + resource_map = self.class.instance_variable_get('@resource_map') + known_booleans = self.class.instance_variable_get('@known_booleans') + + resource_list.each do |res| + resource_value = nil + if (resource[res]) then + resource_value = resource[res] + # If socket is true then do not add the value as -m socket is standalone + if known_booleans.include?(res) then + if resource[res] == :true then + resource_value = nil + else + # If the property is not :true then we don't want to add the value + # to the args list + next + end + end + elsif res == :jump and resource[:action] then + # In this case, we are substituting jump for action + resource_value = resource[:action].to_s.upcase + else + next + end + + args << [resource_map[res]].flatten.first.split(' ') + + # On negations, the '!' has to be before the option (eg: "! -d 1.2.3.4") + if resource_value.is_a?(String) and resource_value.sub!(/^!\s*/, '') then + # we do this after adding the 'dash' argument because of ones like "-m multiport --dports", where we want it before the "--dports" but after "-m multiport". + # so we insert before whatever the last argument is + args.insert(-2, '!') + end + + + # For sport and dport, convert hyphens to colons since the type + # expects hyphens for ranges of ports. + if [:sport, :dport, :port].include?(res) then + resource_value = resource_value.collect do |elem| + elem.gsub(/-/, ':') + end + end + + # our tcp_flags takes a single string with comma lists separated + # by space + # --tcp-flags expects two arguments + if res == :tcp_flags + one, two = resource_value.split(' ') + args << one + args << two + elsif resource_value.is_a?(Array) + args << resource_value.join(',') + elsif !resource_value.nil? + args << resource_value + end + end + + args + end + + def insert_order + debug("[insert_order]") + rules = [] + + # Find list of current rules based on chain and table + self.class.instances.each do |rule| + if rule.chain == resource[:chain].to_s and rule.table == resource[:table].to_s + rules << rule.name + end + end + + # No rules at all? Just bail now. + return 1 if rules.empty? + + # Add our rule to the end of the array of known rules + my_rule = resource[:name].to_s + rules << my_rule + + unmanaged_rule_regex = /^9[0-9]{3}\s[a-f0-9]{32}$/ + # Find if this is a new rule or an existing rule, then find how many + # unmanaged rules preceed it. + if rules.length == rules.uniq.length + # This is a new rule so find its ordered location. + new_rule_location = rules.sort.uniq.index(my_rule) + if new_rule_location == 0 + # The rule will be the first rule in the chain because nothing came + # before it. + offset_rule = rules[0] + else + # This rule will come after other managed rules, so find the rule + # immediately preceeding it. + offset_rule = rules.sort.uniq[new_rule_location - 1] + end + else + # This is a pre-existing rule, so find the offset from the original + # ordering. + offset_rule = my_rule + end + # Count how many unmanaged rules are ahead of the target rule so we know + # how much to add to the insert order + unnamed_offset = rules[0..rules.index(offset_rule)].inject(0) do |sum,rule| + # This regex matches the names given to unmanaged rules (a number + # 9000-9999 followed by an MD5 hash). + sum + (rule.match(unmanaged_rule_regex) ? 1 : 0) + end + + # We want our rule to come before unmanaged rules if it's not a 9-rule + if offset_rule.match(unmanaged_rule_regex) and ! my_rule.match(/^9/) + unnamed_offset -= 1 + end + + # Insert our new or updated rule in the correct order of named rules, but + # offset for unnamed rules. + rules.reject{|r|r.match(unmanaged_rule_regex)}.sort.index(my_rule) + 1 + unnamed_offset + end +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/firewall/lib/puppet/provider/firewallchain/iptables_chain.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/firewall/lib/puppet/provider/firewallchain/iptables_chain.rb new file mode 100644 index 00000000000..29fbc1f6b89 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/firewall/lib/puppet/provider/firewallchain/iptables_chain.rb @@ -0,0 +1,178 @@ +Puppet::Type.type(:firewallchain).provide :iptables_chain do + include Puppet::Util::Firewall + + @doc = "Iptables chain provider" + + has_feature :iptables_chain + has_feature :policy + + optional_commands({ + :iptables => 'iptables', + :iptables_save => 'iptables-save', + :ip6tables => 'ip6tables', + :ip6tables_save => 'ip6tables-save', + :ebtables => 'ebtables', + :ebtables_save => 'ebtables-save', + }) + + defaultfor :kernel => :linux + + # chain name is greedy so we anchor from the end. + # [\d+:\d+] doesn't exist on ebtables + Mapping = { + :IPv4 => { + :tables => method(:iptables), + :save => method(:iptables_save), + :re => /^:(.+)\s(\S+)\s\[\d+:\d+\]$/, + }, + :IPv6 => { + :tables => method(:ip6tables), + :save => method(:ip6tables_save), + :re => /^:(.+)\s(\S+)\s\[\d+:\d+\]$/, + }, + :ethernet => { + :tables => method(:ebtables), + :save => method(:ebtables_save), + :re => /^:(.+)\s(\S+)$/, + } + } + InternalChains = /^(PREROUTING|POSTROUTING|BROUTING|INPUT|FORWARD|OUTPUT)$/ + Tables = 'nat|mangle|filter|raw|rawpost|broute' + Nameformat = /^(.+):(#{Tables}):(IP(v[46])?|ethernet)$/ + + def create + allvalidchains do |t, chain, table, protocol| + if chain =~ InternalChains + # can't create internal chains + warning "Attempting to create internal chain #{@resource[:name]}" + end + if properties[:ensure] == protocol + debug "Skipping Inserting chain #{chain} on table #{table} (#{protocol}) already exists" + else + debug "Inserting chain #{chain} on table #{table} (#{protocol}) using #{t}" + t.call ['-t',table,'-N',chain] + unless @resource[:policy].nil? + t.call ['-t',table,'-P',chain,@resource[:policy].to_s.upcase] + end + end + end + end + + def destroy + allvalidchains do |t, chain, table| + if chain =~ InternalChains + # can't delete internal chains + warning "Attempting to destroy internal chain #{@resource[:name]}" + end + debug "Deleting chain #{chain} on table #{table}" + t.call ['-t',table,'-X',chain] + end + end + + def exists? + allvalidchains do |t, chain| + if chain =~ InternalChains + # If the chain isn't present, it's likely because the module isn't loaded. + # If this is true, then we fall into 2 cases + # 1) It'll be loaded on demand + # 2) It won't be loaded on demand, and we throw an error + # This is the intended behavior as it's not the provider's job to load kernel modules + # So we pretend it exists... + return true + end + end + properties[:ensure] == :present + end + + def policy=(value) + return if value == :empty + allvalidchains do |t, chain, table| + p = ['-t',table,'-P',chain,value.to_s.upcase] + debug "[set policy] #{t} #{p}" + t.call p + end + end + + def policy + debug "[get policy] #{@resource[:name]} =#{@property_hash[:policy].to_s.downcase}" + return @property_hash[:policy].to_s.downcase + end + + def self.prefetch(resources) + debug("[prefetch(resources)]") + instances.each do |prov| + if resource = resources[prov.name] + resource.provider = prov + end + end + end + + def flush + debug("[flush]") + persist_iptables(@resource[:name].match(Nameformat)[3]) + # Clear the property hash so we re-initialize with updated values + @property_hash.clear + end + + # Look up the current status. This allows us to conventiently look up + # existing status with properties[:foo]. + def properties + if @property_hash.empty? + @property_hash = query || {:ensure => :absent} + end + @property_hash.dup + end + + # Pull the current state of the list from the full list. + def query + self.class.instances.each do |instance| + if instance.name == self.name + debug "query found #{self.name}" % instance.properties.inspect + return instance.properties + end + end + nil + end + + def self.instances + debug "[instances]" + table = nil + chains = [] + + Mapping.each { |p, c| + begin + c[:save].call.each_line do |line| + if line =~ c[:re] then + name = $1 + ':' + (table == 'filter' ? 'filter' : table) + ':' + p.to_s + policy = $2 == '-' ? nil : $2.downcase.to_sym + + chains << new({ + :name => name, + :policy => policy, + :ensure => :present, + }) + + debug "[instance] '#{name}' #{policy}" + elsif line =~ /^\*(\S+)/ + table = $1 + else + next + end + end + rescue Puppet::Error + # ignore command not found for ebtables or anything that doesn't exist + end + } + + chains + end + + def allvalidchains + @resource[:name].match(Nameformat) + chain = $1 + table = $2 + protocol = $3 + yield Mapping[protocol.to_sym][:tables],chain,table,protocol.to_sym + end + +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/firewall/lib/puppet/type/firewall.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/firewall/lib/puppet/type/firewall.rb new file mode 100644 index 00000000000..22afbd21e2a --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/firewall/lib/puppet/type/firewall.rb @@ -0,0 +1,1077 @@ +# See: #10295 for more details. +# +# This is a workaround for bug: #4248 whereby ruby files outside of the normal +# provider/type path do not load until pluginsync has occured on the puppetmaster +# +# In this case I'm trying the relative path first, then falling back to normal +# mechanisms. This should be fixed in future versions of puppet but it looks +# like we'll need to maintain this for some time perhaps. +$LOAD_PATH.unshift(File.join(File.dirname(__FILE__),"..","..")) +require 'puppet/util/firewall' + +Puppet::Type.newtype(:firewall) do + include Puppet::Util::Firewall + + @doc = <<-EOS + This type provides the capability to manage firewall rules within + puppet. + + **Autorequires:** + + If Puppet is managing the iptables or ip6tables chains specified in the + `chain` or `jump` parameters, the firewall resource will autorequire + those firewallchain resources. + + If Puppet is managing the iptables or iptables-persistent packages, and + the provider is iptables or ip6tables, the firewall resource will + autorequire those packages to ensure that any required binaries are + installed. + EOS + + feature :connection_limiting, "Connection limiting features." + feature :hop_limiting, "Hop limiting features." + feature :rate_limiting, "Rate limiting features." + feature :recent_limiting, "The netfilter recent module" + feature :snat, "Source NATing" + feature :dnat, "Destination NATing" + feature :interface_match, "Interface matching" + feature :icmp_match, "Matching ICMP types" + feature :owner, "Matching owners" + feature :state_match, "Matching stateful firewall states" + feature :reject_type, "The ability to control reject messages" + feature :log_level, "The ability to control the log level" + feature :log_prefix, "The ability to add prefixes to log messages" + feature :mark, "Match or Set the netfilter mark value associated with the packet" + feature :tcp_flags, "The ability to match on particular TCP flag settings" + feature :pkttype, "Match a packet type" + feature :socket, "Match open sockets" + feature :isfragment, "Match fragments" + feature :address_type, "The ability match on source or destination address type" + feature :iprange, "The ability match on source or destination IP range " + feature :ishasmorefrags, "Match a non-last fragment of a fragmented ipv6 packet - might be first" + feature :islastfrag, "Match the last fragment of an ipv6 packet" + feature :isfirstfrag, "Match the first fragment of a fragmented ipv6 packet" + feature :ipsec_policy, "Match IPsec policy" + feature :ipsec_dir, "Match IPsec policy direction" + + # provider specific features + feature :iptables, "The provider provides iptables features." + + ensurable do + desc <<-EOS + Manage the state of this rule. The default action is *present*. + EOS + + newvalue(:present) do + provider.insert + end + + newvalue(:absent) do + provider.delete + end + + defaultto :present + end + + newparam(:name) do + desc <<-EOS + The canonical name of the rule. This name is also used for ordering + so make sure you prefix the rule with a number: + + 000 this runs first + 999 this runs last + + Depending on the provider, the name of the rule can be stored using + the comment feature of the underlying firewall subsystem. + EOS + isnamevar + + # Keep rule names simple - they must start with a number + newvalues(/^\d+[[:alpha:][:digit:][:punct:][:space:]]+$/) + end + + newproperty(:action) do + desc <<-EOS + This is the action to perform on a match. Can be one of: + + * accept - the packet is accepted + * reject - the packet is rejected with a suitable ICMP response + * drop - the packet is dropped + + If you specify no value it will simply match the rule but perform no + action unless you provide a provider specific parameter (such as *jump*). + EOS + newvalues(:accept, :reject, :drop) + end + + # Generic matching properties + newproperty(:source) do + desc <<-EOS + The source address. For example: + + source => '192.168.2.0/24' + + You can also negate a mask by putting ! in front. For example: + + source => '! 192.168.2.0/24' + + The source can also be an IPv6 address if your provider supports it. + EOS + + munge do |value| + begin + @resource.host_to_mask(value) + rescue Exception => e + self.fail("host_to_ip failed for #{value}, exception #{e}") + end + end + end + + # Source IP range + newproperty(:src_range, :required_features => :iprange) do + desc <<-EOS + The source IP range. For example: + + src_range => '192.168.1.1-192.168.1.10' + + The source IP range is must in 'IP1-IP2' format. + EOS + + newvalues(/^((25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|\d)\.){3}(25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|\d)-((25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|\d)\.){3}(25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|\d)/) + end + + newproperty(:destination) do + desc <<-EOS + The destination address to match. For example: + + destination => '192.168.1.0/24' + + You can also negate a mask by putting ! in front. For example: + + destination => '! 192.168.2.0/24' + + The destination can also be an IPv6 address if your provider supports it. + EOS + + munge do |value| + begin + @resource.host_to_mask(value) + rescue Exception => e + self.fail("host_to_ip failed for #{value}, exception #{e}") + end + end + end + + # Destination IP range + newproperty(:dst_range, :required_features => :iprange) do + desc <<-EOS + The destination IP range. For example: + + dst_range => '192.168.1.1-192.168.1.10' + + The destination IP range is must in 'IP1-IP2' format. + EOS + + newvalues(/^((25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|\d)\.){3}(25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|\d)-((25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|\d)\.){3}(25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|\d)/) + end + + newproperty(:sport, :array_matching => :all) do + desc <<-EOS + The source port to match for this filter (if the protocol supports + ports). Will accept a single element or an array. + + For some firewall providers you can pass a range of ports in the format: + + - + + For example: + + 1-1024 + + This would cover ports 1 to 1024. + EOS + + munge do |value| + @resource.string_to_port(value, :proto) + end + + def is_to_s(value) + should_to_s(value) + end + + def should_to_s(value) + value = [value] unless value.is_a?(Array) + value.join(',') + end + end + + newproperty(:dport, :array_matching => :all) do + desc <<-EOS + The destination port to match for this filter (if the protocol supports + ports). Will accept a single element or an array. + + For some firewall providers you can pass a range of ports in the format: + + - + + For example: + + 1-1024 + + This would cover ports 1 to 1024. + EOS + + munge do |value| + @resource.string_to_port(value, :proto) + end + + def is_to_s(value) + should_to_s(value) + end + + def should_to_s(value) + value = [value] unless value.is_a?(Array) + value.join(',') + end + end + + newproperty(:port, :array_matching => :all) do + desc <<-EOS + The destination or source port to match for this filter (if the protocol + supports ports). Will accept a single element or an array. + + For some firewall providers you can pass a range of ports in the format: + + - + + For example: + + 1-1024 + + This would cover ports 1 to 1024. + EOS + + munge do |value| + @resource.string_to_port(value, :proto) + end + + def is_to_s(value) + should_to_s(value) + end + + def should_to_s(value) + value = [value] unless value.is_a?(Array) + value.join(',') + end + end + + newproperty(:dst_type, :required_features => :address_type) do + desc <<-EOS + The destination address type. For example: + + dst_type => 'LOCAL' + + Can be one of: + + * UNSPEC - an unspecified address + * UNICAST - a unicast address + * LOCAL - a local address + * BROADCAST - a broadcast address + * ANYCAST - an anycast packet + * MULTICAST - a multicast address + * BLACKHOLE - a blackhole address + * UNREACHABLE - an unreachable address + * PROHIBIT - a prohibited address + * THROW - undocumented + * NAT - undocumented + * XRESOLVE - undocumented + EOS + + newvalues(:UNSPEC, :UNICAST, :LOCAL, :BROADCAST, :ANYCAST, :MULTICAST, + :BLACKHOLE, :UNREACHABLE, :PROHIBIT, :THROW, :NAT, :XRESOLVE) + end + + newproperty(:src_type, :required_features => :address_type) do + desc <<-EOS + The source address type. For example: + + src_type => 'LOCAL' + + Can be one of: + + * UNSPEC - an unspecified address + * UNICAST - a unicast address + * LOCAL - a local address + * BROADCAST - a broadcast address + * ANYCAST - an anycast packet + * MULTICAST - a multicast address + * BLACKHOLE - a blackhole address + * UNREACHABLE - an unreachable address + * PROHIBIT - a prohibited address + * THROW - undocumented + * NAT - undocumented + * XRESOLVE - undocumented + EOS + + newvalues(:UNSPEC, :UNICAST, :LOCAL, :BROADCAST, :ANYCAST, :MULTICAST, + :BLACKHOLE, :UNREACHABLE, :PROHIBIT, :THROW, :NAT, :XRESOLVE) + end + + newproperty(:proto) do + desc <<-EOS + The specific protocol to match for this rule. By default this is + *tcp*. + EOS + + newvalues(:tcp, :udp, :icmp, :"ipv6-icmp", :esp, :ah, :vrrp, :igmp, :ipencap, :ospf, :gre, :all) + defaultto "tcp" + end + + # tcp-specific + newproperty(:tcp_flags, :required_features => :tcp_flags) do + desc <<-EOS + Match when the TCP flags are as specified. + Is a string with a list of comma-separated flag names for the mask, + then a space, then a comma-separated list of flags that should be set. + The flags are: SYN ACK FIN RST URG PSH ALL NONE + Note that you specify them in the order that iptables --list-rules + would list them to avoid having puppet think you changed the flags. + Example: FIN,SYN,RST,ACK SYN matches packets with the SYN bit set and the + ACK,RST and FIN bits cleared. Such packets are used to request + TCP connection initiation. + EOS + end + + + # Iptables specific + newproperty(:chain, :required_features => :iptables) do + desc <<-EOS + Name of the chain to use. Can be one of the built-ins: + + * INPUT + * FORWARD + * OUTPUT + * PREROUTING + * POSTROUTING + + Or you can provide a user-based chain. + + The default value is 'INPUT'. + EOS + + defaultto "INPUT" + newvalue(/^[a-zA-Z0-9\-_]+$/) + end + + newproperty(:table, :required_features => :iptables) do + desc <<-EOS + Table to use. Can be one of: + + * nat + * mangle + * filter + * raw + * rawpost + + By default the setting is 'filter'. + EOS + + newvalues(:nat, :mangle, :filter, :raw, :rawpost) + defaultto "filter" + end + + newproperty(:jump, :required_features => :iptables) do + desc <<-EOS + The value for the iptables --jump parameter. Normal values are: + + * QUEUE + * RETURN + * DNAT + * SNAT + * LOG + * MASQUERADE + * REDIRECT + * MARK + + But any valid chain name is allowed. + + For the values ACCEPT, DROP and REJECT you must use the generic + 'action' parameter. This is to enfore the use of generic parameters where + possible for maximum cross-platform modelling. + + If you set both 'accept' and 'jump' parameters, you will get an error as + only one of the options should be set. + EOS + + validate do |value| + unless value =~ /^[a-zA-Z0-9\-_]+$/ + raise ArgumentError, <<-EOS + Jump destination must consist of alphanumeric characters, an + underscore or a yphen. + EOS + end + + if ["accept","reject","drop"].include?(value.downcase) + raise ArgumentError, <<-EOS + Jump destination should not be one of ACCEPT, REJECT or DROP. Use + the action property instead. + EOS + end + + end + end + + # Interface specific matching properties + newproperty(:iniface, :required_features => :interface_match) do + desc <<-EOS + Input interface to filter on. + EOS + newvalues(/^[a-zA-Z0-9\-\._\+]+$/) + end + + newproperty(:outiface, :required_features => :interface_match) do + desc <<-EOS + Output interface to filter on. + EOS + newvalues(/^[a-zA-Z0-9\-\._\+]+$/) + end + + # NAT specific properties + newproperty(:tosource, :required_features => :snat) do + desc <<-EOS + When using jump => "SNAT" you can specify the new source address using + this parameter. + EOS + end + + newproperty(:todest, :required_features => :dnat) do + desc <<-EOS + When using jump => "DNAT" you can specify the new destination address + using this paramter. + EOS + end + + newproperty(:toports, :required_features => :dnat) do + desc <<-EOS + For DNAT this is the port that will replace the destination port. + EOS + end + + newproperty(:random, :required_features => :dnat) do + desc <<-EOS + When using a jump value of "MASQUERADE", "DNAT", "REDIRECT", or "SNAT" + this boolean will enable randomized port mapping. + EOS + + newvalues(:true, :false) + end + + # Reject ICMP type + newproperty(:reject, :required_features => :reject_type) do + desc <<-EOS + When combined with jump => "REJECT" you can specify a different icmp + response to be sent back to the packet sender. + EOS + end + + # Logging properties + newproperty(:log_level, :required_features => :log_level) do + desc <<-EOS + When combined with jump => "LOG" specifies the system log level to log + to. + EOS + + munge do |value| + if value.kind_of?(String) + value = @resource.log_level_name_to_number(value) + else + value + end + + if value == nil && value != "" + self.fail("Unable to determine log level") + end + value + end + end + + newproperty(:log_prefix, :required_features => :log_prefix) do + desc <<-EOS + When combined with jump => "LOG" specifies the log prefix to use when + logging. + EOS + end + + # ICMP matching property + newproperty(:icmp, :required_features => :icmp_match) do + desc <<-EOS + When matching ICMP packets, this is the type of ICMP packet to match. + + A value of "any" is not supported. To achieve this behaviour the + parameter should simply be omitted or undefined. + EOS + + validate do |value| + if value == "any" + raise ArgumentError, + "Value 'any' is not valid. This behaviour should be achieved " \ + "by omitting or undefining the ICMP parameter." + end + end + + munge do |value| + if value.kind_of?(String) + # ICMP codes differ between IPv4 and IPv6. + case @resource[:provider] + when :iptables + protocol = 'inet' + when :ip6tables + protocol = 'inet6' + else + self.fail("cannot work out protocol family") + end + + value = @resource.icmp_name_to_number(value, protocol) + else + value + end + + if value == nil && value != "" + self.fail("cannot work out icmp type") + end + value + end + end + + newproperty(:state, :array_matching => :all, :required_features => + :state_match) do + + desc <<-EOS + Matches a packet based on its state in the firewall stateful inspection + table. Values can be: + + * INVALID + * ESTABLISHED + * NEW + * RELATED + EOS + + newvalues(:INVALID,:ESTABLISHED,:NEW,:RELATED) + + # States should always be sorted. This normalizes the resource states to + # keep it consistent with the sorted result from iptables-save. + def should=(values) + @should = super(values).sort_by {|sym| sym.to_s} + end + + def is_to_s(value) + should_to_s(value) + end + + def should_to_s(value) + value = [value] unless value.is_a?(Array) + value.join(',') + end + end + + newproperty(:ctstate, :array_matching => :all, :required_features => + :state_match) do + + desc <<-EOS + Matches a packet based on its state in the firewall stateful inspection + table, using the conntrack module. Values can be: + + * INVALID + * ESTABLISHED + * NEW + * RELATED + EOS + + newvalues(:INVALID,:ESTABLISHED,:NEW,:RELATED) + + # States should always be sorted. This normalizes the resource states to + # keep it consistent with the sorted result from iptables-save. + def should=(values) + @should = super(values).sort_by {|sym| sym.to_s} + end + + def is_to_s(value) + should_to_s(value) + end + + def should_to_s(value) + value = [value] unless value.is_a?(Array) + value.join(',') + end + end + + + # Connection mark + newproperty(:connmark, :required_features => :mark) do + desc <<-EOS + Match the Netfilter mark value associated with the packet. Accepts either of: + mark/mask or mark. These will be converted to hex if they are not already. + EOS + munge do |value| + int_or_hex = '[a-fA-F0-9x]' + match = value.to_s.match("(#{int_or_hex}+)(/)?(#{int_or_hex}+)?") + mark = @resource.to_hex32(match[1]) + + # Values that can't be converted to hex. + # Or contain a trailing slash with no mask. + if mark.nil? or (mark and match[2] and match[3].nil?) + raise ArgumentError, "MARK value must be integer or hex between 0 and 0xffffffff" + end + + # There should not be a mask on connmark + unless match[3].nil? + raise ArgumentError, "iptables does not support masks on MARK match rules" + end + value = mark + + value + end + end + + # Connection limiting properties + newproperty(:connlimit_above, :required_features => :connection_limiting) do + desc <<-EOS + Connection limiting value for matched connections above n. + EOS + newvalue(/^\d+$/) + end + + newproperty(:connlimit_mask, :required_features => :connection_limiting) do + desc <<-EOS + Connection limiting by subnet mask for matched connections. + IPv4: 0-32 + IPv6: 0-128 + EOS + newvalue(/^\d+$/) + end + + # Hop limiting properties + newproperty(:hop_limit, :required_features => :hop_limiting) do + desc <<-EOS + Hop limiting value for matched packets. + EOS + newvalue(/^\d+$/) + end + + # Rate limiting properties + newproperty(:limit, :required_features => :rate_limiting) do + desc <<-EOS + Rate limiting value for matched packets. The format is: + rate/[/second/|/minute|/hour|/day]. + + Example values are: '50/sec', '40/min', '30/hour', '10/day'." + EOS + end + + newproperty(:burst, :required_features => :rate_limiting) do + desc <<-EOS + Rate limiting burst value (per second) before limit checks apply. + EOS + newvalue(/^\d+$/) + end + + newproperty(:uid, :required_features => :owner) do + desc <<-EOS + UID or Username owner matching rule. Accepts a string argument + only, as iptables does not accept multiple uid in a single + statement. + EOS + end + + newproperty(:gid, :required_features => :owner) do + desc <<-EOS + GID or Group owner matching rule. Accepts a string argument + only, as iptables does not accept multiple gid in a single + statement. + EOS + end + + newproperty(:set_mark, :required_features => :mark) do + desc <<-EOS + Set the Netfilter mark value associated with the packet. Accepts either of: + mark/mask or mark. These will be converted to hex if they are not already. + EOS + + munge do |value| + int_or_hex = '[a-fA-F0-9x]' + match = value.to_s.match("(#{int_or_hex}+)(/)?(#{int_or_hex}+)?") + mark = @resource.to_hex32(match[1]) + + # Values that can't be converted to hex. + # Or contain a trailing slash with no mask. + if mark.nil? or (mark and match[2] and match[3].nil?) + raise ArgumentError, "MARK value must be integer or hex between 0 and 0xffffffff" + end + + # Old iptables does not support a mask. New iptables will expect one. + iptables_version = Facter.fact('iptables_version').value + mask_required = (iptables_version and Puppet::Util::Package.versioncmp(iptables_version, '1.4.1') >= 0) + + if mask_required + if match[3].nil? + value = "#{mark}/0xffffffff" + else + mask = @resource.to_hex32(match[3]) + if mask.nil? + raise ArgumentError, "MARK mask must be integer or hex between 0 and 0xffffffff" + end + value = "#{mark}/#{mask}" + end + else + unless match[3].nil? + raise ArgumentError, "iptables version #{iptables_version} does not support masks on MARK rules" + end + value = mark + end + + value + end + end + + newproperty(:pkttype, :required_features => :pkttype) do + desc <<-EOS + Sets the packet type to match. + EOS + + newvalues(:unicast, :broadcast, :multicast) + end + + newproperty(:isfragment, :required_features => :isfragment) do + desc <<-EOS + Set to true to match tcp fragments (requires type to be set to tcp) + EOS + + newvalues(:true, :false) + end + + newproperty(:recent, :required_features => :recent_limiting) do + desc <<-EOS + Enable the recent module. Takes as an argument one of set, update, + rcheck or remove. For example: + + # If anyone's appeared on the 'badguy' blacklist within + # the last 60 seconds, drop their traffic, and update the timestamp. + firewall { '100 Drop badguy traffic': + recent => 'update', + rseconds => 60, + rsource => true, + rname => 'badguy', + action => 'DROP', + chain => 'FORWARD', + } + # No-one should be sending us traffic on eth0 from localhost + # Blacklist them + firewall { '101 blacklist strange traffic': + recent => 'set', + rsource => true, + rname => 'badguy', + destination => '127.0.0.0/8', + iniface => 'eth0', + action => 'DROP', + chain => 'FORWARD', + } + EOS + + newvalues(:set, :update, :rcheck, :remove) + munge do |value| + value = "--" + value + end + end + + newproperty(:rdest, :required_features => :recent_limiting) do + desc <<-EOS + Recent module; add the destination IP address to the list. + Must be boolean true. + EOS + + newvalues(:true, :false) + end + + newproperty(:rsource, :required_features => :recent_limiting) do + desc <<-EOS + Recent module; add the source IP address to the list. + Must be boolean true. + EOS + + newvalues(:true, :false) + end + + newproperty(:rname, :required_features => :recent_limiting) do + desc <<-EOS + Recent module; The name of the list. Takes a string argument. + EOS + end + + newproperty(:rseconds, :required_features => :recent_limiting) do + desc <<-EOS + Recent module; used in conjunction with one of `recent => 'rcheck'` or + `recent => 'update'`. When used, this will narrow the match to only + happen when the address is in the list and was seen within the last given + number of seconds. + EOS + end + + newproperty(:reap, :required_features => :recent_limiting) do + desc <<-EOS + Recent module; can only be used in conjunction with the `rseconds` + attribute. When used, this will cause entries older than 'seconds' to be + purged. Must be boolean true. + EOS + + newvalues(:true, :false) + end + + newproperty(:rhitcount, :required_features => :recent_limiting) do + desc <<-EOS + Recent module; used in conjunction with `recent => 'update'` or `recent + => 'rcheck'. When used, this will narrow the match to only happen when + the address is in the list and packets had been received greater than or + equal to the given value. + EOS + end + + newproperty(:rttl, :required_features => :recent_limiting) do + desc <<-EOS + Recent module; may only be used in conjunction with one of `recent => + 'rcheck'` or `recent => 'update'`. When used, this will narrow the match + to only happen when the address is in the list and the TTL of the current + packet matches that of the packet which hit the `recent => 'set'` rule. + This may be useful if you have problems with people faking their source + address in order to DoS you via this module by disallowing others access + to your site by sending bogus packets to you. Must be boolean true. + EOS + + newvalues(:true, :false) + end + + newproperty(:socket, :required_features => :socket) do + desc <<-EOS + If true, matches if an open socket can be found by doing a coket lookup + on the packet. + EOS + + newvalues(:true, :false) + end + + newproperty(:ishasmorefrags, :required_features => :ishasmorefrags) do + desc <<-EOS + If true, matches if the packet has it's 'more fragments' bit set. ipv6. + EOS + + newvalues(:true, :false) + end + + newproperty(:islastfrag, :required_features => :islastfrag) do + desc <<-EOS + If true, matches if the packet is the last fragment. ipv6. + EOS + + newvalues(:true, :false) + end + + newproperty(:isfirstfrag, :required_features => :isfirstfrag) do + desc <<-EOS + If true, matches if the packet is the first fragment. + Sadly cannot be negated. ipv6. + EOS + + newvalues(:true, :false) + end + + newproperty(:ipsec_policy, :required_features => :ipsec_policy) do + desc <<-EOS + Sets the ipsec policy type + EOS + + newvalues(:none, :ipsec) + end + + newproperty(:ipsec_dir, :required_features => :ipsec_dir) do + desc <<-EOS + Sets the ipsec policy direction + EOS + + newvalues(:in, :out) + end + + newproperty(:mask, :required_features => :mask) do + desc <<-EOS + Sets the mask to use when `recent` is enabled. + EOS + end + + newparam(:line) do + desc <<-EOS + Read-only property for caching the rule line. + EOS + end + + autorequire(:firewallchain) do + reqs = [] + protocol = nil + + case value(:provider) + when :iptables + protocol = "IPv4" + when :ip6tables + protocol = "IPv6" + end + + unless protocol.nil? + table = value(:table) + [value(:chain), value(:jump)].each do |chain| + reqs << "#{chain}:#{table}:#{protocol}" unless ( chain.nil? || (['INPUT', 'OUTPUT', 'FORWARD'].include?(chain) && table == :filter) ) + end + end + + reqs + end + + # Classes would be a better abstraction, pending: + # http://projects.puppetlabs.com/issues/19001 + autorequire(:package) do + case value(:provider) + when :iptables, :ip6tables + %w{iptables iptables-persistent} + else + [] + end + end + + validate do + debug("[validate]") + + # TODO: this is put here to skip validation if ensure is not set. This + # is because there is a revalidation stage called later where the values + # are not set correctly. I tried tracing it - but have put in this + # workaround instead to skip. Must get to the bottom of this. + if ! value(:ensure) + return + end + + # First we make sure the chains and tables are valid combinations + if value(:table).to_s == "filter" && + value(:chain) =~ /PREROUTING|POSTROUTING/ + + self.fail "PREROUTING and POSTROUTING cannot be used in table 'filter'" + end + + if value(:table).to_s == "nat" && value(:chain) =~ /INPUT|FORWARD/ + self.fail "INPUT and FORWARD cannot be used in table 'nat'" + end + + if value(:table).to_s == "raw" && + value(:chain) =~ /INPUT|FORWARD|POSTROUTING/ + + self.fail "INPUT, FORWARD and POSTROUTING cannot be used in table raw" + end + + # Now we analyse the individual properties to make sure they apply to + # the correct combinations. + if value(:iniface) + unless value(:chain).to_s =~ /INPUT|FORWARD|PREROUTING/ + self.fail "Parameter iniface only applies to chains " \ + "INPUT,FORWARD,PREROUTING" + end + end + + if value(:outiface) + unless value(:chain).to_s =~ /OUTPUT|FORWARD|POSTROUTING/ + self.fail "Parameter outiface only applies to chains " \ + "OUTPUT,FORWARD,POSTROUTING" + end + end + + if value(:uid) + unless value(:chain).to_s =~ /OUTPUT|POSTROUTING/ + self.fail "Parameter uid only applies to chains " \ + "OUTPUT,POSTROUTING" + end + end + + if value(:gid) + unless value(:chain).to_s =~ /OUTPUT|POSTROUTING/ + self.fail "Parameter gid only applies to chains " \ + "OUTPUT,POSTROUTING" + end + end + + if value(:set_mark) + unless value(:jump).to_s =~ /MARK/ && + value(:chain).to_s =~ /PREROUTING|OUTPUT/ && + value(:table).to_s =~ /mangle/ + self.fail "Parameter set_mark only applies to " \ + "the PREROUTING or OUTPUT chain of the mangle table and when jump => MARK" + end + end + + if value(:dport) + unless value(:proto).to_s =~ /tcp|udp|sctp/ + self.fail "[%s] Parameter dport only applies to sctp, tcp and udp " \ + "protocols. Current protocol is [%s] and dport is [%s]" % + [value(:name), should(:proto), should(:dport)] + end + end + + if value(:jump).to_s == "DNAT" + unless value(:table).to_s =~ /nat/ + self.fail "Parameter jump => DNAT only applies to table => nat" + end + + unless value(:todest) + self.fail "Parameter jump => DNAT must have todest parameter" + end + end + + if value(:jump).to_s == "SNAT" + unless value(:table).to_s =~ /nat/ + self.fail "Parameter jump => SNAT only applies to table => nat" + end + + unless value(:tosource) + self.fail "Parameter jump => SNAT must have tosource parameter" + end + end + + if value(:jump).to_s == "REDIRECT" + unless value(:toports) + self.fail "Parameter jump => REDIRECT missing mandatory toports " \ + "parameter" + end + end + + if value(:jump).to_s == "MASQUERADE" + unless value(:table).to_s =~ /nat/ + self.fail "Parameter jump => MASQUERADE only applies to table => nat" + end + end + + if value(:log_prefix) || value(:log_level) + unless value(:jump).to_s == "LOG" + self.fail "Parameter log_prefix and log_level require jump => LOG" + end + end + + if value(:burst) && ! value(:limit) + self.fail "burst makes no sense without limit" + end + + if value(:action) && value(:jump) + self.fail "Only one of the parameters 'action' and 'jump' can be set" + end + + if value(:connlimit_mask) && ! value(:connlimit_above) + self.fail "Parameter 'connlimit_mask' requires 'connlimit_above'" + end + + if value(:mask) && ! value(:recent) + self.fail "Mask can only be set if recent is enabled." + end + + end +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/firewall/lib/puppet/type/firewallchain.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/firewall/lib/puppet/type/firewallchain.rb new file mode 100644 index 00000000000..3e3c5d13706 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/firewall/lib/puppet/type/firewallchain.rb @@ -0,0 +1,222 @@ +# This is a workaround for bug: #4248 whereby ruby files outside of the normal +# provider/type path do not load until pluginsync has occured on the puppetmaster +# +# In this case I'm trying the relative path first, then falling back to normal +# mechanisms. This should be fixed in future versions of puppet but it looks +# like we'll need to maintain this for some time perhaps. +$LOAD_PATH.unshift(File.join(File.dirname(__FILE__),"..","..")) +require 'puppet/util/firewall' + +Puppet::Type.newtype(:firewallchain) do + include Puppet::Util::Firewall + + @doc = <<-EOS + This type provides the capability to manage rule chains for firewalls. + + Currently this supports only iptables, ip6tables and ebtables on Linux. And + provides support for setting the default policy on chains and tables that + allow it. + + **Autorequires:** + If Puppet is managing the iptables or iptables-persistent packages, and + the provider is iptables_chain, the firewall resource will autorequire + those packages to ensure that any required binaries are installed. + EOS + + feature :iptables_chain, "The provider provides iptables chain features." + feature :policy, "Default policy (inbuilt chains only)" + + ensurable do + defaultvalues + defaultto :present + end + + newparam(:name) do + desc <<-EOS + The canonical name of the chain. + + For iptables the format must be {chain}:{table}:{protocol}. + EOS + isnamevar + + validate do |value| + if value !~ Nameformat then + raise ArgumentError, "Inbuilt chains must be in the form {chain}:{table}:{protocol} where {table} is one of FILTER, NAT, MANGLE, RAW, RAWPOST, BROUTE or empty (alias for filter), chain can be anything without colons or one of PREROUTING, POSTROUTING, BROUTING, INPUT, FORWARD, OUTPUT for the inbuilt chains, and {protocol} being IPv4, IPv6, ethernet (ethernet bridging) got '#{value}' table:'#{$1}' chain:'#{$2}' protocol:'#{$3}'" + else + chain = $1 + table = $2 + protocol = $3 + case table + when 'filter' + if chain =~ /^(PREROUTING|POSTROUTING|BROUTING)$/ + raise ArgumentError, "INPUT, OUTPUT and FORWARD are the only inbuilt chains that can be used in table 'filter'" + end + when 'mangle' + if chain =~ InternalChains && chain == 'BROUTING' + raise ArgumentError, "PREROUTING, POSTROUTING, INPUT, FORWARD and OUTPUT are the only inbuilt chains that can be used in table 'mangle'" + end + when 'nat' + if chain =~ /^(BROUTING|FORWARD)$/ + raise ArgumentError, "PREROUTING, POSTROUTING, INPUT, and OUTPUT are the only inbuilt chains that can be used in table 'nat'" + end + if protocol =~/^(IP(v6)?)?$/ + raise ArgumentError, "table nat isn't valid in IPv6. You must specify ':IPv4' as the name suffix" + end + when 'raw' + if chain =~ /^(POSTROUTING|BROUTING|INPUT|FORWARD)$/ + raise ArgumentError,'PREROUTING and OUTPUT are the only inbuilt chains in the table \'raw\'' + end + when 'broute' + if protocol != 'ethernet' + raise ArgumentError,'BROUTE is only valid with protocol \'ethernet\'' + end + if chain =~ /^PREROUTING|POSTROUTING|INPUT|FORWARD|OUTPUT$/ + raise ArgumentError,'BROUTING is the only inbuilt chain allowed on on table \'broute\'' + end + end + if chain == 'BROUTING' && ( protocol != 'ethernet' || table!='broute') + raise ArgumentError,'BROUTING is the only inbuilt chain allowed on on table \'BROUTE\' with protocol \'ethernet\' i.e. \'broute:BROUTING:enternet\'' + end + end + end + end + + newproperty(:policy) do + desc <<-EOS + This is the action to when the end of the chain is reached. + It can only be set on inbuilt chains (INPUT, FORWARD, OUTPUT, + PREROUTING, POSTROUTING) and can be one of: + + * accept - the packet is accepted + * drop - the packet is dropped + * queue - the packet is passed userspace + * return - the packet is returned to calling (jump) queue + or the default of inbuilt chains + EOS + newvalues(:accept, :drop, :queue, :return) + defaultto do + # ethernet chain have an ACCEPT default while other haven't got an + # allowed value + if @resource[:name] =~ /:ethernet$/ + :accept + else + nil + end + end + end + + newparam(:purge, :boolean => true) do + desc <<-EOS + Purge unmanaged firewall rules in this chain + EOS + newvalues(:false, :true) + defaultto :false + end + + newparam(:ignore) do + desc <<-EOS + Regex to perform on firewall rules to exempt unmanaged rules from purging (when enabled). + This is matched against the output of `iptables-save`. + + This can be a single regex, or an array of them. + To support flags, use the ruby inline flag mechanism. + Meaning a regex such as + /foo/i + can be written as + '(?i)foo' or '(?i:foo)' + + Full example: + firewallchain { 'INPUT:filter:IPv4': + purge => true, + ignore => [ + '-j fail2ban-ssh', # ignore the fail2ban jump rule + '--comment "[^"]*(?i:ignore)[^"]*"', # ignore any rules with "ignore" (case insensitive) in the comment in the rule + ], + } + EOS + + validate do |value| + unless value.is_a?(Array) or value.is_a?(String) or value == false + self.devfail "Ignore must be a string or an Array" + end + end + munge do |patterns| # convert into an array of {Regex}es + patterns = [patterns] if patterns.is_a?(String) + patterns.map{|p| Regexp.new(p)} + end + end + + # Classes would be a better abstraction, pending: + # http://projects.puppetlabs.com/issues/19001 + autorequire(:package) do + case value(:provider) + when :iptables_chain + %w{iptables iptables-persistent} + else + [] + end + end + + validate do + debug("[validate]") + + value(:name).match(Nameformat) + chain = $1 + table = $2 + protocol = $3 + + # Check that we're not removing an internal chain + if chain =~ InternalChains && value(:ensure) == :absent + self.fail "Cannot remove in-built chains" + end + + if value(:policy).nil? && protocol == 'ethernet' + self.fail "you must set a non-empty policy on all ethernet table chains" + end + + # Check that we're not setting a policy on a user chain + if chain !~ InternalChains && + !value(:policy).nil? && + protocol != 'ethernet' + + self.fail "policy can only be set on in-built chains (with the exception of ethernet chains) (table:#{table} chain:#{chain} protocol:#{protocol})" + end + + # no DROP policy on nat table + if table == 'nat' && + value(:policy) == :drop + + self.fail 'The "nat" table is not intended for filtering, the use of DROP is therefore inhibited' + end + end + + def generate + return [] unless self.purge? + + value(:name).match(Nameformat) + chain = $1 + table = $2 + protocol = $3 + + provider = case protocol + when 'IPv4' + :iptables + when 'IPv6' + :ip6tables + end + + # gather a list of all rules present on the system + rules_resources = Puppet::Type.type(:firewall).instances + + # Keep only rules in this chain + rules_resources.delete_if { |res| (res[:provider] != provider or res.provider.properties[:table].to_s != table or res.provider.properties[:chain] != chain) } + + # Remove rules which match our ignore filter + rules_resources.delete_if {|res| value(:ignore).find_index{|f| res.provider.properties[:line].match(f)}} if value(:ignore) + + # We mark all remaining rules for deletion, and then let the catalog override us on rules which should be present + rules_resources.each {|res| res[:ensure] = :absent} + + rules_resources + end +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/firewall/lib/puppet/util/firewall.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/firewall/lib/puppet/util/firewall.rb new file mode 100644 index 00000000000..aa26d3bc700 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/firewall/lib/puppet/util/firewall.rb @@ -0,0 +1,225 @@ +require 'socket' +require 'resolv' +require 'puppet/util/ipcidr' + +# Util module for puppetlabs-firewall +module Puppet::Util::Firewall + # Translate the symbolic names for icmp packet types to integers + def icmp_name_to_number(value_icmp, protocol) + if value_icmp =~ /\d{1,2}$/ + value_icmp + elsif protocol == 'inet' + case value_icmp + when "echo-reply" then "0" + when "destination-unreachable" then "3" + when "source-quench" then "4" + when "redirect" then "6" + when "echo-request" then "8" + when "router-advertisement" then "9" + when "router-solicitation" then "10" + when "time-exceeded" then "11" + when "parameter-problem" then "12" + when "timestamp-request" then "13" + when "timestamp-reply" then "14" + when "address-mask-request" then "17" + when "address-mask-reply" then "18" + else nil + end + elsif protocol == 'inet6' + case value_icmp + when "destination-unreachable" then "1" + when "time-exceeded" then "3" + when "parameter-problem" then "4" + when "echo-request" then "128" + when "echo-reply" then "129" + when "router-solicitation" then "133" + when "router-advertisement" then "134" + when "redirect" then "137" + else nil + end + else + raise ArgumentError, "unsupported protocol family '#{protocol}'" + end + end + + # Convert log_level names to their respective numbers + def log_level_name_to_number(value) + #TODO make this 0-7 only + if value =~ /\d/ + value + else + case value + when "panic" then "0" + when "alert" then "1" + when "crit" then "2" + when "err" then "3" + when "error" then "3" + when "warn" then "4" + when "warning" then "4" + when "not" then "5" + when "notice" then "5" + when "info" then "6" + when "debug" then "7" + else nil + end + end + end + + # This method takes a string and a protocol and attempts to convert + # it to a port number if valid. + # + # If the string already contains a port number or perhaps a range of ports + # in the format 22:1000 for example, it simply returns the string and does + # nothing. + def string_to_port(value, proto) + proto = proto.to_s + unless proto =~ /^(tcp|udp)$/ + proto = 'tcp' + end + + if value.kind_of?(String) + if value.match(/^\d+(-\d+)?$/) + return value + else + return Socket.getservbyname(value, proto).to_s + end + else + Socket.getservbyname(value.to_s, proto).to_s + end + end + + # Takes an address and returns it in CIDR notation. + # + # If the address is: + # + # - A hostname: + # It will be resolved + # - An IPv4 address: + # It will be qualified with a /32 CIDR notation + # - An IPv6 address: + # It will be qualified with a /128 CIDR notation + # - An IP address with a CIDR notation: + # It will be normalised + # - An IP address with a dotted-quad netmask: + # It will be converted to CIDR notation + # - Any address with a resulting prefix length of zero: + # It will return nil which is equivilent to not specifying an address + # + def host_to_ip(value) + begin + value = Puppet::Util::IPCidr.new(value) + rescue + value = Puppet::Util::IPCidr.new(Resolv.getaddress(value)) + end + + return nil if value.prefixlen == 0 + value.cidr + end + + # Takes an address mask and converts the host portion to CIDR notation. + # + # This takes into account you can negate a mask but follows all rules + # defined in host_to_ip for the host/address part. + # + def host_to_mask(value) + match = value.match /(!)\s?(.*)$/ + return host_to_ip(value) unless match + + cidr = host_to_ip(match[2]) + return nil if cidr == nil + "#{match[1]} #{cidr}" + end + + # Validates the argument is int or hex, and returns valid hex + # conversion of the value or nil otherwise. + def to_hex32(value) + begin + value = Integer(value) + if value.between?(0, 0xffffffff) + return '0x' + value.to_s(16) + end + rescue ArgumentError + # pass + end + return nil + end + + def persist_iptables(proto) + debug("[persist_iptables]") + + # Basic normalisation for older Facter + os_key = Facter.value(:osfamily) + os_key ||= case Facter.value(:operatingsystem) + when 'RedHat', 'CentOS', 'Fedora', 'Scientific', 'SL', 'SLC', 'Ascendos', 'CloudLinux', 'PSBM', 'OracleLinux', 'OVS', 'OEL', 'Amazon', 'XenServer' + 'RedHat' + when 'Debian', 'Ubuntu' + 'Debian' + else + Facter.value(:operatingsystem) + end + + # Older iptables-persistent doesn't provide save action. + if os_key == 'Debian' + persist_ver = Facter.value(:iptables_persistent_version) + if (persist_ver and Puppet::Util::Package.versioncmp(persist_ver, '0.5.0') < 0) + os_key = 'Debian_manual' + end + end + + # Fedora 15 and newer use systemd to persist iptable rules + if os_key == 'RedHat' && Facter.value(:operatingsystem) == 'Fedora' && Facter.value(:operatingsystemrelease).to_i >= 15 + os_key = 'Fedora' + end + + # RHEL 7 and newer also use systemd to persist iptable rules + if os_key == 'RedHat' && Facter.value(:operatingsystem) == 'RedHat' && Facter.value(:operatingsystemrelease).to_i >= 7 + os_key = 'Fedora' + end + + cmd = case os_key.to_sym + when :RedHat + case proto.to_sym + when :IPv4 + %w{/sbin/service iptables save} + when :IPv6 + %w{/sbin/service ip6tables save} + end + when :Fedora + case proto.to_sym + when :IPv4 + %w{/usr/libexec/iptables/iptables.init save} + when :IPv6 + %w{/usr/libexec/iptables/ip6tables.init save} + end + when :Debian + case proto.to_sym + when :IPv4, :IPv6 + %w{/usr/sbin/service iptables-persistent save} + end + when :Debian_manual + case proto.to_sym + when :IPv4 + ["/bin/sh", "-c", "/sbin/iptables-save > /etc/iptables/rules"] + end + when :Archlinux + case proto.to_sym + when :IPv4 + ["/bin/sh", "-c", "/usr/sbin/iptables-save > /etc/iptables/iptables.rules"] + when :IPv6 + ["/bin/sh", "-c", "/usr/sbin/ip6tables-save > /etc/iptables/ip6tables.rules"] + end + end + + # Catch unsupported OSs from the case statement above. + if cmd.nil? + debug('firewall: Rule persistence is not supported for this type/OS') + return + end + + begin + execute(cmd) + rescue Puppet::ExecutionFailure => detail + warning("Unable to persist firewall rules: #{detail}") + end + end +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/firewall/lib/puppet/util/ipcidr.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/firewall/lib/puppet/util/ipcidr.rb new file mode 100644 index 00000000000..87e8d5e3720 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/firewall/lib/puppet/util/ipcidr.rb @@ -0,0 +1,42 @@ +require 'ipaddr' + +# IPCidr object wrapper for IPAddr +module Puppet + module Util + class IPCidr < IPAddr + def initialize(ipaddr) + begin + super(ipaddr) + rescue ArgumentError => e + if e.message =~ /invalid address/ + raise ArgumentError, "Invalid address from IPAddr.new: #{ipaddr}" + else + raise e + end + end + end + + def netmask + _to_string(@mask_addr) + end + + def prefixlen + m = case @family + when Socket::AF_INET + IN4MASK + when Socket::AF_INET6 + IN6MASK + else + raise "unsupported address family" + end + return $1.length if /\A(1*)(0*)\z/ =~ (@mask_addr & m).to_s(2) + raise "bad addr_mask format" + end + + def cidr + cidr = sprintf("%s/%s", self.to_s, self.prefixlen) + cidr + end + end + end +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/firewall/manifests/init.pp b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/firewall/manifests/init.pp new file mode 100644 index 00000000000..759f3282351 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/firewall/manifests/init.pp @@ -0,0 +1,36 @@ +# = Class: firewall +# +# Manages packages and services required by the firewall type/provider. +# +# This class includes the appropriate sub-class for your operating system, +# where supported. +# +# == Parameters: +# +# [*ensure*] +# Ensure parameter passed onto Service[] resources. +# Default: running +# +class firewall ( + $ensure = running +) { + case $ensure { + /^(running|stopped)$/: { + # Do nothing. + } + default: { + fail("${title}: Ensure value '${ensure}' is not supported") + } + } + + case $::kernel { + 'Linux': { + class { "${title}::linux": + ensure => $ensure, + } + } + default: { + fail("${title}: Kernel '${::kernel}' is not currently supported") + } + } +} diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/firewall/manifests/linux.pp b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/firewall/manifests/linux.pp new file mode 100644 index 00000000000..7c4f3a80b5b --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/firewall/manifests/linux.pp @@ -0,0 +1,51 @@ +# = Class: firewall::linux +# +# Installs the `iptables` package for Linux operating systems and includes +# the appropriate sub-class for any distribution specific services and +# additional packages. +# +# == Parameters: +# +# [*ensure*] +# Ensure parameter passed onto Service[] resources. When `running` the +# service will be started on boot, and when `stopped` it will not. +# Default: running +# +class firewall::linux ( + $ensure = running +) { + $enable = $ensure ? { + running => true, + stopped => false, + } + + package { 'iptables': + ensure => present, + } + + case $::operatingsystem { + 'RedHat', 'CentOS', 'Fedora', 'Scientific', 'SL', 'SLC', 'Ascendos', + 'CloudLinux', 'PSBM', 'OracleLinux', 'OVS', 'OEL', 'Amazon', 'XenServer': { + class { "${title}::redhat": + ensure => $ensure, + enable => $enable, + require => Package['iptables'], + } + } + 'Debian', 'Ubuntu': { + class { "${title}::debian": + ensure => $ensure, + enable => $enable, + require => Package['iptables'], + } + } + 'Archlinux': { + class { "${title}::archlinux": + ensure => $ensure, + enable => $enable, + require => Package['iptables'], + } + } + default: {} + } +} diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/firewall/manifests/linux/archlinux.pp b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/firewall/manifests/linux/archlinux.pp new file mode 100644 index 00000000000..546a5a80fe2 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/firewall/manifests/linux/archlinux.pp @@ -0,0 +1,41 @@ +# = Class: firewall::linux::archlinux +# +# Manages `iptables` and `ip6tables` services, and creates files used for +# persistence, on Arch Linux systems. +# +# == Parameters: +# +# [*ensure*] +# Ensure parameter passed onto Service[] resources. +# Default: running +# +# [*enable*] +# Enable parameter passed onto Service[] resources. +# Default: true +# +class firewall::linux::archlinux ( + $ensure = 'running', + $enable = true +) { + service { 'iptables': + ensure => $ensure, + enable => $enable, + hasstatus => true, + } + + service { 'ip6tables': + ensure => $ensure, + enable => $enable, + hasstatus => true, + } + + file { '/etc/iptables/iptables.rules': + ensure => present, + before => Service['iptables'], + } + + file { '/etc/iptables/ip6tables.rules': + ensure => present, + before => Service['ip6tables'], + } +} diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/firewall/manifests/linux/debian.pp b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/firewall/manifests/linux/debian.pp new file mode 100644 index 00000000000..4d28bc482e9 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/firewall/manifests/linux/debian.pp @@ -0,0 +1,44 @@ +# = Class: firewall::linux::debian +# +# Installs the `iptables-persistent` package for Debian-alike systems. This +# allows rules to be stored to file and restored on boot. +# +# == Parameters: +# +# [*ensure*] +# Ensure parameter passed onto Service[] resources. +# Default: running +# +# [*enable*] +# Enable parameter passed onto Service[] resources. +# Default: true +# +class firewall::linux::debian ( + $ensure = running, + $enable = true +) { + package { 'iptables-persistent': + ensure => present, + } + + if($::operatingsystemrelease =~ /^6\./ and $enable == true + and versioncmp($::iptables_persistent_version, '0.5.0') < 0 ) { + # This fixes a bug in the iptables-persistent LSB headers in 6.x, without it + # we lose idempotency + exec { 'iptables-persistent-enable': + logoutput => on_failure, + command => '/usr/sbin/update-rc.d iptables-persistent enable', + unless => '/usr/bin/test -f /etc/rcS.d/S*iptables-persistent', + require => Package['iptables-persistent'], + } + } else { + # This isn't a real service/daemon. The start action loads rules, so just + # needs to be called on system boot. + service { 'iptables-persistent': + ensure => undef, + enable => $enable, + hasstatus => true, + require => Package['iptables-persistent'], + } + } +} diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/firewall/manifests/linux/redhat.pp b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/firewall/manifests/linux/redhat.pp new file mode 100644 index 00000000000..f697d211b9f --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/firewall/manifests/linux/redhat.pp @@ -0,0 +1,40 @@ +# = Class: firewall::linux::redhat +# +# Manages the `iptables` service on RedHat-alike systems. +# +# == Parameters: +# +# [*ensure*] +# Ensure parameter passed onto Service[] resources. +# Default: running +# +# [*enable*] +# Enable parameter passed onto Service[] resources. +# Default: true +# +class firewall::linux::redhat ( + $ensure = running, + $enable = true +) { + + # RHEL 7 and later and Fedora 15 and later require the iptables-services + # package, which provides the /usr/libexec/iptables/iptables.init used by + # lib/puppet/util/firewall.rb. + if $::operatingsystem == RedHat and $::operatingsystemrelease >= 7 { + package { 'iptables-services': + ensure => present, + } + } + + if ($::operatingsystem == 'Fedora' and (( $::operatingsystemrelease =~ /^\d+/ and $::operatingsystemrelease >= 15 ) or $::operatingsystemrelease == "Rawhide")) { + package { 'iptables-services': + ensure => present, + } + } + + service { 'iptables': + ensure => $ensure, + enable => $enable, + hasstatus => true, + } +} diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/firewall/metadata.json b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/firewall/metadata.json new file mode 100644 index 00000000000..40fb8612bda --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/firewall/metadata.json @@ -0,0 +1,64 @@ +{ + "name": "puppetlabs-firewall", + "version": "1.1.1", + "source": "https://github.com/puppetlabs/puppetlabs-firewall", + "author": "Puppet Labs", + "license": "Apache-2.0", + "project_page": "https://github.com/puppetlabs/puppetlabs-firewall", + "summary": "Manages Firewalls such as iptable", + "operatingsystem_support": [ + { + "operatingsystem": "RedHat", + "operatingsystemrelease": [ + "5", + "6" + ] + }, + { + "operatingsystem": "CentOS", + "operatingsystemrelease": [ + "5", + "6" + ] + }, + { + "operatingsystem": "OracleLinux", + "operatingsystemrelease": [ + "5", + "6" + ] + }, + { + "operatingsystem": "Scientific", + "operatingsystemrelease": [ + "5", + "6" + ] + }, + { + "operatingsystem": "SLES", + "operatingsystemrelease": [ + "11 SP1" + ] + }, + { + "operatingsystem": "Debian", + "operatingsystemrelease": [ + "6", + "7" + ] + }, + { + "operatingsystem": "Ubuntu", + "operatingsystemrelease": [ + "10.04", + "12.04" + ] + } + ], + "requirements": [ + { "name": "pe", "version_requirement": "3.2.x" }, + { "name": "puppet", "version_requirement": "3.x" } + ], + "dependencies": [] +} diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/firewall/spec/acceptance/change_source_spec.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/firewall/spec/acceptance/change_source_spec.rb new file mode 100644 index 00000000000..cdb4eab3543 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/firewall/spec/acceptance/change_source_spec.rb @@ -0,0 +1,77 @@ +require 'spec_helper_acceptance' + +describe 'firewall type' do + describe 'reset' do + it 'deletes all rules' do + shell('iptables --flush; iptables -t nat --flush; iptables -t mangle --flush') + end + end + + describe 'when unmanaged rules exist' do + it 'applies with 8.0.0.1 first' do + pp = <<-EOS + class { '::firewall': } + firewall { '101 test source changes': + proto => tcp, + port => '101', + action => accept, + source => '8.0.0.1', + } + firewall { '100 test source static': + proto => tcp, + port => '100', + action => accept, + source => '8.0.0.2', + } + EOS + + apply_manifest(pp, :catch_failures => true) + end + + it 'adds a unmanaged rule without a comment' do + shell('iptables -A INPUT -t filter -s 8.0.0.3/32 -p tcp -m multiport --ports 102 -j ACCEPT') + expect(shell('iptables-save').stdout).to match(/-A INPUT -s 8\.0\.0\.3(\/32)? -p tcp -m multiport --ports 102 -j ACCEPT/) + end + + it 'contains the changable 8.0.0.1 rule' do + shell('iptables-save') do |r| + expect(r.stdout).to match(/-A INPUT -s 8\.0\.0\.1(\/32)? -p tcp -m multiport --ports 101 -m comment --comment "101 test source changes" -j ACCEPT/) + end + end + it 'contains the static 8.0.0.2 rule' do + shell('iptables-save') do |r| + expect(r.stdout).to match(/-A INPUT -s 8\.0\.0\.2(\/32)? -p tcp -m multiport --ports 100 -m comment --comment "100 test source static" -j ACCEPT/) + end + end + + it 'changes to 8.0.0.4 second' do + pp = <<-EOS + class { '::firewall': } + firewall { '101 test source changes': + proto => tcp, + port => '101', + action => accept, + source => '8.0.0.4', + } + EOS + + expect(apply_manifest(pp, :catch_failures => true).stdout).to match(/Notice: \/Stage\[main\]\/Main\/Firewall\[101 test source changes\]\/source: source changed '8\.0\.0\.1\/32' to '8\.0\.0\.4\/32'/) + end + + it 'does not contain the old changing 8.0.0.1 rule' do + shell('iptables-save') do |r| + expect(r.stdout).to_not match(/8\.0\.0\.1/) + end + end + it 'contains the staic 8.0.0.2 rule' do + shell('iptables-save') do |r| + expect(r.stdout).to match(/-A INPUT -s 8\.0\.0\.2(\/32)? -p tcp -m multiport --ports 100 -m comment --comment "100 test source static" -j ACCEPT/) + end + end + it 'contains the changing new 8.0.0.4 rule' do + shell('iptables-save') do |r| + expect(r.stdout).to match(/-A INPUT -s 8\.0\.0\.4(\/32)? -p tcp -m multiport --ports 101 -m comment --comment "101 test source changes" -j ACCEPT/) + end + end + end +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/firewall/spec/acceptance/class_spec.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/firewall/spec/acceptance/class_spec.rb new file mode 100644 index 00000000000..aaf05a1f53f --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/firewall/spec/acceptance/class_spec.rb @@ -0,0 +1,27 @@ +require 'spec_helper_acceptance' + +describe "firewall class:" do + it 'should run successfully' do + pp = "class { 'firewall': }" + + # Run it twice and test for idempotency + apply_manifest(pp, :catch_failures => true) + expect(apply_manifest(pp, :catch_failures => true).exit_code).to be_zero + end + + it 'ensure => stopped:' do + pp = "class { 'firewall': ensure => stopped }" + + # Run it twice and test for idempotency + apply_manifest(pp, :catch_failures => true) + expect(apply_manifest(pp, :catch_failures => true).exit_code).to be_zero + end + + it 'ensure => running:' do + pp = "class { 'firewall': ensure => running }" + + # Run it twice and test for idempotency + apply_manifest(pp, :catch_failures => true) + expect(apply_manifest(pp, :catch_failures => true).exit_code).to be_zero + end +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/firewall/spec/acceptance/connlimit_spec.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/firewall/spec/acceptance/connlimit_spec.rb new file mode 100644 index 00000000000..ce6cab4ed72 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/firewall/spec/acceptance/connlimit_spec.rb @@ -0,0 +1,55 @@ +require 'spec_helper_acceptance' + +describe 'firewall type' do + + describe 'connlimit_above' do + context '10' do + it 'applies' do + pp = <<-EOS + class { '::firewall': } + firewall { '500 - test': + proto => tcp, + dport => '22', + connlimit_above => '10', + action => reject, + } + EOS + + apply_manifest(pp, :catch_failures => true) + end + + it 'should contain the rule' do + shell('iptables-save') do |r| + #connlimit-saddr is added in Ubuntu 14.04. + expect(r.stdout).to match(/-A INPUT -p tcp -m multiport --dports 22 -m comment --comment "500 - test" -m connlimit --connlimit-above 10 --connlimit-mask 32 (--connlimit-saddr )?-j REJECT --reject-with icmp-port-unreachable/) + end + end + end + end + + describe 'connlimit_mask' do + context '24' do + it 'applies' do + pp = <<-EOS + class { '::firewall': } + firewall { '501 - test': + proto => tcp, + dport => '22', + connlimit_above => '10', + connlimit_mask => '24', + action => reject, + } + EOS + + apply_manifest(pp, :catch_failures => true) + end + + it 'should contain the rule' do + shell('iptables-save') do |r| + #connlimit-saddr is added in Ubuntu 14.04. + expect(r.stdout).to match(/-A INPUT -p tcp -m multiport --dports 22 -m comment --comment "501 - test" -m connlimit --connlimit-above 10 --connlimit-mask 24 (--connlimit-saddr )?-j REJECT --reject-with icmp-port-unreachable/) + end + end + end + end +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/firewall/spec/acceptance/connmark_spec.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/firewall/spec/acceptance/connmark_spec.rb new file mode 100644 index 00000000000..959efbdfa7b --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/firewall/spec/acceptance/connmark_spec.rb @@ -0,0 +1,27 @@ +require 'spec_helper_acceptance' + +describe 'firewall type' do + + describe 'connmark' do + context '50' do + it 'applies' do + pp = <<-EOS + class { '::firewall': } + firewall { '502 - test': + proto => 'all', + connmark => '0x1', + action => reject, + } + EOS + + apply_manifest(pp, :catch_failures => true) + end + + it 'should contain the rule' do + shell('iptables-save') do |r| + expect(r.stdout).to match(/-A INPUT -m comment --comment "502 - test" -m connmark --mark 0x1 -j REJECT --reject-with icmp-port-unreachable/) + end + end + end + end +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/firewall/spec/acceptance/firewall_spec.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/firewall/spec/acceptance/firewall_spec.rb new file mode 100644 index 00000000000..5353e104d59 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/firewall/spec/acceptance/firewall_spec.rb @@ -0,0 +1,1618 @@ +require 'spec_helper_acceptance' + +describe 'firewall type' do + + describe 'reset' do + it 'deletes all rules' do + shell('iptables --flush; iptables -t nat --flush; iptables -t mangle --flush') + end + end + + describe 'name' do + context 'valid' do + it 'applies cleanly' do + pp = <<-EOS + class { '::firewall': } + firewall { '001 - test': ensure => present } + EOS + + apply_manifest(pp, :catch_failures => true) + end + + end + + context 'invalid' do + it 'fails' do + pp = <<-EOS + class { '::firewall': } + firewall { 'test': ensure => present } + EOS + + apply_manifest(pp, :expect_failures => true) do |r| + expect(r.stderr).to match(/Invalid value "test"./) + end + end + end + end + + describe 'ensure' do + context 'default' do + it 'applies' do + pp = <<-EOS + class { '::firewall': } + firewall { '555 - test': + proto => tcp, + port => '555', + action => accept, + } + EOS + + apply_manifest(pp, :catch_failures => true) + end + + it 'should contain the rule' do + shell('iptables-save') do |r| + expect(r.stdout).to match(/-A INPUT -p tcp -m multiport --ports 555 -m comment --comment "555 - test" -j ACCEPT/) + end + end + end + + context 'present' do + it 'applies' do + pp = <<-EOS + class { '::firewall': } + firewall { '555 - test': + ensure => present, + proto => tcp, + port => '555', + action => accept, + } + EOS + + apply_manifest(pp, :catch_failures => true) + end + + it 'should contain the rule' do + shell('iptables-save') do |r| + expect(r.stdout).to match(/-A INPUT -p tcp -m multiport --ports 555 -m comment --comment "555 - test" -j ACCEPT/) + end + end + end + + context 'absent' do + it 'applies' do + pp = <<-EOS + class { '::firewall': } + firewall { '555 - test': + ensure => absent, + proto => tcp, + port => '555', + action => accept, + } + EOS + + apply_manifest(pp, :catch_failures => true) + end + + it 'should not contain the rule' do + shell('iptables-save') do |r| + expect(r.stdout).to_not match(/-A INPUT -p tcp -m multiport --ports 555 -m comment --comment "555 - test" -j ACCEPT/) + end + end + end + end + + describe 'source' do + context '192.168.2.0/24' do + it 'applies' do + pp = <<-EOS + class { '::firewall': } + firewall { '556 - test': + proto => tcp, + port => '556', + action => accept, + source => '192.168.2.0/24', + } + EOS + + apply_manifest(pp, :catch_failures => true) + apply_manifest(pp, :catch_changes => true) + end + + it 'should contain the rule' do + shell('iptables-save') do |r| + expect(r.stdout).to match(/-A INPUT -s 192.168.2.0\/(24|255\.255\.255\.0) -p tcp -m multiport --ports 556 -m comment --comment "556 - test" -j ACCEPT/) + end + end + end + + context '! 192.168.2.0/24' do + it 'applies' do + pp = <<-EOS + class { '::firewall': } + firewall { '556 - test': + proto => tcp, + port => '556', + action => accept, + source => '! 192.168.2.0/24', + } + EOS + + apply_manifest(pp, :catch_failures => true) + apply_manifest(pp, :catch_changes => true) + end + + it 'should contain the rule' do + shell('iptables-save') do |r| + expect(r.stdout).to match(/-A INPUT (! -s|-s !) 192.168.2.0\/(24|255\.255\.255\.0) -p tcp -m multiport --ports 556 -m comment --comment "556 - test" -j ACCEPT/) + end + end + end + + # Invalid address + context '256.168.2.0/24' do + it 'applies' do + pp = <<-EOS + class { '::firewall': } + firewall { '556 - test': + proto => tcp, + port => '556', + action => accept, + source => '256.168.2.0/24', + } + EOS + + apply_manifest(pp, :expect_failures => true) do |r| + expect(r.stderr).to match(/host_to_ip failed for 256.168.2.0\/(24|255\.255\.255\.0)/) + end + end + + it 'should not contain the rule' do + shell('iptables-save') do |r| + expect(r.stdout).to_not match(/-A INPUT -s 256.168.2.0\/(24|255\.255\.255\.0) -p tcp -m multiport --ports 556 -m comment --comment "556 - test" -j ACCEPT/) + end + end + end + end + + describe 'src_range' do + context '192.168.1.1-192.168.1.10' do + it 'applies' do + pp = <<-EOS + class { '::firewall': } + firewall { '557 - test': + proto => tcp, + port => '557', + action => accept, + src_range => '192.168.1.1-192.168.1.10', + } + EOS + + apply_manifest(pp, :catch_failures => true) + apply_manifest(pp, :catch_changes => true) + end + + it 'should contain the rule' do + shell('iptables-save') do |r| + expect(r.stdout).to match(/-A INPUT -p tcp -m iprange --src-range 192.168.1.1-192.168.1.10 -m multiport --ports 557 -m comment --comment "557 - test" -j ACCEPT/) + end + end + end + + # Invalid IP + context '392.168.1.1-192.168.1.10' do + it 'applies' do + pp = <<-EOS + class { '::firewall': } + firewall { '557 - test': + proto => tcp, + port => '557', + action => accept, + src_range => '392.168.1.1-192.168.1.10', + } + EOS + + apply_manifest(pp, :expect_failures => true) do |r| + expect(r.stderr).to match(/Invalid value "392.168.1.1-192.168.1.10"/) + end + end + + it 'should not contain the rule' do + shell('iptables-save') do |r| + expect(r.stdout).to_not match(/-A INPUT -p tcp -m iprange --src-range 392.168.1.1-192.168.1.10 -m multiport --ports 557 -m comment --comment "557 - test" -j ACCEPT/) + end + end + end + end + + describe 'destination' do + context '192.168.2.0/24' do + it 'applies' do + pp = <<-EOS + class { '::firewall': } + firewall { '558 - test': + proto => tcp, + port => '558', + action => accept, + destination => '192.168.2.0/24', + } + EOS + + apply_manifest(pp, :catch_failures => true) + apply_manifest(pp, :catch_changes => true) + end + + it 'should contain the rule' do + shell('iptables-save') do |r| + expect(r.stdout).to match(/-A INPUT -d 192.168.2.0\/(24|255\.255\.255\.0) -p tcp -m multiport --ports 558 -m comment --comment "558 - test" -j ACCEPT/) + end + end + end + + context '! 192.168.2.0/24' do + it 'applies' do + pp = <<-EOS + class { '::firewall': } + firewall { '558 - test': + proto => tcp, + port => '558', + action => accept, + destination => '! 192.168.2.0/24', + } + EOS + + apply_manifest(pp, :catch_failures => true) + apply_manifest(pp, :catch_changes => true) + end + + it 'should contain the rule' do + shell('iptables-save') do |r| + expect(r.stdout).to match(/-A INPUT (! -d|-d !) 192.168.2.0\/(24|255\.255\.255\.0) -p tcp -m multiport --ports 558 -m comment --comment "558 - test" -j ACCEPT/) + end + end + end + + # Invalid address + context '256.168.2.0/24' do + it 'applies' do + pp = <<-EOS + class { '::firewall': } + firewall { '558 - test': + proto => tcp, + port => '558', + action => accept, + destination => '256.168.2.0/24', + } + EOS + + apply_manifest(pp, :expect_failures => true) do |r| + expect(r.stderr).to match(/host_to_ip failed for 256.168.2.0\/(24|255\.255\.255\.0)/) + end + end + + it 'should not contain the rule' do + shell('iptables-save') do |r| + expect(r.stdout).to_not match(/-A INPUT -d 256.168.2.0\/(24|255\.255\.255\.0) -p tcp -m multiport --ports 558 -m comment --comment "558 - test" -j ACCEPT/) + end + end + end + end + + describe 'dst_range' do + context '192.168.1.1-192.168.1.10' do + it 'applies' do + pp = <<-EOS + class { '::firewall': } + firewall { '559 - test': + proto => tcp, + port => '559', + action => accept, + dst_range => '192.168.1.1-192.168.1.10', + } + EOS + + apply_manifest(pp, :catch_failures => true) + apply_manifest(pp, :catch_changes => true) + end + + it 'should contain the rule' do + shell('iptables-save') do |r| + expect(r.stdout).to match(/-A INPUT -p tcp -m iprange --dst-range 192.168.1.1-192.168.1.10 -m multiport --ports 559 -m comment --comment "559 - test" -j ACCEPT/) + end + end + end + + # Invalid IP + context '392.168.1.1-192.168.1.10' do + it 'applies' do + pp = <<-EOS + class { '::firewall': } + firewall { '559 - test': + proto => tcp, + port => '559', + action => accept, + dst_range => '392.168.1.1-192.168.1.10', + } + EOS + + apply_manifest(pp, :expect_failures => true) do |r| + expect(r.stderr).to match(/Invalid value "392.168.1.1-192.168.1.10"/) + end + end + + it 'should not contain the rule' do + shell('iptables-save') do |r| + expect(r.stdout).to_not match(/-A INPUT -p tcp -m iprange --dst-range 392.168.1.1-192.168.1.10 -m multiport --ports 559 -m comment --comment "559 - test" -j ACCEPT/) + end + end + end + end + + describe 'sport' do + context 'single port' do + it 'applies' do + pp = <<-EOS + class { '::firewall': } + firewall { '560 - test': + proto => tcp, + sport => '560', + action => accept, + } + EOS + + apply_manifest(pp, :catch_failures => true) + end + + it 'should contain the rule' do + shell('iptables-save') do |r| + expect(r.stdout).to match(/-A INPUT -p tcp -m multiport --sports 560 -m comment --comment "560 - test" -j ACCEPT/) + end + end + end + + context 'multiple ports' do + it 'applies' do + pp = <<-EOS + class { '::firewall': } + firewall { '560 - test': + proto => tcp, + sport => '560-561', + action => accept, + } + EOS + + apply_manifest(pp, :catch_failures => true) + end + + it 'should contain the rule' do + shell('iptables-save') do |r| + expect(r.stdout).to match(/-A INPUT -p tcp -m multiport --sports 560:561 -m comment --comment "560 - test" -j ACCEPT/) + end + end + end + + context 'invalid ports' do + it 'applies' do + pp = <<-EOS + class { '::firewall': } + firewall { '560 - test': + proto => tcp, + sport => '9999560-561', + action => accept, + } + EOS + + apply_manifest(pp, :expect_failures => true) do |r| + expect(r.stderr).to match(/invalid port\/service `9999560' specified/) + end + end + + it 'should contain the rule' do + shell('iptables-save') do |r| + expect(r.stdout).to_not match(/-A INPUT -p tcp -m multiport --sports 9999560-561 -m comment --comment "560 - test" -j ACCEPT/) + end + end + end + end + + describe 'dport' do + context 'single port' do + it 'applies' do + pp = <<-EOS + class { '::firewall': } + firewall { '561 - test': + proto => tcp, + dport => '561', + action => accept, + } + EOS + + apply_manifest(pp, :catch_failures => true) + end + + it 'should contain the rule' do + shell('iptables-save') do |r| + expect(r.stdout).to match(/-A INPUT -p tcp -m multiport --dports 561 -m comment --comment "561 - test" -j ACCEPT/) + end + end + end + + context 'multiple ports' do + it 'applies' do + pp = <<-EOS + class { '::firewall': } + firewall { '561 - test': + proto => tcp, + dport => '561-562', + action => accept, + } + EOS + + apply_manifest(pp, :catch_failures => true) + end + + it 'should contain the rule' do + shell('iptables-save') do |r| + expect(r.stdout).to match(/-A INPUT -p tcp -m multiport --dports 561:562 -m comment --comment "561 - test" -j ACCEPT/) + end + end + end + + context 'invalid ports' do + it 'applies' do + pp = <<-EOS + class { '::firewall': } + firewall { '561 - test': + proto => tcp, + dport => '9999561-562', + action => accept, + } + EOS + + apply_manifest(pp, :expect_failures => true) do |r| + expect(r.stderr).to match(/invalid port\/service `9999561' specified/) + end + end + + it 'should contain the rule' do + shell('iptables-save') do |r| + expect(r.stdout).to_not match(/-A INPUT -p tcp -m multiport --dports 9999561-562 -m comment --comment "560 - test" -j ACCEPT/) + end + end + end + end + + describe 'port' do + context 'single port' do + it 'applies' do + pp = <<-EOS + class { '::firewall': } + firewall { '562 - test': + proto => tcp, + port => '562', + action => accept, + } + EOS + + apply_manifest(pp, :catch_failures => true) + end + + it 'should contain the rule' do + shell('iptables-save') do |r| + expect(r.stdout).to match(/-A INPUT -p tcp -m multiport --ports 562 -m comment --comment "562 - test" -j ACCEPT/) + end + end + end + + context 'multiple ports' do + it 'applies' do + pp = <<-EOS + class { '::firewall': } + firewall { '562 - test': + proto => tcp, + port => '562-563', + action => accept, + } + EOS + + apply_manifest(pp, :catch_failures => true) + end + + it 'should contain the rule' do + shell('iptables-save') do |r| + expect(r.stdout).to match(/-A INPUT -p tcp -m multiport --ports 562:563 -m comment --comment "562 - test" -j ACCEPT/) + end + end + end + + context 'invalid ports' do + it 'applies' do + pp = <<-EOS + class { '::firewall': } + firewall { '562 - test': + proto => tcp, + port => '9999562-563', + action => accept, + } + EOS + + apply_manifest(pp, :expect_failures => true) do |r| + expect(r.stderr).to match(/invalid port\/service `9999562' specified/) + end + end + + it 'should contain the rule' do + shell('iptables-save') do |r| + expect(r.stdout).to_not match(/-A INPUT -p tcp -m multiport --ports 9999562-563 -m comment --comment "562 - test" -j ACCEPT/) + end + end + end + end + + ['dst_type', 'src_type'].each do |type| + describe "#{type}" do + context 'MULTICAST' do + it 'applies' do + pp = <<-EOS + class { '::firewall': } + firewall { '563 - test': + proto => tcp, + action => accept, + #{type} => 'MULTICAST', + } + EOS + + apply_manifest(pp, :catch_failures => true) + end + + it 'should contain the rule' do + shell('iptables-save') do |r| + expect(r.stdout).to match(/-A INPUT -p tcp -m addrtype\s.*\sMULTICAST -m comment --comment "563 - test" -j ACCEPT/) + end + end + end + + context 'BROKEN' do + it 'fails' do + pp = <<-EOS + class { '::firewall': } + firewall { '563 - test': + proto => tcp, + action => accept, + #{type} => 'BROKEN', + } + EOS + + apply_manifest(pp, :expect_failures => true) do |r| + expect(r.stderr).to match(/Invalid value "BROKEN"./) + end + end + + it 'should not contain the rule' do + shell('iptables-save') do |r| + expect(r.stdout).to_not match(/-A INPUT -p tcp -m addrtype\s.*\sBROKEN -m comment --comment "563 - test" -j ACCEPT/) + end + end + end + end + end + + describe 'tcp_flags' do + context 'FIN,SYN ACK' do + it 'applies' do + pp = <<-EOS + class { '::firewall': } + firewall { '564 - test': + proto => tcp, + action => accept, + tcp_flags => 'FIN,SYN ACK', + } + EOS + + apply_manifest(pp, :catch_failures => true) + end + + it 'should contain the rule' do + shell('iptables-save') do |r| + expect(r.stdout).to match(/-A INPUT -p tcp -m tcp --tcp-flags FIN,SYN ACK -m comment --comment "564 - test" -j ACCEPT/) + end + end + end + end + + describe 'chain' do + context 'INPUT' do + it 'applies' do + pp = <<-EOS + class { '::firewall': } + firewall { '565 - test': + proto => tcp, + action => accept, + chain => 'FORWARD', + } + EOS + + apply_manifest(pp, :catch_failures => true) + end + + it 'should contain the rule' do + shell('iptables-save') do |r| + expect(r.stdout).to match(/-A FORWARD -p tcp -m comment --comment "565 - test" -j ACCEPT/) + end + end + end + end + + describe 'table' do + context 'mangle' do + it 'applies' do + pp = <<-EOS + class { '::firewall': } + firewall { '566 - test': + proto => tcp, + action => accept, + table => 'mangle', + } + EOS + + apply_manifest(pp, :catch_failures => true) + end + + it 'should contain the rule' do + shell('iptables-save -t mangle') do |r| + expect(r.stdout).to match(/-A INPUT -p tcp -m comment --comment "566 - test" -j ACCEPT/) + end + end + end + context 'nat' do + it 'applies' do + pp = <<-EOS + class { '::firewall': } + firewall { '566 - test2': + proto => tcp, + action => accept, + table => 'nat', + chain => 'OUTPUT', + } + EOS + + apply_manifest(pp, :catch_failures => true) + end + + it 'should not contain the rule' do + shell('iptables-save -t nat') do |r| + expect(r.stdout).to match(/-A OUTPUT -p tcp -m comment --comment "566 - test2" -j ACCEPT/) + end + end + end + end + + describe 'jump' do + after :all do + iptables_flush_all_tables + expect(shell('iptables -t filter -X TEST').stderr).to eq("") + end + + context 'MARK' do + it 'applies' do + pp = <<-EOS + class { '::firewall': } + firewallchain { 'TEST:filter:IPv4': + ensure => present, + } + firewall { '567 - test': + proto => tcp, + chain => 'INPUT', + jump => 'TEST', + } + EOS + + apply_manifest(pp, :catch_failures => true) + end + + it 'should contain the rule' do + shell('iptables-save') do |r| + expect(r.stdout).to match(/-A INPUT -p tcp -m comment --comment "567 - test" -j TEST/) + end + end + end + + context 'jump and apply' do + it 'applies' do + pp = <<-EOS + class { '::firewall': } + firewallchain { 'TEST:filter:IPv4': + ensure => present, + } + firewall { '568 - test': + proto => tcp, + chain => 'INPUT', + action => 'accept', + jump => 'TEST', + } + EOS + + apply_manifest(pp, :expect_failures => true) do |r| + expect(r.stderr).to match(/Only one of the parameters 'action' and 'jump' can be set/) + end + end + + it 'should not contain the rule' do + shell('iptables-save') do |r| + expect(r.stdout).to_not match(/-A INPUT -p tcp -m comment --comment "568 - test" -j TEST/) + end + end + end + end + + describe 'tosource' do + context '192.168.1.1' do + it 'applies' do + pp = <<-EOS + class { '::firewall': } + firewall { '568 - test': + proto => tcp, + table => 'nat', + chain => 'POSTROUTING', + jump => 'SNAT', + tosource => '192.168.1.1', + } + EOS + + apply_manifest(pp, :catch_failures => true) + end + + it 'should contain the rule' do + shell('iptables-save -t nat') do |r| + expect(r.stdout).to match(/A POSTROUTING -p tcp -m comment --comment "568 - test" -j SNAT --to-source 192.168.1.1/) + end + end + end + end + + describe 'todest' do + context '192.168.1.1' do + it 'applies' do + pp = <<-EOS + class { '::firewall': } + firewall { '569 - test': + proto => tcp, + table => 'nat', + chain => 'PREROUTING', + jump => 'DNAT', + source => '200.200.200.200', + todest => '192.168.1.1', + } + EOS + + apply_manifest(pp, :catch_failures => true) + end + + it 'should contain the rule' do + shell('iptables-save -t nat') do |r| + expect(r.stdout).to match(/-A PREROUTING -s 200.200.200.200(\/32)? -p tcp -m comment --comment "569 - test" -j DNAT --to-destination 192.168.1.1/) + end + end + end + end + + describe 'toports' do + context '192.168.1.1' do + it 'applies' do + pp = <<-EOS + class { '::firewall': } + firewall { '570 - test': + proto => icmp, + table => 'nat', + chain => 'PREROUTING', + jump => 'REDIRECT', + toports => '2222', + } + EOS + + apply_manifest(pp, :catch_failures => true) + end + + it 'should contain the rule' do + shell('iptables-save -t nat') do |r| + expect(r.stdout).to match(/-A PREROUTING -p icmp -m comment --comment "570 - test" -j REDIRECT --to-ports 2222/) + end + end + end + end + + # RHEL5 does not support --random + if default['platform'] !~ /el-5/ + describe 'random' do + context '192.168.1.1' do + it 'applies' do + pp = <<-EOS + class { '::firewall': } + firewall { '570 - test 2': + proto => all, + table => 'nat', + chain => 'POSTROUTING', + jump => 'MASQUERADE', + source => '172.30.0.0/16', + random => true + } + EOS + + apply_manifest(pp, :catch_failures => true) + apply_manifest(pp, :catch_changes => true) + end + + it 'should contain the rule' do + shell('iptables-save -t nat') do |r| + expect(r.stdout).to match(/-A POSTROUTING -s 172\.30\.0\.0\/16 -m comment --comment "570 - test 2" -j MASQUERADE --random/) + end + end + end + end + end + + describe 'icmp' do + context 'any' do + it 'fails' do + pp = <<-EOS + class { '::firewall': } + firewall { '571 - test': + proto => icmp, + icmp => 'any', + } + EOS + + apply_manifest(pp, :expect_failures => true) do |r| + expect(r.stderr).to match(/This behaviour should be achieved by omitting or undefining the ICMP parameter/) + end + end + + it 'should not contain the rule' do + shell('iptables-save') do |r| + expect(r.stdout).to_not match(/-A INPUT -p icmp -m comment --comment "570 - test" -m icmp --icmp-type 11/) + end + end + end + end + + #iptables version 1.3.5 is not suppored by the ip6tables provider + if default['platform'] !~ /el-5/ + describe 'hop_limit' do + context '5' do + it 'applies' do + pp = <<-EOS + class { '::firewall': } + firewall { '571 - test': + ensure => present, + proto => tcp, + port => '571', + action => accept, + hop_limit => '5', + provider => 'ip6tables', + } + EOS + + apply_manifest(pp, :catch_failures => true) + end + + it 'should contain the rule' do + shell('ip6tables-save') do |r| + expect(r.stdout).to match(/-A INPUT -p tcp -m multiport --ports 571 -m comment --comment "571 - test" -m hl --hl-eq 5 -j ACCEPT/) + end + end + end + + context 'invalid' do + it 'applies' do + pp = <<-EOS + class { '::firewall': } + firewall { '571 - test': + ensure => present, + proto => tcp, + port => '571', + action => accept, + hop_limit => 'invalid', + provider => 'ip6tables', + } + EOS + + apply_manifest(pp, :expect_failures => true) do |r| + expect(r.stderr).to match(/Invalid value "invalid"./) + end + end + + it 'should not contain the rule' do + shell('ip6tables-save') do |r| + expect(r.stdout).to_not match(/-A INPUT -p tcp -m multiport --ports 571 -m comment --comment "571 - test" -m hl --hl-eq invalid -j ACCEPT/) + end + end + end + end + + describe 'ishasmorefrags' do + context 'true' do + it 'applies' do + pp = <<-EOS + class { '::firewall': } + firewall { '587 - test': + ensure => present, + proto => tcp, + port => '587', + action => accept, + ishasmorefrags => true, + provider => 'ip6tables', + } + EOS + + apply_manifest(pp, :catch_failures => true) + end + + it 'should contain the rule' do + shell('ip6tables-save') do |r| + expect(r.stdout).to match(/A INPUT -p tcp -m frag --fragid 0 --fragmore -m multiport --ports 587 -m comment --comment "587 - test" -j ACCEPT/) + end + end + end + + context 'false' do + it 'applies' do + pp = <<-EOS + class { '::firewall': } + firewall { '588 - test': + ensure => present, + proto => tcp, + port => '588', + action => accept, + ishasmorefrags => false, + provider => 'ip6tables', + } + EOS + + apply_manifest(pp, :catch_failures => true) + end + + it 'should contain the rule' do + shell('ip6tables-save') do |r| + expect(r.stdout).to match(/-A INPUT -p tcp -m multiport --ports 588 -m comment --comment "588 - test" -j ACCEPT/) + end + end + end + end + + describe 'islastfrag' do + context 'true' do + it 'applies' do + pp = <<-EOS + class { '::firewall': } + firewall { '589 - test': + ensure => present, + proto => tcp, + port => '589', + action => accept, + islastfrag => true, + provider => 'ip6tables', + } + EOS + + apply_manifest(pp, :catch_failures => true) + end + + it 'should contain the rule' do + shell('ip6tables-save') do |r| + expect(r.stdout).to match(/-A INPUT -p tcp -m frag --fragid 0 --fraglast -m multiport --ports 589 -m comment --comment "589 - test" -j ACCEPT/) + end + end + end + + context 'false' do + it 'applies' do + pp = <<-EOS + class { '::firewall': } + firewall { '590 - test': + ensure => present, + proto => tcp, + port => '590', + action => accept, + islastfrag => false, + provider => 'ip6tables', + } + EOS + + apply_manifest(pp, :catch_failures => true) + end + + it 'should contain the rule' do + shell('ip6tables-save') do |r| + expect(r.stdout).to match(/-A INPUT -p tcp -m multiport --ports 590 -m comment --comment "590 - test" -j ACCEPT/) + end + end + end + end + + describe 'isfirstfrag' do + context 'true' do + it 'applies' do + pp = <<-EOS + class { '::firewall': } + firewall { '591 - test': + ensure => present, + proto => tcp, + port => '591', + action => accept, + isfirstfrag => true, + provider => 'ip6tables', + } + EOS + + apply_manifest(pp, :catch_failures => true) + end + + it 'should contain the rule' do + shell('ip6tables-save') do |r| + expect(r.stdout).to match(/-A INPUT -p tcp -m frag --fragid 0 --fragfirst -m multiport --ports 591 -m comment --comment "591 - test" -j ACCEPT/) + end + end + end + + context 'false' do + it 'applies' do + pp = <<-EOS + class { '::firewall': } + firewall { '592 - test': + ensure => present, + proto => tcp, + port => '592', + action => accept, + isfirstfrag => false, + provider => 'ip6tables', + } + EOS + + apply_manifest(pp, :catch_failures => true) + end + + it 'should contain the rule' do + shell('ip6tables-save') do |r| + expect(r.stdout).to match(/-A INPUT -p tcp -m multiport --ports 592 -m comment --comment "592 - test" -j ACCEPT/) + end + end + end + end + end + + describe 'limit' do + context '500/sec' do + it 'applies' do + pp = <<-EOS + class { '::firewall': } + firewall { '572 - test': + ensure => present, + proto => tcp, + port => '572', + action => accept, + limit => '500/sec', + } + EOS + + apply_manifest(pp, :catch_failures => true) + end + + it 'should contain the rule' do + shell('iptables-save') do |r| + expect(r.stdout).to match(/-A INPUT -p tcp -m multiport --ports 572 -m comment --comment "572 - test" -m limit --limit 500\/sec -j ACCEPT/) + end + end + end + end + + describe 'burst' do + context '500' do + it 'applies' do + pp = <<-EOS + class { '::firewall': } + firewall { '573 - test': + ensure => present, + proto => tcp, + port => '573', + action => accept, + limit => '500/sec', + burst => '1500', + } + EOS + + apply_manifest(pp, :catch_failures => true) + end + + it 'should contain the rule' do + shell('iptables-save') do |r| + expect(r.stdout).to match(/-A INPUT -p tcp -m multiport --ports 573 -m comment --comment "573 - test" -m limit --limit 500\/sec --limit-burst 1500 -j ACCEPT/) + end + end + end + + context 'invalid' do + it 'applies' do + pp = <<-EOS + class { '::firewall': } + firewall { '571 - test': + ensure => present, + proto => tcp, + port => '571', + action => accept, + limit => '500/sec', + burst => '1500/sec', + } + EOS + + apply_manifest(pp, :expect_failures => true) do |r| + expect(r.stderr).to match(/Invalid value "1500\/sec"./) + end + end + + it 'should not contain the rule' do + shell('iptables-save') do |r| + expect(r.stdout).to_not match(/-A INPUT -p tcp -m multiport --ports 573 -m comment --comment "573 - test" -m limit --limit 500\/sec --limit-burst 1500\/sec -j ACCEPT/) + end + end + end + end + + describe 'uid' do + context 'nobody' do + it 'applies' do + pp = <<-EOS + class { '::firewall': } + firewall { '574 - test': + ensure => present, + proto => tcp, + chain => 'OUTPUT', + port => '574', + action => accept, + uid => 'nobody', + } + EOS + + apply_manifest(pp, :catch_failures => true) + end + + it 'should contain the rule' do + shell('iptables-save') do |r| + expect(r.stdout).to match(/-A OUTPUT -p tcp -m owner --uid-owner (nobody|\d+) -m multiport --ports 574 -m comment --comment "574 - test" -j ACCEPT/) + end + end + end + end + + describe 'gid' do + context 'root' do + it 'applies' do + pp = <<-EOS + class { '::firewall': } + firewall { '575 - test': + ensure => present, + proto => tcp, + chain => 'OUTPUT', + port => '575', + action => accept, + gid => 'root', + } + EOS + + apply_manifest(pp, :catch_failures => true) + end + + it 'should contain the rule' do + shell('iptables-save') do |r| + expect(r.stdout).to match(/-A OUTPUT -p tcp -m owner --gid-owner (root|\d+) -m multiport --ports 575 -m comment --comment "575 - test" -j ACCEPT/) + end + end + end + end + + #iptables version 1.3.5 does not support masks on MARK rules + if default['platform'] !~ /el-5/ + describe 'set_mark' do + context '0x3e8/0xffffffff' do + it 'applies' do + pp = <<-EOS + class { '::firewall': } + firewall { '580 - test': + ensure => present, + chain => 'OUTPUT', + proto => tcp, + port => '580', + jump => 'MARK', + table => 'mangle', + set_mark => '0x3e8/0xffffffff', + } + EOS + + apply_manifest(pp, :catch_failures => true) + end + + it 'should contain the rule' do + shell('iptables-save -t mangle') do |r| + expect(r.stdout).to match(/-A OUTPUT -p tcp -m multiport --ports 580 -m comment --comment "580 - test" -j MARK --set-xmark 0x3e8\/0xffffffff/) + end + end + end + end + end + + describe 'pkttype' do + context 'multicast' do + it 'applies' do + pp = <<-EOS + class { '::firewall': } + firewall { '581 - test': + ensure => present, + proto => tcp, + port => '581', + action => accept, + pkttype => 'multicast', + } + EOS + + apply_manifest(pp, :catch_failures => true) + end + + it 'should contain the rule' do + shell('iptables-save') do |r| + expect(r.stdout).to match(/-A INPUT -p tcp -m multiport --ports 581 -m pkttype --pkt-type multicast -m comment --comment "581 - test" -j ACCEPT/) + end + end + end + + context 'test' do + it 'applies' do + pp = <<-EOS + class { '::firewall': } + firewall { '582 - test': + ensure => present, + proto => tcp, + port => '582', + action => accept, + pkttype => 'test', + } + EOS + + apply_manifest(pp, :expect_failures => true) do |r| + expect(r.stderr).to match(/Invalid value "test"./) + end + end + + it 'should not contain the rule' do + shell('iptables-save') do |r| + expect(r.stdout).to_not match(/-A INPUT -p tcp -m multiport --ports 582 -m pkttype --pkt-type multicast -m comment --comment "582 - test" -j ACCEPT/) + end + end + end + end + + describe 'isfragment' do + context 'true' do + it 'applies' do + pp = <<-EOS + class { '::firewall': } + firewall { '583 - test': + ensure => present, + proto => tcp, + port => '583', + action => accept, + isfragment => true, + } + EOS + + apply_manifest(pp, :catch_failures => true) + end + + it 'should contain the rule' do + shell('iptables-save') do |r| + expect(r.stdout).to match(/-A INPUT -p tcp -f -m multiport --ports 583 -m comment --comment "583 - test" -j ACCEPT/) + end + end + end + + context 'false' do + it 'applies' do + pp = <<-EOS + class { '::firewall': } + firewall { '584 - test': + ensure => present, + proto => tcp, + port => '584', + action => accept, + isfragment => false, + } + EOS + + apply_manifest(pp, :catch_failures => true) + end + + it 'should contain the rule' do + shell('iptables-save') do |r| + expect(r.stdout).to match(/-A INPUT -p tcp -m multiport --ports 584 -m comment --comment "584 - test" -j ACCEPT/) + end + end + end + end + + # RHEL5/SLES does not support -m socket + describe 'socket', :unless => (default['platform'] =~ /el-5/ or fact('operatingsystem') == 'SLES') do + context 'true' do + it 'applies' do + pp = <<-EOS + class { '::firewall': } + firewall { '585 - test': + ensure => present, + proto => tcp, + port => '585', + action => accept, + chain => 'PREROUTING', + table => 'nat', + socket => true, + } + EOS + + apply_manifest(pp, :catch_failures => true) + end + + it 'should contain the rule' do + shell('iptables-save -t nat') do |r| + expect(r.stdout).to match(/-A PREROUTING -p tcp -m multiport --ports 585 -m socket -m comment --comment "585 - test" -j ACCEPT/) + end + end + end + + context 'false' do + it 'applies' do + pp = <<-EOS + class { '::firewall': } + firewall { '586 - test': + ensure => present, + proto => tcp, + port => '586', + action => accept, + chain => 'PREROUTING', + table => 'nat', + socket => false, + } + EOS + + apply_manifest(pp, :catch_failures => true) + end + + it 'should contain the rule' do + shell('iptables-save -t nat') do |r| + expect(r.stdout).to match(/-A PREROUTING -p tcp -m multiport --ports 586 -m comment --comment "586 - test" -j ACCEPT/) + end + end + end + end + + describe 'ipsec_policy' do + context 'ipsec' do + it 'applies' do + pp = <<-EOS + class { '::firewall': } + firewall { '593 - test': + ensure => 'present', + action => 'reject', + chain => 'OUTPUT', + destination => '20.0.0.0/8', + ipsec_dir => 'out', + ipsec_policy => 'ipsec', + proto => 'all', + reject => 'icmp-net-unreachable', + table => 'filter', + } + EOS + + apply_manifest(pp, :catch_failures => true) + end + + it 'should contain the rule' do + shell('iptables-save') do |r| + expect(r.stdout).to match(/-A OUTPUT -d 20.0.0.0\/(8|255\.0\.0\.0) -m comment --comment "593 - test" -m policy --dir out --pol ipsec -j REJECT --reject-with icmp-net-unreachable/) + end + end + end + + context 'none' do + it 'applies' do + pp = <<-EOS + class { '::firewall': } + firewall { '594 - test': + ensure => 'present', + action => 'reject', + chain => 'OUTPUT', + destination => '20.0.0.0/8', + ipsec_dir => 'out', + ipsec_policy => 'none', + proto => 'all', + reject => 'icmp-net-unreachable', + table => 'filter', + } + EOS + + apply_manifest(pp, :catch_failures => true) + end + + it 'should contain the rule' do + shell('iptables-save') do |r| + expect(r.stdout).to match(/-A OUTPUT -d 20.0.0.0\/(8|255\.0\.0\.0) -m comment --comment "594 - test" -m policy --dir out --pol none -j REJECT --reject-with icmp-net-unreachable/) + end + end + end + end + + describe 'ipsec_dir' do + context 'out' do + it 'applies' do + pp = <<-EOS + class { '::firewall': } + firewall { '595 - test': + ensure => 'present', + action => 'reject', + chain => 'OUTPUT', + destination => '20.0.0.0/8', + ipsec_dir => 'out', + ipsec_policy => 'ipsec', + proto => 'all', + reject => 'icmp-net-unreachable', + table => 'filter', + } + EOS + + apply_manifest(pp, :catch_failures => true) + end + + it 'should contain the rule' do + shell('iptables-save') do |r| + expect(r.stdout).to match(/-A OUTPUT -d 20.0.0.0\/(8|255\.0\.0\.0) -m comment --comment "595 - test" -m policy --dir out --pol ipsec -j REJECT --reject-with icmp-net-unreachable/) + end + end + end + + context 'in' do + it 'applies' do + pp = <<-EOS + class { '::firewall': } + firewall { '596 - test': + ensure => 'present', + action => 'reject', + chain => 'INPUT', + destination => '20.0.0.0/8', + ipsec_dir => 'in', + ipsec_policy => 'none', + proto => 'all', + reject => 'icmp-net-unreachable', + table => 'filter', + } + EOS + + apply_manifest(pp, :catch_failures => true) + end + + it 'should contain the rule' do + shell('iptables-save') do |r| + expect(r.stdout).to match(/-A INPUT -d 20.0.0.0\/(8|255\.0\.0\.0) -m comment --comment "596 - test" -m policy --dir in --pol none -j REJECT --reject-with icmp-net-unreachable/) + end + end + end + end + + describe 'recent' do + context 'set' do + it 'applies' do + pp = <<-EOS + class { '::firewall': } + firewall { '597 - test': + ensure => 'present', + chain => 'INPUT', + destination => '30.0.0.0/8', + proto => 'all', + table => 'filter', + recent => 'set', + rdest => true, + rname => 'list1', + } + EOS + + apply_manifest(pp, :catch_failures => true) + end + + it 'should contain the rule' do + shell('iptables-save') do |r| + # Mask added as of Ubuntu 14.04. + expect(r.stdout).to match(/-A INPUT -d 30.0.0.0\/(8|255\.0\.0\.0) -m comment --comment "597 - test" -m recent --set --name list1 (--mask 255.255.255.255 )?--rdest/) + end + end + end + + context 'rcheck' do + it 'applies' do + pp = <<-EOS + class { '::firewall': } + firewall { '598 - test': + ensure => 'present', + chain => 'INPUT', + destination => '30.0.0.0/8', + proto => 'all', + table => 'filter', + recent => 'rcheck', + rsource => true, + rname => 'list1', + rseconds => 60, + rhitcount => 5, + rttl => true, + } + EOS + + apply_manifest(pp, :catch_failures => true) + end + + it 'should contain the rule' do + shell('iptables-save') do |r| + expect(r.stdout).to match(/-A INPUT -d 30.0.0.0\/(8|255\.0\.0\.0) -m comment --comment "598 - test" -m recent --rcheck --seconds 60 --hitcount 5 --rttl --name list1 (--mask 255.255.255.255 )?--rsource/) + end + end + end + + context 'update' do + it 'applies' do + pp = <<-EOS + class { '::firewall': } + firewall { '599 - test': + ensure => 'present', + chain => 'INPUT', + destination => '30.0.0.0/8', + proto => 'all', + table => 'filter', + recent => 'update', + } + EOS + + apply_manifest(pp, :catch_failures => true) + end + + it 'should contain the rule' do + shell('iptables-save') do |r| + expect(r.stdout).to match(/-A INPUT -d 30.0.0.0\/(8|255\.0\.0\.0) -m comment --comment "599 - test" -m recent --update/) + end + end + end + + context 'remove' do + it 'applies' do + pp = <<-EOS + class { '::firewall': } + firewall { '600 - test': + ensure => 'present', + chain => 'INPUT', + destination => '30.0.0.0/8', + proto => 'all', + table => 'filter', + recent => 'remove', + } + EOS + + apply_manifest(pp, :catch_failures => true) + end + + it 'should contain the rule' do + shell('iptables-save') do |r| + expect(r.stdout).to match(/-A INPUT -d 30.0.0.0\/(8|255\.0\.0\.0) -m comment --comment "600 - test" -m recent --remove/) + end + end + end + end + + describe 'reset' do + it 'deletes all rules' do + shell('ip6tables --flush') + shell('iptables --flush; iptables -t nat --flush; iptables -t mangle --flush') + end + end + +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/firewall/spec/acceptance/firewallchain_spec.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/firewall/spec/acceptance/firewallchain_spec.rb new file mode 100644 index 00000000000..757336a75c1 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/firewall/spec/acceptance/firewallchain_spec.rb @@ -0,0 +1,125 @@ +require 'spec_helper_acceptance' + +describe 'puppet resource firewallchain command:' do + before :all do + iptables_flush_all_tables + end + describe 'ensure' do + context 'present' do + it 'applies cleanly' do + pp = <<-EOS + firewallchain { 'MY_CHAIN:filter:IPv4': + ensure => present, + } + EOS + # Run it twice and test for idempotency + apply_manifest(pp, :catch_failures => true) + apply_manifest(pp, :catch_changes => true) + end + + it 'finds the chain' do + shell('iptables-save') do |r| + expect(r.stdout).to match(/MY_CHAIN/) + end + end + end + + context 'absent' do + it 'applies cleanly' do + pp = <<-EOS + firewallchain { 'MY_CHAIN:filter:IPv4': + ensure => absent, + } + EOS + # Run it twice and test for idempotency + apply_manifest(pp, :catch_failures => true) + apply_manifest(pp, :catch_changes => true) + end + + it 'fails to find the chain' do + shell('iptables-save') do |r| + expect(r.stdout).to_not match(/MY_CHAIN/) + end + end + end + end + + # XXX purge => false is not yet implemented + #context 'adding a firewall rule to a chain:' do + # it 'applies cleanly' do + # pp = <<-EOS + # firewallchain { 'MY_CHAIN:filter:IPv4': + # ensure => present, + # } + # firewall { '100 my rule': + # chain => 'MY_CHAIN', + # action => 'accept', + # proto => 'tcp', + # dport => 5000, + # } + # EOS + # # Run it twice and test for idempotency + # apply_manifest(pp, :catch_failures => true) + # apply_manifest(pp, :catch_changes => true) + # end + #end + + #context 'not purge firewallchain chains:' do + # it 'does not purge the rule' do + # pp = <<-EOS + # firewallchain { 'MY_CHAIN:filter:IPv4': + # ensure => present, + # purge => false, + # before => Resources['firewall'], + # } + # resources { 'firewall': + # purge => true, + # } + # EOS + # # Run it twice and test for idempotency + # apply_manifest(pp, :catch_failures => true) do |r| + # expect(r.stdout).to_not match(/removed/) + # expect(r.stderr).to eq('') + # end + # apply_manifest(pp, :catch_changes => true) + # end + + # it 'still has the rule' do + # pp = <<-EOS + # firewall { '100 my rule': + # chain => 'MY_CHAIN', + # action => 'accept', + # proto => 'tcp', + # dport => 5000, + # } + # EOS + # # Run it twice and test for idempotency + # apply_manifest(pp, :catch_changes => true) + # end + #end + + describe 'policy' do + after :all do + shell('iptables -t filter -P FORWARD ACCEPT') + end + + context 'DROP' do + it 'applies cleanly' do + pp = <<-EOS + firewallchain { 'FORWARD:filter:IPv4': + policy => 'drop', + } + EOS + # Run it twice and test for idempotency + apply_manifest(pp, :catch_failures => true) + apply_manifest(pp, :catch_changes => true) + end + + it 'finds the chain' do + shell('iptables-save') do |r| + expect(r.stdout).to match(/FORWARD DROP/) + end + end + end + end +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/firewall/spec/acceptance/ip6_fragment_spec.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/firewall/spec/acceptance/ip6_fragment_spec.rb new file mode 100644 index 00000000000..bfce0e607fd --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/firewall/spec/acceptance/ip6_fragment_spec.rb @@ -0,0 +1,114 @@ +require 'spec_helper_acceptance' + +if default['platform'] =~ /el-5/ + describe "firewall ip6tables doesn't work on 1.3.5 because --comment is missing" do + before :all do + ip6tables_flush_all_tables + end + + it "can't use ip6tables" do + pp = <<-EOS + class { '::firewall': } + firewall { '599 - test': + ensure => present, + proto => 'tcp', + provider => 'ip6tables', + } + EOS + expect(apply_manifest(pp, :expect_failures => true).stderr).to match(/ip6tables provider is not supported/) + end + end +else + describe 'firewall ishasmorefrags/islastfrag/isfirstfrag properties' do + before :all do + ip6tables_flush_all_tables + end + + shared_examples "is idempotent" do |values, line_match| + it "changes the values to #{values}" do + pp = <<-EOS + class { '::firewall': } + firewall { '599 - test': + ensure => present, + proto => 'tcp', + provider => 'ip6tables', + #{values} + } + EOS + + apply_manifest(pp, :catch_failures => true) + apply_manifest(pp, :catch_changes => true) + + shell('ip6tables-save') do |r| + expect(r.stdout).to match(/#{line_match}/) + end + end + end + shared_examples "doesn't change" do |values, line_match| + it "doesn't change the values to #{values}" do + pp = <<-EOS + class { '::firewall': } + firewall { '599 - test': + ensure => present, + proto => 'tcp', + provider => 'ip6tables', + #{values} + } + EOS + + apply_manifest(pp, :catch_changes => true) + + shell('ip6tables-save') do |r| + expect(r.stdout).to match(/#{line_match}/) + end + end + end + + describe 'adding a rule' do + context 'when unset' do + before :all do + ip6tables_flush_all_tables + end + it_behaves_like 'is idempotent', '', /-A INPUT -p tcp -m comment --comment "599 - test"/ + end + context 'when set to true' do + before :all do + ip6tables_flush_all_tables + end + it_behaves_like "is idempotent", 'ishasmorefrags => true, islastfrag => true, isfirstfrag => true', /-A INPUT -p tcp -m frag --fragid 0 --fragmore -m frag --fragid 0 --fraglast -m frag --fragid 0 --fragfirst -m comment --comment "599 - test"/ + end + context 'when set to false' do + before :all do + ip6tables_flush_all_tables + end + it_behaves_like "is idempotent", 'ishasmorefrags => false, islastfrag => false, isfirstfrag => false', /-A INPUT -p tcp -m comment --comment "599 - test"/ + end + end + describe 'editing a rule' do + context 'when unset or false' do + before :each do + ip6tables_flush_all_tables + shell('ip6tables -A INPUT -p tcp -m comment --comment "599 - test"') + end + context 'and current value is false' do + it_behaves_like "doesn't change", 'ishasmorefrags => false, islastfrag => false, isfirstfrag => false', /-A INPUT -p tcp -m comment --comment "599 - test"/ + end + context 'and current value is true' do + it_behaves_like "is idempotent", 'ishasmorefrags => true, islastfrag => true, isfirstfrag => true', /-A INPUT -p tcp -m frag --fragid 0 --fragmore -m frag --fragid 0 --fraglast -m frag --fragid 0 --fragfirst -m comment --comment "599 - test"/ + end + end + context 'when set to true' do + before :each do + ip6tables_flush_all_tables + shell('ip6tables -A INPUT -p tcp -m frag --fragid 0 --fragmore -m frag --fragid 0 --fraglast -m frag --fragid 0 --fragfirst -m comment --comment "599 - test"') + end + context 'and current value is false' do + it_behaves_like "is idempotent", 'ishasmorefrags => false, islastfrag => false, isfirstfrag => false', /-A INPUT -p tcp -m comment --comment "599 - test"/ + end + context 'and current value is true' do + it_behaves_like "doesn't change", 'ishasmorefrags => true, islastfrag => true, isfirstfrag => true', /-A INPUT -p tcp -m frag --fragid 0 --fragmore -m frag --fragid 0 --fraglast -m frag --fragid 0 --fragfirst -m comment --comment "599 - test"/ + end + end + end + end +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/firewall/spec/acceptance/isfragment_spec.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/firewall/spec/acceptance/isfragment_spec.rb new file mode 100644 index 00000000000..7fdedc28732 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/firewall/spec/acceptance/isfragment_spec.rb @@ -0,0 +1,92 @@ +require 'spec_helper_acceptance' + +describe 'firewall isfragment property' do + before :all do + iptables_flush_all_tables + end + + shared_examples "is idempotent" do |value, line_match| + it "changes the value to #{value}" do + pp = <<-EOS + class { '::firewall': } + firewall { '597 - test': + ensure => present, + proto => 'tcp', + #{value} + } + EOS + + apply_manifest(pp, :catch_failures => true) + apply_manifest(pp, :catch_changes => true) + + shell('iptables-save') do |r| + expect(r.stdout).to match(/#{line_match}/) + end + end + end + shared_examples "doesn't change" do |value, line_match| + it "doesn't change the value to #{value}" do + pp = <<-EOS + class { '::firewall': } + firewall { '597 - test': + ensure => present, + proto => 'tcp', + #{value} + } + EOS + + apply_manifest(pp, :catch_changes => true) + + shell('iptables-save') do |r| + expect(r.stdout).to match(/#{line_match}/) + end + end + end + + describe 'adding a rule' do + context 'when unset' do + before :all do + iptables_flush_all_tables + end + it_behaves_like 'is idempotent', '', /-A INPUT -p tcp -m comment --comment "597 - test"/ + end + context 'when set to true' do + before :all do + iptables_flush_all_tables + end + it_behaves_like 'is idempotent', 'isfragment => true,', /-A INPUT -p tcp -f -m comment --comment "597 - test"/ + end + context 'when set to false' do + before :all do + iptables_flush_all_tables + end + it_behaves_like "is idempotent", 'isfragment => false,', /-A INPUT -p tcp -m comment --comment "597 - test"/ + end + end + describe 'editing a rule' do + context 'when unset or false' do + before :each do + iptables_flush_all_tables + shell('iptables -A INPUT -p tcp -m comment --comment "597 - test"') + end + context 'and current value is false' do + it_behaves_like "doesn't change", 'isfragment => false,', /-A INPUT -p tcp -m comment --comment "597 - test"/ + end + context 'and current value is true' do + it_behaves_like "is idempotent", 'isfragment => true,', /-A INPUT -p tcp -f -m comment --comment "597 - test"/ + end + end + context 'when set to true' do + before :each do + iptables_flush_all_tables + shell('iptables -A INPUT -p tcp -f -m comment --comment "597 - test"') + end + context 'and current value is false' do + it_behaves_like "is idempotent", 'isfragment => false,', /-A INPUT -p tcp -m comment --comment "597 - test"/ + end + context 'and current value is true' do + it_behaves_like "doesn't change", 'isfragment => true,', /-A INPUT -p tcp -f -m comment --comment "597 - test"/ + end + end + end +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/firewall/spec/acceptance/nodesets/centos-59-x64-pe.yml b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/firewall/spec/acceptance/nodesets/centos-59-x64-pe.yml new file mode 100644 index 00000000000..3a6470beae2 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/firewall/spec/acceptance/nodesets/centos-59-x64-pe.yml @@ -0,0 +1,12 @@ +HOSTS: + centos-59-x64: + roles: + - master + - database + - console + platform: el-5-x86_64 + box : centos-59-x64-vbox4210-nocm + box_url : http://puppet-vagrant-boxes.puppetlabs.com/centos-59-x64-vbox4210-nocm.box + hypervisor : vagrant +CONFIG: + type: pe diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/firewall/spec/acceptance/nodesets/centos-59-x64.yml b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/firewall/spec/acceptance/nodesets/centos-59-x64.yml new file mode 100644 index 00000000000..b41a947169a --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/firewall/spec/acceptance/nodesets/centos-59-x64.yml @@ -0,0 +1,10 @@ +HOSTS: + centos-59-x64: + roles: + - master + platform: el-5-x86_64 + box : centos-59-x64-vbox4210-nocm + box_url : http://puppet-vagrant-boxes.puppetlabs.com/centos-59-x64-vbox4210-nocm.box + hypervisor : vagrant +CONFIG: + type: foss diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/firewall/spec/acceptance/nodesets/centos-64-x64-fusion.yml b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/firewall/spec/acceptance/nodesets/centos-64-x64-fusion.yml new file mode 100644 index 00000000000..d5166735ec1 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/firewall/spec/acceptance/nodesets/centos-64-x64-fusion.yml @@ -0,0 +1,10 @@ +HOSTS: + centos-64-x64: + roles: + - master + platform: el-6-x86_64 + box : centos-64-x64-fusion503-nocm + box_url : http://puppet-vagrant-boxes.puppetlabs.com/centos-64-x64-fusion503-nocm.box + hypervisor : fusion +CONFIG: + type: foss diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/firewall/spec/acceptance/nodesets/centos-64-x64-pe.yml b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/firewall/spec/acceptance/nodesets/centos-64-x64-pe.yml new file mode 100644 index 00000000000..7d9242f1b95 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/firewall/spec/acceptance/nodesets/centos-64-x64-pe.yml @@ -0,0 +1,12 @@ +HOSTS: + centos-64-x64: + roles: + - master + - database + - dashboard + platform: el-6-x86_64 + box : centos-64-x64-vbox4210-nocm + box_url : http://puppet-vagrant-boxes.puppetlabs.com/centos-64-x64-vbox4210-nocm.box + hypervisor : vagrant +CONFIG: + type: pe diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/firewall/spec/acceptance/nodesets/centos-64-x64.yml b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/firewall/spec/acceptance/nodesets/centos-64-x64.yml new file mode 100644 index 00000000000..05540ed8c5a --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/firewall/spec/acceptance/nodesets/centos-64-x64.yml @@ -0,0 +1,10 @@ +HOSTS: + centos-64-x64: + roles: + - master + platform: el-6-x86_64 + box : centos-64-x64-vbox4210-nocm + box_url : http://puppet-vagrant-boxes.puppetlabs.com/centos-64-x64-vbox4210-nocm.box + hypervisor : vagrant +CONFIG: + type: foss diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/firewall/spec/acceptance/nodesets/debian-607-x64.yml b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/firewall/spec/acceptance/nodesets/debian-607-x64.yml new file mode 100644 index 00000000000..4c8be42d033 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/firewall/spec/acceptance/nodesets/debian-607-x64.yml @@ -0,0 +1,10 @@ +HOSTS: + debian-607-x64: + roles: + - master + platform: debian-6-amd64 + box : debian-607-x64-vbox4210-nocm + box_url : http://puppet-vagrant-boxes.puppetlabs.com/debian-607-x64-vbox4210-nocm.box + hypervisor : vagrant +CONFIG: + type: git diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/firewall/spec/acceptance/nodesets/debian-70rc1-x64.yml b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/firewall/spec/acceptance/nodesets/debian-70rc1-x64.yml new file mode 100644 index 00000000000..19181c123d0 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/firewall/spec/acceptance/nodesets/debian-70rc1-x64.yml @@ -0,0 +1,10 @@ +HOSTS: + debian-70rc1-x64: + roles: + - master + platform: debian-7-amd64 + box : debian-70rc1-x64-vbox4210-nocm + box_url : http://puppet-vagrant-boxes.puppetlabs.com/debian-70rc1-x64-vbox4210-nocm.box + hypervisor : vagrant +CONFIG: + type: git diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/firewall/spec/acceptance/nodesets/default.yml b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/firewall/spec/acceptance/nodesets/default.yml new file mode 100644 index 00000000000..05540ed8c5a --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/firewall/spec/acceptance/nodesets/default.yml @@ -0,0 +1,10 @@ +HOSTS: + centos-64-x64: + roles: + - master + platform: el-6-x86_64 + box : centos-64-x64-vbox4210-nocm + box_url : http://puppet-vagrant-boxes.puppetlabs.com/centos-64-x64-vbox4210-nocm.box + hypervisor : vagrant +CONFIG: + type: foss diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/firewall/spec/acceptance/nodesets/fedora-18-x64.yml b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/firewall/spec/acceptance/nodesets/fedora-18-x64.yml new file mode 100644 index 00000000000..624b53716b6 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/firewall/spec/acceptance/nodesets/fedora-18-x64.yml @@ -0,0 +1,10 @@ +HOSTS: + fedora-18-x64: + roles: + - master + platform: fedora-18-x86_64 + box : fedora-18-x64-vbox4210-nocm + box_url : http://puppet-vagrant-boxes.puppetlabs.com/fedora-18-x64-vbox4210-nocm.box + hypervisor : vagrant +CONFIG: + type: git diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/firewall/spec/acceptance/nodesets/sles-11sp1-x64.yml b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/firewall/spec/acceptance/nodesets/sles-11sp1-x64.yml new file mode 100644 index 00000000000..554c37a505c --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/firewall/spec/acceptance/nodesets/sles-11sp1-x64.yml @@ -0,0 +1,10 @@ +HOSTS: + sles-11sp1-x64: + roles: + - master + platform: sles-11-x86_64 + box : sles-11sp1-x64-vbox4210-nocm + box_url : http://puppet-vagrant-boxes.puppetlabs.com/sles-11sp1-x64-vbox4210-nocm.box + hypervisor : vagrant +CONFIG: + type: git diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/firewall/spec/acceptance/nodesets/ubuntu-server-10044-x64.yml b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/firewall/spec/acceptance/nodesets/ubuntu-server-10044-x64.yml new file mode 100644 index 00000000000..5047017e623 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/firewall/spec/acceptance/nodesets/ubuntu-server-10044-x64.yml @@ -0,0 +1,10 @@ +HOSTS: + ubuntu-server-10044-x64: + roles: + - master + platform: ubuntu-10.04-amd64 + box : ubuntu-server-10044-x64-vbox4210-nocm + box_url : http://puppet-vagrant-boxes.puppetlabs.com/ubuntu-server-10044-x64-vbox4210-nocm.box + hypervisor : vagrant +CONFIG: + type: git diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/firewall/spec/acceptance/nodesets/ubuntu-server-12042-x64.yml b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/firewall/spec/acceptance/nodesets/ubuntu-server-12042-x64.yml new file mode 100644 index 00000000000..d065b304f83 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/firewall/spec/acceptance/nodesets/ubuntu-server-12042-x64.yml @@ -0,0 +1,10 @@ +HOSTS: + ubuntu-server-12042-x64: + roles: + - master + platform: ubuntu-12.04-amd64 + box : ubuntu-server-12042-x64-vbox4210-nocm + box_url : http://puppet-vagrant-boxes.puppetlabs.com/ubuntu-server-12042-x64-vbox4210-nocm.box + hypervisor : vagrant +CONFIG: + type: foss diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/firewall/spec/acceptance/nodesets/ubuntu-server-1404-x64.yml b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/firewall/spec/acceptance/nodesets/ubuntu-server-1404-x64.yml new file mode 100644 index 00000000000..7e789c8d8df --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/firewall/spec/acceptance/nodesets/ubuntu-server-1404-x64.yml @@ -0,0 +1,9 @@ +HOSTS: + ubuntu-server-1404-x64: + roles: + - master + platform: ubuntu-14.04-64 + box: puppetlabs/ubuntu-14.04-64-nocm + hypervisor : vagrant +CONFIG: + type: foss diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/firewall/spec/acceptance/params_spec.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/firewall/spec/acceptance/params_spec.rb new file mode 100644 index 00000000000..c0f93ad21f3 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/firewall/spec/acceptance/params_spec.rb @@ -0,0 +1,154 @@ +require 'spec_helper_acceptance' + +describe "param based tests:" do + # Takes a hash and converts it into a firewall resource + def pp(params) + name = params.delete('name') || '100 test' + pm = <<-EOS +firewall { '#{name}': + EOS + + params.each do |k,v| + pm += <<-EOS + #{k} => #{v}, + EOS + end + + pm += <<-EOS +} + EOS + pm + end + + it 'test various params', :unless => (default['platform'].match(/el-5/) || fact('operatingsystem') == 'SLES') do + iptables_flush_all_tables + + ppm = pp({ + 'table' => "'raw'", + 'socket' => 'true', + 'chain' => "'PREROUTING'", + 'jump' => 'LOG', + 'log_level' => 'debug', + }) + + expect(apply_manifest(ppm, :catch_failures => true).exit_code).to eq(2) + expect(apply_manifest(ppm, :catch_failures => true).exit_code).to be_zero + end + + it 'test log rule' do + iptables_flush_all_tables + + ppm = pp({ + 'name' => '998 log all', + 'proto' => 'all', + 'jump' => 'LOG', + 'log_level' => 'debug', + }) + expect(apply_manifest(ppm, :catch_failures => true).exit_code).to eq(2) + expect(apply_manifest(ppm, :catch_failures => true).exit_code).to be_zero + end + + it 'test log rule - changing names' do + iptables_flush_all_tables + + ppm1 = pp({ + 'name' => '004 log all INVALID packets', + 'chain' => 'INPUT', + 'proto' => 'all', + 'ctstate' => 'INVALID', + 'jump' => 'LOG', + 'log_level' => '3', + 'log_prefix' => '"IPTABLES dropped invalid: "', + }) + + ppm2 = pp({ + 'name' => '003 log all INVALID packets', + 'chain' => 'INPUT', + 'proto' => 'all', + 'ctstate' => 'INVALID', + 'jump' => 'LOG', + 'log_level' => '3', + 'log_prefix' => '"IPTABLES dropped invalid: "', + }) + + expect(apply_manifest(ppm1, :catch_failures => true).exit_code).to eq(2) + + ppm = <<-EOS + "\n" + ppm2 + resources { 'firewall': + purge => true, + } + EOS + expect(apply_manifest(ppm, :catch_failures => true).exit_code).to eq(2) + end + + it 'test chain - changing names' do + iptables_flush_all_tables + + ppm1 = pp({ + 'name' => '004 with a chain', + 'chain' => 'INPUT', + 'proto' => 'all', + }) + + ppm2 = pp({ + 'name' => '004 with a chain', + 'chain' => 'OUTPUT', + 'proto' => 'all', + }) + + apply_manifest(ppm1, :expect_changes => true) + + ppm = <<-EOS + "\n" + ppm2 + resources { 'firewall': + purge => true, + } + EOS + expect(apply_manifest(ppm2, :expect_failures => true).stderr).to match(/is not supported/) + end + + it 'test log rule - idempotent' do + iptables_flush_all_tables + + ppm1 = pp({ + 'name' => '004 log all INVALID packets', + 'chain' => 'INPUT', + 'proto' => 'all', + 'ctstate' => 'INVALID', + 'jump' => 'LOG', + 'log_level' => '3', + 'log_prefix' => '"IPTABLES dropped invalid: "', + }) + + expect(apply_manifest(ppm1, :catch_failures => true).exit_code).to eq(2) + expect(apply_manifest(ppm1, :catch_failures => true).exit_code).to be_zero + end + + it 'test src_range rule' do + iptables_flush_all_tables + + ppm = pp({ + 'name' => '997 block src ip range', + 'chain' => 'INPUT', + 'proto' => 'all', + 'action' => 'drop', + 'src_range' => '"10.0.0.1-10.0.0.10"', + }) + expect(apply_manifest(ppm, :catch_failures => true).exit_code).to eq(2) + expect(apply_manifest(ppm, :catch_failures => true).exit_code).to be_zero + end + + it 'test dst_range rule' do + iptables_flush_all_tables + + ppm = pp({ + 'name' => '998 block dst ip range', + 'chain' => 'INPUT', + 'proto' => 'all', + 'action' => 'drop', + 'dst_range' => '"10.0.0.2-10.0.0.20"', + }) + expect(apply_manifest(ppm, :catch_failures => true).exit_code).to eq(2) + expect(apply_manifest(ppm, :catch_failures => true).exit_code).to be_zero + end + +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/firewall/spec/acceptance/purge_spec.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/firewall/spec/acceptance/purge_spec.rb new file mode 100644 index 00000000000..f62b14f936e --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/firewall/spec/acceptance/purge_spec.rb @@ -0,0 +1,124 @@ +require 'spec_helper_acceptance' + +describe "purge tests:" do + context('resources purge') do + before(:all) do + iptables_flush_all_tables + + shell('iptables -A INPUT -s 1.2.1.2') + shell('iptables -A INPUT -s 1.2.1.2') + end + + it 'make sure duplicate existing rules get purged' do + + pp = <<-EOS + class { 'firewall': } + resources { 'firewall': + purge => true, + } + EOS + + apply_manifest(pp, :expect_changes => true) + end + + it 'saves' do + shell('iptables-save') do |r| + expect(r.stdout).to_not match(/1\.2\.1\.2/) + expect(r.stderr).to eq("") + end + end + end + + context('chain purge') do + before(:each) do + iptables_flush_all_tables + + shell('iptables -A INPUT -p tcp -s 1.2.1.1') + shell('iptables -A INPUT -p udp -s 1.2.1.1') + shell('iptables -A OUTPUT -s 1.2.1.2 -m comment --comment "010 output-1.2.1.2"') + end + + it 'purges only the specified chain' do + pp = <<-EOS + class { 'firewall': } + firewallchain { 'INPUT:filter:IPv4': + purge => true, + } + EOS + + apply_manifest(pp, :expect_changes => true) + + shell('iptables-save') do |r| + expect(r.stdout).to match(/010 output-1\.2\.1\.2/) + expect(r.stdout).to_not match(/1\.2\.1\.1/) + expect(r.stderr).to eq("") + end + end + + it 'ignores managed rules' do + pp = <<-EOS + class { 'firewall': } + firewallchain { 'OUTPUT:filter:IPv4': + purge => true, + } + firewall { '010 output-1.2.1.2': + chain => 'OUTPUT', + proto => 'all', + source => '1.2.1.2', + } + EOS + + apply_manifest(pp, :catch_changes => true) + end + + it 'ignores specified rules' do + pp = <<-EOS + class { 'firewall': } + firewallchain { 'INPUT:filter:IPv4': + purge => true, + ignore => [ + '-s 1\.2\.1\.1', + ], + } + EOS + + apply_manifest(pp, :catch_changes => true) + end + + it 'adds managed rules with ignored rules' do + pp = <<-EOS + class { 'firewall': } + firewallchain { 'INPUT:filter:IPv4': + purge => true, + ignore => [ + '-s 1\.2\.1\.1', + ], + } + firewall { '014 input-1.2.1.6': + chain => 'INPUT', + proto => 'all', + source => '1.2.1.6', + } + -> firewall { '013 input-1.2.1.5': + chain => 'INPUT', + proto => 'all', + source => '1.2.1.5', + } + -> firewall { '012 input-1.2.1.4': + chain => 'INPUT', + proto => 'all', + source => '1.2.1.4', + } + -> firewall { '011 input-1.2.1.3': + chain => 'INPUT', + proto => 'all', + source => '1.2.1.3', + } + EOS + + apply_manifest(pp, :catch_failures => true) + + expect(shell('iptables-save').stdout).to match(/-A INPUT -s 1\.2\.1\.1(\/32)? -p tcp\s?\n-A INPUT -s 1\.2\.1\.1(\/32)? -p udp/) + end + end +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/firewall/spec/acceptance/resource_cmd_spec.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/firewall/spec/acceptance/resource_cmd_spec.rb new file mode 100644 index 00000000000..c9a852d8264 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/firewall/spec/acceptance/resource_cmd_spec.rb @@ -0,0 +1,93 @@ +require 'spec_helper_acceptance' + +# Here we want to test the the resource commands ability to work with different +# existing ruleset scenarios. This will give the parsing capabilities of the +# code a good work out. +describe 'puppet resource firewall command:' do + context 'make sure it returns no errors when executed on a clean machine' do + it do + shell('puppet resource firewall') do |r| + r.exit_code.should be_zero + # don't check stdout, some boxes come with rules, that is normal + r.stderr.should be_empty + end + end + end + + context 'flush iptables and make sure it returns nothing afterwards' do + before(:all) do + iptables_flush_all_tables + end + + # No rules, means no output thanks. And no errors as well. + it do + shell('puppet resource firewall') do |r| + r.exit_code.should be_zero + r.stderr.should be_empty + r.stdout.should == "\n" + end + end + end + + context 'accepts rules without comments' do + before(:all) do + iptables_flush_all_tables + shell('iptables -A INPUT -j ACCEPT -p tcp --dport 80') + end + + it do + shell('puppet resource firewall') do |r| + r.exit_code.should be_zero + # don't check stdout, testing preexisting rules, output is normal + r.stderr.should be_empty + end + end + end + + context 'accepts rules with invalid comments' do + before(:all) do + iptables_flush_all_tables + shell('iptables -A INPUT -j ACCEPT -p tcp --dport 80 -m comment --comment "http"') + end + + it do + shell('puppet resource firewall') do |r| + r.exit_code.should be_zero + # don't check stdout, testing preexisting rules, output is normal + r.stderr.should be_empty + end + end + end + + context 'accepts rules with negation' do + before :all do + iptables_flush_all_tables + shell('iptables -t nat -A POSTROUTING -s 192.168.122.0/24 ! -d 192.168.122.0/24 -p tcp -j MASQUERADE --to-ports 1024-65535') + shell('iptables -t nat -A POSTROUTING -s 192.168.122.0/24 ! -d 192.168.122.0/24 -p udp -j MASQUERADE --to-ports 1024-65535') + shell('iptables -t nat -A POSTROUTING -s 192.168.122.0/24 ! -d 192.168.122.0/24 -j MASQUERADE') + end + + it do + shell('puppet resource firewall') do |r| + r.exit_code.should be_zero + # don't check stdout, testing preexisting rules, output is normal + r.stderr.should be_empty + end + end + end + + context 'accepts rules with match extension tcp flag' do + before :all do + iptables_flush_all_tables + shell('iptables -t mangle -A PREROUTING -d 1.2.3.4 -p tcp -m tcp -m multiport --dports 80,443,8140 -j MARK --set-mark 42') + end + + it do + shell('puppet resource firewall') do |r| + r.exit_code.should be_zero + # don't check stdout, testing preexisting rules, output is normal + r.stderr.should be_empty + end + end + end +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/firewall/spec/acceptance/rules_spec.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/firewall/spec/acceptance/rules_spec.rb new file mode 100644 index 00000000000..b0e66ae5bc4 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/firewall/spec/acceptance/rules_spec.rb @@ -0,0 +1,252 @@ +require 'spec_helper_acceptance' + +describe 'complex ruleset 1' do + before :all do + iptables_flush_all_tables + end + + after :all do + shell('iptables -t filter -P INPUT ACCEPT') + shell('iptables -t filter -P FORWARD ACCEPT') + shell('iptables -t filter -P OUTPUT ACCEPT') + shell('iptables -t filter --flush') + end + + it 'applies cleanly' do + pp = <<-EOS + firewall { '090 forward allow local': + chain => 'FORWARD', + proto => 'all', + source => '10.0.0.0/8', + destination => '10.0.0.0/8', + action => 'accept', + } + firewall { '100 forward standard allow tcp': + chain => 'FORWARD', + source => '10.0.0.0/8', + destination => '!10.0.0.0/8', + proto => 'tcp', + state => 'NEW', + port => [80,443,21,20,22,53,123,43,873,25,465], + action => 'accept', + } + firewall { '100 forward standard allow udp': + chain => 'FORWARD', + source => '10.0.0.0/8', + destination => '!10.0.0.0/8', + proto => 'udp', + port => [53,123], + action => 'accept', + } + firewall { '100 forward standard allow icmp': + chain => 'FORWARD', + source => '10.0.0.0/8', + destination => '!10.0.0.0/8', + proto => 'icmp', + action => 'accept', + } + + firewall { '090 ignore ipsec': + table => 'nat', + chain => 'POSTROUTING', + outiface => 'eth0', + ipsec_policy => 'ipsec', + ipsec_dir => 'out', + action => 'accept', + } + firewall { '093 ignore 10.0.0.0/8': + table => 'nat', + chain => 'POSTROUTING', + outiface => 'eth0', + destination => '10.0.0.0/8', + action => 'accept', + } + firewall { '093 ignore 172.16.0.0/12': + table => 'nat', + chain => 'POSTROUTING', + outiface => 'eth0', + destination => '172.16.0.0/12', + action => 'accept', + } + firewall { '093 ignore 192.168.0.0/16': + table => 'nat', + chain => 'POSTROUTING', + outiface => 'eth0', + destination => '192.168.0.0/16', + action => 'accept', + } + firewall { '100 masq outbound': + table => 'nat', + chain => 'POSTROUTING', + outiface => 'eth0', + jump => 'MASQUERADE', + } + firewall { '101 redirect port 1': + table => 'nat', + chain => 'PREROUTING', + iniface => 'eth0', + proto => 'tcp', + dport => '1', + toports => '22', + jump => 'REDIRECT', + } + EOS + + # Run it twice and test for idempotency + apply_manifest(pp, :catch_failures => true) + expect(apply_manifest(pp, :catch_failures => true).exit_code).to be_zero + end + + it 'contains appropriate rules' do + shell('iptables-save') do |r| + [ + /INPUT ACCEPT/, + /FORWARD ACCEPT/, + /OUTPUT ACCEPT/, + /-A FORWARD -s 10.0.0.0\/(8|255\.0\.0\.0) -d 10.0.0.0\/(8|255\.0\.0\.0) -m comment --comment \"090 forward allow local\" -j ACCEPT/, + /-A FORWARD -s 10.0.0.0\/(8|255\.0\.0\.0) (! -d|-d !) 10.0.0.0\/(8|255\.0\.0\.0) -p icmp -m comment --comment \"100 forward standard allow icmp\" -j ACCEPT/, + /-A FORWARD -s 10.0.0.0\/(8|255\.0\.0\.0) (! -d|-d !) 10.0.0.0\/(8|255\.0\.0\.0) -p tcp -m multiport --ports 80,443,21,20,22,53,123,43,873,25,465 -m comment --comment \"100 forward standard allow tcp\" -m state --state NEW -j ACCEPT/, + /-A FORWARD -s 10.0.0.0\/(8|255\.0\.0\.0) (! -d|-d !) 10.0.0.0\/(8|255\.0\.0\.0) -p udp -m multiport --ports 53,123 -m comment --comment \"100 forward standard allow udp\" -j ACCEPT/ + ].each do |line| + expect(r.stdout).to match(line) + end + end + end +end + +describe 'complex ruleset 2' do + after :all do + shell('iptables -t filter -P INPUT ACCEPT') + shell('iptables -t filter -P FORWARD ACCEPT') + shell('iptables -t filter -P OUTPUT ACCEPT') + shell('iptables -t filter --flush') + expect(shell('iptables -t filter -X LOCAL_INPUT').stderr).to eq("") + expect(shell('iptables -t filter -X LOCAL_INPUT_PRE').stderr).to eq("") + end + + it 'applies cleanly' do + pp = <<-EOS + class { '::firewall': } + + Firewall { + proto => 'all', + stage => 'pre', + } + Firewallchain { + stage => 'pre', + purge => 'true', + ignore => [ + '--comment "[^"]*(?i:ignore)[^"]*"', + ], + } + + firewall { '010 INPUT allow established and related': + proto => 'all', + state => ['ESTABLISHED', 'RELATED'], + action => 'accept', + before => Firewallchain['INPUT:filter:IPv4'], + } + firewall { '012 accept loopback': + iniface => 'lo', + action => 'accept', + before => Firewallchain['INPUT:filter:IPv4'], + } + firewall { '020 ssh': + proto => 'tcp', + dport => '22', + state => 'NEW', + action => 'accept', + before => Firewallchain['INPUT:filter:IPv4'], + } + + firewall { '013 icmp echo-request': + proto => 'icmp', + icmp => 'echo-request', + action => 'accept', + source => '10.0.0.0/8', + } + firewall { '013 icmp destination-unreachable': + proto => 'icmp', + icmp => 'destination-unreachable', + action => 'accept', + } + firewall { '013 icmp time-exceeded': + proto => 'icmp', + icmp => 'time-exceeded', + action => 'accept', + } + firewall { '999 reject': + action => 'reject', + reject => 'icmp-host-prohibited', + } + + + firewallchain { 'LOCAL_INPUT_PRE:filter:IPv4': } + firewall { '001 LOCAL_INPUT_PRE': + jump => 'LOCAL_INPUT_PRE', + require => Firewallchain['LOCAL_INPUT_PRE:filter:IPv4'], + } + firewallchain { 'LOCAL_INPUT:filter:IPv4': } + firewall { '900 LOCAL_INPUT': + jump => 'LOCAL_INPUT', + require => Firewallchain['LOCAL_INPUT:filter:IPv4'], + } + firewallchain { 'INPUT:filter:IPv4': + policy => 'drop', + ignore => [ + '-j fail2ban-ssh', + '--comment "[^"]*(?i:ignore)[^"]*"', + ], + } + + + firewall { '010 allow established and related': + chain => 'FORWARD', + proto => 'all', + state => ['ESTABLISHED','RELATED'], + action => 'accept', + before => Firewallchain['FORWARD:filter:IPv4'], + } + firewallchain { 'FORWARD:filter:IPv4': + policy => 'drop', + } + + firewallchain { 'OUTPUT:filter:IPv4': } + + + # purge unknown rules from mangle table + firewallchain { ['PREROUTING:mangle:IPv4', 'INPUT:mangle:IPv4', 'FORWARD:mangle:IPv4', 'OUTPUT:mangle:IPv4', 'POSTROUTING:mangle:IPv4']: } + + # and the nat table + firewallchain { ['PREROUTING:nat:IPv4', 'INPUT:nat:IPv4', 'OUTPUT:nat:IPv4', 'POSTROUTING:nat:IPv4']: } + EOS + + # Run it twice and test for idempotency + apply_manifest(pp, :catch_failures => true) + apply_manifest(pp, :catch_changes => true) + end + + it 'contains appropriate rules' do + shell('iptables-save') do |r| + [ + /INPUT DROP/, + /FORWARD DROP/, + /OUTPUT ACCEPT/, + /LOCAL_INPUT/, + /LOCAL_INPUT_PRE/, + /-A INPUT -m comment --comment \"001 LOCAL_INPUT_PRE\" -j LOCAL_INPUT_PRE/, + /-A INPUT -m comment --comment \"010 INPUT allow established and related\" -m state --state RELATED,ESTABLISHED -j ACCEPT/, + /-A INPUT -i lo -m comment --comment \"012 accept loopback\" -j ACCEPT/, + /-A INPUT -p icmp -m comment --comment \"013 icmp destination-unreachable\" -m icmp --icmp-type 3 -j ACCEPT/, + /-A INPUT -s 10.0.0.0\/(8|255\.0\.0\.0) -p icmp -m comment --comment \"013 icmp echo-request\" -m icmp --icmp-type 8 -j ACCEPT/, + /-A INPUT -p icmp -m comment --comment \"013 icmp time-exceeded\" -m icmp --icmp-type 11 -j ACCEPT/, + /-A INPUT -p tcp -m multiport --dports 22 -m comment --comment \"020 ssh\" -m state --state NEW -j ACCEPT/, + /-A INPUT -m comment --comment \"900 LOCAL_INPUT\" -j LOCAL_INPUT/, + /-A INPUT -m comment --comment \"999 reject\" -j REJECT --reject-with icmp-host-prohibited/, + /-A FORWARD -m comment --comment \"010 allow established and related\" -m state --state RELATED,ESTABLISHED -j ACCEPT/ + ].each do |line| + expect(r.stdout).to match(line) + end + end + end +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/firewall/spec/acceptance/socket_spec.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/firewall/spec/acceptance/socket_spec.rb new file mode 100644 index 00000000000..c4a05348cf3 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/firewall/spec/acceptance/socket_spec.rb @@ -0,0 +1,97 @@ +require 'spec_helper_acceptance' + +# RHEL5 does not support -m socket +describe 'firewall socket property', :unless => (default['platform'] =~ /el-5/ || fact('operatingsystem') == 'SLES') do + before :all do + iptables_flush_all_tables + end + + shared_examples "is idempotent" do |value, line_match| + it "changes the value to #{value}" do + pp = <<-EOS + class { '::firewall': } + firewall { '598 - test': + ensure => present, + proto => 'tcp', + chain => 'PREROUTING', + table => 'raw', + #{value} + } + EOS + + apply_manifest(pp, :catch_failures => true) + apply_manifest(pp, :catch_changes => true) + + shell('iptables-save -t raw') do |r| + expect(r.stdout).to match(/#{line_match}/) + end + end + end + shared_examples "doesn't change" do |value, line_match| + it "doesn't change the value to #{value}" do + pp = <<-EOS + class { '::firewall': } + firewall { '598 - test': + ensure => present, + proto => 'tcp', + chain => 'PREROUTING', + table => 'raw', + #{value} + } + EOS + + apply_manifest(pp, :catch_changes => true) + + shell('iptables-save -t raw') do |r| + expect(r.stdout).to match(/#{line_match}/) + end + end + end + + describe 'adding a rule' do + context 'when unset' do + before :all do + iptables_flush_all_tables + end + it_behaves_like 'is idempotent', '', /-A PREROUTING -p tcp -m comment --comment "598 - test"/ + end + context 'when set to true' do + before :all do + iptables_flush_all_tables + end + it_behaves_like 'is idempotent', 'socket => true,', /-A PREROUTING -p tcp -m socket -m comment --comment "598 - test"/ + end + context 'when set to false' do + before :all do + iptables_flush_all_tables + end + it_behaves_like "is idempotent", 'socket => false,', /-A PREROUTING -p tcp -m comment --comment "598 - test"/ + end + end + describe 'editing a rule' do + context 'when unset or false' do + before :each do + iptables_flush_all_tables + shell('iptables -t raw -A PREROUTING -p tcp -m comment --comment "598 - test"') + end + context 'and current value is false' do + it_behaves_like "doesn't change", 'socket => false,', /-A PREROUTING -p tcp -m comment --comment "598 - test"/ + end + context 'and current value is true' do + it_behaves_like "is idempotent", 'socket => true,', /-A PREROUTING -p tcp -m socket -m comment --comment "598 - test"/ + end + end + context 'when set to true' do + before :each do + iptables_flush_all_tables + shell('iptables -t raw -A PREROUTING -p tcp -m socket -m comment --comment "598 - test"') + end + context 'and current value is false' do + it_behaves_like "is idempotent", 'socket => false,', /-A PREROUTING -p tcp -m comment --comment "598 - test"/ + end + context 'and current value is true' do + it_behaves_like "doesn't change", 'socket => true,', /-A PREROUTING -p tcp -m socket -m comment --comment "598 - test"/ + end + end + end +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/firewall/spec/acceptance/standard_usage_spec.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/firewall/spec/acceptance/standard_usage_spec.rb new file mode 100644 index 00000000000..f29278b97f3 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/firewall/spec/acceptance/standard_usage_spec.rb @@ -0,0 +1,55 @@ +require 'spec_helper_acceptance' + +# Some tests for the standard recommended usage +describe 'standard usage tests:' do + it 'applies twice' do + pp = <<-EOS + class my_fw::pre { + Firewall { + require => undef, + } + + # Default firewall rules + firewall { '000 accept all icmp': + proto => 'icmp', + action => 'accept', + }-> + firewall { '001 accept all to lo interface': + proto => 'all', + iniface => 'lo', + action => 'accept', + }-> + firewall { '002 accept related established rules': + proto => 'all', + ctstate => ['RELATED', 'ESTABLISHED'], + action => 'accept', + } + } + class my_fw::post { + firewall { '999 drop all': + proto => 'all', + action => 'drop', + before => undef, + } + } + resources { "firewall": + purge => true + } + Firewall { + before => Class['my_fw::post'], + require => Class['my_fw::pre'], + } + class { ['my_fw::pre', 'my_fw::post']: } + class { 'firewall': } + firewall { '500 open up port 22': + action => 'accept', + proto => 'tcp', + dport => 22, + } + EOS + + # Run it twice and test for idempotency + apply_manifest(pp, :catch_failures => true) + expect(apply_manifest(pp, :catch_failures => true).exit_code).to be_zero + end +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/firewall/spec/fixtures/ip6tables/conversion_hash.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/firewall/spec/fixtures/ip6tables/conversion_hash.rb new file mode 100644 index 00000000000..7c507d78bdf --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/firewall/spec/fixtures/ip6tables/conversion_hash.rb @@ -0,0 +1,107 @@ +# These hashes allow us to iterate across a series of test data +# creating rspec examples for each parameter to ensure the input :line +# extrapolates to the desired value for the parameter in question. And +# vice-versa + +# This hash is for testing a line conversion to a hash of parameters +# which will be used to create a resource. +ARGS_TO_HASH6 = { + 'source_destination_ipv6_no_cidr' => { + :line => '-A INPUT -s 2001:db8:85a3::8a2e:370:7334 -d 2001:db8:85a3::8a2e:370:7334 -m comment --comment "000 source destination ipv6 no cidr"', + :table => 'filter', + :provider => 'ip6tables', + :params => { + :source => '2001:db8:85a3::8a2e:370:7334/128', + :destination => '2001:db8:85a3::8a2e:370:7334/128', + }, + }, + 'source_destination_ipv6_netmask' => { + :line => '-A INPUT -s 2001:db8:1234::/ffff:ffff:ffff:0000:0000:0000:0000:0000 -d 2001:db8:4321::/ffff:ffff:ffff:0000:0000:0000:0000:0000 -m comment --comment "000 source destination ipv6 netmask"', + :table => 'filter', + :provider => 'ip6tables', + :params => { + :source => '2001:db8:1234::/48', + :destination => '2001:db8:4321::/48', + }, + }, +} + +# This hash is for testing converting a hash to an argument line. +HASH_TO_ARGS6 = { + 'zero_prefixlen_ipv6' => { + :params => { + :name => '100 zero prefix length ipv6', + :table => 'filter', + :provider => 'ip6tables', + :source => '::/0', + :destination => '::/0', + }, + :args => ['-t', :filter, '-p', :tcp, '-m', 'comment', '--comment', '100 zero prefix length ipv6'], + }, + 'source_destination_ipv4_no_cidr' => { + :params => { + :name => '000 source destination ipv4 no cidr', + :table => 'filter', + :provider => 'ip6tables', + :source => '1.1.1.1', + :destination => '2.2.2.2', + }, + :args => ['-t', :filter, '-s', '1.1.1.1/32', '-d', '2.2.2.2/32', '-p', :tcp, '-m', 'comment', '--comment', '000 source destination ipv4 no cidr'], + }, + 'source_destination_ipv6_no_cidr' => { + :params => { + :name => '000 source destination ipv6 no cidr', + :table => 'filter', + :provider => 'ip6tables', + :source => '2001:db8:1234::', + :destination => '2001:db8:4321::', + }, + :args => ['-t', :filter, '-s', '2001:db8:1234::/128', '-d', '2001:db8:4321::/128', '-p', :tcp, '-m', 'comment', '--comment', '000 source destination ipv6 no cidr'], + }, + 'source_destination_ipv6_netmask' => { + :params => { + :name => '000 source destination ipv6 netmask', + :table => 'filter', + :provider => 'ip6tables', + :source => '2001:db8:1234::/ffff:ffff:ffff:0000:0000:0000:0000:0000', + :destination => '2001:db8:4321::/ffff:ffff:ffff:0000:0000:0000:0000:0000', + }, + :args => ['-t', :filter, '-s', '2001:db8:1234::/48', '-d', '2001:db8:4321::/48', '-p', :tcp, '-m', 'comment', '--comment', '000 source destination ipv6 netmask'], + }, + 'frag_ishasmorefrags' => { + :params => { + :name => "100 has more fragments", + :ishasmorefrags => true, + :provider => 'ip6tables', + :table => "filter", + }, + :args => ["-t", :filter, "-p", :tcp, "-m", "frag", "--fragid", "0", "--fragmore", "-m", "comment", "--comment", "100 has more fragments"], + }, + 'frag_islastfrag' => { + :params => { + :name => "100 last fragment", + :islastfrag => true, + :provider => 'ip6tables', + :table => "filter", + }, + :args => ["-t", :filter, "-p", :tcp, "-m", "frag", "--fragid", "0", "--fraglast", "-m", "comment", "--comment", "100 last fragment"], + }, + 'frag_isfirstfrags' => { + :params => { + :name => "100 first fragment", + :isfirstfrag => true, + :provider => 'ip6tables', + :table => "filter", + }, + :args => ["-t", :filter, "-p", :tcp, "-m", "frag", "--fragid", "0", "--fragfirst", "-m", "comment", "--comment", "100 first fragment"], + }, + 'hop_limit' => { + :params => { + :name => "100 hop limit", + :hop_limit => 255, + :provider => 'ip6tables', + :table => "filter", + }, + :args => ["-t", :filter, "-p", :tcp, "-m", "comment", "--comment", "100 hop limit", "-m", "hl", "--hl-eq", 255], + }, +} diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/firewall/spec/fixtures/iptables/conversion_hash.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/firewall/spec/fixtures/iptables/conversion_hash.rb new file mode 100644 index 00000000000..105d27fb6b2 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/firewall/spec/fixtures/iptables/conversion_hash.rb @@ -0,0 +1,934 @@ +# These hashes allow us to iterate across a series of test data +# creating rspec examples for each parameter to ensure the input :line +# extrapolates to the desired value for the parameter in question. And +# vice-versa + +# This hash is for testing a line conversion to a hash of parameters +# which will be used to create a resource. +ARGS_TO_HASH = { + 'dport_and_sport' => { + :line => '-A nova-compute-FORWARD -s 0.0.0.0/32 -d 255.255.255.255/32 -p udp -m udp --sport 68 --dport 67 -j ACCEPT', + :table => 'filter', + :params => { + :action => 'accept', + :chain => 'nova-compute-FORWARD', + :source => '0.0.0.0/32', + :destination => '255.255.255.255/32', + :sport => ['68'], + :dport => ['67'], + :proto => 'udp', + }, + }, + 'long_rule_1' => { + :line => '-A INPUT -s 1.1.1.1/32 -d 1.1.1.1/32 -p tcp -m multiport --dports 7061,7062 -m multiport --sports 7061,7062 -m comment --comment "000 allow foo" -j ACCEPT', + :table => 'filter', + :compare_all => true, + :params => { + :action => "accept", + :chain => "INPUT", + :destination => "1.1.1.1/32", + :dport => ["7061","7062"], + :ensure => :present, + :line => '-A INPUT -s 1.1.1.1/32 -d 1.1.1.1/32 -p tcp -m multiport --dports 7061,7062 -m multiport --sports 7061,7062 -m comment --comment "000 allow foo" -j ACCEPT', + :name => "000 allow foo", + :proto => "tcp", + :provider => "iptables", + :source => "1.1.1.1/32", + :sport => ["7061","7062"], + :table => "filter", + }, + }, + 'action_drop_1' => { + :line => '-A INPUT -m comment --comment "000 allow foo" -j DROP', + :table => 'filter', + :params => { + :jump => nil, + :action => "drop", + }, + }, + 'action_reject_1' => { + :line => '-A INPUT -m comment --comment "000 allow foo" -j REJECT', + :table => 'filter', + :params => { + :jump => nil, + :action => "reject", + }, + }, + 'action_nil_1' => { + :line => '-A INPUT -m comment --comment "000 allow foo"', + :table => 'filter', + :params => { + :jump => nil, + :action => nil, + }, + }, + 'jump_custom_chain_1' => { + :line => '-A INPUT -m comment --comment "000 allow foo" -j custom_chain', + :table => 'filter', + :params => { + :jump => "custom_chain", + :action => nil, + }, + }, + 'source_destination_ipv4_no_cidr' => { + :line => '-A INPUT -s 1.1.1.1 -d 2.2.2.2 -m comment --comment "000 source destination ipv4 no cidr"', + :table => 'filter', + :params => { + :source => '1.1.1.1/32', + :destination => '2.2.2.2/32', + }, + }, + 'source_destination_ipv6_no_cidr' => { + :line => '-A INPUT -s 2001:db8:85a3::8a2e:370:7334 -d 2001:db8:85a3::8a2e:370:7334 -m comment --comment "000 source destination ipv6 no cidr"', + :table => 'filter', + :params => { + :source => '2001:db8:85a3::8a2e:370:7334/128', + :destination => '2001:db8:85a3::8a2e:370:7334/128', + }, + }, + 'source_destination_ipv4_netmask' => { + :line => '-A INPUT -s 1.1.1.0/255.255.255.0 -d 2.2.0.0/255.255.0.0 -m comment --comment "000 source destination ipv4 netmask"', + :table => 'filter', + :params => { + :source => '1.1.1.0/24', + :destination => '2.2.0.0/16', + }, + }, + 'source_destination_ipv6_netmask' => { + :line => '-A INPUT -s 2001:db8:1234::/ffff:ffff:ffff:0000:0000:0000:0000:0000 -d 2001:db8:4321::/ffff:ffff:ffff:0000:0000:0000:0000:0000 -m comment --comment "000 source destination ipv6 netmask"', + :table => 'filter', + :params => { + :source => '2001:db8:1234::/48', + :destination => '2001:db8:4321::/48', + }, + }, + 'source_destination_negate_source' => { + :line => '-A INPUT ! -s 1.1.1.1 -d 2.2.2.2 -m comment --comment "000 negated source address"', + :table => 'filter', + :params => { + :source => '! 1.1.1.1/32', + :destination => '2.2.2.2/32', + }, + }, + 'source_destination_negate_destination' => { + :line => '-A INPUT -s 1.1.1.1 ! -d 2.2.2.2 -m comment --comment "000 negated destination address"', + :table => 'filter', + :params => { + :source => '1.1.1.1/32', + :destination => '! 2.2.2.2/32', + }, + }, + 'source_destination_negate_destination_alternative' => { + :line => '-A INPUT -s 1.1.1.1 -d ! 2.2.2.2 -m comment --comment "000 negated destination address alternative"', + :table => 'filter', + :params => { + :source => '1.1.1.1/32', + :destination => '! 2.2.2.2/32', + }, + }, + 'dport_range_1' => { + :line => '-A INPUT -m multiport --dports 1:1024 -m comment --comment "000 allow foo"', + :table => 'filter', + :params => { + :dport => ["1-1024"], + }, + }, + 'dport_range_2' => { + :line => '-A INPUT -m multiport --dports 15,512:1024 -m comment --comment "000 allow foo"', + :table => 'filter', + :params => { + :dport => ["15","512-1024"], + }, + }, + 'sport_range_1' => { + :line => '-A INPUT -m multiport --sports 1:1024 -m comment --comment "000 allow foo"', + :table => 'filter', + :params => { + :sport => ["1-1024"], + }, + }, + 'sport_range_2' => { + :line => '-A INPUT -m multiport --sports 15,512:1024 -m comment --comment "000 allow foo"', + :table => 'filter', + :params => { + :sport => ["15","512-1024"], + }, + }, + 'dst_type_1' => { + :line => '-A INPUT -m addrtype --dst-type LOCAL', + :table => 'filter', + :params => { + :dst_type => 'LOCAL', + }, + }, + 'src_type_1' => { + :line => '-A INPUT -m addrtype --src-type LOCAL', + :table => 'filter', + :params => { + :src_type => 'LOCAL', + }, + }, + 'dst_range_1' => { + :line => '-A INPUT -m iprange --dst-range 10.0.0.2-10.0.0.20', + :table => 'filter', + :params => { + :dst_range => '10.0.0.2-10.0.0.20', + }, + }, + 'src_range_1' => { + :line => '-A INPUT -m iprange --src-range 10.0.0.2-10.0.0.20', + :table => 'filter', + :params => { + :src_range => '10.0.0.2-10.0.0.20', + }, + }, + 'tcp_flags_1' => { + :line => '-A INPUT -p tcp -m tcp --tcp-flags SYN,RST,ACK,FIN SYN -m comment --comment "000 initiation"', + :table => 'filter', + :compare_all => true, + :chain => 'INPUT', + :proto => 'tcp', + :params => { + :chain => "INPUT", + :ensure => :present, + :line => '-A INPUT -p tcp -m tcp --tcp-flags SYN,RST,ACK,FIN SYN -m comment --comment "000 initiation"', + :name => "000 initiation", + :proto => "tcp", + :provider => "iptables", + :table => "filter", + :tcp_flags => "SYN,RST,ACK,FIN SYN", + }, + }, + 'state_returns_sorted_values' => { + :line => '-A INPUT -m state --state INVALID,RELATED,ESTABLISHED', + :table => 'filter', + :params => { + :state => ['ESTABLISHED', 'INVALID', 'RELATED'], + :action => nil, + }, + }, + 'ctstate_returns_sorted_values' => { + :line => '-A INPUT -m conntrack --ctstate INVALID,RELATED,ESTABLISHED', + :table => 'filter', + :params => { + :ctstate => ['ESTABLISHED', 'INVALID', 'RELATED'], + :action => nil, + }, + }, + 'comment_string_character_validation' => { + :line => '-A INPUT -s 192.168.0.1/32 -m comment --comment "000 allow from 192.168.0.1, please"', + :table => 'filter', + :params => { + :source => '192.168.0.1/32', + }, + }, + 'log_level_debug' => { + :line => '-A INPUT -m comment --comment "956 INPUT log-level" -m state --state NEW -j LOG --log-level 7', + :table => 'filter', + :params => { + :state => ['NEW'], + :log_level => '7', + :jump => 'LOG' + }, + }, + 'log_level_warn' => { + :line => '-A INPUT -m comment --comment "956 INPUT log-level" -m state --state NEW -j LOG', + :table => 'filter', + :params => { + :state => ['NEW'], + :log_level => '4', + :jump => 'LOG' + }, + }, + 'load_limit_module_and_implicit_burst' => { + :line => '-A INPUT -m multiport --dports 123 -m comment --comment "057 INPUT limit NTP" -m limit --limit 15/hour', + :table => 'filter', + :params => { + :dport => ['123'], + :limit => '15/hour', + :burst => '5' + }, + }, + 'limit_with_explicit_burst' => { + :line => '-A INPUT -m multiport --dports 123 -m comment --comment "057 INPUT limit NTP" -m limit --limit 30/hour --limit-burst 10', + :table => 'filter', + :params => { + :dport => ['123'], + :limit => '30/hour', + :burst => '10' + }, + }, + 'proto_ipencap' => { + :line => '-A INPUT -p ipencap -m comment --comment "0100 INPUT accept ipencap"', + :table => 'filter', + :params => { + :proto => 'ipencap', + } + }, + 'load_uid_owner_filter_module' => { + :line => '-A OUTPUT -m owner --uid-owner root -m comment --comment "057 OUTPUT uid root only" -j ACCEPT', + :table => 'filter', + :params => { + :action => 'accept', + :uid => 'root', + :chain => 'OUTPUT', + }, + }, + 'load_uid_owner_postrouting_module' => { + :line => '-t mangle -A POSTROUTING -m owner --uid-owner root -m comment --comment "057 POSTROUTING uid root only" -j ACCEPT', + :table => 'mangle', + :params => { + :action => 'accept', + :chain => 'POSTROUTING', + :uid => 'root', + }, + }, + 'load_gid_owner_filter_module' => { + :line => '-A OUTPUT -m owner --gid-owner root -m comment --comment "057 OUTPUT gid root only" -j ACCEPT', + :table => 'filter', + :params => { + :action => 'accept', + :chain => 'OUTPUT', + :gid => 'root', + }, + }, + 'load_gid_owner_postrouting_module' => { + :line => '-t mangle -A POSTROUTING -m owner --gid-owner root -m comment --comment "057 POSTROUTING gid root only" -j ACCEPT', + :table => 'mangle', + :params => { + :action => 'accept', + :chain => 'POSTROUTING', + :gid => 'root', + }, + }, + 'mark_set-mark' => { + :line => '-t mangle -A PREROUTING -j MARK --set-xmark 0x3e8/0xffffffff', + :table => 'mangle', + :params => { + :jump => 'MARK', + :chain => 'PREROUTING', + :set_mark => '0x3e8/0xffffffff', + } + }, + 'iniface_1' => { + :line => '-A INPUT -i eth0 -m comment --comment "060 iniface" -j DROP', + :table => 'filter', + :params => { + :action => 'drop', + :chain => 'INPUT', + :iniface => 'eth0', + }, + }, + 'iniface_with_vlans_1' => { + :line => '-A INPUT -i eth0.234 -m comment --comment "060 iniface" -j DROP', + :table => 'filter', + :params => { + :action => 'drop', + :chain => 'INPUT', + :iniface => 'eth0.234', + }, + }, + 'iniface_with_plus_1' => { + :line => '-A INPUT -i eth+ -m comment --comment "060 iniface" -j DROP', + :table => 'filter', + :params => { + :action => 'drop', + :chain => 'INPUT', + :iniface => 'eth+', + }, + }, + 'outiface_1' => { + :line => '-A OUTPUT -o eth0 -m comment --comment "060 outiface" -j DROP', + :table => 'filter', + :params => { + :action => 'drop', + :chain => 'OUTPUT', + :outiface => 'eth0', + }, + }, + 'outiface_with_vlans_1' => { + :line => '-A OUTPUT -o eth0.234 -m comment --comment "060 outiface" -j DROP', + :table => 'filter', + :params => { + :action => 'drop', + :chain => 'OUTPUT', + :outiface => 'eth0.234', + }, + }, + 'outiface_with_plus_1' => { + :line => '-A OUTPUT -o eth+ -m comment --comment "060 outiface" -j DROP', + :table => 'filter', + :params => { + :action => 'drop', + :chain => 'OUTPUT', + :outiface => 'eth+', + }, + }, + 'pkttype multicast' => { + :line => '-A INPUT -m pkttype --pkt-type multicast -j ACCEPT', + :table => 'filter', + :params => { + :action => 'accept', + :pkttype => 'multicast', + }, + }, + 'socket_option' => { + :line => '-A PREROUTING -m socket -j ACCEPT', + :table => 'mangle', + :params => { + :action => 'accept', + :chain => 'PREROUTING', + :socket => true, + }, + }, + 'isfragment_option' => { + :line => '-A INPUT -f -m comment --comment "010 a-f comment with dashf" -j ACCEPT', + :table => 'filter', + :params => { + :name => '010 a-f comment with dashf', + :action => 'accept', + :isfragment => true, + }, + }, + 'single_tcp_sport' => { + :line => '-A OUTPUT -s 10.94.100.46/32 -p tcp -m tcp --sport 20443 -j ACCEPT', + :table => 'mangle', + :params => { + :action => 'accept', + :chain => 'OUTPUT', + :source => "10.94.100.46/32", + :proto => "tcp", + :sport => ["20443"], + }, + }, + 'single_udp_sport' => { + :line => '-A OUTPUT -s 10.94.100.46/32 -p udp -m udp --sport 20443 -j ACCEPT', + :table => 'mangle', + :params => { + :action => 'accept', + :chain => 'OUTPUT', + :source => "10.94.100.46/32", + :proto => "udp", + :sport => ["20443"], + }, + }, + 'single_tcp_dport' => { + :line => '-A OUTPUT -s 10.94.100.46/32 -p tcp -m tcp --dport 20443 -j ACCEPT', + :table => 'mangle', + :params => { + :action => 'accept', + :chain => 'OUTPUT', + :source => "10.94.100.46/32", + :proto => "tcp", + :dport => ["20443"], + }, + }, + 'single_udp_dport' => { + :line => '-A OUTPUT -s 10.94.100.46/32 -p udp -m udp --dport 20443 -j ACCEPT', + :table => 'mangle', + :params => { + :action => 'accept', + :chain => 'OUTPUT', + :source => "10.94.100.46/32", + :proto => "udp", + :dport => ["20443"], + }, + }, + 'connlimit_above' => { + :line => '-A INPUT -p tcp -m multiport --dports 22 -m comment --comment "061 REJECT connlimit_above 10" -m connlimit --connlimit-above 10 --connlimit-mask 32 -j REJECT --reject-with icmp-port-unreachable', + :table => 'filter', + :params => { + :proto => 'tcp', + :dport => ["22"], + :connlimit_above => '10', + :action => 'reject', + }, + }, + 'connlimit_above_with_connlimit_mask' => { + :line => '-A INPUT -p tcp -m multiport --dports 22 -m comment --comment "061 REJECT connlimit_above 10 with mask 24" -m connlimit --connlimit-above 10 --connlimit-mask 24 -j REJECT --reject-with icmp-port-unreachable', + :table => 'filter', + :params => { + :proto => 'tcp', + :dport => ["22"], + :connlimit_above => '10', + :connlimit_mask => '24', + :action => 'reject', + }, + }, + 'connmark' => { + :line => '-A INPUT -m comment --comment "062 REJECT connmark" -m connmark --mark 0x1 -j REJECT --reject-with icmp-port-unreachable', + :table => 'filter', + :params => { + :proto => 'all', + :connmark => '0x1', + :action => 'reject', + }, + }, +} + +# This hash is for testing converting a hash to an argument line. +HASH_TO_ARGS = { + 'long_rule_1' => { + :params => { + :action => "accept", + :chain => "INPUT", + :destination => "1.1.1.1", + :dport => ["7061","7062"], + :ensure => :present, + :name => "000 allow foo", + :proto => "tcp", + :source => "1.1.1.1", + :sport => ["7061","7062"], + :table => "filter", + }, + :args => ["-t", :filter, "-s", "1.1.1.1/32", "-d", "1.1.1.1/32", "-p", :tcp, "-m", "multiport", "--sports", "7061,7062", "-m", "multiport", "--dports", "7061,7062", "-m", "comment", "--comment", "000 allow foo", "-j", "ACCEPT"], + }, + 'long_rule_2' => { + :params => { + :chain => "INPUT", + :destination => "2.10.13.3/24", + :dport => ["7061"], + :ensure => :present, + :jump => "my_custom_chain", + :name => "700 allow bar", + :proto => "udp", + :source => "1.1.1.1", + :sport => ["7061","7062"], + :table => "filter", + }, + :args => ["-t", :filter, "-s", "1.1.1.1/32", "-d", "2.10.13.0/24", "-p", :udp, "-m", "multiport", "--sports", "7061,7062", "-m", "multiport", "--dports", "7061", "-m", "comment", "--comment", "700 allow bar", "-j", "my_custom_chain"], + }, + 'no_action' => { + :params => { + :name => "100 no action", + :table => "filter", + }, + :args => ["-t", :filter, "-p", :tcp, "-m", "comment", "--comment", + "100 no action"], + }, + 'zero_prefixlen_ipv4' => { + :params => { + :name => '100 zero prefix length ipv4', + :table => 'filter', + :source => '0.0.0.0/0', + :destination => '0.0.0.0/0', + }, + :args => ['-t', :filter, '-p', :tcp, '-m', 'comment', '--comment', '100 zero prefix length ipv4'], + }, + 'zero_prefixlen_ipv6' => { + :params => { + :name => '100 zero prefix length ipv6', + :table => 'filter', + :source => '::/0', + :destination => '::/0', + }, + :args => ['-t', :filter, '-p', :tcp, '-m', 'comment', '--comment', '100 zero prefix length ipv6'], + }, + 'source_destination_ipv4_no_cidr' => { + :params => { + :name => '000 source destination ipv4 no cidr', + :table => 'filter', + :source => '1.1.1.1', + :destination => '2.2.2.2', + }, + :args => ['-t', :filter, '-s', '1.1.1.1/32', '-d', '2.2.2.2/32', '-p', :tcp, '-m', 'comment', '--comment', '000 source destination ipv4 no cidr'], + }, + 'source_destination_ipv6_no_cidr' => { + :params => { + :name => '000 source destination ipv6 no cidr', + :table => 'filter', + :source => '2001:db8:1234::', + :destination => '2001:db8:4321::', + }, + :args => ['-t', :filter, '-s', '2001:db8:1234::/128', '-d', '2001:db8:4321::/128', '-p', :tcp, '-m', 'comment', '--comment', '000 source destination ipv6 no cidr'], + }, + 'source_destination_ipv4_netmask' => { + :params => { + :name => '000 source destination ipv4 netmask', + :table => 'filter', + :source => '1.1.1.0/255.255.255.0', + :destination => '2.2.0.0/255.255.0.0', + }, + :args => ['-t', :filter, '-s', '1.1.1.0/24', '-d', '2.2.0.0/16', '-p', :tcp, '-m', 'comment', '--comment', '000 source destination ipv4 netmask'], + }, + 'source_destination_ipv6_netmask' => { + :params => { + :name => '000 source destination ipv6 netmask', + :table => 'filter', + :source => '2001:db8:1234::/ffff:ffff:ffff:0000:0000:0000:0000:0000', + :destination => '2001:db8:4321::/ffff:ffff:ffff:0000:0000:0000:0000:0000', + }, + :args => ['-t', :filter, '-s', '2001:db8:1234::/48', '-d', '2001:db8:4321::/48', '-p', :tcp, '-m', 'comment', '--comment', '000 source destination ipv6 netmask'], + }, + 'sport_range_1' => { + :params => { + :name => "100 sport range", + :sport => ["1-1024"], + :table => "filter", + }, + :args => ["-t", :filter, "-p", :tcp, "-m", "multiport", "--sports", "1:1024", "-m", "comment", "--comment", "100 sport range"], + }, + 'sport_range_2' => { + :params => { + :name => "100 sport range", + :sport => ["15","512-1024"], + :table => "filter", + }, + :args => ["-t", :filter, "-p", :tcp, "-m", "multiport", "--sports", "15,512:1024", "-m", "comment", "--comment", "100 sport range"], + }, + 'dport_range_1' => { + :params => { + :name => "100 sport range", + :dport => ["1-1024"], + :table => "filter", + }, + :args => ["-t", :filter, "-p", :tcp, "-m", "multiport", "--dports", "1:1024", "-m", "comment", "--comment", "100 sport range"], + }, + 'dport_range_2' => { + :params => { + :name => "100 sport range", + :dport => ["15","512-1024"], + :table => "filter", + }, + :args => ["-t", :filter, "-p", :tcp, "-m", "multiport", "--dports", "15,512:1024", "-m", "comment", "--comment", "100 sport range"], + }, + 'dst_type_1' => { + :params => { + :name => '000 dst_type', + :table => 'filter', + :dst_type => 'LOCAL', + }, + :args => ['-t', :filter, '-p', :tcp, '-m', 'addrtype', '--dst-type', :LOCAL, '-m', 'comment', '--comment', '000 dst_type'], + }, + 'src_type_1' => { + :params => { + :name => '000 src_type', + :table => 'filter', + :src_type => 'LOCAL', + }, + :args => ['-t', :filter, '-p', :tcp, '-m', 'addrtype', '--src-type', :LOCAL, '-m', 'comment', '--comment', '000 src_type'], + }, + 'dst_range_1' => { + :params => { + :name => '000 dst_range', + :table => 'filter', + :dst_range => '10.0.0.1-10.0.0.10', + }, + :args => ['-t', :filter, '-p', :tcp, '-m', 'iprange', '--dst-range', '10.0.0.1-10.0.0.10', '-m', 'comment', '--comment', '000 dst_range'], + }, + 'src_range_1' => { + :params => { + :name => '000 src_range', + :table => 'filter', + :dst_range => '10.0.0.1-10.0.0.10', + }, + :args => ['-t', :filter, '-p', :tcp, '-m', 'iprange', '--dst-range', '10.0.0.1-10.0.0.10', '-m', 'comment', '--comment', '000 src_range'], + }, + 'tcp_flags_1' => { + :params => { + :name => "000 initiation", + :tcp_flags => "SYN,RST,ACK,FIN SYN", + :table => "filter", + }, + + :args => ["-t", :filter, "-p", :tcp, "-m", "tcp", "--tcp-flags", "SYN,RST,ACK,FIN", "SYN", "-m", "comment", "--comment", "000 initiation",] + }, + 'states_set_from_array' => { + :params => { + :name => "100 states_set_from_array", + :table => "filter", + :state => ['ESTABLISHED', 'INVALID'] + }, + :args => ["-t", :filter, "-p", :tcp, "-m", "comment", "--comment", "100 states_set_from_array", + "-m", "state", "--state", "ESTABLISHED,INVALID"], + }, + 'ctstates_set_from_array' => { + :params => { + :name => "100 ctstates_set_from_array", + :table => "filter", + :ctstate => ['ESTABLISHED', 'INVALID'] + }, + :args => ["-t", :filter, "-p", :tcp, "-m", "comment", "--comment", "100 ctstates_set_from_array", + "-m", "conntrack", "--ctstate", "ESTABLISHED,INVALID"], + }, + 'comment_string_character_validation' => { + :params => { + :name => "000 allow from 192.168.0.1, please", + :table => 'filter', + :source => '192.168.0.1' + }, + :args => ['-t', :filter, '-s', '192.168.0.1/32', '-p', :tcp, '-m', 'comment', '--comment', '000 allow from 192.168.0.1, please'], + }, + 'port_property' => { + :params => { + :name => '001 port property', + :table => 'filter', + :port => '80', + }, + :args => ['-t', :filter, '-p', :tcp, '-m', 'multiport', '--ports', '80', '-m', 'comment', '--comment', '001 port property'], + }, + 'log_level_debug' => { + :params => { + :name => '956 INPUT log-level', + :table => 'filter', + :state => 'NEW', + :jump => 'LOG', + :log_level => 'debug' + }, + :args => ['-t', :filter, '-p', :tcp, '-m', 'comment', '--comment', '956 INPUT log-level', '-m', 'state', '--state', 'NEW', '-j', 'LOG', '--log-level', '7'], + }, + 'log_level_warn' => { + :params => { + :name => '956 INPUT log-level', + :table => 'filter', + :state => 'NEW', + :jump => 'LOG', + :log_level => 'warn' + }, + :args => ['-t', :filter, '-p', :tcp, '-m', 'comment', '--comment', '956 INPUT log-level', '-m', 'state', '--state', 'NEW', '-j', 'LOG', '--log-level', '4'], + }, + 'load_limit_module_and_implicit_burst' => { + :params => { + :name => '057 INPUT limit NTP', + :table => 'filter', + :dport => '123', + :limit => '15/hour' + }, + :args => ['-t', :filter, '-p', :tcp, '-m', 'multiport', '--dports', '123', '-m', 'comment', '--comment', '057 INPUT limit NTP', '-m', 'limit', '--limit', '15/hour'], + }, + 'limit_with_explicit_burst' => { + :params => { + :name => '057 INPUT limit NTP', + :table => 'filter', + :dport => '123', + :limit => '30/hour', + :burst => '10' + }, + :args => ['-t', :filter, '-p', :tcp, '-m', 'multiport', '--dports', '123', '-m', 'comment', '--comment', '057 INPUT limit NTP', '-m', 'limit', '--limit', '30/hour', '--limit-burst', '10'], + }, + 'proto_ipencap' => { + :params => { + :name => '0100 INPUT accept ipencap', + :table => 'filter', + :proto => 'ipencap', + }, + :args => ['-t', :filter, '-p', :ipencap, '-m', 'comment', '--comment', '0100 INPUT accept ipencap'], + }, + 'load_uid_owner_filter_module' => { + :params => { + :name => '057 OUTPUT uid root only', + :table => 'filter', + :uid => 'root', + :action => 'accept', + :chain => 'OUTPUT', + :proto => 'all', + }, + :args => ['-t', :filter, '-p', :all, '-m', 'owner', '--uid-owner', 'root', '-m', 'comment', '--comment', '057 OUTPUT uid root only', '-j', 'ACCEPT'], + }, + 'load_uid_owner_postrouting_module' => { + :params => { + :name => '057 POSTROUTING uid root only', + :table => 'mangle', + :uid => 'root', + :action => 'accept', + :chain => 'POSTROUTING', + :proto => 'all', + }, + :args => ['-t', :mangle, '-p', :all, '-m', 'owner', '--uid-owner', 'root', '-m', 'comment', '--comment', '057 POSTROUTING uid root only', '-j', 'ACCEPT'], + }, + 'load_gid_owner_filter_module' => { + :params => { + :name => '057 OUTPUT gid root only', + :table => 'filter', + :chain => 'OUTPUT', + :gid => 'root', + :action => 'accept', + :proto => 'all', + }, + :args => ['-t', :filter, '-p', :all, '-m', 'owner', '--gid-owner', 'root', '-m', 'comment', '--comment', '057 OUTPUT gid root only', '-j', 'ACCEPT'], + }, + 'load_gid_owner_postrouting_module' => { + :params => { + :name => '057 POSTROUTING gid root only', + :table => 'mangle', + :gid => 'root', + :action => 'accept', + :chain => 'POSTROUTING', + :proto => 'all', + }, + :args => ['-t', :mangle, '-p', :all, '-m', 'owner', '--gid-owner', 'root', '-m', 'comment', '--comment', '057 POSTROUTING gid root only', '-j', 'ACCEPT'], + }, + 'mark_set-mark_int' => { + :params => { + :name => '058 set-mark 1000', + :table => 'mangle', + :jump => 'MARK', + :chain => 'PREROUTING', + :set_mark => '1000', + }, + :args => ['-t', :mangle, '-p', :tcp, '-m', 'comment', '--comment', '058 set-mark 1000', '-j', 'MARK', '--set-xmark', '0x3e8/0xffffffff'], + }, + 'mark_set-mark_hex' => { + :params => { + :name => '058 set-mark 0x32', + :table => 'mangle', + :jump => 'MARK', + :chain => 'PREROUTING', + :set_mark => '0x32', + }, + :args => ['-t', :mangle, '-p', :tcp, '-m', 'comment', '--comment', '058 set-mark 0x32', '-j', 'MARK', '--set-xmark', '0x32/0xffffffff'], + }, + 'mark_set-mark_hex_with_hex_mask' => { + :params => { + :name => '058 set-mark 0x32/0xffffffff', + :table => 'mangle', + :jump => 'MARK', + :chain => 'PREROUTING', + :set_mark => '0x32/0xffffffff', + }, + :args => ['-t', :mangle, '-p', :tcp, '-m', 'comment', '--comment', '058 set-mark 0x32/0xffffffff', '-j', 'MARK', '--set-xmark', '0x32/0xffffffff'], + }, + 'mark_set-mark_hex_with_mask' => { + :params => { + :name => '058 set-mark 0x32/4', + :table => 'mangle', + :jump => 'MARK', + :chain => 'PREROUTING', + :set_mark => '0x32/4', + }, + :args => ['-t', :mangle, '-p', :tcp, '-m', 'comment', '--comment', '058 set-mark 0x32/4', '-j', 'MARK', '--set-xmark', '0x32/0x4'], + }, + 'iniface_1' => { + :params => { + :name => '060 iniface', + :table => 'filter', + :action => 'drop', + :chain => 'INPUT', + :iniface => 'eth0', + }, + :args => ["-t", :filter, "-i", "eth0", "-p", :tcp, "-m", "comment", "--comment", "060 iniface", "-j", "DROP"], + }, + 'iniface_with_vlans_1' => { + :params => { + :name => '060 iniface', + :table => 'filter', + :action => 'drop', + :chain => 'INPUT', + :iniface => 'eth0.234', + }, + :args => ["-t", :filter, "-i", "eth0.234", "-p", :tcp, "-m", "comment", "--comment", "060 iniface", "-j", "DROP"], + }, + 'iniface_with_plus_1' => { + :params => { + :name => '060 iniface', + :table => 'filter', + :action => 'drop', + :chain => 'INPUT', + :iniface => 'eth+', + }, + :args => ["-t", :filter, "-i", "eth+", "-p", :tcp, "-m", "comment", "--comment", "060 iniface", "-j", "DROP"], + }, + 'outiface_1' => { + :params => { + :name => '060 outiface', + :table => 'filter', + :action => 'drop', + :chain => 'OUTPUT', + :outiface => 'eth0', + }, + :args => ["-t", :filter, "-o", "eth0", "-p", :tcp, "-m", "comment", "--comment", "060 outiface", "-j", "DROP"], + }, + 'outiface_with_vlans_1' => { + :params => { + :name => '060 outiface', + :table => 'filter', + :action => 'drop', + :chain => 'OUTPUT', + :outiface => 'eth0.234', + }, + :args => ["-t", :filter, "-o", "eth0.234", "-p", :tcp, "-m", "comment", "--comment", "060 outiface", "-j", "DROP"], + }, + 'outiface_with_plus_1' => { + :params => { + :name => '060 outiface', + :table => 'filter', + :action => 'drop', + :chain => 'OUTPUT', + :outiface => 'eth+', + }, + :args => ["-t", :filter, "-o", "eth+", "-p", :tcp, "-m", "comment", "--comment", "060 outiface", "-j", "DROP"], + }, + 'pkttype multicast' => { + :params => { + :name => '062 pkttype multicast', + :table => "filter", + :action => 'accept', + :chain => 'INPUT', + :iniface => 'eth0', + :pkttype => 'multicast', + }, + :args => ["-t", :filter, "-i", "eth0", "-p", :tcp, "-m", "pkttype", "--pkt-type", :multicast, "-m", "comment", "--comment", "062 pkttype multicast", "-j", "ACCEPT"], + }, + 'socket_option' => { + :params => { + :name => '050 socket option', + :table => 'mangle', + :action => 'accept', + :chain => 'PREROUTING', + :socket => true, + }, + :args => ['-t', :mangle, '-p', :tcp, '-m', 'socket', '-m', 'comment', '--comment', '050 socket option', '-j', 'ACCEPT'], + }, + 'isfragment_option' => { + :params => { + :name => '050 isfragment option', + :table => 'filter', + :proto => :all, + :action => 'accept', + :isfragment => true, + }, + :args => ['-t', :filter, '-p', :all, '-f', '-m', 'comment', '--comment', '050 isfragment option', '-j', 'ACCEPT'], + }, + 'isfragment_option not changing -f in comment' => { + :params => { + :name => '050 testcomment-with-fdashf', + :table => 'filter', + :proto => :all, + :action => 'accept', + }, + :args => ['-t', :filter, '-p', :all, '-m', 'comment', '--comment', '050 testcomment-with-fdashf', '-j', 'ACCEPT'], + }, + 'connlimit_above' => { + :params => { + :name => '061 REJECT connlimit_above 10', + :table => 'filter', + :proto => 'tcp', + :dport => ["22"], + :connlimit_above => '10', + :action => 'reject', + }, + :args => ["-t", :filter, "-p", :tcp, "-m", "multiport", "--dports", "22", "-m", "comment", "--comment", "061 REJECT connlimit_above 10", "-j", "REJECT", "-m", "connlimit", "--connlimit-above", "10"], + }, + 'connlimit_above_with_connlimit_mask' => { + :params => { + :name => '061 REJECT connlimit_above 10 with mask 24', + :table => 'filter', + :proto => 'tcp', + :dport => ["22"], + :connlimit_above => '10', + :connlimit_mask => '24', + :action => 'reject', + }, + :args => ["-t", :filter, "-p", :tcp, "-m", "multiport", "--dports", "22", "-m", "comment", "--comment", "061 REJECT connlimit_above 10 with mask 24", "-j", "REJECT", "-m", "connlimit", "--connlimit-above", "10", "--connlimit-mask", "24"], + }, + 'connmark' => { + :params => { + :name => '062 REJECT connmark', + :table => 'filter', + :proto => 'all', + :connmark => '0x1', + :action => 'reject', + }, + :args => ["-t", :filter, "-p", :all, "-m", "comment", "--comment", "062 REJECT connmark", "-j", "REJECT", "-m", "connmark", "--mark", "0x1"], + }, +} diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/firewall/spec/spec_helper.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/firewall/spec/spec_helper.rb new file mode 100644 index 00000000000..dc8bc39cb48 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/firewall/spec/spec_helper.rb @@ -0,0 +1,29 @@ +dir = File.expand_path(File.dirname(__FILE__)) +$LOAD_PATH.unshift File.join(dir, 'lib') + +# Don't want puppet getting the command line arguments for rake or autotest +ARGV.clear + +require 'rubygems' +require 'bundler/setup' +require 'rspec-puppet' + +Bundler.require :default, :test + +require 'pathname' +require 'tmpdir' + +Pathname.glob("#{dir}/shared_behaviours/**/*.rb") do |behaviour| + require behaviour.relative_path_from(Pathname.new(dir)) +end + +fixture_path = File.expand_path(File.join(__FILE__, '..', 'fixtures')) + +RSpec.configure do |config| + config.tty = true + config.mock_with :rspec do |c| + c.syntax = :expect + end + config.module_path = File.join(fixture_path, 'modules') + config.manifest_dir = File.join(fixture_path, 'manifests') +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/firewall/spec/spec_helper_acceptance.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/firewall/spec/spec_helper_acceptance.rb new file mode 100644 index 00000000000..13d056fa934 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/firewall/spec/spec_helper_acceptance.rb @@ -0,0 +1,42 @@ +require 'beaker-rspec' + +def iptables_flush_all_tables + ['filter', 'nat', 'mangle', 'raw'].each do |t| + expect(shell("iptables -t #{t} -F").stderr).to eq("") + end +end + +def ip6tables_flush_all_tables + ['filter'].each do |t| + expect(shell("ip6tables -t #{t} -F").stderr).to eq("") + end +end + +unless ENV['RS_PROVISION'] == 'no' or ENV['BEAKER_provision'] == 'no' + if hosts.first.is_pe? + install_pe + else + install_puppet + end + hosts.each do |host| + on host, "mkdir -p #{host['distmoduledir']}" + end +end + +RSpec.configure do |c| + # Project root + proj_root = File.expand_path(File.join(File.dirname(__FILE__), '..')) + + # Readable test descriptions + c.formatter = :documentation + + # Configure all nodes in nodeset + c.before :suite do + # Install module and dependencies + puppet_module_install(:source => proj_root, :module_name => 'firewall') + hosts.each do |host| + shell('/bin/touch /etc/puppet/hiera.yaml') + shell('puppet module install puppetlabs-stdlib --version 3.2.0', { :acceptable_exit_codes => [0,1] }) + end + end +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/firewall/spec/unit/classes/firewall_linux_archlinux_spec.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/firewall/spec/unit/classes/firewall_linux_archlinux_spec.rb new file mode 100644 index 00000000000..954d9ee10d7 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/firewall/spec/unit/classes/firewall_linux_archlinux_spec.rb @@ -0,0 +1,32 @@ +require 'spec_helper' + +describe 'firewall::linux::archlinux', :type => :class do + it { should contain_service('iptables').with( + :ensure => 'running', + :enable => 'true' + )} + it { should contain_service('ip6tables').with( + :ensure => 'running', + :enable => 'true' + )} + + context 'ensure => stopped' do + let(:params) {{ :ensure => 'stopped' }} + it { should contain_service('iptables').with( + :ensure => 'stopped' + )} + it { should contain_service('ip6tables').with( + :ensure => 'stopped' + )} + end + + context 'enable => false' do + let(:params) {{ :enable => 'false' }} + it { should contain_service('iptables').with( + :enable => 'false' + )} + it { should contain_service('ip6tables').with( + :enable => 'false' + )} + end +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/firewall/spec/unit/classes/firewall_linux_debian_spec.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/firewall/spec/unit/classes/firewall_linux_debian_spec.rb new file mode 100644 index 00000000000..98285b642ca --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/firewall/spec/unit/classes/firewall_linux_debian_spec.rb @@ -0,0 +1,19 @@ +require 'spec_helper' + +describe 'firewall::linux::debian', :type => :class do + it { should contain_package('iptables-persistent').with( + :ensure => 'present' + )} + it { should contain_service('iptables-persistent').with( + :ensure => nil, + :enable => 'true', + :require => 'Package[iptables-persistent]' + )} + + context 'enable => false' do + let(:params) {{ :enable => 'false' }} + it { should contain_service('iptables-persistent').with( + :enable => 'false' + )} + end +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/firewall/spec/unit/classes/firewall_linux_redhat_spec.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/firewall/spec/unit/classes/firewall_linux_redhat_spec.rb new file mode 100644 index 00000000000..ea49d2b83b8 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/firewall/spec/unit/classes/firewall_linux_redhat_spec.rb @@ -0,0 +1,22 @@ +require 'spec_helper' + +describe 'firewall::linux::redhat', :type => :class do + it { should contain_service('iptables').with( + :ensure => 'running', + :enable => 'true' + )} + + context 'ensure => stopped' do + let(:params) {{ :ensure => 'stopped' }} + it { should contain_service('iptables').with( + :ensure => 'stopped' + )} + end + + context 'enable => false' do + let(:params) {{ :enable => 'false' }} + it { should contain_service('iptables').with( + :enable => 'false' + )} + end +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/firewall/spec/unit/classes/firewall_linux_spec.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/firewall/spec/unit/classes/firewall_linux_spec.rb new file mode 100644 index 00000000000..42056c1b1af --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/firewall/spec/unit/classes/firewall_linux_spec.rb @@ -0,0 +1,30 @@ +require 'spec_helper' + +describe 'firewall::linux', :type => :class do + let(:facts_default) {{ :kernel => 'Linux' }} + it { should contain_package('iptables').with_ensure('present') } + + context 'RedHat like' do + %w{RedHat CentOS Fedora}.each do |os| + context "operatingsystem => #{os}" do + releases = (os == 'Fedora' ? [14,15,'Rawhide'] : [6,7]) + releases.each do |osrel| + context "operatingsystemrelease => #{osrel}" do + let(:facts) { facts_default.merge({ :operatingsystem => os, + :operatingsystemrelease => osrel}) } + it { should contain_class('firewall::linux::redhat').with_require('Package[iptables]') } + end + end + end + end + end + + context 'Debian like' do + %w{Debian Ubuntu}.each do |os| + context "operatingsystem => #{os}" do + let(:facts) { facts_default.merge({ :operatingsystem => os }) } + it { should contain_class('firewall::linux::debian').with_require('Package[iptables]') } + end + end + end +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/firewall/spec/unit/classes/firewall_spec.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/firewall/spec/unit/classes/firewall_spec.rb new file mode 100644 index 00000000000..efc153ab2e4 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/firewall/spec/unit/classes/firewall_spec.rb @@ -0,0 +1,25 @@ +require 'spec_helper' + +describe 'firewall', :type => :class do + context 'kernel => Linux' do + let(:facts) {{ :kernel => 'Linux' }} + it { should contain_class('firewall::linux').with_ensure('running') } + end + + context 'kernel => Windows' do + let(:facts) {{ :kernel => 'Windows' }} + it { expect { should contain_class('firewall::linux') }.to raise_error(Puppet::Error) } + end + + context 'ensure => stopped' do + let(:facts) {{ :kernel => 'Linux' }} + let(:params) {{ :ensure => 'stopped' }} + it { should contain_class('firewall::linux').with_ensure('stopped') } + end + + context 'ensure => test' do + let(:facts) {{ :kernel => 'Linux' }} + let(:params) {{ :ensure => 'test' }} + it { expect { should contain_class('firewall::linux') }.to raise_error(Puppet::Error) } + end +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/firewall/spec/unit/facter/iptables_persistent_version_spec.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/firewall/spec/unit/facter/iptables_persistent_version_spec.rb new file mode 100644 index 00000000000..13a23a5c299 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/firewall/spec/unit/facter/iptables_persistent_version_spec.rb @@ -0,0 +1,35 @@ +require 'spec_helper' + +describe "Facter::Util::Fact iptables_persistent_version" do + before { Facter.clear } + let(:dpkg_cmd) { "dpkg-query -Wf '${Version}' iptables-persistent 2>/dev/null" } + + { + "Debian" => "0.0.20090701", + "Ubuntu" => "0.5.3ubuntu2", + }.each do |os, ver| + describe "#{os} package installed" do + before { + allow(Facter.fact(:operatingsystem)).to receive(:value).and_return(os) + allow(Facter::Util::Resolution).to receive(:exec).with(dpkg_cmd). + and_return(ver) + } + it { Facter.fact(:iptables_persistent_version).value.should == ver } + end + end + + describe 'Ubuntu package not installed' do + before { + allow(Facter.fact(:operatingsystem)).to receive(:value).and_return('Ubuntu') + allow(Facter::Util::Resolution).to receive(:exec).with(dpkg_cmd). + and_return(nil) + } + it { Facter.fact(:iptables_persistent_version).value.should be_nil } + end + + describe 'CentOS not supported' do + before { allow(Facter.fact(:operatingsystem)).to receive(:value). + and_return("CentOS") } + it { Facter.fact(:iptables_persistent_version).value.should be_nil } + end +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/firewall/spec/unit/facter/iptables_spec.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/firewall/spec/unit/facter/iptables_spec.rb new file mode 100644 index 00000000000..5773fdce569 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/firewall/spec/unit/facter/iptables_spec.rb @@ -0,0 +1,23 @@ +require 'spec_helper' + +describe "Facter::Util::Fact" do + before { + Facter.clear + allow(Facter.fact(:kernel)).to receive(:value).and_return('Linux') + allow(Facter.fact(:kernelrelease)).to receive(:value).and_return('2.6') + } + + describe 'iptables_version' do + it { + allow(Facter::Util::Resolution).to receive(:exec).with('iptables --version'). + and_return('iptables v1.4.7') + Facter.fact(:iptables_version).value.should == '1.4.7' + } + end + + describe 'ip6tables_version' do + before { allow(Facter::Util::Resolution).to receive(:exec). + with('ip6tables --version').and_return('ip6tables v1.4.7') } + it { Facter.fact(:ip6tables_version).value.should == '1.4.7' } + end +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/firewall/spec/unit/puppet/provider/iptables_chain_spec.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/firewall/spec/unit/puppet/provider/iptables_chain_spec.rb new file mode 100755 index 00000000000..f350c2e3c58 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/firewall/spec/unit/puppet/provider/iptables_chain_spec.rb @@ -0,0 +1,227 @@ +#!/usr/bin/env rspec + +require 'spec_helper' +if Puppet.version < '3.4.0' + require 'puppet/provider/confine/exists' +else + require 'puppet/confine/exists' +end + +describe 'iptables chain provider detection' do + if Puppet.version < '3.4.0' + let(:exists) { + Puppet::Provider::Confine::Exists + } + else + let(:exists) { + Puppet::Confine::Exists + } + end + + before :each do + # Reset the default provider + Puppet::Type.type(:firewallchain).defaultprovider = nil + end + + it "should default to iptables provider if /sbin/(eb|ip|ip6)tables[-save] exists" do + # Stub lookup for /sbin/iptables & /sbin/iptables-save + allow(exists).to receive(:which).with("ebtables"). + and_return "/sbin/ebtables" + allow(exists).to receive(:which).with("ebtables-save"). + and_return "/sbin/ebtables-save" + + allow(exists).to receive(:which).with("iptables"). + and_return "/sbin/iptables" + allow(exists).to receive(:which).with("iptables-save"). + and_return "/sbin/iptables-save" + + allow(exists).to receive(:which).with("ip6tables"). + and_return "/sbin/ip6tables" + allow(exists).to receive(:which).with("ip6tables-save"). + and_return "/sbin/ip6tables-save" + + # Every other command should return false so we don't pick up any + # other providers + allow(exists).to receive(:which).with() { |value| + value !~ /(eb|ip|ip6)tables(-save)?$/ + }.and_return false + + # Create a resource instance and make sure the provider is iptables + resource = Puppet::Type.type(:firewallchain).new({ + :name => 'test:filter:IPv4', + }) + expect(resource.provider.class.to_s).to eq("Puppet::Type::Firewallchain::ProviderIptables_chain") + end +end + +describe 'iptables chain provider' do + let(:provider) { Puppet::Type.type(:firewallchain).provider(:iptables_chain) } + let(:resource) { + Puppet::Type.type(:firewallchain).new({ + :name => ':test:', + }) + } + + before :each do + allow(Puppet::Type::Firewallchain).to receive(:defaultprovider).and_return provider + allow(provider).to receive(:command).with(:ebtables_save).and_return "/sbin/ebtables-save" + allow(provider).to receive(:command).with(:iptables_save).and_return "/sbin/iptables-save" + allow(provider).to receive(:command).with(:ip6tables_save).and_return "/sbin/ip6tables-save" + end + + it 'should be able to get a list of existing rules' do + # Pretend to return nil from iptables + allow(provider).to receive(:execute).with(['/sbin/ip6tables-save']).and_return("") + allow(provider).to receive(:execute).with(['/sbin/ebtables-save']).and_return("") + allow(provider).to receive(:execute).with(['/sbin/iptables-save']).and_return("") + + provider.instances.each do |chain| + expect(chain).to be_instance_of(provider) + expect(chain.properties[:provider].to_s).to eq(provider.name.to_s) + end + end + +end + +describe 'iptables chain resource parsing' do + let(:provider) { Puppet::Type.type(:firewallchain).provider(:iptables_chain) } + + before :each do + ebtables = ['BROUTE:BROUTING:ethernet', + 'BROUTE:broute:ethernet', + ':INPUT:ethernet', + ':FORWARD:ethernet', + ':OUTPUT:ethernet', + ':filter:ethernet', + ':filterdrop:ethernet', + ':filterreturn:ethernet', + 'NAT:PREROUTING:ethernet', + 'NAT:OUTPUT:ethernet', + 'NAT:POSTROUTING:ethernet', + ] + allow(provider).to receive(:execute).with(['/sbin/ebtables-save']).and_return(' +*broute +:BROUTING ACCEPT +:broute ACCEPT + +*filter +:INPUT ACCEPT +:FORWARD ACCEPT +:OUTPUT ACCEPT +:filter ACCEPT +:filterdrop DROP +:filterreturn RETURN + +*nat +:PREROUTING ACCEPT +:OUTPUT ACCEPT +:POSTROUTING ACCEPT +') + + iptables = [ + 'raw:PREROUTING:IPv4', + 'raw:OUTPUT:IPv4', + 'raw:raw:IPv4', + 'mangle:PREROUTING:IPv4', + 'mangle:INPUT:IPv4', + 'mangle:FORWARD:IPv4', + 'mangle:OUTPUT:IPv4', + 'mangle:POSTROUTING:IPv4', + 'mangle:mangle:IPv4', + 'NAT:PREROUTING:IPv4', + 'NAT:OUTPUT:IPv4', + 'NAT:POSTROUTING:IPv4', + 'NAT:mangle:IPv4', + 'NAT:mangle:IPv4', + 'NAT:mangle:IPv4', + ':$5()*&%\'"^$): :IPv4', + ] + allow(provider).to receive(:execute).with(['/sbin/iptables-save']).and_return(' +# Generated by iptables-save v1.4.9 on Mon Jan 2 01:20:06 2012 +*raw +:PREROUTING ACCEPT [12:1780] +:OUTPUT ACCEPT [19:1159] +:raw - [0:0] +COMMIT +# Completed on Mon Jan 2 01:20:06 2012 +# Generated by iptables-save v1.4.9 on Mon Jan 2 01:20:06 2012 +*mangle +:PREROUTING ACCEPT [12:1780] +:INPUT ACCEPT [12:1780] +:FORWARD ACCEPT [0:0] +:OUTPUT ACCEPT [19:1159] +:POSTROUTING ACCEPT [19:1159] +:mangle - [0:0] +COMMIT +# Completed on Mon Jan 2 01:20:06 2012 +# Generated by iptables-save v1.4.9 on Mon Jan 2 01:20:06 2012 +*nat +:PREROUTING ACCEPT [2242:639750] +:OUTPUT ACCEPT [5176:326206] +:POSTROUTING ACCEPT [5162:325382] +COMMIT +# Completed on Mon Jan 2 01:20:06 2012 +# Generated by iptables-save v1.4.9 on Mon Jan 2 01:20:06 2012 +*filter +:INPUT ACCEPT [0:0] +:FORWARD DROP [0:0] +:OUTPUT ACCEPT [5673:420879] +:$5()*&%\'"^$): - [0:0] +COMMIT +# Completed on Mon Jan 2 01:20:06 2012 +') + ip6tables = [ + 'raw:PREROUTING:IPv6', + 'raw:OUTPUT:IPv6', + 'raw:ff:IPv6', + 'mangle:PREROUTING:IPv6', + 'mangle:INPUT:IPv6', + 'mangle:FORWARD:IPv6', + 'mangle:OUTPUT:IPv6', + 'mangle:POSTROUTING:IPv6', + 'mangle:ff:IPv6', + ':INPUT:IPv6', + ':FORWARD:IPv6', + ':OUTPUT:IPv6', + ':test:IPv6', + ] + allow(provider).to receive(:execute).with(['/sbin/ip6tables-save']).and_return(' +# Generated by ip6tables-save v1.4.9 on Mon Jan 2 01:31:39 2012 +*raw +:PREROUTING ACCEPT [2173:489241] +:OUTPUT ACCEPT [0:0] +:ff - [0:0] +COMMIT +# Completed on Mon Jan 2 01:31:39 2012 +# Generated by ip6tables-save v1.4.9 on Mon Jan 2 01:31:39 2012 +*mangle +:PREROUTING ACCEPT [2301:518373] +:INPUT ACCEPT [0:0] +:FORWARD ACCEPT [0:0] +:OUTPUT ACCEPT [0:0] +:POSTROUTING ACCEPT [0:0] +:ff - [0:0] +COMMIT +# Completed on Mon Jan 2 01:31:39 2012 +# Generated by ip6tables-save v1.4.9 on Mon Jan 2 01:31:39 2012 +*filter +:INPUT ACCEPT [0:0] +:FORWARD DROP [0:0] +:OUTPUT ACCEPT [20:1292] +:test - [0:0] +COMMIT +# Completed on Mon Jan 2 01:31:39 2012 +') + @all = ebtables + iptables + ip6tables + # IPv4 and IPv6 names also exist as resources {table}:{chain}:IP and {table}:{chain}: + iptables.each { |name| @all += [ name[0..-3], name[0..-5] ] } + ip6tables.each { |name| @all += [ name[0..-3], name[0..-5] ] } + end + + it 'should have all in parsed resources' do + provider.instances.each do |resource| + @all.include?(resource.name) + end + end + +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/firewall/spec/unit/puppet/provider/iptables_spec.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/firewall/spec/unit/puppet/provider/iptables_spec.rb new file mode 100644 index 00000000000..d6f5b64cfea --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/firewall/spec/unit/puppet/provider/iptables_spec.rb @@ -0,0 +1,410 @@ +#!/usr/bin/env rspec + +require 'spec_helper' +if Puppet.version < '3.4.0' + require 'puppet/provider/confine/exists' +else + require 'puppet/confine/exists' +end + +describe 'iptables provider detection' do + if Puppet.version < '3.4.0' + let(:exists) { + Puppet::Provider::Confine::Exists + } + else + let(:exists) { + Puppet::Confine::Exists + } + end + + before :each do + # Reset the default provider + Puppet::Type.type(:firewall).defaultprovider = nil + end + + it "should default to iptables provider if /sbin/iptables[-save] exists" do + # Stub lookup for /sbin/iptables & /sbin/iptables-save + allow(exists).to receive(:which).with("iptables"). + and_return "/sbin/iptables" + allow(exists).to receive(:which).with("iptables-save"). + and_return "/sbin/iptables-save" + + # Every other command should return false so we don't pick up any + # other providers + allow(exists).to receive(:which).with() { |value| + ! ["iptables","iptables-save"].include?(value) + }.and_return false + + # Create a resource instance and make sure the provider is iptables + resource = Puppet::Type.type(:firewall).new({ + :name => '000 test foo', + }) + expect(resource.provider.class.to_s).to eq("Puppet::Type::Firewall::ProviderIptables") + end +end + +describe 'iptables provider' do + let(:provider) { Puppet::Type.type(:firewall).provider(:iptables) } + let(:resource) { + Puppet::Type.type(:firewall).new({ + :name => '000 test foo', + :action => 'accept', + }) + } + + before :each do + allow(Puppet::Type::Firewall).to receive(:defaultprovider).and_return provider + allow(provider).to receive(:command).with(:iptables_save).and_return "/sbin/iptables-save" + + # Stub iptables version + allow(Facter.fact(:iptables_version)).to receive(:value).and_return("1.4.2") + + allow(Puppet::Util::Execution).to receive(:execute).and_return "" + allow(Puppet::Util).to receive(:which).with("iptables-save"). + and_return "/sbin/iptables-save" + end + + it 'should be able to get a list of existing rules' do + provider.instances.each do |rule| + expect(rule).to be_instance_of(provider) + expect(rule.properties[:provider].to_s).to eq(provider.name.to_s) + end + end + + it 'should ignore lines with fatal errors' do + allow(Puppet::Util::Execution).to receive(:execute).with(['/sbin/iptables-save']). + and_return("FATAL: Could not load /lib/modules/2.6.18-028stab095.1/modules.dep: No such file or directory") + + expect(provider.instances.length).to be_zero + end + + describe '#insert_order' do + let(:iptables_save_output) { [ + '-A INPUT -s 8.0.0.2/32 -p tcp -m multiport --ports 100 -m comment --comment "100 test" -j ACCEPT', + '-A INPUT -s 8.0.0.3/32 -p tcp -m multiport --ports 200 -m comment --comment "200 test" -j ACCEPT', + '-A INPUT -s 8.0.0.4/32 -p tcp -m multiport --ports 300 -m comment --comment "300 test" -j ACCEPT' + ] } + let(:resources) do + iptables_save_output.each_with_index.collect { |l,index| provider.rule_to_hash(l, 'filter', index) } + end + let(:providers) do + resources.collect { |r| provider.new(r) } + end + it 'understands offsets for adding rules to the beginning' do + resource = Puppet::Type.type(:firewall).new({ :name => '001 test', }) + allow(resource.provider.class).to receive(:instances).and_return(providers) + expect(resource.provider.insert_order).to eq(1) # 1-indexed + end + it 'understands offsets for editing rules at the beginning' do + resource = Puppet::Type.type(:firewall).new({ :name => '100 test', }) + allow(resource.provider.class).to receive(:instances).and_return(providers) + expect(resource.provider.insert_order).to eq(1) + end + it 'understands offsets for adding rules to the middle' do + resource = Puppet::Type.type(:firewall).new({ :name => '101 test', }) + allow(resource.provider.class).to receive(:instances).and_return(providers) + expect(resource.provider.insert_order).to eq(2) + end + it 'understands offsets for editing rules at the middle' do + resource = Puppet::Type.type(:firewall).new({ :name => '200 test', }) + allow(resource.provider.class).to receive(:instances).and_return(providers) + expect(resource.provider.insert_order).to eq(2) + end + it 'understands offsets for adding rules to the end' do + resource = Puppet::Type.type(:firewall).new({ :name => '301 test', }) + allow(resource.provider.class).to receive(:instances).and_return(providers) + expect(resource.provider.insert_order).to eq(4) + end + it 'understands offsets for editing rules at the end' do + resource = Puppet::Type.type(:firewall).new({ :name => '300 test', }) + allow(resource.provider.class).to receive(:instances).and_return(providers) + expect(resource.provider.insert_order).to eq(3) + end + + context 'with unname rules between' do + let(:iptables_save_output) { [ + '-A INPUT -s 8.0.0.2/32 -p tcp -m multiport --ports 100 -m comment --comment "100 test" -j ACCEPT', + '-A INPUT -s 8.0.0.2/32 -p tcp -m multiport --ports 150 -m comment --comment "150 test" -j ACCEPT', + '-A INPUT -s 8.0.0.3/32 -p tcp -m multiport --ports 200 -j ACCEPT', + '-A INPUT -s 8.0.0.3/32 -p tcp -m multiport --ports 250 -j ACCEPT', + '-A INPUT -s 8.0.0.4/32 -p tcp -m multiport --ports 300 -m comment --comment "300 test" -j ACCEPT', + '-A INPUT -s 8.0.0.4/32 -p tcp -m multiport --ports 350 -m comment --comment "350 test" -j ACCEPT', + ] } + it 'understands offsets for adding rules before unnamed rules' do + resource = Puppet::Type.type(:firewall).new({ :name => '001 test', }) + allow(resource.provider.class).to receive(:instances).and_return(providers) + expect(resource.provider.insert_order).to eq(1) + end + it 'understands offsets for editing rules before unnamed rules' do + resource = Puppet::Type.type(:firewall).new({ :name => '100 test', }) + allow(resource.provider.class).to receive(:instances).and_return(providers) + expect(resource.provider.insert_order).to eq(1) + end + it 'understands offsets for adding rules between managed rules' do + resource = Puppet::Type.type(:firewall).new({ :name => '120 test', }) + allow(resource.provider.class).to receive(:instances).and_return(providers) + expect(resource.provider.insert_order).to eq(2) + end + it 'understands offsets for adding rules between unnamed rules' do + resource = Puppet::Type.type(:firewall).new({ :name => '151 test', }) + allow(resource.provider.class).to receive(:instances).and_return(providers) + expect(resource.provider.insert_order).to eq(3) + end + it 'understands offsets for adding rules after unnamed rules' do + resource = Puppet::Type.type(:firewall).new({ :name => '351 test', }) + allow(resource.provider.class).to receive(:instances).and_return(providers) + expect(resource.provider.insert_order).to eq(7) + end + end + + context 'with unname rules before and after' do + let(:iptables_save_output) { [ + '-A INPUT -s 8.0.0.3/32 -p tcp -m multiport --ports 050 -j ACCEPT', + '-A INPUT -s 8.0.0.3/32 -p tcp -m multiport --ports 090 -j ACCEPT', + '-A INPUT -s 8.0.0.2/32 -p tcp -m multiport --ports 100 -m comment --comment "100 test" -j ACCEPT', + '-A INPUT -s 8.0.0.2/32 -p tcp -m multiport --ports 150 -m comment --comment "150 test" -j ACCEPT', + '-A INPUT -s 8.0.0.3/32 -p tcp -m multiport --ports 200 -j ACCEPT', + '-A INPUT -s 8.0.0.3/32 -p tcp -m multiport --ports 250 -j ACCEPT', + '-A INPUT -s 8.0.0.4/32 -p tcp -m multiport --ports 300 -m comment --comment "300 test" -j ACCEPT', + '-A INPUT -s 8.0.0.4/32 -p tcp -m multiport --ports 350 -m comment --comment "350 test" -j ACCEPT', + '-A INPUT -s 8.0.0.5/32 -p tcp -m multiport --ports 400 -j ACCEPT', + '-A INPUT -s 8.0.0.5/32 -p tcp -m multiport --ports 450 -j ACCEPT', + ] } + it 'understands offsets for adding rules before unnamed rules' do + resource = Puppet::Type.type(:firewall).new({ :name => '001 test', }) + allow(resource.provider.class).to receive(:instances).and_return(providers) + expect(resource.provider.insert_order).to eq(1) + end + it 'understands offsets for editing rules before unnamed rules' do + resource = Puppet::Type.type(:firewall).new({ :name => '100 test', }) + allow(resource.provider.class).to receive(:instances).and_return(providers) + expect(resource.provider.insert_order).to eq(3) + end + it 'understands offsets for adding rules between managed rules' do + resource = Puppet::Type.type(:firewall).new({ :name => '120 test', }) + allow(resource.provider.class).to receive(:instances).and_return(providers) + expect(resource.provider.insert_order).to eq(4) + end + it 'understands offsets for adding rules between unnamed rules' do + resource = Puppet::Type.type(:firewall).new({ :name => '151 test', }) + allow(resource.provider.class).to receive(:instances).and_return(providers) + expect(resource.provider.insert_order).to eq(5) + end + it 'understands offsets for adding rules after unnamed rules' do + resource = Puppet::Type.type(:firewall).new({ :name => '351 test', }) + allow(resource.provider.class).to receive(:instances).and_return(providers) + expect(resource.provider.insert_order).to eq(9) + end + it 'understands offsets for adding rules at the end' do + resource = Puppet::Type.type(:firewall).new({ :name => '950 test', }) + allow(resource.provider.class).to receive(:instances).and_return(providers) + expect(resource.provider.insert_order).to eq(11) + end + end + end + + # Load in ruby hash for test fixtures. + load 'spec/fixtures/iptables/conversion_hash.rb' + + describe 'when converting rules to resources' do + ARGS_TO_HASH.each do |test_name,data| + describe "for test data '#{test_name}'" do + let(:resource) { provider.rule_to_hash(data[:line], data[:table], 0) } + + # If this option is enabled, make sure the parameters exactly match + if data[:compare_all] then + it "the parameter hash keys should be the same as returned by rules_to_hash" do + expect(resource.keys).to match_array(data[:params].keys) + end + end + + # Iterate across each parameter, creating an example for comparison + data[:params].each do |param_name, param_value| + it "the parameter '#{param_name.to_s}' should match #{param_value.inspect}" do + # booleans get cludged to string "true" + if param_value == true then + expect(resource[param_name]).to be_true + else + expect(resource[param_name]).to eq(data[:params][param_name]) + end + end + end + end + end + end + + describe 'when working out general_args' do + HASH_TO_ARGS.each do |test_name,data| + describe "for test data '#{test_name}'" do + let(:resource) { Puppet::Type.type(:firewall).new(data[:params]) } + let(:provider) { Puppet::Type.type(:firewall).provider(:iptables) } + let(:instance) { provider.new(resource) } + + it 'general_args should be valid' do + expect(instance.general_args.flatten).to eq(data[:args]) + end + end + end + end + + describe 'when converting rules without comments to resources' do + let(:sample_rule) { + '-A INPUT -s 1.1.1.1 -d 1.1.1.1 -p tcp -m multiport --dports 7061,7062 -m multiport --sports 7061,7062 -j ACCEPT' + } + let(:resource) { provider.rule_to_hash(sample_rule, 'filter', 0) } + let(:instance) { provider.new(resource) } + + it 'rule name contains a MD5 sum of the line' do + expect(resource[:name]).to eq("9000 #{Digest::MD5.hexdigest(resource[:line])}") + end + + it 'parsed the rule arguments correctly' do + expect(resource[:chain]).to eq('INPUT') + expect(resource[:source]).to eq('1.1.1.1/32') + expect(resource[:destination]).to eq('1.1.1.1/32') + expect(resource[:proto]).to eq('tcp') + expect(resource[:dport]).to eq(['7061', '7062']) + expect(resource[:sport]).to eq(['7061', '7062']) + expect(resource[:action]).to eq('accept') + end + end + + describe 'when converting existing rules generates by system-config-firewall-tui to resources' do + let(:sample_rule) { + # as generated by iptables-save from rules created with system-config-firewall-tui + '-A INPUT -p tcp -m state --state NEW -m tcp --dport 22 -j ACCEPT' + } + let(:resource) { provider.rule_to_hash(sample_rule, 'filter', 0) } + let(:instance) { provider.new(resource) } + + it 'rule name contains a MD5 sum of the line' do + expect(resource[:name]).to eq("9000 #{Digest::MD5.hexdigest(resource[:line])}") + end + + it 'parse arguments' do + expect(resource[:chain]).to eq('INPUT') + expect(resource[:proto]).to eq('tcp') + expect(resource[:dport]).to eq(['22']) + expect(resource[:state]).to eq(['NEW']) + expect(resource[:action]).to eq('accept') + end + end + + describe 'when creating resources' do + let(:instance) { provider.new(resource) } + + it 'insert_args should be an array' do + expect(instance.insert_args.class).to eq(Array) + end + end + + describe 'when modifying resources' do + let(:instance) { provider.new(resource) } + + it 'update_args should be an array' do + expect(instance.update_args.class).to eq(Array) + end + + it 'fails when modifying the chain' do + expect { instance.chain = "OUTPUT" }.to raise_error(/is not supported/) + end + end + + describe 'when deleting resources' do + let(:sample_rule) { + '-A INPUT -s 1.1.1.1 -d 1.1.1.1 -p tcp -m multiport --dports 7061,7062 -m multiport --sports 7061,7062 -j ACCEPT' + } + let(:resource) { provider.rule_to_hash(sample_rule, 'filter', 0) } + let(:instance) { provider.new(resource) } + + it 'resource[:line] looks like the original rule' do + resource[:line] == sample_rule + end + + it 'delete_args is an array' do + expect(instance.delete_args.class).to eq(Array) + end + + it 'delete_args is the same as the rule string when joined' do + expect(instance.delete_args.join(' ')).to eq(sample_rule.gsub(/\-A/, + '-t filter -D')) + end + end +end + +describe 'ip6tables provider' do + let(:provider6) { Puppet::Type.type(:firewall).provider(:ip6tables) } + let(:resource) { + Puppet::Type.type(:firewall).new({ + :name => '000 test foo', + :action => 'accept', + :provider => "ip6tables", + }) + } + + before :each do + allow(Puppet::Type::Firewall).to receive(:ip6tables).and_return provider6 + allow(provider6).to receive(:command).with(:ip6tables_save).and_return "/sbin/ip6tables-save" + + # Stub iptables version + allow(Facter.fact(:ip6tables_version)).to receive(:value).and_return '1.4.7' + + allow(Puppet::Util::Execution).to receive(:execute).and_return '' + allow(Puppet::Util).to receive(:which).with("ip6tables-save"). + and_return "/sbin/ip6tables-save" + end + + it 'should be able to get a list of existing rules' do + provider6.instances.each do |rule| + rule.should be_instance_of(provider6) + rule.properties[:provider6].to_s.should == provider6.name.to_s + end + end + + it 'should ignore lines with fatal errors' do + allow(Puppet::Util::Execution).to receive(:execute).with(['/sbin/ip6tables-save']). + and_return("FATAL: Could not load /lib/modules/2.6.18-028stab095.1/modules.dep: No such file or directory") + provider6.instances.length.should == 0 + end + + # Load in ruby hash for test fixtures. + load 'spec/fixtures/ip6tables/conversion_hash.rb' + + describe 'when converting rules to resources' do + ARGS_TO_HASH6.each do |test_name,data| + describe "for test data '#{test_name}'" do + let(:resource) { provider6.rule_to_hash(data[:line], data[:table], 0) } + + # If this option is enabled, make sure the parameters exactly match + if data[:compare_all] then + it "the parameter hash keys should be the same as returned by rules_to_hash" do + resource.keys.should =~ data[:params].keys + end + end + + # Iterate across each parameter, creating an example for comparison + data[:params].each do |param_name, param_value| + it "the parameter '#{param_name.to_s}' should match #{param_value.inspect}" do + resource[param_name].should == data[:params][param_name] + end + end + end + end + end + + describe 'when working out general_args' do + HASH_TO_ARGS6.each do |test_name,data| + describe "for test data '#{test_name}'" do + let(:resource) { Puppet::Type.type(:firewall).new(data[:params]) } + let(:provider6) { Puppet::Type.type(:firewall).provider(:ip6tables) } + let(:instance) { provider6.new(resource) } + + it 'general_args should be valid' do + instance.general_args.flatten.should == data[:args] + end + end + end + end +end + diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/firewall/spec/unit/puppet/type/firewall_spec.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/firewall/spec/unit/puppet/type/firewall_spec.rb new file mode 100755 index 00000000000..afb61662b60 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/firewall/spec/unit/puppet/type/firewall_spec.rb @@ -0,0 +1,650 @@ +#!/usr/bin/env rspec + +require 'spec_helper' + +firewall = Puppet::Type.type(:firewall) + +describe firewall do + before :each do + @class = firewall + @provider = double 'provider' + allow(@provider).to receive(:name).and_return(:iptables) + allow(Puppet::Type::Firewall).to receive(:defaultprovider).and_return @provider + + @resource = @class.new({:name => '000 test foo'}) + + # Stub iptables version + allow(Facter.fact(:iptables_version)).to receive(:value).and_return('1.4.2') + allow(Facter.fact(:ip6tables_version)).to receive(:value).and_return('1.4.2') + + # Stub confine facts + allow(Facter.fact(:kernel)).to receive(:value).and_return('Linux') + allow(Facter.fact(:operatingsystem)).to receive(:value).and_return('Debian') + end + + it 'should have :name be its namevar' do + @class.key_attributes.should == [:name] + end + + describe ':name' do + it 'should accept a name' do + @resource[:name] = '000-test-foo' + @resource[:name].should == '000-test-foo' + end + + it 'should not accept a name with non-ASCII chars' do + lambda { @resource[:name] = '%*#^(#$' }.should raise_error(Puppet::Error) + end + end + + describe ':action' do + it "should have no default" do + res = @class.new(:name => "000 test") + res.parameters[:action].should == nil + end + + [:accept, :drop, :reject].each do |action| + it "should accept value #{action}" do + @resource[:action] = action + @resource[:action].should == action + end + end + + it 'should fail when value is not recognized' do + lambda { @resource[:action] = 'not valid' }.should raise_error(Puppet::Error) + end + end + + describe ':chain' do + [:INPUT, :FORWARD, :OUTPUT, :PREROUTING, :POSTROUTING].each do |chain| + it "should accept chain value #{chain}" do + @resource[:chain] = chain + @resource[:chain].should == chain + end + end + + it 'should fail when the chain value is not recognized' do + lambda { @resource[:chain] = 'not valid' }.should raise_error(Puppet::Error) + end + end + + describe ':table' do + [:nat, :mangle, :filter, :raw].each do |table| + it "should accept table value #{table}" do + @resource[:table] = table + @resource[:table].should == table + end + end + + it "should fail when table value is not recognized" do + lambda { @resource[:table] = 'not valid' }.should raise_error(Puppet::Error) + end + end + + describe ':proto' do + [:tcp, :udp, :icmp, :esp, :ah, :vrrp, :igmp, :ipencap, :ospf, :gre, :all].each do |proto| + it "should accept proto value #{proto}" do + @resource[:proto] = proto + @resource[:proto].should == proto + end + end + + it "should fail when proto value is not recognized" do + lambda { @resource[:proto] = 'foo' }.should raise_error(Puppet::Error) + end + end + + describe ':jump' do + it "should have no default" do + res = @class.new(:name => "000 test") + res.parameters[:jump].should == nil + end + + ['QUEUE', 'RETURN', 'DNAT', 'SNAT', 'LOG', 'MASQUERADE', 'REDIRECT', 'MARK'].each do |jump| + it "should accept jump value #{jump}" do + @resource[:jump] = jump + @resource[:jump].should == jump + end + end + + ['ACCEPT', 'DROP', 'REJECT'].each do |jump| + it "should now fail when value #{jump}" do + lambda { @resource[:jump] = jump }.should raise_error(Puppet::Error) + end + end + + it "should fail when jump value is not recognized" do + lambda { @resource[:jump] = '%^&*' }.should raise_error(Puppet::Error) + end + end + + [:source, :destination].each do |addr| + describe addr do + it "should accept a #{addr} as a string" do + @resource[addr] = '127.0.0.1' + @resource[addr].should == '127.0.0.1/32' + end + ['0.0.0.0/0', '::/0'].each do |prefix| + it "should be nil for zero prefix length address #{prefix}" do + @resource[addr] = prefix + @resource[addr].should == nil + end + end + it "should accept a negated #{addr} as a string" do + @resource[addr] = '! 127.0.0.1' + @resource[addr].should == '! 127.0.0.1/32' + end + end + end + + [:dport, :sport].each do |port| + describe port do + it "should accept a #{port} as string" do + @resource[port] = '22' + @resource[port].should == ['22'] + end + + it "should accept a #{port} as an array" do + @resource[port] = ['22','23'] + @resource[port].should == ['22','23'] + end + + it "should accept a #{port} as a number" do + @resource[port] = 22 + @resource[port].should == ['22'] + end + + it "should accept a #{port} as a hyphen separated range" do + @resource[port] = ['22-1000'] + @resource[port].should == ['22-1000'] + end + + it "should accept a #{port} as a combination of arrays of single and " \ + "hyphen separated ranges" do + + @resource[port] = ['22-1000','33','3000-4000'] + @resource[port].should == ['22-1000','33','3000-4000'] + end + + it "should convert a port name for #{port} to its number" do + @resource[port] = 'ssh' + @resource[port].should == ['22'] + end + + it "should not accept something invalid for #{port}" do + expect { @resource[port] = 'something odd' }.to raise_error(Puppet::Error, /^Parameter .+ failed.+Munging failed for value ".+" in class .+: no such service/) + end + + it "should not accept something invalid in an array for #{port}" do + expect { @resource[port] = ['something odd','something even odder'] }.to raise_error(Puppet::Error, /^Parameter .+ failed.+Munging failed for value ".+" in class .+: no such service/) + end + end + end + + [:dst_type, :src_type].each do |addrtype| + describe addrtype do + it "should have no default" do + res = @class.new(:name => "000 test") + res.parameters[addrtype].should == nil + end + end + + [:UNSPEC, :UNICAST, :LOCAL, :BROADCAST, :ANYCAST, :MULTICAST, :BLACKHOLE, + :UNREACHABLE, :PROHIBIT, :THROW, :NAT, :XRESOLVE].each do |type| + it "should accept #{addrtype} value #{type}" do + @resource[addrtype] = type + @resource[addrtype].should == type + end + end + + it "should fail when #{addrtype} value is not recognized" do + lambda { @resource[addrtype] = 'foo' }.should raise_error(Puppet::Error) + end + end + + [:iniface, :outiface].each do |iface| + describe iface do + it "should accept #{iface} value as a string" do + @resource[iface] = 'eth1' + @resource[iface].should == 'eth1' + end + end + end + + [:tosource, :todest].each do |addr| + describe addr do + it "should accept #{addr} value as a string" do + @resource[addr] = '127.0.0.1' + end + end + end + + describe ':log_level' do + values = { + 'panic' => '0', + 'alert' => '1', + 'crit' => '2', + 'err' => '3', + 'warn' => '4', + 'warning' => '4', + 'not' => '5', + 'notice' => '5', + 'info' => '6', + 'debug' => '7' + } + + values.each do |k,v| + it { + @resource[:log_level] = k + @resource[:log_level].should == v + } + + it { + @resource[:log_level] = 3 + @resource[:log_level].should == 3 + } + + it { lambda { @resource[:log_level] = 'foo' }.should raise_error(Puppet::Error) } + end + end + + describe ':icmp' do + icmp_codes = { + :iptables => { + '0' => 'echo-reply', + '3' => 'destination-unreachable', + '4' => 'source-quench', + '6' => 'redirect', + '8' => 'echo-request', + '9' => 'router-advertisement', + '10' => 'router-solicitation', + '11' => 'time-exceeded', + '12' => 'parameter-problem', + '13' => 'timestamp-request', + '14' => 'timestamp-reply', + '17' => 'address-mask-request', + '18' => 'address-mask-reply' + }, + :ip6tables => { + '1' => 'destination-unreachable', + '3' => 'time-exceeded', + '4' => 'parameter-problem', + '128' => 'echo-request', + '129' => 'echo-reply', + '133' => 'router-solicitation', + '134' => 'router-advertisement', + '137' => 'redirect' + } + } + icmp_codes.each do |provider, values| + describe provider do + values.each do |k,v| + it 'should convert icmp string to number' do + @resource[:provider] = provider + @resource[:provider].should == provider + @resource[:icmp] = v + @resource[:icmp].should == k + end + end + end + end + + it 'should accept values as integers' do + @resource[:icmp] = 9 + @resource[:icmp].should == 9 + end + + it 'should fail if icmp type is "any"' do + lambda { @resource[:icmp] = 'any' }.should raise_error(Puppet::Error) + end + + it 'should fail if icmp type cannot be mapped to a numeric' do + lambda { @resource[:icmp] = 'foo' }.should raise_error(Puppet::Error) + end + end + + describe ':state' do + it 'should accept value as a string' do + @resource[:state] = :INVALID + @resource[:state].should == [:INVALID] + end + + it 'should accept value as an array' do + @resource[:state] = [:INVALID, :NEW] + @resource[:state].should == [:INVALID, :NEW] + end + + it 'should sort values alphabetically' do + @resource[:state] = [:NEW, :ESTABLISHED] + @resource[:state].should == [:ESTABLISHED, :NEW] + end + end + + describe ':ctstate' do + it 'should accept value as a string' do + @resource[:ctstate] = :INVALID + @resource[:ctstate].should == [:INVALID] + end + + it 'should accept value as an array' do + @resource[:ctstate] = [:INVALID, :NEW] + @resource[:ctstate].should == [:INVALID, :NEW] + end + + it 'should sort values alphabetically' do + @resource[:ctstate] = [:NEW, :ESTABLISHED] + @resource[:ctstate].should == [:ESTABLISHED, :NEW] + end + end + + describe ':burst' do + it 'should accept numeric values' do + @resource[:burst] = 12 + @resource[:burst].should == 12 + end + + it 'should fail if value is not numeric' do + lambda { @resource[:burst] = 'foo' }.should raise_error(Puppet::Error) + end + end + + describe ':recent' do + ['set', 'update', 'rcheck', 'remove'].each do |recent| + it "should accept recent value #{recent}" do + @resource[:recent] = recent + @resource[:recent].should == "--#{recent}" + end + end + end + + describe ':action and :jump' do + it 'should allow only 1 to be set at a time' do + expect { + @class.new( + :name => "001-test", + :action => "accept", + :jump => "custom_chain" + ) + }.to raise_error(Puppet::Error, /Only one of the parameters 'action' and 'jump' can be set$/) + end + end + describe ':gid and :uid' do + it 'should allow me to set uid' do + @resource[:uid] = 'root' + @resource[:uid].should == 'root' + end + it 'should allow me to set uid as an array, and silently hide my error' do + @resource[:uid] = ['root', 'bobby'] + @resource[:uid].should == 'root' + end + it 'should allow me to set gid' do + @resource[:gid] = 'root' + @resource[:gid].should == 'root' + end + it 'should allow me to set gid as an array, and silently hide my error' do + @resource[:gid] = ['root', 'bobby'] + @resource[:gid].should == 'root' + end + end + + describe ':set_mark' do + ['1.3.2', '1.4.2'].each do |iptables_version| + describe "with iptables #{iptables_version}" do + before { + Facter.clear + allow(Facter.fact(:iptables_version)).to receive(:value).and_return iptables_version + allow(Facter.fact(:ip6tables_version)).to receive(:value).and_return iptables_version + } + + if iptables_version == '1.3.2' + it 'should allow me to set set-mark without mask' do + @resource[:set_mark] = '0x3e8' + @resource[:set_mark].should == '0x3e8' + end + it 'should convert int to hex without mask' do + @resource[:set_mark] = '1000' + @resource[:set_mark].should == '0x3e8' + end + it 'should fail if mask is present' do + lambda { @resource[:set_mark] = '0x3e8/0xffffffff'}.should raise_error( + Puppet::Error, /iptables version #{iptables_version} does not support masks on MARK rules$/ + ) + end + end + + if iptables_version == '1.4.2' + it 'should allow me to set set-mark with mask' do + @resource[:set_mark] = '0x3e8/0xffffffff' + @resource[:set_mark].should == '0x3e8/0xffffffff' + end + it 'should convert int to hex and add a 32 bit mask' do + @resource[:set_mark] = '1000' + @resource[:set_mark].should == '0x3e8/0xffffffff' + end + it 'should add a 32 bit mask' do + @resource[:set_mark] = '0x32' + @resource[:set_mark].should == '0x32/0xffffffff' + end + it 'should use the mask provided' do + @resource[:set_mark] = '0x32/0x4' + @resource[:set_mark].should == '0x32/0x4' + end + it 'should use the mask provided and convert int to hex' do + @resource[:set_mark] = '1000/0x4' + @resource[:set_mark].should == '0x3e8/0x4' + end + it 'should fail if mask value is more than 32 bits' do + lambda { @resource[:set_mark] = '1/4294967296'}.should raise_error( + Puppet::Error, /MARK mask must be integer or hex between 0 and 0xffffffff$/ + ) + end + it 'should fail if mask is malformed' do + lambda { @resource[:set_mark] = '1000/0xq4'}.should raise_error( + Puppet::Error, /MARK mask must be integer or hex between 0 and 0xffffffff$/ + ) + end + end + + ['/', '1000/', 'pwnie'].each do |bad_mark| + it "should fail with malformed mark '#{bad_mark}'" do + lambda { @resource[:set_mark] = bad_mark}.should raise_error(Puppet::Error) + end + end + it 'should fail if mark value is more than 32 bits' do + lambda { @resource[:set_mark] = '4294967296'}.should raise_error( + Puppet::Error, /MARK value must be integer or hex between 0 and 0xffffffff$/ + ) + end + end + end + end + + [:chain, :jump].each do |param| + describe param do + it 'should autorequire fwchain when table and provider are undefined' do + @resource[param] = 'FOO' + @resource[:table].should == :filter + @resource[:provider].should == :iptables + + chain = Puppet::Type.type(:firewallchain).new(:name => 'FOO:filter:IPv4') + catalog = Puppet::Resource::Catalog.new + catalog.add_resource @resource + catalog.add_resource chain + rel = @resource.autorequire[0] + rel.source.ref.should == chain.ref + rel.target.ref.should == @resource.ref + end + + it 'should autorequire fwchain when table is undefined and provider is ip6tables' do + @resource[param] = 'FOO' + @resource[:table].should == :filter + @resource[:provider] = :ip6tables + + chain = Puppet::Type.type(:firewallchain).new(:name => 'FOO:filter:IPv6') + catalog = Puppet::Resource::Catalog.new + catalog.add_resource @resource + catalog.add_resource chain + rel = @resource.autorequire[0] + rel.source.ref.should == chain.ref + rel.target.ref.should == @resource.ref + end + + it 'should autorequire fwchain when table is raw and provider is undefined' do + @resource[param] = 'FOO' + @resource[:table] = :raw + @resource[:provider].should == :iptables + + chain = Puppet::Type.type(:firewallchain).new(:name => 'FOO:raw:IPv4') + catalog = Puppet::Resource::Catalog.new + catalog.add_resource @resource + catalog.add_resource chain + rel = @resource.autorequire[0] + rel.source.ref.should == chain.ref + rel.target.ref.should == @resource.ref + end + + it 'should autorequire fwchain when table is raw and provider is ip6tables' do + @resource[param] = 'FOO' + @resource[:table] = :raw + @resource[:provider] = :ip6tables + + chain = Puppet::Type.type(:firewallchain).new(:name => 'FOO:raw:IPv6') + catalog = Puppet::Resource::Catalog.new + catalog.add_resource @resource + catalog.add_resource chain + rel = @resource.autorequire[0] + rel.source.ref.should == chain.ref + rel.target.ref.should == @resource.ref + end + + # test where autorequire is still needed (table != filter) + ['INPUT', 'OUTPUT', 'FORWARD'].each do |test_chain| + it "should autorequire fwchain #{test_chain} when table is mangle and provider is undefined" do + @resource[param] = test_chain + @resource[:table] = :mangle + @resource[:provider].should == :iptables + + chain = Puppet::Type.type(:firewallchain).new(:name => "#{test_chain}:mangle:IPv4") + catalog = Puppet::Resource::Catalog.new + catalog.add_resource @resource + catalog.add_resource chain + rel = @resource.autorequire[0] + rel.source.ref.should == chain.ref + rel.target.ref.should == @resource.ref + end + + it "should autorequire fwchain #{test_chain} when table is mangle and provider is ip6tables" do + @resource[param] = test_chain + @resource[:table] = :mangle + @resource[:provider] = :ip6tables + + chain = Puppet::Type.type(:firewallchain).new(:name => "#{test_chain}:mangle:IPv6") + catalog = Puppet::Resource::Catalog.new + catalog.add_resource @resource + catalog.add_resource chain + rel = @resource.autorequire[0] + rel.source.ref.should == chain.ref + rel.target.ref.should == @resource.ref + end + end + + # test of case where autorequire should not happen + ['INPUT', 'OUTPUT', 'FORWARD'].each do |test_chain| + + it "should not autorequire fwchain #{test_chain} when table and provider are undefined" do + @resource[param] = test_chain + @resource[:table].should == :filter + @resource[:provider].should == :iptables + + chain = Puppet::Type.type(:firewallchain).new(:name => "#{test_chain}:filter:IPv4") + catalog = Puppet::Resource::Catalog.new + catalog.add_resource @resource + catalog.add_resource chain + rel = @resource.autorequire[0] + rel.should == nil + end + + it "should not autorequire fwchain #{test_chain} when table is undefined and provider is ip6tables" do + @resource[param] = test_chain + @resource[:table].should == :filter + @resource[:provider] = :ip6tables + + chain = Puppet::Type.type(:firewallchain).new(:name => "#{test_chain}:filter:IPv6") + catalog = Puppet::Resource::Catalog.new + catalog.add_resource @resource + catalog.add_resource chain + rel = @resource.autorequire[0] + rel.should == nil + end + end + end + end + + describe ":chain and :jump" do + it 'should autorequire independent fwchains' do + @resource[:chain] = 'FOO' + @resource[:jump] = 'BAR' + @resource[:table].should == :filter + @resource[:provider].should == :iptables + + chain_foo = Puppet::Type.type(:firewallchain).new(:name => 'FOO:filter:IPv4') + chain_bar = Puppet::Type.type(:firewallchain).new(:name => 'BAR:filter:IPv4') + catalog = Puppet::Resource::Catalog.new + catalog.add_resource @resource + catalog.add_resource chain_foo + catalog.add_resource chain_bar + rel = @resource.autorequire + rel[0].source.ref.should == chain_foo.ref + rel[0].target.ref.should == @resource.ref + rel[1].source.ref.should == chain_bar.ref + rel[1].target.ref.should == @resource.ref + end + end + + describe ':pkttype' do + [:multicast, :broadcast, :unicast].each do |pkttype| + it "should accept pkttype value #{pkttype}" do + @resource[:pkttype] = pkttype + @resource[:pkttype].should == pkttype + end + end + + it 'should fail when the pkttype value is not recognized' do + lambda { @resource[:pkttype] = 'not valid' }.should raise_error(Puppet::Error) + end + end + + describe 'autorequire packages' do + [:iptables, :ip6tables].each do |provider| + it "provider #{provider} should autorequire package iptables" do + @resource[:provider] = provider + @resource[:provider].should == provider + package = Puppet::Type.type(:package).new(:name => 'iptables') + catalog = Puppet::Resource::Catalog.new + catalog.add_resource @resource + catalog.add_resource package + rel = @resource.autorequire[0] + rel.source.ref.should == package.ref + rel.target.ref.should == @resource.ref + end + + it "provider #{provider} should autorequire packages iptables and iptables-persistent" do + @resource[:provider] = provider + @resource[:provider].should == provider + packages = [ + Puppet::Type.type(:package).new(:name => 'iptables'), + Puppet::Type.type(:package).new(:name => 'iptables-persistent') + ] + catalog = Puppet::Resource::Catalog.new + catalog.add_resource @resource + packages.each do |package| + catalog.add_resource package + end + packages.zip(@resource.autorequire) do |package, rel| + rel.source.ref.should == package.ref + rel.target.ref.should == @resource.ref + end + end + end + end +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/firewall/spec/unit/puppet/type/firewallchain_spec.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/firewall/spec/unit/puppet/type/firewallchain_spec.rb new file mode 100755 index 00000000000..88ca99dc598 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/firewall/spec/unit/puppet/type/firewallchain_spec.rb @@ -0,0 +1,185 @@ +#!/usr/bin/env rspec + +require 'spec_helper' + +firewallchain = Puppet::Type.type(:firewallchain) + +describe firewallchain do + before(:each) do + # Stub confine facts + allow(Facter.fact(:kernel)).to receive(:value).and_return('Linux') + allow(Facter.fact(:operatingsystem)).to receive(:value).and_return('Debian') + end + let(:klass) { firewallchain } + let(:provider) { + prov = double 'provider' + allow(prov).to receive(:name).and_return(:iptables_chain) + prov + } + let(:resource) { + allow(Puppet::Type::Firewallchain).to receive(:defaultprovider).and_return provider + klass.new({:name => 'INPUT:filter:IPv4', :policy => :accept }) + } + + it 'should have :name be its namevar' do + klass.key_attributes.should == [:name] + end + + describe ':name' do + {'nat' => ['PREROUTING', 'POSTROUTING', 'INPUT', 'OUTPUT'], + 'mangle' => [ 'PREROUTING', 'POSTROUTING', 'INPUT', 'FORWARD', 'OUTPUT' ], + 'filter' => ['INPUT','OUTPUT','FORWARD'], + 'raw' => [ 'PREROUTING', 'OUTPUT'], + 'broute' => ['BROUTING'] + }.each_pair do |table, allowedinternalchains| + ['IPv4', 'IPv6', 'ethernet'].each do |protocol| + [ 'test', '$5()*&%\'"^$09):' ].each do |chainname| + name = "#{chainname}:#{table}:#{protocol}" + if table == 'nat' && protocol == 'IPv6' + it "should fail #{name}" do + expect { resource[:name] = name }.to raise_error(Puppet::Error) + end + elsif protocol != 'ethernet' && table == 'broute' + it "should fail #{name}" do + expect { resource[:name] = name }.to raise_error(Puppet::Error) + end + else + it "should accept name #{name}" do + resource[:name] = name + resource[:name].should == name + end + end + end # chainname + end # protocol + + [ 'PREROUTING', 'POSTROUTING', 'BROUTING', 'INPUT', 'FORWARD', 'OUTPUT' ].each do |internalchain| + name = internalchain + ':' + table + ':' + if internalchain == 'BROUTING' + name += 'ethernet' + elsif table == 'nat' + name += 'IPv4' + else + name += 'IPv4' + end + if allowedinternalchains.include? internalchain + it "should allow #{name}" do + resource[:name] = name + resource[:name].should == name + end + else + it "should fail #{name}" do + expect { resource[:name] = name }.to raise_error(Puppet::Error) + end + end + end # internalchain + + end # table, allowedinternalchainnames + + it 'should fail with invalid table names' do + expect { resource[:name] = 'wrongtablename:test:IPv4' }.to raise_error(Puppet::Error) + end + + it 'should fail with invalid protocols names' do + expect { resource[:name] = 'test:filter:IPv5' }.to raise_error(Puppet::Error) + end + + end + + describe ':policy' do + + [:accept, :drop, :queue, :return].each do |policy| + it "should accept policy #{policy}" do + resource[:policy] = policy + resource[:policy].should == policy + end + end + + it 'should fail when value is not recognized' do + expect { resource[:policy] = 'not valid' }.to raise_error(Puppet::Error) + end + + [:accept, :drop, :queue, :return].each do |policy| + it "non-inbuilt chains should not accept policy #{policy}" do + expect { klass.new({:name => 'testchain:filter:IPv4', :policy => policy }) }.to raise_error(Puppet::Error) + end + it "non-inbuilt chains can accept policies on protocol = ethernet (policy #{policy})" do + klass.new({:name => 'testchain:filter:ethernet', :policy => policy }) + end + end + + end + + describe 'autorequire packages' do + it "provider iptables_chain should autorequire package iptables" do + resource[:provider].should == :iptables_chain + package = Puppet::Type.type(:package).new(:name => 'iptables') + catalog = Puppet::Resource::Catalog.new + catalog.add_resource resource + catalog.add_resource package + rel = resource.autorequire[0] + rel.source.ref.should == package.ref + rel.target.ref.should == resource.ref + end + + it "provider iptables_chain should autorequire packages iptables and iptables-persistent" do + resource[:provider].should == :iptables_chain + packages = [ + Puppet::Type.type(:package).new(:name => 'iptables'), + Puppet::Type.type(:package).new(:name => 'iptables-persistent') + ] + catalog = Puppet::Resource::Catalog.new + catalog.add_resource resource + packages.each do |package| + catalog.add_resource package + end + packages.zip(resource.autorequire) do |package, rel| + rel.source.ref.should == package.ref + rel.target.ref.should == resource.ref + end + end + end + + describe 'purge iptables rules' do + before(:each) do + allow(Puppet::Type.type(:firewall).provider(:iptables)).to receive(:iptables_save).and_return(< 'INPUT:filter:IPv4', :purge => true) + + expect(resource.generate.size).to eq(3) + end + + it 'should not generate ignored iptables rules' do + resource = Puppet::Type::Firewallchain.new(:name => 'INPUT:filter:IPv4', :purge => true, :ignore => ['-j fail2ban-ssh']) + + expect(resource.generate.size).to eq(2) + end + + it 'should not generate iptables resources when not enabled' do + resource = Puppet::Type::Firewallchain.new(:name => 'INPUT:filter:IPv4') + + expect(resource.generate.size).to eq(0) + end + end +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/firewall/spec/unit/puppet/util/firewall_spec.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/firewall/spec/unit/puppet/util/firewall_spec.rb new file mode 100644 index 00000000000..e5864879c32 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/firewall/spec/unit/puppet/util/firewall_spec.rb @@ -0,0 +1,197 @@ +require 'spec_helper' + +describe 'Puppet::Util::Firewall' do + let(:resource) { + type = Puppet::Type.type(:firewall) + provider = double 'provider' + allow(provider).to receive(:name).and_return(:iptables) + allow(Puppet::Type::Firewall).to receive(:defaultprovider).and_return(provider) + type.new({:name => '000 test foo'}) + } + + before(:each) { resource } + + describe '#host_to_ip' do + subject { resource } + specify { + expect(Resolv).to receive(:getaddress).with('puppetlabs.com').and_return('96.126.112.51') + subject.host_to_ip('puppetlabs.com').should == '96.126.112.51/32' + } + specify { subject.host_to_ip('96.126.112.51').should == '96.126.112.51/32' } + specify { subject.host_to_ip('96.126.112.51/32').should == '96.126.112.51/32' } + specify { subject.host_to_ip('2001:db8:85a3:0:0:8a2e:370:7334').should == '2001:db8:85a3::8a2e:370:7334/128' } + specify { subject.host_to_ip('2001:db8:1234::/48').should == '2001:db8:1234::/48' } + specify { subject.host_to_ip('0.0.0.0/0').should == nil } + specify { subject.host_to_ip('::/0').should == nil } + end + + describe '#host_to_mask' do + subject { resource } + specify { + expect(Resolv).to receive(:getaddress).at_least(:once).with('puppetlabs.com').and_return('96.126.112.51') + subject.host_to_mask('puppetlabs.com').should == '96.126.112.51/32' + subject.host_to_mask('!puppetlabs.com').should == '! 96.126.112.51/32' + } + specify { subject.host_to_mask('96.126.112.51').should == '96.126.112.51/32' } + specify { subject.host_to_mask('!96.126.112.51').should == '! 96.126.112.51/32' } + specify { subject.host_to_mask('96.126.112.51/32').should == '96.126.112.51/32' } + specify { subject.host_to_mask('! 96.126.112.51/32').should == '! 96.126.112.51/32' } + specify { subject.host_to_mask('2001:db8:85a3:0:0:8a2e:370:7334').should == '2001:db8:85a3::8a2e:370:7334/128' } + specify { subject.host_to_mask('!2001:db8:85a3:0:0:8a2e:370:7334').should == '! 2001:db8:85a3::8a2e:370:7334/128' } + specify { subject.host_to_mask('2001:db8:1234::/48').should == '2001:db8:1234::/48' } + specify { subject.host_to_mask('! 2001:db8:1234::/48').should == '! 2001:db8:1234::/48' } + specify { subject.host_to_mask('0.0.0.0/0').should == nil } + specify { subject.host_to_mask('!0.0.0.0/0').should == nil } + specify { subject.host_to_mask('::/0').should == nil } + specify { subject.host_to_mask('! ::/0').should == nil } + end + + describe '#icmp_name_to_number' do + describe 'proto unsupported' do + subject { resource } + + %w{inet5 inet8 foo}.each do |proto| + it "should reject invalid proto #{proto}" do + expect { subject.icmp_name_to_number('echo-reply', proto) }. + to raise_error(ArgumentError, "unsupported protocol family '#{proto}'") + end + end + end + + describe 'proto IPv4' do + proto = 'inet' + subject { resource } + specify { subject.icmp_name_to_number('echo-reply', proto).should == '0' } + specify { subject.icmp_name_to_number('destination-unreachable', proto).should == '3' } + specify { subject.icmp_name_to_number('source-quench', proto).should == '4' } + specify { subject.icmp_name_to_number('redirect', proto).should == '6' } + specify { subject.icmp_name_to_number('echo-request', proto).should == '8' } + specify { subject.icmp_name_to_number('router-advertisement', proto).should == '9' } + specify { subject.icmp_name_to_number('router-solicitation', proto).should == '10' } + specify { subject.icmp_name_to_number('time-exceeded', proto).should == '11' } + specify { subject.icmp_name_to_number('parameter-problem', proto).should == '12' } + specify { subject.icmp_name_to_number('timestamp-request', proto).should == '13' } + specify { subject.icmp_name_to_number('timestamp-reply', proto).should == '14' } + specify { subject.icmp_name_to_number('address-mask-request', proto).should == '17' } + specify { subject.icmp_name_to_number('address-mask-reply', proto).should == '18' } + end + + describe 'proto IPv6' do + proto = 'inet6' + subject { resource } + specify { subject.icmp_name_to_number('destination-unreachable', proto).should == '1' } + specify { subject.icmp_name_to_number('time-exceeded', proto).should == '3' } + specify { subject.icmp_name_to_number('parameter-problem', proto).should == '4' } + specify { subject.icmp_name_to_number('echo-request', proto).should == '128' } + specify { subject.icmp_name_to_number('echo-reply', proto).should == '129' } + specify { subject.icmp_name_to_number('router-solicitation', proto).should == '133' } + specify { subject.icmp_name_to_number('router-advertisement', proto).should == '134' } + specify { subject.icmp_name_to_number('redirect', proto).should == '137' } + end + end + + describe '#string_to_port' do + subject { resource } + specify { subject.string_to_port('80','tcp').should == '80' } + specify { subject.string_to_port(80,'tcp').should == '80' } + specify { subject.string_to_port('http','tcp').should == '80' } + specify { subject.string_to_port('domain','udp').should == '53' } + end + + describe '#to_hex32' do + subject { resource } + specify { subject.to_hex32('0').should == '0x0' } + specify { subject.to_hex32('0x32').should == '0x32' } + specify { subject.to_hex32('42').should == '0x2a' } + specify { subject.to_hex32('4294967295').should == '0xffffffff' } + specify { subject.to_hex32('4294967296').should == nil } + specify { subject.to_hex32('-1').should == nil } + specify { subject.to_hex32('bananas').should == nil } + end + + describe '#persist_iptables' do + before { Facter.clear } + subject { resource } + + describe 'when proto is IPv4' do + let(:proto) { 'IPv4' } + + it 'should exec /sbin/service if running RHEL 6 or earlier' do + allow(Facter.fact(:osfamily)).to receive(:value).and_return('RedHat') + allow(Facter.fact(:operatingsystem)).to receive(:value).and_return('RedHat') + allow(Facter.fact(:operatingsystemrelease)).to receive(:value).and_return('6') + + expect(subject).to receive(:execute).with(%w{/sbin/service iptables save}) + subject.persist_iptables(proto) + end + + it 'should exec for systemd if running RHEL 7 or greater' do + allow(Facter.fact(:osfamily)).to receive(:value).and_return('RedHat') + allow(Facter.fact(:operatingsystem)).to receive(:value).and_return('RedHat') + allow(Facter.fact(:operatingsystemrelease)).to receive(:value).and_return('7') + + expect(subject).to receive(:execute).with(%w{/usr/libexec/iptables/iptables.init save}) + subject.persist_iptables(proto) + end + + it 'should exec for systemd if running Fedora 15 or greater' do + allow(Facter.fact(:osfamily)).to receive(:value).and_return('RedHat') + allow(Facter.fact(:operatingsystem)).to receive(:value).and_return('Fedora') + allow(Facter.fact(:operatingsystemrelease)).to receive(:value).and_return('15') + + expect(subject).to receive(:execute).with(%w{/usr/libexec/iptables/iptables.init save}) + subject.persist_iptables(proto) + end + + it 'should exec for CentOS identified from operatingsystem' do + allow(Facter.fact(:osfamily)).to receive(:value).and_return(nil) + allow(Facter.fact(:operatingsystem)).to receive(:value).and_return('CentOS') + expect(subject).to receive(:execute).with(%w{/sbin/service iptables save}) + subject.persist_iptables(proto) + end + + it 'should exec for Archlinux identified from osfamily' do + allow(Facter.fact(:osfamily)).to receive(:value).and_return('Archlinux') + expect(subject).to receive(:execute).with(['/bin/sh', '-c', '/usr/sbin/iptables-save > /etc/iptables/iptables.rules']) + subject.persist_iptables(proto) + end + + it 'should raise a warning when exec fails' do + allow(Facter.fact(:osfamily)).to receive(:value).and_return('RedHat') + allow(Facter.fact(:operatingsystem)).to receive(:value).and_return('RedHat') + allow(Facter.fact(:operatingsystemrelease)).to receive(:value).and_return('6') + + expect(subject).to receive(:execute).with(%w{/sbin/service iptables save}). + and_raise(Puppet::ExecutionFailure, 'some error') + expect(subject).to receive(:warning).with('Unable to persist firewall rules: some error') + subject.persist_iptables(proto) + end + end + + describe 'when proto is IPv6' do + let(:proto) { 'IPv6' } + + it 'should exec for newer Ubuntu' do + allow(Facter.fact(:osfamily)).to receive(:value).and_return(nil) + allow(Facter.fact(:operatingsystem)).to receive(:value).and_return('Ubuntu') + allow(Facter.fact(:iptables_persistent_version)).to receive(:value).and_return('0.5.3ubuntu2') + expect(subject).to receive(:execute).with(%w{/usr/sbin/service iptables-persistent save}) + subject.persist_iptables(proto) + end + + it 'should not exec for older Ubuntu which does not support IPv6' do + allow(Facter.fact(:osfamily)).to receive(:value).and_return(nil) + allow(Facter.fact(:operatingsystem)).to receive(:value).and_return('Ubuntu') + allow(Facter.fact(:iptables_persistent_version)).to receive(:value).and_return('0.0.20090701') + expect(subject).to receive(:execute).never + subject.persist_iptables(proto) + end + + it 'should not exec for Suse which is not supported' do + allow(Facter.fact(:osfamily)).to receive(:value).and_return('Suse') + expect(subject).to receive(:execute).never + subject.persist_iptables(proto) + end + end + end +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/firewall/spec/unit/puppet/util/ipcidr_spec.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/firewall/spec/unit/puppet/util/ipcidr_spec.rb new file mode 100644 index 00000000000..916f74a350a --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/firewall/spec/unit/puppet/util/ipcidr_spec.rb @@ -0,0 +1,67 @@ +require 'spec_helper' + +describe 'Puppet::Util::IPCidr' do + describe 'ipv4 address' do + before { @ipaddr = Puppet::Util::IPCidr.new('96.126.112.51') } + subject { @ipaddr } + specify { subject.cidr.should == '96.126.112.51/32' } + specify { subject.prefixlen.should == 32 } + specify { subject.netmask.should == '255.255.255.255' } + end + + describe 'single ipv4 address with cidr' do + before { @ipcidr = Puppet::Util::IPCidr.new('96.126.112.51/32') } + subject { @ipcidr } + specify { subject.cidr.should == '96.126.112.51/32' } + specify { subject.prefixlen.should == 32 } + specify { subject.netmask.should == '255.255.255.255' } + end + + describe 'ipv4 address range with cidr' do + before { @ipcidr = Puppet::Util::IPCidr.new('96.126.112.0/24') } + subject { @ipcidr } + specify { subject.cidr.should == '96.126.112.0/24' } + specify { subject.prefixlen.should == 24 } + specify { subject.netmask.should == '255.255.255.0' } + end + + describe 'ipv4 open range with cidr' do + before { @ipcidr = Puppet::Util::IPCidr.new('0.0.0.0/0') } + subject { @ipcidr } + specify { subject.cidr.should == '0.0.0.0/0' } + specify { subject.prefixlen.should == 0 } + specify { subject.netmask.should == '0.0.0.0' } + end + + describe 'ipv6 address' do + before { @ipaddr = Puppet::Util::IPCidr.new('2001:db8:85a3:0:0:8a2e:370:7334') } + subject { @ipaddr } + specify { subject.cidr.should == '2001:db8:85a3::8a2e:370:7334/128' } + specify { subject.prefixlen.should == 128 } + specify { subject.netmask.should == 'ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff' } + end + + describe 'single ipv6 addr with cidr' do + before { @ipaddr = Puppet::Util::IPCidr.new('2001:db8:85a3:0:0:8a2e:370:7334/128') } + subject { @ipaddr } + specify { subject.cidr.should == '2001:db8:85a3::8a2e:370:7334/128' } + specify { subject.prefixlen.should == 128 } + specify { subject.netmask.should == 'ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff' } + end + + describe 'ipv6 addr range with cidr' do + before { @ipaddr = Puppet::Util::IPCidr.new('2001:db8:1234::/48') } + subject { @ipaddr } + specify { subject.cidr.should == '2001:db8:1234::/48' } + specify { subject.prefixlen.should == 48 } + specify { subject.netmask.should == 'ffff:ffff:ffff:0000:0000:0000:0000:0000' } + end + + describe 'ipv6 open range with cidr' do + before { @ipaddr = Puppet::Util::IPCidr.new('::/0') } + subject { @ipaddr } + specify { subject.cidr.should == '::/0' } + specify { subject.prefixlen.should == 0 } + specify { subject.netmask.should == '0000:0000:0000:0000:0000:0000:0000:0000' } + end +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/git/.fixtures.yml b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/git/.fixtures.yml new file mode 100644 index 00000000000..2aa9e3d77a7 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/git/.fixtures.yml @@ -0,0 +1,5 @@ +fixtures: + repositories: + vcsrepo: git://github.com/puppetlabs/puppetlabs-vcsrepo.git + symlinks: + git: "#{source_dir}" diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/git/CHANGELOG b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/git/CHANGELOG new file mode 100644 index 00000000000..670358b6896 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/git/CHANGELOG @@ -0,0 +1,2 @@ +2011-06-03 - Dan Bode - 0.0.1 +* initial commit diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/git/LICENSE b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/git/LICENSE new file mode 100644 index 00000000000..297f85cfa86 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/git/LICENSE @@ -0,0 +1,201 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright 2013 Puppet Labs + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/git/Modulefile b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/git/Modulefile new file mode 100644 index 00000000000..9403b43a06a --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/git/Modulefile @@ -0,0 +1,10 @@ +name 'puppetlabs-git' +version '0.0.3' +source 'git://github.com/puppetlabs/puppetlabs-git.git' +author 'puppetlabs' +license 'Apache 2.0' +summary 'module for installing git' +description 'module for installing git' +project_page 'https://github.com/puppetlabs/puppetlabs-git/' +dependency 'puppetlabs/vcsrepo' + diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/git/README.md b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/git/README.md new file mode 100644 index 00000000000..49e51f48178 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/git/README.md @@ -0,0 +1,71 @@ +#git + +####Table of Contents + +1. [Overview - What is the [Modulename] module?](#overview) +2. [Module Description - What does the module do?](#module-description) +3. [Setup - The basics of getting started with [Modulename]](#setup) + * [What [Modulename] affects](#what-registry-affects) +4. [Usage - Configuration options and additional functionality](#usage) +6. [Limitations - OS compatibility, etc.](#limitations) +7. [Development - Guide for contributing to the module](#development) + +##Overview + +Simple module that can install git or gitosis + +##Module Description + +This module installs the git revision control system on a target node. It does not manage a git server or any associated services; it simply ensures a bare minimum set of features (e.g. just a package) to use git. + +##Setup + +###What git affects + +* Package['git'] + +The specifics managed by the module may vary depending on the platform. + +##Usage + +###I just want `git` installed +Simply include the `git` class. + +```puppet +include git +``` + +###I want to use `git subtree` with bash completion + +```puppet +include git::subtree +``` + +##Reference + +###Classes + +* `git`: Installs the git client package. +* `gitosis`: Installs the gitosis package. No configuration +* `subtree`: Installs and configures git-subtree for git 1.7 and up. + +###Facts + +* `git_exec_path`: Path to the directory containing all `git-*` commands. +* `git_version`: Version of git that is installed. Undefined if not installed. + +##Limitations + +This module is known to work with the following operating system families: + + - RedHat 5, 6 + - Debian 6.0.7 or newer + - Ubuntu 12.04 or newer + +##Development + +Puppet Labs modules on the Puppet Forge are open projects, and community contributions are essential for keeping them great. We can’t access the huge number of platforms and myriad of hardware, software, and deployment configurations that Puppet is intended to serve. + +We want to keep it as easy as possible to contribute changes so that our modules work in your environment. There are a few guidelines that we need contributors to follow so that we can have a chance of keeping on top of things. + +You can read the complete module contribution guide [on the Puppet Labs wiki.](http://projects.puppetlabs.com/projects/module-site/wiki/Module_contributing) diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/git/Rakefile b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/git/Rakefile new file mode 100644 index 00000000000..cd3d3799589 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/git/Rakefile @@ -0,0 +1 @@ +require 'puppetlabs_spec_helper/rake_tasks' diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/git/files/subtree/bash_completion.sh b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/git/files/subtree/bash_completion.sh new file mode 100644 index 00000000000..f2683e44946 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/git/files/subtree/bash_completion.sh @@ -0,0 +1,25 @@ +#!bash +# +# bash completion support for Git subtree. +# +# To use this routine: +# +# 1) Make sure you have installed and configured the core Git completion script, which is required to make this script work; +# 2) Copy this file to somewhere (e.g. ~/.git-subtree-completion.sh); +# 3) Added the following line to your .bashrc: +# source ~/.git-subtree-completion.sh +# + +_git_subtree () +{ + local cur="${COMP_WORDS[COMP_CWORD]}" + + if [ $COMP_CWORD -eq 2 ]; then + __gitcomp "add merge pull push split" + return + elif [ $COMP_CWORD -eq 3 ]; then + __gitcomp "--prefix=" + return + fi + __gitcomp "$(__git_remotes)" +} diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/git/lib/facter/git_exec_path.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/git/lib/facter/git_exec_path.rb new file mode 100644 index 00000000000..23d06e0b0d9 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/git/lib/facter/git_exec_path.rb @@ -0,0 +1,4 @@ +# git_exec_path.rb +Facter.add('git_exec_path') do + setcode 'git --exec-path 2>/dev/null' +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/git/lib/facter/git_version.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/git/lib/facter/git_version.rb new file mode 100644 index 00000000000..4cb71d2ccee --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/git/lib/facter/git_version.rb @@ -0,0 +1,4 @@ +# git_version +Facter.add('git_version') do + setcode 'git --version 2>/dev/null'.sub(/git version /, '') +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/git/manifests/gitosis.pp b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/git/manifests/gitosis.pp new file mode 100644 index 00000000000..64b7b2df3d5 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/git/manifests/gitosis.pp @@ -0,0 +1,13 @@ +# Class: gitosis +# +# This installs and configures gitosis +# +# Requires: +# - Class[git] +# +class git::gitosis { + include ::git + package {'gitosis': + ensure => present + } +} diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/git/manifests/init.pp b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/git/manifests/init.pp new file mode 100644 index 00000000000..7e57fa23cb8 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/git/manifests/init.pp @@ -0,0 +1,17 @@ +# Class: git +# +# This class installs git +# +# Actions: +# - Install the git package +# +# Sample Usage: +# class { 'git': } +# +class git { + if ! defined(Package['git']) { + package { 'git': + ensure => present + } + } +} diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/git/manifests/subtree.pp b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/git/manifests/subtree.pp new file mode 100644 index 00000000000..6c47ca8b4de --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/git/manifests/subtree.pp @@ -0,0 +1,43 @@ +# == Class: git::subtree +# +# Installs and configure git-subtree +# +class git::subtree { + + include ::git + + Package['git'] -> Class['git::subtree'] + + if (versioncmp('1.7.0', $::git_version) > 0) { + fail 'git-subtree requires git 1.7 or later!' + } + + if (versioncmp('1.7.11', $::git_version) > 0) { + $source_dir = '/usr/src/git-subtree' + vcsrepo { $source_dir: + ensure => present, + source => 'http://github.com/apenwarr/git-subtree.git', + provider => 'git', + revision => '2793ee6ba', + } + } else { + $source_dir = '/usr/share/doc/git-core/contrib/subtree' + } + + exec { "/usr/bin/make prefix=/usr libexecdir=${::git_exec_path}": + creates => "${source_dir}/git-subtree", + cwd => $source_dir, + } + -> + exec { "/usr/bin/make prefix=/usr libexecdir=${::git_exec_path} install": + creates => "${::git_exec_path}/git-subtree", + cwd => $source_dir, + } + + file { '/etc/bash_completion.d/git-subtree': + ensure => file, + source => 'puppet:///modules/git/subtree/bash_completion.sh', + mode => '0644', + } + +} diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/git/spec/classes/git_subtree_spec.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/git/spec/classes/git_subtree_spec.rb new file mode 100644 index 00000000000..e7a6e325395 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/git/spec/classes/git_subtree_spec.rb @@ -0,0 +1,70 @@ +require 'spec_helper' + +describe 'git::subtree' do + + context 'when git version < 1.7.0' do + let(:facts) { { :git_version => '1.6.0' } } + + it 'should fail' do + expect { should create_class('git::subtree') }.to raise_error(Puppet::Error, /git-subtree requires git 1.7 or later!/) + end + end + + context 'when git version > 1.7.0 and < 1.7.11' do + let(:facts) { { + :git_version => '1.7.0', + :git_exec_path => '/usr/lib/git-core', + } } + + it { should create_class('git') } + + it { should create_vcsrepo('/usr/src/git-subtree').with({ + :ensure => 'present', + :source => 'http://github.com/apenwarr/git-subtree.git', + :provider => 'git', + :revision => '2793ee6ba', + })} + + it { should create_exec('/usr/bin/make prefix=/usr libexecdir=/usr/lib/git-core').with({ + :creates => '/usr/src/git-subtree/git-subtree', + :cwd => '/usr/src/git-subtree', + })} + + it { should create_exec('/usr/bin/make prefix=/usr libexecdir=/usr/lib/git-core install').with({ + :creates => '/usr/lib/git-core/git-subtree', + :cwd => '/usr/src/git-subtree', + })} + + it { should create_file('/etc/bash_completion.d/git-subtree').with({ + :ensure => 'file', + :source => 'puppet:///modules/git/subtree/bash_completion.sh', + :mode => '0644', + })} + end + + context 'when git version >= 1.7.11' do + let(:facts) { { + :git_version => '1.7.11', + :git_exec_path => '/usr/lib/git-core', + } } + + it { should create_class('git') } + + it { should create_exec('/usr/bin/make prefix=/usr libexecdir=/usr/lib/git-core').with({ + :creates => '/usr/share/doc/git-core/contrib/subtree/git-subtree', + :cwd => '/usr/share/doc/git-core/contrib/subtree', + })} + + it { should create_exec('/usr/bin/make prefix=/usr libexecdir=/usr/lib/git-core install').with({ + :creates => '/usr/lib/git-core/git-subtree', + :cwd => '/usr/share/doc/git-core/contrib/subtree', + })} + + it { should create_file('/etc/bash_completion.d/git-subtree').with({ + :ensure => 'file', + :source => 'puppet:///modules/git/subtree/bash_completion.sh', + :mode => '0644', + })} + end + +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/git/spec/spec_helper.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/git/spec/spec_helper.rb new file mode 100644 index 00000000000..2c6f56649ae --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/git/spec/spec_helper.rb @@ -0,0 +1 @@ +require 'puppetlabs_spec_helper/module_spec_helper' diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/git/tests/gitosis.pp b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/git/tests/gitosis.pp new file mode 100644 index 00000000000..e6240ae21f0 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/git/tests/gitosis.pp @@ -0,0 +1 @@ +class { 'git::gitosis': } diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/git/tests/init.pp b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/git/tests/init.pp new file mode 100644 index 00000000000..c232904713f --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/git/tests/init.pp @@ -0,0 +1 @@ +class { 'git': } diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mailcatcher/.fixtures.yml b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mailcatcher/.fixtures.yml new file mode 100644 index 00000000000..0d21abb8c40 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mailcatcher/.fixtures.yml @@ -0,0 +1,5 @@ +fixtures: + repositories: + stdlib: "git://github.com/puppetlabs/puppetlabs-stdlib.git" + symlinks: + mailcatcher: "#{source_dir}" diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mailcatcher/.travis.yml b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mailcatcher/.travis.yml new file mode 100644 index 00000000000..08a65c81874 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mailcatcher/.travis.yml @@ -0,0 +1,31 @@ +--- +branches: + only: + - master +language: ruby +bundler_args: --without development +script: "bundle exec rake spec SPEC_OPTS='--format documentation'" +rvm: +- 1.8.7 +- 1.9.3 +- 2.0.0 +env: + matrix: + - PUPPET_GEM_VERSION="~> 2.7.0" + - PUPPET_GEM_VERSION="~> 3.0.0" + - PUPPET_GEM_VERSION="~> 3.1.0" + - PUPPET_GEM_VERSION="~> 3.2.0" +matrix: + exclude: + - rvm: 1.9.3 + env: PUPPET_GEM_VERSION="~> 2.7.0" + - rvm: 2.0.0 + env: PUPPET_GEM_VERSION="~> 2.7.0" + - rvm: 2.0.0 + env: PUPPET_GEM_VERSION="~> 3.0.0" + - rvm: 2.0.0 + env: PUPPET_GEM_VERSION="~> 3.1.0" + - rvm: 1.8.7 + env: PUPPET_GEM_VERSION="~> 3.2.0" +notifications: + email: false \ No newline at end of file diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mailcatcher/Gemfile b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mailcatcher/Gemfile new file mode 100644 index 00000000000..170516d9813 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mailcatcher/Gemfile @@ -0,0 +1,12 @@ +source 'https://rubygems.org' +puppetversion = ENV.key?('PUPPET_VERSION') ? "= #{ENV['PUPPET_VERSION']}" : ['>= 2.7'] + +gem 'puppet', puppetversion + +group :test do + gem 'rake', '>= 0.9.0' + gem 'rspec', '>= 2.8.0' + gem 'rspec-puppet', '>= 0.1.1' + gem 'puppetlabs_spec_helper', '>= 0.4.1' + gem 'puppet-lint' +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mailcatcher/Modulefile b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mailcatcher/Modulefile new file mode 100644 index 00000000000..54de3a1024f --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mailcatcher/Modulefile @@ -0,0 +1,13 @@ +name 'actionjack-mailcatcher' +version '0.1.5' +source 'https://github.com/actionjack/puppet-mailcatcher' +author 'actionjack' +license 'Apache License, Version 2.0' +summary 'Install and configure the mailcatcher application.' +description "This puppet module is used to install and configure the mailcatcher +application. +MailCatcher runs a super simple SMTP server which catches any message sent to it +to display in a web interface." +project_page 'https://github.com/actionjack/puppet-mailcatcher' + +dependency 'puppetlabs/stdlib', '>= 2.2.1' diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mailcatcher/README.md b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mailcatcher/README.md new file mode 100644 index 00000000000..12d569a08b5 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mailcatcher/README.md @@ -0,0 +1,34 @@ +# Mailcatcher + +[![Build Status](https://travis-ci.org/actionjack/puppet-mailcatcher.png?branch=master)](https://travis-ci.org/actionjack/puppet-mailcatcher) + +This puppet module is used to install and configure the mailcatcher application. +MailCatcher runs a super simple SMTP server which catches any message sent to it to display in a web interface. +http://mailcatcher.me/ + +* * * + +## Configuration + + +## Dependencies + +Current dependencies are: + + * 'puppetlabs/stdlib', '>= 2.1.0' + +## Usage + + + +```ruby +class {'mailcatcher': } +``` + +## Documentation + +This module is written in puppetdoc compliant format so details on configuration and usage can be found by executing: + +```bash +$ puppet doc manifest/init.pp +``` diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mailcatcher/Rakefile b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mailcatcher/Rakefile new file mode 100644 index 00000000000..e0e78cfbb8a --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mailcatcher/Rakefile @@ -0,0 +1,6 @@ +require 'puppetlabs_spec_helper/rake_tasks' +require 'puppet-lint/tasks/puppet-lint' + +PuppetLint.configuration.send('disable_class_inherits_from_params_class') +PuppetLint.configuration.send("disable_80chars") +PuppetLint.configuration.log_format = "%{path}:%{linenumber}:%{check}:%{KIND}:%{message}" diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mailcatcher/manifests/config.pp b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mailcatcher/manifests/config.pp new file mode 100644 index 00000000000..c4a27921e90 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mailcatcher/manifests/config.pp @@ -0,0 +1,18 @@ +# class mailcatcher::config +# +class mailcatcher::config { + user { 'mailcatcher': + ensure => present, + comment => 'Mailcatcher Mock Smtp Service User', + home => '/var/spool/mailcatcher', + shell => '/bin/true', + } + + file { $mailcatcher::params::log_path: + ensure => directory, + owner => 'mailcatcher', + group => 'mailcatcher', + mode => 0755, + require => User['mailcatcher'] + } +} diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mailcatcher/manifests/init.pp b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mailcatcher/manifests/init.pp new file mode 100644 index 00000000000..31c5d3434e5 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mailcatcher/manifests/init.pp @@ -0,0 +1,64 @@ +# == Class: mailcatcher +# +# Install and configure Mailcatcher. +# MailCatcher runs a super simple SMTP server which catches any message sent to +# it to display in a web interface. +# http://mailcatcher.me/ +# +# === Parameters +# +# Document parameters here. +# +# [*smtp_ip*] +# What IP address the mailcatcher smtp service should listen on. +# The default is 127.0.0.1 +# +# [*smtp_port*] +# What TCP Port the mailcatcher smtp service should listen on. +# The default is 1025 +# +# [*http_ip*] +# What IP address the mailcatcher web mail client service should listen on. +# The default is 0.0.0.0 +# +# [*http_port*] +# What TCP Port the mailcatcher web mail client service should listen on. +# The default is 1080 +# +# [*mailcatcher_path*] +# Path to the mailcatcher program. +# The default is '/usr/local/bin' +# +# === Examples +# +# [*default*] +# +# class { mailcatcher: } +# +# [*listen on all ethernet adapters*] +# +# class { mailcatcher: +# smtp_ip => '0.0.0.0' +# } +# +# === Authors +# +# Martin Jackson +# +# === Copyright +# +# Copyright 2013 Martin Jackson, unless otherwise noted. +# +class mailcatcher ( + $smtp_ip = $mailcatcher::params::smtp_ip, + $smtp_port = $mailcatcher::params::smtp_port, + $http_ip = $mailcatcher::params::http_ip, + $http_port = $mailcatcher::params::http_port, + $mailcatcher_path = $mailcatcher::params::mailcatcher_path, + $log_path = $mailcatcher::params::log_path +) inherits mailcatcher::params { + + class {'mailcatcher::package': } -> + class {'mailcatcher::config': } + +} diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mailcatcher/manifests/package.pp b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mailcatcher/manifests/package.pp new file mode 100644 index 00000000000..6d66fb836b5 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mailcatcher/manifests/package.pp @@ -0,0 +1,17 @@ +# class mailcatcher::package +# +class mailcatcher::package { + each( $mailcatcher::params::packages ) |$package| { + if ! defined(Package[$package]) { + package { $package: + ensure => present + } + } + } + + package { 'mailcatcher': + ensure => present, + provider => 'gem', + require => Package[$mailcatcher::params::packages] + } +} diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mailcatcher/manifests/params.pp b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mailcatcher/manifests/params.pp new file mode 100644 index 00000000000..a21d6b07e5c --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mailcatcher/manifests/params.pp @@ -0,0 +1,22 @@ +# class mailcatcher::params +# +class mailcatcher::params { + $smtp_ip = '0.0.0.0' + $smtp_port = '1025' + $http_ip = '0.0.0.0' + $http_port = '1080' + $mailcatcher_path = '/usr/local/bin' + $log_path = '/var/log/mailcatcher' + + case $::osfamily { + 'Debian': { + $packages = ['ruby-dev', 'sqlite3', 'libsqlite3-dev', 'rubygems'] + } + 'Redhat': { + $packages = ['ruby-devel', 'sqlite', 'sqlite-devel', 'ruby-sqlite3', 'rubygems'] + } + default: { + fail("${::osfamily} is not supported.") + } + } +} diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mailcatcher/spec/classes/mailcatcher_spec.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mailcatcher/spec/classes/mailcatcher_spec.rb new file mode 100644 index 00000000000..4ae17bd3b1d --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mailcatcher/spec/classes/mailcatcher_spec.rb @@ -0,0 +1,41 @@ +require 'spec_helper' + +describe 'mailcatcher', :type => :class do + context "As a Web Operations Engineer" do + context 'When I install the mailcatcher base class on Ubuntu' do + let :facts do { + :osfamily => 'Debian', + :operatingsystem => 'Ubuntu' + } + end + + describe 'by default it' do + it { should contain_package('ruby-dev') } + it { should contain_package('sqlite3') } + it { should contain_package('libsqlite3-dev') } + it { should contain_package('rubygems') } + it { should contain_package('mailcatcher').with({ 'provider' => 'gem'}) } + it { should contain_user('mailcatcher') } + it 'should contain a properly formatted start up configuration for upstart' do + should contain_file('/etc/init/mailcatcher.conf').with_content(/exec\s+nohup\s+\/usr\/local\/bin\/mailcatcher\s+--http-ip\s+0\.0\.0\.0\s+--http-port\s+1080\s+--smtp-ip\s+0\.0\.0\.0\s+--smtp-port\s+1025\s+-f/) + end + it { should contain_file('/etc/init/mailcatcher.conf').with({ :notify => 'Class[Mailcatcher::Service]'})} + it { should contain_file('/var/log/mailcatcher').with({ + :ensure => 'directory', + :owner => 'mailcatcher', + :group => 'mailcatcher', + :mode => '0755', + :require => 'User[mailcatcher]' + })} + it { should contain_service('mailcatcher').with({ + :ensure => 'running', + :provider => 'upstart', + :hasstatus => true, + :hasrestart => true, + :require => 'Class[Mailcatcher::Config]', + })} + + end + end + end +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mailcatcher/spec/spec_helper.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mailcatcher/spec/spec_helper.rb new file mode 100644 index 00000000000..3d92005247c --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mailcatcher/spec/spec_helper.rb @@ -0,0 +1 @@ +require 'puppetlabs_spec_helper/module_spec_helper' \ No newline at end of file diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mailcatcher/templates/etc/init/mailcatcher.conf.erb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mailcatcher/templates/etc/init/mailcatcher.conf.erb new file mode 100644 index 00000000000..4cd663ffe59 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mailcatcher/templates/etc/init/mailcatcher.conf.erb @@ -0,0 +1,16 @@ +# mailcatcher - mock smtp server +# +# mailCatcher runs a super simple SMTP server which catches any +# message sent to it to display in a web interface. + +description "mock smtp server" + +start on startup +stop on shutdown + +setuid mailcatcher +setgid mailcatcher + +script + exec nohup <%= @mailcatcher_path %>/mailcatcher<%= @options.join(' ') %> -f >> /var/log/mailcatcher/mailcatcher.log 2>&1 +end script diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mailcatcher/tests/init.pp b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mailcatcher/tests/init.pp new file mode 100644 index 00000000000..adead2832a4 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mailcatcher/tests/init.pp @@ -0,0 +1,12 @@ +# The baseline for module testing used by Puppet Labs is that each manifest +# should have a corresponding test manifest that declares that class or defined +# type. +# +# Tests are then run by using puppet apply --noop (to check for compilation +# errors and view a log of events) or by fully applying the test in a virtual +# environment (to compare the resulting system state to the desired state). +# +# Learn more about module testing here: +# http://docs.puppetlabs.com/guides/tests_smoke.html +# +include mailcatcher diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mongodb/.fixtures.yml b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mongodb/.fixtures.yml new file mode 100644 index 00000000000..e48e20aaee9 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mongodb/.fixtures.yml @@ -0,0 +1,6 @@ +fixtures: + repositories: + "stdlib": "git://github.com/puppetlabs/puppetlabs-stdlib.git" + "apt": "git://github.com/puppetlabs/puppetlabs-apt.git" + symlinks: + "mongodb": "#{source_dir}" diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mongodb/.nodeset.yml b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mongodb/.nodeset.yml new file mode 100644 index 00000000000..767f9cd2f6e --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mongodb/.nodeset.yml @@ -0,0 +1,31 @@ +--- +default_set: 'centos-64-x64' +sets: + 'centos-59-x64': + nodes: + "main.foo.vm": + prefab: 'centos-59-x64' + 'centos-64-x64': + nodes: + "main.foo.vm": + prefab: 'centos-64-x64' + 'fedora-18-x64': + nodes: + "main.foo.vm": + prefab: 'fedora-18-x64' + 'debian-607-x64': + nodes: + "main.foo.vm": + prefab: 'debian-607-x64' + 'debian-70rc1-x64': + nodes: + "main.foo.vm": + prefab: 'debian-70rc1-x64' + 'ubuntu-server-10044-x64': + nodes: + "main.foo.vm": + prefab: 'ubuntu-server-10044-x64' + 'ubuntu-server-12042-x64': + nodes: + "main.foo.vm": + prefab: 'ubuntu-server-12042-x64' diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mongodb/.travis.yml b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mongodb/.travis.yml new file mode 100644 index 00000000000..f6eff1ce965 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mongodb/.travis.yml @@ -0,0 +1,33 @@ +branches: + only: + - master +language: ruby +before_install: + - gem update bundler + - bundle --version + - gem update --system 2.1.11 + - gem --version +bundler_args: --without development +script: "bundle exec rake spec SPEC_OPTS='--format documentation'" +after_success: + - git clone -q git://github.com/puppetlabs/ghpublisher.git .forge-release + - .forge-release/publish +rvm: + - 1.8.7 + - 1.9.3 + - 2.0.0 +env: + matrix: + - PUPPET_GEM_VERSION="~> 2.7.0" + - PUPPET_GEM_VERSION="~> 3.3.0" + global: + - PUBLISHER_LOGIN=puppetlabs + - secure: "iUYpjvk33JffZB9lVRqjuwRWesvcvmTknh908xnf60rUOA0QbGEPXxQY+LsQJEIimVsMA22fV6vp9BcqMEjO7OfK2MvAWsEWU/lG+kisFqhWDRf96sADE7k/RvPWJeB2xe+lWXK7Eh26jgctNfk4NptX1X1MjGmdzEvH7Aq79/w=" +matrix: + exclude: + - rvm: 1.9.3 + env: PUPPET_GEM_VERSION="~> 2.7.0" + - rvm: 2.0.0 + env: PUPPET_GEM_VERSION="~> 2.7.0" +notifications: + email: false diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mongodb/CHANGELOG b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mongodb/CHANGELOG new file mode 100644 index 00000000000..92a220f481d --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mongodb/CHANGELOG @@ -0,0 +1,74 @@ +##2014-05-27 - Release 0.8.0 + +This feature features a rewritten mongodb_replset{} provider, includes several +important bugfixes, ruby 1.8 support, and two new features. + +####Features +- Rewritten mongodb_replset{}, featuring puppet resource support, prefetching, +and flushing. +- Add Ruby 1.8 compatibility. +- Adds `syslog`, allowing you to configure mongodb to send all logging to the hosts syslog. +- Add mongodb::replset, a wrapper class for hiera users. +- Improved testing! + +####Bugfixes +- Fixes the package names to work since 10gen renamed them again. +- Fix provider name in the README. +- Disallow `nojournal` and `journal` to be set at the same time. +- Changed - to = for versioned install on Ubuntu. + +####Known Bugs +* No known bugs + +2014-1-29 - Version 0.7.0 + +Summary: + +Added Replica Set Type and Provider + +2014-1-17 - Version 0.6.0 + +Summary: + +Added support for installing MongoDB client on +RHEL family systems. + +2014-01-10 Version 0.5.0 + +Summary: + +Added types for providers for Mongo users and databases. + +2013-12 Version 0.4.0 + +Major refactoring of the MongoDB module. Includes a new 'mongodb::globals' +that consolidates many shared parameters into one location. This is an +API-breaking release in anticipation of a 1.0 release. + +2013-10-31 - Version 0.3.0 + +Summary: + +Adds a number of parameters and fixes some platform +specific bugs in module deployment. + +2013-09-25 - Version 0.2.0 + +Summary: + +This release fixes a duplicate parameter. + +Fixes: +- Fix a duplicated parameter. + +2012-07-13 Puppet Labs - 0.1.0 +* Add support for RHEL/CentOS +* Change default mongodb install location to OS repo + +2012-05-29 Puppet Labs - 0.0.2 +* Fix Modulefile typo. +* Remove repo pin. +* Update spec tests and add travis support. + +2012-05-03 Puppet Labs - 0.0.1 +* Initial Release. diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mongodb/Gemfile b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mongodb/Gemfile new file mode 100644 index 00000000000..39abe867d49 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mongodb/Gemfile @@ -0,0 +1,19 @@ +source ENV['GEM_SOURCE'] || 'https://rubygems.org' + +group :test, :development do + gem 'rspec-puppet', :require => false + gem 'rake', :require => false + gem 'puppetlabs_spec_helper', :require => false + gem 'serverspec', :require => false + gem 'puppet-lint', :require => false + gem 'pry', :require => false + gem 'simplecov', :require => false + gem 'beaker', :require => false + gem 'beaker-rspec', :require => false +end + +if puppetversion = ENV['PUPPET_VERSION'] + gem 'puppet', puppetversion, :require => false +else + gem 'puppet', :require => false +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mongodb/LICENSE b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mongodb/LICENSE new file mode 100644 index 00000000000..8961ce8a6d1 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mongodb/LICENSE @@ -0,0 +1,15 @@ +Copyright (C) 2012 Puppet Labs Inc + +Puppet Labs can be contacted at: info@puppetlabs.com + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mongodb/Modulefile b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mongodb/Modulefile new file mode 100644 index 00000000000..e2eb82771a3 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mongodb/Modulefile @@ -0,0 +1,12 @@ +name 'puppetlabs-mongodb' +version '0.8.0' +source 'git@github.com:puppetlabs/puppetlabs-mongodb.git' +author 'puppetlabs' +license 'Apache License Version 2.0' +summary 'mongodb puppet module' +description '10gen mongodb puppet module' +project_page 'https://github.com/puppetlabs/puppetlabs-mongodb' + +## Add dependencies, if any: +dependency 'puppetlabs/apt', '>= 1.0.0' +dependency 'puppetlabs/stdlib', '>= 2.2.0' diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mongodb/README.md b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mongodb/README.md new file mode 100644 index 00000000000..2bc16bb3485 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mongodb/README.md @@ -0,0 +1,515 @@ +# mongodb puppet module + +[![Build Status](https://travis-ci.org/puppetlabs/puppetlabs-mongodb.png?branch=master)](https://travis-ci.org/puppetlabs/puppetlabs-mongodb) + +####Table of Contents + +1. [Overview] (#overview) +2. [Module Description - What does the module do?](#module-description) +3. [Setup - The basics of getting started with mongodb](#setup) +4. [Usage - Configuration options and additional functionality](#usage) +5. [Reference - An under-the-hood peek at what the module is doing and how](#reference) +6. [Limitations - OS compatibility, etc.] (#limitations) +7. [Development - Guide for contributing to the module] (#development) + +## Overview + +Installs MongoDB on RHEL/Ubuntu/Debian from OS repo, or alternatively from +10gen repository [installation documentation](http://www.mongodb.org/display/DOCS/Ubuntu+and+Debian+packages). + +### Deprecation Warning ### + +This release is a major refactoring of the module which means that the API may +have changed in backwards incompatible ways. If your project depends on the old API, +please pin your dependencies to 0.3 version to ensure your environments don't break. + +The current module design is undergoing review for potential 1.0 release. We welcome +any feedback with regard to the APIs and patterns used in this release. + +##Module Description + +The MongoDB module manages mongod server installation and configuration of the +mongod daemon. For the time being it supports only a single MongoDB server +instance, without sharding functionality. + +For the 0.5 release, the MongoDB module now supports database and user types. + +For the 0.6 release, the MongoDB module now supports basic replicaset features +(initiating a replicaset and adding members, but without specific options). + +## Setup + +###What MongoDB affects + +* MongoDB package. +* MongoDB configuration files. +* MongoDB service. +* MongoDB client. +* 10gen/mongodb apt/yum repository. + +###Beginning with MongoDB + +If you just want a server installation with the default options you can run +`include '::mongodb::server'`. If you need to customize configuration +options you need to do the following: + +```puppet +class {'::mongodb::server': + port => 27018, + verbose => true, +} +``` + +For Red Hat family systems, the client can be installed in a similar fashion: + +``` +puppet class {'::mongodb::client':} +``` + +Note that for Debian/Ubuntu family systems the client is installed with the +server. Using the client class will by default install the server. + +Although most distros come with a prepacked MongoDB server we recommend to +use the 10gen/MongoDB software repository, because most of the current OS +packages are outdated and not appropriate for a production environment. +To install MongoDB from 10gen repository: + +```puppet +class {'::mongodb::globals': + manage_package_repo => true, +}-> +class {'::mongodb::server': }-> +class {'::mongodb::client': } +``` + +## Usage + +Most of the interaction for the server is done via `mongodb::server`. For +more options please have a look at [mongodb::server](#class-mongodbserver). +Also in this version we introduced `mongodb::globals`, which is meant more +for future implementation, where you can configure the main settings for +this module in a global way, to be used by other classes and defined resources. +On its own it does nothing. + +### Create MongoDB database + +To install MongoDB server, create database "testdb" and user "user1" with password "pass1". + +```puppet +class {'::mongodb::server': + auth => true, +} + +mongodb::db { 'testdb': + user => 'user1', + password_hash => 'a15fbfca5e3a758be80ceaf42458bcd8', +} +``` +Parameter 'password_hash' is hex encoded md5 hash of "user1:mongo:pass1". +Unsafe plain text password could be used with 'password' parameter instead of 'password_hash'. + +## Reference + +### Classes + +####Public classes +* `mongodb::server`: Installs and configure MongoDB +* `mongodb::client`: Installs the MongoDB client shell (for Red Hat family systems) +* `mongodb::globals`: Configure main settings in a global way + +####Private classes +* `mongodb::repo`: Manage 10gen/MongoDB software repository +* `mongodb::repo::apt`: Manage Debian/Ubuntu apt 10gen/MongoDB repository +* `mongodb::repo::yum`: Manage Redhat/CentOS apt 10gen/MongoDB repository +* `mongodb::server::config`: Configures MongoDB configuration files +* `mongodb::server::install`: Install MongoDB software packages +* `mongodb::server::service`: Manages service +* `mongodb::client::install`: Installs the MongoDB client software package + +####Class: mongodb::globals +*Note:* most server specific defaults should be overridden in the `mongodb::server` +class. This class should only be used if you are using a non-standard OS or +if you are changing elements such as `version` or `manage_package_repo` that +can only be changed here. + +This class allows you to configure the main settings for this module in a +global way, to be used by the other classes and defined resources. On its +own it does nothing. + +#####`server_package_name` +This setting can be used to override the default MongoDB server package +name. If not specified, the module will use whatever package name is the +default for your OS distro. + +#####`service_name` +This setting can be used to override the default MongoDB service name. If not +specified, the module will use whatever service name is the default for your OS distro. + +#####`service_provider` +This setting can be used to override the default MongoDB service provider. If +not specified, the module will use whatever service provider is the default for +your OS distro. + +#####`service_status` +This setting can be used to override the default status check command for +your MongoDB service. If not specified, the module will use whatever service +name is the default for your OS distro. + +#####`user` +This setting can be used to override the default MongoDB user and owner of the +service and related files in the file system. If not specified, the module will +use the default for your OS distro. + +#####`group` +This setting can be used to override the default MongoDB user group to be used +for related files in the file system. If not specified, the module will use +the default for your OS distro. + +#####`bind_ip` +This setting can be used to configure MonogDB process to bind to and listen +for connections from applications on this address. If not specified, the +module will use the default for your OS distro. +*Note:* This value should be passed as an array. + +#####`version` +The version of MonogDB to install/manage. This is a simple way of providing +a specific version such as '2.2' or '2.4' for example. If not specified, +the module will use the default for your OS distro. + +####Class: mongodb::server + +Most of the parameters manipulate the mongod.conf file. + +For more details about configuration parameters consult the +[MongoDB Configuration File Options](http://docs.mongodb.org/manual/reference/configuration-options/). + +#####`ensure` +Used to ensure that the package is installed and the service is running, or that the package is absent/purged and the service is stopped. Valid values are true/false/present/absent/purged. + +#####`config` +Path of the config file. If not specified, the module will use the default +for your OS distro. + +#####`dbpath` +Set this value to designate a directory for the mongod instance to store +it's data. If not specified, the module will use the default for your OS distro. + +#####`pidfilepath` +Specify a file location to hold the PID or process ID of the mongod process. +If not specified, the module will use the default for your OS distro. + +#####`logpath` +Specify the path to a file name for the log file that will hold all diagnostic +logging information. Unless specified, mongod will output all log information +to the standard output. + +#####`bind_ip` +Set this option to configure the mongod or mongos process to bind to and listen +for connections from applications on this address. If not specified, the module +will use the default for your OS distro. Example: bind_ip=['127.0.0.1', '192.168.0.3'] +*Note*: bind_ip accepts an array as a value. + +#####`logappend` +Set to true to add new entries to the end of the logfile rather than overwriting +the content of the log when the process restarts. Default: True + +#####`fork` +Set to true to fork server process at launch time. The default setting depends on +the operating system. + +#####`port` +Specifies a TCP port for the server instance to listen for client connections. +Default: 27017 + +#####`journal` +Set to true to enable operation journaling to ensure write durability and +data consistency. Default: on 64-bit systems true and on 32-bit systems false + +#####`nojournal` +Set nojournal = true to disable durability journaling. By default, mongod +enables journaling in 64-bit versions after v2.0. +Default: on 64-bit systems false and on 32-bit systems true + +*Note*: You must use journal to enable journaling on 32-bit systems. + +#####`smallfiles` +Set to true to modify MongoDB to use a smaller default data file size. +Specifically, smallfiles reduces the initial size for data files and +limits them to 512 megabytes. Default: false + +#####`cpu` +Set to true to force mongod to report every four seconds CPU utilization +and the amount of time that the processor waits for I/O operations to +complete (i.e. I/O wait.) Default: false + +#####`auth` +Set to true to enable database authentication for users connecting from +remote hosts. If no users exist, the localhost interface will continue +to have access to the database until you create the first user. +Default: false + +#####`noauth` +Disable authentication. Currently the default. Exists for future compatibility + and clarity. + +#####`verbose` +Increases the amount of internal reporting returned on standard output or in +the log file generated by `logpath`. Default: false + +#####`verbositylevel` +MongoDB has the following levels of verbosity: v, vv, vvv, vvvv and vvvvv. +Default: None + +#####`objcheck` +Forces the mongod to validate all requests from clients upon receipt to ensure +that clients never insert invalid documents into the database. +Default: on v2.4 default to true and on earlier version to false + +#####`quota` +Set to true to enable a maximum limit for the number of data files each database +can have. The default quota is 8 data files, when quota is true. Default: false + +#####`quotafiles` +Modify limit on the number of data files per database. This option requires the +`quota` setting. Default: 8 + +#####`diaglog` +Creates a very verbose diagnostic log for troubleshooting and recording various +errors. Valid values: 0, 1, 2, 3 and 7. +For more information please refer to [MongoDB Configuration File Options](http://docs.mongodb.org/manual/reference/configuration-options/). + +#####`directoryperdb` +Set to true to modify the storage pattern of the data directory to store each +database’s files in a distinct folder. Default: false + +#####`profile` +Modify this value to changes the level of database profiling, which inserts +information about operation performance into output of mongod or the +log file if specified by `logpath`. + +#####`maxconns` +Specifies a value to set the maximum number of simultaneous connections +that MongoDB will accept. Default: depends on system (i.e. ulimit and file descriptor) +limits. Unless set, MongoDB will not limit its own connections. + +#####`oplog_size` +Specifies a maximum size in megabytes for the replication operation log +(e.g. oplog.) mongod creates an oplog based on the maximum amount of space +available. For 64-bit systems, the oplog is typically 5% of available disk space. + +#####`nohints` +Ignore query hints. Default: None + +#####`nohttpinterface` +Set to true to disable the HTTP interface. This command will override the rest +and disable the HTTP interface if you specify both. Default: false + +#####`noscripting` +Set noscripting = true to disable the scripting engine. Default: false + +#####`notablescan` +Set notablescan = true to forbid operations that require a table scan. Default: false + +#####`noprealloc` +Set noprealloc = true to disable the preallocation of data files. This will shorten +the start up time in some cases, but can cause significant performance penalties +during normal operations. Default: false + +#####`nssize` +Use this setting to control the default size for all newly created namespace +files (i.e .ns). Default: 16 + +#####`mms_token` +MMS token for mms monitoring. Default: None + +#####`mms_name` +MMS identifier for mms monitoring. Default: None + +#####`mms_interval` +MMS interval for mms monitoring. Default: None + +#####`replset` +Use this setting to configure replication with replica sets. Specify a replica +set name as an argument to this set. All hosts must have the same set name. + +#####`rest` +Set to true to enable a simple REST interface. Default: false + +#####`slowms` +Sets the threshold for mongod to consider a query “slow” for the database profiler. +Default: 100 ms + +#####`keyfile` +Specify the path to a key file to store authentication information. This option +is only useful for the connection between replica set members. Default: None + +#####`master` +Set to true to configure the current instance to act as master instance in a +replication configuration. Default: False *Note*: deprecated – use replica sets + +#####`set_parameter` +Specify extra configuration file parameters (i.e. +textSearchEnabled=true). Default: None + +#####`syslog` +Sends all logging output to the host’s syslog system rather than to standard +output or a log file. Default: None +*Important*: You cannot use syslog with logpath. + +#####`slave` +Set to true to configure the current instance to act as slave instance in a +replication configuration. Default: false +*Note*: deprecated – use replica sets + +#####`only` +Used with the slave option, only specifies only a single database to +replicate. Default: <> +*Note*: deprecated – use replica sets + +#####`source` +Used with the slave setting to specify the master instance from which +this slave instance will replicate. Default: <> +*Note*: deprecated – use replica sets + +### Definitions + +#### Definition: mongodb:db + +Creates database with user. Resource title used as database name. + +#####`user` +Name of the user for database + +#####`password_hash` +Hex encoded md5 hash of "$username:mongo:$password". +For more information please refer to [MongoDB Authentication Process](http://docs.mongodb.org/meta-driver/latest/legacy/implement-authentication-in-driver/#authentication-process). + +#####`password` +Plain-text user password (will be hashed) + +#####`roles` +Array with user roles. Default: ['dbAdmin'] + +### Providers + +#### Provider: mongodb_database +'mongodb_database' can be used to create and manage databases within MongoDB. + +```puppet +mongodb_database { testdb: + ensure => present, + tries => 10, + require => Class['mongodb::server'], +} +``` +#####`tries` +The maximum amount of two second tries to wait MongoDB startup. Default: 10 + + +#### Provider: mongodb_user +'mongodb_user' can be used to create and manage users within MongoDB database. + +```puppet +mongodb_user { testuser: + ensure => present, + password_hash => mongodb_password('testuser', 'p@ssw0rd'), + database => testdb, + roles => ['readWrite', 'dbAdmin'], + tries => 10, + require => Class['mongodb::server'], +} +``` +#####`password_hash` +Hex encoded md5 hash of "$username:mongo:$password". + +#####`database` +Name of database. It will be created, if not exists. + +#####`roles` +Array with user roles. Default: ['dbAdmin'] + +#####`tries` +The maximum amount of two second tries to wait MongoDB startup. Default: 10 + +#### Provider: mongodb_replset +'mongodb_replset' can be used to create and manage MongoDB replicasets. + +```puppet +mongodb_replset { rsmain: + ensure => present, + members => ['host1:27017', 'host2:27017', 'host3:27017'] +} +``` + +Ideally the ```mongodb_replset``` resource will be declared on the initial +desired primary node (arbitrarily the first of the list) and this node will be +processed once the secondary nodes are up. This will ensure all the nodes are +in the first configuration of the replicaset, else it will require running +puppet again to add them. + +#####`members` +Array of 'host:port' of the replicaset members. + +It currently only adds members without options. + +## Limitation + +This module has been tested on: + +* Debian 7.* (Wheezy) +* Debian 6.* (squeeze) +* Ubuntu 12.04.2 (precise) +* Ubuntu 10.04.4 LTS (lucid) +* RHEL 5/6 +* CentOS 5/6 + +For a full list of tested operating systems please have a look at the [.nodeset.xml](https://github.com/puppetlabs/puppetlabs-mongodb/blob/master/.nodeset.yml) definition. + +This module should support `service_ensure` separate from the `ensure` value on `Class[mongodb::server]` but it does not yet. + +## Development + +Puppet Labs modules on the Puppet Forge are open projects, and community +contributions are essential for keeping them great. We can’t access the +huge number of platforms and myriad of hardware, software, and deployment +configurations that Puppet is intended to serve. + +We want to keep it as easy as possible to contribute changes so that our +modules work in your environment. There are a few guidelines that we need +contributors to follow so that we can have a chance of keeping on top of things. + +You can read the complete module contribution guide [on the Puppet Labs wiki.](http://projects.puppetlabs.com/projects/module-site/wiki/Module_contributing) + +### Testing + +There are two types of tests distributed with this module. Unit tests with +rspec-puppet and system tests using rspec-system. + + +unit tests should be run under Bundler with the gem versions as specified +in the Gemfile. To install the necessary gems: + + bundle install --path=vendor + +Test setup and teardown is handled with rake tasks, so the +supported way of running tests is with + + bundle exec rake spec + + +For system test you will also need to install vagrant > 1.3.x and virtualbox > 4.2.10. +To run the system tests + + bundle exec rake spec:system + +To run the tests on different operating systems, see the sets available in [.nodeset.xml](https://github.com/puppetlabs/puppetlabs-mongodb/blob/master/.nodeset.yml) +and run the specific set with the following syntax: + + RSPEC_SET=ubuntu-server-12042-x64 bundle exec rake spec:system + +### Authors + +We would like to thank everyone who has contributed issues and pull requests to this module. +A complete list of contributors can be found on the +[GitHub Contributor Graph](https://github.com/puppetlabs/puppetlabs-mongodb/graphs/contributors) +for the [puppetlabs-mongodb module](https://github.com/puppetlabs/puppetlabs-mongodb). diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mongodb/Rakefile b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mongodb/Rakefile new file mode 100644 index 00000000000..cd3d3799589 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mongodb/Rakefile @@ -0,0 +1 @@ +require 'puppetlabs_spec_helper/rake_tasks' diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mongodb/lib/puppet/parser/functions/mongodb_password.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mongodb/lib/puppet/parser/functions/mongodb_password.rb new file mode 100644 index 00000000000..e61bcb9dae9 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mongodb/lib/puppet/parser/functions/mongodb_password.rb @@ -0,0 +1,14 @@ +require 'digest/md5' + +module Puppet::Parser::Functions + newfunction(:mongodb_password, :type => :rvalue, :doc => <<-EOS + Returns the mongodb password hash from the clear text password. + EOS + ) do |args| + + raise(Puppet::ParseError, 'mongodb_password(): Wrong number of arguments ' + + "given (#{args.size} for 2)") if args.size != 2 + + Digest::MD5.hexdigest("#{args[0]}:mongo:#{args[1]}") + end +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mongodb/lib/puppet/provider/mongodb_database/mongodb.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mongodb/lib/puppet/provider/mongodb_database/mongodb.rb new file mode 100644 index 00000000000..0acc76996ce --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mongodb/lib/puppet/provider/mongodb_database/mongodb.rb @@ -0,0 +1,36 @@ +Puppet::Type.type(:mongodb_database).provide(:mongodb) do + + desc "Manages MongoDB database." + + defaultfor :kernel => 'Linux' + + commands :mongo => 'mongo' + + def block_until_mongodb(tries = 10) + begin + mongo('--quiet', '--eval', 'db.getMongo()') + rescue => e + debug('MongoDB server not ready, retrying') + sleep 2 + if (tries -= 1) > 0 + retry + else + raise e + end + end + end + + def create + mongo(@resource[:name], '--quiet', '--eval', "db.dummyData.insert({\"created_by_puppet\": 1})") + end + + def destroy + mongo(@resource[:name], '--quiet', '--eval', 'db.dropDatabase()') + end + + def exists? + block_until_mongodb(@resource[:tries]) + mongo("--quiet", "--eval", 'db.getMongo().getDBNames()').split(",").include?(@resource[:name]) + end + +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mongodb/lib/puppet/provider/mongodb_replset/mongo.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mongodb/lib/puppet/provider/mongodb_replset/mongo.rb new file mode 100644 index 00000000000..d77afe3036e --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mongodb/lib/puppet/provider/mongodb_replset/mongo.rb @@ -0,0 +1,232 @@ +# +# Author: François Charlier +# + +Puppet::Type.type(:mongodb_replset).provide(:mongo) do + + desc "Manage hosts members for a replicaset." + + confine :true => + begin + require 'json' + true + rescue LoadError + false + end + + commands :mongo => 'mongo' + + mk_resource_methods + + def initialize(resource={}) + super(resource) + @property_flush = {} + end + + def members=(hosts) + @property_flush[:members] = hosts + end + + def self.instances + instance = get_replset_properties + if instance + # There can only be one replset per node + [new(instance)] + else + [] + end + end + + def self.prefetch(resources) + instances.each do |prov| + if resource = resources[prov.name] + resource.provider = prov + end + end + end + + def exists? + @property_hash[:ensure] == :present + end + + def create + @property_flush[:ensure] = :present + @property_flush[:members] = resource.should(:members) + end + + def destroy + @property_flush[:ensure] = :absent + end + + def flush + set_members + @property_hash = self.class.get_replset_properties + end + + private + + def db_ismaster(host) + mongo_command("db.isMaster()", host) + end + + def rs_initiate(conf, master) + return mongo_command("rs.initiate(#{conf})", master) + end + + def rs_status(host) + mongo_command("rs.status()", host) + end + + def rs_add(host, master) + mongo_command("rs.add(\"#{host}\")", master) + end + + def rs_remove(host, master) + mongo_command("rs.remove(\"#{host}\")", master) + end + + def master_host(hosts) + hosts.each do |host| + status = db_ismaster(host) + if status.has_key?('primary') + return status['primary'] + end + end + false + end + + def self.get_replset_properties + output = mongo_command('rs.conf()') + if output['members'] + members = output['members'].collect do |val| + val['host'] + end + props = { + :name => output['_id'], + :ensure => :present, + :members => members, + :provider => :mongo, + } + else + props = nil + end + Puppet.debug("MongoDB replset properties: #{props.inspect}") + props + end + + def alive_members(hosts) + hosts.select do |host| + begin + Puppet.debug "Checking replicaset member #{host} ..." + status = rs_status(host) + if status.has_key?('errmsg') and status['errmsg'] == 'not running with --replSet' + raise Puppet::Error, "Can't configure replicaset #{self.name}, host #{host} is not supposed to be part of a replicaset." + end + if status.has_key?('set') + if status['set'] != self.name + raise Puppet::Error, "Can't configure replicaset #{self.name}, host #{host} is already part of another replicaset." + end + + # This node is alive and supposed to be a member of our set + Puppet.debug "Host #{self.name} is available for replset #{status['set']}" + true + elsif status.has_key?('info') + Puppet.debug "Host #{self.name} is alive but unconfigured: #{status['info']}" + true + end + rescue Puppet::ExecutionFailure + Puppet.warning "Can't connect to replicaset member #{host}." + + false + end + end + end + + def set_members + if @property_flush[:ensure] == :absent + # TODO: I don't know how to remove a node from a replset; unimplemented + #Puppet.debug "Removing all members from replset #{self.name}" + #@property_hash[:members].collect do |member| + # rs_remove(member, master_host(@property_hash[:members])) + #end + return + end + + if ! @property_flush[:members].empty? + # Find the alive members so we don't try to add dead members to the replset + alive_hosts = alive_members(@property_flush[:members]) + dead_hosts = @property_flush[:members] - alive_hosts + raise Puppet::Error, "Can't connect to any member of replicaset #{self.name}." if alive_hosts.empty? + Puppet.debug "Alive members: #{alive_hosts.inspect}" + Puppet.debug "Dead members: #{dead_hosts.inspect}" unless dead_hosts.empty? + else + alive_hosts = [] + end + + if @property_flush[:ensure] == :present and @property_hash[:ensure] != :present + Puppet.debug "Initializing the replset #{self.name}" + + # Create a replset configuration + hostconf = alive_hosts.each_with_index.map do |host,id| + "{ _id: #{id}, host: \"#{host}\" }" + end.join(',') + conf = "{ _id: \"#{self.name}\", members: [ #{hostconf} ] }" + + # Set replset members with the first host as the master + output = rs_initiate(conf, alive_hosts[0]) + if output['ok'] == 0 + raise Puppet::Error, "rs.initiate() failed for replicaset #{self.name}: #{output['errmsg']}" + end + else + # Add members to an existing replset + if master = master_host(alive_hosts) + current_hosts = db_ismaster(master)['hosts'] + newhosts = alive_hosts - current_hosts + newhosts.each do |host| + output = rs_add(host, master) + if output['ok'] == 0 + raise Puppet::Error, "rs.add() failed to add host to replicaset #{self.name}: #{output['errmsg']}" + end + end + else + raise Puppet::Error, "Can't find master host for replicaset #{self.name}." + end + end + end + + def mongo_command(command, host, retries=4) + self.class.mongo_command(command,host,retries) + end + + def self.mongo_command(command, host=nil, retries=4) + # Allow waiting for mongod to become ready + # Wait for 2 seconds initially and double the delay at each retry + wait = 2 + begin + args = Array.new + args << '--quiet' + args << ['--host',host] if host + args << ['--eval',"printjson(#{command})"] + output = mongo(args.flatten) + rescue Puppet::ExecutionFailure => e + if e =~ /Error: couldn't connect to server/ and wait <= 2**max_wait + info("Waiting #{wait} seconds for mongod to become available") + sleep wait + wait *= 2 + retry + else + raise + end + end + + # Dirty hack to remove JavaScript objects + output.gsub!(/ISODate\((.+?)\)/, '\1 ') + output.gsub!(/Timestamp\((.+?)\)/, '[\1]') + + #Hack to avoid non-json empty sets + output = "{}" if output == "null\n" + + JSON.parse(output) + end + +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mongodb/lib/puppet/provider/mongodb_user/mongodb.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mongodb/lib/puppet/provider/mongodb_user/mongodb.rb new file mode 100644 index 00000000000..10e0bf7f07a --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mongodb/lib/puppet/provider/mongodb_user/mongodb.rb @@ -0,0 +1,48 @@ +Puppet::Type.type(:mongodb_user).provide(:mongodb) do + + desc "Manage users for a MongoDB database." + + defaultfor :kernel => 'Linux' + + commands :mongo => 'mongo' + + def block_until_mongodb(tries = 10) + begin + mongo('--quiet', '--eval', 'db.getMongo()') + rescue + debug('MongoDB server not ready, retrying') + sleep 2 + retry unless (tries -= 1) <= 0 + end + end + + def create + mongo(@resource[:database], '--eval', "db.system.users.insert({user:\"#{@resource[:name]}\", pwd:\"#{@resource[:password_hash]}\", roles: #{@resource[:roles].inspect}})") + end + + def destroy + mongo(@resource[:database], '--quiet', '--eval', "db.removeUser(\"#{@resource[:name]}\")") + end + + def exists? + block_until_mongodb(@resource[:tries]) + mongo(@resource[:database], '--quiet', '--eval', "db.system.users.find({user:\"#{@resource[:name]}\"}).count()").strip.eql?('1') + end + + def password_hash + mongo(@resource[:database], '--quiet', '--eval', "db.system.users.findOne({user:\"#{@resource[:name]}\"})[\"pwd\"]").strip + end + + def password_hash=(value) + mongo(@resource[:database], '--quiet', '--eval', "db.system.users.update({user:\"#{@resource[:name]}\"}, { $set: {pwd:\"#{value}\"}})") + end + + def roles + mongo(@resource[:database], '--quiet', '--eval', "db.system.users.findOne({user:\"#{@resource[:name]}\"})[\"roles\"]").strip.split(",").sort + end + + def roles=(value) + mongo(@resource[:database], '--quiet', '--eval', "db.system.users.update({user:\"#{@resource[:name]}\"}, { $set: {roles: #{@resource[:roles].inspect}}})") + end + +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mongodb/lib/puppet/type/mongodb_database.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mongodb/lib/puppet/type/mongodb_database.rb new file mode 100644 index 00000000000..45c0f8fa238 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mongodb/lib/puppet/type/mongodb_database.rb @@ -0,0 +1,27 @@ +Puppet::Type.newtype(:mongodb_database) do + @doc = "Manage MongoDB databases." + + ensurable + + newparam(:name, :namevar=>true) do + desc "The name of the database." + newvalues(/^\w+$/) + end + + newparam(:tries) do + desc "The maximum amount of two second tries to wait MongoDB startup." + defaultto 10 + newvalues(/^\d+$/) + munge do |value| + Integer(value) + end + end + + autorequire(:package) do + 'mongodb' + end + + autorequire(:service) do + 'mongodb' + end +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mongodb/lib/puppet/type/mongodb_replset.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mongodb/lib/puppet/type/mongodb_replset.rb new file mode 100644 index 00000000000..8115ef034e8 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mongodb/lib/puppet/type/mongodb_replset.rb @@ -0,0 +1,35 @@ +# +# Author: François Charlier +# + +Puppet::Type.newtype(:mongodb_replset) do + @doc = "Manage a MongoDB replicaSet" + + ensurable do + defaultto :present + + newvalue(:present) do + provider.create + end + end + + newparam(:name) do + desc "The name of the replicaSet" + end + + newproperty(:members, :array_matching => :all) do + desc "The replicaSet members" + + def insync?(is) + is.sort == should.sort + end + end + + autorequire(:package) do + 'mongodb' + end + + autorequire(:service) do + 'mongodb' + end +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mongodb/lib/puppet/type/mongodb_user.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mongodb/lib/puppet/type/mongodb_user.rb new file mode 100644 index 00000000000..7f7e97b8430 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mongodb/lib/puppet/type/mongodb_user.rb @@ -0,0 +1,63 @@ +Puppet::Type.newtype(:mongodb_user) do + @doc = 'Manage a MongoDB user. This includes management of users password as well as privileges.' + + ensurable + + def initialize(*args) + super + # Sort roles array before comparison. + self[:roles] = Array(self[:roles]).sort! + end + + newparam(:name, :namevar=>true) do + desc "The name of the user." + end + + newparam(:database) do + desc "The user's target database." + defaultto do + fail("Parameter 'database' must be set") + end + newvalues(/^\w+$/) + end + + newparam(:tries) do + desc "The maximum amount of two second tries to wait MongoDB startup." + defaultto 10 + newvalues(/^\d+$/) + munge do |value| + Integer(value) + end + end + + newproperty(:roles, :array_matching => :all) do + desc "The user's roles." + defaultto ['dbAdmin'] + newvalue(/^\w+$/) + + # Pretty output for arrays. + def should_to_s(value) + value.inspect + end + + def is_to_s(value) + value.inspect + end + end + + newproperty(:password_hash) do + desc "The password hash of the user. Use mongodb_password() for creating hash." + defaultto do + fail("Property 'password_hash' must be set. Use mongodb_password() for creating hash.") + end + newvalue(/^\w+$/) + end + + autorequire(:package) do + 'mongodb' + end + + autorequire(:service) do + 'mongodb' + end +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mongodb/manifests/client.pp b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mongodb/manifests/client.pp new file mode 100644 index 00000000000..de1b339c7d1 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mongodb/manifests/client.pp @@ -0,0 +1,26 @@ +# Class for installing a MongoDB client shell (CLI). +# +# == Parameters +# +# [ensure] Desired ensure state of the package. Optional. +# Defaults to 'true' +# +# [package_name] Name of the package to install the client from. Default +# is repository dependent. +# +class mongodb::client ( + $ensure = $mongodb::params::ensure_client, + $package_name = $mongodb::params::client_package_name, +) inherits mongodb::params { + case $::osfamily { + 'RedHat', 'Linux': { + class { 'mongodb::client::install': } + } + 'Debian': { + warning ('Debian client is included by default with server. Please use ::mongodb::server to install the mongo client for Debian family systems.') + } + default: { + # no action taken, failure happens in params.pp + } + } +} diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mongodb/manifests/client/install.pp b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mongodb/manifests/client/install.pp new file mode 100644 index 00000000000..6da26003baf --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mongodb/manifests/client/install.pp @@ -0,0 +1,26 @@ +# PRIVATE CLASS: do not call directly +class mongodb::client::install { + $package_ensure = $mongodb::client::ensure + $package_name = $mongodb::client::package_name + + case $package_ensure { + true: { + $my_package_ensure = 'present' + } + false: { + $my_package_ensure = 'purged' + } + 'absent': { + $my_package_ensure = 'purged' + } + default: { + $my_package_ensure = $package_ensure + } + } + + package { 'mongodb_client': + ensure => $my_package_ensure, + name => $package_name, + tag => 'mongodb', + } +} diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mongodb/manifests/db.pp b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mongodb/manifests/db.pp new file mode 100644 index 00000000000..708f5d75e7b --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mongodb/manifests/db.pp @@ -0,0 +1,43 @@ +# == Class: mongodb::db +# +# Class for creating mongodb databases and users. +# +# == Parameters +# +# user - Database username. +# password_hash - Hashed password. Hex encoded md5 hash of "$username:mongo:$password". +# password - Plain text user password. This is UNSAFE, use 'password_hash' unstead. +# roles (default: ['dbAdmin']) - array with user roles. +# tries (default: 10) - The maximum amount of two second tries to wait MongoDB startup. +# +define mongodb::db ( + $user, + $password_hash = false, + $password = false, + $roles = ['dbAdmin'], + $tries = 10, +) { + + mongodb_database { $name: + ensure => present, + tries => $tries, + require => Class['mongodb::server'], + } + + if $password_hash { + $hash = $password_hash + } elsif $password { + $hash = mongodb_password($user, $password) + } else { + fail("Parameter 'password_hash' or 'password' should be provided to mongodb::db.") + } + + mongodb_user { $user: + ensure => present, + password_hash => $hash, + database => $name, + roles => $roles, + require => Mongodb_database[$name], + } + +} diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mongodb/manifests/globals.pp b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mongodb/manifests/globals.pp new file mode 100644 index 00000000000..fb04df694de --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mongodb/manifests/globals.pp @@ -0,0 +1,27 @@ +# Class for setting cross-class global overrides. See README.md for more +# details. + +class mongodb::globals ( + $server_package_name = undef, + $client_package_name = undef, + + $service_name = undef, + $service_provider = undef, + $service_status = undef, + + $user = undef, + $group = undef, + $bind_ip = undef, + + $version = undef, + + $manage_package_repo = undef, +) { + + # Setup of the repo only makes sense globally, so we are doing it here. + if($manage_package_repo) { + class { '::mongodb::repo': + ensure => present, + } + } +} diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mongodb/manifests/init.pp b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mongodb/manifests/init.pp new file mode 100644 index 00000000000..d489731b0d8 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mongodb/manifests/init.pp @@ -0,0 +1,136 @@ +# == Class: mongodb +# +# Direct use of this class is deprecated. Please use mongodb::server +# +# Manage mongodb installations on RHEL, CentOS, Debian and Ubuntu - either +# installing from the 10Gen repo or from EPEL in the case of EL systems. +# +# === Parameters +# +# enable_10gen (default: false) - Whether or not to set up 10gen software repositories +# init (auto discovered) - override init (sysv or upstart) for Debian derivatives +# location - override apt location configuration for Debian derivatives +# packagename (auto discovered) - override the package name +# servicename (auto discovered) - override the service name +# service-enable (default: true) - Enable the service and ensure it is running +# +# === Examples +# +# To install with defaults from the distribution packages on any system: +# include mongodb +# +# To install from 10gen on a EL server +# class { 'mongodb': +# enable_10gen => true, +# } +# +# === Authors +# +# Craig Dunn +# +# === Copyright +# +# Copyright 2013 PuppetLabs +# + +class mongodb ( + # Deprecated parameters + $enable_10gen = undef, + + $init = $mongodb::params::service_provider, + $location = '', + $packagename = undef, + $version = undef, + $servicename = $mongodb::params::service_name, + $service_enable = true, #deprecated + $logpath = $mongodb::params::logpath, + $logappend = true, + $fork = $mongodb::params::fork, + $port = 27017, + $dbpath = $mongodb::params::dbpath, + $journal = undef, + $nojournal = undef, + $smallfiles = undef, + $cpu = undef, + $noauth = undef, + $auth = undef, + $verbose = undef, + $objcheck = undef, + $quota = undef, + $oplog = undef, #deprecated it's on if replica set + $oplog_size = undef, + $nohints = undef, + $nohttpinterface = undef, + $noscripting = undef, + $notablescan = undef, + $noprealloc = undef, + $nssize = undef, + $mms_token = undef, + $mms_name = undef, + $mms_interval = undef, + $slave = undef, + $only = undef, + $master = undef, + $source = undef, + $replset = undef, + $rest = undef, + $slowms = undef, + $keyfile = undef, + $bind_ip = undef, + $pidfilepath = undef +) inherits mongodb::params { + + if $enable_10gen { + fail("Parameter enable_10gen is no longer supported. Please use class { 'mongodb::globals': manage_package_repo => true }") + } + + if $version { + fail("Parameter version is no longer supported. Please use class { 'mongodb::globals': version => VERSION }") + } + + if $oplog { + fail('Parameter is no longer supported. On replica set Oplog is enabled by default.') + } + + notify { 'An attempt has been made below to automatically apply your custom + settings to mongodb::server. Please verify this works in a safe test + environment.': } + + class { 'mongodb::server': + package_name => $packagename, + logpath => $logpath, + logappend => $logappend, + fork => $fork, + port => $port, + dbpath => $dbpath, + journal => $journal, + nojournal => $nojournal, + smallfiles => $smallfiles, + cpu => $cpu, + noauth => $noauth, + verbose => $verbose, + objcheck => $objcheck, + quota => $quota, + oplog_size => $oplog_size, + nohints => $nohints, + nohttpinterface => $nohttpinterface, + noscripting => $noscripting, + notablescan => $notablescan, + noprealloc => $noprealloc, + nssize => $nssize, + mms_token => $mms_token, + mms_name => $mms_name, + mms_interval => $mms_interval, + slave => $slave, + only => $only, + master => $master, + source => $source, + replset => $replset, + rest => $rest, + slowms => $slowms, + keyfile => $keyfile, + bind_ip => $bind_ip, + pidfilepath => $pidfilepath, + } + +} diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mongodb/manifests/params.pp b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mongodb/manifests/params.pp new file mode 100644 index 00000000000..5afc4845e35 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mongodb/manifests/params.pp @@ -0,0 +1,93 @@ +# PRIVATE CLASS: do not use directly +class mongodb::params inherits mongodb::globals { + $ensure = true + $service_status = $service_status + $ensure_client = true + + # Amazon Linux's OS Family is 'Linux', operating system 'Amazon'. + case $::osfamily { + 'RedHat', 'Linux': { + + if $mongodb::globals::manage_package_repo { + $user = pick($user, 'mongod') + $group = pick($group, 'mongod') + if $::mongodb::globals::version { + $server_package_name = "mongodb-org-server-${::mongodb::globals::version}" + $client_package_name = "mongodb-org-${::mongodb::globals::version}" + } else { + $server_package_name = 'mongodb-org-server' + $client_package_name = 'mongodb-org' + } + $service_name = pick($service_name, 'mongod') + $config = '/etc/mongod.conf' + $dbpath = '/var/lib/mongo' + $logpath = '/var/log/mongodb/mongod.log' + $pidfilepath = '/var/run/mongodb/mongod.pid' + $bind_ip = pick($bind_ip, ['127.0.0.1']) + $fork = true + } else { + # RedHat/CentOS doesn't come with a prepacked mongodb + # so we assume that you are using EPEL repository. + $user = pick($user, 'mongodb') + $group = pick($group, 'mongodb') + $server_package_name = pick($server_package_name, 'mongodb-server') + $client_package_name = pick($client_package_name, 'mongodb') + + $service_name = pick($service_name, 'mongod') + $config = '/etc/mongodb.conf' + $dbpath = '/var/lib/mongodb' + $logpath = '/var/log/mongodb/mongodb.log' + $bind_ip = pick($bind_ip, ['127.0.0.1']) + $pidfilepath = '/var/run/mongodb/mongodb.pid' + $fork = true + $journal = true + } + } + 'Debian': { + if $mongodb::globals::manage_package_repo { + $user = pick($user, 'mongodb') + $group = pick($group, 'mongodb') + if $::mongodb::globals::version { + $server_package_name = "mongodb-10gen=${::mongodb::globals::version}" + } else { + $server_package_name = 'mongodb-10gen' + } + $service_name = 'mongodb' + $config = '/etc/mongodb.conf' + $dbpath = '/var/lib/mongodb' + $logpath = '/var/log/mongodb/mongodb.log' + $bind_ip = ['127.0.0.1'] + } else { + # although we are living in a free world, + # I would not recommend to use the prepacked + # mongodb server on Ubuntu 12.04 or Debian 6/7, + # because its really outdated + $user = pick($user, 'mongodb') + $group = pick($group, 'mongodb') + $server_package_name = pick($server_package_name, 'mongodb-server') + $client_package_name = pick($client_package_name, 'mongodb') + $service_name = pick($service_name, 'mongodb') + $config = '/etc/mongodb.conf' + $dbpath = '/var/lib/mongodb' + $logpath = '/var/log/mongodb/mongodb.log' + $bind_ip = pick($bind_ip, ['127.0.0.1']) + $pidfilepath = undef + } + # avoid using fork because of the init scripts design + $fork = undef + } + default: { + fail("Osfamily ${::osfamily} and ${::operatingsystem} is not supported") + } + } + + case $::operatingsystem { + 'Ubuntu': { + $service_provider = pick($service_provider, 'upstart') + } + default: { + $service_provider = undef + } + } + +} diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mongodb/manifests/replset.pp b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mongodb/manifests/replset.pp new file mode 100644 index 00000000000..ce4a0255579 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mongodb/manifests/replset.pp @@ -0,0 +1,10 @@ +# Wrapper class useful for hiera based deployments + +class mongodb::replset( + $sets = undef +) { + + if $sets { + create_resources(mongodb_replset, $sets) + } +} diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mongodb/manifests/repo.pp b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mongodb/manifests/repo.pp new file mode 100644 index 00000000000..ecd6de1b71c --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mongodb/manifests/repo.pp @@ -0,0 +1,31 @@ +# PRIVATE CLASS: do not use directly +class mongodb::repo ( + $ensure = $mongodb::params::ensure, +) inherits mongodb::params { + case $::osfamily { + 'RedHat', 'Linux': { + $location = $::architecture ? { + 'x86_64' => 'http://downloads-distro.mongodb.org/repo/redhat/os/x86_64/', + 'i686' => 'http://downloads-distro.mongodb.org/repo/redhat/os/i686/', + 'i386' => 'http://downloads-distro.mongodb.org/repo/redhat/os/i686/', + default => undef + } + class { 'mongodb::repo::yum': } + } + + 'Debian': { + $location = $::operatingsystem ? { + 'Debian' => 'http://downloads-distro.mongodb.org/repo/debian-sysvinit', + 'Ubuntu' => 'http://downloads-distro.mongodb.org/repo/ubuntu-upstart', + default => undef + } + class { 'mongodb::repo::apt': } + } + + default: { + if($ensure == 'present' or $ensure == true) { + fail("Unsupported managed repository for osfamily: ${::osfamily}, operatingsystem: ${::operatingsystem}, module ${module_name} currently only supports managing repos for osfamily RedHat, Debian and Ubuntu") + } + } + } +} diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mongodb/manifests/repo/apt.pp b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mongodb/manifests/repo/apt.pp new file mode 100644 index 00000000000..e8f4b812f91 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mongodb/manifests/repo/apt.pp @@ -0,0 +1,25 @@ +# PRIVATE CLASS: do not use directly +class mongodb::repo::apt inherits mongodb::repo { + # we try to follow/reproduce the instruction + # from http://docs.mongodb.org/manual/tutorial/install-mongodb-on-ubuntu/ + + include ::apt + + if($::mongodb::repo::ensure == 'present' or $::mongodb::repo::ensure == true) { + apt::source { 'downloads-distro.mongodb.org': + location => $::mongodb::repo::location, + release => 'dist', + repos => '10gen', + key => '9ECBEC467F0CEB10', + key_server => 'keyserver.ubuntu.com', + include_src => false, + } + + Apt::Source['downloads-distro.mongodb.org']->Package<|tag == 'mongodb'|> + } + else { + apt::source { 'downloads-distro.mongodb.org': + ensure => absent, + } + } +} diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mongodb/manifests/repo/yum.pp b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mongodb/manifests/repo/yum.pp new file mode 100644 index 00000000000..3a3f6b5d849 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mongodb/manifests/repo/yum.pp @@ -0,0 +1,20 @@ +# PRIVATE CLASS: do not use directly +class mongodb::repo::yum inherits mongodb::repo { + # We try to follow/reproduce the instruction + # http://docs.mongodb.org/manual/tutorial/install-mongodb-on-red-hat-centos-or-fedora-linux/ + + if($::mongodb::repo::ensure == 'present' or $::mongodb::repo::ensure == true) { + yumrepo { 'mongodb': + descr => 'MongoDB/10gen Repository', + baseurl => $::mongodb::repo::location, + gpgcheck => '0', + enabled => '1', + } + Yumrepo['mongodb'] -> Package<|tag == 'mongodb'|> + } + else { + yumrepo { 'mongodb': + enabled => absent, + } + } +} diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mongodb/manifests/server.pp b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mongodb/manifests/server.pp new file mode 100644 index 00000000000..04c576a1398 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mongodb/manifests/server.pp @@ -0,0 +1,77 @@ +# This installs a MongoDB server. See README.md for more details. +class mongodb::server ( + $ensure = $mongodb::params::ensure, + + $user = $mongodb::params::user, + $group = $mongodb::params::group, + + $config = $mongodb::params::config, + $dbpath = $mongodb::params::dbpath, + $pidfilepath = $mongodb::params::pidfilepath, + + $service_provider = $mongodb::params::service_provider, + $service_name = $mongodb::params::service_name, + $service_status = $mongodb::params::service_status, + + $package_ensure = $ensure, + $package_name = $mongodb::params::server_package_name, + + $logpath = $mongodb::params::logpath, + $bind_ip = $mongodb::params::bind_ip, + $logappend = true, + $fork = $mongodb::params::fork, + $port = 27017, + $journal = $mongodb::params::journal, + $nojournal = undef, + $smallfiles = undef, + $cpu = undef, + $auth = false, + $noauth = undef, + $verbose = undef, + $verbositylevel = undef, + $objcheck = undef, + $quota = undef, + $quotafiles = undef, + $diaglog = undef, + $directoryperdb = undef, + $profile = undef, + $maxconns = undef, + $oplog_size = undef, + $nohints = undef, + $nohttpinterface = undef, + $noscripting = undef, + $notablescan = undef, + $noprealloc = undef, + $nssize = undef, + $mms_token = undef, + $mms_name = undef, + $mms_interval = undef, + $replset = undef, + $rest = undef, + $slowms = undef, + $keyfile = undef, + $set_parameter = undef, + $syslog = undef, + + # Deprecated parameters + $master = undef, + $slave = undef, + $only = undef, + $source = undef, +) inherits mongodb::params { + + + if ($ensure == 'present' or $ensure == true) { + anchor { 'mongodb::server::start': }-> + class { 'mongodb::server::install': }-> + class { 'mongodb::server::config': }-> + class { 'mongodb::server::service': }-> + anchor { 'mongodb::server::end': } + } else { + anchor { 'mongodb::server::start': }-> + class { 'mongodb::server::service': }-> + class { 'mongodb::server::config': }-> + class { 'mongodb::server::install': }-> + anchor { 'mongodb::server::end': } + } +} diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mongodb/manifests/server/config.pp b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mongodb/manifests/server/config.pp new file mode 100644 index 00000000000..2056c14d546 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mongodb/manifests/server/config.pp @@ -0,0 +1,92 @@ +# PRIVATE CLASS: do not call directly +class mongodb::server::config { + $ensure = $mongodb::server::ensure + $user = $mongodb::server::user + $group = $mongodb::server::group + $config = $mongodb::server::config + + $dbpath = $mongodb::server::dbpath + $pidfilepath = $mongodb::server::pidfilepath + $logpath = $mongodb::server::logpath + $logappend = $mongodb::server::logappend + $fork = $mongodb::server::fork + $port = $mongodb::server::port + $journal = $mongodb::server::journal + $nojournal = $mongodb::server::nojournal + $smallfiles = $mongodb::server::smallfiles + $cpu = $mongodb::server::cpu + $auth = $mongodb::server::auth + $noath = $mongodb::server::noauth + $verbose = $mongodb::server::verbose + $verbositylevel = $mongodb::server::verbositylevel + $objcheck = $mongodb::server::objcheck + $quota = $mongodb::server::quota + $quotafiles = $mongodb::server::quotafiles + $diaglog = $mongodb::server::diaglog + $oplog_size = $mongodb::server::oplog_size + $nohints = $mongodb::server::nohints + $nohttpinterface = $mongodb::server::nohttpinterface + $noscripting = $mongodb::server::noscripting + $notablescan = $mongodb::server::notablescan + $noprealloc = $mongodb::server::noprealloc + $nssize = $mongodb::server::nssize + $mms_token = $mongodb::server::mms_token + $mms_name = $mongodb::server::mms_name + $mms_interval = $mongodb::server::mms_interval + $master = $mongodb::server::master + $slave = $mongodb::server::slave + $only = $mongodb::server::only + $source = $mongodb::server::source + $replset = $mongodb::server::replset + $rest = $mongodb::server::rest + $slowms = $mongodb::server::slowms + $keyfile = $mongodb::server::keyfile + $bind_ip = $mongodb::server::bind_ip + $directoryperdb = $mongodb::server::directoryperdb + $profile = $mongodb::server::profile + $set_parameter = $mongodb::server::set_parameter + $syslog = $mongodb::server::syslog + + File { + owner => $user, + group => $group, + } + + if ($logpath and $syslog) { fail('You cannot use syslog with logpath')} + + if ($ensure == 'present' or $ensure == true) { + + # Exists for future compatibility and clarity. + if $auth { + $noauth = false + } + else { + $noauth = true + } + + file { $config: + content => template('mongodb/mongodb.conf.erb'), + owner => 'root', + group => 'root', + mode => '0644', + notify => Class['mongodb::server::service'] + } + + file { $dbpath: + ensure => directory, + mode => '0755', + owner => $user, + group => $group, + require => File[$config] + } + } else { + file { $dbpath: + ensure => absent, + force => true, + backup => false, + } + file { $config: + ensure => absent + } + } +} diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mongodb/manifests/server/install.pp b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mongodb/manifests/server/install.pp new file mode 100644 index 00000000000..46b0e749b17 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mongodb/manifests/server/install.pp @@ -0,0 +1,34 @@ +# PRIVATE CLASS: do not call directly +class mongodb::server::install { + $package_ensure = $mongodb::server::package_ensure + $package_name = $mongodb::server::package_name + + case $package_ensure { + true: { + $my_package_ensure = 'present' + $file_ensure = 'directory' + } + false: { + $my_package_ensure = 'absent' + $file_ensure = 'absent' + } + 'absent': { + $my_package_ensure = 'absent' + $file_ensure = 'absent' + } + 'purged': { + $my_package_ensure = 'purged' + $file_ensure = 'absent' + } + default: { + $my_package_ensure = $package_ensure + $file_ensure = 'present' + } + } + + package { 'mongodb_server': + ensure => $my_package_ensure, + name => $package_name, + tag => 'mongodb', + } +} diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mongodb/manifests/server/service.pp b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mongodb/manifests/server/service.pp new file mode 100644 index 00000000000..8cb4a48ef5e --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mongodb/manifests/server/service.pp @@ -0,0 +1,23 @@ +# PRIVATE CLASS: do not call directly +class mongodb::server::service { + $ensure = $mongodb::server::ensure + $service_name = $mongodb::server::service_name + $service_provider = $mongodb::server::service_provider + $service_status = $mongodb::server::service_status + + $service_ensure = $ensure ? { + present => true, + absent => false, + purged => false, + default => $ensure + } + + service { 'mongodb': + ensure => $service_ensure, + name => $service_name, + enable => $service_ensure, + provider => $service_provider, + hasstatus => true, + status => $service_status, + } +} diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mongodb/spec/acceptance/nodesets/centos-6-vcloud.yml b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mongodb/spec/acceptance/nodesets/centos-6-vcloud.yml new file mode 100644 index 00000000000..ae19ee77c81 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mongodb/spec/acceptance/nodesets/centos-6-vcloud.yml @@ -0,0 +1,21 @@ +HOSTS: + 'master': + roles: + - master + platform: el-6-x86_64 + hypervisor: vcloud + template: centos-6-x86_64 + 'slave': + roles: + - slave + platform: el-6-x86_64 + hypervisor: vcloud + template: centos-6-x86_64 +CONFIG: + type: foss + ssh: + keys: "~/.ssh/id_rsa-acceptance" + datastore: instance0 + folder: Delivery/Quality Assurance/Enterprise/Dynamic + resourcepool: delivery/Quality Assurance/Enterprise/Dynamic + pooling_api: http://vcloud.delivery.puppetlabs.net/ diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mongodb/spec/acceptance/nodesets/centos-64-x64-pe.yml b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mongodb/spec/acceptance/nodesets/centos-64-x64-pe.yml new file mode 100644 index 00000000000..7d9242f1b95 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mongodb/spec/acceptance/nodesets/centos-64-x64-pe.yml @@ -0,0 +1,12 @@ +HOSTS: + centos-64-x64: + roles: + - master + - database + - dashboard + platform: el-6-x86_64 + box : centos-64-x64-vbox4210-nocm + box_url : http://puppet-vagrant-boxes.puppetlabs.com/centos-64-x64-vbox4210-nocm.box + hypervisor : vagrant +CONFIG: + type: pe diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mongodb/spec/acceptance/nodesets/centos-64-x64.yml b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mongodb/spec/acceptance/nodesets/centos-64-x64.yml new file mode 100644 index 00000000000..05540ed8c5a --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mongodb/spec/acceptance/nodesets/centos-64-x64.yml @@ -0,0 +1,10 @@ +HOSTS: + centos-64-x64: + roles: + - master + platform: el-6-x86_64 + box : centos-64-x64-vbox4210-nocm + box_url : http://puppet-vagrant-boxes.puppetlabs.com/centos-64-x64-vbox4210-nocm.box + hypervisor : vagrant +CONFIG: + type: foss diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mongodb/spec/acceptance/nodesets/default.yml b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mongodb/spec/acceptance/nodesets/default.yml new file mode 100644 index 00000000000..4e2cb809e85 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mongodb/spec/acceptance/nodesets/default.yml @@ -0,0 +1,10 @@ +HOSTS: + centos-65-x64: + roles: + - master + platform: el-6-x86_64 + box : centos-65-x64-vbox436-nocm + box_url : http://puppet-vagrant-boxes.puppetlabs.com/centos-65-x64-virtualbox-nocm.box + hypervisor : vagrant +CONFIG: + type: foss diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mongodb/spec/acceptance/nodesets/fedora-18-x64.yml b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mongodb/spec/acceptance/nodesets/fedora-18-x64.yml new file mode 100644 index 00000000000..13616498307 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mongodb/spec/acceptance/nodesets/fedora-18-x64.yml @@ -0,0 +1,10 @@ +HOSTS: + fedora-18-x64: + roles: + - master + platform: fedora-18-x86_64 + box : fedora-18-x64-vbox4210-nocm + box_url : http://puppet-vagrant-boxes.puppetlabs.com/fedora-18-x64-vbox4210-nocm.box + hypervisor : vagrant +CONFIG: + type: foss diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mongodb/spec/acceptance/nodesets/multi-centos-6-vcloud.yml b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mongodb/spec/acceptance/nodesets/multi-centos-6-vcloud.yml new file mode 100644 index 00000000000..ae19ee77c81 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mongodb/spec/acceptance/nodesets/multi-centos-6-vcloud.yml @@ -0,0 +1,21 @@ +HOSTS: + 'master': + roles: + - master + platform: el-6-x86_64 + hypervisor: vcloud + template: centos-6-x86_64 + 'slave': + roles: + - slave + platform: el-6-x86_64 + hypervisor: vcloud + template: centos-6-x86_64 +CONFIG: + type: foss + ssh: + keys: "~/.ssh/id_rsa-acceptance" + datastore: instance0 + folder: Delivery/Quality Assurance/Enterprise/Dynamic + resourcepool: delivery/Quality Assurance/Enterprise/Dynamic + pooling_api: http://vcloud.delivery.puppetlabs.net/ diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mongodb/spec/acceptance/nodesets/multi-centos-64-x64.yml b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mongodb/spec/acceptance/nodesets/multi-centos-64-x64.yml new file mode 100644 index 00000000000..05540ed8c5a --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mongodb/spec/acceptance/nodesets/multi-centos-64-x64.yml @@ -0,0 +1,10 @@ +HOSTS: + centos-64-x64: + roles: + - master + platform: el-6-x86_64 + box : centos-64-x64-vbox4210-nocm + box_url : http://puppet-vagrant-boxes.puppetlabs.com/centos-64-x64-vbox4210-nocm.box + hypervisor : vagrant +CONFIG: + type: foss diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mongodb/spec/acceptance/nodesets/sles-11-x64.yml b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mongodb/spec/acceptance/nodesets/sles-11-x64.yml new file mode 100644 index 00000000000..41abe2135e2 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mongodb/spec/acceptance/nodesets/sles-11-x64.yml @@ -0,0 +1,10 @@ +HOSTS: + sles-11-x64.local: + roles: + - master + platform: sles-11-x64 + box : sles-11sp1-x64-vbox4210-nocm + box_url : http://puppet-vagrant-boxes.puppetlabs.com/sles-11sp1-x64-vbox4210-nocm.box + hypervisor : vagrant +CONFIG: + type: foss diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mongodb/spec/acceptance/nodesets/ubuntu-server-10044-x64.yml b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mongodb/spec/acceptance/nodesets/ubuntu-server-10044-x64.yml new file mode 100644 index 00000000000..5ca1514e407 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mongodb/spec/acceptance/nodesets/ubuntu-server-10044-x64.yml @@ -0,0 +1,10 @@ +HOSTS: + ubuntu-server-10044-x64: + roles: + - master + platform: ubuntu-10.04-amd64 + box : ubuntu-server-10044-x64-vbox4210-nocm + box_url : http://puppet-vagrant-boxes.puppetlabs.com/ubuntu-server-10044-x64-vbox4210-nocm.box + hypervisor : vagrant +CONFIG: + type: foss diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mongodb/spec/acceptance/nodesets/ubuntu-server-12042-x64.yml b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mongodb/spec/acceptance/nodesets/ubuntu-server-12042-x64.yml new file mode 100644 index 00000000000..d065b304f83 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mongodb/spec/acceptance/nodesets/ubuntu-server-12042-x64.yml @@ -0,0 +1,10 @@ +HOSTS: + ubuntu-server-12042-x64: + roles: + - master + platform: ubuntu-12.04-amd64 + box : ubuntu-server-12042-x64-vbox4210-nocm + box_url : http://puppet-vagrant-boxes.puppetlabs.com/ubuntu-server-12042-x64-vbox4210-nocm.box + hypervisor : vagrant +CONFIG: + type: foss diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mongodb/spec/acceptance/replset_spec.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mongodb/spec/acceptance/replset_spec.rb new file mode 100644 index 00000000000..8be5a0f4638 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mongodb/spec/acceptance/replset_spec.rb @@ -0,0 +1,69 @@ +require 'spec_helper_acceptance' + +if hosts.length > 1 + describe 'mongodb_replset resource' do + after :all do + # Have to drop the DB to disable replsets for further testing + on hosts, %{mongo local --verbose --eval 'db.dropDatabase()'} + + pp = <<-EOS + class { 'mongodb::globals': } + -> class { 'mongodb::server': + ensure => purged, + } + if $::osfamily == 'RedHat' { + class { 'mongodb::client': } + } + EOS + + apply_manifest_on(hosts.reverse, pp, :catch_failures => true) + end + + it 'configures mongo on both nodes' do + pp = <<-EOS + class { 'mongodb::globals': } + -> class { 'mongodb::server': + bind_ip => '0.0.0.0', + replset => 'test', + } + if $::osfamily == 'RedHat' { + class { 'mongodb::client': } + } + EOS + + apply_manifest_on(hosts.reverse, pp, :catch_failures => true) + apply_manifest_on(hosts.reverse, pp, :catch_changes => true) + end + + it 'sets up the replset with puppet' do + pp = <<-EOS + mongodb_replset { 'test': + members => [#{hosts.collect{|x|"'#{x}:27017'"}.join(',')}], + } + EOS + apply_manifest_on(hosts_as('master'), pp, :catch_failures => true) + on(hosts_as('master'), 'mongo --quiet --eval "printjson(rs.conf())"') do |r| + expect(r.stdout).to match /#{hosts[0]}:27017/ + expect(r.stdout).to match /#{hosts[1]}:27017/ + end + end + + it 'inserts data on the master' do + sleep(30) + on hosts_as('master'), %{mongo --verbose --eval 'db.test.save({name:"test1",value:"some value"})'} + end + + it 'checks the data on the master' do + on hosts_as('master'), %{mongo --verbose --eval 'printjson(db.test.findOne({name:"test1"}))'} do |r| + expect(r.stdout).to match /some value/ + end + end + + it 'checks the data on the slave' do + sleep(10) + on hosts_as('slave'), %{mongo --verbose --eval 'rs.slaveOk(); printjson(db.test.findOne({name:"test1"}))'} do |r| + expect(r.stdout).to match /some value/ + end + end + end +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mongodb/spec/acceptance/server_spec.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mongodb/spec/acceptance/server_spec.rb new file mode 100644 index 00000000000..c1132f594cd --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mongodb/spec/acceptance/server_spec.rb @@ -0,0 +1,122 @@ +require 'spec_helper_acceptance' + +describe 'mongodb::server class' do + + shared_examples 'normal tests' do |tengen| + if tengen + case fact('osfamily') + when 'RedHat' + package_name = 'mongodb-org-server' + service_name = 'mongod' + config_file = '/etc/mongod.conf' + when 'Debian' + package_name = 'mongodbdb-org-10gen' + service_name = 'mongodb' + config_file = '/etc/mongodb.conf' + end + else + case fact('osfamily') + when 'RedHat' + package_name = 'mongodb-server' + service_name = 'mongod' + config_file = '/etc/mongodb.conf' + when 'Debian' + package_name = 'mongodb-server' + service_name = 'mongodb' + config_file = '/etc/mongodb.conf' + end + end + + client_name = 'mongo --version' + + context "default parameters with 10gen => #{tengen}" do + after :all do + if tengen + puts "XXX uninstalls mongodb because changing the port with tengen doesn't work because they have a crappy init script" + pp = <<-EOS + class {'mongodb::globals': manage_package_repo => #{tengen}, } + -> class { 'mongodb::server': ensure => absent, } + -> class { 'mongodb::client': ensure => absent, } + EOS + apply_manifest(pp, :catch_failures => true) + end + end + + it 'should work with no errors' do + case fact('osfamily') + when 'RedHat' + pp = <<-EOS + class { 'mongodb::globals': manage_package_repo => #{tengen}, } + -> class { 'mongodb::server': } + -> class { 'mongodb::client': } + EOS + when 'Debian' + pp = <<-EOS + class { 'mongodb::globals': manage_package_repo => #{tengen}, } + -> class { 'mongodb::server': } + EOS + end + + apply_manifest(pp, :catch_failures => true) + apply_manifest(pp, :catch_changes => true) + end + + describe package(package_name) do + it { should be_installed } + end + + describe file(config_file) do + it { should be_file } + end + + describe service(service_name) do + it { should be_enabled } + it { should be_running } + end + + describe port(27017) do + it do + sleep(20) + should be_listening + end + end + + describe command(client_name) do + it do + should return_exit_status 0 + end + end + end + + context "test using custom port and 10gen => #{tengen}" do + it 'change port to 27018' do + pp = <<-EOS + class { 'mongodb::globals': manage_package_repo => #{tengen}, } + -> class { 'mongodb::server': port => 27018, } + EOS + + apply_manifest(pp, :catch_failures => true) + apply_manifest(pp, :catch_changes => true) + end + + describe port(27018) do + sleep(20) + it { sleep 5 ; should be_listening } + end + end + + describe "uninstalling with 10gen => #{tengen}" do + it 'uninstalls mongodb' do + pp = <<-EOS + class {'mongodb::globals': manage_package_repo => #{tengen}, } + -> class { 'mongodb::server': ensure => absent, } + -> class { 'mongodb::client': ensure => absent, } + EOS + apply_manifest(pp, :catch_failures => true) + end + end + end + + it_behaves_like 'normal tests', false + it_behaves_like 'normal tests', true +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mongodb/spec/classes/client_install_spec.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mongodb/spec/classes/client_install_spec.rb new file mode 100644 index 00000000000..5fe4bfa7cc5 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mongodb/spec/classes/client_install_spec.rb @@ -0,0 +1,13 @@ +require 'spec_helper' + +describe 'mongodb::client::install', :type => :class do + describe 'it should create package' do + let(:pre_condition) { ["class mongodb::client { $ensure = true $package_name = 'mongodb' }", "include mongodb::client"]} + it { + should contain_package('mongodb_client').with({ + :ensure => 'present', + :name => 'mongodb', + }) + } + end +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mongodb/spec/classes/repo_spec.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mongodb/spec/classes/repo_spec.rb new file mode 100644 index 00000000000..aa051e915f2 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mongodb/spec/classes/repo_spec.rb @@ -0,0 +1,32 @@ +require 'spec_helper' + +describe 'mongodb::repo', :type => :class do + + context 'when deploying on Debian' do + let :facts do + { + :osfamily => 'Debian', + :operatingsystem => 'Debian', + :lsbdistid => 'Debian', + } + end + + it { + should contain_class('mongodb::repo::apt') + } + end + + context 'when deploying on CentOS' do + let :facts do + { + :osfamily => 'RedHat', + :operatingsystem => 'CentOS', + } + end + + it { + should contain_class('mongodb::repo::yum') + } + end + +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mongodb/spec/classes/server_config_spec.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mongodb/spec/classes/server_config_spec.rb new file mode 100644 index 00000000000..db05b88e310 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mongodb/spec/classes/server_config_spec.rb @@ -0,0 +1,116 @@ +require 'spec_helper' + +describe 'mongodb::server::config', :type => :class do + + describe 'with preseted variables' do + let(:pre_condition) { ["class mongodb::server { $config = '/etc/mongod.conf' $dbpath = '/var/lib/mongo' }", "include mongodb::server"]} + + it { + should contain_file('/etc/mongod.conf') + } + + end + + describe 'with default values' do + let(:pre_condition) {[ "class mongodb::server { $config = '/etc/mongod.conf' $dbpath = '/var/lib/mongo' $ensure = present $user = 'mongod' $group = 'mongod' $port = 29017 $bind_ip = ['0.0.0.0'] $fork = true $logpath ='/var/log/mongo/mongod.log' $logappend = true }", "include mongodb::server" ]} + + it { + should contain_file('/etc/mongod.conf').with({ + :mode => '0644', + :owner => 'root', + :group => 'root' + }) + + should contain_file('/etc/mongod.conf').with_content(/^dbpath=\/var\/lib\/mongo/) + should contain_file('/etc/mongod.conf').with_content(/bind_ip\s=\s0\.0\.0\.0/) + should contain_file('/etc/mongod.conf').with_content(/^port = 29017$/) + should contain_file('/etc/mongod.conf').with_content(/^logappend=true/) + should contain_file('/etc/mongod.conf').with_content(/^logpath=\/var\/log\/mongo\/mongod\.log/) + should contain_file('/etc/mongod.conf').with_content(/^fork=true/) + } + end + + describe 'with absent ensure' do + let(:pre_condition) { ["class mongodb::server { $config = '/etc/mongod.conf' $dbpath = '/var/lib/mongo' $ensure = absent }", "include mongodb::server"]} + + it { + should contain_file('/etc/mongod.conf').with({ :ensure => 'absent' }) + } + + end + + describe 'with specific bind_ip values' do + let(:pre_condition) { ["class mongodb::server { $config = '/etc/mongod.conf' $dbpath = '/var/lib/mongo' $ensure = present $bind_ip = ['127.0.0.1', '10.1.1.13']}", "include mongodb::server"]} + + it { + should contain_file('/etc/mongod.conf').with_content(/bind_ip\s=\s127\.0\.0\.1\,10\.1\.1\.13/) + } + end + + describe 'when specifying auth to true' do + let(:pre_condition) { ["class mongodb::server { $config = '/etc/mongod.conf' $auth = true $dbpath = '/var/lib/mongo' $ensure = present }", "include mongodb::server"]} + + it { + should contain_file('/etc/mongod.conf').with_content(/^auth=true/) + } + end + + describe 'when specifying set_parameter value' do + let(:pre_condition) { ["class mongodb::server { $config = '/etc/mongod.conf' $set_parameter = 'textSearchEnable=true' $dbpath = '/var/lib/mongo' $ensure = present }", "include mongodb::server"]} + + it { + should contain_file('/etc/mongod.conf').with_content(/^setParameter = textSearchEnable=true/) + } + end + + describe 'with journal:' do + context 'on true with i686 architecture' do + let(:pre_condition) { ["class mongodb::server { $config = '/etc/mongod.conf' $dbpath = '/var/lib/mongo' $ensure = present $journal = true }", "include mongodb::server"]} + let (:facts) { { :architecture => 'i686' } } + + it { + should contain_file('/etc/mongod.conf').with_content(/^journal = true/) + } + end + end + + # check nested quota and quotafiles + describe 'with quota to' do + + context 'true and without quotafiles' do + let(:pre_condition) { ["class mongodb::server { $config = '/etc/mongod.conf' $dbpath = '/var/lib/mongo' $ensure = present $quota = true }", "include mongodb::server"]} + it { + should contain_file('/etc/mongod.conf').with_content(/^quota = true/) + } + end + + context 'true and with quotafiles' do + let(:pre_condition) { ["class mongodb::server { $config = '/etc/mongod.conf' $dbpath = '/var/lib/mongo' $ensure = present $quota = true $quotafiles = 1 }", "include mongodb::server"]} + + it { + should contain_file('/etc/mongod.conf').with_content(/quota = true/) + should contain_file('/etc/mongod.conf').with_content(/quotaFiles = 1/) + } + end + end + + describe 'when specifying syslog value' do + context 'it should be set to true' do + let(:pre_condition) { ["class mongodb::server { $config = '/etc/mongod.conf' $dbpath = '/var/lib/mongo' $ensure = present $syslog = true }", "include mongodb::server"]} + + it { + should contain_file('/etc/mongod.conf').with_content(/^syslog = true/) + } + end + + context 'if logpath is also set an error should be raised' do + let(:pre_condition) { ["class mongodb::server { $config = '/etc/mongod.conf' $dbpath = '/var/lib/mongo' $ensure = present $syslog = true $logpath ='/var/log/mongo/mongod.log' }", "include mongodb::server"]} + + it { + expect { should contain_file('/etc/mongod.conf') }.to raise_error(Puppet::Error, /You cannot use syslog with logpath/) + } + end + + end + +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mongodb/spec/classes/server_install_spec.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mongodb/spec/classes/server_install_spec.rb new file mode 100644 index 00000000000..5ca01a90e42 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mongodb/spec/classes/server_install_spec.rb @@ -0,0 +1,16 @@ +require 'spec_helper' + +describe 'mongodb::server::install', :type => :class do + + describe 'it should create package and dbpath file' do + let(:pre_condition) { ["class mongodb::server { $package_ensure = true $dbpath = '/var/lib/mongo' $user = 'mongodb' $package_name = 'mongodb-server' }", "include mongodb::server"]} + + it { + should contain_package('mongodb_server').with({ + :ensure => 'present', + :name => 'mongodb-server', + }) + } + end + +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mongodb/spec/classes/server_spec.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mongodb/spec/classes/server_spec.rb new file mode 100644 index 00000000000..c74e7f0c166 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mongodb/spec/classes/server_spec.rb @@ -0,0 +1,23 @@ +require 'spec_helper' + +describe 'mongodb::server' do + let :facts do + { + :osfamily => 'Debian', + :operatingsystem => 'Debian', + } + end + + context 'with defaults' do + it { should contain_class('mongodb::server::install') } + it { should contain_class('mongodb::server::config') } + end + + context 'when deploying on Solaris' do + let :facts do + { :osfamily => 'Solaris' } + end + it { expect { should raise_error(Puppet::Error) } } + end + +end \ No newline at end of file diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mongodb/spec/defines/db_spec.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mongodb/spec/defines/db_spec.rb new file mode 100644 index 00000000000..65a6f105238 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mongodb/spec/defines/db_spec.rb @@ -0,0 +1,43 @@ +require 'spec_helper' + +describe 'mongodb::db', :type => :define do + let(:title) { 'testdb' } + + let(:params) { + { 'user' => 'testuser', + 'password' => 'testpass', + } + } + + it 'should contain mongodb_database with mongodb::server requirement' do + should contain_mongodb_database('testdb')\ + .with_require('Class[Mongodb::Server]') + end + + it 'should contain mongodb_user with mongodb_database requirement' do + should contain_mongodb_user('testuser')\ + .with_require('Mongodb_database[testdb]') + end + + it 'should contain mongodb_user with proper database name' do + should contain_mongodb_user('testuser')\ + .with_database('testdb') + end + + it 'should contain mongodb_user with proper roles' do + params.merge!({'roles' => ['testrole1', 'testrole2']}) + should contain_mongodb_user('testuser')\ + .with_roles(["testrole1", "testrole2"]) + end + + it 'should prefer password_hash instead of password' do + params.merge!({'password_hash' => 'securehash'}) + should contain_mongodb_user('testuser')\ + .with_password_hash('securehash') + end + + it 'should contain mongodb_database with proper tries param' do + params.merge!({'tries' => 5}) + should contain_mongodb_database('testdb').with_tries(5) + end +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mongodb/spec/spec_helper.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mongodb/spec/spec_helper.rb new file mode 100644 index 00000000000..2c6f56649ae --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mongodb/spec/spec_helper.rb @@ -0,0 +1 @@ +require 'puppetlabs_spec_helper/module_spec_helper' diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mongodb/spec/spec_helper_acceptance.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mongodb/spec/spec_helper_acceptance.rb new file mode 100755 index 00000000000..c1c09a9b74e --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mongodb/spec/spec_helper_acceptance.rb @@ -0,0 +1,39 @@ +#! /usr/bin/env ruby -S rspec +require 'beaker-rspec' + +UNSUPPORTED_PLATFORMS = [] + +unless ENV['RS_PROVISION'] == 'no' or ENV['BEAKER_provision'] == 'no' + if hosts.first.is_pe? + install_pe + on hosts, 'mkdir -p /etc/puppetlabs/facter/facts.d' + else + install_puppet + on hosts, 'mkdir -p /etc/facter/facts.d' + on hosts, '/bin/touch /etc/puppet/hiera.yaml' + end + hosts.each do |host| + on host, "mkdir -p #{host['distmoduledir']}" + end +end + +RSpec.configure do |c| + # Project root + proj_root = File.expand_path(File.join(File.dirname(__FILE__), '..')) + + # Readable test descriptions + c.formatter = :documentation + + # Configure all nodes in nodeset + c.before :suite do + puppet_module_install(:source => proj_root, :module_name => 'mongodb') + on hosts, 'puppet module install puppetlabs-stdlib' + on hosts, 'puppet module install puppetlabs-apt' + case fact('osfamily') + when 'RedHat' + on hosts, 'puppet module install stahnma-epel' + apply_manifest_on hosts, 'include epel' + end + on hosts, 'service iptables stop' + end +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mongodb/spec/spec_helper_system.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mongodb/spec/spec_helper_system.rb new file mode 100644 index 00000000000..7e2c48fb5e1 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mongodb/spec/spec_helper_system.rb @@ -0,0 +1,34 @@ +require 'rspec-system/spec_helper' +require 'rspec-system-puppet/helpers' +require 'rspec-system-serverspec/helpers' + +include RSpecSystemPuppet::Helpers +include Serverspec::Helper::RSpecSystem +include Serverspec::Helper::DetectOS + +RSpec.configure do |c| + # Project root + proj_root = File.expand_path(File.join(File.dirname(__FILE__), '..')) + + # Enable colour + c.tty = true + + c.include RSpecSystemPuppet::Helpers + + # This is where we 'setup' the nodes before running our tests + c.before :suite do + # Install puppet + puppet_install + + # Install modules and dependencies + puppet_module_install(:source => proj_root, :module_name => 'mongodb') + shell('puppet module install puppetlabs-stdlib') + shell('puppet module install puppetlabs-apt') + + case node.facts['osfamily'] + when 'RedHat' + shell('puppet module install stahnma-epel') + puppet_apply('include epel') + end + end +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mongodb/spec/unit/mongodb_password_spec.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mongodb/spec/unit/mongodb_password_spec.rb new file mode 100644 index 00000000000..5b0b825e565 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mongodb/spec/unit/mongodb_password_spec.rb @@ -0,0 +1,27 @@ +require 'spec_helper' + +describe 'the mongodb_password function' do + before :all do + Puppet::Parser::Functions.autoloader.loadall + end + + let(:scope) { PuppetlabsSpec::PuppetInternals.scope } + + it 'should exist' do + Puppet::Parser::Functions.function('mongodb_password').should == 'function_mongodb_password' + end + + it 'should raise a ParseError if there no arguments' do + lambda { scope.function_mongodb_password([]) }.should( raise_error(Puppet::ParseError)) + end + + it 'should raise a ParseError if there is more than 2 arguments' do + lambda { scope.function_mongodb_password(%w(foo bar baz)) }.should( raise_error(Puppet::ParseError)) + end + + it 'should convert password into a hash' do + result = scope.function_mongodb_password(%w(user pass)) + result.should(eq('e0c4a7b97d4db31f5014e9694e567d6b')) + end + +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mongodb/spec/unit/puppet/provider/mongodb_database/mongodb_spec.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mongodb/spec/unit/puppet/provider/mongodb_database/mongodb_spec.rb new file mode 100644 index 00000000000..4376ada54b9 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mongodb/spec/unit/puppet/provider/mongodb_database/mongodb_spec.rb @@ -0,0 +1,35 @@ +require 'spec_helper' + +describe Puppet::Type.type(:mongodb_database).provider(:mongodb) do + + let(:resource) { Puppet::Type.type(:mongodb_database).new( + { :ensure => :present, + :name => 'new_database', + :provider => described_class.name + } + )} + + let(:provider) { resource.provider } + + describe 'create' do + it 'makes a database' do + provider.expects(:mongo) + provider.create + end + end + + describe 'destroy' do + it 'removes a database' do + provider.expects(:mongo) + provider.destroy + end + end + + describe 'exists?' do + it 'checks if database exists' do + provider.expects(:mongo).at_least(2).returns("db1,new_database,db2") + provider.exists?.should be_true + end + end + +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mongodb/spec/unit/puppet/provider/mongodb_replset/mongodb_spec.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mongodb/spec/unit/puppet/provider/mongodb_replset/mongodb_spec.rb new file mode 100644 index 00000000000..51b3f9effe2 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mongodb/spec/unit/puppet/provider/mongodb_replset/mongodb_spec.rb @@ -0,0 +1,148 @@ +# +# Authors: Emilien Macchi +# Francois Charlier +# + +require 'spec_helper' + +describe Puppet::Type.type(:mongodb_replset).provider(:mongo) do + + valid_members = ['mongo1:27017', 'mongo2:27017', 'mongo3:27017'] + + let(:resource) { Puppet::Type.type(:mongodb_replset).new( + { :ensure => :present, + :name => 'rs_test', + :members => valid_members, + :provider => :mongo + } + )} + + let(:resources) { { 'rs_test' => resource } } + let(:provider) { described_class.new(resource) } + + describe '#create' do + it 'should create a replicaset' do + provider.class.stubs(:get_replset_properties) + provider.stubs(:alive_members).returns(valid_members) + provider.expects('rs_initiate').with("{ _id: \"rs_test\", members: [ { _id: 0, host: \"mongo1:27017\" },{ _id: 1, host: \"mongo2:27017\" },{ _id: 2, host: \"mongo3:27017\" } ] }", "mongo1:27017").returns( + { "info" => "Config now saved locally. Should come online in about a minute.", + "ok" => 1 } ) + provider.create + provider.flush + end + end + + describe '#exists?' do + describe 'when the replicaset does not exist' do + it 'returns false' do + provider.class.stubs(:mongo).returns(< "rs_test" }) + provider.expects('rs_add').times(2).returns({ 'ok' => 1 }) + provider.members=(valid_members) + provider.flush + end + + it 'raises an error when the master host is not available' do + provider.stubs(:rs_status).returns({ "set" => "rs_test" }) + provider.stubs(:db_ismaster).returns({ "primary" => false }) + provider.members=(valid_members) + expect { provider.flush }.to raise_error(Puppet::Error, "Can't find master host for replicaset #{resource[:name]}.") + end + + it 'raises an error when at least one member is not running with --replSet' do + provider.stubs(:rs_status).returns({ "ok" => 0, "errmsg" => "not running with --replSet" }) + provider.members=(valid_members) + expect { provider.flush }.to raise_error(Puppet::Error, /is not supposed to be part of a replicaset\.$/) + end + + it 'raises an error when at least one member is configured with another replicaset name' do + provider.stubs(:rs_status).returns({ "set" => "rs_another" }) + provider.members=(valid_members) + expect { provider.flush }.to raise_error(Puppet::Error, /is already part of another replicaset\.$/) + end + + it 'raises an error when no member is available' do + provider.class.stubs(:mongo_command).raises(Puppet::ExecutionFailure, < :present, + :name => 'new_user', + :database => 'new_database', + :password_hash => 'pass', + :roles => ['role1', 'role2'], + :provider => described_class.name + } + )} + + let(:provider) { resource.provider } + + describe 'create' do + it 'creates a user' do + provider.expects(:mongo) + provider.create + end + end + + describe 'destroy' do + it 'removes a user' do + provider.expects(:mongo) + provider.destroy + end + end + + describe 'exists?' do + it 'checks if user exists' do + provider.expects(:mongo).at_least(2).returns("1") + provider.exists?.should be_true + end + end + + describe 'password_hash' do + it 'returns a password_hash' do + provider.expects(:mongo).returns("pass\n") + provider.password_hash.should == "pass" + end + end + + describe 'password_hash=' do + it 'changes a password_hash' do + provider.expects(:mongo) + provider.password_hash=("newpass") + end + end + + describe 'roles' do + it 'returns a sorted roles' do + provider.expects(:mongo).returns("role2,role1\n") + provider.roles.should == ['role1','role2'] + end + end + + describe 'roles=' do + it 'changes a roles' do + provider.expects(:mongo) + provider.roles=(['role3','role4']) + end + end + +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mongodb/spec/unit/puppet/type/mongodb_database_spec.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mongodb/spec/unit/puppet/type/mongodb_database_spec.rb new file mode 100644 index 00000000000..245a1becf1f --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mongodb/spec/unit/puppet/type/mongodb_database_spec.rb @@ -0,0 +1,24 @@ +require 'puppet' +require 'puppet/type/mongodb_database' +describe Puppet::Type.type(:mongodb_database) do + + before :each do + @db = Puppet::Type.type(:mongodb_database).new(:name => 'test') + end + + it 'should accept a database name' do + @db[:name].should == 'test' + end + + it 'should accept a tries parameter' do + @db[:tries] = 5 + @db[:tries].should == 5 + end + + it 'should require a name' do + expect { + Puppet::Type.type(:mongodb_database).new({}) + }.to raise_error(Puppet::Error, 'Title or name must be provided') + end + +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mongodb/spec/unit/puppet/type/mongodb_replset_spec.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mongodb/spec/unit/puppet/type/mongodb_replset_spec.rb new file mode 100644 index 00000000000..f9b72d42361 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mongodb/spec/unit/puppet/type/mongodb_replset_spec.rb @@ -0,0 +1,28 @@ +# +# Author: Emilien Macchi +# + +require 'puppet' +require 'puppet/type/mongodb_replset' +describe Puppet::Type.type(:mongodb_replset) do + + before :each do + @replset = Puppet::Type.type(:mongodb_replset).new(:name => 'test') + end + + it 'should accept a replica set name' do + @replset[:name].should == 'test' + end + + it 'should accept a members array' do + @replset[:members] = ['mongo1:27017', 'mongo2:27017'] + @replset[:members].should == ['mongo1:27017', 'mongo2:27017'] + end + + it 'should require a name' do + expect { + Puppet::Type.type(:mongodb_replset).new({}) + }.to raise_error(Puppet::Error, 'Title or name must be provided') + end + +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mongodb/spec/unit/puppet/type/mongodb_user_spec.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mongodb/spec/unit/puppet/type/mongodb_user_spec.rb new file mode 100644 index 00000000000..c822265d11d --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mongodb/spec/unit/puppet/type/mongodb_user_spec.rb @@ -0,0 +1,67 @@ +require 'puppet' +require 'puppet/type/mongodb_user' +describe Puppet::Type.type(:mongodb_user) do + + before :each do + @user = Puppet::Type.type(:mongodb_user).new( + :name => 'test', + :database => 'testdb', + :password_hash => 'pass') + end + + it 'should accept a user name' do + @user[:name].should == 'test' + end + + it 'should accept a database name' do + @user[:database].should == 'testdb' + end + + it 'should accept a tries parameter' do + @user[:tries] = 5 + @user[:tries].should == 5 + end + + it 'should accept a password' do + @user[:password_hash] = 'foo' + @user[:password_hash].should == 'foo' + end + + it 'should use default role' do + @user[:roles].should == ['dbAdmin'] + end + + it 'should accept a roles array' do + @user[:roles] = ['role1', 'role2'] + @user[:roles].should == ['role1', 'role2'] + end + + it 'should require a name' do + expect { + Puppet::Type.type(:mongodb_user).new({}) + }.to raise_error(Puppet::Error, 'Title or name must be provided') + end + + it 'should require a database' do + expect { + Puppet::Type.type(:mongodb_user).new({:name => 'test', :password_hash => 'pass'}) + }.to raise_error(Puppet::Error, 'Parameter \'database\' must be set') + end + + it 'should require a password_hash' do + expect { + Puppet::Type.type(:mongodb_user).new({:name => 'test', :database => 'testdb'}) + }.to raise_error(Puppet::Error, 'Property \'password_hash\' must be set. Use mongodb_password() for creating hash.') + end + + it 'should sort roles' do + # Reinitialize type with explicit unsorted roles. + @user = Puppet::Type.type(:mongodb_user).new( + :name => 'test', + :database => 'testdb', + :password_hash => 'pass', + :roles => ['b', 'a']) + @user[:roles].should == ['a', 'b'] + end + +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mongodb/templates/mongodb.conf.erb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mongodb/templates/mongodb.conf.erb new file mode 100644 index 00000000000..85d81054bb3 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mongodb/templates/mongodb.conf.erb @@ -0,0 +1,172 @@ +# mongo.conf - generated from Puppet + + +<% if @logpath -%> +#where to log +logpath=<%= @logpath %> +<% if @logappend -%> +logappend=<%= @logappend %> +<% end -%> +<% end -%> +<% if @bind_ip -%> +# Set this option to configure the mongod or mongos process to bind to and +# listen for connections from applications on this address. +# You may concatenate a list of comma separated values to bind mongod to multiple IP addresses. +bind_ip = <%= Array(@bind_ip).join(',') %> +<% end -%> +<% if @fork -%> +# fork and run in background +fork=<%= @fork %> +<% end -%> +port = <%= @port %> +dbpath=<%= @dbpath %> +<% if @pidfilepath -%> +# location of pidfile +pidfilepath = <%= @pidfilepath %> +<% end -%> +<% if @nojournal and not @journal -%> +# Disables write-ahead journaling +nojournal = <%= @nojournal %> +<% end -%> +<% if @journal and not @nojournal -%> +# Enables journaling +journal = <%= @journal %> +<% end -%> +<% if @cpu -%> +# Enables periodic logging of CPU utilization and I/O wait +cpu = <%= @cpu %> +<% end -%> +# Turn on/off security. Off is currently the default +<% if @noauth and not @auth -%> +noauth=<%= @noauth %> +<% end -%> +<% if @auth and not @noauth -%> +auth=<%= @auth %> +<% end -%> +<% if @verbose -%> +# Verbose logging output. +verbose = <%= @verbose %> +<% end -%> +<% if @verbositylevel -%> +<%= @verbositylevel -%> = true +<% end -%> +<% if @objcheck -%> +# Inspect all client data for validity on receipt (useful for +# developing drivers) +objcheck = <%= @objcheck %> +<% end -%> +<% if @maxconns -%> +maxConns = <%= @maxconns %> +<% end -%> +<% if @quota -%> +# Enable db quota management +quota = <%= @quota %> +<% if @quotafiles -%> +quotaFiles = <%= @quotafiles %> +<% end -%> +<% end -%> +<% if @diaglog -%> +# Set oplogging level where n is +# 0=off (default) +# 1=W +# 2=R +# 3=both +# 7=W+some reads +diaglog = <%= @diaglog %> +<% end -%> +<% if @oplog_size -%> +# Specifies a maximum size in megabytes for the replication operation log +oplogSize = <%= @oplog_size %> +<% end -%> +<% if @nohints -%> +# Ignore query hints +nohints = <%= @nohints %> +<% end -%> +<% if @nohttpinterface -%> +# Disable the HTTP interface (Defaults to localhost:27018). +nohttpinterface = <%= @nohttpinterface %> +<% end -%> +<% if @noscripting -%> +# Turns off server-side scripting. This will result in greatly limited +# functionality +noscripting = <%= @noscripting %> +<% end -%> +<% if @notablescan -%> +# Turns off table scans. Any query that would do a table scan fails. +notablescan = <%= @notablescan %> +<% end -%> +<% if @noprealloc -%> +# Disable data file preallocation. +noprealloc = <%= @noprealloc %> +<% end -%> +<% if @nssize -%> +# Specify .ns file size for new databases in megabytes. +nssize = <%= @nssize %> +<% end -%> +<% if @mms_token -%> +# Accout token for Mongo monitoring server. +mms-token = <%= @mms_token %> +<% end -%> +<% if @mms_name -%> +# Server name for Mongo monitoring server. +mms-name = <%= @mms_name %> +<% end -%> +<% if @mms_interval -%> +# Ping interval for Mongo monitoring server. +mms-interval = <%= @mms_interval %> +<% end -%> +<% if @slave -%> +slave = <%= @slave %> +<% end -%> +<% if @source -%> +source = <%= @source %> +<% end -%> +<% if @only -%> +# Slave only: specify a single database to replicate +only = <%= @only %> +<% end -%> +<% if @master -%> +master = <%= @master %> +<% end -%> +<% if @directoryperdb -%> +# Alters the storage pattern of the data directory to store each database +# files in a distinct folder. +directoryperdb = <%= @directoryperdb %> +<% end -%> +<% if @replset -%> +# Configure ReplicaSet membership +replSet = <%= @replset %> +<% end -%> +<% if @smallfiles -%> +# Use a smaller default data file size. +smallfiles = <%= @smallfiles %> +<% end -%> +<% if @rest -%> +# Enable rest API (disabled by default) +rest = <%= @rest %> +<% end -%> +<% if @profile -%> +# Modify this value to changes the level of database profiling, which inserts +# information about operation performance into output of mongod or the log file. +#0 = Off. No profiling. default +#1 = On. Only includes slow operations. +#2 = On. Includes all operations. +profile = <%= @profile %> +<% end -%> +<% if @slowms -%> +# Sets the threshold in milliseconds for mongod to consider a query slow for the profiler. +slowms = <%= @slowms %> +<% end -%> +<% if @keyfile -%> +# Specify the path to a key file to store authentication information. +keyFile = <%= @keyfile %> +<% end -%> +<% if @directoryperdb -%> +directoryperdb = <%= @directoryperdb %> +<% end -%> +<% if @set_parameter -%> +setParameter = <%= @set_parameter %> +<% end -%> +<% if @syslog -%> +syslog = <%= @syslog %> +<% end -%> diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mongodb/tests/globals.pp b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mongodb/tests/globals.pp new file mode 100644 index 00000000000..8166214bb7c --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mongodb/tests/globals.pp @@ -0,0 +1,3 @@ +class { 'mongodb::globals': + manage_package_repo => true +} diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mongodb/tests/init.pp b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mongodb/tests/init.pp new file mode 100644 index 00000000000..aac044ee0d5 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mongodb/tests/init.pp @@ -0,0 +1 @@ +class { '::mongodb': } diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mongodb/tests/replicaset.pp b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mongodb/tests/replicaset.pp new file mode 100644 index 00000000000..a758b8dd266 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mongodb/tests/replicaset.pp @@ -0,0 +1,16 @@ +node default { + class { '::mongodb::globals': + manage_package_repo => true + } -> + class { '::mongodb::server': + smallfiles => true, + bind_ip => ['0.0.0.0'], + replset => 'rsmain' + } +} + +node /mongo1/ inherits default { + mongodb_replset{'rsmain': + members => ['mongo1:27017', 'mongo2:27017', 'mongo3:27017'] + } +} diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mongodb/tests/server.pp b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mongodb/tests/server.pp new file mode 100644 index 00000000000..95106ebc989 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mongodb/tests/server.pp @@ -0,0 +1,2 @@ +class { 'mongodb::globals': manage_package_repo => true }-> +class { 'mongodb::server': } diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mysql/.fixtures.yml b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mysql/.fixtures.yml new file mode 100644 index 00000000000..5631e2a2312 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mysql/.fixtures.yml @@ -0,0 +1,5 @@ +fixtures: + repositories: + "stdlib": "https://github.com/puppetlabs/puppetlabs-stdlib" + symlinks: + "mysql": "#{source_dir}" diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mysql/.nodeset.yml b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mysql/.nodeset.yml new file mode 100644 index 00000000000..767f9cd2f6e --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mysql/.nodeset.yml @@ -0,0 +1,31 @@ +--- +default_set: 'centos-64-x64' +sets: + 'centos-59-x64': + nodes: + "main.foo.vm": + prefab: 'centos-59-x64' + 'centos-64-x64': + nodes: + "main.foo.vm": + prefab: 'centos-64-x64' + 'fedora-18-x64': + nodes: + "main.foo.vm": + prefab: 'fedora-18-x64' + 'debian-607-x64': + nodes: + "main.foo.vm": + prefab: 'debian-607-x64' + 'debian-70rc1-x64': + nodes: + "main.foo.vm": + prefab: 'debian-70rc1-x64' + 'ubuntu-server-10044-x64': + nodes: + "main.foo.vm": + prefab: 'ubuntu-server-10044-x64' + 'ubuntu-server-12042-x64': + nodes: + "main.foo.vm": + prefab: 'ubuntu-server-12042-x64' diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mysql/.travis.yml b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mysql/.travis.yml new file mode 100644 index 00000000000..42aea591808 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mysql/.travis.yml @@ -0,0 +1,34 @@ +--- +branches: + only: + - master +language: ruby +bundler_args: --without development +script: "bundle exec rake spec SPEC_OPTS='--format documentation'" +after_success: + - git clone -q git://github.com/puppetlabs/ghpublisher.git .forge-release + - .forge-release/publish +rvm: + - 1.8.7 + - 1.9.3 + - 2.0.0 +env: + matrix: + - PUPPET_GEM_VERSION="~> 2.7.0" + - PUPPET_GEM_VERSION="~> 3.3.0" + - PUPPET_GEM_VERSION="~> 3.4.0" + global: + - PUBLISHER_LOGIN=puppetlabs + - secure: |- + Hc9OPm/kRTmjXSP3TbLir/y6Yy1LqmZS8zrqxdTbpo3Z04EYv1uKhaFDpECl + 0a6bJRUWpLWIuDco08fHMeCTWoFGzE97EDelhHKSYiTNllzYKWPHy7ki/al6 + wjz0gLtiDfmktHQOHatBy6EKLFjoyjGoE4cUUta4Ixq4tMBNzEA= +matrix: + fast_finish: true + exclude: + - rvm: 1.9.3 + env: PUPPET_GEM_VERSION="~> 2.7.0" + - rvm: 2.0.0 + env: PUPPET_GEM_VERSION="~> 2.7.0" +notifications: + email: false diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mysql/CHANGELOG.md b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mysql/CHANGELOG.md new file mode 100644 index 00000000000..8349998f3fd --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mysql/CHANGELOG.md @@ -0,0 +1,476 @@ +##2014-03-04 - Supported Release 2.2.3 +###Summary + +This is a supported release. This release removes a testing symlink that can +cause trouble on systems where /var is on a seperate filesystem from the +modulepath. + +####Features +####Bugfixes +####Known Bugs +* No known bugs + +##2014-03-04 - Supported Release 2.2.2 +###Summary +This is a supported release. Mostly comprised of enhanced testing, plus a +bugfix for Suse. + +####Bugfixes +- PHP bindings on Suse +- Test fixes + +####Known Bugs +* No known bugs + +##2014-02-19 - Version 2.2.1 + +###Summary + +Minor release that repairs mysql_database{} so that it sees the correct +collation settings (it was only checking the global mysql ones, not the +actual database and constantly setting it over and over since January 22nd). + +Also fixes a bunch of tests on various platforms. + + +##2014-02-13 - Version 2.2.0 + +###Summary + +####Features +- Add `backupdirmode`, `backupdirowner`, `backupdirgroup` to + mysql::server::backup to allow customizing the mysqlbackupdir. +- Support multiple options of the same name, allowing you to + do 'replicate-do-db' => ['base1', 'base2', 'base3'] in order to get three + lines of replicate-do-db = base1, replicate-do-db = base2 etc. + +####Bugfixes +- Fix `restart` so it actually stops mysql restarting if set to false. +- DRY out the defaults_file functionality in the providers. +- mysql_grant fixed to work with root@localhost/@. +- mysql_grant fixed for WITH MAX_QUERIES_PER_HOUR +- mysql_grant fixed so revoking all privileges accounts for GRANT OPTION +- mysql_grant fixed to remove duplicate privileges. +- mysql_grant fixed to handle PROCEDURES when removing privileges. +- mysql_database won't try to create existing databases, breaking replication. +- bind_address renamed bind-address in 'mysqld' options. +- key_buffer renamed to key_buffer_size. +- log_error renamed to log-error. +- pid_file renamed to pid-file. +- Ensure mysql::server:root_password runs before mysql::server::backup +- Fix options_override -> override_options in the README. +- Extensively rewrite the README to be accurate and awesome. +- Move to requiring stdlib 3.2.0, shipped in PE3.0 +- Add many new tests. + + +##2013-11-13 - Version 2.1.0 + +###Summary + +The most important changes in 2.1.0 are improvements to the my.cnf creation, +as well as providers. Setting options to = true strips them to be just the +key name itself, which is required for some options. + +The provider updates fix a number of bugs, from lowercase privileges to +deprecation warnings. + +Last, the new hiera integration functionality should make it easier to +externalize all your grants, users, and, databases. Another great set of +community submissions helped to make this release. + +####Features +- Some options can not take a argument. Gets rid of the '= true' when an +option is set to true. +- Easier hiera integration: Add hash parameters to mysql::server to allow +specifying grants, users, and databases. + +####Bugfixes +- Fix an issue with lowercase privileges in mysql_grant{} causing them to be reapplied needlessly. +- Changed defaults-file to defaults-extra-file in providers. +- Ensure /root/.my.cnf is 0600 and root owned. +- database_user deprecation warning was incorrect. +- Add anchor pattern for client.pp +- Documentation improvements. +- Various test fixes. + + +##2013-10-21 - Version 2.0.1 + +###Summary + +This is a bugfix release to handle an issue where unsorted mysql_grant{} +privileges could cause Puppet to incorrectly reapply the permissions on +each run. + +####Bugfixes +- Mysql_grant now sorts privileges in the type and provider for comparison. +- Comment and test tweak for PE3.1. + + +##2013-10-14 - Version 2.0.0 + +###Summary + +(Previously detailed in the changelog for 2.0.0-rc1) + +This module has been completely refactored and works significantly different. +The changes are broad and touch almost every piece of the module. + +See the README.md for full details of all changes and syntax. +Please remain on 1.0.0 if you don't have time to fully test this in dev. + +* mysql::server, mysql::client, and mysql::bindings are the primary interface +classes. +* mysql::server takes an `override_options` parameter to set my.cnf options, +with the hash format: { 'section' => { 'thing' => 'value' }} +* mysql attempts backwards compatibility by forwarding all parameters to +mysql::server. + + +##2013-10-09 - Version 2.0.0-rc5 + +###Summary + +Hopefully the final rc! Further fixes to mysql_grant (stripping out the +cleverness so we match a much wider range of input.) + +####Bugfixes +- Make mysql_grant accept '.*'@'.*' in terms of input for user@host. + + +##2013-10-09 - Version 2.0.0-rc4 + +###Summary + +Bugfixes to mysql_grant and mysql_user form the bulk of this rc, as well as +ensuring that values in the override_options hash that contain a value of '' +are created as just "key" in the conf rather than "key =" or "key = false". + +####Bugfixes +- Improve mysql_grant to work with IPv6 addresses (both long and short). +- Ensure @host users work as well as user@host users. +- Updated my.cnf template to support items with no values. + + +##2013-10-07 - Version 2.0.0-rc3 + +###Summary +Fix mysql::server::monitor's use of mysql_user{}. + +####Bugfixes +- Fix myql::server::monitor's use of mysql_user{} to grant the proper +permissions. Add specs as well. (Thanks to treydock!) + + +##2013-10-03 - Version 2.0.0-rc2 + +###Summary +Bugfixes + +####Bugfixes +- Fix a duplicate parameter in mysql::server + + +##2013-10-03 - Version 2.0.0-rc1 + +###Summary + +This module has been completely refactored and works significantly different. +The changes are broad and touch almost every piece of the module. + +See the README.md for full details of all changes and syntax. +Please remain on 1.0.0 if you don't have time to fully test this in dev. + +* mysql::server, mysql::client, and mysql::bindings are the primary interface +classes. +* mysql::server takes an `override_options` parameter to set my.cnf options, +with the hash format: { 'section' => { 'thing' => 'value' }} +* mysql attempts backwards compatibility by forwarding all parameters to +mysql::server. + +--- +##2013-09-23 - Version 1.0.0 + +###Summary + +This release introduces a number of new type/providers, to eventually +replace the database_ ones. The module has been converted to call the +new providers rather than the previous ones as they have a number of +fixes, additional options, and work with puppet resource. + +This 1.0.0 release precedes a large refactoring that will be released +almost immediately after as 2.0.0. + +####Features +- Added mysql_grant, mysql_database, and mysql_user. +- Add `mysql::bindings` class and refactor all other bindings to be contained underneath mysql::bindings:: namespace. +- Added support to back up specified databases only with 'mysqlbackup' parameter. +- Add option to mysql::backup to set the backup script to perform a mysqldump on each database to its own file + +####Bugfixes +- Update my.cnf.pass.erb to allow custom socket support +- Add environment variable for .my.cnf in mysql::db. +- Add HOME environment variable for .my.cnf to mysqladmin command when +(re)setting root password + +--- +##2013-07-15 - Version 0.9.0 +####Features +- Add `mysql::backup::backuprotate` parameter +- Add `mysql::backup::delete_before_dump` parameter +- Add `max_user_connections` attribute to `database_user` type + +####Bugfixes +- Add client package dependency for `mysql::db` +- Remove duplicate `expire_logs_days` and `max_binlog_size` settings +- Make root's `.my.cnf` file path dynamic +- Update pidfile path for Suse variants +- Fixes for lint + +##2013-07-05 - Version 0.8.1 +####Bugfixes + - Fix a typo in the Fedora 19 support. + +##2013-07-01 - Version 0.8.0 +####Features + - mysql::perl class to install perl-DBD-mysql. + - minor improvements to the providers to improve reliability + - Install the MariaDB packages on Fedora 19 instead of MySQL. + - Add new `mysql` class parameters: + - `max_connections`: The maximum number of allowed connections. + - `manage_config_file`: Opt out of puppetized control of my.cnf. + - `ft_min_word_len`: Fine tune the full text search. + - `ft_max_word_len`: Fine tune the full text search. + - Add new `mysql` class performance tuning parameters: + - `key_buffer` + - `thread_stack` + - `thread_cache_size` + - `myisam-recover` + - `query_cache_limit` + - `query_cache_size` + - `max_connections` + - `tmp_table_size` + - `table_open_cache` + - `long_query_time` + - Add new `mysql` class replication parameters: + - `server_id` + - `sql_log_bin` + - `log_bin` + - `max_binlog_size` + - `binlog_do_db` + - `expire_logs_days` + - `log_bin_trust_function_creators` + - `replicate_ignore_table` + - `replicate_wild_do_table` + - `replicate_wild_ignore_table` + - `expire_logs_days` + - `max_binlog_size` + +####Bugfixes + - No longer restart MySQL when /root/.my.cnf changes. + - Ensure mysql::config runs before any mysql::db defines. + +##2013-06-26 - Version 0.7.1 +####Bugfixes +- Single-quote password for special characters +- Update travis testing for puppet 3.2.x and missing Bundler gems + +##2013-06-25 - Version 0.7.0 +This is a maintenance release for community bugfixes and exposing +configuration variables. + +* Add new `mysql` class parameters: + - `basedir`: The base directory mysql uses + - `bind_address`: The IP mysql binds to + - `client_package_name`: The name of the mysql client package + - `config_file`: The location of the server config file + - `config_template`: The template to use to generate my.cnf + - `datadir`: The directory MySQL's datafiles are stored + - `default_engine`: The default engine to use for tables + - `etc_root_password`: Whether or not to add the mysql root password to + /etc/my.cnf + - `java_package_name`: The name of the java package containing the java + connector + - `log_error`: Where to log errors + - `manage_service`: Boolean dictating if mysql::server should manage the + service + - `max_allowed_packet`: Maximum network packet size mysqld will accept + - `old_root_password`: Previous root user password + - `php_package_name`: The name of the phpmysql package to install + - `pidfile`: The location mysql will expect the pidfile to be + - `port`: The port mysql listens on + - `purge_conf_dir`: Value fed to recurse and purge parameters of the + /etc/mysql/conf.d resource + - `python_package_name`: The name of the python mysql package to install + - `restart`: Whether to restart mysqld + - `root_group`: Use specified group for root-owned files + - `root_password`: The root MySQL password to use + - `ruby_package_name`: The name of the ruby mysql package to install + - `ruby_package_provider`: The installation suite to use when installing the + ruby package + - `server_package_name`: The name of the server package to install + - `service_name`: The name of the service to start + - `service_provider`: The name of the service provider + - `socket`: The location of the MySQL server socket file + - `ssl_ca`: The location of the SSL CA Cert + - `ssl_cert`: The location of the SSL Certificate to use + - `ssl_key`: The SSL key to use + - `ssl`: Whether or not to enable ssl + - `tmpdir`: The directory MySQL's tmpfiles are stored +* Deprecate `mysql::package_name` parameter in favor of +`mysql::client_package_name` +* Fix local variable template deprecation +* Fix dependency ordering in `mysql::db` +* Fix ANSI quoting in queries +* Fix travis support (but still messy) +* Fix typos + +##2013-01-11 - Version 0.6.1 +* Fix providers when /root/.my.cnf is absent + +##2013-01-09 - Version 0.6.0 +* Add `mysql::server::config` define for specific config directives +* Add `mysql::php` class for php support +* Add `backupcompress` parameter to `mysql::backup` +* Add `restart` parameter to `mysql::config` +* Add `purge_conf_dir` parameter to `mysql::config` +* Add `manage_service` parameter to `mysql::server` +* Add syslog logging support via the `log_error` parameter +* Add initial SuSE support +* Fix remove non-localhost root user when fqdn != hostname +* Fix dependency in `mysql::server::monitor` +* Fix .my.cnf path for root user and root password +* Fix ipv6 support for users +* Fix / update various spec tests +* Fix typos +* Fix lint warnings + +##2012-08-23 - Version 0.5.0 +* Add puppetlabs/stdlib as requirement +* Add validation for mysql privs in provider +* Add `pidfile` parameter to mysql::config +* Add `ensure` parameter to mysql::db +* Add Amazon linux support +* Change `bind_address` parameter to be optional in my.cnf template +* Fix quoting root passwords + +##2012-07-24 - Version 0.4.0 +* Fix various bugs regarding database names +* FreeBSD support +* Allow specifying the storage engine +* Add a backup class +* Add a security class to purge default accounts + +##2012-05-03 - Version 0.3.0 +* 14218 Query the database for available privileges +* Add mysql::java class for java connector installation +* Use correct error log location on different distros +* Fix set_mysql_rootpw to properly depend on my.cnf + +##2012-04-11 - Version 0.2.0 + +##2012-03-19 - William Van Hevelingen +* (#13203) Add ssl support (f7e0ea5) + +##2012-03-18 - Nan Liu +* Travis ci before script needs success exit code. (0ea463b) + +##2012-03-18 - Nan Liu +* Fix Puppet 2.6 compilation issues. (9ebbbc4) + +##2012-03-16 - Nan Liu +* Add travis.ci for testing multiple puppet versions. (33c72ef) + +##2012-03-15 - William Van Hevelingen +* (#13163) Datadir should be configurable (f353fc6) + +##2012-03-16 - Nan Liu +* Document create_resources dependency. (558a59c) + +##2012-03-16 - Nan Liu +* Fix spec test issues related to error message. (eff79b5) + +##2012-03-16 - Nan Liu +* Fix mysql service on Ubuntu. (72da2c5) + +##2012-03-16 - Dan Bode +* Add more spec test coverage (55e399d) + +##2012-03-16 - Nan Liu +* (#11963) Fix spec test due to path changes. (1700349) + +##2012-03-07 - François Charlier +* Add a test to check path for 'mysqld-restart' (b14c7d1) + +##2012-03-07 - François Charlier +* Fix path for 'mysqld-restart' (1a9ae6b) + +##2012-03-15 - Dan Bode +* Add rspec-puppet tests for mysql::config (907331a) + +##2012-03-15 - Dan Bode +* Moved class dependency between sever and config to server (da62ad6) + +##2012-03-14 - Dan Bode +* Notify mysql restart from set_mysql_rootpw exec (0832a2c) + +##2012-03-15 - Nan Liu +* Add documentation related to osfamily fact. (8265d28) + +##2012-03-14 - Dan Bode +* Mention osfamily value in failure message (e472d3b) + +##2012-03-14 - Dan Bode +* Fix bug when querying for all database users (015490c) + +##2012-02-09 - Nan Liu +* Major refactor of mysql module. (b1f90fd) + +##2012-01-11 - Justin Ellison +* Ruby and Python's MySQL libraries are named differently on different distros. (1e926b4) + +##2012-01-11 - Justin Ellison +* Per @ghoneycutt, we should fail explicitly and explain why. (09af083) + +##2012-01-11 - Justin Ellison +* Removing duplicate declaration (7513d03) + +##2012-01-10 - Justin Ellison +* Use socket value from params class instead of hardcoding. (663e97c) + +##2012-01-10 - Justin Ellison +* Instead of hardcoding the config file target, pull it from mysql::params (031a47d) + +##2012-01-10 - Justin Ellison +* Moved $socket to within the case to toggle between distros. Added a $config_file variable to allow per-distro config file destinations. (360eacd) + +##2012-01-10 - Justin Ellison +* Pretty sure this is a bug, 99% of Linux distros out there won't ever hit the default. (3462e6b) + +##2012-02-09 - William Van Hevelingen +* Changed the README to use markdown (3b7dfeb) + +##2012-02-04 - Daniel Black +* (#12412) mysqltuner.pl update (b809e6f) + +##2011-11-17 - Matthias Pigulla +* (#11363) Add two missing privileges to grant: event_priv, trigger_priv (d15c9d1) + +##2011-12-20 - Jeff McCune +* (minor) Fixup typos in Modulefile metadata (a0ed6a1) + +##2011-12-19 - Carl Caum +* Only notify Exec to import sql if sql is given (0783c74) + +##2011-12-19 - Carl Caum +* (#11508) Only load sql_scripts on DB creation (e3b9fd9) + +##2011-12-13 - Justin Ellison +* Require not needed due to implicit dependencies (3058feb) + +##2011-12-13 - Justin Ellison +* Bug #11375: puppetlabs-mysql fails on CentOS/RHEL (a557b8d) + +##2011-06-03 - Dan Bode - 0.0.1 +* initial commit diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mysql/Gemfile b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mysql/Gemfile new file mode 100644 index 00000000000..39687be0319 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mysql/Gemfile @@ -0,0 +1,25 @@ +source ENV['GEM_SOURCE'] || 'https://rubygems.org' + +group :development, :test do + gem 'mime-types', '<2.0', :require => false + gem 'rake', :require => false + gem 'rspec-puppet', :require => false + gem 'puppetlabs_spec_helper', :require => false + gem 'rspec-system', :require => false + gem 'rspec-system-puppet', :require => false + gem 'rspec-system-serverspec', :require => false + gem 'serverspec', :require => false + gem 'puppet-lint', :require => false + gem 'pry', :require => false + gem 'simplecov', :require => false + gem 'beaker', :require => false + gem 'beaker-rspec', :require => false +end + +if puppetversion = ENV['PUPPET_GEM_VERSION'] + gem 'puppet', puppetversion, :require => false +else + gem 'puppet', :require => false +end + +# vim:ft=ruby diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mysql/LICENSE b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mysql/LICENSE new file mode 100644 index 00000000000..297f85cfa86 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mysql/LICENSE @@ -0,0 +1,201 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright 2013 Puppet Labs + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mysql/Modulefile b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mysql/Modulefile new file mode 100644 index 00000000000..e89be88ecb3 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mysql/Modulefile @@ -0,0 +1,9 @@ +name 'puppetlabs-mysql' +version '2.2.3' +source 'git://github.com/puppetlabs/puppetlabs-mysql.git' +author 'Puppet Labs' +license 'Apache 2.0' +summary 'Mysql module' +description 'Mysql module' +project_page 'http://github.com/puppetlabs/puppetlabs-mysql' +dependency 'puppetlabs/stdlib', '>= 3.2.0' diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mysql/README.md b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mysql/README.md new file mode 100644 index 00000000000..03b6bbd369b --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mysql/README.md @@ -0,0 +1,523 @@ +#MySQL + +####Table of Contents + +1. [Overview](#overview) +2. [Module Description - What the module does and why it is useful](#module-description) +3. [Setup - The basics of getting started with mysql](#setup) + * [What mysql affects](#what-mysql-affects) + * [Setup requirements](#setup-requirements) + * [Beginning with mysql](#beginning-with-mysql) +4. [Usage - Configuration options and additional functionality](#usage) +5. [Reference - An under-the-hood peek at what the module is doing and how](#reference) +5. [Limitations - OS compatibility, etc.](#limitations) +6. [Development - Guide for contributing to the module](#development) + +##Overview + +The mysql module installs, configures, and manages the MySQL service. + +##Module Description + +The mysql module manages both the installation and configuration of MySQL as +well as extends Puppet to allow management of MySQL resources, such as +databases, users, and grants. + +##Backwards Compatibility + +This module has just undergone a very large rewrite. Some new classes have been added, and many previous classes and configurations work differently than before. We've attempted to handle backwards compatibility automatically by adding a +`attempt_compatibility_mode` parameter to the main mysql class. If you set +this to 'true' it will attempt to map your previous parameters into the new +`mysql::server` class. + +#####WARNING + +Compatibility mode may fail. It may eat your MySQL server. PLEASE test it before running it live, even if the test is just a no-op and manual comparison. Please be careful! + +##Setup + +###What MySQL affects + +* MySQL package +* MySQL configuration files +* MySQL service + +###Beginning with MySQL + +If you just want a server installed with the default options you can run +`include '::mysql::server'`. + +If you need to customize options, such as the root +password or `/etc/my.cnf` settings, then you must also pass in an override hash: + +```puppet +class { '::mysql::server': + root_password => 'strongpassword', + override_options => { 'mysqld' => { 'max_connections' => '1024' } } +} +``` + +##Usage + +All interaction for the server is done via `mysql::server`. To install the +client you use `mysql::client`, and to install bindings you can use +`mysql::bindings`. + +###Overrides + +The hash structure for overrides in `mysql::server` is as follows: + +```puppet +$override_options = { + 'section' => { + 'item' => 'thing', + } +} +``` + +For items that you would traditionally represent as: + +
+[section]
+thing = X
+
+ +You can just make an entry like `thing => true`, `thing => value`, or `thing => "` in the hash. You can also pass an array `thing => ['value', 'value2']` or even list each `thing => value` separately on separate lines. MySQL doesn't care if 'thing' is alone or set to a value; it'll happily accept both. To keep an option out of the my.cnf file, e.g. when using override_options to revert to a default value, you can pass thing => undef. +If an option needs multiple instances, you can pass an array. For example + +```puppet +$override_options = { + 'mysqld' => { + 'replicate-do-db' => ['base1', 'base2'], + } +} +``` + +will produce + +
+[mysql]
+replicate-do-db = base1
+replicate-do-db = base2
+
+ +###Custom configuration + +To add custom MySQL configuration, drop additional files into +`/etc/mysql/conf.d/`. Dropping files into conf.d allows you to override settings or add additional ones, which is helpful if you choose not to use `override_options` in `mysql::server`. The conf.d location is hardcoded into the my.cnf template file. + +##Reference + +###Classes + +####Public classes +* `mysql::server`: Installs and configures MySQL. +* `mysql::server::account_security`: Deletes default MySQL accounts. +* `mysql::server::monitor`: Sets up a monitoring user. +* `mysql::server::mysqltuner`: Installs MySQL tuner script. +* `mysql::server::backup`: Sets up MySQL backups via cron. +* `mysql::bindings`: Installs various MySQL language bindings. +* `mysql::client`: Installs MySQL client (for non-servers). + +####Private classes +* `mysql::server::install`: Installs packages. +* `mysql::server::config`: Configures MYSQL. +* `mysql::server::service`: Manages service. +* `mysql::server::root_password`: Sets MySQL root password. +* `mysql::server::providers`: Creates users, grants, and databases. +* `mysql::bindings::java`: Installs Java bindings. +* `mysql::bindings::perl`: Installs Perl bindings. +* `mysql::bindings::python`: Installs Python bindings. +* `mysql::bindings::ruby`: Installs Ruby bindings. +* `mysql::client::install`: Installs MySQL client. + +###Parameters + +####mysql::server + +#####`root_password` + +The MySQL root password. Puppet will attempt to set the root password and update `/root/.my.cnf` with it. + +#####`old_root_password` + +The previous root password (**REQUIRED** if you wish to change the root password via Puppet.) + +#####`override_options` + +The hash of override options to pass into MySQL. It can be structured +like a hash in the my.cnf file, so entries look like + +```puppet +$override_options = { + 'section' => { + 'item' => 'thing', + } +} +``` + +For items that you would traditionally represent as: + +
+[section]
+thing = X
+
+ +You can just make an entry like `thing => true`, `thing => value`, or `thing => "` in the hash. You can also pass an array `thing => ['value', 'value2']` or even list each `thing => value` separately on separate lines. MySQL doesn't care if 'thing' is alone or set to a value; it'll happily accept both. To keep an option out of the my.cnf file, e.g. when using override_options to revert to a default value, you can pass thing => undef. + +#####`config_file` + +The location of the MySQL configuration file. + +#####`manage_config_file` + +Whether the MySQL configuration file should be managed. + +#####`purge_conf_dir` + +Whether the conf.d directory should be purged. + +#####`restart` + +Whether the service should be restarted when things change. + +#####`root_group` + +What is the group used for root? + +#####`package_ensure` + +What to set the package to. Can be 'present', 'absent', or 'x.y.z'. + +#####`package_name` + +The name of the mysql server package to install. + +#####`remove_default_accounts` + +Boolean to decide if we should automatically include +`mysql::server::account_security`. + +#####`service_enabled` + +Boolean to decide if the service should be enabled. + +#####`service_manage` + +Boolean to decide if the service should be managed. + +#####`service_name` + +The name of the mysql server service. + +#####`service_provider` + +The provider to use to manage the service. + +#####`users` + +Optional hash of users to create, which are passed to [mysql_user](#mysql_user). + +```puppet +$users = { + 'someuser@localhost' => { + ensure => 'present', + max_connections_per_hour => '0', + max_queries_per_hour => '0', + max_updates_per_hour => '0', + max_user_connections => '0', + password_hash => '*F3A2A51A9B0F2BE2468926B4132313728C250DBF', + }, +} +``` + +#####`grants` + +Optional hash of grants, which are passed to [mysql_grant](#mysql_grant). + +```puppet +$grants = { + 'someuser@localhost/somedb.*' => { + ensure => 'present', + options => ['GRANT'], + privileges => ['SELECT', 'INSERT', 'UPDATE', 'DELETE'], + table => 'somedb.*', + user => 'someuser@localhost', + }, +} +``` + +#####`databases` + +Optional hash of databases to create, which are passed to [mysql_database](#mysql_database). + +```puppet +$databases = { + 'somedb' => { + ensure => 'present', + charset => 'utf8', + }, +} +``` + +####mysql::server::backup + +#####`backupuser` + +MySQL user to create for backups. + +#####`backuppassword` + +MySQL user password for backups. + +#####`backupdir` + +Directory to back up into. + +#####`backupdirmode` + +Permissions applied to the backup directory. This parameter is passed directly +to the `file` resource. + +#####`backupdirowner` + +Owner for the backup directory. This parameter is passed directly to the `file` +resource. + +#####`backupdirgroup` + +Group owner for the backup directory. This parameter is passed directly to the +`file` resource. + +#####`backupcompress` + +Boolean to determine if backups should be compressed. + +#####`backuprotate` + +How many days to keep backups for. + +#####`delete_before_dump` + +Boolean to determine if you should cleanup before backing up or after. + +#####`backupdatabases` + +Array of databases to specifically back up. + +#####`file_per_database` + +Whether a separate file be used per database. + +#####`ensure` + +Allows you to remove the backup scripts. Can be 'present' or 'absent'. + +#####`time` + +An array of two elements to set the backup time. Allows ['23', '5'] or ['3', '45'] for HH:MM times. + +#####`postscript` + +A script that is executed at when the backup is finished. This could be used to (r)sync the backup to a central store. This script can be either a single line that is directly executed or a number of lines, when supplied as an array. It could also be one or more externally managed (executable) files. + +####mysql::server::monitor + +#####`mysql_monitor_username` + +The username to create for MySQL monitoring. + +#####`mysql_monitor_password` + +The password to create for MySQL monitoring. + +#####`mysql_monitor_hostname` + +The hostname to allow to access the MySQL monitoring user. + +####mysql::bindings + +#####`java_enable` + +Boolean to decide if the Java bindings should be installed. + +#####`perl_enable` + +Boolean to decide if the Perl bindings should be installed. + +#####`php_enable` + +Boolean to decide if the PHP bindings should be installed. + +#####`python_enable` + +Boolean to decide if the Python bindings should be installed. + +#####`ruby_enable` + +Boolean to decide if the Ruby bindings should be installed. + +#####`java_package_ensure` + +What to set the package to. Can be 'present', 'absent', or 'x.y.z'. + +#####`java_package_name` + +The name of the package to install. + +#####`java_package_provider` + +What provider should be used to install the package. + +#####`perl_package_ensure` + +What to set the package to. Can be 'present', 'absent', or 'x.y.z'. + +#####`perl_package_name` + +The name of the package to install. + +#####`perl_package_provider` + +What provider should be used to install the package. + +#####`python_package_ensure` + +What to set the package to. Can be 'present', 'absent', or 'x.y.z'. + +#####`python_package_name` + +The name of the package to install. + +#####`python_package_provider` + +What provider should be used to install the package. + +#####`ruby_package_ensure` + +What to set the package to. Can be 'present', 'absent', or 'x.y.z'. + +#####`ruby_package_name` + +The name of the package to install. + +#####`ruby_package_provider` + +What provider should be used to install the package. + +####mysql::client + +#####`bindings_enable` + +Boolean to automatically install all bindings. + +#####`package_ensure` + +What to set the package to. Can be 'present', 'absent', or 'x.y.z'. + +#####`package_name` + +What is the name of the mysql client package to install. + +###Defines + +####mysql::db + +Creates a database with a user and assigns some privileges. + +```puppet + mysql::db { 'mydb': + user => 'myuser', + password => 'mypass', + host => 'localhost', + grant => ['SELECT', 'UPDATE'], + } +``` + +###Providers + +####mysql_database + +`mysql_database` can be used to create and manage databases within MySQL. + +```puppet +mysql_database { 'information_schema': + ensure => 'present', + charset => 'utf8', + collate => 'utf8_swedish_ci', +} +mysql_database { 'mysql': + ensure => 'present', + charset => 'latin1', + collate => 'latin1_swedish_ci', +} +``` + +####mysql_user + +`mysql_user` can be used to create and manage user grants within MySQL. + +```puppet +mysql_user { 'root@127.0.0.1': + ensure => 'present', + max_connections_per_hour => '0', + max_queries_per_hour => '0', + max_updates_per_hour => '0', + max_user_connections => '0', +} +``` + +####mysql_grant + +`mysql_grant` can be used to create grant permissions to access databases within +MySQL. To use it you must create the title of the resource as shown below, +following the pattern of `username@hostname/database.table`: + +```puppet +mysql_grant { 'root@localhost/*.*': + ensure => 'present', + options => ['GRANT'], + privileges => ['ALL'], + table => '*.*', + user => 'root@localhost', +} +``` + +##Limitations + +This module has been tested on: + +* RedHat Enterprise Linux 5/6 +* Debian 6/7 +* CentOS 5/6 +* Ubuntu 12.04 + +Testing on other platforms has been light and cannot be guaranteed. + +#Development + +Puppet Labs modules on the Puppet Forge are open projects, and community +contributions are essential for keeping them great. We can’t access the +huge number of platforms and myriad of hardware, software, and deployment +configurations that Puppet is intended to serve. + +We want to keep it as easy as possible to contribute changes so that our +modules work in your environment. There are a few guidelines that we need +contributors to follow so that we can have a chance of keeping on top of things. + +You can read the complete module contribution guide [on the Puppet Labs wiki.](http://projects.puppetlabs.com/projects/module-site/wiki/Module_contributing) + +### Authors + +This module is based on work by David Schmitt. The following contributors have contributed patches to this module (beyond Puppet Labs): + +* Larry Ludwig +* Christian G. Warden +* Daniel Black +* Justin Ellison +* Lowe Schmidt +* Matthias Pigulla +* William Van Hevelingen +* Michael Arnold +* Chris Weyl + diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mysql/Rakefile b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mysql/Rakefile new file mode 100644 index 00000000000..bb60173e570 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mysql/Rakefile @@ -0,0 +1,2 @@ +require 'puppetlabs_spec_helper/rake_tasks' +require 'rspec-system/rake_task' diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mysql/TODO b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mysql/TODO new file mode 100644 index 00000000000..39132939307 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mysql/TODO @@ -0,0 +1,8 @@ +The best that I can tell is that this code traces back to David Schmitt. It has been forked many times since then :) + +1. you cannot add databases to an instance that has a root password +2. you have to specify username as USER@BLAH or it cannot be found +3. mysql_grant does not complain if user does not exist +4. Needs support for pre-seeding on debian +5. the types may need to take user/password +6. rather or not to configure /etc/.my.cnf should be configurable diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mysql/files/mysqltuner.pl b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mysql/files/mysqltuner.pl new file mode 100644 index 00000000000..46cdb7f42f9 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mysql/files/mysqltuner.pl @@ -0,0 +1,966 @@ +#!/usr/bin/perl -w +# mysqltuner.pl - Version 1.2.0 +# High Performance MySQL Tuning Script +# Copyright (C) 2006-2011 Major Hayden - major@mhtx.net +# +# For the latest updates, please visit http://mysqltuner.com/ +# Git repository available at http://github.com/rackerhacker/MySQLTuner-perl +# +# 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, either version 3 of the License, or +# (at your option) any later version. +# +# 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 . +# +# This project would not be possible without help from: +# Matthew Montgomery Paul Kehrer Dave Burgess +# Jonathan Hinds Mike Jackson Nils Breunese +# Shawn Ashlee Luuk Vosslamber Ville Skytta +# Trent Hornibrook Jason Gill Mark Imbriaco +# Greg Eden Aubin Galinotti Giovanni Bechis +# Bill Bradford Ryan Novosielski Michael Scheidell +# Blair Christensen Hans du Plooy Victor Trac +# Everett Barnes Tom Krouper Gary Barrueto +# Simon Greenaway Adam Stein Isart Montane +# Baptiste M. +# +# Inspired by Matthew Montgomery's tuning-primer.sh script: +# http://forge.mysql.com/projects/view.php?id=44 +# +use strict; +use warnings; +use diagnostics; +use File::Spec; +use Getopt::Long; + +# Set up a few variables for use in the script +my $tunerversion = "1.2.0"; +my (@adjvars, @generalrec); + +# Set defaults +my %opt = ( + "nobad" => 0, + "nogood" => 0, + "noinfo" => 0, + "nocolor" => 0, + "forcemem" => 0, + "forceswap" => 0, + "host" => 0, + "socket" => 0, + "port" => 0, + "user" => 0, + "pass" => 0, + "skipsize" => 0, + "checkversion" => 0, + ); + +# Gather the options from the command line +GetOptions(\%opt, + 'nobad', + 'nogood', + 'noinfo', + 'nocolor', + 'forcemem=i', + 'forceswap=i', + 'host=s', + 'socket=s', + 'port=i', + 'user=s', + 'pass=s', + 'skipsize', + 'checkversion', + 'help', + ); + +if (defined $opt{'help'} && $opt{'help'} == 1) { usage(); } + +sub usage { + # Shown with --help option passed + print "\n". + " MySQLTuner $tunerversion - MySQL High Performance Tuning Script\n". + " Bug reports, feature requests, and downloads at http://mysqltuner.com/\n". + " Maintained by Major Hayden (major\@mhtx.net) - Licensed under GPL\n". + "\n". + " Important Usage Guidelines:\n". + " To run the script with the default options, run the script without arguments\n". + " Allow MySQL server to run for at least 24-48 hours before trusting suggestions\n". + " Some routines may require root level privileges (script will provide warnings)\n". + " You must provide the remote server's total memory when connecting to other servers\n". + "\n". + " Connection and Authentication\n". + " --host Connect to a remote host to perform tests (default: localhost)\n". + " --socket Use a different socket for a local connection\n". + " --port Port to use for connection (default: 3306)\n". + " --user Username to use for authentication\n". + " --pass Password to use for authentication\n". + "\n". + " Performance and Reporting Options\n". + " --skipsize Don't enumerate tables and their types/sizes (default: on)\n". + " (Recommended for servers with many tables)\n". + " --checkversion Check for updates to MySQLTuner (default: don't check)\n". + " --forcemem Amount of RAM installed in megabytes\n". + " --forceswap Amount of swap memory configured in megabytes\n". + "\n". + " Output Options:\n". + " --nogood Remove OK responses\n". + " --nobad Remove negative/suggestion responses\n". + " --noinfo Remove informational responses\n". + " --nocolor Don't print output in color\n". + "\n"; + exit; +} + +my $devnull = File::Spec->devnull(); + +# Setting up the colors for the print styles +my $good = ($opt{nocolor} == 0)? "[\e[0;32mOK\e[0m]" : "[OK]" ; +my $bad = ($opt{nocolor} == 0)? "[\e[0;31m!!\e[0m]" : "[!!]" ; +my $info = ($opt{nocolor} == 0)? "[\e[0;34m--\e[0m]" : "[--]" ; + +# Functions that handle the print styles +sub goodprint { print $good." ".$_[0] unless ($opt{nogood} == 1); } +sub infoprint { print $info." ".$_[0] unless ($opt{noinfo} == 1); } +sub badprint { print $bad." ".$_[0] unless ($opt{nobad} == 1); } +sub redwrap { return ($opt{nocolor} == 0)? "\e[0;31m".$_[0]."\e[0m" : $_[0] ; } +sub greenwrap { return ($opt{nocolor} == 0)? "\e[0;32m".$_[0]."\e[0m" : $_[0] ; } + +# Calculates the parameter passed in bytes, and then rounds it to one decimal place +sub hr_bytes { + my $num = shift; + if ($num >= (1024**3)) { #GB + return sprintf("%.1f",($num/(1024**3)))."G"; + } elsif ($num >= (1024**2)) { #MB + return sprintf("%.1f",($num/(1024**2)))."M"; + } elsif ($num >= 1024) { #KB + return sprintf("%.1f",($num/1024))."K"; + } else { + return $num."B"; + } +} + +# Calculates the parameter passed in bytes, and then rounds it to the nearest integer +sub hr_bytes_rnd { + my $num = shift; + if ($num >= (1024**3)) { #GB + return int(($num/(1024**3)))."G"; + } elsif ($num >= (1024**2)) { #MB + return int(($num/(1024**2)))."M"; + } elsif ($num >= 1024) { #KB + return int(($num/1024))."K"; + } else { + return $num."B"; + } +} + +# Calculates the parameter passed to the nearest power of 1000, then rounds it to the nearest integer +sub hr_num { + my $num = shift; + if ($num >= (1000**3)) { # Billions + return int(($num/(1000**3)))."B"; + } elsif ($num >= (1000**2)) { # Millions + return int(($num/(1000**2)))."M"; + } elsif ($num >= 1000) { # Thousands + return int(($num/1000))."K"; + } else { + return $num; + } +} + +# Calculates uptime to display in a more attractive form +sub pretty_uptime { + my $uptime = shift; + my $seconds = $uptime % 60; + my $minutes = int(($uptime % 3600) / 60); + my $hours = int(($uptime % 86400) / (3600)); + my $days = int($uptime / (86400)); + my $uptimestring; + if ($days > 0) { + $uptimestring = "${days}d ${hours}h ${minutes}m ${seconds}s"; + } elsif ($hours > 0) { + $uptimestring = "${hours}h ${minutes}m ${seconds}s"; + } elsif ($minutes > 0) { + $uptimestring = "${minutes}m ${seconds}s"; + } else { + $uptimestring = "${seconds}s"; + } + return $uptimestring; +} + +# Retrieves the memory installed on this machine +my ($physical_memory,$swap_memory,$duflags); +sub os_setup { + sub memerror { + badprint "Unable to determine total memory/swap; use '--forcemem' and '--forceswap'\n"; + exit; + } + my $os = `uname`; + $duflags = ($os =~ /Linux/) ? '-b' : ''; + if ($opt{'forcemem'} > 0) { + $physical_memory = $opt{'forcemem'} * 1048576; + infoprint "Assuming $opt{'forcemem'} MB of physical memory\n"; + if ($opt{'forceswap'} > 0) { + $swap_memory = $opt{'forceswap'} * 1048576; + infoprint "Assuming $opt{'forceswap'} MB of swap space\n"; + } else { + $swap_memory = 0; + badprint "Assuming 0 MB of swap space (use --forceswap to specify)\n"; + } + } else { + if ($os =~ /Linux/) { + $physical_memory = `free -b | grep Mem | awk '{print \$2}'` or memerror; + $swap_memory = `free -b | grep Swap | awk '{print \$2}'` or memerror; + } elsif ($os =~ /Darwin/) { + $physical_memory = `sysctl -n hw.memsize` or memerror; + $swap_memory = `sysctl -n vm.swapusage | awk '{print \$3}' | sed 's/\..*\$//'` or memerror; + } elsif ($os =~ /NetBSD|OpenBSD/) { + $physical_memory = `sysctl -n hw.physmem` or memerror; + if ($physical_memory < 0) { + $physical_memory = `sysctl -n hw.physmem64` or memerror; + } + $swap_memory = `swapctl -l | grep '^/' | awk '{ s+= \$2 } END { print s }'` or memerror; + } elsif ($os =~ /BSD/) { + $physical_memory = `sysctl -n hw.realmem`; + $swap_memory = `swapinfo | grep '^/' | awk '{ s+= \$2 } END { print s }'`; + } elsif ($os =~ /SunOS/) { + $physical_memory = `/usr/sbin/prtconf | grep Memory | cut -f 3 -d ' '` or memerror; + chomp($physical_memory); + $physical_memory = $physical_memory*1024*1024; + } elsif ($os =~ /AIX/) { + $physical_memory = `lsattr -El sys0 | grep realmem | awk '{print \$2}'` or memerror; + chomp($physical_memory); + $physical_memory = $physical_memory*1024; + $swap_memory = `lsps -as | awk -F"(MB| +)" '/MB /{print \$2}'` or memerror; + chomp($swap_memory); + $swap_memory = $swap_memory*1024*1024; + } + } + chomp($physical_memory); +} + +# Checks to see if a MySQL login is possible +my ($mysqllogin,$doremote,$remotestring); +sub mysql_setup { + $doremote = 0; + $remotestring = ''; + my $command = `which mysqladmin`; + chomp($command); + if (! -e $command) { + badprint "Unable to find mysqladmin in your \$PATH. Is MySQL installed?\n"; + exit; + } + # Are we being asked to connect via a socket? + if ($opt{socket} ne 0) { + $remotestring = " -S $opt{socket}"; + } + # Are we being asked to connect to a remote server? + if ($opt{host} ne 0) { + chomp($opt{host}); + $opt{port} = ($opt{port} eq 0)? 3306 : $opt{port} ; + # If we're doing a remote connection, but forcemem wasn't specified, we need to exit + if ($opt{'forcemem'} eq 0) { + badprint "The --forcemem option is required for remote connections\n"; + exit; + } + infoprint "Performing tests on $opt{host}:$opt{port}\n"; + $remotestring = " -h $opt{host} -P $opt{port}"; + $doremote = 1; + } + # Did we already get a username and password passed on the command line? + if ($opt{user} ne 0 and $opt{pass} ne 0) { + $mysqllogin = "-u $opt{user} -p'$opt{pass}'".$remotestring; + my $loginstatus = `mysqladmin ping $mysqllogin 2>&1`; + if ($loginstatus =~ /mysqld is alive/) { + goodprint "Logged in using credentials passed on the command line\n"; + return 1; + } else { + badprint "Attempted to use login credentials, but they were invalid\n"; + exit 0; + } + } + if ( -r "/etc/psa/.psa.shadow" and $doremote == 0 ) { + # It's a Plesk box, use the available credentials + $mysqllogin = "-u admin -p`cat /etc/psa/.psa.shadow`"; + my $loginstatus = `mysqladmin ping $mysqllogin 2>&1`; + unless ($loginstatus =~ /mysqld is alive/) { + badprint "Attempted to use login credentials from Plesk, but they failed.\n"; + exit 0; + } + } elsif ( -r "/etc/mysql/debian.cnf" and $doremote == 0 ){ + # We have a debian maintenance account, use it + $mysqllogin = "--defaults-extra-file=/etc/mysql/debian.cnf"; + my $loginstatus = `mysqladmin $mysqllogin ping 2>&1`; + if ($loginstatus =~ /mysqld is alive/) { + goodprint "Logged in using credentials from debian maintenance account.\n"; + return 1; + } else { + badprint "Attempted to use login credentials from debian maintenance account, but they failed.\n"; + exit 0; + } + } else { + # It's not Plesk or debian, we should try a login + my $loginstatus = `mysqladmin $remotestring ping 2>&1`; + if ($loginstatus =~ /mysqld is alive/) { + # Login went just fine + $mysqllogin = " $remotestring "; + # Did this go well because of a .my.cnf file or is there no password set? + my $userpath = `printenv HOME`; + if (length($userpath) > 0) { + chomp($userpath); + } + unless ( -e "${userpath}/.my.cnf" ) { + badprint "Successfully authenticated with no password - SECURITY RISK!\n"; + } + return 1; + } else { + print STDERR "Please enter your MySQL administrative login: "; + my $name = <>; + print STDERR "Please enter your MySQL administrative password: "; + system("stty -echo >$devnull 2>&1"); + my $password = <>; + system("stty echo >$devnull 2>&1"); + chomp($password); + chomp($name); + $mysqllogin = "-u $name"; + if (length($password) > 0) { + $mysqllogin .= " -p'$password'"; + } + $mysqllogin .= $remotestring; + my $loginstatus = `mysqladmin ping $mysqllogin 2>&1`; + if ($loginstatus =~ /mysqld is alive/) { + print STDERR "\n"; + if (! length($password)) { + # Did this go well because of a .my.cnf file or is there no password set? + my $userpath = `ls -d ~`; + chomp($userpath); + unless ( -e "$userpath/.my.cnf" ) { + badprint "Successfully authenticated with no password - SECURITY RISK!\n"; + } + } + return 1; + } else { + print "\n".$bad." Attempted to use login credentials, but they were invalid.\n"; + exit 0; + } + exit 0; + } + } +} + +# Populates all of the variable and status hashes +my (%mystat,%myvar,$dummyselect); +sub get_all_vars { + # We need to initiate at least one query so that our data is useable + $dummyselect = `mysql $mysqllogin -Bse "SELECT VERSION();"`; + my @mysqlvarlist = `mysql $mysqllogin -Bse "SHOW /*!50000 GLOBAL */ VARIABLES;"`; + foreach my $line (@mysqlvarlist) { + $line =~ /([a-zA-Z_]*)\s*(.*)/; + $myvar{$1} = $2; + } + my @mysqlstatlist = `mysql $mysqllogin -Bse "SHOW /*!50000 GLOBAL */ STATUS;"`; + foreach my $line (@mysqlstatlist) { + $line =~ /([a-zA-Z_]*)\s*(.*)/; + $mystat{$1} = $2; + } + # Workaround for MySQL bug #59393 wrt. ignore-builtin-innodb + if (($myvar{'ignore_builtin_innodb'} || "") eq "ON") { + $myvar{'have_innodb'} = "NO"; + } + # have_* for engines is deprecated and will be removed in MySQL 5.6; + # check SHOW ENGINES and set corresponding old style variables. + # Also works around MySQL bug #59393 wrt. skip-innodb + my @mysqlenginelist = `mysql $mysqllogin -Bse "SHOW ENGINES;" 2>$devnull`; + foreach my $line (@mysqlenginelist) { + if ($line =~ /^([a-zA-Z_]+)\s+(\S+)/) { + my $engine = lc($1); + if ($engine eq "federated" || $engine eq "blackhole") { + $engine .= "_engine"; + } elsif ($engine eq "berkeleydb") { + $engine = "bdb"; + } + my $val = ($2 eq "DEFAULT") ? "YES" : $2; + $myvar{"have_$engine"} = $val; + } + } +} + +sub security_recommendations { + print "\n-------- Security Recommendations -------------------------------------------\n"; + my @mysqlstatlist = `mysql $mysqllogin -Bse "SELECT CONCAT(user, '\@', host) FROM mysql.user WHERE password = '' OR password IS NULL;"`; + if (@mysqlstatlist) { + foreach my $line (sort @mysqlstatlist) { + chomp($line); + badprint "User '".$line."' has no password set.\n"; + } + } else { + goodprint "All database users have passwords assigned\n"; + } +} + +sub get_replication_status { + my $slave_status = `mysql $mysqllogin -Bse "show slave status\\G"`; + my ($io_running) = ($slave_status =~ /slave_io_running\S*\s+(\S+)/i); + my ($sql_running) = ($slave_status =~ /slave_sql_running\S*\s+(\S+)/i); + if ($io_running eq 'Yes' && $sql_running eq 'Yes') { + if ($myvar{'read_only'} eq 'OFF') { + badprint "This replication slave is running with the read_only option disabled."; + } else { + goodprint "This replication slave is running with the read_only option enabled."; + } + } +} + +# Checks for updates to MySQLTuner +sub validate_tuner_version { + print "\n-------- General Statistics --------------------------------------------------\n"; + if ($opt{checkversion} eq 0) { + infoprint "Skipped version check for MySQLTuner script\n"; + return; + } + my $update; + my $url = "http://mysqltuner.com/versioncheck.php?v=$tunerversion"; + if (-e "/usr/bin/curl") { + $update = `/usr/bin/curl --connect-timeout 5 '$url' 2>$devnull`; + chomp($update); + } elsif (-e "/usr/bin/wget") { + $update = `/usr/bin/wget -e timestamping=off -T 5 -O - '$url' 2>$devnull`; + chomp($update); + } + if ($update eq 1) { + badprint "There is a new version of MySQLTuner available\n"; + } elsif ($update eq 0) { + goodprint "You have the latest version of MySQLTuner\n"; + } else { + infoprint "Unable to check for the latest MySQLTuner version\n"; + } +} + +# Checks for supported or EOL'ed MySQL versions +my ($mysqlvermajor,$mysqlverminor); +sub validate_mysql_version { + ($mysqlvermajor,$mysqlverminor) = $myvar{'version'} =~ /(\d)\.(\d)/; + if (!mysql_version_ge(5)) { + badprint "Your MySQL version ".$myvar{'version'}." is EOL software! Upgrade soon!\n"; + } elsif (mysql_version_ge(6)) { + badprint "Currently running unsupported MySQL version ".$myvar{'version'}."\n"; + } else { + goodprint "Currently running supported MySQL version ".$myvar{'version'}."\n"; + } +} + +# Checks if MySQL version is greater than equal to (major, minor) +sub mysql_version_ge { + my ($maj, $min) = @_; + return $mysqlvermajor > $maj || ($mysqlvermajor == $maj && $mysqlverminor >= ($min || 0)); +} + +# Checks for 32-bit boxes with more than 2GB of RAM +my ($arch); +sub check_architecture { + if ($doremote eq 1) { return; } + if (`uname` =~ /SunOS/ && `isainfo -b` =~ /64/) { + $arch = 64; + goodprint "Operating on 64-bit architecture\n"; + } elsif (`uname` !~ /SunOS/ && `uname -m` =~ /64/) { + $arch = 64; + goodprint "Operating on 64-bit architecture\n"; + } elsif (`uname` =~ /AIX/ && `bootinfo -K` =~ /64/) { + $arch = 64; + goodprint "Operating on 64-bit architecture\n"; + } else { + $arch = 32; + if ($physical_memory > 2147483648) { + badprint "Switch to 64-bit OS - MySQL cannot currently use all of your RAM\n"; + } else { + goodprint "Operating on 32-bit architecture with less than 2GB RAM\n"; + } + } +} + +# Start up a ton of storage engine counts/statistics +my (%enginestats,%enginecount,$fragtables); +sub check_storage_engines { + if ($opt{skipsize} eq 1) { + print "\n-------- Storage Engine Statistics -------------------------------------------\n"; + infoprint "Skipped due to --skipsize option\n"; + return; + } + print "\n-------- Storage Engine Statistics -------------------------------------------\n"; + infoprint "Status: "; + my $engines; + $engines .= (defined $myvar{'have_archive'} && $myvar{'have_archive'} eq "YES")? greenwrap "+Archive " : redwrap "-Archive " ; + $engines .= (defined $myvar{'have_bdb'} && $myvar{'have_bdb'} eq "YES")? greenwrap "+BDB " : redwrap "-BDB " ; + $engines .= (defined $myvar{'have_federated_engine'} && $myvar{'have_federated_engine'} eq "YES")? greenwrap "+Federated " : redwrap "-Federated " ; + $engines .= (defined $myvar{'have_innodb'} && $myvar{'have_innodb'} eq "YES")? greenwrap "+InnoDB " : redwrap "-InnoDB " ; + $engines .= (defined $myvar{'have_isam'} && $myvar{'have_isam'} eq "YES")? greenwrap "+ISAM " : redwrap "-ISAM " ; + $engines .= (defined $myvar{'have_ndbcluster'} && $myvar{'have_ndbcluster'} eq "YES")? greenwrap "+NDBCluster " : redwrap "-NDBCluster " ; + print "$engines\n"; + if (mysql_version_ge(5)) { + # MySQL 5 servers can have table sizes calculated quickly from information schema + my @templist = `mysql $mysqllogin -Bse "SELECT ENGINE,SUM(DATA_LENGTH),COUNT(ENGINE) FROM information_schema.TABLES WHERE TABLE_SCHEMA NOT IN ('information_schema','mysql') AND ENGINE IS NOT NULL GROUP BY ENGINE ORDER BY ENGINE ASC;"`; + foreach my $line (@templist) { + my ($engine,$size,$count); + ($engine,$size,$count) = $line =~ /([a-zA-Z_]*)\s+(\d+)\s+(\d+)/; + if (!defined($size)) { next; } + $enginestats{$engine} = $size; + $enginecount{$engine} = $count; + } + $fragtables = `mysql $mysqllogin -Bse "SELECT COUNT(TABLE_NAME) FROM information_schema.TABLES WHERE TABLE_SCHEMA NOT IN ('information_schema','mysql') AND Data_free > 0 AND NOT ENGINE='MEMORY';"`; + chomp($fragtables); + } else { + # MySQL < 5 servers take a lot of work to get table sizes + my @tblist; + # Now we build a database list, and loop through it to get storage engine stats for tables + my @dblist = `mysql $mysqllogin -Bse "SHOW DATABASES"`; + foreach my $db (@dblist) { + chomp($db); + if ($db eq "information_schema") { next; } + my @ixs = (1, 6, 9); + if (!mysql_version_ge(4, 1)) { + # MySQL 3.23/4.0 keeps Data_Length in the 5th (0-based) column + @ixs = (1, 5, 8); + } + push(@tblist, map { [ (split)[@ixs] ] } `mysql $mysqllogin -Bse "SHOW TABLE STATUS FROM \\\`$db\\\`"`); + } + # Parse through the table list to generate storage engine counts/statistics + $fragtables = 0; + foreach my $tbl (@tblist) { + my ($engine, $size, $datafree) = @$tbl; + if (defined $enginestats{$engine}) { + $enginestats{$engine} += $size; + $enginecount{$engine} += 1; + } else { + $enginestats{$engine} = $size; + $enginecount{$engine} = 1; + } + if ($datafree > 0) { + $fragtables++; + } + } + } + while (my ($engine,$size) = each(%enginestats)) { + infoprint "Data in $engine tables: ".hr_bytes_rnd($size)." (Tables: ".$enginecount{$engine}.")"."\n"; + } + # If the storage engine isn't being used, recommend it to be disabled + if (!defined $enginestats{'InnoDB'} && defined $myvar{'have_innodb'} && $myvar{'have_innodb'} eq "YES") { + badprint "InnoDB is enabled but isn't being used\n"; + push(@generalrec,"Add skip-innodb to MySQL configuration to disable InnoDB"); + } + if (!defined $enginestats{'BerkeleyDB'} && defined $myvar{'have_bdb'} && $myvar{'have_bdb'} eq "YES") { + badprint "BDB is enabled but isn't being used\n"; + push(@generalrec,"Add skip-bdb to MySQL configuration to disable BDB"); + } + if (!defined $enginestats{'ISAM'} && defined $myvar{'have_isam'} && $myvar{'have_isam'} eq "YES") { + badprint "ISAM is enabled but isn't being used\n"; + push(@generalrec,"Add skip-isam to MySQL configuration to disable ISAM (MySQL > 4.1.0)"); + } + # Fragmented tables + if ($fragtables > 0) { + badprint "Total fragmented tables: $fragtables\n"; + push(@generalrec,"Run OPTIMIZE TABLE to defragment tables for better performance"); + } else { + goodprint "Total fragmented tables: $fragtables\n"; + } +} + +my %mycalc; +sub calculations { + if ($mystat{'Questions'} < 1) { + badprint "Your server has not answered any queries - cannot continue..."; + exit 0; + } + # Per-thread memory + if (mysql_version_ge(4)) { + $mycalc{'per_thread_buffers'} = $myvar{'read_buffer_size'} + $myvar{'read_rnd_buffer_size'} + $myvar{'sort_buffer_size'} + $myvar{'thread_stack'} + $myvar{'join_buffer_size'}; + } else { + $mycalc{'per_thread_buffers'} = $myvar{'record_buffer'} + $myvar{'record_rnd_buffer'} + $myvar{'sort_buffer'} + $myvar{'thread_stack'} + $myvar{'join_buffer_size'}; + } + $mycalc{'total_per_thread_buffers'} = $mycalc{'per_thread_buffers'} * $myvar{'max_connections'}; + $mycalc{'max_total_per_thread_buffers'} = $mycalc{'per_thread_buffers'} * $mystat{'Max_used_connections'}; + + # Server-wide memory + $mycalc{'max_tmp_table_size'} = ($myvar{'tmp_table_size'} > $myvar{'max_heap_table_size'}) ? $myvar{'max_heap_table_size'} : $myvar{'tmp_table_size'} ; + $mycalc{'server_buffers'} = $myvar{'key_buffer_size'} + $mycalc{'max_tmp_table_size'}; + $mycalc{'server_buffers'} += (defined $myvar{'innodb_buffer_pool_size'}) ? $myvar{'innodb_buffer_pool_size'} : 0 ; + $mycalc{'server_buffers'} += (defined $myvar{'innodb_additional_mem_pool_size'}) ? $myvar{'innodb_additional_mem_pool_size'} : 0 ; + $mycalc{'server_buffers'} += (defined $myvar{'innodb_log_buffer_size'}) ? $myvar{'innodb_log_buffer_size'} : 0 ; + $mycalc{'server_buffers'} += (defined $myvar{'query_cache_size'}) ? $myvar{'query_cache_size'} : 0 ; + + # Global memory + $mycalc{'max_used_memory'} = $mycalc{'server_buffers'} + $mycalc{"max_total_per_thread_buffers"}; + $mycalc{'total_possible_used_memory'} = $mycalc{'server_buffers'} + $mycalc{'total_per_thread_buffers'}; + $mycalc{'pct_physical_memory'} = int(($mycalc{'total_possible_used_memory'} * 100) / $physical_memory); + + # Slow queries + $mycalc{'pct_slow_queries'} = int(($mystat{'Slow_queries'}/$mystat{'Questions'}) * 100); + + # Connections + $mycalc{'pct_connections_used'} = int(($mystat{'Max_used_connections'}/$myvar{'max_connections'}) * 100); + $mycalc{'pct_connections_used'} = ($mycalc{'pct_connections_used'} > 100) ? 100 : $mycalc{'pct_connections_used'} ; + + # Key buffers + if (mysql_version_ge(4, 1)) { + $mycalc{'pct_key_buffer_used'} = sprintf("%.1f",(1 - (($mystat{'Key_blocks_unused'} * $myvar{'key_cache_block_size'}) / $myvar{'key_buffer_size'})) * 100); + } + if ($mystat{'Key_read_requests'} > 0) { + $mycalc{'pct_keys_from_mem'} = sprintf("%.1f",(100 - (($mystat{'Key_reads'} / $mystat{'Key_read_requests'}) * 100))); + } else { + $mycalc{'pct_keys_from_mem'} = 0; + } + if ($doremote eq 0 and !mysql_version_ge(5)) { + my $size = 0; + $size += (split)[0] for `find $myvar{'datadir'} -name "*.MYI" 2>&1 | xargs du -L $duflags 2>&1`; + $mycalc{'total_myisam_indexes'} = $size; + } elsif (mysql_version_ge(5)) { + $mycalc{'total_myisam_indexes'} = `mysql $mysqllogin -Bse "SELECT IFNULL(SUM(INDEX_LENGTH),0) FROM information_schema.TABLES WHERE TABLE_SCHEMA NOT IN ('information_schema') AND ENGINE = 'MyISAM';"`; + } + if (defined $mycalc{'total_myisam_indexes'} and $mycalc{'total_myisam_indexes'} == 0) { + $mycalc{'total_myisam_indexes'} = "fail"; + } elsif (defined $mycalc{'total_myisam_indexes'}) { + chomp($mycalc{'total_myisam_indexes'}); + } + + # Query cache + if (mysql_version_ge(4)) { + $mycalc{'query_cache_efficiency'} = sprintf("%.1f",($mystat{'Qcache_hits'} / ($mystat{'Com_select'} + $mystat{'Qcache_hits'})) * 100); + if ($myvar{'query_cache_size'}) { + $mycalc{'pct_query_cache_used'} = sprintf("%.1f",100 - ($mystat{'Qcache_free_memory'} / $myvar{'query_cache_size'}) * 100); + } + if ($mystat{'Qcache_lowmem_prunes'} == 0) { + $mycalc{'query_cache_prunes_per_day'} = 0; + } else { + $mycalc{'query_cache_prunes_per_day'} = int($mystat{'Qcache_lowmem_prunes'} / ($mystat{'Uptime'}/86400)); + } + } + + # Sorting + $mycalc{'total_sorts'} = $mystat{'Sort_scan'} + $mystat{'Sort_range'}; + if ($mycalc{'total_sorts'} > 0) { + $mycalc{'pct_temp_sort_table'} = int(($mystat{'Sort_merge_passes'} / $mycalc{'total_sorts'}) * 100); + } + + # Joins + $mycalc{'joins_without_indexes'} = $mystat{'Select_range_check'} + $mystat{'Select_full_join'}; + $mycalc{'joins_without_indexes_per_day'} = int($mycalc{'joins_without_indexes'} / ($mystat{'Uptime'}/86400)); + + # Temporary tables + if ($mystat{'Created_tmp_tables'} > 0) { + if ($mystat{'Created_tmp_disk_tables'} > 0) { + $mycalc{'pct_temp_disk'} = int(($mystat{'Created_tmp_disk_tables'} / ($mystat{'Created_tmp_tables'} + $mystat{'Created_tmp_disk_tables'})) * 100); + } else { + $mycalc{'pct_temp_disk'} = 0; + } + } + + # Table cache + if ($mystat{'Opened_tables'} > 0) { + $mycalc{'table_cache_hit_rate'} = int($mystat{'Open_tables'}*100/$mystat{'Opened_tables'}); + } else { + $mycalc{'table_cache_hit_rate'} = 100; + } + + # Open files + if ($myvar{'open_files_limit'} > 0) { + $mycalc{'pct_files_open'} = int($mystat{'Open_files'}*100/$myvar{'open_files_limit'}); + } + + # Table locks + if ($mystat{'Table_locks_immediate'} > 0) { + if ($mystat{'Table_locks_waited'} == 0) { + $mycalc{'pct_table_locks_immediate'} = 100; + } else { + $mycalc{'pct_table_locks_immediate'} = int($mystat{'Table_locks_immediate'}*100/($mystat{'Table_locks_waited'} + $mystat{'Table_locks_immediate'})); + } + } + + # Thread cache + $mycalc{'thread_cache_hit_rate'} = int(100 - (($mystat{'Threads_created'} / $mystat{'Connections'}) * 100)); + + # Other + if ($mystat{'Connections'} > 0) { + $mycalc{'pct_aborted_connections'} = int(($mystat{'Aborted_connects'}/$mystat{'Connections'}) * 100); + } + if ($mystat{'Questions'} > 0) { + $mycalc{'total_reads'} = $mystat{'Com_select'}; + $mycalc{'total_writes'} = $mystat{'Com_delete'} + $mystat{'Com_insert'} + $mystat{'Com_update'} + $mystat{'Com_replace'}; + if ($mycalc{'total_reads'} == 0) { + $mycalc{'pct_reads'} = 0; + $mycalc{'pct_writes'} = 100; + } else { + $mycalc{'pct_reads'} = int(($mycalc{'total_reads'}/($mycalc{'total_reads'}+$mycalc{'total_writes'})) * 100); + $mycalc{'pct_writes'} = 100-$mycalc{'pct_reads'}; + } + } + + # InnoDB + if ($myvar{'have_innodb'} eq "YES") { + $mycalc{'innodb_log_size_pct'} = ($myvar{'innodb_log_file_size'} * 100 / $myvar{'innodb_buffer_pool_size'}); + } +} + +sub mysql_stats { + print "\n-------- Performance Metrics -------------------------------------------------\n"; + # Show uptime, queries per second, connections, traffic stats + my $qps; + if ($mystat{'Uptime'} > 0) { $qps = sprintf("%.3f",$mystat{'Questions'}/$mystat{'Uptime'}); } + if ($mystat{'Uptime'} < 86400) { push(@generalrec,"MySQL started within last 24 hours - recommendations may be inaccurate"); } + infoprint "Up for: ".pretty_uptime($mystat{'Uptime'})." (".hr_num($mystat{'Questions'}). + " q [".hr_num($qps)." qps], ".hr_num($mystat{'Connections'})." conn,". + " TX: ".hr_num($mystat{'Bytes_sent'}).", RX: ".hr_num($mystat{'Bytes_received'}).")\n"; + infoprint "Reads / Writes: ".$mycalc{'pct_reads'}."% / ".$mycalc{'pct_writes'}."%\n"; + + # Memory usage + infoprint "Total buffers: ".hr_bytes($mycalc{'server_buffers'})." global + ".hr_bytes($mycalc{'per_thread_buffers'})." per thread ($myvar{'max_connections'} max threads)\n"; + if ($mycalc{'total_possible_used_memory'} > 2*1024*1024*1024 && $arch eq 32) { + badprint "Allocating > 2GB RAM on 32-bit systems can cause system instability\n"; + badprint "Maximum possible memory usage: ".hr_bytes($mycalc{'total_possible_used_memory'})." ($mycalc{'pct_physical_memory'}% of installed RAM)\n"; + } elsif ($mycalc{'pct_physical_memory'} > 85) { + badprint "Maximum possible memory usage: ".hr_bytes($mycalc{'total_possible_used_memory'})." ($mycalc{'pct_physical_memory'}% of installed RAM)\n"; + push(@generalrec,"Reduce your overall MySQL memory footprint for system stability"); + } else { + goodprint "Maximum possible memory usage: ".hr_bytes($mycalc{'total_possible_used_memory'})." ($mycalc{'pct_physical_memory'}% of installed RAM)\n"; + } + + # Slow queries + if ($mycalc{'pct_slow_queries'} > 5) { + badprint "Slow queries: $mycalc{'pct_slow_queries'}% (".hr_num($mystat{'Slow_queries'})."/".hr_num($mystat{'Questions'}).")\n"; + } else { + goodprint "Slow queries: $mycalc{'pct_slow_queries'}% (".hr_num($mystat{'Slow_queries'})."/".hr_num($mystat{'Questions'}).")\n"; + } + if ($myvar{'long_query_time'} > 10) { push(@adjvars,"long_query_time (<= 10)"); } + if (defined($myvar{'log_slow_queries'})) { + if ($myvar{'log_slow_queries'} eq "OFF") { push(@generalrec,"Enable the slow query log to troubleshoot bad queries"); } + } + + # Connections + if ($mycalc{'pct_connections_used'} > 85) { + badprint "Highest connection usage: $mycalc{'pct_connections_used'}% ($mystat{'Max_used_connections'}/$myvar{'max_connections'})\n"; + push(@adjvars,"max_connections (> ".$myvar{'max_connections'}.")"); + push(@adjvars,"wait_timeout (< ".$myvar{'wait_timeout'}.")","interactive_timeout (< ".$myvar{'interactive_timeout'}.")"); + push(@generalrec,"Reduce or eliminate persistent connections to reduce connection usage") + } else { + goodprint "Highest usage of available connections: $mycalc{'pct_connections_used'}% ($mystat{'Max_used_connections'}/$myvar{'max_connections'})\n"; + } + + # Key buffer + if (!defined($mycalc{'total_myisam_indexes'}) and $doremote == 1) { + push(@generalrec,"Unable to calculate MyISAM indexes on remote MySQL server < 5.0.0"); + } elsif ($mycalc{'total_myisam_indexes'} =~ /^fail$/) { + badprint "Cannot calculate MyISAM index size - re-run script as root user\n"; + } elsif ($mycalc{'total_myisam_indexes'} == "0") { + badprint "None of your MyISAM tables are indexed - add indexes immediately\n"; + } else { + if ($myvar{'key_buffer_size'} < $mycalc{'total_myisam_indexes'} && $mycalc{'pct_keys_from_mem'} < 95) { + badprint "Key buffer size / total MyISAM indexes: ".hr_bytes($myvar{'key_buffer_size'})."/".hr_bytes($mycalc{'total_myisam_indexes'})."\n"; + push(@adjvars,"key_buffer_size (> ".hr_bytes($mycalc{'total_myisam_indexes'}).")"); + } else { + goodprint "Key buffer size / total MyISAM indexes: ".hr_bytes($myvar{'key_buffer_size'})."/".hr_bytes($mycalc{'total_myisam_indexes'})."\n"; + } + if ($mystat{'Key_read_requests'} > 0) { + if ($mycalc{'pct_keys_from_mem'} < 95) { + badprint "Key buffer hit rate: $mycalc{'pct_keys_from_mem'}% (".hr_num($mystat{'Key_read_requests'})." cached / ".hr_num($mystat{'Key_reads'})." reads)\n"; + } else { + goodprint "Key buffer hit rate: $mycalc{'pct_keys_from_mem'}% (".hr_num($mystat{'Key_read_requests'})." cached / ".hr_num($mystat{'Key_reads'})." reads)\n"; + } + } else { + # No queries have run that would use keys + } + } + + # Query cache + if (!mysql_version_ge(4)) { + # MySQL versions < 4.01 don't support query caching + push(@generalrec,"Upgrade MySQL to version 4+ to utilize query caching"); + } elsif ($myvar{'query_cache_size'} < 1) { + badprint "Query cache is disabled\n"; + push(@adjvars,"query_cache_size (>= 8M)"); + } elsif ($mystat{'Com_select'} == 0) { + badprint "Query cache cannot be analyzed - no SELECT statements executed\n"; + } else { + if ($mycalc{'query_cache_efficiency'} < 20) { + badprint "Query cache efficiency: $mycalc{'query_cache_efficiency'}% (".hr_num($mystat{'Qcache_hits'})." cached / ".hr_num($mystat{'Qcache_hits'}+$mystat{'Com_select'})." selects)\n"; + push(@adjvars,"query_cache_limit (> ".hr_bytes_rnd($myvar{'query_cache_limit'}).", or use smaller result sets)"); + } else { + goodprint "Query cache efficiency: $mycalc{'query_cache_efficiency'}% (".hr_num($mystat{'Qcache_hits'})." cached / ".hr_num($mystat{'Qcache_hits'}+$mystat{'Com_select'})." selects)\n"; + } + if ($mycalc{'query_cache_prunes_per_day'} > 98) { + badprint "Query cache prunes per day: $mycalc{'query_cache_prunes_per_day'}\n"; + if ($myvar{'query_cache_size'} > 128*1024*1024) { + push(@generalrec,"Increasing the query_cache size over 128M may reduce performance"); + push(@adjvars,"query_cache_size (> ".hr_bytes_rnd($myvar{'query_cache_size'}).") [see warning above]"); + } else { + push(@adjvars,"query_cache_size (> ".hr_bytes_rnd($myvar{'query_cache_size'}).")"); + } + } else { + goodprint "Query cache prunes per day: $mycalc{'query_cache_prunes_per_day'}\n"; + } + } + + # Sorting + if ($mycalc{'total_sorts'} == 0) { + # For the sake of space, we will be quiet here + # No sorts have run yet + } elsif ($mycalc{'pct_temp_sort_table'} > 10) { + badprint "Sorts requiring temporary tables: $mycalc{'pct_temp_sort_table'}% (".hr_num($mystat{'Sort_merge_passes'})." temp sorts / ".hr_num($mycalc{'total_sorts'})." sorts)\n"; + push(@adjvars,"sort_buffer_size (> ".hr_bytes_rnd($myvar{'sort_buffer_size'}).")"); + push(@adjvars,"read_rnd_buffer_size (> ".hr_bytes_rnd($myvar{'read_rnd_buffer_size'}).")"); + } else { + goodprint "Sorts requiring temporary tables: $mycalc{'pct_temp_sort_table'}% (".hr_num($mystat{'Sort_merge_passes'})." temp sorts / ".hr_num($mycalc{'total_sorts'})." sorts)\n"; + } + + # Joins + if ($mycalc{'joins_without_indexes_per_day'} > 250) { + badprint "Joins performed without indexes: $mycalc{'joins_without_indexes'}\n"; + push(@adjvars,"join_buffer_size (> ".hr_bytes($myvar{'join_buffer_size'}).", or always use indexes with joins)"); + push(@generalrec,"Adjust your join queries to always utilize indexes"); + } else { + # For the sake of space, we will be quiet here + # No joins have run without indexes + } + + # Temporary tables + if ($mystat{'Created_tmp_tables'} > 0) { + if ($mycalc{'pct_temp_disk'} > 25 && $mycalc{'max_tmp_table_size'} < 256*1024*1024) { + badprint "Temporary tables created on disk: $mycalc{'pct_temp_disk'}% (".hr_num($mystat{'Created_tmp_disk_tables'})." on disk / ".hr_num($mystat{'Created_tmp_disk_tables'} + $mystat{'Created_tmp_tables'})." total)\n"; + push(@adjvars,"tmp_table_size (> ".hr_bytes_rnd($myvar{'tmp_table_size'}).")"); + push(@adjvars,"max_heap_table_size (> ".hr_bytes_rnd($myvar{'max_heap_table_size'}).")"); + push(@generalrec,"When making adjustments, make tmp_table_size/max_heap_table_size equal"); + push(@generalrec,"Reduce your SELECT DISTINCT queries without LIMIT clauses"); + } elsif ($mycalc{'pct_temp_disk'} > 25 && $mycalc{'max_tmp_table_size'} >= 256) { + badprint "Temporary tables created on disk: $mycalc{'pct_temp_disk'}% (".hr_num($mystat{'Created_tmp_disk_tables'})." on disk / ".hr_num($mystat{'Created_tmp_disk_tables'} + $mystat{'Created_tmp_tables'})." total)\n"; + push(@generalrec,"Temporary table size is already large - reduce result set size"); + push(@generalrec,"Reduce your SELECT DISTINCT queries without LIMIT clauses"); + } else { + goodprint "Temporary tables created on disk: $mycalc{'pct_temp_disk'}% (".hr_num($mystat{'Created_tmp_disk_tables'})." on disk / ".hr_num($mystat{'Created_tmp_disk_tables'} + $mystat{'Created_tmp_tables'})." total)\n"; + } + } else { + # For the sake of space, we will be quiet here + # No temporary tables have been created + } + + # Thread cache + if ($myvar{'thread_cache_size'} eq 0) { + badprint "Thread cache is disabled\n"; + push(@generalrec,"Set thread_cache_size to 4 as a starting value"); + push(@adjvars,"thread_cache_size (start at 4)"); + } else { + if ($mycalc{'thread_cache_hit_rate'} <= 50) { + badprint "Thread cache hit rate: $mycalc{'thread_cache_hit_rate'}% (".hr_num($mystat{'Threads_created'})." created / ".hr_num($mystat{'Connections'})." connections)\n"; + push(@adjvars,"thread_cache_size (> $myvar{'thread_cache_size'})"); + } else { + goodprint "Thread cache hit rate: $mycalc{'thread_cache_hit_rate'}% (".hr_num($mystat{'Threads_created'})." created / ".hr_num($mystat{'Connections'})." connections)\n"; + } + } + + # Table cache + if ($mystat{'Open_tables'} > 0) { + if ($mycalc{'table_cache_hit_rate'} < 20) { + badprint "Table cache hit rate: $mycalc{'table_cache_hit_rate'}% (".hr_num($mystat{'Open_tables'})." open / ".hr_num($mystat{'Opened_tables'})." opened)\n"; + if (mysql_version_ge(5, 1)) { + push(@adjvars,"table_cache (> ".$myvar{'table_open_cache'}.")"); + } else { + push(@adjvars,"table_cache (> ".$myvar{'table_cache'}.")"); + } + push(@generalrec,"Increase table_cache gradually to avoid file descriptor limits"); + } else { + goodprint "Table cache hit rate: $mycalc{'table_cache_hit_rate'}% (".hr_num($mystat{'Open_tables'})." open / ".hr_num($mystat{'Opened_tables'})." opened)\n"; + } + } + + # Open files + if (defined $mycalc{'pct_files_open'}) { + if ($mycalc{'pct_files_open'} > 85) { + badprint "Open file limit used: $mycalc{'pct_files_open'}% (".hr_num($mystat{'Open_files'})."/".hr_num($myvar{'open_files_limit'}).")\n"; + push(@adjvars,"open_files_limit (> ".$myvar{'open_files_limit'}.")"); + } else { + goodprint "Open file limit used: $mycalc{'pct_files_open'}% (".hr_num($mystat{'Open_files'})."/".hr_num($myvar{'open_files_limit'}).")\n"; + } + } + + # Table locks + if (defined $mycalc{'pct_table_locks_immediate'}) { + if ($mycalc{'pct_table_locks_immediate'} < 95) { + badprint "Table locks acquired immediately: $mycalc{'pct_table_locks_immediate'}%\n"; + push(@generalrec,"Optimize queries and/or use InnoDB to reduce lock wait"); + } else { + goodprint "Table locks acquired immediately: $mycalc{'pct_table_locks_immediate'}% (".hr_num($mystat{'Table_locks_immediate'})." immediate / ".hr_num($mystat{'Table_locks_waited'}+$mystat{'Table_locks_immediate'})." locks)\n"; + } + } + + # Performance options + if (!mysql_version_ge(4, 1)) { + push(@generalrec,"Upgrade to MySQL 4.1+ to use concurrent MyISAM inserts"); + } elsif ($myvar{'concurrent_insert'} eq "OFF") { + push(@generalrec,"Enable concurrent_insert by setting it to 'ON'"); + } elsif ($myvar{'concurrent_insert'} eq 0) { + push(@generalrec,"Enable concurrent_insert by setting it to 1"); + } + if ($mycalc{'pct_aborted_connections'} > 5) { + badprint "Connections aborted: ".$mycalc{'pct_aborted_connections'}."%\n"; + push(@generalrec,"Your applications are not closing MySQL connections properly"); + } + + # InnoDB + if (defined $myvar{'have_innodb'} && $myvar{'have_innodb'} eq "YES" && defined $enginestats{'InnoDB'}) { + if ($myvar{'innodb_buffer_pool_size'} > $enginestats{'InnoDB'}) { + goodprint "InnoDB data size / buffer pool: ".hr_bytes($enginestats{'InnoDB'})."/".hr_bytes($myvar{'innodb_buffer_pool_size'})."\n"; + } else { + badprint "InnoDB data size / buffer pool: ".hr_bytes($enginestats{'InnoDB'})."/".hr_bytes($myvar{'innodb_buffer_pool_size'})."\n"; + push(@adjvars,"innodb_buffer_pool_size (>= ".hr_bytes_rnd($enginestats{'InnoDB'}).")"); + } + } +} + +# Take the two recommendation arrays and display them at the end of the output +sub make_recommendations { + print "\n-------- Recommendations -----------------------------------------------------\n"; + if (@generalrec > 0) { + print "General recommendations:\n"; + foreach (@generalrec) { print " ".$_."\n"; } + } + if (@adjvars > 0) { + print "Variables to adjust:\n"; + if ($mycalc{'pct_physical_memory'} > 90) { + print " *** MySQL's maximum memory usage is dangerously high ***\n". + " *** Add RAM before increasing MySQL buffer variables ***\n"; + } + foreach (@adjvars) { print " ".$_."\n"; } + } + if (@generalrec == 0 && @adjvars ==0) { + print "No additional performance recommendations are available.\n" + } + print "\n"; +} + +# --------------------------------------------------------------------------- +# BEGIN 'MAIN' +# --------------------------------------------------------------------------- +print "\n >> MySQLTuner $tunerversion - Major Hayden \n". + " >> Bug reports, feature requests, and downloads at http://mysqltuner.com/\n". + " >> Run with '--help' for additional options and output filtering\n"; +mysql_setup; # Gotta login first +os_setup; # Set up some OS variables +get_all_vars; # Toss variables/status into hashes +validate_tuner_version; # Check current MySQLTuner version +validate_mysql_version; # Check current MySQL version +check_architecture; # Suggest 64-bit upgrade +check_storage_engines; # Show enabled storage engines +security_recommendations; # Display some security recommendations +calculations; # Calculate everything we need +mysql_stats; # Print the server stats +make_recommendations; # Make recommendations based on stats +# --------------------------------------------------------------------------- +# END 'MAIN' +# --------------------------------------------------------------------------- + +# Local variables: +# indent-tabs-mode: t +# cperl-indent-level: 8 +# perl-indent-level: 8 +# End: diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mysql/lib/puppet/parser/functions/mysql_deepmerge.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mysql/lib/puppet/parser/functions/mysql_deepmerge.rb new file mode 100644 index 00000000000..aca9c7a3dad --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mysql/lib/puppet/parser/functions/mysql_deepmerge.rb @@ -0,0 +1,58 @@ +module Puppet::Parser::Functions + newfunction(:mysql_deepmerge, :type => :rvalue, :doc => <<-'ENDHEREDOC') do |args| + Recursively merges two or more hashes together and returns the resulting hash. + + For example: + + $hash1 = {'one' => 1, 'two' => 2, 'three' => { 'four' => 4 } } + $hash2 = {'two' => 'dos', 'three' => { 'five' => 5 } } + $merged_hash = mysql_deepmerge($hash1, $hash2) + # The resulting hash is equivalent to: + # $merged_hash = { 'one' => 1, 'two' => 'dos', 'three' => { 'four' => 4, 'five' => 5 } } + + When there is a duplicate key that is a hash, they are recursively merged. + When there is a duplicate key that is not a hash, the key in the rightmost hash will "win." + When there are conficting uses of dashes and underscores in two keys (which mysql would otherwise equate), + the rightmost style will win. + + ENDHEREDOC + + if args.length < 2 + raise Puppet::ParseError, ("mysql_deepmerge(): wrong number of arguments (#{args.length}; must be at least 2)") + end + + result = Hash.new + args.each do |arg| + next if arg.is_a? String and arg.empty? # empty string is synonym for puppet's undef + # If the argument was not a hash, skip it. + unless arg.is_a?(Hash) + raise Puppet::ParseError, "mysql_deepmerge: unexpected argument type #{arg.class}, only expects hash arguments" + end + + # Now we have to traverse our hash assigning our non-hash values + # to the matching keys in our result while following our hash values + # and repeating the process. + overlay( result, arg ) + end + return( result ) + end +end + +def has_normalized!(hash, key) + return true if hash.has_key?( key ) + return false unless key.match(/-|_/) + other_key = key.include?('-') ? key.gsub( '-', '_' ) : key.gsub( '_', '-' ) + return false unless hash.has_key?( other_key ) + hash[key] = hash.delete( other_key ) + return true; +end + +def overlay( hash1, hash2 ) + hash2.each do |key, value| + if(has_normalized!( hash1, key ) and value.is_a?(Hash) and hash1[key].is_a?(Hash)) + overlay( hash1[key], value ) + else + hash1[key] = value + end + end +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mysql/lib/puppet/parser/functions/mysql_password.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mysql/lib/puppet/parser/functions/mysql_password.rb new file mode 100644 index 00000000000..f057a3139da --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mysql/lib/puppet/parser/functions/mysql_password.rb @@ -0,0 +1,15 @@ +# hash a string as mysql's "PASSWORD()" function would do it +require 'digest/sha1' + +module Puppet::Parser::Functions + newfunction(:mysql_password, :type => :rvalue, :doc => <<-EOS + Returns the mysql password hash from the clear text password. + EOS + ) do |args| + + raise(Puppet::ParseError, 'mysql_password(): Wrong number of arguments ' + + "given (#{args.size} for 1)") if args.size != 1 + + '*' + Digest::SHA1.hexdigest(Digest::SHA1.digest(args[0])).upcase + end +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mysql/lib/puppet/parser/functions/mysql_strip_hash.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mysql/lib/puppet/parser/functions/mysql_strip_hash.rb new file mode 100644 index 00000000000..8e850d02a52 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mysql/lib/puppet/parser/functions/mysql_strip_hash.rb @@ -0,0 +1,21 @@ +module Puppet::Parser::Functions + newfunction(:mysql_strip_hash, :type => :rvalue, :arity => 1, :doc => <<-EOS +TEMPORARY FUNCTION: EXPIRES 2014-03-10 +When given a hash this function strips out all blank entries. +EOS + ) do |args| + + hash = args[0] + unless hash.is_a?(Hash) + raise(Puppet::ParseError, 'mysql_strip_hash(): Requires hash to work with') + end + + # Filter out all the top level blanks. + hash.reject{|k,v| v == ''}.each do |k,v| + if v.is_a?(Hash) + v.reject!{|ki,vi| vi == '' } + end + end + + end +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mysql/lib/puppet/provider/database/mysql.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mysql/lib/puppet/provider/database/mysql.rb new file mode 100644 index 00000000000..ace742967e5 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mysql/lib/puppet/provider/database/mysql.rb @@ -0,0 +1,41 @@ +require File.expand_path(File.join(File.dirname(__FILE__), '..', 'mysql')) +Puppet::Type.type(:database).provide(:mysql, :parent => Puppet::Provider::Mysql) do + desc 'Manages MySQL database.' + + defaultfor :kernel => 'Linux' + + optional_commands :mysql => 'mysql' + optional_commands :mysqladmin => 'mysqladmin' + + def self.instances + mysql([defaults_file, '-NBe', 'show databases'].compact).split("\n").collect do |name| + new(:name => name) + end + end + + def create + mysql([defaults_file, '-NBe', "create database `#{@resource[:name]}` character set #{resource[:charset]}"].compact) + end + + def destroy + mysqladmin([defaults_file, '-f', 'drop', @resource[:name]].compact) + end + + def charset + mysql([defaults_file, '-NBe', "show create database `#{resource[:name]}`"].compact).match(/.*?(\S+)\s(?:COLLATE.*)?\*\//)[1] + end + + def charset=(value) + mysql([defaults_file, '-NBe', "alter database `#{resource[:name]}` CHARACTER SET #{value}"].compact) + end + + def exists? + begin + mysql([defaults_file, '-NBe', 'show databases'].compact).match(/^#{@resource[:name]}$/) + rescue => e + debug(e.message) + return nil + end + end + +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mysql/lib/puppet/provider/database_grant/mysql.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mysql/lib/puppet/provider/database_grant/mysql.rb new file mode 100644 index 00000000000..eabc649c3dd --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mysql/lib/puppet/provider/database_grant/mysql.rb @@ -0,0 +1,199 @@ +# A grant is either global or per-db. This can be distinguished by the syntax +# of the name: +# user@host => global +# user@host/db => per-db + +require File.expand_path(File.join(File.dirname(__FILE__), '..', 'mysql')) +Puppet::Type.type(:database_grant).provide(:mysql, :parent => Puppet::Provider::Mysql) do + + desc 'Uses mysql as database.' + + defaultfor :kernel => 'Linux' + + optional_commands :mysql => 'mysql' + optional_commands :mysqladmin => 'mysqladmin' + + def self.prefetch(resources) + @user_privs = query_user_privs + @db_privs = query_db_privs + end + + def self.user_privs + @user_privs || query_user_privs + end + + def self.db_privs + @db_privs || query_db_privs + end + + def user_privs + self.class.user_privs + end + + def db_privs + self.class.db_privs + end + + def self.query_user_privs + results = mysql([defaults_file, 'mysql', '-Be', 'describe user'].compact) + column_names = results.split(/\n/).map { |l| l.chomp.split(/\t/)[0] } + @user_privs = column_names.delete_if { |e| !( e =~/_priv$/) } + end + + def self.query_db_privs + results = mysql([defaults_file, 'mysql', '-Be', 'describe db'].compact) + column_names = results.split(/\n/).map { |l| l.chomp.split(/\t/)[0] } + @db_privs = column_names.delete_if { |e| !(e =~/_priv$/) } + end + + def mysql_flush + mysqladmin([defaults_file, 'flush-privileges'].compact) + end + + # this parses the + def split_name(string) + matches = /^([^@]*)@([^\/]*)(\/(.*))?$/.match(string).captures.compact + case matches.length + when 2 + { + :type => :user, + :user => matches[0], + :host => matches[1] + } + when 4 + { + :type => :db, + :user => matches[0], + :host => matches[1], + :db => matches[3] + } + end + end + + def create_row + unless @resource.should(:privileges).empty? + name = split_name(@resource[:name]) + case name[:type] + when :user + mysql([defaults_file, 'mysql', '-e', "INSERT INTO user (host, user) VALUES ('%s', '%s')" % [ + name[:host], name[:user], + ]].compact) + when :db + mysql([defaults_file, 'mysql', '-e', "INSERT INTO db (host, user, db) VALUES ('%s', '%s', '%s')" % [ + name[:host], name[:user], name[:db], + ]].compact) + end + mysql_flush + end + end + + def destroy + mysql([defaults_file, 'mysql', '-e', "REVOKE ALL ON '%s'.* FROM '%s@%s'" % [ @resource[:privileges], @resource[:database], @resource[:name], @resource[:host] ]].compact) + end + + def row_exists? + name = split_name(@resource[:name]) + fields = [:user, :host] + if name[:type] == :db + fields << :db + end + not mysql([defaults_file, 'mysql', '-NBe', "SELECT '1' FROM %s WHERE %s" % [ name[:type], fields.map do |f| "%s='%s'" % [f, name[f]] end.join(' AND ')]].compact).empty? + end + + def all_privs_set? + all_privs = case split_name(@resource[:name])[:type] + when :user + user_privs + when :db + db_privs + end + all_privs = all_privs.collect do |p| p.downcase end.sort.join('|') + privs = privileges.collect do |p| p.downcase end.sort.join('|') + + all_privs == privs + end + + def privileges + name = split_name(@resource[:name]) + privs = '' + + case name[:type] + when :user + privs = mysql([defaults_file, 'mysql', '-Be', "select * from mysql.user where user='%s' and host='%s'" % [ name[:user], name[:host] ]].compact) + when :db + privs = mysql([defaults_file, 'mysql', '-Be', "select * from mysql.db where user='%s' and host='%s' and db='%s'" % [ name[:user], name[:host], name[:db] ]].compact) + end + + if privs.match(/^$/) + privs = [] # no result, no privs + else + # returns a line with field names and a line with values, each tab-separated + privs = privs.split(/\n/).map! do |l| l.chomp.split(/\t/) end + # transpose the lines, so we have key/value pairs + privs = privs[0].zip(privs[1]) + privs = privs.select do |p| p[0].match(/_priv$/) and p[1] == 'Y' end + end + + privs.collect do |p| p[0] end + end + + def privileges=(privs) + unless row_exists? + create_row + end + + # puts "Setting privs: ", privs.join(", ") + name = split_name(@resource[:name]) + stmt = '' + where = '' + all_privs = [] + case name[:type] + when :user + stmt = 'update user set ' + where = " where user='%s' and host='%s'" % [ name[:user], name[:host] ] + all_privs = user_privs + when :db + stmt = 'update db set ' + where = " where user='%s' and host='%s' and db='%s'" % [ name[:user], name[:host], name[:db] ] + all_privs = db_privs + end + + if privs[0].downcase == 'all' + privs = all_privs + end + + # Downcase the requested priviliges for case-insensitive selection + # we don't map! here because the all_privs object has to remain in + # the same case the DB gave it to us in + privs = privs.map { |p| p.downcase } + + # puts "stmt:", stmt + set = all_privs.collect do |p| "%s = '%s'" % [p, privs.include?(p.downcase) ? 'Y' : 'N'] end.join(', ') + # puts "set:", set + stmt = stmt << set << where + + validate_privs privs, all_privs + mysql([defaults_file, 'mysql', '-Be', stmt].compact) + mysql_flush + end + + def validate_privs(set_privs, all_privs) + all_privs = all_privs.collect { |p| p.downcase } + set_privs = set_privs.collect { |p| p.downcase } + invalid_privs = Array.new + hints = Array.new + # Test each of the user provided privs to see if they exist in all_privs + set_privs.each do |priv| + invalid_privs << priv unless all_privs.include?(priv) + hints << "#{priv}_priv" if all_privs.include?("#{priv}_priv") + end + unless invalid_privs.empty? + # Print a decently helpful and gramatically correct error message + hints = "Did you mean '#{hints.join(',')}'?" unless hints.empty? + p = invalid_privs.size > 1 ? ['s', 'are not valid'] : ['', 'is not valid'] + detail = ["The privilege#{p[0]} '#{invalid_privs.join(',')}' #{p[1]}."] + fail [detail, hints].join(' ') + end + end + +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mysql/lib/puppet/provider/database_user/mysql.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mysql/lib/puppet/provider/database_user/mysql.rb new file mode 100644 index 00000000000..71e76d5c369 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mysql/lib/puppet/provider/database_user/mysql.rb @@ -0,0 +1,65 @@ +require File.expand_path(File.join(File.dirname(__FILE__), '..', 'mysql')) +Puppet::Type.type(:database_user).provide(:mysql, :parent => Puppet::Provider::Mysql) do + + desc 'manage users for a mysql database.' + + defaultfor :kernel => 'Linux' + + commands :mysql => 'mysql' + commands :mysqladmin => 'mysqladmin' + + def self.instances + users = mysql([defaults_file, 'mysql', '-BNe' "select concat(User, '@',Host) as User from mysql.user"].compact).split("\n") + users.select{ |user| user =~ /.+@/ }.collect do |name| + new(:name => name) + end + end + + def create + merged_name = self.class.cmd_user(@resource[:name]) + password_hash = @resource.value(:password_hash) + max_user_connections = @resource.value(:max_user_connections) || 0 + + mysql([defaults_file, 'mysql', '-e', "grant usage on *.* to #{merged_name} identified by PASSWORD + '#{password_hash}' with max_user_connections #{max_user_connections}"].compact) + + exists? ? (return true) : (return false) + end + + def destroy + merged_name = self.class.cmd_user(@resource[:name]) + mysql([defaults_file, 'mysql', '-e', "drop user #{merged_name}"].compact) + + exists? ? (return false) : (return true) + end + + def password_hash + mysql([defaults_file, 'mysql', '-NBe', "select password from mysql.user where CONCAT(user, '@', host) = '#{@resource[:name]}'"].compact).chomp + end + + def password_hash=(string) + mysql([defaults_file, 'mysql', '-e', "SET PASSWORD FOR #{self.class.cmd_user(@resource[:name])} = '#{string}'"].compact) + + password_hash == string ? (return true) : (return false) + end + + def max_user_connections + mysql([defaults_file, "mysql", "-NBe", "select max_user_connections from mysql.user where CONCAT(user, '@', host) = '#{@resource[:name]}'"].compact).chomp + end + + def max_user_connections=(int) + mysql([defaults_file, "mysql", "-e", "grant usage on *.* to %s with max_user_connections #{int}" % [ self.class.cmd_user(@resource[:name])] ].compact).chomp + + max_user_connections == int ? (return true) : (return false) + end + + def exists? + not mysql([defaults_file, 'mysql', '-NBe', "select '1' from mysql.user where CONCAT(user, '@', host) = '%s'" % @resource.value(:name)].compact).empty? + end + + def flush + @property_hash.clear + mysqladmin([defaults_file, 'flush-privileges'].compact) + end + +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mysql/lib/puppet/provider/mysql.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mysql/lib/puppet/provider/mysql.rb new file mode 100644 index 00000000000..9b34ca00e27 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mysql/lib/puppet/provider/mysql.rb @@ -0,0 +1,70 @@ +class Puppet::Provider::Mysql < Puppet::Provider + + # Without initvars commands won't work. + initvars + commands :mysql => 'mysql' + commands :mysqladmin => 'mysqladmin' + + # Optional defaults file + def self.defaults_file + if File.file?("#{Facter.value(:root_home)}/.my.cnf") + "--defaults-extra-file=#{Facter.value(:root_home)}/.my.cnf" + else + nil + end + end + + def defaults_file + self.class.defaults_file + end + + def self.users + mysql([defaults_file, '-NBe', "SELECT CONCAT(User, '@',Host) AS User FROM mysql.user"].compact).split("\n") + end + + # Take root@localhost and munge it to 'root'@'localhost' + def self.cmd_user(user) + "'#{user.sub('@', "'@'")}'" + end + + # Take root.* and return ON `root`.* + def self.cmd_table(table) + table_string = '' + + # We can't escape *.* so special case this. + if table == '*.*' + table_string << '*.*' + # Special case also for PROCEDURES + elsif table.start_with?('PROCEDURE ') + table_string << table.sub(/^PROCEDURE (.*)(\..*)/, 'PROCEDURE `\1`\2') + else + table_string << table.sub(/^(.*)(\..*)/, '`\1`\2') + end + table_string + end + + def self.cmd_privs(privileges) + if privileges.include?('ALL') + return 'ALL PRIVILEGES' + else + priv_string = '' + privileges.each do |priv| + priv_string << "#{priv}, " + end + end + # Remove trailing , from the last element. + priv_string.sub(/, $/, '') + end + + # Take in potential options and build up a query string with them. + def self.cmd_options(options) + option_string = '' + options.each do |opt| + if opt == 'GRANT' + option_string << ' WITH GRANT OPTION' + end + end + option_string + end + +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mysql/lib/puppet/provider/mysql_database/mysql.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mysql/lib/puppet/provider/mysql_database/mysql.rb new file mode 100644 index 00000000000..ae9ab393024 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mysql/lib/puppet/provider/mysql_database/mysql.rb @@ -0,0 +1,68 @@ +require File.expand_path(File.join(File.dirname(__FILE__), '..', 'mysql')) +Puppet::Type.type(:mysql_database).provide(:mysql, :parent => Puppet::Provider::Mysql) do + desc 'Manages MySQL databases.' + + commands :mysql => 'mysql' + + def self.instances + mysql([defaults_file, '-NBe', 'show databases'].compact).split("\n").collect do |name| + attributes = {} + mysql([defaults_file, '-NBe', "show variables like '%_database'", name].compact).split("\n").each do |line| + k,v = line.split(/\s/) + attributes[k] = v + end + new(:name => name, + :ensure => :present, + :charset => attributes['character_set_database'], + :collate => attributes['collation_database'] + ) + end + end + + # We iterate over each mysql_database entry in the catalog and compare it against + # the contents of the property_hash generated by self.instances + def self.prefetch(resources) + databases = instances + resources.keys.each do |database| + if provider = databases.find { |db| db.name == database } + resources[database].provider = provider + end + end + end + + def create + mysql([defaults_file, '-NBe', "create database if not exists `#{@resource[:name]}` character set #{@resource[:charset]} collate #{@resource[:collate]}"].compact) + + @property_hash[:ensure] = :present + @property_hash[:charset] = @resource[:charset] + @property_hash[:collate] = @resource[:collate] + + exists? ? (return true) : (return false) + end + + def destroy + mysql([defaults_file, '-NBe', "drop database `#{@resource[:name]}`"].compact) + + @property_hash.clear + exists? ? (return false) : (return true) + end + + def exists? + @property_hash[:ensure] == :present || false + end + + mk_resource_methods + + def charset=(value) + mysql([defaults_file, '-NBe', "alter database `#{resource[:name]}` CHARACTER SET #{value}"].compact) + @property_hash[:charset] = value + charset == value ? (return true) : (return false) + end + + def collate=(value) + mysql([defaults_file, '-NBe', "alter database `#{resource[:name]}` COLLATE #{value}"].compact) + @property_hash[:collate] = value + collate == value ? (return true) : (return false) + end + +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mysql/lib/puppet/provider/mysql_grant/mysql.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mysql/lib/puppet/provider/mysql_grant/mysql.rb new file mode 100644 index 00000000000..7dabf462056 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mysql/lib/puppet/provider/mysql_grant/mysql.rb @@ -0,0 +1,120 @@ +require File.expand_path(File.join(File.dirname(__FILE__), '..', 'mysql')) +Puppet::Type.type(:mysql_grant).provide(:mysql, :parent => Puppet::Provider::Mysql) do + + desc 'Set grants for users in MySQL.' + + def self.instances + instances = [] + users.select{ |user| user =~ /.+@/ }.collect do |user| + user_string = self.cmd_user(user) + query = "SHOW GRANTS FOR #{user_string};" + grants = mysql([defaults_file, "-NBe", query].compact) + # Once we have the list of grants generate entries for each. + grants.each_line do |grant| + # Match the munges we do in the type. + munged_grant = grant.delete("'").delete("`") + # Matching: GRANT (SELECT, UPDATE) PRIVILEGES ON (*.*) TO ('root')@('127.0.0.1') (WITH GRANT OPTION) + if match = munged_grant.match(/^GRANT\s(.+)\sON\s(.+)\sTO\s(.*)@(.*?)(\s.*)$/) + privileges, table, user, host, rest = match.captures + # Once we split privileges up on the , we need to make sure we + # shortern ALL PRIVILEGES to just all. + stripped_privileges = privileges.split(',').map do |priv| + priv == 'ALL PRIVILEGES' ? 'ALL' : priv.lstrip.rstrip + end + # Same here, but to remove OPTION leaving just GRANT. + options = ['GRANT'] if rest.match(/WITH\sGRANT\sOPTION/) + # We need to return an array of instances so capture these + instances << new( + :name => "#{user}@#{host}/#{table}", + :ensure => :present, + :privileges => stripped_privileges.sort, + :table => table, + :user => "#{user}@#{host}", + :options => options + ) + end + end + end + return instances + end + + def self.prefetch(resources) + users = instances + resources.keys.each do |name| + if provider = users.find { |user| user.name == name } + resources[name].provider = provider + end + end + end + + def grant(user, table, privileges, options) + user_string = self.class.cmd_user(user) + priv_string = self.class.cmd_privs(privileges) + table_string = self.class.cmd_table(table) + query = "GRANT #{priv_string}" + query << " ON #{table_string}" + query << " TO #{user_string}" + query << self.class.cmd_options(options) unless options.nil? + mysql([defaults_file, '-e', query].compact) + end + + def create + grant(@resource[:user], @resource[:table], @resource[:privileges], @resource[:options]) + + @property_hash[:ensure] = :present + @property_hash[:table] = @resource[:table] + @property_hash[:user] = @resource[:user] + @property_hash[:options] = @resource[:options] if @resource[:options] + @property_hash[:privileges] = @resource[:privileges] + + exists? ? (return true) : (return false) + end + + def revoke(user, table) + user_string = self.class.cmd_user(user) + table_string = self.class.cmd_table(table) + + query = "REVOKE ALL ON #{table_string} FROM #{user_string}" + mysql([defaults_file, '-e', query].compact) + # revoke grant option needs to be a extra query, because + # "REVOKE ALL PRIVILEGES, GRANT OPTION [..]" is only valid mysql syntax + # if no ON clause is used. + query = "REVOKE GRANT OPTION ON #{table_string} FROM #{user_string}" + mysql([defaults_file, '-e', query].compact) + end + + def destroy + revoke(@property_hash[:user], @property_hash[:table]) + @property_hash.clear + + exists? ? (return false) : (return true) + end + + def exists? + @property_hash[:ensure] == :present || false + end + + def flush + @property_hash.clear + mysql([defaults_file, '-NBe', 'FLUSH PRIVILEGES'].compact) + end + + mk_resource_methods + + def privileges=(privileges) + revoke(@property_hash[:user], @property_hash[:table]) + grant(@property_hash[:user], @property_hash[:table], privileges, @property_hash[:options]) + @property_hash[:privileges] = privileges + + self.privileges + end + + def options=(options) + revoke(@property_hash[:user], @property_hash[:table]) + grant(@property_hash[:user], @property_hash[:table], @property_hash[:privileges], options) + @property_hash[:options] = options + + self.options + end + +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mysql/lib/puppet/provider/mysql_user/mysql.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mysql/lib/puppet/provider/mysql_user/mysql.rb new file mode 100644 index 00000000000..066ea0b00d9 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mysql/lib/puppet/provider/mysql_user/mysql.rb @@ -0,0 +1,115 @@ +require File.expand_path(File.join(File.dirname(__FILE__), '..', 'mysql')) +Puppet::Type.type(:mysql_user).provide(:mysql, :parent => Puppet::Provider::Mysql) do + + desc 'manage users for a mysql database.' + commands :mysql => 'mysql' + + # Build a property_hash containing all the discovered information about MySQL + # users. + def self.instances + users = mysql([defaults_file, '-NBe', + "SELECT CONCAT(User, '@',Host) AS User FROM mysql.user"].compact).split("\n") + # To reduce the number of calls to MySQL we collect all the properties in + # one big swoop. + users.collect do |name| + query = "SELECT MAX_USER_CONNECTIONS, MAX_CONNECTIONS, MAX_QUESTIONS, MAX_UPDATES, PASSWORD FROM mysql.user WHERE CONCAT(user, '@', host) = '#{name}'" + @max_user_connections, @max_connections_per_hour, @max_queries_per_hour, + @max_updates_per_hour, @password = mysql([defaults_file, "-NBe", query].compact).split(/\s/) + + new(:name => name, + :ensure => :present, + :password_hash => @password, + :max_user_connections => @max_user_connections, + :max_connections_per_hour => @max_connections_per_hour, + :max_queries_per_hour => @max_queries_per_hour, + :max_updates_per_hour => @max_updates_per_hour + ) + end + end + + # We iterate over each mysql_user entry in the catalog and compare it against + # the contents of the property_hash generated by self.instances + def self.prefetch(resources) + users = instances + resources.keys.each do |name| + if provider = users.find { |user| user.name == name } + resources[name].provider = provider + end + end + end + + def create + merged_name = @resource[:name].sub('@', "'@'") + password_hash = @resource.value(:password_hash) + max_user_connections = @resource.value(:max_user_connections) || 0 + max_connections_per_hour = @resource.value(:max_connections_per_hour) || 0 + max_queries_per_hour = @resource.value(:max_queries_per_hour) || 0 + max_updates_per_hour = @resource.value(:max_updates_per_hour) || 0 + + mysql([defaults_file, '-e', "GRANT USAGE ON *.* TO '#{merged_name}' IDENTIFIED BY PASSWORD '#{password_hash}' WITH MAX_USER_CONNECTIONS #{max_user_connections} MAX_CONNECTIONS_PER_HOUR #{max_connections_per_hour} MAX_QUERIES_PER_HOUR #{max_queries_per_hour} MAX_UPDATES_PER_HOUR #{max_updates_per_hour}"].compact) + + @property_hash[:ensure] = :present + @property_hash[:password_hash] = password_hash + @property_hash[:max_user_connections] = max_user_connections + @property_hash[:max_connections_per_hour] = max_connections_per_hour + @property_hash[:max_queries_per_hour] = max_queries_per_hour + @property_hash[:max_updates_per_hour] = max_updates_per_hour + + exists? ? (return true) : (return false) + end + + def destroy + merged_name = @resource[:name].sub('@', "'@'") + mysql([defaults_file, '-e', "DROP USER '#{merged_name}'"].compact) + + @property_hash.clear + exists? ? (return false) : (return true) + end + + def exists? + @property_hash[:ensure] == :present || false + end + + ## + ## MySQL user properties + ## + + # Generates method for all properties of the property_hash + mk_resource_methods + + def password_hash=(string) + merged_name = self.class.cmd_user(@resource[:name]) + mysql([defaults_file, '-e', "SET PASSWORD FOR #{merged_name} = '#{string}'"].compact) + + password_hash == string ? (return true) : (return false) + end + + def max_user_connections=(int) + merged_name = self.class.cmd_user(@resource[:name]) + mysql([defaults_file, '-e', "GRANT USAGE ON *.* TO #{merged_name} WITH MAX_USER_CONNECTIONS #{int}"].compact).chomp + + max_user_connections == int ? (return true) : (return false) + end + + def max_connections_per_hour=(int) + merged_name = self.class.cmd_user(@resource[:name]) + mysql([defaults_file, '-e', "GRANT USAGE ON *.* TO #{merged_name} WITH MAX_CONNECTIONS_PER_HOUR #{int}"].compact).chomp + + max_connections_per_hour == int ? (return true) : (return false) + end + + def max_queries_per_hour=(int) + merged_name = self.class.cmd_user(@resource[:name]) + mysql([defaults_file, '-e', "GRANT USAGE ON *.* TO #{merged_name} WITH MAX_QUERIES_PER_HOUR #{int}"].compact).chomp + + max_queries_per_hour == int ? (return true) : (return false) + end + + def max_updates_per_hour=(int) + merged_name = self.class.cmd_user(@resource[:name]) + mysql([defaults_file, '-e', "GRANT USAGE ON *.* TO #{merged_name} WITH MAX_UPDATES_PER_HOUR #{int}"].compact).chomp + + max_updates_per_hour == int ? (return true) : (return false) + end + +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mysql/lib/puppet/type/database.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mysql/lib/puppet/type/database.rb new file mode 100644 index 00000000000..b02fb109988 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mysql/lib/puppet/type/database.rb @@ -0,0 +1,21 @@ +# This has to be a separate type to enable collecting +Puppet::Type.newtype(:database) do + @doc = 'Manage databases.' + + ensurable + + newparam(:name, :namevar=>true) do + desc 'The name of the database.' + validate do |value| + Puppet.warning("database has been deprecated in favor of mysql_database.") + true + end + end + + newproperty(:charset) do + desc 'The characterset to use for a database' + defaultto :utf8 + newvalue(/^\S+$/) + end + +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mysql/lib/puppet/type/database_grant.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mysql/lib/puppet/type/database_grant.rb new file mode 100644 index 00000000000..7fdad823179 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mysql/lib/puppet/type/database_grant.rb @@ -0,0 +1,79 @@ +# This has to be a separate type to enable collecting +Puppet::Type.newtype(:database_grant) do + @doc = "Manage a database user's rights." + #ensurable + + autorequire :database do + # puts "Starting db autoreq for %s" % self[:name] + reqs = [] + matches = self[:name].match(/^([^@]+)@([^\/]+)\/(.+)$/) + unless matches.nil? + reqs << matches[3] + end + # puts "Autoreq: '%s'" % reqs.join(" ") + reqs + end + + autorequire :database_user do + # puts "Starting user autoreq for %s" % self[:name] + reqs = [] + matches = self[:name].match(/^([^@]+)@([^\/]+).*$/) + unless matches.nil? + reqs << '%s@%s' % [ matches[1], matches[2] ] + end + # puts "Autoreq: '%s'" % reqs.join(" ") + reqs + end + + newparam(:name, :namevar=>true) do + desc 'The primary key: either user@host for global privilges or user@host/database for database specific privileges' + validate do |value| + Puppet.warning("database_grant has been deprecated in favor of mysql_grant.") + true + end + end + + newproperty(:privileges, :array_matching => :all) do + desc 'The privileges the user should have. The possible values are implementation dependent.' + + def should_to_s(newvalue = @should) + if newvalue + unless newvalue.is_a?(Array) + newvalue = [ newvalue ] + end + newvalue.collect do |v| v.downcase end.sort.join ', ' + else + nil + end + end + + def is_to_s(currentvalue = @is) + if currentvalue + unless currentvalue.is_a?(Array) + currentvalue = [ currentvalue ] + end + currentvalue.collect do |v| v.downcase end.sort.join ', ' + else + nil + end + end + + # use the sorted outputs for comparison + def insync?(is) + if defined? @should and @should + case self.should_to_s + when 'all' + self.provider.all_privs_set? + when self.is_to_s(is) + true + else + false + end + else + true + end + end + end + +end + diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mysql/lib/puppet/type/database_user.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mysql/lib/puppet/type/database_user.rb new file mode 100644 index 00000000000..9a9d5fbc746 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mysql/lib/puppet/type/database_user.rb @@ -0,0 +1,31 @@ +# This has to be a separate type to enable collecting +Puppet::Type.newtype(:database_user) do + @doc = 'Manage a database user. This includes management of users password as well as privileges' + + ensurable + + newparam(:name, :namevar=>true) do + desc "The name of the user. This uses the 'username@hostname' or username@hostname." + validate do |value| + Puppet.warning("database has been deprecated in favor of mysql_user.") + # https://dev.mysql.com/doc/refman/5.1/en/account-names.html + # Regex should problably be more like this: /^[`'"]?[^`'"]*[`'"]?@[`'"]?[\w%\.]+[`'"]?$/ + raise(ArgumentError, "Invalid database user #{value}") unless value =~ /[\w-]*@[\w%\.:]+/ + username = value.split('@')[0] + if username.size > 16 + raise ArgumentError, 'MySQL usernames are limited to a maximum of 16 characters' + end + end + end + + newproperty(:password_hash) do + desc 'The password hash of the user. Use mysql_password() for creating such a hash.' + newvalue(/\w+/) + end + + newproperty(:max_user_connections) do + desc "Max concurrent connections for the user. 0 means no (or global) limit." + newvalue(/\d+/) + end + +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mysql/lib/puppet/type/mysql_database.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mysql/lib/puppet/type/mysql_database.rb new file mode 100644 index 00000000000..3e8518c9670 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mysql/lib/puppet/type/mysql_database.rb @@ -0,0 +1,22 @@ +Puppet::Type.newtype(:mysql_database) do + @doc = 'Manage MySQL databases.' + + ensurable + + newparam(:name, :namevar => true) do + desc 'The name of the MySQL database to manage.' + end + + newproperty(:charset) do + desc 'The CHARACTER SET setting for the database' + defaultto :utf8 + newvalue(/^\S+$/) + end + + newproperty(:collate) do + desc 'The COLLATE setting for the database' + defaultto :utf8_general_ci + newvalue(/^\S+$/) + end + +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mysql/lib/puppet/type/mysql_grant.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mysql/lib/puppet/type/mysql_grant.rb new file mode 100644 index 00000000000..be8dfbc340c --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mysql/lib/puppet/type/mysql_grant.rb @@ -0,0 +1,72 @@ +# This has to be a separate type to enable collecting +Puppet::Type.newtype(:mysql_grant) do + @doc = "Manage a MySQL user's rights." + ensurable + + autorequire(:file) { '/root/.my.cnf' } + + def initialize(*args) + super + # Forcibly munge any privilege with 'ALL' in the array to exist of just + # 'ALL'. This can't be done in the munge in the property as that iterates + # over the array and there's no way to replace the entire array before it's + # returned to the provider. + if self[:ensure] == :present and Array(self[:privileges]).count > 1 and self[:privileges].to_s.include?('ALL') + self[:privileges] = 'ALL' + end + # Sort the privileges array in order to ensure the comparision in the provider + # self.instances method match. Otherwise this causes it to keep resetting the + # privileges. + self[:privileges] = Array(self[:privileges]).map(&:upcase).uniq.reject{|k| k == 'GRANT' or k == 'GRANT OPTION'}.sort! + end + + validate do + fail('privileges parameter is required.') if self[:ensure] == :present and self[:privileges].nil? + fail('table parameter is required.') if self[:ensure] == :present and self[:table].nil? + fail('user parameter is required.') if self[:ensure] == :present and self[:user].nil? + end + + newparam(:name, :namevar => true) do + desc 'Name to describe the grant.' + + munge do |value| + value.delete("'") + end + end + + newproperty(:privileges, :array_matching => :all) do + desc 'Privileges for user' + + munge do |value| + value.upcase + end + end + + newproperty(:table) do + desc 'Table to apply privileges to.' + + munge do |value| + value.delete("`") + end + + newvalues(/.*\..*/,/@/) + end + + newproperty(:user) do + desc 'User to operate on.' + validate do |value| + # https://dev.mysql.com/doc/refman/5.1/en/account-names.html + # Regex should problably be more like this: /^[`'"]?[^`'"]*[`'"]?@[`'"]?[\w%\.]+[`'"]?$/ + raise(ArgumentError, "Invalid user #{value}") unless value =~ /[\w-]*@[\w%\.:]+/ + username = value.split('@')[0] + if username.size > 16 + raise ArgumentError, 'MySQL usernames are limited to a maximum of 16 characters' + end + end + end + + newproperty(:options, :array_matching => :all) do + desc 'Options to grant.' + end + +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mysql/lib/puppet/type/mysql_user.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mysql/lib/puppet/type/mysql_user.rb new file mode 100644 index 00000000000..38564a948b6 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mysql/lib/puppet/type/mysql_user.rb @@ -0,0 +1,45 @@ +# This has to be a separate type to enable collecting +Puppet::Type.newtype(:mysql_user) do + @doc = 'Manage a MySQL user. This includes management of users password as well as privileges.' + + ensurable + + newparam(:name, :namevar => true) do + desc "The name of the user. This uses the 'username@hostname' or username@hostname." + validate do |value| + # https://dev.mysql.com/doc/refman/5.1/en/account-names.html + # Regex should problably be more like this: /^[`'"]?[^`'"]*[`'"]?@[`'"]?[\w%\.]+[`'"]?$/ + raise(ArgumentError, "Invalid database user #{value}") unless value =~ /[\w-]*@[\w%\.:]+/ + username = value.split('@')[0] + if username.size > 16 + raise ArgumentError, 'MySQL usernames are limited to a maximum of 16 characters' + end + end + end + + newproperty(:password_hash) do + desc 'The password hash of the user. Use mysql_password() for creating such a hash.' + newvalue(/\w+/) + end + + newproperty(:max_user_connections) do + desc "Max concurrent connections for the user. 0 means no (or global) limit." + newvalue(/\d+/) + end + + newproperty(:max_connections_per_hour) do + desc "Max connections per hour for the user. 0 means no (or global) limit." + newvalue(/\d+/) + end + + newproperty(:max_queries_per_hour) do + desc "Max queries per hour for the user. 0 means no (or global) limit." + newvalue(/\d+/) + end + + newproperty(:max_updates_per_hour) do + desc "Max updates per hour for the user. 0 means no (or global) limit." + newvalue(/\d+/) + end + +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mysql/manifests/backup.pp b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mysql/manifests/backup.pp new file mode 100644 index 00000000000..680a5744d51 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mysql/manifests/backup.pp @@ -0,0 +1,31 @@ +# Deprecated class +class mysql::backup ( + $backupuser, + $backuppassword, + $backupdir, + $backupcompress = true, + $backuprotate = 30, + $delete_before_dump = false, + $backupdatabases = [], + $file_per_database = false, + $ensure = 'present', + $time = ['23', '5'], +) { + + crit("This class has been deprecated and callers should directly call + mysql::server::backup now.") + + class { 'mysql::server::backup': + ensure => $ensure, + backupuser => $backupuser, + backuppassword => $backuppassword, + backupdir => $backupdir, + backupcompress => $backupcompress, + backuprotate => $backuprotate, + delete_before_dump => $delete_before_dump, + backupdatabases => $backupdatabases, + file_per_database => $file_per_database, + time => $time, + } + +} diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mysql/manifests/bindings.pp b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mysql/manifests/bindings.pp new file mode 100644 index 00000000000..88c49033932 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mysql/manifests/bindings.pp @@ -0,0 +1,33 @@ +# See README.md. +class mysql::bindings ( + # Boolean to determine if we should include the classes. + $java_enable = false, + $perl_enable = false, + $php_enable = false, + $python_enable = false, + $ruby_enable = false, + # Settings for the various classes. + $java_package_ensure = $mysql::params::java_package_ensure, + $java_package_name = $mysql::params::java_package_name, + $java_package_provider = $mysql::params::java_package_provider, + $perl_package_ensure = $mysql::params::perl_package_ensure, + $perl_package_name = $mysql::params::perl_package_name, + $perl_package_provider = $mysql::params::perl_package_provider, + $php_package_ensure = $mysql::params::php_package_ensure, + $php_package_name = $mysql::params::php_package_name, + $php_package_provider = $mysql::params::php_package_provider, + $python_package_ensure = $mysql::params::python_package_ensure, + $python_package_name = $mysql::params::python_package_name, + $python_package_provider = $mysql::params::python_package_provider, + $ruby_package_ensure = $mysql::params::ruby_package_ensure, + $ruby_package_name = $mysql::params::ruby_package_name, + $ruby_package_provider = $mysql::params::ruby_package_provider +) inherits mysql::params { + + if $java_enable { include '::mysql::bindings::java' } + if $perl_enable { include '::mysql::bindings::perl' } + if $php_enable { include '::mysql::bindings::php' } + if $python_enable { include '::mysql::bindings::python' } + if $ruby_enable { include '::mysql::bindings::ruby' } + +} diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mysql/manifests/bindings/java.pp b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mysql/manifests/bindings/java.pp new file mode 100644 index 00000000000..d0808373349 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mysql/manifests/bindings/java.pp @@ -0,0 +1,10 @@ +# Private class +class mysql::bindings::java { + + package { 'mysql-connector-java': + ensure => $mysql::bindings::java_package_ensure, + name => $mysql::bindings::java_package_name, + provider => $mysql::bindings::java_package_provider, + } + +} diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mysql/manifests/bindings/perl.pp b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mysql/manifests/bindings/perl.pp new file mode 100644 index 00000000000..58c76f4b348 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mysql/manifests/bindings/perl.pp @@ -0,0 +1,10 @@ +# Private class +class mysql::bindings::perl { + + package{ 'perl_mysql': + ensure => $mysql::bindings::perl_package_ensure, + name => $mysql::bindings::perl_package_name, + provider => $mysql::bindings::perl_package_provider, + } + +} diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mysql/manifests/bindings/php.pp b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mysql/manifests/bindings/php.pp new file mode 100644 index 00000000000..81d08d3aa49 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mysql/manifests/bindings/php.pp @@ -0,0 +1,10 @@ +# Private class: See README.md +class mysql::bindings::php { + + package { 'php-mysql': + ensure => $mysql::bindings::php_package_ensure, + name => $mysql::bindings::php_package_name, + provider => $mysql::bindings::php_package_provider, + } + +} diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mysql/manifests/bindings/python.pp b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mysql/manifests/bindings/python.pp new file mode 100644 index 00000000000..96a3882b340 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mysql/manifests/bindings/python.pp @@ -0,0 +1,10 @@ +# Private class +class mysql::bindings::python { + + package { 'python-mysqldb': + ensure => $mysql::bindings::python_package_ensure, + name => $mysql::bindings::python_package_name, + provider => $mysql::bindings::python_package_provider, + } + +} diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mysql/manifests/bindings/ruby.pp b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mysql/manifests/bindings/ruby.pp new file mode 100644 index 00000000000..f916f54c23b --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mysql/manifests/bindings/ruby.pp @@ -0,0 +1,10 @@ +# Private class +class mysql::bindings::ruby { + + package{ 'ruby_mysql': + ensure => $mysql::bindings::ruby_package_ensure, + name => $mysql::bindings::ruby_package_name, + provider => $mysql::bindings::ruby_package_provider, + } + +} diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mysql/manifests/client.pp b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mysql/manifests/client.pp new file mode 100644 index 00000000000..59487f7005b --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mysql/manifests/client.pp @@ -0,0 +1,27 @@ +# +class mysql::client ( + $bindings_enable = $mysql::params::bindings_enable, + $package_ensure = $mysql::params::client_package_ensure, + $package_name = $mysql::params::client_package_name, +) inherits mysql::params { + + include '::mysql::client::install' + + if $bindings_enable { + class { 'mysql::bindings': + java_enable => true, + perl_enable => true, + php_enable => true, + python_enable => true, + ruby_enable => true, + } + } + + + # Anchor pattern workaround to avoid resources of mysql::client::install to + # "float off" outside mysql::client + anchor { 'mysql::client::start': } -> + Class['mysql::client::install'] -> + anchor { 'mysql::client::end': } + +} diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mysql/manifests/client/install.pp b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mysql/manifests/client/install.pp new file mode 100644 index 00000000000..a443f5320ea --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mysql/manifests/client/install.pp @@ -0,0 +1,8 @@ +class mysql::client::install { + + package { 'mysql_client': + ensure => $mysql::client::package_ensure, + name => $mysql::client::package_name, + } + +} diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mysql/manifests/db.pp b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mysql/manifests/db.pp new file mode 100644 index 00000000000..d406a07d521 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mysql/manifests/db.pp @@ -0,0 +1,59 @@ +# See README.md for details. +define mysql::db ( + $user, + $password, + $charset = 'utf8', + $collate = 'utf8_general_ci', + $host = 'localhost', + $grant = 'ALL', + $sql = '', + $enforce_sql = false, + $ensure = 'present' +) { + #input validation + validate_re($ensure, '^(present|absent)$', + "${ensure} is not supported for ensure. Allowed values are 'present' and 'absent'.") + $table = "${name}.*" + + include '::mysql::client' + + mysql_database { $name: + ensure => $ensure, + charset => $charset, + collate => $collate, + provider => 'mysql', + require => [ Class['mysql::server'], Class['mysql::client'] ], + before => Mysql_user["${user}@${host}"], + } + + $user_resource = { + ensure => $ensure, + password_hash => mysql_password($password), + provider => 'mysql', + require => Class['mysql::server'], + } + ensure_resource('mysql_user', "${user}@${host}", $user_resource) + + if $ensure == 'present' { + mysql_grant { "${user}@${host}/${table}": + privileges => $grant, + provider => 'mysql', + user => "${user}@${host}", + table => $table, + require => [ Mysql_user["${user}@${host}"], Class['mysql::server'] ], + } + + $refresh = ! $enforce_sql + + if $sql { + exec{ "${name}-import": + command => "/usr/bin/mysql ${name} < ${sql}", + logoutput => true, + environment => "HOME=${::root_home}", + refreshonly => $refresh, + require => Mysql_grant["${user}@${host}/${table}"], + subscribe => Mysql_database[$name], + } + } + } +} diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mysql/manifests/init.pp b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mysql/manifests/init.pp new file mode 100644 index 00000000000..eba5c206311 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mysql/manifests/init.pp @@ -0,0 +1,100 @@ +# +class mysql( + $basedir = '', + $bind_address = '', + $client_package_ensure = '', + $client_package_name = '', + $config_file = '', + $config_template = '', + $datadir = '', + $default_engine = '', + $etc_root_password = '', + $log_error = '', + $manage_config_file = '', + $manage_service = '', + $max_allowed_packet = '', + $max_connections = '', + $old_root_password = '', + $package_ensure = '', + $php_package_name = '', + $pidfile = '', + $port = '', + $purge_conf_dir = '', + $restart = '', + $root_group = '', + $root_password = '', + $server_package_name = '', + $service_name = '', + $service_provider = '', + $socket = '', + $ssl = '', + $ssl_ca = '', + $ssl_cert = '', + $ssl_key = '', + $tmpdir = '', + $attempt_compatibility_mode = false, +) { + + if $attempt_compatibility_mode { + notify { "An attempt has been made below to automatically apply your custom + settings to mysql::server. Please verify this works in a safe test + environment.": } + + $override_options = { + 'client' => { + 'port' => $port, + 'socket' => $socket + }, + 'mysqld_safe' => { + 'log_error' => $log_error, + 'socket' => $socket, + }, + 'mysqld' => { + 'basedir' => $basedir, + 'bind_address' => $bind_address, + 'datadir' => $datadir, + 'log_error' => $log_error, + 'max_allowed_packet' => $max_allowed_packet, + 'max_connections' => $max_connections, + 'pid_file' => $pidfile, + 'port' => $port, + 'socket' => $socket, + 'ssl-ca' => $ssl_ca, + 'ssl-cert' => $ssl_cert, + 'ssl-key' => $ssl_key, + 'tmpdir' => $tmpdir, + }, + 'mysqldump' => { + 'max_allowed_packet' => $max_allowed_packet, + }, + 'config_file' => $config_file, + 'etc_root_password' => $etc_root_password, + 'manage_config_file' => $manage_config_file, + 'old_root_password' => $old_root_password, + 'purge_conf_dir' => $purge_conf_dir, + 'restart' => $restart, + 'root_group' => $root_group, + 'root_password' => $root_password, + 'service_name' => $service_name, + 'ssl' => $ssl + } + $filtered_options = mysql_strip_hash($override_options) + validate_hash($filtered_options) + notify { $filtered_options: } + class { 'mysql::server': + override_options => $filtered_options, + } + + } else { + fail("ERROR: This class has been deprecated and the functionality moved + into mysql::server. If you run mysql::server without correctly calling + mysql:: server with the new override_options hash syntax you will revert + your MySQL to the stock settings. Do not proceed without removing this + class and using mysql::server correctly. + + If you are brave you may set attempt_compatibility_mode in this class which + attempts to automap the previous settings to appropriate calls to + mysql::server") + } + +} diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mysql/manifests/params.pp b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mysql/manifests/params.pp new file mode 100644 index 00000000000..67dd785b09d --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mysql/manifests/params.pp @@ -0,0 +1,230 @@ +# Private class: See README.md. +class mysql::params { + + $manage_config_file = true + $old_root_password = '' + $purge_conf_dir = false + $restart = false + $root_password = 'UNSET' + $server_package_ensure = 'present' + $server_service_manage = true + $server_service_enabled = true + # mysql::bindings + $bindings_enable = false + $java_package_ensure = 'present' + $java_package_provider = undef + $perl_package_ensure = 'present' + $perl_package_provider = undef + $php_package_ensure = 'present' + $php_package_provider = undef + $python_package_ensure = 'present' + $python_package_provider = undef + $ruby_package_ensure = 'present' + $ruby_package_provider = undef + + + case $::osfamily { + 'RedHat': { + if $::operatingsystem == 'Fedora' and (is_integer($::operatingsystemrelease) and $::operatingsystemrelease >= 19 or $::operatingsystemrelease == "Rawhide") { + $client_package_name = 'mariadb' + $server_package_name = 'mariadb-server' + } else { + $client_package_name = 'mysql' + $server_package_name = 'mysql-server' + } + $basedir = '/usr' + $config_file = '/etc/my.cnf' + $datadir = '/var/lib/mysql' + $log_error = '/var/log/mysqld.log' + $pidfile = '/var/run/mysqld/mysqld.pid' + $root_group = 'root' + $server_service_name = 'mysqld' + $socket = '/var/lib/mysql/mysql.sock' + $ssl_ca = '/etc/mysql/cacert.pem' + $ssl_cert = '/etc/mysql/server-cert.pem' + $ssl_key = '/etc/mysql/server-key.pem' + $tmpdir = '/tmp' + # mysql::bindings + $java_package_name = 'mysql-connector-java' + $perl_package_name = 'perl-DBD-MySQL' + $php_package_name = 'php-mysql' + $python_package_name = 'MySQL-python' + $ruby_package_name = 'ruby-mysql' + } + + 'Suse': { + $client_package_name = $::operatingsystem ? { + /OpenSuSE/ => 'mysql-community-server-client', + /(SLES|SLED)/ => 'mysql-client', + } + $server_package_name = $::operatingsystem ? { + /OpenSuSE/ => 'mysql-community-server', + /(SLES|SLED)/ => 'mysql', + } + $basedir = '/usr' + $config_file = '/etc/my.cnf' + $datadir = '/var/lib/mysql' + $log_error = $::operatingsystem ? { + /OpenSuSE/ => '/var/log/mysql/mysqld.log', + /(SLES|SLED)/ => '/var/log/mysqld.log', + } + $pidfile = $::operatingsystem ? { + /OpenSuSE/ => '/var/run/mysql/mysqld.pid', + /(SLES|SLED)/ => '/var/lib/mysql/mysqld.pid', + } + $root_group = 'root' + $server_service_name = 'mysql' + $socket = $::operatingsystem ? { + /OpenSuSE/ => '/var/run/mysql/mysql.sock', + /(SLES|SLED)/ => '/var/lib/mysql/mysql.sock', + } + $ssl_ca = '/etc/mysql/cacert.pem' + $ssl_cert = '/etc/mysql/server-cert.pem' + $ssl_key = '/etc/mysql/server-key.pem' + $tmpdir = '/tmp' + # mysql::bindings + $java_package_name = 'mysql-connector-java' + $perl_package_name = 'perl-DBD-mysql' + $php_package_name = 'apache2-mod_php53' + $python_package_name = 'python-mysql' + $ruby_package_name = $::operatingsystem ? { + /OpenSuSE/ => 'rubygem-mysql', + /(SLES|SLED)/ => 'ruby-mysql', + } + } + + 'Debian': { + $client_package_name = 'mysql-client' + $server_package_name = 'mysql-server' + + $basedir = '/usr' + $config_file = '/etc/mysql/my.cnf' + $datadir = '/var/lib/mysql' + $log_error = '/var/log/mysql/error.log' + $pidfile = '/var/run/mysqld/mysqld.pid' + $root_group = 'root' + $server_service_name = 'mysql' + $socket = '/var/run/mysqld/mysqld.sock' + $ssl_ca = '/etc/mysql/cacert.pem' + $ssl_cert = '/etc/mysql/server-cert.pem' + $ssl_key = '/etc/mysql/server-key.pem' + $tmpdir = '/tmp' + # mysql::bindings + $java_package_name = 'libmysql-java' + $perl_package_name = 'libdbd-mysql-perl' + $php_package_name = 'php5-mysql' + $python_package_name = 'python-mysqldb' + $ruby_package_name = 'libmysql-ruby' + } + + 'FreeBSD': { + $client_package_name = 'databases/mysql55-client' + $server_package_name = 'databases/mysql55-server' + $basedir = '/usr/local' + $config_file = '/var/db/mysql/my.cnf' + $datadir = '/var/db/mysql' + $log_error = "/var/db/mysql/${::hostname}.err" + $pidfile = '/var/db/mysql/mysql.pid' + $root_group = 'wheel' + $server_service_name = 'mysql-server' + $socket = '/tmp/mysql.sock' + $ssl_ca = undef + $ssl_cert = undef + $ssl_key = undef + $tmpdir = '/tmp' + # mysql::bindings + $java_package_name = 'databases/mysql-connector-java' + $perl_package_name = 'p5-DBD-mysql' + $php_package_name = 'php5-mysql' + $python_package_name = 'databases/py-MySQLdb' + $ruby_package_name = 'databases/ruby-mysql' + } + + default: { + case $::operatingsystem { + 'Amazon': { + $client_package_name = 'mysql' + $server_package_name = 'mysql-server' + $basedir = '/usr' + $config_file = '/etc/my.cnf' + $datadir = '/var/lib/mysql' + $log_error = '/var/log/mysqld.log' + $pidfile = '/var/run/mysqld/mysqld.pid' + $root_group = 'root' + $server_service_name = 'mysqld' + $socket = '/var/lib/mysql/mysql.sock' + $ssl_ca = '/etc/mysql/cacert.pem' + $ssl_cert = '/etc/mysql/server-cert.pem' + $ssl_key = '/etc/mysql/server-key.pem' + $tmpdir = '/tmp' + # mysql::bindings + $java_package_name = 'mysql-connector-java' + $perl_package_name = 'perl-DBD-MySQL' + $php_package_name = 'php-mysql' + $python_package_name = 'MySQL-python' + $ruby_package_name = 'ruby-mysql' + } + + default: { + fail("Unsupported osfamily: ${::osfamily} operatingsystem: ${::operatingsystem}, module ${module_name} only support osfamily RedHat, Debian, and FreeBSD, or operatingsystem Amazon") + } + } + } + } + + case $::operatingsystem { + 'Ubuntu': { + $server_service_provider = upstart + } + default: { + $server_service_provider = undef + } + } + + $default_options = { + 'client' => { + 'port' => '3306', + 'socket' => $mysql::params::socket, + }, + 'mysqld_safe' => { + 'nice' => '0', + 'log-error' => $mysql::params::log_error, + 'socket' => $mysql::params::socket, + }, + 'mysqld' => { + 'basedir' => $mysql::params::basedir, + 'bind-address' => '127.0.0.1', + 'datadir' => $mysql::params::datadir, + 'expire_logs_days' => '10', + 'key_buffer_size' => '16M', + 'log-error' => $mysql::params::log_error, + 'max_allowed_packet' => '16M', + 'max_binlog_size' => '100M', + 'max_connections' => '151', + 'myisam_recover' => 'BACKUP', + 'pid-file' => $mysql::params::pidfile, + 'port' => '3306', + 'query_cache_limit' => '1M', + 'query_cache_size' => '16M', + 'skip-external-locking' => true, + 'socket' => $mysql::params::socket, + 'ssl' => false, + 'ssl-ca' => $mysql::params::ssl_ca, + 'ssl-cert' => $mysql::params::ssl_cert, + 'ssl-key' => $mysql::params::ssl_key, + 'thread_cache_size' => '8', + 'thread_stack' => '256K', + 'tmpdir' => $mysql::params::tmpdir, + 'user' => 'mysql', + }, + 'mysqldump' => { + 'max_allowed_packet' => '16M', + 'quick' => true, + 'quote-names' => true, + }, + 'isamchk' => { + 'key_buffer_size' => '16M', + }, + } + +} diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mysql/manifests/server.pp b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mysql/manifests/server.pp new file mode 100644 index 00000000000..ae8b208a187 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mysql/manifests/server.pp @@ -0,0 +1,82 @@ +# Class: mysql::server: See README.md for documentation. +class mysql::server ( + $config_file = $mysql::params::config_file, + $manage_config_file = $mysql::params::manage_config_file, + $old_root_password = $mysql::params::old_root_password, + $override_options = {}, + $package_ensure = $mysql::params::server_package_ensure, + $package_name = $mysql::params::server_package_name, + $purge_conf_dir = $mysql::params::purge_conf_dir, + $remove_default_accounts = false, + $restart = $mysql::params::restart, + $root_group = $mysql::params::root_group, + $root_password = $mysql::params::root_password, + $service_enabled = $mysql::params::server_service_enabled, + $service_manage = $mysql::params::server_service_manage, + $service_name = $mysql::params::server_service_name, + $service_provider = $mysql::params::server_service_provider, + $users = {}, + $grants = {}, + $databases = {}, + + # Deprecated parameters + $enabled = undef, + $manage_service = undef +) inherits mysql::params { + + # Deprecated parameters. + if $enabled { + crit('This parameter has been renamed to service_enabled.') + $real_service_enabled = $enabled + } else { + $real_service_enabled = $service_enabled + } + if $manage_service { + crit('This parameter has been renamed to service_manage.') + $real_service_manage = $manage_service + } else { + $real_service_manage = $service_manage + } + + # Create a merged together set of options. Rightmost hashes win over left. + $options = mysql_deepmerge($mysql::params::default_options, $override_options) + + Class['mysql::server::root_password'] -> Mysql::Db <| |> + + include '::mysql::server::install' + include '::mysql::server::config' + include '::mysql::server::service' + include '::mysql::server::root_password' + include '::mysql::server::providers' + + if $remove_default_accounts { + class { '::mysql::server::account_security': + require => Anchor['mysql::server::end'], + } + } + + anchor { 'mysql::server::start': } + anchor { 'mysql::server::end': } + + if $restart { + Anchor['mysql::server::start'] -> + Class['mysql::server::install'] -> + # Only difference between the blocks is that we use ~> to restart if + # restart is set to true. + Class['mysql::server::config'] ~> + Class['mysql::server::service'] -> + Class['mysql::server::root_password'] -> + Class['mysql::server::providers'] -> + Anchor['mysql::server::end'] + } else { + Anchor['mysql::server::start'] -> + Class['mysql::server::install'] -> + Class['mysql::server::config'] -> + Class['mysql::server::service'] -> + Class['mysql::server::root_password'] -> + Class['mysql::server::providers'] -> + Anchor['mysql::server::end'] + } + + +} diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mysql/manifests/server/account_security.pp b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mysql/manifests/server/account_security.pp new file mode 100644 index 00000000000..36d943757c0 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mysql/manifests/server/account_security.pp @@ -0,0 +1,22 @@ +class mysql::server::account_security { + mysql_user { + [ "root@${::fqdn}", + 'root@127.0.0.1', + 'root@::1', + "@${::fqdn}", + '@localhost', + '@%']: + ensure => 'absent', + require => Anchor['mysql::server::end'], + } + if ($::fqdn != $::hostname) { + mysql_user { ["root@${::hostname}", "@${::hostname}"]: + ensure => 'absent', + require => Anchor['mysql::server::end'], + } + } + mysql_database { 'test': + ensure => 'absent', + require => Anchor['mysql::server::end'], + } +} diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mysql/manifests/server/backup.pp b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mysql/manifests/server/backup.pp new file mode 100644 index 00000000000..a33b2b03b40 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mysql/manifests/server/backup.pp @@ -0,0 +1,61 @@ +# See README.me for usage. +class mysql::server::backup ( + $backupuser, + $backuppassword, + $backupdir, + $backupdirmode = '0700', + $backupdirowner = 'root', + $backupdirgroup = 'root', + $backupcompress = true, + $backuprotate = 30, + $ignore_events = true, + $delete_before_dump = false, + $backupdatabases = [], + $file_per_database = false, + $ensure = 'present', + $time = ['23', '5'], + $postscript = false, +) { + + mysql_user { "${backupuser}@localhost": + ensure => $ensure, + password_hash => mysql_password($backuppassword), + provider => 'mysql', + require => Class['mysql::server::root_password'], + } + + mysql_grant { "${backupuser}@localhost/*.*": + ensure => present, + user => "${backupuser}@localhost", + table => '*.*', + privileges => [ 'SELECT', 'RELOAD', 'LOCK TABLES', 'SHOW VIEW' ], + require => Mysql_user["${backupuser}@localhost"], + } + + cron { 'mysql-backup': + ensure => $ensure, + command => '/usr/local/sbin/mysqlbackup.sh', + user => 'root', + hour => $time[0], + minute => $time[1], + require => File['mysqlbackup.sh'], + } + + file { 'mysqlbackup.sh': + ensure => $ensure, + path => '/usr/local/sbin/mysqlbackup.sh', + mode => '0700', + owner => 'root', + group => 'root', + content => template('mysql/mysqlbackup.sh.erb'), + } + + file { 'mysqlbackupdir': + ensure => 'directory', + path => $backupdir, + mode => $backupdirmode, + owner => $backupdirowner, + group => $backupdirgroup, + } + +} diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mysql/manifests/server/config.pp b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mysql/manifests/server/config.pp new file mode 100644 index 00000000000..c51f22ff97d --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mysql/manifests/server/config.pp @@ -0,0 +1,30 @@ +# See README.me for options. +class mysql::server::config { + + $options = $mysql::server::options + + File { + owner => 'root', + group => $mysql::server::root_group, + mode => '0400', + } + + file { '/etc/mysql': + ensure => directory, + mode => '0755', + } + + file { '/etc/mysql/conf.d': + ensure => directory, + mode => '0755', + recurse => $mysql::server::purge_conf_dir, + purge => $mysql::server::purge_conf_dir, + } + + if $mysql::server::manage_config_file { + file { $mysql::server::config_file: + content => template('mysql/my.cnf.erb'), + mode => '0644', + } + } +} diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mysql/manifests/server/install.pp b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mysql/manifests/server/install.pp new file mode 100644 index 00000000000..dcb04cb1283 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mysql/manifests/server/install.pp @@ -0,0 +1,9 @@ +# +class mysql::server::install { + + package { 'mysql-server': + ensure => $mysql::server::package_ensure, + name => $mysql::server::package_name, + } + +} diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mysql/manifests/server/monitor.pp b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mysql/manifests/server/monitor.pp new file mode 100644 index 00000000000..9e86b92c774 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mysql/manifests/server/monitor.pp @@ -0,0 +1,24 @@ +#This is a helper class to add a monitoring user to the database +class mysql::server::monitor ( + $mysql_monitor_username, + $mysql_monitor_password, + $mysql_monitor_hostname +) { + + Anchor['mysql::server::end'] -> Class['mysql::server::monitor'] + + mysql_user { "${mysql_monitor_username}@${mysql_monitor_hostname}": + ensure => present, + password_hash => mysql_password($mysql_monitor_password), + require => Class['mysql::server::service'], + } + + mysql_grant { "${mysql_monitor_username}@${mysql_monitor_hostname}/*.*": + ensure => present, + user => "${mysql_monitor_username}@${mysql_monitor_hostname}", + table => '*.*', + privileges => [ 'PROCESS', 'SUPER' ], + require => Mysql_user["${mysql_monitor_username}@${mysql_monitor_hostname}"], + } + +} diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mysql/manifests/server/mysqltuner.pp b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mysql/manifests/server/mysqltuner.pp new file mode 100644 index 00000000000..23d19a55851 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mysql/manifests/server/mysqltuner.pp @@ -0,0 +1,9 @@ +# +class mysql::server::mysqltuner($ensure='present') { + # mysql performance tester + file { '/usr/local/bin/mysqltuner': + ensure => $ensure, + mode => '0550', + source => 'puppet:///modules/mysql/mysqltuner.pl', + } +} diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mysql/manifests/server/providers.pp b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mysql/manifests/server/providers.pp new file mode 100644 index 00000000000..b651172fca3 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mysql/manifests/server/providers.pp @@ -0,0 +1,8 @@ +# Convenience class to call each of the three providers with the corresponding +# hashes provided in mysql::server. +# See README.md for details. +class mysql::server::providers { + create_resources('mysql_user', $mysql::server::users) + create_resources('mysql_grant', $mysql::server::grants) + create_resources('mysql_database', $mysql::server::databases) +} diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mysql/manifests/server/root_password.pp b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mysql/manifests/server/root_password.pp new file mode 100644 index 00000000000..e75412dabee --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mysql/manifests/server/root_password.pp @@ -0,0 +1,21 @@ +# +class mysql::server::root_password { + + $options = $mysql::server::options + + # manage root password if it is set + if $mysql::server::root_password != 'UNSET' { + mysql_user { 'root@localhost': + ensure => present, + password_hash => mysql_password($mysql::server::root_password), + } + + file { "${::root_home}/.my.cnf": + content => template('mysql/my.cnf.pass.erb'), + owner => 'root', + mode => '0600', + require => Mysql_user['root@localhost'], + } + } + +} diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mysql/manifests/server/service.pp b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mysql/manifests/server/service.pp new file mode 100644 index 00000000000..c60e0366233 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mysql/manifests/server/service.pp @@ -0,0 +1,19 @@ +# +class mysql::server::service { + + if $mysql::server::real_service_enabled { + $service_ensure = 'running' + } else { + $service_ensure = 'stopped' + } + + if $mysql::server::real_service_manage { + service { 'mysqld': + ensure => $service_ensure, + name => $mysql::server::service_name, + enable => $mysql::server::real_service_enabled, + provider => $mysql::server::service_provider, + } + } + +} diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mysql/metadata.json b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mysql/metadata.json new file mode 100644 index 00000000000..e1a8c790534 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mysql/metadata.json @@ -0,0 +1,76 @@ +{ + "operatingsystem_support": [ + { + "operatingsystem": "RedHat", + "operatingsystemrelease": [ + "5", + "6" + ] + }, + { + "operatingsystem": "CentOS", + "operatingsystemrelease": [ + "5", + "6" + ] + }, + { + "operatingsystem": "OracleLinux", + "operatingsystemrelease": [ + "5", + "6" + ] + }, + { + "operatingsystem": "Scientific", + "operatingsystemrelease": [ + "5", + "6" + ] + }, + { + "operatingsystem": "SLES", + "operatingsystemrelease": [ + "11 SP1" + ] + }, + { + "operatingsystem": "Debian", + "operatingsystemrelease": [ + "6", + "7" + ] + }, + { + "operatingsystem": "Ubuntu", + "operatingsystemrelease": [ + "10.04", + "12.04" + ] + } + ], + "requirements": [ + { + "name": "pe", + "version_requirement": "3.2.x" + }, + { + "name": "puppet", + "version_requirement": "3.x" + } + ], + "name": "puppetlabs-mysql", + "version": "2.2.3", + "source": "git://github.com/puppetlabs/puppetlabs-mysql.git", + "author": "Puppet Labs", + "license": "Apache 2.0", + "summary": "Mysql module", + "description": "Mysql module", + "project_page": "http://github.com/puppetlabs/puppetlabs-mysql", + "dependencies": [ + { + "name": "puppetlabs/stdlib", + "version_requirement": ">= 3.2.0" + } + ] +} diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mysql/spec/acceptance/mysql_account_delete_spec.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mysql/spec/acceptance/mysql_account_delete_spec.rb new file mode 100644 index 00000000000..07c99a183cf --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mysql/spec/acceptance/mysql_account_delete_spec.rb @@ -0,0 +1,25 @@ +require 'spec_helper_acceptance' + +describe 'mysql::server::account_security class', :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem')) do + describe 'running puppet code' do + it 'should work with no errors' do + pp = <<-EOS + class { 'mysql::server': remove_default_accounts => true } + EOS + + # Run it twice and test for idempotency + apply_manifest(pp, :catch_failures => true) + expect(apply_manifest(pp, :catch_failures => true).exit_code).to be_zero + end + + describe 'accounts' do + it 'should delete accounts' do + shell("mysql -e 'show grants for root@127.0.0.1;'", :acceptable_exit_codes => 1) + end + + it 'should delete databases' do + shell("mysql -e 'show databases;' |grep test", :acceptable_exit_codes => 1) + end + end + end +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mysql/spec/acceptance/mysql_backup_spec.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mysql/spec/acceptance/mysql_backup_spec.rb new file mode 100644 index 00000000000..131520661fe --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mysql/spec/acceptance/mysql_backup_spec.rb @@ -0,0 +1,64 @@ +require 'spec_helper_acceptance' + +describe 'mysql::server::backup class', :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem')) do + context 'should work with no errors' do + it 'when configuring mysql backups' do + pp = <<-EOS + class { 'mysql::server': root_password => 'password' } + mysql::db { 'backup1': + user => 'backup', + password => 'secret', + } + + class { 'mysql::server::backup': + backupuser => 'myuser', + backuppassword => 'mypassword', + backupdir => '/tmp/backups', + backupcompress => true, + postscript => [ + 'rm -rf /var/tmp/mysqlbackups', + 'rm -f /var/tmp/mysqlbackups.done', + 'cp -r /tmp/backups /var/tmp/mysqlbackups', + 'touch /var/tmp/mysqlbackups.done', + ], + } + EOS + + apply_manifest(pp, :catch_failures => true) do |r| + expect(r.stderr).to eq("") + end + apply_manifest(pp, :catch_failures => true) do |r| + expect(r.stderr).to eq("") + end + end + end + + describe 'mysqlbackup.sh' do + it 'should run mysqlbackup.sh with no errors' do + shell("/usr/local/sbin/mysqlbackup.sh") do |r| + expect(r.stderr).to eq("") + end + end + + it 'should dump all databases to single file' do + shell('ls -l /tmp/backups/mysql_backup_*-*.sql.bz2 | wc -l') do |r| + expect(r.stdout).to match(/1/) + expect(r.exit_code).to be_zero + end + end + + context 'should create one file per database per run' do + it 'executes mysqlbackup.sh a second time' do + shell('sleep 1') + shell('/usr/local/sbin/mysqlbackup.sh') + end + + it 'creates at least one backup tarball' do + shell('ls -l /tmp/backups/mysql_backup_*-*.sql.bz2 | wc -l') do |r| + expect(r.stdout).to match(/2/) + expect(r.exit_code).to be_zero + end + end + end + end +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mysql/spec/acceptance/mysql_bindings_spec.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mysql/spec/acceptance/mysql_bindings_spec.rb new file mode 100644 index 00000000000..b7e25d63d3b --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mysql/spec/acceptance/mysql_bindings_spec.rb @@ -0,0 +1,117 @@ +require 'spec_helper_acceptance' + +osfamily = fact('osfamily') +operatingsystem = fact('operatingsystem') + +case osfamily +when 'RedHat' + java_package = 'mysql-connector-java' + perl_package = 'perl-DBD-MySQL' + php_package = 'php-mysql' + python_package = 'MySQL-python' + ruby_package = 'ruby-mysql' +when 'Suse' + java_package = 'mysql-connector-java' + perl_package = 'perl-DBD-mysql' + php_package = 'apache2-mod_php53' + python_package = 'python-mysql' + case operatingsystem + when /OpenSuSE/ + ruby_package = 'rubygem-mysql' + when /(SLES|SLED)/ + ruby_package = 'ruby-mysql' + end +when 'Debian' + java_package = 'libmysql-java' + perl_package = 'libdbd-mysql-perl' + php_package = 'php5-mysql' + python_package = 'python-mysqldb' + ruby_package = 'libmysql-ruby' +when 'FreeBSD' + java_package = 'databases/mysql-connector-java' + perl_package = 'p5-DBD-mysql' + php_package = 'php5-mysql' + python_package = 'databases/py-MySQLdb' + ruby_package = 'ruby-mysql' +else + case operatingsystem + when 'Amazon' + java_package = 'mysql-connector-java' + perl_package = 'perl-DBD-MySQL' + php_package = 'php5-mysql' + python_package = 'MySQL-python' + ruby_package = 'ruby-mysql' + end +end + +describe 'mysql::bindings class', :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem')) do + + describe 'running puppet code' do + it 'should work with no errors' do + pp = <<-EOS + class { 'mysql::bindings': } + EOS + + # Run it twice and test for idempotency + apply_manifest(pp, :catch_failures => true) + expect(apply_manifest(pp, :catch_failures => true).exit_code).to be_zero + end + end + + describe 'all parameters' do + it 'should work with no errors' do + pp = <<-EOS + class { 'mysql::bindings': + java_enable => true, + perl_enable => true, + php_enable => true, + python_enable => true, + ruby_enable => true, + java_package_ensure => present, + perl_package_ensure => present, + php_package_ensure => present, + python_package_ensure => present, + ruby_package_ensure => present, + java_package_name => #{java_package}, + perl_package_name => #{perl_package}, + php_package_name => #{php_package}, + python_package_name => #{python_package}, + ruby_package_name => #{ruby_package}, + java_package_provider => undef, + perl_package_provider => undef, + php_package_provider => undef, + python_package_provider => undef, + ruby_package_provider => undef, + } + EOS + + # Run it twice and test for idempotency + apply_manifest(pp, :catch_failures => true) + expect(apply_manifest(pp, :catch_failures => true).exit_code).to be_zero + end + + describe package(java_package) do + it { should be_installed } + end + + describe package(perl_package) do + it { should be_installed } + end + + # This package is not available out of the box and adding in other repos + # is a bit much for the scope of this test. + unless fact('osfamily') == 'RedHat' + describe package(php_package) do + it { should be_installed } + end + end + + describe package(python_package) do + it { should be_installed } + end + + describe package(ruby_package) do + it { should be_installed } + end + end +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mysql/spec/acceptance/mysql_db_spec.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mysql/spec/acceptance/mysql_db_spec.rb new file mode 100644 index 00000000000..1e8df8a1f4e --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mysql/spec/acceptance/mysql_db_spec.rb @@ -0,0 +1,49 @@ +require 'spec_helper_acceptance' + +describe 'mysql::db define', :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem')) do + describe 'creating a database' do + # Using puppet_apply as a helper + it 'should work with no errors' do + pp = <<-EOS + class { 'mysql::server': root_password => 'password' } + mysql::db { 'spec1': + user => 'root1', + password => 'password', + } + EOS + + # Run it twice and test for idempotency + apply_manifest(pp, :catch_failures => true) + apply_manifest(pp, :catch_changes => true) + + expect(shell("mysql -e 'show databases;'|grep spec1").exit_code).to be_zero + end + end + + describe 'creating a database with post-sql' do + # Using puppet_apply as a helper + it 'should work with no errors' do + pp = <<-EOS + class { 'mysql::server': override_options => { 'root_password' => 'password' } } + file { '/tmp/spec.sql': + ensure => file, + content => 'CREATE TABLE table1 (id int);', + before => Mysql::Db['spec2'], + } + mysql::db { 'spec2': + user => 'root1', + password => 'password', + sql => '/tmp/spec.sql', + } + EOS + + # Run it twice and test for idempotency + apply_manifest(pp, :catch_failures => true) + apply_manifest(pp, :catch_changes => true) + end + + it 'should have the table' do + expect(shell("mysql -e 'show tables;' spec2|grep table1").exit_code).to be_zero + end + end +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mysql/spec/acceptance/mysql_server_config_spec.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mysql/spec/acceptance/mysql_server_config_spec.rb new file mode 100644 index 00000000000..d327dd29aed --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mysql/spec/acceptance/mysql_server_config_spec.rb @@ -0,0 +1,47 @@ +require 'spec_helper_acceptance' + +describe 'config location', :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem')) do + it 'creates the file elsewhere' do + pp = <<-EOS + class { 'mysql::server': + config_file => '/etc/testmy.cnf', + } + EOS + apply_manifest(pp, :catch_failures => true) + end + + describe file('/etc/testmy.cnf') do + it { should be_file } + end +end + +describe 'manage_config_file', :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem')) do + it 'wont reset the location of my.cnf' do + pp = <<-EOS + class { 'mysql::server': + config_file => '/etc/my.cnf', + manage_config_file => false, + service_manage => false, + } + EOS + # Make sure this doesn't exist so we can test if puppet + # readded it. It may not exist in the first place on + # some platforms. + shell('rm /etc/my.cnf', :acceptable_exit_codes => [0,1,2]) + apply_manifest(pp, :catch_failures => true) + end + + describe file('/etc/my.cnf') do + it { should_not be_file } + end +end + +describe 'resets', :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem')) do + it 'cleans up' do + pp = <<-EOS + class { 'mysql::server': } + EOS + apply_manifest(pp, :catch_failures => true) + shell('rm /etc/testmy.cnf') + end +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mysql/spec/acceptance/mysql_server_monitor_spec.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mysql/spec/acceptance/mysql_server_monitor_spec.rb new file mode 100644 index 00000000000..9c66334e5bb --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mysql/spec/acceptance/mysql_server_monitor_spec.rb @@ -0,0 +1,22 @@ +require 'spec_helper_acceptance' + +describe 'mysql::server::monitor class', :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem')) do + it 'should work with no errors' do + pp = <<-EOS + class { 'mysql::server': root_password => 'password' } + + class { 'mysql::server::monitor': + mysql_monitor_username => 'monitoruser', + mysql_monitor_password => 'monitorpass', + mysql_monitor_hostname => 'localhost', + } + EOS + + apply_manifest(pp, :catch_failures => true) + expect(apply_manifest(pp, :catch_failures => true).exit_code).to be_zero + end + + it 'should run mysqladmin ping with no errors' do + expect(shell("mysqladmin -u monitoruser -pmonitorpass -h localhost ping").stdout).to match(/mysqld is alive/) + end +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mysql/spec/acceptance/mysql_server_root_password_spec.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mysql/spec/acceptance/mysql_server_root_password_spec.rb new file mode 100644 index 00000000000..f6035f0b362 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mysql/spec/acceptance/mysql_server_root_password_spec.rb @@ -0,0 +1,71 @@ +require 'spec_helper_acceptance' + +describe 'mysql::server::root_password class', :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem')) do + + describe 'reset' do + it 'shuts down mysql' do + pp = <<-EOS + class { 'mysql::server': service_enabled => false } + EOS + + apply_manifest(pp, :catch_failures => true) + end + + it 'deletes the /root/.my.cnf password' do + shell('rm -rf /root/.my.cnf') + end + + it 'deletes all databases' do + case fact('osfamily') + when 'RedHat', 'Suse' + shell('rm -rf `grep datadir /etc/my.cnf | cut -d" " -f 3`/*') + when 'Debian' + shell('rm -rf `grep datadir /etc/mysql/my.cnf | cut -d" " -f 3`/*') + shell('mysql_install_db') + end + end + + it 'starts up mysql' do + pp = <<-EOS + class { 'mysql::server': service_enabled => true } + EOS + + puppet_apply(pp, :catch_failures => true) + end + end + + describe 'when unset' do + it 'should work' do + pp = <<-EOS + class { 'mysql::server': root_password => 'test' } + EOS + + # Run it twice and test for idempotency + apply_manifest(pp, :catch_failures => true) + expect(apply_manifest(pp, :catch_failures => true).exit_code).to be_zero + end + end + + describe 'when set' do + it 'should work' do + pp = <<-EOS + class { 'mysql::server': root_password => 'new', old_root_password => 'test' } + EOS + + # Run it twice and test for idempotency + apply_manifest(pp, :catch_failures => true) + expect(apply_manifest(pp, :catch_failures => true).exit_code).to be_zero + end + end +end + +# Debian relies on a debian-sys-maint@ account to do almost everything. +# Without recreating this account we can't even stop the service in future +# tests. +if fact('osfamily') == 'Debian' + describe 'readd debian user' do + it 'readds the user' do + shell("MYSQL_PASSWORD=`head -5 /etc/mysql/debian.cnf | grep password | cut -d' ' -f 3`; mysql -NBe \"GRANT ALL PRIVILEGES ON *.* to 'debian-sys-maint'@'localhost' IDENTIFIED BY '${MYSQL_PASSWORD}' WITH GRANT OPTION;\"") + end + end +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mysql/spec/acceptance/mysql_server_spec.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mysql/spec/acceptance/mysql_server_spec.rb new file mode 100644 index 00000000000..938368dbf9d --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mysql/spec/acceptance/mysql_server_spec.rb @@ -0,0 +1,281 @@ +require 'spec_helper_acceptance' + +describe 'mysql class', :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem')) do + case fact('osfamily') + when 'RedHat' + package_name = 'mysql-server' + service_name = 'mysqld' + service_provider = 'undef' + mycnf = '/etc/my.cnf' + when 'Suse' + case fact('operatingsystem') + when 'OpenSuSE' + package_name = 'mysql-community-server' + service_name = 'mysql' + service_provider = 'undef' + mycnf = '/etc/my.cnf' + when 'SLES' + package_name = 'mysql' + service_name = 'mysql' + service_provider = 'undef' + mycnf = '/etc/my.cnf' + end + when 'Debian' + package_name = 'mysql-server' + service_name = 'mysql' + service_provider = 'undef' + mycnf = '/etc/mysql/my.cnf' + when 'Ubuntu' + package_name = 'mysql-server' + service_name = 'mysql' + service_provider = 'upstart' + mycnf = '/etc/mysql/my.cnf' + end + + describe 'running puppet code' do + # Using puppet_apply as a helper + it 'should work with no errors' do + pp = <<-EOS + class { 'mysql::server': } + EOS + + # Run it twice and test for idempotency + apply_manifest(pp, :catch_failures => true) + expect(apply_manifest(pp, :catch_failures => true).exit_code).to be_zero + end + + describe package(package_name) do + it { should be_installed } + end + + describe service(service_name) do + it { should be_running } + it { should be_enabled } + end + end + + describe 'mycnf' do + it 'should contain sensible values' do + pp = <<-EOS + class { 'mysql::server': } + EOS + apply_manifest(pp, :catch_failures => true) + end + + describe file(mycnf) do + it { should contain 'key_buffer_size = 16M' } + it { should contain 'max_binlog_size = 100M' } + it { should contain 'query_cache_size = 16M' } + end + end + + describe 'my.cnf changes' do + it 'sets values' do + pp = <<-EOS + class { 'mysql::server': + override_options => { 'mysqld' => + { 'key_buffer' => '32M', + 'max_binlog_size' => '200M', + 'query_cache_size' => '32M', + } + } + } + EOS + apply_manifest(pp, :catch_failures => true) + end + + describe file(mycnf) do + it { should contain 'key_buffer = 32M' } + it { should contain 'max_binlog_size = 200M' } + it { should contain 'query_cache_size = 32M' } + end + end + + describe 'my.cnf should contain multiple instances of the same option' do + it 'sets multiple values' do + pp = <<-EOS + class { 'mysql::server': + override_options => { 'mysqld' => + { 'replicate-do-db' => ['base1', 'base2', 'base3'], } + } + } + EOS + apply_manifest(pp, :catch_failures => true) + end + + describe file(mycnf) do + it { should contain 'replicate-do-db = base1' } + it { should contain 'replicate-do-db = base2' } + it { should contain 'replicate-do-db = base3' } + end + end + + describe 'package_ensure => absent' do + it 'uninstalls mysql' do + pp = <<-EOS + class { 'mysql::server': + service_enabled => false, + package_ensure => absent, + package_name => #{package_name} + } + EOS + apply_manifest(pp, :catch_failures => true) + end + + describe package(package_name) do + it { should_not be_installed } + end + end + + describe 'package_ensure => present' do + it 'installs mysql' do + pp = <<-EOS + class { 'mysql::server': + package_ensure => present, + package_name => #{package_name} + } + EOS + apply_manifest(pp, :catch_failures => true) + end + + describe package(package_name) do + it { should be_installed } + end + end + + describe 'purge_conf_dir' do + + it 'purges the conf dir' do + pp = <<-EOS + class { 'mysql::server': + purge_conf_dir => true + } + EOS + shell('touch /etc/mysql/conf.d/test.conf') + apply_manifest(pp, :catch_failures => true) + end + + describe file('/etc/mysql/conf.d/test.conf') do + it { should_not be_file } + end + end + + describe 'restart' do + it 'restart => true' do + pp = <<-EOS + class { 'mysql::server': + restart => true, + override_options => { 'mysqldump' => { 'default-character-set' => 'UTF-8' } } + } + EOS + + apply_manifest(pp, :catch_failures => true) do |r| + expect(r.exit_code).to eq(2) + expect(r.stdout).to match(/Scheduling refresh/) + end + end + it 'restart => false' do + pp = <<-EOS + class { 'mysql::server': + restart => false, + override_options => { 'mysqldump' => { 'default-character-set' => 'UTF-16' } } + } + EOS + + apply_manifest(pp, :catch_failures => true) do |r| + expect(r.exit_code).to eq(2) + expect(r.stdout).to_not match(/Scheduling refresh/) + end + end + end + + describe 'root_group' do + it 'creates a group' do + pp = "group { 'test': ensure => present }" + apply_manifest(pp, :catch_failures => true) + end + + it 'sets the group of files' do + pp = <<-EOS + class { 'mysql::server': + root_group => 'test', + config_file => '/tmp/mysql_group_test', + } + EOS + apply_manifest(pp, :catch_failures => true) + end + + describe file('/tmp/mysql_group_test') do + it { should be_grouped_into 'test' } + end + end + + describe 'service parameters' do + it 'calls all parameters' do + pp = <<-EOS + class { 'mysql::server': + service_enabled => true, + service_manage => true, + service_name => #{service_name}, + service_provider => #{service_provider} + } + EOS + apply_manifest(pp, :catch_failures => true) + end + end + + describe 'users, grants, and databases' do + it 'are created' do + pp = <<-EOS + class { 'mysql::server': + users => { + 'zerg1@localhost' => { + ensure => 'present', + max_connections_per_hour => '0', + max_queries_per_hour => '0', + max_updates_per_hour => '0', + max_user_connections => '0', + password_hash => '*F3A2A51A9B0F2BE2468926B4132313728C250DBF', + } + }, + grants => { + 'zerg1@localhost/zergdb.*' => { + ensure => 'present', + options => ['GRANT'], + privileges => ['SELECT', 'INSERT', 'UPDATE', 'DELETE'], + table => 'zergdb.*', + user => 'zerg1@localhost', + } + }, + databases => { + 'zergdb' => { + ensure => 'present', + charset => 'utf8', + } + }, + } + EOS + apply_manifest(pp, :catch_failures => true) + end + + it 'has a user' do + shell("mysql -NBe \"select '1' from mysql.user where CONCAT(user, '@', host) = 'zerg1@localhost'\"") do |r| + expect(r.stdout).to match(/^1$/) + expect(r.stderr).to be_empty + end + end + it 'has a grant' do + shell("mysql -NBe \"SHOW GRANTS FOR zerg1@localhost\"") do |r| + expect(r.stdout).to match(/GRANT SELECT, INSERT, UPDATE, DELETE ON `zergdb`.* TO 'zerg1'@'localhost' WITH GRANT OPTION/) + expect(r.stderr).to be_empty + end + end + it 'has a database' do + shell("mysql -NBe \"SHOW DATABASES LIKE 'zergdb'\"") do |r| + expect(r.stdout).to match(/zergdb/) + expect(r.stderr).to be_empty + end + end + end + +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mysql/spec/acceptance/nodesets/centos-64-x64-pe.yml b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mysql/spec/acceptance/nodesets/centos-64-x64-pe.yml new file mode 100644 index 00000000000..7d9242f1b95 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mysql/spec/acceptance/nodesets/centos-64-x64-pe.yml @@ -0,0 +1,12 @@ +HOSTS: + centos-64-x64: + roles: + - master + - database + - dashboard + platform: el-6-x86_64 + box : centos-64-x64-vbox4210-nocm + box_url : http://puppet-vagrant-boxes.puppetlabs.com/centos-64-x64-vbox4210-nocm.box + hypervisor : vagrant +CONFIG: + type: pe diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mysql/spec/acceptance/nodesets/default.yml b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mysql/spec/acceptance/nodesets/default.yml new file mode 100644 index 00000000000..05540ed8c5a --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mysql/spec/acceptance/nodesets/default.yml @@ -0,0 +1,10 @@ +HOSTS: + centos-64-x64: + roles: + - master + platform: el-6-x86_64 + box : centos-64-x64-vbox4210-nocm + box_url : http://puppet-vagrant-boxes.puppetlabs.com/centos-64-x64-vbox4210-nocm.box + hypervisor : vagrant +CONFIG: + type: foss diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mysql/spec/acceptance/nodesets/fedora-18-x64.yml b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mysql/spec/acceptance/nodesets/fedora-18-x64.yml new file mode 100644 index 00000000000..13616498307 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mysql/spec/acceptance/nodesets/fedora-18-x64.yml @@ -0,0 +1,10 @@ +HOSTS: + fedora-18-x64: + roles: + - master + platform: fedora-18-x86_64 + box : fedora-18-x64-vbox4210-nocm + box_url : http://puppet-vagrant-boxes.puppetlabs.com/fedora-18-x64-vbox4210-nocm.box + hypervisor : vagrant +CONFIG: + type: foss diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mysql/spec/acceptance/nodesets/sles-11-x64.yml b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mysql/spec/acceptance/nodesets/sles-11-x64.yml new file mode 100644 index 00000000000..41abe2135e2 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mysql/spec/acceptance/nodesets/sles-11-x64.yml @@ -0,0 +1,10 @@ +HOSTS: + sles-11-x64.local: + roles: + - master + platform: sles-11-x64 + box : sles-11sp1-x64-vbox4210-nocm + box_url : http://puppet-vagrant-boxes.puppetlabs.com/sles-11sp1-x64-vbox4210-nocm.box + hypervisor : vagrant +CONFIG: + type: foss diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mysql/spec/acceptance/nodesets/ubuntu-server-10044-x64.yml b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mysql/spec/acceptance/nodesets/ubuntu-server-10044-x64.yml new file mode 100644 index 00000000000..5ca1514e407 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mysql/spec/acceptance/nodesets/ubuntu-server-10044-x64.yml @@ -0,0 +1,10 @@ +HOSTS: + ubuntu-server-10044-x64: + roles: + - master + platform: ubuntu-10.04-amd64 + box : ubuntu-server-10044-x64-vbox4210-nocm + box_url : http://puppet-vagrant-boxes.puppetlabs.com/ubuntu-server-10044-x64-vbox4210-nocm.box + hypervisor : vagrant +CONFIG: + type: foss diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mysql/spec/acceptance/nodesets/ubuntu-server-12042-x64.yml b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mysql/spec/acceptance/nodesets/ubuntu-server-12042-x64.yml new file mode 100644 index 00000000000..d065b304f83 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mysql/spec/acceptance/nodesets/ubuntu-server-12042-x64.yml @@ -0,0 +1,10 @@ +HOSTS: + ubuntu-server-12042-x64: + roles: + - master + platform: ubuntu-12.04-amd64 + box : ubuntu-server-12042-x64-vbox4210-nocm + box_url : http://puppet-vagrant-boxes.puppetlabs.com/ubuntu-server-12042-x64-vbox4210-nocm.box + hypervisor : vagrant +CONFIG: + type: foss diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mysql/spec/acceptance/types/mysql_database_spec.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mysql/spec/acceptance/types/mysql_database_spec.rb new file mode 100644 index 00000000000..c064209916a --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mysql/spec/acceptance/types/mysql_database_spec.rb @@ -0,0 +1,64 @@ +require 'spec_helper_acceptance' + +describe 'mysql_database', :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem')) do + describe 'setup' do + it 'should work with no errors' do + pp = <<-EOS + class { 'mysql::server': } + EOS + + apply_manifest(pp, :catch_failures => true) + end + end + + describe 'creating database' do + it 'should work without errors' do + pp = <<-EOS + mysql_database { 'spec_db': + ensure => present, + } + EOS + + apply_manifest(pp, :catch_failures => true) + end + + it 'should find the database' do + shell("mysql -NBe \"SHOW DATABASES LIKE 'spec_db'\"") do |r| + expect(r.stdout).to match(/^spec_db$/) + expect(r.stderr).to be_empty + end + end + end + + describe 'charset and collate' do + it 'should create two db of different types idempotently' do + pp = <<-EOS + mysql_database { 'spec_latin1': + charset => 'latin1', + collate => 'latin1_swedish_ci', + } + mysql_database { 'spec_utf8': + charset => 'utf8', + collate => 'utf8_general_ci', + } + EOS + + apply_manifest(pp, :catch_failures => true) + apply_manifest(pp, :catch_changes => true) + end + + it 'should find latin1 db' do + shell("mysql -NBe \"SHOW VARIABLES LIKE '%_database'\" spec_latin1") do |r| + expect(r.stdout).to match(/^character_set_database\tlatin1\ncollation_database\tlatin1_swedish_ci$/) + expect(r.stderr).to be_empty + end + end + + it 'should find utf8 db' do + shell("mysql -NBe \"SHOW VARIABLES LIKE '%_database'\" spec_utf8") do |r| + expect(r.stdout).to match(/^character_set_database\tutf8\ncollation_database\tutf8_general_ci$/) + expect(r.stderr).to be_empty + end + end + end +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mysql/spec/acceptance/types/mysql_grant_spec.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mysql/spec/acceptance/types/mysql_grant_spec.rb new file mode 100644 index 00000000000..df8bea4f319 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mysql/spec/acceptance/types/mysql_grant_spec.rb @@ -0,0 +1,308 @@ +require 'spec_helper_acceptance' + +describe 'mysql_grant', :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem')) do + + describe 'setup' do + it 'setup mysql::server' do + pp = <<-EOS + class { 'mysql::server': } + EOS + + apply_manifest(pp, :catch_failures => true) + end + end + + describe 'missing privileges for user' do + it 'should fail' do + pp = <<-EOS + mysql_grant { 'test1@tester/test.*': + ensure => 'present', + table => 'test.*', + user => 'test1@tester', + } + EOS + + expect(apply_manifest(pp, :expect_failures => true).stderr).to match(/privileges parameter is required/) + end + + it 'should not find the user' do + expect(shell("mysql -NBe \"SHOW GRANTS FOR test1@tester\"", { :acceptable_exit_codes => 1}).stderr).to match(/There is no such grant defined for user 'test1' on host 'tester'/) + end + end + + describe 'missing table for user' do + it 'should fail' do + pp = <<-EOS + mysql_grant { 'atest@tester/test.*': + ensure => 'present', + user => 'atest@tester', + privileges => ['ALL'], + } + EOS + + apply_manifest(pp, :expect_failures => true) + end + + it 'should not find the user' do + expect(shell("mysql -NBe \"SHOW GRANTS FOR atest@tester\"", {:acceptable_exit_codes => 1}).stderr).to match(/There is no such grant defined for user 'atest' on host 'tester'/) + end + end + + describe 'adding privileges' do + it 'should work without errors' do + pp = <<-EOS + mysql_grant { 'test2@tester/test.*': + ensure => 'present', + table => 'test.*', + user => 'test2@tester', + privileges => ['SELECT', 'UPDATE'], + } + EOS + + apply_manifest(pp, :catch_failures => true) + end + + it 'should find the user' do + shell("mysql -NBe \"SHOW GRANTS FOR test2@tester\"") do |r| + expect(r.stdout).to match(/GRANT SELECT, UPDATE.*TO 'test2'@'tester'/) + expect(r.stderr).to be_empty + end + end + end + + describe 'adding option' do + it 'should work without errors' do + pp = <<-EOS + mysql_grant { 'test3@tester/test.*': + ensure => 'present', + table => 'test.*', + user => 'test3@tester', + options => ['GRANT'], + privileges => ['SELECT', 'UPDATE'], + } + EOS + + apply_manifest(pp, :catch_failures => true) + end + + it 'should find the user' do + shell("mysql -NBe \"SHOW GRANTS FOR test3@tester\"") do |r| + expect(r.stdout).to match(/GRANT SELECT, UPDATE ON `test`.* TO 'test3'@'tester' WITH GRANT OPTION$/) + expect(r.stderr).to be_empty + end + end + end + + describe 'adding all privileges without table' do + it 'should fail' do + pp = <<-EOS + mysql_grant { 'test4@tester/test.*': + ensure => 'present', + user => 'test4@tester', + options => ['GRANT'], + privileges => ['SELECT', 'UPDATE', 'ALL'], + } + EOS + + expect(apply_manifest(pp, :expect_failures => true).stderr).to match(/table parameter is required./) + end + end + + describe 'adding all privileges' do + it 'should only try to apply ALL' do + pp = <<-EOS + mysql_grant { 'test4@tester/test.*': + ensure => 'present', + table => 'test.*', + user => 'test4@tester', + options => ['GRANT'], + privileges => ['SELECT', 'UPDATE', 'ALL'], + } + EOS + + apply_manifest(pp, :catch_failures => true) + end + + it 'should find the user' do + shell("mysql -NBe \"SHOW GRANTS FOR test4@tester\"") do |r| + expect(r.stdout).to match(/GRANT ALL PRIVILEGES ON `test`.* TO 'test4'@'tester' WITH GRANT OPTION/) + expect(r.stderr).to be_empty + end + end + end + + # Test combinations of user@host to ensure all cases work. + describe 'short hostname' do + it 'should apply' do + pp = <<-EOS + mysql_grant { 'test@short/test.*': + ensure => 'present', + table => 'test.*', + user => 'test@short', + privileges => 'ALL', + } + mysql_grant { 'test@long.hostname.com/test.*': + ensure => 'present', + table => 'test.*', + user => 'test@long.hostname.com', + privileges => 'ALL', + } + mysql_grant { 'test@192.168.5.6/test.*': + ensure => 'present', + table => 'test.*', + user => 'test@192.168.5.6', + privileges => 'ALL', + } + mysql_grant { 'test@2607:f0d0:1002:0051:0000:0000:0000:0004/test.*': + ensure => 'present', + table => 'test.*', + user => 'test@2607:f0d0:1002:0051:0000:0000:0000:0004', + privileges => 'ALL', + } + mysql_grant { 'test@::1/128/test.*': + ensure => 'present', + table => 'test.*', + user => 'test@::1/128', + privileges => 'ALL', + } + EOS + + apply_manifest(pp, :catch_failures => true) + end + + it 'finds short hostname' do + shell("mysql -NBe \"SHOW GRANTS FOR test@short\"") do |r| + expect(r.stdout).to match(/GRANT ALL PRIVILEGES ON `test`.* TO 'test'@'short'/) + expect(r.stderr).to be_empty + end + end + it 'finds long hostname' do + shell("mysql -NBe \"SHOW GRANTS FOR 'test'@'long.hostname.com'\"") do |r| + expect(r.stdout).to match(/GRANT ALL PRIVILEGES ON `test`.* TO 'test'@'long.hostname.com'/) + expect(r.stderr).to be_empty + end + end + it 'finds ipv4' do + shell("mysql -NBe \"SHOW GRANTS FOR 'test'@'192.168.5.6'\"") do |r| + expect(r.stdout).to match(/GRANT ALL PRIVILEGES ON `test`.* TO 'test'@'192.168.5.6'/) + expect(r.stderr).to be_empty + end + end + it 'finds ipv6' do + shell("mysql -NBe \"SHOW GRANTS FOR 'test'@'2607:f0d0:1002:0051:0000:0000:0000:0004'\"") do |r| + expect(r.stdout).to match(/GRANT ALL PRIVILEGES ON `test`.* TO 'test'@'2607:f0d0:1002:0051:0000:0000:0000:0004'/) + expect(r.stderr).to be_empty + end + end + it 'finds short ipv6' do + shell("mysql -NBe \"SHOW GRANTS FOR 'test'@'::1/128'\"") do |r| + expect(r.stdout).to match(/GRANT ALL PRIVILEGES ON `test`.* TO 'test'@'::1\/128'/) + expect(r.stderr).to be_empty + end + end + end + + describe 'complex test' do + it 'setup mysql::server' do + pp = <<-EOS + $dbSubnet = '10.10.10.%' + + mysql_database { 'foo': + ensure => present, + } + + exec { 'mysql-create-table': + command => '/usr/bin/mysql -NBe "CREATE TABLE foo.bar (name VARCHAR(20))"', + environment => "HOME=${::root_home}", + unless => '/usr/bin/mysql -NBe "SELECT 1 FROM foo.bar LIMIT 1;"', + require => Mysql_database['foo'], + } + + Mysql_grant { + ensure => present, + options => ['GRANT'], + privileges => ['ALL'], + table => '*.*', + require => [ Mysql_database['foo'], Exec['mysql-create-table'] ], + } + + mysql_grant { "user1@${dbSubnet}/*.*": + user => "user1@${dbSubnet}", + } + mysql_grant { "user2@${dbSubnet}/foo.bar": + privileges => ['SELECT', 'INSERT', 'UPDATE'], + user => "user2@${dbSubnet}", + table => 'foo.bar', + } + mysql_grant { "user3@${dbSubnet}/foo.*": + privileges => ['SELECT', 'INSERT', 'UPDATE'], + user => "user3@${dbSubnet}", + table => 'foo.*', + } + mysql_grant { 'web@%/*.*': + user => 'web@%', + } + mysql_grant { "web@${dbSubnet}/*.*": + user => "web@${dbSubnet}", + } + mysql_grant { "web@${fqdn}/*.*": + user => "web@${fqdn}", + } + mysql_grant { 'web@localhost/*.*': + user => 'web@localhost', + } + EOS + + apply_manifest(pp, :catch_failures => true) + apply_manifest(pp, :catch_changes => true) + end + end + + describe 'lower case privileges' do + it 'create ALL privs' do + pp = <<-EOS + mysql_grant { 'lowercase@localhost/*.*': + user => 'lowercase@localhost', + privileges => 'ALL', + table => '*.*', + } + EOS + + apply_manifest(pp, :catch_failures => true) + end + + it 'create lowercase all privs' do + pp = <<-EOS + mysql_grant { 'lowercase@localhost/*.*': + user => 'lowercase@localhost', + privileges => 'all', + table => '*.*', + } + EOS + + expect(apply_manifest(pp, :catch_failures => true).exit_code).to eq(0) + end + end + + describe 'adding procedure privileges' do + it 'should work without errors' do + pp = <<-EOS + mysql_grant { 'test2@tester/PROCEDURE test.simpleproc': + ensure => 'present', + table => 'PROCEDURE test.simpleproc', + user => 'test2@tester', + privileges => ['EXECUTE'], + } + EOS + + apply_manifest(pp, :catch_failures => true) + end + + it 'should find the user' do + shell("mysql -NBe \"SHOW GRANTS FOR test2@tester\"") do |r| + expect(r.stdout).to match(/GRANT EXECUTE ON PROCEDURE `test`.`simpleproc` TO 'test2'@'tester'/) + expect(r.stderr).to be_empty + end + end + end +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mysql/spec/acceptance/types/mysql_user_spec.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mysql/spec/acceptance/types/mysql_user_spec.rb new file mode 100644 index 00000000000..65b403f193b --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mysql/spec/acceptance/types/mysql_user_spec.rb @@ -0,0 +1,32 @@ +require 'spec_helper_acceptance' + +describe 'mysql_user', :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem')) do + describe 'setup' do + it 'should work with no errors' do + pp = <<-EOS + class { 'mysql::server': } + EOS + + apply_manifest(pp, :catch_failures => true) + end + end + + describe 'adding user' do + it 'should work without errors' do + pp = <<-EOS + mysql_user { 'ashp@localhost': + password_hash => '6f8c114b58f2ce9e', + } + EOS + + apply_manifest(pp, :catch_failures => true) + end + + it 'should find the user' do + shell("mysql -NBe \"select '1' from mysql.user where CONCAT(user, '@', host) = 'ashp@localhost'\"") do |r| + expect(r.stdout).to match(/^1$/) + expect(r.stderr).to be_empty + end + end + end +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mysql/spec/acceptance/unsupported_spec.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mysql/spec/acceptance/unsupported_spec.rb new file mode 100644 index 00000000000..449f35a63b8 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mysql/spec/acceptance/unsupported_spec.rb @@ -0,0 +1,10 @@ +require 'spec_helper_acceptance' + +describe 'unsupported distributions and OSes', :if => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem')) do + it 'should fail' do + pp = <<-EOS + class { 'mysql::server': } + EOS + expect(apply_manifest(pp, :expect_failures => true).stderr).to match(/unsupported osfamily/i) + end +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mysql/spec/classes/mysql_bindings_spec.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mysql/spec/classes/mysql_bindings_spec.rb new file mode 100644 index 00000000000..8ec4428bb0a --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mysql/spec/classes/mysql_bindings_spec.rb @@ -0,0 +1,58 @@ +require 'spec_helper' + +describe 'mysql::bindings' do + let(:params) {{ + 'java_enable' => true, + 'perl_enable' => true, + 'php_enable' => true, + 'python_enable' => true, + 'ruby_enable' => true, + }} + + shared_examples 'bindings' do |osfamily, operatingsystem, java_name, perl_name, php_name, python_name, ruby_name| + let :facts do + { :osfamily => osfamily, :operatingsystem => operatingsystem, :root_home => '/root'} + end + it { should contain_package('mysql-connector-java').with( + :name => java_name, + :ensure => 'present' + )} + it { should contain_package('perl_mysql').with( + :name => perl_name, + :ensure => 'present' + )} + it { should contain_package('python-mysqldb').with( + :name => python_name, + :ensure => 'present' + )} + it { should contain_package('ruby_mysql').with( + :name => ruby_name, + :ensure => 'present' + )} + end + + context 'Debian' do + it_behaves_like 'bindings', 'Debian', 'Debian', 'libmysql-java', 'libdbd-mysql-perl', 'php5-mysql', 'python-mysqldb', 'libmysql-ruby' + it_behaves_like 'bindings', 'Debian', 'Ubuntu', 'libmysql-java', 'libdbd-mysql-perl', 'php5-mysql', 'python-mysqldb', 'libmysql-ruby' + end + + context 'freebsd' do + it_behaves_like 'bindings', 'FreeBSD', 'FreeBSD', 'databases/mysql-connector-java', 'p5-DBD-mysql', 'databases/php5-mysql', 'databases/py-MySQLdb', 'databases/ruby-mysql' + end + + context 'redhat' do + it_behaves_like 'bindings', 'RedHat', 'RedHat', 'mysql-connector-java', 'perl-DBD-MySQL', 'php-mysql', 'MySQL-python', 'ruby-mysql' + it_behaves_like 'bindings', 'RedHat', 'OpenSuSE', 'mysql-connector-java', 'perl-DBD-MySQL', 'php-mysql', 'MySQL-python', 'ruby-mysql' + end + + describe 'on any other os' do + let :facts do + {:osfamily => 'foo', :root_home => '/root'} + end + + it 'should fail' do + expect { subject }.to raise_error(/Unsupported osfamily: foo/) + end + end + +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mysql/spec/classes/mysql_client_spec.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mysql/spec/classes/mysql_client_spec.rb new file mode 100644 index 00000000000..d7386d17a69 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mysql/spec/classes/mysql_client_spec.rb @@ -0,0 +1,16 @@ +describe 'mysql::client' do + let(:facts) {{ :osfamily => 'RedHat' }} + + context 'with defaults' do + it { should_not contain_class('mysql::bindings') } + it { should contain_package('mysql_client') } + end + + context 'with bindings enabled' do + let(:params) {{ :bindings_enable => true }} + + it { should contain_class('mysql::bindings') } + it { should contain_package('mysql_client') } + end + +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mysql/spec/classes/mysql_server_account_security_spec.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mysql/spec/classes/mysql_server_account_security_spec.rb new file mode 100644 index 00000000000..1d0e7506c44 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mysql/spec/classes/mysql_server_account_security_spec.rb @@ -0,0 +1,41 @@ +require 'spec_helper' + +describe 'mysql::server::account_security' do + + let :facts do { + :fqdn => 'myhost.mydomain', + :hostname => 'myhost', + :root_home => '/root' + } + end + + it 'should remove Mysql_User[root@myhost.mydomain]' do + should contain_mysql_user('root@myhost.mydomain').with_ensure('absent') + end + it 'should remove Mysql_User[root@myhost]' do + should contain_mysql_user('root@myhost').with_ensure('absent') + end + it 'should remove Mysql_User[root@127.0.0.1]' do + should contain_mysql_user('root@127.0.0.1').with_ensure('absent') + end + it 'should remove Mysql_User[root@::1]' do + should contain_mysql_user('root@::1').with_ensure('absent') + end + it 'should remove Mysql_User[@myhost.mydomain]' do + should contain_mysql_user('@myhost.mydomain').with_ensure('absent') + end + it 'should remove Mysql_User[@myhost]' do + should contain_mysql_user('@myhost').with_ensure('absent') + end + it 'should remove Mysql_User[@localhost]' do + should contain_mysql_user('@localhost').with_ensure('absent') + end + it 'should remove Mysql_User[@%]' do + should contain_mysql_user('@%').with_ensure('absent') + end + + it 'should remove Mysql_database[test]' do + should contain_mysql_database('test').with_ensure('absent') + end + +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mysql/spec/classes/mysql_server_backup_spec.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mysql/spec/classes/mysql_server_backup_spec.rb new file mode 100644 index 00000000000..c46f95bd790 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mysql/spec/classes/mysql_server_backup_spec.rb @@ -0,0 +1,183 @@ +require 'spec_helper' + +describe 'mysql::server::backup' do + + let(:default_params) { + { 'backupuser' => 'testuser', + 'backuppassword' => 'testpass', + 'backupdir' => '/tmp', + 'backuprotate' => '25', + 'delete_before_dump' => true, + } + } + context 'standard conditions' do + let(:params) { default_params } + + it { should contain_mysql_user('testuser@localhost').with( + :require => 'Class[Mysql::Server::Root_password]' + )} + + it { should contain_mysql_grant('testuser@localhost/*.*').with( + :privileges => ["SELECT", "RELOAD", "LOCK TABLES", "SHOW VIEW"] + )} + + it { should contain_cron('mysql-backup').with( + :command => '/usr/local/sbin/mysqlbackup.sh', + :ensure => 'present' + )} + + it { should contain_file('mysqlbackup.sh').with( + :path => '/usr/local/sbin/mysqlbackup.sh', + :ensure => 'present' + ) } + + it { should contain_file('mysqlbackupdir').with( + :path => '/tmp', + :ensure => 'directory' + )} + + it 'should have compression by default' do + verify_contents(subject, 'mysqlbackup.sh', [ + ' --all-databases | bzcat -zc > ${DIR}/${PREFIX}`date +%Y%m%d-%H%M%S`.sql.bz2', + ]) + end + it 'should skip backing up events table by default' do + verify_contents(subject, 'mysqlbackup.sh', [ + 'EVENTS="--ignore-table=mysql.event"', + ]) + end + + it 'should have 25 days of rotation' do + # MySQL counts from 0 I guess. + should contain_file('mysqlbackup.sh').with_content(/.*ROTATE=24.*/) + end + end + + context 'custom ownership and mode for backupdir' do + let(:params) do + { :backupdirmode => '0750', + :backupdirowner => 'testuser', + :backupdirgroup => 'testgrp', + }.merge(default_params) + end + + it { should contain_file('mysqlbackupdir').with( + :path => '/tmp', + :ensure => 'directory', + :mode => '0750', + :owner => 'testuser', + :group => 'testgrp' + ) } + end + + context 'with compression disabled' do + let(:params) do + { :backupcompress => false }.merge(default_params) + end + + it { should contain_file('mysqlbackup.sh').with( + :path => '/usr/local/sbin/mysqlbackup.sh', + :ensure => 'present' + ) } + + it 'should be able to disable compression' do + verify_contents(subject, 'mysqlbackup.sh', [ + ' --all-databases > ${DIR}/${PREFIX}`date +%Y%m%d-%H%M%S`.sql', + ]) + end + end + + context 'with mysql.events backedup' do + let(:params) do + { :ignore_events => false }.merge(default_params) + end + + it { should contain_file('mysqlbackup.sh').with( + :path => '/usr/local/sbin/mysqlbackup.sh', + :ensure => 'present' + ) } + + it 'should be able to backup events table' do + verify_contents(subject, 'mysqlbackup.sh', [ + 'EVENTS="--events"', + ]) + end + end + + + context 'with database list specified' do + let(:params) do + { :backupdatabases => ['mysql'] }.merge(default_params) + end + + it { should contain_file('mysqlbackup.sh').with( + :path => '/usr/local/sbin/mysqlbackup.sh', + :ensure => 'present' + ) } + + it 'should have a backup file for each database' do + content = subject.resource('file','mysqlbackup.sh').send(:parameters)[:content] + content.should match(' mysql | bzcat -zc \${DIR}\\\${PREFIX}mysql_`date') + # verify_contents(subject, 'mysqlbackup.sh', [ + # ' mysql | bzcat -zc ${DIR}/${PREFIX}mysql_`date +%Y%m%d-%H%M%S`.sql', + # ]) + end + end + + context 'with file per database' do + let(:params) do + default_params.merge({ :file_per_database => true }) + end + + it 'should loop through backup all databases' do + verify_contents(subject, 'mysqlbackup.sh', [ + 'mysql -s -r -N -e \'SHOW DATABASES\' | while read dbname', + 'do', + ' mysqldump -u${USER} -p${PASS} --opt --flush-logs --single-transaction \\', + ' ${EVENTS} \\', + ' ${dbname} | bzcat -zc > ${DIR}/${PREFIX}${dbname}_`date +%Y%m%d-%H%M%S`.sql.bz2', + 'done', + ]) + end + + context 'with compression disabled' do + let(:params) do + default_params.merge({ :file_per_database => true, :backupcompress => false }) + end + + it 'should loop through backup all databases without compression' do + verify_contents(subject, 'mysqlbackup.sh', [ + ' ${dbname} > ${DIR}/${PREFIX}${dbname}_`date +%Y%m%d-%H%M%S`.sql', + ]) + end + end + end + + context 'with postscript' do + let(:params) do + default_params.merge({ :postscript => 'rsync -a /tmp backup01.local-lan:' }) + end + + it 'should be add postscript' do + verify_contents(subject, 'mysqlbackup.sh', [ + 'rsync -a /tmp backup01.local-lan:', + ]) + end + end + + context 'with postscripts' do + let(:params) do + default_params.merge({ :postscript => [ + 'rsync -a /tmp backup01.local-lan:', + 'rsync -a /tmp backup02.local-lan:', + ]}) + end + + it 'should be add postscript' do + verify_contents(subject, 'mysqlbackup.sh', [ + 'rsync -a /tmp backup01.local-lan:', + 'rsync -a /tmp backup02.local-lan:', + ]) + end + end +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mysql/spec/classes/mysql_server_monitor_spec.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mysql/spec/classes/mysql_server_monitor_spec.rb new file mode 100644 index 00000000000..8df9530f0a5 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mysql/spec/classes/mysql_server_monitor_spec.rb @@ -0,0 +1,31 @@ +require 'spec_helper' +describe 'mysql::server::monitor' do + let :facts do + { :osfamily => 'Debian', :root_home => '/root' } + end + let :pre_condition do + "include 'mysql::server'" + end + + let :default_params do + { + :mysql_monitor_username => 'monitoruser', + :mysql_monitor_password => 'monitorpass', + :mysql_monitor_hostname => 'monitorhost', + } + end + + let :params do + default_params + end + + it { should contain_mysql_user('monitoruser@monitorhost')} + + it { should contain_mysql_grant('monitoruser@monitorhost/*.*').with( + :ensure => 'present', + :user => 'monitoruser@monitorhost', + :table => '*.*', + :privileges => ["PROCESS", "SUPER"], + :require => 'Mysql_user[monitoruser@monitorhost]' + )} +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mysql/spec/classes/mysql_server_mysqltuner_spec.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mysql/spec/classes/mysql_server_mysqltuner_spec.rb new file mode 100644 index 00000000000..7e9499a65ad --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mysql/spec/classes/mysql_server_mysqltuner_spec.rb @@ -0,0 +1,5 @@ +describe 'mysql::server::mysqltuner' do + + it { should contain_file('/usr/local/bin/mysqltuner') } + +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mysql/spec/classes/mysql_server_spec.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mysql/spec/classes/mysql_server_spec.rb new file mode 100644 index 00000000000..c14b70f7c66 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mysql/spec/classes/mysql_server_spec.rb @@ -0,0 +1,193 @@ +require 'spec_helper' +describe 'mysql::server' do + let(:facts) {{:osfamily => 'RedHat', :root_home => '/root'}} + + context 'with defaults' do + it { should contain_class('mysql::server::install') } + it { should contain_class('mysql::server::config') } + it { should contain_class('mysql::server::service') } + it { should contain_class('mysql::server::root_password') } + it { should contain_class('mysql::server::providers') } + end + + # make sure that overriding the mysqld settings keeps the defaults for everything else + context 'with overrides' do + let(:params) {{ :override_options => { 'mysqld' => { 'socket' => '/var/lib/mysql/mysql.sock' } } }} + it do + should contain_file('/etc/my.cnf').with({ + :mode => '0644', + }).with_content(/basedir/) + end + end + + describe 'with multiple instance of an option' do + let(:params) {{ :override_options => { 'mysqld' => { 'replicate-do-db' => ['base1', 'base2', 'base3'], } }}} + it do + should contain_file('/etc/my.cnf').with_content( + /^replicate-do-db = base1$/ + ).with_content( + /^replicate-do-db = base2$/ + ).with_content( + /^replicate-do-db = base3$/ + ) + end + end + + describe 'an option set to true' do + let(:params) { + { :override_options => { 'mysqld' => { 'ssl' => true } }} + } + it do + should contain_file('/etc/my.cnf').with_content(/^\s*ssl\s*(?:$|= true)/m) + end + end + + describe 'an option set to false' do + let(:params) { + { :override_options => { 'mysqld' => { 'ssl' => false } }} + } + it do + should contain_file('/etc/my.cnf').with_content(/^\s*ssl = false/m) + end + end + + context 'with remove_default_accounts set' do + let (:params) {{ :remove_default_accounts => true }} + it { should contain_class('mysql::server::account_security') } + end + + context 'mysql::server::install' do + let(:params) {{ :package_ensure => 'present', :name => 'mysql-server' }} + it do + should contain_package('mysql-server').with({ + :ensure => :present, + :name => 'mysql-server', + }) + end + end + + context 'mysql::server::config' do + it do + should contain_file('/etc/mysql').with({ + :ensure => :directory, + :mode => '0755', + }) + end + + it do + should contain_file('/etc/mysql/conf.d').with({ + :ensure => :directory, + :mode => '0755', + }) + end + + it do + should contain_file('/etc/my.cnf').with({ + :mode => '0644', + }) + end + end + + context 'mysql::server::service' do + context 'with defaults' do + it { should contain_service('mysqld') } + end + + context 'service_enabled set to false' do + let(:params) {{ :service_enabled => false }} + + it do + should contain_service('mysqld').with({ + :ensure => :stopped + }) + end + end + end + + context 'mysql::server::root_password' do + describe 'when defaults' do + it { should_not contain_mysql_user('root@localhost') } + it { should_not contain_file('/root/.my.cnf') } + end + describe 'when set' do + let(:params) {{:root_password => 'SET' }} + it { should contain_mysql_user('root@localhost') } + it { should contain_file('/root/.my.cnf') } + end + + end + + context 'mysql::server::providers' do + describe 'with users' do + let(:params) {{:users => { + 'foo@localhost' => { + 'max_connections_per_hour' => '1', + 'max_queries_per_hour' => '2', + 'max_updates_per_hour' => '3', + 'max_user_connections' => '4', + 'password_hash' => '*F3A2A51A9B0F2BE2468926B4132313728C250DBF' + }, + 'foo2@localhost' => {} + }}} + it { should contain_mysql_user('foo@localhost').with( + :max_connections_per_hour => '1', + :max_queries_per_hour => '2', + :max_updates_per_hour => '3', + :max_user_connections => '4', + :password_hash => '*F3A2A51A9B0F2BE2468926B4132313728C250DBF' + )} + it { should contain_mysql_user('foo2@localhost').with( + :max_connections_per_hour => nil, + :max_queries_per_hour => nil, + :max_updates_per_hour => nil, + :max_user_connections => nil, + :password_hash => '' + )} + end + + describe 'with grants' do + let(:params) {{:grants => { + 'foo@localhost/somedb.*' => { + 'user' => 'foo@localhost', + 'table' => 'somedb.*', + 'privileges' => ["SELECT", "UPDATE"], + 'options' => ["GRANT"], + }, + 'foo2@localhost/*.*' => { + 'user' => 'foo2@localhost', + 'table' => '*.*', + 'privileges' => ["SELECT"], + }, + }}} + it { should contain_mysql_grant('foo@localhost/somedb.*').with( + :user => 'foo@localhost', + :table => 'somedb.*', + :privileges => ["SELECT", "UPDATE"], + :options => ["GRANT"] + )} + it { should contain_mysql_grant('foo2@localhost/*.*').with( + :user => 'foo2@localhost', + :table => '*.*', + :privileges => ["SELECT"], + :options => nil + )} + end + + describe 'with databases' do + let(:params) {{:databases => { + 'somedb' => { + 'charset' => 'latin1', + 'collate' => 'latin1', + }, + 'somedb2' => {} + }}} + it { should contain_mysql_database('somedb').with( + :charset => 'latin1', + :collate => 'latin1' + )} + it { should contain_mysql_database('somedb2')} + end + + end + +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mysql/spec/defines/mysql_db_spec.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mysql/spec/defines/mysql_db_spec.rb new file mode 100644 index 00000000000..a7ee31ff8b7 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mysql/spec/defines/mysql_db_spec.rb @@ -0,0 +1,51 @@ +require 'spec_helper' + +describe 'mysql::db', :type => :define do + let(:facts) {{ :osfamily => 'RedHat' }} + let(:title) { 'test_db' } + + let(:params) { + { 'user' => 'testuser', + 'password' => 'testpass', + } + } + + it 'should report an error when ensure is not present or absent' do + params.merge!({'ensure' => 'invalid_val'}) + expect { subject }.to raise_error(Puppet::Error, + /invalid_val is not supported for ensure\. Allowed values are 'present' and 'absent'\./) + end + + it 'should not notify the import sql exec if no sql script was provided' do + should contain_mysql_database('test_db').without_notify + end + + it 'should subscribe to database if sql script is given' do + params.merge!({'sql' => 'test_sql'}) + should contain_exec('test_db-import').with_subscribe('Mysql_database[test_db]') + end + + it 'should only import sql script on creation if not enforcing' do + params.merge!({'sql' => 'test_sql', 'enforce_sql' => false}) + should contain_exec('test_db-import').with_refreshonly(true) + end + + it 'should import sql script on creation if enforcing' do + params.merge!({'sql' => 'test_sql', 'enforce_sql' => true}) + should contain_exec('test_db-import').with_refreshonly(false) + end + + it 'should not create database and database user' do + params.merge!({'ensure' => 'absent', 'host' => 'localhost'}) + should contain_mysql_database('test_db').with_ensure('absent') + should contain_mysql_user('testuser@localhost').with_ensure('absent') + end + + it 'should create with an appropriate collate and charset' do + params.merge!({'charset' => 'utf8', 'collate' => 'utf8_danish_ci'}) + should contain_mysql_database('test_db').with({ + 'charset' => 'utf8', + 'collate' => 'utf8_danish_ci', + }) + end +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mysql/spec/spec.opts b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mysql/spec/spec.opts new file mode 100644 index 00000000000..91cd6427ed6 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mysql/spec/spec.opts @@ -0,0 +1,6 @@ +--format +s +--colour +--loadby +mtime +--backtrace diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mysql/spec/spec_helper.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mysql/spec/spec_helper.rb new file mode 100644 index 00000000000..1fd2563f597 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mysql/spec/spec_helper.rb @@ -0,0 +1,5 @@ +require 'simplecov' +SimpleCov.start do + add_filter "/spec/" +end +require 'puppetlabs_spec_helper/module_spec_helper' diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mysql/spec/spec_helper_acceptance.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mysql/spec/spec_helper_acceptance.rb new file mode 100644 index 00000000000..a76c2e58338 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mysql/spec/spec_helper_acceptance.rb @@ -0,0 +1,48 @@ +require 'beaker-rspec' + +UNSUPPORTED_PLATFORMS = [ 'Windows', 'Solaris', 'AIX' ] + +unless ENV['RS_PROVISION'] == 'no' + hosts.each do |host| + # Install Puppet + if host.is_pe? + install_pe + else + install_package host, 'rubygems' + on host, 'gem install puppet --no-ri --no-rdoc' + on host, "mkdir -p #{host['distmoduledir']}" + end + end +end + +RSpec.configure do |c| + # Project root + proj_root = File.expand_path(File.join(File.dirname(__FILE__), '..')) + + # Readable test descriptions + c.formatter = :documentation + + # Configure all nodes in nodeset + c.before :suite do + # Install module and dependencies + puppet_module_install(:source => proj_root, :module_name => 'mysql') + hosts.each do |host| + # Required for binding tests. + if fact('osfamily') == 'RedHat' + version = fact("operatingsystemmajrelease") + shell("yum localinstall -y http://yum.puppetlabs.com/puppetlabs-release-el-#{version}.noarch.rpm") + if version == '6' + shell("yum localinstall -y http://mirror.pnl.gov/epel/6/i386/epel-release-6-8.noarch.rpm") + elsif version == '5' + shell("yum localinstall -y http://mirrors.servercentral.net/fedora/epel/5/i386/epel-release-5-4.noarch.rpm") + else + puts "Sorry, this version is not supported." + exit + end + end + + shell("/bin/touch #{default['distmoduledir']}/hiera.yaml") + shell('puppet module install puppetlabs-stdlib --version 3.2.0', { :acceptable_exit_codes => [0,1] }) + end + end +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mysql/spec/spec_helper_system.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mysql/spec/spec_helper_system.rb new file mode 100644 index 00000000000..de20690c51e --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mysql/spec/spec_helper_system.rb @@ -0,0 +1,25 @@ +require 'rspec-system/spec_helper' +require 'rspec-system-puppet/helpers' +require 'rspec-system-serverspec/helpers' + +include RSpecSystemPuppet::Helpers + +RSpec.configure do |c| + # Project root + proj_root = File.expand_path(File.join(File.dirname(__FILE__), '..')) + + # Enable colour + c.tty = true + + c.include RSpecSystemPuppet::Helpers + + # This is where we 'setup' the nodes before running our tests + c.before :suite do + # Install puppet + puppet_install + + # Install modules and dependencies + puppet_module_install(:source => proj_root, :module_name => 'mysql') + shell('puppet module install puppetlabs-stdlib') + end +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mysql/spec/system/mysql_account_delete_spec.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mysql/spec/system/mysql_account_delete_spec.rb new file mode 100644 index 00000000000..11f776a05c2 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mysql/spec/system/mysql_account_delete_spec.rb @@ -0,0 +1,35 @@ +require 'spec_helper_system' + +describe 'mysql::server::account_security class' do + + describe 'running puppet code' do + # Using puppet_apply as a helper + it 'should work with no errors' do + pp = <<-EOS + class { 'mysql::server': remove_default_accounts => true } + EOS + + # Run it twice and test for idempotency + puppet_apply(pp) do |r| + r.exit_code.should_not == 1 + r.refresh + r.exit_code.should be_zero + end + end + + describe 'accounts' do + it 'should delete accounts' do + shell("mysql -e 'show grants for root@127.0.01;'") do |s| + s.exit_code.should == 1 + end + end + + it 'should delete databases' do + shell("mysql -e 'show databases;' |grep test") do |s| + s.exit_code.should == 1 + end + end + end + end + +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mysql/spec/system/mysql_backup_spec.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mysql/spec/system/mysql_backup_spec.rb new file mode 100644 index 00000000000..cdbf4ed2789 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mysql/spec/system/mysql_backup_spec.rb @@ -0,0 +1,62 @@ +require 'spec_helper_system' + +describe 'mysql::server::backup class' do + context 'should work with no errors' do + pp = <<-EOS + class { 'mysql::server': override_options => { 'root_password' => 'password' } } + mysql::db { 'backup1': + user => 'backup', + password => 'secret', + } + + class { 'mysql::server::backup': + backupuser => 'myuser', + backuppassword => 'mypassword', + backupdir => '/tmp/backups', + backupcompress => true, + postscript => [ + 'rm -rf /var/tmp/mysqlbackups', + 'rm -f /var/tmp/mysqlbackups.done', + 'cp -r /tmp/backups /var/tmp/mysqlbackups', + 'touch /var/tmp/mysqlbackups.done', + ], + } + EOS + + context puppet_apply(pp) do + its(:stderr) { should be_empty } + its(:exit_code) { should_not == 1 } + its(:refresh) { should be_nil } + its(:stderr) { should be_empty } + its(:exit_code) { should be_zero } + end + end + + describe 'mysqlbackup.sh' do + context 'should run mysqlbackup.sh with no errors' do + context shell("/usr/local/sbin/mysqlbackup.sh") do + its(:exit_code) { should be_zero } + its(:stderr) { should be_empty } + end + end + + context 'should dump all databases to single file' do + describe command('ls /tmp/backups/ | grep -c "mysql_backup_[0-9][0-9]*-[0-9][0-9]*.sql.bz2"') do + it { should return_stdout /1/ } + it { should return_exit_status 0 } + end + end + + context 'should create one file per database per run' do + context shell("/usr/local/sbin/mysqlbackup.sh") do + its(:exit_code) { should be_zero } + its(:stderr) { should be_empty } + end + + describe command('ls /tmp/backups/ | grep -c "mysql_backup_backup1_[0-9][0-9]*-[0-9][0-9]*.sql.bz2"') do + it { should return_stdout /2/ } + it { should return_exit_status 0 } + end + end + end +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mysql/spec/system/mysql_bindings_spec.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mysql/spec/system/mysql_bindings_spec.rb new file mode 100644 index 00000000000..694cf574d43 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mysql/spec/system/mysql_bindings_spec.rb @@ -0,0 +1,90 @@ +require 'spec_helper_system' + +describe 'mysql::bindings class' do + let(:os) { + node.facts['osfamily'] + } + + case node.facts['osfamily'] + when 'RedHat' + java_package = 'mysql-connector-java' + perl_package = 'perl-DBD-MySQL' + python_package = 'MySQL-python' + ruby_package = 'ruby-mysql' + when 'Suse' + java_package = 'mysql-connector-java' + perl_package = 'perl-DBD-MySQL' + python_package = 'python-mysql' + case node.facts['operatingsystem'] + when /OpenSuSE/ + ruby_package = 'rubygem-mysql' + when /(SLES|SLED)/ + ruby_package = 'ruby-mysql' + end + when 'Debian' + java_package = 'libmysql-java' + perl_package = 'libdbd-mysql-perl' + python_package = 'python-mysqldb' + ruby_package = 'libmysql-ruby' + when 'FreeBSD' + java_package = 'databases/mysql-connector-java' + perl_package = 'p5-DBD-mysql' + python_package = 'databases/py-MySQLdb' + ruby_package = 'ruby-mysql' + else + case node.facts['operatingsystem'] + when 'Amazon' + java_package = 'mysql-connector-java' + perl_package = 'perl-DBD-MySQL' + python_package = 'MySQL-python' + ruby_package = 'ruby-mysql' + end + end + + describe 'running puppet code' do + # Using puppet_apply as a helper + it 'should work with no errors' do + pp = <<-EOS + class { 'mysql::bindings': } + EOS + + # Run it twice and test for idempotency + puppet_apply(pp) do |r| + r.exit_code.should_not == 1 + r.refresh + r.exit_code.should be_zero + end + end + end + + describe 'enabling bindings' do + it 'should work with no errors' do + puppet_apply(%{ + class { 'mysql::bindings': + java_enable => true, + perl_enable => true, + python_enable => true, + ruby_enable => true, + } + }) + end + + describe package(java_package) do + it { should be_installed } + end + + describe package(perl_package) do + it { should be_installed } + end + + describe package(python_package) do + it { should be_installed } + end + + describe package(ruby_package) do + it { should be_installed } + end + + end + +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mysql/spec/system/mysql_db_spec.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mysql/spec/system/mysql_db_spec.rb new file mode 100644 index 00000000000..49299e1ddb1 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mysql/spec/system/mysql_db_spec.rb @@ -0,0 +1,61 @@ +require 'spec_helper_system' + +describe 'mysql::db define' do + describe 'creating a database' do + # Using puppet_apply as a helper + it 'should work with no errors' do + pp = <<-EOS + class { 'mysql::server': override_options => { 'root_password' => 'password' } } + mysql::db { 'spec1': + user => 'root1', + password => 'password', + } + EOS + + # Run it twice and test for idempotency + puppet_apply(pp) do |r| + [0,2].should include r.exit_code + r.refresh + r.exit_code.should be_zero + end + end + + it 'should have the database' do + shell("mysql -e 'show databases;'|grep spec1") do |s| + s.exit_code.should be_zero + end + end + end + + describe 'creating a database with post-sql' do + # Using puppet_apply as a helper + it 'should work with no errors' do + pp = <<-EOS + class { 'mysql::server': override_options => { 'root_password' => 'password' } } + file { '/tmp/spec.sql': + ensure => file, + content => 'CREATE TABLE table1 (id int);', + before => Mysql::Db['spec2'], + } + mysql::db { 'spec2': + user => 'root1', + password => 'password', + sql => '/tmp/spec.sql', + } + EOS + + # Run it twice and test for idempotency + puppet_apply(pp) do |r| + [0,2].should include r.exit_code + r.refresh + r.exit_code.should be_zero + end + end + + it 'should have the table' do + shell("mysql -e 'show tables;' spec2|grep table1") do |s| + s.exit_code.should == 0 + end + end + end +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mysql/spec/system/mysql_server_monitor_spec.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mysql/spec/system/mysql_server_monitor_spec.rb new file mode 100644 index 00000000000..b7ebd0dffd5 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mysql/spec/system/mysql_server_monitor_spec.rb @@ -0,0 +1,30 @@ +require 'spec_helper_system' + +describe 'mysql::server::monitor class' do + context 'should work with no errors' do + pp = <<-EOS + class { 'mysql::server': root_password => 'password' } + + class { 'mysql::server::monitor': + mysql_monitor_username => 'monitoruser', + mysql_monitor_password => 'monitorpass', + mysql_monitor_hostname => 'localhost', + } + EOS + + context puppet_apply(pp) do + its(:stderr) { should be_empty } + its(:exit_code) { should_not == 1 } + its(:refresh) { should be_nil } + its(:stderr) { should be_empty } + its(:exit_code) { should be_zero } + end + + context 'should run mysqladmin ping with no errors' do + describe command("mysqladmin -u monitoruser -pmonitorpass -h localhost ping") do + it { should return_stdout /mysqld is alive/ } + it { should return_exit_status 0 } + end + end + end +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mysql/spec/system/mysql_server_root_password_spec.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mysql/spec/system/mysql_server_root_password_spec.rb new file mode 100644 index 00000000000..ea9cafad56c --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mysql/spec/system/mysql_server_root_password_spec.rb @@ -0,0 +1,71 @@ +require 'spec_helper_system' + +describe 'mysql::server::root_password class' do + + describe 'reset' do + it 'shuts down mysql' do + pp = <<-EOS + class { 'mysql::server': service_enabled => false } + EOS + + puppet_apply(pp) do |r| + r.exit_code.should_not == 1 + end + end + + it 'deletes the /root/.my.cnf password' do + shell('rm -rf /root/.my.cnf') + end + + it 'deletes all databases' do + case node.facts['osfamily'] + when 'RedHat' + shell('rm -rf `grep datadir /etc/my.cnf | cut -d" " -f 3`/*') + when 'Debian' + shell('rm -rf `grep datadir /etc/mysql/my.cnf | cut -d" " -f 3`/*') + shell('mysql_install_db') + end + end + + it 'starts up mysql' do + pp = <<-EOS + class { 'mysql::server': service_enabled => true } + EOS + + puppet_apply(pp) do |r| + r.exit_code.should_not == 1 + end + end + end + + describe 'when unset' do + it 'should work' do + pp = <<-EOS + class { 'mysql::server': root_password => 'test' } + EOS + + # Run it twice and test for idempotency + puppet_apply(pp) do |r| + r.exit_code.should_not == 1 + r.refresh + r.exit_code.should be_zero + end + end + end + + describe 'when set' do + it 'should work' do + pp = <<-EOS + class { 'mysql::server': root_password => 'new', old_root_password => 'test' } + EOS + + # Run it twice and test for idempotency + puppet_apply(pp) do |r| + r.exit_code.should_not == 1 + r.refresh + r.exit_code.should be_zero + end + end + end + +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mysql/spec/system/mysql_server_spec.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mysql/spec/system/mysql_server_spec.rb new file mode 100644 index 00000000000..b9ecabdce23 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mysql/spec/system/mysql_server_spec.rb @@ -0,0 +1,106 @@ +require 'spec_helper_system' + +describe 'mysql class' do + case node.facts['osfamily'] + when 'RedHat' + package_name = 'mysql-server' + service_name = 'mysqld' + mycnf = '/etc/my.cnf' + when 'Suse' + package_name = 'mysql-community-server' + service_name = 'mysql' + mycnf = '/etc/my.cnf' + when 'Debian' + package_name = 'mysql-server' + service_name = 'mysql' + mycnf = '/etc/mysql/my.cnf' + end + + describe 'running puppet code' do + # Using puppet_apply as a helper + it 'should work with no errors' do + pp = <<-EOS + class { 'mysql::server': } + EOS + + # Run it twice and test for idempotency + puppet_apply(pp) do |r| + r.exit_code.should_not == 1 + r.refresh + r.exit_code.should be_zero + end + end + + describe package(package_name) do + it { should be_installed } + end + + describe service(service_name) do + it { should be_running } + it { should be_enabled } + end + end + + describe 'mycnf' do + it 'should contain sensible values' do + pp = <<-EOS + class { 'mysql::server': } + EOS + puppet_apply(pp) do |r| + r.exit_code.should_not == 1 + end + end + + describe file(mycnf) do + it { should contain 'key_buffer = 16M' } + it { should contain 'max_binlog_size = 100M' } + it { should contain 'query_cache_size = 16M' } + end + end + + describe 'my.cnf changes' do + it 'sets values' do + pp = <<-EOS + class { 'mysql::server': + override_options => { 'mysqld' => + { 'key_buffer' => '32M', + 'max_binlog_size' => '200M', + 'query_cache_size' => '32M', + } + } + } + EOS + puppet_apply(pp) do |r| + r.exit_code.should_not == 1 + end + end + + describe file(mycnf) do + it { should contain 'key_buffer = 32M' } + it { should contain 'max_binlog_size = 200M' } + it { should contain 'query_cache_size = 32M' } + end + end + + describe 'my.cnf should contain multiple instances of the same option' do + it 'sets multiple values' do + pp = <<-EOS + class { 'mysql::server': + override_options => { 'mysqld' => + { 'replicate-do-db' => ['base1', 'base2', 'base3'], } + } + } + EOS + puppet_apply(pp) do |r| + r.exit_code.should_not == 1 + end + end + + describe file(mycnf) do + it { should contain 'replicate-do-db = base1' } + it { should contain 'replicate-do-db = base2' } + it { should contain 'replicate-do-db = base3' } + end + end + +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mysql/spec/system/types/mysql_grant_spec.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mysql/spec/system/types/mysql_grant_spec.rb new file mode 100644 index 00000000000..a3bdf8282fe --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mysql/spec/system/types/mysql_grant_spec.rb @@ -0,0 +1,314 @@ +require 'spec_helper_system' + +describe 'mysql_grant' do + + describe 'setup' do + it 'setup mysql::server' do + pp = <<-EOS + class { 'mysql::server': } + EOS + + puppet_apply(pp) + end + end + + describe 'missing privileges for user' do + it 'should fail' do + pp = <<-EOS + mysql_grant { 'test1@tester/test.*': + ensure => 'present', + table => 'test.*', + user => 'test1@tester', + } + EOS + + puppet_apply(pp) do |r| + r.stderr.should =~ /privileges parameter is required/ + end + end + + it 'should not find the user' do + shell("mysql -NBe \"SHOW GRANTS FOR test1@tester\"") do |r| + r.stderr.should =~ /There is no such grant defined for user 'test1' on host 'tester'/ + r.exit_code.should eq 1 + end + end + end + + describe 'missing table for user' do + it 'should fail' do + pp = <<-EOS + mysql_grant { 'atest@tester/test.*': + ensure => 'present', + user => 'atest@tester', + privileges => ['ALL'], + } + EOS + + puppet_apply(pp) do |r| + r.exit_code.should eq 1 + end + end + + it 'should not find the user' do + shell("mysql -NBe \"SHOW GRANTS FOR atest@tester\"") do |r| + r.stderr.should =~ /There is no such grant defined for user 'atest' on host 'tester'/ + r.exit_code.should eq 1 + end + end + end + + describe 'adding privileges' do + it 'should work without errors' do + pp = <<-EOS + mysql_grant { 'test2@tester/test.*': + ensure => 'present', + table => 'test.*', + user => 'test2@tester', + privileges => ['SELECT', 'UPDATE'], + } + EOS + + puppet_apply(pp) + end + + it 'should find the user' do + shell("mysql -NBe \"SHOW GRANTS FOR test2@tester\"") do |r| + r.stdout.should =~ /GRANT SELECT, UPDATE.*TO 'test2'@'tester'/ + r.stderr.should be_empty + r.exit_code.should be_zero + end + end + end + + describe 'adding option' do + it 'should work without errors' do + pp = <<-EOS + mysql_grant { 'test3@tester/test.*': + ensure => 'present', + table => 'test.*', + user => 'test3@tester', + options => ['GRANT'], + privileges => ['SELECT', 'UPDATE'], + } + EOS + + puppet_apply(pp) + end + + it 'should find the user' do + shell("mysql -NBe \"SHOW GRANTS FOR test3@tester\"") do |r| + r.stdout.should =~ /GRANT SELECT, UPDATE ON `test`.* TO 'test3'@'tester' WITH GRANT OPTION$/ + r.stderr.should be_empty + r.exit_code.should be_zero + end + end + end + + describe 'adding all privileges without table' do + it 'should fail' do + pp = <<-EOS + mysql_grant { 'test4@tester/test.*': + ensure => 'present', + user => 'test4@tester', + options => ['GRANT'], + privileges => ['SELECT', 'UPDATE', 'ALL'], + } + EOS + + puppet_apply(pp) do |r| + r.stderr.should =~ /table parameter is required./ + end + end + + end + + + describe 'adding all privileges' do + it 'should only try to apply ALL' do + pp = <<-EOS + mysql_grant { 'test4@tester/test.*': + ensure => 'present', + table => 'test.*', + user => 'test4@tester', + options => ['GRANT'], + privileges => ['SELECT', 'UPDATE', 'ALL'], + } + EOS + + puppet_apply(pp) + end + + it 'should find the user' do + shell("mysql -NBe \"SHOW GRANTS FOR test4@tester\"") do |r| + r.stdout.should =~ /GRANT ALL PRIVILEGES ON `test`.* TO 'test4'@'tester' WITH GRANT OPTION/ + r.stderr.should be_empty + r.exit_code.should be_zero + end + end + end + + # Test combinations of user@host to ensure all cases work. + describe 'short hostname' do + it 'should apply' do + pp = <<-EOS + mysql_grant { 'test@short/test.*': + ensure => 'present', + table => 'test.*', + user => 'test@short', + privileges => 'ALL', + } + mysql_grant { 'test@long.hostname.com/test.*': + ensure => 'present', + table => 'test.*', + user => 'test@long.hostname.com', + privileges => 'ALL', + } + mysql_grant { 'test@192.168.5.6/test.*': + ensure => 'present', + table => 'test.*', + user => 'test@192.168.5.6', + privileges => 'ALL', + } + mysql_grant { 'test@2607:f0d0:1002:0051:0000:0000:0000:0004/test.*': + ensure => 'present', + table => 'test.*', + user => 'test@2607:f0d0:1002:0051:0000:0000:0000:0004', + privileges => 'ALL', + } + mysql_grant { 'test@::1/128/test.*': + ensure => 'present', + table => 'test.*', + user => 'test@::1/128', + privileges => 'ALL', + } + EOS + + puppet_apply(pp) + end + + it 'finds short hostname' do + shell("mysql -NBe \"SHOW GRANTS FOR test@short\"") do |r| + r.stdout.should =~ /GRANT ALL PRIVILEGES ON `test`.* TO 'test'@'short'/ + r.stderr.should be_empty + r.exit_code.should be_zero + end + end + it 'finds long hostname' do + shell("mysql -NBe \"SHOW GRANTS FOR 'test'@'long.hostname.com'\"") do |r| + r.stdout.should =~ /GRANT ALL PRIVILEGES ON `test`.* TO 'test'@'long.hostname.com'/ + r.stderr.should be_empty + r.exit_code.should be_zero + end + end + it 'finds ipv4' do + shell("mysql -NBe \"SHOW GRANTS FOR 'test'@'192.168.5.6'\"") do |r| + r.stdout.should =~ /GRANT ALL PRIVILEGES ON `test`.* TO 'test'@'192.168.5.6'/ + r.stderr.should be_empty + r.exit_code.should be_zero + end + end + it 'finds ipv6' do + shell("mysql -NBe \"SHOW GRANTS FOR 'test'@'2607:f0d0:1002:0051:0000:0000:0000:0004'\"") do |r| + r.stdout.should =~ /GRANT ALL PRIVILEGES ON `test`.* TO 'test'@'2607:f0d0:1002:0051:0000:0000:0000:0004'/ + r.stderr.should be_empty + r.exit_code.should be_zero + end + end + it 'finds short ipv6' do + shell("mysql -NBe \"SHOW GRANTS FOR 'test'@'::1/128'\"") do |r| + r.stdout.should =~ /GRANT ALL PRIVILEGES ON `test`.* TO 'test'@'::1\/128'/ + r.stderr.should be_empty + r.exit_code.should be_zero + end + end + end + + describe 'complex test' do + it 'setup mysql::server' do + pp = <<-EOS + $dbSubnet = '10.10.10.%' + + mysql_database { 'foo': + ensure => present, + } + + exec { 'mysql-create-table': + command => '/usr/bin/mysql -NBe "CREATE TABLE foo.bar (name VARCHAR(20))"', + environment => "HOME=${::root_home}", + unless => '/usr/bin/mysql -NBe "SELECT 1 FROM foo.bar LIMIT 1;"', + require => Mysql_database['foo'], + } + + Mysql_grant { + ensure => present, + options => ['GRANT'], + privileges => ['ALL'], + table => '*.*', + require => [ Mysql_database['foo'], Exec['mysql-create-table'] ], + } + + mysql_grant { "user1@${dbSubnet}/*.*": + user => "user1@${dbSubnet}", + } + mysql_grant { "user2@${dbSubnet}/foo.bar": + privileges => ['SELECT', 'INSERT', 'UPDATE'], + user => "user2@${dbSubnet}", + table => 'foo.bar', + } + mysql_grant { "user3@${dbSubnet}/foo.*": + privileges => ['SELECT', 'INSERT', 'UPDATE'], + user => "user3@${dbSubnet}", + table => 'foo.*', + } + mysql_grant { 'web@%/*.*': + user => 'web@%', + } + mysql_grant { "web@${dbSubnet}/*.*": + user => "web@${dbSubnet}", + } + mysql_grant { "web@${fqdn}/*.*": + user => "web@${fqdn}", + } + mysql_grant { 'web@localhost/*.*': + user => 'web@localhost', + } + EOS + + puppet_apply(pp) do |r| + r.exit_code.should_not == 1 + r.refresh + r.exit_code.should be_zero + end + end + end + + describe 'lower case privileges' do + it 'create ALL privs' do + pp = <<-EOS + mysql_grant { 'lowercase@localhost/*.*': + user => 'lowercase@localhost', + privileges => 'ALL', + table => '*.*', + } + EOS + + puppet_apply(pp) + end + + it 'create lowercase all privs' do + pp = <<-EOS + mysql_grant { 'lowercase@localhost/*.*': + user => 'lowercase@localhost', + privileges => 'all', + table => '*.*', + } + EOS + + puppet_apply(pp) do |r| + r.exit_code.should be_zero + end + end + end + +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mysql/spec/system/types/mysql_user_spec.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mysql/spec/system/types/mysql_user_spec.rb new file mode 100644 index 00000000000..7aaa9797e40 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mysql/spec/system/types/mysql_user_spec.rb @@ -0,0 +1,35 @@ +require 'spec_helper_system' + +describe 'mysql_user' do + + describe 'setup' do + it 'should work with no errors' do + pp = <<-EOS + class { 'mysql::server': } + EOS + + puppet_apply(pp) + end + end + + describe 'adding user' do + it 'should work without errors' do + pp = <<-EOS + mysql_user { 'ashp@localhost': + password_hash => '6f8c114b58f2ce9e', + } + EOS + + puppet_apply(pp) + end + + it 'should find the user' do + shell("mysql -NBe \"select '1' from mysql.user where CONCAT(user, '@', host) = 'ashp@localhost'\"") do |r| + r.stdout.should =~ /^1$/ + r.stderr.should be_empty + r.exit_code.should be_zero + end + end + end + +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mysql/spec/unit/mysql_password_spec.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mysql/spec/unit/mysql_password_spec.rb new file mode 100644 index 00000000000..07369100496 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mysql/spec/unit/mysql_password_spec.rb @@ -0,0 +1,27 @@ +require 'spec_helper' + +describe 'the mysql_password function' do + before :all do + Puppet::Parser::Functions.autoloader.loadall + end + + let(:scope) { PuppetlabsSpec::PuppetInternals.scope } + + it 'should exist' do + Puppet::Parser::Functions.function('mysql_password').should == 'function_mysql_password' + end + + it 'should raise a ParseError if there is less than 1 arguments' do + lambda { scope.function_mysql_password([]) }.should( raise_error(Puppet::ParseError)) + end + + it 'should raise a ParseError if there is more than 1 arguments' do + lambda { scope.function_mysql_password(%w(foo bar)) }.should( raise_error(Puppet::ParseError)) + end + + it 'should convert password into a hash' do + result = scope.function_mysql_password(%w(password)) + result.should(eq('*2470C0C06DEE42FD1618BB99005ADCA2EC9D1E19')) + end + +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mysql/spec/unit/puppet/functions/mysql_deepmerge_spec.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mysql/spec/unit/puppet/functions/mysql_deepmerge_spec.rb new file mode 100644 index 00000000000..fa9c72b787f --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mysql/spec/unit/puppet/functions/mysql_deepmerge_spec.rb @@ -0,0 +1,91 @@ +#! /usr/bin/env ruby -S rspec + +require 'spec_helper' + +describe Puppet::Parser::Functions.function(:mysql_deepmerge) do + let(:scope) { PuppetlabsSpec::PuppetInternals.scope } + + describe 'when calling mysql_deepmerge from puppet' do + it "should not compile when no arguments are passed" do + pending("Fails on 2.6.x, see bug #15912") if Puppet.version =~ /^2\.6\./ + Puppet[:code] = '$x = mysql_deepmerge()' + expect { + scope.compiler.compile + }.to raise_error(Puppet::ParseError, /wrong number of arguments/) + end + + it "should not compile when 1 argument is passed" do + pending("Fails on 2.6.x, see bug #15912") if Puppet.version =~ /^2\.6\./ + Puppet[:code] = "$my_hash={'one' => 1}\n$x = mysql_deepmerge($my_hash)" + expect { + scope.compiler.compile + }.to raise_error(Puppet::ParseError, /wrong number of arguments/) + end + end + + describe 'when calling mysql_deepmerge on the scope instance' do + it 'should require all parameters are hashes' do + expect { new_hash = scope.function_mysql_deepmerge([{}, '2'])}.to raise_error(Puppet::ParseError, /unexpected argument type String/) + expect { new_hash = scope.function_mysql_deepmerge([{}, 2])}.to raise_error(Puppet::ParseError, /unexpected argument type Fixnum/) + end + + it 'should accept empty strings as puppet undef' do + expect { new_hash = scope.function_mysql_deepmerge([{}, ''])}.not_to raise_error + end + + it 'should be able to mysql_deepmerge two hashes' do + new_hash = scope.function_mysql_deepmerge([{'one' => '1', 'two' => '1'}, {'two' => '2', 'three' => '2'}]) + new_hash['one'].should == '1' + new_hash['two'].should == '2' + new_hash['three'].should == '2' + end + + it 'should mysql_deepmerge multiple hashes' do + hash = scope.function_mysql_deepmerge([{'one' => 1}, {'one' => '2'}, {'one' => '3'}]) + hash['one'].should == '3' + end + + it 'should accept empty hashes' do + scope.function_mysql_deepmerge([{},{},{}]).should == {} + end + + it 'should mysql_deepmerge subhashes' do + hash = scope.function_mysql_deepmerge([{'one' => 1}, {'two' => 2, 'three' => { 'four' => 4 } }]) + hash['one'].should == 1 + hash['two'].should == 2 + hash['three'].should == { 'four' => 4 } + end + + it 'should append to subhashes' do + hash = scope.function_mysql_deepmerge([{'one' => { 'two' => 2 } }, { 'one' => { 'three' => 3 } }]) + hash['one'].should == { 'two' => 2, 'three' => 3 } + end + + it 'should append to subhashes 2' do + hash = scope.function_mysql_deepmerge([{'one' => 1, 'two' => 2, 'three' => { 'four' => 4 } }, {'two' => 'dos', 'three' => { 'five' => 5 } }]) + hash['one'].should == 1 + hash['two'].should == 'dos' + hash['three'].should == { 'four' => 4, 'five' => 5 } + end + + it 'should append to subhashes 3' do + hash = scope.function_mysql_deepmerge([{ 'key1' => { 'a' => 1, 'b' => 2 }, 'key2' => { 'c' => 3 } }, { 'key1' => { 'b' => 99 } }]) + hash['key1'].should == { 'a' => 1, 'b' => 99 } + hash['key2'].should == { 'c' => 3 } + end + + it 'should equate keys mod dash and underscore' do + hash = scope.function_mysql_deepmerge([{ 'a-b-c' => 1 } , { 'a_b_c' => 10 }]) + hash['a_b_c'].should == 10 + hash.should_not have_key('a-b-c') + end + + it 'should keep style of the last when keys are euqal mod dash and underscore' do + hash = scope.function_mysql_deepmerge([{ 'a-b-c' => 1, 'b_c_d' => { 'c-d-e' => 2, 'e-f-g' => 3 }} , { 'a_b_c' => 10, 'b-c-d' => { 'c_d_e' => 12 } }]) + hash['a_b_c'].should == 10 + hash.should_not have_key('a-b-c') + hash['b-c-d'].should == { 'e-f-g' => 3, 'c_d_e' => 12 } + hash.should_not have_key('b_c_d') + end + end +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mysql/spec/unit/puppet/provider/database/mysql_spec.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mysql/spec/unit/puppet/provider/database/mysql_spec.rb new file mode 100644 index 00000000000..e2557fc35d5 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mysql/spec/unit/puppet/provider/database/mysql_spec.rb @@ -0,0 +1,86 @@ +require 'spec_helper' + +provider_class = Puppet::Type.type(:database).provider(:mysql) + +describe provider_class do + subject { provider_class } + + let(:root_home) { '/root' } + let(:defaults_file) { '--defaults-extra-file=/root/.my.cnf' } + + let(:raw_databases) do + <<-SQL_OUTPUT +information_schema +mydb +mysql +performance_schema +test + SQL_OUTPUT + end + + let(:parsed_databases) { %w(information_schema mydb mysql performance_schema test) } + + before :each do + @resource = Puppet::Type::Database.new( + { :charset => 'utf8', :name => 'new_database' } + ) + @provider = provider_class.new(@resource) + Facter.stubs(:value).with(:root_home).returns(root_home) + Puppet::Util.stubs(:which).with('mysql').returns('/usr/bin/mysql') + subject.stubs(:which).with('mysql').returns('/usr/bin/mysql') + subject.stubs(:defaults_file).returns('--defaults-extra-file=/root/.my.cnf') + end + + describe 'self.instances' do + it 'returns an array of databases' do + subject.stubs(:mysql).with([defaults_file, '-NBe', 'show databases']).returns(raw_databases) + + databases = subject.instances.collect {|x| x.name } + parsed_databases.should match_array(databases) + end + end + + describe 'create' do + it 'makes a user' do + subject.expects(:mysql).with([defaults_file, '-NBe', "create database `#{@resource[:name]}` character set #{@resource[:charset]}"]) + @provider.create + end + end + + describe 'destroy' do + it 'removes a user if present' do + subject.expects(:mysqladmin).with([defaults_file, '-f', 'drop', "#{@resource[:name]}"]) + @provider.destroy + end + end + + describe 'charset' do + it 'returns a charset' do + subject.expects(:mysql).with([defaults_file, '-NBe', "show create database `#{@resource[:name]}`"]).returns('mydbCREATE DATABASE `mydb` /*!40100 DEFAULT CHARACTER SET utf8 */') + @provider.charset.should == 'utf8' + end + end + + describe 'charset=' do + it 'changes the charset' do + subject.expects(:mysql).with([defaults_file, '-NBe', "alter database `#{@resource[:name]}` CHARACTER SET blah"]).returns('0') + + @provider.charset=('blah') + end + end + + describe 'exists?' do + it 'checks if user exists' do + subject.expects(:mysql).with([defaults_file, '-NBe', 'show databases']).returns('information_schema\nmydb\nmysql\nperformance_schema\ntest') + @provider.exists? + end + end + + describe 'self.defaults_file' do + it 'sets --defaults-extra-file' do + File.stubs(:file?).with('#{root_home}/.my.cnf').returns(true) + @provider.defaults_file.should == '--defaults-extra-file=/root/.my.cnf' + end + end + +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mysql/spec/unit/puppet/provider/database_grant/mysql_spec.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mysql/spec/unit/puppet/provider/database_grant/mysql_spec.rb new file mode 100644 index 00000000000..4d9484d04f5 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mysql/spec/unit/puppet/provider/database_grant/mysql_spec.rb @@ -0,0 +1,95 @@ +require 'puppet' +require 'mocha/api' +require 'spec_helper' +RSpec.configure do |config| + config.mock_with :mocha +end +provider_class = Puppet::Type.type(:database_grant).provider(:mysql) +describe provider_class do + let(:root_home) { '/root' } + + before :each do + @resource = Puppet::Type::Database_grant.new( + { :privileges => 'all', :provider => 'mysql', :name => 'user@host'} + ) + @provider = provider_class.new(@resource) + Facter.stubs(:value).with(:root_home).returns(root_home) + File.stubs(:file?).with("#{root_home}/.my.cnf").returns(true) + end + + it 'should query privileges from the database' do + provider_class.expects(:mysql) .with(["--defaults-extra-file=#{root_home}/.my.cnf", 'mysql', '-Be', 'describe user']).returns <<-EOT +Field Type Null Key Default Extra +Host char(60) NO PRI +User char(16) NO PRI +Password char(41) NO +Select_priv enum('N','Y') NO N +Insert_priv enum('N','Y') NO N +Update_priv enum('N','Y') NO N +EOT + provider_class.expects(:mysql).with(["--defaults-extra-file=#{root_home}/.my.cnf", 'mysql', '-Be', 'describe db']).returns <<-EOT +Field Type Null Key Default Extra +Host char(60) NO PRI +Db char(64) NO PRI +User char(16) NO PRI +Select_priv enum('N','Y') NO N +Insert_priv enum('N','Y') NO N +Update_priv enum('N','Y') NO N +EOT + provider_class.user_privs.should == %w(Select_priv Insert_priv Update_priv) + provider_class.db_privs.should == %w(Select_priv Insert_priv Update_priv) + end + + it 'should query set privileges' do + provider_class.expects(:mysql).with(["--defaults-extra-file=#{root_home}/.my.cnf", 'mysql', '-Be', "select * from mysql.user where user='user' and host='host'"]).returns <<-EOT +Host User Password Select_priv Insert_priv Update_priv +host user Y N Y +EOT + @provider.privileges.should == %w(Select_priv Update_priv) + end + + it 'should recognize when all privileges are set' do + provider_class.expects(:mysql).with(["--defaults-extra-file=#{root_home}/.my.cnf", 'mysql', '-Be', "select * from mysql.user where user='user' and host='host'"]).returns <<-EOT +Host User Password Select_priv Insert_priv Update_priv +host user Y Y Y +EOT + @provider.all_privs_set?.should == true + end + + it 'should recognize when all privileges are not set' do + provider_class.expects(:mysql).with(["--defaults-extra-file=#{root_home}/.my.cnf", 'mysql', '-Be', "select * from mysql.user where user='user' and host='host'"]).returns <<-EOT +Host User Password Select_priv Insert_priv Update_priv +host user Y N Y +EOT + @provider.all_privs_set?.should == false + end + + it 'should be able to set all privileges' do + provider_class.expects(:mysql).with(["--defaults-extra-file=#{root_home}/.my.cnf", 'mysql', '-NBe', "SELECT '1' FROM user WHERE user='user' AND host='host'"]).returns "1\n" + provider_class.expects(:mysql).with(["--defaults-extra-file=#{root_home}/.my.cnf", 'mysql', '-Be', "update user set Select_priv = 'Y', Insert_priv = 'Y', Update_priv = 'Y' where user='user' and host='host'"]) + provider_class.expects(:mysqladmin).with(%W(--defaults-extra-file=#{root_home}/.my.cnf flush-privileges)) + @provider.privileges=(%w(all)) + end + + it 'should be able to set partial privileges' do + provider_class.expects(:mysql).with(["--defaults-extra-file=#{root_home}/.my.cnf", 'mysql', '-NBe', "SELECT '1' FROM user WHERE user='user' AND host='host'"]).returns "1\n" + provider_class.expects(:mysql).with(["--defaults-extra-file=#{root_home}/.my.cnf", 'mysql', '-Be', "update user set Select_priv = 'Y', Insert_priv = 'N', Update_priv = 'Y' where user='user' and host='host'"]) + provider_class.expects(:mysqladmin).with(%W(--defaults-extra-file=#{root_home}/.my.cnf flush-privileges)) + @provider.privileges=(%w(Select_priv Update_priv)) + end + + it 'should be case insensitive' do + provider_class.expects(:mysql).with(["--defaults-extra-file=#{root_home}/.my.cnf", 'mysql', '-NBe', "SELECT '1' FROM user WHERE user='user' AND host='host'"]).returns "1\n" + provider_class.expects(:mysql).with(["--defaults-extra-file=#{root_home}/.my.cnf", 'mysql', '-Be', "update user set Select_priv = 'Y', Insert_priv = 'Y', Update_priv = 'Y' where user='user' and host='host'"]) + provider_class.expects(:mysqladmin).with(["--defaults-extra-file=#{root_home}/.my.cnf", 'flush-privileges']) + @provider.privileges=(%w(SELECT_PRIV insert_priv UpDaTe_pRiV)) + end + + it 'should not pass --defaults-extra-file if $root_home/.my.cnf is absent' do + File.stubs(:file?).with("#{root_home}/.my.cnf").returns(false) + provider_class.expects(:mysql).with(['mysql', '-NBe', "SELECT '1' FROM user WHERE user='user' AND host='host'"]).returns "1\n" + provider_class.expects(:mysql).with(['mysql', '-Be', "update user set Select_priv = 'Y', Insert_priv = 'N', Update_priv = 'Y' where user='user' and host='host'"]) + provider_class.expects(:mysqladmin).with(%w(flush-privileges)) + @provider.privileges=(%w(Select_priv Update_priv)) + end +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mysql/spec/unit/puppet/provider/database_user/mysql_spec.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mysql/spec/unit/puppet/provider/database_user/mysql_spec.rb new file mode 100644 index 00000000000..0939fdd224d --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mysql/spec/unit/puppet/provider/database_user/mysql_spec.rb @@ -0,0 +1,119 @@ +require 'spec_helper' + +provider_class = Puppet::Type.type(:database_user).provider(:mysql) + +describe provider_class do + subject { provider_class } + + let(:root_home) { '/root' } + let(:defaults_file) { '--defaults-extra-file=/root/.my.cnf' } + let(:newhash) { '*6C8989366EAF75BB670AD8EA7A7FC1176A95CEF5' } + + let(:raw_users) do + <<-SQL_OUTPUT +root@127.0.0.1 +root@::1 +@localhost +debian-sys-maint@localhost +root@localhost +usvn_user@localhost +@vagrant-ubuntu-raring-64 + SQL_OUTPUT + end + + let(:parsed_users) { %w(root@127.0.0.1 root@::1 debian-sys-maint@localhost root@localhost usvn_user@localhost) } + + before :each do + # password hash = mypass + @resource = Puppet::Type::Database_user.new( + { :password_hash => '*6C8989366EAF75BB670AD8EA7A7FC1176A95CEF4', + :name => 'joe@localhost', + :max_user_connections => '10' + } + ) + @provider = provider_class.new(@resource) + Facter.stubs(:value).with(:root_home).returns(root_home) + Puppet::Util.stubs(:which).with('mysql').returns('/usr/bin/mysql') + subject.stubs(:which).with('mysql').returns('/usr/bin/mysql') + subject.stubs(:defaults_file).returns('--defaults-extra-file=/root/.my.cnf') + end + + describe 'self.instances' do + it 'returns an array of users' do + subject.stubs(:mysql).with([defaults_file, 'mysql', "-BNeselect concat(User, '@',Host) as User from mysql.user"]).returns(raw_users) + + usernames = subject.instances.collect {|x| x.name } + parsed_users.should match_array(usernames) + end + end + + describe 'create' do + it 'makes a user' do + subject.expects(:mysql).with([defaults_file, 'mysql', '-e', "grant usage on *.* to 'joe'@'localhost' identified by PASSWORD + '*6C8989366EAF75BB670AD8EA7A7FC1176A95CEF4' with max_user_connections 10"]) + @provider.expects(:exists?).returns(true) + @provider.create.should be_true + end + end + + describe 'destroy' do + it 'removes a user if present' do + subject.expects(:mysql).with([defaults_file, 'mysql', '-e', "drop user 'joe'@'localhost'"]) + @provider.expects(:exists?).returns(false) + @provider.destroy.should be_true + end + end + + describe 'password_hash' do + it 'returns a hash' do + subject.expects(:mysql).with([defaults_file, 'mysql', '-NBe', "select password from mysql.user where CONCAT(user, '@', host) = 'joe@localhost'"]).returns('*6C8989366EAF75BB670AD8EA7A7FC1176A95CEF4') + @provider.password_hash.should == '*6C8989366EAF75BB670AD8EA7A7FC1176A95CEF4' + end + end + + describe 'password_hash=' do + it 'changes the hash' do + subject.expects(:mysql).with([defaults_file, 'mysql', '-e', "SET PASSWORD FOR 'joe'@'localhost' = '*6C8989366EAF75BB670AD8EA7A7FC1176A95CEF5'"]).returns('0') + + @provider.expects(:password_hash).returns('*6C8989366EAF75BB670AD8EA7A7FC1176A95CEF5') + @provider.password_hash=('*6C8989366EAF75BB670AD8EA7A7FC1176A95CEF5') + end + end + + describe 'max_user_connections' do + it 'returns max user connections' do + subject.expects(:mysql).with([defaults_file, 'mysql', '-NBe', "select max_user_connections from mysql.user where CONCAT(user, '@', host) = 'joe@localhost'"]).returns('10') + @provider.max_user_connections.should == '10' + end + end + + describe 'max_user_connections=' do + it 'changes max user connections' do + subject.expects(:mysql).with([defaults_file, 'mysql', '-e', "grant usage on *.* to 'joe'@'localhost' with max_user_connections 42"]).returns('0') + @provider.expects(:max_user_connections).returns('42') + @provider.max_user_connections=('42') + end + end + + describe 'exists?' do + it 'checks if user exists' do + subject.expects(:mysql).with([defaults_file, 'mysql', '-NBe', "select '1' from mysql.user where CONCAT(user, '@', host) = 'joe@localhost'"]).returns('1') + @provider.exists?.should be_true + end + end + + describe 'flush' do + it 'removes cached privileges' do + subject.expects(:mysqladmin).with([defaults_file, 'flush-privileges']) + @provider.flush + end + end + + describe 'self.defaults_file' do + it 'sets --defaults-extra-file' do + File.stubs(:file?).with('#{root_home}/.my.cnf').returns(true) + @provider.defaults_file.should == '--defaults-extra-file=/root/.my.cnf' + end + end + +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mysql/spec/unit/puppet/provider/mysql_database/mysql_spec.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mysql/spec/unit/puppet/provider/mysql_database/mysql_spec.rb new file mode 100644 index 00000000000..10f061f5d8f --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mysql/spec/unit/puppet/provider/mysql_database/mysql_spec.rb @@ -0,0 +1,118 @@ +require 'spec_helper' + +describe Puppet::Type.type(:mysql_database).provider(:mysql) do + + let(:defaults_file) { '--defaults-extra-file=/root/.my.cnf' } + + let(:raw_databases) do + <<-SQL_OUTPUT +information_schema +mydb +mysql +performance_schema +test + SQL_OUTPUT + end + + let(:parsed_databases) { %w(information_schema mydb mysql performance_schema test) } + + let(:resource) { Puppet::Type.type(:mysql_database).new( + { :ensure => :present, + :charset => 'latin1', + :collate => 'latin1_swedish_ci', + :name => 'new_database', + :provider => described_class.name + } + )} + let(:provider) { resource.provider } + + before :each do + Facter.stubs(:value).with(:root_home).returns('/root') + Puppet::Util.stubs(:which).with('mysql').returns('/usr/bin/mysql') + File.stubs(:file?).with('/root/.my.cnf').returns(true) + provider.class.stubs(:mysql).with([defaults_file, '-NBe', 'show databases']).returns('new_database') + provider.class.stubs(:mysql).with([defaults_file, '-NBe', "show variables like '%_database'", 'new_database']).returns("character_set_database latin1\ncollation_database latin1_swedish_ci\nskip_show_database OFF") + end + + let(:instance) { provider.class.instances.first } + + describe 'self.instances' do + it 'returns an array of databases' do + provider.class.stubs(:mysql).with([defaults_file, '-NBe', 'show databases']).returns(raw_databases) + raw_databases.each_line do |db| + provider.class.stubs(:mysql).with([defaults_file, '-NBe', "show variables like '%_database'", db.chomp]).returns("character_set_database latin1\ncollation_database latin1_swedish_ci\nskip_show_database OFF") + end + databases = provider.class.instances.collect {|x| x.name } + parsed_databases.should match_array(databases) + end + end + + describe 'self.prefetch' do + it 'exists' do + provider.class.instances + provider.class.prefetch({}) + end + end + + describe 'create' do + it 'makes a database' do + provider.expects(:mysql).with([defaults_file, '-NBe', "create database if not exists `#{resource[:name]}` character set #{resource[:charset]} collate #{resource[:collate]}"]) + provider.expects(:exists?).returns(true) + provider.create.should be_true + end + end + + describe 'destroy' do + it 'removes a database if present' do + provider.expects(:mysql).with([defaults_file, '-NBe', "drop database `#{resource[:name]}`"]) + provider.expects(:exists?).returns(false) + provider.destroy.should be_true + end + end + + describe 'exists?' do + it 'checks if database exists' do + instance.exists?.should be_true + end + end + + describe 'self.defaults_file' do + it 'sets --defaults-extra-file' do + File.stubs(:file?).with('/root/.my.cnf').returns(true) + provider.defaults_file.should eq '--defaults-extra-file=/root/.my.cnf' + end + it 'fails if file missing' do + File.stubs(:file?).with('/root/.my.cnf').returns(false) + provider.defaults_file.should be_nil + end + end + + describe 'charset' do + it 'returns a charset' do + instance.charset.should == 'latin1' + end + end + + describe 'charset=' do + it 'changes the charset' do + provider.expects(:mysql).with([defaults_file, '-NBe', "alter database `#{resource[:name]}` CHARACTER SET blah"]).returns('0') + + provider.charset=('blah') + end + end + + describe 'collate' do + it 'returns a collate' do + instance.collate.should == 'latin1_swedish_ci' + end + end + + describe 'collate=' do + it 'changes the collate' do + provider.expects(:mysql).with([defaults_file, '-NBe', "alter database `#{resource[:name]}` COLLATE blah"]).returns('0') + + provider.collate=('blah') + end + end + +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mysql/spec/unit/puppet/provider/mysql_user/mysql_spec.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mysql/spec/unit/puppet/provider/mysql_user/mysql_spec.rb new file mode 100644 index 00000000000..34639c920fb --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mysql/spec/unit/puppet/provider/mysql_user/mysql_spec.rb @@ -0,0 +1,130 @@ +require 'spec_helper' + +describe Puppet::Type.type(:mysql_user).provider(:mysql) do + let(:defaults_file) { '--defaults-extra-file=/root/.my.cnf' } + let(:newhash) { '*6C8989366EAF75BB670AD8EA7A7FC1176A95CEF5' } + + let(:raw_users) do + <<-SQL_OUTPUT +root@127.0.0.1 +root@::1 +@localhost +debian-sys-maint@localhost +root@localhost +usvn_user@localhost +@vagrant-ubuntu-raring-64 + SQL_OUTPUT + end + + let(:parsed_users) { %w(root@127.0.0.1 root@::1 @localhost debian-sys-maint@localhost root@localhost usvn_user@localhost @vagrant-ubuntu-raring-64) } + + let(:resource) { Puppet::Type.type(:mysql_user).new( + { :ensure => :present, + :password_hash => '*6C8989366EAF75BB670AD8EA7A7FC1176A95CEF4', + :name => 'joe@localhost', + :max_user_connections => '10', + :max_connections_per_hour => '10', + :max_queries_per_hour => '10', + :max_updates_per_hour => '10', + :provider => described_class.name + } + )} + let(:provider) { resource.provider } + + before :each do + # Set up the stubs for an instances call. + Facter.stubs(:value).with(:root_home).returns('/root') + Puppet::Util.stubs(:which).with('mysql').returns('/usr/bin/mysql') + File.stubs(:file?).with('/root/.my.cnf').returns(true) + provider.class.stubs(:mysql).with([defaults_file, '-NBe', "SELECT CONCAT(User, '@',Host) AS User FROM mysql.user"]).returns('joe@localhost') + provider.class.stubs(:mysql).with([defaults_file, '-NBe', "SELECT MAX_USER_CONNECTIONS, MAX_CONNECTIONS, MAX_QUESTIONS, MAX_UPDATES, PASSWORD FROM mysql.user WHERE CONCAT(user, '@', host) = 'joe@localhost'"]).returns('10 10 10 10 *6C8989366EAF75BB670AD8EA7A7FC1176A95CEF4') + end + + let(:instance) { provider.class.instances.first } + + describe 'self.instances' do + it 'returns an array of users' do + provider.class.stubs(:mysql).with([defaults_file, '-NBe', "SELECT CONCAT(User, '@',Host) AS User FROM mysql.user"]).returns(raw_users) + parsed_users.each do |user| + provider.class.stubs(:mysql).with([defaults_file, '-NBe', "SELECT MAX_USER_CONNECTIONS, MAX_CONNECTIONS, MAX_QUESTIONS, MAX_UPDATES, PASSWORD FROM mysql.user WHERE CONCAT(user, '@', host) = '#{user}'"]).returns('10 10 10 10 ') + end + + usernames = provider.class.instances.collect {|x| x.name } + parsed_users.should match_array(usernames) + end + end + + describe 'self.prefetch' do + it 'exists' do + provider.class.instances + provider.class.prefetch({}) + end + end + + describe 'create' do + it 'makes a user' do + provider.expects(:mysql).with([defaults_file, '-e', "GRANT USAGE ON *.* TO 'joe'@'localhost' IDENTIFIED BY PASSWORD '*6C8989366EAF75BB670AD8EA7A7FC1176A95CEF4' WITH MAX_USER_CONNECTIONS 10 MAX_CONNECTIONS_PER_HOUR 10 MAX_QUERIES_PER_HOUR 10 MAX_UPDATES_PER_HOUR 10"]) + provider.expects(:exists?).returns(true) + provider.create.should be_true + end + end + + describe 'destroy' do + it 'removes a user if present' do + provider.expects(:mysql).with([defaults_file, '-e', "DROP USER 'joe'@'localhost'"]) + provider.expects(:exists?).returns(false) + provider.destroy.should be_true + end + end + + describe 'exists?' do + it 'checks if user exists' do + instance.exists?.should be_true + end + end + + describe 'self.defaults_file' do + it 'sets --defaults-extra-file' do + File.stubs(:file?).with('/root/.my.cnf').returns(true) + provider.defaults_file.should eq '--defaults-extra-file=/root/.my.cnf' + end + it 'fails if file missing' do + File.expects(:file?).with('/root/.my.cnf').returns(false) + provider.defaults_file.should be_nil + end + end + + describe 'password_hash' do + it 'returns a hash' do + instance.password_hash.should == '*6C8989366EAF75BB670AD8EA7A7FC1176A95CEF4' + end + end + + describe 'password_hash=' do + it 'changes the hash' do + provider.expects(:mysql).with([defaults_file, '-e', "SET PASSWORD FOR 'joe'@'localhost' = '*6C8989366EAF75BB670AD8EA7A7FC1176A95CEF5'"]).returns('0') + + provider.expects(:password_hash).returns('*6C8989366EAF75BB670AD8EA7A7FC1176A95CEF5') + provider.password_hash=('*6C8989366EAF75BB670AD8EA7A7FC1176A95CEF5') + end + end + + ['max_user_connections', 'max_connections_per_hour', 'max_queries_per_hour', + 'max_updates_per_hour'].each do |property| + + describe property do + it "returns #{property}" do + instance.send("#{property}".to_sym).should == '10' + end + end + + describe "#{property}=" do + it "changes #{property}" do + provider.expects(:mysql).with([defaults_file, '-e', "GRANT USAGE ON *.* TO 'joe'@'localhost' WITH #{property.upcase} 42"]).returns('0') + provider.expects(property.to_sym).returns('42') + provider.send("#{property}=".to_sym, '42') + end + end + end + +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mysql/spec/unit/puppet/type/mysql_database_spec.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mysql/spec/unit/puppet/type/mysql_database_spec.rb new file mode 100644 index 00000000000..e2ebd90d4e7 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mysql/spec/unit/puppet/type/mysql_database_spec.rb @@ -0,0 +1,29 @@ +require 'puppet' +require 'puppet/type/mysql_database' +describe Puppet::Type.type(:mysql_database) do + + before :each do + @user = Puppet::Type.type(:mysql_database).new(:name => 'test', :charset => 'utf8', :collate => 'utf8_blah_ci') + end + + it 'should accept a database name' do + @user[:name].should == 'test' + end + + it 'should accept a charset' do + @user[:charset] = 'latin1' + @user[:charset].should == 'latin1' + end + + it 'should accept a collate' do + @user[:collate] = 'latin1_swedish_ci' + @user[:collate].should == 'latin1_swedish_ci' + end + + it 'should require a name' do + expect { + Puppet::Type.type(:mysql_database).new({}) + }.to raise_error(Puppet::Error, 'Title or name must be provided') + end + +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mysql/spec/unit/puppet/type/mysql_grant_spec.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mysql/spec/unit/puppet/type/mysql_grant_spec.rb new file mode 100644 index 00000000000..d56ba241a49 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mysql/spec/unit/puppet/type/mysql_grant_spec.rb @@ -0,0 +1,44 @@ +require 'puppet' +require 'puppet/type/mysql_grant' +describe Puppet::Type.type(:mysql_grant) do + + before :each do + @user = Puppet::Type.type(:mysql_grant).new(:name => 'foo@localhost/*.*', :privileges => ['ALL', 'PROXY'], :table => ['*.*','@'], :user => 'foo@localhost') + end + + it 'should accept a grant name' do + @user[:name].should == 'foo@localhost/*.*' + end + + it 'should accept ALL privileges' do + @user[:privileges] = 'ALL' + @user[:privileges].should == ['ALL'] + end + + it 'should accept PROXY privilege' do + @user[:privileges] = 'PROXY' + @user[:privileges].should == ['PROXY'] + end + + it 'should accept a table' do + @user[:table] = '*.*' + @user[:table].should == '*.*' + end + + it 'should accept @ for table' do + @user[:table] = '@' + @user[:table].should == '@' + end + + it 'should accept a user' do + @user[:user] = 'foo@localhost' + @user[:user].should == 'foo@localhost' + end + + it 'should require a name' do + expect { + Puppet::Type.type(:mysql_grant).new({}) + }.to raise_error(Puppet::Error, 'Title or name must be provided') + end + +end \ No newline at end of file diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mysql/spec/unit/puppet/type/mysql_user_spec.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mysql/spec/unit/puppet/type/mysql_user_spec.rb new file mode 100644 index 00000000000..62aad7aef3c --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mysql/spec/unit/puppet/type/mysql_user_spec.rb @@ -0,0 +1,30 @@ +require 'puppet' +require 'puppet/type/mysql_user' +describe Puppet::Type.type(:mysql_user) do + + before :each do + @user = Puppet::Type.type(:mysql_user).new(:name => 'foo@localhost', :password_hash => 'pass') + end + + it 'should accept a user name' do + @user[:name].should == 'foo@localhost' + end + + it 'should fail with a long user name' do + expect { + Puppet::Type.type(:mysql_user).new({:name => '12345678901234567@localhost', :password_hash => 'pass'}) + }.to raise_error /MySQL usernames are limited to a maximum of 16 characters/ + end + + it 'should accept a password' do + @user[:password_hash] = 'foo' + @user[:password_hash].should == 'foo' + end + + it 'should require a name' do + expect { + Puppet::Type.type(:mysql_user).new({}) + }.to raise_error(Puppet::Error, 'Title or name must be provided') + end + +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mysql/templates/my.cnf.erb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mysql/templates/my.cnf.erb new file mode 100644 index 00000000000..5aa959ba0bf --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mysql/templates/my.cnf.erb @@ -0,0 +1,18 @@ +<% @options.sort.map do |k,v| -%> +<% if v.is_a?(Hash) -%> +[<%= k %>] +<% v.sort.map do |ki, vi| -%> +<% if vi == true or v == '' -%> +<%= ki %> +<% elsif vi.is_a?(Array) -%> +<% vi.each do |vii| -%> +<%= ki %> = <%= vii %> +<% end -%> +<% elsif vi != :undef -%> +<%= ki %> = <%= vi %> +<% end -%> +<% end -%> +<% end %> +<% end -%> + +!includedir /etc/mysql/conf.d/ diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mysql/templates/my.cnf.pass.erb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mysql/templates/my.cnf.pass.erb new file mode 100644 index 00000000000..99663fccdc2 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mysql/templates/my.cnf.pass.erb @@ -0,0 +1,7 @@ +[client] +user=root +host=localhost +<% unless scope.lookupvar('mysql::server::root_password') == 'UNSET' -%> +password='<%= scope.lookupvar('mysql::server::root_password') %>' +<% end -%> +socket=<%= @options['client']['socket'] -%> diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mysql/templates/my.conf.cnf.erb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mysql/templates/my.conf.cnf.erb new file mode 100644 index 00000000000..04d2974294f --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mysql/templates/my.conf.cnf.erb @@ -0,0 +1,17 @@ +### MANAGED BY PUPPET ### +<% @settings.sort.each do |section, content| -%> +[<%= section %>] +<% content.sort.each do |key, values| -%> +<% [values].flatten.sort.each do |value| -%> +<%= !value ? '#' : '' %><%= key -%><%= + case value + when true, false + '' + else + " = #{value}" + end +%> +<% end -%> +<% end -%> + +<% end -%> diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mysql/templates/mysqlbackup.sh.erb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mysql/templates/mysqlbackup.sh.erb new file mode 100755 index 00000000000..ff38b23af03 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mysql/templates/mysqlbackup.sh.erb @@ -0,0 +1,72 @@ +#!/bin/bash +# +# MySQL Backup Script +# Dumps mysql databases to a file for another backup tool to pick up. +# +# MySQL code: +# GRANT SELECT, RELOAD, LOCK TABLES ON *.* TO 'user'@'localhost' +# IDENTIFIED BY 'password'; +# FLUSH PRIVILEGES; +# +##### START CONFIG ################################################### + +USER=<%= @backupuser %> +PASS=<%= @backuppassword %> +DIR=<%= @backupdir %> +ROTATE=<%= [ Integer(@backuprotate) - 1, 0 ].max %> + +PREFIX=mysql_backup_ +<% if @ignore_events %> +EVENTS="--ignore-table=mysql.event" +<% else %> +EVENTS="--events" +<% end %> + +##### STOP CONFIG #################################################### +PATH=/usr/bin:/usr/sbin:/bin:/sbin + + + +set -o pipefail + +cleanup() +{ + find "${DIR}/" -maxdepth 1 -type f -name "${PREFIX}*.sql*" -mtime +${ROTATE} -print0 | xargs -0 -r rm -f +} + +<% if @delete_before_dump -%> +cleanup + +<% end -%> +<% if @backupdatabases.empty? -%> +<% if @file_per_database -%> +mysql -s -r -N -e 'SHOW DATABASES' | while read dbname +do + mysqldump -u${USER} -p${PASS} --opt --flush-logs --single-transaction \ + ${EVENTS} \ + ${dbname} <% if @backupcompress %>| bzcat -zc <% end %>> ${DIR}/${PREFIX}${dbname}_`date +%Y%m%d-%H%M%S`.sql<% if @backupcompress %>.bz2<% end %> +done +<% else -%> +mysqldump -u${USER} -p${PASS} --opt --flush-logs --single-transaction \ + ${EVENTS} \ + --all-databases <% if @backupcompress %>| bzcat -zc <% end %>> ${DIR}/${PREFIX}`date +%Y%m%d-%H%M%S`.sql<% if @backupcompress %>.bz2<% end %> +<% end -%> +<% else -%> +<% @backupdatabases.each do |db| -%> +mysqldump -u${USER} -p${PASS} --opt --flush-logs --single-transaction \ + ${EVENTS} \ + <%= db %><% if @backupcompress %>| bzcat -zc <% end %>> ${DIR}/${PREFIX}<%= db %>_`date +%Y%m%d-%H%M%S`.sql<% if @backupcompress %>.bz2<% end %> +<% end -%> +<% end -%> + +<% unless @delete_before_dump -%> +if [ $? -eq 0 ] ; then + cleanup +fi +<% end -%> + +<% if @postscript -%> + <%- [@postscript].flatten.compact.each do |script|%> +<%= script %> + <%- end -%> +<% end -%> diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mysql/tests/backup.pp b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mysql/tests/backup.pp new file mode 100644 index 00000000000..cb669e6db80 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mysql/tests/backup.pp @@ -0,0 +1,8 @@ +class { 'mysql::server': + config_hash => {'root_password' => 'password'} +} +class { 'mysql::backup': + backupuser => 'myuser', + backuppassword => 'mypassword', + backupdir => '/tmp/backups', +} diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mysql/tests/bindings.pp b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mysql/tests/bindings.pp new file mode 100644 index 00000000000..83af3713a9d --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mysql/tests/bindings.pp @@ -0,0 +1,3 @@ +class { 'mysql::bindings': + php_enable => 'true', +} diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mysql/tests/init.pp b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mysql/tests/init.pp new file mode 100644 index 00000000000..846121b7df5 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mysql/tests/init.pp @@ -0,0 +1 @@ +include mysql diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mysql/tests/java.pp b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mysql/tests/java.pp new file mode 100644 index 00000000000..0fc009a6da8 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mysql/tests/java.pp @@ -0,0 +1 @@ +class { 'mysql::java':} diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mysql/tests/mysql_database.pp b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mysql/tests/mysql_database.pp new file mode 100644 index 00000000000..8747f707d57 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mysql/tests/mysql_database.pp @@ -0,0 +1,12 @@ +class { 'mysql::server': + config_hash => {'root_password' => 'password'} +} +database{ ['test1', 'test2', 'test3']: + ensure => present, + charset => 'utf8', + require => Class['mysql::server'], +} +database{ 'test4': + ensure => present, + charset => 'latin1', +} diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mysql/tests/mysql_grant.pp b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mysql/tests/mysql_grant.pp new file mode 100644 index 00000000000..20fe78d6a7b --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mysql/tests/mysql_grant.pp @@ -0,0 +1,5 @@ +mysql_grant{'test1@localhost/redmine.*': + user => 'test1@localhost', + table => 'redmine.*', + privileges => ['UPDATE'], +} diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mysql/tests/mysql_user.pp b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mysql/tests/mysql_user.pp new file mode 100644 index 00000000000..f63908431b8 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mysql/tests/mysql_user.pp @@ -0,0 +1,23 @@ +$mysql_root_pw = 'password' + +class { 'mysql::server': + config_hash => { + root_password => 'password', + } +} + +database_user{ 'redmine@localhost': + ensure => present, + password_hash => mysql_password('redmine'), + require => Class['mysql::server'], +} + +database_user{ 'dan@localhost': + ensure => present, + password_hash => mysql_password('blah') +} + +database_user{ 'dan@%': + ensure => present, + password_hash => mysql_password('blah'), +} diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mysql/tests/perl.pp b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mysql/tests/perl.pp new file mode 100644 index 00000000000..87e941751a0 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mysql/tests/perl.pp @@ -0,0 +1 @@ +include mysql::perl diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mysql/tests/python.pp b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mysql/tests/python.pp new file mode 100644 index 00000000000..04f7ffa1ac1 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mysql/tests/python.pp @@ -0,0 +1 @@ +class { 'mysql::python':} diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mysql/tests/ruby.pp b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mysql/tests/ruby.pp new file mode 100644 index 00000000000..e84c046a31c --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mysql/tests/ruby.pp @@ -0,0 +1 @@ +include mysql::ruby diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mysql/tests/server.pp b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mysql/tests/server.pp new file mode 100644 index 00000000000..8afdd00d24c --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mysql/tests/server.pp @@ -0,0 +1,3 @@ +class { 'mysql::server': + root_password => 'password', +} diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mysql/tests/server/account_security.pp b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mysql/tests/server/account_security.pp new file mode 100644 index 00000000000..de393cce4d2 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mysql/tests/server/account_security.pp @@ -0,0 +1,4 @@ +class { 'mysql::server': + config_hash => { 'root_password' => 'password', }, +} +class { 'mysql::server::account_security': } diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mysql/tests/server/config.pp b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mysql/tests/server/config.pp new file mode 100644 index 00000000000..fe8d86e9058 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/mysql/tests/server/config.pp @@ -0,0 +1,11 @@ +mysql::server::config { 'testfile': + settings => { + 'mysqld' => { + 'bind-address' => '0.0.0.0', + 'read-only' => true, + }, + 'client' => { + 'port' => '3306' + } + } +} diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/nginx/.fixtures.yml b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/nginx/.fixtures.yml new file mode 100644 index 00000000000..439f1aba9d1 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/nginx/.fixtures.yml @@ -0,0 +1,3 @@ +fixtures: + symlinks: + nginx: "#{source_dir}" diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/nginx/.nodeset.yml b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/nginx/.nodeset.yml new file mode 100644 index 00000000000..767f9cd2f6e --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/nginx/.nodeset.yml @@ -0,0 +1,31 @@ +--- +default_set: 'centos-64-x64' +sets: + 'centos-59-x64': + nodes: + "main.foo.vm": + prefab: 'centos-59-x64' + 'centos-64-x64': + nodes: + "main.foo.vm": + prefab: 'centos-64-x64' + 'fedora-18-x64': + nodes: + "main.foo.vm": + prefab: 'fedora-18-x64' + 'debian-607-x64': + nodes: + "main.foo.vm": + prefab: 'debian-607-x64' + 'debian-70rc1-x64': + nodes: + "main.foo.vm": + prefab: 'debian-70rc1-x64' + 'ubuntu-server-10044-x64': + nodes: + "main.foo.vm": + prefab: 'ubuntu-server-10044-x64' + 'ubuntu-server-12042-x64': + nodes: + "main.foo.vm": + prefab: 'ubuntu-server-12042-x64' diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/nginx/.travis.yml b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/nginx/.travis.yml new file mode 100644 index 00000000000..61c92863a11 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/nginx/.travis.yml @@ -0,0 +1,24 @@ +--- +branches: + only: + - master +language: ruby +script: "bundle exec rake --rakefile $PWD/.travis/Rakefile spec SPEC_OPTS='--format documentation'" +rvm: + - 1.9.3 + - 2.0.0 +gemfile: .travis/Gemfile +env: + matrix: + - PUPPET_GEM_VERSION="~> 2.7.0" + - PUPPET_GEM_VERSION="~> 3.0" +matrix: + exclude: + - rvm: 1.9.3 + env: PUPPET_GEM_VERSION="~> 2.7.0" + gemfile: .travis/Gemfile + - rvm: 2.0.0 + env: PUPPET_GEM_VERSION="~> 2.7.0" + gemfile: .travis/Gemfile +notifications: + email: false diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/nginx/.travis/Gemfile b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/nginx/.travis/Gemfile new file mode 100644 index 00000000000..8af652f2516 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/nginx/.travis/Gemfile @@ -0,0 +1,14 @@ +source 'https://rubygems.org' + +group :rake do + gem 'puppetlabs_spec_helper' + gem 'librarian-puppet-maestrodev' + gem 'open3_backport', :platforms => :ruby_18 + gem 'json', :platforms => :ruby_18 +end + +if puppetversion = ENV['PUPPET_GEM_VERSION'] + gem 'puppet', puppetversion, :require => false +else + gem 'puppet', :require => false +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/nginx/.travis/Rakefile b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/nginx/.travis/Rakefile new file mode 100644 index 00000000000..500bd023a98 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/nginx/.travis/Rakefile @@ -0,0 +1,8 @@ +require 'puppetlabs_spec_helper/rake_tasks' + +# use librarian-puppet to manage fixtures instead of .fixtures.yml +# offers more possibilities like explicit version management, forge downloads,... +task :librarian_spec_prep do + sh "librarian-puppet install --path=$PWD/spec/fixtures/modules/" +end +task :spec_prep => :librarian_spec_prep diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/nginx/Gemfile b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/nginx/Gemfile new file mode 100644 index 00000000000..513b910ae92 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/nginx/Gemfile @@ -0,0 +1,13 @@ +source 'https://rubygems.org' + +group :rake do + gem 'puppet', '>=3.0.1' + gem 'rspec-puppet', '>=1.0.1' + gem 'rake', '>=0.9.2.2' + gem 'puppet-lint', '>=0.1.12' + gem 'puppetlabs_spec_helper' + gem 'puppet-blacksmith' + gem 'librarian-puppet-maestrodev' + gem 'rspec-system-puppet', :require => false + gem 'rspec-system-serverspec', :require => false +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/nginx/LICENSE b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/nginx/LICENSE new file mode 100644 index 00000000000..d955a86d742 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/nginx/LICENSE @@ -0,0 +1,11 @@ +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. \ No newline at end of file diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/nginx/Modulefile b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/nginx/Modulefile new file mode 100644 index 00000000000..8754662feff --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/nginx/Modulefile @@ -0,0 +1,12 @@ +name 'jfryman-nginx' +version '0.0.9' +source 'http://github.com/jfryman/puppet-nginx' +author 'James Fryman' +license 'Apache License Version 2.0' +summary 'Puppet NGINX management module' +description 'This module can be used for basic NGINX Management' +project_page 'http://github.com/jfryman/puppet-nginx' + +dependency 'puppetlabs/stdlib', '>= 0.1.6' +dependency 'puppetlabs/apt', '>= 1.0.0' +dependency 'puppetlabs/concat', '>= 1.0.0' diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/nginx/Puppetfile b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/nginx/Puppetfile new file mode 100644 index 00000000000..7a314f2e9a9 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/nginx/Puppetfile @@ -0,0 +1,5 @@ +forge 'http://forge.puppetlabs.com' + +mod 'puppetlabs/stdlib', '>=0.1.6' +mod 'puppetlabs/apt', '>=1.0.0' +mod 'puppetlabs/concat', '>=1.0.0' diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/nginx/Puppetfile.lock b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/nginx/Puppetfile.lock new file mode 100644 index 00000000000..aac666e4036 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/nginx/Puppetfile.lock @@ -0,0 +1,13 @@ +FORGE + remote: http://forge.puppetlabs.com + specs: + puppetlabs/apt (1.2.0) + puppetlabs/stdlib (>= 2.2.1) + puppetlabs/concat (1.0.0) + puppetlabs/stdlib (4.1.0) + +DEPENDENCIES + puppetlabs/apt (>= 1.0.0) + puppetlabs/concat (>= 1.0.0) + puppetlabs/stdlib (>= 0.1.6) + diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/nginx/README.markdown b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/nginx/README.markdown new file mode 100644 index 00000000000..a640f039687 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/nginx/README.markdown @@ -0,0 +1,240 @@ +# NGINX Module + +[![Build Status](https://travis-ci.org/jfryman/puppet-nginx.png)](https://travis-ci.org/jfryman/puppet-nginx) + +James Fryman + +This module manages NGINX configuration. + +## Quick Start + +### Requirements + +* Puppet-2.7.0 or later +* Ruby-1.9.3 or later (Ruby-1.8.7 does not work) + +### Install and bootstrap an NGINX instance + +```puppet +class { 'nginx': } +``` + +### Setup a new virtual host + +```puppet +nginx::resource::vhost { 'www.puppetlabs.com': + www_root => '/var/www/www.puppetlabs.com', +} +``` + +### Add a Proxy Server + +```puppet +nginx::resource::upstream { 'puppet_rack_app': + members => [ + 'localhost:3000', + 'localhost:3001', + 'localhost:3002', + ], +} + +nginx::resource::vhost { 'rack.puppetlabs.com': + proxy => 'http://puppet_rack_app', +} +``` + +### Add a smtp proxy + +```puppet +class { 'nginx': + mail => true, +} + +nginx::resource::mailhost { 'domain1.example': + auth_http => 'server2.example/cgi-bin/auth', + protocol => 'smtp', + listen_port => 587, + ssl_port => 465, + starttls => 'only', + xclient => 'off', + ssl => true, + ssl_cert => '/tmp/server.crt', + ssl_key => '/tmp/server.pem', +} +``` + +## SSL configuration + +By default, creating a vhost resource will only create a HTTP vhost. To also create a HTTPS (SSL-enabled) vhost, set `ssl => true` on the vhost. You will have a HTTP server listening on `listen_port` (port `80` by default) and a HTTPS server listening on `ssl_port` (port `443` by default). Both vhosts will have the same `server_name` and a similar configuration. + +To create only a HTTPS vhost, set `ssl => true` and also set `listen_port` to the same value as `ssl_port`. Setting these to the same value disables the HTTP vhost. The resulting vhost will be listening on `ssl_port`. + +### Locations + +Locations require specific settings depending on whether they should be included in the HTTP, HTTPS or both vhosts. + +#### HTTP only vhost (default) +If you only have a HTTP vhost (i.e. `ssl => false` on the vhost) maks sure you don't set `ssl => true` on any location you associate with the vhost. + +#### HTTP and HTTPS vhost +If you set `ssl => true` and also set `listen_port` and `ssl_port` to different values on the vhost you will need to be specific with the location settings since you will have a HTTP vhost listening on `listen_port` and a HTTPS vhost listening on `ssl_port`: + +* To add a location to only the HTTP server, set `ssl => false` on the location (this is the default). +* To add a location to both the HTTP and HTTPS server, set `ssl => true` on the location, and ensure `ssl_only => false` (which is the default value for `ssl_only`). +* To add a location only to the HTTPS server, set both `ssl => true` and `ssl_only => true` on the location. + +#### HTTPS only vhost +If you have set `ssl => true` and also set `listen_port` and `ssl_port` to the same value on the vhost, you will have a single HTTPS vhost listening on `ssl_port`. To add a location to this vhost set `ssl => true` and `ssl_only => true` on the location. + +## Hiera Support + +Defining nginx resources in Hiera. + +```yaml +nginx::nginx_upstreams: + 'puppet_rack_app': + ensure: present + members: + - localhost:3000 + - localhost:3001 + - localhost:3002 +nginx::nginx_vhosts: + 'www.puppetlabs.com': + www_root: '/var/www/www.puppetlabs.com' + 'rack.puppetlabs.com': + proxy: 'http://puppet_rack_app' +nginx::nginx_locations: + 'static': + location: '~ "^/static/[0-9a-fA-F]{8}\/(.*)$"' + vhost: www.puppetlabs.com + 'userContent': + location: /userContent + vhost: www.puppetlabs.com + www_root: /var/www/html +``` + +## Nginx with precompiled Passenger + +Currently this works only for Debian family. + +```puppet +class { 'nginx': + package_source => 'passenger', + http_cfg_append => { + 'passenger_root' => '/usr/lib/ruby/vendor_ruby/phusion_passenger/locations.ini', + } +} +``` + +Package source `passenger` will add [Phusion Passenger repository](https://oss-binaries.phusionpassenger.com/apt/passenger) to APT sources. +For each virtual host you should specify which ruby should be used. + +```puppet +nginx::resource::vhost { 'www.puppetlabs.com': + www_root => '/var/www/www.puppetlabs.com', + vhost_cfg_append => { + 'passenger_enabled' => 'on', + 'passenger_ruby' => '/usr/bin/ruby', + } +} +``` + +### Puppet master served by Nginx and Passenger + +Virtual host config for serving puppet master: + +```puppet +nginx::resource::vhost { 'puppet': + ensure => present, + server_name => ['puppet'], + listen_port => 8140, + ssl => true, + ssl_cert => '/var/lib/puppet/ssl/certs/example.com.pem', + ssl_key => '/var/lib/puppet/ssl/private_keys/example.com.pem', + ssl_port => 8140, + vhost_cfg_append => { + 'passenger_enabled' => 'on', + 'passenger_ruby' => '/usr/bin/ruby', + 'ssl_crl' => '/var/lib/puppet/ssl/ca/ca_crl.pem', + 'ssl_client_certificate' => '/var/lib/puppet/ssl/certs/ca.pem', + 'ssl_verify_client' => 'optional', + 'ssl_verify_depth' => 1, + }, + www_root => '/etc/puppet/rack/public', + use_default_location => false, + access_log => '/var/log/nginx/puppet_access.log', + error_log => '/var/log/nginx/puppet_error.log', + passenger_cgi_param => { + 'HTTP_X_CLIENT_DN' => '$ssl_client_s_dn', + 'HTTP_X_CLIENT_VERIFY' => '$ssl_client_verify', + }, +} +``` + +### Example puppet class calling nginx::vhost with HTTPS FastCGI and redirection of HTTP + +```puppet + +$full_web_path = '/var/www' + +define web::nginx_ssl_with_redirect ( + $backend_port = 9000, + $php = true, + $proxy = undef, + $www_root = "${full_web_path}/${name}/", + $location_cfg_append = undef, +) { + nginx::resource::vhost { "${name}.${::domain}": + ensure => present, + www_root => "${full_web_path}/${name}/", + location_cfg_append => { 'rewrite' => '^ https://$server_name$request_uri? permanent' }, + } + + if !$www_root { + $tmp_www_root = undef + } else { + $tmp_www_root = $www_root + } + + nginx::resource::vhost { "${name}.${::domain} ${name}": + ensure => present, + listen_port => 443, + www_root => $tmp_www_root, + proxy => $proxy, + location_cfg_append => $location_cfg_append, + index_files => [ 'index.php' ], + ssl => true, + ssl_cert => 'puppet:///modules/sslkey/whildcard_mydomain.crt', + ssl_key => 'puppet:///modules/sslkey/whildcard_mydomain.key', + } + + + if $php { + nginx::resource::location { "${name}_root": + ensure => present, + ssl => true, + ssl_only => true, + vhost => "${name}.${::domain} ${name}", + www_root => "${full_web_path}/${name}/", + location => '~ \.php$', + index_files => ['index.php', 'index.html', 'index.htm'], + proxy => undef, + fastcgi => "127.0.0.1:${backend_port}", + fastcgi_script => undef, + location_cfg_append => { + fastcgi_connect_timeout => '3m', + fastcgi_read_timeout => '3m', + fastcgi_send_timeout => '3m' + } + } + } +} +``` + +# Call class web::nginx_ssl_with_redirect + +```puppet +web::nginx_ssl_with_redirect { 'sub-domain-name': + backend_port => 9001, + } +``` diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/nginx/Rakefile b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/nginx/Rakefile new file mode 100644 index 00000000000..e0913e5864a --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/nginx/Rakefile @@ -0,0 +1,19 @@ +require 'bundler' +Bundler.require(:rake) +require 'rake/clean' + +CLEAN.include('spec/fixtures/', 'doc', 'pkg') +CLOBBER.include('.tmp', '.librarian') + +require 'puppetlabs_spec_helper/rake_tasks' +require 'puppet_blacksmith/rake_tasks' +require 'rspec-system/rake_task' + +# use librarian-puppet to manage fixtures instead of .fixtures.yml +# offers more possibilities like explicit version management, forge downloads,... +task :librarian_spec_prep do + sh "librarian-puppet install --path=spec/fixtures/modules/" +end +task :spec_prep => :librarian_spec_prep + +task :default => [:clean, :spec] diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/nginx/composer.json b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/nginx/composer.json new file mode 100644 index 00000000000..91f362f7034 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/nginx/composer.json @@ -0,0 +1,14 @@ +{ + "name": "jfryman/puppet-nginx", + "type": "project", + "description": "Puppet module for nginx installation", + "keywords": ["puppet", "nginx"], + "license": "Apache-2.0", + "require": { + }, + "extra": { + "branch-alias": { + "dev-master": "1.x-dev" + } + } +} \ No newline at end of file diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/nginx/manifests/config.pp b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/nginx/manifests/config.pp new file mode 100644 index 00000000000..f22b3a6895c --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/nginx/manifests/config.pp @@ -0,0 +1,146 @@ +# Class: nginx::config +# +# This module manages NGINX bootstrap and configuration +# +# Parameters: +# +# There are no default parameters for this class. +# +# Actions: +# +# Requires: +# +# Sample Usage: +# +# This class file is not called directly +class nginx::config( + $worker_processes = $nginx::params::nx_worker_processes, + $worker_connections = $nginx::params::nx_worker_connections, + $worker_rlimit_nofile = $nginx::params::nx_worker_rlimit_nofile, + $confd_purge = $nginx::params::nx_confd_purge, + $vhost_purge = $nginx::params::nx_vhost_purge, + $server_tokens = $nginx::params::nx_server_tokens, + $proxy_set_header = $nginx::params::nx_proxy_set_header, + $proxy_cache_path = $nginx::params::nx_proxy_cache_path, + $proxy_cache_levels = $nginx::params::nx_proxy_cache_levels, + $proxy_cache_keys_zone = $nginx::params::nx_proxy_cache_keys_zone, + $proxy_cache_max_size = $nginx::params::nx_proxy_cache_max_size, + $proxy_cache_inactive = $nginx::params::nx_proxy_cache_inactive, + $proxy_http_version = $nginx::params::nx_proxy_http_version, + $names_hash_bucket_size = $nginx::params::nx_names_hash_bucket_size, + $names_hash_max_size = $nginx::params::nx_names_hash_max_size, + $types_hash_max_size = $nginx::params::nx_types_hash_max_size, + $types_hash_bucket_size = $nginx::params::nx_types_hash_bucket_size, + $client_max_body_size = $nginx::params::nx_client_max_body_size, + $proxy_buffers = $nginx::params::nx_proxy_buffers, + $http_cfg_append = $nginx::params::nx_http_cfg_append, + $nginx_error_log = $nginx::params::nx_nginx_error_log, + $http_access_log = $nginx::params::nx_http_access_log, + $proxy_buffer_size = $nginx::params::nx_proxy_buffer_size, + $gzip = $nginx::params::nx_gzip, + $conf_template = $nginx::params::nx_conf_template, + $proxy_conf_template = $nginx::params::nx_proxy_conf_template, +) inherits nginx::params { + + File { + owner => 'root', + group => 'root', + mode => '0644', + } + + file { $nginx::params::nx_conf_dir: + ensure => directory, + } + + file { "${nginx::params::nx_conf_dir}/conf.d": + ensure => directory, + } + if $confd_purge == true { + File["${nginx::params::nx_conf_dir}/conf.d"] { + purge => true, + recurse => true, + } + } + + file { "${nginx::params::nx_conf_dir}/conf.mail.d": + ensure => directory, + } + if $confd_purge == true { + File["${nginx::params::nx_conf_dir}/conf.mail.d"] { + purge => true, + recurse => true, + } + } + + file { "${nginx::params::nx_conf_dir}/conf.d/vhost_autogen.conf": + ensure => absent, + } + + file { "${nginx::params::nx_conf_dir}/conf.mail.d/vhost_autogen.conf": + ensure => absent, + } + + file {$nginx::config::nx_run_dir: + ensure => directory, + } + + file {$nginx::config::nx_client_body_temp_path: + ensure => directory, + owner => $nginx::params::nx_daemon_user, + } + + file {$nginx::config::nx_proxy_temp_path: + ensure => directory, + owner => $nginx::params::nx_daemon_user, + } + + file { "${nginx::params::nx_conf_dir}/sites-available": + ensure => directory, + } + + if $vhost_purge == true { + File["${nginx::params::nx_conf_dir}/sites-available"] { + purge => true, + recurse => true, + } + } + + file { "${nginx::params::nx_conf_dir}/sites-enabled": + ensure => directory, + } + + if $vhost_purge == true { + File["${nginx::params::nx_conf_dir}/sites-enabled"] { + purge => true, + recurse => true, + } + } + + file { '/etc/nginx/sites-enabled/default': + ensure => absent, + } + + file { "${nginx::params::nx_conf_dir}/nginx.conf": + ensure => file, + content => template($conf_template), + } + + file { "${nginx::params::nx_conf_dir}/conf.d/proxy.conf": + ensure => file, + content => template($proxy_conf_template), + } + + file { "${nginx::config::nx_temp_dir}/nginx.d": + ensure => absent, + purge => true, + recurse => true, + force => true, + } + + file { "${nginx::config::nx_temp_dir}/nginx.mail.d": + ensure => absent, + purge => true, + recurse => true, + force => true, + } +} diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/nginx/manifests/init.pp b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/nginx/manifests/init.pp new file mode 100644 index 00000000000..9ed41690372 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/nginx/manifests/init.pp @@ -0,0 +1,173 @@ +# Class: nginx +# +# This module manages NGINX. +# +# Parameters: +# +# There are no default parameters for this class. All module parameters +# are managed via the nginx::params class +# +# Actions: +# +# Requires: +# puppetlabs-stdlib - https://github.com/puppetlabs/puppetlabs-stdlib +# +# Packaged NGINX +# - RHEL: EPEL or custom package +# - Debian/Ubuntu: Default Install or custom package +# - SuSE: Default Install or custom package +# +# stdlib +# - puppetlabs-stdlib module >= 0.1.6 +# - plugin sync enabled to obtain the anchor type +# +# Sample Usage: +# +# The module works with sensible defaults: +# +# node default { +# include nginx +# } +class nginx ( + $worker_processes = $nginx::params::nx_worker_processes, + $worker_connections = $nginx::params::nx_worker_connections, + $worker_rlimit_nofile = $nginx::params::nx_worker_rlimit_nofile, + $package_name = $nginx::params::package_name, + $package_ensure = $nginx::params::package_ensure, + $package_source = $nginx::params::package_source, + $proxy_set_header = $nginx::params::nx_proxy_set_header, + $proxy_http_version = $nginx::params::nx_proxy_http_version, + $confd_purge = $nginx::params::nx_confd_purge, + $vhost_purge = $nginx::params::nx_vhost_purge, + $proxy_cache_path = $nginx::params::nx_proxy_cache_path, + $proxy_cache_levels = $nginx::params::nx_proxy_cache_levels, + $proxy_cache_keys_zone = $nginx::params::nx_proxy_cache_keys_zone, + $proxy_cache_max_size = $nginx::params::nx_proxy_cache_max_size, + $proxy_cache_inactive = $nginx::params::nx_proxy_cache_inactive, + $configtest_enable = $nginx::params::nx_configtest_enable, + $service_restart = $nginx::params::nx_service_restart, + $service_ensure = $nginx::params::nx_service_ensure, + $mail = $nginx::params::nx_mail, + $server_tokens = $nginx::params::nx_server_tokens, + $client_max_body_size = $nginx::params::nx_client_max_body_size, + $names_hash_bucket_size = $nginx::params::nx_names_hash_bucket_size, + $names_hash_max_size = $nginx::params::nx_names_hash_max_size, + $proxy_buffers = $nginx::params::nx_proxy_buffers, + $proxy_buffer_size = $nginx::params::nx_proxy_buffer_size, + $http_cfg_append = $nginx::params::nx_http_cfg_append, + $nginx_error_log = $nginx::params::nx_nginx_error_log, + $http_access_log = $nginx::params::nx_http_access_log, + $gzip = $nginx::params::nx_gzip, + $conf_template = $nginx::params::nx_conf_template, + $proxy_conf_template = $nginx::params::nx_proxy_conf_template, + $nginx_vhosts = {}, + $nginx_upstreams = {}, + $nginx_locations = {}, + $manage_repo = $nginx::params::manage_repo, +) inherits nginx::params { + + include stdlib + + if (!is_string($worker_processes)) and (!is_integer($worker_processes)) { + fail('$worker_processes must be an integer or have value "auto".') + } + if (!is_integer($worker_connections)) { + fail('$worker_connections must be an integer.') + } + if (!is_integer($worker_rlimit_nofile)) { + fail('$worker_rlimit_nofile must be an integer.') + } + validate_string($package_name) + validate_string($package_ensure) + validate_string($package_source) + validate_array($proxy_set_header) + validate_string($proxy_http_version) + validate_bool($confd_purge) + validate_bool($vhost_purge) + if ($proxy_cache_path != false) { + validate_string($proxy_cache_path) + } + if (!is_integer($proxy_cache_levels)) { + fail('$proxy_cache_levels must be an integer.') + } + validate_string($proxy_cache_keys_zone) + validate_string($proxy_cache_max_size) + validate_string($proxy_cache_inactive) + validate_bool($configtest_enable) + validate_string($service_restart) + validate_bool($mail) + validate_string($server_tokens) + validate_string($client_max_body_size) + if (!is_integer($names_hash_bucket_size)) { + fail('$names_hash_bucket_size must be an integer.') + } + if (!is_integer($names_hash_max_size)) { + fail('$names_hash_max_size must be an integer.') + } + validate_string($proxy_buffers) + validate_string($proxy_buffer_size) + if ($http_cfg_append != false) { + validate_hash($http_cfg_append) + } + validate_string($nginx_error_log) + validate_string($http_access_log) + validate_hash($nginx_upstreams) + validate_hash($nginx_vhosts) + validate_hash($nginx_locations) + validate_bool($manage_repo) + + class { 'nginx::package': + package_name => $package_name, + package_source => $package_source, + package_ensure => $package_ensure, + notify => Class['nginx::service'], + manage_repo => $manage_repo, + } + + class { 'nginx::config': + worker_processes => $worker_processes, + worker_connections => $worker_connections, + worker_rlimit_nofile => $worker_rlimit_nofile, + proxy_set_header => $proxy_set_header, + proxy_http_version => $proxy_http_version, + proxy_cache_path => $proxy_cache_path, + proxy_cache_levels => $proxy_cache_levels, + proxy_cache_keys_zone => $proxy_cache_keys_zone, + proxy_cache_max_size => $proxy_cache_max_size, + proxy_cache_inactive => $proxy_cache_inactive, + confd_purge => $confd_purge, + vhost_purge => $vhost_purge, + server_tokens => $server_tokens, + client_max_body_size => $client_max_body_size, + names_hash_bucket_size => $names_hash_bucket_size, + names_hash_max_size => $names_hash_max_size, + proxy_buffers => $proxy_buffers, + proxy_buffer_size => $proxy_buffer_size, + http_cfg_append => $http_cfg_append, + nginx_error_log => $nginx_error_log, + http_access_log => $http_access_log, + gzip => $gzip, + conf_template => $conf_template, + proxy_conf_template => $proxy_conf_template, + require => Class['nginx::package'], + notify => Class['nginx::service'], + } + + class { 'nginx::service': + } + + create_resources('nginx::resource::upstream', $nginx_upstreams) + create_resources('nginx::resource::vhost', $nginx_vhosts) + create_resources('nginx::resource::location', $nginx_locations) + + # Allow the end user to establish relationships to the "main" class + # and preserve the relationship to the implementation classes through + # a transitive relationship to the composite class. + anchor{ 'nginx::begin': + before => Class['nginx::package'], + notify => Class['nginx::service'], + } + anchor { 'nginx::end': + require => Class['nginx::service'], + } +} diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/nginx/manifests/package.pp b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/nginx/manifests/package.pp new file mode 100644 index 00000000000..74885b2b5ef --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/nginx/manifests/package.pp @@ -0,0 +1,79 @@ +# Class: nginx::package +# +# This module manages NGINX package installation +# +# Parameters: +# +# There are no default parameters for this class. +# +# Actions: +# +# Requires: +# +# Sample Usage: +# +# This class file is not called directly +class nginx::package( + $package_name = 'nginx', + $package_source = 'nginx', + $package_ensure = 'present', + $manage_repo = true, +) { + + anchor { 'nginx::package::begin': } + anchor { 'nginx::package::end': } + + case $::osfamily { + 'redhat': { + class { 'nginx::package::redhat': + manage_repo => $manage_repo, + package_ensure => $package_ensure, + package_name => $package_name, + require => Anchor['nginx::package::begin'], + before => Anchor['nginx::package::end'], + } + } + 'debian': { + class { 'nginx::package::debian': + package_name => $package_name, + package_source => $package_source, + package_ensure => $package_ensure, + manage_repo => $manage_repo, + require => Anchor['nginx::package::begin'], + before => Anchor['nginx::package::end'], + } + } + 'suse': { + class { 'nginx::package::suse': + require => Anchor['nginx::package::begin'], + before => Anchor['nginx::package::end'], + } + } + 'Solaris': { + class { 'nginx::package::solaris': + package_name => $package_name, + package_source => $package_source, + package_ensure => $package_ensure, + require => Anchor['nginx::package::begin'], + before => Anchor['nginx::package::end'], + } + } + default: { + case $::operatingsystem { + 'amazon': { + # Amazon was added to osfamily RedHat in 1.7.2 + # https://github.com/puppetlabs/facter/commit/c12d3b6c557df695a7b2b009da099f6a93c7bd31#lib/facter/osfamily.rb + warning("Module ${module_name} support for ${::operatingsystem} with facter < 1.7.2 is deprecated") + warning("Please upgrade from facter ${::facterversion} to >= 1.7.2") + class { 'nginx::package::redhat': + require => Anchor['nginx::package::begin'], + before => Anchor['nginx::package::end'], + } + } + default: { + fail("Module ${module_name} is not supported on ${::operatingsystem}") + } + } + } + } +} diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/nginx/manifests/package/debian.pp b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/nginx/manifests/package/debian.pp new file mode 100644 index 00000000000..b87e3c0bed3 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/nginx/manifests/package/debian.pp @@ -0,0 +1,73 @@ +# Class: nginx::package::debian +# +# This module manages NGINX package installation on debian based systems +# +# Parameters: +# +# There are no default parameters for this class. +# +# Actions: +# +# Requires: +# +# Sample Usage: +# +# This class file is not called directly +class nginx::package::debian( + $manage_repo = true, + $package_name = 'nginx', + $package_source = 'nginx', + $package_ensure = 'present' + ) { + + + $distro = downcase($::operatingsystem) + + package { $package_name: + ensure => $package_ensure, + require => Anchor['nginx::apt_repo'], + } + + anchor { 'nginx::apt_repo' : } + + include '::apt' + + if $manage_repo { + case $package_source { + 'nginx': { + apt::source { 'nginx': + location => "http://nginx.org/packages/${distro}", + repos => 'nginx', + key => '7BD9BF62', + key_source => 'http://nginx.org/keys/nginx_signing.key', + notify => Exec['apt_get_update_for_nginx'], + } + } + 'passenger': { + ensure_resource('package', 'apt-transport-https', {'ensure' => 'present' }) + + apt::source { 'nginx': + location => 'https://oss-binaries.phusionpassenger.com/apt/passenger', + repos => "main", + key => '561F9B9CAC40B2F7', + key_source => 'https://oss-binaries.phusionpassenger.com/auto-software-signing-gpg-key.txt', + notify => Exec['apt_get_update_for_nginx'], + } + + package { 'passenger': + ensure => 'present', + require => Anchor['nginx::apt_repo'], + } + } + default: {} + } + + exec { 'apt_get_update_for_nginx': + command => '/usr/bin/apt-get update', + timeout => 240, + returns => [ 0, 100 ], + refreshonly => true, + before => Anchor['nginx::apt_repo'], + } + } +} diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/nginx/manifests/package/redhat.pp b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/nginx/manifests/package/redhat.pp new file mode 100644 index 00000000000..4cc34eea9ab --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/nginx/manifests/package/redhat.pp @@ -0,0 +1,71 @@ +# Class: nginx::package::redhat +# +# This module manages NGINX package installation on RedHat based systems +# +# Parameters: +# +# There are no default parameters for this class. +# +# Actions: +# +# Requires: +# +# Sample Usage: +# +# This class file is not called directly +class nginx::package::redhat ( + $manage_repo = true, + $package_ensure = 'present', + $package_name = 'nginx', +) { + + case $::operatingsystem { + 'fedora': { + # nginx.org does not supply RPMs for fedora + # fedora 18 provides 1.2.x packages + # fedora 19 has 1.4.x packages are in + + # fedora 18 users will need to supply their own nginx 1.4 rpms and/or repo + if $::lsbmajdistrelease and $::lsbmajdistrelease < 19 { + notice("${::operatingsystem} ${::lsbmajdistrelease} does not supply nginx >= 1.4 packages") + } + } + default: { + case $::lsbmajdistrelease { + 5, 6: { + $os_rel = $::lsbmajdistrelease + } + default: { + # Amazon uses the year as the $::lsbmajdistrelease + $os_rel = 6 + } + } + + # as of 2013-07-28 + # http://nginx.org/packages/centos appears to be identical to + # http://nginx.org/packages/rhel + # no other dedicated dirs exist for platforms under $::osfamily == redhat + if $manage_repo { + yumrepo { 'nginx-release': + baseurl => "http://nginx.org/packages/rhel/${os_rel}/\$basearch/", + descr => 'nginx repo', + enabled => '1', + gpgcheck => '1', + priority => '1', + gpgkey => 'http://nginx.org/keys/nginx_signing.key', + before => Package[$package_name], + } + + file { '/etc/yum.repos.d/nginx-release.repo': + ensure => present, + require => Yumrepo['nginx-release'], + } + } + } + } + + package { $package_name: + ensure => $package_ensure, + } + +} diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/nginx/manifests/package/solaris.pp b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/nginx/manifests/package/solaris.pp new file mode 100644 index 00000000000..fb1386c95a7 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/nginx/manifests/package/solaris.pp @@ -0,0 +1,29 @@ +# Class: nginx::package::solaris +# +# This module manages NGINX package installation on solaris based systems +# +# Parameters: +# +# *package_name* +# Needs to be specified. SFEnginx,CSWnginx depending on where you get it. +# +# *package_source* +# Needed in case of Solaris 10. +# +# Actions: +# +# Requires: +# +# Sample Usage: +# +# This class file is not called directly +class nginx::package::solaris( + $package_name = undef, + $package_source = '', + $package_ensure = 'present' + ){ + package { $package_name: + ensure => $package_ensure, + source => $package_source + } +} diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/nginx/manifests/package/suse.pp b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/nginx/manifests/package/suse.pp new file mode 100644 index 00000000000..0c044b09f18 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/nginx/manifests/package/suse.pp @@ -0,0 +1,30 @@ +# Class: nginx::package::suse +# +# This module manages NGINX package installation for SuSE based systems +# +# Parameters: +# +# There are no default parameters for this class. +# +# Actions: +# This module contains all of the required package for SuSE. Apache and all +# other packages listed below are built into the packaged RPM spec for +# SuSE and OpenSuSE. +# Requires: +# +# Sample Usage: +# +# This class file is not called directly +class nginx::package::suse { + + $suse_packages = [ + 'nginx-0.8', 'apache2', 'apache2-itk', 'apache2-utils', 'gd', 'libapr1', + 'libapr-util1', 'libjpeg62', 'libpng14-14', 'libxslt', 'rubygem-daemon_controller', + 'rubygem-fastthread', 'rubygem-file-tail', 'rubygem-passenger', + 'rubygem-passenger-nginx', 'rubygem-rack', 'rubygem-rake', 'rubygem-spruz', + ] + + package { $suse_packages: + ensure => $nginx::package_ensure, + } +} diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/nginx/manifests/params.pp b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/nginx/manifests/params.pp new file mode 100644 index 00000000000..8ecf1015453 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/nginx/manifests/params.pp @@ -0,0 +1,123 @@ +# Class: nginx::param +# +# This module manages NGINX paramaters +# +# Parameters: +# +# There are no default parameters for this class. +# +# Actions: +# +# Requires: +# +# Sample Usage: +# +# This class file is not called directly +class nginx::params { + + $nx_temp_dir = '/tmp' + $nx_run_dir = '/var/nginx' + + $nx_conf_template = 'nginx/conf.d/nginx.conf.erb' + $nx_proxy_conf_template = 'nginx/conf.d/proxy.conf.erb' + $nx_confd_purge = false + $nx_vhost_purge = false + $nx_worker_processes = 1 + $nx_worker_connections = 1024 + $nx_worker_rlimit_nofile = 1024 + $nx_types_hash_max_size = 1024 + $nx_types_hash_bucket_size = 512 + $nx_names_hash_bucket_size = 64 + $nx_names_hash_max_size = 512 + $nx_multi_accept = off + # One of [kqueue|rtsig|epoll|/dev/poll|select|poll|eventport] + # or false to use OS default + $nx_events_use = false + $nx_sendfile = on + $nx_keepalive_timeout = 65 + $nx_tcp_nodelay = on + $nx_gzip = on + $nx_server_tokens = on + $nx_spdy = off + $nx_ssl_stapling = off + + $nx_proxy_redirect = off + $nx_proxy_set_header = [ + 'Host $host', + 'X-Real-IP $remote_addr', + 'X-Forwarded-For $proxy_add_x_forwarded_for', + ] + $nx_proxy_cache_path = false + $nx_proxy_cache_levels = 1 + $nx_proxy_cache_keys_zone = 'd2:100m' + $nx_proxy_cache_max_size = '500m' + $nx_proxy_cache_inactive = '20m' + + $nx_client_body_temp_path = "${nx_run_dir}/client_body_temp" + $nx_client_body_buffer_size = '128k' + $nx_client_max_body_size = '10m' + $nx_proxy_temp_path = "${nx_run_dir}/proxy_temp" + $nx_proxy_connect_timeout = '90' + $nx_proxy_send_timeout = '90' + $nx_proxy_read_timeout = '90' + $nx_proxy_buffers = '32 4k' + $nx_proxy_http_version = '1.0' + $nx_proxy_buffer_size = '8k' + + $nx_logdir = $::kernel ? { + /(?i-mx:linux)/ => '/var/log/nginx', + /(?i-mx:sunos)/ => '/var/log/nginx', + } + + $nx_pid = $::kernel ? { + /(?i-mx:linux)/ => '/var/run/nginx.pid', + /(?i-mx:sunos)/ => '/var/run/nginx.pid', + } + + $nx_conf_dir = $::kernelversion ? { + /(?i-mx:joyent)/ => '/opt/local/etc/nginx', + default => '/etc/nginx', + } + + if $::osfamily { + $solaris_nx_daemon_user = $::kernelversion ? { + /(?i-mx:joyent)/ => 'www', + default => 'webservd', + } + $nx_daemon_user = $::osfamily ? { + /(?i-mx:redhat|suse|gentoo|linux)/ => 'nginx', + /(?i-mx:debian)/ => 'www-data', + /(?i-mx:solaris)/ => $solaris_nx_daemon_user, + } + } else { + warning('$::osfamily not defined. Support for $::operatingsystem is deprecated') + warning("Please upgrade from factor ${::facterversion} to >= 1.7.2") + $nx_daemon_user = $::operatingsystem ? { + /(?i-mx:debian|ubuntu)/ => 'www-data', + /(?i-mx:fedora|rhel|redhat|centos|scientific|suse|opensuse|amazon|gentoo|oraclelinux)/ => 'nginx', + /(?i-mx:solaris)/ => 'webservd', + } + } + + # Service restart after Nginx 0.7.53 could also be just + # "/path/to/nginx/bin -s HUP" Some init scripts do a configtest, some don't. + # If configtest_enable it's true then service restart will take + # $nx_service_restart value, forcing configtest. + + $nx_configtest_enable = false + $nx_service_restart = '/etc/init.d/nginx configtest && /etc/init.d/nginx restart' + $nx_service_ensure = running + + $nx_mail = false + + $nx_http_cfg_append = false + + $nx_nginx_error_log = "${nx_logdir}/error.log" + $nx_http_access_log = "${nx_logdir}/access.log" + + # package name depends on distribution, e.g. for Debian nginx-full | nginx-light + $package_name = 'nginx' + $package_ensure = 'present' + $package_source = 'nginx' + $manage_repo = true +} diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/nginx/manifests/resource/location.pp b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/nginx/manifests/resource/location.pp new file mode 100644 index 00000000000..c44a6737931 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/nginx/manifests/resource/location.pp @@ -0,0 +1,299 @@ +# define: nginx::resource::location +# +# This definition creates a new location entry within a virtual host +# +# Parameters: +# [*ensure*] - Enables or disables the specified location +# (present|absent) +# [*vhost*] - Defines the default vHost for this location +# entry to include with +# [*location*] - Specifies the URI associated with this location +# entry +# [*location_allow*] - Array: Locations to allow connections from. +# [*location_deny*] - Array: Locations to deny connections from. +# [*www_root*] - Specifies the location on disk for files to be +# read from. Cannot be set in conjunction with $proxy +# [*autoindex*] - Set it on 'on' to activate autoindex directory +# listing. Undef by default. +# [*index_files*] - Default index files for NGINX to read when +# traversing a directory +# [*proxy*] - Proxy server(s) for a location to connect to. +# Accepts a single value, can be used in conjunction with +# nginx::resource::upstream +# [*proxy_read_timeout*] - Override the default the proxy read timeout +# value of 90 seconds +# [*fastcgi*] - location of fastcgi (host:port) +# [*fastcgi_params*] - optional alternative fastcgi_params file to use +# [*fastcgi_script*] - optional SCRIPT_FILE parameter +# [*fastcgi_split_path*] - Allows settings of fastcgi_split_path_info so +# that you can split the script_name and path_info via regex +# [*ssl*] - Indicates whether to setup SSL bindings for +# this location. +# [*ssl_only*] - Required if the SSL and normal vHost have the +# same port. +# [*location_alias*] - Path to be used as basis for serving requests +# for this location +# [*stub_status*] - If true it will point configure module +# stub_status to provide nginx stats on location +# [*location_custom_cfg*] - Expects a hash with custom directives, cannot +# be used with other location types (proxy, fastcgi, root, or stub_status) +# [*location_cfg_prepend*] - Expects a hash with extra directives to put +# before anything else inside location (used with all other types except +# custom_cfg) +# [*location_custom_cfg_prepend*] - Expects a array with extra directives +# to put before anything else inside location (used with all other types +# except custom_cfg). Used for logical structures such as if. +# [*location_custom_cfg_append*] - Expects a array with extra directives +# to put before anything else inside location (used with all other types +# except custom_cfg). Used for logical structures such as if. +# [*location_cfg_append*] - Expects a hash with extra directives to put +# after everything else inside location (used with all other types except +# custom_cfg) +# [*try_files*] - An array of file locations to try +# [*option*] - Reserved for future use +# [*proxy_cache*] - This directive sets name of zone for caching. +# The same zone can be used in multiple places. +# [*proxy_cache_valid*] - This directive sets the time for caching +# different replies. +# [*proxy_method*] - If defined, overrides the HTTP method of the +# request to be passed to the backend. +# [*proxy_set_body*] - If defined, sets the body passed to the backend. +# [*auth_basic*] - This directive includes testing name and password +# with HTTP Basic Authentication. +# [*auth_basic_user_file*] - This directive sets the htpasswd filename for +# the authentication realm. +# [*priority*] - Location priority. Default: 500. User priority +# 401-499, 501-599. If the priority is higher than the default priority, +# the location will be defined after root, or before root. +# +# +# Actions: +# +# Requires: +# +# Sample Usage: +# nginx::resource::location { 'test2.local-bob': +# ensure => present, +# www_root => '/var/www/bob', +# location => '/bob', +# vhost => 'test2.local', +# } +# +# Custom config example to limit location on localhost, +# create a hash with any extra custom config you want. +# $my_config = { +# 'access_log' => 'off', +# 'allow' => '127.0.0.1', +# 'deny' => 'all' +# } +# nginx::resource::location { 'test2.local-bob': +# ensure => present, +# www_root => '/var/www/bob', +# location => '/bob', +# vhost => 'test2.local', +# location_cfg_append => $my_config, +# } + +define nginx::resource::location ( + $ensure = present, + $location = $name, + $vhost = undef, + $www_root = undef, + $autoindex = undef, + $index_files = [ + 'index.html', + 'index.htm', + 'index.php'], + $proxy = undef, + $proxy_read_timeout = $nginx::params::nx_proxy_read_timeout, + $fastcgi = undef, + $fastcgi_params = '/etc/nginx/fastcgi_params', + $fastcgi_script = undef, + $fastcgi_split_path = undef, + $ssl = false, + $ssl_only = false, + $location_alias = undef, + $location_allow = undef, + $location_deny = undef, + $option = undef, + $stub_status = undef, + $location_custom_cfg = undef, + $location_cfg_prepend = undef, + $location_cfg_append = undef, + $location_custom_cfg_prepend = undef, + $location_custom_cfg_append = undef, + $try_files = undef, + $proxy_cache = false, + $proxy_cache_valid = false, + $proxy_method = undef, + $proxy_set_body = undef, + $auth_basic = undef, + $auth_basic_user_file = undef, + $rewrite_rules = [], + $priority = 500 +) { + File { + owner => 'root', + group => 'root', + mode => '0644', + notify => Class['nginx::service'], + } + + validate_re($ensure, '^(present|absent)$', + "${ensure} is not supported for ensure. Allowed values are 'present' and 'absent'.") + validate_string($location) + if ($vhost != undef) { + validate_string($vhost) + } + if ($www_root != undef) { + validate_string($www_root) + } + if ($autoindex != undef) { + validate_string($autoindex) + } + validate_array($index_files) + if ($proxy != undef) { + validate_string($proxy) + } + validate_string($proxy_read_timeout) + if ($fastcgi != undef) { + validate_string($fastcgi) + } + validate_string($fastcgi_params) + if ($fastcgi_script != undef) { + validate_string($fastcgi_script) + } + if ($fastcgi_split_path != undef) { + validate_string($fastcgi_split_path) + } + validate_bool($ssl) + validate_bool($ssl_only) + if ($location_alias != undef) { + validate_string($location_alias) + } + if ($location_allow != undef) { + validate_array($location_allow) + } + if ($location_deny != undef) { + validate_array($location_deny) + } + if ($option != undef) { + warning('The $option parameter has no effect and is deprecated.') + } + if ($stub_status != undef) { + validate_bool($stub_status) + } + if ($location_custom_cfg != undef) { + validate_hash($location_custom_cfg) + } + if ($location_cfg_prepend != undef) { + validate_hash($location_cfg_prepend) + } + if ($location_cfg_append != undef) { + validate_hash($location_cfg_append) + } + if ($try_files != undef) { + validate_array($try_files) + } + if ($proxy_cache != false) { + validate_string($proxy_cache) + } + if ($proxy_cache_valid != false) { + validate_string($proxy_cache_valid) + } + if ($proxy_method != undef) { + validate_string($proxy_method) + } + if ($proxy_set_body != undef) { + validate_string($proxy_set_body) + } + if ($auth_basic != undef) { + validate_string($auth_basic) + } + if ($auth_basic_user_file != undef) { + validate_string($auth_basic_user_file) + } + if !is_integer($priority) { + fail('$priority must be an integer.') + } + validate_array($rewrite_rules) + if ($priority < 401) or ($priority > 599) { + fail('$priority must be in the range 401-599.') + } + + # # Shared Variables + $ensure_real = $ensure ? { + 'absent' => absent, + default => file, + } + + $vhost_sanitized = regsubst($vhost, ' ', '_', 'G') + $config_file = "${nginx::config::nx_conf_dir}/sites-available/${vhost_sanitized}.conf" + + $location_sanitized_tmp = regsubst($location, '\/', '_', 'G') + $location_sanitized = regsubst($location_sanitized_tmp, '\\', '_', 'G') + + ## Check for various error conditions + if ($vhost == undef) { + fail('Cannot create a location reference without attaching to a virtual host') + } + if (($www_root == undef) and ($proxy == undef) and ($location_alias == undef) and ($stub_status == undef) and ($fastcgi == undef) and ($location_custom_cfg == undef)) { + fail('Cannot create a location reference without a www_root, proxy, location_alias, fastcgi, stub_status, or location_custom_cfg defined') + } + if (($www_root != undef) and ($proxy != undef)) { + fail('Cannot define both directory and proxy in a virtual host') + } + + # Use proxy or fastcgi template if $proxy is defined, otherwise use directory template. + if ($proxy != undef) { + $content_real = template('nginx/vhost/vhost_location_proxy.erb') + } elsif ($location_alias != undef) { + $content_real = template('nginx/vhost/vhost_location_alias.erb') + } elsif ($stub_status != undef) { + $content_real = template('nginx/vhost/vhost_location_stub_status.erb') + } elsif ($fastcgi != undef) { + $content_real = template('nginx/vhost/vhost_location_fastcgi.erb') + } elsif ($www_root != undef) { + $content_real = template('nginx/vhost/vhost_location_directory.erb') + } else { + $content_real = template('nginx/vhost/vhost_location_empty.erb') + } + + if $fastcgi != undef and !defined(File['/etc/nginx/fastcgi_params']) { + file { '/etc/nginx/fastcgi_params': + ensure => present, + mode => '0770', + content => template('nginx/vhost/fastcgi_params.erb'), + } + } + + ## Create stubs for vHost File Fragment Pattern + if ($ssl_only != true) { + concat::fragment { "${vhost_sanitized}-${priority}-${location_sanitized}": + ensure => present, + target => $config_file, + content => $content_real, + order => "${priority}", + } + } + + ## Only create SSL Specific locations if $ssl is true. + if ($ssl == true) { + $ssl_priority = $priority + 300 + concat::fragment {"${vhost_sanitized}-${ssl_priority}-${location_sanitized}-ssl": + ensure => present, + target => $config_file, + content => $content_real, + order => "${ssl_priority}", + } + } + + if ($auth_basic_user_file != undef) { + #Generate htpasswd with provided file-locations + file { "${nginx::params::nx_conf_dir}/${location_sanitized}_htpasswd": + ensure => $ensure, + mode => '0644', + source => $auth_basic_user_file, + } + } +} diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/nginx/manifests/resource/mailhost.pp b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/nginx/manifests/resource/mailhost.pp new file mode 100644 index 00000000000..89e0245d70a --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/nginx/manifests/resource/mailhost.pp @@ -0,0 +1,144 @@ +# define: nginx::resource::mailhost +# +# This definition creates a virtual host +# +# Parameters: +# [*ensure*] - Enables or disables the specified mailhost (present|absent) +# [*listen_ip*] - Default IP Address for NGINX to listen with this vHost on. Defaults to all interfaces (*) +# [*listen_port*] - Default IP Port for NGINX to listen with this vHost on. Defaults to TCP 80 +# [*listen_options*] - Extra options for listen directive like 'default' to catchall. Undef by default. +# [*ipv6_enable*] - BOOL value to enable/disable IPv6 support (false|true). Module will check to see if IPv6 +# support exists on your system before enabling. +# [*ipv6_listen_ip*] - Default IPv6 Address for NGINX to listen with this vHost on. Defaults to all interfaces (::) +# [*ipv6_listen_port*] - Default IPv6 Port for NGINX to listen with this vHost on. Defaults to TCP 80 +# [*ipv6_listen_options*] - Extra options for listen directive like 'default' to catchall. Template will allways add ipv6only=on. +# While issue jfryman/puppet-nginx#30 is discussed, default value is 'default'. +# [*index_files*] - Default index files for NGINX to read when traversing a directory +# [*ssl*] - Indicates whether to setup SSL bindings for this mailhost. +# [*ssl_cert*] - Pre-generated SSL Certificate file to reference for SSL Support. This is not generated by this module. +# [*ssl_key*] - Pre-generated SSL Key file to reference for SSL Support. This is not generated by this module. +# [*ssl_port*] - Default IP Port for NGINX to listen with this SSL vHost on. Defaults to TCP 443 +# [*starttls*] - enable STARTTLS support: (on|off|only) +# [*protocol*] - Mail protocol to use: (imap|pop3|smtp) +# [*auth_http*] - With this directive you can set the URL to the external HTTP-like server for authorization. +# [*xclient*] - wheter to use xclient for smtp (on|off) +# [*server_name*] - List of mailhostnames for which this mailhost will respond. Default [$name]. +# +# Actions: +# +# Requires: +# +# Sample Usage: +# nginx::resource::mailhost { 'domain1.example': +# ensure => present, +# auth_http => 'server2.example/cgi-bin/auth', +# protocol => 'smtp', +# listen_port => 587, +# ssl_port => 465, +# starttls => 'only', +# xclient => 'off', +# ssl => true, +# ssl_cert => '/tmp/server.crt', +# ssl_key => '/tmp/server.pem', +# } +define nginx::resource::mailhost ( + $listen_port, + $ensure = 'present', + $listen_ip = '*', + $listen_options = undef, + $ipv6_enable = false, + $ipv6_listen_ip = '::', + $ipv6_listen_port = '80', + $ipv6_listen_options = 'default ipv6only=on', + $ssl = false, + $ssl_cert = undef, + $ssl_key = undef, + $ssl_port = undef, + $starttls = 'off', + $protocol = undef, + $auth_http = undef, + $xclient = 'on', + $server_name = [$name]) { + File { + owner => 'root', + group => 'root', + mode => '0644', + } + + if !is_integer($listen_port) { + fail('$listen_port must be an integer.') + } + validate_re($ensure, '^(present|absent)$', + "${ensure} is not supported for ensure. Allowed values are 'present' and 'absent'.") + validate_string($listen_ip) + if ($listen_options != undef) { + validate_string($listen_options) + } + validate_bool($ipv6_enable) + validate_string($ipv6_listen_ip) + if !is_integer($ipv6_listen_port) { + fail('$ipv6_listen_port must be an integer.') + } + validate_string($ipv6_listen_options) + validate_bool($ssl) + if ($ssl_cert != undef) { + validate_string($ssl_cert) + } + if ($ssl_key != undef) { + validate_string($ssl_key) + } + if ($ssl_port != undef) and (!is_integer($ssl_port)) { + fail('$ssl_port must be an integer.') + } + validate_re($starttls, '^(on|only|off)$', + "${starttls} is not supported for starttls. Allowed values are 'on', 'only' and 'off'.") + if ($protocol != undef) { + validate_string($protocol) + } + if ($auth_http != undef) { + validate_string($auth_http) + } + validate_string($xclient) + validate_array($server_name) + + $config_file = "${nginx::config::nx_conf_dir}/conf.mail.d/${name}.conf" + + # Add IPv6 Logic Check - Nginx service will not start if ipv6 is enabled + # and support does not exist for it in the kernel. + if ($ipv6_enable and !$::ipaddress6) { + warning('nginx: IPv6 support is not enabled or configured properly') + } + + # Check to see if SSL Certificates are properly defined. + if ($ssl or $starttls == 'on' or $starttls == 'only') { + if ($ssl_cert == undef) or ($ssl_key == undef) { + fail('nginx: SSL certificate/key (ssl_cert/ssl_cert) and/or SSL Private must be defined and exist on the target system(s)') + } + } + + concat { $config_file: + owner => 'root', + group => 'root', + mode => '0644', + notify => Class['nginx::service'], + } + + if ($listen_port != $ssl_port) { + concat::fragment { "${name}-header": + ensure => present, + target => $config_file, + content => template('nginx/mailhost/mailhost.erb'), + order => '001', + } + } + + # Create SSL File Stubs if SSL is enabled + if ($ssl) { + concat::fragment { "${name}-ssl": + ensure => present, + target => $config_file, + content => template('nginx/mailhost/mailhost_ssl.erb'), + order => '700', + } + } +} diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/nginx/manifests/resource/upstream.pp b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/nginx/manifests/resource/upstream.pp new file mode 100644 index 00000000000..920aff98a18 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/nginx/manifests/resource/upstream.pp @@ -0,0 +1,68 @@ +# define: nginx::resource::upstream +# +# This definition creates a new upstream proxy entry for NGINX +# +# Parameters: +# [*members*] - Array of member URIs for NGINX to connect to. Must follow valid NGINX syntax. +# [*ensure*] - Enables or disables the specified location (present|absent) +# [*upstream_cfg_prepend*] - It expects a hash with custom directives to put before anything else inside upstream +# [*upstream_fail_timeout*] - Set the fail_timeout for the upstream. Default is 10 seconds - As that is what Nginx does normally. +# +# Actions: +# +# Requires: +# +# Sample Usage: +# nginx::resource::upstream { 'proxypass': +# ensure => present, +# members => [ +# 'localhost:3000', +# 'localhost:3001', +# 'localhost:3002', +# ], +# } +# +# Custom config example to use ip_hash, and 20 keepalive connections +# create a hash with any extra custom config you want. +# $my_config = { +# 'ip_hash' => '', +# 'keepalive' => '20', +# } +# nginx::resource::upstream { 'proxypass': +# ensure => present, +# members => [ +# 'localhost:3000', +# 'localhost:3001', +# 'localhost:3002', +# ], +# upstream_cfg_prepend => $my_config, +# } +define nginx::resource::upstream ( + $members, + $ensure = 'present', + $upstream_cfg_prepend = undef, + $upstream_fail_timeout = '10s', +) { + + validate_array($members) + validate_re($ensure, '^(present|absent)$', + "${ensure} is not supported for ensure. Allowed values are 'present' and 'absent'.") + if ($upstream_cfg_prepend != undef) { + validate_hash($upstream_cfg_prepend) + } + + File { + owner => 'root', + group => 'root', + mode => '0644', + } + + file { "/etc/nginx/conf.d/${name}-upstream.conf": + ensure => $ensure ? { + 'absent' => absent, + default => 'file', + }, + content => template('nginx/conf.d/upstream.erb'), + notify => Class['nginx::service'], + } +} diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/nginx/manifests/resource/vhost.pp b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/nginx/manifests/resource/vhost.pp new file mode 100644 index 00000000000..453984dc26a --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/nginx/manifests/resource/vhost.pp @@ -0,0 +1,511 @@ +# define: nginx::resource::vhost +# +# This definition creates a virtual host +# +# Parameters: +# [*ensure*] - Enables or disables the specified vhost +# (present|absent) +# [*listen_ip*] - Default IP Address for NGINX to listen with this +# vHost on. Defaults to all interfaces (*) +# [*listen_port*] - Default IP Port for NGINX to listen with this +# vHost on. Defaults to TCP 80 +# [*listen_options*] - Extra options for listen directive like +# 'default' to catchall. Undef by default. +# [*location_allow*] - Array: Locations to allow connections from. +# [*location_deny*] - Array: Locations to deny connections from. +# [*ipv6_enable*] - BOOL value to enable/disable IPv6 support +# (false|true). Module will check to see if IPv6 support exists on your +# system before enabling. +# [*ipv6_listen_ip*] - Default IPv6 Address for NGINX to listen with +# this vHost on. Defaults to all interfaces (::) +# [*ipv6_listen_port*] - Default IPv6 Port for NGINX to listen with this +# vHost on. Defaults to TCP 80 +# [*ipv6_listen_options*] - Extra options for listen directive like 'default' +# to catchall. Template will allways add ipv6only=on. While issue +# jfryman/puppet-nginx#30 is discussed, default value is 'default'. +# [*add_header*] - Hash: Adds headers to the HTTP response when +# response code is equal to 200, 204, 301, 302 or 304. +# [*index_files*] - Default index files for NGINX to read when +# traversing a directory +# [*autoindex*] - Set it on 'on' or 'off 'to activate/deactivate +# autoindex directory listing. Undef by default. +# [*proxy*] - Proxy server(s) for the root location to connect +# to. Accepts a single value, can be used in conjunction with +# nginx::resource::upstream +# [*proxy_read_timeout*] - Override the default the proxy read timeout value +# of 90 seconds +# [*resolver*] - String: Configures name servers used to resolve +# names of upstream servers into addresses. +# [*fastcgi*] - location of fastcgi (host:port) +# [*fastcgi_params*] - optional alternative fastcgi_params file to use +# [*fastcgi_script*] - optional SCRIPT_FILE parameter +# [*ssl*] - Indicates whether to setup SSL bindings for this +# vhost. +# [*ssl_cert*] - Pre-generated SSL Certificate file to reference +# for SSL Support. This is not generated by this module. +# [*ssl_dhparam*] - This directive specifies a file containing +# Diffie-Hellman key agreement protocol cryptographic parameters, in PEM +# format, utilized for exchanging session keys between server and client. +# [*ssl_key*] - Pre-generated SSL Key file to reference for SSL +# Support. This is not generated by this module. +# [*ssl_port*] - Default IP Port for NGINX to listen with this SSL +# vHost on. Defaults to TCP 443 +# [*ssl_protocols*] - SSL protocols enabled. Defaults to 'SSLv3 TLSv1 +# TLSv1.1 TLSv1.2'. +# [*ssl_ciphers*] - SSL ciphers enabled. Defaults to +# 'HIGH:!aNULL:!MD5'. +# [*ssl_stapling*] - Bool: Enables or disables stapling of OCSP +# responses by the server. Defaults to false. +# [*ssl_stapling_file*] - String: When set, the stapled OCSP response +# will be taken from the specified file instead of querying the OCSP +# responder specified in the server certificate. +# [*ssl_stapling_responder*] - String: Overrides the URL of the OCSP +# responder specified in the Authority Information Access certificate +# extension. +# [*ssl_stapling_verify*] - Bool: Enables or disables verification of +# OCSP responses by the server. Defaults to false. +# [*ssl_trusted_cert*] - String: Specifies a file with trusted CA +# certificates in the PEM format used to verify client certificates and +# OCSP responses if ssl_stapling is enabled. +# [*spdy*] - Toggles SPDY protocol. +# [*server_name*] - List of vhostnames for which this vhost will +# respond. Default [$name]. +# [*www_root*] - Specifies the location on disk for files to be +# read from. Cannot be set in conjunction with $proxy +# [*rewrite_www_to_non_www*] - Adds a server directive and rewrite rule to +# rewrite www.domain.com to domain.com in order to avoid duplicate +# content (SEO); +# [*try_files*] - Specifies the locations for files to be +# checked as an array. Cannot be used in conjuction with $proxy. +# [*proxy_cache*] - This directive sets name of zone for caching. +# The same zone can be used in multiple places. +# [*proxy_cache_valid*] - This directive sets the time for caching +# different replies. +# [*proxy_method*] - If defined, overrides the HTTP method of the +# request to be passed to the backend. +# [*proxy_set_body*] - If defined, sets the body passed to the backend. +# [*auth_basic*] - This directive includes testing name and +# password with HTTP Basic Authentication. +# [*auth_basic_user_file*] - This directive sets the htpasswd filename for +# the authentication realm. +# [*client_max_body_size*] - This directive sets client_max_body_size. +# [*vhost_cfg_append*] - It expects a hash with custom directives to +# put after everything else inside vhost +# [*vhost_cfg_prepend*] - It expects a hash with custom directives to +# put before everything else inside vhost +# [*vhost_cfg_ssl_append*] - It expects a hash with custom directives to +# put after everything else inside vhost ssl +# [*vhost_cfg_ssl_prepend*] - It expects a hash with custom directives to +# put before everything else inside vhost ssl +# [*rewrite_to_https*] - Adds a server directive and rewrite rule to +# rewrite to ssl +# [*include_files*] - Adds include files to vhost +# [*access_log*] - Where to write access log. May add additional +# options like log format to the end. +# [*error_log*] - Where to write error log. May add additional +# options like error level to the end. +# [*passenger_cgi_param*] - Allows one to define additional CGI environment +# variables to pass to the backend application +# Actions: +# +# Requires: +# +# Sample Usage: +# nginx::resource::vhost { 'test2.local': +# ensure => present, +# www_root => '/var/www/nginx-default', +# ssl => true, +# ssl_cert => '/tmp/server.crt', +# ssl_key => '/tmp/server.pem', +# } +define nginx::resource::vhost ( + $ensure = 'present', + $listen_ip = '*', + $listen_port = '80', + $listen_options = undef, + $location_allow = [], + $location_deny = [], + $ipv6_enable = false, + $ipv6_listen_ip = '::', + $ipv6_listen_port = '80', + $ipv6_listen_options = 'default ipv6only=on', + $add_header = undef, + $ssl = false, + $ssl_cert = undef, + $ssl_dhparam = undef, + $ssl_key = undef, + $ssl_port = '443', + $ssl_protocols = 'SSLv3 TLSv1 TLSv1.1 TLSv1.2', + $ssl_ciphers = 'HIGH:!aNULL:!MD5', + $ssl_cache = 'shared:SSL:10m', + $ssl_stapling = false, + $ssl_stapling_file = undef, + $ssl_stapling_responder = undef, + $ssl_stapling_verify = false, + $ssl_trusted_cert = undef, + $spdy = $nginx::params::nx_spdy, + $proxy = undef, + $proxy_read_timeout = $nginx::params::nx_proxy_read_timeout, + $proxy_set_header = [], + $proxy_cache = false, + $proxy_cache_valid = false, + $proxy_method = undef, + $proxy_set_body = undef, + $resolver = undef, + $fastcgi = undef, + $fastcgi_params = '/etc/nginx/fastcgi_params', + $fastcgi_script = undef, + $index_files = [ + 'index.html', + 'index.htm', + 'index.php'], + $autoindex = undef, + $server_name = [$name], + $www_root = undef, + $rewrite_www_to_non_www = false, + $rewrite_to_https = undef, + $location_custom_cfg = undef, + $location_cfg_prepend = undef, + $location_cfg_append = undef, + $try_files = undef, + $auth_basic = undef, + $auth_basic_user_file = undef, + $client_max_body_size = undef, + $vhost_cfg_prepend = undef, + $vhost_cfg_append = undef, + $vhost_cfg_ssl_prepend = undef, + $vhost_cfg_ssl_append = undef, + $include_files = undef, + $access_log = undef, + $error_log = undef, + $passenger_cgi_param = undef, + $use_default_location = true, + $rewrite_rules = [], +) { + + validate_re($ensure, '^(present|absent)$', + "${ensure} is not supported for ensure. Allowed values are 'present' and 'absent'.") + validate_string($listen_ip) + if !is_integer($listen_port) { + fail('$listen_port must be an integer.') + } + if ($listen_options != undef) { + validate_string($listen_options) + } + validate_array($location_allow) + validate_array($location_deny) + validate_bool($ipv6_enable) + validate_string($ipv6_listen_ip) + if !is_integer($ipv6_listen_port) { + fail('$ipv6_listen_port must be an integer.') + } + validate_string($ipv6_listen_options) + if ($add_header != undef) { + validate_hash($add_header) + } + validate_bool($ssl) + if ($ssl_cert != undef) { + validate_string($ssl_cert) + } + if ($ssl_dhparam != undef) { + validate_string($ssl_dhparam) + } + if ($ssl_key != undef) { + validate_string($ssl_key) + } + if !is_integer($ssl_port) { + fail('$ssl_port must be an integer.') + } + validate_string($ssl_protocols) + validate_string($ssl_ciphers) + validate_string($ssl_cache) + validate_bool($ssl_stapling) + if ($ssl_stapling_file != undef) { + validate_string($ssl_stapling_file) + } + if ($ssl_stapling_responder != undef) { + validate_string($ssl_stapling_responder) + } + validate_bool($ssl_stapling_verify) + if ($ssl_trusted_cert != undef) { + validate_string($ssl_trusted_cert) + } + validate_string($spdy) + if ($proxy != undef) { + validate_string($proxy) + } + validate_string($proxy_read_timeout) + validate_array($proxy_set_header) + if ($proxy_cache != false) { + validate_string($proxy_cache) + } + if ($proxy_cache_valid != false) { + validate_string($proxy_cache_valid) + } + if ($proxy_method != undef) { + validate_string($proxy_method) + } + if ($proxy_set_body != undef) { + validate_string($proxy_set_body) + } + if ($resolver != undef) { + validate_string($resolver) + } + if ($fastcgi != undef) { + validate_string($fastcgi) + } + validate_string($fastcgi_params) + if ($fastcgi_script != undef) { + validate_string($fastcgi_script) + } + validate_array($index_files) + if ($autoindex != undef) { + validate_string($autoindex) + } + validate_array($server_name) + if ($www_root != undef) { + validate_string($www_root) + } + validate_bool($rewrite_www_to_non_www) + if ($rewrite_to_https != undef) { + validate_bool($rewrite_to_https) + } + if ($location_custom_cfg != undef) { + validate_hash($location_custom_cfg) + } + if ($location_cfg_prepend != undef) { + validate_hash($location_cfg_prepend) + } + if ($location_cfg_append != undef) { + validate_hash($location_cfg_append) + } + if ($try_files != undef) { + validate_array($try_files) + } + if ($auth_basic != undef) { + validate_string($auth_basic) + } + if ($auth_basic_user_file != undef) { + validate_string($auth_basic_user_file) + } + if ($vhost_cfg_prepend != undef) { + validate_hash($vhost_cfg_prepend) + } + if ($vhost_cfg_append != undef) { + validate_hash($vhost_cfg_append) + } + if ($vhost_cfg_ssl_prepend != undef) { + validate_hash($vhost_cfg_ssl_prepend) + } + if ($vhost_cfg_ssl_append != undef) { + validate_hash($vhost_cfg_ssl_append) + } + if ($include_files != undef) { + validate_array($include_files) + } + if ($access_log != undef) { + validate_string($access_log) + } + if ($error_log != undef) { + validate_string($error_log) + } + if ($passenger_cgi_param != undef) { + validate_hash($passenger_cgi_param) + } + validate_bool($use_default_location) + validate_array($rewrite_rules) + + # Variables + $vhost_dir = "${nginx::config::nx_conf_dir}/sites-available" + $vhost_enable_dir = "${nginx::config::nx_conf_dir}/sites-enabled" + $vhost_symlink_ensure = $ensure ? { + 'absent' => absent, + default => 'link', + } + + $name_sanitized = regsubst($name, ' ', '_', 'G') + $config_file = "${vhost_dir}/${name_sanitized}.conf" + + File { + ensure => $ensure ? { + 'absent' => absent, + default => 'file', + }, + notify => Class['nginx::service'], + owner => 'root', + group => 'root', + mode => '0644', + } + + # Add IPv6 Logic Check - Nginx service will not start if ipv6 is enabled + # and support does not exist for it in the kernel. + if ($ipv6_enable == true) and (!$ipaddress6) { + warning('nginx: IPv6 support is not enabled or configured properly') + } + + # Check to see if SSL Certificates are properly defined. + if ($ssl == true) { + if ($ssl_cert == undef) or ($ssl_key == undef) { + fail('nginx: SSL certificate/key (ssl_cert/ssl_cert) and/or SSL Private must be defined and exist on the target system(s)') + } + } + + # This was a lot to add up in parameter list so add it down here + # Also opted to add more logic here and keep template cleaner which + # unfortunately means resorting to the $varname_real thing + $access_log_real = $access_log ? { + undef => "${nginx::params::nx_logdir}/${name_sanitized}.access.log", + default => $access_log, + } + $error_log_real = $error_log ? { + undef => "${nginx::params::nx_logdir}/${name_sanitized}.error.log", + default => $error_log, + } + + concat { $config_file: + owner => 'root', + group => 'root', + mode => '0644', + notify => Class['nginx::service'], + } + + $ssl_only = ($ssl == true) and ($ssl_port == $listen_port) + + if $use_default_location == true { + # Create the default location reference for the vHost + nginx::resource::location {"${name_sanitized}-default": + ensure => $ensure, + vhost => $name_sanitized, + ssl => $ssl, + ssl_only => $ssl_only, + location => '/', + location_allow => $location_allow, + location_deny => $location_deny, + proxy => $proxy, + proxy_read_timeout => $proxy_read_timeout, + proxy_cache => $proxy_cache, + proxy_cache_valid => $proxy_cache_valid, + proxy_method => $proxy_method, + proxy_set_body => $proxy_set_body, + fastcgi => $fastcgi, + fastcgi_params => $fastcgi_params, + fastcgi_script => $fastcgi_script, + try_files => $try_files, + www_root => $www_root, + autoindex => $autoindex, + index_files => [], + location_custom_cfg => $location_custom_cfg, + notify => Class['nginx::service'], + rewrite_rules => $rewrite_rules, + } + } else { + $root = $www_root + } + + # Support location_cfg_prepend and location_cfg_append on default location created by vhost + if $location_cfg_prepend { + Nginx::Resource::Location["${name_sanitized}-default"] { + location_cfg_prepend => $location_cfg_prepend } + } + + if $location_cfg_append { + Nginx::Resource::Location["${name_sanitized}-default"] { + location_cfg_append => $location_cfg_append } + } + + if $fastcgi != undef and !defined(File['/etc/nginx/fastcgi_params']) { + file { '/etc/nginx/fastcgi_params': + ensure => present, + mode => '0770', + content => template('nginx/vhost/fastcgi_params.erb'), + } + } + + if ($listen_port != $ssl_port) { + concat::fragment { "${name_sanitized}-header": + ensure => present, + target => $config_file, + content => template('nginx/vhost/vhost_header.erb'), + order => '001', + } + } + + # Create a proper file close stub. + if ($listen_port != $ssl_port) { + concat::fragment { "${name_sanitized}-footer": + ensure => present, + target => $config_file, + content => template('nginx/vhost/vhost_footer.erb'), + order => '699', + } + } + + # Create SSL File Stubs if SSL is enabled + if ($ssl == true) { + # Access and error logs are named differently in ssl template + $ssl_access_log = $access_log ? { + undef => "${nginx::params::nx_logdir}/ssl-${name_sanitized}.access.log", + default => $access_log, + } + $ssl_error_log = $error_log ? { + undef => "${nginx::params::nx_logdir}/ssl-${name_sanitized}.error.log", + default => $error_log, + } + + concat::fragment { "${name_sanitized}-ssl-header": + target => $config_file, + content => template('nginx/vhost/vhost_ssl_header.erb'), + order => '700', + } + concat::fragment { "${name_sanitized}-ssl-footer": + target => $config_file, + content => template('nginx/vhost/vhost_ssl_footer.erb'), + order => '999', + } + + #Generate ssl key/cert with provided file-locations + $cert = regsubst($name,' ','_') + + # Check if the file has been defined before creating the file to + # avoid the error when using wildcard cert on the multiple vhosts + ensure_resource('file', "${nginx::params::nx_conf_dir}/${cert}.crt", { + owner => $nginx::params::nx_daemon_user, + mode => '0444', + source => $ssl_cert, + }) + ensure_resource('file', "${nginx::params::nx_conf_dir}/${cert}.key", { + owner => $nginx::params::nx_daemon_user, + mode => '0440', + source => $ssl_key, + }) + if ($ssl_dhparam != undef) { + ensure_resource('file', "${nginx::params::nx_conf_dir}/${cert}.dh.pem", { + owner => $nginx::params::nx_daemon_user, + mode => '0440', + source => $ssl_dhparam, + }) + } + if ($ssl_stapling_file != undef) { + ensure_resource('file', "${nginx::params::nx_conf_dir}/${cert}.ocsp.resp", { + owner => $nginx::params::nx_daemon_user, + mode => '0440', + source => $ssl_stapling_file, + }) + } + if ($ssl_trusted_cert != undef) { + ensure_resource('file', "${nginx::params::nx_conf_dir}/${cert}.trusted.crt", { + owner => $nginx::params::nx_daemon_user, + mode => '0440', + source => $ssl_trusted_cert, + }) + } + } + + file{ "${name_sanitized}.conf symlink": + ensure => $vhost_symlink_ensure, + path => "${vhost_enable_dir}/${name_sanitized}.conf", + target => $config_file, + require => Concat[$config_file], + notify => Service['nginx'], + } +} diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/nginx/manifests/service.pp b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/nginx/manifests/service.pp new file mode 100644 index 00000000000..9ec899395bb --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/nginx/manifests/service.pp @@ -0,0 +1,40 @@ +# Class: nginx::service +# +# This module manages NGINX service management and vhost rebuild +# +# Parameters: +# +# There are no default parameters for this class. +# +# Actions: +# +# Requires: +# +# Sample Usage: +# +# This class file is not called directly +class nginx::service( + $configtest_enable = $nginx::configtest_enable, + $service_restart = $nginx::service_restart, + $service_ensure = $nginx::service_ensure, +) { + + $service_enable = $service_ensure ? { + running => true, + absent => false, + stopped => false, + default => true, + } + + service { 'nginx': + ensure => $service_ensure, + enable => $service_enable, + hasstatus => true, + hasrestart => true, + } + if $configtest_enable == true { + Service['nginx'] { + restart => $service_restart, + } + } +} diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/nginx/spec/classes/config_spec.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/nginx/spec/classes/config_spec.rb new file mode 100644 index 00000000000..6076e5481e6 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/nginx/spec/classes/config_spec.rb @@ -0,0 +1,324 @@ +require 'spec_helper' +describe 'nginx::config' do + + describe 'with defaults' do + [ + { :osfamily => 'debian', :operatingsystem => 'debian', }, + { :osfamily => 'debian', :operatingsystem => 'ubuntu', }, + { :osfamily => 'redhat', :operatingsystem => 'fedora', }, + { :osfamily => 'redhat', :operatingsystem => 'rhel', }, + { :osfamily => 'redhat', :operatingsystem => 'redhat', }, + { :osfamily => 'redhat', :operatingsystem => 'centos', }, + { :osfamily => 'redhat', :operatingsystem => 'scientific', }, + { :osfamily => 'redhat', :operatingsystem => 'amazon', }, + { :osfamily => 'suse', :operatingsystem => 'suse', }, + { :osfamily => 'suse', :operatingsystem => 'opensuse', }, + { :osfamily => 'gentoo', :operatingsystem => 'gentoo', }, + { :osfamily => 'linux', :operatingsystem => 'gentoo', }, + ].each do |facts| + + context "when osfamily/operatingsystem is #{facts[:osfamily]}/#{facts[:operatingsystem]}" do + + let :facts do + { + :osfamily => facts[:osfamily], + :operatingsystem => facts[:operatingsystem], + } + end + + it { should contain_class("nginx::params") } + + it { should contain_file("/etc/nginx").only_with( + :path => "/etc/nginx", + :ensure => 'directory', + :owner => 'root', + :group => 'root', + :mode => '0644' + )} + it { should contain_file("/etc/nginx/conf.d").only_with( + :path => '/etc/nginx/conf.d', + :ensure => 'directory', + :owner => 'root', + :group => 'root', + :mode => '0644' + )} + it { should contain_file("/etc/nginx/conf.mail.d").only_with( + :path => '/etc/nginx/conf.mail.d', + :ensure => 'directory', + :owner => 'root', + :group => 'root', + :mode => '0644' + )} + it { should contain_file("/etc/nginx/conf.d/vhost_autogen.conf").with_ensure('absent') } + it { should contain_file("/etc/nginx/conf.mail.d/vhost_autogen.conf").with_ensure('absent') } + it { should contain_file("/var/nginx").with( + :ensure => 'directory', + :owner => 'root', + :group => 'root', + :mode => '0644' + )} + it { should contain_file("/var/nginx/client_body_temp").with( + :ensure => 'directory', + :group => 'root', + :mode => '0644' + )} + it { should contain_file("/var/nginx/proxy_temp").with( + :ensure => 'directory', + :group => 'root', + :mode => '0644' + )} + it { should contain_file('/etc/nginx/sites-enabled/default').with_ensure('absent') } + it { should contain_file("/etc/nginx/nginx.conf").with( + :ensure => 'file', + :owner => 'root', + :group => 'root', + :mode => '0644' + )} + it { should contain_file("/etc/nginx/conf.d/proxy.conf").with( + :ensure => 'file', + :owner => 'root', + :group => 'root', + :mode => '0644' + )} + it { should contain_file("/tmp/nginx.d").with( + :ensure => 'absent', + :purge => true, + :recurse => true + )} + it { should contain_file("/tmp/nginx.mail.d").with( + :ensure => 'absent', + :purge => true, + :recurse => true + )} + end + end + end + + describe 'with defaults' do + [ + { :osfamily => 'debian', :operatingsystem => 'debian', }, + { :osfamily => 'debian', :operatingsystem => 'ubuntu', }, + ].each do |facts| + + context "when osfamily/operatingsystem is #{facts[:osfamily]}/#{facts[:operatingsystem]}" do + + let :facts do + { + :osfamily => facts[:osfamily], + :operatingsystem => facts[:operatingsystem], + } + end + it { should contain_file("/var/nginx/client_body_temp").with(:owner => 'www-data')} + it { should contain_file("/var/nginx/proxy_temp").with(:owner => 'www-data')} + it { should contain_file("/etc/nginx/nginx.conf").with_content %r{^user www-data;}} + end + end + end + + describe 'with defaults' do + [ + { :osfamily => 'redhat', :operatingsystem => 'fedora', }, + { :osfamily => 'redhat', :operatingsystem => 'rhel', }, + { :osfamily => 'redhat', :operatingsystem => 'redhat', }, + { :osfamily => 'redhat', :operatingsystem => 'centos', }, + { :osfamily => 'redhat', :operatingsystem => 'scientific', }, + { :osfamily => 'redhat', :operatingsystem => 'amazon', }, + { :osfamily => 'suse', :operatingsystem => 'suse', }, + { :osfamily => 'suse', :operatingsystem => 'opensuse', }, + { :osfamily => 'gentoo', :operatingsystem => 'gentoo', }, + { :osfamily => 'linux', :operatingsystem => 'gentoo', }, + ].each do |facts| + + context "when osfamily/operatingsystem is #{facts[:osfamily]}/#{facts[:operatingsystem]}" do + + let :facts do + { + :osfamily => facts[:osfamily], + :operatingsystem => facts[:operatingsystem], + } + end + it { should contain_file("/var/nginx/client_body_temp").with(:owner => 'nginx')} + it { should contain_file("/var/nginx/proxy_temp").with(:owner => 'nginx')} + it { should contain_file("/etc/nginx/nginx.conf").with_content %r{^user nginx;}} + end + end + end + + describe 'os-independent items' do + + let :facts do + { + :osfamily => 'debian', + :operatingsystem => 'debian', + } + end + + describe "nginx.conf template content" do + [ + { + :title => 'should set worker_processes', + :attr => 'worker_processes', + :value => '4', + :match => 'worker_processes 4;', + }, + { + :title => 'should set worker_rlimit_nofile', + :attr => 'worker_rlimit_nofile', + :value => '10000', + :match => 'worker_rlimit_nofile 10000;', + }, + { + :title => 'should set error_log', + :attr => 'nginx_error_log', + :value => '/path/to/error.log', + :match => 'error_log /path/to/error.log;', + }, + { + :title => 'should set worker_connections', + :attr => 'worker_connections', + :value => '100', + :match => ' worker_connections 100;', + }, + { + :title => 'should set access_log', + :attr => 'http_access_log', + :value => '/path/to/access.log', + :match => ' access_log /path/to/access.log;', + }, + { + :title => 'should set server_tokens', + :attr => 'server_tokens', + :value => 'on', + :match => ' server_tokens on;', + }, + { + :title => 'should set proxy_cache_path', + :attr => 'proxy_cache_path', + :value => '/path/to/proxy.cache', + :match => ' proxy_cache_path /path/to/proxy.cache levels=1 keys_zone=d2:100m max_size=500m inactive=20m;', + }, + { + :title => 'should not set proxy_cache_path', + :attr => 'proxy_cache_path', + :value => false, + :notmatch => / proxy_cache_path \/path\/to\/proxy\.cache levels=1 keys_zone=d2:100m max_size=500m inactive=20m;/, + }, + { + :title => 'should contain ordered appended directives', + :attr => 'http_cfg_append', + :value => { 'test1' => 'test value 1', 'test2' => 'test value 2', 'allow' => 'test value 3' }, + :match => [ + ' allow test value 3;', + ' test1 test value 1;', + ' test2 test value 2;', + ], + }, + ].each do |param| + context "when #{param[:attr]} is #{param[:value]}" do + let :params do { param[:attr].to_sym => param[:value] } end + + it { should contain_file("/etc/nginx/nginx.conf").with_mode('0644') } + it param[:title] do + verify_contents(subject, "/etc/nginx/nginx.conf", Array(param[:match])) + Array(param[:notmatch]).each do |item| + should contain_file("/etc/nginx/nginx.conf").without_content(item) + end + end + end + end + end + + describe "proxy.conf template content" do + [ + { + :title => 'should set client_max_body_size', + :attr => 'client_max_body_size', + :value => '5m', + :match => 'client_max_body_size 5m;', + }, + { + :title => 'should set proxy_buffers', + :attr => 'proxy_buffers', + :value => '50 5k', + :match => 'proxy_buffers 50 5k;', + }, + { + :title => 'should set proxy_buffer_size', + :attr => 'proxy_buffer_size', + :value => '2k', + :match => 'proxy_buffer_size 2k;', + }, + { + :title => 'should set proxy_http_version', + :attr => 'proxy_http_version', + :value => '1.1', + :match => 'proxy_http_version 1.1;', + }, + { + :title => 'should contain ordered appended directives', + :attr => 'proxy_set_header', + :value => ['header1','header2'], + :match => [ + 'proxy_set_header header1;', + 'proxy_set_header header2;', + ], + }, + ].each do |param| + context "when #{param[:attr]} is #{param[:value]}" do + let :params do { param[:attr].to_sym => param[:value] } end + + it { should contain_file("/etc/nginx/conf.d/proxy.conf").with_mode('0644') } + it param[:title] do + verify_contents(subject, "/etc/nginx/conf.d/proxy.conf", Array(param[:match])) + Array(param[:notmatch]).each do |item| + should contain_file("/etc/nginx/conf.d/proxy.conf").without_content(item) + end + end + end + end + end + + context "when confd_purge true" do + let(:params) {{:confd_purge => true}} + it { should contain_file('/etc/nginx/conf.d').with( + :purge => true, + :recurse => true + )} + end + + context "when confd_purge false" do + let(:params) {{:confd_purge => false}} + it { should contain_file('/etc/nginx/conf.d').without([ + 'ignore', + 'purge', + 'recurse' + ])} + end + + context "when vhost_purge true" do + let(:params) {{:vhost_purge => true}} + it { should contain_file('/etc/nginx/sites-available').with( + :purge => true, + :recurse => true + )} + it { should contain_file('/etc/nginx/sites-enabled').with( + :purge => true, + :recurse => true + )} + end + + context "when vhost_purge false" do + let(:params) {{:vhost_purge => false}} + it { should contain_file('/etc/nginx/sites-available').without([ + 'ignore', + 'purge', + 'recurse' + ])} + it { should contain_file('/etc/nginx/sites-enabled').without([ + 'ignore', + 'purge', + 'recurse' + ])} + end + end +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/nginx/spec/classes/nginx_spec.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/nginx/spec/classes/nginx_spec.rb new file mode 100644 index 00000000000..edebfbcdc15 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/nginx/spec/classes/nginx_spec.rb @@ -0,0 +1,61 @@ +require 'spec_helper' + +describe 'nginx' do + let :params do + { + :nginx_upstreams => { 'upstream1' => { 'members' => ['localhost:3000']} }, + :nginx_vhosts => { 'test2.local' => { 'www_root' => '/' } }, + :nginx_locations => { 'test2.local' => { 'vhost' => 'test2.local', 'www_root' => '/'} } + } + end + + shared_examples "a Linux OS" do + it { should compile.with_all_deps } + it { should contain_class('nginx') } + it { should contain_anchor('nginx::begin') } + it { should contain_nginx__package.that_requires('Anchor[nginx::begin]') } + it { should contain_nginx__config.that_requires('Class[nginx::package]') } + it { should contain_nginx__service.that_subscribes_to('Anchor[nginx::begin]') } + it { should contain_nginx__service.that_subscribes_to('Class[nginx::package]') } + it { should contain_nginx__service.that_subscribes_to('Class[nginx::config]') } + it { should contain_anchor('nginx::end').that_requires('Class[nginx::service]') } + it { should contain_class("nginx::params") } + it { should contain_nginx__resource__upstream("upstream1") } + it { should contain_nginx__resource__vhost("test2.local") } + it { should contain_nginx__resource__location("test2.local") } + end + + context "Debian OS" do + it_behaves_like "a Linux OS" do + let :facts do + { + :operatingsystem => 'Debian', + :osfamily => 'Debian', + :lsbdistcodename => 'precise', + } + end + end + end + + context "RedHat OS" do + it_behaves_like "a Linux OS" do + let :facts do + { + :operatingsystem => 'RedHat', + :osfamily => 'RedHat', + } + end + end + end + + context "Suse OS" do + it_behaves_like "a Linux OS" do + let :facts do + { + :operatingsystem => 'SuSE', + :osfamily => 'Suse', + } + end + end + end +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/nginx/spec/classes/package_spec.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/nginx/spec/classes/package_spec.rb new file mode 100644 index 00000000000..0ff2ec6cec0 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/nginx/spec/classes/package_spec.rb @@ -0,0 +1,163 @@ +require 'spec_helper' + +describe 'nginx::package' do + + shared_examples 'redhat' do |operatingsystem| + let(:facts) {{ :operatingsystem => operatingsystem, :osfamily => 'RedHat' }} + + context "using defaults" do + it { should contain_package('nginx') } + it { should contain_yumrepo('nginx-release').with( + 'baseurl' => 'http://nginx.org/packages/rhel/6/$basearch/', + 'descr' => 'nginx repo', + 'enabled' => '1', + 'gpgcheck' => '1', + 'priority' => '1', + 'gpgkey' => 'http://nginx.org/keys/nginx_signing.key' + )} + it { should contain_file('/etc/yum.repos.d/nginx-release.repo') } + it { should contain_anchor('nginx::package::begin').that_comes_before('Class[nginx::package::redhat]') } + it { should contain_anchor('nginx::package::end').that_requires('Class[nginx::package::redhat]') } + end + + context "manage_repo => false" do + let(:params) {{ :manage_repo => false }} + it { should contain_package('nginx') } + it { should_not contain_yumrepo('nginx-release') } + it { should_not contain_file('/etc/yum.repos.d/nginx-release.repo') } + end + + context "lsbmajdistrelease = 5" do + let(:facts) {{ :operatingsystem => operatingsystem, :osfamily => 'RedHat', :lsbmajdistrelease => 5 }} + it { should contain_package('nginx') } + it { should contain_yumrepo('nginx-release').with( + 'baseurl' => 'http://nginx.org/packages/rhel/5/$basearch/' + )} + it { should contain_file('/etc/yum.repos.d/nginx-release.repo') } + end + + describe 'installs the requested package version' do + let(:facts) {{ :operatingsystem => 'redhat', :osfamily => 'redhat' }} + let(:params) {{ :package_ensure => '3.0.0' }} + + it 'installs 3.0.0 exactly' do + should contain_package('nginx').with({ + 'ensure' => '3.0.0' + }) + end + end + end + + shared_examples 'debian' do |operatingsystem, lsbdistcodename| + let(:facts) {{ :operatingsystem => operatingsystem, :osfamily => 'Debian', :lsbdistcodename => lsbdistcodename }} + + context "using defaults" do + it { should contain_package('nginx') } + it { should_not contain_package('passenger') } + it { should contain_apt__source('nginx').with( + 'location' => "http://nginx.org/packages/#{operatingsystem}", + 'repos' => 'nginx', + 'key' => '7BD9BF62', + 'key_source' => 'http://nginx.org/keys/nginx_signing.key' + )} + it { should contain_anchor('nginx::package::begin').that_comes_before('Class[nginx::package::debian]') } + it { should contain_anchor('nginx::package::end').that_requires('Class[nginx::package::debian]') } + end + + context "package_source => 'passenger'" do + let(:params) {{ :package_source => 'passenger' }} + it { should contain_package('nginx') } + it { should contain_package('passenger') } + it { should contain_apt__source('nginx').with( + 'location' => 'https://oss-binaries.phusionpassenger.com/apt/passenger', + 'repos' => "main", + 'key' => '561F9B9CAC40B2F7', + 'key_source' => 'https://oss-binaries.phusionpassenger.com/auto-software-signing-gpg-key.txt' + )} + end + + context "manage_repo => false" do + let(:params) {{ :manage_repo => false }} + it { should contain_package('nginx') } + it { should_not contain_apt__source('nginx') } + it { should_not contain_package('passenger') } + end + end + + shared_examples 'suse' do |operatingsystem| + let(:facts) {{ :operatingsystem => operatingsystem, :osfamily => 'Suse'}} + [ + 'nginx-0.8', + 'apache2', + 'apache2-itk', + 'apache2-utils', + 'gd', + 'libapr1', + 'libapr-util1', + 'libjpeg62', + 'libpng14-14', + 'libxslt', + 'rubygem-daemon_controller', + 'rubygem-fastthread', + 'rubygem-file-tail', + 'rubygem-passenger', + 'rubygem-passenger-nginx', + 'rubygem-rack', + 'rubygem-rake', + 'rubygem-spruz', + ].each do |package| + it { should contain_package("#{package}") } + end + it { should contain_anchor('nginx::package::begin').that_comes_before('Class[nginx::package::suse]') } + it { should contain_anchor('nginx::package::end').that_requires('Class[nginx::package::suse]') } + end + + + context 'redhat' do + it_behaves_like 'redhat', 'centos' + it_behaves_like 'redhat', 'rhel' + it_behaves_like 'redhat', 'redhat' + it_behaves_like 'redhat', 'scientific' + it_behaves_like 'redhat', 'amazon' + end + + context 'debian' do + it_behaves_like 'debian', 'debian', 'wheezy' + it_behaves_like 'debian', 'ubuntu', 'precise' + end + + context 'suse' do + it_behaves_like 'suse', 'opensuse' + it_behaves_like 'suse', 'suse' + end + + context 'amazon with facter < 1.7.2' do + let(:facts) {{ :operatingsystem => 'Amazon', :osfamily => 'Linux' }} + it { should contain_package('nginx') } + it { should contain_yumrepo('nginx-release').with( + 'baseurl' => 'http://nginx.org/packages/rhel/6/$basearch/', + 'descr' => 'nginx repo', + 'enabled' => '1', + 'gpgcheck' => '1', + 'priority' => '1', + 'gpgkey' => 'http://nginx.org/keys/nginx_signing.key' + )} + it { should contain_file('/etc/yum.repos.d/nginx-release.repo') } + it { should contain_anchor('nginx::package::begin').that_comes_before('Class[nginx::package::redhat]') } + it { should contain_anchor('nginx::package::end').that_requires('Class[nginx::package::redhat]') } + end + + context 'fedora' do + # fedora is identical to the rest of osfamily RedHat except for not + # including nginx-release + let(:facts) {{ :operatingsystem => 'Fedora', :osfamily => 'RedHat', :lsbmajdistrelease => 6 }} + it { should contain_package('nginx') } + it { should_not contain_yumrepo('nginx-release') } + it { should_not contain_file('/etc/yum.repos.d/nginx-release.repo') } + end + + context 'other' do + let(:facts) {{ :operatingsystem => 'xxx', :osfamily => 'linux' }} + it { expect { subject }.to raise_error(Puppet::Error, /Module nginx is not supported on xxx/) } + end +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/nginx/spec/classes/params_spec.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/nginx/spec/classes/params_spec.rb new file mode 100644 index 00000000000..a813b3a10c8 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/nginx/spec/classes/params_spec.rb @@ -0,0 +1,15 @@ +require 'spec_helper' + +describe 'nginx::params' do + context "On a Debian OS" do + let :facts do { + :osfamily => 'debian', + :operatingsystem => 'debian', + } end + + it { should contain_nginx__params } + it { should have_class_count(1) } #only nginx::params itself + it { should have_resource_count(0) } #params class should never declare resources + + end +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/nginx/spec/classes/service_spec.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/nginx/spec/classes/service_spec.rb new file mode 100644 index 00000000000..300316e5d83 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/nginx/spec/classes/service_spec.rb @@ -0,0 +1,38 @@ +require 'spec_helper' +describe 'nginx::service' do + + let :facts do { + :osfamily => 'Debian', + :operatingsystem => 'debian', + } end + + let :params do { + :configtest_enable => false, + :service_restart => '/etc/init.d/nginx configtest && /etc/init.d/nginx restart', + :service_ensure => 'running', + } end + + context "using default parameters" do + + it { should contain_service('nginx').with( + :ensure => 'running', + :enable => true, + :hasstatus => true, + :hasrestart => true + )} + + it { should contain_service('nginx').without_restart } + + end + + describe "when configtest_enable => true" do + let(:params) {{ :configtest_enable => true, :service_restart => '/etc/init.d/nginx configtest && /etc/init.d/nginx restart'}} + it { should contain_service('nginx').with_restart('/etc/init.d/nginx configtest && /etc/init.d/nginx restart') } + + context "when service_restart => 'a restart command'" do + let(:params) {{ :configtest_enable => true, :service_restart => 'a restart command' }} + it { should contain_service('nginx').with_restart('a restart command') } + end + end + +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/nginx/spec/defines/resource_location_spec.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/nginx/spec/defines/resource_location_spec.rb new file mode 100644 index 00000000000..23cc8acf34f --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/nginx/spec/defines/resource_location_spec.rb @@ -0,0 +1,621 @@ +require 'spec_helper' + +describe 'nginx::resource::location' do + let :title do + 'rspec-test' + end + let :facts do + { + :osfamily => 'Debian', + :operatingsystem => 'debian', + } + end + let :pre_condition do + [ + 'include ::nginx::params', + 'include ::nginx::config', + ] + end + + describe 'os-independent items' do + + describe 'basic assumptions' do + let :params do { + :www_root => "/var/www/rspec", + :vhost => 'vhost1', + } end + + it { should contain_class("nginx::params") } + it { should contain_class("nginx::config") } + it { should contain_concat__fragment("vhost1-500-rspec-test").with_content(/location rspec-test/) } + it { should_not contain_file('/etc/nginx/fastcgi_params') } + it { should_not contain_concat__fragment("vhost1-800-rspec-test-ssl") } + it { should_not contain_file("/etc/nginx/rspec-test_htpasswd") } + end + + describe "vhost_location_proxy template content" do + [ + { + :title => 'should set the location', + :attr => 'location', + :value => 'my_location', + :match => ' location my_location {', + }, + { + :title => 'should contain ordered prepended directives', + :attr => 'location_cfg_prepend', + :value => { 'test1' => 'test value 1', 'test2' => ['test value 2a', 'test value 2b'], 'allow' => 'test value 3', + 'test4' => { 'subtest1' => ['"sub test value1a"', '"sub test value1b"'], + 'subtest2' => '"sub test value2"' } }, + :match => [ + ' allow test value 3;', + ' test1 test value 1;', + ' test2 test value 2a;', + ' test2 test value 2b;', + ' test4 subtest1 "sub test value1a";', + ' test4 subtest1 "sub test value1b";', + ' test4 subtest2 "sub test value2";', + ], + }, + { + :title => 'should set proxy_cache', + :attr => 'proxy_cache', + :value => 'value', + :match => ' proxy_cache value;', + }, + { + :title => 'should not set proxy_cache', + :attr => 'proxy_cache', + :value => false, + :notmatch => /proxy_cache/ + }, + { + :title => 'should set proxy_method', + :attr => 'proxy_method', + :value => 'value', + :match => ' proxy_method value;', + }, + { + :title => 'should set proxy_set_body', + :attr => 'proxy_set_body', + :value => 'value', + :match => ' proxy_set_body value;', + }, + { + :title => 'should set proxy_pass', + :attr => 'proxy', + :value => 'value', + :match => ' proxy_pass value;', + }, + { + :title => 'should set proxy_read_timeout', + :attr => 'proxy_read_timeout', + :value => 'value', + :match => ' proxy_read_timeout value;', + }, + { + :title => 'should contain ordered appended directives', + :attr => 'location_cfg_append', + :value => { 'test1' => ['test value 1a', 'test value 1b'], 'test2' => 'test value 2', 'allow' => 'test value 3', + 'test4' => { 'subtest1' => ['"sub test value1a"', '"sub test value1b"'], + 'subtest2' => '"sub test value2"' } }, + :match => [ + ' allow test value 3;', + ' test1 test value 1a;', + ' test1 test value 1b;', + ' test2 test value 2;', + ' test4 subtest1 "sub test value1a";', + ' test4 subtest1 "sub test value1b";', + ' test4 subtest2 "sub test value2";', + ], + }, + { + :title => 'should contain rewrite rules', + :attr => 'rewrite_rules', + :value => [ + '^(/download/.*)/media/(.*)\..*$ $1/mp3/$2.mp3 last', + '^(/download/.*)/audio/(.*)\..*$ $1/mp3/$2.ra last', + '^/users/(.*)$ /show?user=$1? last', + ], + :match => [ + ' rewrite ^(/download/.*)/media/(.*)\..*$ $1/mp3/$2.mp3 last;', + ' rewrite ^(/download/.*)/audio/(.*)\..*$ $1/mp3/$2.ra last;', + ' rewrite ^/users/(.*)$ /show?user=$1? last;', + ], + }, + { + :title => 'should not set rewrite_rules', + :attr => 'rewrite_rules', + :value => [], + :notmatch => /rewrite/ + }, + ].each do |param| + context "when #{param[:attr]} is #{param[:value]}" do + let :default_params do { :location => 'location', :proxy => 'proxy_value', :vhost => 'vhost1' } end + let :params do default_params.merge({ param[:attr].to_sym => param[:value] }) end + + it { should contain_concat__fragment("vhost1-500-#{params[:location]}") } + it param[:title] do + lines = subject.resource('concat::fragment', "vhost1-500-#{params[:location]}").send(:parameters)[:content].split("\n") + (lines & Array(param[:match])).should == Array(param[:match]) + Array(param[:notmatch]).each do |item| + should contain_concat__fragment("vhost1-500-#{params[:location]}").without_content(item) + end + end + end + end + + context "when proxy_cache_valid is 10m" do + let :params do { + :location => 'location', + :proxy => 'proxy_value', + :vhost => 'vhost1', + :proxy_cache => 'true', + :proxy_cache_valid => '10m', + } end + + it { should contain_concat__fragment("vhost1-500-location").with_content(/proxy_cache_valid 10m;/) } + end + end + + describe "vhost_location_alias template content" do + [ + { + :title => 'should set the location', + :attr => 'location', + :value => 'my_location', + :match => ' location my_location {', + }, + { + :title => 'should contain ordered prepended directives', + :attr => 'location_cfg_prepend', + :value => { 'test1' => 'test value 1', 'test2' => ['test value 2a', 'test value 2b'], 'allow' => 'test value 3', + 'test4' => { 'subtest1' => ['"sub test value1a"', '"sub test value1b"'], + 'subtest2' => '"sub test value2"' } }, + :match => [ + ' allow test value 3;', + ' test1 test value 1;', + ' test2 test value 2a;', + ' test2 test value 2b;', + ' test4 subtest1 "sub test value1a";', + ' test4 subtest1 "sub test value1b";', + ' test4 subtest2 "sub test value2";', + ], + }, + { + :title => 'should set alias', + :attr => 'location_alias', + :value => 'value', + :match => ' alias value;', + }, + { + :title => 'should contain ordered appended directives', + :attr => 'location_cfg_append', + :value => { 'test1' => 'test value 1', 'test2' => ['test value 2a', 'test value 2b'], 'allow' => 'test value 3', + 'test4' => { 'subtest1' => ['"sub test value1a"', '"sub test value1b"'], + 'subtest2' => '"sub test value2"' } }, + :match => [ + ' allow test value 3;', + ' test1 test value 1;', + ' test2 test value 2a;', + ' test2 test value 2b;', + ' test4 subtest1 "sub test value1a";', + ' test4 subtest1 "sub test value1b";', + ' test4 subtest2 "sub test value2";', + ], + }, + ].each do |param| + context "when #{param[:attr]} is #{param[:value]}" do + let :default_params do { :location => 'location', :location_alias => 'location_alias_value', :vhost => 'vhost1' } end + let :params do default_params.merge({ param[:attr].to_sym => param[:value] }) end + + it { should contain_concat__fragment("vhost1-500-#{params[:location]}") } + it param[:title] do + lines = subject.resource('concat::fragment', "vhost1-500-#{params[:location]}").send(:parameters)[:content].split("\n") + (lines & Array(param[:match])).should == Array(param[:match]) + Array(param[:notmatch]).each do |item| + should contain_concat__fragment("vhost1-500-#{params[:location]}").without_content(item) + end + end + end + end + end + + describe "vhost_location_stub_status template content" do + [ + { + :title => 'should set the location', + :attr => 'location', + :value => 'my_location', + :match => ' location my_location {', + }, + { + :title => 'should contain ordered prepended directives', + :attr => 'location_cfg_prepend', + :value => { 'test1' => 'test value 1', 'test2' => ['test value 2a', 'test value 2b'], 'allow' => 'test value 3', + 'test4' => { 'subtest1' => ['"sub test value1a"', '"sub test value1b"'], + 'subtest2' => '"sub test value2"' } }, + :match => [ + ' allow test value 3;', + ' test1 test value 1;', + ' test2 test value 2a;', + ' test2 test value 2b;', + ' test4 subtest1 "sub test value1a";', + ' test4 subtest1 "sub test value1b";', + ' test4 subtest2 "sub test value2";', + ], + }, + { + :title => 'should contain ordered appended directives', + :attr => 'location_cfg_append', + :value => { 'test1' => 'test value 1', 'test2' => ['test value 2a', 'test value 2b'], 'allow' => 'test value 3', + 'test4' => { 'subtest1' => ['"sub test value1a"', '"sub test value1b"'], + 'subtest2' => '"sub test value2"' } }, + :match => [ + ' allow test value 3;', + ' test1 test value 1;', + ' test2 test value 2a;', + ' test2 test value 2b;', + ' test4 subtest1 "sub test value1a";', + ' test4 subtest1 "sub test value1b";', + ' test4 subtest2 "sub test value2";', + ], + }, + ].each do |param| + context "when #{param[:attr]} is #{param[:value]}" do + let :default_params do { :location => 'location', :stub_status => true, :vhost => 'vhost1' } end + let :params do default_params.merge({ param[:attr].to_sym => param[:value] }) end + + it { should contain_concat__fragment("vhost1-500-#{params[:location]}") } + it param[:title] do + lines = subject.resource('concat::fragment', "vhost1-500-#{params[:location]}").send(:parameters)[:content].split("\n") + (lines & Array(param[:match])).should == Array(param[:match]) + Array(param[:notmatch]).each do |item| + should contain_concat__fragment("vhost1-500-#{params[:location]}").without_content(item) + end + end + end + end + end + + describe "vhost_location_fastcgi template content" do + [ + { + :title => 'should set the location', + :attr => 'location', + :value => 'my_location', + :match => ' location my_location {', + }, + { + :title => 'should contain ordered prepended directives', + :attr => 'location_cfg_prepend', + :value => { 'test1' => 'test value 1', 'test2' => ['test value 2a', 'test value 2b'], 'allow' => 'test value 3', + 'test4' => { 'subtest1' => ['"sub test value1a"', '"sub test value1b"'], + 'subtest2' => '"sub test value2"' } }, + :match => [ + ' allow test value 3;', + ' test1 test value 1;', + ' test2 test value 2a;', + ' test2 test value 2b;', + ' test4 subtest1 "sub test value1a";', + ' test4 subtest1 "sub test value1b";', + ' test4 subtest2 "sub test value2";', + ], + }, + { + :title => 'should set www_root', + :attr => 'www_root', + :value => '/', + :match => ' root /;' + }, + { + :title => 'should set fastcgi_split_path', + :attr => 'fastcgi_split_path', + :value => 'value', + :match => ' fastcgi_split_path_info value;' + }, + { + :title => 'should set try_file(s)', + :attr => 'try_files', + :value => ['name1','name2'], + :match => ' try_files name1 name2;', + }, + { + :title => 'should set fastcgi_params', + :attr => 'fastcgi_params', + :value => 'value', + :match => ' include value;' + }, + { + :title => 'should set fastcgi_pass', + :attr => 'fastcgi', + :value => 'value', + :match => ' fastcgi_pass value;' + }, + { + :title => 'should set fastcgi_param', + :attr => 'fastcgi_script', + :value => 'value', + :match => ' fastcgi_param SCRIPT_FILENAME value;', + }, + { + :title => 'should contain ordered appended directives', + :attr => 'location_cfg_append', + :value => { 'test1' => 'test value 1', 'test2' => ['test value 2a', 'test value 2b'], 'allow' => 'test value 3', + 'test4' => { 'subtest1' => ['"sub test value1a"', '"sub test value1b"'], + 'subtest2' => '"sub test value2"' } }, + :match => [ + ' allow test value 3;', + ' test1 test value 1;', + ' test2 test value 2a;', + ' test2 test value 2b;', + ' test4 subtest1 "sub test value1a";', + ' test4 subtest1 "sub test value1b";', + ' test4 subtest2 "sub test value2";', + ], + }, + ].each do |param| + context "when #{param[:attr]} is #{param[:value]}" do + let :default_params do { :location => 'location', :fastcgi => 'localhost:9000', :vhost => 'vhost1' } end + let :params do default_params.merge({ param[:attr].to_sym => param[:value] }) end + + it { should contain_concat__fragment("vhost1-500-#{params[:location]}") } + it param[:title] do + lines = subject.resource('concat::fragment', "vhost1-500-#{params[:location]}").send(:parameters)[:content].split("\n") + (lines & Array(param[:match])).should == Array(param[:match]) + Array(param[:notmatch]).each do |item| + should contain_concat__fragment("vhost1-500-#{params[:location]}").without_content(/#{item}/) + end + end + end + end + end + + describe "vhost_location_directory template content" do + [ + { + :title => 'should set the location', + :attr => 'location', + :value => 'my_location', + :match => ' location my_location {', + }, + { + :title => 'should set the allow directive', + :attr => 'location_allow', + :value => ['rule1','rule2'], + :match => [' allow rule1;', ' allow rule2;'], + }, + { + :title => 'should set the deny directive', + :attr => 'location_deny', + :value => ['rule1','rule2'], + :match => [' deny rule1;', ' deny rule2;'], + }, + { + :title => 'should contain ordered prepended directives', + :attr => 'location_cfg_prepend', + :value => { 'test1' => 'test value 1', 'test2' => ['test value 2a', 'test value 2b'], 'allow' => 'test value 3', + 'test4' => { 'subtest1' => ['"sub test value1a"', '"sub test value1b"'], + 'subtest2' => '"sub test value2"' } }, + :match => [ + ' allow test value 3;', + ' test1 test value 1;', + ' test2 test value 2a;', + ' test2 test value 2b;', + ' test4 subtest1 "sub test value1a";', + ' test4 subtest1 "sub test value1b";', + ' test4 subtest2 "sub test value2";', + ], + }, + { + :title => 'should set www_root', + :attr => 'www_root', + :value => '/', + :match => ' root /;' + }, + { + :title => 'should set try_file(s)', + :attr => 'try_files', + :value => ['name1','name2'], + :match => ' try_files name1 name2;', + }, + { + :title => 'should set index_file(s)', + :attr => 'index_files', + :value => ['name1','name2'], + :match => ' index name1 name2;', + }, + { + :title => 'should set auth_basic', + :attr => 'auth_basic', + :value => 'value', + :match => ' auth_basic "value";', + }, + { + :title => 'should set auth_basic_user_file', + :attr => 'auth_basic_user_file', + :value => 'value', + :match => ' auth_basic_user_file value;', + }, + { + :title => 'should contain ordered appended directives', + :attr => 'location_cfg_append', + :value => { 'test1' => 'test value 1', 'test2' => ['test value 2a', 'test value 2b'], 'allow' => 'test value 3', + 'test4' => { 'subtest1' => ['"sub test value1a"', '"sub test value1b"'], + 'subtest2' => '"sub test value2"' } }, + :match => [ + ' allow test value 3;', + ' test1 test value 1;', + ' test2 test value 2a;', + ' test2 test value 2b;', + ' test4 subtest1 "sub test value1a";', + ' test4 subtest1 "sub test value1b";', + ' test4 subtest2 "sub test value2";', + ], + }, + { + :title => 'should contain rewrite rules', + :attr => 'rewrite_rules', + :value => [ + '^(/download/.*)/media/(.*)\..*$ $1/mp3/$2.mp3 last', + '^(/download/.*)/audio/(.*)\..*$ $1/mp3/$2.ra last', + '^/users/(.*)$ /show?user=$1? last', + ], + :match => [ + ' rewrite ^(/download/.*)/media/(.*)\..*$ $1/mp3/$2.mp3 last;', + ' rewrite ^(/download/.*)/audio/(.*)\..*$ $1/mp3/$2.ra last;', + ' rewrite ^/users/(.*)$ /show?user=$1? last;', + ], + }, + { + :title => 'should not set rewrite_rules', + :attr => 'rewrite_rules', + :value => [], + :notmatch => /rewrite/ + }, + ].each do |param| + context "when #{param[:attr]} is #{param[:value]}" do + let :default_params do { :location => 'location', :www_root => '/var/www/root', :vhost => 'vhost1' } end + let :params do default_params.merge({ param[:attr].to_sym => param[:value] }) end + + it { should contain_concat__fragment("vhost1-500-#{params[:location]}") } + it param[:title] do + lines = subject.resource('concat::fragment', "vhost1-500-#{params[:location]}").send(:parameters)[:content].split("\n") + (lines & Array(param[:match])).should == Array(param[:match]) + Array(param[:notmatch]).each do |item| + should contain_concat__fragment("vhost1-500-#{params[:location]}").without_content(item) + end + end + end + end + end + + describe "vhost_location_empty template content" do + [ + { + :title => 'should set the location', + :attr => 'location', + :value => 'my_location', + :match => ' location my_location {', + }, + { + :title => 'should contain ordered config directives', + :attr => 'location_custom_cfg', + :value => { 'test1' => ['test value 1a', 'test value 1b'], 'test2' => 'test value 2', 'allow' => 'test value 3', + 'test4' => { 'subtest1' => ['"sub test value1a"', '"sub test value1b"'], + 'subtest2' => '"sub test value2"' } }, + :match => [ + ' allow test value 3;', + ' test1 test value 1a;', + ' test1 test value 1b;', + ' test2 test value 2;', + ' test4 subtest1 "sub test value1a";', + ' test4 subtest1 "sub test value1b";', + ' test4 subtest2 "sub test value2";', + ], + }, + ].each do |param| + context "when #{param[:attr]} is #{param[:value]}" do + let :default_params do { :location => 'location', :location_custom_cfg => {'test1'=>'value1'}, :vhost => 'vhost1' } end + let :params do default_params.merge({ param[:attr].to_sym => param[:value] }) end + + it { should contain_concat__fragment("vhost1-500-#{params[:location]}") } + it param[:title] do + lines = subject.resource('concat::fragment', "vhost1-500-#{params[:location]}").send(:parameters)[:content].split("\n") + (lines & Array(param[:match])).should == Array(param[:match]) + Array(param[:notmatch]).each do |item| + should contain_concat__fragment("vhost1-500-#{params[:location]}").without_content(item) + end + end + end + end + end + + context 'attribute resources' do + context 'when fastcgi => "localhost:9000"' do + let :params do { :fastcgi => 'localhost:9000', :vhost => 'vhost1' } end + + it { should contain_file('/etc/nginx/fastcgi_params').with_mode('0770') } + end + + context 'when ssl_only => true' do + let :params do { :ssl_only => true, :vhost => 'vhost1', :www_root => '/', } end + it { should_not contain_concat__fragment("vhost1-500-rspec-test") } + end + + context 'when ssl_only => false' do + let :params do { :ssl_only => false, :vhost => 'vhost1', :www_root => '/', } end + + it { should contain_concat__fragment("vhost1-500-rspec-test") } + end + + context 'when ssl => true' do + let :params do { :ssl => true, :vhost => 'vhost1', :www_root => '/', } end + + it { should contain_concat__fragment("vhost1-800-rspec-test-ssl") } + end + + context 'when ssl => false' do + let :params do { :ssl => false, :vhost => 'vhost1', :www_root => '/', } end + + it { should_not contain_concat__fragment("vhost1-800-rspec-test-ssl") } + end + + context 'when auth_basic_user_file => true' do + let :params do { :auth_basic_user_file => '/path/to/file', :vhost => 'vhost1', :www_root => '/', } end + + it { should contain_file("/etc/nginx/rspec-test_htpasswd") } + end + + context 'when ensure => absent' do + let :params do { + :www_root => '/', + :vhost => 'vhost1', + :ensure => 'absent', + :ssl => true, + :auth_basic_user_file => '/path/to/file', + } end + + it { should contain_file("/etc/nginx/rspec-test_htpasswd").with_ensure('absent') } + end + + context "vhost missing" do + let :params do { + :www_root => '/', + } end + + it { expect { should contain_class('nginx::resource::location') }.to raise_error(Puppet::Error, /Cannot create a location reference without attaching to a virtual host/) } + end + + context "location type missing" do + let :params do { + :vhost => 'vhost1', + } end + + it { expect { should contain_class('nginx::resource::location') }.to raise_error(Puppet::Error, /Cannot create a location reference without a www_root, proxy, location_alias, fastcgi, stub_status, or location_custom_cfg defined/) } + end + + context "www_root and proxy are set" do + let :params do { + :vhost => 'vhost1', + :www_root => '/', + :proxy => 'http://localhost:8000/uri/', + } end + + it { expect { should contain_class('nginx::resource::location') }.to raise_error(Puppet::Error, /Cannot define both directory and proxy in a virtual host/) } + end + + context 'when vhost name is sanitized' do + let :title do 'www.rspec-location.com' end + let :params do { + :vhost => 'www rspec-vhost com', + :www_root => '/', + :ssl => true, + } end + + it { should contain_concat__fragment("www_rspec-vhost_com-500-www.rspec-location.com").with_target('/etc/nginx/sites-available/www_rspec-vhost_com.conf') } + it { should contain_concat__fragment("www_rspec-vhost_com-800-www.rspec-location.com-ssl").with_target('/etc/nginx/sites-available/www_rspec-vhost_com.conf') } + end + end + end +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/nginx/spec/defines/resource_mailhost_spec.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/nginx/spec/defines/resource_mailhost_spec.rb new file mode 100644 index 00000000000..e59adfdabb5 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/nginx/spec/defines/resource_mailhost_spec.rb @@ -0,0 +1,401 @@ +require 'spec_helper' + +describe 'nginx::resource::mailhost' do + let :title do + 'www.rspec.example.com' + end + let :facts do + { + :osfamily => 'debian', + :operatingsystem => 'debian', + :ipaddress6 => '::', + } + end + let :default_params do + { + :listen_port => 25, + :ipv6_enable => true, + } + end + let :pre_condition do + [ + 'include ::nginx::config', + ] + end + + describe 'os-independent items' do + + describe 'basic assumptions' do + let :params do default_params end + it { should contain_class("nginx::config") } + it { should contain_concat("/etc/nginx/conf.mail.d/#{title}.conf").with({ + 'owner' => 'root', + 'group' => 'root', + 'mode' => '0644', + })} + it { should contain_concat__fragment("#{title}-header") } + it { should_not contain_concat__fragment("#{title}-ssl") } + end + + describe "mailhost template content" do + [ + { + :title => 'should set the IPv4 listen IP', + :attr => 'listen_ip', + :value => '127.0.0.1', + :match => ' listen 127.0.0.1:25;', + }, + { + :title => 'should set the IPv4 listen port', + :attr => 'listen_port', + :value => 45, + :match => ' listen *:45;', + }, + { + :title => 'should set the IPv4 listen options', + :attr => 'listen_options', + :value => 'spdy default', + :match => ' listen *:25 spdy default;', + }, + { + :title => 'should enable IPv6', + :attr => 'ipv6_enable', + :value => true, + :match => ' listen [::]:80 default ipv6only=on;', + }, + { + :title => 'should not enable IPv6', + :attr => 'ipv6_enable', + :value => false, + :notmatch => / listen \[::\]:80 default ipv6only=on;/, + }, + { + :title => 'should set the IPv6 listen IP', + :attr => 'ipv6_listen_ip', + :value => '2001:0db8:85a3:0000:0000:8a2e:0370:7334', + :match => ' listen [2001:0db8:85a3:0000:0000:8a2e:0370:7334]:80 default ipv6only=on;', + }, + { + :title => 'should set the IPv6 listen port', + :attr => 'ipv6_listen_port', + :value => 45, + :match => ' listen [::]:45 default ipv6only=on;', + }, + { + :title => 'should set the IPv6 listen options', + :attr => 'ipv6_listen_options', + :value => 'spdy', + :match => ' listen [::]:80 spdy;', + }, + { + :title => 'should set servername(s)', + :attr => 'server_name', + :value => ['name1','name2'], + :match => ' server_name name1 name2;', + }, + { + :title => 'should set protocol', + :attr => 'protocol', + :value => 'test-protocol', + :match => ' protocol test-protocol;', + }, + { + :title => 'should set xclient', + :attr => 'xclient', + :value => 'test-xclient', + :match => ' xclient test-xclient;', + }, + { + :title => 'should set auth_http', + :attr => 'auth_http', + :value => 'test-auth_http', + :match => ' auth_http test-auth_http;', + }, + { + :title => 'should set starttls', + :attr => 'starttls', + :value => 'on', + :match => ' starttls on;', + }, + { + :title => 'should set starttls', + :attr => 'starttls', + :value => 'only', + :match => ' starttls only;', + }, + { + :title => 'should not enable SSL', + :attr => 'starttls', + :value => 'off', + :notmatch => / ssl_session_timeout 5m;/, + }, + ].each do |param| + context "when #{param[:attr]} is #{param[:value]}" do + let :default_params do { + :listen_port => 25, + :ipv6_enable => true, + :ssl_cert => 'dummy.crt', + :ssl_key => 'dummy.key', + } end + let :params do default_params.merge({ param[:attr].to_sym => param[:value] }) end + + it { should contain_concat__fragment("#{title}-header") } + it param[:title] do + lines = subject.resource('concat::fragment', "#{title}-header").send(:parameters)[:content].split("\n") + (lines & Array(param[:match])).should == Array(param[:match]) + Array(param[:notmatch]).each do |item| + should contain_concat__fragment("#{title}-header").without_content(item) + end + end + end + end + end + + describe "mailhost template content (SSL enabled)" do + [ + { + :title => 'should enable SSL', + :attr => 'starttls', + :value => 'on', + :match => ' ssl_session_timeout 5m;', + }, + { + :title => 'should enable SSL', + :attr => 'starttls', + :value => 'only', + :match => ' ssl_session_timeout 5m;', + }, + { + :title => 'should not enable SSL', + :attr => 'starttls', + :value => 'off', + :notmatch => / ssl_session_timeout 5m;/, + }, + { + :title => 'should set ssl_certificate', + :attr => 'ssl_cert', + :value => 'test-ssl-cert', + :match => ' ssl_certificate test-ssl-cert;', + }, + { + :title => 'should set ssl_certificate_key', + :attr => 'ssl_key', + :value => 'test-ssl-cert-key', + :match => ' ssl_certificate_key test-ssl-cert-key;', + }, + ].each do |param| + context "when #{param[:attr]} is #{param[:value]}" do + let :default_params do { + :listen_port => 25, + :starttls => 'on', + :ssl_cert => 'dummy.crt', + :ssl_key => 'dummy.key', + } end + let :params do default_params.merge({ param[:attr].to_sym => param[:value] }) end + + it { should contain_concat__fragment("#{title}-header") } + it param[:title] do + lines = subject.resource('concat::fragment', "#{title}-header").send(:parameters)[:content].split("\n") + (lines & Array(param[:match])).should == Array(param[:match]) + Array(param[:notmatch]).each do |item| + should contain_concat__fragment("#{title}-header").without_content(item) + end + end + end + end + end + + describe "mailhost_ssl template content" do + [ + { + :title => 'should set the IPv4 SSL listen port', + :attr => 'ssl_port', + :value => '45', + :match => ' listen 45;', + }, + { + :title => 'should enable IPv6', + :attr => 'ipv6_enable', + :value => true, + :match => ' listen [::]:80 default ipv6only=on;', + }, + { + :title => 'should not enable IPv6', + :attr => 'ipv6_enable', + :value => false, + :notmatch => / listen \[::\]:80 default ipv6only=on;/, + }, + { + :title => 'should set the IPv6 listen IP', + :attr => 'ipv6_listen_ip', + :value => '2001:0db8:85a3:0000:0000:8a2e:0370:7334', + :match => ' listen [2001:0db8:85a3:0000:0000:8a2e:0370:7334]:80 default ipv6only=on;', + }, + { + :title => 'should set the IPv6 listen port', + :attr => 'ipv6_listen_port', + :value => 45, + :match => ' listen [::]:45 default ipv6only=on;', + }, + { + :title => 'should set the IPv6 listen options', + :attr => 'ipv6_listen_options', + :value => 'spdy', + :match => ' listen [::]:80 spdy;', + }, + { + :title => 'should set servername(s)', + :attr => 'server_name', + :value => ['name1','name2'], + :match => ' server_name name1 name2;', + }, + { + :title => 'should set protocol', + :attr => 'protocol', + :value => 'test-protocol', + :match => ' protocol test-protocol;', + }, + { + :title => 'should set xclient', + :attr => 'xclient', + :value => 'test-xclient', + :match => ' xclient test-xclient;', + }, + { + :title => 'should set auth_http', + :attr => 'auth_http', + :value => 'test-auth_http', + :match => ' auth_http test-auth_http;', + }, + { + :title => 'should set ssl_certificate', + :attr => 'ssl_cert', + :value => 'test-ssl-cert', + :match => ' ssl_certificate test-ssl-cert;', + }, + { + :title => 'should set ssl_certificate_key', + :attr => 'ssl_key', + :value => 'test-ssl-cert-key', + :match => ' ssl_certificate_key test-ssl-cert-key;', + }, + ].each do |param| + context "when #{param[:attr]} is #{param[:value]}" do + let :default_params do { + :listen_port => 25, + :ipv6_enable => true, + :ssl => true, + :ssl_cert => 'dummy.crt', + :ssl_key => 'dummy.key', + } end + let :params do default_params.merge({ param[:attr].to_sym => param[:value] }) end + + it { should contain_concat__fragment("#{title}-ssl") } + it param[:title] do + lines = subject.resource('concat::fragment', "#{title}-ssl").send(:parameters)[:content].split("\n") + (lines & Array(param[:match])).should == Array(param[:match]) + Array(param[:notmatch]).each do |item| + should contain_concat__fragment("#{title}-ssl").without_content(item) + end + end + end + end + end + + context 'attribute resources' do + context "SSL cert missing and ssl => true" do + let :params do default_params.merge({ + :ssl => true, + :ssl_key => 'key', + }) end + + it { expect { should contain_class('nginx::resource::vhost') }.to raise_error(Puppet::Error, %r{nginx: SSL certificate/key \(ssl_cert/ssl_cert\) and/or SSL Private must be defined and exist on the target system\(s\)}) } + end + + context "SSL key missing and ssl => true" do + let :params do default_params.merge({ + :ssl => true, + :ssl_cert => 'cert', + }) end + + it { expect { should contain_class('nginx::resource::vhost') }.to raise_error(Puppet::Error, %r{nginx: SSL certificate/key \(ssl_cert/ssl_cert\) and/or SSL Private must be defined and exist on the target system\(s\)}) } + end + + context "SSL cert missing and starttls => 'on'" do + let :params do default_params.merge({ + :starttls => 'on', + :ssl_key => 'key', + }) end + + it { expect { should contain_class('nginx::resource::vhost') }.to raise_error(Puppet::Error, %r{nginx: SSL certificate/key \(ssl_cert/ssl_cert\) and/or SSL Private must be defined and exist on the target system\(s\)}) } + end + + context "SSL key missing and starttls => 'on'" do + let :params do default_params.merge({ + :starttls => 'on', + :ssl_cert => 'cert', + }) end + + it { expect { should contain_class('nginx::resource::vhost') }.to raise_error(Puppet::Error, %r{nginx: SSL certificate/key \(ssl_cert/ssl_cert\) and/or SSL Private must be defined and exist on the target system\(s\)}) } + end + + context "SSL cert missing and starttls => 'only'" do + let :params do default_params.merge({ + :starttls => 'only', + :ssl_key => 'key', + }) end + + it { expect { should contain_class('nginx::resource::vhost') }.to raise_error(Puppet::Error, %r{nginx: SSL certificate/key \(ssl_cert/ssl_cert\) and/or SSL Private must be defined and exist on the target system\(s\)}) } + end + + context "SSL key missing and starttls => 'only'" do + let :params do default_params.merge({ + :starttls => 'only', + :ssl_cert => 'cert', + }) end + + it { expect { should contain_class('nginx::resource::vhost') }.to raise_error(Puppet::Error, %r{nginx: SSL certificate/key \(ssl_cert/ssl_cert\) and/or SSL Private must be defined and exist on the target system\(s\)}) } + end + + context 'when listen_port != ssl_port' do + let :params do default_params.merge({ + :listen_port => 80, + :ssl_port => 443, + }) end + + it { should contain_concat__fragment("#{title}-header") } + end + + context 'when listen_port == ssl_port' do + let :params do default_params.merge({ + :listen_port => 80, + :ssl_port => 80, + }) end + + it { should_not contain_concat__fragment("#{title}-header") } + end + + context 'when ssl => true' do + let :params do default_params.merge({ + :ensure => 'absent', + :ssl => true, + :ssl_key => 'dummy.key', + :ssl_cert => 'dummy.cert', + }) end + + it { should contain_concat__fragment("#{title}-header") } + it { should contain_concat__fragment("#{title}-ssl") } + end + + context 'when ssl => false' do + let :params do default_params.merge({ + :ensure => 'absent', + :ssl => false, + }) end + + it { should contain_concat__fragment("#{title}-header") } + it { should_not contain_concat__fragment("#{title}-ssl") } + end + end + end +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/nginx/spec/defines/resource_upstream_spec.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/nginx/spec/defines/resource_upstream_spec.rb new file mode 100644 index 00000000000..8423eb43765 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/nginx/spec/defines/resource_upstream_spec.rb @@ -0,0 +1,93 @@ +require 'spec_helper' + +describe 'nginx::resource::upstream' do + let :title do + 'upstream-test' + end + + let :default_params do + { + :members => ['test'], + } + end + + describe 'os-independent items' do + + describe 'basic assumptions' do + let :params do default_params end + + it { should contain_file("/etc/nginx/conf.d/#{title}-upstream.conf").with( + { + 'owner' => 'root', + 'group' => 'root', + 'mode' => '0644', + 'ensure' => 'file', + 'content' => /upstream #{title}/, + } + )} + end + + describe "upstream.conf template content" do + [ + { + :title => 'should contain ordered prepended directives', + :attr => 'upstream_cfg_prepend', + :value => { + 'test3' => 'test value 3', + 'test1' => 'test value 1', + 'test2' => 'test value 2', + 'test4' => ['test value 1', 'test value 2'], + 'test5' => {'subkey1' => 'subvalue1'}, + 'test6' => {'subkey1' => ['subvalue1', 'subvalue2']}, + }, + :match => [ + ' test1 test value 1;', + ' test2 test value 2;', + ' test3 test value 3;', + ' test4 test value 1;', + ' test4 test value 2;', + ' test5 subkey1 subvalue1;', + ' test6 subkey1 subvalue1;', + ' test6 subkey1 subvalue2;', + ], + }, + { + :title => 'should set server', + :attr => 'members', + :value => [ + 'test3', + 'test1', + 'test2', + ], + :match => [ + ' server test3 fail_timeout=10s;', + ' server test1 fail_timeout=10s;', + ' server test2 fail_timeout=10s;', + ], + }, + ].each do |param| + context "when #{param[:attr]} is #{param[:value]}" do + let :params do default_params.merge({ param[:attr].to_sym => param[:value] }) end + + it { should contain_file("/etc/nginx/conf.d/#{title}-upstream.conf").with_mode('0644') } + it param[:title] do + verify_contents(subject, "/etc/nginx/conf.d/#{title}-upstream.conf", Array(param[:match])) + Array(param[:notmatch]).each do |item| + should contain_file("/etc/nginx/conf.d/#{title}-upstream.conf").without_content(item) + end + end + end + end + + context 'when ensure => absent' do + let :params do default_params.merge( + { + :ensure => 'absent' + } + ) end + + it { should contain_file("/etc/nginx/conf.d/#{title}-upstream.conf").with_ensure('absent') } + end + end + end +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/nginx/spec/defines/resource_vhost_spec.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/nginx/spec/defines/resource_vhost_spec.rb new file mode 100644 index 00000000000..9d4ef3d903b --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/nginx/spec/defines/resource_vhost_spec.rb @@ -0,0 +1,647 @@ +require 'spec_helper' + +describe 'nginx::resource::vhost' do + let :title do + 'www.rspec.example.com' + end + let :default_params do + { + :www_root => '/', + :ipv6_enable => true, + } + end + let :facts do + { + :osfamily => 'Debian', + :operatingsystem => 'debian', + :ipaddress6 => '::', + } + end + let :pre_condition do + [ + 'include ::nginx::params', + 'include ::nginx::config', + ] + end + + describe 'os-independent items' do + + describe 'basic assumptions' do + let :params do default_params end + it { should contain_class("nginx::params") } + it { should contain_class("nginx::config") } + it { should contain_concat("/etc/nginx/sites-available/#{title}.conf").with({ + 'owner' => 'root', + 'group' => 'root', + 'mode' => '0644', + })} + it { should contain_concat__fragment("#{title}-header").with_content(%r{access_log[ ]+/var/log/nginx/www\.rspec\.example\.com\.access\.log}) } + it { should contain_concat__fragment("#{title}-header").with_content(%r{error_log[ ]+/var/log/nginx/www\.rspec\.example\.com\.error\.log}) } + it { should contain_concat__fragment("#{title}-footer") } + it { should contain_nginx__resource__location("#{title}-default") } + it { should_not contain_file("/etc/nginx/fastcgi_params") } + it { should contain_file("#{title}.conf symlink").with({ + 'ensure' => 'link', + 'path' => "/etc/nginx/sites-enabled/#{title}.conf", + 'target' => "/etc/nginx/sites-available/#{title}.conf" + })} + end + + describe "vhost_header template content" do + [ + { + :title => 'should set the IPv4 listen IP', + :attr => 'listen_ip', + :value => '127.0.0.1', + :match => ' listen 127.0.0.1:80;', + }, + { + :title => 'should set the IPv4 listen port', + :attr => 'listen_port', + :value => 45, + :match => ' listen *:45;', + }, + { + :title => 'should set the IPv4 listen options', + :attr => 'listen_options', + :value => 'spdy default', + :match => ' listen *:80 spdy default;', + }, + { + :title => 'should enable IPv6', + :attr => 'ipv6_enable', + :value => true, + :match => ' listen [::]:80 default ipv6only=on;', + }, + { + :title => 'should not enable IPv6', + :attr => 'ipv6_enable', + :value => false, + :notmatch => / listen \[::\]:80 default ipv6only=on;/, + }, + { + :title => 'should set the IPv6 listen IP', + :attr => 'ipv6_listen_ip', + :value => '2001:0db8:85a3:0000:0000:8a2e:0370:7334', + :match => ' listen [2001:0db8:85a3:0000:0000:8a2e:0370:7334]:80 default ipv6only=on;', + }, + { + :title => 'should set the IPv6 listen port', + :attr => 'ipv6_listen_port', + :value => 45, + :match => ' listen [::]:45 default ipv6only=on;', + }, + { + :title => 'should set the IPv6 listen options', + :attr => 'ipv6_listen_options', + :value => 'spdy', + :match => ' listen [::]:80 spdy;', + }, + { + :title => 'should set servername(s)', + :attr => 'server_name', + :value => ['name1','name2'], + :match => ' server_name name1 name2;', + }, + { + :title => 'should rewrite www servername to non-www', + :attr => 'rewrite_www_to_non_www', + :value => true, + :match => ' server_name rspec.example.com;', + }, + { + :title => 'should not rewrite www servername to non-www', + :attr => 'rewrite_www_to_non_www', + :value => false, + :match => ' server_name www.rspec.example.com;', + }, + { + :title => 'should set auth_basic', + :attr => 'auth_basic', + :value => 'value', + :match => ' auth_basic "value";', + }, + { + :title => 'should set auth_basic_user_file', + :attr => 'auth_basic_user_file', + :value => 'value', + :match => ' auth_basic_user_file value;', + }, + { + :title => 'should contain ordered prepended directives', + :attr => 'vhost_cfg_prepend', + :value => { 'test1' => ['test value 1a', 'test value 1b'], 'test2' => 'test value 2', 'allow' => 'test value 3' }, + :match => [ + ' allow test value 3;', + ' test1 test value 1a;', + ' test1 test value 1b;', + ' test2 test value 2;', + ], + }, + { + :title => 'should set root', + :attr => 'use_default_location', + :value => false, + :match => ' root /;', + }, + { + :title => 'should not set root', + :attr => 'use_default_location', + :value => true, + :notmatch => / root \/;/, + }, + { + :title => 'should set proxy_set_header', + :attr => 'proxy_set_header', + :value => ['header1','header2'], + :match => [ + ' proxy_set_header header1;', + ' proxy_set_header header2;', + ], + }, + { + :title => 'should rewrite to HTTPS', + :attr => 'rewrite_to_https', + :value => true, + :match => [ + ' if ($ssl_protocol = "") {', + ' return 301 https://$host$request_uri;', + ], + }, + { + :title => 'should not rewrite to HTTPS', + :attr => 'rewrite_to_https', + :value => false, + :notmatch => [ + /if \(\$ssl_protocol = ""\) \{/, + / return 301 https:\/\/\$host\$request_uri;/, + ], + }, + { + :title => 'should set access_log', + :attr => 'access_log', + :value => '/path/to/access.log', + :match => ' access_log /path/to/access.log;', + }, + { + :title => 'should set error_log', + :attr => 'error_log', + :value => '/path/to/error.log', + :match => ' error_log /path/to/error.log;', + }, + ].each do |param| + context "when #{param[:attr]} is #{param[:value]}" do + let :params do default_params.merge({ param[:attr].to_sym => param[:value] }) end + + it { should contain_concat__fragment("#{title}-header") } + it param[:title] do + lines = subject.resource('concat::fragment', "#{title}-header").send(:parameters)[:content].split("\n") + (lines & Array(param[:match])).should == Array(param[:match]) + Array(param[:notmatch]).each do |item| + should contain_concat__fragment("#{title}-header").without_content(item) + end + end + end + end + end + + describe "vhost_footer template content" do + [ + { + :title => 'should contain include directives', + :attr => 'include_files', + :value => [ '/file1', '/file2' ], + :match => [ + 'include /file1;', + 'include /file2;', + ], + }, + { + :title => 'should contain ordered appended directives', + :attr => 'vhost_cfg_append', + :value => { 'test1' => 'test value 1', 'test2' => ['test value 2a', 'test value 2b'], 'allow' => 'test value 3' }, + :match => [ + ' allow test value 3;', + ' test1 test value 1;', + ' test2 test value 2a;', + ' test2 test value 2b;', + ], + }, + { + :title => 'should contain www to non-www rewrite', + :attr => 'rewrite_www_to_non_www', + :value => true, + :match => [ + ' listen *:80;', + ' server_name www.rspec.example.com;', + ' rewrite ^ http://rspec.example.com$uri permanent;', + ], + }, + { + :title => 'should not contain www to non-www rewrite', + :attr => 'rewrite_www_to_non_www', + :value => false, + :notmatch => [ + / listen \*:80;/, + / server_name www\.rspec\.example\.com;/, + / rewrite \^ http:\/\/rspec\.example\.com\$uri permanent;/, + ], + }, + ].each do |param| + context "when #{param[:attr]} is #{param[:value]}" do + let :params do default_params.merge({ param[:attr].to_sym => param[:value] }) end + + it { should contain_concat__fragment("#{title}-footer") } + it param[:title] do + lines = subject.resource('concat::fragment', "#{title}-footer").send(:parameters)[:content].split("\n") + (lines & Array(param[:match])).should == Array(param[:match]) + Array(param[:notmatch]).each do |item| + should contain_concat__fragment("#{title}-footer").without_content(item) + end + end + end + end + end + + describe "vhost_ssl_header template content" do + [ + { + :title => 'should set the IPv4 listen IP', + :attr => 'listen_ip', + :value => '127.0.0.1', + :match => ' listen 127.0.0.1:443 ssl;', + }, + { + :title => 'should set the IPv4 SSL listen port', + :attr => 'ssl_port', + :value => 45, + :match => ' listen *:45 ssl;', + }, + { + :title => 'should set SPDY', + :attr => 'spdy', + :value => 'on', + :match => ' listen *:443 ssl spdy;', + }, + { + :title => 'should not set SPDY', + :attr => 'spdy', + :value => 'off', + :match => ' listen *:443 ssl;', + }, + { + :title => 'should set the IPv4 listen options', + :attr => 'listen_options', + :value => 'default', + :match => ' listen *:443 ssl default;', + }, + { + :title => 'should enable IPv6', + :attr => 'ipv6_enable', + :value => true, + :match => ' listen [::]:443 ssl default ipv6only=on;', + }, + { + :title => 'should disable IPv6', + :attr => 'ipv6_enable', + :value => false, + :notmatch => / listen \[::\]:443 ssl default ipv6only=on;/, + }, + { + :title => 'should set the IPv6 listen IP', + :attr => 'ipv6_listen_ip', + :value => '2001:0db8:85a3:0000:0000:8a2e:0370:7334', + :match => ' listen [2001:0db8:85a3:0000:0000:8a2e:0370:7334]:443 ssl default ipv6only=on;', + }, + { + :title => 'should set the IPv6 listen port', + :attr => 'ssl_port', + :value => 45, + :match => ' listen [::]:45 ssl default ipv6only=on;', + }, + { + :title => 'should set the IPv6 listen options', + :attr => 'ipv6_listen_options', + :value => 'spdy default', + :match => ' listen [::]:443 ssl spdy default;', + }, + { + :title => 'should set servername(s)', + :attr => 'server_name', + :value => ['name1','name2'], + :match => ' server_name name1 name2;', + }, + { + :title => 'should rewrite www servername to non-www', + :attr => 'rewrite_www_to_non_www', + :value => true, + :match => ' server_name rspec.example.com;', + }, + { + :title => 'should not rewrite www servername to non-www', + :attr => 'rewrite_www_to_non_www', + :value => false, + :match => ' server_name www.rspec.example.com;', + }, + { + :title => 'should set the SSL cache', + :attr => 'ssl_cache', + :value => 'shared:SSL:1m', + :match => ' ssl_session_cache shared:SSL:1m;', + }, + { + :title => 'should set the SSL protocols', + :attr => 'ssl_protocols', + :value => 'SSLv3', + :match => ' ssl_protocols SSLv3;', + }, + { + :title => 'should set the SSL ciphers', + :attr => 'ssl_ciphers', + :value => 'HIGH', + :match => ' ssl_ciphers HIGH;', + }, + { + :title => 'should set auth_basic', + :attr => 'auth_basic', + :value => 'value', + :match => ' auth_basic "value";', + }, + { + :title => 'should set auth_basic_user_file', + :attr => 'auth_basic_user_file', + :value => 'value', + :match => ' auth_basic_user_file "value";', + }, + { + :title => 'should set access_log', + :attr => 'access_log', + :value => '/path/to/access.log', + :match => ' access_log /path/to/access.log;', + }, + { + :title => 'should set error_log', + :attr => 'error_log', + :value => '/path/to/error.log', + :match => ' error_log /path/to/error.log;', + }, + { + :title => 'should contain ordered prepend directives', + :attr => 'vhost_cfg_prepend', + :value => { 'test1' => 'test value 1', 'test2' => ['test value 2a', 'test value 2b'], 'allow' => 'test value 3' }, + :match => [ + ' allow test value 3;', + ' test1 test value 1;', + ' test2 test value 2a;', + ' test2 test value 2b;', + ] + }, + { + :title => 'should contain ordered ssl prepend directives', + :attr => 'vhost_cfg_ssl_prepend', + :value => { 'test1' => 'test value 1', 'test2' => ['test value 2a', 'test value 2b'], 'allow' => 'test value 3' }, + :match => [ + ' allow test value 3;', + ' test1 test value 1;', + ' test2 test value 2a;', + ' test2 test value 2b;', + ] + }, + { + :title => 'should set root', + :attr => 'use_default_location', + :value => false, + :match => ' root /;', + }, + { + :title => 'should not set root', + :attr => 'use_default_location', + :value => true, + :notmatch => / root \/;/, + }, + ].each do |param| + context "when #{param[:attr]} is #{param[:value]}" do + let :params do default_params.merge({ + param[:attr].to_sym => param[:value], + :ssl => true, + :ssl_key => 'dummy.key', + :ssl_cert => 'dummy.crt', + }) end + it { should contain_concat__fragment("#{title}-ssl-header") } + it param[:title] do + lines = subject.resource('concat::fragment', "#{title}-ssl-header").send(:parameters)[:content].split("\n") + (lines & Array(param[:match])).should == Array(param[:match]) + Array(param[:notmatch]).each do |item| + should contain_concat__fragment("#{title}-ssl-header").without_content(item) + end + end + end + end + end + + describe "vhost_ssl_footer template content" do + [ + { + :title => 'should contain include directives', + :attr => 'include_files', + :value => [ '/file1', '/file2' ], + :match => [ + 'include /file1;', + 'include /file2;', + ], + }, + { + :title => 'should contain ordered appended directives', + :attr => 'vhost_cfg_append', + :value => { 'test1' => 'test value 1', 'test2' => 'test value 2', 'allow' => 'test value 3' }, + :match => [ + ' allow test value 3;', + ' test1 test value 1;', + ' test2 test value 2;', + ] + }, + { + :title => 'should contain ordered ssl appended directives', + :attr => 'vhost_cfg_ssl_append', + :value => { 'test1' => 'test value 1', 'test2' => ['test value 2a', 'test value 2b'], 'allow' => 'test value 3' }, + :match => [ + ' allow test value 3;', + ' test1 test value 1;', + ' test2 test value 2a;', + ' test2 test value 2b;', + ] + }, + { + :title => 'should contain www to non-www rewrite', + :attr => 'rewrite_www_to_non_www', + :value => true, + :match => [ + ' listen *:443 ssl;', + ' server_name www.rspec.example.com;', + ' rewrite ^ https://rspec.example.com$uri permanent;', + ], + }, + { + :title => 'should not contain www to non-www rewrite', + :attr => 'rewrite_www_to_non_www', + :value => false, + :notmatch => [ + / listen \*:443 ssl;/, + / server_name www\.rspec\.example\.com;/, + / rewrite \^ https:\/\/rspec\.example\.com\$uri permanent;/, + ], + }, + ].each do |param| + context "when #{param[:attr]} is #{param[:value]}" do + let :params do default_params.merge({ + param[:attr].to_sym => param[:value], + :ssl => true, + :ssl_key => 'dummy.key', + :ssl_cert => 'dummy.crt', + }) end + + it { should contain_concat__fragment("#{title}-ssl-footer") } + it param[:title] do + lines = subject.resource('concat::fragment', "#{title}-ssl-footer").send(:parameters)[:content].split("\n") + (lines & Array(param[:match])).should == Array(param[:match]) + Array(param[:notmatch]).each do |item| + should contain_concat__fragment("#{title}-ssl-footer").without_content(item) + end + end + end + end + end + context 'attribute resources' do + context "SSL cert missing" do + let(:params) {{ :ssl => true, :ssl_key => 'key' }} + + it { expect { should contain_class('nginx::resource::vhost') }.to raise_error(Puppet::Error, %r{nginx: SSL certificate/key \(ssl_cert/ssl_cert\) and/or SSL Private must be defined and exist on the target system\(s\)}) } + end + + context "SSL key missing" do + let(:params) {{ :ssl => true, :ssl_cert => 'cert' }} + + it { expect { should contain_class('nginx::resource::vhost') }.to raise_error(Puppet::Error, %r{nginx: SSL certificate/key \(ssl_cert/ssl_cert\) and/or SSL Private must be defined and exist on the target system\(s\)}) } + end + + context 'when use_default_location => true' do + let :params do default_params.merge({ + :use_default_location => true, + }) end + + it { should contain_nginx__resource__location("#{title}-default") } + end + + context 'when use_default_location => false' do + let :params do default_params.merge({ + :use_default_location => false, + }) end + + it { should_not contain_nginx__resource__location("#{title}-default") } + end + + context 'when location_cfg_prepend => { key => value }' do + let :params do default_params.merge({ + :location_cfg_prepend => { 'key' => 'value' }, + }) end + + it { should contain_nginx__resource__location("#{title}-default").with_location_cfg_prepend({ 'key' => 'value' }) } + end + + context 'when location_cfg_append => { key => value }' do + let :params do default_params.merge({ + :location_cfg_append => { 'key' => 'value' }, + }) end + + it { should contain_nginx__resource__location("#{title}-default").with_location_cfg_append({ 'key' => 'value' }) } + end + + context 'when fastcgi => "localhost:9000"' do + let :params do default_params.merge({ + :fastcgi => 'localhost:9000', + }) end + + it { should contain_file('/etc/nginx/fastcgi_params').with_mode('0770') } + end + + context 'when listen_port == ssl_port' do + let :params do default_params.merge({ + :listen_port => 80, + :ssl_port => 80, + }) end + + it { should_not contain_concat__fragment("#{title}-header") } + it { should_not contain_concat__fragment("#{title}-footer") } + end + + context 'when listen_port != ssl_port' do + let :params do default_params.merge({ + :listen_port => 80, + :ssl_port => 443, + }) end + + it { should contain_concat__fragment("#{title}-header") } + it { should contain_concat__fragment("#{title}-footer") } + end + + context 'when ensure => absent' do + let :params do default_params.merge({ + :ensure => 'absent', + :ssl => true, + :ssl_key => 'dummy.key', + :ssl_cert => 'dummy.cert', + }) end + + it { should contain_nginx__resource__location("#{title}-default").with_ensure('absent') } + it { should contain_file("#{title}.conf symlink").with_ensure('absent') } + end + + context 'when ssl => true and ssl_port == listen_port' do + let :params do default_params.merge({ + :ssl => true, + :listen_port => 80, + :ssl_port => 80, + :ssl_key => 'dummy.key', + :ssl_cert => 'dummy.cert', + }) end + + it { should contain_nginx__resource__location("#{title}-default").with_ssl_only(true) } + it { should contain_concat__fragment("#{title}-ssl-header").with_content(%r{access_log[ ]+/var/log/nginx/ssl-www\.rspec\.example\.com\.access\.log}) } + it { should contain_concat__fragment("#{title}-ssl-header").with_content(%r{error_log[ ]+/var/log/nginx/ssl-www\.rspec\.example\.com\.error\.log}) } + it { should contain_concat__fragment("#{title}-ssl-footer") } + it { should contain_file("/etc/nginx/#{title}.crt") } + it { should contain_file("/etc/nginx/#{title}.key") } + end + + context 'when passenger_cgi_param is set' do + let :params do default_params.merge({ + :passenger_cgi_param => { 'test1' => 'test value 1', 'test2' => 'test value 2', 'test3' => 'test value 3' } + }) end + + it { should contain_concat__fragment("#{title}-header").with_content( /passenger_set_cgi_param test1 test value 1;/ ) } + it { should contain_concat__fragment("#{title}-header").with_content( /passenger_set_cgi_param test2 test value 2;/ ) } + it { should contain_concat__fragment("#{title}-header").with_content( /passenger_set_cgi_param test3 test value 3;/ ) } + end + + context 'when passenger_cgi_param is set and ssl => true' do + let :params do default_params.merge({ + :passenger_cgi_param => { 'test1' => 'test value 1', 'test2' => 'test value 2', 'test3' => 'test value 3' }, + :ssl => true, + :ssl_key => 'dummy.key', + :ssl_cert => 'dummy.cert', + }) end + + it { should contain_concat__fragment("#{title}-ssl-header").with_content( /passenger_set_cgi_param test1 test value 1;/ ) } + it { should contain_concat__fragment("#{title}-ssl-header").with_content( /passenger_set_cgi_param test2 test value 2;/ ) } + it { should contain_concat__fragment("#{title}-ssl-header").with_content( /passenger_set_cgi_param test3 test value 3;/ ) } + end + + context 'when vhost name is sanitized' do + let :title do 'www rspec-vhost com' end + let :params do default_params end + + it { should contain_concat('/etc/nginx/sites-available/www_rspec-vhost_com.conf') } + end + end + end +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/nginx/spec/spec_helper.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/nginx/spec/spec_helper.rb new file mode 100644 index 00000000000..a987b6e6caa --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/nginx/spec/spec_helper.rb @@ -0,0 +1,8 @@ +require 'puppetlabs_spec_helper/module_spec_helper' + +RSpec.configure do |c| + c.default_facts = { + :kernel => 'Linux', + :concat_basedir => '/var/lib/puppet/concat', + } +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/nginx/spec/spec_helper_system.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/nginx/spec/spec_helper_system.rb new file mode 100644 index 00000000000..bfb7271d0a2 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/nginx/spec/spec_helper_system.rb @@ -0,0 +1,64 @@ +require 'rspec-system/spec_helper' +require 'rspec-system-puppet/helpers' +require 'rspec-system-serverspec/helpers' +include RSpecSystemPuppet::Helpers + +RSpec.configure do |c| + # Project root + proj_root = File.expand_path(File.join(File.dirname(__FILE__), '..')) + + # Enable colour + c.tty = true + + # This is where we 'setup' the nodes before running our tests + c.before :suite do + # Install puppet + puppet_install + + # Install modules and dependencies + puppet_module_install(:source => proj_root, :module_name => 'nginx') + shell('puppet module install puppetlabs-apt') + shell('puppet module install puppetlabs-stdlib') + shell('puppet module install puppetlabs-concat') + + # Fake keys. + # Valid self-signed SSL key with 10 year expiry. + # Required for nginx to start when SSL enabled + shell('echo "-----BEGIN PRIVATE KEY----- +MIICdwIBADANBgkqhkiG9w0BAQEFAASCAmEwggJdAgEAAoGBAOPchwRZRF4KmU6E +g7C6Pq9zhdLiQt9owdcLZNiZS+UVRQjeDHSy3titzh5YwSoQonlnSqd0g/PJ6kNA +O3CNOMVuzAddnAaHzW1J4Rt6sZwOuidtJC4t/hFCgz5NqOMgYOOfratQx00A7ZXK +TXMgNG79lDP5L/N06Ox53sOxhy4hAgMBAAECgYEAlfktCKi0fe0d8Hb5slUzMwmn +GCECAMeTZbXDH2jucg4ozOhRbHHaiOUEmCa0pLokJiHdGhBvVQMd5Dufo7nflZzE +mpZY0lCZE7HSeK6Bcbru/8w3vm3iBQTGK+MCaDtH5nQU7m/3cOXaenOX0ZmsTzRs +QE/V84S1fuO8bBPSz20CQQD9d4LxrBByosFxRdHsTb/nnqx/rzLEf4M3MC7uydPv +fDDbSRRSYpNxonQJfU3JrOk1WPWoXY30VQCv395s57X7AkEA5iOBT+ME8/PxuUUC +ZDjg21tAdkaiCQ5kgeVTmkD1k/gTwreOV2AexWGrrcW/MLaIhpDCpQkw37y5vrYw +UyDdkwJAAU+j8sIUF7O10nMtAc7pJjaQ59wtJA0QzbFHHN8YZI285vV60G5IGvdf +KElopJlrX2ZFZwiM2m2yIjbDPMb6DwJAbNoiUbzZHOInVTA0316fzGEu7kKeZZYv +J9lmX7GV9nUCM7lKVD2ckFOQNlMwCURs8ukJh7H/MfQ8Dt5xoQAMjQJBAOWpK6k6 +b0fTREZFZRGZBJcSu959YyMzhpSFA+lXkLNTWX8j1/D88H731oMSImoQNWcYx2dH +sCwOCDqu1nZ2LJ8= +-----END PRIVATE KEY-----" > /tmp/blah.key') + shell('echo "-----BEGIN CERTIFICATE----- +MIIDRjCCAq+gAwIBAgIJAL9m0V4sHW2tMA0GCSqGSIb3DQEBBQUAMIG7MQswCQYD +VQQGEwItLTESMBAGA1UECAwJU29tZVN0YXRlMREwDwYDVQQHDAhTb21lQ2l0eTEZ +MBcGA1UECgwQU29tZU9yZ2FuaXphdGlvbjEfMB0GA1UECwwWU29tZU9yZ2FuaXph +dGlvbmFsVW5pdDEeMBwGA1UEAwwVbG9jYWxob3N0LmxvY2FsZG9tYWluMSkwJwYJ +KoZIhvcNAQkBFhpyb290QGxvY2FsaG9zdC5sb2NhbGRvbWFpbjAeFw0xMzExMzAw +NzA3NDlaFw0yMzExMjgwNzA3NDlaMIG7MQswCQYDVQQGEwItLTESMBAGA1UECAwJ +U29tZVN0YXRlMREwDwYDVQQHDAhTb21lQ2l0eTEZMBcGA1UECgwQU29tZU9yZ2Fu +aXphdGlvbjEfMB0GA1UECwwWU29tZU9yZ2FuaXphdGlvbmFsVW5pdDEeMBwGA1UE +AwwVbG9jYWxob3N0LmxvY2FsZG9tYWluMSkwJwYJKoZIhvcNAQkBFhpyb290QGxv +Y2FsaG9zdC5sb2NhbGRvbWFpbjCBnzANBgkqhkiG9w0BAQEFAAOBjQAwgYkCgYEA +49yHBFlEXgqZToSDsLo+r3OF0uJC32jB1wtk2JlL5RVFCN4MdLLe2K3OHljBKhCi +eWdKp3SD88nqQ0A7cI04xW7MB12cBofNbUnhG3qxnA66J20kLi3+EUKDPk2o4yBg +45+tq1DHTQDtlcpNcyA0bv2UM/kv83To7Hnew7GHLiECAwEAAaNQME4wHQYDVR0O +BBYEFP5Kkot/7pStLaYPtT+vngE0v6N8MB8GA1UdIwQYMBaAFP5Kkot/7pStLaYP +tT+vngE0v6N8MAwGA1UdEwQFMAMBAf8wDQYJKoZIhvcNAQEFBQADgYEAwYYQKVRN +HaHIWGMBuXApE7t4PNdYWZ5Y56tI+HT59yVoDjc1YSnuzkKlWUPibVYoLpX/ROKr +aIZ8kxsBjLvpi9KQTHi7Wl6Sw3ecoYdKy+2P8S5xOIpWjs8XVmOWf7Tq1+9KPv3z +HLw/FDCzntkdq3G4em15CdFlO9BTY4HXiHU= +-----END CERTIFICATE-----" > /tmp/blah.cert') + end +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/nginx/spec/system/basic_spec.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/nginx/spec/system/basic_spec.rb new file mode 100644 index 00000000000..775c8b65435 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/nginx/spec/system/basic_spec.rb @@ -0,0 +1,33 @@ +require 'spec_helper_system' + +# Here we put the more basic fundamental tests, ultra obvious stuff. +describe "basic tests:" do + context 'make sure we have copied the module across' do + # No point diagnosing any more if the module wasn't copied properly + context shell 'ls /etc/puppet/modules/nginx' do + its(:stdout) { should =~ /Modulefile/ } + its(:stderr) { should be_empty } + its(:exit_code) { should be_zero } + end + end + + #puppet smoke test + context puppet_apply 'notice("foo")' do + its(:stdout) { should =~ /foo/ } + its(:stderr) { should be_empty } + its(:exit_code) { should be_zero } + end + + it 'nginx class should work with no errors' do + pp = <<-EOS + class { 'nginx': } + EOS + + # Run it twice and test for idempotency + puppet_apply(pp) do |r| + [0,2].should include(r.exit_code) + r.refresh + r.exit_code.should be_zero + end + end +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/nginx/spec/system/class_spec.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/nginx/spec/system/class_spec.rb new file mode 100644 index 00000000000..d8eff7c418d --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/nginx/spec/system/class_spec.rb @@ -0,0 +1,35 @@ +require 'spec_helper_system' + +describe "nginx class:" do + case node.facts['osfamily'] + when 'RedHat' + package_name = 'nginx' + when 'Debian' + package_name = 'nginx' + when 'Suse' + package_name = 'nginx-0.8' + end + + context 'should run successfully' do + it 'should run successfully' do + pp = "class { 'nginx': }" + + puppet_apply(pp) do |r| + #r.stderr.should be_empty + [0,2].should include r.exit_code + r.refresh + #r.stderr.should be_empty + r.exit_code.should be_zero + end + end + end + + describe package(package_name) do + it { should be_installed } + end + + describe service('nginx') do + it { should be_running } + end + +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/nginx/spec/system/nginx_mail_spec.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/nginx/spec/system/nginx_mail_spec.rb new file mode 100644 index 00000000000..e8cce6cf1c2 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/nginx/spec/system/nginx_mail_spec.rb @@ -0,0 +1,42 @@ +require 'spec_helper_system' + +describe "nginx::resource::mailhost define:" do + it 'should run successfully' do + + pp = " + class { 'nginx': + mail => true, + } + nginx::resource::vhost { 'www.puppetlabs.com': + ensure => present, + www_root => '/var/www/www.puppetlabs.com', + } + nginx::resource::mailhost { 'domain1.example': + ensure => present, + auth_http => 'localhost/cgi-bin/auth', + protocol => 'smtp', + listen_port => 587, + ssl_port => 465, + xclient => 'off', + } + " + + puppet_apply(pp) do |r| + [0,2].should include r.exit_code + r.refresh + # Not until deprecated variables fixed. + #r.stderr.should be_empty + r.exit_code.should be_zero + end + end + + describe file('/etc/nginx/conf.mail.d/domain1.example.conf') do + it { should be_file } + it { should contain "auth_http localhost/cgi-bin/auth;" } + end + + describe file('/etc/nginx/sites-available/www.puppetlabs.com.conf') do + it { should be_file } + end + +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/nginx/spec/system/nginx_proxy_spec.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/nginx/spec/system/nginx_proxy_spec.rb new file mode 100644 index 00000000000..09b18856553 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/nginx/spec/system/nginx_proxy_spec.rb @@ -0,0 +1,43 @@ +require 'spec_helper_system' + +describe "nginx::resource::upstream define:" do + it 'should run successfully' do + + pp = " + class { 'nginx': } + nginx::resource::upstream { 'puppet_rack_app': + ensure => present, + members => [ + 'localhost:3000', + 'localhost:3001', + 'localhost:3002', + ], + } + nginx::resource::vhost { 'rack.puppetlabs.com': + ensure => present, + proxy => 'http://puppet_rack_app', + } + " + + puppet_apply(pp) do |r| + [0,2].should include r.exit_code + r.refresh + r.stderr.should be_empty + r.exit_code.should be_zero + end + end + + describe file('/etc/nginx/conf.d/puppet_rack_app-upstream.conf') do + it { should be_file } + it { should contain "server localhost:3000" } + it { should contain "server localhost:3001" } + it { should contain "server localhost:3002" } + it { should_not contain "server localhost:3003" } + end + + describe file('/etc/nginx/sites-available/rack.puppetlabs.com.conf') do + it { should be_file } + it { should contain "proxy_pass http://puppet_rack_app;" } + end + +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/nginx/spec/system/nginx_vhost_spec.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/nginx/spec/system/nginx_vhost_spec.rb new file mode 100644 index 00000000000..d4f34467691 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/nginx/spec/system/nginx_vhost_spec.rb @@ -0,0 +1,100 @@ +require 'spec_helper_system' + +describe "nginx::resource::vhost define:" do + context 'new vhost on port 80' do + it 'should configure a nginx vhost' do + + pp = " + class { 'nginx': } + nginx::resource::vhost { 'www.puppetlabs.com': + ensure => present, + www_root => '/var/www/www.puppetlabs.com', + } + host { 'www.puppetlabs.com': ip => '127.0.0.1', } + file { ['/var/www','/var/www/www.puppetlabs.com']: ensure => directory } + file { '/var/www/www.puppetlabs.com/index.html': ensure => file, content => 'Hello from www\n', } + " + + puppet_apply(pp) do |r| + [0,2].should include r.exit_code + r.refresh + r.stderr.should be_empty + r.exit_code.should be_zero + end + end + + describe file('/etc/nginx/sites-available/www.puppetlabs.com.conf') do + it { should be_file } + it { should contain "www.puppetlabs.com" } + end + + describe file('/etc/nginx/sites-enabled/www.puppetlabs.com.conf') do + it { should be_linked_to '/etc/nginx/sites-available/www.puppetlabs.com.conf' } + end + + describe service('nginx') do + it { should be_running } + end + + it 'should answer to www.puppetlabs.com' do + shell("/usr/bin/curl http://www.puppetlabs.com:80") do |r| + r.stdout.should == "Hello from www\n" + r.exit_code.should be_zero + end + end + end + + context 'should run successfully with ssl' do + it 'should configure a nginx SSL vhost' do + + pp = " + class { 'nginx': } + nginx::resource::vhost { 'www.puppetlabs.com': + ensure => present, + ssl => true, + ssl_cert => '/tmp/blah.cert', + ssl_key => '/tmp/blah.key', + www_root => '/var/www/www.puppetlabs.com', + } + host { 'www.puppetlabs.com': ip => '127.0.0.1', } + file { ['/var/www','/var/www/www.puppetlabs.com']: ensure => directory } + file { '/var/www/www.puppetlabs.com/index.html': ensure => file, content => 'Hello from www\n', } + " + + puppet_apply(pp) do |r| + [0,2].should include r.exit_code + r.refresh + r.stderr.should be_empty + r.exit_code.should be_zero + end + end + + describe file('/etc/nginx/sites-available/www.puppetlabs.com.conf') do + it { should be_file } + it { should contain "ssl on;" } + end + + describe file('/etc/nginx/sites-enabled/www.puppetlabs.com.conf') do + it { should be_linked_to '/etc/nginx/sites-available/www.puppetlabs.com.conf' } + end + + describe service('nginx') do + it { should be_running } + end + + it 'should answer to http://www.puppetlabs.com' do + shell("/usr/bin/curl http://www.puppetlabs.com:80") do |r| + r.stdout.should == "Hello from www\n" + r.exit_code.should == 0 + end + end + + it 'should answer to https://www.puppetlabs.com' do + # use --insecure because it's a self-signed cert + shell("/usr/bin/curl --insecure https://www.puppetlabs.com:443") do |r| + r.stdout.should == "Hello from www\n" + r.exit_code.should == 0 + end + end + end +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/nginx/templates/conf.d/nginx.conf.erb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/nginx/templates/conf.d/nginx.conf.erb new file mode 100644 index 00000000000..62e49e2a31d --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/nginx/templates/conf.d/nginx.conf.erb @@ -0,0 +1,55 @@ +user <%= scope.lookupvar('nginx::config::nx_daemon_user') %>; +worker_processes <%= @worker_processes %>; +worker_rlimit_nofile <%= @worker_rlimit_nofile %>; + +error_log <%= @nginx_error_log %>; +pid <%= scope.lookupvar('nginx::params::nx_pid')%>; + +events { + worker_connections <%= @worker_connections -%>; +<% if scope.lookupvar('nginx::params::nx_multi_accept') == 'on' %>multi_accept on;<% end -%> +<% if scope.lookupvar('nginx::params::nx_events_use') %>use <%= scope.lookupvar('nginx::params::nx_events_use')%>;<% end -%> +} + +http { + include <%= scope.lookupvar('nginx::params::nx_conf_dir') %>/mime.types; + default_type application/octet-stream; + + access_log <%= @http_access_log %>; + + sendfile <%= scope.lookupvar('nginx::params::nx_sendfile')%>; + + server_tokens <%= @server_tokens %>; + + types_hash_max_size <%= scope.lookupvar('nginx::params::nx_types_hash_max_size')%>; + types_hash_bucket_size <%= scope.lookupvar('nginx::params::nx_types_hash_bucket_size')%>; + + server_names_hash_bucket_size <%= @names_hash_bucket_size %>; + server_names_hash_max_size <%= @names_hash_max_size %>; + + keepalive_timeout <%= scope.lookupvar('nginx::params::nx_keepalive_timeout')%>; + tcp_nodelay <%= scope.lookupvar('nginx::params::nx_tcp_nodelay')%>; + +<% if @gzip == 'on' %> + gzip on; + gzip_disable "MSIE [1-6]\.(?!.*SV1)"; +<% end -%> + +<% if @proxy_cache_path -%> + proxy_cache_path <%= @proxy_cache_path %> levels=<%= @proxy_cache_levels %> keys_zone=<%= @proxy_cache_keys_zone %> max_size=<%= @proxy_cache_max_size %> inactive=<%= @proxy_cache_inactive %>; +<% end -%> + +<% if @http_cfg_append -%><% @http_cfg_append.sort_by{|k,v| k}.each do |key,value| -%> + <%= key %> <%= value %>; +<% end -%> +<% end -%> + + include <%= scope.lookupvar('nginx::params::nx_conf_dir') %>/conf.d/*.conf; + include <%= scope.lookupvar('nginx::params::nx_conf_dir') %>/sites-enabled/*; + +} +<% if scope.lookupvar('nginx::mail') %> +mail { + include <%= scope.lookupvar('nginx::params::nx_conf_dir') %>/conf.mail.d/*.conf; +} +<% end -%> diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/nginx/templates/conf.d/proxy.conf.erb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/nginx/templates/conf.d/proxy.conf.erb new file mode 100644 index 00000000000..fcd7e1d5b92 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/nginx/templates/conf.d/proxy.conf.erb @@ -0,0 +1,11 @@ +proxy_redirect <%= scope.lookupvar('nginx::params::nx_proxy_redirect') %>; +client_max_body_size <%= @client_max_body_size %>; +client_body_buffer_size <%= scope.lookupvar('nginx::params::nx_client_body_buffer_size') %>; +proxy_connect_timeout <%= scope.lookupvar('nginx::params::nx_proxy_connect_timeout') %>; +proxy_send_timeout <%= scope.lookupvar('nginx::params::nx_proxy_send_timeout') %>; +proxy_read_timeout <%= scope.lookupvar('nginx::params::nx_proxy_read_timeout') %>; +proxy_buffers <%= @proxy_buffers %>; +proxy_buffer_size <%= @proxy_buffer_size %>; +proxy_http_version <%= @proxy_http_version %>; +<% @proxy_set_header.each do |header| %> +proxy_set_header <%= header %>;<% end %> diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/nginx/templates/conf.d/upstream.erb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/nginx/templates/conf.d/upstream.erb new file mode 100644 index 00000000000..a96121ab228 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/nginx/templates/conf.d/upstream.erb @@ -0,0 +1,15 @@ +upstream <%= @name %> { +<% if @upstream_cfg_prepend -%><% @upstream_cfg_prepend.sort_by{|k,v| k}.each do |key,value| %> +<% if value.is_a?(Hash) -%><% value.each do |subkey,subvalue| -%> +<% Array(subvalue).each do |asubvalue| -%> + <%= key %> <%= subkey %> <%= asubvalue %>; +<% end -%> +<% end -%><% else -%> +<% Array(value).each do |asubvalue| -%> + <%= key %> <%= asubvalue %>; +<% end -%> +<% end -%> +<% end -%><% end -%> + <% @members.each do |i| %> + server <%= i %> fail_timeout=<%= @upstream_fail_timeout %>;<% end %> +} diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/nginx/templates/mailhost/mailhost.erb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/nginx/templates/mailhost/mailhost.erb new file mode 100644 index 00000000000..a6bab3f93be --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/nginx/templates/mailhost/mailhost.erb @@ -0,0 +1,23 @@ + +server { + listen <%= @listen_ip %>:<%= @listen_port %><% if @listen_options %> <%= @listen_options %><% end %>; + <% # check to see if ipv6 support exists in the kernel before applying %> + <% if @ipv6_enable && (defined? @ipaddress6) %> + listen [<%= @ipv6_listen_ip %>]:<%= @ipv6_listen_port %><% if @ipv6_listen_options %> <%= @ipv6_listen_options %><% end %>; + <% end %> + server_name <%= @server_name.join(" ") %>; + protocol <%= @protocol %>; + xclient <%= @xclient %>; + auth_http <%= @auth_http %>; + starttls <%= @starttls %>; + <% if @starttls == 'on' || @starttls == 'only' %> + ssl_certificate <%= @ssl_cert %>; + ssl_certificate_key <%= @ssl_key %>; + + ssl_session_timeout 5m; + + ssl_protocols SSLv3 TLSv1; + ssl_ciphers ALL:!ADH:!EXPORT56:RC4+RSA:+HIGH:+MEDIUM:+LOW:+SSLv3:+EXP; + ssl_prefer_server_ciphers on; + <%- end -%> +} diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/nginx/templates/mailhost/mailhost_ssl.erb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/nginx/templates/mailhost/mailhost_ssl.erb new file mode 100644 index 00000000000..98d193f8f5f --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/nginx/templates/mailhost/mailhost_ssl.erb @@ -0,0 +1,23 @@ + +server { + listen <%= @ssl_port %>; + <% # check to see if ipv6 support exists in the kernel before applying %> + <% if @ipv6_enable && (defined? @ipaddress6) %> + listen [<%= @ipv6_listen_ip %>]:<%= @ipv6_listen_port %> <% if @ipv6_listen_options %><%= @ipv6_listen_options %><% end %>; + <% end %> + server_name <%= @server_name.join(" ") %>; + protocol <%= @protocol %>; + xclient <%= @xclient %>; + auth_http <%= @auth_http %>; + + ssl on; + ssl_certificate <%= @ssl_cert %>; + ssl_certificate_key <%= @ssl_key %>; + + ssl_session_timeout 5m; + + ssl_protocols SSLv3 TLSv1; + ssl_ciphers ALL:!ADH:!EXPORT56:RC4+RSA:+HIGH:+MEDIUM:+LOW:+SSLv3:+EXP; + ssl_prefer_server_ciphers on; + +} diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/nginx/templates/vhost/fastcgi_params.erb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/nginx/templates/vhost/fastcgi_params.erb new file mode 100644 index 00000000000..fe8bc20f0dc --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/nginx/templates/vhost/fastcgi_params.erb @@ -0,0 +1,27 @@ +# This file managed by puppet on host <%= @fqdn %> + +fastcgi_param QUERY_STRING $query_string; +fastcgi_param REQUEST_METHOD $request_method; +fastcgi_param CONTENT_TYPE $content_type; +fastcgi_param CONTENT_LENGTH $content_length; + +fastcgi_param SCRIPT_FILENAME $request_filename; +fastcgi_param SCRIPT_NAME $fastcgi_script_name; +fastcgi_param REQUEST_URI $request_uri; +fastcgi_param DOCUMENT_URI $document_uri; +fastcgi_param DOCUMENT_ROOT $document_root; +fastcgi_param SERVER_PROTOCOL $server_protocol; + +fastcgi_param GATEWAY_INTERFACE CGI/1.1; +fastcgi_param SERVER_SOFTWARE nginx/$nginx_version; + +fastcgi_param REMOTE_ADDR $remote_addr; +fastcgi_param REMOTE_PORT $remote_port; +fastcgi_param SERVER_ADDR $server_addr; +fastcgi_param SERVER_PORT $server_port; +fastcgi_param SERVER_NAME $server_name; + +fastcgi_param HTTPS $https; + +# PHP only, required if PHP was built with --enable-force-cgi-redirect +fastcgi_param REDIRECT_STATUS 200; diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/nginx/templates/vhost/vhost_footer.erb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/nginx/templates/vhost/vhost_footer.erb new file mode 100644 index 00000000000..b4a4d7eb64d --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/nginx/templates/vhost/vhost_footer.erb @@ -0,0 +1,25 @@ +<% if @include_files %><% @include_files.each do |file| -%> +include <%= file %>; +<% end -%><% end -%> +<%# make sure that allow comes before deny by forcing the allow key (if it -%> +<%# exists) to be first in the output order. The hash keys also need to be -%> +<%# sorted so that the ordering is stable. -%> +<% if @vhost_cfg_append -%><% @vhost_cfg_append.sort_by{ |k, v| k.to_s == 'allow' ? '' : k.to_s }.each do |key,value| -%> +<% if value.is_a?(Hash) -%><% value.each do |subkey,subvalue| -%> +<% Array(subvalue).each do |asubvalue| -%> + <%= key %> <%= subkey %> <%= asubvalue %>; +<% end -%> +<% end -%><% else -%> +<% Array(value).each do |asubvalue| -%> + <%= key %> <%= asubvalue %>; +<% end -%> +<% end -%> +<% end -%><% end -%> +} +<% if @rewrite_www_to_non_www -%> +server { + listen <%= @listen_ip %>:<%= @listen_port %>; + server_name www.<%= @name.gsub(/^www\./, '') %>; + rewrite ^ http://<%= @name.gsub(/^www\./, '') %>$uri permanent; +} +<% end -%> diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/nginx/templates/vhost/vhost_header.erb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/nginx/templates/vhost/vhost_header.erb new file mode 100644 index 00000000000..8fd7615aef8 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/nginx/templates/vhost/vhost_header.erb @@ -0,0 +1,54 @@ +server { + listen <%= @listen_ip %>:<%= @listen_port %><% if @listen_options %> <%= @listen_options %><% end %>; +<% # check to see if ipv6 support exists in the kernel before applying %> +<% if @ipv6_enable && (defined? @ipaddress6) %> + listen [<%= @ipv6_listen_ip %>]:<%= @ipv6_listen_port %> <% if @ipv6_listen_options %><%= @ipv6_listen_options %><% end %>; +<% end %> + server_name <%= @rewrite_www_to_non_www ? @name.gsub(/^www\./, '') : @server_name.join(" ") %>; +<% if defined? @auth_basic -%> + auth_basic "<%= @auth_basic %>"; +<% end -%> +<% if defined? @auth_basic_user_file -%> + auth_basic_user_file <%= @auth_basic_user_file %>; +<% end -%> +<% if defined? @client_max_body_size -%> + client_max_body_size <%= @client_max_body_size %>; +<% end -%> +<%# make sure that allow comes before deny by forcing the allow key (if it -%> +<%# exists) to be first in the output order. The hash keys also need to be -%> +<%# sorted so that the ordering is stable. -%> +<% if @vhost_cfg_prepend -%><% @vhost_cfg_prepend.sort_by{ |k, v| k.to_s == 'allow' ? '' : k.to_s }.each do |key,value| -%> +<% if value.is_a?(Hash) -%><% value.each do |subkey,subvalue| -%> +<% Array(subvalue).each do |asubvalue| -%> + <%= key %> <%= subkey %> <%= asubvalue %>; +<% end -%> +<% end -%><% else -%> +<% Array(value).each do |asubvalue| -%> + <%= key %> <%= asubvalue %>; +<% end -%> +<% end -%> +<% end -%><% end -%> +<% if @root -%> + root <%= @root %>; +<% end -%> +<% if @passenger_cgi_param -%><% @passenger_cgi_param.keys.sort.each do |key| -%> + passenger_set_cgi_param <%= key %> <%= @passenger_cgi_param[key] %>; +<% end -%><% end -%> +<% @proxy_set_header.each do |header| -%> + proxy_set_header <%= header %>; +<% end -%> +<% if @add_header -%><% @add_header.each do |key,value| -%> + add_header <%= key %> <%= value %>; +<% end -%><% end -%> +<% if @rewrite_to_https -%> + if ($ssl_protocol = "") { + return 301 https://$host$request_uri; + } +<% end -%> +<% if @index_files.count > 0 -%> + index <% Array(@index_files).each do |i| %> <%= i %><% end %>; +<% end -%> + + access_log <%= @access_log_real %>; + error_log <%= @error_log_real %>; + diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/nginx/templates/vhost/vhost_location_alias.erb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/nginx/templates/vhost/vhost_location_alias.erb new file mode 100644 index 00000000000..ccd47f8df5a --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/nginx/templates/vhost/vhost_location_alias.erb @@ -0,0 +1,47 @@ + location <%= @location %> { +<% if @location_custom_cfg_prepend -%><% @location_custom_cfg_prepend.each do |key,value| -%> +<% if value.is_a?(Hash) -%><% value.each do |subkey,subvalue| -%> +<% Array(subvalue).each do |asubvalue| -%> + <%= key %> <%= subkey %> <%= asubvalue %>; +<% end -%> +<% end -%><% else -%> +<% Array(value).each do |asubvalue| -%> + <%= key %> <%= asubvalue %>; +<% end -%> +<% end -%> +<% end -%><% end -%> +<% if @location_cfg_prepend -%><% @location_cfg_prepend.sort_by {|k,v| k}.each do |key,value| -%> +<% if value.is_a?(Hash) -%><% value.each do |subkey,subvalue| -%> +<% Array(subvalue).each do |asubvalue| -%> + <%= key %> <%= subkey %> <%= asubvalue %>; +<% end -%> +<% end -%><% else -%> +<% Array(value).each do |asubvalue| -%> + <%= key %> <%= asubvalue %>; +<% end -%> +<% end -%> +<% end -%><% end -%> + alias <%= @location_alias %>; +<% if @location_cfg_append -%><% @location_cfg_append.sort_by {|k,v| k}.each do |key,value| -%> +<% if value.is_a?(Hash) -%><% value.each do |subkey,subvalue| -%> +<% Array(subvalue).each do |asubvalue| -%> + <%= key %> <%= subkey %> <%= asubvalue %>; +<% end -%> +<% end -%><% else -%> +<% Array(value).each do |asubvalue| -%> + <%= key %> <%= asubvalue %>; +<% end -%> +<% end -%> +<% end -%><% end -%> +<% if @location_custom_cfg_append -%><% @location_custom_cfg_append.each do |key,value| -%> +<% if value.is_a?(Hash) -%><% value.each do |subkey,subvalue| -%> +<% Array(subvalue).each do |asubvalue| -%> + <%= key %> <%= subkey %> <%= asubvalue %>; +<% end -%> +<% end -%><% else -%> +<% Array(value).each do |asubvalue| -%> + <%= key %> <%= asubvalue %>; +<% end -%> +<% end -%> +<% end -%><% end -%> + } diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/nginx/templates/vhost/vhost_location_directory.erb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/nginx/templates/vhost/vhost_location_directory.erb new file mode 100644 index 00000000000..c5f6f01af31 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/nginx/templates/vhost/vhost_location_directory.erb @@ -0,0 +1,65 @@ + location <%= @location %> { +<% if @location_allow -%><% @location_allow.each do |allow_rule| -%> + allow <%= allow_rule %>; +<% end -%><% end -%> +<% if @location_deny -%><% @location_deny.each do |deny_rule| -%> + deny <%= deny_rule %>; +<% end -%><% end -%> +<% if @location_custom_cfg_prepend -%><% @location_custom_cfg_prepend.each do |value| -%> + <%= value %> +<% end -%><% end -%> +<% if @location_cfg_prepend -%><% @location_cfg_prepend.sort_by {|k,v| k}.each do |key,value| -%> +<% if value.is_a?(Hash) -%><% value.each do |subkey,subvalue| -%> +<% Array(subvalue).each do |asubvalue| -%> + <%= key %> <%= subkey %> <%= asubvalue %>; +<% end -%> +<% end -%><% else -%> +<% Array(value).each do |asubvalue| -%> + <%= key %> <%= asubvalue %>; +<% end -%> +<% end -%> +<% end -%><% end -%> +<% if defined? @www_root -%> + root <%= @www_root %>; +<% end -%> +<% if @try_files -%> + try_files<% @try_files.each do |try| -%> <%= try %><% end -%>; +<% end -%> +<% if defined? @autoindex -%> + autoindex <%= @autoindex %>; +<% end -%> +<% if @index_files.count > 0 -%> + index <% Array(@index_files).each do |i| %> <%= i %><% end %>; +<% end -%> +<% @rewrite_rules.each do |rewrite_rule| -%> + rewrite <%= rewrite_rule %>; +<% end -%> +<% if defined? @auth_basic -%> + auth_basic "<%= @auth_basic %>"; +<% end -%> +<% if defined? @auth_basic_user_file -%> + auth_basic_user_file <%= @auth_basic_user_file %>; +<% end -%> +<% if @location_cfg_append -%><% @location_cfg_append.sort_by {|k,v| k}.each do |key,value| -%> +<% if value.is_a?(Hash) -%><% value.each do |subkey,subvalue| -%> +<% Array(subvalue).each do |asubvalue| -%> + <%= key %> <%= subkey %> <%= asubvalue %>; +<% end -%> +<% end -%><% else -%> +<% Array(value).each do |asubvalue| -%> + <%= key %> <%= asubvalue %>; +<% end -%> +<% end -%> +<% end -%><% end -%> +<% if @location_custom_cfg_append -%><% @location_custom_cfg_append.each do |key,value| -%> +<% if value.is_a?(Hash) -%><% value.each do |subkey,subvalue| -%> +<% Array(subvalue).each do |asubvalue| -%> + <%= key %> <%= subkey %> <%= asubvalue %>; +<% end -%> +<% end -%><% else -%> +<% Array(value).each do |asubvalue| -%> + <%= key %> <%= asubvalue %>; +<% end -%> +<% end -%> +<% end -%><% end -%> + } diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/nginx/templates/vhost/vhost_location_empty.erb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/nginx/templates/vhost/vhost_location_empty.erb new file mode 100644 index 00000000000..10f0d3c6cf0 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/nginx/templates/vhost/vhost_location_empty.erb @@ -0,0 +1,13 @@ + location <%= @location %> { +<% if @location_custom_cfg -%><% @location_custom_cfg.sort_by {|k,v| k}.each do |key,value| -%> +<% if value.is_a?(Hash) -%><% value.each do |subkey,subvalue| -%> +<% Array(subvalue).each do |asubvalue| -%> + <%= key %> <%= subkey %> <%= asubvalue %>; +<% end -%> +<% end -%><% else -%> +<% Array(value).each do |asubvalue| -%> + <%= key %> <%= asubvalue %>; +<% end -%> +<% end -%> +<% end -%><% end -%> + } diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/nginx/templates/vhost/vhost_location_fastcgi.erb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/nginx/templates/vhost/vhost_location_fastcgi.erb new file mode 100644 index 00000000000..015e1d7d586 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/nginx/templates/vhost/vhost_location_fastcgi.erb @@ -0,0 +1,66 @@ + location <%= @location %> { +<% if @location_allow -%><% @location_allow.each do |allow_rule| -%> + allow <%= allow_rule %>; +<% end -%><% end -%> +<% if @location_deny -%><% @location_deny.each do |deny_rule| -%> + deny <%= deny_rule %>; +<% end -%><% end -%> +<% if @location_custom_cfg_prepend -%><% @location_custom_cfg_prepend.each do |key,value| -%> +<% if value.is_a?(Hash) -%><% value.each do |subkey,subvalue| -%> +<% Array(subvalue).each do |asubvalue| -%> + <%= key %> <%= subkey %> <%= asubvalue %>; +<% end -%> +<% end -%><% else -%> +<% Array(value).each do |asubvalue| -%> + <%= key %> <%= asubvalue %>; +<% end -%> +<% end -%> +<% end -%><% end -%> +<% if @location_cfg_prepend -%><% @location_cfg_prepend.sort_by {|k,v| k}.each do |key,value| -%> +<% if value.is_a?(Hash) -%><% value.each do |subkey,subvalue| -%> +<% Array(subvalue).each do |asubvalue| -%> + <%= key %> <%= subkey %> <%= asubvalue %>; +<% end -%> +<% end -%><% else -%> +<% Array(value).each do |asubvalue| -%> + <%= key %> <%= asubvalue %>; +<% end -%> +<% end -%> +<% end -%><% end -%> +<% if defined? @www_root -%> + root <%= @www_root %>; +<% end -%> +<% if @fastcgi_split_path -%> + fastcgi_split_path_info <%= @fastcgi_split_path %>; +<% end -%> +<% if @try_files -%> + try_files<% @try_files.each do |try| -%> <%= try %><% end -%>; +<% end -%> + include <%= @fastcgi_params %>; + fastcgi_pass <%= @fastcgi %>; +<% if defined? @fastcgi_script %> + fastcgi_param SCRIPT_FILENAME <%= @fastcgi_script %>; +<% end -%> +<% if @location_cfg_append -%><% @location_cfg_append.sort_by {|k,v| k}.each do |key,value| -%> +<% if value.is_a?(Hash) -%><% value.each do |subkey,subvalue| -%> +<% Array(subvalue).each do |asubvalue| -%> + <%= key %> <%= subkey %> <%= asubvalue %>; +<% end -%> +<% end -%><% else -%> +<% Array(value).each do |asubvalue| -%> + <%= key %> <%= asubvalue %>; +<% end -%> +<% end -%> +<% end -%><% end -%> +<% if @location_custom_cfg_append -%><% @location_custom_cfg_append.each do |key,value| -%> +<% if value.is_a?(Hash) -%><% value.each do |subkey,subvalue| -%> +<% Array(subvalue).each do |asubvalue| -%> + <%= key %> <%= subkey %> <%= asubvalue %>; +<% end -%> +<% end -%><% else -%> +<% Array(value).each do |asubvalue| -%> + <%= key %> <%= asubvalue %>; +<% end -%> +<% end -%> +<% end -%><% end -%> + } diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/nginx/templates/vhost/vhost_location_proxy.erb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/nginx/templates/vhost/vhost_location_proxy.erb new file mode 100644 index 00000000000..6b8acc2dbd8 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/nginx/templates/vhost/vhost_location_proxy.erb @@ -0,0 +1,67 @@ + location <%= @location %> { +<% if @location_allow -%><% @location_allow.each do |allow_rule| -%> + allow <%= allow_rule %>; +<% end -%><% end -%> +<% if @location_deny -%><% @location_deny.each do |deny_rule| -%> + deny <%= deny_rule %>; +<% end -%><% end -%> +<% if @location_custom_cfg_prepend -%><% @location_custom_cfg_prepend.each do |key,value| -%> +<% if value.is_a?(Hash) -%><% value.each do |subkey,subvalue| -%> +<% Array(subvalue).each do |asubvalue| -%> + <%= key %> <%= subkey %> <%= asubvalue %>; +<% end -%> +<% end -%><% else -%> +<% Array(value).each do |asubvalue| -%> + <%= key %> <%= asubvalue %>; +<% end -%> +<% end -%> +<% end -%><% end -%> +<% if @location_cfg_prepend -%><% @location_cfg_prepend.sort_by {|k,v| k}.each do |key,value| -%> +<% if value.is_a?(Hash) -%><% value.each do |subkey,subvalue| -%> +<% Array(subvalue).each do |asubvalue| -%> + <%= key %> <%=subkey %> <%= asubvalue %>; +<% end -%> +<% end -%><% else -%> +<% Array(value).each do |asubvalue| -%> + <%= key %> <%= asubvalue %>; +<% end -%> +<% end -%> +<% end -%><% end -%> +<% if @proxy_cache -%> + proxy_cache <%= @proxy_cache %>; + proxy_cache_valid <%= @proxy_cache_valid %>; +<% end -%> + proxy_pass <%= @proxy %>; + proxy_read_timeout <%= @proxy_read_timeout %>; +<% if @proxy_method -%> + proxy_method <%= @proxy_method %>; +<% end -%> +<% if @proxy_set_body -%> + proxy_set_body <%= @proxy_set_body %>; +<% end -%> +<% @rewrite_rules.each do |rewrite_rule| -%> + rewrite <%= rewrite_rule %>; +<% end -%> +<% if @location_cfg_append -%><% @location_cfg_append.sort_by {|k,v| k}.each do |key,value| -%> +<% if value.is_a?(Hash) -%><% value.each do |subkey,subvalue| -%> +<% Array(subvalue).each do |asubvalue| -%> + <%= key %> <%= subkey %> <%= asubvalue %>; +<% end -%> +<% end -%><% else -%> +<% Array(value).each do |asubvalue| -%> + <%= key %> <%= asubvalue %>; +<% end -%> +<% end -%> +<% end -%><% end -%> +<% if @location_custom_cfg_append -%><% @location_custom_cfg_append.each do |key,value| -%> +<% if value.is_a?(Hash) -%><% value.each do |subkey,subvalue| -%> +<% Array(subvalue).each do |asubvalue| -%> + <%= key %> <%= subkey %> <%= asubvalue %>; +<% end -%> +<% end -%><% else -%> +<% Array(value).each do |asubvalue| -%> + <%= key %> <%= asubvalue %>; +<% end -%> +<% end -%> +<% end -%><% end -%> + } diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/nginx/templates/vhost/vhost_location_stub_status.erb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/nginx/templates/vhost/vhost_location_stub_status.erb new file mode 100644 index 00000000000..c560933e88d --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/nginx/templates/vhost/vhost_location_stub_status.erb @@ -0,0 +1,47 @@ + location <%= @location %> { +<% if @location_custom_cfg_prepend -%><% @location_custom_cfg_prepend.each do |key,value| -%> +<% if value.is_a?(Hash) -%><% value.each do |subkey,subvalue| -%> +<% Array(subvalue).each do |asubvalue| -%> + <%= key %> <%= subkey %> <%= asubvalue %>; +<% end -%> +<% end -%><% else -%> +<% Array(value).each do |asubvalue| -%> + <%= key %> <%= asubvalue %>; +<% end -%> +<% end -%> +<% end -%><% end -%> +<% if @location_cfg_prepend -%><% @location_cfg_prepend.sort_by {|k,v| k}.each do |key,value| -%> +<% if value.is_a?(Hash) -%><% value.each do |subkey,subvalue| -%> +<% Array(subvalue).each do |asubvalue| -%> + <%= key %> <%= subkey %> <%= asubvalue %>; +<% end -%> +<% end -%><% else -%> +<% Array(value).each do |asubvalue| -%> + <%= key %> <%= asubvalue %>; +<% end -%> +<% end -%> +<% end -%><% end -%> + stub_status on; +<% if @location_cfg_append -%><% @location_cfg_append.sort_by {|k,v| k}.each do |key,value| -%> +<% if value.is_a?(Hash) -%><% value.each do |subkey,subvalue| -%> +<% Array(subvalue).each do |asubvalue| -%> + <%= key %> <%= subkey %> <%= asubvalue %>; +<% end -%> +<% end -%><% else -%> +<% Array(value).each do |asubvalue| -%> + <%= key %> <%= asubvalue %>; +<% end -%> +<% end -%> +<% end -%><% end -%> +<% if @location_custom_cfg_append -%><% @location_custom_cfg_append.each do |key,value| -%> +<% if value.is_a?(Hash) -%><% value.each do |subkey,subvalue| -%> +<% Array(subvalue).each do |asubvalue| -%> + <%= key %> <%= subkey %> <%= asubvalue %>; +<% end -%> +<% end -%><% else -%> +<% Array(value).each do |asubvalue| -%> + <%= key %> <%= asubvalue %>; +<% end -%> +<% end -%> +<% end -%><% end -%> + } diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/nginx/templates/vhost/vhost_ssl_footer.erb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/nginx/templates/vhost/vhost_ssl_footer.erb new file mode 100644 index 00000000000..86419a232cc --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/nginx/templates/vhost/vhost_ssl_footer.erb @@ -0,0 +1,33 @@ +<% if @include_files %><% @include_files.each do |file| -%> +include <%= file %>; +<% end -%><% end -%> +<% if @vhost_cfg_append -%><% @vhost_cfg_append.sort_by{ |k, v| k.to_s == 'allow' ? '' : k.to_s }.each do |key,value| -%> +<% if value.is_a?(Hash) -%><% value.each do |subkey,subvalue| -%> +<% Array(subvalue).each do |asubvalue| -%> + <%= key %> <%= subkey %> <%= asubvalue %>; +<% end -%> +<% end -%><% else -%> +<% Array(value).each do |asubvalue| -%> + <%= key %> <%= asubvalue %>; +<% end -%> +<% end -%> +<% end -%><% end -%> +<% if @vhost_cfg_ssl_append -%><% @vhost_cfg_ssl_append.sort_by{ |k, v| k.to_s == 'allow' ? '' : k.to_s }.each do |key,value| -%> +<% if value.is_a?(Hash) -%><% value.each do |subkey,subvalue| -%> +<% Array(subvalue).each do |asubvalue| -%> + <%= key %> <%= subkey %> <%= asubvalue %>; +<% end -%> +<% end -%><% else -%> +<% Array(value).each do |asubvalue| -%> + <%= key %> <%= asubvalue %>; +<% end -%> +<% end -%> +<% end -%><% end -%> +} +<% if @rewrite_www_to_non_www -%> +server { + listen <%= @listen_ip %>:<%= @ssl_port %> ssl; + server_name www.<%= @name.gsub(/^www\./, '') %>; + rewrite ^ https://<%= @name.gsub(/^www\./, '') %>$uri permanent; +} +<% end %> diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/nginx/templates/vhost/vhost_ssl_header.erb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/nginx/templates/vhost/vhost_ssl_header.erb new file mode 100644 index 00000000000..e165b712342 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/nginx/templates/vhost/vhost_ssl_header.erb @@ -0,0 +1,84 @@ +server { + listen <%= @listen_ip %>:<%= @ssl_port %> ssl<% if @spdy == 'on' %> spdy<% end %><% if @listen_options %> <%= @listen_options %><% end %>; + <% if @ipv6_enable && (defined? @ipaddress6) %> + listen [<%= @ipv6_listen_ip %>]:<%= @ssl_port %> ssl<% if @spdy == 'on' %> spdy<% end %><% if @ipv6_listen_options %> <%= @ipv6_listen_options %><% end %>; + <% end %> + server_name <%= @rewrite_www_to_non_www ? @name.gsub(/^www\./, '') : @server_name.join(" ") %>; + + ssl on; + + ssl_certificate <%= scope.lookupvar('nginx::params::nx_conf_dir') %>/<%= @name.gsub(' ', '_') %>.crt; + ssl_certificate_key <%= scope.lookupvar('nginx::params::nx_conf_dir') %>/<%= @name.gsub(' ', '_') %>.key; +<% if defined? @ssl_dhparam -%> + ssl_dhparam <%= scope.lookupvar('nginx::params::nx_conf_dir') %>/<%= @name.gsub(' ', '_') %>.dh.pem; +<% end -%> + ssl_session_cache <%= @ssl_cache %>; + ssl_session_timeout 5m; + ssl_protocols <%= @ssl_protocols %>; + ssl_ciphers <%= @ssl_ciphers %>; + ssl_prefer_server_ciphers on; +<% if @ssl_stapling -%> + ssl_stapling on; +<% end -%> +<% if defined? @ssl_stapling_file -%> + ssl_stapling_file <%= scope.lookupvar('nginx::params::nx_conf_dir') %>/<%= @name.gsub(' ', '_') %>.ocsp.resp; +<% end -%> +<% if defined? @ssl_stapling_responder -%> + ssl_stapling_responder <%= @ssl_stapling_responder %>; +<% end -%> +<% if @ssl_stapling_verify -%> + ssl_stapling_verify on; +<% end -%> +<% if defined? @ssl_trusted_cert -%> + ssl_trusted_certificate <%= scope.lookupvar('nginx::params::nx_conf_dir') %>/<%= @name.gsub(' ', '_') %>.trusted.crt; +<% end -%> +<% if defined? @resolver -%> + resolver <%= @resolver %>; +<% end -%> +<% if defined? @auth_basic -%> + auth_basic "<%= @auth_basic %>"; +<% end -%> +<% if defined? @auth_basic_user_file -%> + auth_basic_user_file "<%= @auth_basic_user_file %>"; +<% end -%> +<% if @index_files.count > 0 -%> + index <% Array(@index_files).each do |i| %> <%= i %><% end %>; +<% end -%> + + access_log <%= @ssl_access_log %>; + error_log <%= @ssl_error_log %>; + +<% if @vhost_cfg_prepend -%><% @vhost_cfg_prepend.sort_by{ |k, v| k.to_s == 'allow' ? '' : k.to_s }.each do |key,value| -%> +<% if value.is_a?(Hash) -%><% value.each do |subkey,subvalue| -%> +<% Array(subvalue).each do |asubvalue| -%> + <%= key %> <%= subkey %> <%= asubvalue %>; +<% end -%> +<% end -%><% else -%> +<% Array(value).each do |asubvalue| -%> + <%= key %> <%= asubvalue %>; +<% end -%> +<% end -%> +<% end -%><% end -%> +<% if @vhost_cfg_ssl_prepend -%><% @vhost_cfg_ssl_prepend.sort_by{ |k, v| k.to_s == 'allow' ? '' : k.to_s }.each do |key,value| -%> +<% if value.is_a?(Hash) -%><% value.each do |subkey,subvalue| -%> +<% Array(subvalue).each do |asubvalue| -%> + <%= key %> <%= subkey %> <%= asubvalue %>; +<% end -%> +<% end -%><% else -%> +<% Array(value).each do |asubvalue| -%> + <%= key %> <%= asubvalue %>; +<% end -%> +<% end -%> +<% end -%><% end -%> +<% if @root -%> + root <%= @root %>; +<% end -%> +<% if @passenger_cgi_param -%><% @passenger_cgi_param.each do |key,value| -%> + passenger_set_cgi_param <%= key %> <%= value %>; +<% end -%><% end -%> +<% @proxy_set_header.each do |header| -%> + proxy_set_header <%= header %>; +<% end -%> +<% if @add_header -%><% @add_header.each do |key,value| -%> + add_header <%= key %> <%= value %>; +<% end -%><% end -%> diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/nginx/tests/init.pp b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/nginx/tests/init.pp new file mode 100644 index 00000000000..41cc19dec38 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/nginx/tests/init.pp @@ -0,0 +1,9 @@ +# The notify before should always come BEFORE all resources +# managed by the nginx class +# and the notify last should always come AFTER all resources +# managed by the nginx class. +node default { + notify { 'before': } + -> class { 'nginx': } + -> notify { 'last': } +} diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/nginx/tests/location_alias.pp b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/nginx/tests/location_alias.pp new file mode 100644 index 00000000000..ac774bafe92 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/nginx/tests/location_alias.pp @@ -0,0 +1,8 @@ +include nginx + +nginx::resource::location { 'www.test.com-alias': + ensure => present, + location => '/some/url', + location_alias => '/new/url/', + vhost => 'www.test.com', +} diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/nginx/tests/upstream.pp b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/nginx/tests/upstream.pp new file mode 100644 index 00000000000..8cc323b1cb2 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/nginx/tests/upstream.pp @@ -0,0 +1,10 @@ +include nginx + +nginx::resource::upstream { 'proxypass': + ensure => present, + members => [ + 'localhost:3000', + 'localhost:3001', + 'localhost:3002', + ], +} diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/nginx/tests/vhost.pp b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/nginx/tests/vhost.pp new file mode 100644 index 00000000000..cce5657d40a --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/nginx/tests/vhost.pp @@ -0,0 +1,16 @@ +include nginx + +nginx::resource::vhost { 'test.local test': + ensure => present, + ipv6_enable => true, + proxy => 'http://proxypass', +} + +nginx::resource::vhost { 'test.local:8080': + ensure => present, + listen_port => 8080, + server_name => ['test.local test'], + ipv6_enable => true, + proxy => 'http://proxypass', +} + diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/nginx/tests/vhost_ssl.pp b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/nginx/tests/vhost_ssl.pp new file mode 100644 index 00000000000..f11c967732b --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/nginx/tests/vhost_ssl.pp @@ -0,0 +1,17 @@ +include nginx + +nginx::resource::vhost { 'test2.local test2': + ensure => present, + www_root => '/var/www/nginx-default', + ssl => true, + ssl_cert => 'puppet:///modules/sslkey/whildcard_mydomain.crt', + ssl_key => 'puppet:///modules/sslkey/whildcard_mydomain.key' +} + +nginx::resource::location { 'test2.local-bob': + ensure => present, + www_root => '/var/www/bob', + location => '/bob', + vhost => 'test2.local test2', +} + diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/ntp/.fixtures.yml b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/ntp/.fixtures.yml new file mode 100644 index 00000000000..a4b980143e2 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/ntp/.fixtures.yml @@ -0,0 +1,5 @@ +fixtures: + repositories: + "stdlib": "git://github.com/puppetlabs/puppetlabs-stdlib.git" + symlinks: + "ntp": "#{source_dir}" diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/ntp/.nodeset.yml b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/ntp/.nodeset.yml new file mode 100644 index 00000000000..cbd0d57b83d --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/ntp/.nodeset.yml @@ -0,0 +1,35 @@ +--- +default_set: 'centos-64-x64' +sets: + 'centos-59-x64': + nodes: + "main.foo.vm": + prefab: 'centos-59-x64' + 'centos-64-x64': + nodes: + "main.foo.vm": + prefab: 'centos-64-x64' + 'fedora-18-x64': + nodes: + "main.foo.vm": + prefab: 'fedora-18-x64' + 'debian-607-x64': + nodes: + "main.foo.vm": + prefab: 'debian-607-x64' + 'debian-70rc1-x64': + nodes: + "main.foo.vm": + prefab: 'debian-70rc1-x64' + 'ubuntu-server-10044-x64': + nodes: + "main.foo.vm": + prefab: 'ubuntu-server-10044-x64' + 'ubuntu-server-12042-x64': + nodes: + "main.foo.vm": + prefab: 'ubuntu-server-12042-x64' + 'sles-11sp1-x64': + nodes: + "main.foo.vm": + prefab: 'sles-11sp1-x64' diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/ntp/.travis.yml b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/ntp/.travis.yml new file mode 100644 index 00000000000..fe5850a5d96 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/ntp/.travis.yml @@ -0,0 +1,31 @@ +--- +branches: + only: + - master +language: ruby +bundler_args: --without development +script: "bundle exec rake spec SPEC_OPTS='--format documentation'" +rvm: +- 1.8.7 +- 1.9.3 +- 2.0.0 +env: + matrix: + - PUPPET_GEM_VERSION="~> 2.7.0" + - PUPPET_GEM_VERSION="~> 3.0.0" + - PUPPET_GEM_VERSION="~> 3.1.0" + - PUPPET_GEM_VERSION="~> 3.2.0" +matrix: + exclude: + - rvm: 1.9.3 + env: PUPPET_GEM_VERSION="~> 2.7.0" + - rvm: 2.0.0 + env: PUPPET_GEM_VERSION="~> 2.7.0" + - rvm: 2.0.0 + env: PUPPET_GEM_VERSION="~> 3.0.0" + - rvm: 2.0.0 + env: PUPPET_GEM_VERSION="~> 3.1.0" + - rvm: 1.8.7 + env: PUPPET_GEM_VERSION="~> 3.2.0" +notifications: + email: false diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/ntp/CHANGELOG.md b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/ntp/CHANGELOG.md new file mode 100644 index 00000000000..cfcac4292e0 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/ntp/CHANGELOG.md @@ -0,0 +1,152 @@ +##2014-04-09 - Supported Release 3.0.4 +###Summary +This is a supported release. + +The only functional change in this release is to split up the restrict +defaults to be per operating system so that we can provide safer defaults +for AIX, to resolve cases where IPv6 are disabled. + +####Features +- Rework restrict defaults. + +####Bugfixes +- Fix up a comment. +- Fix a test to work better on PE. + +#####Known Bugs +* No known bugs + +##2014-03-04 - Supported Release 3.0.3 +###Summary +This is a supported release. Correct stdlib compatibility + +####Bugfixes +- Remove `dirname()` call for correct stdlib compatibility. +- Improved tests + +####Known Bugs +* No known bugs + + +## 2014-02-13 - Release 3.0.2 +###Summary + +No functional changes: Update the README and allow custom gem sources. + +## 2013-12-17 - Release 3.0.1 +### Summary + +Work around a packaging bug with symlinks, no other functional changes. + +## 2013-12-13 - Release 3.0.0 +### Summary + +Final release of 3.0, enjoy! + + +## 2013-10-14 - Version 3.0.0-rc1 + +###Summary + +This release changes the behavior of restrict and adds AIX osfamily support. + +####Backwards-incompatible Changes: + +`restrict` no longer requires you to pass in parameters as: + +restrict => [ 'restrict x', 'restrict y' ] + +but just as: + +restrict => [ 'x', 'y' ] + +As the template now prefixes each line with restrict. + +####Features +- Change the behavior of `restrict` so you no longer need the restrict +keyword. +- Add `udlc` parameter to enable undisciplined local clock regardless of the +machines status as a virtual machine. +- Add AIX support. + +####Fixes +- Use class{} instead of including and then anchoring. (style) +- Extend Gentoo coverage to Facter 1.7. + +--- +##2013-09-05 - Version 2.0.1 + +###Summary + +Correct the LICENSE file. + +####Bugfixes +- Add in the appropriate year and name in LICENSE. + + +##2013-07-31 - Version 2.0.0 + +###Summary + +The 2.0 release focuses on merging all the distro specific +templates into a single reusable template across all platforms. + +To aid in that goal we now allow you to change the driftfile, +ntp keys, and perferred_servers. + +####Backwards-incompatible changes + +As all the distro specific templates have been removed and a +unified one created you may be missing functionality you +previously relied on. Please test carefully before rolling +out globally. + +Configuration directives that might possibly be affected: +- `filegen` +- `fudge` (for virtual machines) +- `keys` +- `logfile` +- `restrict` +- `restrictkey` +- `statistics` +- `trustedkey` + +####Features: +- All templates merged into a single template. +- NTP Keys support added. +- Add preferred servers support. +- Parameters in `ntp` class: + - `driftfile`: path for the ntp driftfile. + - `keys_enable`: Enable NTP keys feature. + - `keys_file`: Path for the NTP keys file. + - `keys_trusted`: Which keys to trust. + - `keys_controlkey`: Which key to use for the control key. + - `keys_requestkey`: Which key to use for the request key. + - `preferred_servers`: Array of servers to prefer. + - `restrict`: Array of restriction options to apply. + +--- +###2013-07-15 - Version 1.0.1 +####Bugfixes +- Fix deprecated warning in `autoupdate` parameter. +- Correctly quote is_virtual fact. + + +##2013-07-08 - Version 1.0.0 +####Features +- Completely refactored to split across several classes. +- rspec-puppet tests rewritten to cover more options. +- rspec-system tests added. +- ArchLinux handled via osfamily instead of special casing. +- parameters in `ntp` class: + - `autoupdate`: deprecated in favor of directly setting package_ensure. + - `panic`: set to false if you wish to allow large clock skews. + +--- +##2011-11-10 Dan Bode - 0.0.4 +* Add Amazon Linux as a supported platform +* Add unit tests + + +##2011-06-16 Jeff McCune - 0.0.3 +* Initial release under puppetlabs diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/ntp/CONTRIBUTING.md b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/ntp/CONTRIBUTING.md new file mode 100644 index 00000000000..a2b1d77bc8e --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/ntp/CONTRIBUTING.md @@ -0,0 +1,9 @@ +Puppet Labs modules on the Puppet Forge are open projects, and community contributions +are essential for keeping them great. We can’t access the huge number of platforms and +myriad of hardware, software, and deployment configurations that Puppet is intended to serve. + +We want to keep it as easy as possible to contribute changes so that our modules work +in your environment. There are a few guidelines that we need contributors to follow so +that we can have a chance of keeping on top of things. + +You can read the complete module contribution guide [on the Puppet Labs wiki.](http://projects.puppetlabs.com/projects/module-site/wiki/Module_contributing) diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/ntp/Gemfile b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/ntp/Gemfile new file mode 100644 index 00000000000..7f86b2d6bdd --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/ntp/Gemfile @@ -0,0 +1,19 @@ +source ENV['GEM_SOURCE'] || "https://rubygems.org" + +group :development, :test do + gem 'rake', :require => false + gem 'puppetlabs_spec_helper', :require => false + gem 'puppet-lint', :require => false + gem 'serverspec', :require => false + gem 'beaker', :require => false + gem 'beaker-rspec', :require => false + gem 'specinfra', '>=0.7.0' +end + +if puppetversion = ENV['PUPPET_GEM_VERSION'] + gem 'puppet', puppetversion, :require => false +else + gem 'puppet', :require => false +end + +# vim:ft=ruby diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/ntp/LICENSE b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/ntp/LICENSE new file mode 100644 index 00000000000..bc1c718de57 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/ntp/LICENSE @@ -0,0 +1,202 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [2013] [Puppet Labs] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/ntp/Modulefile b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/ntp/Modulefile new file mode 100644 index 00000000000..fc436324af8 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/ntp/Modulefile @@ -0,0 +1,11 @@ +name 'puppetlabs-ntp' +version '3.0.4' +source 'git://github.com/puppetlabs/puppetlabs-ntp' +author 'Puppet Labs' +license 'Apache Version 2.0' +summary 'NTP Module' +description 'NTP Module for Debian, Ubuntu, CentOS, RHEL, OEL, Fedora, FreeBSD, ArchLinux and Gentoo.' +project_page 'http://github.com/puppetlabs/puppetlabs-ntp' + +## Add dependencies, if any: +dependency 'puppetlabs/stdlib', '>= 0.1.6' diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/ntp/README.markdown b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/ntp/README.markdown new file mode 100644 index 00000000000..e25e3c43ba8 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/ntp/README.markdown @@ -0,0 +1,227 @@ +#ntp + +####Table of Contents + +1. [Overview](#overview) +2. [Module Description - What the module does and why it is useful](#module-description) +3. [Setup - The basics of getting started with ntp](#setup) + * [What ntp affects](#what-ntp-affects) + * [Setup requirements](#setup-requirements) + * [Beginning with ntp](#beginning-with-ntp) +4. [Usage - Configuration options and additional functionality](#usage) +5. [Reference - An under-the-hood peek at what the module is doing and how](#reference) +5. [Limitations - OS compatibility, etc.](#limitations) +6. [Development - Guide for contributing to the module](#development) + +##Overview + +The ntp module installs, configures, and manages the NTP service. + +##Module Description + +The ntp module handles installing, configuring, and running NTP across a range of operating systems and distributions. + +##Setup + +###What ntp affects + +* ntp package. +* ntp configuration file. +* ntp service. + +###Beginning with ntp + +`include '::ntp'` is enough to get you up and running. If you wish to pass in +parameters specifying which servers to use, then: + +```puppet +class { '::ntp': + servers => [ 'ntp1.corp.com', 'ntp2.corp.com' ], +} +``` + +##Usage + +All interaction with the ntp module can do be done through the main ntp class. +This means you can simply toggle the options in `::ntp` to have full functionality of the module. + +###I just want NTP, what's the minimum I need? + +```puppet +include '::ntp' +``` + +###I just want to tweak the servers, nothing else. + +```puppet +class { '::ntp': + servers => [ 'ntp1.corp.com', 'ntp2.corp.com' ], +} +``` + +###I'd like to make sure I restrict who can connect as well. + +```puppet +class { '::ntp': + servers => [ 'ntp1.corp.com', 'ntp2.corp.com' ], + restrict => ['127.0.0.1'], +} +``` + +###I'd like to opt out of having the service controlled; we use another tool for that. + +```puppet +class { '::ntp': + servers => [ 'ntp1.corp.com', 'ntp2.corp.com' ], + restrict => ['127.0.0.1'], + manage_service => false, +} +``` + +###Looks great! But I'd like a different template; we need to do something unique here. + +```puppet +class { '::ntp': + servers => [ 'ntp1.corp.com', 'ntp2.corp.com' ], + restrict => ['127.0.0.1'], + manage_service => false, + config_template => 'different/module/custom.template.erb', +} +``` + +##Reference + +###Classes + +####Public Classes + +* ntp: Main class, includes all other classes. + +####Private Classes + +* ntp::install: Handles the packages. +* ntp::config: Handles the configuration file. +* ntp::service: Handles the service. + +###Parameters + +The following parameters are available in the ntp module: + +####`autoupdate` + +**Deprecated:** This parameter determined whether the ntp module should be +automatically updated to the latest version available. Replaced by `package_ensure`. + +####`config` + +Sets the file that ntp configuration is written into. + +####`config_template` + +Determines which template Puppet should use for the ntp configuration. + +####`driftfile` + +Sets the location of the drift file for ntp. + +####`keys_controlkey` + +The key to use as the control key. + +####`keys_enable` + +Whether the ntp keys functionality is enabled. + +####`keys_file` + +Location of the keys file. + +####`keys_requestkey` + +Which of the keys is the request key. + +#### `keys_trusted` + +Array of trusted keys. + +####`package_ensure` + +Sets the ntp package to be installed. Can be set to 'present', 'latest', or a specific version. + +####`package_name` + +Determines the name of the package to install. + +####`panic` + +Determines if ntp should 'panic' in the event of a very large clock skew. +This defaults to false for virtual machines, as they don't do a great job with keeping time. + +####`preferred_servers` + +List of ntp servers to prefer. Will append 'prefer' for any server in this list +that also appears in the servers list. + +####`restrict` + +Sets the restrict options in the ntp configuration. The lines are +prefixed with 'restrict', so you just need to list the rest of the restriction. + +####`servers` + +Selects the servers to use for ntp peers. + +####`service_enable` + +Determines if the service should be enabled at boot. + +####`service_ensure` + +Determines if the service should be running or not. + +####`service_manage` + +Selects whether Puppet should manage the service. + +####`service_name` + +Selects the name of the ntp service for Puppet to manage. + +####`udlc` + +Enables configs for undisciplined local clock, regardless of +status as a virtual machine. + + +##Limitations + +This module has been built on and tested against Puppet 2.7 and higher. + +The module has been tested on: + +* RedHat Enterprise Linux 5/6 +* Debian 6/7 +* CentOS 5/6 +* Ubuntu 12.04 +* Gentoo +* Arch Linux +* FreeBSD + +Testing on other platforms has been light and cannot be guaranteed. + +##Development + +Puppet Labs modules on the Puppet Forge are open projects, and community +contributions are essential for keeping them great. We can’t access the +huge number of platforms and myriad of hardware, software, and deployment +configurations that Puppet is intended to serve. + +We want to keep it as easy as possible to contribute changes so that our +modules work in your environment. There are a few guidelines that we need +contributors to follow so that we can have a chance of keeping on top of things. + +You can read the complete module contribution guide [on the Puppet Labs wiki.](http://projects.puppetlabs.com/projects/module-site/wiki/Module_contributing) + +###Contributors + +The list of contributors can be found at: [https://github.com/puppetlabs/puppetlabs-ntp/graphs/contributors](https://github.com/puppetlabs/puppetlabs-ntp/graphs/contributors) diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/ntp/Rakefile b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/ntp/Rakefile new file mode 100644 index 00000000000..cd3d3799589 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/ntp/Rakefile @@ -0,0 +1 @@ +require 'puppetlabs_spec_helper/rake_tasks' diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/ntp/manifests/config.pp b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/ntp/manifests/config.pp new file mode 100644 index 00000000000..fbb01fe8ead --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/ntp/manifests/config.pp @@ -0,0 +1,24 @@ +# +class ntp::config inherits ntp { + + if $keys_enable { + # Workaround for the lack of dirname() in stdlib 3.2. + $directory = inline_template('<%= File.dirname(keys_file) %>') + file { $directory: + ensure => directory, + owner => 0, + group => 0, + mode => '0755', + recurse => true, + } + } + + file { $config: + ensure => file, + owner => 0, + group => 0, + mode => '0644', + content => template($config_template), + } + +} diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/ntp/manifests/init.pp b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/ntp/manifests/init.pp new file mode 100644 index 00000000000..74c9d7c4f92 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/ntp/manifests/init.pp @@ -0,0 +1,56 @@ +class ntp ( + $autoupdate = $ntp::params::autoupdate, + $config = $ntp::params::config, + $config_template = $ntp::params::config_template, + $driftfile = $ntp::params::driftfile, + $keys_enable = $ntp::params::keys_enable, + $keys_file = $ntp::params::keys_file, + $keys_controlkey = $ntp::params::keys_controlkey, + $keys_requestkey = $ntp::params::keys_requestkey, + $keys_trusted = $ntp::params::keys_trusted, + $package_ensure = $ntp::params::package_ensure, + $package_name = $ntp::params::package_name, + $panic = $ntp::params::panic, + $preferred_servers = $ntp::params::preferred_servers, + $restrict = $ntp::params::restrict, + $servers = $ntp::params::servers, + $service_enable = $ntp::params::service_enable, + $service_ensure = $ntp::params::service_ensure, + $service_manage = $ntp::params::service_manage, + $service_name = $ntp::params::service_name, + $udlc = $ntp::params::udlc +) inherits ntp::params { + + validate_absolute_path($config) + validate_string($config_template) + validate_absolute_path($driftfile) + validate_bool($keys_enable) + validate_re($keys_controlkey, ['^\d+$', '']) + validate_re($keys_requestkey, ['^\d+$', '']) + validate_array($keys_trusted) + validate_string($package_ensure) + validate_array($package_name) + validate_bool($panic) + validate_array($preferred_servers) + validate_array($restrict) + validate_array($servers) + validate_bool($service_enable) + validate_string($service_ensure) + validate_bool($service_manage) + validate_string($service_name) + validate_bool($udlc) + + if $autoupdate { + notice('autoupdate parameter has been deprecated and replaced with package_ensure. Set this to latest for the same behavior as autoupdate => true.') + } + + # Anchor this as per #8040 - this ensures that classes won't float off and + # mess everything up. You can read about this at: + # http://docs.puppetlabs.com/puppet/2.7/reference/lang_containment.html#known-issues + anchor { 'ntp::begin': } -> + class { '::ntp::install': } -> + class { '::ntp::config': } ~> + class { '::ntp::service': } -> + anchor { 'ntp::end': } + +} diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/ntp/manifests/install.pp b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/ntp/manifests/install.pp new file mode 100644 index 00000000000..098949c398e --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/ntp/manifests/install.pp @@ -0,0 +1,9 @@ +# +class ntp::install inherits ntp { + + package { 'ntp': + ensure => $package_ensure, + name => $package_name, + } + +} diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/ntp/manifests/params.pp b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/ntp/manifests/params.pp new file mode 100644 index 00000000000..b8ae5032ca2 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/ntp/manifests/params.pp @@ -0,0 +1,185 @@ +class ntp::params { + + $autoupdate = false + $config_template = 'ntp/ntp.conf.erb' + $keys_enable = false + $keys_controlkey = '' + $keys_requestkey = '' + $keys_trusted = [] + $package_ensure = 'present' + $preferred_servers = [] + $service_enable = true + $service_ensure = 'running' + $service_manage = true + $udlc = false + + # On virtual machines allow large clock skews. + $panic = str2bool($::is_virtual) ? { + true => false, + default => true, + } + + case $::osfamily { + 'AIX': { + $config = '/etc/ntp.conf' + $keysfile = '/etc/ntp.keys' + $driftfile = '/etc/ntp.drift' + $package_name = [ 'bos.net.tcp.client' ] + $restrict = [ + 'default nomodify notrap nopeer noquery', + '127.0.0.1', + ] + $service_name = 'xntpd' + $servers = [ + '0.debian.pool.ntp.org iburst', + '1.debian.pool.ntp.org iburst', + '2.debian.pool.ntp.org iburst', + '3.debian.pool.ntp.org iburst', + ] + } + 'Debian': { + $config = '/etc/ntp.conf' + $keys_file = '/etc/ntp/keys' + $driftfile = '/var/lib/ntp/drift' + $package_name = [ 'ntp' ] + $restrict = [ + 'default kod nomodify notrap nopeer noquery', + '-6 default kod nomodify notrap nopeer noquery', + '127.0.0.1', + '-6 ::1', + ] + $service_name = 'ntp' + $servers = [ + '0.debian.pool.ntp.org iburst', + '1.debian.pool.ntp.org iburst', + '2.debian.pool.ntp.org iburst', + '3.debian.pool.ntp.org iburst', + ] + } + 'RedHat': { + $config = '/etc/ntp.conf' + $driftfile = '/var/lib/ntp/drift' + $keys_file = '/etc/ntp/keys' + $package_name = [ 'ntp' ] + $restrict = [ + 'default kod nomodify notrap nopeer noquery', + '-6 default kod nomodify notrap nopeer noquery', + '127.0.0.1', + '-6 ::1', + ] + $service_name = 'ntpd' + $servers = [ + '0.centos.pool.ntp.org', + '1.centos.pool.ntp.org', + '2.centos.pool.ntp.org', + ] + } + 'SuSE': { + $config = '/etc/ntp.conf' + $driftfile = '/var/lib/ntp/drift/ntp.drift' + $keys_file = '/etc/ntp/keys' + $package_name = [ 'ntp' ] + $restrict = [ + 'default kod nomodify notrap nopeer noquery', + '-6 default kod nomodify notrap nopeer noquery', + '127.0.0.1', + '-6 ::1', + ] + $service_name = 'ntp' + $servers = [ + '0.opensuse.pool.ntp.org', + '1.opensuse.pool.ntp.org', + '2.opensuse.pool.ntp.org', + '3.opensuse.pool.ntp.org', + ] + } + 'FreeBSD': { + $config = '/etc/ntp.conf' + $driftfile = '/var/db/ntpd.drift' + $keys_file = '/etc/ntp/keys' + $package_name = ['net/ntp'] + $restrict = [ + 'default kod nomodify notrap nopeer noquery', + '-6 default kod nomodify notrap nopeer noquery', + '127.0.0.1', + '-6 ::1', + ] + $service_name = 'ntpd' + $servers = [ + '0.freebsd.pool.ntp.org iburst maxpoll 9', + '1.freebsd.pool.ntp.org iburst maxpoll 9', + '2.freebsd.pool.ntp.org iburst maxpoll 9', + '3.freebsd.pool.ntp.org iburst maxpoll 9', + ] + } + 'Archlinux': { + $config = '/etc/ntp.conf' + $driftfile = '/var/lib/ntp/drift' + $keys_file = '/etc/ntp/keys' + $package_name = [ 'ntp' ] + $restrict = [ + 'default kod nomodify notrap nopeer noquery', + '-6 default kod nomodify notrap nopeer noquery', + '127.0.0.1', + '-6 ::1', + ] + $service_name = 'ntpd' + $servers = [ + '0.pool.ntp.org', + '1.pool.ntp.org', + '2.pool.ntp.org', + ] + } + # Gentoo was added as its own $::osfamily in Facter 1.7.0 + 'Gentoo': { + $config = '/etc/ntp.conf' + $driftfile = '/var/lib/ntp/drift' + $keys_file = '/etc/ntp/keys' + $package_name = ['net-misc/ntp'] + $restrict = [ + 'default kod nomodify notrap nopeer noquery', + '-6 default kod nomodify notrap nopeer noquery', + '127.0.0.1', + '-6 ::1', + ] + $service_name = 'ntpd' + $servers = [ + '0.gentoo.pool.ntp.org', + '1.gentoo.pool.ntp.org', + '2.gentoo.pool.ntp.org', + '3.gentoo.pool.ntp.org', + ] + } + 'Linux': { + # Account for distributions that don't have $::osfamily specific settings. + # Before Facter 1.7.0 Gentoo did not have its own $::osfamily + case $::operatingsystem { + 'Gentoo': { + $config = '/etc/ntp.conf' + $driftfile = '/var/lib/ntp/drift' + $keys_file = '/etc/ntp/keys' + $package_name = ['net-misc/ntp'] + $restrict = [ + 'default kod nomodify notrap nopeer noquery', + '-6 default kod nomodify notrap nopeer noquery', + '127.0.0.1', + '-6 ::1', + ] + $service_name = 'ntpd' + $servers = [ + '0.gentoo.pool.ntp.org', + '1.gentoo.pool.ntp.org', + '2.gentoo.pool.ntp.org', + '3.gentoo.pool.ntp.org', + ] + } + default: { + fail("The ${module_name} module is not supported on an ${::operatingsystem} distribution.") + } + } + } + default: { + fail("The ${module_name} module is not supported on an ${::osfamily} based system.") + } + } +} diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/ntp/manifests/service.pp b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/ntp/manifests/service.pp new file mode 100644 index 00000000000..3f1ada0b72d --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/ntp/manifests/service.pp @@ -0,0 +1,18 @@ +# +class ntp::service inherits ntp { + + if ! ($service_ensure in [ 'running', 'stopped' ]) { + fail('service_ensure parameter must be running or stopped') + } + + if $service_manage == true { + service { 'ntp': + ensure => $service_ensure, + enable => $service_enable, + name => $service_name, + hasstatus => true, + hasrestart => true, + } + } + +} diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/ntp/metadata.json b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/ntp/metadata.json new file mode 100644 index 00000000000..81b2675dbbe --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/ntp/metadata.json @@ -0,0 +1,84 @@ +{ + "operatingsystem_support": [ + { + "operatingsystem": "RedHat", + "operatingsystemrelease": [ + "5", + "6" + ] + }, + { + "operatingsystem": "CentOS", + "operatingsystemrelease": [ + "5", + "6" + ] + }, + { + "operatingsystem": "OracleLinux", + "operatingsystemrelease": [ + "5", + "6" + ] + }, + { + "operatingsystem": "Scientific", + "operatingsystemrelease": [ + "5", + "6" + ] + }, + { + "operatingsystem": "SLES", + "operatingsystemrelease": [ + "11 SP1" + ] + }, + { + "operatingsystem": "Debian", + "operatingsystemrelease": [ + "6", + "7" + ] + }, + { + "operatingsystem": "Ubuntu", + "operatingsystemrelease": [ + "10.04", + "12.04" + ] + }, + { + "operatingsystem": "AIX", + "operatingsystemrelease": [ + "5.3", + "6.1", + "7.1" + ] + } + ], + "requirements": [ + { + "name": "pe", + "version_requirement": "3.2.x" + }, + { + "name": "puppet", + "version_requirement": "3.x" + } + ], + "name": "puppetlabs-ntp", + "version": "3.0.4", + "source": "git://github.com/puppetlabs/puppetlabs-ntp", + "author": "Puppet Labs", + "license": "Apache Version 2.0", + "summary": "NTP Module", + "description": "NTP Module for Debian, Ubuntu, CentOS, RHEL, OEL, Fedora, FreeBSD, ArchLinux and Gentoo.", + "project_page": "http://github.com/puppetlabs/puppetlabs-ntp", + "dependencies": [ + { + "name": "puppetlabs/stdlib", + "version_requirement": ">= 0.1.6" + } + ] +} diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/ntp/spec/acceptance/class_spec.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/ntp/spec/acceptance/class_spec.rb new file mode 100644 index 00000000000..e61f9db5bc1 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/ntp/spec/acceptance/class_spec.rb @@ -0,0 +1,36 @@ +require 'spec_helper_acceptance' + +describe 'ntp class:', :unless => UNSUPPORTED_PLATFORMS.include?(fact('osfamily')) do + it 'should run successfully' do + pp = "class { 'ntp': }" + + # Apply twice to ensure no errors the second time. + apply_manifest(pp, :catch_failures => true) do |r| + expect(r.stderr).to eq("") + end + apply_manifest(pp, :catch_failures => true) do |r| + expect(r.stderr).to eq("") + expect(r.exit_code).to be_zero + end + end + + context 'service_ensure => stopped:' do + it 'runs successfully' do + pp = "class { 'ntp': service_ensure => stopped }" + + apply_manifest(pp, :catch_failures => true) do |r| + expect(r.stderr).to eq("") + end + end + end + + context 'service_ensure => running:' do + it 'runs successfully' do + pp = "class { 'ntp': service_ensure => running }" + + apply_manifest(pp, :catch_failures => true) do |r| + expect(r.stderr).to eq("") + end + end + end +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/ntp/spec/acceptance/nodesets/centos-64-x64-pe.yml b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/ntp/spec/acceptance/nodesets/centos-64-x64-pe.yml new file mode 100644 index 00000000000..7d9242f1b95 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/ntp/spec/acceptance/nodesets/centos-64-x64-pe.yml @@ -0,0 +1,12 @@ +HOSTS: + centos-64-x64: + roles: + - master + - database + - dashboard + platform: el-6-x86_64 + box : centos-64-x64-vbox4210-nocm + box_url : http://puppet-vagrant-boxes.puppetlabs.com/centos-64-x64-vbox4210-nocm.box + hypervisor : vagrant +CONFIG: + type: pe diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/ntp/spec/acceptance/nodesets/centos-64-x64.yml b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/ntp/spec/acceptance/nodesets/centos-64-x64.yml new file mode 100644 index 00000000000..05540ed8c5a --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/ntp/spec/acceptance/nodesets/centos-64-x64.yml @@ -0,0 +1,10 @@ +HOSTS: + centos-64-x64: + roles: + - master + platform: el-6-x86_64 + box : centos-64-x64-vbox4210-nocm + box_url : http://puppet-vagrant-boxes.puppetlabs.com/centos-64-x64-vbox4210-nocm.box + hypervisor : vagrant +CONFIG: + type: foss diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/ntp/spec/acceptance/nodesets/centos-65-x64.yml b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/ntp/spec/acceptance/nodesets/centos-65-x64.yml new file mode 100644 index 00000000000..4e2cb809e85 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/ntp/spec/acceptance/nodesets/centos-65-x64.yml @@ -0,0 +1,10 @@ +HOSTS: + centos-65-x64: + roles: + - master + platform: el-6-x86_64 + box : centos-65-x64-vbox436-nocm + box_url : http://puppet-vagrant-boxes.puppetlabs.com/centos-65-x64-virtualbox-nocm.box + hypervisor : vagrant +CONFIG: + type: foss diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/ntp/spec/acceptance/nodesets/default.yml b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/ntp/spec/acceptance/nodesets/default.yml new file mode 100644 index 00000000000..05540ed8c5a --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/ntp/spec/acceptance/nodesets/default.yml @@ -0,0 +1,10 @@ +HOSTS: + centos-64-x64: + roles: + - master + platform: el-6-x86_64 + box : centos-64-x64-vbox4210-nocm + box_url : http://puppet-vagrant-boxes.puppetlabs.com/centos-64-x64-vbox4210-nocm.box + hypervisor : vagrant +CONFIG: + type: foss diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/ntp/spec/acceptance/nodesets/fedora-18-x64.yml b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/ntp/spec/acceptance/nodesets/fedora-18-x64.yml new file mode 100644 index 00000000000..13616498307 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/ntp/spec/acceptance/nodesets/fedora-18-x64.yml @@ -0,0 +1,10 @@ +HOSTS: + fedora-18-x64: + roles: + - master + platform: fedora-18-x86_64 + box : fedora-18-x64-vbox4210-nocm + box_url : http://puppet-vagrant-boxes.puppetlabs.com/fedora-18-x64-vbox4210-nocm.box + hypervisor : vagrant +CONFIG: + type: foss diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/ntp/spec/acceptance/nodesets/sles-11-x64.yml b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/ntp/spec/acceptance/nodesets/sles-11-x64.yml new file mode 100644 index 00000000000..41abe2135e2 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/ntp/spec/acceptance/nodesets/sles-11-x64.yml @@ -0,0 +1,10 @@ +HOSTS: + sles-11-x64.local: + roles: + - master + platform: sles-11-x64 + box : sles-11sp1-x64-vbox4210-nocm + box_url : http://puppet-vagrant-boxes.puppetlabs.com/sles-11sp1-x64-vbox4210-nocm.box + hypervisor : vagrant +CONFIG: + type: foss diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/ntp/spec/acceptance/nodesets/ubuntu-server-10044-x64.yml b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/ntp/spec/acceptance/nodesets/ubuntu-server-10044-x64.yml new file mode 100644 index 00000000000..5ca1514e407 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/ntp/spec/acceptance/nodesets/ubuntu-server-10044-x64.yml @@ -0,0 +1,10 @@ +HOSTS: + ubuntu-server-10044-x64: + roles: + - master + platform: ubuntu-10.04-amd64 + box : ubuntu-server-10044-x64-vbox4210-nocm + box_url : http://puppet-vagrant-boxes.puppetlabs.com/ubuntu-server-10044-x64-vbox4210-nocm.box + hypervisor : vagrant +CONFIG: + type: foss diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/ntp/spec/acceptance/nodesets/ubuntu-server-12042-x64.yml b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/ntp/spec/acceptance/nodesets/ubuntu-server-12042-x64.yml new file mode 100644 index 00000000000..d065b304f83 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/ntp/spec/acceptance/nodesets/ubuntu-server-12042-x64.yml @@ -0,0 +1,10 @@ +HOSTS: + ubuntu-server-12042-x64: + roles: + - master + platform: ubuntu-12.04-amd64 + box : ubuntu-server-12042-x64-vbox4210-nocm + box_url : http://puppet-vagrant-boxes.puppetlabs.com/ubuntu-server-12042-x64-vbox4210-nocm.box + hypervisor : vagrant +CONFIG: + type: foss diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/ntp/spec/acceptance/ntp_config_spec.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/ntp/spec/acceptance/ntp_config_spec.rb new file mode 100644 index 00000000000..196ba76584a --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/ntp/spec/acceptance/ntp_config_spec.rb @@ -0,0 +1,36 @@ +require 'spec_helper_acceptance' + +case fact('osfamily') +when 'FreeBSD' + line = '0.freebsd.pool.ntp.org iburst maxpoll 9' +when 'Debian' + line = '0.debian.pool.ntp.org iburst' +when 'RedHat' + line = '0.centos.pool.ntp.org' +when 'SuSE' + line = '0.opensuse.pool.ntp.org' +when 'Gentoo' + line = '0.gentoo.pool.ntp.org' +when 'Linux' + case fact('operatingsystem') + when 'ArchLinux' + line = '0.pool.ntp.org' + when 'Gentoo' + line = '0.gentoo.pool.ntp.org' + end +when 'AIX' + line = '0.debian.pool.ntp.org iburst' +end + +describe 'ntp::config class', :unless => UNSUPPORTED_PLATFORMS.include?(fact('osfamily')) do + it 'sets up ntp.conf' do + apply_manifest(%{ + class { 'ntp': } + }, :catch_failures => true) + end + + describe file('/etc/ntp.conf') do + it { should be_file } + it { should contain line } + end +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/ntp/spec/acceptance/ntp_install_spec.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/ntp/spec/acceptance/ntp_install_spec.rb new file mode 100644 index 00000000000..1a451bbb23f --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/ntp/spec/acceptance/ntp_install_spec.rb @@ -0,0 +1,31 @@ +require 'spec_helper_acceptance' + +case fact('osfamily') +when 'FreeBSD' + packagename = 'net/ntp' +when 'Gentoo' + packagename = 'net-misc/ntp' +when 'Linux' + case fact('operatingsystem') + when 'ArchLinux' + packagename = 'ntp' + when 'Gentoo' + packagename = 'net-misc/ntp' + end +when 'AIX' + packagename = 'bos.net.tcp.client' +else + packagename = 'ntp' +end + +describe 'ntp::install class', :unless => UNSUPPORTED_PLATFORMS.include?(fact('osfamily')) do + it 'installs the package' do + apply_manifest(%{ + class { 'ntp': } + }, :catch_failures => true) + end + + describe package(packagename) do + it { should be_installed } + end +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/ntp/spec/acceptance/ntp_parameters_spec.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/ntp/spec/acceptance/ntp_parameters_spec.rb new file mode 100644 index 00000000000..71a6b202aa0 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/ntp/spec/acceptance/ntp_parameters_spec.rb @@ -0,0 +1,165 @@ +require 'spec_helper_acceptance' + +case fact('osfamily') +when 'FreeBSD' + packagename = 'net/ntp' +when 'Gentoo' + packagename = 'net-misc/ntp' +when 'Linux' + case fact('operatingsystem') + when 'ArchLinux' + packagename = 'ntp' + when 'Gentoo' + packagename = 'net-misc/ntp' + end +when 'AIX' + packagename = 'bos.net.tcp.client' +else + packagename = 'ntp' +end + +describe "ntp class:", :unless => UNSUPPORTED_PLATFORMS.include?(fact('osfamily')) do + it 'applies successfully' do + pp = "class { 'ntp': }" + + apply_manifest(pp, :catch_failures => true) do |r| + expect(r.stderr).to eq("") + end + end + + describe 'autoconfig' do + it 'raises a deprecation warning' do + pp = "class { 'ntp': autoupdate => true }" + + apply_manifest(pp, :catch_failures => true) do |r| + expect(r.stdout).to match(/autoupdate parameter has been deprecated and replaced with package_ensure/) + end + end + end + + describe 'config' do + it 'sets the ntp.conf location' do + pp = "class { 'ntp': config => '/etc/antp.conf' }" + apply_manifest(pp, :catch_failures => true) + end + + describe file('/etc/antp.conf') do + it { should be_file } + end + end + + describe 'config_template' do + it 'sets up template' do + modulepath = default['distmoduledir'] + shell("mkdir -p #{modulepath}/test/templates") + shell("echo 'testcontent' >> #{modulepath}/test/templates/ntp.conf") + end + + it 'sets the ntp.conf location' do + pp = "class { 'ntp': config_template => 'test/ntp.conf' }" + apply_manifest(pp, :catch_failures => true) + end + + describe file('/etc/ntp.conf') do + it { should be_file } + it { should contain 'testcontent' } + end + end + + describe 'driftfile' do + it 'sets the driftfile location' do + pp = "class { 'ntp': driftfile => '/tmp/driftfile' }" + apply_manifest(pp, :catch_failures => true) + end + + describe file('/etc/ntp.conf') do + it { should be_file } + it { should contain 'driftfile /tmp/driftfile' } + end + end + + describe 'keys' do + it 'enables the key parameters' do + pp = <<-EOS + class { 'ntp': + keys_enable => true, + keys_file => '/etc/ntp/keys', + keys_controlkey => '/etc/ntp/controlkey', + keys_requestkey => '1', + keys_trusted => [ '1', '2' ], + } + EOS + # Rely on a shell command instead of a file{} here to avoid loops + # within puppet when it tries to manage /etc/ntp/keys before /etc/ntp. + shell("mkdir -p /etc/ntp && echo '1 M AAAABBBB' >> /etc/ntp/keys") + apply_manifest(pp, :catch_failures => true) + end + + describe file('/etc/ntp.conf') do + it { should be_file } + it { should contain 'keys /etc/ntp/keys' } + it { should contain 'controlkey /etc/ntp/controlkey' } + it { should contain 'requestkey 1' } + it { should contain 'trustedkey 1 2' } + end + end + + describe 'package' do + it 'installs the right package' do + pp = <<-EOS + class { 'ntp': + package_ensure => present, + package_name => ['#{packagename}'], + } + EOS + apply_manifest(pp, :catch_failures => true) + end + + describe package(packagename) do + it { should be_installed } + end + end + + describe 'panic => false' do + it 'enables the tinker panic setting' do + pp = <<-EOS + class { 'ntp': + panic => false, + } + EOS + apply_manifest(pp, :catch_failures => true) + end + + describe file('/etc/ntp.conf') do + it { should contain 'tinker panic' } + end + end + + describe 'panic => true' do + it 'disables the tinker panic setting' do + pp = <<-EOS + class { 'ntp': + panic => true, + } + EOS + apply_manifest(pp, :catch_failures => true) + end + + describe file('/etc/ntp.conf') do + it { should_not contain 'tinker panic 0' } + end + end + + describe 'udlc' do + it 'adds a udlc' do + pp = "class { 'ntp': udlc => true }" + apply_manifest(pp, :catch_failures => true) + end + + describe file('/etc/ntp.conf') do + it { should be_file } + it { should contain '127.127.1.0' } + end + end + +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/ntp/spec/acceptance/ntp_service_spec.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/ntp/spec/acceptance/ntp_service_spec.rb new file mode 100644 index 00000000000..cac12de5dcf --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/ntp/spec/acceptance/ntp_service_spec.rb @@ -0,0 +1,63 @@ +require 'spec_helper_acceptance' + +case fact('osfamily') +when 'RedHat', 'FreeBSD', 'Linux', 'Gentoo' + servicename = 'ntpd' +when 'AIX' + servicename = 'xntpd' +else + servicename = 'ntp' +end + +describe 'ntp::service class', :unless => UNSUPPORTED_PLATFORMS.include?(fact('osfamily')) do + describe 'basic test' do + it 'sets up the service' do + apply_manifest(%{ + class { 'ntp': } + }, :catch_failures => true) + end + + describe service(servicename) do + it { should be_enabled } + it { should be_running } + end + end + + describe 'service parameters' do + it 'starts the service' do + pp = <<-EOS + class { 'ntp': + service_enable => true, + service_ensure => running, + service_manage => true, + service_name => '#{servicename}' + } + EOS + apply_manifest(pp, :catch_failures => true) + end + + describe service(servicename) do + it { should be_running } + it { should be_enabled } + end + end + + describe 'service is unmanaged' do + it 'shouldnt stop the service' do + pp = <<-EOS + class { 'ntp': + service_enable => false, + service_ensure => stopped, + service_manage => false, + service_name => '#{servicename}' + } + EOS + apply_manifest(pp, :catch_failures => true) + end + + describe service(servicename) do + it { should be_running } + it { should be_enabled } + end + end +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/ntp/spec/acceptance/preferred_servers_spec.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/ntp/spec/acceptance/preferred_servers_spec.rb new file mode 100644 index 00000000000..7994acedbec --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/ntp/spec/acceptance/preferred_servers_spec.rb @@ -0,0 +1,24 @@ +require 'spec_helper_acceptance' + +describe 'preferred servers', :unless => UNSUPPORTED_PLATFORMS.include?(fact('osfamily')) do + pp = <<-EOS + class { '::ntp': + servers => ['a', 'b', 'c', 'd'], + preferred_servers => ['c', 'd'], + } + EOS + + it 'applies cleanly' do + apply_manifest(pp, :catch_failures => true) do |r| + expect(r.stderr).to eq("") + end + end + + describe file('/etc/ntp.conf') do + it { should be_file } + it { should contain 'server a' } + it { should contain 'server b' } + it { should contain 'server c prefer' } + it { should contain 'server d prefer' } + end +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/ntp/spec/acceptance/restrict_spec.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/ntp/spec/acceptance/restrict_spec.rb new file mode 100644 index 00000000000..753b1b3d011 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/ntp/spec/acceptance/restrict_spec.rb @@ -0,0 +1,20 @@ +require 'spec_helper_acceptance' + +describe "ntp class with restrict:", :unless => UNSUPPORTED_PLATFORMS.include?(fact('osfamily')) do + context 'should run successfully' do + pp = "class { 'ntp': restrict => ['test restrict']}" + + it 'runs twice' do + 2.times do + apply_manifest(pp, :catch_failures => true) do |r| + expect(r.stderr).to be_empty + end + end + end + end + + describe file('/etc/ntp.conf') do + it { should contain('test restrict') } + end + +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/ntp/spec/acceptance/unsupported_spec.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/ntp/spec/acceptance/unsupported_spec.rb new file mode 100644 index 00000000000..5f4490dee61 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/ntp/spec/acceptance/unsupported_spec.rb @@ -0,0 +1,10 @@ +require 'spec_helper_acceptance' + +describe 'unsupported distributions and OSes', :if => UNSUPPORTED_PLATFORMS.include?(fact('osfamily')) do + it 'should fail' do + pp = <<-EOS + class { 'ntp': } + EOS + expect(apply_manifest(pp, :expect_failures => true).stderr).to match(/is not supported on an/i) + end +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/ntp/spec/classes/ntp_spec.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/ntp/spec/classes/ntp_spec.rb new file mode 100644 index 00000000000..5535d9b25ee --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/ntp/spec/classes/ntp_spec.rb @@ -0,0 +1,272 @@ +require 'spec_helper' + +describe 'ntp' do + + ['Debian', 'RedHat','SuSE', 'FreeBSD', 'Archlinux', 'Gentoo', 'Gentoo (Facter < 1.7)'].each do |system| + if system == 'Gentoo (Facter < 1.7)' + let(:facts) {{ :osfamily => 'Linux', :operatingsystem => 'Gentoo' }} + else + let(:facts) {{ :osfamily => system }} + end + + it { should include_class('ntp::install') } + it { should include_class('ntp::config') } + it { should include_class('ntp::service') } + + describe "ntp::config on #{system}" do + it { should contain_file('/etc/ntp.conf').with_owner('0') } + it { should contain_file('/etc/ntp.conf').with_group('0') } + it { should contain_file('/etc/ntp.conf').with_mode('0644') } + + describe 'allows template to be overridden' do + let(:params) {{ :config_template => 'my_ntp/ntp.conf.erb' }} + it { should contain_file('/etc/ntp.conf').with({ + 'content' => /server foobar/}) + } + end + + describe "keys for osfamily #{system}" do + context "when enabled" do + let(:params) {{ + :keys_enable => true, + :keys_file => '/etc/ntp/ntp.keys', + :keys_trusted => ['1', '2', '3'], + :keys_controlkey => '2', + :keys_requestkey => '3', + }} + + it { should contain_file('/etc/ntp').with({ + 'ensure' => 'directory'}) + } + it { should contain_file('/etc/ntp.conf').with({ + 'content' => /trustedkey 1 2 3/}) + } + it { should contain_file('/etc/ntp.conf').with({ + 'content' => /controlkey 2/}) + } + it { should contain_file('/etc/ntp.conf').with({ + 'content' => /requestkey 3/}) + } + end + end + + context "when disabled" do + let(:params) {{ + :keys_enable => false, + :keys_file => '/etc/ntp/ntp.keys', + :keys_trusted => ['1', '2', '3'], + :keys_controlkey => '2', + :keys_requestkey => '3', + }} + + it { should_not contain_file('/etc/ntp').with({ + 'ensure' => 'directory'}) + } + it { should_not contain_file('/etc/ntp.conf').with({ + 'content' => /trustedkey 1 2 3/}) + } + it { should_not contain_file('/etc/ntp.conf').with({ + 'content' => /controlkey 2/}) + } + it { should_not contain_file('/etc/ntp.conf').with({ + 'content' => /requestkey 3/}) + } + end + + describe 'preferred servers' do + context "when set" do + let(:params) {{ + :servers => ['a', 'b', 'c', 'd'], + :preferred_servers => ['a', 'b'] + }} + + it { should contain_file('/etc/ntp.conf').with({ + 'content' => /server a prefer\nserver b prefer\nserver c\nserver d/}) + } + end + context "when not set" do + let(:params) {{ + :servers => ['a', 'b', 'c', 'd'], + :preferred_servers => [] + }} + + it { should_not contain_file('/etc/ntp.conf').with({ + 'content' => /server a prefer/}) + } + end + end + + describe "ntp::install on #{system}" do + let(:params) {{ :package_ensure => 'present', :package_name => ['ntp'], }} + + it { should contain_package('ntp').with( + :ensure => 'present', + :name => 'ntp' + )} + + describe 'should allow package ensure to be overridden' do + let(:params) {{ :package_ensure => 'latest', :package_name => ['ntp'] }} + it { should contain_package('ntp').with_ensure('latest') } + end + + describe 'should allow the package name to be overridden' do + let(:params) {{ :package_ensure => 'present', :package_name => ['hambaby'] }} + it { should contain_package('ntp').with_name('hambaby') } + end + end + + describe 'ntp::service' do + let(:params) {{ + :service_manage => true, + :service_enable => true, + :service_ensure => 'running', + :service_name => 'ntp' + }} + + describe 'with defaults' do + it { should contain_service('ntp').with( + :enable => true, + :ensure => 'running', + :name => 'ntp' + )} + end + + describe 'service_ensure' do + describe 'when overridden' do + let(:params) {{ :service_name => 'ntp', :service_ensure => 'stopped' }} + it { should contain_service('ntp').with_ensure('stopped') } + end + end + + describe 'service_manage' do + let(:params) {{ + :service_manage => false, + :service_enable => true, + :service_ensure => 'running', + :service_name => 'ntpd', + }} + + it 'when set to false' do + should_not contain_service('ntp').with({ + 'enable' => true, + 'ensure' => 'running', + 'name' => 'ntpd' + }) + end + end + end + end + + context 'ntp::config' do + describe "for operating system Gentoo (Facter < 1.7)" do + let(:facts) {{ :operatingsystem => 'Gentoo', + :osfamily => 'Linux' }} + + it 'uses the NTP pool servers by default' do + should contain_file('/etc/ntp.conf').with({ + 'content' => /server \d.gentoo.pool.ntp.org/, + }) + end + end + + describe "on osfamily Gentoo" do + let(:facts) {{ :osfamily => 'Gentoo' }} + + it 'uses the NTP pool servers by default' do + should contain_file('/etc/ntp.conf').with({ + 'content' => /server \d.gentoo.pool.ntp.org/, + }) + end + end + + describe "on osfamily Debian" do + let(:facts) {{ :osfamily => 'debian' }} + + it 'uses the debian ntp servers by default' do + should contain_file('/etc/ntp.conf').with({ + 'content' => /server \d.debian.pool.ntp.org iburst/, + }) + end + end + + describe "on osfamily RedHat" do + let(:facts) {{ :osfamily => 'RedHat' }} + + it 'uses the redhat ntp servers by default' do + should contain_file('/etc/ntp.conf').with({ + 'content' => /server \d.centos.pool.ntp.org/, + }) + end + end + + describe "on osfamily SuSE" do + let(:facts) {{ :osfamily => 'SuSE' }} + + it 'uses the opensuse ntp servers by default' do + should contain_file('/etc/ntp.conf').with({ + 'content' => /server \d.opensuse.pool.ntp.org/, + }) + end + end + + describe "on osfamily FreeBSD" do + let(:facts) {{ :osfamily => 'FreeBSD' }} + + it 'uses the freebsd ntp servers by default' do + should contain_file('/etc/ntp.conf').with({ + 'content' => /server \d.freebsd.pool.ntp.org iburst maxpoll 9/, + }) + end + end + + describe "on osfamily ArchLinux" do + let(:facts) {{ :osfamily => 'ArchLinux' }} + + it 'uses the NTP pool servers by default' do + should contain_file('/etc/ntp.conf').with({ + 'content' => /server \d.pool.ntp.org/, + }) + end + end + + describe "for operating system family unsupported" do + let(:facts) {{ + :osfamily => 'unsupported', + }} + + it { expect{ subject }.to raise_error( + /^The ntp module is not supported on an unsupported based system./ + )} + end + end + + describe 'for virtual machines' do + let(:facts) {{ :osfamily => 'Archlinux', + :is_virtual => 'true' }} + + it 'should not use local clock as a time source' do + should_not contain_file('/etc/ntp.conf').with({ + 'content' => /server.*127.127.1.0.*fudge.*127.127.1.0 stratum 10/, + }) + end + + it 'allows large clock skews' do + should contain_file('/etc/ntp.conf').with({ + 'content' => /tinker panic 0/, + }) + end + end + + describe 'for physical machines' do + let(:facts) {{ :osfamily => 'Archlinux', + :is_virtual => 'false' }} + + it 'disallows large clock skews' do + should_not contain_file('/etc/ntp.conf').with({ + 'content' => /tinker panic 0/, + }) + end + end + end + +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/ntp/spec/fixtures/modules/my_ntp/templates/ntp.conf.erb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/ntp/spec/fixtures/modules/my_ntp/templates/ntp.conf.erb new file mode 100644 index 00000000000..40cf67c6d0a --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/ntp/spec/fixtures/modules/my_ntp/templates/ntp.conf.erb @@ -0,0 +1,4 @@ +#my uber ntp config +# + +server foobar diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/ntp/spec/spec.opts b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/ntp/spec/spec.opts new file mode 100644 index 00000000000..91cd6427ed6 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/ntp/spec/spec.opts @@ -0,0 +1,6 @@ +--format +s +--colour +--loadby +mtime +--backtrace diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/ntp/spec/spec_helper.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/ntp/spec/spec_helper.rb new file mode 100644 index 00000000000..2c6f56649ae --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/ntp/spec/spec_helper.rb @@ -0,0 +1 @@ +require 'puppetlabs_spec_helper/module_spec_helper' diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/ntp/spec/spec_helper_acceptance.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/ntp/spec/spec_helper_acceptance.rb new file mode 100644 index 00000000000..3d99cc368d0 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/ntp/spec/spec_helper_acceptance.rb @@ -0,0 +1,34 @@ +require 'beaker-rspec' + +UNSUPPORTED_PLATFORMS = [ 'windows', 'Solaris' ] + +unless ENV['RS_PROVISION'] == 'no' + hosts.each do |host| + # Install Puppet + if host.is_pe? + install_pe + else + install_package host, 'rubygems' + on host, 'gem install puppet --no-ri --no-rdoc' + on host, "mkdir -p #{host['distmoduledir']}" + end + end +end + +RSpec.configure do |c| + # Project root + proj_root = File.expand_path(File.join(File.dirname(__FILE__), '..')) + + # Readable test descriptions + c.formatter = :documentation + + # Configure all nodes in nodeset + c.before :suite do + # Install module and dependencies + puppet_module_install(:source => proj_root, :module_name => 'ntp') + hosts.each do |host| + shell("/bin/touch #{default['puppetpath']}/hiera.yaml") + shell('puppet module install puppetlabs-stdlib', :acceptable_exit_codes => [0,1]) + end + end +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/ntp/spec/unit/puppet/provider/README.markdown b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/ntp/spec/unit/puppet/provider/README.markdown new file mode 100644 index 00000000000..7025850210d --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/ntp/spec/unit/puppet/provider/README.markdown @@ -0,0 +1,4 @@ +Provider Specs +============== + +Define specs for your providers under this directory. diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/ntp/spec/unit/puppet/type/README.markdown b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/ntp/spec/unit/puppet/type/README.markdown new file mode 100644 index 00000000000..1ee19ac840f --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/ntp/spec/unit/puppet/type/README.markdown @@ -0,0 +1,4 @@ +Resource Type Specs +=================== + +Define specs for your resource types in this directory. diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/ntp/templates/ntp.conf.erb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/ntp/templates/ntp.conf.erb new file mode 100644 index 00000000000..d24126c2212 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/ntp/templates/ntp.conf.erb @@ -0,0 +1,43 @@ +# ntp.conf: Managed by puppet. +# +<% if @panic == false -%> +# Keep ntpd from panicking in the event of a large clock skew +# when a VM guest is suspended and resumed. +tinker panic 0 +<% end -%> + +<% if @restrict != [] -%> +# Permit time synchronization with our time source, but do not +# permit the source to query or modify the service on this system. +<% @restrict.flatten.each do |restrict| -%> +restrict <%= restrict %> +<% end %> +<% end -%> + +<% [@servers].flatten.each do |server| -%> +server <%= server %><% if @preferred_servers.include?(server) -%> prefer<% end %> +<% end -%> + +<% if scope.lookupvar('::is_virtual') == "false" or @udlc -%> +# Undisciplined Local Clock. This is a fake driver intended for backup +# and when no outside source of synchronized time is available. +server 127.127.1.0 +fudge 127.127.1.0 stratum 10 +restrict 127.127.1.0 +<% end -%> + +# Driftfile. +driftfile <%= @driftfile %> + +<% if @keys_enable -%> +keys <%= @keys_file %> +<% unless @keys_trusted.empty? -%> +trustedkey <%= @keys_trusted.join(' ') %> +<% end -%> +<% if @keys_requestkey != '' -%> +requestkey <%= @keys_requestkey %> +<% end -%> +<% if @keys_controlkey != '' -%> +controlkey <%= @keys_controlkey %> +<% end -%> +<% end -%> diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/ntp/tests/init.pp b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/ntp/tests/init.pp new file mode 100644 index 00000000000..e6d9b537fb2 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/ntp/tests/init.pp @@ -0,0 +1,11 @@ +node default { + + notify { 'enduser-before': } + notify { 'enduser-after': } + + class { 'ntp': + require => Notify['enduser-before'], + before => Notify['enduser-after'], + } + +} diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/php/.fixtures.yml b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/php/.fixtures.yml new file mode 100644 index 00000000000..ca9960712c4 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/php/.fixtures.yml @@ -0,0 +1,10 @@ +fixtures: + repositories: + "puppi": "git://github.com/example42/puppi.git" + "monitor": "git://github.com/example42/puppet-monitor.git" + "firewall": "git://github.com/example42/puppet-firewall.git" + "iptables": "git://github.com/example42/puppet-iptables.git" + "concat": "git://github.com/example42/puppet-concat.git" + symlinks: + "php": "#{source_dir}" + diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/php/.gemfile b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/php/.gemfile new file mode 100644 index 00000000000..459723a8e59 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/php/.gemfile @@ -0,0 +1,6 @@ +source :rubygems + +puppetversion = ENV['PUPPET_VERSION'] +gem 'puppet', puppetversion, :require => false +gem 'puppet-lint' +gem 'puppetlabs_spec_helper', '>= 0.1.0' diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/php/.project b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/php/.project new file mode 100644 index 00000000000..12b382826a1 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/php/.project @@ -0,0 +1,23 @@ + + + php + + + + + + com.puppetlabs.geppetto.pp.dsl.ui.modulefileBuilder + + + + + org.eclipse.xtext.ui.shared.xtextBuilder + + + + + + com.puppetlabs.geppetto.pp.dsl.ui.puppetNature + org.eclipse.xtext.ui.shared.xtextNature + + diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/php/.travis.yml b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/php/.travis.yml new file mode 100644 index 00000000000..dffeca98741 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/php/.travis.yml @@ -0,0 +1,21 @@ +language: ruby +rvm: + - 1.8.7 + - 1.9.3 +script: + - "rake spec SPEC_OPTS='--format documentation'" +env: + - PUPPET_VERSION="~> 2.6.0" + - PUPPET_VERSION="~> 2.7.0" + - PUPPET_VERSION="~> 3.0.0" + - PUPPET_VERSION="~> 3.1.0" +matrix: + exclude: + - rvm: 1.9.3 + env: PUPPET_VERSION="~> 2.6.0" + gemfile: .gemfile + +gemfile: .gemfile +notifications: + email: + - al@lab42.it diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/php/LICENSE b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/php/LICENSE new file mode 100644 index 00000000000..f41da018579 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/php/LICENSE @@ -0,0 +1,17 @@ +Copyright (C) 2013 Alessandro Franceschi / Lab42 + +for the relevant commits Copyright (C) by the respective authors. + +Contact Lab42 at: info@lab42.it + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/php/Modulefile b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/php/Modulefile new file mode 100644 index 00000000000..55ae20813f1 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/php/Modulefile @@ -0,0 +1,9 @@ +name 'example42-php' +version '2.0.17' +author 'Alessandro Franceschi' +license 'Apache2' +project_page 'http://www.example42.com' +source 'https://github.com/example42/puppet-php' +summary 'Puppet module for php' +description 'This module installs and manages php. Check README.rdoc for details. Puppi is required for some common functions: you can install them without using the whole module. Monitor and firewall dependencies are needed only if the relevant features are enabled' +dependency 'example42/puppi', '>= 2.0.0' diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/php/README.md b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/php/README.md new file mode 100644 index 00000000000..a211dcbc2d5 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/php/README.md @@ -0,0 +1,157 @@ +# Puppet module: php + +This is a Puppet module for php based on the second generation layout ("NextGen") of Example42 Puppet Modules. + +Made by ALessandro Franceschi / Lab42 + +Official site: http://www.example42.com + +Official git repository: http://github.com/example42/puppet-php + +Released under the terms of Apache 2 License. + +This module requires functions provided by the Example42 Puppi module (you need it even if you don't use and install Puppi) + +For detailed info about the logic and usage patterns of Example42 modules check the DOCS directory on Example42 main modules set. + +## USAGE - Basic management + +* Install php with default settings + + class { 'php': } + +* Install a specific version of php package + + class { 'php': + version => '1.0.1', + } + +* Remove php package + + class { 'php': + absent => true + } + +* Enable auditing without without making changes on existing php configuration files + + class { 'php': + audit_only => true + } + +* Install php in an nginx environment + + class { 'php': + service => 'nginx' + } + +## USAGE - Module installation + +* Install a new module + + php::module { "imagick": } + +* Install a specific version of a module: + + php::module { "imagick": + version => '1.0.1'; + } + +* Remove php module + + php::module { "imagick": + absent => true, + } + +* By default module package name is php-$title for RedHat and php5-$title . You can override this prefix. + + php::module { "apc": + module_prefix => "php-" + } + + +## USAGE - Pear Management + +* Install a pear package + + php::pear::module { "XML_Util": } + +* Install a pear package from a remote repository + + php::pear::module { 'PHPUnit': + repository => 'pear.phpunit.de', + use_package => 'no', + } + +* Install a pear package will all dependencies (--alldeps) + + php::pear::module { 'PHPUnit': + repository => 'pear.phpunit.de', + alldeps => 'true', + } + +* Set a config option + + php::pear::config { http_proxy: value => "myproxy:8080" } + + +## USAGE - Pecl Management + +* Install a pecl package + + php::pecl::module { "XML_Util": } + +* Install a pecl package from source specifying the preferred state (note that you must have the package 'make' installed on your system) + + php::pecl::module { "xhprof": + use_package => 'false', + preferred_state => 'beta', + } + +* Set a config option + + php::pecl::config { http_proxy: value => "myproxy:8080" } + + +## USAGE - Overrides and Customizations +* Use custom sources for main config file. + + class { 'php': + source => [ "puppet:///modules/lab42/php/php.conf-${hostname}" , "puppet:///modules/lab42/php/php.conf" ], + } + +* Manage php.ini files on Debian and Suse derivatives. Here the main config file path (managed with the source/template params) defaults to /etc/php5/apache2/php.ini. To manage other files, either set a different path in config_file or use the php::conf define. + + class { 'php': + config_file => '/etc/php5/apache2/php.ini', # Default value on Ubuntu/Suse + template => 'example42/php/php.ini-apache2.erb', + } + + php::conf { 'php.ini-cli': + path => '/etc/php5/cli/php.ini', + template => 'example42/php/php.ini-cli.erb', + } + +* Use custom source directory for the whole configuration dir + + class { 'php': + source_dir => 'puppet:///modules/lab42/php/conf/', + source_dir_purge => false, # Set to true to purge any existing file not present in $source_dir + } + +* Use custom template for main config file. Note that template and source arguments are alternative. + + class { 'php': + template => 'example42/php/php.conf.erb', + } + +* Automatically include a custom subclass + + class { 'php': + my_class => 'php::example42', + } + + + + + +[![Build Status](https://travis-ci.org/example42/puppet-php.png?branch=master)](https://travis-ci.org/example42/puppet-php) diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/php/Rakefile b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/php/Rakefile new file mode 100644 index 00000000000..1a8a8a0c30e --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/php/Rakefile @@ -0,0 +1,5 @@ +require 'rubygems' +require 'puppetlabs_spec_helper/rake_tasks' +require 'puppet-lint' +PuppetLint.configuration.send("disable_80chars") +PuppetLint.configuration.send('disable_class_parameter_defaults') diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/php/lib/facter/php_fact_extension_dir.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/php/lib/facter/php_fact_extension_dir.rb new file mode 100644 index 00000000000..7138a3277ee --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/php/lib/facter/php_fact_extension_dir.rb @@ -0,0 +1,5 @@ +Facter.add("php_fact_extension_dir") do + setcode do + Facter::Util::Resolution.exec('php-config --extension-dir') || nil + end +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/php/lib/facter/php_fact_version.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/php/lib/facter/php_fact_version.rb new file mode 100644 index 00000000000..c164c345f7b --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/php/lib/facter/php_fact_version.rb @@ -0,0 +1,5 @@ +Facter.add("php_fact_version") do + setcode do + Facter::Util::Resolution.exec('php-config --version') || nil + end +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/php/manifests/augeas.pp b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/php/manifests/augeas.pp new file mode 100644 index 00000000000..722d65dd35d --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/php/manifests/augeas.pp @@ -0,0 +1,76 @@ +# = Define: php::augeas +# +# Manage php.ini through augeas +# +# Here's an example how to find the augeas path to a variable: +# +# # augtool --noload +# augtool> rm /augeas/load +# rm : /augeas/load 781 +# augtool> set /augeas/load/myfile/lens @PHP +# augtool> set /augeas/load/myfile/incl /usr/local/etc/php5/cgi/php.ini +# augtool> load +# augtool> print +# ... +# /files/usr/local/etc/php5/cgi/php.ini/soap/soap.wsdl_cache_limit = "5" +# /files/usr/local/etc/php5/cgi/php.ini/ldap/ldap.max_links = "-1" +# ... +# augtool> exit +# # +# +# The part after 'php.ini/' is what you need to use as 'entry'. +# +# == Parameters +# +# [*entry*] +# Augeas path to entry to be modified. +# +# [*ensure*] +# Standard puppet ensure variable +# +# [*target*] +# Which php.ini to manipulate. Default is $php::config_file +# +# [*value*] +# Value to set +# +# == Examples +# +# php::augeas { +# 'php-memorylimit': +# entry => 'PHP/memory_limit', +# value => '128M'; +# 'php-error_log': +# entry => 'PHP/error_log', +# ensure => absent; +# 'php-sendmail_path': +# entry => 'mail function/sendmail_path', +# value => '/usr/sbin/sendmail -t -i -f info@example.com'; +# 'php-date_timezone': +# entry => 'Date/date.timezone', +# value => 'Europe/Amsterdam'; +# } +# +define php::augeas ( + $entry, + $ensure = present, + $target = $php::config_file, + $value = '', + ) { + + include php + + $service = $php::service + + $changes = $ensure ? { + present => [ "set '${entry}' '${value}'" ], + absent => [ "rm '${entry}'" ], + } + + augeas { "php_ini-${name}": + incl => $target, + lens => 'Php.lns', + changes => $changes, + } + +} diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/php/manifests/conf.pp b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/php/manifests/conf.pp new file mode 100644 index 00000000000..12514dbf55a --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/php/manifests/conf.pp @@ -0,0 +1,112 @@ +# +# = Define: php::conf +# +# With this define you can manage any php configuration file +# You have 3 parameters to provide it: source, template and content. +# +# == Parameters +# +# [*template*] +# String. Optional. Default: undef. Alternative to: source, content. +# Sets the module path of a custom template to use as content of +# the config file +# When defined, config file has: content => content($template), +# Example: template => 'site/php/my.conf.erb', +# +# [*content*] +# String. Optional. Default: undef. Alternative to: template, source. +# Sets directly the value of the file's content parameter +# When defined, config file has: content => $content, +# Example: content => "# File Managed by Puppet \n", +# +# [*source*] +# String. Optional. Default: undef. Alternative to: template, content. +# Sets the value of the file's source parameter +# When defined, config file has: source => $source, +# Example: source => 'puppet:///site/php/my.conf', +# +# [*ensure*] +# String. Default: present +# Manages config file presence. Possible values: +# * 'present' - Create and manages the file. +# * 'absent' - Remove the file. +# +# [*path*] +# String. Optional. Default: $config_dir/$title +# The path of the created config file. If not defined a file +# name like the the name of the title a custom template to use as content of configfile +# If defined, configfile file has: content => content("$template") +# +# [*mode*] [*owner*] [*group*] [*notify*] [*replace*] +# String. Optional. Default: undef +# All these parameters map directly to the created file attributes. +# If not defined the module's defaults are used. +# If defined, config file file has, for example: mode => $mode +# +# [*options_hash*] +# Hash. Default undef. Needs: 'template'. +# An hash of custom options to be used in templates to manage any key pairs of +# arbitrary settings. +# +define php::conf ( + + $source = undef, + $template = undef, + $content = undef, + + $path = undef, + $mode = undef, + $owner = undef, + $group = undef, + $notify = undef, + $replace = undef, + + $options_hash = undef, + + $ensure = present ) { + + validate_re($ensure, ['present','absent'], 'Valid values are: present, absent. WARNING: If set to absent the conf file is removed.') + + include php + + $managed_path = $path ? { + undef => "${php::config_dir}/${name}", + default => $path, + } + + $managed_content = $content ? { + undef => $template ? { + undef => undef, + default => template($template), + }, + default => $content, + } + + $managed_mode = $mode ? { + undef => $php::config_file_mode, + default => $mode, + } + + $managed_owner = $owner ? { + undef => $php::config_file_owner, + default => $owner, + } + + $managed_group = $group ? { + undef => $php::config_file_group, + default => $group, + } + + file { "php_conf_${name}": + ensure => $ensure, + source => $source, + content => $managed_content, + path => $managed_path, + mode => $managed_mode, + owner => $managed_owner, + group => $managed_group, + notify => $notify, + replace => $replace, + } + +} diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/php/manifests/devel.pp b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/php/manifests/devel.pp new file mode 100644 index 00000000000..634f35ea2de --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/php/manifests/devel.pp @@ -0,0 +1,13 @@ +# Class php::devel +# +# Installs php devel package +# +class php::devel { + + if $php::package_devel != '' + and ! defined(Package[$php::package_devel]) { + package { $php::package_devel : + ensure => $php::manage_package, + } + } +} diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/php/manifests/ini.pp b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/php/manifests/ini.pp new file mode 100644 index 00000000000..2851aa4c67e --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/php/manifests/ini.pp @@ -0,0 +1,26 @@ +# = Define: php::ini +# +define php::ini ( + $value = '', + $template = 'extra-ini.erb', + $target = 'extra.ini', + $service = $php::service, + $config_dir = $php::config_dir +) { + + include php + + file { "${config_dir}/conf.d/${target}": + ensure => 'present', + content => template("php/${template}"), + require => Package['php'], + notify => Service[$service], + } + + file { "${config_dir}/cli/conf.d/${target}": + ensure => 'present', + content => template("php/${template}"), + require => Package['php'], + } + +} diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/php/manifests/init.pp b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/php/manifests/init.pp new file mode 100644 index 00000000000..7370528657a --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/php/manifests/init.pp @@ -0,0 +1,298 @@ +# = Class: php +# +# This is the main php class +# +# +# == Parameters +# +# Module specific parameters +# [*package_devel*] +# Name of the php-devel package +# +# [*package_pear*] +# Name of the php-pear package +# +# Standard class parameters +# Define the general class behaviour and customizations +# +# [*my_class*] +# Name of a custom class to autoload to manage module's customizations +# If defined, php class will automatically "include $my_class" +# Can be defined also by the (top scope) variable $php_myclass +# +# [*service*] +# The service that runs the php interpreter. Defines what service gets +# notified. Default: apache2|httpd. +# +# [*source*] +# Sets the content of source parameter for main configuration file +# If defined, php main config file will have the param: source => $source +# Can be defined also by the (top scope) variable $php_source +# +# [*source_dir*] +# If defined, the whole php configuration directory content is retrieved +# recursively from the specified source +# (source => $source_dir , recurse => true) +# Can be defined also by the (top scope) variable $php_source_dir +# +# [*source_dir_purge*] +# If set to true (default false) the existing configuration directory is +# mirrored with the content retrieved from source_dir +# (source => $source_dir , recurse => true , purge => true, force => true) +# Can be defined also by the (top scope) variable $php_source_dir_purge +# +# [*template*] +# Sets the path to the template to use as content for main configuration file +# If defined, php main config file has: content => content("$template") +# Note source and template parameters are mutually exclusive: don't use both +# Can be defined also by the (top scope) variable $php_template +# +# [*augeas*] +# If set to true (default false), the php.ini will be managed through +# augeas. This will make php::pecl automatically add extensions to the +# php.ini. +# Can be defined also by the (top scope) variable $php_augeas +# +# [*options*] +# An hash of custom options to be used in templates for arbitrary settings. +# Can be defined also by the (top scope) variable $php_options +# +# [*version*] +# The package version, used in the ensure parameter of package type. +# Default: present. Can be 'latest' or a specific version number. +# Note that if the argument absent (see below) is set to true, the +# package is removed, whatever the value of version parameter. +# +# [*absent*] +# Set to 'true' to remove package(s) installed by module +# Can be defined also by the (top scope) variable $php_absent +# +# [*puppi*] +# Set to 'true' to enable creation of module data files that are used by puppi +# Can be defined also by the (top scope) variables $php_puppi and $puppi +# +# [*puppi_helper*] +# Specify the helper to use for puppi commands. The default for this module +# is specified in params.pp and is generally a good choice. +# You can customize the output of puppi commands for this module using another +# puppi helper. Use the define puppi::helper to create a new custom helper +# Can be defined also by the (top scope) variables $php_puppi_helper +# and $puppi_helper +# +# [*debug*] +# Set to 'true' to enable modules debugging +# Can be defined also by the (top scope) variables $php_debug and $debug +# +# [*audit_only*] +# Set to 'true' if you don't intend to override existing configuration files +# and want to audit the difference between existing files and the ones +# managed by Puppet. +# Can be defined also by the (top scope) variables $php_audit_only +# and $audit_only +# +# Default class params - As defined in php::params. +# Note that these variables are mostly defined and used in the module itself, +# overriding the default values might not affected all the involved components. +# Set and override them only if you know what you're doing. +# Note also that you can't override/set them via top scope variables. +# +# [*package*] +# The name of php package +# +# [*config_dir*] +# Main configuration directory. Used by puppi +# +# [*config_file*] +# Main configuration file path +# +# [*config_file_mode*] +# Main configuration file path mode +# +# [*config_file_owner*] +# Main configuration file path owner +# +# [*config_file_group*] +# Main configuration file path group +# +# [*config_file_init*] +# Path of configuration file sourced by init script +# +# [*pid_file*] +# Path of pid file. Used by monitor +# +# [*data_dir*] +# Path of application data directory. Used by puppi +# +# [*log_dir*] +# Base logs directory. Used by puppi +# +# [*log_file*] +# Log file(s). Used by puppi +# +# == Examples +# +# You can use this class in 2 ways: +# - Set variables (at top scope level on in a ENC) and "include php" +# - Call php as a parametrized class +# +# See README for details. +# +# +class php ( + $package_devel = params_lookup( 'package_devel' ), + $package_pear = params_lookup( 'package_pear' ), + $my_class = params_lookup( 'my_class' ), + $service = params_lookup( 'service' ), + $service_autorestart = params_lookup( 'service_autorestart' ), + $source = params_lookup( 'source' ), + $source_dir = params_lookup( 'source_dir' ), + $source_dir_purge = params_lookup( 'source_dir_purge' ), + $template = params_lookup( 'template' ), + $augeas = params_lookup( 'augeas' ), + $options = params_lookup( 'options' ), + $version = params_lookup( 'version' ), + $absent = params_lookup( 'absent' ), + $monitor = params_lookup( 'monitor' , 'global' ), + $monitor_tool = params_lookup( 'monitor_tool' , 'global' ), + $monitor_target = params_lookup( 'monitor_target' , 'global' ), + $puppi = params_lookup( 'puppi' , 'global' ), + $puppi_helper = params_lookup( 'puppi_helper' , 'global' ), + $debug = params_lookup( 'debug' , 'global' ), + $audit_only = params_lookup( 'audit_only' , 'global' ), + $package = params_lookup( 'package' ), + $module_prefix = params_lookup( 'module_prefix' ), + $config_dir = params_lookup( 'config_dir' ), + $config_file = params_lookup( 'config_file' ), + $config_file_mode = params_lookup( 'config_file_mode' ), + $config_file_owner = params_lookup( 'config_file_owner' ), + $config_file_group = params_lookup( 'config_file_group' ), + $config_file_init = params_lookup( 'config_file_init' ), + $pid_file = params_lookup( 'pid_file' ), + $data_dir = params_lookup( 'data_dir' ), + $log_dir = params_lookup( 'log_dir' ), + $log_file = params_lookup( 'log_file' ), + $port = params_lookup( 'port' ), + $protocol = params_lookup( 'protocol' ) + ) inherits php::params { + + $bool_service_autorestart=any2bool($service_autorestart) + $bool_source_dir_purge=any2bool($source_dir_purge) + $bool_augeas=any2bool($augeas) + $bool_absent=any2bool($absent) + $bool_monitor=any2bool($monitor) + $bool_puppi=any2bool($puppi) + $bool_debug=any2bool($debug) + $bool_audit_only=any2bool($audit_only) + + ### Definition of some variables used in the module + $manage_package = $php::bool_absent ? { + true => 'absent', + false => $php::version, + } + + $manage_file = $php::bool_absent ? { + true => 'absent', + default => 'present', + } + + if $php::bool_absent == true { + $manage_monitor = false + } else { + $manage_monitor = true + } + + $manage_audit = $php::bool_audit_only ? { + true => 'all', + false => undef, + } + + $manage_file_replace = $php::bool_audit_only ? { + true => false, + false => true, + } + + if ($php::source and $php::template) { + fail ('PHP: cannot set both source and template') + } + if ($php::source and $php::bool_augeas) { + fail ('PHP: cannot set both source and augeas') + } + if ($php::template and $php::bool_augeas) { + fail ('PHP: cannot set both template and augeas') + } + + $manage_file_source = $php::source ? { + '' => undef, + default => $php::source, + } + + $manage_file_content = $php::template ? { + '' => undef, + default => template($php::template), + } + + ### Managed resources + package { 'php': + ensure => $php::manage_package, + name => $php::package, + } + + file { 'php.conf': + ensure => $php::manage_file, + path => $php::config_file, + mode => $php::config_file_mode, + owner => $php::config_file_owner, + group => $php::config_file_group, + require => Package['php'], + source => $php::manage_file_source, + content => $php::manage_file_content, + replace => $php::manage_file_replace, + audit => $php::manage_audit, + } + + # The whole php configuration directory can be recursively overriden + if $php::source_dir { + file { 'php.dir': + ensure => directory, + path => $php::config_dir, + require => Package['php'], + source => $php::source_dir, + recurse => true, + purge => $php::bool_source_dir_purge, + force => $php::bool_source_dir_purge, + replace => $php::manage_file_replace, + audit => $php::manage_audit, + } + } + + + ### Include custom class if $my_class is set + if $php::my_class { + include $php::my_class + } + + + ### Provide puppi data, if enabled ( puppi => true ) + if $php::bool_puppi == true { + $classvars=get_class_args() + puppi::ze { 'php': + ensure => $php::manage_file, + variables => $classvars, + helper => $php::puppi_helper, + } + } + + + ### Debugging, if enabled ( debug => true ) + if $php::bool_debug == true { + file { 'debug_php': + ensure => $php::manage_file, + path => "${settings::vardir}/debug-php", + mode => '0640', + owner => 'root', + group => 'root', + content => inline_template('<%= scope.to_hash.reject { |k,v| k.to_s =~ /(uptime.*|path|timestamp|free|.*password.*|.*psk.*|.*key)/ }.to_yaml %>'), + } + } + +} diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/php/manifests/module.pp b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/php/manifests/module.pp new file mode 100644 index 00000000000..714c1de283d --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/php/manifests/module.pp @@ -0,0 +1,85 @@ +# = Define: php::module +# +# This define installs and configures php modules +# On Debian and derivatives it install module named php5-${name} +# On RedHat and derivatives it install module named php-${name} +# If you need a custom prefix you can overload default $module_prefix parameter +# +# == Parameters +# +# [*version*] +# Version to install. +# +# [*absent*] +# true to ensure package isn't installed. +# +# [*notify_service*] +# If you want to restart a service automatically when +# the module is applied. Default: true +# +# [*service_autorestart*] +# whatever we want a module installation notify a service to restart. +# +# [*service*] +# Service to restart. +# +# [*module_prefix*] +# If package name prefix isn't standard. +# +# == Examples +# php::module { 'gd': } +# +# php::module { 'gd': +# ensure => absent, +# } +# +# This will install php-apc on debian instead of php5-apc +# +# php::module { 'apc': +# module_prefix => "php-", +# } +# +# Note that you may include or declare the php class when using +# the php::module define +# +define php::module ( + $version = 'present', + $service_autorestart = '', + $module_prefix = '', + $absent = '' + ) { + + include php + + if $absent { + $real_version = 'absent' + } else { + $real_version = $version + } + + $real_service_autorestart = $service_autorestart ? { + true => "Service[${php::service}]", + false => undef, + '' => $php::service_autorestart ? { + true => "Service[${php::service}]", + false => undef, + } + } + + $real_module_prefix = $module_prefix ? { + '' => $php::module_prefix, + default => $module_prefix, + } + + $real_install_package = "${real_module_prefix}${name}" + + if defined(Package[$real_install_package]) == false { + package { "PhpModule_${name}": + ensure => $real_version, + name => $real_install_package, + notify => $real_service_autorestart, + require => Package['php'], + } + } + +} diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/php/manifests/params.pp b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/php/manifests/params.pp new file mode 100644 index 00000000000..4db3267d901 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/php/manifests/params.pp @@ -0,0 +1,108 @@ +# Class: php::params +# +# This class defines default parameters used by the main module class php +# Operating Systems differences in names and paths are addressed here +# +# == Variables +# +# Refer to php class for the variables defined here. +# +# == Usage +# +# This class is not intended to be used directly. +# It may be imported or inherited by other classes +# +class php::params { + + $package_devel = $::operatingsystem ? { + /(?i:Ubuntu|Debian|Mint)/ => 'php5-dev', + /(?i:SLES|OpenSuSe)/ => 'php5-devel', + default => 'php-devel', + } + + $package_pear = $::operatingsystem ? { + /(?i:Ubuntu|Debian|Mint)/ => 'php-pear', + /(?i:SLES|OpenSuSe)/ => 'php5-pear', + default => 'php-pear', + } + + ### Application related parameters + $module_prefix = $::operatingsystem ? { + /(?i:Ubuntu|Debian|Mint|SLES|OpenSuSE)/ => 'php5-', + default => 'php-', + } + + $pear_module_prefix = $::operatingsystem ? { + /(?i:Ubuntu|Debian|Mint)/ => 'php-', + /(?i:SLES|OpenSuSe)/ => 'php5-pear-', + /(?i:CentOS|RedHat|Scientific|Linux)/ => 'php-pear-', + default => 'pear-', + } + + $package = $::operatingsystem ? { + /(?i:Ubuntu|Debian|Mint)/ => 'php5', + /(?i:SLES|OpenSuSE)/ => [ 'php5','apache2-mod_php5'], + default => 'php', + } + + # Here it's not the php service script name but + # web service name like apache2, nginx, etc. + $service = $::operatingsystem ? { + /(?i:Ubuntu|Debian|Mint|SLES|OpenSuSE)/ => 'apache2', + default => 'httpd', + } + + $config_dir = $::operatingsystem ? { + /(?i:Ubuntu|Debian|Mint|SLES|OpenSuSE)/ => '/etc/php5', + default => '/etc/php.d', + } + + $config_file = $::operatingsystem ? { + /(?i:Ubuntu|Debian|Mint)/ => '/etc/php5/php.ini', + /(?i:SLES|OpenSuSE)/ => '/etc/php5/apache2/php.ini', + default => '/etc/php.ini', + } + + $config_file_mode = $::operatingsystem ? { + default => '0644', + } + + $config_file_owner = $::operatingsystem ? { + default => 'root', + } + + $config_file_group = $::operatingsystem ? { + default => 'root', + } + + $data_dir = $::operatingsystem ? { + default => '', + } + + $log_dir = $::operatingsystem ? { + default => '', + } + + $log_file = $::operatingsystem ? { + default => '', + } + + # General Settings + $my_class = '' + $source = '' + $source_dir = '' + $source_dir_purge = false + $augeas = false + $template = '' + $options = '' + $version = 'present' + $service_autorestart = true + $absent = false + + ### General module variables that can have a site or per module default + $puppi = false + $puppi_helper = 'standard' + $debug = false + $audit_only = false + +} diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/php/manifests/pear.pp b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/php/manifests/pear.pp new file mode 100644 index 00000000000..a333a8448b8 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/php/manifests/pear.pp @@ -0,0 +1,38 @@ +# Class: php::pear +# +# Installs Pear for PHP module +# +# Usage: +# include php::pear +# +# == Parameters +# +# Standard class parameters +# Define the general class behaviour and customizations +# +# [*package*] +# Name of the package to install. Defaults to 'php-pear' +# +# [*version*] +# Version to install. Defaults to 'present' +# +# [*install_package*] +# Boolean. Determines if any package should be installed to support the PEAR functionality. +# Can be false if PEAR was already provided by another package or module. +# Default: true +# +class php::pear ( + $package = $php::package_pear, + $install_package = true, + $version = 'present', + $path = '/usr/bin:/usr/sbin:/bin:/sbin' + ) inherits php { + + if ( $install_package ) { + package { 'php-pear': + ensure => $version, + name => $package, + } + } + +} diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/php/manifests/pear/config.pp b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/php/manifests/pear/config.pp new file mode 100644 index 00000000000..41c5b75091f --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/php/manifests/pear/config.pp @@ -0,0 +1,19 @@ +# Define: php::pear::config +# +# Configures pear +# +# Usage: +# php::pear::config { http_proxy: value => "myproxy:8080" } +# +define php::pear::config ($value) { + + include php::pear + + exec { "pear-config-set-${name}": + command => "pear config-set ${name} ${value}", + path => $php::pear::path, + unless => "pear config-get ${name} | grep ${value}", + require => Package['php-pear'], + } + +} diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/php/manifests/pear/module.pp b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/php/manifests/pear/module.pp new file mode 100644 index 00000000000..4d11b16f19f --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/php/manifests/pear/module.pp @@ -0,0 +1,119 @@ +# Define: php::pear::module +# +# Installs the defined php pear component +# +# Variables: +# [*use_package*] +# (default=true) - Tries to install pear module with the relevant OS package +# If set to "no" it installs the module via pear command +# +# [*preferred_state*] +# (default="stable") - Define which preferred state to use when installing +# Pear modules via pear via command line (when use_package=false) +# +# [*alldeps*] +# (default="false") - Define if all the available (optional) modules should +# be installed. (when use_package=false) +# +# Usage: +# php::pear::module { packagename: } +# Example: +# php::pear::module { Crypt-CHAP: } +# +define php::pear::module ( + $service = '', + $use_package = true, + $preferred_state = 'stable', + $alldeps = false, + $version = 'present', + $repository = 'pear.php.net', + $service_autorestart = '', + $module_prefix = '', + $path = '/usr/bin:/usr/sbin:/bin:/sbin', + $ensure = 'present', + $timeout = 300 + ) { + + include php::pear + + $bool_use_package = any2bool($use_package) + $bool_alldeps = any2bool($alldeps) + $manage_alldeps = $bool_alldeps ? { + true => '--alldeps', + false => '', + } + + $pear_source = $version ? { + 'present' => "${repository}/${name}", + default => "${repository}/${name}-${version}", + } + + $pear_exec_command = $ensure ? { + present => "pear -d preferred_state=${preferred_state} install ${manage_alldeps} ${pear_source}", + absent => "pear uninstall -n ${pear_source}", + } + + $pear_exec_require = $repository ? { + 'pear.php.net' => Package['php-pear'], + default => [ Package['php-pear'],Php::Pear::Config['auto_discover'] ], + } + + $pear_exec_unless = $ensure ? { + present => "pear info ${pear_source}", + absent => undef + } + + $pear_exec_onlyif = $ensure ? { + present => undef, + absent => "pear info ${pear_source}", + } + + $real_service = $service ? { + '' => $php::service, + default => $service, + } + + $real_service_autorestart = $service_autorestart ? { + true => "Service[${real_service}]", + false => undef, + '' => $php::service_autorestart ? { + true => "Service[${real_service}]", + false => undef, + } + } + + $real_module_prefix = $module_prefix ? { + '' => $php::pear_module_prefix, + default => $module_prefix, + } + $package_name = "${real_module_prefix}${name}" + + + case $bool_use_package { + true: { + package { "pear-${name}": + ensure => $ensure, + name => $package_name, + notify => $real_service_autorestart, + } + } + default: { + if $repository != 'pear.php.net' { + if !defined (Php::Pear::Config['auto_discover']) { + php::pear::config { 'auto_discover': + value => '1', + } + } + } + exec { "pear-${name}": + command => $pear_exec_command, + path => $path, + unless => $pear_exec_unless, + onlyif => $pear_exec_onlyif, + require => $pear_exec_require, + timeout => $timeout, + } + } + } # End Case + +} diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/php/manifests/pecl/config.pp b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/php/manifests/pecl/config.pp new file mode 100644 index 00000000000..437a2ab10ac --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/php/manifests/pecl/config.pp @@ -0,0 +1,23 @@ +# Define: php::pecl::config +# +# Configures pecl +# +# Usage: +# php::pecl::config { http_proxy: value => "myproxy:8080" } +# +define php::pecl::config ( + $value, + $layer = 'user', + $path = '/usr/bin:/bin:/usr/sbin:/sbin' + ) { + + include php::pear + + exec { "pecl-config-set-${name}": + command => "pecl config-set ${name} ${value} ${layer}", + path => $path, + unless => "pecl config-get ${name} | grep ${value}", + require => Package['php-pear'], + } + +} diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/php/manifests/pecl/module.pp b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/php/manifests/pecl/module.pp new file mode 100644 index 00000000000..b47b10b5d71 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/php/manifests/pecl/module.pp @@ -0,0 +1,126 @@ +# Define: php::pecl::module +# +# Installs the defined php pecl component +# +# == Parameters +# +# [*service_autorestart*] +# wathever we want a module installation notify a service to restart. +# +# [*service*] +# Service to restart. +# +# [*use_package*] +# Tries to install pecl module with the relevant package. +# If set to "no" it installs the module via pecl command. Default: true +# +# [*preferred_state*] +# Define which preferred state to use when installing Pear modules via pecl +# command line (when use_package=no). Default: true +# +# [*auto_answer*] +# The answer(s) to give to pecl prompts for unattended install +# +# [*verbose*] +# (Optional) - If you want to see verbose pecl output during installation. +# This can help to debug installation problems (missing packages) during +# installation process. Default: false +# +# == Examples +# php::pecl::module { 'intl': } +# +# This will install xdebug from pecl source instead of using the package +# +# php::pecl::module { 'xdebug':. +# use_package => "no", +# } +# +define php::pecl::module ( + $service_autorestart = $php::bool_service_autorestart, + $service = $php::service, + $use_package = 'yes', + $preferred_state = 'stable', + $auto_answer = '\\n', + $ensure = present, + $path = '/usr/bin:/usr/sbin:/bin:/sbin', + $verbose = false, + $version = '', + $config_file = $php::config_file) { + + include php + include php::pear + include php::devel + + $manage_service_autorestart = $service_autorestart ? { + true => $service ? { + '' => undef, + default => "Service[${service}]", + }, + false => undef, + undef => undef, + } + + $real_package_name = $::operatingsystem ? { + ubuntu => "php5-${name}", + debian => "php5-${name}", + default => "php-${name}", + } + + case $use_package { + yes: { + package { "php-${name}": + ensure => $ensure, + name => $real_package_name, + notify => $manage_service_autorestart, + } + } + default: { + + $bool_verbose = any2bool($verbose) + + $pecl_exec_logoutput = $bool_verbose ? { + true => true, + false => undef, + } + + if $version != '' { + $new_version = "-${version}" + } else { + $new_version = '' + } + + $pecl_exec_command = $ensure ? { + present => "printf \"${auto_answer}\" | pecl -d preferred_state=${preferred_state} install ${name}${new_version}", + absent => "pecl uninstall -n ${name}", + } + + $pecl_exec_unless = $ensure ? { + present => "pecl info ${name}", + absent => undef + } + + $pecl_exec_onlyif = $ensure ? { + present => undef, + absent => "pecl info ${name}", + } + + exec { "pecl-${name}": + command => $pecl_exec_command, + unless => $pecl_exec_unless, + onlyif => $pecl_exec_onlyif, + logoutput => $pecl_exec_logoutput, + path => $path, + require => [ Class['php::pear'], Class['php::devel']], + } + if $php::bool_augeas == true { + php::augeas { "augeas-${name}": + ensure => $ensure, + entry => "PHP/extension[. = \"${name}.so\"]", + value => "${name}.so", + notify => $manage_service_autorestart, + target => $config_file, + } + } + } + } # End Case +} diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/php/manifests/spec.pp b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/php/manifests/spec.pp new file mode 100644 index 00000000000..3be06f47f8c --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/php/manifests/spec.pp @@ -0,0 +1,22 @@ +# Class: php::spec +# +# This class is used only for rpsec-puppet tests +# Can be taken as an example on how to do custom classes but should not +# be modified. +# +# == Usage +# +# This class is not intended to be used directly. +# Use it as reference +# +class php::spec inherits php { + + # This just a test to override the arguments of an existing resource + # Note that you can achieve this same result with just: + # class { "php": template => "php/spec.erb" } + + File['php.conf'] { + content => template('php/spec.erb'), + } + +} diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/php/spec/classes/php_spec.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/php/spec/classes/php_spec.rb new file mode 100644 index 00000000000..be9a4e327ff --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/php/spec/classes/php_spec.rb @@ -0,0 +1,76 @@ +require "#{File.join(File.dirname(__FILE__),'..','spec_helper.rb')}" + +describe 'php' do + + let(:title) { 'php' } + let(:node) { 'rspec.example42.com' } + let(:facts) { { :ipaddress => '10.42.42.42' } } + + describe 'Test standard installation' do + it { should contain_package('php').with_ensure('present') } + it { should contain_file('php.conf').with_ensure('present') } + end + + describe 'Test installation of a specific version' do + let(:params) { {:version => '1.0.42' } } + it { should contain_package('php').with_ensure('1.0.42') } + end + + describe 'Test decommissioning - absent' do + let(:params) { {:absent => true, :monitor => true } } + + it 'should remove Package[php]' do should contain_package('php').with_ensure('absent') end + it 'should remove php configuration file' do should contain_file('php.conf').with_ensure('absent') end + end + + describe 'Test customizations - template' do + let(:params) { {:template => "php/spec.erb" , :options => { 'opt_a' => 'value_a' } } } + + it 'should generate a valid template' do + content = catalogue.resource('file', 'php.conf').send(:parameters)[:content] + content.should match "fqdn: rspec.example42.com" + end + it 'should generate a template that uses custom options' do + content = catalogue.resource('file', 'php.conf').send(:parameters)[:content] + content.should match "value_a" + end + + end + + describe 'Test customizations - source' do + let(:params) { {:source => "puppet://modules/php/spec" , :source_dir => "puppet://modules/php/dir/spec" , :source_dir_purge => true } } + + it 'should request a valid source ' do + content = catalogue.resource('file', 'php.conf').send(:parameters)[:source] + content.should == "puppet://modules/php/spec" + end + it 'should request a valid source dir' do + content = catalogue.resource('file', 'php.dir').send(:parameters)[:source] + content.should == "puppet://modules/php/dir/spec" + end + it 'should purge source dir if source_dir_purge is true' do + content = catalogue.resource('file', 'php.dir').send(:parameters)[:purge] + content.should == true + end + end + + describe 'Test customizations - custom class' do + let(:params) { {:my_class => "php::spec" } } + it 'should automatically include a custom class' do + content = catalogue.resource('file', 'php.conf').send(:parameters)[:content] + content.should match "fqdn: rspec.example42.com" + end + end + + describe 'Test Puppi Integration' do + let(:params) { {:puppi => true, :puppi_helper => "myhelper"} } + + it 'should generate a puppi::ze define' do + content = catalogue.resource('puppi::ze', 'php').send(:parameters)[:helper] + content.should == "myhelper" + end + end + + +end + diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/php/spec/defines/php_module_spec.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/php/spec/defines/php_module_spec.rb new file mode 100644 index 00000000000..614f0a10877 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/php/spec/defines/php_module_spec.rb @@ -0,0 +1,38 @@ +require "#{File.join(File.dirname(__FILE__),'..','spec_helper.rb')}" + +describe 'php::module' do + + let(:title) { 'php::module' } + let(:node) { 'rspec.example42.com' } + let(:facts) { { 'operatingsystem' => 'Ubuntu' } } + + describe 'Test standard installation' do + let(:params) { { 'name' => 'ps', } } + it 'should create a package with the default OS prefix' do + should contain_package('PhpModule_ps').with_name('php5-ps') + end + it 'should notify the default service' do + should contain_package('PhpModule_ps').with_notify('Service[apache2]') + end + end + + describe 'Test custom params' do + let(:params) { { 'name' => 'ps', 'module_prefix' => 'my-' , 'service_autorestart' => false } } + it 'should create a package with custom prefix' do + should contain_package('PhpModule_ps').with( + 'ensure' => 'present', + 'name' => 'my-ps' + ) + should contain_package('PhpModule_ps').without('notify') + end + end + + describe 'Test uninstallation' do + let(:params) { { 'name' => 'ps', 'absent' => 'true' } } + it 'should remove the package' do + should contain_package('PhpModule_ps').with_ensure('absent') + end + end + +end + diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/php/spec/defines/php_pear_module_spec.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/php/spec/defines/php_pear_module_spec.rb new file mode 100644 index 00000000000..b093a8acfea --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/php/spec/defines/php_pear_module_spec.rb @@ -0,0 +1,49 @@ +require "#{File.join(File.dirname(__FILE__),'..','spec_helper.rb')}" + +describe 'php::pear::module' do + + let(:title) { 'php::pear::module' } + let(:node) { 'rspec.example42.com' } + let(:facts) { { 'operatingsystem' => 'Ubuntu' } } + + describe 'Test standard installation' do + let(:params) { { 'name' => 'Crypt-CHAP', } } + it 'should install pear module with default OS package' do + should contain_package('pear-Crypt-CHAP').with_name('php-Crypt-CHAP') + end + it 'should notify the default service' do + should contain_package('pear-Crypt-CHAP').with_notify('Service[apache2]') + end + end + + describe 'Test custom params' do + let(:params) { { 'name' => 'Crypt-CHAP', 'module_prefix' => 'my-' , 'service_autorestart' => false } } + it 'should create a package with custom prefix' do + should contain_package('pear-Crypt-CHAP').with( + 'ensure' => 'present', + 'name' => 'my-Crypt-CHAP' + ) + should contain_package('pear-Crypt-CHAP').without('notify') + end + end + + describe 'Test uninstallation' do + let(:params) { { 'name' => 'Crypt-CHAP', 'ensure' => 'absent' } } + it 'should remove the package' do + should contain_package('pear-Crypt-CHAP').with_ensure('absent') + end + end + + describe 'Test installation via exec' do + let(:params) { { 'name' => 'Crypt-CHAP', 'use_package' => 'false' } } + it 'should install pear module with exec commands' do + should contain_exec('pear-Crypt-CHAP').with( + 'command' => 'pear -d preferred_state=stable install pear.php.net/Crypt-CHAP', + 'unless' => 'pear info pear.php.net/Crypt-CHAP' + ) + end + end + + +end + diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/php/spec/spec_helper.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/php/spec/spec_helper.rb new file mode 100644 index 00000000000..2c6f56649ae --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/php/spec/spec_helper.rb @@ -0,0 +1 @@ +require 'puppetlabs_spec_helper/module_spec_helper' diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/php/templates/extra-ini.erb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/php/templates/extra-ini.erb new file mode 100644 index 00000000000..e0e7087e892 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/php/templates/extra-ini.erb @@ -0,0 +1,11 @@ +; File Managed by Puppet + +<% if @value != "" -%> +<% if @value.is_a? Array -%> +<% @value.each do |name| -%> +<%= name %> +<% end %> +<% else -%> +<%= value %> +<% end -%> +<% end -%> diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/php/templates/spec.erb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/php/templates/spec.erb new file mode 100644 index 00000000000..87b8c1e65dd --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/php/templates/spec.erb @@ -0,0 +1,8 @@ +# This is a template used only for rspec tests + +# Yaml of the whole scope +<%= scope.to_hash.reject { |k,v| !( k.is_a?(String) && v.is_a?(String) ) }.to_yaml %> + +# Custom Options +<%= options['opt_a'] %> +<%= options['opt_b'] %> diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/postgresql/.fixtures.yml b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/postgresql/.fixtures.yml new file mode 100644 index 00000000000..5dbd5d048df --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/postgresql/.fixtures.yml @@ -0,0 +1,8 @@ +fixtures: + repositories: + apt: "https://github.com/puppetlabs/puppetlabs-apt.git" + stdlib: "https://github.com/puppetlabs/puppetlabs-stdlib.git" + firewall: "https://github.com/puppetlabs/puppetlabs-firewall.git" + concat: "https://github.com/puppetlabs/puppetlabs-concat.git" + symlinks: + postgresql: "#{source_dir}" diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/postgresql/.nodeset.yml b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/postgresql/.nodeset.yml new file mode 100644 index 00000000000..767f9cd2f6e --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/postgresql/.nodeset.yml @@ -0,0 +1,31 @@ +--- +default_set: 'centos-64-x64' +sets: + 'centos-59-x64': + nodes: + "main.foo.vm": + prefab: 'centos-59-x64' + 'centos-64-x64': + nodes: + "main.foo.vm": + prefab: 'centos-64-x64' + 'fedora-18-x64': + nodes: + "main.foo.vm": + prefab: 'fedora-18-x64' + 'debian-607-x64': + nodes: + "main.foo.vm": + prefab: 'debian-607-x64' + 'debian-70rc1-x64': + nodes: + "main.foo.vm": + prefab: 'debian-70rc1-x64' + 'ubuntu-server-10044-x64': + nodes: + "main.foo.vm": + prefab: 'ubuntu-server-10044-x64' + 'ubuntu-server-12042-x64': + nodes: + "main.foo.vm": + prefab: 'ubuntu-server-12042-x64' diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/postgresql/.project b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/postgresql/.project new file mode 100644 index 00000000000..a680a0bce77 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/postgresql/.project @@ -0,0 +1,23 @@ + + + postgresql + + + + + + org.cloudsmith.geppetto.pp.dsl.ui.modulefileBuilder + + + + + org.eclipse.xtext.ui.shared.xtextBuilder + + + + + + org.cloudsmith.geppetto.pp.dsl.ui.puppetNature + org.eclipse.xtext.ui.shared.xtextNature + + diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/postgresql/.travis.yml b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/postgresql/.travis.yml new file mode 100644 index 00000000000..795fa6fcd19 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/postgresql/.travis.yml @@ -0,0 +1,28 @@ +--- +language: ruby +bundler_args: --without development +script: bundle exec rake spec SPEC_OPTS='--format documentation' +after_success: + - git clone -q git://github.com/puppetlabs/ghpublisher.git .forge-release + - .forge-release/publish +rvm: +- 1.8.7 +- 1.9.3 +- 2.0.0 +env: + matrix: + - PUPPET_GEM_VERSION="~> 2.7.0" + - PUPPET_GEM_VERSION="~> 3.2.0" + - PUPPET_GEM_VERSION="~> 3.4.0" + global: + - PUBLISHER_LOGIN=puppetlabs + - secure: jY81Y/csdcDjjXRzX9VA3fbb5db+/KraLRPErHjYANO15DZjh3b9tBwo/ybLCLCGJE8ej1yXzTxs1dJhokySQL12m1VW1i8dM26kMc4x+wOnIFKny7VB78Tcbp8RV1iV1kWN3UcuAbQ5hvMrI3rzoWkD22zF0k3nFEcv1kpix1w= +matrix: + fast_finish: true + exclude: + - rvm: 1.9.3 + env: PUPPET_GEM_VERSION="~> 2.7.0" + - rvm: 2.0.0 + env: PUPPET_GEM_VERSION="~> 2.7.0" +notifications: + email: false diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/postgresql/CHANGELOG.md b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/postgresql/CHANGELOG.md new file mode 100644 index 00000000000..5f70a34dcd3 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/postgresql/CHANGELOG.md @@ -0,0 +1,550 @@ +##2014-03-04 - Supported Release 3.3.3 +###Summary + +This is a supported release. This release removes a testing symlink that can +cause trouble on systems where /var is on a seperate filesystem from the +modulepath. + +####Features +####Bugfixes +####Known Bugs +* SLES is not supported. + +##2014-03-04 - Supported Release 3.3.2 +###Summary +This is a supported release. It fixes a problem with updating passwords on postgresql.org distributed versions of PostgreSQL. + +####Bugfixes +- Correct psql path when setting password on custom versions. +- Documentation updates +- Test updates + +####Known Bugs +* SLES is not supported. + + +##2014-02-12 - Version 3.3.1 +####Bugfix: +- Allow dynamic rubygems host + + +##2014-01-28 - Version 3.3.0 + +###Summary + +This release rolls up a bunch of bugfixes our users have found and fixed for +us over the last few months. This improves things for 9.1 users, and makes +this module usable on FreeBSD. + +This release is dedicated to 'bma', who's suffering with Puppet 3.4.1 issues +thanks to Puppet::Util::SUIDManager.run_and_capture. + +####Features + - Add lc_ config entry settings + - Can pass template at database creation. + - Add FreeBSD support. + - Add support for customer `xlogdir` parameter. + - Switch tests from rspec-system to beaker. (This isn't really a feature) + +####Bugfixes + - Properly fix the deprecated Puppet::Util::SUIDManager.run_and_capture errors. + - Fix NOREPLICATION option for Postgres 9.1 + - Wrong parameter name: manage_pg_conf -> manage_pg_hba_conf + - Add $postgresql::server::client_package_name, referred to by install.pp + - Add missing service_provider/service_name descriptions in ::globals. + - Fix several smaller typos/issues throughout. + - Exec['postgresql_initdb'] needs to be done after $datadir exists + - Prevent defined resources from floating in the catalog. + - Fix granting all privileges on a table. + - Add some missing privileges. + - Remove deprecated and unused concat::fragment parameters. + + +##2013-11-05 - Version 3.2.0 + +###Summary + +Add's support for Ubuntu 13.10 (and 14.04) as well as x, y, z. + +####Features +- Add versions for Ubuntu 13.10 and 14.04. +- Use default_database in validate_db_connection instead of a hardcoded +'postgres' +- Add globals/params layering for default_database. +- Allow specification of default database name. + +####Bugs +- Fixes to the README. + + +##2013-10-25 - Version 3.1.0 + +###Summary + +This is a minor feature and bug fix release. + +Firstly, the postgresql_psql type now includes a new parameter `search_path` which is equivalent to using `set search_path` which allows you to change the default schema search path. + +The default version of Fedora 17 has now been added, so that Fedora 17 users can enjoy the module. + +And finally we've extended the capabilities of the defined type postgresql::validate_db_connection so that now it can handle retrying and sleeping between retries. This feature has been monopolized to fix a bug we were seeing with startup race conditions, but it can also be used by remote systems to 'wait' for PostgreSQL to start before their Puppet run continues. + +####Features +- Defined $default_version for Fedora 17 (Bret Comnes) +- add search_path attribute to postgresql_psql resource (Jeremy Kitchen) +- (GH-198) Add wait and retry capability to validate_db_connection (Ken Barber) + +####Bugs +- enabling defined postgres user password without resetting on every puppet run (jonoterc) +- periods are valid in configuration variables also (Jeremy Kitchen) +- Add zero length string to join() function (Jarl Stefansson) +- add require of install to reload class (cdenneen) +- (GH-198) Fix race condition on postgresql startup (Ken Barber) +- Remove concat::setup for include in preparation for the next concat release (Ken Barber) + + +##2013-10-14 - Version 3.0.0 + +Final release of 3.0, enjoy! + + +##2013-10-14 - Version 3.0.0-rc3 + +###Summary + +Add a parameter to unmanage pg_hba.conf to fix a regression from 2.5, as well +as allowing owner to be passed into x. + +####Features +- `manage_pg_hba_conf` parameter added to control pg_hba.conf management. +- `owner` parameter added to server::db. + + +##2013-10-09 - Version 3.0.0-rc2 + +###Summary + +A few bugfixes have been found since -rc1. + +####Fixes +- Special case for $datadir on Amazon +- Fix documentation about username/password for the postgresql_hash function + + +##2013-10-01 - Version 3.0.0-rc1 + +###Summary + +Version 3 was a major rewrite to fix some internal dependency issues, and to +make the new Public API more clear. As a consequence a lot of things have +changed for version 3 and older revisions that we will try to outline here. + +(NOTE: The format of this CHANGELOG differs to normal in an attempt to +explain the scope of changes) + +* Server specific objects now moved under `postgresql::server::` namespace: + +To restructure server specific elements under the `postgresql::server::` +namespaces the following objects were renamed as such: + +`postgresql::database` -> `postgresql::server::database` +`postgresql::database_grant` -> `postgresql::server::database_grant` +`postgresql::db` -> `postgresql::server::db` +`postgresql::grant` -> `postgresql::server::grant` +`postgresql::pg_hba_rule` -> `postgresql::server::pg_hba_rule` +`postgresql::plperl` -> `postgresql::server::plperl` +`postgresql::contrib` -> `postgresql::server::contrib` +`postgresql::role` -> `postgresql::server::role` +`postgresql::table_grant` -> `postgresql::server::table_grant` +`postgresql::tablespace` -> `postgresql::server::tablespace` + +* New `postgresql::server::config_entry` resource for managing configuration: + +Previously we used the `file_line` resource to modify `postgresql.conf`. This +new revision now adds a new resource named `postgresql::server::config_entry` +for managing this file. For example: + +```puppet + postgresql::server::config_entry { 'check_function_bodies': + value => 'off', + } +``` + +If you were using `file_line` for this purpose, you should change to this new +methodology. + +* `postgresql_puppet_extras.conf` has been removed: + +Now that we have a methodology for managing `postgresql.conf`, and due to +concerns over the file management methodology using an `exec { 'touch ...': }` +as a way to create an empty file the existing postgresql\_puppet\_extras.conf +file is no longer managed by this module. + +If you wish to recreate this methodology yourself, use this pattern: + +```puppet + class { 'postgresql::server': } + + $extras = "/tmp/include.conf" + + file { $extras: + content => 'max_connections = 123', + notify => Class['postgresql::server::service'], + }-> + postgresql::server::config_entry { 'include': + value => $extras, + } +``` + +* All uses of the parameter `charset` changed to `encoding`: + +Since PostgreSQL uses the terminology `encoding` not `charset` the parameter +has been made consisent across all classes and resources. + +* The `postgresql` base class is no longer how you set globals: + +The old global override pattern was less then optimal so it has been fixed, +however we decided to demark this properly by specifying these overrides in +the class `postgresql::global`. Consult the documentation for this class now +to see what options are available. + +Also, some parameter elements have been moved between this and the +`postgresql::server` class where it made sense. + +* `config_hash` parameter collapsed for the `postgresql::server` class: + +Because the `config_hash` was really passing data through to what was in +effect an internal class (`postgresql::config`). And since we don't want this +kind of internal exposure the parameters were collapsed up into the +`postgresql::server` class directly. + +* Lots of changes to 'private' or 'undocumented' classes: + +If you were using these before, these have changed names. You should only use +what is documented in this README.md, and if you don't have what you need you +should raise a patch to add that feature to a public API. All internal classes +now have a comment at the top indicating them as private to make sure the +message is clear that they are not supported as Public API. + +* `pg_hba_conf_defaults` parameter included to turn off default pg\_hba rules: + +The defaults should be good enough for most cases (if not raise a bug) but if +you simply need an escape hatch, this setting will turn off the defaults. If +you want to do this, it may affect the rest of the module so make sure you +replace the rules with something that continues operation. + +* `postgresql::database_user` has now been removed: + +Use `postgresql::server::role` instead. + +* `postgresql::psql` resource has now been removed: + +Use `postgresql_psql` instead. In the future we may recreate this as a wrapper +to add extra capability, but it will not match the old behaviour. + +* `postgresql_default_version` fact has now been removed: + +It didn't make sense to have this logic in a fact any more, the logic has been +moved into `postgresql::params`. + +* `ripienaar/concat` is no longer used, instead we use `puppetlabs/concat`: + +The older concat module is now deprecated and moved into the +`puppetlabs/concat` namespace. Functionality is more or less identical, but +you may need to intervene during the installing of this package - as both use +the same `concat` namespace. + +--- +##2013-09-09 Release 2.5.0 + +###Summary + +The focus of this release is primarily to capture the fixes done to the +types and providers to make sure refreshonly works properly and to set +the stage for the large scale refactoring work of 3.0.0. + +####Features + + +####Bugfixes +- Use boolean for refreshonly. +- Fix postgresql::plperl documentation. +- Add two missing parameters to config::beforeservice +- Style fixes + + +##2013-08-01 Release 2.4.1 + +###Summary + +This minor bugfix release solves an idempotency issue when using plain text +passwords for the password_hash parameter for the postgresql::role defined +type. Without this, users would continually see resource changes everytime +your run Puppet. + +####Bugfixes +- Alter role call not idempotent with cleartext passwords (Ken Barber) + + +##2013-07-19 Release 2.4.0 + +###Summary + +This updates adds the ability to change permissions on tables, create template +databases from normal databases, manage PL-Perl's postgres package, and +disable the management of `pg_hba.conf`. + +####Features +- Add `postgresql::table_grant` defined resource +- Add `postgresql::plperl` class +- Add `manage_pg_hba_conf` parameter to the `postgresql::config` class +- Add `istemplate` parameter to the `postgresql::database` define + +####Bugfixes +- Update `postgresql::role` class to be able to update roles when modified +instead of only on creation. +- Update tests +- Fix documentation of `postgresql::database_grant` + + +##2.3.0 + +This feature release includes the following changes: + +* Add a new parameter `owner` to the `database` type. This can be used to + grant ownership of a new database to a specific user. (Bruno Harbulot) +* Add support for operating systems other than Debian/RedHat, as long as the + user supplies custom values for all of the required paths, package names, etc. + (Chris Price) +* Improved integration testing (Ken Barber) + + +##2.2.1 + +This release fixes a bug whereby one of our shell commands (psql) were not ran from a globally accessible directory. This was causing permission denied errors when the command attempted to change user without changing directory. + +Users of previous versions might have seen this error: + + Error: Error executing SQL; psql returned 256: 'could not change directory to "/root" + +This patch should correct that. + +#### Detail Changes + +* Set /tmp as default CWD for postgresql_psql + + +##2.2.0 + +This feature release introduces a number of new features and bug fixes. + +First of all it includes a new class named `postgresql::python` which provides you with a convenient way of install the python Postgresql client libraries. + + class { 'postgresql::python': + } + +You are now able to use `postgresql::database_user` without having to specify a password_hash, useful for different authentication mechanisms that do not need passwords (ie. cert, local etc.). + +We've also provided a lot more advanced custom parameters now for greater control of your Postgresql installation. Consult the class documentation for PuppetDB in the README. + +This release in particular has largely been contributed by the community members below, a big thanks to one and all. + +#### Detailed Changes + +* Add support for psycopg installation (Flaper Fesp and Dan Prince) +* Added default PostgreSQL version for Ubuntu 13.04 (Kamil Szymanski) +* Add ability to create users without a password (Bruno Harbulot) +* Three Puppet 2.6 fixes (Dominic Cleal) +* Add explicit call to concat::setup when creating concat file (Dominic Cleal) +* Fix readme typo (Jordi Boggiano) +* Update postgres_default_version for Ubuntu (Kamil Szymanski) +* Allow to set connection for noew role (Kamil Szymanski) +* Fix pg_hba_rule for postgres local access (Kamil Szymanski) +* Fix versions for travis-ci (Ken Barber) +* Add replication support (Jordi Boggiano) +* Cleaned up and added unit tests (Ken Barber) +* Generalization to provide more flexability in postgresql configuration (Karel Brezina) +* Create dependent directory for sudoers so tests work on Centos 5 (Ken Barber) +* Allow SQL commands to be run against a specific DB (Carlos Villela) +* Drop trailing comma to support Puppet 2.6 (Michael Arnold) + + +##2.1.1 + + +This release provides a bug fix for RHEL 5 and Centos 5 systems, or specifically systems using PostgreSQL 8.1 or older. On those systems one would have received the error: + + Error: Could not start Service[postgresqld]: Execution of ‘/sbin/service postgresql start’ returned 1: + +And the postgresql log entry: + + FATAL: unrecognized configuration parameter "include" + +This bug is due to a new feature we had added in 2.1.0, whereby the `include` directive in `postgresql.conf` was not compatible. As a work-around we have added checks in our code to make sure systems running PostgreSQL 8.1 or older do not have this directive added. + +#### Detailed Changes + +2013-01-21 - Ken Barber +* Only install `include` directive and included file on PostgreSQL >= 8.2 +* Add system tests for Centos 5 + + +##2.1.0 + +This release is primarily a feature release, introducing some new helpful constructs to the module. + +For starters, we've added the line `include 'postgresql_conf_extras.conf'` by default so extra parameters not managed by the module can be added by other tooling or by Puppet itself. This provides a useful escape-hatch for managing settings that are not currently managed by the module today. + +We've added a new defined resource for managing your tablespace, so you can now create new tablespaces using the syntax: + + postgresql::tablespace { 'dbspace': + location => '/srv/dbspace', + } + +We've added a locale parameter to the `postgresql` class, to provide a default. Also the parameter has been added to the `postgresql::database` and `postgresql::db` defined resources for changing the locale per database: + + postgresql::db { 'mydatabase': + user => 'myuser', + password => 'mypassword', + encoding => 'UTF8', + locale => 'en_NG', + } + +There is a new class for installing the necessary packages to provide the PostgreSQL JDBC client jars: + + class { 'postgresql::java': } + +And we have a brand new defined resource for managing fine-grained rule sets within your pg_hba.conf access lists: + + postgresql::pg_hba { 'Open up postgresql for access from 200.1.2.0/24': + type => 'host', + database => 'app', + user => 'app', + address => '200.1.2.0/24', + auth_method => 'md5', + } + +Finally, we've also added Travis-CI support and unit tests to help us iterate faster with tests to reduce regression. The current URL for these tests is here: https://travis-ci.org/puppetlabs/puppet-postgresql. Instructions on how to run the unit tests available are provided in the README for the module. + +A big thanks to all those listed below who made this feature release possible :-). + +#### Detailed Changes + +2013-01-18 - Simão Fontes & Flaper Fesp +* Remove trailing commas from params.pp property definition for Puppet 2.6.0 compatibility + +2013-01-18 - Lauren Rother +* Updated README.md to conform with best practices template + +2013-01-09 - Adrien Thebo +* Update postgresql_default_version to 9.1 for Debian 7.0 + +2013-01-28 - Karel Brezina +* Add support for tablespaces + +2013-01-16 - Chris Price & Karel Brezina +* Provide support for an 'include' config file 'postgresql_conf_extras.conf' that users can modify manually or outside of the module. + +2013-01-31 - jv +* Fix typo in README.pp for postgresql::db example + +2013-02-03 - Ken Barber +* Add unit tests and travis-ci support + +2013-02-02 - Ken Barber +* Add locale parameter support to the 'postgresql' class + +2013-01-21 - Michael Arnold +* Add a class for install the packages containing the PostgreSQL JDBC jar + +2013-02-06 - fhrbek +* Coding style fixes to reduce warnings in puppet-lint and Geppetto + +2013-02-10 - Ken Barber +* Provide new defined resource for managing pg_hba.conf + +2013-02-11 - Ken Barber +* Fix bug with reload of Postgresql on Redhat/Centos + +2013-02-15 - Erik Dalén +* Fix more style issues to reduce warnings in puppet-lint and Geppetto + +2013-02-15 - Erik Dalén +* Fix case whereby we were modifying a hash after creation + + +##2.0.1 + +Minor bugfix release. + +2013-01-16 - Chris Price + * Fix revoke command in database.pp to support postgres 8.1 (43ded42) + +2013-01-15 - Jordi Boggiano + * Add support for ubuntu 12.10 status (3504405) + +##2.0.0 + +Many thanks to the following people who contributed patches to this +release: + +* Adrien Thebo +* Albert Koch +* Andreas Ntaflos +* Brett Porter +* Chris Price +* dharwood +* Etienne Pelletier +* Florin Broasca +* Henrik +* Hunter Haugen +* Jari Bakken +* Jordi Boggiano +* Ken Barber +* nzakaria +* Richard Arends +* Spenser Gilliland +* stormcrow +* William Van Hevelingen + +Notable features: + + * Add support for versions of postgres other than the system default version + (which varies depending on OS distro). This includes optional support for + automatically managing the package repo for the "official" postgres yum/apt + repos. (Major thanks to Etienne Pelletier and + Ken Barber for their tireless efforts and patience on this + feature set!) For example usage see `tests/official-postgresql-repos.pp`. + + * Add some support for Debian Wheezy and Ubuntu Quantal + + * Add new `postgres_psql` type with a Ruby provider, to replace the old + exec-based `psql` type. This gives us much more flexibility around + executing SQL statements and controlling their logging / reports output. + + * Major refactor of the "spec" tests--which are actually more like + acceptance tests. We now support testing against multiple OS distros + via vagrant, and the framework is in place to allow us to very easily add + more distros. Currently testing against Cent6 and Ubuntu 10.04. + + * Fixed a bug that was preventing multiple databases from being owned by the + same user + (9adcd182f820101f5e4891b9f2ff6278dfad495c - Etienne Pelletier ) + + * Add support for ACLs for finer-grained control of user/interface access + (b8389d19ad78b4fb66024897097b4ed7db241930 - dharwood ) + + * Many other bug fixes and improvements! + +--- +##1.0.0 + +2012-09-17 - Version 0.3.0 released + +2012-09-14 - Chris Price + * Add a type for validating a postgres connection (ce4a049) + +2012-08-25 - Jari Bakken + * Remove trailing commas. (e6af5e5) + +2012-08-16 - Version 0.2.0 released diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/postgresql/Gemfile b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/postgresql/Gemfile new file mode 100644 index 00000000000..cb5deeccef1 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/postgresql/Gemfile @@ -0,0 +1,20 @@ +source ENV['GEM_SOURCE'] || "https://rubygems.org" + +group :development, :test do + gem 'rake' + gem 'pry', :require => false + gem 'puppetlabs_spec_helper', :require => false + gem 'rspec-puppet', '< 1.0' + gem 'puppet-lint', '~> 0.3.2' + gem 'beaker', :require => false + gem 'beaker-rspec', :require => false + gem 'serverspec', :require => false +end + +if puppetversion = ENV['PUPPET_GEM_VERSION'] + gem 'puppet', puppetversion, :require => false +else + gem 'puppet', :require => false +end + +# vim:ft=ruby diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/postgresql/LICENSE b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/postgresql/LICENSE new file mode 100644 index 00000000000..7a29c73c878 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/postgresql/LICENSE @@ -0,0 +1,202 @@ + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright 2013 Puppet Labs + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/postgresql/Modulefile b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/postgresql/Modulefile new file mode 100644 index 00000000000..e0e93541b3b --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/postgresql/Modulefile @@ -0,0 +1,13 @@ +name 'puppetlabs-postgresql' +version '3.3.3' +source 'git://github.com/puppetlabs/puppet-postgresql.git' +author 'Inkling/Puppet Labs' +description 'PostgreSQL defined resource types' +summary 'PostgreSQL defined resource types' +license 'ASL 2.0' +project_page 'https://github.com/puppetlabs/puppet-postgresql' + +dependency 'puppetlabs/stdlib', '>=3.2.0 <5.0.0' +dependency 'puppetlabs/firewall', '>= 0.0.4' +dependency 'puppetlabs/apt', '>=1.1.0 <2.0.0' +dependency 'puppetlabs/concat', '>= 1.0.0 <2.0.0' diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/postgresql/NOTICE b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/postgresql/NOTICE new file mode 100644 index 00000000000..c01b4637bc7 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/postgresql/NOTICE @@ -0,0 +1,14 @@ +Puppetlabs postgresql module + +Copyright 2012 Inkling Systems Inc +Copyright 2012-2013 Puppet Labs Inc +Copyright 2012-2013 Camptocamp SA. + +This product includes software developed by: + The Puppet Labs Inc (http://www.puppetlabs.com/). + +This product includes also software developed by: + Camptocamp SA (http://www.camptocamp.com/) + +This product includes also software developed by: + Inkling Systems Inc (https://www.inkling.com/) diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/postgresql/README.md b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/postgresql/README.md new file mode 100644 index 00000000000..7a26cb9f4a2 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/postgresql/README.md @@ -0,0 +1,901 @@ +postgresql +========== + +Table of Contents +----------------- + +1. [Overview - What is the PostgreSQL module?](#overview) +2. [Module Description - What does the module do?](#module-description) +3. [Setup - The basics of getting started with PostgreSQL module](#setup) + * [PE 3.2 supported module](#pe-3.2-supported-module) + * [Configuring the server](#configuring-the-server) +4. [Usage - How to use the module for various tasks](#usage) +5. [Upgrading - Guide for upgrading from older revisions of this module](#upgrading) +6. [Reference - The classes, defines,functions and facts available in this module](#reference) +7. [Limitations - OS compatibility, etc.](#limitations) +8. [Development - Guide for contributing to the module](#development) +9. [Disclaimer - Licensing information](#disclaimer) +10. [Transfer Notice - Notice of authorship change](#transfer-notice) +11. [Contributors - List of module contributors](#contributors) + +Overview +-------- + +The PostgreSQL module allows you to easily manage postgres databases with Puppet. + +Module Description +------------------- + +PostgreSQL is a high-performance, free, open-source relational database server. The postgresql module allows you to manage PostgreSQL packages and services on several operating systems, while also supporting basic management of PostgreSQL databases and users. The module offers support for managing firewall for postgres ports on RedHat-based distros, as well as support for basic management of common security settings. + +Setup +----- + +**What puppetlabs-PostgreSQL affects:** + +* package/service/configuration files for PostgreSQL +* listened-to ports +* system firewall (optional) +* IP and mask (optional) + +**Introductory Questions** + +The postgresql module offers many security configuration settings. Before getting started, you will want to consider: + +* Do you want/need to allow remote connections? + * If yes, what about TCP connections? +* Would you prefer to work around your current firewall settings or overwrite some of them? +* How restrictive do you want the database superuser's permissions to be? + +Your answers to these questions will determine which of the module's parameters you'll want to specify values for. + +###PE 3.2 supported module + +PE 3.2 introduces Puppet Labs supported modules. The version of the postgresql module that ships within PE 3.2 is supported via normal [Puppet Enterprise support](http://puppetlabs.com/services/customer-support) channels. If you would like to access the [supported module](http://forge.puppetlabs.com/supported) version, you will need to uninstall the shipped module and install the supported version from the Puppet Forge. You can do this by first running + + # puppet module uninstall puppetlabs-postgresql +and then running + + # puppet module install puppetlabs/postgresql + +###Configuring the server + +The main configuration you'll need to do will be around the `postgresql::server` class. The default parameters are reasonable, but fairly restrictive regarding permissions for who can connect and from where. To manage a PostgreSQL server with sane defaults: + + class { 'postgresql::server': } + +For a more customized configuration: + + class { 'postgresql::server': + ip_mask_deny_postgres_user => '0.0.0.0/32', + ip_mask_allow_all_users => '0.0.0.0/0', + listen_addresses => '*', + ipv4acls => ['hostssl all johndoe 192.168.0.0/24 cert'], + manage_firewall => true, + postgres_password => 'TPSrep0rt!', + } + +Once you've completed your configuration of `postgresql::server`, you can test out your settings from the command line: + + $ psql -h localhost -U postgres + $ psql -h my.postgres.server -U + +If you get an error message from these commands, it means that your permissions are set in a way that restricts access from where you're trying to connect. That might be a good thing or a bad thing, depending on your goals. + +For more details about server configuration parameters consult the [PostgreSQL Runtime Configuration docs](http://www.postgresql.org/docs/9.2/static/runtime-config.html). + +Usage +----- + +###Creating a database + +There are many ways to set up a postgres database using the `postgresql::server::db` class. For instance, to set up a database for PuppetDB: + + class { 'postgresql::server': } + + postgresql::server::db { 'mydatabasename': + user => 'mydatabaseuser', + password => postgresql_password('mydatabaseuser', 'mypassword'), + } + +###Managing users, roles and permissions + +To manage users, roles and permissions: + + class { 'postgresql::server': } + + postgresql::server::role { 'marmot': + password_hash => postgresql_password('marmot', 'mypasswd'), + } + + postgresql::server::database_grant { 'test1': + privilege => 'ALL', + db => 'test1', + role => 'marmot', + } + + postgresql::server::table_grant { 'my_table of test2': + privilege => 'ALL', + table => 'my_table', + db => 'test2', + role => 'marmot', + } + +In this example, you would grant ALL privileges on the test1 database and on the `my_table` table of the test2 database to the user or group specified by dan. + +At this point, you would just need to plunk these database name/username/password values into your PuppetDB config files, and you are good to go. + +Upgrading +--------- + +###Upgrading from 2.x to version 3 + +*Note:* if you are upgrading for 2.x, you *must* read this, as just about everything has changed. + +Version 3 was a major rewrite to fix some internal dependency issues, and to make the new Public API more clear. As a consequence a lot of things have changed for version 3 and older revisions that we will try to outline here. + +####Server specific objects now moved under `postgresql::server::` namespace + +To restructure server specific elements under the `postgresql::server::` namespaces the following objects were renamed as such: + +* `postgresql::database` -> `postgresql::server::database` +* `postgresql::database_grant` -> `postgresql::server::database_grant` +* `postgresql::db` -> `postgresql::server::db` +* `postgresql::grant` -> `postgresql::server::grant` +* `postgresql::pg_hba_rule` -> `postgresql::server::pg_hba_rule` +* `postgresql::plperl` -> `postgresql::server::plperl` +* `postgresql::contrib` -> `postgresql::server::contrib` +* `postgresql::role` -> `postgresql::server::role` +* `postgresql::table_grant` -> `postgresql::server::table_grant` +* `postgresql::tablespace` -> `postgresql::server::tablespace` + +####New `postgresql::server::config_entry` resource for managing configuration + +Previously we used the `file_line` resource to modify `postgresql.conf`. This new revision now adds a new resource named `postgresql::server::config_entry` for managing this file. For example: + + postgresql::server::config_entry { 'check_function_bodies': + value => 'off', + } + +If you were using `file_line` for this purpose, you should change to this new methodology. + +####`postgresql_puppet_extras.conf` has been removed + +Now that we have a methodology for managing `postgresql.conf`, and due to concerns over the file management methodology using an `exec { 'touch ...': }` as a way to create an empty file the existing postgresql\_puppet\_extras.conf file is no longer managed by this module. + +If you wish to recreate this methodology yourself, use this pattern: + + class { 'postgresql::server': } + + $extras = "/tmp/include.conf" + + file { $extras: + content => 'max_connections = 123', + notify => Class['postgresql::server::service'], + }-> + postgresql::server::config_entry { 'include': + value => $extras, + } + +####All uses of the parameter `charset` changed to `encoding` + +Since PostgreSQL uses the terminology `encoding` not `charset` the parameter has been made consisent across all classes and resources. + +####The `postgresql` base class is no longer how you set globals + +The old global override pattern was less then optimal so it has been fixed, however we decided to demark this properly by specifying these overrides in the class `postgresql::globals`. Consult the documentation for this class now to see what options are available. + +Also, some parameter elements have been moved between this and the `postgresql::server` class where it made sense. + +####`config_hash` parameter collapsed for the `postgresql::server` class + +Because the `config_hash` was really passing data through to what was in effect an internal class (`postgresql::config`). And since we don't want this kind of internal exposure the parameters were collapsed up into the `postgresql::server` class directly. + +####Lots of changes to 'private' or 'undocumented' classes + +If you were using these before, these have changed names. You should only use what is documented in this README.md, and if you don't have what you need you should raise a patch to add that feature to a public API. All internal classes now have a comment at the top indicating them as private to make sure the message is clear that they are not supported as Public API. + +####`pg_hba_conf_defaults` parameter included to turn off default pg\_hba rules + +The defaults should be good enough for most cases (if not raise a bug) but if you simply need an escape hatch, this setting will turn off the defaults. If you want to do this, it may affect the rest of the module so make sure you replace the rules with something that continues operation. + +####`postgresql::database_user` has now been removed + +Use `postgresql::server::role` instead. + +####`postgresql::psql` resource has now been removed + +Use `postgresql_psql` instead. In the future we may recreate this as a wrapper to add extra capability, but it will not match the old behaviour. + +####`postgresql_default_version` fact has now been removed + +It didn't make sense to have this logic in a fact any more, the logic has been moved into `postgresql::params`. + +####`ripienaar/concat` is no longer used, instead we use `puppetlabs/concat` + +The older concat module is now deprecated and moved into the `puppetlabs/concat` namespace. Functionality is more or less identical, but you may need to intervene during the installing of this package - as both use the same `concat` namespace. + +Reference +--------- + +The postgresql module comes with many options for configuring the server. While you are unlikely to use all of the below settings, they allow you a decent amount of control over your security settings. + +Classes: + +* [postgresql::client](#class-postgresqlclient) +* [postgresql::globals](#class-postgresqlglobals) +* [postgresql::lib::devel](#class-postgresqllibdevel) +* [postgresql::lib::java](#class-postgresqllibjava) +* [postgresql::lib::python](#class-postgresqllibpython) +* [postgresql::server](#class-postgresqlserver) +* [postgresql::server::plperl](#class-postgresqlserverplperl) +* [postgresql::server::contrib](#class-postgresqlservercontrib) + +Resources: + +* [postgresql::server::config_entry](#resource-postgresqlserverconfigentry) +* [postgresql::server::db](#resource-postgresqlserverdb) +* [postgresql::server::database](#resource-postgresqlserverdatabase) +* [postgresql::server::database_grant](#resource-postgresqlserverdatabasegrant) +* [postgresql::server::pg_hba_rule](#resource-postgresqlserverpghbarule) +* [postgresql::server::role](#resource-postgresqlserverrole) +* [postgresql::server::table_grant](#resource-postgresqlservertablegrant) +* [postgresql::server::tablespace](#resource-postgresqlservertablespace) +* [postgresql::validate_db_connection](#resource-postgresqlvalidatedbconnection) + +Functions: + +* [postgresql\_password](#function-postgresqlpassword) +* [postgresql\_acls\_to\_resources\_hash](#function-postgresqlaclstoresourceshashaclarray-id-orderoffset) + + +###Class: postgresql::globals +*Note:* most server specific defaults should be overriden in the `postgresql::server` class. This class should only be used if you are using a non-standard OS or if you are changing elements such as `version` or `manage_package_repo` that can only be changed here. + +This class allows you to configure the main settings for this module in a global way, to be used by the other classes and defined resources. On its own it does nothing. + +For example, if you wanted to overwrite the default `locale` and `encoding` for all classes you could use the following combination: + + class { 'postgresql::globals': + encoding => 'UTF8', + locale => 'en_NG', + }-> + class { 'postgresql::server': + } + +That would make the `encoding` and `locale` the default for all classes and defined resources in this module. + +If you want to use the upstream PostgreSQL packaging, and be specific about the version you wish to download, you could use something like this: + + class { 'postgresql::globals': + manage_package_repo => true, + version => '9.2', + }-> + class { 'postgresql::server': } + +####`client_package_name` +This setting can be used to override the default postgresql client package name. If not specified, the module will use whatever package name is the default for your OS distro. + +####`server_package_name` +This setting can be used to override the default postgresql server package name. If not specified, the module will use whatever package name is the default for your OS distro. + +####`contrib_package_name` +This setting can be used to override the default postgresql contrib package name. If not specified, the module will use whatever package name is the default for your OS distro. + +####`devel_package_name` +This setting can be used to override the default postgresql devel package name. If not specified, the module will use whatever package name is the default for your OS distro. + +####`java_package_name` +This setting can be used to override the default postgresql java package name. If not specified, the module will use whatever package name is the default for your OS distro. + +####`plperl_package_name` +This setting can be used to override the default postgresql PL/perl package name. If not specified, the module will use whatever package name is the default for your OS distro. + +####`python_package_name` +This setting can be used to override the default postgresql Python package name. If not specified, the module will use whatever package name is the default for your OS distro. + +####`service_name` +This setting can be used to override the default postgresql service name. If not specified, the module will use whatever service name is the default for your OS distro. + +####`service_provider` +This setting can be used to override the default postgresql service provider. If not specified, the module will use whatever service provider is the default for your OS distro. + +####`service_status` +This setting can be used to override the default status check command for your PostgreSQL service. If not specified, the module will use whatever service status is the default for your OS distro. + +####`default_database` +This setting is used to specify the name of the default database to connect with. On most systems this will be "postgres". + +####`initdb_path` +Path to the `initdb` command. + +####`createdb_path` +Path to the `createdb` command. + +####`psql_path` +Path to the `psql` command. + +####`pg_hba_conf_path` +Path to your `pg\_hba.conf` file. + +####`postgresql_conf_path` +Path to your `postgresql.conf` file. + +####`pg_hba_conf_defaults` +If false, disables the defaults supplied with the module for `pg\_hba.conf`. This is useful if you disagree with the defaults and wish to override them yourself. Be sure that your changes of course align with the rest of the module, as some access is required to perform basic `psql` operations for example. + +####`datadir` +This setting can be used to override the default postgresql data directory for the target platform. If not specified, the module will use whatever directory is the default for your OS distro. + +####`confdir` +This setting can be used to override the default postgresql configuration directory for the target platform. If not specified, the module will use whatever directory is the default for your OS distro. + +####`bindir` +This setting can be used to override the default postgresql binaries directory for the target platform. If not specified, the module will use whatever directory is the default for your OS distro. + +####`xlogdir` +This setting can be used to override the default postgresql xlog directory. If not specified the module will use initdb's default path. + +####`user` +This setting can be used to override the default postgresql super user and owner of postgresql related files in the file system. If not specified, the module will use the user name 'postgres'. + +####`group` +This setting can be used to override the default postgresql user group to be used for related files in the file system. If not specified, the module will use the group name 'postgres'. + +####`version` +The version of PostgreSQL to install/manage. This is a simple way of providing a specific version such as '9.2' or '8.4' for example. + +Defaults to your operating system default. + +####`needs_initdb` +This setting can be used to explicitly call the initdb operation after server package is installed and before the postgresql service is started. If not specified, the module will decide whether to call initdb or not depending on your OS distro. + +####`encoding` +This will set the default encoding encoding for all databases created with this module. On certain operating systems this will be used during the `template1` initialization as well so it becomes a default outside of the module as well. Defaults to the operating system default. + +####`locale` +This will set the default database locale for all databases created with this module. On certain operating systems this will be used during the `template1` initialization as well so it becomes a default outside of the module as well. Defaults to `undef` which is effectively `C`. + +#####Debian + +On Debian you'll need to ensure that the 'locales-all' package is installed for full functionality of Postgres. + +####`firewall_supported` +This allows you to override the automated detection to see if your OS supports the `firewall` module. + +####`manage_package_repo` +If `true` this will setup the official PostgreSQL repositories on your host. Defaults to `false`. + +###Class: postgresql::server +The following list are options that you can set in the `config_hash` parameter of `postgresql::server`. + +####`ensure` +This value default to `present`. When set to `absent` it will remove all packages, configuration and data so use this with extreme caution. + +####`version` +This will set the version of the PostgreSQL software to install. Defaults to your operating systems default. + +####`postgres_password` +This value defaults to `undef`, meaning the super user account in the postgres database is a user called `postgres` and this account does not have a password. If you provide this setting, the module will set the password for the `postgres` user to your specified value. + +####`package_name` +The name of the package to use for installing the server software. Defaults to the default for your OS distro. + +####`package_ensure` +Value to pass through to the `package` resource when creating the server instance. Defaults to `undef`. + +####`plperl_package_name` +This sets the default package name for the PL/Perl extension. Defaults to utilising the operating system default. + +####`service_name` +This setting can be used to override the default postgresql service name. If not specified, the module will use whatever service name is the default for your OS distro. + +####`service_name` +This setting can be used to override the default postgresql service provider. If not specified, the module will use whatever service name is the default for your OS distro. + +####`service_status` +This setting can be used to override the default status check command for your PostgreSQL service. If not specified, the module will use whatever service name is the default for your OS distro. + +####`default_database` +This setting is used to specify the name of the default database to connect with. On most systems this will be "postgres". + +####`listen_addresses` +This value defaults to `localhost`, meaning the postgres server will only accept connections from localhost. If you'd like to be able to connect to postgres from remote machines, you can override this setting. A value of `*` will tell postgres to accept connections from any remote machine. Alternately, you can specify a comma-separated list of hostnames or IP addresses. (For more info, have a look at the `postgresql.conf` file from your system's postgres package). + +####`ip_mask_deny_postgres_user` +This value defaults to `0.0.0.0/0`. Sometimes it can be useful to block the superuser account from remote connections if you are allowing other database users to connect remotely. Set this to an IP and mask for which you want to deny connections by the postgres superuser account. So, e.g., the default value of `0.0.0.0/0` will match any remote IP and deny access, so the postgres user won't be able to connect remotely at all. Conversely, a value of `0.0.0.0/32` would not match any remote IP, and thus the deny rule will not be applied and the postgres user will be allowed to connect. + +####`ip_mask_allow_all_users` +This value defaults to `127.0.0.1/32`. By default, Postgres does not allow any database user accounts to connect via TCP from remote machines. If you'd like to allow them to, you can override this setting. You might set it to `0.0.0.0/0` to allow database users to connect from any remote machine, or `192.168.0.0/16` to allow connections from any machine on your local 192.168 subnet. + +####`ipv4acls` +List of strings for access control for connection method, users, databases, IPv4 addresses; see [postgresql documentation](http://www.postgresql.org/docs/9.2/static/auth-pg-hba-conf.html) about `pg_hba.conf` for information (please note that the link will take you to documentation for the most recent version of Postgres, however links for earlier versions can be found on that page). + +####`ipv6acls` +List of strings for access control for connection method, users, databases, IPv6 addresses; see [postgresql documentation](http://www.postgresql.org/docs/9.2/static/auth-pg-hba-conf.html) about `pg_hba.conf` for information (please note that the link will take you to documentation for the most recent version of Postgres, however links for earlier versions can be found on that page). + +####`initdb_path` +Path to the `initdb` command. + +####`createdb_path` +Path to the `createdb` command. + +####`psql_path` +Path to the `psql` command. + +####`pg_hba_conf_path` +Path to your `pg\_hba.conf` file. + +####`postgresql_conf_path` +Path to your `postgresql.conf` file. + +####`pg_hba_conf_defaults` +If false, disables the defaults supplied with the module for `pg\_hba.conf`. This is useful if you di +sagree with the defaults and wish to override them yourself. Be sure that your changes of course alig +n with the rest of the module, as some access is required to perform basic `psql` operations for exam +ple. + +####`user` +This setting can be used to override the default postgresql super user and owner of postgresql related files in the file system. If not specified, the module will use the user name 'postgres'. + +####`group` +This setting can be used to override the default postgresql user group to be used for related files in the file system. If not specified, the module will use the group name 'postgres'. + +####`needs_initdb` +This setting can be used to explicitly call the initdb operation after server package is installed and before the postgresql service is started. If not specified, the module will decide whether to call initdb or not depending on your OS distro. + +####`encoding` +This will set the default encoding encoding for all databases created with this module. On certain operating systems this will be used during the `template1` initialization as well so it becomes a default outside of the module as well. Defaults to the operating system default. + +####`locale` +This will set the default database locale for all databases created with this module. On certain operating systems this will be used during the `template1` initialization as well so it becomes a default outside of the module as well. Defaults to `undef` which is effectively `C`. + +#####Debian + +On Debian you'll need to ensure that the 'locales-all' package is installed for full functionality of Postgres. + +####`manage_firewall` +This value defaults to `false`. Many distros ship with a fairly restrictive firewall configuration which will block the port that postgres tries to listen on. If you'd like for the puppet module to open this port for you (using the [puppetlabs-firewall](http://forge.puppetlabs.com/puppetlabs/firewall) module), change this value to true. Check the documentation for `puppetlabs/firewall` to ensure the rest of the global setup is applied, to ensure things like persistence and global rules are set correctly. + +####`manage_pg_hba_conf` +This value defaults to `true`. Whether or not manage the pg_hba.conf. If set to `true`, puppet will overwrite this file. If set to `false`, puppet will not modify the file. + + +###Class: postgresql::client + +This class installs postgresql client software. Alter the following parameters if you have a custom version you would like to install (Note: don't forget to make sure to add any necessary yum or apt repositories if specifying a custom version): + +####`package_name` +The name of the postgresql client package. + +####`package_ensure` +The ensure parameter passed on to postgresql client package resource. + + +###Class: postgresql::server::contrib +Installs the postgresql contrib package. + +####`package_name` +The name of the postgresql contrib package. + +####`package_ensure` +The ensure parameter passed on to postgresql contrib package resource. + + +###Class: postgresql::lib::devel +Installs the packages containing the development libraries for PostgreSQL. + +####`package_ensure` +Override for the `ensure` parameter during package installation. Defaults to `present`. + +####`package_name` +Overrides the default package name for the distribution you are installing to. Defaults to `postgresql-devel` or `postgresql-devel` depending on your distro. + + +###Class: postgresql::lib::java +This class installs postgresql bindings for Java (JDBC). Alter the following parameters if you have a custom version you would like to install (Note: don't forget to make sure to add any necessary yum or apt repositories if specifying a custom version): + +####`package_name` +The name of the postgresql java package. + +####`package_ensure` +The ensure parameter passed on to postgresql java package resource. + + +###Class: postgresql::lib::python +This class installs the postgresql Python libraries. For customer requirements you can customise the following parameters: + +####`package_name` +The name of the postgresql python package. + +####`package_ensure` +The ensure parameter passed on to postgresql python package resource. + + +###Class: postgresql::server::plperl +This class installs the PL/Perl procedural language for postgresql. + +####`package_name` +The name of the postgresql PL/Perl package. + +####`package_ensure` +The ensure parameter passed on to postgresql PL/Perl package resource. + + +###Resource: postgresql::server::config\_entry +This resource can be used to modify your `postgresql.conf` configuration file. + +Each resource maps to a line inside your `postgresql.conf` file, for example: + + postgresql::server::config_entry { 'check_function_bodies': + value => 'off', + } + +####`namevar` +Name of the setting to change. + +####`ensure` +Set to `absent` to remove an entry. + +####`value` +Value for the setting. + + +###Resource: postgresql::server::db +This is a convenience resource that creates a database, user and assigns necessary permissions in one go. + +For example, to create a database called `test1` with a corresponding user of the same name, you can use: + + postgresql::server::db { 'test1': + user => 'test1', + password => 'test1', + } + +####`namevar` +The namevar for the resource designates the name of the database. + +####`user` +User to create and assign access to the database upon creation. Mandatory. + +####`password` +Password for the created user. Mandatory. + +####`encoding` +Override the character set during creation of the database. Defaults to the default defined during installation. + +####`locale` +Override the locale during creation of the database. Defaults to the default defined during installation. + +####`grant` +Grant permissions during creation. Defaults to `ALL`. + +####`tablespace` +The name of the tablespace to allocate this database to. If not specifies, it defaults to the PostgreSQL default. + +####`istemplate` +Define database as a template. Defaults to `false`. + + +###Resource: postgresql::server::database +This defined type can be used to create a database with no users and no permissions, which is a rare use case. + +####`namevar` +The name of the database to create. + +####`dbname` +The name of the database, defaults to the namevar. + +####`owner` +Name of the database user who should be set as the owner of the database. Defaults to the $user variable set in `postgresql::server` or `postgresql::globals`. + +####`tablespace` +Tablespace for where to create this database. Defaults to the defaults defined during PostgreSQL installation. + +####`encoding` +Override the character set during creation of the database. Defaults to the default defined during installation. + +####`locale` +Override the locale during creation of the database. Defaults to the default defined during installation. + +####`istemplate` +Define database as a template. Defaults to `false`. + + +###Resource: postgresql::server::database\_grant +This defined type manages grant based access privileges for users, wrapping the `postgresql::server::database_grant` for database specific permissions. Consult the PostgreSQL documentation for `grant` for more information. + +####`namevar` +Used to uniquely identify this resource, but functionality not used during grant. + +####`privilege` +Can be one of `SELECT`, `TEMPORARY`, `TEMP`, `CONNECT`. `ALL` is used as a synonym for `CREATE`. If you need to add multiple privileges, a space delimited string can be used. + +####`db` +Database to grant access to. + +####`role` +Role or user whom you are granting access for. + +####`psql_db` +Database to execute the grant against. This should not ordinarily be changed from the default, which is `postgres`. + +####`psql_user` +OS user for running `psql`. Defaults to the default user for the module, usually `postgres`. + + +###Resource: postgresql::server::pg\_hba\_rule +This defined type allows you to create an access rule for `pg_hba.conf`. For more details see the [PostgreSQL documentation](http://www.postgresql.org/docs/8.2/static/auth-pg-hba-conf.html). + +For example: + + postgresql::server::pg_hba_rule { 'allow application network to access app database': + description => "Open up postgresql for access from 200.1.2.0/24", + type => 'host', + database => 'app', + user => 'app', + address => '200.1.2.0/24', + auth_method => 'md5', + } + +This would create a ruleset in `pg_hba.conf` similar to: + + # Rule Name: allow application network to access app database + # Description: Open up postgresql for access from 200.1.2.0/24 + # Order: 150 + host app app 200.1.2.0/24 md5 + +####`namevar` +A unique identifier or short description for this rule. The namevar doesn't provide any functional usage, but it is stored in the comments of the produced `pg_hba.conf` so the originating resource can be identified. + +####`description` +A longer description for this rule if required. Defaults to `none`. This description is placed in the comments above the rule in `pg_hba.conf`. + +####`type` +The type of rule, this is usually one of: `local`, `host`, `hostssl` or `hostnossl`. + +####`database` +A comma separated list of databases that this rule matches. + +####`user` +A comma separated list of database users that this rule matches. + +####`address` +If the type is not 'local' you can provide a CIDR based address here for rule matching. + +####`auth_method` +The `auth_method` is described further in the `pg_hba.conf` documentation, but it provides the method that is used for authentication for the connection that this rule matches. + +####`auth_option` +For certain `auth_method` settings there are extra options that can be passed. Consult the PostgreSQL `pg_hba.conf` documentation for further details. + +####`order` +An order for placing the rule in `pg_hba.conf`. Defaults to `150`. + +####`target` +This provides the target for the rule, and is generally an internal only property. Use with caution. + + +###Resource: postgresql::server::role +This resource creates a role or user in PostgreSQL. + +####`namevar` +The role name to create. + +####`password_hash` +The hash to use during password creation. If the password is not already pre-encrypted in a format that PostgreSQL supports, use the `postgresql_password` function to provide an MD5 hash here, for example: + + postgresql::role { "myusername": + password_hash => postgresql_password('myusername', 'mypassword'), + } + +####`createdb` +Whether to grant the ability to create new databases with this role. Defaults to `false`. + +####`createrole` +Whether to grant the ability to create new roles with this role. Defaults to `false`. + +####`login` +Whether to grant login capability for the new role. Defaults to `false`. + +####`superuser` +Whether to grant super user capability for the new role. Defaults to `false`. + +####`replication` +If `true` provides replication capabilities for this role. Defaults to `false`. + +####`connection_limit` +Specifies how many concurrent connections the role can make. Defaults to `-1` meaning no limit. + +####`username` +The username of the role to create, defaults to `namevar`. + + +###Resource: postgresql::server::table\_grant +This defined type manages grant based access privileges for users. Consult the PostgreSQL documentation for `grant` for more information. + +####`namevar` +Used to uniquely identify this resource, but functionality not used during grant. + +####`privilege` +Can be one of `SELECT`, `INSERT`, `UPDATE`, `REFERENCES`. `ALL` is used as a synonym for `CREATE`. If you need to add multiple privileges, a space delimited string can be used. + +####`table` +Table to grant access on. + +####`db` +Database of table. + +####`role` +Role or user whom you are granting access for. + +####`psql_db` +Database to execute the grant against. This should not ordinarily be changed from the default, which is `postgres`. + +####`psql_user` +OS user for running `psql`. Defaults to the default user for the module, usually `postgres`. + + +###Resource: postgresql::server::tablespace +This defined type can be used to create a tablespace. For example: + + postgresql::tablespace { 'tablespace1': + location => '/srv/space1', + } + +It will create the location if necessary, assigning it the same permissions as your +PostgreSQL server. + +####`namevar` +The tablespace name to create. + +####`location` +The path to locate this tablespace. + +####`owner` +The default owner of the tablespace. + +####`spcname` +Name of the tablespace. Defaults to `namevar`. + + +###Resource: postgresql::validate\_db\_connection +This resource can be utilised inside composite manifests to validate that a client has a valid connection with a remote PostgreSQL database. It can be ran from any node where the PostgreSQL client software is installed to validate connectivity before commencing other dependent tasks in your Puppet manifests, so it is often used when chained to other tasks such as: starting an application server, performing a database migration. + +Example usage: + + postgresql::validate_db_connection { 'validate my postgres connection': + database_host => 'my.postgres.host', + database_username => 'mydbuser', + database_password => 'mydbpassword', + database_name => 'mydbname', + }-> + exec { 'rake db:migrate': + cwd => '/opt/myrubyapp', + } + +####`namevar` +Uniquely identify this resource, but functionally does nothing. + +####`database_host` +The hostname of the database you wish to test. Defaults to 'undef' which generally uses the designated local unix socket. + +####`database_port` +Port to use when connecting. Default to 'undef' which generally defaults to 5432 depending on your PostgreSQL packaging. + +####`database_name` +The name of the database you wish to test. Defaults to 'postgres'. + +####`database_username` +Username to connect with. Defaults to 'undef', which when using a unix socket and ident auth will be the user you are running as. If the host is remote you must provide a username. + +####`database_password` +Password to connect with. Can be left blank, but that is not recommended. + +####`run_as` +The user to run the `psql` command with for authenticiation. This is important when trying to connect to a database locally using Unix sockets and `ident` authentication. It is not needed for remote testing. + +####`sleep` +Upon failure, sets the number of seconds to sleep for before trying again. + +####`tries` +Upon failure, sets the number of attempts before giving up and failing the resource. + +####`create_db_first` +This will ensure the database is created before running the test. This only really works if your test is local. Defaults to `true`. + + +###Function: postgresql\_password +If you need to generate a postgres encrypted password, use `postgresql_password`. You can call it from your production manifests if you don't mind them containing the clear text versions of your passwords, or you can call it from the command line and then copy and paste the encrypted password into your manifest: + + $ puppet apply --execute 'notify { "test": message => postgresql_password("username", "password") }' + +###Function: postgresql\_acls\_to\_resources\_hash(acl\_array, id, order\_offset) +This internal function converts a list of `pg_hba.conf` based acls (passed in as an array of strings) to a format compatible with the `postgresql::pg_hba_rule` resource. + +**This function should only be used internally by the module**. + +Limitations +------------ + +Works with versions of PostgreSQL from 8.1 through 9.2. + +Current it is only actively tested with the following operating systems: + +* Debian 6.x and 7.x +* Centos 5.x and 6.x +* Ubuntu 10.04 and 12.04 + +Although patches are welcome for making it work with other OS distros, it is considered best effort. + +Development +------------ + +Puppet Labs modules on the Puppet Forge are open projects, and community contributions are essential for keeping them great. We can't access the huge number of platforms and myriad of hardware, software, and deployment configurations that Puppet is intended to serve. + +We want to keep it as easy as possible to contribute changes so that our modules work in your environment. There are a few guidelines that we need contributors to follow so that we can have a chance of keeping on top of things. + +You can read the complete module contribution guide [on the Puppet Labs wiki.](http://projects.puppetlabs.com/projects/module-site/wiki/Module_contributing) + +### Tests + +There are two types of tests distributed with the module. Unit tests with rspec-puppet and system tests using rspec-system. + +For unit testing, make sure you have: + +* rake +* bundler + +Install the necessary gems: + + bundle install --path=vendor + +And then run the unit tests: + + bundle exec rake spec + +The unit tests are ran in Travis-CI as well, if you want to see the results of your own tests regsiter the service hook through Travis-CI via the accounts section for your Github clone of this project. + +If you want to run the system tests, make sure you also have: + +* vagrant > 1.2.x +* Virtualbox > 4.2.10 + +Then run the tests using: + + bundle exec rake spec:system + +To run the tests on different operating systems, see the sets available in .nodeset.yml and run the specific set with the following syntax: + + RSPEC_SET=debian-607-x64 bundle exec rake spec:system + +Transfer Notice +---------------- + +This Puppet module was originally authored by Inkling Systems. The maintainer preferred that Puppet Labs take ownership of the module for future improvement and maintenance as Puppet Labs is using it in the PuppetDB module. Existing pull requests and issues were transferred over, please fork and continue to contribute here instead of Inkling. + +Previously: [https://github.com/inkling/puppet-postgresql](https://github.com/inkling/puppet-postgresql) + +Contributors +------------ + + * Andrew Moon + * [Kenn Knowles](https://github.com/kennknowles) ([@kennknowles](https://twitter.com/KennKnowles)) + * Adrien Thebo + * Albert Koch + * Andreas Ntaflos + * Bret Comnes + * Brett Porter + * Chris Price + * dharwood + * Etienne Pelletier + * Florin Broasca + * Henrik + * Hunter Haugen + * Jari Bakken + * Jordi Boggiano + * Ken Barber + * nzakaria + * Richard Arends + * Spenser Gilliland + * stormcrow + * William Van Hevelingen diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/postgresql/Rakefile b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/postgresql/Rakefile new file mode 100644 index 00000000000..3e7d0059ebc --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/postgresql/Rakefile @@ -0,0 +1,11 @@ +require 'rubygems' +require 'bundler/setup' + +Bundler.require :default + +require 'puppetlabs_spec_helper/rake_tasks' +require 'puppet-lint/tasks/puppet-lint' + +task :default do + sh %{rake -T} +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/postgresql/files/RPM-GPG-KEY-PGDG b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/postgresql/files/RPM-GPG-KEY-PGDG new file mode 100644 index 00000000000..065274e0d9a --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/postgresql/files/RPM-GPG-KEY-PGDG @@ -0,0 +1,30 @@ +-----BEGIN PGP PUBLIC KEY BLOCK----- +Version: GnuPG v1.4.7 (GNU/Linux) + +mQGiBEeD8koRBACC1VBRsUwGr9gxFFRho9kZpdRUjBJoPhkeOTvp9LzkdAQMFngr +BFi6N0ov1kCX7LLwBmDG+JPR7N+XcH9YR1coSHpLVg+JNy2kFDd4zAyWxJafjZ3a +9zFg9Yx+0va1BJ2t4zVcmKS4aOfbgQ5KwIOWUujalQW5Y+Fw39Gn86qjbwCg5dIo +tkM0l19h2sx50D027pV5aPsD/2c9pfcFTbMhB0CcKS836GH1qY+NCAdUwPs646ee +Ex/k9Uy4qMwhl3HuCGGGa+N6Plyon7V0TzZuRGp/1742dE8IO+I/KLy2L1d1Fxrn +XOTBZd8qe6nBwh12OMcKrsPBVBxn+iSkaG3ULsgOtx+HHLfa1/p22L5+GzGdxizr +peBuA/90cCp+lYcEwdYaRoFVR501yDOTmmzBc1DrsyWP79QMEGzMqa393G0VnqXt +L4pGmunq66Agw2EhPcIt3pDYiCmEt/obdVtSJH6BtmSDB/zYhbE8u3vLP3jfFDa9 +KXxgtYj0NvuUVoRmxSKm8jtfmj1L7zoKNz3jl+Ba3L0WxIv4+bRBUG9zdGdyZVNR +TCBSUE0gQnVpbGRpbmcgUHJvamVjdCA8cGdzcWxycG1zLWhhY2tlcnNAcGdmb3Vu +ZHJ5Lm9yZz6IYAQTEQIAIAUCR4PySgIbIwYLCQgHAwIEFQIIAwQWAgMBAh4BAheA +AAoJEB8W0uFELfD4jnkAoMqd6ZwwsgYHZ3hP9vt+DJt1uDW7AKDbRwP8ESKFhwdJ +8m91RPBeJW/tMLkCDQRHg/JKEAgA64+ZXgcERPYfZYo4p+yMTJAAa9aqnE3U4Ni6 +ZMB57GPuEy8NfbNya+HiftO8hoozmJdcI6XFyRBCDUVCdZ8SE+PJdOx2FFqZVIu6 +dKnr8ykhgLpNNEFDG3boK9UfLj/5lYQ3Y550Iym1QKOgyrJYeAp6sZ+Nx2PavsP3 +nMFCSD67BqAbcLCVQN7a2dAUXfEbfXJjPHXTbo1/kxtzE+KCRTLdXEbSEe3nHO04 +K/EgTBjeBUOxnciH5RylJ2oGy/v4xr9ed7R1jJtshsDKMdWApwoLlCBJ63jg/4T/ +z/OtXmu4AvmWaJxaTl7fPf2GqSqqb6jLCrQAH7AIhXr9V0zPZwADBQgAlpptNQHl +u7euIdIujFwwcxyQGfee6BG+3zaNSEHMVQMuc6bxuvYmgM9r7aki/b0YMfjJBk8v +OJ3Eh1vDH/woJi2iJ13vQ21ot+1JP3fMd6NPR8/qEeDnmVXu7QAtlkmSKI9Rdnjz +FFSUJrQPHnKsH4V4uvAM+njwYD+VFiwlBPTKNeL8cdBb4tPN2cdVJzoAp57wkZAN +VA2tKxNsTJKBi8wukaLWX8+yPHiWCNWItvyB4WCEp/rZKG4A868NM5sZQMAabpLd +l4fTiGu68OYgK9qUPZvhEAL2C1jPDVHPkLm+ZsD+90Pe66w9vB00cxXuHLzm8Pad +GaCXCY8h3xi6VIhJBBgRAgAJBQJHg/JKAhsMAAoJEB8W0uFELfD4K4cAoJ4yug8y +1U0cZEiF5W25HDzMTtaDAKCaM1m3Cbd+AZ0NGWNg/VvIX9MsPA== +=au6K +-----END PGP PUBLIC KEY BLOCK----- diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/postgresql/files/validate_postgresql_connection.sh b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/postgresql/files/validate_postgresql_connection.sh new file mode 100644 index 00000000000..f126d99be4b --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/postgresql/files/validate_postgresql_connection.sh @@ -0,0 +1,31 @@ +#!/usr/bin/env bash + +# usage is: validate_db_connection 2 50 psql + +SLEEP=$1 +TRIES=$2 +PSQL=$3 + +STATE=1 + +for (( c=1; c<=$TRIES; c++ )) +do + echo $c + if [ $c -gt 1 ] + then + echo 'sleeping' + sleep $SLEEP + fi + + /bin/echo "SELECT 1" | $PSQL + STATE=$? + + if [ $STATE -eq 0 ] + then + exit 0 + fi +done + +echo 'Unable to connect to postgresql' + +exit 1 diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/postgresql/lib/puppet/parser/functions/postgresql_acls_to_resources_hash.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/postgresql/lib/puppet/parser/functions/postgresql_acls_to_resources_hash.rb new file mode 100644 index 00000000000..7fa785486c0 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/postgresql/lib/puppet/parser/functions/postgresql_acls_to_resources_hash.rb @@ -0,0 +1,76 @@ +module Puppet::Parser::Functions + newfunction(:postgresql_acls_to_resources_hash, :type => :rvalue, :doc => <<-EOS + This internal function translates the ipv(4|6)acls format into a resource + suitable for create_resources. It is not intended to be used outside of the + postgresql internal classes/defined resources. + + This function accepts an array of strings that are pg_hba.conf rules. It + will return a hash that can be fed into create_resources to create multiple + individual pg_hba_rule resources. + + The second parameter is an identifier that will be included in the namevar + to provide uniqueness. It must be a string. + + The third parameter is an order offset, so you can start the order at an + arbitrary starting point. + EOS + ) do |args| + func_name = "postgresql_acls_to_resources_hash()" + + raise(Puppet::ParseError, "#{func_name}: Wrong number of arguments " + + "given (#{args.size} for 3)") if args.size != 3 + + acls = args[0] + raise(Puppet::ParseError, "#{func_name}: first argument must be an array") \ + unless acls.instance_of? Array + + id = args[1] + raise(Puppet::ParseError, "#{func_name}: second argument must be a string") \ + unless id.instance_of? String + + offset = args[2].to_i + raise(Puppet::ParseError, "#{func_name}: third argument must be a number") \ + unless offset.instance_of? Fixnum + + resources = {} + acls.each do |acl| + index = acls.index(acl) + + parts = acl.split + + raise(Puppet::ParseError, "#{func_name}: acl line #{index} does not " + + "have enough parts") unless parts.length >= 4 + + resource = { + 'type' => parts[0], + 'database' => parts[1], + 'user' => parts[2], + 'order' => format('%03d', offset + index), + } + if parts[0] == 'local' then + resource['auth_method'] = parts[3] + if parts.length > 4 then + resource['auth_option'] = parts.last(parts.length - 4).join(" ") + end + else + if parts[4] =~ /^\d/ + resource['address'] = parts[3] + ' ' + parts[4] + resource['auth_method'] = parts[5] + + if parts.length > 6 then + resource['auth_option'] = parts.last(parts.length - 6).join(" ") + end + else + resource['address'] = parts[3] + resource['auth_method'] = parts[4] + + if parts.length > 5 then + resource['auth_option'] = parts.last(parts.length - 5).join(" ") + end + end + end + resources["postgresql class generated rule #{id} #{index}"] = resource + end + resources + end +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/postgresql/lib/puppet/parser/functions/postgresql_escape.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/postgresql/lib/puppet/parser/functions/postgresql_escape.rb new file mode 100644 index 00000000000..4089a4e94de --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/postgresql/lib/puppet/parser/functions/postgresql_escape.rb @@ -0,0 +1,25 @@ +require 'digest/md5' + +module Puppet::Parser::Functions + newfunction(:postgresql_escape, :type => :rvalue, :doc => <<-EOS + Safely escapes a string using $$ using a random tag which should be consistent + EOS + ) do |args| + + raise(Puppet::ParseError, "postgresql_escape(): Wrong number of arguments " + + "given (#{args.size} for 1)") if args.size != 1 + + password = args[0] + + if password !~ /\$\$/ + retval = "$$#{password}$$" + else + escape = Digest::MD5.hexdigest(password)[0..5].gsub(/\d/,'') + until password !~ /#{escape}/ + escape = Digest::MD5.hexdigest(escape)[0..5].gsub(/\d/,'') + end + retval = "$#{escape}$#{password}$#{escape}$" + end + retval + end +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/postgresql/lib/puppet/parser/functions/postgresql_password.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/postgresql/lib/puppet/parser/functions/postgresql_password.rb new file mode 100644 index 00000000000..0689e0e5b0f --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/postgresql/lib/puppet/parser/functions/postgresql_password.rb @@ -0,0 +1,18 @@ +# hash a string as mysql's "PASSWORD()" function would do it +require 'digest/md5' + +module Puppet::Parser::Functions + newfunction(:postgresql_password, :type => :rvalue, :doc => <<-EOS + Returns the postgresql password hash from the clear text username / password. + EOS + ) do |args| + + raise(Puppet::ParseError, "postgresql_password(): Wrong number of arguments " + + "given (#{args.size} for 2)") if args.size != 2 + + username = args[0] + password = args[1] + + 'md5' + Digest::MD5.hexdigest(password + username) + end +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/postgresql/lib/puppet/provider/postgresql_conf/parsed.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/postgresql/lib/puppet/provider/postgresql_conf/parsed.rb new file mode 100644 index 00000000000..c9366b52003 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/postgresql/lib/puppet/provider/postgresql_conf/parsed.rb @@ -0,0 +1,37 @@ +require 'puppet/provider/parsedfile' + +Puppet::Type.type(:postgresql_conf).provide( + :parsed, + :parent => Puppet::Provider::ParsedFile, + :default_target => '/etc/postgresql.conf', + :filetype => :flat +) do + desc "Set key/values in postgresql.conf." + + text_line :comment, :match => /^\s*#/ + text_line :blank, :match => /^\s*$/ + + record_line :parsed, + :fields => %w{name value comment}, + :optional => %w{comment}, + :match => /^\s*([\w\.]+)\s*=?\s*(.*?)(?:\s*#\s*(.*))?\s*$/, + :to_line => proc { |h| + + # simple string and numeric values don't need to be enclosed in quotes + dontneedquote = h[:value].match(/^(\w+|[0-9.-]+)$/) + dontneedequal = h[:name].match(/^(include|include_if_exists)$/i) + + str = h[:name].downcase # normalize case + str += dontneedequal ? ' ' : ' = ' + str += "'" unless dontneedquote && !dontneedequal + str += h[:value] + str += "'" unless dontneedquote && !dontneedequal + str += " # #{h[:comment]}" unless (h[:comment].nil? or h[:comment] == :absent) + str + }, + :post_parse => proc { |h| + h[:name].downcase! # normalize case + h[:value].gsub!(/(^'|'$)/, '') # strip out quotes + } + +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/postgresql/lib/puppet/provider/postgresql_psql/ruby.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/postgresql/lib/puppet/provider/postgresql_psql/ruby.rb new file mode 100644 index 00000000000..b86fb62a6e8 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/postgresql/lib/puppet/provider/postgresql_psql/ruby.rb @@ -0,0 +1,93 @@ +Puppet::Type.type(:postgresql_psql).provide(:ruby) do + + def command() + if ((! resource[:unless]) or (resource[:unless].empty?)) + if (resource.refreshonly?) + # So, if there's no 'unless', and we're in "refreshonly" mode, + # we need to return the target command here. If we don't, + # then Puppet will generate an event indicating that this + # property has changed. + return resource[:command] + end + + # if we're not in refreshonly mode, then we return nil, + # which will cause Puppet to sync this property. This + # is what we want if there is no 'unless' value specified. + return nil + end + + if Puppet::PUPPETVERSION.to_f < 4 + output, status = run_unless_sql_command(resource[:unless]) + else + output = run_unless_sql_command(resource[:unless]) + status = output.exitcode + end + + if status != 0 + puts status + self.fail("Error evaluating 'unless' clause: '#{output}'") + end + result_count = output.strip.to_i + if result_count > 0 + # If the 'unless' query returned rows, then we don't want to execute + # the 'command'. Returning the target 'command' here will cause + # Puppet to treat this property as already being 'insync?', so it + # won't call the setter to run the 'command' later. + return resource[:command] + end + + # Returning 'nil' here will cause Puppet to see this property + # as out-of-sync, so it will call the setter later. + nil + end + + def command=(val) + output, status = run_sql_command(val) + + if status != 0 + self.fail("Error executing SQL; psql returned #{status}: '#{output}'") + end + end + + + def run_unless_sql_command(sql) + # for the 'unless' queries, we wrap the user's query in a 'SELECT COUNT', + # which makes it easier to parse and process the output. + run_sql_command('SELECT COUNT(*) FROM (' << sql << ') count') + end + + def run_sql_command(sql) + if resource[:search_path] + sql = "set search_path to #{Array(resource[:search_path]).join(',')}; #{sql}" + end + + command = [resource[:psql_path]] + command.push("-d", resource[:db]) if resource[:db] + command.push("-t", "-c", sql) + + if resource[:cwd] + Dir.chdir resource[:cwd] do + run_command(command, resource[:psql_user], resource[:psql_group]) + end + else + run_command(command, resource[:psql_user], resource[:psql_group]) + end + end + + def run_command(command, user, group) + if Puppet::PUPPETVERSION.to_f < 3.4 + Puppet::Util::SUIDManager.run_and_capture(command, user, group) + else + output = Puppet::Util::Execution.execute(command, { + :uid => user, + :gid => group, + :failonfail => false, + :combine => true, + :override_locale => true, + :custom_environment => {} + }) + [output, $CHILD_STATUS.dup] + end + end + +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/postgresql/lib/puppet/type/postgresql_conf.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/postgresql/lib/puppet/type/postgresql_conf.rb new file mode 100644 index 00000000000..f227fd7824d --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/postgresql/lib/puppet/type/postgresql_conf.rb @@ -0,0 +1,31 @@ +module Puppet + newtype(:postgresql_conf) do + + @doc = "This type allows puppet to manage postgresql.conf parameters." + + ensurable + + newparam(:name) do + desc "The postgresql parameter name to manage." + isnamevar + + newvalues(/^[\w\.]+$/) + end + + newproperty(:value) do + desc "The value to set for this parameter." + end + + newproperty(:target) do + desc "The path to postgresql.conf" + defaultto { + if @resource.class.defaultprovider.ancestors.include?(Puppet::Provider::ParsedFile) + @resource.class.defaultprovider.default_target + else + nil + end + } + end + + end +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/postgresql/lib/puppet/type/postgresql_psql.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/postgresql/lib/puppet/type/postgresql_psql.rb new file mode 100644 index 00000000000..8646914d6e3 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/postgresql/lib/puppet/type/postgresql_psql.rb @@ -0,0 +1,89 @@ +Puppet::Type.newtype(:postgresql_psql) do + + newparam(:name) do + desc "An arbitrary tag for your own reference; the name of the message." + isnamevar + end + + newproperty(:command) do + desc 'The SQL command to execute via psql.' + + defaultto { @resource[:name] } + + def sync(refreshing = false) + # We're overriding 'sync' here in order to do some magic + # in support of providing a 'refreshonly' parameter. This + # is kind of hacky because the logic for 'refreshonly' is + # spread between the type and the provider, but this is + # the least horrible way that I could determine to accomplish + # it. + # + # Note that our overridden version of 'sync' takes a parameter, + # 'refreshing', which the parent version doesn't take. This + # allows us to call the sync method directly from the 'refresh' + # method, and then inside of the body of 'sync' we can tell + # whether or not we're refreshing. + + if (!@resource.refreshonly? || refreshing) + # If we're not in 'refreshonly' mode, or we're not currently + # refreshing, then we just call the parent method. + super() + else + # If we get here, it means we're in 'refreshonly' mode and + # we're not being called by the 'refresh' method, so we + # just no-op. We'll be called again by the 'refresh' + # method momentarily. + nil + end + end + end + + newparam(:unless) do + desc "An optional SQL command to execute prior to the main :command; " + + "this is generally intended to be used for idempotency, to check " + + "for the existence of an object in the database to determine whether " + + "or not the main SQL command needs to be executed at all." + end + + newparam(:db) do + desc "The name of the database to execute the SQL command against." + end + + newparam(:search_path) do + desc "The schema search path to use when executing the SQL command" + end + + newparam(:psql_path) do + desc "The path to psql executable." + defaultto("psql") + end + + newparam(:psql_user) do + desc "The system user account under which the psql command should be executed." + defaultto("postgres") + end + + newparam(:psql_group) do + desc "The system user group account under which the psql command should be executed." + defaultto("postgres") + end + + newparam(:cwd, :parent => Puppet::Parameter::Path) do + desc "The working directory under which the psql command should be executed." + defaultto("/tmp") + end + + newparam(:refreshonly, :boolean => true) do + desc "If 'true', then the SQL will only be executed via a notify/subscribe event." + + defaultto(:false) + newvalues(:true, :false) + end + + def refresh() + # All of the magic for this type is attached to the ':command' property, so + # we just need to sync it to accomplish a 'refresh'. + self.property(:command).sync(true) + end + +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/postgresql/manifests/client.pp b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/postgresql/manifests/client.pp new file mode 100644 index 00000000000..bdb821d73bb --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/postgresql/manifests/client.pp @@ -0,0 +1,29 @@ +# Install client cli tool. See README.md for more details. +class postgresql::client ( + $package_name = $postgresql::params::client_package_name, + $package_ensure = 'present' +) inherits postgresql::params { + validate_string($package_name) + + package { 'postgresql-client': + ensure => $package_ensure, + name => $package_name, + tag => 'postgresql', + } + + $file_ensure = $package_ensure ? { + 'present' => 'file', + true => 'file', + 'absent' => 'absent', + false => 'absent', + default => 'file', + } + file { "/usr/local/bin/validate_postgresql_connection.sh": + ensure => $file_ensure, + source => "puppet:///modules/postgresql/validate_postgresql_connection.sh", + owner => 0, + group => 0, + mode => 0755, + } + +} diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/postgresql/manifests/globals.pp b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/postgresql/manifests/globals.pp new file mode 100644 index 00000000000..ebc117d47ef --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/postgresql/manifests/globals.pp @@ -0,0 +1,94 @@ +# Class for setting cross-class global overrides. See README.md for more +# details. +class postgresql::globals ( + $ensure = undef, + + $client_package_name = undef, + $server_package_name = undef, + $contrib_package_name = undef, + $devel_package_name = undef, + $java_package_name = undef, + $plperl_package_name = undef, + $python_package_name = undef, + + $service_name = undef, + $service_provider = undef, + $service_status = undef, + $default_database = undef, + + $initdb_path = undef, + $createdb_path = undef, + $psql_path = undef, + $pg_hba_conf_path = undef, + $postgresql_conf_path = undef, + + $pg_hba_conf_defaults = undef, + + $datadir = undef, + $confdir = undef, + $bindir = undef, + $xlogdir = undef, + + $user = undef, + $group = undef, + + $version = undef, + + $needs_initdb = undef, + + $encoding = undef, + $locale = undef, + + $manage_firewall = undef, + $manage_pg_hba_conf = undef, + $firewall_supported = undef, + + $manage_package_repo = undef +) { + # We are determining this here, because it is needed by the package repo + # class. + $default_version = $::osfamily ? { + /^(RedHat|Linux)/ => $::operatingsystem ? { + 'Fedora' => $::operatingsystemrelease ? { + /^(18|19|20)$/ => '9.2', + /^(17)$/ => '9.1', + default => undef, + }, + 'Amazon' => '9.2', + default => $::operatingsystemrelease ? { + /^6\./ => '8.4', + /^5\./ => '8.1', + default => undef, + }, + }, + 'Debian' => $::operatingsystem ? { + 'Debian' => $::operatingsystemrelease ? { + /^6\./ => '8.4', + /^(wheezy|7\.)/ => '9.1', + default => undef, + }, + 'Ubuntu' => $::operatingsystemrelease ? { + /^(14.04)$/ => '9.3', + /^(11.10|12.04|12.10|13.04|13.10)$/ => '9.1', + /^(10.04|10.10|11.04)$/ => '8.4', + default => undef, + }, + default => undef, + }, + 'Archlinux' => $::operatingsystem ? { + /Archlinux/ => '9.2', + default => '9.2', + }, + 'FreeBSD' => '93', + default => undef, + } + $globals_version = pick($version, $default_version, 'unknown') + + # Setup of the repo only makes sense globally, so we are doing this here. + if($manage_package_repo) { + class { 'postgresql::repo': + ensure => $ensure, + version => $globals_version + } + } +} diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/postgresql/manifests/lib/devel.pp b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/postgresql/manifests/lib/devel.pp new file mode 100644 index 00000000000..0c446d439cb --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/postgresql/manifests/lib/devel.pp @@ -0,0 +1,15 @@ +# This class installs postgresql development libraries. See README.md for more +# details. +class postgresql::lib::devel( + $package_name = $postgresql::params::devel_package_name, + $package_ensure = 'present' +) inherits postgresql::params { + + validate_string($package_name) + + package { 'postgresql-devel': + ensure => $package_ensure, + name => $package_name, + tag => 'postgresql', + } +} diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/postgresql/manifests/lib/java.pp b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/postgresql/manifests/lib/java.pp new file mode 100644 index 00000000000..e9ee53dabee --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/postgresql/manifests/lib/java.pp @@ -0,0 +1,15 @@ +# This class installs the postgresql jdbc connector. See README.md for more +# details. +class postgresql::lib::java ( + $package_name = $postgresql::params::java_package_name, + $package_ensure = 'present' +) inherits postgresql::params { + + validate_string($package_name) + + package { 'postgresql-jdbc': + ensure => $package_ensure, + name => $package_name, + } + +} diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/postgresql/manifests/lib/python.pp b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/postgresql/manifests/lib/python.pp new file mode 100644 index 00000000000..bfe05854875 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/postgresql/manifests/lib/python.pp @@ -0,0 +1,13 @@ +# This class installs the python libs for postgresql. See README.md for more +# details. +class postgresql::lib::python( + $package_name = $postgresql::params::python_package_name, + $package_ensure = 'present' +) inherits postgresql::params { + + package { 'python-psycopg2': + ensure => $package_ensure, + name => $package_name, + } + +} diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/postgresql/manifests/params.pp b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/postgresql/manifests/params.pp new file mode 100644 index 00000000000..4f5ae97eba7 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/postgresql/manifests/params.pp @@ -0,0 +1,175 @@ +# PRIVATE CLASS: do not use directly +class postgresql::params inherits postgresql::globals { + $ensure = true + $version = $globals_version + $listen_addresses = 'localhost' + $ip_mask_deny_postgres_user = '0.0.0.0/0' + $ip_mask_allow_all_users = '127.0.0.1/32' + $ipv4acls = [] + $ipv6acls = [] + $user = pick($user, 'postgres') + $group = pick($group, 'postgres') + $encoding = $encoding + $locale = $locale + $service_provider = $service_provider + $manage_firewall = $manage_firewall + $manage_pg_hba_conf = pick($manage_pg_hba_conf, true) + + # Amazon Linux's OS Family is 'Linux', operating system 'Amazon'. + case $::osfamily { + 'RedHat', 'Linux': { + $needs_initdb = pick($needs_initdb, true) + $firewall_supported = pick($firewall_supported, true) + + if $version == $default_version { + $client_package_name = pick($client_package_name, 'postgresql') + $server_package_name = pick($server_package_name, 'postgresql-server') + $contrib_package_name = pick($contrib_package_name,'postgresql-contrib') + $devel_package_name = pick($devel_package_name, 'postgresql-devel') + $java_package_name = pick($java_package_name, 'postgresql-jdbc') + $plperl_package_name = pick($plperl_package_name, 'postgresql-plperl') + $service_name = pick($service_name, 'postgresql') + $bindir = pick($bindir, '/usr/bin') + $datadir = $::operatingsystem ? { + 'Amazon' => pick($datadir, '/var/lib/pgsql9/data'), + default => pick($datadir, '/var/lib/pgsql/data'), + } + $confdir = pick($confdir, $datadir) + } else { + $version_parts = split($version, '[.]') + $package_version = "${version_parts[0]}${version_parts[1]}" + $client_package_name = pick($client_package_name, "postgresql${package_version}") + $server_package_name = pick($server_package_name, "postgresql${package_version}-server") + $contrib_package_name = pick($contrib_package_name,"postgresql${package_version}-contrib") + $devel_package_name = pick($devel_package_name, "postgresql${package_version}-devel") + $java_package_name = pick($java_package_name, "postgresql${package_version}-jdbc") + $plperl_package_name = pick($plperl_package_name, "postgresql${package_version}-plperl") + $service_name = pick($service_name, "postgresql-${version}") + $bindir = pick($bindir, "/usr/pgsql-${version}/bin") + $datadir = $::operatingsystem ? { + 'Amazon' => pick($datadir, "/var/lib/pgsql9/${version}/data"), + default => pick($datadir, "/var/lib/pgsql/${version}/data"), + } + $confdir = pick($confdir, $datadir) + } + $psql_path = pick($psql_path, "${bindir}/psql") + + $service_status = $service_status + $python_package_name = pick($python_package_name, 'python-psycopg2') + } + + 'Archlinux': { + # Based on the existing version of the firewall module, this is normally + # true for Archlinux, but archlinux users want more control. + # so they can set it themself + $firewall_supported = pick($firewall_supported, true) + $needs_initdb = pick($needs_initdb, true) + + # Archlinux doesn't have a client-package but has a libs package which + # pulls in postgresql server + $client_package_name = pick($client_package_name, 'postgresql') + $server_package_name = pick($server_package_name, 'postgresql-libs') + $java_package_name = pick($java_package_name, 'postgresql-jdbc') + # Archlinux doesn't have develop packages + $devel_package_name = pick($devel_package_name, 'postgresql-devel') + # Archlinux does have postgresql-contrib but it isn't maintained + $contrib_package_name = pick($contrib_package_name,'undef') + # Archlinux postgresql package provides plperl + $plperl_package_name = pick($plperl_package_name, 'undef') + $service_name = pick($service_name, 'postgresql') + $bindir = pick($bindir, '/usr/bin') + $datadir = pick($datadir, '/var/lib/postgres/data') + $confdir = pick($confdir, $datadir) + $psql_path = pick($psql_path, "${bindir}/psql") + + $service_status = $service_status + $python_package_name = pick($python_package_name, 'python-psycopg2') + } + + 'Debian': { + + if $manage_package_repo == true { + $needs_initdb = pick($needs_initdb, true) + $service_name = pick($service_name, 'postgresql') + } else { + $needs_initdb = pick($needs_initdb, false) + $service_name = $::operatingsystem ? { + 'Debian' => pick($service_name, 'postgresql'), + 'Ubuntu' => $::lsbmajdistrelease ? { + '10' => pick($service_name, "postgresql-${version}"), + default => pick($service_name, 'postgresql'), + }, + default => undef + } + } + + $client_package_name = pick($client_package_name, "postgresql-client-${version}") + $server_package_name = pick($server_package_name, "postgresql-${version}") + $contrib_package_name = pick($contrib_package_name, "postgresql-contrib-${version}") + $devel_package_name = pick($devel_package_name, 'libpq-dev') + $java_package_name = pick($java_package_name, 'libpostgresql-jdbc-java') + $plperl_package_name = pick($plperl_package_name, "postgresql-plperl-${version}") + $python_package_name = pick($python_package_name, 'python-psycopg2') + + $bindir = pick($bindir, "/usr/lib/postgresql/${version}/bin") + $datadir = pick($datadir, "/var/lib/postgresql/${version}/main") + $confdir = pick($confdir, "/etc/postgresql/${version}/main") + $service_status = pick($service_status, "/etc/init.d/${service_name} status | /bin/egrep -q 'Running clusters: .+|online'") + $psql_path = pick($psql_path, "/usr/bin/psql") + + $firewall_supported = pick($firewall_supported, true) + } + + 'FreeBSD': { + + $client_package_name = pick($client_package_name, "databases/postgresql${version}-client") + $server_package_name = pick($server_package_name, "databases/postgresql${version}-server") + $contrib_package_name = pick($contrib_package_name, "databases/postgresql${version}-contrib") + $devel_package_name = pick($devel_package_name, 'databases/postgresql-libpqxx3') + $java_package_name = pick($java_package_name, 'databases/postgresql-jdbc') + $plperl_package_name = pick($plperl_package_name, "databases/postgresql${version}-plperl") + $python_package_name = pick($python_package_name, 'databases/py-psycopg2') + + $service_name = pick($service_name, 'postgresql') + $bindir = pick($bindir, '/usr/local/bin') + $datadir = pick($datadir, '/usr/local/pgsql/data') + $confdir = pick($confdir, '/usr/local/share/postgresql') + $service_status = pick($service_status, "/usr/local/etc/rc.d/${service_name} status") + $psql_path = pick($psql_path, "${bindir}/psql") + + $firewall_supported = pick($firewall_supported, false) + $needs_initdb = pick($needs_initdb, true) + } + + default: { + # Based on the existing version of the firewall module, this is normally + # false for other OS, but this allows an escape hatch to override it. + $firewall_supported = pick($firewall_supported, false) + + $psql_path = pick($psql_path, "${bindir}/psql") + + # Since we can't determine defaults on our own, we rely on users setting + # parameters with the postgresql::globals class. Here we are checking + # that the mandatory minimum is set for the module to operate. + $err_prefix = "Module ${module_name} does not provide defaults for osfamily: ${::osfamily} operatingsystem: ${::operatingsystem}; please specify a value for ${module_name}::globals::" + if ($needs_initdb == undef) { fail("${err_prefix}needs_initdb") } + if ($service_name == undef) { fail("${err_prefix}service_name") } + if ($client_package_name == undef) { fail("${err_prefix}client_package_name") } + if ($server_package_name == undef) { fail("${err_prefix}server_package_name") } + if ($bindir == undef) { fail("${err_prefix}bindir") } + if ($datadir == undef) { fail("${err_prefix}datadir") } + if ($confdir == undef) { fail("${err_prefix}confdir") } + } + } + + $initdb_path = pick($initdb_path, "${bindir}/initdb") + $createdb_path = pick($createdb_path, "${bindir}/createdb") + $pg_hba_conf_path = pick($pg_hba_conf_path, "${confdir}/pg_hba.conf") + $pg_hba_conf_defaults = pick($pg_hba_conf_defaults, true) + $postgresql_conf_path = pick($postgresql_conf_path, "${confdir}/postgresql.conf") + $default_database = pick($default_database, 'postgres') + + if($version == 'unknown') { + fail('No preferred version defined or automatically detected.') + } +} diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/postgresql/manifests/repo.pp b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/postgresql/manifests/repo.pp new file mode 100644 index 00000000000..2e2cbd3f41a --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/postgresql/manifests/repo.pp @@ -0,0 +1,22 @@ +# PRIVATE CLASS: do not use directly +class postgresql::repo ( + $ensure = $postgresql::params::ensure, + $version = undef +) inherits postgresql::params { + case $::osfamily { + 'RedHat', 'Linux': { + if $version == undef { + fail("The parameter 'version' for 'postgresql::repo' is undefined. You must always define it when osfamily == Redhat or Linux") + } + class { 'postgresql::repo::yum_postgresql_org': } + } + + 'Debian': { + class { 'postgresql::repo::apt_postgresql_org': } + } + + default: { + fail("Unsupported managed repository for osfamily: ${::osfamily}, operatingsystem: ${::operatingsystem}, module ${module_name} currently only supports managing repos for osfamily RedHat and Debian") + } + } +} diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/postgresql/manifests/repo/apt_postgresql_org.pp b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/postgresql/manifests/repo/apt_postgresql_org.pp new file mode 100644 index 00000000000..610eb4724b8 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/postgresql/manifests/repo/apt_postgresql_org.pp @@ -0,0 +1,30 @@ +# PRIVATE CLASS: do not use directly +class postgresql::repo::apt_postgresql_org inherits postgresql::repo { + if($ensure == 'present' or $ensure == true) { + # Here we have tried to replicate the instructions on the PostgreSQL site: + # + # http://www.postgresql.org/download/linux/debian/ + # + apt::pin { 'apt.postgresql.org': + originator => 'apt.postgresql.org', + priority => 500, + }-> + apt::source { 'apt.postgresql.org': + location => 'http://apt.postgresql.org/pub/repos/apt/', + release => "${::lsbdistcodename}-pgdg", + repos => "main ${version}", + key => 'ACCC4CF8', + key_source => 'http://apt.postgresql.org/pub/repos/apt/ACCC4CF8.asc', + include_src => false, + } + + Apt::Source['apt.postgresql.org']->Package<|tag == 'postgresql'|> + } else { + apt::source { 'apt.postgresql.org': + ensure => absent, + } + apt::pin { 'apt.postgresql.org': + ensure => absent, + } + } +} diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/postgresql/manifests/repo/yum_postgresql_org.pp b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/postgresql/manifests/repo/yum_postgresql_org.pp new file mode 100644 index 00000000000..9cdfd4af66c --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/postgresql/manifests/repo/yum_postgresql_org.pp @@ -0,0 +1,38 @@ +# PRIVATE CLASS: do not use directly +class postgresql::repo::yum_postgresql_org inherits postgresql::repo { + $version_parts = split($version, '[.]') + $package_version = "${version_parts[0]}${version_parts[1]}" + $gpg_key_path = "/etc/pki/rpm-gpg/RPM-GPG-KEY-PGDG-${package_version}" + + if ($ensure == 'present' or $ensure == true) { + file { $gpg_key_path: + source => 'puppet:///modules/postgresql/RPM-GPG-KEY-PGDG', + before => Yumrepo['yum.postgresql.org'] + } + + if($::operatingsystem == 'Fedora') { + $label1 = 'fedora' + $label2 = $label1 + } else { + $label1 = 'redhat' + $label2 = 'rhel' + } + + yumrepo { 'yum.postgresql.org': + descr => "PostgreSQL ${version} \$releasever - \$basearch", + baseurl => "http://yum.postgresql.org/${version}/${label1}/${label2}-\$releasever-\$basearch", + enabled => 1, + gpgcheck => 1, + gpgkey => "file:///etc/pki/rpm-gpg/RPM-GPG-KEY-PGDG-${package_version}", + } + + Yumrepo['yum.postgresql.org'] -> Package<|tag == 'postgresql'|> + } else { + yumrepo { 'yum.postgresql.org': + enabled => absent, + }-> + file { $gpg_key_path: + ensure => absent, + } + } +} diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/postgresql/manifests/server.pp b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/postgresql/manifests/server.pp new file mode 100644 index 00000000000..4d5baab4976 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/postgresql/manifests/server.pp @@ -0,0 +1,73 @@ +# This installs a PostgreSQL server. See README.md for more details. +class postgresql::server ( + $ensure = $postgresql::params::ensure, + + $version = $postgresql::params::version, + + $postgres_password = undef, + + $package_name = $postgresql::params::server_package_name, + $client_package_name = $postgresql::params::client_package_name, + $package_ensure = $ensure, + + $plperl_package_name = $postgresql::params::plperl_package_name, + + $service_name = $postgresql::params::service_name, + $service_provider = $postgresql::params::service_provider, + $service_status = $postgresql::params::service_status, + $default_database = $postgresql::params::default_database, + + $listen_addresses = $postgresql::params::listen_addresses, + $ip_mask_deny_postgres_user = $postgresql::params::ip_mask_deny_postgres_user, + $ip_mask_allow_all_users = $postgresql::params::ip_mask_allow_all_users, + $ipv4acls = $postgresql::params::ipv4acls, + $ipv6acls = $postgresql::params::ipv6acls, + + $initdb_path = $postgresql::params::initdb_path, + $createdb_path = $postgresql::params::createdb_path, + $psql_path = $postgresql::params::psql_path, + $pg_hba_conf_path = $postgresql::params::pg_hba_conf_path, + $postgresql_conf_path = $postgresql::params::postgresql_conf_path, + + $datadir = $postgresql::params::datadir, + $xlogdir = $postgresql::params::xlogdir, + + $pg_hba_conf_defaults = $postgresql::params::pg_hba_conf_defaults, + + $user = $postgresql::params::user, + $group = $postgresql::params::group, + + $needs_initdb = $postgresql::params::needs_initdb, + + $encoding = $postgresql::params::encoding, + $locale = $postgresql::params::locale, + + $manage_firewall = $postgresql::params::manage_firewall, + $manage_pg_hba_conf = $postgresql::params::manage_pg_hba_conf, + $firewall_supported = $postgresql::params::firewall_supported +) inherits postgresql::params { + $pg = 'postgresql::server' + + if ($ensure == 'present' or $ensure == true) { + # Reload has its own ordering, specified by other defines + class { "${pg}::reload": require => Class["${pg}::install"] } + + anchor { "${pg}::start": }-> + class { "${pg}::install": }-> + class { "${pg}::initdb": }-> + class { "${pg}::config": }-> + class { "${pg}::service": }-> + class { "${pg}::passwd": }-> + class { "${pg}::firewall": }-> + anchor { "${pg}::end": } + } else { + anchor { "${pg}::start": }-> + class { "${pg}::firewall": }-> + class { "${pg}::passwd": }-> + class { "${pg}::service": }-> + class { "${pg}::install": }-> + class { "${pg}::initdb": }-> + class { "${pg}::config": }-> + anchor { "${pg}::end": } + } +} diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/postgresql/manifests/server/config.pp b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/postgresql/manifests/server/config.pp new file mode 100644 index 00000000000..a59f1793d29 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/postgresql/manifests/server/config.pp @@ -0,0 +1,108 @@ +# PRIVATE CLASS: do not call directly +class postgresql::server::config { + $ensure = $postgresql::server::ensure + $ip_mask_deny_postgres_user = $postgresql::server::ip_mask_deny_postgres_user + $ip_mask_allow_all_users = $postgresql::server::ip_mask_allow_all_users + $listen_addresses = $postgresql::server::listen_addresses + $ipv4acls = $postgresql::server::ipv4acls + $ipv6acls = $postgresql::server::ipv6acls + $pg_hba_conf_path = $postgresql::server::pg_hba_conf_path + $postgresql_conf_path = $postgresql::server::postgresql_conf_path + $pg_hba_conf_defaults = $postgresql::server::pg_hba_conf_defaults + $user = $postgresql::server::user + $group = $postgresql::server::group + $version = $postgresql::server::version + $manage_pg_hba_conf = $postgresql::server::manage_pg_hba_conf + + if ($ensure == 'present' or $ensure == true) { + + if ($manage_pg_hba_conf == true) { + # Prepare the main pg_hba file + concat { $pg_hba_conf_path: + owner => 0, + group => $group, + mode => '0640', + warn => true, + notify => Class['postgresql::server::reload'], + } + + if $pg_hba_conf_defaults { + Postgresql::Server::Pg_hba_rule { + database => 'all', + user => 'all', + } + + # Lets setup the base rules + $local_auth_option = $version ? { + '8.1' => 'sameuser', + default => undef, + } + postgresql::server::pg_hba_rule { 'local access as postgres user': + type => 'local', + user => $user, + auth_method => 'ident', + auth_option => $local_auth_option, + order => '001', + } + postgresql::server::pg_hba_rule { 'local access to database with same name': + type => 'local', + auth_method => 'ident', + auth_option => $local_auth_option, + order => '002', + } + postgresql::server::pg_hba_rule { 'allow localhost TCP access to postgresql user': + type => 'host', + user => $user, + address => '127.0.0.1/32', + auth_method => 'md5', + order => '003', + } + postgresql::server::pg_hba_rule { 'deny access to postgresql user': + type => 'host', + user => $user, + address => $ip_mask_deny_postgres_user, + auth_method => 'reject', + order => '004', + } + + # ipv4acls are passed as an array of rule strings, here we transform + # them into a resources hash, and pass the result to create_resources + $ipv4acl_resources = postgresql_acls_to_resources_hash($ipv4acls, + 'ipv4acls', 10) + create_resources('postgresql::server::pg_hba_rule', $ipv4acl_resources) + + postgresql::server::pg_hba_rule { 'allow access to all users': + type => 'host', + address => $ip_mask_allow_all_users, + auth_method => 'md5', + order => '100', + } + postgresql::server::pg_hba_rule { 'allow access to ipv6 localhost': + type => 'host', + address => '::1/128', + auth_method => 'md5', + order => '101', + } + + # ipv6acls are passed as an array of rule strings, here we transform + # them into a resources hash, and pass the result to create_resources + $ipv6acl_resources = postgresql_acls_to_resources_hash($ipv6acls, + 'ipv6acls', 102) + create_resources('postgresql::server::pg_hba_rule', $ipv6acl_resources) + } + } + + # We must set a "listen_addresses" line in the postgresql.conf if we + # want to allow any connections from remote hosts. + postgresql::server::config_entry { 'listen_addresses': + value => $listen_addresses, + } + } else { + file { $pg_hba_conf_path: + ensure => absent, + } + file { $postgresql_conf_path: + ensure => absent, + } + } +} diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/postgresql/manifests/server/config_entry.pp b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/postgresql/manifests/server/config_entry.pp new file mode 100644 index 00000000000..c6cd1a7adf6 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/postgresql/manifests/server/config_entry.pp @@ -0,0 +1,43 @@ +# Manage a postgresql.conf entry. See README.md for more details. +define postgresql::server::config_entry ( + $ensure = 'present', + $value = undef, + $path = false +) { + $postgresql_conf_path = $postgresql::server::postgresql_conf_path + + $target = $path ? { + false => $postgresql_conf_path, + default => $path, + } + + case $name { + /data_directory|hba_file|ident_file|include|listen_addresses|port|max_connections|superuser_reserved_connections|unix_socket_directory|unix_socket_group|unix_socket_permissions|bonjour|bonjour_name|ssl|ssl_ciphers|shared_buffers|max_prepared_transactions|max_files_per_process|shared_preload_libraries|wal_level|wal_buffers|archive_mode|max_wal_senders|hot_standby|logging_collector|silent_mode|track_activity_query_size|autovacuum_max_workers|autovacuum_freeze_max_age|max_locks_per_transaction|max_pred_locks_per_transaction|restart_after_crash|lc_messages|lc_monetary|lc_numeric|lc_time/: { + Postgresql_conf { + notify => Class['postgresql::server::service'], + before => Class['postgresql::server::reload'], + } + } + + default: { + Postgresql_conf { + notify => Class['postgresql::server::reload'], + } + } + } + + case $ensure { + /present|absent/: { + postgresql_conf { $name: + ensure => $ensure, + target => $target, + value => $value, + require => Class['postgresql::server::initdb'], + } + } + + default: { + fail("Unknown value for ensure '${ensure}'.") + } + } +} diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/postgresql/manifests/server/contrib.pp b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/postgresql/manifests/server/contrib.pp new file mode 100644 index 00000000000..fe6309e17b3 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/postgresql/manifests/server/contrib.pp @@ -0,0 +1,27 @@ +# Install the contrib postgresql packaging. See README.md for more details. +class postgresql::server::contrib ( + $package_name = $postgresql::params::contrib_package_name, + $package_ensure = 'present' +) inherits postgresql::params { + validate_string($package_name) + + package { 'postgresql-contrib': + ensure => $package_ensure, + name => $package_name, + tag => 'postgresql', + } + + if($package_ensure == 'present' or $package_ensure == true) { + anchor { 'postgresql::server::contrib::start': }-> + Class['postgresql::server::install']-> + Package['postgresql-contrib']-> + Class['postgresql::server::service']-> + anchor { 'postgresql::server::contrib::end': } + } else { + anchor { 'postgresql::server::contrib::start': }-> + Class['postgresql::server::service']-> + Package['postgresql-contrib']-> + Class['postgresql::server::install']-> + anchor { 'postgresql::server::contrib::end': } + } +} diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/postgresql/manifests/server/database.pp b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/postgresql/manifests/server/database.pp new file mode 100644 index 00000000000..adeabde7970 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/postgresql/manifests/server/database.pp @@ -0,0 +1,76 @@ +# Define for creating a database. See README.md for more details. +define postgresql::server::database( + $dbname = $title, + $owner = $postgresql::server::user, + $tablespace = undef, + $template = 'template0', + $encoding = $postgresql::server::encoding, + $locale = $postgresql::server::locale, + $istemplate = false +) { + $createdb_path = $postgresql::server::createdb_path + $user = $postgresql::server::user + $group = $postgresql::server::group + $psql_path = $postgresql::server::psql_path + $version = $postgresql::server::version + + # Set the defaults for the postgresql_psql resource + Postgresql_psql { + psql_user => $user, + psql_group => $group, + psql_path => $psql_path, + } + + # Optionally set the locale switch. Older versions of createdb may not accept + # --locale, so if the parameter is undefined its safer not to pass it. + if ($version != '8.1') { + $locale_option = $locale ? { + undef => '', + default => "--locale=${locale} ", + } + $public_revoke_privilege = 'CONNECT' + } else { + $locale_option = '' + $public_revoke_privilege = 'ALL' + } + + $encoding_option = $encoding ? { + undef => '', + default => "--encoding '${encoding}' ", + } + + $tablespace_option = $tablespace ? { + undef => '', + default => "--tablespace='${tablespace}' ", + } + + $createdb_command = "${createdb_path} --owner='${owner}' --template=${template} ${encoding_option}${locale_option}${tablespace_option} '${dbname}'" + + postgresql_psql { "Check for existence of db '${dbname}'": + command => 'SELECT 1', + unless => "SELECT datname FROM pg_database WHERE datname='${dbname}'", + require => Class['postgresql::server::service'] + }~> + exec { $createdb_command : + refreshonly => true, + user => $user, + logoutput => on_failure, + }~> + + # This will prevent users from connecting to the database unless they've been + # granted privileges. + postgresql_psql {"REVOKE ${public_revoke_privilege} ON DATABASE \"${dbname}\" FROM public": + db => $user, + refreshonly => true, + } + + Exec [ $createdb_command ]-> + postgresql_psql {"UPDATE pg_database SET datistemplate = ${istemplate} WHERE datname = '${dbname}'": + unless => "SELECT datname FROM pg_database WHERE datname = '${dbname}' AND datistemplate = ${istemplate}", + } + + # Build up dependencies on tablespace + if($tablespace != undef and defined(Postgresql::Server::Tablespace[$tablespace])) { + Postgresql::Server::Tablespace[$tablespace]->Exec[$createdb_command] + } +} diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/postgresql/manifests/server/database_grant.pp b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/postgresql/manifests/server/database_grant.pp new file mode 100644 index 00000000000..5973144127a --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/postgresql/manifests/server/database_grant.pp @@ -0,0 +1,18 @@ +# Manage a database grant. See README.md for more details. +define postgresql::server::database_grant( + $privilege, + $db, + $role, + $psql_db = undef, + $psql_user = undef +) { + postgresql::server::grant { "database:${name}": + role => $role, + db => $db, + privilege => $privilege, + object_type => 'DATABASE', + object_name => $db, + psql_db => $psql_db, + psql_user => $psql_user, + } +} diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/postgresql/manifests/server/db.pp b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/postgresql/manifests/server/db.pp new file mode 100644 index 00000000000..5cc7954c3eb --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/postgresql/manifests/server/db.pp @@ -0,0 +1,38 @@ +# Define for conveniently creating a role, database and assigning the correct +# permissions. See README.md for more details. +define postgresql::server::db ( + $user, + $password, + $encoding = $postgresql::server::encoding, + $locale = $postgresql::server::locale, + $grant = 'ALL', + $tablespace = undef, + $template = 'template0', + $istemplate = false, + $owner = undef +) { + postgresql::server::database { $name: + encoding => $encoding, + tablespace => $tablespace, + template => $template, + locale => $locale, + istemplate => $istemplate, + owner => $owner, + } + + if ! defined(Postgresql::Server::Role[$user]) { + postgresql::server::role { $user: + password_hash => $password, + } + } + + postgresql::server::database_grant { "GRANT ${user} - ${grant} - ${name}": + privilege => $grant, + db => $name, + role => $user, + } + + if($tablespace != undef and defined(Postgresql::Server::Tablespace[$tablespace])) { + Postgresql::Server::Tablespace[$tablespace]->Postgresql::Server::Database[$name] + } +} diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/postgresql/manifests/server/firewall.pp b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/postgresql/manifests/server/firewall.pp new file mode 100644 index 00000000000..afe3797415d --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/postgresql/manifests/server/firewall.pp @@ -0,0 +1,21 @@ +# PRIVATE CLASS: do not use directly +class postgresql::server::firewall { + $ensure = $postgresql::server::ensure + $manage_firewall = $postgresql::server::manage_firewall + $firewall_supported = $postgresql::server::firewall_supported + + if ($manage_firewall and $firewall_supported) { + if ($ensure == 'present' or $ensure == true) { + # TODO: get rid of hard-coded port + firewall { '5432 accept - postgres': + port => '5432', + proto => 'tcp', + action => 'accept', + } + } else { + firewall { '5432 accept - postgres': + ensure => absent, + } + } + } +} diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/postgresql/manifests/server/grant.pp b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/postgresql/manifests/server/grant.pp new file mode 100644 index 00000000000..d24130ca28b --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/postgresql/manifests/server/grant.pp @@ -0,0 +1,85 @@ +# Define for granting permissions to roles. See README.md for more details. +define postgresql::server::grant ( + $role, + $db, + $privilege = undef, + $object_type = 'database', + $object_name = $db, + $psql_db = $postgresql::server::user, + $psql_user = $postgresql::server::user +) { + $group = $postgresql::server::group + $psql_path = $postgresql::server::psql_path + + ## Munge the input values + $_object_type = upcase($object_type) + $_privilege = upcase($privilege) + + ## Validate that the object type is known + validate_string($_object_type, + #'COLUMN', + 'DATABASE', + #'FOREIGN SERVER', + #'FOREIGN DATA WRAPPER', + #'FUNCTION', + #'PROCEDURAL LANGUAGE', + #'SCHEMA', + #'SEQUENCE', + 'TABLE', + #'TABLESPACE', + #'VIEW', + ) + + ## Validate that the object type's privilege is acceptable + # TODO: this is a terrible hack; if they pass "ALL" as the desired privilege, + # we need a way to test for it--and has_database_privilege does not + # recognize 'ALL' as a valid privilege name. So we probably need to + # hard-code a mapping between 'ALL' and the list of actual privileges that + # it entails, and loop over them to check them. That sort of thing will + # probably need to wait until we port this over to ruby, so, for now, we're + # just going to assume that if they have "CREATE" privileges on a database, + # then they have "ALL". (I told you that it was terrible!) + case $_object_type { + 'DATABASE': { + $unless_privilege = $_privilege ? { + 'ALL' => 'CREATE', + default => $_privilege, + } + validate_string($unless_privilege,'CREATE','CONNECT','TEMPORARY','TEMP', + 'ALL','ALL PRIVILEGES') + $unless_function = 'has_database_privilege' + $on_db = $psql_db + } + 'TABLE': { + $unless_privilege = $_privilege ? { + 'ALL' => 'INSERT', + default => $_privilege, + } + validate_string($unless_privilege,'SELECT','INSERT','UPDATE','DELETE', + 'TRUNCATE','REFERENCES','TRIGGER','ALL','ALL PRIVILEGES') + $unless_function = 'has_table_privilege' + $on_db = $db + } + default: { + fail("Missing privilege validation for object type ${_object_type}") + } + } + + $grant_cmd = "GRANT ${_privilege} ON ${_object_type} \"${object_name}\" TO \"${role}\"" + postgresql_psql { $grant_cmd: + db => $on_db, + psql_user => $psql_user, + psql_group => $group, + psql_path => $psql_path, + unless => "SELECT 1 WHERE ${unless_function}('${role}', '${object_name}', '${unless_privilege}')", + require => Class['postgresql::server'] + } + + if($role != undef and defined(Postgresql::Server::Role[$role])) { + Postgresql::Server::Role[$role]->Postgresql_psql[$grant_cmd] + } + + if($db != undef and defined(Postgresql::Server::Database[$db])) { + Postgresql::Server::Database[$db]->Postgresql_psql[$grant_cmd] + } +} diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/postgresql/manifests/server/initdb.pp b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/postgresql/manifests/server/initdb.pp new file mode 100644 index 00000000000..a56f19c39b1 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/postgresql/manifests/server/initdb.pp @@ -0,0 +1,76 @@ +# PRIVATE CLASS: do not call directly +class postgresql::server::initdb { + $ensure = $postgresql::server::ensure + $needs_initdb = $postgresql::server::needs_initdb + $initdb_path = $postgresql::server::initdb_path + $datadir = $postgresql::server::datadir + $xlogdir = $postgresql::server::xlogdir + $encoding = $postgresql::server::encoding + $locale = $postgresql::server::locale + $group = $postgresql::server::group + $user = $postgresql::server::user + + if($ensure == 'present' or $ensure == true) { + # Make sure the data directory exists, and has the correct permissions. + file { $datadir: + ensure => directory, + owner => $user, + group => $group, + mode => '0700', + } + + if($xlogdir) { + # Make sure the xlog directory exists, and has the correct permissions. + file { $xlogdir: + ensure => directory, + owner => $user, + group => $group, + mode => '0700', + } + } + + if($needs_initdb) { + # Build up the initdb command. + # + # We optionally add the locale switch if specified. Older versions of the + # initdb command don't accept this switch. So if the user didn't pass the + # parameter, lets not pass the switch at all. + $ic_base = "${initdb_path} --encoding '${encoding}' --pgdata '${datadir}'" + $ic_xlog = $xlogdir ? { + undef => $ic_base, + default => "${ic_base} --xlogdir '${xlogdir}'" + } + $initdb_command = $locale ? { + undef => $ic_xlog, + default => "${ic_xlog} --locale '${locale}'" + } + + # This runs the initdb command, we use the existance of the PG_VERSION + # file to ensure we don't keep running this command. + exec { 'postgresql_initdb': + command => $initdb_command, + creates => "${datadir}/PG_VERSION", + user => $user, + group => $group, + logoutput => on_failure, + require => File[$datadir], + } + } + } else { + # Purge data directory if ensure => absent + file { $datadir: + ensure => absent, + recurse => true, + force => true, + } + + if($xlogdir) { + # Make sure the xlog directory exists, and has the correct permissions. + file { $xlogdir: + ensure => absent, + recurse => true, + force => true, + } + } + } +} diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/postgresql/manifests/server/install.pp b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/postgresql/manifests/server/install.pp new file mode 100644 index 00000000000..1e912a8b1dc --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/postgresql/manifests/server/install.pp @@ -0,0 +1,49 @@ +# PRIVATE CLASS: do not call directly +class postgresql::server::install { + $package_ensure = $postgresql::server::package_ensure + $package_name = $postgresql::server::package_name + $client_package_name = $postgresql::server::client_package_name + + # This is necessary to ensure that the extra client package that was + # installed automatically by the server package is removed and all + # of its dependencies are removed also. Without this later installation + # of the native Ubuntu packages will fail. + if($::operatingsystem == 'Ubuntu' and $package_ensure == 'absent') { + # This is an exec, because we want to invoke autoremove. + # + # An alternative would be to have a full list of packages, but that seemed + # more problematic to maintain, not to mention the conflict with the + # client class will create duplicate resources. + exec { 'apt-get-autoremove-postgresql-client-XX': + command => "apt-get autoremove --purge --yes ${client_package_name}", + onlyif => "dpkg -l ${client_package_name} | grep -e '^ii'", + logoutput => on_failure, + path => '/usr/bin:/bin:/usr/sbin/:/sbin', + } + + # This will clean up anything we miss + exec { 'apt-get-autoremove-postgresql-client-brute': + command => "dpkg -P postgresql*", + onlyif => "dpkg -l postgresql* | grep -e '^ii'", + logoutput => on_failure, + path => '/usr/bin:/bin:/usr/sbin/:/sbin', + } + } + + $_package_ensure = $package_ensure ? { + true => 'present', + false => 'purged', + 'absent' => 'purged', + default => $package_ensure, + } + + package { 'postgresql-server': + ensure => $_package_ensure, + name => $package_name, + + # This is searched for to create relationships with the package repos, be + # careful about its removal + tag => 'postgresql', + } + +} diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/postgresql/manifests/server/passwd.pp b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/postgresql/manifests/server/passwd.pp new file mode 100644 index 00000000000..5777b03354a --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/postgresql/manifests/server/passwd.pp @@ -0,0 +1,35 @@ +# PRIVATE CLASS: do not call directly +class postgresql::server::passwd { + $ensure = $postgresql::server::ensure + $postgres_password = $postgresql::server::postgres_password + $user = $postgresql::server::user + $group = $postgresql::server::group + $psql_path = $postgresql::server::psql_path + + if($ensure == 'present' or $ensure == true) { + if ($postgres_password != undef) { + # NOTE: this password-setting logic relies on the pg_hba.conf being + # configured to allow the postgres system user to connect via psql + # without specifying a password ('ident' or 'trust' security). This is + # the default for pg_hba.conf. + $escaped = postgresql_escape($postgres_password) + $env = "env PGPASSWORD='${postgres_password}'" + exec { 'set_postgres_postgrespw': + # This command works w/no password because we run it as postgres system + # user + command => "${psql_path} -c 'ALTER ROLE \"${user}\" PASSWORD ${escaped}'", + user => $user, + group => $group, + logoutput => true, + cwd => '/tmp', + # With this command we're passing -h to force TCP authentication, which + # does require a password. We specify the password via the PGPASSWORD + # environment variable. If the password is correct (current), this + # command will exit with an exit code of 0, which will prevent the main + # command from running. + unless => "${env} ${psql_path} -h localhost -c 'select 1' > /dev/null", + path => '/usr/bin:/usr/local/bin:/bin', + } + } + } +} diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/postgresql/manifests/server/pg_hba_rule.pp b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/postgresql/manifests/server/pg_hba_rule.pp new file mode 100644 index 00000000000..ea300d1baa5 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/postgresql/manifests/server/pg_hba_rule.pp @@ -0,0 +1,52 @@ +# This resource manages an individual rule that applies to the file defined in +# $target. See README.md for more details. +define postgresql::server::pg_hba_rule( + $type, + $database, + $user, + $auth_method, + $address = undef, + $description = 'none', + $auth_option = undef, + $order = '150', + + # Needed for testing primarily, support for multiple files is not really + # working. + $target = $postgresql::server::pg_hba_conf_path +) { + + if $postgresql::server::manage_pg_hba_conf == false { + fail('postgresql::server::manage_pg_hba_conf has been disabled, so this resource is now unused and redundant, either enable that option or remove this resource from your manifests') + } else { + validate_re($type, '^(local|host|hostssl|hostnossl)$', + "The type you specified [${type}] must be one of: local, host, hostssl, hostnosssl") + + if($type =~ /^host/ and $address == undef) { + fail('You must specify an address property when type is host based') + } + + $allowed_auth_methods = $postgresql::server::version ? { + '9.3' => ['trust', 'reject', 'md5', 'sha1', 'password', 'gss', 'sspi', 'krb5', 'ident', 'peer', 'ldap', 'radius', 'cert', 'pam'], + '9.2' => ['trust', 'reject', 'md5', 'sha1', 'password', 'gss', 'sspi', 'krb5', 'ident', 'peer', 'ldap', 'radius', 'cert', 'pam'], + '9.1' => ['trust', 'reject', 'md5', 'sha1', 'password', 'gss', 'sspi', 'krb5', 'ident', 'peer', 'ldap', 'radius', 'cert', 'pam'], + '9.0' => ['trust', 'reject', 'md5', 'sha1', 'password', 'gss', 'sspi', 'krb5', 'ident', 'ldap', 'radius', 'cert', 'pam'], + '8.4' => ['trust', 'reject', 'md5', 'sha1', 'password', 'gss', 'sspi', 'krb5', 'ident', 'ldap', 'cert', 'pam'], + '8.3' => ['trust', 'reject', 'md5', 'sha1', 'crypt', 'password', 'gss', 'sspi', 'krb5', 'ident', 'ldap', 'pam'], + '8.2' => ['trust', 'reject', 'md5', 'crypt', 'password', 'krb5', 'ident', 'ldap', 'pam'], + '8.1' => ['trust', 'reject', 'md5', 'crypt', 'password', 'krb5', 'ident', 'pam'], + default => ['trust', 'reject', 'md5', 'password', 'gss', 'sspi', 'krb5', 'ident', 'peer', 'ldap', 'radius', 'cert', 'pam', 'crypt'] + } + + $auth_method_regex = join(['^(', join($allowed_auth_methods, '|'), ')$'],'') + validate_re($auth_method, $auth_method_regex, + join(["The auth_method you specified [${auth_method}] must be one of: ", join($allowed_auth_methods, ', ')],'')) + + # Create a rule fragment + $fragname = "pg_hba_rule_${name}" + concat::fragment { $fragname: + target => $target, + content => template('postgresql/pg_hba_rule.conf'), + order => $order, + } + } +} diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/postgresql/manifests/server/plperl.pp b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/postgresql/manifests/server/plperl.pp new file mode 100644 index 00000000000..c338f165701 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/postgresql/manifests/server/plperl.pp @@ -0,0 +1,27 @@ +# This class installs the PL/Perl procedural language for postgresql. See +# README.md for more details. +class postgresql::server::plperl( + $package_ensure = 'present', + $package_name = $postgresql::server::plperl_package_name +) { + package { 'postgresql-plperl': + ensure => $package_ensure, + name => $package_name, + tag => 'postgresql', + } + + if($package_ensure == 'present' or $package_ensure == true) { + anchor { 'postgresql::server::plperl::start': }-> + Class['postgresql::server::install']-> + Package['postgresql-plperl']-> + Class['postgresql::server::service']-> + anchor { 'postgresql::server::plperl::end': } + } else { + anchor { 'postgresql::server::plperl::start': }-> + Class['postgresql::server::service']-> + Package['postgresql-plperl']-> + Class['postgresql::server::install']-> + anchor { 'postgresql::server::plperl::end': } + } + +} diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/postgresql/manifests/server/reload.pp b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/postgresql/manifests/server/reload.pp new file mode 100644 index 00000000000..6b11ebfc1b3 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/postgresql/manifests/server/reload.pp @@ -0,0 +1,15 @@ +# PRIVATE CLASS: do not use directly +class postgresql::server::reload { + $ensure = $postgresql::server::ensure + $service_name = $postgresql::server::service_name + $service_status = $postgresql::server::service_status + + if($ensure == 'present' or $ensure == true) { + exec { 'postgresql_reload': + path => '/usr/bin:/usr/sbin:/bin:/sbin', + command => "service ${service_name} reload", + onlyif => $service_status, + refreshonly => true, + } + } +} diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/postgresql/manifests/server/role.pp b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/postgresql/manifests/server/role.pp new file mode 100644 index 00000000000..971191f5d54 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/postgresql/manifests/server/role.pp @@ -0,0 +1,85 @@ +# Define for creating a database role. See README.md for more information +define postgresql::server::role( + $password_hash = false, + $createdb = false, + $createrole = false, + $db = $postgresql::server::user, + $login = true, + $superuser = false, + $replication = false, + $connection_limit = '-1', + $username = $title +) { + $psql_user = $postgresql::server::user + $psql_group = $postgresql::server::group + $psql_path = $postgresql::server::psql_path + $version = $postgresql::server::version + + $login_sql = $login ? { true => 'LOGIN', default => 'NOLOGIN' } + $createrole_sql = $createrole ? { true => 'CREATEROLE', default => 'NOCREATEROLE' } + $createdb_sql = $createdb ? { true => 'CREATEDB', default => 'NOCREATEDB' } + $superuser_sql = $superuser ? { true => 'SUPERUSER', default => 'NOSUPERUSER' } + $replication_sql = $replication ? { true => 'REPLICATION', default => '' } + if ($password_hash != false) { + $password_sql = "ENCRYPTED PASSWORD '${password_hash}'" + } else { + $password_sql = '' + } + + Postgresql_psql { + db => $db, + psql_user => $psql_user, + psql_group => $psql_group, + psql_path => $psql_path, + require => [ Postgresql_psql["CREATE ROLE \"${username}\" ${password_sql} ${login_sql} ${createrole_sql} ${createdb_sql} ${superuser_sql} ${replication_sql} CONNECTION LIMIT ${connection_limit}"], Class['postgresql::server'] ], + } + + postgresql_psql {"CREATE ROLE \"${username}\" ${password_sql} ${login_sql} ${createrole_sql} ${createdb_sql} ${superuser_sql} ${replication_sql} CONNECTION LIMIT ${connection_limit}": + unless => "SELECT rolname FROM pg_roles WHERE rolname='${username}'", + require => Class['Postgresql::Server'], + } + + postgresql_psql {"ALTER ROLE \"${username}\" ${superuser_sql}": + unless => "SELECT rolname FROM pg_roles WHERE rolname='${username}' and rolsuper=${superuser}", + } + + postgresql_psql {"ALTER ROLE \"${username}\" ${createdb_sql}": + unless => "SELECT rolname FROM pg_roles WHERE rolname='${username}' and rolcreatedb=${createdb}", + } + + postgresql_psql {"ALTER ROLE \"${username}\" ${createrole_sql}": + unless => "SELECT rolname FROM pg_roles WHERE rolname='${username}' and rolcreaterole=${createrole}", + } + + postgresql_psql {"ALTER ROLE \"${username}\" ${login_sql}": + unless => "SELECT rolname FROM pg_roles WHERE rolname='${username}' and rolcanlogin=${login}", + } + + if(versioncmp($version, '9.1') >= 0) { + if $replication_sql == '' { + postgresql_psql {"ALTER ROLE \"${username}\" NOREPLICATION": + unless => "SELECT rolname FROM pg_roles WHERE rolname='${username}' and rolreplication=${replication}", + } + } else { + postgresql_psql {"ALTER ROLE \"${username}\" ${replication_sql}": + unless => "SELECT rolname FROM pg_roles WHERE rolname='${username}' and rolreplication=${replication}", + } + } + } + + postgresql_psql {"ALTER ROLE \"${username}\" CONNECTION LIMIT ${connection_limit}": + unless => "SELECT rolname FROM pg_roles WHERE rolname='${username}' and rolconnlimit=${connection_limit}", + } + + if $password_hash { + if($password_hash =~ /^md5.+/) { + $pwd_hash_sql = $password_hash + } else { + $pwd_md5 = md5("${password_hash}${username}") + $pwd_hash_sql = "md5${pwd_md5}" + } + postgresql_psql {"ALTER ROLE \"${username}\" ${password_sql}": + unless => "SELECT usename FROM pg_shadow WHERE usename='${username}' and passwd='${pwd_hash_sql}'", + } + } +} diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/postgresql/manifests/server/service.pp b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/postgresql/manifests/server/service.pp new file mode 100644 index 00000000000..598acd876a6 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/postgresql/manifests/server/service.pp @@ -0,0 +1,45 @@ +# PRIVATE CLASS: do not call directly +class postgresql::server::service { + $ensure = $postgresql::server::ensure + $service_name = $postgresql::server::service_name + $service_provider = $postgresql::server::service_provider + $service_status = $postgresql::server::service_status + $user = $postgresql::server::user + $default_database = $postgresql::server::default_database + + $service_ensure = $ensure ? { + present => true, + absent => false, + default => $ensure + } + + anchor { 'postgresql::server::service::begin': } + + service { 'postgresqld': + ensure => $service_ensure, + name => $service_name, + enable => $service_ensure, + provider => $service_provider, + hasstatus => true, + status => $service_status, + } + + if($service_ensure) { + # This blocks the class before continuing if chained correctly, making + # sure the service really is 'up' before continuing. + # + # Without it, we may continue doing more work before the database is + # prepared leading to a nasty race condition. + postgresql::validate_db_connection { 'validate_service_is_running': + run_as => $user, + database_name => $default_database, + sleep => 1, + tries => 60, + create_db_first => false, + require => Service['postgresqld'], + before => Anchor['postgresql::server::service::end'] + } + } + + anchor { 'postgresql::server::service::end': } +} diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/postgresql/manifests/server/table_grant.pp b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/postgresql/manifests/server/table_grant.pp new file mode 100644 index 00000000000..643416e0d06 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/postgresql/manifests/server/table_grant.pp @@ -0,0 +1,20 @@ +# This resource wraps the grant resource to manage table grants specifically. +# See README.md for more details. +define postgresql::server::table_grant( + $privilege, + $table, + $db, + $role, + $psql_db = undef, + $psql_user = undef +) { + postgresql::server::grant { "table:${name}": + role => $role, + db => $db, + privilege => $privilege, + object_type => 'TABLE', + object_name => $table, + psql_db => $psql_db, + psql_user => $psql_user, + } +} diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/postgresql/manifests/server/tablespace.pp b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/postgresql/manifests/server/tablespace.pp new file mode 100644 index 00000000000..22523773c1f --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/postgresql/manifests/server/tablespace.pp @@ -0,0 +1,42 @@ +# This module creates tablespace. See README.md for more details. +define postgresql::server::tablespace( + $location, + $owner = undef, + $spcname = $title +) { + $user = $postgresql::server::user + $group = $postgresql::server::group + $psql_path = $postgresql::server::psql_path + + Postgresql_psql { + psql_user => $user, + psql_group => $group, + psql_path => $psql_path, + } + + if ($owner == undef) { + $owner_section = '' + } else { + $owner_section = "OWNER \"${owner}\"" + } + + $create_tablespace_command = "CREATE TABLESPACE \"${spcname}\" ${owner_section} LOCATION '${location}'" + + file { $location: + ensure => directory, + owner => $user, + group => $group, + mode => '0700', + } + + $create_ts = "Create tablespace '${spcname}'" + postgresql_psql { "Create tablespace '${spcname}'": + command => $create_tablespace_command, + unless => "SELECT spcname FROM pg_tablespace WHERE spcname='${spcname}'", + require => [Class['postgresql::server'], File[$location]], + } + + if($owner != undef and defined(Postgresql::Server::Role[$owner])) { + Postgresql::Server::Role[$owner]->Postgresql_psql[$create_ts] + } +} diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/postgresql/manifests/validate_db_connection.pp b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/postgresql/manifests/validate_db_connection.pp new file mode 100644 index 00000000000..f70af1e4efd --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/postgresql/manifests/validate_db_connection.pp @@ -0,0 +1,75 @@ +# This type validates that a successful postgres connection can be established +# between the node on which this resource is run and a specified postgres +# instance (host/port/user/password/database name). +# +# See README.md for more details. +define postgresql::validate_db_connection( + $database_host = undef, + $database_name = undef, + $database_password = undef, + $database_username = undef, + $database_port = undef, + $run_as = undef, + $sleep = 2, + $tries = 10, + $create_db_first = true +) { + require postgresql::client + include postgresql::params + + $psql_path = $postgresql::params::psql_path + + $cmd_init = "${psql_path} --tuples-only --quiet " + $cmd_host = $database_host ? { + default => "-h ${database_host} ", + undef => "", + } + $cmd_user = $database_username ? { + default => "-U ${database_username} ", + undef => "", + } + $cmd_port = $database_port ? { + default => "-p ${database_port} ", + undef => "", + } + $cmd_dbname = $database_name ? { + default => "--dbname ${database_name} ", + undef => "--dbname ${postgresql::params::default_database} ", + } + $env = $database_password ? { + default => "PGPASSWORD=${database_password}", + undef => undef, + } + $cmd = join([$cmd_init, $cmd_host, $cmd_user, $cmd_port, $cmd_dbname]) + $validate_cmd = "/usr/local/bin/validate_postgresql_connection.sh ${sleep} ${tries} '${cmd}'" + + # This is more of a safety valve, we add a little extra to compensate for the + # time it takes to run each psql command. + $timeout = (($sleep + 2) * $tries) + + $exec_name = "validate postgres connection for ${database_host}/${database_name}" + exec { $exec_name: + command => "echo 'Unable to connect to defined database using: ${cmd}' && false", + unless => $validate_cmd, + cwd => '/tmp', + environment => $env, + logoutput => 'on_failure', + user => $run_as, + path => '/bin', + timeout => $timeout, + require => Package['postgresql-client'], + } + + # This is a little bit of puppet magic. What we want to do here is make + # sure that if the validation and the database instance creation are being + # applied on the same machine, then the database resource is applied *before* + # the validation resource. Otherwise, the validation is guaranteed to fail + # on the first run. + # + # We accomplish this by using Puppet's resource collection syntax to search + # for the Database resource in our current catalog; if it exists, the + # appropriate relationship is created here. + if($create_db_first) { + Postgresql::Server::Database<|title == $database_name|> -> Exec[$exec_name] + } +} diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/postgresql/metadata.json b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/postgresql/metadata.json new file mode 100644 index 00000000000..3da197dcc97 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/postgresql/metadata.json @@ -0,0 +1,82 @@ +{ + "operatingsystem_support": [ + { + "operatingsystem": "RedHat", + "operatingsystemrelease": [ + "5", + "6" + ] + }, + { + "operatingsystem": "CentOS", + "operatingsystemrelease": [ + "5", + "6" + ] + }, + { + "operatingsystem": "OracleLinux", + "operatingsystemrelease": [ + "5", + "6" + ] + }, + { + "operatingsystem": "Scientific", + "operatingsystemrelease": [ + "5", + "6" + ] + }, + { + "operatingsystem": "Debian", + "operatingsystemrelease": [ + "6", + "7" + ] + }, + { + "operatingsystem": "Ubuntu", + "operatingsystemrelease": [ + "10.04", + "12.04" + ] + } + ], + "requirements": [ + { + "name": "pe", + "version_requirement": "3.2.x" + }, + { + "name": "puppet", + "version_requirement": "3.x" + } + ], + "name": "puppetlabs-postgresql", + "version": "3.3.3", + "source": "git://github.com/puppetlabs/puppet-postgresql.git", + "author": "Inkling/Puppet Labs", + "license": "ASL 2.0", + "summary": "PostgreSQL defined resource types", + "description": "PostgreSQL defined resource types", + "project_page": "https://github.com/puppetlabs/puppet-postgresql", + "dependencies": [ + { + "name": "puppetlabs/stdlib", + "version_requirement": ">=3.2.0 <5.0.0" + }, + { + "name": "puppetlabs/firewall", + "version_requirement": ">= 0.0.4" + }, + { + "name": "puppetlabs/apt", + "version_requirement": ">=1.1.0 <2.0.0" + }, + { + "name": "puppetlabs/concat", + "version_requirement": ">= 1.0.0 <2.0.0" + } + ] +} diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/postgresql/spec/acceptance/client_spec.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/postgresql/spec/acceptance/client_spec.rb new file mode 100644 index 00000000000..eaff5263d4d --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/postgresql/spec/acceptance/client_spec.rb @@ -0,0 +1,18 @@ +require 'spec_helper_acceptance' + +describe 'postgresql::client:', :unless => UNSUPPORTED_PLATFORMS.include?(fact('osfamily')) do + after :all do + # Cleanup after tests have ran + apply_manifest("class { 'postgresql::client': package_ensure => purged }", + :catch_failures => true) + end + + it 'test loading class with no parameters' do + pp = <<-EOS.unindent + class { 'postgresql::client': } + EOS + + apply_manifest(pp, :catch_failures => true) + apply_manifest(pp, :catch_changes => true) + end +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/postgresql/spec/acceptance/common_patterns_spec.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/postgresql/spec/acceptance/common_patterns_spec.rb new file mode 100644 index 00000000000..441da70e86c --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/postgresql/spec/acceptance/common_patterns_spec.rb @@ -0,0 +1,47 @@ +require 'spec_helper_acceptance' + +describe 'common patterns:', :unless => UNSUPPORTED_PLATFORMS.include?(fact('osfamily')) do + describe 'postgresql.conf include pattern' do + after :all do + pp = <<-EOS.unindent + class { 'postgresql::server': ensure => absent } + + file { '/tmp/include.conf': + ensure => absent + } + EOS + apply_manifest(pp, :catch_failures => true) + end + + it "should support an 'include' directive at the end of postgresql.conf" do + pending('no support for include directive with centos 5/postgresql 8.1', + :if => (fact('osfamily') == 'RedHat' and fact('lsbmajdistrelease') == '5')) + + pp = <<-EOS.unindent + class { 'postgresql::server': } + + $extras = "/etc/postgresql-include.conf" + + file { $extras: + content => 'max_connections = 123', + seltype => 'postgresql_db_t', + seluser => 'system_u', + notify => Class['postgresql::server::service'], + } + + postgresql::server::config_entry { 'include': + value => $extras, + require => File[$extras], + } + EOS + + apply_manifest(pp, :catch_failures => true) + apply_manifest(pp, :catch_changes => true) + + psql('--command="show max_connections" -t', 'postgres') do |r| + expect(r.stdout).to match(/123/) + expect(r.stderr).to eq('') + end + end + end +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/postgresql/spec/acceptance/contrib_spec.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/postgresql/spec/acceptance/contrib_spec.rb new file mode 100644 index 00000000000..d6dbb956a3c --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/postgresql/spec/acceptance/contrib_spec.rb @@ -0,0 +1,28 @@ +require 'spec_helper_acceptance' + +describe 'postgresql::server::contrib:', :unless => UNSUPPORTED_PLATFORMS.include?(fact('osfamily')) do + after :all do + # Cleanup after tests have ran, remove both contrib and server as contrib + # pulls in the server based packages. + pp = <<-EOS.unindent + class { 'postgresql::server': + ensure => absent, + } + class { 'postgresql::server::contrib': + package_ensure => purged, + } + EOS + + apply_manifest(pp, :catch_failures => true) + end + + it 'test loading class with no parameters' do + pp = <<-EOS.unindent + class { 'postgresql::server': } + class { 'postgresql::server::contrib': } + EOS + + apply_manifest(pp, :catch_failures => true) + apply_manifest(pp, :catch_changes => true) + end +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/postgresql/spec/acceptance/lib/devel_spec.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/postgresql/spec/acceptance/lib/devel_spec.rb new file mode 100644 index 00000000000..51a5ea988e6 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/postgresql/spec/acceptance/lib/devel_spec.rb @@ -0,0 +1,17 @@ +require 'spec_helper_acceptance' + +describe 'postgresql::lib::devel:', :unless => UNSUPPORTED_PLATFORMS.include?(fact('osfamily')) do + after :all do + # Cleanup after tests have ran + apply_manifest("class { 'postgresql::lib::devel': package_ensure => purged }", :catch_failures => true) + end + + it 'test loading class with no parameters' do + pp = <<-EOS.unindent + class { 'postgresql::lib::devel': } + EOS + + apply_manifest(pp, :catch_failures => true) + apply_manifest(pp, :catch_changes => true) + end +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/postgresql/spec/acceptance/lib/java_spec.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/postgresql/spec/acceptance/lib/java_spec.rb new file mode 100644 index 00000000000..c943bed54e8 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/postgresql/spec/acceptance/lib/java_spec.rb @@ -0,0 +1,20 @@ +require 'spec_helper_acceptance' + +describe 'postgresql::lib::java:', :unless => UNSUPPORTED_PLATFORMS.include?(fact('osfamily')) do + after :all do + # Cleanup after tests have ran + apply_manifest("class { 'postgresql::lib::java': package_ensure => purged }", :catch_failures => true) + end + + it 'test loading class with no parameters' do + pending('libpostgresql-java-jdbc not available natively for Ubuntu 10.04 and Debian 6', + :if => (fact('osfamily') == 'Debian' and ['6', '10'].include?(fact('lsbmajdistrelease')))) + + pp = <<-EOS.unindent + class { 'postgresql::lib::java': } + EOS + + apply_manifest(pp, :catch_failures => true) + apply_manifest(pp, :catch_changes => true) + end +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/postgresql/spec/acceptance/lib/python_spec.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/postgresql/spec/acceptance/lib/python_spec.rb new file mode 100644 index 00000000000..173204e7153 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/postgresql/spec/acceptance/lib/python_spec.rb @@ -0,0 +1,19 @@ +require 'spec_helper_acceptance' + +describe 'postgresql::lib::python:', :unless => UNSUPPORTED_PLATFORMS.include?(fact('osfamily')) do + after :all do + # Cleanup after tests have ran + apply_manifest("class { 'postgresql::lib::python': package_ensure => purged }", :catch_failures => true) + end + + it 'test loading class with no parameters' do + pending('psycopg2 not available natively for centos 5', :if => (fact('osfamily') == 'RedHat' and fact('lsbmajdistrelease') == '5')) + + pp = <<-EOS.unindent + class { 'postgresql::lib::python': } + EOS + + apply_manifest(pp, :catch_failures => true) + apply_manifest(pp, :catch_changes => true) + end +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/postgresql/spec/acceptance/nodesets/centos-510-x64.yml b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/postgresql/spec/acceptance/nodesets/centos-510-x64.yml new file mode 100644 index 00000000000..12c9e7893a6 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/postgresql/spec/acceptance/nodesets/centos-510-x64.yml @@ -0,0 +1,10 @@ +HOSTS: + centos-510-x64: + roles: + - master + platform: el-5-x86_64 + box : centos-510-x64-virtualbox-nocm + box_url : http://puppet-vagrant-boxes.puppetlabs.com/centos-510-x64-virtualbox-nocm.box + hypervisor : vagrant +CONFIG: + type: git diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/postgresql/spec/acceptance/nodesets/centos-59-x64.yml b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/postgresql/spec/acceptance/nodesets/centos-59-x64.yml new file mode 100644 index 00000000000..2ad90b86aab --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/postgresql/spec/acceptance/nodesets/centos-59-x64.yml @@ -0,0 +1,10 @@ +HOSTS: + centos-59-x64: + roles: + - master + platform: el-5-x86_64 + box : centos-59-x64-vbox4210-nocm + box_url : http://puppet-vagrant-boxes.puppetlabs.com/centos-59-x64-vbox4210-nocm.box + hypervisor : vagrant +CONFIG: + type: git diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/postgresql/spec/acceptance/nodesets/centos-64-x64-pe.yml b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/postgresql/spec/acceptance/nodesets/centos-64-x64-pe.yml new file mode 100644 index 00000000000..7d9242f1b95 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/postgresql/spec/acceptance/nodesets/centos-64-x64-pe.yml @@ -0,0 +1,12 @@ +HOSTS: + centos-64-x64: + roles: + - master + - database + - dashboard + platform: el-6-x86_64 + box : centos-64-x64-vbox4210-nocm + box_url : http://puppet-vagrant-boxes.puppetlabs.com/centos-64-x64-vbox4210-nocm.box + hypervisor : vagrant +CONFIG: + type: pe diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/postgresql/spec/acceptance/nodesets/centos-64-x64.yml b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/postgresql/spec/acceptance/nodesets/centos-64-x64.yml new file mode 100644 index 00000000000..06398354907 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/postgresql/spec/acceptance/nodesets/centos-64-x64.yml @@ -0,0 +1,10 @@ +HOSTS: + centos-64-x64: + roles: + - master + platform: el-6-x86_64 + box : centos-64-x64-vbox4210-nocm + box_url : http://puppet-vagrant-boxes.puppetlabs.com/centos-64-x64-vbox4210-nocm.box + hypervisor : vagrant +CONFIG: + type: git diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/postgresql/spec/acceptance/nodesets/debian-607-x64.yml b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/postgresql/spec/acceptance/nodesets/debian-607-x64.yml new file mode 100644 index 00000000000..4c8be42d033 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/postgresql/spec/acceptance/nodesets/debian-607-x64.yml @@ -0,0 +1,10 @@ +HOSTS: + debian-607-x64: + roles: + - master + platform: debian-6-amd64 + box : debian-607-x64-vbox4210-nocm + box_url : http://puppet-vagrant-boxes.puppetlabs.com/debian-607-x64-vbox4210-nocm.box + hypervisor : vagrant +CONFIG: + type: git diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/postgresql/spec/acceptance/nodesets/debian-73-x64.yml b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/postgresql/spec/acceptance/nodesets/debian-73-x64.yml new file mode 100644 index 00000000000..3e31a827602 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/postgresql/spec/acceptance/nodesets/debian-73-x64.yml @@ -0,0 +1,10 @@ +HOSTS: + debian-73-x64: + roles: + - master + platform: debian-7-amd64 + box : debian-73-x64-virtualbox-nocm + box_url : http://puppet-vagrant-boxes.puppetlabs.com/debian-73-x64-virtualbox-nocm.box + hypervisor : vagrant +CONFIG: + type: git diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/postgresql/spec/acceptance/nodesets/default.yml b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/postgresql/spec/acceptance/nodesets/default.yml new file mode 100644 index 00000000000..06398354907 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/postgresql/spec/acceptance/nodesets/default.yml @@ -0,0 +1,10 @@ +HOSTS: + centos-64-x64: + roles: + - master + platform: el-6-x86_64 + box : centos-64-x64-vbox4210-nocm + box_url : http://puppet-vagrant-boxes.puppetlabs.com/centos-64-x64-vbox4210-nocm.box + hypervisor : vagrant +CONFIG: + type: git diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/postgresql/spec/acceptance/nodesets/ubuntu-server-10044-x64.yml b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/postgresql/spec/acceptance/nodesets/ubuntu-server-10044-x64.yml new file mode 100644 index 00000000000..5047017e623 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/postgresql/spec/acceptance/nodesets/ubuntu-server-10044-x64.yml @@ -0,0 +1,10 @@ +HOSTS: + ubuntu-server-10044-x64: + roles: + - master + platform: ubuntu-10.04-amd64 + box : ubuntu-server-10044-x64-vbox4210-nocm + box_url : http://puppet-vagrant-boxes.puppetlabs.com/ubuntu-server-10044-x64-vbox4210-nocm.box + hypervisor : vagrant +CONFIG: + type: git diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/postgresql/spec/acceptance/nodesets/ubuntu-server-12042-x64.yml b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/postgresql/spec/acceptance/nodesets/ubuntu-server-12042-x64.yml new file mode 100644 index 00000000000..1c7a34ccbaa --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/postgresql/spec/acceptance/nodesets/ubuntu-server-12042-x64.yml @@ -0,0 +1,10 @@ +HOSTS: + ubuntu-server-12042-x64: + roles: + - master + platform: ubuntu-12.04-amd64 + box : ubuntu-server-12042-x64-vbox4210-nocm + box_url : http://puppet-vagrant-boxes.puppetlabs.com/ubuntu-server-12042-x64-vbox4210-nocm.box + hypervisor : vagrant +CONFIG: + type: git diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/postgresql/spec/acceptance/postgresql_psql_spec.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/postgresql/spec/acceptance/postgresql_psql_spec.rb new file mode 100644 index 00000000000..5c03a7a8745 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/postgresql/spec/acceptance/postgresql_psql_spec.rb @@ -0,0 +1,43 @@ +require 'spec_helper_acceptance' + +describe 'postgresql_psql:', :unless => UNSUPPORTED_PLATFORMS.include?(fact('osfamily')) do + after :all do + # Cleanup after tests have ran + apply_manifest("class { 'postgresql::server': ensure => absent }", :catch_failures => true) + end + + it 'should run some SQL when the unless query returns no rows' do + pp = <<-EOS.unindent + class { 'postgresql::server': } + + postgresql_psql { 'foobar': + db => 'postgres', + psql_user => 'postgres', + command => 'select 1', + unless => 'select 1 where 1=2', + require => Class['postgresql::server'], + } + EOS + + apply_manifest(pp, :catch_failures => true) + apply_manifest(pp, :catch_failures => true) + end + + it 'should not run SQL when the unless query returns rows' do + pp = <<-EOS.unindent + class { 'postgresql::server': } + + postgresql_psql { 'foobar': + db => 'postgres', + psql_user => 'postgres', + command => 'select * from pg_database limit 1', + unless => 'select 1 where 1=1', + require => Class['postgresql::server'], + } + EOS + + apply_manifest(pp, :catch_failures => true) + apply_manifest(pp, :catch_changes => true) + end + +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/postgresql/spec/acceptance/server/config_entry_spec.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/postgresql/spec/acceptance/server/config_entry_spec.rb new file mode 100644 index 00000000000..a58903acb56 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/postgresql/spec/acceptance/server/config_entry_spec.rb @@ -0,0 +1,26 @@ +require 'spec_helper_acceptance' + +describe 'postgresql::server::config_entry:', :unless => UNSUPPORTED_PLATFORMS.include?(fact('osfamily')) do + after :all do + # Cleanup after tests have ran + apply_manifest("class { 'postgresql::server': ensure => absent }", :catch_failures => true) + end + + it 'should change setting and reflect it in show all' do + pp = <<-EOS.unindent + class { 'postgresql::server': } + + postgresql::server::config_entry { 'check_function_bodies': + value => 'off', + } + EOS + + apply_manifest(pp, :catch_failures => true) + apply_manifest(pp, :catch_changes => true) + + psql('--command="show all" postgres') do |r| + expect(r.stdout).to match(/check_function_bodies.+off/) + expect(r.stderr).to eq('') + end + end +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/postgresql/spec/acceptance/server/database_grant_spec.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/postgresql/spec/acceptance/server/database_grant_spec.rb new file mode 100644 index 00000000000..99ce44ddae7 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/postgresql/spec/acceptance/server/database_grant_spec.rb @@ -0,0 +1,48 @@ +require 'spec_helper_acceptance' + +describe 'postgresql::server::database_grant:', :unless => UNSUPPORTED_PLATFORMS.include?(fact('osfamily')) do + after :all do + # Cleanup after tests have ran + apply_manifest("class { 'postgresql::server': ensure => absent }", :catch_failures => true) + end + + it 'should grant access so a user can create objects in a database' do + begin + pp = <<-EOS.unindent + $db = 'postgres' + $user = 'psql_grant_tester' + $password = 'psql_grant_pw' + + class { 'postgresql::server': } + + # Since we are not testing pg_hba or any of that, make a local user for ident auth + user { $user: + ensure => present, + } + + postgresql::server::role { $user: + password_hash => postgresql_password($user, $password), + } + + postgresql::server::database { $db: } + + postgresql::server::database_grant { 'grant create test': + privilege => 'CREATE', + db => $db, + role => $user, + } + EOS + + apply_manifest(pp, :catch_failures => true) + apply_manifest(pp, :catch_changes => true) + + # Check that the user can create a table in the database + psql('--command="create table foo (foo int)" postgres', 'psql_grant_tester') do |r| + expect(r.stdout).to match(/CREATE TABLE/) + expect(r.stderr).to eq('') + end + ensure + psql('--command="drop table foo" postgres', 'psql_grant_tester') + end + end +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/postgresql/spec/acceptance/server/database_spec.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/postgresql/spec/acceptance/server/database_spec.rb new file mode 100644 index 00000000000..7f227d1686b --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/postgresql/spec/acceptance/server/database_spec.rb @@ -0,0 +1,29 @@ +require 'spec_helper_acceptance' + +describe 'postgresql::server::database:', :unless => UNSUPPORTED_PLATFORMS.include?(fact('osfamily')) do + after :all do + # Cleanup after tests have ran + apply_manifest("class { 'postgresql::server': ensure => absent }", :catch_failures => true) + end + + it 'should idempotently create a db that we can connect to' do + begin + pp = <<-EOS.unindent + $db = 'postgresql_test_db' + class { 'postgresql::server': } + + postgresql::server::database { $db: } + EOS + + apply_manifest(pp, :catch_failures => true) + apply_manifest(pp, :catch_changes => true) + + psql('--command="select datname from pg_database" postgresql_test_db') do |r| + expect(r.stdout).to match(/postgresql_test_db/) + expect(r.stderr).to eq('') + end + ensure + psql('--command="drop database postgresql_test_db" postgres') + end + end +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/postgresql/spec/acceptance/server/db_spec.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/postgresql/spec/acceptance/server/db_spec.rb new file mode 100644 index 00000000000..0287976a857 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/postgresql/spec/acceptance/server/db_spec.rb @@ -0,0 +1,138 @@ +require 'spec_helper_acceptance' + +describe 'postgresql::server::db', :unless => UNSUPPORTED_PLATFORMS.include?(fact('osfamily')) do + after :all do + # Cleanup after tests have ran + apply_manifest("class { 'postgresql::server': ensure => absent }", :catch_failures => true) + end + + it 'should idempotently create a db that we can connect to' do + begin + pp = <<-EOS.unindent + $db = 'postgresql_test_db' + class { 'postgresql::server': } + + postgresql::server::db { $db: + user => $db, + password => postgresql_password($db, $db), + } + EOS + + apply_manifest(pp, :catch_failures => true) + apply_manifest(pp, :catch_changes => true) + + psql('--command="select datname from pg_database" postgresql_test_db') do |r| + expect(r.stdout).to match(/postgresql_test_db/) + expect(r.stderr).to eq('') + end + ensure + psql('--command="drop database postgresql_test_db" postgres') + end + end + + it 'should take a locale parameter' do + pending('no support for locale parameter with centos 5', :if => (fact('osfamily') == 'RedHat' and fact('lsbmajdistrelease') == '5')) + begin + pp = <<-EOS.unindent + class { 'postgresql::server': } + postgresql::server::db { 'test1': + user => 'test1', + password => postgresql_password('test1', 'test1'), + encoding => 'UTF8', + locale => 'en_NG.UTF-8', + } + EOS + + apply_manifest(pp, :catch_failures => true) + apply_manifest(pp, :catch_changes => true) + + psql('-c "show lc_ctype" test1') do |r| + expect(r.stdout).to match(/en_NG/) + end + + psql('-c "show lc_collate" test1') do |r| + expect(r.stdout).to match(/en_NG/) + end + ensure + psql('--command="drop database test1" postgres') + end + end + + it 'should take an istemplate parameter' do + begin + pp = <<-EOS.unindent + $db = 'template2' + class { 'postgresql::server': } + + postgresql::server::db { $db: + user => $db, + password => postgresql_password($db, $db), + istemplate => true, + } + EOS + + apply_manifest(pp, :catch_failures => true) + apply_manifest(pp, :catch_changes => true) + + psql('--command="select datname from pg_database" template2') do |r| + expect(r.stdout).to match(/template2/) + expect(r.stderr).to eq('') + end + ensure + psql('--command="drop database template2" postgres', 'postgres', [1,2]) do |r| + expect(r.stdout).to eq('') + expect(r.stderr).to match(/cannot drop a template database/) + end + end + end + + it 'should update istemplate parameter' do + begin + pp = <<-EOS.unindent + $db = 'template2' + class { 'postgresql::server': } + + postgresql::server::db { $db: + user => $db, + password => postgresql_password($db, $db), + istemplate => false, + } + EOS + + apply_manifest(pp, :catch_failures => true) + apply_manifest(pp, :catch_changes => true) + + psql('--command="select datname from pg_database" template2') do |r| + expect(r.stdout).to match(/template2/) + expect(r.stderr).to eq('') + end + ensure + psql('--command="drop database template2" postgres') + end + end + + it 'should take a template parameter' do + begin + pp = <<-EOS.unindent + $db = 'postgresql_test_db' + class { 'postgresql::server': } + + postgresql::server::db { $db: + user => $db, + template => 'template1', + password => postgresql_password($db, $db), + } + EOS + + apply_manifest(pp, :catch_failures => true) + apply_manifest(pp, :catch_changes => true) + + psql('--command="select datname from pg_database" postgresql_test_db') do |r| + expect(r.stdout).to match(/postgresql_test_db/) + expect(r.stderr).to eq('') + end + ensure + psql('--command="drop database postgresql_test_db" postgres') + end + end +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/postgresql/spec/acceptance/server/grant_spec.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/postgresql/spec/acceptance/server/grant_spec.rb new file mode 100644 index 00000000000..d34523a60fe --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/postgresql/spec/acceptance/server/grant_spec.rb @@ -0,0 +1,49 @@ +require 'spec_helper_acceptance' + +describe 'postgresql::server::grant:', :unless => UNSUPPORTED_PLATFORMS.include?(fact('osfamily')) do + after :all do + # Cleanup after tests have ran + apply_manifest("class { 'postgresql::server': ensure => absent }", :catch_failures => true) + end + + it 'should grant access so a user can create in a database' do + begin + pp = <<-EOS.unindent + $db = 'postgres' + $user = 'psql_grant_tester' + $password = 'psql_grant_pw' + + class { 'postgresql::server': } + + # Since we are not testing pg_hba or any of that, make a local user for ident auth + user { $user: + ensure => present, + } + + postgresql::server::role { $user: + password_hash => postgresql_password($user, $password), + } + + postgresql::server::database { $db: } + + postgresql::server::grant { 'grant create test': + object_type => 'database', + privilege => 'CREATE', + db => $db, + role => $user, + } + EOS + + apply_manifest(pp, :catch_failures => true) + apply_manifest(pp, :catch_changes => true) + + # Check that the user can create a table in the database + psql('--command="create table foo (foo int)" postgres', 'psql_grant_tester') do |r| + expect(r.stdout).to match(/CREATE TABLE/) + expect(r.stderr).to eq('') + end + ensure + psql('--command="drop table foo" postgres', 'psql_grant_tester') + end + end +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/postgresql/spec/acceptance/server/pg_hba_rule_spec.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/postgresql/spec/acceptance/server/pg_hba_rule_spec.rb new file mode 100644 index 00000000000..bbc8e9464f0 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/postgresql/spec/acceptance/server/pg_hba_rule_spec.rb @@ -0,0 +1,72 @@ +require 'spec_helper_acceptance' + +describe 'postgresql::server::pg_hba_rule:', :unless => UNSUPPORTED_PLATFORMS.include?(fact('osfamily')) do + after :all do + # Cleanup after tests have ran + apply_manifest("class { 'postgresql::server': ensure => absent }", :catch_failures => true) + end + + it 'should create a ruleset in pg_hba.conf' do + pp = <<-EOS.unindent + class { 'postgresql::server': } + postgresql::server::pg_hba_rule { "allow application network to access app database": + type => "host", + database => "app", + user => "app", + address => "200.1.2.0/24", + auth_method => md5, + } + EOS + + apply_manifest(pp, :catch_failures => true) + apply_manifest(pp, :catch_failures => true) + + shell("grep '200.1.2.0/24' /etc/postgresql/*/*/pg_hba.conf || grep '200.1.2.0/24' /var/lib/pgsql/data/pg_hba.conf") + end + + it 'should create a ruleset in pg_hba.conf that denies db access to db test1' do + pp = <<-EOS.unindent + class { 'postgresql::server': } + + postgresql::server::db { "test1": + user => "test1", + password => postgresql_password('test1', 'test1'), + grant => "all", + } + + postgresql::server::pg_hba_rule { "allow anyone to have access to db test1": + type => "local", + database => "test1", + user => "test1", + auth_method => reject, + order => '001', + } + + user { "test1": + shell => "/bin/bash", + managehome => true, + } + EOS + + apply_manifest(pp, :catch_failures => true) + + shell('su - test1 -c \'psql -U test1 -c "\q" test1\'', :acceptable_exit_codes => [2]) + end + + it 'should fail catalogue if postgresql::server::manage_pga_conf is disabled' do + pp = <<-EOS.unindent + class { 'postgresql::server': + manage_pg_hba_conf => false, + } + postgresql::server::pg_hba_rule { 'foo': + type => "local", + database => "test1", + user => "test1", + auth_method => reject, + order => '001', + } + EOS + + apply_manifest(pp, :expect_failures => true) + end +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/postgresql/spec/acceptance/server/plperl_spec.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/postgresql/spec/acceptance/server/plperl_spec.rb new file mode 100644 index 00000000000..73312845259 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/postgresql/spec/acceptance/server/plperl_spec.rb @@ -0,0 +1,25 @@ +require 'spec_helper_acceptance' + +describe 'server plperl:', :unless => UNSUPPORTED_PLATFORMS.include?(fact('osfamily')) do + after :all do + # Cleanup after tests have ran + pp = <<-EOS.unindent + class { 'postgresql::server': ensure => absent } + class { 'postgresql::server::plperl': package_ensure => purged } + EOS + + apply_manifest(pp, :catch_failures => true) + end + + it 'test loading class with no parameters' do + pending('no support for plperl with default version on centos 5', + :if => (fact('osfamily') == 'RedHat' and fact('lsbmajdistrelease') == '5')) + pp = <<-EOS.unindent + class { 'postgresql::server': } + class { 'postgresql::server::plperl': } + EOS + + apply_manifest(pp, :catch_failures => true) + apply_manifest(pp, :catch_changes => true) + end +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/postgresql/spec/acceptance/server/role_spec.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/postgresql/spec/acceptance/server/role_spec.rb new file mode 100644 index 00000000000..2bd2b70db0c --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/postgresql/spec/acceptance/server/role_spec.rb @@ -0,0 +1,88 @@ +require 'spec_helper_acceptance' + +describe 'postgresql::server::role:', :unless => UNSUPPORTED_PLATFORMS.include?(fact('osfamily')) do + after :all do + # Cleanup after tests have ran + apply_manifest("class { 'postgresql::server': ensure => absent }", :catch_failures => true) + end + + it 'should idempotently create a user who can log in' do + pp = <<-EOS.unindent + $user = "postgresql_test_user" + $password = "postgresql_test_password" + + class { 'postgresql::server': } + + # Since we are not testing pg_hba or any of that, make a local user for ident auth + user { $user: + ensure => present, + } + + postgresql::server::role { $user: + password_hash => postgresql_password($user, $password), + } + EOS + + apply_manifest(pp, :catch_failures => true) + + # Check that the user can log in + psql('--command="select datname from pg_database" postgres', 'postgresql_test_user') do |r| + expect(r.stdout).to match(/template1/) + expect(r.stderr).to eq('') + end + end + + it 'should idempotently alter a user who can log in' do + pp = <<-EOS.unindent + $user = "postgresql_test_user" + $password = "postgresql_test_password2" + + class { 'postgresql::server': } + + # Since we are not testing pg_hba or any of that, make a local user for ident auth + user { $user: + ensure => present, + } + + postgresql::server::role { $user: + password_hash => postgresql_password($user, $password), + } + EOS + + apply_manifest(pp, :catch_failures => true) + apply_manifest(pp, :catch_changes => true) + + # Check that the user can log in + psql('--command="select datname from pg_database" postgres', 'postgresql_test_user') do |r| + expect(r.stdout).to match(/template1/) + expect(r.stderr).to eq('') + end + end + + it 'should idempotently create a user with a cleartext password' do + pp = <<-EOS.unindent + $user = "postgresql_test_user2" + $password = "postgresql_test_password2" + + class { 'postgresql::server': } + + # Since we are not testing pg_hba or any of that, make a local user for ident auth + user { $user: + ensure => present, + } + + postgresql::server::role { $user: + password_hash => $password, + } + EOS + + apply_manifest(pp, :catch_failures => true) + apply_manifest(pp, :catch_changes => true) + + # Check that the user can log in + psql('--command="select datname from pg_database" postgres', 'postgresql_test_user2') do |r| + expect(r.stdout).to match(/template1/) + expect(r.stderr).to eq('') + end + end +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/postgresql/spec/acceptance/server/table_grant_spec.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/postgresql/spec/acceptance/server/table_grant_spec.rb new file mode 100644 index 00000000000..6a779d9f631 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/postgresql/spec/acceptance/server/table_grant_spec.rb @@ -0,0 +1,124 @@ +require 'spec_helper_acceptance' + +describe 'postgresql::server::table_grant:', :unless => UNSUPPORTED_PLATFORMS.include?(fact('osfamily')) do + after :all do + # Cleanup after tests have ran + apply_manifest("class { 'postgresql::server': ensure => absent }", :catch_failures => true) + end + + it 'should grant all accesses to a user' do + begin + pp = <<-EOS.unindent + $db = 'table_grant' + $user = 'psql_grant_tester' + $password = 'psql_table_pw' + + class { 'postgresql::server': } + + # Since we are not testing pg_hba or any of that, make a local user for ident auth + user { $user: + ensure => present, + } + + postgresql::server::role { $user: + password_hash => postgresql_password($user, $password), + } + + postgresql::server::database { $db: } + + # Create a rule for the user + postgresql::server::pg_hba_rule { "allow ${user}": + type => 'local', + database => $db, + user => $user, + auth_method => 'ident', + order => 1, + } + + postgresql_psql { 'Create testing table': + command => 'CREATE TABLE "test_table" (field integer NOT NULL)', + db => $db, + unless => "SELECT * FROM pg_tables WHERE tablename = 'test_table'", + require => Postgresql::Server::Database[$db], + } + + postgresql::server::table_grant { 'grant insert test': + privilege => 'ALL', + table => 'test_table', + db => $db, + role => $user, + require => Postgresql_psql['Create testing table'], + } + EOS + + apply_manifest(pp, :catch_failures => true) + apply_manifest(pp, :catch_changes => true) + + ## Check that the user can create a table in the database + psql('--command="create table foo (foo int)" postgres', 'psql_grant_tester') do |r| + expect(r.stdout).to match(/CREATE TABLE/) + expect(r.stderr).to eq('') + end + ensure + psql('--command="drop table foo" postgres', 'psql_grant_tester') + end + end + + it 'should grant access so a user can insert in a table' do + begin + pp = <<-EOS.unindent + $db = 'table_grant' + $user = 'psql_grant_tester' + $password = 'psql_table_pw' + + class { 'postgresql::server': } + + # Since we are not testing pg_hba or any of that, make a local user for ident auth + user { $user: + ensure => present, + } + + postgresql::server::role { $user: + password_hash => postgresql_password($user, $password), + } + + postgresql::server::database { $db: } + + # Create a rule for the user + postgresql::server::pg_hba_rule { "allow ${user}": + type => 'local', + database => $db, + user => $user, + auth_method => 'ident', + order => 1, + } + + postgresql_psql { 'Create testing table': + command => 'CREATE TABLE "test_table" (field integer NOT NULL)', + db => $db, + unless => "SELECT * FROM pg_tables WHERE tablename = 'test_table'", + require => Postgresql::Server::Database[$db], + } + + postgresql::server::table_grant { 'grant insert test': + privilege => 'INSERT', + table => 'test_table', + db => $db, + role => $user, + require => Postgresql_psql['Create testing table'], + } + EOS + + apply_manifest(pp, :catch_failures => true) + apply_manifest(pp, :catch_changes => true) + + ## Check that the user can create a table in the database + psql('--command="create table foo (foo int)" postgres', 'psql_grant_tester') do |r| + expect(r.stdout).to match(/CREATE TABLE/) + expect(r.stderr).to eq('') + end + ensure + psql('--command="drop table foo" postgres', 'psql_grant_tester') + end + end +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/postgresql/spec/acceptance/server/tablespace_spec.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/postgresql/spec/acceptance/server/tablespace_spec.rb new file mode 100644 index 00000000000..c633d6da7b1 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/postgresql/spec/acceptance/server/tablespace_spec.rb @@ -0,0 +1,67 @@ +require 'spec_helper_acceptance' + +describe 'postgresql::server::tablespace:', :unless => UNSUPPORTED_PLATFORMS.include?(fact('osfamily')) do + after :all do + # Cleanup after tests have ran + apply_manifest("class { 'postgresql::server': ensure => absent }", :catch_failures => true) + end + + it 'should idempotently create tablespaces and databases that are using them' do + pp = <<-EOS.unindent + class { 'postgresql::server': } + + file { '/tmp/postgres/pg_tablespaces': + ensure => 'directory', + owner => 'postgres', + group => 'postgres', + mode => '0700', + } + + postgresql::server::tablespace { 'tablespace1': + location => '/tmp/postgres/pg_tablespaces/space1', + } + postgresql::server::database { 'tablespacedb1': + encoding => 'utf8', + tablespace => 'tablespace1', + } + postgresql::server::db { 'tablespacedb2': + user => 'dbuser2', + password => postgresql_password('dbuser2', 'dbuser2'), + tablespace => 'tablespace1', + } + + postgresql::server::role { 'spcuser': + password_hash => postgresql_password('spcuser', 'spcuser'), + } + postgresql::server::tablespace { 'tablespace2': + location => '/tmp/postgres/pg_tablespaces/space2', + owner => 'spcuser', + } + postgresql::server::database { 'tablespacedb3': + encoding => 'utf8', + tablespace => 'tablespace2', + } + EOS + + shell('mkdir -p /tmp/postgres') + # Apply appropriate selinux labels + if fact('osfamily') == 'RedHat' + if shell('getenforce').stdout =~ /Enforcing/ + shell('chcon -Rv --type=postgresql_db_t /tmp/postgres') + end + end + apply_manifest(pp, :catch_failures => true) + apply_manifest(pp, :catch_changes => true) + + # Check that databases use correct tablespaces + psql('--command="select ts.spcname from pg_database db, pg_tablespace ts where db.dattablespace = ts.oid and db.datname = \'"\'tablespacedb1\'"\'"') do |r| + expect(r.stdout).to match(/tablespace1/) + expect(r.stderr).to eq('') + end + + psql('--command="select ts.spcname from pg_database db, pg_tablespace ts where db.dattablespace = ts.oid and db.datname = \'"\'tablespacedb3\'"\'"') do |r| + expect(r.stdout).to match(/tablespace2/) + expect(r.stderr).to eq('') + end + end +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/postgresql/spec/acceptance/server_spec.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/postgresql/spec/acceptance/server_spec.rb new file mode 100644 index 00000000000..b8456ee76d4 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/postgresql/spec/acceptance/server_spec.rb @@ -0,0 +1,188 @@ +require 'spec_helper_acceptance' + +describe 'server:', :unless => UNSUPPORTED_PLATFORMS.include?(fact('osfamily')) do + after :all do + # Cleanup after tests have ran + apply_manifest("class { 'postgresql::server': ensure => absent }", :catch_failures => true) + end + + it 'test loading class with no parameters' do + pp = <<-EOS.unindent + class { 'postgresql::server': } + EOS + + apply_manifest(pp, :catch_failures => true) + apply_manifest(pp, :catch_changes => true) + end + + describe port(5432) do + it { should be_listening } + end + + describe 'setting postgres password' do + it 'should install and successfully adjust the password' do + pp = <<-EOS.unindent + class { 'postgresql::server': + postgres_password => 'foobarbaz', + ip_mask_deny_postgres_user => '0.0.0.0/32', + } + EOS + + apply_manifest(pp, :catch_failures => true) do |r| + expect(r.stdout).to match(/\[set_postgres_postgrespw\]\/returns: executed successfully/) + end + apply_manifest(pp, :catch_changes => true) + + pp = <<-EOS.unindent + class { 'postgresql::server': + postgres_password => 'TPSR$$eports!', + ip_mask_deny_postgres_user => '0.0.0.0/32', + } + EOS + + apply_manifest(pp, :catch_failures => true) do |r| + expect(r.stdout).to match(/\[set_postgres_postgrespw\]\/returns: executed successfully/) + end + apply_manifest(pp, :catch_changes => true) + + end + end +end + +describe 'server without defaults:', :unless => UNSUPPORTED_PLATFORMS.include?(fact('osfamily')) do + context 'test installing non-default version of postgresql' do + after :all do + psql('--command="drop database postgresql_test_db" postgres', 'postgres') + pp = <<-EOS.unindent + if $::osfamily == 'Debian' { + class { 'apt': } + # XXX Need to purge postgresql-common after uninstalling 9.3 because + # it leaves the init script behind. Poor packaging. + package { 'postgresql-common': + ensure => purged, + require => Class['postgresql::server'], + } + } + class { 'postgresql::globals': + ensure => absent, + manage_package_repo => true, + version => '9.3', + } + class { 'postgresql::server': + ensure => absent, + } + EOS + expect(apply_manifest(pp, :catch_failures => true).stderr).to eq('') + end + + it 'perform installation and create a db' do + pp = <<-EOS.unindent + if $::osfamily == 'Debian' { + class { 'apt': } + } + class { "postgresql::globals": + version => "9.3", + manage_package_repo => true, + encoding => 'UTF8', + locale => 'en_US.UTF-8', + xlogdir => '/tmp/pg_xlogs', + } + class { "postgresql::server": } + postgresql::server::db { "postgresql_test_db": + user => "foo1", + password => postgresql_password('foo1', 'foo1'), + } + postgresql::server::config_entry { 'port': + value => '5432', + } + EOS + + expect(apply_manifest(pp, :catch_failures => true).stderr).to eq('') + apply_manifest(pp, :catch_changes => true) + + shell('test -d /tmp/pg_xlogs') do |r| + expect(r.stdout).to eq('') + expect(r.stderr).to eq('') + end + + psql('postgresql_test_db --command="select datname from pg_database limit 1"') + end + + describe port(5432) do + it { should be_listening } + end + end + + unless ((fact('osfamily') == 'RedHat' and fact('lsbmajdistrelease') == '5') || + fact('osfamily') == 'Debian') + + context 'override locale and encoding' do + after :each do + apply_manifest("class { 'postgresql::server': ensure => absent }", :catch_failures => true) + end + + it 'perform installation with different locale and encoding' do + pp = <<-EOS.unindent + class { 'postgresql::server': + locale => 'en_NG', + encoding => 'UTF8', + } + EOS + + apply_manifest(pp, :catch_failures => true) + apply_manifest(pp, :catch_changes => true) + + # Remove db first, if it exists for some reason + shell('su postgres -c "dropdb test1"', :acceptable_exit_codes => [0,1,2]) + shell('su postgres -c "createdb test1"') + shell('su postgres -c \'psql -c "show lc_ctype" test1\'') do |r| + expect(r.stdout).to match(/en_NG/) + end + + shell('su postgres -c \'psql -c "show lc_collate" test1\'') do |r| + expect(r.stdout).to match(/en_NG/) + end + end + end + end +end + +describe 'server with firewall:', :unless => UNSUPPORTED_PLATFORMS.include?(fact('osfamily')) do + after :all do + apply_manifest("class { 'postgresql::server': ensure => absent }", :catch_failures => true) + end + + context 'test installing postgresql with firewall management on' do + it 'perform installation and make sure it is idempotent' do + pending('no support for firewall with fedora', :if => (fact('operatingsystem') == 'Fedora')) + pp = <<-EOS.unindent + class { 'firewall': } + class { "postgresql::server": + manage_firewall => true, + } + EOS + + apply_manifest(pp, :catch_failures => true) + apply_manifest(pp, :catch_changes => true) + end + end +end + +describe 'server without pg_hba.conf:', :unless => UNSUPPORTED_PLATFORMS.include?(fact('osfamily')) do + after :all do + apply_manifest("class { 'postgresql::server': ensure => absent }", :catch_failures => true) + end + + context 'test installing postgresql without pg_hba.conf management on' do + it 'perform installation and make sure it is idempotent' do + pp = <<-EOS.unindent + class { "postgresql::server": + manage_pg_hba_conf => false, + } + EOS + + apply_manifest(pp, :catch_failures => true) + apply_manifest(pp, :catch_changes => true) + end + end +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/postgresql/spec/acceptance/unsupported_spec.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/postgresql/spec/acceptance/unsupported_spec.rb new file mode 100644 index 00000000000..1f64a1fa5e1 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/postgresql/spec/acceptance/unsupported_spec.rb @@ -0,0 +1,16 @@ +require 'spec_helper_acceptance' + +describe 'unsupported distributions and OSes', :if => UNSUPPORTED_PLATFORMS.include?(fact('osfamily')) do + it 'should fail for client' do + pp = <<-EOS + class { 'postgresql::client': } + EOS + expect(apply_manifest(pp, :expect_failures => true).stderr).to match(/does not provide defaults for osfamily/i) + end + it 'should fail for server' do + pp = <<-EOS + class { 'postgresql::server': } + EOS + expect(apply_manifest(pp, :expect_failures => true).stderr).to match(/does not provide defaults for osfamily/i) + end +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/postgresql/spec/acceptance/validate_db_connection_spec.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/postgresql/spec/acceptance/validate_db_connection_spec.rb new file mode 100644 index 00000000000..0bfe509d273 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/postgresql/spec/acceptance/validate_db_connection_spec.rb @@ -0,0 +1,79 @@ +require 'spec_helper_acceptance' + +describe 'postgresql::validate_db_connection:', :unless => UNSUPPORTED_PLATFORMS.include?(fact('osfamily')) do + before :all do + # Setup postgresql server and a sample database for tests to use. + pp = <<-EOS.unindent + $db = 'foo' + class { 'postgresql::server': } + + postgresql::server::db { $db: + user => $db, + password => postgresql_password($db, $db), + } + EOS + + apply_manifest(pp, :catch_failures => true) + end + + after :all do + # Remove postgresql server after all tests have ran. + apply_manifest("class { 'postgresql::server': ensure => absent }", :catch_failures => true) + end + + it 'should run puppet with no changes declared if socket connectivity works' do + pp = <<-EOS.unindent + postgresql::validate_db_connection { 'foo': + database_name => 'foo', + run_as => 'postgres', + } + EOS + + apply_manifest(pp, :catch_failures => true) + end + + it 'should keep retrying if database is down' do + # So first we shut the db down, then background a startup routine with a + # sleep 10 in front of it. That way the tests should continue while + # the pause and db startup happens in the background. + shell("/etc/init.d/postgresql* stop") + shell('nohup bash -c "sleep 10; /etc/init.d/postgresql* start" > /dev/null 2>&1 &') + + pp = <<-EOS.unindent + postgresql::validate_db_connection { 'foo': + database_name => 'foo', + tries => 30, + sleep => 1, + run_as => 'postgres', + } + EOS + + apply_manifest(pp, :catch_failures => true) + end + + it 'should run puppet with no changes declared if db ip connectivity works' do + pp = <<-EOS.unindent + postgresql::validate_db_connection { 'foo': + database_host => 'localhost', + database_name => 'foo', + database_username => 'foo', + database_password => 'foo', + } + EOS + + apply_manifest(pp, :catch_failures => true) + end + + it 'should fail catalogue if database connectivity fails' do + pp = <<-EOS.unindent + postgresql::validate_db_connection { 'foobarbaz': + database_host => 'localhost', + database_name => 'foobarbaz', + database_username => 'foobarbaz', + database_password => 'foobarbaz', + } + EOS + + apply_manifest(pp, :expect_failures => true) + end +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/postgresql/spec/spec_helper.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/postgresql/spec/spec_helper.rb new file mode 100644 index 00000000000..b4c44aa851e --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/postgresql/spec/spec_helper.rb @@ -0,0 +1,30 @@ +require 'puppetlabs_spec_helper/module_spec_helper' + +RSpec.configure do |c| + c.mock_with :rspec do |mock| + mock.syntax = [:expect, :should] + end + c.include PuppetlabsSpec::Files + + c.before :each do + # Ensure that we don't accidentally cache facts and environment + # between test cases. + Facter::Util::Loader.any_instance.stubs(:load_all) + Facter.clear + Facter.clear_messages + + # Store any environment variables away to be restored later + @old_env = {} + ENV.each_key {|k| @old_env[k] = ENV[k]} + end + + c.after :each do + PuppetlabsSpec::Files.cleanup + end +end + +# Convenience helper for returning parameters for a type from the +# catalogue. +def param(type, title, param) + param_value(catalogue, type, title, param) +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/postgresql/spec/spec_helper_acceptance.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/postgresql/spec/spec_helper_acceptance.rb new file mode 100644 index 00000000000..4984da6b523 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/postgresql/spec/spec_helper_acceptance.rb @@ -0,0 +1,75 @@ +require 'beaker-rspec/spec_helper' +require 'beaker-rspec/helpers/serverspec' + +class String + # Provide ability to remove indentation from strings, for the purpose of + # left justifying heredoc blocks. + def unindent + gsub(/^#{scan(/^\s*/).min_by{|l|l.length}}/, "") + end +end + +def shellescape(str) + str = str.to_s + + # An empty argument will be skipped, so return empty quotes. + return "''" if str.empty? + + str = str.dup + + # Treat multibyte characters as is. It is caller's responsibility + # to encode the string in the right encoding for the shell + # environment. + str.gsub!(/([^A-Za-z0-9_\-.,:\/@\n])/, "\\\\\\1") + + # A LF cannot be escaped with a backslash because a backslash + LF + # combo is regarded as line continuation and simply ignored. + str.gsub!(/\n/, "'\n'") + + return str +end + +def psql(psql_cmd, user = 'postgres', exit_codes = [0], &block) + psql = "psql #{psql_cmd}" + shell("su #{shellescape(user)} -c #{shellescape(psql)}", :acceptable_exit_codes => exit_codes, &block) +end + +unless ENV['RS_PROVISION'] == 'no' + hosts.each do |host| + if host.is_pe? + install_pe + else + install_puppet + on host, "mkdir -p #{host['distmoduledir']}" + end + end +end + +UNSUPPORTED_PLATFORMS = ['AIX','windows','Solaris','Suse'] + +RSpec.configure do |c| + # Project root + proj_root = File.expand_path(File.join(File.dirname(__FILE__), '..')) + + # Readable test descriptions + c.formatter = :documentation + + # Configure all nodes in nodeset + c.before :suite do + # Install module and dependencies + puppet_module_install(:source => proj_root, :module_name => 'postgresql') + hosts.each do |host| + on host, "/bin/touch #{default['puppetpath']}/hiera.yaml" + on host, 'chmod 755 /root' + if fact('osfamily') == 'Debian' + on host, "echo \"en_US ISO-8859-1\nen_NG.UTF-8 UTF-8\nen_US.UTF-8 UTF-8\n\" > /etc/locale.gen" + on host, '/usr/sbin/locale-gen' + on host, '/usr/sbin/update-locale' + end + on host, puppet('module','install','puppetlabs-stdlib'), { :acceptable_exit_codes => [0,1] } + on host, puppet('module','install','puppetlabs-firewall'), { :acceptable_exit_codes => [0,1] } + on host, puppet('module','install','puppetlabs-apt'), { :acceptable_exit_codes => [0,1] } + on host, puppet('module','install','puppetlabs-concat'), { :acceptable_exit_codes => [0,1] } + end + end +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/postgresql/spec/unit/classes/client_spec.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/postgresql/spec/unit/classes/client_spec.rb new file mode 100644 index 00000000000..dd24dbfd4ab --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/postgresql/spec/unit/classes/client_spec.rb @@ -0,0 +1,36 @@ +require 'spec_helper' + +describe 'postgresql::client', :type => :class do + let :facts do + { + :osfamily => 'Debian', + :operatingsystem => 'Debian', + :operatingsystemrelease => '6.0', + } + end + + describe 'with parameters' do + let :params do + { + :package_ensure => 'absent', + :package_name => 'mypackage', + } + end + + it 'should modify package' do + should contain_package("postgresql-client").with({ + :ensure => 'absent', + :name => 'mypackage', + :tag => 'postgresql', + }) + end + end + + describe 'with no parameters' do + it 'should create package with postgresql tag' do + should contain_package('postgresql-client').with({ + :tag => 'postgresql', + }) + end + end +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/postgresql/spec/unit/classes/globals_spec.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/postgresql/spec/unit/classes/globals_spec.rb new file mode 100644 index 00000000000..f8feb2f7825 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/postgresql/spec/unit/classes/globals_spec.rb @@ -0,0 +1,29 @@ +require 'spec_helper' + +describe 'postgresql::globals', :type => :class do + let :facts do + { + :osfamily => 'Debian', + :operatingsystem => 'Debian', + :operatingsystemrelease => '6.0', + :lsbdistid => 'Debian', + } + end + + describe 'with no parameters' do + it 'should work' do + should contain_class("postgresql::globals") + end + end + + describe 'manage_package_repo => true' do + let(:params) do + { + :manage_package_repo => true, + } + end + it 'should pull in class postgresql::repo' do + should contain_class("postgresql::repo") + end + end +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/postgresql/spec/unit/classes/lib/devel_spec.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/postgresql/spec/unit/classes/lib/devel_spec.rb new file mode 100644 index 00000000000..8c289fc54ff --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/postgresql/spec/unit/classes/lib/devel_spec.rb @@ -0,0 +1,12 @@ +require 'spec_helper' + +describe 'postgresql::lib::devel', :type => :class do + let :facts do + { + :osfamily => 'Debian', + :operatingsystem => 'Debian', + :operatingsystemrelease => '6.0', + } + end + it { should contain_class("postgresql::lib::devel") } +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/postgresql/spec/unit/classes/lib/java_spec.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/postgresql/spec/unit/classes/lib/java_spec.rb new file mode 100644 index 00000000000..7541bf586f4 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/postgresql/spec/unit/classes/lib/java_spec.rb @@ -0,0 +1,40 @@ +require 'spec_helper' + +describe 'postgresql::lib::java', :type => :class do + + describe 'on a debian based os' do + let :facts do { + :osfamily => 'Debian', + :operatingsystem => 'Debian', + :operatingsystemrelease => '6.0', + } + end + it { should contain_package('postgresql-jdbc').with( + :name => 'libpostgresql-jdbc-java', + :ensure => 'present' + )} + end + + describe 'on a redhat based os' do + let :facts do { + :osfamily => 'RedHat', + :operatingsystem => 'RedHat', + :operatingsystemrelease => '6.4', + } + end + it { should contain_package('postgresql-jdbc').with( + :name => 'postgresql-jdbc', + :ensure => 'present' + )} + describe 'when parameters are supplied' do + let :params do + {:package_ensure => 'latest', :package_name => 'somepackage'} + end + it { should contain_package('postgresql-jdbc').with( + :name => 'somepackage', + :ensure => 'latest' + )} + end + end + +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/postgresql/spec/unit/classes/lib/python_spec.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/postgresql/spec/unit/classes/lib/python_spec.rb new file mode 100644 index 00000000000..ab3fd3207dd --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/postgresql/spec/unit/classes/lib/python_spec.rb @@ -0,0 +1,31 @@ +require 'spec_helper' + +describe 'postgresql::lib::python', :type => :class do + + describe 'on a redhat based os' do + let :facts do { + :osfamily => 'RedHat', + :operatingsystem => 'RedHat', + :operatingsystemrelease => '6.4', + } + end + it { should contain_package('python-psycopg2').with( + :name => 'python-psycopg2', + :ensure => 'present' + )} + end + + describe 'on a debian based os' do + let :facts do { + :osfamily => 'Debian', + :operatingsystem => 'Debian', + :operatingsystemrelease => '6.0', + } + end + it { should contain_package('python-psycopg2').with( + :name => 'python-psycopg2', + :ensure => 'present' + )} + end + +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/postgresql/spec/unit/classes/params_spec.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/postgresql/spec/unit/classes/params_spec.rb new file mode 100644 index 00000000000..730fd1097a1 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/postgresql/spec/unit/classes/params_spec.rb @@ -0,0 +1,12 @@ +require 'spec_helper' + +describe 'postgresql::params', :type => :class do + let :facts do + { + :osfamily => 'Debian', + :operatingsystem => 'Debian', + :operatingsystemrelease => '6.0', + } + end + it { should contain_class("postgresql::params") } +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/postgresql/spec/unit/classes/repo_spec.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/postgresql/spec/unit/classes/repo_spec.rb new file mode 100644 index 00000000000..e7e286f6421 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/postgresql/spec/unit/classes/repo_spec.rb @@ -0,0 +1,18 @@ +require 'spec_helper' + +describe 'postgresql::repo', :type => :class do + let :facts do + { + :osfamily => 'Debian', + :operatingsystem => 'Debian', + :operatingsystemrelease => '6.0', + :lsbdistid => 'Debian', + } + end + + describe 'with no parameters' do + it 'should instantiate apt_postgresql_org class' do + should contain_class('postgresql::repo::apt_postgresql_org') + end + end +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/postgresql/spec/unit/classes/server/contrib_spec.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/postgresql/spec/unit/classes/server/contrib_spec.rb new file mode 100644 index 00000000000..9fbab060f05 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/postgresql/spec/unit/classes/server/contrib_spec.rb @@ -0,0 +1,42 @@ +require 'spec_helper' + +describe 'postgresql::server::contrib', :type => :class do + let :pre_condition do + "class { 'postgresql::server': }" + end + + let :facts do + { + :osfamily => 'Debian', + :operatingsystem => 'Debian', + :operatingsystemrelease => '6.0', + :kernel => 'Linux', + :concat_basedir => tmpfilename('contrib'), + } + end + + describe 'with parameters' do + let(:params) do + { + :package_name => 'mypackage', + :package_ensure => 'absent', + } + end + + it 'should create package with correct params' do + should contain_package('postgresql-contrib').with({ + :ensure => 'absent', + :name => 'mypackage', + :tag => 'postgresql', + }) + end + end + + describe 'with no parameters' do + it 'should create package with postgresql tag' do + should contain_package('postgresql-contrib').with({ + :tag => 'postgresql', + }) + end + end +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/postgresql/spec/unit/classes/server/initdb_spec.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/postgresql/spec/unit/classes/server/initdb_spec.rb new file mode 100644 index 00000000000..bcf2dbe1bc4 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/postgresql/spec/unit/classes/server/initdb_spec.rb @@ -0,0 +1,29 @@ +require 'spec_helper' + +describe 'postgresql::server::initdb', :type => :class do + let (:pre_condition) do + "include postgresql::server" + end + describe 'on RedHat' do + let :facts do + { + :osfamily => 'RedHat', + :operatingsystem => 'CentOS', + :operatingsystemrelease => '6.0', + :concat_basedir => tmpfilename('server'), + } + end + it { should contain_file('/var/lib/pgsql/data').with_ensure('directory') } + end + describe 'on Amazon' do + let :facts do + { + :osfamily => 'RedHat', + :operatingsystem => 'Amazon', + :concat_basedir => tmpfilename('server'), + } + end + it { should contain_file('/var/lib/pgsql9/data').with_ensure('directory') } + end +end + diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/postgresql/spec/unit/classes/server/plperl_spec.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/postgresql/spec/unit/classes/server/plperl_spec.rb new file mode 100644 index 00000000000..785ed9a7f00 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/postgresql/spec/unit/classes/server/plperl_spec.rb @@ -0,0 +1,45 @@ +require 'spec_helper' + +describe 'postgresql::server::plperl', :type => :class do + let :facts do + { + :osfamily => 'Debian', + :operatingsystem => 'Debian', + :operatingsystemrelease => '6.0', + :kernel => 'Linux', + :concat_basedir => tmpfilename('plperl'), + } + end + + let :pre_condition do + "class { 'postgresql::server': }" + end + + describe 'with no parameters' do + it { should contain_class("postgresql::server::plperl") } + it 'should create package' do + should contain_package('postgresql-plperl').with({ + :ensure => 'present', + :tag => 'postgresql', + }) + end + end + + describe 'with parameters' do + let :params do + { + :package_ensure => 'absent', + :package_name => 'mypackage', + } + end + + it { should contain_class("postgresql::server::plperl") } + it 'should create package with correct params' do + should contain_package('postgresql-plperl').with({ + :ensure => 'absent', + :name => 'mypackage', + :tag => 'postgresql', + }) + end + end +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/postgresql/spec/unit/classes/server_spec.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/postgresql/spec/unit/classes/server_spec.rb new file mode 100644 index 00000000000..203eecb51d8 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/postgresql/spec/unit/classes/server_spec.rb @@ -0,0 +1,100 @@ +require 'spec_helper' + +describe 'postgresql::server', :type => :class do + let :facts do + { + :osfamily => 'Debian', + :operatingsystem => 'Debian', + :operatingsystemrelease => '6.0', + :concat_basedir => tmpfilename('server'), + :kernel => 'Linux', + } + end + + describe 'with no parameters' do + it { should contain_class("postgresql::params") } + it { should contain_class("postgresql::server") } + it 'should validate connection' do + should contain_postgresql__validate_db_connection('validate_service_is_running') + end + end + + describe 'manage_firewall => true' do + let(:params) do + { + :manage_firewall => true, + :ensure => true, + } + end + + it 'should create firewall rule' do + should contain_firewall("5432 accept - postgres") + end + end + + describe 'ensure => absent' do + let(:params) do + { + :ensure => 'absent', + :datadir => '/my/path', + :xlogdir => '/xlog/path', + } + end + + it 'should make package purged' do + should contain_package('postgresql-server').with({ + :ensure => 'purged', + }) + end + + it 'stop the service' do + should contain_service('postgresqld').with({ + :ensure => false, + }) + end + + it 'should remove datadir' do + should contain_file('/my/path').with({ + :ensure => 'absent', + }) + end + + it 'should remove xlogdir' do + should contain_file('/xlog/path').with({ + :ensure => 'absent', + }) + end + end + + describe 'package_ensure => absent' do + let(:params) do + { + :package_ensure => 'absent', + } + end + + it 'should remove the package' do + should contain_package('postgresql-server').with({ + :ensure => 'purged', + }) + end + + it 'should still enable the service' do + should contain_service('postgresqld').with({ + :ensure => true, + }) + end + end + + describe 'needs_initdb => true' do + let(:params) do + { + :needs_initdb => true, + } + end + + it 'should contain proper initdb exec' do + should contain_exec('postgresql_initdb') + end + end +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/postgresql/spec/unit/defines/server/config_entry_spec.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/postgresql/spec/unit/defines/server/config_entry_spec.rb new file mode 100644 index 00000000000..4c25c67916e --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/postgresql/spec/unit/defines/server/config_entry_spec.rb @@ -0,0 +1,23 @@ +require 'spec_helper' + +describe 'postgresql::server::config_entry', :type => :define do + let :facts do + { + :osfamily => 'RedHat', + :operatingsystem => 'RedHat', + :operatingsystemrelease => '6.4', + } + end + + let(:title) { 'config_entry'} + + let :target do + tmpfilename('postgresql_conf') + end + + context "syntax check" do + let(:params) { { :ensure => 'present'} } + it { should contain_postgresql__server__config_entry('config_entry') } + end +end + diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/postgresql/spec/unit/defines/server/database_grant_spec.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/postgresql/spec/unit/defines/server/database_grant_spec.rb new file mode 100644 index 00000000000..2e481df9fba --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/postgresql/spec/unit/defines/server/database_grant_spec.rb @@ -0,0 +1,26 @@ +require 'spec_helper' + +describe 'postgresql::server::database_grant', :type => :define do + let :facts do + { + :osfamily => 'Debian', + :operatingsystem => 'Debian', + :operatingsystemrelease => '6.0', + } + end + + let :title do + 'test' + end + + let :params do + { + :privilege => 'ALL', + :db => 'test', + :role => 'test', + } + end + + it { should contain_postgresql__server__database_grant('test') } + it { should contain_postgresql__server__grant('database:test') } +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/postgresql/spec/unit/defines/server/database_spec.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/postgresql/spec/unit/defines/server/database_spec.rb new file mode 100644 index 00000000000..a703827fec1 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/postgresql/spec/unit/defines/server/database_spec.rb @@ -0,0 +1,16 @@ +require 'spec_helper' + +describe 'postgresql::server::database', :type => :define do + let :facts do + { + :osfamily => 'Debian', + :operatingsystem => 'Debian', + :operatingsystemrelease => '6.0', + } + end + let :title do + 'test' + end + it { should contain_postgresql__server__database('test') } + it { should contain_postgresql_psql("Check for existence of db 'test'") } +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/postgresql/spec/unit/defines/server/db_spec.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/postgresql/spec/unit/defines/server/db_spec.rb new file mode 100644 index 00000000000..60fa9a9315d --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/postgresql/spec/unit/defines/server/db_spec.rb @@ -0,0 +1,28 @@ +require 'spec_helper' + +describe 'postgresql::server::db', :type => :define do + let :facts do + { + :osfamily => 'Debian', + :operatingsystem => 'Debian', + :operatingsystemrelease => '6.0', + } + end + + let :title do + 'test' + end + + let :params do + { + :user => 'test', + :password => 'test', + :owner => 'tester', + } + end + + it { should contain_postgresql__server__db('test') } + it { should contain_postgresql__server__database('test').with_owner('tester') } + it { should contain_postgresql__server__role('test') } + it { should contain_postgresql__server__database_grant('GRANT test - ALL - test') } +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/postgresql/spec/unit/defines/server/grant_spec.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/postgresql/spec/unit/defines/server/grant_spec.rb new file mode 100644 index 00000000000..43eeb8c01de --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/postgresql/spec/unit/defines/server/grant_spec.rb @@ -0,0 +1,24 @@ +require 'spec_helper' + +describe 'postgresql::server::grant', :type => :define do + let :facts do + { + :osfamily => 'Debian', + :operatingsystem => 'Debian', + :operatingsystemrelease => '6.0', + } + end + + let :title do + 'test' + end + + let :params do + { + :db => 'test', + :role => 'test', + } + end + + it { should contain_postgresql__server__grant('test') } +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/postgresql/spec/unit/defines/server/pg_hba_rule_spec.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/postgresql/spec/unit/defines/server/pg_hba_rule_spec.rb new file mode 100644 index 00000000000..b01e338a4bd --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/postgresql/spec/unit/defines/server/pg_hba_rule_spec.rb @@ -0,0 +1,161 @@ +require 'spec_helper' + +describe 'postgresql::server::pg_hba_rule', :type => :define do + let :facts do + { + :osfamily => 'Debian', + :operatingsystem => 'Debian', + :operatingsystemrelease => '6.0', + :concat_basedir => tmpfilename('pg_hba'), + } + end + let :title do + 'test' + end + let :target do + tmpfilename('pg_hba_rule') + end + + context 'test template 1' do + let :params do + { + :type => 'host', + :database => 'all', + :user => 'all', + :address => '1.1.1.1/24', + :auth_method => 'md5', + :target => target, + } + end + it do + content = param('concat::fragment', 'pg_hba_rule_test', 'content') + content.should =~ /host\s+all\s+all\s+1\.1\.1\.1\/24\s+md5/ + end + end + + context 'test template 2' do + let :params do + { + :type => 'local', + :database => 'all', + :user => 'all', + :auth_method => 'ident', + :target => target, + } + end + it do + content = param('concat::fragment', 'pg_hba_rule_test', 'content') + content.should =~ /local\s+all\s+all\s+ident/ + end + end + + context 'test template 3' do + let :params do + { + :type => 'host', + :database => 'all', + :user => 'all', + :address => '0.0.0.0/0', + :auth_method => 'ldap', + :auth_option => 'foo=bar', + :target => target, + } + end + it do + content = param('concat::fragment', 'pg_hba_rule_test', 'content') + content.should =~ /host\s+all\s+all\s+0\.0\.0\.0\/0\s+ldap\s+foo=bar/ + end + end + + context 'validation' do + context 'validate type test 1' do + let :params do + { + :type => 'invalid', + :database => 'all', + :user => 'all', + :address => '0.0.0.0/0', + :auth_method => 'ldap', + :target => target, + } + end + it 'should fail parsing when type is not valid' do + expect {subject}.to raise_error(Puppet::Error, + /The type you specified \[invalid\] must be one of/) + end + end + + context 'validate auth_method' do + let :params do + { + :type => 'local', + :database => 'all', + :user => 'all', + :address => '0.0.0.0/0', + :auth_method => 'invalid', + :target => target, + } + end + + it 'should fail parsing when auth_method is not valid' do + expect {subject}.to raise_error(Puppet::Error, + /The auth_method you specified \[invalid\] must be one of/) + end + end + + context 'validate unsupported auth_method' do + let :pre_condition do + <<-EOS + class { 'postgresql::globals': + version => '9.0', + } + class { 'postgresql::server': } + EOS + end + + let :params do + { + :type => 'local', + :database => 'all', + :user => 'all', + :address => '0.0.0.0/0', + :auth_method => 'peer', + :target => target, + } + end + + it 'should fail parsing when auth_method is not valid' do + expect {subject}.to raise_error(Puppet::Error, + /The auth_method you specified \[peer\] must be one of: trust, reject, md5, sha1, password, gss, sspi, krb5, ident, ldap, radius, cert, pam/) + end + end + + context 'validate supported auth_method' do + let :pre_condition do + <<-EOS + class { 'postgresql::globals': + version => '9.2', + } + class { 'postgresql::server': } + EOS + end + + let :params do + { + :type => 'local', + :database => 'all', + :user => 'all', + :address => '0.0.0.0/0', + :auth_method => 'peer', + :target => target, + } + end + + it do + content = param('concat::fragment', 'pg_hba_rule_test', 'content') + content.should =~ /local\s+all\s+all\s+0\.0\.0\.0\/0\s+peer/ + end + end + + end +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/postgresql/spec/unit/defines/server/role_spec.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/postgresql/spec/unit/defines/server/role_spec.rb new file mode 100644 index 00000000000..a50ca1448ce --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/postgresql/spec/unit/defines/server/role_spec.rb @@ -0,0 +1,23 @@ +require 'spec_helper' + +describe 'postgresql::server::role', :type => :define do + let :facts do + { + :osfamily => 'Debian', + :operatingsystem => 'Debian', + :operatingsystemrelease => '6.0', + } + end + + let :title do + 'test' + end + + let :params do + { + :password_hash => 'test', + } + end + + it { should contain_postgresql__server__role('test') } +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/postgresql/spec/unit/defines/server/table_grant_spec.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/postgresql/spec/unit/defines/server/table_grant_spec.rb new file mode 100644 index 00000000000..15136a71e25 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/postgresql/spec/unit/defines/server/table_grant_spec.rb @@ -0,0 +1,27 @@ +require 'spec_helper' + +describe 'postgresql::server::table_grant', :type => :define do + let :facts do + { + :osfamily => 'Debian', + :operatingsystem => 'Debian', + :operatingsystemrelease => '6.0', + } + end + + let :title do + 'test' + end + + let :params do + { + :privilege => 'ALL', + :db => 'test', + :role => 'test', + :table => 'foo', + } + end + + it { should contain_postgresql__server__table_grant('test') } + it { should contain_postgresql__server__grant('table:test') } +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/postgresql/spec/unit/defines/server/tablespace_spec.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/postgresql/spec/unit/defines/server/tablespace_spec.rb new file mode 100644 index 00000000000..eb29f1e5773 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/postgresql/spec/unit/defines/server/tablespace_spec.rb @@ -0,0 +1,23 @@ +require 'spec_helper' + +describe 'postgresql::server::tablespace', :type => :define do + let :facts do + { + :osfamily => 'Debian', + :operatingsystem => 'Debian', + :operatingsystemrelease => '6.0', + } + end + + let :title do + 'test' + end + + let :params do + { + :location => '/srv/data/foo', + } + end + + it { should contain_postgresql__server__tablespace('test') } +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/postgresql/spec/unit/defines/validate_db_connection_spec.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/postgresql/spec/unit/defines/validate_db_connection_spec.rb new file mode 100644 index 00000000000..7a248f6c09a --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/postgresql/spec/unit/defines/validate_db_connection_spec.rb @@ -0,0 +1,35 @@ +require 'spec_helper' + +describe 'postgresql::validate_db_connection', :type => :define do + let :facts do + { + :osfamily => 'Debian', + :operatingsystem => 'Debian', + :operatingsystemrelease => '6.0', + } + end + + let :title do + 'test' + end + + describe 'should work with only default parameters' do + it { should contain_postgresql__validate_db_connection('test') } + end + + describe 'should work with all parameters' do + let :params do + { + :database_host => 'test', + :database_name => 'test', + :database_password => 'test', + :database_username => 'test', + :database_port => 5432, + :run_as => 'postgresq', + :sleep => 4, + :tries => 30, + } + end + it { should contain_postgresql__validate_db_connection('test') } + end +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/postgresql/spec/unit/functions/postgresql_acls_to_resources_hash_spec.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/postgresql/spec/unit/functions/postgresql_acls_to_resources_hash_spec.rb new file mode 100644 index 00000000000..0ac1d1bfdab --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/postgresql/spec/unit/functions/postgresql_acls_to_resources_hash_spec.rb @@ -0,0 +1,137 @@ +require 'spec_helper' + +describe 'postgresql_acls_to_resources_hash', :type => :puppet_function do + context 'individual transform tests' do + it do + input = 'local all postgres ident' + result = { + "postgresql class generated rule test 0"=>{ + "type"=>"local", + "database"=>"all", + "user"=>"postgres", + "auth_method"=>"ident", + "order"=>"100", + }, + } + + should run.with_params([input], 'test', 100).and_return(result) + end + + it do + input = 'local all root ident' + result = { + "postgresql class generated rule test 0"=>{ + "type"=>"local", + "database"=>"all", + "user"=>"root", + "auth_method"=>"ident", + "order"=>"100", + }, + } + + should run.with_params([input], 'test', 100).and_return(result) + end + + it do + input_array = [ + 'local all all ident', + ] + result = { + "postgresql class generated rule test 0"=>{ + "type"=>"local", + "database"=>"all", + "user"=>"all", + "auth_method"=>"ident", + "order"=>"100", + }, + } + + should run.with_params(input_array, 'test', 100).and_return(result) + end + + it do + input = 'host all all 127.0.0.1/32 md5' + result = { + "postgresql class generated rule test 0"=>{ + "type"=>"host", + "database"=>"all", + "user"=>"all", + "address"=>"127.0.0.1/32", + "auth_method"=>"md5", + "order"=>"100", + }, + } + + should run.with_params([input], 'test', 100).and_return(result) + end + + it do + input = 'host all all 0.0.0.0/0 md5' + result = { + "postgresql class generated rule test 0"=>{ + "type"=>"host", + "database"=>"all", + "user"=>"all", + "address"=>"0.0.0.0/0", + "auth_method"=>"md5", + "order"=>"100", + }, + } + + should run.with_params([input], 'test', 100).and_return(result) + end + + it do + input = 'host all all ::1/128 md5' + result = { + "postgresql class generated rule test 0"=>{ + "type"=>"host", + "database"=>"all", + "user"=>"all", + "address"=>"::1/128", + "auth_method"=>"md5", + "order"=>"100", + }, + } + + should run.with_params([input], 'test', 100).and_return(result) + end + + it do + input = 'host all all 1.1.1.1 255.255.255.0 md5' + result = { + "postgresql class generated rule test 0"=>{ + "type"=>"host", + "database"=>"all", + "user"=>"all", + "address"=>"1.1.1.1 255.255.255.0", + "auth_method"=>"md5", + "order"=>"100", + }, + } + + should run.with_params([input], 'test', 100).and_return(result) + end + + it do + input = 'host all all 1.1.1.1 255.255.255.0 ldap ldapserver=ldap.example.net ldapprefix="cn=" ldapsuffix=", dc=example, dc=net"' + result = { + "postgresql class generated rule test 0"=>{ + "type"=>"host", + "database"=>"all", + "user"=>"all", + "address"=>"1.1.1.1 255.255.255.0", + "auth_method"=>"ldap", + "auth_option"=>"ldapserver=ldap.example.net ldapprefix=\"cn=\" ldapsuffix=\", dc=example, dc=net\"", + "order"=>"100", + }, + } + + should run.with_params([input], 'test', 100).and_return(result) + end + end + + it 'should return an empty hash when input is empty array' do + should run.with_params([], 'test', 100).and_return({}) + end +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/postgresql/spec/unit/functions/postgresql_escape_spec.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/postgresql/spec/unit/functions/postgresql_escape_spec.rb new file mode 100644 index 00000000000..ee1157d0e7f --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/postgresql/spec/unit/functions/postgresql_escape_spec.rb @@ -0,0 +1,10 @@ +require 'spec_helper' + +describe 'postgresql_escape', :type => :puppet_function do + it { should run.with_params('foo'). + and_return('$$foo$$') } +end +describe 'postgresql_escape', :type => :puppet_function do + it { should run.with_params('fo$$o'). + and_return('$ed$fo$$o$ed$') } +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/postgresql/spec/unit/functions/postgresql_password_spec.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/postgresql/spec/unit/functions/postgresql_password_spec.rb new file mode 100644 index 00000000000..0d043f87340 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/postgresql/spec/unit/functions/postgresql_password_spec.rb @@ -0,0 +1,6 @@ +require 'spec_helper' + +describe 'postgresql_password', :type => :puppet_function do + it { should run.with_params('foo', 'bar'). + and_return('md596948aad3fcae80c08a35c9b5958cd89') } +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/postgresql/spec/unit/provider/postgresql_conf/parsed_spec.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/postgresql/spec/unit/provider/postgresql_conf/parsed_spec.rb new file mode 100644 index 00000000000..2e2bfbe2d01 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/postgresql/spec/unit/provider/postgresql_conf/parsed_spec.rb @@ -0,0 +1,112 @@ +require 'spec_helper' +require "tempfile" + +provider_class = Puppet::Type.type(:postgresql_conf).provider(:parsed) + +describe provider_class do + let(:title) { 'postgresql_conf' } + let(:provider) { + conf_class = Puppet::Type.type(:postgresql_conf) + provider = conf_class.provider(:parsed) + conffile = tmpfilename('postgresql.conf') + provider.any_instance.stubs(:target).returns conffile + provider + } + + before do + end + + after :each do + provider.initvars + end + + describe "simple configuration that should be allowed" do + it "should parse a simple ini line" do + provider.parse_line("listen_addreses = '*'").should == + { :name=>"listen_addreses", :value=>"*", :comment=>nil, :record_type=>:parsed } + end + + it "should parse a simple ini line (2)" do + provider.parse_line(" listen_addreses = '*'").should == + { :name=>"listen_addreses", :value=>"*", :comment=>nil, :record_type=>:parsed } + end + + it "should parse a simple ini line (3)" do + provider.parse_line("listen_addreses = '*' # dont mind me").should == + { :name=>"listen_addreses", :value=>"*", :comment=>"dont mind me", :record_type=>:parsed } + end + + it "should parse a comment" do + provider.parse_line("# dont mind me").should == + { :line=>"# dont mind me", :record_type=>:comment } + end + + it "should parse a comment (2)" do + provider.parse_line(" \t# dont mind me").should == + { :line=>" \t# dont mind me", :record_type=>:comment } + end + + it "should allow includes" do + provider.parse_line("include puppetextra").should == + { :name=>"include", :value=>"puppetextra", :comment=>nil, :record_type=>:parsed } + end + + it "should allow numbers thorugh without quotes" do + provider.parse_line("wal_keep_segments = 32").should == + { :name=>"wal_keep_segments", :value=>"32", :comment=>nil, :record_type=>:parsed } + end + + it "should allow blanks thorugh " do + provider.parse_line("").should == + { :line=>"", :record_type=>:blank } + end + + it "should parse keys with dots " do + provider.parse_line("auto_explain.log_min_duration = 1ms").should == + { :name => "auto_explain.log_min_duration", :value => "1ms", :comment => nil, :record_type => :parsed } + end + end + + describe "configuration that should be set" do + it "should set comment lines" do + provider.to_line({ :line=>"# dont mind me", :record_type=>:comment }).should == + '# dont mind me' + end + + it "should set blank lines" do + provider.to_line({ :line=>"", :record_type=>:blank }).should == + '' + end + + it "should set simple configuration" do + provider.to_line({:name=>"listen_addresses", :value=>"*", :comment=>nil, :record_type=>:parsed }).should == + "listen_addresses = '*'" + end + + it "should set simple configuration with period in name" do + provider.to_line({:name => "auto_explain.log_min_duration", :value => '100ms', :comment => nil, :record_type => :parsed }).should == + "auto_explain.log_min_duration = 100ms" + end + + it "should set simple configuration even with comments" do + provider.to_line({:name=>"listen_addresses", :value=>"*", :comment=>'dont mind me', :record_type=>:parsed }).should == + "listen_addresses = '*' # dont mind me" + end + + it 'should quote includes' do + provider.to_line( {:name=>"include", :value=>"puppetextra", :comment=>nil, :record_type=>:parsed }).should == + "include 'puppetextra'" + end + + it 'should quote multiple words' do + provider.to_line( {:name=>"archive_command", :value=>"rsync up", :comment=>nil, :record_type=>:parsed }).should == + "archive_command = 'rsync up'" + end + + it 'shouldn\'t quote numbers' do + provider.to_line( {:name=>"wal_segments", :value=>"32", :comment=>nil, :record_type=>:parsed }).should == + "wal_segments = 32" + end + end +end + diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/postgresql/spec/unit/puppet/provider/postgresql_psql/ruby_spec.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/postgresql/spec/unit/puppet/provider/postgresql_psql/ruby_spec.rb new file mode 100644 index 00000000000..325e3dbd4bb --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/postgresql/spec/unit/puppet/provider/postgresql_psql/ruby_spec.rb @@ -0,0 +1,140 @@ +require 'spec_helper' + +describe Puppet::Type.type(:postgresql_psql).provider(:ruby) do + let(:name) { 'rspec psql test' } + let(:resource) do + Puppet::Type.type(:postgresql_psql).new({ :name => name, :provider => :ruby }.merge attributes) + end + + let(:provider) { resource.provider } + + context("#run_sql_command") do + describe "with default attributes" do + let(:attributes) do { :db => 'spec_db' } end + + it "executes with the given psql_path on the given DB" do + expect(provider).to receive(:run_command).with(['psql', '-d', + attributes[:db], '-t', '-c', 'SELECT something'], 'postgres', + 'postgres') + + provider.run_sql_command("SELECT something") + end + end + describe "with psql_path and db" do + let(:attributes) do { + :psql_path => '/opt/postgres/psql', + :psql_user => 'spec_user', + :psql_group => 'spec_group', + :cwd => '/spec', + :db => 'spec_db' + } end + + it "executes with the given psql_path on the given DB" do + expect(Dir).to receive(:chdir).with(attributes[:cwd]).and_yield + expect(provider).to receive(:run_command).with([attributes[:psql_path], + '-d', attributes[:db], '-t', '-c', 'SELECT something'], + attributes[:psql_user], attributes[:psql_group]) + + provider.run_sql_command("SELECT something") + end + end + describe "with search_path string" do + let(:attributes) do { + :search_path => "schema1" + } end + + it "executes with the given search_path" do + expect(provider).to receive(:run_command).with(['psql', '-t', '-c', + 'set search_path to schema1; SELECT something'], + 'postgres', 'postgres') + + provider.run_sql_command("SELECT something") + end + end + describe "with search_path array" do + let(:attributes) do { + :search_path => ['schema1','schema2'], + } end + + it "executes with the given search_path" do + expect(provider).to receive(:run_command).with(['psql', '-t', '-c', + 'set search_path to schema1,schema2; SELECT something'], + 'postgres', + 'postgres' + ) + + provider.run_sql_command("SELECT something") + end + end + + end + + context("#command") do + context "when unless is specified" do + [:true, :false, true, false].each do |refresh| + context "and refreshonly is #{refresh}" do + let(:attributes) { { + :command => 'SELECT something', + :db => 'spec_db', + :unless => 'SELECT something', + :refreshonly => refresh + } } + + it "does not fail when the status is successful" do + expect(provider).to receive(:run_unless_sql_command).and_return ["1 row returned", 0] + provider.command + end + + it "returns the given command when rows are returned" do + expect(provider).to receive(:run_unless_sql_command).and_return ["1 row returned", 0] + expect(provider.command).to eq("SELECT something") + end + + it "does not return the given command when no rows are returned" do + expect(provider).to receive(:run_unless_sql_command).and_return ["0 rows returned", 0] + expect(provider.command).to_not eq("SELECT something") + end + + it "raises an error when the sql command fails" do + allow(provider).to receive(:run_unless_sql_command).and_return ["Something went wrong", 1] + expect { provider.command }.to raise_error(Puppet::Error, /Something went wrong/) + end + end + end + end + + context "when unless is not specified" do + context "and refreshonly is true" do + let(:attributes) do { + :command => 'SELECT something', + :db => 'spec_db', + :refreshonly => :true + } end + it "does not run unless sql command" do + expect(provider).to_not receive(:run_unless_sql_command) + provider.command + end + + it "returns the given command do disable sync" do + expect(provider.command).to eq("SELECT something") + end + end + + context "and refreshonly is false" do + let(:attributes) do { + :command => 'SELECT something', + :db => 'spec_db', + :refreshonly => :false + } end + it "does not run unless sql command" do + expect(provider).to_not receive(:run_unless_sql_command) + provider.command + end + + it "does not return the command so as to enable sync" do + expect(provider.command).to_not eq("SELECT something") + end + end + end + end +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/postgresql/spec/unit/puppet/type/postgresql_psql_spec.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/postgresql/spec/unit/puppet/type/postgresql_psql_spec.rb new file mode 100644 index 00000000000..e89c05fedf8 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/postgresql/spec/unit/puppet/type/postgresql_psql_spec.rb @@ -0,0 +1,92 @@ +require 'spec_helper' + +describe Puppet::Type.type(:postgresql_psql), "when validating attributes" do + [:name, :unless, :db, :psql_path, :psql_user, :psql_group].each do |attr| + it "should have a #{attr} parameter" do + expect(Puppet::Type.type(:postgresql_psql).attrtype(attr)).to eq(:param) + end + end + + [:command].each do |attr| + it "should have a #{attr} property" do + expect(Puppet::Type.type(:postgresql_psql).attrtype(attr)).to eq(:property) + end + end +end + +describe Puppet::Type.type(:postgresql_psql), :unless => Puppet.features.microsoft_windows? do + subject do + Puppet::Type.type(:postgresql_psql).new({:name => 'rspec'}.merge attributes) + end + + describe "available attributes" do + { + :name => "rspec", + :command => "SELECT stuff", + :unless => "SELECT other,stuff", + :db => "postgres", + :psql_path => "/bin/false", + :psql_user => "postgres", + :psql_group => "postgres", + :cwd => "/var/lib", + :refreshonly => :true, + :search_path => [ "schema1", "schema2"] + }.each do |attr, value| + context attr do + let(:attributes) do { attr => value } end + its([attr]) { should == value } + end + end + + context "default values" do + let(:attributes) do {} end + its([:psql_path]) { should eq("psql") } + its([:psql_user]) { should eq("postgres") } + its([:psql_group]) { should eq("postgres") } + its([:cwd]) { should eq("/tmp") } + its(:refreshonly?) { should be_false } + end + end + + describe "#refreshonly" do + [true, :true].each do |refreshonly| + context "=> #{refreshonly.inspect}" do + let(:attributes) do { :refreshonly => refreshonly } end + it "has a value of true" do + expect(subject.refreshonly?).to be_true + end + it "will not enforce command on sync because refresh() will be called" do + expect(subject.provider).to_not receive(:command=) + subject.property(:command).sync + end + end + end + + [false, :false].each do |refreshonly| + context "=> #{refreshonly.inspect}" do + let(:attributes) do { :refreshonly => refreshonly } end + it "has a value of false" do + expect(subject.refreshonly?).to be_false + end + it "will enforce command on sync because refresh() will not be called" do + expect(subject.provider).to receive(:command=) + subject.property(:command).sync + end + end + end + end + + ## If we refresh the resource, the command should always be run regardless of + ## refreshonly + describe "when responding to refresh" do + [true, :true, false, :false].each do |refreshonly| + context "with refreshonly => #{refreshonly.inspect}" do + let(:attributes) do { :refreshonly => refreshonly } end + it "will enforce command on sync" do + expect(subject.provider).to receive(:command=) + subject.refresh + end + end + end + end +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/postgresql/spec/unit/type/postgresql_conf_spec.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/postgresql/spec/unit/type/postgresql_conf_spec.rb new file mode 100644 index 00000000000..45242033a09 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/postgresql/spec/unit/type/postgresql_conf_spec.rb @@ -0,0 +1,50 @@ +#! /usr/bin/env ruby +require 'spec_helper' + +describe Puppet::Type.type(:postgresql_conf) do + before do + @provider_class = described_class.provide(:simple) { mk_resource_methods } + @provider_class.stubs(:suitable?).returns true + described_class.stubs(:defaultprovider).returns @provider_class + end + + describe "namevar validation" do + it "should have :name as its namevar" do + described_class.key_attributes.should == [:name] + end + it "should not invalid names" do + expect { described_class.new(:name => 'foo bar') }.to raise_error(Puppet::Error, /Invalid value/) + end + it "should allow dots in names" do + expect { described_class.new(:name => 'foo.bar') }.to_not raise_error + end + end + + describe "when validating attributes" do + [:name, :provider].each do |param| + it "should have a #{param} parameter" do + described_class.attrtype(param).should == :param + end + end + + [:value, :target].each do |property| + it "should have a #{property} property" do + described_class.attrtype(property).should == :property + end + end + end + + describe "when validating values" do + describe "ensure" do + it "should support present as a value for ensure" do + expect { described_class.new(:name => 'foo', :ensure => :present) }.to_not raise_error + end + it "should support absent as a value for ensure" do + expect { described_class.new(:name => 'foo', :ensure => :absent) }.to_not raise_error + end + it "should not support other values" do + expect { described_class.new(:name => 'foo', :ensure => :foo) }.to raise_error(Puppet::Error, /Invalid value/) + end + end + end +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/postgresql/templates/pg_hba_rule.conf b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/postgresql/templates/pg_hba_rule.conf new file mode 100644 index 00000000000..af54db5b2a9 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/postgresql/templates/pg_hba_rule.conf @@ -0,0 +1,5 @@ + +# Rule Name: <%=@name%> +# Description: <%=@description%> +# Order: <%=@order%> +<%=@type%> <%=@database%> <%=@user%> <%=@address%> <%=@auth_method%> <%=@auth_option%> diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/puphpet/LICENSE b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/puphpet/LICENSE new file mode 100644 index 00000000000..9914a458b9a --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/puphpet/LICENSE @@ -0,0 +1,22 @@ +The MIT License (MIT) + +Copyright (c) 2013 Juan Treminio and other contributors +https://puphpet.com + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/puphpet/README.md b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/puphpet/README.md new file mode 100644 index 00000000000..6f3403c1b35 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/puphpet/README.md @@ -0,0 +1,3 @@ +# Puppet module: puphpet + +This is a Puppet module for [PuPHPet](https://puphpet.com)-related code diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/puphpet/files/xdebug_cli_alias.erb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/puphpet/files/xdebug_cli_alias.erb new file mode 100644 index 00000000000..4d0967e8880 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/puphpet/files/xdebug_cli_alias.erb @@ -0,0 +1,2 @@ +#!/bin/bash +XDEBUG_CONFIG="idekey=xdebug" php -dxdebug.remote_host=`echo $SSH_CLIENT | cut -d "=" -f 2 | awk '{print $1}'` "$@" diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/puphpet/lib/puppet/parser/functions/hash_key_equals.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/puphpet/lib/puppet/parser/functions/hash_key_equals.rb new file mode 100644 index 00000000000..118c4b64870 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/puphpet/lib/puppet/parser/functions/hash_key_equals.rb @@ -0,0 +1,36 @@ +# +# hash_key_equals.rb +# + +module Puppet::Parser::Functions + + newfunction(:hash_key_equals, :type => :rvalue, :doc => <<-'ENDHEREDOC') do |args| + + Returns true if the variable passed to this function is a hash, + it contains the key requested, and the key matches value. + ENDHEREDOC + + unless args.length == 3 + raise Puppet::ParseError, ("hash_key_equals(): wrong number of arguments (#{args.length}; must be 3)") + end + + hashVar = args[0] + keyVar = args[1] + expectedValue = args[2] + + unless hashVar.is_a?(Hash) + return false + end + + unless hashVar.has_key?(keyVar) + return false + end + + unless hashVar[keyVar].to_i == expectedValue.to_i + return false + end + + return true + + end +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/puphpet/manifests/adminer.pp b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/puphpet/manifests/adminer.pp new file mode 100644 index 00000000000..0d23275bcca --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/puphpet/manifests/adminer.pp @@ -0,0 +1,23 @@ +class puphpet::adminer( + $location, + $owner = 'www-data', + $php_package = 'php' +) { + + if ! defined(File[$location]) { + file { $location: + replace => no, + ensure => directory, + mode => 775, + require => Package[$php_package] + } + } + + exec{ "download adminer to ${location}": + command => "wget http://www.adminer.org/latest.php -O ${location}/index.php", + require => File[$location], + creates => "${location}/index.php", + returns => [ 0, 4 ], + } + +} diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/puphpet/manifests/apache/modpagespeed.pp b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/puphpet/manifests/apache/modpagespeed.pp new file mode 100644 index 00000000000..95979499049 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/puphpet/manifests/apache/modpagespeed.pp @@ -0,0 +1,50 @@ +# This depends on puppetlabs/apache: https://github.com/puppetlabs/puppetlabs-apache + +class puphpet::apache::modpagespeed ( + $url = $puphpet::params::apache_mod_pagespeed_url, + $package = $puphpet::params::apache_mod_pagespeed_package, + $ensure = 'present' +) { + + $download_location = $::osfamily ? { + 'Debian' => '/.puphpet-stuff/mod-pagespeed.deb', + 'Redhat' => '/.puphpet-stuff/mod-pagespeed.rpm' + } + + $provider = $::osfamily ? { + 'Debian' => 'dpkg', + 'Redhat' => 'yum' + } + + exec { "download apache mod-pagespeed to ${download_location}": + creates => $download_location, + command => "wget ${url} -O ${download_location}", + timeout => 30, + path => '/usr/bin' + } + + package { $package: + ensure => $ensure, + provider => $provider, + source => $download_location, + notify => Service['httpd'] + } + + file { [ + "${apache::params::mod_dir}/pagespeed.load", + "${apache::params::mod_dir}/pagespeed.conf", + "${apache::params::confd_dir}/pagespeed_libraries.conf" + ] : + purge => false, + } + + if $apache::params::mod_enable_dir != undef { + file { [ + "${apache::params::mod_enable_dir}/pagespeed.load", + "${apache::params::mod_enable_dir}/pagespeed.conf" + ] : + purge => false, + } + } + +} diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/puphpet/manifests/apache/modspdy.pp b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/puphpet/manifests/apache/modspdy.pp new file mode 100644 index 00000000000..6cee775b50e --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/puphpet/manifests/apache/modspdy.pp @@ -0,0 +1,86 @@ +# This depends on puppetlabs/apache: https://github.com/puppetlabs/puppetlabs-apache + +class puphpet::apache::modspdy ( + $url = $puphpet::params::apache_mod_spdy_url, + $package = $puphpet::params::apache_mod_spdy_package, + $php_package = 'php', + $ensure = 'present' +) { + + class { 'apache::mod::php': + package_ensure => 'purged' + } + + if $php_package == 'php' and ! defined(Package[$puphpet::params::apache_mod_spdy_cgi]) { + package { $puphpet::params::apache_mod_spdy_cgi: + ensure => present, + notify => Service[$apache::params::service_name] + } + } + + if ! defined(Class['apache::mod::fastcgi']) { + class { 'apache::mod::fastcgi': } + } + + if ! defined(Class['apache::mod::cgi']) { + class { 'apache::mod::cgi': } + } + + $download_location = $::osfamily ? { + 'Debian' => '/.puphpet-stuff/mod-spdy.deb', + 'Redhat' => '/.puphpet-stuff/mod-spdy.rpm' + } + + $provider = $::osfamily ? { + 'Debian' => 'dpkg', + 'Redhat' => 'yum' + } + + exec { "download apache mod-spdy to ${download_location}": + creates => $download_location, + command => "wget ${url} -O ${download_location}", + timeout => 30, + path => '/usr/bin' + } + + package { $package: + ensure => $ensure, + provider => $provider, + source => $download_location, + notify => Service[$apache::params::service_name] + } + + file { [ + "${apache::params::mod_dir}/spdy.load", + "${apache::params::mod_dir}/spdy.conf", + "${apache::params::mod_dir}/php5filter.conf" + ] : + purge => false, + } + + if $apache::params::mod_enable_dir != undef { + file { [ + "${apache::params::mod_enable_dir}/spdy.load", + "${apache::params::mod_enable_dir}/spdy.conf", + "${apache::params::mod_enable_dir}/php5filter.conf" + ] : + purge => false, + } + } + + file { "${apache::params::confd_dir}/spdy.conf": + content => template("${module_name}/apache/mod/spdy/spdy_conf.erb"), + ensure => $ensure, + purge => false, + require => Package[$package] + } + + file { '/usr/local/bin/php-wrapper': + content => template("${module_name}/apache/mod/spdy/php-wrapper.erb"), + ensure => $ensure, + mode => 0775, + purge => false, + require => Package[$package] + } + +} diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/puphpet/manifests/hhvm.pp b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/puphpet/manifests/hhvm.pp new file mode 100644 index 00000000000..90083232cdc --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/puphpet/manifests/hhvm.pp @@ -0,0 +1,125 @@ +# This depends on +# puppetlabs/apt: https://github.com/puppetlabs/puppetlabs-apt +# example42/puppet-yum: https://github.com/example42/puppet-yum +# puppetlabs/puppetlabs-apache: https://github.com/puppetlabs/puppetlabs-apache (if apache) + +class puphpet::hhvm( + $nightly = false, + $webserver +) { + + $real_webserver = $webserver ? { + 'apache' => 'apache2', + 'httpd' => 'apache2', + 'apache2' => 'apache2', + 'nginx' => 'nginx', + 'fpm' => 'fpm', + 'cgi' => 'cgi', + 'fcgi' => 'cgi', + 'fcgid' => 'cgi', + undef => undef, + } + + if $nightly == true { + $package_name_base = $puphpet::params::hhvm_package_name_nightly + } else { + $package_name_base = $puphpet::params::hhvm_package_name + } + + if $nightly == true and $::osfamily == 'Redhat' { + warning('HHVM-nightly is not available for RHEL distros. Falling back to normal release') + } + + case $::operatingsystem { + 'debian': { + if $::lsbdistcodename != 'wheezy' { + fail('Sorry, HHVM currently only works with Debian 7+.') + } + + $sources_list = '/etc/apt/sources.list' + + $deb_srcs = [ + 'deb http://http.us.debian.org/debian wheezy main', + 'deb-src http://http.us.debian.org/debian wheezy main', + 'deb http://security.debian.org/ wheezy/updates main', + 'deb-src http://security.debian.org/ wheezy/updates main', + 'deb http://http.us.debian.org/debian wheezy-updates main', + 'deb-src http://http.us.debian.org/debian wheezy-updates main' + ] + + each( $deb_srcs ) |$value| { + exec { "add contrib non-free to ${value}": + cwd => '/etc/apt', + command => "perl -p -i -e 's#${value}#${value} contrib non-free#gi' ${sources_list}", + unless => "grep -Fxq '${value} contrib non-free' ${sources_list}", + path => [ '/bin/', '/sbin/', '/usr/bin/', '/usr/sbin/' ], + notify => Exec['apt_update'] + } + } + } + 'ubuntu': { + if ! ($lsbdistcodename in ['precise', 'raring', 'trusty']) { + fail('Sorry, HHVM currently only works with Ubuntu 12.04, 13.10 and 14.04.') + } + + apt::key { '5D50B6BA': key_server => 'hkp://keyserver.ubuntu.com:80' } + + if $lsbdistcodename in ['lucid', 'precise'] { + apt::ppa { 'ppa:mapnik/boost': require => Apt::Key['5D50B6BA'], options => '' } + } + } + 'centos': { + yum::managed_yumrepo { 'hop5': + descr => 'hop5 repository', + baseurl => 'http://www.hop5.in/yum/el6/', + gpgkey => 'file:///etc/pki/rpm-gpg/RPM-GPG-KEY-HOP5', + enabled => 1, + gpgcheck => 0, + priority => 1 + } + } + } + + if $real_webserver == 'apache2' { + if ! defined(Class['apache::mod::mime']) { + class { 'apache::mod::mime': } + } + if ! defined(Class['apache::mod::fastcgi']) { + class { 'apache::mod::fastcgi': } + } + if ! defined(Class['apache::mod::alias']) { + class { 'apache::mod::alias': } + } + if ! defined(Class['apache::mod::proxy']) { + class { 'apache::mod::proxy': } + } + if ! defined(Class['apache::mod::proxy_http']) { + class { 'apache::mod::proxy_http': } + } + if ! defined(Apache::Mod['actions']) { + apache::mod{ 'actions': } + } + } + + $os = downcase($::operatingsystem) + + case $::osfamily { + 'debian': { + apt::key { 'hhvm': + key => '16d09fb4', + key_source => 'http://dl.hhvm.com/conf/hhvm.gpg.key', + } + + apt::source { 'hhvm': + location => "http://dl.hhvm.com/${os}", + repos => 'main', + required_packages => 'debian-keyring debian-archive-keyring', + include_src => false, + require => Apt::Key['hhvm'] + } + } + } + + ensure_packages( [ $package_name_base ] ) + +} diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/puphpet/manifests/ini.pp b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/puphpet/manifests/ini.pp new file mode 100644 index 00000000000..50f471bacbe --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/puphpet/manifests/ini.pp @@ -0,0 +1,305 @@ +# Defines where we can expect PHP ini files and paths to be located. +# +# Different OS, OS version, webserver and PHP versions all contributes +# to making a mess of where we can expect INI files to be found. +# +# I have listed a bunch of places: +# +# 5.3 +# DEBIAN 6 - squeeze +# CLI +# /etc/php5/cli/conf.d -> /etc/php5/conf.d +# APACHE +# FOLDERS: apache2/ cli/ conf.d/ php.ini +# /etc/php5/apache2/conf.d -> /etc/php5/conf.d +# NGINX +# FOLDERS: cli/ conf.d/ fpm/ +# /etc/php5/fpm/conf.d -> /etc/php5/conf.d +# DEBIAN 7 - wheezy +# APACHE +# NOT CORRECT; PHP 5.4 INSTALLED +# NGINX +# NOT CORRECT; PHP 5.4 INSTALLED +# UBUNTU 10.04 - lucid +# CLI +# /etc/php5/cli/conf.d -> /etc/php5/conf.d +# APACHE +# FOLDERS: apache2/ cli/ conf.d/ php.ini +# /etc/php5/apache2/conf.d -> /etc/php5/conf.d +# NGINX +# FOLDERS: cli/ conf.d/ fpm/ +# /etc/php5/fpm/conf.d -> /etc/php5/conf.d +# UBUNTU 12.04 - precise +# CLI +# /etc/php5/cli/conf.d -> /etc/php5/conf.d +# APACHE +# FOLDERS: apache2/ cli/ conf.d/ php.ini +# /etc/php5/apache2/conf.d -> /etc/php5/conf.d +# NGINX +# FOLDERS: cli/ conf.d/ fpm/ +# /etc/php5/fpm/conf.d -> /etc/php5/conf.d +# UBUNTU 14.04 - trusty +# APACHE +# NOT CORRECT; PHP 5.5 INSTALLED +# NGINX +# NOT CORRECT; PHP 5.5 INSTALLED +# 5.4 +# CENTOS 6 +# CLI +# /etc/php.d +# APACHE +# /etc/php.d +# DEBIAN 6 - squeeze +# CLI +# /etc/php5/cli/conf.d -> /etc/php5/conf.d/* -> /etc/php5/mods-available/* +# APACHE +# FOLDERS: apache2/ cli/ conf.d/ mods-available/ php.ini +# /etc/php5/apache2/conf.d -> /etc/php5/conf.d/* -> /etc/php5/mods-available/* +# NGINX +# FOLDERS: cli/ conf.d/ fpm/ mods-available/ +# /etc/php5/fpm/conf.d -> /etc/php5/conf.d/* -> /etc/php5/mods-available/* +# DEBIAN 7 - wheezy +# CLI +# /etc/php5/cli/conf.d -> /etc/php5/conf.d/* -> /etc/php5/mods-available/* +# APACHE +# FOLDERS: apache2/ cli/ conf.d/ mods-available/ php.ini +# /etc/php5/apache2/conf.d -> /etc/php5/conf.d/* -> /etc/php5/mods-available/* +# NGINX +# FOLDERS: cli/ conf.d/ fpm/ mods-available/ +# /etc/php5/fpm/conf.d -> /etc/php5/conf.d/* -> /etc/php5/mods-available/* +# UBUNTU 10.04 - lucid +# CLI +# /etc/php5/cli/conf.d -> /etc/php5/conf.d/* -> /etc/php5/mods-available/* +# APACHE +# FOLDERS: apache2/ cli/ conf.d/ mods-available/ php.ini +# /etc/php5/apache2/conf.d -> /etc/php5/conf.d/* -> /etc/php5/mods-available/* +# NGINX +# FOLDERS: cli/ conf.d/ fpm/ mods-available/ +# /etc/php5/fpm/conf.d -> /etc/php5/conf.d/* -> /etc/php5/mods-available/* +# UBUNTU 12.04 - precise +# CLI +# /etc/php5/cli/conf.d -> /etc/php5/conf.d/* -> /etc/php5/mods-available/* +# APACHE +# FOLDERS: apache2/ cli/ conf.d/ mods-available/ php.ini +# /etc/php5/apache2/conf.d -> /etc/php5/conf.d/* -> /etc/php5/mods-available/* +# NGINX +# FOLDERS: cli/ conf.d/ fpm/ mods-available/ +# /etc/php5/fpm/conf.d -> /etc/php5/conf.d/* -> /etc/php5/mods-available/* +# UBUNTU 14.04 - trusty +# APACHE +# NOT CORRECT; PHP 5.5 INSTALLED +# NGINX +# NOT CORRECT; PHP 5.5 INSTALLED +# 5.5 +# DEBIAN 6 - squeeze +# APACHE +# NOT A VALID OPTION +# NGINX +# NOT A VALID OPTION +# DEBIAN 7 - wheezy +# CLI +# /etc/php5/cli/conf.d/* -> /etc/php5/mods-available/* +# APACHE +# FOLDERS: apache2/ cli/ mods-available/ php.ini +# /etc/php5/apache2/conf.d/* -> /etc/php5/mods-available/* +# NGINX +# FOLDERS: cli/ fpm/ mods-available/ +# /etc/php5/fpm/conf.d/* -> /etc/php5/mods-available/* +# UBUNTU 10.04 - lucid +# APACHE +# NOT A VALID OPTION +# NGINX +# NOT A VALID OPTION +# UBUNTU 12.04 - precise +# CLI +# /etc/php5/cli/conf.d/* -> /etc/php5/mods-available/* +# APACHE +# FOLDERS: cli/ apache2/ mods-available/ +# /etc/php5/apache2/conf.d/* -> /etc/php5/mods-available/* +# NGINX +# FOLDERS: cli/ fpm/ mods-available/ +# /etc/php5/fpm/conf.d/* -> /etc/php5/mods-available/* +# UBUNTU 14.04 - trusty +# CLI +# /etc/php5/cli/conf.d/* -> /etc/php5/conf.d/* +# APACHE +# FOLDERS: apache2/ cli/ mods-available/ php.ini +# /etc/php5/cli/conf.d/* -> /etc/php5/mods-available/* +# /etc/php5/apache2/conf.d/* -> /etc/php5/mods-available/* +# NGINX +# FOLDERS: cli/ fpm/ mods-available/ +# /etc/php5/cli/conf.d/* -> /etc/php5/mods-available/* +# /etc/php5/fpm/conf.d/* -> /etc/php5/mods-available/* +# +# This depends on example42/puppet-php: https://github.com/example42/puppet-php +# +define puphpet::ini ( + $php_version, + $webserver, + $ini_filename = 'zzzz_custom.ini', + $entry, + $value = '', + $ensure = present + ) { + + $real_webserver = $webserver ? { + 'apache' => 'apache2', + 'httpd' => 'apache2', + 'apache2' => 'apache2', + 'nginx' => 'fpm', + 'php5-fpm' => 'fpm', + 'php-fpm' => 'fpm', + 'fpm' => 'fpm', + 'cgi' => 'cgi', + 'fcgi' => 'cgi', + 'fcgid' => 'cgi', + undef => undef, + } + + case $php_version { + '5.3', '53': { + case $::osfamily { + 'debian': { + $target_dir = '/etc/php5/conf.d' + $target_file = "${target_dir}/${ini_filename}" + + if ! defined(File[$target_file]) { + file { $target_file: + replace => no, + ensure => present, + require => Package['php'] + } + } + } + 'redhat': { + $target_dir = '/etc/php.d' + $target_file = "${target_dir}/${ini_filename}" + + if ! defined(File[$target_file]) { + file { $target_file: + replace => no, + ensure => present, + require => Package['php'] + } + } + } + default: { fail('This OS has not yet been defined for PHP 5.3!') } + } + } + '5.4', '54': { + case $::osfamily { + 'debian': { + $target_dir = '/etc/php5/mods-available' + $target_file = "${target_dir}/${ini_filename}" + + if ! defined(File[$target_file]) { + file { $target_file: + replace => no, + ensure => present, + require => Package['php'] + } + } + + $symlink = "/etc/php5/conf.d/${ini_filename}" + + if ! defined(File[$symlink]) { + file { $symlink: + ensure => link, + target => $target_file, + require => File[$target_file], + } + } + } + 'redhat': { + $target_dir = '/etc/php.d' + $target_file = "${target_dir}/${ini_filename}" + + if ! defined(File[$target_file]) { + file { $target_file: + replace => no, + ensure => present, + require => Package['php'] + } + } + } + default: { fail('This OS has not yet been defined for PHP 5.4!') } + } + } + '5.5', '55': { + case $::osfamily { + 'debian': { + $target_dir = '/etc/php5/mods-available' + $target_file = "${target_dir}/${ini_filename}" + + $webserver_ini_location = $real_webserver ? { + 'apache2' => '/etc/php5/apache2/conf.d', + 'cgi' => '/etc/php5/cgi/conf.d', + 'fpm' => '/etc/php5/fpm/conf.d', + undef => undef, + } + $cli_ini_location = '/etc/php5/cli/conf.d' + + if ! defined(File[$target_file]) { + file { $target_file: + replace => no, + ensure => present, + require => Package['php'] + } + } + + if $webserver_ini_location != undef and ! defined(File["${webserver_ini_location}/${ini_filename}"]) { + file { "${webserver_ini_location}/${ini_filename}": + ensure => link, + target => $target_file, + require => File[$target_file], + } + } + + if ! defined(File["${cli_ini_location}/${ini_filename}"]) { + file { "${cli_ini_location}/${ini_filename}": + ensure => link, + target => $target_file, + require => File[$target_file], + } + } + } + 'redhat': { + $target_dir = '/etc/php.d' + $target_file = "${target_dir}/${ini_filename}" + + if ! defined(File[$target_file]) { + file { $target_file: + replace => no, + ensure => present, + require => Package['php'] + } + } + } + default: { fail('This OS has not yet been defined for PHP 5.5!') } + } + } + default: { fail('Unrecognized PHP version') } + } + + if $real_webserver != undef { + if $real_webserver == 'cgi' { + $webserver_service = 'apache2' + } else { + $webserver_service = $webserver + } + + $notify_service = Service[$webserver_service] + } else { + $notify_service = [] + } + + php::augeas{ "${entry}-${value}" : + target => $target_file, + entry => $entry, + value => $value, + ensure => $ensure, + require => File[$target_file], + notify => $notify_service, + } + +} diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/puphpet/manifests/init.pp b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/puphpet/manifests/init.pp new file mode 100644 index 00000000000..17c999a761b --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/puphpet/manifests/init.pp @@ -0,0 +1 @@ +class puphpet inherits puphpet::params {} diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/puphpet/manifests/mariadb.pp b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/puphpet/manifests/mariadb.pp new file mode 100644 index 00000000000..e68968f5437 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/puphpet/manifests/mariadb.pp @@ -0,0 +1,50 @@ +# This depends on +# puppetlabs/apt: https://github.com/puppetlabs/puppetlabs-apt +# example42/puppet-yum: https://github.com/example42/puppet-yum + +class puphpet::mariadb( + $distro = $::operatingsystem, + $release = $::lsbdistcodename, + $arch = $::architecture, + $version = '10.0', + $url = $puphpet::params::apache_mod_pagespeed_url, + $package = $puphpet::params::apache_mod_pagespeed_package +) { + + $arch_package_name = $::architecture ? { + 'i386' => 'x86', + 'amd64' => 'amd64', + 'x86_64' => 'amd64' + } + + case $::osfamily { + 'debian': { + $os = downcase($::operatingsystem) + + apt::source { 'mariadb': + location => "http://mirror.jmu.edu/pub/mariadb/repo/${version}/${os}", + release => $release, + repos => 'main', + required_packages => 'debian-keyring debian-archive-keyring', + key => '1BB943DB', + key_server => 'keyserver.ubuntu.com', + include_src => true + } + + apt::pin { 'mariadb': + packages => '*', + priority => 1000, + origin => 'mirror.jmu.edu', + } + } + 'redhat': { + yum::managed_yumrepo { 'MariaDB': + descr => 'MariaDB - mariadb.org', + baseurl => "http://yum.mariadb.org/${version}/centos6-${arch_package_name}", + enabled => 1, + gpgcheck => 0, + priority => 1 + } + } + } +} diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/puphpet/manifests/nginx.pp b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/puphpet/manifests/nginx.pp new file mode 100644 index 00000000000..7a28797dfa8 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/puphpet/manifests/nginx.pp @@ -0,0 +1,38 @@ +class puphpet::nginx( + $fastcgi_pass = '127.0.0.1:9000', + $webroot = $puphpet::params::nginx_webroot_location +) inherits puphpet::params { + + $conf_file = $::osfamily ? { + 'debian' => '/etc/nginx/conf.d/default.conf', + 'redhat' => '/etc/nginx/conf.d/default.conf', + default => '/etc/nginx/conf.d/default.conf', + } + + file { [ + '/var/log', + '/var/log/nginx', + '/var/log/nginx/log' + ]: + ensure => directory, + recurse => true, + } + + file { [ + '/var/log/nginx/log/host.access.log', + '/var/log/nginx/log/host.error.log' + ]: + ensure => present, + mode => 0777, + replace => 'no', + require => File['/var/log/nginx/log'] + } + + file {"${conf_file} puphpet::nginx override": + ensure => present, + path => $conf_file, + replace => 'yes', + content => template('puphpet/nginx/default_conf.erb') + } + +} diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/puphpet/manifests/params.pp b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/puphpet/manifests/params.pp new file mode 100644 index 00000000000..1a998e9271b --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/puphpet/manifests/params.pp @@ -0,0 +1,87 @@ +class puphpet::params { + + $xdebug_package = $::osfamily ? { + 'Debian' => 'php5-xdebug', + 'Redhat' => 'php-pecl-xdebug' + } + + $xhprof_package = $::osfamily ? { + 'Debian' => $::operatingsystem ? { + 'ubuntu' => false, + 'debian' => 'php5-xhprof' + }, + 'Redhat' => 'xhprof' + } + + $apache_webroot_location = $::osfamily ? { + 'Debian' => '/var/www', + 'Redhat' => '/var/www/html' + } + + $apache_mod_pagespeed_url = $::osfamily ? { + 'Debian' => $::architecture ? { + 'i386' => 'https://dl-ssl.google.com/dl/linux/direct/mod-pagespeed-stable_current_i386.deb', + 'amd64' => 'https://dl-ssl.google.com/dl/linux/direct/mod-pagespeed-stable_current_amd64.deb', + 'x86_64' => 'https://dl-ssl.google.com/dl/linux/direct/mod-pagespeed-stable_current_amd64.deb' + }, + 'Redhat' => $::architecture ? { + 'i386' => 'https://dl-ssl.google.com/dl/linux/direct/mod-pagespeed-stable_current_i386.rpm', + 'amd64' => 'https://dl-ssl.google.com/dl/linux/direct/mod-pagespeed-stable_current_x86_64.rpm', + 'x86_64' => 'https://dl-ssl.google.com/dl/linux/direct/mod-pagespeed-stable_current_x86_64.rpm' + }, + } + + $apache_mod_pagespeed_package = 'mod-pagespeed-stable' + + $apache_mod_spdy_url = $::osfamily ? { + 'Debian' => $::architecture ? { + 'i386' => 'https://dl-ssl.google.com/dl/linux/direct/mod-spdy-beta_current_i386.deb', + 'amd64' => 'https://dl-ssl.google.com/dl/linux/direct/mod-spdy-beta_current_amd64.deb', + 'x86_64' => 'https://dl-ssl.google.com/dl/linux/direct/mod-spdy-beta_current_amd64.deb' + }, + 'Redhat' => $::architecture ? { + 'i386' => 'https://dl-ssl.google.com/dl/linux/direct/mod-spdy-beta_current_i386.rpm', + 'amd64' => 'https://dl-ssl.google.com/dl/linux/direct/mod-spdy-beta_current_x86_64.rpm', + 'x86_64' => 'https://dl-ssl.google.com/dl/linux/direct/mod-spdy-beta_current_x86_64.rpm' + }, + } + + $apache_mod_spdy_package = 'mod-spdy-beta' + + $apache_mod_spdy_cgi = $::osfamily ? { + 'Debian' => 'php5-cgi', + 'Redhat' => 'php-cgi' + } + + $nginx_webroot_location = $::osfamily ? { + 'Debian' => '/var/www/html', + 'Redhat' => '/usr/share/nginx/html' + } + + $mariadb_package_client_name = $::osfamily ? { + 'Debian' => 'mariadb-client', + 'Redhat' => 'MariaDB-client', + } + + $mariadb_package_server_name = $::osfamily ? { + 'Debian' => 'mariadb-server', + 'Redhat' => 'MariaDB-server', + } + + $hhvm_package_name = 'hhvm' + $hhvm_package_name_nightly = $::osfamily ? { + 'Debian' => 'hhvm-nightly', + 'Redhat' => 'hhvm' + } + + $ssl_cert_location = $::osfamily ? { + 'Debian' => '/etc/ssl/certs/ssl-cert-snakeoil.pem', + 'Redhat' => '/etc/ssl/certs/ssl-cert-snakeoil' + } + + $ssl_key_location = $::osfamily ? { + 'Debian' => '/etc/ssl/private/ssl-cert-snakeoil.key', + 'Redhat' => '/etc/ssl/certs/ssl-cert-snakeoil' + } + +} diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/puphpet/manifests/php/extra_repos.pp b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/puphpet/manifests/php/extra_repos.pp new file mode 100644 index 00000000000..6461f621120 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/puphpet/manifests/php/extra_repos.pp @@ -0,0 +1,16 @@ +/* + * Some PHP packages require extra repos. + * ex: PECL mongo is best to fetch Mongo's official repo + */ + +define puphpet::php::extra_repos { + + $downcase_name = downcase($name) + + if $downcase_name == 'mongo' and ! defined(Class['mongodb::globals']) { + class { 'mongodb::globals': + manage_package_repo => true, + } + } + +} diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/puphpet/manifests/php/module.pp b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/puphpet/manifests/php/module.pp new file mode 100644 index 00000000000..2d37ad56d51 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/puphpet/manifests/php/module.pp @@ -0,0 +1,33 @@ +/* + * This "translates" PHP module package names into system-specific names. + */ + +define puphpet::php::module ( + $service_autorestart +){ + + $package = $::osfamily ? { + 'Debian' => { + 'mbstring' => false, # Comes packaged with PHP, not available in repos + }, + 'Redhat' => { + # + } + } + + $downcase_name = downcase($name) + + if has_key($package, $downcase_name) { + $package_name = $package[$downcase_name] + } + else { + $package_name = $name + } + + if $package_name and ! defined(::Php::Module[$package_name]) { + ::php::module { $package_name: + service_autorestart => $service_autorestart, + } + } + +} diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/puphpet/manifests/php/pear.pp b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/puphpet/manifests/php/pear.pp new file mode 100644 index 00000000000..4582e67a17a --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/puphpet/manifests/php/pear.pp @@ -0,0 +1,45 @@ +/* + * This returns PEAR packages requiring beta stability + */ + +define puphpet::php::pear ( + $service_autorestart +){ + + $package = { + 'auth_sasl2' => 'beta', + 'config_lite' => 'beta', + 'console_getoptplus' => 'beta', + 'mdb2_driver_mysql' => false, + 'mdb2_driver_mysqli' => false, + 'pear_command_packaging' => 'alpha', + 'pear_frontend_gtk2' => false, + 'php_beautifier' => 'beta', + 'php_parser_docblockparser' => 'alpha', + 'testing_selenium' => 'beta', + 'versioncontrol_git' => 'alpha', + 'versioncontrol_svn' => 'alpha', + 'xml_parser2' => 'beta', + 'xml_util2' => 'alpha', + } + + $downcase_name = downcase($name) + + if has_key($package, $downcase_name) { + $package_name = $name + $preferred_state = $package[$downcase_name] + } + else { + $package_name = $name + $preferred_state = 'stable' + } + + if $package_name and $preferred_state and ! defined(::Php::Pear::Module[$package_name]) { + ::php::pear::module { $name: + use_package => false, + preferred_state => $preferred_state, + service_autorestart => $php_webserver_restart, + } + } + +} diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/puphpet/manifests/php/pecl.pp b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/puphpet/manifests/php/pecl.pp new file mode 100644 index 00000000000..2dd2b817fec --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/puphpet/manifests/php/pecl.pp @@ -0,0 +1,106 @@ +/* + * This "translates" PECL package names into system-specific names. + * For example, APCu does not install correctly on CentOS via PECL, + * but there is a system package for it that works well. Use that + * instead of the PECL package. + */ + +define puphpet::php::pecl ( + $service_autorestart +){ + + $ignore = { + 'date_time' => true, + 'mysql' => true, + } + + $pecl = $::osfamily ? { + 'Debian' => { + # + }, + 'Redhat' => { + # + } + } + + $pecl_beta = $::osfamily ? { + 'Debian' => { + 'augeas' => 'augeas', + 'zendopcache' => $::operatingsystem ? { + 'debian' => false, + 'ubuntu' => 'ZendOpcache', + }, + }, + 'Redhat' => { + # + } + } + + $package = $::osfamily ? { + 'Debian' => { + 'apc' => $::operatingsystem ? { + 'debian' => 'php5-apc', + 'ubuntu' => 'php5-apcu', + }, + 'apcu' => 'php5-apcu', + 'imagick' => 'php5-imagick', + 'memcache' => 'php5-memcache', + 'memcached' => 'php5-memcached', + 'mongo' => $::lsbdistcodename ? { + 'precise' => false, + default => 'php5-mongo', + }, + 'zendopcache' => 'php5-zendopcache', + }, + 'Redhat' => { + 'apc' => 'php-pecl-apcu', + 'apcu' => 'php-pecl-apcu', + 'imagick' => 'php-pecl-imagick', + 'memcache' => 'php-pecl-memcache', + 'memcached' => 'php-pecl-memcached', + 'mongo' => 'php-pecl-mongo', + 'zendopcache' => 'php-pecl-zendopcache', + } + } + + $downcase_name = downcase($name) + + if has_key($ignore, $downcase_name) { + $pecl_name = $pecl[$downcase_name] + $package_name = false + $preferred_state = 'stable' + } + elsif has_key($pecl, $downcase_name) { + $pecl_name = false + $package_name = false + $preferred_state = false + } + elsif has_key($pecl_beta, $downcase_name) and $pecl_beta[$downcase_name] { + $pecl_name = $pecl_beta[$downcase_name] + $package_name = false + $preferred_state = 'beta' + } + elsif has_key($package, $downcase_name) { + $pecl_name = false + $package_name = $package[$downcase_name] + } + else { + $pecl_name = $name + $package_name = false + } + + if $pecl_name and ! defined(::Php::Pecl::Module[$pecl_name]) { + ::php::pecl::module { $pecl_name: + use_package => false, + preferred_state => $preferred_state, + service_autorestart => $service_autorestart, + } + } + elsif $package_name and ! defined(Package[$package_name]) { + package { $package_name: + ensure => present, + require => Class['Php::Devel'], + } + } + +} diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/puphpet/manifests/phpmyadmin.pp b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/puphpet/manifests/phpmyadmin.pp new file mode 100644 index 00000000000..e227aaa9780 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/puphpet/manifests/phpmyadmin.pp @@ -0,0 +1,46 @@ +# This depends on +# puppetlabs/apt: https://github.com/puppetlabs/puppetlabs-apt + +class puphpet::phpmyadmin( + $dbms = 'mysql::server', + $webroot_location = '/var/www' +) inherits puphpet::params { + + if $::osfamily == 'debian' { + if $::operatingsystem == 'ubuntu' { + apt::key { '80E7349A06ED541C': key_server => 'hkp://keyserver.ubuntu.com:80' } + apt::ppa { 'ppa:nijel/phpmyadmin': require => Apt::Key['80E7349A06ED541C'] } + } + + $phpMyAdmin_package = 'phpmyadmin' + $phpMyAdmin_folder = 'phpmyadmin' + } elsif $::osfamily == 'redhat' { + $phpMyAdmin_package = 'phpMyAdmin.noarch' + $phpMyAdmin_folder = 'phpMyAdmin' + } else { + error('phpMyAdmin module currently only works with Debian or RHEL families') + } + + if ! defined(Package[$phpMyAdmin_package]) { + package { $phpMyAdmin_package: + require => Class[$dbms] + } + } + + if ! defined(File[$webroot_location]) { + file { $webroot_location: + ensure => directory, + require => Package[$phpMyAdmin_package] + } + } + + exec { 'cp phpmyadmin to webroot': + command => "cp -LR /usr/share/${phpMyAdmin_folder} ${webroot_location}/phpmyadmin", + onlyif => "test ! -d ${mysql_pma_webroot_location}/phpmyadmin", + require => [ + Package[$phpMyAdmin_package], + File[$webroot_location] + ] + } + +} diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/puphpet/manifests/ssl_cert.pp b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/puphpet/manifests/ssl_cert.pp new file mode 100644 index 00000000000..2389d60af82 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/puphpet/manifests/ssl_cert.pp @@ -0,0 +1,36 @@ +class puphpet::ssl_cert + inherits puphpet::params { + + case $::osfamily { + 'debian': { + if ! defined(Package['ssl-cert']) { + package { 'ssl-cert': + ensure => latest, + } + } + + exec { 'make-ssl-cert generate-default-snakeoil --force-overwrite': + creates => [ + $puphpet::params::ssl_cert_location, + $puphpet::params::ssl_key_location + ], + require => Package['ssl-cert'], + path => [ '/bin/', '/usr/bin/', '/usr/sbin/' ] + } + } + 'redhat': { + if ! defined(Package['openssl']) { + package { 'openssl': + ensure => latest, + } + } + + exec { "make-dummy-cert ${puphpet::params::ssl_cert_location}": + creates => $puphpet::params::ssl_cert_location, + require => Package['openssl'], + path => [ '/bin/', '/usr/bin/', '/usr/sbin/', '/etc/pki/tls/certs/' ] + } + } + } + +} diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/puphpet/manifests/xdebug.pp b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/puphpet/manifests/xdebug.pp new file mode 100644 index 00000000000..3c1985228e1 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/puphpet/manifests/xdebug.pp @@ -0,0 +1,32 @@ +class puphpet::xdebug ( + $install_cli = true, + $webserver, + $ensure = present +) inherits puphpet::params { + + if $webserver != undef { + $notify_service = Service[$webserver] + } else { + $notify_service = [] + } + + if defined(Package[$puphpet::params::xdebug_package]) == false { + package { 'xdebug': + name => $puphpet::params::xdebug_package, + ensure => installed, + require => Package['php'], + notify => $notify_service, + } + } + + # shortcut for xdebug CLI debugging + if $install_cli and defined(File['/usr/bin/xdebug']) == false { + file { '/usr/bin/xdebug': + ensure => present, + mode => '+X', + source => 'puppet:///modules/puphpet/xdebug_cli_alias.erb', + require => Package['php'] + } + } + +} diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/puphpet/manifests/xhprof.pp b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/puphpet/manifests/xhprof.pp new file mode 100644 index 00000000000..0649ab684f8 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/puphpet/manifests/xhprof.pp @@ -0,0 +1,93 @@ +class puphpet::xhprof ( + $php_version = '54', + $webroot_location = '/var/www', + $webserver_service +) inherits puphpet::params { + + exec { 'delete-xhprof-path-if-empty-folder': + command => "rm -rf ${webroot_location}/xhprof", + onlyif => "test ! -f ${webroot_location}/xhprof/extension/config.m4" + } + + vcsrepo { "${webroot_location}/xhprof": + ensure => present, + provider => git, + source => 'https://github.com/facebook/xhprof.git', + require => Exec['delete-xhprof-path-if-empty-folder'] + } + + file { "${webroot_location}/xhprof/xhprof_html": + ensure => directory, + mode => 0775, + require => Vcsrepo["${webroot_location}/xhprof"] + } + + if $::operatingsystem == 'ubuntu' and $php_version != '53' { + exec { 'configure xhprof': + cwd => "${webroot_location}/xhprof/extension", + command => 'phpize && ./configure && make && make install', + require => [ + Vcsrepo["${webroot_location}/xhprof"], + Class['Php::Devel'] + ], + path => [ '/bin/', '/usr/bin/' ] + } + + puphpet::ini { 'add xhprof ini extension': + php_version => $php_version, + webserver => $webserver_service, + ini_filename => '20-xhprof-custom.ini', + entry => 'XHPROF/extension', + value => 'xhprof.so', + ensure => 'present', + require => Exec['configure xhprof'] + } + + puphpet::ini { 'add xhprof ini xhprof.output_dir': + php_version => $php_version, + webserver => $webserver_service, + ini_filename => '20-xhprof-custom.ini', + entry => 'XHPROF/xhprof.output_dir', + value => '/tmp', + ensure => 'present', + require => Exec['configure xhprof'] + } + + composer::exec { 'xhprof-composer-run': + cmd => 'install', + cwd => "${webroot_location}/xhprof", + require => [ + Class['composer'], + Exec['configure xhprof'] + ] + } + } else { + $xhprof_package = $puphpet::params::xhprof_package + + if $webserver_service != undef and is_string($webserver_service) { + $xhprof_package_notify = [Service[$webserver_service]] + } elsif $webserver_service != undef { + $xhprof_package_notify = $webserver_service + } else { + $xhprof_package_notify = [] + } + + if ! defined(Package[$xhprof_package]) { + package { $xhprof_package: + ensure => installed, + require => Package['php'], + notify => $xhprof_package_notify, + } + } + + composer::exec { 'xhprof-composer-run': + cmd => 'install', + cwd => "${webroot_location}/xhprof", + require => [ + Class['composer'], + File["${webroot_location}/xhprof/xhprof_html"] + ] + } + } + +} diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/puphpet/templates/apache/custom_fragment.erb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/puphpet/templates/apache/custom_fragment.erb new file mode 100644 index 00000000000..7a1312528b5 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/puphpet/templates/apache/custom_fragment.erb @@ -0,0 +1 @@ +<%= @vhost['custom_fragment'] %> diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/puphpet/templates/apache/hhvm-httpd.conf.erb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/puphpet/templates/apache/hhvm-httpd.conf.erb new file mode 100644 index 00000000000..af276cbe149 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/puphpet/templates/apache/hhvm-httpd.conf.erb @@ -0,0 +1,6 @@ +<%= scope.function_template(['apache/httpd.conf.erb']) -%> + +FastCgiExternalServer <%= @docroot %>/hhvm.external -host <%= @hhvm_values['settings']['host'] %>:<%= @hhvm_values['settings']['port'] %> +AddHandler hhvm .php +Action hhvm /usr/lib/cgi-bin/hhvm.external +Alias /usr/lib/cgi-bin/ <%= @docroot %>/ diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/puphpet/templates/apache/mod/spdy/php-wrapper.erb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/puphpet/templates/apache/mod/spdy/php-wrapper.erb new file mode 100644 index 00000000000..54df3f74795 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/puphpet/templates/apache/mod/spdy/php-wrapper.erb @@ -0,0 +1,6 @@ +#!/bin/sh + +PHP_FCGI_MAX_REQUESTS=10000 +export PHP_FCGI_MAX_REQUESTS + +exec <%= @phpcgi %> diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/puphpet/templates/apache/mod/spdy/spdy_conf.erb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/puphpet/templates/apache/mod/spdy/spdy_conf.erb new file mode 100644 index 00000000000..64603c101db --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/puphpet/templates/apache/mod/spdy/spdy_conf.erb @@ -0,0 +1,8 @@ +# FcgidMaxRequestsPerProcess should be <= PHP_FCGI_MAX_REQUESTS +FcgidMaxRequestsPerProcess 10000 + + + AddHandler fcgid-script .php + Options +ExecCGI + FcgidWrapper /usr/local/bin/php-wrapper .php + diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/puphpet/templates/nginx/default_conf.erb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/puphpet/templates/nginx/default_conf.erb new file mode 100644 index 00000000000..cc2d6f032ff --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/puphpet/templates/nginx/default_conf.erb @@ -0,0 +1,29 @@ +server { + listen 80; + server_name localhost; + + index index.php index.html index.htm; + + access_log /var/log/nginx/log/host.access.log; + error_log /var/log/nginx/log/host.error.log; + + location / { + root <%= @webroot %>; + try_files $uri $uri/ /index.php?$args ; + index index.html index.htm index.php; + } + + location ~ \.php$ { + root <%= @webroot %>; + try_files $uri $uri/ /index.php?$args ; + index index.html index.htm index.php; + + fastcgi_index index.php; + fastcgi_param PATH_INFO $fastcgi_path_info; + fastcgi_param PATH_TRANSLATED $document_root$fastcgi_path_info; + fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; + fastcgi_pass <%= @fastcgi_pass %>; + fastcgi_split_path_info ^(.+\.php)(/.+)$; + include fastcgi_params; + } + } diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/puppi/.fixtures.yml b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/puppi/.fixtures.yml new file mode 100644 index 00000000000..96cb39d1b84 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/puppi/.fixtures.yml @@ -0,0 +1,6 @@ +fixtures: + repositories: + "concat": "git://github.com/puppetlabs/puppetlabs-concat.git" + "stdlib": "git://github.com/puppetlabs/puppetlabs-stdlib.git" + symlinks: + "puppi": "#{source_dir}" diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/puppi/.gemfile b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/puppi/.gemfile new file mode 100644 index 00000000000..9309493452e --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/puppi/.gemfile @@ -0,0 +1,7 @@ +source 'https://rubygems.org' + +puppetversion = ENV['PUPPET_VERSION'] +gem 'puppet', puppetversion, :require => false +gem 'puppet-lint' +gem 'puppetlabs_spec_helper', '>= 0.1.0' +gem 'puppet-blacksmith', '>= 2.0.0' diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/puppi/.project b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/puppi/.project new file mode 100644 index 00000000000..b6061843aa2 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/puppi/.project @@ -0,0 +1,23 @@ + + + puppi + + + + + + org.cloudsmith.geppetto.pp.dsl.ui.modulefileBuilder + + + + + org.eclipse.xtext.ui.shared.xtextBuilder + + + + + + org.cloudsmith.geppetto.pp.dsl.ui.puppetNature + org.eclipse.xtext.ui.shared.xtextNature + + diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/puppi/.travis.yml b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/puppi/.travis.yml new file mode 100644 index 00000000000..dffeca98741 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/puppi/.travis.yml @@ -0,0 +1,21 @@ +language: ruby +rvm: + - 1.8.7 + - 1.9.3 +script: + - "rake spec SPEC_OPTS='--format documentation'" +env: + - PUPPET_VERSION="~> 2.6.0" + - PUPPET_VERSION="~> 2.7.0" + - PUPPET_VERSION="~> 3.0.0" + - PUPPET_VERSION="~> 3.1.0" +matrix: + exclude: + - rvm: 1.9.3 + env: PUPPET_VERSION="~> 2.6.0" + gemfile: .gemfile + +gemfile: .gemfile +notifications: + email: + - al@lab42.it diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/puppi/LICENSE b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/puppi/LICENSE new file mode 100644 index 00000000000..f41da018579 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/puppi/LICENSE @@ -0,0 +1,17 @@ +Copyright (C) 2013 Alessandro Franceschi / Lab42 + +for the relevant commits Copyright (C) by the respective authors. + +Contact Lab42 at: info@lab42.it + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/puppi/Modulefile b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/puppi/Modulefile new file mode 100644 index 00000000000..d69331f33a3 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/puppi/Modulefile @@ -0,0 +1,9 @@ +name 'example42-puppi' +version '2.1.8' + +author 'lab42' +license 'Apache' +project_page 'http://www.example42.com' +source 'git://github.com/example42/puppi' +summary 'Installs and configures Puppi' +description 'This module provides the Puppi libraries required by Example42 modules and, if explicitely included, the puppi command, its working environment, the defines and procedures to deploy applications' diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/puppi/README.md b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/puppi/README.md new file mode 100644 index 00000000000..1f6ed569ebb --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/puppi/README.md @@ -0,0 +1,257 @@ +# Puppi: Puppet Knowledge to the CLI + +Puppi One and Puppi module written by Alessandro Franceschi / al @ lab42.it + +Puppi Gem by Celso Fernandez / Zertico + +Source: http://www.example42.com + +Licence: Apache 2 + +Puppi is a Puppet module and a CLI command. +It's data is entirely driven by Puppet code. +It can be used to standardize and automate the deployment of web applications +or to provides quick and standard commands to query and check your system's resources + +Its structure provides FULL flexibility on the actions required for virtually any kind of +application deployment and information gathering. + +The module provides: + +* Old-Gen and Next-Gen Puppi implementation + +* A set of scripts that can be used in chain to automate any kind of deployment + +* Puppet defines that make it easy to prepare a puppi set of commands for a project deployment + +* Puppet defines to populate the output of the different actions + + +## HOW TO INSTALL + +Download Puppi from GitHub and place it in your modules directory: + + git clone https://github.com/example42/puppi.git /etc/puppet/modules/puppi + +To use the Puppi "Original, old and widely tested" version, just declare or include the puppi class + + class { 'puppi': } + +To test the Next-Gen version you can perform the following command. Please note that this module is +not stable yet: + class { 'puppi': + version => '2', + } + +If you have resources conflicts, do not install automatically the Puppi dependencies (commands and packages) + + class { 'puppi': + install_dependencies => false, + } + + +## HOW TO USE + +Once Puppi is installed you can use it to: + +* Easily define in Puppet manifests Web Applications deploy procedures. For example: + + puppi::project::war { "myapp": + source => "http://repo.example42.com/deploy/prod/myapp.war", + deploy_root => "/opt/tomcat/myapp/webapps", + } + +* Integrate with your modules for puppi check, info and log + +* Enable Example42 modules integration + + +## HOW TO USE WITH EXAMPLE42 MODULES + +The Example42 modules provide (optional) Puppi integration. +Once enabled for each module you have puppi check, info and log commands. + +To eanble Puppi in OldGen Modules, set in the scope these variables: + + $puppi = yes # Enables puppi integration. + $monitor = yes # Enables automatic monitoring + $monitor_tool = "puppi" # Sets puppi as monitoring tool + +For the NextGen modules set the same parameters via Hiera, at Top Scope or as class arguments: + + class { 'openssh': + puppi => yes, + monitor => yes, + monitor_tool => 'puppi', + } + + +## USAGE OF THE PUPPI COMMAND (OLD GEN) + + puppi [ -options ] + +The puppi command has these possibile actions: + +First time initialization of the defined project (if available) + puppi init + +Deploy the specified project + puppi deploy + +Rollback to a previous deploy state + puppi rollback + +Run local checks on system and applications + puppi check + +Tail system or application logs + puppi log + +Show system information (for all or only the specified topic) + puppi info [topic] + +Show things to do (or done) manually on the system (not done via Puppet) + puppi todo + +In the deploy/rollback/init actions, puppi runs the commands in /etc/puppi/projects/$project/$action, logs their status and then run the commands in /etc/puppi/projects/$project/report to provide reporting, in whatever, pluggable, way. + +You can also provide some options: + +* -f : Force puppi commands execution also on CRITICAL errors + +* -i : Interactively ask confirmation for every command + +* -t : Test mode. Just show the commands that should be executed without doing anything + +* -d : Debug mode. Show debugging info during execution + +* -o "parameter=value parameter2=value2" : Set manual options to override defaults. The options must be in parameter=value syntax, separated by spaces and inside double quotes. + + +Some common puppi commnds when you log for an application deployment: + + puppi check + puppi log & # (More readable if done on another window) + puppi deploy myapp + puppi check + puppi info myapp + + +## THE PUPPI MODULE + +The set of commands needed for each of these actions are entirely managed with specific +Puppet "basic defines": + +Create the main project structure. One or more different deployment projects can exist on a node. + puppi::project + +Create a single command to be placed in the init sequence. It's not required for every project. + puppi::initialize + +Create a single command to be placed in the deploy sequence. More than one is generally needed for each project. + puppi::deploy + +Create a single command to be placed in the rollback sequence. More than one is generally needed for each project. + puppi::rollback + +Create a single check (based on Nagios plugins) for a project or for the whole host (host wide checks are auto generated by Example42 monitor module) + puppi::check + +Create a reporting command to be placed in the report sequence. + puppi::report + +Create a log filename entry for a project or the whole hosts. + puppi::log + +Create an info entry with the commands used to provide info on a topic + puppi::info + +Read details in the relevant READMEs + + +## FILE PATHS (all of them are provided, and can be configured, in the puppi module): + +A link to the actual version of puppi enabled + /usr/sbin/puppi + +The original puppi bash command. + /usr/sbin/puppi.one + +Puppi (one) main config file. Various puppi wide paths are defined here. + /etc/puppi/puppi.conf + +Directory where by default all the host wide checks can be placed. If you use the Example42 monitor module and have "puppi" as $monitor_tool, this directory is automatically filled with Nagios plugins based checks. + /etc/puppi/checks/ ($checksdir) + +Directory that containts projects subdirs, with the commands to be run for deploy, rollback and check actions. They are completely built (and purged) by the Puppet module. + /etc/puppi/projects/ ($projectsdir) + +The general-use scripts directory, these are used by the above commands and may require one or more arguments. + /etc/puppi/scripts/ ($scriptsdir) + +The general-use directory where files are placed which contain the log paths to be used by puppi log + /etc/puppi/logs/ ($logssdir) + +The general-use directory where files are placed which contain the log paths to be used by puppi log + /etc/puppi/info/ ($infodir) + +Where all data to rollback is placed. + /var/lib/puppi/archive/ ($archivedir) + +Where logs and reports of the different commands are placed. + /var/log/puppi/ ($logdir) + +Temporary, scratchable, directory where Puppi places temporary files. + /tmp/puppi/ ($workdir) + +A runtime configuration file, which is used by all all the the scripts invoked by puppi to read and write dynamic variables at runtime. This is necessary to mantain "state" information that changes on every puppi run (such as the deploy datetime, used for backups). + /tmp/puppi/$project/config + + +## HOW TO CUSTOMIZE +It should be clear that with puppi you have full flexibility in the definition of a deployment +procedure, since the puppi command is basically a wrapper that executes arbitrary scripts with +a given sequence, in pure KISS logic. + +The advantanges though, are various: +* You have a common syntax to manage deploys and rollbacks on an host + +* In your Puppet manifests, you can set in simple, coherent and still flexible and customizable + defines all the elements, you need for your application deployments. + Think about it: with just a Puppet define you build the whole deploy logic + +* Reporting for each deploy/rollback is built-in and extensible + +* Automatic checks can be built in the deploy procedure + +* You have a common, growing, set of general-use scripts for typical actions + +* You have quick and useful command to see what's happening on the system (puppi check, log, info) + +There are different parts where you can customize the behaviour of puppi: + +* The set of general-use scripts in /etc/puppi/scripts/ ( this directory is filled with the content + of puppi/files/scripts/ ) can/should be enhanced. These can be arbitrary scripts in whatever + language. If you want to follow puppi's logic, though, consider that they should import the + common and runtime configuration files and have an exit code logic similar to the one of + Nagios plugins: 0 is OK, 1 is WARNING, 2 is CRITICAL. Note that by default a script that + exits with WARNING doesn't block the deploy procedure, on the other hand, if a script exits + with CRITICAL (exit 2) by default it blocks the procedure. + Take a second, also, to explore the runtime config file created by the puppi command that + contains variables that can be set and used by the scripts invoked by puppi. + +* The custom project defines that describe deploy templates. These are placed in + puppi/manifests/project/ and can request all the arguments you want to feed your scripts with. + Generally is a good idea to design a standard enough template that can be used for all the + cases where the deployment procedure involves similar steps. Consider also that you can handle + exceptions with variables (see the $loadbalancer_ip usage in puppi/manifests/project/maven.pp) + + +## (NO) DEPENDENCIES AND CONFLICTS +Puppi is self contained. It doesn't require other modules. +(And is required by all Example42 modules). + +For correct functionality by default some extra packages are installed. +If you have conflicts with your existing modules, set the argument: + install_dependencies => false + diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/puppi/README_check.md b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/puppi/README_check.md new file mode 100644 index 00000000000..e63204ca0e5 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/puppi/README_check.md @@ -0,0 +1,67 @@ +# PUPPI CHECK INSTRUCTIONS +Documentation and examples related to the puppi action check + +## SYNOPSIS (cli) + puppi check [project_name] [-r yes|no|fail] + +## EXAMPLES (cli) +Run host-wide checks. + puppi check +Run project "myapp" specific tests AND host-wide checks + puppi check myapp + +Run checks and send reports only if some of them fail + puppi check -r fail + +Run checks and send reports + puppi check -r yes + +Run checks and show only failed ones + puppi check -s fail + +## EXAMPLES (puppet) +The basic define related to a check is: + puppi::check - Creates a single command to be placed in the check sequence. + +A simple example might be: + puppi::check { 'Port_Apache': + command => "check_tcp -H ${fqdn} -p 80" , + } + +but also something that uses variables Puppet already knows + puppi::check { 'apache_process': + command => "check_procs -c 1: -C ${apache::params::processname}" , + } + +To avoid repetitions you can include the relevant checks in defines you already have +to manage, for example, virtualhosts, and use the data you already provide to configure +their local puppi checks. + puppi::check { "Url_$name": + enable => $enable, + command => "check_http -I '${target}' -p '${port}' -u '${url}' -s '${pattern}'" , + } + +You can also use custom scripts for your checks. They should behave similarly to Nagios plugins inn their exit codes: 0 for SUCCESS, 1 for WARNINGS, 2 for CRITICAL. In this case you've to specify the directory there the scripts stays: + puppi::check { 'my_stack': + command => 'stack_check.sh', + bade_dir => '/usr/bin', + } + + +## EXAMPLES (with example42 puppet modules) +If you use the whole Example42 modules set you get automatically many service related checks out of the box. +Just set (via an ENC, facts or manifests) these puppet variables: + $monitor="yes" # To enable automagic monitoring + $monitor_tool = "puppi" # As monitoring tool define at least puppi. If you like Nagios, you may use: + $monitor_tool = ["nagios","puppi"] # This enables the below checks both for Puppi and Nagios + $puppi=yes # To enable puppi extensions autoloading + +To the port and service checks automatically added for the included modules, you can add custom url checks +with something like: + monitor::url { "URL_Check_Database_Connection": + url => "http://www.example42.com/check/db", + pattern => 'SUCCESS', + port => '80', + target => "${fqdn}", + } + diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/puppi/README_deploy.md b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/puppi/README_deploy.md new file mode 100644 index 00000000000..683f48bfb2e --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/puppi/README_deploy.md @@ -0,0 +1,263 @@ +# PUPPI DEPLOY INSTRUCTIONS +Documentation and examples related to the puppi actions: deploy, rollback and init + +## SYNOPSIS (COMMAND LINE) +Shell command to launch a deploy: + puppi deploy + puppi deploy [-f] [-i] [-t] [-d yes|full] [-r yes|no|fail] [-p "parameter=value parameter2=value2"] + +Shell command to launch a rollback: + puppi rollback + +Shell command to launch the first deploy: + puppi init + + +## EXAMPLES (cli) + +Deploy myapp with the standard logic/parameters defined in Puppet: + puppi deploy myapp + +Deploy myapp and doesn't stop in case of Critical errors: + puppi deploy myapp -f + +Deploy myapp in interactive mode. Confirmation is asked for each step + puppi deploy myapp -i + +Test mode. Just show the commands that would be executed + puppi deploy myapp -t + +Deploy myapp with full debugging output + puppi deploy myapp -d full + +Deploy myapp in interactive mode and sets some custom options that override the standard Puppet params. +Note that these parameters change according to the script you use (and the scripts must honour this override in order to make this option work). + puppi deploy myapp -i -o "version=1.1 source_url=http://dev.example42.com/code/my_app/" + +Make the first deploy of "myapp". Can be optional and may require a subsequent puppi deploy myapp + puppi init myapp + +Rollback myapp to a previous archived state. User is asked to choose which deploy to override. Note that by default you have 5 backups to rollback from. Older backups are automatically removed. + puppi rollback myapp + +Automatically rollback to the latest saved state (unattended). + puppi rollback myapp latest + + +## EXAMPLES (puppet) +Here follow some sample defines you can use out of the box in your manifests once you include puppi. +Get a war from $source and deploy it in $deploy_root: + puppi::project::war { 'myapp': + source => 'http://repo.example42.com/deploy/prod/myapp.war', + deploy_root => '/store/tomcat/myapp/webapps', + } + +Get a tarball from $source, unpack it in $deploy_root, restart service called apache and send a mail +to $report_mail (you can have a comma separated list of destination addresses): + puppi::project::tar { 'mysite': + source => 'rsync://repo.example42.com/deploy/prod/release.tgz', + init_script => 'apache', + deploy_root => '/var/www/html/', + report_email => 'sysadmins@example42.com', + enable => 'true', # Redundant + } + +Get a tarfile with a .sql query file and apply to to you local Mysql with the credentials provided: + puppi::project::mysql { 'myweb_sql': + source => 'http://repo.example42.com/deploy/prod/database.sql.gz', + mysql_user => 'myweb', + mysql_password => $secret::mysql_myweb_pw, + mysql_host => 'localhost', + mysql_database => 'myweb', + report_email => 'sysadmins@example42.com,dbadmins@example42.com', + enable => 'true', + } + +Get a list of files from $source, retrieve the actual files from $source_baseurl and place them +in $deploy_root + puppi::project::files { 'gfxupdates': + source => 'http://deploy.example42.com/prod/website2/list.txt', + source_baseurl => 'http://design.example42.com/website2/gfx/', + deploy_root => '/var/www/html/gfx', + report_email => 'sysadmins@example42.com,designers@example42.com', + enable => 'true', + } + +Deploy from a Nexus repository (retrieve maven-metadata.xml from dir specified in $source), get the war +(version is achieved from the "release" tag in the xml) and deploy it in $deploy_root and then restart tomcat. + puppi::project::maven { 'supersite': + source => 'http://nexus.example42.com/nexus/content/repositories/releases/it/example42/supersite/', + deploy_root => '/usr/local/tomcat/supersite/webapps', + init_script => 'tomcat', + report_email => 'sysadmins@example42.com', + enable => 'true', + } + +Get the maven-metadata.xml from a Nexus repository and deploy: +- The release war in $deploy_root +- A configurations tarball tagged with the Maven qualifier $config_suffix in $config_root +- A static files tarball tagged with the Maven qualifier $document_suffix in $document_root + puppi::project::maven { 'supersite': + source => 'http://nexus.example42.com/nexus/content/repositories/releases/it/example42/supersite/', + deploy_root => '/usr/local/tomcat/supersite/webapps', + config_suffix => 'cfg', + config_root => '/srv/htdocs/supersite', + document_suffix => 'css', + document_root => '/srv/htdocs/supersite', + init_script => 'tomcat', + report_email => 'sysadmins@example42.com', + enable => 'true', + } + +The same deploy Nexus repository with some more options: +- A Source dir to be used to deploy static files when issuing "puppi init supersite" +- A block from a loadbalancer IP (managing different sites addresess) +- Some more elaborate rsync exclusion rules +- A backup retention of 3 archives (instead of the default 5) + puppi::project::maven { 'supersite': + source => 'http://nexus.example42.com/nexus/content/repositories/releases/it/example42/supersite/', + deploy_root => '/usr/local/tomcat/supersite/webapps', + config_suffix => 'cfg', + config_root => '/srv/htdocs/supersite', + document_suffix => 'css', + document_root => '/srv/htdocs/supersite', + document_init_source => 'rsync://backup.example42.com/initdir/supersite/', + firewall_src_ip => $site ? { + dr => '192.168.101.1/30', + main => '192.168.1.1/30', + }, + backup_rsync_options => '--exclude .snapshot --exclude /doc_root/autojs/*** --exclude /doc_root/autocss/*** --exclude /doc_root/xsl', + backup_retention => '3', + init_script => 'tomcat', + report_email => 'sysadmins@example42.com', + enable => 'true', + } + +An elaborated war deploy: +- get from $source, +- execute /usr/local/bin/mychecks.sh as root before the deploy +(or better with sequence number 39) +- deploy to /data/tomcat/myapp/webapps as user pippo +- stop and start tomcat-myapp but also monit and puppet +- backup passing $backup_rsync_options to rsync: + puppi::project::war { 'myapp': + source => 'http://repo.example42.com/deploy/prod/myapp.war', + deploy_root => '/store/tomcat/myapp/webapps', + predeploy_customcommand => '/usr/local/bin/mychecks.sh', + predeploy_priority => '39', + predeploy_user => 'root', + backup_rsync_options => '--exclude logs/', + user => 'pippo', + init_script => 'tomcat-myapp', + deploy_root => '/data/tomcat/myapp/webapps', + report_email => 'sysadmins@example42.com', + disable_services => 'monit puppet', + } +An example of usage of the generic builder define to deploy a zip file, with an example custom +post deploy command executed as root (as all puppi commands, if not specified otherwise) + puppi::project::builder { 'cms': + source => 'http://repo.example42.com/deploy/cms/cms.zip', + source_type => 'zip', + user => 'root', + deploy_root => '/var/www', + postdeploy_customcommand => 'chown -R www-data /var/www/files', + postdeploy_user => 'root', + postdeploy_priority => '41', + report_email => 'sysadmins@example42.com', + enable => 'true', + } + +These are just examples, possibilities are many, refer to the docs in puppi/manifests/project/*.pp +to have a full list of the available options. + + +## BASIC PUPPI DEFINES +The above puppi::projects defines manage more or less complex deployments procedures for different kind of projects. They are just samples of possible procedures and you may create your one ones, if the ones provided there don't fit your needs. +They will have to contain one or more of these basic puppi defines. + +Create the main project structure. One or more different deployment projects can exist on a node. + puppi::project + +Create a single command to be placed in the init sequence. It's not required for every project. + puppi::initialize + +Create a single command to be placed in the deploy sequence. More than one is generally needed for each project. + puppi::deploy + +Create a single command to be placed in the rollback sequence. More than one is generally needed for each project. + puppi::rollback + +These defines have generally a standard structure and similar arguments. +Every one is reversable (enable => false) but you can wipe out the whole /etc/puppi directory +to have it rebuilt from scratch. Here is an example for a single deploy command: + puppi::deploy { 'Retrieve files': # The $name of the define is used in the file name + command => 'get_curl.sh', # The name of the general-use script to use + argument => 'file:///storage/file', # The argument(s) passed to the above script + priority => '10', # Lower priority scripts are executed first + user => 'root', # As what user we run the script + project => 'my-web.app', # The name of the project to use + } + +This define creates a file named: + /etc/puppi/projects/${project}/deploy/${priority}-${name} +Its content is, simply: + su - ${user} -c "export project=${project} && /etc/puppi/scripts/${command} ${arguments}" + + +## DEPLOY PROCEDURES DEFINES +The puppi module provides some examples of deploy workflows they are in the puppi/manifests/project +directory and contain simple to use defines that contain one puppi::project and several puppi::deploy and +puppi::rollback defines to design a specific workflow using the builtin commands present in +puppi/files/scripts. +Note that if you need to design your own deploy procedure you have different options: +- Verify if you can reuse the existing ones, using optional arguments as pre/postdeploy_commands +- Use the existing ones as a base to make you own custom defines, reusing parts of their logic + and the builtin commands (puppi/files/scripts/*) they use +- Write your own commands (in whatever language) and integrate them in your own procedure. + +Here follow the main and most reusable deploy workflows defines available in puppi/manifests/project/. +The have generally a set of common arguments that make you manage if to stop and restart specific +services, if you want to isolate your server from a loadbalancer during the deploy procedure, what to backup, +how many backup copies to mantain, if to send a report mail to specific addresses and if you need +to run custom commands during the standard procedure. +For all of the you have to specify a source from where to get the source files (http/ftp/rsync/file..) +a directory where to place them and the user that has to own the deploy files. +Full documentation is available in the relevant .pp files + +- puppi::project::tar - Use this to retrieve and deploy a simple tar file +- puppi::project::war - Use this to retrieve and deploy a war +- puppi::project::files - Use this to deploy one or more files based on a provided list +- puppi::project::dir - Use this to syncronize a remote directory to a local deploy one +- puppi::project::mysql - Use this to retrive and apply a .sql file for mysql schema updates +- puppi::project::maven - Use this to deploy war and tar files generated via Maven released on Nexus or similar. A good source of Open Source Java artifacts is http://www.artifact-repository.org/ +- puppi::project::builder - This is a general purpose define that incorporates most the of cases provided by the above procedures + + +## BUILTIN COMMANDS +The puppi/files/scripts directory in the module contains some general usage "native" bash scripts +that can be used in custom deployments. They are generally made to work together according to a +specific logic, which is at the base of the deploy procedures defines in puppi/manifests/project/ +but you're free to write your own scripts, in whatever language, according to your needs. + +The default scripts are engineered to follow these steps for a deployment: +- Remote files are downloaded in /tmp/puppi/$project/store or directly in the predeploy + directory: /tmp/puppi/$project/deploy +- If necessary the downloaded files are expanded in one or more predeploy directories + (default:/tmp/puppi/$project/deploy). +- Runtime configuration entries might be saved in /tmp/puppi/$project/config +- Files are eventually backed from the deploy directory (Apache' docroot, Tomcat webapps or whatever) + to the archive directory (/var/lib/puppi/archive/$project). Older backups are deleted (by default + there's a retention of 5 backups). +- Files are copied from the predeploy directory to the deploy dir. +- Relevant services are eventually stopped and started + +The most used common scripts are (they might have different arguments, some of them are quite simple): +- get_file.sh - Retrieves a file via ssh/http/rsync/svn and places it in a temp dir (store or predeploy) +- deploy.sh - Copies the files in the predeploy dir to deploy dir +- archive.sh - Backups and restores files in deploy dir +- service.sh - Stops or starts one or more services +- wait.sh - Waits for the presence or absence of a file, for the presence of a string in a file or a defined number or seconds. +- get_metadata.sh - Extracts metadata from various sources in order to provide info to other scripts. These info are save in the Runtime configuration file (/tmp/puppi/$project/config) +- report_mail.sh - Sends a mail with the report of the operations done + +General functions, used by both the puppi command and these scripts, are in puppi/files/scripts/functions diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/puppi/README_info.md b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/puppi/README_info.md new file mode 100644 index 00000000000..ff45eb3780e --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/puppi/README_info.md @@ -0,0 +1,60 @@ +# PUPPI INFO README +The puppi info commands executes scripts in /etc/puppi/info/ which are generated by templates provided by the puppi::info define +These scripts are supposed to show status details on the omonimous info topic. + +## SYNOPSIS (cli) + puppi info [topic] [-i] + +## EXAMPLES (cli) +Show host-wide infos. Much stuff. + puppi info + +Show info about apache (connections, processes, config, logs...) + puppi info apache + +Interactively select the info topics you want to show + puppi info -i + +Show complete info and send reports (email, rest ... ) + puppi info -r yes + +Grep the output with the string defined + puppi info -g + + +## EXAMPLES (puppet) +The basic define related to a info is puppi::info, it creates a script executed +when running "puppi info $name" based on the provided template. +Customize the template to customize the info you want to see. + +A sample that just runs commands using the default template: + puppi::info { 'network': + description => 'Network settings and stats' , + run => [ 'ifconfig' , 'route -n' , 'cat /etc/resolv.conf' , 'netstat -natup | grep LISTEN' ], + } + +You can have more useful and dedicated info topics using a custom puppi::info define inside your +own defines. For example in a define that creates a tomcat instance you can add something like: + puppi::info::instance { "tomcat-${instance_name}": + servicename => "tomcat-${instance_name}", + processname => "${instance_name}", + configdir => "${tomcat::params::storedir}/${instance_name}/conf/", + bindir => "${tomcat::params::storedir}/${instance_name}/bin/", + pidfile => "${instance_rundir}/tomcat-${instance_name}.pid", + datadir => "${instance_path}/webapps", + logdir => "${instance_logdir}", + httpport => "${instance_httpport}", + controlport => "${instance_controlport}", + ajpport => "${instance_ajpport}", + templatefile=> "puppi/info/instance.erb", + description => "Info for ${instance_name} Tomcat instance" , + } +which has custom arguments, feeded by the data you provided to the define, and a custom +template file that uses these variables. + +## EXAMPLES (with example42 puppet modules) +If you use the old Example42 modules set you get automatically many service related infos out of the box to be used with Puppi One. +NextGen modules are supposed to provide pupi info intergration on Puppi Two (TO DO) +Just set (via an ENC, facts or manifests) $puppi=yes to enable puppi extensions autoloading. +This will automatically deploy info topics related to the modules you use. + diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/puppi/README_log.md b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/puppi/README_log.md new file mode 100644 index 00000000000..8fe806ea020 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/puppi/README_log.md @@ -0,0 +1,44 @@ +# PUPPI LOG README +Documentation and examples related to the puppi action log + +## SYNOPSIS (cli) + puppi log [topic] [-i] + +## EXAMPLES (cli) + +Tails (tail -10f) all the known logs. + puppi log + +Tails only the logs related to the given topic + puppi log apache + +Choose interactively which logs to show + puppi log + +Grep the output with the string defined + puppi log -g + +## EXAMPLES (puppet) +The basic define related to a log is: + puppi::log +it creates a file in /etc/puppi/logs/ with one or more logs paths. + +A simple, operating system aware, example might be: + puppi::log { 'auth': + description => 'Users and authentication' , + log => $::operatingsystem ? { + redhat => '/var/log/secure', + darwin => '/var/log/secure.log', + ubuntu => ['/var/log/user.log','/var/log/auth.log'], + } + } + +but also something that uses variables Puppet already knows + puppi::log { "tomcat-${instance_name}": + log => "${tomcat::params::storedir}/${instance_name}/logs/catalina.out" + } + +EXAMPLES (with example42 puppet modules) +If you use the old Example42 modules set you get automatically many service related logs out of the box to be used with Puppi One. +NextGen modules are supposed to provide puppi log intergration on Puppi Two (TO DO) + diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/puppi/Rakefile b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/puppi/Rakefile new file mode 100644 index 00000000000..8fcea70edb1 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/puppi/Rakefile @@ -0,0 +1,6 @@ +require 'rubygems' +require 'puppetlabs_spec_helper/rake_tasks' +require 'puppet_blacksmith/rake_tasks' +require 'puppet-lint' +PuppetLint.configuration.send("disable_80chars") +PuppetLint.configuration.send('disable_class_parameter_defaults') diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/puppi/composer.json b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/puppi/composer.json new file mode 100644 index 00000000000..f56438cd236 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/puppi/composer.json @@ -0,0 +1,13 @@ +{ + "name": "example42/puppi", + "description": "Puppet driven applications deployment tool", + "homepage": "https://github.com/example42/puppi", + "type": "library", + "license": "Apache License, Version 2.0", + "authors": [ + { + "name": "Example42", + "homepage": "http://www.example42.com/" + } + ] +} diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/puppi/files/info/readme/readme b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/puppi/files/info/readme/readme new file mode 100644 index 00000000000..08778cc69c4 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/puppi/files/info/readme/readme @@ -0,0 +1,2 @@ +Default ReadMe File. +Edit puppi/files/info/readme/readme to change this message diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/puppi/files/info/readme/readme-default b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/puppi/files/info/readme/readme-default new file mode 100644 index 00000000000..187d6f3a10a --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/puppi/files/info/readme/readme-default @@ -0,0 +1,4 @@ +No extra node or role related info available. +To have node or role specific extar info, create +modules/puppi/files/info/readme/readme--$hostname or +modules/puppi/files/info/readme/readme-$role diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/puppi/files/mailpuppicheck b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/puppi/files/mailpuppicheck new file mode 100644 index 00000000000..fbde3bfda79 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/puppi/files/mailpuppicheck @@ -0,0 +1,72 @@ +#!/bin/bash +# File Managed by Puppet +# Possible Usage: +# Run this command at the end of each Puppet run to be +# immediately notified if a Puppet Runs has broken some service +# +# Options: +# -m destination_email +# -i (in seconds) before retrying a Puppi check +# -r how many attempts to retry if there are failures +# +# In puppet.conf add something like: +# postrun_command = "/usr/bin/mailpuppicheck -m roots@example.com" +# +retries=1 +interval=2 +workdir="/tmp" +counter=0 +while [ $# -gt 0 ]; do + case "$1" in + -m) + mail=$2 + shift 2 ;; + -i) + internal=$2 + shift 2 ;; + -r) + retries=$2 + shift 2 ;; + esac +done + +if [ ! $mail ] ; then + echo "Provide at least an email addess" + exit 1 +fi + +# randfile="$(mktemp)" +lastrunfile=$workdir/puppicheck_lastrun +savedfile=$workdir/puppicheck_saved + +while [ $counter -lt $retries ] ; do + puppi check | grep FAILED > $lastrunfile + if [ "x$?" == "x0" ] ; then + errors="yes" + sleep $interval + else + errors="no" + echo "Run $counter - Errors $errors" + echo > $savedfile + exit 0 + fi + echo "Run $counter - Errors $errors" + let counter=$counter+1 +done + +diff $lastrunfile $savedfile +if [ "x$?" == "x0" ] ; then + echo "No changes detected" +else + echo "Changes detected" + notify="yes" +fi + +cp $lastrunfile $savedfile +if [ "x$notify" == "xyes" ] ; then + # Yes, it's ugly + cat -v $lastrunfile | sed -e 's:\^\[\[60G\[\^\[\[0;31m: :g' | sed -e 's:\^\[\[0;39m\]\^M: :g' | mail -s "[puppet] Errors after Puppet run on $(hostname -f)" $mail + echo "Sent notification" +fi + +exit 0 diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/puppi/files/mcollective/mc-puppi b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/puppi/files/mcollective/mc-puppi new file mode 100755 index 00000000000..26f1e45a40e --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/puppi/files/mcollective/mc-puppi @@ -0,0 +1,65 @@ +#!/usr/bin/env ruby + +# Client program for the mcollective puppi agent +# +# Released under Apache License 2.0 + +require 'mcollective' + +include MCollective::RPC + +options = rpcoptions do |parser, options| + options[:timeout] = 180 + + parser.define_head "Execute Puppi commands" + parser.banner = "Usage: mc-puppi [filters] command [project] [puppioptions]" + parser.separator "" + parser.separator "Available commands:" + parser.separator " check [project] - Run puppi check" + parser.separator " info [topic] - Run puppi info. For all or specified topic" + parser.separator " log [topic] - Run puppi log. For all or specified topic" + parser.separator " todo - Run puppi todo" + parser.separator " deploy - Run puppi deploy on the defined project" + parser.separator " configure - Run puppi configure on the defined project" + parser.separator " rollback - Run puppi rollback latest on the defined project" + parser.separator " init - Run puppi init on the defined project" +end + +if MCollective::Util.empty_filter?(options[:filter]) + print("Do you really want to operate on services unfiltered? (y/n): ") + STDOUT.flush + + exit unless STDIN.gets.chomp =~ /^y$/ +end + +if ARGV.length >= 1 + command = ARGV.shift + project = ARGV.shift + puppioptions = ARGV.shift + + unless command =~ /^(check|deploy|rollback|init|configure|info|log|todo)$/ + puts("Command has to be check|info|log|deploy|rollback|init|configure|todo") + exit 1 + end +else + puts("Please specify at least a command") + exit 1 +end + +mc = rpcclient("puppi", :options => options) +mc.progress = true +# mc.send(command, {:project => project}) do |resp| +args = {}; +args[:project] = project if project +args[:puppioptions] = puppioptions if puppioptions +mc.send(command, args) do |resp| + begin +# puts resp[:serverid] + puts resp[:body][:data] +# puts resp[:body][:exitcode] + + rescue RPCError => er + puts "RPC Agent error: #{er}" + end +end + diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/puppi/files/mcollective/puppi.ddl b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/puppi/files/mcollective/puppi.ddl new file mode 100644 index 00000000000..f86ec468fe1 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/puppi/files/mcollective/puppi.ddl @@ -0,0 +1,68 @@ +metadata :name => "SimpleRPC Agent For PUPPI Commands", + :description => "Agent to query PUPPI commands via MCollective", + :author => "Al @ Lab42", + :license => "Apache License 2.0", + :version => "0.3", + :url => "http://www.example42.com/", + :timeout => 600 + +[ "check" , "log" , "info" ].each do |myact| + action myact, :description => "Run puppi myact" do + display :always + + input :project, + :prompt => "Project", + :description => "PUPPI project", + :type => :string, + :validation => '^[a-zA-Z\-\.=_\d]+$', + :optional => true, + :maxlength => 50 + + input :puppioptions, + :prompt => "Puppi options", + :description => "PUPPI options", + :type => :string, + :validation => '^[a-zA-Z\-\.=_\d]+$', + :optional => true, + :maxlength => 50 + + output :data, + :description => "Output from the Puppi run", + :display_as => "Output" + + output :exitcode, + :description => "Exit Code from the Puppi run", + :display_as => "Exit Code" + end +end + +[ "deploy" , "rollback" , "init" , "configure" ].each do |myact| + action myact, :description => "Run puppi myact" do + display :always + + input :project, + :prompt => "Project", + :description => "PUPPI project", + :type => :string, + :validation => '^[a-zA-Z\-\.=_\d]+$', + :optional => false, + :maxlength => 50 + + input :puppioptions, + :prompt => "Puppi options", + :description => "PUPPI options", + :type => :string, + :validation => '^[a-zA-Z\-\.=_\d]+$', + :optional => true, + :maxlength => 50 + + output :data, + :description => "Output from the Puppi run", + :display_as => "Output" + + output :exitcode, + :description => "Exit Code from the Puppi run", + :display_as => "Exit Code" + end +end + diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/puppi/files/mcollective/puppi.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/puppi/files/mcollective/puppi.rb new file mode 100644 index 00000000000..ee0b3289f23 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/puppi/files/mcollective/puppi.rb @@ -0,0 +1,83 @@ +module MCollective + module Agent + class Puppi "SimpleRPC Agent For PUPPI Commands", + :description => "Agent to execute PUPPI actions via MCollective", + :author => "Al @ Lab42", + :license => "Apache License 2.0", + :version => "0.3", + :url => "http://www.example42.com/", + :timeout => 600 + + def check_action +# validate :project, :shellsafe + project = request[:project] if request[:project] + reply.data = %x[puppi check #{project}].chomp + if ($?.exitstatus > 0) + reply.fail "FAILED: #{reply.data}" + end + end + + def info_action +# validate :project, :shellsafe + project = request[:project] if request[:project] + reply.data = %x[puppi info #{project}].chomp + if ($?.exitstatus > 0) + reply.fail "FAILED: #{reply.data}" + end + end + + def log_action +# validate :project, :shellsafe + project = request[:project] if request[:project] + reply.data = %x[puppi log #{project} -c 10].chomp + if ($?.exitstatus > 0) + reply.fail "FAILED: #{reply.data}" + end + end + + def deploy_action + validate :project, :shellsafe + project = request[:project] if request[:project] + if (!File.directory? "/etc/puppi/projects/#{project}") + reply.fail "No such project #{project}" + return + end + puppioptions = request[:puppioptions] + reply.data = %x[puppi deploy #{project} -o "#{puppioptions}"].chomp + if ($?.exitstatus > 0) + reply.fail "FAILED: #{reply.data}" + end + end + + def rollback_action + validate :project, :shellsafe + project = request[:project] if request[:project] + reply.data = %x[puppi rollback #{project} latest].chomp + if ($?.exitstatus > 0) + reply.fail "FAILED: #{reply.data}" + end + end + + def init_action + validate :project, :shellsafe + project = request[:project] if request[:project] + reply.data = %x[puppi init #{project}].chomp + if ($?.exitstatus > 0) + reply.fail "FAILED: #{reply.data}" + end + end + + def configure_action + validate :project, :shellsafe + project = request[:project] if request[:project] + reply.data = %x[puppi configure #{project}].chomp + if ($?.exitstatus > 0) + reply.fail "FAILED: #{reply.data}" + end + end + + end + end +end +# vi:tabstop=4:expandtab:ai diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/puppi/files/mcollective/puppicheck b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/puppi/files/mcollective/puppicheck new file mode 100644 index 00000000000..988d310fad8 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/puppi/files/mcollective/puppicheck @@ -0,0 +1,22 @@ +#!/bin/bash +# File Managed by Puppet +PATH=$PATH:/usr/local/bin + +if [ ! $1 ] ; then + echo "Provide at least a match pattern. For example:" + echo "role=fep-pgol" + exit 1 +fi + +filtered=$(echo $* | sed "s/[^a-Z0-9= _.\-]//Ig") + +randfile="$(mktemp)" + +trap "rm -f $randfile" SIGINT SIGTERM EXIT + +myarg=$(echo $filtered | sed -e "s/ / -F /g") + +mc-puppi check -F $myarg | tee $randfile +grep FAILED $randfile && exit 1 +exit 0 + diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/puppi/files/mcollective/puppideploy b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/puppi/files/mcollective/puppideploy new file mode 100644 index 00000000000..2f722d6c3e3 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/puppi/files/mcollective/puppideploy @@ -0,0 +1,22 @@ +#!/bin/bash +# File Managed by Puppet +PATH=$PATH:/usr/local/bin + +if [ ! $2 ] ; then + echo "Provide the hostname and the project you want to deploy:" + echo "superdeploy web01.example42.com myapp" + exit 1 +fi + +filtered=$(echo $* | sed "s/[^a-Z0-9= _.\-]//Ig") + +randfile="$(mktemp)" + +trap "rm -f $randfile" SIGINT SIGTERM EXIT + +myarg=$(echo $filtered | sed -e "s/ / -F /g") + +mc-puppi deploy -I $1 $2 | tee $randfile +grep FAILED $randfile && exit 1 +exit 0 + diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/puppi/files/scripts/archive.sh b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/puppi/files/scripts/archive.sh new file mode 100644 index 00000000000..7448613d391 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/puppi/files/scripts/archive.sh @@ -0,0 +1,168 @@ +#!/bin/bash +# archive.sh - Made for Puppi + +# Sources common header for Puppi scripts +. $(dirname $0)/header || exit 10 + +# Show help +showhelp () { + echo "This script is used to backup or restore contents to/from puppi archivedir" + echo "It has the following options:" + echo "-b - Backups the files to be changed in the defined directory" + echo "-r - Recovers file to the provided destination" + echo "-s - Specifies the backup strategy (move or copy files)" + echo "-t - Specifies a tag to be used for the backup" + echo "-d - Specifies the runtime variable that defines the predeploy dir" + echo "-c - Specifies if you want compressed (tar.gz) archives. Default: yes" + echo "-o 'options' - Specifies the rsync options to use during backup. Use it to specify custom " + echo " exclude patterns of files you don't want to archive, for example" + echo "-m - Specifies the backup type: 'full' backups all the files in backup_source," + echo " 'diff' backups only the files deployed" + echo "-n - Number of copies of backups to keep on the filesystem. Default 5" + echo + echo "Examples:" + echo "archive.sh -b /var/www/html/my_app -t html -c yes" +} + +# Arguments check +if [ "$#" = "0" ] ; then + showhelp + exit +fi + +# Default settings +compression=yes +backuptag=all +strategy=copy +backupmethod=full +bakret=5 + +while [ $# -gt 0 ]; do + case "$1" in + -b) + backuproot=$2 +# [ $deploy_root ] && backuproot=$deploy_root # This is needed to allow override of $deploy_root via puppi cmd. But breaks on puppi::project::maven + action=backup + shift 2 ;; + -r) + backuproot=$2 +# [ $deploy_root ] && backuproot=$deploy_root # This is needed to allow override of $deploy_root via puppi cmd. But breaks on puppi::project::maven + action=recovery + shift 2 ;; + -t) + backuptag=$2 + shift 2 ;; + -s) + case "$2" in + mv) strategy="move" ;; + move) strategy="move" ;; + *) strategy="copy" ;; + esac + shift 2 ;; + -m) + case "$2" in + diff) backupmethod="diff" ;; + *) backupmethod="full" ;; + esac + shift 2 ;; + -c) + case "$2" in + yes) compression="yes" ;; + y) compression="yes" ;; + *) compression="none" ;; + esac + shift 2 ;; + -d) + predeploydir="$(eval "echo \${$(echo $2)}")" + shift 2 ;; + -o) + rsync_options=$2 + shift 2 ;; + -n) + bakret=$2 + shift 2 ;; + *) + showhelp + exit + ;; + esac +done + + +# Backup and Restore functions +backup () { + mkdir -p $archivedir/$project/$tag/$backuptag + if [ $archivedir/$project/latest ] ; then + rm -f $archivedir/$project/latest + fi + ln -sf $archivedir/$project/$tag $archivedir/$project/latest + + filelist=$storedir/filelist + cd $predeploydir + find . | cut -c 3- | grep -v "^$" > $filelist + + if [ "$strategy" = "move" ] ; then + for file in $(cat $filelist) ; do + mv $backuproot/$file $archivedir/$project/$tag/$backuptag/ + done + if [ "$backupmethod" = "full" ] ; then + rsync -a $rsync_options $backuproot/ $archivedir/$project/$tag/$backuptag/ + fi + else + if [ "$backupmethod" = "full" ] ; then + rsync -a $rsync_options $backuproot/ $archivedir/$project/$tag/$backuptag/ + else + rsync -a $rsync_options --files-from=$filelist $backuproot/ $archivedir/$project/$tag/$backuptag/ + fi + fi + + if [ "$compression" = "yes" ] ; then + cd $archivedir/$project/$tag/$backuptag/ + tar -czf ../$backuptag.tar.gz . + cd $archivedir/$project/$tag/ + rm -rf $archivedir/$project/$tag/$backuptag/ + fi +} + +recovery () { + if [ ! $rollbackversion ] ; then + echo "Variable rollbackversion must exist!" + exit 2 + fi + + if [ -d $archivedir/$project ] ; then + cd $archivedir/$project + else + echo "Can't find archivedir for this project" + exit 2 + fi + + if [ "$compression" = "yes" ] ; then + cd $backuproot/ + tar -xzf $archivedir/$project/$rollbackversion/$backuptag.tar.gz . + else + rsync -a $rsync_options $rollbackversion/$backuptag/* $backuproot + fi + +} + +delete_old () { + # We don't count the "latest" symlink + bakret=$(expr $bakret + 1 ) + + cd $archivedir/$project + + ddirs=$(ls -1p 2>/dev/null | wc -l) + while [ $ddirs -gt $bakret ] + do + victim=$(ls -tr 2>/dev/null | head -1) + rm -rf $victim && echo "Deleted old $archivedir/$project/$victim" + ddirs=$(ls -1p 2>/dev/null | wc -l) + done +} + +# Action! +case "$action" in + backup) backup ; delete_old ;; + recovery) recovery ;; +esac diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/puppi/files/scripts/check_project.sh b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/puppi/files/scripts/check_project.sh new file mode 100644 index 00000000000..1f1c1d6d9b1 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/puppi/files/scripts/check_project.sh @@ -0,0 +1,45 @@ +#!/bin/bash +# check_project.sh - Made for Puppi +# This script runs the checks defined in $projectsdir/$project/check and then in $checksdir +# It can be used to automatically run tests during the deploy procedure + +# Sources common header for Puppi scripts +. $(dirname $0)/header || exit 10 + +# Main functions +handle_check () { + RETVAL=$? + if [ "$RETVAL" = "1" ] ; then + EXITWARN="1" + fi + if [ "$RETVAL" = "2" ] ; then + EXITCRIT="1" + fi +} + +check () { + for command in $(ls -v1 $projectsdir/$project/check) ; do + "$projectsdir/$project/check/$command" + handle_check + done + + for command in $(ls -v1 $checksdir) ; do + "$checksdir/$command" + handle_check + done +} + +# For nicer output when launched via cli +echo -n "\n" + +# Run checks +check + +# Manage general return code +if [ "$EXITCRIT" = "1" ] ; then + exit 1 +fi + +if [ "$EXITWARN" = "1" ] ; then + exit 1 +fi diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/puppi/files/scripts/checkwardir.sh b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/puppi/files/scripts/checkwardir.sh new file mode 100644 index 00000000000..7e1b79228ef --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/puppi/files/scripts/checkwardir.sh @@ -0,0 +1,63 @@ +#!/bin/bash +# checkwardir.sh - Made for Puppi + +# Sources common header for Puppi scripts +. $(dirname $0)/header || exit 10 + +# Show help +showhelp () { + echo "This script is used to check if a webapp directory is successfully created or removed" + echo " after the (un)deploy of a war file" + echo "It implies that a directory with the name of the war file is created in the same path" + echo "-p - Waits until war created dir is present" + echo "-a - Wait until war created dir is absent" + echo "-s - Wait some more seconds after the check" + echo "-c - Name of the runtime config variable that contains the warname" + echo "Examples:" + echo "checkwardir.sh -p /store/tomcat/myapp/webapps/myapp.war" + echo "checkwardir.sh -a /store/tomcat/myoldapp/webapps/myoldapp.war" +} + +seconds=2 + +while [ $# -gt 0 ]; do + case "$1" in + -s) + seconds=$2 + shift 2 + ;; + -p) + check="present" + warname=$2 + shift 2 + ;; + -a) + check="absent" + warname=$2 + shift 2 + ;; + -c) + warname="$(eval "echo \${$(echo ${2})}")" + shift 2 + ;; + *) + showhelp + exit + ;; + esac +done + +checkdir () { + wardir=${warname%\.*} + while true + do + if [ $check == absent ] ; then + [ ! -d $wardir ] && break + else + [ -f $wardir/WEB-INF/web.xml ] && break + fi + sleep $seconds + done +} + +checkdir diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/puppi/files/scripts/clean_filelist.sh b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/puppi/files/scripts/clean_filelist.sh new file mode 100644 index 00000000000..40edae99204 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/puppi/files/scripts/clean_filelist.sh @@ -0,0 +1,35 @@ +#!/bin/bash +# clean_filelist.sh - Made for Puppi + +# Sources common header for Puppi scripts +. $(dirname $0)/header || exit 10 + +# Show help +showhelp () { + echo "This script is used to cleanup a list of files to download from unwanted data" + echo "It has 1 optional argument:" + echo "The prefix, present in the list, to cut out when defining files to deploy" + echo "The list file is defined as $downloadedfile , these variables are gathered from the Puppi runtime" + echo " config file." + echo + echo "Example:" + echo "clean_filelist.sh http://svn.example42.com/myproject" +} + + +if [ $1 ] ; then + prefix=$1 +else + prefix="" +fi + +deployfilelist=$downloadedfile + +# Clean list +cleanlist () { + + sed -i "s/^$prefix//g" $deployfilelist + +} + +cleanlist diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/puppi/files/scripts/database.sh b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/puppi/files/scripts/database.sh new file mode 100644 index 00000000000..f8d89399d3f --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/puppi/files/scripts/database.sh @@ -0,0 +1,96 @@ +#!/bin/bash +# database.sh - Made for Puppi + +# Sources common header for Puppi scripts +. $(dirname $0)/header || exit 10 + +# Show help +showhelp () { + echo "This script executes database queries and dumps" + echo "It integrates and uses variables provided by other core Puppi scripts" + echo "It has the following options:" + echo "-t The database type. Currently only mysql is suppoerted" + echo "-a The action to perform:" + echo " run - Run a mysql command based on a given .sql file" + echo " dump - Dump the specified database in the archive dir" + echo " restore - Restore the specified database from the archive dir" + echo "-d The database name to manage" + echo "-u The database user used to run the queries" + echo "-p The user password" + echo "-h The database server hostname" +} + +# Arguments defaults +db_type=mysql +db_action=run +db_user=root +db_host=localhost +db_password="" + +# Check Arguments +while [ $# -gt 0 ]; do + case "$1" in + -t) + db_type=$2 + shift 2 ;; + -a) + db_action=$2 + shift 2 ;; + -d) + db_name=$2 + shift 2 ;; + -u) + db_user=$2 + shift 2 ;; + -p) + db_password=$2 + shift 2 ;; + -h) + db_host=$2 + shift 2 ;; + esac +done + + + +mysql_run () { + case "$db_action" in + run) + file $downloadedfile | grep gzip &>/dev/null 2>&1 && sqlfile_type="gzip" + file $downloadedfile | grep Zip &>/dev/null 2>&1 && sqlfile_type="zip" + case "$sqlfile_type" in + gzip) + zcat $downloadedfile | mysql -u $db_user -p$db_password -h $db_host $db_name + check_retcode ;; + zip) + unzip -p $downloadedfile | mysql -u $db_user -p$db_password -h $db_host $db_name + check_retcode ;; + *) + mysql -u $db_user -p$db_password -h $db_host $db_name < $downloadedfile + check_retcode ;; + esac + ;; + dump) + mkdir -p $archivedir/$project/$tag + if [ $archivedir/$project/latest ] ; then + rm -f $archivedir/$project/latest + fi + ln -sf $archivedir/$project/$tag $archivedir/$project/latest + + mysqldump -u $db_user -p$db_password -h $db_host --add-drop-table --databases $db_name | gzip > $archivedir/$project/$tag/$db_name.sql.gz + check_retcode ;; + restore) + zcat $archivedir/$project/$rollbackversion/$db_name.sql.gz | mysql -u $db_user -p$db_password -h $db_host $db_name + check_retcode ;; + esac +} + +case "$db_type" in + mysql) + mysql_run + ;; + *) + showhelp + ;; +esac + diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/puppi/files/scripts/delete.sh b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/puppi/files/scripts/delete.sh new file mode 100644 index 00000000000..d255c6a832a --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/puppi/files/scripts/delete.sh @@ -0,0 +1,26 @@ +#!/bin/bash +# delete.sh - Made for Puppi + +# Sources common header for Puppi scripts +. $(dirname $0)/header || exit 10 + +# Manage script variables +if [ $1 ] ; then + tobedeleted=$1 +else + echo "You must provide a file or directory to delete!" + exit 2 +fi + +if [ "$tobedeleted" = "/" ] ; then + echo "Be Serious!" + exit 2 +fi + +# Move file +move () { + mkdir -p $workdir/$project/deleted + mv $tobedeleted $workdir/$project/deleted +} + +move diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/puppi/files/scripts/deploy.sh b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/puppi/files/scripts/deploy.sh new file mode 100644 index 00000000000..96d3b64c57b --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/puppi/files/scripts/deploy.sh @@ -0,0 +1,59 @@ +#!/bin/bash +# deploy.sh - Made for Puppi + +# Sources common header for Puppi scripts +. $(dirname $0)/header || exit 10 + +# Show help +showhelp () { + echo "This script deploys the files present in the \$predeploydir to the deploy destination dir" + echo "It has the following options:" + echo "\$1 (Required) - Destination directory where to deploy files" + echo "\$2 (Optional) - Name of the variable that identifies a specific predeploydir" + echo + echo "Examples:" + echo "deploy.sh /var/www/html/my_app" + echo "deploy.sh /var/www/html/my_app/conf config" +} + +# Check arguments +if [ $1 ] ; then + deploy_destdir=$1 +# This breaks on projects::maven when using more than one deploy destinations +# [ $deploy_root ] && deploy_destdir=$deploy_root +else + showhelp + exit 2 +fi + +# Obtain the value of the variable with name passed as second argument +# If no one is given, we take all the files in $predeploydir +if [ $2 ] ; then + deployfilevar=$2 + deploy_sourcedir="$(eval "echo \${$(echo ${deployfilevar})}")" + if [ "$deploy_sourcedir" = "" ] ; then + exit 0 + fi +else + deploy_sourcedir="$predeploydir" +fi + +# Copy files +deploy () { + case "$debug" in + yes) + rsync -rlptDv $deploy_sourcedir/ $deploy_destdir/ + check_retcode + ;; + full) + rsync -rlptDv $deploy_sourcedir/ $deploy_destdir/ + check_retcode + ;; + *) + rsync -rlptD $deploy_sourcedir/ $deploy_destdir/ + check_retcode + ;; + esac +} + +deploy diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/puppi/files/scripts/deploy_files.sh b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/puppi/files/scripts/deploy_files.sh new file mode 100644 index 00000000000..95bb4ff150b --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/puppi/files/scripts/deploy_files.sh @@ -0,0 +1,69 @@ +#!/bin/bash +# deploy_files.sh - Made for Puppi +# This is an extended version of the deploy script +# It accepts more options to better handle how files are deployed +# in the destination directory + +# Sources common header for Puppi scripts +. $(dirname $0)/header || exit 10 + +# Show help +showhelp () { + echo "This script deploys the files present in the \$predeploydir to the deploy destination dir" + echo "It has the following options:" + echo "-d (Required) - Destination directory where to deploy files" + echo "-p (Optional) - Name of the variable that identifies a specific predeploydir" + echo "-c (Default: false) - If to enabled the --delete option to the rsync command" + echo + echo "Examples:" + echo "deploy_files.sh -d /var/www/html/my_app" + echo "deploy_files.sh -d /var/www/html/my_app/conf -p config" + echo "deploy_files.sh -d /var/www/html/my_app/conf -c true" +} + +deploy_sourcedir="$predeploydir" +clean_destdir="false" + +while [ $# -gt 0 ]; do + case "$1" in + -d) + deploy_destdir=$2 + shift 2 ;; + -p) + deployfilevar=$2 + deploy_sourcedir="$(eval "echo \${$(echo ${deployfilevar})}")" + shift 2 ;; + -c) + clean_destdir=$2 + shift 2 ;; + *) + showhelp + exit + ;; + esac +done + +rsync_delete="" +if [ x$clean_destdir == "xtrue" ] ; then + rsync_delete="--delete" +fi + +# Copy files +deploy () { + case "$debug" in + yes) + rsync -rlptDv $rsync_delete $deploy_sourcedir/ $deploy_destdir/ + check_retcode + ;; + full) + rsync -rlptDv $rsync_delete $deploy_sourcedir/ $deploy_destdir/ + check_retcode + ;; + *) + rsync -rlptD $rsync_delete $deploy_sourcedir/ $deploy_destdir/ + check_retcode + ;; + esac +} + +deploy diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/puppi/files/scripts/execute.sh b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/puppi/files/scripts/execute.sh new file mode 100644 index 00000000000..e63d3050549 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/puppi/files/scripts/execute.sh @@ -0,0 +1,12 @@ +#!/bin/bash +# execute.sh - Made for Puppi +# This script just executes what is passed as argument + +# Sources common header for Puppi scripts +. $(dirname $0)/header || exit 10 + +#parse variables +command=$(eval "echo "$*"") + +#execute command +eval "${command}" diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/puppi/files/scripts/firewall.sh b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/puppi/files/scripts/firewall.sh new file mode 100644 index 00000000000..382542c6e3c --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/puppi/files/scripts/firewall.sh @@ -0,0 +1,63 @@ +#!/bin/bash +# firewall.sh - Made for Puppi + +# Sources common header for Puppi scripts +. $(dirname $0)/header || exit 10 + +# Show help +showhelp () { + echo "This script places a temporary firewall (iptables) rule to block access from the IP defined" + echo "It has the following options:" + echo "\$1 (Required) - Remote Ip address to block (Generally a load balancer" + echo "\$2 (Required) - Local port to block (0 for all ports" + echo "\$3 (Required) - Set on or off to insert or remove the blocking rule" + echo "\$4 (Required) - Number of seconds to sleep after having set the rule" + echo + echo "Examples:" + echo "firewall.sh 10.42.0.1 0 on" + echo "firewall.sh 10.42.0.1 0 off" +} + +# Check arguments +if [ $2 ] ; then + ip=$1 + port=$2 +else + showhelp + exit 2 +fi + +if [ $3 ] ; then + if [ "$3" = "on" ] ; then + action="-I" + elif [ "$3" = "off" ] ; then + action="-D" + else + showhelp + exit 2 + fi +else + showhelp + exit 2 +fi + +if [ $4 ] ; then + delay=$4 +else + delay="1" +fi + +# Block +run_iptables () { + if [ "$port" = "0" ] ; then + iptables $action INPUT -s $ip -j DROP + else + iptables $action INPUT -s $ip -p tcp --dport $port -j DROP + fi +} + +run_iptables +echo "Sleeping for $delay seconds" +sleep $delay + +# Sooner or later this script will have multiOS support diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/puppi/files/scripts/functions b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/puppi/files/scripts/functions new file mode 100644 index 00000000000..38bedcad3fe --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/puppi/files/scripts/functions @@ -0,0 +1,229 @@ +#!/bin/bash +# General Puppi functions + +BOOTUP=color +RES_COL=75 +MOVE_TO_COL="echo -en \\033[${RES_COL}G" +SETCOLOR_SUCCESS="echo -en \\033[0;32m" +SETCOLOR_FAILURE="echo -en \\033[0;31m" +SETCOLOR_WARNING="echo -en \\033[0;33m" +SETCOLOR_NORMAL="echo -en \\033[0;39m" +SETCOLOR_TITLE="echo -en \\033[0;35m" +SETCOLOR_BOLD="echo -en \\033[0;1m" + +echo_success() { + [ "$BOOTUP" = "color" ] && $MOVE_TO_COL + echo -n "[" + [ "$BOOTUP" = "color" ] && $SETCOLOR_SUCCESS + echo -n $" OK " + [ "$BOOTUP" = "color" ] && $SETCOLOR_NORMAL + echo -n "]" + echo -ne "\r" + return 0 +} + +echo_dontdeploy() { + [ "$BOOTUP" = "color" ] && $MOVE_TO_COL + echo -n "[" + [ "$BOOTUP" = "color" ] && $SETCOLOR_SUCCESS + echo -n $" NO NEED TO DEPLOY " + [ "$BOOTUP" = "color" ] && $SETCOLOR_NORMAL + echo -n "]" + echo -ne "\r" + return 0 +} + +echo_failure() { + [ "$BOOTUP" = "color" ] && $MOVE_TO_COL + echo -n "[" + [ "$BOOTUP" = "color" ] && $SETCOLOR_FAILURE + echo -n $"FAILED" + [ "$BOOTUP" = "color" ] && $SETCOLOR_NORMAL + echo -n "]" + echo -ne "\r" + return 1 +} + +echo_passed() { + [ "$BOOTUP" = "color" ] && $MOVE_TO_COL + echo -n "[" + [ "$BOOTUP" = "color" ] && $SETCOLOR_WARNING + echo -n $"PASSED" + [ "$BOOTUP" = "color" ] && $SETCOLOR_NORMAL + echo -n "]" + echo -ne "\r" + return 1 +} + +echo_warning() { + [ "$BOOTUP" = "color" ] && $MOVE_TO_COL + echo -n "[" + [ "$BOOTUP" = "color" ] && $SETCOLOR_WARNING + echo -n $"WARNING" + [ "$BOOTUP" = "color" ] && $SETCOLOR_NORMAL + echo -n "]" + echo -ne "\r" + return 1 +} + +echo_title () { + echo + echo + [ "$BOOTUP" = "color" ] && $SETCOLOR_TITLE + echo "$1" + [ "$BOOTUP" = "color" ] && $SETCOLOR_NORMAL +} + +check_retcode () { + if [ $? = "0" ] ; then + true + else + exit 2 + fi +} + +handle_result () { + RETVAL=$? + if [ "$RETVAL" = "0" ] ; then + showresult="echo_success" + result="OK" + fi + if [ "$RETVAL" = "1" ] ; then + showresult="echo_warning" + EXITWARN="1" + result="WARNING" + fi + if [ "$RETVAL" = "2" ] ; then + showresult="echo_failure" + EXITCRIT="1" + result="CRITICAL" + fi + if [ "$RETVAL" = "99" ] ; then + showresult="echo_dontdeploy" + DONTDEPLOY="1" + result="OK" + fi + if [ x$show == "xyes" ] ; then + $showresult + echo + echo -e "$output" + echo + elif [ x$show == "xfail" ] && [ x$RETVAL != "x0" ] ; then + $showresult + echo + echo -e "$output" + echo + fi + + # Output to file + if [ ! -d $logdir/$project/$tag ] ; then + mkdir -p $logdir/$project/$tag + fi + let counter=counter+1 + echo $title > $logdir/$project/$tag/$counter-$command + echo $code >> $logdir/$project/$tag/$counter-$command + echo $result >> $logdir/$project/$tag/$counter-$command + echo $output >> $logdir/$project/$tag/$counter-$command + +} + + +# Function taken from http://www.threadstates.com/articles/parsing_xml_in_bash.html +xml_parse () { + local tag=$1 + local xml=$2 + + # Find tag in the xml, convert tabs to spaces, remove leading spaces, remove the tag. + grep $tag $xml | \ + tr '\011' '\040' | \ + sed -e 's/^[ ]*//' \ + -e 's/^<.*>\([^<].*\)<.*>$/\1/' +} + +# Stores the passed arguments in Project runtime config file +# Only if the parameter is not already defined +# Usage: +# save_runtime_config parameter=value # Sets or overrides parameter +# save_runtime_config parameter=value notforce # Sets parameters only if is not already set +save_runtime_config () { + parameter=$(echo $1 | cut -d '=' -f1) + value=$(echo $1 | cut -d '=' -f2-) + force=$2 + + if [[ ! $(grep $parameter $workdir/$project/config) ]] ; then + echo >> $workdir/$project/config + echo "# Added by $0" >> $workdir/$project/config + echo "$parameter=\"$value\"" >> $workdir/$project/config + else +# sed -i "/^$parameter=/d" $workdir/$project/config # No real need to remove lines with old configs + if [[ x$force == xnotforce ]] ; then + echo >> $workdir/$project/config + echo "# CHANGE NOT FORCED by $0" >> $workdir/$project/config + echo "# $parameter=\"$value\"" >> $workdir/$project/config + else + echo >> $workdir/$project/config + echo "# CHANGED by $0" >> $workdir/$project/config + echo "$parameter=\"$value\"" >> $workdir/$project/config + fi + fi + +} + +# Adds a runtime comment to Project runtime config file +save_runtime_comment () { + echo >> $workdir/$project/config + echo "# Added by $0" >> $workdir/$project/config + echo " ## $1" >> $workdir/$project/config +} + + +# Stores the passed arguments in Project runtime config file +# Forces parameter overwrite if already defined +overwrite_runtime_config () { + echo "$1" >> $workdir/$project/config +} + +ask_interactive () { + if [ x$show == "xyes" ] ; then + echo -n $title + fi + + if [ "$interactive" = "yes" ] ; then + echo + echo "INTERACTIVE MODE: Press 'x' to exit or just return to go on" + read press + case $press in + x) exit 2 ;; + *) return + esac + fi +} + +# Shows or executes a command +show_command () { + echo + $SETCOLOR_BOLD ; echo "$HOSTNAME: $*" ; $SETCOLOR_NORMAL + + bash -c "$*" + +# Grep filter at show_command level +# if [ ! -z "$greppattern" ] ; then +# bash -c "$*" | grep $greppattern +# else +# bash -c "$*" +# fi +} + +# Filtering out only: $ ; ` | < > +shell_filter () { + echo $1 | sed 's/\$//g' | sed 's/;//g' | sed 's/`//g' | sed 's/|//g' | sed 's///g' +} + +shell_filter_strict () { +# Filtering out: $ ; ` | < > = ! { } [ ] / \ # & + echo $1 | sed 's/\$//g' | sed 's/;//g' | sed 's/`//g' | sed 's/|//g' | sed 's///g' | sed 's/=//g' | sed 's/!//g' | sed 's/{//g' | sed 's/}//g' | sed 's/\[//g' | sed 's/\]//g' | sed 's/\///g' | sed 's/\\//g' | sed 's/#//g' | sed 's/&//g' + +# Filtering out: all but accepted chars +# echo $1 | sed "s/[^a-Z0-9_\-]//Ig" +} + diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/puppi/files/scripts/get_file.sh b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/puppi/files/scripts/get_file.sh new file mode 100644 index 00000000000..9afe577e2c6 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/puppi/files/scripts/get_file.sh @@ -0,0 +1,165 @@ +#!/bin/bash +# get_file.sh - Made for Puppi + +# Sources common header for Puppi scripts +. $(dirname $0)/header || exit 10 + +# Show help +showhelp () { + echo "This script is used to retrieve the file defined after the -s parameter" + echo "The source specified can be any of these:" + echo " file://local/file/path" + echo " http(s)://my.server/file/path" + echo " ssh://user@my.server/file/path" + echo " svn://user:password@my.server/file/path" + echo "Note: Avoid using chars like : / and @ outside the Uri standards paths" + echo + echo "It has the following options:" + echo "-s - The URL of the file to get" + echo "-t - The type of file that is retrieved: list|tarball|maven-metadata|dir" + echo "-d - An alternative destination directory (default is automatically chosen)" + echo "-a - If 'no' return a special error code (99) if the download checksum is the same of the one previously downloaded" + echo "-u - in case of type http, specify a http_user for curl" + echo "-p - in case of type http, specifiy http_user for curl" + echo "-k - tell curl not to validate ssl certs" + echo " This option can be used for automatic deploys (ie via cron) that actually deploy only new changes" +} + +while [ $# -gt 0 ]; do + case "$1" in + -s) + type=$(echo $2 | cut -d':' -f1) + url=$2 + downloadfilename=$(basename $2) + downloaddir=$predeploydir + shift 2 ;; + -t) + case $2 in + # This logic is applied: + # In $predeploydir go ($workdir/$project/deploy) go file that have to be deployed + # In $storedir go ($workdir/$project/store) go support files as tarballs or lists + list) + downloaddir=$storedir + save_runtime_config "source_type=list" + ;; + tarball) + downloaddir=$storedir + save_runtime_config "source_type=tarball" + ;; + tar) + downloaddir=$storedir + save_runtime_config "source_type=tar" + ;; + zip) + downloaddir=$storedir + save_runtime_config "source_type=zip" + ;; + maven-metadata) + downloaddir=$storedir + save_runtime_config "source_type=maven" + ;; + dir) + downloaddir=$predeploydir + save_runtime_config "source_type=dir" + ;; + war) + downloaddir=$predeploydir + save_runtime_config "source_type=war" + ;; + mysql) + downloaddir=$storedir + save_runtime_config "source_type=mysql" + ;; + gz) + downloaddir=$storedir + save_runtime_config "source_type=gz" + ;; + esac + shift 2 ;; + -d) + # Enforces and overrides and alternative downloaddir + downloaddir=$2 + shift 2 ;; + -a) + alwaysdeploy=$2 + shift 2 ;; + -u) + http_user=$2 + shift 2 ;; + -p) + http_password=$2 + shift 2 ;; + -k) + ssl_arg=$1 + shift 1 ;; + *) + showhelp + exit + ;; + esac +done + +# Define what to use for downloads +cd $downloaddir + +case $type in + s3) + s3cmd get $url + check_retcode + save_runtime_config "downloadedfile=$downloaddir/$downloadfilename" + ;; + ssh|scp) + # ssh://user@my.server/file/path + scpuri=$(echo $url | cut -d'/' -f3-) + scpconn=$(echo $scpuri | cut -d'/' -f1) + scppath=/$(echo $scpuri | cut -d'/' -f2-) + rsync -rlptD -e ssh $scpconn:$scppath . + check_retcode + save_runtime_config "downloadedfile=$downloaddir/$downloadfilename" + ;; + http|https) + if [ -z "$http_password" ] ; then + curl $ssl_arg -s -f -L "$url" -O + else + curl $ssl_arg -s -f -L --anyauth --user $http_user:$http_password "$url" -O + fi + check_retcode + save_runtime_config "downloadedfile=$downloaddir/$downloadfilename" + ;; + svn) + svnuri=$(echo $url | cut -d'/' -f3-) + svnusername=$(echo $svnuri | cut -d':' -f1) + svnpassword=$(echo $svnuri | cut -d':' -f2 | cut -d'@' -f1) + svnserver=$(echo $svnuri | cut -d'@' -f2 | cut -d'/' -f1) + svnpath=/$(echo $svnuri | cut -d'@' -f2 | cut -d'/' -f2-) + mkdir -p $(dirname $svnpath) + svn export --force --username="$svnusername" --password="$svnpassword" svn://$svnserver/$svnpath $downloaddir + check_retcode + save_runtime_config "downloadedfile=$downloaddir/$downloadfilename" + ;; + file) + # file:///file/path + filesrc=$(echo $url | cut -d '/' -f3-) + rsync -rlptD $filesrc . + check_retcode + save_runtime_config "downloadedfile=$downloaddir/$downloadfilename" + ;; + rsync) + rsync -a "$url" . + # rsync -rlptD $url . # Why not preserving users/groups? + check_retcode + save_runtime_config "downloadedfile=$downloaddir/$downloadfilename" + ;; + +esac + +if [ x$alwaysdeploy == "xno" ] ; then + # Here is checked the md5sum of the downloaded file against a previously save one + # If the sums are the same the scripts exits 99 and puppi will stop the deploy without any warning or notification + [ -d $archivedir/$project ] || mkdir -p $archivedir/$project + touch $archivedir/$project/md5sum + md5sum $downloaddir/$downloadfilename > $workdir/$project/md5sum_downloaded + cat $archivedir/$project/md5sum > $workdir/$project/md5sum_deployed + diff $workdir/$project/md5sum_downloaded $workdir/$project/md5sum_deployed && exit 99 + md5sum $downloaddir/$downloadfilename > $archivedir/$project/md5sum +fi diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/puppi/files/scripts/get_filesfromlist.sh b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/puppi/files/scripts/get_filesfromlist.sh new file mode 100644 index 00000000000..2f5eea17942 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/puppi/files/scripts/get_filesfromlist.sh @@ -0,0 +1,67 @@ +#!/bin/bash +# get_filesfromlist.sh - Made for Puppi + +# Sources common header for Puppi scripts +. $(dirname $0)/header || exit 10 + +# Show help +showhelp () { + echo "This script is used to retrieve the files present in a text file list." + echo "It has 1 required argument:" + echo "First argument (\$1 - required) is the base url (in URI format) from where to retrieve the files defined in the list" + echo "The list file is defined as \$downloadedfile , these variables are gathered from the Puppi runtime" + echo " config file." + echo + echo "Examples: " + echo "get_filesfromlist.sh http://svn.example42.com/myproject" + echo "get_filesfromlist.sh file:///mount/wwwdata/myproject" + echo "get_filesfromlist.sh ssh://user@server/var/www/myproject" + echo "get_filesfromlist.sh svn://user:password@server/repo/myproject" +} + + +if [ $1 ] ; then + baseurl=$1 + type=$(echo $1 | cut -d':' -f1) +else + showhelp + exit 2 +fi + + +# Download files +downloadfiles () { + + cd $predeploydir + + for file in $(cat $downloadedfile | grep -v "^#" | grep -v "^$" ) ; do + filepath=$file + filedir=$(dirname $filepath) + mkdir -p $filedir + check_retcode + + case $type in + ssh|scp) + scp "$baseurl:$filepath" $filepath + check_retcode + ;; + http|https|file) + curl -s -f "$baseurl/$filepath" -o $filepath + check_retcode + ;; + svn) + svnuri=$(echo $baseurl/$filepath | cut -d'/' -f3-) + svnusername=$(echo $svnuri | cut -d':' -f1) + svnpassword=$(echo $svnuri | cut -d':' -f2 | cut -d'@' -f1) + svnserver=$(echo $svnuri | cut -d'@' -f2 | cut -d'/' -f1) + svnpath=/$(echo $svnuri | cut -d'@' -f2 | cut -d'/' -f2-) + mkdir -p $(dirname $svnpath) + svn export --force --username="$svnusername" --password="$svnpassword" http://$svnserver/$svnpath $(dirname $svnpath) + check_retcode + ;; + esac + + done +} + +downloadfiles diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/puppi/files/scripts/get_maven_files.sh b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/puppi/files/scripts/get_maven_files.sh new file mode 100644 index 00000000000..43e5647561f --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/puppi/files/scripts/get_maven_files.sh @@ -0,0 +1,99 @@ +#!/bin/bash +# get_maven_files.sh - Made for Puppi +# This script retrieves the files to deploy from a Maven repository. +# It uses variables defined in the general and project runtime configuration files. +# It uses curl to retrieve files so the $1 argument (base url of the maven repository) +# has to be in curl friendly format +# It has the following options: +# -u - in case of type http, specify a http_user for curl +# -p - in case of type http, specifiy http_user for curl + +# Sources common header for Puppi scripts +. $(dirname $0)/header || exit 10 + +while [ $# -gt 0 ]; do + case "$1" in + -u) + http_user=$2 + shift 2 ;; + -p) + http_password=$2 + shift 2 ;; + *) + url=$1 + ftype=$2 + shift 2 ;; + esac +done + +# Obtain the value of the variable with name passed as second argument +# If no one is given, we take all the files in storedir + +#echo "Download and deploy $2 ? (Y/n)" +#read press +#case $press in +# Y|y) true ;; +# N|n) save_runtime_config "predeploydir_$2=" ; exit 0 +#esac + +if [ $debug ] ; then + tarcommand="tar -xvf" +else + tarcommand="tar -xf" +fi + +if [ $debug ] ; then + zipcommand="unzip" +else + zipcommand="unzip -q" +fi + +cd $storedir + +if [ -z "$http_password" ] ; then + authparam="" +else + authparam="--anyauth --user $http_user:$http_password" +fi + +case $ftype in + warfile) + curl -s -f $authparam "$url/$version/$warfile" -O + check_retcode + cp -a $warfile $predeploydir/$artifact.war + save_runtime_config "deploy_warpath=$deploy_root/$artifact.war" + ;; + jarfile) + curl -s -f $authparam "$url/$version/$jarfile" -O + check_retcode + cp -a $jarfile $predeploydir/$artifact.jar + save_runtime_config "deploy_jarpath=$deploy_root/$artifact.jar" + ;; + configfile) + curl -s -f $authparam "$url/$version/$configfile" -O + check_retcode + mkdir $workdir/$project/deploy_configfile + cd $workdir/$project/deploy_configfile + $tarcommand $storedir/$configfile + check_retcode + save_runtime_config "predeploydir_configfile=$workdir/$project/deploy_configfile" + ;; + srcfile) + curl -s -f $authparam "$url/$version/$srcfile" -O + check_retcode + mkdir $workdir/$project/deploy_srcfile + cd $workdir/$project/deploy_srcfile + $tarcommand $storedir/$srcfile + check_retcode + save_runtime_config "predeploydir_srcfile=$workdir/$project/deploy_srcfile" + ;; + zipfile) + curl -s -f $authparam "$url/$version/$zipfile" -O + check_retcode + mkdir $workdir/$project/deploy_zipfile + cd $workdir/$project/deploy_zipfile + $zipcommand $storedir/$zipfile + check_retcode + save_runtime_config "predeploydir_zipfile=$workdir/$project/deploy_zipfile" + ;; +esac diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/puppi/files/scripts/get_metadata.sh b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/puppi/files/scripts/get_metadata.sh new file mode 100644 index 00000000000..79dc97ca38e --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/puppi/files/scripts/get_metadata.sh @@ -0,0 +1,124 @@ +#!/bin/bash +# get_metadata.sh - Made for Puppi + +# Sources common header for Puppi scripts +. $(dirname $0)/header || exit 10 + +# Show help +showhelp () { + echo "This script retrieves some metadata from the downwloaded files " + echo "The metadatasource is automatically detected from the \$source_type runtime config" + echo + echo "It has some, not required, options:" + echo "-m - The string to use as *fix in custom metadata info provided " + echo "-mc - The string to use as qualifier for Maven metadata config tars" + echo "-mj - The string to use as qualifier for Maven metadata jars" + echo "-mw - The string to use as qualifier for Maven metadata wars" + echo "-mz - The string to use as qualifier for Maven metadata zips" + echo "-at - The type to obtain the artifact, should be \"release\", " + echo " \"latest\", \"snapshot\" or a specific version (e.g. \"2.5.0\")" +} + +while [ $# -gt 0 ]; do + case "$1" in + -m) + suffix=$2 + shift 2 ;; + -mc) + config_suffix=$2 + shift 2 ;; + -mj) + jar_suffix=$2 + shift 2 ;; + -mw) + war_suffix=$2 + shift 2 ;; + -mz) + zip_suffix=$2 + shift 2 ;; + -at) + artifact_type=$2 + shift 2 ;; + -h) + showhelp ;; + esac +done + +# validating input +# see http://docs.codehaus.org/display/MAVEN/Repository+Metadata for specs +case $artifact_type in + release) + ;; + latest) + ;; + snapshot) + ;; + *) + # defaulting to version + version=$artifact_type + ;; +esac + +case $source_type in + list) + if [ -z $suffix ] ; then + suffix="####" + fi + # TODO Make this more secure, for God's sake! + for param in $(cat $downloadedfile | grep "^$suffix" ) ; do + save_runtime_comment $param + done + ;; + tarball) + ;; + maven) + [ ${#version} -eq 0 ] && version=$(xml_parse $artifact_type $downloadedfile ) + artifact=$(xml_parse artifactId $downloadedfile ) + + # Definition of qualifiers for Maven has changed from the (wrong) assumption + # of having cfg-$suffix and src-$suffix for staticfiles and config tarballs + # to a more flexible management of qualifiers names with two different params (-m and -mc) + # The "suffixnotset" string is passed by default by the Puppi maven define + # YES, it's crap. + if [[ x$suffix != "xsuffixnotset" ]] ; then + srcfile=$artifact-$version-$suffix.tar + else + srcfile=$artifact-$version.tar + fi + + if [[ x$config_suffix != "xsuffixnotset" ]] ; then + configfile=$artifact-$version-$config_suffix.tar + else + configfile=$artifact-$version.tar + fi + + if [[ x$jar_suffix != "xsuffixnotset" ]] ; then + jarfile=$artifact-$version-$jar_suffix.jar + else + jarfile=$artifact-$version.jar + fi + + if [[ x$war_suffix != "xsuffixnotset" ]] ; then + warfile=$artifact-$version-$war_suffix.war + else + warfile=$artifact-$version.war + fi + + if [[ x$zip_suffix != "xsuffixnotset" ]] ; then + zipfile=$artifact-$version-$zip_suffix.zip + else + zipfile=$artifact-$version.zip + fi + + # Store metadata + save_runtime_config "version=$version" + save_runtime_config "artifact=$artifact" + # Store filenames + save_runtime_config "zipfile=$zipfile" + save_runtime_config "warfile=$warfile" + save_runtime_config "jarfile=$jarfile" + save_runtime_config "srcfile=$srcfile" + save_runtime_config "configfile=$configfile" + ;; +esac + diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/puppi/files/scripts/git.sh b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/puppi/files/scripts/git.sh new file mode 100644 index 00000000000..08b8c338a41 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/puppi/files/scripts/git.sh @@ -0,0 +1,176 @@ +#!/bin/bash +# git.sh - Made for Puppi + +# All variables are exported +set -a + +# Sources common header for Puppi scripts +. $(dirname $0)/header || exit 10 + +# Show help +showhelp () { + echo "This script performs the git operations required by puppi::project::git" + echo "It integrates and uses variables provided by other core Puppi scripts" + echo "It has the following options:" + echo "-a (Optional) What action to perform. Available options: deploy (default), rollback" + echo "-s (Required) Git source repo to use" + echo "-d (Required) Directory where files are deployed" + echo "-u (Optional) User that performs the deploy operations. Default root" + echo "-gs (Optional) If only a specific subdir of the gitrepo has to be copied to the install destination" + echo "-t (Optional) Tag to deploy" + echo "-b (Optional) Branch to deploy" + echo "-c (Optional) Commit to deploy" + echo "-v (Optional) If verbose" + echo "-k (Optional) If .git dir is kept on deploy_root" + echo + echo "Examples:" + echo "git.sh -a deploy -s $source -d $deploy_root -u $user -gs $git_subdir -t $tag -b $branch -c $commit -v $bool_verbose -k $bool_keep_gitdata" +} + +verbose="true" + +# Check Arguments +while [ $# -gt 0 ]; do + case "$1" in + -a) + case $2 in + rollback) + action="rollback" + ;; + *) + action="install" + ;; + esac + shift 2 ;; + -s) + if [ $source ] ; then + source=$source + else + source=$2 + fi + shift 2 ;; + -d) + if [ $deploy_root ] ; then + deploy_root=$deploy_root + else + deploy_root=$2 + fi + shift 2 ;; + -u) + if [ $user ] ; then + deploy_user=$user + else + deploy_user=$2 + fi + shift 2 ;; + -gs) + if [ $git_subdir ] ; then + git_subdir=$git_subdir + else + git_subdir=$2 + fi + shift 2 ;; + -t) + if [ $git_tag ] ; then + git_tag=$git_tag + else + git_tag=$2 + fi + shift 2 ;; + -b) + if [ $branch ] ; then + branch=$branch + else + branch=$2 + fi + shift 2 ;; + -c) + if [ $commit ] ; then + commit=$commit + else + commit=$2 + fi + shift 2 ;; + -v) + if [ $verbose ] ; then + verbose=$verbose + else + verbose=$2 + fi + shift 2 ;; + -k) + if [ $keep_gitdata ] ; then + keep_gitdata=$keep_gitdata + else + keep_gitdata=$2 + fi + shift 2 ;; + *) + showhelp + exit ;; + esac +done + +if [ "x$verbose" == "xtrue" ] ; then + verbosity="" +else + verbosity="--quiet" +fi + +cd / + +gitsubdir="" +gitdir=$deploy_root +if [ "x$keep_gitdata" != "xtrue" ] ; then + if [ ! -d $archivedir/$project-git ] ; then + mkdir $archivedir/$project-git + chown -R $deploy_user:$deploy_user $archivedir/$project-git + fi + gitdir=$archivedir/$project-git/gitrepo +fi +if [ "x$git_subdir" != "xundefined" ] ; then + if [ ! -d $archivedir/$project-git ] ; then + mkdir $archivedir/$project-git + chown -R $deploy_user:$deploy_user $archivedir/$project-git + fi + gitdir=$archivedir/$project-git + gitsubdir="$git_subdir/" +fi + +do_install () { + if [ -d $gitdir/.git ] ; then + cd $gitdir + git pull $verbosity origin $branch + git checkout $verbosity $branch + if [ "x$?" != "x0" ] ; then + git checkout -b $verbosity $branch + fi + else + git clone $verbosity --branch $branch --recursive $source $gitdir + cd $gitdir + fi + + if [ "x$git_tag" != "xundefined" ] ; then + git checkout $verbosity $git_tag + fi + + if [ "x$commit" != "xundefined" ] ; then + git checkout $verbosity $commit + fi + + if [ "x$gitdir" == "x$archivedir/$project-git" ] ; then + rsync -a --exclude=".git" $gitdir/$gitsubdir $deploy_root/ + fi + +} + +do_rollback () { + + echo "Rollback not yet supported" +} + +# Action! +case "$action" in + install) export -f do_install ; su $deploy_user -c do_install ;; + rollback) do_rollback ;; +esac diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/puppi/files/scripts/header b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/puppi/files/scripts/header new file mode 100644 index 00000000000..9b04824109b --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/puppi/files/scripts/header @@ -0,0 +1,25 @@ +configfile="/etc/puppi/puppi.conf" + +# Load general configurations +if [ ! -f $configfile ] ; then + echo "Config file: $configfile not found" + exit 2 +else + . $configfile + . $scriptsdir/functions +fi + +# Load project runtime configuration +projectconfigfile="$workdir/$project/config" +if [ ! -f $projectconfigfile ] ; then + echo "Project runtime config file: $projectconfigfile not found" + exit 2 +else + . $projectconfigfile +fi + +# Activate debug +case "$debug" in + yes) set -x ;; + full) set -xv ;; +esac diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/puppi/files/scripts/predeploy.sh b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/puppi/files/scripts/predeploy.sh new file mode 100644 index 00000000000..0af50314ffa --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/puppi/files/scripts/predeploy.sh @@ -0,0 +1,95 @@ +#!/bin/bash +# predeploy.sh - Made for Puppi + +# Sources common header for Puppi scripts +. $(dirname $0)/header || exit 10 + +# Show help +showhelp () { + echo "This script prepares the contents of the predeploy directory" + echo "It integrates and uses variables provided by other core Puppi scripts" + echo "It has the following options:" + echo "-v (optional) Name of the variable that identifies the file to untar/unzip" + echo " By default is used $downloadedfile" + echo "-t (optional) The type of file that is retrieved: zip|tarball" + echo " By default is used $source_type " + echo "-m (optional) The prefix (directory) you may not want to put in the deploy" + echo " Use this if the zip or tar contain a base dir (as often) and you want to copy" + echo " to the deploy dir only its contents and not the whole directory" + echo + echo "Examples:" + echo "predeploy.sh " + echo "predeploy.sh -t zip" + echo "predeploy.sh -t zip -v myz" +} + + +# Check Arguments +while [ $# -gt 0 ]; do + case "$1" in + -v) + downloadedfile="$(eval "echo \${$(echo ${2})}")" + shift 2 ;; + -t) + source_type=$2 + shift 2 ;; + -m) + predeploy_dirprefix=$2 + shift 2 ;; + esac +done + + + +predeploy () { + cd $predeploydir + case "$source_type" in + tarball) + case "$debug" in + yes|full) + tar -zxvf $downloadedfile + check_retcode + ;; + *) + tar -zxf $downloadedfile + check_retcode + ;; + esac + ;; + zip) + case "$debug" in + yes|full) + unzip $downloadedfile + check_retcode + ;; + *) + unzip -qq $downloadedfile + check_retcode + ;; + esac + ;; + gz) + case "$debug" in + yes|full) + gzip -d $downloadedfile + check_retcode + ;; + *) + gzip -d -q $downloadedfile + check_retcode + ;; + esac + ;; + war) + cp $downloadedfile . + check_retcode + ;; + esac +} + +predeploy + +# Updates predeploydir if a directory prefix exists +if [[ x$predeploy_dirprefix != "x" ]] ; then + save_runtime_config "predeploydir=$predeploydir/$predeploy_dirprefix" +fi diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/puppi/files/scripts/predeploy_tar.sh b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/puppi/files/scripts/predeploy_tar.sh new file mode 100644 index 00000000000..91d28a6b4a3 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/puppi/files/scripts/predeploy_tar.sh @@ -0,0 +1,37 @@ +#!/bin/bash +# predeploy_tar.sh - Made for Puppi + +# Sources common header for Puppi scripts +. $(dirname $0)/header || exit 10 + +# Show help +showhelp () { + echo "This script unpacks (tar) file from the download dir (storedir) to the predeploydir" + echo "It has the following options:" + echo "\$1 (Required) - Name of the variable that identifies the tar to predeploy" + echo + echo "Examples:" + echo "predeploy_tar.sh tarfile" +} + +# Check Arguments +if [ $1 ] ; then + deployfilevar=$1 + deployfile="$(eval "echo \${$(echo ${deployfilevar})}")" +else + showhelp + exit 2 +fi + +# Untar file +untar () { + cd $predeploydir +# file $deployfile | grep gzip 2>&1>/dev/null +# if [ $? == "0"] ; then + tar -zxf $deployfile +# else +# tar -xvf $deployfile +# fi +} + +untar diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/puppi/files/scripts/report_mail.sh b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/puppi/files/scripts/report_mail.sh new file mode 100644 index 00000000000..749462e9f97 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/puppi/files/scripts/report_mail.sh @@ -0,0 +1,27 @@ +#!/bin/bash +# report_mail.sh - Made for Puppi +# This script sends a summary mail to the recipients defined in $1 +# Use a comma separated list for multiple emails + +# Sources common header for Puppi scripts +. $(dirname $0)/header || exit 10 + +# Check arguments & eventually apply runtimeconfig overwrite +recipients=$1 +[ $report_email ] && recipients=$report_email + +# Main functions +mail_send () { + result=$(grep result $logdir/$project/$tag/summary | awk '{ print $NF }') + cat $logdir/$project/$tag/summary | mail -s "[puppi] $result $action of $project on $(hostname)" $recipients +} + +mail_send + +if [ "$EXITCRIT" = "1" ] ; then + exit 2 +fi + +if [ "$EXITWARN" = "1" ] ; then + exit 1 +fi diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/puppi/files/scripts/report_mongo.sh b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/puppi/files/scripts/report_mongo.sh new file mode 100644 index 00000000000..c68ed7d0439 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/puppi/files/scripts/report_mongo.sh @@ -0,0 +1,112 @@ +#!/bin/bash + +# report_mongodb.sh - Made for Puppi +# e.g. somemongohost/dbname + +# Sources common header for Puppi scripts +. $(dirname $0)/header || exit 10 + + +# Show help +showhelp () { + echo "This script reports deployments to a mongo DB." + echo "It has the following options:" + echo "-e - Facter key to identify server environment (default: env)." + echo "If no facter key can be found, the fallback is ''environment''." + echo + echo "Examples:" + echo "deploy_files.sh mongodb://someuser:hispassword@somehost/somedb" + echo "deploy_files.sh -e env mongodb://someuser:hispassword@somehost/somedb" +} + + +env_key="env" +fallback_key="environment" + +while [ $# -gt 0 ]; do + case "$1" in + -e) + env_key=$2 + echo "env_key" + shift 2 ;; + *) + mongourl=$1 + shift 1 + ;; + esac +done + +if [ "$EXITCRIT" = "1" ] ; then + proposed_exit=2 +fi + +if [ "$EXITWARN" = "1" ] ; then + proposed_exit=1 +fi + +# check prerequisites +mongo -version > /dev/null +if [ $? -ne 0 ]; then + echo "mongo-client is not installed, aborting" + exit $proposed_exit +fi + +fqdn=$(facter fqdn) + +environment=$(facter ${env_key} -p) + +if [ -z "${environment} ] +then + environment=$(facter ${fallback_key} -p) +fi + + +# something like mongodb://someuser:hispassword@somehost/somedb + + +if [[ ! $mongourl =~ "mongodb://" ]]; then + echo "WARNING: mongourl invalid! Please use a valid monurl!" + showhelp + exit $proposed_exit +fi + +if [[ $mongourl =~ @ ]]; then + # ok we have to deal with passwords + # you HAVE to provide a password if you provide a user + mongodb=`echo $mongourl | sed 's/.*@//'` + mongouser=`echo $mongourl | sed 's/mongodb:\/\///' | sed 's/:.*//' ` + mongopassword=`echo $mongourl | sed 's/mongodb:\/\///' | sed 's/[^:]*://' | sed 's/@.*//' ` + mongoarguments="--username $mongouser --password $mongopassword" +else + mongodb=`echo $mongourl | sed 's/mongodb:\/\///'` +fi + +result=$(grep result $logdir/$project/$tag/summary | awk '{ print $NF }') +summary=$(cat $logdir/$project/$tag/summary) + +mcmd="db.deployments.insert({ts:new Date(),result:\"${result}\",fqdn:\"${fqdn}\",project:\"${project}\",source:\"${source}\",tag:\"${tag}\",version:\"${version}\",artifact:\"${artifact}\",testmode:\"${testmode}\",warfile:\"${warfile}\",environment:\"${environment}\"}); quit(0)" + + +mongo $mongoarguments $mongodb --eval "$mcmd" + +# Now do a reporting to enable "most-recent-versions on all servers" + +read -r -d '' mcmd <<'EOF' +var map = function() { + project=this.project ; + emit( this.fqdn +":"+ this.project, {project:this.project, fqdn:this.fqdn, ts:this.ts,version:this.version,environment:this.environment} ); +}; +var reduce = function(k,vals) { + result = vals[0]; + vals.forEach(function(val) { if (val.ts > result.ts) result=val } ) ; + return result; +}; +db.deployments.mapReduce( + map, + reduce, + {out:{replace:"versions"}}) +EOF + +mongo $mongoarguments $mongodb --eval "$mcmd" + +exit $proposed_exit diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/puppi/files/scripts/service.sh b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/puppi/files/scripts/service.sh new file mode 100644 index 00000000000..1105d25d6c2 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/puppi/files/scripts/service.sh @@ -0,0 +1,42 @@ +#!/bin/bash +# service.sh - Made for Puppi + +# Sources common header for Puppi scripts +. $(dirname $0)/header || exit 10 + +# Show help +showhelp () { + echo "This script is used to manage one or more services" + echo "It requires AT LEAST 2 arguments:" + echo "First argument (\$1 - required) is the script command (stop|start|restart|reload)" + echo "Second argument and following (\$2 - required) is the space separated list of sevices to manage" + echo + echo "Examples:" + echo "service.sh stop monit puppet" +} + +# Check arguments +if [ $1 ] ; then + servicecommand=$1 +else + showhelp + exit 2 +fi + + +if [ $# -ge 2 ] ; then + shift + services=$@ +else + showhelp + exit 2 +fi + +# Manage service +service () { + for serv in $services ; do + /etc/init.d/$serv $servicecommand + done +} + +service diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/puppi/files/scripts/svn.sh b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/puppi/files/scripts/svn.sh new file mode 100644 index 00000000000..a2dd4bcf730 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/puppi/files/scripts/svn.sh @@ -0,0 +1,215 @@ +#!/bin/bash +# svn.sh - Made for Puppi + +# All variables are exported +set -a + +# Sources common header for Puppi scripts +. $(dirname $0)/header || exit 10 + +# Show help +showhelp () { + echo "This script performs the svn operations required by puppi::project::svn" + echo "It integrates and uses variables provided by other core Puppi scripts" + echo "It has the following options:" + echo "-a (Optional) What action to perform. Available options: deploy (default), rollback" + echo "-s (Required) Subversion source repo to use" + echo "-d (Required) Directory where files are deployed" + echo "-u (Optional) User that performs the deploy operations. Default root" + echo "-su (Optional) Username for access to private svn repo" + echo "-sp (Optional) Password for access to private svn repo" + echo "-gs (Optional) If only a specific subdir of the svnrepo has to be copied to the install destination" + echo "-t (Optional) Tag to deploy" + echo "-b (Optional) Branch to deploy" + echo "-c (Optional) Commit to deploy" + echo "-v (Optional) If verbose" + echo "-k (Optional) If .svn dir is kept on deploy_root" + echo "-e (Optional) If use export instead of checkout for svn operations" + echo + echo "Examples:" + echo "svn.sh -a deploy -s $source -d $deploy_root -u $user -gs $svn_subdir -t $tag -b $branch -c $commit -v $bool_verbose -k $bool_keep_svndata" +} + +verbose="true" + +# Check Arguments +while [ $# -gt 0 ]; do + case "$1" in + -a) + case $2 in + rollback) + action="rollback" + ;; + *) + action="install" + ;; + esac + shift 2 ;; + -s) + if [ $source ] ; then + source=$source + else + source=$2 + fi + shift 2 ;; + -d) + if [ $deploy_root ] ; then + deploy_root=$deploy_root + else + deploy_root=$2 + fi + shift 2 ;; + -u) + if [ $user ] ; then + deploy_user=$user + else + deploy_user=$2 + fi + shift 2 ;; + -gs) + if [ $svn_subdir ] ; then + svn_subdir=$svn_subdir + else + svn_subdir=$2 + fi + shift 2 ;; + -su) + if [ $svn_user ] ; then + svn_user=$svn_user + else + svn_user=$2 + fi + shift 2 ;; + -sp) + if [ $svn_password ] ; then + svn_password=$svn_password + else + svn_password=$2 + fi + shift 2 ;; + -t) + if [ $svn_tag ] ; then + svn_tag=$svn_tag + else + svn_tag=$2 + fi + shift 2 ;; + -b) + if [ $branch ] ; then + branch=$branch + else + branch=$2 + fi + shift 2 ;; + -c) + if [ $commit ] ; then + commit=$commit + else + commit=$2 + fi + shift 2 ;; + -v) + if [ $verbose ] ; then + verbose=$verbose + else + verbose=$2 + fi + shift 2 ;; + -k) + if [ $keep_svndata ] ; then + keep_svndata=$keep_svndata + else + keep_svndata=$2 + fi + shift 2 ;; + -e) + if [ $svn_export ] ; then + svn_export=$svn_export + else + svn_export=$2 + fi + shift 2 ;; + *) + showhelp + exit ;; + esac +done + +if [ "x$verbose" == "xtrue" ] ; then + verbosity="" +else + verbosity="--quiet" +fi + +cd / + +if [ "x$branch" == "xundefined" ] ; then + branch="trunk" +fi + +real_source="$source/$branch" + +if [ "x$svn_tag" != "xundefined" ] ; then + real_source="$source/$svn_tag" +fi + +if [ "x$svn_user" != "xundefined" ] && [ "x$svn_password" != "xundefined" ] ; then + svn_auth="--username=$svn_user --password=$svn_password" +else + svn_auth="" +fi + +svnsubdir="" +svndir=$deploy_root + + +do_install () { + if [ "x$keep_svndata" != "xtrue" ] ; then + if [ ! -d $archivedir/$project-svn ] ; then + mkdir $archivedir/$project-svn + chown -R $user:$user $archivedir/$project-svn + fi + svndir=$archivedir/$project-svn/svnrepo + fi + if [ "x$svn_subdir" != "xundefined" ] ; then + if [ ! -d $archivedir/$project-svn ] ; then + mkdir $archivedir/$project-svn + chown -R $user:$user $archivedir/$project-svn + fi + svndir=$archivedir/$project-svn + svnsubdir="$svn_subdir/" + fi + + if [ -d $svndir/.svn ] ; then + cd $svndir + svn up $verbosity $svn_auth --non-interactive + else + svn co $verbosity $real_source $svndir $svn_auth --non-interactive + cd $svndir + fi + + if [ "x$svndir" == "x$archivedir/$project-svn" ] ; then + rsync -a --exclude=".svn" $svndir/$svnsubdir $deploy_root/ + fi +} + +do_export () { + svn export $verbosity $svn_auth --force --non-interactive $real_source/$svn_subdir $deploy_root +} + +do_rollback () { + echo "Rollback not yet supported" +} + +# Action! +case "$action" in + install) + if [ "x$svn_export" == "xtrue" ] ; then + export -f do_export ; su $user -c do_export + else + export -f do_install ; su $user -c do_install + fi + ;; + rollback) do_rollback ;; +esac + diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/puppi/files/scripts/wait.sh b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/puppi/files/scripts/wait.sh new file mode 100644 index 00000000000..4e2fe6152d2 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/puppi/files/scripts/wait.sh @@ -0,0 +1,54 @@ +#!/bin/bash +# wait.sh - Made for Puppi + +# Sources common header for Puppi scripts +. $(dirname $0)/header || exit 10 + +# Show help +showhelp () { + echo "This script is used to introduce pauses during the deploy workflow" + echo + echo "It has the following options:" + echo "-s - The number of seconds to wait" + echo "-p - Wait until filename is present" + echo "-a - Wait until filename is absent" + echo "-f - Wait until is found the pattern in the filename" +} + +while [ $# -gt 0 ]; do + case "$1" in + -s) + sleep $2 + exit 0 + ;; + -p) + while true + do + [ -e $2 ] && break + sleep 1 + done + exit 0 + ;; + -a) + while true + do + [ ! -e $2 ] && break + sleep 1 + done + exit 0 + ;; + -f) + while true + do + grep $2 $3 && break + sleep 1 + done + exit 0 + ;; + *) + showhelp + exit + ;; + esac +done + diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/puppi/files/scripts/yant.sh b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/puppi/files/scripts/yant.sh new file mode 100644 index 00000000000..f9934619ea6 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/puppi/files/scripts/yant.sh @@ -0,0 +1,38 @@ +#!/bin/bash +# yant.sh - Made for Puppi +# Sources common header for Puppi scripts +. $(dirname $0)/header || exit 10 + +# Show help +showhelp () { + echo "This script is used to call ant in a hybris-system" + echo "It requires AT LEAST 2 arguments:" + echo "First the \${hybris_parent_dir} where it can find a hybris-directory" + echo "Second argument: Everything you want to pass through to ant" + echo "The script assumes that hybris is located in \${hybris_parent_dir}/hybris" + echo + echo "Examples:" + echo "yant.sh /home/hybris clean all" +} + +# Unfortunately, showhelp will never be called + +cd $1/hybris/bin/platform +. ./setantenv.sh + +# somehow dirty ... +shift + +if [ -d /opt/hybris/config ]; then + template="" +else + template=-Dinput.template=develop +fi + +if [ $debug ] ; then + ant -Dinput.template=develop $* +else + ant $* > /dev/null +fi + +handle_result diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/puppi/files/scripts/yum.sh b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/puppi/files/scripts/yum.sh new file mode 100644 index 00000000000..f649bad93c2 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/puppi/files/scripts/yum.sh @@ -0,0 +1,93 @@ +#!/bin/bash +# yum.sh - Made for Puppi + +# Sources common header for Puppi scripts +. $(dirname $0)/header || exit 10 + +# Show help +showhelp () { + echo "This script performs the yum operations required by puppi::project::yum" + echo "It integrates and uses variables provided by other core Puppi scripts" + echo "It has the following options:" + echo "-a (Optional) What action to perform. Available options: deploy (default), rollback, remove" + echo "-n (Required) Name of the package to handle" + echo "-v (Optional) The version of the rpm to manage. Default: latest" + echo "-r (Optional) The Instll root path. Default: /" + echo + echo "Examples:" + echo "yum.sh -a deploy -n ${rpm} -r ${install_root} -v ${rpm_version}" +} + +rpm_version="latest" +install_root="/" + +# Check Arguments +while [ $# -gt 0 ]; do + case "$1" in + -a) + case $2 in + rollback) + action="rollback" + ;; + remove) + action="remove" + ;; + *) + action="install" + ;; + esac + shift 2 ;; + -n) + rpm_name=$2 + shift 2 ;; + -v) + rpm_version=$2 + shift 2 ;; + -r) + install_root=$2 + shift 2 ;; + *) + showhelp + exit ;; + esac +done + + +do_install () { + if [ x$rpm_version == "xlatest" ] ; then + full_rpm_name=$rpm_name + else + full_rpm_name=$rpm_name-$rpm_version + fi + + # Archives version of the rpm to update + oldversion=$(rpm -q $rpm_name --qf "%{VERSION}-%{RELEASE}\n") + if [ "$?" = "0" ]; then + mkdir -p $archivedir/$project/$oldversion + if [ $archivedir/$project/latest ] ; then + rm -f $archivedir/$project/latest + fi + ln -sf $archivedir/$project/$oldversion $archivedir/$project/latest + fi + + if [ x$install_root != "x/" ] ; then + yum install -y -q --installroot=$install_root $full_rpm_name + else + yum install -y -q $full_rpm_name + fi +} + +do_rollback () { + yum downgrade -y -q $rpm_name-$rollbackversion +} + +do_remove () { + yum remove -y -q $rpm_name +} + +# Action! +case "$action" in + install) do_install ;; + rollback) do_rollback ;; + remove) do_remove ;; +esac diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/puppi/lib/facter/last_run.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/puppi/lib/facter/last_run.rb new file mode 100644 index 00000000000..19869842d9b --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/puppi/lib/facter/last_run.rb @@ -0,0 +1,7 @@ +require 'facter' +Facter.add("last_run") do + confine :kernel => [ 'Linux' , 'SunOS' , 'FreeBSD' , 'Darwin' ] + setcode do + Facter::Util::Resolution.exec('date') + end +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/puppi/lib/facter/puppi_projects.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/puppi/lib/facter/puppi_projects.rb new file mode 100755 index 00000000000..ccd3e3f22b5 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/puppi/lib/facter/puppi_projects.rb @@ -0,0 +1,7 @@ +require 'facter' +Facter.add("puppi_projects") do + confine :kernel => [ 'Linux' , 'SunOS' , 'FreeBSD' , 'Darwin' ] + setcode do + Facter::Util::Resolution.exec('ls `grep projectsdir /etc/puppi/puppi.conf | sed \'s/projectsdir="\([^"]*\)"/\1/\'` | tr \'\n\' \',\' | sed \'s/,$//\'') if File.exists?("/etc/puppi/puppi.conf") + end +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/puppi/lib/facter/windows_common_appdata.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/puppi/lib/facter/windows_common_appdata.rb new file mode 100644 index 00000000000..7a7ca232657 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/puppi/lib/facter/windows_common_appdata.rb @@ -0,0 +1,10 @@ +require 'facter' +Facter.add(:windows_common_appdata) do + confine :operatingsystem => :windows + if Facter.value(:osfamily) == "windows" + require 'win32/dir' + end + setcode do + Dir::COMMON_APPDATA + end +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/puppi/lib/puppet/parser/functions/any2bool.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/puppi/lib/puppet/parser/functions/any2bool.rb new file mode 100644 index 00000000000..a2652cbae27 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/puppi/lib/puppet/parser/functions/any2bool.rb @@ -0,0 +1,44 @@ +# +# any2bool.rb +# +# This define is heavily based on PuppetLabs' stdlib str2bool +# +module Puppet::Parser::Functions + newfunction(:any2bool, :type => :rvalue, :doc => <<-EOS +This converts any input to a boolean. This attempt to convert strings that +contain things like: y, 1, t, true to 'true' and strings that contain things +like: 0, f, n, false, no to 'false'. + EOS + ) do |arguments| + + raise(Puppet::ParseError, "any2bool(): Wrong number of arguments " + + "given (#{arguments.size} for 1)") if arguments.size < 1 + + string = arguments[0] + +# unless string.is_a?(String) +# raise(Puppet::ParseError, 'str2bool(): Requires either ' + +# 'string to work with') +# end + + # We consider all the yes, no, y, n and so on too ... + result = case string + # + # This is how undef looks like in Puppet ... + # We yield false in this case. + # + when false then false + when true then true + when /^$/, '' then false # Empty string will be false ... + when /^(1|t|y|true|yes)$/ then true + when /^(0|f|n|false|no)$/ then false + when /^(undef|undefined)$/ then false # This is not likely to happen ... + else + raise(Puppet::ParseError, 'any2bool(): Unknown type of boolean given') + end + + return result + end +end + +# vim: set ts=2 sw=2 et : diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/puppi/lib/puppet/parser/functions/bool2ensure.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/puppi/lib/puppet/parser/functions/bool2ensure.rb new file mode 100644 index 00000000000..0ebe275e196 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/puppi/lib/puppet/parser/functions/bool2ensure.rb @@ -0,0 +1,32 @@ +# +# bool2ensure.rb +# +# This define return present/absent accroding to the boolean value passed +# +module Puppet::Parser::Functions + newfunction(:bool2ensure, :type => :rvalue, :doc => <<-EOS +This converts any input similar to a boolean to the stringpresent or absent + EOS + ) do |arguments| + + raise(Puppet::ParseError, "bool2ensure(): Wrong number of arguments " + + "given (#{arguments.size} for 1)") if arguments.size < 1 + + string = arguments[0] + + result = case string + when false then "absent" + when true then "present" + when /^$/, '' then "present" + when /^(1|t|y|true|yes)$/ then "present" + when /^(0|f|n|false|no)$/ then "absent" + when /^(undef|undefined)$/ then "present" + else + raise(Puppet::ParseError, 'bool2ensure(): Unknown type of boolean given') + end + + return result + end +end + +# vim: set ts=2 sw=2 et : diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/puppi/lib/puppet/parser/functions/get_class_args.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/puppi/lib/puppet/parser/functions/get_class_args.rb new file mode 100644 index 00000000000..1aad859b3a8 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/puppi/lib/puppet/parser/functions/get_class_args.rb @@ -0,0 +1,32 @@ +# This function is based on Ken Barber's get_scope_args +# It has been slightly changed and renamed to avoid naming clash + +module Puppet::Parser::Functions + newfunction(:get_class_args, :type => :rvalue, :doc => <<-EOS +This function will return all arguments passed to the current scope. This could +be a class or defined resource. + EOS + ) do |arguments| + + if (arguments.size != 0) then + raise(Puppet::ParseError, "validate_resource(): Wrong number of arguments "+ + "given #{arguments.size} for 0") + end + + # Grab the current scope, turn it to a hash but do not be recursive + # about it. + classhash = to_hash(recursive=false) + + # Strip bits that do not matter for validation +# classhash.delete("name") +# classhash.delete("title") +# classhash.delete("caller_module_name") +# classhash.delete("module_name") + + # Return munged classhash + classhash + end +end + +# vim: set ts=2 sw=2 et : + diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/puppi/lib/puppet/parser/functions/get_magicvar.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/puppi/lib/puppet/parser/functions/get_magicvar.rb new file mode 100644 index 00000000000..65a03560b52 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/puppi/lib/puppet/parser/functions/get_magicvar.rb @@ -0,0 +1,23 @@ +# +# get_magicvar.rb +# +# This define return the value of the the provided var name +# +module Puppet::Parser::Functions + newfunction(:get_magicvar, :type => :rvalue, :doc => <<-EOS +This returns the value of the input variable. For example if you input role +it returns the value of $role'. + EOS + ) do |arguments| + + raise(Puppet::ParseError, "get_magicvar(): Wrong number of arguments " + + "given (#{arguments.size} for 1)") if arguments.size < 1 + + my_var = arguments[0] + result = lookupvar("#{my_var}") + result = 'all' if ( result == :undefined || result == '' ) + return result + end +end + +# vim: set ts=2 sw=2 et : diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/puppi/lib/puppet/parser/functions/get_module_path.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/puppi/lib/puppet/parser/functions/get_module_path.rb new file mode 100644 index 00000000000..1421b91f52f --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/puppi/lib/puppet/parser/functions/get_module_path.rb @@ -0,0 +1,17 @@ +module Puppet::Parser::Functions + newfunction(:get_module_path, :type =>:rvalue, :doc => <<-EOT + Returns the absolute path of the specified module for the current + environment. + + Example: + $module_path = get_module_path('stdlib') + EOT + ) do |args| + raise(Puppet::ParseError, "get_module_path(): Wrong number of arguments, expects one") unless args.size == 1 + if module_path = Puppet::Module.find(args[0], compiler.environment.to_s) + module_path.path + else + raise(Puppet::ParseError, "Could not find module #{args[0]} in environment #{compiler.environment}") + end + end +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/puppi/lib/puppet/parser/functions/nslookup.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/puppi/lib/puppet/parser/functions/nslookup.rb new file mode 100644 index 00000000000..33a2f8e7d76 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/puppi/lib/puppet/parser/functions/nslookup.rb @@ -0,0 +1,44 @@ +# +# nslookup.rb +# +# This fuction looks up the ip address of a hostname. +# +# Params: +# * Hostname: (string) The hostname to lookup +# * Type: (string) The DNS type to lookup. Optional. Default: 'AAAA' +# +# Returns: an array with the ip addresses that belong to this hostname +# +# Dolf Schimmel - Freeaqingme +# +module Puppet::Parser::Functions + newfunction(:nslookup, :type => :rvalue, :doc => <<-EOS +Lookup a hostname and return its ip addresses + EOS + ) do |vals| + hostname, type = vals + raise(ArgumentError, 'Must specify a hostname') unless hostname + type = 'AAAA' unless type + + require 'ipaddr' + + if (ip = IPAddr.new(hostname) rescue nil) + if (ip.ipv6? and type == 'AAAA') or (ip.ipv4? and type != 'AAAA') + return hostname + else + return [] + end + end + + typeConst = Resolv::DNS::Resource::IN.const_get "#{type.upcase}" + out = [] + + Resolv::DNS.open do |dns| + dns.getresources(hostname, typeConst).collect {|r| + out << IPAddr::new_ntoh(r.address.address).to_s + } + end + + return out + end +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/puppi/lib/puppet/parser/functions/options_lookup.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/puppi/lib/puppet/parser/functions/options_lookup.rb new file mode 100644 index 00000000000..2acf87ca487 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/puppi/lib/puppet/parser/functions/options_lookup.rb @@ -0,0 +1,56 @@ +# +# options_lookup.rb +# +# This fuction takes two arguments (option, and default value) and looks for the given +# option key in the calling modules options hash, and returns the value. +# The function is intended to be used in templates. +# If no option is found in the options hash, default value (second argument), is returned. +# +# Example usages: +# +# Default value of no +# <%= scope.function_options_lookup(['PasswordAuthentication', 'no']) %> +# Empty default value +# <%= scope.function_options_lookup(['PasswordAuthentication', '']) %> +# Fact or param based default value +# <%= scope.function_options_lookup(['Listen', ipaddress]) %> +# Lookup inside a custom hash - in this case client_options +# <%= scope.function_options_lookup(['PasswordAuthentication', 'no', 'client_options']) %> +# +# +# Michal Nowak +# +module Puppet::Parser::Functions + newfunction(:options_lookup, :type => :rvalue, :doc => <<-EOS +This fuction takes two arguments (option, and default value) and looks for the given +option key in the calling modules options hash, and returns the value. +The function is intended to be used in templates. +If no option is found in the options hash, default value (second argument), is returned. + +Default value of no + <%= scope.function_options_lookup(['PasswordAuthentication', 'no']) %> +Empty default value + <%= scope.function_options_lookup(['PasswordAuthentication', '']) %> +Fact or param based default value + <%= scope.function_options_lookup(['Listen', ipaddress]) %> +Lookup inside a custom hash - in this case client_options + <%= scope.function_options_lookup(['PasswordAuthentication', 'no', 'client_options']) %> + +EOS + ) do |args| + + raise ArgumentError, ("options_lookup(): wrong number of arguments (#{args.length}; must be 2 or 3)") if (args.length != 2 and args.length != 3) + + value = '' + option_name = args[0] + default_val = args[1] + hash_name = args[2] + module_name = parent_module_name + + hash_name = "options" if (hash_name == :undefined || hash_name == '' || hash_name == nil) + value = lookupvar("#{module_name}::#{hash_name}")["#{option_name}"] if (lookupvar("#{module_name}::#{hash_name}").size > 0) + value = "#{default_val}" if (value == :undefined || value == '' || value == nil) + + return value + end +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/puppi/lib/puppet/parser/functions/params_lookup.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/puppi/lib/puppet/parser/functions/params_lookup.rb new file mode 100644 index 00000000000..53aad84d768 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/puppi/lib/puppet/parser/functions/params_lookup.rb @@ -0,0 +1,77 @@ +# +# params_lookup.rb +# +# This function lookups for a variable value in various locations +# following this order (first match is returned) +# - Hiera backend (if present) for modulename_varname +# - Hiera backend (if present) for varname (if second argument is 'global') +# - Top Scope Variable ::modulename_varname +# - Top Scope Variable ::varname (if second argument is 'global') +# - Module default: ::modulename::params::varname +# +# It's based on a suggestion of Dan Bode on how to better manage +# Example42 NextGen modules params lookups. +# Major help has been given by Brice Figureau, Peter Meier +# and Ohad Levy during the Fosdem 2012 days (thanks guys) +# +# Tested and adapted to Puppet 2.6.x and later +# +# Alessandro Franceschi al@lab42.it +# +module Puppet::Parser::Functions + newfunction(:params_lookup, :type => :rvalue, :doc => <<-EOS +This fuction looks for the given variable name in a set of different sources: +- Hiera, if available ('modulename_varname') +- Hiera, if available (if second argument is 'global') +- ::modulename_varname +- ::varname (if second argument is 'global') +- ::modulename::params::varname +If no value is found in the defined sources, it returns an empty string ('') + EOS + ) do |arguments| + + raise(Puppet::ParseError, "params_lookup(): Define at least the variable name " + + "given (#{arguments.size} for 1)") if arguments.size < 1 + + value = '' + var_name = arguments[0] + module_name = parent_module_name + + # Hiera Lookup + if Puppet::Parser::Functions.function('hiera') + value = function_hiera(["#{module_name}_#{var_name}", '']) + return value if (not value.nil?) && (value != :undefined) && (value != '') + + value = function_hiera(["#{var_name}", '']) if arguments[1] == 'global' + return value if (not value.nil?) && (value != :undefined) && (value != '') + end + + # Top Scope Variable Lookup (::modulename_varname) + value = lookupvar("::#{module_name}_#{var_name}") + return value if (not value.nil?) && (value != :undefined) && (value != '') + + # Look up ::varname (only if second argument is 'global') + if arguments[1] == 'global' + value = lookupvar("::#{var_name}") + return value if (not value.nil?) && (value != :undefined) && (value != '') + end + + # needed for the next two lookups + classname = self.resource.name.downcase + loaded_classes = catalog.classes + + # self::params class lookup for default value + if loaded_classes.include?("#{classname}::params") + value = lookupvar("::#{classname}::params::#{var_name}") + return value if (not value.nil?) && (value != :undefined) && (value != '') + end + + # Params class lookup for default value + if loaded_classes.include?("#{module_name}::params") + value = lookupvar("::#{module_name}::params::#{var_name}") + return value if (not value.nil?) && (value != :undefined) && (value != '') + end + + return '' + end +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/puppi/lib/puppet/parser/functions/url_parse.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/puppi/lib/puppet/parser/functions/url_parse.rb new file mode 100644 index 00000000000..5af9953f502 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/puppi/lib/puppet/parser/functions/url_parse.rb @@ -0,0 +1,44 @@ +require 'uri' + +Puppet::Parser::Functions::newfunction(:url_parse, :type => :rvalue, :doc => <<-'ENDHEREDOC') do |args| + Returns information about an url + + This function expects two arguments, an URL and the part of the url you want to retrieve. + + Example: + $source_filename = url_parse($source_url,path) + + Given an url like: https://my_user:my_pass@www.example.com:8080/path/to/file.php?id=1&ret=0 + You obtain the following results according to the second argument: + scheme : https + userinfo : my_user:my_pass + user : my_user + password : my_pass + host : www.example.com + port : 8080 + path : /path/to/file.php + query : id=1&ret=0 + filename : file.php + filetype : php + filedir : file + + + ENDHEREDOC + raise ArgumentError, ("url_parse(): wrong number of arguments (#{args.length}; must be 2)") if args.length != 2 + url=URI.parse args[0] + case args[1] + when 'scheme' then url.scheme + when 'userinfo' then url.userinfo + when 'user' then url.user + when 'password' then url.password + when 'host' then url.host + when 'port' then url.port + when 'path' then url.path + when 'query' then url.query + when 'filename' then File.basename url.path + when 'filetype' then File.extname url.path + when 'filedir' then (File.basename url.path).chomp(File.extname(url.path)) + else url + end +end + diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/puppi/manifests/check.pp b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/puppi/manifests/check.pp new file mode 100644 index 00000000000..f652d093657 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/puppi/manifests/check.pp @@ -0,0 +1,50 @@ +# Define puppi::check +# +# This define creates a file with a check command that can be used locally. +# It uses Nagios plugins for all checks so that $command is just the +# plugin name with its arguments +# +# == Usage +# Basic Usage: +# puppi::check { "checkname": +# command => "check_tcp -H localhost -p 80" +# } +# +# :include:../README.check +# +define puppi::check ( + $command, + $base_dir = '', + $hostwide = 'no', + $priority = '50', + $project = 'default', + $enable = true ) { + + require puppi + require puppi::params + + $ensure = bool2ensure($enable) + $bool_hostwide = any2bool($hostwide) + + $real_base_dir = $base_dir ? { + '' => $puppi::params::checkpluginsdir, + default => $base_dir, + } + + $path = $bool_hostwide ? { + true => "${puppi::params::checksdir}/${priority}-${name}" , + false => "${puppi::params::projectsdir}/${project}/check/${priority}-${name}", + } + + file { "Puppi_check_${project}_${priority}_${name}": + ensure => $ensure, + path => $path, + mode => '0755', + owner => $puppi::params::configfile_owner, + group => $puppi::params::configfile_group, + require => Class['puppi'], + content => "${real_base_dir}/${command}\n", + tag => 'puppi_check', + } + +} diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/puppi/manifests/configure.pp b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/puppi/manifests/configure.pp new file mode 100644 index 00000000000..c827fd77f2d --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/puppi/manifests/configure.pp @@ -0,0 +1,40 @@ +# Define puppi::deploy +# +# This define creates a file with a deploy command that can be used locally. +# +# == Usage: +# puppi::configure { "Retrieve files": +# command => "get_file.sh", +# argument => "/remote/dir/file", +# priority => "10", +# user => "root", +# project => "spysite", +# } +# +# :include:../README.deploy +# +define puppi::configure ( + $command, + $project, + $arguments = '', + $priority = '50', + $user = 'root', + $enable = true ) { + + require puppi + require puppi::params + + $ensure = bool2ensure($enable) + + file { "${puppi::params::projectsdir}/${project}/configure/${priority}-${name}": + ensure => $ensure, + mode => '0750', + owner => $puppi::params::configfile_owner, + group => $puppi::params::configfile_group, + require => Class['puppi'], + content => "su - ${user} -c \"export project=${project} && ${puppi::params::scriptsdir}/${command} ${arguments}\"\n", + tag => 'puppi_deploy', + } + +} + diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/puppi/manifests/dependencies.pp b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/puppi/manifests/dependencies.pp new file mode 100644 index 00000000000..828b86d7835 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/puppi/manifests/dependencies.pp @@ -0,0 +1,38 @@ +# Class puppi::dependencies +# +# This class provides commands and tools needed for full Puppi +# functionality. Since you might already have these package +# resources in your modules, to avoid conflicts you may decide +# to include the needed packages somewhere else and avoid the +# direct inclusion of puppi::dependencies with the parameter: +# install_dependencies => false +# +class puppi::dependencies { + + require puppi::params + + if ! defined(Package['curl']) { + package { 'curl' : ensure => present } + } + + if ! defined(Package['wget']) { + package { 'wget' : ensure => present } + } + + if ! defined(Package['unzip']) { + package { 'unzip' : ensure => present } + } + + if ! defined(Package['rsync']) { + package { 'rsync' : ensure => present } + } + + if ! defined(Package[$puppi::params::package_nagiosplugins]) { + package { $puppi::params::package_nagiosplugins : ensure => present } + } + + if ! defined(Package[$puppi::params::package_mail]) { + package { $puppi::params::package_mail : ensure => present } + } + +} diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/puppi/manifests/deploy.pp b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/puppi/manifests/deploy.pp new file mode 100644 index 00000000000..b2633ccecd7 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/puppi/manifests/deploy.pp @@ -0,0 +1,40 @@ +# Define puppi::deploy +# +# This define creates a file with a deploy command that can be used locally. +# +# == Usage: +# puppi::deploy { "Retrieve files": +# command => "get_file.sh", +# argument => "/remote/dir/file", +# priority => "10", +# user => "root", +# project => "spysite", +# } +# +# :include:../README.deploy +# +define puppi::deploy ( + $command, + $project, + $arguments = '', + $priority = '50', + $user = 'root', + $enable = true ) { + + require puppi + require puppi::params + + $ensure = bool2ensure($enable) + + file { "${puppi::params::projectsdir}/${project}/deploy/${priority}-${name}": + ensure => $ensure, + mode => '0750', + owner => $puppi::params::configfile_owner, + group => $puppi::params::configfile_group, + require => Class['puppi'], + content => "su - ${user} -c \"export project=${project} && ${puppi::params::scriptsdir}/${command} ${arguments}\"\n", + tag => 'puppi_deploy', + } + +} + diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/puppi/manifests/extras.pp b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/puppi/manifests/extras.pp new file mode 100644 index 00000000000..5b81e97e29a --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/puppi/manifests/extras.pp @@ -0,0 +1,208 @@ +# Class puppi::extras +# +# Default extras class with predefined puppi +# check, log , info content. +# You can provide a custom extra class to use instead of this +# with a parameter like: +# extra_class=> 'example42::puppi::extras', +# +class puppi::extras { + + # Default Checks + + puppi::check { 'NTP_Sync': + command => "check_ntp -H ${puppi::params::ntp}" , + priority => '99' , + hostwide => 'yes' , + } + + puppi::check { 'Disks_Usage': + command => 'check_disk -w 20% -c 10% -L -X tmpfs' , + priority => '10' , + hostwide => 'yes' , + } + + puppi::check { 'System_Load': + command => 'check_load -w 15,10,5 -c 30,25,20' , + priority => '10' , + hostwide => 'yes' , + } + + puppi::check { 'Zombie_Processes': + command => 'check_procs -w 5 -c 10 -s Z' , + priority => '10' , + hostwide => 'yes' , + } + + puppi::check { 'Local_Mail_Queue': + command => 'check_mailq -w 2 -c 5' , + priority => '10' , + hostwide => 'yes' , + } + + puppi::check { 'Connected_Users': + command => 'check_users -w 5 -c 10' , + priority => '10' , + hostwide => 'yes' , + } + + puppi::check { 'DNS_Resolution': + command => 'check_dns -H example.com' , + priority => '15' , + hostwide => 'yes' , + } + + + # Info Pages + $network_run = $::operatingsystem ? { + Solaris => [ 'ifconfig -a' , 'netstat -nr' , 'cat /etc/resolv.conf' , 'arp -an' , 'netstat -na' ], + default => [ 'ifconfig' , 'route -n' , 'cat /etc/resolv.conf' , 'arp -an' , 'netstat -natup | grep LISTEN' ], + } + + puppi::info { 'network': + description => 'Network settings and stats' , + run => $network_run, + } + + $users_run = $::operatingsystem ? { + Solaris => [ 'who' , 'last' ], + default => [ 'who' , 'last' , 'LANG=C lastlog | grep -v \'Never logged in\'' ], + } + + puppi::info { 'users': + description => 'Users and logins information' , + run => $users_run, + } + + $perf_run = $::operatingsystem ? { + Solaris => [ 'uptime' , 'vmstat 1 5' ], + default => [ 'uptime' , 'free' , 'vmstat 1 5' ], + } + + puppi::info { 'perf': + description => 'System performances and resources utilization' , + run => $perf_run, + } + + $disks_run = $::operatingsystem ? { + Solaris => [ 'df -h' , 'mount' ], + default => [ 'df -h' , 'mount' , 'blkid' , 'fdisk -l' ], + } + + puppi::info { 'disks': + description => 'Disks and filesystem information' , + run => $disks_run, + } + + $hardware_run = $::operatingsystem ? { + Solaris => [ 'find /devices/' ], + default => [ 'lspci' , 'cat /proc/cpuinfo' ], + } + + puppi::info { 'hardware': + description => 'Hardware information' , + run => $hardware_run, + } + + $packages_run = $::operatingsystem ? { + /(?i:RedHat|CentOS|Scientific|Amazon|Linux)/ => [ 'yum repolist' , 'rpm -qa' ] , + /(?i:Debian|Ubuntu|Mint)/ => [ 'apt-config dump' , 'apt-cache stats' , 'apt-key list' , 'dpkg -l' ], + /(Solaris)/ => [ 'pkginfo' ], + /(Archlinux)/ => [ 'pacman -Qet' ], + default => [ 'echo' ], + } + + puppi::info { 'packages': + description => 'Packages information' , + run => $packages_run, + } + + puppi::info::module { 'puppi': + configfile => ["${puppi::params::basedir}/puppi.conf"], + configdir => [$puppi::params::basedir], + datadir => [$puppi::params::archivedir], + logdir => [$puppi::params::logdir], + description => 'What Puppet knows about puppi' , + verbose => 'yes', +# run => "ls -lR ${puppi::params::logdir}/puppi-data/", + } + + ### Default Logs + case $::operatingsystem { + + Debian,Ubuntu: { + puppi::log { 'system': + description => 'General System Messages', + log => ['/var/log/syslog'], + } + puppi::log { 'auth': + description => 'Users and authentication', + log => ['/var/log/user.log','/var/log/auth.log'], + } + puppi::log { 'mail': + description => 'Mail messages', + log => ['/var/log/mail.log'], + } + } + + RedHat,CentOS,Scientific,Amazon,Linux: { + puppi::log { 'system': + description => 'General System Messages', + log => ['/var/log/messages'], + } + puppi::log { 'auth': + description => 'Users and authentication', + log => ['/var/log/secure'], + } + puppi::log { 'mail': + description => 'Mail messages', + log => ['/var/log/maillog'], + } + } + + SLES,OpenSuSE: { + puppi::log { 'system': + description => 'General System Messages', + log => ['/var/log/messages'], + } + puppi::log { 'mail': + description => 'Mail messages', + log => ['/var/log/mail'], + } + puppi::log { 'zypper': + description => 'Zypper messages', + log => ['/var/log/zypper.log'], + } + } + + Solaris: { + puppi::log { 'system': + description => 'General System Messages', + log => ['/var/adm/messages'], + } + puppi::log { 'auth': + description => 'Users and authentication', + log => ['/var/log/authlog'], + } + } + + Archlinux: { + puppi::log { 'system': + description => 'General System Messages', + log => ['/var/log/messages.log','/var/log/syslog.log'], + } + puppi::log { 'auth': + description => 'Users and authentication', + log => ['/var/log/user.log','/var/log/auth.log'], + } + puppi::log { 'mail': + description => 'Mail messages', + log => ['/var/log/mail.log'], + } + } + + default: { } + + } + +} diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/puppi/manifests/helper.pp b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/puppi/manifests/helper.pp new file mode 100644 index 00000000000..d87c198d583 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/puppi/manifests/helper.pp @@ -0,0 +1,29 @@ +# Define puppi::helper +# +# The Puppi 2.0 define that creates an helper file that contains +# the commands to execute, for the different puppi actions, using +# the variables present in the datafile +# +# == Usage +# Basic Usage: +# puppi::helper { "myhelper": +# template => 'myproject/puppi/helpers/myhelper.erb', +# } +# +define puppi::helper ( + $template, + $ensure = 'present' ) { + + require puppi + require puppi::params + + file { "puppi_helper_${name}": + ensure => $ensure, + path => "${puppi::params::helpersdir}/${name}.yml", + mode => '0644', + owner => $puppi::params::configfile_owner, + group => $puppi::params::configfile_group, + content => template($template), + } + +} diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/puppi/manifests/helpers.pp b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/puppi/manifests/helpers.pp new file mode 100644 index 00000000000..b8cd2f4805a --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/puppi/manifests/helpers.pp @@ -0,0 +1,16 @@ +# Class puppi::helpers +# +# A class that defines all the default helpers used by Example42 +# modules +# +# == Usage +# Automatically included by Puppi +# +class puppi::helpers { + + # Standard helper for Example42 modules + puppi::helper { 'standard': + template => 'puppi/helpers/standard.yml.erb', + } + +} diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/puppi/manifests/info.pp b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/puppi/manifests/info.pp new file mode 100644 index 00000000000..7ae750d7c18 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/puppi/manifests/info.pp @@ -0,0 +1,46 @@ +# Define puppi::info +# +# This define creates a basic info file that simply contains a set +# of commands that show infos about custom topics. +# To be used by the puppi info command. +# By default it builds the info script based on the minimal puppi/info.erb +# template but you can choose a custom template. +# Other info defines are used to gather and create puppi info scripts with +# different arguments and contents. +# Check puppi/manifests/info/ for alternative puppi::info:: plugins +# +# == Usage: +# puppi::info { "network": +# description => "Network status and information" , +# run => [ "ifconfig" , "route -n" ], +# } +# +# :include:../README.info +# +define puppi::info ( + $description = '', + $templatefile = 'puppi/info.erb', + $run = '' ) { + + require puppi + require puppi::params + + $array_run = is_array($run) ? { + false => $run ? { + '' => [], + default => split($run, ','), + }, + default => $run, + } + + file { "${puppi::params::infodir}/${name}": + ensure => present, + mode => '0750', + owner => $puppi::params::configfile_owner, + group => $puppi::params::configfile_group, + require => Class['puppi'], + content => template($templatefile), + tag => 'puppi_info', + } + +} diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/puppi/manifests/info/instance.pp b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/puppi/manifests/info/instance.pp new file mode 100644 index 00000000000..9d9d9926b4d --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/puppi/manifests/info/instance.pp @@ -0,0 +1,33 @@ +# Define puppi::info::instance +# +# This is a puppi info plugin specific for the tomcat::instance define +# +define puppi::info::instance ( + $servicename = '', + $processname = '', + $configdir = '', + $bindir = '', + $pidfile = '', + $datadir = '', + $logdir = '', + $httpport = '', + $controlport = '', + $ajpport = '', + $description = '', + $run = '', + $verbose = 'no', + $templatefile = 'puppi/info/instance.erb' ) { + + require puppi + require puppi::params + + file { "${puppi::params::infodir}/${name}": + ensure => present, + mode => '0750', + owner => $puppi::params::configfile_owner, + group => $puppi::params::configfile_group, + content => template($templatefile), + tag => 'puppi_info', + } + +} diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/puppi/manifests/info/module.pp b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/puppi/manifests/info/module.pp new file mode 100644 index 00000000000..df6f3c63cb7 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/puppi/manifests/info/module.pp @@ -0,0 +1,59 @@ +# Define puppi::info::module +# +# This is a puppi info plugin that provides automatic info to modules +# It uses a default template puppi/info/module.erb that can be changed +# and adapted +# +# == Usage +# (Sample from Example42 apache module where there's wide use of +# qualified variables, note that you can provide direct values to it +# without using variables): +# +# puppi::info::module { "apache": +# packagename => "${apache::params::packagename}", +# servicename => "${apache::params::servicename}", +# processname => "${apache::params::processname}", +# configfile => "${apache::params::configfile}", +# configdir => "${apache::params::configdir}", +# pidfile => "${apache::params::pidfile}", +# datadir => "${apache::params::datadir}", +# logfile => "${apache::params::logfile}", +# logdir => "${apache::params::logdir}", +# protocol => "${apache::params::protocol}", +# port => "${apache::params::port}", +# description => "What Puppet knows about apache" , +# run => "httpd -V", +# } +# +define puppi::info::module ( + $packagename = '', + $servicename = '', + $processname = '', + $configfile = '', + $configdir = '', + $initconfigfile = '', + $pidfile = '', + $datadir = '', + $logfile = '', + $logdir = '', + $protocol = '', + $port = '', + $description = '', + $run = '', + $verbose = 'no', + $templatefile = 'puppi/info/module.erb' ) { + + require puppi + require puppi::params + + file { "${puppi::params::infodir}/${name}": + ensure => present, + mode => '0750', + owner => $puppi::params::configfile_owner, + group => $puppi::params::configfile_group, + require => Class['puppi'], + content => template($templatefile), + tag => 'puppi_info', + } + +} diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/puppi/manifests/info/readme.pp b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/puppi/manifests/info/readme.pp new file mode 100644 index 00000000000..5cf9950b465 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/puppi/manifests/info/readme.pp @@ -0,0 +1,69 @@ +# Define puppi::info::readme +# +# This is a puppi info plugin that provides a Readme text which can be +# used to show local info on the managed server and eventually run custom commands. +# +# puppi::info::readme { "myapp": +# description => "Guidelines for myapp setup", +# readme => "myapp/readme.txt" , +# run => "myapp -V", +# } +# +define puppi::info::readme ( + $description = '', + $readme = '', + $autoreadme = 'no', + $run = '', + $source_module = 'undefined', + $templatefile = 'puppi/info/readme.erb' ) { + + require puppi + require puppi::params + + $bool_autoreadme = any2bool($autoreadme) + + file { "${puppi::params::infodir}/${name}": + ensure => present, + mode => '0750', + owner => $puppi::params::configfile_owner, + group => $puppi::params::configfile_group, + require => Class['puppi'], + content => template($templatefile), + tag => 'puppi_info', + } + + $readme_source = $readme ? { + '' => 'puppet:///modules/puppi/info/readme/readme', + default => $readme, + } + + file { "${puppi::params::readmedir}/${name}": + ensure => present, + mode => '0644', + owner => $puppi::params::configfile_owner, + group => $puppi::params::configfile_group, + require => File['puppi_readmedir'], + source => $readme_source, + tag => 'puppi_info', + } + + if $bool_autoreadme == true { + file { "${puppi::params::readmedir}/${name}-custom": + ensure => present, + mode => '0644', + owner => $puppi::params::configfile_owner, + group => $puppi::params::configfile_group, + require => File['puppi_readmedir'], + source => [ + "puppet:///modules/${source_module}/puppi/info/readme/readme-${::hostname}" , + "puppet:///modules/${source_module}/puppi/info/readme/readme-${::role}" , + "puppet:///modules/${source_module}/puppi/info/readme/readme-default" , + "puppet:///modules/puppi/info/readme/readme-${::hostname}" , + "puppet:///modules/puppi/info/readme/readme-${::role}" , + 'puppet:///modules/puppi/info/readme/readme-default' + ], + tag => 'puppi_info', + } + } + +} diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/puppi/manifests/init.pp b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/puppi/manifests/init.pp new file mode 100644 index 00000000000..be2043f740a --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/puppi/manifests/init.pp @@ -0,0 +1,77 @@ +# = Class: puppi +# +# This is Puppi NextGen +# Includes both first generation of Puppi and the +# NextGen developments and modules integration +# +# == Parameters +# +# [*version*] +# Define the Puppi version to use: +# 1 - First generation of Puppi, compatible with old modules +# 2 - NextGen version. Intended to work with NextGen modules +# Default: 1 , for the moment +# +# [*install_dependencies*] +# Set to false if you want to manage the sofware puppi needs +# with your local modules. +# +# [*template*] +# Sets the path to a custom template for /etc/puppi/puppi.conf +# +# [*helpers_class*] +# Name of the class there default helpers are defined +# (Used on in Puppi 2) +# +# [*logs_retention_days*] +# Number of days for retenton of puppi logs. Default 30 +# This option creates a script in /etc/cron.daily that purges +# all the old logs. Set to false or to 0 to remove the purge script. +# +# [*extra_class*] +# Name of the class where extra puppi resources are added +# Here, by default are placed general system commands for +# puppi info, check and log +# +class puppi ( + $version = params_lookup( 'version' ), + $install_dependencies = params_lookup( 'install_dependencies' ), + $template = params_lookup( 'template' ), + $helpers_class = params_lookup( 'helpers_class' ), + $logs_retention_days = params_lookup( 'logs_retention_days' ), + $extra_class = params_lookup( 'extra_class' ) + ) inherits puppi::params { + + $bool_install_dependencies=any2bool($install_dependencies) + + # Manage Version + $puppi_ensure = $puppi::version ? { + 1 => '/usr/sbin/puppi.one', + 2 => '/usr/local/bin/puppi', + } + + file { 'puppi.link': + ensure => $puppi_ensure, + path => '/usr/sbin/puppi', + } + + # Puppi version one is always installed + include puppi::one + + # Puppi 2 gem (still experimental) is installed only when forced + if $puppi::version == '2' { + include puppi::two + } + + # Create Puppi common dirs and scripts + include puppi::skel + + # Include extra resources + include $puppi::extra_class + + # Include some packages needed by Puppi + if $bool_install_dependencies { + include puppi::dependencies + } + +} diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/puppi/manifests/initialize.pp b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/puppi/manifests/initialize.pp new file mode 100644 index 00000000000..0fe66afe5d8 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/puppi/manifests/initialize.pp @@ -0,0 +1,37 @@ +# Define puppi::initialize +# +# This define creates a file with a initialize command that can be used locally. +# +# Usage: +# puppi::initialize { "Retrieve files": +# command => "get_file.sh", +# argument => "/remote/dir/file", +# priority => "10", +# user => "root", +# project => "spysite", +# } +# +define puppi::initialize ( + $command, + $project, + $arguments = '', + $priority = '50', + $user = 'root', + $enable = true ) { + + require puppi + require puppi::params + + $ensure = bool2ensure($enable) + + file { "${puppi::params::projectsdir}/${project}/initialize/${priority}-${name}": + ensure => $ensure, + mode => '0750', + owner => $puppi::params::configfile_owner, + group => $puppi::params::configfile_group, + require => Class['puppi'], + content => "su - ${user} -c \"export project=${project} && ${puppi::params::scriptsdir}/${command} ${arguments}\"\n", + tag => 'puppi_initialize', + } + +} diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/puppi/manifests/install_packages.pp b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/puppi/manifests/install_packages.pp new file mode 100644 index 00000000000..6338e8adfa5 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/puppi/manifests/install_packages.pp @@ -0,0 +1,83 @@ +# = Define: puppi::install_packages +# +# This define installs a list of packages without manging them as Puppet +# resources. It's useful when you need a set of packages installed, +# for example as prerequisites to build code from source, but you don't want +# to create Puppet package resources for them (since they may conflict with +# existing classes that provide the same packages. +# +# == Parameters: +# +# [*packages*] +# String. Required. +# A space separated list of of the packages to install +# +# [*template*] +# String. Optional. Default: 'puppi/install_packages.erb' +# The template to use to generate the script that installs the packages +# +# [*scrips_dir*] +# String. Optional. Default: '/root/puppi_install_packages' +# The directory where you place the scripts created by the define. +# +# [*autorun*] +# Boolean. Default: true. +# Define if to automatically execute the script when Puppet runs. +# +# [*refreshonly*] +# Boolean. Optional. Default: true +# Defines the logic of execution of the script when Puppet runs. +# Maps to the omonymous Exec type argument. +# +# [*timeout*] +# String. Optional. Default: '600' +# Exec timeout in seconds. +# +# [*ensure*] +# Define if the runscript script and eventual cron job +# must be present or absent. Default: present. +# +# == Examples +# +# - Minimal setup +# puppi::install_packages { 'build_tools': +# source => 'build-essential vim git-core curl bison', +# } +# +define puppi::install_packages ( + $packages, + $template = 'puppi/install_packages.erb', + $scripts_dir = '/root/puppi_install_packages', + $autorun = true, + $refreshonly = true, + $timeout = '600', + $ensure = 'present' ) { + + if ! defined(File[$scripts_dir]) { + file { $scripts_dir: + ensure => directory, + mode => '0755', + owner => 'root', + group => 'root', + } + } + + file { "install_packages_${name}": + ensure => $ensure, + path => "${scripts_dir}/${name}", + mode => '0755', + owner => 'root', + group => 'root', + content => template($template), + } + + if $autorun == true { + exec { "install_packages_${name}": + command => "${scripts_dir}/${name}", + refreshonly => $refreshonly, + subscribe => File["install_packages_${name}"], + timeout => $timeout, + } + } + +} diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/puppi/manifests/log.pp b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/puppi/manifests/log.pp new file mode 100644 index 00000000000..8cfe08ab12b --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/puppi/manifests/log.pp @@ -0,0 +1,36 @@ +# Define puppi::log +# +# This define creates a basic log file that simply contains +# the list of logs to show when issuing the puppi log command. +# +# == Usage: +# puppi::log { "system": +# description => "General System Logs" , +# log => [ "/var/log/syslog" , "/var/log/messages" ], +# } +# +# :include:../README.log +# +define puppi::log ( + $log, + $description = '' ) { + + require puppi + require puppi::params + + $array_log = is_array($log) ? { + false => split($log, ','), + default => $log, + } + + file { "${puppi::params::logsdir}/${name}": + ensure => 'present', + mode => '0644', + owner => $puppi::params::configfile_owner, + group => $puppi::params::configfile_group, + require => Class['puppi'], + content => template('puppi/log.erb'), + tag => 'puppi_log', + } + +} diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/puppi/manifests/mcollective/client.pp b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/puppi/manifests/mcollective/client.pp new file mode 100644 index 00000000000..a15d0ca259c --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/puppi/manifests/mcollective/client.pp @@ -0,0 +1,60 @@ +# = Class puppi::mcollective::client +# +# This class installs the mc puppi command for mcollective clients +# (Note that in mcollective terminology a client is an host from +# where you can manage mcollective servers) +# +# The class installs also the puppideploy and puppicheck commands +# that are simple wrappers about mco puppi that correctly trap +# remote errors and can be used in automatic procedures or +# to give limited access (typically via sudo) to mc puppi commands +# +# They can be integrated, for example, in Jenkins as remote ssh +# commands to manage deployments or tests +# +# == Usage: +# include puppi::mcollective::client +# +# :include:../README.mcollective +# +class puppi::mcollective::client { + + require puppi::params + require puppi::mcollective::server + +# OLD STYLE mc-puppi command + file { '/usr/local/bin/mc-puppi': + ensure => 'present', + mode => '0755', + owner => 'root', + group => 'root', + source => 'puppet:///modules/puppi/mcollective/mc-puppi', + require => Class['mcollective'], + } + +# mco application TODO +# file { "${puppi::params::mcollective}/application/puppi.rb": +# ensure => 'present', +# mode => '0644', +# owner => 'root', +# group => 'root', +# source => 'puppet:///modules/puppi/mcollective/mcpuppi.rb', +# } + + file { '/usr/bin/puppicheck': + ensure => 'present', + mode => '0750', + owner => $puppi::params::mcollective_user, + group => $puppi::params::mcollective_group, + source => 'puppet:///modules/puppi/mcollective/puppicheck', + } + + file { '/usr/bin/puppideploy': + ensure => 'present', + mode => '0750', + owner => $puppi::params::mcollective_user, + group => $puppi::params::mcollective_group, + source => 'puppet:///modules/puppi/mcollective/puppideploy', + } + +} diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/puppi/manifests/mcollective/server.pp b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/puppi/manifests/mcollective/server.pp new file mode 100644 index 00000000000..40def160a1d --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/puppi/manifests/mcollective/server.pp @@ -0,0 +1,34 @@ +# = Class puppi::mcollective::server +# +# This class installs the puppi agent on mcollective servers +# (Note that in mcollective terminology a server is an host +# managed by a mcollective client) +# +# == Usage: +# include puppi::mcollective::server +# +# :include:../README.mcollective +# +class puppi::mcollective::server { + + require puppi::params + + file { "${puppi::params::mcollective}/agent/puppi.ddl": + ensure => 'present', + mode => '0644', + owner => 'root', + group => 'root', + source => 'puppet:///modules/puppi/mcollective/puppi.ddl', + require => Class['mcollective'], + } + + file { "${puppi::params::mcollective}/agent/puppi.rb": + ensure => 'present', + mode => '0644', + owner => 'root', + group => 'root', + source => 'puppet:///modules/puppi/mcollective/puppi.rb', + require => Class['mcollective'], + } + +} diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/puppi/manifests/netinstall.pp b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/puppi/manifests/netinstall.pp new file mode 100644 index 00000000000..a7b7ed6d086 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/puppi/manifests/netinstall.pp @@ -0,0 +1,169 @@ +# Define: puppi::netinstall +# +# This defines simplifies the installation of a file +# downloaded from the web. It provides arguments to manage +# different kind of downloads and custom commands. +# It's used, among the others, by NextGen modules of webapps +# when the argument install is set to => source +# +# == Variables +# +# [*url*] +# The Url of the file to retrieve. Required. +# Example: http://www.example42.com/file.tar.gz +# +# [*destination_dir*] +# The final destination where to unpack or copy what has been +# downloaded. Required. +# Example: /var/www/html +# +# [*retrieve_args*] +# A string of arguments to pass to wget. +# +# [*extracted_dir*] +# The name of a directory or file created after the extraction +# Needed only if its name is different from the downloaded file name +# (without suffixes). Optional. +# +# [*owner*] +# The user owner of the directory / file created. Default: root +# +# [*group*] +# The group owner of the directory / file created. Default: root +# +# [*timeout*] +# The timeout in seconds for each command executed +# +# [*work_dir*] +# A temporary work dir where file is downloaded. Default: /var/tmp +# +# [*path*] +# Define the path for the exec commands. +# Default: /bin:/sbin:/usr/bin:/usr/sbin +# +# [*exec_env*] +# Define any additional environment variables to be used with the +# exec commands. Note that if you use this to set PATH, it will +# override the path attribute. Multiple environment variables +# should be specified as an array. +# +# [*extract_command*] +# The command used to extract the downloaded file. +# By default is autocalculated accoring to the file extension +# Set 'rsync' if the file has to be placed in the destination_dir +# as is (for example for war files) +# +# [*preextract_command*] +# An optional custom command to run before extracting the file. +# +# [*postextract_command*] +# An optional custom command to run after having extracted the file. +# +define puppi::netinstall ( + $url, + $destination_dir, + $extracted_dir = '', + $retrieve_command = 'wget', + $retrieve_args = '', + $owner = 'root', + $group = 'root', + $timeout = '3600', + $work_dir = '/var/tmp', + $path = '/bin:/sbin:/usr/bin:/usr/sbin', + $extract_command = '', + $preextract_command = '', + $postextract_command = '', + $postextract_cwd = '', + $exec_env = [] + ) { + + $source_filename = url_parse($url,'filename') + $source_filetype = url_parse($url,'filetype') + $source_dirname = url_parse($url,'filedir') + + $real_extract_command = $extract_command ? { + '' => $source_filetype ? { + '.tgz' => 'tar -zxf', + '.gz' => 'tar -zxf', + '.bz2' => 'tar -jxf', + '.tar' => 'tar -xf', + '.zip' => 'unzip', + default => 'tar -zxf', + }, + default => $extract_command, + } + + $extract_command_second_arg = $real_extract_command ? { + /^cp.*/ => '.', + /^rsync.*/ => '.', + default => '', + } + + $real_extracted_dir = $extracted_dir ? { + '' => $real_extract_command ? { + /(^cp.*|^rsync.*)/ => $source_filename, + /(^tar -zxf*|^tar -jxf*)/ => regsubst($source_dirname,'.tar',''), + default => $source_dirname, + }, + default => $extracted_dir, + } + + $real_postextract_cwd = $postextract_cwd ? { + '' => "${destination_dir}/${real_extracted_dir}", + default => $postextract_cwd, + } + + if $preextract_command { + exec { "PreExtract ${source_filename} in ${destination_dir}": + command => $preextract_command, + subscribe => Exec["Retrieve ${url} in ${work_dir}"], + refreshonly => true, + path => $path, + environment => $exec_env, + timeout => $timeout, + } + } + + exec { "Retrieve ${url} in ${work_dir}": + cwd => $work_dir, + command => "${retrieve_command} ${retrieve_args} ${url}", + creates => "${work_dir}/${source_filename}", + timeout => $timeout, + path => $path, + environment => $exec_env, + } + + exec { "Extract ${source_filename} from ${work_dir}": + command => "mkdir -p ${destination_dir} && cd ${destination_dir} && ${real_extract_command} ${work_dir}/${source_filename} ${extract_command_second_arg}", + unless => "ls ${destination_dir}/${real_extracted_dir}", + creates => "${destination_dir}/${real_extracted_dir}", + timeout => $timeout, + require => Exec["Retrieve ${url} in ${work_dir}"], + path => $path, + environment => $exec_env, + notify => Exec["Chown ${source_filename} in ${destination_dir}"], + } + + exec { "Chown ${source_filename} in ${destination_dir}": + command => "chown -R ${owner}:${group} ${destination_dir}/${real_extracted_dir}", + refreshonly => true, + timeout => $timeout, + require => Exec["Extract ${source_filename} from ${work_dir}"], + path => $path, + environment => $exec_env, + } + + if $postextract_command { + exec { "PostExtract ${source_filename} in ${destination_dir}": + command => $postextract_command, + cwd => $real_postextract_cwd, + subscribe => Exec["Extract ${source_filename} from ${work_dir}"], + refreshonly => true, + timeout => $timeout, + require => [Exec["Retrieve ${url} in ${work_dir}"],Exec["Chown ${source_filename} in ${destination_dir}"]], + path => $path, + environment => $exec_env, + } + } +} + diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/puppi/manifests/one.pp b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/puppi/manifests/one.pp new file mode 100644 index 00000000000..47574bcb7ad --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/puppi/manifests/one.pp @@ -0,0 +1,31 @@ +# Class: puppi::one +# +# Installs Puppi 1.0 +# +class puppi::one { + + require puppi::params + + # Main configuration file + file { 'puppi.conf': + ensure => present, + path => "${puppi::params::basedir}/puppi.conf", + mode => '0644', + owner => $puppi::params::configfile_owner, + group => $puppi::params::configfile_group, + content => template($puppi::template), + require => File['puppi_basedir'], + } + + # The Puppi 1.0 command + file { 'puppi': + ensure => present, + path => '/usr/sbin/puppi.one', + mode => '0750', + owner => $puppi::params::configfile_owner, + group => $puppi::params::configfile_group, + content => template('puppi/puppi.erb'), + require => File['puppi_basedir'], + } + +} diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/puppi/manifests/params.pp b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/puppi/manifests/params.pp new file mode 100644 index 00000000000..721eae14129 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/puppi/manifests/params.pp @@ -0,0 +1,104 @@ +# Class: puppi::params +# +# Sets internal variables and defaults for puppi module +# +class puppi::params { + +## PARAMETERS + $version = '1' + $install_dependencies = true + $template = 'puppi/puppi.conf.erb' + $helpers_class = 'puppi::helpers' + $logs_retention_days = '30' + $extra_class = 'puppi::extras' + + +## INTERNALVARS + $basedir = '/etc/puppi' + $scriptsdir = '/etc/puppi/scripts' + $checksdir = '/etc/puppi/checks' + $logsdir = '/etc/puppi/logs' + $infodir = '/etc/puppi/info' + $tododir = '/etc/puppi/todo' + $projectsdir = '/etc/puppi/projects' + $datadir = '/etc/puppi/data' + $helpersdir = '/etc/puppi/helpers' + $libdir = '/var/lib/puppi' + $readmedir = '/var/lib/puppi/readme' + $logdir = '/var/log/puppi' + + $archivedir = $::puppi_archivedir ? { + '' => '/var/lib/puppi/archive', + default => $::puppi_archivedir, + } + + $workdir = $::puppi_workdir ? { + '' => '/tmp/puppi', + default => $::puppi_workdir, + } + + $configfile_mode = '0644' + $configfile_owner = 'root' + $configfile_group = 'root' + +# External tools +# Directory where are placed the checks scripts +# By default we use Nagios plugins + $checkpluginsdir = $::operatingsystem ? { + /(?i:RedHat|CentOS|Scientific|Amazon|Linux)/ => $::architecture ? { + x86_64 => '/usr/lib64/nagios/plugins', + default => '/usr/lib/nagios/plugins', + }, + default => '/usr/lib/nagios/plugins', + } + + $package_nagiosplugins = $::operatingsystem ? { + /(?i:RedHat|CentOS|Scientific|Amazon|Linux|Fedora)/ => 'nagios-plugins-all', + default => 'nagios-plugins', + } + + $package_mail = $::operatingsystem ? { + /(?i:Debian|Ubuntu|Mint)/ => 'bsd-mailx', + default => 'mailx', + } + + $ntp = $::ntp_server ? { + '' => 'pool.ntp.org' , + default => is_array($::ntp_server) ? { + false => $::ntp_server, + true => $::ntp_server[0], + default => $::ntp_server, + } + } + +# Mcollective paths +# TODO: Add Paths for Puppet Enterprise: +# /opt/puppet/libexec/mcollective/mcollective/ + $mcollective = $::operatingsystem ? { + debian => '/usr/share/mcollective/plugins/mcollective', + ubuntu => '/usr/share/mcollective/plugins/mcollective', + centos => '/usr/libexec/mcollective/mcollective', + redhat => '/usr/libexec/mcollective/mcollective', + default => '/usr/libexec/mcollective/mcollective', + } + + $mcollective_user = 'root' + $mcollective_group = 'root' + + +# Commands used in puppi info templates + $info_package_query = $::operatingsystem ? { + /(?i:RedHat|CentOS|Scientific|Amazon|Linux)/ => 'rpm -qi', + /(?i:Ubuntu|Debian|Mint)/ => 'dpkg -s', + default => 'echo', + } + $info_package_list = $::operatingsystem ? { + /(?i:RedHat|CentOS|Scientific|Amazon|Linux)/ => 'rpm -ql', + /(?i:Ubuntu|Debian|Mint)/ => 'dpkg -L', + default => 'echo', + } + $info_service_check = $::operatingsystem ? { + default => '/etc/init.d/', + } + +} diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/puppi/manifests/project.pp b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/puppi/manifests/project.pp new file mode 100644 index 00000000000..4cf23313e83 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/puppi/manifests/project.pp @@ -0,0 +1,100 @@ +# Define puppi::project +# +# This define creates and configures a Puppi project +# You must use different puppi::deploy and puppi::rollback defines +# to to build up the commands list +# +define puppi::project ( + $enable = true ) { + + require puppi::params + + $ensure = any2bool($enable) ? { + false => 'absent', + default => 'directory', + } + + $ensurefile = bool2ensure($enable) + + # Create Project subdirs + file { + "${puppi::params::projectsdir}/${name}": + ensure => $ensure, + mode => '0755', + owner => $puppi::params::configfile_owner, + group => $puppi::params::configfile_group, + force => true; + + "${puppi::params::projectsdir}/${name}/check": + ensure => $ensure, + mode => '0755', + owner => $puppi::params::configfile_owner, + group => $puppi::params::configfile_group, + force => true, + recurse => true, + purge => true, + require => File["${puppi::params::projectsdir}/${name}"]; + + "${puppi::params::projectsdir}/${name}/rollback": + ensure => $ensure, + mode => '0755', + owner => $puppi::params::configfile_owner, + group => $puppi::params::configfile_group, + force => true, + recurse => true, + purge => true, + require => File["${puppi::params::projectsdir}/${name}"]; + + "${puppi::params::projectsdir}/${name}/deploy": + ensure => $ensure, + mode => '0755', + owner => $puppi::params::configfile_owner, + group => $puppi::params::configfile_group, + force => true, + recurse => true, + purge => true, + require => File["${puppi::params::projectsdir}/${name}"]; + + "${puppi::params::projectsdir}/${name}/initialize": + ensure => $ensure, + mode => '0755', + owner => $puppi::params::configfile_owner, + group => $puppi::params::configfile_group, + force => true, + recurse => true, + purge => true, + require => File["${puppi::params::projectsdir}/${name}"]; + + "${puppi::params::projectsdir}/${name}/configure": + ensure => $ensure, + mode => '0755', + owner => $puppi::params::configfile_owner, + group => $puppi::params::configfile_group, + force => true, + recurse => true, + purge => true, + require => File["${puppi::params::projectsdir}/${name}"]; + + "${puppi::params::projectsdir}/${name}/report": + ensure => $ensure, + mode => '0755', + owner => $puppi::params::configfile_owner, + group => $puppi::params::configfile_group, + force => true, + recurse => true, + purge => true, + require => File["${puppi::params::projectsdir}/${name}"]; + } + + # Create Project configuration file + file { + "${puppi::params::projectsdir}/${name}/config": + ensure => $ensurefile, + content => template('puppi/project/config.erb'), + mode => '0644', + owner => $puppi::params::configfile_owner, + group => $puppi::params::configfile_group, + require => File["${puppi::params::projectsdir}/${name}"]; + } + +} diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/puppi/manifests/project/README b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/puppi/manifests/project/README new file mode 100644 index 00000000000..ea75c5da38a --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/puppi/manifests/project/README @@ -0,0 +1,31 @@ +In this directory you find some examples of deploy procedures +for general purposes deploys (single wars, single files, tarballs, list +of files from a list...) described in a single define. + +They are made in order to be generic enough to adapt to different +environments and scenarious but you might need to design your +own deployment process. + +In order to do that you can create a new define that includes: +- All the variables, required or optional, you may want +- One puppi:project statement +- All the puppi::deploy statements you need (each one runs a command) +- All the puppi::rollback statements you need +- One or more puppi::report statements for reporting + +The examples provided here make use of the scripts provided in +puppi/files/scripts and tend to split the deploy procedures in many +different, reusable, scripts (one gets the source file(s), another +archives the current content, another one actually copies the files +to deploy and so on) but you can use just a single new script or +whatever combination you might prefer. + +The default puppi scripts and the general ordering of commands +execution in these sample deploy defines follow this scheme: +Priority - Kind of operations +1x - Pre Deploy checks +2x - Files retrieving and preparation +3x - Operations to accomplish before the deploy (Archiving, Services stopping..) +40 - Deploy.sh - The script that actually copied the files on deploy dir +4x - Operations to accomplish after the deploy (Services start...) +8x - Post Deploy checks diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/puppi/manifests/project/archive.pp b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/puppi/manifests/project/archive.pp new file mode 100644 index 00000000000..34d25f0dee2 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/puppi/manifests/project/archive.pp @@ -0,0 +1,406 @@ +# = Define puppi::project::archive +# +# This is a puppi deployment project to be used for archives +# like tarballs and zips +# +# +# It uses different "core" defines (puppi::project, puppi:deploy (many), +# puppi::rollback (many)) to build a full featured template project for +# automatic deployments. +# If you need to customize it, either change the template defined here or +# build up your own custom ones. +# +# == Variables: +# +# [*source*] +# The full URL of the main file to retrieve. +# Format should be in URI standard (http:// file:// ssh:// rsync://). +# +# [*deploy_root*] +# The destination directory where the retrieved file(s) are deployed. +# +# [*user*] +# (Optional) - The user to be used for deploy operations. +# +# [*predeploy_customcommand*] +# (Optional) - Full path with arguments of an eventual custom command to +# execute before the deploy. The command is executed as $predeploy_user. +# +# [*predeploy_user*] +# (Optional) - The user to be used to execute the $predeploy_customcommand. +# By default is the same of $user. +# +# [*predeploy_priority*] +# (Optional) - The priority (execution sequence number) that defines when, +# during the deploy procedure, the $predeploy_customcommand is executed +# Default: 39 (immediately before the copy of files on the deploy root). +# +# [*postdeploy_customcommand*] +# (Optional) - Full path with arguments of an eventual custom command to +# execute after the deploy. The command is executed as $postdeploy_user. +# +# [*postdeploy_user*] +# (Optional) - The user to be used to execute the $postdeploy_customcommand. +# By default is the same of $user. +# +# [*postdeploy_priority*] +# (Optional) - The priority (execution sequence number) that defines when, +# during the deploy procedure, the $postdeploy_customcommand is executed +# Default: 41 (immediately after the copy of files on the deploy root). +# +# [*disable_services*] +# (Optional) - The names (space separated) of the services you might want to +# stop during deploy. By default is blank. Example: "apache puppet monit". +# +# [*firewall_src_ip*] +# (Optional) - The IP address of a loadbalancer you might want to block out +# during a deploy. +# +# [*firewall_dst_port*] +# (Optional) - The local port to block from the loadbalancer during deploy +# (Default all). +# +# [*firewall_delay*] +# (Optional) - A delay time in seconds to wait after the block of +# $firewall_src_ip. Should be at least as long as the loadbalancer check +# interval for the services stopped during deploy (Default: 1). +# +# [*report_email*] +# (Optional) - The (space separated) email(s) to notify of deploy/rollback +# operations. If none is specified, no email is sent. +# +# [*clean_deploy*] +# (Optional, default false) - If during the deploy procedure, all the +# existing files that are not on the source have to be deleted. +# (When true, a --delete option is added to the rsync command) +# Do not set to true if source files are incremental. +# +# [*backup_enable*] +# (Optional, default true) - If the backup of files in the deploy dir +# is done (before deploy). If set to false, rollback is disabled. +# +# [*backup_rsync_options*] +# (Optional) - The extra options to pass to rsync for backup operations. Use +# it, for example, to exclude directories that you don't want to archive. +# IE: "--exclude .snapshot --exclude cache --exclude www/cache". +# +# [*backup_retention*] +# (Optional) - Number of backup archives to keep. (Default 5). +# Lower the default value if your backups are too large and may fill up the +# filesystem. +# +# [*run_checks*] +# (Optional) - If you want to run local puppi checks before and after the +# deploy procedure. Default: "true". +# +# [*always_deploy*] +# (Optional) - If you always deploy what has been downloaded. Default="yes", +# if set to "no" a checksum is made between the files previously downloaded +# and the new files. If they are the same the deploy is not done. +# +# [*auto_deploy*] +# (Optional) - If you want to automatically run this puppi deploy when +# Puppet runs. Default: 'false' +# +define puppi::project::archive ( + $source, + $deploy_root, + $user = 'root', + $predeploy_customcommand = '', + $predeploy_user = '', + $predeploy_priority = '39', + $postdeploy_customcommand = '', + $postdeploy_user = '', + $postdeploy_priority = '41', + $disable_services = '', + $firewall_src_ip = '', + $firewall_dst_port = '0', + $firewall_delay = '1', + $report_email = '', + $clean_deploy = false, + $backup_enable = true, + $backup_rsync_options = '--exclude .snapshot', + $backup_retention = '5', + $run_checks = true, + $always_deploy = true, + $auto_deploy = false, + $enable = true ) { + + require puppi + require puppi::params + + # Set default values + $predeploy_real_user = $predeploy_user ? { + '' => $user, + default => $predeploy_user, + } + + $postdeploy_real_user = $postdeploy_user ? { + '' => $user, + default => $postdeploy_user, + } + + $real_always_deploy = any2bool($always_deploy) ? { + false => 'no', + true => 'yes', + } + + + $bool_run_checks = any2bool($run_checks) + $bool_clean_deploy = any2bool($clean_deploy) + $bool_backup_enable = any2bool($backup_enable) + $bool_auto_deploy = any2bool($auto_deploy) + + $source_type = url_parse($source,filetype) + + $real_source_type = $source_type ? { + '.tar' => 'tar', + '.tar.gz' => 'tarball', + '.gz' => 'tarball', + '.tgz' => 'tarball', + '.zip' => 'zip', + } + +### CREATE PROJECT + puppi::project { $name: + enable => $enable , + } + +### DEPLOY SEQUENCE + if ($bool_run_checks == true) { + puppi::deploy { "${name}-Run_PRE-Checks": + priority => '10' , + command => 'check_project.sh' , + arguments => $name , + user => 'root' , + project => $name , + enable => $enable , + } + } + + # Here source file is retrieved + puppi::deploy { "${name}-Retrieve_Archive": + priority => '20' , + command => 'get_file.sh' , + arguments => "-s ${source} -t ${real_source_type} -a ${real_always_deploy}" , + user => 'root' , + project => $name , + enable => $enable , + } + + puppi::deploy { "${name}-PreDeploy_Archive": + priority => '25' , + command => 'predeploy.sh' , + user => 'root' , + project => $name , + enable => $enable , + } + + if ($firewall_src_ip != '') { + puppi::deploy { "${name}-Load_Balancer_Block": + priority => '25' , + command => 'firewall.sh' , + arguments => "${firewall_src_ip} ${firewall_dst_port} on ${firewall_delay}" , + user => 'root', + project => $name , + enable => $enable , + } + } + + if ($bool_backup_enable == true) { + puppi::deploy { "${name}-Backup_existing_Files": + priority => '30' , + command => 'archive.sh' , + arguments => "-b ${deploy_root} -o '${backup_rsync_options}' -n ${backup_retention}" , + user => 'root' , + project => $name , + enable => $enable , + } + } + + if ($disable_services != '') { + puppi::deploy { "${name}-Disable_extra_services": + priority => '36' , + command => 'service.sh' , + arguments => "stop ${disable_services}" , + user => 'root', + project => $name , + enable => $enable , + } + } + + if ($predeploy_customcommand != '') { + puppi::deploy { "${name}-Run_Custom_PreDeploy_Script": + priority => $predeploy_priority , + command => 'execute.sh' , + arguments => $predeploy_customcommand , + user => $predeploy_real_user , + project => $name , + enable => $enable , + } + } + + # Here is done the deploy on $deploy_root + puppi::deploy { "${name}-Deploy": + priority => '40' , + command => 'deploy_files.sh' , + arguments => "-d ${deploy_root} -c ${bool_clean_deploy}", + user => $user , + project => $name , + enable => $enable , + } + + if ($postdeploy_customcommand != '') { + puppi::deploy { "${name}-Run_Custom_PostDeploy_Script": + priority => $postdeploy_priority , + command => 'execute.sh' , + arguments => $postdeploy_customcommand , + user => $postdeploy_real_user , + project => $name , + enable => $enable , + } + } + + if ($disable_services != '') { + puppi::deploy { "${name}-Enable_extra_services": + priority => '44' , + command => 'service.sh' , + arguments => "start ${disable_services}" , + user => 'root', + project => $name , + enable => $enable , + } + } + + if ($firewall_src_ip != '') { + puppi::deploy { "${name}-Load_Balancer_Unblock": + priority => '46' , + command => 'firewall.sh' , + arguments => "${firewall_src_ip} ${firewall_dst_port} off 0" , + user => 'root', + project => $name , + enable => $enable , + } + } + + if ($bool_run_checks == true) { + puppi::deploy { "${name}-Run_POST-Checks": + priority => '80' , + command => 'check_project.sh' , + arguments => $name , + user => 'root' , + project => $name , + enable => $enable , + } + } + + +### ROLLBACK PROCEDURE + + if ($bool_backup_enable == true) { + if ($firewall_src_ip != '') { + puppi::rollback { "${name}-Load_Balancer_Block": + priority => '25' , + command => 'firewall.sh' , + arguments => "${firewall_src_ip} ${firewall_dst_port} on ${firewall_delay}" , + user => 'root', + project => $name , + enable => $enable , + } + } + + if ($disable_services != '') { + puppi::rollback { "${name}-Disable_extra_services": + priority => '37' , + command => 'service.sh' , + arguments => "stop ${disable_services}" , + user => 'root', + project => $name , + enable => $enable , + } + } + + if ($predeploy_customcommand != '') { + puppi::rollback { "${name}-Run_Custom_PreDeploy_Script": + priority => $predeploy_priority , + command => 'execute.sh' , + arguments => $predeploy_customcommand , + user => $predeploy_real_user , + project => $name , + enable => $enable , + } + } + + puppi::rollback { "${name}-Recover_Files_To_Deploy": + priority => '40' , + command => 'archive.sh' , + arguments => "-r ${deploy_root} -o '${backup_rsync_options}'" , + user => $user , + project => $name , + enable => $enable , + } + + if ($postdeploy_customcommand != '') { + puppi::rollback { "${name}-Run_Custom_PostDeploy_Script": + priority => $postdeploy_priority , + command => 'execute.sh' , + arguments => $postdeploy_customcommand , + user => $postdeploy_real_user , + project => $name , + enable => $enable , + } + } + + if ($disable_services != '') { + puppi::rollback { "${name}-Enable_extra_services": + priority => '44' , + command => 'service.sh' , + arguments => "start ${disable_services}" , + user => 'root', + project => $name , + enable => $enable , + } + } + + if ($firewall_src_ip != '') { + puppi::rollback { "${name}-Load_Balancer_Unblock": + priority => '46' , + command => 'firewall.sh' , + arguments => "${firewall_src_ip} ${firewall_dst_port} off 0" , + user => 'root', + project => $name , + enable => $enable , + } + } + + if ($bool_run_checks == true) { + puppi::rollback { "${name}-Run_POST-Checks": + priority => '80' , + command => 'check_project.sh' , + arguments => $name , + user => 'root' , + project => $name , + enable => $enable , + } + } + } + +### REPORTING + + if ($report_email != '') { + puppi::report { "${name}-Mail_Notification": + priority => '20' , + command => 'report_mail.sh' , + arguments => $report_email , + user => 'root', + project => $name , + enable => $enable , + } + } + +### AUTO DEPLOY DURING PUPPET RUN + if ($bool_auto_deploy == true) { + puppi::run { $name: } + } + +} diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/puppi/manifests/project/builder.pp b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/puppi/manifests/project/builder.pp new file mode 100644 index 00000000000..c76cd1777a9 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/puppi/manifests/project/builder.pp @@ -0,0 +1,561 @@ +# = Define puppi::project::builder +# +# This is a shortcut define to build a puppi project for the deploy of web +# applications based on different sources: a war file, a tar file, a source dir, +# a list of files or a nexus maven repository +# It uses different "core" defines (puppi::project, puppi:deploy (many), +# puppi::rollback (many)) to build a full featured template project for +# automatic deployments. +# If you need to customize it, either change the template defined here or +# build up your own custom ones. +# +# == Variables: +# +# [*source*] +# The full URL of the main file to retrieve. +# Format should be in URI standard (http:// file:// ssh:// rsync://). +# +# [*source_type*] +# The type of file that is retrieved. Accepted values: tarball, zip, list, +# war, dir, maven-metadata. +# +# [*deploy_root*] +# The destination directory where the retrieved file(s) are deployed. +# +# [*init_source*] +# (Optional) - The full URL to be used to retrieve, for the first time, +# the project files. They are copied directly to the $deploy_root +# Format should be in URI standard (http:// file:// ssh:// svn://). +# +# [*magicfix*] +# (Optional) - A string that is used as prefix or suffix according to the +# context and the scripts used in the deploy procedure. +# +# [*user*] +# (Optional) - The user to be used for deploy operations. +# +# [*predeploy_customcommand*] +# (Optional) - Full path with arguments of an eventual custom command to +# execute before the deploy. The command is executed as $predeploy_user. +# +# [*predeploy_user*] +# (Optional) - The user to be used to execute the $predeploy_customcommand. +# By default is the same of $user. +# +# [*predeploy_priority*] +# (Optional) - The priority (execution sequence number) that defines when, +# during the deploy procedure, the $predeploy_customcommand is executed +# Default: 39 (immediately before the copy of files on the deploy root). +# +# [*postdeploy_customcommand*] +# (Optional) - Full path with arguments of an eventual custom command to +# execute after the deploy. The command is executed as $postdeploy_user. +# +# [*postdeploy_user*] +# (Optional) - The user to be used to execute the $postdeploy_customcommand. +# By default is the same of $user. +# +# [*postdeploy_priority*] +# (Optional) - The priority (execution sequence number) that defines when, +# during the deploy procedure, the $postdeploy_customcommand is executed +# Default: 41 (immediately after the copy of files on the deploy root). +# +# [*disable_services*] +# (Optional) - The names (space separated) of the services you might want to +# stop during deploy. By default is blank. Example: "apache puppet monit". +# +# [*firewall_src_ip*] +# (Optional) - The IP address of a loadbalancer you might want to block out +# during a deploy. +# +# [*firewall_dst_port*] +# (Optional) - The local port to block from the loadbalancer during deploy +# (Default all). +# +# [*firewall_delay*] +# (Optional) - A delay time in seconds to wait after the block of +# $firewall_src_ip. Should be at least as long as the loadbalancer check +# interval for the services stopped during deploy (Default: 1). +# +# [*report_email*] +# (Optional) - The (space separated) email(s) to notify of deploy/rollback +# operations. If none is specified, no email is sent. +# +# [*backup*] +# (Optional) - How backups of files are made. Default: "full". Options: +# "full" - Make full backup of the deploy_root before making the deploy +# "diff" - Backup only the files that are going to be deployed. Note that +# in order to make reliable rollbacks of versions older that the latest +# you've to individually rollback every intermediate deploy +# "false" - Do not make backups. This disables the option to make rollbacks +# +# [*backup_rsync_options*] +# (Optional) - The extra options to pass to rsync for backup operations. Use +# it, for example, to exclude directories that you don't want to archive. +# IE: "--exclude .snapshot --exclude cache --exclude www/cache". +# +# [*backup_retention*] +# (Optional) - Number of backup archives to keep. (Default 5). +# Lower the default value if your backups are too large and may fill up the +# filesystem. +# +# [*run_checks*] +# (Optional) - If you want to run local puppi checks before and after the +# deploy procedure. Default: "true". +# +# [*always_deploy*] +# (Optional) - If you always deploy what has been downloaded. Default="yes", +# if set to "no" a checksum is made between the files previously downloaded +# and the new files. If they are the same the deploy is not done. +# +# == Usage +# A sample deploy of a zip with custom postdeploy command and mail notification +# puppi::project::builder { "cms": +# source => "http://repo.example42.com/deploy/cms/cms.zip", +# source_type => "zip", +# user => "root", +# deploy_root => "/var/www", +# postdeploy_customcommand => "chown -R www-data /var/www/files", +# postdeploy_user => "root", +# postdeploy_priority => "41", +# report_email => "sysadmins@example42.com", +# enable => "true", +# } +# +# [*auto_deploy*] +# (Optional) - If you want to automatically run this puppi deploy when +# Puppet runs. Default: 'false' +# +define puppi::project::builder ( + $source, + $source_type, + $deploy_root, + $init_source = '', + $user = 'root', + $magicfix = '', + $predeploy_customcommand = '', + $predeploy_user = '', + $predeploy_priority = '39', + $postdeploy_customcommand = '', + $postdeploy_user = '', + $postdeploy_priority = '41', + $disable_services = '', + $firewall_src_ip = '', + $firewall_dst_port = '0', + $firewall_delay = '1', + $report_email = '', + $backup = 'full', + $backup_rsync_options = '--exclude .snapshot', + $backup_retention = '5', + $run_checks = true, + $always_deploy = true, + $auto_deploy = false, + $enable = true ) { + + require puppi + require puppi::params + + # Autoinclude the puppi class + include puppi + + # Set default values + $predeploy_real_user = $predeploy_user ? { + '' => $user, + default => $predeploy_user, + } + + $postdeploy_real_user = $postdeploy_user ? { + '' => $user, + default => $postdeploy_user, + } + + $real_source_type = $source_type ? { + 'dir' => 'dir', + 'tarball' => 'tarball', + 'zip' => 'zip', + 'gz' => 'gz', + 'maven-metadata' => 'maven-metadata', + 'maven' => 'maven-metadata', + 'war' => 'war', + 'list' => 'list', + } + + $real_always_deploy = any2bool($always_deploy) ? { + false => 'no', + true => 'yes', + } + + $bool_run_checks = any2bool($run_checks) + $bool_auto_deploy = any2bool($auto_deploy) + + $source_filename = url_parse($source,'filename') + +# Create Project + puppi::project { $name: enable => $enable } + + +### INIT SEQUENCE + if ($init_source != '') { + puppi::initialize { "${name}-Deploy_Files": + priority => '40' , + command => 'get_file.sh' , + arguments => "-s ${init_source} -d ${deploy_root}" , + user => $user , + project => $name , + enable => $enable , + } + } + + +### DEPLOY SEQUENCE + if ($bool_run_checks == true) { + puppi::deploy { "${name}-Run_PRE-Checks": + priority => '10' , + command => 'check_project.sh' , + arguments => $name , + user => 'root' , + project => $name , + enable => $enable , + } + } + + # Here source file is retrieved + puppi::deploy { "${name}-Retrieve_SourceFile": + priority => '20' , + command => 'get_file.sh' , + arguments => "-s ${source} -t ${real_source_type} -a ${real_always_deploy}" , + user => 'root' , + project => $name , + enable => $enable , + } + + $args_magicfix = $magicfix ? { + '' => '', + default => "-m ${magicfix}" , + } + + if ($real_source_type == 'tarball') { + puppi::deploy { "${name}-PreDeploy_Tar": + priority => '25' , + command => 'predeploy.sh' , + arguments => $args_magicfix, + user => 'root' , + project => $name , + enable => $enable , + } + } + + if ($real_source_type == 'zip') { + + puppi::deploy { "${name}-PreDeploy_Zip": + priority => '25' , + command => 'predeploy.sh' , + arguments => $args_magicfix, + user => 'root' , + project => $name , + enable => $enable , + } + } + + if ($real_source_type == 'list') { + puppi::deploy { "${name}-Extract_File_Metadata": + priority => '22' , + command => 'get_metadata.sh' , + arguments => $args_magicfix, + user => 'root' , + project => $name , + enable => $enable , + } + + $clean_file_list_magicfix = $magicfix ? { + '' => '', + default => $magicfix, + } + + puppi::deploy { "${name}-Clean_File_List": + priority => '24' , + command => 'clean_filelist.sh' , + arguments => $clean_file_list_magicfix, + user => 'root' , + project => $name , + enable => $enable , + } + puppi::deploy { "${name}-Retrieve_Files": + priority => '25' , + command => 'get_filesfromlist.sh' , + arguments => $source , + user => 'root' , + project => $name , + enable => $enable , + } + } + + if ($backup == 'full') or ($backup == 'diff') { + puppi::deploy { "${name}-Backup_existing_Files": + priority => '30' , + command => 'archive.sh' , + arguments => "-b ${deploy_root} -m ${backup} -o '${backup_rsync_options}' -n ${backup_retention}" , + user => 'root' , + project => $name , + enable => $enable , + } + } + + if ($firewall_src_ip != '') { + puppi::deploy { "${name}-Load_Balancer_Block": + priority => '34' , + command => 'firewall.sh' , + arguments => "${firewall_src_ip} ${firewall_dst_port} on ${firewall_delay}" , + user => 'root', + project => $name , + enable => $enable , + } + } + + if ($real_source_type == 'war') { + puppi::deploy { "${name}-Remove_existing_WAR": + priority => '35' , + command => 'delete.sh' , + arguments => "${deploy_root}/${source_filename}" , + user => 'root' , + project => $name , + enable => $enable , + } + puppi::deploy { "${name}-Check_undeploy": + priority => '36' , + command => 'checkwardir.sh' , + arguments => "-a ${deploy_root}/${source_filename}" , + user => $user , + project => $name , + enable => $enable , + } + } + + if ($disable_services != '') { + puppi::deploy { "${name}-Disable_extra_services": + priority => '37' , + command => 'service.sh' , + arguments => "stop ${disable_services}" , + user => 'root', + project => $name , + enable => $enable , + } + } + + if ($predeploy_customcommand != '') { + puppi::deploy { "${name}-Run_Custom_PreDeploy_Script": + priority => $predeploy_priority , + command => 'execute.sh' , + arguments => $predeploy_customcommand , + user => $predeploy_real_user , + project => $name , + enable => $enable , + } + } + + # Here is done the deploy on $deploy_root + puppi::deploy { "${name}-Deploy": + priority => '40' , + command => 'deploy.sh' , + arguments => $deploy_root , + user => $user , + project => $name , + enable => $enable , + } + + if ($postdeploy_customcommand != '') { + puppi::deploy { "${name}-Run_Custom_PostDeploy_Script": + priority => $postdeploy_priority , + command => 'execute.sh' , + arguments => $postdeploy_customcommand , + user => $postdeploy_real_user , + project => $name , + enable => $enable , + } + } + + if ($disable_services != '') { + puppi::deploy { "${name}-Enable_extra_services": + priority => '44' , + command => 'service.sh' , + arguments => "start ${disable_services}" , + user => 'root', + project => $name , + enable => $enable , + } + } + + if ($real_source_type == 'war') { + puppi::deploy { "${name}-Check_deploy": + priority => '45' , + command => 'checkwardir.sh' , + arguments => "-p ${deploy_root}/${source_filename}" , + user => $user , + project => $name , + enable => $enable , + } + } + + if ($firewall_src_ip != '') { + puppi::deploy { "${name}-Load_Balancer_Unblock": + priority => '46' , + command => 'firewall.sh' , + arguments => "${firewall_src_ip} ${firewall_dst_port} off 0" , + user => 'root', + project => $name , + enable => $enable , + } + } + + if ($bool_run_checks == true) { + puppi::deploy { "${name}-Run_POST-Checks": + priority => '80' , + command => 'check_project.sh' , + arguments => $name , + user => 'root' , + project => $name , + enable => $enable , + } + } + + +### ROLLBACK PROCEDURE + + if ($firewall_src_ip != '') { + puppi::rollback { "${name}-Load_Balancer_Block": + priority => '34' , + command => 'firewall.sh' , + arguments => "${firewall_src_ip} ${firewall_dst_port} on ${firewall_delay}" , + user => 'root', + project => $name , + enable => $enable , + } + } + + if ($real_source_type == 'war') { + puppi::rollback { "${name}-Remove_existing_WAR": + priority => '35' , + command => 'delete.sh' , + arguments => "${deploy_root}/${source_filename}" , + user => 'root' , + project => $name , + enable => $enable , + } + puppi::rollback { "${name}-Check_undeploy": + priority => '36' , + command => 'checkwardir.sh' , + arguments => "-a ${deploy_root}/${source_filename}" , + user => $user , + project => $name , + enable => $enable , + } + } + + if ($disable_services != '') { + puppi::rollback { "${name}-Disable_extra_services": + priority => '37' , + command => 'service.sh' , + arguments => "stop ${disable_services}" , + user => 'root', + project => $name , + enable => $enable , + } + } + + if ($predeploy_customcommand != '') { + puppi::rollback { "${name}-Run_Custom_PreDeploy_Script": + priority => $predeploy_priority , + command => 'execute.sh' , + arguments => $predeploy_customcommand , + user => $predeploy_real_user , + project => $name , + enable => $enable , + } + } + + if ($backup == 'full') or ($backup == 'diff') { + puppi::rollback { "${name}-Recover_Files_To_Deploy": + priority => '40' , + command => 'archive.sh' , + arguments => "-r ${deploy_root} -m ${backup} -o '${backup_rsync_options}'" , + user => $user , + project => $name , + enable => $enable , + } + } + + if ($postdeploy_customcommand != '') { + puppi::rollback { "${name}-Run_Custom_PostDeploy_Script": + priority => $postdeploy_priority , + command => 'execute.sh' , + arguments => $postdeploy_customcommand , + user => $postdeploy_real_user , + project => $name , + enable => $enable , + } + } + + if ($disable_services != '') { + puppi::rollback { "${name}-Enable_extra_services": + priority => '44' , + command => 'service.sh' , + arguments => "start ${disable_services}" , + user => 'root', + project => $name , + enable => $enable , + } + } + + if ($real_source_type == 'war') { + puppi::rollback { "${name}-Check_deploy": + priority => '45' , + command => 'checkwardir.sh' , + arguments => "-p ${deploy_root}/${source_filename}" , + user => $user , + project => $name , + enable => $enable , + } + } + + if ($firewall_src_ip != '') { + puppi::rollback { "${name}-Load_Balancer_Unblock": + priority => '46' , + command => 'firewall.sh' , + arguments => "${firewall_src_ip} ${firewall_dst_port} off 0" , + user => 'root', + project => $name , + enable => $enable , + } + } + + if ($bool_run_checks == true) { + puppi::rollback { "${name}-Run_POST-Checks": + priority => '80' , + command => 'check_project.sh' , + arguments => $name , + user => 'root' , + project => $name , + enable => $enable , + } + } + + +### REPORTING + + if ($report_email != '') { + puppi::report { "${name}-Mail_Notification": + priority => '20' , + command => 'report_mail.sh' , + arguments => $report_email , + user => 'root', + project => $name , + enable => $enable , + } + } + +### AUTO DEPLOY DURING PUPPET RUN + if ($bool_auto_deploy == true) { + puppi::run { $name: } + } + +} diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/puppi/manifests/project/dir.pp b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/puppi/manifests/project/dir.pp new file mode 100644 index 00000000000..a56ad645522 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/puppi/manifests/project/dir.pp @@ -0,0 +1,450 @@ +# = Define puppi::project::dir +# +# This is a shortcut define to build a puppi project for a deploy based +# on the syncronization of a directory. +# It uses different "core" defines (puppi::project, puppi:deploy (many), +# puppi::rollback (many)) to build a full featured template project for +# automatic deployments. +# If you need to customize it, either change the template defined here or +# build up your own custom ones. +# +# == Variables: +# +# [*source*] +# The full URL of the main file to retrieve. +# Format should be in URI standard (http:// file:// ssh:// rsync://). +# +# [*deploy_root*] +# The destination directory where the retrieved file(s) are deployed. +# +# [*init_source*] +# (Optional) - The full URL to be used to retrieve, for the first time, +# the project files. They are copied directly to the $deploy_root +# Format should be in URI standard (http:// file:// ssh:// svn://). +# +# [*user*] +# (Optional) - The user to be used for deploy operations. +# +# [*predeploy_customcommand*] +# (Optional) - Full path with arguments of an eventual custom command to +# execute before the deploy. The command is executed as $predeploy_user. +# +# [*predeploy_user*] +# (Optional) - The user to be used to execute the $predeploy_customcommand. +# By default is the same of $user. +# +# [*predeploy_priority*] +# (Optional) - The priority (execution sequence number) that defines when, +# during the deploy procedure, the $predeploy_customcommand is executed +# Default: 39 (immediately before the copy of files on the deploy root). +# +# [*postdeploy_customcommand*] +# (Optional) - Full path with arguments of an eventual custom command to +# execute after the deploy. The command is executed as $postdeploy_user. +# +# [*postdeploy_user*] +# (Optional) - The user to be used to execute the $postdeploy_customcommand. +# By default is the same of $user. +# +# [*postdeploy_priority*] +# (Optional) - The priority (execution sequence number) that defines when, +# during the deploy procedure, the $postdeploy_customcommand is executed +# Default: 41 (immediately after the copy of files on the deploy root). +# +# [*init_script*] +# (Optional - Obsolete) - The name (ex: tomcat) of the init script of your +# Application server. If you define it, the AS is stopped and then started +# during deploy. This option is deprecated, you can use $disable_services +# for the same functionality +# +# [*disable_services*] +# (Optional) - The names (space separated) of the services you might want to +# stop during deploy. By default is blank. Example: "apache puppet monit". +# +# [*firewall_src_ip*] +# (Optional) - The IP address of a loadbalancer you might want to block out +# during a deploy. +# +# [*firewall_dst_port*] +# (Optional) - The local port to block from the loadbalancer during deploy +# (Default all). +# +# [*firewall_delay*] +# (Optional) - A delay time in seconds to wait after the block of +# $firewall_src_ip. Should be at least as long as the loadbalancer check +# interval for the services stopped during deploy (Default: 1). +# +# [*report_email*] +# (Optional) - The (space separated) email(s) to notify of deploy/rollback +# operations. If none is specified, no email is sent. +# +# [*backup_rsync_options*] +# (Optional) - The extra options to pass to rsync for backup operations. Use +# it, for example, to exclude directories that you don't want to archive. +# IE: "--exclude .snapshot --exclude cache --exclude www/cache". +# +# [*backup_retention*] +# (Optional) - Number of backup archives to keep. (Default 5). +# Lower the default value if your backups are too large and may fill up the +# filesystem. +# +# [*run_checks*] +# (Optional) - If you want to run local puppi checks before and after the +# deploy procedure. Default: "true". +# +# [*skip_predeploy*] +# For large data to deploy predeploy copy in /tmp/puppi might full the +# filesystem. Set to "yes" to deploy directly to $deploy_root. Default: no +# (files are first predeployed in /tmp/puppi then copied to $deploy_root) +# +# [*auto_deploy*] +# (Optional) - If you want to automatically run this puppi deploy when +# Puppet runs. Default: 'false' +# +define puppi::project::dir ( + $source, + $deploy_root, + $init_source = '', + $user = 'root', + $predeploy_customcommand = '', + $predeploy_user = '', + $predeploy_priority = '39', + $postdeploy_customcommand = '', + $postdeploy_user = '', + $postdeploy_priority = '41', + $init_script = '', + $disable_services = '', + $firewall_src_ip = '', + $firewall_dst_port = '0', + $firewall_delay = '1', + $report_email = '', + $backup_rsync_options = '--exclude .snapshot', + $backup_retention = '5', + $run_checks = true, + $skip_predeploy = false, + $auto_deploy = false, + $enable = true ) { + + require puppi + require puppi::params + + # Set default values + $predeploy_real_user = $predeploy_user ? { + '' => $user, + default => $predeploy_user, + } + + $postdeploy_real_user = $postdeploy_user ? { + '' => $user, + default => $postdeploy_user, + } + + $bool_run_checks = any2bool($run_checks) + $bool_skip_predeploy = any2bool($skip_predeploy) + $bool_auto_deploy = any2bool($auto_deploy) + +### CREATE PROJECT + puppi::project { $name: + enable => $enable , + } + + +### INIT SEQUENCE + if ($init_source != '') { + puppi::initialize { "${name}-Deploy_Files": + priority => '40' , + command => 'get_file.sh' , + arguments => "-s ${init_source} -d ${deploy_root}" , + user => $user , + project => $name , + enable => $enable , + } + } + + +### DEPLOY SEQUENCE + if ($bool_run_checks == true) { + puppi::deploy { "${name}-Run_PRE-Checks": + priority => '10' , + command => 'check_project.sh' , + arguments => $name , + user => 'root' , + project => $name , + enable => $enable , + } + } + + if ($bool_skip_predeploy == false) { + puppi::deploy { "${name}-Sync_Files": + priority => '20' , + command => 'get_file.sh' , + arguments => "-s ${source} -t dir" , + user => 'root' , + project => $name , + enable => $enable , + } + } + + if ($firewall_src_ip != '') { + puppi::deploy { "${name}-Load_Balancer_Block": + priority => '25' , + command => 'firewall.sh' , + arguments => "${firewall_src_ip} ${firewall_dst_port} on ${firewall_delay}" , + user => 'root', + project => $name , + enable => $enable , + } + } + + puppi::deploy { "${name}-Backup_existing_Files": + priority => '30' , + command => 'archive.sh' , + arguments => "-b ${deploy_root} -o '${backup_rsync_options}' -n ${backup_retention}" , + user => 'root' , + project => $name , + enable => $enable , + } + + if ($disable_services != '') { + puppi::deploy { "${name}-Disable_extra_services": + priority => '36' , + command => 'service.sh' , + arguments => "stop ${disable_services}" , + user => 'root', + project => $name , + enable => $enable , + } + } + + if ($init_script != '') { + puppi::deploy { "${name}-Service_stop": + priority => '38' , + command => 'service.sh' , + arguments => "stop ${init_script}" , + user => 'root', + project => $name , + enable => $enable , + } + } + + if ($predeploy_customcommand != '') { + puppi::deploy { "${name}-Run_Custom_PreDeploy_Script": + priority => $predeploy_priority , + command => 'execute.sh' , + arguments => $predeploy_customcommand , + user => $predeploy_real_user , + project => $name , + enable => $enable , + } + } + + # Here is done the deploy on $deploy_root + if ($bool_skip_predeploy == false) { + puppi::deploy { "${name}-Deploy": + priority => '40' , + command => 'deploy.sh' , + arguments => $deploy_root , + user => $user , + project => $name , + enable => $enable , + } + } + + if ($bool_skip_predeploy == true) { + puppi::deploy { "${name}-Deploy": + priority => '40' , + command => 'get_file.sh' , + arguments => "-s ${source} -d ${deploy_root}" , + user => $user , + project => $name , + enable => $enable , + } + } + # End deploy + + if ($postdeploy_customcommand != '') { + puppi::deploy { "${name}-Run_Custom_PostDeploy_Script": + priority => $postdeploy_priority , + command => 'execute.sh' , + arguments => $postdeploy_customcommand , + user => $postdeploy_real_user , + project => $name , + enable => $enable , + } + } + + if ($init_script != '') { + puppi::deploy { "${name}-Service_start": + priority => '42' , + command => 'service.sh' , + arguments => "start ${init_script}" , + user => 'root', + project => $name , + enable => $enable , + } + } + + if ($disable_services != '') { + puppi::deploy { "${name}-Enable_extra_services": + priority => '44' , + command => 'service.sh' , + arguments => "start ${disable_services}" , + user => 'root', + project => $name , + enable => $enable , + } + } + + if ($firewall_src_ip != '') { + puppi::deploy { "${name}-Load_Balancer_Unblock": + priority => '46' , + command => 'firewall.sh' , + arguments => "${firewall_src_ip} ${firewall_dst_port} off 0" , + user => 'root', + project => $name , + enable => $enable , + } + } + + if ($bool_run_checks == true) { + puppi::deploy { "${name}-Run_POST-Checks": + priority => '80' , + command => 'check_project.sh' , + arguments => $name , + user => 'root' , + project => $name , + enable => $enable , + } + } + + +### ROLLBACK SEQUENCE + + if ($firewall_src_ip != '') { + puppi::rollback { "${name}-Load_Balancer_Block": + priority => '25' , + command => 'firewall.sh' , + arguments => "${firewall_src_ip} ${firewall_dst_port} on ${firewall_delay}" , + user => 'root', + project => $name , + enable => $enable , + } + } + + if ($disable_services != '') { + puppi::rollback { "${name}-Disable_extra_services": + priority => '37' , + command => 'service.sh' , + arguments => "stop ${disable_services}" , + user => 'root', + project => $name , + enable => $enable , + } + } + + if ($init_script != '') { + puppi::rollback { "${name}-Service_stop": + priority => '38' , + command => 'service.sh' , + arguments => "stop ${init_script}" , + user => 'root', + project => $name , + enable => $enable , + } + } + + if ($predeploy_customcommand != '') { + puppi::rollback { "${name}-Run_Custom_PreDeploy_Script": + priority => $predeploy_priority , + command => 'execute.sh' , + arguments => $predeploy_customcommand , + user => $predeploy_real_user , + project => $name , + enable => $enable , + } + } + + puppi::rollback { "${name}-Recover_Files_To_Deploy": + priority => '40' , + command => 'archive.sh' , + arguments => "-r ${deploy_root} -o '${backup_rsync_options}'" , + user => $user , + project => $name , + enable => $enable , + } + + if ($postdeploy_customcommand != '') { + puppi::rollback { "${name}-Run_Custom_PostDeploy_Script": + priority => $postdeploy_priority , + command => 'execute.sh' , + arguments => $postdeploy_customcommand , + user => $postdeploy_real_user , + project => $name , + enable => $enable , + } + } + + if ($init_script != '') { + puppi::rollback { "${name}-Service_start": + priority => '42' , + command => 'service.sh' , + arguments => "start ${init_script}" , + user => 'root', + project => $name , + enable => $enable , + } + } + + if ($disable_services != '') { + puppi::rollback { "${name}-Enable_extra_services": + priority => '44' , + command => 'service.sh' , + arguments => "start ${disable_services}" , + user => 'root', + project => $name , + enable => $enable , + } + } + + if ($firewall_src_ip != '') { + puppi::rollback { "${name}-Load_Balancer_Unblock": + priority => '46' , + command => 'firewall.sh' , + arguments => "${firewall_src_ip} ${firewall_dst_port} off 0" , + user => 'root', + project => $name , + enable => $enable , + } + } + + if ($bool_run_checks == true) { + puppi::rollback { "${name}-Run_POST-Checks": + priority => '80' , + command => 'check_project.sh' , + arguments => $name , + user => 'root' , + project => $name , + enable => $enable , + } + } + + +### REPORTING + + if ($report_email != '') { + puppi::report { "${name}-Mail_Notification": + priority => '20' , + command => 'report_mail.sh' , + arguments => $report_email , + user => 'root', + project => $name , + enable => $enable , + } + } + +### AUTO DEPLOY DURING PUPPET RUN + if ($bool_auto_deploy == true) { + puppi::run { $name: } + } + +} diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/puppi/manifests/project/files.pp b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/puppi/manifests/project/files.pp new file mode 100644 index 00000000000..1c625b9819a --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/puppi/manifests/project/files.pp @@ -0,0 +1,482 @@ +# = Define puppi::project::files +# +# This is a sample define to build a puppi project for the deploy of +# one or more files based on a provided list containing, one per line, +# the full path of the files to deploy. +# The place (url) from where to get the files is defined by the +# $source_baseurl variable. +# You can strip out some beginning chars from each line with the +# (optional) $files_prefix variable. +# Files are then copied to the $deploy_root you define. +# +# Many different variables are optional in order to adapt the define +# to different cases and needs, if you still need to customize it, +# you can clone this puppi::project into another file and change the +# define name. +# +# == Variables: +# +# [*source*] +# The full URL of the main file to retrieve. +# Format should be in URI standard (http:// file:// ssh:// rsync://). +# +# [*deploy_root*] +# The destination directory where the retrieved file(s) are deployed. +# +# [*source_baseurl*] +# The full URL, in URI standard format, to prepend to the entries i +# the files list in order to retrieve the relative files. +# +# [*init_source*] +# (Optional) - The full URL to be used to retrieve, for the first time, +# the project files. They are copied directly to the $deploy_root +# Format should be in URI standard (http:// file:// ssh:// svn://). +# +# [*prefix*] +# (Optional) - The prefix that might be present in the filelist to +# define custom metadata +# +# [*files_prefix*] +# (Optional) The prefix to remove from the list entries in order to +# determine the files path on the deploy_root +# We suggest to place in the files list just the deploy_root relative +# paths of the files, and in this case the $files_prefix is null +# +# [*user*] +# (Optional) - The user to be used for deploy operations. +# +# [*predeploy_customcommand*] +# (Optional) - Full path with arguments of an eventual custom command to +# execute before the deploy. The command is executed as $predeploy_user. +# +# [*predeploy_user*] +# (Optional) - The user to be used to execute the $predeploy_customcommand. +# By default is the same of $user. +# +# [*predeploy_priority*] +# (Optional) - The priority (execution sequence number) that defines when, +# during the deploy procedure, the $predeploy_customcommand is executed +# Default: 39 (immediately before the copy of files on the deploy root). +# +# [*postdeploy_customcommand*] +# (Optional) - Full path with arguments of an eventual custom command to +# execute after the deploy. The command is executed as $postdeploy_user. +# +# [*postdeploy_user*] +# (Optional) - The user to be used to execute the $postdeploy_customcommand. +# By default is the same of $user. +# +# [*postdeploy_priority*] +# (Optional) - The priority (execution sequence number) that defines when, +# during the deploy procedure, the $postdeploy_customcommand is executed +# Default: 41 (immediately after the copy of files on the deploy root). +# +# [*init_script*] +# (Optional - Obsolete) - The name (ex: tomcat) of the init script of your +# Application server. If you define it, the AS is stopped and then started +# during deploy. This option is deprecated, you can use $disable_services +# for the same functionality +# +# [*disable_services*] +# (Optional) - The names (space separated) of the services you might want to +# stop during deploy. By default is blank. Example: "apache puppet monit". +# +# [*firewall_src_ip*] +# (Optional) - The IP address of a loadbalancer you might want to block out +# during a deploy. +# +# [*firewall_dst_port*] +# (Optional) - The local port to block from the loadbalancer during deploy +# (Default all). +# +# [*firewall_delay*] +# (Optional) - A delay time in seconds to wait after the block of +# $firewall_src_ip. Should be at least as long as the loadbalancer check +# interval for the services stopped during deploy (Default: 1). +# +# [*report_email*] +# (Optional) - The (space separated) email(s) to notify of deploy/rollback +# operations. If none is specified, no email is sent. +# +# [*backup_rsync_options*] +# (Optional) - The extra options to pass to rsync for backup operations. Use +# it, for example, to exclude directories that you don't want to archive. +# IE: "--exclude .snapshot --exclude cache --exclude www/cache". +# +# [*backup_retention*] +# (Optional) - Number of backup archives to keep. (Default 5). +# Lower the default value if your backups are too large and may fill up the +# filesystem. +# +# [*run_checks*] +# (Optional) - If you want to run local puppi checks before and after the +# deploy procedure. Default: "true". +# +# [*auto_deploy*] +# (Optional) - If you want to automatically run this puppi deploy when +# Puppet runs. Default: 'false' +# +define puppi::project::files ( + $source, + $source_baseurl, + $deploy_root, + $init_source = '', + $files_prefix = '', + $prefix = '', + $user = 'root', + $predeploy_customcommand = '', + $predeploy_user = '', + $predeploy_priority = '39', + $postdeploy_customcommand = '', + $postdeploy_user = '', + $postdeploy_priority = '41', + $init_script = '', + $disable_services = '', + $firewall_src_ip = '', + $firewall_dst_port = '0', + $firewall_delay = '1', + $report_email = '', + $backup_rsync_options = '--exclude .snapshot', + $backup_retention = '5', + $run_checks = true, + $auto_deploy = false, + $enable = true ) { + + require puppi + require puppi::params + + # Set default values + $predeploy_real_user = $predeploy_user ? { + '' => $user, + default => $predeploy_user, + } + + $postdeploy_real_user = $postdeploy_user ? { + '' => $user, + default => $postdeploy_user, + } + + $bool_run_checks = any2bool($run_checks) + $bool_auto_deploy = any2bool($auto_deploy) + +### CREATE PROJECT + puppi::project { $name: + enable => $enable , + } + + +### INIT SEQUENCE + if ($init_source != '') { + puppi::initialize { "${name}-Deploy_Files": + priority => '40' , + command => 'get_file.sh' , + arguments => "-s ${init_source} -d ${deploy_root}" , + user => $user , + project => $name , + enable => $enable , + } + } + + +### DEPLOY SEQUENCE + if ($bool_run_checks == true) { + puppi::deploy { "${name}-Run_PRE-Checks": + priority => '10' , + command => 'check_project.sh' , + arguments => $name , + user => 'root' , + project => $name , + enable => $enable , + } + } + + puppi::deploy { "${name}-Retrieve_File_List": + priority => '20' , + command => 'get_file.sh' , + arguments => "-s ${source} -t list" , + user => 'root' , + project => $name , + enable => $enable , + } + + $args_prefix = $prefix ? { + '' => '', + default => "-m ${prefix}", + } + + puppi::deploy { "${name}-Extract_File_Metadata": + priority => '22' , + command => 'get_metadata.sh' , + arguments => $args_prefix, + user => 'root' , + project => $name , + enable => $enable , + } + + puppi::deploy { "${name}-Clean_File_List": + priority => '24' , + command => 'clean_filelist.sh' , + arguments => $files_prefix , + user => 'root' , + project => $name , + enable => $enable , + } + + puppi::deploy { "${name}-Retrieve_Files": + priority => '25' , + command => 'get_filesfromlist.sh' , + arguments => $source_baseurl , + user => 'root' , + project => $name , + enable => $enable , + } + + if ($firewall_src_ip != '') { + puppi::deploy { "${name}-Load_Balancer_Block": + priority => '25' , + command => 'firewall.sh' , + arguments => "${firewall_src_ip} ${firewall_dst_port} on ${firewall_delay}" , + user => 'root', + project => $name , + enable => $enable , + } + } + + puppi::deploy { "${name}-Backup_existing_Files": + priority => '30' , + command => 'archive.sh' , + arguments => "-b ${deploy_root} -o '${backup_rsync_options}' -n ${backup_retention}" , + user => 'root' , + project => $name , + enable => $enable , + } + + if ($disable_services != '') { + puppi::deploy { "${name}-Disable_extra_services": + priority => '36' , + command => 'service.sh' , + arguments => "stop ${disable_services}" , + user => 'root', + project => $name , + enable => $enable , + } + } + + if ($init_script != '') { + puppi::deploy { "${name}-Service_stop": + priority => '38' , + command => 'service.sh' , + arguments => "stop ${init_script}" , + user => 'root', + project => $name , + enable => $enable , + } + } + + if ($predeploy_customcommand != '') { + puppi::deploy { "${name}-Run_Custom_PreDeploy_Script": + priority => $predeploy_priority , + command => 'execute.sh' , + arguments => $predeploy_customcommand , + user => $predeploy_real_user , + project => $name , + enable => $enable , + } + } + + # Here is done the deploy on $deploy_root + puppi::deploy { "${name}-Deploy": + priority => '40' , + command => 'deploy.sh' , + arguments => $deploy_root , + user => $user , + project => $name , + enable => $enable , + } + + if ($postdeploy_customcommand != '') { + puppi::deploy { "${name}-Run_Custom_PostDeploy_Script": + priority => $postdeploy_priority , + command => 'execute.sh' , + arguments => $postdeploy_customcommand , + user => $postdeploy_real_user , + project => $name , + enable => $enable , + } + } + + if ($init_script != '') { + puppi::deploy { "${name}-Service_start": + priority => '42' , + command => 'service.sh' , + arguments => "start ${init_script}" , + user => 'root', + project => $name , + enable => $enable , + } + } + + if ($disable_services != '') { + puppi::deploy { "${name}-Enable_extra_services": + priority => '44' , + command => 'service.sh' , + arguments => "start ${disable_services}" , + user => 'root', + project => $name , + enable => $enable , + } + } + + if ($firewall_src_ip != '') { + puppi::deploy { "${name}-Load_Balancer_Unblock": + priority => '46' , + command => 'firewall.sh' , + arguments => "${firewall_src_ip} ${firewall_dst_port} off 0" , + user => 'root', + project => $name , + enable => $enable , + } + } + + if ($bool_run_checks == true) { + puppi::deploy { "${name}-Run_POST-Checks": + priority => '80' , + command => 'check_project.sh' , + arguments => $name , + user => 'root' , + project => $name , + enable => $enable , + } + } + + +### ROLLBACK SEQUENCE + + if ($firewall_src_ip != '') { + puppi::rollback { "${name}-Load_Balancer_Block": + priority => '25' , + command => 'firewall.sh' , + arguments => "${firewall_src_ip} ${firewall_dst_port} on ${firewall_delay}" , + user => 'root', + project => $name , + enable => $enable , + } + } + + if ($disable_services != '') { + puppi::rollback { "${name}-Disable_extra_services": + priority => '36' , + command => 'service.sh' , + arguments => "stop ${disable_services}" , + user => 'root', + project => $name , + enable => $enable , + } + } + + if ($init_script != '') { + puppi::rollback { "${name}-Service_stop": + priority => '38' , + command => 'service.sh' , + arguments => "stop ${init_script}" , + user => 'root', + project => $name , + enable => $enable , + } + } + + if ($predeploy_customcommand != '') { + puppi::rollback { "${name}-Run_Custom_PreDeploy_Script": + priority => $predeploy_priority , + command => 'execute.sh' , + arguments => $predeploy_customcommand , + user => $predeploy_real_user , + project => $name , + enable => $enable , + } + } + + puppi::rollback { "${name}-Recover_Files_To_Deploy": + priority => '40' , + command => 'archive.sh' , + arguments => "-r ${deploy_root} -o '${backup_rsync_options}'" , + user => $user , + project => $name , + enable => $enable , + } + + if ($postdeploy_customcommand != '') { + puppi::rollback { "${name}-Run_Custom_PostDeploy_Script": + priority => $postdeploy_priority , + command => 'execute.sh' , + arguments => $postdeploy_customcommand , + user => $postdeploy_real_user , + project => $name , + enable => $enable , + } + } + + if ($init_script != '') { + puppi::rollback { "${name}-Service_start": + priority => '42' , + command => 'service.sh' , + arguments => "start ${init_script}" , + user => 'root', + project => $name , + enable => $enable , + } + } + + if ($disable_services != '') { + puppi::rollback { "${name}-Enable_extra_services": + priority => '44' , + command => 'service.sh' , + arguments => "start ${disable_services}" , + user => 'root', + project => $name , + enable => $enable , + } + } + + if ($firewall_src_ip != '') { + puppi::rollback { "${name}-Load_Balancer_Unblock": + priority => '46' , + command => 'firewall.sh' , + arguments => "${firewall_src_ip} ${firewall_dst_port} off 0" , + user => 'root', + project => $name , + enable => $enable , + } + } + + if ($bool_run_checks == true) { + puppi::rollback { "${name}-Run_POST-Checks": + priority => '80' , + command => 'check_project.sh' , + arguments => $name , + user => 'root' , + project => $name , + enable => $enable , + } + } + + +### REPORTING + + if ($report_email != '') { + puppi::report { "${name}-Mail_Notification": + priority => '20' , + command => 'report_mail.sh' , + arguments => $report_email , + user => 'root', + project => $name , + enable => $enable , + } + } + +### AUTO DEPLOY DURING PUPPET RUN + if ($bool_auto_deploy == true) { + puppi::run { $name: } + } + +} diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/puppi/manifests/project/git.pp b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/puppi/manifests/project/git.pp new file mode 100644 index 00000000000..ac48e301a18 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/puppi/manifests/project/git.pp @@ -0,0 +1,418 @@ +# == Define puppi::project::git +# +# This is a shortcut define to build a puppi project for the deploy of +# file from a git repo. +# It uses different "core" defines (puppi::project, puppi:deploy (many), +# puppi::rollback (many)) to build a full featured template project for +# automatic deployments. +# If you need to customize it, either change the template defined here or +# build up your own custom ones. +# +# == Variables: +# +# [*source*] +# The full URL of the git repo to retrieve. +# Format should be in git friendly standard (http:// git:// ssh:// ..). +# +# [*deploy_root*] +# The destination directory where the retrieved file(s) are deployed. +# +# [*install_git*] +# If the git package hs to be installed. Default true. +# Set to false if you install git via other modules and have resource +# conflicts. +# +# [*git_subdir*] +# (Optional) - If you want to copy to the deploy_root only a subdir +# of the specified git repo, specify here the path of the directory +# relative to the repo root. Default undefined +# +# [*tag*] +# (Optional) - A specific tag you may want to deploy. Default undefined +# You can override the default value via command-line with: +# puppi deploy myapp -o "tag=release" +# +# [*branch*] +# (Optional) - A specific branch you may want to deploy. Default: master +# You can override the default value via command-line with: +# puppi deploy myapp -o "branch=devel" +# +# [*commit*] +# (Optional) - A specific commit you may want to use. Default undefined +# You can override the default value via command-line with: +# puppi deploy myapp -o "commit=1061cb731bc75a1188b58b889b74ce1505ccb412" +# +# [*keep_gitdata*] +# (Optional) - Define if you want to keep git metadata directory (.git) +# in the deploy root. According to this value backup and rollback +# operations change (with keep_gitdata set to true no real backups are done +# and operations are made on the git tree, if set to false, file are copied +# and the $backup_* options used. Default is true +# +# [*verbose*] +# (Optional) - If you want to see verbose git utput (file names) during +# the deploy. Default is true. +# +# [*user*] +# (Optional) - The user to be used for deploy operations. +# If different from root (default) it must have write permissions on +# the $deploy_root dir. +# +# [*predeploy_customcommand*] +# (Optional) - Full path with arguments of an eventual custom command to +# execute before the deploy. The command is executed as $predeploy_user. +# +# [*predeploy_user*] +# (Optional) - The user to be used to execute the $predeploy_customcommand. +# By default is the same of $user. +# +# [*predeploy_priority*] +# (Optional) - The priority (execution sequence number) that defines when, +# during the deploy procedure, the $predeploy_customcommand is executed +# Default: 39 (immediately before the copy of files on the deploy root). +# +# [*postdeploy_customcommand*] +# (Optional) - Full path with arguments of an eventual custom command to +# execute after the deploy. The command is executed as $postdeploy_user. +# +# [*postdeploy_user*] +# (Optional) - The user to be used to execute the $postdeploy_customcommand. +# By default is the same of $user. +# +# [*postdeploy_priority*] +# (Optional) - The priority (execution sequence number) that defines when, +# during the deploy procedure, the $postdeploy_customcommand is executed +# Default: 41 (immediately after the copy of files on the deploy root). +# +# [*disable_services*] +# (Optional) - The names (space separated) of the services you might want to +# stop during deploy. By default is blank. Example: "apache puppet monit". +# +# [*firewall_src_ip*] +# (Optional) - The IP address of a loadbalancer you might want to block out +# during a deploy. +# +# [*firewall_dst_port*] +# (Optional) - The local port to block from the loadbalancer during deploy +# (Default all). +# +# [*firewall_delay*] +# (Optional) - A delay time in seconds to wait after the block of +# $firewall_src_ip. Should be at least as long as the loadbalancer check +# interval for the services stopped during deploy (Default: 1). +# +# [*report_email*] +# (Optional) - The (space separated) email(s) to notify of deploy/rollback +# operations. If none is specified, no email is sent. +# +# [*backup_rsync_options*] +# (Optional) - The extra options to pass to rsync for backup operations. Use +# it, for example, to exclude directories that you don't want to archive. +# IE: "--exclude .snapshot --exclude cache --exclude www/cache". +# This option is used when $keep_gitmeta is set to false +# +# [*backup_retention*] +# (Optional) - Number of backup archives to keep. (Default 5). +# Lower the default value if your backups are too large and may fill up the +# filesystem. +# This option is used when $keep_gitmeta is set to false +# +# [*run_checks*] +# (Optional) - If you want to run local puppi checks before and after the +# deploy procedure. Default: "true". +# +# [*auto_deploy*] +# (Optional) - If you want to automatically run this puppi deploy when +# Puppet runs. Default: 'false' +# +define puppi::project::git ( + $source, + $deploy_root, + $install_git = true, + $git_subdir = 'undefined', + $tag = 'undefined', + $branch = 'master', + $commit = 'undefined', + $keep_gitdata = true, + $verbose = true, + $user = 'root', + $predeploy_customcommand = '', + $predeploy_user = '', + $predeploy_priority = '39', + $postdeploy_customcommand = '', + $postdeploy_user = '', + $postdeploy_priority = '41', + $disable_services = '', + $firewall_src_ip = '', + $firewall_dst_port = '0', + $firewall_delay = '1', + $report_email = '', + $backup_rsync_options = '--exclude .snapshot', + $backup_retention = '5', + $run_checks = true, + $auto_deploy = false, + $enable = true ) { + + require puppi + require puppi::params + + # Set default values + $predeploy_real_user = $predeploy_user ? { + '' => $user, + default => $predeploy_user, + } + + $postdeploy_real_user = $postdeploy_user ? { + '' => $user, + default => $postdeploy_user, + } + + $bool_install_git = any2bool($install_git) + $bool_keep_gitdata = any2bool($keep_gitdata) + $bool_verbose = any2bool($verbose) + $bool_run_checks = any2bool($run_checks) + $bool_auto_deploy = any2bool($auto_deploy) + +### INSTALL GIT + if ($bool_install_git == true) { + if ! defined(Package['git']) { package { 'git': ensure => installed } } + } + +### CREATE PROJECT + puppi::project { $name: + enable => $enable , + } + + +### DEPLOY SEQUENCE + if ($bool_run_checks == true) { + puppi::deploy { "${name}-Run_PRE-Checks": + priority => '10' , + command => 'check_project.sh' , + arguments => $name , + user => 'root' , + project => $name , + enable => $enable , + } + } + + if ($firewall_src_ip != '') { + puppi::deploy { "${name}-Load_Balancer_Block": + priority => '25' , + command => 'firewall.sh' , + arguments => "${firewall_src_ip} ${firewall_dst_port} on ${firewall_delay}" , + user => 'root', + project => $name , + enable => $enable , + } + } + + if ($bool_keep_gitdata == true) { + puppi::deploy { "${name}-Backup_existing_data": + priority => '30' , + command => 'archive.sh' , + arguments => "-b ${deploy_root} -o '${backup_rsync_options}' -n ${backup_retention}" , + user => 'root' , + project => $name , + enable => $enable , + } + } + + if ($disable_services != '') { + puppi::deploy { "${name}-Disable_extra_services": + priority => '36' , + command => 'service.sh' , + arguments => "stop ${disable_services}" , + user => 'root', + project => $name , + enable => $enable , + } + } + + if ($predeploy_customcommand != '') { + puppi::deploy { "${name}-Run_Custom_PreDeploy_Script": + priority => $predeploy_priority , + command => 'execute.sh' , + arguments => $predeploy_customcommand , + user => $predeploy_real_user , + project => $name , + enable => $enable , + } + } + + # Here is done the deploy on $deploy_root + puppi::deploy { "${name}-Deploy_Files": + priority => '40' , + command => 'git.sh' , + arguments => "-a deploy -s ${source} -d ${deploy_root} -u ${user} -gs ${git_subdir} -t ${tag} -b ${branch} -c ${commit} -v ${bool_verbose} -k ${bool_keep_gitdata}" , + user => 'root' , + project => $name , + enable => $enable , + } + + if ($postdeploy_customcommand != '') { + puppi::deploy { "${name}-Run_Custom_PostDeploy_Script": + priority => $postdeploy_priority , + command => 'execute.sh' , + arguments => $postdeploy_customcommand , + user => $postdeploy_real_user , + project => $name , + enable => $enable , + } + } + + if ($disable_services != '') { + puppi::deploy { "${name}-Enable_extra_services": + priority => '44' , + command => 'service.sh' , + arguments => "start ${disable_services}" , + user => 'root', + project => $name , + enable => $enable , + } + } + + if ($firewall_src_ip != '') { + puppi::deploy { "${name}-Load_Balancer_Unblock": + priority => '46' , + command => 'firewall.sh' , + arguments => "${firewall_src_ip} ${firewall_dst_port} off 0" , + user => 'root', + project => $name , + enable => $enable , + } + } + + if ($bool_run_checks == true) { + puppi::deploy { "${name}-Run_POST-Checks": + priority => '80' , + command => 'check_project.sh' , + arguments => $name , + user => 'root' , + project => $name , + enable => $enable , + } + } + + +### ROLLBACK PROCEDURE + + if ($firewall_src_ip != '') { + puppi::rollback { "${name}-Load_Balancer_Block": + priority => '25' , + command => 'firewall.sh' , + arguments => "${firewall_src_ip} ${firewall_dst_port} on ${firewall_delay}" , + user => 'root', + project => $name , + enable => $enable , + } + } + + if ($disable_services != '') { + puppi::rollback { "${name}-Disable_extra_services": + priority => '37' , + command => 'service.sh' , + arguments => "stop ${disable_services}" , + user => 'root', + project => $name , + enable => $enable , + } + } + + if ($predeploy_customcommand != '') { + puppi::rollback { "${name}-Run_Custom_PreDeploy_Script": + priority => $predeploy_priority , + command => 'execute.sh' , + arguments => $predeploy_customcommand , + user => $predeploy_real_user , + project => $name , + enable => $enable , + } + } + + if ($bool_keep_gitdata == true) { + puppi::rollback { "${name}-Recover_Files_To_Deploy": + priority => '40' , + command => 'archive.sh' , + arguments => "-r ${deploy_root} -o '${backup_rsync_options}'" , + user => $user , + project => $name , + enable => $enable , + } + } + + if ($bool_keep_gitdata != true) { + puppi::rollback { "${name}-Rollback_Files": + priority => '40' , + command => 'git.sh' , + arguments => "-a rollback -s ${source} -d ${deploy_root} -gs ${git_subdir} -t ${tag} -b ${branch} -c ${commit} -v ${bool_verbose} -k ${bool_keep_gitdata}" , + user => $user , + project => $name , + enable => $enable , + } + } + + if ($postdeploy_customcommand != '') { + puppi::rollback { "${name}-Run_Custom_PostDeploy_Script": + priority => $postdeploy_priority , + command => 'execute.sh' , + arguments => $postdeploy_customcommand , + user => $postdeploy_real_user , + project => $name , + enable => $enable , + } + } + + if ($disable_services != '') { + puppi::rollback { "${name}-Enable_extra_services": + priority => '44' , + command => 'service.sh' , + arguments => "start ${disable_services}" , + user => 'root', + project => $name , + enable => $enable , + } + } + + if ($firewall_src_ip != '') { + puppi::rollback { "${name}-Load_Balancer_Unblock": + priority => '46' , + command => 'firewall.sh' , + arguments => "${firewall_src_ip} ${firewall_dst_port} off 0" , + user => 'root', + project => $name , + enable => $enable , + } + } + + if ($bool_run_checks == true) { + puppi::rollback { "${name}-Run_POST-Checks": + priority => '80' , + command => 'check_project.sh' , + arguments => $name , + user => 'root' , + project => $name , + enable => $enable , + } + } + + +### REPORTING + + if ($report_email != '') { + puppi::report { "${name}-Mail_Notification": + priority => '20' , + command => 'report_mail.sh' , + arguments => $report_email , + user => 'root', + project => $name , + enable => $enable , + } + } + +### AUTO DEPLOY DURING PUPPET RUN + if ($bool_auto_deploy == true) { + puppi::run { $name: } + } + +} diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/puppi/manifests/project/maven.pp b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/puppi/manifests/project/maven.pp new file mode 100644 index 00000000000..a1979dae478 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/puppi/manifests/project/maven.pp @@ -0,0 +1,814 @@ +# = Define puppi::project::maven +# +# This is a shortcut define to build a puppi project for the +# deploy of war and tar files generated via Maven and published on +# a repository like Sonar. +# +# It uses different "core" defines (puppi::project, puppi:deploy (many), +# puppi::rollback (many)) to build a full featured template project for +# automatic deployments. +# If you need to customize it, either change the template defined here or +# build up your own custom ones. +# +# == Variables: +# +# [*source*] +# The full URL of the maven-metadata.xml file to retrieve. +# Format should be in URI standard (http:// file:// ssh:// rsync://). +# +# [*http_password*] +# The http_password to use for authentication to the source in case of http. +# +# [*http_user*] +# The http_user to use for authentication to the source in case of http. +# +# [*artifact_type*] +# The artifact_type to parse the maven-metadata.xml. Either "release", "latest" or +# a specific version (e.g. "2.5.0") +# Default is "release". With artifactory, don't use the +# "Maven Snapshot Version Behavior" "unique" for your repository. +# +# [*deploy_root*] +# The destination directory where file(s) are deployed. +# +# [*user*] +# (Optional) - The user to be used for deploy operations. +# +# [*war_suffix*] +# (Optional) - The suffix (Maven qualifier) that might be appended to the war +# +# [*zip_root*] +# (Optional) - The destination directory where the zip is unpacked +# +# [*zip_user*] +# (Optional) - The user to be used for deploy operations of the zip +# +# [*zip_suffix*] +# (Optional) - The suffix (Maven qualifier) that might be appended to the zip +# +# [*jar_root*] +# (Optional) - The destination directory where the jar is copied. +# If set a jar file is searched in Maven +# +# [*jar_user*] +# (Optional) - The user to be used for deploy operations of the jar +# (owner of the files deployed in $jar_root) +# +# [*jar_suffix*] +# (Optional) - The suffix (Maven qualifier) that might be appended to the jar +# +# [*document_root*] +# (Optional) - The destination directory where the eventual tarball generated +# via Maven containing static files ("src tar") is unpacked +# +# [*document_suffix*] +# (Optional) - The suffix (Maven qualifier) that might be appended to the +# static files tarballs ("src tar") +# +# [*document_init_source*] +# (Optional) - The full URL to be used to retrieve, for the first time, the +# project files present in the source tarball. They are copied to the +# $document_root. Format should be in URI standard (http:// file:// ...) +# +# [*document_user*] +# (Optional) - The user to be used for deploy operations of the tarball +# (owner of the files in $document_root) +# +# [*config_root*] +# (Optional) - The destination directory where the cfg tar is unpacked +# +# [*config_suffix*] +# (Optional) - The suffix (Maven qualifier) that might be appended to +# configuration tarballs ("cfg tar") +# +# [*config_init_source*] +# (Optional) - The full URL to be used to retrieve, for the first time, the +# project files present in the cfg tar. They are copied to the $config_root. +# Format should be in URI standard (http:// file:// ssh:// svn://) +# +# [*config_user*] +# (Optional) - The user to be used for deploy operations of cfg tar +# (owner of the files in $config_root) +# +# [*predeploy_customcommand*] +# (Optional) - Full path with arguments of an eventual custom command to +# execute before the deploy. The command is executed as $predeploy_user. +# +# [*predeploy_user*] +# (Optional) - The user to be used to execute the $predeploy_customcommand. +# By default is the same of $user. +# +# [*predeploy_priority*] +# (Optional) - The priority (execution sequence number) that defines when, +# during the deploy procedure, the $predeploy_customcommand is executed +# Default: 39 (immediately before the copy of files on the deploy root). +# +# [*postdeploy_customcommand*] +# (Optional) - Full path with arguments of an eventual custom command to +# execute after the deploy. The command is executed as $postdeploy_user. +# +# [*postdeploy_user*] +# (Optional) - The user to be used to execute the $postdeploy_customcommand. +# By default is the same of $user. +# +# [*postdeploy_priority*] +# (Optional) - The priority (execution sequence number) that defines when, +# during the deploy procedure, the $postdeploy_customcommand is executed +# Default: 41 (immediately after the copy of files on the deploy root). +# +# [*init_script*] +# (Optional - Obsolete) - The name (ex: tomcat) of the init script of your +# Application server. If you define it, the AS is stopped and then started +# during deploy. This option is deprecated, you can use $disable_services +# for the same functionality +# +# [*disable_services*] +# (Optional) - The names (space separated) of the services you might want to +# stop during deploy. By default is blank. Example: "apache puppet monit". +# +# [*firewall_src_ip*] +# (Optional) - The IP address of a loadbalancer you might want to block out +# during a deploy. +# +# [*firewall_dst_port*] +# (Optional) - The local port to block from the loadbalancer during deploy +# (Default all). +# +# [*firewall_delay*] +# (Optional) - A delay time in seconds to wait after the block of +# $firewall_src_ip. Should be at least as long as the loadbalancer check +# interval for the services stopped during deploy (Default: 1). +# +# [*report_email*] +# (Optional) - The (space separated) email(s) to notify of deploy/rollback +# operations. If none is specified, no email is sent. +# +# [*report_mongo*] +# (Optional) - A mongourl with optional user:password to report to. Append the +# database with a slash ("mongodb://user:password@mymongo.mydomain.com/theNameOfDb") +# +# [*backup_rsync_options*] +# (Optional) - The extra options to pass to rsync for backup operations. Use +# it, for example, to exclude directories that you don't want to archive. +# IE: "--exclude .snapshot --exclude cache --exclude www/cache". +# +# [*backup_retention*] +# (Optional) - Number of backup archives to keep. (Default 5). +# Lower the default value if your backups are too large and may fill up the +# filesystem. +# +# [*run_checks*] +# (Optional) - If you want to run local puppi checks before and after the +# deploy procedure. Default: "true". +# +# [*always_deploy*] +# (Optional) - If you always deploy what has been downloaded. Default="yes", +# if set to "no" a checksum is made between the files previously downloaded +# and the new files. If they are the same the deploy is not done. +# +# [*check_deploy*] +# (Optional) - Checks if the war is deployed (Default yes). Set to no if +# you deploy on Jboss or the deployed dir is different for the war filename +# +# [*auto_deploy*] +# (Optional) - If you want to automatically run this puppi deploy when +# Puppet runs. Default: 'false' +# +define puppi::project::maven ( + $source, + $http_user = '', + $http_password = '', + $artifact_type = 'release', + $deploy_root = '', + $user = 'root', + $war_suffix = 'suffixnotset', + $zip_root = '', + $zip_user = '', + $zip_suffix = 'suffixnotset', + $jar_root = '', + $jar_user = '', + $jar_suffix = 'suffixnotset', + $document_root = '', + $document_user = '', + $document_suffix = 'suffixnotset', + $document_init_source = '', + $config_root = '', + $config_user = '', + $config_suffix = 'suffixnotset', + $config_init_source = '', + $predeploy_customcommand = '', + $predeploy_user = '', + $predeploy_priority = '39', + $postdeploy_customcommand = '', + $postdeploy_user = '', + $postdeploy_priority = '41', + $init_script = '', + $disable_services = '', + $firewall_src_ip = '', + $firewall_dst_port = '0', + $firewall_delay = '1', + $report_email = '', + $report_mongo = '', + $backup_rsync_options = '--exclude .snapshot', + $backup_retention = '5', + $run_checks = true, + $always_deploy = true, + $check_deploy = true, + $auto_deploy = false, + $enable = true ) { + + require puppi + require puppi::params + + # Set default values + $predeploy_real_user = $predeploy_user ? { + '' => $user, + default => $predeploy_user, + } + + $postdeploy_real_user = $postdeploy_user ? { + '' => $user, + default => $postdeploy_user, + } + + $config_real_user = $config_user ? { + '' => $user, + default => $config_user, + } + + $document_real_user = $document_user ? { + '' => $user, + default => $document_user, + } + + $jar_real_user = $jar_user ? { + '' => $user, + default => $jar_user, + } + + $zip_real_user = $zip_user ? { + '' => $user, + default => $zip_user, + } + + $real_always_deploy = any2bool($always_deploy) ? { + false => 'no', + true => 'yes', + } + + $bool_run_checks = any2bool($run_checks) + $bool_check_deploy = any2bool($check_deploy) + $bool_auto_deploy = any2bool($auto_deploy) + + +### CREATE PROJECT + puppi::project { $name: + enable => $enable , + } + + +### INIT SEQUENCE + if ($document_init_source != '') { + puppi::initialize { "${name}-Deploy_Files": + priority => '40' , + command => 'get_file.sh' , + arguments => "-s ${document_init_source} -d ${deploy_root}" , + user => $document_real_user , + project => $name , + enable => $enable , + } + } + + if ($config_init_source != '') { + puppi::initialize { "${name}-Deploy_CFG_Files": + priority => '40' , + command => 'get_file.sh' , + arguments => "-s ${config_init_source} -d ${deploy_root}" , + user => $config_real_user , + project => $name , + enable => $enable , + } + } + +### DEPLOY SEQUENCE + if ($bool_run_checks == true) { + puppi::deploy { "${name}-Run_PRE-Checks": + priority => '10' , + command => 'check_project.sh' , + arguments => $name , + user => 'root' , + project => $name , + enable => $enable , + } + } + + $metadata_arguments = $http_password ? { + '' => "-s ${source}/maven-metadata.xml -t maven-metadata -a ${real_always_deploy}", + default => "-s ${source}/maven-metadata.xml -t maven-metadata -a ${real_always_deploy} -u ${http_user} -p ${http_password}" + } + + puppi::deploy { "${name}-Get_Maven_Metadata_File": + priority => '20' , + command => 'get_file.sh' , + arguments => $metadata_arguments, + user => 'root' , + project => $name , + enable => $enable , + } + + puppi::deploy { "${name}-Extract_Maven_Metadata": + priority => '22' , + command => 'get_metadata.sh' , + arguments => "-m ${document_suffix} -mc ${config_suffix} -mj ${jar_suffix} -mw ${war_suffix} -mz ${zip_suffix} -at ${artifact_type}" , + user => 'root' , + project => $name , + enable => $enable , + } + + # Files retrieval + if ($deploy_root != '') { + $war_arguments = $http_password ? { + '' => "${source} warfile", + default => "-u ${http_user} -p ${http_password} ${source} warfile" + } + + puppi::deploy { "${name}-Get_Maven_Files_WAR": + priority => '25' , + command => 'get_maven_files.sh' , + arguments => $war_arguments, + user => 'root' , + project => $name , + enable => $enable , + } + } + + if ($jar_root != '') { + puppi::deploy { "${name}-Get_Maven_Files_JAR": + priority => '25' , + command => 'get_maven_files.sh' , + arguments => "${source} jarfile" , + user => 'root' , + project => $name , + enable => $enable , + } + } + + if ($config_root != '') { + puppi::deploy { "${name}-Get_Maven_Files_Config": + priority => '25' , + command => 'get_maven_files.sh' , + arguments => "${source} configfile" , + user => 'root' , + project => $name , + enable => $enable , + } + } + + if ($document_root != '') { + puppi::deploy { "${name}-Get_Maven_Files_SRC": + priority => '25' , + command => 'get_maven_files.sh' , + arguments => "${source} srcfile" , + user => 'root' , + project => $name , + enable => $enable , + } + } + + if ($zip_root != '') { + $real_arguments = $http_password ? { + '' => "${source} zipfile", + default => "-u ${http_user} -p ${http_password} ${source} zipfile" + } + + puppi::deploy { "${name}-Get_Maven_Files_ZIP": + priority => '25' , + command => 'get_maven_files.sh' , + arguments => $real_arguments, + user => 'root' , + project => $name , + enable => $enable , + } + } + + if ($firewall_src_ip != '') { + puppi::deploy { "${name}-Load_Balancer_Block": + priority => '30' , + command => 'firewall.sh' , + arguments => "${firewall_src_ip} ${firewall_dst_port} on ${firewall_delay}" , + user => 'root', + project => $name , + enable => $enable , + } + } + + # Existing files backup + if ($deploy_root != '') { + puppi::deploy { "${name}-Backup_Existing_WAR": + priority => '30' , + command => 'archive.sh' , + arguments => "-b ${deploy_root} -t war -s move -m diff -o '${backup_rsync_options}' -n ${backup_retention}" , + user => 'root' , + project => $name , + enable => $enable , + } + } + + if ($jar_root != '') { + puppi::deploy { "${name}-Backup_Existing_JAR": + priority => '30' , + command => 'archive.sh' , + arguments => "-b ${jar_root} -t jar -s move -m diff -o '${backup_rsync_options}' -n ${backup_retention}" , + user => 'root' , + project => $name , + enable => $enable , + } + } + + if ($config_root != '') { + puppi::deploy { "${name}-Backup_Existing_ConfigDir": + priority => '30' , + command => 'archive.sh' , + arguments => "-b ${config_root} -t config -d predeploydir_configfile -o '${backup_rsync_options}' -n ${backup_retention}" , + user => 'root' , + project => $name , + enable => $enable , + } + } + + if ($document_root != '') { + puppi::deploy { "${name}-Backup_Existing_DocumentDir": + priority => '30' , + command => 'archive.sh' , + arguments => "-b ${document_root} -t docroot -d predeploydir_configfile -o '${backup_rsync_options}' -n ${backup_retention}" , + user => 'root' , + project => $name , + enable => $enable , + } + } + + if ($zip_root != '') { + puppi::deploy { "${name}-Backup_Existing_ZipDir": + priority => '30' , + command => 'archive.sh' , + arguments => "-b ${zip_root} -t ziproot -d predeploydir_zipfile -o '${backup_rsync_options}' -n ${backup_retention}" , + user => 'root' , + project => $name , + enable => $enable , + } + } + + if ($bool_check_deploy == true) and ($deploy_root != '') { + puppi::deploy { "${name}-Check_undeploy": + priority => '31' , + command => 'checkwardir.sh' , + arguments => "-a ${deploy_root} -c deploy_warpath" , + user => $user , + project => $name , + enable => $enable , + } + } + + if ($disable_services != '') { + puppi::deploy { "${name}-Disable_extra_services": + priority => '36' , + command => 'service.sh' , + arguments => "stop ${disable_services}" , + user => 'root', + project => $name , + enable => $enable , + } + } + + if ($init_script != '') { + puppi::deploy { "${name}-Service_stop": + priority => '38' , + command => 'service.sh' , + arguments => "stop ${init_script}" , + user => 'root', + project => $name , + enable => $enable , + } + } + + if ($predeploy_customcommand != '') { + puppi::deploy { "${name}-Run_Custom_PreDeploy_Script": + priority => $predeploy_priority , + command => 'execute.sh' , + arguments => $predeploy_customcommand , + user => $predeploy_real_user , + project => $name , + enable => $enable , + } + } + + # Deploys + if ($deploy_root != '') { + puppi::deploy { "${name}-Deploy_Maven_WAR": + priority => '40' , + command => 'deploy.sh' , + arguments => $deploy_root , + user => $user , + project => $name , + enable => $enable , + } + } + + if ($jar_root != '') { + puppi::deploy { "${name}-Deploy_Maven_JAR": + priority => '40' , + command => 'deploy.sh' , + arguments => $jar_root , + user => $jar_real_user , + project => $name , + enable => $enable , + } + } + + if ($config_root != '') { + puppi::deploy { "${name}-Deploy_ConfigDir": + priority => '40' , + command => 'deploy.sh' , + arguments => "${config_root} predeploydir_configfile" , + user => $config_real_user , + project => $name , + enable => $enable , + } + } + + if ($document_root != '') { + puppi::deploy { "${name}-Deploy_DocumentDir": + priority => '40' , + command => 'deploy.sh' , + arguments => "${document_root} predeploydir_srcfile" , + user => $document_real_user , + project => $name , + enable => $enable , + } + } + + if ($zip_root != '') { + puppi::deploy { "${name}-Deploy_Zip": + priority => '40' , + command => 'deploy.sh' , + arguments => "${zip_root} predeploydir_zipfile" , + user => $zip_real_user , + project => $name , + enable => $enable , + } + } + + if ($postdeploy_customcommand != '') { + puppi::deploy { "${name}-Run_Custom_PostDeploy_Script": + priority => $postdeploy_priority , + command => 'execute.sh' , + arguments => $postdeploy_customcommand , + user => $postdeploy_real_user , + project => $name , + enable => $enable , + } + } + + if ($init_script != '') { + puppi::deploy { "${name}-Service_start": + priority => '42' , + command => 'service.sh' , + arguments => "start ${init_script}" , + user => 'root', + project => $name , + enable => $enable , + } + } + + if ($disable_services != '') { + puppi::deploy { "${name}-Enable_extra_services": + priority => '44' , + command => 'service.sh' , + arguments => "start ${disable_services}" , + user => 'root', + project => $name , + enable => $enable , + } + } + + if ($bool_check_deploy == true) and ($deploy_root != '') { + puppi::deploy { "${name}-Check_deploy": + priority => '45' , + command => 'checkwardir.sh' , + arguments => "-p ${deploy_root} -c deploy_warpath" , + user => $user , + project => $name , + enable => $enable , + } + } + + if ($firewall_src_ip != '') { + puppi::deploy { "${name}-Load_Balancer_Unblock": + priority => '46' , + command => 'firewall.sh' , + arguments => "${firewall_src_ip} ${firewall_dst_port} off 0" , + user => 'root', + project => $name , + enable => $enable , + } + } + + if ($bool_run_checks == true) { + puppi::deploy { "${name}-Run_POST-Checks": + priority => '80' , + command => 'check_project.sh' , + arguments => $name , + user => 'root' , + project => $name , + enable => $enable , + } + } + + +### ROLLBACK PROCEDURE + + if ($firewall_src_ip != '') { + puppi::rollback { "${name}-Load_Balancer_Block": + priority => '25' , + command => 'firewall.sh' , + arguments => "${firewall_src_ip} ${firewall_dst_port} on ${firewall_delay}" , + user => 'root', + project => $name , + enable => $enable , + } + } + + if ($disable_services != '') { + puppi::rollback { "${name}-Disable_extra_services": + priority => '37' , + command => 'service.sh' , + arguments => "stop ${disable_services}" , + user => 'root', + project => $name , + enable => $enable , + } + } + + if ($init_script != '') { + puppi::rollback { "${name}-Service_stop": + priority => '38' , + command => 'service.sh' , + arguments => "stop ${init_script}" , + user => 'root', + project => $name , + enable => $enable , + } + } + + if ($predeploy_customcommand != '') { + puppi::rollback { "${name}-Run_Custom_PreDeploy_Script": + priority => $predeploy_priority , + command => 'execute.sh' , + arguments => $predeploy_customcommand , + user => $predeploy_real_user , + project => $name , + enable => $enable , + } + } + + if ($deploy_root != '') { + puppi::rollback { "${name}-Recover_WAR": + priority => '40' , + command => 'archive.sh' , + arguments => "-r ${deploy_root} -t war -o '${backup_rsync_options}'" , + user => $user , + project => $name , + enable => $enable , + } + } + + if ($jar_root != '') { + puppi::rollback { "${name}-Recover_JAR": + priority => '40' , + command => 'archive.sh' , + arguments => "-r ${jar_root} -t jar -o '${backup_rsync_options}'" , + user => $jar_real_user , + project => $name , + enable => $enable , + } + } + + if ($config_root != '') { + puppi::rollback { "${name}-Recover_ConfigDir": + priority => '40' , + command => 'archive.sh' , + arguments => "-r ${config_root} -t config -o '${backup_rsync_options}'" , + user => $config_real_user , + project => $name , + enable => $enable , + } + } + + if ($document_root != '') { + puppi::rollback { "${name}-Recover_DocumentDir": + priority => '40' , + command => 'archive.sh' , + arguments => "-r ${document_root} -t docroot -o '${backup_rsync_options}'" , + user => $document_real_user , + project => $name , + enable => $enable , + } + } + + if ($postdeploy_customcommand != '') { + puppi::rollback { "${name}-Run_Custom_PostDeploy_Script": + priority => $postdeploy_priority , + command => 'execute.sh' , + arguments => $postdeploy_customcommand , + user => $postdeploy_real_user , + project => $name , + enable => $enable , + } + } + + if ($init_script != '') { + puppi::rollback { "${name}-Service_start": + priority => '42' , + command => 'service.sh' , + arguments => "start ${init_script}" , + user => 'root', + project => $name , + enable => $enable , + } + } + + if ($disable_services != '') { + puppi::rollback { "${name}-Enable_extra_services": + priority => '44' , + command => 'service.sh' , + arguments => "start ${disable_services}" , + user => 'root', + project => $name , + enable => $enable , + } + } + + if ($bool_check_deploy == true) { + puppi::rollback { "${name}-Check_deploy": + priority => '45' , + command => 'checkwardir.sh' , + arguments => "-p ${deploy_root} -c deploy_warpath" , + user => $user , + project => $name , + enable => $enable , + } + } + + if ($firewall_src_ip != '') { + puppi::rollback { "${name}-Load_Balancer_Unblock": + priority => '46' , + command => 'firewall.sh' , + arguments => "${firewall_src_ip} ${firewall_dst_port} off 0" , + user => 'root', + project => $name , + enable => $enable , + } + } + + if ($bool_run_checks == true) { + puppi::rollback { "${name}-Run_POST-Checks": + priority => '80' , + command => 'check_project.sh' , + arguments => $name , + user => 'root' , + project => $name , + enable => $enable , + } + } + + +### REPORTING + + if ($report_email != '') { + puppi::report { "${name}-Mail_Notification": + priority => '20' , + command => 'report_mail.sh' , + arguments => $report_email , + user => 'root', + project => $name , + enable => $enable , + } + } + + if ($report_mongo != '') { + puppi::report { "${name}-Mongo_Store": + priority => '30' , + command => 'report_mongo.sh' , + arguments => $report_mongo , + user => 'root', + project => $name , + enable => $enable , + } + } + +### AUTO DEPLOY DURING PUPPET RUN + if ($bool_auto_deploy == true) { + puppi::run { $name: } + } + +} diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/puppi/manifests/project/mysql.pp b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/puppi/manifests/project/mysql.pp new file mode 100644 index 00000000000..aa787d80ac3 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/puppi/manifests/project/mysql.pp @@ -0,0 +1,425 @@ +# = Define puppi::project::mysql +# +# This is a shortcut define to build a puppi project for the +# management of mysql queries, contained in the .sql file defined +# as $source +# +# == Variables: +# +# [*source*] +# The full URL of the main sql file to retrieve. +# Format should be in URI standard (http:// file:// ssh:// rsync://). +# +# [*mysql_database*] +# (Required) - The Mysql database to work on +# Default: root +# +# [*mysql_user*] +# (Optional) - The Mysql user to be used to run the queries +# Default: root +# +# [*mysql_password*] +# (Optional) - The password to use for the specified mysql user +# Default: '' (blank) +# +# [*mysql_host*] +# (Optional) - The Mysql server. Use ip or hostname +# Default: localhost +# +# [*init_source*] +# (Optional) - The full URL to be used to retrieve a sql file to +# process only for the first time, +# +# [*predeploy_customcommand*] +# (Optional) - Full path with arguments of an eventual custom command to +# execute before the deploy. The command is executed as $predeploy_user. +# +# [*predeploy_user*] +# (Optional) - The user to be used to execute the $predeploy_customcommand. +# By default is the same of $user. +# +# [*predeploy_priority*] +# (Optional) - The priority (execution sequence number) that defines when, +# during the deploy procedure, the $predeploy_customcommand is executed +# Default: 39 (immediately before the copy of files on the deploy root). +# +# [*postdeploy_customcommand*] +# (Optional) - Full path with arguments of an eventual custom command to +# execute after the deploy. The command is executed as $postdeploy_user. +# +# [*postdeploy_user*] +# (Optional) - The user to be used to execute the $postdeploy_customcommand. +# By default is the same of $user. +# +# [*postdeploy_priority*] +# (Optional) - The priority (execution sequence number) that defines when, +# during the deploy procedure, the $postdeploy_customcommand is executed +# Default: 41 (immediately after the copy of files on the deploy root). +# +# [*disable_services*] +# (Optional) - The names (space separated) of the services you might want to +# stop during deploy. By default is blank. Example: "apache puppet monit". +# +# [*firewall_src_ip*] +# (Optional) - The IP address of a loadbalancer you might want to block out +# during a deploy. +# +# [*firewall_dst_port*] +# (Optional) - The local port to block from the loadbalancer during deploy +# (Default all). +# +# [*firewall_delay*] +# (Optional) - A delay time in seconds to wait after the block of +# $firewall_src_ip. Should be at least as long as the loadbalancer check +# interval for the services stopped during deploy (Default: 1). +# +# [*report_email*] +# (Optional) - The (space separated) email(s) to notify of deploy/rollback +# operations. If none is specified, no email is sent. +# +# [*backup*] +# (Optional) - If and how backups of existing databases are made. +# Default: true +# +# [*backup_retention*] +# (Optional) - Number of backup archives to keep. (Default 5). +# Lower the default value if your backups are too large and may fill up the +# filesystem. +# +# [*run_checks*] +# (Optional) - If you want to run local puppi checks before and after the +# deploy procedure. Default: "true". +# +# [*always_deploy*] +# (Optional) - If you always deploy what has been downloaded. Default="yes", +# if set to "no" a checksum is made between the files previously downloaded +# and the new files. If they are the same the deploy is not done. +# +# [*auto_deploy*] +# (Optional) - If you want to automatically run this puppi deploy when +# Puppet runs. Default: 'false' +# +define puppi::project::mysql ( + $source, + $mysql_database, + $mysql_user = 'root', + $mysql_host = 'localhost', + $mysql_password = '', + $init_source = '', + $predeploy_customcommand = '', + $predeploy_user = '', + $predeploy_priority = '39', + $postdeploy_customcommand = '', + $postdeploy_user = '', + $postdeploy_priority = '41', + $disable_services = '', + $firewall_src_ip = '', + $firewall_dst_port = '0', + $firewall_delay = '1', + $report_email = '', + $backup = true, + $backup_retention = '5', + $run_checks = true, + $always_deploy = true, + $auto_deploy = false, + $enable = true ) { + + require puppi + require puppi::params + + # Set default values + $predeploy_real_user = $predeploy_user ? { + '' => 'root', + default => $predeploy_user, + } + + $postdeploy_real_user = $postdeploy_user ? { + '' => 'root', + default => $postdeploy_user, + } + + $init_real_source = $init_source ? { + '' => $source, + default => $init_source, + } + + $real_always_deploy = any2bool($always_deploy) ? { + false => 'no', + true => 'yes', + } + + $bool_run_checks = any2bool($run_checks) + $bool_backup = any2bool($backup) + $real_source_type = 'mysql' + $bool_auto_deploy = any2bool($auto_deploy) + + $source_filename = url_parse($source,'filename') + +### CREATE PROJECT + puppi::project { $name: + enable => $enable , + } + + +### INIT SEQUENCE + if ($init_source != '') { + puppi::initialize { "${name}-Deploy_Files": + priority => '40' , + command => 'get_file.sh' , + arguments => "-s ${init_source} -t ${real_source_type}" , + user => root , + project => $name , + enable => $enable , + } + puppi::initialize { "${name}-Run_SQL": + priority => '42' , + command => 'database.sh' , + arguments => "-t mysql -a run -u ${mysql_user} -p '${mysql_password}' -d ${mysql_database} -h ${mysql_host}" , + user => 'root' , + project => $name , + enable => $enable , + } + } + + +### DEPLOY SEQUENCE + if ($bool_run_checks == true) { + puppi::deploy { "${name}-Run_PRE-Checks": + priority => '10' , + command => 'check_project.sh' , + arguments => $name , + user => 'root' , + project => $name , + enable => $enable , + } + } + + puppi::deploy { "${name}-Retrieve_SQLFile": + priority => '20' , + command => 'get_file.sh' , + arguments => "-s ${source} -t ${real_source_type} -a ${real_always_deploy}" , + user => 'root' , + project => $name , + enable => $enable , + } + + if ($firewall_src_ip != '') { + puppi::deploy { "${name}-Load_Balancer_Block": + priority => '25' , + command => 'firewall.sh' , + arguments => "${firewall_src_ip} ${firewall_dst_port} on ${firewall_delay}" , + user => 'root', + project => $name , + enable => $enable , + } + } + + if ($bool_backup == true) { + puppi::deploy { "${name}-Backup_Database": + priority => '30' , + command => 'database.sh' , + arguments => "-t mysql -a dump -u ${mysql_user} -p '${mysql_password}' -d ${mysql_database} -h ${mysql_host}" , + user => 'root' , + project => $name , + enable => $enable , + } + } + + if ($disable_services != '') { + puppi::deploy { "${name}-Disable_extra_services": + priority => '36' , + command => 'service.sh' , + arguments => "stop ${disable_services}" , + user => 'root', + project => $name , + enable => $enable , + } + } + + if ($predeploy_customcommand != '') { + puppi::deploy { "${name}-Run_Custom_PreDeploy_Script": + priority => $predeploy_priority , + command => 'execute.sh' , + arguments => $predeploy_customcommand , + user => $predeploy_real_user , + project => $name , + enable => $enable , + } + } + + # Here is done the db change + puppi::deploy { "${name}-Run_SQL": + priority => '40' , + command => 'database.sh' , + arguments => "-t mysql -a run -u ${mysql_user} -p '${mysql_password}' -d ${mysql_database} -h ${mysql_host}" , + user => 'root' , + project => $name , + enable => $enable , + } + + if ($postdeploy_customcommand != '') { + puppi::deploy { "${name}-Run_Custom_PostDeploy_Script": + priority => $postdeploy_priority , + command => 'execute.sh' , + arguments => $postdeploy_customcommand , + user => $postdeploy_real_user , + project => $name , + enable => $enable , + } + } + + if ($disable_services != '') { + puppi::deploy { "${name}-Enable_extra_services": + priority => '44' , + command => 'service.sh' , + arguments => "start ${disable_services}" , + user => 'root', + project => $name , + enable => $enable , + } + } + + if ($firewall_src_ip != '') { + puppi::deploy { "${name}-Load_Balancer_Unblock": + priority => '46' , + command => 'firewall.sh' , + arguments => "${firewall_src_ip} ${firewall_dst_port} off 0" , + user => 'root', + project => $name , + enable => $enable , + } + } + + if ($bool_run_checks == true) { + puppi::deploy { "${name}-Run_POST-Checks": + priority => '80' , + command => 'check_project.sh' , + arguments => $name , + user => 'root' , + project => $name , + enable => $enable , + } + } + + +### ROLLBACK PROCEDURE + + if ($firewall_src_ip != '') { + puppi::rollback { "${name}-Load_Balancer_Block": + priority => '25' , + command => 'firewall.sh' , + arguments => "${firewall_src_ip} ${firewall_dst_port} on ${firewall_delay}" , + user => 'root', + project => $name , + enable => $enable , + } + } + + if ($bool_backup == true) { + puppi::rollback { "${name}-Backup_Database_PreRollback": + priority => '30' , + command => 'database.sh' , + arguments => "-t mysql -a dump -u ${mysql_user} -p '${mysql_password}' -d ${mysql_database} -h ${mysql_host}" , + user => 'root' , + project => $name , + enable => $enable , + } + } + + if ($disable_services != '') { + puppi::rollback { "${name}-Disable_extra_services": + priority => '37' , + command => 'service.sh' , + arguments => "stop ${disable_services}" , + user => 'root', + project => $name , + enable => $enable , + } + } + + if ($predeploy_customcommand != '') { + puppi::rollback { "${name}-Run_Custom_PreDeploy_Script": + priority => $predeploy_priority , + command => 'execute.sh' , + arguments => $predeploy_customcommand , + user => $predeploy_real_user , + project => $name , + enable => $enable , + } + } + + if ($bool_backup == true) { + puppi::rollback { "${name}-Recover_Database": + priority => '40' , + command => 'database.sh' , + arguments => "-t mysql -a restore -u ${mysql_user} -p '${mysql_password}' -d ${mysql_database} -h ${mysql_host}" , + user => 'root' , + project => $name , + enable => $enable , + } + } + + if ($postdeploy_customcommand != '') { + puppi::rollback { "${name}-Run_Custom_PostDeploy_Script": + priority => $postdeploy_priority , + command => 'execute.sh' , + arguments => $postdeploy_customcommand , + user => $postdeploy_real_user , + project => $name , + enable => $enable , + } + } + + if ($disable_services != '') { + puppi::rollback { "${name}-Enable_extra_services": + priority => '44' , + command => 'service.sh' , + arguments => "start ${disable_services}" , + user => 'root', + project => $name , + enable => $enable , + } + } + + if ($firewall_src_ip != '') { + puppi::rollback { "${name}-Load_Balancer_Unblock": + priority => '46' , + command => 'firewall.sh' , + arguments => "${firewall_src_ip} ${firewall_dst_port} off 0" , + user => 'root', + project => $name , + enable => $enable , + } + } + + if ($bool_run_checks == true) { + puppi::rollback { "${name}-Run_POST-Checks": + priority => '80' , + command => 'check_project.sh' , + arguments => $name , + user => 'root' , + project => $name , + enable => $enable , + } + } + + +### REPORTING + + if ($report_email != '') { + puppi::report { "${name}-Mail_Notification": + priority => '20' , + command => 'report_mail.sh' , + arguments => $report_email , + user => 'root', + project => $name , + enable => $enable , + } + } + +### AUTO DEPLOY DURING PUPPET RUN + if ($bool_auto_deploy == true) { + puppi::run { $name: } + } + +} diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/puppi/manifests/project/service.pp b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/puppi/manifests/project/service.pp new file mode 100644 index 00000000000..62eb6c8b95a --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/puppi/manifests/project/service.pp @@ -0,0 +1,352 @@ +# = Define puppi::project::service +# +# This is a shortcut define to build a case-limit puppi project +# that just manages services and custom commands without deploying +# any file. It doesn't require any parameter but you should at least +# provide one among predeploy_customcommand, postdeploy_customcommand, +# init_script, disable_services to make something useful. +# The rollback option is kept for coherency with the standard puppi +# deploy approach, but actually should not be used since there is no +# data to rollback. +# +# == Variables: +# +# [*user*] +# (Optional) - The user to be used for deploy operations. +# +# [*predeploy_customcommand*] +# (Optional) - Full path with arguments of an eventual custom command to +# execute before the deploy. The command is executed as $predeploy_user. +# +# [*predeploy_user*] +# (Optional) - The user to be used to execute the $predeploy_customcommand. +# By default is the same of $user. +# +# [*predeploy_priority*] +# (Optional) - The priority (execution sequence number) that defines when, +# during the deploy procedure, the $predeploy_customcommand is executed +# Default: 39 (immediately before the copy of files on the deploy root). +# +# [*postdeploy_customcommand*] +# (Optional) - Full path with arguments of an eventual custom command to +# execute after the deploy. The command is executed as $postdeploy_user. +# +# [*postdeploy_user*] +# (Optional) - The user to be used to execute the $postdeploy_customcommand. +# By default is the same of $user. +# +# [*postdeploy_priority*] +# (Optional) - The priority (execution sequence number) that defines when, +# during the deploy procedure, the $postdeploy_customcommand is executed +# Default: 41 (immediately after the copy of files on the deploy root). +# +# [*init_script*] +# (Optional - Obsolete) - The name (ex: tomcat) of the init script of your +# Application server. If you define it, the AS is stopped and then started +# during deploy. This option is deprecated, you can use $disable_services +# for the same functionality +# +# [*disable_services*] +# (Optional) - The names (space separated) of the services you might want to +# stop during deploy. By default is blank. Example: "apache puppet monit". +# +# [*firewall_src_ip*] +# (Optional) - The IP address of a loadbalancer you might want to block out +# during a deploy. +# +# [*firewall_dst_port*] +# (Optional) - The local port to block from the loadbalancer during deploy +# (Default all). +# +# [*firewall_delay*] +# (Optional) - A delay time in seconds to wait after the block of +# $firewall_src_ip. Should be at least as long as the loadbalancer check +# interval for the services stopped during deploy (Default: 1). +# +# [*report_email*] +# (Optional) - The (space separated) email(s) to notify of deploy/rollback +# operations. If none is specified, no email is sent. +# +# [*run_checks*] +# (Optional) - If you want to run local puppi checks before and after the +# deploy procedure. Default: "true". +# +# [*auto_deploy*] +# (Optional) - If you want to automatically run this puppi deploy when +# Puppet runs. Default: 'false' +# +define puppi::project::service ( + $user = 'root', + $predeploy_customcommand = '', + $predeploy_user = '', + $predeploy_priority = '39', + $postdeploy_customcommand = '', + $postdeploy_user = '', + $postdeploy_priority = '41', + $init_script = '', + $disable_services = '', + $firewall_src_ip = '', + $firewall_dst_port = '0', + $firewall_delay = '1', + $report_email = '', + $run_checks = true, + $auto_deploy = false, + $enable = true ) { + + require puppi + require puppi::params + + # Set default values + $predeploy_real_user = $predeploy_user ? { + '' => $user, + default => $predeploy_user, + } + + $postdeploy_real_user = $postdeploy_user ? { + '' => $user, + default => $postdeploy_user, + } + + $bool_run_checks = any2bool($run_checks) + $bool_auto_deploy = any2bool($auto_deploy) + +### CREATE PROJECT + puppi::project { $name: + enable => $enable , + } + + +### DEPLOY SEQUENCE + if ($bool_run_checks == true) { + puppi::deploy { "${name}-Run_PRE-Checks": + priority => '10' , + command => 'check_project.sh' , + arguments => $name , + user => 'root' , + project => $name , + enable => $enable , + } + } + + if ($firewall_src_ip != '') { + puppi::deploy { "${name}-Load_Balancer_Block": + priority => '25' , + command => 'firewall.sh' , + arguments => "${firewall_src_ip} ${firewall_dst_port} on ${firewall_delay}" , + user => 'root', + project => $name , + enable => $enable , + } + } + + if ($disable_services != '') { + puppi::deploy { "${name}-Disable_extra_services": + priority => '36' , + command => 'service.sh' , + arguments => "stop ${disable_services}" , + user => 'root', + project => $name , + enable => $enable , + } + } + + if ($init_script != '') { + puppi::deploy { "${name}-Service_stop": + priority => '38' , + command => 'service.sh' , + arguments => "stop ${init_script}" , + user => 'root', + project => $name , + enable => $enable , + } + } + + if ($predeploy_customcommand != '') { + puppi::deploy { "${name}-Run_Custom_PreDeploy_Script": + priority => $predeploy_priority , + command => 'execute.sh' , + arguments => $predeploy_customcommand , + user => $predeploy_real_user , + project => $name , + enable => $enable , + } + } + + + if ($postdeploy_customcommand != '') { + puppi::deploy { "${name}-Run_Custom_PostDeploy_Script": + priority => $postdeploy_priority , + command => 'execute.sh' , + arguments => $postdeploy_customcommand , + user => $postdeploy_real_user , + project => $name , + enable => $enable , + } + } + + if ($init_script != '') { + puppi::deploy { "${name}-Service_start": + priority => '42' , + command => 'service.sh' , + arguments => "start ${init_script}" , + user => 'root', + project => $name , + enable => $enable , + } + } + + if ($disable_services != '') { + puppi::deploy { "${name}-Enable_extra_services": + priority => '44' , + command => 'service.sh' , + arguments => "start ${disable_services}" , + user => 'root', + project => $name , + enable => $enable , + } + } + + if ($firewall_src_ip != '') { + puppi::deploy { "${name}-Load_Balancer_Unblock": + priority => '46' , + command => 'firewall.sh' , + arguments => "${firewall_src_ip} ${firewall_dst_port} off 0" , + user => 'root', + project => $name , + enable => $enable , + } + } + + if ($bool_run_checks == true) { + puppi::deploy { "${name}-Run_POST-Checks": + priority => '80' , + command => 'check_project.sh' , + arguments => $name , + user => 'root' , + project => $name , + enable => $enable , + } + } + + +### ROLLBACK PROCEDURE + + if ($firewall_src_ip != '') { + puppi::rollback { "${name}-Load_Balancer_Block": + priority => '25' , + command => 'firewall.sh' , + arguments => "${firewall_src_ip} ${firewall_dst_port} on ${firewall_delay}" , + user => 'root', + project => $name , + enable => $enable , + } + } + + if ($disable_services != '') { + puppi::rollback { "${name}-Disable_extra_services": + priority => '37' , + command => 'service.sh' , + arguments => "stop ${disable_services}" , + user => 'root', + project => $name , + enable => $enable , + } + } + + if ($init_script != '') { + puppi::rollback { "${name}-Service_stop": + priority => '38' , + command => 'service.sh' , + arguments => "stop ${init_script}" , + user => 'root', + project => $name , + enable => $enable , + } + } + + if ($predeploy_customcommand != '') { + puppi::rollback { "${name}-Run_Custom_PreDeploy_Script": + priority => $predeploy_priority , + command => 'execute.sh' , + arguments => $predeploy_customcommand , + user => $predeploy_real_user , + project => $name , + enable => $enable , + } + } + + if ($postdeploy_customcommand != '') { + puppi::rollback { "${name}-Run_Custom_PostDeploy_Script": + priority => $postdeploy_priority , + command => 'execute.sh' , + arguments => $postdeploy_customcommand , + user => $postdeploy_real_user , + project => $name , + enable => $enable , + } + } + + if ($init_script != '') { + puppi::rollback { "${name}-Service_start": + priority => '42' , + command => 'service.sh' , + arguments => "start ${init_script}" , + user => 'root', + project => $name , + enable => $enable , + } + } + + if ($disable_services != '') { + puppi::rollback { "${name}-Enable_extra_services": + priority => '44' , + command => 'service.sh' , + arguments => "start ${disable_services}" , + user => 'root', + project => $name , + enable => $enable , + } + } + + if ($firewall_src_ip != '') { + puppi::rollback { "${name}-Load_Balancer_Unblock": + priority => '46' , + command => 'firewall.sh' , + arguments => "${firewall_src_ip} ${firewall_dst_port} off 0" , + user => 'root', + project => $name , + enable => $enable , + } + } + + if ($bool_run_checks == true) { + puppi::rollback { "${name}-Run_POST-Checks": + priority => '80' , + command => 'check_project.sh' , + arguments => $name , + user => 'root' , + project => $name , + enable => $enable , + } + } + + +### REPORTING + + if ($report_email != '') { + puppi::report { "${name}-Mail_Notification": + priority => '20' , + command => 'report_mail.sh' , + arguments => $report_email , + user => 'root', + project => $name , + enable => $enable , + } + } + +### AUTO DEPLOY DURING PUPPET RUN + if ($bool_auto_deploy == true) { + puppi::run { $name: } + } + +} diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/puppi/manifests/project/svn.pp b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/puppi/manifests/project/svn.pp new file mode 100644 index 00000000000..0affd38de4f --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/puppi/manifests/project/svn.pp @@ -0,0 +1,438 @@ +# == Define puppi::project::svn +# +# This is a shortcut define to build a puppi project for the deploy of +# file from a svn repo. +# It uses different "core" defines (puppi::project, puppi:deploy (many), +# puppi::rollback (many)) to build a full featured template project for +# automatic deployments. +# If you need to customize it, either change the template defined here or +# build up your own custom ones. +# +# == Variables: +# +# [*source*] +# The full URL of the svn repo to retrieve. +# Format should be in svn friendly standard (http:// svn:// ..). +# +# [*svn_user*] +# Name of the user to access a private svn repo. Optional. +# +# [*svn_password*] +# Name of the password to access a private svn repo. Optional. +# +# [*deploy_root*] +# The destination directory where the retrieved file(s) are deployed. +# +# [*install_svn*] +# If the svn package has to be installed. Default true. +# Set to false if you install svn via other modules and have resource +# conflicts. +# +# [*svn_subdir*] +# (Optional) - If you want to copy to the deploy_root only a subdir +# of the specified svn repo, specify here the path of the directory +# relative to the repo root. Default undefined +# +# [*svn_export*] +# (Optional) - If to use a svn export command instead of checkout +# Default: false (A checkout is done) +# +# [*tag*] +# (Optional) - A specific tag you may want to deploy. Default undefined +# You can override the default value via command-line with: +# puppi deploy myapp -o "tag=release" +# +# [*branch*] +# (Optional) - A specific branch you may want to deploy. Default: master +# You can override the default value via command-line with: +# puppi deploy myapp -o "branch=devel" +# +# [*commit*] +# (Optional) - A specific commit you may want to use. Default undefined +# You can override the default value via command-line with: +# puppi deploy myapp -o "commit=1061cb731bc75a1188b58b889b74ce1505ccb412" +# +# [*keep_svndata*] +# (Optional) - Define if you want to keep svn metadata directory (.svn) +# in the deploy root. According to this value backup and rollback +# operations change (with keep_svndata set to true no real backups are done +# and operations are made on the svn tree, if set to false, file are copied +# and the $backup_* options used. Default is true +# +# [*verbose*] +# (Optional) - If you want to see verbose svn utput (file names) during +# the deploy. Default is true. +# +# [*user*] +# (Optional) - The user to be used for deploy operations. +# If different from root (default) it must have write permissions on +# the $deploy_root dir. +# +# [*predeploy_customcommand*] +# (Optional) - Full path with arguments of an eventual custom command to +# execute before the deploy. The command is executed as $predeploy_user. +# +# [*predeploy_user*] +# (Optional) - The user to be used to execute the $predeploy_customcommand. +# By default is the same of $user. +# +# [*predeploy_priority*] +# (Optional) - The priority (execution sequence number) that defines when, +# during the deploy procedure, the $predeploy_customcommand is executed +# Default: 39 (immediately before the copy of files on the deploy root). +# +# [*postdeploy_customcommand*] +# (Optional) - Full path with arguments of an eventual custom command to +# execute after the deploy. The command is executed as $postdeploy_user. +# +# [*postdeploy_user*] +# (Optional) - The user to be used to execute the $postdeploy_customcommand. +# By default is the same of $user. +# +# [*postdeploy_priority*] +# (Optional) - The priority (execution sequence number) that defines when, +# during the deploy procedure, the $postdeploy_customcommand is executed +# Default: 41 (immediately after the copy of files on the deploy root). +# +# [*disable_services*] +# (Optional) - The names (space separated) of the services you might want to +# stop during deploy. By default is blank. Example: "apache puppet monit". +# +# [*firewall_src_ip*] +# (Optional) - The IP address of a loadbalancer you might want to block out +# during a deploy. +# +# [*firewall_dst_port*] +# (Optional) - The local port to block from the loadbalancer during deploy +# (Default all). +# +# [*firewall_delay*] +# (Optional) - A delay time in seconds to wait after the block of +# $firewall_src_ip. Should be at least as long as the loadbalancer check +# interval for the services stopped during deploy (Default: 1). +# +# [*report_email*] +# (Optional) - The (space separated) email(s) to notify of deploy/rollback +# operations. If none is specified, no email is sent. +# +# [*backup_enable*] +# (Optional, default true) - If the backup of files in the deploy dir +# is done (before deploy). If set to false, rollback is disabled. +# +# [*backup_rsync_options*] +# (Optional) - The extra options to pass to rsync for backup operations. Use +# it, for example, to exclude directories that you don't want to archive. +# IE: "--exclude .snapshot --exclude cache --exclude www/cache". +# This option is used when $keep_svnmeta is set to false +# +# [*backup_retention*] +# (Optional) - Number of backup archives to keep. (Default 5). +# Lower the default value if your backups are too large and may fill up the +# filesystem. +# This option is used when $keep_svnmeta is set to false +# +# [*run_checks*] +# (Optional) - If you want to run local puppi checks before and after the +# deploy procedure. Default: "true". +# +# [*auto_deploy*] +# (Optional) - If you want to automatically run this puppi deploy when +# Puppet runs. Default: 'false' +# +define puppi::project::svn ( + $source, + $deploy_root, + $install_svn = true, + $svn_user = 'undefined', + $svn_password = 'undefined', + $svn_subdir = 'undefined', + $svn_export = false, + $tag = 'undefined', + $branch = 'master', + $commit = 'undefined', + $keep_svndata = true, + $verbose = true, + $user = 'root', + $predeploy_customcommand = '', + $predeploy_user = '', + $predeploy_priority = '39', + $postdeploy_customcommand = '', + $postdeploy_user = '', + $postdeploy_priority = '41', + $disable_services = '', + $firewall_src_ip = '', + $firewall_dst_port = '0', + $firewall_delay = '1', + $report_email = '', + $backup_enable = true, + $backup_rsync_options = '--exclude .snapshot', + $backup_retention = '5', + $run_checks = true, + $auto_deploy = false, + $enable = true ) { + + require puppi + require puppi::params + + # Set default values + $predeploy_real_user = $predeploy_user ? { + '' => $user, + default => $predeploy_user, + } + + $postdeploy_real_user = $postdeploy_user ? { + '' => $user, + default => $postdeploy_user, + } + + $bool_install_svn = any2bool($install_svn) + $bool_svn_export = any2bool($svn_export) + $bool_keep_svndata = any2bool($keep_svndata) + $bool_verbose = any2bool($verbose) + $bool_backup_enable = any2bool($backup_enable) + $bool_run_checks = any2bool($run_checks) + $bool_auto_deploy = any2bool($auto_deploy) + +### INSTALL GIT + if ($bool_install_svn == true) { + if ! defined(Package['subversion']) { package { 'subversion': ensure => installed } } + } + +### CREATE PROJECT + puppi::project { $name: + enable => $enable , + } + + +### DEPLOY SEQUENCE + if ($bool_run_checks == true) { + puppi::deploy { "${name}-Run_PRE-Checks": + priority => '10' , + command => 'check_project.sh' , + arguments => $name , + user => 'root' , + project => $name , + enable => $enable , + } + } + + if ($firewall_src_ip != '') { + puppi::deploy { "${name}-Load_Balancer_Block": + priority => '25' , + command => 'firewall.sh' , + arguments => "${firewall_src_ip} ${firewall_dst_port} on ${firewall_delay}" , + user => 'root', + project => $name , + enable => $enable , + } + } + + if ($bool_keep_svndata == true and $bool_backup_enable == true) { + puppi::deploy { "${name}-Backup_existing_data": + priority => '30' , + command => 'archive.sh' , + arguments => "-b ${deploy_root} -o '${backup_rsync_options}' -n ${backup_retention}" , + user => 'root' , + project => $name , + enable => $enable , + } + } + + if ($disable_services != '') { + puppi::deploy { "${name}-Disable_extra_services": + priority => '36' , + command => 'service.sh' , + arguments => "stop ${disable_services}" , + user => 'root', + project => $name , + enable => $enable , + } + } + + if ($predeploy_customcommand != '') { + puppi::deploy { "${name}-Run_Custom_PreDeploy_Script": + priority => $predeploy_priority , + command => 'execute.sh' , + arguments => $predeploy_customcommand , + user => $predeploy_real_user , + project => $name , + enable => $enable , + } + } + + # Here is done the deploy on $deploy_root + puppi::deploy { "${name}-Deploy_Files": + priority => '40' , + command => 'svn.sh' , + arguments => "-a deploy -s ${source} -d ${deploy_root} -u ${user} -gs ${svn_subdir} -su ${svn_user} -sp ${svn_password} -t ${tag} -b ${branch} -c ${commit} -v ${bool_verbose} -k ${bool_keep_svndata} -e ${bool_svn_export}" , + user => 'root' , + project => $name , + enable => $enable , + } + + if ($postdeploy_customcommand != '') { + puppi::deploy { "${name}-Run_Custom_PostDeploy_Script": + priority => $postdeploy_priority , + command => 'execute.sh' , + arguments => $postdeploy_customcommand , + user => $postdeploy_real_user , + project => $name , + enable => $enable , + } + } + + if ($disable_services != '') { + puppi::deploy { "${name}-Enable_extra_services": + priority => '44' , + command => 'service.sh' , + arguments => "start ${disable_services}" , + user => 'root', + project => $name , + enable => $enable , + } + } + + if ($firewall_src_ip != '') { + puppi::deploy { "${name}-Load_Balancer_Unblock": + priority => '46' , + command => 'firewall.sh' , + arguments => "${firewall_src_ip} ${firewall_dst_port} off 0" , + user => 'root', + project => $name , + enable => $enable , + } + } + + if ($bool_run_checks == true) { + puppi::deploy { "${name}-Run_POST-Checks": + priority => '80' , + command => 'check_project.sh' , + arguments => $name , + user => 'root' , + project => $name , + enable => $enable , + } + } + + +### ROLLBACK PROCEDURE + + if ($bool_backup_enable == true) { + if ($firewall_src_ip != '') { + puppi::rollback { "${name}-Load_Balancer_Block": + priority => '25' , + command => 'firewall.sh' , + arguments => "${firewall_src_ip} ${firewall_dst_port} on ${firewall_delay}" , + user => 'root', + project => $name , + enable => $enable , + } + } + + if ($disable_services != '') { + puppi::rollback { "${name}-Disable_extra_services": + priority => '37' , + command => 'service.sh' , + arguments => "stop ${disable_services}" , + user => 'root', + project => $name , + enable => $enable , + } + } + + if ($predeploy_customcommand != '') { + puppi::rollback { "${name}-Run_Custom_PreDeploy_Script": + priority => $predeploy_priority , + command => 'execute.sh' , + arguments => $predeploy_customcommand , + user => $predeploy_real_user , + project => $name , + enable => $enable , + } + } + + if ($bool_keep_svndata == true) { + puppi::rollback { "${name}-Recover_Files_To_Deploy": + priority => '40' , + command => 'archive.sh' , + arguments => "-r ${deploy_root} -o '${backup_rsync_options}'" , + user => $user , + project => $name , + enable => $enable , + } + } + + if ($bool_keep_svndata != true) { + puppi::rollback { "${name}-Rollback_Files": + priority => '40' , + command => 'svn.sh' , + arguments => "-a rollback -s ${source} -d ${deploy_root} -gs ${svn_subdir} -t ${tag} -b ${branch} -c ${commit} -v ${bool_verbose} -k ${bool_keep_svndata}" , + user => $user , + project => $name , + enable => $enable , + } + } + + if ($postdeploy_customcommand != '') { + puppi::rollback { "${name}-Run_Custom_PostDeploy_Script": + priority => $postdeploy_priority , + command => 'execute.sh' , + arguments => $postdeploy_customcommand , + user => $postdeploy_real_user , + project => $name , + enable => $enable , + } + } + + if ($disable_services != '') { + puppi::rollback { "${name}-Enable_extra_services": + priority => '44' , + command => 'service.sh' , + arguments => "start ${disable_services}" , + user => 'root', + project => $name , + enable => $enable , + } + } + + if ($firewall_src_ip != '') { + puppi::rollback { "${name}-Load_Balancer_Unblock": + priority => '46' , + command => 'firewall.sh' , + arguments => "${firewall_src_ip} ${firewall_dst_port} off 0" , + user => 'root', + project => $name , + enable => $enable , + } + } + + if ($bool_run_checks == true) { + puppi::rollback { "${name}-Run_POST-Checks": + priority => '80' , + command => 'check_project.sh' , + arguments => $name , + user => 'root' , + project => $name , + enable => $enable , + } + } + } + +### REPORTING + + if ($report_email != '') { + puppi::report { "${name}-Mail_Notification": + priority => '20' , + command => 'report_mail.sh' , + arguments => $report_email , + user => 'root', + project => $name , + enable => $enable , + } + } + +### AUTO DEPLOY DURING PUPPET RUN + if ($bool_auto_deploy == true) { + puppi::run { $name: } + } +} diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/puppi/manifests/project/tar.pp b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/puppi/manifests/project/tar.pp new file mode 100644 index 00000000000..3206864f1ff --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/puppi/manifests/project/tar.pp @@ -0,0 +1,479 @@ +# = Define puppi::project::tar +# +# This is a shortcut define to build a puppi project for the +# deploy of a tar.gz file into a deploy root +# +# It uses different "core" defines (puppi::project, puppi:deploy (many), +# puppi::rollback (many)) to build a full featured template project for +# automatic deployments. +# If you need to customize it, either change the template defined here or +# build up your own custom ones. +# +# == Variables: +# +# [*source*] +# The full URL of the main file to retrieve. +# Format should be in URI standard (http:// file:// ssh:// rsync://). +# +# [*deploy_root*] +# The destination directory where the retrieved file(s) are deployed. +# +# [*init_source*] +# (Optional) - The full URL to be used to retrieve, for the first time, +# the project files. They are copied directly to the $deploy_root +# Format should be in URI standard (http:// file:// ssh:// svn://). +# +# [*user*] +# (Optional) - The user to be used for deploy operations. +# +# [*predeploy_customcommand*] +# (Optional) - Full path with arguments of an eventual custom command to +# execute before the deploy. The command is executed as $predeploy_user. +# +# [*predeploy_user*] +# (Optional) - The user to be used to execute the $predeploy_customcommand. +# By default is the same of $user. +# +# [*predeploy_priority*] +# (Optional) - The priority (execution sequence number) that defines when, +# during the deploy procedure, the $predeploy_customcommand is executed +# Default: 39 (immediately before the copy of files on the deploy root). +# +# [*postdeploy_customcommand*] +# (Optional) - Full path with arguments of an eventual custom command to +# execute after the deploy. The command is executed as $postdeploy_user. +# +# [*postdeploy_user*] +# (Optional) - The user to be used to execute the $postdeploy_customcommand. +# By default is the same of $user. +# +# [*postdeploy_priority*] +# (Optional) - The priority (execution sequence number) that defines when, +# during the deploy procedure, the $postdeploy_customcommand is executed +# Default: 41 (immediately after the copy of files on the deploy root). +# +# [*init_script*] +# (Optional - Obsolete) - The name (ex: tomcat) of the init script of your +# Application server. If you define it, the AS is stopped and then started +# during deploy. This option is deprecated, you can use $disable_services +# for the same functionality +# +# [*disable_services*] +# (Optional) - The names (space separated) of the services you might want to +# stop during deploy. By default is blank. Example: "apache puppet monit". +# +# [*firewall_src_ip*] +# (Optional) - The IP address of a loadbalancer you might want to block out +# during a deploy. +# +# [*firewall_dst_port*] +# (Optional) - The local port to block from the loadbalancer during deploy +# (Default all). +# +# [*firewall_delay*] +# (Optional) - A delay time in seconds to wait after the block of +# $firewall_src_ip. Should be at least as long as the loadbalancer check +# interval for the services stopped during deploy (Default: 1). +# +# [*report_email*] +# (Optional) - The (space separated) email(s) to notify of deploy/rollback +# operations. If none is specified, no email is sent. +# +# [*clean_deploy*] +# (Optional, default false) - If during the deploy procedure, all the +# existing files that are not on the source have to be deleted. +# (When true, a --delete option is added to the rsync command) +# Do not set to true if source files are incremental. +# +# [*backup_enable*] +# (Optional, default true) - If the backup of files in the deploy dir +# is done (before deploy). If set to false, rollback is disabled. +# +# [*backup_rsync_options*] +# (Optional) - The extra options to pass to rsync for backup operations. Use +# it, for example, to exclude directories that you don't want to archive. +# IE: "--exclude .snapshot --exclude cache --exclude www/cache". +# +# [*backup_retention*] +# (Optional) - Number of backup archives to keep. (Default 5). +# Lower the default value if your backups are too large and may fill up the +# filesystem. +# +# [*run_checks*] +# (Optional) - If you want to run local puppi checks before and after the +# deploy procedure. Default: "true". +# +# [*always_deploy*] +# (Optional) - If you always deploy what has been downloaded. Default="yes", +# if set to "no" a checksum is made between the files previously downloaded +# and the new files. If they are the same the deploy is not done. +# +# [*auto_deploy*] +# (Optional) - If you want to automatically run this puppi deploy when +# Puppet runs. Default: 'false' +# +define puppi::project::tar ( + $source, + $deploy_root, + $init_source = '', + $user = 'root', + $predeploy_customcommand = '', + $predeploy_user = '', + $predeploy_priority = '39', + $postdeploy_customcommand = '', + $postdeploy_user = '', + $postdeploy_priority = '41', + $init_script = '', + $disable_services = '', + $firewall_src_ip = '', + $firewall_dst_port = '0', + $firewall_delay = '1', + $report_email = '', + $clean_deploy = false, + $backup_enable = true, + $backup_rsync_options = '--exclude .snapshot', + $backup_retention = '5', + $run_checks = true, + $always_deploy = true, + $auto_deploy = false, + $verify_ssl = true, + $enable = true ) { + + require puppi + require puppi::params + + # Set default values + $predeploy_real_user = $predeploy_user ? { + '' => $user, + default => $predeploy_user, + } + + $postdeploy_real_user = $postdeploy_user ? { + '' => $user, + default => $postdeploy_user, + } + + $init_real_source = $init_source ? { + '' => $source, + default => $init_source, + } + + $real_always_deploy = any2bool($always_deploy) ? { + false => 'no', + true => 'yes', + } + + $bool_clean_deploy = any2bool($clean_deploy) + $bool_backup_enable = any2bool($backup_enable) + $bool_run_checks = any2bool($run_checks) + $bool_auto_deploy = any2bool($auto_deploy) + + if ($verify_ssl) { + $ssl_arg = '' + }else{ + $ssl_arg = '-k' + } + + +### CREATE PROJECT + puppi::project { $name: + enable => $enable , + } + + +### INIT SEQUENCE + if ($init_source != '') { + puppi::initialize { "${name}-Deploy_Files": + priority => '40' , + command => 'get_file.sh' , + arguments => "${ssl_arg} -s '${init_source}' -d ${deploy_root}" , + user => $user , + project => $name , + enable => $enable , + } + } + + +### DEPLOY SEQUENCE + if ($bool_run_checks == true) { + puppi::deploy { "${name}-Run_PRE-Checks": + priority => '10' , + command => 'check_project.sh' , + arguments => $name , + user => 'root' , + project => $name , + enable => $enable , + } + } + + # Here source file is retrieved + puppi::deploy { "${name}-Retrieve_TarBall": + priority => '20' , + command => 'get_file.sh' , + arguments => "${ssl_arg} -s '${source}' -t tarball -a ${real_always_deploy}" , + user => 'root' , + project => $name , + enable => $enable , + } + + puppi::deploy { "${name}-PreDeploy_TarBall": + priority => '25' , + command => 'predeploy_tar.sh' , + arguments => 'downloadedfile' , + user => 'root' , + project => $name , + enable => $enable , + } + + if ($firewall_src_ip != '') { + puppi::deploy { "${name}-Load_Balancer_Block": + priority => '25' , + command => 'firewall.sh' , + arguments => "${firewall_src_ip} ${firewall_dst_port} on ${firewall_delay}" , + user => 'root', + project => $name , + enable => $enable , + } + } + + if ($bool_backup_enable == true) { + puppi::deploy { "${name}-Backup_existing_Files": + priority => '30' , + command => 'archive.sh' , + arguments => "-b ${deploy_root} -o '${backup_rsync_options}' -n ${backup_retention}" , + user => 'root' , + project => $name , + enable => $enable , + } + } + + if ($disable_services != '') { + puppi::deploy { "${name}-Disable_extra_services": + priority => '36' , + command => 'service.sh' , + arguments => "stop ${disable_services}" , + user => 'root', + project => $name , + enable => $enable , + } + } + + if ($init_script != '') { + puppi::deploy { "${name}-Service_stop": + priority => '38' , + command => 'service.sh' , + arguments => "stop ${init_script}" , + user => 'root', + project => $name , + enable => $enable , + } + } + + if ($predeploy_customcommand != '') { + puppi::deploy { "${name}-Run_Custom_PreDeploy_Script": + priority => $predeploy_priority , + command => 'execute.sh' , + arguments => $predeploy_customcommand , + user => $predeploy_real_user , + project => $name , + enable => $enable , + } + } + + # Here is done the deploy on $deploy_root + puppi::deploy { "${name}-Deploy": + priority => '40' , + command => 'deploy_files.sh' , + arguments => "-d ${deploy_root} -c ${bool_clean_deploy}", + user => $user , + project => $name , + enable => $enable , + } + + if ($postdeploy_customcommand != '') { + puppi::deploy { "${name}-Run_Custom_PostDeploy_Script": + priority => $postdeploy_priority , + command => 'execute.sh' , + arguments => $postdeploy_customcommand , + user => $postdeploy_real_user , + project => $name , + enable => $enable , + } + } + + if ($init_script != '') { + puppi::deploy { "${name}-Service_start": + priority => '42' , + command => 'service.sh' , + arguments => "start ${init_script}" , + user => 'root', + project => $name , + enable => $enable , + } + } + + if ($disable_services != '') { + puppi::deploy { "${name}-Enable_extra_services": + priority => '44' , + command => 'service.sh' , + arguments => "start ${disable_services}" , + user => 'root', + project => $name , + enable => $enable , + } + } + + if ($firewall_src_ip != '') { + puppi::deploy { "${name}-Load_Balancer_Unblock": + priority => '46' , + command => 'firewall.sh' , + arguments => "${firewall_src_ip} ${firewall_dst_port} off 0" , + user => 'root', + project => $name , + enable => $enable , + } + } + + if ($bool_run_checks == true) { + puppi::deploy { "${name}-Run_POST-Checks": + priority => '80' , + command => 'check_project.sh' , + arguments => $name , + user => 'root' , + project => $name , + enable => $enable , + } + } + + +### ROLLBACK PROCEDURE + + if ($bool_backup_enable == true) { + if ($firewall_src_ip != '') { + puppi::rollback { "${name}-Load_Balancer_Block": + priority => '25' , + command => 'firewall.sh' , + arguments => "${firewall_src_ip} ${firewall_dst_port} on ${firewall_delay}" , + user => 'root', + project => $name , + enable => $enable , + } + } + + if ($disable_services != '') { + puppi::rollback { "${name}-Disable_extra_services": + priority => '37' , + command => 'service.sh' , + arguments => "stop ${disable_services}" , + user => 'root', + project => $name , + enable => $enable , + } + } + + if ($init_script != '') { + puppi::rollback { "${name}-Service_stop": + priority => '38' , + command => 'service.sh' , + arguments => "stop ${init_script}" , + user => 'root', + project => $name , + enable => $enable , + } + } + + if ($predeploy_customcommand != '') { + puppi::rollback { "${name}-Run_Custom_PreDeploy_Script": + priority => $predeploy_priority , + command => 'execute.sh' , + arguments => $predeploy_customcommand , + user => $predeploy_real_user , + project => $name , + enable => $enable , + } + } + + puppi::rollback { "${name}-Recover_Files_To_Deploy": + priority => '40' , + command => 'archive.sh' , + arguments => "-r ${deploy_root} -o '${backup_rsync_options}'" , + user => $user , + project => $name , + enable => $enable , + } + + if ($postdeploy_customcommand != '') { + puppi::rollback { "${name}-Run_Custom_PostDeploy_Script": + priority => $postdeploy_priority , + command => 'execute.sh' , + arguments => $postdeploy_customcommand , + user => $postdeploy_real_user , + project => $name , + enable => $enable , + } + } + + if ($init_script != '') { + puppi::rollback { "${name}-Service_start": + priority => '42' , + command => 'service.sh' , + arguments => "start ${init_script}" , + user => 'root', + project => $name , + enable => $enable , + } + } + + if ($disable_services != '') { + puppi::rollback { "${name}-Enable_extra_services": + priority => '44' , + command => 'service.sh' , + arguments => "start ${disable_services}" , + user => 'root', + project => $name , + enable => $enable , + } + } + + if ($firewall_src_ip != '') { + puppi::rollback { "${name}-Load_Balancer_Unblock": + priority => '46' , + command => 'firewall.sh' , + arguments => "${firewall_src_ip} ${firewall_dst_port} off 0" , + user => 'root', + project => $name , + enable => $enable , + } + } + + if ($bool_run_checks == true) { + puppi::rollback { "${name}-Run_POST-Checks": + priority => '80' , + command => 'check_project.sh' , + arguments => $name , + user => 'root' , + project => $name , + enable => $enable , + } + } + } + +### REPORTING + + if ($report_email != '') { + puppi::report { "${name}-Mail_Notification": + priority => '20' , + command => 'report_mail.sh' , + arguments => $report_email , + user => 'root', + project => $name , + enable => $enable , + } + } + +### AUTO DEPLOY DURING PUPPET RUN + if ($bool_auto_deploy == true) { + puppi::run { $name: } + } + +} diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/puppi/manifests/project/war.pp b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/puppi/manifests/project/war.pp new file mode 100644 index 00000000000..f9ec025d078 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/puppi/manifests/project/war.pp @@ -0,0 +1,525 @@ +# == Define puppi::project::war +# +# This is a shortcut define to build a puppi project for the deploy of warfiles +# It uses different "core" defines (puppi::project, puppi:deploy (many), +# puppi::rollback (many)) to build a full featured template project for +# automatic deployments. +# If you need to customize it, either change the template defined here or +# build up your own custom ones. +# +# == Variables: +# +# [*source*] +# The full URL of the main file to retrieve. +# Format should be in URI standard (http:// file:// ssh:// rsync://). +# +# [*deploy_root*] +# The destination directory where the retrieved file(s) are deployed. +# +# [*init_source*] +# (Optional) - The full URL to be used to retrieve, for the first time, +# the project files. They are copied directly to the $deploy_root +# Format should be in URI standard (http:// file:// ssh:// svn://). +# +# [*user*] +# (Optional) - The user to be used for deploy operations. +# +# [*predeploy_customcommand*] +# (Optional) - Full path with arguments of an eventual custom command to +# execute before the deploy. The command is executed as $predeploy_user. +# +# [*predeploy_user*] +# (Optional) - The user to be used to execute the $predeploy_customcommand. +# By default is the same of $user. +# +# [*predeploy_priority*] +# (Optional) - The priority (execution sequence number) that defines when, +# during the deploy procedure, the $predeploy_customcommand is executed +# Default: 39 (immediately before the copy of files on the deploy root). +# +# [*postdeploy_customcommand*] +# (Optional) - Full path with arguments of an eventual custom command to +# execute after the deploy. The command is executed as $postdeploy_user. +# +# [*postdeploy_user*] +# (Optional) - The user to be used to execute the $postdeploy_customcommand. +# By default is the same of $user. +# +# [*postdeploy_priority*] +# (Optional) - The priority (execution sequence number) that defines when, +# during the deploy procedure, the $postdeploy_customcommand is executed +# Default: 41 (immediately after the copy of files on the deploy root). +# +# [*init_script*] +# (Optional - Obsolete) - The name (ex: tomcat) of the init script of your +# Application server. If you define it, the AS is stopped and then started +# during deploy. This option is deprecated, you can use $disable_services +# for the same functionality +# +# [*disable_services*] +# (Optional) - The names (space separated) of the services you might want to +# stop during deploy. By default is blank. Example: "apache puppet monit". +# +# [*firewall_src_ip*] +# (Optional) - The IP address of a loadbalancer you might want to block out +# during a deploy. +# +# [*firewall_dst_port*] +# (Optional) - The local port to block from the loadbalancer during deploy +# (Default all). +# +# [*firewall_delay*] +# (Optional) - A delay time in seconds to wait after the block of +# $firewall_src_ip. Should be at least as long as the loadbalancer check +# interval for the services stopped during deploy (Default: 1). +# +# [*report_email*] +# (Optional) - The (space separated) email(s) to notify of deploy/rollback +# operations. If none is specified, no email is sent. +# +# [*clean_deploy*] +# (Optional, default false) - If during the deploy procedure, all the +# existing files that are not on the source have to be deleted. +# (When true, a --delete option is added to the rsync command) +# Do not set to true if source files are incremental. +# +# [*backup_enable*] +# (Optional, default true) - If the backup of files in the deploy dir +# is done (before deploy). If set to false, rollback is disabled. +# +# [*backup_rsync_options*] +# (Optional) - The extra options to pass to rsync for backup operations. Use +# it, for example, to exclude directories that you don't want to archive. +# IE: "--exclude .snapshot --exclude cache --exclude www/cache". +# +# [*backup_retention*] +# (Optional) - Number of backup archives to keep. (Default 5). +# Lower the default value if your backups are too large and may fill up the +# filesystem. +# +# [*run_checks*] +# (Optional) - If you want to run local puppi checks before and after the +# deploy procedure. Default: "true". +# +# [*always_deploy*] +# (Optional) - If you always deploy what has been downloaded. Default="yes", +# if set to "no" a checksum is made between the files previously downloaded +# and the new files. If they are the same the deploy is not done. +# +# [*check_deploy*] +# (Optional) - Checks if the war is deployed (Default yes). Set to no if +# you deploy on Jboss or the deployed dir is different for the war filename +# +# [*auto_deploy*] +# (Optional) - If you want to automatically run this puppi deploy when +# Puppet runs. Default: 'false' +# +define puppi::project::war ( + $source, + $deploy_root, + $init_source = '', + $user = 'root', + $predeploy_customcommand = '', + $predeploy_user = '', + $predeploy_priority = '39', + $postdeploy_customcommand = '', + $postdeploy_user = '', + $postdeploy_priority = '41', + $init_script = '', + $disable_services = '', + $firewall_src_ip = '', + $firewall_dst_port = '0', + $firewall_delay = '1', + $report_email = '', + $clean_deploy = false, + $backup_enable = true, + $backup_rsync_options = '--exclude .snapshot', + $backup_retention = '5', + $run_checks = true, + $always_deploy = true, + $check_deploy = true, + $auto_deploy = false, + $enable = true ) { + + require puppi + require puppi::params + + # Set default values + $predeploy_real_user = $predeploy_user ? { + '' => $user, + default => $predeploy_user, + } + + $postdeploy_real_user = $postdeploy_user ? { + '' => $user, + default => $postdeploy_user, + } + + # Unless explicitely defined, we assume that the WAR file to use + # for initialization is the same to use for deploys + $init_real_source = $init_source ? { + '' => $source, + default => $init_source, + } + + $real_always_deploy = any2bool($always_deploy) ? { + false => 'no', + true => 'yes', + } + + $bool_run_checks = any2bool($run_checks) + $bool_clean_deploy = any2bool($clean_deploy) + $bool_backup_enable = any2bool($backup_enable) + $bool_check_deploy = any2bool($check_deploy) + $bool_auto_deploy = any2bool($auto_deploy) + + $war_file = url_parse($source,'filename') + + +### CREATE PROJECT + puppi::project { $name: + enable => $enable , + } + + +### INIT SEQUENCE + if ($init_source != '') { + puppi::initialize { "${name}-Deploy_Files": + priority => '40' , + command => 'get_file.sh' , + arguments => "-s ${init_source} -d ${deploy_root}" , + user => $user , + project => $name , + enable => $enable , + } + } + + +### DEPLOY SEQUENCE + if ($bool_run_checks == true) { + puppi::deploy { "${name}-Run_PRE-Checks": + priority => '10' , + command => 'check_project.sh' , + arguments => $name , + user => 'root' , + project => $name , + enable => $enable , + } + } + + # Here source file is retrieved + puppi::deploy { "${name}-Retrieve_WAR": + priority => '20' , + command => 'get_file.sh' , + arguments => "-s ${source} -a ${real_always_deploy}" , + user => 'root' , + project => $name , + enable => $enable , + } + + if ($firewall_src_ip != '') { + puppi::deploy { "${name}-Load_Balancer_Block": + priority => '25' , + command => 'firewall.sh' , + arguments => "${firewall_src_ip} ${firewall_dst_port} on ${firewall_delay}" , + user => 'root', + project => $name , + enable => $enable , + } + } + + if ($bool_backup_enable == true) { + puppi::deploy { "${name}-Backup_existing_WAR": + priority => '30' , + command => 'archive.sh' , + arguments => "-b ${deploy_root} -t war -s move -m diff -o '${backup_rsync_options}' -n ${backup_retention}" , + user => 'root' , + project => $name , + enable => $enable , + } +} + + if ($bool_check_deploy == true) { + puppi::deploy { "${name}-Check_undeploy": + priority => '32' , + command => 'checkwardir.sh' , + arguments => "-a ${deploy_root}/${war_file}" , + user => $user , + project => $name , + enable => $enable , + } + } + + if ($disable_services != '') { + puppi::deploy { "${name}-Disable_extra_services": + priority => '36' , + command => 'service.sh' , + arguments => "stop ${disable_services}" , + user => 'root', + project => $name , + enable => $enable , + } + } + + if ($init_script != '') { + puppi::deploy { "${name}-Service_stop": + priority => '38' , + command => 'service.sh' , + arguments => "stop ${init_script}" , + user => 'root', + project => $name , + enable => $enable , + } + } + + if ($predeploy_customcommand != '') { + puppi::deploy { "${name}-Run_Custom_PreDeploy_Script": + priority => $predeploy_priority , + command => 'execute.sh' , + arguments => $predeploy_customcommand , + user => $predeploy_real_user , + project => $name , + enable => $enable , + } + } + + # Here is done the deploy on $deploy_root + puppi::deploy { "${name}-Deploy_WAR": + priority => '40' , + command => 'deploy_files.sh' , + arguments => "-d ${deploy_root} -c ${bool_clean_deploy}", + user => $user , + project => $name , + enable => $enable , + } + + if ($postdeploy_customcommand != '') { + puppi::deploy { "${name}-Run_Custom_PostDeploy_Script": + priority => $postdeploy_priority , + command => 'execute.sh' , + arguments => $postdeploy_customcommand , + user => $postdeploy_real_user , + project => $name , + enable => $enable , + } + } + + if ($init_script != '') { + puppi::deploy { "${name}-Service_start": + priority => '42' , + command => 'service.sh' , + arguments => "start ${init_script}" , + user => 'root', + project => $name , + enable => $enable , + } + } + + if ($disable_services != '') { + puppi::deploy { "${name}-Enable_extra_services": + priority => '44' , + command => 'service.sh' , + arguments => "start ${disable_services}" , + user => 'root', + project => $name , + enable => $enable , + } + } + + if ($bool_check_deploy == true) { + puppi::deploy { "${name}-Check_deploy": + priority => '45' , + command => 'checkwardir.sh' , + arguments => "-p ${deploy_root}/${war_file}" , + user => $user , + project => $name , + enable => $enable , + } + } + + if ($firewall_src_ip != '') { + puppi::deploy { "${name}-Load_Balancer_Unblock": + priority => '46' , + command => 'firewall.sh' , + arguments => "${firewall_src_ip} ${firewall_dst_port} off 0" , + user => 'root', + project => $name , + enable => $enable , + } + } + + if ($bool_run_checks == true) { + puppi::deploy { "${name}-Run_POST-Checks": + priority => '80' , + command => 'check_project.sh' , + arguments => $name , + user => 'root' , + project => $name , + enable => $enable , + } + } + + +### ROLLBACK PROCEDURE + + if ($bool_backup_enable == true) { + + if ($firewall_src_ip != '') { + puppi::rollback { "${name}-Load_Balancer_Block": + priority => '25' , + command => 'firewall.sh' , + arguments => "${firewall_src_ip} ${firewall_dst_port} on ${firewall_delay}" , + user => 'root', + project => $name , + enable => $enable , + } + } + + puppi::rollback { "${name}-Remove_existing_WAR": + priority => '30' , + command => 'delete.sh' , + arguments => "${deploy_root}/${war_file}" , + user => 'root' , + project => $name , + enable => $enable , + } + + if ($bool_check_deploy == true) { + puppi::rollback { "${name}-Check_undeploy": + priority => '36' , + command => 'checkwardir.sh' , + arguments => "-a ${deploy_root}/${war_file}" , + user => $user , + project => $name , + enable => $enable , + } + } + + if ($disable_services != '') { + puppi::rollback { "${name}-Disable_extra_services": + priority => '37' , + command => 'service.sh' , + arguments => "stop ${disable_services}" , + user => 'root', + project => $name , + enable => $enable , + } + } + + if ($init_script != '') { + puppi::rollback { "${name}-Service_stop": + priority => '38' , + command => 'service.sh' , + arguments => "stop ${init_script}" , + user => 'root', + project => $name , + enable => $enable , + } + } + + if ($predeploy_customcommand != '') { + puppi::rollback { "${name}-Run_Custom_PreDeploy_Script": + priority => $predeploy_priority , + command => 'execute.sh' , + arguments => $predeploy_customcommand , + user => $predeploy_real_user , + project => $name , + enable => $enable , + } + } + + puppi::rollback { "${name}-Recover_Files_To_Deploy": + priority => '40' , + command => 'archive.sh' , + arguments => "-r ${deploy_root} -t war -o '${backup_rsync_options}'" , + user => $user , + project => $name , + enable => $enable , + } + + if ($postdeploy_customcommand != '') { + puppi::rollback { "${name}-Run_Custom_PostDeploy_Script": + priority => $postdeploy_priority , + command => 'execute.sh' , + arguments => $postdeploy_customcommand , + user => $postdeploy_real_user , + project => $name , + enable => $enable , + } + } + + if ($init_script != '') { + puppi::rollback { "${name}-Service_start": + priority => '42' , + command => 'service.sh' , + arguments => "start ${init_script}" , + user => 'root', + project => $name , + enable => $enable , + } + } + + if ($disable_services != '') { + puppi::rollback { "${name}-Enable_extra_services": + priority => '44' , + command => 'service.sh' , + arguments => "start ${disable_services}" , + user => 'root', + project => $name , + enable => $enable , + } + } + + if ($bool_check_deploy == true) { + puppi::rollback { "${name}-Check_deploy": + priority => '45' , + command => 'checkwardir.sh' , + arguments => "-p ${deploy_root}/${war_file}" , + user => $user , + project => $name , + enable => $enable , + } + } + + if ($firewall_src_ip != '') { + puppi::rollback { "${name}-Load_Balancer_Unblock": + priority => '46' , + command => 'firewall.sh' , + arguments => "${firewall_src_ip} ${firewall_dst_port} off 0" , + user => 'root', + project => $name , + enable => $enable , + } + } + + if ($bool_run_checks == true) { + puppi::rollback { "${name}-Run_POST-Checks": + priority => '80' , + command => 'check_project.sh' , + arguments => $name , + user => 'root' , + project => $name , + enable => $enable , + } + } + } + +### REPORTING + + if ($report_email != '') { + puppi::report { "${name}-Mail_Notification": + priority => '20' , + command => 'report_mail.sh' , + arguments => $report_email , + user => 'root', + project => $name , + enable => $enable , + } + } + +### AUTO DEPLOY DURING PUPPET RUN + if ($bool_auto_deploy == true) { + puppi::run { $name: } + } + +} diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/puppi/manifests/project/y4maven.pp b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/puppi/manifests/project/y4maven.pp new file mode 100644 index 00000000000..ec48cf419e9 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/puppi/manifests/project/y4maven.pp @@ -0,0 +1,723 @@ +# = Define puppi::project::y4maven +# +# This is a shortcut define to build a puppi project for the +# deploying hybris-production-zips via Maven and published on +# a repository like artifactory. +# +# It uses different "core" defines (puppi::project, puppi:deploy (many), +# puppi::rollback (many)) to build a full featured template project for +# automatic deployments. +# If you need to customize it, either change the template defined here or +# build up your own custom ones. +# +# == Variables: +# +# [*source*] +# The full URL of the maven-metadata.xml file to retrieve. +# Format should be in URI standard (http:// file:// ssh:// rsync://). +# +# [*http_password*] +# The http_password to use for authentication to the source in case of http. +# +# [*http_user*] +# The http_user to use for authentication to the source in case of http. +# +# [*artifact_type*] +# The artifact_type to parse the maven-metadata.xml. Either "release" or "latest" +# Default is "release". With artifactory, don't use the +# "Maven Snapshot Version Behavior" "unique" for your repository. +# +# [*deploy_root*] +# The destination directory where file(s) are deployed. +# +# [*user*] +# (Optional) - The user to be used for deploy operations. +# +# [*war_suffix*] +# (Optional) - The suffix (Maven qualifier) that might be appended to the war +# +# [*zip_suffix*] +# (Optional) - The suffix (Maven qualifier) that might be appended to the zip +# +# [*jar_root*] +# (Optional) - The destination directory where the jar is copied. +# If set a jar file is searched in Maven +# +# [*jar_user*] +# (Optional) - The user to be used for deploy operations of the jar +# (owner of the files deployed in $jar_root) +# +# [*jar_suffix*] +# (Optional) - The suffix (Maven qualifier) that might be appended to the jar +# +# [*document_root*] +# (Optional) - The destination directory where the eventual tarball generated +# via Maven containing static files ("src tar") is unpacked +# +# [*document_suffix*] +# (Optional) - The suffix (Maven qualifier) that might be appended to the +# static files tarballs ("src tar") +# +# [*document_init_source*] +# (Optional) - The full URL to be used to retrieve, for the first time, the +# project files present in the source tarball. They are copied to the +# $document_root. Format should be in URI standard (http:// file:// ...) +# +# [*document_user*] +# (Optional) - The user to be used for deploy operations of the tarball +# (owner of the files in $document_root) +# +# [*config_root*] +# (Optional) - The destination directory where the cfg tar is unpacked +# +# [*config_suffix*] +# (Optional) - The suffix (Maven qualifier) that might be appended to +# configuration tarballs ("cfg tar") +# +# [*config_init_source*] +# (Optional) - The full URL to be used to retrieve, for the first time, the +# project files present in the cfg tar. They are copied to the $config_root. +# Format should be in URI standard (http:// file:// ssh:// svn://) +# +# [*config_user*] +# (Optional) - The user to be used for deploy operations of cfg tar +# (owner of the files in $config_root) +# +# [*predeploy_customcommand*] +# (Optional) - Full path with arguments of an eventual custom command to +# execute before the deploy. The command is executed as $predeploy_user. +# +# [*predeploy_user*] +# (Optional) - The user to be used to execute the $predeploy_customcommand. +# By default is the same of $user. +# +# [*predeploy_priority*] +# (Optional) - The priority (execution sequence number) that defines when, +# during the deploy procedure, the $predeploy_customcommand is executed +# Default: 39 (immediately before the copy of files on the deploy root). +# +# [*postdeploy_customcommand*] +# (Optional) - Full path with arguments of an eventual custom command to +# execute after the deploy. The command is executed as $postdeploy_user. +# +# [*postdeploy_user*] +# (Optional) - The user to be used to execute the $postdeploy_customcommand. +# By default is the same of $user. +# +# [*postdeploy_priority*] +# (Optional) - The priority (execution sequence number) that defines when, +# during the deploy procedure, the $postdeploy_customcommand is executed +# Default: 41 (immediately after the copy of files on the deploy root). +# +# [*init_script*] +# (Optional - Obsolete) - The name (ex: tomcat) of the init script of your +# Application server. If you define it, the AS is stopped and then started +# during deploy. This option is deprecated, you can use $disable_services +# for the same functionality +# +# [*disable_services*] +# (Optional) - The names (space separated) of the services you might want to +# stop during deploy. By default is blank. Example: "apache puppet monit". +# +# [*firewall_src_ip*] +# (Optional) - The IP address of a loadbalancer you might want to block out +# during a deploy. +# +# [*firewall_dst_port*] +# (Optional) - The local port to block from the loadbalancer during deploy +# (Default all). +# +# [*firewall_delay*] +# (Optional) - A delay time in seconds to wait after the block of +# $firewall_src_ip. Should be at least as long as the loadbalancer check +# interval for the services stopped during deploy (Default: 1). +# +# [*report_email*] +# (Optional) - The (space separated) email(s) to notify of deploy/rollback +# operations. If none is specified, no email is sent. +# +# [*backup_rsync_options*] +# (Optional) - The extra options to pass to rsync for backup operations. Use +# it, for example, to exclude directories that you don't want to archive. +# IE: "--exclude .snapshot --exclude cache --exclude www/cache". +# +# [*backup_retention*] +# (Optional) - Number of backup archives to keep. (Default 5). +# Lower the default value if your backups are too large and may fill up the +# filesystem. +# +# [*run_checks*] +# (Optional) - If you want to run local puppi checks before and after the +# deploy procedure. Default: "true". +# +# [*always_deploy*] +# (Optional) - If you always deploy what has been downloaded. Default="yes", +# if set to "no" a checksum is made between the files previously downloaded +# and the new files. If they are the same the deploy is not done. +# +# [*check_deploy*] +# (Optional) - Checks if the war is deployed (Default yes). Set to no if +# you deploy on Jboss or the deployed dir is different for the war filename +# +# [*auto_deploy*] +# (Optional) - If you want to automatically run this puppi deploy when +# Puppet runs. Default: 'false' +# +define puppi::project::y4maven ( + $source, + $http_user = '', + $http_password = '', + $artifact_type = 'release', + $deploy_root = '', + $user = 'root', + $war_suffix = 'suffixnotset', + $zip_suffix = 'suffixnotset', + $jar_root = '', + $jar_user = '', + $jar_suffix = 'suffixnotset', + $document_root = '', + $document_user = '', + $document_suffix = 'suffixnotset', + $document_init_source = '', + $config_root = '', + $config_user = '', + $config_suffix = 'suffixnotset', + $config_init_source = '', + $predeploy_customcommand = '', + $predeploy_user = '', + $predeploy_priority = '39', + $postdeploy_customcommand = '', + $postdeploy_user = '', + $postdeploy_priority = '41', + $init_script = '', + $disable_services = '', + $firewall_src_ip = '', + $firewall_dst_port = '0', + $firewall_delay = '1', + $report_email = '', + $backup_rsync_options = '--exclude .snapshot', + $backup_retention = '5', + $run_checks = true, + $always_deploy = true, + $check_deploy = true, + $auto_deploy = false, + $enable = true ) { + + require puppi + require puppi::params + + # Set default values + $predeploy_real_user = $predeploy_user ? { + '' => $user, + default => $predeploy_user, + } + + $postdeploy_real_user = $postdeploy_user ? { + '' => $user, + default => $postdeploy_user, + } + + $config_real_user = $config_user ? { + '' => $user, + default => $config_user, + } + + $document_real_user = $document_user ? { + '' => $user, + default => $document_user, + } + + $jar_real_user = $jar_user ? { + '' => $user, + default => $jar_user, + } + + $real_always_deploy = any2bool($always_deploy) ? { + false => 'no', + true => 'yes', + } + + $bool_run_checks = any2bool($run_checks) + $bool_check_deploy = any2bool($check_deploy) + $bool_auto_deploy = any2bool($auto_deploy) + + +### CREATE PROJECT + puppi::project { $name: + enable => $enable , + } + + +### INIT SEQUENCE + if ($document_init_source != '') { + puppi::initialize { "${name}-Deploy_Files": + priority => '40' , + command => 'get_file.sh' , + arguments => "-s ${document_init_source} -d ${deploy_root}" , + user => $document_real_user , + project => $name , + enable => $enable , + } + } + + if ($config_init_source != '') { + puppi::initialize { "${name}-Deploy_CFG_Files": + priority => '40' , + command => 'get_file.sh' , + arguments => "-s ${config_init_source} -d ${deploy_root}" , + user => $config_real_user , + project => $name , + enable => $enable , + } + } + +### DEPLOY SEQUENCE + if ($bool_run_checks == true) { + puppi::deploy { "${name}-Run_PRE-Checks": + priority => '10' , + command => 'check_project.sh' , + arguments => $name , + user => 'root' , + project => $name , + enable => $enable , + } + } + + # First: hybrisServer-Platform + $platform_metadata_arguments = $http_password ? { + '' => "-s ${source}/hybrisServer-Platform/maven-metadata.xml -t maven-metadata -a ${real_always_deploy}" , + default => "-s ${source}/hybrisServer-Platform/maven-metadata.xml -t maven-metadata -a ${real_always_deploy} -u ${http_user} -p ${http_password}" + } + + puppi::deploy { "${name}-Get_Maven_Metadata_hybrisServer-Platform_File": + priority => '20' , + command => 'get_file.sh' , + arguments => $platform_metadata_arguments, + user => 'root' , + project => $name , + enable => $enable , + } + + puppi::deploy { "${name}-Extract_Maven_Metadata_hybrisServer-Platform": + priority => '21' , + command => 'get_metadata.sh' , + arguments => "-m ${document_suffix} -mc ${config_suffix} -mj ${jar_suffix} -mw ${war_suffix} -mz ${zip_suffix} -at ${artifact_type}" , + user => 'root' , + project => $name , + enable => $enable , + } + + # Files retrieval + $platform_zipfile_arguments = $http_password ? { + '' => "${source}/hybrisServer-Platform zipfile", + default => "-u ${http_user} -p ${http_password} ${source}/hybrisServer-Platform zipfile", + } + + if ($deploy_root != '') { + puppi::deploy { "${name}-Get_Maven_Files_ZIP_hybrisServer-Platform": + priority => '22' , + command => 'get_maven_files.sh' , + arguments => $platform_zipfile_arguments, + user => 'root' , + project => $name , + enable => $enable , + } + } + + # Second: hybrisServer-AllExtensions + $extensions_metadata_arguments = $http_password ? { + '' => "-s ${source}/hybrisServer-AllExtensions/maven-metadata.xml -t maven-metadata -a ${real_always_deploy}", + default => "-s ${source}/hybrisServer-AllExtensions/maven-metadata.xml -t maven-metadata -a ${real_always_deploy} -u ${http_user} -p ${http_password}", + } + + puppi::deploy { "${name}-Get_Maven_Metadata_hybrisServer-AllExtensions_File": + priority => '23' , + command => 'get_file.sh' , + arguments => $extensions_metadata_arguments, + user => 'root' , + project => $name , + enable => $enable , + } + + puppi::deploy { "${name}-Extract_Maven_Metadata_hybrisServer-AllExtensions": + priority => '24' , + command => 'get_metadata.sh' , + arguments => "-m ${document_suffix} -mc ${config_suffix} -mj ${jar_suffix} -mw ${war_suffix} -mz ${zip_suffix} -at ${artifact_type}" , + user => 'root' , + project => $name , + enable => $enable , + } + + # Files retrieval + if ($deploy_root != '') { + $extensions_zipfile_arguments = $http_password ? { + '' => "${source}/hybrisServer-AllExtensions zipfile", + default => "-u ${http_user} -p ${http_password} ${source}/hybrisServer-AllExtensions zipfile", + } + + puppi::deploy { "${name}-Get_Maven_Files_ZIP_hybrisServer-AllExtensions": + priority => '25' , + command => 'get_maven_files.sh' , + arguments => $extensions_zipfile_arguments, + user => 'root' , + project => $name , + enable => $enable , + } + } + + + if ($config_root != '') { + # Third: config-tarball (optional, right now not supported) + $config_metadata_arguments = $http_password ? { + '' => "-s ${source}/config/maven-metadata.xml -t maven-metadata -a ${real_always_deploy}", + default => "-s ${source}/config/maven-metadata.xml -t maven-metadata -a ${real_always_deploy} -u ${http_user} -p ${http_password}" + } + + puppi::deploy { "${name}-Get_Maven_Metadata_config-tarball_File": + priority => '26' , + command => 'get_file.sh' , + arguments => $config_metadata_arguments, + user => 'root' , + project => $name , + enable => $enable , + } + + puppi::deploy { "${name}-Extract_Maven_Metadata_config-tarball": + priority => '27' , + command => 'get_metadata.sh' , + arguments => "-m ${document_suffix} -mc ${config_suffix} -mj ${jar_suffix} -mw ${war_suffix} -mz ${zip_suffix} -at ${artifact_type}" , + user => 'root' , + project => $name , + enable => $enable , + } + + puppi::deploy { "${name}-Get_Maven_Files_Config": + priority => '28' , + command => 'get_maven_files.sh' , + arguments => "${source} configfile" , + user => 'root' , + project => $name , + enable => $enable , + } + } + + if ($firewall_src_ip != '') { + puppi::deploy { "${name}-Load_Balancer_Block": + priority => '30' , + command => 'firewall.sh' , + arguments => "${firewall_src_ip} ${firewall_dst_port} on ${firewall_delay}" , + user => 'root', + project => $name , + enable => $enable , + } + } + + # Existing files backup + if ($deploy_root != '') { + puppi::deploy { "${name}-Backup_Existing_WAR": + priority => '30' , + command => 'archive.sh' , + arguments => "-b ${deploy_root} -t war -s move -m diff -o '${backup_rsync_options}' -n ${backup_retention}" , + user => 'root' , + project => $name , + enable => $enable , + } + } + + if ($jar_root != '') { + puppi::deploy { "${name}-Backup_Existing_JAR": + priority => '30' , + command => 'archive.sh' , + arguments => "-b ${jar_root} -t jar -s move -m diff -o '${backup_rsync_options}' -n ${backup_retention}" , + user => 'root' , + project => $name , + enable => $enable , + } + } + + if ($config_root != '') { + puppi::deploy { "${name}-Backup_Existing_ConfigDir": + priority => '30' , + command => 'archive.sh' , + arguments => "-b ${config_root} -t config -d predeploydir_configfile -o '${backup_rsync_options}' -n ${backup_retention}" , + user => 'root' , + project => $name , + enable => $enable , + } + } + + if ($document_root != '') { + puppi::deploy { "${name}-Backup_Existing_DocumentDir": + priority => '30' , + command => 'archive.sh' , + arguments => "-b ${document_root} -t docroot -d predeploydir_configfile -o '${backup_rsync_options}' -n ${backup_retention}" , + user => 'root' , + project => $name , + enable => $enable , + } + } + + if ($disable_services != '') { + puppi::deploy { "${name}-Disable_extra_services": + priority => '36' , + command => 'service.sh' , + arguments => "stop ${disable_services}" , + user => 'root', + project => $name , + enable => $enable , + } + } + + if ($init_script != '') { + puppi::deploy { "${name}-Service_stop": + priority => '38' , + command => 'service.sh' , + arguments => "stop ${init_script}" , + user => 'root', + project => $name , + enable => $enable , + } + } + + if ($predeploy_customcommand != '') { + puppi::deploy { "${name}-Run_Custom_PreDeploy_Script": + priority => $predeploy_priority , + command => 'execute.sh' , + arguments => $predeploy_customcommand , + user => $predeploy_real_user , + project => $name , + enable => $enable , + } + } + + # Deploys + if ($deploy_root != '') { + puppi::deploy { "${name}-Deploy_Maven_ZIP": + priority => '40' , + command => 'deploy.sh' , + arguments => "${deploy_root} predeploydir_zipfile ", + user => $user , + project => $name , + enable => $enable , + } + } + + if ($config_root != '') { + puppi::deploy { "${name}-Deploy_ConfigDir": + priority => '40' , + command => 'deploy.sh' , + arguments => "${config_root} predeploydir_configfile" , + user => $config_real_user , + project => $name , + enable => $enable , + } + } + + puppi::deploy { "${name}-yant": + priority => '42' , + command => 'yant.sh' , + arguments => "${deploy_root} clean all" , + user => $user , + project => $name , + enable => $enable , + } + + if ($postdeploy_customcommand != '') { + puppi::deploy { "${name}-Run_Custom_PostDeploy_Script": + priority => $postdeploy_priority , + command => 'execute.sh' , + arguments => $postdeploy_customcommand , + user => $postdeploy_real_user , + project => $name , + enable => $enable , + } + } + + if ($init_script != '') { + puppi::deploy { "${name}-Service_start": + priority => '44' , + command => 'service.sh' , + arguments => "start ${init_script}" , + user => 'root', + project => $name , + enable => $enable , + } + } + + if ($disable_services != '') { + puppi::deploy { "${name}-Enable_extra_services": + priority => '45' , + command => 'service.sh' , + arguments => "start ${disable_services}" , + user => 'root', + project => $name , + enable => $enable , + } + } + + if ($firewall_src_ip != '') { + puppi::deploy { "${name}-Load_Balancer_Unblock": + priority => '47' , + command => 'firewall.sh' , + arguments => "${firewall_src_ip} ${firewall_dst_port} off 0" , + user => 'root', + project => $name , + enable => $enable , + } + } + + if ($bool_run_checks == true) { + puppi::deploy { "${name}-Run_POST-Checks": + priority => '80' , + command => 'check_project.sh' , + arguments => $name , + user => 'root' , + project => $name , + enable => $enable , + } + } + + +### ROLLBACK PROCEDURE + + if ($firewall_src_ip != '') { + puppi::rollback { "${name}-Load_Balancer_Block": + priority => '25' , + command => 'firewall.sh' , + arguments => "${firewall_src_ip} ${firewall_dst_port} on ${firewall_delay}" , + user => 'root', + project => $name , + enable => $enable , + } + } + + if ($disable_services != '') { + puppi::rollback { "${name}-Disable_extra_services": + priority => '37' , + command => 'service.sh' , + arguments => "stop ${disable_services}" , + user => 'root', + project => $name , + enable => $enable , + } + } + + if ($init_script != '') { + puppi::rollback { "${name}-Service_stop": + priority => '38' , + command => 'service.sh' , + arguments => "stop ${init_script}" , + user => 'root', + project => $name , + enable => $enable , + } + } + + if ($predeploy_customcommand != '') { + puppi::rollback { "${name}-Run_Custom_PreDeploy_Script": + priority => $predeploy_priority , + command => 'execute.sh' , + arguments => $predeploy_customcommand , + user => $predeploy_real_user , + project => $name , + enable => $enable , + } + } + + if ($deploy_root != '') { + puppi::rollback { "${name}-Recover_ZIP": + priority => '40' , + command => 'archive.sh' , + arguments => "-r ${deploy_root} -t zip -o '${backup_rsync_options}'" , + user => $user , + project => $name , + enable => $enable , + } + } + + if ($config_root != '') { + puppi::rollback { "${name}-Recover_ConfigDir": + priority => '40' , + command => 'archive.sh' , + arguments => "-r ${config_root} -t config -o '${backup_rsync_options}'" , + user => $config_real_user , + project => $name , + enable => $enable , + } + } + + if ($postdeploy_customcommand != '') { + puppi::rollback { "${name}-Run_Custom_PostDeploy_Script": + priority => $postdeploy_priority , + command => 'execute.sh' , + arguments => $postdeploy_customcommand , + user => $postdeploy_real_user , + project => $name , + enable => $enable , + } + } + + if ($init_script != '') { + puppi::rollback { "${name}-Service_start": + priority => '42' , + command => 'service.sh' , + arguments => "start ${init_script}" , + user => 'root', + project => $name , + enable => $enable , + } + } + + if ($disable_services != '') { + puppi::rollback { "${name}-Enable_extra_services": + priority => '44' , + command => 'service.sh' , + arguments => "start ${disable_services}" , + user => 'root', + project => $name , + enable => $enable , + } + } + + if ($firewall_src_ip != '') { + puppi::rollback { "${name}-Load_Balancer_Unblock": + priority => '46' , + command => 'firewall.sh' , + arguments => "${firewall_src_ip} ${firewall_dst_port} off 0" , + user => 'root', + project => $name , + enable => $enable , + } + } + + if ($bool_run_checks == true) { + puppi::rollback { "${name}-Run_POST-Checks": + priority => '80' , + command => 'check_project.sh' , + arguments => $name , + user => 'root' , + project => $name , + enable => $enable , + } + } + + +### REPORTING + + if ($report_email != '') { + puppi::report { "${name}-Mail_Notification": + priority => '20' , + command => 'report_mail.sh' , + arguments => $report_email , + user => 'root', + project => $name , + enable => $enable , + } + } + +### AUTO DEPLOY DURING PUPPET RUN + if ($bool_auto_deploy == true) { + puppi::run { $name: } + } + +} diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/puppi/manifests/project/yum.pp b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/puppi/manifests/project/yum.pp new file mode 100644 index 00000000000..5379ebeea5c --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/puppi/manifests/project/yum.pp @@ -0,0 +1,347 @@ +# = Define puppi::project::yum +# +# This is a shortcut define to build a puppi project for the +# deploy of applications packaged as rpm and retrievable via yum +# +# It uses different "core" defines (puppi::project, puppi:deploy (many), +# puppi::rollback (many)) to build a full featured template project for +# automatic deployments. +# If you need to customize it, either change the template defined here or +# build up your own custom ones. +# +# == Variables: +# +# [*rpm*] +# The name of the rpm to install +# +# [*rpm_version*] +# (Optional) - The version to install (default: latest) +# +# [*install_root*] +# (Optional) - The rpm installation root (default: / ) +# +# [*predeploy_customcommand*] +# (Optional) - Full path with arguments of an eventual custom command to +# execute before the deploy. The command is executed as $predeploy_user. +# +# [*predeploy_user*] +# (Optional) - The user to be used to execute the $predeploy_customcommand. +# By default is the same of $user. +# +# [*predeploy_priority*] +# (Optional) - The priority (execution sequence number) that defines when, +# during the deploy procedure, the $predeploy_customcommand is executed +# Default: 39 (immediately before the copy of files on the deploy root). +# +# [*postdeploy_customcommand*] +# (Optional) - Full path with arguments of an eventual custom command to +# execute after the deploy. The command is executed as $postdeploy_user. +# +# [*postdeploy_user*] +# (Optional) - The user to be used to execute the $postdeploy_customcommand. +# By default is the same of $user. +# +# [*postdeploy_priority*] +# (Optional) - The priority (execution sequence number) that defines when, +# during the deploy procedure, the $postdeploy_customcommand is executed +# Default: 41 (immediately after the copy of files on the deploy root). +# +# [*disable_services*] +# (Optional) - The names (space separated) of the services you might want to +# stop during deploy. By default is blank. Example: "apache puppet monit". +# +# [*firewall_src_ip*] +# (Optional) - The IP address of a loadbalancer you might want to block out +# during a deploy. +# +# [*firewall_dst_port*] +# (Optional) - The local port to block from the loadbalancer during deploy +# (Default all). +# +# [*firewall_delay*] +# (Optional) - A delay time in seconds to wait after the block of +# $firewall_src_ip. Should be at least as long as the loadbalancer check +# interval for the services stopped during deploy (Default: 1). +# +# [*report_email*] +# (Optional) - The (space separated) email(s) to notify of deploy/rollback +# operations. If none is specified, no email is sent. +# +# [*run_checks*] +# (Optional) - If you want to run local puppi checks before and after the +# deploy procedure. Default: "true". +# +# [*checks_required*] +# (Optional) - Set to "true" if you want to block the installation if +# preliminary checks fail. Default: "false" +# +# [*always_deploy*] +# (Optional) - If you always deploy what has been downloaded. Default="yes", +# if set to "no" a checksum is made between the files previously downloaded +# and the new files. If they are the same the deploy is not done. +# +# [*auto_deploy*] +# (Optional) - If you want to automatically run this puppi deploy when +# Puppet runs. Default: 'false' +# +define puppi::project::yum ( + $rpm, + $rpm_version = 'latest', + $install_root = '/', + $predeploy_customcommand = '', + $predeploy_user = '', + $predeploy_priority = '39', + $postdeploy_customcommand = '', + $postdeploy_user = '', + $postdeploy_priority = '41', + $disable_services = '', + $firewall_src_ip = '', + $firewall_dst_port = '0', + $firewall_delay = '1', + $report_email = '', + $run_checks = true, + $checks_required = false, + $always_deploy = true, + $auto_deploy = false, + $enable = true ) { + + require puppi + require puppi::params + + # Set default values + $predeploy_real_user = $predeploy_user ? { + '' => 'root', + default => $predeploy_user, + } + + $postdeploy_real_user = $postdeploy_user ? { + '' => 'root', + default => $postdeploy_user, + } + + $real_always_deploy = any2bool($always_deploy) ? { + true => 'yes', + default => 'no', + } + + $real_checks_required = any2bool($checks_required) ? { + true => 'yes', + default => 'no', + } + + $bool_run_checks = any2bool($run_checks) + $bool_auto_deploy = any2bool($auto_deploy) + +### CREATE PROJECT + puppi::project { $name: + enable => $enable , + } + +### DEPLOY SEQUENCE + if ($bool_run_checks == true) { + puppi::deploy { "${name}-Run_PRE-Checks": + priority => '10' , + command => 'check_project.sh' , + arguments => "${name} ${real_checks_required}", + user => 'root' , + project => $name , + enable => $enable , + } + } + + if ($firewall_src_ip != '') { + puppi::deploy { "${name}-Load_Balancer_Block": + priority => '25' , + command => 'firewall.sh' , + arguments => "${firewall_src_ip} ${firewall_dst_port} on ${firewall_delay}" , + user => 'root', + project => $name , + enable => $enable , + } + } + + if ($disable_services != '') { + puppi::deploy { "${name}-Disable_extra_services": + priority => '36' , + command => 'service.sh' , + arguments => "stop ${disable_services}" , + user => 'root', + project => $name , + enable => $enable , + } + } + + if ($predeploy_customcommand != '') { + puppi::deploy { "${name}-Run_Custom_PreDeploy_Script": + priority => $predeploy_priority , + command => 'execute.sh' , + arguments => $predeploy_customcommand , + user => $predeploy_real_user , + project => $name , + enable => $enable , + } + } + + # Here is done the deploy on $deploy_root + puppi::deploy { "${name}-Deploy": + priority => '40' , + command => 'yum.sh' , + arguments => "-a deploy -n ${rpm} -r ${install_root} -v ${rpm_version}" , + user => root , + project => $name , + enable => $enable , + } + + if ($postdeploy_customcommand != '') { + puppi::deploy { "${name}-Run_Custom_PostDeploy_Script": + priority => $postdeploy_priority , + command => 'execute.sh' , + arguments => $postdeploy_customcommand , + user => $postdeploy_real_user , + project => $name , + enable => $enable , + } + } + + if ($disable_services != '') { + puppi::deploy { "${name}-Enable_extra_services": + priority => '44' , + command => 'service.sh' , + arguments => "start ${disable_services}" , + user => 'root', + project => $name , + enable => $enable , + } + } + + if ($firewall_src_ip != '') { + puppi::deploy { "${name}-Load_Balancer_Unblock": + priority => '46' , + command => 'firewall.sh' , + arguments => "${firewall_src_ip} ${firewall_dst_port} off 0" , + user => 'root', + project => $name , + enable => $enable , + } + } + + if ($bool_run_checks == true) { + puppi::deploy { "${name}-Run_POST-Checks": + priority => '80' , + command => 'check_project.sh' , + arguments => $name , + user => 'root' , + project => $name , + enable => $enable , + } + } + + +### ROLLBACK PROCEDURE + + if ($firewall_src_ip != '') { + puppi::rollback { "${name}-Load_Balancer_Block": + priority => '25' , + command => 'firewall.sh' , + arguments => "${firewall_src_ip} ${firewall_dst_port} on ${firewall_delay}" , + user => 'root', + project => $name , + enable => $enable , + } + } + + if ($disable_services != '') { + puppi::rollback { "${name}-Disable_extra_services": + priority => '37' , + command => 'service.sh' , + arguments => "stop ${disable_services}" , + user => 'root', + project => $name , + enable => $enable , + } + } + + if ($predeploy_customcommand != '') { + puppi::rollback { "${name}-Run_Custom_PreDeploy_Script": + priority => $predeploy_priority , + command => 'execute.sh' , + arguments => $predeploy_customcommand , + user => $predeploy_real_user , + project => $name , + enable => $enable , + } + } + + puppi::rollback { "${name}-Rollback": + priority => '40' , + command => 'yum.sh' , + arguments => "-a rollback -n ${rpm} -r ${install_root} -v ${rpm_version}" , + user => 'root' , + project => $name , + enable => $enable , + } + + if ($postdeploy_customcommand != '') { + puppi::rollback { "${name}-Run_Custom_PostDeploy_Script": + priority => $postdeploy_priority , + command => 'execute.sh' , + arguments => $postdeploy_customcommand , + user => $postdeploy_real_user , + project => $name , + enable => $enable , + } + } + + if ($disable_services != '') { + puppi::rollback { "${name}-Enable_extra_services": + priority => '44' , + command => 'service.sh' , + arguments => "start ${disable_services}" , + user => 'root', + project => $name , + enable => $enable , + } + } + + if ($firewall_src_ip != '') { + puppi::rollback { "${name}-Load_Balancer_Unblock": + priority => '46' , + command => 'firewall.sh' , + arguments => "${firewall_src_ip} ${firewall_dst_port} off 0" , + user => 'root', + project => $name , + enable => $enable , + } + } + + if ($bool_run_checks == true) { + puppi::rollback { "${name}-Run_POST-Checks": + priority => '80' , + command => 'check_project.sh' , + arguments => $name , + user => 'root' , + project => $name , + enable => $enable , + } + } + + +### REPORTING + + if ($report_email != '') { + puppi::report { "${name}-Mail_Notification": + priority => '20' , + command => 'report_mail.sh' , + arguments => $report_email , + user => 'root', + project => $name , + enable => $enable , + } + } + +### AUTO DEPLOY DURING PUPPET RUN + if ($bool_auto_deploy == true) { + puppi::run { $name: } + } + +} diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/puppi/manifests/report.pp b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/puppi/manifests/report.pp new file mode 100644 index 00000000000..4f8651e93ff --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/puppi/manifests/report.pp @@ -0,0 +1,38 @@ +# Define puppi::report +# +# This define creates a file with a report command that can be used locally. +# +# Usage: +# puppi::report { "Retrieve files": +# command => "report_mail.sh", +# argument => "roots@example42.com", +# priority => "10", +# user => "root", +# project => "spysite", +# } +# +define puppi::report ( + $project, + $command, + $arguments = '', + $priority = '50', + $user = 'root', + $enable = true ) { + + require puppi::params + + # Autoinclude the puppi class + include puppi + + $ensure = bool2ensure($enable) + + file { "${puppi::params::projectsdir}/${project}/report/${priority}-${name}": + ensure => $ensure, + mode => '0755', + owner => $puppi::params::configfile_owner, + group => $puppi::params::configfile_group, + content => "su - ${user} -c \"export project=${project} && ${puppi::params::scriptsdir}/${command} ${arguments}\"\n", + tag => 'puppi_report', + } + +} diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/puppi/manifests/rollback.pp b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/puppi/manifests/rollback.pp new file mode 100644 index 00000000000..b09692df632 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/puppi/manifests/rollback.pp @@ -0,0 +1,36 @@ +# Define puppi::rollback +# +# This define creates a file with a rollback command that can be used locally. +# +# Usage: +# puppi::rollback { "Retrieve files": +# command => "get_file.sh", +# argument => "/remote/dir/file", +# priority => "10", +# user => "root", +# project => "spysite", +# } +# +define puppi::rollback ( + $project, + $command, + $arguments = '', + $priority = '50', + $user = 'root', + $enable = true ) { + + require puppi + require puppi::params + + $ensure = bool2ensure($enable) + + file { "${puppi::params::projectsdir}/${project}/rollback/${priority}-${name}": + ensure => $ensure, + mode => '0750', + owner => $puppi::params::configfile_owner, + group => $puppi::params::configfile_group, + content => "su - ${user} -c \"export project=${project} && ${puppi::params::scriptsdir}/${command} ${arguments}\"\n", + tag => 'puppi_rollback', + } + +} diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/puppi/manifests/run.pp b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/puppi/manifests/run.pp new file mode 100644 index 00000000000..01556d663fe --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/puppi/manifests/run.pp @@ -0,0 +1,31 @@ +# Define puppi::run +# +# This define triggers a puppi deploy run directly during Puppet +# execution. It can be used to automate FIRST TIME applications +# deployments directly during the first Puppet execution +# +# == Variables +# +# [*name*] +# The title/name you use has to be the name of an existing puppi::project +# procedure define +# +# == Usage +# Basic Usage: +# puppi::run { "myapp": } +# +define puppi::run ( + $project = '', + $timeout = 300) { + + require puppi + + exec { "Run_Puppi_${name}": + command => "puppi deploy ${name}; [ $? -le \"1\" ] && touch ${puppi::params::archivedir}/puppirun_${name}", + path => '/bin:/sbin:/usr/sbin:/usr/bin', + creates => "${puppi::params::archivedir}/puppirun_${name}", + timeout => $timeout, + # require => File[ tag == 'puppi_deploy' ], + } + +} diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/puppi/manifests/runscript.pp b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/puppi/manifests/runscript.pp new file mode 100644 index 00000000000..01aa36c20e2 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/puppi/manifests/runscript.pp @@ -0,0 +1,154 @@ +# = Define: puppi::runscript +# +# This define creates, executes and optionally crontabs a +# simple whose content is directly managed by arguments. +# The script content is provided either with $source or $content arguments. +# It's placed in: +# $destination_path , if provided, or in /usr/local/sbin/${name} +# +# Cron execution times are defined by the $cron argument (Default empty). +# Automatic execution of the script via Puppet is managed by the $autorun +# parameter (default: true). +# Conditional execution of the script at subsequent puppet runs is +# defined by the $refreshonly, $creates, $unless $onlyif parameters +# that map the omonimous exec type arguments. +# +# == Parameters: +# +# [*source*] +# String. Optional. Default: undef. Alternative to content. +# Source of the script file to provide for execuution. +# Sample: source => 'puppet:///modules/site/scripts/my_script', +# +# [*content*] +# String. Optional. Default: undef. Alternative to source. +# Content of the script file to provide for execuution. +# This parameter is alternative to source. +# Sample: content => 'template(site/scripts/my_script.erb'), +# +# [*destination_path*] +# String. Optional. Default: '' +# Path of the provided script. If not provided the script in saved in +# /usr/local/sbin/${name} +# +# [*parameters*] +# String. Optional. Default: '' +# Optional parameters to pass to the script when executing it. +# +# [*autorun*] +# Boolean. Default: true. +# Define if to automatically execute the script when Puppet runs. +# +# [*refreshonly*] +# Boolen. Optional. Default: true +# Defines the logic of execution of the script when Puppet runs. +# Maps to the omonymous Exec type argument. +# +# [*creates*] +# String. Optional. Default: undef +# Defines the logic of execution of the script when Puppet runs. +# Maps to the omonymous Exec type argument. +# +# [*onlyif*] +# String. Optional. Default: undef +# Defines the logic of execution of the script when Puppet runs. +# Maps to the omonymous Exec type argument. +# +# [*unless*] +# String. Optional. Default: undef +# Defines the logic of execution of the script when Puppet runs. +# Maps to the omonymous Exec type argument. +# +# [*basedir*] +# String. Optional. Default: /usr/local/sbin +# Directory where the runscript scripts are created when destination_path +# is empty. +# +# [*cron*] +# String. Optional. Default: '' +# Optional cron schedule to crontab the execution of the +# script. Format must be in standard cron style. +# Example: '0 4 * * *' . +# By default no cron is scheduled. +# +# [*cron_user*] +# String. Optional. Default: 'root' +# When cron is enabled the user that executes the cron job. +# +# [*owner*] +# Owner of the created script. Default: root. +# +# [*group*] +# Group of the created script. Default: root. +# +# [*mode*] +# Mode of the created script. Default: '7550'. +# NOTE: Keep the execution flag! +# +# [*ensure*] +# Define if the runscript script and eventual cron job +# must be present or absent. Default: present. +# +# == Examples +# +# - Minimal setup +# puppi::runscript { 'my_script': +# source => 'puppet:///modules/site/scripts/my_script.sh', +# destination_path => '/usr/local/bin/my_script.sh', +# } +# +define puppi::runscript ( + $source = undef, + $content = undef, + $destination_path = '', + $parameters = '', + $autorun = true, + $refreshonly = true, + $creates = undef, + $onlyif = undef, + $unless = undef, + $basedir = '/usr/local/sbin', + $cron = '', + $cron_user = 'root', + $owner = 'root', + $group = 'root', + $mode = '0755', + $ensure = 'present' ) { + + $real_command = $destination_path ? { + '' => "${basedir}/${name}", + default => $destination_path, + } + + file { "runscript_${name}": + ensure => $ensure, + path => $real_command, + mode => $mode, + owner => $owner, + group => $group, + content => $content, + source => $source, + } + + if $autorun == true { + exec { "runscript_${name}": + command => $real_command, + refreshonly => $refreshonly, + creates => $creates, + onlyif => $onlyif, + unless => $unless, + subscribe => File["runscript_${name}"], + } + } + + if $cron != '' { + file { "runscript_cron_${name}": + ensure => $ensure, + path => "/etc/cron.d/runscript_${name}", + mode => '0644', + owner => 'root', + group => 'root', + content => "${cron} ${cron_user} ${real_command} ${parameters}\n", + } + } +} diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/puppi/manifests/skel.pp b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/puppi/manifests/skel.pp new file mode 100644 index 00000000000..6be5cc94ffa --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/puppi/manifests/skel.pp @@ -0,0 +1,184 @@ +# +# Class puppi::skel +# +# Creates the base Puppi dirs +# +class puppi::skel { + + require puppi::params + + file { 'puppi_basedir': + ensure => directory, + path => $puppi::params::basedir, + mode => '0755', + owner => $puppi::params::configfile_owner, + group => $puppi::params::configfile_group, + } + + file { 'puppi_checksdir': + ensure => directory, + path => $puppi::params::checksdir, + mode => '0755', + owner => $puppi::params::configfile_owner, + group => $puppi::params::configfile_group, + require => File['puppi_basedir'], + recurse => true, + purge => true, + force => true, + } + + file { 'puppi_logsdir': + ensure => directory, + path => $puppi::params::logsdir, + mode => '0755', + owner => $puppi::params::configfile_owner, + group => $puppi::params::configfile_group, + require => File['puppi_basedir'], + recurse => true, + purge => true, + force => true, + } + + file { 'puppi_helpersdir': + ensure => directory, + path => $puppi::params::helpersdir, + mode => '0755', + owner => $puppi::params::configfile_owner, + group => $puppi::params::configfile_group, + require => File['puppi_basedir'], + } + + file { 'puppi_infodir': + ensure => directory, + path => $puppi::params::infodir, + mode => '0755', + owner => $puppi::params::configfile_owner, + group => $puppi::params::configfile_group, + require => File['puppi_basedir'], + recurse => true, + purge => true, + force => true, + } + + file { 'puppi_tododir': + ensure => directory, + path => $puppi::params::tododir, + mode => '0755', + owner => $puppi::params::configfile_owner, + group => $puppi::params::configfile_group, + require => File['puppi_basedir'], + recurse => true, + purge => true, + force => true, + } + + file { 'puppi_projectsdir': + ensure => directory, + path => $puppi::params::projectsdir, + mode => '0755', + owner => $puppi::params::configfile_owner, + group => $puppi::params::configfile_group, + require => File['puppi_basedir'], + recurse => true, + purge => true, + force => true, + } + + file { 'puppi_datadir': + ensure => directory, + path => $puppi::params::datadir, + mode => '0750', + owner => $puppi::params::configfile_owner, + group => $puppi::params::configfile_group, + require => File['puppi_basedir'], + recurse => true, + purge => true, + force => true, + } + + file { 'puppi_workdir': + ensure => directory, + path => $puppi::params::workdir, + mode => '0755', + owner => $puppi::params::configfile_owner, + group => $puppi::params::configfile_group, + require => File['puppi_basedir'], + } + + file { 'puppi_archivedir': + ensure => directory, + path => $puppi::params::archivedir, + mode => '0755', + owner => $puppi::params::configfile_owner, + group => $puppi::params::configfile_group, + require => File['puppi_libdir'], + } + + file { 'puppi_readmedir': + ensure => directory, + path => $puppi::params::readmedir, + mode => '0755', + owner => $puppi::params::configfile_owner, + group => $puppi::params::configfile_group, + require => File['puppi_libdir'], + } + + file { 'puppi_libdir': + ensure => directory, + path => $puppi::params::libdir, + mode => '0755', + owner => $puppi::params::configfile_owner, + group => $puppi::params::configfile_group, + require => File['puppi_basedir'], + } + + file { 'puppi_logdir': + ensure => directory, + path => $puppi::params::logdir, + mode => '0755', + owner => $puppi::params::configfile_owner, + group => $puppi::params::configfile_group, + require => File['puppi_basedir'], + } + + # MailPuppiCheck script + file { '/usr/bin/mailpuppicheck': + ensure => 'present', + mode => '0750', + owner => $puppi::params::configfile_owner, + group => $puppi::params::configfile_group, + source => 'puppet:///modules/puppi/mailpuppicheck', + } + + # Puppi common scripts + file { 'puppi.scripts': + ensure => present, + path => "${puppi::params::scriptsdir}/", + mode => '0755', + owner => $puppi::params::configfile_owner, + group => $puppi::params::configfile_group, + source => 'puppet:///modules/puppi/scripts/', + recurse => true, +# purge => true, + ignore => '.svn', + } + + # Logs cleanup script + if $::kernel == 'Linux' { + if $puppi::logs_retention_days + and $puppi::logs_retention_days != '0' { + $purge_cron_ensure = 'present' + } else { + $purge_cron_ensure = 'absent' + } + + file { 'puppi_cron_logs_purge': + ensure => $purge_cron_ensure, + path => '/etc/cron.daily/puppi_clean', + mode => '0755', + owner => 'root', + group => 'root', + content => template('puppi/puppi_clean.erb'), + } + } +} diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/puppi/manifests/todo.pp b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/puppi/manifests/todo.pp new file mode 100644 index 00000000000..6fff3805b78 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/puppi/manifests/todo.pp @@ -0,0 +1,57 @@ +# Define puppi::todo +# +# This define creates a basic todo file that simply contains informations +# on how to complete tasks that for time or other reasons could not be +# entirely automated by Puppet. +# The basic idea is to have a quick way to document and check if are completed +# some specific operations that are required to bring a new, puppettized system +# to full operative status. +# This can be useful for cases hard to automate with Puppet: +# - First setup and import of a database needed by an application (module) +# - Installation of a legacy application that involves user interaction +# - Run of any kind of setup/configuration/init command that can't be automated +# It can also be used as a quick reminder on things done by hand and not +# Puppettized for lack of time or skill. +# +# Use the command puppi todo to show the todo present in your node. +# The exit status can be: +# 0 - OK - The task to do has been accomplished because the command specified +# as check_command returns true (exit status 0) +# 1- WARNING - User hasn't specified a check_command to verify if the todo as +# been accomplished, so it can't be notified if the todo has been done +# 2- ERROR - The task to do has not been accomplished becuase the command +# specified as check_command returns an error (exit status different from 0) +# +# == Usage: +# puppi::todo { "cacti_db_install": +# description => "Manual cacti db installation" , +# } +# +define puppi::todo ( + $description = '', + $notes = '', + $check_command = '', + $run = '' ) { + + require puppi + require puppi::params + + $array_run = is_array($run) ? { + false => $run ? { + '' => [], + default => split($run, ','), + }, + default => $run, + } + + file { "${puppi::params::tododir}/${name}": + ensure => present, + mode => '0750', + owner => $puppi::params::configfile_owner, + group => $puppi::params::configfile_group, + require => Class['puppi'], + content => template('puppi/todo.erb'), + tag => 'puppi_todo', + } + +} diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/puppi/manifests/two.pp b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/puppi/manifests/two.pp new file mode 100644 index 00000000000..1bbe5fca4a8 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/puppi/manifests/two.pp @@ -0,0 +1,13 @@ +# Class: puppi::two +# +# Installs Puppi NextGen +# +class puppi::two { + + # The Puppi command + package { 'puppi': + ensure => present, + provider => 'gem', + } + +} diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/puppi/manifests/ze.pp b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/puppi/manifests/ze.pp new file mode 100644 index 00000000000..5f62e1d738c --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/puppi/manifests/ze.pp @@ -0,0 +1,35 @@ +# Define puppi::ze +# +# The Puppi 2.0 define that transforms any class variable in data +# you can use with Puppi +# +# == Usage +# Basic Usage: +# puppi::ze { "openssh": +# variables => get_class_args(), +# } +# +# puppi::ze { "openssh": +# variables => get_class_args(), +# filter => '.*content.*|.*key.*', +# } +# +define puppi::ze ( + $variables, + $helper = 'standard', + $filter = '.*content.*|.*password.*', + $ensure = 'present' ) { + + require puppi + require puppi::params + + file { "puppize_${name}": + ensure => $ensure, + path => "${puppi::params::datadir}/${helper}_${name}.yml", + mode => '0644', + owner => $puppi::params::configfile_owner, + group => $puppi::params::configfile_group, + content => inline_template("---\n<%= Hash[@variables].reject{ |k,v| k.to_s =~ /(${filter})/ }.keys.sort.map{|k| Array({k => @variables[k]}.to_yaml)[1..-1].join}.join(\"\n\") %>\n"), + } + +} diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/puppi/spec/classes/puppi_spec.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/puppi/spec/classes/puppi_spec.rb new file mode 100644 index 00000000000..f6c072f9f2b --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/puppi/spec/classes/puppi_spec.rb @@ -0,0 +1,17 @@ +require "#{File.join(File.dirname(__FILE__),'..','spec_helper.rb')}" + +describe 'puppi' do + + let(:node) { 'rspec.example42.com' } + let(:node) { 'rspec.example42.com' } + let(:facts) { { :ipaddress => '10.42.42.42' } } + + describe 'Test standard installation' do + it { should contain_file('puppi').with_ensure('present') } + it { should contain_file('puppi.conf').with_ensure('present') } + it { should contain_file('puppi.scripts').with_ensure('present') } + it { should contain_file('puppi_basedir').with_ensure('directory') } + it { should contain_file('puppi_datadir').with_ensure('directory') } + end + +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/puppi/spec/defines/puppi_check_spec.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/puppi/spec/defines/puppi_check_spec.rb new file mode 100644 index 00000000000..ba050bb79eb --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/puppi/spec/defines/puppi_check_spec.rb @@ -0,0 +1,26 @@ +require "#{File.join(File.dirname(__FILE__),'..','spec_helper.rb')}" + +describe 'puppi::check' do + + let(:title) { 'puppi::check' } + let(:node) { 'rspec.example42.com' } + let(:facts) { { :arch => 'i386' } } + let(:params) { + { 'enable' => 'true', + 'name' => 'get', + 'command' => 'echo', + 'priority' => '50', + 'project' => 'myapp', + } + } + + describe 'Test puppi check step file creation' do + it 'should create a puppi::check step file' do + should contain_file('Puppi_check_myapp_50_get').with_ensure('present') + end + it 'should populate correctly the puppi::check step file' do + should contain_file('Puppi_check_myapp_50_get').with_content(/\/usr\/lib\/nagios\/plugins\/echo/) + end + end + +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/puppi/spec/defines/puppi_deploy_spec.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/puppi/spec/defines/puppi_deploy_spec.rb new file mode 100644 index 00000000000..a1969bae76f --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/puppi/spec/defines/puppi_deploy_spec.rb @@ -0,0 +1,25 @@ +require "#{File.join(File.dirname(__FILE__),'..','spec_helper.rb')}" + +describe 'puppi::deploy' do + + let(:title) { 'puppi::deploy' } + let(:node) { 'rspec.example42.com' } + let(:params) { + { 'enable' => 'true', + 'name' => 'get', + 'command' => 'echo', + 'priority' => '50', + 'project' => 'myapp', + } + } + + describe 'Test puppi deploy step file creation' do + it 'should create a puppi::deploy step file' do + should contain_file('/etc/puppi/projects/myapp/deploy/50-get').with_ensure('present') + end + it 'should populate correctly the puppi::deploy step file' do + should contain_file('/etc/puppi/projects/myapp/deploy/50-get').with_content("su - root -c \"export project=myapp && /etc/puppi/scripts/echo \"\n") + end + end + +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/puppi/spec/defines/puppi_helper_spec.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/puppi/spec/defines/puppi_helper_spec.rb new file mode 100644 index 00000000000..8e5ae9bcc6b --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/puppi/spec/defines/puppi_helper_spec.rb @@ -0,0 +1,20 @@ +require "#{File.join(File.dirname(__FILE__),'..','spec_helper.rb')}" + +describe 'puppi::helper' do + + let(:title) { 'spec' } + let(:node) { 'rspec.example42.com' } + let(:params) { + { 'template' => 'puppi/helpers/standard.yml.erb' } + } + + describe 'Test puppi helper file creation' do + it 'should create a puppi helper file' do + should contain_file('puppi_helper_spec').with_ensure('present') + end + it 'should populate correctly the helper file' do + should contain_file('puppi_helper_spec').with_content(/info/) + end + end + +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/puppi/spec/defines/puppi_info_spec.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/puppi/spec/defines/puppi_info_spec.rb new file mode 100644 index 00000000000..7dcc99fe939 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/puppi/spec/defines/puppi_info_spec.rb @@ -0,0 +1,24 @@ +require "#{File.join(File.dirname(__FILE__),'..','spec_helper.rb')}" + +describe 'puppi::info' do + + let(:title) { 'puppi::info' } + let(:node) { 'rspec.example42.com' } + let(:params) { + { 'name' => 'sample', + 'description' => 'Sample Info', + 'templatefile' => 'puppi/info.erb', + 'run' => 'myownscript', + } + } + + describe 'Test puppi info step file creation' do + it 'should create a puppi::info step file' do + should contain_file('/etc/puppi/info/sample').with_ensure('present') + end + it 'should populate correctly the puppi::info step file' do + should contain_file('/etc/puppi/info/sample').with_content(/myownscript/) + end + end + +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/puppi/spec/defines/puppi_initialize_spec.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/puppi/spec/defines/puppi_initialize_spec.rb new file mode 100644 index 00000000000..158a6005724 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/puppi/spec/defines/puppi_initialize_spec.rb @@ -0,0 +1,25 @@ +require "#{File.join(File.dirname(__FILE__),'..','spec_helper.rb')}" + +describe 'puppi::initialize' do + + let(:title) { 'puppi::initialize' } + let(:node) { 'rspec.example42.com' } + let(:params) { + { 'enable' => 'true', + 'name' => 'get', + 'command' => 'echo', + 'priority' => '50', + 'project' => 'myapp', + } + } + + describe 'Test puppi initialize step file creation' do + it 'should create a puppi::initialize step file' do + should contain_file('/etc/puppi/projects/myapp/initialize/50-get').with_ensure('present') + end + it 'should populate correctly the puppi::initialize step file' do + should contain_file('/etc/puppi/projects/myapp/initialize/50-get').with_content("su - root -c \"export project=myapp && /etc/puppi/scripts/echo \"\n") + end + end + +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/puppi/spec/defines/puppi_log_spec.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/puppi/spec/defines/puppi_log_spec.rb new file mode 100644 index 00000000000..7fd8e9119bb --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/puppi/spec/defines/puppi_log_spec.rb @@ -0,0 +1,22 @@ +require "#{File.join(File.dirname(__FILE__),'..','spec_helper.rb')}" + +describe 'puppi::log' do + + let(:title) { 'mylog' } + let(:node) { 'rspec.example42.com' } + let(:params) { + { 'log' => '/var/log/mylog.log', + 'description' => 'My Log', + } + } + + describe 'Test puppi log file creation' do + it 'should create a puppi::log file' do + should contain_file('/etc/puppi/logs/mylog').with_ensure('present') + end + it 'should populate correctly the puppi::log step file' do + should contain_file('/etc/puppi/logs/mylog').with_content(/mylog.log/) + end + end + +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/puppi/spec/defines/puppi_project_spec.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/puppi/spec/defines/puppi_project_spec.rb new file mode 100644 index 00000000000..fbbf8ba7094 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/puppi/spec/defines/puppi_project_spec.rb @@ -0,0 +1,25 @@ +require "#{File.join(File.dirname(__FILE__),'..','spec_helper.rb')}" + +describe 'puppi::report' do + + let(:title) { 'puppi::report' } + let(:node) { 'rspec.example42.com' } + let(:params) { + { 'enable' => 'true', + 'name' => 'get', + 'command' => 'echo', + 'priority' => '50', + 'project' => 'myapp', + } + } + + describe 'Test puppi report step file creation' do + it 'should create a puppi::report step file' do + should contain_file('/etc/puppi/projects/myapp/report/50-get').with_ensure('present') + end + it 'should populate correctly the puppi::report step file' do + should contain_file('/etc/puppi/projects/myapp/report/50-get').with_content("su - root -c \"export project=myapp && /etc/puppi/scripts/echo \"\n") + end + end + +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/puppi/spec/defines/puppi_report_spec.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/puppi/spec/defines/puppi_report_spec.rb new file mode 100644 index 00000000000..fbbf8ba7094 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/puppi/spec/defines/puppi_report_spec.rb @@ -0,0 +1,25 @@ +require "#{File.join(File.dirname(__FILE__),'..','spec_helper.rb')}" + +describe 'puppi::report' do + + let(:title) { 'puppi::report' } + let(:node) { 'rspec.example42.com' } + let(:params) { + { 'enable' => 'true', + 'name' => 'get', + 'command' => 'echo', + 'priority' => '50', + 'project' => 'myapp', + } + } + + describe 'Test puppi report step file creation' do + it 'should create a puppi::report step file' do + should contain_file('/etc/puppi/projects/myapp/report/50-get').with_ensure('present') + end + it 'should populate correctly the puppi::report step file' do + should contain_file('/etc/puppi/projects/myapp/report/50-get').with_content("su - root -c \"export project=myapp && /etc/puppi/scripts/echo \"\n") + end + end + +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/puppi/spec/defines/puppi_rollback_spec.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/puppi/spec/defines/puppi_rollback_spec.rb new file mode 100644 index 00000000000..2d4cbe5b51c --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/puppi/spec/defines/puppi_rollback_spec.rb @@ -0,0 +1,25 @@ +require "#{File.join(File.dirname(__FILE__),'..','spec_helper.rb')}" + +describe 'puppi::rollback' do + + let(:title) { 'puppi::rollback' } + let(:node) { 'rspec.example42.com' } + let(:params) { + { 'enable' => 'true', + 'name' => 'get', + 'command' => 'echo', + 'priority' => '50', + 'project' => 'myapp', + } + } + + describe 'Test puppi rollback step file creation' do + it 'should create a puppi::rollback step file' do + should contain_file('/etc/puppi/projects/myapp/rollback/50-get').with_ensure('present') + end + it 'should populate correctly the puppi::rollback step file' do + should contain_file('/etc/puppi/projects/myapp/rollback/50-get').with_content("su - root -c \"export project=myapp && /etc/puppi/scripts/echo \"\n") + end + end + +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/puppi/spec/defines/puppi_run_spec.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/puppi/spec/defines/puppi_run_spec.rb new file mode 100644 index 00000000000..692711c5837 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/puppi/spec/defines/puppi_run_spec.rb @@ -0,0 +1,17 @@ +require "#{File.join(File.dirname(__FILE__),'..','spec_helper.rb')}" + +describe 'puppi::run' do + + let(:title) { 'myapp' } + let(:node) { 'rspec.example42.com' } + let(:params) { + { + 'project' => 'myapp', + } + } + + describe 'Test puppi run exe creation' do + it { should contain_exec('Run_Puppi_myapp').with_command(/puppi deploy myapp/) } + end + +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/puppi/spec/defines/puppi_todo_spec.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/puppi/spec/defines/puppi_todo_spec.rb new file mode 100644 index 00000000000..483852202d5 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/puppi/spec/defines/puppi_todo_spec.rb @@ -0,0 +1,24 @@ +require "#{File.join(File.dirname(__FILE__),'..','spec_helper.rb')}" + +describe 'puppi::todo' do + + let(:title) { 'mytodo' } + let(:node) { 'rspec.example42.com' } + let(:params) { + { 'notes' => 'Test Notes', + 'description' => 'Test Description', + 'check_command' => 'check_test', + 'run' => 'test', + } + } + + describe 'Test puppi todo file creation' do + it 'should create a puppi::todo file' do + should contain_file('/etc/puppi/todo/mytodo').with_ensure('present') + end + it 'should populate correctly the puppi::todo step file' do + should contain_file('/etc/puppi/todo/mytodo').with_content(/check_test/) + end + end + +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/puppi/spec/defines/puppi_ze_spec.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/puppi/spec/defines/puppi_ze_spec.rb new file mode 100644 index 00000000000..17913686913 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/puppi/spec/defines/puppi_ze_spec.rb @@ -0,0 +1,20 @@ +require "#{File.join(File.dirname(__FILE__),'..','spec_helper.rb')}" + +describe 'puppi::ze' do + + let(:title) { 'sample' } + let(:node) { 'rspec.example42.com' } + let(:params) { + { 'helper' => 'mytest', + 'variables' => { 'var1' => 'get', 'var2' => 'got' }, + 'name' => 'sample', + } + } + + describe 'Test puppi ze data file creation' do + it 'should create a puppi::ze step file' do + should contain_file('puppize_sample').with_ensure('present') + end + end + +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/puppi/spec/functions/any2bool_spec.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/puppi/spec/functions/any2bool_spec.rb new file mode 100644 index 00000000000..bc9a5ee9459 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/puppi/spec/functions/any2bool_spec.rb @@ -0,0 +1,20 @@ +require "#{File.join(File.dirname(__FILE__),'..','spec_helper.rb')}" + +describe 'any2bool' do + + describe 'Test Any2True' do + it { should run.with_params(true).and_return(true) } + it { should run.with_params('true').and_return(true) } + it { should run.with_params('yes').and_return(true) } + it { should run.with_params('y').and_return(true) } + end + + describe 'Test Any2false' do + it { should run.with_params(false).and_return(false) } + it { should run.with_params('false').and_return(false) } + it { should run.with_params('no').and_return(false) } + it { should run.with_params('n').and_return(false) } + end + + +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/puppi/spec/functions/bool2ensure_spec.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/puppi/spec/functions/bool2ensure_spec.rb new file mode 100644 index 00000000000..967d36c3b55 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/puppi/spec/functions/bool2ensure_spec.rb @@ -0,0 +1,20 @@ +require "#{File.join(File.dirname(__FILE__),'..','spec_helper.rb')}" + +describe 'bool2ensure' do + + describe 'Test true2present' do + it { should run.with_params(true).and_return('present') } + it { should run.with_params('true').and_return('present') } + it { should run.with_params('yes').and_return('present') } + it { should run.with_params('y').and_return('present') } + end + + describe 'Test false2absent' do + it { should run.with_params(false).and_return('absent') } + it { should run.with_params('false').and_return('absent') } + it { should run.with_params('no').and_return('absent') } + it { should run.with_params('n').and_return('absent') } + end + + +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/puppi/spec/functions/url_parse_spec.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/puppi/spec/functions/url_parse_spec.rb new file mode 100644 index 00000000000..3388e9ae9c0 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/puppi/spec/functions/url_parse_spec.rb @@ -0,0 +1,43 @@ +require "#{File.join(File.dirname(__FILE__),'..','spec_helper.rb')}" + +describe 'url_parse' do + + describe 'Test Url Components parsing' do + it 'should return correct scheme' do + should run.with_params('ftp://www.example.com/test','scheme').and_return('ftp') + end + it 'should return correct userinfo' do + should run.with_params('https://my_user:my_pass@www.example.com:8080/path/to/file.php?id=1&ret=0','userinfo').and_return('my_user:my_pass') + end + it 'should return correct user' do + should run.with_params('https://my_user:my_pass@www.example.com:8080/path/to/file.php?id=1&ret=0','user').and_return('my_user') + end + it 'should return correct password' do + should run.with_params('https://my_user:my_pass@www.example.com:8080/path/to/file.php?id=1&ret=0','password').and_return('my_pass') + end + it 'should return correct host' do + should run.with_params('https://my_user:my_pass@www.example.com:8080/path/to/file.php?id=1&ret=0','host').and_return('www.example.com') + end + it 'should return correct port' do + should run.with_params('https://my_user:my_pass@www.example.com:8080/path/to/file.php?id=1&ret=0','port').and_return(8080) + end + it 'should return correct path' do + should run.with_params('https://my_user:my_pass@www.example.com:8080/path/to/file.php?id=1&ret=0','path').and_return('/path/to/file.php') + end + it 'should return correct query' do + should run.with_params('https://my_user:my_pass@www.example.com:8080/path/to/file.php?id=1&ret=0','query').and_return('id=1&ret=0') + end + it 'should return correct filename' do + should run.with_params('https://my_user:my_pass@www.example.com:8080/path/to/file.php?id=1&ret=0','filename').and_return('file.php') + end + it 'should return correct filetype' do + should run.with_params('https://my_user:my_pass@www.example.com:8080/path/to/file.php?id=1&ret=0','filetype').and_return('.php') + end + it 'should return correct filedir' do + should run.with_params('https://my_user:my_pass@www.example.com:8080/path/to/file.php?id=1&ret=0','filedir').and_return('file') + end + + end + +end + diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/puppi/spec/spec_helper.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/puppi/spec/spec_helper.rb new file mode 100644 index 00000000000..2c6f56649ae --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/puppi/spec/spec_helper.rb @@ -0,0 +1 @@ +require 'puppetlabs_spec_helper/module_spec_helper' diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/puppi/templates/helpers/standard.yml.erb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/puppi/templates/helpers/standard.yml.erb new file mode 100644 index 00000000000..5b090700a19 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/puppi/templates/helpers/standard.yml.erb @@ -0,0 +1,49 @@ +--- +:info: + - + :command: "<%= scope.lookupvar('puppi::params::info_package_query') %> %{package}" + :description: "Package info" + - + :command: "<%= scope.lookupvar('puppi::params::info_package_list') %> %{package} | egrep '(/bin|^/etc|/sbin|log$)'" + :description: "Interesting files from package" + - + :command: "head %{config_file}" + :description: "Main configuration file" + - + :command: "ls -latr %{config_dir}" + :description: "Configuration directory" + - + :command: "ls -latr %{data_dir}" + :description: "Data directory" + - + :command: "ls -latr %{log_dir}" + :description: "Logs directory" + - + :command: "tail %{log_file}" + :description: "Latest log entries" + - + :command: "service %{service status}" + :description: "Service status" + - + :command: "ps -adef | grep %{process} | grep -v grep | head -20" + :description: "Running process" + - + :command: "netstat -natup | grep %{port} | head -20" + :description: "Network connections" + +:check: + - + :command: "service %{service} status" + :description: "Service status" + - + :command: "check_tcp %{port}" + :description: "Check listening port" + - + :command: "check_procs c 1: -C %{process}" + :description: "Check process" + +:log: + - + :command: "tail -f %{log_file}" + :description: "Tailing logs" + diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/puppi/templates/info.erb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/puppi/templates/info.erb new file mode 100644 index 00000000000..f866f7a56b0 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/puppi/templates/info.erb @@ -0,0 +1,11 @@ +#!/bin/bash +# <%= @description %> +# Script generated by Puppet. It's executed when you run: +# puppi info <%= @name %> +# +# Sources common header for Puppi scripts +. <%= scope.lookupvar('puppi::params::scriptsdir') %>/header || exit 10 + +echo_title "$HOSTNAME - <%= @description %>" +<% @array_run.each do |cmd| %>show_command "<%= cmd %>" +<% end %> diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/puppi/templates/info/instance.erb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/puppi/templates/info/instance.erb new file mode 100644 index 00000000000..d74f7e601c3 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/puppi/templates/info/instance.erb @@ -0,0 +1,89 @@ +#!/bin/bash +# <%= @description %> +# Script generated by Puppet. It's executed when you run: +# puppi info <%= @name %> +# +# Sources common header for Puppi scripts +. <%= scope.lookupvar('puppi::params::scriptsdir') %>/header || exit 10 + +<% if @configdir != "" -%> +# Show config info +echo_title "$HOSTNAME - <%= @name %>: Configurations directory: <%= @configdir %>" +show_command "ls -latr <%= @configdir %>" +<% end -%> + +<% if @datadir != "" -%> +# Show data dir +echo_title "$HOSTNAME - <%= @name %>: Application data are in: <% datadir.each do |item| %><%= item %><% end %>" +<% @datadir.each do |item| -%> +show_command "ls -latr <%= item %>" +<% end -%> +<% end -%> + +<% if @bindir != "" -%> +# Show bin dir +echo_title "$HOSTNAME - <%= @name %>: Startup scripts are in: <% bindir.each do |item| %><%= item %><% end %>" +<% @bindir.each do |item| -%> +show_command "ls -latr <%= item %>" +<% end -%> +<% end -%> + +<% if @logdir != "" -%> +# Show log dir +echo_title "$HOSTNAME - <%= @name %>: Logs are in: <% logdir.each do |item| %><%= item %><% end %>" +<% @logdir.each do |item| -%> +show_command "ls -latr <%= item %>" +show_command "tail -30 <%= item %>/catalina.out" +<% end -%> +<% end -%> + +<% if @run != "" -%> +echo_title "$HOSTNAME - <%= @name %>: Extra info" +<% @run.each do |cmd| %>show_command "<%= cmd %>" +<% end -%> +<% end -%> + + +<% if @servicename != "" -%> +# Show service info +echo_title "$HOSTNAME - <%= @name %>: Services: <% @servicename.each do |item| %><%= item %><% end %>" +<% @servicename.each do |item| -%> +show_command "/etc/init.d/<%= item %> status" +<% end -%> +<% if @verbose == "yes" -%> +show_command "ps -adef | grep java | grep <%= @processname %>" +<% else -%> +show_command "ps -adef | grep java | grep <%= @processname %> | head -20" +<% end -%> +<% end -%> + +<% if @httpport != "" -%> +# Show port info +echo_title "$HOSTNAME - <%= @name %>: httpport - <%= @httpport %>" +<% if @verbose == "yes" -%> +show_command "netstat -natup | grep ':<%= @httpport %> '" +<% else -%> +show_command "netstat -natup | grep ':<%= @httpport %> ' | head -20" +<% end -%> +<% end -%> + +<% if @controlport != "" -%> +# Show port info +echo_title "$HOSTNAME - <%= @name %>: controlport - <%= @controlport %>" +<% if @verbose == "yes" -%> +show_command "netstat -natup | grep ':<%= @controlport %> '" +<% else -%> +show_command "netstat -natup | grep ':<%= @controlport %> ' | head -20" +<% end -%> +<% end -%> + +<% if @ajpport != "" -%> +# Show port info +echo_title "$HOSTNAME - <%= @name %>: ajpport - <%= @ajpport %>" +<% if @verbose == "yes" -%> +show_command "netstat -natup | grep ':<%= @ajpport %> '" +<% else -%> +show_command "netstat -natup | grep ':<%= @ajpport %> ' | head -20" +<% end -%> +<% end -%> + diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/puppi/templates/info/module.erb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/puppi/templates/info/module.erb new file mode 100644 index 00000000000..aa53d25cce1 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/puppi/templates/info/module.erb @@ -0,0 +1,89 @@ +#!/bin/bash +# <%= @description %> +# Script generated by Puppet. It's executed when you run: +# puppi info <%= @name %> +# +# Sources common header for Puppi scripts +. <%= scope.lookupvar('puppi::params::scriptsdir') %>/header || exit 10 + +<% if @packagename != "" -%> +# Show packages info +echo_title "$HOSTNAME - <%= @name %>: Packages Installed: <% @packagename.each do |item| %><%= item %><% end %>" +<% @packagename.each do |item| -%> +show_command "<%= scope.lookupvar('puppi::params::info_package_query') %> <%= item %>" +<% if @verbose == "yes" -%> +show_command "<%= scope.lookupvar('puppi::params::info_package_list') %> <%= item %>" +<% else -%> +show_command "<%= scope.lookupvar('puppi::params::info_package_list') %> <%= item %> | egrep '(/bin|^/etc|/sbin|log$)'" +<% end -%> +<% end -%> +<% end -%> + +<% if @configfile != "" -%> +# Show config info +echo_title "$HOSTNAME - <%= @name %>: Configuration Files managed: <% @configfile.each do |item| %><%= item %><% end %>" +<% @configfile.each do |item| -%> +<% if @verbose == "yes" -%> +show_command "cat <%= item %>" +<% else -%> +show_command "head <%= item %>" +<% end -%> +<% end -%> +<% end -%> + +<% if @datadir != "" -%> +# Show data dir +echo_title "$HOSTNAME - <%= @name %>: Application data are in: <% @datadir.each do |item| %><%= item %><% end %>" +<% @datadir.each do |item| -%> +show_command "ls -latr <%= item %>" +show_command "df <%= item %>" +<% end -%> +<% end -%> + +<% if @logdir != "" -%> +# Show log dir +echo_title "$HOSTNAME - <%= @name %>: Logs are in: <% @logdir.each do |item| %><%= item %><% end %>" +<% @logdir.each do |item| -%> +show_command "ls -latr <%= item %>" +show_command "df <%= item %>" +<% end -%> +<% end -%> + +<% if @logfile != "" -%> +# Show logs +echo_title "$HOSTNAME - <%= @name %>: Last log entries: <% @logfile.each do |item| %><%= item %><% end %>" +<% @logfile.each do |item| -%> +<% if @verbose == "yes" -%> +show_command "tail -30 <%= item %>" +<% else -%> +show_command "tail -10 <%= item %>" +<% end -%> +<% end -%> +<% end -%> + +<% if @run != "" -%> +echo_title "$HOSTNAME - <%= @name %>: Extra info" +<% @run.each do |cmd| %>show_command "<%= cmd %>" +<% end -%> +<% end -%> + + +<% if @servicename != "" -%> +# Show service info +echo_title "$HOSTNAME - <%= @name %>: Services: <% @servicename.each do |item| %><%= item %><% end %>" +<% @servicename.each do |item| -%> +show_command "/etc/init.d/<%= item %> status" +<% end -%> +<% if @verbose == "yes" -%> +show_command "ps -adef | grep <%= @processname %> | grep -v grep" +<% else -%> +show_command "ps -adef | grep <%= @processname %> | grep -v grep | head -20" +<% end -%> +<% @port.each do |mport| -%> +<% if @verbose == "yes" -%> +show_command "netstat -natup | grep ':<%= mport %> '" +<% else -%> +show_command "netstat -natup | grep ':<%= mport %> ' | head -20" +<% end -%> +<% end -%> +<% end -%> diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/puppi/templates/info/puppet.erb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/puppi/templates/info/puppet.erb new file mode 100644 index 00000000000..8f377ca12cf --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/puppi/templates/info/puppet.erb @@ -0,0 +1,30 @@ +#!/bin/bash +# <%= @description %> +# Script generated by Puppet. It's executed when you run: +# puppi info <%= @name %> +# +# Sources common header for Puppi scripts +. <%= scope.lookupvar('puppi::params::scriptsdir') %>/header || exit 10 + +# Show Puppet info +echo_title "$HOSTNAME - <%= @name %>: Information on management with Puppet" +echo "Where to configure this node in Puppet:" +echo "manifests/nodes/<%= @site %>.pp - Node's definition" +echo "manifests/roles/role_<%= @role %>.pp - Role's definition" +echo "modules//manifests/init.pp - Main class for each module" +echo + +# Show ReadMe file +echo_title "$HOSTNAME - <%= @name %>: ReadMe" +show_command "cat <%= scope.lookupvar('puppi::params::readmedir') %>/<%= @name %>" + +<% if @autoreadme == "yes" %> +echo_title "$HOSTNAME - <%= @name %>: ReadMe Custom" +show_command "cat <%= scope.lookupvar('puppi::params::readmedir') %>/<%= @name %>-custom" +<% end %> + +<% if @run != "" %> +echo_title "$HOSTNAME - <%= @name %>: Extra info" +<% @run.each do |cmd| %>show_command "<%= cmd %>" +<% end %> +<% end %> diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/puppi/templates/info/readme.erb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/puppi/templates/info/readme.erb new file mode 100644 index 00000000000..4e4b1357b59 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/puppi/templates/info/readme.erb @@ -0,0 +1,22 @@ +#!/bin/bash +# <%= @description %> +# Script generated by Puppet. It's executed when you run: +# puppi info <%= @name %> +# +# Sources common header for Puppi scripts +. <%= scope.lookupvar('puppi::params::scriptsdir') %>/header || exit 10 + +# Show ReadMe file +echo_title "$HOSTNAME - <%= @name %>: ReadMe" +show_command "cat <%= scope.lookupvar('puppi::params::readmedir') %>/<%= @name %>" + +<% if @autoreadme == "yes" %> +echo_title "$HOSTNAME - <%= @name %>: ReadMe Custom" +show_command "cat <%= scope.lookupvar('puppi::params::readmedir') %>/<%= @name %>-custom" +<% end %> + +<% if @run != "" %> +echo_title "$HOSTNAME - <%= @name %>: Extra info" +<% @run.each do |cmd| %>show_command "<%= cmd %>" +<% end %> +<% end %> diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/puppi/templates/install_packages.erb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/puppi/templates/install_packages.erb new file mode 100644 index 00000000000..906d15e8a5e --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/puppi/templates/install_packages.erb @@ -0,0 +1,8 @@ +#!/bin/bash +# File Managed by Puppet +export PATH=$PATH:/bin:/sbin:/usr/bin:usr/sbin +<% if scope.lookupvar('::operatingsystem') == 'Debian' or scope.lookupvar('::operatingsystem') == 'Ubuntu' -%> +apt-get update ; apt-get install -y <%= @packages %> +<% elsif scope.lookupvar('::operatingsystem') == 'Centos' or scope.lookupvar('::operatingsystem') == 'RedHat' -%> +yum install -y <%= @packages %> +<% end -%> diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/puppi/templates/log.erb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/puppi/templates/log.erb new file mode 100644 index 00000000000..5ca47bbf510 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/puppi/templates/log.erb @@ -0,0 +1,2 @@ +<% @array_log.each do |path| %><%= path %> +<% end %> diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/puppi/templates/project/config.erb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/puppi/templates/project/config.erb new file mode 100644 index 00000000000..4e8a952bdf3 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/puppi/templates/project/config.erb @@ -0,0 +1,33 @@ +# File Managed by Puppet +# This is the base configuration file for project <%= scope.lookupvar('name') %> +# During a puppi deploy it's copied into the runtime configuration +# used by the scripts executed by puppi +# +# Do not edit this file. You can modify these variables: +# Permanently: directly on your puppi manifests (When you use the puppi:project:: defines) +# Temporarily: using the puppi option -o to override them. +# example: puppi deploy $name -o "source=http://alt.com/file deploy_root=/var/tmp" + +# Common variables for project defines +project="<%= @name %>" +source="<%= @source %>" +deploy_root="<%= @deploy_root %>" +user="<%= @user %>" +predeploy_customcommand="<%= @predeploy_customcommand %>" +postdeploy_customcommand="<%= @postdeploy_customcommand %>" +init_script="<%= @init_script %>" +disable_services="<%= @disable_services %>" +firewall_src_ip="<%= @firewall_src_ip %>" +firewall_dst_port="<%= @firewall_dst_port %>" +report_email="<%= @report_email %>" +enable="<%= @enable %>" + +# Variables used by project::files +files_prefix="<%= @files_prefix %>" +source_baseurl="<%= @source_baseurl %>" + +# Variables used by project::maven +document_root="<%= @document_root %>" +config_root="<%= @config_root %>" + +# Variables added during runtime puppi operations diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/puppi/templates/puppi.conf.erb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/puppi/templates/puppi.conf.erb new file mode 100644 index 00000000000..b167c036e43 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/puppi/templates/puppi.conf.erb @@ -0,0 +1,15 @@ +# General configuration file for Puppi tools +# This file is managed by Puppet + +# Directory locations +basedir="<%= scope.lookupvar('puppi::params::basedir') %>" +checksdir="<%= scope.lookupvar('puppi::params::checksdir') %>" +workdir="<%= scope.lookupvar('puppi::params::workdir') %>" +projectsdir="<%= scope.lookupvar('puppi::params::projectsdir') %>" +scriptsdir="<%= scope.lookupvar('puppi::params::scriptsdir') %>" +libdir="<%= scope.lookupvar('puppi::params::libdir') %>" +archivedir="<%= scope.lookupvar('puppi::params::archivedir') %>" +logdir="<%= scope.lookupvar('puppi::params::logdir') %>" +logsdir="<%= scope.lookupvar('puppi::params::logsdir') %>" +infodir="<%= scope.lookupvar('puppi::params::infodir') %>" +tododir="<%= scope.lookupvar('puppi::params::tododir') %>" diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/puppi/templates/puppi.erb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/puppi/templates/puppi.erb new file mode 100644 index 00000000000..7248a2a1125 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/puppi/templates/puppi.erb @@ -0,0 +1,517 @@ +#!/bin/bash +configfile="<%= scope.lookupvar('puppi::params::basedir') %>/puppi.conf" + +# This is the actual command used to run the different scripts +# Use cat for debugging noop purposes +# runcommand="cat" +runcommand="" + +# Define defaults +verbosity="max" +show="yes" + +# Define action tag +export tag=$(date +%Y%m%d-%H%M%S) + +counter=0 + +# Load general configurations +if [ ! -f $configfile ] ; then + echo "Config file: $configfile not found" + exit 1 +else + . $configfile + . $scriptsdir/functions +fi + +# Main functions +check_host () { + for command in $(ls -1 $checksdir) ; do + title="$HOSTNAME check: $command" + code=$(cat "$checksdir/$command") + ask_interactive + output=$($runcommand "$checksdir/$command" 2>&1) + handle_result + done +} + +check () { + for command in $(ls -1 $projectsdir/$project/check) ; do + title="$HOSTNAME check: $command" + code=$(cat "$projectsdir/$project/check/$command") + ask_interactive + output=$($runcommand "$projectsdir/$project/check/$command" 2>&1) + handle_result + done + + check_host + # show_report +} + +log () { + tailcommand="tail" + which colortail >/dev/null 2>&1 && tailcommand="colortail" + + if [ "x$project" != "xdefault" ] ; then + if [ $logsdir/$project ] ; then + alllog="$alllog $(cat $logsdir/$project)" + else + echo "WARNING: $logsdir/$project does not exist!" + exit 1 + fi + else + if [ "$interactive" = "yes" ] ; then + echo "Choose one or more log topics to show. Select the last number (done) to end selection" + PS3="Type one number to add a log topic to the show list." + all_choices="" + select choice in $( ls $logsdir ) done + do + echo "You selected $choice [$REPLY]" + [[ $choice == "done" ]] && break + all_choices="$all_choices $choice" + echo "Your choices: $all_choices" + done + for log in $all_choices ; do + alllog="$alllog $(cat $logsdir/$log)" + done + else + for log in $(ls $logsdir) ; do + alllog="$alllog $(cat $logsdir/$log)" + done + fi + fi + + # So, show something + if [ ! -z "$counts" ] ; then + if [ ! -z "$greppattern" ] ; then + $tailcommand -n $counts $alllog | grep $greppattern + else + $tailcommand -n $counts $alllog + fi + else + if [ ! -z "$greppattern" ] ; then + $tailcommand -f $alllog | grep $greppattern + else + $tailcommand -f $alllog + fi + fi +} + +info () { + if [ "x$project" != "xdefault" ] ; then + if [ $infodir/$project ] ; then + $infodir/$project + else + echo "WARNING: $infodir/$project does not exist!" + exit 1 + fi + else + if [ "$interactive" = "yes" ] ; then + echo "Choose one or more topics to show. Select the last number (done) to end selection" + PS3="Type one number to add an info topic to the show list." + all_choices="" + select choice in $( ls $infodir ) done + do + echo "You selected $choice [$REPLY]" + [[ $choice == "done" ]] && break + all_choices="$all_choices $choice" + echo "Your choices: $all_choices" + done + for info in $all_choices ; do + if [ ! -z "$greppattern" ] ; then + $infodir/$info | grep $greppattern + else + $infodir/$info + fi + done + else + for info in $(ls $infodir) ; do + if [ ! -z "$greppattern" ] ; then + $infodir/$info | grep $greppattern + else + $infodir/$info + fi + done + fi + fi +} + + +todo () { + for todo in $(ls $tododir) ; do + $tododir/$todo + done +} + + +rollback () { + if [ ! -z $rollbackversion ] ; then + save_runtime_config "rollbackversion=$rollbackversion" || initerr=1 + else + echo "Choose deploy to rollback:" + ls -1 $archivedir/$project + read rollbackversion + save_runtime_config "rollbackversion=$rollbackversion" || initerr=1 + fi + + for command in $(ls -1 $projectsdir/$project/rollback) ; do + title="$HOSTNAME Rollback: $command" + code=$(cat "$projectsdir/$project/rollback/$command") + ask_interactive + output=$($runcommand "$projectsdir/$project/rollback/$command" 2>&1) + handle_result + done + + send_reports + show_report + [ "$result" = "OK" ] && exit 0 +} + +deploy () { + for command in $(ls -1 $projectsdir/$project/deploy) ; do + title="$HOSTNAME Deploy: $command" + code=$(cat "$projectsdir/$project/deploy/$command") + ask_interactive + output=$($runcommand "$projectsdir/$project/deploy/$command" 2>&1) + handle_result + [ "$EXITCRIT" = "1" ] && [ "$force" != "yes" ] && break + if [ "$DONTDEPLOY" = "1" ] ; then + echo "No need to deploy: source file has not changed" + echo "Type 'rm $archivedir/$project/md5sum' and run puppi again to force deployment" + exit 0 + fi + done + + send_reports + show_report + [ "$result" = "OK" ] && exit 0 +} + +initialize () { + for command in $(ls -1 $projectsdir/$project/initialize) ; do + title="$HOSTNAME Init: $command" + code=$(cat "$projectsdir/$project/initialize/$command") + ask_interactive + output=$($runcommand "$projectsdir/$project/initialize/$command" 2>&1) + handle_result + [ "$EXITCRIT" = "1" ] && [ "$force" != "yes" ] && break + done + + send_reports + show_report + [ "$result" = "OK" ] && exit 0 +} + +configure () { + for command in $(ls -1 $projectsdir/$project/configure) ; do + title="$HOSTNAME Init: $command" + code=$(cat "$projectsdir/$project/configure/$command") + ask_interactive + output=$($runcommand "$projectsdir/$project/configure/$command" 2>&1) + handle_result + [ "$EXITCRIT" = "1" ] && [ "$force" != "yes" ] && break + done + + send_reports + show_report + [ "$result" = "OK" ] && exit 0 +} + +save_summary () { + tagend=$(date +%Y%m%d-%H%M%S) + + result="OK" + if [ "$EXITWARN" = "1" ] ; then + result="WARNING" + fi + if [ "$EXITCRIT" = "1" ] ; then + result="ERROR" + fi + + echo "Report for $action on $project" > $logdir/$project/$tag/summary + echo "Job start: $tag" >> $logdir/$project/$tag/summary + echo "Job end: $tagend" >> $logdir/$project/$tag/summary + echo "Job result: $result" >> $logdir/$project/$tag/summary + echo "Actions executed:" >> $logdir/$project/$tag/summary + cd $logdir/$project/$tag/ + for message in $(ls -1 $logdir/$project/$tag/ | grep -v summary ) ; do + msg_title=$(head -1 $message) + msg_code=$(head -2 $message | tail -1) + msg_result=$(head -3 $message | tail -1) + echo "[$msg_result] $msg_title : $msg_code" >> $logdir/$project/$tag/summary + done + + # Copy runtime config in archive + cp $workdir/$project/config $logdir/$project/$tag/ + + # Write runtime config on Summary + echo >> $logdir/$project/$tag/summary + echo "RUNTIME CONFIGURATION" >> $logdir/$project/$tag/summary + cat $workdir/$project/config | grep -vE "^#|^$" >> $logdir/$project/$tag/summary + +} + +send_reports () { + if [[ "x$report" == "xyes" ]] ; then + save_summary + for command in $(ls -1 $projectsdir/$project/report) ; do + title="Reporting: $command" + code=$(cat "$projectsdir/$project/report/$command") + echo -n $title + output=$($runcommand "$projectsdir/$project/report/$command" 2>&1) + # handle_result # This breaks the overall exit code when deploy fails + done + fi +} + +show_report () { + echo + echo "REPORT FOR PUPPI - STATUS $result" + echo "Summary of operations is: $logdir/$project/$tag/summary " + echo "Details are in: $logdir/$project/$tag/" + echo "Temporary workdir has been: $workdir/$project/ (Will be rewritten at the next puppi run)" + echo "Runtime config file is: $workdir/$project/config" + echo "Files have been archived in: $archivedir/$project/$tag" + test "$testmode" = "yes" && echo "This was a TEST RUN! Nothing has been done for real." +} + + +create_runtime_conf () { + if [[ ( ! -e $projectsdir/$project ) && ( ! -e $infodir/$project ) && ( ! -e $logsdir/$project ) ]] ; then + showhelp + exit 1 + fi + + initerr=0 + + # When project is unset we set it to default + [ ! -z "$project" ] || export project="default" + + # Clean up and Create runtime configuration file +# command="00-$project-RuntimeConfig-Initialization" +# title="Puppi setup: $command" +# code="rm -rf $workdir/$project && touch $workdir/$project/config [...]" +# echo -n $title + + echo $workdir | grep tmp >/dev/null 2>&1 || ( echo "Workdir must contain string tmp" ; exit 1 ) + rm -rf $workdir/$project || initerr=1 + + mkdir -p $workdir/$project || initerr=1 + touch $workdir/$project/config || initerr=1 + + test -r "$projectsdir/$project/config" && cp $projectsdir/$project/config $workdir/$project/ + chmod 644 $workdir/$project/config || initerr=1 + + save_runtime_config "project=$project" || initerr=1 + save_runtime_config "tag=$tag" || initerr=1 + save_runtime_config "action=$action" || initerr=1 + + storedir=$workdir/$project/store || initerr=1 + mkdir -p $storedir || initerr=1 + save_runtime_config "storedir=$storedir" || initerr=1 + + predeploydir=$workdir/$project/deploy || initerr=1 + mkdir -p $predeploydir || initerr=1 + save_runtime_config "predeploydir=$predeploydir" || initerr=1 + + save_runtime_config "force=$force" || initerr=1 + save_runtime_config "testmode=$testmode" || initerr=1 + save_runtime_config "interactive=$interactive" || initerr=1 + save_runtime_config "debug=$debug" || initerr=1 + save_runtime_config "report=$report" || initerr=1 + save_runtime_config "show=$show" || initerr=1 + save_runtime_config "counts=$counts" || initerr=1 + save_runtime_config "greppattern=$greppattern" || initerr=1 + + for oopt in $(echo $options) ; do + save_runtime_config "$(echo $oopt)" || initerr=1 + done + + echo $initerr | grep "0" 2>&1 > /dev/null +# handle_result +} + + +showhelp () { + echo "Usage: puppi [project|topic] [options]" + echo " " + echo "Available commands:" + echo "check [project] [-s ] - Run puppi checks host or project wide" + echo "log [topic] [-i] [-g ] - Show system and application specific logs" + echo "info [topic] [-i] [-g ] - Show informations about the system" + echo "todo - Show todo's checklist of the system" + echo "init [-i] [-f] [-t] - First time project initialization and setup" + echo "configure [-i] [-f] [-t] - Project configuration deployment." + echo "deploy [-i] [-f] [-t] [-o ...] - Deploy the specified project" + echo "rollback [state] [-i] [-f] [-t] - Rollback the specified project. " + echo " " + echo "Available options:" + echo "-f - Force puppi commands execution flow also on CRITICAL errors" + echo "-i - Interactively ask confirmation for every step" + echo "-t - Test mode. Just show the commands that should be executed" + echo "-d - Debug mode. Show debug of what is done." + echo "-r - Enable reporting: yes/no/only on failures. Default depends on action" + echo "-s - Show output: yes/no/only for failures. Default: yes" + echo "-g - Grep command output with the selected pattern" + echo "-o \"parameter=value parameter2=value2\" - Set manual options to override defaults" + echo " " + echo "Available deploy projects:" + ls -1 $projectsdir + echo + echo "Available info topics:" + ls $infodir + echo + echo "Available log topics:" + ls $logsdir +} + +# Check Input +if [ "$#" = "0" ] ; then + showhelp + exit +fi + +while [ $# -gt 0 ]; do + case "$1" in + deploy|init|configure) + report="yes" + export action=$1 + if [ -n "$2" ] ; then + echo "$2" | egrep -q "^-.$" + if [ "$?" != "0" ] ; then + export project=$(shell_filter_strict $2) + shift 2 + else + shift + fi + else + showhelp + exit + shift + fi + ;; + rollback) + report="yes" + export action=$1 + if [ -n "$3" ] ; then + echo "$3" | egrep -q "^-.$" + if [ "$?" != "0" ] ; then + export project=$(shell_filter_strict $2) + export rollbackversion=$(shell_filter_strict $3) + shift 3 + else + shift 2 + fi + elif [ -n "$2" ] ; then + echo "$2" | egrep -q "^-.$" + if [ "$?" != "0" ] ; then + export project=$(shell_filter_strict $2) + shift 2 + else + shift + fi + else + showhelp + exit + shift + fi + ;; + check) + report="no" + export action="checkhost" + if [ -n "$2" ] ; then + echo "$2" | egrep -q "^-.$" + if [ "$?" != "0" ] ; then + export project=$(shell_filter_strict $2) + export action="check" + shift 2 + else + shift + fi + else + shift + fi + ;; + log) + report="no" + export action="log" + if [ -n "$2" ] ; then + echo "$2" | egrep -q "^-.$" + if [ "$?" != "0" ] ; then + export project=$(shell_filter_strict $2) + shift 2 + else + shift + fi + else + shift + fi + ;; + info) + report="no" + export action="info" + if [ -n "$2" ] ; then + echo "$2" | egrep -q "^-.$" + if [ "$?" != "0" ] ; then + export project=$(shell_filter_strict $2) + shift 2 + else + shift + fi + else + shift + fi + ;; + todo) + report="no" + export action="todo" + shift ;; + -i) + interactive="yes" + shift ;; + -f) + force="yes" + shift ;; + -t) + testmode="yes" + runcommand="cat" + shift ;; + -o) + options="$2" + shift 2;; + -d) + debug="$(shell_filter_strict $2)" + shift 2;; + -r) + report="$(shell_filter_strict $2)" + shift 2;; + -s) + show="$(shell_filter_strict $2)" + shift 2;; + -c) + counts="$(shell_filter_strict $2)" + shift 2;; + -g) + greppattern="$(shell_filter_strict $2)" + # greppattern="$(shell_filter $2)" # This allows partial regexp usage + # greppattern="$2" # This allows full regexp usage but is highly insecure if you sudo puppi + shift 2;; + *) + showhelp + exit + ;; + esac +done + +# Action! +case $action in + check) check ;; + checkhost) check_host ;; + log) create_runtime_conf ; log ;; + info) create_runtime_conf ; info ;; + todo) create_runtime_conf ; todo ;; + rollback) create_runtime_conf ; rollback ;; + deploy) create_runtime_conf ; deploy ;; + init) create_runtime_conf ; initialize ;; + configure) create_runtime_conf ; configure ;; +esac diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/puppi/templates/puppi_clean.erb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/puppi/templates/puppi_clean.erb new file mode 100644 index 00000000000..f6a0eaa0da7 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/puppi/templates/puppi_clean.erb @@ -0,0 +1,10 @@ +#!/bin/bash +# This scripts cleans puppi log files older than <%= scope.lookupvar('puppi::logs_retention_days') %> +seconds=$(( (RANDOM%60+1)*60 )) +sleep $seconds + +if [ "<%= scope.lookupvar('puppi::params::logdir') %>" == "/" ] || [ "x<%= scope.lookupvar('puppi::params::logdir') %>" == "x" ]; then + exit 1 +fi +find <%= scope.lookupvar('puppi::params::logdir') %> -type f -mtime +<%= scope.lookupvar('puppi::logs_retention_days') %> -exec rm '{}' '+' >/dev/null 2>&1 +find <%= scope.lookupvar('puppi::params::logdir') %> -type d -mtime +<%= scope.lookupvar('puppi::logs_retention_days') %> -exec rmdir '{}' '+' >/dev/null 2>&1 diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/puppi/templates/todo.erb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/puppi/templates/todo.erb new file mode 100644 index 00000000000..3eaf03fc341 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/puppi/templates/todo.erb @@ -0,0 +1,42 @@ +#!/bin/bash +# Script generated by Puppet. It's executed when you run: +# puppi todo <%= name %> +# +# Sources common header for Puppi scripts +. <%= scope.lookupvar('puppi::params::scriptsdir') %>/header || exit 10 + +echo_title "$HOSTNAME - <%= name %>" + +<% if @description != "" -%> +cat < +EOF +<% end -%> + +<% if @notes != "" -%> +cat < +EOF +<% end -%> + +<% if @run != "" -%> +<% array_run.each do |cmd| %>show_command "<%= cmd -%>" +<% end -%> +<% end -%> + +<% if @check_command != "" -%> +<%= @check_command %> +if [ "x$?" = "x0" ] ; then + echo_success + result="OK" +else + echo_failure + result="CRITICAL" + EXITCRIT="1" +fi +<% else -%> +echo_warning +result="WARNING" +EXITWARN="1" +<% end -%> + diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/rabbitmq/.fixtures.yml b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/rabbitmq/.fixtures.yml new file mode 100644 index 00000000000..1d111f97527 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/rabbitmq/.fixtures.yml @@ -0,0 +1,9 @@ +fixtures: + repositories: + "stdlib": "git://github.com/puppetlabs/puppetlabs-stdlib.git" + "apt": "git://github.com/puppetlabs/puppetlabs-apt.git" + "staging": "git://github.com/nanliu/puppet-staging.git" + erlang: + repo: "https://github.com/garethr/garethr-erlang.git" + symlinks: + "rabbitmq": "#{source_dir}" diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/rabbitmq/.nodeset.yml b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/rabbitmq/.nodeset.yml new file mode 100644 index 00000000000..cbd0d57b83d --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/rabbitmq/.nodeset.yml @@ -0,0 +1,35 @@ +--- +default_set: 'centos-64-x64' +sets: + 'centos-59-x64': + nodes: + "main.foo.vm": + prefab: 'centos-59-x64' + 'centos-64-x64': + nodes: + "main.foo.vm": + prefab: 'centos-64-x64' + 'fedora-18-x64': + nodes: + "main.foo.vm": + prefab: 'fedora-18-x64' + 'debian-607-x64': + nodes: + "main.foo.vm": + prefab: 'debian-607-x64' + 'debian-70rc1-x64': + nodes: + "main.foo.vm": + prefab: 'debian-70rc1-x64' + 'ubuntu-server-10044-x64': + nodes: + "main.foo.vm": + prefab: 'ubuntu-server-10044-x64' + 'ubuntu-server-12042-x64': + nodes: + "main.foo.vm": + prefab: 'ubuntu-server-12042-x64' + 'sles-11sp1-x64': + nodes: + "main.foo.vm": + prefab: 'sles-11sp1-x64' diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/rabbitmq/.travis.yml b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/rabbitmq/.travis.yml new file mode 100644 index 00000000000..9f68e1fe0d3 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/rabbitmq/.travis.yml @@ -0,0 +1,38 @@ +--- +branches: + only: + - master +language: ruby +bundler_args: --without development +script: bundle exec rake spec SPEC_OPTS='--format documentation' +after_success: + - git clone -q git://github.com/puppetlabs/ghpublisher.git .forge-releng + - .forge-releng/publish +rvm: + - 1.8.7 + - 1.9.3 + - 2.0.0 + - 2.1.1 +env: + matrix: + - PUPPET_GEM_VERSION="~> 2.7.0" FACTER_GEM_VERSION="~> 1.7.0" + - PUPPET_GEM_VERSION="~> 3.4.0" + - PUPPET_GEM_VERSION="~> 3.5.0" + global: + - PUBLISHER_LOGIN=puppetlabs + - secure: |- + mSHk+9ReN6wxJ9sOgySOSKEjaXOdtT9B1BtvsOGcm/FQI3p57meid3B6z37r\nNv9PbxwGb + mcZafMxNAfwr8nUb/bqxeXnZaGiY0E9pvg9aRr3g4knczn+siW+\nDkKlvM0rex2zzF0PDc + 495e61kP5cxcKNVdDJSiUPPK6fNGQ1xX8= +matrix: + exclude: + - rvm: 1.9.3 + env: PUPPET_GEM_VERSION="~> 2.7.0" FACTER_GEM_VERSION="~> 1.7.0" + - rvm: 2.0.0 + env: PUPPET_GEM_VERSION="~> 2.7.0" FACTER_GEM_VERSION="~> 1.7.0" + - rvm: 2.1.1 + env: PUPPET_GEM_VERSION="~> 2.7.0" FACTER_GEM_VERSION="~> 1.7.0" + - rvm: 2.1.1 + env: PUPPET_GEM_VERSION="~> 3.4.0" +notifications: + email: false diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/rabbitmq/CHANGELOG b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/rabbitmq/CHANGELOG new file mode 100644 index 00000000000..2a6e7d81acb --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/rabbitmq/CHANGELOG @@ -0,0 +1,115 @@ +2014-05-16 - Version 4.0.0 + +Summary: + +This release includes many new features and bug fixes. With the exception of +erlang management this should be backwards compatible with 3.1.0. + +Backwards-incompatible Changes: +- erlang_manage was removed. You will need to manage erlang separately. See +the README for more information on how to configure this. + +Features: +- Improved SSL support +- Add LDAP support +- Add ability to manage RabbitMQ repositories +- Add ability to manage Erlang kernel configuration options +- Improved handling of user tags +- Use nanliu-staging module instead of hardcoded 'curl' +- Switch to yum or zypper provider instead of rpm +- Add ability to manage STOMP plugin installation. +- Allow empty permission fields +- Convert existing system tests to beaker acceptance tests. + +Bugfixes: +- exchanges no longer recreated on each puppet run if non-default vhost is used +- Allow port to be UNSET +- Re-added rabbitmq::server class +- Deprecated previously unused manage_service variable in favor of + service_manage +- Use correct key for rabbitmq apt::source +- config_mirrored_queues variable removed + - It previously did nothing, will now at least throw a warning if you try to + use it +- Remove unnecessary dependency on Class['rabbitmq::repo::rhel'] in + rabbitmq::install + + +2013-09-14 - Version 3.1.0 + +Summary: + +This release focuses on a few small (but critical) bugfixes as well as extends +the amount of custom RabbitMQ configuration you can do with the module. + +Features: +- You can now change RabbitMQ 'Config Variables' via the parameter `config_variables`. +- You can now change RabbitMQ 'Environment Variables' via the parameter `environment_variables`. +- ArchLinux support added. + +Fixes: +- Make use of the user/password parameters in rabbitmq_exchange{} +- Correct the read/write parameter order on set_permissions/list_permissions as + they were reversed. +- Make the module pull down 3.1.5 by default. + +* 2013-07-18 3.0.0 +Summary: +This release heavily refactors the RabbitMQ and changes functionality in +several key ways. Please pay attention to the new README.md file for +details of how to interact with the class now. Puppet 3 and RHEL are +now fully supported. The default version of RabbitMQ has changed to +a 3.x release. + +Bugfixes: +- Improve travis testing options. +- Stop reimporting the GPG key on every run on RHEL and Debian. +- Fix documentation to make it clear you don't have to set provider => each time. +- Reference the standard rabbitmq port in the documentation instead of a custom port. +- Fixes to the README formatting. + +Features: +- Refactor the module to fix RHEL support. All interaction with the module +is now done through the main rabbitmq class. +- Add support for mirrored queues (Only on Debian family distributions currently) +- Add rabbitmq_exchange provider (using rabbitmqadmin) +- Add new `rabbitmq` class parameters: + - `manage_service`: Boolean to choose if Puppet should manage the service. (For pacemaker/HA setups) +- Add SuSE support. + +Incompatible Changes: +- Rabbitmq::server has been removed and is now rabbitmq::config. You should +not use this class directly, only via the main rabbitmq class. + +* 2013-04-11 2.1.0 +- remove puppetversion from rabbitmq.config template +- add cluster support +- escape resource names in regexp + +* 2012-07-31 Jeff McCune 2.0.2 +- Re-release 2.0.1 with $EDITOR droppings cleaned up + +* 2012-05-03 2.0.0 +- added support for new-style admin users +- added support for rabbitmq 2.7.1 + +* 2011-06-14 Dan Bode 2.0.0rc1 +- Massive refactor: +- added native types for user/vhost/user_permissions +- added apt support for vendor packages +- added smoke tests + +* 2011-04-08 Jeff McCune 1.0.4 +- Update module for RabbitMQ 2.4.1 and rabbitmq-plugin-stomp package. + +2011-03-24 1.0.3 +- Initial release to the forge. Reviewed by Cody. Whitespace is good. + +2011-03-22 1.0.2 +- Whitespace only fix again... ack '\t' is my friend... + +2011-03-22 1.0.1 +- Whitespace only fix. + +2011-03-22 1.0.0 +- Initial Release. Manage the package, file and service. diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/rabbitmq/Gemfile b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/rabbitmq/Gemfile new file mode 100644 index 00000000000..02e632165fd --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/rabbitmq/Gemfile @@ -0,0 +1,26 @@ +source 'https://rubygems.org' + +group :development, :test do + gem 'rake', '10.1.1', :require => false + gem 'rspec-puppet', '>=1.0.0', :require => false + gem 'puppetlabs_spec_helper', :require => false + gem 'puppet-lint', :require => false + gem 'serverspec', :require => false + gem 'beaker', :require => false + gem 'beaker-rspec', :require => false + gem 'pry', :require => false +end + +if facterversion = ENV['FACTER_GEM_VERSION'] + gem 'facter', facterversion, :require => false +else + gem 'facter', :require => false +end + +if puppetversion = ENV['PUPPET_GEM_VERSION'] + gem 'puppet', puppetversion, :require => false +else + gem 'puppet', :require => false +end + +# vim:ft=ruby diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/rabbitmq/LICENSE b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/rabbitmq/LICENSE new file mode 100644 index 00000000000..297f85cfa86 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/rabbitmq/LICENSE @@ -0,0 +1,201 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright 2013 Puppet Labs + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/rabbitmq/Modulefile b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/rabbitmq/Modulefile new file mode 100644 index 00000000000..5301dbce61b --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/rabbitmq/Modulefile @@ -0,0 +1,13 @@ +name 'puppetlabs-rabbitmq' +version '4.0.0' +source 'git://github.com/puppetlabs/puppetlabs-rabbitmq.git' +author 'puppetlabs' +license 'Apache' +summary 'RabbitMQ Puppet Module' +description 'This module manages RabbitMQ. Tested on Debian, Ubuntu, and RedHat' +project_page 'http://github.com/puppetlabs/puppetlabs-rabbitmq' + +## Add dependencies, if any: +dependency 'puppetlabs/stdlib', '>= 2.0.0' +dependency 'puppetlabs/apt', '>= 1.0.0' +dependency 'nanliu/staging', '>= 0.3.1' diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/rabbitmq/README.md b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/rabbitmq/README.md new file mode 100644 index 00000000000..c6750445516 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/rabbitmq/README.md @@ -0,0 +1,349 @@ +#rabbitmq + +####Table of Contents + +1. [Overview](#overview) +2. [Module Description - What the module does and why it is useful](#module-description) +3. [Setup - The basics of getting started with rabbitmq](#setup) + * [What rabbitmq affects](#what-rabbitmq-affects) + * [Setup requirements](#setup-requirements) + * [Beginning with rabbitmq](#beginning-with-rabbitmq) +4. [Usage - Configuration options and additional functionality](#usage) +5. [Reference - An under-the-hood peek at what the module is doing and how](#reference) +5. [Limitations - OS compatibility, etc.](#limitations) + * [RedHat module dependencies](#redhat-module-dependecies) +6. [Development - Guide for contributing to the module](#development) + +##Overview + +This module manages RabbitMQ (www.rabbitmq.com) + +##Module Description +The rabbitmq module sets up rabbitmq and has a number of providers to manage +everything from vhosts to exchanges after setup. + +This module has been tested against 2.7.1 and is known to not support +all features against earlier versions. + +##Setup + +###What rabbitmq affects + +* rabbitmq repository files. +* rabbitmq package. +* rabbitmq configuration file. +* rabbitmq service. + +###Beginning with rabbitmq + +```puppet +include '::rabbitmq' +``` + +##Usage + +All options and configuration can be done through interacting with the parameters +on the main rabbitmq class. These are documented below. + +##rabbitmq class + +To begin with the rabbitmq class controls the installation of rabbitmq. In here +you can control many parameters relating to the package and service, such as +disabling puppet support of the service: + +```puppet +class { '::rabbitmq': + service_manage => false, + port => '5672', + delete_guest_user => true, +} +``` + +### Environment Variables +To use RabbitMQ Environment Variables, use the parameters `environment_variables` e.g.: + +```puppet +class { 'rabbitmq': + port => '5672', + environment_variables => { + 'RABBITMQ_NODENAME' => 'node01', + 'RABBITMQ_SERVICENAME' => 'RabbitMQ' + } +} +``` + +### Variables Configurable in rabbitmq.config +To change RabbitMQ Config Variables in rabbitmq.config, use the parameters `config_variables` e.g.: + +```puppet +class { 'rabbitmq': + port => '5672', + config_variables => { + 'hipe_compile' => true, + 'frame_max' => 131072, + 'log_levels' => "[{connection, info}]" + } +} +``` + +To change Erlang Kernel Config Variables in rabbitmq.config, use the parameters +`config_kernel_variables` e.g.: + +```puppet +class { 'rabbitmq': + port => '5672', + config_kernel_variables => { + 'inet_dist_listen_min' => 9100, + 'inet_dist_listen_max' => 9105, + } +} +``` + +### Clustering +To use RabbitMQ clustering facilities, use the rabbitmq parameters +`config_cluster`, `cluster_nodes`, and `cluster_node_type`, e.g.: + +```puppet +class { 'rabbitmq': + config_cluster => true, + cluster_nodes => ['rabbit1', 'rabbit2'], + cluster_node_type => 'ram', +} +``` + +##Reference + +##Classes + +* rabbitmq: Main class for installation and service management. +* rabbitmq::config: Main class for rabbitmq configuration/management. +* rabbitmq::install: Handles package installation. +* rabbitmq::params: Different configuration data for different systems. +* rabbitmq::service: Handles the rabbitmq service. +* rabbitmq::repo::apt: Handles apt repo for Debian systems. +* rabbitmq::repo::rhel: Handles yum repo for Redhat systems. + +###Parameters + +####`admin_enable` + +If enabled sets up the management interface/plugin for RabbitMQ. + +####`cluster_disk_nodes` + +DEPRECATED AND REPLACED BY CLUSTER_NODES. + +####`cluster_node_type` + +Choose between disk and ram nodes. + +####`cluster_nodes` + +An array of nodes for clustering. + +####`config` + +The file to use as the rabbitmq.config template. + +####`config_cluster` + +Boolean to enable or disable clustering support. + +####`config_mirrored_queues` + +DEPRECATED + +Configuring queue mirroring should be done by setting the according policy for +the queue. You can read more about it +[here](http://www.rabbitmq.com/ha.html#genesis) + +####`config_path` + +The path to write the RabbitMQ configuration file to. + +####`config_stomp` + +Boolean to enable or disable stomp. + +####`delete_guest_user` + +Boolean to decide if we should delete the default guest user. + +####`env_config` + +The template file to use for rabbitmq_env.config. + +####`env_config_path` + +The path to write the rabbitmq_env.config file to. + +####`erlang_cookie` + +The erlang cookie to use for clustering - must be the same between all nodes. + +####`config_variables` + +To set config variables in rabbitmq.config + +####`node_ip_address` + +The value of RABBITMQ_NODE_IP_ADDRESS in rabbitmq_env.config + +####`environment_variables` + +RabbitMQ Environment Variables in rabbitmq_env.config + +####`package_ensure` + +Determines the ensure state of the package. Set to installed by default, but could +be changed to latest. + +####`package_name` + +The name of the package to install. + +####`package_provider` + +What provider to use to install the package. + +####`package_source` + +Where should the package be installed from? + +####`plugin_dir` + +Location of RabbitMQ plugins. + +####`port` + +The RabbitMQ port. + +####`management_port` + +The port for the RabbitMQ management interface. + +####`service_ensure` + +The state of the service. + +####`service_manage` + +Determines if the service is managed. + +####`service_name` + +The name of the service to manage. + +####`stomp_port` + +The port to use for Stomp. + +####`stomp_ensure` + +Boolean to install the stomp plugin. + +####`wipe_db_on_cookie_change` + +Boolean to determine if we should DESTROY AND DELETE the RabbitMQ database. + +####`version` + +Sets the version to install. + +##Native Types + +### rabbitmq\_user + +query all current users: `$ puppet resource rabbitmq_user` + +``` +rabbitmq_user { 'dan': + admin => true, + password => 'bar', +} +``` + +### rabbitmq\_vhost + +query all current vhosts: `$ puppet resource rabbitmq_vhost` + +```puppet +rabbitmq_vhost { 'myhost': + ensure => present, +} +``` + +### rabbitmq\_exchange + +```puppet +rabbitmq_exchange { 'myexchange@myhost': + user => 'dan', + password => 'bar', + type => 'topic', + ensure => present, +} +``` + +### rabbitmq\_user\_permissions + +```puppet +rabbitmq_user_permissions { 'dan@myhost': + configure_permission => '.*', + read_permission => '.*', + write_permission => '.*', +} +``` + +### rabbitmq\_plugin + +query all currently enabled plugins `$ puppet resource rabbitmq_plugin` + +```puppet +rabbitmq_plugin {'rabbitmq_stomp': + ensure => present, +} +``` + +##Limitations + +This module has been built on and tested against Puppet 2.7 and higher. + +The module has been tested on: + +* RedHat Enterprise Linux 5/6 +* Debian 6/7 +* CentOS 5/6 +* Ubuntu 12.04 + +Testing on other platforms has been light and cannot be guaranteed. + +### RedHat module dependencies +To have a suitable erlang version installed on RedHat systems, +you have to install another puppet module from http://forge.puppetlabs.com/garethr/erlang with: + + puppet module install garethr-erlang + +This module handles the packages for erlang. +To use the module, add the following snippet to your site.pp or an appropriate profile class: + + include 'erlang' + class { 'erlang': epel_enable => true} + +##Development + +Puppet Labs modules on the Puppet Forge are open projects, and community +contributions are essential for keeping them great. We can’t access the +huge number of platforms and myriad of hardware, software, and deployment +configurations that Puppet is intended to serve. + +We want to keep it as easy as possible to contribute changes so that our +modules work in your environment. There are a few guidelines that we need +contributors to follow so that we can have a chance of keeping on top of things. + +You can read the complete module contribution guide [on the Puppet Labs wiki.](http://projects.puppetlabs.com/projects/module-site/wiki/Module_contributing) + +### Authors +* Jeff McCune +* Dan Bode +* RPM/RHEL packages by Vincent Janelle +* Puppetlabs Module Team diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/rabbitmq/Rakefile b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/rabbitmq/Rakefile new file mode 100644 index 00000000000..5868545f200 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/rabbitmq/Rakefile @@ -0,0 +1,10 @@ +require 'puppetlabs_spec_helper/rake_tasks' +require 'puppet-lint/tasks/puppet-lint' + +PuppetLint.configuration.fail_on_warnings +PuppetLint.configuration.send('disable_80chars') +PuppetLint.configuration.send('disable_class_inherits_from_params_class') +PuppetLint.configuration.send('disable_class_parameter_defaults') +PuppetLint.configuration.send('disable_documentation') +PuppetLint.configuration.send('disable_single_quote_string_with_variables') +PuppetLint.configuration.ignore_paths = ["spec/**/*.pp", "pkg/**/*.pp"] diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/rabbitmq/TODO b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/rabbitmq/TODO new file mode 100644 index 00000000000..8ae578e9e38 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/rabbitmq/TODO @@ -0,0 +1,10 @@ +provider TODO - + - password should be a property and not a param + - what if we tried to log in as that user? + - can permissions from list_user_permissions contain whitespace? + - what about defaultfor :true? + - prefetching for performance + - rabbit plugin should require rabbitmq class + - rabbitmq class should be renamed server?? + - service name should default to -server + - cannot find stomp package diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/rabbitmq/files/README.markdown b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/rabbitmq/files/README.markdown new file mode 100644 index 00000000000..be52188c47b --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/rabbitmq/files/README.markdown @@ -0,0 +1,22 @@ +Files +===== + +Puppet comes with both a client and server for copying files around. The file +serving function is provided as part of the central Puppet daemon, +puppetmasterd, and the client function is used through the source attribute of +file objects. Learn more at +http://projects.puppetlabs.com/projects/puppet/wiki/File_Serving_Configuration + +You can use managed files like this: + + class myclass { + package { mypackage: ensure => latest } + service { myservice: ensure => running } + file { "/etc/myfile": + source => "puppet://$servername/modules/mymodule/myfile" + } + } + +The files are searched for in: + + $modulepath/mymodule/files/myfile diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/rabbitmq/files/plugins/amqp_client-2.3.1.ez b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/rabbitmq/files/plugins/amqp_client-2.3.1.ez new file mode 100644 index 00000000000..6ef6d4ff148 Binary files /dev/null and b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/rabbitmq/files/plugins/amqp_client-2.3.1.ez differ diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/rabbitmq/files/plugins/rabbit_stomp-2.3.1.ez b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/rabbitmq/files/plugins/rabbit_stomp-2.3.1.ez new file mode 100644 index 00000000000..4a28b72f832 Binary files /dev/null and b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/rabbitmq/files/plugins/rabbit_stomp-2.3.1.ez differ diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/rabbitmq/lib/facter/rabbitmq_erlang_cookie.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/rabbitmq/lib/facter/rabbitmq_erlang_cookie.rb new file mode 100644 index 00000000000..474e12885ac --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/rabbitmq/lib/facter/rabbitmq_erlang_cookie.rb @@ -0,0 +1,16 @@ +# Fact: rabbitmq_erlang_cookie +# +# Purpose: To determine the current erlang cookie value. +# +# Resolution: Returns the cookie. +Facter.add(:rabbitmq_erlang_cookie) do + confine :osfamily => %w[Debian RedHat Suse] + + setcode do + if File.exists?('/var/lib/rabbitmq/.erlang.cookie') + File.read('/var/lib/rabbitmq/.erlang.cookie') + else + nil + end + end +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/rabbitmq/lib/puppet/provider/rabbitmq_exchange/rabbitmqadmin.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/rabbitmq/lib/puppet/provider/rabbitmq_exchange/rabbitmqadmin.rb new file mode 100644 index 00000000000..fcc3764fdd8 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/rabbitmq/lib/puppet/provider/rabbitmq_exchange/rabbitmqadmin.rb @@ -0,0 +1,87 @@ +require 'puppet' +Puppet::Type.type(:rabbitmq_exchange).provide(:rabbitmqadmin) do + + commands :rabbitmqctl => '/usr/sbin/rabbitmqctl' + commands :rabbitmqadmin => '/usr/local/bin/rabbitmqadmin' + defaultfor :feature => :posix + + def should_vhost + if @should_vhost + @should_vhost + else + @should_vhost = resource[:name].split('@')[1] + end + end + + def self.all_vhosts + vhosts = [] + parse_command(rabbitmqctl('list_vhosts')).collect do |vhost| + vhosts.push(vhost) + end + vhosts + end + + def self.all_exchanges(vhost) + exchanges = [] + parse_command(rabbitmqctl('list_exchanges', '-p', vhost, 'name', 'type')) + end + + def self.parse_command(cmd_output) + # first line is: + # Listing exchanges/vhosts ... + # while the last line is + # ...done. + # + cmd_output.split(/\n/)[1..-2] + end + + def self.instances + resources = [] + all_vhosts.each do |vhost| + all_exchanges(vhost).collect do |line| + name, type = line.split() + if type.nil? + # if name is empty, it will wrongly get the type's value. + # This way type will get the correct value + type = name + name = '' + end + exchange = { + :type => type, + :ensure => :present, + :name => "%s@%s" % [name, vhost], + } + resources << new(exchange) if exchange[:type] + end + end + resources + end + + def self.prefetch(resources) + packages = instances + resources.keys.each do |name| + if provider = packages.find{ |pkg| pkg.name == name } + resources[name].provider = provider + end + end + end + + def exists? + @property_hash[:ensure] == :present + end + + def create + vhost_opt = should_vhost ? "--vhost=#{should_vhost}" : '' + name = resource[:name].split('@')[0] + rabbitmqadmin('declare', 'exchange', vhost_opt, "--user=#{resource[:user]}", "--password=#{resource[:password]}", "name=#{name}", "type=#{resource[:type]}") + @property_hash[:ensure] = :present + end + + def destroy + vhost_opt = should_vhost ? "--vhost=#{should_vhost}" : '' + name = resource[:name].split('@')[0] + rabbitmqadmin('delete', 'exchange', vhost_opt, "--user=#{resource[:user]}", "--password=#{resource[:password]}", "name=#{name}") + @property_hash[:ensure] = :absent + end + +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/rabbitmq/lib/puppet/provider/rabbitmq_plugin/rabbitmqplugins.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/rabbitmq/lib/puppet/provider/rabbitmq_plugin/rabbitmqplugins.rb new file mode 100644 index 00000000000..e416cbe02b3 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/rabbitmq/lib/puppet/provider/rabbitmq_plugin/rabbitmqplugins.rb @@ -0,0 +1,37 @@ +Puppet::Type.type(:rabbitmq_plugin).provide(:rabbitmqplugins) do + + if Puppet::PUPPETVERSION.to_f < 3 + commands :rabbitmqplugins => 'rabbitmq-plugins' + else + has_command(:rabbitmqplugins, 'rabbitmq-plugins') do + environment :HOME => "/tmp" + end + end + + defaultfor :feature => :posix + + def self.instances + rabbitmqplugins('list', '-E').split(/\n/).map do |line| + if line.split(/\s+/)[1] =~ /^(\S+)$/ + new(:name => $1) + else + raise Puppet::Error, "Cannot parse invalid plugins line: #{line}" + end + end + end + + def create + rabbitmqplugins('enable', resource[:name]) + end + + def destroy + rabbitmqplugins('disable', resource[:name]) + end + + def exists? + rabbitmqplugins('list', '-E').split(/\n/).detect do |line| + line.split(/\s+/)[1].match(/^#{resource[:name]}$/) + end + end + +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/rabbitmq/lib/puppet/provider/rabbitmq_user/rabbitmqctl.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/rabbitmq/lib/puppet/provider/rabbitmq_user/rabbitmqctl.rb new file mode 100644 index 00000000000..9cb2e41c293 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/rabbitmq/lib/puppet/provider/rabbitmq_user/rabbitmqctl.rb @@ -0,0 +1,77 @@ +require 'puppet' +require 'set' +Puppet::Type.type(:rabbitmq_user).provide(:rabbitmqctl) do + + if Puppet::PUPPETVERSION.to_f < 3 + commands :rabbitmqctl => 'rabbitmqctl' + else + has_command(:rabbitmqctl, 'rabbitmqctl') do + environment :HOME => "/tmp" + end + end + + defaultfor :feature => :posix + + def self.instances + rabbitmqctl('list_users').split(/\n/)[1..-2].collect do |line| + if line =~ /^(\S+)(\s+\[.*?\]|)$/ + new(:name => $1) + else + raise Puppet::Error, "Cannot parse invalid user line: #{line}" + end + end + end + + def create + rabbitmqctl('add_user', resource[:name], resource[:password]) + if resource[:admin] == :true + make_user_admin() + end + end + + def destroy + rabbitmqctl('delete_user', resource[:name]) + end + + def exists? + rabbitmqctl('list_users').split(/\n/)[1..-2].detect do |line| + line.match(/^#{Regexp.escape(resource[:name])}(\s+(\[.*?\]|\S+)|)$/) + end + end + + # def password + # def password=() + def admin + if usertags = get_user_tags + (:true if usertags.include?('administrator')) || :false + else + raise Puppet::Error, "Could not match line '#{resource[:name]} (true|false)' from list_users (perhaps you are running on an older version of rabbitmq that does not support admin users?)" + end + end + + + def admin=(state) + if state == :true + make_user_admin() + else + usertags = get_user_tags + usertags.delete('administrator') + rabbitmqctl('set_user_tags', resource[:name], usertags.entries.sort) + end + end + + def make_user_admin + usertags = get_user_tags + usertags.add('administrator') + rabbitmqctl('set_user_tags', resource[:name], usertags.entries.sort) + end + + private + def get_user_tags + match = rabbitmqctl('list_users').split(/\n/)[1..-2].collect do |line| + line.match(/^#{Regexp.escape(resource[:name])}\s+\[(.*?)\]/) + end.compact.first + Set.new(match[1].split(/, /)) if match + end + +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/rabbitmq/lib/puppet/provider/rabbitmq_user_permissions/rabbitmqctl.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/rabbitmq/lib/puppet/provider/rabbitmq_user_permissions/rabbitmqctl.rb new file mode 100644 index 00000000000..83bd808e2ec --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/rabbitmq/lib/puppet/provider/rabbitmq_user_permissions/rabbitmqctl.rb @@ -0,0 +1,105 @@ +Puppet::Type.type(:rabbitmq_user_permissions).provide(:rabbitmqctl) do + + if Puppet::PUPPETVERSION.to_f < 3 + commands :rabbitmqctl => 'rabbitmqctl' + else + has_command(:rabbitmqctl, 'rabbitmqctl') do + environment :HOME => "/tmp" + end + end + + defaultfor :feature=> :posix + + # cache users permissions + def self.users(name, vhost) + @users = {} unless @users + unless @users[name] + @users[name] = {} + rabbitmqctl('list_user_permissions', name).split(/\n/)[1..-2].each do |line| + if line =~ /^(\S+)\s+(\S*)\s+(\S*)\s+(\S*)$/ + @users[name][$1] = + {:configure => $2, :read => $4, :write => $3} + else + raise Puppet::Error, "cannot parse line from list_user_permissions:#{line}" + end + end + end + @users[name][vhost] + end + + def users(name, vhost) + self.class.users(name, vhost) + end + + def should_user + if @should_user + @should_user + else + @should_user = resource[:name].split('@')[0] + end + end + + def should_vhost + if @should_vhost + @should_vhost + else + @should_vhost = resource[:name].split('@')[1] + end + end + + def create + resource[:configure_permission] ||= "''" + resource[:read_permission] ||= "''" + resource[:write_permission] ||= "''" + rabbitmqctl('set_permissions', '-p', should_vhost, should_user, resource[:configure_permission], resource[:write_permission], resource[:read_permission]) + end + + def destroy + rabbitmqctl('clear_permissions', '-p', should_vhost, should_user) + end + + # I am implementing prefetching in exists b/c I need to be sure + # that the rabbitmq package is installed before I make this call. + def exists? + users(should_user, should_vhost) + end + + def configure_permission + users(should_user, should_vhost)[:configure] + end + + def configure_permission=(perm) + set_permissions + end + + def read_permission + users(should_user, should_vhost)[:read] + end + + def read_permission=(perm) + set_permissions + end + + def write_permission + users(should_user, should_vhost)[:write] + end + + def write_permission=(perm) + set_permissions + end + + # implement memoization so that we only call set_permissions once + def set_permissions + unless @permissions_set + @permissions_set = true + resource[:configure_permission] ||= configure_permission + resource[:read_permission] ||= read_permission + resource[:write_permission] ||= write_permission + rabbitmqctl('set_permissions', '-p', should_vhost, should_user, + resource[:configure_permission], resource[:write_permission], + resource[:read_permission] + ) + end + end + +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/rabbitmq/lib/puppet/provider/rabbitmq_vhost/rabbitmqctl.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/rabbitmq/lib/puppet/provider/rabbitmq_vhost/rabbitmqctl.rb new file mode 100644 index 00000000000..2ee45c31119 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/rabbitmq/lib/puppet/provider/rabbitmq_vhost/rabbitmqctl.rb @@ -0,0 +1,35 @@ +Puppet::Type.type(:rabbitmq_vhost).provide(:rabbitmqctl) do + + if Puppet::PUPPETVERSION.to_f < 3 + commands :rabbitmqctl => 'rabbitmqctl' + else + has_command(:rabbitmqctl, 'rabbitmqctl') do + environment :HOME => "/tmp" + end + end + + def self.instances + rabbitmqctl('list_vhosts').split(/\n/)[1..-2].map do |line| + if line =~ /^(\S+)$/ + new(:name => $1) + else + raise Puppet::Error, "Cannot parse invalid user line: #{line}" + end + end + end + + def create + rabbitmqctl('add_vhost', resource[:name]) + end + + def destroy + rabbitmqctl('delete_vhost', resource[:name]) + end + + def exists? + out = rabbitmqctl('list_vhosts').split(/\n/)[1..-2].detect do |line| + line.match(/^#{Regexp.escape(resource[:name])}$/) + end + end + +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/rabbitmq/lib/puppet/type/rabbitmq_exchange.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/rabbitmq/lib/puppet/type/rabbitmq_exchange.rb new file mode 100644 index 00000000000..6a96520c681 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/rabbitmq/lib/puppet/type/rabbitmq_exchange.rb @@ -0,0 +1,54 @@ +Puppet::Type.newtype(:rabbitmq_exchange) do + desc 'Native type for managing rabbitmq exchanges' + + ensurable do + defaultto(:present) + newvalue(:present) do + provider.create + end + newvalue(:absent) do + provider.destroy + end + end + + newparam(:name, :namevar => true) do + desc 'Name of exchange' + newvalues(/^\S*@\S+$/) + end + + newparam(:type) do + desc 'Exchange type to be set *on creation*' + newvalues(/^\S+$/) + end + + newparam(:user) do + desc 'The user to use to connect to rabbitmq' + defaultto('guest') + newvalues(/^\S+$/) + end + + newparam(:password) do + desc 'The password to use to connect to rabbitmq' + defaultto('guest') + newvalues(/\S+/) + end + + validate do + if self[:ensure] == :present and self[:type].nil? + raise ArgumentError, "must set type when creating exchange for #{self[:name]} whose type is #{self[:type]}" + end + end + + autorequire(:rabbitmq_vhost) do + [self[:name].split('@')[1]] + end + + autorequire(:rabbitmq_user) do + [self[:user]] + end + + autorequire(:rabbitmq_user_permissions) do + ["#{self[:user]}@#{self[:name].split('@')[1]}"] + end + +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/rabbitmq/lib/puppet/type/rabbitmq_plugin.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/rabbitmq/lib/puppet/type/rabbitmq_plugin.rb new file mode 100644 index 00000000000..497ced4e6b5 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/rabbitmq/lib/puppet/type/rabbitmq_plugin.rb @@ -0,0 +1,19 @@ +Puppet::Type.newtype(:rabbitmq_plugin) do + desc 'manages rabbitmq plugins' + + ensurable do + defaultto(:present) + newvalue(:present) do + provider.create + end + newvalue(:absent) do + provider.destroy + end + end + + newparam(:name, :namevar => true) do + 'name of the plugin to enable' + newvalues(/^\S+$/) + end + +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/rabbitmq/lib/puppet/type/rabbitmq_user.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/rabbitmq/lib/puppet/type/rabbitmq_user.rb new file mode 100644 index 00000000000..642710d1c07 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/rabbitmq/lib/puppet/type/rabbitmq_user.rb @@ -0,0 +1,42 @@ +Puppet::Type.newtype(:rabbitmq_user) do + desc 'Native type for managing rabbitmq users' + + ensurable do + defaultto(:present) + newvalue(:present) do + provider.create + end + newvalue(:absent) do + provider.destroy + end + end + + autorequire(:service) { 'rabbitmq-server' } + + newparam(:name, :namevar => true) do + desc 'Name of user' + newvalues(/^\S+$/) + end + + # newproperty(:password) do + newparam(:password) do + desc 'User password to be set *on creation*' + end + + newproperty(:admin) do + desc 'rather or not user should be an admin' + newvalues(/true|false/) + munge do |value| + # converting to_s incase its a boolean + value.to_s.to_sym + end + defaultto :false + end + + validate do + if self[:ensure] == :present and ! self[:password] + raise ArgumentError, 'must set password when creating user' unless self[:password] + end + end + +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/rabbitmq/lib/puppet/type/rabbitmq_user_permissions.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/rabbitmq/lib/puppet/type/rabbitmq_user_permissions.rb new file mode 100644 index 00000000000..493d47c88a6 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/rabbitmq/lib/puppet/type/rabbitmq_user_permissions.rb @@ -0,0 +1,59 @@ +Puppet::Type.newtype(:rabbitmq_user_permissions) do + desc 'Type for managing rabbitmq user permissions' + + ensurable do + defaultto(:present) + newvalue(:present) do + provider.create + end + newvalue(:absent) do + provider.destroy + end + end + + autorequire(:service) { 'rabbitmq-server' } + + newparam(:name, :namevar => true) do + desc 'combination of user@vhost to grant privileges to' + newvalues(/^\S+@\S+$/) + end + + newproperty(:configure_permission) do + desc 'regexp representing configuration permissions' + validate do |value| + resource.validate_permissions(value) + end + end + + newproperty(:read_permission) do + desc 'regexp representing read permissions' + validate do |value| + resource.validate_permissions(value) + end + end + + newproperty(:write_permission) do + desc 'regexp representing write permissions' + validate do |value| + resource.validate_permissions(value) + end + end + + autorequire(:rabbitmq_vhost) do + [self[:name].split('@')[1]] + end + + autorequire(:rabbitmq_user) do + [self[:name].split('@')[0]] + end + + # I may want to dissalow whitespace + def validate_permissions(value) + begin + Regexp.new(value) + rescue RegexpError + raise ArgumentError, "Invalid regexp #{value}" + end + end + +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/rabbitmq/lib/puppet/type/rabbitmq_vhost.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/rabbitmq/lib/puppet/type/rabbitmq_vhost.rb new file mode 100644 index 00000000000..9dd0982dcac --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/rabbitmq/lib/puppet/type/rabbitmq_vhost.rb @@ -0,0 +1,19 @@ +Puppet::Type.newtype(:rabbitmq_vhost) do + desc 'manages rabbitmq vhosts' + + ensurable do + defaultto(:present) + newvalue(:present) do + provider.create + end + newvalue(:absent) do + provider.destroy + end + end + + newparam(:name, :namevar => true) do + 'name of the vhost to add' + newvalues(/^\S+$/) + end + +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/rabbitmq/manifests/config.pp b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/rabbitmq/manifests/config.pp new file mode 100644 index 00000000000..96877f6a631 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/rabbitmq/manifests/config.pp @@ -0,0 +1,117 @@ +class rabbitmq::config { + + $cluster_disk_nodes = $rabbitmq::cluster_disk_nodes + $cluster_node_type = $rabbitmq::cluster_node_type + $cluster_nodes = $rabbitmq::cluster_nodes + $config = $rabbitmq::config + $config_cluster = $rabbitmq::config_cluster + $config_path = $rabbitmq::config_path + $config_stomp = $rabbitmq::config_stomp + $default_user = $rabbitmq::default_user + $default_pass = $rabbitmq::default_pass + $env_config = $rabbitmq::env_config + $env_config_path = $rabbitmq::env_config_path + $erlang_cookie = $rabbitmq::erlang_cookie + $node_ip_address = $rabbitmq::node_ip_address + $plugin_dir = $rabbitmq::plugin_dir + $port = $rabbitmq::port + $service_name = $rabbitmq::service_name + $ssl = $rabbitmq::ssl + $ssl_cacert = $rabbitmq::ssl_cacert + $ssl_cert = $rabbitmq::ssl_cert + $ssl_key = $rabbitmq::ssl_key + $ssl_management_port = $rabbitmq::ssl_management_port + $ssl_stomp_port = $rabbitmq::ssl_stomp_port + $stomp_port = $rabbitmq::stomp_port + $wipe_db_on_cookie_change = $rabbitmq::wipe_db_on_cookie_change + $config_variables = $rabbitmq::config_variables + $config_kernel_variables = $rabbitmq::config_kernel_variables + $cluster_partition_handling = $rabbitmq::cluster_partition_handling + $default_env_variables = { + 'RABBITMQ_NODE_PORT' => $port, + 'RABBITMQ_NODE_IP_ADDRESS' => $node_ip_address + } + + # Handle env variables. + $environment_variables = merge($default_env_variables, $rabbitmq::environment_variables) + + # Handle deprecated option. + if $cluster_disk_nodes != [] { + notify { 'cluster_disk_nodes': + message => 'WARNING: The cluster_disk_nodes is deprecated. + Use cluster_nodes instead.', + } + $r_cluster_nodes = $cluster_disk_nodes + } else { + $r_cluster_nodes = $cluster_nodes + } + + file { '/etc/rabbitmq': + ensure => directory, + owner => '0', + group => '0', + mode => '0644', + } + + file { '/etc/rabbitmq/ssl': + ensure => directory, + owner => '0', + group => '0', + mode => '0644', + } + + file { 'rabbitmq.config': + ensure => file, + path => $config_path, + content => template($config), + owner => '0', + group => '0', + mode => '0644', + notify => Class['rabbitmq::service'], + } + + file { 'rabbitmq-env.config': + ensure => file, + path => $env_config_path, + content => template($env_config), + owner => '0', + group => '0', + mode => '0644', + notify => Class['rabbitmq::service'], + } + + + if $config_cluster { + + file { 'erlang_cookie': + ensure => 'present', + path => '/var/lib/rabbitmq/.erlang.cookie', + owner => 'rabbitmq', + group => 'rabbitmq', + mode => '0400', + content => $erlang_cookie, + replace => true, + before => File['rabbitmq.config'], + notify => Class['rabbitmq::service'], + } + + # rabbitmq_erlang_cookie is a fact in this module. + if $erlang_cookie != $::rabbitmq_erlang_cookie { + # Safety check. + if $wipe_db_on_cookie_change { + exec { 'wipe_db': + command => "puppet resource service ${service_name} ensure=stopped; rm -rf /var/lib/rabbitmq/mnesia", + path => '/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin', + } + File['erlang_cookie'] { + require => Exec['wipe_db'], + } + } else { + fail("ERROR: The current erlang cookie is ${::rabbitmq_erlang_cookie} and needs to change to ${erlang_cookie}. In order to do this the RabbitMQ database needs to be wiped. Please set the parameter called wipe_db_on_cookie_change to true to allow this to happen automatically.") + } + } + + } + + +} diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/rabbitmq/manifests/init.pp b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/rabbitmq/manifests/init.pp new file mode 100644 index 00000000000..6c14f0097d6 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/rabbitmq/manifests/init.pp @@ -0,0 +1,169 @@ + # +class rabbitmq( + $admin_enable = $rabbitmq::params::admin_enable, + $cluster_disk_nodes = $rabbitmq::params::cluster_disk_nodes, + $cluster_node_type = $rabbitmq::params::cluster_node_type, + $cluster_nodes = $rabbitmq::params::cluster_nodes, + $config = $rabbitmq::params::config, + $config_cluster = $rabbitmq::params::config_cluster, + $config_path = $rabbitmq::params::config_path, + $config_stomp = $rabbitmq::params::config_stomp, + $default_user = $rabbitmq::params::default_user, + $default_pass = $rabbitmq::params::default_pass, + $delete_guest_user = $rabbitmq::params::delete_guest_user, + $env_config = $rabbitmq::params::env_config, + $env_config_path = $rabbitmq::params::env_config_path, + $erlang_cookie = $rabbitmq::params::erlang_cookie, + $management_port = $rabbitmq::params::management_port, + $node_ip_address = $rabbitmq::params::node_ip_address, + $package_apt_pin = $rabbitmq::params::package_apt_pin, + $package_ensure = $rabbitmq::params::package_ensure, + $package_gpg_key = $rabbitmq::params::package_gpg_key, + $package_name = $rabbitmq::params::package_name, + $package_provider = $rabbitmq::params::package_provider, + $package_source = $rabbitmq::params::package_source, + $manage_repos = $rabbitmq::params::manage_repos, + $plugin_dir = $rabbitmq::params::plugin_dir, + $port = $rabbitmq::params::port, + $service_ensure = $rabbitmq::params::service_ensure, + $service_manage = $rabbitmq::params::service_manage, + $service_name = $rabbitmq::params::service_name, + $ssl = $rabbitmq::params::ssl, + $ssl_cacert = $rabbitmq::params::ssl_cacert, + $ssl_cert = $rabbitmq::params::ssl_cert, + $ssl_key = $rabbitmq::params::ssl_key, + $ssl_management_port = $rabbitmq::params::ssl_management_port, + $ssl_stomp_port = $rabbitmq::params::ssl_stomp_port, + $ssl_verify = $rabbitmq::params::ssl_verify, + $ssl_fail_if_no_peer_cert = $rabbitmq::params::ssl_fail_if_no_peer_cert, + $stomp_ensure = $rabbitmq::params::stomp_ensure, + $ldap_auth = $rabbitmq::params::ldap_auth, + $ldap_server = $rabbitmq::params::ldap_server, + $ldap_user_dn_pattern = $rabbitmq::params::ldap_user_dn_pattern, + $ldap_use_ssl = $rabbitmq::params::ldap_use_ssl, + $ldap_port = $rabbitmq::params::ldap_port, + $ldap_log = $rabbitmq::params::ldap_log, + $stomp_port = $rabbitmq::params::stomp_port, + $version = $rabbitmq::params::version, + $wipe_db_on_cookie_change = $rabbitmq::params::wipe_db_on_cookie_change, + $cluster_partition_handling = $rabbitmq::params::cluster_partition_handling, + $environment_variables = $rabbitmq::params::environment_variables, + $config_variables = $rabbitmq::params::config_variables, + $config_kernel_variables = $rabbitmq::params::config_kernel_variables, +) inherits rabbitmq::params { + + validate_bool($admin_enable) + # Validate install parameters. + validate_re($package_apt_pin, '^(|\d+)$') + validate_string($package_ensure) + validate_string($package_gpg_key) + validate_string($package_name) + validate_string($package_provider) + validate_string($package_source) + validate_bool($manage_repos) + validate_re($version, '^\d+\.\d+\.\d+(-\d+)*$') # Allow 3 digits and optional -n postfix. + # Validate config parameters. + validate_array($cluster_disk_nodes) + validate_re($cluster_node_type, '^(ram|disc)$') + validate_array($cluster_nodes) + validate_string($config) + validate_absolute_path($config_path) + validate_bool($config_cluster) + validate_bool($config_stomp) + validate_string($default_user) + validate_string($default_pass) + validate_bool($delete_guest_user) + validate_string($env_config) + validate_absolute_path($env_config_path) + validate_string($erlang_cookie) + validate_re($management_port, '\d+') + validate_string($node_ip_address) + validate_absolute_path($plugin_dir) + validate_re($port, ['\d+','UNSET']) + validate_re($stomp_port, '\d+') + validate_bool($wipe_db_on_cookie_change) + # Validate service parameters. + validate_re($service_ensure, '^(running|stopped)$') + validate_bool($service_manage) + validate_string($service_name) + validate_bool($ssl) + validate_string($ssl_cacert) + validate_string($ssl_cert) + validate_string($ssl_key) + validate_string($ssl_management_port) + validate_re($ssl_management_port, '\d+') + validate_string($ssl_stomp_port) + validate_re($ssl_stomp_port, '\d+') + validate_bool($stomp_ensure) + validate_bool($ldap_auth) + validate_string($ldap_server) + validate_string($ldap_user_dn_pattern) + validate_bool($ldap_use_ssl) + validate_re($ldap_port, '\d+') + validate_bool($ldap_log) + validate_hash($environment_variables) + validate_hash($config_variables) + validate_hash($config_kernel_variables) + + include '::rabbitmq::install' + include '::rabbitmq::config' + include '::rabbitmq::service' + include '::rabbitmq::management' + + if $rabbitmq::manage_repos == true { + case $::osfamily { + 'RedHat', 'SUSE': + { include '::rabbitmq::repo::rhel' } + 'Debian': + { include '::rabbitmq::repo::apt' } + default: + { } + } + } + + if $admin_enable and $service_manage { + include '::rabbitmq::install::rabbitmqadmin' + + rabbitmq_plugin { 'rabbitmq_management': + ensure => present, + require => Class['rabbitmq::install'], + notify => Class['rabbitmq::service'], + provider => 'rabbitmqplugins' + } + + Class['::rabbitmq::service'] -> Class['::rabbitmq::install::rabbitmqadmin'] + } + + if $stomp_ensure { + rabbitmq_plugin { 'rabbitmq_stomp': + ensure => $stomp_ensure, + require => Class['rabbitmq::install'], + notify => Class['rabbitmq::service'], + provider => 'rabbitmqplugins' + } + } + + if ($ldap_auth) { + rabbitmq_plugin { 'rabbitmq_auth_backend_ldap': + ensure => present, + require => Class['rabbitmq::install'], + notify => Class['rabbitmq::service'], + provider => 'rabbitmqplugins', + } + } + + # Anchor this as per #8040 - this ensures that classes won't float off and + # mess everything up. You can read about this at: + # http://docs.puppetlabs.com/puppet/2.7/reference/lang_containment.html#known-issues + anchor { 'rabbitmq::begin': } + anchor { 'rabbitmq::end': } + + Anchor['rabbitmq::begin'] -> Class['::rabbitmq::install'] + -> Class['::rabbitmq::config'] ~> Class['::rabbitmq::service'] + -> Class['::rabbitmq::management'] -> Anchor['rabbitmq::end'] + + # Make sure the various providers have their requirements in place. + Class['::rabbitmq::install'] -> Rabbitmq_plugin<| |> + Class['::rabbitmq::install::rabbitmqadmin'] -> Rabbitmq_exchange<| |> + +} diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/rabbitmq/manifests/install.pp b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/rabbitmq/manifests/install.pp new file mode 100644 index 00000000000..09fe3b32134 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/rabbitmq/manifests/install.pp @@ -0,0 +1,21 @@ +class rabbitmq::install { + + $package_ensure = $rabbitmq::package_ensure + $package_name = $rabbitmq::package_name + $package_provider = $rabbitmq::package_provider + $package_source = $rabbitmq::package_source + + package { 'rabbitmq-server': + ensure => $package_ensure, + name => $package_name, + provider => $package_provider, + notify => Class['rabbitmq::service'], + } + + if $package_source { + Package['rabbitmq-server'] { + source => $package_source, + } + } + +} diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/rabbitmq/manifests/install/rabbitmqadmin.pp b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/rabbitmq/manifests/install/rabbitmqadmin.pp new file mode 100644 index 00000000000..aae05f928c8 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/rabbitmq/manifests/install/rabbitmqadmin.pp @@ -0,0 +1,23 @@ +# +class rabbitmq::install::rabbitmqadmin { + + $management_port = $rabbitmq::management_port + + staging::file { 'rabbitmqadmin': + target => '/var/lib/rabbitmq/rabbitmqadmin', + source => "http://localhost:${management_port}/cli/rabbitmqadmin", + require => [ + Class['rabbitmq::service'], + Rabbitmq_plugin['rabbitmq_management'] + ], + } + + file { '/usr/local/bin/rabbitmqadmin': + owner => 'root', + group => 'root', + source => '/var/lib/rabbitmq/rabbitmqadmin', + mode => '0755', + require => Staging::File['rabbitmqadmin'], + } + +} diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/rabbitmq/manifests/management.pp b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/rabbitmq/manifests/management.pp new file mode 100644 index 00000000000..481a7b4f931 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/rabbitmq/manifests/management.pp @@ -0,0 +1,13 @@ +# +class rabbitmq::management { + + $delete_guest_user = $rabbitmq::delete_guest_user + + if $delete_guest_user { + rabbitmq_user{ 'guest': + ensure => absent, + provider => 'rabbitmqctl', + } + } + +} diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/rabbitmq/manifests/params.pp b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/rabbitmq/manifests/params.pp new file mode 100644 index 00000000000..9018bb7b244 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/rabbitmq/manifests/params.pp @@ -0,0 +1,96 @@ + # Class: rabbitmq::params +# +# The RabbitMQ Module configuration settings. +# +class rabbitmq::params { + + case $::osfamily { + 'Archlinux': { + $package_ensure = 'installed' + $package_name = 'rabbitmq' + $service_name = 'rabbitmq' + $package_source = '' + $version = '3.1.3-1' + $base_version = regsubst($version,'^(.*)-\d$','\1') + # This must remain at the end as we need $base_version and $version defined first + } + 'Debian': { + $package_ensure = 'installed' + $package_name = 'rabbitmq-server' + $service_name = 'rabbitmq-server' + $package_provider = 'apt' + $package_source = '' + $version = '3.1.5' + } + 'RedHat': { + $package_ensure = 'installed' + $package_name = 'rabbitmq-server' + $service_name = 'rabbitmq-server' + $package_provider = 'yum' + $version = '3.1.5-1' + $base_version = regsubst($version,'^(.*)-\d$','\1') + # This must remain at the end as we need $base_version and $version defined first. + $package_source = "http://www.rabbitmq.com/releases/rabbitmq-server/v${base_version}/rabbitmq-server-${version}.noarch.rpm" + } + 'SUSE': { + $package_ensure = 'installed' + $package_name = 'rabbitmq-server' + $service_name = 'rabbitmq-server' + $package_provider = 'zypper' + $version = '3.1.5-1' + $base_version = regsubst($version,'^(.*)-\d$','\1') + # This must remain at the end as we need $base_version and $version defined first. + $package_source = "http://www.rabbitmq.com/releases/rabbitmq-server/v${base_version}/rabbitmq-server-${version}.noarch.rpm" + } + default: { + fail("The ${module_name} module is not supported on an ${::osfamily} based system.") + } + } + + #install + $admin_enable = true + $management_port = '15672' + $package_apt_pin = '' + $package_gpg_key = 'http://www.rabbitmq.com/rabbitmq-signing-key-public.asc' + $manage_repos = true + $service_ensure = 'running' + $service_manage = true + #config + $cluster_disk_nodes = [] + $cluster_node_type = 'disc' + $cluster_nodes = [] + $config = 'rabbitmq/rabbitmq.config.erb' + $config_cluster = false + $config_path = '/etc/rabbitmq/rabbitmq.config' + $config_stomp = false + $default_user = 'guest' + $default_pass = 'guest' + $delete_guest_user = false + $env_config = 'rabbitmq/rabbitmq-env.conf.erb' + $env_config_path = '/etc/rabbitmq/rabbitmq-env.conf' + $erlang_cookie = 'EOKOWXQREETZSHFNTPEY' + $node_ip_address = 'UNSET' + $plugin_dir = "/usr/lib/rabbitmq/lib/rabbitmq_server-${version}/plugins" + $port = '5672' + $ssl = false + $ssl_cacert = 'UNSET' + $ssl_cert = 'UNSET' + $ssl_key = 'UNSET' + $ssl_management_port = '5671' + $ssl_stomp_port = '6164' + $ssl_verify = 'verify_none' + $ssl_fail_if_no_peer_cert = 'false' + $stomp_ensure = false + $ldap_auth = false + $ldap_server = 'ldap' + $ldap_user_dn_pattern = 'cn=${username},ou=People,dc=example,dc=com' + $ldap_use_ssl = false + $ldap_port = '389' + $ldap_log = false + $stomp_port = '6163' + $wipe_db_on_cookie_change = false + $cluster_partition_handling = 'ignore' + $environment_variables = {} + $config_variables = {} + $config_kernel_variables = {} +} diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/rabbitmq/manifests/repo/apt.pp b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/rabbitmq/manifests/repo/apt.pp new file mode 100644 index 00000000000..28635f6783f --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/rabbitmq/manifests/repo/apt.pp @@ -0,0 +1,33 @@ +# requires +# puppetlabs-apt +# puppetlabs-stdlib +class rabbitmq::repo::apt( + $location = 'http://www.rabbitmq.com/debian/', + $release = 'testing', + $repos = 'main', + $include_src = false, + $key = '056E8E56', + $key_source = 'http://www.rabbitmq.com/rabbitmq-signing-key-public.asc', + ) { + + $pin = $rabbitmq::package_apt_pin + + Class['rabbitmq::repo::apt'] -> Package<| title == 'rabbitmq-server' |> + + apt::source { 'rabbitmq': + location => $location, + release => $release, + repos => $repos, + include_src => $include_src, + key => $key, + key_source => $key_source, + } + + if $pin { + validate_re($pin, '\d\d\d') + apt::pin { 'rabbitmq': + packages => 'rabbitmq-server', + priority => $pin, + } + } +} diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/rabbitmq/manifests/repo/rhel.pp b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/rabbitmq/manifests/repo/rhel.pp new file mode 100644 index 00000000000..f2271cd4677 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/rabbitmq/manifests/repo/rhel.pp @@ -0,0 +1,12 @@ +class rabbitmq::repo::rhel { + + $package_gpg_key = $rabbitmq::package_gpg_key + + Class['rabbitmq::repo::rhel'] -> Package<| title == 'rabbitmq-server' |> + + exec { "rpm --import ${package_gpg_key}": + path => ['/bin','/usr/bin','/sbin','/usr/sbin'], + onlyif => 'test `rpm -qa | grep gpg-pubkey-056e8e56-468e43f2 | wc -l` -eq 0', + } + +} diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/rabbitmq/manifests/server.pp b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/rabbitmq/manifests/server.pp new file mode 100644 index 00000000000..495ea2f2dfc --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/rabbitmq/manifests/server.pp @@ -0,0 +1,100 @@ +# Class: rabbitmq::server +# +# This module manages the installation and config of the rabbitmq server +# it has only been tested on certain version of debian-ish systems +# Parameters: +# [*port*] - port where rabbitmq server is hosted +# [*delete_guest_user*] - rather or not to delete the default user +# [*version*] - version of rabbitmq-server to install +# [*package_name*] - name of rabbitmq package +# [*service_name*] - name of rabbitmq service +# [*service_ensure*] - desired ensure state for service +# [*stomp_port*] - port stomp should be listening on +# [*node_ip_address*] - ip address for rabbitmq to bind to +# [*config*] - contents of config file +# [*env_config*] - contents of env-config file +# [*config_cluster*] - whether to configure a RabbitMQ cluster +# [*config_mirrored_queues*] - DEPRECATED (doesn't do anything) +# [*cluster_disk_nodes*] - DEPRECATED (use cluster_nodes instead) +# [*cluster_nodes*] - which nodes to cluster with (including the current one) +# [*cluster_node_type*] - Type of cluster node (disc or ram) +# [*erlang_cookie*] - erlang cookie, must be the same for all nodes in a cluster +# [*wipe_db_on_cookie_change*] - whether to wipe the RabbitMQ data if the specified +# erlang_cookie differs from the current one. This is a sad parameter: actually, +# if the cookie indeed differs, then wiping the database is the *only* thing you +# can do. You're only required to set this parameter to true as a sign that you +# realise this. +# Requires: +# stdlib +# Sample Usage: +# +# This module is used as backward compability layer for modules +# which require rabbitmq::server instead of rabbitmq class. +# It's still common uasge in many modules. +# +# +# [Remember: No empty lines between comments and class definition] +class rabbitmq::server( + $port = $rabbitmq::params::port, + $delete_guest_user = $rabbitmq::params::delete_guest_user, + $package_name = $rabbitmq::params::package_name, + $version = $rabbitmq::params::version, + $service_name = $rabbitmq::params::service_name, + $service_ensure = $rabbitmq::params::service_ensure, + $service_manage = $rabbitmq::params::service_manage, + $config_stomp = $rabbitmq::params::config_stomp, + $stomp_port = $rabbitmq::params::stomp_port, + $config_cluster = $rabbitmq::params::config_cluster, + $cluster_disk_nodes = $rabbitmq::params::cluster_disk_nodes, + $cluster_nodes = $rabbitmq::params::cluster_nodes, + $cluster_node_type = $rabbitmq::params::cluster_node_type, + $node_ip_address = $rabbitmq::params::node_ip_address, + $config = $rabbitmq::params::config, + $env_config = $rabbitmq::params::env_config, + $erlang_cookie = $rabbitmq::params::erlang_cookie, + $wipe_db_on_cookie_change = $rabbitmq::params::wipe_db_on_cookie_change, + # DEPRECATED + $manage_service = undef, + $config_mirrored_queues = undef, +) inherits rabbitmq::params { + + if $manage_service != undef { + warning('The $manage_service parameter is deprecated; please use $service_manage instead') + $_service_manage = $manage_service + } else { + $_service_manage = $service_manage + } + + if $config_mirrored_queues != undef { + warning('The $config_mirrored_queues parameter is deprecated; it does not affect anything') + } + + anchor {'before::rabbimq::class': + before => Class['rabbitmq'], + } + + anchor {'after::rabbimq::class': + require => Class['rabbitmq'], + } + + class { 'rabbitmq': + port => $port, + delete_guest_user => $delete_guest_user, + package_name => $package_name, + version => $version, + service_name => $service_name, + service_ensure => $service_ensure, + service_manage => $_service_manage, + config_stomp => $config_stomp, + stomp_port => $stomp_port, + config_cluster => $config_cluster, + cluster_disk_nodes => $cluster_disk_nodes, + cluster_nodes => $cluster_nodes, + cluster_node_type => $cluster_node_type, + node_ip_address => $node_ip_address, + config => $config, + env_config => $env_config, + erlang_cookie => $erlang_cookie, + wipe_db_on_cookie_change => $wipe_db_on_cookie_change, + } +} diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/rabbitmq/manifests/service.pp b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/rabbitmq/manifests/service.pp new file mode 100644 index 00000000000..c01aa64ad35 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/rabbitmq/manifests/service.pp @@ -0,0 +1,40 @@ +# Class: rabbitmq::service +# +# This class manages the rabbitmq server service itself. +# +# Parameters: +# +# Actions: +# +# Requires: +# +# Sample Usage: +# +class rabbitmq::service( + $service_ensure = $rabbitmq::service_ensure, + $service_manage = $rabbitmq::service_manage, + $service_name = $rabbitmq::service_name, +) inherits rabbitmq { + + validate_re($service_ensure, '^(running|stopped)$') + validate_bool($service_manage) + + if ($service_manage) { + if $service_ensure == 'running' { + $ensure_real = 'running' + $enable_real = true + } else { + $ensure_real = 'stopped' + $enable_real = false + } + + service { 'rabbitmq-server': + ensure => $ensure_real, + enable => $enable_real, + hasstatus => true, + hasrestart => true, + name => $service_name, + } + } + +} diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/rabbitmq/spec/README.markdown b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/rabbitmq/spec/README.markdown new file mode 100644 index 00000000000..286d3417dc6 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/rabbitmq/spec/README.markdown @@ -0,0 +1,7 @@ +Specs +===== + +The Puppet project uses RSpec for testing. + +For more information on RSpec, see http://rspec.info/ + diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/rabbitmq/spec/acceptance/class_spec.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/rabbitmq/spec/acceptance/class_spec.rb new file mode 100644 index 00000000000..c0b5576736a --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/rabbitmq/spec/acceptance/class_spec.rb @@ -0,0 +1,96 @@ +require 'spec_helper_acceptance' + +describe 'rabbitmq class:' do + case fact('osfamily') + when 'RedHat' + package_name = 'rabbitmq-server' + service_name = 'rabbitmq-server' + when 'SUSE' + package_name = 'rabbitmq-server' + service_name = 'rabbitmq-server' + when 'Debian' + package_name = 'rabbitmq-server' + service_name = 'rabbitmq-server' + when 'Archlinux' + package_name = 'rabbitmq' + service_name = 'rabbitmq' + end + + context "default class inclusion" do + it 'should run successfully' do + pp = <<-EOS + class { 'rabbitmq': } + if $::osfamily == 'RedHat' { + class { 'erlang': epel_enable => true} + Class['erlang'] -> Class['rabbitmq'] + } + EOS + + # Apply twice to ensure no errors the second time. + apply_manifest(pp, :catch_failures => true) + expect(apply_manifest(pp, :catch_changes => true).exit_code).to be_zero + end + + describe package(package_name) do + it { should be_installed } + end + + describe service(service_name) do + it { should be_enabled } + it { should be_running } + end + end + + context "disable and stop service" do + it 'should run successfully' do + pp = <<-EOS + class { 'rabbitmq': + service_ensure => 'stopped', + } + if $::osfamily == 'RedHat' { + class { 'erlang': epel_enable => true} + Class['erlang'] -> Class['rabbitmq'] + } + EOS + + apply_manifest(pp, :catch_failures => true) + end + + describe service(service_name) do + it { should_not be_enabled } + it { should_not be_running } + end + end + + context "service is unmanaged" do + it 'should run successfully' do + pp_pre = <<-EOS + class { 'rabbitmq': } + if $::osfamily == 'RedHat' { + class { 'erlang': epel_enable => true} + Class['erlang'] -> Class['rabbitmq'] + } + EOS + + pp = <<-EOS + class { 'rabbitmq': + service_manage => false, + service_ensure => 'stopped', + } + if $::osfamily == 'RedHat' { + class { 'erlang': epel_enable => true} + Class['erlang'] -> Class['rabbitmq'] + } + EOS + + + apply_manifest(pp_pre, :catch_failures => true) + apply_manifest(pp, :catch_failures => true) + end + + describe service(service_name) do + it { should be_enabled } + it { should be_running } + end + end +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/rabbitmq/spec/acceptance/clustering_spec.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/rabbitmq/spec/acceptance/clustering_spec.rb new file mode 100644 index 00000000000..04627fa6ff6 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/rabbitmq/spec/acceptance/clustering_spec.rb @@ -0,0 +1,34 @@ +require 'spec_helper_acceptance' + +describe 'rabbitmq clustering' do + context 'rabbitmq::config_cluster => true' do + it 'should run successfully' do + pp = <<-EOS + class { 'rabbitmq': + config_cluster => true, + cluster_nodes => ['rabbit1', 'rabbit2'], + cluster_node_type => 'ram', + wipe_db_on_cookie_change => true, + } + if $::osfamily == 'RedHat' { + class { 'erlang': epel_enable => true} + Class['erlang'] -> Class['rabbitmq'] + } + EOS + + apply_manifest(pp, :catch_failures => true) + end + + describe file('/etc/rabbitmq/rabbitmq.config') do + it { should be_file } + it { should contain 'cluster_nodes' } + it { should contain 'rabbit@rabbit1' } + it { should contain 'rabbit@rabbit2' } + it { should contain 'ram' } + end + + describe file('/var/lib/rabbitmq/.erlang.cookie') do + it { should be_file } + end + end +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/rabbitmq/spec/acceptance/delete_guest_user_spec.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/rabbitmq/spec/acceptance/delete_guest_user_spec.rb new file mode 100644 index 00000000000..d480e88438d --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/rabbitmq/spec/acceptance/delete_guest_user_spec.rb @@ -0,0 +1,26 @@ +require 'spec_helper_acceptance' + +describe 'rabbitmq with delete_guest_user' do + context 'delete_guest_user' do + it 'should run successfully' do + pp = <<-EOS + class { 'rabbitmq': + port => '5672', + delete_guest_user => true, + } + if $::osfamily == 'RedHat' { + class { 'erlang': epel_enable => true} + Class['erlang'] -> Class['rabbitmq'] + } + EOS + + apply_manifest(pp, :catch_failures => true) + shell('rabbitmqctl list_users > /tmp/rabbitmqctl_users') + end + + describe file('/tmp/rabbitmqctl_users') do + it { should be_file } + it { should_not contain 'guest' } + end + end +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/rabbitmq/spec/acceptance/nodesets/default.yml b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/rabbitmq/spec/acceptance/nodesets/default.yml new file mode 100644 index 00000000000..ce47212a8c7 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/rabbitmq/spec/acceptance/nodesets/default.yml @@ -0,0 +1,11 @@ +HOSTS: + centos-64-x64: + roles: + - master + platform: el-6-x86_64 + box : centos-64-x64-vbox4210-nocm + box_url : http://puppet-vagrant-boxes.puppetlabs.com/centos-64-x64-vbox4210-nocm.box + hypervisor : vagrant +CONFIG: + log_level: debug + type: git diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/rabbitmq/spec/acceptance/nodesets/ubuntu-server-1310-x64.yml b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/rabbitmq/spec/acceptance/nodesets/ubuntu-server-1310-x64.yml new file mode 100644 index 00000000000..f4b2366f3bd --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/rabbitmq/spec/acceptance/nodesets/ubuntu-server-1310-x64.yml @@ -0,0 +1,11 @@ +HOSTS: + ubuntu-server-1310-x64: + roles: + - master + platform: ubuntu-13.10-amd64 + box : ubuntu-server-1310-x64-vbox4210-nocm + box_url : http://puppet-vagrant-boxes.puppetlabs.com/ubuntu-1310-x64-virtualbox-nocm.box + hypervisor : vagrant +CONFIG: + log_level : debug + type: git diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/rabbitmq/spec/acceptance/nodesets/ubuntu-server-1404-x64.yml b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/rabbitmq/spec/acceptance/nodesets/ubuntu-server-1404-x64.yml new file mode 100644 index 00000000000..4cb4ad43090 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/rabbitmq/spec/acceptance/nodesets/ubuntu-server-1404-x64.yml @@ -0,0 +1,11 @@ +HOSTS: + ubuntu-server-1404-x64: + roles: + - master + platform: ubuntu-14.04-amd64 + box : trusty-server-cloudimg-amd64-vagrant-disk1 + box_url : https://cloud-images.ubuntu.com/vagrant/trusty/current/trusty-server-cloudimg-amd64-vagrant-disk1.box + hypervisor : vagrant +CONFIG: + log_level : debug + type: git diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/rabbitmq/spec/acceptance/rabbitmqadmin_spec.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/rabbitmq/spec/acceptance/rabbitmqadmin_spec.rb new file mode 100644 index 00000000000..618f8203428 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/rabbitmq/spec/acceptance/rabbitmqadmin_spec.rb @@ -0,0 +1,46 @@ +require 'spec_helper_acceptance' + +describe 'rabbitmq::install::rabbitmqadmin class' do + context 'does nothing if service is unmanaged' do + it 'should run successfully' do + pp = <<-EOS + class { 'rabbitmq': + admin_enable => true, + service_manage => false, + } + if $::osfamily == 'RedHat' { + class { 'erlang': epel_enable => true} + Class['erlang'] -> Class['rabbitmq'] + } + EOS + + shell('rm -f /var/lib/rabbitmq/rabbitmqadmin') + apply_manifest(pp, :catch_failures => true) + end + + describe file('/var/lib/rabbitmq/rabbitmqadmin') do + it { should_not be_file } + end + end + + context 'downloads the cli tools' do + it 'should run successfully' do + pp = <<-EOS + class { 'rabbitmq': + admin_enable => true, + service_manage => true, + } + if $::osfamily == 'RedHat' { + class { 'erlang': epel_enable => true} + Class['erlang'] -> Class['rabbitmq'] + } + EOS + + apply_manifest(pp, :catch_failures => true) + end + + describe file('/var/lib/rabbitmq/rabbitmqadmin') do + it { should be_file } + end + end +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/rabbitmq/spec/acceptance/server_spec.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/rabbitmq/spec/acceptance/server_spec.rb new file mode 100644 index 00000000000..d99f995db53 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/rabbitmq/spec/acceptance/server_spec.rb @@ -0,0 +1,96 @@ +require 'spec_helper_acceptance' + +describe 'rabbitmq server:' do + case fact('osfamily') + when 'RedHat' + package_name = 'rabbitmq-server' + service_name = 'rabbitmq-server' + when 'SUSE' + package_name = 'rabbitmq-server' + service_name = 'rabbitmq-server' + when 'Debian' + package_name = 'rabbitmq-server' + service_name = 'rabbitmq-server' + when 'Archlinux' + package_name = 'rabbitmq' + service_name = 'rabbitmq' + end + + context "default class inclusion" do + it 'should run successfully' do + pp = <<-EOS + class { 'rabbitmq::server': } + if $::osfamily == 'RedHat' { + class { 'erlang': epel_enable => true} + Class['erlang'] -> Class['rabbitmq::server'] + } + EOS + + # Apply twice to ensure no errors the second time. + apply_manifest(pp, :catch_failures => true) + expect(apply_manifest(pp, :catch_changes => true).exit_code).to be_zero + end + + describe package(package_name) do + it { should be_installed } + end + + describe service(service_name) do + it { should be_enabled } + it { should be_running } + end + end + + context "disable and stop service" do + it 'should run successfully' do + pp = <<-EOS + class { 'rabbitmq::server': + service_ensure => 'stopped', + } + if $::osfamily == 'RedHat' { + class { 'erlang': epel_enable => true} + Class['erlang'] -> Class['rabbitmq::server'] + } + EOS + + apply_manifest(pp, :catch_failures => true) + end + + describe service(service_name) do + it { should_not be_enabled } + it { should_not be_running } + end + end + + context "service is unmanaged" do + it 'should run successfully' do + pp_pre = <<-EOS + class { 'rabbitmq::server': } + if $::osfamily == 'RedHat' { + class { 'erlang': epel_enable => true} + Class['erlang'] -> Class['rabbitmq::server'] + } + EOS + + pp = <<-EOS + class { 'rabbitmq::server': + service_manage => false, + service_ensure => 'stopped', + } + if $::osfamily == 'RedHat' { + class { 'erlang': epel_enable => true} + Class['erlang'] -> Class['rabbitmq::server'] + } + EOS + + + apply_manifest(pp_pre, :catch_failures => true) + apply_manifest(pp, :catch_failures => true) + end + + describe service(service_name) do + it { should be_enabled } + it { should be_running } + end + end +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/rabbitmq/spec/classes/rabbitmq_spec.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/rabbitmq/spec/classes/rabbitmq_spec.rb new file mode 100644 index 00000000000..3e577843e8a --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/rabbitmq/spec/classes/rabbitmq_spec.rb @@ -0,0 +1,486 @@ +require 'spec_helper' + +describe 'rabbitmq' do + + context 'on unsupported distributions' do + let(:facts) {{ :osfamily => 'Unsupported' }} + + it 'we fail' do + expect { subject }.to raise_error(/not supported on an Unsupported/) + end + end + + context 'on Debian' do + let(:facts) {{ :osfamily => 'Debian', :lsbdistid => 'Debian', :lsbdistcodename => 'squeeze' }} + it 'includes rabbitmq::repo::apt' do + should contain_class('rabbitmq::repo::apt') + end + + describe 'apt::source default values' do + let(:facts) {{ :osfamily => 'Debian' }} + it 'should add a repo with defaults values' do + contain_file('/etc/apt/sources.list.d/rabbitmq.list')\ + .with_content(/deb http\:\/\/www\.rabbitmq.com\/debian\/ testing main/) + end + end + + describe 'apt::source custom values' do + let(:params) { + { :location => 'http://www.foorepo.com/debian', + :release => 'unstable', + :repos => 'main' + }} + it 'should add a repo with custom new values' do + contain_file('/etc/apt/sources.list.d/rabbitmq.list')\ + .with_content(/deb http\:\/\/www\.foorepo.com\/debian\/ unstable main/) + end + end + end + + context 'on Debian' do + let(:params) {{ :manage_repos => false }} + let(:facts) {{ :osfamily => 'Debian', :lsbdistid => 'Debian', :lsbdistcodename => 'squeeze' }} + it 'does not include rabbitmq::repo::apt when manage_repos is false' do + should_not contain_class('rabbitmq::repo::apt') + end + end + + context 'on Redhat' do + let(:facts) {{ :osfamily => 'RedHat' }} + it 'includes rabbitmq::repo::rhel' do + should contain_class('rabbitmq::repo::rhel') + end + end + + context 'on Redhat' do + let(:params) {{ :manage_repos => false }} + let(:facts) {{ :osfamily => 'RedHat' }} + it 'does not include rabbitmq::repo::rhel when manage_repos is false' do + should_not contain_class('rabbitmq::repo::rhel') + end + end + + ['Debian', 'RedHat', 'SUSE', 'Archlinux'].each do |distro| + context "on #{distro}" do + let(:facts) {{ + :osfamily => distro, + :rabbitmq_erlang_cookie => 'EOKOWXQREETZSHFNTPEY', + :lsbdistcodename => 'squeeze', + :lsbdistid => 'Debian' + }} + + it { should contain_class('rabbitmq::install') } + it { should contain_class('rabbitmq::config') } + it { should contain_class('rabbitmq::service') } + + + context 'with admin_enable set to true' do + let(:params) {{ :admin_enable => true }} + context 'with service_manage set to true' do + it 'we enable the admin interface by default' do + should contain_class('rabbitmq::install::rabbitmqadmin') + should contain_rabbitmq_plugin('rabbitmq_management').with( + 'require' => 'Class[Rabbitmq::Install]', + 'notify' => 'Class[Rabbitmq::Service]' + ) + end + end + context 'with service_manage set to false' do + let(:params) {{ :admin_enable => true, :service_manage => false }} + it 'should do nothing' do + should_not contain_class('rabbitmq::install::rabbitmqadmin') + should_not contain_rabbitmq_plugin('rabbitmq_management') + end + end + end + + context 'deprecated parameters' do + describe 'cluster_disk_nodes' do + let(:params) {{ :cluster_disk_nodes => ['node1', 'node2'] }} + + it { should contain_notify('cluster_disk_nodes') } + end + end + + describe 'manages configuration directory correctly' do + it { should contain_file('/etc/rabbitmq').with( + 'ensure' => 'directory' + )} + end + + describe 'manages configuration file correctly' do + it { should contain_file('rabbitmq.config') } + end + + context 'configures config_cluster' do + let(:facts) {{ :osfamily => distro, :rabbitmq_erlang_cookie => 'ORIGINAL', :lsbdistid => 'Debian' }} + let(:params) {{ + :config_cluster => true, + :cluster_nodes => ['hare-1', 'hare-2'], + :cluster_node_type => 'ram', + :erlang_cookie => 'TESTCOOKIE', + :wipe_db_on_cookie_change => false + }} + + describe 'with defaults' do + it 'fails' do + expect{subject}.to raise_error(/^ERROR: The current erlang cookie is ORIGINAL/) + end + end + + describe 'with wipe_db_on_cookie_change set' do + let(:params) {{ + :config_cluster => true, + :cluster_nodes => ['hare-1', 'hare-2'], + :cluster_node_type => 'ram', + :erlang_cookie => 'TESTCOOKIE', + :wipe_db_on_cookie_change => true + }} + it 'wipes the database' do + should contain_exec('wipe_db') + should contain_file('erlang_cookie') + end + end + + describe 'correctly when cookies match' do + let(:params) {{ + :config_cluster => true, + :cluster_nodes => ['hare-1', 'hare-2'], + :cluster_node_type => 'ram', + :erlang_cookie => 'ORIGINAL', + :wipe_db_on_cookie_change => true + }} + it 'and doesnt wipe anything' do + should contain_file('erlang_cookie') + end + end + + describe 'and sets appropriate configuration' do + let(:params) {{ + :config_cluster => true, + :cluster_nodes => ['hare-1', 'hare-2'], + :cluster_node_type => 'ram', + :erlang_cookie => 'ORIGINAL', + :wipe_db_on_cookie_change => true + }} + it 'for cluster_nodes' do + should contain_file('rabbitmq.config').with({ + 'content' => /cluster_nodes.*\['rabbit@hare-1', 'rabbit@hare-2'\], ram/, + }) + end + + it 'for erlang_cookie' do + should contain_file('erlang_cookie').with({ + 'content' => 'ORIGINAL', + }) + end + end + end + + describe 'rabbitmq-env configuration' do + let(:params) {{ :environment_variables => { + 'RABBITMQ_NODE_IP_ADDRESS' => '1.1.1.1', + 'RABBITMQ_NODE_PORT' => '5656', + 'RABBITMQ_NODENAME' => 'HOSTNAME', + 'RABBITMQ_SERVICENAME' => 'RabbitMQ', + 'RABBITMQ_CONSOLE_LOG' => 'RabbitMQ.debug', + 'RABBITMQ_CTL_ERL_ARGS' => 'verbose', + 'RABBITMQ_SERVER_ERL_ARGS' => 'v', + 'RABBITMQ_SERVER_START_ARGS' => 'debug' + }}} + it 'should set environment variables' do + should contain_file('rabbitmq-env.config') \ + .with_content(/RABBITMQ_NODE_IP_ADDRESS=1.1.1.1/) \ + .with_content(/RABBITMQ_NODE_PORT=5656/) \ + .with_content(/RABBITMQ_NODENAME=HOSTNAME/) \ + .with_content(/RABBITMQ_SERVICENAME=RabbitMQ/) \ + .with_content(/RABBITMQ_CONSOLE_LOG=RabbitMQ.debug/) \ + .with_content(/RABBITMQ_CTL_ERL_ARGS=verbose/) \ + .with_content(/RABBITMQ_SERVER_ERL_ARGS=v/) \ + .with_content(/RABBITMQ_SERVER_START_ARGS=debug/) + end + end + + context 'delete_guest_user' do + describe 'should do nothing by default' do + it { should_not contain_rabbitmq_user('guest') } + end + + describe 'delete user when delete_guest_user set' do + let(:params) {{ :delete_guest_user => true }} + it 'removes the user' do + should contain_rabbitmq_user('guest').with( + 'ensure' => 'absent', + 'provider' => 'rabbitmqctl' + ) + end + end + end + + context 'configuration setting' do + describe 'node_ip_address when set' do + let(:params) {{ :node_ip_address => '172.0.0.1' }} + it 'should set RABBITMQ_NODE_IP_ADDRESS to specified value' do + contain_file('rabbitmq-env.config').with({ + 'content' => 'RABBITMQ_NODE_IP_ADDRESS=172.0.0.1', + }) + end + end + + describe 'stomp by default' do + it 'should not specify stomp parameters in rabbitmq.config' do + contain_file('rabbitmq.config').without({ + 'content' => /stomp/,}) + end + end + describe 'stomp when set' do + let(:params) {{ :config_stomp => true, :stomp_port => 5679 }} + it 'should specify stomp port in rabbitmq.config' do + contain_file('rabbitmq.config').with({ + 'content' => /rabbitmq_stomp.*tcp_listeners, \[5679\]/, + }) + end + end + describe 'stomp when set with ssl' do + let(:params) {{ :config_stomp => true, :stomp_port => 5679, :ssl_stomp_port => 5680 }} + it 'should specify stomp port and ssl stomp port in rabbitmq.config' do + contain_file('rabbitmq.config').with({ + 'content' => /rabbitmq_stomp.*tcp_listeners, \[5679\].*ssl_listeners, \[5680\]/, + }) + end + end + end + + describe 'configuring ldap authentication' do + let :params do + { :config_stomp => true, + :ldap_auth => true, + :ldap_server => 'ldap.example.com', + :ldap_user_dn_pattern => 'ou=users,dc=example,dc=com', + :ldap_use_ssl => false, + :ldap_port => '389', + :ldap_log => true + } + end + + it { should contain_rabbitmq_plugin('rabbitmq_auth_backend_ldap') } + + it 'should contain ldap parameters' do + verify_contents(subject, 'rabbitmq.config', + ['[', ' {rabbit, [', ' {auth_backends, [rabbit_auth_backend_internal, rabbit_auth_backend_ldap]},', ' ]}', + ' {rabbitmq_auth_backend_ldap, [', ' {other_bind, anon},', + ' {servers, ["ldap.example.com"]},', + ' {user_dn_pattern, "ou=users,dc=example,dc=com"},', ' {use_ssl, false},', + ' {port, 389},', ' {log, true}']) + end + end + + describe 'default_user and default_pass set' do + let(:params) {{ :default_user => 'foo', :default_pass => 'bar' }} + it 'should set default_user and default_pass to specified values' do + contain_file('rabbitmq.config').with({ + 'content' => /default_user, <<"foo">>.*default_pass, <<"bar">>/, + }) + end + end + + describe 'ssl options' do + let(:params) { + { :ssl => true, + :ssl_management_port => 3141, + :ssl_cacert => '/path/to/cacert', + :ssl_cert => '/path/to/cert', + :ssl_key => '/path/to/key' + } } + + it 'should set ssl options to specified values' do + contain_file('rabbitmq.config').with({ + 'content' => /ssl_listeners, \[3141\].* + ssl_options, \[{cacertfile,"\/path\/to\/cacert".* + certfile="\/path\/to\/cert".* + keyfile,"\/path\/to\/key/, + }) + end + end + + describe 'config_variables options' do + let(:params) {{ :config_variables => { + 'hipe_compile' => true, + 'vm_memory_high_watermark' => 0.4, + 'frame_max' => 131072, + 'collect_statistics' => "none", + 'auth_mechanisms' => "['PLAIN', 'AMQPLAIN']", + }}} + it 'should set environment variables' do + should contain_file('rabbitmq.config') \ + .with_content(/\{hipe_compile, true\}/) \ + .with_content(/\{vm_memory_high_watermark, 0.4\}/) \ + .with_content(/\{frame_max, 131072\}/) \ + .with_content(/\{collect_statistics, none\}/) \ + .with_content(/\{auth_mechanisms, \['PLAIN', 'AMQPLAIN'\]\}/) + end + end + + describe 'config_kernel_variables options' do + let(:params) {{ :config_kernel_variables => { + 'inet_dist_listen_min' => 9100, + 'inet_dist_listen_max' => 9105, + }}} + it 'should set config variables' do + should contain_file('rabbitmq.config') \ + .with_content(/\{inet_dist_listen_min, 9100\}/) \ + .with_content(/\{inet_dist_listen_max, 9105\}/) + end + end + + context 'delete_guest_user' do + describe 'should do nothing by default' do + it { should_not contain_rabbitmq_user('guest') } + end + + describe 'delete user when delete_guest_user set' do + let(:params) {{ :delete_guest_user => true }} + it 'removes the user' do + should contain_rabbitmq_user('guest').with( + 'ensure' => 'absent', + 'provider' => 'rabbitmqctl' + ) + end + end + end + + ## + ## rabbitmq::service + ## + describe 'service with default params' do + it { should contain_service('rabbitmq-server').with( + 'ensure' => 'running', + 'enable' => 'true', + 'hasstatus' => 'true', + 'hasrestart' => 'true' + )} + end + + describe 'service with ensure stopped' do + let :params do + { :service_ensure => 'stopped' } + end + + it { should contain_service('rabbitmq-server').with( + 'ensure' => 'stopped', + 'enable' => false + ) } + end + + describe 'service with ensure neither running neither stopped' do + let :params do + { :service_ensure => 'foo' } + end + + it 'should raise an error' do + expect { + should contain_service('rabbitmq-server').with( + 'ensure' => 'stopped' ) + }.to raise_error(Puppet::Error, /validate_re\(\): "foo" does not match "\^\(running\|stopped\)\$"/) + end + end + + describe 'service with service_manage equal to false' do + let :params do + { :service_manage => false } + end + + it { should_not contain_service('rabbitmq-server') } + end + + end + end + + ## + ## rabbitmq::install + ## + context "on RHEL" do + let(:facts) {{ :osfamily => 'RedHat' }} + let(:params) {{ :package_source => 'http://www.rabbitmq.com/releases/rabbitmq-server/v3.2.3/rabbitmq-server-3.2.3-1.noarch.rpm' }} + it 'installs the rabbitmq package' do + should contain_package('rabbitmq-server').with( + 'ensure' => 'installed', + 'name' => 'rabbitmq-server', + 'provider' => 'yum', + 'source' => 'http://www.rabbitmq.com/releases/rabbitmq-server/v3.2.3/rabbitmq-server-3.2.3-1.noarch.rpm' + ) + end + end + + context "on Debian" do + let(:facts) {{ :osfamily => 'Debian', :lsbdistid => 'Debian', :lsbdistcodename => 'precise' }} + it 'installs the rabbitmq package' do + should contain_package('rabbitmq-server').with( + 'ensure' => 'installed', + 'name' => 'rabbitmq-server', + 'provider' => 'apt' + ) + end + end + + context "on Archlinux" do + let(:facts) {{ :osfamily => 'Archlinux' }} + it 'installs the rabbitmq package' do + should contain_package('rabbitmq-server').with( + 'ensure' => 'installed', + 'name' => 'rabbitmq') + end + end + + describe 'repo management on Debian' do + let(:facts) {{ :osfamily => 'Debian', :lsbdistid => 'Debian' }} + + context 'with no pin' do + let(:params) {{ :package_apt_pin => '' }} + describe 'it sets up an apt::source' do + + it { should contain_apt__source('rabbitmq').with( + 'location' => 'http://www.rabbitmq.com/debian/', + 'release' => 'testing', + 'repos' => 'main', + 'include_src' => false, + 'key' => '056E8E56' + ) } + end + end + + context 'with pin' do + let(:params) {{ :package_apt_pin => '700' }} + describe 'it sets up an apt::source and pin' do + + it { should contain_apt__source('rabbitmq').with( + 'location' => 'http://www.rabbitmq.com/debian/', + 'release' => 'testing', + 'repos' => 'main', + 'include_src' => false, + 'key' => '056E8E56' + ) } + + it { should contain_apt__pin('rabbitmq').with( + 'packages' => 'rabbitmq-server', + 'priority' => '700' + ) } + + end + end + end + + ['RedHat', 'SuSE'].each do |distro| + describe "repo management on #{distro}" do + describe 'imports the key' do + let(:facts) {{ :osfamily => distro }} + let(:params) {{ :package_gpg_key => 'http://www.rabbitmq.com/rabbitmq-signing-key-public.asc' }} + + it { should contain_exec("rpm --import #{params[:package_gpg_key]}").with( + 'path' => ['/bin','/usr/bin','/sbin','/usr/sbin'] + ) } + end + end + end + +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/rabbitmq/spec/spec.opts b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/rabbitmq/spec/spec.opts new file mode 100644 index 00000000000..91cd6427ed6 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/rabbitmq/spec/spec.opts @@ -0,0 +1,6 @@ +--format +s +--colour +--loadby +mtime +--backtrace diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/rabbitmq/spec/spec_helper.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/rabbitmq/spec/spec_helper.rb new file mode 100644 index 00000000000..2c6f56649ae --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/rabbitmq/spec/spec_helper.rb @@ -0,0 +1 @@ +require 'puppetlabs_spec_helper/module_spec_helper' diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/rabbitmq/spec/spec_helper_acceptance.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/rabbitmq/spec/spec_helper_acceptance.rb new file mode 100644 index 00000000000..1dbc82a8658 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/rabbitmq/spec/spec_helper_acceptance.rb @@ -0,0 +1,38 @@ +require 'beaker-rspec' + +UNSUPPORTED_PLATFORMS = [] + +unless ENV['RS_PROVISION'] == 'no' or ENV['BEAKER_provision'] == 'no' + if hosts.first.is_pe? + install_pe + else + install_puppet + end + hosts.each do |host| + on hosts, "mkdir -p #{host['distmoduledir']}" + end +end + +RSpec.configure do |c| + # Project root + proj_root = File.expand_path(File.join(File.dirname(__FILE__), '..')) + + # Readable test descriptions + c.formatter = :documentation + c.before :suite do + puppet_module_install(:source => proj_root, :module_name => 'rabbitmq') + hosts.each do |host| + + shell("/bin/touch #{default['puppetpath']}/hiera.yaml") + shell('puppet module install puppetlabs-stdlib', { :acceptable_exit_codes => [0,1] }) + if fact('osfamily') == 'Debian' + shell('puppet module install puppetlabs-apt', { :acceptable_exit_codes => [0,1] }) + end + shell('puppet module install nanliu-staging', { :acceptable_exit_codes => [0,1] }) + if fact('osfamily') == 'RedHat' + shell('puppet module install garethr-erlang', { :acceptable_exit_codes => [0,1] }) + end + end + end +end + diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/rabbitmq/spec/unit/facts/rabbitmq_erlang_cookie_spec.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/rabbitmq/spec/unit/facts/rabbitmq_erlang_cookie_spec.rb new file mode 100644 index 00000000000..f4daf79bd62 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/rabbitmq/spec/unit/facts/rabbitmq_erlang_cookie_spec.rb @@ -0,0 +1,19 @@ +require 'spec_helper' + +describe 'rabbitmq_erlang_cookie', :type => :fact do + before(:each) { Facter.clear } + + it 'works correctly' do + Facter.fact(:osfamily).stubs(:value).returns('RedHat') + File.stubs(:exists?).with('/var/lib/rabbitmq/.erlang.cookie').returns(true) + File.stubs(:read).with('/var/lib/rabbitmq/.erlang.cookie').returns('THISISACOOKIE') + Facter.fact(:rabbitmq_erlang_cookie).value.should == 'THISISACOOKIE' + end + + it 'fails if file doesnt exist' do + Facter.fact(:osfamily).stubs(:value).returns('RedHat') + File.stubs(:exists?).with('/var/lib/rabbitmq/.erlang.cookie').returns(false) + Facter.fact(:rabbitmq_erlang_cookie).value.should == nil + end + +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/rabbitmq/spec/unit/puppet/provider/rabbitmq_exchange/rabbitmqadmin_spec.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/rabbitmq/spec/unit/puppet/provider/rabbitmq_exchange/rabbitmqadmin_spec.rb new file mode 100644 index 00000000000..ac68970cf75 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/rabbitmq/spec/unit/puppet/provider/rabbitmq_exchange/rabbitmqadmin_spec.rb @@ -0,0 +1,65 @@ +require 'puppet' +require 'mocha' +RSpec.configure do |config| + config.mock_with :mocha +end +provider_class = Puppet::Type.type(:rabbitmq_exchange).provider(:rabbitmqadmin) +describe provider_class do + before :each do + @resource = Puppet::Type::Rabbitmq_exchange.new( + {:name => 'amq.direct@/', + :type => :topic} + ) + @provider = provider_class.new(@resource) + end + + it 'should return instances' do + provider_class.expects(:rabbitmqctl).with('list_vhosts').returns <<-EOT +Listing vhosts ... +/ +...done. +EOT + provider_class.expects(:rabbitmqctl).with('list_exchanges', '-p', '/', 'name', 'type').returns <<-EOT +Listing exchanges ... + direct + amq.direct direct + amq.fanout fanout + amq.headers headers + amq.match headers + amq.rabbitmq.log topic + amq.rabbitmq.trace topic + amq.topic topic + ...done. +EOT + instances = provider_class.instances + instances.size.should == 8 + end + + it 'should call rabbitmqadmin to create' do + @provider.expects(:rabbitmqadmin).with('declare', 'exchange', '--vhost=/', '--user=guest', '--password=guest', 'name=amq.direct', 'type=topic') + @provider.create + end + + it 'should call rabbitmqadmin to destroy' do + @provider.expects(:rabbitmqadmin).with('delete', 'exchange', '--vhost=/', '--user=guest', '--password=guest', 'name=amq.direct') + @provider.destroy + end + + context 'specifying credentials' do + before :each do + @resource = Puppet::Type::Rabbitmq_exchange.new( + {:name => 'amq.direct@/', + :type => :topic, + :user => 'colin', + :password => 'secret', + } + ) + @provider = provider_class.new(@resource) + end + + it 'should call rabbitmqadmin to create' do + @provider.expects(:rabbitmqadmin).with('declare', 'exchange', '--vhost=/', '--user=colin', '--password=secret', 'name=amq.direct', 'type=topic') + @provider.create + end + end +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/rabbitmq/spec/unit/puppet/provider/rabbitmq_user/rabbitmqctl_spec.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/rabbitmq/spec/unit/puppet/provider/rabbitmq_user/rabbitmqctl_spec.rb new file mode 100644 index 00000000000..ea4233cba13 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/rabbitmq/spec/unit/puppet/provider/rabbitmq_user/rabbitmqctl_spec.rb @@ -0,0 +1,150 @@ +require 'puppet' +require 'mocha' +RSpec.configure do |config| + config.mock_with :mocha +end +provider_class = Puppet::Type.type(:rabbitmq_user).provider(:rabbitmqctl) +describe provider_class do + before :each do + @resource = Puppet::Type::Rabbitmq_user.new( + {:name => 'foo', :password => 'bar'} + ) + @provider = provider_class.new(@resource) + end + it 'should match user names' do + @provider.expects(:rabbitmqctl).with('list_users').returns <<-EOT +Listing users ... +foo +...done. +EOT + @provider.exists?.should == 'foo' + end + it 'should match user names with 2.4.1 syntax' do + @provider.expects(:rabbitmqctl).with('list_users').returns <<-EOT +Listing users ... +foo bar +...done. +EOT + @provider.exists?.should == 'foo bar' + end + it 'should not match if no users on system' do + @provider.expects(:rabbitmqctl).with('list_users').returns <<-EOT +Listing users ... +...done. +EOT + @provider.exists?.should be_nil + end + it 'should not match if no matching users on system' do + @provider.expects(:rabbitmqctl).with('list_users').returns <<-EOT +Listing users ... +fooey +...done. +EOT + @provider.exists?.should be_nil + end + it 'should match user names from list' do + @provider.expects(:rabbitmqctl).with('list_users').returns <<-EOT +Listing users ... +one +two three +foo +bar +...done. +EOT + @provider.exists?.should == 'foo' + end + it 'should create user and set password' do + @resource[:password] = 'bar' + @provider.expects(:rabbitmqctl).with('add_user', 'foo', 'bar') + @provider.create + end + it 'should create user, set password and set to admin' do + @resource[:password] = 'bar' + @resource[:admin] = 'true' + @provider.expects(:rabbitmqctl).with('add_user', 'foo', 'bar') + @provider.expects(:rabbitmqctl).with('list_users').returns <<-EOT +Listing users ... +foo [] +icinga [monitoring] +kitchen [] +kitchen2 [abc, def, ghi] +...done. +EOT + @provider.expects(:rabbitmqctl).with('set_user_tags', 'foo', ['administrator']) + @provider.create + end + it 'should call rabbitmqctl to delete' do + @provider.expects(:rabbitmqctl).with('delete_user', 'foo') + @provider.destroy + end + it 'should be able to retrieve admin value' do + @provider.expects(:rabbitmqctl).with('list_users').returns <<-EOT +Listing users ... +foo [administrator] +...done. +EOT + @provider.admin.should == :true + @provider.expects(:rabbitmqctl).with('list_users').returns <<-EOT +Listing users ... +one [administrator] +foo [] +...done. +EOT + @provider.admin.should == :false + end + it 'should fail if admin value is invalid' do + @provider.expects(:rabbitmqctl).with('list_users').returns <<-EOT +Listing users ... +foo fail +...done. +EOT + expect { @provider.admin }.to raise_error(Puppet::Error, /Could not match line/) + end + it 'should be able to set admin value' do + @provider.expects(:rabbitmqctl).with('list_users').returns <<-EOT +Listing users ... +foo [] +icinga [monitoring] +kitchen [] +kitchen2 [abc, def, ghi] +...done. +EOT + @provider.expects(:rabbitmqctl).with('set_user_tags', 'foo', ['administrator']) + @provider.admin=:true + end + it 'should not interfere with existing tags on the user when setting admin value' do + @provider.expects(:rabbitmqctl).with('list_users').returns <<-EOT +Listing users ... +foo [bar, baz] +icinga [monitoring] +kitchen [] +kitchen2 [abc, def, ghi] +...done. +EOT + @provider.expects(:rabbitmqctl).with('set_user_tags', 'foo', ['bar','baz', 'administrator'].sort) + @provider.admin=:true + end + it 'should be able to unset admin value' do + @provider.expects(:rabbitmqctl).with('list_users').returns <<-EOT +Listing users ... +foo [administrator] +guest [administrator] +icinga [] +...done. +EOT + @provider.expects(:rabbitmqctl).with('set_user_tags', 'foo', []) + @provider.admin=:false + end + it 'should not interfere with existing tags on the user when unsetting admin value' do + @provider.expects(:rabbitmqctl).with('list_users').returns <<-EOT +Listing users ... +foo [administrator, bar, baz] +icinga [monitoring] +kitchen [] +kitchen2 [abc, def, ghi] +...done. +EOT + @provider.expects(:rabbitmqctl).with('set_user_tags', 'foo', ['bar','baz'].sort) + @provider.admin=:false + end +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/rabbitmq/spec/unit/puppet/provider/rabbitmq_user_permissions/rabbitmqctl_spec.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/rabbitmq/spec/unit/puppet/provider/rabbitmq_user_permissions/rabbitmqctl_spec.rb new file mode 100644 index 00000000000..a8824fdf429 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/rabbitmq/spec/unit/puppet/provider/rabbitmq_user_permissions/rabbitmqctl_spec.rb @@ -0,0 +1,109 @@ +require 'puppet' +require 'mocha' +RSpec.configure do |config| + config.mock_with :mocha +end +describe 'Puppet::Type.type(:rabbitmq_user_permissions).provider(:rabbitmqctl)' do + before :each do + @provider_class = Puppet::Type.type(:rabbitmq_user_permissions).provider(:rabbitmqctl) + @resource = Puppet::Type::Rabbitmq_user_permissions.new( + {:name => 'foo@bar'} + ) + @provider = @provider_class.new(@resource) + end + after :each do + @provider_class.instance_variable_set(:@users, nil) + end + it 'should match user permissions from list' do + @provider.class.expects(:rabbitmqctl).with('list_user_permissions', 'foo').returns <<-EOT +Listing users ... +bar 1 2 3 +...done. +EOT + @provider.exists?.should == {:configure=>"1", :write=>"2", :read=>"3"} + end + it 'should match user permissions with empty columns' do + @provider.class.expects(:rabbitmqctl).with('list_user_permissions', 'foo').returns <<-EOT +Listing users ... +bar 3 +...done. +EOT + @provider.exists?.should == {:configure=>"", :write=>"", :read=>"3"} + end + it 'should not match user permissions with more than 3 columns' do + @provider.class.expects(:rabbitmqctl).with('list_user_permissions', 'foo').returns <<-EOT +Listing users ... +bar 1 2 3 4 +...done. +EOT + expect { @provider.exists? }.to raise_error(Puppet::Error, /cannot parse line from list_user_permissions/) + end + it 'should not match an empty list' do + @provider.class.expects(:rabbitmqctl).with('list_user_permissions', 'foo').returns <<-EOT +Listing users ... +...done. +EOT + @provider.exists?.should == nil + end + it 'should create default permissions' do + @provider.instance_variable_set(:@should_vhost, "bar") + @provider.instance_variable_set(:@should_user, "foo") + @provider.expects(:rabbitmqctl).with('set_permissions', '-p', 'bar', 'foo', "''", "''", "''") + @provider.create + end + it 'should destroy permissions' do + @provider.instance_variable_set(:@should_vhost, "bar") + @provider.instance_variable_set(:@should_user, "foo") + @provider.expects(:rabbitmqctl).with('clear_permissions', '-p', 'bar', 'foo') + @provider.destroy + end + {:configure_permission => '1', :write_permission => '2', :read_permission => '3'}.each do |k,v| + it "should be able to retrieve #{k}" do + @provider.class.expects(:rabbitmqctl).with('list_user_permissions', 'foo').returns <<-EOT +Listing users ... +bar 1 2 3 +...done. +EOT + @provider.send(k).should == v + end + end + {:configure_permission => '1', :write_permission => '2', :read_permission => '3'}.each do |k,v| + it "should be able to retrieve #{k} after exists has been called" do + @provider.class.expects(:rabbitmqctl).with('list_user_permissions', 'foo').returns <<-EOT +Listing users ... +bar 1 2 3 +...done. +EOT + @provider.exists? + @provider.send(k).should == v + end + end + {:configure_permission => ['foo', '2', '3'], + :read_permission => ['1', '2', 'foo'], + :write_permission => ['1', 'foo', '3'] + }.each do |perm, columns| + it "should be able to sync #{perm}" do + @provider.class.expects(:rabbitmqctl).with('list_user_permissions', 'foo').returns <<-EOT +Listing users ... +bar 1 2 3 +...done. +EOT + @provider.resource[perm] = 'foo' + @provider.expects(:rabbitmqctl).with('set_permissions', '-p', 'bar', 'foo', *columns) + @provider.send("#{perm}=".to_sym, 'foo') + end + end + it 'should only call set_permissions once' do + @provider.class.expects(:rabbitmqctl).with('list_user_permissions', 'foo').returns <<-EOT +Listing users ... +bar 1 2 3 +...done. +EOT + @provider.resource[:configure_permission] = 'foo' + @provider.resource[:read_permission] = 'foo' + @provider.expects(:rabbitmqctl).with('set_permissions', '-p', 'bar', 'foo', 'foo', '2', 'foo').once + @provider.configure_permission='foo' + @provider.read_permission='foo' + end +end + diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/rabbitmq/spec/unit/puppet/provider/rabbitmq_vhost/rabbitmqctl_spec.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/rabbitmq/spec/unit/puppet/provider/rabbitmq_vhost/rabbitmqctl_spec.rb new file mode 100644 index 00000000000..a1f89ad2ce3 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/rabbitmq/spec/unit/puppet/provider/rabbitmq_vhost/rabbitmqctl_spec.rb @@ -0,0 +1,45 @@ +require 'puppet' +require 'mocha' +RSpec.configure do |config| + config.mock_with :mocha +end +provider_class = Puppet::Type.type(:rabbitmq_vhost).provider(:rabbitmqctl) +describe provider_class do + before :each do + @resource = Puppet::Type::Rabbitmq_vhost.new( + {:name => 'foo'} + ) + @provider = provider_class.new(@resource) + end + it 'should match vhost names' do + @provider.expects(:rabbitmqctl).with('list_vhosts').returns <<-EOT +Listing vhosts ... +foo +...done. +EOT + @provider.exists?.should == 'foo' + end + it 'should not match if no vhosts on system' do + @provider.expects(:rabbitmqctl).with('list_vhosts').returns <<-EOT +Listing vhosts ... +...done. +EOT + @provider.exists?.should be_nil + end + it 'should not match if no matching vhosts on system' do + @provider.expects(:rabbitmqctl).with('list_vhosts').returns <<-EOT +Listing vhosts ... +fooey +...done. +EOT + @provider.exists?.should be_nil + end + it 'should call rabbitmqctl to create' do + @provider.expects(:rabbitmqctl).with('add_vhost', 'foo') + @provider.create + end + it 'should call rabbitmqctl to create' do + @provider.expects(:rabbitmqctl).with('delete_vhost', 'foo') + @provider.destroy + end +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/rabbitmq/spec/unit/puppet/type/rabbitmq_exchange_spec.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/rabbitmq/spec/unit/puppet/type/rabbitmq_exchange_spec.rb new file mode 100644 index 00000000000..c4c2caa98bc --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/rabbitmq/spec/unit/puppet/type/rabbitmq_exchange_spec.rb @@ -0,0 +1,54 @@ +require 'puppet' +require 'puppet/type/rabbitmq_exchange' +describe Puppet::Type.type(:rabbitmq_exchange) do + before :each do + @exchange = Puppet::Type.type(:rabbitmq_exchange).new( + :name => 'foo@bar', + :type => :topic + ) + end + it 'should accept an exchange name' do + @exchange[:name] = 'dan@pl' + @exchange[:name].should == 'dan@pl' + end + it 'should require a name' do + expect { + Puppet::Type.type(:rabbitmq_exchange).new({}) + }.to raise_error(Puppet::Error, 'Title or name must be provided') + end + it 'should not allow whitespace in the name' do + expect { + @exchange[:name] = 'b r' + }.to raise_error(Puppet::Error, /Valid values match/) + end + it 'should not allow names without @' do + expect { + @exchange[:name] = 'b_r' + }.to raise_error(Puppet::Error, /Valid values match/) + end + + it 'should accept an exchange type' do + @exchange[:type] = :direct + @exchange[:type].should == :direct + end + it 'should require a type' do + expect { + Puppet::Type.type(:rabbitmq_exchange).new(:name => 'foo@bar') + }.to raise_error(/.*must set type when creating exchange.*/) + end + it 'should not require a type when destroying' do + expect { + Puppet::Type.type(:rabbitmq_exchange).new(:name => 'foo@bar', :ensure => :absent) + }.to_not raise_error + end + + it 'should accept a user' do + @exchange[:user] = :root + @exchange[:user].should == :root + end + + it 'should accept a password' do + @exchange[:password] = :PaSsw0rD + @exchange[:password].should == :PaSsw0rD + end +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/rabbitmq/spec/unit/puppet/type/rabbitmq_user_permissions_spec.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/rabbitmq/spec/unit/puppet/type/rabbitmq_user_permissions_spec.rb new file mode 100644 index 00000000000..7cb66eac366 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/rabbitmq/spec/unit/puppet/type/rabbitmq_user_permissions_spec.rb @@ -0,0 +1,55 @@ +require 'puppet' +require 'puppet/type/rabbitmq_user_permissions' +describe Puppet::Type.type(:rabbitmq_user_permissions) do + before :each do + @perms = Puppet::Type.type(:rabbitmq_user_permissions).new(:name => 'foo@bar') + end + it 'should accept a valid hostname name' do + @perms[:name] = 'dan@bar' + @perms[:name].should == 'dan@bar' + end + it 'should require a name' do + expect { + Puppet::Type.type(:rabbitmq_user_permissions).new({}) + }.to raise_error(Puppet::Error, 'Title or name must be provided') + end + it 'should fail when names dont have a @' do + expect { + @perms[:name] = 'bar' + }.to raise_error(Puppet::Error, /Valid values match/) + end + [:configure_permission, :read_permission, :write_permission].each do |param| + it 'should not default to anything' do + @perms[param].should == nil + end + it "should accept a valid regex for #{param}" do + @perms[param] = '.*?' + @perms[param].should == '.*?' + end + it "should accept an empty string for #{param}" do + @perms[param] = '' + @perms[param].should == '' + end + it "should not accept invalid regex for #{param}" do + expect { + @perms[param] = '*' + }.to raise_error(Puppet::Error, /Invalid regexp/) + end + end + {:rabbitmq_vhost => 'dan@test', :rabbitmq_user => 'test@dan'}.each do |k,v| + it "should autorequire #{k}" do + if k == :rabbitmq_vhost + vhost = Puppet::Type.type(k).new(:name => "test") + else + vhost = Puppet::Type.type(k).new(:name => "test", :password => 'pass') + end + perm = Puppet::Type.type(:rabbitmq_user_permissions).new(:name => v) + config = Puppet::Resource::Catalog.new :testing do |conf| + [vhost, perm].each { |resource| conf.add_resource resource } + end + rel = perm.autorequire[0] + rel.source.ref.should == vhost.ref + rel.target.ref.should == perm.ref + end + end +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/rabbitmq/spec/unit/puppet/type/rabbitmq_user_spec.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/rabbitmq/spec/unit/puppet/type/rabbitmq_user_spec.rb new file mode 100644 index 00000000000..92e69055797 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/rabbitmq/spec/unit/puppet/type/rabbitmq_user_spec.rb @@ -0,0 +1,42 @@ +require 'puppet' +require 'puppet/type/rabbitmq_user' +describe Puppet::Type.type(:rabbitmq_user) do + before :each do + @user = Puppet::Type.type(:rabbitmq_user).new(:name => 'foo', :password => 'pass') + end + it 'should accept a user name' do + @user[:name] = 'dan' + @user[:name].should == 'dan' + @user[:admin].should == :false + end + it 'should accept a password' do + @user[:password] = 'foo' + @user[:password].should == 'foo' + end + it 'should require a password' do + expect { + Puppet::Type.type(:rabbitmq_user).new(:name => 'foo') + }.to raise_error(/must set password/) + end + it 'should require a name' do + expect { + Puppet::Type.type(:rabbitmq_user).new({}) + }.to raise_error(Puppet::Error, 'Title or name must be provided') + end + it 'should not allow whitespace in the name' do + expect { + @user[:name] = 'b r' + }.to raise_error(Puppet::Error, /Valid values match/) + end + [true, false, 'true', 'false'].each do |val| + it "admin property should accept #{val}" do + @user[:admin] = val + @user[:admin].should == val.to_s.to_sym + end + end + it 'should not accept non-boolean values for admin' do + expect { + @user[:admin] = 'yes' + }.to raise_error(Puppet::Error, /Invalid value/) + end +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/rabbitmq/spec/unit/puppet/type/rabbitmq_vhost_spec.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/rabbitmq/spec/unit/puppet/type/rabbitmq_vhost_spec.rb new file mode 100644 index 00000000000..70b8e374149 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/rabbitmq/spec/unit/puppet/type/rabbitmq_vhost_spec.rb @@ -0,0 +1,21 @@ +require 'puppet' +require 'puppet/type/rabbitmq_vhost' +describe Puppet::Type.type(:rabbitmq_vhost) do + before :each do + @vhost = Puppet::Type.type(:rabbitmq_vhost).new(:name => 'foo') + end + it 'should accept a vhost name' do + @vhost[:name] = 'dan' + @vhost[:name].should == 'dan' + end + it 'should require a name' do + expect { + Puppet::Type.type(:rabbitmq_vhost).new({}) + }.to raise_error(Puppet::Error, 'Title or name must be provided') + end + it 'should not allow whitespace in the name' do + expect { + @vhost[:name] = 'b r' + }.to raise_error(Puppet::Error, /Valid values match/) + end +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/rabbitmq/templates/README.markdown b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/rabbitmq/templates/README.markdown new file mode 100644 index 00000000000..575bbeaef8d --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/rabbitmq/templates/README.markdown @@ -0,0 +1,23 @@ +Templates +========= + +Puppet supports templates and templating via ERB, which is part of the Ruby +standard library and is used for many other projects including Ruby on Rails. +Templates allow you to manage the content of template files, for example +configuration files that cannot yet be managed as a Puppet type. Learn more at +http://projects.puppetlabs.com/projects/puppet/wiki/Puppet_Templating + +You can use templates like this: + + class myclass { + package { mypackage: ensure => latest } + service { myservice: ensure => running } + file { "/etc/myfile": + content => template("mymodule/myfile.erb") + } + } + +The templates are searched for in: + + $templatedir/mymodule/myfile.erb + $modulepath/mymodule/templates/myfile.erb diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/rabbitmq/templates/rabbitmq-env.conf.erb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/rabbitmq/templates/rabbitmq-env.conf.erb new file mode 100644 index 00000000000..0c6b5d19849 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/rabbitmq/templates/rabbitmq-env.conf.erb @@ -0,0 +1,5 @@ +<%- @environment_variables.keys.sort.each do |key| -%> +<%- if @environment_variables[key] != 'UNSET' -%> +<%= key %>=<%= @environment_variables[key] %> +<%- end -%> +<%- end -%> diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/rabbitmq/templates/rabbitmq.config.erb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/rabbitmq/templates/rabbitmq.config.erb new file mode 100644 index 00000000000..766192dfdac --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/rabbitmq/templates/rabbitmq.config.erb @@ -0,0 +1,53 @@ +% This file managed by Puppet +% Template Path: <%= @module_name %>/templates/rabbitmq.config +[ + {rabbit, [ +<% if @ldap_auth -%> + {auth_backends, [rabbit_auth_backend_internal, rabbit_auth_backend_ldap]}, +<% end -%> +<% if @config_cluster -%> + {cluster_nodes, {[<%= @r_cluster_nodes.map { |n| "\'rabbit@#{n}\'" }.join(', ') %>], <%= @cluster_node_type %>}}, + {cluster_partition_handling, <%= @cluster_partition_handling %>}, +<% end -%> +<%- if @ssl %> + {ssl_listeners, [<%= @ssl_management_port %>]}, + {ssl_options, [{cacertfile,"<%= @ssl_cacert %>"}, + {certfile,"<%= @ssl_cert %>"}, + {keyfile,"<%= @ssl_key %>"}, + {verify,<%= @ssl_verify %>}, + {fail_if_no_peer_cert,<%= @ssl_fail_if_no_peer_cert %>}]}, +<%- end -%> +<% if @config_variables -%> +<%- @config_variables.keys.sort.each do |key| -%> + {<%= key %>, <%= @config_variables[key] %>}, +<%- end -%> +<%- end -%> + {default_user, <<"<%= @default_user %>">>}, + {default_pass, <<"<%= @default_pass %>">>} + ]}<% if @config_kernel_variables -%>, + {kernel, [ + <%= @config_kernel_variables.sort.map{|k,v| "{#{k}, #{v}}"}.join(",\n ") %> + ]} +<%- end -%> +<% if @config_stomp -%>, +% Configure the Stomp Plugin listening port + {rabbitmq_stomp, [ + {tcp_listeners, [<%= @stomp_port %>]} + <%- if @ssl_stomp_port -%>, + {ssl_listeners, [<%= @ssl_stomp_port %>]} + <%- end -%> + ]} +<%- if @ldap_auth -%>, +% Configure the LDAP authentication plugin + {rabbitmq_auth_backend_ldap, [ + {other_bind, anon}, + {servers, ["<%= @ldap_server %>"]}, + {user_dn_pattern, "<%= @ldap_user_dn_pattern %>"}, + {use_ssl, <%= @ldap_use_ssl %>}, + {port, <%= @ldap_port %>}, + {log, <%= @ldap_log %>} + ]} +<% end -%> +<%- end -%> +]. +% EOF diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/rabbitmq/tests/erlang_deps.pp b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/rabbitmq/tests/erlang_deps.pp new file mode 100644 index 00000000000..d34d9441f14 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/rabbitmq/tests/erlang_deps.pp @@ -0,0 +1,5 @@ +# install first the garethr-erlang module. See README.md +include 'erlang' + +class { 'erlang': epel_enable => true} +Class['erlang'] -> Class['rabbitmq'] diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/rabbitmq/tests/full.pp b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/rabbitmq/tests/full.pp new file mode 100644 index 00000000000..c6dfc5cf0ca --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/rabbitmq/tests/full.pp @@ -0,0 +1,21 @@ +class { 'rabbitmq::repo::apt': + pin => '900', +}-> +class { 'rabbitmq::server': + delete_guest_user => true, +# version => '2.4.1', +}-> +rabbitmq_user { 'dan': + admin => true, + password => 'pass', + provider => 'rabbitmqctl', +}-> +rabbitmq_vhost { 'myhost': + provider => 'rabbitmqctl', +} +rabbitmq_user_permissions { 'dan@myhost': + configure_permission => '.*', + read_permission => '.*', + write_permission => '.*', + provider => 'rabbitmqctl', +} diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/rabbitmq/tests/permissions/add.pp b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/rabbitmq/tests/permissions/add.pp new file mode 100644 index 00000000000..fb71af14317 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/rabbitmq/tests/permissions/add.pp @@ -0,0 +1,9 @@ +rabbitmq_user { 'blah7': + password => 'foo', +} +rabbitmq_vhost { 'test5': } +rabbitmq_user_permissions { 'blah7@test5': + configure_permission => 'config2', + read_permission => 'ready', + #write_permission => 'ready', +} diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/rabbitmq/tests/plugin.pp b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/rabbitmq/tests/plugin.pp new file mode 100644 index 00000000000..6c5605b9e2a --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/rabbitmq/tests/plugin.pp @@ -0,0 +1,11 @@ +class { 'rabbitmq::server': + config_stomp => true, +} + +$rabbitmq_plugins = [ 'amqp_client', 'rabbitmq_stomp' ] + +rabbitmq_plugin { $rabbitmq_plugins: + ensure => present, + require => Class['rabbitmq::server'], + provider => 'rabbitmqplugins', +} diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/rabbitmq/tests/repo/apt.pp b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/rabbitmq/tests/repo/apt.pp new file mode 100644 index 00000000000..f1373737fdc --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/rabbitmq/tests/repo/apt.pp @@ -0,0 +1,2 @@ +# requires pupetlabs-apt +include rabbitmq::repo::apt diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/rabbitmq/tests/server.pp b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/rabbitmq/tests/server.pp new file mode 100644 index 00000000000..caea893772f --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/rabbitmq/tests/server.pp @@ -0,0 +1,5 @@ +class { 'rabbitmq::server': + port => '5672', + delete_guest_user => true, + version => 'latest', +} diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/rabbitmq/tests/service.pp b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/rabbitmq/tests/service.pp new file mode 100644 index 00000000000..9a00d2b6d3b --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/rabbitmq/tests/service.pp @@ -0,0 +1 @@ +class { 'rabbitmq::service': } diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/rabbitmq/tests/site.pp b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/rabbitmq/tests/site.pp new file mode 100644 index 00000000000..75ebcfed325 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/rabbitmq/tests/site.pp @@ -0,0 +1,16 @@ +node default { + + $rabbitmq_plugins = [ 'amqp_client', 'rabbitmq_stomp' ] + + class { 'rabbitmq::server': + config => '[ {rabbit_stomp, [{tcp_listeners, [1234]} ]} ].', + } + + # Required for MCollective + rabbitmq_plugin { $rabbitmq_plugins: + ensure => present, + require => Class['rabbitmq::server'], + provider => 'rabbitmqplugins', + } +} + diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/rabbitmq/tests/user/add.pp b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/rabbitmq/tests/user/add.pp new file mode 100644 index 00000000000..2c3a87096af --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/rabbitmq/tests/user/add.pp @@ -0,0 +1,4 @@ +rabbitmq_user { ['blah2', 'blah3', 'blah4']: + password => 'phoey!', + #provider => 'rabbitmqctl', +} diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/rabbitmq/tests/vhosts/add.pp b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/rabbitmq/tests/vhosts/add.pp new file mode 100644 index 00000000000..d818a1923d7 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/rabbitmq/tests/vhosts/add.pp @@ -0,0 +1 @@ +rabbitmq_vhost { ['fooey', 'blah']: } diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/redis/.travis.yml b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/redis/.travis.yml new file mode 100644 index 00000000000..079eb44c72c --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/redis/.travis.yml @@ -0,0 +1,24 @@ +--- +language: ruby +rvm: +- 1.8.7 +- 1.9.3 +script: +- git clone -q git://github.com/puppetlabs/ghpublisher.git .forge-releng +- .forge-releng/publish +branches: + only: + - master +env: + global: + - PUBLISHER_LOGIN=fsalum + - secure: "DENnYQVOgU9VOxYGjKsCdsoCNeZ42yf751SFhK9s7Fmu790KiQvnY7Vjs+Sj\nrQ3xYXProkMYtx+KVbtzQo02oSYRF+sVYyBza3066bir0GK1YPdgrpT9Q3vo\nuT4+kfaeJK8StiBRWvPlyY3QrDbVsnIuQ+NxBFxjnZdDg350G8Q=" + matrix: + - PUPPET_VERSION=2.7.25 + - PUPPET_VERSION=3.1.1 + - PUPPET_VERSION=3.2.4 + - PUPPET_VERSION=3.3.2 + - PUPPET_VERSION=3.4.2 +notifications: + email: false +gemfile: Gemfile diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/redis/CHANGELOG b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/redis/CHANGELOG new file mode 100644 index 00000000000..02800f976de --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/redis/CHANGELOG @@ -0,0 +1,63 @@ +## fsalum-redis changelog + +Release notes for the fsalum-redis module. + +------------------------------------------ + +#### 0.0.11 - 2014-02-19 + +* system_sysctl parameter for redis class (@tehmaspc) + +#### 0.0.10 - 2014-02-19 + +* Allow conf_bind to be unset (@stevelacey) +* Changing default of glueoutputbuf to UNSET (@tehmaspc) + +#### 0.0.9 - 2014-01-09 + +* Add quotes around all instances of UNSET (@charlesdunbar) + +#### 0.0.8 - 2013-12-20 + +* Setting mode permission for conf_dir (@KlavsKlavsen) + +#### 0.0.7 - 2013-12-11 + +* Add glueoutputbuf config option (@kryptx) +* Add support for Amazon Linux AMI (@mattboston) + +#### 0.0.6 - 2013-08-01 + +* Install package before poking config (@doismellburning) + +#### 0.0.5 - 2013-06-06 + +* Fix Puppet 3.2.1 deprecation warnings (@ripienaar) +* Fix duplicate entry for logrotate on Debian/RHEL using different paths (@arthurfurlan) +* Add $conf_nosave parameter (@fsalum) +* Minor changes to params variables (@fsalum) +* Update CHANGELOG format + +------------------------------------------ + +#### 0.0.4 - 2013-04-18 + +* Creates conf_dir directory if it doesn't exist + +------------------------------------------ + +#### 0.0.3 - 2013-02-25 + +* Fixing redis.conf less options on Debian + +------------------------------------------ + +#### 0.0.2 - 2013-02-25 + +* Fixing redis.conf location for Debian + +------------------------------------------ + +#### 0.0.1 - 2013-02-25 + +* Initial Forge release diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/redis/Gemfile b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/redis/Gemfile new file mode 100644 index 00000000000..2df03ec63cb --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/redis/Gemfile @@ -0,0 +1,7 @@ +source :rubygems + +puppetversion = ENV.key?('PUPPET_VERSION') ? "= #{ENV['PUPPET_VERSION']}" : ['>= 2.7'] + +gem 'rake' +gem 'puppet-lint' +gem 'puppet', puppetversion diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/redis/LICENSE b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/redis/LICENSE new file mode 100644 index 00000000000..f31e47dd22e --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/redis/LICENSE @@ -0,0 +1,15 @@ +Copyright (C) 2012 Felipe Salum + +Felipe Salum can be contacted at: fsalum@gmail.com + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/redis/Modulefile b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/redis/Modulefile new file mode 100644 index 00000000000..3d9432ecc9e --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/redis/Modulefile @@ -0,0 +1,13 @@ +name 'fsalum-redis' +version '0.0.11' +source 'git://github.com/fsalum/puppet-redis.git' +author 'Felipe Salum' +license 'Apache License, Version 2.0' +summary 'Puppet module for Redis Server' +description 'Module to install and configure a Redis server' +project_page 'https://github.com/fsalum/puppet-redis' + +## Add dependencies, if any: + +# https://forge.puppetlabs.com/thias/sysctl +dependency 'thias/sysctl', '0.3.0' diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/redis/README.md b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/redis/README.md new file mode 100644 index 00000000000..3fcd7d4d65f --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/redis/README.md @@ -0,0 +1,57 @@ +Redis Module for Puppet +======================= +[![Build Status](https://secure.travis-ci.org/fsalum/puppet-redis.png)](http://travis-ci.org/fsalum/puppet-redis) + +This module installs and manages a Redis server. All redis.conf options are +accepted in the parameterized class. + +Operating System +---------------- + +Tested on CentOS 6.3 and Debian Squeeze. + +Quick Start +----------- + +Use the default parameters: + + class { 'redis': } + +To change the port and listening network interface: + + class { 'redis': + conf_port => '6379', + conf_bind => '0.0.0.0', + } + +Parameters +---------- + +Check the [init.pp](https://github.com/fsalum/puppet-redis/blob/master/manifests/init.pp) file for a complete list of parameters accepted. + +To enable and set important Linux kernel sysctl parameters as described in the [Redis Admin Guide](http://redis.io/topics/admin) - use the following configuration option: + + class { 'redis': + system_sysctl => true + } + +By default, this sysctl parameter will not be enabled. Furthermore, you will need the sysctl module defined in the [Modulefile](https://github.com/fsalum/puppet-redis/blob/master/Modulefile) file. + +Copyright and License +--------------------- + +Copyright (C) 2012 Felipe Salum + +Felipe Salum can be contacted at: fsalum@gmail.com + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/redis/Rakefile b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/redis/Rakefile new file mode 100644 index 00000000000..d29667f8cad --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/redis/Rakefile @@ -0,0 +1,6 @@ +require 'puppet-lint/tasks/puppet-lint' + +PuppetLint.configuration.send("disable_80chars") +PuppetLint.configuration.send('disable_class_parameter_defaults') + +task :default => :lint diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/redis/Vagrantfile b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/redis/Vagrantfile new file mode 100644 index 00000000000..2c687ecd457 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/redis/Vagrantfile @@ -0,0 +1,18 @@ +VAGRANTFILE_API_VERSION = "2" +Vagrant.configure(VAGRANTFILE_API_VERSION) do |config| + config.vbguest.auto_update = false + config.hostmanager.enabled = false + + config.vm.define 'redis' do |node| + node.vm.box = "centos65" + node.vm.hostname = "redis.local" + node.vm.network :private_network, ip: "192.168.100.100" + node.vm.provision :shell, :inline => "yum install -y git && gem install librarian-puppet --no-ri --no-rdoc" + node.vm.provision :shell, :inline => "cd /vagrant ; librarian-puppet install --clean --path /etc/puppet/modules" + node.vm.provision :puppet do |puppet| + puppet.manifests_path = ["vm", "/etc/puppet/modules/redis/tests"] + puppet.manifest_file = "init.pp" + end + end + +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/redis/manifests/init.pp b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/redis/manifests/init.pp new file mode 100644 index 00000000000..41854941ee5 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/redis/manifests/init.pp @@ -0,0 +1,160 @@ +# == Class: redis +# +# Install and configure a Redis server +# +# === Parameters +# +# All the redis.conf parameters can be passed to the class. +# See below for a complete list of parameters accepted. +# +# Check the README.md file for any further information about parameters for this class. +# +# === Examples +# +# class { redis: +# conf_port => '6380', +# conf_bind => '0.0.0.0', +# } +# +# === Authors +# +# Felipe Salum +# +# === Copyright +# +# Copyright 2013 Felipe Salum, unless otherwise noted. +# +class redis ( + $package_ensure = 'present', + $service_ensure = 'running', + $service_enable = true, + $system_sysctl = false, + $conf_daemonize = 'yes', + $conf_pidfile = 'UNSET', + $conf_port = '6379', + $conf_bind = '127.0.0.1', + $conf_timeout = '0', + $conf_loglevel = 'notice', + $conf_logfile = 'UNSET', + $conf_syslog_enabled = 'UNSET', + $conf_syslog_ident = 'UNSET', + $conf_syslog_facility = 'UNSET', + $conf_databases = '16', + $conf_save = 'UNSET', + $conf_nosave = 'UNSET', + $conf_rdbcompression = 'yes', + $conf_dbfilename = 'dump.rdb', + $conf_dir = '/var/lib/redis/', + $conf_slaveof = 'UNSET', + $conf_masterauth = 'UNSET', + $conf_slave_server_stale_data = 'yes', + $conf_repl_ping_slave_period = '10', + $conf_repl_timeout = '60', + $conf_requirepass = 'UNSET', + $conf_maxclients = 'UNSET', + $conf_maxmemory = 'UNSET', + $conf_maxmemory_policy = 'UNSET', + $conf_maxmemory_samples = 'UNSET', + $conf_appendonly = 'no', + $conf_appendfilename = 'UNSET', + $conf_appendfsync = 'everysec', + $conf_no_appendfsync_on_rewrite = 'no', + $conf_auto_aof_rewrite_percentage = '100', + $conf_auto_aof_rewrite_min_size = '64mb', + $conf_slowlog_log_slower_than = '10000', + $conf_slowlog_max_len = '1024', + $conf_vm_enabled = 'no', + $conf_vm_swap_file = '/tmp/redis.swap', + $conf_vm_max_memory = '0', + $conf_vm_page_size = '32', + $conf_vm_pages = '134217728', + $conf_vm_max_threads = '4', + $conf_hash_max_zipmap_entries = '512', + $conf_hash_max_zipmap_value = '64', + $conf_list_max_ziplist_entries = '512', + $conf_list_max_ziplist_value = '64', + $conf_set_max_intset_entries = '512', + $conf_zset_max_ziplist_entries = '128', + $conf_zset_max_ziplist_value = '64', + $conf_activerehashing = 'yes', + $conf_include = 'UNSET', + $conf_glueoutputbuf = 'UNSET', +) { + + include redis::params + + $conf_template = $redis::params::conf_template + $conf_redis = $redis::params::conf + $conf_logrotate = $redis::params::conf_logrotate + $package = $redis::params::package + $service = $redis::params::service + + $conf_pidfile_real = $conf_pidfile ? { + 'UNSET' => $::redis::params::pidfile, + default => $conf_pidfile, + } + + $conf_logfile_real = $conf_logfile ? { + 'UNSET' => $::redis::params::logfile, + default => $conf_logfile, + } + + package { 'redis': + ensure => $package_ensure, + name => $package, + } + + service { 'redis': + ensure => $service_ensure, + name => $service, + enable => $service_enable, + hasrestart => true, + hasstatus => true, + require => Package['redis'], + } + + file { $conf_redis: + path => $conf_redis, + content => template("redis/${conf_template}"), + owner => root, + group => root, + mode => '0644', + require => Package['redis'], + notify => Service['redis'], + } + + file { $conf_logrotate: + path => $conf_logrotate, + content => template('redis/redis.logrotate.erb'), + owner => root, + group => root, + mode => '0644', + } + + exec { $conf_dir: + path => '/bin:/usr/bin:/sbin:/usr/sbin', + command => "mkdir -p ${conf_dir}", + user => root, + group => root, + creates => $conf_dir, + before => Service['redis'], + require => Package['redis'], + notify => Service['redis'], + } + + file { $conf_dir: + ensure => directory, + owner => redis, + group => redis, + mode => 0755, + before => Service['redis'], + require => Exec[$conf_dir], + } + + if ( $system_sysctl == true ) { + # add necessary kernel parameters + # see the redis admin guide here: http://redis.io/topics/admin + sysctl { 'vm.overcommit_memory': value => '1' } + } + +} diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/redis/manifests/params.pp b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/redis/manifests/params.pp new file mode 100644 index 00000000000..8983eeadf71 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/redis/manifests/params.pp @@ -0,0 +1,39 @@ +# Class: redis::params +# +# This class configures parameters for the puppet-redis module. +# +# Parameters: +# +# Actions: +# +# Requires: +# +# Sample Usage: +# +class redis::params { + + case $::operatingsystem { + 'centos', 'redhat', 'fedora', 'amazon': { + $package = 'redis' + $service = 'redis' + $conf = '/etc/redis.conf' + $conf_template = 'redis.rhel.conf.erb' + $conf_logrotate = '/etc/logrotate.d/redis' + $pidfile = '/var/run/redis/redis.pid' + $logfile = '/var/log/redis/redis.log' + } + 'ubuntu', 'debian': { + $package = 'redis-server' + $service = 'redis-server' + $conf = '/etc/redis/redis.conf' + $conf_template = 'redis.debian.conf.erb' + $conf_logrotate = '/etc/logrotate.d/redis-server' + $pidfile = '/var/run/redis/redis-server.pid' + $logfile = '/var/log/redis/redis-server.log' + } + default: { + fail("Unsupported osfamily: ${::osfamily} operatingsystem: ${::operatingsystem}, module ${module_name} only support osfamily RedHat and Debian") + } + } + +} diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/redis/spec/spec_helper.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/redis/spec/spec_helper.rb new file mode 100644 index 00000000000..5fda58875b1 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/redis/spec/spec_helper.rb @@ -0,0 +1,17 @@ +dir = File.expand_path(File.dirname(__FILE__)) +$LOAD_PATH.unshift File.join(dir, 'lib') + +require 'mocha' +require 'puppet' +require 'rspec' +require 'spec/autorun' + +Spec::Runner.configure do |config| + config.mock_with :mocha +end + +# We need this because the RAL uses 'should' as a method. This +# allows us the same behaviour but with a different method name. +class Object + alias :must :should +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/redis/templates/redis.debian.conf.erb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/redis/templates/redis.debian.conf.erb new file mode 100644 index 00000000000..e6706d061d7 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/redis/templates/redis.debian.conf.erb @@ -0,0 +1,221 @@ +# Redis configuration file example + +# By default Redis does not run as a daemon. Use 'yes' if you need it. +# Note that Redis will write a pid file in /var/run/redis.pid when daemonized. +daemonize <%= @conf_daemonize %> + +# When run as a daemon, Redis write a pid file in /var/run/redis.pid by default. +# You can specify a custom pid file location here. +pidfile <%= @conf_pidfile_real %> + +# Accept connections on the specified port, default is 6379 +port <%= @conf_port %> + +# If you want you can bind a single interface, if the bind option is not +# specified all the interfaces will listen for connections. +# +<% if @conf_bind != 'UNSET' %> +bind <%= @conf_bind %> +<% end %> + +# Close the connection after a client is idle for N seconds (0 to disable) +timeout <%= @conf_timeout %> + +# Set server verbosity to 'debug' +# it can be one of: +# debug (a lot of information, useful for development/testing) +# notice (moderately verbose, what you want in production probably) +# warning (only very important / critical messages are logged) +loglevel <%= @conf_loglevel %> + +# Specify the log file name. Also 'stdout' can be used to force +# the demon to log on the standard output. Note that if you use standard +# output for logging but daemonize, logs will be sent to /dev/null +logfile <%= @conf_logfile_real %> + +# Set the number of databases. The default database is DB 0, you can select +# a different one on a per-connection basis using SELECT where +# dbid is a number between 0 and 'databases'-1 +databases <%= @conf_databases %> + +################################ SNAPSHOTTING ################################# +# +# Save the DB on disk: +# +# save +# +# Will save the DB if both the given number of seconds and the given +# number of write operations against the DB occurred. +# +# In the example below the behaviour will be to save: +# after 900 sec (15 min) if at least 1 key changed +# after 300 sec (5 min) if at least 10 keys changed +# after 60 sec if at least 10000 keys changed +<% if @conf_nosave != 'UNSET' %> +#do not persist to disk: +#save 900 1 +#save 300 10 +#save 60 10000 +<% else %> + <% if @conf_save != 'UNSET' %> + save <%= @conf_save %> + <% else %> + save 900 1 + save 300 10 + save 60 10000 + <% end %> +<% end %> + +# Compress string objects using LZF when dump .rdb databases? +# For default that's set to 'yes' as it's almost always a win. +# If you want to save some CPU in the saving child set it to 'no' but +# the dataset will likely be bigger if you have compressible values or keys. +rdbcompression <%= @conf_rdbcompression %> + +# The filename where to dump the DB +dbfilename <%= @conf_dbfilename %> + +# For default save/load DB in/from the working directory +# Note that you must specify a directory not a file name. +dir <%= @conf_dir %> + +################################# REPLICATION ################################# + +# Master-Slave replication. Use slaveof to make a Redis instance a copy of +# another Redis server. Note that the configuration is local to the slave +# so for example it is possible to configure the slave to save the DB with a +# different interval, or to listen to another port, and so on. +# +# slaveof +<% if @conf_slaveof != 'UNSET' %> +slaveof <%= @conf_slaveof %> +<% end %> + +# If the master is password protected (using the "requirepass" configuration +# directive below) it is possible to tell the slave to authenticate before +# starting the replication synchronization process, otherwise the master will +# refuse the slave request. +# +# masterauth +<% if @conf_masterauth != 'UNSET' %> +masterauth <%= @conf_masterauth %> +<% end %> + + +################################## SECURITY ################################### + +# Require clients to issue AUTH before processing any other +# commands. This might be useful in environments in which you do not trust +# others with access to the host running redis-server. +# +# This should stay commented out for backward compatibility and because most +# people do not need auth (e.g. they run their own servers). +# +# requirepass foobared +<% if @conf_requirepass != 'UNSET' %> +requirepass <%= @conf_requirepass %> +<% end %> + + +################################### LIMITS #################################### + +# Set the max number of connected clients at the same time. By default there +# is no limit, and it's up to the number of file descriptors the Redis process +# is able to open. The special value '0' means no limts. +# Once the limit is reached Redis will close all the new connections sending +# an error 'max number of clients reached'. +# +# maxclients 128 +<% if @conf_maxclients != 'UNSET' %> +maxclients <%= @conf_maxclients %> +<% end %> + +# Don't use more memory than the specified amount of bytes. +# When the memory limit is reached Redis will try to remove keys with an +# EXPIRE set. It will try to start freeing keys that are going to expire +# in little time and preserve keys with a longer time to live. +# Redis will also try to remove objects from free lists if possible. +# +# If all this fails, Redis will start to reply with errors to commands +# that will use more memory, like SET, LPUSH, and so on, and will continue +# to reply to most read-only commands like GET. +# +# WARNING: maxmemory can be a good idea mainly if you want to use Redis as a +# 'state' server or cache, not as a real DB. When Redis is used as a real +# database the memory usage will grow over the weeks, it will be obvious if +# it is going to use too much memory in the long run, and you'll have the time +# to upgrade. With maxmemory after the limit is reached you'll start to get +# errors for write operations, and this may even lead to DB inconsistency. +# +# maxmemory +<% if @conf_maxmemory != 'UNSET' %> +maxmemory <%= @conf_maxmemory %> +<% end %> + +############################## APPEND ONLY MODE ############################### + +# By default Redis asynchronously dumps the dataset on disk. If you can live +# with the idea that the latest records will be lost if something like a crash +# happens this is the preferred way to run Redis. If instead you care a lot +# about your data and don't want to that a single record can get lost you should +# enable the append only mode: when this mode is enabled Redis will append +# every write operation received in the file appendonly.log. This file will +# be read on startup in order to rebuild the full dataset in memory. +# +# Note that you can have both the async dumps and the append only file if you +# like (you have to comment the "save" statements above to disable the dumps). +# Still if append only mode is enabled Redis will load the data from the +# log file at startup ignoring the dump.rdb file. +# +# The name of the append only file is "appendonly.log" +# +# IMPORTANT: Check the BGREWRITEAOF to check how to rewrite the append +# log file in background when it gets too big. + +appendonly <%= @conf_appendonly %> + +# The fsync() call tells the Operating System to actually write data on disk +# instead to wait for more data in the output buffer. Some OS will really flush +# data on disk, some other OS will just try to do it ASAP. +# +# Redis supports three different modes: +# +# no: don't fsync, just let the OS flush the data when it wants. Faster. +# always: fsync after every write to the append only log . Slow, Safest. +# everysec: fsync only if one second passed since the last fsync. Compromise. +# +# The default is "always" that's the safer of the options. It's up to you to +# understand if you can relax this to "everysec" that will fsync every second +# or to "no" that will let the operating system flush the output buffer when +# it want, for better performances (but if you can live with the idea of +# some data loss consider the default persistence mode that's snapshotting). + +appendfsync <%= @conf_appendfsync %> +# appendfsync everysec +# appendfsync no + +############################### ADVANCED CONFIG ############################### + +# Glue small output buffers together in order to send small replies in a +# single TCP packet. Uses a bit more CPU but most of the times it is a win +# in terms of number of queries per second. Use 'yes' if unsure. +<% if @conf_glueoutputbuf != 'UNSET' %> +glueoutputbuf <%= @conf_glueoutputbuf %> +<% end %> + +# Use object sharing. Can save a lot of memory if you have many common +# string in your dataset, but performs lookups against the shared objects +# pool so it uses more CPU and can be a bit slower. Usually it's a good +# idea. +# +# When object sharing is enabled (shareobjects yes) you can use +# shareobjectspoolsize to control the size of the pool used in order to try +# object sharing. A bigger pool size will lead to better sharing capabilities. +# In general you want this value to be at least the double of the number of +# very common strings you have in your dataset. +# +# WARNING: object sharing is experimental, don't enable this feature +# in production before of Redis 1.0-stable. Still please try this feature in +# your development environment so that we can test it better. +# shareobjects no +# shareobjectspoolsize 1024 diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/redis/templates/redis.logrotate.erb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/redis/templates/redis.logrotate.erb new file mode 100644 index 00000000000..b9ba724a590 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/redis/templates/redis.logrotate.erb @@ -0,0 +1,9 @@ +<%= @conf_logfile_real %> { + weekly + rotate 10 + copytruncate + delaycompress + compress + notifempty + missingok +} diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/redis/templates/redis.rhel.conf.erb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/redis/templates/redis.rhel.conf.erb new file mode 100644 index 00000000000..51d1e07e164 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/redis/templates/redis.rhel.conf.erb @@ -0,0 +1,549 @@ +# Redis configuration file example + +# Note on units: when memory size is needed, it is possible to specifiy +# it in the usual form of 1k 5GB 4M and so forth: +# +# 1k => 1000 bytes +# 1kb => 1024 bytes +# 1m => 1000000 bytes +# 1mb => 1024*1024 bytes +# 1g => 1000000000 bytes +# 1gb => 1024*1024*1024 bytes +# +# units are case insensitive so 1GB 1Gb 1gB are all the same. + +# By default Redis does not run as a daemon. Use 'yes' if you need it. +# Note that Redis will write a pid file in /var/run/redis.pid when daemonized. +daemonize <%= @conf_daemonize %> + +# When running daemonized, Redis writes a pid file in /var/run/redis.pid by +# default. You can specify a custom pid file location here. +pidfile <%= @conf_pidfile_real %> + +# Accept connections on the specified port, default is 6379. +# If port 0 is specified Redis will not listen on a TCP socket. +port <%= @conf_port %> + +# If you want you can bind a single interface, if the bind option is not +# specified all the interfaces will listen for incoming connections. +# +<% if @conf_bind != 'UNSET' %> +bind <%= @conf_bind %> +<% end %> + +# Specify the path for the unix socket that will be used to listen for +# incoming connections. There is no default, so Redis will not listen +# on a unix socket when not specified. +# +# unixsocket /tmp/redis.sock +# unixsocketperm 755 + +# Close the connection after a client is idle for N seconds (0 to disable) +timeout <%= @conf_timeout %> + +# Set server verbosity to 'debug' +# it can be one of: +# debug (a lot of information, useful for development/testing) +# verbose (many rarely useful info, but not a mess like the debug level) +# notice (moderately verbose, what you want in production probably) +# warning (only very important / critical messages are logged) +loglevel <%= @conf_loglevel %> + +# Specify the log file name. Also 'stdout' can be used to force +# Redis to log on the standard output. Note that if you use standard +# output for logging but daemonize, logs will be sent to /dev/null +logfile <%= @conf_logfile_real %> + +# To enable logging to the system logger, just set 'syslog-enabled' to yes, +# and optionally update the other syslog parameters to suit your needs. +<% if @conf_syslog_enabled != 'UNSET' %> +syslog-enabled <%= @conf_syslog_enabled %> +<% else %> +# syslog-enabled no +<% end %> + +# Specify the syslog identity. +<% if @conf_syslog_ident != 'UNSET' %> +syslog-ident <%= @conf_syslog_ident %> +<% else %> +# syslog-ident redis +<% end %> + +# Specify the syslog facility. Must be USER or between LOCAL0-LOCAL7. +<% if @conf_syslog_facility != 'UNSET' %> +syslog-facility <%= @conf_syslog_facility %> +<% else %> +# syslog-facility local0 +<% end %> + +# Set the number of databases. The default database is DB 0, you can select +# a different one on a per-connection basis using SELECT where +# dbid is a number between 0 and 'databases'-1 +databases <%= @conf_databases %> + +################################ SNAPSHOTTING ################################# +# +# Save the DB on disk: +# +# save +# +# Will save the DB if both the given number of seconds and the given +# number of write operations against the DB occurred. +# +# In the example below the behaviour will be to save: +# after 900 sec (15 min) if at least 1 key changed +# after 300 sec (5 min) if at least 10 keys changed +# after 60 sec if at least 10000 keys changed +# +# Note: you can disable saving at all commenting all the "save" lines. + +<% if @conf_nosave != 'UNSET' %> +#do not persist to disk: +#save 900 1 +#save 300 10 +#save 60 10000 +<% else %> + <% if @conf_save != 'UNSET' %> + save <%= @conf_save %> + <% else %> + save 900 1 + save 300 10 + save 60 10000 + <% end %> +<% end %> + +# Compress string objects using LZF when dump .rdb databases? +# For default that's set to 'yes' as it's almost always a win. +# If you want to save some CPU in the saving child set it to 'no' but +# the dataset will likely be bigger if you have compressible values or keys. +rdbcompression <%= @conf_rdbcompression %> + +# The filename where to dump the DB +dbfilename <%= @conf_dbfilename %> + +# The working directory. +# +# The DB will be written inside this directory, with the filename specified +# above using the 'dbfilename' configuration directive. +# +# Also the Append Only File will be created inside this directory. +# +# Note that you must specify a directory here, not a file name. +dir <%= @conf_dir %> + +################################# REPLICATION ################################# + +# Master-Slave replication. Use slaveof to make a Redis instance a copy of +# another Redis server. Note that the configuration is local to the slave +# so for example it is possible to configure the slave to save the DB with a +# different interval, or to listen to another port, and so on. +# +<% if @conf_slaveof != 'UNSET' %> +slaveof <%= @conf_slaveof %> +<% else %> +# slaveof +<% end %> + +# If the master is password protected (using the "requirepass" configuration +# directive below) it is possible to tell the slave to authenticate before +# starting the replication synchronization process, otherwise the master will +# refuse the slave request. +# +<% if @conf_masterauth != 'UNSET' %> +masterauth <%= @conf_masterauth %> +<% else %> +# masterauth +<% end %> + +# When a slave lost the connection with the master, or when the replication +# is still in progress, the slave can act in two different ways: +# +# 1) if slave-serve-stale-data is set to 'yes' (the default) the slave will +# still reply to client requests, possibly with out of data data, or the +# data set may just be empty if this is the first synchronization. +# +# 2) if slave-serve-stale data is set to 'no' the slave will reply with +# an error "SYNC with master in progress" to all the kind of commands +# but to INFO and SLAVEOF. +# +slave-serve-stale-data <%= @conf_slave_server_stale_data %> + +# Slaves send PINGs to server in a predefined interval. It's possible to change +# this interval with the repl_ping_slave_period option. The default value is 10 +# seconds. +# +# repl-ping-slave-period 10 +repl-ping-slave-period <%= @conf_repl_ping_slave_period %> + +# The following option sets a timeout for both Bulk transfer I/O timeout and +# master data or ping response timeout. The default value is 60 seconds. +# +# It is important to make sure that this value is greater than the value +# specified for repl-ping-slave-period otherwise a timeout will be detected +# every time there is low traffic between the master and the slave. +# +# repl-timeout 60 +repl-timeout <%= @conf_repl_timeout %> + +################################## SECURITY ################################### + +# Require clients to issue AUTH before processing any other +# commands. This might be useful in environments in which you do not trust +# others with access to the host running redis-server. +# +# This should stay commented out for backward compatibility and because most +# people do not need auth (e.g. they run their own servers). +# +# Warning: since Redis is pretty fast an outside user can try up to +# 150k passwords per second against a good box. This means that you should +# use a very strong password otherwise it will be very easy to break. +# +<% if @conf_requirepass != 'UNSET' %> +requirepass <%= @conf_requirepass %> +<% else %> +# requirepass foobared +<% end %> + +# Command renaming. +# +# It is possilbe to change the name of dangerous commands in a shared +# environment. For instance the CONFIG command may be renamed into something +# of hard to guess so that it will be still available for internal-use +# tools but not available for general clients. +# +# Example: +# +# rename-command CONFIG b840fc02d524045429941cc15f59e41cb7be6c52 +# +# It is also possilbe to completely kill a command renaming it into +# an empty string: +# +# rename-command CONFIG "" + +################################### LIMITS #################################### + +# Set the max number of connected clients at the same time. By default there +# is no limit, and it's up to the number of file descriptors the Redis process +# is able to open. The special value '0' means no limits. +# Once the limit is reached Redis will close all the new connections sending +# an error 'max number of clients reached'. +# +# maxclients 128 +<% if @conf_maxclients != 'UNSET' %> +maxclients <%= @conf_maxclients %> +<% end %> + +# Don't use more memory than the specified amount of bytes. +# When the memory limit is reached Redis will try to remove keys +# accordingly to the eviction policy selected (see maxmemmory-policy). +# +# If Redis can't remove keys according to the policy, or if the policy is +# set to 'noeviction', Redis will start to reply with errors to commands +# that would use more memory, like SET, LPUSH, and so on, and will continue +# to reply to read-only commands like GET. +# +# This option is usually useful when using Redis as an LRU cache, or to set +# an hard memory limit for an instance (using the 'noeviction' policy). +# +# WARNING: If you have slaves attached to an instance with maxmemory on, +# the size of the output buffers needed to feed the slaves are subtracted +# from the used memory count, so that network problems / resyncs will +# not trigger a loop where keys are evicted, and in turn the output +# buffer of slaves is full with DELs of keys evicted triggering the deletion +# of more keys, and so forth until the database is completely emptied. +# +# In short... if you have slaves attached it is suggested that you set a lower +# limit for maxmemory so that there is some free RAM on the system for slave +# output buffers (but this is not needed if the policy is 'noeviction'). +# +# maxmemory +<% if @conf_maxmemory != 'UNSET' %> +maxmemory <%= @conf_maxmemory %> +<% end %> + +# MAXMEMORY POLICY: how Redis will select what to remove when maxmemory +# is reached? You can select among five behavior: +# +# volatile-lru -> remove the key with an expire set using an LRU algorithm +# allkeys-lru -> remove any key accordingly to the LRU algorithm +# volatile-random -> remove a random key with an expire set +# allkeys->random -> remove a random key, any key +# volatile-ttl -> remove the key with the nearest expire time (minor TTL) +# noeviction -> don't expire at all, just return an error on write operations +# +# Note: with all the kind of policies, Redis will return an error on write +# operations, when there are not suitable keys for eviction. +# +# At the date of writing this commands are: set setnx setex append +# incr decr rpush lpush rpushx lpushx linsert lset rpoplpush sadd +# sinter sinterstore sunion sunionstore sdiff sdiffstore zadd zincrby +# zunionstore zinterstore hset hsetnx hmset hincrby incrby decrby +# getset mset msetnx exec sort +# +# The default is: +# +# maxmemory-policy volatile-lru +<% if @conf_maxmemory_policy != 'UNSET' %> +maxmemory-policy <%= @conf_maxmemory_policy %> +<% end %> + +# LRU and minimal TTL algorithms are not precise algorithms but approximated +# algorithms (in order to save memory), so you can select as well the sample +# size to check. For instance for default Redis will check three keys and +# pick the one that was used less recently, you can change the sample size +# using the following configuration directive. +# +# maxmemory-samples 3 +<% if @conf_maxmemory_samples != 'UNSET' %> +maxmemory-samples <%= @conf_maxmemory_samples %> +<% end %> + +############################## APPEND ONLY MODE ############################### + +# By default Redis asynchronously dumps the dataset on disk. If you can live +# with the idea that the latest records will be lost if something like a crash +# happens this is the preferred way to run Redis. If instead you care a lot +# about your data and don't want to that a single record can get lost you should +# enable the append only mode: when this mode is enabled Redis will append +# every write operation received in the file appendonly.aof. This file will +# be read on startup in order to rebuild the full dataset in memory. +# +# Note that you can have both the async dumps and the append only file if you +# like (you have to comment the "save" statements above to disable the dumps). +# Still if append only mode is enabled Redis will load the data from the +# log file at startup ignoring the dump.rdb file. +# +# IMPORTANT: Check the BGREWRITEAOF to check how to rewrite the append +# log file in background when it gets too big. + +appendonly <%= @conf_appendonly %> + +# The name of the append only file (default: "appendonly.aof") +# appendfilename appendonly.aof +<% if @conf_appendfilename != 'UNSET' %> +appendfilename <%= @conf_appendfilename %> +<% end %> + +# The fsync() call tells the Operating System to actually write data on disk +# instead to wait for more data in the output buffer. Some OS will really flush +# data on disk, some other OS will just try to do it ASAP. +# +# Redis supports three different modes: +# +# no: don't fsync, just let the OS flush the data when it wants. Faster. +# always: fsync after every write to the append only log . Slow, Safest. +# everysec: fsync only if one second passed since the last fsync. Compromise. +# +# The default is "everysec" that's usually the right compromise between +# speed and data safety. It's up to you to understand if you can relax this to +# "no" that will will let the operating system flush the output buffer when +# it wants, for better performances (but if you can live with the idea of +# some data loss consider the default persistence mode that's snapshotting), +# or on the contrary, use "always" that's very slow but a bit safer than +# everysec. +# +# If unsure, use "everysec". + +# appendfsync always +appendfsync <%= @conf_appendfsync %> +# appendfsync no + +# When the AOF fsync policy is set to always or everysec, and a background +# saving process (a background save or AOF log background rewriting) is +# performing a lot of I/O against the disk, in some Linux configurations +# Redis may block too long on the fsync() call. Note that there is no fix for +# this currently, as even performing fsync in a different thread will block +# our synchronous write(2) call. +# +# In order to mitigate this problem it's possible to use the following option +# that will prevent fsync() from being called in the main process while a +# BGSAVE or BGREWRITEAOF is in progress. +# +# This means that while another child is saving the durability of Redis is +# the same as "appendfsync none", that in pratical terms means that it is +# possible to lost up to 30 seconds of log in the worst scenario (with the +# default Linux settings). +# +# If you have latency problems turn this to "yes". Otherwise leave it as +# "no" that is the safest pick from the point of view of durability. +no-appendfsync-on-rewrite <%= @conf_no_appendfsync_on_rewrite %> + +# Automatic rewrite of the append only file. +# Redis is able to automatically rewrite the log file implicitly calling +# BGREWRITEAOF when the AOF log size will growth by the specified percentage. +# +# This is how it works: Redis remembers the size of the AOF file after the +# latest rewrite (or if no rewrite happened since the restart, the size of +# the AOF at startup is used). +# +# This base size is compared to the current size. If the current size is +# bigger than the specified percentage, the rewrite is triggered. Also +# you need to specify a minimal size for the AOF file to be rewritten, this +# is useful to avoid rewriting the AOF file even if the percentage increase +# is reached but it is still pretty small. +# +# Specify a precentage of zero in order to disable the automatic AOF +# rewrite feature. + +auto-aof-rewrite-percentage <%= @conf_auto_aof_rewrite_percentage %> +auto-aof-rewrite-min-size <%= @conf_auto_aof_rewrite_min_size %> + +################################## SLOW LOG ################################### + +# The Redis Slow Log is a system to log queries that exceeded a specified +# execution time. The execution time does not include the I/O operations +# like talking with the client, sending the reply and so forth, +# but just the time needed to actually execute the command (this is the only +# stage of command execution where the thread is blocked and can not serve +# other requests in the meantime). +# +# You can configure the slow log with two parameters: one tells Redis +# what is the execution time, in microseconds, to exceed in order for the +# command to get logged, and the other parameter is the length of the +# slow log. When a new command is logged the oldest one is removed from the +# queue of logged commands. + +# The following time is expressed in microseconds, so 1000000 is equivalent +# to one second. Note that a negative number disables the slow log, while +# a value of zero forces the logging of every command. +slowlog-log-slower-than <%= @conf_slowlog_log_slower_than %> + +# There is no limit to this length. Just be aware that it will consume memory. +# You can reclaim memory used by the slow log with SLOWLOG RESET. +slowlog-max-len <%= @conf_slowlog_max_len %> + +################################ VIRTUAL MEMORY ############################### + +### WARNING! Virtual Memory is deprecated in Redis 2.4 +### The use of Virtual Memory is strongly discouraged. + +# Virtual Memory allows Redis to work with datasets bigger than the actual +# amount of RAM needed to hold the whole dataset in memory. +# In order to do so very used keys are taken in memory while the other keys +# are swapped into a swap file, similarly to what operating systems do +# with memory pages. +# +# To enable VM just set 'vm-enabled' to yes, and set the following three +# VM parameters accordingly to your needs. + +#vm-enabled <%= @conf_vm_enabled %> +# vm-enabled yes + +# This is the path of the Redis swap file. As you can guess, swap files +# can't be shared by different Redis instances, so make sure to use a swap +# file for every redis process you are running. Redis will complain if the +# swap file is already in use. +# +# The best kind of storage for the Redis swap file (that's accessed at random) +# is a Solid State Disk (SSD). +# +# *** WARNING *** if you are using a shared hosting the default of putting +# the swap file under /tmp is not secure. Create a dir with access granted +# only to Redis user and configure Redis to create the swap file there. +#vm-swap-file <%= @conf_vm_swap_file %> + +# vm-max-memory configures the VM to use at max the specified amount of +# RAM. Everything that deos not fit will be swapped on disk *if* possible, that +# is, if there is still enough contiguous space in the swap file. +# +# With vm-max-memory 0 the system will swap everything it can. Not a good +# default, just specify the max amount of RAM you can in bytes, but it's +# better to leave some margin. For instance specify an amount of RAM +# that's more or less between 60 and 80% of your free RAM. +#vm-max-memory <%= @conf_vm_max_memory %> + +# Redis swap files is split into pages. An object can be saved using multiple +# contiguous pages, but pages can't be shared between different objects. +# So if your page is too big, small objects swapped out on disk will waste +# a lot of space. If you page is too small, there is less space in the swap +# file (assuming you configured the same number of total swap file pages). +# +# If you use a lot of small objects, use a page size of 64 or 32 bytes. +# If you use a lot of big objects, use a bigger page size. +# If unsure, use the default :) +#vm-page-size <%= @conf_vm_page_size %> + +# Number of total memory pages in the swap file. +# Given that the page table (a bitmap of free/used pages) is taken in memory, +# every 8 pages on disk will consume 1 byte of RAM. +# +# The total swap size is vm-page-size * vm-pages +# +# With the default of 32-bytes memory pages and 134217728 pages Redis will +# use a 4 GB swap file, that will use 16 MB of RAM for the page table. +# +# It's better to use the smallest acceptable value for your application, +# but the default is large in order to work in most conditions. +#vm-pages <%= @conf_vm_pages %> + +# Max number of VM I/O threads running at the same time. +# This threads are used to read/write data from/to swap file, since they +# also encode and decode objects from disk to memory or the reverse, a bigger +# number of threads can help with big objects even if they can't help with +# I/O itself as the physical device may not be able to couple with many +# reads/writes operations at the same time. +# +# The special value of 0 turn off threaded I/O and enables the blocking +# Virtual Memory implementation. +#vm-max-threads <%= @conf_vm_max_threads %> + +############################### ADVANCED CONFIG ############################### + +# Hashes are encoded in a special way (much more memory efficient) when they +# have at max a given numer of elements, and the biggest element does not +# exceed a given threshold. You can configure this limits with the following +# configuration directives. +#hash-max-zipmap-entries <%= @conf_hash_max_zipmap_entries %> +#hash-max-zipmap-value <%= @conf_hash_max_zipmap_value %> + +# Similarly to hashes, small lists are also encoded in a special way in order +# to save a lot of space. The special representation is only used when +# you are under the following limits: +list-max-ziplist-entries <%= @conf_list_max_ziplist_entries %> +list-max-ziplist-value <%= @conf_list_max_ziplist_value %> + +# Sets have a special encoding in just one case: when a set is composed +# of just strings that happens to be integers in radix 10 in the range +# of 64 bit signed integers. +# The following configuration setting sets the limit in the size of the +# set in order to use this special memory saving encoding. +set-max-intset-entries <%= @conf_set_max_intset_entries %> + +# Similarly to hashes and lists, sorted sets are also specially encoded in +# order to save a lot of space. This encoding is only used when the length and +# elements of a sorted set are below the following limits: +zset-max-ziplist-entries <%= @conf_zset_max_ziplist_entries %> +zset-max-ziplist-value <%= @conf_zset_max_ziplist_value %> + +# Active rehashing uses 1 millisecond every 100 milliseconds of CPU time in +# order to help rehashing the main Redis hash table (the one mapping top-level +# keys to values). The hash table implementation redis uses (see dict.c) +# performs a lazy rehashing: the more operation you run into an hash table +# that is rhashing, the more rehashing "steps" are performed, so if the +# server is idle the rehashing is never complete and some more memory is used +# by the hash table. +# +# The default is to use this millisecond 10 times every second in order to +# active rehashing the main dictionaries, freeing memory when possible. +# +# If unsure: +# use "activerehashing no" if you have hard latency requirements and it is +# not a good thing in your environment that Redis can reply form time to time +# to queries with 2 milliseconds delay. +# +# use "activerehashing yes" if you don't have such hard requirements but +# want to free memory asap when possible. +activerehashing <%= @conf_activerehashing %> + +################################## INCLUDES ################################### + +# Include one or more other config files here. This is useful if you +# have a standard template that goes to all redis server but also need +# to customize a few per-server settings. Include files can include +# other files, so use this wisely. +# +# include /path/to/local.conf +# include /path/to/other.conf +<% if @conf_include != 'UNSET' %> +include <%= @conf_include %> +<% end %> diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/redis/tests/init.pp b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/redis/tests/init.pp new file mode 100644 index 00000000000..b9859818e83 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/redis/tests/init.pp @@ -0,0 +1,15 @@ +node default { + + package { 'epel-release': + ensure => present, + source => 'http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm', + provider => rpm, + } + + class { 'redis': + conf_port => '6379', + conf_bind => '0.0.0.0', + system_sysctl => true, + } + +} diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/staging/.fixtures.yml b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/staging/.fixtures.yml new file mode 100644 index 00000000000..d64f95571e1 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/staging/.fixtures.yml @@ -0,0 +1,5 @@ +fixtures: + repositories: + stdlib: 'git://github.com/puppetlabs/puppetlabs-stdlib.git' + symlinks: + staging: "#{source_dir}" diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/staging/.travis.yml b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/staging/.travis.yml new file mode 100644 index 00000000000..1a4302e6dfa --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/staging/.travis.yml @@ -0,0 +1,22 @@ +language: ruby +script: "bundle exec rake validate && bundle exec rake lint && bundle exec rake spec SPEC_OPTS='--format documentation'" +before_install: + - gem update bundler + - bundle --version + - gem update --system 2.1.11 + - gem --version +rvm: + - 1.8.7 + - 1.9.3 +env: + - PUPPET_GEM_VERSION="~> 3.2.0" + - PUPPET_GEM_VERSION=">= 3.0.0" +branches: + only: + - master +matrix: + exclude: + - rvm: 1.8.7 + env: PUPPET_GEM_VERSION=">= 3.0.0" +notifications: + email: false diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/staging/Gemfile b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/staging/Gemfile new file mode 100644 index 00000000000..dbc5ead104d --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/staging/Gemfile @@ -0,0 +1,25 @@ +source "https://rubygems.org" + +group :development, :test do + gem 'rake' + gem 'rspec', "~> 2.11.0", :require => false + gem 'mocha', "~> 0.10.5", :require => false + gem 'puppetlabs_spec_helper', :require => false + gem 'rspec-puppet', :require => false + gem 'puppet-lint' +end + +facterversion = ENV['GEM_FACTER_VERSION'] +if facterversion + gem 'facter', facterversion +else + gem 'facter', :require => false +end + +ENV['GEM_PUPPET_VERSION'] ||= ENV['PUPPET_GEM_VERSION'] +puppetversion = ENV['GEM_PUPPET_VERSION'] +if puppetversion + gem 'puppet', puppetversion +else + gem 'puppet', :require => false +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/staging/LICENSE b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/staging/LICENSE new file mode 100644 index 00000000000..51fca54c2a0 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/staging/LICENSE @@ -0,0 +1,11 @@ +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/staging/Modulefile b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/staging/Modulefile new file mode 100644 index 00000000000..3750abc30c5 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/staging/Modulefile @@ -0,0 +1,10 @@ +name 'nanliu-staging' +version '0.4.0' +source 'git@github.com:nanliu/puppet-staging.git' +author 'nanliu' +license 'Apache License Version 2.0' +summary 'Compressed file staging and deployment' +description 'Manages compressed file staging and deployment.' +project_page 'https://github.com/nanliu/puppet-staging' + +## Add dependencies, if any: diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/staging/README.md b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/staging/README.md new file mode 100644 index 00000000000..a0d3e37ccbf --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/staging/README.md @@ -0,0 +1,57 @@ +# Staging module for Puppet + +Manages staging directory, along with download/extraction of compressed files. + +[![Build Status](https://secure.travis-ci.org/nanliu/puppet-staging.png?branch=master)](http://travis-ci.org/nanliu/puppet-staging) + +WARNING: Version 0.2.0 no longer uses hiera functions. The same behavior should be available in Puppet 3.0. + +## Usage + +Specify a different default staging path (must be declared before using resource): + + class { 'staging': + path => '/var/staging', + owner => 'puppet', + group => 'puppet', + } + +Staging files from various sources: + + staging::file { 'sample': + source => 'puppet://modules/staging/sample', + } + + staging::file { 'apache-tomcat-6.0.35': + source => 'http://apache.cs.utah.edu/tomcat/tomcat-6/v6.0.35/bin/apache-tomcat-6.0.35.tar.gz', + } + + +Staging and extracting files: + + staging::file { 'sample.tar.gz': + source => 'puppet:///modules/staging/sample.tar.gz' + } + + staging::extract { 'sample.tar.gz': + target => '/tmp/staging', + creates => '/tmp/staging/sample', + require => Staging::File['sample.tar.gz'], + } + +Staging files currently support the following source: + +* http(s):// +* puppet:// +* ftp:// +* local (though this doesn't serve any real purpose.) + +## Contributor + +* Adrien Thebo +* gizero +* Harald Skoglund +* Hunter Haugen +* Justin Clayton +* Owen Jacobson +* Reid Vandewiele diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/staging/Rakefile b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/staging/Rakefile new file mode 100644 index 00000000000..5bc13983e88 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/staging/Rakefile @@ -0,0 +1,51 @@ +require 'rubygems' +require 'puppetlabs_spec_helper/rake_tasks' + +def io_popen(command) + IO.popen(command) do |io| + io.each do |line| + print line + yield line if block_given? + end + end +end + +# Customize lint option +task :lint do + PuppetLint.configuration.send("disable_80chars") + PuppetLint.configuration.send("disable_class_parameter_defaults") +end + +desc "Validate manifests, templates, and ruby files in lib." +task :validate do + Dir['manifests/**/*.pp'].each do |manifest| + sh "puppet parser validate --noop #{manifest}" + end + Dir['lib/**/*.rb'].each do |lib_file| + sh "ruby -c #{lib_file}" + end + Dir['templates/**/*.erb'].each do |template| + sh "erb -P -x -T '-' #{template} | ruby -c" + end +end + +# Initialize vagrant instance for testing +desc "Powers on Vagrant VMs with specific manifests" +task :vagrant, :manifest do |t, args| + Rake::Task["spec_prep"].execute + + prefix = "VAGRANT_MANIFEST='#{args[:manifest]||'init.pp'}'" + + puts args[:manifest] + provision = false + io_popen("export #{prefix}; vagrant up --provider=vmware_fusion") do |line| + provision = true if line =~ /Machine is already running./ + end + io_popen("export #{prefix}; vagrant provision") if provision +end + +# Cleanup vagrant environment +task :vagrant_clean do + `vagrant destroy -f` + Rake::Task["spec_clean"].execute +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/staging/Vagrantfile b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/staging/Vagrantfile new file mode 100644 index 00000000000..9f9ac91e712 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/staging/Vagrantfile @@ -0,0 +1,29 @@ +# -*- mode: ruby -*- +# vi: set ft=ruby : + +Vagrant.configure("2") do |config| + # All Vagrant configuration is done here. The most common configuration + # options are documented and commented below. For a complete reference, + # please see the online documentation at vagrantup.com. + + #config.vm.synced_folder "manifests", "/tmp/manifests", "tests" + config.vm.synced_folder "./", "/etc/puppet/modules/staging" + + config.vm.define :staging do |m| + m.vm.box = "centos63" + m.vm.box_url = "https://dl.dropbox.com/s/eqdrqnla4na8qax/centos63.box" + + m.vm.hostname = 'staging' + m.vm.provider :vmware_fusion do |v| + v.vmx["displayName"] = "staging" + v.vmx["memsize"] = 512 + v.vmx["numvcpus"] = 4 + end + + m.vm.provision :puppet do |puppet| + puppet.manifests_path = "tests" + puppet.module_path = "spec/fixtures/modules/" + puppet.manifest_file = "init.pp" + end + end +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/staging/docs/deploy.html b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/staging/docs/deploy.html new file mode 100644 index 00000000000..fdcdc34e184 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/staging/docs/deploy.html @@ -0,0 +1,113 @@ + + + + + deploy.pp + + + +
+
+
+ Jump To … + +
+ + + + + + + + + + + + +

deploy.pp

+
+ +
+

Define: staging::deploy

+ +

The define resource extracts compressed file to a staging location.

+ +

Parameters:

+ +
    +
  • [source]: the source file location, supports local files, puppet://, http://, https://, ftp:// (default: )
  • +
  • [target]: the target extraction directory (default: )
  • +
  • [staging_path]: the staging location for compressed file. defaults to ${staging::path}/${caller_module_name} (default: undef)
  • +
  • [username]: https or ftp username (default: undef)
  • +
  • [certificate]: https certifcate file (default: undef)
  • +
  • [password]: https or ftp user password or https certificate password (default: undef)
  • +
  • [environment]: environment variable for settings such as http_proxy (default: undef)
  • +
  • [timeout]: the time to wait for the file transfer to complete (default: undef)
  • +
  • [user]: extract file as this user (default: undef)
  • +
  • [group]: extract group as this group (default: undef)
  • +
  • [creates]: the file/folder created after extraction. if unspecified defaults to ${target}/${name} (default: undef)
  • +
  • [unless]: alternative way to conditionally extract file (default: undef)
  • +
  • [onlyif]: alternative way to conditionally extract file (default: undef)
  • +
+ + +

Usage:

+ +
staging::deploy { 'sample.tar.gz':
+  source => 'puppet:///modules/staging/sample.tar.gz',
+  target => '/usr/local',
+}
+
+ +
+
define staging::deploy (
+  $source,               
+  $target,               
+  $staging_path = undef, 
+  $username     = undef, 
+  $certificate  = undef, 
+  $password     = undef, 
+  $environment  = undef, 
+  $timeout      = undef, 
+  $user         = undef, 
+  $group        = undef, 
+  $creates      = undef, 
+  $unless       = undef, 
+  $onlyif       = undef  
+) {
+
+  staging::file { $name:
+    source      => $source,
+    target      => $staging_path,
+    username    => $username,
+    certificate => $certificate,
+    password    => $password,
+    environment => $environment,
+    subdir      => $caller_module_name,
+    timeout     => $timeout,
+  }
+
+  staging::extract { $name:
+    target      => $target,
+    source      => $staging_path,
+    user        => $user,
+    group       => $group,
+    environment => $environment,
+    subdir      => $caller_module_name,
+    creates     => $creates,
+    unless      => $unless,
+    onlyif      => $onlyif,
+    require     => Staging::File[$name],
+  }
+
+}
+
+
+ diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/staging/docs/extract.html b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/staging/docs/extract.html new file mode 100644 index 00000000000..0f46958a3db --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/staging/docs/extract.html @@ -0,0 +1,176 @@ + + + + + extract.pp + + + +
+
+
+ Jump To … + +
+ + + + + + + + + + + + + + + + +

extract.pp

+
+ +
+

Define: staging::extract

+ +

Define resource to extract files from staging directories to target directories.

+ +

Parameters:

+ +
    +
  • [target]: the target extraction directory (default: )
  • +
  • [source]: the source compression file, supports tar, tar.gz, zip, war (default: undef)
  • +
  • [creates]: the file created after extraction. if unspecified defaults ${staging::path}/${caller_module_name}/${name} ${target}/${name} (default: undef)
  • +
  • [unless]: alternative way to conditionally check whether to extract file. (default: undef)
  • +
  • [onlyif]: alternative way to conditionally check whether to extract file. (default: undef)
  • +
  • [user]: extract file as this user. (default: undef)
  • +
  • [group]: extract file as this group. (default: undef)
  • +
  • [environment]: environment variables. (default: undef)
  • +
  • [subdir]: subdir per module in staging directory. (default: $caller_module_name)
  • +
+ + +

Usage:

+ +
$caller_module_name = 'demo'
+
+class { 'staging':
+  path => '/tmp/staging',
+}
+
+staging::file { 'sample.tar.gz':
+  source => 'puppet:///modules/staging/sample.tar.gz'
+}
+
+staging::extract { 'sample.tar.gz':
+  target  => '/tmp/staging',
+  creates => '/tmp/staging/sample',
+  require => Staging::File['sample.tar.gz'],
+}
+
+
+
define staging::extract (
+  $target,              
+  $source      = undef, 
+  $creates     = undef, 
+  $unless      = undef, 
+  $onlyif      = undef, 
+  $user        = undef, 
+  $group       = undef, 
+  $environment = undef, 
+  $subdir      = $caller_module_name 
+) {
+
+  include staging
+
+  if $source {
+    $source_path = $source
+  } else {
+    $source_path = "${staging::path}/${subdir}/${name}"
+  }
+
+
+ +
+

Use user supplied creates path, set default value if creates, unless or +onlyif is not supplied.

+ +
+
  if $creates {
+    $creates_path = $creates
+  } elsif ! ($unless or $onlyif) {
+    if $name =~ /.tar.gz$/ {
+      $folder       = staging_parse($name, 'basename', '.tar.gz')
+      $creates_path = "${target}/${folder}"
+    } else {
+      $folder       = staging_parse($name, 'basename')
+      $creates_path = "${target}/${folder}"
+    }
+  }
+
+  if scope_defaults('Exec','path') {
+    Exec{
+      cwd         => $target,
+      user        => $user,
+      group       => $group,
+      environment => $environment,
+      creates     => $creates_path,
+      unless      => $unless,
+      onlyif      => $onlyif,
+      logoutput   => on_failure,
+    }
+  } else {
+    Exec{
+      path        => $::path,
+      cwd         => $target,
+      user        => $user,
+      group       => $group,
+      environment => $environment,
+      creates     => $creates_path,
+      unless      => $unless,
+      onlyif      => $onlyif,
+      logoutput   => on_failure,
+    }
+  }
+
+  case $name {
+    /.tar$/: {
+      $command = "tar xf ${source_path}"
+    }
+
+    /(.tgz|.tar.gz)$/: {
+      if $::osfamily == 'Solaris' {
+        $command = "gunzip -dc < ${source_path} | tar xf - "
+      } else {
+        $command = "tar xzf ${source_path}"
+      }
+    }
+
+    /.zip$/: {
+      $command = "unzip ${source_path}"
+    }
+
+    /.war$/: {
+      $command = "jar xf ${source_path}"
+    }
+
+    default: {
+      fail("staging::extract: unsupported file format ${name}.")
+    }
+  }
+
+  exec { "extract ${name}":
+    command => $command,
+  }
+}
+
+
+ diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/staging/docs/file.html b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/staging/docs/file.html new file mode 100644 index 00000000000..38aa0da55c8 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/staging/docs/file.html @@ -0,0 +1,178 @@ + + + + + file.pp + + + +
+
+
+ Jump To … + +
+ + + + + + + + + + + + +

file.pp

+
+ +
+

Define: staging::file

+ +

Overview:

+ +

Define resource to retrieve files to staging directories. It is +intententionally not replacing files, as these intend to be large binaries +that are versioned.

+ +

Notes:

+ +

If you specify a different staging location, please manage the file + resource as necessary.

+ +

Parameters:

+ +
    +
  • [source]: the source file location, supports local files, puppet://, http://, https://, ftp:// (default: )
  • +
  • [target]: the target staging directory, if unspecified ${staging::path}/${caller_module_name} (default: undef)
  • +
  • [username]: https or ftp username (default: undef)
  • +
  • [certificate]: https certificate file (default: undef)
  • +
  • [password]: https or ftp user password or https certificate password (default: undef)
  • +
  • [environment]: environment variable for settings such as http_proxy, https_proxy, of ftp_proxy (default: undef)
  • +
  • [timeout]: the the time to wait for the file transfer to complete (default: undef)
  • +
  • [subdir]: (default: $caller_module_name)
  • +
+ + +

Usage:

+ +
$caller_module_name = 'demo'
+
+class { 'staging':
+  path => '/tmp/staging',
+}
+
+staging::file { 'sample':
+  source => 'puppet:///modules/staging/sample',
+}
+
+staging::file { 'passwd':
+  source => '/etc/passwd',
+}
+
+staging::file { 'manpage.html':
+  source => 'http://curl.haxx.se/docs/manpage.html',
+}
+
+ +
+
define staging::file (
+  $source,              
+  $target      = undef, 
+  $username    = undef, 
+  $certificate = undef, 
+  $password    = undef, 
+  $environment = undef, 
+  $timeout     = undef, 
+  $subdir      = $caller_module_name
+) {
+
+  include staging
+
+  if $target {
+    $target_file = $target
+    $staging_dir = staging_parse($target, 'parent')
+  } else {
+    $staging_dir = "${staging::path}/${subdir}"
+    $target_file = "${staging_dir}/${name}"
+
+    if ! defined(File[$staging_dir]) {
+      file { $staging_dir:
+        ensure=>directory,
+      }
+    }
+  }
+
+  Exec {
+    path        => '/usr/local/bin:/usr/bin:/bin',
+    environment => $environment,
+    cwd         => $staging_dir,
+    creates     => $target_file,
+    timeout     => $timeout,
+    logoutput   => on_failure,
+  }
+
+  case $source {
+    /^\//: {
+      file { $target_file:
+        source  => $source,
+        replace => false,
+      }
+    }
+
+    /^puppet:\/\//: {
+      file { $target_file:
+        source  => $source,
+        replace => false,
+      }
+    }
+
+    /^http:\/\//: {
+      exec { $target_file:
+        command     => "curl -L -o ${name} ${source}",
+      }
+    }
+
+    /^https:\/\//: {
+      if $username {
+        $command = "curl -L -o ${name} -u ${username}:${password} ${source}"
+      } elsif $certificate {
+        $command = "curl -L -o ${name} -E ${certificate}:${password} ${source}"
+      } else {
+        $command = "curl -L -o ${name} ${source}"
+      }
+
+      exec { $target_file:
+        command     => $command,
+      }
+    }
+
+    /^ftp:\/\//: {
+      if $username {
+        $command = "curl -o ${name} -u ${username}:${password} ${source}"
+      } else {
+        $command = "curl -o ${name} ${source}"
+      }
+
+      exec { $target_file:
+        command     => $command,
+      }
+    }
+
+    default: {
+      fail("stage::file: do not recognize source ${source}.")
+    }
+  }
+
+}
+
+
+ diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/staging/docs/init.html b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/staging/docs/init.html new file mode 100644 index 00000000000..da5b2be9a9d --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/staging/docs/init.html @@ -0,0 +1,87 @@ + + + + + init.pp + + + +
+
+
+ Jump To … + +
+ + + + + + + + + + + + +

init.pp

+
+ +
+

Class: staging

+ +

This module manages staging and extraction of files from various sources.

+ +

Actions:

+ +

Creates the root staging directory. By default files will be created in a subdirectory matching the caller_module_name.

+ +

/opt/staging/

+ +
          |-- puppet
+          |   `-- puppet.enterprise.2.0.tar.gz
+          `-- tomcat
+              `-- tomcat.5.0.tar.gz
+
+ +

Parameters:

+ +
    +
  • [path]: staging directory filepath (default: ‘/opt/staging’)
  • +
  • [owner]: staging directory owner (default: ‘0’)
  • +
  • [group]: staging directory group (default: ‘0’)
  • +
  • [mode]: staging directory permission (default: ‘0755’)
  • +
+ + +

Usage:

+ +
include staging
+
+ +
+
class staging (
+  $path  = '/opt/staging', 
+  $owner = '0',            
+  $group = '0',            
+  $mode  = '0755'          
+) {
+
+  file { $path:
+    ensure => directory,
+    owner  => $owner,
+    group  => $group,
+    mode   => $mode,
+  }
+
+}
+
+
+ diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/staging/files/sample b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/staging/files/sample new file mode 100644 index 00000000000..01e34c31d91 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/staging/files/sample @@ -0,0 +1 @@ +sample file to test module. diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/staging/files/sample.tar.bz2 b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/staging/files/sample.tar.bz2 new file mode 100644 index 00000000000..f7fbcf229f0 Binary files /dev/null and b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/staging/files/sample.tar.bz2 differ diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/staging/files/sample.tar.gz b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/staging/files/sample.tar.gz new file mode 100644 index 00000000000..9bb95d11a56 Binary files /dev/null and b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/staging/files/sample.tar.gz differ diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/staging/lib/facter/staging_http_get.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/staging/lib/facter/staging_http_get.rb new file mode 100644 index 00000000000..19784a690eb --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/staging/lib/facter/staging_http_get.rb @@ -0,0 +1,29 @@ +Facter.add("staging_http_get") do + setcode do + + fact = nil + + which = lambda do |cmd| + result = nil + exts = ENV['PATHEXT'] ? ENV['PATHEXT'].split(';') : [''] + ENV['PATH'].split(File::PATH_SEPARATOR).each do |path| + exts.each do |ext| + exe = File.join(path, "#{cmd}#{ext}") + result = exe if File.executable? exe + break if result + end + break if result + end + result + end + + ['curl', 'wget', 'powershell'].each do |cmd| + available = which.call(cmd) + fact = available ? cmd : nil + break if fact + end + + fact + + end +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/staging/lib/facter/staging_windir.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/staging/lib/facter/staging_windir.rb new file mode 100644 index 00000000000..82086336512 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/staging/lib/facter/staging_windir.rb @@ -0,0 +1,11 @@ +Facter.add(:staging_windir) do + confine :osfamily => :windows + setcode do + program_data = `echo %SYSTEMDRIVE%\\ProgramData`.chomp + if File.directory? program_data + "#{program_data}\\staging" + else + "C:\\staging" + end + end +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/staging/lib/puppet/parser/functions/scope_defaults.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/staging/lib/puppet/parser/functions/scope_defaults.rb new file mode 100644 index 00000000000..6c814849a0d --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/staging/lib/puppet/parser/functions/scope_defaults.rb @@ -0,0 +1,17 @@ +module Puppet::Parser::Functions + newfunction(:scope_defaults, :type => :rvalue, :doc => <<-EOS +Determine if specified resource defaults have a attribute defined in +current scope. +EOS + ) do |arguments| + + raise(Puppet::ParseError, "scope_defaults(): Wrong number of arguments " + + "given (#{arguments.size} for 2)") if arguments.size != 2 + + # auto capitalize puppet resource for lookup: + res_type = arguments[0].split('::').collect{ |x| x.capitalize }.join('::') + res_attr = arguments[1] + + return self.lookupdefaults(res_type).has_key?(res_attr.to_sym) + end +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/staging/lib/puppet/parser/functions/staging_parse.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/staging/lib/puppet/parser/functions/staging_parse.rb new file mode 100644 index 00000000000..666c887e3c3 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/staging/lib/puppet/parser/functions/staging_parse.rb @@ -0,0 +1,36 @@ +require 'uri' + +module Puppet::Parser::Functions + newfunction(:staging_parse, :type => :rvalue, :doc => <<-EOS +Parse filepath to retrieve information about the file. + EOS + ) do |arguments| + + raise(Puppet::ParseError, "staging_parse(): Wrong number of arguments " + + "given (#{arguments.size} for 1, 2, 3)") if arguments.size < 1 || arguments.size > 3 + + source = arguments[0] + path = URI.parse(source).path + + raise Puppet::ParseError, "staging_parse(): #{source.inspect} has no URI " + + "'path' component" if path.nil? + + info = arguments[1] ? arguments[1] : 'filename' + extension = arguments[2] ? arguments[2] : File.extname(path) + + case info + when 'filename' + result = File.basename(path) + when 'basename' + result = File.basename(path, extension) + when 'extname' + result = File.extname(path) + when 'parent' + result = File.expand_path(File.join(path, '..')) + else + raise Puppet::ParseError, "staging_parse(), unknown parse info #{info}." + end + + return result + end +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/staging/manifests/deploy.pp b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/staging/manifests/deploy.pp new file mode 100644 index 00000000000..565038701f1 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/staging/manifests/deploy.pp @@ -0,0 +1,42 @@ +# The define resource extracts compressed file to a staging location. +define staging::deploy ( + $source, #: the source file location, supports local files, puppet://, http://, https://, ftp:// + $target, #: the target extraction directory + $staging_path = undef, #: the staging location for compressed file. defaults to ${staging::path}/${caller_module_name} + $username = undef, #: https or ftp username + $certificate = undef, #: https certifcate file + $password = undef, #: https or ftp user password or https certificate password + $environment = undef, #: environment variable for settings such as http_proxy + $timeout = undef, #: the time to wait for the file transfer to complete + $user = undef, #: extract file as this user + $group = undef, #: extract group as this group + $creates = undef, #: the file/folder created after extraction. if unspecified defaults to ${target}/${name} + $unless = undef, #: alternative way to conditionally extract file + $onlyif = undef #: alternative way to conditionally extract file +) { + + staging::file { $name: + source => $source, + target => $staging_path, + username => $username, + certificate => $certificate, + password => $password, + environment => $environment, + subdir => $caller_module_name, + timeout => $timeout, + } + + staging::extract { $name: + target => $target, + source => $staging_path, + user => $user, + group => $group, + environment => $environment, + subdir => $caller_module_name, + creates => $creates, + unless => $unless, + onlyif => $onlyif, + require => Staging::File[$name], + } + +} diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/staging/manifests/extract.pp b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/staging/manifests/extract.pp new file mode 100644 index 00000000000..163da149265 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/staging/manifests/extract.pp @@ -0,0 +1,95 @@ +# Define resource to extract files from staging directories to target directories. +define staging::extract ( + $target, #: the target extraction directory + $source = undef, #: the source compression file, supports tar, tar.gz, zip, war + $creates = undef, #: the file created after extraction. if unspecified defaults ${staging::path}/${caller_module_name}/${name} ${target}/${name} + $unless = undef, #: alternative way to conditionally check whether to extract file. + $onlyif = undef, #: alternative way to conditionally check whether to extract file. + $user = undef, #: extract file as this user. + $group = undef, #: extract file as this group. + $environment = undef, #: environment variables. + $subdir = $caller_module_name #: subdir per module in staging directory. +) { + + include staging + + if $source { + $source_path = $source + } else { + $source_path = "${staging::path}/${subdir}/${name}" + } + + # Use user supplied creates path, set default value if creates, unless or + # onlyif is not supplied. + if $creates { + $creates_path = $creates + } elsif ! ($unless or $onlyif) { + if $name =~ /.tar.gz$/ { + $folder = staging_parse($name, 'basename', '.tar.gz') + } elsif $name =~ /.tar.bz2$/ { + $folder = staging_parse($name, 'basename', '.tar.bz2') + } else { + $folder = staging_parse($name, 'basename') + } + $creates_path = "${target}/${folder}" + } + + if scope_defaults('Exec','path') { + Exec{ + cwd => $target, + user => $user, + group => $group, + environment => $environment, + creates => $creates_path, + unless => $unless, + onlyif => $onlyif, + logoutput => on_failure, + } + } else { + Exec{ + path => $::path, + cwd => $target, + user => $user, + group => $group, + environment => $environment, + creates => $creates_path, + unless => $unless, + onlyif => $onlyif, + logoutput => on_failure, + } + } + + case $name { + /.tar$/: { + $command = "tar xf ${source_path}" + } + + /(.tgz|.tar.gz)$/: { + if $::osfamily == 'Solaris' { + $command = "gunzip -dc < ${source_path} | tar xf - " + } else { + $command = "tar xzf ${source_path}" + } + } + + /.tar.bz2$/: { + $command = "tar xjf ${source_path}" + } + + /.zip$/: { + $command = "unzip ${source_path}" + } + + /(.war|.jar)$/: { + $command = "jar xf ${source_path}" + } + + default: { + fail("staging::extract: unsupported file format ${name}.") + } + } + + exec { "extract ${name}": + command => $command, + } +} diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/staging/manifests/file.pp b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/staging/manifests/file.pp new file mode 100644 index 00000000000..60b69d796b2 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/staging/manifests/file.pp @@ -0,0 +1,115 @@ +# #### Overview: +# +# Define resource to retrieve files to staging directories. It is +# intententionally not replacing files, as these intend to be large binaries +# that are versioned. +# +# #### Notes: +# +# If you specify a different staging location, please manage the file +# resource as necessary. +# +define staging::file ( + $source, #: the source file location, supports local files, puppet://, http://, https://, ftp:// + $target = undef, #: the target staging directory, if unspecified ${staging::path}/${caller_module_name} + $username = undef, #: https or ftp username + $certificate = undef, #: https certificate file + $password = undef, #: https or ftp user password or https certificate password + $environment = undef, #: environment variable for settings such as http_proxy, https_proxy, of ftp_proxy + $timeout = undef, #: the the time to wait for the file transfer to complete + $curl_option = undef, #: options to pass to curl + $wget_option = undef, #: options to pass to wget + $subdir = $caller_module_name +) { + + include staging + + $quoted_source = shellquote($source) + + if $target { + $target_file = $target + $staging_dir = staging_parse($target, 'parent') + } else { + $staging_dir = "${staging::path}/${subdir}" + $target_file = "${staging_dir}/${name}" + + if ! defined(File[$staging_dir]) { + file { $staging_dir: + ensure=>directory, + } + } + } + + Exec { + path => $staging::exec_path, + environment => $environment, + cwd => $staging_dir, + creates => $target_file, + timeout => $timeout, + logoutput => on_failure, + } + + case $::staging_http_get { + 'curl', default: { + $http_get = "curl ${curl_option} -f -L -o ${name} ${quoted_source}" + $http_get_passwd = "curl ${curl_option} -f -L -o ${name} -u ${username}:${password} ${quoted_source}" + $http_get_cert = "curl ${curl_option} -f -L -o ${name} -E ${certificate}:${password} ${quoted_source}" + $ftp_get = "curl ${curl_option} -o ${name} ${quoted_source}" + $ftp_get_passwd = "curl ${curl_option} -o ${name} -u ${username}:${password} ${quoted_source}" + } + 'wget': { + $http_get = "wget ${wget_option} -O ${name} ${quoted_source}" + $http_get_passwd = "wget ${wget_option} -O ${name} --user=${username} --password=${password} ${quoted_source}" + $http_get_cert = "wget ${wget_option} -O ${name} --user=${username} --certificate=${certificate} ${quoted_source}" + $ftp_get = $http_get + $ftp_get_passwd = $http_get_passwd + } + 'powershell':{ + $http_get = "powershell.exe -Command \"\$wc = New-Object System.Net.WebClient;\$wc.DownloadFile('${source}','${target_file}')\"" + $ftp_get = $http_get + $http_get_password = "powershell.exe -Command \"\$wc = (New-Object System.Net.WebClient);\$wc.Credentials = New-Object System.Net.NetworkCredential('${username}','${password}');\$wc.DownloadFile(${source},${target_file})\"" + $ftp_get_password = $http_get_password + } + } + + case $source { + /^\//: { + file { $target_file: + source => $source, + replace => false, + } + } + /^puppet:\/\//: { + file { $target_file: + source => $source, + replace => false, + } + } + /^http:\/\//: { + if $username { $command = $http_get_passwd } + else { $command = $http_get } + exec { $target_file: + command => $command, + } + } + /^https:\/\//: { + if $username { $command = $http_get_passwd } + elsif $certificate { $command = $http_get_cert } + else { $command = $http_get } + exec { $target_file: + command => $command, + } + } + /^ftp:\/\//: { + if $username { $command = $ftp_get_passwd } + else { $command = $ftp_get } + exec { $target_file: + command => $command, + } + } + default: { + fail("stage::file: do not recognize source ${source}.") + } + } + +} diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/staging/manifests/init.pp b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/staging/manifests/init.pp new file mode 100644 index 00000000000..19bb2da40e9 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/staging/manifests/init.pp @@ -0,0 +1,28 @@ +# This module manages staging and extraction of files from various sources. +# +# #### Actions: +# +# Creates the root staging directory. By default files will be created in a subdirectory matching the caller_module_name. +# +# /opt/staging/ +# |-- puppet +# | `-- puppet.enterprise.2.0.tar.gz +# `-- tomcat +# `-- tomcat.5.0.tar.gz +# +class staging ( + $path = $staging::params::path, #: staging directory filepath + $owner = $staging::params::owner, #: staging directory owner + $group = $staging::params::group, #: staging directory group + $mode = $staging::params::mode, #: staging directory permission + $exec_path = $staging::params::exec_path #: executable default path +) inherits staging::params { + + file { $path: + ensure => directory, + owner => $owner, + group => $group, + mode => $mode, + } + +} diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/staging/manifests/params.pp b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/staging/manifests/params.pp new file mode 100644 index 00000000000..95ee0a134d9 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/staging/manifests/params.pp @@ -0,0 +1,26 @@ +# OS specific parameters +class staging::params { + case $::osfamily { + default: { + $path = '/opt/staging' + $owner = '0' + $group = '0' + $mode = '0755' + $exec_path = '/usr/local/bin:/usr/bin:/bin' + } + 'Solaris': { + $path = '/opt/staging' + $owner = '0' + $group = '0' + $mode = '0755' + $exec_path = '/usr/local/bin:/usr/bin:/bin:/usr/sfw/bin' + } + 'windows': { + $path = $::staging_windir + $owner = undef + $group = undef + $mode = '0755' + $exec_path = $::path + } + } +} diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/staging/spec/defines/staging_deploy_spec.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/staging/spec/defines/staging_deploy_spec.rb new file mode 100644 index 00000000000..66541d22f1d --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/staging/spec/defines/staging_deploy_spec.rb @@ -0,0 +1,26 @@ +require 'spec_helper' +describe 'staging::deploy', :type => :define do + + # forcing a more sane caller_module_name to match real usage. + let(:facts) { { :caller_module_name => 'spec', + :osfamily => 'RedHat', + :path => '/usr/local/bin:/usr/bin:/bin', } } + + describe 'when deploying tar.gz' do + let(:title) { 'sample.tar.gz' } + let(:params) { { :source => 'puppet:///modules/staging/sample.tar.gz', + :target => '/usr/local' } } + + it { + should contain_file('/opt/staging') + should contain_file('/opt/staging/spec/sample.tar.gz') + should contain_exec('extract sample.tar.gz').with({ + :command => 'tar xzf /opt/staging/spec/sample.tar.gz', + :path => '/usr/local/bin:/usr/bin:/bin', + :cwd => '/usr/local', + :creates => '/usr/local/sample' + }) + } + end + +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/staging/spec/defines/staging_extract_spec.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/staging/spec/defines/staging_extract_spec.rb new file mode 100644 index 00000000000..a3d742245df --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/staging/spec/defines/staging_extract_spec.rb @@ -0,0 +1,58 @@ +require 'spec_helper' +describe 'staging::extract', :type => :define do + + # forcing a more sane caller_module_name to match real usage. + let(:facts) { { :caller_module_name => 'spec', + :osfamily => 'RedHat', + :path => '/usr/local/bin:/usr/bin:/bin' } } + + describe 'when deploying tar.gz' do + let(:title) { 'sample.tar.gz' } + let(:params) { { :target => '/opt' } } + + it { + should contain_file('/opt/staging') + should contain_exec('extract sample.tar.gz').with({ + :command => 'tar xzf /opt/staging/spec/sample.tar.gz', + :path => '/usr/local/bin:/usr/bin:/bin', + :cwd => '/opt', + :creates => '/opt/sample' + }) + } + end + + describe 'when deploying zip' do + let(:title) { 'sample.zip' } + let(:params) { { :target => '/opt' } } + + it { should contain_file('/opt/staging') + should contain_exec('extract sample.zip').with({ + :command => 'unzip /opt/staging/spec/sample.zip', + :path => '/usr/local/bin:/usr/bin:/bin', + :cwd => '/opt', + :creates => '/opt/sample' + }) + } + end + + describe 'when deploying war' do + let(:title) { 'sample.war' } + let(:params) { { :target => '/opt' } } + + it { should contain_file('/opt/staging') + should contain_exec('extract sample.war').with({ + :command => 'jar xf /opt/staging/spec/sample.war', + :path => '/usr/local/bin:/usr/bin:/bin', + :cwd => '/opt', + :creates => '/opt/sample' + }) + } + end + + describe 'when deploying unknown' do + let(:title) { 'sample.zzz'} + let(:params) { { :target => '/opt' } } + + it { expect { should contain_exec("exec sample.zzz") }.to raise_error(Puppet::Error) } + end +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/staging/spec/defines/staging_file_spec.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/staging/spec/defines/staging_file_spec.rb new file mode 100644 index 00000000000..ab1ee59e119 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/staging/spec/defines/staging_file_spec.rb @@ -0,0 +1,157 @@ +require 'spec_helper' +describe 'staging::file', :type => :define do + + # forcing a more sane caller_module_name to match real usage. + let(:facts) { { :caller_module_name=> 'spec' } } + + describe 'when deploying via puppet' do + let(:title) { 'sample.tar.gz' } + let(:params) { { :source => 'puppet:///modules/staging/sample.tar.gz' } } + + it { + should contain_file('/opt/staging') + should contain_file('/opt/staging/spec/sample.tar.gz') + should_not contain_exec('/opt/staging/spec/sample.tar.gz') + } + end + + describe 'when deploying via local' do + let(:title) { 'sample.tar.gz' } + let(:params) { { :source => '/nfs/sample.tar.gz', + :target => '/usr/local/sample.tar.gz', + } } + + it { + should contain_file('/opt/staging') + should contain_file('/usr/local/sample.tar.gz') + should_not contain_exec('/opt/staging/spec/sample.tar.gz') + } + end + + describe 'when deploying via http' do + let(:title) { 'sample.tar.gz' } + let(:params) { { :source => 'http://webserver/sample.tar.gz' } } + + it { + should contain_file('/opt/staging') + should contain_exec('/opt/staging/spec/sample.tar.gz').with( { + :command => 'curl -f -L -o sample.tar.gz http://webserver/sample.tar.gz', + :path => '/usr/local/bin:/usr/bin:/bin', + :environment => nil, + :cwd => '/opt/staging/spec', + :creates => '/opt/staging/spec/sample.tar.gz', + :logoutput => 'on_failure', + }) + } + end + + describe 'when deploying via http with custom curl options' do + let(:title) { 'sample.tar.gz' } + let(:params) { { + :source => 'http://webserver/sample.tar.gz', + :curl_option => '-b', + } } + + it { + should contain_file('/opt/staging') + should contain_exec('/opt/staging/spec/sample.tar.gz').with( { + :command => 'curl -b -f -L -o sample.tar.gz http://webserver/sample.tar.gz', + :path => '/usr/local/bin:/usr/bin:/bin', + :environment => nil, + :cwd => '/opt/staging/spec', + :creates => '/opt/staging/spec/sample.tar.gz', + :logoutput => 'on_failure', + }) + } + end + + describe 'when deploying via http with parameters' do + let(:title) { 'sample.tar.gz' } + let(:params) { { :source => 'http://webserver/sample.tar.gz', + :target => '/usr/local/sample.tar.gz', + } } + + it { should contain_file('/opt/staging') + should contain_exec('/usr/local/sample.tar.gz').with( { + :command => 'curl -f -L -o sample.tar.gz http://webserver/sample.tar.gz', + :path => '/usr/local/bin:/usr/bin:/bin', + :environment => nil, + :cwd => '/usr/local', + :creates => '/usr/local/sample.tar.gz', + }) + } + end + + describe 'when deploying via https' do + let(:title) { 'sample.tar.gz' } + let(:params) { { :source => 'https://webserver/sample.tar.gz' } } + + it { should contain_file('/opt/staging') } + it { should contain_exec('/opt/staging/spec/sample.tar.gz').with( { + :command => 'curl -f -L -o sample.tar.gz https://webserver/sample.tar.gz', + :path => '/usr/local/bin:/usr/bin:/bin', + :environment => nil, + :cwd => '/opt/staging/spec', + :creates => '/opt/staging/spec/sample.tar.gz', + :logoutput => 'on_failure', + }) } + end + + describe 'when deploying via https with parameters' do + let(:title) { 'sample.tar.gz' } + let(:params) { { :source => 'https://webserver/sample.tar.gz', + :username => 'puppet', + :password => 'puppet', + } } + + it { + should contain_file('/opt/staging') + should contain_exec('/opt/staging/spec/sample.tar.gz').with( { + :command => 'curl -f -L -o sample.tar.gz -u puppet:puppet https://webserver/sample.tar.gz', + :path => '/usr/local/bin:/usr/bin:/bin', + :environment => nil, + :cwd => '/opt/staging/spec', + :creates => '/opt/staging/spec/sample.tar.gz', + :logoutput => 'on_failure', + }) + } + end + + describe 'when deploying via ftp' do + let(:title) { 'sample.tar.gz' } + let(:params) { { :source => 'ftp://webserver/sample.tar.gz' } } + + it { + should contain_file('/opt/staging') + should contain_exec('/opt/staging/spec/sample.tar.gz').with( { + :command => 'curl -o sample.tar.gz ftp://webserver/sample.tar.gz', + :path => '/usr/local/bin:/usr/bin:/bin', + :environment => nil, + :cwd => '/opt/staging/spec', + :creates => '/opt/staging/spec/sample.tar.gz', + :logoutput => 'on_failure', + }) + } + end + + describe 'when deploying via ftp with parameters' do + let(:title) { 'sample.tar.gz' } + let(:params) { { :source => 'ftp://webserver/sample.tar.gz', + :username => 'puppet', + :password => 'puppet', + } } + + it { + should contain_file('/opt/staging') + should contain_exec('/opt/staging/spec/sample.tar.gz').with( { + :command => 'curl -o sample.tar.gz -u puppet:puppet ftp://webserver/sample.tar.gz', + :path => '/usr/local/bin:/usr/bin:/bin', + :environment => nil, + :cwd => '/opt/staging/spec', + :creates => '/opt/staging/spec/sample.tar.gz', + :logoutput => 'on_failure', + }) + } + end + +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/staging/spec/fixtures/hiera.yaml b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/staging/spec/fixtures/hiera.yaml new file mode 100644 index 00000000000..771e483f53c --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/staging/spec/fixtures/hiera.yaml @@ -0,0 +1,7 @@ +--- +:backends: - puppet + +:hierarchy: - common + +:puppet: + :datasource: data diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/staging/spec/spec_helper.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/staging/spec/spec_helper.rb new file mode 100644 index 00000000000..dc7e9f4a0ef --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/staging/spec/spec_helper.rb @@ -0,0 +1,2 @@ +require 'rubygems' +require 'puppetlabs_spec_helper/module_spec_helper' diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/staging/spec/unit/puppet/parser/functions/scope_defaults_spec.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/staging/spec/unit/puppet/parser/functions/scope_defaults_spec.rb new file mode 100644 index 00000000000..50c460de732 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/staging/spec/unit/puppet/parser/functions/scope_defaults_spec.rb @@ -0,0 +1,45 @@ +#!/usr/bin/env rspec +require 'spec_helper' + +describe "the scope_defaults function" do + let(:scope) { PuppetlabsSpec::PuppetInternals.scope } + + it "should exist" do + Puppet::Parser::Functions.function("scope_defaults").should == "function_scope_defaults" + end + + it "should raise a ParseError if there is less than 2 arguments" do + expect{ scope.function_scope_defaults([]) }. + to raise_error(Puppet::ParseError) + end + + it "should raise a ParseError if there is more than 2 arguments" do + expect{ scope.function_scope_defaults(['exec', 'path', 'error']) }. + to raise_error(Puppet::ParseError) + end + + it "should return false for invalid resource" do + result = scope.function_scope_defaults(['foo', 'path']) + result.should(eq(false)) + end + + it "should return false for resource without default attributes" do + if scope.respond_to? :define_settings + scope.define_settings('Exec', Puppet::Parser::Resource::Param.new(:name => :path, :value => "/bin")) + else + scope.setdefaults('Exec', Puppet::Parser::Resource::Param.new(:name => :path, :value => "/bin")) + end + result = scope.function_scope_defaults(['Exec', 'foo']) + result.should(eq(false)) + end + + it "should return true for resource with default attributes" do + if scope.respond_to? :define_settings + scope.define_settings('Exec', Puppet::Parser::Resource::Param.new(:name => :path, :value => "/bin")) + else + scope.setdefaults('Exec', Puppet::Parser::Resource::Param.new(:name => :path, :value => "/bin")) + end + result = scope.function_scope_defaults(['Exec', 'path']) + result.should(eq(true)) + end +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/staging/spec/unit/puppet/parser/functions/staging_parse_spec.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/staging/spec/unit/puppet/parser/functions/staging_parse_spec.rb new file mode 100755 index 00000000000..c7c9c69f6de --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/staging/spec/unit/puppet/parser/functions/staging_parse_spec.rb @@ -0,0 +1,51 @@ +#!/usr/bin/env rspec +require 'spec_helper' + +describe "the staging parser function" do + let(:scope) { PuppetlabsSpec::PuppetInternals.scope } + + it "should exist" do + Puppet::Parser::Functions.function("staging_parse").should == "function_staging_parse" + end + + it "should raise a ParseError if there is less than 1 arguments" do + lambda { scope.function_staging_parse([]) }.should( raise_error(Puppet::ParseError)) + end + + it "should raise a ParseError if there is more than 3 arguments" do + lambda { scope.function_staging_parse(['/etc', 'filename', '.zip', 'error']) }.should( raise_error(Puppet::ParseError)) + end + + it "should raise a ParseError if there is an invalid info request" do + lambda { scope.function_staging_parse(['/etc', 'sheep', '.zip']) }.should( raise_error(Puppet::ParseError)) + end + + it "should raise a ParseError if 'source' doesn't have a URI path component" do + lambda { scope.function_staging_parse(['uri:without-path']) }.should( raise_error(Puppet::ParseError, /has no URI 'path' component/)) + end + + it "should return the filename by default" do + result = scope.function_staging_parse(["/etc/puppet/sample.tar.gz"]) + result.should(eq('sample.tar.gz')) + end + + it "should return the file basename" do + result = scope.function_staging_parse(["/etc/puppet/sample.tar.gz", "basename"]) + result.should(eq('sample.tar')) + end + + it "should return the file basename with custom extensions" do + result = scope.function_staging_parse(["/etc/puppet/sample.tar.gz", "basename", ".tar.gz"]) + result.should(eq('sample')) + end + + it "should return the file extname" do + result = scope.function_staging_parse(["/etc/puppet/sample.tar.gz", "extname"]) + result.should(eq('.gz')) + end + + it "should return the file parent" do + result = scope.function_staging_parse(["/etc/puppet/sample.tar.gz", "parent"]) + result.should(eq('/etc/puppet')) + end +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/staging/tests/deploy.pp b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/staging/tests/deploy.pp new file mode 100644 index 00000000000..cf9ac58d5ad --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/staging/tests/deploy.pp @@ -0,0 +1,4 @@ +staging::deploy { 'sample.tar.gz': + source => 'puppet:///modules/staging/sample.tar.gz', + target => '/usr/local', +} diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/staging/tests/extract.pp b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/staging/tests/extract.pp new file mode 100644 index 00000000000..257f478cfd4 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/staging/tests/extract.pp @@ -0,0 +1,25 @@ +$caller_module_name = 'demo' + +class { 'staging': + path => '/tmp/staging', +} + +staging::file { 'sample.tar.gz': + source => 'puppet:///modules/staging/sample.tar.gz' +} + +staging::extract { 'sample.tar.gz': + target => '/tmp/staging', + creates => '/tmp/staging/sample', + require => Staging::File['sample.tar.gz'], +} + +staging::file { 'sample.tar.bz2': + source => 'puppet:///modules/staging/sample.tar.bz2' +} + +staging::extract { 'sample.tar.bz2': + target => '/tmp/staging', + creates => '/tmp/staging/sample-tar-bz2', + require => Staging::File['sample.tar.bz2'], +} diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/staging/tests/file.pp b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/staging/tests/file.pp new file mode 100644 index 00000000000..475cf5628c5 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/staging/tests/file.pp @@ -0,0 +1,17 @@ +$caller_module_name = 'demo' + +class { 'staging': + path => '/tmp/staging', +} + +staging::file { 'sample': + source => 'puppet:///modules/staging/sample', +} + +staging::file { 'passwd': + source => '/etc/passwd', +} + +staging::file { 'manpage.html': + source => 'http://curl.haxx.se/docs/manpage.html', +} diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/staging/tests/init.pp b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/staging/tests/init.pp new file mode 100644 index 00000000000..3015c10f047 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/staging/tests/init.pp @@ -0,0 +1 @@ +include staging diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/staging/tests/scope_defaults.pp b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/staging/tests/scope_defaults.pp new file mode 100644 index 00000000000..3073ff4aaff --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/staging/tests/scope_defaults.pp @@ -0,0 +1,7 @@ +Exec { + path => '/bin', +} + +if scope_defaults('Exec', 'path') { + notice('good') +} diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/staging/tests/staging_parse.pp b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/staging/tests/staging_parse.pp new file mode 100644 index 00000000000..117ad166845 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/staging/tests/staging_parse.pp @@ -0,0 +1,12 @@ +$file = '/etc/puppetlabs/foo.bar.tar.gz' +$filename = staging_parse($file) +$basename = staging_parse($file, 'basename') +$extname = staging_parse($file, 'extname') +$parent = staging_parse($file, 'parent') +$rbasename = staging_parse($file, 'basename', '.tar.gz') + +notice($filename) +notice($basename) +notice($extname) +notice($parent) +notice($rbasename) diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/CHANGELOG.md b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/CHANGELOG.md new file mode 100644 index 00000000000..5a3597e3404 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/CHANGELOG.md @@ -0,0 +1,413 @@ +## 2014-05-08 - Release - 4.2.1 +### Summary +This release moves a stray symlink that can cause problems. + +## 2014-05-08 - Release - 4.2.0 +### Summary +This release adds many new functions and fixes, and continues to be backwards compatible with stdlib 3.x + +#### Features +- New `base64()` function +- New `deep_merge()` function +- New `delete_undef_values()` function +- New `delete_values()` function +- New `difference()` function +- New `intersection()` function +- New `is_bool()` function +- New `pick_default()` function +- New `union()` function +- New `validate_ipv4_address` function +- New `validate_ipv6_address` function +- Update `ensure_packages()` to take an option hash as a second parameter. +- Update `range()` to take an optional third argument for range step +- Update `validate_slength()` to take an optional third argument for minimum length +- Update `file_line` resource to take `after` and `multiple` attributes + +#### Bugfixes +- Correct `is_string`, `is_domain_name`, `is_array`, `is_float`, and `is_function_available` for parsing odd types such as bools and hashes. +- Allow facts.d facts to contain `=` in the value +- Fix `root_home` fact on darwin systems +- Fix `concat()` to work with a second non-array argument +- Fix `floor()` to work with integer strings +- Fix `is_integer()` to return true if passed integer strings +- Fix `is_numeric()` to return true if passed integer strings +- Fix `merge()` to work with empty strings +- Fix `pick()` to raise the correct error type +- Fix `uriescape()` to use the default URI.escape list +- Add/update unit & acceptance tests. + + +##2014-03-04 - Supported Release - 3.2.1 +###Summary +This is a supported release + +####Bugfixes +- Fixed `is_integer`/`is_float`/`is_numeric` for checking the value of arithmatic expressions. + +####Known bugs +* No known bugs + +--- + +##### 2013-05-06 - Jeff McCune - 4.1.0 + + * (#20582) Restore facter\_dot\_d to stdlib for PE users (3b887c8) + * (maint) Update Gemfile with GEM\_FACTER\_VERSION (f44d535) + +##### 2013-05-06 - Alex Cline - 4.1.0 + + * Terser method of string to array conversion courtesy of ethooz. (d38bce0) + +##### 2013-05-06 - Alex Cline 4.1.0 + + * Refactor ensure\_resource expectations (b33cc24) + +##### 2013-05-06 - Alex Cline 4.1.0 + + * Changed str-to-array conversion and removed abbreviation. (de253db) + +##### 2013-05-03 - Alex Cline 4.1.0 + + * (#20548) Allow an array of resource titles to be passed into the ensure\_resource function (e08734a) + +##### 2013-05-02 - Raphaël Pinson - 4.1.0 + + * Add a dirname function (2ba9e47) + +##### 2013-04-29 - Mark Smith-Guerrero - 4.1.0 + + * (maint) Fix a small typo in hash() description (928036a) + +##### 2013-04-12 - Jeff McCune - 4.0.2 + + * Update user information in gemspec to make the intent of the Gem clear. + +##### 2013-04-11 - Jeff McCune - 4.0.1 + + * Fix README function documentation (ab3e30c) + +##### 2013-04-11 - Jeff McCune - 4.0.0 + + * stdlib 4.0 drops support with Puppet 2.7 + * stdlib 4.0 preserves support with Puppet 3 + +##### 2013-04-11 - Jeff McCune - 4.0.0 + + * Add ability to use puppet from git via bundler (9c5805f) + +##### 2013-04-10 - Jeff McCune - 4.0.0 + + * (maint) Make stdlib usable as a Ruby GEM (e81a45e) + +##### 2013-04-10 - Erik Dalén - 4.0.0 + + * Add a count function (f28550e) + +##### 2013-03-31 - Amos Shapira - 4.0.0 + + * (#19998) Implement any2array (7a2fb80) + +##### 2013-03-29 - Steve Huff - 4.0.0 + + * (19864) num2bool match fix (8d217f0) + +##### 2013-03-20 - Erik Dalén - 4.0.0 + + * Allow comparisons of Numeric and number as String (ff5dd5d) + +##### 2013-03-26 - Richard Soderberg - 4.0.0 + + * add suffix function to accompany the prefix function (88a93ac) + +##### 2013-03-19 - Kristof Willaert - 4.0.0 + + * Add floor function implementation and unit tests (0527341) + +##### 2012-04-03 - Eric Shamow - 4.0.0 + + * (#13610) Add is\_function\_available to stdlib (961dcab) + +##### 2012-12-17 - Justin Lambert - 4.0.0 + + * str2bool should return a boolean if called with a boolean (5d5a4d4) + +##### 2012-10-23 - Uwe Stuehler - 4.0.0 + + * Fix number of arguments check in flatten() (e80207b) + +##### 2013-03-11 - Jeff McCune - 4.0.0 + + * Add contributing document (96e19d0) + +##### 2013-03-04 - Raphaël Pinson - 4.0.0 + + * Add missing documentation for validate\_augeas and validate\_cmd to README.markdown (a1510a1) + +##### 2013-02-14 - Joshua Hoblitt - 4.0.0 + + * (#19272) Add has\_element() function (95cf3fe) + +##### 2013-02-07 - Raphaël Pinson - 4.0.0 + + * validate\_cmd(): Use Puppet::Util::Execution.execute when available (69248df) + +##### 2012-12-06 - Raphaël Pinson - 4.0.0 + + * Add validate\_augeas function (3a97c23) + +##### 2012-12-06 - Raphaël Pinson - 4.0.0 + + * Add validate\_cmd function (6902cc5) + +##### 2013-01-14 - David Schmitt - 4.0.0 + + * Add geppetto project definition (b3fc0a3) + +##### 2013-01-02 - Jaka Hudoklin - 4.0.0 + + * Add getparam function to get defined resource parameters (20e0e07) + +##### 2013-01-05 - Jeff McCune - 4.0.0 + + * (maint) Add Travis CI Support (d082046) + +##### 2012-12-04 - Jeff McCune - 4.0.0 + + * Clarify that stdlib 3 supports Puppet 3 (3a6085f) + +##### 2012-11-30 - Erik Dalén - 4.0.0 + + * maint: style guideline fixes (7742e5f) + +##### 2012-11-09 - James Fryman - 4.0.0 + + * puppet-lint cleanup (88acc52) + +##### 2012-11-06 - Joe Julian - 4.0.0 + + * Add function, uriescape, to URI.escape strings. Redmine #17459 (fd52b8d) + +##### 2012-09-18 - Chad Metcalf - 3.2.0 + + * Add an ensure\_packages function. (8a8c09e) + +##### 2012-11-23 - Erik Dalén - 3.2.0 + + * (#17797) min() and max() functions (9954133) + +##### 2012-05-23 - Peter Meier - 3.2.0 + + * (#14670) autorequire a file\_line resource's path (dfcee63) + +##### 2012-11-19 - Joshua Harlan Lifton - 3.2.0 + + * Add join\_keys\_to\_values function (ee0f2b3) + +##### 2012-11-17 - Joshua Harlan Lifton - 3.2.0 + + * Extend delete function for strings and hashes (7322e4d) + +##### 2012-08-03 - Gary Larizza - 3.2.0 + + * Add the pick() function (ba6dd13) + +##### 2012-03-20 - Wil Cooley - 3.2.0 + + * (#13974) Add predicate functions for interface facts (f819417) + +##### 2012-11-06 - Joe Julian - 3.2.0 + + * Add function, uriescape, to URI.escape strings. Redmine #17459 (70f4a0e) + +##### 2012-10-25 - Jeff McCune - 3.1.1 + + * (maint) Fix spec failures resulting from Facter API changes (97f836f) + +##### 2012-10-23 - Matthaus Owens - 3.1.0 + + * Add PE facts to stdlib (cdf3b05) + +##### 2012-08-16 - Jeff McCune - 3.0.1 + + * Fix accidental removal of facts\_dot\_d.rb in 3.0.0 release + +##### 2012-08-16 - Jeff McCune - 3.0.0 + + * stdlib 3.0 drops support with Puppet 2.6 + * stdlib 3.0 preserves support with Puppet 2.7 + +##### 2012-08-07 - Dan Bode - 3.0.0 + + * Add function ensure\_resource and defined\_with\_params (ba789de) + +##### 2012-07-10 - Hailee Kenney - 3.0.0 + + * (#2157) Remove facter\_dot\_d for compatibility with external facts (f92574f) + +##### 2012-04-10 - Chris Price - 3.0.0 + + * (#13693) moving logic from local spec\_helper to puppetlabs\_spec\_helper (85f96df) + +##### 2012-10-25 - Jeff McCune - 2.5.1 + + * (maint) Fix spec failures resulting from Facter API changes (97f836f) + +##### 2012-10-23 - Matthaus Owens - 2.5.0 + + * Add PE facts to stdlib (cdf3b05) + +##### 2012-08-15 - Dan Bode - 2.5.0 + + * Explicitly load functions used by ensure\_resource (9fc3063) + +##### 2012-08-13 - Dan Bode - 2.5.0 + + * Add better docs about duplicate resource failures (97d327a) + +##### 2012-08-13 - Dan Bode - 2.5.0 + + * Handle undef for parameter argument (4f8b133) + +##### 2012-08-07 - Dan Bode - 2.5.0 + + * Add function ensure\_resource and defined\_with\_params (a0cb8cd) + +##### 2012-08-20 - Jeff McCune - 2.5.0 + + * Disable tests that fail on 2.6.x due to #15912 (c81496e) + +##### 2012-08-20 - Jeff McCune - 2.5.0 + + * (Maint) Fix mis-use of rvalue functions as statements (4492913) + +##### 2012-08-20 - Jeff McCune - 2.5.0 + + * Add .rspec file to repo root (88789e8) + +##### 2012-06-07 - Chris Price - 2.4.0 + + * Add support for a 'match' parameter to file\_line (a06c0d8) + +##### 2012-08-07 - Erik Dalén - 2.4.0 + + * (#15872) Add to\_bytes function (247b69c) + +##### 2012-07-19 - Jeff McCune - 2.4.0 + + * (Maint) use PuppetlabsSpec::PuppetInternals.scope (master) (deafe88) + +##### 2012-07-10 - Hailee Kenney - 2.4.0 + + * (#2157) Make facts\_dot\_d compatible with external facts (5fb0ddc) + +##### 2012-03-16 - Steve Traylen - 2.4.0 + + * (#13205) Rotate array/string randomley based on fqdn, fqdn\_rotate() (fef247b) + +##### 2012-05-22 - Peter Meier - 2.3.3 + + * fix regression in #11017 properly (f0a62c7) + +##### 2012-05-10 - Jeff McCune - 2.3.3 + + * Fix spec tests using the new spec\_helper (7d34333) + +##### 2012-05-10 - Puppet Labs - 2.3.2 + + * Make file\_line default to ensure => present (1373e70) + * Memoize file\_line spec instance variables (20aacc5) + * Fix spec tests using the new spec\_helper (1ebfa5d) + * (#13595) initialize\_everything\_for\_tests couples modules Puppet ver (3222f35) + * (#13439) Fix MRI 1.9 issue with spec\_helper (15c5fd1) + * (#13439) Fix test failures with Puppet 2.6.x (665610b) + * (#13439) refactor spec helper for compatibility with both puppet 2.7 and master (82194ca) + * (#13494) Specify the behavior of zero padded strings (61891bb) + +##### 2012-03-29 Puppet Labs - 2.1.3 + +* (#11607) Add Rakefile to enable spec testing +* (#12377) Avoid infinite loop when retrying require json + +##### 2012-03-13 Puppet Labs - 2.3.1 + +* (#13091) Fix LoadError bug with puppet apply and puppet\_vardir fact + +##### 2012-03-12 Puppet Labs - 2.3.0 + +* Add a large number of new Puppet functions +* Backwards compatibility preserved with 2.2.x + +##### 2011-12-30 Puppet Labs - 2.2.1 + +* Documentation only release for the Forge + +##### 2011-12-30 Puppet Labs - 2.1.2 + +* Documentation only release for PE 2.0.x + +##### 2011-11-08 Puppet Labs - 2.2.0 + +* #10285 - Refactor json to use pson instead. +* Maint - Add watchr autotest script +* Maint - Make rspec tests work with Puppet 2.6.4 +* #9859 - Add root\_home fact and tests + +##### 2011-08-18 Puppet Labs - 2.1.1 + +* Change facts.d paths to match Facter 2.0 paths. +* /etc/facter/facts.d +* /etc/puppetlabs/facter/facts.d + +##### 2011-08-17 Puppet Labs - 2.1.0 + +* Add R.I. Pienaar's facts.d custom facter fact +* facts defined in /etc/facts.d and /etc/puppetlabs/facts.d are + automatically loaded now. + +##### 2011-08-04 Puppet Labs - 2.0.0 + +* Rename whole\_line to file\_line +* This is an API change and as such motivating a 2.0.0 release according to semver.org. + +##### 2011-08-04 Puppet Labs - 1.1.0 + +* Rename append\_line to whole\_line +* This is an API change and as such motivating a 1.1.0 release. + +##### 2011-08-04 Puppet Labs - 1.0.0 + +* Initial stable release +* Add validate\_array and validate\_string functions +* Make merge() function work with Ruby 1.8.5 +* Add hash merging function +* Add has\_key function +* Add loadyaml() function +* Add append\_line native + +##### 2011-06-21 Jeff McCune - 0.1.7 + +* Add validate\_hash() and getvar() functions + +##### 2011-06-15 Jeff McCune - 0.1.6 + +* Add anchor resource type to provide containment for composite classes + +##### 2011-06-03 Jeff McCune - 0.1.5 + +* Add validate\_bool() function to stdlib + +##### 0.1.4 2011-05-26 Jeff McCune + +* Move most stages after main + +##### 0.1.3 2011-05-25 Jeff McCune + +* Add validate\_re() function + +##### 0.1.2 2011-05-24 Jeff McCune + +* Update to add annotated tag + +##### 0.1.1 2011-05-24 Jeff McCune + +* Add stdlib::stages class with a standard set of stages diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/CONTRIBUTING.md b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/CONTRIBUTING.md new file mode 100644 index 00000000000..5280da15ecc --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/CONTRIBUTING.md @@ -0,0 +1,65 @@ +# How to contribute + +Third-party patches are essential for keeping stdlib great. We simply can't +access the huge number of platforms and myriad configurations for running +stdlib. We want to keep it as easy as possible to contribute changes that +get things working in your environment. There are a few guidelines that we +need contributors to follow so that we can have a chance of keeping on +top of things. + +## Getting Started + +* Make sure you have a [Jira account](http://tickets.puppetlabs.com) +* Make sure you have a [GitHub account](https://github.com/signup/free) +* Submit a ticket for your issue, assuming one does not already exist. + * Clearly describe the issue including steps to reproduce when it is a bug. + * Make sure you fill in the earliest version that you know has the issue. +* Fork the repository on GitHub + +## Making Changes + +* Create a topic branch from where you want to base your work. + * This is usually the master branch. + * Only target release branches if you are certain your fix must be on that + branch. + * To quickly create a topic branch based on master; `git branch + fix/master/my_contribution master` then checkout the new branch with `git + checkout fix/master/my_contribution`. Please avoid working directly on the + `master` branch. +* Make commits of logical units. +* Check for unnecessary whitespace with `git diff --check` before committing. +* Make sure your commit messages are in the proper format. + +```` + (#99999) Make the example in CONTRIBUTING imperative and concrete + + Without this patch applied the example commit message in the CONTRIBUTING + document is not a concrete example. This is a problem because the + contributor is left to imagine what the commit message should look like + based on a description rather than an example. This patch fixes the + problem by making the example concrete and imperative. + + The first line is a real life imperative statement with a ticket number + from our issue tracker. The body describes the behavior without the patch, + why this is a problem, and how the patch fixes the problem when applied. +```` + +* Make sure you have added the necessary tests for your changes. +* Run _all_ the tests to assure nothing else was accidentally broken. + +## Submitting Changes + +* Sign the [Contributor License Agreement](http://links.puppetlabs.com/cla). +* Push your changes to a topic branch in your fork of the repository. +* Submit a pull request to the repository in the puppetlabs organization. +* Update your ticket to mark that you have submitted code and are ready for it to be reviewed. + * Include a link to the pull request in the ticket + +# Additional Resources + +* [More information on contributing](http://links.puppetlabs.com/contribute-to-puppet) +* [Bug tracker (Jira)](http://tickets.puppetlabs.com) +* [Contributor License Agreement](http://links.puppetlabs.com/cla) +* [General GitHub documentation](http://help.github.com/) +* [GitHub pull request documentation](http://help.github.com/send-pull-requests/) +* #puppet-dev IRC channel on freenode.org diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/Gemfile b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/Gemfile new file mode 100644 index 00000000000..bbef720351c --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/Gemfile @@ -0,0 +1,33 @@ +source ENV['GEM_SOURCE'] || 'https://rubygems.org' + +def location_for(place, fake_version = nil) + if place =~ /^(git[:@][^#]*)#(.*)/ + [fake_version, { :git => $1, :branch => $2, :require => false }].compact + elsif place =~ /^file:\/\/(.*)/ + ['>= 0', { :path => File.expand_path($1), :require => false }] + else + [place, { :require => false }] + end +end + +group :development, :test do + gem 'rake', '~> 10.1.0', :require => false + gem 'rspec-puppet', :require => false + gem 'puppetlabs_spec_helper', :require => false + gem 'serverspec', :require => false + gem 'puppet-lint', :require => false + gem 'pry', :require => false + gem 'simplecov', :require => false + gem 'beaker', :require => false + gem 'beaker-rspec', :require => false +end + +ENV['GEM_PUPPET_VERSION'] ||= ENV['PUPPET_GEM_VERSION'] +puppetversion = ENV['GEM_PUPPET_VERSION'] +if puppetversion + gem 'puppet', *location_for(puppetversion) +else + gem 'puppet', :require => false +end + +# vim:ft=ruby diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/Gemfile.lock b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/Gemfile.lock new file mode 100644 index 00000000000..cf4881eaaa7 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/Gemfile.lock @@ -0,0 +1,174 @@ +GEM + remote: https://rubygems.org/ + specs: + CFPropertyList (2.2.7) + addressable (2.3.6) + autoparse (0.3.3) + addressable (>= 2.3.1) + extlib (>= 0.9.15) + multi_json (>= 1.0.0) + aws-sdk (1.38.0) + json (~> 1.4) + nokogiri (>= 1.4.4) + uuidtools (~> 2.1) + beaker (1.10.0) + aws-sdk (~> 1.38) + blimpy (~> 0.6) + fission (~> 0.4) + google-api-client (~> 0.6.4) + inifile (~> 2.0) + json (~> 1.8) + mime-types (~> 1.25) + net-scp (~> 1.1) + net-ssh (~> 2.6) + nokogiri (= 1.5.10) + rbvmomi (= 1.8.1) + unf (~> 0.1) + beaker-rspec (2.0.0) + beaker + rspec + blimpy (0.6.7) + fog + minitar + thor + builder (3.2.2) + coderay (1.1.0) + diff-lcs (1.2.5) + docile (1.1.3) + excon (0.31.0) + extlib (0.9.16) + facter (2.0.1) + CFPropertyList (~> 2.2.6) + faraday (0.8.9) + multipart-post (~> 1.2.0) + fission (0.5.0) + CFPropertyList (~> 2.2) + fog (1.19.0) + builder + excon (~> 0.31.0) + formatador (~> 0.2.0) + mime-types + multi_json (~> 1.0) + net-scp (~> 1.1) + net-ssh (>= 2.1.3) + nokogiri (~> 1.5) + ruby-hmac + formatador (0.2.4) + google-api-client (0.6.4) + addressable (>= 2.3.2) + autoparse (>= 0.3.3) + extlib (>= 0.9.15) + faraday (~> 0.8.4) + jwt (>= 0.1.5) + launchy (>= 2.1.1) + multi_json (>= 1.0.0) + signet (~> 0.4.5) + uuidtools (>= 2.1.0) + hiera (1.3.2) + json_pure + highline (1.6.21) + inifile (2.0.2) + json (1.8.1) + json_pure (1.8.1) + jwt (0.1.11) + multi_json (>= 1.5) + kwalify (0.7.2) + launchy (2.4.2) + addressable (~> 2.3) + metaclass (0.0.4) + method_source (0.8.2) + mime-types (1.25.1) + minitar (0.5.4) + mocha (1.0.0) + metaclass (~> 0.0.1) + multi_json (1.9.2) + multipart-post (1.2.0) + net-scp (1.2.0) + net-ssh (>= 2.6.5) + net-ssh (2.8.0) + nokogiri (1.5.10) + pry (0.9.12.6) + coderay (~> 1.0) + method_source (~> 0.8) + slop (~> 3.4) + puppet (3.5.1) + facter (> 1.6, < 3) + hiera (~> 1.0) + json_pure + rgen (~> 0.6.5) + puppet-lint (0.3.2) + puppetlabs_spec_helper (0.4.1) + mocha (>= 0.10.5) + rake + rspec (>= 2.9.0) + rspec-puppet (>= 0.1.1) + rake (10.1.1) + rbvmomi (1.8.1) + builder + nokogiri (>= 1.4.1) + trollop + rgen (0.6.6) + rspec (2.13.0) + rspec-core (~> 2.13.0) + rspec-expectations (~> 2.13.0) + rspec-mocks (~> 2.13.0) + rspec-core (2.13.1) + rspec-expectations (2.13.0) + diff-lcs (>= 1.1.3, < 2.0) + rspec-mocks (2.13.1) + rspec-puppet (1.0.1) + rspec + rspec-system (2.5.1) + kwalify (~> 0.7.2) + net-scp (~> 1.1) + net-ssh (~> 2.6) + nokogiri (~> 1.5.9) + rbvmomi (~> 1.6) + rspec (~> 2.13) + systemu (~> 2.5) + rspec-system-puppet (2.2.1) + rspec-system (~> 2.0) + rspec-system-serverspec (1.0.0) + rspec-system (~> 2.0) + serverspec (~> 0.6.0) + ruby-hmac (0.4.0) + serverspec (0.6.30) + highline + net-ssh + rspec (~> 2.13.0) + signet (0.4.5) + addressable (>= 2.2.3) + faraday (~> 0.8.1) + jwt (>= 0.1.5) + multi_json (>= 1.0.0) + simplecov (0.8.2) + docile (~> 1.1.0) + multi_json + simplecov-html (~> 0.8.0) + simplecov-html (0.8.0) + slop (3.5.0) + systemu (2.6.4) + thor (0.19.1) + trollop (2.0) + unf (0.1.4) + unf_ext + unf_ext (0.0.6) + uuidtools (2.1.4) + +PLATFORMS + ruby + +DEPENDENCIES + beaker + beaker-rspec + pry + puppet + puppet-lint + puppetlabs_spec_helper + rake (~> 10.1.0) + rspec-puppet + rspec-system + rspec-system-puppet + rspec-system-serverspec + serverspec + simplecov diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/LICENSE b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/LICENSE new file mode 100644 index 00000000000..ec0587c0d9f --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/LICENSE @@ -0,0 +1,19 @@ +Copyright (C) 2011 Puppet Labs Inc + +and some parts: + +Copyright (C) 2011 Krzysztof Wilczynski + +Puppet Labs can be contacted at: info@puppetlabs.com + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/Modulefile b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/Modulefile new file mode 100644 index 00000000000..c5da72daccd --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/Modulefile @@ -0,0 +1,11 @@ +name 'puppetlabs-stdlib' +version '4.2.1' +source 'git://github.com/puppetlabs/puppetlabs-stdlib.git' +author 'puppetlabs' +license 'Apache 2.0' +summary 'Puppet Module Standard Library' +description 'Standard Library for Puppet Modules' +project_page 'https://github.com/puppetlabs/puppetlabs-stdlib' + +## Add dependencies, if any: +# dependency 'username/name', '>= 1.2.0' diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/README.markdown b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/README.markdown new file mode 100644 index 00000000000..e9ad53b8b9a --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/README.markdown @@ -0,0 +1,1304 @@ +# Puppet Labs Standard Library # + +[![Build Status](https://travis-ci.org/puppetlabs/puppetlabs-stdlib.png?branch=master)](https://travis-ci.org/puppetlabs/puppetlabs-stdlib) + +This module provides a "standard library" of resources for developing Puppet +Modules. This modules will include the following additions to Puppet + + * Stages + * Facts + * Functions + * Defined resource types + * Types + * Providers + +This module is officially curated and provided by Puppet Labs. The modules +Puppet Labs writes and distributes will make heavy use of this standard +library. + +To report or research a bug with any part of this module, please go to +[http://tickets.puppetlabs.com/browse/PUP](http://tickets.puppetlabs.com/browse/PUP) + +# Versions # + +This module follows semver.org (v1.0.0) versioning guidelines. The standard +library module is released as part of [Puppet +Enterprise](http://puppetlabs.com/puppet/puppet-enterprise/) and as a result +older versions of Puppet Enterprise that Puppet Labs still supports will have +bugfix maintenance branches periodically "merged up" into master. The current +list of integration branches are: + + * v2.1.x (v2.1.1 released in PE 1) + * v2.2.x (Never released as part of PE, only to the Forge) + * v2.3.x (Released in PE 2) + * v3.0.x (Released in PE 3) + * v4.0.x (Maintains compatibility with v3.x despite the major semantic version bump. Compatible with Puppet 2.7.x) + * v5.x (To be released when stdlib can drop support for Puppet 2.7.x. Please see [this discussion](https://github.com/puppetlabs/puppetlabs-stdlib/pull/176#issuecomment-30251414)) + * master (mainline development branch) + +The first Puppet Enterprise version including the stdlib module is Puppet +Enterprise 1.2. + +# Compatibility # + +Puppet Versions | < 2.6 | 2.6 | 2.7 | 3.x | +:---------------|:-----:|:---:|:---:|:----: +**stdlib 2.x** | no | **yes** | **yes** | no +**stdlib 3.x** | no | no | **yes** | **yes** +**stdlib 4.x** | no | no | **yes** | **yes** + +The stdlib module does not work with Puppet versions released prior to Puppet +2.6.0. + +## stdlib 2.x ## + +All stdlib releases in the 2.0 major version support Puppet 2.6 and Puppet 2.7. + +## stdlib 3.x ## + +The 3.0 major release of stdlib drops support for Puppet 2.6. Stdlib 3.x +supports Puppet 2 and Puppet 3. + +## stdlib 4.x ## + +The 4.0 major release of stdlib was intended to drop support for Puppet 2.7, +but the impact on end users was too high. The decision was made to treat +stdlib 4.x as a continuation of stdlib 3.x support. Stdlib 4.x supports Puppet +2.7 and 3. Notably, ruby 1.8.5 is no longer supported though ruby +1.8.7, 1.9.3, and 2.0.0 are fully supported. + +# Functions # + +abs +--- +Returns the absolute value of a number, for example -34.56 becomes +34.56. Takes a single integer and float value as an argument. + + +- *Type*: rvalue + +any2array +--------- +This converts any object to an array containing that object. Empty argument +lists are converted to an empty array. Arrays are left untouched. Hashes are +converted to arrays of alternating keys and values. + + +- *Type*: rvalue + +base64 +-------- +Converts a string to and from base64 encoding. +Requires an action ['encode','decode'] and either a plain or base64 encoded +string + + +- *Type*: rvalue + +bool2num +-------- +Converts a boolean to a number. Converts the values: +false, f, 0, n, and no to 0 +true, t, 1, y, and yes to 1 + Requires a single boolean or string as an input. + + +- *Type*: rvalue + +capitalize +---------- +Capitalizes the first letter of a string or array of strings. +Requires either a single string or an array as an input. + + +- *Type*: rvalue + +chomp +----- +Removes the record separator from the end of a string or an array of +strings, for example `hello\n` becomes `hello`. +Requires a single string or array as an input. + + +- *Type*: rvalue + +chop +---- +Returns a new string with the last character removed. If the string ends +with `\r\n`, both characters are removed. Applying chop to an empty +string returns an empty string. If you wish to merely remove record +separators then you should use the `chomp` function. +Requires a string or array of strings as input. + + +- *Type*: rvalue + +concat +------ +Appends the contents of array 2 onto array 1. + +*Example:* + + concat(['1','2','3'],['4','5','6']) + +Would result in: + + ['1','2','3','4','5','6'] + + concat(['1','2','3'],'4') + +Would result in: + + ['1','2','3','4'] + +- *Type*: rvalue + +count +----- +Takes an array as first argument and an optional second argument. +Count the number of elements in array that matches second argument. +If called with only an array it counts the number of elements that are not nil/undef. + + +- *Type*: rvalue + +defined_with_params +------------------- +Takes a resource reference and an optional hash of attributes. + +Returns true if a resource with the specified attributes has already been added +to the catalog, and false otherwise. + + user { 'dan': + ensure => present, + } + + if ! defined_with_params(User[dan], {'ensure' => 'present' }) { + user { 'dan': ensure => present, } + } + + +- *Type*: rvalue + +delete +------ +Deletes all instances of a given element from an array, substring from a +string, or key from a hash. + +*Examples:* + + delete(['a','b','c','b'], 'b') + Would return: ['a','c'] + + delete({'a'=>1,'b'=>2,'c'=>3}, 'b') + Would return: {'a'=>1,'c'=>3} + + delete('abracadabra', 'bra') + Would return: 'acada' + + +- *Type*: rvalue + +delete_at +--------- +Deletes a determined indexed value from an array. + +*Examples:* + + delete_at(['a','b','c'], 1) + +Would return: ['a','c'] + + +- *Type*: rvalue + +delete_values +------------- +Deletes all instances of a given value from a hash. + +*Examples:* + + delete_values({'a'=>'A','b'=>'B','c'=>'C','B'=>'D'}, 'B') + +Would return: {'a'=>'A','c'=>'C','B'=>'D'} + + +- *Type*: rvalue + +delete_undef_values +------------------- +Deletes all instances of the undef value from an array or hash. + +*Examples:* + + $hash = delete_undef_values({a=>'A', b=>'', c=>undef, d => false}) + +Would return: {a => 'A', b => '', d => false} + + $array = delete_undef_values(['A','',undef,false]) + +Would return: ['A','',false] + +- *Type*: rvalue + +difference +---------- +This function returns the difference between two arrays. +The returned array is a copy of the original array, removing any items that +also appear in the second array. + +*Examples:* + + difference(["a","b","c"],["b","c","d"]) + +Would return: ["a"] + +dirname +------- +Returns the `dirname` of a path. + +*Examples:* + + dirname('/path/to/a/file.ext') + +Would return: '/path/to/a' + +downcase +-------- +Converts the case of a string or all strings in an array to lower case. + + +- *Type*: rvalue + +empty +----- +Returns true if the variable is empty. + + +- *Type*: rvalue + +ensure_packages +--------------- +Takes a list of packages and only installs them if they don't already exist. +It optionally takes a hash as a second parameter that will be passed as the +third argument to the ensure_resource() function. + + +- *Type*: statement + +ensure_resource +--------------- +Takes a resource type, title, and a list of attributes that describe a +resource. + + user { 'dan': + ensure => present, + } + +This example only creates the resource if it does not already exist: + + ensure_resource('user', 'dan', {'ensure' => 'present' }) + +If the resource already exists but does not match the specified parameters, +this function will attempt to recreate the resource leading to a duplicate +resource definition error. + +An array of resources can also be passed in and each will be created with +the type and parameters specified if it doesn't already exist. + + ensure_resource('user', ['dan','alex'], {'ensure' => 'present'}) + + + +- *Type*: statement + +file_line +--------- +This resource ensures that a given line is contained within a file. You can also use +"match" to replace existing lines. + +*Examples:* + + file_line { 'sudo_rule': + path => '/etc/sudoers', + line => '%sudo ALL=(ALL) ALL', + } + + file_line { 'change_mount': + path => '/etc/fstab', + line => '10.0.0.1:/vol/data /opt/data nfs defaults 0 0', + match => '^172.16.17.2:/vol/old', + } + +- *Type*: resource + +flatten +------- +This function flattens any deeply nested arrays and returns a single flat array +as a result. + +*Examples:* + + flatten(['a', ['b', ['c']]]) + +Would return: ['a','b','c'] + + +- *Type*: rvalue + +floor +----- +Returns the largest integer less or equal to the argument. +Takes a single numeric value as an argument. + + +- *Type*: rvalue + +fqdn_rotate +----------- +Rotates an array a random number of times based on a nodes fqdn. + + +- *Type*: rvalue + +get_module_path +--------------- +Returns the absolute path of the specified module for the current +environment. + +Example: + $module_path = get_module_path('stdlib') + + +- *Type*: rvalue + +getparam +-------- +Takes a resource reference and name of the parameter and +returns value of resource's parameter. + +*Examples:* + + define example_resource($param) { + } + + example_resource { "example_resource_instance": + param => "param_value" + } + + getparam(Example_resource["example_resource_instance"], "param") + +Would return: param_value + + +- *Type*: rvalue + +getvar +------ +Lookup a variable in a remote namespace. + +For example: + + $foo = getvar('site::data::foo') + # Equivalent to $foo = $site::data::foo + +This is useful if the namespace itself is stored in a string: + + $datalocation = 'site::data' + $bar = getvar("${datalocation}::bar") + # Equivalent to $bar = $site::data::bar + + +- *Type*: rvalue + +grep +---- +This function searches through an array and returns any elements that match +the provided regular expression. + +*Examples:* + + grep(['aaa','bbb','ccc','aaaddd'], 'aaa') + +Would return: + + ['aaa','aaaddd'] + + +- *Type*: rvalue + +has_interface_with +------------------ +Returns boolean based on kind and value: +* macaddress +* netmask +* ipaddress +* network + +*Examples:* + + has_interface_with("macaddress", "x:x:x:x:x:x") + has_interface_with("ipaddress", "127.0.0.1") => true + +etc. + +If no "kind" is given, then the presence of the interface is checked: + + has_interface_with("lo") => true + + +- *Type*: rvalue + +has_ip_address +-------------- +Returns true if the client has the requested IP address on some interface. + +This function iterates through the 'interfaces' fact and checks the +'ipaddress_IFACE' facts, performing a simple string comparison. + + +- *Type*: rvalue + +has_ip_network +-------------- +Returns true if the client has an IP address within the requested network. + +This function iterates through the 'interfaces' fact and checks the +'network_IFACE' facts, performing a simple string comparision. + + +- *Type*: rvalue + +has_key +------- +Determine if a hash has a certain key value. + +Example: + + $my_hash = {'key_one' => 'value_one'} + if has_key($my_hash, 'key_two') { + notice('we will not reach here') + } + if has_key($my_hash, 'key_one') { + notice('this will be printed') + } + + + +- *Type*: rvalue + +hash +---- +This function converts an array into a hash. + +*Examples:* + + hash(['a',1,'b',2,'c',3]) + +Would return: {'a'=>1,'b'=>2,'c'=>3} + + +- *Type*: rvalue + +intersection +----------- +This function returns an array an intersection of two. + +*Examples:* + + intersection(["a","b","c"],["b","c","d"]) + +Would return: ["b","c"] + +is_array +-------- +Returns true if the variable passed to this function is an array. + +- *Type*: rvalue + +is_bool +-------- +Returns true if the variable passed to this function is a boolean. + +- *Type*: rvalue + +is_domain_name +-------------- +Returns true if the string passed to this function is a syntactically correct domain name. + +- *Type*: rvalue + +is_float +-------- +Returns true if the variable passed to this function is a float. + +- *Type*: rvalue + +is_function_available +--------------------- +This function accepts a string as an argument, determines whether the +Puppet runtime has access to a function by that name. It returns a +true if the function exists, false if not. + +- *Type*: rvalue + +is_hash +------- +Returns true if the variable passed to this function is a hash. + +- *Type*: rvalue + +is_integer +---------- +Returns true if the variable returned to this string is an integer. + +- *Type*: rvalue + +is_ip_address +------------- +Returns true if the string passed to this function is a valid IP address. + +- *Type*: rvalue + +is_mac_address +-------------- +Returns true if the string passed to this function is a valid mac address. + +- *Type*: rvalue + +is_numeric +---------- +Returns true if the variable passed to this function is a number. + +- *Type*: rvalue + +is_string +--------- +Returns true if the variable passed to this function is a string. + +- *Type*: rvalue + +join +---- +This function joins an array into a string using a separator. + +*Examples:* + + join(['a','b','c'], ",") + +Would result in: "a,b,c" + +- *Type*: rvalue + +join_keys_to_values +------------------- +This function joins each key of a hash to that key's corresponding value with a +separator. Keys and values are cast to strings. The return value is an array in +which each element is one joined key/value pair. + +*Examples:* + + join_keys_to_values({'a'=>1,'b'=>2}, " is ") + +Would result in: ["a is 1","b is 2"] + +- *Type*: rvalue + +keys +---- +Returns the keys of a hash as an array. + +- *Type*: rvalue + +loadyaml +-------- +Load a YAML file containing an array, string, or hash, and return the data +in the corresponding native data type. + +For example: + + $myhash = loadyaml('/etc/puppet/data/myhash.yaml') + + +- *Type*: rvalue + +lstrip +------ +Strips leading spaces to the left of a string. + +- *Type*: rvalue + +max +--- +Returns the highest value of all arguments. +Requires at least one argument. + +- *Type*: rvalue + +member +------ +This function determines if a variable is a member of an array. + +*Examples:* + + member(['a','b'], 'b') + +Would return: true + + member(['a','b'], 'c') + +Would return: false + +- *Type*: rvalue + +merge +----- +Merges two or more hashes together and returns the resulting hash. + +For example: + + $hash1 = {'one' => 1, 'two' => 2} + $hash2 = {'two' => 'dos', 'three' => 'tres'} + $merged_hash = merge($hash1, $hash2) + # The resulting hash is equivalent to: + # $merged_hash = {'one' => 1, 'two' => 'dos', 'three' => 'tres'} + +When there is a duplicate key, the key in the rightmost hash will "win." + +- *Type*: rvalue + +min +--- +Returns the lowest value of all arguments. +Requires at least one argument. + +- *Type*: rvalue + +num2bool +-------- +This function converts a number or a string representation of a number into a +true boolean. Zero or anything non-numeric becomes false. Numbers higher then 0 +become true. + +- *Type*: rvalue + +parsejson +--------- +This function accepts JSON as a string and converts into the correct Puppet +structure. + +- *Type*: rvalue + +parseyaml +--------- +This function accepts YAML as a string and converts it into the correct +Puppet structure. + +- *Type*: rvalue + +pick +---- +This function is similar to a coalesce function in SQL in that it will return +the first value in a list of values that is not undefined or an empty string +(two things in Puppet that will return a boolean false value). Typically, +this function is used to check for a value in the Puppet Dashboard/Enterprise +Console, and failover to a default value like the following: + + $real_jenkins_version = pick($::jenkins_version, '1.449') + +The value of $real_jenkins_version will first look for a top-scope variable +called 'jenkins_version' (note that parameters set in the Puppet Dashboard/ +Enterprise Console are brought into Puppet as top-scope variables), and, +failing that, will use a default value of 1.449. + +- *Type*: rvalue + +prefix +------ +This function applies a prefix to all elements in an array. + +*Examples:* + + prefix(['a','b','c'], 'p') + +Will return: ['pa','pb','pc'] + +- *Type*: rvalue + +range +----- +When given range in the form of (start, stop) it will extrapolate a range as +an array. + +*Examples:* + + range("0", "9") + +Will return: [0,1,2,3,4,5,6,7,8,9] + + range("00", "09") + +Will return: [0,1,2,3,4,5,6,7,8,9] - Zero padded strings are converted to +integers automatically + + range("a", "c") + +Will return: ["a","b","c"] + + range("host01", "host10") + +Will return: ["host01", "host02", ..., "host09", "host10"] + +- *Type*: rvalue + +reject +------ +This function searches through an array and rejects all elements that match +the provided regular expression. + +*Examples:* + + reject(['aaa','bbb','ccc','aaaddd'], 'aaa') + +Would return: + + ['bbb','ccc'] + + +- *Type*: rvalue + +reverse +------- +Reverses the order of a string or array. + +- *Type*: rvalue + +rstrip +------ +Strips leading spaces to the right of the string. + +- *Type*: rvalue + +shuffle +------- +Randomizes the order of a string or array elements. + +- *Type*: rvalue + +size +---- +Returns the number of elements in a string or array. + +- *Type*: rvalue + +sort +---- +Sorts strings and arrays lexically. + +- *Type*: rvalue + +squeeze +------- +Returns a new string where runs of the same character that occur in this set +are replaced by a single character. + +- *Type*: rvalue + +str2bool +-------- +This converts a string to a boolean. This attempts to convert strings that +contain things like: y, 1, t, true to 'true' and strings that contain things +like: 0, f, n, false, no to 'false'. + + +- *Type*: rvalue + +str2saltedsha512 +---------------- +This converts a string to a salted-SHA512 password hash (which is used for +OS X versions >= 10.7). Given any simple string, you will get a hex version +of a salted-SHA512 password hash that can be inserted into your Puppet +manifests as a valid password attribute. + + +- *Type*: rvalue + +strftime +-------- +This function returns formatted time. + +*Examples:* + +To return the time since epoch: + + strftime("%s") + +To return the date: + + strftime("%Y-%m-%d") + +*Format meaning:* + + %a - The abbreviated weekday name (``Sun'') + %A - The full weekday name (``Sunday'') + %b - The abbreviated month name (``Jan'') + %B - The full month name (``January'') + %c - The preferred local date and time representation + %C - Century (20 in 2009) + %d - Day of the month (01..31) + %D - Date (%m/%d/%y) + %e - Day of the month, blank-padded ( 1..31) + %F - Equivalent to %Y-%m-%d (the ISO 8601 date format) + %h - Equivalent to %b + %H - Hour of the day, 24-hour clock (00..23) + %I - Hour of the day, 12-hour clock (01..12) + %j - Day of the year (001..366) + %k - hour, 24-hour clock, blank-padded ( 0..23) + %l - hour, 12-hour clock, blank-padded ( 0..12) + %L - Millisecond of the second (000..999) + %m - Month of the year (01..12) + %M - Minute of the hour (00..59) + %n - Newline (\n) + %N - Fractional seconds digits, default is 9 digits (nanosecond) + %3N millisecond (3 digits) + %6N microsecond (6 digits) + %9N nanosecond (9 digits) + %p - Meridian indicator (``AM'' or ``PM'') + %P - Meridian indicator (``am'' or ``pm'') + %r - time, 12-hour (same as %I:%M:%S %p) + %R - time, 24-hour (%H:%M) + %s - Number of seconds since 1970-01-01 00:00:00 UTC. + %S - Second of the minute (00..60) + %t - Tab character ( ) + %T - time, 24-hour (%H:%M:%S) + %u - Day of the week as a decimal, Monday being 1. (1..7) + %U - Week number of the current year, + starting with the first Sunday as the first + day of the first week (00..53) + %v - VMS date (%e-%b-%Y) + %V - Week number of year according to ISO 8601 (01..53) + %W - Week number of the current year, + starting with the first Monday as the first + day of the first week (00..53) + %w - Day of the week (Sunday is 0, 0..6) + %x - Preferred representation for the date alone, no time + %X - Preferred representation for the time alone, no date + %y - Year without a century (00..99) + %Y - Year with century + %z - Time zone as hour offset from UTC (e.g. +0900) + %Z - Time zone name + %% - Literal ``%'' character + + +- *Type*: rvalue + +strip +----- +This function removes leading and trailing whitespace from a string or from +every string inside an array. + +*Examples:* + + strip(" aaa ") + +Would result in: "aaa" + + +- *Type*: rvalue + +suffix +------ +This function applies a suffix to all elements in an array. + +*Examples:* + + suffix(['a','b','c'], 'p') + +Will return: ['ap','bp','cp'] + + +- *Type*: rvalue + +swapcase +-------- +This function will swap the existing case of a string. + +*Examples:* + + swapcase("aBcD") + +Would result in: "AbCd" + + +- *Type*: rvalue + +time +---- +This function will return the current time since epoch as an integer. + +*Examples:* + + time() + +Will return something like: 1311972653 + + +- *Type*: rvalue + +to_bytes +-------- +Converts the argument into bytes, for example 4 kB becomes 4096. +Takes a single string value as an argument. + + +- *Type*: rvalue + +type +---- +Returns the type when passed a variable. Type can be one of: + +* string +* array +* hash +* float +* integer +* boolean + + +- *Type*: rvalue + +union +----- +This function returns a union of two arrays. + +*Examples:* + + union(["a","b","c"],["b","c","d"]) + +Would return: ["a","b","c","d"] + + +unique +------ +This function will remove duplicates from strings and arrays. + +*Examples:* + + unique("aabbcc") + +Will return: + + abc + +You can also use this with arrays: + + unique(["a","a","b","b","c","c"]) + +This returns: + + ["a","b","c"] + + +- *Type*: rvalue + +upcase +------ +Converts a string or an array of strings to uppercase. + +*Examples:* + + upcase("abcd") + +Will return: + + ABCD + + +- *Type*: rvalue + +uriescape +--------- +Urlencodes a string or array of strings. +Requires either a single string or an array as an input. + + +- *Type*: rvalue + +validate_absolute_path +---------------------- +Validate the string represents an absolute path in the filesystem. This function works +for windows and unix style paths. + +The following values will pass: + + $my_path = "C:/Program Files (x86)/Puppet Labs/Puppet" + validate_absolute_path($my_path) + $my_path2 = "/var/lib/puppet" + validate_absolute_path($my_path2) + + +The following values will fail, causing compilation to abort: + + validate_absolute_path(true) + validate_absolute_path([ 'var/lib/puppet', '/var/foo' ]) + validate_absolute_path([ '/var/lib/puppet', 'var/foo' ]) + $undefined = undef + validate_absolute_path($undefined) + + + +- *Type*: statement + +validate_array +-------------- +Validate that all passed values are array data structures. Abort catalog +compilation if any value fails this check. + +The following values will pass: + + $my_array = [ 'one', 'two' ] + validate_array($my_array) + +The following values will fail, causing compilation to abort: + + validate_array(true) + validate_array('some_string') + $undefined = undef + validate_array($undefined) + + + +- *Type*: statement + +validate_augeas +--------------- +Perform validation of a string using an Augeas lens +The first argument of this function should be a string to +test, and the second argument should be the name of the Augeas lens to use. +If Augeas fails to parse the string with the lens, the compilation will +abort with a parse error. + +A third argument can be specified, listing paths which should +not be found in the file. The `$file` variable points to the location +of the temporary file being tested in the Augeas tree. + +For example, if you want to make sure your passwd content never contains +a user `foo`, you could write: + + validate_augeas($passwdcontent, 'Passwd.lns', ['$file/foo']) + +Or if you wanted to ensure that no users used the '/bin/barsh' shell, +you could use: + + validate_augeas($passwdcontent, 'Passwd.lns', ['$file/*[shell="/bin/barsh"]'] + +If a fourth argument is specified, this will be the error message raised and +seen by the user. + +A helpful error message can be returned like this: + + validate_augeas($sudoerscontent, 'Sudoers.lns', [], 'Failed to validate sudoers content with Augeas') + + + +- *Type*: statement + +validate_bool +------------- +Validate that all passed values are either true or false. Abort catalog +compilation if any value fails this check. + +The following values will pass: + + $iamtrue = true + validate_bool(true) + validate_bool(true, true, false, $iamtrue) + +The following values will fail, causing compilation to abort: + + $some_array = [ true ] + validate_bool("false") + validate_bool("true") + validate_bool($some_array) + + + +- *Type*: statement + +validate_cmd +------------ +Perform validation of a string with an external command. +The first argument of this function should be a string to +test, and the second argument should be a path to a test command +taking a file as last argument. If the command, launched against +a tempfile containing the passed string, returns a non-null value, +compilation will abort with a parse error. + +If a third argument is specified, this will be the error message raised and +seen by the user. + +A helpful error message can be returned like this: + +Example: + + validate_cmd($sudoerscontent, '/usr/sbin/visudo -c -f', 'Visudo failed to validate sudoers content') + + + +- *Type*: statement + +validate_hash +------------- +Validate that all passed values are hash data structures. Abort catalog +compilation if any value fails this check. + +The following values will pass: + + $my_hash = { 'one' => 'two' } + validate_hash($my_hash) + +The following values will fail, causing compilation to abort: + + validate_hash(true) + validate_hash('some_string') + $undefined = undef + validate_hash($undefined) + + + +- *Type*: statement + +validate_re +----------- +Perform simple validation of a string against one or more regular +expressions. The first argument of this function should be a string to +test, and the second argument should be a stringified regular expression +(without the // delimiters) or an array of regular expressions. If none +of the regular expressions match the string passed in, compilation will +abort with a parse error. + +If a third argument is specified, this will be the error message raised and +seen by the user. + +The following strings will validate against the regular expressions: + + validate_re('one', '^one$') + validate_re('one', [ '^one', '^two' ]) + +The following strings will fail to validate, causing compilation to abort: + + validate_re('one', [ '^two', '^three' ]) + +A helpful error message can be returned like this: + + validate_re($::puppetversion, '^2.7', 'The $puppetversion fact value does not match 2.7') + + + +- *Type*: statement + +validate_slength +---------------- +Validate that the first argument is a string (or an array of strings), and +less/equal to than the length of the second argument. It fails if the first +argument is not a string or array of strings, and if arg 2 is not convertable +to a number. + +The following values will pass: + + validate_slength("discombobulate",17) + validate_slength(["discombobulate","moo"],17) + +The following values will not: + + validate_slength("discombobulate",1) + validate_slength(["discombobulate","thermometer"],5) + + + +- *Type*: statement + +validate_string +--------------- +Validate that all passed values are string data structures. Abort catalog +compilation if any value fails this check. + +The following values will pass: + + $my_string = "one two" + validate_string($my_string, 'three') + +The following values will fail, causing compilation to abort: + + validate_string(true) + validate_string([ 'some', 'array' ]) + $undefined = undef + validate_string($undefined) + + +- *Type*: statement + +values +------ +When given a hash this function will return the values of that hash. + +*Examples:* + + $hash = { + 'a' => 1, + 'b' => 2, + 'c' => 3, + } + values($hash) + +This example would return: + + [1,2,3] + + +- *Type*: rvalue + +values_at +--------- +Finds value inside an array based on location. + +The first argument is the array you want to analyze, and the second element can +be a combination of: + +* A single numeric index +* A range in the form of 'start-stop' (eg. 4-9) +* An array combining the above + +*Examples*: + + values_at(['a','b','c'], 2) + +Would return ['c']. + + values_at(['a','b','c'], ["0-1"]) + +Would return ['a','b']. + + values_at(['a','b','c','d','e'], [0, "2-3"]) + +Would return ['a','c','d']. + + +- *Type*: rvalue + +zip +--- +Takes one element from first array and merges corresponding elements from second array. This generates a sequence of n-element arrays, where n is one more than the count of arguments. + +*Example:* + + zip(['1','2','3'],['4','5','6']) + +Would result in: + + ["1", "4"], ["2", "5"], ["3", "6"] + + +- *Type*: rvalue + +*This page autogenerated on 2013-04-11 13:54:25 -0700* diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/README_DEVELOPER.markdown b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/README_DEVELOPER.markdown new file mode 100644 index 00000000000..04349ed79b4 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/README_DEVELOPER.markdown @@ -0,0 +1,35 @@ +Puppet Specific Facts +===================== + +Facter is meant to stand alone and apart from Puppet. However, Facter often +runs inside Puppet and all custom facts included in the stdlib module will +almost always be evaluated in the context of Puppet and Facter working +together. + +Still, we don't want to write custom facts that blow up in the users face if +Puppet is not loaded in memory. This is often the case if the user runs +`facter` without also supplying the `--puppet` flag. + +Ah! But Jeff, the custom fact won't be in the `$LOAD_PATH` unless the user +supplies `--facter`! You might say... + +Not (always) true I say! If the user happens to have a CWD of +`/stdlib/lib` then the facts will automatically be evaluated and +blow up. + +In any event, it's pretty easy to write a fact that has no value if Puppet is +not loaded. Simply do it like this: + + Facter.add(:node_vardir) do + setcode do + # This will be nil if Puppet is not available. + Facter::Util::PuppetSettings.with_puppet do + Puppet[:vardir] + end + end + end + +The `Facter::Util::PuppetSettings.with_puppet` method accepts a block and +yields to it only if the Puppet library is loaded. If the Puppet library is +not loaded, then the method silently returns `nil` which Facter interprets as +an undefined fact value. The net effect is that the fact won't be set. diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/README_SPECS.markdown b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/README_SPECS.markdown new file mode 100644 index 00000000000..917b6310dd2 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/README_SPECS.markdown @@ -0,0 +1,7 @@ +NOTE +==== + +This project's specs depend on puppet core, and thus they require the +`puppetlabs_spec_helper` project. For more information please see the README +in that project, which can be found here: [puppetlabs spec +helper](https://github.com/puppetlabs/puppetlabs_spec_helper) diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/RELEASE_PROCESS.markdown b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/RELEASE_PROCESS.markdown new file mode 100644 index 00000000000..0f9328ed0fa --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/RELEASE_PROCESS.markdown @@ -0,0 +1,24 @@ +# Contributing to this module # + + * Work in a topic branch + * Submit a github pull request + * Address any comments / feeback + * Merge into master using --no-ff + +# Releasing this module # + + * This module adheres to http://semver.org/ + * Look for API breaking changes using git diff vX.Y.Z..master + * If no API breaking changes, the minor version may be bumped. + * If there are API breaking changes, the major version must be bumped. + * If there are only small minor changes, the patch version may be bumped. + * Update the CHANGELOG + * Update the Modulefile + * Commit these changes with a message along the lines of "Update CHANGELOG and + Modulefile for release" + * Create an annotated tag with git tag -a vX.Y.Z -m 'version X.Y.Z' (NOTE the + leading v as per semver.org) + * Push the tag with git push origin --tags + * Build a new package with puppet-module or the rake build task if it exists + * Publish the new package to the forge + * Bonus points for an announcement to puppet-users. diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/Rakefile b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/Rakefile new file mode 100644 index 00000000000..4ed1327a3be --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/Rakefile @@ -0,0 +1,18 @@ +require 'rubygems' +require 'puppetlabs_spec_helper/rake_tasks' +require 'puppet-lint/tasks/puppet-lint' +PuppetLint.configuration.send('disable_80chars') +PuppetLint.configuration.ignore_paths = ["spec/**/*.pp", "pkg/**/*.pp"] + +desc "Validate manifests, templates, and ruby files in lib." +task :validate do + Dir['manifests/**/*.pp'].each do |manifest| + sh "puppet parser validate --noop #{manifest}" + end + Dir['lib/**/*.rb'].each do |lib_file| + sh "ruby -c #{lib_file}" + end + Dir['templates/**/*.erb'].each do |template| + sh "erb -P -x -T '-' #{template} | ruby -c" + end +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/lib/facter/facter_dot_d.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/lib/facter/facter_dot_d.rb new file mode 100644 index 00000000000..2c096b049d6 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/lib/facter/facter_dot_d.rb @@ -0,0 +1,202 @@ +# A Facter plugin that loads facts from /etc/facter/facts.d +# and /etc/puppetlabs/facter/facts.d. +# +# Facts can be in the form of JSON, YAML or Text files +# and any executable that returns key=value pairs. +# +# In the case of scripts you can also create a file that +# contains a cache TTL. For foo.sh store the ttl as just +# a number in foo.sh.ttl +# +# The cache is stored in /tmp/facts_cache.yaml as a mode +# 600 file and will have the end result of not calling your +# fact scripts more often than is needed + +class Facter::Util::DotD + require 'yaml' + + def initialize(dir="/etc/facts.d", cache_file="/tmp/facts_cache.yml") + @dir = dir + @cache_file = cache_file + @cache = nil + @types = {".txt" => :txt, ".json" => :json, ".yaml" => :yaml} + end + + def entries + Dir.entries(@dir).reject{|f| f =~ /^\.|\.ttl$/}.sort.map {|f| File.join(@dir, f) } + rescue + [] + end + + def fact_type(file) + extension = File.extname(file) + + type = @types[extension] || :unknown + + type = :script if type == :unknown && File.executable?(file) + + return type + end + + def txt_parser(file) + File.readlines(file).each do |line| + if line =~ /^([^=]+)=(.+)$/ + var = $1; val = $2 + + Facter.add(var) do + setcode { val } + end + end + end + rescue Exception => e + Facter.warn("Failed to handle #{file} as text facts: #{e.class}: #{e}") + end + + def json_parser(file) + begin + require 'json' + rescue LoadError + retry if require 'rubygems' + raise + end + + JSON.load(File.read(file)).each_pair do |f, v| + Facter.add(f) do + setcode { v } + end + end + rescue Exception => e + Facter.warn("Failed to handle #{file} as json facts: #{e.class}: #{e}") + end + + def yaml_parser(file) + require 'yaml' + + YAML.load_file(file).each_pair do |f, v| + Facter.add(f) do + setcode { v } + end + end + rescue Exception => e + Facter.warn("Failed to handle #{file} as yaml facts: #{e.class}: #{e}") + end + + def script_parser(file) + result = cache_lookup(file) + ttl = cache_time(file) + + unless result + result = Facter::Util::Resolution.exec(file) + + if ttl > 0 + Facter.debug("Updating cache for #{file}") + cache_store(file, result) + cache_save! + end + else + Facter.debug("Using cached data for #{file}") + end + + result.split("\n").each do |line| + if line =~ /^(.+)=(.+)$/ + var = $1; val = $2 + + Facter.add(var) do + setcode { val } + end + end + end + rescue Exception => e + Facter.warn("Failed to handle #{file} as script facts: #{e.class}: #{e}") + Facter.debug(e.backtrace.join("\n\t")) + end + + def cache_save! + cache = load_cache + File.open(@cache_file, "w", 0600) {|f| f.write(YAML.dump(cache)) } + rescue + end + + def cache_store(file, data) + load_cache + + @cache[file] = {:data => data, :stored => Time.now.to_i} + rescue + end + + def cache_lookup(file) + cache = load_cache + + return nil if cache.empty? + + ttl = cache_time(file) + + if cache[file] + now = Time.now.to_i + + return cache[file][:data] if ttl == -1 + return cache[file][:data] if (now - cache[file][:stored]) <= ttl + return nil + else + return nil + end + rescue + return nil + end + + def cache_time(file) + meta = file + ".ttl" + + return File.read(meta).chomp.to_i + rescue + return 0 + end + + def load_cache + unless @cache + if File.exist?(@cache_file) + @cache = YAML.load_file(@cache_file) + else + @cache = {} + end + end + + return @cache + rescue + @cache = {} + return @cache + end + + def create + entries.each do |fact| + type = fact_type(fact) + parser = "#{type}_parser" + + if respond_to?("#{type}_parser") + Facter.debug("Parsing #{fact} using #{parser}") + + send(parser, fact) + end + end + end +end + + +mdata = Facter.version.match(/(\d+)\.(\d+)\.(\d+)/) +if mdata + (major, minor, patch) = mdata.captures.map { |v| v.to_i } + if major < 2 + # Facter 1.7 introduced external facts support directly + unless major == 1 and minor > 6 + Facter::Util::DotD.new("/etc/facter/facts.d").create + Facter::Util::DotD.new("/etc/puppetlabs/facter/facts.d").create + + # Windows has a different configuration directory that defaults to a vendor + # specific sub directory of the %COMMON_APPDATA% directory. + if Dir.const_defined? 'COMMON_APPDATA' then + windows_facts_dot_d = File.join(Dir::COMMON_APPDATA, 'PuppetLabs', 'facter', 'facts.d') + Facter::Util::DotD.new(windows_facts_dot_d).create + end + end + end +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/lib/facter/pe_version.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/lib/facter/pe_version.rb new file mode 100644 index 00000000000..0cc0f64e950 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/lib/facter/pe_version.rb @@ -0,0 +1,53 @@ +# Fact: is_pe, pe_version, pe_major_version, pe_minor_version, pe_patch_version +# +# Purpose: Return various facts about the PE state of the system +# +# Resolution: Uses a regex match against puppetversion to determine whether the +# machine has Puppet Enterprise installed, and what version (overall, major, +# minor, patch) is installed. +# +# Caveats: +# +Facter.add("pe_version") do + setcode do + pe_ver = Facter.value("puppetversion").match(/Puppet Enterprise (\d+\.\d+\.\d+)/) + pe_ver[1] if pe_ver + end +end + +Facter.add("is_pe") do + setcode do + if Facter.value(:pe_version).to_s.empty? then + false + else + true + end + end +end + +Facter.add("pe_major_version") do + confine :is_pe => true + setcode do + if pe_version = Facter.value(:pe_version) + pe_version.to_s.split('.')[0] + end + end +end + +Facter.add("pe_minor_version") do + confine :is_pe => true + setcode do + if pe_version = Facter.value(:pe_version) + pe_version.to_s.split('.')[1] + end + end +end + +Facter.add("pe_patch_version") do + confine :is_pe => true + setcode do + if pe_version = Facter.value(:pe_version) + pe_version.to_s.split('.')[2] + end + end +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/lib/facter/puppet_vardir.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/lib/facter/puppet_vardir.rb new file mode 100644 index 00000000000..0e6af40e49a --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/lib/facter/puppet_vardir.rb @@ -0,0 +1,26 @@ +# This facter fact returns the value of the Puppet vardir setting for the node +# running puppet or puppet agent. The intent is to enable Puppet modules to +# automatically have insight into a place where they can place variable data, +# regardless of the node's platform. +# +# The value should be directly usable in a File resource path attribute. + + +begin + require 'facter/util/puppet_settings' +rescue LoadError => e + # puppet apply does not add module lib directories to the $LOAD_PATH (See + # #4248). It should (in the future) but for the time being we need to be + # defensive which is what this rescue block is doing. + rb_file = File.join(File.dirname(__FILE__), 'util', 'puppet_settings.rb') + load rb_file if File.exists?(rb_file) or raise e +end + +Facter.add(:puppet_vardir) do + setcode do + # This will be nil if Puppet is not available. + Facter::Util::PuppetSettings.with_puppet do + Puppet[:vardir] + end + end +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/lib/facter/root_home.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/lib/facter/root_home.rb new file mode 100644 index 00000000000..b4f87ff2ab2 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/lib/facter/root_home.rb @@ -0,0 +1,32 @@ +# A facter fact to determine the root home directory. +# This varies on PE supported platforms and may be +# reconfigured by the end user. + +module Facter::Util::RootHome + class << self + def get_root_home + root_ent = Facter::Util::Resolution.exec("getent passwd root") + # The home directory is the sixth element in the passwd entry + # If the platform doesn't have getent, root_ent will be nil and we should + # return it straight away. + root_ent && root_ent.split(":")[5] + end + end +end + +Facter.add(:root_home) do + setcode { Facter::Util::RootHome.get_root_home } +end + +Facter.add(:root_home) do + confine :kernel => :darwin + setcode do + str = Facter::Util::Resolution.exec("dscacheutil -q user -a name root") + hash = {} + str.split("\n").each do |pair| + key,value = pair.split(/:/) + hash[key] = value + end + hash['dir'].strip + end +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/lib/facter/util/puppet_settings.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/lib/facter/util/puppet_settings.rb new file mode 100644 index 00000000000..1ad945218ae --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/lib/facter/util/puppet_settings.rb @@ -0,0 +1,21 @@ +module Facter + module Util + module PuppetSettings + # This method is intended to provide a convenient way to evaluate a + # Facter code block only if Puppet is loaded. This is to account for the + # situation where the fact happens to be in the load path, but Puppet is + # not loaded for whatever reason. Perhaps the user is simply running + # facter without the --puppet flag and they happen to be working in a lib + # directory of a module. + def self.with_puppet + begin + Module.const_get("Puppet") + rescue NameError + nil + else + yield + end + end + end + end +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/abs.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/abs.rb new file mode 100644 index 00000000000..11d2d7feade --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/abs.rb @@ -0,0 +1,36 @@ +# +# abs.rb +# + +module Puppet::Parser::Functions + newfunction(:abs, :type => :rvalue, :doc => <<-EOS + Returns the absolute value of a number, for example -34.56 becomes + 34.56. Takes a single integer and float value as an argument. + EOS + ) do |arguments| + + raise(Puppet::ParseError, "abs(): Wrong number of arguments " + + "given (#{arguments.size} for 1)") if arguments.size < 1 + + value = arguments[0] + + # Numbers in Puppet are often string-encoded which is troublesome ... + if value.is_a?(String) + if value.match(/^-?(?:\d+)(?:\.\d+){1}$/) + value = value.to_f + elsif value.match(/^-?\d+$/) + value = value.to_i + else + raise(Puppet::ParseError, 'abs(): Requires float or ' + + 'integer to work with') + end + end + + # We have numeric value to handle ... + result = value.abs + + return result + end +end + +# vim: set ts=2 sw=2 et : diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/any2array.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/any2array.rb new file mode 100644 index 00000000000..e71407e89e7 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/any2array.rb @@ -0,0 +1,33 @@ +# +# any2array.rb +# + +module Puppet::Parser::Functions + newfunction(:any2array, :type => :rvalue, :doc => <<-EOS +This converts any object to an array containing that object. Empty argument +lists are converted to an empty array. Arrays are left untouched. Hashes are +converted to arrays of alternating keys and values. + EOS + ) do |arguments| + + if arguments.empty? + return [] + end + + if arguments.length == 1 + if arguments[0].kind_of?(Array) + return arguments[0] + elsif arguments[0].kind_of?(Hash) + result = [] + arguments[0].each do |key, value| + result << key << value + end + return result + end + end + + return arguments + end +end + +# vim: set ts=2 sw=2 et : diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/base64.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/base64.rb new file mode 100644 index 00000000000..617ba31b6e6 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/base64.rb @@ -0,0 +1,37 @@ +module Puppet::Parser::Functions + + newfunction(:base64, :type => :rvalue, :doc => <<-'ENDHEREDOC') do |args| + + Base64 encode or decode a string based on the command and the string submitted + + Usage: + + $encodestring = base64('encode','thestring') + $decodestring = base64('decode','dGhlc3RyaW5n') + + ENDHEREDOC + + require 'base64' + + raise Puppet::ParseError, ("base64(): Wrong number of arguments (#{args.length}; must be = 2)") unless args.length == 2 + + actions = ['encode','decode'] + + unless actions.include?(args[0]) + raise Puppet::ParseError, ("base64(): the first argument must be one of 'encode' or 'decode'") + end + + unless args[1].is_a?(String) + raise Puppet::ParseError, ("base64(): the second argument must be a string to base64") + end + + case args[0] + when 'encode' + result = Base64.encode64(args[1]) + when 'decode' + result = Base64.decode64(args[1]) + end + + return result + end +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/bool2num.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/bool2num.rb new file mode 100644 index 00000000000..9a07a8a1192 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/bool2num.rb @@ -0,0 +1,49 @@ +# +# bool2num.rb +# + +module Puppet::Parser::Functions + newfunction(:bool2num, :type => :rvalue, :doc => <<-EOS + Converts a boolean to a number. Converts the values: + false, f, 0, n, and no to 0 + true, t, 1, y, and yes to 1 + Requires a single boolean or string as an input. + EOS + ) do |arguments| + + raise(Puppet::ParseError, "bool2num(): Wrong number of arguments " + + "given (#{arguments.size} for 1)") if arguments.size < 1 + + value = arguments[0] + klass = value.class + + # We can have either true or false, or string which resembles boolean ... + unless [FalseClass, TrueClass, String].include?(klass) + raise(Puppet::ParseError, 'bool2num(): Requires either ' + + 'boolean or string to work with') + end + + if value.is_a?(String) + # We consider all the yes, no, y, n and so on too ... + value = case value + # + # This is how undef looks like in Puppet ... + # We yield 0 (or false if you wish) in this case. + # + when /^$/, '' then false # Empty string will be false ... + when /^(1|t|y|true|yes)$/ then true + when /^(0|f|n|false|no)$/ then false + when /^(undef|undefined)$/ then false # This is not likely to happen ... + else + raise(Puppet::ParseError, 'bool2num(): Unknown type of boolean given') + end + end + + # We have real boolean values as well ... + result = value ? 1 : 0 + + return result + end +end + +# vim: set ts=2 sw=2 et : diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/capitalize.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/capitalize.rb new file mode 100644 index 00000000000..640d00b82fa --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/capitalize.rb @@ -0,0 +1,34 @@ +# +# capitalize.rb +# + +module Puppet::Parser::Functions + newfunction(:capitalize, :type => :rvalue, :doc => <<-EOS + Capitalizes the first letter of a string or array of strings. + Requires either a single string or an array as an input. + EOS + ) do |arguments| + + raise(Puppet::ParseError, "capitalize(): Wrong number of arguments " + + "given (#{arguments.size} for 1)") if arguments.size < 1 + + value = arguments[0] + klass = value.class + + unless [Array, String].include?(klass) + raise(Puppet::ParseError, 'capitalize(): Requires either ' + + 'array or string to work with') + end + + if value.is_a?(Array) + # Numbers in Puppet are often string-encoded which is troublesome ... + result = value.collect { |i| i.is_a?(String) ? i.capitalize : i } + else + result = value.capitalize + end + + return result + end +end + +# vim: set ts=2 sw=2 et : diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/chomp.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/chomp.rb new file mode 100644 index 00000000000..4564a000abe --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/chomp.rb @@ -0,0 +1,35 @@ +# +# chomp.rb +# + +module Puppet::Parser::Functions + newfunction(:chomp, :type => :rvalue, :doc => <<-'EOS' + Removes the record separator from the end of a string or an array of + strings, for example `hello\n` becomes `hello`. + Requires a single string or array as an input. + EOS + ) do |arguments| + + raise(Puppet::ParseError, "chomp(): Wrong number of arguments " + + "given (#{arguments.size} for 1)") if arguments.size < 1 + + value = arguments[0] + klass = value.class + + unless [Array, String].include?(klass) + raise(Puppet::ParseError, 'chomp(): Requires either ' + + 'array or string to work with') + end + + if value.is_a?(Array) + # Numbers in Puppet are often string-encoded which is troublesome ... + result = value.collect { |i| i.is_a?(String) ? i.chomp : i } + else + result = value.chomp + end + + return result + end +end + +# vim: set ts=2 sw=2 et : diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/chop.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/chop.rb new file mode 100644 index 00000000000..f242af39ce8 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/chop.rb @@ -0,0 +1,37 @@ +# +# chop.rb +# + +module Puppet::Parser::Functions + newfunction(:chop, :type => :rvalue, :doc => <<-'EOS' + Returns a new string with the last character removed. If the string ends + with `\r\n`, both characters are removed. Applying chop to an empty + string returns an empty string. If you wish to merely remove record + separators then you should use the `chomp` function. + Requires a string or array of strings as input. + EOS + ) do |arguments| + + raise(Puppet::ParseError, "chop(): Wrong number of arguments " + + "given (#{arguments.size} for 1)") if arguments.size < 1 + + value = arguments[0] + klass = value.class + + unless [Array, String].include?(klass) + raise(Puppet::ParseError, 'chop(): Requires either an ' + + 'array or string to work with') + end + + if value.is_a?(Array) + # Numbers in Puppet are often string-encoded which is troublesome ... + result = value.collect { |i| i.is_a?(String) ? i.chop : i } + else + result = value.chop + end + + return result + end +end + +# vim: set ts=2 sw=2 et : diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/concat.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/concat.rb new file mode 100644 index 00000000000..6c8638222ef --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/concat.rb @@ -0,0 +1,41 @@ +# +# concat.rb +# + +module Puppet::Parser::Functions + newfunction(:concat, :type => :rvalue, :doc => <<-EOS +Appends the contents of array 2 onto array 1. + +*Example:* + + concat(['1','2','3'],['4','5','6']) + +Would result in: + + ['1','2','3','4','5','6'] + EOS + ) do |arguments| + + # Check that 2 arguments have been given ... + raise(Puppet::ParseError, "concat(): Wrong number of arguments " + + "given (#{arguments.size} for 2)") if arguments.size != 2 + + a = arguments[0] + b = arguments[1] + + # Check that the first parameter is an array + unless a.is_a?(Array) + raise(Puppet::ParseError, 'concat(): Requires array to work with') + end + + if b.is_a?(Array) + result = a.concat(b) + else + result = a << b + end + + return result + end +end + +# vim: set ts=2 sw=2 et : diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/count.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/count.rb new file mode 100644 index 00000000000..52de1b8a5a4 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/count.rb @@ -0,0 +1,22 @@ +module Puppet::Parser::Functions + newfunction(:count, :type => :rvalue, :arity => -2, :doc => <<-EOS +Takes an array as first argument and an optional second argument. +Count the number of elements in array that matches second argument. +If called with only an array it counts the number of elements that are not nil/undef. + EOS + ) do |args| + + if (args.size > 2) then + raise(ArgumentError, "count(): Wrong number of arguments "+ + "given #{args.size} for 1 or 2.") + end + + collection, item = args + + if item then + collection.count item + else + collection.count { |obj| obj != nil && obj != :undef && obj != '' } + end + end +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/deep_merge.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/deep_merge.rb new file mode 100644 index 00000000000..6df32e9c567 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/deep_merge.rb @@ -0,0 +1,44 @@ +module Puppet::Parser::Functions + newfunction(:deep_merge, :type => :rvalue, :doc => <<-'ENDHEREDOC') do |args| + Recursively merges two or more hashes together and returns the resulting hash. + + For example: + + $hash1 = {'one' => 1, 'two' => 2, 'three' => { 'four' => 4 } } + $hash2 = {'two' => 'dos', 'three' => { 'five' => 5 } } + $merged_hash = deep_merge($hash1, $hash2) + # The resulting hash is equivalent to: + # $merged_hash = { 'one' => 1, 'two' => 'dos', 'three' => { 'four' => 4, 'five' => 5 } } + + When there is a duplicate key that is a hash, they are recursively merged. + When there is a duplicate key that is not a hash, the key in the rightmost hash will "win." + + ENDHEREDOC + + if args.length < 2 + raise Puppet::ParseError, ("deep_merge(): wrong number of arguments (#{args.length}; must be at least 2)") + end + + deep_merge = Proc.new do |hash1,hash2| + hash1.merge(hash2) do |key,old_value,new_value| + if old_value.is_a?(Hash) && new_value.is_a?(Hash) + deep_merge.call(old_value, new_value) + else + new_value + end + end + end + + result = Hash.new + args.each do |arg| + next if arg.is_a? String and arg.empty? # empty string is synonym for puppet's undef + # If the argument was not a hash, skip it. + unless arg.is_a?(Hash) + raise Puppet::ParseError, "deep_merge: unexpected argument type #{arg.class}, only expects hash arguments" + end + + result = deep_merge.call(result, arg) + end + return( result ) + end +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/defined_with_params.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/defined_with_params.rb new file mode 100644 index 00000000000..d7df306c793 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/defined_with_params.rb @@ -0,0 +1,35 @@ +# Test whether a given class or definition is defined +require 'puppet/parser/functions' + +Puppet::Parser::Functions.newfunction(:defined_with_params, + :type => :rvalue, + :doc => <<-'ENDOFDOC' +Takes a resource reference and an optional hash of attributes. + +Returns true if a resource with the specified attributes has already been added +to the catalog, and false otherwise. + + user { 'dan': + ensure => present, + } + + if ! defined_with_params(User[dan], {'ensure' => 'present' }) { + user { 'dan': ensure => present, } + } +ENDOFDOC +) do |vals| + reference, params = vals + raise(ArgumentError, 'Must specify a reference') unless reference + if (! params) || params == '' + params = {} + end + ret = false + if resource = findresource(reference.to_s) + matches = params.collect do |key, value| + resource[key] == value + end + ret = params.empty? || !matches.include?(false) + end + Puppet.debug("Resource #{reference} was not determined to be defined") + ret +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/delete.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/delete.rb new file mode 100644 index 00000000000..d03a29355e2 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/delete.rb @@ -0,0 +1,46 @@ +# +# delete.rb +# + +# TODO(Krzysztof Wilczynski): We need to add support for regular expression ... + +module Puppet::Parser::Functions + newfunction(:delete, :type => :rvalue, :doc => <<-EOS +Deletes all instances of a given element from an array, substring from a +string, or key from a hash. + +*Examples:* + + delete(['a','b','c','b'], 'b') + Would return: ['a','c'] + + delete({'a'=>1,'b'=>2,'c'=>3}, 'b') + Would return: {'a'=>1,'c'=>3} + + delete('abracadabra', 'bra') + Would return: 'acada' + EOS + ) do |arguments| + + if (arguments.size != 2) then + raise(Puppet::ParseError, "delete(): Wrong number of arguments "+ + "given #{arguments.size} for 2.") + end + + collection = arguments[0].dup + item = arguments[1] + + case collection + when Array, Hash + collection.delete item + when String + collection.gsub! item, '' + else + raise(TypeError, "delete(): First argument must be an Array, " + + "String, or Hash. Given an argument of class #{collection.class}.") + end + collection + end +end + +# vim: set ts=2 sw=2 et : diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/delete_at.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/delete_at.rb new file mode 100644 index 00000000000..3eb4b53756a --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/delete_at.rb @@ -0,0 +1,49 @@ +# +# delete_at.rb +# + +module Puppet::Parser::Functions + newfunction(:delete_at, :type => :rvalue, :doc => <<-EOS +Deletes a determined indexed value from an array. + +*Examples:* + + delete_at(['a','b','c'], 1) + +Would return: ['a','c'] + EOS + ) do |arguments| + + raise(Puppet::ParseError, "delete_at(): Wrong number of arguments " + + "given (#{arguments.size} for 2)") if arguments.size < 2 + + array = arguments[0] + + unless array.is_a?(Array) + raise(Puppet::ParseError, 'delete_at(): Requires array to work with') + end + + index = arguments[1] + + if index.is_a?(String) and not index.match(/^\d+$/) + raise(Puppet::ParseError, 'delete_at(): You must provide ' + + 'non-negative numeric index') + end + + result = array.clone + + # Numbers in Puppet are often string-encoded which is troublesome ... + index = index.to_i + + if index > result.size - 1 # First element is at index 0 is it not? + raise(Puppet::ParseError, 'delete_at(): Given index ' + + 'exceeds size of array given') + end + + result.delete_at(index) # We ignore the element that got deleted ... + + return result + end +end + +# vim: set ts=2 sw=2 et : diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/delete_undef_values.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/delete_undef_values.rb new file mode 100644 index 00000000000..f94d4da8d42 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/delete_undef_values.rb @@ -0,0 +1,34 @@ +module Puppet::Parser::Functions + newfunction(:delete_undef_values, :type => :rvalue, :doc => <<-EOS +Returns a copy of input hash or array with all undefs deleted. + +*Examples:* + + $hash = delete_undef_values({a=>'A', b=>'', c=>undef, d => false}) + +Would return: {a => 'A', b => '', d => false} + + $array = delete_undef_values(['A','',undef,false]) + +Would return: ['A','',false] + + EOS + ) do |args| + + raise(Puppet::ParseError, + "delete_undef_values(): Wrong number of arguments given " + + "(#{args.size})") if args.size < 1 + + unless args[0].is_a? Array or args[0].is_a? Hash + raise(Puppet::ParseError, + "delete_undef_values(): expected an array or hash, got #{args[0]} type #{args[0].class} ") + end + result = args[0].dup + if result.is_a?(Hash) + result.delete_if {|key, val| val.equal? :undef} + elsif result.is_a?(Array) + result.delete :undef + end + result + end +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/delete_values.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/delete_values.rb new file mode 100644 index 00000000000..f6c8c0e6b6f --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/delete_values.rb @@ -0,0 +1,26 @@ +module Puppet::Parser::Functions + newfunction(:delete_values, :type => :rvalue, :doc => <<-EOS +Deletes all instances of a given value from a hash. + +*Examples:* + + delete_values({'a'=>'A','b'=>'B','c'=>'C','B'=>'D'}, 'B') + +Would return: {'a'=>'A','c'=>'C','B'=>'D'} + + EOS + ) do |arguments| + + raise(Puppet::ParseError, + "delete_values(): Wrong number of arguments given " + + "(#{arguments.size} of 2)") if arguments.size != 2 + + hash, item = arguments + + if not hash.is_a?(Hash) + raise(TypeError, "delete_values(): First argument must be a Hash. " + \ + "Given an argument of class #{hash.class}.") + end + hash.dup.delete_if { |key, val| item == val } + end +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/difference.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/difference.rb new file mode 100644 index 00000000000..cd258f75165 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/difference.rb @@ -0,0 +1,36 @@ +# +# difference.rb +# + +module Puppet::Parser::Functions + newfunction(:difference, :type => :rvalue, :doc => <<-EOS +This function returns the difference between two arrays. +The returned array is a copy of the original array, removing any items that +also appear in the second array. + +*Examples:* + + difference(["a","b","c"],["b","c","d"]) + +Would return: ["a"] + EOS + ) do |arguments| + + # Two arguments are required + raise(Puppet::ParseError, "difference(): Wrong number of arguments " + + "given (#{arguments.size} for 2)") if arguments.size != 2 + + first = arguments[0] + second = arguments[1] + + unless first.is_a?(Array) && second.is_a?(Array) + raise(Puppet::ParseError, 'difference(): Requires 2 arrays') + end + + result = first - second + + return result + end +end + +# vim: set ts=2 sw=2 et : diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/dirname.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/dirname.rb new file mode 100644 index 00000000000..ea8cc1e081e --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/dirname.rb @@ -0,0 +1,15 @@ +module Puppet::Parser::Functions + newfunction(:dirname, :type => :rvalue, :doc => <<-EOS + Returns the dirname of a path. + EOS + ) do |arguments| + + raise(Puppet::ParseError, "dirname(): Wrong number of arguments " + + "given (#{arguments.size} for 1)") if arguments.size < 1 + + path = arguments[0] + return File.dirname(path) + end +end + +# vim: set ts=2 sw=2 et : diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/downcase.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/downcase.rb new file mode 100644 index 00000000000..4066d210f77 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/downcase.rb @@ -0,0 +1,33 @@ +# +# downcase.rb +# + +module Puppet::Parser::Functions + newfunction(:downcase, :type => :rvalue, :doc => <<-EOS +Converts the case of a string or all strings in an array to lower case. + EOS + ) do |arguments| + + raise(Puppet::ParseError, "downcase(): Wrong number of arguments " + + "given (#{arguments.size} for 1)") if arguments.size < 1 + + value = arguments[0] + klass = value.class + + unless [Array, String].include?(klass) + raise(Puppet::ParseError, 'downcase(): Requires either ' + + 'array or string to work with') + end + + if value.is_a?(Array) + # Numbers in Puppet are often string-encoded which is troublesome ... + result = value.collect { |i| i.is_a?(String) ? i.downcase : i } + else + result = value.downcase + end + + return result + end +end + +# vim: set ts=2 sw=2 et : diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/empty.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/empty.rb new file mode 100644 index 00000000000..80ebb86b891 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/empty.rb @@ -0,0 +1,28 @@ +# +# empty.rb +# + +module Puppet::Parser::Functions + newfunction(:empty, :type => :rvalue, :doc => <<-EOS +Returns true if the variable is empty. + EOS + ) do |arguments| + + raise(Puppet::ParseError, "empty(): Wrong number of arguments " + + "given (#{arguments.size} for 1)") if arguments.size < 1 + + value = arguments[0] + klass = value.class + + unless [Array, Hash, String].include?(klass) + raise(Puppet::ParseError, 'empty(): Requires either ' + + 'array, hash or string to work with') + end + + result = value.empty? + + return result + end +end + +# vim: set ts=2 sw=2 et : diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/ensure_packages.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/ensure_packages.rb new file mode 100644 index 00000000000..f1da4aaaafe --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/ensure_packages.rb @@ -0,0 +1,35 @@ +# +# ensure_packages.rb +# + +module Puppet::Parser::Functions + newfunction(:ensure_packages, :type => :statement, :doc => <<-EOS +Takes a list of packages and only installs them if they don't already exist. +It optionally takes a hash as a second parameter that will be passed as the +third argument to the ensure_resource() function. + EOS + ) do |arguments| + + if arguments.size > 2 or arguments.size == 0 + raise(Puppet::ParseError, "ensure_packages(): Wrong number of arguments " + + "given (#{arguments.size} for 1 or 2)") + elsif arguments.size == 2 and !arguments[1].is_a?(Hash) + raise(Puppet::ParseError, 'ensure_packages(): Requires second argument to be a Hash') + end + + packages = Array(arguments[0]) + + if arguments[1] + defaults = { 'ensure' => 'present' }.merge(arguments[1]) + else + defaults = { 'ensure' => 'present' } + end + + Puppet::Parser::Functions.function(:ensure_resource) + packages.each { |package_name| + function_ensure_resource(['package', package_name, defaults ]) + } + end +end + +# vim: set ts=2 sw=2 et : diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/ensure_resource.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/ensure_resource.rb new file mode 100644 index 00000000000..05e5593fc17 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/ensure_resource.rb @@ -0,0 +1,45 @@ +# Test whether a given class or definition is defined +require 'puppet/parser/functions' + +Puppet::Parser::Functions.newfunction(:ensure_resource, + :type => :statement, + :doc => <<-'ENDOFDOC' +Takes a resource type, title, and a list of attributes that describe a +resource. + + user { 'dan': + ensure => present, + } + +This example only creates the resource if it does not already exist: + + ensure_resource('user', 'dan', {'ensure' => 'present' }) + +If the resource already exists but does not match the specified parameters, +this function will attempt to recreate the resource leading to a duplicate +resource definition error. + +An array of resources can also be passed in and each will be created with +the type and parameters specified if it doesn't already exist. + + ensure_resource('user', ['dan','alex'], {'ensure' => 'present'}) + +ENDOFDOC +) do |vals| + type, title, params = vals + raise(ArgumentError, 'Must specify a type') unless type + raise(ArgumentError, 'Must specify a title') unless title + params ||= {} + + items = [title].flatten + + items.each do |item| + Puppet::Parser::Functions.function(:defined_with_params) + if function_defined_with_params(["#{type}[#{item}]", params]) + Puppet.debug("Resource #{type}[#{item}] not created because it already exists") + else + Puppet::Parser::Functions.function(:create_resources) + function_create_resources([type.capitalize, { item => params }]) + end + end +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/flatten.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/flatten.rb new file mode 100644 index 00000000000..a1ed1832901 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/flatten.rb @@ -0,0 +1,33 @@ +# +# flatten.rb +# + +module Puppet::Parser::Functions + newfunction(:flatten, :type => :rvalue, :doc => <<-EOS +This function flattens any deeply nested arrays and returns a single flat array +as a result. + +*Examples:* + + flatten(['a', ['b', ['c']]]) + +Would return: ['a','b','c'] + EOS + ) do |arguments| + + raise(Puppet::ParseError, "flatten(): Wrong number of arguments " + + "given (#{arguments.size} for 1)") if arguments.size != 1 + + array = arguments[0] + + unless array.is_a?(Array) + raise(Puppet::ParseError, 'flatten(): Requires array to work with') + end + + result = array.flatten + + return result + end +end + +# vim: set ts=2 sw=2 et : diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/floor.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/floor.rb new file mode 100644 index 00000000000..9a6f014d7c1 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/floor.rb @@ -0,0 +1,25 @@ +module Puppet::Parser::Functions + newfunction(:floor, :type => :rvalue, :doc => <<-EOS + Returns the largest integer less or equal to the argument. + Takes a single numeric value as an argument. + EOS + ) do |arguments| + + raise(Puppet::ParseError, "floor(): Wrong number of arguments " + + "given (#{arguments.size} for 1)") if arguments.size != 1 + + begin + arg = Float(arguments[0]) + rescue TypeError, ArgumentError => e + raise(Puppet::ParseError, "floor(): Wrong argument type " + + "given (#{arguments[0]} for Numeric)") + end + + raise(Puppet::ParseError, "floor(): Wrong argument type " + + "given (#{arg.class} for Numeric)") if arg.is_a?(Numeric) == false + + arg.floor + end +end + +# vim: set ts=2 sw=2 et : diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/fqdn_rotate.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/fqdn_rotate.rb new file mode 100644 index 00000000000..6558206055f --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/fqdn_rotate.rb @@ -0,0 +1,46 @@ +# +# fqdn_rotate.rb +# + +module Puppet::Parser::Functions + newfunction(:fqdn_rotate, :type => :rvalue, :doc => <<-EOS +Rotates an array a random number of times based on a nodes fqdn. + EOS + ) do |arguments| + + raise(Puppet::ParseError, "fqdn_rotate(): Wrong number of arguments " + + "given (#{arguments.size} for 1)") if arguments.size < 1 + + value = arguments[0] + klass = value.class + require 'digest/md5' + + unless [Array, String].include?(klass) + raise(Puppet::ParseError, 'fqdn_rotate(): Requires either ' + + 'array or string to work with') + end + + result = value.clone + + string = value.is_a?(String) ? true : false + + # Check whether it makes sense to rotate ... + return result if result.size <= 1 + + # We turn any string value into an array to be able to rotate ... + result = string ? result.split('') : result + + elements = result.size + + srand(Digest::MD5.hexdigest([lookupvar('::fqdn'),arguments].join(':')).hex) + rand(elements).times { + result.push result.shift + } + + result = string ? result.join : result + + return result + end +end + +# vim: set ts=2 sw=2 et : diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/get_module_path.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/get_module_path.rb new file mode 100644 index 00000000000..1421b91f52f --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/get_module_path.rb @@ -0,0 +1,17 @@ +module Puppet::Parser::Functions + newfunction(:get_module_path, :type =>:rvalue, :doc => <<-EOT + Returns the absolute path of the specified module for the current + environment. + + Example: + $module_path = get_module_path('stdlib') + EOT + ) do |args| + raise(Puppet::ParseError, "get_module_path(): Wrong number of arguments, expects one") unless args.size == 1 + if module_path = Puppet::Module.find(args[0], compiler.environment.to_s) + module_path.path + else + raise(Puppet::ParseError, "Could not find module #{args[0]} in environment #{compiler.environment}") + end + end +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/getparam.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/getparam.rb new file mode 100644 index 00000000000..6d510069f90 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/getparam.rb @@ -0,0 +1,35 @@ +# Test whether a given class or definition is defined +require 'puppet/parser/functions' + +Puppet::Parser::Functions.newfunction(:getparam, + :type => :rvalue, + :doc => <<-'ENDOFDOC' +Takes a resource reference and name of the parameter and +returns value of resource's parameter. + +*Examples:* + + define example_resource($param) { + } + + example_resource { "example_resource_instance": + param => "param_value" + } + + getparam(Example_resource["example_resource_instance"], "param") + +Would return: param_value +ENDOFDOC +) do |vals| + reference, param = vals + raise(ArgumentError, 'Must specify a reference') unless reference + raise(ArgumentError, 'Must specify name of a parameter') unless param and param.instance_of? String + + return '' if param.empty? + + if resource = findresource(reference.to_s) + return resource[param] if resource[param] + end + + return '' +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/getvar.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/getvar.rb new file mode 100644 index 00000000000..162114995b3 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/getvar.rb @@ -0,0 +1,26 @@ +module Puppet::Parser::Functions + + newfunction(:getvar, :type => :rvalue, :doc => <<-'ENDHEREDOC') do |args| + Lookup a variable in a remote namespace. + + For example: + + $foo = getvar('site::data::foo') + # Equivalent to $foo = $site::data::foo + + This is useful if the namespace itself is stored in a string: + + $datalocation = 'site::data' + $bar = getvar("${datalocation}::bar") + # Equivalent to $bar = $site::data::bar + ENDHEREDOC + + unless args.length == 1 + raise Puppet::ParseError, ("getvar(): wrong number of arguments (#{args.length}; must be 1)") + end + + self.lookupvar("#{args[0]}") + + end + +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/grep.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/grep.rb new file mode 100644 index 00000000000..ceba9ecc8ff --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/grep.rb @@ -0,0 +1,33 @@ +# +# grep.rb +# + +module Puppet::Parser::Functions + newfunction(:grep, :type => :rvalue, :doc => <<-EOS +This function searches through an array and returns any elements that match +the provided regular expression. + +*Examples:* + + grep(['aaa','bbb','ccc','aaaddd'], 'aaa') + +Would return: + + ['aaa','aaaddd'] + EOS + ) do |arguments| + + if (arguments.size != 2) then + raise(Puppet::ParseError, "grep(): Wrong number of arguments "+ + "given #{arguments.size} for 2") + end + + a = arguments[0] + pattern = Regexp.new(arguments[1]) + + a.grep(pattern) + + end +end + +# vim: set ts=2 sw=2 et : diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/has_interface_with.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/has_interface_with.rb new file mode 100644 index 00000000000..7f150a7176c --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/has_interface_with.rb @@ -0,0 +1,52 @@ +# +# has_interface_with +# + +module Puppet::Parser::Functions + newfunction(:has_interface_with, :type => :rvalue, :doc => <<-EOS +Returns boolean based on kind and value: + * macaddress + * netmask + * ipaddress + * network + +has_interface_with("macaddress", "x:x:x:x:x:x") +has_interface_with("ipaddress", "127.0.0.1") => true +etc. + +If no "kind" is given, then the presence of the interface is checked: +has_interface_with("lo") => true + EOS + ) do |args| + + raise(Puppet::ParseError, "has_interface_with(): Wrong number of arguments " + + "given (#{args.size} for 1 or 2)") if args.size < 1 or args.size > 2 + + interfaces = lookupvar('interfaces') + + # If we do not have any interfaces, then there are no requested attributes + return false if (interfaces == :undefined) + + interfaces = interfaces.split(',') + + if args.size == 1 + return interfaces.member?(args[0]) + end + + kind, value = args + + if lookupvar(kind) == value + return true + end + + result = false + interfaces.each do |iface| + if value == lookupvar("#{kind}_#{iface}") + result = true + break + end + end + + result + end +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/has_ip_address.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/has_ip_address.rb new file mode 100644 index 00000000000..842c8ec6743 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/has_ip_address.rb @@ -0,0 +1,25 @@ +# +# has_ip_address +# + +module Puppet::Parser::Functions + newfunction(:has_ip_address, :type => :rvalue, :doc => <<-EOS +Returns true if the client has the requested IP address on some interface. + +This function iterates through the 'interfaces' fact and checks the +'ipaddress_IFACE' facts, performing a simple string comparison. + EOS + ) do |args| + + raise(Puppet::ParseError, "has_ip_address(): Wrong number of arguments " + + "given (#{args.size} for 1)") if args.size != 1 + + Puppet::Parser::Functions.autoloader.load(:has_interface_with) \ + unless Puppet::Parser::Functions.autoloader.loaded?(:has_interface_with) + + function_has_interface_with(['ipaddress', args[0]]) + + end +end + +# vim:sts=2 sw=2 diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/has_ip_network.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/has_ip_network.rb new file mode 100644 index 00000000000..9ccf9024f78 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/has_ip_network.rb @@ -0,0 +1,25 @@ +# +# has_ip_network +# + +module Puppet::Parser::Functions + newfunction(:has_ip_network, :type => :rvalue, :doc => <<-EOS +Returns true if the client has an IP address within the requested network. + +This function iterates through the 'interfaces' fact and checks the +'network_IFACE' facts, performing a simple string comparision. + EOS + ) do |args| + + raise(Puppet::ParseError, "has_ip_network(): Wrong number of arguments " + + "given (#{args.size} for 1)") if args.size != 1 + + Puppet::Parser::Functions.autoloader.load(:has_interface_with) \ + unless Puppet::Parser::Functions.autoloader.loaded?(:has_interface_with) + + function_has_interface_with(['network', args[0]]) + + end +end + +# vim:sts=2 sw=2 diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/has_key.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/has_key.rb new file mode 100644 index 00000000000..4657cc29cd8 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/has_key.rb @@ -0,0 +1,28 @@ +module Puppet::Parser::Functions + + newfunction(:has_key, :type => :rvalue, :doc => <<-'ENDHEREDOC') do |args| + Determine if a hash has a certain key value. + + Example: + + $my_hash = {'key_one' => 'value_one'} + if has_key($my_hash, 'key_two') { + notice('we will not reach here') + } + if has_key($my_hash, 'key_one') { + notice('this will be printed') + } + + ENDHEREDOC + + unless args.length == 2 + raise Puppet::ParseError, ("has_key(): wrong number of arguments (#{args.length}; must be 2)") + end + unless args[0].is_a?(Hash) + raise Puppet::ParseError, "has_key(): expects the first argument to be a hash, got #{args[0].inspect} which is of type #{args[0].class}" + end + args[0].has_key?(args[1]) + + end + +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/hash.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/hash.rb new file mode 100644 index 00000000000..8cc4823be5a --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/hash.rb @@ -0,0 +1,41 @@ +# +# hash.rb +# + +module Puppet::Parser::Functions + newfunction(:hash, :type => :rvalue, :doc => <<-EOS +This function converts an array into a hash. + +*Examples:* + + hash(['a',1,'b',2,'c',3]) + +Would return: {'a'=>1,'b'=>2,'c'=>3} + EOS + ) do |arguments| + + raise(Puppet::ParseError, "hash(): Wrong number of arguments " + + "given (#{arguments.size} for 1)") if arguments.size < 1 + + array = arguments[0] + + unless array.is_a?(Array) + raise(Puppet::ParseError, 'hash(): Requires array to work with') + end + + result = {} + + begin + # This is to make it compatible with older version of Ruby ... + array = array.flatten + result = Hash[*array] + rescue Exception + raise(Puppet::ParseError, 'hash(): Unable to compute ' + + 'hash from array given') + end + + return result + end +end + +# vim: set ts=2 sw=2 et : diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/intersection.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/intersection.rb new file mode 100644 index 00000000000..48f02e9d379 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/intersection.rb @@ -0,0 +1,34 @@ +# +# intersection.rb +# + +module Puppet::Parser::Functions + newfunction(:intersection, :type => :rvalue, :doc => <<-EOS +This function returns an array an intersection of two. + +*Examples:* + + intersection(["a","b","c"],["b","c","d"]) + +Would return: ["b","c"] + EOS + ) do |arguments| + + # Two arguments are required + raise(Puppet::ParseError, "intersection(): Wrong number of arguments " + + "given (#{arguments.size} for 2)") if arguments.size != 2 + + first = arguments[0] + second = arguments[1] + + unless first.is_a?(Array) && second.is_a?(Array) + raise(Puppet::ParseError, 'intersection(): Requires 2 arrays') + end + + result = first & second + + return result + end +end + +# vim: set ts=2 sw=2 et : diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/is_array.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/is_array.rb new file mode 100644 index 00000000000..b39e184ae54 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/is_array.rb @@ -0,0 +1,22 @@ +# +# is_array.rb +# + +module Puppet::Parser::Functions + newfunction(:is_array, :type => :rvalue, :doc => <<-EOS +Returns true if the variable passed to this function is an array. + EOS + ) do |arguments| + + raise(Puppet::ParseError, "is_array(): Wrong number of arguments " + + "given (#{arguments.size} for 1)") if arguments.size < 1 + + type = arguments[0] + + result = type.is_a?(Array) + + return result + end +end + +# vim: set ts=2 sw=2 et : diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/is_bool.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/is_bool.rb new file mode 100644 index 00000000000..8bbdbc8a146 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/is_bool.rb @@ -0,0 +1,22 @@ +# +# is_bool.rb +# + +module Puppet::Parser::Functions + newfunction(:is_bool, :type => :rvalue, :doc => <<-EOS +Returns true if the variable passed to this function is a boolean. + EOS + ) do |arguments| + + raise(Puppet::ParseError, "is_bool(): Wrong number of arguments " + + "given (#{arguments.size} for 1)") if arguments.size != 1 + + type = arguments[0] + + result = type.is_a?(TrueClass) || type.is_a?(FalseClass) + + return result + end +end + +# vim: set ts=2 sw=2 et : diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/is_domain_name.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/is_domain_name.rb new file mode 100644 index 00000000000..b3fee965a0b --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/is_domain_name.rb @@ -0,0 +1,50 @@ +# +# is_domain_name.rb +# + +module Puppet::Parser::Functions + newfunction(:is_domain_name, :type => :rvalue, :doc => <<-EOS +Returns true if the string passed to this function is a syntactically correct domain name. + EOS + ) do |arguments| + + if (arguments.size != 1) then + raise(Puppet::ParseError, "is_domain_name(): Wrong number of arguments "+ + "given #{arguments.size} for 1") + end + + domain = arguments[0] + + # Limits (rfc1035, 3.1) + domain_max_length=255 + label_min_length=1 + label_max_length=63 + + # Only allow string types + return false unless domain.is_a?(String) + + # Allow ".", it is the top level domain + return true if domain == '.' + + # Remove the final dot, if present. + domain.chomp!('.') + + # Check the whole domain + return false if domain.empty? + return false if domain.length > domain_max_length + + # Check each label in the domain + labels = domain.split('.') + vlabels = labels.each do |label| + break if label.length < label_min_length + break if label.length > label_max_length + break if label[-1..-1] == '-' + break if label[0..0] == '-' + break unless /^[a-z\d-]+$/i.match(label) + end + return vlabels == labels + + end +end + +# vim: set ts=2 sw=2 et : diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/is_float.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/is_float.rb new file mode 100644 index 00000000000..a2da94385be --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/is_float.rb @@ -0,0 +1,30 @@ +# +# is_float.rb +# + +module Puppet::Parser::Functions + newfunction(:is_float, :type => :rvalue, :doc => <<-EOS +Returns true if the variable passed to this function is a float. + EOS + ) do |arguments| + + if (arguments.size != 1) then + raise(Puppet::ParseError, "is_float(): Wrong number of arguments "+ + "given #{arguments.size} for 1") + end + + value = arguments[0] + + # Only allow Numeric or String types + return false unless value.is_a?(Numeric) or value.is_a?(String) + + if value != value.to_f.to_s and !value.is_a? Float then + return false + else + return true + end + + end +end + +# vim: set ts=2 sw=2 et : diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/is_function_available.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/is_function_available.rb new file mode 100644 index 00000000000..6da82c8c170 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/is_function_available.rb @@ -0,0 +1,26 @@ +# +# is_function_available.rb +# + +module Puppet::Parser::Functions + newfunction(:is_function_available, :type => :rvalue, :doc => <<-EOS +This function accepts a string as an argument, determines whether the +Puppet runtime has access to a function by that name. It returns a +true if the function exists, false if not. + EOS + ) do |arguments| + + if (arguments.size != 1) then + raise(Puppet::ParseError, "is_function_available?(): Wrong number of arguments "+ + "given #{arguments.size} for 1") + end + + # Only allow String types + return false unless arguments[0].is_a?(String) + + function = Puppet::Parser::Functions.function(arguments[0].to_sym) + function.is_a?(String) and not function.empty? + end +end + +# vim: set ts=2 sw=2 et : diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/is_hash.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/is_hash.rb new file mode 100644 index 00000000000..ad907f086f3 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/is_hash.rb @@ -0,0 +1,22 @@ +# +# is_hash.rb +# + +module Puppet::Parser::Functions + newfunction(:is_hash, :type => :rvalue, :doc => <<-EOS +Returns true if the variable passed to this function is a hash. + EOS + ) do |arguments| + + raise(Puppet::ParseError, "is_hash(): Wrong number of arguments " + + "given (#{arguments.size} for 1)") if arguments.size != 1 + + type = arguments[0] + + result = type.is_a?(Hash) + + return result + end +end + +# vim: set ts=2 sw=2 et : diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/is_integer.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/is_integer.rb new file mode 100644 index 00000000000..c03d28df920 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/is_integer.rb @@ -0,0 +1,45 @@ +# +# is_integer.rb +# + +module Puppet::Parser::Functions + newfunction(:is_integer, :type => :rvalue, :doc => <<-EOS +Returns true if the variable passed to this function is an Integer or +a decimal (base 10) integer in String form. The string may +start with a '-' (minus). A value of '0' is allowed, but a leading '0' digit may not +be followed by other digits as this indicates that the value is octal (base 8). + +If given any other argument `false` is returned. + EOS + ) do |arguments| + + if (arguments.size != 1) then + raise(Puppet::ParseError, "is_integer(): Wrong number of arguments "+ + "given #{arguments.size} for 1") + end + + value = arguments[0] + + # Regex is taken from the lexer of puppet + # puppet/pops/parser/lexer.rb but modified to match also + # negative values and disallow numbers prefixed with multiple + # 0's + # + # TODO these parameter should be a constant but I'm not sure + # if there is no risk to declare it inside of the module + # Puppet::Parser::Functions + + # Integer numbers like + # -1234568981273 + # 47291 + numeric = %r{^-?(?:(?:[1-9]\d*)|0)$} + + if value.is_a? Integer or (value.is_a? String and value.match numeric) + return true + else + return false + end + end +end + +# vim: set ts=2 sw=2 et : diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/is_ip_address.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/is_ip_address.rb new file mode 100644 index 00000000000..a90adabe15a --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/is_ip_address.rb @@ -0,0 +1,32 @@ +# +# is_ip_address.rb +# + +module Puppet::Parser::Functions + newfunction(:is_ip_address, :type => :rvalue, :doc => <<-EOS +Returns true if the string passed to this function is a valid IP address. + EOS + ) do |arguments| + + require 'ipaddr' + + if (arguments.size != 1) then + raise(Puppet::ParseError, "is_ip_address(): Wrong number of arguments "+ + "given #{arguments.size} for 1") + end + + begin + ip = IPAddr.new(arguments[0]) + rescue ArgumentError + return false + end + + if ip.ipv4? or ip.ipv6? then + return true + else + return false + end + end +end + +# vim: set ts=2 sw=2 et : diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/is_mac_address.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/is_mac_address.rb new file mode 100644 index 00000000000..1b3088a26aa --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/is_mac_address.rb @@ -0,0 +1,27 @@ +# +# is_mac_address.rb +# + +module Puppet::Parser::Functions + newfunction(:is_mac_address, :type => :rvalue, :doc => <<-EOS +Returns true if the string passed to this function is a valid mac address. + EOS + ) do |arguments| + + if (arguments.size != 1) then + raise(Puppet::ParseError, "is_mac_address(): Wrong number of arguments "+ + "given #{arguments.size} for 1") + end + + mac = arguments[0] + + if /^[a-fA-F0-9]{1,2}:[a-fA-F0-9]{1,2}:[a-fA-F0-9]{1,2}:[a-fA-F0-9]{1,2}:[a-fA-F0-9]{1,2}:[a-fA-F0-9]{1,2}$/.match(mac) then + return true + else + return false + end + + end +end + +# vim: set ts=2 sw=2 et : diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/is_numeric.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/is_numeric.rb new file mode 100644 index 00000000000..e7e1d2a746f --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/is_numeric.rb @@ -0,0 +1,75 @@ +# +# is_numeric.rb +# + +module Puppet::Parser::Functions + newfunction(:is_numeric, :type => :rvalue, :doc => <<-EOS +Returns true if the given argument is a Numeric (Integer or Float), +or a String containing either a valid integer in decimal base 10 form, or +a valid floating point string representation. + +The function recognizes only decimal (base 10) integers and float but not +integers in hex (base 16) or octal (base 8) form. + +The string representation may start with a '-' (minus). If a decimal '.' is used, +it must be followed by at least one digit. + +Valid examples: + + 77435 + 10e-12 + -8475 + 0.2343 + -23.561e3 + EOS + ) do |arguments| + + if (arguments.size != 1) then + raise(Puppet::ParseError, "is_numeric(): Wrong number of arguments "+ + "given #{arguments.size} for 1") + end + + value = arguments[0] + + # Regex is taken from the lexer of puppet + # puppet/pops/parser/lexer.rb but modified to match also + # negative values and disallow invalid octal numbers or + # numbers prefixed with multiple 0's (except in hex numbers) + # + # TODO these parameters should be constants but I'm not sure + # if there is no risk to declare them inside of the module + # Puppet::Parser::Functions + + # TODO decide if this should be used + # HEX numbers like + # 0xaa230F + # 0X1234009C + # 0x0012 + # -12FcD + #numeric_hex = %r{^-?0[xX][0-9A-Fa-f]+$} + + # TODO decide if this should be used + # OCTAL numbers like + # 01234567 + # -045372 + #numeric_oct = %r{^-?0[1-7][0-7]*$} + + # Integer/Float numbers like + # -0.1234568981273 + # 47291 + # 42.12345e-12 + numeric = %r{^-?(?:(?:[1-9]\d*)|0)(?:\.\d+)?(?:[eE]-?\d+)?$} + + if value.is_a? Numeric or (value.is_a? String and ( + value.match(numeric) #or + # value.match(numeric_hex) or + # value.match(numeric_oct) + )) + return true + else + return false + end + end +end + +# vim: set ts=2 sw=2 et : diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/is_string.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/is_string.rb new file mode 100644 index 00000000000..f5bef0457f7 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/is_string.rb @@ -0,0 +1,26 @@ +# +# is_string.rb +# + +module Puppet::Parser::Functions + newfunction(:is_string, :type => :rvalue, :doc => <<-EOS +Returns true if the variable passed to this function is a string. + EOS + ) do |arguments| + + raise(Puppet::ParseError, "is_string(): Wrong number of arguments " + + "given (#{arguments.size} for 1)") if arguments.size < 1 + + type = arguments[0] + + result = type.is_a?(String) + + if result and (type == type.to_f.to_s or type == type.to_i.to_s) then + return false + end + + return result + end +end + +# vim: set ts=2 sw=2 et : diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/join.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/join.rb new file mode 100644 index 00000000000..6c0a6ba026c --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/join.rb @@ -0,0 +1,41 @@ +# +# join.rb +# + +module Puppet::Parser::Functions + newfunction(:join, :type => :rvalue, :doc => <<-EOS +This function joins an array into a string using a separator. + +*Examples:* + + join(['a','b','c'], ",") + +Would result in: "a,b,c" + EOS + ) do |arguments| + + # Technically we support two arguments but only first is mandatory ... + raise(Puppet::ParseError, "join(): Wrong number of arguments " + + "given (#{arguments.size} for 1)") if arguments.size < 1 + + array = arguments[0] + + unless array.is_a?(Array) + raise(Puppet::ParseError, 'join(): Requires array to work with') + end + + suffix = arguments[1] if arguments[1] + + if suffix + unless suffix.is_a?(String) + raise(Puppet::ParseError, 'join(): Requires string to work with') + end + end + + result = suffix ? array.join(suffix) : array.join + + return result + end +end + +# vim: set ts=2 sw=2 et : diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/join_keys_to_values.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/join_keys_to_values.rb new file mode 100644 index 00000000000..e9924fe2e63 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/join_keys_to_values.rb @@ -0,0 +1,47 @@ +# +# join.rb +# + +module Puppet::Parser::Functions + newfunction(:join_keys_to_values, :type => :rvalue, :doc => <<-EOS +This function joins each key of a hash to that key's corresponding value with a +separator. Keys and values are cast to strings. The return value is an array in +which each element is one joined key/value pair. + +*Examples:* + + join_keys_to_values({'a'=>1,'b'=>2}, " is ") + +Would result in: ["a is 1","b is 2"] + EOS + ) do |arguments| + + # Validate the number of arguments. + if arguments.size != 2 + raise(Puppet::ParseError, "join_keys_to_values(): Takes exactly two " + + "arguments, but #{arguments.size} given.") + end + + # Validate the first argument. + hash = arguments[0] + if not hash.is_a?(Hash) + raise(TypeError, "join_keys_to_values(): The first argument must be a " + + "hash, but a #{hash.class} was given.") + end + + # Validate the second argument. + separator = arguments[1] + if not separator.is_a?(String) + raise(TypeError, "join_keys_to_values(): The second argument must be a " + + "string, but a #{separator.class} was given.") + end + + # Join the keys to their values. + hash.map do |k,v| + String(k) + separator + String(v) + end + + end +end + +# vim: set ts=2 sw=2 et : diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/keys.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/keys.rb new file mode 100644 index 00000000000..f0d13b64760 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/keys.rb @@ -0,0 +1,26 @@ +# +# keys.rb +# + +module Puppet::Parser::Functions + newfunction(:keys, :type => :rvalue, :doc => <<-EOS +Returns the keys of a hash as an array. + EOS + ) do |arguments| + + raise(Puppet::ParseError, "keys(): Wrong number of arguments " + + "given (#{arguments.size} for 1)") if arguments.size < 1 + + hash = arguments[0] + + unless hash.is_a?(Hash) + raise(Puppet::ParseError, 'keys(): Requires hash to work with') + end + + result = hash.keys + + return result + end +end + +# vim: set ts=2 sw=2 et : diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/loadyaml.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/loadyaml.rb new file mode 100644 index 00000000000..10c400501be --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/loadyaml.rb @@ -0,0 +1,20 @@ +module Puppet::Parser::Functions + + newfunction(:loadyaml, :type => :rvalue, :doc => <<-'ENDHEREDOC') do |args| + Load a YAML file containing an array, string, or hash, and return the data + in the corresponding native data type. + + For example: + + $myhash = loadyaml('/etc/puppet/data/myhash.yaml') + ENDHEREDOC + + unless args.length == 1 + raise Puppet::ParseError, ("loadyaml(): wrong number of arguments (#{args.length}; must be 1)") + end + + YAML.load_file(args[0]) + + end + +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/lstrip.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/lstrip.rb new file mode 100644 index 00000000000..3a64de33766 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/lstrip.rb @@ -0,0 +1,33 @@ +# +# lstrip.rb +# + +module Puppet::Parser::Functions + newfunction(:lstrip, :type => :rvalue, :doc => <<-EOS +Strips leading spaces to the left of a string. + EOS + ) do |arguments| + + raise(Puppet::ParseError, "lstrip(): Wrong number of arguments " + + "given (#{arguments.size} for 1)") if arguments.size < 1 + + value = arguments[0] + klass = value.class + + unless [Array, String].include?(klass) + raise(Puppet::ParseError, 'lstrip(): Requires either ' + + 'array or string to work with') + end + + if value.is_a?(Array) + # Numbers in Puppet are often string-encoded which is troublesome ... + result = value.collect { |i| i.is_a?(String) ? i.lstrip : i } + else + result = value.lstrip + end + + return result + end +end + +# vim: set ts=2 sw=2 et : diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/max.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/max.rb new file mode 100644 index 00000000000..60fb94ac041 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/max.rb @@ -0,0 +1,21 @@ +module Puppet::Parser::Functions + newfunction(:max, :type => :rvalue, :doc => <<-EOS + Returns the highest value of all arguments. + Requires at least one argument. + EOS + ) do |args| + + raise(Puppet::ParseError, "max(): Wrong number of arguments " + + "need at least one") if args.size == 0 + + # Sometimes we get numbers as numerics and sometimes as strings. + # We try to compare them as numbers when possible + return args.max do |a,b| + if a.to_s =~ /\A-?\d+(.\d+)?\z/ and b.to_s =~ /\A-?\d+(.\d+)?\z/ then + a.to_f <=> b.to_f + else + a.to_s <=> b.to_s + end + end + end +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/member.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/member.rb new file mode 100644 index 00000000000..43d76affd9a --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/member.rb @@ -0,0 +1,44 @@ +# +# member.rb +# + +# TODO(Krzysztof Wilczynski): We need to add support for regular expression ... +# TODO(Krzysztof Wilczynski): Support for strings and hashes too ... + +module Puppet::Parser::Functions + newfunction(:member, :type => :rvalue, :doc => <<-EOS +This function determines if a variable is a member of an array. + +*Examples:* + + member(['a','b'], 'b') + +Would return: true + + member(['a','b'], 'c') + +Would return: false + EOS + ) do |arguments| + + raise(Puppet::ParseError, "member(): Wrong number of arguments " + + "given (#{arguments.size} for 2)") if arguments.size < 2 + + array = arguments[0] + + unless array.is_a?(Array) + raise(Puppet::ParseError, 'member(): Requires array to work with') + end + + item = arguments[1] + + raise(Puppet::ParseError, 'member(): You must provide item ' + + 'to search for within array given') if item.empty? + + result = array.include?(item) + + return result + end +end + +# vim: set ts=2 sw=2 et : diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/merge.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/merge.rb new file mode 100644 index 00000000000..1b39f20600f --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/merge.rb @@ -0,0 +1,34 @@ +module Puppet::Parser::Functions + newfunction(:merge, :type => :rvalue, :doc => <<-'ENDHEREDOC') do |args| + Merges two or more hashes together and returns the resulting hash. + + For example: + + $hash1 = {'one' => 1, 'two', => 2} + $hash2 = {'two' => 'dos', 'three', => 'tres'} + $merged_hash = merge($hash1, $hash2) + # The resulting hash is equivalent to: + # $merged_hash = {'one' => 1, 'two' => 'dos', 'three' => 'tres'} + + When there is a duplicate key, the key in the rightmost hash will "win." + + ENDHEREDOC + + if args.length < 2 + raise Puppet::ParseError, ("merge(): wrong number of arguments (#{args.length}; must be at least 2)") + end + + # The hash we accumulate into + accumulator = Hash.new + # Merge into the accumulator hash + args.each do |arg| + next if arg.is_a? String and arg.empty? # empty string is synonym for puppet's undef + unless arg.is_a?(Hash) + raise Puppet::ParseError, "merge: unexpected argument type #{arg.class}, only expects hash arguments" + end + accumulator.merge!(arg) + end + # Return the fully merged hash + accumulator + end +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/min.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/min.rb new file mode 100644 index 00000000000..6bd6ebf20cf --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/min.rb @@ -0,0 +1,21 @@ +module Puppet::Parser::Functions + newfunction(:min, :type => :rvalue, :doc => <<-EOS + Returns the lowest value of all arguments. + Requires at least one argument. + EOS + ) do |args| + + raise(Puppet::ParseError, "min(): Wrong number of arguments " + + "need at least one") if args.size == 0 + + # Sometimes we get numbers as numerics and sometimes as strings. + # We try to compare them as numbers when possible + return args.min do |a,b| + if a.to_s =~ /\A^-?\d+(.\d+)?\z/ and b.to_s =~ /\A-?\d+(.\d+)?\z/ then + a.to_f <=> b.to_f + else + a.to_s <=> b.to_s + end + end + end +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/num2bool.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/num2bool.rb new file mode 100644 index 00000000000..af0e6ed7895 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/num2bool.rb @@ -0,0 +1,43 @@ +# +# num2bool.rb +# + +module Puppet::Parser::Functions + newfunction(:num2bool, :type => :rvalue, :doc => <<-EOS +This function converts a number or a string representation of a number into a +true boolean. Zero or anything non-numeric becomes false. Numbers higher then 0 +become true. + EOS + ) do |arguments| + + raise(Puppet::ParseError, "num2bool(): Wrong number of arguments " + + "given (#{arguments.size} for 1)") if arguments.size != 1 + + number = arguments[0] + + case number + when Numeric + # Yay, it's a number + when String + begin + number = Float(number) + rescue ArgumentError => ex + raise(Puppet::ParseError, "num2bool(): '#{number}' does not look like a number: #{ex.message}") + end + else + begin + number = number.to_s + rescue NoMethodError => ex + raise(Puppet::ParseError, "num2bool(): Unable to parse argument: #{ex.message}") + end + end + + # Truncate Floats + number = number.to_i + + # Return true for any positive number and false otherwise + return number > 0 + end +end + +# vim: set ts=2 sw=2 et : diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/parsejson.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/parsejson.rb new file mode 100644 index 00000000000..a9a16a4524b --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/parsejson.rb @@ -0,0 +1,24 @@ +# +# parsejson.rb +# + +module Puppet::Parser::Functions + newfunction(:parsejson, :type => :rvalue, :doc => <<-EOS +This function accepts JSON as a string and converts into the correct Puppet +structure. + EOS + ) do |arguments| + + if (arguments.size != 1) then + raise(Puppet::ParseError, "parsejson(): Wrong number of arguments "+ + "given #{arguments.size} for 1") + end + + json = arguments[0] + + # PSON is natively available in puppet + PSON.load(json) + end +end + +# vim: set ts=2 sw=2 et : diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/parseyaml.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/parseyaml.rb new file mode 100644 index 00000000000..53d54faff74 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/parseyaml.rb @@ -0,0 +1,24 @@ +# +# parseyaml.rb +# + +module Puppet::Parser::Functions + newfunction(:parseyaml, :type => :rvalue, :doc => <<-EOS +This function accepts YAML as a string and converts it into the correct +Puppet structure. + EOS + ) do |arguments| + + if (arguments.size != 1) then + raise(Puppet::ParseError, "parseyaml(): Wrong number of arguments "+ + "given #{arguments.size} for 1") + end + + require 'yaml' + + YAML::load(arguments[0]) + + end +end + +# vim: set ts=2 sw=2 et : diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/pick.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/pick.rb new file mode 100644 index 00000000000..fdd0aefd722 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/pick.rb @@ -0,0 +1,29 @@ +module Puppet::Parser::Functions + newfunction(:pick, :type => :rvalue, :doc => <<-EOS + +This function is similar to a coalesce function in SQL in that it will return +the first value in a list of values that is not undefined or an empty string +(two things in Puppet that will return a boolean false value). Typically, +this function is used to check for a value in the Puppet Dashboard/Enterprise +Console, and failover to a default value like the following: + + $real_jenkins_version = pick($::jenkins_version, '1.449') + +The value of $real_jenkins_version will first look for a top-scope variable +called 'jenkins_version' (note that parameters set in the Puppet Dashboard/ +Enterprise Console are brought into Puppet as top-scope variables), and, +failing that, will use a default value of 1.449. + +EOS +) do |args| + args = args.compact + args.delete(:undef) + args.delete(:undefined) + args.delete("") + if args[0].to_s.empty? then + fail Puppet::ParseError, "pick(): must receive at least one non empty value" + else + return args[0] + end + end +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/pick_default.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/pick_default.rb new file mode 100644 index 00000000000..36e33abfa9a --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/pick_default.rb @@ -0,0 +1,35 @@ +module Puppet::Parser::Functions + newfunction(:pick_default, :type => :rvalue, :doc => <<-EOS + +This function is similar to a coalesce function in SQL in that it will return +the first value in a list of values that is not undefined or an empty string +(two things in Puppet that will return a boolean false value). If no value is +found, it will return the last argument. + +Typically, this function is used to check for a value in the Puppet +Dashboard/Enterprise Console, and failover to a default value like the +following: + + $real_jenkins_version = pick_default($::jenkins_version, '1.449') + +The value of $real_jenkins_version will first look for a top-scope variable +called 'jenkins_version' (note that parameters set in the Puppet Dashboard/ +Enterprise Console are brought into Puppet as top-scope variables), and, +failing that, will use a default value of 1.449. + +Note that, contrary to the pick() function, the pick_default does not fail if +all arguments are empty. This allows pick_default to use an empty value as +default. + +EOS +) do |args| + fail "Must receive at least one argument." if args.empty? + default = args.last + args = args[0..-2].compact + args.delete(:undef) + args.delete(:undefined) + args.delete("") + args << default + return args[0] + end +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/prefix.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/prefix.rb new file mode 100644 index 00000000000..d02286afac3 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/prefix.rb @@ -0,0 +1,45 @@ +# +# prefix.rb +# + +module Puppet::Parser::Functions + newfunction(:prefix, :type => :rvalue, :doc => <<-EOS +This function applies a prefix to all elements in an array. + +*Examples:* + + prefix(['a','b','c'], 'p') + +Will return: ['pa','pb','pc'] + EOS + ) do |arguments| + + # Technically we support two arguments but only first is mandatory ... + raise(Puppet::ParseError, "prefix(): Wrong number of arguments " + + "given (#{arguments.size} for 1)") if arguments.size < 1 + + array = arguments[0] + + unless array.is_a?(Array) + raise Puppet::ParseError, "prefix(): expected first argument to be an Array, got #{array.inspect}" + end + + prefix = arguments[1] if arguments[1] + + if prefix + unless prefix.is_a?(String) + raise Puppet::ParseError, "prefix(): expected second argument to be a String, got #{prefix.inspect}" + end + end + + # Turn everything into string same as join would do ... + result = array.collect do |i| + i = i.to_s + prefix ? prefix + i : i + end + + return result + end +end + +# vim: set ts=2 sw=2 et : diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/range.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/range.rb new file mode 100644 index 00000000000..ffbdf84630d --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/range.rb @@ -0,0 +1,88 @@ +# +# range.rb +# + +# TODO(Krzysztof Wilczynski): We probably need to approach numeric values differently ... + +module Puppet::Parser::Functions + newfunction(:range, :type => :rvalue, :doc => <<-EOS +When given range in the form of (start, stop) it will extrapolate a range as +an array. + +*Examples:* + + range("0", "9") + +Will return: [0,1,2,3,4,5,6,7,8,9] + + range("00", "09") + +Will return: [0,1,2,3,4,5,6,7,8,9] (Zero padded strings are converted to +integers automatically) + + range("a", "c") + +Will return: ["a","b","c"] + + range("host01", "host10") + +Will return: ["host01", "host02", ..., "host09", "host10"] + +Passing a third argument will cause the generated range to step by that +interval, e.g. + + range("0", "9", "2") + +Will return: [0,2,4,6,8] + EOS + ) do |arguments| + + # We support more than one argument but at least one is mandatory ... + raise(Puppet::ParseError, "range(): Wrong number of " + + "arguments given (#{arguments.size} for 1)") if arguments.size < 1 + + if arguments.size > 1 + start = arguments[0] + stop = arguments[1] + step = arguments[2].nil? ? 1 : arguments[2].to_i.abs + + type = '..' # We select simplest type for Range available in Ruby ... + + elsif arguments.size > 0 + value = arguments[0] + + if m = value.match(/^(\w+)(\.\.\.?|\-)(\w+)$/) + start = m[1] + stop = m[3] + + type = m[2] + + elsif value.match(/^.+$/) + raise(Puppet::ParseError, 'range(): Unable to compute range ' + + 'from the value given') + else + raise(Puppet::ParseError, 'range(): Unknown format of range given') + end + end + + # Check whether we have integer value if so then make it so ... + if start.match(/^\d+$/) + start = start.to_i + stop = stop.to_i + else + start = start.to_s + stop = stop.to_s + end + + range = case type + when /^(\.\.|\-)$/ then (start .. stop) + when /^(\.\.\.)$/ then (start ... stop) # Exclusive of last element ... + end + + result = range.step(step).collect { |i| i } # Get them all ... Pokemon ... + + return result + end +end + +# vim: set ts=2 sw=2 et : diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/reject.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/reject.rb new file mode 100644 index 00000000000..1953ffcf118 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/reject.rb @@ -0,0 +1,31 @@ +# +# reject.rb +# + +module Puppet::Parser::Functions + newfunction(:reject, :type => :rvalue, :doc => <<-EOS) do |args| +This function searches through an array and rejects all elements that match +the provided regular expression. + +*Examples:* + + reject(['aaa','bbb','ccc','aaaddd'], 'aaa') + +Would return: + + ['bbb','ccc'] +EOS + + if (args.size != 2) + raise Puppet::ParseError, + "reject(): Wrong number of arguments given #{args.size} for 2" + end + + ary = args[0] + pattern = Regexp.new(args[1]) + + ary.reject { |e| e =~ pattern } + end +end + +# vim: set ts=2 sw=2 et : diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/reverse.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/reverse.rb new file mode 100644 index 00000000000..fe048690cdd --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/reverse.rb @@ -0,0 +1,28 @@ +# +# reverse.rb +# + +module Puppet::Parser::Functions + newfunction(:reverse, :type => :rvalue, :doc => <<-EOS +Reverses the order of a string or array. + EOS + ) do |arguments| + + raise(Puppet::ParseError, "reverse(): Wrong number of arguments " + + "given (#{arguments.size} for 1)") if arguments.size < 1 + + value = arguments[0] + klass = value.class + + unless [Array, String].include?(klass) + raise(Puppet::ParseError, 'reverse(): Requires either ' + + 'array or string to work with') + end + + result = value.reverse + + return result + end +end + +# vim: set ts=2 sw=2 et : diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/rstrip.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/rstrip.rb new file mode 100644 index 00000000000..29b0998205f --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/rstrip.rb @@ -0,0 +1,32 @@ +# +# rstrip.rb +# + +module Puppet::Parser::Functions + newfunction(:rstrip, :type => :rvalue, :doc => <<-EOS +Strips leading spaces to the right of the string. + EOS + ) do |arguments| + + raise(Puppet::ParseError, "rstrip(): Wrong number of arguments " + + "given (#{arguments.size} for 1)") if arguments.size < 1 + + value = arguments[0] + klass = value.class + + unless [Array, String].include?(klass) + raise(Puppet::ParseError, 'rstrip(): Requires either ' + + 'array or string to work with') + end + + if value.is_a?(Array) + result = value.collect { |i| i.is_a?(String) ? i.rstrip : i } + else + result = value.rstrip + end + + return result + end +end + +# vim: set ts=2 sw=2 et : diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/shuffle.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/shuffle.rb new file mode 100644 index 00000000000..18134ab633e --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/shuffle.rb @@ -0,0 +1,46 @@ +# +# shuffle.rb +# + +module Puppet::Parser::Functions + newfunction(:shuffle, :type => :rvalue, :doc => <<-EOS +Randomizes the order of a string or array elements. + EOS + ) do |arguments| + + raise(Puppet::ParseError, "shuffle(): Wrong number of arguments " + + "given (#{arguments.size} for 1)") if arguments.size < 1 + + value = arguments[0] + klass = value.class + + unless [Array, String].include?(klass) + raise(Puppet::ParseError, 'shuffle(): Requires either ' + + 'array or string to work with') + end + + result = value.clone + + string = value.is_a?(String) ? true : false + + # Check whether it makes sense to shuffle ... + return result if result.size <= 1 + + # We turn any string value into an array to be able to shuffle ... + result = string ? result.split('') : result + + elements = result.size + + # Simple implementation of Fisher–Yates in-place shuffle ... + elements.times do |i| + j = rand(elements - i) + i + result[j], result[i] = result[i], result[j] + end + + result = string ? result.join : result + + return result + end +end + +# vim: set ts=2 sw=2 et : diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/size.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/size.rb new file mode 100644 index 00000000000..cc207e3fadc --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/size.rb @@ -0,0 +1,48 @@ +# +# size.rb +# + +# TODO(Krzysztof Wilczynski): Support for hashes would be nice too ... + +module Puppet::Parser::Functions + newfunction(:size, :type => :rvalue, :doc => <<-EOS +Returns the number of elements in a string or array. + EOS + ) do |arguments| + + raise(Puppet::ParseError, "size(): Wrong number of arguments " + + "given (#{arguments.size} for 1)") if arguments.size < 1 + + item = arguments[0] + + if item.is_a?(String) + + begin + # + # Check whether your item is a numeric value or not ... + # This will take care about positive and/or negative numbers + # for both integer and floating-point values ... + # + # Please note that Puppet has no notion of hexadecimal + # nor octal numbers for its DSL at this point in time ... + # + Float(item) + + raise(Puppet::ParseError, 'size(): Requires either ' + + 'string or array to work with') + + rescue ArgumentError + result = item.size + end + + elsif item.is_a?(Array) + result = item.size + else + raise(Puppet::ParseError, 'size(): Unknown type given') + end + + return result + end +end + +# vim: set ts=2 sw=2 et : diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/sort.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/sort.rb new file mode 100644 index 00000000000..cefbe5463b4 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/sort.rb @@ -0,0 +1,27 @@ +# +# sort.rb +# + +module Puppet::Parser::Functions + newfunction(:sort, :type => :rvalue, :doc => <<-EOS +Sorts strings and arrays lexically. + EOS + ) do |arguments| + + if (arguments.size != 1) then + raise(Puppet::ParseError, "sort(): Wrong number of arguments "+ + "given #{arguments.size} for 1") + end + + value = arguments[0] + + if value.is_a?(Array) then + value.sort + elsif value.is_a?(String) then + value.split("").sort.join("") + end + + end +end + +# vim: set ts=2 sw=2 et : diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/squeeze.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/squeeze.rb new file mode 100644 index 00000000000..81fadfdb2f0 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/squeeze.rb @@ -0,0 +1,36 @@ +# +# squeeze.rb +# + +module Puppet::Parser::Functions + newfunction(:squeeze, :type => :rvalue, :doc => <<-EOS +Returns a new string where runs of the same character that occur in this set are replaced by a single character. + EOS + ) do |arguments| + + if ((arguments.size != 2) and (arguments.size != 1)) then + raise(Puppet::ParseError, "squeeze(): Wrong number of arguments "+ + "given #{arguments.size} for 2 or 1") + end + + item = arguments[0] + squeezeval = arguments[1] + + if item.is_a?(Array) then + if squeezeval then + item.collect { |i| i.squeeze(squeezeval) } + else + item.collect { |i| i.squeeze } + end + else + if squeezeval then + item.squeeze(squeezeval) + else + item.squeeze + end + end + + end +end + +# vim: set ts=2 sw=2 et : diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/str2bool.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/str2bool.rb new file mode 100644 index 00000000000..446732ece40 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/str2bool.rb @@ -0,0 +1,46 @@ +# +# str2bool.rb +# + +module Puppet::Parser::Functions + newfunction(:str2bool, :type => :rvalue, :doc => <<-EOS +This converts a string to a boolean. This attempt to convert strings that +contain things like: y, 1, t, true to 'true' and strings that contain things +like: 0, f, n, false, no to 'false'. + EOS + ) do |arguments| + + raise(Puppet::ParseError, "str2bool(): Wrong number of arguments " + + "given (#{arguments.size} for 1)") if arguments.size < 1 + + string = arguments[0] + + # If string is already Boolean, return it + if !!string == string + return string + end + + unless string.is_a?(String) + raise(Puppet::ParseError, 'str2bool(): Requires either ' + + 'string to work with') + end + + # We consider all the yes, no, y, n and so on too ... + result = case string + # + # This is how undef looks like in Puppet ... + # We yield false in this case. + # + when /^$/, '' then false # Empty string will be false ... + when /^(1|t|y|true|yes)$/ then true + when /^(0|f|n|false|no)$/ then false + when /^(undef|undefined)$/ then false # This is not likely to happen ... + else + raise(Puppet::ParseError, 'str2bool(): Unknown type of boolean given') + end + + return result + end +end + +# vim: set ts=2 sw=2 et : diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/str2saltedsha512.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/str2saltedsha512.rb new file mode 100644 index 00000000000..7fe7b0128ae --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/str2saltedsha512.rb @@ -0,0 +1,32 @@ +# +# str2saltedsha512.rb +# + +module Puppet::Parser::Functions + newfunction(:str2saltedsha512, :type => :rvalue, :doc => <<-EOS +This converts a string to a salted-SHA512 password hash (which is used for +OS X versions >= 10.7). Given any simple string, you will get a hex version +of a salted-SHA512 password hash that can be inserted into your Puppet +manifests as a valid password attribute. + EOS + ) do |arguments| + require 'digest/sha2' + + raise(Puppet::ParseError, "str2saltedsha512(): Wrong number of arguments " + + "passed (#{arguments.size} but we require 1)") if arguments.size != 1 + + password = arguments[0] + + unless password.is_a?(String) + raise(Puppet::ParseError, 'str2saltedsha512(): Requires a ' + + "String argument, you passed: #{password.class}") + end + + seedint = rand(2**31 - 1) + seedstring = Array(seedint).pack("L") + saltedpass = Digest::SHA512.digest(seedstring + password) + (seedstring + saltedpass).unpack('H*')[0] + end +end + +# vim: set ts=2 sw=2 et : diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/strftime.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/strftime.rb new file mode 100644 index 00000000000..0b52adecdbf --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/strftime.rb @@ -0,0 +1,107 @@ +# +# strftime.rb +# + +module Puppet::Parser::Functions + newfunction(:strftime, :type => :rvalue, :doc => <<-EOS +This function returns formatted time. + +*Examples:* + +To return the time since epoch: + + strftime("%s") + +To return the date: + + strftime("%Y-%m-%d") + +*Format meaning:* + + %a - The abbreviated weekday name (``Sun'') + %A - The full weekday name (``Sunday'') + %b - The abbreviated month name (``Jan'') + %B - The full month name (``January'') + %c - The preferred local date and time representation + %C - Century (20 in 2009) + %d - Day of the month (01..31) + %D - Date (%m/%d/%y) + %e - Day of the month, blank-padded ( 1..31) + %F - Equivalent to %Y-%m-%d (the ISO 8601 date format) + %h - Equivalent to %b + %H - Hour of the day, 24-hour clock (00..23) + %I - Hour of the day, 12-hour clock (01..12) + %j - Day of the year (001..366) + %k - hour, 24-hour clock, blank-padded ( 0..23) + %l - hour, 12-hour clock, blank-padded ( 0..12) + %L - Millisecond of the second (000..999) + %m - Month of the year (01..12) + %M - Minute of the hour (00..59) + %n - Newline (\n) + %N - Fractional seconds digits, default is 9 digits (nanosecond) + %3N millisecond (3 digits) + %6N microsecond (6 digits) + %9N nanosecond (9 digits) + %p - Meridian indicator (``AM'' or ``PM'') + %P - Meridian indicator (``am'' or ``pm'') + %r - time, 12-hour (same as %I:%M:%S %p) + %R - time, 24-hour (%H:%M) + %s - Number of seconds since 1970-01-01 00:00:00 UTC. + %S - Second of the minute (00..60) + %t - Tab character (\t) + %T - time, 24-hour (%H:%M:%S) + %u - Day of the week as a decimal, Monday being 1. (1..7) + %U - Week number of the current year, + starting with the first Sunday as the first + day of the first week (00..53) + %v - VMS date (%e-%b-%Y) + %V - Week number of year according to ISO 8601 (01..53) + %W - Week number of the current year, + starting with the first Monday as the first + day of the first week (00..53) + %w - Day of the week (Sunday is 0, 0..6) + %x - Preferred representation for the date alone, no time + %X - Preferred representation for the time alone, no date + %y - Year without a century (00..99) + %Y - Year with century + %z - Time zone as hour offset from UTC (e.g. +0900) + %Z - Time zone name + %% - Literal ``%'' character + EOS + ) do |arguments| + + # Technically we support two arguments but only first is mandatory ... + raise(Puppet::ParseError, "strftime(): Wrong number of arguments " + + "given (#{arguments.size} for 1)") if arguments.size < 1 + + format = arguments[0] + + raise(Puppet::ParseError, 'strftime(): You must provide ' + + 'format for evaluation') if format.empty? + + # The Time Zone argument is optional ... + time_zone = arguments[1] if arguments[1] + + time = Time.new + + # There is probably a better way to handle Time Zone ... + if time_zone and not time_zone.empty? + original_zone = ENV['TZ'] + + local_time = time.clone + local_time = local_time.utc + + ENV['TZ'] = time_zone + + time = local_time.localtime + + ENV['TZ'] = original_zone + end + + result = time.strftime(format) + + return result + end +end + +# vim: set ts=2 sw=2 et : diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/strip.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/strip.rb new file mode 100644 index 00000000000..5f4630d7de9 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/strip.rb @@ -0,0 +1,39 @@ +# +# strip.rb +# + +module Puppet::Parser::Functions + newfunction(:strip, :type => :rvalue, :doc => <<-EOS +This function removes leading and trailing whitespace from a string or from +every string inside an array. + +*Examples:* + + strip(" aaa ") + +Would result in: "aaa" + EOS + ) do |arguments| + + raise(Puppet::ParseError, "strip(): Wrong number of arguments " + + "given (#{arguments.size} for 1)") if arguments.size < 1 + + value = arguments[0] + klass = value.class + + unless [Array, String].include?(klass) + raise(Puppet::ParseError, 'strip(): Requires either ' + + 'array or string to work with') + end + + if value.is_a?(Array) + result = value.collect { |i| i.is_a?(String) ? i.strip : i } + else + result = value.strip + end + + return result + end +end + +# vim: set ts=2 sw=2 et : diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/suffix.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/suffix.rb new file mode 100644 index 00000000000..f7792d6f7a6 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/suffix.rb @@ -0,0 +1,45 @@ +# +# suffix.rb +# + +module Puppet::Parser::Functions + newfunction(:suffix, :type => :rvalue, :doc => <<-EOS +This function applies a suffix to all elements in an array. + +*Examples:* + + suffix(['a','b','c'], 'p') + +Will return: ['ap','bp','cp'] + EOS + ) do |arguments| + + # Technically we support two arguments but only first is mandatory ... + raise(Puppet::ParseError, "suffix(): Wrong number of arguments " + + "given (#{arguments.size} for 1)") if arguments.size < 1 + + array = arguments[0] + + unless array.is_a?(Array) + raise Puppet::ParseError, "suffix(): expected first argument to be an Array, got #{array.inspect}" + end + + suffix = arguments[1] if arguments[1] + + if suffix + unless suffix.is_a? String + raise Puppet::ParseError, "suffix(): expected second argument to be a String, got #{suffix.inspect}" + end + end + + # Turn everything into string same as join would do ... + result = array.collect do |i| + i = i.to_s + suffix ? i + suffix : i + end + + return result + end +end + +# vim: set ts=2 sw=2 et : diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/swapcase.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/swapcase.rb new file mode 100644 index 00000000000..b9e66325338 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/swapcase.rb @@ -0,0 +1,39 @@ +# +# swapcase.rb +# + +module Puppet::Parser::Functions + newfunction(:swapcase, :type => :rvalue, :doc => <<-EOS +This function will swap the existing case of a string. + +*Examples:* + + swapcase("aBcD") + +Would result in: "AbCd" + EOS + ) do |arguments| + + raise(Puppet::ParseError, "swapcase(): Wrong number of arguments " + + "given (#{arguments.size} for 1)") if arguments.size < 1 + + value = arguments[0] + klass = value.class + + unless [Array, String].include?(klass) + raise(Puppet::ParseError, 'swapcase(): Requires either ' + + 'array or string to work with') + end + + if value.is_a?(Array) + # Numbers in Puppet are often string-encoded which is troublesome ... + result = value.collect { |i| i.is_a?(String) ? i.swapcase : i } + else + result = value.swapcase + end + + return result + end +end + +# vim: set ts=2 sw=2 et : diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/time.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/time.rb new file mode 100644 index 00000000000..0cddaf86b93 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/time.rb @@ -0,0 +1,49 @@ +# +# time.rb +# + +module Puppet::Parser::Functions + newfunction(:time, :type => :rvalue, :doc => <<-EOS +This function will return the current time since epoch as an integer. + +*Examples:* + + time() + +Will return something like: 1311972653 + EOS + ) do |arguments| + + # The Time Zone argument is optional ... + time_zone = arguments[0] if arguments[0] + + if (arguments.size != 0) and (arguments.size != 1) then + raise(Puppet::ParseError, "time(): Wrong number of arguments "+ + "given #{arguments.size} for 0 or 1") + end + + time = Time.new + + # There is probably a better way to handle Time Zone ... + if time_zone and not time_zone.empty? + original_zone = ENV['TZ'] + + local_time = time.clone + local_time = local_time.utc + + ENV['TZ'] = time_zone + + time = local_time.localtime + + ENV['TZ'] = original_zone + end + + # Calling Time#to_i on a receiver changes it. Trust me I am the Doctor. + result = time.strftime('%s') + result = result.to_i + + return result + end +end + +# vim: set ts=2 sw=2 et : diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/to_bytes.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/to_bytes.rb new file mode 100644 index 00000000000..8ff73d10b41 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/to_bytes.rb @@ -0,0 +1,28 @@ +module Puppet::Parser::Functions + newfunction(:to_bytes, :type => :rvalue, :doc => <<-EOS + Converts the argument into bytes, for example 4 kB becomes 4096. + Takes a single string value as an argument. + EOS + ) do |arguments| + + raise(Puppet::ParseError, "to_bytes(): Wrong number of arguments " + + "given (#{arguments.size} for 1)") if arguments.size != 1 + + arg = arguments[0] + + return arg if arg.is_a? Numeric + + value,prefix = */([0-9.e+-]*)\s*([^bB]?)/.match(arg)[1,2] + + value = value.to_f + case prefix + when '' then return value.to_i + when 'k' then return (value*(1<<10)).to_i + when 'M' then return (value*(1<<20)).to_i + when 'G' then return (value*(1<<30)).to_i + when 'T' then return (value*(1<<40)).to_i + when 'E' then return (value*(1<<50)).to_i + else raise Puppet::ParseError, "to_bytes(): Unknown prefix #{prefix}" + end + end +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/type.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/type.rb new file mode 100644 index 00000000000..8d85f11585e --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/type.rb @@ -0,0 +1,50 @@ +# +# type.rb +# + +module Puppet::Parser::Functions + newfunction(:type, :type => :rvalue, :doc => <<-EOS +Returns the type when passed a variable. Type can be one of: + +* string +* array +* hash +* float +* integer +* boolean + EOS + ) do |arguments| + + raise(Puppet::ParseError, "type(): Wrong number of arguments " + + "given (#{arguments.size} for 1)") if arguments.size < 1 + + value = arguments[0] + + klass = value.class + + if not [TrueClass, FalseClass, Array, Bignum, Fixnum, Float, Hash, String].include?(klass) + raise(Puppet::ParseError, 'type(): Unknown type') + end + + klass = klass.to_s # Ugly ... + + # We note that Integer is the parent to Bignum and Fixnum ... + result = case klass + when /^(?:Big|Fix)num$/ then 'integer' + when /^(?:True|False)Class$/ then 'boolean' + else klass + end + + if result == "String" then + if value == value.to_i.to_s then + result = "Integer" + elsif value == value.to_f.to_s then + result = "Float" + end + end + + return result.downcase + end +end + +# vim: set ts=2 sw=2 et : diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/union.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/union.rb new file mode 100644 index 00000000000..c91bb805373 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/union.rb @@ -0,0 +1,34 @@ +# +# union.rb +# + +module Puppet::Parser::Functions + newfunction(:union, :type => :rvalue, :doc => <<-EOS +This function returns a union of two arrays. + +*Examples:* + + union(["a","b","c"],["b","c","d"]) + +Would return: ["a","b","c","d"] + EOS + ) do |arguments| + + # Two arguments are required + raise(Puppet::ParseError, "union(): Wrong number of arguments " + + "given (#{arguments.size} for 2)") if arguments.size != 2 + + first = arguments[0] + second = arguments[1] + + unless first.is_a?(Array) && second.is_a?(Array) + raise(Puppet::ParseError, 'union(): Requires 2 arrays') + end + + result = first | second + + return result + end +end + +# vim: set ts=2 sw=2 et : diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/unique.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/unique.rb new file mode 100644 index 00000000000..8844a741852 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/unique.rb @@ -0,0 +1,51 @@ +# +# unique.rb +# + +module Puppet::Parser::Functions + newfunction(:unique, :type => :rvalue, :doc => <<-EOS +This function will remove duplicates from strings and arrays. + +*Examples:* + + unique("aabbcc") + +Will return: + + abc + +You can also use this with arrays: + + unique(["a","a","b","b","c","c"]) + +This returns: + + ["a","b","c"] + EOS + ) do |arguments| + + raise(Puppet::ParseError, "unique(): Wrong number of arguments " + + "given (#{arguments.size} for 1)") if arguments.size < 1 + + value = arguments[0] + klass = value.class + + unless [Array, String].include?(klass) + raise(Puppet::ParseError, 'unique(): Requires either ' + + 'array or string to work with') + end + + result = value.clone + + string = value.is_a?(String) ? true : false + + # We turn any string value into an array to be able to shuffle ... + result = string ? result.split('') : result + result = result.uniq # Remove duplicates ... + result = string ? result.join : result + + return result + end +end + +# vim: set ts=2 sw=2 et : diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/upcase.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/upcase.rb new file mode 100644 index 00000000000..fe6cadc3cce --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/upcase.rb @@ -0,0 +1,41 @@ +# +# upcase.rb +# + +module Puppet::Parser::Functions + newfunction(:upcase, :type => :rvalue, :doc => <<-EOS +Converts a string or an array of strings to uppercase. + +*Examples:* + + upcase("abcd") + +Will return: + + ASDF + EOS + ) do |arguments| + + raise(Puppet::ParseError, "upcase(): Wrong number of arguments " + + "given (#{arguments.size} for 1)") if arguments.size < 1 + + value = arguments[0] + klass = value.class + + unless [Array, String].include?(klass) + raise(Puppet::ParseError, 'upcase(): Requires either ' + + 'array or string to work with') + end + + if value.is_a?(Array) + # Numbers in Puppet are often string-encoded which is troublesome ... + result = value.collect { |i| i.is_a?(String) ? i.upcase : i } + else + result = value.upcase + end + + return result + end +end + +# vim: set ts=2 sw=2 et : diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/uriescape.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/uriescape.rb new file mode 100644 index 00000000000..0d81de5d108 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/uriescape.rb @@ -0,0 +1,35 @@ +# +# uriescape.rb +# +require 'uri' + +module Puppet::Parser::Functions + newfunction(:uriescape, :type => :rvalue, :doc => <<-EOS + Urlencodes a string or array of strings. + Requires either a single string or an array as an input. + EOS + ) do |arguments| + + raise(Puppet::ParseError, "uriescape(): Wrong number of arguments " + + "given (#{arguments.size} for 1)") if arguments.size < 1 + + value = arguments[0] + klass = value.class + + unless [Array, String].include?(klass) + raise(Puppet::ParseError, 'uriescape(): Requires either ' + + 'array or string to work with') + end + + if value.is_a?(Array) + # Numbers in Puppet are often string-encoded which is troublesome ... + result = value.collect { |i| i.is_a?(String) ? URI.escape(i,unsafe) : i } + else + result = URI.escape(value) + end + + return result + end +end + +# vim: set ts=2 sw=2 et : diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/validate_absolute_path.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/validate_absolute_path.rb new file mode 100644 index 00000000000..fe279744ec6 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/validate_absolute_path.rb @@ -0,0 +1,56 @@ +module Puppet::Parser::Functions + newfunction(:validate_absolute_path, :doc => <<-'ENDHEREDOC') do |args| + Validate the string represents an absolute path in the filesystem. This function works + for windows and unix style paths. + + The following values will pass: + + $my_path = "C:/Program Files (x86)/Puppet Labs/Puppet" + validate_absolute_path($my_path) + $my_path2 = "/var/lib/puppet" + validate_absolute_path($my_path2) + + + The following values will fail, causing compilation to abort: + + validate_absolute_path(true) + validate_absolute_path([ 'var/lib/puppet', '/var/foo' ]) + validate_absolute_path([ '/var/lib/puppet', 'var/foo' ]) + $undefined = undef + validate_absolute_path($undefined) + + ENDHEREDOC + + require 'puppet/util' + + unless args.length > 0 then + raise Puppet::ParseError, ("validate_absolute_path(): wrong number of arguments (#{args.length}; must be > 0)") + end + + args.each do |arg| + # This logic was borrowed from + # [lib/puppet/file_serving/base.rb](https://github.com/puppetlabs/puppet/blob/master/lib/puppet/file_serving/base.rb) + + # Puppet 2.7 and beyond will have Puppet::Util.absolute_path? Fall back to a back-ported implementation otherwise. + if Puppet::Util.respond_to?(:absolute_path?) then + unless Puppet::Util.absolute_path?(arg, :posix) or Puppet::Util.absolute_path?(arg, :windows) + raise Puppet::ParseError, ("#{arg.inspect} is not an absolute path.") + end + else + # This code back-ported from 2.7.x's lib/puppet/util.rb Puppet::Util.absolute_path? + # Determine in a platform-specific way whether a path is absolute. This + # defaults to the local platform if none is specified. + # Escape once for the string literal, and once for the regex. + slash = '[\\\\/]' + name = '[^\\\\/]+' + regexes = { + :windows => %r!^(([A-Z]:#{slash})|(#{slash}#{slash}#{name}#{slash}#{name})|(#{slash}#{slash}\?#{slash}#{name}))!i, + :posix => %r!^/!, + } + + rval = (!!(arg =~ regexes[:posix])) || (!!(arg =~ regexes[:windows])) + rval or raise Puppet::ParseError, ("#{arg.inspect} is not an absolute path.") + end + end + end +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/validate_array.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/validate_array.rb new file mode 100644 index 00000000000..34b511825cc --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/validate_array.rb @@ -0,0 +1,33 @@ +module Puppet::Parser::Functions + + newfunction(:validate_array, :doc => <<-'ENDHEREDOC') do |args| + Validate that all passed values are array data structures. Abort catalog + compilation if any value fails this check. + + The following values will pass: + + $my_array = [ 'one', 'two' ] + validate_array($my_array) + + The following values will fail, causing compilation to abort: + + validate_array(true) + validate_array('some_string') + $undefined = undef + validate_array($undefined) + + ENDHEREDOC + + unless args.length > 0 then + raise Puppet::ParseError, ("validate_array(): wrong number of arguments (#{args.length}; must be > 0)") + end + + args.each do |arg| + unless arg.is_a?(Array) + raise Puppet::ParseError, ("#{arg.inspect} is not an Array. It looks to be a #{arg.class}") + end + end + + end + +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/validate_augeas.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/validate_augeas.rb new file mode 100644 index 00000000000..154d66091cc --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/validate_augeas.rb @@ -0,0 +1,81 @@ +module Puppet::Parser::Functions + newfunction(:validate_augeas, :doc => <<-'ENDHEREDOC') do |args| + Perform validation of a string using an Augeas lens + The first argument of this function should be a string to + test, and the second argument should be the name of the Augeas lens to use. + If Augeas fails to parse the string with the lens, the compilation will + abort with a parse error. + + A third argument can be specified, listing paths which should + not be found in the file. The `$file` variable points to the location + of the temporary file being tested in the Augeas tree. + + For example, if you want to make sure your passwd content never contains + a user `foo`, you could write: + + validate_augeas($passwdcontent, 'Passwd.lns', ['$file/foo']) + + Or if you wanted to ensure that no users used the '/bin/barsh' shell, + you could use: + + validate_augeas($passwdcontent, 'Passwd.lns', ['$file/*[shell="/bin/barsh"]'] + + If a fourth argument is specified, this will be the error message raised and + seen by the user. + + A helpful error message can be returned like this: + + validate_augeas($sudoerscontent, 'Sudoers.lns', [], 'Failed to validate sudoers content with Augeas') + + ENDHEREDOC + unless Puppet.features.augeas? + raise Puppet::ParseError, ("validate_augeas(): this function requires the augeas feature. See http://projects.puppetlabs.com/projects/puppet/wiki/Puppet_Augeas#Pre-requisites for how to activate it.") + end + + if (args.length < 2) or (args.length > 4) then + raise Puppet::ParseError, ("validate_augeas(): wrong number of arguments (#{args.length}; must be 2, 3, or 4)") + end + + msg = args[3] || "validate_augeas(): Failed to validate content against #{args[1].inspect}" + + require 'augeas' + aug = Augeas::open(nil, nil, Augeas::NO_MODL_AUTOLOAD) + begin + content = args[0] + + # Test content in a temporary file + tmpfile = Tempfile.new("validate_augeas") + begin + tmpfile.write(content) + ensure + tmpfile.close + end + + # Check for syntax + lens = args[1] + aug.transform( + :lens => lens, + :name => 'Validate_augeas', + :incl => tmpfile.path + ) + aug.load! + + unless aug.match("/augeas/files#{tmpfile.path}//error").empty? + error = aug.get("/augeas/files#{tmpfile.path}//error/message") + msg += " with error: #{error}" + raise Puppet::ParseError, (msg) + end + + # Launch unit tests + tests = args[2] || [] + aug.defvar('file', "/files#{tmpfile.path}") + tests.each do |t| + msg += " testing path #{t}" + raise Puppet::ParseError, (msg) unless aug.match(t).empty? + end + ensure + aug.close + tmpfile.unlink + end + end +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/validate_bool.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/validate_bool.rb new file mode 100644 index 00000000000..59a08056b09 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/validate_bool.rb @@ -0,0 +1,34 @@ +module Puppet::Parser::Functions + + newfunction(:validate_bool, :doc => <<-'ENDHEREDOC') do |args| + Validate that all passed values are either true or false. Abort catalog + compilation if any value fails this check. + + The following values will pass: + + $iamtrue = true + validate_bool(true) + validate_bool(true, true, false, $iamtrue) + + The following values will fail, causing compilation to abort: + + $some_array = [ true ] + validate_bool("false") + validate_bool("true") + validate_bool($some_array) + + ENDHEREDOC + + unless args.length > 0 then + raise Puppet::ParseError, ("validate_bool(): wrong number of arguments (#{args.length}; must be > 0)") + end + + args.each do |arg| + unless function_is_bool([arg]) + raise Puppet::ParseError, ("#{arg.inspect} is not a boolean. It looks to be a #{arg.class}") + end + end + + end + +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/validate_cmd.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/validate_cmd.rb new file mode 100644 index 00000000000..2ebe91cf78e --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/validate_cmd.rb @@ -0,0 +1,48 @@ +require 'puppet/util/execution' + +module Puppet::Parser::Functions + newfunction(:validate_cmd, :doc => <<-'ENDHEREDOC') do |args| + Perform validation of a string with an external command. + The first argument of this function should be a string to + test, and the second argument should be a path to a test command + taking a file as last argument. If the command, launched against + a tempfile containing the passed string, returns a non-null value, + compilation will abort with a parse error. + + If a third argument is specified, this will be the error message raised and + seen by the user. + + A helpful error message can be returned like this: + + Example: + + validate_cmd($sudoerscontent, '/usr/sbin/visudo -c -f', 'Visudo failed to validate sudoers content') + + ENDHEREDOC + if (args.length < 2) or (args.length > 3) then + raise Puppet::ParseError, ("validate_cmd(): wrong number of arguments (#{args.length}; must be 2 or 3)") + end + + msg = args[2] || "validate_cmd(): failed to validate content with command #{args[1].inspect}" + + content = args[0] + checkscript = args[1] + + # Test content in a temporary file + tmpfile = Tempfile.new("validate_cmd") + begin + tmpfile.write(content) + tmpfile.close + if Puppet::Util::Execution.respond_to?('execute') + Puppet::Util::Execution.execute("#{checkscript} #{tmpfile.path}") + else + Puppet::Util.execute("#{checkscript} #{tmpfile.path}") + end + rescue Puppet::ExecutionFailure => detail + msg += "\n#{detail}" + raise Puppet::ParseError, msg + ensure + tmpfile.unlink + end + end +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/validate_hash.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/validate_hash.rb new file mode 100644 index 00000000000..9bdd543283d --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/validate_hash.rb @@ -0,0 +1,33 @@ +module Puppet::Parser::Functions + + newfunction(:validate_hash, :doc => <<-'ENDHEREDOC') do |args| + Validate that all passed values are hash data structures. Abort catalog + compilation if any value fails this check. + + The following values will pass: + + $my_hash = { 'one' => 'two' } + validate_hash($my_hash) + + The following values will fail, causing compilation to abort: + + validate_hash(true) + validate_hash('some_string') + $undefined = undef + validate_hash($undefined) + + ENDHEREDOC + + unless args.length > 0 then + raise Puppet::ParseError, ("validate_hash(): wrong number of arguments (#{args.length}; must be > 0)") + end + + args.each do |arg| + unless arg.is_a?(Hash) + raise Puppet::ParseError, ("#{arg.inspect} is not a Hash. It looks to be a #{arg.class}") + end + end + + end + +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/validate_ipv4_address.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/validate_ipv4_address.rb new file mode 100644 index 00000000000..fc02748e816 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/validate_ipv4_address.rb @@ -0,0 +1,48 @@ +module Puppet::Parser::Functions + + newfunction(:validate_ipv4_address, :doc => <<-ENDHEREDOC + Validate that all values passed are valid IPv4 addresses. + Fail compilation if any value fails this check. + + The following values will pass: + + $my_ip = "1.2.3.4" + validate_ipv4_address($my_ip) + validate_bool("8.8.8.8", "172.16.0.1", $my_ip) + + The following values will fail, causing compilation to abort: + + $some_array = [ 1, true, false, "garbage string", "3ffe:505:2" ] + validate_ipv4_address($some_array) + + ENDHEREDOC + ) do |args| + + require "ipaddr" + rescuable_exceptions = [ ArgumentError ] + + if defined?(IPAddr::InvalidAddressError) + rescuable_exceptions << IPAddr::InvalidAddressError + end + + unless args.length > 0 then + raise Puppet::ParseError, ("validate_ipv4_address(): wrong number of arguments (#{args.length}; must be > 0)") + end + + args.each do |arg| + unless arg.is_a?(String) + raise Puppet::ParseError, "#{arg.inspect} is not a string." + end + + begin + unless IPAddr.new(arg).ipv4? + raise Puppet::ParseError, "#{arg.inspect} is not a valid IPv4 address." + end + rescue *rescuable_exceptions + raise Puppet::ParseError, "#{arg.inspect} is not a valid IPv4 address." + end + end + + end + +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/validate_ipv6_address.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/validate_ipv6_address.rb new file mode 100644 index 00000000000..b0f2558df77 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/validate_ipv6_address.rb @@ -0,0 +1,49 @@ +module Puppet::Parser::Functions + + newfunction(:validate_ipv6_address, :doc => <<-ENDHEREDOC + Validate that all values passed are valid IPv6 addresses. + Fail compilation if any value fails this check. + + The following values will pass: + + $my_ip = "3ffe:505:2" + validate_ipv6_address(1) + validate_ipv6_address($my_ip) + validate_bool("fe80::baf6:b1ff:fe19:7507", $my_ip) + + The following values will fail, causing compilation to abort: + + $some_array = [ true, false, "garbage string", "1.2.3.4" ] + validate_ipv6_address($some_array) + + ENDHEREDOC + ) do |args| + + require "ipaddr" + rescuable_exceptions = [ ArgumentError ] + + if defined?(IPAddr::InvalidAddressError) + rescuable_exceptions << IPAddr::InvalidAddressError + end + + unless args.length > 0 then + raise Puppet::ParseError, ("validate_ipv6_address(): wrong number of arguments (#{args.length}; must be > 0)") + end + + args.each do |arg| + unless arg.is_a?(String) + raise Puppet::ParseError, "#{arg.inspect} is not a string." + end + + begin + unless IPAddr.new(arg).ipv6? + raise Puppet::ParseError, "#{arg.inspect} is not a valid IPv6 address." + end + rescue *rescuable_exceptions + raise Puppet::ParseError, "#{arg.inspect} is not a valid IPv6 address." + end + end + + end + +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/validate_re.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/validate_re.rb new file mode 100644 index 00000000000..ca25a702c58 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/validate_re.rb @@ -0,0 +1,40 @@ +module Puppet::Parser::Functions + newfunction(:validate_re, :doc => <<-'ENDHEREDOC') do |args| + Perform simple validation of a string against one or more regular + expressions. The first argument of this function should be a string to + test, and the second argument should be a stringified regular expression + (without the // delimiters) or an array of regular expressions. If none + of the regular expressions match the string passed in, compilation will + abort with a parse error. + + If a third argument is specified, this will be the error message raised and + seen by the user. + + The following strings will validate against the regular expressions: + + validate_re('one', '^one$') + validate_re('one', [ '^one', '^two' ]) + + The following strings will fail to validate, causing compilation to abort: + + validate_re('one', [ '^two', '^three' ]) + + A helpful error message can be returned like this: + + validate_re($::puppetversion, '^2.7', 'The $puppetversion fact value does not match 2.7') + + ENDHEREDOC + if (args.length < 2) or (args.length > 3) then + raise Puppet::ParseError, ("validate_re(): wrong number of arguments (#{args.length}; must be 2 or 3)") + end + + msg = args[2] || "validate_re(): #{args[0].inspect} does not match #{args[1].inspect}" + + # We're using a flattened array here because we can't call String#any? in + # Ruby 1.9 like we can in Ruby 1.8 + raise Puppet::ParseError, (msg) unless [args[1]].flatten.any? do |re_str| + args[0] =~ Regexp.compile(re_str) + end + + end +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/validate_slength.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/validate_slength.rb new file mode 100644 index 00000000000..7d534f3703e --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/validate_slength.rb @@ -0,0 +1,71 @@ +module Puppet::Parser::Functions + + newfunction(:validate_slength, :doc => <<-'ENDHEREDOC') do |args| + Validate that the first argument is a string (or an array of strings), and + less/equal to than the length of the second argument. An optional third + parameter can be given a the minimum length. It fails if the first + argument is not a string or array of strings, and if arg 2 and arg 3 are + not convertable to a number. + + The following values will pass: + + validate_slength("discombobulate",17) + validate_slength(["discombobulate","moo"],17) + validate_slength(["discombobulate","moo"],17,3) + + The following valueis will not: + + validate_slength("discombobulate",1) + validate_slength(["discombobulate","thermometer"],5) + validate_slength(["discombobulate","moo"],17,10) + + ENDHEREDOC + + raise Puppet::ParseError, "validate_slength(): Wrong number of arguments (#{args.length}; must be 2 or 3)" unless args.length == 2 or args.length == 3 + + input, max_length, min_length = *args + + begin + max_length = Integer(max_length) + raise ArgumentError if max_length <= 0 + rescue ArgumentError, TypeError + raise Puppet::ParseError, "validate_slength(): Expected second argument to be a positive Numeric, got #{max_length}:#{max_length.class}" + end + + if min_length + begin + min_length = Integer(min_length) + raise ArgumentError if min_length < 0 + rescue ArgumentError, TypeError + raise Puppet::ParseError, "validate_slength(): Expected third argument to be unset or a positive Numeric, got #{min_length}:#{min_length.class}" + end + else + min_length = 0 + end + + if min_length > max_length + raise Puppet::ParseError, "validate_slength(): Expected second argument to be larger than third argument" + end + + validator = lambda do |str| + unless str.length <= max_length and str.length >= min_length + raise Puppet::ParseError, "validate_slength(): Expected length of #{input.inspect} to be between #{min_length} and #{max_length}, was #{input.length}" + end + end + + case input + when String + validator.call(input) + when Array + input.each_with_index do |arg, pos| + if arg.is_a? String + validator.call(arg) + else + raise Puppet::ParseError, "validate_slength(): Expected element at array position #{pos} to be a String, got #{arg.class}" + end + end + else + raise Puppet::ParseError, "validate_slength(): Expected first argument to be a String or Array, got #{input.class}" + end + end +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/validate_string.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/validate_string.rb new file mode 100644 index 00000000000..e667794a679 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/validate_string.rb @@ -0,0 +1,33 @@ +module Puppet::Parser::Functions + + newfunction(:validate_string, :doc => <<-'ENDHEREDOC') do |args| + Validate that all passed values are string data structures. Abort catalog + compilation if any value fails this check. + + The following values will pass: + + $my_string = "one two" + validate_string($my_string, 'three') + + The following values will fail, causing compilation to abort: + + validate_string(true) + validate_string([ 'some', 'array' ]) + $undefined = undef + validate_string($undefined) + + ENDHEREDOC + + unless args.length > 0 then + raise Puppet::ParseError, ("validate_string(): wrong number of arguments (#{args.length}; must be > 0)") + end + + args.each do |arg| + unless arg.is_a?(String) + raise Puppet::ParseError, ("#{arg.inspect} is not a string. It looks to be a #{arg.class}") + end + end + + end + +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/values.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/values.rb new file mode 100644 index 00000000000..16067561b40 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/values.rb @@ -0,0 +1,39 @@ +# +# values.rb +# + +module Puppet::Parser::Functions + newfunction(:values, :type => :rvalue, :doc => <<-EOS +When given a hash this function will return the values of that hash. + +*Examples:* + + $hash = { + 'a' => 1, + 'b' => 2, + 'c' => 3, + } + values($hash) + +This example would return: + + [1,2,3] + EOS + ) do |arguments| + + raise(Puppet::ParseError, "values(): Wrong number of arguments " + + "given (#{arguments.size} for 1)") if arguments.size < 1 + + hash = arguments[0] + + unless hash.is_a?(Hash) + raise(Puppet::ParseError, 'values(): Requires hash to work with') + end + + result = hash.values + + return result + end +end + +# vim: set ts=2 sw=2 et : diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/values_at.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/values_at.rb new file mode 100644 index 00000000000..d3e69d97fc1 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/values_at.rb @@ -0,0 +1,98 @@ +# +# values_at.rb +# + +module Puppet::Parser::Functions + newfunction(:values_at, :type => :rvalue, :doc => <<-EOS +Finds value inside an array based on location. + +The first argument is the array you want to analyze, and the second element can +be a combination of: + +* A single numeric index +* A range in the form of 'start-stop' (eg. 4-9) +* An array combining the above + +*Examples*: + + values_at(['a','b','c'], 2) + +Would return ['c']. + + values_at(['a','b','c'], ["0-1"]) + +Would return ['a','b']. + + values_at(['a','b','c','d','e'], [0, "2-3"]) + +Would return ['a','c','d']. + EOS + ) do |arguments| + + raise(Puppet::ParseError, "values_at(): Wrong number of " + + "arguments given (#{arguments.size} for 2)") if arguments.size < 2 + + array = arguments.shift + + unless array.is_a?(Array) + raise(Puppet::ParseError, 'values_at(): Requires array to work with') + end + + indices = [arguments.shift].flatten() # Get them all ... Pokemon ... + + if not indices or indices.empty? + raise(Puppet::ParseError, 'values_at(): You must provide ' + + 'at least one positive index to collect') + end + + result = [] + indices_list = [] + + indices.each do |i| + if m = i.match(/^(\d+)(\.\.\.?|\-)(\d+)$/) + start = m[1].to_i + stop = m[3].to_i + + type = m[2] + + if start > stop + raise(Puppet::ParseError, 'values_at(): Stop index in ' + + 'given indices range is smaller than the start index') + elsif stop > array.size - 1 # First element is at index 0 is it not? + raise(Puppet::ParseError, 'values_at(): Stop index in ' + + 'given indices range exceeds array size') + end + + range = case type + when /^(\.\.|\-)$/ then (start .. stop) + when /^(\.\.\.)$/ then (start ... stop) # Exclusive of last element ... + end + + range.each { |i| indices_list << i.to_i } + else + # Only positive numbers allowed in this case ... + if not i.match(/^\d+$/) + raise(Puppet::ParseError, 'values_at(): Unknown format ' + + 'of given index') + end + + # In Puppet numbers are often string-encoded ... + i = i.to_i + + if i > array.size - 1 # Same story. First element is at index 0 ... + raise(Puppet::ParseError, 'values_at(): Given index ' + + 'exceeds array size') + end + + indices_list << i + end + end + + # We remove nil values as they make no sense in Puppet DSL ... + result = indices_list.collect { |i| array[i] }.compact + + return result + end +end + +# vim: set ts=2 sw=2 et : diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/zip.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/zip.rb new file mode 100644 index 00000000000..2b56e9ca070 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/zip.rb @@ -0,0 +1,65 @@ +# +# zip.rb +# + +module Puppet::Parser::Functions + newfunction(:zip, :type => :rvalue, :doc => <<-EOS +Takes one element from first array and merges corresponding elements from second array. This generates a sequence of n-element arrays, where n is one more than the count of arguments. + +*Example:* + + zip(['1','2','3'],['4','5','6']) + +Would result in: + + ["1", "4"], ["2", "5"], ["3", "6"] + EOS + ) do |arguments| + + # Technically we support three arguments but only first is mandatory ... + raise(Puppet::ParseError, "zip(): Wrong number of arguments " + + "given (#{arguments.size} for 2)") if arguments.size < 2 + + a = arguments[0] + b = arguments[1] + + unless a.is_a?(Array) and b.is_a?(Array) + raise(Puppet::ParseError, 'zip(): Requires array to work with') + end + + flatten = arguments[2] if arguments[2] + + if flatten + klass = flatten.class + + # We can have either true or false, or string which resembles boolean ... + unless [FalseClass, TrueClass, String].include?(klass) + raise(Puppet::ParseError, 'zip(): Requires either ' + + 'boolean or string to work with') + end + + if flatten.is_a?(String) + # We consider all the yes, no, y, n and so on too ... + flatten = case flatten + # + # This is how undef looks like in Puppet ... + # We yield false in this case. + # + when /^$/, '' then false # Empty string will be false ... + when /^(1|t|y|true|yes)$/ then true + when /^(0|f|n|false|no)$/ then false + when /^(undef|undefined)$/ then false # This is not likely to happen ... + else + raise(Puppet::ParseError, 'zip(): Unknown type of boolean given') + end + end + end + + result = a.zip(b) + result = flatten ? result.flatten : result + + return result + end +end + +# vim: set ts=2 sw=2 et : diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/lib/puppet/provider/file_line/ruby.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/lib/puppet/provider/file_line/ruby.rb new file mode 100644 index 00000000000..94e7fac9196 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/lib/puppet/provider/file_line/ruby.rb @@ -0,0 +1,83 @@ +Puppet::Type.type(:file_line).provide(:ruby) do + def exists? + lines.find do |line| + line.chomp == resource[:line].chomp + end + end + + def create + if resource[:match] + handle_create_with_match + elsif resource[:after] + handle_create_with_after + else + append_line + end + end + + def destroy + local_lines = lines + File.open(resource[:path],'w') do |fh| + fh.write(local_lines.reject{|l| l.chomp == resource[:line] }.join('')) + end + end + + private + def lines + # If this type is ever used with very large files, we should + # write this in a different way, using a temp + # file; for now assuming that this type is only used on + # small-ish config files that can fit into memory without + # too much trouble. + @lines ||= File.readlines(resource[:path]) + end + + def handle_create_with_match() + regex = resource[:match] ? Regexp.new(resource[:match]) : nil + match_count = lines.select { |l| regex.match(l) }.size + if match_count > 1 && resource[:multiple].to_s != 'true' + raise Puppet::Error, "More than one line in file '#{resource[:path]}' matches pattern '#{resource[:match]}'" + end + File.open(resource[:path], 'w') do |fh| + lines.each do |l| + fh.puts(regex.match(l) ? resource[:line] : l) + end + + if (match_count == 0) + fh.puts(resource[:line]) + end + end + end + + def handle_create_with_after + regex = Regexp.new(resource[:after]) + + count = lines.count {|l| l.match(regex)} + + case count + when 1 # find the line to put our line after + File.open(resource[:path], 'w') do |fh| + lines.each do |l| + fh.puts(l) + if regex.match(l) then + fh.puts(resource[:line]) + end + end + end + when 0 # append the line to the end of the file + append_line + else + raise Puppet::Error, "#{count} lines match pattern '#{resource[:after]}' in file '#{resource[:path]}'. One or no line must match the pattern." + end + end + + ## + # append the line to the file. + # + # @api private + def append_line + File.open(resource[:path], 'a') do |fh| + fh.puts resource[:line] + end + end +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/lib/puppet/type/anchor.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/lib/puppet/type/anchor.rb new file mode 100644 index 00000000000..fe1e5aa1952 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/lib/puppet/type/anchor.rb @@ -0,0 +1,46 @@ +Puppet::Type.newtype(:anchor) do + desc <<-'ENDOFDESC' + A simple resource type intended to be used as an anchor in a composite class. + + In Puppet 2.6, when a class declares another class, the resources in the + interior class are not contained by the exterior class. This interacts badly + with the pattern of composing complex modules from smaller classes, as it + makes it impossible for end users to specify order relationships between the + exterior class and other modules. + + The anchor type lets you work around this. By sandwiching any interior + classes between two no-op resources that _are_ contained by the exterior + class, you can ensure that all resources in the module are contained. + + class ntp { + # These classes will have the correct order relationship with each + # other. However, without anchors, they won't have any order + # relationship to Class['ntp']. + class { 'ntp::package': } + -> class { 'ntp::config': } + -> class { 'ntp::service': } + + # These two resources "anchor" the composed classes within the ntp + # class. + anchor { 'ntp::begin': } -> Class['ntp::package'] + Class['ntp::service'] -> anchor { 'ntp::end': } + } + + This allows the end user of the ntp module to establish require and before + relationships with Class['ntp']: + + class { 'ntp': } -> class { 'mcollective': } + class { 'mcollective': } -> class { 'ntp': } + + ENDOFDESC + + newparam :name do + desc "The name of the anchor resource." + end + + def refresh + # We don't do anything with them, but we need this to + # show that we are "refresh aware" and not break the + # chain of propagation. + end +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/lib/puppet/type/file_line.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/lib/puppet/type/file_line.rb new file mode 100644 index 00000000000..323fc4c9c7f --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/lib/puppet/type/file_line.rb @@ -0,0 +1,79 @@ +Puppet::Type.newtype(:file_line) do + + desc <<-EOT + Ensures that a given line is contained within a file. The implementation + matches the full line, including whitespace at the beginning and end. If + the line is not contained in the given file, Puppet will add the line to + ensure the desired state. Multiple resources may be declared to manage + multiple lines in the same file. + + Example: + + file_line { 'sudo_rule': + path => '/etc/sudoers', + line => '%sudo ALL=(ALL) ALL', + } + file_line { 'sudo_rule_nopw': + path => '/etc/sudoers', + line => '%sudonopw ALL=(ALL) NOPASSWD: ALL', + } + + In this example, Puppet will ensure both of the specified lines are + contained in the file /etc/sudoers. + + EOT + + ensurable do + defaultvalues + defaultto :present + end + + newparam(:name, :namevar => true) do + desc 'An arbitrary name used as the identity of the resource.' + end + + newparam(:match) do + desc 'An optional regular expression to run against existing lines in the file;\n' + + 'if a match is found, we replace that line rather than adding a new line.' + end + + newparam(:multiple) do + desc 'An optional value to determine if match can change multiple lines.' + newvalues(true, false) + end + + newparam(:after) do + desc 'An optional value used to specify the line after which we will add any new lines. (Existing lines are added in place)' + end + + newparam(:line) do + desc 'The line to be appended to the file located by the path parameter.' + end + + newparam(:path) do + desc 'The file Puppet will ensure contains the line specified by the line parameter.' + validate do |value| + unless (Puppet.features.posix? and value =~ /^\//) or (Puppet.features.microsoft_windows? and (value =~ /^.:\// or value =~ /^\/\/[^\/]+\/[^\/]+/)) + raise(Puppet::Error, "File paths must be fully qualified, not '#{value}'") + end + end + end + + # Autorequire the file resource if it's being managed + autorequire(:file) do + self[:path] + end + + validate do + unless self[:line] and self[:path] + raise(Puppet::Error, "Both line and path are required attributes") + end + + if (self[:match]) + unless Regexp.new(self[:match]).match(self[:line]) + raise(Puppet::Error, "When providing a 'match' parameter, the value must be a regex that matches against the value of your 'line' parameter") + end + end + + end +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/manifests/init.pp b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/manifests/init.pp new file mode 100644 index 00000000000..500ad770d53 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/manifests/init.pp @@ -0,0 +1,20 @@ +# Class: stdlib +# +# This module manages stdlib. Most of stdlib's features are automatically +# loaded by Puppet, but this class should be declared in order to use the +# standardized run stages. +# +# Parameters: none +# +# Actions: +# +# Declares all other classes in the stdlib module. Currently, this consists +# of stdlib::stages. +# +# Requires: nothing +# +class stdlib { + + class { 'stdlib::stages': } + +} diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/manifests/stages.pp b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/manifests/stages.pp new file mode 100644 index 00000000000..eb15fd650d0 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/manifests/stages.pp @@ -0,0 +1,43 @@ +# Class: stdlib::stages +# +# This class manages a standard set of run stages for Puppet. It is managed by +# the stdlib class, and should not be declared independently. +# +# The high level stages are (in order): +# +# * setup +# * main +# * runtime +# * setup_infra +# * deploy_infra +# * setup_app +# * deploy_app +# * deploy +# +# Parameters: none +# +# Actions: +# +# Declares various run-stages for deploying infrastructure, +# language runtimes, and application layers. +# +# Requires: nothing +# +# Sample Usage: +# +# node default { +# include stdlib +# class { java: stage => 'runtime' } +# } +# +class stdlib::stages { + + stage { 'setup': before => Stage['main'] } + stage { 'runtime': require => Stage['main'] } + -> stage { 'setup_infra': } + -> stage { 'deploy_infra': } + -> stage { 'setup_app': } + -> stage { 'deploy_app': } + -> stage { 'deploy': } + +} diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/metadata.json b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/metadata.json new file mode 100644 index 00000000000..e3bacbe75f5 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/metadata.json @@ -0,0 +1,509 @@ +{ + "operatingsystem_support": [ + { + "operatingsystem": "RedHat", + "operatingsystemrelease": [ + "4", + "5", + "6" + ] + }, + { + "operatingsystem": "CentOS", + "operatingsystemrelease": [ + "4", + "5", + "6" + ] + }, + { + "operatingsystem": "OracleLinux", + "operatingsystemrelease": [ + "4", + "5", + "6" + ] + }, + { + "operatingsystem": "Scientific", + "operatingsystemrelease": [ + "4", + "5", + "6" + ] + }, + { + "operatingsystem": "SLES", + "operatingsystemrelease": [ + "11 SP1" + ] + }, + { + "operatingsystem": "Debian", + "operatingsystemrelease": [ + "6", + "7" + ] + }, + { + "operatingsystem": "Ubuntu", + "operatingsystemrelease": [ + "10.04", + "12.04" + ] + }, + { + "operatingsystem": "Solaris", + "operatingsystemrelease": [ + "10", + "11" + ] + }, + { + "operatingsystem": "Windows", + "operatingsystemrelease": [ + "Server 2003", + "Server 2003 R2", + "Server 2008", + "Server 2008 R2", + "Server 2012", + "Server 2012 R2", + "7", + "8" + ] + }, + { + "operatingsystem": "AIX", + "operatingsystemrelease": [ + "5.3", + "6.1", + "7.1" + ] + } + ], + "requirements": [ + { + "name": "pe", + "version_requirement": "3.2.x" + }, + { + "name": "puppet", + "version_requirement": ">=2.7.20 <4.0.0" + } + ], + "name": "puppetlabs-stdlib", + "version": "4.2.1", + "source": "git://github.com/puppetlabs/puppetlabs-stdlib.git", + "author": "puppetlabs", + "license": "Apache 2.0", + "summary": "Puppet Module Standard Library", + "description": "Standard Library for Puppet Modules", + "project_page": "https://github.com/puppetlabs/puppetlabs-stdlib", + "dependencies": [ + + ], + "types": [ + { + "name": "anchor", + "doc": "A simple resource type intended to be used as an anchor in a composite class.\n\nIn Puppet 2.6, when a class declares another class, the resources in the\ninterior class are not contained by the exterior class. This interacts badly\nwith the pattern of composing complex modules from smaller classes, as it\nmakes it impossible for end users to specify order relationships between the\nexterior class and other modules.\n\nThe anchor type lets you work around this. By sandwiching any interior\nclasses between two no-op resources that _are_ contained by the exterior\nclass, you can ensure that all resources in the module are contained.\n\n class ntp {\n # These classes will have the correct order relationship with each\n # other. However, without anchors, they won't have any order\n # relationship to Class['ntp'].\n class { 'ntp::package': }\n -> class { 'ntp::config': }\n -> class { 'ntp::service': }\n\n # These two resources \"anchor\" the composed classes within the ntp\n # class.\n anchor { 'ntp::begin': } -> Class['ntp::package']\n Class['ntp::service'] -> anchor { 'ntp::end': }\n }\n\nThis allows the end user of the ntp module to establish require and before\nrelationships with Class['ntp']:\n\n class { 'ntp': } -> class { 'mcollective': }\n class { 'mcollective': } -> class { 'ntp': }", + "properties": [ + + ], + "parameters": [ + { + "name": "name", + "doc": "The name of the anchor resource.\n\n" + } + ] + }, + { + "name": "file_line", + "doc": "Ensures that a given line is contained within a file. The implementation\nmatches the full line, including whitespace at the beginning and end. If\nthe line is not contained in the given file, Puppet will add the line to\nensure the desired state. Multiple resources may be declared to manage\nmultiple lines in the same file.\n\nExample:\n\n file_line { 'sudo_rule':\n path => '/etc/sudoers',\n line => '%sudo ALL=(ALL) ALL',\n }\n file_line { 'sudo_rule_nopw':\n path => '/etc/sudoers',\n line => '%sudonopw ALL=(ALL) NOPASSWD: ALL',\n }\n\nIn this example, Puppet will ensure both of the specified lines are\ncontained in the file /etc/sudoers.", + "properties": [ + { + "name": "ensure", + "doc": "The basic property that the resource should be in.\n\nValid values are `present`, `absent`. " + } + ], + "parameters": [ + { + "name": "name", + "doc": "An arbitrary name used as the identity of the resource.\n\n" + }, + { + "name": "match", + "doc": "An optional regular expression to run against existing lines in the file;\\nif a match is found, we replace that line rather than adding a new line.\n\n" + }, + { + "name": "multiple", + "doc": "An optional value to determine if match can change multiple lines.\n\nValid values are `true`, `false`. " + }, + { + "name": "after", + "doc": "An optional value used to specify the line after which we will add any new lines. (Existing lines are added in place)\n\n" + }, + { + "name": "line", + "doc": "The line to be appended to the file located by the path parameter.\n\n" + }, + { + "name": "path", + "doc": "The file Puppet will ensure contains the line specified by the line parameter.\n\n" + } + ], + "providers": [ + { + "name": "ruby", + "doc": "" + } + ] + } + ], + "checksums": { + "CHANGELOG.md": "82acb10a79b6dba5b3a8d464e0c9fecf", + "CONTRIBUTING.md": "7fcaaec4913b3d7c123510329ecc4b2d", + "Gemfile": "38895f95212fe38cf47474a05cff2ad2", + "Gemfile.lock": "d30f1ca4792bd19fa9561557f4982a55", + "LICENSE": "38a048b9d82e713d4e1b2573e370a756", + "Modulefile": "9786075c3cc32e7ba85888727e37851f", + "README.markdown": "21410cab41d903b5c39c55739846b6b3", + "README_DEVELOPER.markdown": "220a8b28521b5c5d2ea87c4ddb511165", + "README_SPECS.markdown": "82bb4c6abbb711f40778b162ec0070c1", + "RELEASE_PROCESS.markdown": "94b92bc99ac4106ba1a74d5c04e520f9", + "Rakefile": "dfa334598bfd087adf11533a72d71106", + "lib/facter/facter_dot_d.rb": "1f1fcf1bde3443e42a445d3573602304", + "lib/facter/pe_version.rb": "4a9353952963b011759f3e6652a10da5", + "lib/facter/puppet_vardir.rb": "c7ddc97e8a84ded3dd93baa5b9b3283d", + "lib/facter/root_home.rb": "d9c8276acdceb7340d95f60c36dcdcc5", + "lib/facter/util/puppet_settings.rb": "9f1d2593d0ae56bfca89d4b9266aeee1", + "lib/puppet/parser/functions/abs.rb": "32161bd0435fdfc2aec2fc559d2b454b", + "lib/puppet/parser/functions/any2array.rb": "a81e71d6b67a551d38770ba9a1948a75", + "lib/puppet/parser/functions/base64.rb": "ae25adf92295df67ebd9edfabc9ecdd6", + "lib/puppet/parser/functions/bool2num.rb": "8e627eee990e811e35e7e838c586bd77", + "lib/puppet/parser/functions/capitalize.rb": "14481fc8c7c83fe002066ebcf6722f17", + "lib/puppet/parser/functions/chomp.rb": "719d46923d75251f7b6b68b6e015cccc", + "lib/puppet/parser/functions/chop.rb": "4691a56e6064b792ed4575e4ad3f3d20", + "lib/puppet/parser/functions/concat.rb": "c522e67e558336e1ac26b0a3cfeeed2d", + "lib/puppet/parser/functions/count.rb": "9eb74eccd93e2b3c87fd5ea14e329eba", + "lib/puppet/parser/functions/deep_merge.rb": "d83696855578fb81b64b9e92b9c7cc7c", + "lib/puppet/parser/functions/defined_with_params.rb": "ffab4433d03f32b551f2ea024a2948fc", + "lib/puppet/parser/functions/delete.rb": "96e569dac96b8c9387e9303445d73048", + "lib/puppet/parser/functions/delete_at.rb": "6bc24b79390d463d8be95396c963381a", + "lib/puppet/parser/functions/delete_undef_values.rb": "b32d4a3925753b2eb2c318cbd7f14404", + "lib/puppet/parser/functions/delete_values.rb": "39b147f7d369bb5f809044b6341954a2", + "lib/puppet/parser/functions/difference.rb": "e31b95fbaf974cf853a510177368bfb9", + "lib/puppet/parser/functions/dirname.rb": "bef7214eb89db3eb8f7ee5fc9dca0233", + "lib/puppet/parser/functions/downcase.rb": "9204a04c2a168375a38d502db8811bbe", + "lib/puppet/parser/functions/empty.rb": "ae92905c9d94ddca30bf56b7b1dabedf", + "lib/puppet/parser/functions/ensure_packages.rb": "fbed5c0c9bf82b7746e01f15f89d184f", + "lib/puppet/parser/functions/ensure_resource.rb": "6678127386e77bbc0f09db7b5a32ab6a", + "lib/puppet/parser/functions/flatten.rb": "25777b76f9719162a8bab640e5595b7a", + "lib/puppet/parser/functions/floor.rb": "42cad4c689231a51526c55a6f0985d1f", + "lib/puppet/parser/functions/fqdn_rotate.rb": "20743a138c56fc806a35cb7b60137dbc", + "lib/puppet/parser/functions/get_module_path.rb": "d4bf50da25c0b98d26b75354fa1bcc45", + "lib/puppet/parser/functions/getparam.rb": "4dd7a0e35f4a3780dcfc9b19b4e0006e", + "lib/puppet/parser/functions/getvar.rb": "10bf744212947bc6a7bfd2c9836dbd23", + "lib/puppet/parser/functions/grep.rb": "5682995af458b05f3b53dd794c4bf896", + "lib/puppet/parser/functions/has_interface_with.rb": "8d3ebca805dc6edb88b6b7a13d404787", + "lib/puppet/parser/functions/has_ip_address.rb": "ee207f47906455a5aa49c4fb219dd325", + "lib/puppet/parser/functions/has_ip_network.rb": "b4d726c8b2a0afac81ced8a3a28aa731", + "lib/puppet/parser/functions/has_key.rb": "7cd9728c38f0b0065f832dabd62b0e7e", + "lib/puppet/parser/functions/hash.rb": "9d072527dfc7354b69292e9302906530", + "lib/puppet/parser/functions/intersection.rb": "924ac4aceec7b896952166a7ec08fdb1", + "lib/puppet/parser/functions/is_array.rb": "875ca4356cb0d7a10606fb146b4a3d11", + "lib/puppet/parser/functions/is_bool.rb": "e693b7c4b5366cff1380b6e0c7dd7b11", + "lib/puppet/parser/functions/is_domain_name.rb": "cf72726c0fec831eb703ec9deea739eb", + "lib/puppet/parser/functions/is_float.rb": "10e0d3ecf75fac15e415aee79acf70dc", + "lib/puppet/parser/functions/is_function_available.rb": "628428bbcd9313ce09783d9484330e09", + "lib/puppet/parser/functions/is_hash.rb": "8c7d9a05084dab0389d1b779c8a05b1a", + "lib/puppet/parser/functions/is_integer.rb": "c665be82686aa4729959bb42c66a7510", + "lib/puppet/parser/functions/is_ip_address.rb": "a714a736c1560e8739aaacd9030cca00", + "lib/puppet/parser/functions/is_mac_address.rb": "288bd4b38d4df42a83681f13e7eaaee0", + "lib/puppet/parser/functions/is_numeric.rb": "93ddc9d4c0834a5e5e0562d7b3cdce91", + "lib/puppet/parser/functions/is_string.rb": "2bd9a652bbb2668323eee6c57729ff64", + "lib/puppet/parser/functions/join.rb": "a285a05c015ae278608f6454aef211ea", + "lib/puppet/parser/functions/join_keys_to_values.rb": "f29da49531228f6ca5b3aa0df00a14c2", + "lib/puppet/parser/functions/keys.rb": "eb6ac815ea14fbf423580ed903ef7bad", + "lib/puppet/parser/functions/loadyaml.rb": "2b912f257aa078e376d3b3f6a86c2a00", + "lib/puppet/parser/functions/lstrip.rb": "210b103f78622e099f91cc2956b6f741", + "lib/puppet/parser/functions/max.rb": "f652fd0b46ef7d2fbdb42b141f8fdd1d", + "lib/puppet/parser/functions/member.rb": "541e67d06bc4155e79b00843a125e9bc", + "lib/puppet/parser/functions/merge.rb": "f3dcc5c83440cdda2036cce69b61a14b", + "lib/puppet/parser/functions/min.rb": "0d2a1b7e735ab251c5469e735fa3f4c6", + "lib/puppet/parser/functions/num2bool.rb": "605c12fa518c87ed2c66ae153e0686ce", + "lib/puppet/parser/functions/parsejson.rb": "e7f968c34928107b84cd0860daf50ab1", + "lib/puppet/parser/functions/parseyaml.rb": "00f10ec1e2b050e23d80c256061ebdd7", + "lib/puppet/parser/functions/pick.rb": "bf01f13bbfe2318e7f6a302ac7c4433f", + "lib/puppet/parser/functions/pick_default.rb": "ad3ea60262de408767786d37a54d45dc", + "lib/puppet/parser/functions/prefix.rb": "aebbea0290be82a4ae89ddfffbee1125", + "lib/puppet/parser/functions/range.rb": "17a05dbae8f562f882450f9e648d4e2d", + "lib/puppet/parser/functions/reject.rb": "689f6a7c961a55fe9dcd240921f4c7f9", + "lib/puppet/parser/functions/reverse.rb": "1386371c0f5301055fdf99079e862b3e", + "lib/puppet/parser/functions/rstrip.rb": "8a0d69876bdbc88a2054ba41c9c38961", + "lib/puppet/parser/functions/shuffle.rb": "6445e6b4dc62c37b184a60eeaf34414b", + "lib/puppet/parser/functions/size.rb": "8972d48c0f9e487d659bd7326b40b642", + "lib/puppet/parser/functions/sort.rb": "504b033b438461ca4f9764feeb017833", + "lib/puppet/parser/functions/squeeze.rb": "541f85b4203b55c9931d3d6ecd5c75f8", + "lib/puppet/parser/functions/str2bool.rb": "6320f1a50fd28ec027981cd1fb8ffdd0", + "lib/puppet/parser/functions/str2saltedsha512.rb": "49afad7b386be38ce53deaefef326e85", + "lib/puppet/parser/functions/strftime.rb": "e02e01a598ca5d7d6eee0ba22440304a", + "lib/puppet/parser/functions/strip.rb": "273d547c7b05c0598556464dfd12f5fd", + "lib/puppet/parser/functions/suffix.rb": "109279db4180441e75545dbd5f273298", + "lib/puppet/parser/functions/swapcase.rb": "4902f38f0b9292afec66d40fee4b02ec", + "lib/puppet/parser/functions/time.rb": "08d88d52abd1e230e3a2f82107545d48", + "lib/puppet/parser/functions/to_bytes.rb": "83f23c33adbfa42b2a9d9fc2db3daeb4", + "lib/puppet/parser/functions/type.rb": "62f914d6c90662aaae40c5539701be60", + "lib/puppet/parser/functions/union.rb": "137998fe47decf25aede20f0c0155a4c", + "lib/puppet/parser/functions/unique.rb": "217ccce6d23235af92923f50f8556963", + "lib/puppet/parser/functions/upcase.rb": "a5744a74577cfa136fca2835e75888d3", + "lib/puppet/parser/functions/uriescape.rb": "321b8d2c33a5ea48337e1293774db4e0", + "lib/puppet/parser/functions/validate_absolute_path.rb": "385137ac24a2dec6cecc4e6ea75be442", + "lib/puppet/parser/functions/validate_array.rb": "72b29289b8af1cfc3662ef9be78911b8", + "lib/puppet/parser/functions/validate_augeas.rb": "d4acca7b8a9fdada9ae39e5101902cc1", + "lib/puppet/parser/functions/validate_bool.rb": "a712634a000024398b3c6cd4ecc46463", + "lib/puppet/parser/functions/validate_cmd.rb": "78fd21cb3fc52efc3b53ba2b3301de18", + "lib/puppet/parser/functions/validate_hash.rb": "e9cfaca68751524efe16ecf2f958a9a0", + "lib/puppet/parser/functions/validate_ipv4_address.rb": "a8fb6f0ca36aa460d462c07c2af5d5a2", + "lib/puppet/parser/functions/validate_ipv6_address.rb": "4699238e4cad60e7e1428905523eaeb7", + "lib/puppet/parser/functions/validate_re.rb": "c6664b3943bc820415a43f16372dc2a9", + "lib/puppet/parser/functions/validate_slength.rb": "7e67c213509b9383707819cc612b2a29", + "lib/puppet/parser/functions/validate_string.rb": "6afcbc51f83f0714348b8d61e06ea7eb", + "lib/puppet/parser/functions/values.rb": "066a6e4170e5034edb9a80463dff2bb5", + "lib/puppet/parser/functions/values_at.rb": "094ac110ce9f7a5b16d0c80a0cf2243c", + "lib/puppet/parser/functions/zip.rb": "a80782461ed9465f0cd0c010936f1855", + "lib/puppet/provider/file_line/ruby.rb": "10d65268d2d1e75b5dae014974b79d60", + "lib/puppet/type/anchor.rb": "bbd36bb49c3b554f8602d8d3df366c0c", + "lib/puppet/type/file_line.rb": "a1eceef6bd7cbfe99892cf3ee57ef2b4", + "manifests/init.pp": "f2ba5f36e7227ed87bbb69034fc0de8b", + "manifests/stages.pp": "cc6ed1751d334b0ea278c0335c7f0b5a", + "spec/acceptance/abs_spec.rb": "435478ef1ba43a6cca1f7b4db14a4bcc", + "spec/acceptance/any2array_spec.rb": "78187dc3683c8ecd15774d99024de47d", + "spec/acceptance/base64_spec.rb": "1684d5dd176dd5bbd4c3c6b1e64fbcea", + "spec/acceptance/bool2num_spec.rb": "c5e3aadb08a437f181247429f4125bab", + "spec/acceptance/build_csv.rb": "f28ef587de764ade1513091c4906412c", + "spec/acceptance/capitalize_spec.rb": "e77ea2c37144a75a67969c0d0839adfd", + "spec/acceptance/chomp_spec.rb": "fb0862a6b7eeb3c290e280788e705061", + "spec/acceptance/chop_spec.rb": "0bd1065b9c16a54b86adeb4e3be041fb", + "spec/acceptance/concat_spec.rb": "3a0dae19a34bb13d406c8e0ec87d8fe5", + "spec/acceptance/count_spec.rb": "5b35e597ae1051f41431812707d4b502", + "spec/acceptance/deep_merge_spec.rb": "c335a947f1666e185e0210e661f1c78a", + "spec/acceptance/defined_with_params_spec.rb": "f27c54ade9872c63c69316f62b03c119", + "spec/acceptance/delete_at_spec.rb": "9c028b703ee0286565c9877757678f3f", + "spec/acceptance/delete_spec.rb": "31e6dfcb9cc7c16b20d47c00e6a85a1d", + "spec/acceptance/delete_undef_values_spec.rb": "6e6a66aee0c383c843b5f92ef8c8410c", + "spec/acceptance/delete_values_spec.rb": "22c9b4914d4cbc0153aa3862cb4fb50e", + "spec/acceptance/difference_spec.rb": "289f4f1788feaacb304ffd54971c7e7e", + "spec/acceptance/dirname_spec.rb": "84db53878c4400a6c684c924cff05cfc", + "spec/acceptance/downcase_spec.rb": "0f094849b94a94df491ee01186473104", + "spec/acceptance/empty_spec.rb": "35c1f43e8a3e1fe7dd4335ef86e7efcc", + "spec/acceptance/ensure_packages_spec.rb": "ebeaa1624b30f5750cbfdcdce8690640", + "spec/acceptance/ensure_resource_spec.rb": "9e03216abb2431e749be76a4302931df", + "spec/acceptance/flatten_spec.rb": "83fb08cc168a105c1d5d0df66b1d9e84", + "spec/acceptance/floor_spec.rb": "d7267b2914b1da6406224abb7489ca86", + "spec/acceptance/fqdn_rotate_spec.rb": "bc3d0a01f91d2a85f3dbf53daf404fd1", + "spec/acceptance/get_module_path_spec.rb": "6a6552ff8d6d75ce795b0139c68a7993", + "spec/acceptance/getparam_spec.rb": "b62a47524f434b903f9e155ad56959b3", + "spec/acceptance/getvar_spec.rb": "ba2f081a88be97c0e7004a6296294f23", + "spec/acceptance/grep_spec.rb": "98818b8b0557b80d6ff519f70ea7617c", + "spec/acceptance/has_interface_with_spec.rb": "467183aeada0bec74143be6cf0b89a3d", + "spec/acceptance/has_ip_address_spec.rb": "e0369b12725695c528e2d47b8ea2b4d8", + "spec/acceptance/has_ip_network_spec.rb": "ca8dd6faa6df940784a60a49bec1330d", + "spec/acceptance/has_key_spec.rb": "6509a26a0886f7d591eaa926b2f92407", + "spec/acceptance/hash_spec.rb": "1c626457ba056bdd3936e28aa5bf503e", + "spec/acceptance/intersection_spec.rb": "40f586af7f95408a5d4a2882a4aa98f1", + "spec/acceptance/is_array_spec.rb": "c2ff70ce59b90b50a5aed67abaa5399d", + "spec/acceptance/is_bool_spec.rb": "c001fdecff6b0a3c9dc78774987a0b15", + "spec/acceptance/is_domain_name_spec.rb": "63e84285c26d8717fd5d4dda01e3f432", + "spec/acceptance/is_float_spec.rb": "2f0164b4d732166aa46055a2cf7b4ea9", + "spec/acceptance/is_function_available_spec.rb": "7745eba89f8719c9ca7ebf04d5b005f7", + "spec/acceptance/is_hash_spec.rb": "cff723cd8fddac45033af5dc8406d4e4", + "spec/acceptance/is_integer_spec.rb": "c09201d17d3914bba197872897fa3413", + "spec/acceptance/is_ip_address_spec.rb": "aa14cf9abf404c3fe1e761ea957871fe", + "spec/acceptance/is_mac_address_spec.rb": "30ff4c6a63be58daa3568305617ca2a7", + "spec/acceptance/is_numeric_spec.rb": "fb9829c7a1a8d4a58836df6ff4c3386d", + "spec/acceptance/is_string_spec.rb": "df3022de123b72f0022728eb2d8ce857", + "spec/acceptance/join_keys_to_values_spec.rb": "8aa128bbaeea65aab8d92badee3ca2b5", + "spec/acceptance/join_spec.rb": "c6378ed481265152bba9871fc5501ee6", + "spec/acceptance/keys_spec.rb": "20486e3ebee53e50dc9de3b78b9d6ae6", + "spec/acceptance/loadyaml_spec.rb": "5bce9c4b90e73bccdcd4f66fc988676b", + "spec/acceptance/lstrip_spec.rb": "e29ab4039b65660ec2bd76a298adcae0", + "spec/acceptance/max_spec.rb": "209cda4b83d677743afb1a8870330618", + "spec/acceptance/member_spec.rb": "0dac8ec7c7f670fca429fc26cf8ccc14", + "spec/acceptance/merge_spec.rb": "ac61d7627c66565a3a5cbfb2f9db21eb", + "spec/acceptance/min_spec.rb": "152a7db28434a0d0378561d4f64cddcc", + "spec/acceptance/nodesets/centos-6-vcloud.yml": "bdf9ce9d3b0f0b4995666ae9d64d878d", + "spec/acceptance/nodesets/centos-64-x64-pe.yml": "ec075d95760df3d4702abea1ce0a829b", + "spec/acceptance/nodesets/centos-64-x64.yml": "092dd2c588a9f87fa1fb12997c0723ef", + "spec/acceptance/nodesets/default.yml": "3e5c36e6aa5a690229e720f4048bb8af", + "spec/acceptance/nodesets/fedora-18-x64.yml": "80e41b1ee16ea489f53164bfdae58855", + "spec/acceptance/nodesets/sles-11-x64.yml": "44e4c6c15c018333bfa9840a5e702f66", + "spec/acceptance/nodesets/ubuntu-server-10044-x64.yml": "75e86400b7889888dc0781c0ae1a1297", + "spec/acceptance/nodesets/ubuntu-server-12042-x64.yml": "d30d73e34cd50b043c7d14e305955269", + "spec/acceptance/num2bool_spec.rb": "e4a00b913b08c68a689837e9f9336cb2", + "spec/acceptance/parsejson_spec.rb": "ea3973d412ad6f72425fdfac6fbb2bb4", + "spec/acceptance/parseyaml_spec.rb": "278e4f8e1f52e12e05f6ce31f1ffc9f2", + "spec/acceptance/pick_default_spec.rb": "1bc2562380ef6f6cded5ec90a03922be", + "spec/acceptance/pick_spec.rb": "272c54c8f9398f499768331bdb4276ee", + "spec/acceptance/prefix_spec.rb": "da620568c6771e7d492ec1ff697c531c", + "spec/acceptance/range_spec.rb": "65e5b98ceca257658604d988fbec7d03", + "spec/acceptance/reject_spec.rb": "b5185f1a6071c9bdc7aca92e6f899c3e", + "spec/acceptance/reverse_spec.rb": "7bdee543e82532e97bbf7a067140031c", + "spec/acceptance/rstrip_spec.rb": "28a64ceb7cb5ae8a93d31f49816190ab", + "spec/acceptance/shuffle_spec.rb": "451301879512a0ea3f321b5c78993bbf", + "spec/acceptance/size_spec.rb": "ae17d8a55921a0570972200c7c9327e1", + "spec/acceptance/sort_spec.rb": "d44b1b8c090f0f00a2f38515fda431ea", + "spec/acceptance/squeeze_spec.rb": "adcd65fa4e72203b97f1f14c8835c2cd", + "spec/acceptance/str2bool_spec.rb": "55ad165ceef6b9ba32bf20ca3b53b44c", + "spec/acceptance/str2saltedsha512_spec.rb": "b684c4214d06ae3d5bae055262a5ccaa", + "spec/acceptance/strftime_spec.rb": "0f4eadbd74445b35de4a42c9790fbcc1", + "spec/acceptance/strip_spec.rb": "6767da5bc735beb5362aeee6ff692c9e", + "spec/acceptance/suffix_spec.rb": "07dfc7eed48b75fcc1b93d0308243eda", + "spec/acceptance/swapcase_spec.rb": "5c3c1bc19a09fed6e01881f79b0b4ea5", + "spec/acceptance/time_spec.rb": "044b2f634a1fa6ecc735998d68a93b73", + "spec/acceptance/to_bytes_spec.rb": "f9df1f234b9409f5eaf56ef24e651c36", + "spec/acceptance/type_spec.rb": "d103a7e1607ab9cea74cdef25af610b0", + "spec/acceptance/union_spec.rb": "b6092941e0574f3c60910bebf84d2844", + "spec/acceptance/unique_spec.rb": "9b00b21cefde3b5391f50eeb9cd2493b", + "spec/acceptance/unsupported_spec.rb": "09b9265ecb05252cd5e5a18327c7ae97", + "spec/acceptance/upcase_spec.rb": "ffd1d6f9e6ec24131fb78983c53a75f9", + "spec/acceptance/uriescape_spec.rb": "13daa387714cbfc63b587aaa8dbf7fcd", + "spec/acceptance/validate_absolute_path_spec.rb": "8b9ebfae80329231d84fcab606a3eeaf", + "spec/acceptance/validate_array_spec.rb": "382641719e754622ffae562d10e38bf7", + "spec/acceptance/validate_augeas_spec.rb": "ec0a9c030e2c3494889973d74d60b2a4", + "spec/acceptance/validate_bool_spec.rb": "08bc139459204cf0a35098a5bc30ab95", + "spec/acceptance/validate_cmd_spec.rb": "d08eacac4dd5bdb50b5b0f02a6494048", + "spec/acceptance/validate_hash_spec.rb": "70ceacc18a0dee97b26ab2e50f925706", + "spec/acceptance/validate_ipv4_address_spec.rb": "dc901bbd05c3764a93cb49154cea6e4b", + "spec/acceptance/validate_ipv6_address_spec.rb": "c0872c56230ac2800cd5723eaa5bc53a", + "spec/acceptance/validate_re_spec.rb": "b289909078d6ae0d015419f518566698", + "spec/acceptance/validate_slength_spec.rb": "f0a05c1c2b895b096cb7326df4821594", + "spec/acceptance/validate_string_spec.rb": "6c9ced99fb1e263e66e25427d24f8f7b", + "spec/acceptance/values_at_spec.rb": "669b26c4d47742051472003518c3aa61", + "spec/acceptance/values_spec.rb": "714a13735aa0db3ffd3dfc4cd2c2e330", + "spec/acceptance/zip_spec.rb": "0a76aa26bd9552b8dae3294af7d233ab", + "spec/classes/anchor_spec.rb": "40600ba2845f9bd360a9504a347f12ba", + "spec/fixtures/dscacheutil/root": "e1a7622f55f3d1be258c9a5b16b474be", + "spec/functions/abs_spec.rb": "0a5864a29a8e9e99acc483268bd5917c", + "spec/functions/any2array_spec.rb": "167e114cfa222de971bf8be141766b6a", + "spec/functions/base64_spec.rb": "fe16d992be54dbb06d040f1b0e189571", + "spec/functions/bool2num_spec.rb": "67c3055d5d4e4c9fbcaca82038a09081", + "spec/functions/capitalize_spec.rb": "82a4209a033fc88c624f708c12e64e2a", + "spec/functions/chomp_spec.rb": "3cd8e2fe6b12efeffad94cce5b693b7c", + "spec/functions/chop_spec.rb": "4e9534d25b952b261c9f46add677c390", + "spec/functions/concat_spec.rb": "d7657b1af27a96072aae711cee041181", + "spec/functions/count_spec.rb": "db98ef89752a7112425f0aade10108e0", + "spec/functions/deep_merge_spec.rb": "7961a696e1b45167cead127f841f1c99", + "spec/functions/defined_with_params_spec.rb": "3bdfac38e3d6f06140ff2e926f4ebed2", + "spec/functions/delete_at_spec.rb": "7fd4fe7db8d213925fbc80c992673d10", + "spec/functions/delete_spec.rb": "fe66bdf9e61b9c992bc73ee54a37035c", + "spec/functions/delete_undef_values_spec.rb": "83b9c3027463f5c8a90a6d47d219acd5", + "spec/functions/delete_values_spec.rb": "ddcaa269caa95ad926b8a3ef82976da9", + "spec/functions/difference_spec.rb": "e64c1501699fef8eb1037a3ca60a05a6", + "spec/functions/dirname_spec.rb": "1d7cf70468c2cfa6dacfc75935322395", + "spec/functions/downcase_spec.rb": "b0197829512f2e92a2d2b06ce8e2226f", + "spec/functions/empty_spec.rb": "028c30267d648a172d8a81a9262c3abe", + "spec/functions/ensure_packages_spec.rb": "f1b60599078cdcb3cff1368346108264", + "spec/functions/ensure_resource_spec.rb": "7765dde3b9fc54b7dddb6597e0f7b523", + "spec/functions/flatten_spec.rb": "583c9a70f93e492cfb22ffa1811f6aa0", + "spec/functions/floor_spec.rb": "d01ef7dfe0245d7a0a73d7df13cb02e3", + "spec/functions/fqdn_rotate_spec.rb": "c67b71737bee9936f5261d41a37bad46", + "spec/functions/get_module_path_spec.rb": "b7ea196f548b1a9a745ab6671295ab27", + "spec/functions/getparam_spec.rb": "75153d949eb122aa18f0c5e2c8e861e5", + "spec/functions/getvar_spec.rb": "842bf88d47077a9ae64097b6e39c3364", + "spec/functions/grep_spec.rb": "78179537496a7150469e591a95e255d8", + "spec/functions/has_interface_with_spec.rb": "7c16d731c518b434c81b8cb2227cc916", + "spec/functions/has_ip_address_spec.rb": "f53c7baeaf024ff577447f6c28c0f3a7", + "spec/functions/has_ip_network_spec.rb": "885ea8a4c987b735d683b742bf846cb1", + "spec/functions/has_key_spec.rb": "3e4e730d98bbdfb88438b6e08e45868e", + "spec/functions/hash_spec.rb": "826337a92d8f7a189b7ac19615db0ed7", + "spec/functions/intersection_spec.rb": "1b1f1a3900a1f1e165692b056e766fba", + "spec/functions/is_array_spec.rb": "8c020af9c360abdbbf1ba887bb26babe", + "spec/functions/is_bool_spec.rb": "3219ba1500de75161bfb4f292404d1fa", + "spec/functions/is_domain_name_spec.rb": "8eed3a9eb9334bf6a473ad4e2cabc2ec", + "spec/functions/is_float_spec.rb": "171fc0e382d9856c2d8db2b70c9ec9cd", + "spec/functions/is_function_available.rb": "c8858a3c6253713cce0113a98d229b5d", + "spec/functions/is_hash_spec.rb": "408e121a5e30c4c5c4a0a383beb6e209", + "spec/functions/is_integer_spec.rb": "c848f20da5f62ac4bbaf0f6c1485c88f", + "spec/functions/is_ip_address_spec.rb": "6040a9bae4e5c853966148b634501157", + "spec/functions/is_mac_address_spec.rb": "644cd498b426ff2f9ea9cbc5d8e141d7", + "spec/functions/is_numeric_spec.rb": "65f2ad0e70d9b60c601740351eba94fd", + "spec/functions/is_string_spec.rb": "5c015d8267de852da3a12b984e077092", + "spec/functions/join_keys_to_values_spec.rb": "7c7937411b7fe4bb944c0c022d3a96b0", + "spec/functions/join_spec.rb": "c3b50c39390a86b493511be2c6722235", + "spec/functions/keys_spec.rb": "35cc2ed490dc68da6464f245dfebd617", + "spec/functions/loadyaml_spec.rb": "ce86614d8aaceec93653ecf299d3d441", + "spec/functions/lstrip_spec.rb": "1fc2c2d80b5f724a358c3cfeeaae6249", + "spec/functions/max_spec.rb": "5562bccc643443af7e4fa7c9d1e52b8b", + "spec/functions/member_spec.rb": "067c60985efc57022ca1c5508d74d77f", + "spec/functions/merge_spec.rb": "c17a7244453f2da22970acc02a6de110", + "spec/functions/min_spec.rb": "bf80bf58261117bb24392670b624a611", + "spec/functions/num2bool_spec.rb": "8cd5b46b7c8e612dfae3362e3a68a5f9", + "spec/functions/parsejson_spec.rb": "37ab84381e035c31d6a3dd9bf73a3d53", + "spec/functions/parseyaml_spec.rb": "65dfed872930ffe0d21954c15daaf498", + "spec/functions/pick_default_spec.rb": "db0a9d261b7e1b82e2786716dd924e92", + "spec/functions/pick_spec.rb": "34382f7483b6c10d38831de2169777c2", + "spec/functions/prefix_spec.rb": "7245749e27bafe1b36c1c5bae6f705c7", + "spec/functions/range_spec.rb": "c40b3c6d4031fc541c2421ff7b8c41fe", + "spec/functions/reject_spec.rb": "8e16c9f064870e958b6278261e480954", + "spec/functions/reverse_spec.rb": "48169990e59081ccbd112b6703418ce4", + "spec/functions/rstrip_spec.rb": "a408e933753c9c323a05d7079d32cbb3", + "spec/functions/shuffle_spec.rb": "2141a54d2fb3cf725b88184d639677f4", + "spec/functions/size_spec.rb": "d126b696b21a8cd754d58f78ddba6f06", + "spec/functions/sort_spec.rb": "7039cd230a94e95d9d1de2e1094acae2", + "spec/functions/squeeze_spec.rb": "df5b349c208a9a2a4d4b8e6d9324756f", + "spec/functions/str2bool_spec.rb": "e2a8a4d39680f3ed18621e26d67c6024", + "spec/functions/str2saltedsha512_spec.rb": "1de174be8835ba6fef86b590887bb2cc", + "spec/functions/strftime_spec.rb": "bf140883ecf3254277306fa5b25f0344", + "spec/functions/strip_spec.rb": "a01796bebbdabd3fad12b0662ea5966e", + "spec/functions/suffix_spec.rb": "ee875e2d09d7ffc363bf6c34d9ef322f", + "spec/functions/swapcase_spec.rb": "0660ce8807608cc8f98ad1edfa76a402", + "spec/functions/time_spec.rb": "b6d0279062779efe5153fe5cfafc5bbd", + "spec/functions/to_bytes_spec.rb": "80aaf68cf7e938e46b5278c1907af6be", + "spec/functions/type_spec.rb": "422f2c33458fe9b0cc9614d16f7573ba", + "spec/functions/union_spec.rb": "c4f72a55e186813cd3a47a83ba3e9a61", + "spec/functions/unique_spec.rb": "2df8b3b2edb9503943cb4dcb4a371867", + "spec/functions/upcase_spec.rb": "813668919bc62cdd1d349dafc19fbbb3", + "spec/functions/uriescape_spec.rb": "204e9b1566e330a0234761ac8ac7083f", + "spec/functions/validate_absolute_path_spec.rb": "5a0b98675070e511810dab9e60dc43b6", + "spec/functions/validate_array_spec.rb": "bcd231229554785c4270ca92ef99cb60", + "spec/functions/validate_augeas_spec.rb": "eee1a0c3ef3051bda525b1e17d577ab0", + "spec/functions/validate_bool_spec.rb": "7aeb6085fc9601c6bbe6c49e56d209a4", + "spec/functions/validate_cmd_spec.rb": "efc88e8e21481acd36c7f948b1f226ea", + "spec/functions/validate_hash_spec.rb": "8529c74051ceb71e6b1b97c9cecdf625", + "spec/functions/validate_ipv4_address_spec.rb": "19f2f44fbbdf7a2e69aeaa2f0f402695", + "spec/functions/validate_ipv6_address_spec.rb": "2d8617be4405bdbd84d140ba8be6c184", + "spec/functions/validate_re_spec.rb": "d8ab477f9afcb748f144588ebb3a28a3", + "spec/functions/validate_slength_spec.rb": "73273a083a26941b3f7c1e3b2e18b3e2", + "spec/functions/validate_string_spec.rb": "64a4f681084cba55775a070f7fab5e0c", + "spec/functions/values_at_spec.rb": "de45fd8abbc4c037c3c4fac2dcf186f9", + "spec/functions/values_spec.rb": "0ac9e141ed1f612d7cc224f747b2d1d9", + "spec/functions/zip_spec.rb": "06a86e4e70d2aea63812582aae1d26c4", + "spec/lib/puppet_spec/compiler.rb": "3c1f03dd8ac2f6f90d7e8f879a3ce4c0", + "spec/lib/puppet_spec/database.rb": "c74c0cf62980beea88c7749f876ccfa7", + "spec/lib/puppet_spec/files.rb": "906da85e399302cee403e10e357d3f4c", + "spec/lib/puppet_spec/fixtures.rb": "0722c5ccbfcba1fc27da1900e54b4463", + "spec/lib/puppet_spec/matchers.rb": "dd30ba6b936e8c267511d67acb087c35", + "spec/lib/puppet_spec/modules.rb": "445d2739aa8754568a14816280727d70", + "spec/lib/puppet_spec/pops.rb": "adf661defa460b7189e3750535533d34", + "spec/lib/puppet_spec/scope.rb": "01aeb89bdc2d29a2528ced26ec6402ec", + "spec/lib/puppet_spec/settings.rb": "5da4e0dad8bf6b21cc4437c73753a56d", + "spec/lib/puppet_spec/verbose.rb": "71dbccd9a45ed89d12fd1c44456a6820", + "spec/monkey_patches/alias_should_to_must.rb": "b19ee31563afb91a72f9869f9d7362ff", + "spec/monkey_patches/publicize_methods.rb": "c690e444b77c871375d321e413e28ca1", + "spec/spec.opts": "a600ded995d948e393fbe2320ba8e51c", + "spec/spec_helper.rb": "846cc69a2d612d55d130622759aa12e0", + "spec/spec_helper_acceptance.rb": "d82b5682eac4ff46bbe5aa08c29d5e28", + "spec/unit/facter/facter_dot_d_spec.rb": "cce0748b2671b1b104332a7c757e5206", + "spec/unit/facter/pe_version_spec.rb": "ef031cca838f36f99b1dab3259df96a5", + "spec/unit/facter/root_home_spec.rb": "ecd851e2b8a4a8578960cce094cf41ee", + "spec/unit/facter/util/puppet_settings_spec.rb": "8666142d017e5804445f5596f3be76e8", + "spec/unit/puppet/provider/file_line/ruby_spec.rb": "e118a65a3eb0ccd3d1bf99d7bb010669", + "spec/unit/puppet/type/anchor_spec.rb": "3c3251acbc1085b121623f4617107fb9", + "spec/unit/puppet/type/file_line_spec.rb": "72ba1d9ad9de5df592f3ff03551983cb", + "tests/file_line.pp": "67727539aa7b7dd76f06626fe734f7f7", + "tests/has_interface_with.pp": "59c98b4af0d39fc11d1ef4c7a6dc8f7a", + "tests/has_ip_address.pp": "93ce02915f67ddfb43a049b2b84ef391", + "tests/has_ip_network.pp": "abc05686797a776ea8c054657e6f7456", + "tests/init.pp": "1d98070412c76824e66db4b7eb74d433" + } +} \ No newline at end of file diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/acceptance/abs_spec.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/acceptance/abs_spec.rb new file mode 100755 index 00000000000..8e056424ed6 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/acceptance/abs_spec.rb @@ -0,0 +1,30 @@ +#! /usr/bin/env ruby -S rspec +require 'spec_helper_acceptance' + +describe 'abs function', :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem')) do + describe 'success' do + it 'should accept a string' do + pp = <<-EOS + $input = '-34.56' + $output = abs($input) + notify { $output: } + EOS + + apply_manifest(pp, :catch_failures => true) do |r| + expect(r.stdout).to match(/Notice: 34.56/) + end + end + + it 'should accept a float' do + pp = <<-EOS + $input = -34.56 + $output = abs($input) + notify { $output: } + EOS + + apply_manifest(pp, :catch_failures => true) do |r| + expect(r.stdout).to match(/Notice: 34.56/) + end + end + end +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/acceptance/any2array_spec.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/acceptance/any2array_spec.rb new file mode 100755 index 00000000000..467d6afda03 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/acceptance/any2array_spec.rb @@ -0,0 +1,49 @@ +#! /usr/bin/env ruby -S rspec +require 'spec_helper_acceptance' + +describe 'any2array function', :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem')) do + describe 'success' do + it 'should create an empty array' do + pp = <<-EOS + $input = '' + $output = any2array($input) + validate_array($output) + notify { "Output: ${output}": } + EOS + + apply_manifest(pp, :catch_failures => true) do |r| + expect(r.stdout).to match(/Notice: Output: /) + end + end + + it 'should leave arrays modified' do + pp = <<-EOS + $input = ['test', 'array'] + $output = any2array($input) + validate_array($output) + notify { "Output: ${output}": } + EOS + + apply_manifest(pp, :catch_failures => true) do |r| + expect(r.stdout).to match(/Notice: Output: testarray/) + end + end + + it 'should turn a hash into an array' do + pp = <<-EOS + $input = {'test' => 'array'} + $output = any2array($input) + + validate_array($output) + # Check each element of the array is a plain string. + validate_string($output[0]) + validate_string($output[1]) + notify { "Output: ${output}": } + EOS + + apply_manifest(pp, :catch_failures => true) do |r| + expect(r.stdout).to match(/Notice: Output: testarray/) + end + end + end +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/acceptance/base64_spec.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/acceptance/base64_spec.rb new file mode 100755 index 00000000000..97e1738ef68 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/acceptance/base64_spec.rb @@ -0,0 +1,18 @@ +#! /usr/bin/env ruby -S rspec +require 'spec_helper_acceptance' + +describe 'base64 function', :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem')) do + describe 'success' do + it 'should encode then decode a string' do + pp = <<-EOS + $encodestring = base64('encode', 'thestring') + $decodestring = base64('decode', $encodestring) + notify { $decodestring: } + EOS + + apply_manifest(pp, :catch_failures => true) do |r| + expect(r.stdout).to match(/thestring/) + end + end + end +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/acceptance/bool2num_spec.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/acceptance/bool2num_spec.rb new file mode 100755 index 00000000000..7a70311ca7a --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/acceptance/bool2num_spec.rb @@ -0,0 +1,34 @@ +#! /usr/bin/env ruby -S rspec +require 'spec_helper_acceptance' + +describe 'bool2num function', :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem')) do + describe 'success' do + ['false', 'f', '0', 'n', 'no'].each do |bool| + it 'should convert a given boolean, #{bool}, to 0' do + pp = <<-EOS + $input = #{bool} + $output = bool2num($input) + notify { $output: } + EOS + + apply_manifest(pp, :catch_failures => true) do |r| + expect(r.stdout).to match(/Notice: 0/) + end + end + end + + ['true', 't', '1', 'y', 'yes'].each do |bool| + it 'should convert a given boolean, #{bool}, to 1' do + pp = <<-EOS + $input = #{bool} + $output = bool2num($input) + notify { $output: } + EOS + + apply_manifest(pp, :catch_failures => true) do |r| + expect(r.stdout).to match(/Notice: 1/) + end + end + end + end +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/acceptance/build_csv.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/acceptance/build_csv.rb new file mode 100755 index 00000000000..62ecbf13a40 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/acceptance/build_csv.rb @@ -0,0 +1,83 @@ +#!/usr/bin/env ruby +# vim: set sw=2 sts=2 et tw=80 : +require 'rspec' + +#XXX Super ugly hack to keep from starting beaker nodes +module Kernel + # make an alias of the original require + alias_method :original_require, :require + # rewrite require + def require name + original_require name if name != 'spec_helper_acceptance' + end +end +UNSUPPORTED_PLATFORMS = [] +def fact(*args) [] end +#XXX End hax + +# Get a list of functions for test coverage +function_list = Dir[File.join(File.dirname(__FILE__),"..","..","lib","puppet","parser","functions","*.rb")].collect do |function_rb| + File.basename(function_rb,".rb") +end + +## Configure rspec to parse tests +options = RSpec::Core::ConfigurationOptions.new(['spec/acceptance']) +configuration = RSpec::configuration +world = RSpec::world +options.parse_options +options.configure(configuration) +configuration.load_spec_files + +## Collect up tests and example groups into a hash +def get_tests(children) + children.inject({}) do |memo,c| + memo[c.description] = Hash.new + memo[c.description]["groups"] = get_tests(c.children) unless c.children.empty? + memo[c.description]["tests"] = c.examples.collect { |e| + e.description unless e.pending? + }.compact unless c.examples.empty? + memo[c.description]["pending_tests"] = c.examples.collect { |e| + e.description if e.pending? + }.compact unless c.examples.empty? + memo + end +end + +def count_test_types_in(type,group) + return 0 if group.nil? + group.inject(0) do |m,(k,v)| + m += v.length if k == type + m += count_tests_in(v) if v.is_a?(Hash) + m + end +end +def count_tests_in(group) + count_test_types_in('tests',group) +end +def count_pending_tests_in(group) + count_test_types_in('pending_tests',group) +end + +# Convert tests hash to csv format +def to_csv(function_list,tests) + function_list.collect do |function_name| + if v = tests["#{function_name} function"] + positive_tests = count_tests_in(v["groups"]["success"]) + negative_tests = count_tests_in(v["groups"]["failure"]) + pending_tests = + count_pending_tests_in(v["groups"]["failure"]) + + count_pending_tests_in(v["groups"]["failure"]) + else + positive_tests = 0 + negative_tests = 0 + pending_tests = 0 + end + sprintf("%-25s, %-9d, %-9d, %-9d", function_name,positive_tests,negative_tests,pending_tests) + end.compact +end + +tests = get_tests(world.example_groups) +csv = to_csv(function_list,tests) +percentage_tested = "#{tests.count*100/function_list.count}%" +printf("%-25s, %-9s, %-9s, %-9s\n","#{percentage_tested} have tests.","Positive","Negative","Pending") +puts csv diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/acceptance/capitalize_spec.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/acceptance/capitalize_spec.rb new file mode 100755 index 00000000000..e5e7b7bf841 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/acceptance/capitalize_spec.rb @@ -0,0 +1,33 @@ +#! /usr/bin/env ruby -S rspec +require 'spec_helper_acceptance' + +describe 'capitalize function', :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem')) do + describe 'success' do + it 'should capitalize the first letter of a string' do + pp = <<-EOS + $input = 'this is a string' + $output = capitalize($input) + notify { $output: } + EOS + + apply_manifest(pp, :catch_failures => true) do |r| + expect(r.stdout).to match(/Notice: This is a string/) + end + end + + it 'should capitalize the first letter of an array of strings' do + pp = <<-EOS + $input = ['this', 'is', 'a', 'string'] + $output = capitalize($input) + notify { $output: } + EOS + + apply_manifest(pp, :catch_failures => true) do |r| + expect(r.stdout).to match(/Notice: This/) + expect(r.stdout).to match(/Notice: Is/) + expect(r.stdout).to match(/Notice: A/) + expect(r.stdout).to match(/Notice: String/) + end + end + end +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/acceptance/chomp_spec.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/acceptance/chomp_spec.rb new file mode 100755 index 00000000000..f6c15956e4f --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/acceptance/chomp_spec.rb @@ -0,0 +1,21 @@ +#! /usr/bin/env ruby -S rspec +require 'spec_helper_acceptance' + +describe 'chomp function', :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem')) do + describe 'success' do + it 'should eat the newline' do + pp = <<-EOS + $input = "test\n" + if size($input) != 5 { + fail("Size of ${input} is not 5.") + } + $output = chomp($input) + if size($output) != 4 { + fail("Size of ${input} is not 4.") + } + EOS + + apply_manifest(pp, :catch_failures => true) + end + end +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/acceptance/chop_spec.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/acceptance/chop_spec.rb new file mode 100755 index 00000000000..dbc28da7ec3 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/acceptance/chop_spec.rb @@ -0,0 +1,45 @@ +#! /usr/bin/env ruby -S rspec +require 'spec_helper_acceptance' + +describe 'chop function', :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem')) do + describe 'success' do + it 'should eat the last character' do + pp = <<-EOS + $input = "test" + if size($input) != 4 { + fail("Size of ${input} is not 4.") + } + $output = chop($input) + if size($output) != 3 { + fail("Size of ${input} is not 3.") + } + EOS + + apply_manifest(pp, :catch_failures => true) + end + + it 'should eat the last two characters of \r\n' do + pp = <<-EOS + $input = "test\r\n" + if size($input) != 6 { + fail("Size of ${input} is not 6.") + } + $output = chop($input) + if size($output) != 4 { + fail("Size of ${input} is not 4.") + } + EOS + + apply_manifest(pp, :catch_failures => true) + end + + it 'should not fail on empty strings' do + pp = <<-EOS + $input = "" + $output = chop($input) + EOS + + apply_manifest(pp, :catch_failures => true) + end + end +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/acceptance/concat_spec.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/acceptance/concat_spec.rb new file mode 100755 index 00000000000..7bda3653a05 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/acceptance/concat_spec.rb @@ -0,0 +1,18 @@ +#! /usr/bin/env ruby -S rspec +require 'spec_helper_acceptance' + +describe 'concat function', :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem')) do + describe 'success' do + it 'should concat one array to another' do + pp = <<-EOS + $output = concat(['1','2','3'],['4','5','6']) + validate_array($output) + if size($output) != 6 { + fail("${output} should have 6 elements.") + } + EOS + + apply_manifest(pp, :catch_failures => true) + end + end +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/acceptance/count_spec.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/acceptance/count_spec.rb new file mode 100755 index 00000000000..51a40ba5c17 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/acceptance/count_spec.rb @@ -0,0 +1,30 @@ +#! /usr/bin/env ruby -S rspec +require 'spec_helper_acceptance' + +describe 'count function', :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem')) do + describe 'success' do + it 'should count elements in an array' do + pp = <<-EOS + $input = [1,2,3,4] + $output = count($input) + notify { $output: } + EOS + + apply_manifest(pp, :catch_failures => true) do |r| + expect(r.stdout).to match(/Notice: 4/) + end + end + + it 'should count elements in an array that match a second argument' do + pp = <<-EOS + $input = [1,1,1,2] + $output = count($input, 1) + notify { $output: } + EOS + + apply_manifest(pp, :catch_failures => true) do |r| + expect(r.stdout).to match(/Notice: 3/) + end + end + end +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/acceptance/deep_merge_spec.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/acceptance/deep_merge_spec.rb new file mode 100755 index 00000000000..c0f9b126d03 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/acceptance/deep_merge_spec.rb @@ -0,0 +1,20 @@ +#! /usr/bin/env ruby -S rspec +require 'spec_helper_acceptance' + +describe 'deep_merge function', :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem')) do + describe 'success' do + it 'should deep merge two hashes' do + pp = <<-EOS + $hash1 = {'one' => 1, 'two' => 2, 'three' => { 'four' => 4 } } + $hash2 = {'two' => 'dos', 'three' => { 'five' => 5 } } + $merged_hash = deep_merge($hash1, $hash2) + + if $merged_hash != { 'one' => 1, 'two' => 'dos', 'three' => { 'four' => 4, 'five' => 5 } } { + fail("Hash was incorrectly merged.") + } + EOS + + apply_manifest(pp, :catch_failures => true) + end + end +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/acceptance/defined_with_params_spec.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/acceptance/defined_with_params_spec.rb new file mode 100755 index 00000000000..fc544508b95 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/acceptance/defined_with_params_spec.rb @@ -0,0 +1,22 @@ +#! /usr/bin/env ruby -S rspec +require 'spec_helper_acceptance' + +describe 'defined_with_params function', :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem')) do + describe 'success' do + it 'should successfully notify' do + pp = <<-EOS + user { 'dan': + ensure => present, + } + + if defined_with_params(User[dan], {'ensure' => 'present' }) { + notify { 'User defined with ensure=>present': } + } + EOS + + apply_manifest(pp, :catch_failures => true) do |r| + expect(r.stdout).to match(/Notice: User defined with ensure=>present/) + end + end + end +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/acceptance/delete_at_spec.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/acceptance/delete_at_spec.rb new file mode 100755 index 00000000000..db0c01f7483 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/acceptance/delete_at_spec.rb @@ -0,0 +1,19 @@ +#! /usr/bin/env ruby -S rspec +require 'spec_helper_acceptance' + +describe 'delete_at function', :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem')) do + describe 'success' do + it 'should delete elements of the array' do + pp = <<-EOS + $output = delete_at(['a','b','c','b'], 1) + if $output == ['a','c','b'] { + notify { 'output correct': } + } + EOS + + apply_manifest(pp, :catch_failures => true) do |r| + expect(r.stdout).to match(/Notice: output correct/) + end + end + end +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/acceptance/delete_spec.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/acceptance/delete_spec.rb new file mode 100755 index 00000000000..a28604ceaa0 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/acceptance/delete_spec.rb @@ -0,0 +1,19 @@ +#! /usr/bin/env ruby -S rspec +require 'spec_helper_acceptance' + +describe 'delete function', :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem')) do + describe 'success' do + it 'should delete elements of the array' do + pp = <<-EOS + $output = delete(['a','b','c','b'], 'b') + if $output == ['a','c'] { + notify { 'output correct': } + } + EOS + + apply_manifest(pp, :catch_failures => true) do |r| + expect(r.stdout).to match(/Notice: output correct/) + end + end + end +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/acceptance/delete_undef_values_spec.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/acceptance/delete_undef_values_spec.rb new file mode 100755 index 00000000000..b7eda1926c8 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/acceptance/delete_undef_values_spec.rb @@ -0,0 +1,19 @@ +#! /usr/bin/env ruby -S rspec +require 'spec_helper_acceptance' + +describe 'delete_undef_values function', :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem')) do + describe 'success' do + it 'should delete elements of the array' do + pp = <<-EOS + $output = delete_undef_values({a=>'A', b=>'', c=>undef, d => false}) + if $output == { a => 'A', b => '', d => false } { + notify { 'output correct': } + } + EOS + + apply_manifest(pp, :catch_failures => true) do |r| + expect(r.stdout).to match(/Notice: output correct/) + end + end + end +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/acceptance/delete_values_spec.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/acceptance/delete_values_spec.rb new file mode 100755 index 00000000000..6d2369c3e81 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/acceptance/delete_values_spec.rb @@ -0,0 +1,25 @@ +#! /usr/bin/env ruby -S rspec +require 'spec_helper_acceptance' + +describe 'delete_values function', :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem')) do + describe 'success' do + it 'should delete elements of the hash' do + pp = <<-EOS + $a = { 'a' => 'A', 'b' => 'B', 'B' => 'C', 'd' => 'B' } + $b = { 'a' => 'A', 'B' => 'C' } + $o = delete_values($a, 'B') + if $o == $b { + notify { 'output correct': } + } + EOS + + apply_manifest(pp, :catch_failures => true) do |r| + expect(r.stdout).to match(/Notice: output correct/) + end + end + end + describe 'failure' do + it 'handles non-hash arguments' + it 'handles improper argument counts' + end +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/acceptance/difference_spec.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/acceptance/difference_spec.rb new file mode 100755 index 00000000000..2fae5c432f3 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/acceptance/difference_spec.rb @@ -0,0 +1,26 @@ +#! /usr/bin/env ruby -S rspec +require 'spec_helper_acceptance' + +describe 'difference function', :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem')) do + describe 'success' do + it 'returns non-duplicates in the first array' do + pp = <<-EOS + $a = ['a','b','c'] + $b = ['b','c','d'] + $c = ['a'] + $o = difference($a, $b) + if $o == $c { + notify { 'output correct': } + } + EOS + + apply_manifest(pp, :catch_failures => true) do |r| + expect(r.stdout).to match(/Notice: output correct/) + end + end + end + describe 'failure' do + it 'handles non-array arguments' + it 'handles improper argument counts' + end +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/acceptance/dirname_spec.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/acceptance/dirname_spec.rb new file mode 100755 index 00000000000..97913ddb063 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/acceptance/dirname_spec.rb @@ -0,0 +1,42 @@ +#! /usr/bin/env ruby -S rspec +require 'spec_helper_acceptance' + +describe 'dirname function', :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem')) do + describe 'success' do + context 'absolute path' do + it 'returns the dirname' do + pp = <<-EOS + $a = '/path/to/a/file.txt' + $b = '/path/to/a' + $o = dirname($a) + if $o == $b { + notify { 'output correct': } + } + EOS + + apply_manifest(pp, :catch_failures => true) do |r| + expect(r.stdout).to match(/Notice: output correct/) + end + end + end + context 'relative path' do + it 'returns the dirname' do + pp = <<-EOS + $a = 'path/to/a/file.txt' + $b = 'path/to/a' + $o = dirname($a) + if $o == $b { + notify { 'output correct': } + } + EOS + + apply_manifest(pp, :catch_failures => true) do |r| + expect(r.stdout).to match(/Notice: output correct/) + end + end + end + end + describe 'failure' do + it 'handles improper argument counts' + end +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/acceptance/downcase_spec.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/acceptance/downcase_spec.rb new file mode 100755 index 00000000000..bc4e70692d2 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/acceptance/downcase_spec.rb @@ -0,0 +1,39 @@ +#! /usr/bin/env ruby -S rspec +require 'spec_helper_acceptance' + +describe 'downcase function', :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem')) do + describe 'success' do + it 'returns the downcase' do + pp = <<-EOS + $a = 'AOEU' + $b = 'aoeu' + $o = downcase($a) + if $o == $b { + notify { 'output correct': } + } + EOS + + apply_manifest(pp, :catch_failures => true) do |r| + expect(r.stdout).to match(/Notice: output correct/) + end + end + it 'doesn\'t affect lowercase words' do + pp = <<-EOS + $a = 'aoeu aoeu' + $b = 'aoeu aoeu' + $o = downcase($a) + if $o == $b { + notify { 'output correct': } + } + EOS + + apply_manifest(pp, :catch_failures => true) do |r| + expect(r.stdout).to match(/Notice: output correct/) + end + end + end + describe 'failure' do + it 'handles improper argument counts' + it 'handles non-strings' + end +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/acceptance/empty_spec.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/acceptance/empty_spec.rb new file mode 100755 index 00000000000..8b46aacdad8 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/acceptance/empty_spec.rb @@ -0,0 +1,39 @@ +#! /usr/bin/env ruby -S rspec +require 'spec_helper_acceptance' + +describe 'empty function', :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem')) do + describe 'success' do + it 'recognizes empty strings' do + pp = <<-EOS + $a = '' + $b = true + $o = empty($a) + if $o == $b { + notify { 'output correct': } + } + EOS + + apply_manifest(pp, :catch_failures => true) do |r| + expect(r.stdout).to match(/Notice: output correct/) + end + end + it 'recognizes non-empty strings' do + pp = <<-EOS + $a = 'aoeu' + $b = false + $o = empty($a) + if $o == $b { + notify { 'output correct': } + } + EOS + + apply_manifest(pp, :catch_failures => true) do |r| + expect(r.stdout).to match(/Notice: output correct/) + end + end + end + describe 'failure' do + it 'handles improper argument counts' + it 'handles non-strings' + end +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/acceptance/ensure_packages_spec.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/acceptance/ensure_packages_spec.rb new file mode 100755 index 00000000000..145bdc5e5de --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/acceptance/ensure_packages_spec.rb @@ -0,0 +1,24 @@ +#! /usr/bin/env ruby -S rspec +require 'spec_helper_acceptance' + +describe 'ensure_packages function', :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem')) do + describe 'success' do + it 'ensure_packages a package' do + apply_manifest('package { "zsh": ensure => absent, }') + pp = <<-EOS + $a = "zsh" + ensure_packages($a) + EOS + + apply_manifest(pp, :expect_changes => true) do |r| + expect(r.stdout).to match(/Package\[zsh\]\/ensure: created/) + end + end + it 'ensures a package already declared' + it 'takes defaults arguments' + end + describe 'failure' do + it 'handles no arguments' + it 'handles non strings' + end +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/acceptance/ensure_resource_spec.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/acceptance/ensure_resource_spec.rb new file mode 100755 index 00000000000..c4d8887df29 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/acceptance/ensure_resource_spec.rb @@ -0,0 +1,24 @@ +#! /usr/bin/env ruby -S rspec +require 'spec_helper_acceptance' + +describe 'ensure_resource function', :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem')) do + describe 'success' do + it 'ensure_resource a package' do + apply_manifest('package { "zsh": ensure => absent, }') + pp = <<-EOS + $a = "zsh" + ensure_resource('package', $a) + EOS + + apply_manifest(pp, :expect_changes => true) do |r| + expect(r.stdout).to match(/Package\[zsh\]\/ensure: created/) + end + end + it 'ensures a resource already declared' + it 'takes defaults arguments' + end + describe 'failure' do + it 'handles no arguments' + it 'handles non strings' + end +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/acceptance/flatten_spec.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/acceptance/flatten_spec.rb new file mode 100755 index 00000000000..c4d66e04650 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/acceptance/flatten_spec.rb @@ -0,0 +1,39 @@ +#! /usr/bin/env ruby -S rspec +require 'spec_helper_acceptance' + +describe 'flatten function', :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem')) do + describe 'success' do + it 'flattens arrays' do + pp = <<-EOS + $a = ["a","b",["c",["d","e"],"f","g"]] + $b = ["a","b","c","d","e","f","g"] + $o = flatten($a) + if $o == $b { + notify { 'output correct': } + } + EOS + + apply_manifest(pp, :catch_failures => true) do |r| + expect(r.stdout).to match(/Notice: output correct/) + end + end + it 'does not affect flat arrays' do + pp = <<-EOS + $a = ["a","b","c","d","e","f","g"] + $b = ["a","b","c","d","e","f","g"] + $o = flatten($a) + if $o == $b { + notify { 'output correct': } + } + EOS + + apply_manifest(pp, :catch_failures => true) do |r| + expect(r.stdout).to match(/Notice: output correct/) + end + end + end + describe 'failure' do + it 'handles improper argument counts' + it 'handles non-strings' + end +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/acceptance/floor_spec.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/acceptance/floor_spec.rb new file mode 100755 index 00000000000..0dcdad9c2b0 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/acceptance/floor_spec.rb @@ -0,0 +1,39 @@ +#! /usr/bin/env ruby -S rspec +require 'spec_helper_acceptance' + +describe 'floor function', :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem')) do + describe 'success' do + it 'floors floats' do + pp = <<-EOS + $a = 12.8 + $b = 12 + $o = floor($a) + if $o == $b { + notify { 'output correct': } + } + EOS + + apply_manifest(pp, :catch_failures => true) do |r| + expect(r.stdout).to match(/Notice: output correct/) + end + end + it 'floors integers' do + pp = <<-EOS + $a = 7 + $b = 7 + $o = floor($a) + if $o == $b { + notify { 'output correct': } + } + EOS + + apply_manifest(pp, :catch_failures => true) do |r| + expect(r.stdout).to match(/Notice: output correct/) + end + end + end + describe 'failure' do + it 'handles improper argument counts' + it 'handles non-numbers' + end +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/acceptance/fqdn_rotate_spec.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/acceptance/fqdn_rotate_spec.rb new file mode 100755 index 00000000000..b7f8bf8ab9f --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/acceptance/fqdn_rotate_spec.rb @@ -0,0 +1,33 @@ +#! /usr/bin/env ruby -S rspec +require 'spec_helper_acceptance' + +describe 'fqdn_rotate function', :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem')) do + describe 'success' do + let(:facts_d) do + if fact('is_pe') == "true" + '/etc/puppetlabs/facter/facts.d' + else + '/etc/facter/facts.d' + end + end + after :each do + shell("if [ -f #{facts_d}/fqdn.txt ] ; then rm #{facts_d}/fqdn.txt ; fi") + end + it 'fqdn_rotates floats' do + shell("echo 'fqdn=fakehost.localdomain' > #{facts_d}/fqdn.txt") + pp = <<-EOS + $a = ['a','b','c','d'] + $o = fqdn_rotate($a) + notice(inline_template('fqdn_rotate is <%= @o.inspect %>')) + EOS + + apply_manifest(pp, :catch_failures => true) do |r| + expect(r.stdout).to match(/fqdn_rotate is \["c", "d", "a", "b"\]/) + end + end + end + describe 'failure' do + it 'handles improper argument counts' + it 'handles non-numbers' + end +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/acceptance/get_module_path_spec.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/acceptance/get_module_path_spec.rb new file mode 100755 index 00000000000..34d91fa3dab --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/acceptance/get_module_path_spec.rb @@ -0,0 +1,41 @@ +#! /usr/bin/env ruby -S rspec +require 'spec_helper_acceptance' + +describe 'get_module_path function', :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem')) do + describe 'success' do + it 'get_module_paths stdlib' do + pp = <<-EOS + $a = $::is_pe ? { + 'true' => '/opt/puppet/share/puppet/modules/stdlib', + 'false' => '/etc/puppet/modules/stdlib', + } + $o = get_module_path('stdlib') + if $o == $a { + notify { 'output correct': } + } + EOS + + apply_manifest(pp, :catch_failures => true) do |r| + expect(r.stdout).to match(/Notice: output correct/) + end + end + it 'get_module_paths dne' do + pp = <<-EOS + $a = $::is_pe ? { + 'true' => '/etc/puppetlabs/puppet/modules/dne', + 'false' => '/etc/puppet/modules/dne', + } + $o = get_module_path('dne') + if $o == $a { + notify { 'output correct': } + } + EOS + + apply_manifest(pp, :expect_failures => true) + end + end + describe 'failure' do + it 'handles improper argument counts' + it 'handles non-numbers' + end +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/acceptance/getparam_spec.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/acceptance/getparam_spec.rb new file mode 100755 index 00000000000..91fc9a00f34 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/acceptance/getparam_spec.rb @@ -0,0 +1,25 @@ +#! /usr/bin/env ruby -S rspec +require 'spec_helper_acceptance' + +describe 'getparam function', :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem')) do + describe 'success' do + it 'getparam a package' do + pp = <<-EOS + user { "rspec": + ensure => present, + managehome => true, + } + $o = getparam(User['rspec'], 'managehome') + notice(inline_template('getparam is <%= @o.inspect %>')) + EOS + + apply_manifest(pp, :catch_failures => true) do |r| + expect(r.stdout).to match(/getparam is true/) + end + end + end + describe 'failure' do + it 'handles no arguments' + it 'handles non strings' + end +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/acceptance/getvar_spec.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/acceptance/getvar_spec.rb new file mode 100755 index 00000000000..333c467f673 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/acceptance/getvar_spec.rb @@ -0,0 +1,26 @@ +#! /usr/bin/env ruby -S rspec +require 'spec_helper_acceptance' + +describe 'getvar function', :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem')) do + describe 'success' do + it 'getvars from classes' do + pp = <<-EOS + class a::data { $foo = 'aoeu' } + include a::data + $b = 'aoeu' + $o = getvar("a::data::foo") + if $o == $b { + notify { 'output correct': } + } + EOS + + apply_manifest(pp, :catch_failures => true) do |r| + expect(r.stdout).to match(/Notice: output correct/) + end + end + end + describe 'failure' do + it 'handles improper argument counts' + it 'handles non-numbers' + end +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/acceptance/grep_spec.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/acceptance/grep_spec.rb new file mode 100755 index 00000000000..b39d48ecbe6 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/acceptance/grep_spec.rb @@ -0,0 +1,26 @@ +#! /usr/bin/env ruby -S rspec +require 'spec_helper_acceptance' + +describe 'grep function', :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem')) do + describe 'success' do + it 'greps arrays' do + pp = <<-EOS + $a = ['aaabbb','bbbccc','dddeee'] + $b = 'bbb' + $c = ['aaabbb','bbbccc'] + $o = grep($a,$b) + if $o == $c { + notify { 'output correct': } + } + EOS + + apply_manifest(pp, :catch_failures => true) do |r| + expect(r.stdout).to match(/Notice: output correct/) + end + end + end + describe 'failure' do + it 'handles improper argument counts' + it 'handles non-arrays' + end +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/acceptance/has_interface_with_spec.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/acceptance/has_interface_with_spec.rb new file mode 100755 index 00000000000..41ae19fd1c5 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/acceptance/has_interface_with_spec.rb @@ -0,0 +1,44 @@ +#! /usr/bin/env ruby -S rspec +require 'spec_helper_acceptance' + +describe 'has_interface_with function', :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem')) do + describe 'success' do + it 'has_interface_with existing ipaddress' do + pp = <<-EOS + $a = '127.0.0.1' + $o = has_interface_with('ipaddress', $a) + notice(inline_template('has_interface_with is <%= @o.inspect %>')) + EOS + + apply_manifest(pp, :catch_failures => true) do |r| + expect(r.stdout).to match(/has_interface_with is true/) + end + end + it 'has_interface_with absent ipaddress' do + pp = <<-EOS + $a = '128.0.0.1' + $o = has_interface_with('ipaddress', $a) + notice(inline_template('has_interface_with is <%= @o.inspect %>')) + EOS + + apply_manifest(pp, :catch_failures => true) do |r| + expect(r.stdout).to match(/has_interface_with is false/) + end + end + it 'has_interface_with existing interface' do + pp = <<-EOS + $a = 'lo' + $o = has_interface_with($a) + notice(inline_template('has_interface_with is <%= @o.inspect %>')) + EOS + + apply_manifest(pp, :catch_failures => true) do |r| + expect(r.stdout).to match(/has_interface_with is true/) + end + end + end + describe 'failure' do + it 'handles no arguments' + it 'handles non strings' + end +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/acceptance/has_ip_address_spec.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/acceptance/has_ip_address_spec.rb new file mode 100755 index 00000000000..7d5fd872926 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/acceptance/has_ip_address_spec.rb @@ -0,0 +1,33 @@ +#! /usr/bin/env ruby -S rspec +require 'spec_helper_acceptance' + +describe 'has_ip_address function', :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem')) do + describe 'success' do + it 'has_ip_address existing ipaddress' do + pp = <<-EOS + $a = '127.0.0.1' + $o = has_ip_address($a) + notice(inline_template('has_ip_address is <%= @o.inspect %>')) + EOS + + apply_manifest(pp, :catch_failures => true) do |r| + expect(r.stdout).to match(/has_ip_address is true/) + end + end + it 'has_ip_address absent ipaddress' do + pp = <<-EOS + $a = '128.0.0.1' + $o = has_ip_address($a) + notice(inline_template('has_ip_address is <%= @o.inspect %>')) + EOS + + apply_manifest(pp, :catch_failures => true) do |r| + expect(r.stdout).to match(/has_ip_address is false/) + end + end + end + describe 'failure' do + it 'handles no arguments' + it 'handles non strings' + end +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/acceptance/has_ip_network_spec.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/acceptance/has_ip_network_spec.rb new file mode 100755 index 00000000000..692eaf9b4c6 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/acceptance/has_ip_network_spec.rb @@ -0,0 +1,33 @@ +#! /usr/bin/env ruby -S rspec +require 'spec_helper_acceptance' + +describe 'has_ip_network function', :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem')) do + describe 'success' do + it 'has_ip_network existing ipaddress' do + pp = <<-EOS + $a = '127.0.0.0' + $o = has_ip_network($a) + notice(inline_template('has_ip_network is <%= @o.inspect %>')) + EOS + + apply_manifest(pp, :catch_failures => true) do |r| + expect(r.stdout).to match(/has_ip_network is true/) + end + end + it 'has_ip_network absent ipaddress' do + pp = <<-EOS + $a = '128.0.0.0' + $o = has_ip_network($a) + notice(inline_template('has_ip_network is <%= @o.inspect %>')) + EOS + + apply_manifest(pp, :catch_failures => true) do |r| + expect(r.stdout).to match(/has_ip_network is false/) + end + end + end + describe 'failure' do + it 'handles no arguments' + it 'handles non strings' + end +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/acceptance/has_key_spec.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/acceptance/has_key_spec.rb new file mode 100755 index 00000000000..c8557cbeb66 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/acceptance/has_key_spec.rb @@ -0,0 +1,41 @@ +#! /usr/bin/env ruby -S rspec +require 'spec_helper_acceptance' + +describe 'has_key function', :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem')) do + describe 'success' do + it 'has_keys in hashes' do + pp = <<-EOS + $a = { 'aaa' => 'bbb','bbb' => 'ccc','ddd' => 'eee' } + $b = 'bbb' + $c = true + $o = has_key($a,$b) + if $o == $c { + notify { 'output correct': } + } + EOS + + apply_manifest(pp, :catch_failures => true) do |r| + expect(r.stdout).to match(/Notice: output correct/) + end + end + it 'has_keys not in hashes' do + pp = <<-EOS + $a = { 'aaa' => 'bbb','bbb' => 'ccc','ddd' => 'eee' } + $b = 'ccc' + $c = false + $o = has_key($a,$b) + if $o == $c { + notify { 'output correct': } + } + EOS + + apply_manifest(pp, :catch_failures => true) do |r| + expect(r.stdout).to match(/Notice: output correct/) + end + end + end + describe 'failure' do + it 'handles improper argument counts' + it 'handles non-hashes' + end +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/acceptance/hash_spec.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/acceptance/hash_spec.rb new file mode 100755 index 00000000000..ed53834bed2 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/acceptance/hash_spec.rb @@ -0,0 +1,26 @@ +#! /usr/bin/env ruby -S rspec +require 'spec_helper_acceptance' + +describe 'hash function', :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem')) do + describe 'success' do + it 'hashs arrays' do + pp = <<-EOS + $a = ['aaa','bbb','bbb','ccc','ddd','eee'] + $b = { 'aaa' => 'bbb', 'bbb' => 'ccc', 'ddd' => 'eee' } + $o = hash($a) + if $o == $b { + notify { 'output correct': } + } + EOS + + apply_manifest(pp, :catch_failures => true) do |r| + expect(r.stdout).to match(/Notice: output correct/) + end + end + it 'handles odd-length arrays' + end + describe 'failure' do + it 'handles improper argument counts' + it 'handles non-arrays' + end +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/acceptance/intersection_spec.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/acceptance/intersection_spec.rb new file mode 100755 index 00000000000..66b86529786 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/acceptance/intersection_spec.rb @@ -0,0 +1,27 @@ +#! /usr/bin/env ruby -S rspec +require 'spec_helper_acceptance' + +describe 'intersection function', :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem')) do + describe 'success' do + it 'intersections arrays' do + pp = <<-EOS + $a = ['aaa','bbb','ccc'] + $b = ['bbb','ccc','ddd','eee'] + $c = ['bbb','ccc'] + $o = intersection($a,$b) + if $o == $c { + notify { 'output correct': } + } + EOS + + apply_manifest(pp, :catch_failures => true) do |r| + expect(r.stdout).to match(/Notice: output correct/) + end + end + it 'intersections empty arrays' + end + describe 'failure' do + it 'handles improper argument counts' + it 'handles non-arrays' + end +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/acceptance/is_array_spec.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/acceptance/is_array_spec.rb new file mode 100755 index 00000000000..9c6bad735f6 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/acceptance/is_array_spec.rb @@ -0,0 +1,67 @@ +#! /usr/bin/env ruby -S rspec +require 'spec_helper_acceptance' + +describe 'is_array function', :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem')) do + describe 'success' do + it 'is_arrays arrays' do + pp = <<-EOS + $a = ['aaa','bbb','ccc'] + $b = true + $o = is_array($a) + if $o == $b { + notify { 'output correct': } + } + EOS + + apply_manifest(pp, :catch_failures => true) do |r| + expect(r.stdout).to match(/Notice: output correct/) + end + end + it 'is_arrays empty arrays' do + pp = <<-EOS + $a = [] + $b = true + $o = is_array($a) + if $o == $b { + notify { 'output correct': } + } + EOS + + apply_manifest(pp, :catch_failures => true) do |r| + expect(r.stdout).to match(/Notice: output correct/) + end + end + it 'is_arrays strings' do + pp = <<-EOS + $a = "aoeu" + $b = false + $o = is_array($a) + if $o == $b { + notify { 'output correct': } + } + EOS + + apply_manifest(pp, :catch_failures => true) do |r| + expect(r.stdout).to match(/Notice: output correct/) + end + end + it 'is_arrays hashes' do + pp = <<-EOS + $a = {'aaa'=>'bbb'} + $b = false + $o = is_array($a) + if $o == $b { + notify { 'output correct': } + } + EOS + + apply_manifest(pp, :catch_failures => true) do |r| + expect(r.stdout).to match(/Notice: output correct/) + end + end + end + describe 'failure' do + it 'handles improper argument counts' + it 'handles non-arrays' + end +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/acceptance/is_bool_spec.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/acceptance/is_bool_spec.rb new file mode 100755 index 00000000000..60079f95eff --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/acceptance/is_bool_spec.rb @@ -0,0 +1,81 @@ +#! /usr/bin/env ruby -S rspec +require 'spec_helper_acceptance' + +describe 'is_bool function', :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem')) do + describe 'success' do + it 'is_bools arrays' do + pp = <<-EOS + $a = ['aaa','bbb','ccc'] + $b = false + $o = is_bool($a) + if $o == $b { + notify { 'output correct': } + } + EOS + + apply_manifest(pp, :catch_failures => true) do |r| + expect(r.stdout).to match(/Notice: output correct/) + end + end + it 'is_bools true' do + pp = <<-EOS + $a = true + $b = true + $o = is_bool($a) + if $o == $b { + notify { 'output correct': } + } + EOS + + apply_manifest(pp, :catch_failures => true) do |r| + expect(r.stdout).to match(/Notice: output correct/) + end + end + it 'is_bools false' do + pp = <<-EOS + $a = false + $b = true + $o = is_bool($a) + if $o == $b { + notify { 'output correct': } + } + EOS + + apply_manifest(pp, :catch_failures => true) do |r| + expect(r.stdout).to match(/Notice: output correct/) + end + end + it 'is_bools strings' do + pp = <<-EOS + $a = "true" + $b = false + $o = is_bool($a) + if $o == $b { + notify { 'output correct': } + } + EOS + + apply_manifest(pp, :catch_failures => true) do |r| + expect(r.stdout).to match(/Notice: output correct/) + end + end + it 'is_bools hashes' do + pp = <<-EOS + $a = {'aaa'=>'bbb'} + $b = false + $o = is_bool($a) + if $o == $b { + notify { 'output correct': } + } + EOS + + apply_manifest(pp, :catch_failures => true) do |r| + expect(r.stdout).to match(/Notice: output correct/) + end + end + end + describe 'failure' do + it 'handles improper argument counts' + it 'handles non-arrays' + end +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/acceptance/is_domain_name_spec.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/acceptance/is_domain_name_spec.rb new file mode 100755 index 00000000000..e0f03fa878e --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/acceptance/is_domain_name_spec.rb @@ -0,0 +1,83 @@ +#! /usr/bin/env ruby -S rspec +require 'spec_helper_acceptance' + +describe 'is_domain_name function', :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem')) do + describe 'success' do + it 'is_domain_names arrays' do + pp = <<-EOS + $a = ['aaa.com','bbb','ccc'] + $o = is_domain_name($a) + notice(inline_template('is_domain_name is <%= @o.inspect %>')) + EOS + + apply_manifest(pp, :catch_failures => true) do |r| + expect(r.stdout).to match(/is_domain_name is false/) + end + end + it 'is_domain_names true' do + pp = <<-EOS + $a = true + $o = is_domain_name($a) + notice(inline_template('is_domain_name is <%= @o.inspect %>')) + EOS + + apply_manifest(pp, :catch_failures => true) do |r| + expect(r.stdout).to match(/is_domain_name is false/) + end + end + it 'is_domain_names false' do + pp = <<-EOS + $a = false + $o = is_domain_name($a) + notice(inline_template('is_domain_name is <%= @o.inspect %>')) + EOS + + apply_manifest(pp, :catch_failures => true) do |r| + expect(r.stdout).to match(/is_domain_name is false/) + end + end + it 'is_domain_names strings with hyphens' do + pp = <<-EOS + $a = "3foo-bar.2bar-fuzz.com" + $b = true + $o = is_domain_name($a) + if $o == $b { + notify { 'output correct': } + } + EOS + + apply_manifest(pp, :catch_failures => true) do |r| + expect(r.stdout).to match(/Notice: output correct/) + end + end + it 'is_domain_names strings beginning with hyphens' do + pp = <<-EOS + $a = "-bar.2bar-fuzz.com" + $b = false + $o = is_domain_name($a) + if $o == $b { + notify { 'output correct': } + } + EOS + + apply_manifest(pp, :catch_failures => true) do |r| + expect(r.stdout).to match(/Notice: output correct/) + end + end + it 'is_domain_names hashes' do + pp = <<-EOS + $a = {'aaa'=>'www.com'} + $o = is_domain_name($a) + notice(inline_template('is_domain_name is <%= @o.inspect %>')) + EOS + + apply_manifest(pp, :catch_failures => true) do |r| + expect(r.stdout).to match(/is_domain_name is false/) + end + end + end + describe 'failure' do + it 'handles improper argument counts' + it 'handles non-arrays' + end +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/acceptance/is_float_spec.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/acceptance/is_float_spec.rb new file mode 100755 index 00000000000..338ba58d468 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/acceptance/is_float_spec.rb @@ -0,0 +1,86 @@ +#! /usr/bin/env ruby -S rspec +require 'spec_helper_acceptance' + +describe 'is_float function', :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem')) do + describe 'success' do + it 'is_floats arrays' do + pp = <<-EOS + $a = ['aaa.com','bbb','ccc'] + $o = is_float($a) + notice(inline_template('is_float is <%= @o.inspect %>')) + EOS + + apply_manifest(pp, :catch_failures => true) do |r| + expect(r.stdout).to match(/is_float is false/) + end + end + it 'is_floats true' do + pp = <<-EOS + $a = true + $o = is_float($a) + notice(inline_template('is_float is <%= @o.inspect %>')) + EOS + + apply_manifest(pp, :catch_failures => true) do |r| + expect(r.stdout).to match(/is_float is false/) + end + end + it 'is_floats strings' do + pp = <<-EOS + $a = "3.5" + $b = true + $o = is_float($a) + if $o == $b { + notify { 'output correct': } + } + EOS + + apply_manifest(pp, :catch_failures => true) do |r| + expect(r.stdout).to match(/Notice: output correct/) + end + end + it 'is_floats floats' do + pp = <<-EOS + $a = 3.5 + $b = true + $o = is_float($a) + if $o == $b { + notify { 'output correct': } + } + EOS + + apply_manifest(pp, :catch_failures => true) do |r| + expect(r.stdout).to match(/Notice: output correct/) + end + end + it 'is_floats integers' do + pp = <<-EOS + $a = 3 + $b = false + $o = is_float($a) + if $o == $b { + notify { 'output correct': } + } + EOS + + apply_manifest(pp, :catch_failures => true) do |r| + expect(r.stdout).to match(/Notice: output correct/) + end + end + it 'is_floats hashes' do + pp = <<-EOS + $a = {'aaa'=>'www.com'} + $o = is_float($a) + notice(inline_template('is_float is <%= @o.inspect %>')) + EOS + + apply_manifest(pp, :catch_failures => true) do |r| + expect(r.stdout).to match(/is_float is false/) + end + end + end + describe 'failure' do + it 'handles improper argument counts' + it 'handles non-arrays' + end +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/acceptance/is_function_available_spec.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/acceptance/is_function_available_spec.rb new file mode 100755 index 00000000000..2b5dd6d1731 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/acceptance/is_function_available_spec.rb @@ -0,0 +1,58 @@ +#! /usr/bin/env ruby -S rspec +require 'spec_helper_acceptance' + +describe 'is_function_available function', :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem')) do + describe 'success' do + it 'is_function_availables arrays' do + pp = <<-EOS + $a = ['fail','include','require'] + $o = is_function_available($a) + notice(inline_template('is_function_available is <%= @o.inspect %>')) + EOS + + apply_manifest(pp, :catch_failures => true) do |r| + expect(r.stdout).to match(/is_function_available is false/) + end + end + it 'is_function_availables true' do + pp = <<-EOS + $a = true + $o = is_function_available($a) + notice(inline_template('is_function_available is <%= @o.inspect %>')) + EOS + + apply_manifest(pp, :catch_failures => true) do |r| + expect(r.stdout).to match(/is_function_available is false/) + end + end + it 'is_function_availables strings' do + pp = <<-EOS + $a = "fail" + $b = true + $o = is_function_available($a) + if $o == $b { + notify { 'output correct': } + } + EOS + + apply_manifest(pp, :catch_failures => true) do |r| + expect(r.stdout).to match(/Notice: output correct/) + end + end + it 'is_function_availables function_availables' do + pp = <<-EOS + $a = "is_function_available" + $o = is_function_available($a) + notice(inline_template('is_function_available is <%= @o.inspect %>')) + EOS + + apply_manifest(pp, :catch_failures => true) do |r| + expect(r.stdout).to match(/is_function_available is true/) + end + end + end + describe 'failure' do + it 'handles improper argument counts' + it 'handles non-arrays' + end +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/acceptance/is_hash_spec.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/acceptance/is_hash_spec.rb new file mode 100755 index 00000000000..2ef310abccb --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/acceptance/is_hash_spec.rb @@ -0,0 +1,63 @@ +#! /usr/bin/env ruby -S rspec +require 'spec_helper_acceptance' + +describe 'is_hash function', :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem')) do + describe 'success' do + it 'is_hashs arrays' do + pp = <<-EOS + $a = ['aaa','bbb','ccc'] + $o = is_hash($a) + notice(inline_template('is_hash is <%= @o.inspect %>')) + EOS + + apply_manifest(pp, :catch_failures => true) do |r| + expect(r.stdout).to match(/is_hash is false/) + end + end + it 'is_hashs empty hashs' do + pp = <<-EOS + $a = {} + $b = true + $o = is_hash($a) + if $o == $b { + notify { 'output correct': } + } + EOS + + apply_manifest(pp, :catch_failures => true) do |r| + expect(r.stdout).to match(/Notice: output correct/) + end + end + it 'is_hashs strings' do + pp = <<-EOS + $a = "aoeu" + $b = false + $o = is_hash($a) + if $o == $b { + notify { 'output correct': } + } + EOS + + apply_manifest(pp, :catch_failures => true) do |r| + expect(r.stdout).to match(/Notice: output correct/) + end + end + it 'is_hashs hashes' do + pp = <<-EOS + $a = {'aaa'=>'bbb'} + $b = true + $o = is_hash($a) + if $o == $b { + notify { 'output correct': } + } + EOS + + apply_manifest(pp, :catch_failures => true) do |r| + expect(r.stdout).to match(/Notice: output correct/) + end + end + end + describe 'failure' do + it 'handles improper argument counts' + end +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/acceptance/is_integer_spec.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/acceptance/is_integer_spec.rb new file mode 100755 index 00000000000..bf6902b904c --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/acceptance/is_integer_spec.rb @@ -0,0 +1,95 @@ +#! /usr/bin/env ruby -S rspec +require 'spec_helper_acceptance' + +describe 'is_integer function', :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem')) do + describe 'success' do + it 'is_integers arrays' do + pp = <<-EOS + $a = ['aaa.com','bbb','ccc'] + $b = false + $o = is_integer($a) + if $o == $b { + notify { 'output correct': } + } + EOS + + apply_manifest(pp, :catch_failures => true) do |r| + expect(r.stdout).to match(/Notice: output correct/) + end + end + it 'is_integers true' do + pp = <<-EOS + $a = true + $b = false + $o = is_integer($a) + if $o == $b { + notify { 'output correct': } + } + EOS + + apply_manifest(pp, :catch_failures => true) do |r| + expect(r.stdout).to match(/Notice: output correct/) + end + end + it 'is_integers strings' do + pp = <<-EOS + $a = "3" + $b = true + $o = is_integer($a) + if $o == $b { + notify { 'output correct': } + } + EOS + + apply_manifest(pp, :catch_failures => true) do |r| + expect(r.stdout).to match(/Notice: output correct/) + end + end + it 'is_integers floats' do + pp = <<-EOS + $a = 3.5 + $b = false + $o = is_integer($a) + if $o == $b { + notify { 'output correct': } + } + EOS + + apply_manifest(pp, :catch_failures => true) do |r| + expect(r.stdout).to match(/Notice: output correct/) + end + end + it 'is_integers integers' do + pp = <<-EOS + $a = 3 + $b = true + $o = is_integer($a) + if $o == $b { + notify { 'output correct': } + } + EOS + + apply_manifest(pp, :catch_failures => true) do |r| + expect(r.stdout).to match(/Notice: output correct/) + end + end + it 'is_integers hashes' do + pp = <<-EOS + $a = {'aaa'=>'www.com'} + $b = false + $o = is_integer($a) + if $o == $b { + notify { 'output correct': } + } + EOS + + apply_manifest(pp, :catch_failures => true) do |r| + expect(r.stdout).to match(/Notice: output correct/) + end + end + end + describe 'failure' do + it 'handles improper argument counts' + it 'handles non-arrays' + end +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/acceptance/is_ip_address_spec.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/acceptance/is_ip_address_spec.rb new file mode 100755 index 00000000000..ed7a85439d2 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/acceptance/is_ip_address_spec.rb @@ -0,0 +1,80 @@ +#! /usr/bin/env ruby -S rspec +require 'spec_helper_acceptance' + +describe 'is_ip_address function', :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem')) do + describe 'success' do + it 'is_ip_addresss ipv4' do + pp = <<-EOS + $a = '1.2.3.4' + $b = true + $o = is_ip_address($a) + if $o == $b { + notify { 'output correct': } + } + EOS + + apply_manifest(pp, :catch_failures => true) do |r| + expect(r.stdout).to match(/Notice: output correct/) + end + end + it 'is_ip_addresss ipv6' do + pp = <<-EOS + $a = "fe80:0000:cd12:d123:e2f8:47ff:fe09:dd74" + $b = true + $o = is_ip_address($a) + if $o == $b { + notify { 'output correct': } + } + EOS + + apply_manifest(pp, :catch_failures => true) do |r| + expect(r.stdout).to match(/Notice: output correct/) + end + end + it 'is_ip_addresss ipv6 compressed' do + pp = <<-EOS + $a = "fe00::1" + $b = true + $o = is_ip_address($a) + if $o == $b { + notify { 'output correct': } + } + EOS + + apply_manifest(pp, :catch_failures => true) do |r| + expect(r.stdout).to match(/Notice: output correct/) + end + end + it 'is_ip_addresss strings' do + pp = <<-EOS + $a = "aoeu" + $b = false + $o = is_ip_address($a) + if $o == $b { + notify { 'output correct': } + } + EOS + + apply_manifest(pp, :catch_failures => true) do |r| + expect(r.stdout).to match(/Notice: output correct/) + end + end + it 'is_ip_addresss ipv4 out of range' do + pp = <<-EOS + $a = '1.2.3.400' + $b = false + $o = is_ip_address($a) + if $o == $b { + notify { 'output correct': } + } + EOS + + apply_manifest(pp, :catch_failures => true) do |r| + expect(r.stdout).to match(/Notice: output correct/) + end + end + end + describe 'failure' do + it 'handles improper argument counts' + end +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/acceptance/is_mac_address_spec.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/acceptance/is_mac_address_spec.rb new file mode 100755 index 00000000000..a2c892f435b --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/acceptance/is_mac_address_spec.rb @@ -0,0 +1,38 @@ +#! /usr/bin/env ruby -S rspec +require 'spec_helper_acceptance' + +describe 'is_mac_address function', :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem')) do + describe 'success' do + it 'is_mac_addresss a mac' do + pp = <<-EOS + $a = '00:a0:1f:12:7f:a0' + $b = true + $o = is_mac_address($a) + if $o == $b { + notify { 'output correct': } + } + EOS + + apply_manifest(pp, :catch_failures => true) do |r| + expect(r.stdout).to match(/Notice: output correct/) + end + end + it 'is_mac_addresss a mac out of range' do + pp = <<-EOS + $a = '00:a0:1f:12:7f:g0' + $b = false + $o = is_mac_address($a) + if $o == $b { + notify { 'output correct': } + } + EOS + + apply_manifest(pp, :catch_failures => true) do |r| + expect(r.stdout).to match(/Notice: output correct/) + end + end + end + describe 'failure' do + it 'handles improper argument counts' + end +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/acceptance/is_numeric_spec.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/acceptance/is_numeric_spec.rb new file mode 100755 index 00000000000..21c898841ee --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/acceptance/is_numeric_spec.rb @@ -0,0 +1,95 @@ +#! /usr/bin/env ruby -S rspec +require 'spec_helper_acceptance' + +describe 'is_numeric function', :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem')) do + describe 'success' do + it 'is_numerics arrays' do + pp = <<-EOS + $a = ['aaa.com','bbb','ccc'] + $b = false + $o = is_numeric($a) + if $o == $b { + notify { 'output correct': } + } + EOS + + apply_manifest(pp, :catch_failures => true) do |r| + expect(r.stdout).to match(/Notice: output correct/) + end + end + it 'is_numerics true' do + pp = <<-EOS + $a = true + $b = false + $o = is_numeric($a) + if $o == $b { + notify { 'output correct': } + } + EOS + + apply_manifest(pp, :catch_failures => true) do |r| + expect(r.stdout).to match(/Notice: output correct/) + end + end + it 'is_numerics strings' do + pp = <<-EOS + $a = "3" + $b = true + $o = is_numeric($a) + if $o == $b { + notify { 'output correct': } + } + EOS + + apply_manifest(pp, :catch_failures => true) do |r| + expect(r.stdout).to match(/Notice: output correct/) + end + end + it 'is_numerics floats' do + pp = <<-EOS + $a = 3.5 + $b = true + $o = is_numeric($a) + if $o == $b { + notify { 'output correct': } + } + EOS + + apply_manifest(pp, :catch_failures => true) do |r| + expect(r.stdout).to match(/Notice: output correct/) + end + end + it 'is_numerics integers' do + pp = <<-EOS + $a = 3 + $b = true + $o = is_numeric($a) + if $o == $b { + notify { 'output correct': } + } + EOS + + apply_manifest(pp, :catch_failures => true) do |r| + expect(r.stdout).to match(/Notice: output correct/) + end + end + it 'is_numerics hashes' do + pp = <<-EOS + $a = {'aaa'=>'www.com'} + $b = false + $o = is_numeric($a) + if $o == $b { + notify { 'output correct': } + } + EOS + + apply_manifest(pp, :catch_failures => true) do |r| + expect(r.stdout).to match(/Notice: output correct/) + end + end + end + describe 'failure' do + it 'handles improper argument counts' + it 'handles non-arrays' + end +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/acceptance/is_string_spec.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/acceptance/is_string_spec.rb new file mode 100755 index 00000000000..94d8e967830 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/acceptance/is_string_spec.rb @@ -0,0 +1,102 @@ +#! /usr/bin/env ruby -S rspec +require 'spec_helper_acceptance' + +describe 'is_string function', :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem')) do + describe 'success' do + it 'is_strings arrays' do + pp = <<-EOS + $a = ['aaa.com','bbb','ccc'] + $b = false + $o = is_string($a) + if $o == $b { + notify { 'output correct': } + } + EOS + + apply_manifest(pp, :catch_failures => true) do |r| + expect(r.stdout).to match(/Notice: output correct/) + end + end + it 'is_strings true' do + pp = <<-EOS + $a = true + $b = false + $o = is_string($a) + if $o == $b { + notify { 'output correct': } + } + EOS + + apply_manifest(pp, :catch_failures => true) do |r| + expect(r.stdout).to match(/Notice: output correct/) + end + end + it 'is_strings strings' do + pp = <<-EOS + $a = "aoeu" + $o = is_string($a) + notice(inline_template('is_string is <%= @o.inspect %>')) + EOS + + apply_manifest(pp, :catch_failures => true) do |r| + expect(r.stdout).to match(/is_string is true/) + end + end + it 'is_strings number strings' do + pp = <<-EOS + $a = "3" + $o = is_string($a) + notice(inline_template('is_string is <%= @o.inspect %>')) + EOS + + apply_manifest(pp, :catch_failures => true) do |r| + expect(r.stdout).to match(/is_string is false/) + end + end + it 'is_strings floats' do + pp = <<-EOS + $a = 3.5 + $b = false + $o = is_string($a) + if $o == $b { + notify { 'output correct': } + } + EOS + + apply_manifest(pp, :catch_failures => true) do |r| + expect(r.stdout).to match(/Notice: output correct/) + end + end + it 'is_strings integers' do + pp = <<-EOS + $a = 3 + $b = false + $o = is_string($a) + if $o == $b { + notify { 'output correct': } + } + EOS + + apply_manifest(pp, :catch_failures => true) do |r| + expect(r.stdout).to match(/Notice: output correct/) + end + end + it 'is_strings hashes' do + pp = <<-EOS + $a = {'aaa'=>'www.com'} + $b = false + $o = is_string($a) + if $o == $b { + notify { 'output correct': } + } + EOS + + apply_manifest(pp, :catch_failures => true) do |r| + expect(r.stdout).to match(/Notice: output correct/) + end + end + end + describe 'failure' do + it 'handles improper argument counts' + end +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/acceptance/join_keys_to_values_spec.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/acceptance/join_keys_to_values_spec.rb new file mode 100755 index 00000000000..70493fd5a2a --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/acceptance/join_keys_to_values_spec.rb @@ -0,0 +1,24 @@ +#! /usr/bin/env ruby -S rspec +require 'spec_helper_acceptance' + +describe 'join_keys_to_values function', :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem')) do + describe 'success' do + it 'join_keys_to_valuess hashes' do + pp = <<-EOS + $a = {'aaa'=>'bbb','ccc'=>'ddd'} + $b = ':' + $o = join_keys_to_values($a,$b) + notice(inline_template('join_keys_to_values is <%= @o.sort.inspect %>')) + EOS + + apply_manifest(pp, :catch_failures => true) do |r| + expect(r.stdout).to match(/join_keys_to_values is \["aaa:bbb", "ccc:ddd"\]/) + end + end + it 'handles non hashes' + it 'handles empty hashes' + end + describe 'failure' do + it 'handles improper argument counts' + end +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/acceptance/join_spec.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/acceptance/join_spec.rb new file mode 100755 index 00000000000..5397ce2c8c1 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/acceptance/join_spec.rb @@ -0,0 +1,26 @@ +#! /usr/bin/env ruby -S rspec +require 'spec_helper_acceptance' + +describe 'join function', :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem')) do + describe 'success' do + it 'joins arrays' do + pp = <<-EOS + $a = ['aaa','bbb','ccc'] + $b = ':' + $c = 'aaa:bbb:ccc' + $o = join($a,$b) + if $o == $c { + notify { 'output correct': } + } + EOS + + apply_manifest(pp, :catch_failures => true) do |r| + expect(r.stdout).to match(/Notice: output correct/) + end + end + it 'handles non arrays' + end + describe 'failure' do + it 'handles improper argument counts' + end +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/acceptance/keys_spec.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/acceptance/keys_spec.rb new file mode 100755 index 00000000000..176918e91c7 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/acceptance/keys_spec.rb @@ -0,0 +1,23 @@ +#! /usr/bin/env ruby -S rspec +require 'spec_helper_acceptance' + +describe 'keys function', :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem')) do + describe 'success' do + it 'keyss hashes' do + pp = <<-EOS + $a = {'aaa'=>'bbb','ccc'=>'ddd'} + $o = keys($a) + notice(inline_template('keys is <%= @o.sort.inspect %>')) + EOS + + apply_manifest(pp, :catch_failures => true) do |r| + expect(r.stdout).to match(/keys is \["aaa", "ccc"\]/) + end + end + it 'handles non hashes' + it 'handles empty hashes' + end + describe 'failure' do + it 'handles improper argument counts' + end +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/acceptance/loadyaml_spec.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/acceptance/loadyaml_spec.rb new file mode 100644 index 00000000000..944a727359f --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/acceptance/loadyaml_spec.rb @@ -0,0 +1,31 @@ +#! /usr/bin/env ruby -S rspec +require 'spec_helper_acceptance' + +describe 'loadyaml function', :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem')) do + describe 'success' do + it 'loadyamls array of values' do + shell('echo "--- + aaa: 1 + bbb: 2 + ccc: 3 + ddd: 4" > /testyaml.yaml') + pp = <<-EOS + $o = loadyaml('/testyaml.yaml') + notice(inline_template('loadyaml[aaa] is <%= @o["aaa"].inspect %>')) + notice(inline_template('loadyaml[bbb] is <%= @o["bbb"].inspect %>')) + notice(inline_template('loadyaml[ccc] is <%= @o["ccc"].inspect %>')) + notice(inline_template('loadyaml[ddd] is <%= @o["ddd"].inspect %>')) + EOS + + apply_manifest(pp, :catch_failures => true) do |r| + expect(r.stdout).to match(/loadyaml\[aaa\] is 1/) + expect(r.stdout).to match(/loadyaml\[bbb\] is 2/) + expect(r.stdout).to match(/loadyaml\[ccc\] is 3/) + expect(r.stdout).to match(/loadyaml\[ddd\] is 4/) + end + end + end + describe 'failure' do + it 'fails with no arguments' + end +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/acceptance/lstrip_spec.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/acceptance/lstrip_spec.rb new file mode 100755 index 00000000000..3dc952fbc65 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/acceptance/lstrip_spec.rb @@ -0,0 +1,34 @@ +#! /usr/bin/env ruby -S rspec +require 'spec_helper_acceptance' + +describe 'lstrip function', :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem')) do + describe 'success' do + it 'lstrips arrays' do + pp = <<-EOS + $a = [" the "," public "," art","galleries "] + # Anagram: Large picture halls, I bet + $o = lstrip($a) + notice(inline_template('lstrip is <%= @o.inspect %>')) + EOS + + apply_manifest(pp, :catch_failures => true) do |r| + expect(r.stdout).to match(/lstrip is \["the ", "public ", "art", "galleries "\]/) + end + end + it 'lstrips strings' do + pp = <<-EOS + $a = " blowzy night-frumps vex'd jack q " + $o = lstrip($a) + notice(inline_template('lstrip is <%= @o.inspect %>')) + EOS + + apply_manifest(pp, :catch_failures => true) do |r| + expect(r.stdout).to match(/lstrip is "blowzy night-frumps vex'd jack q "/) + end + end + end + describe 'failure' do + it 'handles no arguments' + it 'handles non strings or arrays' + end +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/acceptance/max_spec.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/acceptance/max_spec.rb new file mode 100755 index 00000000000..f04e3d28332 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/acceptance/max_spec.rb @@ -0,0 +1,20 @@ +#! /usr/bin/env ruby -S rspec +require 'spec_helper_acceptance' + +describe 'max function', :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem')) do + describe 'success' do + it 'maxs arrays' do + pp = <<-EOS + $o = max("the","public","art","galleries") + notice(inline_template('max is <%= @o.inspect %>')) + EOS + + apply_manifest(pp, :catch_failures => true) do |r| + expect(r.stdout).to match(/max is "the"/) + end + end + end + describe 'failure' do + it 'handles no arguments' + end +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/acceptance/member_spec.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/acceptance/member_spec.rb new file mode 100755 index 00000000000..b467dbbe9c2 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/acceptance/member_spec.rb @@ -0,0 +1,26 @@ +#! /usr/bin/env ruby -S rspec +require 'spec_helper_acceptance' + +describe 'member function', :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem')) do + describe 'success' do + it 'members arrays' do + pp = <<-EOS + $a = ['aaa','bbb','ccc'] + $b = 'ccc' + $c = true + $o = member($a,$b) + if $o == $c { + notify { 'output correct': } + } + EOS + + apply_manifest(pp, :catch_failures => true) do |r| + expect(r.stdout).to match(/Notice: output correct/) + end + end + it 'members arrays without members' + end + describe 'failure' do + it 'handles improper argument counts' + end +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/acceptance/merge_spec.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/acceptance/merge_spec.rb new file mode 100755 index 00000000000..a60e784ee67 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/acceptance/merge_spec.rb @@ -0,0 +1,23 @@ +#! /usr/bin/env ruby -S rspec +require 'spec_helper_acceptance' + +describe 'merge function', :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem')) do + describe 'success' do + it 'should merge two hashes' do + pp = <<-EOS + $a = {'one' => 1, 'two' => 2, 'three' => { 'four' => 4 } } + $b = {'two' => 'dos', 'three' => { 'five' => 5 } } + $o = merge($a, $b) + notice(inline_template('merge[one] is <%= @o["one"].inspect %>')) + notice(inline_template('merge[two] is <%= @o["two"].inspect %>')) + notice(inline_template('merge[three] is <%= @o["three"].inspect %>')) + EOS + + apply_manifest(pp, :catch_failures => true) do |r| + expect(r.stdout).to match(/merge\[one\] is "1"/) + expect(r.stdout).to match(/merge\[two\] is "dos"/) + expect(r.stdout).to match(/merge\[three\] is {"five"=>"5"}/) + end + end + end +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/acceptance/min_spec.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/acceptance/min_spec.rb new file mode 100755 index 00000000000..509092d3c7c --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/acceptance/min_spec.rb @@ -0,0 +1,20 @@ +#! /usr/bin/env ruby -S rspec +require 'spec_helper_acceptance' + +describe 'min function', :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem')) do + describe 'success' do + it 'mins arrays' do + pp = <<-EOS + $o = min("the","public","art","galleries") + notice(inline_template('min is <%= @o.inspect %>')) + EOS + + apply_manifest(pp, :catch_failures => true) do |r| + expect(r.stdout).to match(/min is "art"/) + end + end + end + describe 'failure' do + it 'handles no arguments' + end +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/acceptance/nodesets/centos-6-vcloud.yml b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/acceptance/nodesets/centos-6-vcloud.yml new file mode 100644 index 00000000000..ca9c1d32986 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/acceptance/nodesets/centos-6-vcloud.yml @@ -0,0 +1,15 @@ +HOSTS: + 'centos-6-vcloud': + roles: + - master + platform: el-6-x86_64 + hypervisor: vcloud + template: centos-6-x86_64 +CONFIG: + type: foss + ssh: + keys: "~/.ssh/id_rsa-acceptance" + datastore: instance0 + folder: Delivery/Quality Assurance/Enterprise/Dynamic + resourcepool: delivery/Quality Assurance/Enterprise/Dynamic + pooling_api: http://vcloud.delivery.puppetlabs.net/ diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/acceptance/nodesets/centos-64-x64-pe.yml b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/acceptance/nodesets/centos-64-x64-pe.yml new file mode 100644 index 00000000000..7d9242f1b95 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/acceptance/nodesets/centos-64-x64-pe.yml @@ -0,0 +1,12 @@ +HOSTS: + centos-64-x64: + roles: + - master + - database + - dashboard + platform: el-6-x86_64 + box : centos-64-x64-vbox4210-nocm + box_url : http://puppet-vagrant-boxes.puppetlabs.com/centos-64-x64-vbox4210-nocm.box + hypervisor : vagrant +CONFIG: + type: pe diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/acceptance/nodesets/centos-64-x64.yml b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/acceptance/nodesets/centos-64-x64.yml new file mode 100644 index 00000000000..05540ed8c5a --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/acceptance/nodesets/centos-64-x64.yml @@ -0,0 +1,10 @@ +HOSTS: + centos-64-x64: + roles: + - master + platform: el-6-x86_64 + box : centos-64-x64-vbox4210-nocm + box_url : http://puppet-vagrant-boxes.puppetlabs.com/centos-64-x64-vbox4210-nocm.box + hypervisor : vagrant +CONFIG: + type: foss diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/acceptance/nodesets/default.yml b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/acceptance/nodesets/default.yml new file mode 100644 index 00000000000..4e2cb809e85 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/acceptance/nodesets/default.yml @@ -0,0 +1,10 @@ +HOSTS: + centos-65-x64: + roles: + - master + platform: el-6-x86_64 + box : centos-65-x64-vbox436-nocm + box_url : http://puppet-vagrant-boxes.puppetlabs.com/centos-65-x64-virtualbox-nocm.box + hypervisor : vagrant +CONFIG: + type: foss diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/acceptance/nodesets/fedora-18-x64.yml b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/acceptance/nodesets/fedora-18-x64.yml new file mode 100644 index 00000000000..13616498307 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/acceptance/nodesets/fedora-18-x64.yml @@ -0,0 +1,10 @@ +HOSTS: + fedora-18-x64: + roles: + - master + platform: fedora-18-x86_64 + box : fedora-18-x64-vbox4210-nocm + box_url : http://puppet-vagrant-boxes.puppetlabs.com/fedora-18-x64-vbox4210-nocm.box + hypervisor : vagrant +CONFIG: + type: foss diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/acceptance/nodesets/sles-11-x64.yml b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/acceptance/nodesets/sles-11-x64.yml new file mode 100644 index 00000000000..41abe2135e2 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/acceptance/nodesets/sles-11-x64.yml @@ -0,0 +1,10 @@ +HOSTS: + sles-11-x64.local: + roles: + - master + platform: sles-11-x64 + box : sles-11sp1-x64-vbox4210-nocm + box_url : http://puppet-vagrant-boxes.puppetlabs.com/sles-11sp1-x64-vbox4210-nocm.box + hypervisor : vagrant +CONFIG: + type: foss diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/acceptance/nodesets/ubuntu-server-10044-x64.yml b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/acceptance/nodesets/ubuntu-server-10044-x64.yml new file mode 100644 index 00000000000..5ca1514e407 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/acceptance/nodesets/ubuntu-server-10044-x64.yml @@ -0,0 +1,10 @@ +HOSTS: + ubuntu-server-10044-x64: + roles: + - master + platform: ubuntu-10.04-amd64 + box : ubuntu-server-10044-x64-vbox4210-nocm + box_url : http://puppet-vagrant-boxes.puppetlabs.com/ubuntu-server-10044-x64-vbox4210-nocm.box + hypervisor : vagrant +CONFIG: + type: foss diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/acceptance/nodesets/ubuntu-server-12042-x64.yml b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/acceptance/nodesets/ubuntu-server-12042-x64.yml new file mode 100644 index 00000000000..d065b304f83 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/acceptance/nodesets/ubuntu-server-12042-x64.yml @@ -0,0 +1,10 @@ +HOSTS: + ubuntu-server-12042-x64: + roles: + - master + platform: ubuntu-12.04-amd64 + box : ubuntu-server-12042-x64-vbox4210-nocm + box_url : http://puppet-vagrant-boxes.puppetlabs.com/ubuntu-server-12042-x64-vbox4210-nocm.box + hypervisor : vagrant +CONFIG: + type: foss diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/acceptance/num2bool_spec.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/acceptance/num2bool_spec.rb new file mode 100755 index 00000000000..1d99ba02514 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/acceptance/num2bool_spec.rb @@ -0,0 +1,76 @@ +#! /usr/bin/env ruby -S rspec +require 'spec_helper_acceptance' + +describe 'num2bool function', :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem')) do + describe 'success' do + it 'bools positive numbers and numeric strings as true' do + pp = <<-EOS + $a = 1 + $b = "1" + $c = "50" + $ao = num2bool($a) + $bo = num2bool($b) + $co = num2bool($c) + notice(inline_template('a is <%= @ao.inspect %>')) + notice(inline_template('b is <%= @bo.inspect %>')) + notice(inline_template('c is <%= @co.inspect %>')) + EOS + + apply_manifest(pp, :catch_failures => true) do |r| + expect(r.stdout).to match(/a is true/) + expect(r.stdout).to match(/b is true/) + expect(r.stdout).to match(/c is true/) + end + end + it 'bools negative numbers as false' do + pp = <<-EOS + $a = 0 + $b = -0.1 + $c = ["-50","1"] + $ao = num2bool($a) + $bo = num2bool($b) + $co = num2bool($c) + notice(inline_template('a is <%= @ao.inspect %>')) + notice(inline_template('b is <%= @bo.inspect %>')) + notice(inline_template('c is <%= @co.inspect %>')) + EOS + + apply_manifest(pp, :catch_failures => true) do |r| + expect(r.stdout).to match(/a is false/) + expect(r.stdout).to match(/b is false/) + expect(r.stdout).to match(/c is false/) + end + end + end + describe 'failure' do + it 'fails on words' do + pp = <<-EOS + $a = "a" + $ao = num2bool($a) + notice(inline_template('a is <%= @ao.inspect %>')) + EOS + expect(apply_manifest(pp, :expect_failures => true).stderr).to match(/not look like a number/) + end + + it 'fails on numberwords' do + pp = <<-EOS + $b = "1b" + $bo = num2bool($b) + notice(inline_template('b is <%= @bo.inspect %>')) + EOS + expect(apply_manifest(pp, :expect_failures => true).stderr).to match(/not look like a number/) + + end + + it 'fails on non-numeric/strings' do + pending "The function will call .to_s.to_i on anything not a Numeric or + String, and results in 0. Is this intended?" + pp = <<-EOS + $c = {"c" => "-50"} + $co = num2bool($c) + notice(inline_template('c is <%= @co.inspect %>')) + EOS + expect(apply_manifest(ppc :expect_failures => true).stderr).to match(/Unable to parse/) + end + end +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/acceptance/parsejson_spec.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/acceptance/parsejson_spec.rb new file mode 100755 index 00000000000..50978102726 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/acceptance/parsejson_spec.rb @@ -0,0 +1,34 @@ +#! /usr/bin/env ruby -S rspec +require 'spec_helper_acceptance' + +describe 'parsejson function', :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem')) do + describe 'success' do + it 'parses valid json' do + pp = <<-EOS + $a = '{"hunter": "washere", "tests": "passing"}' + $ao = parsejson($a) + $tests = $ao['tests'] + notice(inline_template('tests are <%= @tests.inspect %>')) + EOS + + apply_manifest(pp, :catch_failures => true) do |r| + expect(r.stdout).to match(/tests are "passing"/) + end + end + end + describe 'failure' do + it 'raises error on incorrect json' do + pp = <<-EOS + $a = '{"hunter": "washere", "tests": "passing",}' + $ao = parsejson($a) + notice(inline_template('a is <%= @ao.inspect %>')) + EOS + + apply_manifest(pp, :expect_failures => true) do |r| + expect(r.stderr).to match(/expected next name/) + end + end + + it 'raises error on incorrect number of arguments' + end +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/acceptance/parseyaml_spec.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/acceptance/parseyaml_spec.rb new file mode 100755 index 00000000000..4b4bf3df3df --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/acceptance/parseyaml_spec.rb @@ -0,0 +1,35 @@ +#! /usr/bin/env ruby -S rspec +require 'spec_helper_acceptance' + +describe 'parseyaml function', :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem')) do + describe 'success' do + it 'parses valid yaml' do + pp = <<-EOS + $a = "---\nhunter: washere\ntests: passing\n" + $o = parseyaml($a) + $tests = $o['tests'] + notice(inline_template('tests are <%= @tests.inspect %>')) + EOS + + apply_manifest(pp, :catch_failures => true) do |r| + expect(r.stdout).to match(/tests are "passing"/) + end + end + end + describe 'failure' do + it 'raises error on incorrect yaml' do + pp = <<-EOS + $a = "---\nhunter: washere\ntests: passing\n:" + $o = parseyaml($a) + $tests = $o['tests'] + notice(inline_template('tests are <%= @tests.inspect %>')) + EOS + + apply_manifest(pp, :expect_failures => true) do |r| + expect(r.stderr).to match(/syntax error/) + end + end + + it 'raises error on incorrect number of arguments' + end +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/acceptance/pick_default_spec.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/acceptance/pick_default_spec.rb new file mode 100755 index 00000000000..a663f54e8ac --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/acceptance/pick_default_spec.rb @@ -0,0 +1,54 @@ +#! /usr/bin/env ruby -S rspec +require 'spec_helper_acceptance' + +describe 'pick_default function', :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem')) do + describe 'success' do + it 'pick_defaults a default value' do + pp = <<-EOS + $a = undef + $o = pick_default($a, 'default') + notice(inline_template('picked is <%= @o.inspect %>')) + EOS + + apply_manifest(pp, :catch_failures => true) do |r| + expect(r.stdout).to match(/picked is "default"/) + end + end + it 'pick_defaults with no value' do + pp = <<-EOS + $a = undef + $b = undef + $o = pick_default($a,$b) + notice(inline_template('picked is <%= @o.inspect %>')) + EOS + + apply_manifest(pp, :catch_failures => true) do |r| + expect(r.stdout).to match(/picked is ""/) + end + end + it 'pick_defaults the first set value' do + pp = <<-EOS + $a = "something" + $b = "long" + $o = pick_default($a, $b, 'default') + notice(inline_template('picked is <%= @o.inspect %>')) + EOS + + apply_manifest(pp, :catch_failures => true) do |r| + expect(r.stdout).to match(/picked is "something"/) + end + end + end + describe 'failure' do + it 'raises error with no values' do + pp = <<-EOS + $o = pick_default() + notice(inline_template('picked is <%= @o.inspect %>')) + EOS + + apply_manifest(pp, :expect_failures => true) do |r| + expect(r.stderr).to match(/Must receive at least one argument/) + end + end + end +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/acceptance/pick_spec.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/acceptance/pick_spec.rb new file mode 100755 index 00000000000..46cf63f28fb --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/acceptance/pick_spec.rb @@ -0,0 +1,44 @@ +#! /usr/bin/env ruby -S rspec +require 'spec_helper_acceptance' + +describe 'pick function', :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem')) do + describe 'success' do + it 'picks a default value' do + pp = <<-EOS + $a = undef + $o = pick($a, 'default') + notice(inline_template('picked is <%= @o.inspect %>')) + EOS + + apply_manifest(pp, :catch_failures => true) do |r| + expect(r.stdout).to match(/picked is "default"/) + end + end + it 'picks the first set value' do + pp = <<-EOS + $a = "something" + $b = "long" + $o = pick($a, $b, 'default') + notice(inline_template('picked is <%= @o.inspect %>')) + EOS + + apply_manifest(pp, :catch_failures => true) do |r| + expect(r.stdout).to match(/picked is "something"/) + end + end + end + describe 'failure' do + it 'raises error with all undef values' do + pp = <<-EOS + $a = undef + $b = undef + $o = pick($a, $b) + notice(inline_template('picked is <%= @o.inspect %>')) + EOS + + apply_manifest(pp, :expect_failures => true) do |r| + expect(r.stderr).to match(/must receive at least one non empty value/) + end + end + end +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/acceptance/prefix_spec.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/acceptance/prefix_spec.rb new file mode 100755 index 00000000000..de55530eb26 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/acceptance/prefix_spec.rb @@ -0,0 +1,42 @@ +#! /usr/bin/env ruby -S rspec +require 'spec_helper_acceptance' + +describe 'prefix function', :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem')) do + describe 'success' do + it 'prefixes array of values' do + pp = <<-EOS + $o = prefix(['a','b','c'],'p') + notice(inline_template('prefix is <%= @o.inspect %>')) + EOS + + apply_manifest(pp, :catch_failures => true) do |r| + expect(r.stdout).to match(/prefix is \["pa", "pb", "pc"\]/) + end + end + it 'prefixs with empty array' do + pp = <<-EOS + $o = prefix([],'p') + notice(inline_template('prefix is <%= @o.inspect %>')) + EOS + + apply_manifest(pp, :catch_failures => true) do |r| + expect(r.stdout).to match(/prefix is \[\]/) + end + end + it 'prefixs array of values with undef' do + pp = <<-EOS + $o = prefix(['a','b','c'], undef) + notice(inline_template('prefix is <%= @o.inspect %>')) + EOS + + apply_manifest(pp, :catch_failures => true) do |r| + expect(r.stdout).to match(/prefix is \["a", "b", "c"\]/) + end + end + end + describe 'failure' do + it 'fails with no arguments' + it 'fails when first argument is not array' + it 'fails when second argument is not string' + end +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/acceptance/range_spec.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/acceptance/range_spec.rb new file mode 100755 index 00000000000..a3ccd3396aa --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/acceptance/range_spec.rb @@ -0,0 +1,36 @@ +#! /usr/bin/env ruby -S rspec +require 'spec_helper_acceptance' + +describe 'range function', :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem')) do + describe 'success' do + it 'ranges letters' do + pp = <<-EOS + $o = range('a','d') + notice(inline_template('range is <%= @o.inspect %>')) + EOS + + apply_manifest(pp, :catch_failures => true) do |r| + expect(r.stdout).to match(/range is \["a", "b", "c", "d"\]/) + end + end + it 'ranges letters with a step' do + pp = <<-EOS + $o = range('a','d', '2') + notice(inline_template('range is <%= @o.inspect %>')) + EOS + + apply_manifest(pp, :catch_failures => true) do |r| + expect(r.stdout).to match(/range is \["a", "c"\]/) + end + end + it 'ranges letters with a negative step' + it 'ranges numbers' + it 'ranges numbers with a step' + it 'ranges numbers with a negative step' + it 'ranges numeric strings' + it 'ranges zero padded numbers' + end + describe 'failure' do + it 'fails with no arguments' + end +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/acceptance/reject_spec.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/acceptance/reject_spec.rb new file mode 100755 index 00000000000..7f16a008dc4 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/acceptance/reject_spec.rb @@ -0,0 +1,42 @@ +#! /usr/bin/env ruby -S rspec +require 'spec_helper_acceptance' + +describe 'reject function', :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem')) do + describe 'success' do + it 'rejects array of values' do + pp = <<-EOS + $o = reject(['aaa','bbb','ccc','aaaddd'], 'aaa') + notice(inline_template('reject is <%= @o.inspect %>')) + EOS + + apply_manifest(pp, :catch_failures => true) do |r| + expect(r.stdout).to match(/reject is \["bbb", "ccc"\]/) + end + end + it 'rejects with empty array' do + pp = <<-EOS + $o = reject([],'aaa') + notice(inline_template('reject is <%= @o.inspect %>')) + EOS + + apply_manifest(pp, :catch_failures => true) do |r| + expect(r.stdout).to match(/reject is \[\]/) + end + end + it 'rejects array of values with undef' do + pp = <<-EOS + $o = reject(['aaa','bbb','ccc','aaaddd'], undef) + notice(inline_template('reject is <%= @o.inspect %>')) + EOS + + apply_manifest(pp, :catch_failures => true) do |r| + expect(r.stdout).to match(/reject is \[\]/) + end + end + end + describe 'failure' do + it 'fails with no arguments' + it 'fails when first argument is not array' + it 'fails when second argument is not string' + end +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/acceptance/reverse_spec.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/acceptance/reverse_spec.rb new file mode 100755 index 00000000000..c3f01567a64 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/acceptance/reverse_spec.rb @@ -0,0 +1,23 @@ +#! /usr/bin/env ruby -S rspec +require 'spec_helper_acceptance' + +describe 'reverse function', :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem')) do + describe 'success' do + it 'reverses strings' do + pp = <<-EOS + $a = "the public art galleries" + # Anagram: Large picture halls, I bet + $o = reverse($a) + notice(inline_template('reverse is <%= @o.inspect %>')) + EOS + + apply_manifest(pp, :catch_failures => true) do |r| + expect(r.stdout).to match(/reverse is "seirellag tra cilbup eht"/) + end + end + end + describe 'failure' do + it 'handles no arguments' + it 'handles non strings or arrays' + end +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/acceptance/rstrip_spec.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/acceptance/rstrip_spec.rb new file mode 100755 index 00000000000..b57a8b04581 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/acceptance/rstrip_spec.rb @@ -0,0 +1,34 @@ +#! /usr/bin/env ruby -S rspec +require 'spec_helper_acceptance' + +describe 'rstrip function', :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem')) do + describe 'success' do + it 'rstrips arrays' do + pp = <<-EOS + $a = [" the "," public "," art","galleries "] + # Anagram: Large picture halls, I bet + $o = rstrip($a) + notice(inline_template('rstrip is <%= @o.inspect %>')) + EOS + + apply_manifest(pp, :catch_failures => true) do |r| + expect(r.stdout).to match(/rstrip is \[" the", " public", " art", "galleries"\]/) + end + end + it 'rstrips strings' do + pp = <<-EOS + $a = " blowzy night-frumps vex'd jack q " + $o = rstrip($a) + notice(inline_template('rstrip is <%= @o.inspect %>')) + EOS + + apply_manifest(pp, :catch_failures => true) do |r| + expect(r.stdout).to match(/rstrip is " blowzy night-frumps vex'd jack q"/) + end + end + end + describe 'failure' do + it 'handles no arguments' + it 'handles non strings or arrays' + end +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/acceptance/shuffle_spec.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/acceptance/shuffle_spec.rb new file mode 100755 index 00000000000..02d1201dd0c --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/acceptance/shuffle_spec.rb @@ -0,0 +1,34 @@ +#! /usr/bin/env ruby -S rspec +require 'spec_helper_acceptance' + +describe 'shuffle function', :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem')) do + describe 'success' do + it 'shuffles arrays' do + pp = <<-EOS + $a = ["the","public","art","galleries"] + # Anagram: Large picture halls, I bet + $o = shuffle($a) + notice(inline_template('shuffle is <%= @o.inspect %>')) + EOS + + apply_manifest(pp, :catch_failures => true) do |r| + expect(r.stdout).to_not match(/shuffle is \["the", "public", "art", "galleries"\]/) + end + end + it 'shuffles strings' do + pp = <<-EOS + $a = "blowzy night-frumps vex'd jack q" + $o = shuffle($a) + notice(inline_template('shuffle is <%= @o.inspect %>')) + EOS + + apply_manifest(pp, :catch_failures => true) do |r| + expect(r.stdout).to_not match(/shuffle is "blowzy night-frumps vex'd jack q"/) + end + end + end + describe 'failure' do + it 'handles no arguments' + it 'handles non strings or arrays' + end +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/acceptance/size_spec.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/acceptance/size_spec.rb new file mode 100755 index 00000000000..a52b778bde6 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/acceptance/size_spec.rb @@ -0,0 +1,55 @@ +#! /usr/bin/env ruby -S rspec +require 'spec_helper_acceptance' + +describe 'size function', :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem')) do + describe 'success' do + it 'single string size' do + pp = <<-EOS + $a = 'discombobulate' + $o = size($a) + notice(inline_template('size is <%= @o.inspect %>')) + EOS + + apply_manifest(pp, :catch_failures => true) do |r| + expect(r.stdout).to match(/size is 14/) + end + end + it 'with empty string' do + pp = <<-EOS + $a = '' + $o = size($a) + notice(inline_template('size is <%= @o.inspect %>')) + EOS + + apply_manifest(pp, :catch_failures => true) do |r| + expect(r.stdout).to match(/size is 0/) + end + end + it 'with undef' do + pp = <<-EOS + $a = undef + $o = size($a) + notice(inline_template('size is <%= @o.inspect %>')) + EOS + + apply_manifest(pp, :catch_failures => true) do |r| + expect(r.stdout).to match(/size is 0/) + end + end + it 'strings in array' do + pp = <<-EOS + $a = ['discombobulate', 'moo'] + $o = size($a) + notice(inline_template('size is <%= @o.inspect %>')) + EOS + + apply_manifest(pp, :catch_failures => true) do |r| + expect(r.stdout).to match(/size is 2/) + end + end + end + describe 'failure' do + it 'handles no arguments' + it 'handles non strings or arrays' + end +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/acceptance/sort_spec.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/acceptance/sort_spec.rb new file mode 100755 index 00000000000..c85bfabd5c3 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/acceptance/sort_spec.rb @@ -0,0 +1,34 @@ +#! /usr/bin/env ruby -S rspec +require 'spec_helper_acceptance' + +describe 'sort function', :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem')) do + describe 'success' do + it 'sorts arrays' do + pp = <<-EOS + $a = ["the","public","art","galleries"] + # Anagram: Large picture halls, I bet + $o = sort($a) + notice(inline_template('sort is <%= @o.inspect %>')) + EOS + + apply_manifest(pp, :catch_failures => true) do |r| + expect(r.stdout).to match(/sort is \["art", "galleries", "public", "the"\]/) + end + end + it 'sorts strings' do + pp = <<-EOS + $a = "blowzy night-frumps vex'd jack q" + $o = sort($a) + notice(inline_template('sort is <%= @o.inspect %>')) + EOS + + apply_manifest(pp, :catch_failures => true) do |r| + expect(r.stdout).to match(/sort is " '-abcdefghijklmnopqrstuvwxyz"/) + end + end + end + describe 'failure' do + it 'handles no arguments' + it 'handles non strings or arrays' + end +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/acceptance/squeeze_spec.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/acceptance/squeeze_spec.rb new file mode 100755 index 00000000000..400a458c9b8 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/acceptance/squeeze_spec.rb @@ -0,0 +1,47 @@ +#! /usr/bin/env ruby -S rspec +require 'spec_helper_acceptance' + +describe 'squeeze function', :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem')) do + describe 'success' do + it 'squeezes arrays' do + pp = <<-EOS + # Real words! + $a = ["wallless", "laparohysterosalpingooophorectomy", "brrr", "goddessship"] + $o = squeeze($a) + notice(inline_template('squeeze is <%= @o.inspect %>')) + EOS + + apply_manifest(pp, :catch_failures => true) do |r| + expect(r.stdout).to match(/squeeze is \["wales", "laparohysterosalpingophorectomy", "br", "godeship"\]/) + end + end + it 'squeezez arrays with an argument' + it 'squeezes strings' do + pp = <<-EOS + $a = "wallless laparohysterosalpingooophorectomy brrr goddessship" + $o = squeeze($a) + notice(inline_template('squeeze is <%= @o.inspect %>')) + EOS + + apply_manifest(pp, :catch_failures => true) do |r| + expect(r.stdout).to match(/squeeze is "wales laparohysterosalpingophorectomy br godeship"/) + end + end + + it 'squeezes strings with an argument' do + pp = <<-EOS + $a = "countessship duchessship governessship hostessship" + $o = squeeze($a, 's') + notice(inline_template('squeeze is <%= @o.inspect %>')) + EOS + + apply_manifest(pp, :catch_failures => true) do |r| + expect(r.stdout).to match(/squeeze is "counteship ducheship governeship hosteship"/) + end + end + end + describe 'failure' do + it 'handles no arguments' + it 'handles non strings or arrays' + end +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/acceptance/str2bool_spec.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/acceptance/str2bool_spec.rb new file mode 100755 index 00000000000..cf549dab886 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/acceptance/str2bool_spec.rb @@ -0,0 +1,31 @@ +#! /usr/bin/env ruby -S rspec +require 'spec_helper_acceptance' + +describe 'str2bool function', :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem')) do + describe 'success' do + it 'works with "y"' do + pp = <<-EOS + $o = str2bool('y') + notice(inline_template('str2bool is <%= @o.inspect %>')) + EOS + + apply_manifest(pp, :catch_failures => true) do |r| + expect(r.stdout).to match(/str2bool is true/) + end + end + it 'works with "Y"' + it 'works with "yes"' + it 'works with "1"' + it 'works with "true"' + it 'works with "n"' + it 'works with "N"' + it 'works with "no"' + it 'works with "0"' + it 'works with "false"' + it 'works with undef' + end + describe 'failure' do + it 'handles no arguments' + it 'handles non arrays or strings' + end +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/acceptance/str2saltedsha512_spec.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/acceptance/str2saltedsha512_spec.rb new file mode 100755 index 00000000000..993e63baceb --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/acceptance/str2saltedsha512_spec.rb @@ -0,0 +1,22 @@ +#! /usr/bin/env ruby -S rspec +require 'spec_helper_acceptance' + +describe 'str2saltedsha512 function', :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem')) do + describe 'success' do + it 'works with "y"' do + pp = <<-EOS + $o = str2saltedsha512('password') + notice(inline_template('str2saltedsha512 is <%= @o.inspect %>')) + EOS + + apply_manifest(pp, :catch_failures => true) do |r| + expect(r.stdout).to match(/str2saltedsha512 is "[a-f0-9]{136}"/) + end + end + end + describe 'failure' do + it 'handles no arguments' + it 'handles more than one argument' + it 'handles non strings' + end +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/acceptance/strftime_spec.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/acceptance/strftime_spec.rb new file mode 100755 index 00000000000..53b7f903bec --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/acceptance/strftime_spec.rb @@ -0,0 +1,22 @@ +#! /usr/bin/env ruby -S rspec +require 'spec_helper_acceptance' + +describe 'strftime function', :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem')) do + describe 'success' do + it 'gives the Century' do + pp = <<-EOS + $o = strftime('%C') + notice(inline_template('strftime is <%= @o.inspect %>')) + EOS + + apply_manifest(pp, :catch_failures => true) do |r| + expect(r.stdout).to match(/strftime is "20"/) + end + end + it 'takes a timezone argument' + end + describe 'failure' do + it 'handles no arguments' + it 'handles invalid format strings' + end +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/acceptance/strip_spec.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/acceptance/strip_spec.rb new file mode 100755 index 00000000000..906fd7abed3 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/acceptance/strip_spec.rb @@ -0,0 +1,34 @@ +#! /usr/bin/env ruby -S rspec +require 'spec_helper_acceptance' + +describe 'strip function', :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem')) do + describe 'success' do + it 'strips arrays' do + pp = <<-EOS + $a = [" the "," public "," art","galleries "] + # Anagram: Large picture halls, I bet + $o = strip($a) + notice(inline_template('strip is <%= @o.inspect %>')) + EOS + + apply_manifest(pp, :catch_failures => true) do |r| + expect(r.stdout).to match(/strip is \["the", "public", "art", "galleries"\]/) + end + end + it 'strips strings' do + pp = <<-EOS + $a = " blowzy night-frumps vex'd jack q " + $o = strip($a) + notice(inline_template('strip is <%= @o.inspect %>')) + EOS + + apply_manifest(pp, :catch_failures => true) do |r| + expect(r.stdout).to match(/strip is "blowzy night-frumps vex'd jack q"/) + end + end + end + describe 'failure' do + it 'handles no arguments' + it 'handles non strings or arrays' + end +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/acceptance/suffix_spec.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/acceptance/suffix_spec.rb new file mode 100755 index 00000000000..630f866d700 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/acceptance/suffix_spec.rb @@ -0,0 +1,42 @@ +#! /usr/bin/env ruby -S rspec +require 'spec_helper_acceptance' + +describe 'suffix function', :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem')) do + describe 'success' do + it 'suffixes array of values' do + pp = <<-EOS + $o = suffix(['a','b','c'],'p') + notice(inline_template('suffix is <%= @o.inspect %>')) + EOS + + apply_manifest(pp, :catch_failures => true) do |r| + expect(r.stdout).to match(/suffix is \["ap", "bp", "cp"\]/) + end + end + it 'suffixs with empty array' do + pp = <<-EOS + $o = suffix([],'p') + notice(inline_template('suffix is <%= @o.inspect %>')) + EOS + + apply_manifest(pp, :catch_failures => true) do |r| + expect(r.stdout).to match(/suffix is \[\]/) + end + end + it 'suffixs array of values with undef' do + pp = <<-EOS + $o = suffix(['a','b','c'], undef) + notice(inline_template('suffix is <%= @o.inspect %>')) + EOS + + apply_manifest(pp, :catch_failures => true) do |r| + expect(r.stdout).to match(/suffix is \["a", "b", "c"\]/) + end + end + end + describe 'failure' do + it 'fails with no arguments' + it 'fails when first argument is not array' + it 'fails when second argument is not string' + end +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/acceptance/swapcase_spec.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/acceptance/swapcase_spec.rb new file mode 100755 index 00000000000..b7894fbe274 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/acceptance/swapcase_spec.rb @@ -0,0 +1,22 @@ +#! /usr/bin/env ruby -S rspec +require 'spec_helper_acceptance' + +describe 'swapcase function', :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem')) do + describe 'success' do + it 'works with strings' do + pp = <<-EOS + $o = swapcase('aBcD') + notice(inline_template('swapcase is <%= @o.inspect %>')) + EOS + + apply_manifest(pp, :catch_failures => true) do |r| + expect(r.stdout).to match(/swapcase is "AbCd"/) + end + end + it 'works with arrays' + end + describe 'failure' do + it 'handles no arguments' + it 'handles non arrays or strings' + end +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/acceptance/time_spec.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/acceptance/time_spec.rb new file mode 100755 index 00000000000..cdb296070cb --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/acceptance/time_spec.rb @@ -0,0 +1,36 @@ +#! /usr/bin/env ruby -S rspec +require 'spec_helper_acceptance' + +describe 'time function', :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem')) do + describe 'success' do + it 'gives the time' do + pp = <<-EOS + $o = time() + notice(inline_template('time is <%= @o.inspect %>')) + EOS + + apply_manifest(pp, :catch_failures => true) do |r| + m = r.stdout.match(/time is (\d+)\D/) + + # When I wrote this test + expect(Integer(m[1])).to be > 1398894170 + end + end + it 'takes a timezone argument' do + pp = <<-EOS + $o = time('UTC') + notice(inline_template('time is <%= @o.inspect %>')) + EOS + + apply_manifest(pp, :catch_failures => true) do |r| + m = r.stdout.match(/time is (\d+)\D/) + + expect(Integer(m[1])).to be > 1398894170 + end + end + end + describe 'failure' do + it 'handles more arguments' + it 'handles invalid timezones' + end +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/acceptance/to_bytes_spec.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/acceptance/to_bytes_spec.rb new file mode 100755 index 00000000000..2b4c61f48db --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/acceptance/to_bytes_spec.rb @@ -0,0 +1,27 @@ +#! /usr/bin/env ruby -S rspec +require 'spec_helper_acceptance' + +describe 'to_bytes function', :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem')) do + describe 'success' do + it 'converts kB to B' do + pp = <<-EOS + $o = to_bytes('4 kB') + notice(inline_template('to_bytes is <%= @o.inspect %>')) + EOS + + apply_manifest(pp, :catch_failures => true) do |r| + m = r.stdout.match(/to_bytes is (\d+)\D/) + expect(m[1]).to eq("4096") + end + end + it 'works without the B in unit' + it 'works without a space before unit' + it 'works without a unit' + it 'converts fractions' + end + describe 'failure' do + it 'handles no arguments' + it 'handles non integer arguments' + it 'handles unknown units like uB' + end +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/acceptance/type_spec.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/acceptance/type_spec.rb new file mode 100755 index 00000000000..0043aad7cdd --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/acceptance/type_spec.rb @@ -0,0 +1,37 @@ +#! /usr/bin/env ruby -S rspec +require 'spec_helper_acceptance' + +describe 'type function', :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem')) do + describe 'success' do + it 'types arrays' do + pp = <<-EOS + $a = ["the","public","art","galleries"] + # Anagram: Large picture halls, I bet + $o = type($a) + notice(inline_template('type is <%= @o.inspect %>')) + EOS + + apply_manifest(pp, :catch_failures => true) do |r| + expect(r.stdout).to match(/type is "array"/) + end + end + it 'types strings' do + pp = <<-EOS + $a = "blowzy night-frumps vex'd jack q" + $o = type($a) + notice(inline_template('type is <%= @o.inspect %>')) + EOS + + apply_manifest(pp, :catch_failures => true) do |r| + expect(r.stdout).to match(/type is "string"/) + end + end + it 'types hashes' + it 'types integers' + it 'types floats' + it 'types booleans' + end + describe 'failure' do + it 'handles no arguments' + end +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/acceptance/union_spec.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/acceptance/union_spec.rb new file mode 100755 index 00000000000..6db8d0cf96f --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/acceptance/union_spec.rb @@ -0,0 +1,24 @@ +#! /usr/bin/env ruby -S rspec +require 'spec_helper_acceptance' + +describe 'union function', :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem')) do + describe 'success' do + it 'unions arrays' do + pp = <<-EOS + $a = ["the","public"] + $b = ["art","galleries"] + # Anagram: Large picture halls, I bet + $o = union($a,$b) + notice(inline_template('union is <%= @o.inspect %>')) + EOS + + apply_manifest(pp, :catch_failures => true) do |r| + expect(r.stdout).to match(/union is \["the", "public", "art", "galleries"\]/) + end + end + end + describe 'failure' do + it 'handles no arguments' + it 'handles non arrays' + end +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/acceptance/unique_spec.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/acceptance/unique_spec.rb new file mode 100755 index 00000000000..bfadad19bf9 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/acceptance/unique_spec.rb @@ -0,0 +1,33 @@ +#! /usr/bin/env ruby -S rspec +require 'spec_helper_acceptance' + +describe 'unique function', :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem')) do + describe 'success' do + it 'uniques arrays' do + pp = <<-EOS + $a = ["wallless", "wallless", "brrr", "goddessship"] + $o = unique($a) + notice(inline_template('unique is <%= @o.inspect %>')) + EOS + + apply_manifest(pp, :catch_failures => true) do |r| + expect(r.stdout).to match(/unique is \["wallless", "brrr", "goddessship"\]/) + end + end + it 'uniques strings' do + pp = <<-EOS + $a = "wallless laparohysterosalpingooophorectomy brrr goddessship" + $o = unique($a) + notice(inline_template('unique is <%= @o.inspect %>')) + EOS + + apply_manifest(pp, :catch_failures => true) do |r| + expect(r.stdout).to match(/unique is "wales prohytingcmbd"/) + end + end + end + describe 'failure' do + it 'handles no arguments' + it 'handles non strings or arrays' + end +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/acceptance/unsupported_spec.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/acceptance/unsupported_spec.rb new file mode 100755 index 00000000000..1c559f67ecb --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/acceptance/unsupported_spec.rb @@ -0,0 +1,11 @@ +#! /usr/bin/env ruby -S rspec +require 'spec_helper_acceptance' + +describe 'unsupported distributions and OSes', :if => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem')) do + it 'should fail' do + pp = <<-EOS + class { 'mysql::server': } + EOS + expect(apply_manifest(pp, :expect_failures => true).stderr).to match(/unsupported osfamily/i) + end +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/acceptance/upcase_spec.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/acceptance/upcase_spec.rb new file mode 100755 index 00000000000..3d2906d7254 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/acceptance/upcase_spec.rb @@ -0,0 +1,33 @@ +#! /usr/bin/env ruby -S rspec +require 'spec_helper_acceptance' + +describe 'upcase function', :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem')) do + describe 'success' do + it 'upcases arrays' do + pp = <<-EOS + $a = ["wallless", "laparohysterosalpingooophorectomy", "brrr", "goddessship"] + $o = upcase($a) + notice(inline_template('upcase is <%= @o.inspect %>')) + EOS + + apply_manifest(pp, :catch_failures => true) do |r| + expect(r.stdout).to match(/upcase is \["WALLLESS", "LAPAROHYSTEROSALPINGOOOPHORECTOMY", "BRRR", "GODDESSSHIP"\]/) + end + end + it 'upcases strings' do + pp = <<-EOS + $a = "wallless laparohysterosalpingooophorectomy brrr goddessship" + $o = upcase($a) + notice(inline_template('upcase is <%= @o.inspect %>')) + EOS + + apply_manifest(pp, :catch_failures => true) do |r| + expect(r.stdout).to match(/upcase is "WALLLESS LAPAROHYSTEROSALPINGOOOPHORECTOMY BRRR GODDESSSHIP"/) + end + end + end + describe 'failure' do + it 'handles no arguments' + it 'handles non strings or arrays' + end +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/acceptance/uriescape_spec.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/acceptance/uriescape_spec.rb new file mode 100755 index 00000000000..7e30205e8dd --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/acceptance/uriescape_spec.rb @@ -0,0 +1,23 @@ +#! /usr/bin/env ruby -S rspec +require 'spec_helper_acceptance' + +describe 'uriescape function', :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem')) do + describe 'success' do + it 'uriescape strings' do + pp = <<-EOS + $a = ":/?#[]@!$&'()*+,;= \\\"{}" + $o = uriescape($a) + notice(inline_template('uriescape is <%= @o.inspect %>')) + EOS + + apply_manifest(pp, :catch_failures => true) do |r| + expect(r.stdout).to match(/uriescape is ":\/\?%23\[\]@!\$&'\(\)\*\+,;=%20%22%7B%7D"/) + end + end + it 'does nothing if a string is already safe' + end + describe 'failure' do + it 'handles no arguments' + it 'handles non strings or arrays' + end +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/acceptance/validate_absolute_path_spec.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/acceptance/validate_absolute_path_spec.rb new file mode 100755 index 00000000000..7082e848ef9 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/acceptance/validate_absolute_path_spec.rb @@ -0,0 +1,31 @@ +#! /usr/bin/env ruby -S rspec +require 'spec_helper_acceptance' + +describe 'validate_absolute_path function', :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem')) do + describe 'success' do + %w{ + C:/ + C:\\\\ + C:\\\\WINDOWS\\\\System32 + C:/windows/system32 + X:/foo/bar + X:\\\\foo\\\\bar + /var/tmp + /var/lib/puppet + /var/opt/../lib/puppet + }.each do |path| + it "validates a single argument #{path}" do + pp = <<-EOS + $one = '#{path}' + validate_absolute_path($one) + EOS + + apply_manifest(pp, :catch_failures => true) + end + end + end + describe 'failure' do + it 'handles improper number of arguments' + it 'handles relative paths' + end +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/acceptance/validate_array_spec.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/acceptance/validate_array_spec.rb new file mode 100755 index 00000000000..b53e98c273e --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/acceptance/validate_array_spec.rb @@ -0,0 +1,37 @@ +#! /usr/bin/env ruby -S rspec +require 'spec_helper_acceptance' + +describe 'validate_array function', :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem')) do + describe 'success' do + it 'validates a single argument' do + pp = <<-EOS + $one = ['a', 'b'] + validate_array($one) + EOS + + apply_manifest(pp, :catch_failures => true) + end + it 'validates an multiple arguments' do + pp = <<-EOS + $one = ['a', 'b'] + $two = [['c'], 'd'] + validate_array($one,$two) + EOS + + apply_manifest(pp, :catch_failures => true) + end + it 'validates a non-array' do + { + %{validate_array({'a' => 'hash' })} => "Hash", + %{validate_array('string')} => "String", + %{validate_array(false)} => "FalseClass", + %{validate_array(undef)} => "String" + }.each do |pp,type| + expect(apply_manifest(pp, :expect_failures => true).stderr).to match(/a #{type}/) + end + end + end + describe 'failure' do + it 'handles improper number of arguments' + end +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/acceptance/validate_augeas_spec.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/acceptance/validate_augeas_spec.rb new file mode 100755 index 00000000000..aeec67ae1b9 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/acceptance/validate_augeas_spec.rb @@ -0,0 +1,63 @@ +#! /usr/bin/env ruby -S rspec +require 'spec_helper_acceptance' + +describe 'validate_augeas function', :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem')) do + describe 'prep' do + it 'installs augeas for tests' + end + describe 'success' do + context 'valid inputs with no 3rd argument' do + { + 'root:x:0:0:root:/root:/bin/bash\n' => 'Passwd.lns', + 'proc /proc proc nodev,noexec,nosuid 0 0\n' => 'Fstab.lns' + }.each do |line,lens| + it "validates a single argument for #{lens}" do + pp = <<-EOS + $line = "#{line}" + $lens = "#{lens}" + validate_augeas($line, $lens) + EOS + + apply_manifest(pp, :catch_failures => true) + end + end + end + context 'valid inputs with 3rd and 4th arguments' do + it "validates a restricted value" do + line = 'root:x:0:0:root:/root:/bin/barsh\n' + lens = 'Passwd.lns' + restriction = '$file/*[shell="/bin/barsh"]' + pp = <<-EOS + $line = "#{line}" + $lens = "#{lens}" + $restriction = ['#{restriction}'] + validate_augeas($line, $lens, $restriction, "my custom failure message") + EOS + + expect(apply_manifest(pp, :expect_failures => true).stderr).to match(/my custom failure message/) + end + end + context 'invalid inputs' do + { + 'root:x:0:0:root' => 'Passwd.lns', + '127.0.1.1' => 'Hosts.lns' + }.each do |line,lens| + it "validates a single argument for #{lens}" do + pp = <<-EOS + $line = "#{line}" + $lens = "#{lens}" + validate_augeas($line, $lens) + EOS + + apply_manifest(pp, :expect_failures => true) + end + end + end + context 'garbage inputs' do + it 'raises an error on invalid inputs' + end + end + describe 'failure' do + it 'handles improper number of arguments' + end +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/acceptance/validate_bool_spec.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/acceptance/validate_bool_spec.rb new file mode 100755 index 00000000000..c837f089f29 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/acceptance/validate_bool_spec.rb @@ -0,0 +1,37 @@ +#! /usr/bin/env ruby -S rspec +require 'spec_helper_acceptance' + +describe 'validate_bool function', :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem')) do + describe 'success' do + it 'validates a single argument' do + pp = <<-EOS + $one = true + validate_bool($one) + EOS + + apply_manifest(pp, :catch_failures => true) + end + it 'validates an multiple arguments' do + pp = <<-EOS + $one = true + $two = false + validate_bool($one,$two) + EOS + + apply_manifest(pp, :catch_failures => true) + end + it 'validates a non-bool' do + { + %{validate_bool('true')} => "String", + %{validate_bool('false')} => "String", + %{validate_bool([true])} => "Array", + %{validate_bool(undef)} => "String", + }.each do |pp,type| + expect(apply_manifest(pp, :expect_failures => true).stderr).to match(/a #{type}/) + end + end + end + describe 'failure' do + it 'handles improper number of arguments' + end +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/acceptance/validate_cmd_spec.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/acceptance/validate_cmd_spec.rb new file mode 100755 index 00000000000..385676d14b0 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/acceptance/validate_cmd_spec.rb @@ -0,0 +1,50 @@ +#! /usr/bin/env ruby -S rspec +require 'spec_helper_acceptance' + +describe 'validate_cmd function', :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem')) do + describe 'success' do + it 'validates a true command' do + pp = <<-EOS + $one = 'foo' + if $::osfamily == 'windows' { + $two = 'echo' #shell built-in + } else { + $two = '/bin/echo' + } + validate_cmd($one,$two) + EOS + + apply_manifest(pp, :catch_failures => true) + end + it 'validates a fail command' do + pp = <<-EOS + $one = 'foo' + if $::osfamily == 'windows' { + $two = 'C:/aoeu' + } else { + $two = '/bin/aoeu' + } + validate_cmd($one,$two) + EOS + + apply_manifest(pp, :expect_failures => true) + end + it 'validates a fail command with a custom error message' do + pp = <<-EOS + $one = 'foo' + if $::osfamily == 'windows' { + $two = 'C:/aoeu' + } else { + $two = '/bin/aoeu' + } + validate_cmd($one,$two,"aoeu is dvorak) + EOS + + expect(apply_manifest(pp, :expect_failures => true).stderr).to match(/aoeu is dvorak/) + end + end + describe 'failure' do + it 'handles improper number of arguments' + it 'handles improper argument types' + end +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/acceptance/validate_hash_spec.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/acceptance/validate_hash_spec.rb new file mode 100755 index 00000000000..52fb615bdf4 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/acceptance/validate_hash_spec.rb @@ -0,0 +1,37 @@ +#! /usr/bin/env ruby -S rspec +require 'spec_helper_acceptance' + +describe 'validate_hash function', :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem')) do + describe 'success' do + it 'validates a single argument' do + pp = <<-EOS + $one = { 'a' => 1 } + validate_hash($one) + EOS + + apply_manifest(pp, :catch_failures => true) + end + it 'validates an multiple arguments' do + pp = <<-EOS + $one = { 'a' => 1 } + $two = { 'b' => 2 } + validate_hash($one,$two) + EOS + + apply_manifest(pp, :catch_failures => true) + end + it 'validates a non-hash' do + { + %{validate_hash('{ "not" => "hash" }')} => "String", + %{validate_hash('string')} => "String", + %{validate_hash(["array"])} => "Array", + %{validate_hash(undef)} => "String", + }.each do |pp,type| + expect(apply_manifest(pp, :expect_failures => true).stderr).to match(/a #{type}/) + end + end + end + describe 'failure' do + it 'handles improper number of arguments' + end +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/acceptance/validate_ipv4_address_spec.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/acceptance/validate_ipv4_address_spec.rb new file mode 100755 index 00000000000..64841c37163 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/acceptance/validate_ipv4_address_spec.rb @@ -0,0 +1,31 @@ +#! /usr/bin/env ruby -S rspec +require 'spec_helper_acceptance' + +describe 'validate_ipv4_address function', :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem')) do + describe 'success' do + it 'validates a single argument' do + pp = <<-EOS + $one = '1.2.3.4' + validate_ipv4_address($one) + EOS + + apply_manifest(pp, :catch_failures => true) + end + it 'validates an multiple arguments' do + pp = <<-EOS + $one = '1.2.3.4' + $two = '5.6.7.8' + validate_ipv4_address($one,$two) + EOS + + apply_manifest(pp, :catch_failures => true) + end + end + describe 'failure' do + it 'handles improper number of arguments' + it 'handles ipv6 addresses' + it 'handles non-ipv4 strings' + it 'handles numbers' + it 'handles no arguments' + end +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/acceptance/validate_ipv6_address_spec.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/acceptance/validate_ipv6_address_spec.rb new file mode 100755 index 00000000000..6426d1a526a --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/acceptance/validate_ipv6_address_spec.rb @@ -0,0 +1,31 @@ +#! /usr/bin/env ruby -S rspec +require 'spec_helper_acceptance' + +describe 'validate_ipv6_address function', :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem')) do + describe 'success' do + it 'validates a single argument' do + pp = <<-EOS + $one = '3ffe:0505:0002::' + validate_ipv6_address($one) + EOS + + apply_manifest(pp, :catch_failures => true) + end + it 'validates an multiple arguments' do + pp = <<-EOS + $one = '3ffe:0505:0002::' + $two = '3ffe:0505:0001::' + validate_ipv6_address($one,$two) + EOS + + apply_manifest(pp, :catch_failures => true) + end + end + describe 'failure' do + it 'handles improper number of arguments' + it 'handles ipv6 addresses' + it 'handles non-ipv6 strings' + it 'handles numbers' + it 'handles no arguments' + end +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/acceptance/validate_re_spec.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/acceptance/validate_re_spec.rb new file mode 100755 index 00000000000..22f6d47d1d1 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/acceptance/validate_re_spec.rb @@ -0,0 +1,47 @@ +#! /usr/bin/env ruby -S rspec +require 'spec_helper_acceptance' + +describe 'validate_re function', :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem')) do + describe 'success' do + it 'validates a string' do + pp = <<-EOS + $one = 'one' + $two = '^one$' + validate_re($one,$two) + EOS + + apply_manifest(pp, :catch_failures => true) + end + it 'validates an array' do + pp = <<-EOS + $one = 'one' + $two = ['^one$', '^two'] + validate_re($one,$two) + EOS + + apply_manifest(pp, :catch_failures => true) + end + it 'validates a failed array' do + pp = <<-EOS + $one = 'one' + $two = ['^two$', '^three'] + validate_re($one,$two) + EOS + + apply_manifest(pp, :expect_failures => true) + end + it 'validates a failed array with a custom error message' do + pp = <<-EOS + $one = '3.4.3' + $two = '^2.7' + validate_re($one,$two,"The $puppetversion fact does not match 2.7") + EOS + + expect(apply_manifest(pp, :expect_failures => true).stderr).to match(/does not match/) + end + end + describe 'failure' do + it 'handles improper number of arguments' + it 'handles improper argument types' + end +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/acceptance/validate_slength_spec.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/acceptance/validate_slength_spec.rb new file mode 100755 index 00000000000..1ab2bb986e8 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/acceptance/validate_slength_spec.rb @@ -0,0 +1,72 @@ +#! /usr/bin/env ruby -S rspec +require 'spec_helper_acceptance' + +describe 'validate_slength function', :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem')) do + describe 'success' do + it 'validates a single string max' do + pp = <<-EOS + $one = 'discombobulate' + $two = 17 + validate_slength($one,$two) + EOS + + apply_manifest(pp, :catch_failures => true) + end + it 'validates multiple string maxes' do + pp = <<-EOS + $one = ['discombobulate', 'moo'] + $two = 17 + validate_slength($one,$two) + EOS + + apply_manifest(pp, :catch_failures => true) + end + it 'validates min/max of strings in array' do + pp = <<-EOS + $one = ['discombobulate', 'moo'] + $two = 17 + $three = 3 + validate_slength($one,$two,$three) + EOS + + apply_manifest(pp, :catch_failures => true) + end + it 'validates a single string max of incorrect length' do + pp = <<-EOS + $one = 'discombobulate' + $two = 1 + validate_slength($one,$two) + EOS + + apply_manifest(pp, :expect_failures => true) + end + it 'validates multiple string maxes of incorrect length' do + pp = <<-EOS + $one = ['discombobulate', 'moo'] + $two = 3 + validate_slength($one,$two) + EOS + + apply_manifest(pp, :expect_failures => true) + end + it 'validates multiple strings min/maxes of incorrect length' do + pp = <<-EOS + $one = ['discombobulate', 'moo'] + $two = 17 + $three = 10 + validate_slength($one,$two,$three) + EOS + + apply_manifest(pp, :expect_failures => true) + end + end + describe 'failure' do + it 'handles improper number of arguments' + it 'handles improper first argument type' + it 'handles non-strings in array of first argument' + it 'handles improper second argument type' + it 'handles improper third argument type' + it 'handles negative ranges' + it 'handles improper ranges' + end +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/acceptance/validate_string_spec.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/acceptance/validate_string_spec.rb new file mode 100755 index 00000000000..8956f48c908 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/acceptance/validate_string_spec.rb @@ -0,0 +1,36 @@ +#! /usr/bin/env ruby -S rspec +require 'spec_helper_acceptance' + +describe 'validate_string function', :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem')) do + describe 'success' do + it 'validates a single argument' do + pp = <<-EOS + $one = 'string' + validate_string($one) + EOS + + apply_manifest(pp, :catch_failures => true) + end + it 'validates an multiple arguments' do + pp = <<-EOS + $one = 'string' + $two = 'also string' + validate_string($one,$two) + EOS + + apply_manifest(pp, :catch_failures => true) + end + it 'validates a non-string' do + { + %{validate_string({ 'a' => 'hash' })} => "Hash", + %{validate_string(['array'])} => "Array", + %{validate_string(false)} => "FalseClass", + }.each do |pp,type| + expect(apply_manifest(pp, :expect_failures => true).stderr).to match(/a #{type}/) + end + end + end + describe 'failure' do + it 'handles improper number of arguments' + end +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/acceptance/values_at_spec.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/acceptance/values_at_spec.rb new file mode 100755 index 00000000000..da63cf307a9 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/acceptance/values_at_spec.rb @@ -0,0 +1,73 @@ +#! /usr/bin/env ruby -S rspec +require 'spec_helper_acceptance' + +describe 'values_at function', :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem')) do + describe 'success' do + it 'returns a specific value' do + pp = <<-EOS + $one = ['a','b','c','d','e'] + $two = 1 + $output = values_at($one,$two) + notice(inline_template('<%= @output.inspect %>')) + EOS + + expect(apply_manifest(pp, :catch_failures => true).stdout).to match(/\["b"\]/) + end + it 'returns a specific negative index value' do + pending("negative numbers don't work") + pp = <<-EOS + $one = ['a','b','c','d','e'] + $two = -1 + $output = values_at($one,$two) + notice(inline_template('<%= @output.inspect %>')) + EOS + + expect(apply_manifest(pp, :catch_failures => true).stdout).to match(/\["e"\]/) + end + it 'returns a range of values' do + pp = <<-EOS + $one = ['a','b','c','d','e'] + $two = "1-3" + $output = values_at($one,$two) + notice(inline_template('<%= @output.inspect %>')) + EOS + + expect(apply_manifest(pp, :catch_failures => true).stdout).to match(/\["b", "c", "d"\]/) + end + it 'returns a negative specific value and range of values' do + pp = <<-EOS + $one = ['a','b','c','d','e'] + $two = ["1-3",0] + $output = values_at($one,$two) + notice(inline_template('<%= @output.inspect %>')) + EOS + + expect(apply_manifest(pp, :catch_failures => true).stdout).to match(/\["b", "c", "d", "a"\]/) + end + end + describe 'failure' do + it 'handles improper number of arguments' do + pp = <<-EOS + $one = ['a','b','c','d','e'] + $output = values_at($one) + notice(inline_template('<%= @output.inspect %>')) + EOS + + expect(apply_manifest(pp, :expect_failures => true).stderr).to match(/Wrong number of arguments/) + end + it 'handles non-indicies arguments' do + pp = <<-EOS + $one = ['a','b','c','d','e'] + $two = [] + $output = values_at($one,$two) + notice(inline_template('<%= @output.inspect %>')) + EOS + + expect(apply_manifest(pp, :expect_failures => true).stderr).to match(/at least one positive index/) + end + + it 'detects index ranges smaller than the start range' + it 'handles index ranges larger than array' + it 'handles non-integer indicies' + end +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/acceptance/values_spec.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/acceptance/values_spec.rb new file mode 100755 index 00000000000..7ef956e0489 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/acceptance/values_spec.rb @@ -0,0 +1,31 @@ +#! /usr/bin/env ruby -S rspec +require 'spec_helper_acceptance' + +describe 'values function', :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem')) do + describe 'success' do + it 'returns an array of values' do + pp = <<-EOS + $arg = { + 'a' => 1, + 'b' => 2, + 'c' => 3, + } + $output = values($arg) + notice(inline_template('<%= @output.sort.inspect %>')) + EOS + + expect(apply_manifest(pp, :catch_failures => true).stdout).to match(/\["1", "2", "3"\]/) + end + end + describe 'failure' do + it 'handles non-hash arguments' do + pp = <<-EOS + $arg = "foo" + $output = values($arg) + notice(inline_template('<%= @output.inspect %>')) + EOS + + expect(apply_manifest(pp, :expect_failures => true).stderr).to match(/Requires hash/) + end + end +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/acceptance/zip_spec.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/acceptance/zip_spec.rb new file mode 100755 index 00000000000..0e924e8492f --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/acceptance/zip_spec.rb @@ -0,0 +1,74 @@ +#! /usr/bin/env ruby -S rspec +require 'spec_helper_acceptance' +require 'puppet' + +describe 'zip function', :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem')) do + describe 'success' do + it 'zips two arrays of numbers together' do + pp = <<-EOS + $one = [1,2,3,4] + $two = [5,6,7,8] + $output = zip($one,$two) + notice(inline_template('<%= @output.inspect %>')) + EOS + + expect(apply_manifest(pp, :catch_failures => true).stdout).to match(/\[\["1", "5"\], \["2", "6"\], \["3", "7"\], \["4", "8"\]\]/) + end + it 'zips two arrays of numbers & bools together' do + pp = <<-EOS + $one = [1,2,"three",4] + $two = [true,true,false,false] + $output = zip($one,$two) + notice(inline_template('<%= @output.inspect %>')) + EOS + + expect(apply_manifest(pp, :catch_failures => true).stdout).to match(/\[\["1", true\], \["2", true\], \["three", false\], \["4", false\]\]/) + end + it 'zips two arrays of numbers together and flattens them' do + # XXX This only tests the argument `true`, even though the following are valid: + # 1 t y true yes + # 0 f n false no + # undef undefined + pp = <<-EOS + $one = [1,2,3,4] + $two = [5,6,7,8] + $output = zip($one,$two,true) + notice(inline_template('<%= @output.inspect %>')) + EOS + + expect(apply_manifest(pp, :catch_failures => true).stdout).to match(/\["1", "5", "2", "6", "3", "7", "4", "8"\]/) + end + it 'handles unmatched length' do + # XXX Is this expected behavior? + pp = <<-EOS + $one = [1,2] + $two = [5,6,7,8] + $output = zip($one,$two) + notice(inline_template('<%= @output.inspect %>')) + EOS + + expect(apply_manifest(pp, :catch_failures => true).stdout).to match(/\[\["1", "5"\], \["2", "6"\]\]/) + end + end + describe 'failure' do + it 'handles improper number of arguments' do + pp = <<-EOS + $one = [1,2] + $output = zip($one) + notice(inline_template('<%= @output.inspect %>')) + EOS + + expect(apply_manifest(pp, :expect_failures => true).stderr).to match(/Wrong number of arguments/) + end + it 'handles improper argument types' do + pp = <<-EOS + $one = "a string" + $two = [5,6,7,8] + $output = zip($one,$two) + notice(inline_template('<%= @output.inspect %>')) + EOS + + expect(apply_manifest(pp, :expect_failures => true).stderr).to match(/Requires array/) + end + end +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/classes/anchor_spec.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/classes/anchor_spec.rb new file mode 100755 index 00000000000..2d4455e417e --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/classes/anchor_spec.rb @@ -0,0 +1,30 @@ +#! /usr/bin/env ruby -S rspec +require 'spec_helper' +require 'puppet_spec/compiler' + +describe "anchorrefresh" do + include PuppetSpec::Compiler + + let :transaction do + apply_compiled_manifest(<<-ANCHORCLASS) + class anchored { + anchor { 'anchored::begin': } + ~> anchor { 'anchored::end': } + } + + class anchorrefresh { + notify { 'first': } + ~> class { 'anchored': } + ~> anchor { 'final': } + } + + include anchorrefresh + ANCHORCLASS + end + + it 'propagates events through the anchored class' do + resource = transaction.resource_status('Anchor[final]') + + expect(resource.restarted).to eq(true) + end +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/fixtures/dscacheutil/root b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/fixtures/dscacheutil/root new file mode 100644 index 00000000000..1e34519b2af --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/fixtures/dscacheutil/root @@ -0,0 +1,8 @@ +name: root +password: * +uid: 0 +gid: 0 +dir: /var/root +shell: /bin/bash +gecos: rawr Root + diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/functions/abs_spec.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/functions/abs_spec.rb new file mode 100755 index 00000000000..c0b42970c52 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/functions/abs_spec.rb @@ -0,0 +1,25 @@ +#! /usr/bin/env ruby -S rspec + +require 'spec_helper' + +describe "the abs function" do + let(:scope) { PuppetlabsSpec::PuppetInternals.scope } + + it "should exist" do + Puppet::Parser::Functions.function("abs").should == "function_abs" + end + + it "should raise a ParseError if there is less than 1 arguments" do + lambda { scope.function_abs([]) }.should( raise_error(Puppet::ParseError)) + end + + it "should convert a negative number into a positive" do + result = scope.function_abs(["-34"]) + result.should(eq(34)) + end + + it "should do nothing with a positive number" do + result = scope.function_abs(["5678"]) + result.should(eq(5678)) + end +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/functions/any2array_spec.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/functions/any2array_spec.rb new file mode 100755 index 00000000000..b266e84f4f3 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/functions/any2array_spec.rb @@ -0,0 +1,55 @@ +#! /usr/bin/env ruby -S rspec +require 'spec_helper' + +describe "the any2array function" do + let(:scope) { PuppetlabsSpec::PuppetInternals.scope } + + it "should exist" do + Puppet::Parser::Functions.function("any2array").should == "function_any2array" + end + + it "should return an empty array if there is less than 1 argument" do + result = scope.function_any2array([]) + result.should(eq([])) + end + + it "should convert boolean true to [ true ] " do + result = scope.function_any2array([true]) + result.should(eq([true])) + end + + it "should convert one object to [object]" do + result = scope.function_any2array(['one']) + result.should(eq(['one'])) + end + + it "should convert multiple objects to [objects]" do + result = scope.function_any2array(['one', 'two']) + result.should(eq(['one', 'two'])) + end + + it "should return empty array it was called with" do + result = scope.function_any2array([[]]) + result.should(eq([])) + end + + it "should return one-member array it was called with" do + result = scope.function_any2array([['string']]) + result.should(eq(['string'])) + end + + it "should return multi-member array it was called with" do + result = scope.function_any2array([['one', 'two']]) + result.should(eq(['one', 'two'])) + end + + it "should return members of a hash it was called with" do + result = scope.function_any2array([{ 'key' => 'value' }]) + result.should(eq(['key', 'value'])) + end + + it "should return an empty array if it was called with an empty hash" do + result = scope.function_any2array([{ }]) + result.should(eq([])) + end +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/functions/base64_spec.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/functions/base64_spec.rb new file mode 100755 index 00000000000..5faa5e66c73 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/functions/base64_spec.rb @@ -0,0 +1,34 @@ +#! /usr/bin/env ruby -S rspec + +require 'spec_helper' + +describe "the base64 function" do + let(:scope) { PuppetlabsSpec::PuppetInternals.scope } + + it "should exist" do + Puppet::Parser::Functions.function("base64").should == "function_base64" + end + + it "should raise a ParseError if there are other than 2 arguments" do + expect { scope.function_base64([]) }.to(raise_error(Puppet::ParseError)) + expect { scope.function_base64(["asdf"]) }.to(raise_error(Puppet::ParseError)) + expect { scope.function_base64(["asdf","moo","cow"]) }.to(raise_error(Puppet::ParseError)) + end + + it "should raise a ParseError if argument 1 isn't 'encode' or 'decode'" do + expect { scope.function_base64(["bees","astring"]) }.to(raise_error(Puppet::ParseError, /first argument must be one of/)) + end + + it "should raise a ParseError if argument 2 isn't a string" do + expect { scope.function_base64(["encode",["2"]]) }.to(raise_error(Puppet::ParseError, /second argument must be a string/)) + end + + it "should encode a encoded string" do + result = scope.function_base64(["encode",'thestring']) + result.should =~ /\AdGhlc3RyaW5n\n\Z/ + end + it "should decode a base64 encoded string" do + result = scope.function_base64(["decode",'dGhlc3RyaW5n']) + result.should == 'thestring' + end +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/functions/bool2num_spec.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/functions/bool2num_spec.rb new file mode 100755 index 00000000000..518ac85ec5f --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/functions/bool2num_spec.rb @@ -0,0 +1,24 @@ +#! /usr/bin/env ruby -S rspec +require 'spec_helper' + +describe "the bool2num function" do + let(:scope) { PuppetlabsSpec::PuppetInternals.scope } + + it "should exist" do + Puppet::Parser::Functions.function("bool2num").should == "function_bool2num" + end + + it "should raise a ParseError if there is less than 1 arguments" do + lambda { scope.function_bool2num([]) }.should( raise_error(Puppet::ParseError)) + end + + it "should convert true to 1" do + result = scope.function_bool2num([true]) + result.should(eq(1)) + end + + it "should convert false to 0" do + result = scope.function_bool2num([false]) + result.should(eq(0)) + end +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/functions/capitalize_spec.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/functions/capitalize_spec.rb new file mode 100755 index 00000000000..69c9758f25b --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/functions/capitalize_spec.rb @@ -0,0 +1,19 @@ +#! /usr/bin/env ruby -S rspec +require 'spec_helper' + +describe "the capitalize function" do + let(:scope) { PuppetlabsSpec::PuppetInternals.scope } + + it "should exist" do + Puppet::Parser::Functions.function("capitalize").should == "function_capitalize" + end + + it "should raise a ParseError if there is less than 1 arguments" do + lambda { scope.function_capitalize([]) }.should( raise_error(Puppet::ParseError)) + end + + it "should capitalize the beginning of a string" do + result = scope.function_capitalize(["abc"]) + result.should(eq("Abc")) + end +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/functions/chomp_spec.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/functions/chomp_spec.rb new file mode 100755 index 00000000000..e425365fcb0 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/functions/chomp_spec.rb @@ -0,0 +1,19 @@ +#! /usr/bin/env ruby -S rspec +require 'spec_helper' + +describe "the chomp function" do + let(:scope) { PuppetlabsSpec::PuppetInternals.scope } + + it "should exist" do + Puppet::Parser::Functions.function("chomp").should == "function_chomp" + end + + it "should raise a ParseError if there is less than 1 arguments" do + lambda { scope.function_chomp([]) }.should( raise_error(Puppet::ParseError)) + end + + it "should chomp the end of a string" do + result = scope.function_chomp(["abc\n"]) + result.should(eq("abc")) + end +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/functions/chop_spec.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/functions/chop_spec.rb new file mode 100755 index 00000000000..9e466de4b69 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/functions/chop_spec.rb @@ -0,0 +1,19 @@ +#! /usr/bin/env ruby -S rspec +require 'spec_helper' + +describe "the chop function" do + let(:scope) { PuppetlabsSpec::PuppetInternals.scope } + + it "should exist" do + Puppet::Parser::Functions.function("chop").should == "function_chop" + end + + it "should raise a ParseError if there is less than 1 arguments" do + lambda { scope.function_chop([]) }.should( raise_error(Puppet::ParseError)) + end + + it "should chop the end of a string" do + result = scope.function_chop(["asdf\n"]) + result.should(eq("asdf")) + end +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/functions/concat_spec.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/functions/concat_spec.rb new file mode 100755 index 00000000000..6e67620966b --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/functions/concat_spec.rb @@ -0,0 +1,30 @@ +#! /usr/bin/env ruby -S rspec +require 'spec_helper' + +describe "the concat function" do + let(:scope) { PuppetlabsSpec::PuppetInternals.scope } + + it "should raise a ParseError if the client does not provide two arguments" do + lambda { scope.function_concat([]) }.should(raise_error(Puppet::ParseError)) + end + + it "should raise a ParseError if the first parameter is not an array" do + lambda { scope.function_concat([1, []])}.should(raise_error(Puppet::ParseError)) + end + + it "should be able to concat an array" do + result = scope.function_concat([['1','2','3'],['4','5','6']]) + result.should(eq(['1','2','3','4','5','6'])) + end + + it "should be able to concat a primitive to an array" do + result = scope.function_concat([['1','2','3'],'4']) + result.should(eq(['1','2','3','4'])) + end + + it "should not accidentally flatten nested arrays" do + result = scope.function_concat([['1','2','3'],[['4','5'],'6']]) + result.should(eq(['1','2','3',['4','5'],'6'])) + end + +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/functions/count_spec.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/functions/count_spec.rb new file mode 100755 index 00000000000..2453815c26d --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/functions/count_spec.rb @@ -0,0 +1,31 @@ +#! /usr/bin/env ruby -S rspec + +require 'spec_helper' + +describe "the count function" do + let(:scope) { PuppetlabsSpec::PuppetInternals.scope } + + it "should exist" do + Puppet::Parser::Functions.function("count").should == "function_count" + end + + it "should raise a ArgumentError if there is more than 2 arguments" do + lambda { scope.function_count(['foo', 'bar', 'baz']) }.should( raise_error(ArgumentError)) + end + + it "should be able to count arrays" do + scope.function_count([["1","2","3"]]).should(eq(3)) + end + + it "should be able to count matching elements in arrays" do + scope.function_count([["1", "2", "2"], "2"]).should(eq(2)) + end + + it "should not count nil or empty strings" do + scope.function_count([["foo","bar",nil,""]]).should(eq(2)) + end + + it 'does not count an undefined hash key or an out of bound array index (which are both :undef)' do + expect(scope.function_count([["foo",:undef,:undef]])).to eq(1) + end +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/functions/deep_merge_spec.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/functions/deep_merge_spec.rb new file mode 100755 index 00000000000..f1347014cf2 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/functions/deep_merge_spec.rb @@ -0,0 +1,105 @@ +#! /usr/bin/env ruby -S rspec + +require 'spec_helper' + +describe Puppet::Parser::Functions.function(:deep_merge) do + let(:scope) { PuppetlabsSpec::PuppetInternals.scope } + + describe 'when calling deep_merge from puppet' do + it "should not compile when no arguments are passed" do + pending("Fails on 2.6.x, see bug #15912") if Puppet.version =~ /^2\.6\./ + Puppet[:code] = '$x = deep_merge()' + expect { + scope.compiler.compile + }.to raise_error(Puppet::ParseError, /wrong number of arguments/) + end + + it "should not compile when 1 argument is passed" do + pending("Fails on 2.6.x, see bug #15912") if Puppet.version =~ /^2\.6\./ + Puppet[:code] = "$my_hash={'one' => 1}\n$x = deep_merge($my_hash)" + expect { + scope.compiler.compile + }.to raise_error(Puppet::ParseError, /wrong number of arguments/) + end + end + + describe 'when calling deep_merge on the scope instance' do + it 'should require all parameters are hashes' do + expect { new_hash = scope.function_deep_merge([{}, '2'])}.to raise_error(Puppet::ParseError, /unexpected argument type String/) + expect { new_hash = scope.function_deep_merge([{}, 2])}.to raise_error(Puppet::ParseError, /unexpected argument type Fixnum/) + end + + it 'should accept empty strings as puppet undef' do + expect { new_hash = scope.function_deep_merge([{}, ''])}.not_to raise_error + end + + it 'should be able to deep_merge two hashes' do + new_hash = scope.function_deep_merge([{'one' => '1', 'two' => '1'}, {'two' => '2', 'three' => '2'}]) + new_hash['one'].should == '1' + new_hash['two'].should == '2' + new_hash['three'].should == '2' + end + + it 'should deep_merge multiple hashes' do + hash = scope.function_deep_merge([{'one' => 1}, {'one' => '2'}, {'one' => '3'}]) + hash['one'].should == '3' + end + + it 'should accept empty hashes' do + scope.function_deep_merge([{},{},{}]).should == {} + end + + it 'should deep_merge subhashes' do + hash = scope.function_deep_merge([{'one' => 1}, {'two' => 2, 'three' => { 'four' => 4 } }]) + hash['one'].should == 1 + hash['two'].should == 2 + hash['three'].should == { 'four' => 4 } + end + + it 'should append to subhashes' do + hash = scope.function_deep_merge([{'one' => { 'two' => 2 } }, { 'one' => { 'three' => 3 } }]) + hash['one'].should == { 'two' => 2, 'three' => 3 } + end + + it 'should append to subhashes 2' do + hash = scope.function_deep_merge([{'one' => 1, 'two' => 2, 'three' => { 'four' => 4 } }, {'two' => 'dos', 'three' => { 'five' => 5 } }]) + hash['one'].should == 1 + hash['two'].should == 'dos' + hash['three'].should == { 'four' => 4, 'five' => 5 } + end + + it 'should append to subhashes 3' do + hash = scope.function_deep_merge([{ 'key1' => { 'a' => 1, 'b' => 2 }, 'key2' => { 'c' => 3 } }, { 'key1' => { 'b' => 99 } }]) + hash['key1'].should == { 'a' => 1, 'b' => 99 } + hash['key2'].should == { 'c' => 3 } + end + + it 'should not change the original hashes' do + hash1 = {'one' => { 'two' => 2 } } + hash2 = { 'one' => { 'three' => 3 } } + hash = scope.function_deep_merge([hash1, hash2]) + hash1.should == {'one' => { 'two' => 2 } } + hash2.should == { 'one' => { 'three' => 3 } } + hash['one'].should == { 'two' => 2, 'three' => 3 } + end + + it 'should not change the original hashes 2' do + hash1 = {'one' => { 'two' => [1,2] } } + hash2 = { 'one' => { 'three' => 3 } } + hash = scope.function_deep_merge([hash1, hash2]) + hash1.should == {'one' => { 'two' => [1,2] } } + hash2.should == { 'one' => { 'three' => 3 } } + hash['one'].should == { 'two' => [1,2], 'three' => 3 } + end + + it 'should not change the original hashes 3' do + hash1 = {'one' => { 'two' => [1,2, {'two' => 2} ] } } + hash2 = { 'one' => { 'three' => 3 } } + hash = scope.function_deep_merge([hash1, hash2]) + hash1.should == {'one' => { 'two' => [1,2, {'two' => 2}] } } + hash2.should == { 'one' => { 'three' => 3 } } + hash['one'].should == { 'two' => [1,2, {'two' => 2} ], 'three' => 3 } + hash['one']['two'].should == [1,2, {'two' => 2}] + end + end +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/functions/defined_with_params_spec.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/functions/defined_with_params_spec.rb new file mode 100755 index 00000000000..28dbab31192 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/functions/defined_with_params_spec.rb @@ -0,0 +1,37 @@ +#! /usr/bin/env ruby -S rspec +require 'spec_helper' + +require 'rspec-puppet' +describe 'defined_with_params' do + describe 'when a resource is not specified' do + it { should run.with_params().and_raise_error(ArgumentError) } + end + describe 'when compared against a resource with no attributes' do + let :pre_condition do + 'user { "dan": }' + end + it do + should run.with_params('User[dan]', {}).and_return(true) + should run.with_params('User[bob]', {}).and_return(false) + should run.with_params('User[dan]', {'foo' => 'bar'}).and_return(false) + end + end + + describe 'when compared against a resource with attributes' do + let :pre_condition do + 'user { "dan": ensure => present, shell => "/bin/csh", managehome => false}' + end + it do + should run.with_params('User[dan]', {}).and_return(true) + should run.with_params('User[dan]', '').and_return(true) + should run.with_params('User[dan]', {'ensure' => 'present'} + ).and_return(true) + should run.with_params('User[dan]', + {'ensure' => 'present', 'managehome' => false} + ).and_return(true) + should run.with_params('User[dan]', + {'ensure' => 'absent', 'managehome' => false} + ).and_return(false) + end + end +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/functions/delete_at_spec.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/functions/delete_at_spec.rb new file mode 100755 index 00000000000..593cf45929f --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/functions/delete_at_spec.rb @@ -0,0 +1,25 @@ +#! /usr/bin/env ruby -S rspec +require 'spec_helper' + +describe "the delete_at function" do + let(:scope) { PuppetlabsSpec::PuppetInternals.scope } + + it "should exist" do + Puppet::Parser::Functions.function("delete_at").should == "function_delete_at" + end + + it "should raise a ParseError if there is less than 1 arguments" do + lambda { scope.function_delete_at([]) }.should( raise_error(Puppet::ParseError)) + end + + it "should delete an item at specified location from an array" do + result = scope.function_delete_at([['a','b','c'],1]) + result.should(eq(['a','c'])) + end + + it "should not change origin array passed as argument" do + origin_array = ['a','b','c','d'] + result = scope.function_delete_at([origin_array, 1]) + origin_array.should(eq(['a','b','c','d'])) + end +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/functions/delete_spec.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/functions/delete_spec.rb new file mode 100755 index 00000000000..1508a63e914 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/functions/delete_spec.rb @@ -0,0 +1,56 @@ +#! /usr/bin/env ruby -S rspec +require 'spec_helper' + +describe "the delete function" do + let(:scope) { PuppetlabsSpec::PuppetInternals.scope } + + it "should exist" do + Puppet::Parser::Functions.function("delete").should == "function_delete" + end + + it "should raise a ParseError if there are fewer than 2 arguments" do + lambda { scope.function_delete([]) }.should( raise_error(Puppet::ParseError)) + end + + it "should raise a ParseError if there are greater than 2 arguments" do + lambda { scope.function_delete([[], 'foo', 'bar']) }.should( raise_error(Puppet::ParseError)) + end + + it "should raise a TypeError if a number is passed as the first argument" do + lambda { scope.function_delete([1, 'bar']) }.should( raise_error(TypeError)) + end + + it "should delete all instances of an element from an array" do + result = scope.function_delete([['a','b','c','b'],'b']) + result.should(eq(['a','c'])) + end + + it "should delete all instances of a substring from a string" do + result = scope.function_delete(['foobarbabarz','bar']) + result.should(eq('foobaz')) + end + + it "should delete a key from a hash" do + result = scope.function_delete([{ 'a' => 1, 'b' => 2, 'c' => 3 },'b']) + result.should(eq({ 'a' => 1, 'c' => 3 })) + end + + it "should not change origin array passed as argument" do + origin_array = ['a','b','c','d'] + result = scope.function_delete([origin_array, 'b']) + origin_array.should(eq(['a','b','c','d'])) + end + + it "should not change the origin string passed as argument" do + origin_string = 'foobarbabarz' + result = scope.function_delete([origin_string,'bar']) + origin_string.should(eq('foobarbabarz')) + end + + it "should not change origin hash passed as argument" do + origin_hash = { 'a' => 1, 'b' => 2, 'c' => 3 } + result = scope.function_delete([origin_hash, 'b']) + origin_hash.should(eq({ 'a' => 1, 'b' => 2, 'c' => 3 })) + end + +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/functions/delete_undef_values_spec.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/functions/delete_undef_values_spec.rb new file mode 100755 index 00000000000..b341d888ae1 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/functions/delete_undef_values_spec.rb @@ -0,0 +1,41 @@ +#! /usr/bin/env ruby -S rspec +require 'spec_helper' + +describe "the delete_undef_values function" do + let(:scope) { PuppetlabsSpec::PuppetInternals.scope } + + it "should exist" do + Puppet::Parser::Functions.function("delete_undef_values").should == "function_delete_undef_values" + end + + it "should raise a ParseError if there is less than 1 argument" do + lambda { scope.function_delete_undef_values([]) }.should( raise_error(Puppet::ParseError)) + end + + it "should raise a ParseError if the argument is not Array nor Hash" do + lambda { scope.function_delete_undef_values(['']) }.should( raise_error(Puppet::ParseError)) + lambda { scope.function_delete_undef_values([nil]) }.should( raise_error(Puppet::ParseError)) + end + + it "should delete all undef items from Array and only these" do + result = scope.function_delete_undef_values([['a',:undef,'c','undef']]) + result.should(eq(['a','c','undef'])) + end + + it "should delete all undef items from Hash and only these" do + result = scope.function_delete_undef_values([{'a'=>'A','b'=>:undef,'c'=>'C','d'=>'undef'}]) + result.should(eq({'a'=>'A','c'=>'C','d'=>'undef'})) + end + + it "should not change origin array passed as argument" do + origin_array = ['a',:undef,'c','undef'] + result = scope.function_delete_undef_values([origin_array]) + origin_array.should(eq(['a',:undef,'c','undef'])) + end + + it "should not change origin hash passed as argument" do + origin_hash = { 'a' => 1, 'b' => :undef, 'c' => 'undef' } + result = scope.function_delete_undef_values([origin_hash]) + origin_hash.should(eq({ 'a' => 1, 'b' => :undef, 'c' => 'undef' })) + end +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/functions/delete_values_spec.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/functions/delete_values_spec.rb new file mode 100755 index 00000000000..8d7f2315d46 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/functions/delete_values_spec.rb @@ -0,0 +1,36 @@ +#! /usr/bin/env ruby -S rspec +require 'spec_helper' + +describe "the delete_values function" do + let(:scope) { PuppetlabsSpec::PuppetInternals.scope } + + it "should exist" do + Puppet::Parser::Functions.function("delete_values").should == "function_delete_values" + end + + it "should raise a ParseError if there are fewer than 2 arguments" do + lambda { scope.function_delete_values([]) }.should( raise_error(Puppet::ParseError)) + end + + it "should raise a ParseError if there are greater than 2 arguments" do + lambda { scope.function_delete_values([[], 'foo', 'bar']) }.should( raise_error(Puppet::ParseError)) + end + + it "should raise a TypeError if the argument is not a hash" do + lambda { scope.function_delete_values([1,'bar']) }.should( raise_error(TypeError)) + lambda { scope.function_delete_values(['foo','bar']) }.should( raise_error(TypeError)) + lambda { scope.function_delete_values([[],'bar']) }.should( raise_error(TypeError)) + end + + it "should delete all instances of a value from a hash" do + result = scope.function_delete_values([{ 'a'=>'A', 'b'=>'B', 'B'=>'C', 'd'=>'B' },'B']) + result.should(eq({ 'a'=>'A', 'B'=>'C' })) + end + + it "should not change origin hash passed as argument" do + origin_hash = { 'a' => 1, 'b' => 2, 'c' => 3 } + result = scope.function_delete_values([origin_hash, 2]) + origin_hash.should(eq({ 'a' => 1, 'b' => 2, 'c' => 3 })) + end + +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/functions/difference_spec.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/functions/difference_spec.rb new file mode 100755 index 00000000000..9feff091890 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/functions/difference_spec.rb @@ -0,0 +1,19 @@ +#! /usr/bin/env ruby -S rspec +require 'spec_helper' + +describe "the difference function" do + let(:scope) { PuppetlabsSpec::PuppetInternals.scope } + + it "should exist" do + Puppet::Parser::Functions.function("difference").should == "function_difference" + end + + it "should raise a ParseError if there are fewer than 2 arguments" do + lambda { scope.function_difference([]) }.should( raise_error(Puppet::ParseError) ) + end + + it "should return the difference between two arrays" do + result = scope.function_difference([["a","b","c"],["b","c","d"]]) + result.should(eq(["a"])) + end +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/functions/dirname_spec.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/functions/dirname_spec.rb new file mode 100755 index 00000000000..fb3b4feca77 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/functions/dirname_spec.rb @@ -0,0 +1,24 @@ +#! /usr/bin/env ruby -S rspec +require 'spec_helper' + +describe "the dirname function" do + let(:scope) { PuppetlabsSpec::PuppetInternals.scope } + + it "should exist" do + Puppet::Parser::Functions.function("dirname").should == "function_dirname" + end + + it "should raise a ParseError if there is less than 1 arguments" do + lambda { scope.function_dirname([]) }.should( raise_error(Puppet::ParseError)) + end + + it "should return dirname for an absolute path" do + result = scope.function_dirname(['/path/to/a/file.ext']) + result.should(eq('/path/to/a')) + end + + it "should return dirname for a relative path" do + result = scope.function_dirname(['path/to/a/file.ext']) + result.should(eq('path/to/a')) + end +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/functions/downcase_spec.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/functions/downcase_spec.rb new file mode 100755 index 00000000000..acef1f05d92 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/functions/downcase_spec.rb @@ -0,0 +1,24 @@ +#! /usr/bin/env ruby -S rspec +require 'spec_helper' + +describe "the downcase function" do + let(:scope) { PuppetlabsSpec::PuppetInternals.scope } + + it "should exist" do + Puppet::Parser::Functions.function("downcase").should == "function_downcase" + end + + it "should raise a ParseError if there is less than 1 arguments" do + lambda { scope.function_downcase([]) }.should( raise_error(Puppet::ParseError)) + end + + it "should downcase a string" do + result = scope.function_downcase(["ASFD"]) + result.should(eq("asfd")) + end + + it "should do nothing to a string that is already downcase" do + result = scope.function_downcase(["asdf asdf"]) + result.should(eq("asdf asdf")) + end +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/functions/empty_spec.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/functions/empty_spec.rb new file mode 100755 index 00000000000..77458752248 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/functions/empty_spec.rb @@ -0,0 +1,23 @@ +#! /usr/bin/env ruby -S rspec +require 'spec_helper' + +describe "the empty function" do + let(:scope) { PuppetlabsSpec::PuppetInternals.scope } + it "should exist" do + Puppet::Parser::Functions.function("empty").should == "function_empty" + end + + it "should raise a ParseError if there is less than 1 arguments" do + lambda { scope.function_empty([]) }.should( raise_error(Puppet::ParseError)) + end + + it "should return a true for an empty string" do + result = scope.function_empty(['']) + result.should(eq(true)) + end + + it "should return a false for a non-empty string" do + result = scope.function_empty(['asdf']) + result.should(eq(false)) + end +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/functions/ensure_packages_spec.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/functions/ensure_packages_spec.rb new file mode 100755 index 00000000000..436be10bc4e --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/functions/ensure_packages_spec.rb @@ -0,0 +1,81 @@ +#! /usr/bin/env ruby + +require 'spec_helper' +require 'rspec-puppet' +require 'puppet_spec/compiler' + +describe 'ensure_packages' do + include PuppetSpec::Compiler + + before :each do + Puppet::Parser::Functions.autoloader.loadall + Puppet::Parser::Functions.function(:ensure_packages) + Puppet::Parser::Functions.function(:ensure_resource) + Puppet::Parser::Functions.function(:defined_with_params) + Puppet::Parser::Functions.function(:create_resources) + end + + let :node do Puppet::Node.new('localhost') end + let :compiler do Puppet::Parser::Compiler.new(node) end + let :scope do + if Puppet.version.to_f >= 3.0 + Puppet::Parser::Scope.new(compiler) + else + newscope = Puppet::Parser::Scope.new + newscope.compiler = compiler + newscope.source = Puppet::Resource::Type.new(:node, :localhost) + newscope + end + end + + describe 'argument handling' do + it 'fails with no arguments' do + expect { + scope.function_ensure_packages([]) + }.to raise_error(Puppet::ParseError, /0 for 1 or 2/) + end + + it 'accepts an array of values' do + scope.function_ensure_packages([['foo']]) + end + + it 'accepts a single package name as a string' do + scope.function_ensure_packages(['foo']) + end + end + + context 'given a catalog with puppet package => absent' do + let :catalog do + compile_to_catalog(<<-EOS + ensure_packages(['facter']) + package { puppet: ensure => absent } + EOS + ) + end + + it 'has no effect on Package[puppet]' do + expect(catalog.resource(:package, 'puppet')['ensure']).to eq('absent') + end + end + + context 'given a clean catalog' do + let :catalog do + compile_to_catalog('ensure_packages(["facter"])') + end + + it 'declares package resources with ensure => present' do + expect(catalog.resource(:package, 'facter')['ensure']).to eq('present') + end + end + + context 'given a clean catalog and specified defaults' do + let :catalog do + compile_to_catalog('ensure_packages(["facter"], {"provider" => "gem"})') + end + + it 'declares package resources with ensure => present' do + expect(catalog.resource(:package, 'facter')['ensure']).to eq('present') + expect(catalog.resource(:package, 'facter')['provider']).to eq('gem') + end + end +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/functions/ensure_resource_spec.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/functions/ensure_resource_spec.rb new file mode 100755 index 00000000000..33bcac0d1f9 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/functions/ensure_resource_spec.rb @@ -0,0 +1,113 @@ +#! /usr/bin/env ruby -S rspec +require 'spec_helper' +require 'rspec-puppet' +require 'puppet_spec/compiler' + +describe 'ensure_resource' do + include PuppetSpec::Compiler + + before :all do + Puppet::Parser::Functions.autoloader.loadall + Puppet::Parser::Functions.function(:ensure_packages) + end + + let :node do Puppet::Node.new('localhost') end + let :compiler do Puppet::Parser::Compiler.new(node) end + let :scope do Puppet::Parser::Scope.new(compiler) end + + describe 'when a type or title is not specified' do + it { expect { scope.function_ensure_resource([]) }.to raise_error } + it { expect { scope.function_ensure_resource(['type']) }.to raise_error } + end + + describe 'when compared against a resource with no attributes' do + let :catalog do + compile_to_catalog(<<-EOS + user { "dan": } + ensure_resource('user', 'dan', {}) + EOS + ) + end + + it 'should contain the the ensured resources' do + expect(catalog.resource(:user, 'dan').to_s).to eq('User[dan]') + end + end + + describe 'works when compared against a resource with non-conflicting attributes' do + [ + "ensure_resource('User', 'dan', {})", + "ensure_resource('User', 'dan', '')", + "ensure_resource('User', 'dan', {'ensure' => 'present'})", + "ensure_resource('User', 'dan', {'ensure' => 'present', 'managehome' => false})" + ].each do |ensure_resource| + pp = <<-EOS + user { "dan": ensure => present, shell => "/bin/csh", managehome => false} + #{ensure_resource} + EOS + + it { expect { compile_to_catalog(pp) }.to_not raise_error } + end + end + + describe 'fails when compared against a resource with conflicting attributes' do + pp = <<-EOS + user { "dan": ensure => present, shell => "/bin/csh", managehome => false} + ensure_resource('User', 'dan', {'ensure' => 'absent', 'managehome' => false}) + EOS + + it { expect { compile_to_catalog(pp) }.to raise_error } + end + + describe 'when an array of new resources are passed in' do + let :catalog do + compile_to_catalog("ensure_resource('User', ['dan', 'alex'], {})") + end + + it 'should contain the ensured resources' do + expect(catalog.resource('User[dan]').to_s).to eq('User[dan]') + expect(catalog.resource('User[alex]').to_s).to eq('User[alex]') + end + end + + describe 'when an array of existing resources is compared against existing resources' do + pp = <<-EOS + user { 'dan': ensure => present; 'alex': ensure => present } + ensure_resource('User', ['dan', 'alex'], {}) + EOS + + let :catalog do + compile_to_catalog(pp) + end + + it 'should return the existing resources' do + expect(catalog.resource('User[dan]').to_s).to eq('User[dan]') + expect(catalog.resource('User[alex]').to_s).to eq('User[alex]') + end + end + + describe 'works when compared against existing resources with attributes' do + [ + "ensure_resource('User', ['dan', 'alex'], {})", + "ensure_resource('User', ['dan', 'alex'], '')", + "ensure_resource('User', ['dan', 'alex'], {'ensure' => 'present'})", + ].each do |ensure_resource| + pp = <<-EOS + user { 'dan': ensure => present; 'alex': ensure => present } + #{ensure_resource} + EOS + + it { expect { compile_to_catalog(pp) }.to_not raise_error } + end + end + + describe 'fails when compared against existing resources with conflicting attributes' do + pp = <<-EOS + user { 'dan': ensure => present; 'alex': ensure => present } + ensure_resource('User', ['dan', 'alex'], {'ensure' => 'absent'}) + EOS + + it { expect { compile_to_catalog(pp) }.to raise_error } + end + +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/functions/flatten_spec.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/functions/flatten_spec.rb new file mode 100755 index 00000000000..dba7a6bbdb1 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/functions/flatten_spec.rb @@ -0,0 +1,27 @@ +#! /usr/bin/env ruby -S rspec +require 'spec_helper' + +describe "the flatten function" do + let(:scope) { PuppetlabsSpec::PuppetInternals.scope } + it "should exist" do + Puppet::Parser::Functions.function("flatten").should == "function_flatten" + end + + it "should raise a ParseError if there is less than 1 arguments" do + lambda { scope.function_flatten([]) }.should( raise_error(Puppet::ParseError)) + end + + it "should raise a ParseError if there is more than 1 argument" do + lambda { scope.function_flatten([[], []]) }.should( raise_error(Puppet::ParseError)) + end + + it "should flatten a complex data structure" do + result = scope.function_flatten([["a","b",["c",["d","e"],"f","g"]]]) + result.should(eq(["a","b","c","d","e","f","g"])) + end + + it "should do nothing to a structure that is already flat" do + result = scope.function_flatten([["a","b","c","d"]]) + result.should(eq(["a","b","c","d"])) + end +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/functions/floor_spec.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/functions/floor_spec.rb new file mode 100755 index 00000000000..dbc8c773585 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/functions/floor_spec.rb @@ -0,0 +1,39 @@ +#! /usr/bin/env ruby -S rspec + +require 'spec_helper' + +describe "the floor function" do + let(:scope) { PuppetlabsSpec::PuppetInternals.scope } + + it "should exist" do + Puppet::Parser::Functions.function("floor").should == "function_floor" + end + + it "should raise a ParseError if there is less than 1 argument" do + lambda { scope.function_floor([]) }.should( raise_error(Puppet::ParseError, /Wrong number of arguments/)) + end + + it "should should raise a ParseError if input isn't numeric (eg. String)" do + lambda { scope.function_floor(["foo"]) }.should( raise_error(Puppet::ParseError, /Wrong argument type/)) + end + + it "should should raise a ParseError if input isn't numeric (eg. Boolean)" do + lambda { scope.function_floor([true]) }.should( raise_error(Puppet::ParseError, /Wrong argument type/)) + end + + it "should return an integer when a numeric type is passed" do + result = scope.function_floor([12.4]) + result.is_a?(Integer).should(eq(true)) + end + + it "should return the input when an integer is passed" do + result = scope.function_floor([7]) + result.should(eq(7)) + end + + it "should return the largest integer less than or equal to the input" do + result = scope.function_floor([3.8]) + result.should(eq(3)) + end +end + diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/functions/fqdn_rotate_spec.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/functions/fqdn_rotate_spec.rb new file mode 100755 index 00000000000..2577723351a --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/functions/fqdn_rotate_spec.rb @@ -0,0 +1,33 @@ +#! /usr/bin/env ruby -S rspec +require 'spec_helper' + +describe "the fqdn_rotate function" do + let(:scope) { PuppetlabsSpec::PuppetInternals.scope } + + it "should exist" do + Puppet::Parser::Functions.function("fqdn_rotate").should == "function_fqdn_rotate" + end + + it "should raise a ParseError if there is less than 1 arguments" do + lambda { scope.function_fqdn_rotate([]) }.should( raise_error(Puppet::ParseError)) + end + + it "should rotate a string and the result should be the same size" do + scope.expects(:lookupvar).with("::fqdn").returns("127.0.0.1") + result = scope.function_fqdn_rotate(["asdf"]) + result.size.should(eq(4)) + end + + it "should rotate a string to give the same results for one host" do + scope.expects(:lookupvar).with("::fqdn").returns("127.0.0.1").twice + scope.function_fqdn_rotate(["abcdefg"]).should eql(scope.function_fqdn_rotate(["abcdefg"])) + end + + it "should rotate a string to give different values on different hosts" do + scope.expects(:lookupvar).with("::fqdn").returns("127.0.0.1") + val1 = scope.function_fqdn_rotate(["abcdefghijklmnopqrstuvwxyz01234567890987654321"]) + scope.expects(:lookupvar).with("::fqdn").returns("127.0.0.2") + val2 = scope.function_fqdn_rotate(["abcdefghijklmnopqrstuvwxyz01234567890987654321"]) + val1.should_not eql(val2) + end +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/functions/get_module_path_spec.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/functions/get_module_path_spec.rb new file mode 100755 index 00000000000..486bef6f200 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/functions/get_module_path_spec.rb @@ -0,0 +1,46 @@ +#! /usr/bin/env ruby -S rspec +require 'spec_helper' + +describe Puppet::Parser::Functions.function(:get_module_path) do + Internals = PuppetlabsSpec::PuppetInternals + class StubModule + attr_reader :path + def initialize(path) + @path = path + end + end + + def scope(environment = "production") + Internals.scope(:compiler => Internals.compiler(:node => Internals.node(:environment => environment))) + end + + it 'should only allow one argument' do + expect { scope.function_get_module_path([]) }.to raise_error(Puppet::ParseError, /Wrong number of arguments, expects one/) + expect { scope.function_get_module_path(['1','2','3']) }.to raise_error(Puppet::ParseError, /Wrong number of arguments, expects one/) + end + it 'should raise an exception when the module cannot be found' do + expect { scope.function_get_module_path(['foo']) }.to raise_error(Puppet::ParseError, /Could not find module/) + end + describe 'when locating a module' do + let(:modulepath) { "/tmp/does_not_exist" } + let(:path_of_module_foo) { StubModule.new("/tmp/does_not_exist/foo") } + + before(:each) { Puppet[:modulepath] = modulepath } + + it 'should be able to find module paths from the modulepath setting' do + Puppet::Module.expects(:find).with('foo', 'production').returns(path_of_module_foo) + scope.function_get_module_path(['foo']).should == path_of_module_foo.path + end + it 'should be able to find module paths when the modulepath is a list' do + Puppet[:modulepath] = modulepath + ":/tmp" + Puppet::Module.expects(:find).with('foo', 'production').returns(path_of_module_foo) + scope.function_get_module_path(['foo']).should == path_of_module_foo.path + end + it 'should respect the environment' do + pending("Disabled on Puppet 2.6.x") if Puppet.version =~ /^2\.6\b/ + Puppet.settings[:environment] = 'danstestenv' + Puppet::Module.expects(:find).with('foo', 'danstestenv').returns(path_of_module_foo) + scope('danstestenv').function_get_module_path(['foo']).should == path_of_module_foo.path + end + end +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/functions/getparam_spec.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/functions/getparam_spec.rb new file mode 100755 index 00000000000..bf024af0e5c --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/functions/getparam_spec.rb @@ -0,0 +1,76 @@ +#! /usr/bin/env ruby -S rspec +require 'spec_helper' +require 'rspec-puppet' +require 'puppet_spec/compiler' + +describe 'getparam' do + include PuppetSpec::Compiler + + before :each do + Puppet::Parser::Functions.autoloader.loadall + Puppet::Parser::Functions.function(:getparam) + end + + let :node do Puppet::Node.new('localhost') end + let :compiler do Puppet::Parser::Compiler.new(node) end + if Puppet.version.to_f >= 3.0 + let :scope do Puppet::Parser::Scope.new(compiler) end + else + let :scope do + newscope = Puppet::Parser::Scope.new + newscope.compiler = compiler + newscope.source = Puppet::Resource::Type.new(:node, :localhost) + newscope + end + end + + it "should exist" do + Puppet::Parser::Functions.function("getparam").should == "function_getparam" + end + + describe 'when a resource is not specified' do + it { expect { scope.function_getparam([]) }.to raise_error } + it { expect { scope.function_getparam(['User[dan]']) }.to raise_error } + it { expect { scope.function_getparam(['User[dan]']) }.to raise_error } + it { expect { scope.function_getparam(['User[dan]', {}]) }.to raise_error } + # This seems to be OK because we just check for a string. + it { expect { scope.function_getparam(['User[dan]', '']) }.to_not raise_error } + end + + describe 'when compared against a resource with no params' do + let :catalog do + compile_to_catalog(<<-EOS + user { "dan": } + EOS + ) + end + + it do + expect(scope.function_getparam(['User[dan]', 'shell'])).to eq('') + end + end + + describe 'when compared against a resource with params' do + let :catalog do + compile_to_catalog(<<-EOS + user { 'dan': ensure => present, shell => '/bin/sh', managehome => false} + $test = getparam(User[dan], 'shell') + EOS + ) + end + + it do + resource = Puppet::Parser::Resource.new(:user, 'dan', {:scope => scope}) + resource.set_parameter('ensure', 'present') + resource.set_parameter('shell', '/bin/sh') + resource.set_parameter('managehome', false) + compiler.add_resource(scope, resource) + + expect(scope.function_getparam(['User[dan]', 'shell'])).to eq('/bin/sh') + expect(scope.function_getparam(['User[dan]', ''])).to eq('') + expect(scope.function_getparam(['User[dan]', 'ensure'])).to eq('present') + # TODO: Expected this to be false, figure out why we're getting '' back. + expect(scope.function_getparam(['User[dan]', 'managehome'])).to eq('') + end + end +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/functions/getvar_spec.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/functions/getvar_spec.rb new file mode 100755 index 00000000000..5ff834ee71e --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/functions/getvar_spec.rb @@ -0,0 +1,37 @@ +#! /usr/bin/env ruby -S rspec +require 'spec_helper' + +describe Puppet::Parser::Functions.function(:getvar) do + let(:scope) { PuppetlabsSpec::PuppetInternals.scope } + describe 'when calling getvar from puppet' do + + it "should not compile when no arguments are passed" do + pending("Fails on 2.6.x, see bug #15912") if Puppet.version =~ /^2\.6\./ + Puppet[:code] = '$foo = getvar()' + expect { + scope.compiler.compile + }.to raise_error(Puppet::ParseError, /wrong number of arguments/) + end + + it "should not compile when too many arguments are passed" do + pending("Fails on 2.6.x, see bug #15912") if Puppet.version =~ /^2\.6\./ + Puppet[:code] = '$foo = getvar("foo::bar", "baz")' + expect { + scope.compiler.compile + }.to raise_error(Puppet::ParseError, /wrong number of arguments/) + end + + it "should lookup variables in other namespaces" do + pending("Fails on 2.6.x, see bug #15912") if Puppet.version =~ /^2\.6\./ + Puppet[:code] = <<-'ENDofPUPPETcode' + class site::data { $foo = 'baz' } + include site::data + $foo = getvar("site::data::foo") + if $foo != 'baz' { + fail('getvar did not return what we expect') + } + ENDofPUPPETcode + scope.compiler.compile + end + end +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/functions/grep_spec.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/functions/grep_spec.rb new file mode 100755 index 00000000000..a93b842537e --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/functions/grep_spec.rb @@ -0,0 +1,19 @@ +#! /usr/bin/env ruby -S rspec +require 'spec_helper' + +describe "the grep function" do + let(:scope) { PuppetlabsSpec::PuppetInternals.scope } + + it "should exist" do + Puppet::Parser::Functions.function("grep").should == "function_grep" + end + + it "should raise a ParseError if there is less than 1 arguments" do + lambda { scope.function_grep([]) }.should( raise_error(Puppet::ParseError)) + end + + it "should grep contents from an array" do + result = scope.function_grep([["aaabbb","bbbccc","dddeee"], "bbb"]) + result.should(eq(["aaabbb","bbbccc"])) + end +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/functions/has_interface_with_spec.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/functions/has_interface_with_spec.rb new file mode 100755 index 00000000000..c5264e4f309 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/functions/has_interface_with_spec.rb @@ -0,0 +1,64 @@ +#!/usr/bin/env ruby -S rspec +require 'spec_helper' + +describe Puppet::Parser::Functions.function(:has_interface_with) do + + let(:scope) do + PuppetlabsSpec::PuppetInternals.scope + end + + # The subject of these examples is the method itself. + subject do + function_name = Puppet::Parser::Functions.function(:has_interface_with) + scope.method(function_name) + end + + # We need to mock out the Facts so we can specify how we expect this function + # to behave on different platforms. + context "On Mac OS X Systems" do + before :each do + scope.stubs(:lookupvar).with("interfaces").returns('lo0,gif0,stf0,en1,p2p0,fw0,en0,vmnet1,vmnet8,utun0') + end + it 'should have loopback (lo0)' do + subject.call(['lo0']).should be_true + end + it 'should not have loopback (lo)' do + subject.call(['lo']).should be_false + end + end + context "On Linux Systems" do + before :each do + scope.stubs(:lookupvar).with("interfaces").returns('eth0,lo') + scope.stubs(:lookupvar).with("ipaddress").returns('10.0.0.1') + scope.stubs(:lookupvar).with("ipaddress_lo").returns('127.0.0.1') + scope.stubs(:lookupvar).with("ipaddress_eth0").returns('10.0.0.1') + scope.stubs(:lookupvar).with('muppet').returns('kermit') + scope.stubs(:lookupvar).with('muppet_lo').returns('mspiggy') + scope.stubs(:lookupvar).with('muppet_eth0').returns('kermit') + end + it 'should have loopback (lo)' do + subject.call(['lo']).should be_true + end + it 'should not have loopback (lo0)' do + subject.call(['lo0']).should be_false + end + it 'should have ipaddress with 127.0.0.1' do + subject.call(['ipaddress', '127.0.0.1']).should be_true + end + it 'should have ipaddress with 10.0.0.1' do + subject.call(['ipaddress', '10.0.0.1']).should be_true + end + it 'should not have ipaddress with 10.0.0.2' do + subject.call(['ipaddress', '10.0.0.2']).should be_false + end + it 'should have muppet named kermit' do + subject.call(['muppet', 'kermit']).should be_true + end + it 'should have muppet named mspiggy' do + subject.call(['muppet', 'mspiggy']).should be_true + end + it 'should not have muppet named bigbird' do + subject.call(['muppet', 'bigbird']).should be_false + end + end +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/functions/has_ip_address_spec.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/functions/has_ip_address_spec.rb new file mode 100755 index 00000000000..5a684608209 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/functions/has_ip_address_spec.rb @@ -0,0 +1,39 @@ +#!/usr/bin/env ruby -S rspec +require 'spec_helper' + +describe Puppet::Parser::Functions.function(:has_ip_address) do + + let(:scope) do + PuppetlabsSpec::PuppetInternals.scope + end + + subject do + function_name = Puppet::Parser::Functions.function(:has_ip_address) + scope.method(function_name) + end + + context "On Linux Systems" do + before :each do + scope.stubs(:lookupvar).with('interfaces').returns('eth0,lo') + scope.stubs(:lookupvar).with('ipaddress').returns('10.0.2.15') + scope.stubs(:lookupvar).with('ipaddress_eth0').returns('10.0.2.15') + scope.stubs(:lookupvar).with('ipaddress_lo').returns('127.0.0.1') + end + + it 'should have primary address (10.0.2.15)' do + subject.call(['10.0.2.15']).should be_true + end + + it 'should have lookupback address (127.0.0.1)' do + subject.call(['127.0.0.1']).should be_true + end + + it 'should not have other address' do + subject.call(['192.1681.1.1']).should be_false + end + + it 'should not have "mspiggy" on an interface' do + subject.call(['mspiggy']).should be_false + end + end +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/functions/has_ip_network_spec.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/functions/has_ip_network_spec.rb new file mode 100755 index 00000000000..c3a289e3728 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/functions/has_ip_network_spec.rb @@ -0,0 +1,36 @@ +#!/usr/bin/env ruby -S rspec +require 'spec_helper' + +describe Puppet::Parser::Functions.function(:has_ip_network) do + + let(:scope) do + PuppetlabsSpec::PuppetInternals.scope + end + + subject do + function_name = Puppet::Parser::Functions.function(:has_ip_network) + scope.method(function_name) + end + + context "On Linux Systems" do + before :each do + scope.stubs(:lookupvar).with('interfaces').returns('eth0,lo') + scope.stubs(:lookupvar).with('network').returns(:undefined) + scope.stubs(:lookupvar).with('network_eth0').returns('10.0.2.0') + scope.stubs(:lookupvar).with('network_lo').returns('127.0.0.1') + end + + it 'should have primary network (10.0.2.0)' do + subject.call(['10.0.2.0']).should be_true + end + + it 'should have loopback network (127.0.0.0)' do + subject.call(['127.0.0.1']).should be_true + end + + it 'should not have other network' do + subject.call(['192.168.1.0']).should be_false + end + end +end + diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/functions/has_key_spec.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/functions/has_key_spec.rb new file mode 100755 index 00000000000..490daeae7cc --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/functions/has_key_spec.rb @@ -0,0 +1,42 @@ +#! /usr/bin/env ruby -S rspec +require 'spec_helper' + +describe Puppet::Parser::Functions.function(:has_key) do + let(:scope) { PuppetlabsSpec::PuppetInternals.scope } + + describe 'when calling has_key from puppet' do + it "should not compile when no arguments are passed" do + pending("Fails on 2.6.x, see bug #15912") if Puppet.version =~ /^2\.6\./ + Puppet[:code] = '$x = has_key()' + expect { + scope.compiler.compile + }.to raise_error(Puppet::ParseError, /wrong number of arguments/) + end + + it "should not compile when 1 argument is passed" do + pending("Fails on 2.6.x, see bug #15912") if Puppet.version =~ /^2\.6\./ + Puppet[:code] = "$x = has_key('foo')" + expect { + scope.compiler.compile + }.to raise_error(Puppet::ParseError, /wrong number of arguments/) + end + + it "should require the first value to be a Hash" do + pending("Fails on 2.6.x, see bug #15912") if Puppet.version =~ /^2\.6\./ + Puppet[:code] = "$x = has_key('foo', 'bar')" + expect { + scope.compiler.compile + }.to raise_error(Puppet::ParseError, /expects the first argument to be a hash/) + end + end + + describe 'when calling the function has_key from a scope instance' do + it 'should detect existing keys' do + scope.function_has_key([{'one' => 1}, 'one']).should be_true + end + + it 'should detect existing keys' do + scope.function_has_key([{'one' => 1}, 'two']).should be_false + end + end +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/functions/hash_spec.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/functions/hash_spec.rb new file mode 100755 index 00000000000..7c91be9077f --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/functions/hash_spec.rb @@ -0,0 +1,19 @@ +#! /usr/bin/env ruby -S rspec +require 'spec_helper' + +describe "the hash function" do + let(:scope) { PuppetlabsSpec::PuppetInternals.scope } + + it "should exist" do + Puppet::Parser::Functions.function("hash").should == "function_hash" + end + + it "should raise a ParseError if there is less than 1 arguments" do + lambda { scope.function_hash([]) }.should( raise_error(Puppet::ParseError)) + end + + it "should convert an array to a hash" do + result = scope.function_hash([['a',1,'b',2,'c',3]]) + result.should(eq({'a'=>1,'b'=>2,'c'=>3})) + end +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/functions/intersection_spec.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/functions/intersection_spec.rb new file mode 100755 index 00000000000..fd44f7fe3dc --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/functions/intersection_spec.rb @@ -0,0 +1,19 @@ +#! /usr/bin/env ruby -S rspec +require 'spec_helper' + +describe "the intersection function" do + let(:scope) { PuppetlabsSpec::PuppetInternals.scope } + + it "should exist" do + Puppet::Parser::Functions.function("intersection").should == "function_intersection" + end + + it "should raise a ParseError if there are fewer than 2 arguments" do + lambda { scope.function_intersection([]) }.should( raise_error(Puppet::ParseError) ) + end + + it "should return the intersection of two arrays" do + result = scope.function_intersection([["a","b","c"],["b","c","d"]]) + result.should(eq(["b","c"])) + end +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/functions/is_array_spec.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/functions/is_array_spec.rb new file mode 100755 index 00000000000..e7f4bcd6df4 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/functions/is_array_spec.rb @@ -0,0 +1,29 @@ +#! /usr/bin/env ruby -S rspec +require 'spec_helper' + +describe "the is_array function" do + let(:scope) { PuppetlabsSpec::PuppetInternals.scope } + + it "should exist" do + Puppet::Parser::Functions.function("is_array").should == "function_is_array" + end + + it "should raise a ParseError if there is less than 1 arguments" do + lambda { scope.function_is_array([]) }.should( raise_error(Puppet::ParseError)) + end + + it "should return true if passed an array" do + result = scope.function_is_array([[1,2,3]]) + result.should(eq(true)) + end + + it "should return false if passed a hash" do + result = scope.function_is_array([{'a'=>1}]) + result.should(eq(false)) + end + + it "should return false if passed a string" do + result = scope.function_is_array(["asdf"]) + result.should(eq(false)) + end +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/functions/is_bool_spec.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/functions/is_bool_spec.rb new file mode 100755 index 00000000000..c94e83a9d9f --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/functions/is_bool_spec.rb @@ -0,0 +1,44 @@ +#! /usr/bin/env ruby -S rspec +require 'spec_helper' + +describe "the is_bool function" do + let(:scope) { PuppetlabsSpec::PuppetInternals.scope } + + it "should exist" do + Puppet::Parser::Functions.function("is_bool").should == "function_is_bool" + end + + it "should raise a ParseError if there is less than 1 arguments" do + lambda { scope.function_is_bool([]) }.should( raise_error(Puppet::ParseError)) + end + + it "should return true if passed a TrueClass" do + result = scope.function_is_bool([true]) + result.should(eq(true)) + end + + it "should return true if passed a FalseClass" do + result = scope.function_is_bool([false]) + result.should(eq(true)) + end + + it "should return false if passed the string 'true'" do + result = scope.function_is_bool(['true']) + result.should(eq(false)) + end + + it "should return false if passed the string 'false'" do + result = scope.function_is_bool(['false']) + result.should(eq(false)) + end + + it "should return false if passed an array" do + result = scope.function_is_bool([["a","b"]]) + result.should(eq(false)) + end + + it "should return false if passed a hash" do + result = scope.function_is_bool([{"a" => "b"}]) + result.should(eq(false)) + end +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/functions/is_domain_name_spec.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/functions/is_domain_name_spec.rb new file mode 100755 index 00000000000..f2ea76dac70 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/functions/is_domain_name_spec.rb @@ -0,0 +1,64 @@ +#! /usr/bin/env ruby -S rspec +require 'spec_helper' + +describe "the is_domain_name function" do + let(:scope) { PuppetlabsSpec::PuppetInternals.scope } + + it "should exist" do + Puppet::Parser::Functions.function("is_domain_name").should == "function_is_domain_name" + end + + it "should raise a ParseError if there is less than 1 arguments" do + lambda { scope.function_is_domain_name([]) }.should( raise_error(Puppet::ParseError)) + end + + it "should return true if a valid short domain name" do + result = scope.function_is_domain_name(["x.com"]) + result.should(be_true) + end + + it "should return true if the domain is ." do + result = scope.function_is_domain_name(["."]) + result.should(be_true) + end + + it "should return true if the domain is x.com." do + result = scope.function_is_domain_name(["x.com."]) + result.should(be_true) + end + + it "should return true if a valid domain name" do + result = scope.function_is_domain_name(["foo.bar.com"]) + result.should(be_true) + end + + it "should allow domain parts to start with numbers" do + result = scope.function_is_domain_name(["3foo.2bar.com"]) + result.should(be_true) + end + + it "should allow domain to end with a dot" do + result = scope.function_is_domain_name(["3foo.2bar.com."]) + result.should(be_true) + end + + it "should allow a single part domain" do + result = scope.function_is_domain_name(["orange"]) + result.should(be_true) + end + + it "should return false if domain parts start with hyphens" do + result = scope.function_is_domain_name(["-3foo.2bar.com"]) + result.should(be_false) + end + + it "should return true if domain contains hyphens" do + result = scope.function_is_domain_name(["3foo-bar.2bar-fuzz.com"]) + result.should(be_true) + end + + it "should return false if domain name contains spaces" do + result = scope.function_is_domain_name(["not valid"]) + result.should(be_false) + end +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/functions/is_float_spec.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/functions/is_float_spec.rb new file mode 100755 index 00000000000..b7d73b04a25 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/functions/is_float_spec.rb @@ -0,0 +1,33 @@ +#! /usr/bin/env ruby -S rspec +require 'spec_helper' + +describe "the is_float function" do + let(:scope) { PuppetlabsSpec::PuppetInternals.scope } + + it "should exist" do + Puppet::Parser::Functions.function("is_float").should == "function_is_float" + end + + it "should raise a ParseError if there is less than 1 arguments" do + lambda { scope.function_is_float([]) }.should( raise_error(Puppet::ParseError)) + end + + it "should return true if a float" do + result = scope.function_is_float(["0.12"]) + result.should(eq(true)) + end + + it "should return false if a string" do + result = scope.function_is_float(["asdf"]) + result.should(eq(false)) + end + + it "should return false if an integer" do + result = scope.function_is_float(["3"]) + result.should(eq(false)) + end + it "should return true if a float is created from an arithmetical operation" do + result = scope.function_is_float([3.2*2]) + result.should(eq(true)) + end +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/functions/is_function_available.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/functions/is_function_available.rb new file mode 100755 index 00000000000..d5669a75837 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/functions/is_function_available.rb @@ -0,0 +1,31 @@ +#!/usr/bin/env ruby -S rspec +require 'spec_helper' + +describe "the is_function_available function" do + before :all do + Puppet::Parser::Functions.autoloader.loadall + end + + before :each do + @scope = Puppet::Parser::Scope.new + end + + it "should exist" do + Puppet::Parser::Functions.function("is_function_available").should == "function_is_function_available" + end + + it "should raise a ParseError if there is less than 1 arguments" do + lambda { @scope.function_is_function_available([]) }.should( raise_error(Puppet::ParseError)) + end + + it "should return false if a nonexistent function is passed" do + result = @scope.function_is_function_available(['jeff_mccunes_left_sock']) + result.should(eq(false)) + end + + it "should return true if an available function is passed" do + result = @scope.function_is_function_available(['require']) + result.should(eq(true)) + end + +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/functions/is_hash_spec.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/functions/is_hash_spec.rb new file mode 100755 index 00000000000..bbebf39f9c7 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/functions/is_hash_spec.rb @@ -0,0 +1,29 @@ +#! /usr/bin/env ruby -S rspec +require 'spec_helper' + +describe "the is_hash function" do + let(:scope) { PuppetlabsSpec::PuppetInternals.scope } + + it "should exist" do + Puppet::Parser::Functions.function("is_hash").should == "function_is_hash" + end + + it "should raise a ParseError if there is less than 1 arguments" do + lambda { scope.function_is_hash([]) }.should( raise_error(Puppet::ParseError)) + end + + it "should return true if passed a hash" do + result = scope.function_is_hash([{"a"=>1,"b"=>2}]) + result.should(eq(true)) + end + + it "should return false if passed an array" do + result = scope.function_is_hash([["a","b"]]) + result.should(eq(false)) + end + + it "should return false if passed a string" do + result = scope.function_is_hash(["asdf"]) + result.should(eq(false)) + end +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/functions/is_integer_spec.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/functions/is_integer_spec.rb new file mode 100755 index 00000000000..24141cc7b7e --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/functions/is_integer_spec.rb @@ -0,0 +1,69 @@ +#! /usr/bin/env ruby -S rspec +require 'spec_helper' + +describe "the is_integer function" do + let(:scope) { PuppetlabsSpec::PuppetInternals.scope } + + it "should exist" do + Puppet::Parser::Functions.function("is_integer").should == "function_is_integer" + end + + it "should raise a ParseError if there is less than 1 arguments" do + lambda { scope.function_is_integer([]) }.should( raise_error(Puppet::ParseError)) + end + + it "should return true if an integer" do + result = scope.function_is_integer(["3"]) + result.should(eq(true)) + end + + it "should return true if a negative integer" do + result = scope.function_is_integer(["-7"]) + result.should(eq(true)) + end + + it "should return false if a float" do + result = scope.function_is_integer(["3.2"]) + result.should(eq(false)) + end + + it "should return false if a string" do + result = scope.function_is_integer(["asdf"]) + result.should(eq(false)) + end + + it "should return true if an integer is created from an arithmetical operation" do + result = scope.function_is_integer([3*2]) + result.should(eq(true)) + end + + it "should return false if an array" do + result = scope.function_is_numeric([["asdf"]]) + result.should(eq(false)) + end + + it "should return false if a hash" do + result = scope.function_is_numeric([{"asdf" => false}]) + result.should(eq(false)) + end + + it "should return false if a boolean" do + result = scope.function_is_numeric([true]) + result.should(eq(false)) + end + + it "should return false if a whitespace is in the string" do + result = scope.function_is_numeric([" -1324"]) + result.should(eq(false)) + end + + it "should return false if it is zero prefixed" do + result = scope.function_is_numeric(["0001234"]) + result.should(eq(false)) + end + + it "should return false if it is wrapped inside an array" do + result = scope.function_is_numeric([[1234]]) + result.should(eq(false)) + end +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/functions/is_ip_address_spec.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/functions/is_ip_address_spec.rb new file mode 100755 index 00000000000..c0debb3d43b --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/functions/is_ip_address_spec.rb @@ -0,0 +1,39 @@ +#! /usr/bin/env ruby -S rspec +require 'spec_helper' + +describe "the is_ip_address function" do + let(:scope) { PuppetlabsSpec::PuppetInternals.scope } + + it "should exist" do + Puppet::Parser::Functions.function("is_ip_address").should == "function_is_ip_address" + end + + it "should raise a ParseError if there is less than 1 arguments" do + lambda { scope.function_is_ip_address([]) }.should( raise_error(Puppet::ParseError)) + end + + it "should return true if an IPv4 address" do + result = scope.function_is_ip_address(["1.2.3.4"]) + result.should(eq(true)) + end + + it "should return true if a full IPv6 address" do + result = scope.function_is_ip_address(["fe80:0000:cd12:d123:e2f8:47ff:fe09:dd74"]) + result.should(eq(true)) + end + + it "should return true if a compressed IPv6 address" do + result = scope.function_is_ip_address(["fe00::1"]) + result.should(eq(true)) + end + + it "should return false if not valid" do + result = scope.function_is_ip_address(["asdf"]) + result.should(eq(false)) + end + + it "should return false if IP octets out of range" do + result = scope.function_is_ip_address(["1.1.1.300"]) + result.should(eq(false)) + end +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/functions/is_mac_address_spec.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/functions/is_mac_address_spec.rb new file mode 100755 index 00000000000..ca9c5904767 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/functions/is_mac_address_spec.rb @@ -0,0 +1,29 @@ +#! /usr/bin/env ruby -S rspec +require 'spec_helper' + +describe "the is_mac_address function" do + let(:scope) { PuppetlabsSpec::PuppetInternals.scope } + + it "should exist" do + Puppet::Parser::Functions.function("is_mac_address").should == "function_is_mac_address" + end + + it "should raise a ParseError if there is less than 1 arguments" do + lambda { scope.function_is_mac_address([]) }.should( raise_error(Puppet::ParseError)) + end + + it "should return true if a valid mac address" do + result = scope.function_is_mac_address(["00:a0:1f:12:7f:a0"]) + result.should(eq(true)) + end + + it "should return false if octets are out of range" do + result = scope.function_is_mac_address(["00:a0:1f:12:7f:g0"]) + result.should(eq(false)) + end + + it "should return false if not valid" do + result = scope.function_is_mac_address(["not valid"]) + result.should(eq(false)) + end +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/functions/is_numeric_spec.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/functions/is_numeric_spec.rb new file mode 100755 index 00000000000..1df14978711 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/functions/is_numeric_spec.rb @@ -0,0 +1,119 @@ +#! /usr/bin/env ruby -S rspec +require 'spec_helper' + +describe "the is_numeric function" do + let(:scope) { PuppetlabsSpec::PuppetInternals.scope } + + it "should exist" do + Puppet::Parser::Functions.function("is_numeric").should == "function_is_numeric" + end + + it "should raise a ParseError if there is less than 1 argument" do + lambda { scope.function_is_numeric([]) }.should( raise_error(Puppet::ParseError)) + end + + it "should return true if an integer" do + result = scope.function_is_numeric(["3"]) + result.should(eq(true)) + end + + it "should return true if a float" do + result = scope.function_is_numeric(["3.2"]) + result.should(eq(true)) + end + + it "should return true if an integer is created from an arithmetical operation" do + result = scope.function_is_numeric([3*2]) + result.should(eq(true)) + end + + it "should return true if a float is created from an arithmetical operation" do + result = scope.function_is_numeric([3.2*2]) + result.should(eq(true)) + end + + it "should return false if a string" do + result = scope.function_is_numeric(["asdf"]) + result.should(eq(false)) + end + + it "should return false if an array" do + result = scope.function_is_numeric([["asdf"]]) + result.should(eq(false)) + end + + it "should return false if an array of integers" do + result = scope.function_is_numeric([[1,2,3,4]]) + result.should(eq(false)) + end + + it "should return false if a hash" do + result = scope.function_is_numeric([{"asdf" => false}]) + result.should(eq(false)) + end + + it "should return false if a hash with numbers in it" do + result = scope.function_is_numeric([{1 => 2}]) + result.should(eq(false)) + end + + it "should return false if a boolean" do + result = scope.function_is_numeric([true]) + result.should(eq(false)) + end + + it "should return true if a negative float with exponent" do + result = scope.function_is_numeric(["-342.2315e-12"]) + result.should(eq(true)) + end + + it "should return false if a negative integer with whitespaces before/after the dash" do + result = scope.function_is_numeric([" - 751"]) + result.should(eq(false)) + end + +# it "should return true if a hexadecimal" do +# result = scope.function_is_numeric(["0x52F8c"]) +# result.should(eq(true)) +# end +# +# it "should return true if a hexadecimal with uppercase 0X prefix" do +# result = scope.function_is_numeric(["0X52F8c"]) +# result.should(eq(true)) +# end +# +# it "should return false if a hexadecimal without a prefix" do +# result = scope.function_is_numeric(["52F8c"]) +# result.should(eq(false)) +# end +# +# it "should return true if a octal" do +# result = scope.function_is_numeric(["0751"]) +# result.should(eq(true)) +# end +# +# it "should return true if a negative hexadecimal" do +# result = scope.function_is_numeric(["-0x52F8c"]) +# result.should(eq(true)) +# end +# +# it "should return true if a negative octal" do +# result = scope.function_is_numeric(["-0751"]) +# result.should(eq(true)) +# end +# +# it "should return false if a negative octal with whitespaces before/after the dash" do +# result = scope.function_is_numeric([" - 0751"]) +# result.should(eq(false)) +# end +# +# it "should return false if a bad hexadecimal" do +# result = scope.function_is_numeric(["0x23d7g"]) +# result.should(eq(false)) +# end +# +# it "should return false if a bad octal" do +# result = scope.function_is_numeric(["0287"]) +# result.should(eq(false)) +# end +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/functions/is_string_spec.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/functions/is_string_spec.rb new file mode 100755 index 00000000000..3756bea8b5f --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/functions/is_string_spec.rb @@ -0,0 +1,34 @@ +#! /usr/bin/env ruby -S rspec +require 'spec_helper' + +describe "the is_string function" do + let(:scope) { PuppetlabsSpec::PuppetInternals.scope } + + it "should exist" do + Puppet::Parser::Functions.function("is_string").should == "function_is_string" + end + + it "should raise a ParseError if there is less than 1 arguments" do + lambda { scope.function_is_string([]) }.should( raise_error(Puppet::ParseError)) + end + + it "should return true if a string" do + result = scope.function_is_string(["asdf"]) + result.should(eq(true)) + end + + it "should return false if an integer" do + result = scope.function_is_string(["3"]) + result.should(eq(false)) + end + + it "should return false if a float" do + result = scope.function_is_string(["3.23"]) + result.should(eq(false)) + end + + it "should return false if an array" do + result = scope.function_is_string([["a","b","c"]]) + result.should(eq(false)) + end +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/functions/join_keys_to_values_spec.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/functions/join_keys_to_values_spec.rb new file mode 100755 index 00000000000..a52fb719f27 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/functions/join_keys_to_values_spec.rb @@ -0,0 +1,40 @@ +#! /usr/bin/env ruby -S rspec +require 'spec_helper' + +describe "the join_keys_to_values function" do + let(:scope) { PuppetlabsSpec::PuppetInternals.scope } + + it "should exist" do + Puppet::Parser::Functions.function("join_keys_to_values").should == "function_join_keys_to_values" + end + + it "should raise a ParseError if there are fewer than two arguments" do + lambda { scope.function_join_keys_to_values([{}]) }.should raise_error Puppet::ParseError + end + + it "should raise a ParseError if there are greater than two arguments" do + lambda { scope.function_join_keys_to_values([{}, 'foo', 'bar']) }.should raise_error Puppet::ParseError + end + + it "should raise a TypeError if the first argument is an array" do + lambda { scope.function_join_keys_to_values([[1,2], ',']) }.should raise_error TypeError + end + + it "should raise a TypeError if the second argument is an array" do + lambda { scope.function_join_keys_to_values([{}, [1,2]]) }.should raise_error TypeError + end + + it "should raise a TypeError if the second argument is a number" do + lambda { scope.function_join_keys_to_values([{}, 1]) }.should raise_error TypeError + end + + it "should return an empty array given an empty hash" do + result = scope.function_join_keys_to_values([{}, ":"]) + result.should == [] + end + + it "should join hash's keys to its values" do + result = scope.function_join_keys_to_values([{'a'=>1,2=>'foo',:b=>nil}, ":"]) + result.should =~ ['a:1','2:foo','b:'] + end +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/functions/join_spec.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/functions/join_spec.rb new file mode 100755 index 00000000000..aafa1a7f76e --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/functions/join_spec.rb @@ -0,0 +1,19 @@ +#! /usr/bin/env ruby -S rspec +require 'spec_helper' + +describe "the join function" do + let(:scope) { PuppetlabsSpec::PuppetInternals.scope } + + it "should exist" do + Puppet::Parser::Functions.function("join").should == "function_join" + end + + it "should raise a ParseError if there is less than 1 arguments" do + lambda { scope.function_join([]) }.should( raise_error(Puppet::ParseError)) + end + + it "should join an array into a string" do + result = scope.function_join([["a","b","c"], ":"]) + result.should(eq("a:b:c")) + end +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/functions/keys_spec.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/functions/keys_spec.rb new file mode 100755 index 00000000000..fdd7a7073e5 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/functions/keys_spec.rb @@ -0,0 +1,21 @@ +#! /usr/bin/env ruby -S rspec +require 'spec_helper' + +describe "the keys function" do + let(:scope) { PuppetlabsSpec::PuppetInternals.scope } + + it "should exist" do + Puppet::Parser::Functions.function("keys").should == "function_keys" + end + + it "should raise a ParseError if there is less than 1 arguments" do + lambda { scope.function_keys([]) }.should( raise_error(Puppet::ParseError)) + end + + it "should return an array of keys when given a hash" do + result = scope.function_keys([{'a'=>1, 'b'=>2}]) + # =~ performs 'array with same elements' (set) matching + # For more info see RSpec::Matchers::MatchArray + result.should =~ ['a','b'] + end +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/functions/loadyaml_spec.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/functions/loadyaml_spec.rb new file mode 100755 index 00000000000..fe163182671 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/functions/loadyaml_spec.rb @@ -0,0 +1,25 @@ +#! /usr/bin/env ruby -S rspec +require 'spec_helper' + +describe "the loadyaml function" do + include PuppetlabsSpec::Files + + let(:scope) { PuppetlabsSpec::PuppetInternals.scope } + + it "should exist" do + Puppet::Parser::Functions.function("loadyaml").should == "function_loadyaml" + end + + it "should raise a ParseError if there is less than 1 arguments" do + expect { scope.function_loadyaml([]) }.to raise_error(Puppet::ParseError) + end + + it "should convert YAML file to a data structure" do + yaml_file = tmpfilename ('yamlfile') + File.open(yaml_file, 'w') do |fh| + fh.write("---\n aaa: 1\n bbb: 2\n ccc: 3\n ddd: 4\n") + end + result = scope.function_loadyaml([yaml_file]) + result.should == {"aaa" => 1, "bbb" => 2, "ccc" => 3, "ddd" => 4 } + end +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/functions/lstrip_spec.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/functions/lstrip_spec.rb new file mode 100755 index 00000000000..b280ae7ac1d --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/functions/lstrip_spec.rb @@ -0,0 +1,19 @@ +#! /usr/bin/env ruby -S rspec +require 'spec_helper' + +describe "the lstrip function" do + let(:scope) { PuppetlabsSpec::PuppetInternals.scope } + + it "should exist" do + Puppet::Parser::Functions.function("lstrip").should == "function_lstrip" + end + + it "should raise a ParseError if there is less than 1 arguments" do + lambda { scope.function_lstrip([]) }.should( raise_error(Puppet::ParseError)) + end + + it "should lstrip a string" do + result = scope.function_lstrip([" asdf"]) + result.should(eq('asdf')) + end +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/functions/max_spec.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/functions/max_spec.rb new file mode 100755 index 00000000000..ff6f2b361c3 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/functions/max_spec.rb @@ -0,0 +1,27 @@ +#! /usr/bin/env ruby -S rspec + +require 'spec_helper' + +describe "the max function" do + let(:scope) { PuppetlabsSpec::PuppetInternals.scope } + + it "should exist" do + Puppet::Parser::Functions.function("max").should == "function_max" + end + + it "should raise a ParseError if there is less than 1 arguments" do + lambda { scope.function_max([]) }.should( raise_error(Puppet::ParseError)) + end + + it "should be able to compare strings" do + scope.function_max(["albatross","dog","horse"]).should(eq("horse")) + end + + it "should be able to compare numbers" do + scope.function_max([6,8,4]).should(eq(8)) + end + + it "should be able to compare a number with a stringified number" do + scope.function_max([1,"2"]).should(eq("2")) + end +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/functions/member_spec.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/functions/member_spec.rb new file mode 100755 index 00000000000..6e9a023fa46 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/functions/member_spec.rb @@ -0,0 +1,24 @@ +#! /usr/bin/env ruby -S rspec +require 'spec_helper' + +describe "the member function" do + let(:scope) { PuppetlabsSpec::PuppetInternals.scope } + + it "should exist" do + Puppet::Parser::Functions.function("member").should == "function_member" + end + + it "should raise a ParseError if there is less than 1 arguments" do + lambda { scope.function_member([]) }.should( raise_error(Puppet::ParseError)) + end + + it "should return true if a member is in an array" do + result = scope.function_member([["a","b","c"], "a"]) + result.should(eq(true)) + end + + it "should return false if a member is not in an array" do + result = scope.function_member([["a","b","c"], "d"]) + result.should(eq(false)) + end +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/functions/merge_spec.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/functions/merge_spec.rb new file mode 100755 index 00000000000..15a5d94cf82 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/functions/merge_spec.rb @@ -0,0 +1,52 @@ +#! /usr/bin/env ruby -S rspec + +require 'spec_helper' + +describe Puppet::Parser::Functions.function(:merge) do + let(:scope) { PuppetlabsSpec::PuppetInternals.scope } + + describe 'when calling merge from puppet' do + it "should not compile when no arguments are passed" do + pending("Fails on 2.6.x, see bug #15912") if Puppet.version =~ /^2\.6\./ + Puppet[:code] = '$x = merge()' + expect { + scope.compiler.compile + }.to raise_error(Puppet::ParseError, /wrong number of arguments/) + end + + it "should not compile when 1 argument is passed" do + pending("Fails on 2.6.x, see bug #15912") if Puppet.version =~ /^2\.6\./ + Puppet[:code] = "$my_hash={'one' => 1}\n$x = merge($my_hash)" + expect { + scope.compiler.compile + }.to raise_error(Puppet::ParseError, /wrong number of arguments/) + end + end + + describe 'when calling merge on the scope instance' do + it 'should require all parameters are hashes' do + expect { new_hash = scope.function_merge([{}, '2'])}.to raise_error(Puppet::ParseError, /unexpected argument type String/) + expect { new_hash = scope.function_merge([{}, 2])}.to raise_error(Puppet::ParseError, /unexpected argument type Fixnum/) + end + + it 'should accept empty strings as puppet undef' do + expect { new_hash = scope.function_merge([{}, ''])}.not_to raise_error + end + + it 'should be able to merge two hashes' do + new_hash = scope.function_merge([{'one' => '1', 'two' => '1'}, {'two' => '2', 'three' => '2'}]) + new_hash['one'].should == '1' + new_hash['two'].should == '2' + new_hash['three'].should == '2' + end + + it 'should merge multiple hashes' do + hash = scope.function_merge([{'one' => 1}, {'one' => '2'}, {'one' => '3'}]) + hash['one'].should == '3' + end + + it 'should accept empty hashes' do + scope.function_merge([{},{},{}]).should == {} + end + end +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/functions/min_spec.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/functions/min_spec.rb new file mode 100755 index 00000000000..71d593ef091 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/functions/min_spec.rb @@ -0,0 +1,27 @@ +#! /usr/bin/env ruby -S rspec + +require 'spec_helper' + +describe "the min function" do + let(:scope) { PuppetlabsSpec::PuppetInternals.scope } + + it "should exist" do + Puppet::Parser::Functions.function("min").should == "function_min" + end + + it "should raise a ParseError if there is less than 1 arguments" do + lambda { scope.function_min([]) }.should( raise_error(Puppet::ParseError)) + end + + it "should be able to compare strings" do + scope.function_min(["albatross","dog","horse"]).should(eq("albatross")) + end + + it "should be able to compare numbers" do + scope.function_min([6,8,4]).should(eq(4)) + end + + it "should be able to compare a number with a stringified number" do + scope.function_min([1,"2"]).should(eq(1)) + end +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/functions/num2bool_spec.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/functions/num2bool_spec.rb new file mode 100755 index 00000000000..b56196d3c6b --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/functions/num2bool_spec.rb @@ -0,0 +1,67 @@ +#! /usr/bin/env ruby -S rspec +require 'spec_helper' + +describe "the num2bool function" do + let(:scope) { PuppetlabsSpec::PuppetInternals.scope } + + it "should exist" do + Puppet::Parser::Functions.function("num2bool").should == "function_num2bool" + end + + it "should raise a ParseError if there are no arguments" do + lambda { scope.function_num2bool([]) }.should( raise_error(Puppet::ParseError)) + end + + it "should raise a ParseError if there are more than 1 arguments" do + lambda { scope.function_num2bool(["foo","bar"]) }.should( raise_error(Puppet::ParseError)) + end + + it "should raise a ParseError if passed something non-numeric" do + lambda { scope.function_num2bool(["xyzzy"]) }.should( raise_error(Puppet::ParseError)) + end + + it "should return true if passed string 1" do + result = scope.function_num2bool(["1"]) + result.should(be_true) + end + + it "should return true if passed string 1.5" do + result = scope.function_num2bool(["1.5"]) + result.should(be_true) + end + + it "should return true if passed number 1" do + result = scope.function_num2bool([1]) + result.should(be_true) + end + + it "should return false if passed string 0" do + result = scope.function_num2bool(["0"]) + result.should(be_false) + end + + it "should return false if passed number 0" do + result = scope.function_num2bool([0]) + result.should(be_false) + end + + it "should return false if passed string -1" do + result = scope.function_num2bool(["-1"]) + result.should(be_false) + end + + it "should return false if passed string -1.5" do + result = scope.function_num2bool(["-1.5"]) + result.should(be_false) + end + + it "should return false if passed number -1" do + result = scope.function_num2bool([-1]) + result.should(be_false) + end + + it "should return false if passed float -1.5" do + result = scope.function_num2bool([-1.5]) + result.should(be_false) + end +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/functions/parsejson_spec.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/functions/parsejson_spec.rb new file mode 100755 index 00000000000..f179ac111a6 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/functions/parsejson_spec.rb @@ -0,0 +1,22 @@ +#! /usr/bin/env ruby -S rspec +require 'spec_helper' + +describe "the parsejson function" do + let(:scope) { PuppetlabsSpec::PuppetInternals.scope } + + it "should exist" do + Puppet::Parser::Functions.function("parsejson").should == "function_parsejson" + end + + it "should raise a ParseError if there is less than 1 arguments" do + lambda { scope.function_parsejson([]) }.should( raise_error(Puppet::ParseError)) + end + + it "should convert JSON to a data structure" do + json = <<-EOS +["aaa","bbb","ccc"] +EOS + result = scope.function_parsejson([json]) + result.should(eq(['aaa','bbb','ccc'])) + end +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/functions/parseyaml_spec.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/functions/parseyaml_spec.rb new file mode 100755 index 00000000000..0c7aea8a5ab --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/functions/parseyaml_spec.rb @@ -0,0 +1,24 @@ +#! /usr/bin/env ruby -S rspec +require 'spec_helper' + +describe "the parseyaml function" do + let(:scope) { PuppetlabsSpec::PuppetInternals.scope } + + it "should exist" do + Puppet::Parser::Functions.function("parseyaml").should == "function_parseyaml" + end + + it "should raise a ParseError if there is less than 1 arguments" do + lambda { scope.function_parseyaml([]) }.should( raise_error(Puppet::ParseError)) + end + + it "should convert YAML to a data structure" do + yaml = <<-EOS +- aaa +- bbb +- ccc +EOS + result = scope.function_parseyaml([yaml]) + result.should(eq(['aaa','bbb','ccc'])) + end +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/functions/pick_default_spec.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/functions/pick_default_spec.rb new file mode 100755 index 00000000000..c9235b53464 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/functions/pick_default_spec.rb @@ -0,0 +1,58 @@ +#!/usr/bin/env ruby -S rspec +require 'spec_helper' + +describe "the pick_default function" do + let(:scope) { PuppetlabsSpec::PuppetInternals.scope } + + it "should exist" do + Puppet::Parser::Functions.function("pick_default").should == "function_pick_default" + end + + it 'should return the correct value' do + scope.function_pick_default(['first', 'second']).should == 'first' + end + + it 'should return the correct value if the first value is empty' do + scope.function_pick_default(['', 'second']).should == 'second' + end + + it 'should skip empty string values' do + scope.function_pick_default(['', 'first']).should == 'first' + end + + it 'should skip :undef values' do + scope.function_pick_default([:undef, 'first']).should == 'first' + end + + it 'should skip :undefined values' do + scope.function_pick_default([:undefined, 'first']).should == 'first' + end + + it 'should return the empty string if it is the last possibility' do + scope.function_pick_default([:undef, :undefined, '']).should == '' + end + + it 'should return :undef if it is the last possibility' do + scope.function_pick_default(['', :undefined, :undef]).should == :undef + end + + it 'should return :undefined if it is the last possibility' do + scope.function_pick_default([:undef, '', :undefined]).should == :undefined + end + + it 'should return the empty string if it is the only possibility' do + scope.function_pick_default(['']).should == '' + end + + it 'should return :undef if it is the only possibility' do + scope.function_pick_default([:undef]).should == :undef + end + + it 'should return :undefined if it is the only possibility' do + scope.function_pick_default([:undefined]).should == :undefined + end + + it 'should error if no values are passed' do + expect { scope.function_pick_default([]) }.to raise_error(Puppet::Error, /Must receive at least one argument./) + end +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/functions/pick_spec.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/functions/pick_spec.rb new file mode 100755 index 00000000000..f53fa800053 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/functions/pick_spec.rb @@ -0,0 +1,34 @@ +#!/usr/bin/env ruby -S rspec +require 'spec_helper' + +describe "the pick function" do + let(:scope) { PuppetlabsSpec::PuppetInternals.scope } + + it "should exist" do + Puppet::Parser::Functions.function("pick").should == "function_pick" + end + + it 'should return the correct value' do + scope.function_pick(['first', 'second']).should == 'first' + end + + it 'should return the correct value if the first value is empty' do + scope.function_pick(['', 'second']).should == 'second' + end + + it 'should remove empty string values' do + scope.function_pick(['', 'first']).should == 'first' + end + + it 'should remove :undef values' do + scope.function_pick([:undef, 'first']).should == 'first' + end + + it 'should remove :undefined values' do + scope.function_pick([:undefined, 'first']).should == 'first' + end + + it 'should error if no values are passed' do + expect { scope.function_pick([]) }.to( raise_error(Puppet::ParseError, "pick(): must receive at least one non empty value")) + end +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/functions/prefix_spec.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/functions/prefix_spec.rb new file mode 100755 index 00000000000..6e8ddc58ee8 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/functions/prefix_spec.rb @@ -0,0 +1,28 @@ +#! /usr/bin/env ruby -S rspec +require 'spec_helper' + +describe "the prefix function" do + let(:scope) { PuppetlabsSpec::PuppetInternals.scope } + + it "raises a ParseError if there is less than 1 arguments" do + expect { scope.function_prefix([]) }.to raise_error(Puppet::ParseError, /number of arguments/) + end + + it "raises an error if the first argument is not an array" do + expect { + scope.function_prefix([Object.new]) + }.to raise_error(Puppet::ParseError, /expected first argument to be an Array/) + end + + + it "raises an error if the second argument is not a string" do + expect { + scope.function_prefix([['first', 'second'], 42]) + }.to raise_error(Puppet::ParseError, /expected second argument to be a String/) + end + + it "returns a prefixed array" do + result = scope.function_prefix([['a','b','c'], 'p']) + result.should(eq(['pa','pb','pc'])) + end +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/functions/range_spec.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/functions/range_spec.rb new file mode 100755 index 00000000000..0e1ad376f6f --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/functions/range_spec.rb @@ -0,0 +1,70 @@ +#! /usr/bin/env ruby -S rspec +require 'spec_helper' + +describe "the range function" do + let(:scope) { PuppetlabsSpec::PuppetInternals.scope } + + it "exists" do + Puppet::Parser::Functions.function("range").should == "function_range" + end + + it "raises a ParseError if there is less than 1 arguments" do + expect { scope.function_range([]) }.to raise_error Puppet::ParseError, /Wrong number of arguments.*0 for 1/ + end + + describe 'with a letter range' do + it "returns a letter range" do + result = scope.function_range(["a","d"]) + result.should eq ['a','b','c','d'] + end + + it "returns a letter range given a step of 1" do + result = scope.function_range(["a","d","1"]) + result.should eq ['a','b','c','d'] + end + + it "returns a stepped letter range" do + result = scope.function_range(["a","d","2"]) + result.should eq ['a','c'] + end + + it "returns a stepped letter range given a negative step" do + result = scope.function_range(["a","d","-2"]) + result.should eq ['a','c'] + end + end + + describe 'with a number range' do + it "returns a number range" do + result = scope.function_range(["1","4"]) + result.should eq [1,2,3,4] + end + + it "returns a number range given a step of 1" do + result = scope.function_range(["1","4","1"]) + result.should eq [1,2,3,4] + end + + it "returns a stepped number range" do + result = scope.function_range(["1","4","2"]) + result.should eq [1,3] + end + + it "returns a stepped number range given a negative step" do + result = scope.function_range(["1","4","-2"]) + result.should eq [1,3] + end + end + + describe 'with a numeric-like string range' do + it "works with padded hostname like strings" do + expected = ("host01".."host10").to_a + scope.function_range(["host01","host10"]).should eq expected + end + + it "coerces zero padded digits to integers" do + expected = (0..10).to_a + scope.function_range(["00", "10"]).should eq expected + end + end +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/functions/reject_spec.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/functions/reject_spec.rb new file mode 100755 index 00000000000..f2cb7419352 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/functions/reject_spec.rb @@ -0,0 +1,20 @@ +#!/usr/bin/env ruby + +require 'spec_helper' + +describe "the reject function" do + let(:scope) { PuppetlabsSpec::PuppetInternals.scope } + + it "should exist" do + Puppet::Parser::Functions.function("reject").should == "function_reject" + end + + it "should raise a ParseError if there is less than 1 arguments" do + lambda { scope.function_reject([]) }.should( raise_error(Puppet::ParseError)) + end + + it "should reject contents from an array" do + result = scope.function_reject([["1111", "aaabbb","bbbccc","dddeee"], "bbb"]) + result.should(eq(["1111", "dddeee"])) + end +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/functions/reverse_spec.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/functions/reverse_spec.rb new file mode 100755 index 00000000000..1b592065478 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/functions/reverse_spec.rb @@ -0,0 +1,19 @@ +#! /usr/bin/env ruby -S rspec +require 'spec_helper' + +describe "the reverse function" do + let(:scope) { PuppetlabsSpec::PuppetInternals.scope } + + it "should exist" do + Puppet::Parser::Functions.function("reverse").should == "function_reverse" + end + + it "should raise a ParseError if there is less than 1 arguments" do + lambda { scope.function_reverse([]) }.should( raise_error(Puppet::ParseError)) + end + + it "should reverse a string" do + result = scope.function_reverse(["asdfghijkl"]) + result.should(eq('lkjihgfdsa')) + end +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/functions/rstrip_spec.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/functions/rstrip_spec.rb new file mode 100755 index 00000000000..d90de1d0609 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/functions/rstrip_spec.rb @@ -0,0 +1,24 @@ +#! /usr/bin/env ruby -S rspec +require 'spec_helper' + +describe "the rstrip function" do + let(:scope) { PuppetlabsSpec::PuppetInternals.scope } + + it "should exist" do + Puppet::Parser::Functions.function("rstrip").should == "function_rstrip" + end + + it "should raise a ParseError if there is less than 1 arguments" do + lambda { scope.function_rstrip([]) }.should( raise_error(Puppet::ParseError)) + end + + it "should rstrip a string" do + result = scope.function_rstrip(["asdf "]) + result.should(eq('asdf')) + end + + it "should rstrip each element in an array" do + result = scope.function_rstrip([["a ","b ", "c "]]) + result.should(eq(['a','b','c'])) + end +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/functions/shuffle_spec.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/functions/shuffle_spec.rb new file mode 100755 index 00000000000..93346d53700 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/functions/shuffle_spec.rb @@ -0,0 +1,24 @@ +#! /usr/bin/env ruby -S rspec +require 'spec_helper' + +describe "the shuffle function" do + let(:scope) { PuppetlabsSpec::PuppetInternals.scope } + + it "should exist" do + Puppet::Parser::Functions.function("shuffle").should == "function_shuffle" + end + + it "should raise a ParseError if there is less than 1 arguments" do + lambda { scope.function_shuffle([]) }.should( raise_error(Puppet::ParseError)) + end + + it "should shuffle a string and the result should be the same size" do + result = scope.function_shuffle(["asdf"]) + result.size.should(eq(4)) + end + + it "should shuffle a string but the sorted contents should still be the same" do + result = scope.function_shuffle(["adfs"]) + result.split("").sort.join("").should(eq("adfs")) + end +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/functions/size_spec.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/functions/size_spec.rb new file mode 100755 index 00000000000..b1c435a3027 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/functions/size_spec.rb @@ -0,0 +1,24 @@ +#! /usr/bin/env ruby -S rspec +require 'spec_helper' + +describe "the size function" do + let(:scope) { PuppetlabsSpec::PuppetInternals.scope } + + it "should exist" do + Puppet::Parser::Functions.function("size").should == "function_size" + end + + it "should raise a ParseError if there is less than 1 arguments" do + lambda { scope.function_size([]) }.should( raise_error(Puppet::ParseError)) + end + + it "should return the size of a string" do + result = scope.function_size(["asdf"]) + result.should(eq(4)) + end + + it "should return the size of an array" do + result = scope.function_size([["a","b","c"]]) + result.should(eq(3)) + end +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/functions/sort_spec.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/functions/sort_spec.rb new file mode 100755 index 00000000000..3187a5aecbc --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/functions/sort_spec.rb @@ -0,0 +1,24 @@ +#! /usr/bin/env ruby -S rspec +require 'spec_helper' + +describe "the sort function" do + let(:scope) { PuppetlabsSpec::PuppetInternals.scope } + + it "should exist" do + Puppet::Parser::Functions.function("sort").should == "function_sort" + end + + it "should raise a ParseError if there is not 1 arguments" do + lambda { scope.function_sort(['','']) }.should( raise_error(Puppet::ParseError)) + end + + it "should sort an array" do + result = scope.function_sort([["a","c","b"]]) + result.should(eq(['a','b','c'])) + end + + it "should sort a string" do + result = scope.function_sort(["acb"]) + result.should(eq('abc')) + end +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/functions/squeeze_spec.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/functions/squeeze_spec.rb new file mode 100755 index 00000000000..60e5a3028db --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/functions/squeeze_spec.rb @@ -0,0 +1,24 @@ +#! /usr/bin/env ruby -S rspec +require 'spec_helper' + +describe "the squeeze function" do + let(:scope) { PuppetlabsSpec::PuppetInternals.scope } + + it "should exist" do + Puppet::Parser::Functions.function("squeeze").should == "function_squeeze" + end + + it "should raise a ParseError if there is less than 2 arguments" do + lambda { scope.function_squeeze([]) }.should( raise_error(Puppet::ParseError)) + end + + it "should squeeze a string" do + result = scope.function_squeeze(["aaabbbbcccc"]) + result.should(eq('abc')) + end + + it "should squeeze all elements in an array" do + result = scope.function_squeeze([["aaabbbbcccc","dddfff"]]) + result.should(eq(['abc','df'])) + end +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/functions/str2bool_spec.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/functions/str2bool_spec.rb new file mode 100755 index 00000000000..73c09c72922 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/functions/str2bool_spec.rb @@ -0,0 +1,31 @@ +#! /usr/bin/env ruby -S rspec +require 'spec_helper' + +describe "the str2bool function" do + let(:scope) { PuppetlabsSpec::PuppetInternals.scope } + + it "should exist" do + Puppet::Parser::Functions.function("str2bool").should == "function_str2bool" + end + + it "should raise a ParseError if there is less than 1 arguments" do + lambda { scope.function_str2bool([]) }.should( raise_error(Puppet::ParseError)) + end + + it "should convert string 'true' to true" do + result = scope.function_str2bool(["true"]) + result.should(eq(true)) + end + + it "should convert string 'undef' to false" do + result = scope.function_str2bool(["undef"]) + result.should(eq(false)) + end + + it "should return the boolean it was called with" do + result = scope.function_str2bool([true]) + result.should(eq(true)) + result = scope.function_str2bool([false]) + result.should(eq(false)) + end +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/functions/str2saltedsha512_spec.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/functions/str2saltedsha512_spec.rb new file mode 100755 index 00000000000..df8fb8e905c --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/functions/str2saltedsha512_spec.rb @@ -0,0 +1,45 @@ +#! /usr/bin/env ruby -S rspec +require 'spec_helper' + +describe "the str2saltedsha512 function" do + let(:scope) { PuppetlabsSpec::PuppetInternals.scope } + + it "should exist" do + Puppet::Parser::Functions.function("str2saltedsha512").should == "function_str2saltedsha512" + end + + it "should raise a ParseError if there is less than 1 argument" do + expect { scope.function_str2saltedsha512([]) }.to( raise_error(Puppet::ParseError) ) + end + + it "should raise a ParseError if there is more than 1 argument" do + expect { scope.function_str2saltedsha512(['foo', 'bar', 'baz']) }.to( raise_error(Puppet::ParseError) ) + end + + it "should return a salted-sha512 password hash 136 characters in length" do + result = scope.function_str2saltedsha512(["password"]) + result.length.should(eq(136)) + end + + it "should raise an error if you pass a non-string password" do + expect { scope.function_str2saltedsha512([1234]) }.to( raise_error(Puppet::ParseError) ) + end + + it "should generate a valid password" do + # Allow the function to generate a password based on the string 'password' + password_hash = scope.function_str2saltedsha512(["password"]) + + # Separate the Salt and Password from the Password Hash + salt = password_hash[0..7] + password = password_hash[8..-1] + + # Convert the Salt and Password from Hex to Binary Data + str_salt = Array(salt.lines).pack('H*') + str_password = Array(password.lines).pack('H*') + + # Combine the Binary Salt with 'password' and compare the end result + saltedpass = Digest::SHA512.digest(str_salt + 'password') + result = (str_salt + saltedpass).unpack('H*')[0] + result.should == password_hash + end +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/functions/strftime_spec.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/functions/strftime_spec.rb new file mode 100755 index 00000000000..df42b6f26bd --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/functions/strftime_spec.rb @@ -0,0 +1,29 @@ +#! /usr/bin/env ruby -S rspec +require 'spec_helper' + +describe "the strftime function" do + let(:scope) { PuppetlabsSpec::PuppetInternals.scope } + + it "should exist" do + Puppet::Parser::Functions.function("strftime").should == "function_strftime" + end + + it "should raise a ParseError if there is less than 1 arguments" do + lambda { scope.function_strftime([]) }.should( raise_error(Puppet::ParseError)) + end + + it "using %s should be higher then when I wrote this test" do + result = scope.function_strftime(["%s"]) + result.to_i.should(be > 1311953157) + end + + it "using %s should be lower then 1.5 trillion" do + result = scope.function_strftime(["%s"]) + result.to_i.should(be < 1500000000) + end + + it "should return a date when given %Y-%m-%d" do + result = scope.function_strftime(["%Y-%m-%d"]) + result.should =~ /^\d{4}-\d{2}-\d{2}$/ + end +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/functions/strip_spec.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/functions/strip_spec.rb new file mode 100755 index 00000000000..fccdd26067c --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/functions/strip_spec.rb @@ -0,0 +1,18 @@ +#! /usr/bin/env ruby -S rspec +require 'spec_helper' + +describe "the strip function" do + let(:scope) { PuppetlabsSpec::PuppetInternals.scope } + it "should exist" do + Puppet::Parser::Functions.function("strip").should == "function_strip" + end + + it "should raise a ParseError if there is less than 1 arguments" do + lambda { scope.function_strip([]) }.should( raise_error(Puppet::ParseError)) + end + + it "should strip a string" do + result = scope.function_strip([" ab cd "]) + result.should(eq('ab cd')) + end +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/functions/suffix_spec.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/functions/suffix_spec.rb new file mode 100755 index 00000000000..89ba3b82309 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/functions/suffix_spec.rb @@ -0,0 +1,27 @@ +#! /usr/bin/env ruby -S rspec +require 'spec_helper' + +describe "the suffix function" do + let(:scope) { PuppetlabsSpec::PuppetInternals.scope } + + it "raises a ParseError if there is less than 1 arguments" do + expect { scope.function_suffix([]) }.to raise_error(Puppet::ParseError, /number of arguments/) + end + + it "raises an error if the first argument is not an array" do + expect { + scope.function_suffix([Object.new]) + }.to raise_error(Puppet::ParseError, /expected first argument to be an Array/) + end + + it "raises an error if the second argument is not a string" do + expect { + scope.function_suffix([['first', 'second'], 42]) + }.to raise_error(Puppet::ParseError, /expected second argument to be a String/) + end + + it "returns a suffixed array" do + result = scope.function_suffix([['a','b','c'], 'p']) + result.should(eq(['ap','bp','cp'])) + end +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/functions/swapcase_spec.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/functions/swapcase_spec.rb new file mode 100755 index 00000000000..808b4158767 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/functions/swapcase_spec.rb @@ -0,0 +1,19 @@ +#! /usr/bin/env ruby -S rspec +require 'spec_helper' + +describe "the swapcase function" do + let(:scope) { PuppetlabsSpec::PuppetInternals.scope } + + it "should exist" do + Puppet::Parser::Functions.function("swapcase").should == "function_swapcase" + end + + it "should raise a ParseError if there is less than 1 arguments" do + lambda { scope.function_swapcase([]) }.should( raise_error(Puppet::ParseError)) + end + + it "should swapcase a string" do + result = scope.function_swapcase(["aaBBccDD"]) + result.should(eq('AAbbCCdd')) + end +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/functions/time_spec.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/functions/time_spec.rb new file mode 100755 index 00000000000..e9fb76e6ac3 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/functions/time_spec.rb @@ -0,0 +1,29 @@ +#! /usr/bin/env ruby -S rspec +require 'spec_helper' + +describe "the time function" do + let(:scope) { PuppetlabsSpec::PuppetInternals.scope } + + it "should exist" do + Puppet::Parser::Functions.function("time").should == "function_time" + end + + it "should raise a ParseError if there is more than 2 arguments" do + lambda { scope.function_time(['','']) }.should( raise_error(Puppet::ParseError)) + end + + it "should return a number" do + result = scope.function_time([]) + result.should be_an(Integer) + end + + it "should be higher then when I wrote this test" do + result = scope.function_time([]) + result.should(be > 1311953157) + end + + it "should be lower then 1.5 trillion" do + result = scope.function_time([]) + result.should(be < 1500000000) + end +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/functions/to_bytes_spec.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/functions/to_bytes_spec.rb new file mode 100755 index 00000000000..d1ea4c80cc2 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/functions/to_bytes_spec.rb @@ -0,0 +1,58 @@ +#! /usr/bin/env ruby -S rspec + +require 'spec_helper' + +describe "the to_bytes function" do + let(:scope) { PuppetlabsSpec::PuppetInternals.scope } + + it "should exist" do + Puppet::Parser::Functions.function("to_bytes").should == "function_to_bytes" + end + + it "should raise a ParseError if there is less than 1 arguments" do + lambda { scope.function_to_bytes([]) }.should( raise_error(Puppet::ParseError)) + end + + it "should convert kB to B" do + result = scope.function_to_bytes(["4 kB"]) + result.should(eq(4096)) + end + + it "should work without B in unit" do + result = scope.function_to_bytes(["4 k"]) + result.should(eq(4096)) + end + + it "should work without a space before unit" do + result = scope.function_to_bytes(["4k"]) + result.should(eq(4096)) + end + + it "should work without a unit" do + result = scope.function_to_bytes(["5678"]) + result.should(eq(5678)) + end + + it "should convert fractions" do + result = scope.function_to_bytes(["1.5 kB"]) + result.should(eq(1536)) + end + + it "should convert scientific notation" do + result = scope.function_to_bytes(["1.5e2 B"]) + result.should(eq(150)) + end + + it "should do nothing with a positive number" do + result = scope.function_to_bytes([5678]) + result.should(eq(5678)) + end + + it "should should raise a ParseError if input isn't a number" do + lambda { scope.function_to_bytes(["foo"]) }.should( raise_error(Puppet::ParseError)) + end + + it "should should raise a ParseError if prefix is unknown" do + lambda { scope.function_to_bytes(["5 uB"]) }.should( raise_error(Puppet::ParseError)) + end +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/functions/type_spec.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/functions/type_spec.rb new file mode 100755 index 00000000000..8fec88f2660 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/functions/type_spec.rb @@ -0,0 +1,43 @@ +#! /usr/bin/env ruby -S rspec +require 'spec_helper' + +describe "the type function" do + let(:scope) { PuppetlabsSpec::PuppetInternals.scope } + it "should exist" do + Puppet::Parser::Functions.function("type").should == "function_type" + end + + it "should raise a ParseError if there is less than 1 arguments" do + lambda { scope.function_type([]) }.should( raise_error(Puppet::ParseError)) + end + + it "should return string when given a string" do + result = scope.function_type(["aaabbbbcccc"]) + result.should(eq('string')) + end + + it "should return array when given an array" do + result = scope.function_type([["aaabbbbcccc","asdf"]]) + result.should(eq('array')) + end + + it "should return hash when given a hash" do + result = scope.function_type([{"a"=>1,"b"=>2}]) + result.should(eq('hash')) + end + + it "should return integer when given an integer" do + result = scope.function_type(["1"]) + result.should(eq('integer')) + end + + it "should return float when given a float" do + result = scope.function_type(["1.34"]) + result.should(eq('float')) + end + + it "should return boolean when given a boolean" do + result = scope.function_type([true]) + result.should(eq('boolean')) + end +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/functions/union_spec.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/functions/union_spec.rb new file mode 100755 index 00000000000..0d282caa653 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/functions/union_spec.rb @@ -0,0 +1,19 @@ +#! /usr/bin/env ruby -S rspec +require 'spec_helper' + +describe "the union function" do + let(:scope) { PuppetlabsSpec::PuppetInternals.scope } + + it "should exist" do + Puppet::Parser::Functions.function("union").should == "function_union" + end + + it "should raise a ParseError if there are fewer than 2 arguments" do + lambda { scope.function_union([]) }.should( raise_error(Puppet::ParseError) ) + end + + it "should join two arrays together" do + result = scope.function_union([["a","b","c"],["b","c","d"]]) + result.should(eq(["a","b","c","d"])) + end +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/functions/unique_spec.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/functions/unique_spec.rb new file mode 100755 index 00000000000..5d48d49b723 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/functions/unique_spec.rb @@ -0,0 +1,24 @@ +#! /usr/bin/env ruby -S rspec +require 'spec_helper' + +describe "the unique function" do + let(:scope) { PuppetlabsSpec::PuppetInternals.scope } + + it "should exist" do + Puppet::Parser::Functions.function("unique").should == "function_unique" + end + + it "should raise a ParseError if there is less than 1 arguments" do + lambda { scope.function_unique([]) }.should( raise_error(Puppet::ParseError)) + end + + it "should remove duplicate elements in a string" do + result = scope.function_unique(["aabbc"]) + result.should(eq('abc')) + end + + it "should remove duplicate elements in an array" do + result = scope.function_unique([["a","a","b","b","c"]]) + result.should(eq(['a','b','c'])) + end +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/functions/upcase_spec.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/functions/upcase_spec.rb new file mode 100755 index 00000000000..5db55138a69 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/functions/upcase_spec.rb @@ -0,0 +1,24 @@ +#! /usr/bin/env ruby -S rspec +require 'spec_helper' + +describe "the upcase function" do + let(:scope) { PuppetlabsSpec::PuppetInternals.scope } + + it "should exist" do + Puppet::Parser::Functions.function("upcase").should == "function_upcase" + end + + it "should raise a ParseError if there is less than 1 arguments" do + lambda { scope.function_upcase([]) }.should( raise_error(Puppet::ParseError)) + end + + it "should upcase a string" do + result = scope.function_upcase(["abc"]) + result.should(eq('ABC')) + end + + it "should do nothing if a string is already upcase" do + result = scope.function_upcase(["ABC"]) + result.should(eq('ABC')) + end +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/functions/uriescape_spec.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/functions/uriescape_spec.rb new file mode 100755 index 00000000000..7211c88783d --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/functions/uriescape_spec.rb @@ -0,0 +1,24 @@ +#! /usr/bin/env ruby -S rspec +require 'spec_helper' + +describe "the uriescape function" do + let(:scope) { PuppetlabsSpec::PuppetInternals.scope } + + it "should exist" do + Puppet::Parser::Functions.function("uriescape").should == "function_uriescape" + end + + it "should raise a ParseError if there is less than 1 arguments" do + lambda { scope.function_uriescape([]) }.should( raise_error(Puppet::ParseError)) + end + + it "should uriescape a string" do + result = scope.function_uriescape([":/?#[]@!$&'()*+,;= \"{}"]) + result.should(eq(':/?%23[]@!$&\'()*+,;=%20%22%7B%7D')) + end + + it "should do nothing if a string is already safe" do + result = scope.function_uriescape(["ABCdef"]) + result.should(eq('ABCdef')) + end +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/functions/validate_absolute_path_spec.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/functions/validate_absolute_path_spec.rb new file mode 100755 index 00000000000..342ae848257 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/functions/validate_absolute_path_spec.rb @@ -0,0 +1,84 @@ +#! /usr/bin/env ruby -S rspec +require 'spec_helper' + +describe Puppet::Parser::Functions.function(:validate_absolute_path) do + let(:scope) { PuppetlabsSpec::PuppetInternals.scope } + + # The subject of these examples is the method itself. + subject do + # This makes sure the function is loaded within each test + function_name = Puppet::Parser::Functions.function(:validate_absolute_path) + scope.method(function_name) + end + + describe "Valid Paths" do + def self.valid_paths + %w{ + C:/ + C:\\ + C:\\WINDOWS\\System32 + C:/windows/system32 + X:/foo/bar + X:\\foo\\bar + /var/tmp + /var/lib/puppet + /var/opt/../lib/puppet + } + end + + context "Without Puppet::Util.absolute_path? (e.g. Puppet <= 2.6)" do + before :each do + # The intent here is to mock Puppet to behave like Puppet 2.6 does. + # Puppet 2.6 does not have the absolute_path? method. This is only a + # convenience test, stdlib should be run with the Puppet 2.6.x in the + # $LOAD_PATH in addition to 2.7.x and master. + Puppet::Util.expects(:respond_to?).with(:absolute_path?).returns(false) + end + valid_paths.each do |path| + it "validate_absolute_path(#{path.inspect}) should not fail" do + expect { subject.call [path] }.not_to raise_error + end + end + end + + context "Puppet without mocking" do + valid_paths.each do |path| + it "validate_absolute_path(#{path.inspect}) should not fail" do + expect { subject.call [path] }.not_to raise_error + end + end + end + end + + describe 'Invalid paths' do + context 'Garbage inputs' do + [ + nil, + [ nil ], + { 'foo' => 'bar' }, + { }, + '', + ].each do |path| + it "validate_absolute_path(#{path.inspect}) should fail" do + expect { subject.call [path] }.to raise_error Puppet::ParseError + end + end + end + + context 'Relative paths' do + %w{ + relative1 + . + .. + ./foo + ../foo + etc/puppetlabs/puppet + opt/puppet/bin + }.each do |path| + it "validate_absolute_path(#{path.inspect}) should fail" do + expect { subject.call [path] }.to raise_error Puppet::ParseError + end + end + end + end +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/functions/validate_array_spec.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/functions/validate_array_spec.rb new file mode 100755 index 00000000000..4b31cfde42f --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/functions/validate_array_spec.rb @@ -0,0 +1,38 @@ +#! /usr/bin/env ruby -S rspec + +require 'spec_helper' + +describe Puppet::Parser::Functions.function(:validate_array) do + let(:scope) { PuppetlabsSpec::PuppetInternals.scope } + describe 'when calling validate_array from puppet' do + + %w{ true false }.each do |the_string| + it "should not compile when #{the_string} is a string" do + Puppet[:code] = "validate_array('#{the_string}')" + expect { scope.compiler.compile }.to raise_error(Puppet::ParseError, /is not an Array/) + end + + it "should not compile when #{the_string} is a bare word" do + Puppet[:code] = "validate_array(#{the_string})" + expect { scope.compiler.compile }.to raise_error(Puppet::ParseError, /is not an Array/) + end + end + + it "should compile when multiple array arguments are passed" do + Puppet[:code] = <<-'ENDofPUPPETcode' + $foo = [ ] + $bar = [ 'one', 'two' ] + validate_array($foo, $bar) + ENDofPUPPETcode + scope.compiler.compile + end + + it "should not compile when an undef variable is passed" do + Puppet[:code] = <<-'ENDofPUPPETcode' + $foo = undef + validate_array($foo) + ENDofPUPPETcode + expect { scope.compiler.compile }.to raise_error(Puppet::ParseError, /is not an Array/) + end + end +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/functions/validate_augeas_spec.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/functions/validate_augeas_spec.rb new file mode 100755 index 00000000000..c695ba2eb7f --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/functions/validate_augeas_spec.rb @@ -0,0 +1,103 @@ +#! /usr/bin/env ruby -S rspec +require 'spec_helper' + +describe Puppet::Parser::Functions.function(:validate_augeas), :if => Puppet.features.augeas? do + let(:scope) { PuppetlabsSpec::PuppetInternals.scope } + + # The subject of these examplres is the method itself. + subject do + # This makes sure the function is loaded within each test + function_name = Puppet::Parser::Functions.function(:validate_augeas) + scope.method(function_name) + end + + context 'Using Puppet::Parser::Scope.new' do + + describe 'Garbage inputs' do + inputs = [ + [ nil ], + [ [ nil ] ], + [ { 'foo' => 'bar' } ], + [ { } ], + [ '' ], + [ "one", "one", "MSG to User", "4th arg" ], + ] + + inputs.each do |input| + it "validate_augeas(#{input.inspect}) should fail" do + expect { subject.call [input] }.to raise_error Puppet::ParseError + end + end + end + + describe 'Valid inputs' do + inputs = [ + [ "root:x:0:0:root:/root:/bin/bash\n", 'Passwd.lns' ], + [ "proc /proc proc nodev,noexec,nosuid 0 0\n", 'Fstab.lns'], + ] + + inputs.each do |input| + it "validate_augeas(#{input.inspect}) should not fail" do + expect { subject.call input }.not_to raise_error + end + end + end + + describe "Valid inputs which should raise an exception without a message" do + # The intent here is to make sure valid inputs raise exceptions when they + # don't specify an error message to display. This is the behvior in + # 2.2.x and prior. + inputs = [ + [ "root:x:0:0:root\n", 'Passwd.lns' ], + [ "127.0.1.1\n", 'Hosts.lns' ], + ] + + inputs.each do |input| + it "validate_augeas(#{input.inspect}) should fail" do + expect { subject.call input }.to raise_error /validate_augeas.*?matched less than it should/ + end + end + end + + describe "Nicer Error Messages" do + # The intent here is to make sure the function returns the 3rd argument + # in the exception thrown + inputs = [ + [ "root:x:0:0:root\n", 'Passwd.lns', [], 'Failed to validate passwd content' ], + [ "127.0.1.1\n", 'Hosts.lns', [], 'Wrong hosts content' ], + ] + + inputs.each do |input| + it "validate_augeas(#{input.inspect}) should fail" do + expect { subject.call input }.to raise_error /#{input[2]}/ + end + end + end + + describe "Passing simple unit tests" do + inputs = [ + [ "root:x:0:0:root:/root:/bin/bash\n", 'Passwd.lns', ['$file/foobar']], + [ "root:x:0:0:root:/root:/bin/bash\n", 'Passwd.lns', ['$file/root/shell[.="/bin/sh"]', 'foobar']], + ] + + inputs.each do |input| + it "validate_augeas(#{input.inspect}) should fail" do + expect { subject.call input }.not_to raise_error + end + end + end + + describe "Failing simple unit tests" do + inputs = [ + [ "foobar:x:0:0:root:/root:/bin/bash\n", 'Passwd.lns', ['$file/foobar']], + [ "root:x:0:0:root:/root:/bin/sh\n", 'Passwd.lns', ['$file/root/shell[.="/bin/sh"]', 'foobar']], + ] + + inputs.each do |input| + it "validate_augeas(#{input.inspect}) should fail" do + expect { subject.call input }.to raise_error /testing path/ + end + end + end + end +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/functions/validate_bool_spec.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/functions/validate_bool_spec.rb new file mode 100755 index 00000000000..a352d3b550b --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/functions/validate_bool_spec.rb @@ -0,0 +1,51 @@ +#! /usr/bin/env ruby -S rspec + +require 'spec_helper' + +describe Puppet::Parser::Functions.function(:validate_bool) do + let(:scope) { PuppetlabsSpec::PuppetInternals.scope } + describe 'when calling validate_bool from puppet' do + + %w{ true false }.each do |the_string| + + it "should not compile when #{the_string} is a string" do + Puppet[:code] = "validate_bool('#{the_string}')" + expect { scope.compiler.compile }.to raise_error(Puppet::ParseError, /is not a boolean/) + end + + it "should compile when #{the_string} is a bare word" do + Puppet[:code] = "validate_bool(#{the_string})" + scope.compiler.compile + end + + end + + it "should not compile when an arbitrary string is passed" do + Puppet[:code] = 'validate_bool("jeff and dan are awesome")' + expect { scope.compiler.compile }.to raise_error(Puppet::ParseError, /is not a boolean/) + end + + it "should not compile when no arguments are passed" do + Puppet[:code] = 'validate_bool()' + expect { scope.compiler.compile }.to raise_error(Puppet::ParseError, /wrong number of arguments/) + end + + it "should compile when multiple boolean arguments are passed" do + Puppet[:code] = <<-'ENDofPUPPETcode' + $foo = true + $bar = false + validate_bool($foo, $bar, true, false) + ENDofPUPPETcode + scope.compiler.compile + end + + it "should compile when multiple boolean arguments are passed" do + Puppet[:code] = <<-'ENDofPUPPETcode' + $foo = true + $bar = false + validate_bool($foo, $bar, true, false, 'jeff') + ENDofPUPPETcode + expect { scope.compiler.compile }.to raise_error(Puppet::ParseError, /is not a boolean/) + end + end +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/functions/validate_cmd_spec.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/functions/validate_cmd_spec.rb new file mode 100755 index 00000000000..a6e68df2105 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/functions/validate_cmd_spec.rb @@ -0,0 +1,48 @@ +#! /usr/bin/env ruby -S rspec +require 'spec_helper' + +TESTEXE = File.exists?('/usr/bin/test') ? '/usr/bin/test' : '/bin/test' +TOUCHEXE = File.exists?('/usr/bin/touch') ? '/usr/bin/touch' : '/bin/touch' + +describe Puppet::Parser::Functions.function(:validate_cmd) do + let(:scope) { PuppetlabsSpec::PuppetInternals.scope } + + subject do + function_name = Puppet::Parser::Functions.function(:validate_cmd) + scope.method(function_name) + end + + describe "with an explicit failure message" do + it "prints the failure message on error" do + expect { + subject.call ['', '/bin/false', 'failure message!'] + }.to raise_error Puppet::ParseError, /failure message!/ + end + end + + describe "on validation failure" do + it "includes the command error output" do + expect { + subject.call ['', "#{TOUCHEXE} /cant/touch/this"] + }.to raise_error Puppet::ParseError, /(cannot touch|o such file or)/ + end + + it "includes the command return value" do + expect { + subject.call ['', '/cant/run/this'] + }.to raise_error Puppet::ParseError, /returned 1\b/ + end + end + + describe "when performing actual validation" do + it "can positively validate file content" do + expect { subject.call ["non-empty", "#{TESTEXE} -s"] }.to_not raise_error + end + + it "can negatively validate file content" do + expect { + subject.call ["", "#{TESTEXE} -s"] + }.to raise_error Puppet::ParseError, /failed to validate.*test -s/ + end + end +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/functions/validate_hash_spec.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/functions/validate_hash_spec.rb new file mode 100755 index 00000000000..a0c35c2304f --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/functions/validate_hash_spec.rb @@ -0,0 +1,43 @@ +#! /usr/bin/env ruby -S rspec + +require 'spec_helper' + +describe Puppet::Parser::Functions.function(:validate_hash) do + let(:scope) { PuppetlabsSpec::PuppetInternals.scope } + + describe 'when calling validate_hash from puppet' do + + %w{ true false }.each do |the_string| + + it "should not compile when #{the_string} is a string" do + Puppet[:code] = "validate_hash('#{the_string}')" + expect { scope.compiler.compile }.to raise_error(Puppet::ParseError, /is not a Hash/) + end + + it "should not compile when #{the_string} is a bare word" do + Puppet[:code] = "validate_hash(#{the_string})" + expect { scope.compiler.compile }.to raise_error(Puppet::ParseError, /is not a Hash/) + end + + end + + it "should compile when multiple hash arguments are passed" do + Puppet[:code] = <<-'ENDofPUPPETcode' + $foo = {} + $bar = { 'one' => 'two' } + validate_hash($foo, $bar) + ENDofPUPPETcode + scope.compiler.compile + end + + it "should not compile when an undef variable is passed" do + Puppet[:code] = <<-'ENDofPUPPETcode' + $foo = undef + validate_hash($foo) + ENDofPUPPETcode + expect { scope.compiler.compile }.to raise_error(Puppet::ParseError, /is not a Hash/) + end + + end + +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/functions/validate_ipv4_address_spec.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/functions/validate_ipv4_address_spec.rb new file mode 100755 index 00000000000..45401a42327 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/functions/validate_ipv4_address_spec.rb @@ -0,0 +1,64 @@ +#! /usr/bin/env ruby -S rspec + +require "spec_helper" + +describe Puppet::Parser::Functions.function(:validate_ipv4_address) do + let(:scope) { PuppetlabsSpec::PuppetInternals.scope } + + describe "when calling validate_ipv4_address from puppet" do + describe "when given IPv4 address strings" do + it "should compile with one argument" do + Puppet[:code] = "validate_ipv4_address('1.2.3.4')" + scope.compiler.compile + end + + it "should compile with multiple arguments" do + Puppet[:code] = "validate_ipv4_address('1.2.3.4', '5.6.7.8')" + scope.compiler.compile + end + end + + describe "when given an IPv6 address" do + it "should not compile" do + Puppet[:code] = "validate_ipv4_address('3ffe:505')" + expect { + scope.compiler.compile + }.to raise_error(Puppet::ParseError, /not a valid IPv4 address/) + end + end + + describe "when given other strings" do + it "should not compile" do + Puppet[:code] = "validate_ipv4_address('hello', 'world')" + expect { + scope.compiler.compile + }.to raise_error(Puppet::ParseError, /not a valid IPv4 address/) + end + end + + describe "when given numbers" do + it "should not compile" do + Puppet[:code] = "validate_ipv4_address(1, 2)" + expect { + scope.compiler.compile + }.to raise_error(Puppet::ParseError, /is not a valid IPv4 address/) + end + end + + describe "when given booleans" do + it "should not compile" do + Puppet[:code] = "validate_ipv4_address(true, false)" + expect { + scope.compiler.compile + }.to raise_error(Puppet::ParseError, /is not a string/) + end + end + + it "should not compile when no arguments are passed" do + Puppet[:code] = "validate_ipv4_address()" + expect { + scope.compiler.compile + }.to raise_error(Puppet::ParseError, /wrong number of arguments/) + end + end +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/functions/validate_ipv6_address_spec.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/functions/validate_ipv6_address_spec.rb new file mode 100755 index 00000000000..a839d902c9e --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/functions/validate_ipv6_address_spec.rb @@ -0,0 +1,67 @@ +#! /usr/bin/env ruby -S rspec + +require "spec_helper" + +describe Puppet::Parser::Functions.function(:validate_ipv6_address) do + let(:scope) { PuppetlabsSpec::PuppetInternals.scope } + + describe "when calling validate_ipv6_address from puppet" do + describe "when given IPv6 address strings" do + it "should compile with one argument" do + Puppet[:code] = "validate_ipv6_address('3ffe:0505:0002::')" + scope.compiler.compile + end + + it "should compile with multiple arguments" do + Puppet[:code] = "validate_ipv6_address('3ffe:0505:0002::', '3ffe:0505:0001::')" + scope.compiler.compile + end + end + + describe "when given an ipv4 address" do + it "should not compile" do + Puppet[:code] = "validate_ipv6_address('1.2.3.4')" + expect { + scope.compiler.compile + }.to raise_error(Puppet::ParseError, /not a valid IPv6 address/) + end + end + + describe "when given other strings" do + it "should not compile" do + Puppet[:code] = "validate_ipv6_address('hello', 'world')" + expect { + scope.compiler.compile + }.to raise_error(Puppet::ParseError, /not a valid IPv6 address/) + end + end + + # 1.8.7 is EOL'd and also absolutely insane about ipv6 + unless RUBY_VERSION == '1.8.7' + describe "when given numbers" do + it "should not compile" do + Puppet[:code] = "validate_ipv6_address(1, 2)" + expect { + scope.compiler.compile + }.to raise_error(Puppet::ParseError, /not a valid IPv6 address/) + end + end + end + + describe "when given booleans" do + it "should not compile" do + Puppet[:code] = "validate_ipv6_address(true, false)" + expect { + scope.compiler.compile + }.to raise_error(Puppet::ParseError, /is not a string/) + end + end + + it "should not compile when no arguments are passed" do + Puppet[:code] = "validate_ipv6_address()" + expect { + scope.compiler.compile + }.to raise_error(Puppet::ParseError, /wrong number of arguments/) + end + end +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/functions/validate_re_spec.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/functions/validate_re_spec.rb new file mode 100755 index 00000000000..d29988bf006 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/functions/validate_re_spec.rb @@ -0,0 +1,77 @@ +#! /usr/bin/env ruby -S rspec +require 'spec_helper' + +describe Puppet::Parser::Functions.function(:validate_re) do + let(:scope) { PuppetlabsSpec::PuppetInternals.scope } + + # The subject of these examplres is the method itself. + subject do + # This makes sure the function is loaded within each test + function_name = Puppet::Parser::Functions.function(:validate_re) + scope.method(function_name) + end + + context 'Using Puppet::Parser::Scope.new' do + + describe 'Garbage inputs' do + inputs = [ + [ nil ], + [ [ nil ] ], + [ { 'foo' => 'bar' } ], + [ { } ], + [ '' ], + [ "one", "one", "MSG to User", "4th arg" ], + ] + + inputs.each do |input| + it "validate_re(#{input.inspect}) should fail" do + expect { subject.call [input] }.to raise_error Puppet::ParseError + end + end + end + + describe 'Valid inputs' do + inputs = [ + [ '/full/path/to/something', '^/full' ], + [ '/full/path/to/something', 'full' ], + [ '/full/path/to/something', ['full', 'absent'] ], + [ '/full/path/to/something', ['full', 'absent'], 'Message to the user' ], + ] + + inputs.each do |input| + it "validate_re(#{input.inspect}) should not fail" do + expect { subject.call input }.not_to raise_error + end + end + end + describe "Valid inputs which should raise an exception without a message" do + # The intent here is to make sure valid inputs raise exceptions when they + # don't specify an error message to display. This is the behvior in + # 2.2.x and prior. + inputs = [ + [ "hello", [ "bye", "later", "adios" ] ], + [ "greetings", "salutations" ], + ] + + inputs.each do |input| + it "validate_re(#{input.inspect}) should fail" do + expect { subject.call input }.to raise_error /validate_re.*?does not match/ + end + end + end + describe "Nicer Error Messages" do + # The intent here is to make sure the function returns the 3rd argument + # in the exception thrown + inputs = [ + [ "hello", [ "bye", "later", "adios" ], "MSG to User" ], + [ "greetings", "salutations", "Error, greetings does not match salutations" ], + ] + + inputs.each do |input| + it "validate_re(#{input.inspect}) should fail" do + expect { subject.call input }.to raise_error /#{input[2]}/ + end + end + end + end +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/functions/validate_slength_spec.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/functions/validate_slength_spec.rb new file mode 100755 index 00000000000..851835fa1e5 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/functions/validate_slength_spec.rb @@ -0,0 +1,67 @@ +#! /usr/bin/env ruby -S rspec + +require 'spec_helper' + +describe "the validate_slength function" do + let(:scope) { PuppetlabsSpec::PuppetInternals.scope } + + it "should exist" do + Puppet::Parser::Functions.function("validate_slength").should == "function_validate_slength" + end + + describe "validating the input argument types" do + it "raises an error if there are less than two arguments" do + expect { scope.function_validate_slength([]) }.to raise_error Puppet::ParseError, /Wrong number of arguments/ + end + + it "raises an error if there are more than three arguments" do + expect { scope.function_validate_slength(['input', 1, 2, 3]) }.to raise_error Puppet::ParseError, /Wrong number of arguments/ + end + + it "raises an error if the first argument is not a string" do + expect { scope.function_validate_slength([Object.new, 2, 1]) }.to raise_error Puppet::ParseError, /Expected first argument.*got .*Object/ + end + + it "raises an error if the second argument cannot be cast to an Integer" do + expect { scope.function_validate_slength(['input', Object.new]) }.to raise_error Puppet::ParseError, /Expected second argument.*got .*Object/ + end + + it "raises an error if the third argument cannot be cast to an Integer" do + expect { scope.function_validate_slength(['input', 1, Object.new]) }.to raise_error Puppet::ParseError, /Expected third argument.*got .*Object/ + end + + it "raises an error if the second argument is smaller than the third argument" do + expect { scope.function_validate_slength(['input', 1, 2]) }.to raise_error Puppet::ParseError, /Expected second argument to be larger than third argument/ + end + end + + describe "validating the input string length" do + describe "when the input is a string" do + it "fails validation if the string is larger than the max length" do + expect { scope.function_validate_slength(['input', 1]) }.to raise_error Puppet::ParseError, /Expected length .* between 0 and 1, was 5/ + end + + it "fails validation if the string is less than the min length" do + expect { scope.function_validate_slength(['input', 10, 6]) }.to raise_error Puppet::ParseError, /Expected length .* between 6 and 10, was 5/ + end + + it "doesn't raise an error if the string is under the max length" do + scope.function_validate_slength(['input', 10]) + end + + it "doesn't raise an error if the string is equal to the max length" do + scope.function_validate_slength(['input', 5]) + end + + it "doesn't raise an error if the string is equal to the min length" do + scope.function_validate_slength(['input', 10, 5]) + end + end + + describe "when the input is an array" do + it "fails validation if one of the array elements is not a string" do + expect { scope.function_validate_slength([["a", "b", Object.new], 2]) }.to raise_error Puppet::ParseError, /Expected element at array position 2 .*String, got .*Object/ + end + end + end +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/functions/validate_string_spec.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/functions/validate_string_spec.rb new file mode 100755 index 00000000000..3b4fb3e1da1 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/functions/validate_string_spec.rb @@ -0,0 +1,60 @@ +#! /usr/bin/env ruby -S rspec + +require 'spec_helper' + +describe Puppet::Parser::Functions.function(:validate_string) do + let(:scope) { PuppetlabsSpec::PuppetInternals.scope } + + describe 'when calling validate_string from puppet' do + + %w{ foo bar baz }.each do |the_string| + + it "should compile when #{the_string} is a string" do + Puppet[:code] = "validate_string('#{the_string}')" + scope.compiler.compile + end + + it "should compile when #{the_string} is a bare word" do + Puppet[:code] = "validate_string(#{the_string})" + scope.compiler.compile + end + + end + + %w{ true false }.each do |the_string| + it "should compile when #{the_string} is a string" do + Puppet[:code] = "validate_string('#{the_string}')" + scope.compiler.compile + end + + it "should not compile when #{the_string} is a bare word" do + Puppet[:code] = "validate_string(#{the_string})" + expect { scope.compiler.compile }.to raise_error(Puppet::ParseError, /is not a string/) + end + end + + it "should compile when multiple string arguments are passed" do + Puppet[:code] = <<-'ENDofPUPPETcode' + $foo = '' + $bar = 'two' + validate_string($foo, $bar) + ENDofPUPPETcode + scope.compiler.compile + end + + it "should compile when an explicitly undef variable is passed (NOTE THIS MAY NOT BE DESIRABLE)" do + Puppet[:code] = <<-'ENDofPUPPETcode' + $foo = undef + validate_string($foo) + ENDofPUPPETcode + scope.compiler.compile + end + + it "should compile when an undefined variable is passed (NOTE THIS MAY NOT BE DESIRABLE)" do + Puppet[:code] = <<-'ENDofPUPPETcode' + validate_string($foobarbazishouldnotexist) + ENDofPUPPETcode + scope.compiler.compile + end + end +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/functions/values_at_spec.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/functions/values_at_spec.rb new file mode 100755 index 00000000000..08e95a567bc --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/functions/values_at_spec.rb @@ -0,0 +1,38 @@ +#! /usr/bin/env ruby -S rspec +require 'spec_helper' + +describe "the values_at function" do + let(:scope) { PuppetlabsSpec::PuppetInternals.scope } + + it "should exist" do + Puppet::Parser::Functions.function("values_at").should == "function_values_at" + end + + it "should raise a ParseError if there is less than 1 arguments" do + lambda { scope.function_values_at([]) }.should( raise_error(Puppet::ParseError)) + end + + it "should raise a ParseError if you try to use a range where stop is greater then start" do + lambda { scope.function_values_at([['a','b'],["3-1"]]) }.should( raise_error(Puppet::ParseError)) + end + + it "should return a value at from an array" do + result = scope.function_values_at([['a','b','c'],"1"]) + result.should(eq(['b'])) + end + + it "should return a value at from an array when passed a range" do + result = scope.function_values_at([['a','b','c'],"0-1"]) + result.should(eq(['a','b'])) + end + + it "should return chosen values from an array when passed number of indexes" do + result = scope.function_values_at([['a','b','c'],["0","2"]]) + result.should(eq(['a','c'])) + end + + it "should return chosen values from an array when passed ranges and multiple indexes" do + result = scope.function_values_at([['a','b','c','d','e','f','g'],["0","2","4-5"]]) + result.should(eq(['a','c','e','f'])) + end +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/functions/values_spec.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/functions/values_spec.rb new file mode 100755 index 00000000000..14ae4176380 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/functions/values_spec.rb @@ -0,0 +1,31 @@ +#! /usr/bin/env ruby -S rspec +require 'spec_helper' + +describe "the values function" do + let(:scope) { PuppetlabsSpec::PuppetInternals.scope } + + it "should exist" do + Puppet::Parser::Functions.function("values").should == "function_values" + end + + it "should raise a ParseError if there is less than 1 arguments" do + lambda { scope.function_values([]) }.should( raise_error(Puppet::ParseError)) + end + + it "should return values from a hash" do + result = scope.function_values([{'a'=>'1','b'=>'2','c'=>'3'}]) + # =~ is the RSpec::Matchers::MatchArray matcher. + # A.K.A. "array with same elements" (multiset) matching + result.should =~ %w{ 1 2 3 } + end + + it "should return a multiset" do + result = scope.function_values([{'a'=>'1','b'=>'3','c'=>'3'}]) + result.should =~ %w{ 1 3 3 } + result.should_not =~ %w{ 1 3 } + end + + it "should raise a ParseError unless a Hash is provided" do + lambda { scope.function_values([['a','b','c']]) }.should( raise_error(Puppet::ParseError)) + end +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/functions/zip_spec.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/functions/zip_spec.rb new file mode 100755 index 00000000000..f45ab17308d --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/functions/zip_spec.rb @@ -0,0 +1,15 @@ +#! /usr/bin/env ruby -S rspec +require 'spec_helper' + +describe "the zip function" do + let(:scope) { PuppetlabsSpec::PuppetInternals.scope } + + it "should raise a ParseError if there is less than 1 arguments" do + lambda { scope.function_zip([]) }.should( raise_error(Puppet::ParseError)) + end + + it "should be able to zip an array" do + result = scope.function_zip([['1','2','3'],['4','5','6']]) + result.should(eq([["1", "4"], ["2", "5"], ["3", "6"]])) + end +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/lib/puppet_spec/compiler.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/lib/puppet_spec/compiler.rb new file mode 100755 index 00000000000..2f0ae4d7974 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/lib/puppet_spec/compiler.rb @@ -0,0 +1,47 @@ +#! /usr/bin/env ruby -S rspec +module PuppetSpec::Compiler + def compile_to_catalog(string, node = Puppet::Node.new('foonode')) + Puppet[:code] = string + Puppet::Parser::Compiler.compile(node) + end + + def compile_to_ral(manifest) + catalog = compile_to_catalog(manifest) + ral = catalog.to_ral + ral.finalize + ral + end + + def compile_to_relationship_graph(manifest, prioritizer = Puppet::Graph::SequentialPrioritizer.new) + ral = compile_to_ral(manifest) + graph = Puppet::Graph::RelationshipGraph.new(prioritizer) + graph.populate_from(ral) + graph + end + + if Puppet.version.to_f >= 3.3 + def apply_compiled_manifest(manifest, prioritizer = Puppet::Graph::SequentialPrioritizer.new) + transaction = Puppet::Transaction.new(compile_to_ral(manifest), + Puppet::Transaction::Report.new("apply"), + prioritizer) + transaction.evaluate + transaction.report.finalize_report + + transaction + end + else + def apply_compiled_manifest(manifest) + transaction = Puppet::Transaction.new(compile_to_ral(manifest), Puppet::Transaction::Report.new("apply")) + transaction.evaluate + transaction.report.finalize_report + + transaction + end + end + + def order_resources_traversed_in(relationships) + order_seen = [] + relationships.traverse { |resource| order_seen << resource.ref } + order_seen + end +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/lib/puppet_spec/database.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/lib/puppet_spec/database.rb new file mode 100755 index 00000000000..f5c2341791b --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/lib/puppet_spec/database.rb @@ -0,0 +1,30 @@ +#! /usr/bin/env ruby -S rspec +# This just makes some nice things available at global scope, and for setup of +# tests to use a real fake database, rather than a fake stubs-that-don't-work +# version of the same. Fun times. +def sqlite? + if $sqlite.nil? + begin + require 'sqlite3' + $sqlite = true + rescue LoadError + $sqlite = false + end + end + $sqlite +end + +def can_use_scratch_database? + sqlite? and Puppet.features.rails? +end + + +# This is expected to be called in your `before :each` block, and will get you +# ready to roll with a serious database and all. Cleanup is handled +# automatically for you. Nothing to do there. +def setup_scratch_database + Puppet[:dbadapter] = 'sqlite3' + Puppet[:dblocation] = ':memory:' + Puppet[:railslog] = PuppetSpec::Files.tmpfile('storeconfigs.log') + Puppet::Rails.init +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/lib/puppet_spec/files.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/lib/puppet_spec/files.rb new file mode 100755 index 00000000000..71b38ffedfd --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/lib/puppet_spec/files.rb @@ -0,0 +1,61 @@ +#! /usr/bin/env ruby -S rspec +require 'fileutils' +require 'tempfile' +require 'tmpdir' +require 'pathname' + +# A support module for testing files. +module PuppetSpec::Files + def self.cleanup + $global_tempfiles ||= [] + while path = $global_tempfiles.pop do + begin + Dir.unstub(:entries) + FileUtils.rm_rf path, :secure => true + rescue Errno::ENOENT + # nothing to do + end + end + end + + def make_absolute(path) PuppetSpec::Files.make_absolute(path) end + def self.make_absolute(path) + path = File.expand_path(path) + path[0] = 'c' if Puppet.features.microsoft_windows? + path + end + + def tmpfile(name, dir = nil) PuppetSpec::Files.tmpfile(name, dir) end + def self.tmpfile(name, dir = nil) + # Generate a temporary file, just for the name... + source = dir ? Tempfile.new(name, dir) : Tempfile.new(name) + path = source.path + source.close! + + record_tmp(File.expand_path(path)) + + path + end + + def file_containing(name, contents) PuppetSpec::Files.file_containing(name, contents) end + def self.file_containing(name, contents) + file = tmpfile(name) + File.open(file, 'wb') { |f| f.write(contents) } + file + end + + def tmpdir(name) PuppetSpec::Files.tmpdir(name) end + def self.tmpdir(name) + dir = Dir.mktmpdir(name) + + record_tmp(dir) + + dir + end + + def self.record_tmp(tmp) + # ...record it for cleanup, + $global_tempfiles ||= [] + $global_tempfiles << tmp + end +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/lib/puppet_spec/fixtures.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/lib/puppet_spec/fixtures.rb new file mode 100755 index 00000000000..81e9775ff87 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/lib/puppet_spec/fixtures.rb @@ -0,0 +1,29 @@ +#! /usr/bin/env ruby -S rspec +module PuppetSpec::Fixtures + def fixtures(*rest) + File.join(PuppetSpec::FIXTURE_DIR, *rest) + end + def my_fixture_dir + callers = caller + while line = callers.shift do + next unless found = line.match(%r{/spec/(.*)_spec\.rb:}) + return fixtures(found[1]) + end + fail "sorry, I couldn't work out your path from the caller stack!" + end + def my_fixture(name) + file = File.join(my_fixture_dir, name) + unless File.readable? file then + fail Puppet::DevError, "fixture '#{name}' for #{my_fixture_dir} is not readable" + end + return file + end + def my_fixtures(glob = '*', flags = 0) + files = Dir.glob(File.join(my_fixture_dir, glob), flags) + unless files.length > 0 then + fail Puppet::DevError, "fixture '#{glob}' for #{my_fixture_dir} had no files!" + end + block_given? and files.each do |file| yield file end + files + end +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/lib/puppet_spec/matchers.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/lib/puppet_spec/matchers.rb new file mode 100755 index 00000000000..093d77c8122 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/lib/puppet_spec/matchers.rb @@ -0,0 +1,121 @@ +#! /usr/bin/env ruby -S rspec +require 'stringio' + +######################################################################## +# Backward compatibility for Jenkins outdated environment. +module RSpec + module Matchers + module BlockAliases + alias_method :to, :should unless method_defined? :to + alias_method :to_not, :should_not unless method_defined? :to_not + alias_method :not_to, :should_not unless method_defined? :not_to + end + end +end + + +######################################################################## +# Custom matchers... +RSpec::Matchers.define :have_matching_element do |expected| + match do |actual| + actual.any? { |item| item =~ expected } + end +end + + +RSpec::Matchers.define :exit_with do |expected| + actual = nil + match do |block| + begin + block.call + rescue SystemExit => e + actual = e.status + end + actual and actual == expected + end + failure_message_for_should do |block| + "expected exit with code #{expected} but " + + (actual.nil? ? " exit was not called" : "we exited with #{actual} instead") + end + failure_message_for_should_not do |block| + "expected that exit would not be called with #{expected}" + end + description do + "expect exit with #{expected}" + end +end + +class HavePrintedMatcher + attr_accessor :expected, :actual + + def initialize(expected) + case expected + when String, Regexp + @expected = expected + else + @expected = expected.to_s + end + end + + def matches?(block) + begin + $stderr = $stdout = StringIO.new + $stdout.set_encoding('UTF-8') if $stdout.respond_to?(:set_encoding) + block.call + $stdout.rewind + @actual = $stdout.read + ensure + $stdout = STDOUT + $stderr = STDERR + end + + if @actual then + case @expected + when String + @actual.include? @expected + when Regexp + @expected.match @actual + end + else + false + end + end + + def failure_message_for_should + if @actual.nil? then + "expected #{@expected.inspect}, but nothing was printed" + else + "expected #{@expected.inspect} to be printed; got:\n#{@actual}" + end + end + + def failure_message_for_should_not + "expected #{@expected.inspect} to not be printed; got:\n#{@actual}" + end + + def description + "expect #{@expected.inspect} to be printed" + end +end + +def have_printed(what) + HavePrintedMatcher.new(what) +end + +RSpec::Matchers.define :equal_attributes_of do |expected| + match do |actual| + actual.instance_variables.all? do |attr| + actual.instance_variable_get(attr) == expected.instance_variable_get(attr) + end + end +end + +RSpec::Matchers.define :be_one_of do |*expected| + match do |actual| + expected.include? actual + end + + failure_message_for_should do |actual| + "expected #{actual.inspect} to be one of #{expected.map(&:inspect).join(' or ')}" + end +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/lib/puppet_spec/modules.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/lib/puppet_spec/modules.rb new file mode 100755 index 00000000000..910c6d94e43 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/lib/puppet_spec/modules.rb @@ -0,0 +1,27 @@ +#! /usr/bin/env ruby -S rspec +module PuppetSpec::Modules + class << self + def create(name, dir, options = {}) + module_dir = File.join(dir, name) + FileUtils.mkdir_p(module_dir) + + environment = options[:environment] + + if metadata = options[:metadata] + metadata[:source] ||= 'github' + metadata[:author] ||= 'puppetlabs' + metadata[:version] ||= '9.9.9' + metadata[:license] ||= 'to kill' + metadata[:dependencies] ||= [] + + metadata[:name] = "#{metadata[:author]}/#{name}" + + File.open(File.join(module_dir, 'metadata.json'), 'w') do |f| + f.write(metadata.to_pson) + end + end + + Puppet::Module.new(name, module_dir, environment) + end + end +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/lib/puppet_spec/pops.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/lib/puppet_spec/pops.rb new file mode 100755 index 00000000000..e056a52b77d --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/lib/puppet_spec/pops.rb @@ -0,0 +1,17 @@ +#! /usr/bin/env ruby -S rspec +module PuppetSpec::Pops + extend RSpec::Matchers::DSL + + # Checks if an Acceptor has a specific issue in its list of diagnostics + matcher :have_issue do |expected| + match do |actual| + actual.diagnostics.index { |i| i.issue == expected } != nil + end + failure_message_for_should do |actual| + "expected Acceptor[#{actual.diagnostics.collect { |i| i.issue.issue_code }.join(',')}] to contain issue #{expected.issue_code}" + end + failure_message_for_should_not do |actual| + "expected Acceptor[#{actual.diagnostics.collect { |i| i.issue.issue_code }.join(',')}] to not contain issue #{expected.issue_code}" + end + end +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/lib/puppet_spec/scope.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/lib/puppet_spec/scope.rb new file mode 100755 index 00000000000..3847ede1877 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/lib/puppet_spec/scope.rb @@ -0,0 +1,15 @@ +#! /usr/bin/env ruby -S rspec + +module PuppetSpec::Scope + # Initialize a new scope suitable for testing. + # + def create_test_scope_for_node(node_name) + node = Puppet::Node.new(node_name) + compiler = Puppet::Parser::Compiler.new(node) + scope = Puppet::Parser::Scope.new(compiler) + scope.source = Puppet::Resource::Type.new(:node, node_name) + scope.parent = compiler.topscope + scope + end + +end \ No newline at end of file diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/lib/puppet_spec/settings.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/lib/puppet_spec/settings.rb new file mode 100755 index 00000000000..8ddcb975fb4 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/lib/puppet_spec/settings.rb @@ -0,0 +1,16 @@ +#! /usr/bin/env ruby -S rspec +module PuppetSpec::Settings + + # It would probably be preferable to refactor defaults.rb such that the real definitions of + # these settings were available as a variable, which was then accessible for use during tests. + # However, I'm not doing that yet because I don't want to introduce any additional moving parts + # to this already very large changeset. + # Would be nice to clean this up later. --cprice 2012-03-20 + TEST_APP_DEFAULT_DEFINITIONS = { + :name => { :default => "test", :desc => "name" }, + :logdir => { :type => :directory, :default => "test", :desc => "logdir" }, + :confdir => { :type => :directory, :default => "test", :desc => "confdir" }, + :vardir => { :type => :directory, :default => "test", :desc => "vardir" }, + :rundir => { :type => :directory, :default => "test", :desc => "rundir" }, + } +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/lib/puppet_spec/verbose.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/lib/puppet_spec/verbose.rb new file mode 100755 index 00000000000..b2683df0483 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/lib/puppet_spec/verbose.rb @@ -0,0 +1,10 @@ +#! /usr/bin/env ruby -S rspec +# Support code for running stuff with warnings disabled. +module Kernel + def with_verbose_disabled + verbose, $VERBOSE = $VERBOSE, nil + result = yield + $VERBOSE = verbose + return result + end +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/monkey_patches/alias_should_to_must.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/monkey_patches/alias_should_to_must.rb new file mode 100755 index 00000000000..505e240920b --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/monkey_patches/alias_should_to_must.rb @@ -0,0 +1,9 @@ +#! /usr/bin/env ruby -S rspec +require 'rspec' + +class Object + # This is necessary because the RAL has a 'should' + # method. + alias :must :should + alias :must_not :should_not +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/monkey_patches/publicize_methods.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/monkey_patches/publicize_methods.rb new file mode 100755 index 00000000000..3ae59f978b6 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/monkey_patches/publicize_methods.rb @@ -0,0 +1,11 @@ +#! /usr/bin/env ruby -S rspec +# Some monkey-patching to allow us to test private methods. +class Class + def publicize_methods(*methods) + saved_private_instance_methods = methods.empty? ? self.private_instance_methods : methods + + self.class_eval { public(*saved_private_instance_methods) } + yield + self.class_eval { private(*saved_private_instance_methods) } + end +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/spec.opts b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/spec.opts new file mode 100644 index 00000000000..91cd6427ed6 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/spec.opts @@ -0,0 +1,6 @@ +--format +s +--colour +--loadby +mtime +--backtrace diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/spec_helper.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/spec_helper.rb new file mode 100755 index 00000000000..78925fdea3d --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/spec_helper.rb @@ -0,0 +1,39 @@ +#! /usr/bin/env ruby -S rspec +dir = File.expand_path(File.dirname(__FILE__)) +$LOAD_PATH.unshift File.join(dir, 'lib') + +# So everyone else doesn't have to include this base constant. +module PuppetSpec + FIXTURE_DIR = File.join(dir = File.expand_path(File.dirname(__FILE__)), "fixtures") unless defined?(FIXTURE_DIR) +end + +require 'puppet' +require 'rspec-puppet' +require 'simplecov' +require 'puppetlabs_spec_helper/module_spec_helper' +require 'puppet_spec/verbose' +require 'puppet_spec/files' +require 'puppet_spec/settings' +require 'puppet_spec/fixtures' +require 'puppet_spec/matchers' +require 'puppet_spec/database' +require 'monkey_patches/alias_should_to_must' +require 'mocha/setup' + + +SimpleCov.start do + add_filter "/spec/" +end + + +RSpec.configure do |config| + config.before :each do + # Ensure that we don't accidentally cache facts and environment between + # test cases. This requires each example group to explicitly load the + # facts being exercised with something like + # Facter.collection.loader.load(:ipaddress) + Facter::Util::Loader.any_instance.stubs(:load_all) + Facter.clear + Facter.clear_messages + end +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/spec_helper_acceptance.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/spec_helper_acceptance.rb new file mode 100755 index 00000000000..8e56daa6830 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/spec_helper_acceptance.rb @@ -0,0 +1,31 @@ +#! /usr/bin/env ruby -S rspec +require 'beaker-rspec' + +UNSUPPORTED_PLATFORMS = [] + +unless ENV['RS_PROVISION'] == 'no' or ENV['BEAKER_provision'] == 'no' + if hosts.first.is_pe? + install_pe + on hosts, 'mkdir -p /etc/puppetlabs/facter/facts.d' + else + install_puppet + on hosts, 'mkdir -p /etc/facter/facts.d' + on hosts, '/bin/touch /etc/puppet/hiera.yaml' + end + hosts.each do |host| + on host, "mkdir -p #{host['distmoduledir']}" + end +end + +RSpec.configure do |c| + # Project root + proj_root = File.expand_path(File.join(File.dirname(__FILE__), '..')) + + # Readable test descriptions + c.formatter = :documentation + + # Configure all nodes in nodeset + c.before :suite do + puppet_module_install(:source => proj_root, :module_name => 'stdlib') + end +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/unit/facter/coverage/.last_run.json b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/unit/facter/coverage/.last_run.json new file mode 100644 index 00000000000..3cb5e70c964 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/unit/facter/coverage/.last_run.json @@ -0,0 +1,5 @@ +{ + "result": { + "covered_percent": 100.0 + } +} diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/unit/facter/coverage/.resultset.json b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/unit/facter/coverage/.resultset.json new file mode 100644 index 00000000000..bed049341c1 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/unit/facter/coverage/.resultset.json @@ -0,0 +1,7 @@ +{ + "RSpec": { + "coverage": { + }, + "timestamp": 1398200553 + } +} diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/unit/facter/coverage/assets/0.8.0/application.css b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/unit/facter/coverage/assets/0.8.0/application.css new file mode 100644 index 00000000000..d86560434df --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/unit/facter/coverage/assets/0.8.0/application.css @@ -0,0 +1,799 @@ +/* ----------------------------------------------------------------------- + + + Blueprint CSS Framework 0.9 + http://blueprintcss.org + + * Copyright (c) 2007-Present. See LICENSE for more info. + * See README for instructions on how to use Blueprint. + * For credits and origins, see AUTHORS. + * This is a compressed file. See the sources in the 'src' directory. + +----------------------------------------------------------------------- */ + +/* reset.css */ + +html, body, div, span, object, iframe, h1, h2, h3, h4, h5, h6, p, blockquote, pre, a, abbr, acronym, address, code, del, dfn, em, img, q, dl, dt, dd, ol, ul, li, fieldset, form, label, legend, table, caption, tbody, tfoot, thead, tr, th, td, article, aside, dialog, figure, footer, header, hgroup, nav, section {margin:0;padding:0;border:0;font-weight:inherit;font-style:inherit;font-size:100%;font-family:inherit;vertical-align:baseline;} +article, aside, dialog, figure, footer, header, hgroup, nav, section {display:block;} +body {line-height:1.5;} +table {border-collapse:separate;border-spacing:0;} +caption, th, td {text-align:left;font-weight:normal;} +table, td, th {vertical-align:middle;} +blockquote:before, blockquote:after, q:before, q:after {content:"";} +blockquote, q {quotes:"" "";} +a img {border:none;} + +/* typography.css */ +html {font-size:100.01%;} +body {font-size:82%;color:#222;background:#fff;font-family:"Helvetica Neue", Arial, Helvetica, sans-serif;} +h1, h2, h3, h4, h5, h6 {font-weight:normal;color:#111;} +h1 {font-size:3em;line-height:1;margin-bottom:0.5em;} +h2 {font-size:2em;margin-bottom:0.75em;} +h3 {font-size:1.5em;line-height:1;margin-bottom:1em;} +h4 {font-size:1.2em;line-height:1.25;margin-bottom:1.25em;} +h5 {font-size:1em;font-weight:bold;margin-bottom:1.5em;} +h6 {font-size:1em;font-weight:bold;} +h1 img, h2 img, h3 img, h4 img, h5 img, h6 img {margin:0;} +p {margin:0 0 1.5em;} +p img.left {float:left;margin:1.5em 1.5em 1.5em 0;padding:0;} +p img.right {float:right;margin:1.5em 0 1.5em 1.5em;} +a:focus, a:hover {color:#000;} +a {color:#009;text-decoration:underline;} +blockquote {margin:1.5em;color:#666;font-style:italic;} +strong {font-weight:bold;} +em, dfn {font-style:italic;} +dfn {font-weight:bold;} +sup, sub {line-height:0;} +abbr, acronym {border-bottom:1px dotted #666;} +address {margin:0 0 1.5em;font-style:italic;} +del {color:#666;} +pre {margin:1.5em 0;white-space:pre;} +pre, code, tt {font:1em 'andale mono', 'lucida console', monospace;line-height:1.5;} +li ul, li ol {margin:0;} +ul, ol {margin:0 1.5em 1.5em 0;padding-left:3.333em;} +ul {list-style-type:disc;} +ol {list-style-type:decimal;} +dl {margin:0 0 1.5em 0;} +dl dt {font-weight:bold;} +dd {margin-left:1.5em;} +table {margin-bottom:1.4em;width:100%;} +th {font-weight:bold;} +thead th {background:#c3d9ff;} +th, td, caption {padding:4px 10px 4px 5px;} +tr.even td {background:#efefef;} +tfoot {font-style:italic;} +caption {background:#eee;} +.small {font-size:.8em;margin-bottom:1.875em;line-height:1.875em;} +.large {font-size:1.2em;line-height:2.5em;margin-bottom:1.25em;} +.hide {display:none;} +.quiet {color:#666;} +.loud {color:#000;} +.highlight {background:#ff0;} +.added {background:#060;color:#fff;} +.removed {background:#900;color:#fff;} +.first {margin-left:0;padding-left:0;} +.last {margin-right:0;padding-right:0;} +.top {margin-top:0;padding-top:0;} +.bottom {margin-bottom:0;padding-bottom:0;} + +/* forms.css */ +label {font-weight:bold;} +fieldset {padding:1.4em;margin:0 0 1.5em 0;border:1px solid #ccc;} +legend {font-weight:bold;font-size:1.2em;} +input[type=text], input[type=password], input.text, input.title, textarea, select {background-color:#fff;border:1px solid #bbb;} +input[type=text]:focus, input[type=password]:focus, input.text:focus, input.title:focus, textarea:focus, select:focus {border-color:#666;} +input[type=text], input[type=password], input.text, input.title, textarea, select {margin:0.5em 0;} +input.text, input.title {width:300px;padding:5px;} +input.title {font-size:1.5em;} +textarea {width:390px;height:250px;padding:5px;} +input[type=checkbox], input[type=radio], input.checkbox, input.radio {position:relative;top:.25em;} +form.inline {line-height:3;} +form.inline p {margin-bottom:0;} +.error, .notice, .success {padding:.8em;margin-bottom:1em;border:2px solid #ddd;} +.error {background:#FBE3E4;color:#8a1f11;border-color:#FBC2C4;} +.notice {background:#FFF6BF;color:#514721;border-color:#FFD324;} +.success {background:#E6EFC2;color:#264409;border-color:#C6D880;} +.error a {color:#8a1f11;} +.notice a {color:#514721;} +.success a {color:#264409;} +.box {padding:1.5em;margin-bottom:1.5em;background:#E5ECF9;} +hr {background:#ddd;color:#ddd;clear:both;float:none;width:100%;height:.1em;margin:0 0 1.45em;border:none;} +hr.space {background:#fff;color:#fff;visibility:hidden;} +.clearfix:after, .container:after {content:"\0020";display:block;height:0;clear:both;visibility:hidden;overflow:hidden;} +.clearfix, .container {display:block;} +.clear {clear:both;} +/* +github.com style (c) Vasily Polovnyov +*/ + + +pre code { +} + +pre .comment, +pre .template_comment, +pre .diff .header, +pre .javadoc { + color: #998; + font-style: italic +} + +pre .keyword, +pre .css .rule .keyword, +pre .winutils, +pre .javascript .title, +pre .lisp .title { + color: #000; + font-weight: bold +} + +pre .number, +pre .hexcolor { + color: #458 +} + + +pre .string, +pre .tag .value, +pre .phpdoc, +pre .tex .formula { + color: #d14 +} + +pre .subst { + color: #712; +} + +pre .constant, +pre .title, +pre .id { + color: #900; + font-weight: bold +} + +pre .javascript .title, +pre .lisp .title, +pre .subst { + font-weight: normal +} + +pre .class .title, +pre .haskell .label, +pre .tex .command { + color: #458; + font-weight: bold +} + +pre .tag, +pre .tag .title, +pre .rules .property, +pre .django .tag .keyword { + color: #000080; + font-weight: normal +} + +pre .attribute, +pre .variable, +pre .instancevar, +pre .lisp .body { + color: #008080 +} + +pre .regexp { + color: #009926 +} + +pre .class { + color: #458; + font-weight: bold +} + +pre .symbol, +pre .ruby .symbol .string, +pre .ruby .symbol .keyword, +pre .ruby .symbol .keymethods, +pre .lisp .keyword, +pre .tex .special, +pre .input_number { + color: #990073 +} + +pre .builtin, +pre .built_in, +pre .lisp .title { + color: #0086b3 +} + +pre .preprocessor, +pre .pi, +pre .doctype, +pre .shebang, +pre .cdata { + color: #999; + font-weight: bold +} + +pre .deletion { + background: #fdd +} + +pre .addition { + background: #dfd +} + +pre .diff .change { + background: #0086b3 +} + +pre .chunk { + color: #aaa +} + +pre .tex .formula { + opacity: 0.5; +} +/* + * jQuery UI CSS Framework @VERSION + * + * Copyright 2010, AUTHORS.txt (http://jqueryui.com/about) + * Dual licensed under the MIT or GPL Version 2 licenses. + * http://jquery.org/license + * + * http://docs.jquery.com/UI/Theming/API + */ + +/* Layout helpers +----------------------------------*/ + +.ui-helper-hidden { display: none; } +.ui-helper-hidden-accessible { position: absolute; left: -99999999px; } +.ui-helper-reset { margin: 0; padding: 0; border: 0; outline: 0; line-height: 1.3; text-decoration: none; font-size: 100%; list-style: none; } +.ui-helper-clearfix:after { content: "."; display: block; height: 0; clear: both; visibility: hidden; } +.ui-helper-clearfix { display: inline-block; } +/* required comment for clearfix to work in Opera \*/ +* html .ui-helper-clearfix { height:1%; } +.ui-helper-clearfix { display:block; } +/* end clearfix */ +.ui-helper-zfix { width: 100%; height: 100%; top: 0; left: 0; position: absolute; opacity: 0; filter:Alpha(Opacity=0); } + + +/* Interaction Cues +----------------------------------*/ +.ui-state-disabled { cursor: default !important; } + + +/* Icons +----------------------------------*/ + +/* states and images */ +.ui-icon { display: block; text-indent: -99999px; overflow: hidden; background-repeat: no-repeat; } + + +/* Misc visuals +----------------------------------*/ + +/* Overlays */ +.ui-widget-overlay { position: absolute; top: 0; left: 0; width: 100%; height: 100%; } + + +/* + * jQuery UI CSS Framework @VERSION + * + * Copyright 2010, AUTHORS.txt (http://jqueryui.com/about) + * Dual licensed under the MIT or GPL Version 2 licenses. + * http://jquery.org/license + * + * http://docs.jquery.com/UI/Theming/API + * + * To view and modify this theme, visit http://jqueryui.com/themeroller/?ffDefault=Verdana,Arial,sans-serif&fwDefault=normal&fsDefault=1.1em&cornerRadius=4px&bgColorHeader=cccccc&bgTextureHeader=03_highlight_soft.png&bgImgOpacityHeader=75&borderColorHeader=aaaaaa&fcHeader=222222&iconColorHeader=222222&bgColorContent=ffffff&bgTextureContent=01_flat.png&bgImgOpacityContent=75&borderColorContent=aaaaaa&fcContent=222222&iconColorContent=222222&bgColorDefault=e6e6e6&bgTextureDefault=02_glass.png&bgImgOpacityDefault=75&borderColorDefault=d3d3d3&fcDefault=555555&iconColorDefault=888888&bgColorHover=dadada&bgTextureHover=02_glass.png&bgImgOpacityHover=75&borderColorHover=999999&fcHover=212121&iconColorHover=454545&bgColorActive=ffffff&bgTextureActive=02_glass.png&bgImgOpacityActive=65&borderColorActive=aaaaaa&fcActive=212121&iconColorActive=454545&bgColorHighlight=fbf9ee&bgTextureHighlight=02_glass.png&bgImgOpacityHighlight=55&borderColorHighlight=fcefa1&fcHighlight=363636&iconColorHighlight=2e83ff&bgColorError=fef1ec&bgTextureError=02_glass.png&bgImgOpacityError=95&borderColorError=cd0a0a&fcError=cd0a0a&iconColorError=cd0a0a&bgColorOverlay=aaaaaa&bgTextureOverlay=01_flat.png&bgImgOpacityOverlay=0&opacityOverlay=30&bgColorShadow=aaaaaa&bgTextureShadow=01_flat.png&bgImgOpacityShadow=0&opacityShadow=30&thicknessShadow=8px&offsetTopShadow=-8px&offsetLeftShadow=-8px&cornerRadiusShadow=8px + */ + + +/* Component containers +----------------------------------*/ +.ui-widget { font-family: Verdana,Arial,sans-serif; font-size: 1.1em; } +.ui-widget .ui-widget { font-size: 1em; } +.ui-widget input, .ui-widget select, .ui-widget textarea, .ui-widget button { font-family: Verdana,Arial,sans-serif; font-size: 1em; } +.ui-widget-content { border: 1px solid #aaaaaa; background: #ffffff url(images/ui-bg_flat_75_ffffff_40x100.png) 50% 50% repeat-x; color: #222222; } +.ui-widget-content a { color: #222222; } +.ui-widget-header { border: 1px solid #aaaaaa; background: #cccccc url(images/ui-bg_highlight-soft_75_cccccc_1x100.png) 50% 50% repeat-x; color: #222222; font-weight: bold; } +.ui-widget-header a { color: #222222; } + +/* Interaction states +----------------------------------*/ +.ui-state-default, .ui-widget-content .ui-state-default, .ui-widget-header .ui-state-default { border: 1px solid #d3d3d3; background: #e6e6e6 url(images/ui-bg_glass_75_e6e6e6_1x400.png) 50% 50% repeat-x; font-weight: normal; color: #555555; } +.ui-state-default a, .ui-state-default a:link, .ui-state-default a:visited { color: #555555; text-decoration: none; } +.ui-state-hover, .ui-widget-content .ui-state-hover, .ui-widget-header .ui-state-hover, .ui-state-focus, .ui-widget-content .ui-state-focus, .ui-widget-header .ui-state-focus { border: 1px solid #999999; background: #dadada url(images/ui-bg_glass_75_dadada_1x400.png) 50% 50% repeat-x; font-weight: normal; color: #212121; } +.ui-state-hover a, .ui-state-hover a:hover { color: #212121; text-decoration: none; } +.ui-state-active, .ui-widget-content .ui-state-active, .ui-widget-header .ui-state-active { border: 1px solid #aaaaaa; background: #ffffff url(images/ui-bg_glass_65_ffffff_1x400.png) 50% 50% repeat-x; font-weight: normal; color: #212121; } +.ui-state-active a, .ui-state-active a:link, .ui-state-active a:visited { color: #212121; text-decoration: none; } +.ui-widget :active { outline: none; } + +/* Interaction Cues +----------------------------------*/ +.ui-state-highlight, .ui-widget-content .ui-state-highlight, .ui-widget-header .ui-state-highlight {border: 1px solid #fcefa1; background: #fbf9ee url(images/ui-bg_glass_55_fbf9ee_1x400.png) 50% 50% repeat-x; color: #363636; } +.ui-state-highlight a, .ui-widget-content .ui-state-highlight a,.ui-widget-header .ui-state-highlight a { color: #363636; } +.ui-state-error, .ui-widget-content .ui-state-error, .ui-widget-header .ui-state-error {border: 1px solid #cd0a0a; background: #fef1ec url(images/ui-bg_glass_95_fef1ec_1x400.png) 50% 50% repeat-x; color: #cd0a0a; } +.ui-state-error a, .ui-widget-content .ui-state-error a, .ui-widget-header .ui-state-error a { color: #cd0a0a; } +.ui-state-error-text, .ui-widget-content .ui-state-error-text, .ui-widget-header .ui-state-error-text { color: #cd0a0a; } +.ui-priority-primary, .ui-widget-content .ui-priority-primary, .ui-widget-header .ui-priority-primary { font-weight: bold; } +.ui-priority-secondary, .ui-widget-content .ui-priority-secondary, .ui-widget-header .ui-priority-secondary { opacity: .7; filter:Alpha(Opacity=70); font-weight: normal; } +.ui-state-disabled, .ui-widget-content .ui-state-disabled, .ui-widget-header .ui-state-disabled { opacity: .35; filter:Alpha(Opacity=35); background-image: none; } + +/* Icons +----------------------------------*/ + +/* states and images */ +.ui-icon { width: 16px; height: 16px; background-image: url(images/ui-icons_222222_256x240.png); } +.ui-widget-content .ui-icon {background-image: url(images/ui-icons_222222_256x240.png); } +.ui-widget-header .ui-icon {background-image: url(images/ui-icons_222222_256x240.png); } +.ui-state-default .ui-icon { background-image: url(images/ui-icons_888888_256x240.png); } +.ui-state-hover .ui-icon, .ui-state-focus .ui-icon {background-image: url(images/ui-icons_454545_256x240.png); } +.ui-state-active .ui-icon {background-image: url(images/ui-icons_454545_256x240.png); } +.ui-state-highlight .ui-icon {background-image: url(images/ui-icons_2e83ff_256x240.png); } +.ui-state-error .ui-icon, .ui-state-error-text .ui-icon {background-image: url(images/ui-icons_cd0a0a_256x240.png); } + +/* positioning */ +.ui-icon-carat-1-n { background-position: 0 0; } +.ui-icon-carat-1-ne { background-position: -16px 0; } +.ui-icon-carat-1-e { background-position: -32px 0; } +.ui-icon-carat-1-se { background-position: -48px 0; } +.ui-icon-carat-1-s { background-position: -64px 0; } +.ui-icon-carat-1-sw { background-position: -80px 0; } +.ui-icon-carat-1-w { background-position: -96px 0; } +.ui-icon-carat-1-nw { background-position: -112px 0; } +.ui-icon-carat-2-n-s { background-position: -128px 0; } +.ui-icon-carat-2-e-w { background-position: -144px 0; } +.ui-icon-triangle-1-n { background-position: 0 -16px; } +.ui-icon-triangle-1-ne { background-position: -16px -16px; } +.ui-icon-triangle-1-e { background-position: -32px -16px; } +.ui-icon-triangle-1-se { background-position: -48px -16px; } +.ui-icon-triangle-1-s { background-position: -64px -16px; } +.ui-icon-triangle-1-sw { background-position: -80px -16px; } +.ui-icon-triangle-1-w { background-position: -96px -16px; } +.ui-icon-triangle-1-nw { background-position: -112px -16px; } +.ui-icon-triangle-2-n-s { background-position: -128px -16px; } +.ui-icon-triangle-2-e-w { background-position: -144px -16px; } +.ui-icon-arrow-1-n { background-position: 0 -32px; } +.ui-icon-arrow-1-ne { background-position: -16px -32px; } +.ui-icon-arrow-1-e { background-position: -32px -32px; } +.ui-icon-arrow-1-se { background-position: -48px -32px; } +.ui-icon-arrow-1-s { background-position: -64px -32px; } +.ui-icon-arrow-1-sw { background-position: -80px -32px; } +.ui-icon-arrow-1-w { background-position: -96px -32px; } +.ui-icon-arrow-1-nw { background-position: -112px -32px; } +.ui-icon-arrow-2-n-s { background-position: -128px -32px; } +.ui-icon-arrow-2-ne-sw { background-position: -144px -32px; } +.ui-icon-arrow-2-e-w { background-position: -160px -32px; } +.ui-icon-arrow-2-se-nw { background-position: -176px -32px; } +.ui-icon-arrowstop-1-n { background-position: -192px -32px; } +.ui-icon-arrowstop-1-e { background-position: -208px -32px; } +.ui-icon-arrowstop-1-s { background-position: -224px -32px; } +.ui-icon-arrowstop-1-w { background-position: -240px -32px; } +.ui-icon-arrowthick-1-n { background-position: 0 -48px; } +.ui-icon-arrowthick-1-ne { background-position: -16px -48px; } +.ui-icon-arrowthick-1-e { background-position: -32px -48px; } +.ui-icon-arrowthick-1-se { background-position: -48px -48px; } +.ui-icon-arrowthick-1-s { background-position: -64px -48px; } +.ui-icon-arrowthick-1-sw { background-position: -80px -48px; } +.ui-icon-arrowthick-1-w { background-position: -96px -48px; } +.ui-icon-arrowthick-1-nw { background-position: -112px -48px; } +.ui-icon-arrowthick-2-n-s { background-position: -128px -48px; } +.ui-icon-arrowthick-2-ne-sw { background-position: -144px -48px; } +.ui-icon-arrowthick-2-e-w { background-position: -160px -48px; } +.ui-icon-arrowthick-2-se-nw { background-position: -176px -48px; } +.ui-icon-arrowthickstop-1-n { background-position: -192px -48px; } +.ui-icon-arrowthickstop-1-e { background-position: -208px -48px; } +.ui-icon-arrowthickstop-1-s { background-position: -224px -48px; } +.ui-icon-arrowthickstop-1-w { background-position: -240px -48px; } +.ui-icon-arrowreturnthick-1-w { background-position: 0 -64px; } +.ui-icon-arrowreturnthick-1-n { background-position: -16px -64px; } +.ui-icon-arrowreturnthick-1-e { background-position: -32px -64px; } +.ui-icon-arrowreturnthick-1-s { background-position: -48px -64px; } +.ui-icon-arrowreturn-1-w { background-position: -64px -64px; } +.ui-icon-arrowreturn-1-n { background-position: -80px -64px; } +.ui-icon-arrowreturn-1-e { background-position: -96px -64px; } +.ui-icon-arrowreturn-1-s { background-position: -112px -64px; } +.ui-icon-arrowrefresh-1-w { background-position: -128px -64px; } +.ui-icon-arrowrefresh-1-n { background-position: -144px -64px; } +.ui-icon-arrowrefresh-1-e { background-position: -160px -64px; } +.ui-icon-arrowrefresh-1-s { background-position: -176px -64px; } +.ui-icon-arrow-4 { background-position: 0 -80px; } +.ui-icon-arrow-4-diag { background-position: -16px -80px; } +.ui-icon-extlink { background-position: -32px -80px; } +.ui-icon-newwin { background-position: -48px -80px; } +.ui-icon-refresh { background-position: -64px -80px; } +.ui-icon-shuffle { background-position: -80px -80px; } +.ui-icon-transfer-e-w { background-position: -96px -80px; } +.ui-icon-transferthick-e-w { background-position: -112px -80px; } +.ui-icon-folder-collapsed { background-position: 0 -96px; } +.ui-icon-folder-open { background-position: -16px -96px; } +.ui-icon-document { background-position: -32px -96px; } +.ui-icon-document-b { background-position: -48px -96px; } +.ui-icon-note { background-position: -64px -96px; } +.ui-icon-mail-closed { background-position: -80px -96px; } +.ui-icon-mail-open { background-position: -96px -96px; } +.ui-icon-suitcase { background-position: -112px -96px; } +.ui-icon-comment { background-position: -128px -96px; } +.ui-icon-person { background-position: -144px -96px; } +.ui-icon-print { background-position: -160px -96px; } +.ui-icon-trash { background-position: -176px -96px; } +.ui-icon-locked { background-position: -192px -96px; } +.ui-icon-unlocked { background-position: -208px -96px; } +.ui-icon-bookmark { background-position: -224px -96px; } +.ui-icon-tag { background-position: -240px -96px; } +.ui-icon-home { background-position: 0 -112px; } +.ui-icon-flag { background-position: -16px -112px; } +.ui-icon-calendar { background-position: -32px -112px; } +.ui-icon-cart { background-position: -48px -112px; } +.ui-icon-pencil { background-position: -64px -112px; } +.ui-icon-clock { background-position: -80px -112px; } +.ui-icon-disk { background-position: -96px -112px; } +.ui-icon-calculator { background-position: -112px -112px; } +.ui-icon-zoomin { background-position: -128px -112px; } +.ui-icon-zoomout { background-position: -144px -112px; } +.ui-icon-search { background-position: -160px -112px; } +.ui-icon-wrench { background-position: -176px -112px; } +.ui-icon-gear { background-position: -192px -112px; } +.ui-icon-heart { background-position: -208px -112px; } +.ui-icon-star { background-position: -224px -112px; } +.ui-icon-link { background-position: -240px -112px; } +.ui-icon-cancel { background-position: 0 -128px; } +.ui-icon-plus { background-position: -16px -128px; } +.ui-icon-plusthick { background-position: -32px -128px; } +.ui-icon-minus { background-position: -48px -128px; } +.ui-icon-minusthick { background-position: -64px -128px; } +.ui-icon-close { background-position: -80px -128px; } +.ui-icon-closethick { background-position: -96px -128px; } +.ui-icon-key { background-position: -112px -128px; } +.ui-icon-lightbulb { background-position: -128px -128px; } +.ui-icon-scissors { background-position: -144px -128px; } +.ui-icon-clipboard { background-position: -160px -128px; } +.ui-icon-copy { background-position: -176px -128px; } +.ui-icon-contact { background-position: -192px -128px; } +.ui-icon-image { background-position: -208px -128px; } +.ui-icon-video { background-position: -224px -128px; } +.ui-icon-script { background-position: -240px -128px; } +.ui-icon-alert { background-position: 0 -144px; } +.ui-icon-info { background-position: -16px -144px; } +.ui-icon-notice { background-position: -32px -144px; } +.ui-icon-help { background-position: -48px -144px; } +.ui-icon-check { background-position: -64px -144px; } +.ui-icon-bullet { background-position: -80px -144px; } +.ui-icon-radio-off { background-position: -96px -144px; } +.ui-icon-radio-on { background-position: -112px -144px; } +.ui-icon-pin-w { background-position: -128px -144px; } +.ui-icon-pin-s { background-position: -144px -144px; } +.ui-icon-play { background-position: 0 -160px; } +.ui-icon-pause { background-position: -16px -160px; } +.ui-icon-seek-next { background-position: -32px -160px; } +.ui-icon-seek-prev { background-position: -48px -160px; } +.ui-icon-seek-end { background-position: -64px -160px; } +.ui-icon-seek-start { background-position: -80px -160px; } +/* ui-icon-seek-first is deprecated, use ui-icon-seek-start instead */ +.ui-icon-seek-first { background-position: -80px -160px; } +.ui-icon-stop { background-position: -96px -160px; } +.ui-icon-eject { background-position: -112px -160px; } +.ui-icon-volume-off { background-position: -128px -160px; } +.ui-icon-volume-on { background-position: -144px -160px; } +.ui-icon-power { background-position: 0 -176px; } +.ui-icon-signal-diag { background-position: -16px -176px; } +.ui-icon-signal { background-position: -32px -176px; } +.ui-icon-battery-0 { background-position: -48px -176px; } +.ui-icon-battery-1 { background-position: -64px -176px; } +.ui-icon-battery-2 { background-position: -80px -176px; } +.ui-icon-battery-3 { background-position: -96px -176px; } +.ui-icon-circle-plus { background-position: 0 -192px; } +.ui-icon-circle-minus { background-position: -16px -192px; } +.ui-icon-circle-close { background-position: -32px -192px; } +.ui-icon-circle-triangle-e { background-position: -48px -192px; } +.ui-icon-circle-triangle-s { background-position: -64px -192px; } +.ui-icon-circle-triangle-w { background-position: -80px -192px; } +.ui-icon-circle-triangle-n { background-position: -96px -192px; } +.ui-icon-circle-arrow-e { background-position: -112px -192px; } +.ui-icon-circle-arrow-s { background-position: -128px -192px; } +.ui-icon-circle-arrow-w { background-position: -144px -192px; } +.ui-icon-circle-arrow-n { background-position: -160px -192px; } +.ui-icon-circle-zoomin { background-position: -176px -192px; } +.ui-icon-circle-zoomout { background-position: -192px -192px; } +.ui-icon-circle-check { background-position: -208px -192px; } +.ui-icon-circlesmall-plus { background-position: 0 -208px; } +.ui-icon-circlesmall-minus { background-position: -16px -208px; } +.ui-icon-circlesmall-close { background-position: -32px -208px; } +.ui-icon-squaresmall-plus { background-position: -48px -208px; } +.ui-icon-squaresmall-minus { background-position: -64px -208px; } +.ui-icon-squaresmall-close { background-position: -80px -208px; } +.ui-icon-grip-dotted-vertical { background-position: 0 -224px; } +.ui-icon-grip-dotted-horizontal { background-position: -16px -224px; } +.ui-icon-grip-solid-vertical { background-position: -32px -224px; } +.ui-icon-grip-solid-horizontal { background-position: -48px -224px; } +.ui-icon-gripsmall-diagonal-se { background-position: -64px -224px; } +.ui-icon-grip-diagonal-se { background-position: -80px -224px; } + + +/* Misc visuals +----------------------------------*/ + +/* Corner radius */ +.ui-corner-tl { -moz-border-radius-topleft: 4px; -webkit-border-top-left-radius: 4px; border-top-left-radius: 4px; } +.ui-corner-tr { -moz-border-radius-topright: 4px; -webkit-border-top-right-radius: 4px; border-top-right-radius: 4px; } +.ui-corner-bl { -moz-border-radius-bottomleft: 4px; -webkit-border-bottom-left-radius: 4px; border-bottom-left-radius: 4px; } +.ui-corner-br { -moz-border-radius-bottomright: 4px; -webkit-border-bottom-right-radius: 4px; border-bottom-right-radius: 4px; } +.ui-corner-top { -moz-border-radius-topleft: 4px; -webkit-border-top-left-radius: 4px; border-top-left-radius: 4px; -moz-border-radius-topright: 4px; -webkit-border-top-right-radius: 4px; border-top-right-radius: 4px; } +.ui-corner-bottom { -moz-border-radius-bottomleft: 4px; -webkit-border-bottom-left-radius: 4px; border-bottom-left-radius: 4px; -moz-border-radius-bottomright: 4px; -webkit-border-bottom-right-radius: 4px; border-bottom-right-radius: 4px; } +.ui-corner-right { -moz-border-radius-topright: 4px; -webkit-border-top-right-radius: 4px; border-top-right-radius: 4px; -moz-border-radius-bottomright: 4px; -webkit-border-bottom-right-radius: 4px; border-bottom-right-radius: 4px; } +.ui-corner-left { -moz-border-radius-topleft: 4px; -webkit-border-top-left-radius: 4px; border-top-left-radius: 4px; -moz-border-radius-bottomleft: 4px; -webkit-border-bottom-left-radius: 4px; border-bottom-left-radius: 4px; } +.ui-corner-all { -moz-border-radius: 4px; -webkit-border-radius: 4px; border-radius: 4px; } + +/* Overlays */ +.ui-widget-overlay { background: #aaaaaa url(images/ui-bg_flat_0_aaaaaa_40x100.png) 50% 50% repeat-x; opacity: .30;filter:Alpha(Opacity=30); } +.ui-widget-shadow { margin: -8px 0 0 -8px; padding: 8px; background: #aaaaaa url(images/ui-bg_flat_0_aaaaaa_40x100.png) 50% 50% repeat-x; opacity: .30;filter:Alpha(Opacity=30); -moz-border-radius: 8px; -webkit-border-radius: 8px; border-radius: 8px; } +/* + ColorBox Core Style: + The following CSS is consistent between example themes and should not be altered. +*/ +#colorbox, #cboxOverlay, #cboxWrapper{position:absolute; top:0; left:0; z-index:9999; overflow:hidden;} +#cboxOverlay{position:fixed; width:100%; height:100%;} +#cboxMiddleLeft, #cboxBottomLeft{clear:left;} +#cboxContent{position:relative;} +#cboxLoadedContent{overflow:auto;} +#cboxTitle{margin:0;} +#cboxLoadingOverlay, #cboxLoadingGraphic{position:absolute; top:0; left:0; width:100%; height:100%;} +#cboxPrevious, #cboxNext, #cboxClose, #cboxSlideshow{cursor:pointer;} +.cboxPhoto{float:left; margin:auto; border:0; display:block; max-width:none;} +.cboxIframe{width:100%; height:100%; display:block; border:0;} +#colorbox, #cboxContent, #cboxLoadedContent{box-sizing:content-box;} + +/* + User Style: + Change the following styles to modify the appearance of ColorBox. They are + ordered & tabbed in a way that represents the nesting of the generated HTML. +*/ +#cboxOverlay{background:#000;} +#colorbox{} + #cboxTopLeft{width:14px; height:14px; background:url(colorbox/controls.png) no-repeat 0 0;} + #cboxTopCenter{height:14px; background:url(colorbox/border.png) repeat-x top left;} + #cboxTopRight{width:14px; height:14px; background:url(colorbox/controls.png) no-repeat -36px 0;} + #cboxBottomLeft{width:14px; height:43px; background:url(colorbox/controls.png) no-repeat 0 -32px;} + #cboxBottomCenter{height:43px; background:url(colorbox/border.png) repeat-x bottom left;} + #cboxBottomRight{width:14px; height:43px; background:url(colorbox/controls.png) no-repeat -36px -32px;} + #cboxMiddleLeft{width:14px; background:url(colorbox/controls.png) repeat-y -175px 0;} + #cboxMiddleRight{width:14px; background:url(colorbox/controls.png) repeat-y -211px 0;} + #cboxContent{background:#fff; overflow:visible;} + .cboxIframe{background:#fff;} + #cboxError{padding:50px; border:1px solid #ccc;} + #cboxLoadedContent{margin-bottom:5px;} + #cboxLoadingOverlay{background:url(colorbox/loading_background.png) no-repeat center center;} + #cboxLoadingGraphic{background:url(colorbox/loading.gif) no-repeat center center;} + #cboxTitle{position:absolute; bottom:-25px; left:0; text-align:center; width:100%; font-weight:bold; color:#7C7C7C;} + #cboxCurrent{position:absolute; bottom:-25px; left:58px; font-weight:bold; color:#7C7C7C;} + + #cboxPrevious, #cboxNext, #cboxClose, #cboxSlideshow{position:absolute; bottom:-29px; background:url(colorbox/controls.png) no-repeat 0px 0px; width:23px; height:23px; text-indent:-9999px;} + #cboxPrevious{left:0px; background-position: -51px -25px;} + #cboxPrevious:hover{background-position:-51px 0px;} + #cboxNext{left:27px; background-position:-75px -25px;} + #cboxNext:hover{background-position:-75px 0px;} + #cboxClose{right:0; background-position:-100px -25px;} + #cboxClose:hover{background-position:-100px 0px;} + + .cboxSlideshow_on #cboxSlideshow{background-position:-125px 0px; right:27px;} + .cboxSlideshow_on #cboxSlideshow:hover{background-position:-150px 0px;} + .cboxSlideshow_off #cboxSlideshow{background-position:-150px -25px; right:27px;} + .cboxSlideshow_off #cboxSlideshow:hover{background-position:-125px 0px;} +#loading { + position: fixed; + left: 40%; + top: 50%; } + +a { + color: #333333; + text-decoration: none; } + a:hover { + color: black; + text-decoration: underline; } + +body { + font-family: "Lucida Grande", Helvetica, "Helvetica Neue", Arial, sans-serif; + padding: 12px; + background-color: #333333; } + +h1, h2, h3, h4 { + color: #1c2324; + margin: 0; + padding: 0; + margin-bottom: 12px; } + +table { + width: 100%; } + +#content { + clear: left; + background-color: white; + border: 2px solid #dddddd; + border-top: 8px solid #dddddd; + padding: 18px; + -webkit-border-bottom-left-radius: 5px; + -webkit-border-bottom-right-radius: 5px; + -webkit-border-top-right-radius: 5px; + -moz-border-radius-bottomleft: 5px; + -moz-border-radius-bottomright: 5px; + -moz-border-radius-topright: 5px; + border-bottom-left-radius: 5px; + border-bottom-right-radius: 5px; + border-top-right-radius: 5px; } + +.dataTables_filter, .dataTables_info { + padding: 2px 6px; } + +abbr.timeago { + text-decoration: none; + border: none; + font-weight: bold; } + +.timestamp { + float: right; + color: #dddddd; } + +.group_tabs { + list-style: none; + float: left; + margin: 0; + padding: 0; } + .group_tabs li { + display: inline; + float: left; } + .group_tabs li a { + font-family: Helvetica, Arial, sans-serif; + display: block; + float: left; + text-decoration: none; + padding: 4px 8px; + background-color: #aaaaaa; + background: -webkit-gradient(linear, 0 0, 0 bottom, from(#dddddd), to(#aaaaaa)); + background: -moz-linear-gradient(#dddddd, #aaaaaa); + background: linear-gradient(#dddddd, #aaaaaa); + text-shadow: #e5e5e5 1px 1px 0px; + border-bottom: none; + color: #333333; + font-weight: bold; + margin-right: 8px; + border-top: 1px solid #efefef; + -webkit-border-top-left-radius: 2px; + -webkit-border-top-right-radius: 2px; + -moz-border-radius-topleft: 2px; + -moz-border-radius-topright: 2px; + border-top-left-radius: 2px; + border-top-right-radius: 2px; } + .group_tabs li a:hover { + background-color: #cccccc; + background: -webkit-gradient(linear, 0 0, 0 bottom, from(#eeeeee), to(#aaaaaa)); + background: -moz-linear-gradient(#eeeeee, #aaaaaa); + background: linear-gradient(#eeeeee, #aaaaaa); } + .group_tabs li a:active { + padding-top: 5px; + padding-bottom: 3px; } + .group_tabs li.active a { + color: black; + text-shadow: white 1px 1px 0px; + background-color: #dddddd; + background: -webkit-gradient(linear, 0 0, 0 bottom, from(white), to(#dddddd)); + background: -moz-linear-gradient(white, #dddddd); + background: linear-gradient(white, #dddddd); } + +.file_list { + margin-bottom: 18px; } + +a.src_link { + background: url("./magnify.png") no-repeat left 50%; + padding-left: 18px; } + +tr, td { + margin: 0; + padding: 0; } + +th { + white-space: nowrap; } + th.ui-state-default { + cursor: pointer; } + th span.ui-icon { + float: left; } + +td { + padding: 4px 8px; } + td.strong { + font-weight: bold; } + +.source_table h3, .source_table h4 { + padding: 0; + margin: 0; + margin-bottom: 4px; } +.source_table .header { + padding: 10px; } +.source_table pre { + margin: 0; + padding: 0; + white-space: normal; + color: black; + font-family: "Monaco", "Inconsolata", "Consolas", monospace; } +.source_table code { + color: black; + font-family: "Monaco", "Inconsolata", "Consolas", monospace; } +.source_table pre { + background-color: #333333; } + .source_table pre ol { + margin: 0px; + padding: 0px; + margin-left: 45px; + font-size: 12px; + color: white; } + .source_table pre li { + margin: 0px; + padding: 2px 6px; + border-left: 5px solid white; } + .source_table pre li code { + white-space: pre; + white-space: pre-wrap; } + .source_table pre .hits { + float: right; + margin-left: 10px; + padding: 2px 4px; + background-color: #444444; + background: -webkit-gradient(linear, 0 0, 0 bottom, from(#222222), to(#666666)); + background: -moz-linear-gradient(#222222, #666666); + background: linear-gradient(#222222, #666666); + color: white; + font-family: Helvetica, "Helvetica Neue", Arial, sans-serif; + font-size: 10px; + font-weight: bold; + text-align: center; + border-radius: 6px; } + +#footer { + color: #dddddd; + font-size: 12px; + font-weight: bold; + margin-top: 12px; + text-align: right; } + #footer a { + color: #eeeeee; + text-decoration: underline; } + #footer a:hover { + color: white; + text-decoration: none; } + +.green { + color: #009900; } + +.red { + color: #990000; } + +.yellow { + color: #ddaa00; } + +.source_table .covered { + border-color: #009900; } +.source_table .missed { + border-color: #990000; } +.source_table .never { + border-color: black; } +.source_table .skipped { + border-color: #ffcc00; } +.source_table .covered:nth-child(odd) { + background-color: #cdf2cd; } +.source_table .covered:nth-child(even) { + background-color: #dbf2db; } +.source_table .missed:nth-child(odd) { + background-color: #f7c0c0; } +.source_table .missed:nth-child(even) { + background-color: #f7cfcf; } +.source_table .never:nth-child(odd) { + background-color: #efefef; } +.source_table .never:nth-child(even) { + background-color: #f4f4f4; } +.source_table .skipped:nth-child(odd) { + background-color: #fbf0c0; } +.source_table .skipped:nth-child(even) { + background-color: #fbffcf; } + + + diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/unit/facter/coverage/assets/0.8.0/application.js b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/unit/facter/coverage/assets/0.8.0/application.js new file mode 100644 index 00000000000..5e06df5f31d --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/unit/facter/coverage/assets/0.8.0/application.js @@ -0,0 +1,1559 @@ +/*! + * jQuery JavaScript Library v1.6.2 + * http://jquery.com/ + * + * Copyright 2011, John Resig + * Dual licensed under the MIT or GPL Version 2 licenses. + * http://jquery.org/license + * + * Includes Sizzle.js + * http://sizzlejs.com/ + * Copyright 2011, The Dojo Foundation + * Released under the MIT, BSD, and GPL Licenses. + * + * Date: Thu Jun 30 14:16:56 2011 -0400 + */ + +(function(a,b){function cv(a){return f.isWindow(a)?a:a.nodeType===9?a.defaultView||a.parentWindow:!1}function cs(a){if(!cg[a]){var b=c.body,d=f("<"+a+">").appendTo(b),e=d.css("display");d.remove();if(e==="none"||e===""){ch||(ch=c.createElement("iframe"),ch.frameBorder=ch.width=ch.height=0),b.appendChild(ch);if(!ci||!ch.createElement)ci=(ch.contentWindow||ch.contentDocument).document,ci.write((c.compatMode==="CSS1Compat"?"":"")+""),ci.close();d=ci.createElement(a),ci.body.appendChild(d),e=f.css(d,"display"),b.removeChild(ch)}cg[a]=e}return cg[a]}function cr(a,b){var c={};f.each(cm.concat.apply([],cm.slice(0,b)),function(){c[this]=a});return c}function cq(){cn=b}function cp(){setTimeout(cq,0);return cn=f.now()}function cf(){try{return new a.ActiveXObject("Microsoft.XMLHTTP")}catch(b){}}function ce(){try{return new a.XMLHttpRequest}catch(b){}}function b$(a,c){a.dataFilter&&(c=a.dataFilter(c,a.dataType));var d=a.dataTypes,e={},g,h,i=d.length,j,k=d[0],l,m,n,o,p;for(g=1;g0){c!=="border"&&f.each(e,function(){c||(d-=parseFloat(f.css(a,"padding"+this))||0),c==="margin"?d+=parseFloat(f.css(a,c+this))||0:d-=parseFloat(f.css(a,"border"+this+"Width"))||0});return d+"px"}d=bx(a,b,b);if(d<0||d==null)d=a.style[b]||0;d=parseFloat(d)||0,c&&f.each(e,function(){d+=parseFloat(f.css(a,"padding"+this))||0,c!=="padding"&&(d+=parseFloat(f.css(a,"border"+this+"Width"))||0),c==="margin"&&(d+=parseFloat(f.css(a,c+this))||0)});return d+"px"}function bm(a,b){b.src?f.ajax({url:b.src,async:!1,dataType:"script"}):f.globalEval((b.text||b.textContent||b.innerHTML||"").replace(be,"/*$0*/")),b.parentNode&&b.parentNode.removeChild(b)}function bl(a){f.nodeName(a,"input")?bk(a):"getElementsByTagName"in a&&f.grep(a.getElementsByTagName("input"),bk)}function bk(a){if(a.type==="checkbox"||a.type==="radio")a.defaultChecked=a.checked}function bj(a){return"getElementsByTagName"in a?a.getElementsByTagName("*"):"querySelectorAll"in a?a.querySelectorAll("*"):[]}function bi(a,b){var c;if(b.nodeType===1){b.clearAttributes&&b.clearAttributes(),b.mergeAttributes&&b.mergeAttributes(a),c=b.nodeName.toLowerCase();if(c==="object")b.outerHTML=a.outerHTML;else if(c!=="input"||a.type!=="checkbox"&&a.type!=="radio"){if(c==="option")b.selected=a.defaultSelected;else if(c==="input"||c==="textarea")b.defaultValue=a.defaultValue}else a.checked&&(b.defaultChecked=b.checked=a.checked),b.value!==a.value&&(b.value=a.value);b.removeAttribute(f.expando)}}function bh(a,b){if(b.nodeType===1&&!!f.hasData(a)){var c=f.expando,d=f.data(a),e=f.data(b,d);if(d=d[c]){var g=d.events;e=e[c]=f.extend({},d);if(g){delete e.handle,e.events={};for(var h in g)for(var i=0,j=g[h].length;i=0===c})}function V(a){return!a||!a.parentNode||a.parentNode.nodeType===11}function N(a,b){return(a&&a!=="*"?a+".":"")+b.replace(z,"`").replace(A,"&")}function M(a){var b,c,d,e,g,h,i,j,k,l,m,n,o,p=[],q=[],r=f._data(this,"events");if(!(a.liveFired===this||!r||!r.live||a.target.disabled||a.button&&a.type==="click")){a.namespace&&(n=new RegExp("(^|\\.)"+a.namespace.split(".").join("\\.(?:.*\\.)?")+"(\\.|$)")),a.liveFired=this;var s=r.live.slice(0);for(i=0;ic)break;a.currentTarget=e.elem,a.data=e.handleObj.data,a.handleObj=e.handleObj,o=e.handleObj.origHandler.apply(e.elem,arguments);if(o===!1||a.isPropagationStopped()){c=e.level,o===!1&&(b=!1);if(a.isImmediatePropagationStopped())break}}return b}}function K(a,c,d){var e=f.extend({},d[0]);e.type=a,e.originalEvent={},e.liveFired=b,f.event.handle.call(c,e),e.isDefaultPrevented()&&d[0].preventDefault()}function E(){return!0}function D(){return!1}function m(a,c,d){var e=c+"defer",g=c+"queue",h=c+"mark",i=f.data(a,e,b,!0);i&&(d==="queue"||!f.data(a,g,b,!0))&&(d==="mark"||!f.data(a,h,b,!0))&&setTimeout(function(){!f.data(a,g,b,!0)&&!f.data(a,h,b,!0)&&(f.removeData(a,e,!0),i.resolve())},0)}function l(a){for(var b in a)if(b!=="toJSON")return!1;return!0}function k(a,c,d){if(d===b&&a.nodeType===1){var e="data-"+c.replace(j,"$1-$2").toLowerCase();d=a.getAttribute(e);if(typeof d=="string"){try{d=d==="true"?!0:d==="false"?!1:d==="null"?null:f.isNaN(d)?i.test(d)?f.parseJSON(d):d:parseFloat(d)}catch(g){}f.data(a,c,d)}else d=b}return d}var c=a.document,d=a.navigator,e=a.location,f=function(){function J(){if(!e.isReady){try{c.documentElement.doScroll("left")}catch(a){setTimeout(J,1);return}e.ready()}}var e=function(a,b){return new e.fn.init(a,b,h)},f=a.jQuery,g=a.$,h,i=/^(?:[^<]*(<[\w\W]+>)[^>]*$|#([\w\-]*)$)/,j=/\S/,k=/^\s+/,l=/\s+$/,m=/\d/,n=/^<(\w+)\s*\/?>(?:<\/\1>)?$/,o=/^[\],:{}\s]*$/,p=/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,q=/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,r=/(?:^|:|,)(?:\s*\[)+/g,s=/(webkit)[ \/]([\w.]+)/,t=/(opera)(?:.*version)?[ \/]([\w.]+)/,u=/(msie) ([\w.]+)/,v=/(mozilla)(?:.*? rv:([\w.]+))?/,w=/-([a-z])/ig,x=function(a,b){return b.toUpperCase()},y=d.userAgent,z,A,B,C=Object.prototype.toString,D=Object.prototype.hasOwnProperty,E=Array.prototype.push,F=Array.prototype.slice,G=String.prototype.trim,H=Array.prototype.indexOf,I={};e.fn=e.prototype={constructor:e,init:function(a,d,f){var g,h,j,k;if(!a)return this;if(a.nodeType){this.context=this[0]=a,this.length=1;return this}if(a==="body"&&!d&&c.body){this.context=c,this[0]=c.body,this.selector=a,this.length=1;return this}if(typeof a=="string"){a.charAt(0)!=="<"||a.charAt(a.length-1)!==">"||a.length<3?g=i.exec(a):g=[null,a,null];if(g&&(g[1]||!d)){if(g[1]){d=d instanceof e?d[0]:d,k=d?d.ownerDocument||d:c,j=n.exec(a),j?e.isPlainObject(d)?(a=[c.createElement(j[1])],e.fn.attr.call(a,d,!0)):a=[k.createElement(j[1])]:(j=e.buildFragment([g[1]],[k]),a=(j.cacheable?e.clone(j.fragment):j.fragment).childNodes);return e.merge(this,a)}h=c.getElementById(g[2]);if(h&&h.parentNode){if(h.id!==g[2])return f.find(a);this.length=1,this[0]=h}this.context=c,this.selector=a;return this}return!d||d.jquery?(d||f).find(a):this.constructor(d).find(a)}if(e.isFunction(a))return f.ready(a);a.selector!==b&&(this.selector=a.selector,this.context=a.context);return e.makeArray(a,this)},selector:"",jquery:"1.6.2",length:0,size:function(){return this.length},toArray:function(){return F.call(this,0)},get:function(a){return a==null?this.toArray():a<0?this[this.length+a]:this[a]},pushStack:function(a,b,c){var d=this.constructor();e.isArray(a)?E.apply(d,a):e.merge(d,a),d.prevObject=this,d.context=this.context,b==="find"?d.selector=this.selector+(this.selector?" ":"")+c:b&&(d.selector=this.selector+"."+b+"("+c+")");return d},each:function(a,b){return e.each(this,a,b)},ready:function(a){e.bindReady(),A.done(a);return this},eq:function(a){return a===-1?this.slice(a):this.slice(a,+a+1)},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},slice:function(){return this.pushStack(F.apply(this,arguments),"slice",F.call(arguments).join(","))},map:function(a){return this.pushStack(e.map(this,function(b,c){return a.call(b,c,b)}))},end:function(){return this.prevObject||this.constructor(null)},push:E,sort:[].sort,splice:[].splice},e.fn.init.prototype=e.fn,e.extend=e.fn.extend=function(){var a,c,d,f,g,h,i=arguments[0]||{},j=1,k=arguments.length,l=!1;typeof i=="boolean"&&(l=i,i=arguments[1]||{},j=2),typeof i!="object"&&!e.isFunction(i)&&(i={}),k===j&&(i=this,--j);for(;j0)return;A.resolveWith(c,[e]),e.fn.trigger&&e(c).trigger("ready").unbind("ready")}},bindReady:function(){if(!A){A=e._Deferred();if(c.readyState==="complete")return setTimeout(e.ready,1);if(c.addEventListener)c.addEventListener("DOMContentLoaded",B,!1),a.addEventListener("load",e.ready,!1);else if(c.attachEvent){c.attachEvent("onreadystatechange",B),a.attachEvent("onload",e.ready);var b=!1;try{b=a.frameElement==null}catch(d){}c.documentElement.doScroll&&b&&J()}}},isFunction:function(a){return e.type(a)==="function"},isArray:Array.isArray||function(a){return e.type(a)==="array"},isWindow:function(a){return a&&typeof a=="object"&&"setInterval"in a},isNaN:function(a){return a==null||!m.test(a)||isNaN(a)},type:function(a){return a==null?String(a):I[C.call(a)]||"object"},isPlainObject:function(a){if(!a||e.type(a)!=="object"||a.nodeType||e.isWindow(a))return!1;if(a.constructor&&!D.call(a,"constructor")&&!D.call(a.constructor.prototype,"isPrototypeOf"))return!1;var c;for(c in a);return c===b||D.call(a,c)},isEmptyObject:function(a){for(var b in a)return!1;return!0},error:function(a){throw a},parseJSON:function(b){if(typeof b!="string"||!b)return null;b=e.trim(b);if(a.JSON&&a.JSON.parse)return a.JSON.parse(b);if(o.test(b.replace(p,"@").replace(q,"]").replace(r,"")))return(new Function("return "+b))();e.error("Invalid JSON: "+b)},parseXML:function(b,c,d){a.DOMParser?(d=new DOMParser,c=d.parseFromString(b,"text/xml")):(c=new ActiveXObject("Microsoft.XMLDOM"),c.async="false",c.loadXML(b)),d=c.documentElement,(!d||!d.nodeName||d.nodeName==="parsererror")&&e.error("Invalid XML: "+b);return c},noop:function(){},globalEval:function(b){b&&j.test(b)&&(a.execScript||function(b){a.eval.call(a,b)})(b)},camelCase:function(a){return a.replace(w,x)},nodeName:function(a,b){return a.nodeName&&a.nodeName.toUpperCase()===b.toUpperCase()},each:function(a,c,d){var f,g=0,h=a.length,i=h===b||e.isFunction(a);if(d){if(i){for(f in a)if(c.apply(a[f],d)===!1)break}else for(;g0&&a[0]&&a[j-1]||j===0||e.isArray(a));if(k)for(;i1?h.call(arguments,0):c,--e||g.resolveWith(g,h.call(b,0))}}var b=arguments,c=0,d=b.length,e=d,g=d<=1&&a&&f.isFunction(a.promise)?a:f.Deferred();if(d>1){for(;c
a",d=a.getElementsByTagName("*"),e=a.getElementsByTagName("a")[0];if(!d||!d.length||!e)return{};g=c.createElement("select"),h=g.appendChild(c.createElement("option")),i=a.getElementsByTagName("input")[0],k={leadingWhitespace:a.firstChild.nodeType===3,tbody:!a.getElementsByTagName("tbody").length,htmlSerialize:!!a.getElementsByTagName("link").length,style:/top/.test(e.getAttribute("style")),hrefNormalized:e.getAttribute("href")==="/a",opacity:/^0.55$/.test(e.style.opacity),cssFloat:!!e.style.cssFloat,checkOn:i.value==="on",optSelected:h.selected,getSetAttribute:a.className!=="t",submitBubbles:!0,changeBubbles:!0,focusinBubbles:!1,deleteExpando:!0,noCloneEvent:!0,inlineBlockNeedsLayout:!1,shrinkWrapBlocks:!1,reliableMarginRight:!0},i.checked=!0,k.noCloneChecked=i.cloneNode(!0).checked,g.disabled=!0,k.optDisabled=!h.disabled;try{delete a.test}catch(v){k.deleteExpando=!1}!a.addEventListener&&a.attachEvent&&a.fireEvent&&(a.attachEvent("onclick",function(){k.noCloneEvent=!1}),a.cloneNode(!0).fireEvent("onclick")),i=c.createElement("input"),i.value="t",i.setAttribute("type","radio"),k.radioValue=i.value==="t",i.setAttribute("checked","checked"),a.appendChild(i),l=c.createDocumentFragment(),l.appendChild(a.firstChild),k.checkClone=l.cloneNode(!0).cloneNode(!0).lastChild.checked,a.innerHTML="",a.style.width=a.style.paddingLeft="1px",m=c.getElementsByTagName("body")[0],o=c.createElement(m?"div":"body"),p={visibility:"hidden",width:0,height:0,border:0,margin:0},m&&f.extend(p,{position:"absolute",left:-1e3,top:-1e3});for(t in p)o.style[t]=p[t];o.appendChild(a),n=m||b,n.insertBefore(o,n.firstChild),k.appendChecked=i.checked,k.boxModel=a.offsetWidth===2,"zoom"in a.style&&(a.style.display="inline",a.style.zoom=1,k.inlineBlockNeedsLayout=a.offsetWidth===2,a.style.display="",a.innerHTML="
",k.shrinkWrapBlocks=a.offsetWidth!==2),a.innerHTML="
t
",q=a.getElementsByTagName("td"),u=q[0].offsetHeight===0,q[0].style.display="",q[1].style.display="none",k.reliableHiddenOffsets=u&&q[0].offsetHeight===0,a.innerHTML="",c.defaultView&&c.defaultView.getComputedStyle&&(j=c.createElement("div"),j.style.width="0",j.style.marginRight="0",a.appendChild(j),k.reliableMarginRight=(parseInt((c.defaultView.getComputedStyle(j,null)||{marginRight:0}).marginRight,10)||0)===0),o.innerHTML="",n.removeChild(o);if(a.attachEvent)for(t in{submit:1,change:1,focusin:1})s="on"+t,u=s in a,u||(a.setAttribute(s,"return;"),u=typeof a[s]=="function"),k[t+"Bubbles"]=u;o=l=g=h=m=j=a=i=null;return k}(),f.boxModel=f.support.boxModel;var i=/^(?:\{.*\}|\[.*\])$/,j=/([a-z])([A-Z])/g;f.extend({cache:{},uuid:0,expando:"jQuery"+(f.fn.jquery+Math.random()).replace(/\D/g,""),noData:{embed:!0,object:"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000",applet:!0},hasData:function(a){a=a.nodeType?f.cache[a[f.expando]]:a[f.expando];return!!a&&!l(a)},data:function(a,c,d,e){if(!!f.acceptData(a)){var g=f.expando,h=typeof c=="string",i,j=a.nodeType,k=j?f.cache:a,l=j?a[f.expando]:a[f.expando]&&f.expando;if((!l||e&&l&&!k[l][g])&&h&&d===b)return;l||(j?a[f.expando]=l=++f.uuid:l=f.expando),k[l]||(k[l]={},j||(k[l].toJSON=f.noop));if(typeof c=="object"||typeof c=="function")e?k[l][g]=f.extend(k[l][g],c):k[l]=f.extend(k[l],c);i=k[l],e&&(i[g]||(i[g]={}),i=i[g]),d!==b&&(i[f.camelCase(c)]=d);if(c==="events"&&!i[c])return i[g]&&i[g].events;return h?i[f.camelCase(c)]||i[c]:i}},removeData:function(b,c,d){if(!!f.acceptData(b)){var e=f.expando,g=b.nodeType,h=g?f.cache:b,i=g?b[f.expando]:f.expando;if(!h[i])return;if(c){var j=d?h[i][e]:h[i];if(j){delete j[c];if(!l(j))return}}if(d){delete h[i][e];if(!l(h[i]))return}var k=h[i][e];f.support.deleteExpando||h!=a?delete h[i]:h[i]=null,k?(h[i]={},g||(h[i].toJSON=f.noop),h[i][e]=k):g&&(f.support.deleteExpando?delete b[f.expando]:b.removeAttribute?b.removeAttribute(f.expando):b[f.expando]=null)}},_data:function(a,b,c){return f.data(a,b,c,!0)},acceptData:function(a){if(a.nodeName){var b=f.noData[a.nodeName.toLowerCase()];if(b)return b!==!0&&a.getAttribute("classid")===b}return!0}}),f.fn.extend({data:function(a,c){var d=null;if(typeof a=="undefined"){if(this.length){d=f.data(this[0]);if(this[0].nodeType===1){var e=this[0].attributes,g;for(var h=0,i=e.length;h-1)return!0;return!1},val:function(a){var c,d,e=this[0];if(!arguments.length){if(e){c=f.valHooks[e.nodeName.toLowerCase()]||f.valHooks[e.type];if(c&&"get"in c&&(d=c.get(e,"value"))!==b)return d;d=e.value;return typeof d=="string"?d.replace(p,""):d==null?"":d}return b}var g=f.isFunction(a);return this.each(function(d){var e=f(this),h;if(this.nodeType===1){g?h=a.call(this,d,e.val()):h=a,h==null?h="":typeof h=="number"?h+="":f.isArray(h)&&(h=f.map(h,function(a){return a==null?"":a+""})),c=f.valHooks[this.nodeName.toLowerCase()]||f.valHooks[this.type];if(!c||!("set"in c)||c.set(this,h,"value")===b)this.value=h}})}}),f.extend({valHooks:{option:{get:function(a){var b=a.attributes.value;return!b||b.specified?a.value:a.text}},select:{get:function(a){var b,c=a.selectedIndex,d=[],e=a.options,g=a.type==="select-one";if(c<0)return null;for(var h=g?c:0,i=g?c+1:e.length;h=0}),c.length||(a.selectedIndex=-1);return c}}},attrFn:{val:!0,css:!0,html:!0,text:!0,data:!0,width:!0,height:!0,offset:!0},attrFix:{tabindex:"tabIndex"},attr:function(a,c,d,e){var g=a.nodeType;if(!a||g===3||g===8||g===2)return b;if(e&&c in f.attrFn)return f(a)[c](d);if(!("getAttribute"in a))return f.prop(a,c,d);var h,i,j=g!==1||!f.isXMLDoc(a);j&&(c=f.attrFix[c]||c,i=f.attrHooks[c],i||(t.test(c)?i=w:v&&c!=="className"&&(f.nodeName(a,"form")||u.test(c))&&(i=v)));if(d!==b){if(d===null){f.removeAttr(a,c);return b}if(i&&"set"in i&&j&&(h=i.set(a,d,c))!==b)return h;a.setAttribute(c,""+d);return d}if(i&&"get"in i&&j&&(h=i.get(a,c))!==null)return h;h=a.getAttribute(c);return h===null?b:h},removeAttr:function(a,b){var c;a.nodeType===1&&(b=f.attrFix[b]||b,f.support.getSetAttribute?a.removeAttribute(b):(f.attr(a,b,""),a.removeAttributeNode(a.getAttributeNode(b))),t.test(b)&&(c=f.propFix[b]||b)in a&&(a[c]=!1))},attrHooks:{type:{set:function(a,b){if(q.test(a.nodeName)&&a.parentNode)f.error("type property can't be changed");else if(!f.support.radioValue&&b==="radio"&&f.nodeName(a,"input")){var c=a.value;a.setAttribute("type",b),c&&(a.value=c);return b}}},tabIndex:{get:function(a){var c=a.getAttributeNode("tabIndex");return c&&c.specified?parseInt(c.value,10):r.test(a.nodeName)||s.test(a.nodeName)&&a.href?0:b}},value:{get:function(a,b){if(v&&f.nodeName(a,"button"))return v.get(a,b);return b in a?a.value:null},set:function(a,b,c){if(v&&f.nodeName(a,"button"))return v.set(a,b,c);a.value=b}}},propFix:{tabindex:"tabIndex",readonly:"readOnly","for":"htmlFor","class":"className",maxlength:"maxLength",cellspacing:"cellSpacing",cellpadding:"cellPadding",rowspan:"rowSpan",colspan:"colSpan",usemap:"useMap",frameborder:"frameBorder",contenteditable:"contentEditable"},prop:function(a,c,d){var e=a.nodeType;if(!a||e===3||e===8||e===2)return b;var g,h,i=e!==1||!f.isXMLDoc(a);i&&(c=f.propFix[c]||c,h=f.propHooks[c]);return d!==b?h&&"set"in h&&(g=h.set(a,d,c))!==b?g:a[c]=d:h&&"get"in h&&(g=h.get(a,c))!==b?g:a[c]},propHooks:{}}),w={get:function(a,c){return f.prop(a,c)?c.toLowerCase():b},set:function(a,b,c){var d;b===!1?f.removeAttr(a,c):(d=f.propFix[c]||c,d in a&&(a[d]=!0),a.setAttribute(c,c.toLowerCase()));return c}},f.support.getSetAttribute||(f.attrFix=f.propFix,v=f.attrHooks.name=f.attrHooks.title=f.valHooks.button={get:function(a,c){var d;d=a.getAttributeNode(c);return d&&d.nodeValue!==""?d.nodeValue:b},set:function(a,b,c){var d=a.getAttributeNode(c);if(d){d.nodeValue=b;return b}}},f.each(["width","height"],function(a,b){f.attrHooks[b]=f.extend(f.attrHooks[b],{set:function(a,c){if(c===""){a.setAttribute(b,"auto");return c}}})})),f.support.hrefNormalized||f.each(["href","src","width","height"],function(a,c){f.attrHooks[c]=f.extend(f.attrHooks[c],{get:function(a){var d=a.getAttribute(c,2);return d===null?b:d}})}),f.support.style||(f.attrHooks.style={get:function(a){return a.style.cssText.toLowerCase()||b},set:function(a,b){return a.style.cssText=""+b}}),f.support.optSelected||(f.propHooks.selected=f.extend(f.propHooks.selected,{get:function(a){var b=a.parentNode;b&&(b.selectedIndex,b.parentNode&&b.parentNode.selectedIndex)}})),f.support.checkOn||f.each(["radio","checkbox"],function(){f.valHooks[this]={get:function(a){return a.getAttribute("value")===null?"on":a.value}}}),f.each(["radio","checkbox"],function(){f.valHooks[this]=f.extend(f.valHooks[this],{set:function(a,b){if(f.isArray(b))return a.checked=f.inArray(f(a).val(),b)>=0}})});var x=/\.(.*)$/,y=/^(?:textarea|input|select)$/i,z=/\./g,A=/ /g,B=/[^\w\s.|`]/g,C=function(a){return a.replace(B,"\\$&")};f.event={add:function(a,c,d,e){if(a.nodeType!==3&&a.nodeType!==8){if(d===!1)d=D;else if(!d)return;var g,h;d.handler&&(g=d,d=g.handler),d.guid||(d.guid=f.guid++);var i=f._data(a);if(!i)return;var j=i.events,k=i.handle;j||(i.events=j={}),k||(i.handle=k=function(a){return typeof f!="undefined"&&(!a||f.event.triggered!==a.type)?f.event.handle.apply(k.elem,arguments):b}),k.elem=a,c=c.split(" ");var l,m=0,n;while(l=c[m++]){h=g?f.extend({},g):{handler:d,data:e},l.indexOf(".")>-1?(n=l.split("."),l=n.shift(),h.namespace=n.slice(0).sort().join(".")):(n=[],h.namespace=""),h.type=l,h.guid||(h.guid=d.guid);var o=j[l],p=f.event.special[l]||{};if(!o){o=j[l]=[];if(!p.setup||p.setup.call(a,e,n,k)===!1)a.addEventListener?a.addEventListener(l,k,!1):a.attachEvent&&a.attachEvent("on"+l,k)}p.add&&(p.add.call(a,h),h.handler.guid||(h.handler.guid=d.guid)),o.push(h),f.event.global[l]=!0}a=null}},global:{},remove:function(a,c,d,e){if(a.nodeType!==3&&a.nodeType!==8){d===!1&&(d=D);var g,h,i,j,k=0,l,m,n,o,p,q,r,s=f.hasData(a)&&f._data(a),t=s&&s.events;if(!s||!t)return;c&&c.type&&(d=c.handler,c=c.type);if(!c||typeof c=="string"&&c.charAt(0)==="."){c=c||"";for(h in t)f.event.remove(a,h+c);return}c=c.split(" ");while(h=c[k++]){r=h,q=null,l=h.indexOf(".")<0,m=[],l||(m=h.split("."),h=m.shift(),n=new RegExp("(^|\\.)"+f.map(m.slice(0).sort(),C).join("\\.(?:.*\\.)?")+"(\\.|$)")),p=t[h];if(!p)continue;if(!d){for(j=0;j=0&&(h=h.slice(0,-1),j=!0),h.indexOf(".")>=0&&(i=h.split("."),h=i. +shift(),i.sort());if(!!e&&!f.event.customEvent[h]||!!f.event.global[h]){c=typeof c=="object"?c[f.expando]?c:new f.Event(h,c):new f.Event(h),c.type=h,c.exclusive=j,c.namespace=i.join("."),c.namespace_re=new RegExp("(^|\\.)"+i.join("\\.(?:.*\\.)?")+"(\\.|$)");if(g||!e)c.preventDefault(),c.stopPropagation();if(!e){f.each(f.cache,function(){var a=f.expando,b=this[a];b&&b.events&&b.events[h]&&f.event.trigger(c,d,b.handle.elem)});return}if(e.nodeType===3||e.nodeType===8)return;c.result=b,c.target=e,d=d!=null?f.makeArray(d):[],d.unshift(c);var k=e,l=h.indexOf(":")<0?"on"+h:"";do{var m=f._data(k,"handle");c.currentTarget=k,m&&m.apply(k,d),l&&f.acceptData(k)&&k[l]&&k[l].apply(k,d)===!1&&(c.result=!1,c.preventDefault()),k=k.parentNode||k.ownerDocument||k===c.target.ownerDocument&&a}while(k&&!c.isPropagationStopped());if(!c.isDefaultPrevented()){var n,o=f.event.special[h]||{};if((!o._default||o._default.call(e.ownerDocument,c)===!1)&&(h!=="click"||!f.nodeName(e,"a"))&&f.acceptData(e)){try{l&&e[h]&&(n=e[l],n&&(e[l]=null),f.event.triggered=h,e[h]())}catch(p){}n&&(e[l]=n),f.event.triggered=b}}return c.result}},handle:function(c){c=f.event.fix(c||a.event);var d=((f._data(this,"events")||{})[c.type]||[]).slice(0),e=!c.exclusive&&!c.namespace,g=Array.prototype.slice.call(arguments,0);g[0]=c,c.currentTarget=this;for(var h=0,i=d.length;h-1?f.map(a.options,function(a){return a.selected}).join("-"):"":f.nodeName(a,"select")&&(c=a.selectedIndex);return c},J=function(c){var d=c.target,e,g;if(!!y.test(d.nodeName)&&!d.readOnly){e=f._data(d,"_change_data"),g=I(d),(c.type!=="focusout"||d.type!=="radio")&&f._data(d,"_change_data",g);if(e===b||g===e)return;if(e!=null||g)c.type="change",c.liveFired=b,f.event.trigger(c,arguments[1],d)}};f.event.special.change={filters:{focusout:J,beforedeactivate:J,click:function(a){var b=a.target,c=f.nodeName(b,"input")?b.type:"";(c==="radio"||c==="checkbox"||f.nodeName(b,"select"))&&J.call(this,a)},keydown:function(a){var b=a.target,c=f.nodeName(b,"input")?b.type:"";(a.keyCode===13&&!f.nodeName(b,"textarea")||a.keyCode===32&&(c==="checkbox"||c==="radio")||c==="select-multiple")&&J.call(this,a)},beforeactivate:function(a){var b=a.target;f._data(b,"_change_data",I(b))}},setup:function(a,b){if(this.type==="file")return!1;for(var c in H)f.event.add(this,c+".specialChange",H[c]);return y.test(this.nodeName)},teardown:function(a){f.event.remove(this,".specialChange");return y.test(this.nodeName)}},H=f.event.special.change.filters,H.focus=H.beforeactivate}f.support.focusinBubbles||f.each({focus:"focusin",blur:"focusout"},function(a,b){function e(a){var c=f.event.fix(a);c.type=b,c.originalEvent={},f.event.trigger(c,null,c.target),c.isDefaultPrevented()&&a.preventDefault()}var d=0;f.event.special[b]={setup:function(){d++===0&&c.addEventListener(a,e,!0)},teardown:function(){--d===0&&c.removeEventListener(a,e,!0)}}}),f.each(["bind","one"],function(a,c){f.fn[c]=function(a,d,e){var g;if(typeof a=="object"){for(var h in a)this[c](h,d,a[h],e);return this}if(arguments.length===2||d===!1)e=d,d=b;c==="one"?(g=function(a){f(this).unbind(a,g);return e.apply(this,arguments)},g.guid=e.guid||f.guid++):g=e;if(a==="unload"&&c!=="one")this.one(a,d,e);else for(var i=0,j=this.length;i0?this.bind(b,a,c):this.trigger(b)},f.attrFn&&(f.attrFn[b]=!0)}),function(){function u(a,b,c,d,e,f){for(var g=0,h=d.length;g0){j=i;break}}i=i[a]}d[g]=j}}}function t(a,b,c,d,e,f){for(var g=0,h=d.length;g+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g,d=0,e=Object.prototype.toString,g=!1,h=!0,i=/\\/g,j=/\W/;[0,0].sort(function(){h=!1;return 0});var k=function(b,d,f,g){f=f||[],d=d||c;var h=d;if(d.nodeType!==1&&d.nodeType!==9)return[];if(!b||typeof b!="string")return f;var i,j,n,o,q,r,s,t,u=!0,w=k.isXML(d),x=[],y=b;do{a.exec(""),i=a.exec(y);if(i){y=i[3],x.push(i[1]);if(i[2]){o=i[3];break}}}while(i);if(x.length>1&&m.exec(b))if(x.length===2&&l.relative[x[0]])j=v(x[0]+x[1],d);else{j=l.relative[x[0]]?[d]:k(x.shift(),d);while(x.length)b=x.shift(),l.relative[b]&&(b+=x.shift()),j=v(b,j)}else{!g&&x.length>1&&d.nodeType===9&&!w&&l.match.ID.test(x[0])&&!l.match.ID.test(x[x.length-1])&&(q=k.find(x.shift(),d,w),d=q.expr?k.filter(q.expr,q.set)[0]:q.set[0]);if(d){q=g?{expr:x.pop(),set:p(g)}:k.find(x.pop(),x.length===1&&(x[0]==="~"||x[0]==="+")&&d.parentNode?d.parentNode:d,w),j=q.expr?k.filter(q.expr,q.set):q.set,x.length>0?n=p(j):u=!1;while(x.length)r=x.pop(),s=r,l.relative[r]?s=x.pop():r="",s==null&&(s=d),l.relative[r](n,s,w)}else n=x=[]}n||(n=j),n||k.error(r||b);if(e.call(n)==="[object Array]")if(!u)f.push.apply(f,n);else if(d&&d.nodeType===1)for(t=0;n[t]!=null;t++)n[t]&&(n[t]===!0||n[t].nodeType===1&&k.contains(d,n[t]))&&f.push(j[t]);else for(t=0;n[t]!=null;t++)n[t]&&n[t].nodeType===1&&f.push(j[t]);else p(n,f);o&&(k(o,h,f,g),k.uniqueSort(f));return f};k.uniqueSort=function(a){if(r){g=h,a.sort(r);if(g)for(var b=1;b0},k.find=function(a,b,c){var d;if(!a)return[];for(var e=0,f=l.order.length;e":function(a,b){var c,d=typeof b=="string",e=0,f=a.length;if(d&&!j.test(b)){b=b.toLowerCase();for(;e=0)?c||d.push(h):c&&(b[g]=!1));return!1},ID:function(a){return a[1].replace(i,"")},TAG:function(a,b){return a[1].replace(i,"").toLowerCase()},CHILD:function(a){if(a[1]==="nth"){a[2]||k.error(a[0]),a[2]=a[2].replace(/^\+|\s*/g,"");var b=/(-?)(\d*)(?:n([+\-]?\d*))?/.exec(a[2]==="even"&&"2n"||a[2]==="odd"&&"2n+1"||!/\D/.test(a[2])&&"0n+"+a[2]||a[2]);a[2]=b[1]+(b[2]||1)-0,a[3]=b[3]-0}else a[2]&&k.error(a[0]);a[0]=d++;return a},ATTR:function(a,b,c,d,e,f){var g=a[1]=a[1].replace(i,"");!f&&l.attrMap[g]&&(a[1]=l.attrMap[g]),a[4]=(a[4]||a[5]||"").replace(i,""),a[2]==="~="&&(a[4]=" "+a[4]+" ");return a},PSEUDO:function(b,c,d,e,f){if(b[1]==="not")if((a.exec(b[3])||"").length>1||/^\w/.test(b[3]))b[3]=k(b[3],null,null,c);else{var g=k.filter(b[3],c,d,!0^f);d||e.push.apply(e,g);return!1}else if(l.match.POS.test(b[0])||l.match.CHILD.test(b[0]))return!0;return b},POS:function(a){a.unshift(!0);return a}},filters:{enabled:function(a){return a.disabled===!1&&a.type!=="hidden"},disabled:function(a){return a.disabled===!0},checked:function(a){return a.checked===!0},selected:function(a){a.parentNode&&a.parentNode.selectedIndex;return a.selected===!0},parent:function(a){return!!a.firstChild},empty:function(a){return!a.firstChild},has:function(a,b,c){return!!k(c[3],a).length},header:function(a){return/h\d/i.test(a.nodeName)},text:function(a){var b=a.getAttribute("type"),c=a.type;return a.nodeName.toLowerCase()==="input"&&"text"===c&&(b===c||b===null)},radio:function(a){return a.nodeName.toLowerCase()==="input"&&"radio"===a.type},checkbox:function(a){return a.nodeName.toLowerCase()==="input"&&"checkbox"===a.type},file:function(a){return a.nodeName.toLowerCase()==="input"&&"file"===a.type},password:function(a){return a.nodeName.toLowerCase()==="input"&&"password"===a.type},submit:function(a){var b=a.nodeName.toLowerCase();return(b==="input"||b==="button")&&"submit"===a.type},image:function(a){return a.nodeName.toLowerCase()==="input"&&"image"===a.type},reset:function(a){var b=a.nodeName.toLowerCase();return(b==="input"||b==="button")&&"reset"===a.type},button:function(a){var b=a.nodeName.toLowerCase();return b==="input"&&"button"===a.type||b==="button"},input:function(a){return/input|select|textarea|button/i.test(a.nodeName)},focus:function(a){return a===a.ownerDocument.activeElement}},setFilters:{first:function(a,b){return b===0},last:function(a,b,c,d){return b===d.length-1},even:function(a,b){return b%2===0},odd:function(a,b){return b%2===1},lt:function(a,b,c){return bc[3]-0},nth:function(a,b,c){return c[3]-0===b},eq:function(a,b,c){return c[3]-0===b}},filter:{PSEUDO:function(a,b,c,d){var e=b[1],f=l.filters[e];if(f)return f(a,c,b,d);if(e==="contains")return(a.textContent||a.innerText||k.getText([a])||"").indexOf(b[3])>=0;if(e==="not"){var g=b[3];for(var h=0,i=g.length;h=0}},ID:function(a,b){return a.nodeType===1&&a.getAttribute("id")===b},TAG:function(a,b){return b==="*"&&a.nodeType===1||a.nodeName.toLowerCase()===b},CLASS:function(a,b){return(" "+(a.className||a.getAttribute("class"))+" ").indexOf(b)>-1},ATTR:function(a,b){var c=b[1],d=l.attrHandle[c]?l.attrHandle[c](a):a[c]!=null?a[c]:a.getAttribute(c),e=d+"",f=b[2],g=b[4];return d==null?f==="!=":f==="="?e===g:f==="*="?e.indexOf(g)>=0:f==="~="?(" "+e+" ").indexOf(g)>=0:g?f==="!="?e!==g:f==="^="?e.indexOf(g)===0:f==="$="?e.substr(e.length-g.length)===g:f==="|="?e===g||e.substr(0,g.length+1)===g+"-":!1:e&&d!==!1},POS:function(a,b,c,d){var e=b[2],f=l.setFilters[e];if(f)return f(a,c,b,d)}}},m=l.match.POS,n=function(a,b){return"\\"+(b-0+1)};for(var o in l.match)l.match[o]=new RegExp(l.match[o].source+/(?![^\[]*\])(?![^\(]*\))/.source),l.leftMatch[o]=new RegExp(/(^(?:.|\r|\n)*?)/.source+l.match[o].source.replace(/\\(\d+)/g,n));var p=function(a,b){a=Array.prototype.slice.call(a,0);if(b){b.push.apply(b,a);return b}return a};try{Array.prototype.slice.call(c.documentElement.childNodes,0)[0].nodeType}catch(q){p=function(a,b){var c=0,d=b||[];if(e.call(a)==="[object Array]")Array.prototype.push.apply(d,a);else if(typeof a.length=="number")for(var f=a.length;c",e.insertBefore(a,e.firstChild),c.getElementById(d)&&(l.find.ID=function(a,c,d){if(typeof c.getElementById!="undefined"&&!d){var e=c.getElementById(a[1]);return e?e.id===a[1]||typeof e.getAttributeNode!="undefined"&&e.getAttributeNode("id").nodeValue===a[1]?[e]:b:[]}},l.filter.ID=function(a,b){var c=typeof a.getAttributeNode!="undefined"&&a.getAttributeNode("id");return a.nodeType===1&&c&&c.nodeValue===b}),e.removeChild(a),e=a=null}(),function(){var a=c.createElement("div");a.appendChild(c.createComment("")),a.getElementsByTagName("*").length>0&&(l.find.TAG=function(a,b){var c=b.getElementsByTagName(a[1]);if(a[1]==="*"){var d=[];for(var e=0;c[e];e++)c[e].nodeType===1&&d.push(c[e]);c=d}return c}),a.innerHTML="",a.firstChild&&typeof a.firstChild.getAttribute!="undefined"&&a.firstChild.getAttribute("href")!=="#"&&(l.attrHandle.href=function(a){return a.getAttribute("href",2)}),a=null}(),c.querySelectorAll&&function(){var a=k,b=c.createElement("div"),d="__sizzle__";b.innerHTML="

";if(!b.querySelectorAll||b.querySelectorAll(".TEST").length!==0){k=function(b,e,f,g){e=e||c;if(!g&&!k.isXML(e)){var h=/^(\w+$)|^\.([\w\-]+$)|^#([\w\-]+$)/.exec(b);if(h&&(e.nodeType===1||e.nodeType===9)){if(h[1])return p(e.getElementsByTagName(b),f);if(h[2]&&l.find.CLASS&&e.getElementsByClassName)return p(e.getElementsByClassName(h[2]),f)}if(e.nodeType===9){if(b==="body"&&e.body)return p([e.body],f);if(h&&h[3]){var i=e.getElementById(h[3]);if(!i||!i.parentNode)return p([],f);if(i.id===h[3])return p([i],f)}try{return p(e.querySelectorAll(b),f)}catch(j){}}else if(e.nodeType===1&&e.nodeName.toLowerCase()!=="object"){var m=e,n=e.getAttribute("id"),o=n||d,q=e.parentNode,r=/^\s*[+~]/.test(b);n?o=o.replace(/'/g,"\\$&"):e.setAttribute("id",o),r&&q&&(e=e.parentNode);try{if(!r||q)return p(e.querySelectorAll("[id='"+o+"'] "+b),f)}catch(s){}finally{n||m.removeAttribute("id")}}}return a(b,e,f,g)};for(var e in a)k[e]=a[e];b=null}}(),function(){var a=c.documentElement,b=a.matchesSelector||a.mozMatchesSelector||a.webkitMatchesSelector||a.msMatchesSelector;if(b){var d=!b.call(c.createElement("div"),"div"),e=!1;try{b.call(c.documentElement,"[test!='']:sizzle")}catch(f){e=!0}k.matchesSelector=function(a,c){c=c.replace(/\=\s*([^'"\]]*)\s*\]/g,"='$1']");if(!k.isXML(a))try{if(e||!l.match.PSEUDO.test(c)&&!/!=/.test(c)){var f=b.call(a,c);if(f||!d||a.document&&a.document.nodeType!==11)return f}}catch(g){}return k(c,null,null,[a]).length>0}}}(),function(){var a=c.createElement("div");a.innerHTML="
";if(!!a.getElementsByClassName&&a.getElementsByClassName("e").length!==0){a.lastChild.className="e";if(a.getElementsByClassName("e").length===1)return;l.order.splice(1,0,"CLASS"),l.find.CLASS=function(a,b,c){if(typeof b.getElementsByClassName!="undefined"&&!c)return b.getElementsByClassName(a[1])},a=null}}(),c.documentElement.contains?k.contains=function(a,b){return a!==b&&(a.contains?a.contains(b):!0)}:c.documentElement.compareDocumentPosition?k.contains=function(a,b){return!!(a.compareDocumentPosition(b)&16)}:k.contains=function(){return!1},k.isXML=function(a){var b=(a?a.ownerDocument||a:0).documentElement;return b?b.nodeName!=="HTML":!1};var v=function(a,b){var c,d=[],e="",f=b.nodeType?[b]:b;while(c=l.match.PSEUDO.exec(a))e+=c[0],a=a.replace(l.match.PSEUDO,"");a=l.relative[a]?a+"*":a;for(var g=0,h=f.length;g0)for(h=g;h0:this.filter(a).length>0)},closest:function(a,b){var c=[],d,e,g=this[0];if(f.isArray(a)){var h,i,j={},k=1;if(g&&a.length){for(d=0,e=a.length;d-1:f(g).is(h))&&c.push({selector:i,elem:g,level:k});g=g.parentNode,k++}}return c}var l=T.test(a)||typeof a!="string"?f(a,b||this.context):0;for(d=0,e=this.length;d-1:f.find.matchesSelector(g,a)){c.push(g);break}g=g.parentNode;if(!g||!g.ownerDocument||g===b||g.nodeType===11)break}}c=c.length>1?f.unique(c):c;return this.pushStack(c,"closest",a)},index:function(a){if(!a||typeof a=="string")return f.inArray(this[0],a?f(a):this.parent().children());return f.inArray(a.jquery?a[0]:a,this)},add:function(a,b){var c=typeof a=="string"?f(a,b):f.makeArray(a&&a.nodeType?[a]:a),d=f.merge(this.get(),c);return this.pushStack(V(c[0])||V(d[0])?d:f.unique(d))},andSelf:function(){return this.add(this.prevObject)}}),f.each({parent:function(a){var b=a.parentNode;return b&&b.nodeType!==11?b:null},parents:function(a){return f.dir(a,"parentNode")},parentsUntil:function(a,b,c){return f.dir(a,"parentNode",c)},next:function(a){return f.nth(a,2,"nextSibling")},prev:function(a){return f.nth(a,2,"previousSibling")},nextAll:function(a){return f.dir(a,"nextSibling")},prevAll:function(a){return f.dir(a,"previousSibling")},nextUntil:function(a,b,c){return f.dir(a,"nextSibling",c)},prevUntil:function(a,b,c){return f.dir(a,"previousSibling",c)},siblings:function(a){return f.sibling(a.parentNode.firstChild,a)},children:function(a){return f.sibling(a.firstChild)},contents:function(a){return f.nodeName(a,"iframe")?a.contentDocument||a.contentWindow.document:f.makeArray(a.childNodes)}},function(a,b){f.fn[a]=function(c,d){var e=f.map(this,b,c),g=S.call(arguments);O.test(a)||(d=c),d&&typeof d=="string"&&(e=f.filter(d,e)),e=this.length>1&&!U[a]?f.unique(e):e,(this.length>1||Q.test(d))&&P.test(a)&&(e=e.reverse());return this.pushStack(e,a,g.join(","))}}),f.extend({filter:function(a,b,c){c&&(a=":not("+a+")");return b.length===1?f.find.matchesSelector(b[0],a)?[b[0]]:[]:f.find.matches(a,b)},dir:function(a,c,d){var e=[],g=a[c];while(g&&g.nodeType!==9&&(d===b||g.nodeType!==1||!f(g).is(d)))g.nodeType===1&&e.push(g),g=g[c];return e},nth:function(a,b,c,d){b=b||1;var e=0;for(;a;a=a[c])if(a.nodeType===1&&++e===b)break;return a},sibling:function(a,b){var c=[];for(;a;a=a.nextSibling)a.nodeType===1&&a!==b&&c.push(a);return c}});var X=/ jQuery\d+="(?:\d+|null)"/g,Y=/^\s+/,Z=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/ig,$=/<([\w:]+)/,_=/",""],legend:[1,"
","
"],thead:[1,"","
"],tr:[2,"","
"],td:[3,"","
"],col:[2,"","
"],area:[1,"",""],_default:[0,"",""]};bf.optgroup=bf.option,bf.tbody=bf.tfoot=bf.colgroup=bf.caption=bf.thead,bf.th=bf.td,f.support.htmlSerialize||(bf._default=[1,"div
","
"]),f.fn.extend({text:function(a){if(f.isFunction(a))return this.each(function(b){var c=f(this);c.text(a.call(this,b,c.text()))});if(typeof a!="object"&&a!==b)return this.empty().append((this[0]&&this[0].ownerDocument||c).createTextNode(a));return f.text(this)},wrapAll:function(a){if(f.isFunction(a))return this.each(function(b){f(this).wrapAll(a.call(this,b))});if(this[0]){var b=f(a,this[0].ownerDocument).eq(0).clone(!0);this[0].parentNode&&b.insertBefore(this[0]),b.map(function(){var a=this;while(a.firstChild&&a.firstChild.nodeType===1)a=a.firstChild;return a}).append(this)}return this},wrapInner:function(a){if(f.isFunction(a))return this.each(function(b){f(this).wrapInner(a.call(this,b))});return this.each(function(){var b=f(this),c=b.contents();c.length?c.wrapAll(a):b.append(a)})},wrap:function(a){return this.each(function(){f(this).wrapAll(a)})},unwrap:function(){return this.parent().each(function(){f.nodeName(this,"body")||f(this).replaceWith(this.childNodes)}).end()},append:function(){return this.domManip(arguments,!0,function(a){this.nodeType===1&&this.appendChild(a)})},prepend:function(){return this.domManip(arguments,!0,function(a){this.nodeType===1&&this.insertBefore(a,this.firstChild)})},before:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,!1,function(a){this.parentNode.insertBefore(a,this)});if(arguments.length){var a=f(arguments[0]);a.push.apply(a,this.toArray());return this.pushStack(a,"before",arguments)}},after:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,!1,function(a){this.parentNode.insertBefore(a,this.nextSibling)});if(arguments.length){var a=this.pushStack(this,"after",arguments);a.push.apply(a,f(arguments[0]).toArray());return a}},remove:function(a,b){for(var c=0,d;(d=this[c])!=null;c++)if(!a||f.filter(a,[d]).length)!b&&d.nodeType===1&&(f.cleanData(d.getElementsByTagName("*")),f.cleanData([d])),d.parentNode&&d.parentNode.removeChild(d);return this},empty:function(){for(var a=0,b;(b=this[a])!=null;a++){b.nodeType===1&&f.cleanData(b.getElementsByTagName("*"));while(b.firstChild)b.removeChild(b.firstChild)}return this},clone:function(a,b){a=a==null?!1:a,b=b==null?a:b;return this.map(function(){return f.clone(this,a,b)})},html:function(a){if(a===b)return this[0]&&this[0].nodeType===1?this[0].innerHTML.replace(X,""):null;if(typeof a=="string"&&!bb.test(a)&&(f.support.leadingWhitespace||!Y.test(a))&&!bf[($.exec(a)||["",""])[1].toLowerCase()]){a=a.replace(Z,"<$1>");try{for(var c=0,d=this.length;c1&&l0?this.clone(!0):this).get();f(e[h])[b](j),d=d.concat(j +)}return this.pushStack(d,a,e.selector)}}),f.extend({clone:function(a,b,c){var d=a.cloneNode(!0),e,g,h;if((!f.support.noCloneEvent||!f.support.noCloneChecked)&&(a.nodeType===1||a.nodeType===11)&&!f.isXMLDoc(a)){bi(a,d),e=bj(a),g=bj(d);for(h=0;e[h];++h)bi(e[h],g[h])}if(b){bh(a,d);if(c){e=bj(a),g=bj(d);for(h=0;e[h];++h)bh(e[h],g[h])}}e=g=null;return d},clean:function(a,b,d,e){var g;b=b||c,typeof b.createElement=="undefined"&&(b=b.ownerDocument||b[0]&&b[0].ownerDocument||c);var h=[],i;for(var j=0,k;(k=a[j])!=null;j++){typeof k=="number"&&(k+="");if(!k)continue;if(typeof k=="string")if(!ba.test(k))k=b.createTextNode(k);else{k=k.replace(Z,"<$1>");var l=($.exec(k)||["",""])[1].toLowerCase(),m=bf[l]||bf._default,n=m[0],o=b.createElement("div");o.innerHTML=m[1]+k+m[2];while(n--)o=o.lastChild;if(!f.support.tbody){var p=_.test(k),q=l==="table"&&!p?o.firstChild&&o.firstChild.childNodes:m[1]===""&&!p?o.childNodes:[];for(i=q.length-1;i>=0;--i)f.nodeName(q[i],"tbody")&&!q[i].childNodes.length&&q[i].parentNode.removeChild(q[i])}!f.support.leadingWhitespace&&Y.test(k)&&o.insertBefore(b.createTextNode(Y.exec(k)[0]),o.firstChild),k=o.childNodes}var r;if(!f.support.appendChecked)if(k[0]&&typeof (r=k.length)=="number")for(i=0;i=0)return b+"px"}}}),f.support.opacity||(f.cssHooks.opacity={get:function(a,b){return bo.test((b&&a.currentStyle?a.currentStyle.filter:a.style.filter)||"")?parseFloat(RegExp.$1)/100+"":b?"1":""},set:function(a,b){var c=a.style,d=a.currentStyle;c.zoom=1;var e=f.isNaN(b)?"":"alpha(opacity="+b*100+")",g=d&&d.filter||c.filter||"";c.filter=bn.test(g)?g.replace(bn,e):g+" "+e}}),f(function(){f.support.reliableMarginRight||(f.cssHooks.marginRight={get:function(a,b){var c;f.swap(a,{display:"inline-block"},function(){b?c=bx(a,"margin-right","marginRight"):c=a.style.marginRight});return c}})}),c.defaultView&&c.defaultView.getComputedStyle&&(by=function(a,c){var d,e,g;c=c.replace(bp,"-$1").toLowerCase();if(!(e=a.ownerDocument.defaultView))return b;if(g=e.getComputedStyle(a,null))d=g.getPropertyValue(c),d===""&&!f.contains(a.ownerDocument.documentElement,a)&&(d=f.style(a,c));return d}),c.documentElement.currentStyle&&(bz=function(a,b){var c,d=a.currentStyle&&a.currentStyle[b],e=a.runtimeStyle&&a.runtimeStyle[b],f=a.style;!bq.test(d)&&br.test(d)&&(c=f.left,e&&(a.runtimeStyle.left=a.currentStyle.left),f.left=b==="fontSize"?"1em":d||0,d=f.pixelLeft+"px",f.left=c,e&&(a.runtimeStyle.left=e));return d===""?"auto":d}),bx=by||bz,f.expr&&f.expr.filters&&(f.expr.filters.hidden=function(a){var b=a.offsetWidth,c=a.offsetHeight;return b===0&&c===0||!f.support.reliableHiddenOffsets&&(a.style.display||f.css(a,"display"))==="none"},f.expr.filters.visible=function(a){return!f.expr.filters.hidden(a)});var bB=/%20/g,bC=/\[\]$/,bD=/\r?\n/g,bE=/#.*$/,bF=/^(.*?):[ \t]*([^\r\n]*)\r?$/mg,bG=/^(?:color|date|datetime|email|hidden|month|number|password|range|search|tel|text|time|url|week)$/i,bH=/^(?:about|app|app\-storage|.+\-extension|file|widget):$/,bI=/^(?:GET|HEAD)$/,bJ=/^\/\//,bK=/\?/,bL=/)<[^<]*)*<\/script>/gi,bM=/^(?:select|textarea)/i,bN=/\s+/,bO=/([?&])_=[^&]*/,bP=/^([\w\+\.\-]+:)(?:\/\/([^\/?#:]*)(?::(\d+))?)?/,bQ=f.fn.load,bR={},bS={},bT,bU;try{bT=e.href}catch(bV){bT=c.createElement("a"),bT.href="",bT=bT.href}bU=bP.exec(bT.toLowerCase())||[],f.fn.extend({load:function(a,c,d){if(typeof a!="string"&&bQ)return bQ.apply(this,arguments);if(!this.length)return this;var e=a.indexOf(" ");if(e>=0){var g=a.slice(e,a.length);a=a.slice(0,e)}var h="GET";c&&(f.isFunction(c)?(d=c,c=b):typeof c=="object"&&(c=f.param(c,f.ajaxSettings.traditional),h="POST"));var i=this;f.ajax({url:a,type:h,dataType:"html",data:c,complete:function(a,b,c){c=a.responseText,a.isResolved()&&(a.done(function(a){c=a}),i.html(g?f("
").append(c.replace(bL,"")).find(g):c)),d&&i.each(d,[c,b,a])}});return this},serialize:function(){return f.param(this.serializeArray())},serializeArray:function(){return this.map(function(){return this.elements?f.makeArray(this.elements):this}).filter(function(){return this.name&&!this.disabled&&(this.checked||bM.test(this.nodeName)||bG.test(this.type))}).map(function(a,b){var c=f(this).val();return c==null?null:f.isArray(c)?f.map(c,function(a,c){return{name:b.name,value:a.replace(bD,"\r\n")}}):{name:b.name,value:c.replace(bD,"\r\n")}}).get()}}),f.each("ajaxStart ajaxStop ajaxComplete ajaxError ajaxSuccess ajaxSend".split(" "),function(a,b){f.fn[b]=function(a){return this.bind(b,a)}}),f.each(["get","post"],function(a,c){f[c]=function(a,d,e,g){f.isFunction(d)&&(g=g||e,e=d,d=b);return f.ajax({type:c,url:a,data:d,success:e,dataType:g})}}),f.extend({getScript:function(a,c){return f.get(a,b,c,"script")},getJSON:function(a,b,c){return f.get(a,b,c,"json")},ajaxSetup:function(a,b){b?f.extend(!0,a,f.ajaxSettings,b):(b=a,a=f.extend(!0,f.ajaxSettings,b));for(var c in{context:1,url:1})c in b?a[c]=b[c]:c in f.ajaxSettings&&(a[c]=f.ajaxSettings[c]);return a},ajaxSettings:{url:bT,isLocal:bH.test(bU[1]),global:!0,type:"GET",contentType:"application/x-www-form-urlencoded",processData:!0,async:!0,accepts:{xml:"application/xml, text/xml",html:"text/html",text:"text/plain",json:"application/json, text/javascript","*":"*/*"},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText"},converters:{"* text":a.String,"text html":!0,"text json":f.parseJSON,"text xml":f.parseXML}},ajaxPrefilter:bW(bR),ajaxTransport:bW(bS),ajax:function(a,c){function w(a,c,l,m){if(s!==2){s=2,q&&clearTimeout(q),p=b,n=m||"",v.readyState=a?4:0;var o,r,u,w=l?bZ(d,v,l):b,x,y;if(a>=200&&a<300||a===304){if(d.ifModified){if(x=v.getResponseHeader("Last-Modified"))f.lastModified[k]=x;if(y=v.getResponseHeader("Etag"))f.etag[k]=y}if(a===304)c="notmodified",o=!0;else try{r=b$(d,w),c="success",o=!0}catch(z){c="parsererror",u=z}}else{u=c;if(!c||a)c="error",a<0&&(a=0)}v.status=a,v.statusText=c,o?h.resolveWith(e,[r,c,v]):h.rejectWith(e,[v,c,u]),v.statusCode(j),j=b,t&&g.trigger("ajax"+(o?"Success":"Error"),[v,d,o?r:u]),i.resolveWith(e,[v,c]),t&&(g.trigger("ajaxComplete",[v,d]),--f.active||f.event.trigger("ajaxStop"))}}typeof a=="object"&&(c=a,a=b),c=c||{};var d=f.ajaxSetup({},c),e=d.context||d,g=e!==d&&(e.nodeType||e instanceof f)?f(e):f.event,h=f.Deferred(),i=f._Deferred(),j=d.statusCode||{},k,l={},m={},n,o,p,q,r,s=0,t,u,v={readyState:0,setRequestHeader:function(a,b){if(!s){var c=a.toLowerCase();a=m[c]=m[c]||a,l[a]=b}return this},getAllResponseHeaders:function(){return s===2?n:null},getResponseHeader:function(a){var c;if(s===2){if(!o){o={};while(c=bF.exec(n))o[c[1].toLowerCase()]=c[2]}c=o[a.toLowerCase()]}return c===b?null:c},overrideMimeType:function(a){s||(d.mimeType=a);return this},abort:function(a){a=a||"abort",p&&p.abort(a),w(0,a);return this}};h.promise(v),v.success=v.done,v.error=v.fail,v.complete=i.done,v.statusCode=function(a){if(a){var b;if(s<2)for(b in a)j[b]=[j[b],a[b]];else b=a[v.status],v.then(b,b)}return this},d.url=((a||d.url)+"").replace(bE,"").replace(bJ,bU[1]+"//"),d.dataTypes=f.trim(d.dataType||"*").toLowerCase().split(bN),d.crossDomain==null&&(r=bP.exec(d.url.toLowerCase()),d.crossDomain=!(!r||r[1]==bU[1]&&r[2]==bU[2]&&(r[3]||(r[1]==="http:"?80:443))==(bU[3]||(bU[1]==="http:"?80:443)))),d.data&&d.processData&&typeof d.data!="string"&&(d.data=f.param(d.data,d.traditional)),bX(bR,d,c,v);if(s===2)return!1;t=d.global,d.type=d.type.toUpperCase(),d.hasContent=!bI.test(d.type),t&&f.active++===0&&f.event.trigger("ajaxStart");if(!d.hasContent){d.data&&(d.url+=(bK.test(d.url)?"&":"?")+d.data),k=d.url;if(d.cache===!1){var x=f.now(),y=d.url.replace(bO,"$1_="+x);d.url=y+(y===d.url?(bK.test(d.url)?"&":"?")+"_="+x:"")}}(d.data&&d.hasContent&&d.contentType!==!1||c.contentType)&&v.setRequestHeader("Content-Type",d.contentType),d.ifModified&&(k=k||d.url,f.lastModified[k]&&v.setRequestHeader("If-Modified-Since",f.lastModified[k]),f.etag[k]&&v.setRequestHeader("If-None-Match",f.etag[k])),v.setRequestHeader("Accept",d.dataTypes[0]&&d.accepts[d.dataTypes[0]]?d.accepts[d.dataTypes[0]]+(d.dataTypes[0]!=="*"?", */*; q=0.01":""):d.accepts["*"]);for(u in d.headers)v.setRequestHeader(u,d.headers[u]);if(d.beforeSend&&(d.beforeSend.call(e,v,d)===!1||s===2)){v.abort();return!1}for(u in{success:1,error:1,complete:1})v[u](d[u]);p=bX(bS,d,c,v);if(!p)w(-1,"No Transport");else{v.readyState=1,t&&g.trigger("ajaxSend",[v,d]),d.async&&d.timeout>0&&(q=setTimeout(function(){v.abort("timeout")},d.timeout));try{s=1,p.send(l,w)}catch(z){status<2?w(-1,z):f.error(z)}}return v},param:function(a,c){var d=[],e=function(a,b){b=f.isFunction(b)?b():b,d[d.length]=encodeURIComponent(a)+"="+encodeURIComponent(b)};c===b&&(c=f.ajaxSettings.traditional);if(f.isArray(a)||a.jquery&&!f.isPlainObject(a))f.each(a,function(){e(this.name,this.value)});else for(var g in a)bY(g,a[g],c,e);return d.join("&").replace(bB,"+")}}),f.extend({active:0,lastModified:{},etag:{}});var b_=f.now(),ca=/(\=)\?(&|$)|\?\?/i;f.ajaxSetup({jsonp:"callback",jsonpCallback:function(){return f.expando+"_"+b_++}}),f.ajaxPrefilter("json jsonp",function(b,c,d){var e=b.contentType==="application/x-www-form-urlencoded"&&typeof b.data=="string";if(b.dataTypes[0]==="jsonp"||b.jsonp!==!1&&(ca.test(b.url)||e&&ca.test(b.data))){var g,h=b.jsonpCallback=f.isFunction(b.jsonpCallback)?b.jsonpCallback():b.jsonpCallback,i=a[h],j=b.url,k=b.data,l="$1"+h+"$2";b.jsonp!==!1&&(j=j.replace(ca,l),b.url===j&&(e&&(k=k.replace(ca,l)),b.data===k&&(j+=(/\?/.test(j)?"&":"?")+b.jsonp+"="+h))),b.url=j,b.data=k,a[h]=function(a){g=[a]},d.always(function(){a[h]=i,g&&f.isFunction(i)&&a[h](g[0])}),b.converters["script json"]=function(){g||f.error(h+" was not called");return g[0]},b.dataTypes[0]="json";return"script"}}),f.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/javascript|ecmascript/},converters:{"text script":function(a){f.globalEval(a);return a}}}),f.ajaxPrefilter("script",function(a){a.cache===b&&(a.cache=!1),a.crossDomain&&(a.type="GET",a.global=!1)}),f.ajaxTransport("script",function(a){if(a.crossDomain){var d,e=c.head||c.getElementsByTagName("head")[0]||c.documentElement;return{send:function(f,g){d=c.createElement("script"),d.async="async",a.scriptCharset&&(d.charset=a.scriptCharset),d.src=a.url,d.onload=d.onreadystatechange=function(a,c){if(c||!d.readyState||/loaded|complete/.test(d.readyState))d.onload=d.onreadystatechange=null,e&&d.parentNode&&e.removeChild(d),d=b,c||g(200,"success")},e.insertBefore(d,e.firstChild)},abort:function(){d&&d.onload(0,1)}}}});var cb=a.ActiveXObject?function(){for(var a in cd)cd[a](0,1)}:!1,cc=0,cd;f.ajaxSettings.xhr=a.ActiveXObject?function(){return!this.isLocal&&ce()||cf()}:ce,function(a){f.extend(f.support,{ajax:!!a,cors:!!a&&"withCredentials"in a})}(f.ajaxSettings.xhr()),f.support.ajax&&f.ajaxTransport(function(c){if(!c.crossDomain||f.support.cors){var d;return{send:function(e,g){var h=c.xhr(),i,j;c.username?h.open(c.type,c.url,c.async,c.username,c.password):h.open(c.type,c.url,c.async);if(c.xhrFields)for(j in c.xhrFields)h[j]=c.xhrFields[j];c.mimeType&&h.overrideMimeType&&h.overrideMimeType(c.mimeType),!c.crossDomain&&!e["X-Requested-With"]&&(e["X-Requested-With"]="XMLHttpRequest");try{for(j in e)h.setRequestHeader(j,e[j])}catch(k){}h.send(c.hasContent&&c.data||null),d=function(a,e){var j,k,l,m,n;try{if(d&&(e||h.readyState===4)){d=b,i&&(h.onreadystatechange=f.noop,cb&&delete cd[i]);if(e)h.readyState!==4&&h.abort();else{j=h.status,l=h.getAllResponseHeaders(),m={},n=h.responseXML,n&&n.documentElement&&(m.xml=n),m.text=h.responseText;try{k=h.statusText}catch(o){k=""}!j&&c.isLocal&&!c.crossDomain?j=m.text?200:404:j===1223&&(j=204)}}}catch(p){e||g(-1,p)}m&&g(j,k,m,l)},!c.async||h.readyState===4?d():(i=++cc,cb&&(cd||(cd={},f(a).unload(cb)),cd[i]=d),h.onreadystatechange=d)},abort:function(){d&&d(0,1)}}}});var cg={},ch,ci,cj=/^(?:toggle|show|hide)$/,ck=/^([+\-]=)?([\d+.\-]+)([a-z%]*)$/i,cl,cm=[["height","marginTop","marginBottom","paddingTop","paddingBottom"],["width","marginLeft","marginRight","paddingLeft","paddingRight"],["opacity"]],cn,co=a.webkitRequestAnimationFrame||a.mozRequestAnimationFrame||a.oRequestAnimationFrame;f.fn.extend({show:function(a,b,c){var d,e;if(a||a===0)return this.animate(cr("show",3),a,b,c);for(var g=0,h=this.length;g=e.duration+this.startTime){this.now=this.end,this.pos=this.state=1,this.update(),e.animatedProperties[this.prop]=!0;for(g in e.animatedProperties)e.animatedProperties[g]!==!0&&(c=!1);if(c){e.overflow!=null&&!f.support.shrinkWrapBlocks&&f.each(["","X","Y"],function(a,b){d.style["overflow"+b]=e.overflow[a]}),e.hide&&f(d).hide();if(e.hide||e.show)for(var i in e.animatedProperties)f.style(d,i,e.orig[i]);e.complete.call(d)}return!1}e.duration==Infinity?this.now=b:(h=b-this.startTime,this.state=h/e.duration,this.pos=f.easing[e.animatedProperties[this.prop]](this.state,h,0,1,e.duration),this.now=this.start+(this.end-this.start)*this.pos),this.update();return!0}},f.extend(f.fx,{tick:function(){for(var a=f.timers,b=0;b
";f.extend(b.style,{position:"absolute",top:0,left:0,margin:0,border:0,width:"1px",height:"1px",visibility:"hidden"}),b.innerHTML=j,a.insertBefore(b,a.firstChild),d=b.firstChild,e=d.firstChild,h=d.nextSibling.firstChild.firstChild,this.doesNotAddBorder=e.offsetTop!==5,this.doesAddBorderForTableAndCells=h.offsetTop===5,e.style.position="fixed",e.style.top="20px",this.supportsFixedPosition=e.offsetTop===20||e.offsetTop===15,e.style.position=e.style.top="",d.style.overflow="hidden",d.style.position="relative",this.subtractsBorderForOverflowNotVisible=e.offsetTop===-5,this.doesNotIncludeMarginInBodyOffset=a.offsetTop!==i,a.removeChild(b),f.offset.initialize=f.noop},bodyOffset:function(a){var b=a.offsetTop,c=a.offsetLeft;f.offset.initialize(),f.offset.doesNotIncludeMarginInBodyOffset&&(b+=parseFloat(f.css(a,"marginTop"))||0,c+=parseFloat(f.css(a,"marginLeft"))||0);return{top:b,left:c}},setOffset:function(a,b,c){var d=f.css(a,"position");d==="static"&&(a.style.position="relative");var e=f(a),g=e.offset(),h=f.css(a,"top"),i=f.css(a,"left"),j=(d==="absolute"||d==="fixed")&&f.inArray("auto",[h,i])>-1,k={},l={},m,n;j?(l=e.position(),m=l.top,n=l.left):(m=parseFloat(h)||0,n=parseFloat(i)||0),f.isFunction(b)&&(b=b.call(a,c,g)),b.top!=null&&(k.top=b.top-g.top+m),b.left!=null&&(k.left=b.left-g.left+n),"using"in b?b.using.call(a,k):e.css(k)}},f.fn.extend({position:function(){if(!this[0])return null;var a=this[0],b=this.offsetParent(),c=this.offset(),d=cu.test(b[0].nodeName)?{top:0,left:0}:b.offset();c.top-=parseFloat(f.css(a,"marginTop"))||0,c.left-=parseFloat(f.css(a,"marginLeft"))||0,d.top+=parseFloat(f.css(b[0],"borderTopWidth"))||0,d.left+=parseFloat(f.css(b[0],"borderLeftWidth"))||0;return{top:c.top-d.top,left:c.left-d.left}},offsetParent:function(){return this.map(function(){var a=this.offsetParent||c.body;while(a&&!cu.test(a.nodeName)&&f.css(a,"position")==="static")a=a.offsetParent;return a})}}),f.each(["Left","Top"],function(a,c){var d="scroll"+c;f.fn[d]=function(c){var e,g;if(c===b){e=this[0];if(!e)return null;g=cv(e);return g?"pageXOffset"in g?g[a?"pageYOffset":"pageXOffset"]:f.support.boxModel&&g.document.documentElement[d]||g.document.body[d]:e[d]}return this.each(function(){g=cv(this),g?g.scrollTo(a?f(g).scrollLeft():c,a?c:f(g).scrollTop()):this[d]=c})}}),f.each(["Height","Width"],function(a,c){var d=c.toLowerCase();f.fn["inner"+c]=function(){var a=this[0];return a&&a.style?parseFloat(f.css(a,d,"padding")):null},f.fn["outer"+c]=function(a){var b=this[0];return b&&b.style?parseFloat(f.css(b,d,a?"margin":"border")):null},f.fn[d]=function(a){var e=this[0];if(!e)return a==null?null:this;if(f.isFunction(a))return this.each(function(b){var c=f(this);c[d](a.call(this,b,c[d]()))});if(f.isWindow(e)){var g=e.document.documentElement["client"+c];return e.document.compatMode==="CSS1Compat"&&g||e.document.body["client"+c]||g}if(e.nodeType===9)return Math.max(e.documentElement["client"+c],e.body["scroll"+c],e.documentElement["scroll"+c],e.body["offset"+c],e.documentElement["offset"+c]);if(a===b){var h=f.css(e,d),i=parseFloat(h);return f.isNaN(i)?h:i}return this.css(d,typeof a=="string"?a:a+"px")}}),a.jQuery=a.$=f})(window); +var hljs=new function(){function l(o){return o.replace(/&/gm,"&").replace(/"}while(x.length||y.length){var u=t().splice(0,1)[0];v+=l(w.substr(q,u.offset-q));q=u.offset;if(u.event=="start"){v+=r(u.node);s.push(u.node)}else{if(u.event=="stop"){var p=s.length;do{p--;var o=s[p];v+=("")}while(o!=u.node);s.splice(p,1);while(p'+l(K[0])+""}else{M+=l(K[0])}O=N.lR.lastIndex;K=N.lR.exec(L)}M+=l(L.substr(O,L.length-O));return M}function J(r,L){if(L.sL&&d[L.sL]){var K=f(L.sL,r);s+=K.keyword_count;return K.value}else{return E(r,L)}}function H(L,r){var K=L.cN?'':"";if(L.rB){p+=K;L.buffer=""}else{if(L.eB){p+=l(r)+K;L.buffer=""}else{p+=K;L.buffer=r}}B.push(L);A+=L.r}function D(N,K,P){var Q=B[B.length-1];if(P){p+=J(Q.buffer+N,Q);return false}var L=y(K,Q);if(L){p+=J(Q.buffer+N,Q);H(L,K);return L.rB}var r=v(B.length-1,K);if(r){var M=Q.cN?"":"";if(Q.rE){p+=J(Q.buffer+N,Q)+M}else{if(Q.eE){p+=J(Q.buffer+N,Q)+M+l(K)}else{p+=J(Q.buffer+N+K,Q)+M}}while(r>1){M=B[B.length-2].cN?"":"";p+=M;r--;B.length--}var O=B[B.length-1];B.length--;B[B.length-1].buffer="";if(O.starts){H(O.starts,"")}return Q.rE}if(w(K,Q)){throw"Illegal"}}var G=d[I];var B=[G.dM];var A=0;var s=0;var p="";try{var u=0;G.dM.buffer="";do{var x=q(C,u);var t=D(x[0],x[1],x[2]);u+=x[0].length;if(!t){u+=x[1].length}}while(!x[2]);if(B.length>1){throw"Illegal"}return{language:I,r:A,keyword_count:s,value:p}}catch(F){if(F=="Illegal"){return{language:null,r:0,keyword_count:0,value:l(C)}}else{throw F}}}function h(){function o(t,s,u){if(t.compiled){return}if(!u){t.bR=c(s,t.b?t.b:"\\B|\\b");if(!t.e&&!t.eW){t.e="\\B|\\b"}if(t.e){t.eR=c(s,t.e)}}if(t.i){t.iR=c(s,t.i)}if(t.r==undefined){t.r=1}if(t.k){t.lR=c(s,t.l||hljs.IR,true)}for(var r in t.k){if(!t.k.hasOwnProperty(r)){continue}if(t.k[r] instanceof Object){t.kG=t.k}else{t.kG={keyword:t.k}}break}if(!t.c){t.c=[]}t.compiled=true;for(var q=0;qx.keyword_count+x.r){x=u}if(u.keyword_count+u.r>w.keyword_count+w.r){x=w;w=u}}}var s=t.className;if(!s.match(w.language)){s=s?(s+" "+w.language):w.language}var o=b(t);if(o.length){var q=document.createElement("pre");q.innerHTML=w.value;w.value=k(o,b(q),A)}if(y){w.value=w.value.replace(/^((<[^>]+>|\t)+)/gm,function(B,E,D,C){return E.replace(/\t/g,y)})}if(p){w.value=w.value.replace(/\n/g,"
")}if(/MSIE [678]/.test(navigator.userAgent)&&t.tagName=="CODE"&&t.parentNode.tagName=="PRE"){var q=t.parentNode;var v=document.createElement("div");v.innerHTML="
"+w.value+"
";t=v.firstChild.firstChild;v.firstChild.cN=q.cN;q.parentNode.replaceChild(v.firstChild,q)}else{t.innerHTML=w.value}t.className=s;t.dataset={};t.dataset.result={language:w.language,kw:w.keyword_count,re:w.r};if(x&&x.language){t.dataset.second_best={language:x.language,kw:x.keyword_count,re:x.r}}}function j(){if(j.called){return}j.called=true;e();var q=document.getElementsByTagName("pre");for(var o=0;o|>=|>>|>>=|>>>|>>>=|\\?|\\[|\\{|\\(|\\^|\\^=|\\||\\|=|\\|\\||~";this.BE={b:"\\\\.",r:0};this.ASM={cN:"string",b:"'",e:"'",i:"\\n",c:[this.BE],r:0};this.QSM={cN:"string",b:'"',e:'"',i:"\\n",c:[this.BE],r:0};this.CLCM={cN:"comment",b:"//",e:"$"};this.CBLCLM={cN:"comment",b:"/\\*",e:"\\*/"};this.HCM={cN:"comment",b:"#",e:"$"};this.NM={cN:"number",b:this.NR,r:0};this.CNM={cN:"number",b:this.CNR,r:0};this.inherit=function(o,r){var q={};for(var p in o){q[p]=o[p]}if(r){for(var p in r){q[p]=r[p]}}return q}}();hljs.LANGUAGES.ruby=function(){var g="[a-zA-Z_][a-zA-Z0-9_]*(\\!|\\?)?";var a="[a-zA-Z_]\\w*[!?=]?|[-+~]\\@|<<|>>|=~|===?|<=>|[<>]=?|\\*\\*|[-/+%^&*~`|]|\\[\\]=?";var n={keyword:{and:1,"false":1,then:1,defined:1,module:1,"in":1,"return":1,redo:1,"if":1,BEGIN:1,retry:1,end:1,"for":1,"true":1,self:1,when:1,next:1,until:1,"do":1,begin:1,unless:1,END:1,rescue:1,nil:1,"else":1,"break":1,undef:1,not:1,"super":1,"class":1,"case":1,require:1,yield:1,alias:1,"while":1,ensure:1,elsif:1,or:1,def:1},keymethods:{__id__:1,__send__:1,abort:1,abs:1,"all?":1,allocate:1,ancestors:1,"any?":1,arity:1,assoc:1,at:1,at_exit:1,autoload:1,"autoload?":1,"between?":1,binding:1,binmode:1,"block_given?":1,call:1,callcc:1,caller:1,capitalize:1,"capitalize!":1,casecmp:1,"catch":1,ceil:1,center:1,chomp:1,"chomp!":1,chop:1,"chop!":1,chr:1,"class":1,class_eval:1,"class_variable_defined?":1,class_variables:1,clear:1,clone:1,close:1,close_read:1,close_write:1,"closed?":1,coerce:1,collect:1,"collect!":1,compact:1,"compact!":1,concat:1,"const_defined?":1,const_get:1,const_missing:1,const_set:1,constants:1,count:1,crypt:1,"default":1,default_proc:1,"delete":1,"delete!":1,delete_at:1,delete_if:1,detect:1,display:1,div:1,divmod:1,downcase:1,"downcase!":1,downto:1,dump:1,dup:1,each:1,each_byte:1,each_index:1,each_key:1,each_line:1,each_pair:1,each_value:1,each_with_index:1,"empty?":1,entries:1,eof:1,"eof?":1,"eql?":1,"equal?":1,"eval":1,exec:1,exit:1,"exit!":1,extend:1,fail:1,fcntl:1,fetch:1,fileno:1,fill:1,find:1,find_all:1,first:1,flatten:1,"flatten!":1,floor:1,flush:1,for_fd:1,foreach:1,fork:1,format:1,freeze:1,"frozen?":1,fsync:1,getc:1,gets:1,global_variables:1,grep:1,gsub:1,"gsub!":1,"has_key?":1,"has_value?":1,hash:1,hex:1,id:1,include:1,"include?":1,included_modules:1,index:1,indexes:1,indices:1,induced_from:1,inject:1,insert:1,inspect:1,instance_eval:1,instance_method:1,instance_methods:1,"instance_of?":1,"instance_variable_defined?":1,instance_variable_get:1,instance_variable_set:1,instance_variables:1,"integer?":1,intern:1,invert:1,ioctl:1,"is_a?":1,isatty:1,"iterator?":1,join:1,"key?":1,keys:1,"kind_of?":1,lambda:1,last:1,length:1,lineno:1,ljust:1,load:1,local_variables:1,loop:1,lstrip:1,"lstrip!":1,map:1,"map!":1,match:1,max:1,"member?":1,merge:1,"merge!":1,method:1,"method_defined?":1,method_missing:1,methods:1,min:1,module_eval:1,modulo:1,name:1,nesting:1,"new":1,next:1,"next!":1,"nil?":1,nitems:1,"nonzero?":1,object_id:1,oct:1,open:1,pack:1,partition:1,pid:1,pipe:1,pop:1,popen:1,pos:1,prec:1,prec_f:1,prec_i:1,print:1,printf:1,private_class_method:1,private_instance_methods:1,"private_method_defined?":1,private_methods:1,proc:1,protected_instance_methods:1,"protected_method_defined?":1,protected_methods:1,public_class_method:1,public_instance_methods:1,"public_method_defined?":1,public_methods:1,push:1,putc:1,puts:1,quo:1,raise:1,rand:1,rassoc:1,read:1,read_nonblock:1,readchar:1,readline:1,readlines:1,readpartial:1,rehash:1,reject:1,"reject!":1,remainder:1,reopen:1,replace:1,require:1,"respond_to?":1,reverse:1,"reverse!":1,reverse_each:1,rewind:1,rindex:1,rjust:1,round:1,rstrip:1,"rstrip!":1,scan:1,seek:1,select:1,send:1,set_trace_func:1,shift:1,singleton_method_added:1,singleton_methods:1,size:1,sleep:1,slice:1,"slice!":1,sort:1,"sort!":1,sort_by:1,split:1,sprintf:1,squeeze:1,"squeeze!":1,srand:1,stat:1,step:1,store:1,strip:1,"strip!":1,sub:1,"sub!":1,succ:1,"succ!":1,sum:1,superclass:1,swapcase:1,"swapcase!":1,sync:1,syscall:1,sysopen:1,sysread:1,sysseek:1,system:1,syswrite:1,taint:1,"tainted?":1,tell:1,test:1,"throw":1,times:1,to_a:1,to_ary:1,to_f:1,to_hash:1,to_i:1,to_int:1,to_io:1,to_proc:1,to_s:1,to_str:1,to_sym:1,tr:1,"tr!":1,tr_s:1,"tr_s!":1,trace_var:1,transpose:1,trap:1,truncate:1,"tty?":1,type:1,ungetc:1,uniq:1,"uniq!":1,unpack:1,unshift:1,untaint:1,untrace_var:1,upcase:1,"upcase!":1,update:1,upto:1,"value?":1,values:1,values_at:1,warn:1,write:1,write_nonblock:1,"zero?":1,zip:1}};var h={cN:"yardoctag",b:"@[A-Za-z]+"};var d={cN:"comment",b:"#",e:"$",c:[h]};var c={cN:"comment",b:"^\\=begin",e:"^\\=end",c:[h],r:10};var b={cN:"comment",b:"^__END__",e:"\\n$"};var u={cN:"subst",b:"#\\{",e:"}",l:g,k:n};var p=[hljs.BE,u];var s={cN:"string",b:"'",e:"'",c:p,r:0};var r={cN:"string",b:'"',e:'"',c:p,r:0};var q={cN:"string",b:"%[qw]?\\(",e:"\\)",c:p,r:10};var o={cN:"string",b:"%[qw]?\\[",e:"\\]",c:p,r:10};var m={cN:"string",b:"%[qw]?{",e:"}",c:p,r:10};var l={cN:"string",b:"%[qw]?<",e:">",c:p,r:10};var k={cN:"string",b:"%[qw]?/",e:"/",c:p,r:10};var j={cN:"string",b:"%[qw]?%",e:"%",c:p,r:10};var i={cN:"string",b:"%[qw]?-",e:"-",c:p,r:10};var t={cN:"string",b:"%[qw]?\\|",e:"\\|",c:p,r:10};var e={cN:"function",b:"\\bdef\\s+",e:" |$|;",l:g,k:n,c:[{cN:"title",b:a,l:g,k:n},{cN:"params",b:"\\(",e:"\\)",l:g,k:n},d,c,b]};var f={cN:"identifier",b:g,l:g,k:n,r:0};var v=[d,c,b,s,r,q,o,m,l,k,j,i,t,{cN:"class",b:"\\b(class|module)\\b",e:"$|;",k:{"class":1,module:1},c:[{cN:"title",b:"[A-Za-z_]\\w*(::\\w+)*(\\?|\\!)?",r:0},{cN:"inheritance",b:"<\\s*",c:[{cN:"parent",b:"("+hljs.IR+"::)?"+hljs.IR}]},d,c,b]},e,{cN:"constant",b:"(::)?([A-Z]\\w*(::)?)+",r:0},{cN:"symbol",b:":",c:[s,r,q,o,m,l,k,j,i,t,f],r:0},{cN:"number",b:"(\\b0[0-7_]+)|(\\b0x[0-9a-fA-F_]+)|(\\b[1-9][0-9_]*(\\.[0-9_]+)?)|[0_]\\b",r:0},{cN:"number",b:"\\?\\w"},{cN:"variable",b:"(\\$\\W)|((\\$|\\@\\@?)(\\w+))"},f,{b:"("+hljs.RSR+")\\s*",c:[d,c,b,{cN:"regexp",b:"/",e:"/[a-z]*",i:"\\n",c:[hljs.BE]}],r:0}];u.c=v;e.c[1].c=v;return{dM:{l:g,k:n,c:v}}}(); +// ColorBox v1.3.20.1 - jQuery lightbox plugin +// (c) 2011 Jack Moore - jacklmoore.com +// License: http://www.opensource.org/licenses/mit-license.php +(function ($, document, window) { + var + // Default settings object. + // See http://jacklmoore.com/colorbox for details. + defaults = { + transition: "elastic", + speed: 300, + width: false, + initialWidth: "600", + innerWidth: false, + maxWidth: false, + height: false, + initialHeight: "450", + innerHeight: false, + maxHeight: false, + scalePhotos: true, + scrolling: true, + inline: false, + html: false, + iframe: false, + fastIframe: true, + photo: false, + href: false, + title: false, + rel: false, + opacity: 0.9, + preloading: true, + + current: "image {current} of {total}", + previous: "previous", + next: "next", + close: "close", + xhrError: "This content failed to load.", + imgError: "This image failed to load.", + + open: false, + returnFocus: true, + reposition: true, + loop: true, + slideshow: false, + slideshowAuto: true, + slideshowSpeed: 2500, + slideshowStart: "start slideshow", + slideshowStop: "stop slideshow", + onOpen: false, + onLoad: false, + onComplete: false, + onCleanup: false, + onClosed: false, + overlayClose: true, + escKey: true, + arrowKey: true, + top: false, + bottom: false, + left: false, + right: false, + fixed: false, + data: undefined + }, + + // Abstracting the HTML and event identifiers for easy rebranding + colorbox = 'colorbox', + prefix = 'cbox', + boxElement = prefix + 'Element', + + // Events + event_open = prefix + '_open', + event_load = prefix + '_load', + event_complete = prefix + '_complete', + event_cleanup = prefix + '_cleanup', + event_closed = prefix + '_closed', + event_purge = prefix + '_purge', + + // Special Handling for IE + isIE = !$.support.opacity && !$.support.style, // IE7 & IE8 + isIE6 = isIE && !window.XMLHttpRequest, // IE6 + event_ie6 = prefix + '_IE6', + + // Cached jQuery Object Variables + $overlay, + $box, + $wrap, + $content, + $topBorder, + $leftBorder, + $rightBorder, + $bottomBorder, + $related, + $window, + $loaded, + $loadingBay, + $loadingOverlay, + $title, + $current, + $slideshow, + $next, + $prev, + $close, + $groupControls, + + // Variables for cached values or use across multiple functions + settings, + interfaceHeight, + interfaceWidth, + loadedHeight, + loadedWidth, + element, + index, + photo, + open, + active, + closing, + loadingTimer, + publicMethod, + div = "div", + init; + + // **************** + // HELPER FUNCTIONS + // **************** + + // Convience function for creating new jQuery objects + function $tag(tag, id, css) { + var element = document.createElement(tag); + + if (id) { + element.id = prefix + id; + } + + if (css) { + element.style.cssText = css; + } + + return $(element); + } + + // Determine the next and previous members in a group. + function getIndex(increment) { + var + max = $related.length, + newIndex = (index + increment) % max; + + return (newIndex < 0) ? max + newIndex : newIndex; + } + + // Convert '%' and 'px' values to integers + function setSize(size, dimension) { + return Math.round((/%/.test(size) ? ((dimension === 'x' ? winWidth() : winHeight()) / 100) : 1) * parseInt(size, 10)); + } + + // Checks an href to see if it is a photo. + // There is a force photo option (photo: true) for hrefs that cannot be matched by this regex. + function isImage(url) { + return settings.photo || /\.(gif|png|jp(e|g|eg)|bmp|ico)((#|\?).*)?$/i.test(url); + } + + function winWidth() { + // $(window).width() is incorrect for some mobile browsers, but + // window.innerWidth is unsupported in IE8 and lower. + return window.innerWidth || $window.width(); + } + + function winHeight() { + return window.innerHeight || $window.height(); + } + + // Assigns function results to their respective properties + function makeSettings() { + var i, + data = $.data(element, colorbox); + + if (data == null) { + settings = $.extend({}, defaults); + if (console && console.log) { + console.log('Error: cboxElement missing settings object'); + } + } else { + settings = $.extend({}, data); + } + + for (i in settings) { + if ($.isFunction(settings[i]) && i.slice(0, 2) !== 'on') { // checks to make sure the function isn't one of the callbacks, they will be handled at the appropriate time. + settings[i] = settings[i].call(element); + } + } + + settings.rel = settings.rel || element.rel || $(element).data('rel') || 'nofollow'; + settings.href = settings.href || $(element).attr('href'); + settings.title = settings.title || element.title; + + if (typeof settings.href === "string") { + settings.href = $.trim(settings.href); + } + } + + function trigger(event, callback) { + $.event.trigger(event); + if (callback) { + callback.call(element); + } + } + + // Slideshow functionality + function slideshow() { + var + timeOut, + className = prefix + "Slideshow_", + click = "click." + prefix, + start, + stop, + clear; + + if (settings.slideshow && $related[1]) { + start = function () { + $slideshow + .html(settings.slideshowStop) + .unbind(click) + .bind(event_complete, function () { + if (settings.loop || $related[index + 1]) { + timeOut = setTimeout(publicMethod.next, settings.slideshowSpeed); + } + }) + .bind(event_load, function () { + clearTimeout(timeOut); + }) + .one(click + ' ' + event_cleanup, stop); + $box.removeClass(className + "off").addClass(className + "on"); + timeOut = setTimeout(publicMethod.next, settings.slideshowSpeed); + }; + + stop = function () { + clearTimeout(timeOut); + $slideshow + .html(settings.slideshowStart) + .unbind([event_complete, event_load, event_cleanup, click].join(' ')) + .one(click, function () { + publicMethod.next(); + start(); + }); + $box.removeClass(className + "on").addClass(className + "off"); + }; + + if (settings.slideshowAuto) { + start(); + } else { + stop(); + } + } else { + $box.removeClass(className + "off " + className + "on"); + } + } + + function launch(target) { + if (!closing) { + + element = target; + + makeSettings(); + + $related = $(element); + + index = 0; + + if (settings.rel !== 'nofollow') { + $related = $('.' + boxElement).filter(function () { + var data = $.data(this, colorbox), + relRelated; + + if (data) { + relRelated = $(this).data('rel') || data.rel || this.rel; + } + + return (relRelated === settings.rel); + }); + index = $related.index(element); + + // Check direct calls to ColorBox. + if (index === -1) { + $related = $related.add(element); + index = $related.length - 1; + } + } + + if (!open) { + open = active = true; // Prevents the page-change action from queuing up if the visitor holds down the left or right keys. + + $box.show(); + + if (settings.returnFocus) { + $(element).blur().one(event_closed, function () { + $(this).focus(); + }); + } + + // +settings.opacity avoids a problem in IE when using non-zero-prefixed-string-values, like '.5' + $overlay.css({"opacity": +settings.opacity, "cursor": settings.overlayClose ? "pointer" : "auto"}).show(); + + // Opens inital empty ColorBox prior to content being loaded. + settings.w = setSize(settings.initialWidth, 'x'); + settings.h = setSize(settings.initialHeight, 'y'); + publicMethod.position(); + + if (isIE6) { + $window.bind('resize.' + event_ie6 + ' scroll.' + event_ie6, function () { + $overlay.css({width: winWidth(), height: winHeight(), top: $window.scrollTop(), left: $window.scrollLeft()}); + }).trigger('resize.' + event_ie6); + } + + trigger(event_open, settings.onOpen); + + $groupControls.add($title).hide(); + + $close.html(settings.close).show(); + } + + publicMethod.load(true); + } + } + + // ColorBox's markup needs to be added to the DOM prior to being called + // so that the browser will go ahead and load the CSS background images. + function appendHTML() { + if (!$box && document.body) { + init = false; + + $window = $(window); + $box = $tag(div).attr({id: colorbox, 'class': isIE ? prefix + (isIE6 ? 'IE6' : 'IE') : ''}).hide(); + $overlay = $tag(div, "Overlay", isIE6 ? 'position:absolute' : '').hide(); + $loadingOverlay = $tag(div, "LoadingOverlay").add($tag(div, "LoadingGraphic")); + $wrap = $tag(div, "Wrapper"); + $content = $tag(div, "Content").append( + $loaded = $tag(div, "LoadedContent", 'width:0; height:0; overflow:hidden'), + $title = $tag(div, "Title"), + $current = $tag(div, "Current"), + $next = $tag(div, "Next"), + $prev = $tag(div, "Previous"), + $slideshow = $tag(div, "Slideshow").bind(event_open, slideshow), + $close = $tag(div, "Close") + ); + + $wrap.append( // The 3x3 Grid that makes up ColorBox + $tag(div).append( + $tag(div, "TopLeft"), + $topBorder = $tag(div, "TopCenter"), + $tag(div, "TopRight") + ), + $tag(div, false, 'clear:left').append( + $leftBorder = $tag(div, "MiddleLeft"), + $content, + $rightBorder = $tag(div, "MiddleRight") + ), + $tag(div, false, 'clear:left').append( + $tag(div, "BottomLeft"), + $bottomBorder = $tag(div, "BottomCenter"), + $tag(div, "BottomRight") + ) + ).find('div div').css({'float': 'left'}); + + $loadingBay = $tag(div, false, 'position:absolute; width:9999px; visibility:hidden; display:none'); + + $groupControls = $next.add($prev).add($current).add($slideshow); + + $(document.body).append($overlay, $box.append($wrap, $loadingBay)); + } + } + + // Add ColorBox's event bindings + function addBindings() { + if ($box) { + if (!init) { + init = true; + + // Cache values needed for size calculations + interfaceHeight = $topBorder.height() + $bottomBorder.height() + $content.outerHeight(true) - $content.height();//Subtraction needed for IE6 + interfaceWidth = $leftBorder.width() + $rightBorder.width() + $content.outerWidth(true) - $content.width(); + loadedHeight = $loaded.outerHeight(true); + loadedWidth = $loaded.outerWidth(true); + + // Setting padding to remove the need to do size conversions during the animation step. + $box.css({"padding-bottom": interfaceHeight, "padding-right": interfaceWidth}); + + // Anonymous functions here keep the public method from being cached, thereby allowing them to be redefined on the fly. + $next.click(function () { + publicMethod.next(); + }); + $prev.click(function () { + publicMethod.prev(); + }); + $close.click(function () { + publicMethod.close(); + }); + $overlay.click(function () { + if (settings.overlayClose) { + publicMethod.close(); + } + }); + + // Key Bindings + $(document).bind('keydown.' + prefix, function (e) { + var key = e.keyCode; + if (open && settings.escKey && key === 27) { + e.preventDefault(); + publicMethod.close(); + } + if (open && settings.arrowKey && $related[1]) { + if (key === 37) { + e.preventDefault(); + $prev.click(); + } else if (key === 39) { + e.preventDefault(); + $next.click(); + } + } + }); + + $('.' + boxElement, document).live('click', function (e) { + // ignore non-left-mouse-clicks and clicks modified with ctrl / command, shift, or alt. + // See: http://jacklmoore.com/notes/click-events/ + if (!(e.which > 1 || e.shiftKey || e.altKey || e.metaKey)) { + e.preventDefault(); + launch(this); + } + }); + } + return true; + } + return false; + } + + // Don't do anything if ColorBox already exists. + if ($.colorbox) { + return; + } + + // Append the HTML when the DOM loads + $(appendHTML); + + + // **************** + // PUBLIC FUNCTIONS + // Usage format: $.fn.colorbox.close(); + // Usage from within an iframe: parent.$.fn.colorbox.close(); + // **************** + + publicMethod = $.fn[colorbox] = $[colorbox] = function (options, callback) { + var $this = this; + + options = options || {}; + + appendHTML(); + + if (addBindings()) { + if (!$this[0]) { + if ($this.selector) { // if a selector was given and it didn't match any elements, go ahead and exit. + return $this; + } + // if no selector was given (ie. $.colorbox()), create a temporary element to work with + $this = $(''); + options.open = true; // assume an immediate open + } + + if (callback) { + options.onComplete = callback; + } + + $this.each(function () { + $.data(this, colorbox, $.extend({}, $.data(this, colorbox) || defaults, options)); + }).addClass(boxElement); + + if (($.isFunction(options.open) && options.open.call($this)) || options.open) { + launch($this[0]); + } + } + + return $this; + }; + + publicMethod.position = function (speed, loadedCallback) { + var + css, + top = 0, + left = 0, + offset = $box.offset(), + scrollTop, + scrollLeft; + + $window.unbind('resize.' + prefix); + + // remove the modal so that it doesn't influence the document width/height + $box.css({top: -9e4, left: -9e4}); + + scrollTop = $window.scrollTop(); + scrollLeft = $window.scrollLeft(); + + if (settings.fixed && !isIE6) { + offset.top -= scrollTop; + offset.left -= scrollLeft; + $box.css({position: 'fixed'}); + } else { + top = scrollTop; + left = scrollLeft; + $box.css({position: 'absolute'}); + } + + // keeps the top and left positions within the browser's viewport. + if (settings.right !== false) { + left += Math.max(winWidth() - settings.w - loadedWidth - interfaceWidth - setSize(settings.right, 'x'), 0); + } else if (settings.left !== false) { + left += setSize(settings.left, 'x'); + } else { + left += Math.round(Math.max(winWidth() - settings.w - loadedWidth - interfaceWidth, 0) / 2); + } + + if (settings.bottom !== false) { + top += Math.max(winHeight() - settings.h - loadedHeight - interfaceHeight - setSize(settings.bottom, 'y'), 0); + } else if (settings.top !== false) { + top += setSize(settings.top, 'y'); + } else { + top += Math.round(Math.max(winHeight() - settings.h - loadedHeight - interfaceHeight, 0) / 2); + } + + $box.css({top: offset.top, left: offset.left}); + + // setting the speed to 0 to reduce the delay between same-sized content. + speed = ($box.width() === settings.w + loadedWidth && $box.height() === settings.h + loadedHeight) ? 0 : speed || 0; + + // this gives the wrapper plenty of breathing room so it's floated contents can move around smoothly, + // but it has to be shrank down around the size of div#colorbox when it's done. If not, + // it can invoke an obscure IE bug when using iframes. + $wrap[0].style.width = $wrap[0].style.height = "9999px"; + + function modalDimensions(that) { + $topBorder[0].style.width = $bottomBorder[0].style.width = $content[0].style.width = that.style.width; + $content[0].style.height = $leftBorder[0].style.height = $rightBorder[0].style.height = that.style.height; + } + + css = {width: settings.w + loadedWidth, height: settings.h + loadedHeight, top: top, left: left}; + if(speed===0){ // temporary workaround to side-step jQuery-UI 1.8 bug (http://bugs.jquery.com/ticket/12273) + $box.css(css); + } + $box.dequeue().animate(css, { + duration: speed, + complete: function () { + modalDimensions(this); + + active = false; + + // shrink the wrapper down to exactly the size of colorbox to avoid a bug in IE's iframe implementation. + $wrap[0].style.width = (settings.w + loadedWidth + interfaceWidth) + "px"; + $wrap[0].style.height = (settings.h + loadedHeight + interfaceHeight) + "px"; + + if (settings.reposition) { + setTimeout(function () { // small delay before binding onresize due to an IE8 bug. + $window.bind('resize.' + prefix, publicMethod.position); + }, 1); + } + + if (loadedCallback) { + loadedCallback(); + } + }, + step: function () { + modalDimensions(this); + } + }); + }; + + publicMethod.resize = function (options) { + if (open) { + options = options || {}; + + if (options.width) { + settings.w = setSize(options.width, 'x') - loadedWidth - interfaceWidth; + } + if (options.innerWidth) { + settings.w = setSize(options.innerWidth, 'x'); + } + $loaded.css({width: settings.w}); + + if (options.height) { + settings.h = setSize(options.height, 'y') - loadedHeight - interfaceHeight; + } + if (options.innerHeight) { + settings.h = setSize(options.innerHeight, 'y'); + } + if (!options.innerHeight && !options.height) { + $loaded.css({height: "auto"}); + settings.h = $loaded.height(); + } + $loaded.css({height: settings.h}); + + publicMethod.position(settings.transition === "none" ? 0 : settings.speed); + } + }; + + publicMethod.prep = function (object) { + if (!open) { + return; + } + + var callback, speed = settings.transition === "none" ? 0 : settings.speed; + + $loaded.remove(); + $loaded = $tag(div, 'LoadedContent').append(object); + + function getWidth() { + settings.w = settings.w || $loaded.width(); + settings.w = settings.mw && settings.mw < settings.w ? settings.mw : settings.w; + return settings.w; + } + function getHeight() { + settings.h = settings.h || $loaded.height(); + settings.h = settings.mh && settings.mh < settings.h ? settings.mh : settings.h; + return settings.h; + } + + $loaded.hide() + .appendTo($loadingBay.show())// content has to be appended to the DOM for accurate size calculations. + .css({width: getWidth(), overflow: settings.scrolling ? 'auto' : 'hidden'}) + .css({height: getHeight()})// sets the height independently from the width in case the new width influences the value of height. + .prependTo($content); + + $loadingBay.hide(); + + // floating the IMG removes the bottom line-height and fixed a problem where IE miscalculates the width of the parent element as 100% of the document width. + //$(photo).css({'float': 'none', marginLeft: 'auto', marginRight: 'auto'}); + + $(photo).css({'float': 'none'}); + + // Hides SELECT elements in IE6 because they would otherwise sit on top of the overlay. + if (isIE6) { + $('select').not($box.find('select')).filter(function () { + return this.style.visibility !== 'hidden'; + }).css({'visibility': 'hidden'}).one(event_cleanup, function () { + this.style.visibility = 'inherit'; + }); + } + + callback = function () { + var preload, + i, + total = $related.length, + iframe, + frameBorder = 'frameBorder', + allowTransparency = 'allowTransparency', + complete, + src, + img, + data; + + if (!open) { + return; + } + + function removeFilter() { + if (isIE) { + $box[0].style.removeAttribute('filter'); + } + } + + complete = function () { + clearTimeout(loadingTimer); + // Detaching forces Andriod stock browser to redraw the area underneat the loading overlay. Hiding alone isn't enough. + $loadingOverlay.detach().hide(); + trigger(event_complete, settings.onComplete); + }; + + if (isIE) { + //This fadeIn helps the bicubic resampling to kick-in. + if (photo) { + $loaded.fadeIn(100); + } + } + + $title.html(settings.title).add($loaded).show(); + + if (total > 1) { // handle grouping + if (typeof settings.current === "string") { + $current.html(settings.current.replace('{current}', index + 1).replace('{total}', total)).show(); + } + + $next[(settings.loop || index < total - 1) ? "show" : "hide"]().html(settings.next); + $prev[(settings.loop || index) ? "show" : "hide"]().html(settings.previous); + + if (settings.slideshow) { + $slideshow.show(); + } + + // Preloads images within a rel group + if (settings.preloading) { + preload = [ + getIndex(-1), + getIndex(1) + ]; + while (i = $related[preload.pop()]) { + data = $.data(i, colorbox); + + if (data && data.href) { + src = data.href; + if ($.isFunction(src)) { + src = src.call(i); + } + } else { + src = i.href; + } + + if (isImage(src)) { + img = new Image(); + img.src = src; + } + } + } + } else { + $groupControls.hide(); + } + + if (settings.iframe) { + iframe = $tag('iframe')[0]; + + if (frameBorder in iframe) { + iframe[frameBorder] = 0; + } + + if (allowTransparency in iframe) { + iframe[allowTransparency] = "true"; + } + + if (!settings.scrolling) { + iframe.scrolling = "no"; + } + + $(iframe) + .attr({ + src: settings.href, + name: (new Date()).getTime(), // give the iframe a unique name to prevent caching + 'class': prefix + 'Iframe', + allowFullScreen : true, // allow HTML5 video to go fullscreen + webkitAllowFullScreen : true, + mozallowfullscreen : true + }) + .one('load', complete) + .one(event_purge, function () { + iframe.src = "//about:blank"; + }) + .appendTo($loaded); + + if (settings.fastIframe) { + $(iframe).trigger('load'); + } + } else { + complete(); + } + + if (settings.transition === 'fade') { + $box.fadeTo(speed, 1, removeFilter); + } else { + removeFilter(); + } + }; + + if (settings.transition === 'fade') { + $box.fadeTo(speed, 0, function () { + publicMethod.position(0, callback); + }); + } else { + publicMethod.position(speed, callback); + } + }; + + publicMethod.load = function (launched) { + var href, setResize, prep = publicMethod.prep; + + active = true; + + photo = false; + + element = $related[index]; + + if (!launched) { + makeSettings(); + } + + trigger(event_purge); + + trigger(event_load, settings.onLoad); + + settings.h = settings.height ? + setSize(settings.height, 'y') - loadedHeight - interfaceHeight : + settings.innerHeight && setSize(settings.innerHeight, 'y'); + + settings.w = settings.width ? + setSize(settings.width, 'x') - loadedWidth - interfaceWidth : + settings.innerWidth && setSize(settings.innerWidth, 'x'); + + // Sets the minimum dimensions for use in image scaling + settings.mw = settings.w; + settings.mh = settings.h; + + // Re-evaluate the minimum width and height based on maxWidth and maxHeight values. + // If the width or height exceed the maxWidth or maxHeight, use the maximum values instead. + if (settings.maxWidth) { + settings.mw = setSize(settings.maxWidth, 'x') - loadedWidth - interfaceWidth; + settings.mw = settings.w && settings.w < settings.mw ? settings.w : settings.mw; + } + if (settings.maxHeight) { + settings.mh = setSize(settings.maxHeight, 'y') - loadedHeight - interfaceHeight; + settings.mh = settings.h && settings.h < settings.mh ? settings.h : settings.mh; + } + + href = settings.href; + + loadingTimer = setTimeout(function () { + $loadingOverlay.show().appendTo($content); + }, 100); + + if (settings.inline) { + // Inserts an empty placeholder where inline content is being pulled from. + // An event is bound to put inline content back when ColorBox closes or loads new content. + $tag(div).hide().insertBefore($(href)[0]).one(event_purge, function () { + $(this).replaceWith($loaded.children()); + }); + prep($(href)); + } else if (settings.iframe) { + // IFrame element won't be added to the DOM until it is ready to be displayed, + // to avoid problems with DOM-ready JS that might be trying to run in that iframe. + prep(" "); + } else if (settings.html) { + prep(settings.html); + } else if (isImage(href)) { + $(photo = new Image()) + .addClass(prefix + 'Photo') + .error(function () { + settings.title = false; + prep($tag(div, 'Error').html(settings.imgError)); + }) + .load(function () { + var percent; + photo.onload = null; //stops animated gifs from firing the onload repeatedly. + + if (settings.scalePhotos) { + setResize = function () { + photo.height -= photo.height * percent; + photo.width -= photo.width * percent; + }; + if (settings.mw && photo.width > settings.mw) { + percent = (photo.width - settings.mw) / photo.width; + setResize(); + } + if (settings.mh && photo.height > settings.mh) { + percent = (photo.height - settings.mh) / photo.height; + setResize(); + } + } + + if (settings.h) { + photo.style.marginTop = Math.max(settings.h - photo.height, 0) / 2 + 'px'; + } + + if ($related[1] && (settings.loop || $related[index + 1])) { + photo.style.cursor = 'pointer'; + photo.onclick = function () { + publicMethod.next(); + }; + } + + if (isIE) { + photo.style.msInterpolationMode = 'bicubic'; + } + + setTimeout(function () { // A pause because Chrome will sometimes report a 0 by 0 size otherwise. + prep(photo); + }, 1); + }); + + setTimeout(function () { // A pause because Opera 10.6+ will sometimes not run the onload function otherwise. + photo.src = href; + }, 1); + } else if (href) { + $loadingBay.load(href, settings.data, function (data, status, xhr) { + prep(status === 'error' ? $tag(div, 'Error').html(settings.xhrError) : $(this).contents()); + }); + } + }; + + // Navigates to the next page/image in a set. + publicMethod.next = function () { + if (!active && $related[1] && (settings.loop || $related[index + 1])) { + index = getIndex(1); + publicMethod.load(); + } + }; + + publicMethod.prev = function () { + if (!active && $related[1] && (settings.loop || index)) { + index = getIndex(-1); + publicMethod.load(); + } + }; + + // Note: to use this within an iframe use the following format: parent.$.fn.colorbox.close(); + publicMethod.close = function () { + if (open && !closing) { + + closing = true; + + open = false; + + trigger(event_cleanup, settings.onCleanup); + + $window.unbind('.' + prefix + ' .' + event_ie6); + + $overlay.fadeTo(200, 0); + + $box.stop().fadeTo(300, 0, function () { + + $box.add($overlay).css({'opacity': 1, cursor: 'auto'}).hide(); + + trigger(event_purge); + + $loaded.remove(); + + setTimeout(function () { + closing = false; + trigger(event_closed, settings.onClosed); + }, 1); + }); + } + }; + + // Removes changes ColorBox made to the document, but does not remove the plugin + // from jQuery. + publicMethod.remove = function () { + $([]).add($box).add($overlay).remove(); + $box = null; + $('.' + boxElement) + .removeData(colorbox) + .removeClass(boxElement) + .die(); + }; + + // A method for fetching the current element ColorBox is referencing. + // returns a jQuery object. + publicMethod.element = function () { + return $(element); + }; + + publicMethod.settings = defaults; + +}(jQuery, document, window)); +/* + * File: jquery.dataTables.min.js + * Version: 1.7.0 + * Author: Allan Jardine (www.sprymedia.co.uk) + * Info: www.datatables.net + * + * Copyright 2008-2010 Allan Jardine, all rights reserved. + * + * This source file is free software, under either the GPL v2 license or a + * BSD style license, as supplied with this software. + * + * This source file 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 license files for details. + */ + +(function(j,Y,p){j.fn.dataTableSettings=[];var E=j.fn.dataTableSettings;j.fn.dataTableExt={};var m=j.fn.dataTableExt;m.sVersion="1.7.0";m.sErrMode="alert";m.iApiIndex=0;m.oApi={};m.afnFiltering=[];m.aoFeatures=[];m.ofnSearch={};m.afnSortData=[];m.oStdClasses={sPagePrevEnabled:"paginate_enabled_previous",sPagePrevDisabled:"paginate_disabled_previous",sPageNextEnabled:"paginate_enabled_next",sPageNextDisabled:"paginate_disabled_next",sPageJUINext:"",sPageJUIPrev:"",sPageButton:"paginate_button",sPageButtonActive:"paginate_active", +sPageButtonStaticDisabled:"paginate_button",sPageFirst:"first",sPagePrevious:"previous",sPageNext:"next",sPageLast:"last",sStripOdd:"odd",sStripEven:"even",sRowEmpty:"dataTables_empty",sWrapper:"dataTables_wrapper",sFilter:"dataTables_filter",sInfo:"dataTables_info",sPaging:"dataTables_paginate paging_",sLength:"dataTables_length",sProcessing:"dataTables_processing",sSortAsc:"sorting_asc",sSortDesc:"sorting_desc",sSortable:"sorting",sSortableAsc:"sorting_asc_disabled",sSortableDesc:"sorting_desc_disabled", +sSortableNone:"sorting_disabled",sSortColumn:"sorting_",sSortJUIAsc:"",sSortJUIDesc:"",sSortJUI:"",sSortJUIAscAllowed:"",sSortJUIDescAllowed:"",sScrollWrapper:"dataTables_scroll",sScrollHead:"dataTables_scrollHead",sScrollHeadInner:"dataTables_scrollHeadInner",sScrollBody:"dataTables_scrollBody",sScrollFoot:"dataTables_scrollFoot",sScrollFootInner:"dataTables_scrollFootInner",sFooterTH:""};m.oJUIClasses={sPagePrevEnabled:"fg-button ui-state-default ui-corner-left",sPagePrevDisabled:"fg-button ui-state-default ui-corner-left ui-state-disabled", +sPageNextEnabled:"fg-button ui-state-default ui-corner-right",sPageNextDisabled:"fg-button ui-state-default ui-corner-right ui-state-disabled",sPageJUINext:"ui-icon ui-icon-circle-arrow-e",sPageJUIPrev:"ui-icon ui-icon-circle-arrow-w",sPageButton:"fg-button ui-state-default",sPageButtonActive:"fg-button ui-state-default ui-state-disabled",sPageButtonStaticDisabled:"fg-button ui-state-default ui-state-disabled",sPageFirst:"first ui-corner-tl ui-corner-bl",sPagePrevious:"previous",sPageNext:"next", +sPageLast:"last ui-corner-tr ui-corner-br",sStripOdd:"odd",sStripEven:"even",sRowEmpty:"dataTables_empty",sWrapper:"dataTables_wrapper",sFilter:"dataTables_filter",sInfo:"dataTables_info",sPaging:"dataTables_paginate fg-buttonset fg-buttonset-multi paging_",sLength:"dataTables_length",sProcessing:"dataTables_processing",sSortAsc:"ui-state-default",sSortDesc:"ui-state-default",sSortable:"ui-state-default",sSortableAsc:"ui-state-default",sSortableDesc:"ui-state-default",sSortableNone:"ui-state-default", +sSortColumn:"sorting_",sSortJUIAsc:"css_right ui-icon ui-icon-triangle-1-n",sSortJUIDesc:"css_right ui-icon ui-icon-triangle-1-s",sSortJUI:"css_right ui-icon ui-icon-carat-2-n-s",sSortJUIAscAllowed:"css_right ui-icon ui-icon-carat-1-n",sSortJUIDescAllowed:"css_right ui-icon ui-icon-carat-1-s",sScrollWrapper:"dataTables_scroll",sScrollHead:"dataTables_scrollHead ui-state-default",sScrollHeadInner:"dataTables_scrollHeadInner",sScrollBody:"dataTables_scrollBody",sScrollFoot:"dataTables_scrollFoot ui-state-default", +sScrollFootInner:"dataTables_scrollFootInner",sFooterTH:"ui-state-default"};m.oPagination={two_button:{fnInit:function(g,l,q){var r,u,y;if(g.bJUI){r=p.createElement("a");u=p.createElement("a");y=p.createElement("span");y.className=g.oClasses.sPageJUINext;u.appendChild(y);y=p.createElement("span");y.className=g.oClasses.sPageJUIPrev;r.appendChild(y)}else{r=p.createElement("div");u=p.createElement("div")}r.className=g.oClasses.sPagePrevDisabled;u.className=g.oClasses.sPageNextDisabled;r.title=g.oLanguage.oPaginate.sPrevious; +u.title=g.oLanguage.oPaginate.sNext;l.appendChild(r);l.appendChild(u);j(r).click(function(){g.oApi._fnPageChange(g,"previous")&&q(g)});j(u).click(function(){g.oApi._fnPageChange(g,"next")&&q(g)});j(r).bind("selectstart",function(){return false});j(u).bind("selectstart",function(){return false});if(g.sTableId!==""&&typeof g.aanFeatures.p=="undefined"){l.setAttribute("id",g.sTableId+"_paginate");r.setAttribute("id",g.sTableId+"_previous");u.setAttribute("id",g.sTableId+"_next")}},fnUpdate:function(g){if(g.aanFeatures.p)for(var l= +g.aanFeatures.p,q=0,r=l.length;q=u-r){r=u-q+1;w=u}else{r=y-Math.ceil(q/2)+1;w=r+q-1}for(q=r;q<=w;q++)C+=y!=q?''+q+"":''+q+"";w=g.aanFeatures.p;var z,D=function(){g._iDisplayStart= +(this.innerHTML*1-1)*g._iDisplayLength;l(g);return false},L=function(){return false};q=0;for(r=w.length;ql?1:0},"string-desc":function(g,l){g=g.toLowerCase();l=l.toLowerCase();return gl?-1:0},"html-asc":function(g,l){g=g.replace(/<.*?>/g,"").toLowerCase(); +l=l.replace(/<.*?>/g,"").toLowerCase();return gl?1:0},"html-desc":function(g,l){g=g.replace(/<.*?>/g,"").toLowerCase();l=l.replace(/<.*?>/g,"").toLowerCase();return gl?-1:0},"date-asc":function(g,l){g=Date.parse(g);l=Date.parse(l);if(isNaN(g)||g==="")g=Date.parse("01/01/1970 00:00:00");if(isNaN(l)||l==="")l=Date.parse("01/01/1970 00:00:00");return g-l},"date-desc":function(g,l){g=Date.parse(g);l=Date.parse(l);if(isNaN(g)||g==="")g=Date.parse("01/01/1970 00:00:00");if(isNaN(l)||l=== +"")l=Date.parse("01/01/1970 00:00:00");return l-g},"numeric-asc":function(g,l){return(g=="-"||g===""?0:g*1)-(l=="-"||l===""?0:l*1)},"numeric-desc":function(g,l){return(l=="-"||l===""?0:l*1)-(g=="-"||g===""?0:g*1)}};m.aTypes=[function(g){if(g.length===0)return"numeric";var l,q=false;l=g.charAt(0);if("0123456789-".indexOf(l)==-1)return null;for(var r=1;r")!=-1)return"html";return null}];m.fnVersionCheck=function(g){var l=function(w,x){for(;w.length=parseInt(u,10)};m._oExternConfig={iNextUnique:0};j.fn.dataTable=function(g){function l(){this.fnRecordsTotal=function(){return this.oFeatures.bServerSide? +this._iRecordsTotal:this.aiDisplayMaster.length};this.fnRecordsDisplay=function(){return this.oFeatures.bServerSide?this._iRecordsDisplay:this.aiDisplay.length};this.fnDisplayEnd=function(){return this.oFeatures.bServerSide?this.oFeatures.bPaginate===false?this._iDisplayStart+this.aiDisplay.length:Math.min(this._iDisplayStart+this._iDisplayLength,this._iDisplayStart+this.aiDisplay.length):this._iDisplayEnd};this.sInstance=this.oInstance=null;this.oFeatures={bPaginate:true,bLengthChange:true,bFilter:true, +bSort:true,bInfo:true,bAutoWidth:true,bProcessing:false,bSortClasses:true,bStateSave:false,bServerSide:false};this.oScroll={sX:"",sXInner:"",sY:"",bCollapse:false,iBarWidth:0};this.aanFeatures=[];this.oLanguage={sProcessing:"Processing...",sLengthMenu:"Show _MENU_ entries",sZeroRecords:"No matching records found",sEmptyTable:"No data available in table",sInfo:"Showing _START_ to _END_ of _TOTAL_ entries",sInfoEmpty:"Showing 0 to 0 of 0 entries",sInfoFiltered:"(filtered from _MAX_ total entries)", +sInfoPostFix:"",sSearch:"Search:",sUrl:"",oPaginate:{sFirst:"First",sPrevious:"Previous",sNext:"Next",sLast:"Last"}};this.aoData=[];this.aiDisplay=[];this.aiDisplayMaster=[];this.aoColumns=[];this.iNextId=0;this.asDataSearch=[];this.oPreviousSearch={sSearch:"",bRegex:false,bSmart:true};this.aoPreSearchCols=[];this.aaSorting=[[0,"asc",0]];this.aaSortingFixed=null;this.asStripClasses=[];this.asDestoryStrips=[];this.fnFooterCallback=this.fnHeaderCallback=this.fnRowCallback=null;this.aoDrawCallback=[]; +this.fnInitComplete=null;this.sTableId="";this.nTableWrapper=this.nTBody=this.nTFoot=this.nTHead=this.nTable=null;this.iDefaultSortIndex=0;this.bInitialised=false;this.aoOpenRows=[];this.sDom="lfrtip";this.sPaginationType="two_button";this.iCookieDuration=7200;this.sCookiePrefix="SpryMedia_DataTables_";this.sAjaxSource=null;this.bAjaxDataGet=true;this.fnServerData=function(a,b,c){j.ajax({url:a,data:b,success:c,dataType:"json",cache:false,error:function(){alert("DataTables warning: JSON data from server failed to load or be parsed. This is most likely to be caused by a JSON formatting error.")}})}; +this.fnFormatNumber=function(a){if(a<1E3)return a;else{var b=a+"";a=b.split("");var c="";b=b.length;for(var d=0;d=a.fnRecordsDisplay()?0:a.iInitDisplayStart;a.iInitDisplayStart=-1;F(a)}if(!(a.oFeatures.bServerSide&&!oa(a))){if(a.aiDisplay.length!==0){var i=a._iDisplayStart,h=a._iDisplayEnd;if(a.oFeatures.bServerSide){i=0;h=a.aoData.length}for(i=i;itr",a.nTHead)[0],V(a),a._iDisplayStart,a.fnDisplayEnd(),a.aiDisplay);typeof a.fnFooterCallback=="function"&&a.fnFooterCallback.call(a.oInstance,j(">tr",a.nTFoot)[0],V(a),a._iDisplayStart,a.fnDisplayEnd(),a.aiDisplay);f= +p.createDocumentFragment();b=p.createDocumentFragment();if(a.nTBody){e=a.nTBody.parentNode;b.appendChild(a.nTBody);c=a.nTBody.childNodes;for(b=c.length-1;b>=0;b--)c[b].parentNode.removeChild(c[b]);b=0;for(c=d.length;bj(a.nTable.parentNode).width()&&U(a)}b=0;for(c=a.aoDrawCallback.length;b< +c;b++)a.aoDrawCallback[b].fn.call(a.oInstance,a);a.bSorted=false;a.bFiltered=false}}function L(a){if(a.oFeatures.bSort)O(a,a.oPreviousSearch);else if(a.oFeatures.bFilter)P(a,a.oPreviousSearch);else{F(a);D(a)}}function oa(a){if(a.bAjaxDataGet){K(a,true);var b=a.aoColumns.length,c=[],d;a.iDraw++;c.push({name:"sEcho",value:a.iDraw});c.push({name:"iColumns",value:b});c.push({name:"sColumns",value:aa(a)});c.push({name:"iDisplayStart",value:a._iDisplayStart});c.push({name:"iDisplayLength",value:a.oFeatures.bPaginate!== +false?a._iDisplayLength:-1});if(a.oFeatures.bFilter!==false){c.push({name:"sSearch",value:a.oPreviousSearch.sSearch});c.push({name:"bRegex",value:a.oPreviousSearch.bRegex});for(d=0;d")c=c.parentNode;else if(i=="l"&&a.oFeatures.bPaginate&&a.oFeatures.bLengthChange){f=ra(a);e=1}else if(i=="f"&&a.oFeatures.bFilter){f=sa(a);e=1}else if(i=="r"&&a.oFeatures.bProcessing){f=ta(a);e=1}else if(i=="t"){f=ua(a);e=1}else if(i=="i"&&a.oFeatures.bInfo){f=va(a);e=1}else if(i=="p"&&a.oFeatures.bPaginate){f=wa(a);e=1}else if(m.aoFeatures.length!==0){h=m.aoFeatures;k=0;for(o=h.length;kcaption",a.nTable);i=0;for(k=d.length;i0&&a.nTable.removeChild(i[0]);if(a.nTFoot!==null){k=a.nTable.getElementsByTagName("tfoot");k.length>0&&a.nTable.removeChild(k[0])}i= +a.nTHead.cloneNode(true);a.nTable.insertBefore(i,a.nTable.childNodes[0]);if(a.nTFoot!==null){k=a.nTFoot.cloneNode(true);a.nTable.insertBefore(k,a.nTable.childNodes[1])}var I=ca(i);f=0;for(e=I.length;ff-a.oScroll.iBarWidth)a.nTable.style.width=v(f)}else a.nTable.style.width=v(f);f=j(a.nTable).outerWidth();e=a.nTHead.getElementsByTagName("tr");i=i.getElementsByTagName("tr");M(function(A,G){o=A.style;o.paddingTop="0";o.paddingBottom="0";o.borderTopWidth="0";o.borderBottomWidth= +"0";o.height=0;s=j(A).width();G.style.width=v(s);H.push(s)},i,e);if(a.nTFoot!==null){h=k.getElementsByTagName("tr");k=a.nTFoot.getElementsByTagName("tr");M(function(A,G){o=A.style;o.paddingTop="0";o.paddingBottom="0";o.borderTopWidth="0";o.borderBottomWidth="0";s=j(A).width();G.style.width=v(s);H.push(s)},h,k)}M(function(A){A.innerHTML="";A.style.width=v(H.shift())},i);a.nTFoot!==null&&M(function(A){A.innerHTML="";A.style.width=v(H.shift())},h);if(j(a.nTable).outerWidth()d.offsetWidth?a.oScroll.iBarWidth:0;if(a.nTable.offsetHeight'; +var c=j("input",b);c.val(a.oPreviousSearch.sSearch.replace('"',"""));c.keyup(function(){for(var d=a.aanFeatures.f,f=0,e=d.length;f=0;d--){f=ga(a.aoData[a.aiDisplay[d]]._aData[c],a.aoColumns[c].sType);if(!b.test(f)){a.aiDisplay.splice(d, +1);e++}}}}function ya(a,b,c,d,f){var e=fa(b,d,f);if(typeof c=="undefined"||c===null)c=0;if(m.afnFiltering.length!==0)c=1;if(b.length<=0){a.aiDisplay.splice(0,a.aiDisplay.length);a.aiDisplay=a.aiDisplayMaster.slice()}else if(a.aiDisplay.length==a.aiDisplayMaster.length||a.oPreviousSearch.sSearch.length>b.length||c==1||b.indexOf(a.oPreviousSearch.sSearch)!==0){a.aiDisplay.splice(0,a.aiDisplay.length);Q(a,1);for(c=0;c/g,"");else if(typeof a=="string")return a.replace(/\n/g, +" ");return a}function O(a,b){var c=[],d=m.oSort,f=a.aoData,e,i,h,k;if(!a.oFeatures.bServerSide&&(a.aaSorting.length!==0||a.aaSortingFixed!==null)){c=a.aaSortingFixed!==null?a.aaSortingFixed.concat(a.aaSorting):a.aaSorting.slice();for(h=0;h0){e=a.aoColumns[c[c.length-1][0]].iDataSort;i=a.aoColumns[e].sType;k+="iTest = oSort['"+i+"-"+c[c.length-1][1]+"']( aoData[a]._aData["+e+"], aoData[b]._aData["+e+"] );if (iTest===0) return oSort['numeric-"+c[c.length-1][1]+"'](a, b); return iTest;}";eval(k);a.aiDisplayMaster.sort(this.ClosureDataTables.fn)}this.ClosureDataTables=undefined}}if(typeof b=="undefined"||b)W(a);a.bSorted=true;if(a.oFeatures.bFilter)P(a, +a.oPreviousSearch,1);else{a.aiDisplay=a.aiDisplayMaster.slice();a._iDisplayStart=0;F(a);D(a)}}function $(a,b,c,d){j(b).click(function(f){if(a.aoColumns[c].bSortable!==false){var e=function(){var i,h;if(f.shiftKey){for(var k=false,o=0;o=i)for(b=0;b=0?a._iDisplayStart-a._iDisplayLength:0;if(a._iDisplayStart<0)a._iDisplayStart=0}else if(b=="next")if(a._iDisplayLength>=0){if(a._iDisplayStart+a._iDisplayLength=0){b=parseInt((a.fnRecordsDisplay()-1)/a._iDisplayLength,10)+1;a._iDisplayStart=(b-1)*a._iDisplayLength}else a._iDisplayStart=0;else J(a,0,"Unknown paging action: "+b);return c!=a._iDisplayStart}function va(a){var b=p.createElement("div");b.className=a.oClasses.sInfo;if(typeof a.aanFeatures.i=="undefined"){a.aoDrawCallback.push({fn:Ca,sName:"information"});a.sTableId!==""&&b.setAttribute("id",a.sTableId+"_info")}return b} +function Ca(a){if(!(!a.oFeatures.bInfo||a.aanFeatures.i.length===0)){var b=j(a.aanFeatures.i[0]),c=a.fnFormatNumber(a.fnRecordsTotal()),d=a.fnFormatNumber(a._iDisplayStart+1),f=a.fnFormatNumber(a.fnDisplayEnd()),e=a.fnFormatNumber(a.fnRecordsDisplay());if(a.fnRecordsDisplay()===0&&a.fnRecordsDisplay()==a.fnRecordsTotal())b.html(a.oLanguage.sInfoEmpty+a.oLanguage.sInfoPostFix);else if(a.fnRecordsDisplay()===0)b.html(a.oLanguage.sInfoEmpty+" "+a.oLanguage.sInfoFiltered.replace("_MAX_",c)+a.oLanguage.sInfoPostFix); +else a.fnRecordsDisplay()==a.fnRecordsTotal()?b.html(a.oLanguage.sInfo.replace("_START_",d).replace("_END_",f).replace("_TOTAL_",e)+a.oLanguage.sInfoPostFix):b.html(a.oLanguage.sInfo.replace("_START_",d).replace("_END_",f).replace("_TOTAL_",e)+" "+a.oLanguage.sInfoFiltered.replace("_MAX_",a.fnFormatNumber(a.fnRecordsTotal()))+a.oLanguage.sInfoPostFix);a=a.aanFeatures.i;if(a.length>1){b=b.html();c=1;for(d=a.length;c",c,d;if(a.aLengthMenu.length==2&&typeof a.aLengthMenu[0]=="object"&&typeof a.aLengthMenu[1]=="object"){c=0;for(d=a.aLengthMenu[0].length;c'+a.aLengthMenu[1][c]+""}else{c=0;for(d=a.aLengthMenu.length;c'+a.aLengthMenu[c]+""}b+="";var f=p.createElement("div");a.sTableId!==""&&typeof a.aanFeatures.l=="undefined"&&f.setAttribute("id",a.sTableId+ +"_length");f.className=a.oClasses.sLength;f.innerHTML=a.oLanguage.sLengthMenu.replace("_MENU_",b);j('select option[value="'+a._iDisplayLength+'"]',f).attr("selected",true);j("select",f).change(function(){var e=j(this).val(),i=a.aanFeatures.l;c=0;for(d=i.length;ca.aiDisplay.length||a._iDisplayLength==-1?a.aiDisplay.length:a._iDisplayStart+a._iDisplayLength}function Da(a,b){if(!a||a===null||a==="")return 0;if(typeof b=="undefined")b=p.getElementsByTagName("body")[0];var c=p.createElement("div");c.style.width=a;b.appendChild(c);a=c.offsetWidth;b.removeChild(c);return a}function ea(a){var b=0,c,d=0,f=a.aoColumns.length,e,i=j("th",a.nTHead);for(e= +0;etd",b);e.each(function(h){this.style.width="";h=da(a,h);if(h!==null&&a.aoColumns[h].sWidthOrig!=="")this.style.width=a.aoColumns[h].sWidthOrig});for(e=0;etd",b);if(f.length===0)f=j("thead tr:eq(0)>th",b);for(e=c=0;e0)a.aoColumns[e].sWidth=v(d);c++}a.nTable.style.width=v(j(b).outerWidth());b.parentNode.removeChild(b)}}function ia(a,b){if(a.oScroll.sX===""&&a.oScroll.sY!== +""){j(b).width();b.style.width=v(j(b).outerWidth()-a.oScroll.iBarWidth)}else if(a.oScroll.sX!=="")b.style.width=v(j(b).outerWidth())}function Ea(a,b,c){if(typeof c=="undefined"||c){c=Fa(a,b);b=N(a,b);if(c<0)return null;return a.aoData[c].nTr.getElementsByTagName("td")[b]}var d=-1,f,e;c=-1;var i=p.createElement("div");i.style.visibility="hidden";i.style.position="absolute";p.body.appendChild(i);f=0;for(e=a.aoData.length;fd){d=i.offsetWidth; +c=f}}p.body.removeChild(i);if(c>=0){b=N(a,b);if(a=a.aoData[c].nTr.getElementsByTagName("td")[b])return a}return null}function Fa(a,b){for(var c=0,d=-1,f=0;fc){c=e.length;d=f}}return d}function v(a){if(a===null)return"0px";if(typeof a=="number")return a+"px";if(a.indexOf("em")!=-1||a.indexOf("%")!=-1||a.indexOf("ex")!=-1||a.indexOf("px")!=-1)return a;return a+"px"}function La(a,b){if(a.length!=b.length)return 1;for(var c=0;cb&&a[d]--;c!=-1&&a.splice(c,1)}function qa(a,b){b=b.split(",");for(var c=[],d=0,f=a.aoColumns.length;d< +f;d++)for(var e=0;e4096){e=p.cookie.split(";");for(var h=0,k=e.length;h=d.aiDisplay.length){d._iDisplayStart-=d._iDisplayLength;if(d._iDisplayStart<0)d._iDisplayStart=0}if(typeof c=="undefined"||c){F(d);D(d)}return f};this.fnClearTable=function(a){var b=B(this[m.iApiIndex]);ba(b);if(typeof a=="undefined"||a)D(b)};this.fnOpen=function(a,b,c){var d=B(this[m.iApiIndex]);this.fnClose(a);var f=p.createElement("tr"),e=p.createElement("td");f.appendChild(e);e.className=c;e.colSpan=T(d);e.innerHTML=b;b=j("tr",d.nTBody);j.inArray(a,b)!=-1&&j(f).insertAfter(a); +d.aoOpenRows.push({nTr:f,nParent:a});return f};this.fnClose=function(a){for(var b=B(this[m.iApiIndex]),c=0;ctr",c.nTHead)[0];var h=j(">tr",c.nTFoot)[0],k=[],o=[];for(d=0;d< +f;d++){k.push(c.aoColumns[d].nTh);o.push(c.aoColumns[d].nTf)}if(b){for(d=b=0;d=T(c)){e.appendChild(k[a]);h&&h.appendChild(o[a]);d=0;for(f=c.aoData.length;dtd:eq("+i+")",c.aoData[d].nTr)[0])}}c.aoColumns[a].bVisible=true}else{e.removeChild(k[a]);h&&h.removeChild(o[a]);i=X(c);d=0;for(f=c.aoData.length;dtr:even",c).addClass(a.asDestoryStrips[0]);j(">tr:odd",c).addClass(a.asDestoryStrips[1]);b=0;for(d=E.length;bt<"F"ip>'}if(e.oScroll.sX!== +""||e.oScroll.sY!=="")e.oScroll.iBarWidth=Ja();if(typeof g.iDisplayStart!="undefined"&&typeof e.iInitDisplayStart=="undefined"){e.iInitDisplayStart=g.iDisplayStart;e._iDisplayStart=g.iDisplayStart}if(typeof g.bStateSave!="undefined"){e.oFeatures.bStateSave=g.bStateSave;Ia(e,g);e.aoDrawCallback.push({fn:Ga,sName:"state_save"})}if(typeof g.aaData!="undefined")h=true;if(typeof g!="undefined"&&typeof g.aoData!="undefined")g.aoColumns=g.aoData;if(typeof g.oLanguage!="undefined")if(typeof g.oLanguage.sUrl!= +"undefined"&&g.oLanguage.sUrl!==""){e.oLanguage.sUrl=g.oLanguage.sUrl;j.getJSON(e.oLanguage.sUrl,null,function(o){u(e,o,true)});i=true}else u(e,g.oLanguage,false)}else g={};if(typeof g.asStripClasses=="undefined"){e.asStripClasses.push(e.oClasses.sStripOdd);e.asStripClasses.push(e.oClasses.sStripEven)}c=false;d=j("tbody>tr",this);a=0;for(b=e.asStripClasses.length;a=0;a--){k=g.aoColumnDefs[a].aTargets;c=0;for(d=k.length;c=0){for(;e.aoColumns.length<=k[c];)y(e);C(e,k[c],g.aoColumnDefs[a])}else if(typeof k[c]=="number"&&k[c]<0)C(e,e.aoColumns.length+k[c],g.aoColumnDefs[a]);else if(typeof k[c]=="string"){b= +0;for(f=e.aoColumns.length;b0)e.nTFoot=this.getElementsByTagName("tfoot")[0];if(h)for(a=0;a y) ? 1 : 0)); +}; + +jQuery.fn.dataTableExt.oSort['percent-desc'] = function(a,b) { + var x = (a == "-") ? 0 : a.replace( /%/, "" ); + var y = (b == "-") ? 0 : b.replace( /%/, "" ); + x = parseFloat( x ); + y = parseFloat( y ); + return ((x < y) ? 1 : ((x > y) ? -1 : 0)); +}; +/* + * timeago: a jQuery plugin, version: 0.9 (2010-06-21) + * @requires jQuery v1.2.3 or later + * + * Timeago is a jQuery plugin that makes it easy to support automatically + * updating fuzzy timestamps (e.g. "4 minutes ago" or "about 1 day ago"). + * + * For usage and examples, visit: + * http://timeago.yarp.com/ + * + * Licensed under the MIT: + * http://www.opensource.org/licenses/mit-license.php + * + * Copyright (c) 2008-2010, Ryan McGeary (ryanonjavascript -[at]- mcgeary [*dot*] org) + */ + +(function($) { + $.timeago = function(timestamp) { + if (timestamp instanceof Date) return inWords(timestamp); + else if (typeof timestamp == "string") return inWords($.timeago.parse(timestamp)); + else return inWords($.timeago.datetime(timestamp)); + }; + var $t = $.timeago; + + $.extend($.timeago, { + settings: { + refreshMillis: 60000, + allowFuture: false, + strings: { + prefixAgo: null, + prefixFromNow: null, + suffixAgo: "ago", + suffixFromNow: "from now", + seconds: "less than a minute", + minute: "about a minute", + minutes: "%d minutes", + hour: "about an hour", + hours: "about %d hours", + day: "a day", + days: "%d days", + month: "about a month", + months: "%d months", + year: "about a year", + years: "%d years", + numbers: [] + } + }, + inWords: function(distanceMillis) { + var $l = this.settings.strings; + var prefix = $l.prefixAgo; + var suffix = $l.suffixAgo; + if (this.settings.allowFuture) { + if (distanceMillis < 0) { + prefix = $l.prefixFromNow; + suffix = $l.suffixFromNow; + } + distanceMillis = Math.abs(distanceMillis); + } + + var seconds = distanceMillis / 1000; + var minutes = seconds / 60; + var hours = minutes / 60; + var days = hours / 24; + var years = days / 365; + + function substitute(stringOrFunction, number) { + var string = $.isFunction(stringOrFunction) ? stringOrFunction(number) : stringOrFunction; + var value = ($l.numbers && $l.numbers[number]) || number; + return string.replace(/%d/i, value); + } + + var words = seconds < 45 && substitute($l.seconds, Math.round(seconds)) || + seconds < 90 && substitute($l.minute, 1) || + minutes < 45 && substitute($l.minutes, Math.round(minutes)) || + minutes < 90 && substitute($l.hour, 1) || + hours < 24 && substitute($l.hours, Math.round(hours)) || + hours < 48 && substitute($l.day, 1) || + days < 30 && substitute($l.days, Math.floor(days)) || + days < 60 && substitute($l.month, 1) || + days < 365 && substitute($l.months, Math.floor(days / 30)) || + years < 2 && substitute($l.year, 1) || + substitute($l.years, Math.floor(years)); + + return $.trim([prefix, words, suffix].join(" ")); + }, + parse: function(iso8601) { + var s = $.trim(iso8601); + s = s.replace(/\.\d\d\d/,""); // remove milliseconds + s = s.replace(/-/,"/").replace(/-/,"/"); + s = s.replace(/T/," ").replace(/Z/," UTC"); + s = s.replace(/([\+-]\d\d)\:?(\d\d)/," $1$2"); // -04:00 -> -0400 + return new Date(s); + }, + datetime: function(elem) { + // jQuery's `is()` doesn't play well with HTML5 in IE + var isTime = $(elem).get(0).tagName.toLowerCase() == "time"; // $(elem).is("time"); + var iso8601 = isTime ? $(elem).attr("datetime") : $(elem).attr("title"); + return $t.parse(iso8601); + } + }); + + $.fn.timeago = function() { + var self = this; + self.each(refresh); + + var $s = $t.settings; + if ($s.refreshMillis > 0) { + setInterval(function() { self.each(refresh); }, $s.refreshMillis); + } + return self; + }; + + function refresh() { + var data = prepareData(this); + if (!isNaN(data.datetime)) { + $(this).text(inWords(data.datetime)); + } + return this; + } + + function prepareData(element) { + element = $(element); + if (!element.data("timeago")) { + element.data("timeago", { datetime: $t.datetime(element) }); + var text = $.trim(element.text()); + if (text.length > 0) element.attr("title", text); + } + return element.data("timeago"); + } + + function inWords(date) { + return $t.inWords(distance(date)); + } + + function distance(date) { + return (new Date().getTime() - date.getTime()); + } + + // fix for IE6 suckage + document.createElement("abbr"); + document.createElement("time"); +})(jQuery); +// JQuery URL Parser +// Written by Mark Perkins, mark@allmarkedup.com +// License: http://unlicense.org/ (i.e. do what you want with it!) + +jQuery.url = function() +{ + var segments = {}; + + var parsed = {}; + + /** + * Options object. Only the URI and strictMode values can be changed via the setters below. + */ + var options = { + + url : window.location, // default URI is the page in which the script is running + + strictMode: false, // 'loose' parsing by default + + key: ["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"], // keys available to query + + q: { + name: "queryKey", + parser: /(?:^|&)([^&=]*)=?([^&]*)/g + }, + + parser: { + strict: /^(?:([^:\/?#]+):)?(?:\/\/((?:(([^:@]*):?([^:@]*))?@)?([^:\/?#]*)(?::(\d*))?))?((((?:[^?#\/]*\/)*)([^?#]*))(?:\?([^#]*))?(?:#(.*))?)/, //less intuitive, more accurate to the specs + loose: /^(?:(?![^:@]+:[^:@\/]*@)([^:\/?#.]+):)?(?:\/\/)?((?:(([^:@]*):?([^:@]*))?@)?([^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/ // more intuitive, fails on relative paths and deviates from specs + } + + }; + + /** + * Deals with the parsing of the URI according to the regex above. + * Written by Steven Levithan - see credits at top. + */ + var parseUri = function() + { + str = decodeURI( options.url ); + + var m = options.parser[ options.strictMode ? "strict" : "loose" ].exec( str ); + var uri = {}; + var i = 14; + + while ( i-- ) { + uri[ options.key[i] ] = m[i] || ""; + } + + uri[ options.q.name ] = {}; + uri[ options.key[12] ].replace( options.q.parser, function ( $0, $1, $2 ) { + if ($1) { + uri[options.q.name][$1] = $2; + } + }); + + return uri; + }; + + /** + * Returns the value of the passed in key from the parsed URI. + * + * @param string key The key whose value is required + */ + var key = function( key ) + { + if ( ! parsed.length ) + { + setUp(); // if the URI has not been parsed yet then do this first... + } + if ( key == "base" ) + { + if ( parsed.port !== null && parsed.port !== "" ) + { + return parsed.protocol+"://"+parsed.host+":"+parsed.port+"/"; + } + else + { + return parsed.protocol+"://"+parsed.host+"/"; + } + } + + return ( parsed[key] === "" ) ? null : parsed[key]; + }; + + /** + * Returns the value of the required query string parameter. + * + * @param string item The parameter whose value is required + */ + var param = function( item ) + { + if ( ! parsed.length ) + { + setUp(); // if the URI has not been parsed yet then do this first... + } + return ( parsed.queryKey[item] === null ) ? null : parsed.queryKey[item]; + }; + + /** + * 'Constructor' (not really!) function. + * Called whenever the URI changes to kick off re-parsing of the URI and splitting it up into segments. + */ + var setUp = function() + { + parsed = parseUri(); + + getSegments(); + }; + + /** + * Splits up the body of the URI into segments (i.e. sections delimited by '/') + */ + var getSegments = function() + { + var p = parsed.path; + segments = []; // clear out segments array + segments = parsed.path.length == 1 ? {} : ( p.charAt( p.length - 1 ) == "/" ? p.substring( 1, p.length - 1 ) : path = p.substring( 1 ) ).split("/"); + }; + + return { + + /** + * Sets the parsing mode - either strict or loose. Set to loose by default. + * + * @param string mode The mode to set the parser to. Anything apart from a value of 'strict' will set it to loose! + */ + setMode : function( mode ) + { + strictMode = mode == "strict" ? true : false; + return this; + }, + + /** + * Sets URI to parse if you don't want to to parse the current page's URI. + * Calling the function with no value for newUri resets it to the current page's URI. + * + * @param string newUri The URI to parse. + */ + setUrl : function( newUri ) + { + options.url = newUri === undefined ? window.location : newUri; + setUp(); + return this; + }, + + /** + * Returns the value of the specified URI segment. Segments are numbered from 1 to the number of segments. + * For example the URI http://test.com/about/company/ segment(1) would return 'about'. + * + * If no integer is passed into the function it returns the number of segments in the URI. + * + * @param int pos The position of the segment to return. Can be empty. + */ + segment : function( pos ) + { + if ( ! parsed.length ) + { + setUp(); // if the URI has not been parsed yet then do this first... + } + if ( pos === undefined ) + { + return segments.length; + } + return ( segments[pos] === "" || segments[pos] === undefined ) ? null : segments[pos]; + }, + + attr : key, // provides public access to private 'key' function - see above + + param : param // provides public access to private 'param' function - see above + + }; + +}(); + + + + +$(document).ready(function() { + // Configuration for fancy sortable tables for source file groups + $('.file_list').dataTable({ + "aaSorting": [[ 1, "asc" ]], + "bPaginate": false, + "bJQueryUI": true, + "aoColumns": [ + null, + { "sType": "percent" }, + null, + null, + null, + null, + null + ] + }); + + // Syntax highlight all files up front - deactivated + // $('.source_table pre code').each(function(i, e) {hljs.highlightBlock(e, ' ')}); + + // Syntax highlight source files on first toggle of the file view popup + $("a.src_link").click(function() { + // Get the source file element that corresponds to the clicked element + var source_table = $($(this).attr('href')); + + // If not highlighted yet, do it! + if (!source_table.hasClass('highlighted')) { + source_table.find('pre code').each(function(i, e) {hljs.highlightBlock(e, ' ')}); + source_table.addClass('highlighted'); + }; + }); + + var prev_anchor; + var curr_anchor; + + // Set-up of popup for source file views + $("a.src_link").colorbox({ + transition: "none", + inline: true, + opacity: 1, + width: "95%", + height: "95%", + onLoad: function() { + if (prev_anchor) { + prev_anchor = jQuery.url.attr('anchor'); + } + curr_anchor = this.href.split('#')[1]; + window.location.hash = curr_anchor; + }, + onCleanup: function() { + if (prev_anchor) { + $('a[href="#'+prev_anchor+'"]').click(); + curr_anchor = prev_anchor; + } else { + $('.group_tabs a:first').click(); + prev_anchor = curr_anchor; + curr_anchor = "#_AllFiles"; + } + window.location.hash = curr_anchor; + } + }); + + // Hide src files and file list container after load + $('.source_files').hide(); + $('.file_list_container').hide(); + + // Add tabs based upon existing file_list_containers + $('.file_list_container h2').each(function(){ + var container_id = $(this).parent().attr('id'); + var group_name = $(this).find('.group_name').first().html(); + var covered_percent = $(this).find('.covered_percent').first().html(); + + $('.group_tabs').append('
  • ' + group_name + ' ('+ covered_percent +')
  • '); + }); + + $('.group_tabs a').each( function() { + $(this).addClass($(this).attr('href').replace('#', '')); + }); + + // Make sure tabs don't get ugly focus borders when active + $('.group_tabs a').live('focus', function() { $(this).blur(); }); + + var favicon_path = $('link[rel="shortcut icon"]').attr('href'); + $('.group_tabs a').live('click', function(){ + if (!$(this).parent().hasClass('active')) { + $('.group_tabs a').parent().removeClass('active'); + $(this).parent().addClass('active'); + $('.file_list_container').hide(); + $(".file_list_container" + $(this).attr('href')).show(); + window.location.href = window.location.href.split('#')[0] + $(this).attr('href').replace('#', '#_'); + + // Force favicon reload - otherwise the location change containing anchor would drop the favicon... + // Works only on firefox, but still... - Anyone know a better solution to force favicon on local file? + $('link[rel="shortcut icon"]').remove(); + $('head').append(''); + }; + return false; + }); + + if (jQuery.url.attr('anchor')) { + var anchor = jQuery.url.attr('anchor') + if (anchor.length == 40) { + $('a.src_link[href=#' + anchor + ']').click(); + } else { + $('.group_tabs a.'+anchor.replace('_', '')).click(); + } + } else { + $('.group_tabs a:first').click(); + }; + + $("abbr.timeago").timeago(); + $('#loading').fadeOut(); + $('#wrapper').show(); +}); diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/unit/facter/coverage/assets/0.8.0/colorbox/border.png b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/unit/facter/coverage/assets/0.8.0/colorbox/border.png new file mode 100644 index 00000000000..df13bb6daf7 Binary files /dev/null and b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/unit/facter/coverage/assets/0.8.0/colorbox/border.png differ diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/unit/facter/coverage/assets/0.8.0/colorbox/controls.png b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/unit/facter/coverage/assets/0.8.0/colorbox/controls.png new file mode 100644 index 00000000000..65cfd1dc95c Binary files /dev/null and b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/unit/facter/coverage/assets/0.8.0/colorbox/controls.png differ diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/unit/facter/coverage/assets/0.8.0/colorbox/loading.gif b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/unit/facter/coverage/assets/0.8.0/colorbox/loading.gif new file mode 100644 index 00000000000..b4695d811d4 Binary files /dev/null and b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/unit/facter/coverage/assets/0.8.0/colorbox/loading.gif differ diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/unit/facter/coverage/assets/0.8.0/colorbox/loading_background.png b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/unit/facter/coverage/assets/0.8.0/colorbox/loading_background.png new file mode 100644 index 00000000000..9de11f46719 Binary files /dev/null and b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/unit/facter/coverage/assets/0.8.0/colorbox/loading_background.png differ diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/unit/facter/coverage/assets/0.8.0/favicon_green.png b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/unit/facter/coverage/assets/0.8.0/favicon_green.png new file mode 100644 index 00000000000..74db330cd05 Binary files /dev/null and b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/unit/facter/coverage/assets/0.8.0/favicon_green.png differ diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/unit/facter/coverage/assets/0.8.0/favicon_red.png b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/unit/facter/coverage/assets/0.8.0/favicon_red.png new file mode 100644 index 00000000000..fbe093a5511 Binary files /dev/null and b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/unit/facter/coverage/assets/0.8.0/favicon_red.png differ diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/unit/facter/coverage/assets/0.8.0/favicon_yellow.png b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/unit/facter/coverage/assets/0.8.0/favicon_yellow.png new file mode 100644 index 00000000000..e53847ea09a Binary files /dev/null and b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/unit/facter/coverage/assets/0.8.0/favicon_yellow.png differ diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/unit/facter/coverage/assets/0.8.0/loading.gif b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/unit/facter/coverage/assets/0.8.0/loading.gif new file mode 100644 index 00000000000..3596a61f3af Binary files /dev/null and b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/unit/facter/coverage/assets/0.8.0/loading.gif differ diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/unit/facter/coverage/assets/0.8.0/magnify.png b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/unit/facter/coverage/assets/0.8.0/magnify.png new file mode 100644 index 00000000000..6073b9530ed Binary files /dev/null and b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/unit/facter/coverage/assets/0.8.0/magnify.png differ diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/unit/facter/coverage/assets/0.8.0/smoothness/images/ui-bg_flat_0_aaaaaa_40x100.png b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/unit/facter/coverage/assets/0.8.0/smoothness/images/ui-bg_flat_0_aaaaaa_40x100.png new file mode 100644 index 00000000000..5b5dab2ab7b Binary files /dev/null and b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/unit/facter/coverage/assets/0.8.0/smoothness/images/ui-bg_flat_0_aaaaaa_40x100.png differ diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/unit/facter/coverage/assets/0.8.0/smoothness/images/ui-bg_flat_75_ffffff_40x100.png b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/unit/facter/coverage/assets/0.8.0/smoothness/images/ui-bg_flat_75_ffffff_40x100.png new file mode 100644 index 00000000000..ac8b229af95 Binary files /dev/null and b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/unit/facter/coverage/assets/0.8.0/smoothness/images/ui-bg_flat_75_ffffff_40x100.png differ diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/unit/facter/coverage/assets/0.8.0/smoothness/images/ui-bg_glass_55_fbf9ee_1x400.png b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/unit/facter/coverage/assets/0.8.0/smoothness/images/ui-bg_glass_55_fbf9ee_1x400.png new file mode 100644 index 00000000000..ad3d6346e00 Binary files /dev/null and b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/unit/facter/coverage/assets/0.8.0/smoothness/images/ui-bg_glass_55_fbf9ee_1x400.png differ diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/unit/facter/coverage/assets/0.8.0/smoothness/images/ui-bg_glass_65_ffffff_1x400.png b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/unit/facter/coverage/assets/0.8.0/smoothness/images/ui-bg_glass_65_ffffff_1x400.png new file mode 100644 index 00000000000..42ccba269b6 Binary files /dev/null and b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/unit/facter/coverage/assets/0.8.0/smoothness/images/ui-bg_glass_65_ffffff_1x400.png differ diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/unit/facter/coverage/assets/0.8.0/smoothness/images/ui-bg_glass_75_dadada_1x400.png b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/unit/facter/coverage/assets/0.8.0/smoothness/images/ui-bg_glass_75_dadada_1x400.png new file mode 100644 index 00000000000..5a46b47cb16 Binary files /dev/null and b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/unit/facter/coverage/assets/0.8.0/smoothness/images/ui-bg_glass_75_dadada_1x400.png differ diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/unit/facter/coverage/assets/0.8.0/smoothness/images/ui-bg_glass_75_e6e6e6_1x400.png b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/unit/facter/coverage/assets/0.8.0/smoothness/images/ui-bg_glass_75_e6e6e6_1x400.png new file mode 100644 index 00000000000..86c2baa655e Binary files /dev/null and b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/unit/facter/coverage/assets/0.8.0/smoothness/images/ui-bg_glass_75_e6e6e6_1x400.png differ diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/unit/facter/coverage/assets/0.8.0/smoothness/images/ui-bg_glass_95_fef1ec_1x400.png b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/unit/facter/coverage/assets/0.8.0/smoothness/images/ui-bg_glass_95_fef1ec_1x400.png new file mode 100644 index 00000000000..4443fdc1a15 Binary files /dev/null and b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/unit/facter/coverage/assets/0.8.0/smoothness/images/ui-bg_glass_95_fef1ec_1x400.png differ diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/unit/facter/coverage/assets/0.8.0/smoothness/images/ui-bg_highlight-soft_75_cccccc_1x100.png b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/unit/facter/coverage/assets/0.8.0/smoothness/images/ui-bg_highlight-soft_75_cccccc_1x100.png new file mode 100644 index 00000000000..7c9fa6c6edc Binary files /dev/null and b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/unit/facter/coverage/assets/0.8.0/smoothness/images/ui-bg_highlight-soft_75_cccccc_1x100.png differ diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/unit/facter/coverage/assets/0.8.0/smoothness/images/ui-icons_222222_256x240.png b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/unit/facter/coverage/assets/0.8.0/smoothness/images/ui-icons_222222_256x240.png new file mode 100644 index 00000000000..b273ff111d2 Binary files /dev/null and b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/unit/facter/coverage/assets/0.8.0/smoothness/images/ui-icons_222222_256x240.png differ diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/unit/facter/coverage/assets/0.8.0/smoothness/images/ui-icons_2e83ff_256x240.png b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/unit/facter/coverage/assets/0.8.0/smoothness/images/ui-icons_2e83ff_256x240.png new file mode 100644 index 00000000000..09d1cdc856c Binary files /dev/null and b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/unit/facter/coverage/assets/0.8.0/smoothness/images/ui-icons_2e83ff_256x240.png differ diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/unit/facter/coverage/assets/0.8.0/smoothness/images/ui-icons_454545_256x240.png b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/unit/facter/coverage/assets/0.8.0/smoothness/images/ui-icons_454545_256x240.png new file mode 100644 index 00000000000..59bd45b907c Binary files /dev/null and b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/unit/facter/coverage/assets/0.8.0/smoothness/images/ui-icons_454545_256x240.png differ diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/unit/facter/coverage/assets/0.8.0/smoothness/images/ui-icons_888888_256x240.png b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/unit/facter/coverage/assets/0.8.0/smoothness/images/ui-icons_888888_256x240.png new file mode 100644 index 00000000000..6d02426c114 Binary files /dev/null and b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/unit/facter/coverage/assets/0.8.0/smoothness/images/ui-icons_888888_256x240.png differ diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/unit/facter/coverage/assets/0.8.0/smoothness/images/ui-icons_cd0a0a_256x240.png b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/unit/facter/coverage/assets/0.8.0/smoothness/images/ui-icons_cd0a0a_256x240.png new file mode 100644 index 00000000000..2ab019b73ec Binary files /dev/null and b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/unit/facter/coverage/assets/0.8.0/smoothness/images/ui-icons_cd0a0a_256x240.png differ diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/unit/facter/coverage/index.html b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/unit/facter/coverage/index.html new file mode 100644 index 00000000000..3416ca7e30a --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/unit/facter/coverage/index.html @@ -0,0 +1,72 @@ + + + + Code coverage for Facter + + + + + + + + +
    + loading +
    + + + diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/unit/facter/facter_dot_d_spec.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/unit/facter/facter_dot_d_spec.rb new file mode 100755 index 00000000000..2fb72b29efb --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/unit/facter/facter_dot_d_spec.rb @@ -0,0 +1,32 @@ +#! /usr/bin/env ruby -S rspec +require 'spec_helper' +require 'facter/facter_dot_d' + +describe Facter::Util::DotD do + + context 'returns a simple fact' do + before :each do + Facter.stubs(:version).returns('1.6.1') + subject.stubs(:entries).returns(['/etc/facter/facts.d/fake_fact.txt']) + File.stubs(:readlines).with('/etc/facter/facts.d/fake_fact.txt').returns(['fake_fact=fake fact']) + subject.create + end + + it 'should return successfully' do + Facter.fact(:fake_fact).value.should == 'fake fact' + end + end + + context 'returns a fact with equals signs' do + before :each do + Facter.stubs(:version).returns('1.6.1') + subject.stubs(:entries).returns(['/etc/facter/facts.d/foo.txt']) + File.stubs(:readlines).with('/etc/facter/facts.d/foo.txt').returns(['foo=1+1=2']) + subject.create + end + + it 'should return successfully' do + Facter.fact(:foo).value.should == '1+1=2' + end + end +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/unit/facter/pe_version_spec.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/unit/facter/pe_version_spec.rb new file mode 100755 index 00000000000..931c6d4b0a3 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/unit/facter/pe_version_spec.rb @@ -0,0 +1,76 @@ +#!/usr/bin/env rspec + +require 'spec_helper' + +describe "PE Version specs" do + before :each do + # Explicitly load the pe_version.rb file which contains generated facts + # that cannot be automatically loaded. Puppet 2.x implements + # Facter.collection.load while Facter 1.x markes Facter.collection.load as + # a private method. + if Facter.collection.respond_to? :load + Facter.collection.load(:pe_version) + else + Facter.collection.loader.load(:pe_version) + end + end + + context "If PE is installed" do + %w{ 2.6.1 2.10.300 }.each do |version| + puppetversion = "2.7.19 (Puppet Enterprise #{version})" + context "puppetversion => #{puppetversion}" do + before :each do + Facter.fact(:puppetversion).stubs(:value).returns(puppetversion) + end + + (major,minor,patch) = version.split(".") + + it "Should return true" do + Facter.fact(:is_pe).value.should == true + end + + it "Should have a version of #{version}" do + Facter.fact(:pe_version).value.should == version + end + + it "Should have a major version of #{major}" do + Facter.fact(:pe_major_version).value.should == major + end + + it "Should have a minor version of #{minor}" do + Facter.fact(:pe_minor_version).value.should == minor + end + + it "Should have a patch version of #{patch}" do + Facter.fact(:pe_patch_version).value.should == patch + end + end + end + end + + context "When PE is not installed" do + before :each do + Facter.fact(:puppetversion).stubs(:value).returns("2.7.19") + end + + it "is_pe is false" do + Facter.fact(:is_pe).value.should == false + end + + it "pe_version is nil" do + Facter.fact(:pe_version).value.should be_nil + end + + it "pe_major_version is nil" do + Facter.fact(:pe_major_version).value.should be_nil + end + + it "pe_minor_version is nil" do + Facter.fact(:pe_minor_version).value.should be_nil + end + + it "Should have a patch version" do + Facter.fact(:pe_patch_version).value.should be_nil + end + end +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/unit/facter/root_home_spec.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/unit/facter/root_home_spec.rb new file mode 100755 index 00000000000..73eb3eada8c --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/unit/facter/root_home_spec.rb @@ -0,0 +1,52 @@ +#! /usr/bin/env ruby -S rspec +require 'spec_helper' +require 'facter/root_home' + +describe Facter::Util::RootHome do + context "solaris" do + let(:root_ent) { "root:x:0:0:Super-User:/:/sbin/sh" } + let(:expected_root_home) { "/" } + + it "should return /" do + Facter::Util::Resolution.expects(:exec).with("getent passwd root").returns(root_ent) + Facter::Util::RootHome.get_root_home.should == expected_root_home + end + end + context "linux" do + let(:root_ent) { "root:x:0:0:root:/root:/bin/bash" } + let(:expected_root_home) { "/root" } + + it "should return /root" do + Facter::Util::Resolution.expects(:exec).with("getent passwd root").returns(root_ent) + Facter::Util::RootHome.get_root_home.should == expected_root_home + end + end + context "windows" do + before :each do + Facter::Util::Resolution.expects(:exec).with("getent passwd root").returns(nil) + end + it "should be nil on windows" do + Facter::Util::RootHome.get_root_home.should be_nil + end + end +end + +describe 'root_home', :type => :fact do + before { Facter.clear } + after { Facter.clear } + + context "macosx" do + before do + Facter.fact(:kernel).stubs(:value).returns("Darwin") + Facter.fact(:osfamily).stubs(:value).returns("Darwin") + end + let(:expected_root_home) { "/var/root" } + sample_dscacheutil = File.read(fixtures('dscacheutil','root')) + + it "should return /var/root" do + Facter::Util::Resolution.stubs(:exec).with("dscacheutil -q user -a name root").returns(sample_dscacheutil) + Facter.fact(:root_home).value.should == expected_root_home + end + end + +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/unit/facter/util/puppet_settings_spec.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/unit/facter/util/puppet_settings_spec.rb new file mode 100755 index 00000000000..e77779bae14 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/unit/facter/util/puppet_settings_spec.rb @@ -0,0 +1,36 @@ +#! /usr/bin/env ruby -S rspec +require 'spec_helper' +require 'facter/util/puppet_settings' + +describe Facter::Util::PuppetSettings do + + describe "#with_puppet" do + context "Without Puppet loaded" do + before(:each) do + Module.expects(:const_get).with("Puppet").raises(NameError) + end + + it 'should be nil' do + subject.with_puppet { Puppet[:vardir] }.should be_nil + end + it 'should not yield to the block' do + Puppet.expects(:[]).never + subject.with_puppet { Puppet[:vardir] }.should be_nil + end + end + context "With Puppet loaded" do + module Puppet; end + let(:vardir) { "/var/lib/puppet" } + + before :each do + Puppet.expects(:[]).with(:vardir).returns vardir + end + it 'should yield to the block' do + subject.with_puppet { Puppet[:vardir] } + end + it 'should return the nodes vardir' do + subject.with_puppet { Puppet[:vardir] }.should eq vardir + end + end + end +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/unit/puppet/provider/file_line/ruby_spec.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/unit/puppet/provider/file_line/ruby_spec.rb new file mode 100755 index 00000000000..a016b685c35 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/unit/puppet/provider/file_line/ruby_spec.rb @@ -0,0 +1,225 @@ +#! /usr/bin/env ruby -S rspec +require 'spec_helper' +require 'tempfile' +provider_class = Puppet::Type.type(:file_line).provider(:ruby) +describe provider_class do + context "when adding" do + let :tmpfile do + tmp = Tempfile.new('tmp') + path = tmp.path + tmp.close! + path + end + let :resource do + Puppet::Type::File_line.new( + {:name => 'foo', :path => tmpfile, :line => 'foo'} + ) + end + let :provider do + provider_class.new(resource) + end + + it 'should detect if the line exists in the file' do + File.open(tmpfile, 'w') do |fh| + fh.write('foo') + end + provider.exists?.should be_true + end + it 'should detect if the line does not exist in the file' do + File.open(tmpfile, 'w') do |fh| + fh.write('foo1') + end + provider.exists?.should be_nil + end + it 'should append to an existing file when creating' do + provider.create + File.read(tmpfile).chomp.should == 'foo' + end + end + + context "when matching" do + before :each do + # TODO: these should be ported over to use the PuppetLabs spec_helper + # file fixtures once the following pull request has been merged: + # https://github.com/puppetlabs/puppetlabs-stdlib/pull/73/files + tmp = Tempfile.new('tmp') + @tmpfile = tmp.path + tmp.close! + @resource = Puppet::Type::File_line.new( + { + :name => 'foo', + :path => @tmpfile, + :line => 'foo = bar', + :match => '^foo\s*=.*$', + } + ) + @provider = provider_class.new(@resource) + end + + describe 'using match' do + it 'should raise an error if more than one line matches, and should not have modified the file' do + File.open(@tmpfile, 'w') do |fh| + fh.write("foo1\nfoo=blah\nfoo2\nfoo=baz") + end + @provider.exists?.should be_nil + expect { @provider.create }.to raise_error(Puppet::Error, /More than one line.*matches/) + File.read(@tmpfile).should eql("foo1\nfoo=blah\nfoo2\nfoo=baz") + end + + it 'should replace all lines that matches' do + @resource = Puppet::Type::File_line.new( + { + :name => 'foo', + :path => @tmpfile, + :line => 'foo = bar', + :match => '^foo\s*=.*$', + :multiple => true + } + ) + @provider = provider_class.new(@resource) + File.open(@tmpfile, 'w') do |fh| + fh.write("foo1\nfoo=blah\nfoo2\nfoo=baz") + end + @provider.exists?.should be_nil + @provider.create + File.read(@tmpfile).chomp.should eql("foo1\nfoo = bar\nfoo2\nfoo = bar") + end + + it 'should raise an error with invalid values' do + expect { + @resource = Puppet::Type::File_line.new( + { + :name => 'foo', + :path => @tmpfile, + :line => 'foo = bar', + :match => '^foo\s*=.*$', + :multiple => 'asgadga' + } + ) + }.to raise_error(Puppet::Error, /Invalid value "asgadga"\. Valid values are true, false\./) + end + + it 'should replace a line that matches' do + File.open(@tmpfile, 'w') do |fh| + fh.write("foo1\nfoo=blah\nfoo2") + end + @provider.exists?.should be_nil + @provider.create + File.read(@tmpfile).chomp.should eql("foo1\nfoo = bar\nfoo2") + end + it 'should add a new line if no lines match' do + File.open(@tmpfile, 'w') do |fh| + fh.write("foo1\nfoo2") + end + @provider.exists?.should be_nil + @provider.create + File.read(@tmpfile).should eql("foo1\nfoo2\nfoo = bar\n") + end + it 'should do nothing if the exact line already exists' do + File.open(@tmpfile, 'w') do |fh| + fh.write("foo1\nfoo = bar\nfoo2") + end + @provider.exists?.should be_true + @provider.create + File.read(@tmpfile).chomp.should eql("foo1\nfoo = bar\nfoo2") + end + end + + describe 'using after' do + let :resource do + Puppet::Type::File_line.new( + { + :name => 'foo', + :path => @tmpfile, + :line => 'inserted = line', + :after => '^foo1', + } + ) + end + + let :provider do + provider_class.new(resource) + end + + context 'with one line matching the after expression' do + before :each do + File.open(@tmpfile, 'w') do |fh| + fh.write("foo1\nfoo = blah\nfoo2\nfoo = baz") + end + end + + it 'inserts the specified line after the line matching the "after" expression' do + provider.create + File.read(@tmpfile).chomp.should eql("foo1\ninserted = line\nfoo = blah\nfoo2\nfoo = baz") + end + end + + context 'with two lines matching the after expression' do + before :each do + File.open(@tmpfile, 'w') do |fh| + fh.write("foo1\nfoo = blah\nfoo2\nfoo1\nfoo = baz") + end + end + + it 'errors out stating "One or no line must match the pattern"' do + expect { provider.create }.to raise_error(Puppet::Error, /One or no line must match the pattern/) + end + end + + context 'with no lines matching the after expression' do + let :content do + "foo3\nfoo = blah\nfoo2\nfoo = baz\n" + end + + before :each do + File.open(@tmpfile, 'w') do |fh| + fh.write(content) + end + end + + it 'appends the specified line to the file' do + provider.create + File.read(@tmpfile).should eq(content << resource[:line] << "\n") + end + end + end + end + + context "when removing" do + before :each do + # TODO: these should be ported over to use the PuppetLabs spec_helper + # file fixtures once the following pull request has been merged: + # https://github.com/puppetlabs/puppetlabs-stdlib/pull/73/files + tmp = Tempfile.new('tmp') + @tmpfile = tmp.path + tmp.close! + @resource = Puppet::Type::File_line.new( + {:name => 'foo', :path => @tmpfile, :line => 'foo', :ensure => 'absent' } + ) + @provider = provider_class.new(@resource) + end + it 'should remove the line if it exists' do + File.open(@tmpfile, 'w') do |fh| + fh.write("foo1\nfoo\nfoo2") + end + @provider.destroy + File.read(@tmpfile).should eql("foo1\nfoo2") + end + + it 'should remove the line without touching the last new line' do + File.open(@tmpfile, 'w') do |fh| + fh.write("foo1\nfoo\nfoo2\n") + end + @provider.destroy + File.read(@tmpfile).should eql("foo1\nfoo2\n") + end + + it 'should remove any occurence of the line' do + File.open(@tmpfile, 'w') do |fh| + fh.write("foo1\nfoo\nfoo2\nfoo\nfoo") + end + @provider.destroy + File.read(@tmpfile).should eql("foo1\nfoo2\n") + end + end +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/unit/puppet/type/anchor_spec.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/unit/puppet/type/anchor_spec.rb new file mode 100755 index 00000000000..f92065f79ba --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/unit/puppet/type/anchor_spec.rb @@ -0,0 +1,11 @@ +#!/usr/bin/env ruby + +require 'spec_helper' + +anchor = Puppet::Type.type(:anchor).new(:name => "ntp::begin") + +describe anchor do + it "should stringify normally" do + anchor.to_s.should == "Anchor[ntp::begin]" + end +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/unit/puppet/type/file_line_spec.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/unit/puppet/type/file_line_spec.rb new file mode 100755 index 00000000000..ab5b81bb96b --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/spec/unit/puppet/type/file_line_spec.rb @@ -0,0 +1,70 @@ +#! /usr/bin/env ruby -S rspec +require 'spec_helper' +require 'tempfile' +describe Puppet::Type.type(:file_line) do + let :file_line do + Puppet::Type.type(:file_line).new(:name => 'foo', :line => 'line', :path => '/tmp/path') + end + it 'should accept a line and path' do + file_line[:line] = 'my_line' + file_line[:line].should == 'my_line' + file_line[:path] = '/my/path' + file_line[:path].should == '/my/path' + end + it 'should accept a match regex' do + file_line[:match] = '^foo.*$' + file_line[:match].should == '^foo.*$' + end + it 'should not accept a match regex that does not match the specified line' do + expect { + Puppet::Type.type(:file_line).new( + :name => 'foo', + :path => '/my/path', + :line => 'foo=bar', + :match => '^bar=blah$' + )}.to raise_error(Puppet::Error, /the value must be a regex that matches/) + end + it 'should accept a match regex that does match the specified line' do + expect { + Puppet::Type.type(:file_line).new( + :name => 'foo', + :path => '/my/path', + :line => 'foo=bar', + :match => '^\s*foo=.*$' + )}.not_to raise_error + end + it 'should accept posix filenames' do + file_line[:path] = '/tmp/path' + file_line[:path].should == '/tmp/path' + end + it 'should not accept unqualified path' do + expect { file_line[:path] = 'file' }.to raise_error(Puppet::Error, /File paths must be fully qualified/) + end + it 'should require that a line is specified' do + expect { Puppet::Type.type(:file_line).new(:name => 'foo', :path => '/tmp/file') }.to raise_error(Puppet::Error, /Both line and path are required attributes/) + end + it 'should require that a file is specified' do + expect { Puppet::Type.type(:file_line).new(:name => 'foo', :line => 'path') }.to raise_error(Puppet::Error, /Both line and path are required attributes/) + end + it 'should default to ensure => present' do + file_line[:ensure].should eq :present + end + + it "should autorequire the file it manages" do + catalog = Puppet::Resource::Catalog.new + file = Puppet::Type.type(:file).new(:name => "/tmp/path") + catalog.add_resource file + catalog.add_resource file_line + + relationship = file_line.autorequire.find do |rel| + (rel.source.to_s == "File[/tmp/path]") and (rel.target.to_s == file_line.to_s) + end + relationship.should be_a Puppet::Relationship + end + + it "should not autorequire the file it manages if it is not managed" do + catalog = Puppet::Resource::Catalog.new + catalog.add_resource file_line + file_line.autorequire.should be_empty + end +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/tests/file_line.pp b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/tests/file_line.pp new file mode 100644 index 00000000000..eea693e15ec --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/tests/file_line.pp @@ -0,0 +1,9 @@ +# This is a simple smoke test +# of the file_line resource type. +file { '/tmp/dansfile': + ensure => present +}-> +file_line { 'dans_line': + line => 'dan is awesome', + path => '/tmp/dansfile', +} diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/tests/has_interface_with.pp b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/tests/has_interface_with.pp new file mode 100644 index 00000000000..e1f1353cdd9 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/tests/has_interface_with.pp @@ -0,0 +1,10 @@ +include stdlib +info('has_interface_with(\'lo\'):', has_interface_with('lo')) +info('has_interface_with(\'loX\'):', has_interface_with('loX')) +info('has_interface_with(\'ipaddress\', \'127.0.0.1\'):', has_interface_with('ipaddress', '127.0.0.1')) +info('has_interface_with(\'ipaddress\', \'127.0.0.100\'):', has_interface_with('ipaddress', '127.0.0.100')) +info('has_interface_with(\'network\', \'127.0.0.0\'):', has_interface_with('network', '127.0.0.0')) +info('has_interface_with(\'network\', \'128.0.0.0\'):', has_interface_with('network', '128.0.0.0')) +info('has_interface_with(\'netmask\', \'255.0.0.0\'):', has_interface_with('netmask', '255.0.0.0')) +info('has_interface_with(\'netmask\', \'256.0.0.0\'):', has_interface_with('netmask', '256.0.0.0')) + diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/tests/has_ip_address.pp b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/tests/has_ip_address.pp new file mode 100644 index 00000000000..8429a885539 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/tests/has_ip_address.pp @@ -0,0 +1,3 @@ +include stdlib +info('has_ip_address(\'192.168.1.256\'):', has_ip_address('192.168.1.256')) +info('has_ip_address(\'127.0.0.1\'):', has_ip_address('127.0.0.1')) diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/tests/has_ip_network.pp b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/tests/has_ip_network.pp new file mode 100644 index 00000000000..a15d8c011b6 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/tests/has_ip_network.pp @@ -0,0 +1,4 @@ +include stdlib +info('has_ip_network(\'127.0.0.0\'):', has_ip_network('127.0.0.0')) +info('has_ip_network(\'128.0.0.0\'):', has_ip_network('128.0.0.0')) + diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/tests/init.pp b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/tests/init.pp new file mode 100644 index 00000000000..9675d8374b5 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/stdlib/tests/init.pp @@ -0,0 +1 @@ +include stdlib diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/supervisord/.fixtures.yml b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/supervisord/.fixtures.yml new file mode 100644 index 00000000000..15f96922e01 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/supervisord/.fixtures.yml @@ -0,0 +1,6 @@ +fixtures: + repositories: + stdlib: "git://github.com/puppetlabs/puppetlabs-stdlib" + concat: "git://github.com/puppetlabs/puppetlabs-concat" + symlinks: + supervisord: "#{source_dir}" \ No newline at end of file diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/supervisord/.nodeset.yml b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/supervisord/.nodeset.yml new file mode 100644 index 00000000000..c9a6e5a3e24 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/supervisord/.nodeset.yml @@ -0,0 +1,27 @@ +--- +default_set: 'centos-64-x64' +sets: + 'centos-59-x64': + nodes: + "main.foo.vm": + prefab: 'centos-59-x64' + 'centos-64-x64': + nodes: + "main.foo.vm": + prefab: 'centos-64-x64' + 'debian-607-x64': + nodes: + "main.foo.vm": + prefab: 'debian-607-x64' + 'debian-70rc1-x64': + nodes: + "main.foo.vm": + prefab: 'debian-70rc1-x64' + 'ubuntu-server-10044-x64': + nodes: + "main.foo.vm": + prefab: 'ubuntu-server-10044-x64' + 'ubuntu-server-12042-x64': + nodes: + "main.foo.vm": + prefab: 'ubuntu-server-12042-x64' diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/supervisord/.travis.yml b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/supervisord/.travis.yml new file mode 100644 index 00000000000..6e544518c19 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/supervisord/.travis.yml @@ -0,0 +1,24 @@ +language: ruby +bundler_args: --without development +script: "bundle exec rake spec lint" +rvm: +- 1.8.7 +- 1.9.3 +- 2.0.0 +env: + matrix: + - PUPPET_GEM_VERSION="~> 2.7.0" + - PUPPET_GEM_VERSION="~> 3.3.0" + - PUPPET_GEM_VERSION="~> 3.4.0" +matrix: + exclude: + - rvm: 1.9.3 + env: PUPPET_GEM_VERSION="~> 2.7.0" + - rvm: 2.0.0 + env: PUPPET_GEM_VERSION="~> 2.7.0" +notifications: + email: false + +before_install: + - gem update --system 2.1.11 + - gem --version diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/supervisord/Changelog b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/supervisord/Changelog new file mode 100644 index 00000000000..ab4faa445ff --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/supervisord/Changelog @@ -0,0 +1,50 @@ +2013-10-31 - v0.2.3 + +Fixes: + +- Fixed large bug on debian wheezy where /var/run is changed from a symlink to a + directory causing all pids to be inaccessible breaking lots of services + + +2013-10-30 - v0.2.2 + +Fixes: + +- Fixed syntax error in README examples and tests + +2013-10-16 - v0.2.1 + +Fixes: + +- Fixed user params in templates +- Added missing environment support in main supervisord.conf + + +2013-10-15 - v0.2.0 + +Feature complete release + +- Added Eventlistener template and function +- Added FGCI-Program template and function +- More consistent log naming and fixed missing new lines + + +2013-10-15 - v0.1.1 + +Fixes: + +- Missing '=' in template tags when using certain parameters +- Added log file default to program define to avoid /tmp being used when not specified +- Fixed logic when not using environment variables in program + + +2013-10-15 - v0.1.0 + +Summary: + +Completed basic module functionality for + +- Install with pip +- Configure programs +- Configure groups +- Install init scripts for RedHat and Debian families diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/supervisord/Gemfile b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/supervisord/Gemfile new file mode 100644 index 00000000000..8612255f5b8 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/supervisord/Gemfile @@ -0,0 +1,14 @@ +source 'https://rubygems.org' + +group :development, :test do + gem 'rake' + gem 'puppetlabs_spec_helper', :require => false + gem 'rspec-system-puppet', '~> 2.0' + gem 'puppet-lint', '~> 0.3.2' +end + +if puppetversion = ENV['PUPPET_GEM_VERSION'] + gem 'puppet', puppetversion, :require => false +else + gem 'puppet', :require => false +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/supervisord/Modulefile b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/supervisord/Modulefile new file mode 100644 index 00000000000..4a0552115da --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/supervisord/Modulefile @@ -0,0 +1,11 @@ +name 'ajcrowe-supervisord' +version '0.2.3' +source 'git@github.com/ajcrowe/puppet-supervisord.git' +author 'Alex Crowe' +license 'Apache License, Version 2.0' +summary 'supervisord class and functions' +description 'supervisord class and functions' +project_page 'https://github.com/ajcrowe/puppet-supervisord' + +dependency 'puppetlabs/concat', '>= 1.0.0 <2.0.0' +dependency 'puppetlabs/stdlib', '>= 4.1.0' diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/supervisord/README.md b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/supervisord/README.md new file mode 100644 index 00000000000..a8419a09082 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/supervisord/README.md @@ -0,0 +1,83 @@ +# Puppet Supervisord + +[![Build Status](https://travis-ci.org/ajcrowe/puppet-supervisord.png?branch=master)](https://travis-ci.org/ajcrowe/puppet-supervisord) + +Puppet module to manage the [supervisord](http://supervisord.org/) process control system. + +Functions available to configure + +* [programs](http://supervisord.org/configuration.html#program-x-section-settings) +* [groups](http://supervisord.org/configuration.html#group-x-section-settings) +* [fcgi-programs](http://supervisord.org/configuration.html#fcgi-program-x-section-settings) +* [eventlisteners](http://supervisord.org/configuration.html#eventlistener-x-section-settings) + +## Examples + +### Configuring supervisord with defaults + +Install supervisord with pip and install an init script if available + +```ruby +include supervisord +``` + +### Install supervisord and pip + +Install supervisord and install pip if not available. + +```ruby +class supervisord { + $install_pip => true, +} +``` + +This will download [setuptool](https://bitbucket.org/pypa/setuptools) and install pip with easy_install. + +You can pass a specific url with `$setuptools_url = 'url'` + +Note: Only Debian and RedHat families have an init script currently. + +### Configure a program + +```ruby +supervisord::program { 'myprogram': + command => 'command --args', + priority => '100', + environment => { + 'HOME' => '/home/myuser', + 'PATH' => '/bin:/sbin:/usr/bin:/usr/sbin', + 'SECRET' => 'mysecret' + } +} +``` + +You may also specify a variable for a hiera lookup to retreive your environment hash. This allows you to reuse existing environment variable hashes. + +```ruby +supervisord::program { 'myprogram': + command => 'command --args', + priority => '100', + env_var => 'my_common_envs' +} +``` + +### Configure a group + +```ruby +supervisord::group { 'mygroup': + priority => 100, + program => ['program1', 'program2', 'program3'] +} +``` + +### Development + +If you have suggestions or improvements please file an issue or pull request, i'll try and sort them as quickly as possble. + +If you submit a pull please try and include tests for the new functionality. The module is tested with [Travis-CI](https://travis-ci.org/ajcrowe/puppet-supervisord). + + +### Credits + +* Debian init script sourced from the system package. +* RedHat/Centos init script sourced from https://github.com/Supervisor/initscripts diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/supervisord/Rakefile b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/supervisord/Rakefile new file mode 100644 index 00000000000..e00f7d11877 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/supervisord/Rakefile @@ -0,0 +1,7 @@ +require 'puppetlabs_spec_helper/rake_tasks' +require 'puppet-lint/tasks/puppet-lint' +require 'rspec-system/rake_task' + +PuppetLint.configuration.send('disable_80chars') +PuppetLint.configuration.send('disable_class_inherits_from_params_class') +PuppetLint.configuration.send('disable_documentation') diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/supervisord/lib/puppet/parser/functions/array2csv.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/supervisord/lib/puppet/parser/functions/array2csv.rb new file mode 100644 index 00000000000..cfa52b2bbf2 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/supervisord/lib/puppet/parser/functions/array2csv.rb @@ -0,0 +1,38 @@ +# +# Converts the array to a csv string +# +# +# $array = [ 'string1', 'string2', 'string3' ] +# +# becomes: +# +# $string = "string1,string2,string3" +# + +module Puppet::Parser::Functions + newfunction(:array2csv, :type => :rvalue, :doc => <<-'EOS' + Returns a sorted csv formatted string from an array in the form + VALUE1,VALUE2,VALUE3 + EOS + ) do |args| + + raise(Puppet::ParseError, "array2csv(): Wrong number of arguments " + + "given (#{args.size} of 1)") if args.size < 1 + + array = args[0] + + unless array.is_a?(Array) + raise(Puppet::ParseError, 'array2csv(): Requires an Array') + end + + sorted_array = array.sort + result = '' + + sorted_array.each {|value| + result += "#{value}," + } + + return result.chop! + + end +end \ No newline at end of file diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/supervisord/lib/puppet/parser/functions/hash2csv.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/supervisord/lib/puppet/parser/functions/hash2csv.rb new file mode 100644 index 00000000000..6098b67367d --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/supervisord/lib/puppet/parser/functions/hash2csv.rb @@ -0,0 +1,42 @@ +# +# Converts the hash to a csv string +# +# +# $hash = { +# HOME => '/home/user', +# ENV1 => 'env1', +# SECRET => 'secret' +# } +# +# becomes: +# +# $string = "HOME='/home/user',ENV1='env1',SECRET='secret'" +# + +module Puppet::Parser::Functions + newfunction(:hash2csv, :type => :rvalue, :doc => <<-'EOS' + Returns a csv formatted string from an hash in the form + KEY=VALUE,KEY2=VALUE2,KEY3=VALUE3 ordered by key + EOS + ) do |args| + + raise(Puppet::ParseError, "hash2csv(): Wrong number of arguments " + + "given (#{args.size} of 1)") if args.size < 1 + + hash = args[0] + + unless hash.is_a?(Hash) + raise(Puppet::ParseError, 'hash2csv(): Requires an Hash') + end + + sorted_hash = hash.sort + result = '' + + sorted_hash.each {|key, value| + result += "#{key}='#{value}'," + } + + return result.chop! + + end +end \ No newline at end of file diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/supervisord/manifests/config.pp b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/supervisord/manifests/config.pp new file mode 100644 index 00000000000..cc8b1ee49d0 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/supervisord/manifests/config.pp @@ -0,0 +1,66 @@ +class supervisord::config inherits supervisord { + + file { [ "${supervisord::config_include}", "${supervisord::log_path}"]: + ensure => directory, + owner => 'root', + mode => '0755' + } + + if $supervisord::run_path != '/var/run' { + file { $supervisord::run_path: + ensure => directory, + owner => 'root', + mode => '0755' + } + } + + if $supervisord::install_init { + + $osname = downcase($::osfamily) + + file { '/etc/init.d/supervisord': + ensure => present, + owner => 'root', + mode => '0755', + content => template("supervisord/init/${osname}_init.erb") + } + + if $supervisord::init_extras { + file { $supervisord::init_extras: + ensure => present, + owner => 'root', + mode => '0755', + content => template("supervisord/init/${osname}_extra.erb") + } + } + + } + + concat { $supervisord::config_file: + owner => 'root', + group => 'root', + mode => '0755' + } + + if $supervisord::unix_socket { + concat::fragment { 'supervisord_unix': + target => $supervisord::config_file, + content => template('supervisord/supervisord_unix.erb'), + order => 01 + } + } + + if $supervisord::inet_server { + concat::fragment { 'supervisord_inet': + target => $supervisord::config_file, + content => template('supervisord/supervisord_inet.erb'), + order => 01 + } + } + + concat::fragment { 'supervisord_main': + target => $supervisord::config_file, + content => template('supervisord/supervisord_main.erb'), + order => 02 + } +} diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/supervisord/manifests/eventlistener.pp b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/supervisord/manifests/eventlistener.pp new file mode 100644 index 00000000000..41b7cf6c730 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/supervisord/manifests/eventlistener.pp @@ -0,0 +1,60 @@ +define supervisord::eventlistener( + $command, + $ensure = present, + $events = undef, + $buffer_size = undef, + $result_handler = undef, + $env_var = undef, + $process_name = undef, + $numprocs = undef, + $numprocs_start = undef, + $priority = undef, + $autostart = undef, + $autorestart = undef, + $startsecs = undef, + $startretries = undef, + $exitcodes = undef, + $stopsignal = undef, + $stopwaitsec = undef, + $stopasgroup = undef, + $killasgroup = undef, + $user = undef, + $redirect_stderr = undef, + $stdout_logfile = "${supervisord::log_path}/eventlistener_${name}.log", + $stdout_logfile_maxbytes = undef, + $stdout_logfile_backups = undef, + $stdout_events_enabled = undef, + $stderr_logfile = "${supervisord::log_path}/eventlistener_${name}.error", + $stderr_logfile_maxbytes = undef, + $stderr_logfile_backups = undef, + $stderr_events_enabled = undef, + $environment = undef, + $directory = undef, + $umask = undef, + $serverurl = undef +) { + + include supervisord + + if $env_var { + $env_hash = hiera($env_var) + $env_string = hash2csv($env_hash) + } + elsif $environment { + $env_string = hash2csv($environment) + } + + if $events { + $events_string = array2csv($events) + } + + $conf = "${supervisord::config_include}/eventlistener_${name}.conf" + + file { $conf: + ensure => $ensure, + owner => 'root', + mode => '0755', + content => template('supervisord/conf/eventlistener.erb'), + notify => Class['supervisord::service'] + } +} diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/supervisord/manifests/fcgi_program.pp b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/supervisord/manifests/fcgi_program.pp new file mode 100644 index 00000000000..923b1798bff --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/supervisord/manifests/fcgi_program.pp @@ -0,0 +1,58 @@ +define supervisord::fcgi_program( + $command, + $socket, + $ensure = present, + $socket_owner = undef, + $socket_mode = undef, + $env_var = undef, + $process_name = undef, + $numprocs = undef, + $numprocs_start = undef, + $priority = undef, + $autostart = undef, + $autorestart = undef, + $startsecs = undef, + $startretries = undef, + $exitcodes = undef, + $stopsignal = undef, + $stopwaitsec = undef, + $stopasgroup = undef, + $killasgroup = undef, + $user = undef, + $redirect_stderr = undef, + $stdout_logfile = "${supervisord::log_path}/fcgi-program_${name}.log", + $stdout_logfile_maxbytes = undef, + $stdout_logfile_backups = undef, + $stdout_capture_maxbytes = undef, + $stdout_events_enabled = undef, + $stderr_logfile = "${supervisord::log_path}/fcgi-program_${name}.error", + $stderr_logfile_maxbytes = undef, + $stderr_logfile_backups = undef, + $stderr_capture_maxbytes = undef, + $stderr_events_enabled = undef, + $environment = undef, + $directory = undef, + $umask = undef, + $serverurl = undef +) { + + include supervisord + + if $env_var { + $env_hash = hiera($env_var) + $env_string = hash2csv($env_hash) + } + elsif $environment { + $env_string = hash2csv($environment) + } + + $conf = "${supervisord::config_include}/fcgi-program_${name}.conf" + + file { $conf: + ensure => $ensure, + owner => 'root', + mode => '0755', + content => template('supervisord/conf/fcgi_program.erb'), + notify => Class['supervisord::service'] + } +} diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/supervisord/manifests/group.pp b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/supervisord/manifests/group.pp new file mode 100644 index 00000000000..0f6b1ca2adc --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/supervisord/manifests/group.pp @@ -0,0 +1,18 @@ +define supervisord::group ( + $programs, + $ensure = present, + $priority = undef +) { + + include supervisord + + $progstring = array2csv($programs) + $conf = "${supervisord::config_include}/group_${name}.conf" + + file { $conf: + ensure => $ensure, + owner => 'root', + mode => '0755', + content => template('supervisord/conf/group.erb') + } +} diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/supervisord/manifests/init.pp b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/supervisord/manifests/init.pp new file mode 100644 index 00000000000..801c46b3b36 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/supervisord/manifests/init.pp @@ -0,0 +1,72 @@ +# This class installs supervisord and configured it to run on boot +class supervisord( + $package_ensure = $supervisord::params::package_ensure, + $service_ensure = $supervisord::params::service_ensure, + $install_init = $supervisord::params::install_init, + $install_pip = false, + $init_extras = $supervisord::params::init_extras, + $setuptools_url = $supervisord::params::setuptools_url, + $executable = $supervisord::params::executable, + + $log_path = $supervisord::params::log_path, + $log_file = $supervisord::params::log_file, + $log_level = $supervisord::params::log_level, + $logfile_maxbytes = $supervisord::params::logfile_maxbytes, + $logfile_backups = $supervisord::params::logfile_backups, + + $run_path = $supervisord::params::run_path, + $pid_file = $supervisord::params::pid_file, + $nodaemon = $supervisord::params::nodaemon, + $minfds = $supervisord::params::minfds, + $minprocs = $supervisord::params::minprocs, + $config_path = $supervisord::params::config_path, + $config_include = $supervisord::params::config_include, + $config_file = $supervisord::params::config_file, + $umask = $supervisord::params::umask, + + $unix_socket = $supervisord::params::unix_socket, + $unix_socket_file = $supervisord::params::unix_socket_file, + $unix_socket_mode = $supervisord::params::unix_socket_mode, + $unix_socket_owner = $supervisord::params::unix_socket_owner, + $unix_scoket_group = $supervisord::params::unix_socket_group, + + $inet_server = $supervisord::params::inet_server, + $inet_server_hostname = $supervisord::params::inet_hostname, + $inet_server_port = $supervisord::params::inet_port, + + $unix_auth = false, + $unix_username = undef, + $unix_password = undef, + + $inet_auth = false, + $inet_username = undef, + $inet_password = undef, + + $user = undef, + $identifier = undef, + $childlogdir = undef, + $environment = undef, + $env_var = undef, + $strip_ansi = false, + $nocleanup = false + +) inherits supervisord::params { + + if $env_var { + $env_hash = hiera($env_var) + $env_string = hash2csv($env_hash) + } + elsif $environment { + $env_string = hash2csv($environment) + } + + if $install_pip { + include supervisord::pip + Class['supervisord::pip'] -> Class['supervisord::install'] + } + + include supervisord::install, supervisord::config, supervisord::service + + Class['supervisord::install'] -> Class['supervisord::config'] ~> Class['supervisord::service'] + +} diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/supervisord/manifests/install.pp b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/supervisord/manifests/install.pp new file mode 100644 index 00000000000..1d36ec68334 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/supervisord/manifests/install.pp @@ -0,0 +1,6 @@ +class supervisord::install inherits supervisord { + package { 'supervisor': + ensure => $supervisord::package_ensure, + provider => 'pip' + } +} diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/supervisord/manifests/params.pp b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/supervisord/manifests/params.pp new file mode 100644 index 00000000000..87d17d16179 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/supervisord/manifests/params.pp @@ -0,0 +1,49 @@ +class supervisord::params { + $package_ensure = 'installed' + $service_ensure = 'running' + $package_name = 'supervisor' + $executable = '/usr/local/bin/supervisord' + + $run_path = '/var/run' + $pid_file = "${run_path}/supervisord.pid" + $log_path = '/var/log/supervisor' + $log_file = "${log_path}/supervisord.log" + $logfile_maxbytes = '50MB' + $logfile_backups = '10' + $log_level = 'info' + $nodaemon = false + $minfds = '1024' + $minprocs = '200' + $umask = '022' + $config_include = '/etc/supervisor.d' + $config_file = '/etc/supervisord.conf' + $setuptools_url = 'https://bitbucket.org/pypa/setuptools/raw/bootstrap/ez_setup.py' + + $unix_socket = true + $unix_socket_file = "${run_path}/supervisor.sock" + $unix_socket_mode = '0700' + $unix_socket_owner = 'nobody' + + $inet_server = false + $inet_server_hostname = '127.0.0.1' + $inet_server_port = '9001' + $inet_auth = false + + case $::osfamily { + 'RedHat': { + $init_extras = '/etc/sysconfig/supervisord' + $unix_socket_group = 'nobody' + $install_init = true + } + 'Debian': { + $init_extras = '/etc/default/supervisor' + $unix_socket_group = 'nogroup' + $install_init = true + } + default: { + $init_extras = false + $unix_socket_group = 'nogroup' + $install_init = false + } + } +} diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/supervisord/manifests/pip.pp b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/supervisord/manifests/pip.pp new file mode 100644 index 00000000000..c05f2d7f64b --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/supervisord/manifests/pip.pp @@ -0,0 +1,26 @@ +class supervisord::pip inherits supervisord { + + Exec { + path => '/usr/local/bin:/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/sbin' + } + + exec { 'install_setuptools': + command => "curl ${supervisord::setuptools_url} | python", + cwd => '/tmp', + unless => 'which easy_install', + before => Exec['install_pip'] + } + + exec { 'install_pip': + command => 'easy_install pip', + unless => 'which pip' + } + + if $::osfamily == 'RedHat' { + exec { 'pip_provider_name_fix': + command => 'alternatives --install /usr/bin/pip-python pip-python /usr/bin/pip 1', + subscribe => Exec['install_pip'], + unless => 'which pip-python' + } + } +} diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/supervisord/manifests/program.pp b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/supervisord/manifests/program.pp new file mode 100644 index 00000000000..8a00d41c77c --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/supervisord/manifests/program.pp @@ -0,0 +1,55 @@ +define supervisord::program( + $command, + $ensure = present, + $env_var = undef, + $process_name = undef, + $numprocs = undef, + $numprocs_start = undef, + $priority = undef, + $autostart = undef, + $autorestart = undef, + $startsecs = undef, + $startretries = undef, + $exitcodes = undef, + $stopsignal = undef, + $stopwaitsec = undef, + $stopasgroup = undef, + $killasgroup = undef, + $user = undef, + $redirect_stderr = undef, + $stdout_logfile = "${supervisord::log_path}/program_${name}.log", + $stdout_logfile_maxbytes = undef, + $stdout_logfile_backups = undef, + $stdout_capture_maxbytes = undef, + $stdout_events_enabled = undef, + $stderr_logfile = "${supervisord::log_path}/program_${name}.error", + $stderr_logfile_maxbytes = undef, + $stderr_logfile_backups = undef, + $stderr_capture_maxbytes = undef, + $stderr_events_enabled = undef, + $environment = undef, + $directory = undef, + $umask = undef, + $serverurl = undef +) { + + include supervisord + + if $env_var { + $env_hash = hiera($env_var) + $env_string = hash2csv($env_hash) + } + elsif $environment { + $env_string = hash2csv($environment) + } + + $conf = "${supervisord::config_include}/program_${name}.conf" + + file { $conf: + ensure => $ensure, + owner => 'root', + mode => '0755', + content => template('supervisord/conf/program.erb'), + notify => Class['supervisord::service'] + } +} diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/supervisord/manifests/service.pp b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/supervisord/manifests/service.pp new file mode 100644 index 00000000000..6e17976165d --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/supervisord/manifests/service.pp @@ -0,0 +1,8 @@ +class supervisord::service inherits supervisord { + service { 'supervisord': + ensure => $supervisord::service_ensure, + enable => true, + hasrestart => true, + hasstatus => true + } +} diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/supervisord/spec/classes/supervisord_spec.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/supervisord/spec/classes/supervisord_spec.rb new file mode 100644 index 00000000000..238876c7dcd --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/supervisord/spec/classes/supervisord_spec.rb @@ -0,0 +1,98 @@ +require 'spec_helper' + +describe 'supervisord' do + + concatdir = '/var/lib/puppet/concat' + configfile = '/etc/supervisord.conf' + let(:facts) {{ :concat_basedir => concatdir }} + + it { should contain_class('supervisord') } + it { should contain_class('supervisord::install') } + it { should contain_class('supervisord::config') } + it { should contain_class('supervisord::service') } + it { should contain_concat__fragment('supervisord_main').with_content(/logfile/) } + + describe '#install_pip' do + context 'default' do + it { should_not contain_class('supervisord::pip') } + end + + context 'true' do + let (:params) {{ :install_pip => true }} + it { should contain_class('supervisord::pip') } + end + end + + describe '#env_var' do + context 'default' do + it { should contain_class('supervisord').without_env_hash } + it { should contain_class('supervisord').without_env_string } + end + #context 'is specified' do + # let(:params) {{ :env_var => 'foovars' }} + # let(:hiera_data) {{ :foovars => { 'key1' => 'value1', 'key2' => 'value2' } }} + # it { should contain_concat__fragment('supervisord_main').with_content(/environment=key1='value1',key2='value2'/) } + #end + end + + describe '#environment' do + context 'default' do + it { should contain_class('supervisord').without_env_string } + end + context 'is specified' do + let(:params) {{ :environment => { 'key1' => 'value1', 'key2' => 'value2' } }} + it { should contain_concat__fragment('supervisord_main').with_content(/environment=key1='value1',key2='value2'/) } + end + end + + describe '#install_init' do + context 'default' do + it { should_not contain_file('/etc/init.d/supervisord') } + end + + context 'false' do + it { should_not contain_file('/etc/init.d/supervisord') } + end + + describe 'on supported OS' + context 'with Debian' do + let(:facts) {{ :osfamily => 'Debian', :concat_basedir => concatdir }} + it { should contain_file('/etc/init.d/supervisord') } + end + + context 'with RedHat' do + let(:facts) {{ :osfamily => 'RedHat', :concat_basedir => concatdir }} + it { should contain_file('/etc/init.d/supervisord') } + end + end + + describe '#unix_socket' do + context 'default' do + it { should contain_concat__fragment('supervisord_unix')} + end + context 'false' do + let(:params) {{ :unix_socket => false }} + it { should_not contain_concat__fragment('supervisord_unix')} + end + end + + describe '#inet_server' do + context 'default' do + it { should_not contain_concat__fragment('supervisord_inet')} + end + context 'true' do + let(:params) {{ :inet_server => true }} + it { should contain_concat__fragment('supervisord_inet')} + end + end + + describe '#run_path' do + context 'default' do + it { should_not contain_file('/var/run') } + end + context 'custom setting' do + let(:params) {{ :run_path => '/var/run/supervisord'}} + it { should contain_file('/var/run/supervisord') } + end + end +end \ No newline at end of file diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/supervisord/spec/defines/eventlistener_spec.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/supervisord/spec/defines/eventlistener_spec.rb new file mode 100644 index 00000000000..6e04f44f97b --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/supervisord/spec/defines/eventlistener_spec.rb @@ -0,0 +1,15 @@ +require 'spec_helper' + +describe 'supervisord::eventlistener', :type => :define do + let(:title) {'foo'} + let(:default_params) {{ :command => 'bar', + :stdout_logfile => '/var/log/supervisor/eventlistener_foo.log', + :stderr_logfile => '/var/log/supervisor/eventlistener_foo.error', + }} + let(:params) { default_params } + let(:facts) {{ :concat_basedir => '/var/lib/puppet/concat' }} + + it { should contain_supervisord__eventlistener('foo') } + it { should contain_file('/etc/supervisor.d/eventlistener_foo.conf').with_content(/command=bar/) } + +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/supervisord/spec/defines/fcgi_program_spec.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/supervisord/spec/defines/fcgi_program_spec.rb new file mode 100644 index 00000000000..7fd8ab07b86 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/supervisord/spec/defines/fcgi_program_spec.rb @@ -0,0 +1,22 @@ +require 'spec_helper' + +describe 'supervisord::fcgi_program', :type => :define do + let(:title) {'foo'} + let(:default_params) {{ :command => 'bar', + :socket => 'tcp://localhost:1000', + :stdout_logfile => '/var/log/supervisor/fcgi-program_foo.log', + :stderr_logfile => '/var/log/supervisor/fcgi-program_foo.error', + :user => 'baz' + }} + let(:params) { default_params } + let(:facts) {{ :concat_basedir => '/var/lib/puppet/concat' }} + + it { should contain_supervisord__fcgi_program('foo') } + it { should contain_file('/etc/supervisor.d/fcgi-program_foo.conf').with_content(/\[fcgi-program:foo\]/) } + it { should contain_file('/etc/supervisor.d/fcgi-program_foo.conf').with_content(/socket=tcp:\/\/localhost:1000/) } + it { should contain_file('/etc/supervisor.d/fcgi-program_foo.conf').with_content(/command=bar/) } + it { should contain_file('/etc/supervisor.d/fcgi-program_foo.conf').with_content(/user=baz/) } + it { should contain_file('/etc/supervisor.d/fcgi-program_foo.conf').with_content(/stdout_logfile=\/var\/log\/supervisor\/fcgi-program_foo.log/) } + it { should contain_file('/etc/supervisor.d/fcgi-program_foo.conf').with_content(/stderr_logfile=\/var\/log\/supervisor\/fcgi-program_foo.error/) } + +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/supervisord/spec/defines/group_spec.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/supervisord/spec/defines/group_spec.rb new file mode 100644 index 00000000000..ba8d70196ce --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/supervisord/spec/defines/group_spec.rb @@ -0,0 +1,22 @@ +require 'spec_helper' + +describe 'supervisord::group', :type => :define do + let(:title) {'foo'} + let(:params) {{ :programs => ['bar', 'baz'] }} + let(:facts) {{ :concat_basedir => '/var/lib/puppet/concat' }} + + it { should contain_supervisord__group('foo').with_program } + it { should contain_file('/etc/supervisor.d/group_foo.conf').with_content(/programs=bar,baz/) } + + describe '#priority' do + it 'should default to undef' do + should_not contain_file('/etc/supervisor.d/group_foo.conf').with_content(/priority/) + should contain_file('/etc/supervisor.d/group_foo.conf').with_content(/programs=bar,baz/) + end + context '100' do + let(:params) {{ :priority => '100', :programs => ['bar', 'baz'] }} + it { should contain_file('/etc/supervisor.d/group_foo.conf').with_content(/priority=100/) } + it { should contain_file('/etc/supervisor.d/group_foo.conf').with_content(/programs=bar,baz/) } + end + end +end \ No newline at end of file diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/supervisord/spec/defines/program_spec.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/supervisord/spec/defines/program_spec.rb new file mode 100644 index 00000000000..077828bdfcf --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/supervisord/spec/defines/program_spec.rb @@ -0,0 +1,20 @@ +require 'spec_helper' + +describe 'supervisord::program', :type => :define do + let(:title) {'foo'} + let(:default_params) {{ :command => 'bar', + :stdout_logfile => '/var/log/supervisor/program_foo.log', + :stderr_logfile => '/var/log/supervisor/program_foo.error', + :user => 'baz' + }} + let(:params) { default_params } + let(:facts) {{ :concat_basedir => '/var/lib/puppet/concat' }} + + it { should contain_supervisord__program('foo') } + it { should contain_file('/etc/supervisor.d/program_foo.conf').with_content(/\[program:foo\]/) } + it { should contain_file('/etc/supervisor.d/program_foo.conf').with_content(/command=bar/) } + it { should contain_file('/etc/supervisor.d/program_foo.conf').with_content(/user=baz/) } + it { should contain_file('/etc/supervisor.d/program_foo.conf').with_content(/stdout_logfile=\/var\/log\/supervisor\/program_foo.log/) } + it { should contain_file('/etc/supervisor.d/program_foo.conf').with_content(/stderr_logfile=\/var\/log\/supervisor\/program_foo.error/) } + +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/supervisord/spec/functions/array2csv_spec.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/supervisord/spec/functions/array2csv_spec.rb new file mode 100644 index 00000000000..dd8dffa07ec --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/supervisord/spec/functions/array2csv_spec.rb @@ -0,0 +1,8 @@ +require 'spec_helper' + +describe 'array2csv' do + it { should run.with_params(['value1']).and_return('value1') } + it { should run.with_params(['value1', 'value2', 'value3']).and_return('value1,value2,value3') } + it { should run.with_params('foo').and_raise_error(Puppet::ParseError) } + it { should run.with_params().and_raise_error(Puppet::ParseError) } +end \ No newline at end of file diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/supervisord/spec/functions/hash2csv_spec.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/supervisord/spec/functions/hash2csv_spec.rb new file mode 100644 index 00000000000..68f04a6445a --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/supervisord/spec/functions/hash2csv_spec.rb @@ -0,0 +1,8 @@ +require 'spec_helper' + +describe 'hash2csv' do + it { should run.with_params({'key1' => 'value1'}).and_return("key1='value1'") } + it { should run.with_params({'key1' => 'value1', 'key2' => 'value2'}).and_return("key1='value1',key2='value2'") } + it { should run.with_params('foo').and_raise_error(Puppet::ParseError) } + it { should run.with_params().and_raise_error(Puppet::ParseError) } +end \ No newline at end of file diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/supervisord/spec/spec_helper.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/supervisord/spec/spec_helper.rb new file mode 100644 index 00000000000..644f7c33ac0 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/supervisord/spec/spec_helper.rb @@ -0,0 +1,9 @@ +require 'puppetlabs_spec_helper/module_spec_helper' + +fixture_path = File.expand_path(File.join(__FILE__, '..', 'fixtures')) + +RSpec.configure do |c| + c.module_path = File.join(fixture_path, 'modules') + c.manifest_dir = File.join(fixture_path, 'manifests') +end + diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/supervisord/spec/spec_helper_system.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/supervisord/spec/spec_helper_system.rb new file mode 100644 index 00000000000..a790d7d526c --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/supervisord/spec/spec_helper_system.rb @@ -0,0 +1,25 @@ +require 'rspec-system/spec_helper' +require 'rspec-system-puppet/helpers' + +include RSpecSystemPuppet::Helpers + +RSpec.configure do |c| + # Project root + proj_root = File.expand_path(File.join(File.dirname(__FILE__), '..')) + + # Enable colour + c.tty = true + + # This is where we 'setup' the nodes before running our tests + c.before :suite do + # Install puppet + puppet_install + puppet_master_install + + # Replace mymodule with your module name + puppet_module_install(:source => proj_root, :module_name => 'supervisord') + shell('puppet module install puppetlabs/stdlib') + shell('puppet module install puppetlabs/concat') + + end +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/supervisord/spec/system/basic_spec.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/supervisord/spec/system/basic_spec.rb new file mode 100644 index 00000000000..62cf7dd8c2e --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/supervisord/spec/system/basic_spec.rb @@ -0,0 +1,120 @@ +require 'spec_helper_system' + +describe 'basic install' do + + it 'class should work with no errors' do + pp = <<-EOS + class { 'supervisord': install_pip => true, install_init => true} + EOS + + puppet_apply(pp) do |r| + r.exit_code.should_not == 1 + r.refresh + r.exit_code.should be_zero + end + + shell("pgrep supervisord") do |r| + r.exit_code.should be_zero + end + + end +end + +describe 'add a program config' do + + it 'supervisord::program should install a program config' do + + pp = <<-EOS + include supervisord + supervisord::program { 'test': + command => 'echo', + priority => '100', + environment => { + 'HOME' => '/root', + 'PATH' => '/bin', + } + } + EOS + + puppet_apply(pp) do |r| + r.exit_code.should_not == 1 + r.refresh + r.exit_code.should be_zero + end + + shell("grep command=echo /etc/supervisor.d/program_test.conf") do |r| + r.exit_code.should be_zero + end + shell("grep priority=100 /etc/supervisor.d/program_test.conf") do |r| + r.exit_code.should be_zero + end + shell('grep "environment=" /etc/supervisor.d/program_test.conf') do |r| + r.exit_code.should be_zero + end + end +end + +describe 'add a fcgi-program config' do + + it 'supervisord::fcgi_program should install a program config' do + + pp = <<-EOS + include supervisord + supervisord::fcgi_program { 'test': + socket => 'tcp://localhost:1000', + command => 'echo', + priority => '100', + environment => { + 'HOME' => '/root', + 'PATH' => '/bin', + } + } + EOS + + puppet_apply(pp) do |r| + r.exit_code.should_not == 1 + r.refresh + r.exit_code.should be_zero + end + + shell("grep socket=tcp://localhost:1000 /etc/supervisor.d/fcgi-program_test.conf") do |r| + r.exit_code.should be_zero + end + shell("grep command=echo /etc/supervisor.d/fcgi-program_test.conf") do |r| + r.exit_code.should be_zero + end + shell("grep priority=100 /etc/supervisor.d/fcgi-program_test.conf") do |r| + r.exit_code.should be_zero + end + shell('grep "environment=" /etc/supervisor.d/fcgi-program_test.conf') do |r| + r.exit_code.should be_zero + end + end +end + +describe 'add a group config' do + + it 'supervisord::group should install a program config' do + + pp = <<-EOS + include supervisord + supervisord::group { 'test': + programs => ['program1', 'program2'], + priority => '100', + } + EOS + + puppet_apply(pp) do |r| + r.exit_code.should_not == 1 + r.refresh + r.exit_code.should be_zero + end + + shell('grep "programs=program1,program2" /etc/supervisor.d/group_test.conf') do |r| + r.exit_code.should be_zero + end + shell("grep priority=100 /etc/supervisor.d/fcgi-program_test.conf") do |r| + r.exit_code.should be_zero + end + end +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/supervisord/templates/conf/eventlistener.erb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/supervisord/templates/conf/eventlistener.erb new file mode 100644 index 00000000000..4ee2b893419 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/supervisord/templates/conf/eventlistener.erb @@ -0,0 +1,88 @@ +[eventlistener:<%= @name %>] +command=<%= @command %> +<% if @process_name -%> +process_name=<%= @process_name %> +<% end -%> +<% if @numprocs -%> +numprocs=<%= @numprocs %> +<% end -%> +<% if @numprocs_start -%> +numprocs_start=<%= @numprocs_start %> +<% end -%> +<% if @events_string -%> +events=<%= @events_string %> +<% end -%> +<% if @buffer_size -%> +buffer_size=<%= @buffer_size %> +<% end -%> +<% if @result_handler -%> +result_handler=<%= @result_handler %> +<% end -%> +<% if @priority -%> +priority=<%= @priority %> +<% end -%> +<% if @autostart -%> +autostart=<%= @autostart %> +<% end -%> +<% if @autorestart -%> +autorestart=<%= @autorestart %> +<% end -%> +<% if @startsecs -%> +startsecs=<%= @startsecs %> +<% end -%> +<% if @startretries -%> +startretries=<%= @startretries %> +<% end -%> +<% if @exitcodes -%> +exitcodes=<%= @exitcodes %> +<% end -%> +<% if @stopsignal -%> +stopsignal=<%= @stopsignal %> +<% end -%> +<% if @stopwaitsec -%> +stopwaitsec=<%= @stopwaitsec %> +<% end -%> +<% if @stopasgroup -%> +stopasgroup=<%= @stopasgroup %> +<% end -%> +<% if @killasgroup -%> +killasgroup=<%= @killasgroup %> +<% end -%> +<% if @user -%> +user=<%= @user %> +<% end -%> +<% if @redirect_stderr -%> +redirect_stderr=<%= @redirect_stderr %> +<% end -%> +stdout_logfile=<%= @stdout_logfile %> +<% if @stdout_logfile_maxbytes -%> +stdout_logfile_maxbytes=<%= @stdout_logfile_maxbytes %> +<% end -%> +<% if @stdout_logfile_backups -%> +stdout_logfile_backups=<%= @stdout_logfile_backups %> +<% end -%> +<% if @stdout_events_enabled -%> +stdout_events_enabled=<%= @stdout_events_enabled %> +<% end -%> +stderr_logfile=<%= @stderr_logfile %> +<% if @stderr_logfile_maxbytes -%> +stderr_logfile_maxbytes=<%= @stderr_logfile_maxbytes %> +<% end -%> +<% if @stderr_logfile_backups -%> +stderr_logfile_backups=<%= @stderr_logfile_backups %> +<% end -%> +<% if @stderr_events_enabled -%> +stderr_events_enabled=<%= @stderr_events_enabled %> +<% end -%> +<% if @env_string -%> +environment=<%= @env_string %> +<% end -%> +<% if @directory -%> +directory=<%= @directory %> +<% end -%> +<% if @umask -%> +umask=<%= @umask %> +<% end -%> +<% if @serverurl -%> +serverurl=<%= @serverurl %> +<% end -%> diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/supervisord/templates/conf/fcgi_program.erb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/supervisord/templates/conf/fcgi_program.erb new file mode 100644 index 00000000000..a1478bce536 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/supervisord/templates/conf/fcgi_program.erb @@ -0,0 +1,96 @@ +[fcgi-program:<%= @name %>] +command=<%= @command %> +socket=<%= @socket %> +<% if @socket_owner -%> +socket_owner=<%= @socket_owner %> +<% end -%> +<% if @socket_mode -%> +socket_mode=<%= @socket_mode %> +<% end -%> +<% if @process_name -%> +process_name=<%= @process_name %> +<% end -%> +<% if @numprocs -%> +numprocs=<%= @numprocs %> +<% end -%> +<% if @numprocs_start -%> +numprocs_start=<%= @numprocs_start %> +<% end -%> +<% if @priority -%> +priority=<%= @priority %> +<% end -%> +<% if @autostart -%> +autostart=<%= @autostart %> +<% end -%> +<% if @autorestart -%> +autorestart=<%= @autorestart %> +<% end -%> +<% if @startsecs -%> +startsecs=<%= @startsecs %> +<% end -%> +<% if @startretries -%> +startretries=<%= @startretries %> +<% end -%> +<% if @exitcodes -%> +exitcodes=<%= @exitcodes %> +<% end -%> +<% if @stopsignal -%> +stopsignal=<%= @stopsignal %> +<% end -%> +<% if @stopwaitsec -%> +stopwaitsec=<%= @stopwaitsec %> +<% end -%> +<% if @stopasgroup -%> +stopasgroup=<%= @stopasgroup %> +<% end -%> +<% if @killasgroup -%> +killasgroup=<%= @killasgroup %> +<% end -%> +<% if @user -%> +user=<%= @user %> +<% end -%> +<% if @redirect_stderr -%> +redirect_stderr=<%= @redirect_stderr %> +<% end -%> +<% if @stdout_logfile -%> +stdout_logfile=<%= @stdout_logfile %> +<% end -%> +<% if @stdout_logfile_maxbytes -%> +stdout_logfile_maxbytes=<%= @stdout_logfile_maxbytes %> +<% end -%> +<% if @stdout_logfile_backups -%> +stdout_logfile_backups=<%= @stdout_logfile_backups %> +<% end -%> +<% if @stdout_capture_maxbytes -%> +stdout_capture_maxbytes=<%= @stdout_capture_maxbytes %> +<% end -%> +<% if @stdout_events_enabled -%> +stdout_events_enabled=<%= @stdout_events_enabled %> +<% end -%> +<% if @stderr_logfile -%> +stderr_logfile=<%= @stderr_logfile %> +<% end -%> +<% if @stderr_logfile_maxbytes -%> +stderr_logfile_maxbytes=<%= @stderr_logfile_maxbytes %> +<% end -%> +<% if @stderr_logfile_backups -%> +stderr_logfile_backups=<%= @stderr_logfile_backups %> +<% end -%> +<% if @stderr_capture_maxbytes -%> +stderr_capture_maxbytes=<%= @stderr_capture_maxbytes %> +<% end -%> +<% if @stderr_events_enabled -%> +stderr_events_enabled=<%= @stderr_events_enabled %> +<% end -%> +<% if @env_string -%> +environment=<%= @env_string %> +<% end -%> +<% if @directory -%> +directory=<%= @directory %> +<% end -%> +<% if @umask -%> +umask=<%= @umask %> +<% end -%> +<% if @serverurl -%> +serverurl=<%= @serverurl %> +<% end -%> diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/supervisord/templates/conf/group.erb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/supervisord/templates/conf/group.erb new file mode 100644 index 00000000000..478a02e4504 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/supervisord/templates/conf/group.erb @@ -0,0 +1,5 @@ +[group:<%= @name %>] +programs=<%= @progstring %> +<% if @priority -%> +priority=<%= @priority %> +<% end -%> diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/supervisord/templates/conf/program.erb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/supervisord/templates/conf/program.erb new file mode 100644 index 00000000000..ca96d34d6ad --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/supervisord/templates/conf/program.erb @@ -0,0 +1,89 @@ +[program:<%= @name %>] +command=<%= @command %> +<% if @process_name -%> +process_name=<%= @process_name %> +<% end -%> +<% if @numprocs -%> +numprocs=<%= @numprocs %> +<% end -%> +<% if @numprocs_start -%> +numprocs_start=<%= @numprocs_start %> +<% end -%> +<% if @priority -%> +priority=<%= @priority %> +<% end -%> +<% if @autostart -%> +autostart=<%= @autostart %> +<% end -%> +<% if @autorestart -%> +autorestart=<%= @autorestart %> +<% end -%> +<% if @startsecs -%> +startsecs=<%= @startsecs %> +<% end -%> +<% if @startretries -%> +startretries=<%= @startretries %> +<% end -%> +<% if @exitcodes -%> +exitcodes=<%= @exitcodes %> +<% end -%> +<% if @stopsignal -%> +stopsignal=<%= @stopsignal %> +<% end -%> +<% if @stopwaitsec -%> +stopwaitsec=<%= @stopwaitsec %> +<% end -%> +<% if @stopasgroup -%> +stopasgroup=<%= @stopasgroup %> +<% end -%> +<% if @killasgroup -%> +killasgroup=<%= @killasgroup %> +<% end -%> +<% if @user -%> +user=<%= @user %> +<% end -%> +<% if @redirect_stderr -%> +redirect_stderr=<%= @redirect_stderr %> +<% end -%> +<% if @stdout_logfile -%> +stdout_logfile=<%= @stdout_logfile %> +<% end -%> +<% if @stdout_logfile_maxbytes -%> +stdout_logfile_maxbytes=<%= @stdout_logfile_maxbytes %> +<% end -%> +<% if @stdout_logfile_backups -%> +stdout_logfile_backups=<%= @stdout_logfile_backups %> +<% end -%> +<% if @stdout_capture_maxbytes -%> +stdout_capture_maxbytes=<%= @stdout_capture_maxbytes %> +<% end -%> +<% if @stdout_events_enabled -%> +stdout_events_enabled=<%= @stdout_events_enabled %> +<% end -%> +<% if @stderr_logfile -%> +stderr_logfile=<%= @stderr_logfile %> +<% end -%> +<% if @stderr_logfile_maxbytes -%> +stderr_logfile_maxbytes=<%= @stderr_logfile_maxbytes %> +<% end -%> +<% if @stderr_logfile_backups -%> +stderr_logfile_backups=<%= @stderr_logfile_backups %> +<% end -%> +<% if @stderr_capture_maxbytes -%> +stderr_capture_maxbytes=<%= @stderr_capture_maxbytes %> +<% end -%> +<% if @stderr_events_enabled -%> +stderr_events_enabled=<%= @stderr_events_enabled %> +<% end -%> +<% if @env_string -%> +environment=<%= @env_string %> +<% end -%> +<% if @directory -%> +directory=<%= @directory %> +<% end -%> +<% if @umask -%> +umask=<%= @umask %> +<% end -%> +<% if @serverurl -%> +serverurl=<%= @serverurl %> +<% end -%> diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/supervisord/templates/init/debian_extra.erb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/supervisord/templates/init/debian_extra.erb new file mode 100644 index 00000000000..232f5356da3 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/supervisord/templates/init/debian_extra.erb @@ -0,0 +1,10 @@ +# Defaults for supervisor initscript +# sourced by /etc/init.d/supervisor +# installed at /etc/default/supervisor by the maintainer scripts + +# +# This is a POSIX shell fragment +# + +# Additional options that are passed to the Daemon. +DAEMON_OPTS="-c <%= @config_file %>" diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/supervisord/templates/init/debian_init.erb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/supervisord/templates/init/debian_init.erb new file mode 100644 index 00000000000..b94f9337f59 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/supervisord/templates/init/debian_init.erb @@ -0,0 +1,133 @@ +#! /bin/sh +### BEGIN INIT INFO +# Provides: supervisor +# Required-Start: $remote_fs $network $named +# Required-Stop: $remote_fs $network $named +# Default-Start: 2 3 4 5 +# Default-Stop: 0 1 6 +# Short-Description: Start/stop supervisor +# Description: Start/stop supervisor daemon and its configured +# subprocesses. +### END INIT INFO + + +PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin +DAEMON=<%= @executable %> +NAME=supervisord +DESC=supervisor + +test -x $DAEMON || exit 0 + +LOGDIR=<%= @log_path %> +PIDFILE=<%= @pid_file %> +DODTIME=5 # Time to wait for the server to die, in seconds + # If this value is set too low you might not + # let some servers to die gracefully and + # 'restart' will not work + +# Include supervisor defaults if available +if [ -f /etc/default/supervisor ] ; then + . /etc/default/supervisor +fi + +set -e + +running_pid() +{ + # Check if a given process pid's cmdline matches a given name + pid=$1 + name=$2 + [ -z "$pid" ] && return 1 + [ ! -d /proc/$pid ] && return 1 + (cat /proc/$pid/cmdline | tr "\000" "\n"|grep -q $name) || return 1 + return 0 +} + +running() +{ +# Check if the process is running looking at /proc +# (works for all users) + + # No pidfile, probably no daemon present + [ ! -f "$PIDFILE" ] && return 1 + # Obtain the pid and check it against the binary name + pid=`cat $PIDFILE` + running_pid $pid $DAEMON || return 1 + return 0 +} + +force_stop() { +# Forcefully kill the process + [ ! -f "$PIDFILE" ] && return + if running ; then + kill -15 $pid + # Is it really dead? + [ -n "$DODTIME" ] && sleep "$DODTIME"s + if running ; then + kill -9 $pid + [ -n "$DODTIME" ] && sleep "$DODTIME"s + if running ; then + echo "Cannot kill $DESC (pid=$pid)!" + exit 1 + fi + fi + fi + rm -f $PIDFILE + return 0 +} + +case "$1" in + start) + if [ -e $PIDFILE ]; then + echo "$DESC already running with pid: `cat $PIDFILE`" + exit 0 + fi + echo -n "Starting $DESC: " + start-stop-daemon --start --quiet --pidfile $PIDFILE \ + --exec $DAEMON -- $DAEMON_OPTS + test -f $PIDFILE || sleep 1 + if running ; then + echo "$NAME." + else + echo " ERROR." + fi + ;; + stop) + echo -n "Stopping $DESC: " + start-stop-daemon --stop --quiet --oknodo --pidfile $PIDFILE + echo "$NAME." + ;; + force-stop) + echo -n "Forcefully stopping $DESC: " + force_stop + if ! running ; then + echo "$NAME." + else + echo " ERROR." + fi + ;; + restart) + echo -n "Restarting $DESC: " + start-stop-daemon --stop --quiet --oknodo --pidfile $PIDFILE + [ -n "$DODTIME" ] && sleep $DODTIME + start-stop-daemon --start --quiet --pidfile \ + $PIDFILE --exec $DAEMON -- $DAEMON_OPTS + echo "$NAME." + ;; + status) + echo -n "$DESC is " + if running ; then + echo "running" + else + echo "not running." + exit 1 + fi + ;; + *) + N=/etc/init.d/$NAME + echo "Usage: $N {start|stop|restart|status|force-stop}" >&2 + exit 1 + ;; +esac + +exit 0 diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/supervisord/templates/init/redhat_extra.erb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/supervisord/templates/init/redhat_extra.erb new file mode 100644 index 00000000000..b892c2d6203 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/supervisord/templates/init/redhat_extra.erb @@ -0,0 +1,8 @@ +# this is sourced by the supervisord init script +# written by jkoppe + +set -a + +# should probably put both of these options as runtime arguments +OPTIONS="-c <%= @config_file %>" +PIDFILE=<%= @pid_file %> diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/supervisord/templates/init/redhat_init.erb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/supervisord/templates/init/redhat_init.erb new file mode 100644 index 00000000000..1dc2da2aff1 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/supervisord/templates/init/redhat_init.erb @@ -0,0 +1,112 @@ +#!/bin/bash +# +# supervisord This scripts turns supervisord on +# +# Author: Mike McGrath (based off yumupdatesd) +# Jason Koppe adjusted to read sysconfig, +# use supervisord tools to start/stop, conditionally wait +# for child processes to shutdown, and startup later +# +# chkconfig: 345 83 04 +# +# description: supervisor is a process control utility. It has a web based +# xmlrpc interface as well as a few other nifty features. +# processname: supervisord +# config: <%= @config_file %> +# pidfile: <%= @pid_file %> +# + +# source function library +. /etc/rc.d/init.d/functions + +# source system settings +[ -e <%= @init_extras %> ] && . <%= @init_extras %> + +RETVAL=0 +DAEMON=/usr/bin/supervisord +DESC=supervisord + +running_pid() +{ + # Check if a given process pid's cmdline matches a given name + pid=$1 + name=$2 + [ -z "$pid" ] && return 1 + [ ! -d /proc/$pid ] && return 1 + (cat /proc/$pid/cmdline | tr "\000" "\n"|grep -q $name) || return 1 + return 0 +} + +running() +{ +# Check if the process is running looking at /proc +# (works for all users) + + # No pidfile, probably no daemon present + [ ! -f "$PIDFILE" ] && return 1 + # Obtain the pid and check it against the binary name + pid=`cat $PIDFILE` + running_pid $pid $DAEMON || return 1 + return 0 +} + +start() { + echo -n "Starting $DESC: " + if [ -e $PIDFILE ]; then + echo "ALREADY STARTED" + return 1 + else + # start supervisord with options from sysconfig (stuff like -c) + daemon $DAEMON $OPTIONS + # only create the subsyslock if we created the PIDFILE + [ -e $PIDFILE ] && touch /var/lock/subsys/supervisord + return 0 + fi +} + +stop() { + echo -n "Stopping supervisord: " + killproc -p $PIDFILE $DESC + # always remove the subsys. we might have waited a while, but just remove it at this point. + rm -f /var/lock/subsys/supervisord + return 0 +} + +restart() { + stop + start +} + +case "$1" in + start) + start + ;; + stop) + stop + ;; + restart|force-reload) + restart + ;; + reload) + /usr/bin/supervisorctl $OPTIONS reload + RETVAL=$? + ;; + condrestart) + [ -f /var/lock/subsys/supervisord ] && restart + RETVAL=$? + ;; + status) + echo -n "supervisord is " + if running ; then + echo "running" + else + echo "not running." + exit 1 + fi + ;; + *) + echo $"Usage: $0 {start|stop|status|restart|reload|force-reload|condrestart}" + exit 1 +esac + +exit $RETVAL \ No newline at end of file diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/supervisord/templates/supervisord_inet.erb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/supervisord/templates/supervisord_inet.erb new file mode 100644 index 00000000000..9f04cb24779 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/supervisord/templates/supervisord_inet.erb @@ -0,0 +1,13 @@ +[inet_http_server] +port=<%= @inet_server_hostname %>:<%= @inet_server_port %> +<% if @inet_auth -%> +username=<%= @inet_username %> +password=<%= @inet_password %> +<% end -%> + +[supervisorctl] +serverurl=http://<%= @inet_hostname%>:<%= @inet_server_port %> +<% if @inet_auth -%> +username=<%= @inet_username %> +password=<%= @inet_password %> +<% end -%> diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/supervisord/templates/supervisord_main.erb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/supervisord/templates/supervisord_main.erb new file mode 100644 index 00000000000..1baf5607a2f --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/supervisord/templates/supervisord_main.erb @@ -0,0 +1,34 @@ +[supervisord] +logfile=<%= @log_file %> +pidfile=<%= @pid_file %> +nodaemon=<%= @nodaemon %> +minfds=<%= @minfds %> +minfds=<%= @minprocs %> +umask=<%= @umask %> +<% if @strip_ansi -%> +strip_ansi=<%= @strip_ansi %> +<% end -%> +<% if @user -%> +user=<%= @user %> +<% end -%> +<% if @identifier -%> +indentifier=<%= @identifier %> +<% end -%> +<% if @directory -%> +directory=<%= @directory %> +<% end -%> +<% if @nocleanup -%> +nocleanup=true +<% end -%> +<% if @childlogdir -%> +childlogdir=<%= @childlogdir %> +<% end -%> +<% if @env_string -%> +environment=<%= @env_string %> +<% end -%> + +[rpcinterface:supervisor] +supervisor.rpcinterface_factory = supervisor.rpcinterface:make_main_rpcinterface + +[include] +files=<%= @config_include %>/*.conf diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/supervisord/templates/supervisord_unix.erb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/supervisord/templates/supervisord_unix.erb new file mode 100644 index 00000000000..414e75198ba --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/supervisord/templates/supervisord_unix.erb @@ -0,0 +1,15 @@ +[unix_http_server] +file=<%= @unix_socket_file %> +chmod=<%= @unix_socket_mode %> +chown=<%= @unix_socket_owner %>:<%= @unix_socket_group %> +<% if @unix_auth -%> +username=<%= @unix_socket_username %> +password=<%= @unix_socket_password %> +<% end -%> + +[supervisorctl] +serverurl=unix://<%= @unix_socket_file %> +<% if @unix_auth -%> +username=<%= @unix_username %> +password=<%= @unix_password %> +<% end -%> diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/supervisord/tests/group.pp b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/supervisord/tests/group.pp new file mode 100644 index 00000000000..3d340460dfb --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/supervisord/tests/group.pp @@ -0,0 +1,4 @@ +supervisord::group { 'mygroup': + priority => 100, + program => ['program1', 'program2', 'program3'] +} \ No newline at end of file diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/supervisord/tests/init.pp b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/supervisord/tests/init.pp new file mode 100644 index 00000000000..48bc1f47987 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/supervisord/tests/init.pp @@ -0,0 +1,5 @@ +class { 'supervisord': + install_pip => true, + install_init => true, + nocleanup => true, +} diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/supervisord/tests/program.pp b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/supervisord/tests/program.pp new file mode 100644 index 00000000000..6c789c96dc1 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/supervisord/tests/program.pp @@ -0,0 +1,9 @@ +supervisord::program { 'myprogram': + command => 'command --args', + priority => '100', + environment => { + 'HOME' => '/home/myuser', + 'PATH' => '/bin:/sbin:/usr/bin:/usr/sbin', + 'SECRET' => 'mysecret' + } +} \ No newline at end of file diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/sysctl/ChangeLog b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/sysctl/ChangeLog new file mode 100644 index 00000000000..a91a0e2cf48 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/sysctl/ChangeLog @@ -0,0 +1,29 @@ +2014-01-20 - 0.3.0 +* Add optional comment inside the sysctl.d file. +* Use sysctl -p with the created/modified file instead of sysctl -w (#3). +* Fix purge and set its default to false (#7, tehmaspc). + +2013-10-02 - 0.2.0 +* Add optional prefix to the sysctl.d file name, to force ordering. + +2013-06-25 - 0.1.1 +* Make purge optional, still enabled by default. +* Add rspec tests (Justin Lambert). +* Minor fix for values with spaces (needs more changes to be robust). + +2013-03-06 - 0.1.0 +* Update README to markdown. +* Change to recommended 2 space indent. + +2012-12-18 - 0.0.3 +* Add feature to update existing values in /etc/sysctl.conf. +* Apply setting on each run if needed (hakamadare). +* Make sure $ensure => absent still works with the above change. + +2012-09-19 - 0.0.2 +* Fix deprecation warnings. +* Fix README markup. + +2012-07-19 - 0.0.1 +* Initial module release. + diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/sysctl/Gemfile b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/sysctl/Gemfile new file mode 100644 index 00000000000..d4c141f5a3c --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/sysctl/Gemfile @@ -0,0 +1,8 @@ +source :rubygems + +puppetversion = ENV['PUPPET_VERSION'] +gem 'puppet', puppetversion, :require => false +gem 'puppet-lint' +gem 'rspec-puppet' +gem 'puppetlabs_spec_helper', '>= 0.4.0' + diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/sysctl/LICENSE b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/sysctl/LICENSE new file mode 100644 index 00000000000..49a6e5c4010 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/sysctl/LICENSE @@ -0,0 +1,14 @@ +Copyright (C) 2011-2013 Matthias Saou + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. + diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/sysctl/Modulefile b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/sysctl/Modulefile new file mode 100644 index 00000000000..2d9f13ff73a --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/sysctl/Modulefile @@ -0,0 +1,8 @@ +name 'thias-sysctl' +version '0.3.0' +source 'git://github.com/thias/puppet-sysctl' +author 'Matthias Saou' +license 'Apache 2.0' +summary 'Sysctl module' +description "Manage sysctl variable values." +project_page 'https://github.com/thias/puppet-sysctl' diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/sysctl/README.md b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/sysctl/README.md new file mode 100644 index 00000000000..554bcfa0f14 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/sysctl/README.md @@ -0,0 +1,58 @@ +# puppet-sysctl + +## Overview + +Manage sysctl variable values. All changes are immediately applied, as well as +configured to become persistent. Tested on Red Hat Enterprise Linux 6. + + * `sysctl` : Definition to manage sysctl variables by setting a value. + * `sysctl::base`: Base class (included from the definition). + +For persistence to work, your Operating System needs to support looking for +sysctl configuration inside `/etc/sysctl.d/`. + +You may optionally enable purging of the `/etc/sysctl.d/` directory, so that +all files which are not (or no longer) managed by this module will be removed. + +Beware that for the purge to work, you need to either have at least one +sysctl definition call left for the node, or include `sysctl::base` manually. + +You may also force a value to `ensure => absent`, which will always work. + +For the few original settings in the main `/etc/sysct.conf` file, the value is +also replaced so that running `sysctl -p` doesn't revert any change made by +puppet. + +## Examples + +Enable IP forwarding globally : +```puppet +sysctl { 'net.ipv4.ip_forward': value => '1' } +``` + +Set a value for maximum number of connections per UNIX socket : +```puppet +sysctl { 'net.core.somaxconn': value => '65536' } +``` + +Make sure we don't have any explicit value set for swappiness, typically +because it was set at some point but no longer needs to be. The original +value for existing nodes won't be reset until the next reboot : +```puppet +sysctl { 'vm.swappiness': ensure => absent } +``` + +If the order in which the files get applied is important, you can set it by +using a file name prefix, which could also be set globally from `site.pp` : +```puppet +Sysctl { prefix => '60' } +``` + +To enable purging of settings, you can use hiera to set the `sysctl::base` +`$purge` parameter : +```yaml +--- +# sysctl +sysctl::base::purge: true +``` + diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/sysctl/Rakefile b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/sysctl/Rakefile new file mode 100644 index 00000000000..184b9b5915e --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/sysctl/Rakefile @@ -0,0 +1,7 @@ +require 'rubygems' +require 'puppetlabs_spec_helper/rake_tasks' +require 'puppet-lint' +PuppetLint.configuration.send("disable_80chars") +PuppetLint.configuration.send("disable_autoloader_layout") +PuppetLint.configuration.send("disable_quoted_booleans") + diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/sysctl/manifests/base.pp b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/sysctl/manifests/base.pp new file mode 100644 index 00000000000..f7a95131467 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/sysctl/manifests/base.pp @@ -0,0 +1,26 @@ +# Class: sysctl::base +# +# Common part for the sysctl definition. Not meant to be used on its own. +# +class sysctl::base ( + $purge = false, +) { + + if $purge { + $recurse = true + } else { + $recurse = false + } + + file { '/etc/sysctl.d': + ensure => directory, + owner => 'root', + group => 'root', + mode => '0755', + # Magic hidden here + purge => $purge, + recurse => $recurse, + } + +} + diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/sysctl/manifests/init.pp b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/sysctl/manifests/init.pp new file mode 100644 index 00000000000..379e69136c2 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/sysctl/manifests/init.pp @@ -0,0 +1,66 @@ +# Define: sysctl +# +# Manage sysctl variable values. +# +# Parameters: +# $value: +# The value for the sysctl parameter. Mandatory, unless $ensure is 'absent'. +# $prefix: +# Optional prefix for the sysctl.d file to be created. Default: none. +# $ensure: +# Whether the variable's value should be 'present' or 'absent'. +# Defaults to 'present'. +# +# Sample Usage : +# sysctl { 'net.ipv6.bindv6only': value => '1' } +# +define sysctl ( + $value = undef, + $prefix = undef, + $comment = undef, + $ensure = undef, +) { + + include sysctl::base + + # If we have a prefix, then add the dash to it + if $prefix { + $sysctl_d_file = "${prefix}-${title}.conf" + } else { + $sysctl_d_file = "${title}.conf" + } + + # The permanent change + file { "/etc/sysctl.d/${sysctl_d_file}": + ensure => $ensure, + owner => 'root', + group => 'root', + mode => '0644', + content => template("${module_name}/sysctl.d-file.erb"), + notify => [ + Exec["sysctl-${title}"], + Exec["update-sysctl.conf-${title}"], + ], + } + + if $ensure != 'absent' { + + # The immediate change + re-check on each run "just in case" + exec { "sysctl-${title}": + command => "/sbin/sysctl -p /etc/sysctl.d/${sysctl_d_file}", + refreshonly => true, + require => File["/etc/sysctl.d/${sysctl_d_file}"], + } + + # For the few original values from the main file + exec { "update-sysctl.conf-${title}": + command => "sed -i -e 's/^${title} *=.*/${title} = ${value}/' /etc/sysctl.conf", + path => [ '/usr/sbin', '/sbin', '/usr/bin', '/bin' ], + refreshonly => true, + onlyif => "grep -E '^${title} *=' /etc/sysctl.conf", + } + + } + +} + diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/sysctl/metadata.json b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/sysctl/metadata.json new file mode 100644 index 00000000000..237befce806 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/sysctl/metadata.json @@ -0,0 +1,32 @@ +{ + "project_page": "https://github.com/thias/puppet-sysctl", + "version": "0.3.0", + "license": "Apache 2.0", + "description": "Manage sysctl variable values.", + "dependencies": [ + + ], + "types": [ + + ], + "name": "thias-sysctl", + "author": "Matthias Saou", + "summary": "Sysctl module", + "source": "git://github.com/thias/puppet-sysctl", + "checksums": { + "tests/init.pp": "e70e5327b9840b44699bb7fae71d47cd", + "spec/spec_helper.rb": "3ea886dd135e120afa31e0aab12e85b0", + "ChangeLog": "ed8052eb5cb46b92eaa03b882c11779e", + "LICENSE": "99219472697a01561e7630d63aaecdc1", + "Modulefile": "3b8a6a0dfff841a31118a5f46fde59da", + "spec/defines/sysctl_init_spec.rb": "21d524df70961750cb22f6b83349093e", + "manifests/init.pp": "0f7dd893b08ebbbec8994d14eca6701b", + "README.md": "ed4837849a1c4790b7178cd99824a204", + "spec/classes/sysctl_base_spec.rb": "6241cf3e290871c00b1bb3bbd5490108", + "templates/sysctl.d-file.erb": "0212783df32c499b3e9e343993f608da", + "manifests/base.pp": "9508015ce74b5ce1420ad8c8ebc7d3af", + "tests/base.pp": "1ba89838432dbc94339097327c19ae3d", + "Gemfile": "3ad486d60d90bfe4395b368b95481e01", + "Rakefile": "ab253b919e7093c2a5eb7adf0e39ffbc" + } +} \ No newline at end of file diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/sysctl/spec/classes/sysctl_base_spec.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/sysctl/spec/classes/sysctl_base_spec.rb new file mode 100644 index 00000000000..a1d47a21e77 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/sysctl/spec/classes/sysctl_base_spec.rb @@ -0,0 +1,9 @@ +require 'spec_helper' + +describe 'sysctl::base', :type => :class do + + it { should create_class('sysctl::base') } + it { should contain_file('/etc/sysctl.d') } + +end + diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/sysctl/spec/defines/sysctl_init_spec.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/sysctl/spec/defines/sysctl_init_spec.rb new file mode 100644 index 00000000000..1f8db67cce0 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/sysctl/spec/defines/sysctl_init_spec.rb @@ -0,0 +1,25 @@ +require 'spec_helper' + +describe 'sysctl', :type => :define do + let(:title) { 'net.ipv4.ip_forward'} + + context 'present' do + let(:params) { { :value => '1' } } + + it { should contain_file('/etc/sysctl.d/net.ipv4.ip_forward.conf').with( + :content => "net.ipv4.ip_forward = 1\n", + :ensure => nil + ) } + + it { should contain_exec('sysctl-net.ipv4.ip_forward') } + it { should contain_exec('update-sysctl.conf-net.ipv4.ip_forward')} + end + + context 'absent' do + let(:params) { { :ensure => 'absent' } } + + it { should contain_file('/etc/sysctl.d/net.ipv4.ip_forward.conf').with_ensure('absent') } + end + +end + diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/sysctl/spec/spec_helper.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/sysctl/spec/spec_helper.rb new file mode 100644 index 00000000000..dc7e9f4a0ef --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/sysctl/spec/spec_helper.rb @@ -0,0 +1,2 @@ +require 'rubygems' +require 'puppetlabs_spec_helper/module_spec_helper' diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/sysctl/templates/sysctl.d-file.erb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/sysctl/templates/sysctl.d-file.erb new file mode 100644 index 00000000000..843721435a8 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/sysctl/templates/sysctl.d-file.erb @@ -0,0 +1,6 @@ +<% if @comment -%> +<% @comment.each do |line| -%> +# <%= line %> +<% end -%> +<% end -%> +<%= @title %> = <%= @value %> diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/sysctl/tests/base.pp b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/sysctl/tests/base.pp new file mode 100644 index 00000000000..a4868712ef7 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/sysctl/tests/base.pp @@ -0,0 +1 @@ +include sysctl::base diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/sysctl/tests/init.pp b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/sysctl/tests/init.pp new file mode 100644 index 00000000000..402615bb798 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/sysctl/tests/init.pp @@ -0,0 +1,3 @@ +sysctl { 'net.ipv4.ip_forward': value => '1' } +sysctl { 'net.core.somaxconn': value => '65536' } +sysctl { 'vm.swappiness': ensure => absent } diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/vcsrepo/.travis.yml b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/vcsrepo/.travis.yml new file mode 100644 index 00000000000..1c5e71b98df --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/vcsrepo/.travis.yml @@ -0,0 +1,31 @@ +branches: + only: + - master +language: ruby +bundler_args: --without development +script: "bundle exec rake spec SPEC_OPTS='--format documentation'" +after_success: + - git clone -q git://github.com/puppetlabs/ghpublisher.git .forge-release + - .forge-release/publish +rvm: + - 1.8.7 + - 1.9.3 + - 2.0.0 +env: + matrix: + - PUPPET_GEM_VERSION="~> 2.7.0" + - PUPPET_GEM_VERSION="~> 3.3.0" + global: + - PUBLISHER_LOGIN=puppetlabs + - secure: |- + ZiIkYd9+CdPzpwSjFPnVkCx1FIlipxpbdyD33q94h2Tj5zXjNb1GXizVy0NR + kVxGhU5Ld8y9z8DTqKRgCI1Yymg3H//OU++PKLOQj/X5juWVR4URBNPeBOzu + IJBDl1MADKA4i1+jAZPpz4mTvTtKS4pWKErgCSmhSfsY1hs7n6c= +matrix: + exclude: + - rvm: 1.9.3 + env: PUPPET_GEM_VERSION="~> 2.7.0" + - rvm: 2.0.0 + env: PUPPET_GEM_VERSION="~> 2.7.0" +notifications: + email: false diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/vcsrepo/CHANGELOG b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/vcsrepo/CHANGELOG new file mode 100644 index 00000000000..8142f5d6e45 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/vcsrepo/CHANGELOG @@ -0,0 +1,41 @@ +2013-11-13 - Version 0.2.0 + +Summary: + +This release mainly focuses on a number of bugfixes, which should +significantly improve the reliability of Git and SVN. Thanks to +our many contributors for all of these fixes! + +Features: +- Git: + - Add autorequire for Package['git'] +- HG: + - Allow user and identity properties. +- Bzr: + - "ensure => latest" support. +- SVN: + - Added configuration parameter. + - Add support for master svn repositories. +- CVS: + - Allow for setting the CVS_RSH environment variable. + +Fixes: +- Handle Puppet::Util[::Execution].withenv for 2.x and 3.x properly. +- Change path_empty? to not do full directory listing. +- Overhaul spec tests to work with rspec2. +- Git: + - Improve Git SSH usage documentation. + - Add ssh session timeouts to prevent network issues from blocking runs. + - Fix git provider checkout of a remote ref on an existing repo. + - Allow unlimited submodules (thanks to --recursive). + - Use git checkout --force instead of short -f everywhere. + - Update git provider to handle checking out into an existing (empty) dir. +- SVN: + - Handle force property. for svn. + - Adds support for changing upstream repo url. + - Check that the URL of the WC matches the URL from the manifest. + - Changed from using "update" to "switch". + - Handle revision update without source switch. + - Fix svn provider to look for '^Revision:' instead of '^Last Changed Rev:'. +- CVS: + - Documented the "module" attribute. diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/vcsrepo/Gemfile b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/vcsrepo/Gemfile new file mode 100644 index 00000000000..5def8292208 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/vcsrepo/Gemfile @@ -0,0 +1,22 @@ +source 'https://rubygems.org' + +group :development, :test do + gem 'rake', :require => false + gem 'rspec-puppet', :require => false + gem 'puppetlabs_spec_helper', :require => false + gem 'rspec-system', :require => false + gem 'rspec-system-puppet', :require => false + gem 'rspec-system-serverspec', :require => false + gem 'serverspec', :require => false + gem 'puppet-lint', :require => false + gem 'pry', :require => false + gem 'simplecov', :require => false +end + +if puppetversion = ENV['PUPPET_GEM_VERSION'] + gem 'puppet', puppetversion, :require => false +else + gem 'puppet', :require => false +end + +# vim:ft=ruby diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/vcsrepo/LICENSE b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/vcsrepo/LICENSE new file mode 100644 index 00000000000..2ee80c8ec84 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/vcsrepo/LICENSE @@ -0,0 +1,17 @@ +Copyright (C) 2010-2012 Puppet Labs Inc. + +Puppet Labs can be contacted at: info@puppetlabs.com + +This program and entire repository 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; either version 2 of the License, or any later version. + +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, write to the Free Software +Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/vcsrepo/Modulefile b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/vcsrepo/Modulefile new file mode 100644 index 00000000000..d2bbe929598 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/vcsrepo/Modulefile @@ -0,0 +1,4 @@ +name 'puppetlabs/vcsrepo' +version '0.2.0' +summary 'Manage repositories from various version control systems' +description 'Manage repositories from various version control systems' diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/vcsrepo/README.BZR.markdown b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/vcsrepo/README.BZR.markdown new file mode 100644 index 00000000000..cc257e9fdf6 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/vcsrepo/README.BZR.markdown @@ -0,0 +1,47 @@ +Using vcsrepo with Bazaar +========================= + +To create a blank repository +---------------------------- + +Define a `vcsrepo` without a `source` or `revision`: + + vcsrepo { "/path/to/repo": + ensure => present, + provider => bzr + } + +To branch from an existing repository +------------------------------------- + +Provide the `source` location: + + vcsrepo { "/path/to/repo": + ensure => present, + provider => bzr, + source => 'lp:myproj' + } + +For a specific revision, use `revision` with a valid revisionspec +(see `bzr help revisionspec` for more information on formatting a revision): + + vcsrepo { "/path/to/repo": + ensure => present, + provider => bzr, + source => 'lp:myproj', + revision => 'menesis@pov.lt-20100309191856-4wmfqzc803fj300x' + } + +For sources that use SSH (eg, `bzr+ssh://...`, `sftp://...`) +------------------------------------------------------------ + +Manage your SSH keys with Puppet and use `require` in your `vcsrepo` +to ensure they are present. For more information, see the `require` +metaparameter documentation[1]. + +More Examples +------------- + +For examples you can run, see `examples/bzr/` + +[1]: http://docs.puppetlabs.com/references/stable/metaparameter.html#require diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/vcsrepo/README.CVS.markdown b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/vcsrepo/README.CVS.markdown new file mode 100644 index 00000000000..3bdd59da4f6 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/vcsrepo/README.CVS.markdown @@ -0,0 +1,66 @@ +Using vcsrepo with CVS +====================== + +To create a blank repository +---------------------------- + +Define a `vcsrepo` without a `source` or `revision`: + + vcsrepo { "/path/to/repo": + ensure => present, + provider => cvs + } + +To checkout/update from a repository +------------------------------------ + +To get the current mainline: + + vcsrepo { "/path/to/workspace": + ensure => present, + provider => cvs, + source => ":pserver:anonymous@example.com:/sources/myproj" + } + +To get a specific module on the current mainline: + + vcsrepo {"/vagrant/lockss-daemon-source": + ensure => present, + provider => cvs, + source => ":pserver:anonymous@lockss.cvs.sourceforge.net:/cvsroot/lockss", + module => "lockss-daemon", + } + + +You can use the `compression` parameter (it works like CVS `-z`): + + vcsrepo { "/path/to/workspace": + ensure => present, + provider => cvs, + compression => 3, + source => ":pserver:anonymous@example.com:/sources/myproj" + } + +For a specific tag, use `revision`: + + vcsrepo { "/path/to/workspace": + ensure => present, + provider => cvs, + compression => 3, + source => ":pserver:anonymous@example.com:/sources/myproj", + revision => "SOMETAG" + } + +For sources that use SSH +------------------------ + +Manage your SSH keys with Puppet and use `require` in your `vcsrepo` +to ensure they are present. For more information, see the `require` +metaparameter documentation[1]. + +More Examples +------------- + +For examples you can run, see `examples/cvs/` + +[1]: http://docs.puppetlabs.com/references/stable/metaparameter.html#require diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/vcsrepo/README.GIT.markdown b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/vcsrepo/README.GIT.markdown new file mode 100644 index 00000000000..846bdcc2944 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/vcsrepo/README.GIT.markdown @@ -0,0 +1,95 @@ +Using vcsrepo with Git +====================== + +To create a blank repository +---------------------------- + +Define a `vcsrepo` without a `source` or `revision`: + + vcsrepo { "/path/to/repo": + ensure => present, + provider => git + } + +If you're defining this for a central/"official" repository, you'll +probably want to make it a "bare" repository. Do this by setting +`ensure` to `bare` instead of `present`: + + vcsrepo { "/path/to/repo": + ensure => bare, + provider => git + } + +To clone/pull a repository +---------------------------- + +To get the current [master] HEAD: + + vcsrepo { "/path/to/repo": + ensure => present, + provider => git, + source => "git://example.com/repo.git" + } + +For a specific revision or branch (can be a commit SHA, tag or branch name): + + vcsrepo { "/path/to/repo": + ensure => present, + provider => git, + source => 'git://example.com/repo.git', + revision => '0c466b8a5a45f6cd7de82c08df2fb4ce1e920a31' + } + + vcsrepo { "/path/to/repo": + ensure => present, + provider => git, + source => 'git://example.com/repo.git', + revision => '1.1.2rc1' + } + + vcsrepo { "/path/to/repo": + ensure => present, + provider => git, + source => 'git://example.com/repo.git', + revision => 'development' + } + +Check out as a user: + + vcsrepo { "/path/to/repo": + ensure => present, + provider => git, + source => 'git://example.com/repo.git', + revision => '0c466b8a5a45f6cd7de82c08df2fb4ce1e920a31', + user => 'someUser' + } + +Keep the repository at the latest revision (note: this will always overwrite local changes to the repository): + + vcsrepo { "/path/to/repo": + ensure => latest, + provider => git, + source => 'git://example.com/repo.git', + revision => 'master', + } + +For sources that use SSH (eg, `username@server:...`) +---------------------------------------------------- + +If your SSH key is associated with a user, simply fill the `user` parameter to use his keys. + +Example: + + user => 'toto' # will use toto's $HOME/.ssh setup + + +Otherwise, manage your SSH keys with Puppet and use `require` in your `vcsrepo` to ensure they are present. +For more information, see the `require` metaparameter documentation[1]. + +More Examples +------------- + +For examples you can run, see `examples/git/` + +[1]: http://docs.puppetlabs.com/references/stable/metaparameter.html#require + diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/vcsrepo/README.HG.markdown b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/vcsrepo/README.HG.markdown new file mode 100644 index 00000000000..55ceef4acce --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/vcsrepo/README.HG.markdown @@ -0,0 +1,73 @@ +Using vcsrepo with Mercurial +============================ + +To create a blank repository +---------------------------- + +Define a `vcsrepo` without a `source` or `revision`: + + vcsrepo { "/path/to/repo": + ensure => present, + provider => hg + } + +To clone/pull & update a repository +----------------------------------- + +To get the default branch tip: + + vcsrepo { "/path/to/repo": + ensure => present, + provider => hg, + source => "http://hg.example.com/myrepo" + } + +For a specific changeset, use `revision`: + + vcsrepo { "/path/to/repo": + ensure => present, + provider => hg, + source => "http://hg.example.com/myrepo", + revision => '21ea4598c962' + } + +You can also set `revision` to a tag: + + vcsrepo { "/path/to/repo": + ensure => present, + provider => hg, + source => "http://hg.example.com/myrepo", + revision => '1.1.2' + } + +Check out as a user: + + vcsrepo { "/path/to/repo": + ensure => present, + provider => hg, + source => "http://hg.example.com/myrepo", + user => 'user' + } + +Specify an SSH identity key: + + vcsrepo { "/path/to/repo": + ensure => present, + provider => hg, + source => "ssh://hg@hg.example.com/myrepo", + identity => "/home/user/.ssh/id_dsa, + } + +For sources that use SSH (eg, `ssh://...`) +------------------------------------------ + +Manage your SSH keys with Puppet and use `require` in your `vcsrepo` +to ensure they are present. For more information, see the `require` +metaparameter documentation[1]. + +More Examples +------------- + +For examples you can run, see `examples/hg/` + +[1]: http://docs.puppetlabs.com/references/stable/metaparameter.html#require diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/vcsrepo/README.SVN.markdown b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/vcsrepo/README.SVN.markdown new file mode 100644 index 00000000000..f374094c1dc --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/vcsrepo/README.SVN.markdown @@ -0,0 +1,62 @@ +Using vcsrepo with Subversion +============================= + +To create a blank repository +---------------------------- + +To create a blank repository suitable for use as a central repository, +define a `vcsrepo` without a `source` or `revision`: + + vcsrepo { "/path/to/repo": + ensure => present, + provider => svn + } + +To checkout from a repository +----------------------------- + +Provide a `source` qualified to the branch/tag you want: + + vcsrepo { "/path/to/repo": + ensure => present, + provider => svn, + source => "svn://svnrepo/hello/branches/foo" + } + +You can provide a specific `revision`: + + vcsrepo { "/path/to/repo": + ensure => present, + provider => svn, + source => "svn://svnrepo/hello/branches/foo", + revision => '1234' + } + + +Using a specified Subversion configuration directory +----------------------------- + +Provide a `configuration` parameter which should be a directory path on the local system where your svn configuration +files are. Typically, it is /path/to/.subversion: + + vcsrepo { "/path/to/repo": + ensure => present, + provider => svn, + source => "svn://svnrepo/hello/branches/foo", + configuration => "/path/to/.subversion" + } + + +For sources that use SSH (eg, `svn+ssh://...`) +---------------------------------------------- + +Manage your SSH keys with Puppet and use `require` in your `vcsrepo` +to ensure they are present. For more information, see the `require` +metaparameter documentation[1]. + +More Examples +------------- + +For examples you can run, see `examples/svn/` + +[1]: http://docs.puppetlabs.com/references/stable/metaparameter.html#require diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/vcsrepo/README.markdown b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/vcsrepo/README.markdown new file mode 100644 index 00000000000..848725630a2 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/vcsrepo/README.markdown @@ -0,0 +1,32 @@ +vcsrepo +======= + +[![Build Status](https://travis-ci.org/puppetlabs/puppetlabs-vcsrepo.png?branch=master)](https://travis-ci.org/puppetlabs/puppetlabs-vcsrepo) + +Purpose +------- + +This provides a single type, `vcsrepo`. + +This type can be used to describe: + +* A working copy checked out from a (remote or local) source, at an + arbitrary revision +* A "blank" working copy not associated with a source (when it makes + sense for the VCS being used) +* A "blank" central repository (when the distinction makes sense for the VCS + being used) + +Supported Version Control Systems +--------------------------------- + +This module supports a wide range of VCS types, each represented by a +separate provider. + +For information on how to use this module with a specific VCS, see +`README..markdown`. + +License +------- + +See LICENSE. diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/vcsrepo/Rakefile b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/vcsrepo/Rakefile new file mode 100644 index 00000000000..cd3d3799589 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/vcsrepo/Rakefile @@ -0,0 +1 @@ +require 'puppetlabs_spec_helper/rake_tasks' diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/vcsrepo/examples/bzr/branch.pp b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/vcsrepo/examples/bzr/branch.pp new file mode 100644 index 00000000000..0ed0705ee8d --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/vcsrepo/examples/bzr/branch.pp @@ -0,0 +1,6 @@ +vcsrepo { '/tmp/vcstest-bzr-branch': + ensure => present, + provider => bzr, + source => 'lp:do', + revision => '1312', +} diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/vcsrepo/examples/bzr/init_repo.pp b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/vcsrepo/examples/bzr/init_repo.pp new file mode 100644 index 00000000000..1129dd7d059 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/vcsrepo/examples/bzr/init_repo.pp @@ -0,0 +1,4 @@ +vcsrepo { '/tmp/vcstest-bzr-init': + ensure => present, + provider => bzr, +} diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/vcsrepo/examples/cvs/local.pp b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/vcsrepo/examples/cvs/local.pp new file mode 100644 index 00000000000..155742e34d5 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/vcsrepo/examples/cvs/local.pp @@ -0,0 +1,11 @@ +vcsrepo { '/tmp/vcstest-cvs-repo': + ensure => present, + provider => cvs, +} + +vcsrepo { '/tmp/vcstest-cvs-workspace-local': + ensure => present, + provider => cvs, + source => '/tmp/vcstest-cvs-repo', + require => Vcsrepo['/tmp/vcstest-cvs-repo'], +} diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/vcsrepo/examples/cvs/remote.pp b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/vcsrepo/examples/cvs/remote.pp new file mode 100644 index 00000000000..eb9665a92e5 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/vcsrepo/examples/cvs/remote.pp @@ -0,0 +1,5 @@ +vcsrepo { '/tmp/vcstest-cvs-workspace-remote': + ensure => present, + provider => cvs, + source => ':pserver:anonymous@cvs.sv.gnu.org:/sources/leetcvrt', +} diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/vcsrepo/examples/git/bare_init.pp b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/vcsrepo/examples/git/bare_init.pp new file mode 100644 index 00000000000..4166f6e6963 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/vcsrepo/examples/git/bare_init.pp @@ -0,0 +1,4 @@ +vcsrepo { '/tmp/vcstest-git-bare': + ensure => bare, + provider => git, +} diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/vcsrepo/examples/git/clone.pp b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/vcsrepo/examples/git/clone.pp new file mode 100644 index 00000000000..b29a4fdbef5 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/vcsrepo/examples/git/clone.pp @@ -0,0 +1,5 @@ +vcsrepo { '/tmp/vcstest-git-clone': + ensure => present, + provider => git, + source => 'git://github.com/bruce/rtex.git', +} diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/vcsrepo/examples/git/working_copy_init.pp b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/vcsrepo/examples/git/working_copy_init.pp new file mode 100644 index 00000000000..e3352eb7c77 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/vcsrepo/examples/git/working_copy_init.pp @@ -0,0 +1,4 @@ +vcsrepo { '/tmp/vcstest-git-wc': + ensure => present, + provider => git, +} diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/vcsrepo/examples/hg/clone.pp b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/vcsrepo/examples/hg/clone.pp new file mode 100644 index 00000000000..be2d955de53 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/vcsrepo/examples/hg/clone.pp @@ -0,0 +1,6 @@ +vcsrepo { '/tmp/vcstest-hg-clone': + ensure => present, + provider => hg, + source => 'http://hg.basho.com/riak', + revision => 'riak-0.5.3', +} diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/vcsrepo/examples/hg/init_repo.pp b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/vcsrepo/examples/hg/init_repo.pp new file mode 100644 index 00000000000..a8908040490 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/vcsrepo/examples/hg/init_repo.pp @@ -0,0 +1,4 @@ +vcsrepo { '/tmp/vcstest-hg-init': + ensure => present, + provider => hg, +} diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/vcsrepo/examples/svn/checkout.pp b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/vcsrepo/examples/svn/checkout.pp new file mode 100644 index 00000000000..f9fc2730f5a --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/vcsrepo/examples/svn/checkout.pp @@ -0,0 +1,5 @@ +vcsrepo { '/tmp/vcstest-svn-checkout': + ensure => present, + provider => svn, + source => 'http://svn.edgewall.org/repos/babel/trunk', +} diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/vcsrepo/examples/svn/server.pp b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/vcsrepo/examples/svn/server.pp new file mode 100644 index 00000000000..de7c390f9f5 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/vcsrepo/examples/svn/server.pp @@ -0,0 +1,4 @@ +vcsrepo { '/tmp/vcstest-svn-server': + ensure => present, + provider => svn, +} diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/vcsrepo/lib/puppet/provider/vcsrepo.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/vcsrepo/lib/puppet/provider/vcsrepo.rb new file mode 100644 index 00000000000..8793e632cb7 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/vcsrepo/lib/puppet/provider/vcsrepo.rb @@ -0,0 +1,42 @@ +require 'tmpdir' +require 'digest/md5' +require 'fileutils' + +# Abstract +class Puppet::Provider::Vcsrepo < Puppet::Provider + + private + + def set_ownership + owner = @resource.value(:owner) || nil + group = @resource.value(:group) || nil + FileUtils.chown_R(owner, group, @resource.value(:path)) + end + + def path_exists? + File.directory?(@resource.value(:path)) + end + + def path_empty? + # Path is empty if the only entries are '.' and '..' + d = Dir.new(@resource.value(:path)) + d.read # should return '.' + d.read # should return '..' + d.read.nil? + end + + # Note: We don't rely on Dir.chdir's behavior of automatically returning the + # value of the last statement -- for easier stubbing. + def at_path(&block) #:nodoc: + value = nil + Dir.chdir(@resource.value(:path)) do + value = yield + end + value + end + + def tempdir + @tempdir ||= File.join(Dir.tmpdir, 'vcsrepo-' + Digest::MD5.hexdigest(@resource.value(:path))) + end + +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/vcsrepo/lib/puppet/provider/vcsrepo/bzr.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/vcsrepo/lib/puppet/provider/vcsrepo/bzr.rb new file mode 100644 index 00000000000..6688ce87b22 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/vcsrepo/lib/puppet/provider/vcsrepo/bzr.rb @@ -0,0 +1,85 @@ +require File.join(File.dirname(__FILE__), '..', 'vcsrepo') + +Puppet::Type.type(:vcsrepo).provide(:bzr, :parent => Puppet::Provider::Vcsrepo) do + desc "Supports Bazaar repositories" + + optional_commands :bzr => 'bzr' + has_features :reference_tracking + + def create + if !@resource.value(:source) + create_repository(@resource.value(:path)) + else + clone_repository(@resource.value(:revision)) + end + end + + def working_copy_exists? + File.directory?(File.join(@resource.value(:path), '.bzr')) + end + + def exists? + working_copy_exists? + end + + def destroy + FileUtils.rm_rf(@resource.value(:path)) + end + + def revision + at_path do + current_revid = bzr('version-info')[/^revision-id:\s+(\S+)/, 1] + desired = @resource.value(:revision) + begin + desired_revid = bzr('revision-info', desired).strip.split(/\s+/).last + rescue Puppet::ExecutionFailure + # Possible revid available during update (but definitely not current) + desired_revid = nil + end + if current_revid == desired_revid + desired + else + current_revid + end + end + end + + def revision=(desired) + at_path do + begin + bzr('update', '-r', desired) + rescue Puppet::ExecutionFailure + bzr('update', '-r', desired, ':parent') + end + end + end + + def latest + at_path do + bzr('version-info', ':parent')[/^revision-id:\s+(\S+)/, 1] + end + end + + def latest? + at_path do + return self.revision == self.latest + end + end + + private + + def create_repository(path) + bzr('init', path) + end + + def clone_repository(revision) + args = ['branch'] + if revision + args.push('-r', revision) + end + args.push(@resource.value(:source), + @resource.value(:path)) + bzr(*args) + end + +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/vcsrepo/lib/puppet/provider/vcsrepo/cvs.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/vcsrepo/lib/puppet/provider/vcsrepo/cvs.rb new file mode 100644 index 00000000000..206e73295e4 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/vcsrepo/lib/puppet/provider/vcsrepo/cvs.rb @@ -0,0 +1,137 @@ +require File.join(File.dirname(__FILE__), '..', 'vcsrepo') + +Puppet::Type.type(:vcsrepo).provide(:cvs, :parent => Puppet::Provider::Vcsrepo) do + desc "Supports CVS repositories/workspaces" + + optional_commands :cvs => 'cvs' + has_features :gzip_compression, :reference_tracking, :modules, :cvs_rsh + + def create + if !@resource.value(:source) + create_repository(@resource.value(:path)) + else + checkout_repository + end + update_owner + end + + def exists? + if @resource.value(:source) + directory = File.join(@resource.value(:path), 'CVS') + else + directory = File.join(@resource.value(:path), 'CVSROOT') + end + File.directory?(directory) + end + + def working_copy_exists? + File.directory?(File.join(@resource.value(:path), 'CVS')) + end + + def destroy + FileUtils.rm_rf(@resource.value(:path)) + end + + def latest? + debug "Checking for updates because 'ensure => latest'" + at_path do + # We cannot use -P to prune empty dirs, otherwise + # CVS would report those as "missing", regardless + # if they have contents or updates. + is_current = (runcvs('-nq', 'update', '-d').strip == "") + if (!is_current) then debug "There are updates available on the checkout's current branch/tag." end + return is_current + end + end + + def latest + # CVS does not have a conecpt like commit-IDs or change + # sets, so we can only have the current branch name (or the + # requested one, if that differs) as the "latest" revision. + should = @resource.value(:revision) + current = self.revision + return should != current ? should : current + end + + def revision + if !@rev + if File.exist?(tag_file) + contents = File.read(tag_file).strip + # Note: Doesn't differentiate between N and T entries + @rev = contents[1..-1] + else + @rev = 'HEAD' + end + debug "Checkout is on branch/tag '#{@rev}'" + end + return @rev + end + + def revision=(desired) + at_path do + runcvs('update', '-dr', desired, '.') + update_owner + @rev = desired + end + end + + private + + def tag_file + File.join(@resource.value(:path), 'CVS', 'Tag') + end + + def checkout_repository + dirname, basename = File.split(@resource.value(:path)) + Dir.chdir(dirname) do + args = ['-d', @resource.value(:source)] + if @resource.value(:compression) + args.push('-z', @resource.value(:compression)) + end + args.push('checkout') + if @resource.value(:revision) + args.push('-r', @resource.value(:revision)) + end + args.push('-d', basename, module_name) + runcvs(*args) + end + end + + # When the source: + # * Starts with ':' (eg, :pserver:...) + def module_name + if (m = @resource.value(:module)) + m + elsif (source = @resource.value(:source)) + source[0, 1] == ':' ? File.basename(source) : '.' + end + end + + def create_repository(path) + runcvs('-d', path, 'init') + end + + def update_owner + if @resource.value(:owner) or @resource.value(:group) + set_ownership + end + end + + def runcvs(*args) + if @resource.value(:cvs_rsh) + debug "Using CVS_RSH = " + @resource.value(:cvs_rsh) + e = { :CVS_RSH => @resource.value(:cvs_rsh) } + else + e = {} + end + + # The location of withenv changed from Puppet 2.x to 3.x + withenv = Puppet::Util.method(:withenv) if Puppet::Util.respond_to?(:withenv) + withenv = Puppet::Util::Execution.method(:withenv) if Puppet::Util::Execution.respond_to?(:withenv) + fail("Cannot set custom environment #{e}") if e && !withenv + + withenv.call e do + Puppet.debug cvs *args + end + end +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/vcsrepo/lib/puppet/provider/vcsrepo/dummy.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/vcsrepo/lib/puppet/provider/vcsrepo/dummy.rb new file mode 100644 index 00000000000..f7b4e54b897 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/vcsrepo/lib/puppet/provider/vcsrepo/dummy.rb @@ -0,0 +1,12 @@ +require File.join(File.dirname(__FILE__), '..', 'vcsrepo') + +Puppet::Type.type(:vcsrepo).provide(:dummy, :parent => Puppet::Provider::Vcsrepo) do + desc "Dummy default provider" + + defaultfor :vcsrepo => :dummy + + def working_copy_exists? + providers = @resource.class.providers.map{|x| x.to_s}.sort.reject{|x| x == "dummy"}.join(", ") rescue "none" + raise("vcsrepo resource must have a provider, available: #{providers}") + end +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/vcsrepo/lib/puppet/provider/vcsrepo/git.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/vcsrepo/lib/puppet/provider/vcsrepo/git.rb new file mode 100644 index 00000000000..47e84d29ec7 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/vcsrepo/lib/puppet/provider/vcsrepo/git.rb @@ -0,0 +1,323 @@ +require File.join(File.dirname(__FILE__), '..', 'vcsrepo') + +Puppet::Type.type(:vcsrepo).provide(:git, :parent => Puppet::Provider::Vcsrepo) do + desc "Supports Git repositories" + + ##TODO modify the commands below so that the su - is included + optional_commands :git => 'git', + :su => 'su' + has_features :bare_repositories, :reference_tracking, :ssh_identity, :multiple_remotes, :user + + def create + if !@resource.value(:source) + init_repository(@resource.value(:path)) + else + clone_repository(@resource.value(:source), @resource.value(:path)) + if @resource.value(:revision) + if @resource.value(:ensure) == :bare + notice "Ignoring revision for bare repository" + else + checkout + end + end + if @resource.value(:ensure) != :bare + update_submodules + end + end + update_owner_and_excludes + end + + def destroy + FileUtils.rm_rf(@resource.value(:path)) + end + + def latest? + at_path do + return self.revision == self.latest + end + end + + def latest + branch = on_branch? + if branch == 'master' + return get_revision("#{@resource.value(:remote)}/HEAD") + elsif branch == '(no branch)' + return get_revision('HEAD') + else + return get_revision("#{@resource.value(:remote)}/%s" % branch) + end + end + + def revision + update_references + current = at_path { git_with_identity('rev-parse', 'HEAD').chomp } + return current unless @resource.value(:revision) + + if tag_revision?(@resource.value(:revision)) + canonical = at_path { git_with_identity('show', @resource.value(:revision)).scan(/^commit (.*)/).to_s } + else + # if it's not a tag, look for it as a local ref + canonical = at_path { git_with_identity('rev-parse', '--revs-only', @resource.value(:revision)).chomp } + if canonical.empty? + # git rev-parse executed properly but didn't find the ref; + # look for it in the remote + remote_ref = at_path { git_with_identity('ls-remote', '--heads', '--tags', @resource.value(:remote), @resource.value(:revision)).chomp } + if remote_ref.empty? + fail("#{@resource.value(:revision)} is not a local or remote ref") + end + + # $ git ls-remote --heads --tags origin feature/cvs + # 7d4244b35e72904e30130cad6d2258f901c16f1a refs/heads/feature/cvs + canonical = remote_ref.split.first + end + end + + if current == canonical + @resource.value(:revision) + else + current + end + end + + def revision=(desired) + checkout(desired) + if local_branch_revision?(desired) + # reset instead of pull to avoid merge conflicts. assuming remote is + # authoritative. + # might be worthwhile to have an allow_local_changes param to decide + # whether to reset or pull when we're ensuring latest. + at_path { git_with_identity('reset', '--hard', "#{@resource.value(:remote)}/#{desired}") } + end + if @resource.value(:ensure) != :bare + update_submodules + end + update_owner_and_excludes + end + + def bare_exists? + bare_git_config_exists? && !working_copy_exists? + end + + def working_copy_exists? + File.directory?(File.join(@resource.value(:path), '.git')) + end + + def exists? + working_copy_exists? || bare_exists? + end + + def update_remote_origin_url + current = git_with_identity('config', 'remote.origin.url') + unless @resource.value(:source).nil? + if current.nil? or current.strip != @resource.value(:source) + git_with_identity('config', 'remote.origin.url', @resource.value(:source)) + end + end + end + + def update_references + at_path do + update_remote_origin_url + git_with_identity('fetch', @resource.value(:remote)) + git_with_identity('fetch', '--tags', @resource.value(:remote)) + update_owner_and_excludes + end + end + + private + + def bare_git_config_exists? + File.exist?(File.join(@resource.value(:path), 'config')) + end + + def clone_repository(source, path) + check_force + args = ['clone'] + if @resource.value(:ensure) == :bare + args << '--bare' + end + if !File.exist?(File.join(@resource.value(:path), '.git')) + args.push(source, path) + Dir.chdir("/") do + git_with_identity(*args) + end + else + notice "Repo has already been cloned" + end + end + + def check_force + if path_exists? and not path_empty? + if @resource.value(:force) + notice "Removing %s to replace with vcsrepo." % @resource.value(:path) + destroy + else + raise Puppet::Error, "Could not create repository (non-repository at path)" + end + end + end + + def init_repository(path) + check_force + if @resource.value(:ensure) == :bare && working_copy_exists? + convert_working_copy_to_bare + elsif @resource.value(:ensure) == :present && bare_exists? + convert_bare_to_working_copy + else + # normal init + FileUtils.mkdir(@resource.value(:path)) + FileUtils.chown(@resource.value(:user), nil, @resource.value(:path)) if @resource.value(:user) + args = ['init'] + if @resource.value(:ensure) == :bare + args << '--bare' + end + at_path do + git_with_identity(*args) + end + end + end + + # Convert working copy to bare + # + # Moves: + # /.git + # to: + # / + def convert_working_copy_to_bare + notice "Converting working copy repository to bare repository" + FileUtils.mv(File.join(@resource.value(:path), '.git'), tempdir) + FileUtils.rm_rf(@resource.value(:path)) + FileUtils.mv(tempdir, @resource.value(:path)) + end + + # Convert bare to working copy + # + # Moves: + # / + # to: + # /.git + def convert_bare_to_working_copy + notice "Converting bare repository to working copy repository" + FileUtils.mv(@resource.value(:path), tempdir) + FileUtils.mkdir(@resource.value(:path)) + FileUtils.mv(tempdir, File.join(@resource.value(:path), '.git')) + if commits_in?(File.join(@resource.value(:path), '.git')) + reset('HEAD') + git_with_identity('checkout', '--force') + update_owner_and_excludes + end + end + + def commits_in?(dot_git) + Dir.glob(File.join(dot_git, 'objects/info/*'), File::FNM_DOTMATCH) do |e| + return true unless %w(. ..).include?(File::basename(e)) + end + false + end + + def checkout(revision = @resource.value(:revision)) + if !local_branch_revision? && remote_branch_revision? + at_path { git_with_identity('checkout', '-b', revision, '--track', "#{@resource.value(:remote)}/#{revision}") } + else + at_path { git_with_identity('checkout', '--force', revision) } + end + end + + def reset(desired) + at_path do + git_with_identity('reset', '--hard', desired) + end + end + + def update_submodules + at_path do + git_with_identity('submodule', 'update', '--init', '--recursive') + end + end + + def remote_branch_revision?(revision = @resource.value(:revision)) + # git < 1.6 returns '#{@resource.value(:remote)}/#{revision}' + # git 1.6+ returns 'remotes/#{@resource.value(:remote)}/#{revision}' + branch = at_path { branches.grep /(remotes\/)?#{@resource.value(:remote)}\/#{revision}/ } + branch unless branch.empty? + end + + def local_branch_revision?(revision = @resource.value(:revision)) + at_path { branches.include?(revision) } + end + + def tag_revision?(revision = @resource.value(:revision)) + at_path { tags.include?(revision) } + end + + def branches + at_path { git_with_identity('branch', '-a') }.gsub('*', ' ').split(/\n/).map { |line| line.strip } + end + + def on_branch? + at_path { git_with_identity('branch', '-a') }.split(/\n/).grep(/\*/).first.to_s.gsub('*', '').strip + end + + def tags + at_path { git_with_identity('tag', '-l') }.split(/\n/).map { |line| line.strip } + end + + def set_excludes + at_path { open('.git/info/exclude', 'w') { |f| @resource.value(:excludes).each { |ex| f.write(ex + "\n") }}} + end + + def get_revision(rev) + if !working_copy_exists? + create + end + at_path do + update_remote_origin_url + git_with_identity('fetch', @resource.value(:remote)) + git_with_identity('fetch', '--tags', @resource.value(:remote)) + end + current = at_path { git_with_identity('rev-parse', rev).strip } + if @resource.value(:revision) + if local_branch_revision? + canonical = at_path { git_with_identity('rev-parse', @resource.value(:revision)).strip } + elsif remote_branch_revision? + canonical = at_path { git_with_identity('rev-parse', "#{@resource.value(:remote)}/" + @resource.value(:revision)).strip } + end + current = @resource.value(:revision) if current == canonical + end + update_owner_and_excludes + return current + end + + def update_owner_and_excludes + if @resource.value(:owner) or @resource.value(:group) + set_ownership + end + if @resource.value(:excludes) + set_excludes + end + end + + def git_with_identity(*args) + if @resource.value(:identity) + Tempfile.open('git-helper') do |f| + f.puts '#!/bin/sh' + f.puts "exec ssh -oStrictHostKeyChecking=no -oPasswordAuthentication=no -oKbdInteractiveAuthentication=no -oChallengeResponseAuthentication=no -oConnectTimeout=120 -i #{@resource.value(:identity)} $*" + f.close + + FileUtils.chmod(0755, f.path) + env_save = ENV['GIT_SSH'] + ENV['GIT_SSH'] = f.path + + ret = git(*args) + + ENV['GIT_SSH'] = env_save + + return ret + end + elsif @resource.value(:user) + su(@resource.value(:user), '-c', "git #{args.join(' ')}" ) + else + git(*args) + end + end +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/vcsrepo/lib/puppet/provider/vcsrepo/hg.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/vcsrepo/lib/puppet/provider/vcsrepo/hg.rb new file mode 100644 index 00000000000..4886b7a1f8e --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/vcsrepo/lib/puppet/provider/vcsrepo/hg.rb @@ -0,0 +1,115 @@ +require File.join(File.dirname(__FILE__), '..', 'vcsrepo') + +Puppet::Type.type(:vcsrepo).provide(:hg, :parent => Puppet::Provider::Vcsrepo) do + desc "Supports Mercurial repositories" + + optional_commands :hg => 'hg', + :su => 'su' + has_features :reference_tracking, :ssh_identity, :user + + def create + if !@resource.value(:source) + create_repository(@resource.value(:path)) + else + clone_repository(@resource.value(:revision)) + end + update_owner + end + + def working_copy_exists? + File.directory?(File.join(@resource.value(:path), '.hg')) + end + + def exists? + working_copy_exists? + end + + def destroy + FileUtils.rm_rf(@resource.value(:path)) + end + + def latest? + at_path do + return self.revision == self.latest + end + end + + def latest + at_path do + begin + hg_wrapper('incoming', '--branch', '.', '--newest-first', '--limit', '1')[/^changeset:\s+(?:-?\d+):(\S+)/m, 1] + rescue Puppet::ExecutionFailure + # If there are no new changesets, return the current nodeid + self.revision + end + end + end + + def revision + at_path do + current = hg_wrapper('parents')[/^changeset:\s+(?:-?\d+):(\S+)/m, 1] + desired = @resource.value(:revision) + if desired + # Return the tag name if it maps to the current nodeid + mapped = hg_wrapper('tags')[/^#{Regexp.quote(desired)}\s+\d+:(\S+)/m, 1] + if current == mapped + desired + else + current + end + else + current + end + end + end + + def revision=(desired) + at_path do + begin + hg_wrapper('pull') + rescue + end + begin + hg_wrapper('merge') + rescue Puppet::ExecutionFailure + # If there's nothing to merge, just skip + end + hg_wrapper('update', '--clean', '-r', desired) + end + update_owner + end + + private + + def create_repository(path) + hg_wrapper('init', path) + end + + def clone_repository(revision) + args = ['clone'] + if revision + args.push('-u', revision) + end + args.push(@resource.value(:source), + @resource.value(:path)) + hg_wrapper(*args) + end + + def update_owner + if @resource.value(:owner) or @resource.value(:group) + set_ownership + end + end + + def hg_wrapper(*args) + if @resource.value(:identity) + args += ["--ssh", "ssh -oStrictHostKeyChecking=no -oPasswordAuthentication=no -oKbdInteractiveAuthentication=no -oChallengeResponseAuthentication=no -i #{@resource.value(:identity)}"] + end + if @resource.value(:user) + args.map! { |a| if a =~ /\s/ then "'#{a}'" else a end } # Adds quotes to arguments with whitespaces. + su(@resource.value(:user), '-c', "hg #{args.join(' ')}") + else + hg(*args) + end + end +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/vcsrepo/lib/puppet/provider/vcsrepo/svn.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/vcsrepo/lib/puppet/provider/vcsrepo/svn.rb new file mode 100644 index 00000000000..e0d5b2164e6 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/vcsrepo/lib/puppet/provider/vcsrepo/svn.rb @@ -0,0 +1,124 @@ +require File.join(File.dirname(__FILE__), '..', 'vcsrepo') + +Puppet::Type.type(:vcsrepo).provide(:svn, :parent => Puppet::Provider::Vcsrepo) do + desc "Supports Subversion repositories" + + optional_commands :svn => 'svn', + :svnadmin => 'svnadmin', + :svnlook => 'svnlook' + + has_features :filesystem_types, :reference_tracking, :basic_auth, :configuration + + def create + if !@resource.value(:source) + create_repository(@resource.value(:path)) + else + checkout_repository(@resource.value(:source), + @resource.value(:path), + @resource.value(:revision)) + end + update_owner + end + + def working_copy_exists? + if File.directory?(@resource.value(:path)) + # :path is an svn checkout + return true if File.directory?(File.join(@resource.value(:path), '.svn')) + # :path is an svn server + return true if svnlook('uuid', @resource.value(:path)) + end + false + end + + def exists? + working_copy_exists? + end + + def destroy + FileUtils.rm_rf(@resource.value(:path)) + end + + def latest? + at_path do + (self.revision >= self.latest) and (@resource.value(:source) == self.sourceurl) + end + end + + def buildargs + args = ['--non-interactive'] + if @resource.value(:basic_auth_username) && @resource.value(:basic_auth_password) + args.push('--username', @resource.value(:basic_auth_username)) + args.push('--password', @resource.value(:basic_auth_password)) + args.push('--no-auth-cache') + end + + if @resource.value(:force) + args.push('--force') + end + + if @resource.value(:configuration) + args.push('--config-dir', @resource.value(:configuration)) + end + + args + end + + def latest + args = buildargs.push('info', '-r', 'HEAD') + at_path do + svn(*args)[/^Revision:\s+(\d+)/m, 1] + end + end + + def sourceurl + args = buildargs.push('info') + at_path do + svn(*args)[/^URL:\s+(\S+)/m, 1] + end + end + + def revision + args = buildargs.push('info') + at_path do + svn(*args)[/^Revision:\s+(\d+)/m, 1] + end + end + + def revision=(desired) + args = if @resource.value(:source) + buildargs.push('switch', '-r', desired, @resource.value(:source)) + else + buildargs.push('update', '-r', desired) + end + at_path do + svn(*args) + end + update_owner + end + + private + + def checkout_repository(source, path, revision) + args = buildargs.push('checkout') + if revision + args.push('-r', revision) + end + args.push(source, path) + svn(*args) + end + + def create_repository(path) + args = ['create'] + if @resource.value(:fstype) + args.push('--fs-type', @resource.value(:fstype)) + end + args << path + svnadmin(*args) + end + + def update_owner + if @resource.value(:owner) or @resource.value(:group) + set_ownership + end + end +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/vcsrepo/lib/puppet/type/vcsrepo.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/vcsrepo/lib/puppet/type/vcsrepo.rb new file mode 100644 index 00000000000..ad90cedd833 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/vcsrepo/lib/puppet/type/vcsrepo.rb @@ -0,0 +1,198 @@ +require 'pathname' + +Puppet::Type.newtype(:vcsrepo) do + desc "A local version control repository" + + feature :gzip_compression, + "The provider supports explicit GZip compression levels" + feature :basic_auth, + "The provider supports HTTP Basic Authentication" + feature :bare_repositories, + "The provider differentiates between bare repositories + and those with working copies", + :methods => [:bare_exists?, :working_copy_exists?] + + feature :filesystem_types, + "The provider supports different filesystem types" + + feature :reference_tracking, + "The provider supports tracking revision references that can change + over time (eg, some VCS tags and branch names)" + + feature :ssh_identity, + "The provider supports a configurable SSH identity file" + + feature :user, + "The provider can run as a different user" + + feature :modules, + "The repository contains modules that can be chosen of" + + feature :multiple_remotes, + "The repository tracks multiple remote repositories" + + feature :configuration, + "The configuration directory to use" + + feature :cvs_rsh, + "The provider understands the CVS_RSH environment variable" + + ensurable do + attr_accessor :latest + + def insync?(is) + @should ||= [] + + case should + when :present + return true unless [:absent, :purged, :held].include?(is) + when :latest + if is == :latest + return true + else + return false + end + when :bare + return is == :bare + end + end + + newvalue :present do + notice "Creating repository from present" + provider.create + end + + newvalue :bare, :required_features => [:bare_repositories] do + if !provider.exists? + provider.create + end + end + + newvalue :absent do + provider.destroy + end + + newvalue :latest, :required_features => [:reference_tracking] do + if provider.exists? + if provider.respond_to?(:update_references) + provider.update_references + end + if provider.respond_to?(:latest?) + reference = provider.latest || provider.revision + else + reference = resource.value(:revision) || provider.revision + end + notice "Updating to latest '#{reference}' revision" + provider.revision = reference + else + notice "Creating repository from latest" + provider.create + end + end + + def retrieve + prov = @resource.provider + if prov + if prov.working_copy_exists? + (@should.include?(:latest) && prov.latest?) ? :latest : :present + elsif prov.class.feature?(:bare_repositories) and prov.bare_exists? + :bare + else + :absent + end + else + raise Puppet::Error, "Could not find provider" + end + end + + end + + newparam :path do + desc "Absolute path to repository" + isnamevar + validate do |value| + path = Pathname.new(value) + unless path.absolute? + raise ArgumentError, "Path must be absolute: #{path}" + end + end + end + + newparam :source do + desc "The source URI for the repository" + end + + newparam :fstype, :required_features => [:filesystem_types] do + desc "Filesystem type" + end + + newproperty :revision do + desc "The revision of the repository" + newvalue(/^\S+$/) + end + + newparam :owner do + desc "The user/uid that owns the repository files" + end + + newparam :group do + desc "The group/gid that owns the repository files" + end + + newparam :user do + desc "The user to run for repository operations" + end + + newparam :excludes do + desc "Files to be excluded from the repository" + end + + newparam :force do + desc "Force repository creation, destroying any files on the path in the process." + newvalues(:true, :false) + defaultto false + end + + newparam :compression, :required_features => [:gzip_compression] do + desc "Compression level" + validate do |amount| + unless Integer(amount).between?(0, 6) + raise ArgumentError, "Unsupported compression level: #{amount} (expected 0-6)" + end + end + end + + newparam :basic_auth_username, :required_features => [:basic_auth] do + desc "HTTP Basic Auth username" + end + + newparam :basic_auth_password, :required_features => [:basic_auth] do + desc "HTTP Basic Auth password" + end + + newparam :identity, :required_features => [:ssh_identity] do + desc "SSH identity file" + end + + newparam :module, :required_features => [:modules] do + desc "The repository module to manage" + end + + newparam :remote, :required_features => [:multiple_remotes] do + desc "The remote repository to track" + defaultto "origin" + end + + newparam :configuration, :required_features => [:configuration] do + desc "The configuration directory to use" + end + + newparam :cvs_rsh, :required_features => [:cvs_rsh] do + desc "The value to be used for the CVS_RSH environment variable." + end + + autorequire(:package) do + ['git', 'git-core'] + end + +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/vcsrepo/spec/fixtures/bzr_version_info.txt b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/vcsrepo/spec/fixtures/bzr_version_info.txt new file mode 100644 index 00000000000..88a56a1c80f --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/vcsrepo/spec/fixtures/bzr_version_info.txt @@ -0,0 +1,5 @@ +revision-id: menesis@pov.lt-20100309191856-4wmfqzc803fj300x +date: 2010-03-09 21:18:56 +0200 +build-date: 2010-03-14 00:42:43 -0800 +revno: 2634 +branch-nick: mytest diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/vcsrepo/spec/fixtures/git_branch_a.txt b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/vcsrepo/spec/fixtures/git_branch_a.txt new file mode 100644 index 00000000000..2c99829d48f --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/vcsrepo/spec/fixtures/git_branch_a.txt @@ -0,0 +1,14 @@ + feature/foo + feature/bar + feature/baz + feature/quux + only/local +* master + refactor/foo + origin/HEAD + origin/feature/foo + origin/feature/bar + origin/feature/baz + origin/feature/quux + origin/only/remote + origin/master diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/vcsrepo/spec/fixtures/git_branch_feature_bar.txt b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/vcsrepo/spec/fixtures/git_branch_feature_bar.txt new file mode 100644 index 00000000000..72d5e2009c5 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/vcsrepo/spec/fixtures/git_branch_feature_bar.txt @@ -0,0 +1,14 @@ + feature/foo +* feature/bar + feature/baz + feature/quux + only/local + master + refactor/foo + origin/HEAD + origin/feature/foo + origin/feature/bar + origin/feature/baz + origin/feature/quux + origin/only/remote + origin/master diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/vcsrepo/spec/fixtures/git_branch_none.txt b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/vcsrepo/spec/fixtures/git_branch_none.txt new file mode 100644 index 00000000000..7207c37929b --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/vcsrepo/spec/fixtures/git_branch_none.txt @@ -0,0 +1,15 @@ + feature/foo + feature/bar + feature/baz + feature/quux + only/local + master +* (no branch) + refactor/foo + origin/HEAD + origin/feature/foo + origin/feature/bar + origin/feature/baz + origin/feature/quux + origin/only/remote + origin/master diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/vcsrepo/spec/fixtures/hg_parents.txt b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/vcsrepo/spec/fixtures/hg_parents.txt new file mode 100644 index 00000000000..46173df499d --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/vcsrepo/spec/fixtures/hg_parents.txt @@ -0,0 +1,6 @@ +changeset: 3:34e6012c783a +parent: 2:21ea4598c962 +parent: 1:9d0ff0028458 +user: Test User +date: Fri Aug 07 13:13:02 2009 -0400 +summary: merge diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/vcsrepo/spec/fixtures/hg_tags.txt b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/vcsrepo/spec/fixtures/hg_tags.txt new file mode 100644 index 00000000000..53792e5ac8d --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/vcsrepo/spec/fixtures/hg_tags.txt @@ -0,0 +1,18 @@ +tip 1019:bca3f20b249b +0.9.1 1017:76ce7cca95d8 +0.9 1001:dbaa6f4ec585 +0.8 839:65b66ac0fc83 +0.7.1 702:e1357f00129f +0.7 561:7b2af3b4c968 +0.6.3 486:e38077f4e4aa +0.6.2 405:07bb099b7b10 +0.6.1 389:93750f3fbbe2 +0.6 369:34e6012c783a +0.5.3 321:5ffa6ae7e699 +0.5.2 318:fdc2c2e4cebe +0.5.1 315:33a5ea0cbe7a +0.5 313:47490716f4c9 +0.4 240:47fa3a14cc63 +0.3.1 132:bc231db18e1c +0.3 130:661615e510dd +0.2 81:f98d13b442f6 diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/vcsrepo/spec/fixtures/svn_info.txt b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/vcsrepo/spec/fixtures/svn_info.txt new file mode 100644 index 00000000000..d2a975b238f --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/vcsrepo/spec/fixtures/svn_info.txt @@ -0,0 +1,10 @@ +Path: . +URL: http://example.com/svn/trunk +Repository Root: http://example.com/svn +Repository UUID: 75246ace-e253-0410-96dd-a7613ca8dc81 +Revision: 4 +Node Kind: directory +Schedule: normal +Last Changed Author: jon +Last Changed Rev: 3 +Last Changed Date: 2008-08-07 11:34:25 -0700 (Thu, 07 Aug 2008) diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/vcsrepo/spec/spec.opts b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/vcsrepo/spec/spec.opts new file mode 100644 index 00000000000..91cd6427ed6 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/vcsrepo/spec/spec.opts @@ -0,0 +1,6 @@ +--format +s +--colour +--loadby +mtime +--backtrace diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/vcsrepo/spec/spec_helper.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/vcsrepo/spec/spec_helper.rb new file mode 100644 index 00000000000..acfae0cb8cb --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/vcsrepo/spec/spec_helper.rb @@ -0,0 +1,13 @@ +require 'puppetlabs_spec_helper/module_spec_helper' +require 'simplecov' +require 'support/filesystem_helpers' +require 'support/fixture_helpers' + +SimpleCov.start do + add_filter "/spec/" +end + +RSpec.configure do |c| + c.include FilesystemHelpers + c.include FixtureHelpers +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/vcsrepo/spec/support/filesystem_helpers.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/vcsrepo/spec/support/filesystem_helpers.rb new file mode 100644 index 00000000000..15e2ca750a4 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/vcsrepo/spec/support/filesystem_helpers.rb @@ -0,0 +1,18 @@ +module FilesystemHelpers + + def expects_chdir(path = resource.value(:path)) + Dir.expects(:chdir).with(path).at_least_once.yields + end + + def expects_mkdir(path = resource.value(:path)) + Dir.expects(:mkdir).with(path).at_least_once + end + + def expects_rm_rf(path = resource.value(:path)) + FileUtils.expects(:rm_rf).with(path) + end + + def expects_directory?(returns = true, path = resource.value(:path)) + File.expects(:directory?).with(path).returns(returns) + end +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/vcsrepo/spec/support/fixture_helpers.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/vcsrepo/spec/support/fixture_helpers.rb new file mode 100644 index 00000000000..8a0e0a0b4cc --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/vcsrepo/spec/support/fixture_helpers.rb @@ -0,0 +1,7 @@ +module FixtureHelpers + + def fixture(name, ext = '.txt') + File.read(File.join(File.dirname(__FILE__), '..', 'fixtures', name.to_s + ext)) + end + +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/vcsrepo/spec/unit/puppet/provider/vcsrepo/bzr_spec.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/vcsrepo/spec/unit/puppet/provider/vcsrepo/bzr_spec.rb new file mode 100644 index 00000000000..488ddc0f90a --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/vcsrepo/spec/unit/puppet/provider/vcsrepo/bzr_spec.rb @@ -0,0 +1,109 @@ +require 'spec_helper' + +describe Puppet::Type.type(:vcsrepo).provider(:bzr_provider) do + + let(:resource) { Puppet::Type.type(:vcsrepo).new({ + :name => 'test', + :ensure => :present, + :provider => :bzr, + :revision => '2634', + :source => 'lp:do', + :path => '/tmp/test', + })} + + let(:provider) { resource.provider } + + before :each do + Puppet::Util.stubs(:which).with('bzr').returns('/usr/bin/bzr') + end + + describe 'creating' do + context 'with defaults' do + it "should execute 'bzr clone -r' with the revision" do + provider.expects(:bzr).with('branch', '-r', resource.value(:revision), resource.value(:source), resource.value(:path)) + provider.create + end + end + + context 'without revision' do + it "should just execute 'bzr clone' without a revision" do + resource.delete(:revision) + provider.expects(:bzr).with('branch', resource.value(:source), resource.value(:path)) + provider.create + end + end + + context 'without source' do + it "should execute 'bzr init'" do + resource.delete(:source) + provider.expects(:bzr).with('init', resource.value(:path)) + provider.create + end + end + end + + describe 'destroying' do + it "it should remove the directory" do + provider.destroy + end + end + + describe "checking existence" do + it "should check for the directory" do + File.expects(:directory?).with(File.join(resource.value(:path), '.bzr')).returns(true) + provider.exists? + end + end + + describe "checking the revision property" do + before do + expects_chdir + provider.expects(:bzr).with('version-info').returns(File.read(fixtures('bzr_version_info.txt'))) + @current_revid = 'menesis@pov.lt-20100309191856-4wmfqzc803fj300x' + end + + context "when given a non-revid as the resource revision" do + context "when its revid is not different than the current revid" do + it "should return the ref" do + resource[:revision] = '2634' + provider.expects(:bzr).with('revision-info', '2634').returns("2634 menesis@pov.lt-20100309191856-4wmfqzc803fj300x\n") + provider.revision.should == resource.value(:revision) + end + end + context "when its revid is different than the current revid" do + it "should return the current revid" do + resource[:revision] = '2636' + provider.expects(:bzr).with('revision-info', resource.value(:revision)).returns("2635 foo\n") + provider.revision.should == @current_revid + end + end + end + + context "when given a revid as the resource revision" do + context "when it is the same as the current revid" do + it "should return it" do + resource[:revision] = 'menesis@pov.lt-20100309191856-4wmfqzc803fj300x' + provider.expects(:bzr).with('revision-info', resource.value(:revision)).returns("1234 #{resource.value(:revision)}\n") + provider.revision.should == resource.value(:revision) + end + end + context "when it is not the same as the current revid" do + it "should return the current revid" do + resource[:revision] = 'menesis@pov.lt-20100309191856-4wmfqzc803fj300y' + provider.expects(:bzr).with('revision-info', resource.value(:revision)).returns("2636 foo\n") + provider.revision.should == @current_revid + end + end + + end + end + + describe "setting the revision property" do + it "should use 'bzr update -r' with the revision" do + Dir.expects(:chdir).with('/tmp/test').at_least_once.yields + provider.expects(:bzr).with('update', '-r', 'somerev') + provider.revision = 'somerev' + end + end + +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/vcsrepo/spec/unit/puppet/provider/vcsrepo/cvs_spec.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/vcsrepo/spec/unit/puppet/provider/vcsrepo/cvs_spec.rb new file mode 100644 index 00000000000..efa4b33b36a --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/vcsrepo/spec/unit/puppet/provider/vcsrepo/cvs_spec.rb @@ -0,0 +1,115 @@ +require 'spec_helper' + +describe Puppet::Type.type(:vcsrepo).provider(:cvs_provider) do + + let(:resource) { Puppet::Type.type(:vcsrepo).new({ + :name => 'test', + :ensure => :present, + :provider => :cvs, + :revision => '2634', + :source => 'lp:do', + :path => '/tmp/test', + })} + + let(:provider) { resource.provider } + + before :each do + Puppet::Util.stubs(:which).with('cvs').returns('/usr/bin/cvs') + end + + describe 'creating' do + context "with a source" do + it "should execute 'cvs checkout'" do + resource[:source] = ':ext:source@example.com:/foo/bar' + resource[:revision] = 'an-unimportant-value' + expects_chdir('/tmp') + provider.expects(:cvs).with('-d', resource.value(:source), 'checkout', '-r', 'an-unimportant-value', '-d', 'test', 'bar') + provider.create + end + + it "should just execute 'cvs checkout' without a revision" do + resource[:source] = ':ext:source@example.com:/foo/bar' + resource.delete(:revision) + provider.expects(:cvs).with('-d', resource.value(:source), 'checkout', '-d', File.basename(resource.value(:path)), File.basename(resource.value(:source))) + provider.create + end + + context "with a compression" do + it "should just execute 'cvs checkout' without a revision" do + resource[:source] = ':ext:source@example.com:/foo/bar' + resource[:compression] = '3' + resource.delete(:revision) + provider.expects(:cvs).with('-d', resource.value(:source), '-z', '3', 'checkout', '-d', File.basename(resource.value(:path)), File.basename(resource.value(:source))) + provider.create + end + end + end + + context "when a source is not given" do + it "should execute 'cvs init'" do + resource.delete(:source) + provider.expects(:cvs).with('-d', resource.value(:path), 'init') + provider.create + end + end + end + + describe 'destroying' do + it "it should remove the directory" do + provider.destroy + end + end + + describe "checking existence" do + it "should check for the CVS directory with source" do + resource[:source] = ':ext:source@example.com:/foo/bar' + File.expects(:directory?).with(File.join(resource.value(:path), 'CVS')) + provider.exists? + end + + it "should check for the CVSROOT directory without source" do + resource.delete(:source) + File.expects(:directory?).with(File.join(resource.value(:path), 'CVSROOT')) + provider.exists? + end + end + + describe "checking the revision property" do + before do + @tag_file = File.join(resource.value(:path), 'CVS', 'Tag') + end + + context "when CVS/Tag exists" do + before do + @tag = 'TAG' + File.expects(:exist?).with(@tag_file).returns(true) + end + it "should read CVS/Tag" do + File.expects(:read).with(@tag_file).returns("T#{@tag}") + provider.revision.should == @tag + end + end + + context "when CVS/Tag does not exist" do + before do + File.expects(:exist?).with(@tag_file).returns(false) + end + it "assumes HEAD" do + provider.revision.should == 'HEAD' + end + end + end + + describe "when setting the revision property" do + before do + @tag = 'SOMETAG' + end + + it "should use 'cvs update -dr'" do + expects_chdir + provider.expects(:cvs).with('update', '-dr', @tag, '.') + provider.revision = @tag + end + end + +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/vcsrepo/spec/unit/puppet/provider/vcsrepo/git_spec.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/vcsrepo/spec/unit/puppet/provider/vcsrepo/git_spec.rb new file mode 100644 index 00000000000..15fee535654 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/vcsrepo/spec/unit/puppet/provider/vcsrepo/git_spec.rb @@ -0,0 +1,369 @@ +require 'spec_helper' + +describe Puppet::Type.type(:vcsrepo).provider(:git_provider) do + + let(:resource) { Puppet::Type.type(:vcsrepo).new({ + :name => 'test', + :ensure => :present, + :provider => :git, + :revision => '2634', + :source => 'git@repo', + :path => '/tmp/test', + })} + + let(:provider) { resource.provider } + + before :each do + Puppet::Util.stubs(:which).with('git').returns('/usr/bin/git') + end + + context 'creating' do + context "with a revision that is a remote branch" do + it "should execute 'git clone' and 'git checkout -b'" do + resource[:revision] = 'only/remote' + Dir.expects(:chdir).with('/').at_least_once.yields + Dir.expects(:chdir).with('/tmp/test').at_least_once.yields + provider.expects(:git).with('clone', resource.value(:source), resource.value(:path)) + provider.expects(:update_submodules) + provider.expects(:git).with('branch', '-a').returns(resource.value(:revision)) + provider.expects(:git).with('checkout', '--force', resource.value(:revision)) + provider.create + end + end + + context "with a revision that is not a remote branch" do + it "should execute 'git clone' and 'git reset --hard'" do + resource[:revision] = 'a-commit-or-tag' + Dir.expects(:chdir).with('/').at_least_once.yields + Dir.expects(:chdir).with('/tmp/test').at_least_once.yields + provider.expects(:git).with('clone', resource.value(:source), resource.value(:path)) + provider.expects(:update_submodules) + provider.expects(:git).with('branch', '-a').returns(resource.value(:revision)) + provider.expects(:git).with('checkout', '--force', resource.value(:revision)) + provider.create + end + + it "should execute 'git clone' and submodule commands" do + resource.delete(:revision) + provider.expects(:git).with('clone', resource.value(:source), resource.value(:path)) + provider.expects(:update_submodules) + provider.create + end + end + + context "with an ensure of bare" do + context "with revision" do + it "should just execute 'git clone --bare'" do + resource[:ensure] = :bare + provider.expects(:git).with('clone', '--bare', resource.value(:source), resource.value(:path)) + provider.create + end + end + context "without revision" do + it "should just execute 'git clone --bare'" do + resource[:ensure] = :bare + resource.delete(:revision) + provider.expects(:git).with('clone', '--bare', resource.value(:source), resource.value(:path)) + provider.create + end + end + end + + context "when a source is not given" do + context "when the path does not exist" do + it "should execute 'git init'" do + resource[:ensure] = :present + resource.delete(:source) + expects_mkdir + expects_chdir + expects_directory?(false) + + provider.expects(:bare_exists?).returns(false) + provider.expects(:git).with('init') + provider.create + end + end + + context "when the path is a bare repository" do + it "should convert it to a working copy" do + resource[:ensure] = :present + resource.delete(:source) + provider.expects(:bare_exists?).returns(true) + provider.expects(:convert_bare_to_working_copy) + provider.create + end + end + + context "when the path is not empty and not a repository" do + it "should raise an exception" do + provider.expects(:path_exists?).returns(true) + provider.expects(:path_empty?).returns(false) + proc { provider.create }.should raise_error(Puppet::Error) + end + end + end + + context "when the path does not exist" do + it "should execute 'git init --bare'" do + resource[:ensure] = :bare + resource.delete(:source) + expects_chdir + expects_mkdir + expects_directory?(false) + provider.expects(:working_copy_exists?).returns(false) + provider.expects(:git).with('init', '--bare') + provider.create + end + end + + context "when the path is a working copy repository" do + it "should convert it to a bare repository" do + resource[:ensure] = :bare + resource.delete(:source) + provider.expects(:working_copy_exists?).returns(true) + provider.expects(:convert_working_copy_to_bare) + provider.create + end + end + + context "when the path is not empty and not a repository" do + it "should raise an exception" do + expects_directory?(true) + provider.expects(:path_empty?).returns(false) + proc { provider.create }.should raise_error(Puppet::Error) + end + end + end + + + context 'destroying' do + it "it should remove the directory" do + #expects_rm_rf + provider.destroy + end + end + + context "checking the revision property" do + before do + expects_chdir('/tmp/test') + resource[:revision] = 'currentsha' + resource.delete(:source) + provider.expects(:git).with('rev-parse', 'HEAD').returns('currentsha') + end + + context "when its SHA is not different than the current SHA" do + it "should return the ref" do + provider.expects(:git).with('config', 'remote.origin.url').returns('') + provider.expects(:git).with('fetch', 'origin') # FIXME + provider.expects(:git).with('fetch', '--tags', 'origin') + provider.expects(:git).with('rev-parse', '--revs-only', resource.value(:revision)).returns('currentsha') + provider.expects(:git).with('tag', '-l').returns("Hello") + provider.revision.should == resource.value(:revision) + end + end + + context "when its SHA is different than the current SHA" do + it "should return the current SHA" do + provider.expects(:git).with('config', 'remote.origin.url').returns('') + provider.expects(:git).with('fetch', 'origin') # FIXME + provider.expects(:git).with('fetch', '--tags', 'origin') + provider.expects(:git).with('rev-parse', '--revs-only', resource.value(:revision)).returns('othersha') + provider.expects(:git).with('tag', '-l').returns("Hello") + provider.revision.should == 'currentsha' + end + end + + context "when its a ref to a remote head" do + it "should return the revision" do + provider.expects(:git).with('config', 'remote.origin.url').returns('') + provider.expects(:git).with('fetch', 'origin') # FIXME + provider.expects(:git).with('fetch', '--tags', 'origin') + provider.expects(:git).with('tag', '-l').returns("Hello") + provider.expects(:git).with('rev-parse', '--revs-only', resource.value(:revision)).returns('') + provider.expects(:git).with('ls-remote', '--heads', '--tags', 'origin', resource.value(:revision)).returns("newsha refs/heads/#{resource.value(:revision)}") + provider.revision.should == 'currentsha' + end + end + + context "when its a ref to non existant remote head" do + it "should fail" do + provider.expects(:git).with('config', 'remote.origin.url').returns('') + provider.expects(:git).with('fetch', 'origin') # FIXME + provider.expects(:git).with('fetch', '--tags', 'origin') + provider.expects(:git).with('tag', '-l').returns("Hello") + provider.expects(:git).with('rev-parse', '--revs-only', resource.value(:revision)).returns('') + provider.expects(:git).with('ls-remote', '--heads', '--tags', 'origin', resource.value(:revision)).returns('') + expect { provider.revision }.to raise_error(Puppet::Error, /not a local or remote ref$/) + end + end + + context "when the source is modified" do + it "should update the origin url" do + resource[:source] = 'git://git@foo.com/bar.git' + provider.expects(:git).with('config', 'remote.origin.url').returns('old') + provider.expects(:git).with('config', 'remote.origin.url', 'git://git@foo.com/bar.git') + provider.expects(:git).with('fetch', 'origin') # FIXME + provider.expects(:git).with('fetch', '--tags', 'origin') + provider.expects(:git).with('rev-parse', '--revs-only', resource.value(:revision)).returns('currentsha') + provider.expects(:git).with('tag', '-l').returns("Hello") + provider.revision.should == resource.value(:revision) + end + end + end + + context "setting the revision property" do + before do + expects_chdir + end + context "when it's an existing local branch" do + it "should use 'git fetch' and 'git reset'" do + resource[:revision] = 'feature/foo' + provider.expects(:update_submodules) + provider.expects(:git).with('branch', '-a').returns(resource.value(:revision)) + provider.expects(:git).with('checkout', '--force', resource.value(:revision)) + provider.expects(:git).with('branch', '-a').returns(resource.value(:revision)) + provider.expects(:git).with('reset', '--hard', "origin/#{resource.value(:revision)}") + provider.revision = resource.value(:revision) + end + end + context "when it's a remote branch" do + it "should use 'git fetch' and 'git reset'" do + resource[:revision] = 'only/remote' + provider.expects(:update_submodules) + provider.expects(:git).with('branch', '-a').returns(resource.value(:revision)) + provider.expects(:git).with('checkout', '--force', resource.value(:revision)) + provider.expects(:git).with('branch', '-a').returns(resource.value(:revision)) + provider.expects(:git).with('reset', '--hard', "origin/#{resource.value(:revision)}") + provider.revision = resource.value(:revision) + end + end + context "when it's a commit or tag" do + it "should use 'git fetch' and 'git reset'" do + resource[:revision] = 'a-commit-or-tag' + provider.expects(:git).with('branch', '-a').returns(fixture(:git_branch_a)) + provider.expects(:git).with('checkout', '--force', resource.value(:revision)) + provider.expects(:git).with('branch', '-a').returns(fixture(:git_branch_a)) + provider.expects(:git).with('branch', '-a').returns(fixture(:git_branch_a)) + provider.expects(:git).with('submodule', 'update', '--init', '--recursive') + provider.revision = resource.value(:revision) + end + end + end + + context "updating references" do + it "should use 'git fetch --tags'" do + resource.delete(:source) + expects_chdir + provider.expects(:git).with('config', 'remote.origin.url').returns('') + provider.expects(:git).with('fetch', 'origin') + provider.expects(:git).with('fetch', '--tags', 'origin') + provider.update_references + end + end + + context "checking if revision" do + before do + expects_chdir + provider.expects(:git).with('branch', '-a').returns(fixture(:git_branch_a)) + end + context "is a local branch" do + context "when it's listed in 'git branch -a'" do + it "should return true" do + resource[:revision] = 'feature/foo' + provider.should be_local_branch_revision + end + end + context "when it's not listed in 'git branch -a'" do + it "should return false" do + resource[:revision] = 'feature/notexist' + provider.should_not be_local_branch_revision + end + end + end + context "is a remote branch" do + context "when it's listed in 'git branch -a' with an 'origin/' prefix" do + it "should return true" do + resource[:revision] = 'only/remote' + provider.should be_remote_branch_revision + end + end + context "when it's not listed in 'git branch -a' with an 'origin/' prefix" do + it "should return false" do + resource[:revision] = 'only/local' + provider.should_not be_remote_branch_revision + end + end + end + end + + describe 'latest?' do + before do + expects_chdir('/tmp/test') + end + context 'when true' do + it do + provider.expects(:revision).returns('testrev') + provider.expects(:latest).returns('testrev') + provider.latest?.should be_true + end + end + context 'when false' do + it do + provider.expects(:revision).returns('master') + provider.expects(:latest).returns('testrev') + provider.latest?.should be_false + end + end + end + + describe 'latest' do + before do + provider.expects(:get_revision).returns('master') + expects_chdir + end + context 'on master' do + it do + provider.expects(:git).with('branch', '-a').returns(fixture(:git_branch_a)) + provider.latest.should == 'master' + end + end + context 'no branch' do + it do + provider.expects(:git).with('branch', '-a').returns(fixture(:git_branch_none)) + provider.latest.should == 'master' + end + end + context 'feature/bar' do + it do + provider.expects(:git).with('branch', '-a').returns(fixture(:git_branch_feature_bar)) + provider.latest.should == 'master' + end + end + end + + describe 'convert_working_copy_to_bare' do + it do + FileUtils.expects(:mv).returns(true) + FileUtils.expects(:rm_rf).returns(true) + FileUtils.expects(:mv).returns(true) + + provider.instance_eval { convert_working_copy_to_bare } + end + end + + describe 'convert_bare_to_working_copy' do + it do + FileUtils.expects(:mv).returns(true) + FileUtils.expects(:mkdir).returns(true) + FileUtils.expects(:mv).returns(true) + provider.expects(:commits_in?).returns(true) + # If you forget to stub these out you lose 3 hours of rspec work. + provider.expects(:reset).with('HEAD').returns(true) + provider.expects(:git_with_identity).returns(true) + provider.expects(:update_owner_and_excludes).returns(true) + + provider.instance_eval { convert_bare_to_working_copy } + end + end + +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/vcsrepo/spec/unit/puppet/provider/vcsrepo/hg_spec.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/vcsrepo/spec/unit/puppet/provider/vcsrepo/hg_spec.rb new file mode 100644 index 00000000000..7fd53486a74 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/vcsrepo/spec/unit/puppet/provider/vcsrepo/hg_spec.rb @@ -0,0 +1,122 @@ +require 'spec_helper' + +describe Puppet::Type.type(:vcsrepo).provider(:hg) do + + let(:resource) { Puppet::Type.type(:vcsrepo).new({ + :name => 'test', + :ensure => :present, + :provider => :hg, + :path => '/tmp/vcsrepo', + })} + + let(:provider) { resource.provider } + + before :each do + Puppet::Util.stubs(:which).with('hg').returns('/usr/bin/hg') + end + + describe 'creating' do + context 'with source and revision' do + it "should execute 'hg clone -u' with the revision" do + resource[:source] = 'something' + resource[:revision] = '1' + provider.expects(:hg).with('clone', '-u', + resource.value(:revision), + resource.value(:source), + resource.value(:path)) + provider.create + end + end + + context 'without revision' do + it "should just execute 'hg clone' without a revision" do + resource[:source] = 'something' + provider.expects(:hg).with('clone', resource.value(:source), resource.value(:path)) + provider.create + end + end + + context "when a source is not given" do + it "should execute 'hg init'" do + provider.expects(:hg).with('init', resource.value(:path)) + provider.create + end + end + end + + describe 'destroying' do + it "it should remove the directory" do + expects_rm_rf + provider.destroy + end + end + + describe "checking existence" do + it "should check for the directory" do + expects_directory?(true, File.join(resource.value(:path), '.hg')) + provider.exists? + end + end + + describe "checking the revision property" do + before do + expects_chdir + end + + context "when given a non-SHA as the resource revision" do + before do + provider.expects(:hg).with('parents').returns(fixture(:hg_parents)) + provider.expects(:hg).with('tags').returns(fixture(:hg_tags)) + end + + context "when its SHA is not different than the current SHA" do + it "should return the ref" do + resource[:revision] = '0.6' + provider.revision.should == '0.6' + end + end + + context "when its SHA is different than the current SHA" do + it "should return the current SHA" do + resource[:revision] = '0.5.3' + provider.revision.should == '34e6012c783a' + end + end + end + context "when given a SHA as the resource revision" do + before do + provider.expects(:hg).with('parents').returns(fixture(:hg_parents)) + end + + context "when it is the same as the current SHA", :resource => {:revision => '34e6012c783a'} do + it "should return it" do + resource[:revision] = '34e6012c783a' + provider.expects(:hg).with('tags').returns(fixture(:hg_tags)) + provider.revision.should == resource.value(:revision) + end + end + + context "when it is not the same as the current SHA", :resource => {:revision => 'not-the-same'} do + it "should return the current SHA" do + resource[:revision] = 'not-the-same' + provider.expects(:hg).with('tags').returns(fixture(:hg_tags)) + provider.revision.should == '34e6012c783a' + end + end + end + end + + describe "setting the revision property" do + before do + @revision = '6aa99e9b3ab1' + end + it "should use 'hg update ---clean -r'" do + expects_chdir + provider.expects(:hg).with('pull') + provider.expects(:hg).with('merge') + provider.expects(:hg).with('update', '--clean', '-r', @revision) + provider.revision = @revision + end + end + +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/vcsrepo/spec/unit/puppet/provider/vcsrepo/svn_spec.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/vcsrepo/spec/unit/puppet/provider/vcsrepo/svn_spec.rb new file mode 100644 index 00000000000..f44e314a56f --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/vcsrepo/spec/unit/puppet/provider/vcsrepo/svn_spec.rb @@ -0,0 +1,105 @@ +require 'spec_helper' + +describe Puppet::Type.type(:vcsrepo).provider(:svn) do + + let(:resource) { Puppet::Type.type(:vcsrepo).new({ + :name => 'test', + :ensure => :present, + :provider => :svn, + :path => '/tmp/vcsrepo', + })} + + let(:provider) { resource.provider } + + before :each do + Puppet::Util.stubs(:which).with('git').returns('/usr/bin/git') + end + + describe 'creating' do + context 'with source and revision' do + it "should execute 'svn checkout' with a revision" do + resource[:source] = 'exists' + resource[:revision] = '1' + provider.expects(:svn).with('--non-interactive', 'checkout', '-r', + resource.value(:revision), + resource.value(:source), + resource.value(:path)) + provider.create + end + end + context 'with source' do + it "should just execute 'svn checkout' without a revision" do + resource[:source] = 'exists' + provider.expects(:svn).with('--non-interactive', 'checkout', + resource.value(:source), + resource.value(:path)) + provider.create + end + end + + context 'with fstype' do + it "should execute 'svnadmin create' with an '--fs-type' option" do + resource[:fstype] = 'ext4' + provider.expects(:svnadmin).with('create', '--fs-type', + resource.value(:fstype), + resource.value(:path)) + provider.create + end + end + context 'without fstype' do + it "should execute 'svnadmin create' without an '--fs-type' option" do + provider.expects(:svnadmin).with('create', resource.value(:path)) + provider.create + end + end + end + + describe 'destroying' do + it "it should remove the directory" do + expects_rm_rf + provider.destroy + end + end + + describe "checking existence" do + it "should check for the directory" do + expects_directory?(true, resource.value(:path)) + expects_directory?(true, File.join(resource.value(:path), '.svn')) + provider.exists? + end + end + + describe "checking the revision property" do + before do + provider.expects(:svn).with('--non-interactive', 'info').returns(fixture(:svn_info)) + end + it "should use 'svn info'" do + expects_chdir + provider.revision.should == '4' # From 'Revision', not 'Last Changed Rev' + end + end + + describe "setting the revision property" do + before do + @revision = '30' + end + it "should use 'svn update'" do + expects_chdir + provider.expects(:svn).with('--non-interactive', 'update', '-r', @revision) + provider.revision = @revision + end + end + + describe "setting the revision property and repo source" do + before do + @revision = '30' + end + it "should use 'svn switch'" do + resource[:source] = 'an-unimportant-value' + expects_chdir + provider.expects(:svn).with('--non-interactive', 'switch', '-r', @revision, 'an-unimportant-value') + provider.revision = @revision + end + end + +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/vcsrepo/spec/unit/puppet/type/README.markdown b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/vcsrepo/spec/unit/puppet/type/README.markdown new file mode 100644 index 00000000000..1ee19ac840f --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/vcsrepo/spec/unit/puppet/type/README.markdown @@ -0,0 +1,4 @@ +Resource Type Specs +=================== + +Define specs for your resource types in this directory. diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/yum/.fixtures.yml b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/yum/.fixtures.yml new file mode 100644 index 00000000000..bb90cc14880 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/yum/.fixtures.yml @@ -0,0 +1,10 @@ +fixtures: + repositories: + "puppi": "git://github.com/example42/puppi.git" + "monitor": "git://github.com/example42/puppet-monitor.git" + "firewall": "git://github.com/example42/puppet-firewall.git" + "iptables": "git://github.com/example42/puppet-iptables.git" + "concat": "git://github.com/example42/puppet-concat.git" + symlinks: + "yum": "#{source_dir}" + diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/yum/.gemfile b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/yum/.gemfile new file mode 100644 index 00000000000..49ea04a4918 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/yum/.gemfile @@ -0,0 +1,7 @@ +source :rubygems + +puppetversion = ENV['PUPPET_VERSION'] +gem 'puppet', puppetversion, :require => false +gem 'puppet-lint' +gem 'puppetlabs_spec_helper', '>= 0.1.0' +gem 'rspec-puppet', '0.1.6' diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/yum/.project b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/yum/.project new file mode 100644 index 00000000000..13cd06f922b --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/yum/.project @@ -0,0 +1,23 @@ + + + yum + + + + + + com.puppetlabs.geppetto.pp.dsl.ui.modulefileBuilder + + + + + org.eclipse.xtext.ui.shared.xtextBuilder + + + + + + com.puppetlabs.geppetto.pp.dsl.ui.puppetNature + org.eclipse.xtext.ui.shared.xtextNature + + diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/yum/.travis.yml b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/yum/.travis.yml new file mode 100644 index 00000000000..dffeca98741 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/yum/.travis.yml @@ -0,0 +1,21 @@ +language: ruby +rvm: + - 1.8.7 + - 1.9.3 +script: + - "rake spec SPEC_OPTS='--format documentation'" +env: + - PUPPET_VERSION="~> 2.6.0" + - PUPPET_VERSION="~> 2.7.0" + - PUPPET_VERSION="~> 3.0.0" + - PUPPET_VERSION="~> 3.1.0" +matrix: + exclude: + - rvm: 1.9.3 + env: PUPPET_VERSION="~> 2.6.0" + gemfile: .gemfile + +gemfile: .gemfile +notifications: + email: + - al@lab42.it diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/yum/LICENSE b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/yum/LICENSE new file mode 100644 index 00000000000..f41da018579 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/yum/LICENSE @@ -0,0 +1,17 @@ +Copyright (C) 2013 Alessandro Franceschi / Lab42 + +for the relevant commits Copyright (C) by the respective authors. + +Contact Lab42 at: info@lab42.it + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/yum/Modulefile b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/yum/Modulefile new file mode 100644 index 00000000000..69820b86e02 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/yum/Modulefile @@ -0,0 +1,9 @@ +name 'example42-yum' +version '2.1.9' +author 'Alessandro Franceschi' +license 'Apache2' +project_page 'http://www.example42.com' +source 'https://github.com/example42/puppet-yum' +summary 'Puppet module for nagios' +description 'This module installs and manages yum and yum repositories' +dependency 'example42/puppi', '>= 2.0.0' diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/yum/README.md b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/yum/README.md new file mode 100644 index 00000000000..cb254401bf1 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/yum/README.md @@ -0,0 +1,132 @@ +# Puppet module: yum + +This is a Puppet module that manages Yum repositories for Centos RedHat and Scientific Linux + +Made by Alessandro Franceschi / Lab42 + +Inspired by the Yum Immerda module: https://git.puppet.immerda.ch + +Official site: http://www.example42.com + +Official git repository: http://github.com/example42/puppet-yum + +Released under the terms of Apache 2 License. + +This module requires functions provided by the Example42 Puppi module. + +## USAGE + +* Just leave the default options: Automatic detection of Operating System (RedHat, Centos, Scientific supported) Epel repo installation, keeping of local yum files, automatic updates disabled. + + class { 'yum': + } + +* Enable automatic updates via cron (updatesd is supported only on 5) + + class { 'yum': + update => 'cron', + } + + +* Purge local /etc/yum.repos.d/ and enforce its contents only via a custom source + + class { 'yum': + source_repo_dir => 'puppet:///modules/example42/yum/conf/', + clean_repos => true, + } + +* Enable EPEL and PuppetLabs repos + + class { 'yum': + extrarepo => [ 'epel' , 'puppetlabs' ], + } + + +* Do not include any extra repo (By default EPEL is added) + + class { 'yum': + extrarepo => '' , + } + +* Automatically copy in /etc/pki/rpm-gpg all the rpm-gpg keys known by the yum module (this was the "old" and intrusive behaviour, now each rpm-gpg key may be individually provided by the yum::manages_repos' gpgkey_source parameter) + + class { 'yum': + install_all_keys => true , + } + +* Include a selected extra repo + + include yum::repo::puppetlabs + + +## USAGE - Overrides and Customizations +* Enable auditing without without making changes on existing yum configuration files + + class { 'yum': + audit_only => true + } + + +* Use custom sources for main config file + + class { 'yum': + source => [ "puppet:///modules/lab42/yum/yum.conf-${hostname}" , "puppet:///modules/lab42/yum/yum.conf" ], + } + + +* Use custom source directory for the whole configuration dir + + class { 'yum': + source_dir => 'puppet:///modules/lab42/yum/conf/', + source_dir_purge => false, # Set to true to purge any existing file not present in $source_dir + } + +* Use custom template for main config file. Note that template and source arguments are alternative. + + class { 'yum': + template => 'example42/yum/yum.conf.erb', + } + +* Automatically include a custom subclass + + class { 'yum': + my_class => 'yum::example42', + } + + +## USAGE - Example42 extensions management +* Activate puppi (recommended, but disabled by default) + + class { 'yum': + puppi => true, + } + +* Activate puppi and use a custom puppi_helper template (to be provided separately with a puppi::helper define ) to customize the output of puppi commands + + class { 'yum': + puppi => true, + puppi_helper => 'myhelper', + } + + +## OPERATING SYSTEMS SUPPORT + +REDHAT 6 - Full + +REDHAT 5 - Full + +REDHAT 4 - Partial + +CENTOS 6 - Full + +CENTOS 5 - Full + +CENTOS 4 - Partial + +SCIENTIFIC 6 - Full + +SCIENTIFIC 5 - Full + +AMAZON LINUX 3 (Sigh) - Partial + +[![Build Status](https://travis-ci.org/example42/puppet-yum.png?branch=master)](https://travis-ci.org/example42/puppet-yum) diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/yum/Rakefile b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/yum/Rakefile new file mode 100644 index 00000000000..f0d1465cdc0 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/yum/Rakefile @@ -0,0 +1,5 @@ +require 'rubygems' +require 'puppetlabs_spec_helper/rake_tasks' +require 'puppet-lint/tasks/puppet-lint' +PuppetLint.configuration.send('disable_80chars') +PuppetLint.configuration.send('disable_class_parameter_defaults') diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/yum/files/Amazon.3/rpm-gpg/RPM-GPG-KEY-CentOS-6 b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/yum/files/Amazon.3/rpm-gpg/RPM-GPG-KEY-CentOS-6 new file mode 100644 index 00000000000..bd863d8e212 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/yum/files/Amazon.3/rpm-gpg/RPM-GPG-KEY-CentOS-6 @@ -0,0 +1,30 @@ +-----BEGIN PGP PUBLIC KEY BLOCK----- +Version: GnuPG v1.4.5 (GNU/Linux) + +mQINBE4P06MBEACqn48FZgYkG2QrtUAVDV58H6LpDYEcTcv4CIFSkgs6dJ9TavCW +NyPBZRpM2R+Rg5eVqlborp7TmktBP/sSsxc8eJ+3P2aQWSWc5ol74Y0OznJUCrBr +bIdypJllsD9Fe+h7gLBXTh3vdBEWr2lR+xA+Oou8UlO2gFbVFQqMafUgU1s0vqaE +/hHH0TzwD0/tJ6eqIbHwVR/Bu6kHFK4PwePovhfvyYD9Y+C0vOYd5Ict2vbLHz1f +QBDZObv4M6KN3j7nzme47hKtdMd+LwFqxM5cXfM6b5doDulWPmuGV78VoX6OR7el +x1tlfpuiFeuXYnImm5nTawArcQ1UkXUSYcTUKShJebRDLR3BycxR39Q9jtbOQ29R +FumHginovEhdUcinRr22eRXgcmzpR00zFIWoFCwHh/OCtG14nFhefuZ8Z80qbVhW +2J9+/O4tksv9HtQBmQNOK5S8C4HNF2M8AfOWNTr8esFSDc0YA5/cxzdfOOtWam/w +lBpNcUUSSgddRsBwijPuWhVA3NmA/uQlJtAo4Ji5vo8cj5MTPG3+U+rfNqRxu1Yc +ioXRo4LzggPscaTZX6V24n0fzw0J2k7TT4sX007k+7YXwEMqmHpcMYbDNzdCzUer +Zilh5hihJwvGfdi234W3GofttoO+jaAZjic7a3p6cO1ICMgfVqrbZCUQVQARAQAB +tEZDZW50T1MtNiBLZXkgKENlbnRPUyA2IE9mZmljaWFsIFNpZ25pbmcgS2V5KSA8 +Y2VudG9zLTYta2V5QGNlbnRvcy5vcmc+iQI8BBMBAgAmBQJOD9OjAhsDBQkSzAMA +BgsJCAcDAgQVAggDBBYCAwECHgECF4AACgkQCUb8osEFud6ajRAAnb6d+w6Y/v/d +MSy7UEy4rNquArix8xhqBwwjoGXpa37OqTvvcJrftZ1XgtzmTbkqXc+9EFch0C+w +ST10f+H0SPTUGuPwqLkg27snUkDAv1B8laub+l2L9erzCaRriH8MnFyxt5v1rqWA +mVlRymzgXK+EQDr+XOgMm1CvxVY3OwdjdoHNox4TdVQWlZl83xdLXBxkd5IRciNm +sg5fJAzAMeg8YsoDee3m4khg9gEm+/Rj5io8Gfk0nhQpgGGeS1HEXl5jzTb44zQW +qudkfcLEdUMOECbu7IC5Z1wrcj559qcp9C94IwQQO+LxLwg4kHffvZjCaOXDRiya +h8KGsEDuiqwjU9HgGq9fa0Ceo3OyUazUi+WnOxBLVIQ8cUZJJ2Ia5PDnEsz59kCp +JmBZaYPxUEteMtG3yDTa8c8jUnJtMPpkwpSkeMBeNr/rEH4YcBoxuFjppHzQpJ7G +hZRbOfY8w97TgJbfDElwTX0/xX9ypsmBezgGoOvOkzP9iCy9YUBc9q/SNnflRWPO +sMVrjec0vc6ffthu2xBdigBXhL7x2bphWzTXf2T067k+JOdoh5EGney6LhQzcp8m +YCTENStCR+L/5XwrvNgRBnoXe4e0ZHet1CcCuBCBvSmsPHp5ml21ahsephnHx+rl +JNGtzulnNP07RyfzQcpCNFH7W4lXzqM= +=jrWY +-----END PGP PUBLIC KEY BLOCK----- diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/yum/files/Amazon.3/rpm-gpg/RPM-GPG-KEY-EPEL b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/yum/files/Amazon.3/rpm-gpg/RPM-GPG-KEY-EPEL new file mode 100644 index 00000000000..7a2030489d2 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/yum/files/Amazon.3/rpm-gpg/RPM-GPG-KEY-EPEL @@ -0,0 +1,29 @@ +-----BEGIN PGP PUBLIC KEY BLOCK----- +Version: GnuPG v1.4.5 (GNU/Linux) + +mQINBEvSKUIBEADLGnUj24ZVKW7liFN/JA5CgtzlNnKs7sBg7fVbNWryiE3URbn1 +JXvrdwHtkKyY96/ifZ1Ld3lE2gOF61bGZ2CWwJNee76Sp9Z+isP8RQXbG5jwj/4B +M9HK7phktqFVJ8VbY2jfTjcfxRvGM8YBwXF8hx0CDZURAjvf1xRSQJ7iAo58qcHn +XtxOAvQmAbR9z6Q/h/D+Y/PhoIJp1OV4VNHCbCs9M7HUVBpgC53PDcTUQuwcgeY6 +pQgo9eT1eLNSZVrJ5Bctivl1UcD6P6CIGkkeT2gNhqindRPngUXGXW7Qzoefe+fV +QqJSm7Tq2q9oqVZ46J964waCRItRySpuW5dxZO34WM6wsw2BP2MlACbH4l3luqtp +Xo3Bvfnk+HAFH3HcMuwdaulxv7zYKXCfNoSfgrpEfo2Ex4Im/I3WdtwME/Gbnwdq +3VJzgAxLVFhczDHwNkjmIdPAlNJ9/ixRjip4dgZtW8VcBCrNoL+LhDrIfjvnLdRu +vBHy9P3sCF7FZycaHlMWP6RiLtHnEMGcbZ8QpQHi2dReU1wyr9QgguGU+jqSXYar +1yEcsdRGasppNIZ8+Qawbm/a4doT10TEtPArhSoHlwbvqTDYjtfV92lC/2iwgO6g +YgG9XrO4V8dV39Ffm7oLFfvTbg5mv4Q/E6AWo/gkjmtxkculbyAvjFtYAQARAQAB +tCFFUEVMICg2KSA8ZXBlbEBmZWRvcmFwcm9qZWN0Lm9yZz6JAjYEEwECACAFAkvS +KUICGw8GCwkIBwMCBBUCCAMEFgIDAQIeAQIXgAAKCRA7Sd8qBgi4lR/GD/wLGPv9 +qO39eyb9NlrwfKdUEo1tHxKdrhNz+XYrO4yVDTBZRPSuvL2yaoeSIhQOKhNPfEgT +9mdsbsgcfmoHxmGVcn+lbheWsSvcgrXuz0gLt8TGGKGGROAoLXpuUsb1HNtKEOwP +Q4z1uQ2nOz5hLRyDOV0I2LwYV8BjGIjBKUMFEUxFTsL7XOZkrAg/WbTH2PW3hrfS +WtcRA7EYonI3B80d39ffws7SmyKbS5PmZjqOPuTvV2F0tMhKIhncBwoojWZPExft +HpKhzKVh8fdDO/3P1y1Fk3Cin8UbCO9MWMFNR27fVzCANlEPljsHA+3Ez4F7uboF +p0OOEov4Yyi4BEbgqZnthTG4ub9nyiupIZ3ckPHr3nVcDUGcL6lQD/nkmNVIeLYP +x1uHPOSlWfuojAYgzRH6LL7Idg4FHHBA0to7FW8dQXFIOyNiJFAOT2j8P5+tVdq8 +wB0PDSH8yRpn4HdJ9RYquau4OkjluxOWf0uRaS//SUcCZh+1/KBEOmcvBHYRZA5J +l/nakCgxGb2paQOzqqpOcHKvlyLuzO5uybMXaipLExTGJXBlXrbbASfXa/yGYSAG +iVrGz9CE6676dMlm8F+s3XXE13QZrXmjloc6jwOljnfAkjTGXjiB7OULESed96MR +XtfLk0W5Ab9pd7tKDR6QHI7rgHXfCopRnZ2VVQ== +=V/6I +-----END PGP PUBLIC KEY BLOCK----- diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/yum/files/Amazon.3/rpm-gpg/RPM-GPG-KEY-RBEL b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/yum/files/Amazon.3/rpm-gpg/RPM-GPG-KEY-RBEL new file mode 100644 index 00000000000..152fd799008 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/yum/files/Amazon.3/rpm-gpg/RPM-GPG-KEY-RBEL @@ -0,0 +1,36 @@ +-----BEGIN PGP PUBLIC KEY BLOCK----- +Version: GnuPG v2.0.14 (GNU/Linux) + +mQGiBEZ6qawRBAC2gDuA1sZioGh1VP/U0l+9RmzOdkWBGB3NfWqezAwt1Up+cP5o +h+UNkghOKbJVQ/zLyY/edYOppQ78yxT1X/J1RHNhs5bjqzWlQxMbT5/tt1N4PExu +gvO38RGFTV0DqIy3lQw5YIwp2le+G8MktYh2NKI4lG0AJoXZicNlI7+mEwCgmfw+ +CnsB/kb/xUD1dq6Mo3dYXVcEAKSFfqt+6jvJNxcIYfpQqjEslQsQmPKpXzK9CPyV +UCjUEOirbhPxV86u3Ge/yuy5USMvTTs+ztImabbH6UHBEP+tEw3LiuPUpfh+nEna +3Hz+U81PvUwGEwUMzCr+OemBXqGW7jl66NqKqm8YM3Pkvc4NlS/7slky9A/s6i8S +hToWA/9kP55aSbIXte5TbC88lx6YuLx7qW541ni38DmJfPN5hHywLGnM82MMQMbk +hg1v49+7TTNv44LJpGT7t8gsW9F4Z4rWoChhsldypeeqbDOIv4kFiXt/8122Ud9J +nE67CR9XUuS5Jp+gP6xxNr9/vbvqsOGMJAQkVgkBPVuKYv25gLQ3U2VyZ2lvIFJ1 +YmlvIChGcmFtZU9TIERldmVsb3BlcnMpIDxydWJpb2pyQGZyYW1lb3Mub3JnPohr +BBMRAgArAhsDBQkGE0x0BgsJCAcDAgYVCAIJCgsEFgIDAQIeAQIXgAUCTBs76AIZ +AQAKCRCOw9dP80W+dFhjAJ0dKy761iPcG+ALwEAuAgxDpUVBzgCdFxGCAZ7ELYvf +3uFc0Ou2ihDzvyy0IFNlcmdpbyBSdWJpbyA8c2VyZ2lvQHJ1YmlvLm5hbWU+iGYE +ExECACYCGwMGCwkIBwMCBBUCCAMEFgIDAQIeAQIXgAUJBhNMdAUCTBs7XgAKCRCO +w9dP80W+dDdtAJ9NYoW1ChfMyES7nQUlesEQ4aWXjQCeIoGxoOuIGyg6+AKr/2Wr +6fE1zt2IaQQTEQIAKQIbAwYLCQgHAwIEFQIIAwQWAgMBAh4BAheAAhkBBQJIHsGo +BQkCuHFEAAoJEI7D10/zRb50KjgAnRTzzNIODKqrHnrHaUG8dWDCwmYjAJ48Hbcn +ZC6E8LGTeM8vPN0mMI9ijLkCDQRGeqm2EAgAh720kjA9bNDms+6agb6CirD9RkmZ +3G+OHd5iia3KbaUiBtC3PECg4UE8N54JuBNKdjgJQfdYSg2J0EZHyhZHdAVWjykE +tj/IKZKnAfUqKh44uT9OUPW8PChPo/gioLn+DexSAW7n19h7VIa1P3shYqYR/gz8 +zgfrXkFFpkpKnOLsXuF20JEEBIBdwrfYRJIBrUTYrfS/2GKLJjyutENkb9uI3JgQ +LfR6DckTaar4eeArjgvOxZRHiU0vRezetlbG8ZM9mSYrcMM3Xa5vLpFlDj6vYzat +RWEuZUfLgXWUVoVyFiNVXhpff/w7/bAb3WpXqjZd6sK8CCJJPNtnbLE7CwADBQf9 +EQjT9iiEZis35V9HqeLsxXVjPOGNuLiwjIpacI7CM3aGV1q7NXiCE4oWS/PvpHmu +W+XdXMPH4Bt2VmjZSarlAipTeNnOuiEXipUFIjAlNn1xNVRRd7T35zIvXLtmNtUe +nN1/mqZljKPbCbW1AgktH417t/vJfTnRWr9IgS3Am+o4q200i+1FjrQ/UI3s9+vg +5B+KASFP6HspNttl0kwzQ6SFIHAebd4DKHOj6ShxXPNl18W4R8qPqayrAFqdkgMJ +Jn8j2E8rmGYnssSfjck2kLtvNdTEAMjFnhg+oUapUzJAVeterudiWZFNrtn9ewnf +8SUiiYJlxb+nz545zo0gQIhJBBgRAgAJBQJGeqm2AhsMAAoJEI7D10/zRb50PJEA +mwTA+Sp3wvzwDr8sk7W7U4bBfw26AKCVoYw3mfTime+j3mFk1yk1yxjE2Q== +=iyOs +-----END PGP PUBLIC KEY BLOCK----- + diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/yum/files/Amazon.3/rpm-gpg/RPM-GPG-KEY-beta b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/yum/files/Amazon.3/rpm-gpg/RPM-GPG-KEY-beta new file mode 100644 index 00000000000..b86da239064 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/yum/files/Amazon.3/rpm-gpg/RPM-GPG-KEY-beta @@ -0,0 +1,28 @@ +-----BEGIN PGP PUBLIC KEY BLOCK----- +Version: GnuPG v1.2.6 (GNU/Linux) + +mQGiBEWfBuERBACrwDH+6QvpyaOgzhXiemsIX+q4HlhX/HDmrmZOUd7i9VmZNogP +6LRRiTygn2+UphaGV3NDA36ZB/1JRpgvgpzbpZNeAoFvsljIbxGIwkH2JgRF6oNo +eGB3QYzDQJvYVIejk79M0ed3oor4w8OiNVcdxLyVIthFrjrrCqwRP3bLZwCgtY9t +Ezf5WL63Ue45vdht7A2GH+0D/iNAnWKsU7FUMFZrcwMaMbyP7YG8z0+zXUOgtgyP +tbgJG5yikNT3vJypb42gbKfcriUUDC5AeiRmkR8QPvYuOm34rM90+wx2LGqXWnHM +IyLAyl8TS3MQmePem8bfTGTNYxtt3Q7iadez2WYTLBSlmM6hbxZfdwm1hhyM0AJU +YyFUA/9kHH+CUBxKb1UgG7TSp53Po/5p/Yyuty+RJ7zIGv6SiN/JK4/ntWfm5WS5 +ZprSdE5ODoFQ/Gs3/VB/eolg2fBW1DcftH6lKHT3GKEOaicGX+T9eOMerZZedm5U +vDA9mFvWnOdOxK8LuRgVqip4jCnWICchpatmdP0whJQHQ6MGLLRMQ2VudE9TLTUg +QmV0YSBLZXkgKENlbnRPUyA1IEJldGEgU2lnbmluZyBLZXkpIDxjZW50b3MtNS1i +ZXRhLWtleUBjZW50b3Mub3JnPohkBBMRAgAkBQJFnwbhAhsDBQkSzAMABgsJCAcD +AgMVAgMDFgIBAh4BAheAAAoJEM/aaIEJLXsrWDkAoKcqa+AAdAWvp5qlJkGQiRy8 +aNFDAJ4qRfIxMiLinmjbqcuygWMp61wY5ohMBBMRAgAMBQJFnwhtBYMSzAF0AAoJ +EDjCFhY5bKCkG/wAn14LDlJqjZv1Wz0WNfhr80+qJrf6AKCaIZExwo4ApQpESk/F +SApLd/pEILkBDQRFnwbrEAQAwKzjI2aTB/sS9HuQ4CHCwrj4vr0HxMMwQikYBIvy +MYTtek04KDTKoJL5g3411DsfDW9VRGJdFCHvldgam/5UVfO6nywLkdwAA5TQA5dv +8YE8jTtwdy5Y1QKFc8LaIBZK0+ZbhEvdNfv67egvfcxZc5PvpBZ3C03n+iQ3wPcg +PhcAAwUD/iYkq4LG/je43Qa5rTz5kF5rIiX7Bk5vXT7XSFOFKwHy8V+PGEoVM1W8 ++EHIlmTycwIlsVp3by6qCDkMYu4V6VukxZNzJyeoMICiYIXUPh6NKHRoqaYlu6ZO +eFN1TQNXmodPk+iNtdbcby/zAklNqoO/dWSwd8NAo8s6WAHq3VPpiE8EGBECAA8F +AkWfBusCGwwFCRLMAwAACgkQz9pogQkteysXkACgoraCU0EBC+W8TuxrsePO20ma +D0IAoLRRQLTEXL0p3K0WE+LfyTr9EVG5 +=mH0S +-----END PGP PUBLIC KEY BLOCK----- + diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/yum/files/Amazon.3/rpm-gpg/RPM-GPG-KEY-kbsingh b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/yum/files/Amazon.3/rpm-gpg/RPM-GPG-KEY-kbsingh new file mode 100644 index 00000000000..f8c688e5f4c --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/yum/files/Amazon.3/rpm-gpg/RPM-GPG-KEY-kbsingh @@ -0,0 +1,25 @@ +-----BEGIN PGP PUBLIC KEY BLOCK----- +Version: GnuPG v1.2.6 (GNU/Linux) + +mQGiBEIu6hwRBACOz2JFa1nW+seAKlVGOu0ykhdFVNI9E4/Abp2+8nsJIZyUwLAp +ei76rPD8WdptgIjtYOCsqz1TbP+eqeEG0LLihOdFRLUuAjQX4X7LLf5Qm+nvUB73 +uLbSf9Ptps2CMUEtu7+0wVoTbuC19HXUhUr5sRdCnJbPJBH6aAHG7Pl9ZwCguN9o +V7IKTnIQiZg0nxSjZ4V9e6UD/R7KoMwH3NPQQF7T7rJaBjSZcVHUPhAcNPNn+ms/ +Tw9mzHZ0mnQnOzSEW0ZUj9TkLN52VQ3WmGZKAv9yeVr0/230YIgmtH863lSystmk +LNO9brK0+3vKg5GRpV0/MSWSmf39WPAS1hXNXIFfYp1eGHUfed4FVNxrMTWHQozr +8JosA/wP+zGfM51bSAazLUqP/MEm7F9OFkuD7Sw97w55FyYlrPp1FQWrWczoiKHr +wS5NRCQbCGEEM/+j9id6CukxPLXxwMYCfeg5K0HxMaQT6hxbwjOzAzN3PBFytNel +09qdrdoSDa35twT0SAt+rzM+zvRI8ycizFG3lIih4UItWWve2bQ6S2FyYW5iaXIg +U2luZ2ggKGh0dHA6Ly93d3cua2FyYW4ub3JnLykgPGtic2luZ2hAa2FyYW4ub3Jn +PoheBBMRAgAeBQJCLuocAhsDBgsJCAcDAgMVAgMDFgIBAh4BAheAAAoJEDANvZ4+ +E89b/P4AnjufrDCS+TAEL0KpkYDURePbDCHBAJ4+0iI1Td4YrcnLwmQ1+XDCJ3Zr +a7kBDQRCLuocEAQAjAl48FM9eGtP6M9FgswlSPAuCcJct6wOHmd/qZ923HckJPAD +zIFRMlM6H8P0bKoaIluv7agZM7Gsf8NeTg3NEeMKqnibIAyvjYeSkceRIwvBCQ3A +YwWk+B2zLUAFMxnE31oA10zjCKUo7Dc6XDUxSY/qdLymZzyG/Ndav+vMOVsAAwUD +/RCFDuW/GSM/s3DO7XxrOBRTGQmf9v9tCYdZZD615+s8ghaa5oZTvp1cbTTWiSq8 +ybncfjVHz9HezDgQjJsFZtrYd4w2JD+7K0+8sZ+BUGo1dDSv4UgN8ACtaGJnShiq +s8pQWRZFqFa3waay8oUSTKHiTHdpxLi3x4HhK/8MTsxniEkEGBECAAkFAkIu6hwC +GwwACgkQMA29nj4Tz1tHSgCcDgKL4swEu7ShvI8nZt2JLmTKB5QAn0qZi2zbexbi +DX+bbalHM+xVnXZN +=rZT6 +-----END PGP PUBLIC KEY BLOCK----- diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/yum/files/Amazon.3/rpm-gpg/RPM-GPG-KEY-remi b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/yum/files/Amazon.3/rpm-gpg/RPM-GPG-KEY-remi new file mode 100644 index 00000000000..32833860645 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/yum/files/Amazon.3/rpm-gpg/RPM-GPG-KEY-remi @@ -0,0 +1,24 @@ +-----BEGIN PGP PUBLIC KEY BLOCK----- +Version: GnuPG v1.4.7 (GNU/Linux) + +mQGiBEJny1wRBACRnbQgZ6qLmJSuGvi/EwrRL6aW610BbdpLQRL3dnwy5wI5t9T3 +/JEiEJ7GTvAwfiisEHifMfk2sRlWRf2EDQFttHyrrYXfY5L6UAF2IxixK5FL7PWA +/2a7tkw1IbCbt4IGG0aZJ6/xgQejrOLi4ewniqWuXCc+tLuWBZrGpE2QfwCggZ+L +0e6KPTHMP97T4xV81e3Ba5MD/3NwOQh0pVvZlW66Em8IJnBgM+eQh7pl4xq7nVOh +dEMJwVU0wDRKkXqQVghOxALOSAMapj5mDppEDzGLZHZNSRcvGEs2iPwo9vmY+Qhp +AyEBzE4blNR8pwPtAwL0W3cBKUx7ZhqmHr2FbNGYNO/hP4tO2ochCn5CxSwAfN1B +Qs5pBACOkTZMNC7CLsSUT5P4+64t04x/STlAFczEBcJBLF1T16oItDITJmAsPxbY +iee6JRfXmZKqmDP04fRdboWMcRjfDfCciSdIeGqP7vMcO25bDZB6x6++fOcmQpyD +1Fag3ZUq2yojgXWqVrgFHs/HB3QE7UQkykNp1fjQGbKK+5mWTrQkUmVtaSBDb2xs +ZXQgPFJQTVNARmFtaWxsZUNvbGxldC5jb20+iGAEExECACAFAkZ+MYoCGwMGCwkI +BwMCBBUCCAMEFgIDAQIeAQIXgAAKCRAATm9HAPl/Vv/UAJ9EL8ioMTsz/2EPbNuQ +MP5Xx/qPLACeK5rk2hb8VFubnEsbVxnxfxatGZ25AQ0EQmfLXRAEANwGvY+mIZzj +C1L5Nm2LbSGZNTN3NMbPFoqlMfmym8XFDXbdqjAHutGYEZH/PxRI6GC8YW5YK4E0 +HoBAH0b0F97JQEkKquahCakj0P5mGuH6Q8gDOfi6pHimnsSAGf+D+6ZwAn8bHnAa +o+HVmEITYi6s+Csrs+saYUcjhu9zhyBfAAMFA/9Rmfj9/URdHfD1u0RXuvFCaeOw +CYfH2/nvkx+bAcSIcbVm+tShA66ybdZ/gNnkFQKyGD9O8unSXqiELGcP8pcHTHsv +JzdD1k8DhdFNhux/WPRwbo/es6QcpIPa2JPjBCzfOTn9GXVdT4pn5tLG2gHayudK +8Sj1OI2vqGLMQzhxw4hJBBgRAgAJBQJCZ8tdAhsMAAoJEABOb0cA+X9WcSAAn11i +gC5ns/82kSprzBOU0BNwUeXZAJ0cvNmY7rvbyiJydyLsSxh/la6HKw== +=6Rbg +-----END PGP PUBLIC KEY BLOCK----- diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/yum/files/Amazon.3/rpm-gpg/RPM-GPG-KEY-rpmforge-dag b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/yum/files/Amazon.3/rpm-gpg/RPM-GPG-KEY-rpmforge-dag new file mode 100644 index 00000000000..8ee27f45b9b --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/yum/files/Amazon.3/rpm-gpg/RPM-GPG-KEY-rpmforge-dag @@ -0,0 +1,32 @@ +The following public key can be used to verify RPM packages +downloaded from http://dag.wieers.com/apt/ using 'rpm -K' +if you have the GNU GPG package. +Questions about this key should be sent to: +Dag Wieers + +-----BEGIN PGP PUBLIC KEY BLOCK----- +Version: GnuPG v1.2.1 (GNU/Linux) + +mQGiBD9JMT0RBAC9Q2B0AloUMTxaK73sD0cOu1MMdD8yuDagbMlDtUYA1aGeJVO6 +TV02JLGr67OBY+UkYuC1c3PUwmb3+jakZd5bW1L8E2L705wS0129xQOZPz6J+alF +5rTzVkiefg8ch1yEcMayK20NdyOmhDGXQXNQS8OJFLTIC6bJs+7MZL83/wCg3cG3 +3q7MWHm3IpJb+6QKpB9YH58D/2WjPDK+7YIky/JbFBT4JPgTSBy611+bLqHA6PXq +39tzY6un8KDznAMNtm+NAsr6FEG8PHe406+tbgd7tBkecz3HPX8nR5v0JtDT+gzN +8fM3kAiAzjCHUAFWVAMAZLr5TXuoq4lGTTxvZbwTjZfyjCm7gIieCu8+qnPWh6hm +30NgA/0ZyEHG6I4rOWqPks4vZuD+wlp5XL8moBXEKfEVOMh2MCNDRGnvVHu1P3eD +oHOooVMt9sWrGcgxpYuupPNL4Uf6B6smiLlH6D4tEg+qCxC17zABI5572XJTJ170 +JklZJrPGtnkPrrKMamnN9MU4RjGmjh9JZPa7rKjZHyWP/z/CBrQ1RGFnIFdpZWVy +cyAoRGFnIEFwdCBSZXBvc2l0b3J5IHYxLjApIDxkYWdAd2llZXJzLmNvbT6IWQQT +EQIAGQUCP0kxPQQLBwMCAxUCAwMWAgECHgECF4AACgkQog5SFGuNeeYvDQCeKHST +hIq/WzFBXtJOnQkJGSqAoHoAnRtsJVWYmzYKHqzkRx1qAzL18Sd0iEYEEBECAAYF +Aj9JMWAACgkQoj2iXPqnmevnOACfRQaageMcESHVE1+RSuP3txPUvoEAoJAtOHon +g+3SzVNSZLn/g7/Ljfw+uQENBD9JMT8QBACj1QzRptL6hbpWl5DdQ2T+3ekEjJGt +llCwt4Mwt/yOHDhzLe8SzUNyYxTXUL4TPfFvVW9/j8WOkNGvffbs7g84k7a5h/+l +IJTTlP9V9NruDt1dlrBe+mWF6eCY55OFHjb6nOIkcJwKxRd3nGlWnLsz0ce9Hjrg +6lMrn0lPsMV6swADBQP9H42sss6mlqnJEFA97Fl3V9s+7UVJoAIA5uSVXxEOwVoh +Vq7uECQRvWzif6tzOY+vHkUxOBRvD6oIU6tlmuG3WByKyA1d0MTqMr3eWieSYf/L +n5VA9NuD7NwjFA1kLkoDwfSbsF51LppTMkUggzwgvwE46MB6yyuqAVI1kReAWw+I +RgQYEQIABgUCP0kxPwAKCRCiDlIUa4155oktAKDAzm9QYbDpk6SrQhkSFy016BjE +BACeJU1hpElFnUZCL4yKj4EuLnlo8kc= +=mqUt +-----END PGP PUBLIC KEY BLOCK----- diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/yum/files/Amazon.3/rpm-gpg/RPM-GPG-KEY-webtatic-andy b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/yum/files/Amazon.3/rpm-gpg/RPM-GPG-KEY-webtatic-andy new file mode 100644 index 00000000000..317b802b560 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/yum/files/Amazon.3/rpm-gpg/RPM-GPG-KEY-webtatic-andy @@ -0,0 +1,30 @@ +-----BEGIN PGP PUBLIC KEY BLOCK----- +Version: GnuPG v1.4.5 (GNU/Linux) + +mQGiBE1e+1MRBAD8j+KyOIpGNRN39gNy2E/1HG4ZoLFuxIOxI5/1FEuZB/GjYF5m +DvJerZukd0QCqCs72J6J+uWnfD/52t2XWTw4IHPpCWeyr9TWex3uOYmrYzY+0l0l +qsCsrhT0XGkAE0+/20oEP2+t/d+1q0yRcYZRwWK/ME2rUUX0jOa/B3Bc6wCg3blw +XdZNrv1wVNd1PCOUI79k0V0D+wfbybos8Cmdv2f8dD746fSR/hmp4SzpBDmPRRQu +0gtJAKI6ycTdotGq5zHfZj76kDQBudeIgdbWtqfckP2lK47i8lIENAyC4MK8dxh9 +Ts+b1LqXlbcPyixzImf4qoT5DT1lSEUPwoMRX8W/29GAcvnZpOwQ8g7DNmRBpFFY +8U2GBADz6uEeP3YwJAuL7pi77AalxR0WQAADMR59pGltQdXaZvANXoioU0W519Pb +nl3gKWDiTuwUDrwaSPoBbNLyX4s0AE7/0HSG02/eRjLB8toQpAH9xkK/u2WPe/do +erZg5yg1qhoCbEM7kJ2I/GBl6VbPedt2ORdsC4ZTWTnZJh6tYLQhQW5keSBUaG9t +cHNvbiA8YW5keUB3ZWJ0YXRpYy5jb20+iGAEExECACAFAk1e+1MCGwMGCwkIBwMC +BBUCCAMEFgIDAQIeAQIXgAAKCRC3Q0sGz0xP+TA0AJwJf5ZPeub8v+5CtZwdcZhV +LU0sjgCgrP3y54heBjF1vhZQ3rJywTmRLHe5Ag0ETV77UxAIAIQPLVFbqheJ90Kf +NF8TYt3ZIMpP5chw25OYq4tuZMzVJxKjUlM7KPQxUKquY/F9WpjH980LmICTb4Fz +txzn2bshIsGyg8pDUSnVK0NPY5uaq9bK4oht8wkr3FNFT2FpeqDIJyn+phIuEpIi +qt1LJyzzjobh9csaaGmNHvtrlkIggBj2n/ZQuGNhcYnKUZ/WGmkItCTSOfA++G+C +dCo1aPEymfbnJvaLB/mLyzA+r/r7LQM10cZEtqh5JdclJEh3CzZmx9HsRxCDZF8W +X/C4MmCwmIxmuU4vkVNhHFTQimQEUR8vg9ltiz8+xBjyE1Iav4MxfOYh3xjdJk1d +zlovyUcAAwUH/2KPgf0UQ1o+4IjOYinEEbNlrD1pKw5anUKwaaeQi0vm/oRG0E2F +ZCJ73OHxW/0hMrwbrGwXcm4NBARnAppg+/CecOVpkBgD5hrM+11DPhxdd1bjjfza +Pq8GmPp8SSsiTPUCoSlzojxL3Z05RNbvKVzxzxbYdx5h5XOTflI7bAHTY4AzGSDf +WaFljjCucht/d7u5empAd02haldUXWjT9RvY5RwnRZ+hjI47e+wUA0FMLHYtA1/0 +cwEIvpp2xwF/jpH3ODmnIGEeNoLyzAV7X0KAlSN8VRsh7igZRB9TRGI67aTjRgk8 +ayf/QNxAzwEk1MeDv67IFKNYVolxHCt4CtqISQQYEQIACQUCTV77UwIbDAAKCRC3 +Q0sGz0xP+dPiAKDUNJ5rkB9CRoMH9BC35d0fqXXeugCgwl/HYv52dWgatbyEGLet +etv5Qeg= +=nIAo +-----END PGP PUBLIC KEY BLOCK----- diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/yum/files/Amazon.3/rpm-gpg/RPM-GPG-KEY.atrpms b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/yum/files/Amazon.3/rpm-gpg/RPM-GPG-KEY.atrpms new file mode 100644 index 00000000000..860ace4d247 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/yum/files/Amazon.3/rpm-gpg/RPM-GPG-KEY.atrpms @@ -0,0 +1,20 @@ +-----BEGIN PGP PUBLIC KEY BLOCK----- +Version: GnuPG v1.4.6 (GNU/Linux) + +mQGiBD5gtCgRBACKIvjMF+20r9k/Uw2Hq6Y/qn1nM0AZEFalhglXP5pMm5bMgkcI +1vCWqJxSbhQhk8hSEenoszes8hyUxHj4hFFUDiRtAxOpCpGCsCnUddgQtHAQd+tm +aQsM6J3Jm/EZPtwR0lvwvRGvz2x6Rr95G8+42KK9x+mBYhLk0y3gAbBzhwCgnkDH +a97MGBT7gRLrmtFqiHrWlPkD/2tBaH6IEuoJhcAbNj9MukbhDOYJ6ic9Nzf6sR3t +ZG+XgQLLS2DNy8+HWcYJOjpJDEe8zWFDdUv3cL1D0U2f2e85FuJaMucHn+816iw8 +mNjZXJEoDE4LJ8Vv53fkevNZpdWmO2VtRwI+woDnIHYHukDLj2sWhVt+5W+uOKAE +OippA/9OzuWrwBtTR+Np8ApZGkxhxU1z0iEStV+kQNqJE7YoR4SGMuzEa3bFzrPx +k4qIU+rw4YgFgHrs1x08lXxNOZkq6avvbl60HqN2qF2UQL/YdU+5X3ixaJVaYYk8 +yuK+hp0Hx2DdBWmVhq6rEzIfpnFhF4qspwMWEiiBGjYDL62W7LQ0QVRycG1zLm5l +dCAocnBtIHNpZ25pbmcga2V5KSA8QXhlbC5UaGltbUBBVHJwbXMubmV0PohnBBMR +AgAnAhsDBgsJCAcDAgMVAgMDFgIBAh4BAheAAhkBBQJFfF9PBQkJGI4nAAoJEFCM +5eZmU0wrJ0IAnA0BdyRlq2S8ess55R8YMFnWAWXEAJ9Fa7cEHku4j4B83shCODps ++DYUZohnBBMRAgAnAhsDBQkDdMLsBgsJCAcDAgMVAgMDFgIBAh4BAheABQJAKteu +AhkBAAoJEFCM5eZmU0wrMMUAnRjS2PXQp0tsC/69IGMMxqU+8xeAAJ9XQjVAo+mU +kg/3AeBlMBIlFe5hDQ== +=23Fz +-----END PGP PUBLIC KEY BLOCK----- diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/yum/files/Amazon.3/rpm-gpg/RubyWorks.GPG.key b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/yum/files/Amazon.3/rpm-gpg/RubyWorks.GPG.key new file mode 100644 index 00000000000..b91a5a88769 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/yum/files/Amazon.3/rpm-gpg/RubyWorks.GPG.key @@ -0,0 +1,30 @@ +-----BEGIN PGP PUBLIC KEY BLOCK----- +Version: GnuPG v1.2.6 (GNU/Linux) + +mQGiBEY5QQ0RBACfC1NbAdGFMOS/Y7P9hmNph2Wh3TJTh6IZpL+lTJBuZSEa6rp0 +CghS/yU3gGXUPaxAy91M7PXMv5p7S3U/SusZHATLhFdU5J4LuWMf4IiBy9FOB/aj +Q1s5vZ/i3YFaqolXsRP8TgIu4Lzp/j3+KAxFb3gF7lz64J/Et2Jil0OQzwCgkn9i +SoPEM6d9SCFOidhUuTHUhM0D/3UXl/FKPVFrFzjslFpaN9NgArRrmXKTOBWEqMLy +12pbTzOtv+p17Ot51q4h0ebEWrmVJ/h/7Is6QT6AKHuOIW+1/88fcSrmef//0Scz +wtEwVudkYA+kOGt1pwhapVYf1lWE9Z6L3V/MVdxXUesylGO6jJjOjpUB+ZBItwl7 +exkhA/4iemhq4D5Jp6r1Kv3aKSPNENdhTORyfZz4UfyOsUfYncaprP5IZja0j+rd +tQLIsH8hXvCT2kSAUY6nMGmzPgpgGamtHI6gH1ZmoNX2gEF7tzGNgKMbbUmwO89B +N56U7wm68AreXE8XviRjGjAtZWnouqe5X+EiUurdJkzRwU0c2rQpVGhvdWdodFdv +cmtzIDxydWJ5d29ya3NAdGhvdWdodHdvcmtzLmNvbT6IYAQTEQIAIAUCRjlBDQIb +AwYLCQgHAwIEFQIIAwQWAgMBAh4BAheAAAoJEHM/KlUQbeB0SSYAn0sgAx5ZK975 +wZiChkIqOCyFZ9PLAJ9laivkzqT2y+Kh9FGe3TP/CAhRTbkCDQRGOUEVEAgAqxJI +MFrYV3JKyeXHVKXHNd5Nf1WdqKi37VOdSTBftiehzZdR9hxkGEknYxnbBLGJR9YD +/uJ2+DRwNBcw2RrrEmb0DCZxcLQLZ3xYa7+WvcR4/Nir/3858SGJ+wmGCHKyX2So +M2TurmKu5bqyUUaBgf+IhKfwOr9zeK3rIRhUq/aiYkw8sWA8ruUvxXwLnbkK1aP9 +hfvSqScwjkfUVk6CQ6GFUD+4N4mNRtRcZz3gYa+0jSNeEJZQOJxRuE/gBHav3eyN +dm4VAFPF20BobvBVEcMhO0KaR/X4jW1G1eFAKLxI7cdx3+vLeNPaFwHiSMSknsNs +UiucI9oV+I5S/50ZrwADBwf/StYTK9KvPnY9ZqmirBpSh0Zl0xylMtAiMblG7pKv +qKTPNr9zXooheQBpAbnhOfju0DB/OtE4V21HqnbMws2aFvHecEbO5EmjwT7ZTltH +5vlbiPrXOc7SpP22FdkOYdunM2+nsA6398mpYFEiFFNAzX6pReN2tbbmXf6zxS9n +nHjMAgl5nMuOASLZrTrUX/7yu6ySS1hy0ZVfEoAFeILy4MV8y0lVjBQa2kNOCNpO +Cc+y1+4EHLS3fuN0x+tho3rhjKAzj8KOt4XnALn8OouRMx9G7ItC2U8kNzHHFRg5 +adT/+nEthVd9q9pYLrUaze7aMQyl+7cD1KzmSe34X9B6W4hJBBgRAgAJBQJGOUEV +AhsMAAoJEHM/KlUQbeB0O7QAn09h4qrKPhWD9eaiyMRS5YeARTYgAJ9WxLcQEvkA +yOSLb33CweehCrlTnQ== +=scSy +-----END PGP PUBLIC KEY BLOCK----- diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/yum/files/CentOS.4/rpm-gpg/RPM-GPG-KEY-EPEL b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/yum/files/CentOS.4/rpm-gpg/RPM-GPG-KEY-EPEL new file mode 100644 index 00000000000..5a13bb4f9f9 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/yum/files/CentOS.4/rpm-gpg/RPM-GPG-KEY-EPEL @@ -0,0 +1,30 @@ +-----BEGIN PGP PUBLIC KEY BLOCK----- +Version: GnuPG v1.2.6 (GNU/Linux) + +mQGiBEXopTIRBACZDBMOoFOakAjaxw1LXjeSvh/kmE35fU1rXfM7T0AV31NATCLF +l5CQiNDA4oWreDThg2Bf6+LIVTsGQb1V+XXuLak4Em5yTYwMTVB//4/nMxQEbpl/ +QB2XwlJ7EQ0vW+kiPDz/7pHJz1p1jADzd9sQQicMtzysS4qT2i5A23j0VwCg1PB/ +lpYqo0ZhWTrevxKMa1n34FcD/REavj0hSLQFTaKNLHRotRTF8V0BajjSaTkUT4uk +/RTaZ8Kr1mTosVtosqmdIAA2XHxi8ZLiVPPSezJjfElsSqOAxEKPL0djfpp2wrTm +l/1iVnX+PZH5DRKCbjdCMLDJhYap7YUhcPsMGSeUKrwmBCBJUPc6DhjFvyhA9IMl +1T0+A/9SKTv94ToP/JYoCTHTgnG5MoVNafisfe0wojP2mWU4gRk8X4dNGKMj6lic +vM6gne3hESyjcqZSmr7yELPPGhI9MNauJ6Ob8cTR2T12Fmv9w03DD3MnBstR6vhP +QcqZKhc5SJYYY7oVfxlSOfF4xfwcHQKoD5TOKwIAQ6T8jyFpKbQkRmVkb3JhIEVQ +RUwgPGVwZWxAZmVkb3JhcHJvamVjdC5vcmc+iGQEExECACQFAkXopTICGwMFCRLM +AwAGCwkIBwMCAxUCAwMWAgECHgECF4AACgkQEZzANiF1IfabmQCgzvE60MnHSOBa +ZXXF7uU2Vzu8EOkAoKg9h+j0NuNom6WUYZyJQt4zc5seuQINBEXopTYQCADapnR/ +blrJ8FhlgNPl0X9S3JE/kygPbNXIqne4XBVYisVp0uzNCRUxNZq30MpY027JCs2J +nL2fMpwvx33f0phU029vrIZKA3CmnnwVsjcWfMJOVPBmVN7m5bGU68F+PdRIcDsl +PMOWRLkTBZOGolLgIbM4719fqA8etewILrX6uPvRDwywV7/sPCFpRcfNNBUY+Zx3 +5bf4fnkaCKxgXgQS3AT+hGYhlzIqQVTkGNveHTnt4SSzgAqR9sSwQwqvEfVtYNeS +w5rDguLG41HQm1Hojv59HNYjH6F/S1rClZi21bLgZbKpCFX76qPt8CTw+iQLBPPd +yoOGHfzyp7nsfhUrAAMFB/9/H9Gpk822ZpBexQW4y3LGFo9ZSnmu+ueOZPU3SqDA +DW1ovZdYzGuJTGGM9oMl6bL8eZrcUBBOFaWge5wZczIE3hx2exEOkDdvq+MUDVD1 +axmN45q/7h1NYRp5GQL2ZsoV4g9U2gMdzHOFtZCER6PP9ErVlfJpgBUCdSL93V4H +Sgpkk7znmTOklbCM6l/G/A6q4sCRqfzHwVSTiruyTBiU9lfROsAl8fjIq2OzWJ2T +P9sadBe1llUYaow7txYSUxssW+89avct35gIyrBbof5M+CBXyAOUaSWmpM2eub24 +0qbqiSr/Y6Om0t6vSzR8gRk7g+1H6IE0Tt1IJCvCAMimiE8EGBECAA8FAkXopTYC +GwwFCRLMAwAACgkQEZzANiF1IfZQYgCgiZHCv4xb+sTHCn/otc1Ovvi/OgMAnRXY +bbsLFWOfmzAnNIGvFRWy+YHi +=MMNL +-----END PGP PUBLIC KEY BLOCK----- diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/yum/files/CentOS.5/rpm-gpg/RPM-GPG-KEY-CentOS-5 b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/yum/files/CentOS.5/rpm-gpg/RPM-GPG-KEY-CentOS-5 new file mode 100644 index 00000000000..2627d31d8f6 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/yum/files/CentOS.5/rpm-gpg/RPM-GPG-KEY-CentOS-5 @@ -0,0 +1,28 @@ +-----BEGIN PGP PUBLIC KEY BLOCK----- +Version: GnuPG v1.2.6 (GNU/Linux) + +mQGiBEWfB6MRBACrnYW6yKMT+MwJlCIhoyTxGf3mAxmnAiDEy6HcYN8rivssVTJk +CFtQBlBOpLV/OW2YtKrCO2xHn46eNfnMri8FGT8g+9JF3MUVi7kiV1He4iJynHXB ++F2ZqIvHf3IaUj1ys+p8TK64FDFxDQDrGQfIsD/+pkSGx53/877IrvdwjwCguQcr +Ioip5TH0Fj0OLUY4asYVZH8EAIqFHEqsY+9ziP+2R3/FyxSllKkjwcMLrBug+cYO +LYDD6eQXE9Mq8XKGFDj9ZB/0+JzK/XQeStheeFG75q3noq5oCPVFO4czuKErIRAB +qKbDBhaTj3JhOgM12XsUYn+rI6NeMV2ZogoQCC2tWmDETfRpYp2moo53NuFWHbAy +XjETA/sHEeQT9huHzdi/lebNBj0L8nBGfLN1nSRP1GtvagBvkR4RZ6DTQyl0UzOJ +RA3ywWlrL9IV9mrpb1Fmn60l2jTMMCc7J6LacmPK906N+FcN/Docj1M4s/4CNanQ +NhzcFhAFtQL56SNyLTCk1XzhssGZ/jwGnNbU/aaj4wOj0Uef5LRGQ2VudE9TLTUg +S2V5IChDZW50T1MgNSBPZmZpY2lhbCBTaWduaW5nIEtleSkgPGNlbnRvcy01LWtl +eUBjZW50b3Mub3JnPohkBBMRAgAkBQJFnwekAhsDBQkSzAMABgsJCAcDAgMVAgMD +FgIBAh4BAheAAAoJEKikR9zoViiXKlEAmwSoZDvZo+WChcg3s/SpNoWCKhMAAJwI +E2aXpZVrpsQnInUQWwkdrTiL5YhMBBMRAgAMBQJFnwiSBYMSzAIRAAoJEDjCFhY5 +bKCk0hAAn134bIx3wSbq58E6P6U5RT7Z2Zx4AJ9VxnVkoGHkVIgSdsxHUgRjo27N +F7kBDQRFnwezEAQA/HnJ5yiozwgtf6jt+kii8iua+WnjqBKomPHOQ8moxbWdv5Ks +4e1DPhzRqxhshjmub4SuJ93sgMSAF2ayC9t51mSJV33KfzPF2gIahcMqfABe/2hJ +aMzcQZHrGJCEX6ek8l8SFKou7vICzyajRSIK8gxWKBuQknP/9LKsoczV+xsAAwUD +/idXPkk4vRRHsCwc6I23fdI0ur52bzEqHiAIswNfO521YgLk2W1xyCLc2aYjc8Ni +nrMX1tCnEx0/gK7ICyJoWH1Vc7//79sWFtX2EaTO+Q07xjFX4E66WxJlCo9lOjos +Vk5qc7R+xzLDoLGFtbzaTRQFzf6yr7QTu+BebWLoPwNTiE8EGBECAA8FAkWfB7MC +GwwFCRLMAwAACgkQqKRH3OhWKJfvvACfbsF1WK193zM7vSc4uq51XsceLwgAoI0/ +9GxdNhGQEAweSlQfhPa3yYXH +=o/Mx +-----END PGP PUBLIC KEY BLOCK----- + diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/yum/files/CentOS.5/rpm-gpg/RPM-GPG-KEY-EPEL b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/yum/files/CentOS.5/rpm-gpg/RPM-GPG-KEY-EPEL new file mode 100644 index 00000000000..5a13bb4f9f9 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/yum/files/CentOS.5/rpm-gpg/RPM-GPG-KEY-EPEL @@ -0,0 +1,30 @@ +-----BEGIN PGP PUBLIC KEY BLOCK----- +Version: GnuPG v1.2.6 (GNU/Linux) + +mQGiBEXopTIRBACZDBMOoFOakAjaxw1LXjeSvh/kmE35fU1rXfM7T0AV31NATCLF +l5CQiNDA4oWreDThg2Bf6+LIVTsGQb1V+XXuLak4Em5yTYwMTVB//4/nMxQEbpl/ +QB2XwlJ7EQ0vW+kiPDz/7pHJz1p1jADzd9sQQicMtzysS4qT2i5A23j0VwCg1PB/ +lpYqo0ZhWTrevxKMa1n34FcD/REavj0hSLQFTaKNLHRotRTF8V0BajjSaTkUT4uk +/RTaZ8Kr1mTosVtosqmdIAA2XHxi8ZLiVPPSezJjfElsSqOAxEKPL0djfpp2wrTm +l/1iVnX+PZH5DRKCbjdCMLDJhYap7YUhcPsMGSeUKrwmBCBJUPc6DhjFvyhA9IMl +1T0+A/9SKTv94ToP/JYoCTHTgnG5MoVNafisfe0wojP2mWU4gRk8X4dNGKMj6lic +vM6gne3hESyjcqZSmr7yELPPGhI9MNauJ6Ob8cTR2T12Fmv9w03DD3MnBstR6vhP +QcqZKhc5SJYYY7oVfxlSOfF4xfwcHQKoD5TOKwIAQ6T8jyFpKbQkRmVkb3JhIEVQ +RUwgPGVwZWxAZmVkb3JhcHJvamVjdC5vcmc+iGQEExECACQFAkXopTICGwMFCRLM +AwAGCwkIBwMCAxUCAwMWAgECHgECF4AACgkQEZzANiF1IfabmQCgzvE60MnHSOBa +ZXXF7uU2Vzu8EOkAoKg9h+j0NuNom6WUYZyJQt4zc5seuQINBEXopTYQCADapnR/ +blrJ8FhlgNPl0X9S3JE/kygPbNXIqne4XBVYisVp0uzNCRUxNZq30MpY027JCs2J +nL2fMpwvx33f0phU029vrIZKA3CmnnwVsjcWfMJOVPBmVN7m5bGU68F+PdRIcDsl +PMOWRLkTBZOGolLgIbM4719fqA8etewILrX6uPvRDwywV7/sPCFpRcfNNBUY+Zx3 +5bf4fnkaCKxgXgQS3AT+hGYhlzIqQVTkGNveHTnt4SSzgAqR9sSwQwqvEfVtYNeS +w5rDguLG41HQm1Hojv59HNYjH6F/S1rClZi21bLgZbKpCFX76qPt8CTw+iQLBPPd +yoOGHfzyp7nsfhUrAAMFB/9/H9Gpk822ZpBexQW4y3LGFo9ZSnmu+ueOZPU3SqDA +DW1ovZdYzGuJTGGM9oMl6bL8eZrcUBBOFaWge5wZczIE3hx2exEOkDdvq+MUDVD1 +axmN45q/7h1NYRp5GQL2ZsoV4g9U2gMdzHOFtZCER6PP9ErVlfJpgBUCdSL93V4H +Sgpkk7znmTOklbCM6l/G/A6q4sCRqfzHwVSTiruyTBiU9lfROsAl8fjIq2OzWJ2T +P9sadBe1llUYaow7txYSUxssW+89avct35gIyrBbof5M+CBXyAOUaSWmpM2eub24 +0qbqiSr/Y6Om0t6vSzR8gRk7g+1H6IE0Tt1IJCvCAMimiE8EGBECAA8FAkXopTYC +GwwFCRLMAwAACgkQEZzANiF1IfZQYgCgiZHCv4xb+sTHCn/otc1Ovvi/OgMAnRXY +bbsLFWOfmzAnNIGvFRWy+YHi +=MMNL +-----END PGP PUBLIC KEY BLOCK----- diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/yum/files/CentOS.5/rpm-gpg/RPM-GPG-KEY-RBEL b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/yum/files/CentOS.5/rpm-gpg/RPM-GPG-KEY-RBEL new file mode 100644 index 00000000000..152fd799008 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/yum/files/CentOS.5/rpm-gpg/RPM-GPG-KEY-RBEL @@ -0,0 +1,36 @@ +-----BEGIN PGP PUBLIC KEY BLOCK----- +Version: GnuPG v2.0.14 (GNU/Linux) + +mQGiBEZ6qawRBAC2gDuA1sZioGh1VP/U0l+9RmzOdkWBGB3NfWqezAwt1Up+cP5o +h+UNkghOKbJVQ/zLyY/edYOppQ78yxT1X/J1RHNhs5bjqzWlQxMbT5/tt1N4PExu +gvO38RGFTV0DqIy3lQw5YIwp2le+G8MktYh2NKI4lG0AJoXZicNlI7+mEwCgmfw+ +CnsB/kb/xUD1dq6Mo3dYXVcEAKSFfqt+6jvJNxcIYfpQqjEslQsQmPKpXzK9CPyV +UCjUEOirbhPxV86u3Ge/yuy5USMvTTs+ztImabbH6UHBEP+tEw3LiuPUpfh+nEna +3Hz+U81PvUwGEwUMzCr+OemBXqGW7jl66NqKqm8YM3Pkvc4NlS/7slky9A/s6i8S +hToWA/9kP55aSbIXte5TbC88lx6YuLx7qW541ni38DmJfPN5hHywLGnM82MMQMbk +hg1v49+7TTNv44LJpGT7t8gsW9F4Z4rWoChhsldypeeqbDOIv4kFiXt/8122Ud9J +nE67CR9XUuS5Jp+gP6xxNr9/vbvqsOGMJAQkVgkBPVuKYv25gLQ3U2VyZ2lvIFJ1 +YmlvIChGcmFtZU9TIERldmVsb3BlcnMpIDxydWJpb2pyQGZyYW1lb3Mub3JnPohr +BBMRAgArAhsDBQkGE0x0BgsJCAcDAgYVCAIJCgsEFgIDAQIeAQIXgAUCTBs76AIZ +AQAKCRCOw9dP80W+dFhjAJ0dKy761iPcG+ALwEAuAgxDpUVBzgCdFxGCAZ7ELYvf +3uFc0Ou2ihDzvyy0IFNlcmdpbyBSdWJpbyA8c2VyZ2lvQHJ1YmlvLm5hbWU+iGYE +ExECACYCGwMGCwkIBwMCBBUCCAMEFgIDAQIeAQIXgAUJBhNMdAUCTBs7XgAKCRCO +w9dP80W+dDdtAJ9NYoW1ChfMyES7nQUlesEQ4aWXjQCeIoGxoOuIGyg6+AKr/2Wr +6fE1zt2IaQQTEQIAKQIbAwYLCQgHAwIEFQIIAwQWAgMBAh4BAheAAhkBBQJIHsGo +BQkCuHFEAAoJEI7D10/zRb50KjgAnRTzzNIODKqrHnrHaUG8dWDCwmYjAJ48Hbcn +ZC6E8LGTeM8vPN0mMI9ijLkCDQRGeqm2EAgAh720kjA9bNDms+6agb6CirD9RkmZ +3G+OHd5iia3KbaUiBtC3PECg4UE8N54JuBNKdjgJQfdYSg2J0EZHyhZHdAVWjykE +tj/IKZKnAfUqKh44uT9OUPW8PChPo/gioLn+DexSAW7n19h7VIa1P3shYqYR/gz8 +zgfrXkFFpkpKnOLsXuF20JEEBIBdwrfYRJIBrUTYrfS/2GKLJjyutENkb9uI3JgQ +LfR6DckTaar4eeArjgvOxZRHiU0vRezetlbG8ZM9mSYrcMM3Xa5vLpFlDj6vYzat +RWEuZUfLgXWUVoVyFiNVXhpff/w7/bAb3WpXqjZd6sK8CCJJPNtnbLE7CwADBQf9 +EQjT9iiEZis35V9HqeLsxXVjPOGNuLiwjIpacI7CM3aGV1q7NXiCE4oWS/PvpHmu +W+XdXMPH4Bt2VmjZSarlAipTeNnOuiEXipUFIjAlNn1xNVRRd7T35zIvXLtmNtUe +nN1/mqZljKPbCbW1AgktH417t/vJfTnRWr9IgS3Am+o4q200i+1FjrQ/UI3s9+vg +5B+KASFP6HspNttl0kwzQ6SFIHAebd4DKHOj6ShxXPNl18W4R8qPqayrAFqdkgMJ +Jn8j2E8rmGYnssSfjck2kLtvNdTEAMjFnhg+oUapUzJAVeterudiWZFNrtn9ewnf +8SUiiYJlxb+nz545zo0gQIhJBBgRAgAJBQJGeqm2AhsMAAoJEI7D10/zRb50PJEA +mwTA+Sp3wvzwDr8sk7W7U4bBfw26AKCVoYw3mfTime+j3mFk1yk1yxjE2Q== +=iyOs +-----END PGP PUBLIC KEY BLOCK----- + diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/yum/files/CentOS.5/rpm-gpg/RPM-GPG-KEY-beta b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/yum/files/CentOS.5/rpm-gpg/RPM-GPG-KEY-beta new file mode 100644 index 00000000000..b86da239064 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/yum/files/CentOS.5/rpm-gpg/RPM-GPG-KEY-beta @@ -0,0 +1,28 @@ +-----BEGIN PGP PUBLIC KEY BLOCK----- +Version: GnuPG v1.2.6 (GNU/Linux) + +mQGiBEWfBuERBACrwDH+6QvpyaOgzhXiemsIX+q4HlhX/HDmrmZOUd7i9VmZNogP +6LRRiTygn2+UphaGV3NDA36ZB/1JRpgvgpzbpZNeAoFvsljIbxGIwkH2JgRF6oNo +eGB3QYzDQJvYVIejk79M0ed3oor4w8OiNVcdxLyVIthFrjrrCqwRP3bLZwCgtY9t +Ezf5WL63Ue45vdht7A2GH+0D/iNAnWKsU7FUMFZrcwMaMbyP7YG8z0+zXUOgtgyP +tbgJG5yikNT3vJypb42gbKfcriUUDC5AeiRmkR8QPvYuOm34rM90+wx2LGqXWnHM +IyLAyl8TS3MQmePem8bfTGTNYxtt3Q7iadez2WYTLBSlmM6hbxZfdwm1hhyM0AJU +YyFUA/9kHH+CUBxKb1UgG7TSp53Po/5p/Yyuty+RJ7zIGv6SiN/JK4/ntWfm5WS5 +ZprSdE5ODoFQ/Gs3/VB/eolg2fBW1DcftH6lKHT3GKEOaicGX+T9eOMerZZedm5U +vDA9mFvWnOdOxK8LuRgVqip4jCnWICchpatmdP0whJQHQ6MGLLRMQ2VudE9TLTUg +QmV0YSBLZXkgKENlbnRPUyA1IEJldGEgU2lnbmluZyBLZXkpIDxjZW50b3MtNS1i +ZXRhLWtleUBjZW50b3Mub3JnPohkBBMRAgAkBQJFnwbhAhsDBQkSzAMABgsJCAcD +AgMVAgMDFgIBAh4BAheAAAoJEM/aaIEJLXsrWDkAoKcqa+AAdAWvp5qlJkGQiRy8 +aNFDAJ4qRfIxMiLinmjbqcuygWMp61wY5ohMBBMRAgAMBQJFnwhtBYMSzAF0AAoJ +EDjCFhY5bKCkG/wAn14LDlJqjZv1Wz0WNfhr80+qJrf6AKCaIZExwo4ApQpESk/F +SApLd/pEILkBDQRFnwbrEAQAwKzjI2aTB/sS9HuQ4CHCwrj4vr0HxMMwQikYBIvy +MYTtek04KDTKoJL5g3411DsfDW9VRGJdFCHvldgam/5UVfO6nywLkdwAA5TQA5dv +8YE8jTtwdy5Y1QKFc8LaIBZK0+ZbhEvdNfv67egvfcxZc5PvpBZ3C03n+iQ3wPcg +PhcAAwUD/iYkq4LG/je43Qa5rTz5kF5rIiX7Bk5vXT7XSFOFKwHy8V+PGEoVM1W8 ++EHIlmTycwIlsVp3by6qCDkMYu4V6VukxZNzJyeoMICiYIXUPh6NKHRoqaYlu6ZO +eFN1TQNXmodPk+iNtdbcby/zAklNqoO/dWSwd8NAo8s6WAHq3VPpiE8EGBECAA8F +AkWfBusCGwwFCRLMAwAACgkQz9pogQkteysXkACgoraCU0EBC+W8TuxrsePO20ma +D0IAoLRRQLTEXL0p3K0WE+LfyTr9EVG5 +=mH0S +-----END PGP PUBLIC KEY BLOCK----- + diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/yum/files/CentOS.5/rpm-gpg/RPM-GPG-KEY-kbsingh b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/yum/files/CentOS.5/rpm-gpg/RPM-GPG-KEY-kbsingh new file mode 100644 index 00000000000..f8c688e5f4c --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/yum/files/CentOS.5/rpm-gpg/RPM-GPG-KEY-kbsingh @@ -0,0 +1,25 @@ +-----BEGIN PGP PUBLIC KEY BLOCK----- +Version: GnuPG v1.2.6 (GNU/Linux) + +mQGiBEIu6hwRBACOz2JFa1nW+seAKlVGOu0ykhdFVNI9E4/Abp2+8nsJIZyUwLAp +ei76rPD8WdptgIjtYOCsqz1TbP+eqeEG0LLihOdFRLUuAjQX4X7LLf5Qm+nvUB73 +uLbSf9Ptps2CMUEtu7+0wVoTbuC19HXUhUr5sRdCnJbPJBH6aAHG7Pl9ZwCguN9o +V7IKTnIQiZg0nxSjZ4V9e6UD/R7KoMwH3NPQQF7T7rJaBjSZcVHUPhAcNPNn+ms/ +Tw9mzHZ0mnQnOzSEW0ZUj9TkLN52VQ3WmGZKAv9yeVr0/230YIgmtH863lSystmk +LNO9brK0+3vKg5GRpV0/MSWSmf39WPAS1hXNXIFfYp1eGHUfed4FVNxrMTWHQozr +8JosA/wP+zGfM51bSAazLUqP/MEm7F9OFkuD7Sw97w55FyYlrPp1FQWrWczoiKHr +wS5NRCQbCGEEM/+j9id6CukxPLXxwMYCfeg5K0HxMaQT6hxbwjOzAzN3PBFytNel +09qdrdoSDa35twT0SAt+rzM+zvRI8ycizFG3lIih4UItWWve2bQ6S2FyYW5iaXIg +U2luZ2ggKGh0dHA6Ly93d3cua2FyYW4ub3JnLykgPGtic2luZ2hAa2FyYW4ub3Jn +PoheBBMRAgAeBQJCLuocAhsDBgsJCAcDAgMVAgMDFgIBAh4BAheAAAoJEDANvZ4+ +E89b/P4AnjufrDCS+TAEL0KpkYDURePbDCHBAJ4+0iI1Td4YrcnLwmQ1+XDCJ3Zr +a7kBDQRCLuocEAQAjAl48FM9eGtP6M9FgswlSPAuCcJct6wOHmd/qZ923HckJPAD +zIFRMlM6H8P0bKoaIluv7agZM7Gsf8NeTg3NEeMKqnibIAyvjYeSkceRIwvBCQ3A +YwWk+B2zLUAFMxnE31oA10zjCKUo7Dc6XDUxSY/qdLymZzyG/Ndav+vMOVsAAwUD +/RCFDuW/GSM/s3DO7XxrOBRTGQmf9v9tCYdZZD615+s8ghaa5oZTvp1cbTTWiSq8 +ybncfjVHz9HezDgQjJsFZtrYd4w2JD+7K0+8sZ+BUGo1dDSv4UgN8ACtaGJnShiq +s8pQWRZFqFa3waay8oUSTKHiTHdpxLi3x4HhK/8MTsxniEkEGBECAAkFAkIu6hwC +GwwACgkQMA29nj4Tz1tHSgCcDgKL4swEu7ShvI8nZt2JLmTKB5QAn0qZi2zbexbi +DX+bbalHM+xVnXZN +=rZT6 +-----END PGP PUBLIC KEY BLOCK----- diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/yum/files/CentOS.5/rpm-gpg/RPM-GPG-KEY-remi b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/yum/files/CentOS.5/rpm-gpg/RPM-GPG-KEY-remi new file mode 100644 index 00000000000..32833860645 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/yum/files/CentOS.5/rpm-gpg/RPM-GPG-KEY-remi @@ -0,0 +1,24 @@ +-----BEGIN PGP PUBLIC KEY BLOCK----- +Version: GnuPG v1.4.7 (GNU/Linux) + +mQGiBEJny1wRBACRnbQgZ6qLmJSuGvi/EwrRL6aW610BbdpLQRL3dnwy5wI5t9T3 +/JEiEJ7GTvAwfiisEHifMfk2sRlWRf2EDQFttHyrrYXfY5L6UAF2IxixK5FL7PWA +/2a7tkw1IbCbt4IGG0aZJ6/xgQejrOLi4ewniqWuXCc+tLuWBZrGpE2QfwCggZ+L +0e6KPTHMP97T4xV81e3Ba5MD/3NwOQh0pVvZlW66Em8IJnBgM+eQh7pl4xq7nVOh +dEMJwVU0wDRKkXqQVghOxALOSAMapj5mDppEDzGLZHZNSRcvGEs2iPwo9vmY+Qhp +AyEBzE4blNR8pwPtAwL0W3cBKUx7ZhqmHr2FbNGYNO/hP4tO2ochCn5CxSwAfN1B +Qs5pBACOkTZMNC7CLsSUT5P4+64t04x/STlAFczEBcJBLF1T16oItDITJmAsPxbY +iee6JRfXmZKqmDP04fRdboWMcRjfDfCciSdIeGqP7vMcO25bDZB6x6++fOcmQpyD +1Fag3ZUq2yojgXWqVrgFHs/HB3QE7UQkykNp1fjQGbKK+5mWTrQkUmVtaSBDb2xs +ZXQgPFJQTVNARmFtaWxsZUNvbGxldC5jb20+iGAEExECACAFAkZ+MYoCGwMGCwkI +BwMCBBUCCAMEFgIDAQIeAQIXgAAKCRAATm9HAPl/Vv/UAJ9EL8ioMTsz/2EPbNuQ +MP5Xx/qPLACeK5rk2hb8VFubnEsbVxnxfxatGZ25AQ0EQmfLXRAEANwGvY+mIZzj +C1L5Nm2LbSGZNTN3NMbPFoqlMfmym8XFDXbdqjAHutGYEZH/PxRI6GC8YW5YK4E0 +HoBAH0b0F97JQEkKquahCakj0P5mGuH6Q8gDOfi6pHimnsSAGf+D+6ZwAn8bHnAa +o+HVmEITYi6s+Csrs+saYUcjhu9zhyBfAAMFA/9Rmfj9/URdHfD1u0RXuvFCaeOw +CYfH2/nvkx+bAcSIcbVm+tShA66ybdZ/gNnkFQKyGD9O8unSXqiELGcP8pcHTHsv +JzdD1k8DhdFNhux/WPRwbo/es6QcpIPa2JPjBCzfOTn9GXVdT4pn5tLG2gHayudK +8Sj1OI2vqGLMQzhxw4hJBBgRAgAJBQJCZ8tdAhsMAAoJEABOb0cA+X9WcSAAn11i +gC5ns/82kSprzBOU0BNwUeXZAJ0cvNmY7rvbyiJydyLsSxh/la6HKw== +=6Rbg +-----END PGP PUBLIC KEY BLOCK----- diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/yum/files/CentOS.5/rpm-gpg/RPM-GPG-KEY-rpmforge-dag b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/yum/files/CentOS.5/rpm-gpg/RPM-GPG-KEY-rpmforge-dag new file mode 100644 index 00000000000..8ee27f45b9b --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/yum/files/CentOS.5/rpm-gpg/RPM-GPG-KEY-rpmforge-dag @@ -0,0 +1,32 @@ +The following public key can be used to verify RPM packages +downloaded from http://dag.wieers.com/apt/ using 'rpm -K' +if you have the GNU GPG package. +Questions about this key should be sent to: +Dag Wieers + +-----BEGIN PGP PUBLIC KEY BLOCK----- +Version: GnuPG v1.2.1 (GNU/Linux) + +mQGiBD9JMT0RBAC9Q2B0AloUMTxaK73sD0cOu1MMdD8yuDagbMlDtUYA1aGeJVO6 +TV02JLGr67OBY+UkYuC1c3PUwmb3+jakZd5bW1L8E2L705wS0129xQOZPz6J+alF +5rTzVkiefg8ch1yEcMayK20NdyOmhDGXQXNQS8OJFLTIC6bJs+7MZL83/wCg3cG3 +3q7MWHm3IpJb+6QKpB9YH58D/2WjPDK+7YIky/JbFBT4JPgTSBy611+bLqHA6PXq +39tzY6un8KDznAMNtm+NAsr6FEG8PHe406+tbgd7tBkecz3HPX8nR5v0JtDT+gzN +8fM3kAiAzjCHUAFWVAMAZLr5TXuoq4lGTTxvZbwTjZfyjCm7gIieCu8+qnPWh6hm +30NgA/0ZyEHG6I4rOWqPks4vZuD+wlp5XL8moBXEKfEVOMh2MCNDRGnvVHu1P3eD +oHOooVMt9sWrGcgxpYuupPNL4Uf6B6smiLlH6D4tEg+qCxC17zABI5572XJTJ170 +JklZJrPGtnkPrrKMamnN9MU4RjGmjh9JZPa7rKjZHyWP/z/CBrQ1RGFnIFdpZWVy +cyAoRGFnIEFwdCBSZXBvc2l0b3J5IHYxLjApIDxkYWdAd2llZXJzLmNvbT6IWQQT +EQIAGQUCP0kxPQQLBwMCAxUCAwMWAgECHgECF4AACgkQog5SFGuNeeYvDQCeKHST +hIq/WzFBXtJOnQkJGSqAoHoAnRtsJVWYmzYKHqzkRx1qAzL18Sd0iEYEEBECAAYF +Aj9JMWAACgkQoj2iXPqnmevnOACfRQaageMcESHVE1+RSuP3txPUvoEAoJAtOHon +g+3SzVNSZLn/g7/Ljfw+uQENBD9JMT8QBACj1QzRptL6hbpWl5DdQ2T+3ekEjJGt +llCwt4Mwt/yOHDhzLe8SzUNyYxTXUL4TPfFvVW9/j8WOkNGvffbs7g84k7a5h/+l +IJTTlP9V9NruDt1dlrBe+mWF6eCY55OFHjb6nOIkcJwKxRd3nGlWnLsz0ce9Hjrg +6lMrn0lPsMV6swADBQP9H42sss6mlqnJEFA97Fl3V9s+7UVJoAIA5uSVXxEOwVoh +Vq7uECQRvWzif6tzOY+vHkUxOBRvD6oIU6tlmuG3WByKyA1d0MTqMr3eWieSYf/L +n5VA9NuD7NwjFA1kLkoDwfSbsF51LppTMkUggzwgvwE46MB6yyuqAVI1kReAWw+I +RgQYEQIABgUCP0kxPwAKCRCiDlIUa4155oktAKDAzm9QYbDpk6SrQhkSFy016BjE +BACeJU1hpElFnUZCL4yKj4EuLnlo8kc= +=mqUt +-----END PGP PUBLIC KEY BLOCK----- diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/yum/files/CentOS.5/rpm-gpg/RPM-GPG-KEY-webtatic-andy b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/yum/files/CentOS.5/rpm-gpg/RPM-GPG-KEY-webtatic-andy new file mode 100644 index 00000000000..317b802b560 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/yum/files/CentOS.5/rpm-gpg/RPM-GPG-KEY-webtatic-andy @@ -0,0 +1,30 @@ +-----BEGIN PGP PUBLIC KEY BLOCK----- +Version: GnuPG v1.4.5 (GNU/Linux) + +mQGiBE1e+1MRBAD8j+KyOIpGNRN39gNy2E/1HG4ZoLFuxIOxI5/1FEuZB/GjYF5m +DvJerZukd0QCqCs72J6J+uWnfD/52t2XWTw4IHPpCWeyr9TWex3uOYmrYzY+0l0l +qsCsrhT0XGkAE0+/20oEP2+t/d+1q0yRcYZRwWK/ME2rUUX0jOa/B3Bc6wCg3blw +XdZNrv1wVNd1PCOUI79k0V0D+wfbybos8Cmdv2f8dD746fSR/hmp4SzpBDmPRRQu +0gtJAKI6ycTdotGq5zHfZj76kDQBudeIgdbWtqfckP2lK47i8lIENAyC4MK8dxh9 +Ts+b1LqXlbcPyixzImf4qoT5DT1lSEUPwoMRX8W/29GAcvnZpOwQ8g7DNmRBpFFY +8U2GBADz6uEeP3YwJAuL7pi77AalxR0WQAADMR59pGltQdXaZvANXoioU0W519Pb +nl3gKWDiTuwUDrwaSPoBbNLyX4s0AE7/0HSG02/eRjLB8toQpAH9xkK/u2WPe/do +erZg5yg1qhoCbEM7kJ2I/GBl6VbPedt2ORdsC4ZTWTnZJh6tYLQhQW5keSBUaG9t +cHNvbiA8YW5keUB3ZWJ0YXRpYy5jb20+iGAEExECACAFAk1e+1MCGwMGCwkIBwMC +BBUCCAMEFgIDAQIeAQIXgAAKCRC3Q0sGz0xP+TA0AJwJf5ZPeub8v+5CtZwdcZhV +LU0sjgCgrP3y54heBjF1vhZQ3rJywTmRLHe5Ag0ETV77UxAIAIQPLVFbqheJ90Kf +NF8TYt3ZIMpP5chw25OYq4tuZMzVJxKjUlM7KPQxUKquY/F9WpjH980LmICTb4Fz +txzn2bshIsGyg8pDUSnVK0NPY5uaq9bK4oht8wkr3FNFT2FpeqDIJyn+phIuEpIi +qt1LJyzzjobh9csaaGmNHvtrlkIggBj2n/ZQuGNhcYnKUZ/WGmkItCTSOfA++G+C +dCo1aPEymfbnJvaLB/mLyzA+r/r7LQM10cZEtqh5JdclJEh3CzZmx9HsRxCDZF8W +X/C4MmCwmIxmuU4vkVNhHFTQimQEUR8vg9ltiz8+xBjyE1Iav4MxfOYh3xjdJk1d +zlovyUcAAwUH/2KPgf0UQ1o+4IjOYinEEbNlrD1pKw5anUKwaaeQi0vm/oRG0E2F +ZCJ73OHxW/0hMrwbrGwXcm4NBARnAppg+/CecOVpkBgD5hrM+11DPhxdd1bjjfza +Pq8GmPp8SSsiTPUCoSlzojxL3Z05RNbvKVzxzxbYdx5h5XOTflI7bAHTY4AzGSDf +WaFljjCucht/d7u5empAd02haldUXWjT9RvY5RwnRZ+hjI47e+wUA0FMLHYtA1/0 +cwEIvpp2xwF/jpH3ODmnIGEeNoLyzAV7X0KAlSN8VRsh7igZRB9TRGI67aTjRgk8 +ayf/QNxAzwEk1MeDv67IFKNYVolxHCt4CtqISQQYEQIACQUCTV77UwIbDAAKCRC3 +Q0sGz0xP+dPiAKDUNJ5rkB9CRoMH9BC35d0fqXXeugCgwl/HYv52dWgatbyEGLet +etv5Qeg= +=nIAo +-----END PGP PUBLIC KEY BLOCK----- diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/yum/files/CentOS.5/rpm-gpg/RPM-GPG-KEY.art b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/yum/files/CentOS.5/rpm-gpg/RPM-GPG-KEY.art new file mode 100644 index 00000000000..825424e1f33 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/yum/files/CentOS.5/rpm-gpg/RPM-GPG-KEY.art @@ -0,0 +1,24 @@ +-----BEGIN PGP PUBLIC KEY BLOCK----- +Version: GnuPG v1.2.1 (GNU/Linux) + +mQGiBEGP+skRBACyZz7muj2OgWc9FxK+Hj7tWPnrfxEN+0PE+n8MtqH+dxwQpMTd +gDpOXxJa45GM5pEwB6CFSFK7Fb/faniF9fDbm1Ga7MpBupIBYLactkoOTZMuTlGB +T0O5ha4h26YLqFfQOtlEi7d0+BDDdfHRQw3o67ycgRnLgYSA79DISc3MywCgk2TR +yd5sRfZAG23b4EDl+D0+oaMEAK73J7zuxf6F6V5EaxLd/w4JVB2xW0Glcn0fACOe +8FV9lzcZuo2xPpdGuyj02f/xlqvEav3XqTfFU2no61mA2pamaRNhlo+CEfGc7qde +/1twfSgOYqzeCx7+aybyPo8Th41b80FT19mfkjBf6+5NbUHffRabFFh1FmcPVNBn +F3FoA/95nRIzqDMItdTRitaZn02dIGNjdwllBD75bSVEvaR9O5hjBo0VMc25DB7f +DM2qEO52wCQbAKw9zFC284ekZVDaK4aHYt7iobHaqJEpKHgsDut5WWuMiSLR+SsF +aBHIZ9HvrKWLSUQKHU6A1Hva0P0r3GnoCMc/VCVfrLl721SjPbQzQXRvbWljIFJv +Y2tldCBUdXJ0bGUgPGFkbWluQGF0b21pY3JvY2tldHR1cnRsZS5jb20+iFkEExEC +ABkFAkGP+skECwcDAgMVAgMDFgIBAh4BAheAAAoJEDKpURRevSdEzcQAn1hSHqTO +jwv/z/picpOnR+mgycwHAKCBex2ciyXo5xeaQ9w7OMf7Jsmon7kBDQRBj/rMEAQA +6JvRndqE4koK0e49fUkICm1X0ZEzsVg9VmUW+Zft5guCRxmGlYTmtlC7oJCToRP/ +m/xH5uIevGiJycRKB0Ix+Csl6f9QuTkQ7tSTHcaIKbI3tL1x6CCBoWeTGYaOJlvk +ubrmajiMFaBfopLH2firoSToDGoUvv4e7bImIHEgNr8AAwUEAND0YR9DOEZvc+Lq +Ta/PQyxkdZ75o+Ty/O64E3OmO1Tuw2ciSQXCcwrbrMSE6EHHetxtGCnOdkjjjtmH +AnxsxdONv/EJuQmLcoNcsigZZ4tfRdmtXgcbnOmXBgmy1ea1KvWcsmecNSAMJHwR +7vDDKzbj4mSmudzjapHeeOewFF10iEYEGBECAAYFAkGP+swACgkQMqlRFF69J0Sq +nQCfa/q9Y/oY4dOTGj6MsdmRIQkKZhYAoIscjinFwTru4FVi2MIEzUUMToDK +=NOIx +-----END PGP PUBLIC KEY BLOCK----- diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/yum/files/CentOS.5/rpm-gpg/RPM-GPG-KEY.atrpms b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/yum/files/CentOS.5/rpm-gpg/RPM-GPG-KEY.atrpms new file mode 100644 index 00000000000..860ace4d247 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/yum/files/CentOS.5/rpm-gpg/RPM-GPG-KEY.atrpms @@ -0,0 +1,20 @@ +-----BEGIN PGP PUBLIC KEY BLOCK----- +Version: GnuPG v1.4.6 (GNU/Linux) + +mQGiBD5gtCgRBACKIvjMF+20r9k/Uw2Hq6Y/qn1nM0AZEFalhglXP5pMm5bMgkcI +1vCWqJxSbhQhk8hSEenoszes8hyUxHj4hFFUDiRtAxOpCpGCsCnUddgQtHAQd+tm +aQsM6J3Jm/EZPtwR0lvwvRGvz2x6Rr95G8+42KK9x+mBYhLk0y3gAbBzhwCgnkDH +a97MGBT7gRLrmtFqiHrWlPkD/2tBaH6IEuoJhcAbNj9MukbhDOYJ6ic9Nzf6sR3t +ZG+XgQLLS2DNy8+HWcYJOjpJDEe8zWFDdUv3cL1D0U2f2e85FuJaMucHn+816iw8 +mNjZXJEoDE4LJ8Vv53fkevNZpdWmO2VtRwI+woDnIHYHukDLj2sWhVt+5W+uOKAE +OippA/9OzuWrwBtTR+Np8ApZGkxhxU1z0iEStV+kQNqJE7YoR4SGMuzEa3bFzrPx +k4qIU+rw4YgFgHrs1x08lXxNOZkq6avvbl60HqN2qF2UQL/YdU+5X3ixaJVaYYk8 +yuK+hp0Hx2DdBWmVhq6rEzIfpnFhF4qspwMWEiiBGjYDL62W7LQ0QVRycG1zLm5l +dCAocnBtIHNpZ25pbmcga2V5KSA8QXhlbC5UaGltbUBBVHJwbXMubmV0PohnBBMR +AgAnAhsDBgsJCAcDAgMVAgMDFgIBAh4BAheAAhkBBQJFfF9PBQkJGI4nAAoJEFCM +5eZmU0wrJ0IAnA0BdyRlq2S8ess55R8YMFnWAWXEAJ9Fa7cEHku4j4B83shCODps ++DYUZohnBBMRAgAnAhsDBQkDdMLsBgsJCAcDAgMVAgMDFgIBAh4BAheABQJAKteu +AhkBAAoJEFCM5eZmU0wrMMUAnRjS2PXQp0tsC/69IGMMxqU+8xeAAJ9XQjVAo+mU +kg/3AeBlMBIlFe5hDQ== +=23Fz +-----END PGP PUBLIC KEY BLOCK----- diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/yum/files/CentOS.5/rpm-gpg/RubyWorks.GPG.key b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/yum/files/CentOS.5/rpm-gpg/RubyWorks.GPG.key new file mode 100644 index 00000000000..b91a5a88769 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/yum/files/CentOS.5/rpm-gpg/RubyWorks.GPG.key @@ -0,0 +1,30 @@ +-----BEGIN PGP PUBLIC KEY BLOCK----- +Version: GnuPG v1.2.6 (GNU/Linux) + +mQGiBEY5QQ0RBACfC1NbAdGFMOS/Y7P9hmNph2Wh3TJTh6IZpL+lTJBuZSEa6rp0 +CghS/yU3gGXUPaxAy91M7PXMv5p7S3U/SusZHATLhFdU5J4LuWMf4IiBy9FOB/aj +Q1s5vZ/i3YFaqolXsRP8TgIu4Lzp/j3+KAxFb3gF7lz64J/Et2Jil0OQzwCgkn9i +SoPEM6d9SCFOidhUuTHUhM0D/3UXl/FKPVFrFzjslFpaN9NgArRrmXKTOBWEqMLy +12pbTzOtv+p17Ot51q4h0ebEWrmVJ/h/7Is6QT6AKHuOIW+1/88fcSrmef//0Scz +wtEwVudkYA+kOGt1pwhapVYf1lWE9Z6L3V/MVdxXUesylGO6jJjOjpUB+ZBItwl7 +exkhA/4iemhq4D5Jp6r1Kv3aKSPNENdhTORyfZz4UfyOsUfYncaprP5IZja0j+rd +tQLIsH8hXvCT2kSAUY6nMGmzPgpgGamtHI6gH1ZmoNX2gEF7tzGNgKMbbUmwO89B +N56U7wm68AreXE8XviRjGjAtZWnouqe5X+EiUurdJkzRwU0c2rQpVGhvdWdodFdv +cmtzIDxydWJ5d29ya3NAdGhvdWdodHdvcmtzLmNvbT6IYAQTEQIAIAUCRjlBDQIb +AwYLCQgHAwIEFQIIAwQWAgMBAh4BAheAAAoJEHM/KlUQbeB0SSYAn0sgAx5ZK975 +wZiChkIqOCyFZ9PLAJ9laivkzqT2y+Kh9FGe3TP/CAhRTbkCDQRGOUEVEAgAqxJI +MFrYV3JKyeXHVKXHNd5Nf1WdqKi37VOdSTBftiehzZdR9hxkGEknYxnbBLGJR9YD +/uJ2+DRwNBcw2RrrEmb0DCZxcLQLZ3xYa7+WvcR4/Nir/3858SGJ+wmGCHKyX2So +M2TurmKu5bqyUUaBgf+IhKfwOr9zeK3rIRhUq/aiYkw8sWA8ruUvxXwLnbkK1aP9 +hfvSqScwjkfUVk6CQ6GFUD+4N4mNRtRcZz3gYa+0jSNeEJZQOJxRuE/gBHav3eyN +dm4VAFPF20BobvBVEcMhO0KaR/X4jW1G1eFAKLxI7cdx3+vLeNPaFwHiSMSknsNs +UiucI9oV+I5S/50ZrwADBwf/StYTK9KvPnY9ZqmirBpSh0Zl0xylMtAiMblG7pKv +qKTPNr9zXooheQBpAbnhOfju0DB/OtE4V21HqnbMws2aFvHecEbO5EmjwT7ZTltH +5vlbiPrXOc7SpP22FdkOYdunM2+nsA6398mpYFEiFFNAzX6pReN2tbbmXf6zxS9n +nHjMAgl5nMuOASLZrTrUX/7yu6ySS1hy0ZVfEoAFeILy4MV8y0lVjBQa2kNOCNpO +Cc+y1+4EHLS3fuN0x+tho3rhjKAzj8KOt4XnALn8OouRMx9G7ItC2U8kNzHHFRg5 +adT/+nEthVd9q9pYLrUaze7aMQyl+7cD1KzmSe34X9B6W4hJBBgRAgAJBQJGOUEV +AhsMAAoJEHM/KlUQbeB0O7QAn09h4qrKPhWD9eaiyMRS5YeARTYgAJ9WxLcQEvkA +yOSLb33CweehCrlTnQ== +=scSy +-----END PGP PUBLIC KEY BLOCK----- diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/yum/files/CentOS.6/rpm-gpg/RPM-GPG-KEY-CentOS-6 b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/yum/files/CentOS.6/rpm-gpg/RPM-GPG-KEY-CentOS-6 new file mode 100644 index 00000000000..bd863d8e212 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/yum/files/CentOS.6/rpm-gpg/RPM-GPG-KEY-CentOS-6 @@ -0,0 +1,30 @@ +-----BEGIN PGP PUBLIC KEY BLOCK----- +Version: GnuPG v1.4.5 (GNU/Linux) + +mQINBE4P06MBEACqn48FZgYkG2QrtUAVDV58H6LpDYEcTcv4CIFSkgs6dJ9TavCW +NyPBZRpM2R+Rg5eVqlborp7TmktBP/sSsxc8eJ+3P2aQWSWc5ol74Y0OznJUCrBr +bIdypJllsD9Fe+h7gLBXTh3vdBEWr2lR+xA+Oou8UlO2gFbVFQqMafUgU1s0vqaE +/hHH0TzwD0/tJ6eqIbHwVR/Bu6kHFK4PwePovhfvyYD9Y+C0vOYd5Ict2vbLHz1f +QBDZObv4M6KN3j7nzme47hKtdMd+LwFqxM5cXfM6b5doDulWPmuGV78VoX6OR7el +x1tlfpuiFeuXYnImm5nTawArcQ1UkXUSYcTUKShJebRDLR3BycxR39Q9jtbOQ29R +FumHginovEhdUcinRr22eRXgcmzpR00zFIWoFCwHh/OCtG14nFhefuZ8Z80qbVhW +2J9+/O4tksv9HtQBmQNOK5S8C4HNF2M8AfOWNTr8esFSDc0YA5/cxzdfOOtWam/w +lBpNcUUSSgddRsBwijPuWhVA3NmA/uQlJtAo4Ji5vo8cj5MTPG3+U+rfNqRxu1Yc +ioXRo4LzggPscaTZX6V24n0fzw0J2k7TT4sX007k+7YXwEMqmHpcMYbDNzdCzUer +Zilh5hihJwvGfdi234W3GofttoO+jaAZjic7a3p6cO1ICMgfVqrbZCUQVQARAQAB +tEZDZW50T1MtNiBLZXkgKENlbnRPUyA2IE9mZmljaWFsIFNpZ25pbmcgS2V5KSA8 +Y2VudG9zLTYta2V5QGNlbnRvcy5vcmc+iQI8BBMBAgAmBQJOD9OjAhsDBQkSzAMA +BgsJCAcDAgQVAggDBBYCAwECHgECF4AACgkQCUb8osEFud6ajRAAnb6d+w6Y/v/d +MSy7UEy4rNquArix8xhqBwwjoGXpa37OqTvvcJrftZ1XgtzmTbkqXc+9EFch0C+w +ST10f+H0SPTUGuPwqLkg27snUkDAv1B8laub+l2L9erzCaRriH8MnFyxt5v1rqWA +mVlRymzgXK+EQDr+XOgMm1CvxVY3OwdjdoHNox4TdVQWlZl83xdLXBxkd5IRciNm +sg5fJAzAMeg8YsoDee3m4khg9gEm+/Rj5io8Gfk0nhQpgGGeS1HEXl5jzTb44zQW +qudkfcLEdUMOECbu7IC5Z1wrcj559qcp9C94IwQQO+LxLwg4kHffvZjCaOXDRiya +h8KGsEDuiqwjU9HgGq9fa0Ceo3OyUazUi+WnOxBLVIQ8cUZJJ2Ia5PDnEsz59kCp +JmBZaYPxUEteMtG3yDTa8c8jUnJtMPpkwpSkeMBeNr/rEH4YcBoxuFjppHzQpJ7G +hZRbOfY8w97TgJbfDElwTX0/xX9ypsmBezgGoOvOkzP9iCy9YUBc9q/SNnflRWPO +sMVrjec0vc6ffthu2xBdigBXhL7x2bphWzTXf2T067k+JOdoh5EGney6LhQzcp8m +YCTENStCR+L/5XwrvNgRBnoXe4e0ZHet1CcCuBCBvSmsPHp5ml21ahsephnHx+rl +JNGtzulnNP07RyfzQcpCNFH7W4lXzqM= +=jrWY +-----END PGP PUBLIC KEY BLOCK----- diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/yum/files/CentOS.6/rpm-gpg/RPM-GPG-KEY-EPEL b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/yum/files/CentOS.6/rpm-gpg/RPM-GPG-KEY-EPEL new file mode 100644 index 00000000000..7a2030489d2 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/yum/files/CentOS.6/rpm-gpg/RPM-GPG-KEY-EPEL @@ -0,0 +1,29 @@ +-----BEGIN PGP PUBLIC KEY BLOCK----- +Version: GnuPG v1.4.5 (GNU/Linux) + +mQINBEvSKUIBEADLGnUj24ZVKW7liFN/JA5CgtzlNnKs7sBg7fVbNWryiE3URbn1 +JXvrdwHtkKyY96/ifZ1Ld3lE2gOF61bGZ2CWwJNee76Sp9Z+isP8RQXbG5jwj/4B +M9HK7phktqFVJ8VbY2jfTjcfxRvGM8YBwXF8hx0CDZURAjvf1xRSQJ7iAo58qcHn +XtxOAvQmAbR9z6Q/h/D+Y/PhoIJp1OV4VNHCbCs9M7HUVBpgC53PDcTUQuwcgeY6 +pQgo9eT1eLNSZVrJ5Bctivl1UcD6P6CIGkkeT2gNhqindRPngUXGXW7Qzoefe+fV +QqJSm7Tq2q9oqVZ46J964waCRItRySpuW5dxZO34WM6wsw2BP2MlACbH4l3luqtp +Xo3Bvfnk+HAFH3HcMuwdaulxv7zYKXCfNoSfgrpEfo2Ex4Im/I3WdtwME/Gbnwdq +3VJzgAxLVFhczDHwNkjmIdPAlNJ9/ixRjip4dgZtW8VcBCrNoL+LhDrIfjvnLdRu +vBHy9P3sCF7FZycaHlMWP6RiLtHnEMGcbZ8QpQHi2dReU1wyr9QgguGU+jqSXYar +1yEcsdRGasppNIZ8+Qawbm/a4doT10TEtPArhSoHlwbvqTDYjtfV92lC/2iwgO6g +YgG9XrO4V8dV39Ffm7oLFfvTbg5mv4Q/E6AWo/gkjmtxkculbyAvjFtYAQARAQAB +tCFFUEVMICg2KSA8ZXBlbEBmZWRvcmFwcm9qZWN0Lm9yZz6JAjYEEwECACAFAkvS +KUICGw8GCwkIBwMCBBUCCAMEFgIDAQIeAQIXgAAKCRA7Sd8qBgi4lR/GD/wLGPv9 +qO39eyb9NlrwfKdUEo1tHxKdrhNz+XYrO4yVDTBZRPSuvL2yaoeSIhQOKhNPfEgT +9mdsbsgcfmoHxmGVcn+lbheWsSvcgrXuz0gLt8TGGKGGROAoLXpuUsb1HNtKEOwP +Q4z1uQ2nOz5hLRyDOV0I2LwYV8BjGIjBKUMFEUxFTsL7XOZkrAg/WbTH2PW3hrfS +WtcRA7EYonI3B80d39ffws7SmyKbS5PmZjqOPuTvV2F0tMhKIhncBwoojWZPExft +HpKhzKVh8fdDO/3P1y1Fk3Cin8UbCO9MWMFNR27fVzCANlEPljsHA+3Ez4F7uboF +p0OOEov4Yyi4BEbgqZnthTG4ub9nyiupIZ3ckPHr3nVcDUGcL6lQD/nkmNVIeLYP +x1uHPOSlWfuojAYgzRH6LL7Idg4FHHBA0to7FW8dQXFIOyNiJFAOT2j8P5+tVdq8 +wB0PDSH8yRpn4HdJ9RYquau4OkjluxOWf0uRaS//SUcCZh+1/KBEOmcvBHYRZA5J +l/nakCgxGb2paQOzqqpOcHKvlyLuzO5uybMXaipLExTGJXBlXrbbASfXa/yGYSAG +iVrGz9CE6676dMlm8F+s3XXE13QZrXmjloc6jwOljnfAkjTGXjiB7OULESed96MR +XtfLk0W5Ab9pd7tKDR6QHI7rgHXfCopRnZ2VVQ== +=V/6I +-----END PGP PUBLIC KEY BLOCK----- diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/yum/files/CentOS.6/rpm-gpg/RPM-GPG-KEY-PGDG b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/yum/files/CentOS.6/rpm-gpg/RPM-GPG-KEY-PGDG new file mode 100644 index 00000000000..8722c21cbd6 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/yum/files/CentOS.6/rpm-gpg/RPM-GPG-KEY-PGDG @@ -0,0 +1,31 @@ +-----BEGIN PGP PUBLIC KEY BLOCK----- +Version: GnuPG v1.4.7 (GNU/Linux) + +mQGiBEeD8koRBACC1VBRsUwGr9gxFFRho9kZpdRUjBJoPhkeOTvp9LzkdAQMFngr +BFi6N0ov1kCX7LLwBmDG+JPR7N+XcH9YR1coSHpLVg+JNy2kFDd4zAyWxJafjZ3a +9zFg9Yx+0va1BJ2t4zVcmKS4aOfbgQ5KwIOWUujalQW5Y+Fw39Gn86qjbwCg5dIo +tkM0l19h2sx50D027pV5aPsD/2c9pfcFTbMhB0CcKS836GH1qY+NCAdUwPs646ee +Ex/k9Uy4qMwhl3HuCGGGa+N6Plyon7V0TzZuRGp/1742dE8IO+I/KLy2L1d1Fxrn +XOTBZd8qe6nBwh12OMcKrsPBVBxn+iSkaG3ULsgOtx+HHLfa1/p22L5+GzGdxizr +peBuA/90cCp+lYcEwdYaRoFVR501yDOTmmzBc1DrsyWP79QMEGzMqa393G0VnqXt +L4pGmunq66Agw2EhPcIt3pDYiCmEt/obdVtSJH6BtmSDB/zYhbE8u3vLP3jfFDa9 +KXxgtYj0NvuUVoRmxSKm8jtfmj1L7zoKNz3jl+Ba3L0WxIv4+bRBUG9zdGdyZVNR +TCBSUE0gQnVpbGRpbmcgUHJvamVjdCA8cGdzcWxycG1zLWhhY2tlcnNAcGdmb3Vu +ZHJ5Lm9yZz6IYAQTEQIAIAUCR4PySgIbIwYLCQgHAwIEFQIIAwQWAgMBAh4BAheA +AAoJEB8W0uFELfD4jnkAoMqd6ZwwsgYHZ3hP9vt+DJt1uDW7AKDbRwP8ESKFhwdJ +8m91RPBeJW/tMLkCDQRHg/JKEAgA64+ZXgcERPYfZYo4p+yMTJAAa9aqnE3U4Ni6 +ZMB57GPuEy8NfbNya+HiftO8hoozmJdcI6XFyRBCDUVCdZ8SE+PJdOx2FFqZVIu6 +dKnr8ykhgLpNNEFDG3boK9UfLj/5lYQ3Y550Iym1QKOgyrJYeAp6sZ+Nx2PavsP3 +nMFCSD67BqAbcLCVQN7a2dAUXfEbfXJjPHXTbo1/kxtzE+KCRTLdXEbSEe3nHO04 +K/EgTBjeBUOxnciH5RylJ2oGy/v4xr9ed7R1jJtshsDKMdWApwoLlCBJ63jg/4T/ +z/OtXmu4AvmWaJxaTl7fPf2GqSqqb6jLCrQAH7AIhXr9V0zPZwADBQgAlpptNQHl +u7euIdIujFwwcxyQGfee6BG+3zaNSEHMVQMuc6bxuvYmgM9r7aki/b0YMfjJBk8v +OJ3Eh1vDH/woJi2iJ13vQ21ot+1JP3fMd6NPR8/qEeDnmVXu7QAtlkmSKI9Rdnjz +FFSUJrQPHnKsH4V4uvAM+njwYD+VFiwlBPTKNeL8cdBb4tPN2cdVJzoAp57wkZAN +VA2tKxNsTJKBi8wukaLWX8+yPHiWCNWItvyB4WCEp/rZKG4A868NM5sZQMAabpLd +l4fTiGu68OYgK9qUPZvhEAL2C1jPDVHPkLm+ZsD+90Pe66w9vB00cxXuHLzm8Pad +GaCXCY8h3xi6VIhJBBgRAgAJBQJHg/JKAhsMAAoJEB8W0uFELfD4K4cAoJ4yug8y +1U0cZEiF5W25HDzMTtaDAKCaM1m3Cbd+AZ0NGWNg/VvIX9MsPA== +=au6K +-----END PGP PUBLIC KEY BLOCK----- + diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/yum/files/CentOS.6/rpm-gpg/RPM-GPG-KEY-RBEL b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/yum/files/CentOS.6/rpm-gpg/RPM-GPG-KEY-RBEL new file mode 100644 index 00000000000..152fd799008 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/yum/files/CentOS.6/rpm-gpg/RPM-GPG-KEY-RBEL @@ -0,0 +1,36 @@ +-----BEGIN PGP PUBLIC KEY BLOCK----- +Version: GnuPG v2.0.14 (GNU/Linux) + +mQGiBEZ6qawRBAC2gDuA1sZioGh1VP/U0l+9RmzOdkWBGB3NfWqezAwt1Up+cP5o +h+UNkghOKbJVQ/zLyY/edYOppQ78yxT1X/J1RHNhs5bjqzWlQxMbT5/tt1N4PExu +gvO38RGFTV0DqIy3lQw5YIwp2le+G8MktYh2NKI4lG0AJoXZicNlI7+mEwCgmfw+ +CnsB/kb/xUD1dq6Mo3dYXVcEAKSFfqt+6jvJNxcIYfpQqjEslQsQmPKpXzK9CPyV +UCjUEOirbhPxV86u3Ge/yuy5USMvTTs+ztImabbH6UHBEP+tEw3LiuPUpfh+nEna +3Hz+U81PvUwGEwUMzCr+OemBXqGW7jl66NqKqm8YM3Pkvc4NlS/7slky9A/s6i8S +hToWA/9kP55aSbIXte5TbC88lx6YuLx7qW541ni38DmJfPN5hHywLGnM82MMQMbk +hg1v49+7TTNv44LJpGT7t8gsW9F4Z4rWoChhsldypeeqbDOIv4kFiXt/8122Ud9J +nE67CR9XUuS5Jp+gP6xxNr9/vbvqsOGMJAQkVgkBPVuKYv25gLQ3U2VyZ2lvIFJ1 +YmlvIChGcmFtZU9TIERldmVsb3BlcnMpIDxydWJpb2pyQGZyYW1lb3Mub3JnPohr +BBMRAgArAhsDBQkGE0x0BgsJCAcDAgYVCAIJCgsEFgIDAQIeAQIXgAUCTBs76AIZ +AQAKCRCOw9dP80W+dFhjAJ0dKy761iPcG+ALwEAuAgxDpUVBzgCdFxGCAZ7ELYvf +3uFc0Ou2ihDzvyy0IFNlcmdpbyBSdWJpbyA8c2VyZ2lvQHJ1YmlvLm5hbWU+iGYE +ExECACYCGwMGCwkIBwMCBBUCCAMEFgIDAQIeAQIXgAUJBhNMdAUCTBs7XgAKCRCO +w9dP80W+dDdtAJ9NYoW1ChfMyES7nQUlesEQ4aWXjQCeIoGxoOuIGyg6+AKr/2Wr +6fE1zt2IaQQTEQIAKQIbAwYLCQgHAwIEFQIIAwQWAgMBAh4BAheAAhkBBQJIHsGo +BQkCuHFEAAoJEI7D10/zRb50KjgAnRTzzNIODKqrHnrHaUG8dWDCwmYjAJ48Hbcn +ZC6E8LGTeM8vPN0mMI9ijLkCDQRGeqm2EAgAh720kjA9bNDms+6agb6CirD9RkmZ +3G+OHd5iia3KbaUiBtC3PECg4UE8N54JuBNKdjgJQfdYSg2J0EZHyhZHdAVWjykE +tj/IKZKnAfUqKh44uT9OUPW8PChPo/gioLn+DexSAW7n19h7VIa1P3shYqYR/gz8 +zgfrXkFFpkpKnOLsXuF20JEEBIBdwrfYRJIBrUTYrfS/2GKLJjyutENkb9uI3JgQ +LfR6DckTaar4eeArjgvOxZRHiU0vRezetlbG8ZM9mSYrcMM3Xa5vLpFlDj6vYzat +RWEuZUfLgXWUVoVyFiNVXhpff/w7/bAb3WpXqjZd6sK8CCJJPNtnbLE7CwADBQf9 +EQjT9iiEZis35V9HqeLsxXVjPOGNuLiwjIpacI7CM3aGV1q7NXiCE4oWS/PvpHmu +W+XdXMPH4Bt2VmjZSarlAipTeNnOuiEXipUFIjAlNn1xNVRRd7T35zIvXLtmNtUe +nN1/mqZljKPbCbW1AgktH417t/vJfTnRWr9IgS3Am+o4q200i+1FjrQ/UI3s9+vg +5B+KASFP6HspNttl0kwzQ6SFIHAebd4DKHOj6ShxXPNl18W4R8qPqayrAFqdkgMJ +Jn8j2E8rmGYnssSfjck2kLtvNdTEAMjFnhg+oUapUzJAVeterudiWZFNrtn9ewnf +8SUiiYJlxb+nz545zo0gQIhJBBgRAgAJBQJGeqm2AhsMAAoJEI7D10/zRb50PJEA +mwTA+Sp3wvzwDr8sk7W7U4bBfw26AKCVoYw3mfTime+j3mFk1yk1yxjE2Q== +=iyOs +-----END PGP PUBLIC KEY BLOCK----- + diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/yum/files/CentOS.6/rpm-gpg/RPM-GPG-KEY-beta b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/yum/files/CentOS.6/rpm-gpg/RPM-GPG-KEY-beta new file mode 100644 index 00000000000..b86da239064 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/yum/files/CentOS.6/rpm-gpg/RPM-GPG-KEY-beta @@ -0,0 +1,28 @@ +-----BEGIN PGP PUBLIC KEY BLOCK----- +Version: GnuPG v1.2.6 (GNU/Linux) + +mQGiBEWfBuERBACrwDH+6QvpyaOgzhXiemsIX+q4HlhX/HDmrmZOUd7i9VmZNogP +6LRRiTygn2+UphaGV3NDA36ZB/1JRpgvgpzbpZNeAoFvsljIbxGIwkH2JgRF6oNo +eGB3QYzDQJvYVIejk79M0ed3oor4w8OiNVcdxLyVIthFrjrrCqwRP3bLZwCgtY9t +Ezf5WL63Ue45vdht7A2GH+0D/iNAnWKsU7FUMFZrcwMaMbyP7YG8z0+zXUOgtgyP +tbgJG5yikNT3vJypb42gbKfcriUUDC5AeiRmkR8QPvYuOm34rM90+wx2LGqXWnHM +IyLAyl8TS3MQmePem8bfTGTNYxtt3Q7iadez2WYTLBSlmM6hbxZfdwm1hhyM0AJU +YyFUA/9kHH+CUBxKb1UgG7TSp53Po/5p/Yyuty+RJ7zIGv6SiN/JK4/ntWfm5WS5 +ZprSdE5ODoFQ/Gs3/VB/eolg2fBW1DcftH6lKHT3GKEOaicGX+T9eOMerZZedm5U +vDA9mFvWnOdOxK8LuRgVqip4jCnWICchpatmdP0whJQHQ6MGLLRMQ2VudE9TLTUg +QmV0YSBLZXkgKENlbnRPUyA1IEJldGEgU2lnbmluZyBLZXkpIDxjZW50b3MtNS1i +ZXRhLWtleUBjZW50b3Mub3JnPohkBBMRAgAkBQJFnwbhAhsDBQkSzAMABgsJCAcD +AgMVAgMDFgIBAh4BAheAAAoJEM/aaIEJLXsrWDkAoKcqa+AAdAWvp5qlJkGQiRy8 +aNFDAJ4qRfIxMiLinmjbqcuygWMp61wY5ohMBBMRAgAMBQJFnwhtBYMSzAF0AAoJ +EDjCFhY5bKCkG/wAn14LDlJqjZv1Wz0WNfhr80+qJrf6AKCaIZExwo4ApQpESk/F +SApLd/pEILkBDQRFnwbrEAQAwKzjI2aTB/sS9HuQ4CHCwrj4vr0HxMMwQikYBIvy +MYTtek04KDTKoJL5g3411DsfDW9VRGJdFCHvldgam/5UVfO6nywLkdwAA5TQA5dv +8YE8jTtwdy5Y1QKFc8LaIBZK0+ZbhEvdNfv67egvfcxZc5PvpBZ3C03n+iQ3wPcg +PhcAAwUD/iYkq4LG/je43Qa5rTz5kF5rIiX7Bk5vXT7XSFOFKwHy8V+PGEoVM1W8 ++EHIlmTycwIlsVp3by6qCDkMYu4V6VukxZNzJyeoMICiYIXUPh6NKHRoqaYlu6ZO +eFN1TQNXmodPk+iNtdbcby/zAklNqoO/dWSwd8NAo8s6WAHq3VPpiE8EGBECAA8F +AkWfBusCGwwFCRLMAwAACgkQz9pogQkteysXkACgoraCU0EBC+W8TuxrsePO20ma +D0IAoLRRQLTEXL0p3K0WE+LfyTr9EVG5 +=mH0S +-----END PGP PUBLIC KEY BLOCK----- + diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/yum/files/CentOS.6/rpm-gpg/RPM-GPG-KEY-kbsingh b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/yum/files/CentOS.6/rpm-gpg/RPM-GPG-KEY-kbsingh new file mode 100644 index 00000000000..f8c688e5f4c --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/yum/files/CentOS.6/rpm-gpg/RPM-GPG-KEY-kbsingh @@ -0,0 +1,25 @@ +-----BEGIN PGP PUBLIC KEY BLOCK----- +Version: GnuPG v1.2.6 (GNU/Linux) + +mQGiBEIu6hwRBACOz2JFa1nW+seAKlVGOu0ykhdFVNI9E4/Abp2+8nsJIZyUwLAp +ei76rPD8WdptgIjtYOCsqz1TbP+eqeEG0LLihOdFRLUuAjQX4X7LLf5Qm+nvUB73 +uLbSf9Ptps2CMUEtu7+0wVoTbuC19HXUhUr5sRdCnJbPJBH6aAHG7Pl9ZwCguN9o +V7IKTnIQiZg0nxSjZ4V9e6UD/R7KoMwH3NPQQF7T7rJaBjSZcVHUPhAcNPNn+ms/ +Tw9mzHZ0mnQnOzSEW0ZUj9TkLN52VQ3WmGZKAv9yeVr0/230YIgmtH863lSystmk +LNO9brK0+3vKg5GRpV0/MSWSmf39WPAS1hXNXIFfYp1eGHUfed4FVNxrMTWHQozr +8JosA/wP+zGfM51bSAazLUqP/MEm7F9OFkuD7Sw97w55FyYlrPp1FQWrWczoiKHr +wS5NRCQbCGEEM/+j9id6CukxPLXxwMYCfeg5K0HxMaQT6hxbwjOzAzN3PBFytNel +09qdrdoSDa35twT0SAt+rzM+zvRI8ycizFG3lIih4UItWWve2bQ6S2FyYW5iaXIg +U2luZ2ggKGh0dHA6Ly93d3cua2FyYW4ub3JnLykgPGtic2luZ2hAa2FyYW4ub3Jn +PoheBBMRAgAeBQJCLuocAhsDBgsJCAcDAgMVAgMDFgIBAh4BAheAAAoJEDANvZ4+ +E89b/P4AnjufrDCS+TAEL0KpkYDURePbDCHBAJ4+0iI1Td4YrcnLwmQ1+XDCJ3Zr +a7kBDQRCLuocEAQAjAl48FM9eGtP6M9FgswlSPAuCcJct6wOHmd/qZ923HckJPAD +zIFRMlM6H8P0bKoaIluv7agZM7Gsf8NeTg3NEeMKqnibIAyvjYeSkceRIwvBCQ3A +YwWk+B2zLUAFMxnE31oA10zjCKUo7Dc6XDUxSY/qdLymZzyG/Ndav+vMOVsAAwUD +/RCFDuW/GSM/s3DO7XxrOBRTGQmf9v9tCYdZZD615+s8ghaa5oZTvp1cbTTWiSq8 +ybncfjVHz9HezDgQjJsFZtrYd4w2JD+7K0+8sZ+BUGo1dDSv4UgN8ACtaGJnShiq +s8pQWRZFqFa3waay8oUSTKHiTHdpxLi3x4HhK/8MTsxniEkEGBECAAkFAkIu6hwC +GwwACgkQMA29nj4Tz1tHSgCcDgKL4swEu7ShvI8nZt2JLmTKB5QAn0qZi2zbexbi +DX+bbalHM+xVnXZN +=rZT6 +-----END PGP PUBLIC KEY BLOCK----- diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/yum/files/CentOS.6/rpm-gpg/RPM-GPG-KEY-remi b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/yum/files/CentOS.6/rpm-gpg/RPM-GPG-KEY-remi new file mode 100644 index 00000000000..32833860645 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/yum/files/CentOS.6/rpm-gpg/RPM-GPG-KEY-remi @@ -0,0 +1,24 @@ +-----BEGIN PGP PUBLIC KEY BLOCK----- +Version: GnuPG v1.4.7 (GNU/Linux) + +mQGiBEJny1wRBACRnbQgZ6qLmJSuGvi/EwrRL6aW610BbdpLQRL3dnwy5wI5t9T3 +/JEiEJ7GTvAwfiisEHifMfk2sRlWRf2EDQFttHyrrYXfY5L6UAF2IxixK5FL7PWA +/2a7tkw1IbCbt4IGG0aZJ6/xgQejrOLi4ewniqWuXCc+tLuWBZrGpE2QfwCggZ+L +0e6KPTHMP97T4xV81e3Ba5MD/3NwOQh0pVvZlW66Em8IJnBgM+eQh7pl4xq7nVOh +dEMJwVU0wDRKkXqQVghOxALOSAMapj5mDppEDzGLZHZNSRcvGEs2iPwo9vmY+Qhp +AyEBzE4blNR8pwPtAwL0W3cBKUx7ZhqmHr2FbNGYNO/hP4tO2ochCn5CxSwAfN1B +Qs5pBACOkTZMNC7CLsSUT5P4+64t04x/STlAFczEBcJBLF1T16oItDITJmAsPxbY +iee6JRfXmZKqmDP04fRdboWMcRjfDfCciSdIeGqP7vMcO25bDZB6x6++fOcmQpyD +1Fag3ZUq2yojgXWqVrgFHs/HB3QE7UQkykNp1fjQGbKK+5mWTrQkUmVtaSBDb2xs +ZXQgPFJQTVNARmFtaWxsZUNvbGxldC5jb20+iGAEExECACAFAkZ+MYoCGwMGCwkI +BwMCBBUCCAMEFgIDAQIeAQIXgAAKCRAATm9HAPl/Vv/UAJ9EL8ioMTsz/2EPbNuQ +MP5Xx/qPLACeK5rk2hb8VFubnEsbVxnxfxatGZ25AQ0EQmfLXRAEANwGvY+mIZzj +C1L5Nm2LbSGZNTN3NMbPFoqlMfmym8XFDXbdqjAHutGYEZH/PxRI6GC8YW5YK4E0 +HoBAH0b0F97JQEkKquahCakj0P5mGuH6Q8gDOfi6pHimnsSAGf+D+6ZwAn8bHnAa +o+HVmEITYi6s+Csrs+saYUcjhu9zhyBfAAMFA/9Rmfj9/URdHfD1u0RXuvFCaeOw +CYfH2/nvkx+bAcSIcbVm+tShA66ybdZ/gNnkFQKyGD9O8unSXqiELGcP8pcHTHsv +JzdD1k8DhdFNhux/WPRwbo/es6QcpIPa2JPjBCzfOTn9GXVdT4pn5tLG2gHayudK +8Sj1OI2vqGLMQzhxw4hJBBgRAgAJBQJCZ8tdAhsMAAoJEABOb0cA+X9WcSAAn11i +gC5ns/82kSprzBOU0BNwUeXZAJ0cvNmY7rvbyiJydyLsSxh/la6HKw== +=6Rbg +-----END PGP PUBLIC KEY BLOCK----- diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/yum/files/CentOS.6/rpm-gpg/RPM-GPG-KEY-rpmforge-dag b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/yum/files/CentOS.6/rpm-gpg/RPM-GPG-KEY-rpmforge-dag new file mode 100644 index 00000000000..8ee27f45b9b --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/yum/files/CentOS.6/rpm-gpg/RPM-GPG-KEY-rpmforge-dag @@ -0,0 +1,32 @@ +The following public key can be used to verify RPM packages +downloaded from http://dag.wieers.com/apt/ using 'rpm -K' +if you have the GNU GPG package. +Questions about this key should be sent to: +Dag Wieers + +-----BEGIN PGP PUBLIC KEY BLOCK----- +Version: GnuPG v1.2.1 (GNU/Linux) + +mQGiBD9JMT0RBAC9Q2B0AloUMTxaK73sD0cOu1MMdD8yuDagbMlDtUYA1aGeJVO6 +TV02JLGr67OBY+UkYuC1c3PUwmb3+jakZd5bW1L8E2L705wS0129xQOZPz6J+alF +5rTzVkiefg8ch1yEcMayK20NdyOmhDGXQXNQS8OJFLTIC6bJs+7MZL83/wCg3cG3 +3q7MWHm3IpJb+6QKpB9YH58D/2WjPDK+7YIky/JbFBT4JPgTSBy611+bLqHA6PXq +39tzY6un8KDznAMNtm+NAsr6FEG8PHe406+tbgd7tBkecz3HPX8nR5v0JtDT+gzN +8fM3kAiAzjCHUAFWVAMAZLr5TXuoq4lGTTxvZbwTjZfyjCm7gIieCu8+qnPWh6hm +30NgA/0ZyEHG6I4rOWqPks4vZuD+wlp5XL8moBXEKfEVOMh2MCNDRGnvVHu1P3eD +oHOooVMt9sWrGcgxpYuupPNL4Uf6B6smiLlH6D4tEg+qCxC17zABI5572XJTJ170 +JklZJrPGtnkPrrKMamnN9MU4RjGmjh9JZPa7rKjZHyWP/z/CBrQ1RGFnIFdpZWVy +cyAoRGFnIEFwdCBSZXBvc2l0b3J5IHYxLjApIDxkYWdAd2llZXJzLmNvbT6IWQQT +EQIAGQUCP0kxPQQLBwMCAxUCAwMWAgECHgECF4AACgkQog5SFGuNeeYvDQCeKHST +hIq/WzFBXtJOnQkJGSqAoHoAnRtsJVWYmzYKHqzkRx1qAzL18Sd0iEYEEBECAAYF +Aj9JMWAACgkQoj2iXPqnmevnOACfRQaageMcESHVE1+RSuP3txPUvoEAoJAtOHon +g+3SzVNSZLn/g7/Ljfw+uQENBD9JMT8QBACj1QzRptL6hbpWl5DdQ2T+3ekEjJGt +llCwt4Mwt/yOHDhzLe8SzUNyYxTXUL4TPfFvVW9/j8WOkNGvffbs7g84k7a5h/+l +IJTTlP9V9NruDt1dlrBe+mWF6eCY55OFHjb6nOIkcJwKxRd3nGlWnLsz0ce9Hjrg +6lMrn0lPsMV6swADBQP9H42sss6mlqnJEFA97Fl3V9s+7UVJoAIA5uSVXxEOwVoh +Vq7uECQRvWzif6tzOY+vHkUxOBRvD6oIU6tlmuG3WByKyA1d0MTqMr3eWieSYf/L +n5VA9NuD7NwjFA1kLkoDwfSbsF51LppTMkUggzwgvwE46MB6yyuqAVI1kReAWw+I +RgQYEQIABgUCP0kxPwAKCRCiDlIUa4155oktAKDAzm9QYbDpk6SrQhkSFy016BjE +BACeJU1hpElFnUZCL4yKj4EuLnlo8kc= +=mqUt +-----END PGP PUBLIC KEY BLOCK----- diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/yum/files/CentOS.6/rpm-gpg/RPM-GPG-KEY-webtatic-andy b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/yum/files/CentOS.6/rpm-gpg/RPM-GPG-KEY-webtatic-andy new file mode 100644 index 00000000000..317b802b560 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/yum/files/CentOS.6/rpm-gpg/RPM-GPG-KEY-webtatic-andy @@ -0,0 +1,30 @@ +-----BEGIN PGP PUBLIC KEY BLOCK----- +Version: GnuPG v1.4.5 (GNU/Linux) + +mQGiBE1e+1MRBAD8j+KyOIpGNRN39gNy2E/1HG4ZoLFuxIOxI5/1FEuZB/GjYF5m +DvJerZukd0QCqCs72J6J+uWnfD/52t2XWTw4IHPpCWeyr9TWex3uOYmrYzY+0l0l +qsCsrhT0XGkAE0+/20oEP2+t/d+1q0yRcYZRwWK/ME2rUUX0jOa/B3Bc6wCg3blw +XdZNrv1wVNd1PCOUI79k0V0D+wfbybos8Cmdv2f8dD746fSR/hmp4SzpBDmPRRQu +0gtJAKI6ycTdotGq5zHfZj76kDQBudeIgdbWtqfckP2lK47i8lIENAyC4MK8dxh9 +Ts+b1LqXlbcPyixzImf4qoT5DT1lSEUPwoMRX8W/29GAcvnZpOwQ8g7DNmRBpFFY +8U2GBADz6uEeP3YwJAuL7pi77AalxR0WQAADMR59pGltQdXaZvANXoioU0W519Pb +nl3gKWDiTuwUDrwaSPoBbNLyX4s0AE7/0HSG02/eRjLB8toQpAH9xkK/u2WPe/do +erZg5yg1qhoCbEM7kJ2I/GBl6VbPedt2ORdsC4ZTWTnZJh6tYLQhQW5keSBUaG9t +cHNvbiA8YW5keUB3ZWJ0YXRpYy5jb20+iGAEExECACAFAk1e+1MCGwMGCwkIBwMC +BBUCCAMEFgIDAQIeAQIXgAAKCRC3Q0sGz0xP+TA0AJwJf5ZPeub8v+5CtZwdcZhV +LU0sjgCgrP3y54heBjF1vhZQ3rJywTmRLHe5Ag0ETV77UxAIAIQPLVFbqheJ90Kf +NF8TYt3ZIMpP5chw25OYq4tuZMzVJxKjUlM7KPQxUKquY/F9WpjH980LmICTb4Fz +txzn2bshIsGyg8pDUSnVK0NPY5uaq9bK4oht8wkr3FNFT2FpeqDIJyn+phIuEpIi +qt1LJyzzjobh9csaaGmNHvtrlkIggBj2n/ZQuGNhcYnKUZ/WGmkItCTSOfA++G+C +dCo1aPEymfbnJvaLB/mLyzA+r/r7LQM10cZEtqh5JdclJEh3CzZmx9HsRxCDZF8W +X/C4MmCwmIxmuU4vkVNhHFTQimQEUR8vg9ltiz8+xBjyE1Iav4MxfOYh3xjdJk1d +zlovyUcAAwUH/2KPgf0UQ1o+4IjOYinEEbNlrD1pKw5anUKwaaeQi0vm/oRG0E2F +ZCJ73OHxW/0hMrwbrGwXcm4NBARnAppg+/CecOVpkBgD5hrM+11DPhxdd1bjjfza +Pq8GmPp8SSsiTPUCoSlzojxL3Z05RNbvKVzxzxbYdx5h5XOTflI7bAHTY4AzGSDf +WaFljjCucht/d7u5empAd02haldUXWjT9RvY5RwnRZ+hjI47e+wUA0FMLHYtA1/0 +cwEIvpp2xwF/jpH3ODmnIGEeNoLyzAV7X0KAlSN8VRsh7igZRB9TRGI67aTjRgk8 +ayf/QNxAzwEk1MeDv67IFKNYVolxHCt4CtqISQQYEQIACQUCTV77UwIbDAAKCRC3 +Q0sGz0xP+dPiAKDUNJ5rkB9CRoMH9BC35d0fqXXeugCgwl/HYv52dWgatbyEGLet +etv5Qeg= +=nIAo +-----END PGP PUBLIC KEY BLOCK----- diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/yum/files/CentOS.6/rpm-gpg/RPM-GPG-KEY.art b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/yum/files/CentOS.6/rpm-gpg/RPM-GPG-KEY.art new file mode 100644 index 00000000000..825424e1f33 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/yum/files/CentOS.6/rpm-gpg/RPM-GPG-KEY.art @@ -0,0 +1,24 @@ +-----BEGIN PGP PUBLIC KEY BLOCK----- +Version: GnuPG v1.2.1 (GNU/Linux) + +mQGiBEGP+skRBACyZz7muj2OgWc9FxK+Hj7tWPnrfxEN+0PE+n8MtqH+dxwQpMTd +gDpOXxJa45GM5pEwB6CFSFK7Fb/faniF9fDbm1Ga7MpBupIBYLactkoOTZMuTlGB +T0O5ha4h26YLqFfQOtlEi7d0+BDDdfHRQw3o67ycgRnLgYSA79DISc3MywCgk2TR +yd5sRfZAG23b4EDl+D0+oaMEAK73J7zuxf6F6V5EaxLd/w4JVB2xW0Glcn0fACOe +8FV9lzcZuo2xPpdGuyj02f/xlqvEav3XqTfFU2no61mA2pamaRNhlo+CEfGc7qde +/1twfSgOYqzeCx7+aybyPo8Th41b80FT19mfkjBf6+5NbUHffRabFFh1FmcPVNBn +F3FoA/95nRIzqDMItdTRitaZn02dIGNjdwllBD75bSVEvaR9O5hjBo0VMc25DB7f +DM2qEO52wCQbAKw9zFC284ekZVDaK4aHYt7iobHaqJEpKHgsDut5WWuMiSLR+SsF +aBHIZ9HvrKWLSUQKHU6A1Hva0P0r3GnoCMc/VCVfrLl721SjPbQzQXRvbWljIFJv +Y2tldCBUdXJ0bGUgPGFkbWluQGF0b21pY3JvY2tldHR1cnRsZS5jb20+iFkEExEC +ABkFAkGP+skECwcDAgMVAgMDFgIBAh4BAheAAAoJEDKpURRevSdEzcQAn1hSHqTO +jwv/z/picpOnR+mgycwHAKCBex2ciyXo5xeaQ9w7OMf7Jsmon7kBDQRBj/rMEAQA +6JvRndqE4koK0e49fUkICm1X0ZEzsVg9VmUW+Zft5guCRxmGlYTmtlC7oJCToRP/ +m/xH5uIevGiJycRKB0Ix+Csl6f9QuTkQ7tSTHcaIKbI3tL1x6CCBoWeTGYaOJlvk +ubrmajiMFaBfopLH2firoSToDGoUvv4e7bImIHEgNr8AAwUEAND0YR9DOEZvc+Lq +Ta/PQyxkdZ75o+Ty/O64E3OmO1Tuw2ciSQXCcwrbrMSE6EHHetxtGCnOdkjjjtmH +AnxsxdONv/EJuQmLcoNcsigZZ4tfRdmtXgcbnOmXBgmy1ea1KvWcsmecNSAMJHwR +7vDDKzbj4mSmudzjapHeeOewFF10iEYEGBECAAYFAkGP+swACgkQMqlRFF69J0Sq +nQCfa/q9Y/oY4dOTGj6MsdmRIQkKZhYAoIscjinFwTru4FVi2MIEzUUMToDK +=NOIx +-----END PGP PUBLIC KEY BLOCK----- diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/yum/files/CentOS.6/rpm-gpg/RPM-GPG-KEY.atrpms b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/yum/files/CentOS.6/rpm-gpg/RPM-GPG-KEY.atrpms new file mode 100644 index 00000000000..860ace4d247 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/yum/files/CentOS.6/rpm-gpg/RPM-GPG-KEY.atrpms @@ -0,0 +1,20 @@ +-----BEGIN PGP PUBLIC KEY BLOCK----- +Version: GnuPG v1.4.6 (GNU/Linux) + +mQGiBD5gtCgRBACKIvjMF+20r9k/Uw2Hq6Y/qn1nM0AZEFalhglXP5pMm5bMgkcI +1vCWqJxSbhQhk8hSEenoszes8hyUxHj4hFFUDiRtAxOpCpGCsCnUddgQtHAQd+tm +aQsM6J3Jm/EZPtwR0lvwvRGvz2x6Rr95G8+42KK9x+mBYhLk0y3gAbBzhwCgnkDH +a97MGBT7gRLrmtFqiHrWlPkD/2tBaH6IEuoJhcAbNj9MukbhDOYJ6ic9Nzf6sR3t +ZG+XgQLLS2DNy8+HWcYJOjpJDEe8zWFDdUv3cL1D0U2f2e85FuJaMucHn+816iw8 +mNjZXJEoDE4LJ8Vv53fkevNZpdWmO2VtRwI+woDnIHYHukDLj2sWhVt+5W+uOKAE +OippA/9OzuWrwBtTR+Np8ApZGkxhxU1z0iEStV+kQNqJE7YoR4SGMuzEa3bFzrPx +k4qIU+rw4YgFgHrs1x08lXxNOZkq6avvbl60HqN2qF2UQL/YdU+5X3ixaJVaYYk8 +yuK+hp0Hx2DdBWmVhq6rEzIfpnFhF4qspwMWEiiBGjYDL62W7LQ0QVRycG1zLm5l +dCAocnBtIHNpZ25pbmcga2V5KSA8QXhlbC5UaGltbUBBVHJwbXMubmV0PohnBBMR +AgAnAhsDBgsJCAcDAgMVAgMDFgIBAh4BAheAAhkBBQJFfF9PBQkJGI4nAAoJEFCM +5eZmU0wrJ0IAnA0BdyRlq2S8ess55R8YMFnWAWXEAJ9Fa7cEHku4j4B83shCODps ++DYUZohnBBMRAgAnAhsDBQkDdMLsBgsJCAcDAgMVAgMDFgIBAh4BAheABQJAKteu +AhkBAAoJEFCM5eZmU0wrMMUAnRjS2PXQp0tsC/69IGMMxqU+8xeAAJ9XQjVAo+mU +kg/3AeBlMBIlFe5hDQ== +=23Fz +-----END PGP PUBLIC KEY BLOCK----- diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/yum/files/CentOS.6/rpm-gpg/RubyWorks.GPG.key b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/yum/files/CentOS.6/rpm-gpg/RubyWorks.GPG.key new file mode 100644 index 00000000000..b91a5a88769 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/yum/files/CentOS.6/rpm-gpg/RubyWorks.GPG.key @@ -0,0 +1,30 @@ +-----BEGIN PGP PUBLIC KEY BLOCK----- +Version: GnuPG v1.2.6 (GNU/Linux) + +mQGiBEY5QQ0RBACfC1NbAdGFMOS/Y7P9hmNph2Wh3TJTh6IZpL+lTJBuZSEa6rp0 +CghS/yU3gGXUPaxAy91M7PXMv5p7S3U/SusZHATLhFdU5J4LuWMf4IiBy9FOB/aj +Q1s5vZ/i3YFaqolXsRP8TgIu4Lzp/j3+KAxFb3gF7lz64J/Et2Jil0OQzwCgkn9i +SoPEM6d9SCFOidhUuTHUhM0D/3UXl/FKPVFrFzjslFpaN9NgArRrmXKTOBWEqMLy +12pbTzOtv+p17Ot51q4h0ebEWrmVJ/h/7Is6QT6AKHuOIW+1/88fcSrmef//0Scz +wtEwVudkYA+kOGt1pwhapVYf1lWE9Z6L3V/MVdxXUesylGO6jJjOjpUB+ZBItwl7 +exkhA/4iemhq4D5Jp6r1Kv3aKSPNENdhTORyfZz4UfyOsUfYncaprP5IZja0j+rd +tQLIsH8hXvCT2kSAUY6nMGmzPgpgGamtHI6gH1ZmoNX2gEF7tzGNgKMbbUmwO89B +N56U7wm68AreXE8XviRjGjAtZWnouqe5X+EiUurdJkzRwU0c2rQpVGhvdWdodFdv +cmtzIDxydWJ5d29ya3NAdGhvdWdodHdvcmtzLmNvbT6IYAQTEQIAIAUCRjlBDQIb +AwYLCQgHAwIEFQIIAwQWAgMBAh4BAheAAAoJEHM/KlUQbeB0SSYAn0sgAx5ZK975 +wZiChkIqOCyFZ9PLAJ9laivkzqT2y+Kh9FGe3TP/CAhRTbkCDQRGOUEVEAgAqxJI +MFrYV3JKyeXHVKXHNd5Nf1WdqKi37VOdSTBftiehzZdR9hxkGEknYxnbBLGJR9YD +/uJ2+DRwNBcw2RrrEmb0DCZxcLQLZ3xYa7+WvcR4/Nir/3858SGJ+wmGCHKyX2So +M2TurmKu5bqyUUaBgf+IhKfwOr9zeK3rIRhUq/aiYkw8sWA8ruUvxXwLnbkK1aP9 +hfvSqScwjkfUVk6CQ6GFUD+4N4mNRtRcZz3gYa+0jSNeEJZQOJxRuE/gBHav3eyN +dm4VAFPF20BobvBVEcMhO0KaR/X4jW1G1eFAKLxI7cdx3+vLeNPaFwHiSMSknsNs +UiucI9oV+I5S/50ZrwADBwf/StYTK9KvPnY9ZqmirBpSh0Zl0xylMtAiMblG7pKv +qKTPNr9zXooheQBpAbnhOfju0DB/OtE4V21HqnbMws2aFvHecEbO5EmjwT7ZTltH +5vlbiPrXOc7SpP22FdkOYdunM2+nsA6398mpYFEiFFNAzX6pReN2tbbmXf6zxS9n +nHjMAgl5nMuOASLZrTrUX/7yu6ySS1hy0ZVfEoAFeILy4MV8y0lVjBQa2kNOCNpO +Cc+y1+4EHLS3fuN0x+tho3rhjKAzj8KOt4XnALn8OouRMx9G7ItC2U8kNzHHFRg5 +adT/+nEthVd9q9pYLrUaze7aMQyl+7cD1KzmSe34X9B6W4hJBBgRAgAJBQJGOUEV +AhsMAAoJEHM/KlUQbeB0O7QAn09h4qrKPhWD9eaiyMRS5YeARTYgAJ9WxLcQEvkA +yOSLb33CweehCrlTnQ== +=scSy +-----END PGP PUBLIC KEY BLOCK----- diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/yum/files/Scientific.6/rpm-gpg/RPM-GPG-KEY-CentOS-5 b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/yum/files/Scientific.6/rpm-gpg/RPM-GPG-KEY-CentOS-5 new file mode 100644 index 00000000000..2627d31d8f6 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/yum/files/Scientific.6/rpm-gpg/RPM-GPG-KEY-CentOS-5 @@ -0,0 +1,28 @@ +-----BEGIN PGP PUBLIC KEY BLOCK----- +Version: GnuPG v1.2.6 (GNU/Linux) + +mQGiBEWfB6MRBACrnYW6yKMT+MwJlCIhoyTxGf3mAxmnAiDEy6HcYN8rivssVTJk +CFtQBlBOpLV/OW2YtKrCO2xHn46eNfnMri8FGT8g+9JF3MUVi7kiV1He4iJynHXB ++F2ZqIvHf3IaUj1ys+p8TK64FDFxDQDrGQfIsD/+pkSGx53/877IrvdwjwCguQcr +Ioip5TH0Fj0OLUY4asYVZH8EAIqFHEqsY+9ziP+2R3/FyxSllKkjwcMLrBug+cYO +LYDD6eQXE9Mq8XKGFDj9ZB/0+JzK/XQeStheeFG75q3noq5oCPVFO4czuKErIRAB +qKbDBhaTj3JhOgM12XsUYn+rI6NeMV2ZogoQCC2tWmDETfRpYp2moo53NuFWHbAy +XjETA/sHEeQT9huHzdi/lebNBj0L8nBGfLN1nSRP1GtvagBvkR4RZ6DTQyl0UzOJ +RA3ywWlrL9IV9mrpb1Fmn60l2jTMMCc7J6LacmPK906N+FcN/Docj1M4s/4CNanQ +NhzcFhAFtQL56SNyLTCk1XzhssGZ/jwGnNbU/aaj4wOj0Uef5LRGQ2VudE9TLTUg +S2V5IChDZW50T1MgNSBPZmZpY2lhbCBTaWduaW5nIEtleSkgPGNlbnRvcy01LWtl +eUBjZW50b3Mub3JnPohkBBMRAgAkBQJFnwekAhsDBQkSzAMABgsJCAcDAgMVAgMD +FgIBAh4BAheAAAoJEKikR9zoViiXKlEAmwSoZDvZo+WChcg3s/SpNoWCKhMAAJwI +E2aXpZVrpsQnInUQWwkdrTiL5YhMBBMRAgAMBQJFnwiSBYMSzAIRAAoJEDjCFhY5 +bKCk0hAAn134bIx3wSbq58E6P6U5RT7Z2Zx4AJ9VxnVkoGHkVIgSdsxHUgRjo27N +F7kBDQRFnwezEAQA/HnJ5yiozwgtf6jt+kii8iua+WnjqBKomPHOQ8moxbWdv5Ks +4e1DPhzRqxhshjmub4SuJ93sgMSAF2ayC9t51mSJV33KfzPF2gIahcMqfABe/2hJ +aMzcQZHrGJCEX6ek8l8SFKou7vICzyajRSIK8gxWKBuQknP/9LKsoczV+xsAAwUD +/idXPkk4vRRHsCwc6I23fdI0ur52bzEqHiAIswNfO521YgLk2W1xyCLc2aYjc8Ni +nrMX1tCnEx0/gK7ICyJoWH1Vc7//79sWFtX2EaTO+Q07xjFX4E66WxJlCo9lOjos +Vk5qc7R+xzLDoLGFtbzaTRQFzf6yr7QTu+BebWLoPwNTiE8EGBECAA8FAkWfB7MC +GwwFCRLMAwAACgkQqKRH3OhWKJfvvACfbsF1WK193zM7vSc4uq51XsceLwgAoI0/ +9GxdNhGQEAweSlQfhPa3yYXH +=o/Mx +-----END PGP PUBLIC KEY BLOCK----- + diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/yum/files/Scientific.6/rpm-gpg/RPM-GPG-KEY-EPEL b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/yum/files/Scientific.6/rpm-gpg/RPM-GPG-KEY-EPEL new file mode 100644 index 00000000000..7a2030489d2 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/yum/files/Scientific.6/rpm-gpg/RPM-GPG-KEY-EPEL @@ -0,0 +1,29 @@ +-----BEGIN PGP PUBLIC KEY BLOCK----- +Version: GnuPG v1.4.5 (GNU/Linux) + +mQINBEvSKUIBEADLGnUj24ZVKW7liFN/JA5CgtzlNnKs7sBg7fVbNWryiE3URbn1 +JXvrdwHtkKyY96/ifZ1Ld3lE2gOF61bGZ2CWwJNee76Sp9Z+isP8RQXbG5jwj/4B +M9HK7phktqFVJ8VbY2jfTjcfxRvGM8YBwXF8hx0CDZURAjvf1xRSQJ7iAo58qcHn +XtxOAvQmAbR9z6Q/h/D+Y/PhoIJp1OV4VNHCbCs9M7HUVBpgC53PDcTUQuwcgeY6 +pQgo9eT1eLNSZVrJ5Bctivl1UcD6P6CIGkkeT2gNhqindRPngUXGXW7Qzoefe+fV +QqJSm7Tq2q9oqVZ46J964waCRItRySpuW5dxZO34WM6wsw2BP2MlACbH4l3luqtp +Xo3Bvfnk+HAFH3HcMuwdaulxv7zYKXCfNoSfgrpEfo2Ex4Im/I3WdtwME/Gbnwdq +3VJzgAxLVFhczDHwNkjmIdPAlNJ9/ixRjip4dgZtW8VcBCrNoL+LhDrIfjvnLdRu +vBHy9P3sCF7FZycaHlMWP6RiLtHnEMGcbZ8QpQHi2dReU1wyr9QgguGU+jqSXYar +1yEcsdRGasppNIZ8+Qawbm/a4doT10TEtPArhSoHlwbvqTDYjtfV92lC/2iwgO6g +YgG9XrO4V8dV39Ffm7oLFfvTbg5mv4Q/E6AWo/gkjmtxkculbyAvjFtYAQARAQAB +tCFFUEVMICg2KSA8ZXBlbEBmZWRvcmFwcm9qZWN0Lm9yZz6JAjYEEwECACAFAkvS +KUICGw8GCwkIBwMCBBUCCAMEFgIDAQIeAQIXgAAKCRA7Sd8qBgi4lR/GD/wLGPv9 +qO39eyb9NlrwfKdUEo1tHxKdrhNz+XYrO4yVDTBZRPSuvL2yaoeSIhQOKhNPfEgT +9mdsbsgcfmoHxmGVcn+lbheWsSvcgrXuz0gLt8TGGKGGROAoLXpuUsb1HNtKEOwP +Q4z1uQ2nOz5hLRyDOV0I2LwYV8BjGIjBKUMFEUxFTsL7XOZkrAg/WbTH2PW3hrfS +WtcRA7EYonI3B80d39ffws7SmyKbS5PmZjqOPuTvV2F0tMhKIhncBwoojWZPExft +HpKhzKVh8fdDO/3P1y1Fk3Cin8UbCO9MWMFNR27fVzCANlEPljsHA+3Ez4F7uboF +p0OOEov4Yyi4BEbgqZnthTG4ub9nyiupIZ3ckPHr3nVcDUGcL6lQD/nkmNVIeLYP +x1uHPOSlWfuojAYgzRH6LL7Idg4FHHBA0to7FW8dQXFIOyNiJFAOT2j8P5+tVdq8 +wB0PDSH8yRpn4HdJ9RYquau4OkjluxOWf0uRaS//SUcCZh+1/KBEOmcvBHYRZA5J +l/nakCgxGb2paQOzqqpOcHKvlyLuzO5uybMXaipLExTGJXBlXrbbASfXa/yGYSAG +iVrGz9CE6676dMlm8F+s3XXE13QZrXmjloc6jwOljnfAkjTGXjiB7OULESed96MR +XtfLk0W5Ab9pd7tKDR6QHI7rgHXfCopRnZ2VVQ== +=V/6I +-----END PGP PUBLIC KEY BLOCK----- diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/yum/files/Scientific.6/rpm-gpg/RPM-GPG-KEY-RBEL b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/yum/files/Scientific.6/rpm-gpg/RPM-GPG-KEY-RBEL new file mode 100644 index 00000000000..152fd799008 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/yum/files/Scientific.6/rpm-gpg/RPM-GPG-KEY-RBEL @@ -0,0 +1,36 @@ +-----BEGIN PGP PUBLIC KEY BLOCK----- +Version: GnuPG v2.0.14 (GNU/Linux) + +mQGiBEZ6qawRBAC2gDuA1sZioGh1VP/U0l+9RmzOdkWBGB3NfWqezAwt1Up+cP5o +h+UNkghOKbJVQ/zLyY/edYOppQ78yxT1X/J1RHNhs5bjqzWlQxMbT5/tt1N4PExu +gvO38RGFTV0DqIy3lQw5YIwp2le+G8MktYh2NKI4lG0AJoXZicNlI7+mEwCgmfw+ +CnsB/kb/xUD1dq6Mo3dYXVcEAKSFfqt+6jvJNxcIYfpQqjEslQsQmPKpXzK9CPyV +UCjUEOirbhPxV86u3Ge/yuy5USMvTTs+ztImabbH6UHBEP+tEw3LiuPUpfh+nEna +3Hz+U81PvUwGEwUMzCr+OemBXqGW7jl66NqKqm8YM3Pkvc4NlS/7slky9A/s6i8S +hToWA/9kP55aSbIXte5TbC88lx6YuLx7qW541ni38DmJfPN5hHywLGnM82MMQMbk +hg1v49+7TTNv44LJpGT7t8gsW9F4Z4rWoChhsldypeeqbDOIv4kFiXt/8122Ud9J +nE67CR9XUuS5Jp+gP6xxNr9/vbvqsOGMJAQkVgkBPVuKYv25gLQ3U2VyZ2lvIFJ1 +YmlvIChGcmFtZU9TIERldmVsb3BlcnMpIDxydWJpb2pyQGZyYW1lb3Mub3JnPohr +BBMRAgArAhsDBQkGE0x0BgsJCAcDAgYVCAIJCgsEFgIDAQIeAQIXgAUCTBs76AIZ +AQAKCRCOw9dP80W+dFhjAJ0dKy761iPcG+ALwEAuAgxDpUVBzgCdFxGCAZ7ELYvf +3uFc0Ou2ihDzvyy0IFNlcmdpbyBSdWJpbyA8c2VyZ2lvQHJ1YmlvLm5hbWU+iGYE +ExECACYCGwMGCwkIBwMCBBUCCAMEFgIDAQIeAQIXgAUJBhNMdAUCTBs7XgAKCRCO +w9dP80W+dDdtAJ9NYoW1ChfMyES7nQUlesEQ4aWXjQCeIoGxoOuIGyg6+AKr/2Wr +6fE1zt2IaQQTEQIAKQIbAwYLCQgHAwIEFQIIAwQWAgMBAh4BAheAAhkBBQJIHsGo +BQkCuHFEAAoJEI7D10/zRb50KjgAnRTzzNIODKqrHnrHaUG8dWDCwmYjAJ48Hbcn +ZC6E8LGTeM8vPN0mMI9ijLkCDQRGeqm2EAgAh720kjA9bNDms+6agb6CirD9RkmZ +3G+OHd5iia3KbaUiBtC3PECg4UE8N54JuBNKdjgJQfdYSg2J0EZHyhZHdAVWjykE +tj/IKZKnAfUqKh44uT9OUPW8PChPo/gioLn+DexSAW7n19h7VIa1P3shYqYR/gz8 +zgfrXkFFpkpKnOLsXuF20JEEBIBdwrfYRJIBrUTYrfS/2GKLJjyutENkb9uI3JgQ +LfR6DckTaar4eeArjgvOxZRHiU0vRezetlbG8ZM9mSYrcMM3Xa5vLpFlDj6vYzat +RWEuZUfLgXWUVoVyFiNVXhpff/w7/bAb3WpXqjZd6sK8CCJJPNtnbLE7CwADBQf9 +EQjT9iiEZis35V9HqeLsxXVjPOGNuLiwjIpacI7CM3aGV1q7NXiCE4oWS/PvpHmu +W+XdXMPH4Bt2VmjZSarlAipTeNnOuiEXipUFIjAlNn1xNVRRd7T35zIvXLtmNtUe +nN1/mqZljKPbCbW1AgktH417t/vJfTnRWr9IgS3Am+o4q200i+1FjrQ/UI3s9+vg +5B+KASFP6HspNttl0kwzQ6SFIHAebd4DKHOj6ShxXPNl18W4R8qPqayrAFqdkgMJ +Jn8j2E8rmGYnssSfjck2kLtvNdTEAMjFnhg+oUapUzJAVeterudiWZFNrtn9ewnf +8SUiiYJlxb+nz545zo0gQIhJBBgRAgAJBQJGeqm2AhsMAAoJEI7D10/zRb50PJEA +mwTA+Sp3wvzwDr8sk7W7U4bBfw26AKCVoYw3mfTime+j3mFk1yk1yxjE2Q== +=iyOs +-----END PGP PUBLIC KEY BLOCK----- + diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/yum/files/Scientific.6/rpm-gpg/RPM-GPG-KEY-beta b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/yum/files/Scientific.6/rpm-gpg/RPM-GPG-KEY-beta new file mode 100644 index 00000000000..b86da239064 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/yum/files/Scientific.6/rpm-gpg/RPM-GPG-KEY-beta @@ -0,0 +1,28 @@ +-----BEGIN PGP PUBLIC KEY BLOCK----- +Version: GnuPG v1.2.6 (GNU/Linux) + +mQGiBEWfBuERBACrwDH+6QvpyaOgzhXiemsIX+q4HlhX/HDmrmZOUd7i9VmZNogP +6LRRiTygn2+UphaGV3NDA36ZB/1JRpgvgpzbpZNeAoFvsljIbxGIwkH2JgRF6oNo +eGB3QYzDQJvYVIejk79M0ed3oor4w8OiNVcdxLyVIthFrjrrCqwRP3bLZwCgtY9t +Ezf5WL63Ue45vdht7A2GH+0D/iNAnWKsU7FUMFZrcwMaMbyP7YG8z0+zXUOgtgyP +tbgJG5yikNT3vJypb42gbKfcriUUDC5AeiRmkR8QPvYuOm34rM90+wx2LGqXWnHM +IyLAyl8TS3MQmePem8bfTGTNYxtt3Q7iadez2WYTLBSlmM6hbxZfdwm1hhyM0AJU +YyFUA/9kHH+CUBxKb1UgG7TSp53Po/5p/Yyuty+RJ7zIGv6SiN/JK4/ntWfm5WS5 +ZprSdE5ODoFQ/Gs3/VB/eolg2fBW1DcftH6lKHT3GKEOaicGX+T9eOMerZZedm5U +vDA9mFvWnOdOxK8LuRgVqip4jCnWICchpatmdP0whJQHQ6MGLLRMQ2VudE9TLTUg +QmV0YSBLZXkgKENlbnRPUyA1IEJldGEgU2lnbmluZyBLZXkpIDxjZW50b3MtNS1i +ZXRhLWtleUBjZW50b3Mub3JnPohkBBMRAgAkBQJFnwbhAhsDBQkSzAMABgsJCAcD +AgMVAgMDFgIBAh4BAheAAAoJEM/aaIEJLXsrWDkAoKcqa+AAdAWvp5qlJkGQiRy8 +aNFDAJ4qRfIxMiLinmjbqcuygWMp61wY5ohMBBMRAgAMBQJFnwhtBYMSzAF0AAoJ +EDjCFhY5bKCkG/wAn14LDlJqjZv1Wz0WNfhr80+qJrf6AKCaIZExwo4ApQpESk/F +SApLd/pEILkBDQRFnwbrEAQAwKzjI2aTB/sS9HuQ4CHCwrj4vr0HxMMwQikYBIvy +MYTtek04KDTKoJL5g3411DsfDW9VRGJdFCHvldgam/5UVfO6nywLkdwAA5TQA5dv +8YE8jTtwdy5Y1QKFc8LaIBZK0+ZbhEvdNfv67egvfcxZc5PvpBZ3C03n+iQ3wPcg +PhcAAwUD/iYkq4LG/je43Qa5rTz5kF5rIiX7Bk5vXT7XSFOFKwHy8V+PGEoVM1W8 ++EHIlmTycwIlsVp3by6qCDkMYu4V6VukxZNzJyeoMICiYIXUPh6NKHRoqaYlu6ZO +eFN1TQNXmodPk+iNtdbcby/zAklNqoO/dWSwd8NAo8s6WAHq3VPpiE8EGBECAA8F +AkWfBusCGwwFCRLMAwAACgkQz9pogQkteysXkACgoraCU0EBC+W8TuxrsePO20ma +D0IAoLRRQLTEXL0p3K0WE+LfyTr9EVG5 +=mH0S +-----END PGP PUBLIC KEY BLOCK----- + diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/yum/files/Scientific.6/rpm-gpg/RPM-GPG-KEY-dawson b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/yum/files/Scientific.6/rpm-gpg/RPM-GPG-KEY-dawson new file mode 100644 index 00000000000..c71c5047541 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/yum/files/Scientific.6/rpm-gpg/RPM-GPG-KEY-dawson @@ -0,0 +1,25 @@ +-----BEGIN PGP PUBLIC KEY BLOCK----- +Version: GnuPG v1.2.1 (GNU/Linux) + +mQGiBD/9sIMRBADp28M+gDNgYJ/UMW1Tem0W/D17FAZRVRI8Ht68QcZsq6uS1k3L +HPX7rLG3iKrKj4crvEE+CY/3L182NZ6bRJt61rQLrtSbMFIMvt7L6dG6BYYw0i8P +SqyVC6uPb2W8wi1RtNdQk0pSeDSQh8wCsDDo8WYHkdRztoKWHvd3hAN7NwCgzRVU +QS3Uw6McILxO9cUBgJEhBj8D/38TomjexWRUp+rzs6aouqHoZyslSCUe4aLeJvSQ +Whi1j4E0sgWMJ2L/Ta6FXNM2Of3Ze6delf8eVPZ2N78yELh+LV7DZr5Cy+zDtSWY +WnyWGSqHVEqf0UarpC8XVcJ1jJu3sHfaBf94tnKJI/uipxbD8oU4ixoLvANFR1fp +YfKdBACm+C8Rk2NpXeAtXIyN9UgJPpj9H5IXxnrdYJa0ce72qrrniM0dhGHz9+9H +5d8rVJYTNEW6kDhj79vnFLq86o0n8VIpv/0g38FO+FCi4yVJ49qA2+D7unysBVTm +ZXo3LRMiBJfeh39ONEIg+CWVD6sXo7FTwVKpawJpeO6Lp8nrlbQ6VHJveSBEYXdz +b24gKFNwaWt5IEhhaXIgSGF3YWlpYW4gU2hpcnRzKSA8ZGF3c29uQGZuYWwuZ292 +PohZBBMRAgAZBQI//bCDBAsHAwIDFQIDAxYCAQIeAQIXgAAKCRDaatAIgv0XsoJ2 +AJ9KdOcfYSVAjoUwwrQjARa6xWP/NQCcCJKfBYUVZDiWsiZjVm1EOGcNCSS5AQ0E +P/2whBAEAJYHI18UVqIrZPX3C3FvzXf7MzNs31UPA1iCgp3f02w6nh/XZs8Y0CNB +ig9rCR/e2O8O4Fnl56Z+N+a9H7jPmF8sOhacvqNaS7yAJ+9pHj0op6Az/X69dWnS +AdaFXPB1Tc6ryfNtbs0CB0tWRbjlB4BTd/1PEerLNUNGoLOpFWeXAAMFA/0UD2ku +vIRoQwAjNf1/swcIQe44DNNQYY+GSzi0tXVhytiJquziPk/la2elinl4N1KERrO8 +fgdrHtZl4X7n3nv5GGdwVjQfcZJfzFcGIlzqJOcLHAlVSVEpAJAlkykbx8BDtfod +JbODs9NfU+VwmwrTwyVdpbOEHb9ktdeuabIXMIhGBBgRAgAGBQI//bCEAAoJENpq +0AiC/Rey1JoAnjJ1qsi4gbkb+srAgH2UCBRcM0uQAKCGiibCE9G5udph5YplnHhL +ZpAqxA== +=3u8+ +-----END PGP PUBLIC KEY BLOCK----- diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/yum/files/Scientific.6/rpm-gpg/RPM-GPG-KEY-redhat-beta b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/yum/files/Scientific.6/rpm-gpg/RPM-GPG-KEY-redhat-beta new file mode 100644 index 00000000000..7b40671a4c1 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/yum/files/Scientific.6/rpm-gpg/RPM-GPG-KEY-redhat-beta @@ -0,0 +1,61 @@ +-----BEGIN PGP PUBLIC KEY BLOCK----- +Version: GnuPG v1.2.6 (GNU/Linux) + +mQINBEmkAzABEAC2/c7bP1lHQ3XScxbIk0LQWe1YOiibQBRLwf8Si5PktgtuPibT +kKpZjw8p4D+fM7jD1WUzUE0X7tXg2l/eUlMM4dw6XJAQ1AmEOtlwSg7rrMtTvM0A +BEtI7Km6fC6sU6RtBMdcqD1cH/6dbsfh8muznVA7UlX+PRBHVzdWzj6y8h84dBjo +gzcbYu9Hezqgj/lLzicqsSZPz9UdXiRTRAIhp8V30BD8uRaaa0KDDnD6IzJv3D9P +xQWbFM4Z12GN9LyeZqmD7bpKzZmXG/3drvfXVisXaXp3M07t3NlBa3Dt8NFIKZ0D +FRXBz5bvzxRVmdH6DtkDWXDPOt+Wdm1rZrCOrySFpBZQRpHw12eo1M1lirANIov7 +Z+V1Qh/aBxj5EUu32u9ZpjAPPNtQF6F/KjaoHHHmEQAuj4DLex4LY646Hv1rcv2i +QFuCdvLKQGSiFBrfZH0j/IX3/0JXQlZzb3MuMFPxLXGAoAV9UP/Sw/WTmAuTzFVm +G13UYFeMwrToOiqcX2VcK0aC1FCcTP2z4JW3PsWvU8rUDRUYfoXovc7eg4Vn5wHt +0NBYsNhYiAAf320AUIHzQZYi38JgVwuJfFu43tJZE4Vig++RQq6tsEx9Ftz3EwRR +fJ9z9mEvEiieZm+vbOvMvIuimFVPSCmLH+bI649K8eZlVRWsx3EXCVb0nQARAQAB +tDBSZWQgSGF0LCBJbmMuIChiZXRhIGtleSAyKSA8c2VjdXJpdHlAcmVkaGF0LmNv +bT6JAjYEEwECACAFAkpSM+cCGwMGCwkIBwMCBBUCCAMEFgIDAQIeAQIXgAAKCRCT +ioDK8hVB6/9tEAC0+KmzeKceXQ/GTUoU6jy9vtkFCFrmv+c7ol4XpdTt0QhqBOwy +6m2mKWwmm8KfYfy0cADQ4y/EcoXl7FtFBwYmkCuEQGXhTDn9DvVjhooIq59LEMBQ +OW879RwwzRIZ8ebbjMUjDPF5MfPQqP2LBu9N4KvXlZp4voykwuuaJ+cbsKZR6pZ6 +0RQKPHKP+NgUFC0fff7XY9cuOZZWFAeKRhLN2K7bnRHKxp+kELWb6R9ZfrYwZjWc +MIPbTd1khE53L4NTfpWfAnJRtkPSDOKEGVlVLtLq4HEAxQt07kbslqISRWyXER3u +QOJj64D1ZiIMz6t6uZ424VE4ry9rBR0Jz55cMMx5O/ni9x3xzFUgH8Su2yM0r3jE +Rf24+tbOaPf7tebyx4OKe+JW95hNVstWUDyGbs6K9qGfI/pICuO1nMMFTo6GqzQ6 +DwLZvJ9QdXo7ujEtySZnfu42aycaQ9ZLC2DOCQCUBY350Hx6FLW3O546TAvpTfk0 +B6x+DV7mJQH7MGmRXQsE7TLBJKjq28Cn4tVp04PmybQyTxZdGA/8zY6pPl6xyVMH +V68hSBKEVT/rlouOHuxfdmZva1DhVvUC6Xj7+iTMTVJUAq/4Uyn31P1OJmA2a0PT +CAqWkbJSgKFccsjPoTbLyxhuMSNkEZFHvlZrSK9vnPzmfiRH0Orx3wYpMQ== +=21pb +-----END PGP PUBLIC KEY BLOCK----- +The following public key can be used to verify RPM packages built and +signed by Red Hat, Inc. for this beta using `rpm -K' using the GNU GPG +package. Questions about this key should be sent to security@redhat.com. + + +-----BEGIN PGP PUBLIC KEY BLOCK----- +Version: GnuPG v1.0.6 (GNU/Linux) +Comment: For info see http://www.gnupg.org + +mQGiBDySTqsRBACzc7xuCIp10oj5B2PAV4XzDeVxprv/WTMreSNSK+iC0bEz0IBp +Vnn++qtyiXfH+bGIE9jqZgIEnpttWhUOaU5LhcLFzy+m8NWfngIFP9QfGmGAe9Gd +LFeAdhj4RmSG/vgr7vDd83Hz22dv403Ar/sliWO4vDOrMmZBG57WGYTWtwCgkMsi +UUQuJ6slbzKn82w+bYxOlL0EAIylWJGaTkKOTL5DqVR3ik9aT0Dt3FNVYiuhcKBe +II4E3KOIVA9kO8in1IZjx2gs6K2UV+GsoAVANdfKL7l9O+k+J8OxhE74oycvYJxW +QzCgXMZkNcvW5wyXwEMcr6TVd/5BGztcMw8oT3/l2MtAEG/vn1XaWToRSO1XDMDz ++AjUA/4m0mTkN8S4wjzJG8lqN7+quW3UOaiCe8J3SFrrrhE0XbY9cTJI/9nuXHU1 +VjqOSmXQYH2Db7UOroFTBiWhlAedA4O4yuK52AJnvSsHbnJSEmn9rpo5z1Q8F+qI +mDlzriJdrIrVLeDiUeTlpH3kpG38D7007GhXBV72k1gpMoMcpbQ3UmVkIEhhdCwg +SW5jLiAoQmV0YSBUZXN0IFNvZnR3YXJlKSA8cmF3aGlkZUByZWRoYXQuY29tPohX +BBMRAgAXBQI8l5p/BQsHCgMEAxUDAgMWAgECF4AACgkQ/TcmiYl9oHqdeQCfZjw4 +F9sir3XfRAjVe9kYNcQ8hnIAn0WgyT7H5RriWYTOCfauOmd+cAW4iEYEEBECAAYF +AjyXmqQACgkQIZGAzdtCpg5nDQCfepuRUyuVJvhuQkPWySETYvRw+WoAnjAWhx6q +0npMx4OE1JGFi8ymKXktuQENBDySTq4QBADKL/mK7S8E3synxISlu7R6fUvu07Oc +RoX96n0Di6T+BS99hC44XzHjMDhUX2ZzVvYS88EZXoUDDkB/8g7SwZrOJ/QE1zrI +JmSVciNhSYWwqeT40Evs88ajZUfDiNbS/cSC6oui98iS4vxd7sE7IPY+FSx9vuAR +xOa9vBnJY/dx0wADBQQAosm+Iltt2uigC6LJzxNOoIdB5r0GqTC1o5sHCeNqXJhU +ExAG8m74uzMlYVLOpGZi4y4NwwAWvCWC0MWWnnu+LGFy1wKiJKRjhv5F+WkFutY5 +WHV5L44vp9jSIlBCRG+84jheTh8xqhndM9wOfPwWdYYu1vxrB8Tn6kA17PcYfHSI +RgQYEQIABgUCPJJergAKCRD9NyaJiX2geiCPAJ4nEM4NtI9Uj8lONDk6FU86PmoL +yACfb68fBd2pWEzLKsOk9imIobHHpzE= +=gpIn +-----END PGP PUBLIC KEY BLOCK----- diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/yum/files/Scientific.6/rpm-gpg/RPM-GPG-KEY-redhat-legacy-former b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/yum/files/Scientific.6/rpm-gpg/RPM-GPG-KEY-redhat-legacy-former new file mode 100644 index 00000000000..3818b2c926f --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/yum/files/Scientific.6/rpm-gpg/RPM-GPG-KEY-redhat-legacy-former @@ -0,0 +1,37 @@ +The following public key can be used to verify RPM packages built and +signed by Red Hat, Inc. This key is used for packages in Red Hat +products shipped prior to November 2006, and for all updates to those +products. + +Questions about this key should be sent to security@redhat.com. + +-----BEGIN PGP PUBLIC KEY BLOCK----- +Version: GnuPG v1.0.0 (GNU/Linux) +Comment: For info see http://www.gnupg.org + +mQGiBDfqVDgRBADBKr3Bl6PO8BQ0H8sJoD6p9U7Yyl7pjtZqioviPwXP+DCWd4u8 +HQzcxAZ57m8ssA1LK1Fx93coJhDzM130+p5BG9mYSWShLabR3N1KXdXQYYcowTOM +GxdwYRGr1Spw8QydLhjVfU1VSl4xt6bupPbWJbyjkg5Z3P7BlUOUJmrx3wCgobNV +EDGaWYJcch5z5B1of/41G8kEAKii6q7Gu/vhXXnLS6m15oNnPVybyngiw/23dKjS +ZVG7rKANEK2mxg1VB+vc/uUc4k49UxJJfCZg1gu1sPFV3GSa+Y/7jsiLktQvCiLP +lncQt1dV+ENmHR5BdIDPWDzKBVbgWnSDnqQ6KrZ7T6AlZ74VMpjGxxkWU6vV2xsW +XCLPA/9P/vtImA8CZN3jxGgtK5GGtDNJ/cMhhuv5tnfwFg4b/VGo2Jr8mhLUqoIb +E6zeGAmZbUpdckDco8D5fiFmqTf5+++pCEpJLJkkzel/32N2w4qzPrcRMCiBURES +PjCLd4Y5rPoU8E4kOHc/4BuHN903tiCsCPloCrWsQZ7UdxfQ5LQiUmVkIEhhdCwg +SW5jIDxzZWN1cml0eUByZWRoYXQuY29tPohVBBMRAgAVBQI36lQ4AwsKAwMVAwID +FgIBAheAAAoJECGRgM3bQqYOsBQAnRVtg7B25Hm11PHcpa8FpeddKiq2AJ9aO8sB +XmLDmPOEFI75mpTrKYHF6rkCDQQ36lRyEAgAokgI2xJ+3bZsk8jRA8ORIX8DH05U +lMH27qFYzLbT6npXwXYIOtVn0K2/iMDj+oEB1Aa2au4OnddYaLWp06v3d+XyS0t+ +5ab2ZfIQzdh7wCwxqRkzR+/H5TLYbMG+hvtTdylfqIX0WEfoOXMtWEGSVwyUsnM3 +Jy3LOi48rQQSCKtCAUdV20FoIGWhwnb/gHU1BnmES6UdQujFBE6EANqPhp0coYoI +hHJ2oIO8ujQItvvNaU88j/s/izQv5e7MXOgVSjKe/WX3s2JtB/tW7utpy12wh1J+ +JsFdbLV/t8CozUTpJgx5mVA3RKlxjTA+On+1IEUWioB+iVfT7Ov/0kcAzwADBQf9 +E4SKCWRand8K0XloMYgmipxMhJNnWDMLkokvbMNTUoNpSfRoQJ9EheXDxwMpTPwK +ti/PYrrL2J11P2ed0x7zm8v3gLrY0cue1iSba+8glY+p31ZPOr5ogaJw7ZARgoS8 +BwjyRymXQp+8Dete0TELKOL2/itDOPGHW07SsVWOR6cmX4VlRRcWB5KejaNvdrE5 +4XFtOd04NMgWI63uqZc4zkRa+kwEZtmbz3tHSdRCCE+Y7YVP6IUf/w6YPQFQriWY +FiA6fD10eB+BlIUqIw80VgjsBKmCwvKkn4jg8kibXgj4/TzQSx77uYokw1EqQ2wk +OZoaEtcubsNMquuLCMWijYhGBBgRAgAGBQI36lRyAAoJECGRgM3bQqYOhyYAnj7h +VDY/FJAGqmtZpwVp9IlitW5tAJ4xQApr/jNFZCTksnI+4O1765F7tA== +=3AHZ +-----END PGP PUBLIC KEY BLOCK----- diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/yum/files/Scientific.6/rpm-gpg/RPM-GPG-KEY-redhat-legacy-release b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/yum/files/Scientific.6/rpm-gpg/RPM-GPG-KEY-redhat-legacy-release new file mode 100644 index 00000000000..09aded8bec7 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/yum/files/Scientific.6/rpm-gpg/RPM-GPG-KEY-redhat-legacy-release @@ -0,0 +1,24 @@ +The following public key can be used to verify RPM packages built and +signed by Red Hat, Inc. This key is used for packages in Red Hat +products shipped after November 2006, and for all updates to those +products. + +Questions about this key should be sent to security@redhat.com. + +-----BEGIN PGP PUBLIC KEY BLOCK----- +Version: GnuPG v1.2.6 (GNU/Linux) + +mQGiBEV2EyQRBAD4/SR69qoLzK4HIa6g9iS+baiX0o3NjkLftFHg/xy+IMOMg//i +4c5bUpLKDTMH3+yT0G8qpul/RALUFOESKFkZm3/SlkJKuroXcB8U6s2dh5XX9DDB +ISqRwL7M5qB8rfDPKHN+k/XwJ9CNpHMdNxnnc2WhnnmHNp6NrD/bUEH4vwCglMa0 +rFRXPaN7407DARGHvW/jugsEANFaeZsFwos/sajL1XQRfHZUTnvDjJgz31IFY+OL +DlOVAOtV/NaECMwIJsMIhoisW4Luwp4m75Qh3ogq3bwqSWNLsfJ9WFnNqXOgamyD +h/F4q492z6FpyIb1JZLABBSH7LEQjHlR/s/Ct5JEWc5MyfzdjBi6J9qCh3y/IYL0 +EbfRA/4yoJ/fH9uthDLZsZRWmnGJvb+VpRvcVs8IQ4aIAcOMbWu2Sp3U9pm6cxZF +N7tShmAwiiGj9UXVtlhpj3lnqulLMD9VqXGF0YgDOaQ7CP/99OEEhUjBj/8o8udF +gxc1i2WJjc7/sr8IMbDv/SNToi0bnZUxXa/BUjj92uaQ6/LupbQxUmVkIEhhdCwg +SW5jLiAocmVsZWFzZSBrZXkpIDxzZWN1cml0eUByZWRoYXQuY29tPohfBBMRAgAf +BQJFdhMkAhsDBgsJCAcDAgQVAggDAxYCAQIeAQIXgAAKCRBTJoEBNwFxhogXAKCD +TuYeyQrkYXjg9JmOdTZvsIVfZgCcCWKJXtfbC5dbv0piTHI/cdwVzJo= +=mhzo +-----END PGP PUBLIC KEY BLOCK----- diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/yum/files/Scientific.6/rpm-gpg/RPM-GPG-KEY-redhat-legacy-rhx b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/yum/files/Scientific.6/rpm-gpg/RPM-GPG-KEY-redhat-legacy-rhx new file mode 100644 index 00000000000..0f875c0e207 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/yum/files/Scientific.6/rpm-gpg/RPM-GPG-KEY-redhat-legacy-rhx @@ -0,0 +1,17 @@ +-----BEGIN PGP PUBLIC KEY BLOCK----- +Version: GnuPG v1.2.6 (GNU/Linux) + +mQGiBEYk7/IRBACdWFJInc51/+0sqvadIvf0E+Vhv4aIqB76jWtIGqXnTeG6hEl/ +9tJoLszBh4g/KBFVF3E4VxTHXKO/L7GZRa8JzoMtvV8XiP6BaYq6ykx6H7alKvoP +qzk7xBbvNbqsXJCO7keo+g7iIDdfAxvsSJYbhQBxDn5W4Hw7SnHcMmTDOQCg7vOj +UzaZG32yYMBZLjOAB/QzXgsD/1JRDnQ8cL6d17B1ie57ZuVOI3ziQJSmj0zbC0IX +OsxlcFjwydLk3TA88iCr0SO2mfXCsGTeDGFbrl2IRCoH91l3Ew49HI4OYtl+OPSt +pIYdFLSQ+RUPs9CFYwF9Ogjrwmi6jVptKq/+v0WgnCrbfz3DYxCWt/VB1PYDj5y6 +Mv//BACKa2mUuQoukDvzqiwZXV/Z52MeDOzPbOFo6qhx+54nav9Inz1yziEjYrP/ +ZrNJ4BT6fBgin/a6UmD5FqMtkrrhOCpHFQK2H+XYZ0vVJGZI7h74/fY8U2n+1Mle +xQ/ejWojF+H5nFUAwKHaNVNofKcw8c8msgGn2jsvrAISTSHshrQwUmVkIEhhdCwg +SW5jLiAoUkhYIGtleSkgPHJoeC1zdXBwb3J0QHJlZGhhdC5jb20+iF8EExECAB8F +AkYk7/ICGwMGCwkIBwMCBBUCCAMDFgIBAh4BAheAAAoJEDmhOhJCGT5r6FoAoLsB ++DOPmTc3P+77DnNhU460nmjQAKCI3BJ/SxqPqfp8jL6lTfVo2zxegQ== +=t0np +-----END PGP PUBLIC KEY BLOCK----- diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/yum/files/Scientific.6/rpm-gpg/RPM-GPG-KEY-redhat-release b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/yum/files/Scientific.6/rpm-gpg/RPM-GPG-KEY-redhat-release new file mode 100644 index 00000000000..47c6be6700b --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/yum/files/Scientific.6/rpm-gpg/RPM-GPG-KEY-redhat-release @@ -0,0 +1,62 @@ +The following public key can be used to verify RPM packages built and +signed by Red Hat, Inc. This key is used for packages in Red Hat +products shipped after November 2009, and for all updates to those +products. + +Questions about this key should be sent to security@redhat.com. + +pub 4096R/FD431D51 2009-10-22 Red Hat, Inc. (release key 2) + +-----BEGIN PGP PUBLIC KEY BLOCK----- +Version: GnuPG v1.2.6 (GNU/Linux) + +mQINBErgSTsBEACh2A4b0O9t+vzC9VrVtL1AKvUWi9OPCjkvR7Xd8DtJxeeMZ5eF +0HtzIG58qDRybwUe89FZprB1ffuUKzdE+HcL3FbNWSSOXVjZIersdXyH3NvnLLLF +0DNRB2ix3bXG9Rh/RXpFsNxDp2CEMdUvbYCzE79K1EnUTVh1L0Of023FtPSZXX0c +u7Pb5DI5lX5YeoXO6RoodrIGYJsVBQWnrWw4xNTconUfNPk0EGZtEnzvH2zyPoJh +XGF+Ncu9XwbalnYde10OCvSWAZ5zTCpoLMTvQjWpbCdWXJzCm6G+/hx9upke546H +5IjtYm4dTIVTnc3wvDiODgBKRzOl9rEOCIgOuGtDxRxcQkjrC+xvg5Vkqn7vBUyW +9pHedOU+PoF3DGOM+dqv+eNKBvh9YF9ugFAQBkcG7viZgvGEMGGUpzNgN7XnS1gj +/DPo9mZESOYnKceve2tIC87p2hqjrxOHuI7fkZYeNIcAoa83rBltFXaBDYhWAKS1 +PcXS1/7JzP0ky7d0L6Xbu/If5kqWQpKwUInXtySRkuraVfuK3Bpa+X1XecWi24JY +HVtlNX025xx1ewVzGNCTlWn1skQN2OOoQTV4C8/qFpTW6DTWYurd4+fE0OJFJZQF +buhfXYwmRlVOgN5i77NTIJZJQfYFj38c/Iv5vZBPokO6mffrOTv3MHWVgQARAQAB +tDNSZWQgSGF0LCBJbmMuIChyZWxlYXNlIGtleSAyKSA8c2VjdXJpdHlAcmVkaGF0 +LmNvbT6JAjYEEwECACAFAkrgSTsCGwMGCwkIBwMCBBUCCAMEFgIDAQIeAQIXgAAK +CRAZni+R/UMdUWzpD/9s5SFR/ZF3yjY5VLUFLMXIKUztNN3oc45fyLdTI3+UClKC +2tEruzYjqNHhqAEXa2sN1fMrsuKec61Ll2NfvJjkLKDvgVIh7kM7aslNYVOP6BTf +C/JJ7/ufz3UZmyViH/WDl+AYdgk3JqCIO5w5ryrC9IyBzYv2m0HqYbWfphY3uHw5 +un3ndLJcu8+BGP5F+ONQEGl+DRH58Il9Jp3HwbRa7dvkPgEhfFR+1hI+Btta2C7E +0/2NKzCxZw7Lx3PBRcU92YKyaEihfy/aQKZCAuyfKiMvsmzs+4poIX7I9NQCJpyE +IGfINoZ7VxqHwRn/d5mw2MZTJjbzSf+Um9YJyA0iEEyD6qjriWQRbuxpQXmlAJbh +8okZ4gbVFv1F8MzK+4R8VvWJ0XxgtikSo72fHjwha7MAjqFnOq6eo6fEC/75g3NL +Ght5VdpGuHk0vbdENHMC8wS99e5qXGNDued3hlTavDMlEAHl34q2H9nakTGRF5Ki +JUfNh3DVRGhg8cMIti21njiRh7gyFI2OccATY7bBSr79JhuNwelHuxLrCFpY7V25 +OFktl15jZJaMxuQBqYdBgSay2G0U6D1+7VsWufpzd/Abx1/c3oi9ZaJvW22kAggq +dzdA27UUYjWvx42w9menJwh/0jeQcTecIUd0d0rFcw/c1pvgMMl/Q73yzKgKYw== +=zbHE +-----END PGP PUBLIC KEY BLOCK----- +The following public key can be used to verify RPM packages built and +signed by Red Hat, Inc. This key is a supporting (auxiliary) key for +Red Hat products shipped after November 2006 and for all updates to +those products. + +Questions about this key should be sent to security@redhat.com. + +-----BEGIN PGP PUBLIC KEY BLOCK----- +Version: GnuPG v1.2.6 (GNU/Linux) + +mQGiBEVwDGkRBACwPhZIpvkjI8wV9sFTDoqyPLx1ub8Sd/w+YuI5Ovm49mvvEQVT +VLg8FgE5JlST59AbsLDyVtRa9CxIvN5syBVrWWWtHtDnnylFBcqG/A6J3bI4E9/A +UtSL5Zxbav0+utP6f3wOpxQrxc+WIDVgpurdBKAQ3dsobGBqypeX6FXZ5wCgou6C +yZpGIBqosJaDWLzNeOfb/70D/1thLkQyhW3JJ6cHCYJHNfBShvbLWBf6S231mgmu +MyMlt8Kmipc9bw+saaAkSkVsQ/ZbfjrWB7e5kbMruKLVrH+nGhamlHYUGyAPtsPg +Uj/NUSj5BmrCsOkMpn43ngTLssE9MLhSPj2nIHGFv9B+iVLvomDdwnaBRgQ1aK8z +z6MAA/406yf5yVJ/MlTWs1/68VwDhosc9BtU1V5IE0NXgZUAfBJzzfVzzKQq6zJ2 +eZsMLhr96wbsW13zUZt1ing+ulwh2ee4meuJq6h/971JspFY/XBhcfq4qCNqVjsq +SZnWoGdCO6J8CxPIemD2IUHzjoyyeEj3RVydup6pcWZAmhzkKrQzUmVkIEhhdCwg +SW5jLiAoYXV4aWxpYXJ5IGtleSkgPHNlY3VyaXR5QHJlZGhhdC5jb20+iF4EExEC +AB4FAkVwDGkCGwMGCwkIBwMCAxUCAwMWAgECHgECF4AACgkQRWiciC+mWOC1rQCg +ooNLCFOzNPcvhd9Za8C801HmnsYAniCw3yzrCqtjYnxDDxlufH0FVTwX +=d/bm +-----END PGP PUBLIC KEY BLOCK----- diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/yum/files/Scientific.6/rpm-gpg/RPM-GPG-KEY-remi b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/yum/files/Scientific.6/rpm-gpg/RPM-GPG-KEY-remi new file mode 100644 index 00000000000..32833860645 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/yum/files/Scientific.6/rpm-gpg/RPM-GPG-KEY-remi @@ -0,0 +1,24 @@ +-----BEGIN PGP PUBLIC KEY BLOCK----- +Version: GnuPG v1.4.7 (GNU/Linux) + +mQGiBEJny1wRBACRnbQgZ6qLmJSuGvi/EwrRL6aW610BbdpLQRL3dnwy5wI5t9T3 +/JEiEJ7GTvAwfiisEHifMfk2sRlWRf2EDQFttHyrrYXfY5L6UAF2IxixK5FL7PWA +/2a7tkw1IbCbt4IGG0aZJ6/xgQejrOLi4ewniqWuXCc+tLuWBZrGpE2QfwCggZ+L +0e6KPTHMP97T4xV81e3Ba5MD/3NwOQh0pVvZlW66Em8IJnBgM+eQh7pl4xq7nVOh +dEMJwVU0wDRKkXqQVghOxALOSAMapj5mDppEDzGLZHZNSRcvGEs2iPwo9vmY+Qhp +AyEBzE4blNR8pwPtAwL0W3cBKUx7ZhqmHr2FbNGYNO/hP4tO2ochCn5CxSwAfN1B +Qs5pBACOkTZMNC7CLsSUT5P4+64t04x/STlAFczEBcJBLF1T16oItDITJmAsPxbY +iee6JRfXmZKqmDP04fRdboWMcRjfDfCciSdIeGqP7vMcO25bDZB6x6++fOcmQpyD +1Fag3ZUq2yojgXWqVrgFHs/HB3QE7UQkykNp1fjQGbKK+5mWTrQkUmVtaSBDb2xs +ZXQgPFJQTVNARmFtaWxsZUNvbGxldC5jb20+iGAEExECACAFAkZ+MYoCGwMGCwkI +BwMCBBUCCAMEFgIDAQIeAQIXgAAKCRAATm9HAPl/Vv/UAJ9EL8ioMTsz/2EPbNuQ +MP5Xx/qPLACeK5rk2hb8VFubnEsbVxnxfxatGZ25AQ0EQmfLXRAEANwGvY+mIZzj +C1L5Nm2LbSGZNTN3NMbPFoqlMfmym8XFDXbdqjAHutGYEZH/PxRI6GC8YW5YK4E0 +HoBAH0b0F97JQEkKquahCakj0P5mGuH6Q8gDOfi6pHimnsSAGf+D+6ZwAn8bHnAa +o+HVmEITYi6s+Csrs+saYUcjhu9zhyBfAAMFA/9Rmfj9/URdHfD1u0RXuvFCaeOw +CYfH2/nvkx+bAcSIcbVm+tShA66ybdZ/gNnkFQKyGD9O8unSXqiELGcP8pcHTHsv +JzdD1k8DhdFNhux/WPRwbo/es6QcpIPa2JPjBCzfOTn9GXVdT4pn5tLG2gHayudK +8Sj1OI2vqGLMQzhxw4hJBBgRAgAJBQJCZ8tdAhsMAAoJEABOb0cA+X9WcSAAn11i +gC5ns/82kSprzBOU0BNwUeXZAJ0cvNmY7rvbyiJydyLsSxh/la6HKw== +=6Rbg +-----END PGP PUBLIC KEY BLOCK----- diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/yum/files/Scientific.6/rpm-gpg/RPM-GPG-KEY-rpmforge-dag b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/yum/files/Scientific.6/rpm-gpg/RPM-GPG-KEY-rpmforge-dag new file mode 100644 index 00000000000..8ee27f45b9b --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/yum/files/Scientific.6/rpm-gpg/RPM-GPG-KEY-rpmforge-dag @@ -0,0 +1,32 @@ +The following public key can be used to verify RPM packages +downloaded from http://dag.wieers.com/apt/ using 'rpm -K' +if you have the GNU GPG package. +Questions about this key should be sent to: +Dag Wieers + +-----BEGIN PGP PUBLIC KEY BLOCK----- +Version: GnuPG v1.2.1 (GNU/Linux) + +mQGiBD9JMT0RBAC9Q2B0AloUMTxaK73sD0cOu1MMdD8yuDagbMlDtUYA1aGeJVO6 +TV02JLGr67OBY+UkYuC1c3PUwmb3+jakZd5bW1L8E2L705wS0129xQOZPz6J+alF +5rTzVkiefg8ch1yEcMayK20NdyOmhDGXQXNQS8OJFLTIC6bJs+7MZL83/wCg3cG3 +3q7MWHm3IpJb+6QKpB9YH58D/2WjPDK+7YIky/JbFBT4JPgTSBy611+bLqHA6PXq +39tzY6un8KDznAMNtm+NAsr6FEG8PHe406+tbgd7tBkecz3HPX8nR5v0JtDT+gzN +8fM3kAiAzjCHUAFWVAMAZLr5TXuoq4lGTTxvZbwTjZfyjCm7gIieCu8+qnPWh6hm +30NgA/0ZyEHG6I4rOWqPks4vZuD+wlp5XL8moBXEKfEVOMh2MCNDRGnvVHu1P3eD +oHOooVMt9sWrGcgxpYuupPNL4Uf6B6smiLlH6D4tEg+qCxC17zABI5572XJTJ170 +JklZJrPGtnkPrrKMamnN9MU4RjGmjh9JZPa7rKjZHyWP/z/CBrQ1RGFnIFdpZWVy +cyAoRGFnIEFwdCBSZXBvc2l0b3J5IHYxLjApIDxkYWdAd2llZXJzLmNvbT6IWQQT +EQIAGQUCP0kxPQQLBwMCAxUCAwMWAgECHgECF4AACgkQog5SFGuNeeYvDQCeKHST +hIq/WzFBXtJOnQkJGSqAoHoAnRtsJVWYmzYKHqzkRx1qAzL18Sd0iEYEEBECAAYF +Aj9JMWAACgkQoj2iXPqnmevnOACfRQaageMcESHVE1+RSuP3txPUvoEAoJAtOHon +g+3SzVNSZLn/g7/Ljfw+uQENBD9JMT8QBACj1QzRptL6hbpWl5DdQ2T+3ekEjJGt +llCwt4Mwt/yOHDhzLe8SzUNyYxTXUL4TPfFvVW9/j8WOkNGvffbs7g84k7a5h/+l +IJTTlP9V9NruDt1dlrBe+mWF6eCY55OFHjb6nOIkcJwKxRd3nGlWnLsz0ce9Hjrg +6lMrn0lPsMV6swADBQP9H42sss6mlqnJEFA97Fl3V9s+7UVJoAIA5uSVXxEOwVoh +Vq7uECQRvWzif6tzOY+vHkUxOBRvD6oIU6tlmuG3WByKyA1d0MTqMr3eWieSYf/L +n5VA9NuD7NwjFA1kLkoDwfSbsF51LppTMkUggzwgvwE46MB6yyuqAVI1kReAWw+I +RgQYEQIABgUCP0kxPwAKCRCiDlIUa4155oktAKDAzm9QYbDpk6SrQhkSFy016BjE +BACeJU1hpElFnUZCL4yKj4EuLnlo8kc= +=mqUt +-----END PGP PUBLIC KEY BLOCK----- diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/yum/files/Scientific.6/rpm-gpg/RPM-GPG-KEY-sl b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/yum/files/Scientific.6/rpm-gpg/RPM-GPG-KEY-sl new file mode 100644 index 00000000000..70b6bd17ef3 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/yum/files/Scientific.6/rpm-gpg/RPM-GPG-KEY-sl @@ -0,0 +1,32 @@ +-----BEGIN PGP PUBLIC KEY BLOCK----- +Version: GnuPG v1.4.5 (GNU/Linux) + +mQGiBEpXadARBACHhOfMUuT/4iDvBRmm6bEsvnMN++L79aYhEUMNlrZ2TjKPjPvG +Y0vGk+I0JhUJWutkQRZVbqgVDsNjmnELnACK+xvdryvtxh50wCI9WUl7CT5EV7BS +/jD7JxTFbXyC/Xv0ixMB9vj6U9cySyE8PxONp0HzO6LTIr1OMPgDUsP4lwCgh8De +fmY8TN2m9a0huLdNrnmKw0cD/2bkt6rJAi3+BGHWNgQ9Nb/4wQff8BKGDtL/8acp +3yH91axuD2iYCKw0ZP5akBpRGv+4e30Plmbi1f5NaEDo9Ga1c4TDPopwgiYhrVLj +56efoTfP2AiZl3iBKFPI83/YOhrVZF8UiYoAoUnOFpOg8vmtCzgvYip5UZLTgbfJ +lcWvA/9vMb8By+1pHjW98d7GkzvZqzyMtWlbO7PXCn8P7bGQYjwvyTGiRNz3q22c +2Z29qQw4r1L1L1JGsUwuOMahkczWVdD4TRHc8mhVJEUEA6AkNAZc+Ymsfr/ip0kX +nSZLE3pYVifOhBRO8EbT0WhCMScmZNpwvZU//HKL/p+n3LArUrRZU2NpZW50aWZp +YyBMaW51eCAoUlBNIHNpZ25pbmcga2V5IGZvciBTY2llbnRpZmljIExpbnV4KSA8 +c2NpZW50aWZpYy1saW51eC1kZXZlbEBmbmFsLmdvdj6IYAQTEQIAIAUCSldp0AIb +AwYLCQgHAwIEFQIIAwQWAgMBAh4BAheAAAoJELC0GD8ZKn19cXIAnA5R+EbaYr4/ +IL6It/UxHXlBFIajAJ9bwmNDF14uvDnFigg1PLevLTBnTIhGBBARAgAGBQJKV6lf +AAoJENpq0AiC/ReyKLQAmwVC/Ii3sAKsptwZKHw/uk1kbupCAJ0eIzSaUo1hSa1V +fP7O/dqigu6JAbkCDQRKV2nZEAgAzAcaC7unRNdrIwAGGKqOIvI8WNwpftHY50Y5 +zPSl7vtWVkp3N+2fynJR+tW4G/2xDChBbPzPz/TavRyBc21LKzAlym8qIGEE02cZ +U/YJAYnbAkNNiGMOAnAIjBw1KUcQamAxdk0glE7MP1JiXY1MO4tTW38UEcvQbSvg +Mh/eECqFOwiQXJmkPpZhPUwnwmZRCV4vlCZQM3CMExZ9pDV/V+kuhefw2WeheXyh +g4DC88gcrv2mO0I3sVmpxn3JLMayiMlQbOSYLQuNVKN/EFDwuAbS9Ane7vm6wF9X +NswMX0I/vO1IVvSN1fi5ZM71QzeYUGKBQv97kLO20hbRWZ1V+wADBggAys+jhlYH +mtFZQxV4an1ucqnVauKnstj0zF88Hiy7yivT3W5h3Zd067uOfcBQCJUlt7y8sYD2 +q9htm5Rrxx+J29bl0zxwrEatnv0gLzprSa7Ei3wR6IrvBM3Ic0mGSzlsSxlzaFtt +Pwak5C47vX9+PwKEKXFdM1gVzHTuD6PXEYxA4YMlQGeGVA68FvTHxMHpf8POQWTV +QtjoI0flvFT7d4ozqUJdjJZxJDFQ7GO2YdIfF3sUdfn5kFxK0SUzqrmCYXeheniS +LKC4mpAR0PetWJ7r1gY5khHb2eHW1vdEBYUXlHjB+jLaOBns05MHMZYd4CHe8q/Q +gzMeVlh8YLSdZYhJBBgRAgAJBQJKV2nZAhsMAAoJELC0GD8ZKn19iU8AniUIFu32 +VeRJ+VKL2vBQMVbFVZOMAJ434Bi99fN2CSh7T62oxtQvhw70fw== +=eL9H +-----END PGP PUBLIC KEY BLOCK----- diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/yum/files/Scientific.6/rpm-gpg/RPM-GPG-KEY-sl3 b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/yum/files/Scientific.6/rpm-gpg/RPM-GPG-KEY-sl3 new file mode 100644 index 00000000000..5d16185468e --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/yum/files/Scientific.6/rpm-gpg/RPM-GPG-KEY-sl3 @@ -0,0 +1,34 @@ +-----BEGIN PGP PUBLIC KEY BLOCK----- +Version: GnuPG v1.4.5 (GNU/Linux) + +mQGiBEpXatkRBADSVLhSFxxebo3H16HGjvOg+tSAuppoqrmg9WrC2ly6I41BHXng +n2H0t07nAemb35XSRfb6j4vNIiNoXGFzcjTMP5/cwn24hvilXyA0zX59hhD0ut4c +VGksNhUKnYkVI/+0+EjJ3RnCouVvVx8p2eCIDhjIueDjuLp3mVBLYh7OEwCgmQrO +ysS+xHHcYfUX4jsghfzge10EAIuMAXGWmMLRUJ6PCjrAKVVGT4FxH53UyPjXGXga +SYR4A4aFq9eoDPLRo/nRB/isT0/NfcBbp4wdzYUxz8pmMOWGLFjg7DBBvOj84q+0 +ZFibybxFJAtjaZcKw+feCb6R2tJPOfJr6+noOeAZ9MFYZ7z5NG5vezGB1rLu/c5k +vb5LA/9wI8pz7jCMOPBE4LGO9C1tbvKfrFHEfsgn5zsF/+YABCrbHrc2eN2NESpv +84jLHvrssKaPjJVHL1JlRRfO2myT37hLa/D3pUrAcs/CqWGeddKkhJE7c816EO6d +FZU5/7Utill9x3tLu8ZS+WXkH5sr/garxim5P3Sm3K1/ZXZaEbRbU2NpZW50aWZp +YyBMaW51eCAoUlBNIHNpZ25pbmcga2V5IGZvciBTY2llbnRpZmljIExpbnV4IDMp +IDxzY2llbnRpZmljLWxpbnV4LWRldmVsQGZuYWwuZ292PohgBBMRAgAgBQJKV2rZ +AhsDBgsJCAcDAgQVAggDBBYCAwECHgECF4AACgkQAYjOtesQYlrupwCfR65pEGRf +air4Nzf+ZP5Q2i8doscAnAhod/cVNjPA9Lo4UOEAJ5kWZ4CXiEYEEBECAAYFAkpX +pTwACgkQsLQYPxkqfX2m9QCfUzSI3MVchLk00M2c67Xj7ghvNaMAn3TybHcAHpGu +pJ8qBwisCX6mPMSqiEYEEBECAAYFAkpXqW4ACgkQ2mrQCIL9F7LGjwCfWBc67ftN +jTGxL+ilnrYyZhupKd8AoKoSkHG61pxk+Ja58aSvsGRWAdv9uQINBEpXat0QCADG +G22g1V5t8xoxjA5sgDw+ow3QonkA8p+EEr1+xjZyJTsMMiRioz88WH54xcbLBoCM +ltgK3gSYpywEoB76yzFS/woLSjBdCLEMwX6Dj/y1U67ykoDoop31LIW8a4geYJpW +0a83Np00noLidNi7xhuExvp3BxHPpM9mVvqfDOkFcuiexaAU9uF6cgVov8eE95l9 +jWcNn1oLnqo2mq2pqJFk0Qkq612Nj2TWOdcrJlksIqEG+H6Jn434u+leGgyR6RnW +Ty4OS4JnwRYXeAfLh2wCCFPWVL6eQTfRjkWmjWlvKIgz8YX+vTx7SfYsfhPRKkgs +ZS0VyRkUSV8EkkRlaRw3AAQLB/9YOgCeW673SBZJUITb1TM4bxT2bk03ORpfqPzu +NBfb4Szm1lsJvlOgEfwZZR2UcQeCqm+WtSSx/Ajce/LA/Q+MYW0X/Vcy1pEYYhs1 +9YRZ/1Q7+JR2Q/hCMBvtMf3XN+1sEjHwPJpskq0qBng6SofE+V7FOELswfSk6j+b +2d4G4WEyuiaj6FD5tvrWFmcWgBnhpGG+Rx2n1UT1lqk+r81H4iZB6MoIkicR1gyx +i6mfqJnKMFSWeeXddx7kr6xclDungGlTF/dnk5K73CRm5XBxxYsUYS1Kz8tF6MbB +d/FYJjYlQWx2eAh1xoimlnBgX8BNsmzjbvOtcLtZOUTT95F2iEkEGBECAAkFAkpX +at0CGwwACgkQAYjOtesQYlqHcACfQqTUZxtuSjHWeM2yODl4Cb6kMqkAnjgBLM1s +uix25Q+HkPygJyHv7nEI +=eJoE +-----END PGP PUBLIC KEY BLOCK----- diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/yum/files/Scientific.6/rpm-gpg/RPM-GPG-KEY-sl4 b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/yum/files/Scientific.6/rpm-gpg/RPM-GPG-KEY-sl4 new file mode 100644 index 00000000000..14f3096678e --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/yum/files/Scientific.6/rpm-gpg/RPM-GPG-KEY-sl4 @@ -0,0 +1,34 @@ +-----BEGIN PGP PUBLIC KEY BLOCK----- +Version: GnuPG v1.4.5 (GNU/Linux) + +mQGiBEpXa1QRBACRt4l3x+38VrBV58HhPrz8iOKDhMVzBODGetPzqmIX0bLz7nz/ +ZYmEPsY0Nhnp77e3cU4YRSUKOM96BZwo8DsJz9sT14b3IozNEo2R7JZNp22RrvU4 +gRXjgQmg5N83tnU03KK/IxrbjdO29Go3vGBWM4tWxUoGLG9kQGhYtZL0MwCgn13c +xYt5JRtxLdfNM/Kxbg4FDTsD/31hBoeMetdNHjuMq+I3SMgnAATkgQ1TZHj8lCV3 +y0qM0zAfVRuPSTVodlJuMjOUKkERAAWqzXiNkgKtIgREBORmz6d9q/bangLr9ygL +fz/4vTxtfdmXxG8Ru/zVF9Ulu1GuLZKlP1PZosZsMQfbByWVOybg38qdyeC93EGd +qmrBBACQeehjanXRjgEROKXkpe2A6w31m0iu2sT42TUvq5neSXjrFTXN8YPd0SpK +8IiCZHkAh3YBCRogfT7T+uWQsrwICCAf00pEAuP9c6BUeepbjQZPK2fqD16lhRn8 +A1TjdngDto45/2T8eIUafh8ONheRuA1Lnb3gV92fUSkQDppw57RbU2NpZW50aWZp +YyBMaW51eCAoUlBNIHNpZ25pbmcga2V5IGZvciBTY2llbnRpZmljIExpbnV4IDQp +IDxzY2llbnRpZmljLWxpbnV4LWRldmVsQGZuYWwuZ292PohgBBMRAgAgBQJKV2tU +AhsDBgsJCAcDAgQVAggDBBYCAwECHgECF4AACgkQ8VzxvJUFci5eswCffepTdZlb +60FSFxWfLGXdr6NLVY0Anj2ILigIHnOQ/Tb0fX4Wok2rObm1iEYEEBECAAYFAkpX +pPwACgkQsLQYPxkqfX27WgCfccR97sqL4klabdAmAkQ0TSXZ+AgAn0FUCu92L9xP +i9td6W7lPh0zdnudiEYEEBECAAYFAkpXqXsACgkQ2mrQCIL9F7LzywCdGT6FQ4ZT +swwxZA63MrLn7ZdN/r4AoLvfdudahfiuiZQtGTYvoR3gzw70uQINBEpXa10QCACr +GeMNUJTtApiwStqIKXGj5BahvI2muQPOF0yr5fqpOwA1SnucTQmwEVtBHRhR+J3V +iOQ8igyMUxOe0F6JCOAbZIx0G5iVs51+wT1LYD2bQkUoObIToGut9r6NlI2selcP +lqx2ckziGVOSU77/7MoGo5GNbWJaNHWCNh6zrA+5hKY46va7hkm0WFFvlZ+U8OCB +aI8BnwB7JZCNdrBgL37oX1qm53BboDaE4aY/73gIvCd3M5bjuqbe666zvQo8xdbL +wiSe8LrHHa7EHxWNFYxv91H56FIP7sbnbiSYKZiOMahnc2hBAa0CAsWhWKDSnqt4 +IN6VOMvqooFllvRXLVgnAAQLCACMm7NhtX0k5AAz3dsXREiQ5hpCS0+djxHTOyAf +aYjB9FTV2WfWQ9G/KTowpQm4nu6IHzFtHWn8mt7/wnxnSIPeykjgAeuzXd/mSBM6 +/FobeXZsb7a6vDZNP4gSGzMAv7xl4QdBWGxQMRED7Lvg1rU70Dh/X2WvRu3a0MBy +xHdTBmpIUIQJ0VV6ikGXvu7DS2skvL7lZxKTHPr0zho6rf9De7GJ6FGCAKfdmgjQ +Gm1i9/pH05UQ4+FD/JyNwEX/CPf8qb6PgtwoJeJ+SPnWZlayYBEB03sK1fD/RIfF +TbRoJz8YRBniC0AwLlUj3n6IdVGrcK8vy2MvVHF//cXLmCroiEgEGBECAAkFAkpX +a10CGwwACgkQ8VzxvJUFci4ylgCY4OS+SEAqiiqz1VBCKq5PxNpzXgCffwtqFgV9 +aFtaKnBEuQRBQ5uz+mA= +=G01V +-----END PGP PUBLIC KEY BLOCK----- diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/yum/files/Scientific.6/rpm-gpg/RPM-GPG-KEY-sl5 b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/yum/files/Scientific.6/rpm-gpg/RPM-GPG-KEY-sl5 new file mode 100644 index 00000000000..1e1c594ae7e --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/yum/files/Scientific.6/rpm-gpg/RPM-GPG-KEY-sl5 @@ -0,0 +1,34 @@ +-----BEGIN PGP PUBLIC KEY BLOCK----- +Version: GnuPG v1.4.5 (GNU/Linux) + +mQGiBEpXa6URBADLDs4W73NK1DOZq0mWfmMwv27uaAS4RZuJJWj6eTmF2YcAdVPr +rsfvBB1GrN5YluqGCN0CBSULtmoxE8AVB/2kGgIZmD7x10+dMXn0cYJrQuTjtf1z +xos1cmdzK7Or0p5dQbuxvlpEseFATGimggBeunwSt5qMpXqN9/1dqksK0wCgi/Tu +JyR3Wsg0NqZrUbr5vEiqHoMEALmYht9n6lCt4j6oYZGZ1DlTwjaAjeJe9qdDlbx7 +fNsfFwV1fqMFc2Bop7UJXfTytVXzDwISsn5YLK2ty1kSuA/7PCt7OkrbchBwm/y0 +5KiGjnC0D+6qdApnwJClWFsu6VqquRiplAJ+6bMw/z+VXVnJztMx09tQ/M9idN// +mJYHA/9989JcHDi0hPlCCYHGs9Bw70H9TvzanKwq5GRlSbEDz9LrrJopJuz788Xu +xg0WXVlduwrEqU2wlq8lY2m6UlkfIya/fs6NkDCJE3bHSMjfovpL6cUFCKedKsas +ODOio6i3ZEcWXz3w4Dv43Mb/z1m8Fe5e6Z0jw5OwEQeWLIHHjbRbU2NpZW50aWZp +YyBMaW51eCAoUlBNIHNpZ25pbmcga2V5IGZvciBTY2llbnRpZmljIExpbnV4IDUp +IDxzY2llbnRpZmljLWxpbnV4LWRldmVsQGZuYWwuZ292PohgBBMRAgAgBQJKV2ul +AhsDBgsJCAcDAgQVAggDBBYCAwECHgECF4AACgkQKHfjrROgotzliQCfdmgSNeDY +fkako6w5P1RgYg+gnoAAnjdtRp8wrrlT7lD1fyZelaX+5GOxiEYEEBECAAYFAkpX +pFMACgkQsLQYPxkqfX1tUACdEsZdXFXMG2nhU4Eema+NQ7dPT3EAn2xH8ARaCHLo +xg/knc9G04Wd0Q6NiEYEEBECAAYFAkpXqYgACgkQ2mrQCIL9F7Ji0gCbBQ6cYMbI +Dd9B+cYFXDrSDqUmkXMAoJAv8rAPO4IfRsVd++gt28/G293TuQINBEpXa6gQCAC3 +VnB5gncnFQSjlu0YXhMQzOlXZ1/UVT262emIACbECDTUoy9U1J4VEecZimIe/BId +uEEBY76i5pmvEV5iWzP3UbCCCUQmpMlFk2LV1jci30/2uTSVXL3yicfrOs74W3rG +4DxN3cHbttEAZJgH0nKAg48APWsKOgrlgzPk63/vzcuymSnXWTiYksslXQ+NYOoV +2Oux9y65K1PjEZoftjorrtcx4E6P0LO5hoowFucfo3VEYpzCjeLogjMmS5Af5GyI ++/5QSQLQ+m0vzppwE8mIt1jsHtEy/0XIdOZTIA10e/I4AvxVoRHbdVY1LjtrkXKN +CGTyaydBe3a4MDoUQWTzAAMGCACW8tORZd0boInktcNWS/szBgAllwPVhFUF4hk7 +pp1rPsiW3h36ARvhvdtNlHHgFPExU4fSinnpMUL0ajx4jEXGg6178WHMFvLUw6ww +Ts1rXaHHagLwemG9iQ1++lLewSkqlKOjVvdV03WOHBwt5GTNe7KCuuM2ko27wSVY +YpbP4A5jEhMkQuWsXPpNu+Oj5uS8XzrIR9McHK0lD9vU2cUUM7OauRo4obygodOa +cwmd0NnRyYf5aPMn4AI795/eWuFK1WYz1Fe7uX7PNcrc2oGEUuqADFNfwtN2HN1V +4dDBHUiPiPydrSml2l4T2NOLI2wVaXIfKdM/6R4agf7lruJliEkEGBECAAkFAkpX +a6gCGwwACgkQKHfjrROgotzpAwCfbLfWIHyWyaWdBRRTixIRs/LFkzYAn3eVy9pL +omk16gZFWxiB8lelViC1 +=ta+t +-----END PGP PUBLIC KEY BLOCK----- diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/yum/files/Scientific.6/rpm-gpg/RPM-GPG-KEY-sl6 b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/yum/files/Scientific.6/rpm-gpg/RPM-GPG-KEY-sl6 new file mode 100644 index 00000000000..70e93822bc9 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/yum/files/Scientific.6/rpm-gpg/RPM-GPG-KEY-sl6 @@ -0,0 +1,34 @@ +-----BEGIN PGP PUBLIC KEY BLOCK----- +Version: GnuPG v1.4.5 (GNU/Linux) + +mQGiBEpXa+QRBADFJtkQOdBsPIElO4SQnri0o6+d1uaaIkclI3uu88Pmy7LkBO4L +y8U7jKS1y4m6I49hpqALM43wq8tm7BYWObd+xlol2mZEgbrxHoFugqfEKAOKxLut +CkCC0wFOK3psQQMSNLokPHYLP6MJL84VsS+molGpUE7EtZZMRaHXyHiU+wCgg5dF +3TD3rYn2PXkiAFlHs6/OficEAK0zmzEdzNfdfWwipf4AQrAEaBO9If7eo5zj6RX9 +bajg0IRgTxpwq6dP+bnnoEtm/v0vZeAGe8zscCX8xIPtDqu7+QbMe89SSdKJXHog +/cC/vOS1+s5TKX2ervZ7pAauyve1xO53eVxsg6oDtTwIqvlQbmi6Vs2I3lplhJj9 +sZZ1A/4oNeWoZlBnxr/0eyHDktW89x0wt0R+jJVksnHJxyg7D+MLmaDZR0Fjg8Wt +EhW8Q5WS0rkk39VaFoA3oR9nfEzAJgymSqNjTEwLsPaqvq6Q5zE+nouYP46cMbcW +PKmST+QZCRMfznam667eKk0+opBIhDy57M2Kerx4EZyMy/0l4LRbU2NpZW50aWZp +YyBMaW51eCAoUlBNIHNpZ25pbmcga2V5IGZvciBTY2llbnRpZmljIExpbnV4IDYp +IDxzY2llbnRpZmljLWxpbnV4LWRldmVsQGZuYWwuZ292PohgBBMRAgAgBQJKV2vk +AhsDBgsJCAcDAgQVAggDBBYCAwECHgECF4AACgkQkV114Jsf01BepACeO7UR33C6 +g4HfHvLVq8zf1SU99y4An1ZOfgrW5iVCEwDc+bWiUu6sbujIiEYEEBECAAYFAkpX +pBIACgkQsLQYPxkqfX0yCACfap7Y7XpjuSr2DXL+ohDbAM+xdOIAnRjegnSEBqHa +Hpi8a7gS69H2hz51iEYEEBECAAYFAkpXqZUACgkQ2mrQCIL9F7IHlgCgr/SqepQ/ +8aXpbQqtwXQho6kDEHIAnRbtNiBRZl4B+fbh6ZsdOr6QHIiOuQINBEpXa+oQCACw +50+Jv6VEVrAL+rRoptmBmHbg8XhNfOPn349GYCtZ9TebCtmU82MEWYF4Eo5vk1JM +P29EBTKfYHBYsD231HavQa4EXVcjYm38i43c0P0sVvO1t5x2EDncthd+Sx3P/36k +mr9pjCA9PFR3zLUA3YxqeipgrfU2NhDh4yvxgHogYjn1Gdqf0TWo2lqYnLjAMbZ0 +y7Mk5G6SfZcSRrZvjZgvXUlmynJXMY766LjyrfasuS4fd2LWFovXOakBb5lR7Z/O +ec1U8CEypQ2iC9ww+Tg0tq+oIJ8g27pJrYsfoCf6HVhsxFOzxf8pjNTilWIB4lMk +ok5+QnQwDVOykeXFDoKXAAMFB/9w1l+PFODmKJFCPqkYj2+0a+rT+76hDVaPJC8E +xcsGf5uJQpOdgqgqMgT1kczMX4CbJ/OIqJVnuFGxoBh2tblwtHvGTwepSTn/yUyd +SbCKmgMr8WafSZUxcRFPql4U2yBvAvdkTCTl+OHv3CrAZxDTV15FoHyPRm/2XU2f +75Y3EutNLrh3TB5aXEveTe1LP+eYDtYTa/nW6A3WqOKWN7wpMBQ9H65mgN9au+g2 +Euh4DtV/myhnyILMYfCPvUAO68MZ4INC/koV0R78HBI4HHVE0Im338fQeS4g30eL ++IPoYGAkRQsZ8pi5JnVdqUK9DuNA+NuEhZmYycC6RCxUaKFmiEkEGBECAAkFAkpX +a+oCGwwACgkQkV114Jsf01C04QCdGkNIVHih/YkT79eykpQ8dUUfGkUAnjV0pyzz +5XK12rKD3j1Z+SNr+Lqs +=EcEL +-----END PGP PUBLIC KEY BLOCK----- diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/yum/files/Scientific.6/rpm-gpg/RPM-GPG-KEY.atrpms b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/yum/files/Scientific.6/rpm-gpg/RPM-GPG-KEY.atrpms new file mode 100644 index 00000000000..860ace4d247 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/yum/files/Scientific.6/rpm-gpg/RPM-GPG-KEY.atrpms @@ -0,0 +1,20 @@ +-----BEGIN PGP PUBLIC KEY BLOCK----- +Version: GnuPG v1.4.6 (GNU/Linux) + +mQGiBD5gtCgRBACKIvjMF+20r9k/Uw2Hq6Y/qn1nM0AZEFalhglXP5pMm5bMgkcI +1vCWqJxSbhQhk8hSEenoszes8hyUxHj4hFFUDiRtAxOpCpGCsCnUddgQtHAQd+tm +aQsM6J3Jm/EZPtwR0lvwvRGvz2x6Rr95G8+42KK9x+mBYhLk0y3gAbBzhwCgnkDH +a97MGBT7gRLrmtFqiHrWlPkD/2tBaH6IEuoJhcAbNj9MukbhDOYJ6ic9Nzf6sR3t +ZG+XgQLLS2DNy8+HWcYJOjpJDEe8zWFDdUv3cL1D0U2f2e85FuJaMucHn+816iw8 +mNjZXJEoDE4LJ8Vv53fkevNZpdWmO2VtRwI+woDnIHYHukDLj2sWhVt+5W+uOKAE +OippA/9OzuWrwBtTR+Np8ApZGkxhxU1z0iEStV+kQNqJE7YoR4SGMuzEa3bFzrPx +k4qIU+rw4YgFgHrs1x08lXxNOZkq6avvbl60HqN2qF2UQL/YdU+5X3ixaJVaYYk8 +yuK+hp0Hx2DdBWmVhq6rEzIfpnFhF4qspwMWEiiBGjYDL62W7LQ0QVRycG1zLm5l +dCAocnBtIHNpZ25pbmcga2V5KSA8QXhlbC5UaGltbUBBVHJwbXMubmV0PohnBBMR +AgAnAhsDBgsJCAcDAgMVAgMDFgIBAh4BAheAAhkBBQJFfF9PBQkJGI4nAAoJEFCM +5eZmU0wrJ0IAnA0BdyRlq2S8ess55R8YMFnWAWXEAJ9Fa7cEHku4j4B83shCODps ++DYUZohnBBMRAgAnAhsDBQkDdMLsBgsJCAcDAgMVAgMDFgIBAh4BAheABQJAKteu +AhkBAAoJEFCM5eZmU0wrMMUAnRjS2PXQp0tsC/69IGMMxqU+8xeAAJ9XQjVAo+mU +kg/3AeBlMBIlFe5hDQ== +=23Fz +-----END PGP PUBLIC KEY BLOCK----- diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/yum/files/Scientific.6/rpm-gpg/RubyWorks.GPG.key b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/yum/files/Scientific.6/rpm-gpg/RubyWorks.GPG.key new file mode 100644 index 00000000000..b91a5a88769 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/yum/files/Scientific.6/rpm-gpg/RubyWorks.GPG.key @@ -0,0 +1,30 @@ +-----BEGIN PGP PUBLIC KEY BLOCK----- +Version: GnuPG v1.2.6 (GNU/Linux) + +mQGiBEY5QQ0RBACfC1NbAdGFMOS/Y7P9hmNph2Wh3TJTh6IZpL+lTJBuZSEa6rp0 +CghS/yU3gGXUPaxAy91M7PXMv5p7S3U/SusZHATLhFdU5J4LuWMf4IiBy9FOB/aj +Q1s5vZ/i3YFaqolXsRP8TgIu4Lzp/j3+KAxFb3gF7lz64J/Et2Jil0OQzwCgkn9i +SoPEM6d9SCFOidhUuTHUhM0D/3UXl/FKPVFrFzjslFpaN9NgArRrmXKTOBWEqMLy +12pbTzOtv+p17Ot51q4h0ebEWrmVJ/h/7Is6QT6AKHuOIW+1/88fcSrmef//0Scz +wtEwVudkYA+kOGt1pwhapVYf1lWE9Z6L3V/MVdxXUesylGO6jJjOjpUB+ZBItwl7 +exkhA/4iemhq4D5Jp6r1Kv3aKSPNENdhTORyfZz4UfyOsUfYncaprP5IZja0j+rd +tQLIsH8hXvCT2kSAUY6nMGmzPgpgGamtHI6gH1ZmoNX2gEF7tzGNgKMbbUmwO89B +N56U7wm68AreXE8XviRjGjAtZWnouqe5X+EiUurdJkzRwU0c2rQpVGhvdWdodFdv +cmtzIDxydWJ5d29ya3NAdGhvdWdodHdvcmtzLmNvbT6IYAQTEQIAIAUCRjlBDQIb +AwYLCQgHAwIEFQIIAwQWAgMBAh4BAheAAAoJEHM/KlUQbeB0SSYAn0sgAx5ZK975 +wZiChkIqOCyFZ9PLAJ9laivkzqT2y+Kh9FGe3TP/CAhRTbkCDQRGOUEVEAgAqxJI +MFrYV3JKyeXHVKXHNd5Nf1WdqKi37VOdSTBftiehzZdR9hxkGEknYxnbBLGJR9YD +/uJ2+DRwNBcw2RrrEmb0DCZxcLQLZ3xYa7+WvcR4/Nir/3858SGJ+wmGCHKyX2So +M2TurmKu5bqyUUaBgf+IhKfwOr9zeK3rIRhUq/aiYkw8sWA8ruUvxXwLnbkK1aP9 +hfvSqScwjkfUVk6CQ6GFUD+4N4mNRtRcZz3gYa+0jSNeEJZQOJxRuE/gBHav3eyN +dm4VAFPF20BobvBVEcMhO0KaR/X4jW1G1eFAKLxI7cdx3+vLeNPaFwHiSMSknsNs +UiucI9oV+I5S/50ZrwADBwf/StYTK9KvPnY9ZqmirBpSh0Zl0xylMtAiMblG7pKv +qKTPNr9zXooheQBpAbnhOfju0DB/OtE4V21HqnbMws2aFvHecEbO5EmjwT7ZTltH +5vlbiPrXOc7SpP22FdkOYdunM2+nsA6398mpYFEiFFNAzX6pReN2tbbmXf6zxS9n +nHjMAgl5nMuOASLZrTrUX/7yu6ySS1hy0ZVfEoAFeILy4MV8y0lVjBQa2kNOCNpO +Cc+y1+4EHLS3fuN0x+tho3rhjKAzj8KOt4XnALn8OouRMx9G7ItC2U8kNzHHFRg5 +adT/+nEthVd9q9pYLrUaze7aMQyl+7cD1KzmSe34X9B6W4hJBBgRAgAJBQJGOUEV +AhsMAAoJEHM/KlUQbeB0O7QAn09h4qrKPhWD9eaiyMRS5YeARTYgAJ9WxLcQEvkA +yOSLb33CweehCrlTnQ== +=scSy +-----END PGP PUBLIC KEY BLOCK----- diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/yum/files/empty/.placeholder b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/yum/files/empty/.placeholder new file mode 100644 index 00000000000..d7c13725067 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/yum/files/empty/.placeholder @@ -0,0 +1 @@ +# Placeholder for git diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/yum/files/rpm-gpg/RPM-GPG-KEY-CentOS-5 b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/yum/files/rpm-gpg/RPM-GPG-KEY-CentOS-5 new file mode 100644 index 00000000000..2627d31d8f6 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/yum/files/rpm-gpg/RPM-GPG-KEY-CentOS-5 @@ -0,0 +1,28 @@ +-----BEGIN PGP PUBLIC KEY BLOCK----- +Version: GnuPG v1.2.6 (GNU/Linux) + +mQGiBEWfB6MRBACrnYW6yKMT+MwJlCIhoyTxGf3mAxmnAiDEy6HcYN8rivssVTJk +CFtQBlBOpLV/OW2YtKrCO2xHn46eNfnMri8FGT8g+9JF3MUVi7kiV1He4iJynHXB ++F2ZqIvHf3IaUj1ys+p8TK64FDFxDQDrGQfIsD/+pkSGx53/877IrvdwjwCguQcr +Ioip5TH0Fj0OLUY4asYVZH8EAIqFHEqsY+9ziP+2R3/FyxSllKkjwcMLrBug+cYO +LYDD6eQXE9Mq8XKGFDj9ZB/0+JzK/XQeStheeFG75q3noq5oCPVFO4czuKErIRAB +qKbDBhaTj3JhOgM12XsUYn+rI6NeMV2ZogoQCC2tWmDETfRpYp2moo53NuFWHbAy +XjETA/sHEeQT9huHzdi/lebNBj0L8nBGfLN1nSRP1GtvagBvkR4RZ6DTQyl0UzOJ +RA3ywWlrL9IV9mrpb1Fmn60l2jTMMCc7J6LacmPK906N+FcN/Docj1M4s/4CNanQ +NhzcFhAFtQL56SNyLTCk1XzhssGZ/jwGnNbU/aaj4wOj0Uef5LRGQ2VudE9TLTUg +S2V5IChDZW50T1MgNSBPZmZpY2lhbCBTaWduaW5nIEtleSkgPGNlbnRvcy01LWtl +eUBjZW50b3Mub3JnPohkBBMRAgAkBQJFnwekAhsDBQkSzAMABgsJCAcDAgMVAgMD +FgIBAh4BAheAAAoJEKikR9zoViiXKlEAmwSoZDvZo+WChcg3s/SpNoWCKhMAAJwI +E2aXpZVrpsQnInUQWwkdrTiL5YhMBBMRAgAMBQJFnwiSBYMSzAIRAAoJEDjCFhY5 +bKCk0hAAn134bIx3wSbq58E6P6U5RT7Z2Zx4AJ9VxnVkoGHkVIgSdsxHUgRjo27N +F7kBDQRFnwezEAQA/HnJ5yiozwgtf6jt+kii8iua+WnjqBKomPHOQ8moxbWdv5Ks +4e1DPhzRqxhshjmub4SuJ93sgMSAF2ayC9t51mSJV33KfzPF2gIahcMqfABe/2hJ +aMzcQZHrGJCEX6ek8l8SFKou7vICzyajRSIK8gxWKBuQknP/9LKsoczV+xsAAwUD +/idXPkk4vRRHsCwc6I23fdI0ur52bzEqHiAIswNfO521YgLk2W1xyCLc2aYjc8Ni +nrMX1tCnEx0/gK7ICyJoWH1Vc7//79sWFtX2EaTO+Q07xjFX4E66WxJlCo9lOjos +Vk5qc7R+xzLDoLGFtbzaTRQFzf6yr7QTu+BebWLoPwNTiE8EGBECAA8FAkWfB7MC +GwwFCRLMAwAACgkQqKRH3OhWKJfvvACfbsF1WK193zM7vSc4uq51XsceLwgAoI0/ +9GxdNhGQEAweSlQfhPa3yYXH +=o/Mx +-----END PGP PUBLIC KEY BLOCK----- + diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/yum/files/rpm-gpg/RPM-GPG-KEY-CentOS-6 b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/yum/files/rpm-gpg/RPM-GPG-KEY-CentOS-6 new file mode 100644 index 00000000000..bd863d8e212 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/yum/files/rpm-gpg/RPM-GPG-KEY-CentOS-6 @@ -0,0 +1,30 @@ +-----BEGIN PGP PUBLIC KEY BLOCK----- +Version: GnuPG v1.4.5 (GNU/Linux) + +mQINBE4P06MBEACqn48FZgYkG2QrtUAVDV58H6LpDYEcTcv4CIFSkgs6dJ9TavCW +NyPBZRpM2R+Rg5eVqlborp7TmktBP/sSsxc8eJ+3P2aQWSWc5ol74Y0OznJUCrBr +bIdypJllsD9Fe+h7gLBXTh3vdBEWr2lR+xA+Oou8UlO2gFbVFQqMafUgU1s0vqaE +/hHH0TzwD0/tJ6eqIbHwVR/Bu6kHFK4PwePovhfvyYD9Y+C0vOYd5Ict2vbLHz1f +QBDZObv4M6KN3j7nzme47hKtdMd+LwFqxM5cXfM6b5doDulWPmuGV78VoX6OR7el +x1tlfpuiFeuXYnImm5nTawArcQ1UkXUSYcTUKShJebRDLR3BycxR39Q9jtbOQ29R +FumHginovEhdUcinRr22eRXgcmzpR00zFIWoFCwHh/OCtG14nFhefuZ8Z80qbVhW +2J9+/O4tksv9HtQBmQNOK5S8C4HNF2M8AfOWNTr8esFSDc0YA5/cxzdfOOtWam/w +lBpNcUUSSgddRsBwijPuWhVA3NmA/uQlJtAo4Ji5vo8cj5MTPG3+U+rfNqRxu1Yc +ioXRo4LzggPscaTZX6V24n0fzw0J2k7TT4sX007k+7YXwEMqmHpcMYbDNzdCzUer +Zilh5hihJwvGfdi234W3GofttoO+jaAZjic7a3p6cO1ICMgfVqrbZCUQVQARAQAB +tEZDZW50T1MtNiBLZXkgKENlbnRPUyA2IE9mZmljaWFsIFNpZ25pbmcgS2V5KSA8 +Y2VudG9zLTYta2V5QGNlbnRvcy5vcmc+iQI8BBMBAgAmBQJOD9OjAhsDBQkSzAMA +BgsJCAcDAgQVAggDBBYCAwECHgECF4AACgkQCUb8osEFud6ajRAAnb6d+w6Y/v/d +MSy7UEy4rNquArix8xhqBwwjoGXpa37OqTvvcJrftZ1XgtzmTbkqXc+9EFch0C+w +ST10f+H0SPTUGuPwqLkg27snUkDAv1B8laub+l2L9erzCaRriH8MnFyxt5v1rqWA +mVlRymzgXK+EQDr+XOgMm1CvxVY3OwdjdoHNox4TdVQWlZl83xdLXBxkd5IRciNm +sg5fJAzAMeg8YsoDee3m4khg9gEm+/Rj5io8Gfk0nhQpgGGeS1HEXl5jzTb44zQW +qudkfcLEdUMOECbu7IC5Z1wrcj559qcp9C94IwQQO+LxLwg4kHffvZjCaOXDRiya +h8KGsEDuiqwjU9HgGq9fa0Ceo3OyUazUi+WnOxBLVIQ8cUZJJ2Ia5PDnEsz59kCp +JmBZaYPxUEteMtG3yDTa8c8jUnJtMPpkwpSkeMBeNr/rEH4YcBoxuFjppHzQpJ7G +hZRbOfY8w97TgJbfDElwTX0/xX9ypsmBezgGoOvOkzP9iCy9YUBc9q/SNnflRWPO +sMVrjec0vc6ffthu2xBdigBXhL7x2bphWzTXf2T067k+JOdoh5EGney6LhQzcp8m +YCTENStCR+L/5XwrvNgRBnoXe4e0ZHet1CcCuBCBvSmsPHp5ml21ahsephnHx+rl +JNGtzulnNP07RyfzQcpCNFH7W4lXzqM= +=jrWY +-----END PGP PUBLIC KEY BLOCK----- diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/yum/files/rpm-gpg/RPM-GPG-KEY-EPEL b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/yum/files/rpm-gpg/RPM-GPG-KEY-EPEL new file mode 100644 index 00000000000..5a13bb4f9f9 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/yum/files/rpm-gpg/RPM-GPG-KEY-EPEL @@ -0,0 +1,30 @@ +-----BEGIN PGP PUBLIC KEY BLOCK----- +Version: GnuPG v1.2.6 (GNU/Linux) + +mQGiBEXopTIRBACZDBMOoFOakAjaxw1LXjeSvh/kmE35fU1rXfM7T0AV31NATCLF +l5CQiNDA4oWreDThg2Bf6+LIVTsGQb1V+XXuLak4Em5yTYwMTVB//4/nMxQEbpl/ +QB2XwlJ7EQ0vW+kiPDz/7pHJz1p1jADzd9sQQicMtzysS4qT2i5A23j0VwCg1PB/ +lpYqo0ZhWTrevxKMa1n34FcD/REavj0hSLQFTaKNLHRotRTF8V0BajjSaTkUT4uk +/RTaZ8Kr1mTosVtosqmdIAA2XHxi8ZLiVPPSezJjfElsSqOAxEKPL0djfpp2wrTm +l/1iVnX+PZH5DRKCbjdCMLDJhYap7YUhcPsMGSeUKrwmBCBJUPc6DhjFvyhA9IMl +1T0+A/9SKTv94ToP/JYoCTHTgnG5MoVNafisfe0wojP2mWU4gRk8X4dNGKMj6lic +vM6gne3hESyjcqZSmr7yELPPGhI9MNauJ6Ob8cTR2T12Fmv9w03DD3MnBstR6vhP +QcqZKhc5SJYYY7oVfxlSOfF4xfwcHQKoD5TOKwIAQ6T8jyFpKbQkRmVkb3JhIEVQ +RUwgPGVwZWxAZmVkb3JhcHJvamVjdC5vcmc+iGQEExECACQFAkXopTICGwMFCRLM +AwAGCwkIBwMCAxUCAwMWAgECHgECF4AACgkQEZzANiF1IfabmQCgzvE60MnHSOBa +ZXXF7uU2Vzu8EOkAoKg9h+j0NuNom6WUYZyJQt4zc5seuQINBEXopTYQCADapnR/ +blrJ8FhlgNPl0X9S3JE/kygPbNXIqne4XBVYisVp0uzNCRUxNZq30MpY027JCs2J +nL2fMpwvx33f0phU029vrIZKA3CmnnwVsjcWfMJOVPBmVN7m5bGU68F+PdRIcDsl +PMOWRLkTBZOGolLgIbM4719fqA8etewILrX6uPvRDwywV7/sPCFpRcfNNBUY+Zx3 +5bf4fnkaCKxgXgQS3AT+hGYhlzIqQVTkGNveHTnt4SSzgAqR9sSwQwqvEfVtYNeS +w5rDguLG41HQm1Hojv59HNYjH6F/S1rClZi21bLgZbKpCFX76qPt8CTw+iQLBPPd +yoOGHfzyp7nsfhUrAAMFB/9/H9Gpk822ZpBexQW4y3LGFo9ZSnmu+ueOZPU3SqDA +DW1ovZdYzGuJTGGM9oMl6bL8eZrcUBBOFaWge5wZczIE3hx2exEOkDdvq+MUDVD1 +axmN45q/7h1NYRp5GQL2ZsoV4g9U2gMdzHOFtZCER6PP9ErVlfJpgBUCdSL93V4H +Sgpkk7znmTOklbCM6l/G/A6q4sCRqfzHwVSTiruyTBiU9lfROsAl8fjIq2OzWJ2T +P9sadBe1llUYaow7txYSUxssW+89avct35gIyrBbof5M+CBXyAOUaSWmpM2eub24 +0qbqiSr/Y6Om0t6vSzR8gRk7g+1H6IE0Tt1IJCvCAMimiE8EGBECAA8FAkXopTYC +GwwFCRLMAwAACgkQEZzANiF1IfZQYgCgiZHCv4xb+sTHCn/otc1Ovvi/OgMAnRXY +bbsLFWOfmzAnNIGvFRWy+YHi +=MMNL +-----END PGP PUBLIC KEY BLOCK----- diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/yum/files/rpm-gpg/RPM-GPG-KEY-EPEL-4 b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/yum/files/rpm-gpg/RPM-GPG-KEY-EPEL-4 new file mode 100644 index 00000000000..5a13bb4f9f9 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/yum/files/rpm-gpg/RPM-GPG-KEY-EPEL-4 @@ -0,0 +1,30 @@ +-----BEGIN PGP PUBLIC KEY BLOCK----- +Version: GnuPG v1.2.6 (GNU/Linux) + +mQGiBEXopTIRBACZDBMOoFOakAjaxw1LXjeSvh/kmE35fU1rXfM7T0AV31NATCLF +l5CQiNDA4oWreDThg2Bf6+LIVTsGQb1V+XXuLak4Em5yTYwMTVB//4/nMxQEbpl/ +QB2XwlJ7EQ0vW+kiPDz/7pHJz1p1jADzd9sQQicMtzysS4qT2i5A23j0VwCg1PB/ +lpYqo0ZhWTrevxKMa1n34FcD/REavj0hSLQFTaKNLHRotRTF8V0BajjSaTkUT4uk +/RTaZ8Kr1mTosVtosqmdIAA2XHxi8ZLiVPPSezJjfElsSqOAxEKPL0djfpp2wrTm +l/1iVnX+PZH5DRKCbjdCMLDJhYap7YUhcPsMGSeUKrwmBCBJUPc6DhjFvyhA9IMl +1T0+A/9SKTv94ToP/JYoCTHTgnG5MoVNafisfe0wojP2mWU4gRk8X4dNGKMj6lic +vM6gne3hESyjcqZSmr7yELPPGhI9MNauJ6Ob8cTR2T12Fmv9w03DD3MnBstR6vhP +QcqZKhc5SJYYY7oVfxlSOfF4xfwcHQKoD5TOKwIAQ6T8jyFpKbQkRmVkb3JhIEVQ +RUwgPGVwZWxAZmVkb3JhcHJvamVjdC5vcmc+iGQEExECACQFAkXopTICGwMFCRLM +AwAGCwkIBwMCAxUCAwMWAgECHgECF4AACgkQEZzANiF1IfabmQCgzvE60MnHSOBa +ZXXF7uU2Vzu8EOkAoKg9h+j0NuNom6WUYZyJQt4zc5seuQINBEXopTYQCADapnR/ +blrJ8FhlgNPl0X9S3JE/kygPbNXIqne4XBVYisVp0uzNCRUxNZq30MpY027JCs2J +nL2fMpwvx33f0phU029vrIZKA3CmnnwVsjcWfMJOVPBmVN7m5bGU68F+PdRIcDsl +PMOWRLkTBZOGolLgIbM4719fqA8etewILrX6uPvRDwywV7/sPCFpRcfNNBUY+Zx3 +5bf4fnkaCKxgXgQS3AT+hGYhlzIqQVTkGNveHTnt4SSzgAqR9sSwQwqvEfVtYNeS +w5rDguLG41HQm1Hojv59HNYjH6F/S1rClZi21bLgZbKpCFX76qPt8CTw+iQLBPPd +yoOGHfzyp7nsfhUrAAMFB/9/H9Gpk822ZpBexQW4y3LGFo9ZSnmu+ueOZPU3SqDA +DW1ovZdYzGuJTGGM9oMl6bL8eZrcUBBOFaWge5wZczIE3hx2exEOkDdvq+MUDVD1 +axmN45q/7h1NYRp5GQL2ZsoV4g9U2gMdzHOFtZCER6PP9ErVlfJpgBUCdSL93V4H +Sgpkk7znmTOklbCM6l/G/A6q4sCRqfzHwVSTiruyTBiU9lfROsAl8fjIq2OzWJ2T +P9sadBe1llUYaow7txYSUxssW+89avct35gIyrBbof5M+CBXyAOUaSWmpM2eub24 +0qbqiSr/Y6Om0t6vSzR8gRk7g+1H6IE0Tt1IJCvCAMimiE8EGBECAA8FAkXopTYC +GwwFCRLMAwAACgkQEZzANiF1IfZQYgCgiZHCv4xb+sTHCn/otc1Ovvi/OgMAnRXY +bbsLFWOfmzAnNIGvFRWy+YHi +=MMNL +-----END PGP PUBLIC KEY BLOCK----- diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/yum/files/rpm-gpg/RPM-GPG-KEY-EPEL-5 b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/yum/files/rpm-gpg/RPM-GPG-KEY-EPEL-5 new file mode 100644 index 00000000000..5a13bb4f9f9 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/yum/files/rpm-gpg/RPM-GPG-KEY-EPEL-5 @@ -0,0 +1,30 @@ +-----BEGIN PGP PUBLIC KEY BLOCK----- +Version: GnuPG v1.2.6 (GNU/Linux) + +mQGiBEXopTIRBACZDBMOoFOakAjaxw1LXjeSvh/kmE35fU1rXfM7T0AV31NATCLF +l5CQiNDA4oWreDThg2Bf6+LIVTsGQb1V+XXuLak4Em5yTYwMTVB//4/nMxQEbpl/ +QB2XwlJ7EQ0vW+kiPDz/7pHJz1p1jADzd9sQQicMtzysS4qT2i5A23j0VwCg1PB/ +lpYqo0ZhWTrevxKMa1n34FcD/REavj0hSLQFTaKNLHRotRTF8V0BajjSaTkUT4uk +/RTaZ8Kr1mTosVtosqmdIAA2XHxi8ZLiVPPSezJjfElsSqOAxEKPL0djfpp2wrTm +l/1iVnX+PZH5DRKCbjdCMLDJhYap7YUhcPsMGSeUKrwmBCBJUPc6DhjFvyhA9IMl +1T0+A/9SKTv94ToP/JYoCTHTgnG5MoVNafisfe0wojP2mWU4gRk8X4dNGKMj6lic +vM6gne3hESyjcqZSmr7yELPPGhI9MNauJ6Ob8cTR2T12Fmv9w03DD3MnBstR6vhP +QcqZKhc5SJYYY7oVfxlSOfF4xfwcHQKoD5TOKwIAQ6T8jyFpKbQkRmVkb3JhIEVQ +RUwgPGVwZWxAZmVkb3JhcHJvamVjdC5vcmc+iGQEExECACQFAkXopTICGwMFCRLM +AwAGCwkIBwMCAxUCAwMWAgECHgECF4AACgkQEZzANiF1IfabmQCgzvE60MnHSOBa +ZXXF7uU2Vzu8EOkAoKg9h+j0NuNom6WUYZyJQt4zc5seuQINBEXopTYQCADapnR/ +blrJ8FhlgNPl0X9S3JE/kygPbNXIqne4XBVYisVp0uzNCRUxNZq30MpY027JCs2J +nL2fMpwvx33f0phU029vrIZKA3CmnnwVsjcWfMJOVPBmVN7m5bGU68F+PdRIcDsl +PMOWRLkTBZOGolLgIbM4719fqA8etewILrX6uPvRDwywV7/sPCFpRcfNNBUY+Zx3 +5bf4fnkaCKxgXgQS3AT+hGYhlzIqQVTkGNveHTnt4SSzgAqR9sSwQwqvEfVtYNeS +w5rDguLG41HQm1Hojv59HNYjH6F/S1rClZi21bLgZbKpCFX76qPt8CTw+iQLBPPd +yoOGHfzyp7nsfhUrAAMFB/9/H9Gpk822ZpBexQW4y3LGFo9ZSnmu+ueOZPU3SqDA +DW1ovZdYzGuJTGGM9oMl6bL8eZrcUBBOFaWge5wZczIE3hx2exEOkDdvq+MUDVD1 +axmN45q/7h1NYRp5GQL2ZsoV4g9U2gMdzHOFtZCER6PP9ErVlfJpgBUCdSL93V4H +Sgpkk7znmTOklbCM6l/G/A6q4sCRqfzHwVSTiruyTBiU9lfROsAl8fjIq2OzWJ2T +P9sadBe1llUYaow7txYSUxssW+89avct35gIyrBbof5M+CBXyAOUaSWmpM2eub24 +0qbqiSr/Y6Om0t6vSzR8gRk7g+1H6IE0Tt1IJCvCAMimiE8EGBECAA8FAkXopTYC +GwwFCRLMAwAACgkQEZzANiF1IfZQYgCgiZHCv4xb+sTHCn/otc1Ovvi/OgMAnRXY +bbsLFWOfmzAnNIGvFRWy+YHi +=MMNL +-----END PGP PUBLIC KEY BLOCK----- diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/yum/files/rpm-gpg/RPM-GPG-KEY-EPEL-6 b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/yum/files/rpm-gpg/RPM-GPG-KEY-EPEL-6 new file mode 100644 index 00000000000..7a2030489d2 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/yum/files/rpm-gpg/RPM-GPG-KEY-EPEL-6 @@ -0,0 +1,29 @@ +-----BEGIN PGP PUBLIC KEY BLOCK----- +Version: GnuPG v1.4.5 (GNU/Linux) + +mQINBEvSKUIBEADLGnUj24ZVKW7liFN/JA5CgtzlNnKs7sBg7fVbNWryiE3URbn1 +JXvrdwHtkKyY96/ifZ1Ld3lE2gOF61bGZ2CWwJNee76Sp9Z+isP8RQXbG5jwj/4B +M9HK7phktqFVJ8VbY2jfTjcfxRvGM8YBwXF8hx0CDZURAjvf1xRSQJ7iAo58qcHn +XtxOAvQmAbR9z6Q/h/D+Y/PhoIJp1OV4VNHCbCs9M7HUVBpgC53PDcTUQuwcgeY6 +pQgo9eT1eLNSZVrJ5Bctivl1UcD6P6CIGkkeT2gNhqindRPngUXGXW7Qzoefe+fV +QqJSm7Tq2q9oqVZ46J964waCRItRySpuW5dxZO34WM6wsw2BP2MlACbH4l3luqtp +Xo3Bvfnk+HAFH3HcMuwdaulxv7zYKXCfNoSfgrpEfo2Ex4Im/I3WdtwME/Gbnwdq +3VJzgAxLVFhczDHwNkjmIdPAlNJ9/ixRjip4dgZtW8VcBCrNoL+LhDrIfjvnLdRu +vBHy9P3sCF7FZycaHlMWP6RiLtHnEMGcbZ8QpQHi2dReU1wyr9QgguGU+jqSXYar +1yEcsdRGasppNIZ8+Qawbm/a4doT10TEtPArhSoHlwbvqTDYjtfV92lC/2iwgO6g +YgG9XrO4V8dV39Ffm7oLFfvTbg5mv4Q/E6AWo/gkjmtxkculbyAvjFtYAQARAQAB +tCFFUEVMICg2KSA8ZXBlbEBmZWRvcmFwcm9qZWN0Lm9yZz6JAjYEEwECACAFAkvS +KUICGw8GCwkIBwMCBBUCCAMEFgIDAQIeAQIXgAAKCRA7Sd8qBgi4lR/GD/wLGPv9 +qO39eyb9NlrwfKdUEo1tHxKdrhNz+XYrO4yVDTBZRPSuvL2yaoeSIhQOKhNPfEgT +9mdsbsgcfmoHxmGVcn+lbheWsSvcgrXuz0gLt8TGGKGGROAoLXpuUsb1HNtKEOwP +Q4z1uQ2nOz5hLRyDOV0I2LwYV8BjGIjBKUMFEUxFTsL7XOZkrAg/WbTH2PW3hrfS +WtcRA7EYonI3B80d39ffws7SmyKbS5PmZjqOPuTvV2F0tMhKIhncBwoojWZPExft +HpKhzKVh8fdDO/3P1y1Fk3Cin8UbCO9MWMFNR27fVzCANlEPljsHA+3Ez4F7uboF +p0OOEov4Yyi4BEbgqZnthTG4ub9nyiupIZ3ckPHr3nVcDUGcL6lQD/nkmNVIeLYP +x1uHPOSlWfuojAYgzRH6LL7Idg4FHHBA0to7FW8dQXFIOyNiJFAOT2j8P5+tVdq8 +wB0PDSH8yRpn4HdJ9RYquau4OkjluxOWf0uRaS//SUcCZh+1/KBEOmcvBHYRZA5J +l/nakCgxGb2paQOzqqpOcHKvlyLuzO5uybMXaipLExTGJXBlXrbbASfXa/yGYSAG +iVrGz9CE6676dMlm8F+s3XXE13QZrXmjloc6jwOljnfAkjTGXjiB7OULESed96MR +XtfLk0W5Ab9pd7tKDR6QHI7rgHXfCopRnZ2VVQ== +=V/6I +-----END PGP PUBLIC KEY BLOCK----- diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/yum/files/rpm-gpg/RPM-GPG-KEY-PGDG b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/yum/files/rpm-gpg/RPM-GPG-KEY-PGDG new file mode 100644 index 00000000000..8722c21cbd6 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/yum/files/rpm-gpg/RPM-GPG-KEY-PGDG @@ -0,0 +1,31 @@ +-----BEGIN PGP PUBLIC KEY BLOCK----- +Version: GnuPG v1.4.7 (GNU/Linux) + +mQGiBEeD8koRBACC1VBRsUwGr9gxFFRho9kZpdRUjBJoPhkeOTvp9LzkdAQMFngr +BFi6N0ov1kCX7LLwBmDG+JPR7N+XcH9YR1coSHpLVg+JNy2kFDd4zAyWxJafjZ3a +9zFg9Yx+0va1BJ2t4zVcmKS4aOfbgQ5KwIOWUujalQW5Y+Fw39Gn86qjbwCg5dIo +tkM0l19h2sx50D027pV5aPsD/2c9pfcFTbMhB0CcKS836GH1qY+NCAdUwPs646ee +Ex/k9Uy4qMwhl3HuCGGGa+N6Plyon7V0TzZuRGp/1742dE8IO+I/KLy2L1d1Fxrn +XOTBZd8qe6nBwh12OMcKrsPBVBxn+iSkaG3ULsgOtx+HHLfa1/p22L5+GzGdxizr +peBuA/90cCp+lYcEwdYaRoFVR501yDOTmmzBc1DrsyWP79QMEGzMqa393G0VnqXt +L4pGmunq66Agw2EhPcIt3pDYiCmEt/obdVtSJH6BtmSDB/zYhbE8u3vLP3jfFDa9 +KXxgtYj0NvuUVoRmxSKm8jtfmj1L7zoKNz3jl+Ba3L0WxIv4+bRBUG9zdGdyZVNR +TCBSUE0gQnVpbGRpbmcgUHJvamVjdCA8cGdzcWxycG1zLWhhY2tlcnNAcGdmb3Vu +ZHJ5Lm9yZz6IYAQTEQIAIAUCR4PySgIbIwYLCQgHAwIEFQIIAwQWAgMBAh4BAheA +AAoJEB8W0uFELfD4jnkAoMqd6ZwwsgYHZ3hP9vt+DJt1uDW7AKDbRwP8ESKFhwdJ +8m91RPBeJW/tMLkCDQRHg/JKEAgA64+ZXgcERPYfZYo4p+yMTJAAa9aqnE3U4Ni6 +ZMB57GPuEy8NfbNya+HiftO8hoozmJdcI6XFyRBCDUVCdZ8SE+PJdOx2FFqZVIu6 +dKnr8ykhgLpNNEFDG3boK9UfLj/5lYQ3Y550Iym1QKOgyrJYeAp6sZ+Nx2PavsP3 +nMFCSD67BqAbcLCVQN7a2dAUXfEbfXJjPHXTbo1/kxtzE+KCRTLdXEbSEe3nHO04 +K/EgTBjeBUOxnciH5RylJ2oGy/v4xr9ed7R1jJtshsDKMdWApwoLlCBJ63jg/4T/ +z/OtXmu4AvmWaJxaTl7fPf2GqSqqb6jLCrQAH7AIhXr9V0zPZwADBQgAlpptNQHl +u7euIdIujFwwcxyQGfee6BG+3zaNSEHMVQMuc6bxuvYmgM9r7aki/b0YMfjJBk8v +OJ3Eh1vDH/woJi2iJ13vQ21ot+1JP3fMd6NPR8/qEeDnmVXu7QAtlkmSKI9Rdnjz +FFSUJrQPHnKsH4V4uvAM+njwYD+VFiwlBPTKNeL8cdBb4tPN2cdVJzoAp57wkZAN +VA2tKxNsTJKBi8wukaLWX8+yPHiWCNWItvyB4WCEp/rZKG4A868NM5sZQMAabpLd +l4fTiGu68OYgK9qUPZvhEAL2C1jPDVHPkLm+ZsD+90Pe66w9vB00cxXuHLzm8Pad +GaCXCY8h3xi6VIhJBBgRAgAJBQJHg/JKAhsMAAoJEB8W0uFELfD4K4cAoJ4yug8y +1U0cZEiF5W25HDzMTtaDAKCaM1m3Cbd+AZ0NGWNg/VvIX9MsPA== +=au6K +-----END PGP PUBLIC KEY BLOCK----- + diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/yum/files/rpm-gpg/RPM-GPG-KEY-RBEL b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/yum/files/rpm-gpg/RPM-GPG-KEY-RBEL new file mode 100644 index 00000000000..152fd799008 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/yum/files/rpm-gpg/RPM-GPG-KEY-RBEL @@ -0,0 +1,36 @@ +-----BEGIN PGP PUBLIC KEY BLOCK----- +Version: GnuPG v2.0.14 (GNU/Linux) + +mQGiBEZ6qawRBAC2gDuA1sZioGh1VP/U0l+9RmzOdkWBGB3NfWqezAwt1Up+cP5o +h+UNkghOKbJVQ/zLyY/edYOppQ78yxT1X/J1RHNhs5bjqzWlQxMbT5/tt1N4PExu +gvO38RGFTV0DqIy3lQw5YIwp2le+G8MktYh2NKI4lG0AJoXZicNlI7+mEwCgmfw+ +CnsB/kb/xUD1dq6Mo3dYXVcEAKSFfqt+6jvJNxcIYfpQqjEslQsQmPKpXzK9CPyV +UCjUEOirbhPxV86u3Ge/yuy5USMvTTs+ztImabbH6UHBEP+tEw3LiuPUpfh+nEna +3Hz+U81PvUwGEwUMzCr+OemBXqGW7jl66NqKqm8YM3Pkvc4NlS/7slky9A/s6i8S +hToWA/9kP55aSbIXte5TbC88lx6YuLx7qW541ni38DmJfPN5hHywLGnM82MMQMbk +hg1v49+7TTNv44LJpGT7t8gsW9F4Z4rWoChhsldypeeqbDOIv4kFiXt/8122Ud9J +nE67CR9XUuS5Jp+gP6xxNr9/vbvqsOGMJAQkVgkBPVuKYv25gLQ3U2VyZ2lvIFJ1 +YmlvIChGcmFtZU9TIERldmVsb3BlcnMpIDxydWJpb2pyQGZyYW1lb3Mub3JnPohr +BBMRAgArAhsDBQkGE0x0BgsJCAcDAgYVCAIJCgsEFgIDAQIeAQIXgAUCTBs76AIZ +AQAKCRCOw9dP80W+dFhjAJ0dKy761iPcG+ALwEAuAgxDpUVBzgCdFxGCAZ7ELYvf +3uFc0Ou2ihDzvyy0IFNlcmdpbyBSdWJpbyA8c2VyZ2lvQHJ1YmlvLm5hbWU+iGYE +ExECACYCGwMGCwkIBwMCBBUCCAMEFgIDAQIeAQIXgAUJBhNMdAUCTBs7XgAKCRCO +w9dP80W+dDdtAJ9NYoW1ChfMyES7nQUlesEQ4aWXjQCeIoGxoOuIGyg6+AKr/2Wr +6fE1zt2IaQQTEQIAKQIbAwYLCQgHAwIEFQIIAwQWAgMBAh4BAheAAhkBBQJIHsGo +BQkCuHFEAAoJEI7D10/zRb50KjgAnRTzzNIODKqrHnrHaUG8dWDCwmYjAJ48Hbcn +ZC6E8LGTeM8vPN0mMI9ijLkCDQRGeqm2EAgAh720kjA9bNDms+6agb6CirD9RkmZ +3G+OHd5iia3KbaUiBtC3PECg4UE8N54JuBNKdjgJQfdYSg2J0EZHyhZHdAVWjykE +tj/IKZKnAfUqKh44uT9OUPW8PChPo/gioLn+DexSAW7n19h7VIa1P3shYqYR/gz8 +zgfrXkFFpkpKnOLsXuF20JEEBIBdwrfYRJIBrUTYrfS/2GKLJjyutENkb9uI3JgQ +LfR6DckTaar4eeArjgvOxZRHiU0vRezetlbG8ZM9mSYrcMM3Xa5vLpFlDj6vYzat +RWEuZUfLgXWUVoVyFiNVXhpff/w7/bAb3WpXqjZd6sK8CCJJPNtnbLE7CwADBQf9 +EQjT9iiEZis35V9HqeLsxXVjPOGNuLiwjIpacI7CM3aGV1q7NXiCE4oWS/PvpHmu +W+XdXMPH4Bt2VmjZSarlAipTeNnOuiEXipUFIjAlNn1xNVRRd7T35zIvXLtmNtUe +nN1/mqZljKPbCbW1AgktH417t/vJfTnRWr9IgS3Am+o4q200i+1FjrQ/UI3s9+vg +5B+KASFP6HspNttl0kwzQ6SFIHAebd4DKHOj6ShxXPNl18W4R8qPqayrAFqdkgMJ +Jn8j2E8rmGYnssSfjck2kLtvNdTEAMjFnhg+oUapUzJAVeterudiWZFNrtn9ewnf +8SUiiYJlxb+nz545zo0gQIhJBBgRAgAJBQJGeqm2AhsMAAoJEI7D10/zRb50PJEA +mwTA+Sp3wvzwDr8sk7W7U4bBfw26AKCVoYw3mfTime+j3mFk1yk1yxjE2Q== +=iyOs +-----END PGP PUBLIC KEY BLOCK----- + diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/yum/files/rpm-gpg/RPM-GPG-KEY-beta b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/yum/files/rpm-gpg/RPM-GPG-KEY-beta new file mode 100644 index 00000000000..b86da239064 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/yum/files/rpm-gpg/RPM-GPG-KEY-beta @@ -0,0 +1,28 @@ +-----BEGIN PGP PUBLIC KEY BLOCK----- +Version: GnuPG v1.2.6 (GNU/Linux) + +mQGiBEWfBuERBACrwDH+6QvpyaOgzhXiemsIX+q4HlhX/HDmrmZOUd7i9VmZNogP +6LRRiTygn2+UphaGV3NDA36ZB/1JRpgvgpzbpZNeAoFvsljIbxGIwkH2JgRF6oNo +eGB3QYzDQJvYVIejk79M0ed3oor4w8OiNVcdxLyVIthFrjrrCqwRP3bLZwCgtY9t +Ezf5WL63Ue45vdht7A2GH+0D/iNAnWKsU7FUMFZrcwMaMbyP7YG8z0+zXUOgtgyP +tbgJG5yikNT3vJypb42gbKfcriUUDC5AeiRmkR8QPvYuOm34rM90+wx2LGqXWnHM +IyLAyl8TS3MQmePem8bfTGTNYxtt3Q7iadez2WYTLBSlmM6hbxZfdwm1hhyM0AJU +YyFUA/9kHH+CUBxKb1UgG7TSp53Po/5p/Yyuty+RJ7zIGv6SiN/JK4/ntWfm5WS5 +ZprSdE5ODoFQ/Gs3/VB/eolg2fBW1DcftH6lKHT3GKEOaicGX+T9eOMerZZedm5U +vDA9mFvWnOdOxK8LuRgVqip4jCnWICchpatmdP0whJQHQ6MGLLRMQ2VudE9TLTUg +QmV0YSBLZXkgKENlbnRPUyA1IEJldGEgU2lnbmluZyBLZXkpIDxjZW50b3MtNS1i +ZXRhLWtleUBjZW50b3Mub3JnPohkBBMRAgAkBQJFnwbhAhsDBQkSzAMABgsJCAcD +AgMVAgMDFgIBAh4BAheAAAoJEM/aaIEJLXsrWDkAoKcqa+AAdAWvp5qlJkGQiRy8 +aNFDAJ4qRfIxMiLinmjbqcuygWMp61wY5ohMBBMRAgAMBQJFnwhtBYMSzAF0AAoJ +EDjCFhY5bKCkG/wAn14LDlJqjZv1Wz0WNfhr80+qJrf6AKCaIZExwo4ApQpESk/F +SApLd/pEILkBDQRFnwbrEAQAwKzjI2aTB/sS9HuQ4CHCwrj4vr0HxMMwQikYBIvy +MYTtek04KDTKoJL5g3411DsfDW9VRGJdFCHvldgam/5UVfO6nywLkdwAA5TQA5dv +8YE8jTtwdy5Y1QKFc8LaIBZK0+ZbhEvdNfv67egvfcxZc5PvpBZ3C03n+iQ3wPcg +PhcAAwUD/iYkq4LG/je43Qa5rTz5kF5rIiX7Bk5vXT7XSFOFKwHy8V+PGEoVM1W8 ++EHIlmTycwIlsVp3by6qCDkMYu4V6VukxZNzJyeoMICiYIXUPh6NKHRoqaYlu6ZO +eFN1TQNXmodPk+iNtdbcby/zAklNqoO/dWSwd8NAo8s6WAHq3VPpiE8EGBECAA8F +AkWfBusCGwwFCRLMAwAACgkQz9pogQkteysXkACgoraCU0EBC+W8TuxrsePO20ma +D0IAoLRRQLTEXL0p3K0WE+LfyTr9EVG5 +=mH0S +-----END PGP PUBLIC KEY BLOCK----- + diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/yum/files/rpm-gpg/RPM-GPG-KEY-elrepo.org b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/yum/files/rpm-gpg/RPM-GPG-KEY-elrepo.org new file mode 100644 index 00000000000..fe0c0822752 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/yum/files/rpm-gpg/RPM-GPG-KEY-elrepo.org @@ -0,0 +1,30 @@ +-----BEGIN PGP PUBLIC KEY BLOCK----- +Version: GnuPG v1.4.5 (GNU/Linux) + +mQGiBEm+/6QRBAC5mbtqOFSQ0FkTLIMdIoqxtraIeUqwbPp3IBYQ/u/EREjyEf1D +qFyBEXII0dD8JDT85vRZ81jhB7nFWa0VbUfY0xfghkbnokiNBVNpiQcvszw3UYDF +aLAaOC8Z98vmlsQaBBTQG6704ZXLr7FJyG3GP5WE6egXIQQbrMcdmCoRBwCg/dwC +HLWjuemoDc5SX7hKHbB4zZ8D/jP+oMbqz+bDn8OZ2UuaGdxr+mHW8tzTdPjnEU8e +hUt1ws8eBqn/gMfKvUBa8xFSILe8Ty99u+VjFbcRsdf0H6dRre9AdDVUz5oxzoPw +gamA8mhPQvFh3wt9smtRUh5IoM2LiM1s5pGMLuYuvSnVUPArEnSfW6K5I6v7OarU +3WfrBACDEGGcaWKjfdkRtmKIQrzu6AnldVC1ISLVAoqxHnKNFTk1BgO0PSZDpfJI +x8fMCnGlusoL6F5+LYEk4K4B0zvlj1ur3JocjxpuBLccl94JTo/+I9ZbS8ptUqLw +LBUkgIQJzzIH4G5NZsQ3FpzSWGRFVa7etqTv9BfUMUmJxhEoobQ/ZWxyZXBvLm9y +ZyAoUlBNIFNpZ25pbmcgS2V5IGZvciBlbHJlcG8ub3JnKSA8c2VjdXJlQGVscmVw +by5vcmc+iGAEExECACAFAkm+/6QCGwMGCwkIBwMCBBUCCAMEFgIDAQIeAQIXgAAK +CRAwm8MFuq2uUlgWAKCGWOpyodbzxS7Xy/0X9m9qVnHq+ACfUHrQzYAtFRpT07Sg +giosE+mvAKu5Ag0ESb7/pxAIALgT0q0HhwugE717a7N+gAtCbFu8pCXOZcrAnJpG +cMA9VWmsODZStPTxXYM2ggCMSzUnNis8pPZOPIP5C+t2IYtVjLshM4C9UiY7u5ET +jErWCxWmF+2QLO50K56E4qxj0wufZt9P+Ih0USUM5L2oyrQG51uj/2v3Qq3igc8Z +NTtmEOfis3losusQbAfZtTBmNQ0570kkhMxiyavgAUxLenXHYrkDJFuL7XdBCmna +kykTn2dzU81rIDZ+QPxII4V/eZ5xGiRY/EDUIAysEV2m0NNZgWi/twUnZICm7zYp +VRviJrBnFTvNEPMhiGRnJgQp/Krv4WIHQ67N8lQg3q5RJX8AAwUH/0UBjBgbsuWR +dB+ZYWjKPBy+bJY/6HefPUuLrt3QDNINMW8kY7VzWRMWyGc4IlPJDW0nwOn/vT5H +Dgc3YmA3tm7cKj5wpFijzff61Db8eq+CUKGscKxDBGzHq6oirM5U7DQLmipCs5Eb +efwHIjE3aOUSnoQmniEnBWI2hm/rftmY9oJSi8xgns4wAokDPiMcucADtbV3fznx +ppuowtBi8bcGB1vJZjTySQcSKWv+IVp5ej06uZ9501BEm6HxUZkuAGPecP65kcQu +5bg7B7LQeI5AWyujqvfuWgAF34xhl9QU/sDWxM3wUog+bw7y8pyWCqnJhp70yx8o +SqzhFygT62eISQQYEQIACQUCSb7/pwIbDAAKCRAwm8MFuq2uUq8PAKC1+E2pSwiS +oHXkKYPYDwApsP1mVACfRe1YnggLYQtG9LMeweVQQC77rK8= +=qyRr +-----END PGP PUBLIC KEY BLOCK----- diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/yum/files/rpm-gpg/RPM-GPG-KEY-kbsingh b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/yum/files/rpm-gpg/RPM-GPG-KEY-kbsingh new file mode 100644 index 00000000000..f8c688e5f4c --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/yum/files/rpm-gpg/RPM-GPG-KEY-kbsingh @@ -0,0 +1,25 @@ +-----BEGIN PGP PUBLIC KEY BLOCK----- +Version: GnuPG v1.2.6 (GNU/Linux) + +mQGiBEIu6hwRBACOz2JFa1nW+seAKlVGOu0ykhdFVNI9E4/Abp2+8nsJIZyUwLAp +ei76rPD8WdptgIjtYOCsqz1TbP+eqeEG0LLihOdFRLUuAjQX4X7LLf5Qm+nvUB73 +uLbSf9Ptps2CMUEtu7+0wVoTbuC19HXUhUr5sRdCnJbPJBH6aAHG7Pl9ZwCguN9o +V7IKTnIQiZg0nxSjZ4V9e6UD/R7KoMwH3NPQQF7T7rJaBjSZcVHUPhAcNPNn+ms/ +Tw9mzHZ0mnQnOzSEW0ZUj9TkLN52VQ3WmGZKAv9yeVr0/230YIgmtH863lSystmk +LNO9brK0+3vKg5GRpV0/MSWSmf39WPAS1hXNXIFfYp1eGHUfed4FVNxrMTWHQozr +8JosA/wP+zGfM51bSAazLUqP/MEm7F9OFkuD7Sw97w55FyYlrPp1FQWrWczoiKHr +wS5NRCQbCGEEM/+j9id6CukxPLXxwMYCfeg5K0HxMaQT6hxbwjOzAzN3PBFytNel +09qdrdoSDa35twT0SAt+rzM+zvRI8ycizFG3lIih4UItWWve2bQ6S2FyYW5iaXIg +U2luZ2ggKGh0dHA6Ly93d3cua2FyYW4ub3JnLykgPGtic2luZ2hAa2FyYW4ub3Jn +PoheBBMRAgAeBQJCLuocAhsDBgsJCAcDAgMVAgMDFgIBAh4BAheAAAoJEDANvZ4+ +E89b/P4AnjufrDCS+TAEL0KpkYDURePbDCHBAJ4+0iI1Td4YrcnLwmQ1+XDCJ3Zr +a7kBDQRCLuocEAQAjAl48FM9eGtP6M9FgswlSPAuCcJct6wOHmd/qZ923HckJPAD +zIFRMlM6H8P0bKoaIluv7agZM7Gsf8NeTg3NEeMKqnibIAyvjYeSkceRIwvBCQ3A +YwWk+B2zLUAFMxnE31oA10zjCKUo7Dc6XDUxSY/qdLymZzyG/Ndav+vMOVsAAwUD +/RCFDuW/GSM/s3DO7XxrOBRTGQmf9v9tCYdZZD615+s8ghaa5oZTvp1cbTTWiSq8 +ybncfjVHz9HezDgQjJsFZtrYd4w2JD+7K0+8sZ+BUGo1dDSv4UgN8ACtaGJnShiq +s8pQWRZFqFa3waay8oUSTKHiTHdpxLi3x4HhK/8MTsxniEkEGBECAAkFAkIu6hwC +GwwACgkQMA29nj4Tz1tHSgCcDgKL4swEu7ShvI8nZt2JLmTKB5QAn0qZi2zbexbi +DX+bbalHM+xVnXZN +=rZT6 +-----END PGP PUBLIC KEY BLOCK----- diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/yum/files/rpm-gpg/RPM-GPG-KEY-redhat-beta b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/yum/files/rpm-gpg/RPM-GPG-KEY-redhat-beta new file mode 100644 index 00000000000..7b40671a4c1 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/yum/files/rpm-gpg/RPM-GPG-KEY-redhat-beta @@ -0,0 +1,61 @@ +-----BEGIN PGP PUBLIC KEY BLOCK----- +Version: GnuPG v1.2.6 (GNU/Linux) + +mQINBEmkAzABEAC2/c7bP1lHQ3XScxbIk0LQWe1YOiibQBRLwf8Si5PktgtuPibT +kKpZjw8p4D+fM7jD1WUzUE0X7tXg2l/eUlMM4dw6XJAQ1AmEOtlwSg7rrMtTvM0A +BEtI7Km6fC6sU6RtBMdcqD1cH/6dbsfh8muznVA7UlX+PRBHVzdWzj6y8h84dBjo +gzcbYu9Hezqgj/lLzicqsSZPz9UdXiRTRAIhp8V30BD8uRaaa0KDDnD6IzJv3D9P +xQWbFM4Z12GN9LyeZqmD7bpKzZmXG/3drvfXVisXaXp3M07t3NlBa3Dt8NFIKZ0D +FRXBz5bvzxRVmdH6DtkDWXDPOt+Wdm1rZrCOrySFpBZQRpHw12eo1M1lirANIov7 +Z+V1Qh/aBxj5EUu32u9ZpjAPPNtQF6F/KjaoHHHmEQAuj4DLex4LY646Hv1rcv2i +QFuCdvLKQGSiFBrfZH0j/IX3/0JXQlZzb3MuMFPxLXGAoAV9UP/Sw/WTmAuTzFVm +G13UYFeMwrToOiqcX2VcK0aC1FCcTP2z4JW3PsWvU8rUDRUYfoXovc7eg4Vn5wHt +0NBYsNhYiAAf320AUIHzQZYi38JgVwuJfFu43tJZE4Vig++RQq6tsEx9Ftz3EwRR +fJ9z9mEvEiieZm+vbOvMvIuimFVPSCmLH+bI649K8eZlVRWsx3EXCVb0nQARAQAB +tDBSZWQgSGF0LCBJbmMuIChiZXRhIGtleSAyKSA8c2VjdXJpdHlAcmVkaGF0LmNv +bT6JAjYEEwECACAFAkpSM+cCGwMGCwkIBwMCBBUCCAMEFgIDAQIeAQIXgAAKCRCT +ioDK8hVB6/9tEAC0+KmzeKceXQ/GTUoU6jy9vtkFCFrmv+c7ol4XpdTt0QhqBOwy +6m2mKWwmm8KfYfy0cADQ4y/EcoXl7FtFBwYmkCuEQGXhTDn9DvVjhooIq59LEMBQ +OW879RwwzRIZ8ebbjMUjDPF5MfPQqP2LBu9N4KvXlZp4voykwuuaJ+cbsKZR6pZ6 +0RQKPHKP+NgUFC0fff7XY9cuOZZWFAeKRhLN2K7bnRHKxp+kELWb6R9ZfrYwZjWc +MIPbTd1khE53L4NTfpWfAnJRtkPSDOKEGVlVLtLq4HEAxQt07kbslqISRWyXER3u +QOJj64D1ZiIMz6t6uZ424VE4ry9rBR0Jz55cMMx5O/ni9x3xzFUgH8Su2yM0r3jE +Rf24+tbOaPf7tebyx4OKe+JW95hNVstWUDyGbs6K9qGfI/pICuO1nMMFTo6GqzQ6 +DwLZvJ9QdXo7ujEtySZnfu42aycaQ9ZLC2DOCQCUBY350Hx6FLW3O546TAvpTfk0 +B6x+DV7mJQH7MGmRXQsE7TLBJKjq28Cn4tVp04PmybQyTxZdGA/8zY6pPl6xyVMH +V68hSBKEVT/rlouOHuxfdmZva1DhVvUC6Xj7+iTMTVJUAq/4Uyn31P1OJmA2a0PT +CAqWkbJSgKFccsjPoTbLyxhuMSNkEZFHvlZrSK9vnPzmfiRH0Orx3wYpMQ== +=21pb +-----END PGP PUBLIC KEY BLOCK----- +The following public key can be used to verify RPM packages built and +signed by Red Hat, Inc. for this beta using `rpm -K' using the GNU GPG +package. Questions about this key should be sent to security@redhat.com. + + +-----BEGIN PGP PUBLIC KEY BLOCK----- +Version: GnuPG v1.0.6 (GNU/Linux) +Comment: For info see http://www.gnupg.org + +mQGiBDySTqsRBACzc7xuCIp10oj5B2PAV4XzDeVxprv/WTMreSNSK+iC0bEz0IBp +Vnn++qtyiXfH+bGIE9jqZgIEnpttWhUOaU5LhcLFzy+m8NWfngIFP9QfGmGAe9Gd +LFeAdhj4RmSG/vgr7vDd83Hz22dv403Ar/sliWO4vDOrMmZBG57WGYTWtwCgkMsi +UUQuJ6slbzKn82w+bYxOlL0EAIylWJGaTkKOTL5DqVR3ik9aT0Dt3FNVYiuhcKBe +II4E3KOIVA9kO8in1IZjx2gs6K2UV+GsoAVANdfKL7l9O+k+J8OxhE74oycvYJxW +QzCgXMZkNcvW5wyXwEMcr6TVd/5BGztcMw8oT3/l2MtAEG/vn1XaWToRSO1XDMDz ++AjUA/4m0mTkN8S4wjzJG8lqN7+quW3UOaiCe8J3SFrrrhE0XbY9cTJI/9nuXHU1 +VjqOSmXQYH2Db7UOroFTBiWhlAedA4O4yuK52AJnvSsHbnJSEmn9rpo5z1Q8F+qI +mDlzriJdrIrVLeDiUeTlpH3kpG38D7007GhXBV72k1gpMoMcpbQ3UmVkIEhhdCwg +SW5jLiAoQmV0YSBUZXN0IFNvZnR3YXJlKSA8cmF3aGlkZUByZWRoYXQuY29tPohX +BBMRAgAXBQI8l5p/BQsHCgMEAxUDAgMWAgECF4AACgkQ/TcmiYl9oHqdeQCfZjw4 +F9sir3XfRAjVe9kYNcQ8hnIAn0WgyT7H5RriWYTOCfauOmd+cAW4iEYEEBECAAYF +AjyXmqQACgkQIZGAzdtCpg5nDQCfepuRUyuVJvhuQkPWySETYvRw+WoAnjAWhx6q +0npMx4OE1JGFi8ymKXktuQENBDySTq4QBADKL/mK7S8E3synxISlu7R6fUvu07Oc +RoX96n0Di6T+BS99hC44XzHjMDhUX2ZzVvYS88EZXoUDDkB/8g7SwZrOJ/QE1zrI +JmSVciNhSYWwqeT40Evs88ajZUfDiNbS/cSC6oui98iS4vxd7sE7IPY+FSx9vuAR +xOa9vBnJY/dx0wADBQQAosm+Iltt2uigC6LJzxNOoIdB5r0GqTC1o5sHCeNqXJhU +ExAG8m74uzMlYVLOpGZi4y4NwwAWvCWC0MWWnnu+LGFy1wKiJKRjhv5F+WkFutY5 +WHV5L44vp9jSIlBCRG+84jheTh8xqhndM9wOfPwWdYYu1vxrB8Tn6kA17PcYfHSI +RgQYEQIABgUCPJJergAKCRD9NyaJiX2geiCPAJ4nEM4NtI9Uj8lONDk6FU86PmoL +yACfb68fBd2pWEzLKsOk9imIobHHpzE= +=gpIn +-----END PGP PUBLIC KEY BLOCK----- diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/yum/files/rpm-gpg/RPM-GPG-KEY-redhat-legacy-former b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/yum/files/rpm-gpg/RPM-GPG-KEY-redhat-legacy-former new file mode 100644 index 00000000000..3818b2c926f --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/yum/files/rpm-gpg/RPM-GPG-KEY-redhat-legacy-former @@ -0,0 +1,37 @@ +The following public key can be used to verify RPM packages built and +signed by Red Hat, Inc. This key is used for packages in Red Hat +products shipped prior to November 2006, and for all updates to those +products. + +Questions about this key should be sent to security@redhat.com. + +-----BEGIN PGP PUBLIC KEY BLOCK----- +Version: GnuPG v1.0.0 (GNU/Linux) +Comment: For info see http://www.gnupg.org + +mQGiBDfqVDgRBADBKr3Bl6PO8BQ0H8sJoD6p9U7Yyl7pjtZqioviPwXP+DCWd4u8 +HQzcxAZ57m8ssA1LK1Fx93coJhDzM130+p5BG9mYSWShLabR3N1KXdXQYYcowTOM +GxdwYRGr1Spw8QydLhjVfU1VSl4xt6bupPbWJbyjkg5Z3P7BlUOUJmrx3wCgobNV +EDGaWYJcch5z5B1of/41G8kEAKii6q7Gu/vhXXnLS6m15oNnPVybyngiw/23dKjS +ZVG7rKANEK2mxg1VB+vc/uUc4k49UxJJfCZg1gu1sPFV3GSa+Y/7jsiLktQvCiLP +lncQt1dV+ENmHR5BdIDPWDzKBVbgWnSDnqQ6KrZ7T6AlZ74VMpjGxxkWU6vV2xsW +XCLPA/9P/vtImA8CZN3jxGgtK5GGtDNJ/cMhhuv5tnfwFg4b/VGo2Jr8mhLUqoIb +E6zeGAmZbUpdckDco8D5fiFmqTf5+++pCEpJLJkkzel/32N2w4qzPrcRMCiBURES +PjCLd4Y5rPoU8E4kOHc/4BuHN903tiCsCPloCrWsQZ7UdxfQ5LQiUmVkIEhhdCwg +SW5jIDxzZWN1cml0eUByZWRoYXQuY29tPohVBBMRAgAVBQI36lQ4AwsKAwMVAwID +FgIBAheAAAoJECGRgM3bQqYOsBQAnRVtg7B25Hm11PHcpa8FpeddKiq2AJ9aO8sB +XmLDmPOEFI75mpTrKYHF6rkCDQQ36lRyEAgAokgI2xJ+3bZsk8jRA8ORIX8DH05U +lMH27qFYzLbT6npXwXYIOtVn0K2/iMDj+oEB1Aa2au4OnddYaLWp06v3d+XyS0t+ +5ab2ZfIQzdh7wCwxqRkzR+/H5TLYbMG+hvtTdylfqIX0WEfoOXMtWEGSVwyUsnM3 +Jy3LOi48rQQSCKtCAUdV20FoIGWhwnb/gHU1BnmES6UdQujFBE6EANqPhp0coYoI +hHJ2oIO8ujQItvvNaU88j/s/izQv5e7MXOgVSjKe/WX3s2JtB/tW7utpy12wh1J+ +JsFdbLV/t8CozUTpJgx5mVA3RKlxjTA+On+1IEUWioB+iVfT7Ov/0kcAzwADBQf9 +E4SKCWRand8K0XloMYgmipxMhJNnWDMLkokvbMNTUoNpSfRoQJ9EheXDxwMpTPwK +ti/PYrrL2J11P2ed0x7zm8v3gLrY0cue1iSba+8glY+p31ZPOr5ogaJw7ZARgoS8 +BwjyRymXQp+8Dete0TELKOL2/itDOPGHW07SsVWOR6cmX4VlRRcWB5KejaNvdrE5 +4XFtOd04NMgWI63uqZc4zkRa+kwEZtmbz3tHSdRCCE+Y7YVP6IUf/w6YPQFQriWY +FiA6fD10eB+BlIUqIw80VgjsBKmCwvKkn4jg8kibXgj4/TzQSx77uYokw1EqQ2wk +OZoaEtcubsNMquuLCMWijYhGBBgRAgAGBQI36lRyAAoJECGRgM3bQqYOhyYAnj7h +VDY/FJAGqmtZpwVp9IlitW5tAJ4xQApr/jNFZCTksnI+4O1765F7tA== +=3AHZ +-----END PGP PUBLIC KEY BLOCK----- diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/yum/files/rpm-gpg/RPM-GPG-KEY-redhat-legacy-release b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/yum/files/rpm-gpg/RPM-GPG-KEY-redhat-legacy-release new file mode 100644 index 00000000000..09aded8bec7 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/yum/files/rpm-gpg/RPM-GPG-KEY-redhat-legacy-release @@ -0,0 +1,24 @@ +The following public key can be used to verify RPM packages built and +signed by Red Hat, Inc. This key is used for packages in Red Hat +products shipped after November 2006, and for all updates to those +products. + +Questions about this key should be sent to security@redhat.com. + +-----BEGIN PGP PUBLIC KEY BLOCK----- +Version: GnuPG v1.2.6 (GNU/Linux) + +mQGiBEV2EyQRBAD4/SR69qoLzK4HIa6g9iS+baiX0o3NjkLftFHg/xy+IMOMg//i +4c5bUpLKDTMH3+yT0G8qpul/RALUFOESKFkZm3/SlkJKuroXcB8U6s2dh5XX9DDB +ISqRwL7M5qB8rfDPKHN+k/XwJ9CNpHMdNxnnc2WhnnmHNp6NrD/bUEH4vwCglMa0 +rFRXPaN7407DARGHvW/jugsEANFaeZsFwos/sajL1XQRfHZUTnvDjJgz31IFY+OL +DlOVAOtV/NaECMwIJsMIhoisW4Luwp4m75Qh3ogq3bwqSWNLsfJ9WFnNqXOgamyD +h/F4q492z6FpyIb1JZLABBSH7LEQjHlR/s/Ct5JEWc5MyfzdjBi6J9qCh3y/IYL0 +EbfRA/4yoJ/fH9uthDLZsZRWmnGJvb+VpRvcVs8IQ4aIAcOMbWu2Sp3U9pm6cxZF +N7tShmAwiiGj9UXVtlhpj3lnqulLMD9VqXGF0YgDOaQ7CP/99OEEhUjBj/8o8udF +gxc1i2WJjc7/sr8IMbDv/SNToi0bnZUxXa/BUjj92uaQ6/LupbQxUmVkIEhhdCwg +SW5jLiAocmVsZWFzZSBrZXkpIDxzZWN1cml0eUByZWRoYXQuY29tPohfBBMRAgAf +BQJFdhMkAhsDBgsJCAcDAgQVAggDAxYCAQIeAQIXgAAKCRBTJoEBNwFxhogXAKCD +TuYeyQrkYXjg9JmOdTZvsIVfZgCcCWKJXtfbC5dbv0piTHI/cdwVzJo= +=mhzo +-----END PGP PUBLIC KEY BLOCK----- diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/yum/files/rpm-gpg/RPM-GPG-KEY-redhat-legacy-rhx b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/yum/files/rpm-gpg/RPM-GPG-KEY-redhat-legacy-rhx new file mode 100644 index 00000000000..0f875c0e207 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/yum/files/rpm-gpg/RPM-GPG-KEY-redhat-legacy-rhx @@ -0,0 +1,17 @@ +-----BEGIN PGP PUBLIC KEY BLOCK----- +Version: GnuPG v1.2.6 (GNU/Linux) + +mQGiBEYk7/IRBACdWFJInc51/+0sqvadIvf0E+Vhv4aIqB76jWtIGqXnTeG6hEl/ +9tJoLszBh4g/KBFVF3E4VxTHXKO/L7GZRa8JzoMtvV8XiP6BaYq6ykx6H7alKvoP +qzk7xBbvNbqsXJCO7keo+g7iIDdfAxvsSJYbhQBxDn5W4Hw7SnHcMmTDOQCg7vOj +UzaZG32yYMBZLjOAB/QzXgsD/1JRDnQ8cL6d17B1ie57ZuVOI3ziQJSmj0zbC0IX +OsxlcFjwydLk3TA88iCr0SO2mfXCsGTeDGFbrl2IRCoH91l3Ew49HI4OYtl+OPSt +pIYdFLSQ+RUPs9CFYwF9Ogjrwmi6jVptKq/+v0WgnCrbfz3DYxCWt/VB1PYDj5y6 +Mv//BACKa2mUuQoukDvzqiwZXV/Z52MeDOzPbOFo6qhx+54nav9Inz1yziEjYrP/ +ZrNJ4BT6fBgin/a6UmD5FqMtkrrhOCpHFQK2H+XYZ0vVJGZI7h74/fY8U2n+1Mle +xQ/ejWojF+H5nFUAwKHaNVNofKcw8c8msgGn2jsvrAISTSHshrQwUmVkIEhhdCwg +SW5jLiAoUkhYIGtleSkgPHJoeC1zdXBwb3J0QHJlZGhhdC5jb20+iF8EExECAB8F +AkYk7/ICGwMGCwkIBwMCBBUCCAMDFgIBAh4BAheAAAoJEDmhOhJCGT5r6FoAoLsB ++DOPmTc3P+77DnNhU460nmjQAKCI3BJ/SxqPqfp8jL6lTfVo2zxegQ== +=t0np +-----END PGP PUBLIC KEY BLOCK----- diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/yum/files/rpm-gpg/RPM-GPG-KEY-redhat-release b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/yum/files/rpm-gpg/RPM-GPG-KEY-redhat-release new file mode 100644 index 00000000000..47c6be6700b --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/yum/files/rpm-gpg/RPM-GPG-KEY-redhat-release @@ -0,0 +1,62 @@ +The following public key can be used to verify RPM packages built and +signed by Red Hat, Inc. This key is used for packages in Red Hat +products shipped after November 2009, and for all updates to those +products. + +Questions about this key should be sent to security@redhat.com. + +pub 4096R/FD431D51 2009-10-22 Red Hat, Inc. (release key 2) + +-----BEGIN PGP PUBLIC KEY BLOCK----- +Version: GnuPG v1.2.6 (GNU/Linux) + +mQINBErgSTsBEACh2A4b0O9t+vzC9VrVtL1AKvUWi9OPCjkvR7Xd8DtJxeeMZ5eF +0HtzIG58qDRybwUe89FZprB1ffuUKzdE+HcL3FbNWSSOXVjZIersdXyH3NvnLLLF +0DNRB2ix3bXG9Rh/RXpFsNxDp2CEMdUvbYCzE79K1EnUTVh1L0Of023FtPSZXX0c +u7Pb5DI5lX5YeoXO6RoodrIGYJsVBQWnrWw4xNTconUfNPk0EGZtEnzvH2zyPoJh +XGF+Ncu9XwbalnYde10OCvSWAZ5zTCpoLMTvQjWpbCdWXJzCm6G+/hx9upke546H +5IjtYm4dTIVTnc3wvDiODgBKRzOl9rEOCIgOuGtDxRxcQkjrC+xvg5Vkqn7vBUyW +9pHedOU+PoF3DGOM+dqv+eNKBvh9YF9ugFAQBkcG7viZgvGEMGGUpzNgN7XnS1gj +/DPo9mZESOYnKceve2tIC87p2hqjrxOHuI7fkZYeNIcAoa83rBltFXaBDYhWAKS1 +PcXS1/7JzP0ky7d0L6Xbu/If5kqWQpKwUInXtySRkuraVfuK3Bpa+X1XecWi24JY +HVtlNX025xx1ewVzGNCTlWn1skQN2OOoQTV4C8/qFpTW6DTWYurd4+fE0OJFJZQF +buhfXYwmRlVOgN5i77NTIJZJQfYFj38c/Iv5vZBPokO6mffrOTv3MHWVgQARAQAB +tDNSZWQgSGF0LCBJbmMuIChyZWxlYXNlIGtleSAyKSA8c2VjdXJpdHlAcmVkaGF0 +LmNvbT6JAjYEEwECACAFAkrgSTsCGwMGCwkIBwMCBBUCCAMEFgIDAQIeAQIXgAAK +CRAZni+R/UMdUWzpD/9s5SFR/ZF3yjY5VLUFLMXIKUztNN3oc45fyLdTI3+UClKC +2tEruzYjqNHhqAEXa2sN1fMrsuKec61Ll2NfvJjkLKDvgVIh7kM7aslNYVOP6BTf +C/JJ7/ufz3UZmyViH/WDl+AYdgk3JqCIO5w5ryrC9IyBzYv2m0HqYbWfphY3uHw5 +un3ndLJcu8+BGP5F+ONQEGl+DRH58Il9Jp3HwbRa7dvkPgEhfFR+1hI+Btta2C7E +0/2NKzCxZw7Lx3PBRcU92YKyaEihfy/aQKZCAuyfKiMvsmzs+4poIX7I9NQCJpyE +IGfINoZ7VxqHwRn/d5mw2MZTJjbzSf+Um9YJyA0iEEyD6qjriWQRbuxpQXmlAJbh +8okZ4gbVFv1F8MzK+4R8VvWJ0XxgtikSo72fHjwha7MAjqFnOq6eo6fEC/75g3NL +Ght5VdpGuHk0vbdENHMC8wS99e5qXGNDued3hlTavDMlEAHl34q2H9nakTGRF5Ki +JUfNh3DVRGhg8cMIti21njiRh7gyFI2OccATY7bBSr79JhuNwelHuxLrCFpY7V25 +OFktl15jZJaMxuQBqYdBgSay2G0U6D1+7VsWufpzd/Abx1/c3oi9ZaJvW22kAggq +dzdA27UUYjWvx42w9menJwh/0jeQcTecIUd0d0rFcw/c1pvgMMl/Q73yzKgKYw== +=zbHE +-----END PGP PUBLIC KEY BLOCK----- +The following public key can be used to verify RPM packages built and +signed by Red Hat, Inc. This key is a supporting (auxiliary) key for +Red Hat products shipped after November 2006 and for all updates to +those products. + +Questions about this key should be sent to security@redhat.com. + +-----BEGIN PGP PUBLIC KEY BLOCK----- +Version: GnuPG v1.2.6 (GNU/Linux) + +mQGiBEVwDGkRBACwPhZIpvkjI8wV9sFTDoqyPLx1ub8Sd/w+YuI5Ovm49mvvEQVT +VLg8FgE5JlST59AbsLDyVtRa9CxIvN5syBVrWWWtHtDnnylFBcqG/A6J3bI4E9/A +UtSL5Zxbav0+utP6f3wOpxQrxc+WIDVgpurdBKAQ3dsobGBqypeX6FXZ5wCgou6C +yZpGIBqosJaDWLzNeOfb/70D/1thLkQyhW3JJ6cHCYJHNfBShvbLWBf6S231mgmu +MyMlt8Kmipc9bw+saaAkSkVsQ/ZbfjrWB7e5kbMruKLVrH+nGhamlHYUGyAPtsPg +Uj/NUSj5BmrCsOkMpn43ngTLssE9MLhSPj2nIHGFv9B+iVLvomDdwnaBRgQ1aK8z +z6MAA/406yf5yVJ/MlTWs1/68VwDhosc9BtU1V5IE0NXgZUAfBJzzfVzzKQq6zJ2 +eZsMLhr96wbsW13zUZt1ing+ulwh2ee4meuJq6h/971JspFY/XBhcfq4qCNqVjsq +SZnWoGdCO6J8CxPIemD2IUHzjoyyeEj3RVydup6pcWZAmhzkKrQzUmVkIEhhdCwg +SW5jLiAoYXV4aWxpYXJ5IGtleSkgPHNlY3VyaXR5QHJlZGhhdC5jb20+iF4EExEC +AB4FAkVwDGkCGwMGCwkIBwMCAxUCAwMWAgECHgECF4AACgkQRWiciC+mWOC1rQCg +ooNLCFOzNPcvhd9Za8C801HmnsYAniCw3yzrCqtjYnxDDxlufH0FVTwX +=d/bm +-----END PGP PUBLIC KEY BLOCK----- diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/yum/files/rpm-gpg/RPM-GPG-KEY-remi b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/yum/files/rpm-gpg/RPM-GPG-KEY-remi new file mode 100644 index 00000000000..32833860645 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/yum/files/rpm-gpg/RPM-GPG-KEY-remi @@ -0,0 +1,24 @@ +-----BEGIN PGP PUBLIC KEY BLOCK----- +Version: GnuPG v1.4.7 (GNU/Linux) + +mQGiBEJny1wRBACRnbQgZ6qLmJSuGvi/EwrRL6aW610BbdpLQRL3dnwy5wI5t9T3 +/JEiEJ7GTvAwfiisEHifMfk2sRlWRf2EDQFttHyrrYXfY5L6UAF2IxixK5FL7PWA +/2a7tkw1IbCbt4IGG0aZJ6/xgQejrOLi4ewniqWuXCc+tLuWBZrGpE2QfwCggZ+L +0e6KPTHMP97T4xV81e3Ba5MD/3NwOQh0pVvZlW66Em8IJnBgM+eQh7pl4xq7nVOh +dEMJwVU0wDRKkXqQVghOxALOSAMapj5mDppEDzGLZHZNSRcvGEs2iPwo9vmY+Qhp +AyEBzE4blNR8pwPtAwL0W3cBKUx7ZhqmHr2FbNGYNO/hP4tO2ochCn5CxSwAfN1B +Qs5pBACOkTZMNC7CLsSUT5P4+64t04x/STlAFczEBcJBLF1T16oItDITJmAsPxbY +iee6JRfXmZKqmDP04fRdboWMcRjfDfCciSdIeGqP7vMcO25bDZB6x6++fOcmQpyD +1Fag3ZUq2yojgXWqVrgFHs/HB3QE7UQkykNp1fjQGbKK+5mWTrQkUmVtaSBDb2xs +ZXQgPFJQTVNARmFtaWxsZUNvbGxldC5jb20+iGAEExECACAFAkZ+MYoCGwMGCwkI +BwMCBBUCCAMEFgIDAQIeAQIXgAAKCRAATm9HAPl/Vv/UAJ9EL8ioMTsz/2EPbNuQ +MP5Xx/qPLACeK5rk2hb8VFubnEsbVxnxfxatGZ25AQ0EQmfLXRAEANwGvY+mIZzj +C1L5Nm2LbSGZNTN3NMbPFoqlMfmym8XFDXbdqjAHutGYEZH/PxRI6GC8YW5YK4E0 +HoBAH0b0F97JQEkKquahCakj0P5mGuH6Q8gDOfi6pHimnsSAGf+D+6ZwAn8bHnAa +o+HVmEITYi6s+Csrs+saYUcjhu9zhyBfAAMFA/9Rmfj9/URdHfD1u0RXuvFCaeOw +CYfH2/nvkx+bAcSIcbVm+tShA66ybdZ/gNnkFQKyGD9O8unSXqiELGcP8pcHTHsv +JzdD1k8DhdFNhux/WPRwbo/es6QcpIPa2JPjBCzfOTn9GXVdT4pn5tLG2gHayudK +8Sj1OI2vqGLMQzhxw4hJBBgRAgAJBQJCZ8tdAhsMAAoJEABOb0cA+X9WcSAAn11i +gC5ns/82kSprzBOU0BNwUeXZAJ0cvNmY7rvbyiJydyLsSxh/la6HKw== +=6Rbg +-----END PGP PUBLIC KEY BLOCK----- diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/yum/files/rpm-gpg/RPM-GPG-KEY-rpmforge-dag b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/yum/files/rpm-gpg/RPM-GPG-KEY-rpmforge-dag new file mode 100644 index 00000000000..8ee27f45b9b --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/yum/files/rpm-gpg/RPM-GPG-KEY-rpmforge-dag @@ -0,0 +1,32 @@ +The following public key can be used to verify RPM packages +downloaded from http://dag.wieers.com/apt/ using 'rpm -K' +if you have the GNU GPG package. +Questions about this key should be sent to: +Dag Wieers + +-----BEGIN PGP PUBLIC KEY BLOCK----- +Version: GnuPG v1.2.1 (GNU/Linux) + +mQGiBD9JMT0RBAC9Q2B0AloUMTxaK73sD0cOu1MMdD8yuDagbMlDtUYA1aGeJVO6 +TV02JLGr67OBY+UkYuC1c3PUwmb3+jakZd5bW1L8E2L705wS0129xQOZPz6J+alF +5rTzVkiefg8ch1yEcMayK20NdyOmhDGXQXNQS8OJFLTIC6bJs+7MZL83/wCg3cG3 +3q7MWHm3IpJb+6QKpB9YH58D/2WjPDK+7YIky/JbFBT4JPgTSBy611+bLqHA6PXq +39tzY6un8KDznAMNtm+NAsr6FEG8PHe406+tbgd7tBkecz3HPX8nR5v0JtDT+gzN +8fM3kAiAzjCHUAFWVAMAZLr5TXuoq4lGTTxvZbwTjZfyjCm7gIieCu8+qnPWh6hm +30NgA/0ZyEHG6I4rOWqPks4vZuD+wlp5XL8moBXEKfEVOMh2MCNDRGnvVHu1P3eD +oHOooVMt9sWrGcgxpYuupPNL4Uf6B6smiLlH6D4tEg+qCxC17zABI5572XJTJ170 +JklZJrPGtnkPrrKMamnN9MU4RjGmjh9JZPa7rKjZHyWP/z/CBrQ1RGFnIFdpZWVy +cyAoRGFnIEFwdCBSZXBvc2l0b3J5IHYxLjApIDxkYWdAd2llZXJzLmNvbT6IWQQT +EQIAGQUCP0kxPQQLBwMCAxUCAwMWAgECHgECF4AACgkQog5SFGuNeeYvDQCeKHST +hIq/WzFBXtJOnQkJGSqAoHoAnRtsJVWYmzYKHqzkRx1qAzL18Sd0iEYEEBECAAYF +Aj9JMWAACgkQoj2iXPqnmevnOACfRQaageMcESHVE1+RSuP3txPUvoEAoJAtOHon +g+3SzVNSZLn/g7/Ljfw+uQENBD9JMT8QBACj1QzRptL6hbpWl5DdQ2T+3ekEjJGt +llCwt4Mwt/yOHDhzLe8SzUNyYxTXUL4TPfFvVW9/j8WOkNGvffbs7g84k7a5h/+l +IJTTlP9V9NruDt1dlrBe+mWF6eCY55OFHjb6nOIkcJwKxRd3nGlWnLsz0ce9Hjrg +6lMrn0lPsMV6swADBQP9H42sss6mlqnJEFA97Fl3V9s+7UVJoAIA5uSVXxEOwVoh +Vq7uECQRvWzif6tzOY+vHkUxOBRvD6oIU6tlmuG3WByKyA1d0MTqMr3eWieSYf/L +n5VA9NuD7NwjFA1kLkoDwfSbsF51LppTMkUggzwgvwE46MB6yyuqAVI1kReAWw+I +RgQYEQIABgUCP0kxPwAKCRCiDlIUa4155oktAKDAzm9QYbDpk6SrQhkSFy016BjE +BACeJU1hpElFnUZCL4yKj4EuLnlo8kc= +=mqUt +-----END PGP PUBLIC KEY BLOCK----- diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/yum/files/rpm-gpg/RPM-GPG-KEY-sl b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/yum/files/rpm-gpg/RPM-GPG-KEY-sl new file mode 100644 index 00000000000..70b6bd17ef3 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/yum/files/rpm-gpg/RPM-GPG-KEY-sl @@ -0,0 +1,32 @@ +-----BEGIN PGP PUBLIC KEY BLOCK----- +Version: GnuPG v1.4.5 (GNU/Linux) + +mQGiBEpXadARBACHhOfMUuT/4iDvBRmm6bEsvnMN++L79aYhEUMNlrZ2TjKPjPvG +Y0vGk+I0JhUJWutkQRZVbqgVDsNjmnELnACK+xvdryvtxh50wCI9WUl7CT5EV7BS +/jD7JxTFbXyC/Xv0ixMB9vj6U9cySyE8PxONp0HzO6LTIr1OMPgDUsP4lwCgh8De +fmY8TN2m9a0huLdNrnmKw0cD/2bkt6rJAi3+BGHWNgQ9Nb/4wQff8BKGDtL/8acp +3yH91axuD2iYCKw0ZP5akBpRGv+4e30Plmbi1f5NaEDo9Ga1c4TDPopwgiYhrVLj +56efoTfP2AiZl3iBKFPI83/YOhrVZF8UiYoAoUnOFpOg8vmtCzgvYip5UZLTgbfJ +lcWvA/9vMb8By+1pHjW98d7GkzvZqzyMtWlbO7PXCn8P7bGQYjwvyTGiRNz3q22c +2Z29qQw4r1L1L1JGsUwuOMahkczWVdD4TRHc8mhVJEUEA6AkNAZc+Ymsfr/ip0kX +nSZLE3pYVifOhBRO8EbT0WhCMScmZNpwvZU//HKL/p+n3LArUrRZU2NpZW50aWZp +YyBMaW51eCAoUlBNIHNpZ25pbmcga2V5IGZvciBTY2llbnRpZmljIExpbnV4KSA8 +c2NpZW50aWZpYy1saW51eC1kZXZlbEBmbmFsLmdvdj6IYAQTEQIAIAUCSldp0AIb +AwYLCQgHAwIEFQIIAwQWAgMBAh4BAheAAAoJELC0GD8ZKn19cXIAnA5R+EbaYr4/ +IL6It/UxHXlBFIajAJ9bwmNDF14uvDnFigg1PLevLTBnTIhGBBARAgAGBQJKV6lf +AAoJENpq0AiC/ReyKLQAmwVC/Ii3sAKsptwZKHw/uk1kbupCAJ0eIzSaUo1hSa1V +fP7O/dqigu6JAbkCDQRKV2nZEAgAzAcaC7unRNdrIwAGGKqOIvI8WNwpftHY50Y5 +zPSl7vtWVkp3N+2fynJR+tW4G/2xDChBbPzPz/TavRyBc21LKzAlym8qIGEE02cZ +U/YJAYnbAkNNiGMOAnAIjBw1KUcQamAxdk0glE7MP1JiXY1MO4tTW38UEcvQbSvg +Mh/eECqFOwiQXJmkPpZhPUwnwmZRCV4vlCZQM3CMExZ9pDV/V+kuhefw2WeheXyh +g4DC88gcrv2mO0I3sVmpxn3JLMayiMlQbOSYLQuNVKN/EFDwuAbS9Ane7vm6wF9X +NswMX0I/vO1IVvSN1fi5ZM71QzeYUGKBQv97kLO20hbRWZ1V+wADBggAys+jhlYH +mtFZQxV4an1ucqnVauKnstj0zF88Hiy7yivT3W5h3Zd067uOfcBQCJUlt7y8sYD2 +q9htm5Rrxx+J29bl0zxwrEatnv0gLzprSa7Ei3wR6IrvBM3Ic0mGSzlsSxlzaFtt +Pwak5C47vX9+PwKEKXFdM1gVzHTuD6PXEYxA4YMlQGeGVA68FvTHxMHpf8POQWTV +QtjoI0flvFT7d4ozqUJdjJZxJDFQ7GO2YdIfF3sUdfn5kFxK0SUzqrmCYXeheniS +LKC4mpAR0PetWJ7r1gY5khHb2eHW1vdEBYUXlHjB+jLaOBns05MHMZYd4CHe8q/Q +gzMeVlh8YLSdZYhJBBgRAgAJBQJKV2nZAhsMAAoJELC0GD8ZKn19iU8AniUIFu32 +VeRJ+VKL2vBQMVbFVZOMAJ434Bi99fN2CSh7T62oxtQvhw70fw== +=eL9H +-----END PGP PUBLIC KEY BLOCK----- diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/yum/files/rpm-gpg/RPM-GPG-KEY-webtatic-andy b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/yum/files/rpm-gpg/RPM-GPG-KEY-webtatic-andy new file mode 100644 index 00000000000..317b802b560 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/yum/files/rpm-gpg/RPM-GPG-KEY-webtatic-andy @@ -0,0 +1,30 @@ +-----BEGIN PGP PUBLIC KEY BLOCK----- +Version: GnuPG v1.4.5 (GNU/Linux) + +mQGiBE1e+1MRBAD8j+KyOIpGNRN39gNy2E/1HG4ZoLFuxIOxI5/1FEuZB/GjYF5m +DvJerZukd0QCqCs72J6J+uWnfD/52t2XWTw4IHPpCWeyr9TWex3uOYmrYzY+0l0l +qsCsrhT0XGkAE0+/20oEP2+t/d+1q0yRcYZRwWK/ME2rUUX0jOa/B3Bc6wCg3blw +XdZNrv1wVNd1PCOUI79k0V0D+wfbybos8Cmdv2f8dD746fSR/hmp4SzpBDmPRRQu +0gtJAKI6ycTdotGq5zHfZj76kDQBudeIgdbWtqfckP2lK47i8lIENAyC4MK8dxh9 +Ts+b1LqXlbcPyixzImf4qoT5DT1lSEUPwoMRX8W/29GAcvnZpOwQ8g7DNmRBpFFY +8U2GBADz6uEeP3YwJAuL7pi77AalxR0WQAADMR59pGltQdXaZvANXoioU0W519Pb +nl3gKWDiTuwUDrwaSPoBbNLyX4s0AE7/0HSG02/eRjLB8toQpAH9xkK/u2WPe/do +erZg5yg1qhoCbEM7kJ2I/GBl6VbPedt2ORdsC4ZTWTnZJh6tYLQhQW5keSBUaG9t +cHNvbiA8YW5keUB3ZWJ0YXRpYy5jb20+iGAEExECACAFAk1e+1MCGwMGCwkIBwMC +BBUCCAMEFgIDAQIeAQIXgAAKCRC3Q0sGz0xP+TA0AJwJf5ZPeub8v+5CtZwdcZhV +LU0sjgCgrP3y54heBjF1vhZQ3rJywTmRLHe5Ag0ETV77UxAIAIQPLVFbqheJ90Kf +NF8TYt3ZIMpP5chw25OYq4tuZMzVJxKjUlM7KPQxUKquY/F9WpjH980LmICTb4Fz +txzn2bshIsGyg8pDUSnVK0NPY5uaq9bK4oht8wkr3FNFT2FpeqDIJyn+phIuEpIi +qt1LJyzzjobh9csaaGmNHvtrlkIggBj2n/ZQuGNhcYnKUZ/WGmkItCTSOfA++G+C +dCo1aPEymfbnJvaLB/mLyzA+r/r7LQM10cZEtqh5JdclJEh3CzZmx9HsRxCDZF8W +X/C4MmCwmIxmuU4vkVNhHFTQimQEUR8vg9ltiz8+xBjyE1Iav4MxfOYh3xjdJk1d +zlovyUcAAwUH/2KPgf0UQ1o+4IjOYinEEbNlrD1pKw5anUKwaaeQi0vm/oRG0E2F +ZCJ73OHxW/0hMrwbrGwXcm4NBARnAppg+/CecOVpkBgD5hrM+11DPhxdd1bjjfza +Pq8GmPp8SSsiTPUCoSlzojxL3Z05RNbvKVzxzxbYdx5h5XOTflI7bAHTY4AzGSDf +WaFljjCucht/d7u5empAd02haldUXWjT9RvY5RwnRZ+hjI47e+wUA0FMLHYtA1/0 +cwEIvpp2xwF/jpH3ODmnIGEeNoLyzAV7X0KAlSN8VRsh7igZRB9TRGI67aTjRgk8 +ayf/QNxAzwEk1MeDv67IFKNYVolxHCt4CtqISQQYEQIACQUCTV77UwIbDAAKCRC3 +Q0sGz0xP+dPiAKDUNJ5rkB9CRoMH9BC35d0fqXXeugCgwl/HYv52dWgatbyEGLet +etv5Qeg= +=nIAo +-----END PGP PUBLIC KEY BLOCK----- diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/yum/files/rpm-gpg/RPM-GPG-KEY.art b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/yum/files/rpm-gpg/RPM-GPG-KEY.art new file mode 100644 index 00000000000..825424e1f33 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/yum/files/rpm-gpg/RPM-GPG-KEY.art @@ -0,0 +1,24 @@ +-----BEGIN PGP PUBLIC KEY BLOCK----- +Version: GnuPG v1.2.1 (GNU/Linux) + +mQGiBEGP+skRBACyZz7muj2OgWc9FxK+Hj7tWPnrfxEN+0PE+n8MtqH+dxwQpMTd +gDpOXxJa45GM5pEwB6CFSFK7Fb/faniF9fDbm1Ga7MpBupIBYLactkoOTZMuTlGB +T0O5ha4h26YLqFfQOtlEi7d0+BDDdfHRQw3o67ycgRnLgYSA79DISc3MywCgk2TR +yd5sRfZAG23b4EDl+D0+oaMEAK73J7zuxf6F6V5EaxLd/w4JVB2xW0Glcn0fACOe +8FV9lzcZuo2xPpdGuyj02f/xlqvEav3XqTfFU2no61mA2pamaRNhlo+CEfGc7qde +/1twfSgOYqzeCx7+aybyPo8Th41b80FT19mfkjBf6+5NbUHffRabFFh1FmcPVNBn +F3FoA/95nRIzqDMItdTRitaZn02dIGNjdwllBD75bSVEvaR9O5hjBo0VMc25DB7f +DM2qEO52wCQbAKw9zFC284ekZVDaK4aHYt7iobHaqJEpKHgsDut5WWuMiSLR+SsF +aBHIZ9HvrKWLSUQKHU6A1Hva0P0r3GnoCMc/VCVfrLl721SjPbQzQXRvbWljIFJv +Y2tldCBUdXJ0bGUgPGFkbWluQGF0b21pY3JvY2tldHR1cnRsZS5jb20+iFkEExEC +ABkFAkGP+skECwcDAgMVAgMDFgIBAh4BAheAAAoJEDKpURRevSdEzcQAn1hSHqTO +jwv/z/picpOnR+mgycwHAKCBex2ciyXo5xeaQ9w7OMf7Jsmon7kBDQRBj/rMEAQA +6JvRndqE4koK0e49fUkICm1X0ZEzsVg9VmUW+Zft5guCRxmGlYTmtlC7oJCToRP/ +m/xH5uIevGiJycRKB0Ix+Csl6f9QuTkQ7tSTHcaIKbI3tL1x6CCBoWeTGYaOJlvk +ubrmajiMFaBfopLH2firoSToDGoUvv4e7bImIHEgNr8AAwUEAND0YR9DOEZvc+Lq +Ta/PQyxkdZ75o+Ty/O64E3OmO1Tuw2ciSQXCcwrbrMSE6EHHetxtGCnOdkjjjtmH +AnxsxdONv/EJuQmLcoNcsigZZ4tfRdmtXgcbnOmXBgmy1ea1KvWcsmecNSAMJHwR +7vDDKzbj4mSmudzjapHeeOewFF10iEYEGBECAAYFAkGP+swACgkQMqlRFF69J0Sq +nQCfa/q9Y/oY4dOTGj6MsdmRIQkKZhYAoIscjinFwTru4FVi2MIEzUUMToDK +=NOIx +-----END PGP PUBLIC KEY BLOCK----- diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/yum/files/rpm-gpg/RPM-GPG-KEY.atrpms b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/yum/files/rpm-gpg/RPM-GPG-KEY.atrpms new file mode 100644 index 00000000000..860ace4d247 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/yum/files/rpm-gpg/RPM-GPG-KEY.atrpms @@ -0,0 +1,20 @@ +-----BEGIN PGP PUBLIC KEY BLOCK----- +Version: GnuPG v1.4.6 (GNU/Linux) + +mQGiBD5gtCgRBACKIvjMF+20r9k/Uw2Hq6Y/qn1nM0AZEFalhglXP5pMm5bMgkcI +1vCWqJxSbhQhk8hSEenoszes8hyUxHj4hFFUDiRtAxOpCpGCsCnUddgQtHAQd+tm +aQsM6J3Jm/EZPtwR0lvwvRGvz2x6Rr95G8+42KK9x+mBYhLk0y3gAbBzhwCgnkDH +a97MGBT7gRLrmtFqiHrWlPkD/2tBaH6IEuoJhcAbNj9MukbhDOYJ6ic9Nzf6sR3t +ZG+XgQLLS2DNy8+HWcYJOjpJDEe8zWFDdUv3cL1D0U2f2e85FuJaMucHn+816iw8 +mNjZXJEoDE4LJ8Vv53fkevNZpdWmO2VtRwI+woDnIHYHukDLj2sWhVt+5W+uOKAE +OippA/9OzuWrwBtTR+Np8ApZGkxhxU1z0iEStV+kQNqJE7YoR4SGMuzEa3bFzrPx +k4qIU+rw4YgFgHrs1x08lXxNOZkq6avvbl60HqN2qF2UQL/YdU+5X3ixaJVaYYk8 +yuK+hp0Hx2DdBWmVhq6rEzIfpnFhF4qspwMWEiiBGjYDL62W7LQ0QVRycG1zLm5l +dCAocnBtIHNpZ25pbmcga2V5KSA8QXhlbC5UaGltbUBBVHJwbXMubmV0PohnBBMR +AgAnAhsDBgsJCAcDAgMVAgMDFgIBAh4BAheAAhkBBQJFfF9PBQkJGI4nAAoJEFCM +5eZmU0wrJ0IAnA0BdyRlq2S8ess55R8YMFnWAWXEAJ9Fa7cEHku4j4B83shCODps ++DYUZohnBBMRAgAnAhsDBQkDdMLsBgsJCAcDAgMVAgMDFgIBAh4BAheABQJAKteu +AhkBAAoJEFCM5eZmU0wrMMUAnRjS2PXQp0tsC/69IGMMxqU+8xeAAJ9XQjVAo+mU +kg/3AeBlMBIlFe5hDQ== +=23Fz +-----END PGP PUBLIC KEY BLOCK----- diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/yum/files/rpm-gpg/RubyWorks.GPG.key b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/yum/files/rpm-gpg/RubyWorks.GPG.key new file mode 100644 index 00000000000..b91a5a88769 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/yum/files/rpm-gpg/RubyWorks.GPG.key @@ -0,0 +1,30 @@ +-----BEGIN PGP PUBLIC KEY BLOCK----- +Version: GnuPG v1.2.6 (GNU/Linux) + +mQGiBEY5QQ0RBACfC1NbAdGFMOS/Y7P9hmNph2Wh3TJTh6IZpL+lTJBuZSEa6rp0 +CghS/yU3gGXUPaxAy91M7PXMv5p7S3U/SusZHATLhFdU5J4LuWMf4IiBy9FOB/aj +Q1s5vZ/i3YFaqolXsRP8TgIu4Lzp/j3+KAxFb3gF7lz64J/Et2Jil0OQzwCgkn9i +SoPEM6d9SCFOidhUuTHUhM0D/3UXl/FKPVFrFzjslFpaN9NgArRrmXKTOBWEqMLy +12pbTzOtv+p17Ot51q4h0ebEWrmVJ/h/7Is6QT6AKHuOIW+1/88fcSrmef//0Scz +wtEwVudkYA+kOGt1pwhapVYf1lWE9Z6L3V/MVdxXUesylGO6jJjOjpUB+ZBItwl7 +exkhA/4iemhq4D5Jp6r1Kv3aKSPNENdhTORyfZz4UfyOsUfYncaprP5IZja0j+rd +tQLIsH8hXvCT2kSAUY6nMGmzPgpgGamtHI6gH1ZmoNX2gEF7tzGNgKMbbUmwO89B +N56U7wm68AreXE8XviRjGjAtZWnouqe5X+EiUurdJkzRwU0c2rQpVGhvdWdodFdv +cmtzIDxydWJ5d29ya3NAdGhvdWdodHdvcmtzLmNvbT6IYAQTEQIAIAUCRjlBDQIb +AwYLCQgHAwIEFQIIAwQWAgMBAh4BAheAAAoJEHM/KlUQbeB0SSYAn0sgAx5ZK975 +wZiChkIqOCyFZ9PLAJ9laivkzqT2y+Kh9FGe3TP/CAhRTbkCDQRGOUEVEAgAqxJI +MFrYV3JKyeXHVKXHNd5Nf1WdqKi37VOdSTBftiehzZdR9hxkGEknYxnbBLGJR9YD +/uJ2+DRwNBcw2RrrEmb0DCZxcLQLZ3xYa7+WvcR4/Nir/3858SGJ+wmGCHKyX2So +M2TurmKu5bqyUUaBgf+IhKfwOr9zeK3rIRhUq/aiYkw8sWA8ruUvxXwLnbkK1aP9 +hfvSqScwjkfUVk6CQ6GFUD+4N4mNRtRcZz3gYa+0jSNeEJZQOJxRuE/gBHav3eyN +dm4VAFPF20BobvBVEcMhO0KaR/X4jW1G1eFAKLxI7cdx3+vLeNPaFwHiSMSknsNs +UiucI9oV+I5S/50ZrwADBwf/StYTK9KvPnY9ZqmirBpSh0Zl0xylMtAiMblG7pKv +qKTPNr9zXooheQBpAbnhOfju0DB/OtE4V21HqnbMws2aFvHecEbO5EmjwT7ZTltH +5vlbiPrXOc7SpP22FdkOYdunM2+nsA6398mpYFEiFFNAzX6pReN2tbbmXf6zxS9n +nHjMAgl5nMuOASLZrTrUX/7yu6ySS1hy0ZVfEoAFeILy4MV8y0lVjBQa2kNOCNpO +Cc+y1+4EHLS3fuN0x+tho3rhjKAzj8KOt4XnALn8OouRMx9G7ItC2U8kNzHHFRg5 +adT/+nEthVd9q9pYLrUaze7aMQyl+7cD1KzmSe34X9B6W4hJBBgRAgAJBQJGOUEV +AhsMAAoJEHM/KlUQbeB0O7QAn09h4qrKPhWD9eaiyMRS5YeARTYgAJ9WxLcQEvkA +yOSLb33CweehCrlTnQ== +=scSy +-----END PGP PUBLIC KEY BLOCK----- diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/yum/files/yum-updatesd.conf b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/yum/files/yum-updatesd.conf new file mode 100644 index 00000000000..39181c9d6e3 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/yum/files/yum-updatesd.conf @@ -0,0 +1,20 @@ +# File Managed by Puppet +[main] +# how often to check for new updates (in seconds) +run_interval = 3600 +# how often to allow checking on request (in seconds) +updaterefresh = 600 + +# how to send notifications (valid: dbus, email, syslog) +emit_via = dbus +# should we listen via dbus to give out update information/check for +# new updates +dbus_listener = yes + +# automatically install updates +do_update = yes +# automatically download updates +do_download = no +# automatically download deps of updates +do_download_deps = no + diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/yum/manifests/cron.pp b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/yum/manifests/cron.pp new file mode 100644 index 00000000000..5b404a0b183 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/yum/manifests/cron.pp @@ -0,0 +1,47 @@ +# = Class yum::cron +# +# +class yum::cron { + + $manage_update_package = $yum::bool_update_disable ? { + true => absent, + default => present, + } + + $manage_update_service_ensure = $yum::bool_update_disable ? { + true => stopped, + default => running, + } + + $manage_update_service_enable = $yum::bool_update_disable ? { + true => false, + default => true, + } + + $manage_update_file = $yum::bool_update_disable ? { + true => absent, + default => present, + } + + package { 'yum-cron': + ensure => $manage_update_package, + } + + service { 'yum-cron': + ensure => $manage_update_service_ensure, + name => $yum::service, + enable => $manage_update_service_enable, + hasstatus => true, + hasrestart => true, + require => Package['yum-cron'], + } + + file { 'yum-cron': + ensure => $manage_update_file, + path => '/etc/sysconfig/yum-cron', + content => template($yum::update_template), + require => Package['yum-cron'], + notify => Service['yum-cron'], + } + +} diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/yum/manifests/defaults.pp b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/yum/manifests/defaults.pp new file mode 100644 index 00000000000..5d2a072d058 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/yum/manifests/defaults.pp @@ -0,0 +1,49 @@ +# = Class: yum::defaults +# +# This class manages default yum repositories for RedHat based distros: +# RHEL, Centos, Scientific Linux +# +class yum::defaults ( ) inherits yum::params { + + $osver = split($::operatingsystemrelease, '[.]') + + if $yum::extrarepo =~ /epel/ { include yum::repo::epel } + if $yum::extrarepo =~ /rpmforge/ { include yum::repo::rpmforge } + if $yum::extrarepo =~ /jpackage5/ { include yum::repo::jpackage5 } + if $yum::extrarepo =~ /jpackage6/ { include yum::repo::jpackage6 } + if $yum::extrarepo =~ /remi/ { include yum::repo::remi } + if $yum::extrarepo =~ /remi_php55/ { include yum::repo::remi_php55 } + if $yum::extrarepo =~ /tmz/ and $osver[0] != '4' { include yum::repo::tmz } + if $yum::extrarepo =~ /webtatic/ { include yum::repo::webtatic } + if $yum::extrarepo =~ /puppetlabs/ and $osver[0] != '4' { include yum::repo::puppetlabs } + if $yum::extrarepo =~ /puppetdevel/ and $osver[0] != '4' { include yum::repo::puppetdevel } + if $yum::extrarepo =~ /nginx/ and $osver[0] != '4' { include yum::repo::nginx } + if $yum::extrarepo =~ /mongodb/ and $osver[0] != '4' { include yum::repo::mongodb } + if $yum::extrarepo =~ /repoforge/ { include yum::repo::repoforge } + if $yum::extrarepo =~ /repoforgeextras/ { include yum::repo::repoforgeextras } + if $yum::extrarepo =~ /integ_ganeti/ { include yum::repo::integ_ganeti } + if $yum::extrarepo =~ /elrepo/ { include yum::repo::elrepo } + if $yum::extrarepo =~ /centalt/ { include yum::repo::centalt } + + if $yum::bool_defaultrepo { + case $::operatingsystem { + centos: { + if $osver[0] == '6' { include yum::repo::centos6 } + if $osver[0] == '5' { include yum::repo::centos5 } + if $osver[0] == '4' { include yum::repo::centos4 } + if $yum::extrarepo =~ /centos-testing/ { include yum::repo::centos_testing } + if $yum::extrarepo =~ /karan/ { include yum::repo::karan } + if $yum::extrarepo =~ /atomic/ { include yum::repo::atomic } + } + redhat: { + } + scientific: { + if $osver[0] == '6' { include yum::repo::sl6 } + if $osver[0] == '5' { include yum::repo::sl5 } + if $yum::extrarepo =~ /centos-testing/ { include yum::repo::centos_testing } + if $yum::extrarepo =~ /karan/ { include yum::repo::karan } + } + default: { } + } + } +} diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/yum/manifests/init.pp b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/yum/manifests/init.pp new file mode 100644 index 00000000000..c4617f420ba --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/yum/manifests/init.pp @@ -0,0 +1,329 @@ +# = Class: yum +# +# This class manages yum repositories for RedHat based distros: +# RHEL, Centos, Scientific Linux +# +# Copyright 2008, admin(at)immerda.ch +# Copyright 2008, Puzzle ITC GmbH +# Marcel Harry haerry+puppet(at)puzzle.ch +# Simon Josi josi+puppet(at)puzzle.ch +# +# This program is free software; you can redistribute +# it and/or modify it under the terms of the GNU +# General Public License version 3 as published by +# the Free Software Foundation. +# +# Apapted for Example42 by Alessandro Franceschi +# +# == Parameters +# +# [*install_all_keys*] +# If to provide all the module's known rpm gpgp keys. +# Default true, set to false to keep backwards compatibility +# +# [*update*] +# If you want yum automatic updates. Possibile values: +# cron - Updates in a cronjob +# updatesd - Updates via updatesd (Only on Centos/RedHat/SL 5) +# false/no - Automatic updates disabled (Default) +# +# [*update_disable*] +# Set to true if you have enabled updates and now wish to disable +# Defaults to false. Logic pertaining to this parameter is only applied +# when the update method parameter (immediately above) is set. +# +# [*defaultrepo*] +# If you want to enable default repositories for supported OS +# Default: true +# Note: This variable is ignored if you provide a custom source_repo_dir +# +# [*extrarepo*] +# If you want to enable some (supported) extra repositories +# Can be an array. Default: 'epel' +# (Epel is used by many modules) +# Note: This variable is ignored if you provide a custom source_repo_dir +# +# [*plugins_source_dir*] +# The path of the plugins configuration directory +# +# [*repo_dir*] +# The path of the yum.repos.d directory +# +# [*source_repo_dir*] +# The source path to use to populate the yum.repos.d directory +# +# [*clean_repos*] +# Boolean. Defines if you want to cleanup the yum.repos.d dir +# and be sure that it contains only files managed by Puppet +# Default: false +# +# [*my_class*] +# Name of a custom class to autoload to manage module's customizations +# If defined, yum class will automatically "include $my_class" +# Can be defined also by the (top scope) variable $yum_myclass +# +# [*source*] +# Sets the content of source parameter for main configuration file +# If defined, yum main config file will have the param: source => $source +# Can be defined also by the (top scope) variable $yum_source +# +# [*source_dir*] +# If defined, the whole yum configuration directory content is retrieved +# recursively from the specified source +# (source => $source_dir , recurse => true) +# Can be defined also by the (top scope) variable $yum_source_dir +# +# [*source_dir_purge*] +# If set to true (default false) the existing configuration directory is +# mirrored with the content retrieved from source_dir +# (source => $source_dir , recurse => true , purge => true) +# Can be defined also by the (top scope) variable $yum_source_dir_purge +# +# [*template*] +# Sets the path to the template to use as content for main configuration file +# If defined, yum main config file has: content => content("$template") +# Note source and template parameters are mutually exclusive: don't use both +# Can be defined also by the (top scope) variable $yum_template +# +# [*options*] +# An hash of custom options to be used in templates for arbitrary settings. +# Can be defined also by the (top scope) variable $yum_options +# +# [*absent*] +# Set to 'true' to remove package(s) installed by module +# Can be defined also by the (top scope) variable $yum_absent +# +# [*disable*] +# Set to 'true' to disable service(s) managed by module +# Can be defined also by the (top scope) variable $yum_disable +# +# [*disableboot*] +# Set to 'true' to disable service(s) at boot, without checks if it's running +# Use this when the service is managed by a tool like a cluster software +# Can be defined also by the (top scope) variable $yum_disableboot +# +# [*puppi*] +# Set to 'true' to enable creation of module data files that are used by puppi +# Can be defined also by the (top scope) variables $yum_puppi and $puppi +# +# [*puppi_helper*] +# Specify the helper to use for puppi commands. The default for this module +# is specified in params.pp and is generally a good choice. +# You can customize the output of puppi commands for this module using another +# puppi helper. Use the define puppi::helper to create a new custom helper +# Can be defined also by the (top scope) variables $yum_puppi_helper +# and $puppi_helper +# +# [*debug*] +# Set to 'true' to enable modules debugging +# Can be defined also by the (top scope) variables $yum_debug and $debug +# +# [*audit_only*] +# Set to 'true' if you don't intend to override existing configuration files +# and want to audit the difference between existing files and the ones +# managed by Puppet. +# Can be defined also by the (top scope) variables $yum_audit_only +# and $audit_only +# +# [*config_dir*] +# Main configuration directory. Used by puppi +# +# [*config_file*] +# Main configuration file path +# +# [*config_file_mode*] +# Main configuration file path mode +# +# [*config_file_owner*] +# Main configuration file path owner +# +# [*config_file_group*] +# Main configuration file path group +# +# [*cron_params*] +# Optional extra arguments for $update = cron ONLY +# +# [*cron_mailto*] +# Optional mail addres to send update reports for $update = cron ONLY +# +# [*cron_dotw*] +# Days of the week to perform yum updates by cron +# 0123456 (default) +# +# [*log_file*] +# Log file(s). Used by puppi +# +class yum ( + $install_all_keys = params_lookup( 'install_all_keys' ), + $update = params_lookup( 'update' ), + $update_disable = params_lookup( 'update_disable' ), + $defaultrepo = params_lookup( 'defaultrepo' ), + $extrarepo = params_lookup( 'extrarepo' ), + $plugins_source_dir = params_lookup( 'plugins_source_dir' ), + $repo_dir = params_lookup( 'repo_dir' ), + $source_repo_dir = params_lookup( 'source_repo_dir' ), + $clean_repos = params_lookup( 'clean_repos' ), + $my_class = params_lookup( 'my_class' ), + $source = params_lookup( 'source' ), + $source_dir = params_lookup( 'source_dir' ), + $source_dir_purge = params_lookup( 'source_dir_purge' ), + $template = params_lookup( 'template' ), + $options = params_lookup( 'options' ), + $absent = params_lookup( 'absent' ), + $disable = params_lookup( 'disable' ), + $disableboot = params_lookup( 'disableboot' ), + $puppi = params_lookup( 'puppi' , 'global' ), + $puppi_helper = params_lookup( 'puppi_helper' , 'global' ), + $debug = params_lookup( 'debug' , 'global' ), + $audit_only = params_lookup( 'audit_only' , 'global' ), + $config_dir = params_lookup( 'config_dir' ), + $config_file = params_lookup( 'config_file' ), + $config_file_mode = params_lookup( 'config_file_mode' ), + $config_file_owner = params_lookup( 'config_file_owner' ), + $config_file_group = params_lookup( 'config_file_group' ), + $update_template = params_lookup( 'update_template' ), + $cron_param = params_lookup( 'cron_param' ), + $cron_mailto = params_lookup( 'cron_mailto' ), + $cron_dotw = params_lookup( 'cron_dotw' ), + $log_file = params_lookup( 'log_file' ) + ) inherits yum::params { + + $bool_install_all_keys=any2bool($install_all_keys) + $bool_defaultrepo=any2bool($defaultrepo) + $bool_clean_repos=any2bool($clean_repos) + $bool_source_dir_purge=any2bool($source_dir_purge) + $bool_absent=any2bool($absent) + $bool_disable=any2bool($disable) + $bool_disableboot=any2bool($disableboot) + $bool_puppi=any2bool($puppi) + $bool_debug=any2bool($debug) + $bool_audit_only=any2bool($audit_only) + $bool_update_disable=any2bool($update_disable) + + $osver = split($::operatingsystemrelease, '[.]') + + $manage_service_enable = $yum::bool_disableboot ? { + true => false, + default => $yum::bool_disable ? { + true => false, + default => $yum::bool_absent ? { + true => false, + false => true, + }, + }, + } + + $manage_service_ensure = $yum::bool_disable ? { + true => 'stopped', + default => $yum::bool_absent ? { + true => 'stopped', + default => 'running', + }, + } + + $manage_file = $yum::bool_absent ? { + true => 'absent', + default => 'present', + } + + $manage_audit = $yum::bool_audit_only ? { + true => 'all', + false => undef, + } + + $manage_file_replace = $yum::bool_audit_only ? { + true => false, + false => true, + } + + $manage_file_source = $yum::source ? { + '' => undef, + default => $yum::source, + } + + $manage_file_content = $yum::template ? { + '' => undef, + default => template($yum::template), + } + + $manage_updates = $yum::update ? { + 'cron' => true, + 'updatesd' => true, + default => false, + } + + file { 'yum.repo_dir': + ensure => directory, + path => $yum::repo_dir, + source => $yum::source_repo_dir, + recurse => true, + purge => $yum::bool_clean_repos, + replace => $yum::manage_file_replace, + audit => $yum::manage_audit, + } + + if $yum::source_repo_dir == undef { + include yum::defaults + } + + # Yum Configuration file + file { 'yum.conf': + ensure => $yum::manage_file, + path => $yum::config_file, + mode => $yum::config_file_mode, + owner => $yum::config_file_owner, + group => $yum::config_file_group, + source => $yum::manage_file_source, + content => $yum::manage_file_content, + replace => $yum::manage_file_replace, + audit => $yum::manage_audit, + } + + # The whole yum configuration directory can be recursively overriden + if $yum::source_dir { + file { 'yum.dir': + ensure => directory, + path => $yum::config_dir, + source => $yum::source_dir, + recurse => true, + purge => $yum::source_dir_purge, + replace => $yum::manage_file_replace, + audit => $yum::manage_audit, + } + } + + ### Manage Automatic Updates + if $yum::manage_updates { + include $yum::update + } + + ### Include custom class if $my_class is set + if $yum::my_class { + include $yum::my_class + } + + + ### Provide puppi data, if enabled ( puppi => true ) + if $yum::bool_puppi == true { + $classvars=get_class_args() + puppi::ze { 'yum': + ensure => $yum::manage_file, + variables => $classvars, + helper => $yum::puppi_helper, + } + } + + ### Debugging, if enabled ( debug => true ) + if $yum::bool_debug == true { + file { 'debug_yum': + ensure => $yum::manage_file, + path => "${settings::vardir}/debug-yum", + mode => '0640', + owner => 'root', + group => 'root', + content => inline_template('<%= scope.to_hash.reject { |k,v| k.to_s =~ /(uptime.*|path|timestamp|free|.*password.*|.*psk.*|.*key)/ }.to_yaml %>'), + } + } + + +} diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/yum/manifests/managed_yumrepo.pp b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/yum/manifests/managed_yumrepo.pp new file mode 100644 index 00000000000..bc74acda903 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/yum/manifests/managed_yumrepo.pp @@ -0,0 +1,77 @@ +# = Define yum::managed_yumrepo +# +define yum::managed_yumrepo ( + $descr = 'absent', + $baseurl = 'absent', + $mirrorlist = 'absent', + $enabled = 0, + $gpgcheck = 0, + $gpgkey = 'absent', + $gpgkey_source = '', + $gpgkey_name = '', + $failovermethod = 'absent', + $priority = 99, + $protect = 'absent', + $exclude = 'absent', + $autokeyimport = 'no', + $includepkgs = 'absent') { + + # ensure that everything is setup + include yum::prerequisites + + if $protect != 'absent' { + if ! defined(Yum::Plugin['protectbase']) { + yum::plugin { 'protectbase': } + } + } + + file { "/etc/yum.repos.d/${name}.repo": + ensure => file, + replace => false, + before => Yumrepo[ $name ], + mode => '0644', + owner => 'root', + group => 0, + } + + $gpgkey_real_name = $gpgkey_name ? { + '' => url_parse($gpgkey_source,'filename'), + default => $gpgkey_name, + } + + if $gpgkey_source != '' { + if ! defined(File["/etc/pki/rpm-gpg/${gpgkey_real_name}"]) { + file { "/etc/pki/rpm-gpg/${gpgkey_real_name}": + ensure => file, + replace => false, + before => Yumrepo[ $name ], + source => $gpgkey_source, + mode => '0644', + owner => 'root', + group => 0, + } + } + } + yumrepo { $name: + descr => $descr, + baseurl => $baseurl, + mirrorlist => $mirrorlist, + enabled => $enabled, + gpgcheck => $gpgcheck, + gpgkey => $gpgkey, + failovermethod => $failovermethod, + priority => $priority, + protect => $protect, + exclude => $exclude, + includepkgs => $includepkgs, + } + + if $autokeyimport == 'yes' and $gpgkey != '' { + exec { "rpmkey_add_${gpgkey}": + command => "rpm --import ${gpgkey}", + before => Yumrepo[ $name ], + refreshonly => true, + path => '/sbin:/bin:/usr/sbin:/usr/bin', + } + } +} diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/yum/manifests/params.pp b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/yum/manifests/params.pp new file mode 100644 index 00000000000..708793bad0f --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/yum/manifests/params.pp @@ -0,0 +1,62 @@ +# = Class yum::params +# +class yum::params { + + $install_all_keys = false + + $update = false + + $defaultrepo = true + + $extrarepo = 'epel' + + $clean_repos = false + + $plugins_config_dir = '/etc/yum/pluginconf.d' + + $source_repo_dir = undef + + $repo_dir = '/etc/yum.repos.d' + + $config_dir = '/etc/yum' + + $config_file = '/etc/yum.conf' + + $config_file_mode = '0644' + + $config_file_owner = 'root' + + $config_file_group = 'root' + + $log_file = '/var/log/yum.log' + + # parameters for the auto-update classes cron.pp/updatesd.pp + $update_disable = false + + $update_template = $::operatingsystemrelease ? { + /6.*/ => 'yum/yum-cron.erb', + default => undef, + } + + # The following two params are for cron.pp only + + $cron_param = '' + + $cron_mailto = '' + + $cron_dotw = '0123456' + + $source = '' + $source_dir = '' + $source_dir_purge = false + $template = '' + $options = '' + $absent = false + $disable = false + $disableboot = false + $puppi = false + $puppi_helper = 'standard' + $debug = false + $audit_only = false + +} diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/yum/manifests/plugin.pp b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/yum/manifests/plugin.pp new file mode 100644 index 00000000000..6e5d372ace7 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/yum/manifests/plugin.pp @@ -0,0 +1,54 @@ +# Define: pagios::plugin +# +# Adds a yum plugin +# +# Usage: +# With standard source package: +# yum::plugin { 'priorities': } +# +# With custom config file source +# yum::plugin { 'priorities': +# source => 'puppet:///modules/example42/yum/plugin-priorities' +# } +# +# With custom package name (default is taken from $name) +# yum::plugin { 'priorities': +# package_name => 'yum-priorities' +# } +# +define yum::plugin ( + $package_name = '', + $source = '', + $enable = true + ) { + + include yum + + $ensure = bool2ensure( $enable ) + + $yum_plugins_prefix = $yum::osver[0] ? { + 5 => 'yum', + 6 => 'yum-plugin', + default => 'yum-plugin', + } + + $real_package_name = $package_name ? { + '' => "${yum_plugins_prefix}-${name}", + default => $package_name, + } + + package { $real_package_name : + ensure => $ensure + } + + if ( $source != '' ) { + file { "yum_plugin_conf_${name}": + ensure => $ensure, + path => "${yum::plugins_config_dir}/${name}.conf", + owner => root, + group => root, + mode => '0755', + source => $source, + } + } +} diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/yum/manifests/prerequisites.pp b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/yum/manifests/prerequisites.pp new file mode 100644 index 00000000000..def976ff396 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/yum/manifests/prerequisites.pp @@ -0,0 +1,21 @@ +# = Class yum::prerequisites +# +class yum::prerequisites { + + require yum + + yum::plugin { 'priorities': } +# yum::plugin { 'security': } + + if $yum::bool_install_all_keys == true { + file { 'rpm_gpg': + path => '/etc/pki/rpm-gpg/', + source => "puppet:///modules/yum/${::operatingsystem}.${yum::osver[0]}/rpm-gpg/", + recurse => true, + ignore => '.svn', + mode => '0644', + owner => root, + group => 0, + } + } +} diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/yum/manifests/repo/10gen.pp b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/yum/manifests/repo/10gen.pp new file mode 100644 index 00000000000..3f6bbf5d477 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/yum/manifests/repo/10gen.pp @@ -0,0 +1,12 @@ +# = Class: yum::repo::10gen +# +# This class installs the 10gen repo for MongoDB +# +class yum::repo::10gen { + yum::managed_yumrepo { '10gen': + descr => '10gen Repository', + baseurl => "http://downloads-distro.mongodb.org/repo/redhat/os/${::architecture}", + enabled => 1, + gpgcheck => 0, + } +} diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/yum/manifests/repo/atomic.pp b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/yum/manifests/repo/atomic.pp new file mode 100644 index 00000000000..13a24149dd5 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/yum/manifests/repo/atomic.pp @@ -0,0 +1,16 @@ +# = Class: yum::repo::atomic +# +# This class installs the atomic repo +# +class yum::repo::atomic { + yum::managed_yumrepo { 'atomic': + descr => 'CentOS / Red Hat Enterprise Linux $releasever - atomicrocketturtle.com', + mirrorlist => 'http://www.atomicorp.com/channels/mirrorlist/atomic/centos-$releasever-$basearch', + enabled => 1, + gpgcheck => 1, + gpgkey => 'file:///etc/pki/rpm-gpg/RPM-GPG-KEY.art', + gpgkey_source => 'puppet:///modules/yum/rpm-gpg/RPM-GPG-KEY.art', + priority => 1, + exclude => 'nmap-ncat', + } +} diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/yum/manifests/repo/atrpms.pp b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/yum/manifests/repo/atrpms.pp new file mode 100644 index 00000000000..dce3b67d47a --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/yum/manifests/repo/atrpms.pp @@ -0,0 +1,17 @@ +# = Class: yum::repo::atrpms +# +# This class installs the atrpms repo +# +class yum::repo::atrpms { + + yum::managed_yumrepo { 'centos5-atrpms': + descr => 'CentOS $releasever - $basearch - ATrpms', + baseurl => 'http://dl.atrpms.net/el$releasever-$basearch/atrpms/stable', + enabled => 1, + gpgcheck => 1, + gpgkey => 'file:///etc/pki/rpm-gpg/RPM-GPG-KEY.atrpms', + gpgkey_source => 'puppet:///modules/yum/rpm-gpg/RPM-GPG-KEY.atrpms', + priority => 30, + } + +} diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/yum/manifests/repo/centalt.pp b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/yum/manifests/repo/centalt.pp new file mode 100644 index 00000000000..238b1e19c5a --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/yum/manifests/repo/centalt.pp @@ -0,0 +1,21 @@ +# = Class: yum::repo::centalt +# +# This class installs the centalt repo +# +class yum::repo::centalt { + $osver = split($::operatingsystemrelease, '[.]') + $release = $::operatingsystem ? { + /(?i:Centos|RedHat|Scientific)/ => $osver[0], + default => '6', + } + + yum::managed_yumrepo { 'centalt': + descr => 'CentALT RPM Repository', + baseurl => "http://centos.alt.ru/repository/centos/${release}/\$basearch/", + enabled => 1, + gpgcheck => 1, + failovermethod => 'priority', + gpgkey => 'http://centos.alt.ru/repository/centos/RPM-GPG-KEY-CentALT', + priority => 1, + } +} diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/yum/manifests/repo/centos4.pp b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/yum/manifests/repo/centos4.pp new file mode 100644 index 00000000000..7d0330d9066 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/yum/manifests/repo/centos4.pp @@ -0,0 +1,61 @@ +# = Class: yum::repo::centos4 +# +# Base Centos4 repos +# +class yum::repo::centos4 { + + yum::managed_yumrepo { 'base': + descr => 'CentOS-$releasever - Base', + mirrorlist => 'http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=os', + enabled => 1, + gpgcheck => 1, + gpgkey => 'http://mirror.centos.org/centos/RPM-GPG-KEY-centos4', + priority => 1, + } + + yum::managed_yumrepo { 'updates': + descr => 'CentOS-$releasever - Updates', + mirrorlist => 'http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=updates', + enabled => 1, + gpgcheck => 1, + gpgkey => 'http://mirror.centos.org/centos/RPM-GPG-KEY-centos4', + priority => 1, + } + + yum::managed_yumrepo { 'addons': + descr => 'CentOS-$releasever - Addons', + mirrorlist => 'http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=addons', + enabled => 1, + gpgcheck => 1, + gpgkey => 'http://mirror.centos.org/centos/RPM-GPG-KEY-centos4', + priority => 1, + } + + yum::managed_yumrepo { 'extras': + descr => 'CentOS-$releasever - Extras', + mirrorlist => 'http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=extras', + enabled => 1, + gpgcheck => 1, + gpgkey => 'http://mirror.centos.org/centos/RPM-GPG-KEY-centos4', + priority => 1, + } + + yum::managed_yumrepo { 'centosplus': + descr => 'CentOS-$releasever - Centosplus', + mirrorlist => 'http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=centosplus', + enabled => 0, + gpgcheck => 1, + gpgkey => 'http://mirror.centos.org/centos/RPM-GPG-KEY-centos4', + priority => 2, + } + + yum::managed_yumrepo { 'contrib': + descr => 'CentOS-$releasever - Contrib', + mirrorlist => 'http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=contrib', + enabled => 0, + gpgcheck => 1, + gpgkey => 'http://mirror.centos.org/centos/RPM-GPG-KEY-centos4', + priority => 2, + } + +} diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/yum/manifests/repo/centos5.pp b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/yum/manifests/repo/centos5.pp new file mode 100644 index 00000000000..c48cccdefc1 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/yum/manifests/repo/centos5.pp @@ -0,0 +1,124 @@ +# = Class: yum::repo::centos5 +# +# Base Centos5 repos +# +# == Parameters: +# +# [*mirror_url*] +# A clean URL to a mirror of `rsync://msync.centos.org::CentOS`. +# The paramater is interpolated with the known directory structure to +# create a the final baseurl parameter for each yumrepo so it must be +# "clean", i.e., without a query string like `?key1=valA&key2=valB`. +# Additionally, it may not contain a trailing slash. +# Example: `http://mirror.example.com/pub/rpm/centos` +# Default: `undef` +# +class yum::repo::centos5 ( + $mirror_url = undef, +) { + + if $mirror_url { + validate_re( + $mirror_url, + '^(?:https?|ftp):\/\/[\da-zA-Z-][\da-zA-Z\.-]*\.[a-zA-Z]{2,6}\.?(?:\/[\w~-]*)*$', + '$mirror must be a Clean URL with no query-string, a fully-qualified hostname and no trailing slash.' + ) + } + + $baseurl_base = $mirror_url ? { + undef => undef, + default => "${mirror_url}/\$releasever/os/\$basearch/", + } + + $baseurl_updates = $mirror_url ? { + undef => undef, + default => "${mirror_url}/\$releasever/updates/\$basearch/", + } + + $baseurl_addons = $mirror_url ? { + undef => undef, + default => "${mirror_url}/\$releasever/addons/\$basearch/", + } + + $baseurl_extras = $mirror_url ? { + undef => undef, + default => "${mirror_url}/\$releasever/extras/\$basearch/", + } + + $baseurl_centosplus = $mirror_url ? { + undef => undef, + default => "${mirror_url}/\$releasever/centosplus/\$basearch/", + } + + $baseurl_contrib = $mirror_url ? { + undef => undef, + default => "${mirror_url}/\$releasever/contrib/\$basearch/", + } + + yum::managed_yumrepo { 'base': + descr => 'CentOS-$releasever - Base', + baseurl => $baseurl_base, + mirrorlist => 'http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=os', + failovermethod => 'priority', + enabled => 1, + gpgcheck => 1, + gpgkey => 'file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-5', + gpgkey_source => 'puppet:///modules/yum/rpm-gpg/RPM-GPG-KEY-CentOS-5', + priority => 1, + } + + yum::managed_yumrepo { 'updates': + descr => 'CentOS-$releasever - Updates', + baseurl => $baseurl_updates, + mirrorlist => 'http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=updates', + failovermethod => 'priority', + enabled => 1, + gpgcheck => 1, + gpgkey => 'file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-5', + priority => 1, + } + + yum::managed_yumrepo { 'addons': + descr => 'CentOS-$releasever - Addons', + baseurl => $baseurl_addons, + mirrorlist => 'http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=addons', + failovermethod => 'priority', + enabled => 1, + gpgcheck => 1, + gpgkey => 'file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-5', + priority => 1, + } + + yum::managed_yumrepo { 'extras': + descr => 'CentOS-$releasever - Extras', + baseurl => $baseurl_extras, + mirrorlist => 'http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=extras', + failovermethod => 'priority', + enabled => 1, + gpgcheck => 1, + gpgkey => 'file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-5', + priority => 1, + } + + yum::managed_yumrepo { 'centosplus': + descr => 'CentOS-$releasever - Centosplus', + baseurl => $baseurl_centosplus, + mirrorlist => 'http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=centosplus', + failovermethod => 'priority', + enabled => 1, + gpgcheck => 1, + gpgkey => 'file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-5', + priority => 2, + } + + yum::managed_yumrepo { 'contrib': + descr => 'CentOS-$releasever - Contrib', + baseurl => $baseurl_contrib, + mirrorlist => 'http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=contrib', + failovermethod => 'priority', + gpgcheck => 1, + gpgkey => 'file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-5', + priority => 10, + } + +} diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/yum/manifests/repo/centos6.pp b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/yum/manifests/repo/centos6.pp new file mode 100644 index 00000000000..ddfdaf46fef --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/yum/manifests/repo/centos6.pp @@ -0,0 +1,108 @@ +# = Class: yum::repo::centos6 +# +# Base Centos6 repos +# +# == Parameters: +# +# [*mirror_url*] +# A clean URL to a mirror of `rsync://msync.centos.org::CentOS`. +# The paramater is interpolated with the known directory structure to +# create a the final baseurl parameter for each yumrepo so it must be +# "clean", i.e., without a query string like `?key1=valA&key2=valB`. +# Additionally, it may not contain a trailing slash. +# Example: `http://mirror.example.com/pub/rpm/centos` +# Default: `undef` +# +class yum::repo::centos6 ( + $mirror_url = undef, +) { + + if $mirror_url { + validate_re( + $mirror_url, + '^(?:https?|ftp):\/\/[\da-zA-Z-][\da-zA-Z\.-]*\.[a-zA-Z]{2,6}\.?(?:\/[\w~-]*)*$', + '$mirror must be a Clean URL with no query-string, a fully-qualified hostname and no trailing slash.' + ) + } + + $baseurl_base = $mirror_url ? { + undef => undef, + default => "${mirror_url}/\$releasever/os/\$basearch/", + } + + $baseurl_updates = $mirror_url ? { + undef => undef, + default => "${mirror_url}/\$releasever/updates/\$basearch/", + } + + $baseurl_extras = $mirror_url ? { + undef => undef, + default => "${mirror_url}/\$releasever/extras/\$basearch/", + } + + $baseurl_centosplus = $mirror_url ? { + undef => undef, + default => "${mirror_url}/\$releasever/centosplus/\$basearch/", + } + + $baseurl_contrib = $mirror_url ? { + undef => undef, + default => "${mirror_url}/\$releasever/contrib/\$basearch/", + } + + yum::managed_yumrepo { 'base': + descr => 'CentOS-$releasever - Base', + baseurl => $baseurl_base, + mirrorlist => 'http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=os', + failovermethod => 'priority', + enabled => 1, + gpgcheck => 1, + gpgkey => 'file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6', + gpgkey_source => 'puppet:///modules/yum/rpm-gpg/RPM-GPG-KEY-CentOS-6', + priority => 1, + } + + yum::managed_yumrepo { 'updates': + descr => 'CentOS-$releasever - Updates', + baseurl => $baseurl_updates, + mirrorlist => 'http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=updates', + failovermethod => 'priority', + enabled => 1, + gpgcheck => 1, + gpgkey => 'file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6', + priority => 1, + } + + yum::managed_yumrepo { 'extras': + descr => 'CentOS-$releasever - Extras', + baseurl => $baseurl_extras, + mirrorlist => 'http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=extras', + failovermethod => 'priority', + enabled => 1, + gpgcheck => 1, + gpgkey => 'file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6', + priority => 1, + } + + yum::managed_yumrepo { 'centosplus': + descr => 'CentOS-$releasever - Centosplus', + baseurl => $baseurl_centosplus, + mirrorlist => 'http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=centosplus', + failovermethod => 'priority', + enabled => 1, + gpgcheck => 1, + gpgkey => 'file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6', + priority => 2, + } + + yum::managed_yumrepo { 'contrib': + descr => 'CentOS-$releasever - Contrib', + baseurl => $baseurl_contrib, + mirrorlist => 'http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=contrib', + failovermethod => 'priority', + gpgcheck => 1, + gpgkey => 'file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6', + priority => 10, + } + +} diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/yum/manifests/repo/centos_testing.pp b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/yum/manifests/repo/centos_testing.pp new file mode 100644 index 00000000000..a71f311bcb7 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/yum/manifests/repo/centos_testing.pp @@ -0,0 +1,23 @@ +# = Class: yum::repo::centos_testing +# +# Centos Testing +# +class yum::repo::centos_testing ( + $include_pkgs = '', + $exclude_pkgs = undef + ) { + if $include_pkgs == '' { + fail('Please configure $include_pkgs as we run the testing repo with highest repository') + } + + yum::managed_yumrepo{'centos5-testing': + descr => 'CentOS-$releasever - Testing', + baseurl => 'http://dev.centos.org/centos/$releasever/testing/$basearch', + enabled => 1, + gpgcheck => 1, + gpgkey => 'http://dev.centos.org/centos/RPM-GPG-KEY-CentOS-testing', + priority => 1, + includepkgs => $include_pkgs, + exclude => $exclude_pkgs, + } +} diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/yum/manifests/repo/ceph.pp b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/yum/manifests/repo/ceph.pp new file mode 100644 index 00000000000..33449ecf501 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/yum/manifests/repo/ceph.pp @@ -0,0 +1,20 @@ +# = Class: yum::repo::ceph +# +# This class installs the official ceph repo +# +class yum::repo::ceph ( + $release = 'emperor' +) { + + yum::managed_yumrepo { 'ceph': + descr => "Ceph ${release} repository", + baseurl => "http://ceph.com/rpm-${release}/\$releasever/\$basearch", + enabled => 1, + gpgcheck => 1, + failovermethod => 'priority', + gpgkey => 'https://ceph.com/git/?p=ceph.git;a=blob_plain;f=keys/release.asc', + autokeyimport => 'yes', + priority => 5, + } + +} diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/yum/manifests/repo/elasticsearch10.pp b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/yum/manifests/repo/elasticsearch10.pp new file mode 100644 index 00000000000..d55e8120733 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/yum/manifests/repo/elasticsearch10.pp @@ -0,0 +1,15 @@ +# = Class: yum::repo::elasticsearch10 +# +# This class installs the elasticsearch10 repo +# +class yum::repo::elasticsearch10 { + + yum::managed_yumrepo { 'elasticsearch-1.0': + descr => 'Elasticsearch repository for 1.0.x packages', + baseurl => 'http://packages.elasticsearch.org/elasticsearch/1.0/centos', + enabled => 1, + gpgcheck => 1, + gpgkey => 'http://packages.elasticsearch.org/GPG-KEY-elasticsearch', + } + +} diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/yum/manifests/repo/elasticsearch90.pp b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/yum/manifests/repo/elasticsearch90.pp new file mode 100644 index 00000000000..50e312ebab5 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/yum/manifests/repo/elasticsearch90.pp @@ -0,0 +1,15 @@ +# = Class: yum::repo::elasticsearch90 +# +# This class installs the elasticsearch90 repo +# +class yum::repo::elasticsearch90 { + + yum::managed_yumrepo { 'elasticsearch-0.90': + descr => 'Elasticsearch repository for 0.90.x packages', + baseurl => 'http://packages.elasticsearch.org/elasticsearch/0.90/centos', + enabled => 1, + gpgcheck => 1, + gpgkey => 'http://packages.elasticsearch.org/GPG-KEY-elasticsearch', + } + +} diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/yum/manifests/repo/elrepo.pp b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/yum/manifests/repo/elrepo.pp new file mode 100644 index 00000000000..60ae3e0a6cf --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/yum/manifests/repo/elrepo.pp @@ -0,0 +1,105 @@ +# = Class: yum::repo::elrepo +# +# This class installs the ELRepo repository +# +# == Parameters: +# +# [*mirror_url*] +# A clean URL to a mirror of `http://elrepo.org/linux/`. +# The paramater is interpolated with the known directory structure to +# create a the final baseurl parameter for each yumrepo so it must be +# "clean", i.e., without a query string like `?key1=valA&key2=valB`. +# Additionally, it may not contain a trailing slash. +# Example: `http://elrepo.org/linux/` +# Default: `undef` +# +class yum::repo::elrepo ( + $mirror_url = undef, +) { + + if $mirror_url { + validate_re( + $mirror_url, + '^(?:https?|ftp):\/\/[\da-zA-Z-][\da-zA-Z\.-]*\.[a-zA-Z]{2,6}\.?(?:\/[\w~-]*)*$', + '$mirror must be a Clean URL with no query-string, a fully-qualified hostname and no trailing slash.' + ) + } + + # Workaround for Facter < 1.7.0 + $osver = split($::operatingsystemrelease, '[.]') + + case $::operatingsystem { + 'RedHat','CentOS','Scientific': { + $release = "el${osver[0]}" + } + default: { + fail("${title}: Operating system '${::operatingsystem}' is not currently supported") + } + } + + $baseurl_elrepo = $mirror_url ? { + undef => undef, + default => "${mirror_url}/elrepo/${release}/\$basearch", + } + + $baseurl_elrepo_testing = $mirror_url ? { + undef => undef, + default => "${mirror_url}/testing/${release}/\$basearch", + } + + $baseurl_elrepo_kernel = $mirror_url ? { + undef => undef, + default => "${mirror_url}/kernel/${release}/\$basearch", + } + + $baseurl_elrepo_extras = $mirror_url ? { + undef => undef, + default => "${mirror_url}/extras/${release}/\$basearch", + } + + yum::managed_yumrepo { 'elrepo': + descr => "ELRepo.org Community Enterprise Linux Repository - ${release}", + baseurl => $baseurl_elrepo, + mirrorlist => "http://elrepo.org/mirrors-elrepo.${release}", + enabled => 1, + gpgcheck => 1, + gpgkey => 'file:///etc/pki/rpm-gpg/RPM-GPG-KEY-elrepo.org', + gpgkey_source => 'puppet:///modules/yum/rpm-gpg/RPM-GPG-KEY-elrepo.org', + failovermethod => 'priority', + priority => 17, + } + + yum::managed_yumrepo { 'elrepo-testing': + descr => "ELRepo.org Community Enterprise Linux Testing Repository - ${release}", + baseurl => $baseurl_elrepo_testing, + mirrorlist => "http://elrepo.org/mirrors-elrepo-testing.${release}", + enabled => 0, + gpgcheck => 1, + gpgkey => 'file:///etc/pki/rpm-gpg/RPM-GPG-KEY-elrepo.org', + failovermethod => 'priority', + priority => 17, + } + + yum::managed_yumrepo { 'elrepo-kernel': + descr => "ELRepo.org Community Enterprise Linux Kernel Repository - ${release}", + baseurl => $baseurl_elrepo_kernel, + mirrorlist => "http://elrepo.org/mirrors-elrepo-kernel.${release}", + enabled => 0, + gpgcheck => 1, + gpgkey => 'file:///etc/pki/rpm-gpg/RPM-GPG-KEY-elrepo.org', + failovermethod => 'priority', + priority => 17, + } + + yum::managed_yumrepo { 'elrepo-extras': + descr => "ELRepo.org Community Enterprise Linux Extras Repository - ${release}", + baseurl => $baseurl_elrepo_extras, + mirrorlist => "http://elrepo.org/mirrors-elrepo-extras.${release}", + enabled => 0, + gpgcheck => 1, + gpgkey => 'file:///etc/pki/rpm-gpg/RPM-GPG-KEY-elrepo.org', + failovermethod => 'priority', + priority => 17, + } + +} diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/yum/manifests/repo/epel.pp b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/yum/manifests/repo/epel.pp new file mode 100644 index 00000000000..4039d81ebd8 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/yum/manifests/repo/epel.pp @@ -0,0 +1,132 @@ +# = Class: yum::repo::epel +# +# This class installs the epel repo +# +# == Parameters: +# +# [*mirror_url*] +# A clean URL to a mirror of `http://dl.fedoraproject.org/pub/epel/`. +# The paramater is interpolated with the known directory structure to +# create a the final baseurl parameter for each yumrepo so it must be +# "clean", i.e., without a query string like `?key1=valA&key2=valB`. +# Additionally, it may not contain a trailing slash. +# Example: `http://mirror.example.com/pub/rpm/epel` +# Default: `undef` +# +class yum::repo::epel ( + $mirror_url = undef, +) { + + if $mirror_url { + validate_re( + $mirror_url, + '^(?:https?|ftp):\/\/[\da-zA-Z-][\da-zA-Z\.-]*\.[a-zA-Z]{2,6}\.?(?:\/[\w~-]*)*$', + '$mirror must be a Clean URL with no query-string, a fully-qualified hostname and no trailing slash.' + ) + } + + if $::operatingsystem == 'Amazon' { + $osver = [ '6' ] + } else { + $osver = split($::operatingsystemrelease, '[.]') + } + + $baseurl_epel = $mirror_url ? { + undef => undef, + default => "${mirror_url}/${osver[0]}/\$basearch/", + } + + $baseurl_epel_debuginfo = $mirror_url ? { + undef => undef, + default => "${mirror_url}/${osver[0]}/\$basearch/debug", + } + + $baseurl_epel_source = $mirror_url ? { + undef => undef, + default => "${mirror_url}/${osver[0]}/SRPMS/", + } + + $baseurl_epel_testing = $mirror_url ? { + undef => undef, + default => "${mirror_url}/testing/${osver[0]}/\$basearch/", + } + + $baseurl_epel_testing_debuginfo = $mirror_url ? { + undef => undef, + default => "${mirror_url}/testing/${osver[0]}/\$basearch/debug", + } + + $baseurl_epel_testing_source = $mirror_url ? { + undef => undef, + default => "${mirror_url}/testing/${osver[0]}/SRPMS/", + } + + yum::managed_yumrepo { 'epel': + descr => "Extra Packages for Enterprise Linux ${osver[0]} - \$basearch", + baseurl => $baseurl_epel, + mirrorlist => "http://mirrors.fedoraproject.org/mirrorlist?repo=epel-${osver[0]}&arch=\$basearch", + enabled => 1, + gpgcheck => 1, + failovermethod => 'priority', + gpgkey => "file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-${osver[0]}", + gpgkey_source => "puppet:///modules/yum/rpm-gpg/RPM-GPG-KEY-EPEL-${osver[0]}", + priority => 16, + } + + yum::managed_yumrepo { 'epel-debuginfo': + descr => "Extra Packages for Enterprise Linux ${osver[0]} - \$basearch - Debug", + baseurl => $baseurl_epel_debuginfo, + mirrorlist => "http://mirrors.fedoraproject.org/mirrorlist?repo=epel-${osver[0]}&arch=\$basearch", + enabled => 0, + gpgcheck => 1, + failovermethod => 'priority', + gpgkey => "file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-${osver[0]}", + priority => 16, + } + + yum::managed_yumrepo { 'epel-source': + descr => "Extra Packages for Enterprise Linux ${osver[0]} - \$basearch - Source", + baseurl => $baseurl_epel_source, + mirrorlist => "http://mirrors.fedoraproject.org/mirrorlist?repo=epel-source-${osver[0]}&arch=\$basearch", + enabled => 0, + gpgcheck => 1, + failovermethod => 'priority', + gpgkey => "file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-${osver[0]}", + priority => 16, + } + + yum::managed_yumrepo { 'epel-testing': + descr => "Extra Packages for Enterprise Linux ${osver[0]} - Testing - \$basearch", + baseurl => $baseurl_epel_testing, + mirrorlist => "http://mirrors.fedoraproject.org/mirrorlist?repo=testing-epel${osver[0]}&arch=\$basearch", + enabled => 0, + gpgcheck => 1, + failovermethod => 'priority', + gpgkey => "file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-${osver[0]}", + priority => 17, + } + + yum::managed_yumrepo { 'epel-testing-debuginfo': + descr => "Extra Packages for Enterprise Linux ${osver[0]} - Testing - \$basearch - Debug", + baseurl => $baseurl_epel_testing_debuginfo, + mirrorlist => "http://mirrors.fedoraproject.org/mirrorlist?repo=testing-debug-epel${osver[0]}&arch=\$basearch", + enabled => 0, + gpgcheck => 1, + failovermethod => 'priority', + gpgkey => "file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-${osver[0]}", + priority => 17, + } + + yum::managed_yumrepo { 'epel-testing-source': + descr => "Extra Packages for Enterprise Linux ${osver[0]} - Testing - \$basearch - Source", + baseurl => $baseurl_epel_testing_source, + mirrorlist => "http://mirrors.fedoraproject.org/mirrorlist?repo=testing-source-epel${osver[0]}&arch=\$basearch", + enabled => 0, + gpgcheck => 1, + failovermethod => 'priority', + gpgkey => "file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-${osver[0]}", + priority => 17, + } + +} + diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/yum/manifests/repo/foreman.pp b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/yum/manifests/repo/foreman.pp new file mode 100644 index 00000000000..b62b4c77474 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/yum/manifests/repo/foreman.pp @@ -0,0 +1,18 @@ +# = Class: yum::repo::foreman +# +# This class installs the foreman repo +# +class yum::repo::foreman { + + yum::managed_yumrepo { 'foreman': + descr => 'Foreman Repo', + baseurl => 'http://yum.theforeman.org/stable/', + enabled => 1, + gpgcheck => 0, + failovermethod => 'priority', + # gpgkey => 'http://yum.theforeman.org/RPM-GPG-KEY-foreman', + priority => 1, + } + +} + diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/yum/manifests/repo/integ_ganeti.pp b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/yum/manifests/repo/integ_ganeti.pp new file mode 100644 index 00000000000..f43eb97062f --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/yum/manifests/repo/integ_ganeti.pp @@ -0,0 +1,69 @@ +# = Class: yum::repo::integ_ganeti +# +# This class installs the Integ Ganeti Yum repo +# +# == Parameters: +# +# [*mirror_url*] +# A clean URL to a mirror of `http://jfut.integ.jp/linux/ganeti/`. +# The paramater is interpolated with the known directory structure to +# create a the final baseurl parameter for each yumrepo so it must be +# "clean", i.e., without a query string like `?key1=valA&key2=valB`. +# Additionally, it may not contain a trailing slash. +# Example: `http://mirror.example.com/pub/rpm/ganeti` +# Default: `undef` +# +class yum::repo::integ_ganeti ( + $mirror_url = undef, +) { + + if $mirror_url { + validate_re( + $mirror_url, + '^(?:https?|ftp):\/\/[\da-zA-Z-][\da-zA-Z\.-]*\.[a-zA-Z]{2,6}\.?(?:\/[\w~-]*)*$', + '$mirror must be a Clean URL with no query-string, a fully-qualified hostname and no trailing slash.' + ) + } + + # Workaround for Facter < 1.7.0 + $osver = split($::operatingsystemrelease, '[.]') + + case $::operatingsystem { + 'Fedora': { + $release = 'fedora' + } + 'RedHat','CentOS','Scientific': { + $release = $osver[0] + } + default: { + fail("${title}: Operating system '${::operatingsystem}' is not currently supported") + } + } + + $baseurl_integ_ganeti = $mirror_url ? { + undef => "http://jfut.integ.jp/linux/ganeti/${release}/\$basearch", + default => "${mirror_url}/${release}/\$basearch", + } + + $baseurl_integ_ganeti_source = $mirror_url ? { + undef => "http://jfut.integ.jp/linux/ganeti/${release}/SRPMS", + default => "${mirror_url}/${release}/SRPMS", + } + + yum::managed_yumrepo { 'integ-ganeti': + descr => "Integ Ganeti Packages ${osver[0]} - \$basearch", + baseurl => $baseurl_integ_ganeti, + enabled => 1, + gpgcheck => 0, + priority => 15, + } + + yum::managed_yumrepo { 'integ-ganeti-source': + descr => "Integ Ganeti Packages ${osver[0]} - Source", + baseurl => $baseurl_integ_ganeti_source, + enabled => 0, + gpgcheck => 0, + priority => 15, + } + +} diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/yum/manifests/repo/jpackage5.pp b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/yum/manifests/repo/jpackage5.pp new file mode 100644 index 00000000000..3cf0a6c88fc --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/yum/manifests/repo/jpackage5.pp @@ -0,0 +1,49 @@ +# = Class: yum::repo::jpackage5 +# +# This class installs the jpackage5 repo +# +class yum::repo::jpackage5 { + + include yum + + yum::managed_yumrepo { 'jpackage-generic-5.0': + descr => 'JPackage (free), generic', + mirrorlist => 'http://www.jpackage.org/mirrorlist.php?dist=generic&type=free&release=5.0', + failovermethod => 'priority', + gpgcheck => 1, + gpgkey => 'http://www.jpackage.org/jpackage.asc', + enabled => 1, + priority => 10, + } + + yum::managed_yumrepo { 'jpackage-generic-5.0-updates': + descr => 'JPackage (free), generic updates', + mirrorlist => 'http://www.jpackage.org/mirrorlist.php?dist=generic&type=free&release=5.0-updates', + failovermethod => 'priority', + gpgcheck => 1, + gpgkey => 'http://www.jpackage.org/jpackage.asc', + enabled => 1, + priority => 10, + } + + yum::managed_yumrepo { 'jpackage-rhel': + descr => 'JPackage (free) for Red Hat Enterprise Linux $releasever', + mirrorlist => 'http://www.jpackage.org/mirrorlist.php?dist=redhat-el-$releasever&type=free&release=5.0', + failovermethod => 'priority', + gpgcheck => 1, + gpgkey => 'http://www.jpackage.org/jpackage.asc', + enabled => 1, + priority => 10, + } + + yum::managed_yumrepo { 'jpackage-generic-5.0-devel': + descr => 'JPackage (free), generic', + baseurl => 'http://mirrors.dotsrc.org/jpackage/5.0/generic/devel', + failovermethod => 'priority', + gpgcheck => 1, + gpgkey => 'http://www.jpackage.org/jpackage.asc', + enabled => 0, + priority => 10, + } + +} diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/yum/manifests/repo/jpackage6.pp b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/yum/manifests/repo/jpackage6.pp new file mode 100644 index 00000000000..373006d1a84 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/yum/manifests/repo/jpackage6.pp @@ -0,0 +1,17 @@ +# = Class: yum::repo::jpackage6 +# +# This class installs the jpackage6 repo +# +class yum::repo::jpackage6 { + + yum::managed_yumrepo { 'jpackage': + descr => 'JPackage 6 generic', + mirrorlist => 'http://www.jpackage.org/mirrorlist.php?dist=generic&type=free&release=6.0', + failovermethod => 'priority', + gpgcheck => 1, + gpgkey => 'http://www.jpackage.org/jpackage.asc', + enabled => 1, + priority => 1, + } + +} diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/yum/manifests/repo/karan.pp b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/yum/manifests/repo/karan.pp new file mode 100644 index 00000000000..96059ec3758 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/yum/manifests/repo/karan.pp @@ -0,0 +1,44 @@ +# = Class: yum::repo::karan +# +# This class installs the karan repo +# +class yum::repo::karan { + + yum::managed_yumrepo { 'kbs-CentOS-Extras': + descr => 'CentOS.Karan.Org-EL$releasever - Stable', + baseurl => 'http://centos.karan.org/el$releasever/extras/stable/$basearch/RPMS/', + enabled => 1, + gpgcheck => 1, + gpgkey => 'file:///etc/pki/rpm-gpg/RPM-GPG-KEY-kbsingh', + gpgkey_source => 'puppet:///modules/yum/rpm-gpg/RPM-GPG-KEY-kbsingh', + priority => 20, + } + + yum::managed_yumrepo { 'kbs-CentOS-Extras-Testing': + descr => 'CentOS.Karan.Org-EL$releasever - Testing', + baseurl => 'http://centos.karan.org/el$releasever/extras/testing/$basearch/RPMS/', + enabled => 0, + gpgcheck => 1, + gpgkey => 'file:///etc/pki/rpm-gpg/RPM-GPG-KEY-kbsingh', + priority => 20, + } + + yum::managed_yumrepo { 'kbs-CentOS-Misc': + descr => 'CentOS.Karan.Org-EL$releasever - Stable', + baseurl => 'http://centos.karan.org/el$releasever/misc/stable/$basearch/RPMS/', + enabled => 1, + gpgcheck => 1, + gpgkey => 'file:///etc/pki/rpm-gpg/RPM-GPG-KEY-kbsingh', + priority => 20, + } + + yum::managed_yumrepo { 'kbs-CentOS-Misc-Testing': + descr => 'CentOS.Karan.Org-EL$releasever - Testing', + baseurl => 'http://centos.karan.org/el$releasever/misc/testing/$basearch/RPMS/', + enabled => 0, + gpgcheck => 1, + gpgkey => 'file:///etc/pki/rpm-gpg/RPM-GPG-KEY-kbsingh', + priority => 20, + } + +} diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/yum/manifests/repo/logstash13.pp b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/yum/manifests/repo/logstash13.pp new file mode 100644 index 00000000000..9e6ca82c708 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/yum/manifests/repo/logstash13.pp @@ -0,0 +1,15 @@ +# = Class: yum::repo::logstash13 +# +# This class installs the logstash13 repo +# +class yum::repo::logstash13 { + + yum::managed_yumrepo { 'logstash-1.3': + descr => 'logstash repository for 1.3.x packages', + baseurl => 'http://packages.elasticsearch.org/logstash/1.3/centos', + enabled => 1, + gpgcheck => 1, + gpgkey => 'http://packages.elasticsearch.org/GPG-KEY-elasticsearch', + } + +} diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/yum/manifests/repo/mongodb.pp b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/yum/manifests/repo/mongodb.pp new file mode 100644 index 00000000000..9b2f6968af4 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/yum/manifests/repo/mongodb.pp @@ -0,0 +1,15 @@ +# = Class: yum::repo::mongodb +# +# This class installs the mongodb repo +# +class yum::repo::mongodb { + + yum::managed_yumrepo { 'mongodb': + descr => '10gen MongoDB Repo', + baseurl => 'http://downloads-distro.mongodb.org/repo/redhat/os/x86_64', + enabled => 1, + gpgcheck => 0, + } + +} + diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/yum/manifests/repo/monitoringsucks.pp b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/yum/manifests/repo/monitoringsucks.pp new file mode 100644 index 00000000000..8ebea58a5ff --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/yum/manifests/repo/monitoringsucks.pp @@ -0,0 +1,16 @@ +# = Class: yum::repo::monitoringsucks +# +# This class installs the monitoringsucks repo +# +class yum::repo::monitoringsucks { + + yum::managed_yumrepo { 'monitoringsucks': + descr => 'MonitoringSuck at Inuits', + baseurl => 'http://pulp.inuits.eu/pulp/repos/monitoring', + enabled => 1, + gpgcheck => 0, + failovermethod => 'priority', + priority => 99, + } + +} diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/yum/manifests/repo/newrelic.pp b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/yum/manifests/repo/newrelic.pp new file mode 100644 index 00000000000..3d81ae09a06 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/yum/manifests/repo/newrelic.pp @@ -0,0 +1,15 @@ +# = Class: yum::repo::newrelic +# +# This class installs the newrelic repo +# +class yum::repo::newrelic { + + yum::managed_yumrepo { 'newrelic': + descr => 'Newrelic official release packages', + baseurl => 'http://yum.newrelic.com/pub/newrelic/el5/$basearch/', + enabled => 1, + gpgcheck => 0, + priority => 1, + } + +} diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/yum/manifests/repo/nginx.pp b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/yum/manifests/repo/nginx.pp new file mode 100644 index 00000000000..c361aa33cde --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/yum/manifests/repo/nginx.pp @@ -0,0 +1,16 @@ +# = Class: yum::repo::nginx +# +# This class installs the nginx repo +# +class yum::repo::nginx { + $osver = split($::operatingsystemrelease, '[.]') + + yum::managed_yumrepo { 'nginx': + descr => 'Nginx official release packages', + baseurl => "http://nginx.org/packages/rhel/${osver[0]}/\$basearch/", + enabled => 1, + gpgcheck => 0, + priority => 1, + } + +} diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/yum/manifests/repo/openstack_grizzly.pp b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/yum/manifests/repo/openstack_grizzly.pp new file mode 100644 index 00000000000..175916194f6 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/yum/manifests/repo/openstack_grizzly.pp @@ -0,0 +1,15 @@ +# = Class: yum::repo::openstack_grizzly +# +# This class installs the EPEL-6 repo for OpenStack Grizzly +# +class yum::repo::openstack_grizzly { + + yum::managed_yumrepo { 'epel-openstack-grizzly': + descr => 'OpenStack Grizzly Repository for EPEL 6', + baseurl => 'http://repos.fedorapeople.org/repos/openstack/openstack-grizzly/epel-6', + enabled => 1, + gpgcheck => 0, + failovermethod => 'priority', + priority => 1, + } +} diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/yum/manifests/repo/passenger.pp b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/yum/manifests/repo/passenger.pp new file mode 100644 index 00000000000..c80d668bbea --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/yum/manifests/repo/passenger.pp @@ -0,0 +1,20 @@ +# = Class: yum::repo::passenger +# +# This class installs the passenger repo +# +class yum::repo::passenger { + + yum::managed_yumrepo { 'passenger': + descr => 'Red Hat Enterprise $releasever - Phusion Passenger', + baseurl => 'http://passenger.stealthymonkeys.com/rhel/$releasever/$basearch', + mirrorlist => 'http://passenger.stealthymonkeys.com/rhel/mirrors', + enabled => 1 , + gpgcheck => 0, # To fix key autoimport + failovermethod => 'priority', + gpgkey => 'http://passenger.stealthymonkeys.com/RPM-GPG-KEY-stealthymonkeys.asc', + autokeyimport => 'yes', + priority => 20, + } + +} + diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/yum/manifests/repo/pgdg91.pp b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/yum/manifests/repo/pgdg91.pp new file mode 100644 index 00000000000..89fe7c9cf4f --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/yum/manifests/repo/pgdg91.pp @@ -0,0 +1,18 @@ +# = Class: yum::repo::pdgd91 +# +# This class installs the postgresql 9.1 repo +# +class yum::repo::pgdg91 { + + yum::managed_yumrepo { 'pgdg91': + descr => 'PostgreSQL 9.1 $releasever - $basearch', + baseurl => 'http://yum.postgresql.org/9.1/redhat/rhel-$releasever-$basearch', + enabled => 1, + gpgcheck => 1, + gpgkey => 'file:///etc/pki/rpm-gpg/RPM-GPG-KEY-PGDG', + gpgkey_source => 'puppet:///modules/yum/rpm-gpg/RPM-GPG-KEY-PGDG', + priority => 20, + } + +} + diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/yum/manifests/repo/pgdg92.pp b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/yum/manifests/repo/pgdg92.pp new file mode 100644 index 00000000000..fe2dc057e69 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/yum/manifests/repo/pgdg92.pp @@ -0,0 +1,18 @@ +# = Class: yum::repo::pdgd92 +# +# This class installs the postgresql 9.2 repo +# +class yum::repo::pgdg92 { + + yum::managed_yumrepo { 'pgdg92': + descr => 'PostgreSQL 9.2 $releasever - $basearch', + baseurl => 'http://yum.postgresql.org/9.2/redhat/rhel-$releasever-$basearch', + enabled => 1, + gpgcheck => 1, + gpgkey => 'file:///etc/pki/rpm-gpg/RPM-GPG-KEY-PGDG', + gpgkey_source => 'puppet:///modules/yum/rpm-gpg/RPM-GPG-KEY-PGDG', + priority => 20, + } + +} + diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/yum/manifests/repo/pgdg93.pp b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/yum/manifests/repo/pgdg93.pp new file mode 100644 index 00000000000..c3064ba12f5 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/yum/manifests/repo/pgdg93.pp @@ -0,0 +1,18 @@ +# = Class: yum::repo::pdgd93 +# +# This class installs the postgresql 9.3 repo +# +class yum::repo::pgdg93 { + + yum::managed_yumrepo { 'pgdg93': + descr => 'PostgreSQL 9.3 $releasever - $basearch', + baseurl => 'http://yum.postgresql.org/9.3/redhat/rhel-$releasever-$basearch', + enabled => 1, + gpgcheck => 1, + gpgkey => 'file:///etc/pki/rpm-gpg/RPM-GPG-KEY-PGDG', + gpgkey_source => 'puppet:///modules/yum/rpm-gpg/RPM-GPG-KEY-PGDG', + priority => 20, + } + +} + diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/yum/manifests/repo/puppetdevel.pp b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/yum/manifests/repo/puppetdevel.pp new file mode 100644 index 00000000000..1e553bedb4a --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/yum/manifests/repo/puppetdevel.pp @@ -0,0 +1,27 @@ +# = Class: yum::repo::puppetdevel +# +# This class installs the puppetdevel repo +# +class yum::repo::puppetdevel { + + yum::managed_yumrepo { 'puppetlabs_devel': + descr => 'Puppet Labs Packages - Devel', + baseurl => 'http://yum.puppetlabs.com/el/$releasever/devel/$basearch', + enabled => 1, + gpgcheck => 1, + failovermethod => 'priority', + gpgkey => 'http://yum.puppetlabs.com/RPM-GPG-KEY-puppetlabs', + priority => 15, + } + + yum::managed_yumrepo { 'puppetlabs_dependencies': + descr => 'Puppet Labs Packages - Dependencies', + baseurl => 'http://yum.puppetlabs.com/el/$releasever/dependencies/$basearch', + enabled => 1, + gpgcheck => 1, + failovermethod => 'priority', + gpgkey => 'http://yum.puppetlabs.com/RPM-GPG-KEY-puppetlabs', + priority => 15, + } + +} diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/yum/manifests/repo/puppetlabs.pp b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/yum/manifests/repo/puppetlabs.pp new file mode 100644 index 00000000000..0b3f5ea996a --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/yum/manifests/repo/puppetlabs.pp @@ -0,0 +1,36 @@ +# = Class: yum::repo::puppetlabs +# +# This class installs the puppetlabs repo +# +class yum::repo::puppetlabs { + $osver = split($::operatingsystemrelease, '[.]') + $release = $::operatingsystem ? { + /(?i:Centos|RedHat|Scientific)/ => $osver[0], + default => '6', + } + + yum::managed_yumrepo { 'puppetlabs': + descr => 'Puppet Labs Packages', + baseurl => "http://yum.puppetlabs.com/el/${release}/products/\$basearch", + enabled => 1, + gpgcheck => 1, + failovermethod => 'priority', + gpgkey => 'http://yum.puppetlabs.com/RPM-GPG-KEY-puppetlabs', + priority => 1, + } + + # The dependencies repo has the same priority as base, + # because it needs to override base packages. + # E.g. puppet-3.0 requires Ruby => 1.8.7, but EL5 ships with 1.8.5. + # + yum::managed_yumrepo { 'puppetlabs_dependencies': + descr => 'Puppet Labs Packages', + baseurl => "http://yum.puppetlabs.com/el/${release}/dependencies/\$basearch", + enabled => 1, + gpgcheck => 1, + failovermethod => 'priority', + gpgkey => 'http://yum.puppetlabs.com/RPM-GPG-KEY-puppetlabs', + priority => 1, + } + +} diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/yum/manifests/repo/rbel.pp b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/yum/manifests/repo/rbel.pp new file mode 100644 index 00000000000..85d22bff89f --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/yum/manifests/repo/rbel.pp @@ -0,0 +1,20 @@ +# = Class: yum::repo::rbel +# +# This class installs the rbel repo +# +class yum::repo::rbel { + + $osver = split($::operatingsystemrelease, '[.]') + yum::managed_yumrepo { 'rbel': + descr => 'RBEL Repo', + baseurl => "http://rbel.frameos.org/stable/el${osver[0]}/\$basearch", + enabled => 1, + gpgcheck => 0, + failovermethod => 'priority', + gpgkey => 'file:///etc/pki/rpm-gpg/RPM-GPG-KEY-RBEL' , + gpgkey_source => 'puppet:///modules/yum/rpm-gpg/RPM-GPG-KEY-RBEL', + priority => 16, + } + +} + diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/yum/manifests/repo/remi.pp b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/yum/manifests/repo/remi.pp new file mode 100644 index 00000000000..f27d6c9a290 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/yum/manifests/repo/remi.pp @@ -0,0 +1,25 @@ +# = Class: yum::repo::remi +# +# This class installs the remi repo +# +class yum::repo::remi { + yum::managed_yumrepo { 'remi': + descr => 'Les RPM de remi pour Enterpise Linux $releasever - $basearch', + mirrorlist => 'http://rpms.famillecollet.com/enterprise/$releasever/remi/mirror', + enabled => 1, + gpgcheck => 1, + gpgkey => 'file:///etc/pki/rpm-gpg/RPM-GPG-KEY-remi', + gpgkey_source => 'puppet:///modules/yum/rpm-gpg/RPM-GPG-KEY-remi', + priority => 1, + } + + yum::managed_yumrepo { 'remi-test': + descr => 'Les RPM de remi pour Enterpise Linux $releasever - $basearch - Test', + mirrorlist => 'http://rpms.famillecollet.com/enterprise/$releasever/test/mirror', + enabled => 0, + gpgcheck => 1, + gpgkey => 'file:///etc/pki/rpm-gpg/RPM-GPG-KEY-remi', + gpgkey_source => 'puppet:///modules/yum/rpm-gpg/RPM-GPG-KEY-remi', + priority => 1, + } +} diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/yum/manifests/repo/remi_php55.pp b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/yum/manifests/repo/remi_php55.pp new file mode 100755 index 00000000000..13a9412f5a4 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/yum/manifests/repo/remi_php55.pp @@ -0,0 +1,15 @@ +# = Class: yum::repo::remi_php55 +# +# This class installs the remi-php55 repo +# +class yum::repo::remi_php55 { + yum::managed_yumrepo { 'remi-php55': + descr => 'Les RPM de remi pour Enterpise Linux $releasever - $basearch - PHP 5.5', + mirrorlist => 'http://rpms.famillecollet.com/enterprise/$releasever/php55/mirror', + enabled => 1, + gpgcheck => 1, + gpgkey => 'file:///etc/pki/rpm-gpg/RPM-GPG-KEY-remi', + gpgkey_source => 'puppet:///modules/yum/rpm-gpg/RPM-GPG-KEY-remi', + priority => 1, + } +} diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/yum/manifests/repo/repoforge.pp b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/yum/manifests/repo/repoforge.pp new file mode 100644 index 00000000000..b43e57dc565 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/yum/manifests/repo/repoforge.pp @@ -0,0 +1,18 @@ +# = Class: yum::repo::repoforge +# +# This class installs the repoforge repo +# +class yum::repo::repoforge { + + yum::managed_yumrepo { 'repoforge': + descr => 'RepoForge packages', + baseurl => 'http://apt.sw.be/redhat/el$releasever/en/$basearch/rpmforge', + enabled => 1, + gpgcheck => 1, + gpgkey => 'file:///etc/pki/rpm-gpg/RPM-GPG-KEY-rpmforge-dag', + gpgkey_source => 'puppet:///modules/yum/rpm-gpg/RPM-GPG-KEY-rpmforge-dag', + priority => 1, + exclude => 'nagios-*', + } + +} diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/yum/manifests/repo/repoforgeextras.pp b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/yum/manifests/repo/repoforgeextras.pp new file mode 100644 index 00000000000..5242b5849a9 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/yum/manifests/repo/repoforgeextras.pp @@ -0,0 +1,17 @@ +# = Class: yum::repo::repoforgeextras +# +# This class installs the repoforge extras repo +# +class yum::repo::repoforgeextras { + + yum::managed_yumrepo { 'repoforgeextras': + descr => 'RepoForge extra packages', + baseurl => 'http://apt.sw.be/redhat/el$releasever/en/$basearch/extras', + enabled => 1, + gpgcheck => 1, + gpgkey => 'file:///etc/pki/rpm-gpg/RPM-GPG-KEY-rpmforge-dag', + priority => 1, + exclude => 'perl-IO-Compress-* perl-DBD-MySQL', + } + +} diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/yum/manifests/repo/rpmforge.pp b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/yum/manifests/repo/rpmforge.pp new file mode 100644 index 00000000000..d6c048d2f43 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/yum/manifests/repo/rpmforge.pp @@ -0,0 +1,17 @@ +# = Class: yum::repo::rpmforge +# +# This class installs the rpmforce repo +# +class yum::repo::rpmforge { + + yum::managed_yumrepo { 'rpmforge-rhel5': + descr => 'RPMForge RHEL5 packages', + baseurl => 'http://wftp.tu-chemnitz.de/pub/linux/dag/redhat/el$releasever/en/$basearch/dag', + enabled => 1, + gpgcheck => 1, + gpgkey => 'file:///etc/pki/rpm-gpg/RPM-GPG-KEY-rpmforge-dag', + gpgkey_source => 'puppet:///modules/yum/rpm-gpg/RPM-GPG-KEY-rpmforge-dag', + priority => 30, + } + +} diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/yum/manifests/repo/sl5.pp b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/yum/manifests/repo/sl5.pp new file mode 100644 index 00000000000..39f2633641c --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/yum/manifests/repo/sl5.pp @@ -0,0 +1,77 @@ +# = Class: yum::repo::sl5 +# +# Base Scientific Linux 5 repos +# +# == Parameters: +# +# [*mirror_url*] +# A clean URL to a mirror of `http://ftp.scientificlinux.org/linux/scientific/`. +# The paramater is interpolated with the known directory structure to +# create a the final baseurl parameter for each yumrepo so it must be +# "clean", i.e., without a query string like `?key1=valA&key2=valB`. +# Additionally, it may not contain a trailing slash. +# Example: `http://mirror.example.com/pub/rpm/scientific` +# Default: `undef` +# +class yum::repo::sl5 ( + $mirror_url = undef, +) { + + if $mirror_url { + validate_re( + $mirror_url, + '^(?:https?|ftp):\/\/[\da-zA-Z-][\da-zA-Z\.-]*\.[a-zA-Z]{2,6}\.?(?:\/[\w~-]*)*$', + '$mirror must be a Clean URL with no query-string, a fully-qualified hostname and no trailing slash.' + ) + } + + $baseurl_sl5x = $mirror_url ? { + undef => undef, + default => "${mirror_url}/5x/\$basearch/os/", + } + + $baseurl_sl5x_security = $mirror_url ? { + undef => undef, + default => "${mirror_url}/5x/\$basearch/updates/security/", + } + + $baseurl_sl5x_fastbugs = $mirror_url ? { + undef => undef, + default => "${mirror_url}/5x/\$basearch/updates/fastbugs/", + } + + yum::managed_yumrepo { 'sl5x': + descr => 'Scientific Linux 5x - $basearch', + baseurl => $baseurl_sl5x, + mirrorlist => 'http://ftp.scientificlinux.org/linux/scientific/mirrorlist/sl-base-5x.txt', + failovermethod => 'priority', + enabled => 1, + gpgcheck => 1, + gpgkey => 'file:///etc/pki/rpm-gpg/RPM-GPG-KEY-sl file:///etc/pki/rpm-gpg/RPM-GPG-KEY-dawson', + gpgkey_source => 'puppet:///modules/yum/rpm-gpg/RPM-GPG-KEY-sl', + priority => 10, + } + + yum::managed_yumrepo { 'sl5x-security': + descr => 'Scientific Linux 5x - $basearch - security updates', + baseurl => $baseurl_sl5x_security, + mirrorlist => 'http://ftp.scientificlinux.org/linux/scientific/mirrorlist/sl-security-5x.txt', + failovermethod => 'priority', + enabled => 1, + gpgcheck => 1, + gpgkey => 'file:///etc/pki/rpm-gpg/RPM-GPG-KEY-sl file:///etc/pki/rpm-gpg/RPM-GPG-KEY-dawson', + priority => 10, + } + + yum::managed_yumrepo { 'sl5x-fastbugs': + descr => 'Scientific Linux 5x - $basearch - fastbug updates', + baseurl => $baseurl_sl5x_fastbugs, + mirrorlist => 'http://ftp.scientificlinux.org/linux/scientific/mirrorlist/sl-fastbugs-5x.txt', + failovermethod => 'priority', + enabled => 0, + gpgcheck => 1, + gpgkey => 'file:///etc/pki/rpm-gpg/RPM-GPG-KEY-sl file:///etc/pki/rpm-gpg/RPM-GPG-KEY-dawson', + priority => 10, + } + +} diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/yum/manifests/repo/sl6.pp b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/yum/manifests/repo/sl6.pp new file mode 100644 index 00000000000..4e2daa4e453 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/yum/manifests/repo/sl6.pp @@ -0,0 +1,74 @@ +# = Class: yum::repo::sl6 +# +# Base Scientific Linux 6 repos +# +# == Parameters: +# +# [*mirror_url*] +# A clean URL to a mirror of `http://ftp.scientificlinux.org/linux/scientific/`. +# The paramater is interpolated with the known directory structure to +# create a the final baseurl parameter for each yumrepo so it must be +# "clean", i.e., without a query string like `?key1=valA&key2=valB`. +# Additionally, it may not contain a trailing slash. +# Example: `http://mirror.example.com/pub/rpm/scientific` +# Default: `undef` +# +class yum::repo::sl6 ( + $mirror_url = undef, +) { + + if $mirror_url { + validate_re( + $mirror_url, + '^(?:https?|ftp):\/\/[\da-zA-Z-][\da-zA-Z\.-]*\.[a-zA-Z]{2,6}\.?(?:\/[\w~-]*)*$', + '$mirror must be a Clean URL with no query-string, a fully-qualified hostname and no trailing slash.' + ) + } + + $baseurl_sl6x = $mirror_url ? { + undef => undef, + default => "${mirror_url}/6x/\$basearch/os/", + } + + $baseurl_sl6x_security = $mirror_url ? { + undef => undef, + default => "${mirror_url}/6x/\$basearch/updates/security/", + } + + $baseurl_sl6x_fastbugs = $mirror_url ? { + undef => undef, + default => "${mirror_url}/6x/\$basearch/updates/fastbugs/", + } + + yum::managed_yumrepo { 'sl6x': + descr => 'Scientific Linux 6x - $basearch', + baseurl => $baseurl_sl6x, + mirrorlist => 'http://ftp.scientificlinux.org/linux/scientific/mirrorlist/sl-base-6x.txt', + failovermethod => 'priority', + enabled => 1, + gpgcheck => 1, + gpgkey => 'file:///etc/pki/rpm-gpg/RPM-GPG-KEY-sl file:///etc/pki/rpm-gpg/RPM-GPG-KEY-dawson', + gpgkey_source => 'puppet:///modules/yum/rpm-gpg/RPM-GPG-KEY-sl', + } + + yum::managed_yumrepo { 'sl6x-security': + descr => 'Scientific Linux 6x - $basearch - security updates', + baseurl => $baseurl_sl6x_security, + mirrorlist => 'http://ftp.scientificlinux.org/linux/scientific/mirrorlist/sl-security-6x.txt', + failovermethod => 'priority', + enabled => 1, + gpgcheck => 1, + gpgkey => 'file:///etc/pki/rpm-gpg/RPM-GPG-KEY-sl file:///etc/pki/rpm-gpg/RPM-GPG-KEY-dawson', + } + + yum::managed_yumrepo { 'sl6x-fastbugs': + descr => 'Scientific Linux 6x - $basearch - fastbug updates', + baseurl => $baseurl_sl6x_fastbugs, + mirrorlist => 'http://ftp.scientificlinux.org/linux/scientific/mirrorlist/sl-fastbugs-6x.txt', + failovermethod => 'priority', + enabled => 0, + gpgcheck => 1, + gpgkey => 'file:///etc/pki/rpm-gpg/RPM-GPG-KEY-sl file:///etc/pki/rpm-gpg/RPM-GPG-KEY-dawson', + } + +} diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/yum/manifests/repo/tmz.pp b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/yum/manifests/repo/tmz.pp new file mode 100644 index 00000000000..f53ba9a0f3b --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/yum/manifests/repo/tmz.pp @@ -0,0 +1,27 @@ +# = Class: yum::repo::tmz +# +# This class installs the tmz repo +# +class yum::repo::tmz { + + yum::managed_yumrepo { 'tmz-puppet': + descr => 'Puppet for EL $releasever - $basearch', + baseurl => 'http://tmz.fedorapeople.org/repo/puppet/epel/$releasever/$basearch', + enabled => 1, + gpgcheck => 1, + failovermethod => 'priority', + gpgkey => 'http://tmz.fedorapeople.org/repo/RPM-GPG-KEY-tmz', + priority => 16, + } + + yum::managed_yumrepo { 'tmz-puppet-source': + descr => 'Puppet for EL $releasever - Source', + baseurl => 'http://tmz.fedorapeople.org/repo/puppet/epel/$releasever/SRPMS', + enabled => 0, + gpgcheck => 1, + failovermethod => 'priority', + gpgkey => 'http://tmz.fedorapeople.org/repo/RPM-GPG-KEY-tmz', + priority => 16, + } + +} diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/yum/manifests/repo/varnish.pp b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/yum/manifests/repo/varnish.pp new file mode 100644 index 00000000000..75cc4584752 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/yum/manifests/repo/varnish.pp @@ -0,0 +1,17 @@ +# = Class: yum::repo::varnish +# +# This class installs the varnish 3.0 repo +# +class yum::repo::varnish { + + yum::managed_yumrepo { 'varnish': + descr => 'Varnish 3.0 for Enterprise Linux 5 - $basearch', + baseurl => 'http://repo.varnish-cache.org/redhat/varnish-3.0/el5/$basearch', + enabled => 1, + gpgcheck => 0, + failovermethod => 'priority', + # gpgkey => 'http://yum.theforeman.org/RPM-GPG-KEY-VARNISH', + priority => 26, + } + +} diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/yum/manifests/repo/vfabric.pp b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/yum/manifests/repo/vfabric.pp new file mode 100644 index 00000000000..7e7847de317 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/yum/manifests/repo/vfabric.pp @@ -0,0 +1,20 @@ +# = Class: yum::repo::vfabric +# +# This class installs the vfabric repo +# +class yum::repo::vfabric { + + $osver = split($::operatingsystemrelease, '[.]') + + yum::managed_yumrepo { 'vfabric': + descr => 'vFabric 5.2 Repo - $basesearch', + baseurl => "http://repo.vmware.com/pub/rhel${osver[0]}/vfabric/5.2/\$basearch", + enabled => 1, + gpgcheck => 1, + failovermethod => 'priority', + gpgkey => "http://repo.vmware.com/pub/rhel${osver[0]}/vfabric/5.2/RPM-GPG-KEY-VFABRIC-5.2-EL${osver[0]}", + priority => 1, + } + +} + diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/yum/manifests/repo/virtualbox.pp b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/yum/manifests/repo/virtualbox.pp new file mode 100644 index 00000000000..171acf2df34 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/yum/manifests/repo/virtualbox.pp @@ -0,0 +1,18 @@ +# = Class: yum::repo::virtualbox +# +# This class installs the virtualbox repo +# +class yum::repo::virtualbox { + + yum::managed_yumrepo { 'virtualbox': + descr => 'RHEL/CentOS-$releasever / $basearch - VirtualBox', + baseurl => 'http://download.virtualbox.org/virtualbox/rpm/rhel/$releasever/$basearch', + enabled => 1, + gpgcheck => 1, + failovermethod => 'priority', + gpgkey => 'http://download.virtualbox.org/virtualbox/debian/oracle_vbox.asc', + autokeyimport => 'yes', + priority => 18, + } + +} diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/yum/manifests/repo/webtatic.pp b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/yum/manifests/repo/webtatic.pp new file mode 100644 index 00000000000..adf9c5d8f1d --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/yum/manifests/repo/webtatic.pp @@ -0,0 +1,19 @@ +# = Class: yum::repo::webtatic +# +# This class installs the webtatic repo +# +class yum::repo::webtatic { + $osver = split($::operatingsystemrelease, '[.]') + yum::managed_yumrepo { 'webtatic': + descr => 'Webtatic Repository $releasever - $basearch', + mirrorlist => $osver[0] ? { + 5 => 'http://repo.webtatic.com/yum/centos/5/$basearch/mirrorlist', + 6 => 'http://repo.webtatic.com/yum/el6/$basearch/mirrorlist', + }, + enabled => 1, + gpgcheck => 1, + gpgkey => 'file:///etc/pki/rpm-gpg/RPM-GPG-KEY-webtatic-andy', + gpgkey_source => 'puppet:///modules/yum/rpm-gpg/RPM-GPG-KEY-webtatic-andy', + priority => 1, + } +} diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/yum/manifests/updatesd.pp b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/yum/manifests/updatesd.pp new file mode 100644 index 00000000000..264541d2a5c --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/yum/manifests/updatesd.pp @@ -0,0 +1,50 @@ +# Class yum::updatesd +# +# Installs and enables yum updatesd +# +# +class yum::updatesd { + + require yum + + $manage_update_package = $yum::bool_update_disable ? { + true => absent, + default => present, + } + + $manage_update_service_ensure = $yum::bool_update_disable ? { + true => stopped, + default => running, + } + + $manage_update_service_enable = $yum::bool_update_disable ? { + true => false, + default => true, + } + + $manage_update_file = $yum::bool_update_disable ? { + true => absent, + default => present, + } + + package { 'yum-updatesd': + ensure => $manage_update_package, + name => 'yum-updatesd', + } + + service { 'yum-updatesd': + ensure => $manage_update_service_ensure, + enable => $manage_update_service_enable, + hasstatus => true, + hasrestart => true, + require => Package['yum-updatesd'], + } + + file { 'yum-updatesd.conf': + ensure => $manage_update_file, + path => '/etc/yum/yum-updatesd.conf', + source => 'puppet:///modules/yum/yum-updatesd.conf', + require => Package['yum-updatesd'], + } + +} diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/yum/spec/classes/yum_spec.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/yum/spec/classes/yum_spec.rb new file mode 100644 index 00000000000..62d9f9c65ac --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/yum/spec/classes/yum_spec.rb @@ -0,0 +1,23 @@ +require "#{File.join(File.dirname(__FILE__),'..','spec_helper.rb')}" + +describe 'yum' do + + let(:title) { 'yum' } + let(:node) { 'rspec.example42.com' } + let(:facts) { { :ipaddress => '10.42.42.42' } } + + describe 'Test minimal installation' do + it { should contain_file('yum.conf').with_ensure('present') } + end + + describe 'Test decommissioning - absent' do + let(:params) { {:absent => true } } + it 'should remove yum configuration file' do should contain_file('yum.conf').with_ensure('absent') end + end + + describe 'Test customizations - source' do + let(:params) { {:source => "puppet:///modules/yum/spec"} } + it { should contain_file('yum.conf').with_source('puppet:///modules/yum/spec') } + end + +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/yum/spec/spec_helper.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/yum/spec/spec_helper.rb new file mode 100644 index 00000000000..2c6f56649ae --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/yum/spec/spec_helper.rb @@ -0,0 +1 @@ +require 'puppetlabs_spec_helper/module_spec_helper' diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/yum/templates/yum-cron.erb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/yum/templates/yum-cron.erb new file mode 100644 index 00000000000..f4f5971a83c --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/yum/templates/yum-cron.erb @@ -0,0 +1,62 @@ +# +# File Managed by Puppet +# +# Pass any given paramter to yum, as run in all the scripts invoked +# by this package. Be aware that this is global, and yum is invoked in +# several modes by these scripts for which your own parameter might not +# be appropriate +YUM_PARAMETER=<%= scope.lookupvar('yum::cron_param') %> + +# Don't install, just check (valid: yes|no) +CHECK_ONLY=no + +# Check to see if you can reach the repos before updating (valid: yes|no) +CHECK_FIRST=no + +# Don't install, just check and download (valid: yes|no) +# Implies CHECK_ONLY=yes (gotta check first to see what to download) +DOWNLOAD_ONLY=no + +# Error level, practical range 0-10, 0 means print only critical errors which +# you must be told, 1 means print all errors, even ones that are not important +# Level 0 is the default +# ERROR_LEVEL=0 + +# Debug level, practical range 0-10, higher number means more output +# Level 1 is a useful level if you want to see what's been done and +# don't want to read /var/log/yum.log +# Level 0 is the default +# DEBUG_LEVEL=1 + +# randomwait is used by yum to wait random time +# default is 60 so yum waits random time from 1 to 60 minutes +# the value must not be zero +RANDOMWAIT="60" + +# if MAILTO is set and the mail command is available, the mail command +# is used to deliver yum output + +# by default MAILTO is unset, so crond mails the output by itself +# example: MAILTO=root +MAILTO=<%= scope.lookupvar('yum::cron_mailto') %> + +# you may set SYSTEMNAME if you want your yum emails tagged differently +# default is output of hostname command +# this variable is used only if MAILTO is set too +#SYSTEMNAME="" + +# you may set DAYS_OF_WEEK to the days of the week you want to run +# default is every day +#DAYS_OF_WEEK="0123456" +DAYS_OF_WEEK=<%= scope.lookupvar('yum::cron_dotw') %> + +# which day should it do cleanup on? defaults to 0 (Sunday). If this day isn't in the +# DAYS_OF_WEEK above, it'll never happen +CLEANDAY="0" + +# set to yes to make the yum-cron service to wait for transactions to complete +SERVICE_WAITS=yes + +# set maximum time period (in seconds) for the yum-cron service to wait for +# transactions to complete. The default is 300 seconds (5 minutes) +SERVICE_WAIT_TIME=300 diff --git a/dev/vagrant/dolibarrdev/puphpet/shell/execute-files.sh b/dev/vagrant/dolibarrdev/puphpet/shell/execute-files.sh index e53884b9a76..06713c2ee99 100644 --- a/dev/vagrant/dolibarrdev/puphpet/shell/execute-files.sh +++ b/dev/vagrant/dolibarrdev/puphpet/shell/execute-files.sh @@ -2,12 +2,12 @@ export DEBIAN_FRONTEND=noninteractive -VAGRANT_CORE_FOLDER=$(cat "/.puphpet-stuff/vagrant-core-folder.txt") +VAGRANT_CORE_FOLDER=$(cat '/.puphpet-stuff/vagrant-core-folder.txt') shopt -s nullglob files=("${VAGRANT_CORE_FOLDER}"/files/exec-once/*) -if [[ ! -f /.puphpet-stuff/exec-once-ran && (${#files[@]} -gt 0) ]]; then +if [[ ! -f '/.puphpet-stuff/exec-once-ran' && (${#files[@]} -gt 0) ]]; then echo 'Running files in files/exec-once' find "${VAGRANT_CORE_FOLDER}/files/exec-once" -maxdepth 1 -not -path '*/\.*' -type f \( ! -iname "empty" \) -exec chmod +x '{}' \; -exec {} \; echo 'Finished running files in files/exec-once' diff --git a/dev/vagrant/dolibarrdev/puphpet/shell/important-notices.sh b/dev/vagrant/dolibarrdev/puphpet/shell/important-notices.sh new file mode 100644 index 00000000000..bd1bb95cabe --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/shell/important-notices.sh @@ -0,0 +1,9 @@ +#!/bin/bash + +VAGRANT_CORE_FOLDER=$(cat '/.puphpet-stuff/vagrant-core-folder.txt') + +if [[ ! -f '/.puphpet-stuff/displayed-important-notices' ]]; then + cat "${VAGRANT_CORE_FOLDER}/shell/important-notices.txt" + + touch '/.puphpet-stuff/displayed-important-notices' +fi diff --git a/dev/vagrant/dolibarrdev/puphpet/shell/important-notices.txt b/dev/vagrant/dolibarrdev/puphpet/shell/important-notices.txt new file mode 100644 index 00000000000..0dc384f1e06 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/shell/important-notices.txt @@ -0,0 +1,57 @@ + _ + / ) + .--.; | _...,-"""-, + .-""-.-""""-. / _`'-._.' /` \ + /' \ \| (/'-._/ ) ; + .-""""-; ( '--' /-' _ | + .' | ; e / a , ; + / \ | __.'`-.__, ; / + / `._ ; .-' `--.,__.\ /` + //| \ \,-' /\_.' + // | `;.___> /,-'. + /`| / |`\ _..---\ | \ + |/ / _,.-----\ | \ /`| | |\ \ + / .; | | | \ / | | | \ ) + | / | \ / |\..' \ \ | \ \..' + jgs \../ \.../ \.../ \.../---' \.../ + +Read me for some important information! + +If Puppet did not blow up (you do not see a sea of red above), then your VM +was generated successfully! + +* A unique private key was generated for you! It is located at + "puphpet/files/dot/ssh/id_rsa". If you are on Windows, a PuTTY-friendly key + was also generated at same location with a ".ppk" extension. +* If you want to use your own private key for future provisions, overwrite the + generated key above with your own. Make sure to follow the naming pattern, + and include a ".pub" public key. +* If you wish to add packages, modules, Apache/Nginx vhosts, or anything else, + open up "puphpet/config.yaml" and make changes within! Some things will + have random strings like "DIdXRs2OI2LJ" - you must create a random string + as well! To do so, please apply face to keyboard and roll. +* If you change "puphpet/config.yaml", simple run "$ vagrant provision" and + your VM will be updated with the changes you requested! + +Did something go wrong? Don't worry! I can (maybe) help! Please go to our +Github issues page at https://github.com/puphpet/puphpet/issues and search for +your problem. If you do not find your problem answered, open a new ticket! + +---------------------------------------------------------------------------- +PLEASE REMEMBER TO INCLUDE THE CONTENTS OF YOUR "puphpet/config.yaml" FILE. +---------------------------------------------------------------------------- + +Make sure to xxx out any potential API keys or passwords that you do not want +others to see! + +Happy programming! + - Juan Treminio + +┈╭━━━━━━━━━━━━┳━━╮┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈ + ┃ ╭╯ ┃ ▋┃╭━┓ ____ _ _ _ _ +╭┫ ┃ ┃ ┃┃╭┛ | _ \ ___ __ _ __| | / \ | |__ _____ _____| | +┃┃ ╰━━╯ ┃╰╯┃ | |_) / _ \/ _` |/ _` | / _ \ | '_ \ / _ \ \ / / _ \ | +╯┃ ╰┳━╯ | _ < __/ (_| | (_| | / ___ \| |_) | (_) \ V / __/_| + ┃ ┃ |_| \_\___|\__,_|\__,_| /_/ \_\_.__/ \___/ \_/ \___(_) + ┃ ┏━┳━━━━━━━┓ ┏ ┃ +▔┗━┻━┛▔▔▔▔▔▔▔┗━┻━┛▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔ diff --git a/dev/vagrant/dolibarrdev/puphpet/shell/initial-setup.sh b/dev/vagrant/dolibarrdev/puphpet/shell/initial-setup.sh index 47e336ddf58..8fbfe3a2014 100644 --- a/dev/vagrant/dolibarrdev/puphpet/shell/initial-setup.sh +++ b/dev/vagrant/dolibarrdev/puphpet/shell/initial-setup.sh @@ -7,56 +7,101 @@ VAGRANT_CORE_FOLDER=$(echo "$1") OS=$(/bin/bash "${VAGRANT_CORE_FOLDER}/shell/os-detect.sh" ID) CODENAME=$(/bin/bash "${VAGRANT_CORE_FOLDER}/shell/os-detect.sh" CODENAME) -if [[ ! -d /.puphpet-stuff ]]; then - mkdir /.puphpet-stuff +cat "${VAGRANT_CORE_FOLDER}/shell/self-promotion.txt" - echo "${VAGRANT_CORE_FOLDER}" > "/.puphpet-stuff/vagrant-core-folder.txt" - - cat "${VAGRANT_CORE_FOLDER}/shell/self-promotion.txt" - echo "Created directory /.puphpet-stuff" +if [[ ! -d '/.puphpet-stuff' ]]; then + mkdir '/.puphpet-stuff' + echo 'Created directory /.puphpet-stuff' fi -if [[ ! -f /.puphpet-stuff/initial-setup-repo-update ]]; then +touch '/.puphpet-stuff/vagrant-core-folder.txt' +echo "${VAGRANT_CORE_FOLDER}" > '/.puphpet-stuff/vagrant-core-folder.txt' + +if [[ ! -f '/.puphpet-stuff/initial-setup-base-packages' ]]; then if [ "${OS}" == 'debian' ] || [ "${OS}" == 'ubuntu' ]; then - echo "Running initial-setup apt-get update" + echo 'Running initial-setup apt-get update' apt-get update >/dev/null - touch /.puphpet-stuff/initial-setup-repo-update - echo "Finished running initial-setup apt-get update" + echo 'Finished running initial-setup apt-get update' + + echo 'Installing git' + apt-get -q -y install git-core >/dev/null + echo 'Finished installing git' + + if [[ "${CODENAME}" == 'lucid' || "${CODENAME}" == 'precise' ]]; then + echo 'Installing basic curl packages (Ubuntu only)' + apt-get install -y libcurl3 libcurl4-gnutls-dev curl >/dev/null + echo 'Finished installing basic curl packages (Ubuntu only)' + fi + + echo 'Installing rubygems' + apt-get install -y rubygems >/dev/null + echo 'Finished installing rubygems' + + echo 'Installing base packages for r10k' + apt-get install -y build-essential ruby-dev >/dev/null + gem install json >/dev/null + echo 'Finished installing base packages for r10k' + + if [ "${OS}" == 'ubuntu' ]; then + echo 'Updating libgemplugin-ruby (Ubuntu only)' + apt-get install -y libgemplugin-ruby >/dev/null + echo 'Finished updating libgemplugin-ruby (Ubuntu only)' + fi + + if [ "${CODENAME}" == 'lucid' ]; then + echo 'Updating rubygems (Ubuntu Lucid only)' + gem install rubygems-update >/dev/null 2>&1 + /var/lib/gems/1.8/bin/update_rubygems >/dev/null 2>&1 + echo 'Finished updating rubygems (Ubuntu Lucid only)' + fi + + echo 'Installing r10k' + gem install r10k >/dev/null 2>&1 + echo 'Finished installing r10k' + + touch '/.puphpet-stuff/initial-setup-base-packages' elif [[ "${OS}" == 'centos' ]]; then - echo "Running initial-setup yum update" - yum -y --nogpgcheck install "http://www.elrepo.org/elrepo-release-6-6.el6.elrepo.noarch.rpm" >/dev/null - yum -y --nogpgcheck install "https://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm" >/dev/null - yum -y install centos-release-SCL yum-plugin-fastestmirror >/dev/null - yum -y check-update >/dev/null - echo "Finished running initial-setup yum update" + echo 'Running initial-setup yum update' + perl -p -i -e 's@enabled=1@enabled=0@gi' /etc/yum/pluginconf.d/fastestmirror.conf + perl -p -i -e 's@#baseurl=http://mirror.centos.org/centos/\$releasever/os/\$basearch/@baseurl=http://mirror.rackspace.com/CentOS//\$releasever/os/\$basearch/\nenabled=1@gi' /etc/yum.repos.d/CentOS-Base.repo + perl -p -i -e 's@#baseurl=http://mirror.centos.org/centos/\$releasever/updates/\$basearch/@baseurl=http://mirror.rackspace.com/CentOS//\$releasever/updates/\$basearch/\nenabled=1@gi' /etc/yum.repos.d/CentOS-Base.repo + perl -p -i -e 's@#baseurl=http://mirror.centos.org/centos/\$releasever/extras/\$basearch/@baseurl=http://mirror.rackspace.com/CentOS//\$releasever/extras/\$basearch/\nenabled=1@gi' /etc/yum.repos.d/CentOS-Base.repo - echo "Updating to Ruby 1.9.3" + yum -y --nogpgcheck install 'http://www.elrepo.org/elrepo-release-6-6.el6.elrepo.noarch.rpm' >/dev/null + yum -y --nogpgcheck install 'https://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm' >/dev/null yum -y install centos-release-SCL >/dev/null - yum remove ruby >/dev/null - yum -y install ruby193 ruby193-ruby-irb ruby193-ruby-doc ruby193-libyaml rubygems >/dev/null - yum -y --nogpgcheck install "https://yum.puppetlabs.com/el/6/dependencies/x86_64/ruby-rgen-0.6.5-2.el6.noarch.rpm" >/dev/null - gem update --system >/dev/null - gem install haml >/dev/null + yum clean all >/dev/null + yum -y check-update >/dev/null + echo 'Finished running initial-setup yum update' - yum -y --nogpgcheck install "https://yum.puppetlabs.com/el/6/products/x86_64/hiera-1.3.2-1.el6.noarch.rpm" >/dev/null - yum -y --nogpgcheck install "https://yum.puppetlabs.com/el/6/products/x86_64/facter-1.7.5-1.el6.x86_64.rpm" >/dev/null - yum -y --nogpgcheck install "https://yum.puppetlabs.com/el/6/dependencies/x86_64/rubygem-json-1.5.5-1.el6.x86_64.rpm" >/dev/null - yum -y --nogpgcheck install "https://yum.puppetlabs.com/el/6/dependencies/x86_64/ruby-json-1.5.5-1.el6.x86_64.rpm" >/dev/null - yum -y --nogpgcheck install "https://yum.puppetlabs.com/el/6/dependencies/x86_64/ruby-shadow-2.2.0-2.el6.x86_64.rpm" >/dev/null - yum -y --nogpgcheck install "https://yum.puppetlabs.com/el/6/dependencies/x86_64/ruby-augeas-0.4.1-3.el6.x86_64.rpm" >/dev/null - echo "Finished updating to Ruby 1.9.3" + echo 'Installing git' + yum -y install git >/dev/null + echo 'Finished installing git' - echo "Installing basic development tools (CentOS)" - yum -y groupinstall "Development Tools" >/dev/null - echo "Finished installing basic development tools (CentOS)" - touch /.puphpet-stuff/initial-setup-repo-update + echo 'Updating to Ruby 1.9.3' + yum -y install centos-release-SCL >/dev/null 2>&1 + yum remove ruby >/dev/null 2>&1 + yum -y install ruby193 ruby193-ruby-irb ruby193-ruby-doc ruby193-libyaml rubygems >/dev/null 2>&1 + yum -y --nogpgcheck install 'https://yum.puppetlabs.com/el/6/dependencies/x86_64/ruby-rgen-0.6.5-2.el6.noarch.rpm' >/dev/null 2>&1 + gem update --system >/dev/null 2>&1 + gem install haml >/dev/null 2>&1 + + yum -y --nogpgcheck install 'https://yum.puppetlabs.com/el/6/products/x86_64/hiera-1.3.2-1.el6.noarch.rpm' >/dev/null + yum -y --nogpgcheck install 'https://yum.puppetlabs.com/el/6/products/x86_64/facter-1.7.5-1.el6.x86_64.rpm' >/dev/null + yum -y --nogpgcheck install 'https://yum.puppetlabs.com/el/6/dependencies/x86_64/rubygem-json-1.5.5-1.el6.x86_64.rpm' >/dev/null + yum -y --nogpgcheck install 'https://yum.puppetlabs.com/el/6/dependencies/x86_64/ruby-json-1.5.5-1.el6.x86_64.rpm' >/dev/null + yum -y --nogpgcheck install 'https://yum.puppetlabs.com/el/6/dependencies/x86_64/ruby-shadow-2.2.0-2.el6.x86_64.rpm' >/dev/null + yum -y --nogpgcheck install 'https://yum.puppetlabs.com/el/6/dependencies/x86_64/ruby-augeas-0.4.1-3.el6.x86_64.rpm' >/dev/null + echo 'Finished updating to Ruby 1.9.3' + + echo 'Installing basic development tools (CentOS)' + yum -y groupinstall 'Development Tools' >/dev/null + echo 'Finished installing basic development tools (CentOS)' + + echo 'Installing r10k' + gem install r10k >/dev/null 2>&1 + echo 'Finished installing r10k' + + touch '/.puphpet-stuff/initial-setup-base-packages' fi fi - -if [[ "${OS}" == 'ubuntu' && ("${CODENAME}" == 'lucid' || "${CODENAME}" == 'precise') && ! -f /.puphpet-stuff/ubuntu-required-libraries ]]; then - echo 'Installing basic curl packages (Ubuntu only)' - apt-get install -y libcurl3 libcurl4-gnutls-dev curl >/dev/null - echo 'Finished installing basic curl packages (Ubuntu only)' - - touch /.puphpet-stuff/ubuntu-required-libraries -fi diff --git a/dev/vagrant/dolibarrdev/puphpet/shell/os-detect.sh b/dev/vagrant/dolibarrdev/puphpet/shell/os-detect.sh index 61e99892dfd..3f679008fe8 100644 --- a/dev/vagrant/dolibarrdev/puphpet/shell/os-detect.sh +++ b/dev/vagrant/dolibarrdev/puphpet/shell/os-detect.sh @@ -5,28 +5,28 @@ TYPE=$(echo "$1" | tr '[A-Z]' '[a-z]') OS=$(uname) -ID="unknown" -CODENAME="unknown" -RELEASE="unknown" +ID='unknown' +CODENAME='unknown' +RELEASE='unknown' -if [ "${OS}" == "Linux" ]; then +if [ "${OS}" == 'Linux' ]; then # detect centos - grep "centos" /etc/issue -i -q + grep 'centos' /etc/issue -i -q if [ $? = '0' ]; then - ID="centos" + ID='centos' RELEASE=$(cat /etc/redhat-release | grep -o 'release [0-9]' | cut -d " " -f2) # could be debian or ubuntu elif [ $(which lsb_release) ]; then ID=$(lsb_release -i | cut -f2) CODENAME=$(lsb_release -c | cut -f2) RELEASE=$(lsb_release -r | cut -f2) - elif [ -f "/etc/lsb-release" ]; then + elif [ -f '/etc/lsb-release' ]; then ID=$(cat /etc/lsb-release | grep DISTRIB_ID | cut -d "=" -f2) CODENAME=$(cat /etc/lsb-release | grep DISTRIB_CODENAME | cut -d "=" -f2) RELEASE=$(cat /etc/lsb-release | grep DISTRIB_RELEASE | cut -d "=" -f2) - elif [ -f "/etc/issue" ]; then + elif [ -f '/etc/issue' ]; then ID=$(head -1 /etc/issue | cut -d " " -f1) - if [ -f "/etc/debian_version" ]; then + if [ -f '/etc/debian_version' ]; then RELEASE=$( /dev/null 2>&1) -FOUND_GIT=$? - -if [ "${FOUND_GIT}" -ne '0' ] && [ ! -f /.puphpet-stuff/r10k-installed ]; then - $(which apt-get > /dev/null 2>&1) - FOUND_APT=$? - $(which yum > /dev/null 2>&1) - FOUND_YUM=$? - - echo 'Installing git' - - if [ "${FOUND_YUM}" -eq '0' ]; then - yum -q -y makecache - yum -q -y install git - else - apt-get -q -y install git-core >/dev/null - fi - - echo 'Finished installing git' -fi - if [[ ! -d "${PUPPET_DIR}" ]]; then mkdir -p "${PUPPET_DIR}" echo "Created directory ${PUPPET_DIR}" fi cp "${VAGRANT_CORE_FOLDER}/puppet/Puppetfile" "${PUPPET_DIR}" -echo "Copied Puppetfile" +echo 'Copied Puppetfile' -if [ "${OS}" == 'debian' ] || [ "${OS}" == 'ubuntu' ]; then - if [[ ! -f /.puphpet-stuff/r10k-base-packages ]]; then - echo 'Installing base packages for r10k' - apt-get install -y build-essential ruby-dev >/dev/null - gem install json >/dev/null - echo 'Finished installing base packages for r10k' - - touch /.puphpet-stuff/r10k-base-packages - fi -fi - -if [ "${OS}" == 'ubuntu' ]; then - if [[ ! -f /.puphpet-stuff/r10k-libgemplugin-ruby ]]; then - echo 'Updating libgemplugin-ruby (Ubuntu only)' - apt-get install -y libgemplugin-ruby >/dev/null - echo 'Finished updating libgemplugin-ruby (Ubuntu only)' - - touch /.puphpet-stuff/r10k-libgemplugin-ruby - fi - - if [ "${CODENAME}" == 'lucid' ] && [ ! -f /.puphpet-stuff/r10k-rubygems-update ]; then - echo 'Updating rubygems (Ubuntu Lucid only)' - echo 'Ignore all "conflicting chdir" errors!' - gem install rubygems-update >/dev/null - /var/lib/gems/1.8/bin/update_rubygems >/dev/null - echo 'Finished updating rubygems (Ubuntu Lucid only)' - - touch /.puphpet-stuff/r10k-rubygems-update - fi -fi - -if [[ ! -f /.puphpet-stuff/r10k-puppet-installed ]]; then - echo 'Installing r10k' - gem install r10k >/dev/null - echo 'Finished installing r10k' - - echo 'Running initial r10k' - cd "${PUPPET_DIR}" && r10k puppetfile install >/dev/null - echo 'Finished running initial r10k' - - touch /.puphpet-stuff/r10k-puppet-installed -else - echo 'Running update r10k' - cd "${PUPPET_DIR}" && r10k puppetfile install >/dev/null - echo 'Finished running update r10k' -fi +echo 'Running update r10k' +cd "${PUPPET_DIR}" && r10k puppetfile install >/dev/null +echo 'Finished running update r10k' diff --git a/dev/vagrant/dolibarrdev/puphpet/shell/self-promotion.txt b/dev/vagrant/dolibarrdev/puphpet/shell/self-promotion.txt index f474331af44..8cd11701e7b 100644 --- a/dev/vagrant/dolibarrdev/puphpet/shell/self-promotion.txt +++ b/dev/vagrant/dolibarrdev/puphpet/shell/self-promotion.txt @@ -1,7 +1,6 @@ - ____ ____ _ _ ____ _ generated using -| _ \ _ _| _ \| | | | _ \ ___| |_ ___ ___ _ __ ___ -| |_) | | | | |_) | |_| | |_) / _ \ __| / __/ _ \| '_ ` _ \ -| __/| |_| | __/| _ | __/ __/ |_ | (_| (_) | | | | | | -|_| \__,_|_| |_| |_|_| \___|\__(_)___\___/|_| |_| |_| - + ____ ____ _ _ ____ _ generated using + | _ \ _ _| _ \| | | | _ \ ___| |_ ___ ___ _ __ ___ + | |_) | | | | |_) | |_| | |_) / _ \ __| / __/ _ \| '_ ` _ \ + | __/| |_| | __/| _ | __/ __/ |_ | (_| (_) | | | | | | + |_| \__,_|_| |_| |_|_| \___|\__(_)___\___/|_| |_| |_| diff --git a/dev/vagrant/dolibarrdev/puphpet/shell/ssh-keygen.sh b/dev/vagrant/dolibarrdev/puphpet/shell/ssh-keygen.sh index 65b47a00ea8..6bb7614f9c6 100644 --- a/dev/vagrant/dolibarrdev/puphpet/shell/ssh-keygen.sh +++ b/dev/vagrant/dolibarrdev/puphpet/shell/ssh-keygen.sh @@ -1,18 +1,32 @@ #!/bin/bash -VAGRANT_CORE_FOLDER=$(cat "/.puphpet-stuff/vagrant-core-folder.txt") +VAGRANT_CORE_FOLDER=$(cat '/.puphpet-stuff/vagrant-core-folder.txt') +OS=$(/bin/bash "${VAGRANT_CORE_FOLDER}/shell/os-detect.sh" ID) VAGRANT_SSH_USERNAME=$(echo "$1") if [[ ! -f "${VAGRANT_CORE_FOLDER}/files/dot/ssh/id_rsa" ]]; then - echo "Creating new SSH key at ${VAGRANT_CORE_FOLDER}/files/dot/ssh/id_rsa" ssh-keygen -f "${VAGRANT_CORE_FOLDER}/files/dot/ssh/id_rsa" -P "" + + if [[ ! -f "${VAGRANT_CORE_FOLDER}/files/dot/ssh/id_rsa.ppk" ]]; then + if [ "${OS}" == 'debian' ] || [ "${OS}" == 'ubuntu' ]; then + apt-get install -y putty-tools >/dev/null + elif [ "${OS}" == 'centos' ]; then + yum -y install putty >/dev/null + fi + + puttygen "${VAGRANT_CORE_FOLDER}/files/dot/ssh/id_rsa" -O private -o "${VAGRANT_CORE_FOLDER}/files/dot/ssh/id_rsa.ppk" + fi + + echo 'Your private key for SSH-based authentication have been saved to "puphpet/files/dot/ssh/"!' +else + echo 'Using pre-existing private key at "puphpet/files/dot/ssh/id_rsa"' fi -echo "Adding generated key to /root/.ssh/authorized_keys" +echo 'Adding generated key to /root/.ssh/authorized_keys' mkdir -p /root/.ssh -cat "${VAGRANT_CORE_FOLDER}/files/dot/ssh/id_rsa.pub" > "/root/.ssh/authorized_keys" -chmod 600 "/root/.ssh/authorized_keys" +cat "${VAGRANT_CORE_FOLDER}/files/dot/ssh/id_rsa.pub" > '/root/.ssh/authorized_keys' +chmod 600 '/root/.ssh/authorized_keys' if [ "${VAGRANT_SSH_USERNAME}" != 'root' ]; then VAGRANT_SSH_FOLDER="/home/${VAGRANT_SSH_USERNAME}/.ssh"; diff --git a/dev/vagrant/dolibarrdev/puphpet/shell/update-puppet.sh b/dev/vagrant/dolibarrdev/puphpet/shell/update-puppet.sh index 02c576df792..f8c1f5d2256 100644 --- a/dev/vagrant/dolibarrdev/puphpet/shell/update-puppet.sh +++ b/dev/vagrant/dolibarrdev/puphpet/shell/update-puppet.sh @@ -2,13 +2,13 @@ export DEBIAN_FRONTEND=noninteractive -VAGRANT_CORE_FOLDER=$(cat "/.puphpet-stuff/vagrant-core-folder.txt") +VAGRANT_CORE_FOLDER=$(cat '/.puphpet-stuff/vagrant-core-folder.txt') OS=$(/bin/bash "${VAGRANT_CORE_FOLDER}/shell/os-detect.sh" ID) RELEASE=$(/bin/bash "${VAGRANT_CORE_FOLDER}/shell/os-detect.sh" RELEASE) CODENAME=$(/bin/bash "${VAGRANT_CORE_FOLDER}/shell/os-detect.sh" CODENAME) -if [[ ! -f /.puphpet-stuff/update-puppet ]]; then +if [[ ! -f '/.puphpet-stuff/update-puppet' ]]; then if [ "${OS}" == 'debian' ] || [ "${OS}" == 'ubuntu' ]; then echo "Downloading http://apt.puppetlabs.com/puppetlabs-release-${CODENAME}.deb" wget --quiet --tries=5 --connect-timeout=10 -O "/.puphpet-stuff/puppetlabs-release-${CODENAME}.deb" "http://apt.puppetlabs.com/puppetlabs-release-${CODENAME}.deb" @@ -16,28 +16,28 @@ if [[ ! -f /.puphpet-stuff/update-puppet ]]; then dpkg -i "/.puphpet-stuff/puppetlabs-release-${CODENAME}.deb" >/dev/null - echo "Running update-puppet apt-get update" + echo 'Running update-puppet apt-get update' apt-get update >/dev/null - echo "Finished running update-puppet apt-get update" + echo 'Finished running update-puppet apt-get update' - echo "Updating Puppet to version 3.4.x" - apt-get install -y puppet=3.4.3-1puppetlabs1 puppet-common=3.4.3-1puppetlabs1 >/dev/null + echo 'Updating Puppet to version 3.4.x' + apt-get install -y puppet-common=3.4.* puppet=3.4.* >/dev/null + apt-mark hold puppet puppet-common >/dev/null PUPPET_VERSION=$(puppet help | grep 'Puppet v') echo "Finished updating puppet to latest version: ${PUPPET_VERSION}" - touch /.puphpet-stuff/update-puppet - echo "Created empty file /.puphpet-stuff/update-puppet" + touch '/.puphpet-stuff/update-puppet' elif [ "${OS}" == 'centos' ]; then echo "Downloading http://yum.puppetlabs.com/el/${RELEASE}/products/x86_64/puppet-3.4.3-1.el6.noarch.rpm" yum -y --nogpgcheck install "http://yum.puppetlabs.com/el/${RELEASE}/products/x86_64/puppet-3.4.3-1.el6.noarch.rpm" >/dev/null echo "Finished downloading http://yum.puppetlabs.com/el/${RELEASE}/products/x86_64/puppet-3.4.3-1.el6.noarch.rpm" - echo "Installing/Updating Puppet to version 3.4.x" - yum -y install puppet >/dev/null + echo 'Installing/Updating Puppet to version 3.4.x' + yum -y install yum-versionlock puppet >/dev/null + yum versionlock puppet PUPPET_VERSION=$(puppet help | grep 'Puppet v') echo "Finished installing/updating puppet to version: ${PUPPET_VERSION}" - touch /.puphpet-stuff/update-puppet - echo "Created empty file /.puphpet-stuff/update-puppet" + touch '/.puphpet-stuff/update-puppet' fi fi diff --git a/htdocs/adherents/class/adherent.class.php b/htdocs/adherents/class/adherent.class.php index 77cbff2918a..b03bff940dd 100644 --- a/htdocs/adherents/class/adherent.class.php +++ b/htdocs/adherents/class/adherent.class.php @@ -1822,7 +1822,7 @@ class Adherent extends CommonObject /** * Retourne chaine DN complete dans l'annuaire LDAP pour l'objet * - * @param string $info Info string loaded by _load_ldap_info + * @param array $info Info array loaded by _load_ldap_info * @param int $mode 0=Return full DN (uid=qqq,ou=xxx,dc=aaa,dc=bbb) * 1=Return DN without key inside (ou=xxx,dc=aaa,dc=bbb) * 2=Return key only (uid=qqq) diff --git a/htdocs/admin/agenda_extsites.php b/htdocs/admin/agenda_extsites.php index 7cbb0ce0370..371854410b0 100644 --- a/htdocs/admin/agenda_extsites.php +++ b/htdocs/admin/agenda_extsites.php @@ -30,8 +30,7 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/agenda.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php'; -if (!$user->admin) - accessforbidden(); +if (!$user->admin) accessforbidden(); $langs->load("agenda"); $langs->load("admin"); @@ -63,7 +62,7 @@ if ($actionsave) // Save agendas while ($i <= $MAXAGENDA) { - $name=trim(GETPOST('agenda_ext_name'.$i),'alpha'); + $name=trim(GETPOST('agenda_ext_name'.$i,'alpha')); $src=trim(GETPOST('agenda_ext_src'.$i,'alpha')); $color=trim(GETPOST('agenda_ext_color'.$i,'alpha')); if ($color=='-1') $color=''; @@ -76,7 +75,7 @@ if ($actionsave) break; } - //print 'color='.$color; + //print '-name='.$name.'-color='.$color; $res=dolibarr_set_const($db,'AGENDA_EXT_NAME'.$i,$name,'chaine',0,'',$conf->entity); if (! $res > 0) $error++; $res=dolibarr_set_const($db,'AGENDA_EXT_SRC'.$i,$src,'chaine',0,'',$conf->entity); @@ -218,8 +217,7 @@ print ''; print '
    '; print '
    '; - -print "trans("Save")."\">"; +print "trans("Save")."\">"; print "
    "; print "\n"; diff --git a/htdocs/admin/agenda_xcal.php b/htdocs/admin/agenda_xcal.php index 4cba7720ee0..dc7c4cb3d79 100644 --- a/htdocs/admin/agenda_xcal.php +++ b/htdocs/admin/agenda_xcal.php @@ -49,7 +49,7 @@ if ($actionsave) $i+=dolibarr_set_const($db,'MAIN_AGENDA_EXPORT_PAST_DELAY',trim(GETPOST('MAIN_AGENDA_EXPORT_PAST_DELAY','alpha')),'chaine',0,'',$conf->entity); $i+=dolibarr_set_const($db,'MAIN_AGENDA_EXPORT_CACHE',trim(GETPOST('MAIN_AGENDA_EXPORT_CACHE','alpha')),'chaine',0,'',$conf->entity); $i+=dolibarr_set_const($db,'AGENDA_EXPORT_FIX_TZ',trim(GETPOST('AGENDA_EXPORT_FIX_TZ','alpha')),'chaine',0,'',$conf->entity); - + if ($i >= 4) { $db->commit(); @@ -174,7 +174,6 @@ $message=$langs->trans("AgendaUrlOptions1",$user->login,$user->login).'
    '; $message.=$langs->trans("AgendaUrlOptions2",$user->login,$user->login).'
    '; $message.=$langs->trans("AgendaUrlOptions3",$user->login,$user->login).'
    '; $message.=$langs->trans("AgendaUrlOptions4",$user->login,$user->login).'
    '; -$message.=$langs->trans("AgendaUrlOptions5",$user->login,$user->login); print info_admin($message); if (! empty($conf->use_javascript_ajax)) diff --git a/htdocs/admin/expedition.php b/htdocs/admin/expedition.php index 398f17c13c4..d89b406280b 100644 --- a/htdocs/admin/expedition.php +++ b/htdocs/admin/expedition.php @@ -76,7 +76,7 @@ else if ($action == 'set_SHIPPING_FREE_TEXT') $freetext=GETPOST('SHIPPING_FREE_TEXT','alpha'); $res = dolibarr_set_const($db, "SHIPPING_FREE_TEXT",$freetext,'chaine',0,'',$conf->entity); - if ($res < 0) + if ($res > 0) setEventMessage($langs->trans("SetupSaved")); else setEventMessage($langs->trans("Error"), 'errors'); @@ -87,7 +87,7 @@ else if ($action == 'set_SHIPPING_DRAFT_WATERMARK') $draft=GETPOST('SHIPPING_DRAFT_WATERMARK','alpha'); $res = dolibarr_set_const($db, "SHIPPING_DRAFT_WATERMARK",trim($draft),'chaine',0,'',$conf->entity); - if ($res < 0) + if ($res > 0) setEventMessage($langs->trans("SetupSaved")); else setEventMessage($langs->trans("Error"), 'errors'); diff --git a/htdocs/admin/facture.php b/htdocs/admin/facture.php index 4ffef4053d4..54bae759647 100644 --- a/htdocs/admin/facture.php +++ b/htdocs/admin/facture.php @@ -500,7 +500,7 @@ print "\n"; clearstatcache(); $var=true; -foreach ($dirmodels as $reldir) +foreach ($def as $reldir) { foreach (array('','/doc') as $valdir) { diff --git a/htdocs/admin/fichinter.php b/htdocs/admin/fichinter.php index 6a477cc1302..37a3b2a5a5c 100644 --- a/htdocs/admin/fichinter.php +++ b/htdocs/admin/fichinter.php @@ -376,13 +376,16 @@ foreach ($dirmodels as $reldir) { if (substr($file, dol_strlen($file) -12) == '.modules.php' && substr($file,0,4) == 'pdf_') { + $var=!$var; + $name = substr($file, 4, dol_strlen($file) -16); $classname = substr($file, 0, dol_strlen($file) -12); - $var=!$var; + require_once $dir.'/'.$file; + $module = new $classname($db); print ''; - echo "$name"; + print (empty($module->name)?$name:$module->name); print "\n"; require_once $dir.$file; $module = new $classname($db); diff --git a/htdocs/admin/mails.php b/htdocs/admin/mails.php index 16164a14764..78ce79c4912 100644 --- a/htdocs/admin/mails.php +++ b/htdocs/admin/mails.php @@ -33,20 +33,28 @@ $langs->load("mails"); $langs->load("other"); $langs->load("errors"); +$action=GETPOST('action','alpha'); + if (! $user->admin) accessforbidden(); +$usersignature=$user->signature; +// For action = test or send, we ensure that content is not html, even for signature, because this we want a test with NO html. +if ($action == 'test' || $action == 'send') +{ + $usersignature=dol_string_nohtmltag($usersignature); +} + $substitutionarrayfortest=array( '__LOGIN__' => $user->login, '__ID__' => 'TESTIdRecord', '__EMAIL__' => 'TESTEMail', '__LASTNAME__' => 'TESTLastname', '__FIRSTNAME__' => 'TESTFirstname', -'__SIGNATURE__' => (($user->signature && empty($conf->global->MAIN_MAIL_DO_NOT_USE_SIGN))?$user->signature:''), +'__SIGNATURE__' => (($user->signature && empty($conf->global->MAIN_MAIL_DO_NOT_USE_SIGN))?$usersignature:''), //'__PERSONALIZED__' => 'TESTPersonalized' // Hiden because not used yet ); complete_substitutions_array($substitutionarrayfortest, $langs); -$action=GETPOST('action'); /* diff --git a/htdocs/admin/supplier_invoice.php b/htdocs/admin/supplier_invoice.php index 8b69f8e1441..5745c5f82ba 100644 --- a/htdocs/admin/supplier_invoice.php +++ b/htdocs/admin/supplier_invoice.php @@ -372,9 +372,14 @@ foreach ($dirmodels as $reldir) $name = substr($file, 4, dol_strlen($file) -16); $classname = substr($file, 0, dol_strlen($file) -12); + require_once $dir.'/'.$file; + $module = new $classname($db, new FactureFournisseur($db)); + $var=!$var; print "\n"; - print "".$name."\n"; + print ""; + print (empty($module->name)?$name:$module->name); + print "\n"; print "\n"; require_once $dir.$file; $module = new $classname($db,$specimenthirdparty); diff --git a/htdocs/admin/supplier_order.php b/htdocs/admin/supplier_order.php index 88ab88780fc..ac2ab824233 100644 --- a/htdocs/admin/supplier_order.php +++ b/htdocs/admin/supplier_order.php @@ -42,6 +42,7 @@ accessforbidden(); $type=GETPOST('type', 'alpha'); $value=GETPOST('value', 'alpha'); +$label = GETPOST('label','alpha'); $action=GETPOST('action', 'alpha'); $specimenthirdparty=new Societe($db); @@ -367,9 +368,14 @@ foreach ($dirmodels as $reldir) $name = substr($file, 4, dol_strlen($file) -16); $classname = substr($file, 0, dol_strlen($file) -12); + require_once $dir.'/'.$file; + $module = new $classname($db, new CommandeFournisseur($db)); + $var=!$var; print "\n"; - print "".$name."\n"; + print ""; + print (empty($module->name)?$name:$module->name); + print "\n"; print "\n"; require_once $dir.$file; $module = new $classname($db,$specimenthirdparty); diff --git a/htdocs/admin/system/perf.php b/htdocs/admin/system/perf.php index 590502f617d..27c447e7c15 100644 --- a/htdocs/admin/system/perf.php +++ b/htdocs/admin/system/perf.php @@ -86,18 +86,35 @@ print '
    '; // OPCode cache print '
    '; print ''.$langs->trans("OPCodeCache").': '; -$test1=function_exists('xcache_info'); -if ($test1) +$foundcache=0; +$test=function_exists('xcache_info'); +if (! $foundcache && $test) { + $foundcache++; print img_picto('','tick.png').' '.$langs->trans("XCacheInstalled"); print ' '.$langs->trans("MoreInformation").' Xcache admin page'; } -else +$test=function_exists('eaccelerator_info'); +if (! $foundcache && $test) { - $test2=function_exists('eaccelerator_info'); - if ($test2) print img_picto('','tick.png').' '.$langs->trans("EAcceleratorInstalled"); - else print $langs->trans("NoOPCodeCacheFound"); + $foundcache++; + print img_picto('','tick.png').' '.$langs->trans("EAcceleratorInstalled"); } +$test=function_exists('apc_cache_info'); +if (! $foundcache && $test) +{ + //var_dump(apc_cache_info()); + if (ini_get('apc.enabled')) + { + $foundcache++; + print img_picto('','tick.png').' '.$langs->trans("APCInstalled"); + } + else + { + print img_picto('','warning').' '.$langs->trans("APCCacheInstalledButDisabled"); + } +} +if (! $foundcache) print $langs->trans("NoOPCodeCacheFound"); print '
    '; // HTTPCacheStaticResources diff --git a/htdocs/boutique/index.php b/htdocs/boutique/index.php index 97d61a5353f..040e81b726a 100644 --- a/htdocs/boutique/index.php +++ b/htdocs/boutique/index.php @@ -19,15 +19,15 @@ /** * \file htdocs/boutique/index.php * \ingroup boutique - * \brief Page accueil zone boutique + * \brief Main page of shop zone */ require '../main.inc.php'; -require_once DOL_DOCUMENT_ROOT.'/boutique/osc_master.inc.php'; -$langs->load("boutique"); +$langs->load("shop"); $langs->load("orders"); +require_once DOL_DOCUMENT_ROOT.'/boutique/osc_master.inc.php'; llxHeader("",$langs->trans("OSCommerceShop"),""); @@ -39,10 +39,8 @@ print ''; /* - /* Chiffre d'affaires + * Turnover */ -//print_barre_liste("Chiffre d'affaires", $page, "ca.php"); - print_titre($langs->trans('SalesTurnover')); print ''; @@ -92,7 +90,7 @@ print ''; /* - * Derniers clients qui ont command� + * Last customers who commanded */ $sql = "SELECT o.orders_id, o.customers_name, o.delivery_country, o.date_purchased, t.value, s.orders_status_name as statut"; $sql .= " FROM ".$conf->global->OSC_DB_NAME.".".$conf->global->OSC_DB_TABLE_PREFIX."orders_total as t JOIN ".$conf->global->OSC_DB_NAME.".".$conf->global->OSC_DB_TABLE_PREFIX."orders as o on o.orders_id = t.orders_id "; diff --git a/htdocs/boutique/osc_master.inc.php b/htdocs/boutique/osc_master.inc.php index ab4c0cf701a..057c15f30e1 100644 --- a/htdocs/boutique/osc_master.inc.php +++ b/htdocs/boutique/osc_master.inc.php @@ -17,7 +17,7 @@ /** * \file htdocs/boutique/osc_master.inc.php - * \brief Fichier de preparation de l'environnement Dolibarr pour OSCommerce + * \brief File of preparation of the environment Dolibarr for OSCommerce */ @@ -31,7 +31,7 @@ if (! $dbosc->connected) dol_syslog($dbosc,"host=".$conf->global->OSC_DB_HOST.", user=".$conf->global->OSC_DB_USER.", databasename=".$conf->global->OSC_DB_NAME.", ".$db->error,LOG_ERR); llxHeader("",$langs->trans("OSCommerceShop"),""); - print '
    Failed to connect to oscommerce database. Check your module setup
    '; + print '
    '.$langs->trans('FailedConnectDBCheckModuleSetup').'
    '; llxFooter(); exit; } diff --git a/htdocs/cashdesk/affContenu.php b/htdocs/cashdesk/affContenu.php index b88c78ffb4d..ca471e0bdf4 100644 --- a/htdocs/cashdesk/affContenu.php +++ b/htdocs/cashdesk/affContenu.php @@ -54,16 +54,23 @@ print ''; print '
    '; -if ( $_GET['menu'] ) +$page=GETPOST('menu','alpha'); +if (in_array( + $page, + array( + 'deconnexion', + 'index','index_verif','facturation','facturation_verif','facturation_dhtml', + 'validation','validation_ok','validation_ticket','validation_verif', + ) + )) { - include $_GET['menu'].'.php'; + include $page.'.php'; } else { - include 'facturation.php'; + dol_print_error('','menu param '.$page.' is not inside allowed list'); } print '
    '; $_SESSION['serObjFacturation'] = serialize($obj_facturation); - diff --git a/htdocs/categories/admin/categorie.php b/htdocs/categories/admin/categorie.php index 53d1d55eddd..5301b7986e0 100644 --- a/htdocs/categories/admin/categorie.php +++ b/htdocs/categories/admin/categorie.php @@ -75,7 +75,8 @@ $linkback=''.$langs->trans("BackToM llxHeader('',$langs->trans("Categories"),$help_url); -print_fiche_titre($langs->trans("CategoriesSetup"),'','setup'); +$linkback=''.$langs->trans("BackToModuleList").''; +print_fiche_titre($langs->trans("CategoriesSetup"),$linkback,'setup'); $head=categoriesadmin_prepare_head(); diff --git a/htdocs/comm/action/class/ical.class.php b/htdocs/comm/action/class/ical.class.php index bca56b811b2..717d7269fa2 100644 --- a/htdocs/comm/action/class/ical.class.php +++ b/htdocs/comm/action/class/ical.class.php @@ -56,14 +56,13 @@ class ICal { $this->file = $file; $file_text=''; - + $tmparray=file($file); if (is_array($tmparray)) { $file_text = join("", $tmparray); //load file - $file_text = preg_replace("/[\r\n]{1,} ([:;])/","\\1",$file_text); + $file_text = preg_replace("/[\r\n]{1,} /","",$file_text); } - return $file_text; // return all text } @@ -115,6 +114,7 @@ class ICal { // get Key and Value VCALENDAR:Begin -> Key = VCALENDAR, Value = begin list($key, $value) = $this->retun_key_value($text); + //var_dump($text.' -> '.$key.' - '.$value); switch ($text) // search special string { @@ -165,6 +165,8 @@ class ICal } } } + + //var_dump($this->cal); return $this->cal; } @@ -236,6 +238,7 @@ class ICal */ function retun_key_value($text) { + /* preg_match("/([^:]+)[:]([\w\W]+)/", $text, $matches); if (empty($matches)) @@ -246,8 +249,8 @@ class ICal { $matches = array_splice($matches, 1, 2); return $matches; - } - + }*/ + return explode(':',$text,2); } /** diff --git a/htdocs/comm/action/fiche.php b/htdocs/comm/action/fiche.php index 278145eb644..520cb5d175a 100644 --- a/htdocs/comm/action/fiche.php +++ b/htdocs/comm/action/fiche.php @@ -203,12 +203,6 @@ if ($action == 'add_action') $action = 'create'; $mesg='
    '.$langs->trans("ErrorFieldRequired",$langs->transnoentitiesnoconv("DateEnd")).'
    '; } - if (! empty($datep) && GETPOST('percentage') == 0) - { - $error++; - $action = 'create'; - $mesg='
    '.$langs->trans("ErrorStatusCantBeZeroIfStarted").'
    '; - } if (! GETPOST('apyear') && ! GETPOST('adyear')) { diff --git a/htdocs/comm/action/index.php b/htdocs/comm/action/index.php index 0f21d190773..92b87d94ad1 100644 --- a/htdocs/comm/action/index.php +++ b/htdocs/comm/action/index.php @@ -146,9 +146,11 @@ if (empty($conf->global->AGENDA_DISABLE_EXT) && $conf->global->AGENDA_EXT_NB > 0 $source='AGENDA_EXT_SRC'.$i; $name='AGENDA_EXT_NAME'.$i; $color='AGENDA_EXT_COLOR'.$i; + $buggedfile='AGENDA_EXT_BUGGEDFILE'.$i; if (! empty($conf->global->$source) && ! empty($conf->global->$name)) { - $listofextcals[]=array('src'=>$conf->global->$source,'name'=>$conf->global->$name,'color'=>$conf->global->$color); + // Note: $conf->global->buggedfile can be empty or 'uselocalandtznodaylight' or 'uselocalandtzdaylight' + $listofextcals[]=array('src'=>$conf->global->$source,'name'=>$conf->global->$name,'color'=>$conf->global->$color,'buggedfile'=>(isset($conf->global->buggedfile)?$conf->global->buggedfile:0)); } } } @@ -527,9 +529,11 @@ if (count($listofextcals)) $url=$extcal['src']; // Example: https://www.google.com/calendar/ical/eldy10%40gmail.com/private-cde92aa7d7e0ef6110010a821a2aaeb/basic.ics $namecal = $extcal['name']; $colorcal = $extcal['color']; - //print "url=".$url." namecal=".$namecal." colorcal=".$colorcal; + $buggedfile = $extcal['buggedfile']; + //print "url=".$url." namecal=".$namecal." colorcal=".$colorcal." buggedfile=".$buggedfile; $ical=new ICal(); $ical->parse($url); + // After this $ical->cal['VEVENT'] contains array of events, $ical->cal['DAYLIGHT'] contains daylight info, $ical->cal['STANDARD'] contains non daylight info, ... //var_dump($ical->cal); exit; $icalevents=array(); @@ -643,6 +647,8 @@ if (count($listofextcals)) // Loop on each entry into cal file to know if entry is qualified and add an ActionComm into $eventarray foreach($icalevents as $icalevent) { + //var_dump($icalevent); + //print $icalevent['SUMMARY'].'->'.var_dump($icalevent).'
    ';exit; if (! empty($icalevent['RRULE'])) continue; // We found a repeatable event. It was already split into unitary events, so we discard general rule. @@ -659,12 +665,36 @@ if (count($listofextcals)) $event->fulldayevent=true; $addevent=true; } - elseif (!is_array($icalevent['DTSTART'])) // not fullday event (DTSTART is not array) + elseif (!is_array($icalevent['DTSTART'])) // not fullday event (DTSTART is not array. It is a value like '19700101T000000Z' for 00:00 in greenwitch) { $datestart=$icalevent['DTSTART']; $dateend=$icalevent['DTEND']; $addevent=true; } + elseif (isset($icalevent['DTSTART']['unixtime'])) // File contains a local timezone + a TZ (for example when using bluemind) + { + $datestart=$icalevent['DTSTART']['unixtime']; + $dateend=$icalevent['DTEND']['unixtime']; + // $buggedfile is set to uselocalandtznodaylight if conf->global->AGENDA_EXT_BUGGEDFILEx = 'uselocalandtznodaylight' + if ($buggedfile === 'uselocalandtznodaylight') // unixtime is a local date that does not take daylight into account, TZID is +1 for example for 'Europe/Paris' in summer instead of 2 + { + // TODO + } + // $buggedfile is set to uselocalandtzdaylight if conf->global->AGENDA_EXT_BUGGEDFILEx = 'uselocalandtzdaylight' (for example with bluemind) + if ($buggedfile === 'uselocalandtzdaylight') // unixtime is a local date that does take daylight into account, TZID is +2 for example for 'Europe/Paris' in summer + { + $localtzs = new DateTimeZone(preg_replace('/"/','',$icalevent['DTSTART']['TZID'])); + $localtze = new DateTimeZone(preg_replace('/"/','',$icalevent['DTEND']['TZID'])); + $localdts = new DateTime(dol_print_date($datestart,'dayrfc','gmt'), $localtzs); + $localdte = new DateTime(dol_print_date($dateend,'dayrfc','gmt'), $localtze); + $tmps=-1*$localtzs->getOffset($localdts); + $tmpe=-1*$localtze->getOffset($localdte); + $datestart+=$tmps; + $dateend+=$tmpe; + //var_dump($datestart); + } + $addevent=true; + } if ($addevent) { diff --git a/htdocs/comm/action/listactions.php b/htdocs/comm/action/listactions.php index e6944f4c829..48e21690d2a 100644 --- a/htdocs/comm/action/listactions.php +++ b/htdocs/comm/action/listactions.php @@ -1,7 +1,7 @@ * Copyright (C) 2003 Eric Seigne - * Copyright (C) 2004-2012 Laurent Destailleur + * Copyright (C) 2004-2014 Laurent Destailleur * Copyright (C) 2005-2012 Regis Houssin * * This program is free software; you can redistribute it and/or modify @@ -115,22 +115,6 @@ $form=new Form($db); // Define list of all external calendars $listofextcals=array(); -/*if (empty($conf->global->AGENDA_DISABLE_EXT) && $conf->global->AGENDA_EXT_NB > 0) -{ - $i=0; - while($i < $conf->global->AGENDA_EXT_NB) - { - $i++; - $paramkey='AGENDA_EXT_SRC'.$i; - $url=$conf->global->$paramkey; - $paramkey='AGENDA_EXT_NAME'.$i; - $namecal = $conf->global->$paramkey; - $paramkey='AGENDA_EXT_COLOR'.$i; - $colorcal = $conf->global->$paramkey; - if ($url && $namecal) $listofextcals[]=array('src'=>$url,'name'=>$namecal,'color'=>$colorcal); - } -} -*/ $param=''; if ($status) $param="&status=".$status; @@ -245,7 +229,7 @@ if ($resql) print_liste_field_titre($langs->trans("Contact"),$_SERVER["PHP_SELF"],"a.fk_contact",$param,"","",$sortfield,$sortorder); print_liste_field_titre($langs->trans("ActionUserAsk"),$_SERVER["PHP_SELF"],"ua.login",$param,"","",$sortfield,$sortorder); print_liste_field_titre($langs->trans("AffectedTo"),$_SERVER["PHP_SELF"],"ut.login",$param,"","",$sortfield,$sortorder); - print_liste_field_titre($langs->trans("DoneBy"),$_SERVER["PHP_SELF"],"ud.login",$param,"","",$sortfield,$sortorder); + //print_liste_field_titre($langs->trans("DoneBy"),$_SERVER["PHP_SELF"],"ud.login",$param,"","",$sortfield,$sortorder); print_liste_field_titre($langs->trans("Status"),$_SERVER["PHP_SELF"],"a.percent",$param,"",'align="right"',$sortfield,$sortorder); print "\n"; @@ -270,11 +254,7 @@ if ($resql) print $actionstatic->getNomUrl(1,28); print ''; - // Titre - //print ''; - + // Start date print ''; + // End date print ''; @@ -341,6 +322,7 @@ if ($resql) print ''; // User did + /* print ''; + */ // Status/Percent print ''; diff --git a/htdocs/comm/propal.php b/htdocs/comm/propal.php index 4a6b04f54fb..63220ce415e 100644 --- a/htdocs/comm/propal.php +++ b/htdocs/comm/propal.php @@ -178,7 +178,8 @@ else if ($action == 'confirm_validate' && $confirm == 'yes' && $user->rights->pr } } else { $langs->load("errors"); - setEventMessage($langs->trans($object->error), 'errors'); + if (count($object->errors) > 0) setEventMessage($object->errors, 'errors'); + else setEventMessage($langs->trans($object->error), 'errors'); } } @@ -472,8 +473,8 @@ if ($action == 'send' && ! GETPOST('addfile') && ! GETPOST('removedfile') && ! G $interface = new Interfaces($db); $result = $interface->run_triggers('PROPAL_SENTBYMAIL', $object, $user, $langs, $conf); if ($result < 0) { - $error ++; - $this->errors = $interface->errors; + $error++; + $object->errors = $interface->errors; } // Fin appel triggers @@ -609,12 +610,17 @@ else if ($action == 'addline' && $user->rights->propal->creer) { $tva_npr = get_default_npr($mysoc, $object->client, $prod->id); // On defini prix unitaire - if (! empty($conf->global->PRODUIT_MULTIPRICES) && $object->client->price_level) { + if (! empty($conf->global->PRODUIT_MULTIPRICES) && $object->client->price_level) + { $pu_ht = $prod->multiprices [$object->client->price_level]; $pu_ttc = $prod->multiprices_ttc [$object->client->price_level]; $price_min = $prod->multiprices_min [$object->client->price_level]; $price_base_type = $prod->multiprices_base_type [$object->client->price_level]; - } elseif (! empty($conf->global->PRODUIT_CUSTOMER_PRICES)) { + $tva_tx=$prod->multiprices_tva_tx[$object->client->price_level]; + $tva_npr=$prod->multiprices_recuperableonly[$object->client->price_level]; + } + elseif (! empty($conf->global->PRODUIT_CUSTOMER_PRICES)) + { require_once DOL_DOCUMENT_ROOT . '/product/class/productcustomerprice.class.php'; $prodcustprice = new Productcustomerprice($db); @@ -631,7 +637,9 @@ else if ($action == 'addline' && $user->rights->propal->creer) { $prod->tva_tx = $prodcustprice->lines [0]->tva_tx; } } - } else { + } + else + { $pu_ht = $prod->price; $pu_ttc = $prod->price_ttc; $price_min = $prod->price_min; @@ -1157,7 +1165,7 @@ if ($action == 'create') { // Date print ''; // Validaty duration @@ -1191,10 +1199,9 @@ if ($action == 'create') { $syear = date("Y", $tmpdte); $smonth = date("m", $tmpdte); $sday = date("d", $tmpdte); - $form->select_date($syear . "-" . $smonth . "-" . $sday, 'liv_', '', '', '', "addprop"); + $form->select_date($syear."-".$smonth."-".$sday, 'liv_', '', '', '', "addprop"); } else { - $datepropal = empty($conf->global->MAIN_AUTOFILL_DATE) ? - 1 : 0; - $form->select_date($datepropal, 'liv_', '', '', '', "addprop"); + $form->select_date(-1, 'liv_', '', '', '', "addprop", 1, 1); } print ''; @@ -1247,8 +1254,9 @@ if ($action == 'create') { print ''; } - print '
    '; print_titre($langs->trans("Orders")); /* - * 5 derniees commandes recues + * Last 5 successful commands select o.orders_id, o.customers_id, o.customers_name, o.date_purchased, o.payement_method, o.status, t.value from orders_total as t join orders as o on o.orders_id = t.orders_id where t.class = 'ot_subtotal' order by o.date_purchased desc @@ -130,7 +128,7 @@ else } /* - * 5 derni�res commandes en attente + * Last 5 commands in wait */ $sql = "SELECT o.orders_id, o.customers_name, o.date_purchased, t.value, o.payment_method"; $sql .= " FROM ".$conf->global->OSC_DB_NAME.".".$conf->global->OSC_DB_TABLE_PREFIX."orders_total as t JOIN ".$conf->global->OSC_DB_NAME.".".$conf->global->OSC_DB_TABLE_PREFIX."orders as o on o.orders_id = t.orders_id "; @@ -165,7 +163,7 @@ else } /* - * Commandes � traiter + * Commands to treat */ $sql = "SELECT o.orders_id, o.customers_name, o.date_purchased, t.value, o.payment_method"; $sql .= " FROM ".$conf->global->OSC_DB_NAME.".".$conf->global->OSC_DB_TABLE_PREFIX."orders_total as t JOIN ".$conf->global->OSC_DB_NAME.".".$conf->global->OSC_DB_TABLE_PREFIX."orders as o on o.orders_id = t.orders_id "; @@ -202,7 +200,7 @@ else print '
    '; - //print dol_trunc($obj->label,12); - //print ''; print dol_print_date($db->jdate($obj->dp),"day"); $late=0; @@ -285,6 +265,7 @@ if ($resql) if ($late) print img_warning($langs->trans("Late")).' '; print ''; print dol_print_date($db->jdate($obj->dp2),"day"); print ''; if ($obj->useriddone) { @@ -351,6 +333,7 @@ if ($resql) } else print ' '; print ''.$actionstatic->LibStatut($obj->percent,6).'
    ' . $langs->trans('Date') . ''; - $form->select_date('', '', '', '', '', "addprop"); + $form->select_date('', '', '', '', '', "addprop", 1, 1); print '
    '; - if (! empty($conf->global->PROPAL_CLONE_ON_CREATE_PAGE)) { + if (! empty($conf->global->PROPAL_CLONE_ON_CREATE_PAGE) || ! empty($conf->global->PRODUCT_SHOW_WHEN_CREATE)) print '
    '; + if (! empty($conf->global->PROPAL_CLONE_ON_CREATE_PAGE)) + { // For backward compatibility print ''; print ''; @@ -1311,13 +1319,11 @@ if ($action == 'create') { print ''; print ''; } - print "
    %
    "; } print ''; } - print ''; - print '
    '; + if (! empty($conf->global->PROPAL_CLONE_ON_CREATE_PAGE) || ! empty($conf->global->PRODUCT_SHOW_WHEN_CREATE)) print '
    '; $langs->load("bills"); print '
    '; diff --git a/htdocs/comm/propal/class/propal.class.php b/htdocs/comm/propal/class/propal.class.php index 9c35faef31f..c50e96f56c1 100644 --- a/htdocs/comm/propal/class/propal.class.php +++ b/htdocs/comm/propal/class/propal.class.php @@ -546,6 +546,7 @@ class Propal extends CommonObject $this->line->label = $label; $this->line->desc = $desc; $this->line->qty = $qty; + $this->line->product_type = $type; $this->line->tva_tx = $txtva; $this->line->localtax1_tx = $txlocaltax1; $this->line->localtax2_tx = $txlocaltax2; @@ -1348,10 +1349,10 @@ class Propal extends CommonObject { // Rename of propal directory ($this->ref = old ref, $num = new ref) // to not lose the linked files - $facref = dol_sanitizeFileName($this->ref); - $snumfa = dol_sanitizeFileName($num); - $dirsource = $conf->propal->dir_output.'/'.$facref; - $dirdest = $conf->propal->dir_output.'/'.$snumfa; + $oldref = dol_sanitizeFileName($this->ref); + $newref = dol_sanitizeFileName($num); + $dirsource = $conf->propal->dir_output.'/'.$oldref; + $dirdest = $conf->propal->dir_output.'/'.$newref; if (file_exists($dirsource)) { dol_syslog(get_class($this)."::validate rename dir ".$dirsource." into ".$dirdest); @@ -1361,15 +1362,17 @@ class Propal extends CommonObject dol_syslog("Rename ok"); // Deleting old PDF in new rep - dol_delete_file($conf->propal->dir_output.'/'.$snumfa.'/'.$facref.'*.*'); + dol_delete_file($conf->propal->dir_output.'/'.$newref.'/'.$oldref.'*.*'); } } } + $this->ref=$num; $this->brouillon=0; $this->statut = 1; $this->user_valid_id=$user->id; $this->datev=$now; + $this->db->commit(); return 1; } @@ -2783,7 +2786,7 @@ class PropaleLigne extends CommonObject $sql.= ' pd.info_bits, pd.total_ht, pd.total_tva, pd.total_ttc, pd.fk_product_fournisseur_price as fk_fournprice, pd.buy_price_ht as pa_ht, pd.special_code, pd.rang,'; $sql.= ' pd.localtax1_tx, pd.localtax2_tx, pd.total_localtax1, pd.total_localtax2,'; $sql.= ' p.ref as product_ref, p.label as product_label, p.description as product_desc,'; - $sql.= ' pd.date_start, pd.date_end'; + $sql.= ' pd.date_start, pd.date_end, pd.product_type'; $sql.= ' FROM '.MAIN_DB_PREFIX.'propaldet as pd'; $sql.= ' LEFT JOIN '.MAIN_DB_PREFIX.'product as p ON pd.fk_product = p.rowid'; $sql.= ' WHERE pd.rowid = '.$rowid; @@ -2820,6 +2823,7 @@ class PropaleLigne extends CommonObject $this->marque_tx = $marginInfos[2]; $this->special_code = $objp->special_code; + $this->product_type = $objp->product_type; $this->rang = $objp->rang; $this->ref = $objp->product_ref; // deprecated @@ -3054,6 +3058,7 @@ class PropaleLigne extends CommonObject $sql = "UPDATE ".MAIN_DB_PREFIX."propaldet SET"; $sql.= " description='".$this->db->escape($this->desc)."'"; $sql.= " , label=".(! empty($this->label)?"'".$this->db->escape($this->label)."'":"null"); + $sql.= " , product_type=".$this->product_type; $sql.= " , tva_tx='".price2num($this->tva_tx)."'"; $sql.= " , localtax1_tx=".price2num($this->localtax1_tx); $sql.= " , localtax2_tx=".price2num($this->localtax2_tx); diff --git a/htdocs/comm/propal/list.php b/htdocs/comm/propal/list.php index 73d1cb720d4..ba0a49f2772 100644 --- a/htdocs/comm/propal/list.php +++ b/htdocs/comm/propal/list.php @@ -285,7 +285,7 @@ if ($result) print_liste_field_titre($langs->trans('Date'),$_SERVER["PHP_SELF"],'p.datep','',$param, 'align="center"',$sortfield,$sortorder); print_liste_field_titre($langs->trans('DateEndPropalShort'),$_SERVER["PHP_SELF"],'dfv','',$param, 'align="center"',$sortfield,$sortorder); print_liste_field_titre($langs->trans('AmountHT'),$_SERVER["PHP_SELF"],'p.total_ht','',$param, 'align="right"',$sortfield,$sortorder); - print_liste_field_titre($langs->trans('Author'),$_SERVER["PHP_SELF"],'u.login','',$param,'align="right"',$sortfield,$sortorder); + print_liste_field_titre($langs->trans('Author'),$_SERVER["PHP_SELF"],'u.login','',$param,'align="center"',$sortfield,$sortorder); print_liste_field_titre($langs->trans('Status'),$_SERVER["PHP_SELF"],'p.fk_statut','',$param,'align="right"',$sortfield,$sortorder); print_liste_field_titre(''); print "\n"; @@ -301,6 +301,7 @@ if ($result) print ''; print ''; print ''; + // Date print ''; //print $langs->trans('Month').': '; print ''; @@ -309,11 +310,12 @@ if ($result) $formother->select_year($syear,'year',1, 20, 5); print ''; print ' '; + // Amount print ''; print ''; print ''; - - print ''; + // Author + print ''; print ''; print ''; print ''; diff --git a/htdocs/comm/remise.php b/htdocs/comm/remise.php index 56b3009298d..5fc0c7ec9bb 100644 --- a/htdocs/comm/remise.php +++ b/htdocs/comm/remise.php @@ -130,7 +130,7 @@ if ($socid > 0) // Nouvelle valeur print ''; - print $langs->trans("NewValue").'remise_percent).'">%'; + print $langs->trans("NewValue").'%'; // Motif/Note print ''; @@ -155,9 +155,9 @@ if ($socid > 0) /* - * Liste de l'historique des avoirs + * List log of all percent discounts */ - $sql = "SELECT rc.rowid,rc.remise_client,rc.note, rc.datec as dc,"; + $sql = "SELECT rc.rowid, rc.remise_client as remise_percent, rc.note, rc.datec as dc,"; $sql.= " u.login, u.rowid as user_id"; $sql.= " FROM ".MAIN_DB_PREFIX."societe_remise as rc, ".MAIN_DB_PREFIX."user as u"; $sql.= " WHERE rc.fk_soc =". $objsoc->id; diff --git a/htdocs/commande/class/commande.class.php b/htdocs/commande/class/commande.class.php index 086dc5a8073..c70e8b9e883 100644 --- a/htdocs/commande/class/commande.class.php +++ b/htdocs/commande/class/commande.class.php @@ -453,8 +453,13 @@ class Commande extends CommonOrder } else { - $this->db->rollback(); - return -1; + foreach($this->errors as $errmsg) + { + dol_syslog(get_class($this)."::set_reopen ".$errmsg, LOG_ERR); + $this->error.=($this->error?', '.$errmsg:$errmsg); + } + $this->db->rollback(); + return -1*$error; } } @@ -580,8 +585,14 @@ class Commande extends CommonOrder else { $this->error=$mouvP->error; + + foreach($this->errors as $errmsg) + { + dol_syslog(get_class($this)."::cancel ".$errmsg, LOG_ERR); + $this->error.=($this->error?', '.$errmsg:$errmsg); + } $this->db->rollback(); - return -1; + return -1*$error; } } else @@ -808,8 +819,19 @@ class Commande extends CommonOrder // Fin appel triggers } - $this->db->commit(); - return $this->id; + if (!$error) { + $this->db->commit(); + return $this->id; + } + + foreach($this->errors as $errmsg) + { + dol_syslog(get_class($this)."::create ".$errmsg, LOG_ERR); + $this->error.=($this->error?', '.$errmsg:$errmsg); + } + $this->db->rollback(); + return -1*$error; + } else { @@ -1387,7 +1409,7 @@ class Commande extends CommonOrder $extralabels=$extrafields->fetch_name_optionals_label($this->table_element,true); $this->fetch_optionals($this->id,$extralabels); - $this->db->free(); + $this->db->free($result); /* * Lines @@ -1795,7 +1817,7 @@ class Commande extends CommonOrder else { $this->db->rollback(); - $this->error=$this->db->lasterror(); + $this->error=$line->error; return -1; } } @@ -2229,9 +2251,14 @@ class Commande extends CommonOrder else { $this->error=$this->db->error(); - dol_syslog(get_class($this)."::classifyBilled ".$this->error, LOG_ERR); + + foreach($this->errors as $errmsg) + { + dol_syslog(get_class($this)."::classifyBilled ".$errmsg, LOG_ERR); + $this->error.=($this->error?', '.$errmsg:$errmsg); + } $this->db->rollback(); - return -2; + return -1*$error; } } else @@ -2397,11 +2424,10 @@ class Commande extends CommonOrder } else { - $this->error=$this->db->lasterror(); - $this->errors=array($this->db->lasterror()); - $this->db->rollback(); - dol_syslog(get_class($this)."::updateline Error=".$this->error, LOG_ERR); - return -1; + $this->error=$this->line->error; + + $this->db->rollback(); + return -1; } } else @@ -2519,9 +2545,13 @@ class Commande extends CommonOrder else { $this->error=$this->db->lasterror(); - dol_syslog(get_class($this)."::delete ".$this->error, LOG_ERR); - $this->db->rollback(); - return -1; + foreach($this->errors as $errmsg) + { + dol_syslog(get_class($this)."::delete ".$errmsg, LOG_ERR); + $this->error.=($this->error?', '.$errmsg:$errmsg); + } + $this->db->rollback(); + return -1*$error; } } @@ -3154,6 +3184,8 @@ class OrderLine extends CommonOrderLine $error=0; + $this->db->begin(); + $sql = 'DELETE FROM '.MAIN_DB_PREFIX."commandedet WHERE rowid='".$this->rowid."';"; dol_syslog("OrderLine::delete sql=".$sql); @@ -3179,7 +3211,18 @@ class OrderLine extends CommonOrderLine if ($result < 0) { $error++; $this->errors=$interface->errors; } // Fin appel triggers - return 1; + if (!$error) { + $this->db->commit(); + return 1; + } + + foreach($this->errors as $errmsg) + { + dol_syslog(get_class($this)."::delete ".$errmsg, LOG_ERR); + $this->error.=($this->error?', '.$errmsg:$errmsg); + } + $this->db->rollback(); + return -1*$error; } else { @@ -3295,8 +3338,18 @@ class OrderLine extends CommonOrderLine // Fin appel triggers } - $this->db->commit(); - return 1; + if (!$error) { + $this->db->commit(); + return 1; + } + + foreach($this->errors as $errmsg) + { + dol_syslog(get_class($this)."::delete ".$errmsg, LOG_ERR); + $this->error.=($this->error?', '.$errmsg:$errmsg); + } + $this->db->rollback(); + return -1*$error; } else { @@ -3403,8 +3456,18 @@ class OrderLine extends CommonOrderLine // Fin appel triggers } - $this->db->commit(); - return 1; + if (!$error) { + $this->db->commit(); + return 1; + } + + foreach($this->errors as $errmsg) + { + dol_syslog(get_class($this)."::update ".$errmsg, LOG_ERR); + $this->error.=($this->error?', '.$errmsg:$errmsg); + } + $this->db->rollback(); + return -1*$error; } else { diff --git a/htdocs/commande/fiche.php b/htdocs/commande/fiche.php index 2b326858c48..172fa7e3eae 100644 --- a/htdocs/commande/fiche.php +++ b/htdocs/commande/fiche.php @@ -104,18 +104,30 @@ $reshook = $hookmanager->executeHooks('doActions', $parameters, $object, $action include DOL_DOCUMENT_ROOT . '/core/actions_setnotes.inc.php'; // Must be include, not includ_once // Action clone object -if ($action == 'confirm_clone' && $confirm == 'yes' && $user->rights->commande->creer) { - if (1 == 0 && ! GETPOST('clone_content') && ! GETPOST('clone_receivers')) { - $mesg = '
    ' . $langs->trans("NoCloneOptionsSpecified") . '
    '; - } else { - if ($object->id > 0) { - $result = $object->createFromClone($socid); - if ($result > 0) { - header("Location: " . $_SERVER['PHP_SELF'] . '?id=' . $result); - exit(); - } else { - $mesg = '
    ' . $object->error . '
    '; - $action = ''; +if ($action == 'confirm_clone' && $confirm == 'yes' && $user->rights->commande->creer) +{ + if (1==0 && ! GETPOST('clone_content') && ! GETPOST('clone_receivers')) + { + $mesg='
    '.$langs->trans("NoCloneOptionsSpecified").'
    '; + } + else + { + if ($object->id > 0) + { + // Because createFromClone modifies the object, we must clone it so that we can restore it later + $orig = dol_clone($object); + + $result=$object->createFromClone($socid); + if ($result > 0) + { + header("Location: ".$_SERVER['PHP_SELF'].'?id='.$result); + exit; + } + else + { + setEventMessage($object->error, 'errors'); + $object = $orig; + $action=''; } } } @@ -125,11 +137,14 @@ if ($action == 'confirm_clone' && $confirm == 'yes' && $user->rights->commande-> else if ($action == 'reopen' && $user->rights->commande->creer) { if ($object->statut == 3) { $result = $object->set_reopen($user); - if ($result > 0) { - header('Location: ' . $_SERVER["PHP_SELF"] . '?id=' . $object->id); - exit(); - } else { - $mesg = '
    ' . $object->error . '
    '; + if ($result > 0) + { + header('Location: '.$_SERVER["PHP_SELF"].'?id='.$object->id); + exit; + } + else + { + setEventMessage($object->error, 'errors'); } } } @@ -139,9 +154,10 @@ else if ($action == 'confirm_delete' && $confirm == 'yes' && $user->rights->comm $result = $object->delete($user); if ($result > 0) { header('Location: index.php'); - exit(); - } else { - $mesg = '
    ' . $object->error . '
    '; + exit; + } + else { + setEventMessage($object->error, 'errors'); } } @@ -165,10 +181,12 @@ else if ($action == 'confirm_deleteline' && $confirm == 'yes' && $user->rights-> commande_pdf_create($db, $object, $object->modelpdf, $outputlangs, $hidedetails, $hidedesc, $hideref); } - header('Location: ' . $_SERVER["PHP_SELF"] . '?id=' . $object->id); - exit(); - } else { - $mesg = '
    ' . $object->error . '
    '; + header('Location: '.$_SERVER["PHP_SELF"].'?id='.$object->id); + exit; + } + else + { + setEventMessage($object->error, 'errors'); } } @@ -382,8 +400,13 @@ else if ($action == 'add' && $user->rights->commande->creer) { } } -else if ($action == 'classifybilled' && $user->rights->commande->creer) { - $ret = $object->classifyBilled(); +else if ($action == 'classifybilled' && $user->rights->commande->creer) +{ + $ret=$object->classifyBilled(); + + if ($ret < 0) { + setEventMessage($object->error, 'errors'); + } } // Positionne ref commande client @@ -476,7 +499,7 @@ else if ($action == 'setremiseabsolue' && $user->rights->commande->creer) { // Add a new line else if ($action == 'addline' && $user->rights->commande->creer) { $langs->load('errors'); - $error = false; + $error = 0; // Set if we used free entry or predefined product $predef=''; @@ -552,12 +575,17 @@ else if ($action == 'addline' && $user->rights->commande->creer) { $tva_npr = get_default_npr($mysoc, $object->client, $prod->id); // multiprix - if (! empty($conf->global->PRODUIT_MULTIPRICES) && ! empty($object->client->price_level)) { + if (! empty($conf->global->PRODUIT_MULTIPRICES) && ! empty($object->client->price_level)) + { $pu_ht = $prod->multiprices [$object->client->price_level]; $pu_ttc = $prod->multiprices_ttc [$object->client->price_level]; $price_min = $prod->multiprices_min [$object->client->price_level]; $price_base_type = $prod->multiprices_base_type [$object->client->price_level]; - } elseif (! empty($conf->global->PRODUIT_CUSTOMER_PRICES)) { + $tva_tx=$prod->multiprices_tva_tx[$object->client->price_level]; + $tva_npr=$prod->multiprices_recuperableonly[$object->client->price_level]; + } + elseif (! empty($conf->global->PRODUIT_CUSTOMER_PRICES)) + { require_once DOL_DOCUMENT_ROOT . '/product/class/productcustomerprice.class.php'; $prodcustprice = new Productcustomerprice($db); @@ -574,7 +602,9 @@ else if ($action == 'addline' && $user->rights->commande->creer) { $prod->tva_tx = $prodcustprice->lines [0]->tva_tx; } } - } else { + } + else + { $pu_ht = $prod->price; $pu_ttc = $prod->price_ttc; $price_min = $prod->price_min; @@ -898,8 +928,9 @@ else if ($action == 'confirm_modif' && $user->rights->commande->creer) { else if ($action == 'confirm_shipped' && $confirm == 'yes' && $user->rights->commande->cloturer) { $result = $object->cloture($user); - if ($result < 0) - $mesgs = $object->errors; + if ($result < 0) { + setEventMessage($object->error, 'errors'); + } } else if ($action == 'confirm_cancel' && $confirm == 'yes' && $user->rights->commande->valider) { @@ -916,6 +947,10 @@ else if ($action == 'confirm_cancel' && $confirm == 'yes' && $user->rights->comm if (! $error) { $result = $object->cancel($idwarehouse); + + if ($result < 0) { + setEventMessage($object->error, 'errors'); + } } } @@ -1319,13 +1354,13 @@ if ($action == 'create' && $user->rights->commande->creer) { $ref_client = (! empty($objectsrc->ref_client) ? $objectsrc->ref_client : ''); $soc = $objectsrc->client; - $cond_reglement_id = (! empty($objectsrc->cond_reglement_id) ? $objectsrc->cond_reglement_id : (! empty($soc->cond_reglement_id) ? $soc->cond_reglement_id : 1)); - $mode_reglement_id = (! empty($objectsrc->mode_reglement_id) ? $objectsrc->mode_reglement_id : (! empty($soc->mode_reglement_id) ? $soc->mode_reglement_id : 0)); - $availability_id = (! empty($objectsrc->availability_id) ? $objectsrc->availability_id : (! empty($soc->availability_id) ? $soc->availability_id : 0)); - $demand_reason_id = (! empty($objectsrc->demand_reason_id) ? $objectsrc->demand_reason_id : (! empty($soc->demand_reason_id) ? $soc->demand_reason_id : 0)); - $remise_percent = (! empty($objectsrc->remise_percent) ? $objectsrc->remise_percent : (! empty($soc->remise_percent) ? $soc->remise_percent : 0)); - $remise_absolue = (! empty($objectsrc->remise_absolue) ? $objectsrc->remise_absolue : (! empty($soc->remise_absolue) ? $soc->remise_absolue : 0)); - $dateinvoice = empty($conf->global->MAIN_AUTOFILL_DATE) ? - 1 : 0; + $cond_reglement_id = (!empty($objectsrc->cond_reglement_id)?$objectsrc->cond_reglement_id:(!empty($soc->cond_reglement_id)?$soc->cond_reglement_id:1)); + $mode_reglement_id = (!empty($objectsrc->mode_reglement_id)?$objectsrc->mode_reglement_id:(!empty($soc->mode_reglement_id)?$soc->mode_reglement_id:0)); + $availability_id = (!empty($objectsrc->availability_id)?$objectsrc->availability_id:(!empty($soc->availability_id)?$soc->availability_id:0)); + $demand_reason_id = (!empty($objectsrc->demand_reason_id)?$objectsrc->demand_reason_id:(!empty($soc->demand_reason_id)?$soc->demand_reason_id:0)); + $remise_percent = (!empty($objectsrc->remise_percent)?$objectsrc->remise_percent:(!empty($soc->remise_percent)?$soc->remise_percent:0)); + $remise_absolue = (!empty($objectsrc->remise_absolue)?$objectsrc->remise_absolue:(!empty($soc->remise_absolue)?$soc->remise_absolue:0)); + $dateinvoice = empty($conf->global->MAIN_AUTOFILL_DATE)?-1:''; $datedelivery = (! empty($objectsrc->date_livraison) ? $objectsrc->date_livraison : ''); @@ -1335,17 +1370,19 @@ if ($action == 'create' && $user->rights->commande->creer) { // Object source contacts list $srccontactslist = $objectsrc->liste_contact(- 1, 'external', 1); } - } else { - $cond_reglement_id = $soc->cond_reglement_id; - $mode_reglement_id = $soc->mode_reglement_id; - $availability_id = $soc->availability_id; - $demand_reason_id = $soc->demand_reason_id; - $remise_percent = $soc->remise_percent; - $remise_absolue = 0; - $dateinvoice = empty($conf->global->MAIN_AUTOFILL_DATE) ? - 1 : 0; - $projectid = 0; } - $absolute_discount = $soc->getAvailableDiscounts(); + else + { + $cond_reglement_id = $soc->cond_reglement_id; + $mode_reglement_id = $soc->mode_reglement_id; + $availability_id = $soc->availability_id; + $demand_reason_id = $soc->demand_reason_id; + $remise_percent = $soc->remise_percent; + $remise_absolue = 0; + $dateinvoice = empty($conf->global->MAIN_AUTOFILL_DATE)?-1:''; + $projectid = 0; + } + $absolute_discount=$soc->getAvailableDiscounts(); $nbrow = 10; @@ -1414,12 +1451,11 @@ if ($action == 'create' && $user->rights->commande->creer) { print ''; // Date de livraison - print "" . $langs->trans("DeliveryDate") . ''; - if (empty($datedelivery)) { - if (! empty($conf->global->DATE_LIVRAISON_WEEK_DELAY)) - $datedelivery = time() + ((7 * $conf->global->DATE_LIVRAISON_WEEK_DELAY) * 24 * 60 * 60); - else - $datedelivery = empty($conf->global->MAIN_AUTOFILL_DATE) ? - 1 : 0; + print "".$langs->trans("DeliveryDate").''; + if (empty($datedelivery)) + { + if (! empty($conf->global->DATE_LIVRAISON_WEEK_DELAY)) $datedelivery = time() + ((7*$conf->global->DATE_LIVRAISON_WEEK_DELAY) * 24 * 60 * 60); + else $datedelivery=empty($conf->global->MAIN_AUTOFILL_DATE)?-1:''; } $form->select_date($datedelivery, 'liv_', '', '', '', "crea_commande", 1, 1); print ""; diff --git a/htdocs/commande/orderstoinvoice.php b/htdocs/commande/orderstoinvoice.php index bfdf2dbb5ca..0036aa430f1 100644 --- a/htdocs/commande/orderstoinvoice.php +++ b/htdocs/commande/orderstoinvoice.php @@ -373,7 +373,7 @@ if ($action == 'create' && empty($mesgs)) $remise_percent = $soc->remise_percent; } $remise_absolue = 0; - $dateinvoice = empty($conf->global->MAIN_AUTOFILL_DATE)?-1:0; + $dateinvoice = empty($conf->global->MAIN_AUTOFILL_DATE)?-1:''; $absolute_discount=$soc->getAvailableDiscounts(); print '
    '; @@ -413,7 +413,7 @@ if ($action == 'create' && empty($mesgs)) // Date invoice print ''.$langs->trans('Date').''; - $html->select_date(0,'','','','',"add",1,1); + $html->select_date('','','','','',"add",1,1); print ''; // Payment term print ''.$langs->trans('PaymentConditionsShort').''; diff --git a/htdocs/compta/bank/account.php b/htdocs/compta/bank/account.php index 27690ae7093..0e16f6744fd 100644 --- a/htdocs/compta/bank/account.php +++ b/htdocs/compta/bank/account.php @@ -784,8 +784,8 @@ if ($id > 0 || ! empty($ref)) print ''; if ($sep > 0) print ' '; // If we had at least one line in future else print $langs->trans("CurrentBalance"); - print ''; - print ''.price($total).''; + print ' '.$object->currency_code.''; + print ''.price($total, 0, $langs, 0, 0, -1, $object->currency_code).''; print ' '; print ''; } diff --git a/htdocs/compta/bank/index.php b/htdocs/compta/bank/index.php index cf43fc578fb..c9b70e94257 100644 --- a/htdocs/compta/bank/index.php +++ b/htdocs/compta/bank/index.php @@ -90,7 +90,7 @@ print ''.$langs->trans("Status").''; print ''.$langs->trans("BankBalance").''; print "\n"; -$total = 0; $found = 0; +$total = array(); $found = 0; $var=true; foreach ($accounts as $key=>$type) { @@ -119,24 +119,27 @@ foreach ($accounts as $key=>$type) print ''; print ''.$acc->getLibStatut(2).''; print ''; - print ''.price($solde).''; + print ''.price($solde, 0, $langs, 0, 0, -1, $acc->currency_code).''; print ''; print ''; - $total += $solde; + $total[$acc->currency_code] += $solde; } } if (! $found) print ''.$langs->trans("None").''; // Total -print ''.$langs->trans("Total").''.price($total).''; - - -//print ' '; +foreach ($total as $key=>$solde) +{ + print ''.$langs->trans("Total ").$key.''.price($solde, 0, $langs, 0, 0, -1, $key).''; +} +print ''; +print '
    '; /* * Comptes caisse/liquide (courant = 2) */ +print ''; print ''; print ''; print ''; @@ -144,7 +147,7 @@ print ''; print ''; print "\n"; -$total = 0; $found = 0; +$total = array(); $found = 0; $var=true; foreach ($accounts as $key=>$type) { @@ -165,35 +168,37 @@ foreach ($accounts as $key=>$type) print ''; print ''; print ''; print ''; - $total += $solde; + $total[$acc->currency_code] += $solde; } } if (! $found) print ''; // Total -print ''; - - - -//print ''; +foreach ($total as $key=>$solde) +{ + print ''; +} +print '
    '.$langs->trans("CashAccounts").'   '.$langs->trans("Status").''.$langs->trans("BankBalance").'
     '.$acc->getLibStatut(2).''; - print ''.price($solde).''; + print ''.price($solde, 0, $langs, 0, 0, -1, $acc->currency_code).''; print '
    '.$langs->trans("None").'
    '.$langs->trans("Total").''.price($total).'
     
    '.$langs->trans("Total ").$key.''.price($solde, 0, $langs, 0, 0, -1, $key).'
    '; +print '
    '; /* * Comptes placements (courant = 0) */ +print ''; print ''; print ''; print ''; print ''; -print ''; +print ''; print ''; print ''; print "\n"; -$total = 0; $found = 0; +$total = array(); $found = 0; $var=true; foreach ($accounts as $key=>$type) { @@ -222,16 +227,19 @@ foreach ($accounts as $key=>$type) print ''; print ''; print ''; print ''; - $total += $solde; + $total[$acc->currency_code] += $solde; } } if (! $found) print ''; // Total -print ''; +foreach ($total as $key=>$solde) +{ + print ''; +} print "
    '.$langs->trans("SavingAccounts").''.$langs->trans("Bank").''.$langs->trans("Numero").''.$langs->trans("TransactionsToConciliate").''.$langs->trans("TransactionsToConciliate").''.$langs->trans("Status").''.$langs->trans("BankBalance").'
    '.$acc->getLibStatut(2).''; - print ''.price($solde).''; + print ''.price($solde, 0, $langs, 0, 0, -1, $acc->currency_code).''; print '
    '.$langs->trans("None").'
    '.$langs->trans("Total").''.price($total).'
    '.$langs->trans("Total ").$key.''.price($solde, 0, $langs, 0, 0, -1, $key).'
    "; diff --git a/htdocs/compta/facture.php b/htdocs/compta/facture.php index 316c589f046..b22f1c9827e 100644 --- a/htdocs/compta/facture.php +++ b/htdocs/compta/facture.php @@ -1137,12 +1137,17 @@ else if ($action == 'addline' && $user->rights->facture->creer) $tva_npr = get_default_npr($mysoc, $object->client, $prod->id); // We define price for product - if (! empty($conf->global->PRODUIT_MULTIPRICES) && ! empty($object->client->price_level)) { + if (! empty($conf->global->PRODUIT_MULTIPRICES) && ! empty($object->client->price_level)) + { $pu_ht = $prod->multiprices [$object->client->price_level]; $pu_ttc = $prod->multiprices_ttc [$object->client->price_level]; $price_min = $prod->multiprices_min [$object->client->price_level]; $price_base_type = $prod->multiprices_base_type [$object->client->price_level]; - } elseif (! empty($conf->global->PRODUIT_CUSTOMER_PRICES)) { + $tva_tx=$prod->multiprices_tva_tx[$object->client->price_level]; + $tva_npr=$prod->multiprices_recuperableonly[$object->client->price_level]; + } + elseif (! empty($conf->global->PRODUIT_CUSTOMER_PRICES)) + { require_once DOL_DOCUMENT_ROOT . '/product/class/productcustomerprice.class.php'; $prodcustprice = new Productcustomerprice($db); @@ -1159,7 +1164,9 @@ else if ($action == 'addline' && $user->rights->facture->creer) $prod->tva_tx = $prodcustprice->lines [0]->tva_tx; } } - } else { + } + else + { $pu_ht = $prod->price; $pu_ttc = $prod->price_ttc; $price_min = $prod->price_min; @@ -1606,8 +1613,8 @@ if (($action == 'send' || $action == 'relance') && ! $_POST['addfile'] && ! $_PO $interface = new Interfaces($db); $result = $interface->run_triggers('BILL_SENTBYMAIL', $object, $user, $langs, $conf); if ($result < 0) { - $error ++; - $this->errors = $interface->errors; + $error++; + $object->errors = $interface->errors; } // Fin appel triggers @@ -1666,7 +1673,7 @@ else if ($action == 'builddoc') // En get ou en post // Save last template used to generate document if (GETPOST('model')) $object->setDocModel($user, GETPOST('model', 'alpha')); - if (GETPOST('fk_bank')) + if (GETPOST('fk_bank')) // this field may come from an external module $object->fk_bank = GETPOST('fk_bank'); // Define output language @@ -1871,10 +1878,12 @@ if ($action == 'create') $ref_int = (! empty($objectsrc->ref_int) ? $objectsrc->ref_int : ''); $soc = $objectsrc->thirdparty; - $cond_reglement_id = (! empty($objectsrc->cond_reglement_id) ? $objectsrc->cond_reglement_id : (! empty($soc->cond_reglement_id) ? $soc->cond_reglement_id : 1)); - $mode_reglement_id = (! empty($objectsrc->mode_reglement_id) ? $objectsrc->mode_reglement_id : (! empty($soc->mode_reglement_id) ? $soc->mode_reglement_id : 0)); - $remise_percent = (! empty($objectsrc->remise_percent) ? $objectsrc->remise_percent : (! empty($soc->remise_percent) ? $soc->remise_percent : 0)); - $remise_absolue = (! empty($objectsrc->remise_absolue) ? $objectsrc->remise_absolue : (! empty($soc->remise_absolue) ? $soc->remise_absolue : 0)); + + $cond_reglement_id = (! empty($objectsrc->cond_reglement_id)?$objectsrc->cond_reglement_id:(! empty($soc->cond_reglement_id)?$soc->cond_reglement_id:1)); + $mode_reglement_id = (! empty($objectsrc->mode_reglement_id)?$objectsrc->mode_reglement_id:(! empty($soc->mode_reglement_id)?$soc->mode_reglement_id:0)); + $remise_percent = (! empty($objectsrc->remise_percent)?$objectsrc->remise_percent:(! empty($soc->remise_percent)?$soc->remise_percent:0)); + $remise_absolue = (! empty($objectsrc->remise_absolue)?$objectsrc->remise_absolue:(! empty($soc->remise_absolue)?$soc->remise_absolue:0)); + $dateinvoice = empty($conf->global->MAIN_AUTOFILL_DATE)?-1:''; // Replicate extrafields $objectsrc->fetch_optionals($originid); @@ -1884,11 +1893,11 @@ if ($action == 'create') } else { - $cond_reglement_id = $soc->cond_reglement_id; - $mode_reglement_id = $soc->mode_reglement_id; - $remise_percent = $soc->remise_percent; - $remise_absolue = 0; - $dateinvoice = empty($conf->global->MAIN_AUTOFILL_DATE) ? -1 : ''; // Do not set 0 here (0 for a date is 1970) + $cond_reglement_id = $soc->cond_reglement_id; + $mode_reglement_id = $soc->mode_reglement_id; + $remise_percent = $soc->remise_percent; + $remise_absolue = 0; + $dateinvoice = empty($conf->global->MAIN_AUTOFILL_DATE)?-1:''; // Do not set 0 here (0 for a date is 1970) } $absolute_discount = $soc->getAvailableDiscounts(); diff --git a/htdocs/compta/facture/class/facture.class.php b/htdocs/compta/facture/class/facture.class.php index 81bf47715e6..fb92a3b69e1 100644 --- a/htdocs/compta/facture/class/facture.class.php +++ b/htdocs/compta/facture/class/facture.class.php @@ -1406,75 +1406,6 @@ class Facture extends CommonInvoice } } - - /** - * Renvoi une date limite de reglement de facture en fonction des - * conditions de reglements de la facture et date de facturation - * - * @param string $cond_reglement Condition of payment (code or id) to use. If 0, we use current condition. - * @return date Date limite de reglement si ok, <0 si ko - */ - function calculate_date_lim_reglement($cond_reglement=0) - { - if (! $cond_reglement) $cond_reglement=$this->cond_reglement_code; - if (! $cond_reglement) $cond_reglement=$this->cond_reglement_id; - - $cdr_nbjour=0; $cdr_fdm=0; $cdr_decalage=0; - - $sqltemp = 'SELECT c.fdm,c.nbjour,c.decalage'; - $sqltemp.= ' FROM '.MAIN_DB_PREFIX.'c_payment_term as c'; - if (is_numeric($cond_reglement)) $sqltemp.= " WHERE c.rowid=".$cond_reglement; - else $sqltemp.= " WHERE c.code='".$this->db->escape($cond_reglement)."'"; - - dol_syslog(get_class($this).'::calculate_date_lim_reglement sql='.$sqltemp); - $resqltemp=$this->db->query($sqltemp); - if ($resqltemp) - { - if ($this->db->num_rows($resqltemp)) - { - $obj = $this->db->fetch_object($resqltemp); - $cdr_nbjour = $obj->nbjour; - $cdr_fdm = $obj->fdm; - $cdr_decalage = $obj->decalage; - } - } - else - { - $this->error=$this->db->error(); - return -1; - } - $this->db->free($resqltemp); - - /* Definition de la date limite */ - - // 1 : ajout du nombre de jours - $datelim = $this->date + ($cdr_nbjour * 3600 * 24); - - // 2 : application de la regle "fin de mois" - if ($cdr_fdm) - { - $mois=date('m', $datelim); - $annee=date('Y', $datelim); - if ($mois == 12) - { - $mois = 1; - $annee += 1; - } - else - { - $mois += 1; - } - // On se deplace au debut du mois suivant, et on retire un jour - $datelim=dol_mktime(12,0,0,$mois,1,$annee); - $datelim -= (3600 * 24); - } - - // 3 : application du decalage - $datelim += ($cdr_decalage * 3600 * 24); - - return $datelim; - } - /** * Tag la facture comme paye completement (si close_code non renseigne) => this->fk_statut=2, this->paye=1 * ou partiellement (si close_code renseigne) + appel trigger BILL_PAYED => this->fk_statut=2, this->paye stay 0 diff --git a/htdocs/compta/prelevement/class/bonprelevement.class.php b/htdocs/compta/prelevement/class/bonprelevement.class.php index 0a881a2f5dd..417f4362000 100644 --- a/htdocs/compta/prelevement/class/bonprelevement.class.php +++ b/htdocs/compta/prelevement/class/bonprelevement.class.php @@ -651,7 +651,7 @@ class BonPrelevement extends CommonObject { global $conf; - $sql = "SELECT sum(f.total_ttc)"; + $sql = "SELECT sum(f.total_ttc) as nb"; $sql.= " FROM ".MAIN_DB_PREFIX."facture as f,"; $sql.= " ".MAIN_DB_PREFIX."prelevement_facture_demande as pfd"; //$sql.= " ,".MAIN_DB_PREFIX."c_paiement as cp"; @@ -1410,6 +1410,34 @@ class BonPrelevement extends CommonObject fputs($this->file, ' '.$CrLf); fputs($this->file, ' '.$CrLf); fputs($this->file, ''.$CrLf); + + $sql = "SELECT pl.amount"; + $sql.= " FROM"; + $sql.= " ".MAIN_DB_PREFIX."prelevement_lignes as pl,"; + $sql.= " ".MAIN_DB_PREFIX."facture as f,"; + $sql.= " ".MAIN_DB_PREFIX."prelevement_facture as pf"; + $sql.= " WHERE pl.fk_prelevement_bons = ".$this->id; + $sql.= " AND pl.rowid = pf.fk_prelevement_lignes"; + $sql.= " AND pf.fk_facture = f.rowid"; + + //Lines + $i = 0; + $resql=$this->db->query($sql); + if ($resql) + { + $num = $this->db->num_rows($resql); + + while ($i < $num) + { + $obj = $this->db->fetch_object($resql); + $this->total = $this->total + $obj->amount; + $i++; + } + } + else + { + $result = -2; + } } diff --git a/htdocs/core/class/commondocgenerator.class.php b/htdocs/core/class/commondocgenerator.class.php index 3b9065ba4a0..882e0780ed4 100644 --- a/htdocs/core/class/commondocgenerator.class.php +++ b/htdocs/core/class/commondocgenerator.class.php @@ -258,14 +258,14 @@ abstract class CommonDocGenerator $extrafields = new ExtraFields($this->db); $extralabels = $extrafields->fetch_name_optionals_label('socpeople', true); $object->fetch_optionals($object->id, $extralabels); - - foreach($extrafields->attribute_label as $key => $label) + + foreach($extrafields->attribute_label as $key => $label) { - if ($extrafields->attribute_type[$key] == 'price') + if ($extrafields->attribute_type[$key] == 'price') { $object->array_options['options_' . $key] = price($object->array_options ['options_' . $key], 0, $outputlangs, 0, 0, - 1, $conf->currency); } - elseif($extrafields->attribute_type[$key] == 'select') + elseif($extrafields->attribute_type[$key] == 'select') { $object->array_options['options_' . $key] = $extrafields->attribute_param[$key]['options'][$object->array_options['options_' . $key]]; } @@ -377,12 +377,11 @@ abstract class CommonDocGenerator // Retrieve extrafields if (is_array($object->array_options) && count($object->array_options)) { - $extrafieldkey=$this->element; - 'facture'; + $extrafieldkey=$object->element; require_once DOL_DOCUMENT_ROOT.'/core/class/extrafields.class.php'; $extrafields = new ExtraFields($this->db); - $extralabels = $extrafields->fetch_name_optionals_label('facture',true); + $extralabels = $extrafields->fetch_name_optionals_label($extrafieldkey,true); $object->fetch_optionals($object->id,$extralabels); $resarray = $this->fill_substitutionarray_with_extrafields($object,$resarray,$extrafields,$array_key=$array_key,$outputlangs); diff --git a/htdocs/core/class/commoninvoice.class.php b/htdocs/core/class/commoninvoice.class.php index 80d719decae..6d657f0c36c 100644 --- a/htdocs/core/class/commoninvoice.class.php +++ b/htdocs/core/class/commoninvoice.class.php @@ -288,6 +288,74 @@ abstract class CommonInvoice extends CommonObject } } } + + /** + * Renvoi une date limite de reglement de facture en fonction des + * conditions de reglements de la facture et date de facturation + * + * @param string $cond_reglement Condition of payment (code or id) to use. If 0, we use current condition. + * @return date Date limite de reglement si ok, <0 si ko + */ + function calculate_date_lim_reglement($cond_reglement=0) + { + if (! $cond_reglement) $cond_reglement=$this->cond_reglement_code; + if (! $cond_reglement) $cond_reglement=$this->cond_reglement_id; + + $cdr_nbjour=0; $cdr_fdm=0; $cdr_decalage=0; + + $sqltemp = 'SELECT c.fdm,c.nbjour,c.decalage'; + $sqltemp.= ' FROM '.MAIN_DB_PREFIX.'c_payment_term as c'; + if (is_numeric($cond_reglement)) $sqltemp.= " WHERE c.rowid=".$cond_reglement; + else $sqltemp.= " WHERE c.code='".$this->db->escape($cond_reglement)."'"; + + dol_syslog(get_class($this).'::calculate_date_lim_reglement sql='.$sqltemp); + $resqltemp=$this->db->query($sqltemp); + if ($resqltemp) + { + if ($this->db->num_rows($resqltemp)) + { + $obj = $this->db->fetch_object($resqltemp); + $cdr_nbjour = $obj->nbjour; + $cdr_fdm = $obj->fdm; + $cdr_decalage = $obj->decalage; + } + } + else + { + $this->error=$this->db->error(); + return -1; + } + $this->db->free($resqltemp); + + /* Definition de la date limite */ + + // 1 : ajout du nombre de jours + $datelim = $this->date + ($cdr_nbjour * 3600 * 24); + + // 2 : application de la regle "fin de mois" + if ($cdr_fdm) + { + $mois=date('m', $datelim); + $annee=date('Y', $datelim); + if ($mois == 12) + { + $mois = 1; + $annee += 1; + } + else + { + $mois += 1; + } + // On se deplace au debut du mois suivant, et on retire un jour + $datelim=dol_mktime(12,0,0,$mois,1,$annee); + $datelim -= (3600 * 24); + } + + // 3 : application du decalage + $datelim += ($cdr_decalage * 3600 * 24); + + return $datelim; + } } /** diff --git a/htdocs/core/class/commonobject.class.php b/htdocs/core/class/commonobject.class.php index 095a1a9ba12..914d9be59a3 100644 --- a/htdocs/core/class/commonobject.class.php +++ b/htdocs/core/class/commonobject.class.php @@ -637,7 +637,7 @@ abstract class CommonObject global $conf; dol_syslog(get_class($this).'::fetch_barcode this->element='.$this->element.' this->barcode_type='.$this->barcode_type); - + $idtype=$this->barcode_type; if (empty($idtype) && $idtype != '0') // If type of barcode no set, we try to guess. If set to '0' it means we forced to have type remain not defined { @@ -645,7 +645,7 @@ abstract class CommonObject else if ($this->element == 'societe') $idtype = $conf->global->GENBARCODE_BARCODETYPE_THIRDPARTY; else dol_syslog('Call fetch_barcode with barcode_type not defined and cant be guessed', LOG_WARNING); } - + if ($idtype > 0) { if (empty($this->barcode_type) || empty($this->barcode_type_code) || empty($this->barcode_type_label) || empty($this->barcode_type_coder)) // If data not already loaded @@ -2121,7 +2121,7 @@ abstract class CommonObject foreach ($tab as $key => $value) { - //Test fetch_array ! is_int($key) because fetch_array seult is a mix table with Key as alpha and Key as int (depend db engine) + // Test fetch_array ! is_int($key) because fetch_array seult is a mix table with Key as alpha and Key as int (depend db engine) if ($key != 'rowid' && $key != 'tms' && $key != 'fk_member' && ! is_int($key)) { // we can add this attribute to adherent object @@ -3237,6 +3237,7 @@ abstract class CommonObject $marginInfo = $this->getMarginInfos($force_price); print ''; + print ''; print ''; print ''; @@ -3250,38 +3251,49 @@ abstract class CommonObject if (! empty($conf->global->DISPLAY_MARK_RATES)) print ''; print ''; - //if ($marginInfo['margin_on_products'] != 0 && $marginInfo['margin_on_services'] != 0) { - print ''; - print ''; - print ''; - print ''; - print ''; - if (! empty($conf->global->DISPLAY_MARGIN_RATES)) - print ''; - if (! empty($conf->global->DISPLAY_MARK_RATES)) - print ''; - print ''; - print ''; - print ''; - print ''; - print ''; - print ''; - if (! empty($conf->global->DISPLAY_MARGIN_RATES)) - print ''; - if (! empty($conf->global->DISPLAY_MARK_RATES)) - print ''; - print ''; - //} - print ''; - print ''; - print ''; - print ''; - print ''; - if (! empty($conf->global->DISPLAY_MARGIN_RATES)) - print ''; - if (! empty($conf->global->DISPLAY_MARK_RATES)) - print ''; - print ''; + + if (! empty($conf->product->enabled)) + { + //if ($marginInfo['margin_on_products'] != 0 && $marginInfo['margin_on_services'] != 0) { + print ''; + print ''; + print ''; + print ''; + print ''; + if (! empty($conf->global->DISPLAY_MARGIN_RATES)) + print ''; + if (! empty($conf->global->DISPLAY_MARK_RATES)) + print ''; + print ''; + } + + if (! empty($conf->service->enabled)) + { + print ''; + print ''; + print ''; + print ''; + print ''; + if (! empty($conf->global->DISPLAY_MARGIN_RATES)) + print ''; + if (! empty($conf->global->DISPLAY_MARK_RATES)) + print ''; + print ''; + } + + if (! empty($conf->product->enabled) && ! empty($conf->service->enabled)) + { + print ''; + print ''; + print ''; + print ''; + print ''; + if (! empty($conf->global->DISPLAY_MARGIN_RATES)) + print ''; + if (! empty($conf->global->DISPLAY_MARK_RATES)) + print ''; + print ''; + } print '
    '.$langs->trans('Margins').''.$langs->trans('SellingPrice').''.$langs->trans('MarkRate').'
    '.$langs->trans('MarginOnProducts').''.price($marginInfo['pv_products'], null, null, null, null, $rounding).''.price($marginInfo['pa_products'], null, null, null, null, $rounding).''.price($marginInfo['margin_on_products'], null, null, null, null, $rounding).''.(($marginInfo['margin_rate_products'] == '')?'':price($marginInfo['margin_rate_products'], null, null, null, null, $rounding).'%').''.(($marginInfo['mark_rate_products'] == '')?'':price($marginInfo['mark_rate_products'], null, null, null, null, $rounding).'%').'
    '.$langs->trans('MarginOnServices').''.price($marginInfo['pv_services'], null, null, null, null, $rounding).''.price($marginInfo['pa_services'], null, null, null, null, $rounding).''.price($marginInfo['margin_on_services'], null, null, null, null, $rounding).''.(($marginInfo['margin_rate_services'] == '')?'':price($marginInfo['margin_rate_services'], null, null, null, null, $rounding).'%').''.(($marginInfo['mark_rate_services'] == '')?'':price($marginInfo['mark_rate_services'], null, null, null, null, $rounding).'%').'
    '.$langs->trans('TotalMargin').''.price($marginInfo['pv_total'], null, null, null, null, $rounding).''.price($marginInfo['pa_total'], null, null, null, null, $rounding).''.price($marginInfo['total_margin'], null, null, null, null, $rounding).''.(($marginInfo['total_margin_rate'] == '')?'':price($marginInfo['total_margin_rate'], null, null, null, null, $rounding).'%').''.(($marginInfo['total_mark_rate'] == '')?'':price($marginInfo['total_mark_rate'], null, null, null, null, $rounding).'%').'
    '.$langs->trans('MarginOnProducts').''.price($marginInfo['pv_products'], null, null, null, null, $rounding).''.price($marginInfo['pa_products'], null, null, null, null, $rounding).''.price($marginInfo['margin_on_products'], null, null, null, null, $rounding).''.(($marginInfo['margin_rate_products'] == '')?'':price($marginInfo['margin_rate_products'], null, null, null, null, $rounding).'%').''.(($marginInfo['mark_rate_products'] == '')?'':price($marginInfo['mark_rate_products'], null, null, null, null, $rounding).'%').'
    '.$langs->trans('MarginOnServices').''.price($marginInfo['pv_services'], null, null, null, null, $rounding).''.price($marginInfo['pa_services'], null, null, null, null, $rounding).''.price($marginInfo['margin_on_services'], null, null, null, null, $rounding).''.(($marginInfo['margin_rate_services'] == '')?'':price($marginInfo['margin_rate_services'], null, null, null, null, $rounding).'%').''.(($marginInfo['mark_rate_services'] == '')?'':price($marginInfo['mark_rate_services'], null, null, null, null, $rounding).'%').'
    '.$langs->trans('TotalMargin').''.price($marginInfo['pv_total'], null, null, null, null, $rounding).''.price($marginInfo['pa_total'], null, null, null, null, $rounding).''.price($marginInfo['total_margin'], null, null, null, null, $rounding).''.(($marginInfo['total_margin_rate'] == '')?'':price($marginInfo['total_margin_rate'], null, null, null, null, $rounding).'%').''.(($marginInfo['total_mark_rate'] == '')?'':price($marginInfo['total_mark_rate'], null, null, null, null, $rounding).'%').'
    '; } diff --git a/htdocs/core/class/conf.class.php b/htdocs/core/class/conf.class.php index e5e4d5b634c..b6225de2913 100644 --- a/htdocs/core/class/conf.class.php +++ b/htdocs/core/class/conf.class.php @@ -465,6 +465,10 @@ class Conf $this->bank->rappro->warning_delay=(isset($this->global->MAIN_DELAY_TRANSACTIONS_TO_CONCILIATE)?$this->global->MAIN_DELAY_TRANSACTIONS_TO_CONCILIATE:0)*24*60*60; $this->bank->cheque->warning_delay=(isset($this->global->MAIN_DELAY_CHEQUES_TO_DEPOSIT)?$this->global->MAIN_DELAY_CHEQUES_TO_DEPOSIT:0)*24*60*60; + // For modules that want to disable top or left menu + if (! empty($this->global->MAIN_HIDE_TOP_MENU)) $this->dol_hide_topmenu=$this->global->MAIN_HIDE_TOP_MENU; + if (! empty($this->global->MAIN_HIDE_LEFT_MENU)) $this->dol_hide_leftmenu=$this->global->MAIN_HIDE_LEFT_MENU; + // For backward compatibility if (isset($this->product)) $this->produit=$this->product; if (isset($this->facture)) $this->invoice=$this->facture; diff --git a/htdocs/core/class/fileupload.class.php b/htdocs/core/class/fileupload.class.php index b5483139fb6..520ab7634be 100644 --- a/htdocs/core/class/fileupload.class.php +++ b/htdocs/core/class/fileupload.class.php @@ -329,14 +329,14 @@ class FileUpload $file->error = 'minFileSize'; return false; } - if (is_int($this->options['max_number_of_files']) && ( + if (is_numeric($this->options['max_number_of_files']) && ( count($this->getFileObjects()) >= $this->options['max_number_of_files']) ) { $file->error = 'maxNumberOfFiles'; return false; } list($img_width, $img_height) = @getimagesize($uploaded_file); - if (is_int($img_width)) { + if (is_numeric($img_width)) { if ($this->options['max_width'] && $img_width > $this->options['max_width'] || $this->options['max_height'] && $img_height > $this->options['max_height']) { $file->error = 'maxResolution'; diff --git a/htdocs/core/class/html.form.class.php b/htdocs/core/class/html.form.class.php index d16c9f19a5a..1f5d14b7529 100644 --- a/htdocs/core/class/html.form.class.php +++ b/htdocs/core/class/html.form.class.php @@ -191,8 +191,9 @@ class Form $ret.=''; if ($typeofdata != 'day' && $typeofdata != 'datepicker' && $typeofdata != 'datehourpicker') { - $ret.=''; - $ret.='

    '."\n"; + $ret.=''; + $ret.=''; + $ret.='
    '."\n"; $ret.=''; $ret.=''; } @@ -1258,7 +1259,7 @@ class Form * Return list of products for customer in Ajax if Ajax activated or go to select_produits_list * * @param int $selected Preselected products - * @param string $htmlname Name of HTML seletc field (must be unique in page) + * @param string $htmlname Name of HTML select field (must be unique in page) * @param int $filtertype Filter on product type (''=nofilter, 0=product, 1=service) * @param int $limit Limit on number of returned lines * @param int $price_level Level of price to show @@ -1267,7 +1268,7 @@ class Form * @param string $selected_input_value Value of preselected input text (with ajax) * @param int $hidelabel Hide label (0=no, 1=yes, 2=show search icon (before) and placeholder, 3 search icon after) * @param array $ajaxoptions Options for ajax_autocompleter - * @param int $socid Thridparty Id + * @param int $socid Thirdparty Id * @return void */ function select_produits($selected='', $htmlname='productid', $filtertype='', $limit=20, $price_level=0, $status=1, $finished=2, $selected_input_value='', $hidelabel=0, $ajaxoptions=array(),$socid=0) @@ -1319,13 +1320,13 @@ class Form * @param int $selected Preselected product * @param string $htmlname Name of select html * @param string $filtertype Filter on product type (''=nofilter, 0=product, 1=service) - * @param int $limit Limite sur le nombre de lignes retournees + * @param int $limit Limit on number of returned lines * @param int $price_level Level of price to show * @param string $filterkey Filter on product * @param int $status -1=Return all products, 0=Products not on sell, 1=Products on sell * @param int $finished Filter on finished field: 2=No filter * @param int $outputmode 0=HTML select string, 1=Array - * @param int $socid Thridparty Id + * @param int $socid Thirdparty Id * @return array Array of keys for json */ function select_produits_list($selected='',$htmlname='productid',$filtertype='',$limit=20,$price_level=0,$filterkey='',$status=1,$finished=2,$outputmode=0,$socid=0) @@ -2667,7 +2668,7 @@ class Form $autoOpen=true; $dialogconfirm='dialog-confirm'; $button=''; - if (! is_int($useajax)) + if (! is_numeric($useajax)) { $button=$useajax; $useajax=1; @@ -3732,13 +3733,14 @@ class Form /** * Function to show a form to select a duration on a page * - * @param string $prefix prefix - * @param int $iSecond Default preselected duration (number of seconds) - * @param int $disabled Disable the combo box - * @param string $typehour if 'select' then input hour and input min is a combo, if 'text' input hour is in text and input min is a combo + * @param string $prefix Prefix + * @param int $iSecond Default preselected duration (number of seconds) + * @param int $disabled Disable the combo box + * @param string $typehour If 'select' then input hour and input min is a combo, if 'text' input hour is in text and input min is a combo + * @param string $minunderhours If 1, show minutes selection under the hours * @return void */ - function select_duration($prefix, $iSecond='', $disabled=0, $typehour='select') + function select_duration($prefix, $iSecond='', $disabled=0, $typehour='select', $minunderhours=0) { global $langs; @@ -3769,7 +3771,11 @@ class Form { print ''; } - print $langs->trans('Hours'). " "; + print $langs->trans('Hours'); + + if ($minunderhours) print '
    '; + else print " "; + print '" ) .insertAfter( select ) .val( value ) + .attr('id', 'inputautocomplete'+select.attr('id')) .autocomplete({ delay: 0, minLength: this.options.minLengthToAutocomplete, diff --git a/htdocs/core/lib/admin.lib.php b/htdocs/core/lib/admin.lib.php index 2f5e217641f..19441e507aa 100644 --- a/htdocs/core/lib/admin.lib.php +++ b/htdocs/core/lib/admin.lib.php @@ -937,6 +937,8 @@ function complete_dictionary_with_modules(&$taborder,&$tabname,&$tablib,&$tabsql $const_name = 'MAIN_MODULE_'.strtoupper(preg_replace('/^mod/i','',get_class($objMod))); if ($objMod->version == 'development' && $conf->global->MAIN_FEATURES_LEVEL < 2 && ! $conf->global->$const_name) $modulequalified=0; if ($objMod->version == 'experimental' && $conf->global->MAIN_FEATURES_LEVEL < 1 && ! $conf->global->$const_name) $modulequalified=0; + //If module is not activated disqualified + if (empty($conf->global->$const_name)) $modulequalified=0; if ($modulequalified) { diff --git a/htdocs/core/lib/agenda.lib.php b/htdocs/core/lib/agenda.lib.php index d2d380ad45c..08aacfca14e 100644 --- a/htdocs/core/lib/agenda.lib.php +++ b/htdocs/core/lib/agenda.lib.php @@ -39,7 +39,7 @@ * @param string $filterd Filter of done by user * @param int $pid Product id * @param int $socid Third party id - * @param array $showextcals Array with list of external calendars, or -1 to show no legend + * @param array $showextcals Array with list of external calendars (used to show links to select calendar), or -1 to show no legend * @param string $actioncode Preselected value of actioncode for filter on type * @return void */ @@ -78,12 +78,12 @@ function print_actions_filter($form, $canedit, $status, $year, $month, $day, $sh print $form->select_dolusers($filtert, 'usertodo', 1, '', ! $canedit); print ''; - print ''; + /*print ''; print ''; print $langs->trans("or") . ' ' . $langs->trans("ActionsDoneBy"); print '  '; print $form->select_dolusers($filterd, 'userdone', 1, '', ! $canedit); - print ''; + print '';*/ include_once DOL_DOCUMENT_ROOT . '/core/class/html.formactions.class.php'; $formactions=new FormActions($db); @@ -136,7 +136,7 @@ function print_actions_filter($form, $canedit, $status, $year, $month, $day, $sh print '});' . "\n"; print '' . "\n"; print ''; - if (! empty($conf->global->MAIN_JS_SWITCH_AGENDA)) + if (! empty($conf->use_javascript_ajax)) { if (count($showextcals) > 0) { @@ -147,7 +147,10 @@ function print_actions_filter($form, $canedit, $status, $year, $month, $day, $sh print ''; - + // Stock if (! empty($conf->stock->enabled)) { @@ -901,9 +901,9 @@ if ($action == 'create') } print ''; } - + print "\n"; - + // Show subproducts of product if (! empty($conf->global->PRODUIT_SOUSPRODUITS) && $line->fk_product > 0) { @@ -936,7 +936,7 @@ if ($action == 'create') print ''; - + print ''; print ''; // Weight print ''; // Depth @@ -1431,7 +1431,7 @@ else if ($id || $ref) } // Batch number managment - if (! empty($conf->productbatch->enabled)) { + if (! empty($conf->productbatch->enabled)) { if (isset($lines[$i]->detail_batch) ) { print ''; } - // Ligne en mode update + // Line in update mode if ($object->statut == 0 && $action == 'editline' && $user->rights->ficheinter->creer && GETPOST('line_id','int') == $objp->rowid) { print ''; @@ -1452,9 +1450,7 @@ else if ($id > 0 || ! empty($ref)) $db->free($resql); - /* - * Add line - */ + // Add new line if ($object->statut == 0 && $user->rights->ficheinter->creer && $action <> 'editline') { if (! $num) print '
    '; print '' . "\n"; print ' ' . $val ['name']; @@ -434,9 +437,9 @@ function actions_prepare_head($object) $head[$h][1] = $langs->trans('Info'); $head[$h][2] = 'info'; $h++; - + complete_head_from_modules($conf,$langs,$object,$head,$h,'action'); - + complete_head_from_modules($conf,$langs,$object,$head,$h,'action','remove'); return $head; diff --git a/htdocs/core/lib/ajax.lib.php b/htdocs/core/lib/ajax.lib.php index 55815324487..f36dc59c43a 100644 --- a/htdocs/core/lib/ajax.lib.php +++ b/htdocs/core/lib/ajax.lib.php @@ -368,6 +368,13 @@ function ajax_combobox($htmlname, $events=array(), $minLengthToAutocomplete=0) } }); $("select#" + htmlname).html(response.value); + if (response.num) { + var selecthtml_str = response.value; + var selecthtml_dom=$.parseHTML(selecthtml_str); + $("#inputautocomplete"+htmlname).val(selecthtml_dom[0][0].innerHTML); + } else { + $("#inputautocomplete"+htmlname).val(""); + } }); } diff --git a/htdocs/core/lib/functions.lib.php b/htdocs/core/lib/functions.lib.php index a8609af05bd..e81c8b3b2d9 100644 --- a/htdocs/core/lib/functions.lib.php +++ b/htdocs/core/lib/functions.lib.php @@ -172,7 +172,7 @@ function dol_shutdown() * Return value of a param into GET or POST supervariable * * @param string $paramname Name of parameter to found - * @param string $check Type of check (''=no check, 'int'=check it's numeric, 'alpha'=check it's text and sign, 'az'=check it's a-z only, 'array'=check it's array) + * @param string $check Type of check (''=no check, 'int'=check it's numeric, 'alpha'=check it's text and sign, 'aZ'=check it's a-z only, 'array'=check it's array) * @param int $method Type of method (0 = get then post, 1 = only get, 2 = only post, 3 = post then get, 4 = post then get then cookie) * @return string||string[] Value found, or '' if check fails */ @@ -457,6 +457,8 @@ function dol_escape_js($stringtoescape, $mode=0) * @param string $stringtoescape String to escape * @param int $keepb Do not clean b tags * @return string Escaped string + * + * @see dol_string_nohtmltag */ function dol_escape_htmltag($stringtoescape,$keepb=0) { @@ -2638,11 +2640,11 @@ function print_barre_liste($titre, $page, $file, $options='', $sortfield='', $so /** * Fonction servant a afficher les fleches de navigation dans les pages de listes * - * @param int $page Numero of page - * @param string $file Lien - * @param string $options Autres parametres d'url a propager dans les liens ("" par defaut) - * @param int $nextpage Faut-il une page suivante - * @param string $betweenarrows HTML Content to show between arrows + * @param int $page Number of page + * @param string $file Lien + * @param string $options Autres parametres d'url a propager dans les liens ("" par defaut) + * @param boolean|int $nextpage Do we show a next page button + * @param string $betweenarrows HTML Content to show between arrows * @return void */ function print_fleche_navigation($page,$file,$options='',$nextpage=0,$betweenarrows='') @@ -3436,6 +3438,8 @@ function picto_required() * @param string $removelinefeed Replace also all lines feeds by a space, otherwise only last one are removed * @param string $pagecodeto Encoding of input/output string * @return string String cleaned + * + * @see dol_escape_htmltag */ function dol_string_nohtmltag($StringHtml,$removelinefeed=1,$pagecodeto='UTF-8') { @@ -3694,6 +3698,7 @@ function dol_textishtml($msg,$option=0) elseif (preg_match('/<(br|div|font|img|li|span|strong|table)>/i',$msg)) return true; elseif (preg_match('/<(br|div|font|img|li|span|strong|table)\s+[^<>\/]*>/i',$msg)) return true; elseif (preg_match('/<(br|div|font|img|li|span|strong|table)\s+[^<>\/]*\/>/i',$msg)) return true; + elseif (preg_match('//i',$msg)) return true; elseif (preg_match('/&[A-Z0-9]{1,6};/i',$msg)) return true; // Html entities names (http://www.w3schools.com/tags/ref_entities.asp) elseif (preg_match('/&#[0-9]{2,3};/i',$msg)) return true; // Html entities numbers (http://www.w3schools.com/tags/ref_entities.asp) return false; @@ -4588,4 +4593,3 @@ function natural_search($fields, $value) } return " AND " . ($end > 1? '(' : '') . $res; } - diff --git a/htdocs/core/lib/pdf.lib.php b/htdocs/core/lib/pdf.lib.php index 6f8a86389bc..543c2f5ef43 100644 --- a/htdocs/core/lib/pdf.lib.php +++ b/htdocs/core/lib/pdf.lib.php @@ -290,11 +290,10 @@ function pdf_getHeightForLogo($logo, $url = false) * @param Societe $targetcompany Target company object * @param Contact $targetcontact Target contact object * @param int $usecontact Use contact instead of company - * @param int $mode Address type - * @param Societe $deliverycompany Delivery company object + * @param int $mode Address type ('source', 'target', 'targetwithdetails') * @return string String with full address */ -function pdf_build_address($outputlangs,$sourcecompany,$targetcompany='',$targetcontact='',$usecontact=0,$mode='source',$deliverycompany='') +function pdf_build_address($outputlangs,$sourcecompany,$targetcompany='',$targetcontact='',$usecontact=0,$mode='source') { global $conf; @@ -325,7 +324,7 @@ function pdf_build_address($outputlangs,$sourcecompany,$targetcompany='',$target } } - if ($mode == 'target') + if ($mode == 'target' || $mode == 'targetwithdetails') { if ($usecontact) { @@ -344,11 +343,13 @@ function pdf_build_address($outputlangs,$sourcecompany,$targetcompany='',$target $stringaddress.=$outputlangs->convToOutputCharset($outputlangs->transnoentitiesnoconv("Country".$targetcompany->country_code))."\n"; } - - if (! empty($conf->global->MAIN_PDF_ADDALSOTARGETDETAILS)) + if (! empty($conf->global->MAIN_PDF_ADDALSOTARGETDETAILS) || $mode == 'targetwithdetails') { // Phone - if ($targetcontact->phone_pro) $stringaddress .= ($stringaddress ? "\n" : '' ).$outputlangs->transnoentities("Phone").": ".$outputlangs->convToOutputCharset($targetcontact->phone_pro); + if (! empty($targetcontact->phone_pro) || ! empty($targetcontact->phone_mobile)) $stringaddress .= ($stringaddress ? "\n" : '' ).$outputlangs->transnoentities("Phone").": "; + if (! empty($targetcontact->phone_pro)) $stringaddress .= $outputlangs->convToOutputCharset($targetcontact->phone_pro); + if (! empty($targetcontact->phone_pro) && ! empty($targetcontact->phone_mobile)) $stringaddress .= " / "; + if (! empty($targetcontact->phone_mobile)) $stringaddress .= $outputlangs->convToOutputCharset($targetcontact->phone_mobile); // Fax if ($targetcontact->fax) $stringaddress .= ($stringaddress ? "\n" : '' ).$outputlangs->transnoentities("Fax").": ".$outputlangs->convToOutputCharset($targetcontact->fax); // EMail @@ -363,10 +364,13 @@ function pdf_build_address($outputlangs,$sourcecompany,$targetcompany='',$target // Country if (!empty($targetcompany->country_code) && $targetcompany->country_code != $sourcecompany->country_code) $stringaddress.=$outputlangs->convToOutputCharset($outputlangs->transnoentitiesnoconv("Country".$targetcompany->country_code))."\n"; - if (! empty($conf->global->MAIN_PDF_ADDALSOTARGETDETAILS)) + if (! empty($conf->global->MAIN_PDF_ADDALSOTARGETDETAILS) || $mode == 'targetwithdetails') { // Phone - if ($targetcompany->phone) $stringaddress .= ($stringaddress ? "\n" : '' ).$outputlangs->transnoentities("Phone").": ".$outputlangs->convToOutputCharset($targetcompany->phone); + if (! empty($targetcompany->phone) || ! empty($targetcompany->phone_mobile)) $stringaddress .= ($stringaddress ? "\n" : '' ).$outputlangs->transnoentities("Phone").": "; + if (! empty($targetcompany->phone)) $stringaddress .= $outputlangs->convToOutputCharset($targetcompany->phone); + if (! empty($targetcompany->phone) && ! empty($targetcompany->phone_mobile)) $stringaddress .= " / "; + if (! empty($targetcompany->phone_mobile)) $stringaddress .= $outputlangs->convToOutputCharset($targetcompany->phone_mobile); // Fax if ($targetcompany->fax) $stringaddress .= ($stringaddress ? "\n" : '' ).$outputlangs->transnoentities("Fax").": ".$outputlangs->convToOutputCharset($targetcompany->fax); // EMail @@ -409,16 +413,6 @@ function pdf_build_address($outputlangs,$sourcecompany,$targetcompany='',$target } } - if ($mode == 'delivery') // for a delivery address (address + phone/fax) - { - $stringaddress .= ($stringaddress ? "\n" : '' ).$outputlangs->convToOutputCharset(dol_format_address($deliverycompany))."\n"; - - // Phone - if ($deliverycompany->phone) $stringaddress .= ($stringaddress ? "\n" : '' ).$outputlangs->transnoentities("Phone").": ".$outputlangs->convToOutputCharset($deliverycompany->phone); - // Fax - if ($deliverycompany->fax) $stringaddress .= ($stringaddress ? ($deliverycompany->phone ? " - " : "\n") : '' ).$outputlangs->transnoentities("Fax").": ".$outputlangs->convToOutputCharset($deliverycompany->fax); - } - return $stringaddress; } @@ -438,7 +432,9 @@ function pdf_pagehead(&$pdf,$outputlangs,$page_height) // Add a background image on document if (! empty($conf->global->MAIN_USE_BACKGROUND_ON_PDF)) { - $pdf->Image($conf->mycompany->dir_output.'/logos/'.$conf->global->MAIN_USE_BACKGROUND_ON_PDF, 0, 0, 0, $page_height); + $pdf->SetAutoPageBreak(0,0); // Disable auto pagebreak before adding image + $pdf->Image($conf->mycompany->dir_output.'/logos/'.$conf->global->MAIN_USE_BACKGROUND_ON_PDF, (isset($conf->global->MAIN_USE_BACKGROUND_ON_PDF_X)?$conf->global->MAIN_USE_BACKGROUND_ON_PDF_X:0), (isset($conf->global->MAIN_USE_BACKGROUND_ON_PDF_Y)?$conf->global->MAIN_USE_BACKGROUND_ON_PDF_Y:0), 0, $page_height); + $pdf->SetAutoPageBreak(1,0); // Restore pagebreak } } @@ -960,19 +956,30 @@ function pdf_getlinedesc($object,$i,$outputlangs,$hideref=0,$hidedesc=0,$issuppl // If a predefined product and multilang and on other lang, we renamed label with label translated if (! empty($conf->global->MAIN_MULTILANGS) && ($outputlangs->defaultlang != $langs->defaultlang)) { - if (! empty($prodser->multilangs[$outputlangs->defaultlang]["label"]) && $label == $prodser->label) $label=$prodser->multilangs[$outputlangs->defaultlang]["label"]; + $translatealsoifmodified=(! empty($conf->global->MAIN_MULTILANG_TRANSLATE_EVEN_IF_MODIFIED)); // By default if value was modified manually, we keep it (no translation because we don't have it) - //Manage HTML entities description test - //Cause $prodser->description is store with htmlentities but $desc no - $needdesctranslation=false; + // TODO Instead of making a compare to see if param was modified, check that content contains reference translation. If yes, add the added part to the new translation + // ($textwasmodified is replaced with $textwasmodifiedorcompleted and we add completion). + + // Set label + // If we want another language, and if label is same than default language (we did force it to a specific value), we can use translation. + //var_dump($outputlangs->defaultlang.' - '.$langs->defaultlang.' - '.$label.' - '.$prodser->label);exit; + $textwasmodified=($label == $prodser->label); + if (! empty($prodser->multilangs[$outputlangs->defaultlang]["label"]) && ($textwasmodified || $translatealsoifmodified)) $label=$prodser->multilangs[$outputlangs->defaultlang]["label"]; + + // Set desc + // Manage HTML entities description test because $prodser->description is store with htmlentities but $desc no + $textwasmodified=false; if (!empty($desc) && dol_textishtml($desc) && !empty($prodser->description) && dol_textishtml($prodser->description)) { - $needdesctranslation=(strpos(dol_html_entity_decode($desc,ENT_QUOTES | ENT_HTML401),dol_html_entity_decode($prodser->description,ENT_QUOTES | ENT_HTML401))!==false); + $textwasmodified=(strpos(dol_html_entity_decode($desc,ENT_QUOTES | ENT_HTML401),dol_html_entity_decode($prodser->description,ENT_QUOTES | ENT_HTML401))!==false); } else { - $needdesctranslation=($desc == $prodser->description); + $textwasmodified=($desc == $prodser->description); } + if (! empty($prodser->multilangs[$outputlangs->defaultlang]["description"]) && ($textwasmodified || $translatealsoifmodified)) $desc=$prodser->multilangs[$outputlangs->defaultlang]["description"]; - if (! empty($prodser->multilangs[$outputlangs->defaultlang]["description"]) && ($needdesctranslation)) $desc=$prodser->multilangs[$outputlangs->defaultlang]["description"]; - if (! empty($prodser->multilangs[$outputlangs->defaultlang]["note"]) && $note == $prodser->note) $note=$prodser->multilangs[$outputlangs->defaultlang]["note"]; + // Set note + $textwasmodified=($note == $prodser->note); + if (! empty($prodser->multilangs[$outputlangs->defaultlang]["note"]) && ($textwasmodified || $translatealsoifmodified)) $note=$prodser->multilangs[$outputlangs->defaultlang]["note"]; } } @@ -1036,10 +1043,10 @@ function pdf_getlinedesc($object,$i,$outputlangs,$hideref=0,$hidedesc=0,$issuppl if (empty($hideref)) { - if ($issupplierline) $ref_prodserv = $prodser->ref.' ('.$outputlangs->transnoentitiesnoconv("SupplierRef").' '.$ref_supplier.')'; // Show local ref and supplier ref + if ($issupplierline) $ref_prodserv = $prodser->ref.($ref_supplier ? ' ('.$outputlangs->transnoentitiesnoconv("SupplierRef").' '.$ref_supplier.')' : ''); // Show local ref and supplier ref else $ref_prodserv = $prodser->ref; // Show local ref only - $ref_prodserv .= " - "; + if (! empty($libelleproduitservice)) $ref_prodserv .= " - "; } $libelleproduitservice=$prefix_prodserv.$ref_prodserv.$libelleproduitservice; diff --git a/htdocs/core/lib/security2.lib.php b/htdocs/core/lib/security2.lib.php index e5835ff6a68..40dd2c03ac3 100644 --- a/htdocs/core/lib/security2.lib.php +++ b/htdocs/core/lib/security2.lib.php @@ -292,11 +292,11 @@ function dol_loginfunction($langs,$conf,$mysoc) if (! empty($conf->global->MAIN_USE_JQUERY_THEME)) $jquerytheme = $conf->global->MAIN_USE_JQUERY_THEME; // Set dol_hide_topmenu, dol_hide_leftmenu, dol_optimize_smallscreen, dol_nomousehover - $dol_hide_topmenu=GETPOST('dol_hide_topmenu'); - $dol_hide_leftmenu=GETPOST('dol_hide_leftmenu'); - $dol_optimize_smallscreen=GETPOST('dol_optimize_smallscreen'); - $dol_no_mouse_hover=GETPOST('dol_no_mouse_hover'); - $dol_use_jmobile=GETPOST('dol_use_jmobile'); + $dol_hide_topmenu=GETPOST('dol_hide_topmenu','int'); + $dol_hide_leftmenu=GETPOST('dol_hide_leftmenu','int'); + $dol_optimize_smallscreen=GETPOST('dol_optimize_smallscreen','int'); + $dol_no_mouse_hover=GETPOST('dol_no_mouse_hover','int'); + $dol_use_jmobile=GETPOST('dol_use_jmobile','int'); // Include login page template include $template_dir.'login.tpl.php'; diff --git a/htdocs/core/login/functions_ldap.php b/htdocs/core/login/functions_ldap.php index 1806d9f2970..403530ac80b 100644 --- a/htdocs/core/login/functions_ldap.php +++ b/htdocs/core/login/functions_ldap.php @@ -55,7 +55,7 @@ function check_user_password_ldap($usertotest,$passwordtotest,$entitytotest) $login=''; $resultFetchUser=''; - if (! empty($_POST["username"])) + if (!empty($_POST["username"]) || $usertotest) { // If test username/password asked, we define $test=false and $login var if ok, set $_SESSION["dol_loginmesg"] if ko $ldaphost=$dolibarr_main_auth_ldap_host; @@ -228,4 +228,4 @@ function check_user_password_ldap($usertotest,$passwordtotest,$entitytotest) } -?> \ No newline at end of file +?> diff --git a/htdocs/core/menus/standard/eldy.lib.php b/htdocs/core/menus/standard/eldy.lib.php index 29ad35214cd..33c3bab94fa 100644 --- a/htdocs/core/menus/standard/eldy.lib.php +++ b/htdocs/core/menus/standard/eldy.lib.php @@ -703,7 +703,7 @@ function print_left_eldy_menu($db,$menu_array_before,$menu_array_after,&$tabMenu $newmenu->add("/fourn/commande/index.php?leftmenu=orders_suppliers",$langs->trans("SuppliersOrders"), 0, $user->rights->fournisseur->commande->lire, '', $mainmenu, 'orders_suppliers'); $newmenu->add("/fourn/commande/fiche.php?action=create&leftmenu=orders_suppliers", $langs->trans("NewOrder"), 1, $user->rights->fournisseur->commande->creer); $newmenu->add("/fourn/commande/liste.php?leftmenu=orders_suppliers", $langs->trans("List"), 1, $user->rights->fournisseur->commande->lire); - + if (empty($leftmenu) || $leftmenu=="orders_suppliers") $newmenu->add("/fourn/commande/liste.php?leftmenu=orders_suppliers&statut=0", $langs->trans("StatusOrderDraftShort"), 2, $user->rights->fournisseur->commande->lire); if (empty($leftmenu) || $leftmenu=="orders_suppliers") $newmenu->add("/fourn/commande/liste.php?leftmenu=orders_suppliers&statut=1", $langs->trans("StatusOrderValidated"), 2, $user->rights->fournisseur->commande->lire); if (empty($leftmenu) || $leftmenu=="orders_suppliers") $newmenu->add("/fourn/commande/liste.php?leftmenu=orders_suppliers&statut=2", $langs->trans("StatusOrderApprovedShort"), 2, $user->rights->fournisseur->commande->lire); @@ -713,7 +713,7 @@ function print_left_eldy_menu($db,$menu_array_before,$menu_array_after,&$tabMenu if (empty($leftmenu) || $leftmenu=="orders_suppliers") $newmenu->add("/fourn/commande/liste.php?leftmenu=orders_suppliers&statut=6,7", $langs->trans("StatusOrderCanceled"), 2, $user->rights->fournisseur->commande->lire); if (empty($leftmenu) || $leftmenu=="orders_suppliers") $newmenu->add("/fourn/commande/liste.php?leftmenu=orders_suppliers&statut=9", $langs->trans("StatusOrderRefused"), 2, $user->rights->fournisseur->commande->lire); - + $newmenu->add("/commande/stats/index.php?leftmenu=orders_suppliers&mode=supplier", $langs->trans("Statistics"), 1, $user->rights->fournisseur->commande->lire); } @@ -774,16 +774,13 @@ function print_left_eldy_menu($db,$menu_array_before,$menu_array_after,&$tabMenu // Suppliers if (! empty($conf->societe->enabled) && ! empty($conf->fournisseur->enabled)) { - if (! empty($conf->facture->enabled)) - { - $langs->load("bills"); - $newmenu->add("/fourn/facture/list.php?leftmenu=suppliers_bills", $langs->trans("BillsSuppliers"),0,$user->rights->fournisseur->facture->lire, '', $mainmenu, 'suppliers_bills'); - $newmenu->add("/fourn/facture/fiche.php?action=create",$langs->trans("NewBill"),1,$user->rights->fournisseur->facture->creer); - $newmenu->add("/fourn/facture/impayees.php", $langs->trans("Unpaid"),1,$user->rights->fournisseur->facture->lire); - $newmenu->add("/fourn/facture/paiement.php", $langs->trans("Payments"),1,$user->rights->fournisseur->facture->lire); + $langs->load("bills"); + $newmenu->add("/fourn/facture/list.php?leftmenu=suppliers_bills", $langs->trans("BillsSuppliers"),0,$user->rights->fournisseur->facture->lire, '', $mainmenu, 'suppliers_bills'); + $newmenu->add("/fourn/facture/fiche.php?action=create",$langs->trans("NewBill"),1,$user->rights->fournisseur->facture->creer); + $newmenu->add("/fourn/facture/impayees.php", $langs->trans("Unpaid"),1,$user->rights->fournisseur->facture->lire); + $newmenu->add("/fourn/facture/paiement.php", $langs->trans("Payments"),1,$user->rights->fournisseur->facture->lire); - $newmenu->add("/compta/facture/stats/index.php?leftmenu=suppliers_bills&mode=supplier", $langs->trans("Statistics"),1,$user->rights->fournisseur->facture->lire); - } + $newmenu->add("/compta/facture/stats/index.php?leftmenu=suppliers_bills&mode=supplier", $langs->trans("Statistics"),1,$user->rights->fournisseur->facture->lire); } // Orders @@ -1013,9 +1010,9 @@ function print_left_eldy_menu($db,$menu_array_before,$menu_array_after,&$tabMenu { $langs->load("sendings"); $newmenu->add("/expedition/index.php?leftmenu=sendings", $langs->trans("Shipments"), 0, $user->rights->expedition->lire, '', $mainmenu, 'sendings'); - if (empty($leftmenu) || $leftmenu=="sendings") $newmenu->add("/expedition/fiche.php?action=create2&leftmenu=sendings", $langs->trans("NewSending"), 1, $user->rights->expedition->creer); - if (empty($leftmenu) || $leftmenu=="sendings") $newmenu->add("/expedition/liste.php?leftmenu=sendings", $langs->trans("List"), 1, $user->rights->expedition->lire); - if (empty($leftmenu) || $leftmenu=="sendings") $newmenu->add("/expedition/stats/index.php?leftmenu=sendings", $langs->trans("Statistics"), 1, $user->rights->expedition->lire); + $newmenu->add("/expedition/fiche.php?action=create2&leftmenu=sendings", $langs->trans("NewSending"), 1, $user->rights->expedition->creer); + $newmenu->add("/expedition/liste.php?leftmenu=sendings", $langs->trans("List"), 1, $user->rights->expedition->lire); + $newmenu->add("/expedition/stats/index.php?leftmenu=sendings", $langs->trans("Statistics"), 1, $user->rights->expedition->lire); } } diff --git a/htdocs/core/modules/expedition/doc/pdf_merou.modules.php b/htdocs/core/modules/expedition/doc/pdf_merou.modules.php index 2d15f16ab78..5385d7ad0e6 100644 --- a/htdocs/core/modules/expedition/doc/pdf_merou.modules.php +++ b/htdocs/core/modules/expedition/doc/pdf_merou.modules.php @@ -602,8 +602,7 @@ class pdf_merou extends ModelePdfExpedition $carac_client_name=$outputlangs->convToOutputCharset($object->client->nom); } - $carac_client=pdf_build_address($outputlangs,$this->emetteur,$object->client,((!empty($object->contact))?$object->contact:null),$usecontact,'target'); - + $carac_client=pdf_build_address($outputlangs,$this->emetteur,$object->client,((!empty($object->contact))?$object->contact:null),$usecontact,'targetwithdetails'); $blDestX=$blExpX+55; $blW=50; diff --git a/htdocs/core/modules/expedition/doc/pdf_rouget.modules.php b/htdocs/core/modules/expedition/doc/pdf_rouget.modules.php index d75e8d203e5..6d0e44817a7 100644 --- a/htdocs/core/modules/expedition/doc/pdf_rouget.modules.php +++ b/htdocs/core/modules/expedition/doc/pdf_rouget.modules.php @@ -2,6 +2,7 @@ /* Copyright (C) 2005 Rodolphe Quiedeville * Copyright (C) 2005-2012 Laurent Destailleur * Copyright (C) 2005-2012 Regis Houssin + * Copyright (C) 2014 Marcos García * * 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 @@ -179,9 +180,10 @@ class pdf_rouget extends ModelePdfExpedition $tab_height = 130; $tab_height_newpage = 150; - if (! empty($object->note_public) || ! empty($object->tracking_number)) + if (! empty($object->note_public) || (! empty($object->tracking_number) && ! empty($object->shipping_method_id))) { $tab_top = 88; + $tab_top_alt = $tab_top; // Tracking number if (! empty($object->tracking_number)) @@ -196,7 +198,9 @@ class pdf_rouget extends ModelePdfExpedition $label=$outputlangs->trans("LinkToTrackYourPackage")."
    "; $label.=$outputlangs->trans("SendingMethod".strtoupper($code))." :"; $pdf->SetFont('','B', $default_font_size - 2); - $pdf->writeHTMLCell(60, 4, $this->posxdesc-1, $tab_top-1, $label." ".$object->tracking_url, 0, 1, false, true, 'L'); + $pdf->writeHTMLCell(60, 7, $this->posxdesc-1, $tab_top-1, $label." ".$object->tracking_url, 0, 1, false, true, 'L'); + + $tab_top_alt += 7; } } } @@ -205,7 +209,7 @@ class pdf_rouget extends ModelePdfExpedition if (! empty($object->note_public)) { $pdf->SetFont('','', $default_font_size - 1); // Dans boucle pour gerer multi-page - $pdf->writeHTMLCell(190, 3, $this->posxdesc-1, $tab_top, dol_htmlentitiesbr($object->note_public), 0, 1); + $pdf->writeHTMLCell(190, 3, $this->posxdesc-1, $tab_top_alt, dol_htmlentitiesbr($object->note_public), 0, 1); } $nexY = $pdf->GetY(); @@ -500,7 +504,7 @@ class pdf_rouget extends ModelePdfExpedition $pdf->SetTextColor(0,0,60); $pdf->MultiCell(100, 4, $outputlangs->transnoentities("RefSending") ." : ".$object->ref, '', 'R'); - //Date Expedition + // Date Expedition $posy+=4; $pdf->SetXY($posx,$posy); $pdf->SetTextColor(0,0,60); @@ -526,7 +530,7 @@ class pdf_rouget extends ModelePdfExpedition $origin_id = $object->origin_id; // TODO move to external function - if ($conf->$origin->enabled) + if (! empty($conf->$origin->enabled)) { $outputlangs->load('orders'); @@ -612,7 +616,7 @@ class pdf_rouget extends ModelePdfExpedition $carac_client_name=$outputlangs->convToOutputCharset($object->client->nom); } - $carac_client=pdf_build_address($outputlangs,$this->emetteur,$object->client,(!empty($object->contact)?$object->contact:null),$usecontact,'target'); + $carac_client=pdf_build_address($outputlangs,$this->emetteur,$object->client,(!empty($object->contact)?$object->contact:null),$usecontact,'targetwithdetails'); // Show recipient $widthrecbox=100; diff --git a/htdocs/core/modules/modLabel.class.php b/htdocs/core/modules/modLabel.class.php index a5e8e424008..9519c63fb95 100644 --- a/htdocs/core/modules/modLabel.class.php +++ b/htdocs/core/modules/modLabel.class.php @@ -60,7 +60,7 @@ class modLabel extends DolibarrModules $this->requiredby = array(); // Config pages - $this->config_page_url = array("label.php"); + // $this->config_page_url = array("label.php"); // Constants $this->const = array(); diff --git a/htdocs/core/modules/modSalaries.class.php b/htdocs/core/modules/modSalaries.class.php index 52d2b2b2f24..f8a99b99aab 100644 --- a/htdocs/core/modules/modSalaries.class.php +++ b/htdocs/core/modules/modSalaries.class.php @@ -74,10 +74,10 @@ class modSalaries extends DolibarrModules $this->conflictwith = array(); $this->langfiles = array("salaries"); - // Constantes + // Constants $this->const = array(); - // Boites + // Boxes $this->boxes = array(); // Permissions @@ -151,7 +151,7 @@ class modSalaries extends DolibarrModules { global $conf; - // Nettoyage avant activation + // Clean before activation $this->remove($options); $sql = array(); diff --git a/htdocs/core/modules/modSociete.class.php b/htdocs/core/modules/modSociete.class.php index 87b60cd4ba6..5284f5ef55b 100644 --- a/htdocs/core/modules/modSociete.class.php +++ b/htdocs/core/modules/modSociete.class.php @@ -329,7 +329,7 @@ class modSociete extends DolibarrModules unset($this->export_entities_array[$r]['s.code_fournisseur']); } // Add extra fields - $sql="SELECT name, label FROM ".MAIN_DB_PREFIX."extrafields WHERE elementtype = 'socpeople'"; + $sql="SELECT name, label, type, param FROM ".MAIN_DB_PREFIX."extrafields WHERE elementtype = 'socpeople'"; $resql=$this->db->query($sql); if ($resql) // This can fail when class is used on old database (during migration for example) { diff --git a/htdocs/core/modules/propale/doc/pdf_azur.modules.php b/htdocs/core/modules/propale/doc/pdf_azur.modules.php index 648156e5bef..fe952fb9903 100644 --- a/htdocs/core/modules/propale/doc/pdf_azur.modules.php +++ b/htdocs/core/modules/propale/doc/pdf_azur.modules.php @@ -630,7 +630,7 @@ class pdf_azur extends ModelePDFPropales $posxval=52; // Show shipping date - if ($object->date_livraison) + if (! empty($object->date_livraison)) { $outputlangs->load("sendings"); $pdf->SetFont('','B', $default_font_size - 2); diff --git a/htdocs/core/modules/supplier_order/pdf/pdf_muscadet.modules.php b/htdocs/core/modules/supplier_order/pdf/pdf_muscadet.modules.php index 616970f4dae..f15cab9cb6b 100644 --- a/htdocs/core/modules/supplier_order/pdf/pdf_muscadet.modules.php +++ b/htdocs/core/modules/supplier_order/pdf/pdf_muscadet.modules.php @@ -911,6 +911,7 @@ class pdf_muscadet extends ModelePDFSuppliersOrders $outputlangs->load("bills"); $outputlangs->load("orders"); $outputlangs->load("companies"); + $outputlangs->load("sendings"); $default_font_size = pdf_getPDFFontSize($outputlangs); @@ -981,11 +982,10 @@ class pdf_muscadet extends ModelePDFSuppliersOrders $posy+=5; $pdf->SetXY($posx,$posy); - if ($object->date_commande) + if (! empty($object->date_commande)) { $pdf->SetTextColor(0,0,60); $pdf->MultiCell(100, 3, $outputlangs->transnoentities("OrderDate")." : " . dol_print_date($object->date_commande,"day",false,$outputlangs,true), '', 'R'); - $pdf->MultiCell(190, 3, $outputlangs->transnoentities("DateDeliveryPlanned")." : " . dol_print_date($object->date_livraison,"day",false,$outputlangs,true), '', 'R'); } else { @@ -993,7 +993,10 @@ class pdf_muscadet extends ModelePDFSuppliersOrders $pdf->MultiCell(100, 3, $outputlangs->transnoentities("OrderToProcess"), '', 'R'); } - $posy+=2; + $pdf->SetTextColor(0,0,60); + if (! empty($object->date_livraison)) $pdf->MultiCell(190, 3, $outputlangs->transnoentities("DateDeliveryPlanned")." : " . dol_print_date($object->date_livraison,"day",false,$outputlangs,true), '', 'R'); + + $posy+=5; $pdf->SetTextColor(0,0,60); // Show list of linked objects @@ -1094,7 +1097,7 @@ class pdf_muscadet extends ModelePDFSuppliersOrders */ function _pagefoot(&$pdf, $object, $outputlangs, $hidefreetext=0) { - return pdf_pagefoot($pdf,$outputlangs,'SUPPLIER_INVOICE_FREE_TEXT',$this->emetteur,$this->marge_basse,$this->marge_gauche,$this->page_hauteur,$object,0,$hidefreetext); + return pdf_pagefoot($pdf,$outputlangs,'SUPPLIER_ORDER_FREE_TEXT',$this->emetteur,$this->marge_basse,$this->marge_gauche,$this->page_hauteur,$object,0,$hidefreetext); } } diff --git a/htdocs/core/tpl/objectline_create.tpl.php b/htdocs/core/tpl/objectline_create.tpl.php index 02480058498..4255f124c1c 100644 --- a/htdocs/core/tpl/objectline_create.tpl.php +++ b/htdocs/core/tpl/objectline_create.tpl.php @@ -487,7 +487,7 @@ jQuery(document).ready(function() { function setforfree() { jQuery("#search_idprod").val(''); jQuery("#idprod").val(''); - jQuery("#idprodfournprice").val(''); + jQuery("#idprodfournprice").val('0'); // Set cursor on not selected product jQuery("#search_idprodfournprice").val(''); jQuery("#prod_entry_mode_free").attr('checked',true); jQuery("#prod_entry_mode_predef").attr('checked',false); diff --git a/htdocs/expedition/class/expedition.class.php b/htdocs/expedition/class/expedition.class.php index 5cf09642c68..93c7f63b4ad 100644 --- a/htdocs/expedition/class/expedition.class.php +++ b/htdocs/expedition/class/expedition.class.php @@ -282,8 +282,22 @@ class Expedition extends CommonObject if ($result < 0) { $error++; $this->errors=$interface->errors; } // Fin appel triggers - $this->db->commit(); - return $this->id; + if (! $error) + { + $this->db->commit(); + return $this->id; + } + else + { + foreach($this->errors as $errmsg) + { + dol_syslog(get_class($this)."::create ".$errmsg, LOG_ERR); + $this->error.=($this->error?', '.$errmsg:$errmsg); + } + $this->db->rollback(); + return -1*$error; + } + } else { @@ -1128,6 +1142,10 @@ class Expedition extends CommonObject // Eat-by date if (! empty($conf->productbatch->enabled)) { + /* test on conf at begining of file sometimes doesn't include expeditionbatch + * May be conf is not well initialized for dark reason + */ + require_once DOL_DOCUMENT_ROOT.'/expedition/class/expeditionbatch.class.php'; $line->detail_batch=ExpeditionLigneBatch::FetchAll($this->db,$obj->line_id); } $this->lines[$i] = $line; diff --git a/htdocs/expedition/fiche.php b/htdocs/expedition/fiche.php index 1fd33b29c53..9a52ce47788 100644 --- a/htdocs/expedition/fiche.php +++ b/htdocs/expedition/fiche.php @@ -144,7 +144,7 @@ if ($action == 'add') $j++; $batch="batchl".$i."_".$j; $qty = "qtyl".$i.'_'.$j; - + } $batch_line[$i]['detail']=$sub_qty; $batch_line[$i]['qty']=$subtotalqty; @@ -316,7 +316,7 @@ else if ($action == 'settrackingnumber' || $action == 'settrackingurl' if ($action == 'settrueWeight') { $object->trueWeight = trim(GETPOST('trueWeight','int')); $object->weight_units = GETPOST('weight_units','int'); - } + } if ($action == 'settrueWidth') $object->trueWidth = trim(GETPOST('trueWidth','int')); if ($action == 'settrueHeight'){ $object->trueHeight = trim(GETPOST('trueHeight','int')); @@ -500,7 +500,7 @@ if ($action == 'send' && ! GETPOST('addfile','alpha') && ! GETPOST('removedfile' $interface=new Interfaces($db); $result=$interface->run_triggers('SHIPPING_SENTBYMAIL',$object,$user,$langs,$conf); if ($result < 0) { - $error++; $this->errors=$interface->errors; + $error++; $object->errors=$interface->errors; } // Fin appel triggers @@ -863,7 +863,7 @@ if ($action == 'create') if (($line->product_type == 1 && empty($conf->global->STOCK_SUPPORTS_SERVICES)) || $defaultqty < 0) $defaultqty=0; } - if (empty($conf->productbatch->enabled) || ! ($product->hasbatch() and is_array($product->stock_warehouse[GETPOST('entrepot_id','int')]))) + if (empty($conf->productbatch->enabled) || ! ($product->hasbatch() and is_object($product->stock_warehouse[GETPOST('entrepot_id','int')]))) { // Quantity to send print '
    '; @@ -874,7 +874,7 @@ if ($action == 'create') } else print $langs->trans("NA"); print '
    '; print ''; print ''; print ''; print $langs->trans("DetailBatchFormat", dol_print_date($dbatch->eatby,"day"), dol_print_date($dbatch->sellby,"day"), $dbatch->batch, $dbatch->qty); @@ -1148,16 +1148,16 @@ else if ($id || $ref) } else { - print $object->date_delivery ? dol_print_date($object->date_delivery,'dayhourtext') : ' '; + print $object->date_delivery ? dol_print_date($object->date_delivery,'dayhour') : ' '; } print '
    '.$form->editfieldkey("Weight",'trueWeight',$object->trueWeight,$object,$user->rights->expedition->creer).''; - + if($action=='edittrueWeight') { - + print ''; print ''; print ''; @@ -1167,12 +1167,12 @@ else if ($id || $ref) print ' '; print ' '; print ''; - + } else { print $object->trueWeight; print ($object->trueWeight && $object->weight_units!='')?' '.measuring_units_string($object->weight_units,"weight"):''; - } + } if ($totalWeight > 0) { @@ -1191,7 +1191,7 @@ else if ($id || $ref) // Height print '
    '.$form->editfieldkey("Height",'trueHeight',$object->trueHeight,$object,$user->rights->expedition->creer).''; if($action=='edittrueHeight') { - + print '
    '; print ''; print ''; @@ -1201,15 +1201,15 @@ else if ($id || $ref) print ' '; print ' '; print '
    '; - + } else { print $object->trueHeight; print ($object->trueHeight && $object->height_units!='')?' '.measuring_units_string($object->height_units,"size"):''; - + } - - + + print '
    '; $detail = ''; diff --git a/htdocs/fichinter/fiche.php b/htdocs/fichinter/fiche.php index 182fd0d1a36..551aa7b94a5 100644 --- a/htdocs/fichinter/fiche.php +++ b/htdocs/fichinter/fiche.php @@ -730,7 +730,7 @@ if ($action == 'send' && ! GETPOST('cancel','alpha') && (empty($conf->global->MA $interface=new Interfaces($db); $result=$interface->run_triggers('FICHINTER_SENTBYMAIL',$object,$user,$langs,$conf); if ($result < 0) { - $error++; $this->errors=$interface->errors; + $error++; $object->errors=$interface->errors; } // Fin appel triggers @@ -1332,9 +1332,7 @@ else if ($id > 0 || ! empty($ref)) print ''; } - /* - * Lignes d'intervention - */ + // Intervention lines $sql = 'SELECT ft.rowid, ft.description, ft.fk_fichinter, ft.duree, ft.rang,'; $sql.= ' ft.date as date_intervention'; $sql.= ' FROM '.MAIN_DB_PREFIX.'fichinterdet as ft'; @@ -1419,7 +1417,7 @@ else if ($id > 0 || ! empty($ref)) print '
    '; @@ -1483,14 +1479,16 @@ else if ($id > 0 || ! empty($ref)) print ''; // Duration print ''; print ''; @@ -1513,8 +1511,8 @@ else if ($id > 0 || ! empty($ref)) /* - * Barre d'actions - */ + * Actions buttons + */ print '
    '; if ($user->societe_id == 0) diff --git a/htdocs/fourn/class/fournisseur.facture.class.php b/htdocs/fourn/class/fournisseur.facture.class.php index 549a9caed32..9b523b2bc60 100644 --- a/htdocs/fourn/class/fournisseur.facture.class.php +++ b/htdocs/fourn/class/fournisseur.facture.class.php @@ -42,6 +42,7 @@ class FactureFournisseur extends CommonInvoice public $fk_element='fk_facture_fourn'; protected $ismultientitymanaged = 1; // 0=No test on entity, 1=Test with field entity, 2=Test with link by societe + var $rowid; var $ref; var $product_ref; var $ref_supplier; @@ -444,7 +445,7 @@ class FactureFournisseur extends CommonInvoice */ function fetch_lines() { - $sql = 'SELECT f.rowid, f.description, f.pu_ht, f.pu_ttc, f.qty, f.remise_percent, f.tva_tx, f.tva'; + $sql = 'SELECT f.rowid, f.ref as ref_supplier, f.description, f.pu_ht, f.pu_ttc, f.qty, f.remise_percent, f.tva_tx, f.tva'; $sql.= ', f.localtax1_tx, f.localtax2_tx, f.total_localtax1, f.total_localtax2 '; $sql.= ', f.total_ht, f.tva as total_tva, f.total_ttc, f.fk_product, f.product_type, f.info_bits'; $sql.= ', p.rowid as product_id, p.ref as product_ref, p.label as label, p.description as product_desc'; @@ -452,7 +453,7 @@ class FactureFournisseur extends CommonInvoice $sql.= ' LEFT JOIN '.MAIN_DB_PREFIX.'product as p ON f.fk_product = p.rowid'; $sql.= ' WHERE fk_facture_fourn='.$this->id; - dol_syslog("FactureFournisseur::fetch_lines sql=".$sql, LOG_DEBUG); + dol_syslog(get_class($this)."::fetch_lines sql=".$sql, LOG_DEBUG); $resql_rows = $this->db->query($sql); if ($resql_rows) { @@ -467,11 +468,11 @@ class FactureFournisseur extends CommonInvoice $this->lines[$i] = new stdClass(); $this->lines[$i]->rowid = $obj->rowid; $this->lines[$i]->description = $obj->description; - $this->lines[$i]->ref = $obj->product_ref; // TODO deprecated $this->lines[$i]->product_ref = $obj->product_ref; // Internal reference - //$this->lines[$i]->ref_fourn = $obj->ref_fourn; // Reference fournisseur du produit - $this->lines[$i]->libelle = $obj->label; // Label du produit - $this->lines[$i]->product_desc = $obj->product_desc; // Description du produit + $this->lines[$i]->ref = $obj->product_ref; // deprecated. + $this->lines[$i]->ref_supplier = $obj->ref_supplier; // Reference product supplier TODO Rename field ref to ref_supplier into table llx_facture_fourn_det and llx_commande_fournisseurdet and update fields it into updateline + $this->lines[$i]->libelle = $obj->label; // This field may contains label of product (when invoice create from order) + $this->lines[$i]->product_desc = $obj->product_desc; // Description du produit $this->lines[$i]->pu_ht = $obj->pu_ht; $this->lines[$i]->pu_ttc = $obj->pu_ttc; $this->lines[$i]->tva_tx = $obj->tva_tx; @@ -498,7 +499,7 @@ class FactureFournisseur extends CommonInvoice else { $this->error=$this->db->error(); - dol_syslog('FactureFournisseur::fetch_lines: Error '.$this->error,LOG_ERR); + dol_syslog(get_class($this).'::fetch_lines: Error '.$this->error,LOG_ERR); return -3; } } @@ -542,7 +543,7 @@ class FactureFournisseur extends CommonInvoice if (isset($this->fk_user_valid)) $this->fk_user_valid=trim($this->fk_user_valid); if (isset($this->fk_facture_source)) $this->fk_facture_source=trim($this->fk_facture_source); if (isset($this->fk_project)) $this->fk_project=trim($this->fk_project); - if (isset($this->fk_cond_reglement)) $this->fk_cond_reglement=trim($this->fk_cond_reglement); + if (isset($this->cond_reglement_id)) $this->cond_reglement_id=trim($this->cond_reglement_id); if (isset($this->note_private)) $this->note=trim($this->note_private); if (isset($this->note_public)) $this->note_public=trim($this->note_public); if (isset($this->model_pdf)) $this->model_pdf=trim($this->model_pdf); @@ -580,7 +581,7 @@ class FactureFournisseur extends CommonInvoice $sql.= " fk_user_valid=".(isset($this->fk_user_valid)?$this->fk_user_valid:"null").","; $sql.= " fk_facture_source=".(isset($this->fk_facture_source)?$this->fk_facture_source:"null").","; $sql.= " fk_projet=".(isset($this->fk_project)?$this->fk_project:"null").","; - $sql.= " fk_cond_reglement=".(isset($this->fk_cond_reglement)?$this->fk_cond_reglement:"null").","; + $sql.= " fk_cond_reglement=".(isset($this->cond_reglement_id)?$this->cond_reglement_id:"null").","; $sql.= " date_lim_reglement=".(dol_strlen($this->date_echeance)!=0 ? "'".$this->db->idate($this->date_echeance)."'" : 'null').","; $sql.= " note_private=".(isset($this->note_private)?"'".$this->db->escape($this->note_private)."'":"null").","; $sql.= " note_public=".(isset($this->note_public)?"'".$this->db->escape($this->note_public)."'":"null").","; @@ -1076,6 +1077,8 @@ class FactureFournisseur extends CommonInvoice * @param int $rang Position of line * @param int $notrigger Disable triggers * @return int >0 if OK, <0 if KO + * + * FIXME Add field ref (that should be named ref_supplier) and label into update. For example can be filled when product line created from order. */ function addline($desc, $pu, $txtva, $txlocaltax1, $txlocaltax2, $qty, $fk_product=0, $remise_percent=0, $date_start='', $date_end='', $ventil=0, $info_bits='', $price_base_type='HT', $type=0, $rang=-1, $notrigger=false) { @@ -1152,7 +1155,7 @@ class FactureFournisseur extends CommonInvoice * Update a line detail into database * * @param int $id Id of line invoice - * @param string $label Description of line + * @param string $desc Description of line * @param double $pu Prix unitaire (HT ou TTC selon price_base_type) * @param double $vatrate VAT Rate * @param double $txlocaltax1 LocalTax1 Rate @@ -1166,9 +1169,9 @@ class FactureFournisseur extends CommonInvoice * @param int $notrigger Disable triggers * @return int <0 if KO, >0 if OK */ - function updateline($id, $label, $pu, $vatrate, $txlocaltax1=0, $txlocaltax2=0, $qty=1, $idproduct=0, $price_base_type='HT', $info_bits=0, $type=0, $remise_percent=0, $notrigger=false) + function updateline($id, $desc, $pu, $vatrate, $txlocaltax1=0, $txlocaltax2=0, $qty=1, $idproduct=0, $price_base_type='HT', $info_bits=0, $type=0, $remise_percent=0, $notrigger=false) { - dol_syslog(get_class($this)."::updateline $id,$label,$pu,$vatrate,$qty,$idproduct,$price_base_type,$info_bits,$type,$remise_percent", LOG_DEBUG); + dol_syslog(get_class($this)."::updateline $id,$desc,$pu,$vatrate,$qty,$idproduct,$price_base_type,$info_bits,$type,$remise_percent", LOG_DEBUG); include_once DOL_DOCUMENT_ROOT.'/core/lib/price.lib.php'; $pu = price2num($pu); @@ -1194,7 +1197,7 @@ class FactureFournisseur extends CommonInvoice $localtaxes_type=getLocalTaxesFromRate($vatrate,0,$this->thirdparty); - $tabprice = calcul_price_total($qty, $pu, $remise_percent, $vatrate, $txlocaltax1, $txlocaltax2, 0, $price_base_type, $info_bits, $type, $this->thirdparty,$localtaxes_type); + $tabprice = calcul_price_total($qty, $pu, $remise_percent, $vatrate, $txlocaltax1, $txlocaltax2, 0, $price_base_type, $info_bits, $type, $this->thirdparty, $localtaxes_type); $total_ht = $tabprice[0]; $total_tva = $tabprice[1]; $total_ttc = $tabprice[2]; @@ -1217,7 +1220,7 @@ class FactureFournisseur extends CommonInvoice } $sql = "UPDATE ".MAIN_DB_PREFIX."facture_fourn_det SET"; - $sql.= " description ='".$this->db->escape($label)."'"; + $sql.= " description ='".$this->db->escape($desc)."'"; $sql.= ", pu_ht = ".price2num($pu_ht); $sql.= ", pu_ttc = ".price2num($pu_ttc); $sql.= ", qty = ".price2num($qty); diff --git a/htdocs/fourn/class/fournisseur.product.class.php b/htdocs/fourn/class/fournisseur.product.class.php index 4aeb265a41c..b642926f802 100644 --- a/htdocs/fourn/class/fournisseur.product.class.php +++ b/htdocs/fourn/class/fournisseur.product.class.php @@ -40,8 +40,13 @@ class ProductFournisseur extends Product var $product_fourn_price_id; // id of ligne product-supplier var $id; // product id - var $fourn_ref; // ref supplier - var $fourn_qty; // quantity for price + var $fourn_ref; // deprecated + var $ref_supplier; // ref supplier (can be set by get_buyprice) + var $vatrate_supplier; // default vat rate for this supplier/qty/product (can be set by get_buyprice) + + var $fourn_qty; // quantity for price (can be set by get_buyprice) + var $fourn_pu; // unit price for quantity (can be set by get_buyprice) + var $fourn_price; // price for quantity var $fourn_remise_percent; // discount for quantity (percent) var $fourn_remise; // discount for quantity (amount) diff --git a/htdocs/fourn/commande/fiche.php b/htdocs/fourn/commande/fiche.php index bcd98329e69..286c3d45301 100644 --- a/htdocs/fourn/commande/fiche.php +++ b/htdocs/fourn/commande/fiche.php @@ -1734,17 +1734,6 @@ elseif (! empty($object->id)) // Form to add new line if ($object->statut == 0 && $user->rights->fournisseur->commande->creer && $action <> 'edit_line') { - /*print '
    '; - print ''; - print ''; - print ''; - print ''; - print ''; - print ''; - print '';*/ - // Add free products/services form global $forceall, $senderissupplier, $dateSelector; $forceall=1; $senderissupplier=1; $dateSelector=0; @@ -1761,97 +1750,6 @@ elseif (! empty($object->id)) $reshook = $hookmanager->executeHooks('formAddObjectLine', $parameters, $object, $action); // Note that $action and $object may have been modified by hook } } - -/* - $var=true; - print ''; - print ''; - print ''; - print ''; - print ''; - print ''; - print ''; - print ''; - - // Ajout de produits/services predefinis - if (! empty($conf->product->enabled) || ! empty($conf->service->enabled)) - { - print ''; - - print ''; - print ''; - print ''; - print ''; - print ''; - print ''; - - $var=!$var; - print ''; - print ''; - print ''; - print ''; - print ''; - print ''; - }*/ } print '
    '; $now=dol_now(); $timearray=dol_getdate($now); - if (!GETPOST('diday','int')) $timewithnohour=dol_mktime(0,0,0,$timearray['mon'],$timearray['mday'],$timearray['year']); + if (! GETPOST('diday','int')) $timewithnohour=dol_mktime(0,0,0,$timearray['mon'],$timearray['mday'],$timearray['year']); else $timewithnohour=dol_mktime(GETPOST('dihour','int'),GETPOST('dimin','int'), 0,GETPOST('dimonth','int'),GETPOST('diday','int'),GETPOST('diyear','int')); $form->select_date($timewithnohour,'di',1,1,0,"addinter"); print ''; - $form->select_duration('duration',(!GETPOST('durationhour','int') && !GETPOST('durationmin','int'))?3600:(60*60*GETPOST('durationhour','int')+60*GETPOST('durationmin','int'))); + $selectmode='select'; + if (! empty($conf->global->INTERVENTION_ADDLINE_FREEDUREATION)) $selectmode='text'; + $form->select_duration('duration', (!GETPOST('durationhour','int') && !GETPOST('durationmin','int'))?3600:(60*60*GETPOST('durationhour','int')+60*GETPOST('durationmin','int')), 0, $selectmode, 1); print '
    '; - print ''; // ancre - print $langs->trans('AddNewLine').' - '.$langs->trans("FreeZone").''.$langs->trans('VAT').''.$langs->trans('PriceUHT').''.$langs->trans('Qty').''.$langs->trans('ReductionShort').' 
    '; - - $forceall=1; - print $form->select_type_of_lines(isset($_POST["type"])?$_POST["type"]:-1,'type',1,0,$forceall); - if ($forceall || (! empty($conf->product->enabled) && ! empty($conf->service->enabled)) - || (empty($conf->product->enabled) && empty($conf->service->enabled))) print '
    '; - - if (is_object($hookmanager)) - { - $parameters=array(); - $reshook=$hookmanager->executeHooks('formCreateProductOptions',$parameters,$object,$action); - } - - $nbrows=ROWS_2; - if (! empty($conf->global->MAIN_INPUT_DESC_HEIGHT)) $nbrows=$conf->global->MAIN_INPUT_DESC_HEIGHT; - $doleditor = new DolEditor('dp_desc', GETPOST('dp_desc'), '', 100, 'dolibarr_details', '', false, true, $conf->global->FCKEDITOR_ENABLE_DETAILS, $nbrows, 70); - $doleditor->Create(); - - print '
    '; - print $form->load_tva('tva_tx',(GETPOST('tva_tx')?GETPOST('tva_tx'):-1),$object->thirdparty,$mysoc); - print '%
    '; - print $langs->trans("AddNewLine").' - '; - if (! empty($conf->service->enabled)) - { - print $langs->trans('RecordedProductsAndServices'); - } - else - { - print $langs->trans('RecordedProducts'); - } - print ''.$langs->trans('Qty').''.$langs->trans('ReductionShort').' 
    '; - - - $ajaxoptions=array( - 'update' => array('qty_predef'=>'qty','remise_percent_predef' => 'discount'), // html id tag will be edited with which ajax json response key - 'option_disabled' => 'addPredefinedProductButton', // html id to disable once select is done - 'error' => $langs->trans("NoPriceDefinedForThisSupplier") // translation of an error saved into var 'error' - ); - $form->select_produits_fournisseurs($object->fourn_id, GETPOST('idprodfournprice'), 'idprodfournprice', '', '', $ajaxoptions); - - if (empty($conf->global->PRODUIT_USE_SEARCH_TO_SELECT)) print '
    '; - - if (is_object($hookmanager)) - { - $parameters=array('htmlname'=>'idprodfournprice'); - $reshook=$hookmanager->executeHooks('formCreateProductSupplierOptions',$parameters,$object,$action); - } - - $nbrows=ROWS_2; - if (! empty($conf->global->MAIN_INPUT_DESC_HEIGHT)) $nbrows=$conf->global->MAIN_INPUT_DESC_HEIGHT; - $doleditor = new DolEditor('np_desc', GETPOST('np_desc'), '', 100, 'dolibarr_details', '', false, true, $conf->global->FCKEDITOR_ENABLE_DETAILS, $nbrows, 70); - $doleditor->Create(); - - print '
    %
    '; @@ -1962,8 +1860,6 @@ elseif (! empty($object->id)) print '
    '; - //print '
    '; - //print ''; // ancre /* * Documents generes @@ -1992,10 +1888,6 @@ elseif (! empty($object->id)) $formactions=new FormActions($db); $somethingshown=$formactions->showactions($object,'order_supplier',$socid); - print ''; - - //print ''; - print '
    '; if ($user->rights->fournisseur->commande->commander && $object->statut == 2) { @@ -2064,7 +1956,6 @@ elseif (! empty($object->id)) */ print '
    '; - //print '
    '; } /* diff --git a/htdocs/fourn/commande/liste.php b/htdocs/fourn/commande/liste.php index f6f634ec7ea..9e0c12ecf5f 100644 --- a/htdocs/fourn/commande/liste.php +++ b/htdocs/fourn/commande/liste.php @@ -3,6 +3,7 @@ * Copyright (C) 2004-2014 Laurent Destailleur * Copyright (C) 2005-2012 Regis Houssin * Copyright (C) 2013 Cédric Salvador + * Copyright (C) 2014 Marcos García * * 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 @@ -115,7 +116,8 @@ if ($sall) } if ($socid) $sql.= " AND s.rowid = ".$socid; -if (GETPOST('statut')!='') +//Required triple check because statut=0 means draft filter +if (GETPOST('statut', 'int') !== '') { $sql .= " AND fk_statut IN (".GETPOST('statut').")"; } diff --git a/htdocs/fourn/facture/fiche.php b/htdocs/fourn/facture/fiche.php index 75025a8a539..b2f803d5d2a 100644 --- a/htdocs/fourn/facture/fiche.php +++ b/htdocs/fourn/facture/fiche.php @@ -300,6 +300,9 @@ elseif ($action == 'add' && $user->rights->fournisseur->facture->creer) $object->cond_reglement_id = GETPOST('cond_reglement_id'); $object->mode_reglement_id = GETPOST('mode_reglement_id'); $object->fk_project = ($tmpproject > 0) ? $tmpproject : null; + + // Auto calculation of date due if not filled by user + if(empty($object->date_echeance)) $object->date_echeance = $object->calculate_date_lim_reglement(); // If creation from another object of another module if ($_POST['origin'] && $_POST['originid']) @@ -363,6 +366,7 @@ elseif ($action == 'add' && $user->rights->fournisseur->facture->creer) if ($lines[$i]->date_fin_reel) $date_end=$lines[$i]->date_fin_reel; if ($lines[$i]->date_end) $date_end=$lines[$i]->date_end; + // FIXME Missing $lines[$i]->ref_supplier and $lines[$i]->label into addline and updateline methods. They are filled when coming from order for example. $result = $object->addline( $desc, $lines[$i]->subprice, @@ -466,9 +470,10 @@ elseif ($action == 'add' && $user->rights->fournisseur->facture->creer) } } -// Modification d'une ligne +// Edit line elseif ($action == 'update_line' && $user->rights->fournisseur->facture->creer) { + // TODO Missing transaction if (GETPOST('etat') == '1' && ! GETPOST('cancel')) // si on valide la modification { $object->fetch($id); @@ -516,6 +521,8 @@ elseif ($action == 'update_line' && $user->rights->fournisseur->facture->creer) elseif ($action == 'addline' && $user->rights->fournisseur->facture->creer) { + $db->begin(); + $ret=$object->fetch($id); if ($ret < 0) { @@ -601,6 +608,7 @@ elseif ($action == 'addline' && $user->rights->fournisseur->facture->creer) $type = $productsupplier->type; + // TODO Save the product supplier ref into database into field ref_supplier (must rename field ref into ref_supplier first) $result=$object->addline($desc, $productsupplier->fourn_pu, $tvatx, $localtax1tx, $localtax2tx, $qty, $idprod, $remise_percent, '', '', 0, $npr); } if ($idprod == -2 || $idprod == 0) @@ -655,6 +663,8 @@ elseif ($action == 'addline' && $user->rights->fournisseur->facture->creer) //print "xx".$tva_tx; exit; if (! $error && $result > 0) { + $db->commit(); + // Define output language $outputlangs = $langs; $newlang=GETPOST('lang_id','alpha'); @@ -704,9 +714,13 @@ elseif ($action == 'addline' && $user->rights->fournisseur->facture->creer) unset($_POST['date_endmonth']); unset($_POST['date_endyear']); } - else if (empty($mesg)) - { - $mesg='
    '.$object->error.'
    '; + else + { + $db->rollback(); + if (empty($mesg)) + { + $mesg='
    '.$object->error.'
    '; + } } $action = ''; @@ -900,7 +914,7 @@ if ($action == 'send' && ! $_POST['addfile'] && ! $_POST['removedfile'] && ! $_P $interface=new Interfaces($db); $result=$interface->run_triggers('BILL_SUPPLIER_SENTBYMAIL',$object,$user,$langs,$conf); if ($result < 0) { - $error++; $this->errors=$interface->errors; + $error++; $object->errors=$interface->errors; } // Fin appel triggers @@ -1141,10 +1155,10 @@ if ($action == 'create') $mode_reglement_id = (!empty($objectsrc->mode_reglement_id)?$objectsrc->mode_reglement_id:(!empty($soc->mode_reglement_supplier_id)?$soc->mode_reglement_supplier_id:0)); $remise_percent = (!empty($objectsrc->remise_percent)?$objectsrc->remise_percent:(!empty($soc->remise_percent)?$soc->remise_percent:0)); $remise_absolue = (!empty($objectsrc->remise_absolue)?$objectsrc->remise_absolue:(!empty($soc->remise_absolue)?$soc->remise_absolue:0)); - $dateinvoice = empty($conf->global->MAIN_AUTOFILL_DATE)?-1:0; + $dateinvoice = empty($conf->global->MAIN_AUTOFILL_DATE)?-1:''; $datetmp=dol_mktime(12,0,0,$_POST['remonth'],$_POST['reday'],$_POST['reyear']); - $dateinvoice=($datetmp==''?(empty($conf->global->MAIN_AUTOFILL_DATE)?-1:0):$datetmp); + $dateinvoice=($datetmp==''?(empty($conf->global->MAIN_AUTOFILL_DATE)?-1:''):$datetmp); $datetmp=dol_mktime(12,0,0,$_POST['echmonth'],$_POST['echday'],$_POST['echyear']); $datedue=($datetmp==''?-1:$datetmp); } @@ -1154,7 +1168,7 @@ if ($action == 'create') $cond_reglement_id = $societe->cond_reglement_supplier_id; $mode_reglement_id = $societe->mode_reglement_supplier_id; $datetmp=dol_mktime(12,0,0,$_POST['remonth'],$_POST['reday'],$_POST['reyear']); - $dateinvoice=($datetmp==''?(empty($conf->global->MAIN_AUTOFILL_DATE)?-1:0):$datetmp); + $dateinvoice=($datetmp==''?(empty($conf->global->MAIN_AUTOFILL_DATE)?-1:''):$datetmp); $datetmp=dol_mktime(12,0,0,$_POST['echmonth'],$_POST['echday'],$_POST['echyear']); $datedue=($datetmp==''?-1:$datetmp); } @@ -1183,10 +1197,10 @@ if ($action == 'create') { print $form->select_company((empty($_GET['socid'])?'':$_GET['socid']),'socid','s.fournisseur = 1',1); } - print ''; + print ''; // Ref supplier - print ''.$langs->trans('RefSupplier').''; + print ''.$langs->trans('RefSupplier').''; print ''; print ''.$langs->trans('Type').''; @@ -1273,7 +1287,7 @@ if ($action == 'create') print ''; // Label - print ''.$langs->trans('Label').''; + print ''.$langs->trans('Label').''; // Date invoice print ''.$langs->trans('DateInvoice').''; @@ -2056,24 +2070,9 @@ else // Form to add new line if ($object->statut == 0 && $action != 'edit_line') { - /*print ''; - print ''; - print ''; // ancre - print $langs->trans('AddNewLine').' - '.$langs->trans("FreeZone").''; - print ''.$langs->trans('VAT').''; - print ''.$langs->trans('PriceUHT').''; - print ''.$langs->trans('PriceUTTC').''; - print ''.$langs->trans('Qty').''; - print ''.$langs->trans('ReductionShort').''; - print ' '; - print ' '; - print ' '; - print ' '; - print '';*/ - global $forceall, $senderissupplier, $dateSelector, $inputalsopricewithtax; $forceall=1; $senderissupplier=1; $dateSelector=0; $inputalsopricewithtax=1; - if ($object->statut == 0 && $user->rights->propal->creer) + if ($object->statut == 0 && $user->rights->fournisseur->facture->creer) { if ($action != 'editline') { @@ -2086,108 +2085,6 @@ else $reshook = $hookmanager->executeHooks('formAddObjectLine', $parameters, $object, $action); // Note that $action and $object may have been modified by hook } } - - // Add free products/services form - /* - $var=true; - print ''; - print ''; - - $forceall=1; // For suppliers, we always show all types - print $form->select_type_of_lines(isset($_POST["type"])?$_POST["type"]:-1,'type',1,0,$forceall); - if ($forceall || (! empty($conf->product->enabled) && ! empty($conf->service->enabled)) - || (empty($conf->product->enabled) && empty($conf->service->enabled))) print '
    '; - - if (is_object($hookmanager)) - { - $parameters=array(); - $reshook=$hookmanager->executeHooks('formCreateSupplierProductOptions',$parameters,$object,$action); - } - - $nbrows=ROWS_2; - if (! empty($conf->global->MAIN_INPUT_DESC_HEIGHT)) $nbrows=$conf->global->MAIN_INPUT_DESC_HEIGHT; - $doleditor=new DolEditor('dp_desc',GETPOST("dp_desc"),'',100,'dolibarr_details','',false,true,$conf->global->FCKEDITOR_ENABLE_DETAILS,$nbrows,70); - $doleditor->Create(); - - print ''; - print ''; - print $form->load_tva('tauxtva',(GETPOST('tauxtva')?GETPOST('tauxtva'):-1),$societe,$mysoc); - print ''; - print ''; - print ''; - print ''; - print ''; - print ''; - print ''; - print ''; - print ''; - print ''; - print '%'; - print ' '; - print ' '; - print ''; - - // Ajout de produits/services predefinis - if (! empty($conf->product->enabled) || ! empty($conf->service->enabled)) - { - print ''; - - print ''; - print ''; - print $langs->trans("AddNewLine").' - '; - if (! empty($conf->service->enabled)) - { - print $langs->trans('RecordedProductsAndServices'); - } - else - { - print $langs->trans('RecordedProducts'); - } - print ''; - print ''.$langs->trans('Qty').''; - print ''.$langs->trans('ReductionShort').''; - print ' '; - print ' '; - print ''; - - $var=! $var; - print ''; - print ''; - - $ajaxoptions=array( - 'update' => array('qty_predef'=>'qty','remise_percent_predef' => 'discount'), // html id tag will be edited with which ajax json response key - 'disabled' => 'addPredefinedProductButton', // html id to disable once select is done - 'error' => $langs->trans("NoPriceDefinedForThisSupplier") // translation of an error saved into var 'error' - ); - $form->select_produits_fournisseurs($object->socid, GETPOST('idprodfournprice'), 'idprodfournprice', '', '', $ajaxoptions); - - if (empty($conf->global->PRODUIT_USE_SEARCH_TO_SELECT)) print '
    '; - - if (is_object($hookmanager)) - { - $parameters=array('htmlname'=>'idprodfournprice'); - $reshook=$hookmanager->executeHooks('formCreateProductSupplierOptions',$parameters,$object,$action); - } - - $nbrows=ROWS_2; - if (! empty($conf->global->MAIN_INPUT_DESC_HEIGHT)) $nbrows=$conf->global->MAIN_INPUT_DESC_HEIGHT; - $doleditor = new DolEditor('np_desc', GETPOST('np_desc'), '', 100, 'dolibarr_details', '', false, true, $conf->global->FCKEDITOR_ENABLE_DETAILS, $nbrows, 70); - $doleditor->Create(); - - print ''; - print ''; - print '%'; - print ' '; - print ' '; - print ''; - print ''; - }*/ } print ''; diff --git a/htdocs/fourn/facture/impayees.php b/htdocs/fourn/facture/impayees.php index 40799e2bcb9..4b2c61c02a5 100644 --- a/htdocs/fourn/facture/impayees.php +++ b/htdocs/fourn/facture/impayees.php @@ -31,7 +31,7 @@ require_once DOL_DOCUMENT_ROOT.'/fourn/class/fournisseur.class.php'; require_once DOL_DOCUMENT_ROOT.'/fourn/class/fournisseur.facture.class.php'; require_once DOL_DOCUMENT_ROOT.'/compta/paiement/class/paiement.class.php'; -if (! $user->rights->facture->lire) accessforbidden(); +if (! $user->rights->fournisseur->facture->lire) accessforbidden(); $langs->load("companies"); $langs->load("bills"); diff --git a/htdocs/fourn/facture/list.php b/htdocs/fourn/facture/list.php index 1f75abf0915..673ac3fea6f 100644 --- a/htdocs/fourn/facture/list.php +++ b/htdocs/fourn/facture/list.php @@ -119,7 +119,7 @@ if ($socid) { $sql .= " AND s.rowid = ".$socid; } -if (GETPOST('filtre')) +if (GETPOST('filtre') && GETPOST('filtre') != -1) // GETPOST('filtre') may be a string { $filtrearr = explode(",", GETPOST('filtre')); foreach ($filtrearr as $fil) @@ -191,15 +191,16 @@ if ($resql) $soc->fetch($socid); } - $param='&socid='.$socid; - if ($month) $param.='&month='.urlencode($month); - if ($year) $param.='&year=' .urlencode($year); - if (GETPOST("search_ref")) $param.='&search_ref='.urlencode(GETPOST("search_ref")); - if (GETPOST("search_ref_supplier")) $param.='&search_ref_supplier'.urlencode(GETPOST("search_ref_supplier")); - if (GETPOST("search_libelle")) $param.='&search_libelle='.urlencode(GETPOST("search_libelle")); - if (GETPOST("search_societe")) $param.='&search_societe='.urlencode(GETPOST("search_societe")); - if (GETPOST("search_montant_ht")) $param.='&search_montant_ht='.urlencode(GETPOST("search_montant_ht")); - if (GETPOST("search_montant_ttc")) $param.='&search_montant_ttc='.urlencode(GETPOST("search_montant_ttc")); + $param='&socid='.$socid; + if ($month) $param.='&month='.urlencode($month); + if ($year) $param.='&year=' .urlencode($year); + if (GETPOST("search_ref")) $param.='&search_ref='.urlencode(GETPOST("search_ref")); + if (GETPOST("search_ref_supplier")) $param.='&search_ref_supplier'.urlencode(GETPOST("search_ref_supplier")); + if (GETPOST("search_libelle")) $param.='&search_libelle='.urlencode(GETPOST("search_libelle")); + if (GETPOST("search_societe")) $param.='&search_societe='.urlencode(GETPOST("search_societe")); + if (GETPOST("search_montant_ht")) $param.='&search_montant_ht='.urlencode(GETPOST("search_montant_ht")); + if (GETPOST("search_montant_ttc")) $param.='&search_montant_ttc='.urlencode(GETPOST("search_montant_ttc")); + if (GETPOST("filtre") && GETPOST('filtre') != -1) $param.='&filtre='.urlencode(GETPOST("filtre")); print_barre_liste($langs->trans("BillsSuppliers").($socid?" $soc->nom":""),$page,$_SERVER["PHP_SELF"],$param,$sortfield,$sortorder,'',$num,$nbtotalofrecords); print '
    '; @@ -242,7 +243,9 @@ if ($resql) print ''; print ''; print ''; - print ''; + print ''; + $liststatus=array('paye:0'=>$langs->trans("Unpayed"), 'paye:1'=>$langs->trans("Payed")); + print $form->selectarray('filtre', $liststatus, GETPOST('filtre'), 1); print ''; print ''; print "\n"; diff --git a/htdocs/fourn/facture/paiement.php b/htdocs/fourn/facture/paiement.php index 8502e13834d..f02e48a9be5 100644 --- a/htdocs/fourn/facture/paiement.php +++ b/htdocs/fourn/facture/paiement.php @@ -243,7 +243,7 @@ if ($action == 'create' || $action == 'confirm_paiement' || $action == 'add_paie $object->fetch($facid); $datefacture=dol_mktime(12, 0, 0, GETPOST('remonth'), GETPOST('reday'), GETPOST('reyear')); - $dateinvoice=($datefacture==''?(empty($conf->global->MAIN_AUTOFILL_DATE)?-1:0):$datefacture); + $dateinvoice=($datefacture==''?(empty($conf->global->MAIN_AUTOFILL_DATE)?-1:''):$datefacture); $sql = 'SELECT s.nom, s.rowid as socid,'; $sql.= ' f.rowid, f.ref, f.ref_supplier, f.amount, f.total_ttc as total'; diff --git a/htdocs/fourn/fiche.php b/htdocs/fourn/fiche.php index 810eaaf30db..127dcfdcc8c 100644 --- a/htdocs/fourn/fiche.php +++ b/htdocs/fourn/fiche.php @@ -312,6 +312,7 @@ if ($object->fetch($id)) $sql = "SELECT p.rowid,p.ref, p.date_commande as dc, p.fk_statut"; $sql.= " FROM ".MAIN_DB_PREFIX."commande_fournisseur as p "; $sql.= " WHERE p.fk_soc =".$object->id; + $sql.= " AND p.entity =".$conf->entity; $sql.= " ORDER BY p.date_commande DESC"; $sql.= " ".$db->plimit($MAXLIST); $resql=$db->query($sql); @@ -380,6 +381,7 @@ if ($object->fetch($id)) $sql.= ' FROM '.MAIN_DB_PREFIX.'facture_fourn as f'; $sql.= ' LEFT JOIN '.MAIN_DB_PREFIX.'paiementfourn_facturefourn as pf ON f.rowid=pf.fk_facturefourn'; $sql.= ' WHERE f.fk_soc = '.$object->id; + $sql.= " AND f.entity =".$conf->entity; $sql.= ' GROUP BY f.rowid,f.libelle,f.ref_supplier,f.fk_statut,f.datef,f.total_ttc,f.paye'; $sql.= ' ORDER BY f.datef DESC'; $resql=$db->query($sql); diff --git a/htdocs/fourn/paiement/fiche.php b/htdocs/fourn/paiement/fiche.php index 8b58e7a4455..9a38e16f7f4 100644 --- a/htdocs/fourn/paiement/fiche.php +++ b/htdocs/fourn/paiement/fiche.php @@ -103,7 +103,7 @@ if ($action == 'confirm_valide' && $confirm == 'yes' && $user->rights->fournisse } } -if ($action == 'setnum' && ! empty($_POST['num_paiement'])) +if ($action == 'setnum_paiement' && ! empty($_POST['num_paiement'])) { $object->fetch($id); $res = $object->update_num($_POST['num_paiement']); diff --git a/htdocs/holiday/admin/holiday.php b/htdocs/holiday/admin/holiday.php index 174adbdf725..2b265711fa1 100644 --- a/htdocs/holiday/admin/holiday.php +++ b/htdocs/holiday/admin/holiday.php @@ -60,18 +60,18 @@ $cp = new Holiday($db); if ($action == "add") { $message = ''; - $error = false; + $error = 0; // Option du groupe de validation /*if (!$cp->updateConfCP('userGroup',$_POST['userGroup'])) { - $error = true; + $error++; }*/ // Option du délai pour faire une demande de congés payés if (!$cp->updateConfCP('delayForRequest',$_POST['delayForRequest'])) { - $error = true; + $error++; } // Option du nombre de jours à ajouter chaque mois @@ -79,67 +79,69 @@ if ($action == "add") if(!$cp->updateConfCP('nbHolidayEveryMonth',$nbHolidayEveryMonth)) { - $error = true; + $error++; } // Option du nombre de jours pour un mariage $OptMariageCP = price2num($_POST['OptMariage'],5); if(!$cp->updateConfCP('OptMariage',$OptMariageCP)) { - $error = true; + $error++; } // Option du nombre de jours pour un décés d'un proche $OptDecesProcheCP = price2num($_POST['OptDecesProche'],5); if(!$cp->updateConfCP('OptDecesProche',$OptDecesProcheCP)) { - $error = true; + $error++; } // Option du nombre de jours pour un mariage d'un enfant $OptMariageProcheCP = price2num($_POST['OptMariageProche'],5); if(!$cp->updateConfCP('OptMariageProche',$OptMariageProcheCP)) { - $error = true; + $error++; } // Option du nombre de jours pour un décés d'un parent $OptDecesParentsCP = price2num($_POST['OptDecesParents'],5); if(!$cp->updateConfCP('OptDecesParents',$OptDecesParentsCP)) { - $error = true; + $error++; } // Option pour avertir le valideur si délai de demande incorrect if(isset($_POST['AlertValidatorDelay'])) { if(!$cp->updateConfCP('AlertValidatorDelay','1')) { - $error = true; + $error++; } } else { if(!$cp->updateConfCP('AlertValidatorDelay','0')) { - $error = true; + $error++; } } // Option pour avertir le valideur si solde des congés de l'utilisateur inccorect if(isset($_POST['AlertValidatorSolde'])) { if(!$cp->updateConfCP('AlertValidatorSolde','1')) { - $error = true; + $error++; } } else { if(!$cp->updateConfCP('AlertValidatorSolde','0')) { - $error = true; + $error++; } } // Option du nombre de jours à déduire pour 1 jour de congés $nbHolidayDeducted = price2num($_POST['nbHolidayDeducted'],2); - if(!$cp->updateConfCP('nbHolidayDeducted',$nbHolidayDeducted)) { - $error = true; + if(!$cp->updateConfCP('nbHolidayDeducted',$nbHolidayDeducted)) + { + $error++; } - if ($error) { + if ($error) + { $message = '
    '.$langs->trans('ErrorUpdateConfCP').'
    '; } else { $message = '
    '.$langs->trans('UpdateConfCPOK').'
    '; @@ -151,8 +153,8 @@ if ($action == "add") $result = $db->query($sql); $num = $db->num_rows($sql); - - if($num < 1) { + if($num < 1) + { $cp->createCPusers(); $message.= '
    '.$langs->trans('AddCPforUsers').'
    '; } @@ -202,7 +204,7 @@ elseif ($action == 'create_event') } elseif($action == 'event' && isset($_POST['update_event'])) { - $error = false; + $error = 0; $eventId = array_keys($_POST['update_event']); $eventId = $eventId[0]; @@ -213,19 +215,21 @@ elseif($action == 'event' && isset($_POST['update_event'])) $eventValue = $optValue; $eventValue = $eventValue[$eventId]; - if(!empty($eventName)) { + if (!empty($eventName)) + { $eventName = trim($eventName); } else { - $error = true; + $error++; } - if(!empty($eventValue)) { + if (!empty($eventValue)) + { $eventValue = price2num($eventValue,2); } else { - $error = true; + $error++; } - if(!$error) + if (!$error) { // Mise à jour des congés de l'utilisateur $update = $cp->updateEventCP($eventId,$eventName,$eventValue); diff --git a/htdocs/holiday/define_holiday.php b/htdocs/holiday/define_holiday.php index 1cf37e77d6f..f167422f503 100644 --- a/htdocs/holiday/define_holiday.php +++ b/htdocs/holiday/define_holiday.php @@ -82,7 +82,7 @@ if ($action == 'update' && isset($_POST['update_cp'])) $sql.= " value = '".dol_print_date($now,'%Y%m%d%H%M%S')."'"; $sql.= " WHERE name = 'lastUpdate' and value IS NULL"; // Add value IS NULL to be sure to update only at init. dol_syslog('define_holiday update lastUpdate entry sql='.$sql); - $result = $db->query($sql); + $result = $db->query($sql); $mesg='
    '.$langs->trans('UpdateConfCPOK').'
    '; @@ -91,21 +91,24 @@ if ($action == 'update' && isset($_POST['update_cp'])) } elseif($action == 'add_event') { - $error = false; + $error = 0; if(!empty($_POST['list_event']) && $_POST['list_event'] > 0) { $event = $_POST['list_event']; - } else { $error = true; + } else { $error++; } if(!empty($_POST['userCP']) && $_POST['userCP'] > 0) { $userCP = $_POST['userCP']; - } else { $error = true; + } else { $erro++; } - if($error) { + if ($error) + { $message = '
    '.$langs->trans('ErrorAddEventToUserCP').'
    '; - } else { + } + else + { $nb_holiday = $holiday->getCPforUser($userCP); $add_holiday = $holiday->getValueEventCp($event); $new_holiday = $nb_holiday + $add_holiday; diff --git a/htdocs/install/check.php b/htdocs/install/check.php index 57dccdc1b0a..486811f7157 100644 --- a/htdocs/install/check.php +++ b/htdocs/install/check.php @@ -443,7 +443,8 @@ else $choice .= ''; $choice .= $langs->trans("UpgradeDesc"); - if ($recommended_choice) { + if ($recommended_choice) + { $choice .= '
    '; //print $langs->trans("InstallChoiceRecommanded",DOL_VERSION,$conf->global->MAIN_VERSION_LAST_UPGRADE); $choice .= '
    '.$langs->trans("InstallChoiceSuggested").'
    '; @@ -475,6 +476,13 @@ else } } + // If there is no choice at all, we show all of them. + if (empty($available_choices)) + { + $available_choices=$notavailable_choices; + $notavailable_choices=array(); + } + // Array of install choices print ''; foreach ($available_choices as $choice) { diff --git a/htdocs/install/mysql/migration/3.4.0-3.5.0.sql b/htdocs/install/mysql/migration/3.4.0-3.5.0.sql index bf48ab3207f..87579367a8a 100755 --- a/htdocs/install/mysql/migration/3.4.0-3.5.0.sql +++ b/htdocs/install/mysql/migration/3.4.0-3.5.0.sql @@ -11,8 +11,10 @@ -- To drop a foreign key: ALTER TABLE llx_table DROP FOREIGN KEY fk_name; -- To restrict request to Mysql version x.y use -- VMYSQLx.y -- To restrict request to Pgsql version x.y use -- VPGSQLx.y --- To make pk to be auto increment (mysql): VMYSQL4.3 ALTER TABLE llx_c_shipment_mode CHANGE COLUMN rowid rowid INTEGER NOT NULL AUTO_INCREMENT; --- To make pk to be auto increment (postgres) VPGSQL8.2 NOT POSSIBLE. MUST DELETE/CREATE TABLE +-- To make pk to be auto increment (mysql): VMYSQL4.3 ALTER TABLE llx_c_shipment_mode CHANGE COLUMN rowid rowid INTEGER NOT NULL AUTO_INCREMENT; +-- To make pk to be auto increment (postgres): VPGSQL8.2 NOT POSSIBLE. MUST DELETE/CREATE TABLE +-- To remove a not null status (mysql): VMYSQL4.3 ALTER TABLE llx_table MODIFY COLUMN colname integer NULL; +-- To remove a not null status (postgres): VPGSQL8.2 ALTER TABLE llx_table ALTER colname DROP NOT NULL; -- -- VPGSQL8.2 DELETE FROM llx_usergroup_user WHERE fk_user NOT IN (SELECT rowid from llx_user); -- -- VMYSQL4.1 DELETE FROM llx_usergroup_user WHERE fk_usergroup NOT IN (SELECT rowid from llx_usergroup); @@ -323,6 +325,8 @@ ALTER TABLE llx_facture_fourn ADD fk_mode_reglement integer NULL AFTER fk_cond_r ALTER TABLE llx_facture_fourn MODIFY COLUMN fk_mode_reglement integer NULL; ALTER TABLE llx_facture_fourn MODIFY COLUMN fk_cond_reglement integer NULL; +-- VPGSQL8.2 ALTER TABLE llx_facture_fourn ALTER fk_mode_reglement DROP NOT NULL; +-- VPGSQL8.2 ALTER TABLE llx_facture_fourn ALTER fk_cond_reglement DROP NOT NULL; INSERT INTO llx_c_action_trigger (rowid,code,label,description,elementtype,rang) values (9,'COMPANY_SENTBYMAIL','Mails sent from third party card','Executed when you send email from third party card','societe',1); diff --git a/htdocs/install/mysql/migration/3.5.0-3.6.0.sql b/htdocs/install/mysql/migration/3.5.0-3.6.0.sql index 176568def37..bc2a62ea929 100644 --- a/htdocs/install/mysql/migration/3.5.0-3.6.0.sql +++ b/htdocs/install/mysql/migration/3.5.0-3.6.0.sql @@ -1197,3 +1197,8 @@ create table llx_c_type_resource )ENGINE=innodb; ALTER TABLE llx_c_type_resource ADD UNIQUE INDEX uk_c_type_resource_id (label, code); + +-- Fix: Missing instruction not correctly done into 3.5 +-- VPGSQL8.2 ALTER TABLE llx_facture_fourn ALTER fk_mode_reglement DROP NOT NULL; +-- VPGSQL8.2 ALTER TABLE llx_facture_fourn ALTER fk_cond_reglement DROP NOT NULL; + diff --git a/htdocs/install/mysql/tables/llx_commande.sql b/htdocs/install/mysql/tables/llx_commande.sql index beda59e79b3..f1c12a6741f 100644 --- a/htdocs/install/mysql/tables/llx_commande.sql +++ b/htdocs/install/mysql/tables/llx_commande.sql @@ -25,7 +25,7 @@ create table llx_commande entity integer DEFAULT 1 NOT NULL, -- multi company id ref_ext varchar(255), -- reference into an external system (not used by dolibarr) - ref_int varchar(255), -- reference into an internal system (used by dolibarr) + ref_int varchar(255), -- reference into an internal system (deprecated) ref_client varchar(255), -- reference for customer fk_soc integer NOT NULL, diff --git a/htdocs/install/mysql/tables/llx_expedition.sql b/htdocs/install/mysql/tables/llx_expedition.sql index 47ead1bd140..08ea9683281 100644 --- a/htdocs/install/mysql/tables/llx_expedition.sql +++ b/htdocs/install/mysql/tables/llx_expedition.sql @@ -28,7 +28,7 @@ create table llx_expedition fk_soc integer NOT NULL, ref_ext varchar(30), -- reference into an external system (not used by dolibarr) - ref_int varchar(30), -- reference into an internal system (used by dolibarr) + ref_int varchar(30), -- reference into an internal system (used by dolibarr to store extern id like paypal info) ref_customer varchar(30), -- customer number date_creation datetime, -- date de creation diff --git a/htdocs/install/mysql/tables/llx_facture.sql b/htdocs/install/mysql/tables/llx_facture.sql index 9f55527ff8e..2522ee7a73e 100644 --- a/htdocs/install/mysql/tables/llx_facture.sql +++ b/htdocs/install/mysql/tables/llx_facture.sql @@ -28,7 +28,7 @@ create table llx_facture entity integer DEFAULT 1 NOT NULL, -- multi company id ref_ext varchar(255), -- reference into an external system (not used by dolibarr) - ref_int varchar(255), -- reference into an internal system (used by dolibarr) + ref_int varchar(255), -- reference into an internal system (used by dolibarr to store extern id like paypal info) ref_client varchar(255), -- reference for customer type smallint DEFAULT 0 NOT NULL, -- type of invoice diff --git a/htdocs/install/mysql/tables/llx_livraison.sql b/htdocs/install/mysql/tables/llx_livraison.sql index a940e191199..486212158aa 100644 --- a/htdocs/install/mysql/tables/llx_livraison.sql +++ b/htdocs/install/mysql/tables/llx_livraison.sql @@ -26,7 +26,7 @@ create table llx_livraison fk_soc integer NOT NULL, ref_ext varchar(30), -- reference into an external system (not used by dolibarr) - ref_int varchar(30), -- reference into an internal system (used by dolibarr) + ref_int varchar(30), -- reference into an internal system (used by dolibarr to store extern id like paypal info) ref_customer varchar(30), -- customer number date_creation datetime, -- date de creation diff --git a/htdocs/install/mysql/tables/llx_propal.sql b/htdocs/install/mysql/tables/llx_propal.sql index 2a97c6c77a3..0ca800c9bca 100644 --- a/htdocs/install/mysql/tables/llx_propal.sql +++ b/htdocs/install/mysql/tables/llx_propal.sql @@ -26,7 +26,7 @@ create table llx_propal entity integer DEFAULT 1 NOT NULL, -- multi company id ref_ext varchar(255), -- reference into an external system (not used by dolibarr) - ref_int varchar(255), -- reference into an internal system (used by dolibarr) + ref_int varchar(255), -- reference into an internal system (used by dolibarr to store extern id like paypal info) ref_client varchar(255), -- customer proposal number fk_soc integer, diff --git a/htdocs/install/mysql/tables/llx_societe.sql b/htdocs/install/mysql/tables/llx_societe.sql index 3182516b820..e2c08d246be 100644 --- a/htdocs/install/mysql/tables/llx_societe.sql +++ b/htdocs/install/mysql/tables/llx_societe.sql @@ -1,6 +1,6 @@ -- ======================================================================== -- Copyright (C) 2000-2004 Rodolphe Quiedeville --- Copyright (C) 2004-2010 Laurent Destailleur +-- Copyright (C) 2004-2014 Laurent Destailleur -- Copyright (C) 2005-2010 Regis Houssin -- Copyright (C) 2010 Juanjo Menent -- @@ -22,11 +22,11 @@ create table llx_societe ( rowid integer AUTO_INCREMENT PRIMARY KEY, - nom varchar(60), -- company reference name - entity integer DEFAULT 1 NOT NULL, -- multi company id + nom varchar(60), -- company reference name + entity integer DEFAULT 1 NOT NULL, -- multi company id - ref_ext varchar(128), -- reference into an external system (not used by dolibarr) - ref_int varchar(60), -- reference into an internal system (used by dolibarr) + ref_ext varchar(128), -- reference into an external system (not used by dolibarr) + ref_int varchar(60), -- reference into an internal system (deprecated) statut tinyint DEFAULT 0, -- statut parent integer, diff --git a/htdocs/install/mysql/tables/llx_user.sql b/htdocs/install/mysql/tables/llx_user.sql index 22d437714c3..4b537e21f0c 100644 --- a/htdocs/install/mysql/tables/llx_user.sql +++ b/htdocs/install/mysql/tables/llx_user.sql @@ -24,7 +24,7 @@ create table llx_user entity integer DEFAULT 1 NOT NULL, -- multi company id ref_ext varchar(50), -- reference into an external system (not used by dolibarr) - ref_int varchar(50), -- reference into an internal system (used by dolibarr) + ref_int varchar(50), -- reference into an internal system (deprecated) datec datetime, tms timestamp, diff --git a/htdocs/langs/ar_SA/admin.lang b/htdocs/langs/ar_SA/admin.lang index 79546bb566d..149045d3830 100644 --- a/htdocs/langs/ar_SA/admin.lang +++ b/htdocs/langs/ar_SA/admin.lang @@ -116,7 +116,7 @@ LanguageBrowserParameter=الوحدة %s LocalisationDolibarrParameters=الوحدات المحلية ClientTZ=Client Time Zone (user) ClientHour=Client time (user) -OSTZ=المنطقة الزمنية لنظام تشغيل الخادم +OSTZ=Server OS Time Zone PHPTZ=المنطقة الزمنية خادم PHP PHPServerOffsetWithGreenwich=عرض وزنية جرينتش لخادم لغة الـ PHP (ثانية) ClientOffsetWithGreenwich=عرض وزنية الجرينتش للعميل / المتصفح (ثانية) @@ -233,7 +233,9 @@ OfficialWebSiteFr=الفرنسية الموقع الرسمي OfficialWiki=Dolibarr يكي OfficialDemo=Dolibarr الانترنت التجريبي OfficialMarketPlace=المسؤول عن وحدات السوق الخارجية / أدونس -OfficialWebHostingService=Official web hosting services (Cloud hosting) +OfficialWebHostingService=Referenced web hosting services (Cloud hosting) +ReferencedPreferredPartners=Preferred Partners +OtherResources=Autres ressources ForDocumentationSeeWiki=For user's or developer's documentation (Doc, FAQs...),
    take a look at the Dolibarr Wiki:
    إلقاء نظرة على ويكي Dolibarr :
    ق ٪ ForAnswersSeeForum=For any other questions/help, you can use the Dolibarr forum:
    ق ٪ HelpCenterDesc1=هذا المجال يمكن أن تساعدك في الحصول على مساعدة لتقديم خدمات الدعم على Dolibarr. @@ -369,9 +371,9 @@ ExtrafieldSelectList = Select from table ExtrafieldSeparator=Separator ExtrafieldCheckBox=Checkbox ExtrafieldRadio=Radio button -ExtrafieldParamHelpselect=Parameters list have to be like key,value

    for exemple :
    1,value1
    2,value2
    3,value3
    ...

    In order to have the list depending on another :
    1,value1|parent_list_code:parent_key
    2,value2|parent_list_code:parent_key -ExtrafieldParamHelpcheckbox=Parameters list have to be like key,value

    for exemple :
    1,value1
    2,value2
    3,value3
    ... -ExtrafieldParamHelpradio=Parameters list have to be like key,value

    for exemple :
    1,value1
    2,value2
    3,value3
    ... +ExtrafieldParamHelpselect=Parameters list have to be like key,value

    for example :
    1,value1
    2,value2
    3,value3
    ...

    In order to have the list depending on another :
    1,value1|parent_list_code:parent_key
    2,value2|parent_list_code:parent_key +ExtrafieldParamHelpcheckbox=Parameters list have to be like key,value

    for example :
    1,value1
    2,value2
    3,value3
    ... +ExtrafieldParamHelpradio=Parameters list have to be like key,value

    for example :
    1,value1
    2,value2
    3,value3
    ... ExtrafieldParamHelpsellist=Parameters list comes from a table
    Syntax : table_name:label_field:id_field::filter
    Example : c_typent:libelle:id::filter

    filter can be a simple test (eg active=1) to display only active value
    if you want to filter on extrafields use syntaxt extra.fieldcode=... (where field code is the code of extrafield)

    In order to have the list depending on another :
    c_typent:libelle:id:parent_list_code|parent_column:filter LibraryToBuildPDF=Library used to build PDF WarningUsingFPDF=Warning: Your conf.php contains directive dolibarr_pdf_force_fpdf=1. This means you use the FPDF library to generate PDF files. This library is old and does not support a lot of features (Unicode, image transparency, cyrillic, arab and asiatic languages, ...), so you may experience errors during PDF generation.
    To solve this and have a full support of PDF generation, please download TCPDF library, then comment or remove the line $dolibarr_pdf_force_fpdf=1, and add instead $dolibarr_lib_TCPDF_PATH='path_to_TCPDF_dir' @@ -472,7 +474,7 @@ Module410Desc=Webcalendar التكامل Module500Name=Special expenses (tax, social contributions, dividends) Module500Desc=Management of special expenses like taxes, social contribution, dividends and salaries Module510Name=Salaries -Module510Desc=Management of empoyees salaries and payments +Module510Desc=Management of employees salaries and payments Module600Name=الإخطارات Module600Desc=إرسال الإشعارات عن طريق البريد الإلكتروني على بعض الفعاليات التجارية Dolibarr لطرف ثالث اتصالات Module700Name=التبرعات @@ -495,15 +497,15 @@ Module2400Name=جدول الأعمال Module2400Desc=الأعمال / الإدارة المهام وجدول الأعمال Module2500Name=إدارة المحتوى الإلكتروني Module2500Desc=حفظ وتبادل الوثائق -Module2600Name= WebServices -Module2600Desc= تمكين خدمات الويب Dolibarr الملقم -Module2700Name= غرفتر -Module2700Desc= استخدام خدمة غرفتر على الانترنت (www.gravatar.com) لإظهار الصورة من المستخدمين / أعضاء (وجدت مع رسائل البريد الإلكتروني الخاصة بهم). في حاجة الى الوصول الى شبكة الانترنت +Module2600Name=WebServices +Module2600Desc=تمكين خدمات الويب Dolibarr الملقم +Module2700Name=غرفتر +Module2700Desc=استخدام خدمة غرفتر على الانترنت (www.gravatar.com) لإظهار الصورة من المستخدمين / أعضاء (وجدت مع رسائل البريد الإلكتروني الخاصة بهم). في حاجة الى الوصول الى شبكة الانترنت Module2800Desc=FTP Client -Module2900Name= GeoIPMaxmind -Module2900Desc= GeoIP التحويلات Maxmind القدرات -Module3100Name= Skype -Module3100Desc= Add a Skype button into card of adherents / third parties / contacts +Module2900Name=GeoIPMaxmind +Module2900Desc=GeoIP التحويلات Maxmind القدرات +Module3100Name=Skype +Module3100Desc=Add a Skype button into card of adherents / third parties / contacts Module5000Name=شركة متعددة Module5000Desc=يسمح لك لإدارة الشركات المتعددة Module6000Name=Workflow @@ -681,6 +683,10 @@ Permission401=قراءة خصومات Permission402=إنشاء / تعديل الخصومات Permission403=تحقق من الخصومات Permission404=حذف خصومات +Permission510=Read Salaries +Permission512=Create/modify salaries +Permission514=Delete salaries +Permission517=Export salaries Permission531=قراءة الخدمات Permission532=إنشاء / تعديل الخدمات Permission534=حذف خدمات @@ -999,7 +1005,7 @@ ExtraFieldsSupplierOrders=Complementary attributes (orders) ExtraFieldsSupplierInvoices=Complementary attributes (invoices) ExtraFieldsProject=Complementary attributes (projects) ExtraFieldsProjectTask=Complementary attributes (tasks) -ExtraFieldHasWrongValue=قيمة الخاصية %s له قيمة خاطئة. +ExtraFieldHasWrongValue=Attribute %s has a wrong value. AlphaNumOnlyCharsAndNoSpace=only alphanumericals characters without space AlphaNumOnlyLowerCharsAndNoSpace=only alphanumericals and lower case characters without space SendingMailSetup=الإعداد من sendings عن طريق البريد الإلكتروني @@ -1018,13 +1024,13 @@ SuhosinSessionEncrypt=Session storage encrypted by Suhosin ConditionIsCurrently=Condition is currently %s TestNotPossibleWithCurrentBrowsers=Automatic detection not possible YouUseBestDriver=You use driver %s that is best driver available currently. -YouDoNotUseBestDriver=You use drive %s but driver %s is recommanded. +YouDoNotUseBestDriver=You use drive %s but driver %s is recommended. NbOfProductIsLowerThanNoPb=You have only %s products/services into database. This does not required any particular optimization. SearchOptim=Search optimization YouHaveXProductUseSearchOptim=You have %s product into database. You should add the constant PRODUCT_DONOTSEARCH_ANYWHERE to 1 into Home-Setup-Other, you limit the search to the beginning of strings making possible for database to use index and you should get an immediate response. BrowserIsOK=You are using the web browser %s. This browser is ok for security and performance. BrowserIsKO=You are using the web browser %s. This browser is known to be a bad choice for security, performance and reliability. We recommand you to use Firefox, Chrome, Opera or Safari. -XDebugInstalled=XDebug est chargé. +XDebugInstalled=XDebug is loaded. XCacheInstalled=XCache is loaded. AddRefInList=Display customer/supplier ref into list (select list or combobox) and most of hyperlink FieldEdition=Edition of field %s @@ -1073,7 +1079,7 @@ WebCalServer=خدمة استضافة قاعدة بيانات التقويم WebCalDatabaseName=اسم قاعدة البيانات WebCalUser=المستخدم من الوصول إلى قاعدة البيانات WebCalSetupSaved=أنقذ Webcalendar الإعداد بنجاح. -WebCalTestOk=علاقة الخادم '٪ ق' على قاعدة البيانات '٪ ق' مستخدم '٪ ق' ناجحة. +WebCalTestOk=Connection to server '%s' on database '%s' with user '%s' successful. WebCalTestKo1=علاقة الخادم '٪ ق' تنجح ولكن قاعدة البيانات '٪ ق' لا يمكن التوصل إليها. WebCalTestKo2=علاقة الخادم '٪ ق' مستخدم '٪ ق' فشلت. WebCalErrorConnectOkButWrongDatabase=نجح الصدد ولكن قاعدة البيانات لا يبدو أن Webcalendar في قاعدة البيانات. @@ -1119,7 +1125,7 @@ WatermarkOnDraftProposal=Watermark on draft commercial proposals (none if empty) OrdersSetup=أوامر إدارة الإعداد OrdersNumberingModules=أوامر الترقيم نمائط OrdersModelModule=وثائق من أجل النماذج -HideTreadedOrders=إخفاء أو معاملة الغاء الاوامر في قائمة +HideTreadedOrders=Hide the treated or cancelled orders in the list ValidOrderAfterPropalClosed=للمصادقة على النظام بعد اقتراح أوثق ، لا يجعل من الممكن للخطوة من جانب النظام المؤقت FreeLegalTextOnOrders=بناء على أوامر النص الحر WatermarkOnDraftOrders=Watermark on draft orders (none if empty) @@ -1214,9 +1220,9 @@ LDAPSynchroKO=فشل تزامن الاختبار LDAPSynchroKOMayBePermissions=تزامن فشل الاختبار. تأكد من أن ارتباط لخادم تهيئتها بشكل صحيح ، ويسمح LDAP udpates LDAPTCPConnectOK=TCP connect to LDAP server successful (Server=%s, Port=ربط برنامج التعاون الفني لخادم LDAP ناجحة (٪ ق= خادم بورت= ٪) LDAPTCPConnectKO=TCP connect to LDAP server failed (Server=%s, Port=ربط برنامج التعاون الفني لخادم LDAP فشل (خادم ق= ٪ بورت= ٪) -LDAPBindOK=Connect/Authentificate to LDAP server sucessfull (Server=%s, Port=%s, Admin=%s, Password=ربط / Authentificate ناجحة لخادم LDAP (خادم ق= ٪ بورت= ٪ ق ، ق= ٪ الادارية ، كلمة المرور= ٪) +LDAPBindOK=Connect/Authentificate to LDAP server successful (Server=%s, Port=%s, Admin=%s, Password=%s) LDAPBindKO=Connect/Authentificate to LDAP server failed (Server=%s, Port=%s, Admin=%s, Password=ربط / Authentificate لخادم LDAP فشل (خادم ق= ٪ بورت= ٪ ق ، ق= ٪ الادارية ، كلمة المرور= ٪) -LDAPUnbindSuccessfull=فصل ناجحة +LDAPUnbindSuccessfull=Disconnect successful LDAPUnbindFailed=قطع فشل LDAPConnectToDNSuccessfull=الاتحاد الافريقي بصدد DN (٪) ري ¿½ ussie LDAPConnectToDNFailed=الاتحاد الافريقي بصدد DN (٪) ¿½ ï ¿½ ه chouï @@ -1273,7 +1279,7 @@ LDAPFieldSidExample=مثال ذلك : objectsid LDAPFieldEndLastSubscription=تاريخ انتهاء الاكتتاب LDAPFieldTitle=وظيفة / وظيفة LDAPFieldTitleExample=Example: title -LDAPParametersAreStillHardCoded=LDAP المعايير ما زالت hardcoded (الطبقة اتصال) +LDAPParametersAreStillHardCoded=LDAP parameters are still hardcoded (in contact class) LDAPSetupNotComplete=LDAP الإعداد غير كاملة (على آخرين علامات التبويب) LDAPNoUserOrPasswordProvidedAccessIsReadOnly=أي مدير أو كلمة السر. LDAP الوصول مجهولة وسيكون في قراءة فقط. LDAPDescContact=تسمح لك هذه الصفحة لتحديد اسم LDAP الصفات LDAP شجرة في كل البيانات التي وجدت على Dolibarr الاتصالات. @@ -1429,7 +1435,7 @@ OptionVATDefault=القياسية OptionVATDebitOption=الخيار خدمات الخصم OptionVatDefaultDesc=ومن المقرر ان ضريبة القيمة المضافة :
    -- التسليم / الدفع للسلع
    -- على دفع تكاليف الخدمات OptionVatDebitOptionDesc=ومن المقرر ان ضريبة القيمة المضافة :
    -- التسليم / الدفع للسلع
    -- على الفاتورة (الخصم) للخدمات -SummaryOfVatExigibilityUsedByDefault=زمن افتراضي exigibility ضريبة القيمة المضافة وفقا لخيار choosed : +SummaryOfVatExigibilityUsedByDefault=Time of VAT exigibility by default according to chosen option: OnDelivery=التسليم OnPayment=عن الدفع OnInvoice=على فاتورة @@ -1446,7 +1452,7 @@ AccountancyCodeBuy=Purchase account. code AgendaSetup=جدول الأعمال وحدة الإعداد PasswordTogetVCalExport=مفتاح ربط تصدير تأذن PastDelayVCalExport=لا تصدر الحدث الأكبر من -AGENDA_USE_EVENT_TYPE=Use events types (managed into menu Setup -> Dictionnary -> Type of agenda events) +AGENDA_USE_EVENT_TYPE=Use events types (managed into menu Setup -> Dictionary -> Type of agenda events) ##### ClickToDial ##### ClickToDialDesc=هذا النموذج يسمح لإضافة رمز بعد رقم هاتف Dolibarr الاتصالات. وهناك اضغط على هذه الأيقونة ، سوف يطلب من أحد serveur معينة مع تحديد عنوان لكم أدناه. ويمكن استخدام هذه الكلمة لدعوة من مركز نظام Dolibarr التي يمكن الاتصال على رقم الهاتف هذا المسبار النظام على سبيل المثال. ##### Point Of Sales (CashDesk) ##### diff --git a/htdocs/langs/ar_SA/contracts.lang b/htdocs/langs/ar_SA/contracts.lang index b1d26a5ac2c..689f6b4ca52 100644 --- a/htdocs/langs/ar_SA/contracts.lang +++ b/htdocs/langs/ar_SA/contracts.lang @@ -89,6 +89,8 @@ ListOfServicesToExpireWithDuration=List of Services to expire in %s days ListOfServicesToExpireWithDurationNeg=List of Services expired from more than %s days ListOfServicesToExpire=List of Services to expire NoteListOfYourExpiredServices=This list contains only services of contracts for third parties you are linked to as a sale representative. +StandardContractsTemplate=Standard contracts template +ContactNameAndSignature=For %s, name and signature: ##### Types de contacts ##### TypeContact_contrat_internal_SALESREPSIGN=ممثل مبيعات توقيع العقد diff --git a/htdocs/langs/ar_SA/exports.lang b/htdocs/langs/ar_SA/exports.lang index 48b9f570165..2180c759d68 100644 --- a/htdocs/langs/ar_SA/exports.lang +++ b/htdocs/langs/ar_SA/exports.lang @@ -8,7 +8,7 @@ ImportableDatas=بيانات وارداتها SelectExportDataSet=اختر البيانات التي تريد تصديرها... SelectImportDataSet=اختر البيانات التي تريد الاستيراد... SelectExportFields=اختيار الحقول التي تريد تصديرها ، أو اختيار ملف التصدير مسبقا -SelectImportFields=اختيار الحقول التي تريد استيراد ، أو حدد ملف استيراد محددة سلفا ، +SelectImportFields=Choose source file fields you want to import and their target field in database by moving them up and down with anchor %s, or select a predefined import profile: NotImportedFields=حقول من الملف المصدر يتم استيراد SaveExportModel=احفظ هذا التصدير صورة لو كنت تخطط لإعادة استخدامها في وقت لاحق... SaveImportModel=إنقاذ هذه استيراد صورة لو كنت تخطط لإعادة استخدامها في وقت لاحق... @@ -81,7 +81,7 @@ DoNotImportFirstLine=لا استيراد السطر الأول من الملف NbOfSourceLines=عدد الأسطر في الملف المصدر NowClickToTestTheImport=الاختيار المعلمات استيراد عرفتها. وإذا كانت صحيحة ، انقر على %s "زر" لإطلاق محاكاة لعملية الاستيراد (يمكن تغيير أية بيانات في قاعدة البيانات وسوف ، انها مجرد محاكاة لحظة)... RunSimulateImportFile=بدء استيراد محاكاة -FieldNeedSource=هذا يشعر في قاعدة البيانات تتطلب البيانات من الملف المصدر +FieldNeedSource=This field requires data from the source file SomeMandatoryFieldHaveNoSource=بعض الحقول إلزامية ليس لديها مصدر من ملف البيانات InformationOnSourceFile=معلومات عن الملف المصدر InformationOnTargetTables=معلومات عن الهدف الحقول diff --git a/htdocs/langs/ar_SA/holiday.lang b/htdocs/langs/ar_SA/holiday.lang index a3d4c537fe4..92137c9150a 100644 --- a/htdocs/langs/ar_SA/holiday.lang +++ b/htdocs/langs/ar_SA/holiday.lang @@ -8,7 +8,6 @@ NotActiveModCP=You must enable the module holidays to view this page. NotConfigModCP=You must configure the module holidays to view this page. To do this, click here . NoCPforUser=You don't have a demand for holidays. AddCP=Apply for holidays -CPErrorSQL=An SQL error occurred: Employe=Employee DateDebCP=تاريخ البدء DateFinCP=نهاية التاريخ diff --git a/htdocs/langs/ar_SA/languages.lang b/htdocs/langs/ar_SA/languages.lang index cdf96a93729..cd863092101 100644 --- a/htdocs/langs/ar_SA/languages.lang +++ b/htdocs/langs/ar_SA/languages.lang @@ -19,6 +19,7 @@ Language_en_SA=English (Saudi Arabia) Language_en_US=الإنكليزية (الولايات المتحدة) Language_en_ZA=English (South Africa) Language_es_ES=الأسبانية +Language_es_DO=Spanish (Dominican Republic) Language_es_AR=الأسبانية (الأرجنتين) Language_es_CL=Spanish (Chile) Language_es_HN=الأسبانية (هندوراس) @@ -38,6 +39,7 @@ Language_fr_NC=French (New Caledonia) Language_he_IL=Hebrew Language_hr_HR=Croatian Language_hu_HU=المجري +Language_id_ID=Indonesian Language_is_IS=الآيسلندي Language_it_IT=الإيطالي Language_ja_JP=اليابانية diff --git a/htdocs/langs/ar_SA/mails.lang b/htdocs/langs/ar_SA/mails.lang index f087b469177..6ccd3b41b77 100644 --- a/htdocs/langs/ar_SA/mails.lang +++ b/htdocs/langs/ar_SA/mails.lang @@ -79,6 +79,7 @@ MailtoEMail=Hyper link to email ActivateCheckRead=Allow to use the "Unsubcribe" link ActivateCheckReadKey=Key use to encrypt URL use for "Read Receipt" and "Unsubcribe" feature EMailSentToNRecipients=EMail sent to %s recipients. +XTargetsAdded=%s recipients added into target list EachInvoiceWillBeAttachedToEmail=A document using default invoice document template will be created and attached to each email. MailTopicSendRemindUnpaidInvoices=Reminder of invoice %s (%s) SendRemind=Send reminder by EMails diff --git a/htdocs/langs/ar_SA/main.lang b/htdocs/langs/ar_SA/main.lang index d2ba65079dc..9851823ed1b 100644 --- a/htdocs/langs/ar_SA/main.lang +++ b/htdocs/langs/ar_SA/main.lang @@ -551,6 +551,7 @@ MailSentBy=البريد الإلكتروني التي بعث بها TextUsedInTheMessageBody=هيئة البريد الإلكتروني SendAcknowledgementByMail=ارسال Ack. عن طريق البريد الإلكتروني NoEMail=أي بريد إلكتروني +NoMobilePhone=No mobile phone Owner=مالك DetectedVersion=اكتشاف نسخة FollowingConstantsWillBeSubstituted=الثوابت التالية ستكون بديلا المقابلة القيمة. diff --git a/htdocs/langs/ar_SA/products.lang b/htdocs/langs/ar_SA/products.lang index b1b9921a010..5a9f39c9058 100644 --- a/htdocs/langs/ar_SA/products.lang +++ b/htdocs/langs/ar_SA/products.lang @@ -28,8 +28,10 @@ ProductsAndServicesStatistics=المنتجات والخدمات والإحصاء ProductsStatistics=المنتجات إحصاءات ProductsOnSell=بيع المنتجات ProductsNotOnSell=من بيع المنتجات +ProductsOnSellAndOnBuy=Products not for sale nor purchase ServicesOnSell=خدمات البيع ServicesNotOnSell=من بيع الخدمات +ServicesOnSellAndOnBuy=Services not for sale nor purchase InternalRef=إشارة الداخلية LastRecorded=آخر المنتجات والخدمات المسجلة على بيع LastRecordedProductsAndServices=٪ ق الماضي سجلت المنتجات / الخدمات @@ -70,6 +72,8 @@ PublicPrice=السعر العام CurrentPrice=السعر الحالي NewPrice=السعر الجديد MinPrice=القطرة. سعر البيع +MinPriceHT=Minim. selling price (net of tax) +MinPriceTTC=Minim. selling price (inc. tax) CantBeLessThanMinPrice=سعر البيع لا يمكن أن يكون أقل من الحد الأدنى المسموح لهذا المنتج (٪ ق بدون الضرائب) ContractStatus=عقد مركز ContractStatusClosed=مغلقة @@ -179,6 +183,7 @@ ProductIsUsed=ويستخدم هذا المنتج NewRefForClone=المرجع. من المنتجات الجديدة / خدمة CustomerPrices=أسعار العملاء SuppliersPrices=أسعار الموردين +SuppliersPricesOfProductsOrServices=Suppliers prices (of products or services) CustomCode=قانون الجمارك CountryOrigin=بلد المنشأ HiddenIntoCombo=مخبأة في قوائم مختارة @@ -208,6 +213,7 @@ CostPmpHT=Net total VWAP ProductUsedForBuild=Auto consumed by production ProductBuilded=Production completed ProductsMultiPrice=Product multi-price +ProductsOrServiceMultiPrice=Customers prices (of products or services, multi-prices) ProductSellByQuarterHT=Products turnover quarterly VWAP ServiceSellByQuarterHT=Services turnover quarterly VWAP Quarter1=1st. Quarter diff --git a/htdocs/langs/ar_SA/shop.lang b/htdocs/langs/ar_SA/shop.lang index 01a7da98666..4127cac2321 100644 --- a/htdocs/langs/ar_SA/shop.lang +++ b/htdocs/langs/ar_SA/shop.lang @@ -1,4 +1,5 @@ # Dolibarr language file - Source file is en_US - shop +FailedConnectDBCheckModuleSetup=Failed to connect to oscommerce database. Check your module setup Shop=متجر ShopWeb=تسوق على الإنترنت LastOrders=أوامر الماضي diff --git a/htdocs/langs/ar_SA/stocks.lang b/htdocs/langs/ar_SA/stocks.lang index df0c62f65b5..f06b9173f3c 100644 --- a/htdocs/langs/ar_SA/stocks.lang +++ b/htdocs/langs/ar_SA/stocks.lang @@ -112,6 +112,7 @@ ReplenishmentOrdersDesc=This is list of all opened supplier orders Replenishments=Replenishments NbOfProductBeforePeriod=Quantity of product %s in stock before selected period (< %s) NbOfProductAfterPeriod=Quantity of product %s in stock after selected period (> %s) +MassMovement=Mass movement MassStockMovement=Mass stock movement SelectProductInAndOutWareHouse=Select a product, a quantity, a source warehouse and a target warehouse, then click "%s". Once this is done for all required movements, click onto "%s". RecordMovement=Record transfert diff --git a/htdocs/langs/bg_BG/admin.lang b/htdocs/langs/bg_BG/admin.lang index 381d7bf5416..27bf13f0d11 100644 --- a/htdocs/langs/bg_BG/admin.lang +++ b/htdocs/langs/bg_BG/admin.lang @@ -116,7 +116,7 @@ LanguageBrowserParameter=Параметър %s LocalisationDolibarrParameters=Локализация параметри ClientTZ=Client Time Zone (user) ClientHour=Client time (user) -OSTZ=Servre OS Time Zone +OSTZ=Server OS Time Zone PHPTZ=PHP server Time Zone PHPServerOffsetWithGreenwich=PHP сървъра компенсира широчина Гринуич (секунди) ClientOffsetWithGreenwich=Клиент / Browser компенсира широчина Гринуич (секунди) @@ -233,7 +233,9 @@ OfficialWebSiteFr=Френски официален уеб сайт OfficialWiki=Dolibarr документация на Wiki OfficialDemo=Dolibarr онлайн демо OfficialMarketPlace=Официален магазин за външни модули/добавки -OfficialWebHostingService=Официален уеб хостинг услуга (Cloud хостинг) +OfficialWebHostingService=Referenced web hosting services (Cloud hosting) +ReferencedPreferredPartners=Preferred Partners +OtherResources=Autres ressources ForDocumentationSeeWiki=Документация за потребител или разработчик (Doc, често задавани въпроси ...),
    можете да намерите в Dolibarr Wiki:
    %s ForAnswersSeeForum=За всякакви други въпроси / Помощ, можете да използвате форума Dolibarr:
    %s HelpCenterDesc1=Тази област може да ви помогне да получите помощ и поддръжка за Dolibarr. @@ -369,9 +371,9 @@ ExtrafieldSelectList = Select from table ExtrafieldSeparator=Separator ExtrafieldCheckBox=Checkbox ExtrafieldRadio=Радио бутон -ExtrafieldParamHelpselect=Parameters list have to be like key,value

    for exemple :
    1,value1
    2,value2
    3,value3
    ...

    In order to have the list depending on another :
    1,value1|parent_list_code:parent_key
    2,value2|parent_list_code:parent_key -ExtrafieldParamHelpcheckbox=Parameters list have to be like key,value

    for exemple :
    1,value1
    2,value2
    3,value3
    ... -ExtrafieldParamHelpradio=Parameters list have to be like key,value

    for exemple :
    1,value1
    2,value2
    3,value3
    ... +ExtrafieldParamHelpselect=Parameters list have to be like key,value

    for example :
    1,value1
    2,value2
    3,value3
    ...

    In order to have the list depending on another :
    1,value1|parent_list_code:parent_key
    2,value2|parent_list_code:parent_key +ExtrafieldParamHelpcheckbox=Parameters list have to be like key,value

    for example :
    1,value1
    2,value2
    3,value3
    ... +ExtrafieldParamHelpradio=Parameters list have to be like key,value

    for example :
    1,value1
    2,value2
    3,value3
    ... ExtrafieldParamHelpsellist=Parameters list comes from a table
    Syntax : table_name:label_field:id_field::filter
    Example : c_typent:libelle:id::filter

    filter can be a simple test (eg active=1) to display only active value
    if you want to filter on extrafields use syntaxt extra.fieldcode=... (where field code is the code of extrafield)

    In order to have the list depending on another :
    c_typent:libelle:id:parent_list_code|parent_column:filter LibraryToBuildPDF=Library used to build PDF WarningUsingFPDF=Warning: Your conf.php contains directive dolibarr_pdf_force_fpdf=1. This means you use the FPDF library to generate PDF files. This library is old and does not support a lot of features (Unicode, image transparency, cyrillic, arab and asiatic languages, ...), so you may experience errors during PDF generation.
    To solve this and have a full support of PDF generation, please download TCPDF library, then comment or remove the line $dolibarr_pdf_force_fpdf=1, and add instead $dolibarr_lib_TCPDF_PATH='path_to_TCPDF_dir' @@ -472,7 +474,7 @@ Module410Desc=Webcalendar интеграция Module500Name=Special expenses (tax, social contributions, dividends) Module500Desc=Management of special expenses like taxes, social contribution, dividends and salaries Module510Name=Salaries -Module510Desc=Management of empoyees salaries and payments +Module510Desc=Management of employees salaries and payments Module600Name=Известия Module600Desc=Изпращане известия по имейл за някои бизнес събития в Dolibarr към трети лица Module700Name=Дарения @@ -495,15 +497,15 @@ Module2400Name=Дневен ред Module2400Desc=Събития/задачи и управление на дневен ред Module2500Name=Електронно Управление на Съдържанието Module2500Desc=Запазване и споделяне на документи -Module2600Name= WebServices -Module2600Desc= Активирайте сървъра на Dolibarr за уеб услуги -Module2700Name= Gravatar -Module2700Desc= Използвайте онлайн Gravatar услуга (www.gravatar.com), за да покаже снимка на потребители / членове с техните имейли. Нуждаете се от интернет +Module2600Name=WebServices +Module2600Desc=Активирайте сървъра на Dolibarr за уеб услуги +Module2700Name=Gravatar +Module2700Desc=Използвайте онлайн Gravatar услуга (www.gravatar.com), за да покаже снимка на потребители / членове с техните имейли. Нуждаете се от интернет Module2800Desc=FTP Клиент -Module2900Name= GeoIPMaxmind -Module2900Desc= GeoIP MaxMind реализации възможности -Module3100Name= Skype -Module3100Desc= Add a Skype button into card of adherents / third parties / contacts +Module2900Name=GeoIPMaxmind +Module2900Desc=GeoIP MaxMind реализации възможности +Module3100Name=Skype +Module3100Desc=Add a Skype button into card of adherents / third parties / contacts Module5000Name=Няколко фирми Module5000Desc=Позволява ви да управлявате няколко фирми Module6000Name=Workflow @@ -681,6 +683,10 @@ Permission401=Прочети отстъпки Permission402=Създаване / промяна на отстъпки Permission403=Проверка на отстъпки Permission404=Изтриване на отстъпки +Permission510=Read Salaries +Permission512=Create/modify salaries +Permission514=Delete salaries +Permission517=Export salaries Permission531=Прочети услуги Permission532=Създаване / промяна услуги Permission534=Изтриване на услуги @@ -999,7 +1005,7 @@ ExtraFieldsSupplierOrders=Complementary attributes (orders) ExtraFieldsSupplierInvoices=Complementary attributes (invoices) ExtraFieldsProject=Complementary attributes (projects) ExtraFieldsProjectTask=Complementary attributes (tasks) -ExtraFieldHasWrongValue=Attribut %s има грешна стойност. +ExtraFieldHasWrongValue=Attribute %s has a wrong value. AlphaNumOnlyCharsAndNoSpace=само героите alphanumericals без пространство AlphaNumOnlyLowerCharsAndNoSpace=only alphanumericals and lower case characters without space SendingMailSetup=Настройка на изпращане по имейл @@ -1018,13 +1024,13 @@ SuhosinSessionEncrypt=Session storage encrypted by Suhosin ConditionIsCurrently=Condition is currently %s TestNotPossibleWithCurrentBrowsers=Automatic detection not possible YouUseBestDriver=You use driver %s that is best driver available currently. -YouDoNotUseBestDriver=You use drive %s but driver %s is recommanded. +YouDoNotUseBestDriver=You use drive %s but driver %s is recommended. NbOfProductIsLowerThanNoPb=You have only %s products/services into database. This does not required any particular optimization. SearchOptim=Search optimization YouHaveXProductUseSearchOptim=You have %s product into database. You should add the constant PRODUCT_DONOTSEARCH_ANYWHERE to 1 into Home-Setup-Other, you limit the search to the beginning of strings making possible for database to use index and you should get an immediate response. BrowserIsOK=You are using the web browser %s. This browser is ok for security and performance. BrowserIsKO=You are using the web browser %s. This browser is known to be a bad choice for security, performance and reliability. We recommand you to use Firefox, Chrome, Opera or Safari. -XDebugInstalled=XDebug est chargé. +XDebugInstalled=XDebug is loaded. XCacheInstalled=XCache is loaded. AddRefInList=Display customer/supplier ref into list (select list or combobox) and most of hyperlink FieldEdition=Edition of field %s @@ -1073,7 +1079,7 @@ WebCalServer=Хостинг сървър календар база данни WebCalDatabaseName=Име на базата данни WebCalUser=Потребителя за достъп до базата данни WebCalSetupSaved=Webcalendar настройка запазена успешно. -WebCalTestOk=Връзка към "%s" сървър на "%s" база данни с успешен потребителски %s. +WebCalTestOk=Connection to server '%s' on database '%s' with user '%s' successful. WebCalTestKo1=Свързване към сървър "%s успее, но база данни" %s "не може да бъде постигнато. WebCalTestKo2=Връзка към сървъра "%s" с потребителя %s "се провали. WebCalErrorConnectOkButWrongDatabase=Връзка успял, но базата данни не изглежда да е база данни Webcalendar. @@ -1119,7 +1125,7 @@ WatermarkOnDraftProposal=Watermark on draft commercial proposals (none if empty) OrdersSetup=Настройки за управление на поръчки OrdersNumberingModules=Поръчки номериране модули OrdersModelModule=Поръчка документи модели -HideTreadedOrders=Скриване на третираните или отказани поръчки в списъка +HideTreadedOrders=Hide the treated or cancelled orders in the list ValidOrderAfterPropalClosed=Да се ​​потвърди ред след предложението близо, това прави възможно да не се увеличат с временния ред FreeLegalTextOnOrders=Свободен текст на поръчки WatermarkOnDraftOrders=Watermark on draft orders (none if empty) @@ -1214,9 +1220,9 @@ LDAPSynchroKO=Неуспешно синхронизиране тест LDAPSynchroKOMayBePermissions=Неуспешно синхронизиране тест. Уверете се, че свързването със сървъра е конфигуриран правилно и позволява LDAP udpates LDAPTCPConnectOK=TCP свърже с LDAP сървъра успешни (сървър = %s, Порт = %s) LDAPTCPConnectKO=TCP се свърже с LDAP сървъра не успя (Server = %s, Port = %s) -LDAPBindOK=Свързване / Authentificate сървъра sucessfull LDAP (сървър = %s, Port = %s, Admin = %s, парола = %s) +LDAPBindOK=Connect/Authentificate to LDAP server successful (Server=%s, Port=%s, Admin=%s, Password=%s) LDAPBindKO=Свързване / Authentificate LDAP сървъра се провали (сървър = %s, Port = %s, Admin = %s, парола = %s) -LDAPUnbindSuccessfull=Изключете успешно +LDAPUnbindSuccessfull=Disconnect successful LDAPUnbindFailed=Изключете не успя LDAPConnectToDNSuccessfull=Връзка о DN (%s) РИ ¿½ ussie LDAPConnectToDNFailed=Връзка о DN (%s) ï ¿½ chouï ¿½ д @@ -1273,7 +1279,7 @@ LDAPFieldSidExample=Пример: objectsid LDAPFieldEndLastSubscription=Дата на абонамент края LDAPFieldTitle=Мнение / Функция LDAPFieldTitleExample=Example: title -LDAPParametersAreStillHardCoded=LDAP параметри все още кодиран (в контакт клас) +LDAPParametersAreStillHardCoded=LDAP parameters are still hardcoded (in contact class) LDAPSetupNotComplete=LDAP настройка не е пълна (отидете на други раздели) LDAPNoUserOrPasswordProvidedAccessIsReadOnly=Не администратор или парола. LDAP достъп ще бъдат анонимни и в режим само за четене. LDAPDescContact=Тази страница ви позволява да дефинирате LDAP атрибути име в LDAP дърво за всеки намерени данни за контактите на Dolibarr. @@ -1429,7 +1435,7 @@ OptionVATDefault=Стандарт OptionVATDebitOption=Вариант услуги по дебитни OptionVatDefaultDesc=Се дължи ДДС:
    - При доставка на стоки (ние използваме датата на фактурата)
    - Плащания за услуги OptionVatDebitOptionDesc=Се дължи ДДС:
    - При доставка на стоки (ние използваме датата на фактурата)
    - По фактура (дебитно) за услуги -SummaryOfVatExigibilityUsedByDefault=Време на изискуемост на ДДС по подразбиране, според няма избрана опция: +SummaryOfVatExigibilityUsedByDefault=Time of VAT exigibility by default according to chosen option: OnDelivery=При доставка OnPayment=На плащане OnInvoice=На фактура @@ -1446,7 +1452,7 @@ AccountancyCodeBuy=Purchase account. code AgendaSetup=Събития и натъкмяване на дневен ред модул PasswordTogetVCalExport=, За да разреши износ връзка PastDelayVCalExport=Не изнася случай по-стари от -AGENDA_USE_EVENT_TYPE=Use events types (managed into menu Setup -> Dictionnary -> Type of agenda events) +AGENDA_USE_EVENT_TYPE=Use events types (managed into menu Setup -> Dictionary -> Type of agenda events) ##### ClickToDial ##### ClickToDialDesc=Този модул позволява да добавите икона след телефонни номера. Кликнете върху тази икона ще призове сървър с определен URL адрес можете да зададете по-долу. Това може да се използва, за да се обадя на кол център система от Dolibarr, че да се обаждат на телефонен номер на SIP система, например. ##### Point Of Sales (CashDesk) ##### diff --git a/htdocs/langs/bg_BG/contracts.lang b/htdocs/langs/bg_BG/contracts.lang index 19e3aafa29d..1c28e533303 100644 --- a/htdocs/langs/bg_BG/contracts.lang +++ b/htdocs/langs/bg_BG/contracts.lang @@ -89,6 +89,8 @@ ListOfServicesToExpireWithDuration=List of Services to expire in %s days ListOfServicesToExpireWithDurationNeg=List of Services expired from more than %s days ListOfServicesToExpire=List of Services to expire NoteListOfYourExpiredServices=This list contains only services of contracts for third parties you are linked to as a sale representative. +StandardContractsTemplate=Standard contracts template +ContactNameAndSignature=For %s, name and signature: ##### Types de contacts ##### TypeContact_contrat_internal_SALESREPSIGN=Търговски представител подписване на договора diff --git a/htdocs/langs/bg_BG/exports.lang b/htdocs/langs/bg_BG/exports.lang index 2456b85a580..1f07cbce94f 100644 --- a/htdocs/langs/bg_BG/exports.lang +++ b/htdocs/langs/bg_BG/exports.lang @@ -8,7 +8,7 @@ ImportableDatas=Се внасят набор от данни SelectExportDataSet=Изберете набор от данни, които искате да експортирате ... SelectImportDataSet=Изберете набор от данни, който искате да импортирате ... SelectExportFields=Изберете полетата, които искате да експортирате, или да изберете предварително дефинирана Profil износ -SelectImportFields=Изберете файла източник полета, които искате да импортирате и тяхното поле в базата данни от тях се движат нагоре и надолу с анкерни %s или изберете предварително дефинирана Profil внос: +SelectImportFields=Choose source file fields you want to import and their target field in database by moving them up and down with anchor %s, or select a predefined import profile: NotImportedFields=Области на файла източник не са внесени SaveExportModel=Запази този профил за износ, ако смятате да го използвате отново по-късно ... SaveImportModel=Запази този профил за внос, ако смятате да го използвате отново по-късно ... @@ -81,7 +81,7 @@ DoNotImportFirstLine=Да не се внасят първия ред на изх NbOfSourceLines=Брой на линиите във файла източник NowClickToTestTheImport=Проверете внос параметрите, които сте задали. Ако те са правилни, кликнете върху бутона "%s", за да започне симулация на процеса на импортиране (няма данни ще се промени във вашата база данни, това е само симулация за момента) ... RunSimulateImportFile=Стартиране на симулация внос -FieldNeedSource=Това Полета в базата данни изискват данни от файла източник +FieldNeedSource=This field requires data from the source file SomeMandatoryFieldHaveNoSource=Някои от задължителните полета не са източник от файл с данни InformationOnSourceFile=Информация за файла източник InformationOnTargetTables=Информация за целевите области diff --git a/htdocs/langs/bg_BG/holiday.lang b/htdocs/langs/bg_BG/holiday.lang index f4850f1b9c6..09d044b54ee 100644 --- a/htdocs/langs/bg_BG/holiday.lang +++ b/htdocs/langs/bg_BG/holiday.lang @@ -8,7 +8,6 @@ NotActiveModCP=Трябва да вкючите модула за отпуски NotConfigModCP=Необходимо е да конфигурирате модула за отпуски за да видите тази страница. За да направите това, щтракнете тук . NoCPforUser=You don't have a demand for holidays. AddCP=Кандидатстване за отпуск -CPErrorSQL=Възникна SQL грешка: Employe=Служител DateDebCP=Начална дата DateFinCP=Крайна дата diff --git a/htdocs/langs/bg_BG/languages.lang b/htdocs/langs/bg_BG/languages.lang index b6d6fefd6d3..a5ea9c2051c 100644 --- a/htdocs/langs/bg_BG/languages.lang +++ b/htdocs/langs/bg_BG/languages.lang @@ -19,6 +19,7 @@ Language_en_SA=English (Саудитска Арабия) Language_en_US=English (United States) Language_en_ZA=English (Южна Африка) Language_es_ES=Испански +Language_es_DO=Spanish (Dominican Republic) Language_es_AR=Испански (Аржентина) Language_es_CL=Spanish (Chile) Language_es_HN=Испански (Хондурас) @@ -38,6 +39,7 @@ Language_fr_NC=French (Нова Каледония) Language_he_IL=Иврит Language_hr_HR=Хърватски Language_hu_HU=Унгарски +Language_id_ID=Indonesian Language_is_IS=Исландски Language_it_IT=Италиански Language_ja_JP=Японски diff --git a/htdocs/langs/bg_BG/mails.lang b/htdocs/langs/bg_BG/mails.lang index 4b3dfac2efe..855a4099262 100644 --- a/htdocs/langs/bg_BG/mails.lang +++ b/htdocs/langs/bg_BG/mails.lang @@ -79,6 +79,7 @@ MailtoEMail=Хипер-връзка на приятел ActivateCheckRead=Оставя се да се използва за четене тракер получаване и връзката unsubcribe ActivateCheckReadKey=Key използване за криптиране на използването на URL адрес за обратна разписка и функция unsubcribe EMailSentToNRecipients=EMail sent to %s recipients. +XTargetsAdded=%s recipients added into target list EachInvoiceWillBeAttachedToEmail=A document using default invoice document template will be created and attached to each email. MailTopicSendRemindUnpaidInvoices=Reminder of invoice %s (%s) SendRemind=Send reminder by EMails diff --git a/htdocs/langs/bg_BG/main.lang b/htdocs/langs/bg_BG/main.lang index 00e3cd6b9cb..b1e64f2acb0 100644 --- a/htdocs/langs/bg_BG/main.lang +++ b/htdocs/langs/bg_BG/main.lang @@ -551,6 +551,7 @@ MailSentBy=E-mail, изпратен от TextUsedInTheMessageBody=Email body SendAcknowledgementByMail=Изпращане на уведомление по имейл NoEMail=Няма имейл +NoMobilePhone=No mobile phone Owner=Собственик DetectedVersion=Открита версия FollowingConstantsWillBeSubstituted=Следните константи ще бъдат заменени със съответната стойност. diff --git a/htdocs/langs/bg_BG/products.lang b/htdocs/langs/bg_BG/products.lang index 8f7be736250..8c660d45eb9 100644 --- a/htdocs/langs/bg_BG/products.lang +++ b/htdocs/langs/bg_BG/products.lang @@ -28,8 +28,10 @@ ProductsAndServicesStatistics=Статистика на Продукти и Ус ProductsStatistics=Статистика на продукти ProductsOnSell=Налични продукти ProductsNotOnSell=Стари продукти +ProductsOnSellAndOnBuy=Products not for sale nor purchase ServicesOnSell=Налични услуги ServicesNotOnSell=Стари услуги +ServicesOnSellAndOnBuy=Services not for sale nor purchase InternalRef=Вътрешна препратка LastRecorded=Последните записани продукти / услуги по продажба LastRecordedProductsAndServices=Последните %s записани продукти / услуги @@ -70,6 +72,8 @@ PublicPrice=Публична цена CurrentPrice=Текуща цена NewPrice=Нова цена MinPrice=Миним. продажна цена +MinPriceHT=Minim. selling price (net of tax) +MinPriceTTC=Minim. selling price (inc. tax) CantBeLessThanMinPrice=Продажната цена не може да бъде по-ниска от максимално допустимата за този продукт (%s без ДДС). Това съобщение може да се появи, ако въведете твърде важна отстъпка. ContractStatus=Състояние на договор ContractStatusClosed=Затворен @@ -179,6 +183,7 @@ ProductIsUsed=Този продукт е използван NewRefForClone=Реф. на нов продукт/услуга CustomerPrices=Цени за клиенти SuppliersPrices=Цени на доставцици +SuppliersPricesOfProductsOrServices=Suppliers prices (of products or services) CustomCode=Customs code CountryOrigin=Държава на произход HiddenIntoCombo=Hidden into select lists @@ -208,6 +213,7 @@ CostPmpHT=Net total VWAP ProductUsedForBuild=Auto consumed by production ProductBuilded=Production completed ProductsMultiPrice=Product multi-price +ProductsOrServiceMultiPrice=Customers prices (of products or services, multi-prices) ProductSellByQuarterHT=Products turnover quarterly VWAP ServiceSellByQuarterHT=Services turnover quarterly VWAP Quarter1=1st. Quarter diff --git a/htdocs/langs/bg_BG/shop.lang b/htdocs/langs/bg_BG/shop.lang index 657d39e3b7a..6f793aeca45 100644 --- a/htdocs/langs/bg_BG/shop.lang +++ b/htdocs/langs/bg_BG/shop.lang @@ -1,4 +1,5 @@ # Dolibarr language file - Source file is en_US - shop +FailedConnectDBCheckModuleSetup=Failed to connect to oscommerce database. Check your module setup Shop=Магазин ShopWeb=Web Shop LastOrders=Последни поръчки diff --git a/htdocs/langs/bg_BG/stocks.lang b/htdocs/langs/bg_BG/stocks.lang index d380188964e..15a07b52645 100644 --- a/htdocs/langs/bg_BG/stocks.lang +++ b/htdocs/langs/bg_BG/stocks.lang @@ -112,6 +112,7 @@ ReplenishmentOrdersDesc=This is list of all opened supplier orders Replenishments=Попълване NbOfProductBeforePeriod=Quantity of product %s in stock before selected period (< %s) NbOfProductAfterPeriod=Quantity of product %s in stock after selected period (> %s) +MassMovement=Mass movement MassStockMovement=Mass stock movement SelectProductInAndOutWareHouse=Select a product, a quantity, a source warehouse and a target warehouse, then click "%s". Once this is done for all required movements, click onto "%s". RecordMovement=Record transfert diff --git a/htdocs/langs/bs_BA/admin.lang b/htdocs/langs/bs_BA/admin.lang index 5648adad185..2c70754f228 100644 --- a/htdocs/langs/bs_BA/admin.lang +++ b/htdocs/langs/bs_BA/admin.lang @@ -116,7 +116,7 @@ LanguageBrowserParameter=Parameter %s LocalisationDolibarrParameters=Localisation parameters ClientTZ=Client Time Zone (user) ClientHour=Client time (user) -OSTZ=Servre OS Time Zone +OSTZ=Server OS Time Zone PHPTZ=PHP server Time Zone PHPServerOffsetWithGreenwich=PHP server offset width Greenwich (seconds) ClientOffsetWithGreenwich=Klijent/browser ofset širina Greenwich-a (sekunde) @@ -233,7 +233,9 @@ OfficialWebSiteFr=French official web site OfficialWiki=Dolibarr documentation on Wiki OfficialDemo=Dolibarr online demo OfficialMarketPlace=Official market place for external modules/addons -OfficialWebHostingService=Službene web hosting usluge (Cloud hosting) +OfficialWebHostingService=Referenced web hosting services (Cloud hosting) +ReferencedPreferredPartners=Preferred Partners +OtherResources=Autres ressources ForDocumentationSeeWiki=For user or developer documentation (Doc, FAQs...),
    take a look at the Dolibarr Wiki:
    %s ForAnswersSeeForum=For any other questions/help, you can use the Dolibarr forum:
    %s HelpCenterDesc1=This area can help you to get a Help support service on Dolibarr. @@ -369,9 +371,9 @@ ExtrafieldSelectList = Select from table ExtrafieldSeparator=Separator ExtrafieldCheckBox=Checkbox ExtrafieldRadio=Radio button -ExtrafieldParamHelpselect=Lista parametara mora biti kao key,value

    na primjer:
    1,value1
    2,value2
    3,value33
    ...

    Da bi lista u zavisila od druge:
    1,value1|parent_list_code:parent_key
    2,value2|parent_list_code:parent_key -ExtrafieldParamHelpcheckbox=Parameters list have to be like key,value

    for exemple :
    1,value1
    2,value2
    3,value3
    ... -ExtrafieldParamHelpradio=Parameters list have to be like key,value

    for exemple :
    1,value1
    2,value2
    3,value3
    ... +ExtrafieldParamHelpselect=Parameters list have to be like key,value

    for example :
    1,value1
    2,value2
    3,value3
    ...

    In order to have the list depending on another :
    1,value1|parent_list_code:parent_key
    2,value2|parent_list_code:parent_key +ExtrafieldParamHelpcheckbox=Parameters list have to be like key,value

    for example :
    1,value1
    2,value2
    3,value3
    ... +ExtrafieldParamHelpradio=Parameters list have to be like key,value

    for example :
    1,value1
    2,value2
    3,value3
    ... ExtrafieldParamHelpsellist=Parameters list comes from a table
    Syntax : table_name:label_field:id_field::filter
    Example : c_typent:libelle:id::filter

    filter can be a simple test (eg active=1) to display only active value
    if you want to filter on extrafields use syntaxt extra.fieldcode=... (where field code is the code of extrafield)

    In order to have the list depending on another :
    c_typent:libelle:id:parent_list_code|parent_column:filter LibraryToBuildPDF=Library used to build PDF WarningUsingFPDF=Warning: Your conf.php contains directive dolibarr_pdf_force_fpdf=1. This means you use the FPDF library to generate PDF files. This library is old and does not support a lot of features (Unicode, image transparency, cyrillic, arab and asiatic languages, ...), so you may experience errors during PDF generation.
    To solve this and have a full support of PDF generation, please download TCPDF library, then comment or remove the line $dolibarr_pdf_force_fpdf=1, and add instead $dolibarr_lib_TCPDF_PATH='path_to_TCPDF_dir' @@ -472,7 +474,7 @@ Module410Desc=Webcalendar integration Module500Name=Special expenses (tax, social contributions, dividends) Module500Desc=Management of special expenses like taxes, social contribution, dividends and salaries Module510Name=Salaries -Module510Desc=Management of empoyees salaries and payments +Module510Desc=Management of employees salaries and payments Module600Name=Notifications Module600Desc=Send notifications by email on some Dolibarr business events to third party contacts Module700Name=Donations @@ -495,15 +497,15 @@ Module2400Name=Agenda Module2400Desc=Events/tasks and agenda management Module2500Name=Electronic Content Management Module2500Desc=Save and share documents -Module2600Name= WebServices -Module2600Desc= Enable the Dolibarr web services server -Module2700Name= Gravatar -Module2700Desc= Use online Gravatar service (www.gravatar.com) to show photo of users/members (found with their emails). Need an internet access +Module2600Name=WebServices +Module2600Desc=Enable the Dolibarr web services server +Module2700Name=Gravatar +Module2700Desc=Use online Gravatar service (www.gravatar.com) to show photo of users/members (found with their emails). Need an internet access Module2800Desc=FTP Client -Module2900Name= GeoIPMaxmind -Module2900Desc= GeoIP Maxmind conversions capabilities -Module3100Name= Skype -Module3100Desc= Dodajte Skype dugme na kartici sljedbenika / trećih strana / kontakata +Module2900Name=GeoIPMaxmind +Module2900Desc=GeoIP Maxmind conversions capabilities +Module3100Name=Skype +Module3100Desc=Dodajte Skype dugme na kartici sljedbenika / trećih strana / kontakata Module5000Name=Multi-company Module5000Desc=Allows you to manage multiple companies Module6000Name=Workflow - Tok rada @@ -681,6 +683,10 @@ Permission401=Read discounts Permission402=Create/modify discounts Permission403=Validate discounts Permission404=Delete discounts +Permission510=Read Salaries +Permission512=Create/modify salaries +Permission514=Delete salaries +Permission517=Export salaries Permission531=Read services Permission532=Create/modify services Permission534=Delete services @@ -999,7 +1005,7 @@ ExtraFieldsSupplierOrders=Dopunske atributa (naloga) ExtraFieldsSupplierInvoices=Dopunski atributi (fakture) ExtraFieldsProject=Dopunski atributi (projekti) ExtraFieldsProjectTask=Dopunski atributi (zadaci) -ExtraFieldHasWrongValue=Attribut %s has a wrong value. +ExtraFieldHasWrongValue=Attribute %s has a wrong value. AlphaNumOnlyCharsAndNoSpace=only alphanumericals characters without space AlphaNumOnlyLowerCharsAndNoSpace=only alphanumericals and lower case characters without space SendingMailSetup=Setup of sendings by email @@ -1018,13 +1024,13 @@ SuhosinSessionEncrypt=Session storage encrypted by Suhosin ConditionIsCurrently=Condition is currently %s TestNotPossibleWithCurrentBrowsers=Automatska detekcija nije moguća YouUseBestDriver=Možete koristiti driver %s koji je trenutno najbolji. -YouDoNotUseBestDriver=Možete koristiti drive %s, ali driver %s se preporučava. +YouDoNotUseBestDriver=You use drive %s but driver %s is recommended. NbOfProductIsLowerThanNoPb=Imate samo %s proizvoda/usluga u bazu podataka. To ne zahtijeva posebne optimizacije. SearchOptim=Optimizacija pretraživanja YouHaveXProductUseSearchOptim=Imate %s proizvod u bazu podataka. Trebalo bi dodati konstantu PRODUCT_DONOTSEARCH_ANYWHERE na 1 u Početna-Postavke-Ostalo, ograničavate pretragu na početak što je moguće za baze podataka za korištenje indeksa i trebali bi dobiti hitnu reakciju. BrowserIsOK=Vi koristite web browser %s. Ovaj browser je ok za sigurnost i performanse. BrowserIsKO=Vi koristite web browser %s. Poznato je da je ovaj broswer loš izbor za sigurnost, performanse i pouzdanost. Mi preporučujemo da koristite Firefox, Chrome, Opera i Safari. -XDebugInstalled=XCache je učitan. +XDebugInstalled=XDebug is loaded. XCacheInstalled=XCache je učitan. AddRefInList=Prikaz kupca/dobavljača ref u listi (odaberite listu ili combobox) i većina hyperlink FieldEdition=Edition of field %s @@ -1073,7 +1079,7 @@ WebCalServer=Server hosting calendar database WebCalDatabaseName=Database name WebCalUser=User to access database WebCalSetupSaved=Webcalendar setup saved successfully. -WebCalTestOk=Connection to server '%s' on database '%s' with user '%s' successfull. +WebCalTestOk=Connection to server '%s' on database '%s' with user '%s' successful. WebCalTestKo1=Connection to server '%s' succeed but database '%s' could not be reached. WebCalTestKo2=Connection to server '%s' with user '%s' failed. WebCalErrorConnectOkButWrongDatabase=Connection succeeded but database doesn't look to be a Webcalendar database. @@ -1119,7 +1125,7 @@ WatermarkOnDraftProposal=Vodeni žig na nacrte komercijalnih prijedloga (ništa, OrdersSetup=Order management setup OrdersNumberingModules=Orders numbering models OrdersModelModule=Order documents models -HideTreadedOrders=Hide the treated or canceled orders in the list +HideTreadedOrders=Hide the treated or cancelled orders in the list ValidOrderAfterPropalClosed=To validate the order after proposal closer, makes it possible not to step by the provisional order FreeLegalTextOnOrders=Free text on orders WatermarkOnDraftOrders=Vodeni žig na nacrte naloga (ništa, ako je prazno) @@ -1214,9 +1220,9 @@ LDAPSynchroKO=Failed synchronization test LDAPSynchroKOMayBePermissions=Failed synchronization test. Check that connexion to server is correctly configured and allows LDAP udpates LDAPTCPConnectOK=TCP connect to LDAP server successful (Server=%s, Port=%s) LDAPTCPConnectKO=TCP connect to LDAP server failed (Server=%s, Port=%s) -LDAPBindOK=Connect/Authentificate to LDAP server sucessfull (Server=%s, Port=%s, Admin=%s, Password=%s) +LDAPBindOK=Connect/Authentificate to LDAP server successful (Server=%s, Port=%s, Admin=%s, Password=%s) LDAPBindKO=Connect/Authentificate to LDAP server failed (Server=%s, Port=%s, Admin=%s, Password=%s) -LDAPUnbindSuccessfull=Disconnect successfull +LDAPUnbindSuccessfull=Disconnect successful LDAPUnbindFailed=Disconnect failed LDAPConnectToDNSuccessfull=Connection to DN (%s) successful LDAPConnectToDNFailed=Connection to DN (%s) failed @@ -1273,7 +1279,7 @@ LDAPFieldSidExample=Example : objectsid LDAPFieldEndLastSubscription=Date of subscription end LDAPFieldTitle=Post/Function LDAPFieldTitleExample=Example: title -LDAPParametersAreStillHardCoded=LDAP parametres are still hardcoded (in contact class) +LDAPParametersAreStillHardCoded=LDAP parameters are still hardcoded (in contact class) LDAPSetupNotComplete=LDAP setup not complete (go on others tabs) LDAPNoUserOrPasswordProvidedAccessIsReadOnly=No administrator or password provided. LDAP access will be anonymous and in read only mode. LDAPDescContact=This page allows you to define LDAP attributes name in LDAP tree for each data found on Dolibarr contacts. @@ -1429,7 +1435,7 @@ OptionVATDefault=Standard OptionVATDebitOption=Option services on Debit OptionVatDefaultDesc=VAT is due:
    - on delivery for goods (we use invoice date)
    - on payments for services OptionVatDebitOptionDesc=VAT is due:
    - on delivery for goods (we use invoice date)
    - on invoice (debit) for services -SummaryOfVatExigibilityUsedByDefault=Time of VAT exigibility by default according to choosed option: +SummaryOfVatExigibilityUsedByDefault=Time of VAT exigibility by default according to chosen option: OnDelivery=On delivery OnPayment=On payment OnInvoice=On invoice @@ -1446,7 +1452,7 @@ AccountancyCodeBuy=Purchase account. code AgendaSetup=Events and agenda module setup PasswordTogetVCalExport=Key to authorize export link PastDelayVCalExport=Do not export event older than -AGENDA_USE_EVENT_TYPE=Use events types (managed into menu Setup -> Dictionnary -> Type of agenda events) +AGENDA_USE_EVENT_TYPE=Use events types (managed into menu Setup -> Dictionary -> Type of agenda events) ##### ClickToDial ##### ClickToDialDesc=This module allows to add an icon after phone numbers. A click on this icon will call a server with a particular URL you define below. This can be used to call a call center system from Dolibarr that can call the phone number on a SIP system for example. ##### Point Of Sales (CashDesk) ##### diff --git a/htdocs/langs/bs_BA/contracts.lang b/htdocs/langs/bs_BA/contracts.lang index bc57443552f..873955f9707 100644 --- a/htdocs/langs/bs_BA/contracts.lang +++ b/htdocs/langs/bs_BA/contracts.lang @@ -89,6 +89,8 @@ ListOfServicesToExpireWithDuration=Lista usluga pred isticanje za %s dana ListOfServicesToExpireWithDurationNeg=Lista isteklih usluga više od %s dana ListOfServicesToExpire=Lista usluga pred isticanje NoteListOfYourExpiredServices=This list contains only services of contracts for third parties you are linked to as a sale representative. +StandardContractsTemplate=Standard contracts template +ContactNameAndSignature=For %s, name and signature: ##### Types de contacts ##### TypeContact_contrat_internal_SALESREPSIGN=Predstavnik prodaje koji potpisuje ugovor diff --git a/htdocs/langs/bs_BA/exports.lang b/htdocs/langs/bs_BA/exports.lang index 2a3ba5d712f..3acad0d32cd 100644 --- a/htdocs/langs/bs_BA/exports.lang +++ b/htdocs/langs/bs_BA/exports.lang @@ -8,7 +8,7 @@ ImportableDatas=Importable dataset SelectExportDataSet=Choose dataset you want to export... SelectImportDataSet=Choose dataset you want to import... SelectExportFields=Choose fields you want to export, or select a predefined export profile -SelectImportFields=Choose source file fields you want to import and their target field in database by moving them up and down with anchor %s, or select a predefined import profil: +SelectImportFields=Choose source file fields you want to import and their target field in database by moving them up and down with anchor %s, or select a predefined import profile: NotImportedFields=Fields of source file not imported SaveExportModel=Save this export profile if you plan to reuse it later... SaveImportModel=Save this import profile if you plan to reuse it later... @@ -81,7 +81,7 @@ DoNotImportFirstLine=Do not import first line of source file NbOfSourceLines=Number of lines in source file NowClickToTestTheImport=Check import parameters you have defined. If they are correct, click on button "%s" to launch a simulation of import process (no data will be changed in your database, it's only a simulation for the moment)... RunSimulateImportFile=Launch the import simulation -FieldNeedSource=This fiels in database require a data from source file +FieldNeedSource=This field requires data from the source file SomeMandatoryFieldHaveNoSource=Some mandatory fields have no source from data file InformationOnSourceFile=Information on source file InformationOnTargetTables=Information on target fields diff --git a/htdocs/langs/bs_BA/holiday.lang b/htdocs/langs/bs_BA/holiday.lang index 4bbd0fbb4b7..54c94293460 100644 --- a/htdocs/langs/bs_BA/holiday.lang +++ b/htdocs/langs/bs_BA/holiday.lang @@ -8,7 +8,6 @@ NotActiveModCP=Morate omogućiti modul godišnji odmori da bi vidjeli ovu strani NotConfigModCP=Morate konfigurisati modul godišnji odmori da bi vidjeli ovu stranicu. Da bi ste uradili ovo, kliknite ovdje. NoCPforUser=Nema te zahtjeva za godišnje odmore. AddCP=Prijavi se za godišnji odmor -CPErrorSQL=Desila se SQL greška: Employe=Zaposlenik DateDebCP=Datum početka DateFinCP=Datum završetka diff --git a/htdocs/langs/bs_BA/languages.lang b/htdocs/langs/bs_BA/languages.lang index 17a9333095a..4361cfb8950 100644 --- a/htdocs/langs/bs_BA/languages.lang +++ b/htdocs/langs/bs_BA/languages.lang @@ -19,6 +19,7 @@ Language_en_SA=Engleski (Saudijska Arabija) Language_en_US=Engleski (United States) Language_en_ZA=Engleski (Južna Afrika) Language_es_ES=Španski +Language_es_DO=Spanish (Dominican Republic) Language_es_AR=Španjolski (Argentina) Language_es_CL=Spanish (Chile) Language_es_HN=Španjolski (Honduras) @@ -38,6 +39,7 @@ Language_fr_NC=Francuski (Nova Kaledonija) Language_he_IL=Jevrejski Language_hr_HR=Hrvatski Language_hu_HU=Mađarski +Language_id_ID=Indonesian Language_is_IS=Islandski Language_it_IT=Italijanski Language_ja_JP=Japanski diff --git a/htdocs/langs/bs_BA/mails.lang b/htdocs/langs/bs_BA/mails.lang index d1e9941dc1e..138d6b88d39 100644 --- a/htdocs/langs/bs_BA/mails.lang +++ b/htdocs/langs/bs_BA/mails.lang @@ -79,6 +79,7 @@ MailtoEMail=Hyper link na e-poštu ActivateCheckRead=Dozvoli korištenje "Ispiši se" linka ActivateCheckReadKey=Kljul korišten za enkriptovanje linka koristi se za "Pročitaj potvrdu" i "Ispiši se" mogućnosti EMailSentToNRecipients=E-pošta poslana %s primaocima +XTargetsAdded=%s recipients added into target list EachInvoiceWillBeAttachedToEmail=A document using default invoice document template will be created and attached to each email. MailTopicSendRemindUnpaidInvoices=Reminder of invoice %s (%s) SendRemind=Send reminder by EMails diff --git a/htdocs/langs/bs_BA/main.lang b/htdocs/langs/bs_BA/main.lang index ad45b2733d6..c5beb9cd708 100644 --- a/htdocs/langs/bs_BA/main.lang +++ b/htdocs/langs/bs_BA/main.lang @@ -551,6 +551,7 @@ MailSentBy=Email sent by TextUsedInTheMessageBody=Email body SendAcknowledgementByMail=Send Ack. by email NoEMail=No email +NoMobilePhone=No mobile phone Owner=Owner DetectedVersion=Detected version FollowingConstantsWillBeSubstituted=The following constants will be replaced with the corresponding value. diff --git a/htdocs/langs/bs_BA/products.lang b/htdocs/langs/bs_BA/products.lang index 61be5272315..4db26d213d7 100644 --- a/htdocs/langs/bs_BA/products.lang +++ b/htdocs/langs/bs_BA/products.lang @@ -28,8 +28,10 @@ ProductsAndServicesStatistics=Statistika proizvoda i usluga ProductsStatistics=Statistika proizvoda ProductsOnSell=Dostupni proizvodi ProductsNotOnSell=Zastarjeli proizvodi +ProductsOnSellAndOnBuy=Products not for sale nor purchase ServicesOnSell=Dostupne usluge ServicesNotOnSell=Zastarjele usluge +ServicesOnSellAndOnBuy=Services not for sale nor purchase InternalRef=Interna referenca LastRecorded=Last products/services on sell recorded LastRecordedProductsAndServices=Last %s recorded products/services @@ -70,6 +72,8 @@ PublicPrice=Public price CurrentPrice=Current price NewPrice=New price MinPrice=Minim. selling price +MinPriceHT=Minim. selling price (net of tax) +MinPriceTTC=Minim. selling price (inc. tax) CantBeLessThanMinPrice=The selling price can't be lower than minimum allowed for this product (%s without tax). This message can also appears if you type a too important discount. ContractStatus=Contract status ContractStatusClosed=Closed @@ -179,6 +183,7 @@ ProductIsUsed=This product is used NewRefForClone=Ref. of new product/service CustomerPrices=Customers prices SuppliersPrices=Suppliers prices +SuppliersPricesOfProductsOrServices=Suppliers prices (of products or services) CustomCode=Customs code CountryOrigin=Origin country HiddenIntoCombo=Hidden into select lists @@ -208,6 +213,7 @@ CostPmpHT=Net total VWAP ProductUsedForBuild=Auto consumed by production ProductBuilded=Production completed ProductsMultiPrice=Product multi-price +ProductsOrServiceMultiPrice=Customers prices (of products or services, multi-prices) ProductSellByQuarterHT=Products turnover quarterly VWAP ServiceSellByQuarterHT=Services turnover quarterly VWAP Quarter1=1st. Quarter diff --git a/htdocs/langs/bs_BA/shop.lang b/htdocs/langs/bs_BA/shop.lang index 3bd34f1dbbd..a52f4da4322 100644 --- a/htdocs/langs/bs_BA/shop.lang +++ b/htdocs/langs/bs_BA/shop.lang @@ -1,4 +1,5 @@ # Dolibarr language file - Source file is en_US - shop +FailedConnectDBCheckModuleSetup=Failed to connect to oscommerce database. Check your module setup Shop=Prodavnica ShopWeb=Web Shop LastOrders=Zadnje narudžbe diff --git a/htdocs/langs/bs_BA/stocks.lang b/htdocs/langs/bs_BA/stocks.lang index 983452dae1f..f2b497003c5 100644 --- a/htdocs/langs/bs_BA/stocks.lang +++ b/htdocs/langs/bs_BA/stocks.lang @@ -112,6 +112,7 @@ ReplenishmentOrdersDesc=Ovo je lista svih otvorenih narudžbi dobavljača Replenishments=Nadopune NbOfProductBeforePeriod=Količina proizvoda %s u zalihi prije odabranog perioda (%s) NbOfProductAfterPeriod=Količina proizvoda %s u zalihi poslije odabranog perioda (> %s) +MassMovement=Mass movement MassStockMovement=Masovno kretanje zalihe SelectProductInAndOutWareHouse=Odaberite proizvod, kolilinu, izvordno skladište i ciljano skladište. zatim kliknite "%s". Kada je ovo završeno za sva potrebna kretanja, kliknite "%s". RecordMovement=Zapiši transfer diff --git a/htdocs/langs/ca_ES/admin.lang b/htdocs/langs/ca_ES/admin.lang index 2b5cd3d3352..24423236383 100644 --- a/htdocs/langs/ca_ES/admin.lang +++ b/htdocs/langs/ca_ES/admin.lang @@ -116,7 +116,7 @@ LanguageBrowserParameter=Variable %s LocalisationDolibarrParameters=Paràmetres de localització ClientTZ=Client Time Zone (user) ClientHour=Client time (user) -OSTZ=Zona horària Servidor SO +OSTZ=Server OS Time Zone PHPTZ=Zona horària Servidor PHP PHPServerOffsetWithGreenwich=Offset amb Greenwich (segons) ClientOffsetWithGreenwich=Offset client/navegador amb Greenwich (segons) @@ -233,7 +233,9 @@ OfficialWebSiteFr=lloc web oficial francòfon OfficialWiki=Wiki Dolibarr OfficialDemo=Demo en línia Dolibarr OfficialMarketPlace=Lloc oficial de mòduls complementaris i extensions -OfficialWebHostingService=Servei oficial d'allotjament (SaaS) +OfficialWebHostingService=Referenced web hosting services (Cloud hosting) +ReferencedPreferredPartners=Preferred Partners +OtherResources=Autres ressources ForDocumentationSeeWiki=Per a la documentació d'usuari, desenvolupador o Preguntes Freqüents (FAQ), consulteu el wiki Dolibarr:
    %s ForAnswersSeeForum=Per altres qüestions o realitzar les seves pròpies consultes, pot utilitzar el fòrum Dolibarr:
    %s HelpCenterDesc1=Aquesta aplicació, independent de Dolibarr, us permet ajudar a obtenir un servei de suport de Dolibarr. @@ -369,9 +371,9 @@ ExtrafieldSelectList = Llista de selecció de table ExtrafieldSeparator=Separador ExtrafieldCheckBox=Casella de verificació ExtrafieldRadio=Botó de selecció excloent -ExtrafieldParamHelpselect=La llista ha de ser en forma clau, valor

    per exemple :
    1,text1
    2,text2
    3,text3
    ... -ExtrafieldParamHelpcheckbox=La llista ha de ser en forma clau, valor

    per exemple :
    1,text1
    2,text2
    3,text3
    ... -ExtrafieldParamHelpradio=La llista ha de ser en forma clau, valor

    per exemple :
    1,text1
    2,text2
    3,text3
    ... +ExtrafieldParamHelpselect=Parameters list have to be like key,value

    for example :
    1,value1
    2,value2
    3,value3
    ...

    In order to have the list depending on another :
    1,value1|parent_list_code:parent_key
    2,value2|parent_list_code:parent_key +ExtrafieldParamHelpcheckbox=Parameters list have to be like key,value

    for example :
    1,value1
    2,value2
    3,value3
    ... +ExtrafieldParamHelpradio=Parameters list have to be like key,value

    for example :
    1,value1
    2,value2
    3,value3
    ... ExtrafieldParamHelpsellist=Parameters list comes from a table
    Syntax : table_name:label_field:id_field::filter
    Example : c_typent:libelle:id::filter

    filter can be a simple test (eg active=1) to display only active value
    if you want to filter on extrafields use syntaxt extra.fieldcode=... (where field code is the code of extrafield)

    In order to have the list depending on another :
    c_typent:libelle:id:parent_list_code|parent_column:filter LibraryToBuildPDF=Llibreria usada per a la creació d'arxius PDF WarningUsingFPDF=Atenció: El seu arxiu conf.php conté la directiva dolibarr_pdf_force_fpdf=1. Això fa que s'usi la llibreria FPDF per generar els seus arxius PDF. Aquesta llibreria és antiga i no cobreix algunes funcionalitats (Unicode, transparència d'imatges, idiomes ciríl · lics, àrabs o asiàtics, etc.), Pel que pot tenir problemes en la generació dels PDF.
    Per resoldre-ho, i disposar d'un suport complet de PDF, pot descarregar la llibreria TCPDF , i a continuació comentar o eliminar la línia $dolibarr_pdf_force_fpdf=1, i afegir al seu lloc $dolibarr_lib_TCPDF_PATH='ruta_a_TCPDF' @@ -472,7 +474,7 @@ Module410Desc=Interface amb el calendari webcalendar Module500Name=Special expenses (tax, social contributions, dividends) Module500Desc=Management of special expenses like taxes, social contribution, dividends and salaries Module510Name=Salaries -Module510Desc=Management of empoyees salaries and payments +Module510Desc=Management of employees salaries and payments Module600Name=Notificacions Module600Desc=Enviament de notificacions (per correu electrònic) sobre els esdeveniments de treball Dolibarr Module700Name=Donacions @@ -495,15 +497,15 @@ Module2400Name=Agenda Module2400Desc=Gestió de l'agenda i de les accions Module2500Name=Gestió Electrònica de Documents Module2500Desc=Permet administrar una base de documents -Module2600Name= WebServices -Module2600Desc= Activa els serveis de servidor web services de Dolibarr -Module2700Name= Gravatar -Module2700Desc= Utilitza el servei en línia de Gravatar (www.gravatar.com) per mostrar fotos dels usuaris/membres (que es troben en els seus missatges de correu electrònic). Necessita un accés a Internet +Module2600Name=WebServices +Module2600Desc=Activa els serveis de servidor web services de Dolibarr +Module2700Name=Gravatar +Module2700Desc=Utilitza el servei en línia de Gravatar (www.gravatar.com) per mostrar fotos dels usuaris/membres (que es troben en els seus missatges de correu electrònic). Necessita un accés a Internet Module2800Desc=Client FTP -Module2900Name= GeoIPMaxmind -Module2900Desc= Capacitats de conversió GeoIP Maxmind -Module3100Name= Skype -Module3100Desc= Add a Skype button into card of adherents / third parties / contacts +Module2900Name=GeoIPMaxmind +Module2900Desc=Capacitats de conversió GeoIP Maxmind +Module3100Name=Skype +Module3100Desc=Add a Skype button into card of adherents / third parties / contacts Module5000Name=Multi-empresa Module5000Desc=Permet gestionar diverses empreses Module6000Name=Workflow @@ -681,6 +683,10 @@ Permission401=Consultar havers Permission402=Crear/modificar havers Permission403=Validar havers Permission404=Eliminar havers +Permission510=Read Salaries +Permission512=Create/modify salaries +Permission514=Delete salaries +Permission517=Export salaries Permission531=Consultar serveis Permission532=Crear/modificar serveis Permission534=Eliminar serveis @@ -999,7 +1005,7 @@ ExtraFieldsSupplierOrders=Atributs complementaris (comandes) ExtraFieldsSupplierInvoices=AAtributs complementaris (factures) ExtraFieldsProject=Atributs complementaris (projets) ExtraFieldsProjectTask=Atributs complementaris (tâches) -ExtraFieldHasWrongValue=L'atribut %s te un valor incorrecte. +ExtraFieldHasWrongValue=Attribute %s has a wrong value. AlphaNumOnlyCharsAndNoSpace=només carateres alfanumèrics sense espais AlphaNumOnlyLowerCharsAndNoSpace=only alphanumericals and lower case characters without space SendingMailSetup=Configuració de l'enviament per mail @@ -1018,13 +1024,13 @@ SuhosinSessionEncrypt=Emmagatzematge de sessions xifrades per Suhosin ConditionIsCurrently=Actualment la condició és %s TestNotPossibleWithCurrentBrowsers=La detecció automàtica no és possible amb el navegador actual YouUseBestDriver=Està utilitzant el driver %s, actualment és el millor driver disponible. -YouDoNotUseBestDriver=Està utilitzant el driver %s però és recomanat l'ús del driver %s. +YouDoNotUseBestDriver=You use drive %s but driver %s is recommended. NbOfProductIsLowerThanNoPb=Té %s productes/serveis a la base de dades. No és necessària cap optimització en particular. SearchOptim=Cercar optimització YouHaveXProductUseSearchOptim=Té %s productes a la base de dades. Hauria afegir la constant PRODUCT_DONOTSEARCH_ANYWHERE a 1 a Inici-Configuració-Varis, limitant la cerca al principi de la cadena que fa possible que la base de dades usi l'índex i s'obtingui una resposta immediata. BrowserIsOK=Utilitza el navegador web %s. Aquest navegador està optimitzat per a la seguretat i el rendiment. BrowserIsKO=Utilitza el navegador web %s. Aquest navegador és una mala opció per a la seguretat, rendiment i fiabilitat. Aconsellem fer servir Firefox, Chrome, Opera o Safari. -XDebugInstalled=XDebug està carregat. +XDebugInstalled=XDebug is loaded. XCacheInstalled=XCache cau està carregat. AddRefInList=Display customer/supplier ref into list (select list or combobox) and most of hyperlink FieldEdition=Edition of field %s @@ -1073,7 +1079,7 @@ WebCalServer=Servidor de la base de dades del calendari WebCalDatabaseName=Nom de la base de dades WebCalUser=Usuari amb accés a la base WebCalSetupSaved=Les dades d'enllaç s'han desat correctament. -WebCalTestOk=La connexió al servidor '%s' a la base '%s' per l'usuari '%s' ha estat satisfactòria. +WebCalTestOk=Connection to server '%s' on database '%s' with user '%s' successful. WebCalTestKo1=La connexió al servidor '%s' ha estat satisfactòria, però la base '%s' no s'ha pogut comprovar. WebCalTestKo2=La conexió al servidor '%s' per l'usuari '%s' ha fallat. WebCalErrorConnectOkButWrongDatabase=La connexió ha sortit bé però la base no sembla ser una base webcalendar. @@ -1119,7 +1125,7 @@ WatermarkOnDraftProposal=Marca d'aigua en pressupostos esborrany (en cas d'estar OrdersSetup=Configuració del mòdul comandes OrdersNumberingModules=Mòduls de numeració de les comandes OrdersModelModule=Models de documents de comandes -HideTreadedOrders=Amaga les comandes processades o anul·lades del llistat +HideTreadedOrders=Hide the treated or cancelled orders in the list ValidOrderAfterPropalClosed=Validar la comanda després del tancament del pressupost, permet no passar per la comanda provisional FreeLegalTextOnOrders=Text lliure en comandes WatermarkOnDraftOrders=Marca d'aigua en comandes esborrany (en cas d'estar buit) @@ -1214,9 +1220,9 @@ LDAPSynchroKO=Prova de sincronització errònia LDAPSynchroKOMayBePermissions=Error de la prova de sincronització. Comproveu que la connexió al servidor sigui correcta i que permet les actualitzacions LDAP LDAPTCPConnectOK=Connexió TCP al servidor LDAP efectuada (Servidor=%s, Port=%s) LDAPTCPConnectKO=Error de connexió TCP al servidor LDAP (Servidor=%s, Port=%s) -LDAPBindOK=Connexió/Autenticació al servidor LDAP aconseguida (Servidor=%s, Port=%s, Admin=%s, Password=%s) +LDAPBindOK=Connect/Authentificate to LDAP server successful (Server=%s, Port=%s, Admin=%s, Password=%s) LDAPBindKO=Error de connexió/autenticació al servidor LDAP (Servidor=%s, Port=%s, Admin=%s, Password=%s) -LDAPUnbindSuccessfull=Desconnexió realitzada +LDAPUnbindSuccessfull=Disconnect successful LDAPUnbindFailed=Desconnexió fallada LDAPConnectToDNSuccessfull=Connexió a DN (%s) realitzada LDAPConnectToDNFailed=Connexió a DN (%s) fallada @@ -1273,7 +1279,7 @@ LDAPFieldSidExample=Exemple : objectsid LDAPFieldEndLastSubscription=Data finalització com a membre LDAPFieldTitle=Lloc/Funció LDAPFieldTitleExample=Exemple:títol -LDAPParametersAreStillHardCoded=Els paràmetres LDAP són codificats en dur (a la classe contact) +LDAPParametersAreStillHardCoded=LDAP parameters are still hardcoded (in contact class) LDAPSetupNotComplete=Configuració LDAP incompleta (a completar en les altres pestanyes) LDAPNoUserOrPasswordProvidedAccessIsReadOnly=Administrador o contrasenya no indicats. Els accessos LDAP seran anònims i en només lectura. LDAPDescContact=Aquesta pàgina permet definir el nom dels atributs de l'arbre LDAP per a cada informació dels contactes Dolibarr. @@ -1429,7 +1435,7 @@ OptionVATDefault=Estandard OptionVATDebitOption=Opció serveis a dèbit OptionVatDefaultDesc=La càrrega de l'IVA és:
    -en l'enviament dels béns (en la pràctica s'usa la data de la factura)
    -sobre el pagament pels serveis OptionVatDebitOptionDesc=La càrrega de l'IVA és:
    -en l'enviament dels béns en la pràctica s'usa la data de la factura
    -sobre la facturació dels serveis -SummaryOfVatExigibilityUsedByDefault=Moment d'exigibilitat per defecte l'IVA per a l'opció escollida: +SummaryOfVatExigibilityUsedByDefault=Time of VAT exigibility by default according to chosen option: OnDelivery=Al lliurament OnPayment=Al pagament OnInvoice=A la factura @@ -1446,7 +1452,7 @@ AccountancyCodeBuy=Codi comptable compres AgendaSetup=Mòdul configuració d'accions i agenda PasswordTogetVCalExport=Clau d'autorització vCal export link PastDelayVCalExport=No exportar els esdeveniments de més de -AGENDA_USE_EVENT_TYPE=Use events types (managed into menu Setup -> Dictionnary -> Type of agenda events) +AGENDA_USE_EVENT_TYPE=Use events types (managed into menu Setup -> Dictionary -> Type of agenda events) ##### ClickToDial ##### ClickToDialDesc=Aquest mòdul permet afegir una icona després del número de telèfon de contactes Dolibarr. Un clic en aquesta icona, Truca a un servidor amb un URL que s'indica a continuació. Això pot ser usat per anomenar al sistema centre de Dolibarr que pot trucar al número de telèfon en un sistema SIP, per exemple. ##### Point Of Sales (CashDesk) ##### diff --git a/htdocs/langs/ca_ES/contracts.lang b/htdocs/langs/ca_ES/contracts.lang index afc83147cf5..3fb7712ca6b 100644 --- a/htdocs/langs/ca_ES/contracts.lang +++ b/htdocs/langs/ca_ES/contracts.lang @@ -89,6 +89,8 @@ ListOfServicesToExpireWithDuration=Llistat de serveis actius a expirar en %s die ListOfServicesToExpireWithDurationNeg=Llistat de serveis expirats més de %s dies ListOfServicesToExpire=Llistat de serveis actius a expirar NoteListOfYourExpiredServices=Aquest llistat conté només els serveis de contractes de tercers dels que vostè és comercial +StandardContractsTemplate=Standard contracts template +ContactNameAndSignature=For %s, name and signature: ##### Types de contacts ##### TypeContact_contrat_internal_SALESREPSIGN=Comercial signant del contracte diff --git a/htdocs/langs/ca_ES/exports.lang b/htdocs/langs/ca_ES/exports.lang index 0a01a936b34..56d6ceb117b 100644 --- a/htdocs/langs/ca_ES/exports.lang +++ b/htdocs/langs/ca_ES/exports.lang @@ -8,7 +8,7 @@ ImportableDatas=Conjunt de dades importables SelectExportDataSet=Trieu un conjunt predefinit de dades que voleu exportar ... SelectImportDataSet=Seleccioneu un lot de dades predefinides que desitgi importar ... SelectExportFields=Escolliu els camps que han d'exportar, o elija un perfil d'exportació predefinit -SelectImportFields=Seleccioneu els camps a importar, o seleccioneu un perfil predefinit d'importació +SelectImportFields=Choose source file fields you want to import and their target field in database by moving them up and down with anchor %s, or select a predefined import profile: NotImportedFields=Camps de l'arxiu origen no importats SaveExportModel=Desar aquest perfil d'exportació si voleu reutilitzar posteriorment ... SaveImportModel=Deseu aquest perfil d'importació si el voleu reutilitzar de nou posteriorment ... @@ -81,7 +81,7 @@ DoNotImportFirstLine=No importar la primera línia del fitxer font NbOfSourceLines=Nombre de línies de l'arxiu font NowClickToTestTheImport=Comproveu els paràmetres d'importació establerts. Si està d'acord, feu clic al botó "%s" per executar una simulació d'importació (cap dada serà modificat, iinicialmente només serà una simulació)... RunSimulateImportFile=Executar la simulació d'importació -FieldNeedSource=Aquest camp requereix obligatòriament una font de dades +FieldNeedSource=This field requires data from the source file SomeMandatoryFieldHaveNoSource=Alguns camps obligatoris no tenen camp font a l'arxiu d'origen InformationOnSourceFile=Informació de l'arxiu origen InformationOnTargetTables=Informació sobre els camps de destinació @@ -102,14 +102,14 @@ NbOfLinesImported=Nombre de línies correctament importades: %s. DataComeFromNoWhere=El valor a inserir no correspon a cap camp de l'arxiu origen. DataComeFromFileFieldNb=El valor a inserir es correspon al camp nombre <%s de l'arxiu origen. DataComeFromIdFoundFromRef=El valor donat per el camp %s de l'arxiu origen serà utilitzat per trobar el ID de l'objecte pare a fer servir (l'objecte %s amb la referència de l'arxiu origen ha d'existir a Dolibarr). -# DataComeFromIdFoundFromCodeId=Code that comes from field number %s of source file will be used to find id of parent object to use (So the code from source file must exists into dictionary %s). Note that if you know id, you can also use it into source file instead of code. Import should work in both cases. +DataComeFromIdFoundFromCodeId=Code that comes from field number %s of source file will be used to find id of parent object to use (So the code from source file must exists into dictionary %s). Note that if you know id, you can also use it into source file instead of code. Import should work in both cases. DataIsInsertedInto=Les dades de l'arxiu d'origen s'inseriran en el següent camp: DataIDSourceIsInsertedInto=L'ID de l'objecte pare trobat a partir de la dada origen, s'inserirà en el següent camp: DataCodeIDSourceIsInsertedInto=L'id de la línia pare trobada a partir del codi, s'ha d'inserir en el següent camp: SourceRequired=Dades d'origen obligatòries SourceExample=Exemple de dades d'origen possibles ExampleAnyRefFoundIntoElement=Totes les referències trobades per als elements %s -# ExampleAnyCodeOrIdFoundIntoDictionary=Any code (or id) found into dictionary %s +ExampleAnyCodeOrIdFoundIntoDictionary=Any code (or id) found into dictionary %s CSVFormatDesc=Arxiu amb format Valors separats per coma (.csv).
    És un fitxer amb format de text en què els camps són separats pel caràcter [ %s ]. Si el separador es troba en el contingut d'un camp, el camp ha d'estar tancat per el caràcter [ %s ]. El caràcter d'escapament per a incloure un caràcter d'entorn en una dada és [ %s ]. Excel95FormatDesc=Arxiu amb format Excel (.xls)
    Aquest és el format natiu d'Excel 95 (BIFF5). Excel2007FormatDesc=Arxiu amb format Excel (.xlsx)
    Aquest és el format natiu d'Excel 2007 (SpreadsheetML). @@ -123,10 +123,10 @@ BankCode=Codi banc DeskCode=Codi oficina BankAccountNumber=Número compte BankAccountNumberKey=Dígit Control -# SpecialCode=Special code -# ExportStringFilter=%% allows replacing one or more characters in the text -# ExportDateFilter='YYYY' 'YYYYMM' 'YYYYMMDD': filters by one year/month/day
    'YYYY+YYYY' 'YYYYMM+YYYYMM' 'YYYYMMDD+YYYYMMDD': filters over a range of years/months/days
    '>YYYY' '>YYYYMM' '>YYYYMMDD': filters on the following years/months/days
    '<YYYY' '<YYYYMM' '<YYYYMMDD': filters on the previous years/months/days -# ExportNumericFilter='NNNNN' filters by one value
    'NNNNN+NNNNN' filters over a range of values
    '>NNNNN' filters by lower values
    '>NNNNN' filters by higher values +SpecialCode=Special code +ExportStringFilter=%% allows replacing one or more characters in the text +ExportDateFilter='YYYY' 'YYYYMM' 'YYYYMMDD': filters by one year/month/day
    'YYYY+YYYY' 'YYYYMM+YYYYMM' 'YYYYMMDD+YYYYMMDD': filters over a range of years/months/days
    '>YYYY' '>YYYYMM' '>YYYYMMDD': filters on the following years/months/days
    '<YYYY' '<YYYYMM' '<YYYYMMDD': filters on the previous years/months/days +ExportNumericFilter='NNNNN' filters by one value
    'NNNNN+NNNNN' filters over a range of values
    '>NNNNN' filters by lower values
    '>NNNNN' filters by higher values ## filters SelectFilterFields=Si vol aplicar un filtre sobre alguns valors, introduïu-los aquí. FilterableFields=Camps filtrables diff --git a/htdocs/langs/ca_ES/holiday.lang b/htdocs/langs/ca_ES/holiday.lang index f587b63bfb2..e4877b093e9 100644 --- a/htdocs/langs/ca_ES/holiday.lang +++ b/htdocs/langs/ca_ES/holiday.lang @@ -8,7 +8,6 @@ NotActiveModCP=Heu d'activar el mòdul Vacacions per veure aquesta pàgina. NotConfigModCP=Heu de configurar el mòdul Vacacions per veure aquesta pàgina. per configurar, feu clic aquí. NoCPforUser=No té peticions de vacances. AddCP=Crear petició de vacances -CPErrorSQL=S'ha produït un error de SQL: Employe=Empleat DateDebCP=Data inici DateFinCP=Data fi diff --git a/htdocs/langs/ca_ES/languages.lang b/htdocs/langs/ca_ES/languages.lang index 1b248564dc1..9f7fb26d1de 100644 --- a/htdocs/langs/ca_ES/languages.lang +++ b/htdocs/langs/ca_ES/languages.lang @@ -19,6 +19,7 @@ Language_en_SA=Anglès (Aràbia Saudita) Language_en_US=Anglès (Estats Units) Language_en_ZA=Anglès (Àfrica del Sud) Language_es_ES=Espanyol +Language_es_DO=Spanish (Dominican Republic) Language_es_AR=Espanyol (Argentina) Language_es_CL=Spanish (Chile) Language_es_HN=Espanyol (Honduras) @@ -38,6 +39,7 @@ Language_fr_NC=Francès (Nova Caledònia) Language_he_IL=Hebreu Language_hr_HR=Croat Language_hu_HU=Hongarès +Language_id_ID=Indonesian Language_is_IS=Islandès Language_it_IT=Italià Language_ja_JP=Japonès diff --git a/htdocs/langs/ca_ES/mails.lang b/htdocs/langs/ca_ES/mails.lang index c4eaf338102..04b854775b4 100644 --- a/htdocs/langs/ca_ES/mails.lang +++ b/htdocs/langs/ca_ES/mails.lang @@ -79,6 +79,7 @@ MailtoEMail=mailto email (hyperlink) ActivateCheckRead=Activar confirmació de lectura i opció de Desubscripció ActivateCheckReadKey=Clau usada per xifrar la URL de la confirmació de lectura i la funció de desubscripció EMailSentToNRecipients=E-Mail enviat a %s destinataris. +XTargetsAdded=%s recipients added into target list EachInvoiceWillBeAttachedToEmail=A document using default invoice document template will be created and attached to each email. MailTopicSendRemindUnpaidInvoices=Reminder of invoice %s (%s) SendRemind=Send reminder by EMails diff --git a/htdocs/langs/ca_ES/main.lang b/htdocs/langs/ca_ES/main.lang index b9db13aefe8..76009567b10 100644 --- a/htdocs/langs/ca_ES/main.lang +++ b/htdocs/langs/ca_ES/main.lang @@ -551,6 +551,7 @@ MailSentBy=Mail enviat per TextUsedInTheMessageBody=Text utilitzat en el cos del missatge SendAcknowledgementByMail=Enviament rec. per e-mail NoEMail=Sense e-mail +NoMobilePhone=No mobile phone Owner=Propietari DetectedVersion=Versió detectada FollowingConstantsWillBeSubstituted=Les següents constants seran substituïdes pel seu valor corresponent. diff --git a/htdocs/langs/ca_ES/products.lang b/htdocs/langs/ca_ES/products.lang index bbb3c300996..6bae8d69b20 100644 --- a/htdocs/langs/ca_ES/products.lang +++ b/htdocs/langs/ca_ES/products.lang @@ -28,8 +28,10 @@ ProductsAndServicesStatistics=Estadístiques productes i serveis ProductsStatistics=Estadístiques productes ProductsOnSell=Productes en venda o compra ProductsNotOnSell=Productes fora de venda y compra +ProductsOnSellAndOnBuy=Products not for sale nor purchase ServicesOnSell=Serveis en venda o compra ServicesNotOnSell=Serveis fora de venda y compra +ServicesOnSellAndOnBuy=Services not for sale nor purchase InternalRef=Referència interna LastRecorded=Ultims productes/serveis en venda registrats LastRecordedProductsAndServices=Els %s darrers productes/serveis registrats @@ -70,6 +72,8 @@ PublicPrice=Preu públic CurrentPrice=Preu actual NewPrice=Nou preu MinPrice=Preu de venda min. +MinPriceHT=Minim. selling price (net of tax) +MinPriceTTC=Minim. selling price (inc. tax) CantBeLessThanMinPrice=El preu de venda no ha de ser inferior al mínim per a aquest producte (%s sense IVA). Aquest missatge pot estar causat per un descompte molt gran. ContractStatus=Estat de contracte ContractStatusClosed=Tancat @@ -179,6 +183,7 @@ ProductIsUsed=Aquest producte és utilitzat NewRefForClone=Ref. del nou producte/servei CustomerPrices=Preus clients SuppliersPrices=Preus proveïdors +SuppliersPricesOfProductsOrServices=Suppliers prices (of products or services) CustomCode=Codi duaner CountryOrigin=País d'origen HiddenIntoCombo=Ocult en les llistes @@ -208,6 +213,7 @@ CostPmpHT=Cost de compra ProductUsedForBuild=Auto consumit per producció ProductBuilded=Producció completada ProductsMultiPrice=Producte multi-preu +ProductsOrServiceMultiPrice=Customers prices (of products or services, multi-prices) ProductSellByQuarterHT=Products turnover quarterly VWAP ServiceSellByQuarterHT=Services turnover quarterly VWAP Quarter1=1st. Quarter diff --git a/htdocs/langs/ca_ES/shop.lang b/htdocs/langs/ca_ES/shop.lang index ce3588f1de6..31969b6b2ce 100644 --- a/htdocs/langs/ca_ES/shop.lang +++ b/htdocs/langs/ca_ES/shop.lang @@ -1,4 +1,5 @@ # Dolibarr language file - Source file is en_US - shop +FailedConnectDBCheckModuleSetup=Failed to connect to oscommerce database. Check your module setup Shop=Tenda ShopWeb=Tenda web LastOrders=Ultimes comandes diff --git a/htdocs/langs/ca_ES/stocks.lang b/htdocs/langs/ca_ES/stocks.lang index cfe7b0c4bf7..5433c9f1f38 100644 --- a/htdocs/langs/ca_ES/stocks.lang +++ b/htdocs/langs/ca_ES/stocks.lang @@ -112,6 +112,7 @@ ReplenishmentOrdersDesc=This is list of all opened supplier orders Replenishments=Replenishments NbOfProductBeforePeriod=Quantity of product %s in stock before selected period (< %s) NbOfProductAfterPeriod=Quantity of product %s in stock after selected period (> %s) +MassMovement=Mass movement MassStockMovement=Mass stock movement SelectProductInAndOutWareHouse=Select a product, a quantity, a source warehouse and a target warehouse, then click "%s". Once this is done for all required movements, click onto "%s". RecordMovement=Record transfert diff --git a/htdocs/langs/cs_CZ/admin.lang b/htdocs/langs/cs_CZ/admin.lang index 970b77e1904..796e689f3dd 100644 --- a/htdocs/langs/cs_CZ/admin.lang +++ b/htdocs/langs/cs_CZ/admin.lang @@ -116,7 +116,7 @@ LanguageBrowserParameter=Parametr %s LocalisationDolibarrParameters=Lokalizační parametry ClientTZ=Časové pásmo klienta (uživatele) ClientHour=Klientův čas (uživatelův) -OSTZ=Časové pásmo OS serveru +OSTZ=Server OS Time Zone PHPTZ=Časové pásmo PHP serveru PHPServerOffsetWithGreenwich=Vyrovnání PHP serveru se šířkou Greenwich (v sekundách) ClientOffsetWithGreenwich=Vyrovnání prohlížeče se šířkou Greenwich (v sekundách) @@ -233,7 +233,9 @@ OfficialWebSiteFr=Oficiální francouzské internetové stránky OfficialWiki=Dolibarr dokumentace na Wiki OfficialDemo=Dolibarr on-line demo OfficialMarketPlace=Oficiální trh pro externí moduly / addons -OfficialWebHostingService=Oficiální web hostingové služby (Cloud hosting) +OfficialWebHostingService=Referenced web hosting services (Cloud hosting) +ReferencedPreferredPartners=Preferred Partners +OtherResources=Autres ressources ForDocumentationSeeWiki=Pro uživatelskou nebo vývojářskou dokumentaci (Doc, FAQs ...)
    navštivte Dolibarr Wiki:
    %s ForAnswersSeeForum=V případě jakýchkoliv dalších dotazů nebo nápovědy použijte fórum Dolibarr:
    %s HelpCenterDesc1=Tato oblast slouží k získání nápovědy a podpory systému Dolibarr. @@ -369,9 +371,9 @@ ExtrafieldSelectList = Vyberte z tabulky ExtrafieldSeparator=Oddělovač ExtrafieldCheckBox=Zaškrtávací políčko ExtrafieldRadio=Přepínač -ExtrafieldParamHelpselect=Seznam parametrů musí být jako klíčový, hodnota

    např:
    1 hodnota1
    2, hodnota2
    3 value3
    ...

    Aby bylo možné mít seznam v závislosti na druhého:
    1 hodnota1 | parent_list_code: parent_key
    2, hodnota2 | parent_list_code: parent_key -ExtrafieldParamHelpcheckbox=Seznam parametrů musí být jako klíčový, hodnota

    např:
    1 hodnota1
    2, hodnota2
    3 value3
    ... -ExtrafieldParamHelpradio=Seznam parametrů musí být jako klíčový, hodnota

    např:
    1 hodnota1
    2, hodnota2
    3 value3
    ... +ExtrafieldParamHelpselect=Parameters list have to be like key,value

    for example :
    1,value1
    2,value2
    3,value3
    ...

    In order to have the list depending on another :
    1,value1|parent_list_code:parent_key
    2,value2|parent_list_code:parent_key +ExtrafieldParamHelpcheckbox=Parameters list have to be like key,value

    for example :
    1,value1
    2,value2
    3,value3
    ... +ExtrafieldParamHelpradio=Parameters list have to be like key,value

    for example :
    1,value1
    2,value2
    3,value3
    ... ExtrafieldParamHelpsellist=Parameters list comes from a table
    Syntax : table_name:label_field:id_field::filter
    Example : c_typent:libelle:id::filter

    filter can be a simple test (eg active=1) to display only active value
    if you want to filter on extrafields use syntaxt extra.fieldcode=... (where field code is the code of extrafield)

    In order to have the list depending on another :
    c_typent:libelle:id:parent_list_code|parent_column:filter LibraryToBuildPDF=Knihovna použít k vytvoření PDF WarningUsingFPDF=Upozornění: Váš conf.php obsahuje direktivu dolibarr_pdf_force_fpdf = 1. To znamená, že můžete používat knihovnu FPDF pro generování PDF souborů. Tato knihovna je stará a nepodporuje mnoho funkcí (Unicode, obraz transparentnost, azbuka, arabské a asijské jazyky, ...), takže může dojít k chybám při generování PDF.
    Chcete-li vyřešit tento a mají plnou podporu generování PDF, stáhněte si TCPDF knihovny , pak komentář nebo odebrat řádek $ dolibarr_pdf_force_fpdf = 1, a místo něj doplnit $ dolibarr_lib_TCPDF_PATH = 'path_to_TCPDF_dir " @@ -472,7 +474,7 @@ Module410Desc=WebCalendar integrace Module500Name=Zvláštní náklady (daně, sociální příspěvky a dividendy) Module500Desc=Management of special expenses like taxes, social contribution, dividends and salaries Module510Name=Salaries -Module510Desc=Management of empoyees salaries and payments +Module510Desc=Management of employees salaries and payments Module600Name=Upozornění Module600Desc=Zasílat upozornění e-mailem na některých firemních akcí Dolibarr třetích stran kontakty Module700Name=Dary @@ -495,15 +497,15 @@ Module2400Name=Pořad jednání Module2400Desc=Události / úkoly a agendy vedení Module2500Name=Elektronický Redakční Module2500Desc=Uložit a sdílet dokumenty -Module2600Name= WebServices -Module2600Desc= Povolit Dolibarr webových služeb serveru -Module2700Name= Gravatar -Module2700Desc= Pomocí on-line služby (Gravatar www.gravatar.com) ukázat fotku uživatelů / členů (nalezen s jejich e-maily). Potřebujete přístup k internetu +Module2600Name=WebServices +Module2600Desc=Povolit Dolibarr webových služeb serveru +Module2700Name=Gravatar +Module2700Desc=Pomocí on-line služby (Gravatar www.gravatar.com) ukázat fotku uživatelů / členů (nalezen s jejich e-maily). Potřebujete přístup k internetu Module2800Desc=FTP klient -Module2900Name= GeoIPMaxmind -Module2900Desc= GeoIP Maxmind konverze možnosti -Module3100Name= Skype -Module3100Desc= Add a Skype button into card of adherents / third parties / contacts +Module2900Name=GeoIPMaxmind +Module2900Desc=GeoIP Maxmind konverze možnosti +Module3100Name=Skype +Module3100Desc=Add a Skype button into card of adherents / third parties / contacts Module5000Name=Multi-společnost Module5000Desc=Umožňuje spravovat více společností Module6000Name=Workflow @@ -681,6 +683,10 @@ Permission401=Přečtěte slevy Permission402=Vytvořit / upravit slevy Permission403=Ověřit slevy Permission404=Odstranit slevy +Permission510=Read Salaries +Permission512=Create/modify salaries +Permission514=Delete salaries +Permission517=Export salaries Permission531=Přečtěte služby Permission532=Vytvořit / upravit služby Permission534=Odstranit služby @@ -999,7 +1005,7 @@ ExtraFieldsSupplierOrders=Doplňkové atributy (objednávky) ExtraFieldsSupplierInvoices=Doplňkové atributy (faktury) ExtraFieldsProject=Doplňkové atributy (projekty) ExtraFieldsProjectTask=Doplňkové atributy (úkoly) -ExtraFieldHasWrongValue=Plynoucích %s má nesprávnou hodnotu. +ExtraFieldHasWrongValue=Attribute %s has a wrong value. AlphaNumOnlyCharsAndNoSpace=pouze alphanumericals znaky bez mezer AlphaNumOnlyLowerCharsAndNoSpace=only alphanumericals and lower case characters without space SendingMailSetup=Nastavení sendings e-mailem @@ -1018,13 +1024,13 @@ SuhosinSessionEncrypt=Úložiště relace šifrována Suhosin ConditionIsCurrently=Podmínkou je v současné době %s TestNotPossibleWithCurrentBrowsers=Automatická detekce není možné YouUseBestDriver=Pomocí ovladače %s, že je nejlepší řidič současné době k dispozici. -YouDoNotUseBestDriver=Pomocí pohonu %s ale řidič %s je doporučeno. +YouDoNotUseBestDriver=You use drive %s but driver %s is recommended. NbOfProductIsLowerThanNoPb=Máte jen %s produktů / služeb do databáze. To však není nutné žádné zvláštní optimalizace. SearchOptim=Optimalizace pro vyhledávače YouHaveXProductUseSearchOptim=Máte %s produkt do databáze. Měli byste přidat konstantní PRODUCT_DONOTSEARCH_ANYWHERE do 1 do Home-Nastavení-Ostatní, můžete omezit vyhledávání na začátku řetězce, která umožňují pro databáze používat index, a vy byste měli dostat okamžitou odpověď. BrowserIsOK=Používáte %s webovém prohlížeči. Tento prohlížeč je v pořádku pro bezpečnost a výkon. BrowserIsKO=Používáte %s webovém prohlížeči. Tento prohlížeč je známo, že špatná volba pro bezpečnost, výkon a spolehlivost. Jsme Doporučuji vám používat Firefox, Chrome, Operu nebo Safari. -XDebugInstalled=Xdebug est poplatek. +XDebugInstalled=XDebug is loaded. XCacheInstalled=XCache načten. AddRefInList=Displej zákazníka / dodavatele ref do seznamu (vyberte seznam nebo ComboBox) a většina z hypertextového odkazu FieldEdition=Edition of field %s @@ -1073,7 +1079,7 @@ WebCalServer=Server hosting kalendář databáze WebCalDatabaseName=Název databáze WebCalUser=Uživatel přístup k databázi WebCalSetupSaved=WebCalendar nastavení bylo úspěšně uloženo. -WebCalTestOk=Připojení k serveru "%s" na databázi "%s" s úspěšní uživatel "%s. +WebCalTestOk=Connection to server '%s' on database '%s' with user '%s' successful. WebCalTestKo1=Připojení k "%s" serveru úspěšná, ale databáze "%s" by nebylo možno dosáhnout. WebCalTestKo2=Připojení k serveru "%s" s uživatelem "%s 'se nezdařilo. WebCalErrorConnectOkButWrongDatabase=Připojení úspěšné, ale databáze nevypadá být WebCalendar databáze. @@ -1119,7 +1125,7 @@ WatermarkOnDraftProposal=Vodoznak na předloh návrhů komerčních (none-li pr OrdersSetup=Objednat řízení nastavení OrdersNumberingModules=Objednávky číslování modelů OrdersModelModule=Objednat dokumenty modely -HideTreadedOrders=Skrýt ošetřené nebo zrušení objednávky v seznamu +HideTreadedOrders=Hide the treated or cancelled orders in the list ValidOrderAfterPropalClosed=Pro potvrzení objednávky po návrhu užší, umožňuje, aby krok za prozatímní pořadí FreeLegalTextOnOrders=Volný text o objednávkách WatermarkOnDraftOrders=Vodoznak na konceptech objednávek (pokud žádný prázdný) @@ -1214,9 +1220,9 @@ LDAPSynchroKO=Nepodařilo synchronizace testu LDAPSynchroKOMayBePermissions=Nepodařilo synchronizace test. Zkontrolujte, zda je přípojka na server je správně nakonfigurován a umožňuje LDAP udpates LDAPTCPConnectOK=TCP připojení k LDAP serveru (Server úspěšných = %s, %s port =) LDAPTCPConnectKO=TCP připojení k LDAP serveru selhalo (Server = %s, Port = %s) -LDAPBindOK=Připojit / Authentificate k LDAP serveru (Server sucessfull = %s, Port = %s, Admin = %s, Password = %s) +LDAPBindOK=Connect/Authentificate to LDAP server successful (Server=%s, Port=%s, Admin=%s, Password=%s) LDAPBindKO=Připojit / Authentificate k LDAP serveru selhalo (Server = %s, Port = %s, Admin = %s, Password = %s) -LDAPUnbindSuccessfull=Odpojte úspěšné +LDAPUnbindSuccessfull=Disconnect successful LDAPUnbindFailed=Odpojení se nezdařilo LDAPConnectToDNSuccessfull=Připojení k DN (%s) úspěšná LDAPConnectToDNFailed=Připojení k DN (%s) se nezdařila @@ -1273,7 +1279,7 @@ LDAPFieldSidExample=Příklad: objectSID LDAPFieldEndLastSubscription=Datum ukončení předplatného LDAPFieldTitle=Post / Funkce LDAPFieldTitleExample=Příklad: title -LDAPParametersAreStillHardCoded=LDAP parametry jsou stále napevno (v kontaktu třídě) +LDAPParametersAreStillHardCoded=LDAP parameters are still hardcoded (in contact class) LDAPSetupNotComplete=Nastavení LDAP není úplná (přejděte na záložku Ostatní) LDAPNoUserOrPasswordProvidedAccessIsReadOnly=Žádný správce nebo heslo k dispozici. LDAP přístup budou anonymní a pouze pro čtení. LDAPDescContact=Tato stránka umožňuje definovat atributy LDAP název stromu LDAP pro každý údajům o kontaktech Dolibarr. @@ -1429,7 +1435,7 @@ OptionVATDefault=Standardní OptionVATDebitOption=Volitelné služby na inkaso OptionVatDefaultDesc=DPH je splatná:
    - Na dobírku za zboží (používáme data vystavení faktury)
    - Plateb za služby OptionVatDebitOptionDesc=DPH je splatná:
    - Na dobírku za zboží (používáme data vystavení faktury)
    - Na fakturu (debetní) na služby -SummaryOfVatExigibilityUsedByDefault=Čas DPH exigibility standardně Podle požadovaného možností: +SummaryOfVatExigibilityUsedByDefault=Time of VAT exigibility by default according to chosen option: OnDelivery=Na dobírku OnPayment=Na zaplacení OnInvoice=Na faktuře @@ -1446,7 +1452,7 @@ AccountancyCodeBuy=Nákup účet. kód AgendaSetup=Akce a agenda Nastavení modulu PasswordTogetVCalExport=Klíč povolit export odkaz PastDelayVCalExport=Neexportovat události starší než -AGENDA_USE_EVENT_TYPE=Use events types (managed into menu Setup -> Dictionnary -> Type of agenda events) +AGENDA_USE_EVENT_TYPE=Use events types (managed into menu Setup -> Dictionary -> Type of agenda events) ##### ClickToDial ##### ClickToDialDesc=Tento modul umožňuje přidat ikonu po telefonních čísel. Klepnutím na tuto ikonu bude volat server s konkrétní URL, kterou definujete níže. To lze použít k volání call centra systému z Dolibarr které mohou volat na telefonní číslo SIP systému pro příklad. ##### Point Of Sales (CashDesk) ##### diff --git a/htdocs/langs/cs_CZ/companies.lang b/htdocs/langs/cs_CZ/companies.lang index 6712655bf1c..372cab25b49 100644 --- a/htdocs/langs/cs_CZ/companies.lang +++ b/htdocs/langs/cs_CZ/companies.lang @@ -1,88 +1,89 @@ # Dolibarr language file - Source file is en_US - companies -ErrorCompanyNameAlreadyExists=Název společnosti %s již existuje. Vyberte si jinou. -ErrorPrefixAlreadyExists=Prefix %s již existuje. Vyberte si jinou. -ErrorSetACountryFirst=Nastavení země první +ErrorCompanyNameAlreadyExists=Společnost %s již existuje. Zadejte jiný název. +ErrorPrefixAlreadyExists=Prefix %s již existuje. Zadejte jiný. +ErrorSetACountryFirst=Nejprve vyberte zemi. SelectThirdParty=Vyberte třetí stranu -DeleteThirdParty=Odstranění třetí stranu -ConfirmDeleteCompany=Jste si jisti, že chcete odstranit tuto společnost a všichni zdědili informace? -DeleteContact=Odstranění kontaktu / adresa -ConfirmDeleteContact=Jste si jisti, že chcete smazat tento kontakt a všechny dědičné informace? -MenuNewThirdParty=Nový třetí stranou +DeleteThirdParty=Smazat třetí stranu +ConfirmDeleteCompany=Opravdu chcete smazat tuto společnost a všechny její informace? +DeleteContact=Smazat kontakt/adresu +ConfirmDeleteContact=Opravdu chcete smazat tento kontakt a všechny jeho informace? +MenuNewThirdParty=Nová třetí strana MenuNewCompany=Nová společnost MenuNewCustomer=Nový zákazník -MenuNewProspect=Nová Vyhlídka +MenuNewProspect=Nový cíl MenuNewSupplier=Nový dodavatel MenuNewPrivateIndividual=Nová soukromá osoba MenuSocGroup=Skupiny -NewCompany=Nová společnost (vyhlídka, zákazník, dodavatel) -NewThirdParty=Nový třetí strana (vyhlídka, zákazník, dodavatel) +NewCompany=Nová společnost (cíl. zákazník, dodavatel) +NewThirdParty=Nová třetí strana (cíl, zákazník, dodavatel) NewSocGroup=Nová skupina společností -NewPrivateIndividual=Nová soukromá osoba (vyhlídka, zákazník, dodavatel) -ProspectionArea=Prospekce plochy +NewPrivateIndividual=Nová soukromá osoba (cíl, zákazník, dodavatel) +CreateDolibarrThirdPartySupplier=Vytvořit třetí stranu (dodavatele) +ProspectionArea=Oblast cílových kontaktů SocGroup=Skupina společností -IdThirdParty=Id třetí stranou -IdCompany=IČ -IdContact=Contact ID -Contacts=Kontakty / adresy -ThirdPartyContacts=Třetích stran kontakty -ThirdPartyContact=Třetí stranou kontakt / adresa -StatusContactValidated=Stav kontaktu / adresa +IdThirdParty=ID třetí strany +IdCompany=ID společnosti +IdContact=ID kontaktu +Contacts=Kontakty/adresy +ThirdPartyContacts=Kontakty třetí strany +ThirdPartyContact=Kontakty/adresy třetí strany +StatusContactValidated=Stav kontaktu/adresy Company=Společnost CompanyName=Název společnosti -Companies=Firmy +Companies=Společnosti CountryIsInEEC=Země je uvnitř Evropského hospodářského společenství -ThirdPartyName=Třetí strana název -ThirdParty=Třetí stranou +ThirdPartyName=Název třetí strany +ThirdParty=Třetí strana ThirdParties=Třetí strany -ThirdPartyAll=Třetí strany (vše) -ThirdPartyProspects=Vyhlídky -ThirdPartyProspectsStats=Vyhlídky +ThirdPartyAll=Třetí strany (všechny) +ThirdPartyProspects=Cíle +ThirdPartyProspectsStats=Cíle ThirdPartyCustomers=Zákazníci ThirdPartyCustomersStats=Zákazníci ThirdPartyCustomersWithIdProf12=Zákazníci s %s nebo %s ThirdPartySuppliers=Dodavatelé -ThirdPartyType=Třetí typ vyhledávající večírky +ThirdPartyType=Typ třetí strany Company/Fundation=Společnosti / Nadace Individual=Soukromá osoba ToCreateContactWithSameName=Automaticky vytvoří fyzický kontakt s stejnými informacemi ParentCompany=Mateřská společnost -Subsidiary=Vedlejší +Subsidiary=Dceřiná Subsidiaries=Dceřiné společnosti -NoSubsidiary=Ne dceřinou -ReportByCustomers=Zpráva o zákazníky -ReportByQuarter=Zpráva sazby -CivilityCode=Zdvořilost kód +NoSubsidiary=Žádná dceřiná +ReportByCustomers=Reporty dle zákazníků +ReportByQuarter=Reporty dle sazby +CivilityCode=Etický kodex RegisteredOffice=Sídlo společnosti Name=Název Lastname=Příjmení Firstname=Křestní jméno PostOrFunction=Post / Funkce -UserTitle=Název +UserTitle=Titul Surname=Příjmení / Pseudo Address=Adresa State=Stát / Provincie Region=Kraj Country=Země CountryCode=Kód země -CountryId=Země id +CountryId=ID země Phone=Telefon -# Skype=Skype -# Call=Call -# Chat=Chat -PhonePro=Prof telefon -PhonePerso=Os. telefon -PhoneMobile=Mobilní -No_Email=Neposílejte e-hmotnost poštovní zásilky +Skype=Skype +Call=Hovor +Chat=Chat +PhonePro=Telefon [práce] +PhonePerso=Telefon [osob.] +PhoneMobile=Mobil +No_Email=Nezasílat hromadné e-maily Fax=Fax -Zip=Poštovní směrovací číslo +Zip=PSČ Town=Město Web=Web Poste= Pozice DefaultLang=Výchozí jazyk -VATIsUsed=DPH se používá -VATIsNotUsed=DPH se nepoužívá -CopyAddressFromSoc=Vyplňte adresu s thirdparty adresu -# NoEmailDefined=There is no email defined +VATIsUsed=Plátce DPH +VATIsNotUsed=Neplátce DPH +CopyAddressFromSoc=Vyplnit adresu z adresy třetí strany +NoEmailDefined=Nedefinován žádný e-mail ##### Local Taxes ##### LocalTax1IsUsedES= RE se používá LocalTax1IsNotUsedES= RE se nepoužívá @@ -91,10 +92,10 @@ LocalTax2IsNotUsedES= IRPF se nepoužívá LocalTax1ES=RE LocalTax2ES=IRPF ThirdPartyEMail=%s -WrongCustomerCode=Zákaznický kód neplatný -WrongSupplierCode=Dodavatel kód neplatný -CustomerCodeModel=Zákaznický kód modelu -SupplierCodeModel=Dodavatel kód modelu +WrongCustomerCode=Neplatný kód zákazníka +WrongSupplierCode=Neplatný kód dodavatele +CustomerCodeModel=Model kódu zákazníka +SupplierCodeModel=Model kódu dodavatele Gencod=Čárový kód ##### Professional ID ##### ProfId1Short=Prof id 1 @@ -110,7 +111,7 @@ ProfId4=Profesionální ID 4 ProfId5=Profesionální ID 5 ProfId6=Profesionální ID 6 ProfId1AR=Prof Id 1 (CUIT / Cuil) -ProfId2AR=Prof Id 2 (Revenu bestie) +ProfId2AR=Prof Id 2 (Revenu brutes) ProfId3AR=- ProfId4AR=- ProfId5AR=- @@ -121,7 +122,7 @@ ProfId3AU=- ProfId4AU=- ProfId5AU=- ProfId6AU=- -ProfId1BE=Prof Id 1 (Professional číslo) +ProfId1BE=Prof Id 1 (Prof. číslo) ProfId2BE=- ProfId3BE=- ProfId4BE=- @@ -136,16 +137,16 @@ ProfId4BR=CPF ProfId1CH=- ProfId2CH=- ProfId3CH=Prof Id 1 (Federální číslo) -ProfId4CH=Prof Id 2 (obchodní Záznam číslo) +ProfId4CH=Prof Id 2 (Commercial Record number) ProfId5CH=- ProfId6CH=- -ProfId1CL=Prof Id 1 (RUT) +ProfId1CL=Prof Id 1 (R.U.T.) ProfId2CL=- ProfId3CL=- ProfId4CL=- ProfId5CL=- ProfId6CL=- -ProfId1CO=Prof Id 1 (RUT) +ProfId1CO=Prof Id 1 (R.U.T.) ProfId2CO=- ProfId3CO=- ProfId4CO=- @@ -153,20 +154,20 @@ ProfId5CO=- ProfId6CO=- ProfId1DE=Prof Id 1 (USt.-IdNr) ProfId2DE=Prof Id 2 (USt.-Nr) -ProfId3DE=Prof ID 3 (Handelsregister-Nr.) +ProfId3DE=Prof Id 3 (Handelsregister-Nr.) ProfId4DE=- ProfId5DE=- ProfId6DE=- -ProfId1ES=Prof Id 1 (CIF / NIF) +ProfId1ES=Prof Id 1 (CIF/NIF) ProfId2ES=Prof Id 2 (Číslo sociálního pojištění) -ProfId3ES=Prof ID 3 (CNAE) -ProfId4ES=Prof Id 4 (Collegiate číslo) +ProfId3ES=Prof Id 3 (CNAE) +ProfId4ES=Prof Id 4 (Collegiate number) ProfId5ES=- ProfId6ES=- -ProfId1FR=Prof Id 1 (siréna) +ProfId1FR=Prof Id 1 (SIREN) ProfId2FR=Prof Id 2 (SIRET) -ProfId3FR=Prof ID 3 (NAF, starý APE) -ProfId4FR=Prof Id 4 (RCS / RM) +ProfId3FR=Prof Id 3 (NAF, old APE) +ProfId4FR=Prof Id 4 (RCS/RM) ProfId5FR=- ProfId6FR=- ProfId1GB=Registrační číslo @@ -183,226 +184,226 @@ ProfId5HN=- ProfId6HN=- ProfId1IN=Prof Id 1 (TIN) ProfId2IN=Prof Id 2 (PAN) -ProfId3IN=Prof ID 3 (SRVC TAX) +ProfId3IN=Prof Id 3 (SRVC TAX) ProfId4IN=Prof Id 4 ProfId5IN=Prof Id 5 ProfId6IN=- -ProfId1MA=Id prof. 1 (RC) +ProfId1MA=Id prof. 1 (R.C.) ProfId2MA=Id prof. 2 (Patente) -ProfId3MA=Id prof. 3 (IF) -ProfId4MA=Id prof. 4 (CNSS) +ProfId3MA=Id prof. 3 (I.F.) +ProfId4MA=Id prof. 4 (C.N.S.S.) ProfId5MA=- ProfId6MA=- -ProfId1MX=Prof Id 1 (RFC). -ProfId2MX=Prof Id 2 (R.. P. IMSS) -ProfId3MX=Prof ID 3 (Profesional Listina) +ProfId1MX=Prof Id 1 (R.F.C). +ProfId2MX=Prof Id 2 (R..P. IMSS) +ProfId3MX=Prof Id 3 (Profesional Charter) ProfId4MX=- ProfId5MX=- ProfId6MX=- -ProfId1NL=KVK Nummer +ProfId1NL=KVK nummer ProfId2NL=- ProfId3NL=- ProfId4NL=Burgerservicenummer (BSN) ProfId5NL=- ProfId6NL=- ProfId1PT=Prof Id 1 (NIPC) -ProfId2PT=Prof Id 2 (Číslo sociálního pojištění) -ProfId3PT=Prof ID 3 (obchodní Záznam číslo) -ProfId4PT=Prof Id 4 (konzervatoř) +ProfId2PT=Prof Id 2 (Social security number) +ProfId3PT=Prof Id 3 (Commercial Record number) +ProfId4PT=Prof Id 4 (Conservatory) ProfId5PT=- ProfId6PT=- ProfId1SN=RC -ProfId2SN=Ninea +ProfId2SN=NINEA ProfId3SN=- ProfId4SN=- ProfId5SN=- ProfId6SN=- ProfId1TN=Prof Id 1 (RC) -ProfId2TN=Prof Id 2 (fiskální matricule) -ProfId3TN=Prof ID 3 (Douane kód) +ProfId2TN=Prof Id 2 (Fiscal matricule) +ProfId3TN=Prof Id 3 (Douane code) ProfId4TN=Prof Id 4 (BAN) ProfId5TN=- ProfId6TN=- ProfId1RU=Prof Id 1 (OGRN) ProfId2RU=Prof Id 2 (INN) -ProfId3RU=Prof ID 3 (KPP) -ProfId4RU=Prof Id 4 (Okpo) +ProfId3RU=Prof Id 3 (KPP) +ProfId4RU=Prof Id 4 (OKPO) ProfId5RU=- ProfId6RU=- VATIntra=Daňové identifikační číslo VATIntraShort=Daňové identifikační číslo -VATIntraVeryShort=DPH -VATIntraSyntaxIsValid=Syntaxe je platná +VATIntraVeryShort=DIČ +VATIntraSyntaxIsValid=Syntaxe je správná VATIntraValueIsValid=Hodnota je platná -ProspectCustomer=Prospect / zákazník -Prospect=Vyhlídka -CustomerCard=Zákaznická karta +ProspectCustomer=Cíl / Zákazník +Prospect=Cíl +CustomerCard=Karta zákazníka Customer=Zákazník -CustomerDiscount=Zákaznická Sleva -CustomerRelativeDiscount=Relativní zákazník sleva -CustomerAbsoluteDiscount=Absolutní zákazník sleva +CustomerDiscount=Zákaznická sleva +CustomerRelativeDiscount=Relativní zákaznická sleva +CustomerAbsoluteDiscount=Absolutní zákaznická sleva CustomerRelativeDiscountShort=Relativní sleva CustomerAbsoluteDiscountShort=Absolutní sleva CompanyHasRelativeDiscount=Tento zákazník má výchozí slevu %s%% -CompanyHasNoRelativeDiscount=Tento zákazník nemá relativní slevu ve výchozím nastavení -CompanyHasAbsoluteDiscount=Tento zákazník má ještě slevu úvěru nebo zálohy na %s %s -CompanyHasCreditNote=Tento zákazník má stále dobropisy pro %s %s +CompanyHasNoRelativeDiscount=Tento zákazník nemá výchozí relativní slevu +CompanyHasAbsoluteDiscount=Tento zákazník stále má diskontní úvěry nebo zálohy na %s %s +CompanyHasCreditNote=Tento zákazník stále má dobropisy na %s %s CompanyHasNoAbsoluteDiscount=Tento zákazník nemá diskontní úvěr k dispozici -CustomerAbsoluteDiscountAllUsers=Absolutní slevy (udělena všem uživatelům) -CustomerAbsoluteDiscountMy=Absolutní slevy (uděleno sami) +CustomerAbsoluteDiscountAllUsers=Absolutní slevy (povoleny od všech uživatelů) +CustomerAbsoluteDiscountMy=Absolutní slevy (povoleny vámi) DefaultDiscount=Výchozí sleva -AvailableGlobalDiscounts=Absolutní slevy +AvailableGlobalDiscounts=Možné absolutní slevy DiscountNone=Nikdo Supplier=Dodavatel -CompanyList=Společnosti Seznam +CompanyList=Seznam společností AddContact=Přidat kontakt -AddContactAddress=Přidat kontakt / adresa +AddContactAddress=Přidat kontakt / adresu EditContact=Upravit kontakt -EditContactAddress=Upravit kontakt / adresa +EditContactAddress=Upravit kontakt / adresu Contact=Kontakt ContactsAddresses=Kontakty / adresy -NoContactDefinedForThirdParty=Žádný kontakt definovaná pro tuto třetí stranu -NoContactDefined=Žádný kontakt definováno -DefaultContact=Výchozí kontakt / adresa -AddCompany=Přidat firmu +NoContactDefinedForThirdParty=Žádný kontakt není definován této třetí straně +NoContactDefined=Žádný kontakt není definován +DefaultContact=Výchozí kontakty / adresy +AddCompany=Přidat společnost AddThirdParty=Přidat třetí stranu -DeleteACompany=Odstranění společnost +DeleteACompany=Odstranit společnost PersonalInformations=Osobní údaje -AccountancyCode=Účetnictví kód -CustomerCode=Zákaznický kód +AccountancyCode=Účetní kód +CustomerCode=Kód zákazníka SupplierCode=Kód dodavatele -CustomerAccount=Zákaznický účet -SupplierAccount=Dodavatel účet +CustomerAccount=Účet zákazníka +SupplierAccount=Účet dodavatele CustomerCodeDesc=Zákaznický kód, jedinečný pro všechny zákazníky -SupplierCodeDesc=Dodavatel kód, jedinečný pro všechny dodavatele -RequiredIfCustomer=Požadováno, pokud třetí osoba zákazníka nebo perspektiva -RequiredIfSupplier=Požadováno, pokud třetí strana je dodavatelem -ValidityControledByModule=Platnost řízen modulem -ThisIsModuleRules=Jedná se pravidla pro tento modul +SupplierCodeDesc=Dodavatelský kód, jedinečný pro všechny dodavatele +RequiredIfCustomer=Požadováno, pokud třetí strana je zákazník či cíl +RequiredIfSupplier=Požadováno, pokud třetí strana je dodavatel +ValidityControledByModule=Platnost řízena modulem +ThisIsModuleRules=Toto jsou pravidla pro tento modul LastProspect=Poslední -ProspectToContact=Prospect kontaktovat -CompanyDeleted=Společnost "%s" vymazán z databáze. -ListOfContacts=Seznam kontaktů adres / -ListOfContactsAddresses=Seznam kontaktů adres / -ListOfProspectsContacts=Seznam kontaktů vyhlídky -ListOfCustomersContacts=Seznam kontaktů se zákazníky -ListOfSuppliersContacts=Seznam kontaktů dodavatelů +ProspectToContact=Cíl ke kontaktování +CompanyDeleted=Společnost %s odstraněna z databáze. +ListOfContacts=Seznam kontaktů / adres +ListOfContactsAddresses=Seznam kontaktů / adres +ListOfProspectsContacts=Seznam kontaktů cíle +ListOfCustomersContacts=Seznam kontaktů zákazníka +ListOfSuppliersContacts=Seznam kontaktů dodavatele ListOfCompanies=Seznam společností ListOfThirdParties=Seznam třetích stran ShowCompany=Zobrazit společnost ShowContact=Zobrazit kontakt ContactsAllShort=Vše (Bez filtru) -ContactType=Kontaktujte typ -ContactForOrders=Order kontakt -ContactForProposals=Návrh je kontakt -ContactForContracts=Smlouva je kontakt -ContactForInvoices=Faktura je kontakt -NoContactForAnyOrder=Tento kontakt není kontakt na libovolném pořadí -NoContactForAnyProposal=Tento kontakt není kontaktní osobou pro jakékoliv komerční návrhu -NoContactForAnyContract=Tento kontakt není kontakt u každé zakázky -NoContactForAnyInvoice=Tento kontakt není kontakt pro každé faktuře +ContactType=Typ kontaktu +ContactForOrders=Kontakt objednávky +ContactForProposals=Kontakt nabídky +ContactForContracts=Kontakt smlouvy +ContactForInvoices=Kontakt fakturace +NoContactForAnyOrder=Tento kontakt není přiřazen k žádné objednávce +NoContactForAnyProposal=Tento kontakt není přiřazen k žádné obchodní nabídce +NoContactForAnyContract=Tento kontakt není přiřazen k žádné smlouvě +NoContactForAnyInvoice=Tento kontakt není přiřazen k žádné faktuře NewContact=Nový kontakt NewContactAddress=Nový kontakt / adresa LastContacts=Poslední kontakty MyContacts=Moje kontakty Phones=Telefony -Capital=Kapitál +Capital=Hlavní město CapitalOf=Hlavní město %s EditCompany=Upravit společnost EditDeliveryAddress=Upravit dodací adresu -ThisUserIsNot=Tento uživatel není vyhlídka, zákazník ani dodavatel +ThisUserIsNot=Tento uživatel není cíl, zákazník ani dodavatel VATIntraCheck=Kontrola -VATIntraCheckDesc=Odkaz %s umožňuje požádat Evropskou DPH checker služby. Externí přístup k internetu ze serveru je nutné pro tuto službu do práce. +VATIntraCheckDesc=Odkaz %s umožňuje zkontrolovat VAT. Je potřeba přístup k internetu. VATIntraCheckURL=http://ec.europa.eu/taxation_customs/vies/vieshome.do -VATIntraCheckableOnEUSite=Zkontrolujte Intracomunnautary DPH na stránkách Evropské komise -VATIntraManualCheck=Můžete se také podívat ručně z evropských webových stránek %s -ErrorVATCheckMS_UNAVAILABLE=Zkontrolujte, není možné. Zkontrolujte, služba není poskytována členským státem (%s). -NorProspectNorCustomer=Ani vyhlídky, ani zákazník -JuridicalStatus=Právnický stav +VATIntraCheckableOnEUSite=Kontrola VAT na stránkách Evropské Komise +VATIntraManualCheck=Můžete také zkontrolovat ručně na evropských stránkách %s +ErrorVATCheckMS_UNAVAILABLE=Kontrola není možná. Služba není členským státem poskytována (%s). +NorProspectNorCustomer=Ani cíl, ani zákazník +JuridicalStatus=Právní status Staff=Zaměstnanci -ProspectLevelShort=Potenciál -ProspectLevel=Prospect potenciál -ContactPrivate=Soukromý -ContactPublic=Společná +ProspectLevelShort=Potenciální +ProspectLevel=Potenciální cíl +ContactPrivate=Privátní +ContactPublic=Sdílený ContactVisibility=Viditelnost -OthersNotLinkedToThirdParty=Ostatní, které nejsou spojeny s třetí stranou -ProspectStatus=Prospect stav +OthersNotLinkedToThirdParty=Ostatní, nepřipojené k žádné třetí straně +ProspectStatus=Stav cíle PL_NONE=Nikdo PL_UNKNOWN=Neznámý PL_LOW=Nízký PL_MEDIUM=Střední PL_HIGH=Vysoký TE_UNKNOWN=- -TE_STARTUP=Uvedení do provozu -TE_GROUP=Velké firmy -TE_MEDIUM=Střední firma +TE_STARTUP=Startup +TE_GROUP=Velká společnost +TE_MEDIUM=Střední společnost TE_ADMIN=Vládní -TE_SMALL=Malé společnosti +TE_SMALL=Malá společnost TE_RETAIL=Maloobchodník -TE_WHOLE=Wholetailer +TE_WHOLE=Velkoobchod+maloobchod TE_PRIVATE=Soukromá osoba -TE_OTHER=Ostatní -StatusProspect-1=Nedotýkejte se -StatusProspect0=Nikdy nekontaktoval -StatusProspect1=Chcete-li kontaktovat +TE_OTHER=Jiný +StatusProspect-1=Nekontaktovat +StatusProspect0=Nikdy nekontaktován +StatusProspect1=Ke kontaktování StatusProspect2=Kontakt v procesu -StatusProspect3=Spojit se provádí -ChangeDoNotContact=Změnit stav na "Nedotýkejte se" -ChangeNeverContacted=Změnit stav na "nikdy nekontaktoval" -ChangeToContact=Změnit stav na "Chcete-li kontaktovat" -ChangeContactInProcess=Změnit stav na "Kontakt v procesu" -ChangeContactDone=Změnit stav na "Kontaktujte udělat" -ProspectsByStatus=Vyhlídky podle postavení +StatusProspect3=Kontakt proveden +ChangeDoNotContact=Změnit status na 'Nekontaktovat' +ChangeNeverContacted=Změnit status na 'Nikdy nekontaktován' +ChangeToContact=Změnit status na 'Ke kontaktování' +ChangeContactInProcess=Změnit status na 'Kontakt v procesu' +ChangeContactDone=Změnit status na 'Kontakt proveden' +ProspectsByStatus=Cíle dle stavu BillingContact=Fakturační kontakt NbOfAttachedFiles=Počet připojených souborů AttachANewFile=Připojit nový soubor -NoRIB=Žádné definované BAN +NoRIB=Nedefinován žádný BAN NoParentCompany=Nikdo ExportImport=Import-Export -ExportCardToFormat=Export do formátu karty -ContactNotLinkedToCompany=Kontaktu, který není spojen s jakoukoli třetí stranou -DolibarrLogin=Dolibarr přihlášení -NoDolibarrAccess=Žádný přístup Dolibarr -# ExportDataset_company_1=Third parties (Companies/foundations/physical people) and properties +ExportCardToFormat=Exportovat kartu do formátu +ContactNotLinkedToCompany=Kontakt není spojen s žádnou třetí stranou +DolibarrLogin=Dolibarr login +NoDolibarrAccess=Žádný přístup k Dolibarr +ExportDataset_company_1=Třetí strany (Společnosti/nadace/osoby) a vlastnosti ExportDataset_company_2=Kontakty a vlastnosti -# ImportDataset_company_1=Third parties (Companies/foundations/physical people) and properties -# ImportDataset_company_2=Contacts/Addresses (of thirdparties or not) and attributes -ImportDataset_company_3=Bankovní spojení +ImportDataset_company_1=Třetí strany (Společnosti/nadace/osoby) a vlastnosti +ImportDataset_company_2=Kontakty/Adresy (třetích stran a dalších) a atributy +ImportDataset_company_3=Bankovní detaily PriceLevel=Cenová hladina -DeliveriesAddress=Dodací adresy -DeliveryAddress=Dodací adresa -DeliveryAddressLabel=Dodací adresa štítek -DeleteDeliveryAddress=Odstranění dodací adresu +DeliveriesAddress=Doručovací adresy +DeliveryAddress=Doručovací adresa +DeliveryAddressLabel=Štítek dodací adresy +DeleteDeliveryAddress=Smazat dodací adresu ConfirmDeleteDeliveryAddress=Jste si jisti, že chcete smazat tuto dodací adresu? -NewDeliveryAddress=Nová adresa pro doručování +NewDeliveryAddress=Nová doručovací adresa AddDeliveryAddress=Přidat adresu AddAddress=Přidat adresu -NoOtherDeliveryAddress=Žádné náhradní doručení definována adresa -SupplierCategory=Dodavatel kategorie -JuridicalStatus200=Nezávislé +NoOtherDeliveryAddress=Žádná náhradní doručení adresa +SupplierCategory=Kategorie dodavatele +JuridicalStatus200=Nezávislý DeleteFile=Smazat soubor ConfirmDeleteFile=Jste si jisti, že chcete smazat tento soubor? -AllocateCommercial=Přiřazeno obchodního zástupce -SelectCountry=Zvolte zemi +AllocateCommercial=Přiřazen k obchodnímu zástupci +SelectCountry=Vyberte zemi SelectCompany=Vyberte třetí stranu Organization=Organizace -AutomaticallyGenerated=Automaticky generované -FiscalYearInformation=Informace o fiskální rok +AutomaticallyGenerated=Automaticky generováno +FiscalYearInformation=Informace o fiskálním roce FiscalMonthStart=Počáteční měsíc fiskálního roku -YouMustCreateContactFirst=Musíte vytvořit e-maily, kontakty pro třetí strany první moci přidat e-mailů oznámení. +YouMustCreateContactFirst=Pro přidání e-mailových notifikací musíte přidat e-mailové kontakty k třetí straně ListSuppliersShort=Seznam dodavatelů -ListProspectsShort=Seznam vyhlídky +ListProspectsShort=Seznam cílů ListCustomersShort=Seznam zákazníků -ThirdPartiesArea=Třetí strany plocha -LastModifiedThirdParties=Poslední %s upravené třetí strany +ThirdPartiesArea=Oblast třetích stran +LastModifiedThirdParties=Posledních %s editovaných třetích stran UniqueThirdParties=Celkem unikátních třetích stran InActivity=Otevřeno -ActivityCeased=Zavřeno -ActivityStateFilter=Ekonomické postavení +ActivityCeased=Uzavřeno +ActivityStateFilter=Stav činnosti ProductsIntoElements=Seznam produktů do -# CurrentOutstandingBill=Current outstanding bill -# OutstandingBill=Max. for outstanding bill -# OutstandingBillReached=Reached max. for outstanding bill -MonkeyNumRefModelDesc=Zpět numero ve formátu %syymm-nnnn pro zákazníka kódu a %syymm-NNNN s dodavately kódu, kde yy je rok, MM je měsíc a nnnn je sekvence bez přerušení a bez návratu na 0. +CurrentOutstandingBill=Momentální nezaplacený účet +OutstandingBill=Max. za nezaplacený účet +OutstandingBillReached=Dosaženo max. pro nezaplacený účet +MonkeyNumRefModelDesc=Vrátí číslo ve formátu %syymm-nnnn pro kód zákazníka a %syymm-nnnn pro ód dodavatele kde yy je rok, mm měsíc a nnnn je číselná řada bez přerušení a bez návratu k 0. LeopardNumRefModelDesc=Kód je zdarma. Tento kód lze kdykoli změnit. -# ManagingDirectors=Manager(s) name (CEO, director, president...) +ManagingDirectors=Jméno vedoucího (CEO, ředitel, předseda ...) diff --git a/htdocs/langs/cs_CZ/contracts.lang b/htdocs/langs/cs_CZ/contracts.lang index d20f2987b6d..cacd08de41b 100644 --- a/htdocs/langs/cs_CZ/contracts.lang +++ b/htdocs/langs/cs_CZ/contracts.lang @@ -89,6 +89,8 @@ ListOfServicesToExpireWithDuration=Seznam služeb, které vyprší v %s dnů ListOfServicesToExpireWithDurationNeg=Seznam služeb uplynula od více než %s dnů ListOfServicesToExpire=Seznam služeb vyprší NoteListOfYourExpiredServices=Tento seznam obsahuje pouze služby smluv pro třetí strany si jsou propojeny jako obchodního zástupce. +StandardContractsTemplate=Standard contracts template +ContactNameAndSignature=For %s, name and signature: ##### Types de contacts ##### TypeContact_contrat_internal_SALESREPSIGN=Obchodní zástupce podpisu smlouvy diff --git a/htdocs/langs/cs_CZ/exports.lang b/htdocs/langs/cs_CZ/exports.lang index 2cc2c9012e8..d84d1484178 100644 --- a/htdocs/langs/cs_CZ/exports.lang +++ b/htdocs/langs/cs_CZ/exports.lang @@ -8,7 +8,7 @@ ImportableDatas=Importovatelný dataset SelectExportDataSet=Vyberte datový soubor, který chcete exportovat ... SelectImportDataSet=Vyberte datový soubor, který chcete importovat ... SelectExportFields=Vyberte pole, která chcete exportovat, nebo zvolte předdefinovanou export profil -SelectImportFields=Zvolte pole zdrojových soubor, který chcete importovat a jejich cílové pole v databázi pohybem nahoru a dolů pomocí kotevních %s, nebo zvolte předdefinovanou importu Profil: +SelectImportFields=Choose source file fields you want to import and their target field in database by moving them up and down with anchor %s, or select a predefined import profile: NotImportedFields=Oblasti zdrojovém souboru nejsou dováženy SaveExportModel=Uložit tento export profil, pokud máte v plánu znovu později ... SaveImportModel=Uložit tuto importu profilu, pokud máte v plánu znovu později ... @@ -81,7 +81,7 @@ DoNotImportFirstLine=Neimportujte první řádek zdrojového souboru NbOfSourceLines=Počet řádků ve zdrojovém souboru NowClickToTestTheImport=Kontrola parametrů importu, které jste definovali. Pokud jsou v pořádku, klikněte na tlačítko "%s" spustíte simulaci procesu importu (žádná data se změní v databázi, je to jen simulace pro tuto chvíli) ... RunSimulateImportFile=Spusťte import simulaci -FieldNeedSource=To fiels v databázi vyžadovat jen údaje ze zdrojového souboru +FieldNeedSource=This field requires data from the source file SomeMandatoryFieldHaveNoSource=Některá povinná pole nemají zdroje z datového souboru InformationOnSourceFile=Informace o zdrojovém souboru InformationOnTargetTables=Informace o cílových oblastech, @@ -102,14 +102,14 @@ NbOfLinesImported=Počet řádků úspěšně importovaných: %s. DataComeFromNoWhere=Hodnota vložit pochází z ničeho nic ve zdrojovém souboru. DataComeFromFileFieldNb=Hodnota vložit pochází z %s číslo pole ve zdrojovém souboru. DataComeFromIdFoundFromRef=Hodnota, která pochází z %s číslo pole zdrojový soubor bude použit k nalezení id nadřazený objekt používat (tedy objet %s který má čj. Ze zdrojového souboru musí být do Dolibarr existuje). -# DataComeFromIdFoundFromCodeId=Code that comes from field number %s of source file will be used to find id of parent object to use (So the code from source file must exists into dictionary %s). Note that if you know id, you can also use it into source file instead of code. Import should work in both cases. +DataComeFromIdFoundFromCodeId=Code that comes from field number %s of source file will be used to find id of parent object to use (So the code from source file must exists into dictionary %s). Note that if you know id, you can also use it into source file instead of code. Import should work in both cases. DataIsInsertedInto=Data přicházející ze zdrojového souboru budou vloženy do následujícího pole: DataIDSourceIsInsertedInto=Id z nadřazeného objektu zjištěné na základě údajů ve zdrojovém souboru, se vloží do následujícího pole: DataCodeIDSourceIsInsertedInto=Id mateřské linie nalezli kódu, bude vložen do následujícího políčka: SourceRequired=Hodnota dat je povinné SourceExample=Příklad možné hodnoty údajů ExampleAnyRefFoundIntoElement=Veškeré ref našli prvků %s -# ExampleAnyCodeOrIdFoundIntoDictionary=Any code (or id) found into dictionary %s +ExampleAnyCodeOrIdFoundIntoDictionary=Any code (or id) found into dictionary %s CSVFormatDesc=Hodnoty oddělené čárkami formát souboru (. Csv).
    Jedná se o textový formát souboru, kde jsou pole oddělena oddělovačem [%s]. Pokud oddělovač se nachází uvnitř pole obsahu je pole zaoblené charakteru kola [%s]. Útěk charakter unikat kolem znaku je %s []. Excel95FormatDesc=Excel formát souboru (. Xls)
    Toto je nativní formát aplikace Excel 95 (BIFF5). Excel2007FormatDesc=Excel formát souboru (. Xlsx)
    Toto je nativní formát aplikace Excel 2007 (SpreadsheetML). @@ -123,10 +123,10 @@ BankCode=Kód banky DeskCode=Stůl kód BankAccountNumber=Číslo účtu BankAccountNumberKey=Klíč -# SpecialCode=Special code -# ExportStringFilter=%% allows replacing one or more characters in the text -# ExportDateFilter='YYYY' 'YYYYMM' 'YYYYMMDD': filters by one year/month/day
    'YYYY+YYYY' 'YYYYMM+YYYYMM' 'YYYYMMDD+YYYYMMDD': filters over a range of years/months/days
    '>YYYY' '>YYYYMM' '>YYYYMMDD': filters on the following years/months/days
    '<YYYY' '<YYYYMM' '<YYYYMMDD': filters on the previous years/months/days -# ExportNumericFilter='NNNNN' filters by one value
    'NNNNN+NNNNN' filters over a range of values
    '>NNNNN' filters by lower values
    '>NNNNN' filters by higher values +SpecialCode=Special code +ExportStringFilter=%% allows replacing one or more characters in the text +ExportDateFilter='YYYY' 'YYYYMM' 'YYYYMMDD': filters by one year/month/day
    'YYYY+YYYY' 'YYYYMM+YYYYMM' 'YYYYMMDD+YYYYMMDD': filters over a range of years/months/days
    '>YYYY' '>YYYYMM' '>YYYYMMDD': filters on the following years/months/days
    '<YYYY' '<YYYYMM' '<YYYYMMDD': filters on the previous years/months/days +ExportNumericFilter='NNNNN' filters by one value
    'NNNNN+NNNNN' filters over a range of values
    '>NNNNN' filters by lower values
    '>NNNNN' filters by higher values ## filters SelectFilterFields=Chcete-li filtrovat některé hodnoty, stačí zadat hodnoty zde. FilterableFields=Champs Filtrables diff --git a/htdocs/langs/cs_CZ/holiday.lang b/htdocs/langs/cs_CZ/holiday.lang index 637ea76926b..d7436e783d7 100644 --- a/htdocs/langs/cs_CZ/holiday.lang +++ b/htdocs/langs/cs_CZ/holiday.lang @@ -8,7 +8,6 @@ NotActiveModCP=Musíte umožnit modul svátky zobrazení této stránky. NotConfigModCP=Musíte nakonfigurovat modul dovolenou k zobrazení této stránky. Chcete-li to provést, klikněte sem . NoCPforUser=Nemáte poptávku na dovolenou. AddCP=Použít pro dovolenou -CPErrorSQL=SQL chyba: Employe=Zaměstnanec DateDebCP=Datum zahájení DateFinCP=Datum ukončení diff --git a/htdocs/langs/cs_CZ/languages.lang b/htdocs/langs/cs_CZ/languages.lang index 4d436c7afa0..86f9dbaf0bb 100644 --- a/htdocs/langs/cs_CZ/languages.lang +++ b/htdocs/langs/cs_CZ/languages.lang @@ -19,6 +19,7 @@ Language_en_SA=Angličtina (Saúdská Arábie) Language_en_US=Angličtina (Spojené státy) Language_en_ZA=Angličtina (Jižní Afrika) Language_es_ES=Španělština +Language_es_DO=Spanish (Dominican Republic) Language_es_AR=Španělština (Argentina) Language_es_CL=Spanish (Chile) Language_es_HN=Španělština (Honduras) @@ -38,6 +39,7 @@ Language_fr_NC=Francouzština (Nová Kaledonie) Language_he_IL=Hebrejština Language_hr_HR=Chorvatský Language_hu_HU=Maďarština +Language_id_ID=Indonesian Language_is_IS=Islandský Language_it_IT=Italština Language_ja_JP=Japonec diff --git a/htdocs/langs/cs_CZ/mails.lang b/htdocs/langs/cs_CZ/mails.lang index 3f4eb42ed19..3926e41a3ab 100644 --- a/htdocs/langs/cs_CZ/mails.lang +++ b/htdocs/langs/cs_CZ/mails.lang @@ -79,6 +79,7 @@ MailtoEMail=Hyper odkaz na e-mail ActivateCheckRead=Nechá se použít "" Unsubcribe odkaz ActivateCheckReadKey=Tlačítko slouží pro šifrování URL využití pro "přečtení" a "Unsubcribe" funkce EMailSentToNRecipients=Email byl odeslán na %s příjemcům. +XTargetsAdded=%s recipients added into target list EachInvoiceWillBeAttachedToEmail=A document using default invoice document template will be created and attached to each email. MailTopicSendRemindUnpaidInvoices=Reminder of invoice %s (%s) SendRemind=Send reminder by EMails diff --git a/htdocs/langs/cs_CZ/main.lang b/htdocs/langs/cs_CZ/main.lang index 7a8acc3d98c..07282e61a79 100644 --- a/htdocs/langs/cs_CZ/main.lang +++ b/htdocs/langs/cs_CZ/main.lang @@ -551,6 +551,7 @@ MailSentBy=E-mail zaslána TextUsedInTheMessageBody=E-mail tělo SendAcknowledgementByMail=Poslat Ack. e-mailem NoEMail=Žádný e-mail +NoMobilePhone=No mobile phone Owner=Majitel DetectedVersion=Zjištěná verze FollowingConstantsWillBeSubstituted=Následující konstanty bude nahrazen odpovídající hodnotou. diff --git a/htdocs/langs/cs_CZ/products.lang b/htdocs/langs/cs_CZ/products.lang index aae877e22d5..d904b3cbbb8 100644 --- a/htdocs/langs/cs_CZ/products.lang +++ b/htdocs/langs/cs_CZ/products.lang @@ -28,8 +28,10 @@ ProductsAndServicesStatistics=Produkty a služby statistika ProductsStatistics=Produkty statistiky ProductsOnSell=Dostupné produkty ProductsNotOnSell=Vyřazené produkty +ProductsOnSellAndOnBuy=Products not for sale nor purchase ServicesOnSell=Dostupné služby ServicesNotOnSell=Zastaralé služby +ServicesOnSellAndOnBuy=Services not for sale nor purchase InternalRef=Interní referenční číslo LastRecorded=Nejnovější produkty / služby na prodeji zaznamenán LastRecordedProductsAndServices=Poslední %s zaznamenán produktů / služeb @@ -70,6 +72,8 @@ PublicPrice=Veřejná cena CurrentPrice=Aktuální cena NewPrice=Nová cena MinPrice=Minimální cena +MinPriceHT=Minim. selling price (net of tax) +MinPriceTTC=Minim. selling price (inc. tax) CantBeLessThanMinPrice=Prodejní cena nesmí být nižší než minimální povolená pro tento produkt (%s bez daně). Toto hlášení se může také zobrazí, pokud zadáte příliš důležitou slevu. ContractStatus=Stav smlouvy ContractStatusClosed=Zavřeno @@ -179,6 +183,7 @@ ProductIsUsed=Tento produkt se používá NewRefForClone=Ref. nového produktu / služby CustomerPrices=Prodejní ceny SuppliersPrices=Dodavatelská cena +SuppliersPricesOfProductsOrServices=Suppliers prices (of products or services) CustomCode=Celní kód CountryOrigin=Země původu HiddenIntoCombo=Skryté do vybraných seznamů @@ -208,6 +213,7 @@ CostPmpHT=Čistá hodnota VWAP ProductUsedForBuild=Auto spotřebovány při výrobě ProductBuilded=Výroba dokončena ProductsMultiPrice=Produkt multi-cena +ProductsOrServiceMultiPrice=Customers prices (of products or services, multi-prices) ProductSellByQuarterHT=Produkty obrat čtvrtletní VWAP ServiceSellByQuarterHT=Služby obrat čtvrtletní VWAP Quarter1=První. Čtvrtletí diff --git a/htdocs/langs/cs_CZ/shop.lang b/htdocs/langs/cs_CZ/shop.lang index 07c153a2147..2c7084b4645 100644 --- a/htdocs/langs/cs_CZ/shop.lang +++ b/htdocs/langs/cs_CZ/shop.lang @@ -1,4 +1,5 @@ # Dolibarr language file - Source file is en_US - shop +FailedConnectDBCheckModuleSetup=Failed to connect to oscommerce database. Check your module setup Shop=Obchod ShopWeb=Web Shop LastOrders=Poslední objednávky diff --git a/htdocs/langs/cs_CZ/stocks.lang b/htdocs/langs/cs_CZ/stocks.lang index 948f7bce597..1738cec5f1f 100644 --- a/htdocs/langs/cs_CZ/stocks.lang +++ b/htdocs/langs/cs_CZ/stocks.lang @@ -112,6 +112,7 @@ ReplenishmentOrdersDesc=Toto je seznam všech otevřených dodavatelských objed Replenishments=Splátky NbOfProductBeforePeriod=Množství produktů %s na skladě, než zvolené období (<%s) NbOfProductAfterPeriod=Množství produktů %s na skladě po zvolené období (> %s) +MassMovement=Mass movement MassStockMovement=Mass pohyb zásob SelectProductInAndOutWareHouse=Vyberte produkt, množství, zdrojový sklad a cílový sklad, pak klikněte na "%s". Jakmile se tak stane pro všechny požadované pohyby, klikněte na "%s". RecordMovement=Záznam transfert diff --git a/htdocs/langs/da_DK/admin.lang b/htdocs/langs/da_DK/admin.lang index 8e9e017862a..2803c5f1c6a 100644 --- a/htdocs/langs/da_DK/admin.lang +++ b/htdocs/langs/da_DK/admin.lang @@ -116,7 +116,7 @@ LanguageBrowserParameter=Parameter %s LocalisationDolibarrParameters=Lokalisering parametre ClientTZ=Client Time Zone (user) ClientHour=Client time (user) -OSTZ=Tidszone Server OS +OSTZ=Server OS Time Zone PHPTZ=Tidszone Server PHP PHPServerOffsetWithGreenwich=Offset for PHP server bredde Greenwich (secondes) ClientOffsetWithGreenwich=Client / Browser offset bredde Greenwich (sekunder) @@ -233,7 +233,9 @@ OfficialWebSiteFr=Fransk officielle hjemmeside OfficialWiki=Dolibarr Wiki OfficialDemo=Dolibarr online demo OfficialMarketPlace=Officielle markedsplads for eksterne moduler / addons -OfficialWebHostingService=Official web hosting services (Cloud hosting) +OfficialWebHostingService=Referenced web hosting services (Cloud hosting) +ReferencedPreferredPartners=Preferred Partners +OtherResources=Autres ressources ForDocumentationSeeWiki=For brugerens eller bygherren dokumentation (doc, FAQs ...),
    tage et kig på Dolibarr Wiki:
    %s ForAnswersSeeForum=For alle andre spørgsmål / hjælpe, kan du bruge Dolibarr forum:
    %s HelpCenterDesc1=Dette område kan hjælpe dig med at få et Hjælp støtte tjeneste på Dolibarr. @@ -369,9 +371,9 @@ ExtrafieldSelectList = Select from table ExtrafieldSeparator=Separator ExtrafieldCheckBox=Checkbox ExtrafieldRadio=Radio button -ExtrafieldParamHelpselect=Parameters list have to be like key,value

    for exemple :
    1,value1
    2,value2
    3,value3
    ...

    In order to have the list depending on another :
    1,value1|parent_list_code:parent_key
    2,value2|parent_list_code:parent_key -ExtrafieldParamHelpcheckbox=Parameters list have to be like key,value

    for exemple :
    1,value1
    2,value2
    3,value3
    ... -ExtrafieldParamHelpradio=Parameters list have to be like key,value

    for exemple :
    1,value1
    2,value2
    3,value3
    ... +ExtrafieldParamHelpselect=Parameters list have to be like key,value

    for example :
    1,value1
    2,value2
    3,value3
    ...

    In order to have the list depending on another :
    1,value1|parent_list_code:parent_key
    2,value2|parent_list_code:parent_key +ExtrafieldParamHelpcheckbox=Parameters list have to be like key,value

    for example :
    1,value1
    2,value2
    3,value3
    ... +ExtrafieldParamHelpradio=Parameters list have to be like key,value

    for example :
    1,value1
    2,value2
    3,value3
    ... ExtrafieldParamHelpsellist=Parameters list comes from a table
    Syntax : table_name:label_field:id_field::filter
    Example : c_typent:libelle:id::filter

    filter can be a simple test (eg active=1) to display only active value
    if you want to filter on extrafields use syntaxt extra.fieldcode=... (where field code is the code of extrafield)

    In order to have the list depending on another :
    c_typent:libelle:id:parent_list_code|parent_column:filter LibraryToBuildPDF=Library used to build PDF WarningUsingFPDF=Warning: Your conf.php contains directive dolibarr_pdf_force_fpdf=1. This means you use the FPDF library to generate PDF files. This library is old and does not support a lot of features (Unicode, image transparency, cyrillic, arab and asiatic languages, ...), so you may experience errors during PDF generation.
    To solve this and have a full support of PDF generation, please download TCPDF library, then comment or remove the line $dolibarr_pdf_force_fpdf=1, and add instead $dolibarr_lib_TCPDF_PATH='path_to_TCPDF_dir' @@ -472,7 +474,7 @@ Module410Desc=Webcalendar integration Module500Name=Special expenses (tax, social contributions, dividends) Module500Desc=Management of special expenses like taxes, social contribution, dividends and salaries Module510Name=Salaries -Module510Desc=Management of empoyees salaries and payments +Module510Desc=Management of employees salaries and payments Module600Name=Adviséringer Module600Desc=Send meddelelser (via email) på Dolibarr business-arrangementer Module700Name=Donationer @@ -495,15 +497,15 @@ Module2400Name=Agenda Module2400Desc=Handlinger / opgaver og dagsorden forvaltning Module2500Name=Elektronisk Content Management Module2500Desc=Gemme og dele dokumenter -Module2600Name= WebServices -Module2600Desc= Aktiver Dolibarr webtjenester server -Module2700Name= Gravatar -Module2700Desc= Brug online Gravatar service (www.gravatar.com) for at vise foto af brugere / medlemmer (fundet med deres e-mails). Har brug for en internetadgang +Module2600Name=WebServices +Module2600Desc=Aktiver Dolibarr webtjenester server +Module2700Name=Gravatar +Module2700Desc=Brug online Gravatar service (www.gravatar.com) for at vise foto af brugere / medlemmer (fundet med deres e-mails). Har brug for en internetadgang Module2800Desc=FTP Client -Module2900Name= GeoIPMaxmind -Module2900Desc= GeoIP Maxmind konverteringer kapaciteter -Module3100Name= Skype -Module3100Desc= Add a Skype button into card of adherents / third parties / contacts +Module2900Name=GeoIPMaxmind +Module2900Desc=GeoIP Maxmind konverteringer kapaciteter +Module3100Name=Skype +Module3100Desc=Add a Skype button into card of adherents / third parties / contacts Module5000Name=Multi-selskab Module5000Desc=Giver dig mulighed for at administrere flere selskaber Module6000Name=Workflow @@ -681,6 +683,10 @@ Permission401=Læs rabatter Permission402=Opret / ændre rabatter Permission403=Valider rabatter Permission404=Slet rabatter +Permission510=Read Salaries +Permission512=Create/modify salaries +Permission514=Delete salaries +Permission517=Export salaries Permission531=Læs tjenester Permission532=Opret / ændre tjenester Permission534=Slet tjenester @@ -999,7 +1005,7 @@ ExtraFieldsSupplierOrders=Complementary attributes (orders) ExtraFieldsSupplierInvoices=Complementary attributes (invoices) ExtraFieldsProject=Complementary attributes (projects) ExtraFieldsProjectTask=Complementary attributes (tasks) -ExtraFieldHasWrongValue=Henføres %s har en forkert værdi. +ExtraFieldHasWrongValue=Attribute %s has a wrong value. AlphaNumOnlyCharsAndNoSpace=only alphanumericals characters without space AlphaNumOnlyLowerCharsAndNoSpace=only alphanumericals and lower case characters without space SendingMailSetup=Opsætning af sendings via e-mail @@ -1018,13 +1024,13 @@ SuhosinSessionEncrypt=Session storage encrypted by Suhosin ConditionIsCurrently=Condition is currently %s TestNotPossibleWithCurrentBrowsers=Automatic detection not possible YouUseBestDriver=You use driver %s that is best driver available currently. -YouDoNotUseBestDriver=You use drive %s but driver %s is recommanded. +YouDoNotUseBestDriver=You use drive %s but driver %s is recommended. NbOfProductIsLowerThanNoPb=You have only %s products/services into database. This does not required any particular optimization. SearchOptim=Search optimization YouHaveXProductUseSearchOptim=You have %s product into database. You should add the constant PRODUCT_DONOTSEARCH_ANYWHERE to 1 into Home-Setup-Other, you limit the search to the beginning of strings making possible for database to use index and you should get an immediate response. BrowserIsOK=You are using the web browser %s. This browser is ok for security and performance. BrowserIsKO=You are using the web browser %s. This browser is known to be a bad choice for security, performance and reliability. We recommand you to use Firefox, Chrome, Opera or Safari. -XDebugInstalled=XDebug est chargé. +XDebugInstalled=XDebug is loaded. XCacheInstalled=XCache is loaded. AddRefInList=Display customer/supplier ref into list (select list or combobox) and most of hyperlink FieldEdition=Edition of field %s @@ -1073,7 +1079,7 @@ WebCalServer=Server hosting kalender database WebCalDatabaseName=Database navn WebCalUser=Brugeren at få adgang til databasen WebCalSetupSaved=Webcalendar opsætning gemt. -WebCalTestOk=Forbindelse til server ' %s' på database' %s' med brugeren ' %s' succes. +WebCalTestOk=Connection to server '%s' on database '%s' with user '%s' successful. WebCalTestKo1=Forbindelse til server ' %s' lykkes men database' %s' kunne ikke være nået. WebCalTestKo2=Forbindelse til server ' %s' med brugeren' %s' mislykkedes. WebCalErrorConnectOkButWrongDatabase=Forbindelsesstyring lykkedes, men databasen ikke ser sig at være en Webcalendar database. @@ -1119,7 +1125,7 @@ WatermarkOnDraftProposal=Watermark on draft commercial proposals (none if empty) OrdersSetup=Ordrer «forvaltning setup OrdersNumberingModules=Ordrer nummerressourcer moduler OrdersModelModule=Bestil dokumenter modeller -HideTreadedOrders=Skjul behandles eller annullerede ordrer på listen +HideTreadedOrders=Hide the treated or cancelled orders in the list ValidOrderAfterPropalClosed=At validere den rækkefølge efter forslag tættere sammen, gør det muligt ikke at træde ved den foreløbige kendelse FreeLegalTextOnOrders=Fri tekst om ordrer WatermarkOnDraftOrders=Watermark on draft orders (none if empty) @@ -1214,9 +1220,9 @@ LDAPSynchroKO=Mislykket synkronisering test LDAPSynchroKOMayBePermissions=Mislykket synkronisering test. Kontroller, at forbindelse til serveren er konfigureret korrekt og tillader LDAP udpates LDAPTCPConnectOK=TCP connect to LDAP server successful (Server=%s, Port=TCP forbindelse til LDAP-serveren vellykket (Server= %s, Port= %s) LDAPTCPConnectKO=TCP connect to LDAP server failed (Server=%s, Port=TCP forbindelse til LDAP-serveren mislykkedes (Server= %s, Port= %s) -LDAPBindOK=Connect/Authentificate to LDAP server sucessfull (Server=%s, Port=%s, Admin=%s, Password=Slut / Authentificate til LDAP server vellykket (Server= %s, Port= %s, Admin= %s, Password= %s) +LDAPBindOK=Connect/Authentificate to LDAP server successful (Server=%s, Port=%s, Admin=%s, Password=%s) LDAPBindKO=Connect/Authentificate to LDAP server failed (Server=%s, Port=%s, Admin=%s, Password=Slut / Authentificate til LDAP-serveren mislykkedes (Server= %s, Port= %s, Admin= %s, Password= %s) -LDAPUnbindSuccessfull=Afbryd vellykket +LDAPUnbindSuccessfull=Disconnect successful LDAPUnbindFailed=Afbryd mislykkedes LDAPConnectToDNSuccessfull=Forbindelsesstyring au DN ( %s) Russie LDAPConnectToDNFailed=Forbindelsesstyring au DN ( %s) choue @@ -1273,7 +1279,7 @@ LDAPFieldSidExample=Eksempel: objectsid LDAPFieldEndLastSubscription=Dato for tilmelding udgangen LDAPFieldTitle=Post / Funktion LDAPFieldTitleExample=Example: title -LDAPParametersAreStillHardCoded=LDAP parametre er stadig hardcodede (i kontakt klasse) +LDAPParametersAreStillHardCoded=LDAP parameters are still hardcoded (in contact class) LDAPSetupNotComplete=LDAP-opsætning ikke komplet (gå på andre faner) LDAPNoUserOrPasswordProvidedAccessIsReadOnly=Nr. administrator eller adgangskode forudsat. LDAP adgang vil være anonym og i skrivebeskyttet tilstand. LDAPDescContact=Denne side giver dig mulighed for at definere LDAP attributter navn i LDAP træ for hver data findes på Dolibarr kontakter. @@ -1429,7 +1435,7 @@ OptionVATDefault=Standard OptionVATDebitOption=Mulighed tjenester sur overførselsautorisation OptionVatDefaultDesc=Moms skyldes:
    - Om levering / betaling for varer
    - Bestemmelser om betalinger for tjenester OptionVatDebitOptionDesc=Moms skyldes:
    - Om levering / betaling for varer
    - På fakturaen (debet) for tjenesteydelser -SummaryOfVatExigibilityUsedByDefault=Time moms forfaldstidspunkt som standard i henhold til choosed valg: +SummaryOfVatExigibilityUsedByDefault=Time of VAT exigibility by default according to chosen option: OnDelivery=Om levering OnPayment=Om betaling OnInvoice=På fakturaen @@ -1446,7 +1452,7 @@ AccountancyCodeBuy=Purchase account. code AgendaSetup=Aktioner og dagsorden modul opsætning PasswordTogetVCalExport=Nøglen til at tillade eksport link PastDelayVCalExport=Må ikke eksportere begivenhed ældre end -AGENDA_USE_EVENT_TYPE=Use events types (managed into menu Setup -> Dictionnary -> Type of agenda events) +AGENDA_USE_EVENT_TYPE=Use events types (managed into menu Setup -> Dictionary -> Type of agenda events) ##### ClickToDial ##### ClickToDialDesc=Dette modul giver mulighed for at tilføje et ikon efter telefonnummeret på Dolibarr kontakter. Et klik på dette ikon, vil kalde en serveur med en bestemt webadresse du definerer nedenfor. Dette kan bruges til at ringe til et call center-system fra Dolibarr, der kan ringe til telefonnummeret på en SIP-system f.eks. ##### Point Of Sales (CashDesk) ##### diff --git a/htdocs/langs/da_DK/contracts.lang b/htdocs/langs/da_DK/contracts.lang index d4b25f19c1b..12f369aa227 100644 --- a/htdocs/langs/da_DK/contracts.lang +++ b/htdocs/langs/da_DK/contracts.lang @@ -38,7 +38,7 @@ ConfirmCloseService=Er du sikker på du ønsker at lukke denne service med da ValidateAContract=Validere en kontrakt ActivateService=Aktivér service ConfirmActivateService=Er du sikker på du vil aktivere denne tjeneste med datoen for %s? -# RefContract=Contract reference +RefContract=Contract reference DateContract=Kontrakt dato DateServiceActivate=Forkyndelsesdato aktivering DateServiceUnactivate=Forkyndelsesdato unactivation @@ -85,10 +85,12 @@ PaymentRenewContractId=Forny kontrakten linje (antal %s) ExpiredSince=Udløbsdatoen RelatedContracts=Relaterede kontrakter NoExpiredServices=Ingen udløbne aktive tjenester -# ListOfServicesToExpireWithDuration=List of Services to expire in %s days -# ListOfServicesToExpireWithDurationNeg=List of Services expired from more than %s days -# ListOfServicesToExpire=List of Services to expire -# NoteListOfYourExpiredServices=This list contains only services of contracts for third parties you are linked to as a sale representative. +ListOfServicesToExpireWithDuration=List of Services to expire in %s days +ListOfServicesToExpireWithDurationNeg=List of Services expired from more than %s days +ListOfServicesToExpire=List of Services to expire +NoteListOfYourExpiredServices=This list contains only services of contracts for third parties you are linked to as a sale representative. +StandardContractsTemplate=Standard contracts template +ContactNameAndSignature=For %s, name and signature: ##### Types de contacts ##### TypeContact_contrat_internal_SALESREPSIGN=Salg repræsentant, der underskriver kontrakt diff --git a/htdocs/langs/da_DK/exports.lang b/htdocs/langs/da_DK/exports.lang index 85263e6a0e7..bbb34325b8f 100644 --- a/htdocs/langs/da_DK/exports.lang +++ b/htdocs/langs/da_DK/exports.lang @@ -8,7 +8,7 @@ ImportableDatas=Indføres datasæt SelectExportDataSet=Vælg datasæt, du vil eksportere ... SelectImportDataSet=Vælg datasæt, du vil importere ... SelectExportFields=Vælg felter, du ønsker at eksportere, eller vælg en foruddefineret eksport profil -SelectImportFields=Vælg felter, du vil importere, eller vælg en foruddefineret import profil +SelectImportFields=Choose source file fields you want to import and their target field in database by moving them up and down with anchor %s, or select a predefined import profile: NotImportedFields=Områder kildefil ikke importeret SaveExportModel=Gem denne eksport profil hvis du planlægger at genbruge det senere ... SaveImportModel=Gem denne import profil hvis du planlægger at genbruge det senere ... @@ -64,7 +64,7 @@ ChooseFormatOfFileToImport=Vælg fil-format til brug som import filformat ved at ChooseFileToImport=Vælg fil for at importere og klik derefter på picto %s ... SourceFileFormat=Kilde filformat FieldsInSourceFile=Områder i kildefilen -# FieldsInTargetDatabase=Target fields in Dolibarr database (bold=mandatory) +FieldsInTargetDatabase=Target fields in Dolibarr database (bold=mandatory) Field=Field NoFields=Ingen felter MoveField=Flyt feltet kolonne nummer %s @@ -81,7 +81,7 @@ DoNotImportFirstLine=Importer ikke første linje i kildefilen NbOfSourceLines=Antal linjer i kildefilen NowClickToTestTheImport=Check import parametre, som du har defineret. Hvis de er korrekte, skal du klikke på knappen "%s" for at starte en simulering af import-processen (ingen data vil blive ændret i databasen, er det kun en simulation for øjeblikket) ... RunSimulateImportFile=Start import simulation -FieldNeedSource=Dette finder i database kræver en data fra kildefil +FieldNeedSource=This field requires data from the source file SomeMandatoryFieldHaveNoSource=Nogle obligatoriske felter er ingen kilde fra datafil InformationOnSourceFile=Oplysninger om kildefil InformationOnTargetTables=Oplysninger om målet felter @@ -102,33 +102,33 @@ NbOfLinesImported=Antallet af linjer med held importeret: %s. DataComeFromNoWhere=Værdi at indsætte kommer fra ingenting i kildefilen. DataComeFromFileFieldNb=Værdi at indsætte kommer fra feltnummer %s i kildefilen. DataComeFromIdFoundFromRef=Værdi, der kommer fra feltnummer %s af kildefilen vil blive brugt til at finde id af overordnede objekt til brug (Altså den objet %s, der har ref. Fra kildefilen skal findes i Dolibarr). -# DataComeFromIdFoundFromCodeId=Code that comes from field number %s of source file will be used to find id of parent object to use (So the code from source file must exists into dictionary %s). Note that if you know id, you can also use it into source file instead of code. Import should work in both cases. +DataComeFromIdFoundFromCodeId=Code that comes from field number %s of source file will be used to find id of parent object to use (So the code from source file must exists into dictionary %s). Note that if you know id, you can also use it into source file instead of code. Import should work in both cases. DataIsInsertedInto=Data kommer fra kildefilen vil blive indsat i følgende felt: DataIDSourceIsInsertedInto=Den id af overordnede objekt findes ved brug af data i kildefilen, vil blive indsat i følgende felt: DataCodeIDSourceIsInsertedInto=Den id stamlinjen fundet fra kode, vil blive indsat i følgende felt: SourceRequired=Data værdi er obligatorisk SourceExample=Eksempel på mulige dataværdi ExampleAnyRefFoundIntoElement=Enhver ref fundet for element %s -# ExampleAnyCodeOrIdFoundIntoDictionary=Any code (or id) found into dictionary %s +ExampleAnyCodeOrIdFoundIntoDictionary=Any code (or id) found into dictionary %s CSVFormatDesc=Semikolonseparerede Værdi filformat (. Csv).
    Dette er en tekstfil format, hvor felterne er adskilt af separator [%s]. Hvis separator er fundet inde i et felt indhold, er området afrundet med runde karakter [%s]. Escape character at flygte runde karakter er [%s]. -# Excel95FormatDesc=Excel file format (.xls)
    This is native Excel 95 format (BIFF5). -# Excel2007FormatDesc=Excel file format (.xlsx)
    This is native Excel 2007 format (SpreadsheetML). -# TsvFormatDesc=Tab Separated Value file format (.tsv)
    This is a text file format where fields are separated by a tabulator [tab]. -# ExportFieldAutomaticallyAdded=Field %s was automatically added. It will avoid you to have similar lines to be treated as duplicate records (with this field added, all lines will own their own id and will differ). -# CsvOptions=Csv Options -# Separator=Separator -# Enclosure=Enclosure -# SuppliersProducts=Suppliers Products +Excel95FormatDesc=Excel file format (.xls)
    This is native Excel 95 format (BIFF5). +Excel2007FormatDesc=Excel file format (.xlsx)
    This is native Excel 2007 format (SpreadsheetML). +TsvFormatDesc=Tab Separated Value file format (.tsv)
    This is a text file format where fields are separated by a tabulator [tab]. +ExportFieldAutomaticallyAdded=Field %s was automatically added. It will avoid you to have similar lines to be treated as duplicate records (with this field added, all lines will own their own id and will differ). +CsvOptions=Csv Options +Separator=Separator +Enclosure=Enclosure +SuppliersProducts=Suppliers Products BankCode=Bank-kode DeskCode=Skrivebord kode BankAccountNumber=Kontonummer BankAccountNumberKey=Nøgle -# SpecialCode=Special code -# ExportStringFilter=%% allows replacing one or more characters in the text -# ExportDateFilter='YYYY' 'YYYYMM' 'YYYYMMDD': filters by one year/month/day
    'YYYY+YYYY' 'YYYYMM+YYYYMM' 'YYYYMMDD+YYYYMMDD': filters over a range of years/months/days
    '>YYYY' '>YYYYMM' '>YYYYMMDD': filters on the following years/months/days
    '<YYYY' '<YYYYMM' '<YYYYMMDD': filters on the previous years/months/days -# ExportNumericFilter='NNNNN' filters by one value
    'NNNNN+NNNNN' filters over a range of values
    '>NNNNN' filters by lower values
    '>NNNNN' filters by higher values +SpecialCode=Special code +ExportStringFilter=%% allows replacing one or more characters in the text +ExportDateFilter='YYYY' 'YYYYMM' 'YYYYMMDD': filters by one year/month/day
    'YYYY+YYYY' 'YYYYMM+YYYYMM' 'YYYYMMDD+YYYYMMDD': filters over a range of years/months/days
    '>YYYY' '>YYYYMM' '>YYYYMMDD': filters on the following years/months/days
    '<YYYY' '<YYYYMM' '<YYYYMMDD': filters on the previous years/months/days +ExportNumericFilter='NNNNN' filters by one value
    'NNNNN+NNNNN' filters over a range of values
    '>NNNNN' filters by lower values
    '>NNNNN' filters by higher values ## filters -# SelectFilterFields=If you want to filter on some values, just input values here. -# FilterableFields=Champs Filtrables -# FilteredFields=Filtered fields -# FilteredFieldsValues=Value for filter +SelectFilterFields=If you want to filter on some values, just input values here. +FilterableFields=Champs Filtrables +FilteredFields=Filtered fields +FilteredFieldsValues=Value for filter diff --git a/htdocs/langs/da_DK/holiday.lang b/htdocs/langs/da_DK/holiday.lang index eeb547fa069..8f49c732719 100644 --- a/htdocs/langs/da_DK/holiday.lang +++ b/htdocs/langs/da_DK/holiday.lang @@ -8,7 +8,6 @@ NotActiveModCP=You must enable the module holidays to view this page. NotConfigModCP=You must configure the module holidays to view this page. To do this, click here . NoCPforUser=You don't have a demand for holidays. AddCP=Apply for holidays -CPErrorSQL=An SQL error occurred: Employe=Employee DateDebCP=Startdato DateFinCP=Slutdato diff --git a/htdocs/langs/da_DK/languages.lang b/htdocs/langs/da_DK/languages.lang index 8bd7fe6b697..f5667274bf1 100644 --- a/htdocs/langs/da_DK/languages.lang +++ b/htdocs/langs/da_DK/languages.lang @@ -19,6 +19,7 @@ Language_en_SA=English (Saudi-Arabien) Language_en_US=Engelsk (USA) Language_en_ZA=Engelsk (Sydafrika) Language_es_ES=Spansk +Language_es_DO=Spanish (Dominican Republic) Language_es_AR=Spansk (Argentina) Language_es_CL=Spanish (Chile) Language_es_HN=Spansk (Honduras) @@ -38,6 +39,7 @@ Language_fr_NC=Fransk (Ny Kaledonien) Language_he_IL=Hebræisk Language_hr_HR=Kroatisk Language_hu_HU=Ungarsk +Language_id_ID=Indonesian Language_is_IS=Islandsk Language_it_IT=Italiensk Language_ja_JP=Japansk diff --git a/htdocs/langs/da_DK/mails.lang b/htdocs/langs/da_DK/mails.lang index 34deab74eef..ba38add1b39 100644 --- a/htdocs/langs/da_DK/mails.lang +++ b/htdocs/langs/da_DK/mails.lang @@ -79,6 +79,7 @@ MailtoEMail=Hyper link to email ActivateCheckRead=Allow to use the "Unsubcribe" link ActivateCheckReadKey=Key use to encrypt URL use for "Read Receipt" and "Unsubcribe" feature EMailSentToNRecipients=EMail sent to %s recipients. +XTargetsAdded=%s recipients added into target list EachInvoiceWillBeAttachedToEmail=A document using default invoice document template will be created and attached to each email. MailTopicSendRemindUnpaidInvoices=Reminder of invoice %s (%s) SendRemind=Send reminder by EMails diff --git a/htdocs/langs/da_DK/main.lang b/htdocs/langs/da_DK/main.lang index 6d2ca1bd31c..3e006c28dee 100644 --- a/htdocs/langs/da_DK/main.lang +++ b/htdocs/langs/da_DK/main.lang @@ -196,7 +196,7 @@ Description=Beskrivelse Designation=Beskrivelse Model=Model DefaultModel=Standard model -Action=Action +Action=Begivenhed About=Om Number=Antal NumberByMonth=Antal efter måned @@ -204,16 +204,16 @@ AmountByMonth=Beløb efter måned Numero=Numero Limit=Limit Limits=Grænseværdier -DevelopmentTeam=Development Team -Logout=Logout +DevelopmentTeam=Udviklingshold +Logout=Log ud NoLogoutProcessWithAuthMode=No applicative disconnect feature with authentication mode %s Connection=Forbindelsesstyring Setup=Setup -Alert=Alert +Alert=Alarm Previous=Forrige Next=Næste Cards=Postkort -Card=Card +Card=Kort Now=Nu Date=Dato DateStart=Dato start @@ -551,6 +551,7 @@ MailSentBy=E-mail sendt fra TextUsedInTheMessageBody=Email organ SendAcknowledgementByMail=Send Ack. via e-mail NoEMail=Ingen e-mail +NoMobilePhone=No mobile phone Owner=Ejer DetectedVersion=Registreret version FollowingConstantsWillBeSubstituted=Efter konstanterne skal erstatte med tilsvarende værdi. diff --git a/htdocs/langs/da_DK/products.lang b/htdocs/langs/da_DK/products.lang index 09c17a72c12..a59caad3cc2 100644 --- a/htdocs/langs/da_DK/products.lang +++ b/htdocs/langs/da_DK/products.lang @@ -28,8 +28,10 @@ ProductsAndServicesStatistics=Produkter og services statistik ProductsStatistics=Produkter statistik ProductsOnSell=Produkter på sælge ProductsNotOnSell=Produkter ud af sælge +ProductsOnSellAndOnBuy=Products not for sale nor purchase ServicesOnSell=Tjenester på sælge ServicesNotOnSell=Tjenester ud af sælge +ServicesOnSellAndOnBuy=Services not for sale nor purchase InternalRef=Intern reference LastRecorded=Seneste produkter / ydelser på sælge registreres LastRecordedProductsAndServices=Seneste %s precorded rodukter / tjenester @@ -70,6 +72,8 @@ PublicPrice=Offentlige pris CurrentPrice=Nuværende pris NewPrice=Ny pris MinPrice=Minim. salgspris +MinPriceHT=Minim. selling price (net of tax) +MinPriceTTC=Minim. selling price (inc. tax) CantBeLessThanMinPrice=Salgsprisen kan ikke være lavere end minimum tilladt for dette produkt ( %s uden skat) ContractStatus=Kontrakt status ContractStatusClosed=Lukket @@ -179,6 +183,7 @@ ProductIsUsed=Dette produkt er brugt NewRefForClone=Ref. af nye produkter / ydelser CustomerPrices=Kunder priser SuppliersPrices=Leverandører priser +SuppliersPricesOfProductsOrServices=Suppliers prices (of products or services) CustomCode=Toldkodeksen CountryOrigin=Oprindelsesland HiddenIntoCombo=Skjult i udvalgte lister @@ -208,6 +213,7 @@ CostPmpHT=Net total VWAP ProductUsedForBuild=Auto consumed by production ProductBuilded=Production completed ProductsMultiPrice=Product multi-price +ProductsOrServiceMultiPrice=Customers prices (of products or services, multi-prices) ProductSellByQuarterHT=Products turnover quarterly VWAP ServiceSellByQuarterHT=Services turnover quarterly VWAP Quarter1=1st. Quarter diff --git a/htdocs/langs/da_DK/shop.lang b/htdocs/langs/da_DK/shop.lang index 8ab2091bd49..3d8769d31e3 100644 --- a/htdocs/langs/da_DK/shop.lang +++ b/htdocs/langs/da_DK/shop.lang @@ -1,4 +1,5 @@ # Dolibarr language file - Source file is en_US - shop +FailedConnectDBCheckModuleSetup=Failed to connect to oscommerce database. Check your module setup Shop=Shop ShopWeb=Web Shop LastOrders=Seneste kendelser diff --git a/htdocs/langs/da_DK/stocks.lang b/htdocs/langs/da_DK/stocks.lang index 570e2946af8..b827d8ec8fb 100644 --- a/htdocs/langs/da_DK/stocks.lang +++ b/htdocs/langs/da_DK/stocks.lang @@ -112,6 +112,7 @@ ReplenishmentOrdersDesc=This is list of all opened supplier orders Replenishments=Replenishments NbOfProductBeforePeriod=Quantity of product %s in stock before selected period (< %s) NbOfProductAfterPeriod=Quantity of product %s in stock after selected period (> %s) +MassMovement=Mass movement MassStockMovement=Mass stock movement SelectProductInAndOutWareHouse=Select a product, a quantity, a source warehouse and a target warehouse, then click "%s". Once this is done for all required movements, click onto "%s". RecordMovement=Record transfert diff --git a/htdocs/langs/de_DE/admin.lang b/htdocs/langs/de_DE/admin.lang index 123c0c45a12..121c43bd004 100644 --- a/htdocs/langs/de_DE/admin.lang +++ b/htdocs/langs/de_DE/admin.lang @@ -73,7 +73,7 @@ Mask=Maske NextValue=Nächster Wert NextValueForInvoices=Nächster Wert (Rechnungen) NextValueForCreditNotes=Nächster Wert (Gutschriften) -NextValueForDeposit=Next value (deposit) +NextValueForDeposit=Nächster Wert (Scheck) NextValueForReplacements=Next value (replacements) MustBeLowerThanPHPLimit=Hinweis: Ihre PHP-Einstellungen beschränken die Größe für Dateiuploads auf %s%s NoMaxSizeByPHPLimit=Hinweis: In Ihren PHP-Einstellungen sind keine Größenbeschränkungen hinterlegt @@ -102,9 +102,9 @@ OtherOptions=Andere Optionen OtherSetup=Andere Einstellungen CurrentValueSeparatorDecimal=Dezimaltrennzeichen CurrentValueSeparatorThousand=Tausendertrennzeichen -Destination=Destination -IdModule=Module ID -IdPermissions=Permissions ID +Destination=Ziel +IdModule=Modul ID +IdPermissions=Berechtigungs-ID Modules=Module ModulesCommon=Hauptmodule ModulesOther=Weitere Module @@ -234,6 +234,8 @@ OfficialWiki=Dolibarr Wiki OfficialDemo=Dolibarr Offizielle Demo OfficialMarketPlace=Offizieller Marktplatz für Module/Erweiterungen OfficialWebHostingService=Offizielle Web-Hosting-Services (Cloud Hosting) +ReferencedPreferredPartners=Bevorzugte Partner +OtherResources=Andere Ressourcen ForDocumentationSeeWiki=Für Benutzer-und Entwickler-Dokumentation (DOC, ...), FAQs
    Werfen Sie einen Blick auf die Dolibarr Wiki:
    %s ForAnswersSeeForum=Für alle anderen Fragen / Hilfe, können Sie die Dolibarr Forum:
    %s HelpCenterDesc1=In diesem Bereich können Sie sich ein Hilfe-Support-Service auf Dolibarr. @@ -285,7 +287,7 @@ DownloadPackageFromWebSite=Herunterladen des Installationspakets von der Website UnpackPackageInDolibarrRoot=Entpacken des Pakets in den Stammordner der Systeminstallation %s SetupIsReadyForUse=Die Installation ist abgeschlossen und das System zur Verwendung der neuen Komponente bereit. NotExistsDirect=Kein alternatives Stammverzeichnis definiert.
    -InfDirAlt=Since version 3 it is possible to define an alternative root directory.This allows you to store, same place, plug-ins and custom templates.
    Just create a directory at the root of Dolibarr (eg: custom).
    +InfDirAlt=Seit Version 3 ist es möglich, ein alternatives Stammverzeichnis anzugeben. Dies ermöglicht, Erweiterungen und eigene Templates am gleichen Ort zu speichern.
    Legen Sie einfach ein Verzeichis im Hauptverzeichnis von Dolibarr an (z.B. "eigenes").
    InfDirExample=
    Danach in der Datei conf.php deklarieren
    $dolibarr_main_url_root_alt='http://meinserver/custom'
    $dolibarr_main_document_root_alt='/pfad/zu/dolibarr/htdocs/custom'
    *Diese Zeilen sind mit "#" auskommentiert, um sie zu aktivieren, einfach das Zeichen entfernen. YouCanSubmitFile=Modul wählen: CurrentVersion=Aktuelle dolibarr-Version @@ -369,7 +371,7 @@ ExtrafieldSelectList = Wähle von Tabelle ExtrafieldSeparator=Trennzeichen ExtrafieldCheckBox=Checkbox ExtrafieldRadio=Radio button -ExtrafieldParamHelpselect=Parameterlisten müssen das Format Schlüssel,Wert haben

    zum Beispiel:
    1,Wert1
    2,Wert2
    3,Wert3
    ...

    Um die Liste in Abhängigkeit zu einer anderen zu haben:
    1,Wert1|parent_list_code:parent_key
    2,Wert2|parent_list_code:parent_key +ExtrafieldParamHelpselect=Parameters list have to be like key,value

    for example :
    1,value1
    2,value2
    3,value3
    ...

    In order to have the list depending on another :
    1,value1|parent_list_code:parent_key
    2,value2|parent_list_code:parent_key ExtrafieldParamHelpcheckbox=Parameterlisten müssen das Format Schlüssel,Wert haben

    zum Beispiel:
    1,Wert1
    2,Wert2
    3,Wert3
    ... ExtrafieldParamHelpradio=Parameterlisten müssen das Format Schlüssel,Wert haben

    zum Beispiel:
    1,Wert1
    2,Wert2
    3,Wert3
    ... ExtrafieldParamHelpsellist=Parameters list comes from a table
    Syntax : table_name:label_field:id_field::filter
    Example : c_typent:libelle:id::filter

    filter can be a simple test (eg active=1) to display only active value
    if you want to filter on extrafields use syntaxt extra.fieldcode=... (where field code is the code of extrafield)

    In order to have the list depending on another :
    c_typent:libelle:id:parent_list_code|parent_column:filter @@ -495,15 +497,15 @@ Module2400Name=Agenda Module2400Desc=Maßnahmen/Aufgaben und Agendaverwaltung Module2500Name=Inhaltsverwaltung(ECM) Module2500Desc=Speicherung und Verteilung von Dokumenten -Module2600Name= WebServices -Module2600Desc= Aktivieren Sie Verwendung von Webservices -Module2700Name= Gravatar -Module2700Desc= Verwenden Sie den online Gravatar-Dienst (www.gravatar.com) für die Anzeige von Benutzer- und Mitgliederbildern (Zuordnung über E-Mail-Adressen). Hierfür benötigen Sie eine aktive Internetverbindung +Module2600Name=WebServices +Module2600Desc=Aktivieren Sie Verwendung von Webservices +Module2700Name=Gravatar +Module2700Desc=Verwenden Sie den online Gravatar-Dienst (www.gravatar.com) für die Anzeige von Benutzer- und Mitgliederbildern (Zuordnung über E-Mail-Adressen). Hierfür benötigen Sie eine aktive Internetverbindung Module2800Desc=FTP-Client -Module2900Name= GeoIPMaxmind -Module2900Desc= GeoIP Maxmind Konvertierung -Module3100Name= Skype -Module3100Desc= Add a Skype button into card of adherents / third parties / contacts +Module2900Name=GeoIPMaxmind +Module2900Desc=GeoIP Maxmind Konvertierung +Module3100Name=Skype +Module3100Desc=Add a Skype button into card of adherents / third parties / contacts Module5000Name=Mandantenfähigkeit Module5000Desc=Ermöglicht Ihnen die Verwaltung mehrerer Firmen Module6000Name=Workflow @@ -524,8 +526,8 @@ Module59000Name=Gewinnspannen Module59000Desc=Modul zur Verwaltung von Gewinnspannen Module60000Name=Kommissionen Module60000Desc=Modul zur Verwaltung von Kommissionen -Module150010Name=Batch number, eat-by date and sell-by date -Module150010Desc=batch number, eat-by date and sell-by date management for product +Module150010Name=Batch-Nummer, verzehren-bis-Datum und verkaufen-bis-Datum +Module150010Desc=Verwaltung von Batch-Nummer, verzehren-bis-Datum und verkaufen-bis-Datum für Produkte Permission11=Rechnungen einsehen Permission12=Rechnungen erstellen/bearbeiten Permission13=Rechnungsfreigabe aufheben @@ -681,6 +683,10 @@ Permission401=Rabatte einsehen Permission402=Rabatte erstellen/bearbeiten Permission403=Rabatte freigeben Permission404=Rabatte löschen +Permission510=Löhne einsehen +Permission512=Löhne erstellen/bearbeiten +Permission514=Löhne löschen +Permission517=Löhne exportieren Permission531=Leistungen einsehen Permission532=Leistungen erstellen/bearbeiten Permission534=Leistungen löschen @@ -744,7 +750,7 @@ Permission59001=Read commercial margins Permission59002=Define commercial margins DictionaryCompanyType=Partnertyp DictionaryCompanyJuridicalType=Juridical kinds of thirdparties -DictionaryProspectLevel=Prospect potential level +DictionaryProspectLevel=Geschäftsaussicht DictionaryCanton=Bundesland/Kanton DictionaryRegion=Regionen DictionaryCountry=Länder @@ -999,7 +1005,7 @@ ExtraFieldsSupplierOrders=Ergänzende Attribute (Bestellungen) ExtraFieldsSupplierInvoices=Ergänzende Attribute (Rechnungen) ExtraFieldsProject=Ergänzende Attribute (Projekte) ExtraFieldsProjectTask=Ergänzende Attribute (Aufgaben) -ExtraFieldHasWrongValue=Attribut %s einen falschen Wert hat. +ExtraFieldHasWrongValue=Attribut %s hat einen falschen Wert. AlphaNumOnlyCharsAndNoSpace=nur alphanumericals Zeichen ohne Leerzeichen AlphaNumOnlyLowerCharsAndNoSpace=nur Kleinbuchstaben und Zahlen, keine Leerzeichen SendingMailSetup=Einrichten von Sendungen per E-Mail @@ -1018,7 +1024,7 @@ SuhosinSessionEncrypt=Sitzungsspeicher durch Suhosin verschlüsselt ConditionIsCurrently=Einstellung ist aktuell %s TestNotPossibleWithCurrentBrowsers=Automatische Erkennung nicht möglich YouUseBestDriver=Sie verwenden den Treiber %s, dies ist derzeit der beste verfügbare. -YouDoNotUseBestDriver=Sie verwenden Treiber %s, aber der Treiber %s wird empfohlen. +YouDoNotUseBestDriver=You use drive %s but driver %s is recommended. NbOfProductIsLowerThanNoPb=Sie haben nur %s Produkte/Dienstleistungen in der Datenbank. Daher ist keine bestimmte Optimierung erforderlich. SearchOptim=Such Optimierung YouHaveXProductUseSearchOptim=You have %s product into database. You should add the constant PRODUCT_DONOTSEARCH_ANYWHERE to 1 into Home-Setup-Other, you limit the search to the beginning of strings making possible for database to use index and you should get an immediate response. @@ -1119,7 +1125,7 @@ WatermarkOnDraftProposal=Wasserzeichen auf Angebotsentwürfen (keins, falls leer OrdersSetup=Bestellverwaltungseinstellungen OrdersNumberingModules=Bestellnumerierungs-Module OrdersModelModule=Bestellvorlagenmodule -HideTreadedOrders=Ausblenden von bearbeiteten oder abgebrochenen Angebote in der Liste +HideTreadedOrders=Ausblenden von bearbeiteten oder abgebrochenen Angeboten in der Liste ValidOrderAfterPropalClosed=Zur Freigabe der Bestellung nach Schließung des Angebots (überspringt vorläufige Bestellung) FreeLegalTextOnOrders=Freier Rechtstext auf Bestellungen WatermarkOnDraftOrders=Wasserzeichen auf Entwürfen von Aufträgen (keins, wenn leer) @@ -1429,7 +1435,7 @@ OptionVATDefault=Standard OptionVATDebitOption=MwSt.Last-Option OptionVatDefaultDesc=Mehrwertsteuerschuld entsteht:
    - Bei Lieferung/Zahlung für Waren
    - Bei Zahlung für Dienstleistungen OptionVatDebitOptionDesc=Mehrwertsteuerschuld entsteht:
    - Bei Lieferung/Zahlung für Waren
    - Bei Rechnungslegung (Lastschrift) für Dienstleistungen -SummaryOfVatExigibilityUsedByDefault=Standardmäßiger Zeitpunkt der MwSt.-Fälligkeit in Abhängigkeit der derzeit gewählten Option: +SummaryOfVatExigibilityUsedByDefault=Standardmäßiger Zeitpunkt der MwSt.-Fälligkeit in Abhängigkeit zur derzeit gewählten Option: OnDelivery=Bei Lieferung OnPayment=Bei Zahlung OnInvoice=Bei Rechnungslegung @@ -1446,7 +1452,7 @@ AccountancyCodeBuy=Purchase account. code AgendaSetup=Agenda-Moduleinstellungen PasswordTogetVCalExport=Passwort für den VCal-Export PastDelayVCalExport=Keine Termine exportieren die älter sind als -AGENDA_USE_EVENT_TYPE=Use events types (managed into menu Setup -> Dictionnary -> Type of agenda events) +AGENDA_USE_EVENT_TYPE=Use events types (managed into menu Setup -> Dictionary -> Type of agenda events) ##### ClickToDial ##### ClickToDialDesc=Dieses Modul fügt ein Symbols nach Telefonnummern ein, bei dessen der Server unter der unten definierten URL aufgerufen wird. Diese Funktion können Sie dazu verwenden, ein Callcenter-System innerhalb dolibarrs aufzurufen, das eine Telefonnummer z.B. über ein SIP-System, für Sie wählt. ##### Point Of Sales (CashDesk) ##### @@ -1483,7 +1489,7 @@ SuppliersInvoiceModel=Vollständige Vorlage der Lieferantenrechnung (logo. ..) SuppliersInvoiceNumberingModel=Lieferantenrechnungen Zähl-Modell ##### GeoIPMaxmind ##### GeoIPMaxmindSetup=GeoIP-Maxmind Moduleinstellungen -PathToGeoIPMaxmindCountryDataFile=Path to file containing Maxmind ip to country translation.
    Examples:
    /usr/local/share/GeoIP/GeoIP.dat
    /usr/share/GeoIP/GeoIP.dat +PathToGeoIPMaxmindCountryDataFile=Pfad zur Datei mit Maxmind IP-zu-Land Übersetzung.
    Beispiele:
    /usr/local/share/GeoIP/GeoIP.dat
    /usr/share/GeoIP/GeoOP.dat NoteOnPathLocation=Bitte beachten Sie, dass Ihre IP-Länder-Datei in einem von PHP lesbaren Verzeichnis liegen muss (Überprüfen Sie Ihre PHP open_basedir-Einstellungen und die Dateisystem-Berechtigungen). YouCanDownloadFreeDatFileTo=Eine kostenlose Demo-Version der Maxmind-GeoIP Datei finden Sie hier: %s YouCanDownloadAdvancedDatFileTo=Eine vollständigere Version mit Updates der Maxmind-GeoIP Datei können Sie hier herunterladen: %s diff --git a/htdocs/langs/de_DE/contracts.lang b/htdocs/langs/de_DE/contracts.lang index 0c1da466af5..17d09551e73 100644 --- a/htdocs/langs/de_DE/contracts.lang +++ b/htdocs/langs/de_DE/contracts.lang @@ -88,7 +88,9 @@ NoExpiredServices=Keine abgelaufen aktiven Dienste ListOfServicesToExpireWithDuration=Liste der Leistungen die in %s Tagen ablaufen ListOfServicesToExpireWithDurationNeg=Liste der Services die seit mehr als %s Tagen abgelaufen sind ListOfServicesToExpire=Liste der Services die ablaufen -# NoteListOfYourExpiredServices=This list contains only services of contracts for third parties you are linked to as a sale representative. +NoteListOfYourExpiredServices=This list contains only services of contracts for third parties you are linked to as a sale representative. +StandardContractsTemplate=Standard contracts template +ContactNameAndSignature=For %s, name and signature: ##### Types de contacts ##### TypeContact_contrat_internal_SALESREPSIGN=Vertragsunterzeichnung durch Vertreter diff --git a/htdocs/langs/de_DE/exports.lang b/htdocs/langs/de_DE/exports.lang index 9da7fc3cbe4..4f4624a8e98 100644 --- a/htdocs/langs/de_DE/exports.lang +++ b/htdocs/langs/de_DE/exports.lang @@ -8,7 +8,7 @@ ImportableDatas=Importfähige Datensätze SelectExportDataSet=Wählen Sie den zu exportierenden Datensatz... SelectImportDataSet=Wählen Sie den zu importierenden Datensatz... SelectExportFields=Wählen Sie die zu exportierenden Felder oder ein vordefiniertes Exportprofil -SelectImportFields=Wählen Sie die zu importierenden Felder oder ein vordefiniertes Importprofil +SelectImportFields=Wählen Sie die Felder der Quelldatei, die Sie in die Datenbank importieren möchten und ihrem Zielbereich, indem Sie sie mit dem Anker %s nach oben und unten ziehen, oder wählen Sie ein vordefiniertes Importprofil: NotImportedFields=Quelldateifelder nicht importiert SaveExportModel=Speichern Sie diese Exportprofil für eine spätere Verwendung... SaveImportModel=Speichern Sie diese Importprofil für eine spätere Verwendung... @@ -81,7 +81,7 @@ DoNotImportFirstLine=Erste Zeile beim Import überspringen (falls Spaltennamen) NbOfSourceLines=Zeilenanzahl in der Quelldatei NowClickToTestTheImport=Überprüfen Sie jetzt die gewählten Importeinstellungen. Sind diese korrekt, klicken Sie bitte auf die Schaltfläche "%s" um einen Importvorgang zu simulieren (dabei werden noch keine Daten im System verändert, nur Testlauf) ... RunSimulateImportFile=Importsimulation starten -FieldNeedSource=Diese Datenbankfelder erfordern entsprechende Werte in der Quelldatei +FieldNeedSource=Dieses Feld benötigt Daten aus der Quelldatei SomeMandatoryFieldHaveNoSource=Einige erforderliche Felder haben keine Entsprechung in der Quelldatei InformationOnSourceFile=Informationen über die Quelldatei InformationOnTargetTables=Informationen über die Zieltabellen diff --git a/htdocs/langs/de_DE/holiday.lang b/htdocs/langs/de_DE/holiday.lang index 129ae83f7ba..e97f9296108 100644 --- a/htdocs/langs/de_DE/holiday.lang +++ b/htdocs/langs/de_DE/holiday.lang @@ -8,7 +8,6 @@ NotActiveModCP=Sie müssen das Ferien-Modul aktivieren um diese Seite zu sehen. NotConfigModCP=Sie müssen das Ferien-Modul konfigurieren um diese Seite zu sehen. Dazu klicken Sie hier . NoCPforUser=You don't have a demand for holidays. AddCP=Ferienantrag -CPErrorSQL=Ein SQL Fehler ist aufgetreten: Employe=Angestellter DateDebCP=Vertragsbeginn DateFinCP=Vertragsende @@ -110,16 +109,16 @@ Module27130Desc= Verwaltung der Ferien TitleOptionMainCP=Wichtigste Ferien-Einstellungen TitleOptionEventCP=Settings of holidays related to events ValidEventCP=Freigeben -UpdateEventCP=Update events +UpdateEventCP=Maßnahmen aktualisieren CreateEventCP=Erstelle -NameEventCP=Event name -OkCreateEventCP=The addition of the event went well. -ErrorCreateEventCP=Error creating the event. -UpdateEventOkCP=The update of the event went well. -ErrorUpdateEventCP=Error while updating the event. -DeleteEventCP=Delete Event -DeleteEventOkCP=The event has been deleted. -ErrorDeleteEventCP=Error while deleting the event. +NameEventCP=Titel der Maßnahme +OkCreateEventCP=Maßnahme erfolgreich zugefügt. +ErrorCreateEventCP=Fehler bei der Erstellung der Maßnahme. +UpdateEventOkCP=Maßnahme erfolgreich aktualisiert. +ErrorUpdateEventCP=Fehler bei der Aktualisierung der Maßnahme. +DeleteEventCP=Maßnahme löschen +DeleteEventOkCP=Maßnahme wurde gelöscht. +ErrorDeleteEventCP=Fehler bei der Löschung der Maßnahme. TitleDeleteEventCP=Delete a exceptional leave TitleCreateEventCP=Create a exceptional leave TitleUpdateEventCP=Edit or delete a exceptional leave @@ -145,6 +144,6 @@ Permission20000=Eigene Ferien lesen Permission20001=Anlegen/Ändern Ihrer Ferien Permission20002=Anlegen/Ändern der Ferien für alle Permission20003=Urlaubsanträge löschen -Permission20004=Setup users holidays +Permission20004=Benutzer-Ferien definieren Permission20005=Review log of modified holidays Permission20006=Read holidays monthly report diff --git a/htdocs/langs/de_DE/languages.lang b/htdocs/langs/de_DE/languages.lang index ee5ff6aadc0..14e0d3dc1d6 100644 --- a/htdocs/langs/de_DE/languages.lang +++ b/htdocs/langs/de_DE/languages.lang @@ -19,6 +19,7 @@ Language_en_SA=Englisch (Saudi-Arabien) Language_en_US=Englisch (USA) Language_en_ZA=Englisch (Südafrika) Language_es_ES=Spanisch +Language_es_DO=Spanisch (Dominikanische Republik) Language_es_AR=Spanisch (Argentinien) Language_es_CL=Spanisch (Chile) Language_es_HN=Spanisch (Honduras) @@ -38,6 +39,7 @@ Language_fr_NC=Französisch (Neukaledonien) Language_he_IL=Hebräisch Language_hr_HR=Kroatisch Language_hu_HU=Ungarisch +Language_id_ID=Indonesisch Language_is_IS=Isländisch Language_it_IT=Italienisch Language_ja_JP=Japanisch @@ -58,7 +60,7 @@ Language_tr_TR=Türkisch Language_sl_SI=Slowenisch Language_sv_SV=Schwedisch Language_sv_SE=Schwedisch -Language_sq_AL=Albanian +Language_sq_AL=Albanisch Language_sk_SK=Slovakisch Language_th_TH=Thailändisch Language_uk_UA=Ukrainisch diff --git a/htdocs/langs/de_DE/mails.lang b/htdocs/langs/de_DE/mails.lang index ec9ded17846..1364b70c808 100644 --- a/htdocs/langs/de_DE/mails.lang +++ b/htdocs/langs/de_DE/mails.lang @@ -79,6 +79,7 @@ MailtoEMail=Verknüpfung zu E-Mail ActivateCheckRead=Erlaube den Zugriff auf den "Abmelde"-Link ActivateCheckReadKey=Key use to encrypt URL use for "Read Receipt" and "Unsubcribe" feature EMailSentToNRecipients=E-Mail versandt an %s Empfänger. +XTargetsAdded=%s Empfänger der Liste zugefügt EachInvoiceWillBeAttachedToEmail=Ein Dokument mit der Standard-Vorlage für Rechnungen wird erstellt und an jede E-Mail angehängt. MailTopicSendRemindUnpaidInvoices=Zahlungserinnerung für Rechnung %s (%s) SendRemind=Zahlungserinnerung per E-Mail senden diff --git a/htdocs/langs/de_DE/main.lang b/htdocs/langs/de_DE/main.lang index 6936b0fc670..7d5451832dd 100644 --- a/htdocs/langs/de_DE/main.lang +++ b/htdocs/langs/de_DE/main.lang @@ -551,6 +551,7 @@ MailSentBy=E-Mail Absender TextUsedInTheMessageBody=E-Mail Text SendAcknowledgementByMail=Kenntnisnahme per E-Mail bestätigen NoEMail=Keine E-Mail +NoMobilePhone=No mobile phone Owner=Eigentümer DetectedVersion=Erkannte Version FollowingConstantsWillBeSubstituted=Nachfolgende Konstanten werden durch entsprechende Werte ersetzt. diff --git a/htdocs/langs/de_DE/products.lang b/htdocs/langs/de_DE/products.lang index 113471c82bf..f3ffd2fbb5b 100644 --- a/htdocs/langs/de_DE/products.lang +++ b/htdocs/langs/de_DE/products.lang @@ -16,7 +16,7 @@ ServiceCode=Service-Code ProductVatMassChange=MwSt-Massenänderung ProductVatMassChangeDesc=Mit dieser Seite kann ein Steuersatz für Produkte oder Services von einem Wert auf einen anderen geändert werden. Achtung: Diese Änderung erfolgt über die gesamte Datenbank! MassBarcodeInit=Mass barcode init -MassBarcodeInitDesc=This page can be used to initialize a barcode on objects that does not have barcode defined. Check before that setup of module barcode is complete. +MassBarcodeInitDesc=Hier können Objekte mit einem Barcode initialisiert werden, die noch keinen haben. Stellen Sie vor Benutzung sicher, dass die Einstellungen des Barcode-Moduls vollständig sind! ProductAccountancyBuyCode=Buchhaltung - Aufwandskonto ProductAccountancySellCode=Buchhaltung - Erlöskonto ProductOrService=Produkt oder Service @@ -28,8 +28,10 @@ ProductsAndServicesStatistics=Produkt- und Service-Statistik ProductsStatistics=Produktstatistik ProductsOnSell=Verfügbare Produkte ProductsNotOnSell=Aufgelassene Produkte +ProductsOnSellAndOnBuy=Produkte weder für Ein- noch Verkauf ServicesOnSell=Verfügbare Services ServicesNotOnSell=Aufgelassene Services +ServicesOnSellAndOnBuy=Services weder für Ein- noch Verkauf InternalRef=Interne Referenz LastRecorded=Zuletzt erfasste, verfügbare Produkte/Services LastRecordedProductsAndServices=%s zuletzt erfasste Produkte/Services @@ -70,6 +72,8 @@ PublicPrice=Öffentlicher Preis CurrentPrice=Aktueller Preis NewPrice=Neuer Preis MinPrice=Mindestverkaufspreis +MinPriceHT=Mindest-Verkaufspreis (ohne MwSt.) +MinPriceTTC=Mindest-Verkaufspreis (inkl. MwSt.) CantBeLessThanMinPrice=Der Verkaufspreis darf den Mindestpreis für dieses Produkt (%s ohne MwSt.) nicht unterschreiten. Diese Meldung kann auch angezeigt, wenn Sie einen zu hohen Rabatt geben. ContractStatus=Vertragsstatus ContractStatusClosed=Geschlossen @@ -179,6 +183,7 @@ ProductIsUsed=Produkt in Verwendung NewRefForClone=Artikel-Nr. des neuen Produkts/Leistungen CustomerPrices=Kundenpreise SuppliersPrices=Lieferantenpreise +SuppliersPricesOfProductsOrServices=Lieferanten-Preise (für Produkte oder Services) CustomCode=Interner Code CountryOrigin=Urspungsland HiddenIntoCombo=In ausgewählten Listen nicht anzeigen @@ -208,6 +213,7 @@ CostPmpHT=Net total VWAP ProductUsedForBuild=Automatisch für Produktion verbraucht ProductBuilded=Produktion fertiggestellt ProductsMultiPrice=Produkt Multi-Preis +ProductsOrServiceMultiPrice=Kunden-Preise (für Produkte oder Services, Multi-Preise) ProductSellByQuarterHT=Products turnover quarterly VWAP ServiceSellByQuarterHT=Services turnover quarterly VWAP Quarter1=1. Quartal diff --git a/htdocs/langs/de_DE/shop.lang b/htdocs/langs/de_DE/shop.lang index 2c56c7d864f..d435660b0f1 100644 --- a/htdocs/langs/de_DE/shop.lang +++ b/htdocs/langs/de_DE/shop.lang @@ -1,4 +1,5 @@ # Dolibarr language file - Source file is en_US - shop +FailedConnectDBCheckModuleSetup=Failed to connect to oscommerce database. Check your module setup Shop=Shop ShopWeb=Internetshop LastOrders=Letzte Bestellungen diff --git a/htdocs/langs/de_DE/stocks.lang b/htdocs/langs/de_DE/stocks.lang index c575e9e69d7..dd98502c9a0 100644 --- a/htdocs/langs/de_DE/stocks.lang +++ b/htdocs/langs/de_DE/stocks.lang @@ -110,8 +110,9 @@ ForThisWarehouse=Für dieses Lager ReplenishmentStatusDesc=Dies ist eine Liste aller Produkte, deren Lagerbestand unter dem Sollbestand liegt (bzw. unter der Alarmschwelle, wenn die Auswahlbox "Nur Alarm" gewählt ist) , die Ihnen Vorschläge für Lieferantenbestellungen liefert, um die Differenzen auszugleichen. ReplenishmentOrdersDesc=Dies ist die Liste aller offenen Lieferantenbestellungen Replenishments=Replenishments -NbOfProductBeforePeriod=Quantity of product %s in stock before selected period (< %s) -NbOfProductAfterPeriod=Quantity of product %s in stock after selected period (> %s) +NbOfProductBeforePeriod=Menge des Produkts %s im Lager vor der gewählten Periode (< %s) +NbOfProductAfterPeriod=Menge des Produkts %s im Lager nach der gewählten Periode (> %s) +MassMovement=Mass movement MassStockMovement=Massen-Umlagerung SelectProductInAndOutWareHouse=Wählen Sie ein Produkt, eine Menge, ein Quellen- und ein Ziel-Lager und klicken Sie dann auf "%s". Sobald Sie dies für alle erforderlichen Bewegungen getan haben, klicken Sie auf "%s". RecordMovement=Record transfert diff --git a/htdocs/langs/el_GR/admin.lang b/htdocs/langs/el_GR/admin.lang index 89cf1119477..88be1e931fa 100644 --- a/htdocs/langs/el_GR/admin.lang +++ b/htdocs/langs/el_GR/admin.lang @@ -116,7 +116,7 @@ LanguageBrowserParameter=Παράμετρος %s LocalisationDolibarrParameters=Παράμετροι τοπικών ρυθμίσεων ClientTZ=Ζώνη Ώρας client (χρήστης) ClientHour=Ωρα client (χρήστης) -OSTZ=Ζώνη Ώρας OS server +OSTZ=OS Time Zone του διακομιστή PHPTZ=Ζώνη Ώρας PHP server PHPServerOffsetWithGreenwich=PHP server offset width Greenwich (seconds) ClientOffsetWithGreenwich=Client/Browser offset width Greenwich (seconds) @@ -233,7 +233,9 @@ OfficialWebSiteFr=French official web site OfficialWiki=Dolibarr documentation on Wiki OfficialDemo=Dolibarr online demo OfficialMarketPlace=Official market place for external modules/addons -OfficialWebHostingService=Επίσημη υπηρεσίες web hosting (Cloud hosting) +OfficialWebHostingService=Υπηρεσίες που αναφέρονται για web hosting (Cloud hosting) +ReferencedPreferredPartners=Preferred Partners +OtherResources=Άλλοι πόροι ForDocumentationSeeWiki=For user or developer documentation (Doc, FAQs...),
    take a look at the Dolibarr Wiki:
    %s ForAnswersSeeForum=For any other questions/help, you can use the Dolibarr forum:
    %s HelpCenterDesc1=This area can help you to get a Help support service on Dolibarr. @@ -282,7 +284,7 @@ ThisIsProcessToFollow=This is setup to process: StepNb=Βήμα %s FindPackageFromWebSite=Find a package that provides feature you want (for example on official web site %s). DownloadPackageFromWebSite=Μεταφόρτωση πακέτου. -UnpackPackageInDolibarrRoot=Unpack package file into Dolibarr's root directory %s +UnpackPackageInDolibarrRoot=Αποσυμπίεσε το αρχείο εκεί που βρίσκεται η εγκατάσταση του Dolibarr %s SetupIsReadyForUse=Install is finished and Dolibarr is ready to use with this new component. NotExistsDirect=The alternative root directory is not defined.
    InfDirAlt=Since version 3 it is possible to define an alternative root directory.This allows you to store, same place, plug-ins and custom templates.
    Just create a directory at the root of Dolibarr (eg: custom).
    @@ -369,10 +371,10 @@ ExtrafieldSelectList = Select from table ExtrafieldSeparator=Separator ExtrafieldCheckBox=Checkbox ExtrafieldRadio=Radio button -ExtrafieldParamHelpselect=Parameters list have to be like key,value

    for exemple :
    1,value1
    2,value2
    3,value3
    ...

    In order to have the list depending on another :
    1,value1|parent_list_code:parent_key
    2,value2|parent_list_code:parent_key -ExtrafieldParamHelpcheckbox=Parameters list have to be like key,value

    for exemple :
    1,value1
    2,value2
    3,value3
    ... -ExtrafieldParamHelpradio=Parameters list have to be like key,value

    for exemple :
    1,value1
    2,value2
    3,value3
    ... -ExtrafieldParamHelpsellist=Parameters list comes from a table
    Syntax : table_name:label_field:id_field::filter
    Example : c_typent:libelle:id::filter

    filter can be a simple test (eg active=1) to display only active value
    if you want to filter on extrafields use syntaxt extra.fieldcode=... (where field code is the code of extrafield)

    In order to have the list depending on another :
    c_typent:libelle:id:parent_list_code|parent_column:filter +ExtrafieldParamHelpselect=Η λίστα παραμέτρων θα πρέπει να είναι σαν το κλειδί,value

    για παράδειγμα :
    1,value1
    2,value2
    3,value3
    ...

    Προκειμένου να έχει τη λίστα εξαρτώμενη με μια άλλη:
    1,value1|parent_list_code:parent_key
    2,value2|parent_list_code:parent_key +ExtrafieldParamHelpcheckbox=Η λίστα παραμέτρων θα πρέπει να είναι σαν το κλειδί,value

    για παράδειγμα :
    1,value1
    2,value2
    3,value3
    ... +ExtrafieldParamHelpradio=Η λίστα παραμέτρων θα πρέπει να είναι σαν το κλειδί,value

    για παράδειγμα :
    1,value1
    2,value2
    3,value3
    ... +ExtrafieldParamHelpsellist=Λίστα Παραμέτρων που προέρχεται από έναν πίνακα
    σύνταξη : table_name:label_field:id_field::filter
    παράδειγμα: c_typent:libelle:id::filter

    φίλτρο μπορεί να είναι μια απλή δοκιμή (eg active=1) για να εμφανίσετε μόνο μία ενεργό τιμή
    αν θέλετε να φιλτράρετε extrafields χρησιμοποιήστε τη σύνταξη extra.fieldcode=... (όπου κωδικός πεδίου είναι ο κωδικός του extrafield)

    Προκειμένου να έχει τον κατάλογο ανάλογα με ένα άλλο :
    c_typent:libelle:id:parent_list_code|parent_column:filter LibraryToBuildPDF=Library used to build PDF WarningUsingFPDF=Warning: Your conf.php contains directive dolibarr_pdf_force_fpdf=1. This means you use the FPDF library to generate PDF files. This library is old and does not support a lot of features (Unicode, image transparency, cyrillic, arab and asiatic languages, ...), so you may experience errors during PDF generation.
    To solve this and have a full support of PDF generation, please download TCPDF library, then comment or remove the line $dolibarr_pdf_force_fpdf=1, and add instead $dolibarr_lib_TCPDF_PATH='path_to_TCPDF_dir' LocalTaxDesc=Some countries apply 2 or 3 taxes on each invoice line. If this is the case, choose type for second and third tax and its rate. Possible type are:
    1 : local tax apply on products and services without vat (vat is not applied on local tax)
    2 : local tax apply on products and services before vat (vat is calculated on amount + localtax)
    3 : local tax apply on products without vat (vat is not applied on local tax)
    4 : local tax apply on products before vat (vat is calculated on amount + localtax)
    5 : local tax apply on services without vat (vat is not applied on local tax)
    6 : local tax apply on services before vat (vat is calculated on amount + localtax) @@ -472,7 +474,7 @@ Module410Desc=Webcalendar integration Module500Name=Ειδικά έξοδα (φόροι, εισφορές κοινωνικής ασφάλισης, μερίσματα) Module500Desc=Διαχείριση των ειδικών δαπανών, όπως οι φόροι, κοινωνικές εισφορές, μερίσματα και μισθούς Module510Name=Μισθοί -Module510Desc=Διαχείριση μισθών και πληρωμών των υπαλλήλων +Module510Desc=Διαχείριση υπαλλήλων, μισθών και πληρωμών Module600Name=Notifications Module600Desc=Send notifications by email on some Dolibarr business events to third party contacts Module700Name=Δωρεές @@ -495,15 +497,15 @@ Module2400Name=Ατζέντα Module2400Desc=Events/tasks and agenda management Module2500Name=Electronic Content Management Module2500Desc=Save and share documents -Module2600Name= WebServices -Module2600Desc= Enable the Dolibarr web services server -Module2700Name= Gravatar -Module2700Desc= Use online Gravatar service (www.gravatar.com) to show photo of users/members (found with their emails). Need an internet access +Module2600Name=WebServices +Module2600Desc=Enable the Dolibarr web services server +Module2700Name=Gravatar +Module2700Desc=Use online Gravatar service (www.gravatar.com) to show photo of users/members (found with their emails). Need an internet access Module2800Desc=FTP Client -Module2900Name= GeoIPMaxmind -Module2900Desc= GeoIP Maxmind conversions capabilities -Module3100Name= Skype -Module3100Desc= Προσθήκη του κουμπιού skype στην κάρτα επαφών +Module2900Name=GeoIPMaxmind +Module2900Desc=GeoIP Maxmind conversions capabilities +Module3100Name=Skype +Module3100Desc=Προσθήκη του κουμπιού skype στην κάρτα επαφών Module5000Name=Multi-company Module5000Desc=Allows you to manage multiple companies Module6000Name=Ροή εργασίας @@ -681,6 +683,10 @@ Permission401=Read discounts Permission402=Create/modify discounts Permission403=Validate discounts Permission404=Delete discounts +Permission510=Διαβάστε τους μισθούς +Permission512=Δημιουργία/Τροποποίηση μισθών +Permission514=Διαγραφή μισθών +Permission517=Εξαγωγή μισθών Permission531=Read services Permission532=Create/modify services Permission534=Delete services @@ -768,7 +774,7 @@ DictionarySource=Προέλευση των προτάσεων/παραγγελι DictionaryAccountancyplan=Λογιστικό σχέδιο DictionaryAccountancysystem=Μοντέλα λογιστικού σχεδίου SetupSaved=Οι ρυθμίσεις αποθηκεύτηκαν -BackToModuleList=Back to modules list +BackToModuleList=Πίσω στη λίστα με τα modules BackToDictionaryList=Επιστροφή στη λίστα λεξικών VATReceivedOnly=Special rate not charged VATManagement=Διαχείριση Φ.Π.Α. @@ -777,7 +783,7 @@ VATIsNotUsedDesc=By default the proposed VAT is 0 which can be used for cases li VATIsUsedExampleFR=In France, it means companies or organisations having a real fiscal system (Simplified real or normal real). A system in which VAT is declared. VATIsNotUsedExampleFR=In France, it means associations that are non VAT declared or companies, organisations or liberal professions that have chosen the micro enterprise fiscal system (VAT in franchise) and paid a franchise VAT without any VAT declaration. This choice will display the reference "Non applicable VAT - art-293B of CGI" on invoices. ##### Local Taxes ##### -LocalTax1IsUsed=Use second tax +LocalTax1IsUsed=Δεύτερος Φόρος Προστιθέμενης Αξίας LocalTax1IsNotUsed=Do not use second tax LocalTax1IsUsedDesc=Use a second type of tax (other than VAT) LocalTax1IsNotUsedDesc=Do not use other type of tax (other than VAT) @@ -807,7 +813,7 @@ NbOfDays=Πλήθος Ημερών AtEndOfMonth=Στο τέλος του μήνα Offset=Απόκλιση AlwaysActive=Πάντα εν ενεργεία -UpdateRequired=Your system needs to be updated. To do this, click on Update now. +UpdateRequired=Υπάρχει νεότερη έκδοση. Για να λάβεις τη νέα έκδοση, κάνε λήψη εδώ Update now. Upgrade=Αναβάθμιση MenuUpgrade=Αναβάθμιση / Επέκταση AddExtensionThemeModuleOrOther=Προσθήκη Αρθρώματος (θέμα, άρθρωμα, ...) @@ -852,7 +858,7 @@ MenuCompanySetup=Εταιρία/Οργανισμός MenuNewUser=Νέος χρήστης MenuTopManager=Διαχειριστής μενού κορυφής MenuLeftManager=Διαχειριστής αριστερού μενού -MenuManager=Menu manager +MenuManager=Διαχείριση Μενού MenuSmartphoneManager=Smartphone menu manager DefaultMenuTopManager=Διαχειριστής μενού κορυφής DefaultMenuLeftManager=Διαχειριστής αριστερού μενού @@ -943,12 +949,12 @@ OnceSetupFinishedCreateUsers=Warning, you are a Dolibarr administrator user. Adm MiscellaneousDesc=Define here all other parameters related to security. LimitsSetup=Limits/Precision setup LimitsDesc=You can define limits, precisions and optimisations used by Dolibarr here -MAIN_MAX_DECIMALS_UNIT=Max decimals for unit prices -MAIN_MAX_DECIMALS_TOT=Max decimals for total prices +MAIN_MAX_DECIMALS_UNIT=Χρήση Δεκαδικών ψηφίων στις τιμές ειδών +MAIN_MAX_DECIMALS_TOT=μέγιστος αριθμός δεκαδικών στη συνολική πληρωτέα τιμή MAIN_MAX_DECIMALS_SHOWN=Max decimals for prices shown on screen (Add ... after this number if you want to see ... when number is truncated when shown on screen) MAIN_DISABLE_PDF_COMPRESSION=Use PDF compression for generated PDF files. MAIN_ROUNDING_RULE_TOT= Size of rounding range (for rare countries where rounding is done on something else than base 10) -UnitPriceOfProduct=Net unit price of a product +UnitPriceOfProduct=Καθαρή τιμή επί του προϊόντος TotalPriceAfterRounding=Total price (net/vat/incl tax) after rounding ParameterActiveForNextInputOnly=Parameter effective for next input only NoEventOrNoAuditSetup=No security event has been recorded yet. This can be normal if audit has not been enabled on "setup - security - audit" page. @@ -999,7 +1005,7 @@ ExtraFieldsSupplierOrders=Complementary attributes (orders) ExtraFieldsSupplierInvoices=Complementary attributes (invoices) ExtraFieldsProject=Complementary attributes (projects) ExtraFieldsProjectTask=Complementary attributes (tasks) -ExtraFieldHasWrongValue=Αποδοθούν %s έχει λάθος τιμή. +ExtraFieldHasWrongValue=Το χαρακτηριστικό %s έχει λάθος τιμή. AlphaNumOnlyCharsAndNoSpace=only alphanumericals characters without space AlphaNumOnlyLowerCharsAndNoSpace=μόνο αλφαριθμητικά και πεζά γράμματα χωρίς κενά SendingMailSetup=Ρύθμιση του e-mail σας αποστολές από @@ -1018,7 +1024,7 @@ SuhosinSessionEncrypt=Session storage encrypted by Suhosin ConditionIsCurrently=Condition is currently %s TestNotPossibleWithCurrentBrowsers=Αυτόματη ανίχνευση δεν είναι δυνατή YouUseBestDriver=Μπορείτε να χρησιμοποιήσετε το πρόγραμμα οδήγησης %s που είναι καλύτερος οδηγός που διατίθεται σήμερα. -YouDoNotUseBestDriver=Μπορείτε να χρησιμοποιήσετε το πρόγραμμα οδήγησης %s αλλά και του οδηγού %s συνιστάται. +YouDoNotUseBestDriver=Μπορείτε να χρησιμοποιήσετε τη μονάδα %s αλλά ο οδηγός %s προτείνετε. NbOfProductIsLowerThanNoPb=You have only %s products/services into database. This does not required any particular optimization. SearchOptim=Βελτιστοποίηση αναζήτησης YouHaveXProductUseSearchOptim=You have %s product into database. You should add the constant PRODUCT_DONOTSEARCH_ANYWHERE to 1 into Home-Setup-Other, you limit the search to the beginning of strings making possible for database to use index and you should get an immediate response. @@ -1073,7 +1079,7 @@ WebCalServer=Server hosting calendar database WebCalDatabaseName=Όνομα βάσης δεδομένων WebCalUser=User to access database WebCalSetupSaved=Webcalendar setup saved successfully. -WebCalTestOk=Connection to server '%s' on database '%s' with user '%s' successfull. +WebCalTestOk=Σύνδεση με τον διακομιστή '%s' στη βάση δεδομένων '%s' με το χρήστη '%s' είναι επιτυχείς. WebCalTestKo1=Connection to server '%s' succeed but database '%s' could not be reached. WebCalTestKo2=Connection to server '%s' with user '%s' failed. WebCalErrorConnectOkButWrongDatabase=Connection succeeded but database doesn't look to be a Webcalendar database. @@ -1119,7 +1125,7 @@ WatermarkOnDraftProposal=Watermark on draft commercial proposals (none if empty) OrdersSetup=Order management setup OrdersNumberingModules=Orders numbering models OrdersModelModule=Order documents models -HideTreadedOrders=Hide the treated or canceled orders in the list +HideTreadedOrders=Απόκρυψη των επεξεργασμένων ή ακυρωμένων παραγγελιών από την λίστα ValidOrderAfterPropalClosed=To validate the order after proposal closer, makes it possible not to step by the provisional order FreeLegalTextOnOrders=Free text on orders WatermarkOnDraftOrders=Watermark on draft orders (none if empty) @@ -1214,9 +1220,9 @@ LDAPSynchroKO=Failed synchronization test LDAPSynchroKOMayBePermissions=Failed synchronization test. Check that connexion to server is correctly configured and allows LDAP udpates LDAPTCPConnectOK=TCP connect to LDAP server successful (Server=%s, Port=%s) LDAPTCPConnectKO=TCP connect to LDAP server failed (Server=%s, Port=%s) -LDAPBindOK=Connect/Authentificate to LDAP server sucessfull (Server=%s, Port=%s, Admin=%s, Password=%s) +LDAPBindOK=Σύνδεση/έλεγχος ταυτότητας με το διακομιστή LDAP επιτυχή (Server=%s, Port=%s, Admin=%s, Password=%s) LDAPBindKO=Connect/Authentificate to LDAP server failed (Server=%s, Port=%s, Admin=%s, Password=%s) -LDAPUnbindSuccessfull=Disconnect successfull +LDAPUnbindSuccessfull=Επιτυχής αποσύνδεση LDAPUnbindFailed=Disconnect failed LDAPConnectToDNSuccessfull=Connection to DN (%s) successful LDAPConnectToDNFailed=Connection to DN (%s) failed @@ -1273,7 +1279,7 @@ LDAPFieldSidExample=Example : objectsid LDAPFieldEndLastSubscription=Date of subscription end LDAPFieldTitle=Post/Function LDAPFieldTitleExample=Example: title -LDAPParametersAreStillHardCoded=LDAP parametres are still hardcoded (in contact class) +LDAPParametersAreStillHardCoded=Παράμετροι του LDAP εξακολουθούν να είναι ενσωματωμένες (στην κατηγορία επικοινωνία) LDAPSetupNotComplete=LDAP setup not complete (go on others tabs) LDAPNoUserOrPasswordProvidedAccessIsReadOnly=No administrator or password provided. LDAP access will be anonymous and in read only mode. LDAPDescContact=This page allows you to define LDAP attributes name in LDAP tree for each data found on Dolibarr contacts. @@ -1286,7 +1292,7 @@ PerfDolibarr=Επιδόσεις ρύθμισης/βελτιστοποίηση τ YouMayFindPerfAdviceHere=Θα βρείτε σε αυτή τη σελίδα ορισμένους ελέγχους ή συμβουλές που σχετίζονται με την απόδοση. NotInstalled=Δεν έχει εγκατασταθεί, οπότε ο server σας δεν έχει επιβραδυνθεί από αυτό. ApplicativeCache=Εφαρμογή Cache -MemcachedNotAvailable=No applicative cache found. You can enhance performance by installing a cache server Memcached and a module able to use this cache server.
    More information here http://wiki.dolibarr.org/index.php/Module_MemCached_EN.
    Note that a lot of web hosting provider does not provide such cache server. +MemcachedNotAvailable=Δεν βρέθηκε applicative προσωρινή μνήμη. Μπορείτε να βελτιώσετε την απόδοση με την εγκατάσταση ενός Memcached διακομιστή προσωρινής μνήμης και ένα module θα είναι σε θέση να χρησιμοποίηση το διακομιστή προσωρινής μνήμης.
    Περισσότερες πληροφορίες εδώ http://wiki.dolibarr.org/index.php/Module_MemCached_EN.
    Σημειώστε ότι πολλοί πάροχοι web hosting δεν παρέχουν διακομιστή cache. MemcachedModuleAvailableButNotSetup=Το module memcached για εφαρμογή cache βρέθηκε, αλλά η εγκατάσταση του module δεν είναι πλήρης. MemcachedAvailableAndSetup=Το module memcache προορίζεται για χρήση memcached του διακομιστή όταν είναι ενεργοποιημένη. OPCodeCache=OPCode cache @@ -1429,7 +1435,7 @@ OptionVATDefault=Standard OptionVATDebitOption=Option services on Debit OptionVatDefaultDesc=VAT is due:
    - on delivery for goods (we use invoice date)
    - on payments for services OptionVatDebitOptionDesc=VAT is due:
    - on delivery for goods (we use invoice date)
    - on invoice (debit) for services -SummaryOfVatExigibilityUsedByDefault=Time of VAT exigibility by default according to choosed option: +SummaryOfVatExigibilityUsedByDefault=Χρόνος της καταλληλότητας του ΦΠΑ εξ ορισμού ανάλογα την επιλογή: OnDelivery=Κατά την αποστολή OnPayment=Κατά την πληρωμή OnInvoice=Κατά την έκδοση τιμ/γίου @@ -1446,7 +1452,7 @@ AccountancyCodeBuy=Purchase account. code AgendaSetup=Events and agenda module setup PasswordTogetVCalExport=Key to authorize export link PastDelayVCalExport=Do not export event older than -AGENDA_USE_EVENT_TYPE=Χρησιμοποιήστε τα γεγονότα είδη (διαχείριση σε μενού Setup -> dictionnary -> Τύπος γεγονότα της ημερήσιας διάταξης) +AGENDA_USE_EVENT_TYPE=Χρησιμοποιήστε τους τύπους των γεγονότων (διαχείριση στο μενού Ρυθμίσεις -> Λεξικό -> Type of agenda events) ##### ClickToDial ##### ClickToDialDesc=This module allows to add an icon after phone numbers. A click on this icon will call a server with a particular URL you define below. This can be used to call a call center system from Dolibarr that can call the phone number on a SIP system for example. ##### Point Of Sales (CashDesk) ##### diff --git a/htdocs/langs/el_GR/bills.lang b/htdocs/langs/el_GR/bills.lang index 13cae8688a3..b7a53568915 100644 --- a/htdocs/langs/el_GR/bills.lang +++ b/htdocs/langs/el_GR/bills.lang @@ -23,7 +23,7 @@ InvoiceProFormaAsk=Προτιμολόγιο InvoiceProFormaDesc=Το Προτιμολόγιο είναι η εικόνα ενός πραγματικού τιμολογίου, χωρίς όμως να έχει χρηματική αξία InvoiceReplacement=Τιμολόγιο Αντικατάστασης InvoiceReplacementAsk=Αντικατάσταση τιμολογίου με -InvoiceReplacementDesc=Replacement invoice is used to cancel and replace completely an invoice with no payment already received.

    Note: Only invoices with no payment on it can be replaced. If the invoice you replace is not yet closed, it will be automatically closed to 'abandoned'. +InvoiceReplacementDesc=Τιμολόγιο αντικατάστασης χρησιμοποιείται για να ακυρώσει και να αντικαταστήσει πλήρως ένα απλήρωτο τιμολόγιο.

    Σημείωση: Μόνο τα τιμολόγια χωρίς καμία πληρωμή μπορούν να αντικατασταθούν. Εάν το τιμολόγιο που θα αντικατασταθεί δεν έχει κλείσει, θα κλείσει αυτόματα και θα σημειωθεί «εγκαταλειμμένο». InvoiceAvoir=Πιστωτικό σημείωμα InvoiceAvoirAsk=Πιστωτικό σημείωμα για την διόρθωση τιμολογίου InvoiceAvoirDesc=Το πιστωτικό σημείωμαείναι ένα αρνητικό τιμολόγιο που χρησιμοποιείτε για να λύσει τη κατάσταση κατά την οποία το σύνολο του τιμολογίου διαφέρει από το σύνολο της πραγματικής πληρωμής (ίσως επειδή ο πελάτης πλήρωσε περισσότερα -- από λάθος, ή επειδή πλήρωσε λιγότερα και επέστρεψε κάποια προϊόντα). @@ -398,8 +398,8 @@ NoteListOfYourUnpaidInvoices=Σημείωση: Αυτή η λίστα περιέ RevenueStamp=Revenue stamp YouMustCreateInvoiceFromThird=Αυτή η επιλογή είναι διαθέσιμη όταν δημιουργήσετε τιμολόγιο από την καρτέλα "πελάτης" από άλλους κατασκευαστές PDFCrabeDescription=Τιμολόγιο πρότυπο PDF Crabe. Ένα πλήρες πρότυπο τιμολογίου (συνιστώμενο πρότυπο) -TerreNumRefModelDesc1=Return number with format %syymm-nnnn for standard invoices and %syymm-nnnn for credit notes where yy is year, mm is month and nnnn is a sequence with no break and no return to 0 -MarsNumRefModelDesc1=Return number with format %syymm-nnnn for standard invoices, %syymm-nnnn for replacement invoices, %syymm-nnnn for credit notes and %syymm-nnnn for credit notes where yy is year, mm is month and nnnn is a sequence with no break and no return to 0 +TerreNumRefModelDesc1=Επιστρέψετε αριθμό με μορφή %syymm-nnnn για τυπικά τιμολόγια και %syymm-nnnn για πιστωτικά τιμολόγια όπου yy είναι το έτος, mm είναι ο μήνας και nnnn είναι μια ακολουθία αρίθμησης χωρίς διάλειμμα και χωρίς επιστροφή στο 0 +MarsNumRefModelDesc1=Επιστρέψετε αριθμό με μορφή %syymm-nnnn για τυπικά τιμολόγια και %syymm-nnnn για τα τιμολόγια αντικατάστασης, %syymm-nnnn για πιστωτικά τιμολόγια και %syymm-nnnn για πιστωτικά τιμολόγια όπου yy είναι το έτος, mm είναι ο μήνας και nnnn είναι μια ακολουθία αρίθμησης χωρίς διάλειμμα και χωρίς επιστροφή στο 0 TerreNumRefModelError=A bill starting with $syymm already exists and is not compatible with this model of sequence. Remove it or rename it to activate this module. ##### Types de contacts ##### TypeContact_facture_internal_SALESREPFOLL=Representative following-up customer invoice diff --git a/htdocs/langs/el_GR/contracts.lang b/htdocs/langs/el_GR/contracts.lang index 3a9c0698d02..41dd8d76b80 100644 --- a/htdocs/langs/el_GR/contracts.lang +++ b/htdocs/langs/el_GR/contracts.lang @@ -89,6 +89,8 @@ ListOfServicesToExpireWithDuration=Λίστα των Υπηρεσιών λήγε ListOfServicesToExpireWithDurationNeg=Κατάλογος των υπηρεσιών έληξε από περισσότερες, από %s ημέρες ListOfServicesToExpire=Κατάλογος Υπηρεσιών προς λήξει NoteListOfYourExpiredServices=Αυτή η λίστα περιέχει μόνο τις υπηρεσίες των συμβάσεων για λογαριασμό ΠΕΛ./ΠΡΟΜ. που συνδέονται ως εκπρόσωπος πώληση. +StandardContractsTemplate=Οι πρότυπες συμβάσεις +ContactNameAndSignature=Για %s, το όνομα και η υπογραφή: ##### Types de contacts ##### TypeContact_contrat_internal_SALESREPSIGN=Σύμβαση πώλησης υπογραφή εκπροσώπου diff --git a/htdocs/langs/el_GR/exports.lang b/htdocs/langs/el_GR/exports.lang index 13cb609ac63..b4520cdeafd 100644 --- a/htdocs/langs/el_GR/exports.lang +++ b/htdocs/langs/el_GR/exports.lang @@ -8,7 +8,7 @@ ImportableDatas=Importable dataset SelectExportDataSet=Choose dataset you want to export... SelectImportDataSet=Choose dataset you want to import... SelectExportFields=Choose fields you want to export, or select a predefined export profile -SelectImportFields=Choose source file fields you want to import and their target field in database by moving them up and down with anchor %s, or select a predefined import profil: +SelectImportFields=Επιλέξτε τα πεδία του αρχείου προέλευσης που θέλετε να εισαγάγετε και τον τομέα-στόχο στη βάση δεδομένων μετακινώντας τα επάνω και προς τα κάτω %s, ή επιλέξτε ένα προκαθορισμένο προφίλ εισαγωγής: NotImportedFields=Fields of source file not imported SaveExportModel=Save this export profile if you plan to reuse it later... SaveImportModel=Save this import profile if you plan to reuse it later... @@ -81,7 +81,7 @@ DoNotImportFirstLine=Do not import first line of source file NbOfSourceLines=Number of lines in source file NowClickToTestTheImport=Check import parameters you have defined. If they are correct, click on button "%s" to launch a simulation of import process (no data will be changed in your database, it's only a simulation for the moment)... RunSimulateImportFile=Launch the import simulation -FieldNeedSource=This fiels in database require a data from source file +FieldNeedSource=Το πεδίο απαιτεί δεδομένα από το αρχείο προέλευσης SomeMandatoryFieldHaveNoSource=Some mandatory fields have no source from data file InformationOnSourceFile=Information on source file InformationOnTargetTables=Information on target fields diff --git a/htdocs/langs/el_GR/holiday.lang b/htdocs/langs/el_GR/holiday.lang index 3c5bf5a1b1c..838f62eb8de 100644 --- a/htdocs/langs/el_GR/holiday.lang +++ b/htdocs/langs/el_GR/holiday.lang @@ -8,7 +8,6 @@ NotActiveModCP=Πρέπει να ενεργοποιήσετε τις άδειε NotConfigModCP=Πρέπει να ρυθμίσετε τις άδειες στο module για να δείτε αυτή τη σελίδα. Για να το κάνετε αυτό, πατήστε εδώ . NoCPforUser=Δεν υπάρχει ζήτηση για άδεια. AddCP=Εφαρμογή για άδεια -CPErrorSQL=Παρουσιάστηκε σφάλμα στην SQL: Employe=Εργαζόμενος DateDebCP=Ημερ. έναρξης DateFinCP=Ημερ. τέλους diff --git a/htdocs/langs/el_GR/interventions.lang b/htdocs/langs/el_GR/interventions.lang index 6fb43e589e2..b0b234fdd41 100644 --- a/htdocs/langs/el_GR/interventions.lang +++ b/htdocs/langs/el_GR/interventions.lang @@ -1,15 +1,15 @@ # Dolibarr language file - Source file is en_US - interventions Intervention=Παρέμβαση Interventions=Παρεμβάσεις -InterventionCard=Κάρτα παρέμβασης +InterventionCard=Καρτέλα παρέμβασης NewIntervention=Νέα παρέμβαση AddIntervention=Προσθ. παρέμβασης -ListOfInterventions=Κατάλογος παρεμβάσεων -EditIntervention=Επεξεργασία παρέμβασης -ActionsOnFicheInter=Ενέργειες για την παρέμβαση -LastInterventions=Τελευταία παρεμβάσεις %s +ListOfInterventions=Λίστα παρεμβάσεων +EditIntervention=Τροποποίηση παρέμβασης +ActionsOnFicheInter=Δράσεις για την παρέμβαση +LastInterventions=Τελευταίες %s παρεμβάσεις AllInterventions=Όλες οι παρεμβάσεις -CreateDraftIntervention=Δημιουργία σχεδίου +CreateDraftIntervention=Δημιουργία πρόχειρη CustomerDoesNotHavePrefix=Ο πελάτης δεν έχει πρόθεμα InterventionContact=Παρέμβαση επαφής DeleteIntervention=Διαγραφή παρέμβασης @@ -20,23 +20,23 @@ ConfirmDeleteIntervention=Είστε σίγουροι ότι θέλετε να ConfirmValidateIntervention=Είστε σίγουροι ότι θέλετε να κατοχυρωθεί η παρέμβαση αυτή με το όνομα %s ; ConfirmModifyIntervention=Είστε σίγουροι ότι θέλετε να τροποποιήσετε αυτήν την παρέμβαση; ConfirmDeleteInterventionLine=Είστε σίγουροι ότι θέλετε να διαγράψετε αυτή τη γραμμή παρέμβασης; -NameAndSignatureOfInternalContact=Όνομα και υπογραφή της παρέμβασης: +NameAndSignatureOfInternalContact=Όνομα και υπογραφή του παρεμβαίνοντος: NameAndSignatureOfExternalContact=Όνομα και υπογραφή του πελάτη: -DocumentModelStandard=Βασικό μοντέλο εγγράφου για τις παρεμβάσεις +DocumentModelStandard=Τυπικό είδος εγγράφου παρέμβασης InterventionCardsAndInterventionLines=Παρεμβάσεις και τις γραμμές των παρεμβάσεων ClassifyBilled=Ταξινόμηση "Τιμολογημένων" StatusInterInvoiced=Τιμολογείται RelatedInterventions=Οι παρεμβάσεις που σχετίζονται ShowIntervention=Εμφάνιση παρέμβασης ##### Types de contacts ##### -TypeContact_fichinter_internal_INTERREPFOLL=Εκπρόσωπος που παρακολουθεί την παρέμβαση -TypeContact_fichinter_internal_INTERVENING=Παρεμβαίνοντας +TypeContact_fichinter_internal_INTERREPFOLL=Αντιπρόσωπος που παρακολουθεί την παρέμβαση +TypeContact_fichinter_internal_INTERVENING=Παρεμβαίνων TypeContact_fichinter_external_BILLING=Χρέωση επαφής με τον πελάτη TypeContact_fichinter_external_CUSTOMER=Σε συνέχεια επαφή με τον πελάτη # Modele numérotation ArcticNumRefModelDesc1=Γενικός αριθμός μοντέλου ArcticNumRefModelError=Αποτυχία ενεργοποίησης -PacificNumRefModelDesc1=Return numero with format %syymm-nnnn where yy is year, mm is month and nnnn is a sequence with no break and no return to 0 -PacificNumRefModelError=An intervention card starting with $syymm already exists and is not compatible with this model of sequence. Remove it or rename it to activate this module. +PacificNumRefModelDesc1=Αριθμός επιστροφής με μορφή %syymm-nnnn όπυ yy το έτος, mm ο μήνας και nnnn μια ακολουθία χωρίς διακοπή και χωρίς επιστροφή στο 0. +PacificNumRefModelError=Μια καρτέλα παρέμβασης με $syymm ήδη υπάρχει και δεν είναι συμβατή με αυτή την ακολουθία. Απομακρύνετε την ή μετονομάστε την για να ενεργοποιήσετε το module. PrintProductsOnFichinter=Εκτυπώστε προϊόντα στην κάρτα παρέμβασης PrintProductsOnFichinterDetails=Για τις παρεμβάσεις που προέρχονται από παραγγελίες diff --git a/htdocs/langs/el_GR/languages.lang b/htdocs/langs/el_GR/languages.lang index 3b89622cce0..a1291dfa5cf 100644 --- a/htdocs/langs/el_GR/languages.lang +++ b/htdocs/langs/el_GR/languages.lang @@ -19,8 +19,9 @@ Language_en_SA=Αγγλικά (Σαουδική Αραβία) Language_en_US=Αγγλικά (Ηνωμένων Πολιτειών) Language_en_ZA=Αγγλικά (Νότια Αφρική) Language_es_ES=Ισπανικά +Language_es_DO=Ισπανικά (Δομινικανή Δημοκρατία) Language_es_AR=Ισπανικά (Αργεντινή) -Language_es_CL=Spanish (Chile) +Language_es_CL=Ισπανικά (Χιλή) Language_es_HN=Ισπανικά (Ονδούρα) Language_es_MX=Ισπανικά (Μεξικό) Language_es_PY=Ισπανικά (Παραγουάη) @@ -38,6 +39,7 @@ Language_fr_NC=Γαλλικά (Νέα Καληδονία) Language_he_IL=Εβραϊκά Language_hr_HR=Κροατία Language_hu_HU=Ουγγρικά +Language_id_ID=Ινδονησίας Language_is_IS=Ισλανδικά Language_it_IT=Ιταλικά Language_ja_JP=Ιαπωνικά @@ -58,7 +60,7 @@ Language_tr_TR=Τούρκικα Language_sl_SI=Σλοβενικά Language_sv_SV=Σουηδικά Language_sv_SE=Σουηδικά -Language_sq_AL=Albanian +Language_sq_AL=Αλβανικά Language_sk_SK=Σλοβακική Language_th_TH=Ταϊλάνδης Language_uk_UA=Ουκρανικά diff --git a/htdocs/langs/el_GR/mails.lang b/htdocs/langs/el_GR/mails.lang index b12bc15cca2..92d71df9b11 100644 --- a/htdocs/langs/el_GR/mails.lang +++ b/htdocs/langs/el_GR/mails.lang @@ -79,6 +79,7 @@ MailtoEMail=Hyper σύνδεσμο σε email ActivateCheckRead=Επιτρέπετε τη χρήση του "Unsubcribe" σύνδεσμου ActivateCheckReadKey=Κλειδί χρήσης για την κρυπτογράφηση του URL για "Διαβάστε Παραλαβή" και "Διαγραφή" χαρακτηριστικό EMailSentToNRecipients=EMail αποστέλλονται στους παραλήπτες %s. +XTargetsAdded=%s παραλήπτες που προστέθηκαν στο κατάλογο των στόχων EachInvoiceWillBeAttachedToEmail=Ένα έγγραφο χρησιμοποιώντας το προεπιλεγμένο τιμολόγιο θα δημιουργηθεί και θα επισυνάπτεται σε κάθε email. MailTopicSendRemindUnpaidInvoices=Υπενθύμιση του τιμολογίου %s (%s) SendRemind=Αποστολή υπενθύμισης με EMails diff --git a/htdocs/langs/el_GR/main.lang b/htdocs/langs/el_GR/main.lang index 74905a759a2..460f3c09e45 100644 --- a/htdocs/langs/el_GR/main.lang +++ b/htdocs/langs/el_GR/main.lang @@ -140,7 +140,7 @@ Modify=Τροποποίηση Edit=Επεξεργασία Validate=Επικύρωση ToValidate=Προς Επικύρωση -Save=Save +Save=Αποθήκευση SaveAs=Αποθήκευση Ως TestConnection=Δοκιμή Σύνδεσης ToClone=Κλωνοποίηση @@ -551,6 +551,7 @@ MailSentBy=Το email στάλθηκε από TextUsedInTheMessageBody=Κείμενο email SendAcknowledgementByMail=Αποστολή επιβεβαίωσης με email NoEMail=Χωρίς email +NoMobilePhone=Χωρείς κινητό τηλέφωνο Owner=Ιδιοκτήτης DetectedVersion=Εντοπισμένη έκδοση FollowingConstantsWillBeSubstituted=Οι ακόλουθες σταθερές θα αντικαταστασθούν με τις αντίστοιχες τιμές diff --git a/htdocs/langs/el_GR/products.lang b/htdocs/langs/el_GR/products.lang index bd5a6b16a76..41c087e1a67 100644 --- a/htdocs/langs/el_GR/products.lang +++ b/htdocs/langs/el_GR/products.lang @@ -28,8 +28,10 @@ ProductsAndServicesStatistics=Στατιστικά Προϊόντων και Υ ProductsStatistics=Στατιστικά Προϊόντων ProductsOnSell=Διαθέσιμα Προϊόντα ProductsNotOnSell=Παρωχημένα Προϊόντα +ProductsOnSellAndOnBuy=Προϊόντων που δεν προορίζονται για αγορά ServicesOnSell=Διαθέσιμες Υπηρεσίες ServicesNotOnSell=Παρωχημένες Υπηρεσίες +ServicesOnSellAndOnBuy=Υπηρεσίες που δεν είναι προς πώληση, ούτε την αγορά InternalRef=Εσωτερική Παραπομπή LastRecorded=Last products/services on sell recorded LastRecordedProductsAndServices=%s τελευταία εγγεγραμένα προϊόντα/υπηρεσίες @@ -70,6 +72,8 @@ PublicPrice=Δημόσια Τιμή CurrentPrice=Τρέχουσα Τιμή NewPrice=Νέα Τιμή MinPrice=Ελάχιστη Τιμή Πώλησης +MinPriceHT=Ελάχιστη τιμή πώλησης (μετά από φόρους) +MinPriceTTC=Ελάχιστη τιμή πώλησης (συμπ. Φ.Π.Α) CantBeLessThanMinPrice=Η τιμή πώλησης δεν μπορεί να είναι μικρότερη από την ορισμένη ελάχιστη τιμή πώλησης (%s χωρίς Φ.Π.Α.) ContractStatus=Κατάσταση Συμβολαίου ContractStatusClosed=Κλειστό @@ -179,6 +183,7 @@ ProductIsUsed=Μεταχειρισμένο NewRefForClone=Ref. of new product/service CustomerPrices=Τιμές πελατών SuppliersPrices=Τιμές προμηθευτών +SuppliersPricesOfProductsOrServices=Τιμές προμηθευτών (προϊόντων ή υπηρεσιών) CustomCode=Τελωνειακός Κώδικας CountryOrigin=Χώρα προέλευσης HiddenIntoCombo=Κρυμμένο σε λίστες επιλογής @@ -208,6 +213,7 @@ CostPmpHT=Net total VWAP ProductUsedForBuild=Auto consumed by production ProductBuilded=Production completed ProductsMultiPrice=Προϊόν πολλαπλών-τιμών +ProductsOrServiceMultiPrice=Τιμές Πελατών (προϊόντων ή υπηρεσιών, πολύ-τιμές) ProductSellByQuarterHT=Προϊόντα του κύκλου εργασιών τριμηνιαία VWAP ServiceSellByQuarterHT=Υπηρεσίες του κύκλου εργασιών τριμηνιαία VWAP Quarter1=1ο. Τέταρτο diff --git a/htdocs/langs/el_GR/shop.lang b/htdocs/langs/el_GR/shop.lang index cd665e598e4..1c353b5677a 100644 --- a/htdocs/langs/el_GR/shop.lang +++ b/htdocs/langs/el_GR/shop.lang @@ -1,4 +1,5 @@ # Dolibarr language file - Source file is en_US - shop +FailedConnectDBCheckModuleSetup=Failed to connect to oscommerce database. Check your module setup Shop=Κατάστημα ShopWeb=Web Shop LastOrders=Τελευταία παραγγελίες diff --git a/htdocs/langs/el_GR/sms.lang b/htdocs/langs/el_GR/sms.lang index f9ffdba57f9..dd313b1d63c 100644 --- a/htdocs/langs/el_GR/sms.lang +++ b/htdocs/langs/el_GR/sms.lang @@ -1,7 +1,7 @@ # Dolibarr language file - Source file is en_US - sms Sms=Sms -SmsSetup=Sms setup -SmsDesc=Αυτή η σελίδα σας επιτρέπει να ορίσετε επιλογές globals σε SMS χαρακτηριστικά +SmsSetup=Sms ρύθμιση +SmsDesc=Αυτή η σελίδα σας επιτρέπει να ορίσετε γενικές επιλογές σε SMS χαρακτηριστικά SmsCard=SMS Κάρτα AllSms=Όλες οι καμπάνιες SMS SmsTargets=Στόχοι @@ -14,13 +14,13 @@ SmsTopic=Θέμα του SMS SmsText=Μήνυμα SmsMessage=Μήνυμα SMS ShowSms=Εμφάνιση Sms -ListOfSms=Λίστα καμπάνιες SMS +ListOfSms=Λίστα καμπανιών SMS NewSms=Νέα καμπάνια SMS EditSms=Επεξεργασία Sms ResetSms=Νέα αποστολή -DeleteSms=Διαγραφή Sms εκστρατεία +DeleteSms=Διαγραφή εκστρατείας Sms DeleteASms=Αφαιρέστε μια εκστρατεία Sms -PreviewSms=Previuw Sms +PreviewSms=Προεπισκόπηση Sms PrepareSms=Ετοιμάστε Sms CreateSms=Δημιουργία Sms SmsResult=Αποτέλεσμα της αποστολής sms @@ -31,23 +31,23 @@ SmsStatusDraft=Σχέδιο SmsStatusValidated=Επικυρωμένη SmsStatusApproved=Εγκεκριμένο SmsStatusSent=Εστάλη -SmsStatusSentPartialy=Απεσταλμένα μερικώς -SmsStatusSentCompletely=Απεσταλμένα εντελώς +SmsStatusSentPartialy=Μερικώς απεσταλμένα +SmsStatusSentCompletely=Εντελώς απεσταλμένα SmsStatusError=Σφάλμα SmsStatusNotSent=Δεν αποστέλλεται -SmsSuccessfulySent=Sms σωστά έστειλε (από %s να %s) -ErrorSmsRecipientIsEmpty=Αριθμός στόχος είναι άδειο +SmsSuccessfulySent=Έστειλε σωστά Sms (από %s να %s) +ErrorSmsRecipientIsEmpty=Ο αριθμός στόχου είναι άδειος WarningNoSmsAdded=Κανένα νέο αριθμό τηλεφώνου για να προσθέσετε στη λίστα στόχων ConfirmValidSms=Έχετε επιβεβαιώσει την επικύρωση αυτής της εκστρατείας; -ConfirmResetMailing=Προσοχή, αν κάνετε μια reinit των SMS %s εκστρατείας, θα επιτρέψει να κάνει μια μαζική αποστολή της για δεύτερη φορά. Είναι πραγματικά αυτό που wan να κάνετε; +ConfirmResetMailing=Προσοχή, αν κάνετε μια επανάληψη των SMS %s εκστρατείας, θα επιτρέψει να κάνει μια μαζική αποστολή της για δεύτερη φορά. Είναι πραγματικά αυτό που χρειάζετε να κάνετε; ConfirmDeleteMailing=Έχετε επιβεβαιώσει την αφαίρεση της καμπάνιας; NbOfRecipients=Αριθμός των στόχων NbOfUniqueSms=Nb DOF μοναδικούς αριθμούς τηλεφώνου NbOfSms=Nbre του phon αριθμούς ThisIsATestMessage=Αυτό είναι ένα δοκιμαστικό μήνυμα SendSms=Αποστολή SMS -SmsInfoCharRemain=Αρ. υπόλοιπους χαρακτήρες -SmsInfoNumero= (Μορφή διεθνούς δηλαδή: 33899701761) +SmsInfoCharRemain=Αρ. υπόλοιπων χαρακτήρων +SmsInfoNumero= (Μορφή διεθνούς δηλαδή: +308997017610) DelayBeforeSending=Καθυστέρηση πριν από την αποστολή (λεπτά) -SmsNoPossibleRecipientFound=Δεν στόχος διαθέσιμα. Ελέγξτε την εγκατάσταση του SMS τον παροχέα σας. +SmsNoPossibleRecipientFound=Δεν υπάρχει στόχος. Ελέγξτε την εγκατάσταση του SMS του παροχέα σας. diff --git a/htdocs/langs/el_GR/stocks.lang b/htdocs/langs/el_GR/stocks.lang index 60e2366952e..b36fc7a75ef 100644 --- a/htdocs/langs/el_GR/stocks.lang +++ b/htdocs/langs/el_GR/stocks.lang @@ -112,6 +112,7 @@ ReplenishmentOrdersDesc=Αυτή είναι η λίστα όλων των ανο Replenishments=Αναπληρώσεις NbOfProductBeforePeriod=Ποσότητα του προϊόντος %s σε απόθεμα πριν από την επιλεγμένη περίοδο (< %s) NbOfProductAfterPeriod=Ποσότητα του προϊόντος %s σε απόθεμα πριν από την επιλεγμένη περίοδο (> %s) +MassMovement=Μαζική μετακίνηση MassStockMovement=Μαζική κίνηση αποθεμάτων SelectProductInAndOutWareHouse=Επιλέξτε ένα προϊόν, ποσότητα, μια αποθήκη πηγή και μια αποθήκη στόχο, στη συνέχεια, κάντε κλικ στο "%s". Μόλις γίνει αυτό για όλες τις απαιτούμενες κινήσεις, κάντε κλικ στο "%s". RecordMovement=Η εγγραφή μεταφέρθηκε diff --git a/htdocs/langs/en_US/admin.lang b/htdocs/langs/en_US/admin.lang index 7a83dc69db1..03a733447de 100644 --- a/htdocs/langs/en_US/admin.lang +++ b/htdocs/langs/en_US/admin.lang @@ -683,6 +683,10 @@ Permission401=Read discounts Permission402=Create/modify discounts Permission403=Validate discounts Permission404=Delete discounts +Permission510=Read Salaries +Permission512=Create/modify salaries +Permission514=Delete salaries +Permission517=Export salaries Permission531=Read services Permission532=Create/modify services Permission534=Delete services diff --git a/htdocs/langs/en_US/languages.lang b/htdocs/langs/en_US/languages.lang index 77558748ed3..e94e8e13ac3 100644 --- a/htdocs/langs/en_US/languages.lang +++ b/htdocs/langs/en_US/languages.lang @@ -19,6 +19,7 @@ Language_en_SA=English (Saudi Arabia) Language_en_US=English (United States) Language_en_ZA=English (South Africa) Language_es_ES=Spanish +Language_es_DO=Spanish (Dominican Republic) Language_es_AR=Spanish (Argentina) Language_es_CL=Spanish (Chile) Language_es_HN=Spanish (Honduras) @@ -38,6 +39,7 @@ Language_fr_NC=French (New Caledonia) Language_he_IL=Hebrew Language_hr_HR=Croatian Language_hu_HU=Hungarian +Language_id_ID=Indonesian Language_is_IS=Icelandic Language_it_IT=Italian Language_ja_JP=Japanese diff --git a/htdocs/langs/en_US/shop.lang b/htdocs/langs/en_US/shop.lang index d648f03f350..156af426bb0 100644 --- a/htdocs/langs/en_US/shop.lang +++ b/htdocs/langs/en_US/shop.lang @@ -1,4 +1,5 @@ # Dolibarr language file - Source file is en_US - shop +FailedConnectDBCheckModuleSetup=Failed to connect to oscommerce database. Check your module setup Shop=Shop ShopWeb=Web Shop LastOrders=Last orders diff --git a/htdocs/langs/en_US/stocks.lang b/htdocs/langs/en_US/stocks.lang index 7a28c1a0d1d..08992207628 100644 --- a/htdocs/langs/en_US/stocks.lang +++ b/htdocs/langs/en_US/stocks.lang @@ -112,6 +112,7 @@ ReplenishmentOrdersDesc=This is list of all opened supplier orders Replenishments=Replenishments NbOfProductBeforePeriod=Quantity of product %s in stock before selected period (< %s) NbOfProductAfterPeriod=Quantity of product %s in stock after selected period (> %s) +MassMovement=Mass movement MassStockMovement=Mass stock movement SelectProductInAndOutWareHouse=Select a product, a quantity, a source warehouse and a target warehouse, then click "%s". Once this is done for all required movements, click onto "%s". RecordMovement=Record transfert diff --git a/htdocs/langs/es_DO/admin.lang b/htdocs/langs/es_DO/admin.lang new file mode 100644 index 00000000000..8fcc2394a87 --- /dev/null +++ b/htdocs/langs/es_DO/admin.lang @@ -0,0 +1,24 @@ +# Dolibarr language file - Source file is en_US - admin +HideAnyVATInformationOnPDF=Ocultar toda la información relacionada con el ITBIS en la generación de los PDF +OldVATRates=Tasa de ITBIS antigua +NewVATRates=Tasa de ITBIS nueva +Permission91=Consultar impuestos e ITBIS +Permission92=Crear/modificar impuestos e ITBIS +Permission93=Eliminar impuestos e ITBIS +DictionaryVAT=Tasa de ITBIS (Impuesto sobre ventas en EEUU) +VATManagement=Gestión ITBIS +VATIsUsedDesc=El tipo de ITBIS propuesto por defecto en las creaciones de presupuestos, facturas, pedidos, etc. Responde a la siguiente regla:
    Si el vendedor no está sujeto a ITBIS, ITBIS por defecto=0. Final de regla.
    Si el país del vendedor= país del comprador entonces IVA por defecto=IVA del producto vendido. Final de regla.
    Si vendedor y comprador residen en la Comunidad Europea y el bien vendido= nuevo medio de transportes (auto, barco, avión), IVA por defecto=0 (el IVA debe ser pagado por comprador a la hacienda pública de su país y no al vendedor). Final de regla
    Si vendedor y comprador residen en la Comunidad Europea y comprador= particular o empresa sin NIF intracomunitario entonces IVA por defecto=IVA del producto vendido. Final de regla.
    Si vendedor y comprador residen en la Comunidad Europea y comprador= empresa con NIF intracomunitario entonces IVA por defecto=0. Final de regla.
    Si no, IVA propuesto por defecto=0. Final de regla.
    +VATIsNotUsedDesc=El tipo de ITBIS propuesto por defecto es 0. Este es el caso de asociaciones, particulares o algunas pequeñas sociedades. +VATIsUsedExampleFR=En Francia, se trata de las sociedades u organismos que eligen un régimen fiscal general (General simplificado o General normal), régimen en el cual se declara el ITBIS. +VATIsNotUsedExampleFR=En Francia, se trata de asociaciones exentas de ITBIS o sociedades, organismos o profesiones liberales que han elegido el régimen fiscal de módulos (ITBIS en franquicia), pagando un ITBIS en franquicia sin hacer declaración de IVA. Esta elección hace aparecer la anotación "IVA no aplicable - art-293B del CGI" en las facturas. +LocalTax1IsUsedDesc=Uso de un 2º tipo de impuesto (Distinto del ITBIS) +LocalTax1IsNotUsedDesc=No usar un 2º tipo de impuesto (Distinto del ITBIS) +LocalTax2IsUsedDesc=Uso de un 3er. tipo de impuesto (Distinto del IVA) +LocalTax2IsNotUsedDesc=No usar un 3er. tipo de impuesto (Distinto del IVA) +UnitPriceOfProduct=Precio unitario sin ITBIS de un producto +ShowVATIntaInAddress=Ocultar el identificador ITBIS en las direcciones de los documentos +OptionVatMode=Opción de carga de ITBIS +OptionVatDefaultDesc=La carga del ITBIS es:
    -en el envío de los bienes (en la práctica se usa la fecha de la factura)
    -sobre el pago por los servicios +OptionVatDebitOptionDesc=La carga del ITBIS es:
    -en el envío de los bienes (en la práctica se usa la fecha de la factura)
    -sobre la facturación de los servicios +SummaryOfVatExigibilityUsedByDefault=Tiempo de exigibilidad de ITBIS por defecto según la opción eligida +YourCompanyDoesNotUseVAT=Su empresa está configurada como no sujeta al ITBIS (Inicio - Configuración - Empresa/Institución), por lo que no hay opción para la paremetrización del ITBIS. \ No newline at end of file diff --git a/htdocs/langs/es_DO/companies.lang b/htdocs/langs/es_DO/companies.lang new file mode 100644 index 00000000000..149e6ab15d4 --- /dev/null +++ b/htdocs/langs/es_DO/companies.lang @@ -0,0 +1,4 @@ +# Dolibarr language file - Source file is en_US - companies +VATIsUsed=Sujeto a ITBIS +VATIsNotUsed=No sujeto a ITBIS +VATIntraCheckDesc=El link %s permite consultar al servicio europeo de control de números de ITBIS intracomunitario. Se requiere acceso a internet para que el servicio funcione \ No newline at end of file diff --git a/htdocs/langs/es_DO/compta.lang b/htdocs/langs/es_DO/compta.lang new file mode 100644 index 00000000000..0d837cbe9f6 --- /dev/null +++ b/htdocs/langs/es_DO/compta.lang @@ -0,0 +1,28 @@ +# Dolibarr language file - Source file is en_US - compta +VATToPay=ITBIS ventas +VATReceived=ITBIS repercutido +VATToCollect=ITBIS compras +VATSummary=Balance de ITBIS +VATPaid=ITBIS Pagado +VATCollected=ITBIS recuperado +NewVATPayment=Nuevo pago de ITBIS +VATPayment=Pago ITBIS +VATPayments=Pagos ITBIS +ShowVatPayment=Ver pagos ITBIS +TotalVATReceived=Total ITBIS percibido +CalcModeVATDebt=Modo %sITBIS sobre facturas emitidas%s. +CalcModeVATEngagement=Modo %sITBIS sobre facturas cobradas%s. +RulesResultDue=- Los importes mostrados son importes totales
    - Incluye las facturas, cargas e ITBIS debidos, que estén pagadas o no.
    - Se basa en la fecha de validación para las facturas y el IVA y en la fecha de vencimiento para las cargas.
    +RulesResultInOut=- Incluye los pagos realizados sobre las facturas, las cargas y el ITBIS.
    - Se base en las fechas de pago de las fecturas, cargas e IVA. +VATReportByCustomersInInputOutputMode=Informe por cliente del ITBIS repercutido y soportado +VATReportByCustomersInDueDebtMode=Informe por cliente del ITBIS repercutido y soportado +VATReportByQuartersInInputOutputMode=Informe por tasa del ITBIS repercutido y soportado +VATReportByQuartersInDueDebtMode=Informe por tasa del ITBIS repercutido y soportado +SeeVATReportInInputOutputMode=Ver el informe %sITBIS pagado%s para un modo de cálculo estandard +SeeVATReportInDueDebtMode=Ver el informe %sITBIS debido%s para un modo de cálculo con la opción sobre lo debido +RulesVATInServices=- Para los servicios, el informe incluye el ITBIS de los pagos recibidos o emitidos basándose en la fecha de pago. +RulesVATInProducts=- Para los bienes materiales, incluye el ITBIS de las facturas basándose en la fecha de la factura. +RulesVATDueServices=- Para los servicios, el informe incluye el ITBIS de las facturas debidas, pagadas o no basándose en la fecha de estas facturas. +RulesVATDueProducts=- Para los bienes materiales, incluye el ITBIS de las facturas basándose en la fecha de la factura. +COMPTA_VAT_ACCOUNT=Código contable por defecto para el ITBIS repercutido +COMPTA_VAT_BUY_ACCOUNT=Código contable por defecto para el ITBIS soportado \ No newline at end of file diff --git a/htdocs/langs/es_DO/main.lang b/htdocs/langs/es_DO/main.lang new file mode 100644 index 00000000000..7076727abdd --- /dev/null +++ b/htdocs/langs/es_DO/main.lang @@ -0,0 +1,32 @@ +# Dolibarr language file - Source file is en_US - main +DIRECTION=ltr +# Note for Chinese: +# msungstdlight or cid0ct are for traditional Chinese (traditional does not render with Ubuntu pdf reader) +# stsongstdlight or cid0cs are for simplified Chinese +# To read Chinese pdf with Linux: sudo apt-get install poppler-data +FONTFORPDF=helvetica +FONTSIZEFORPDF=10 +SeparatorDecimal=, +SeparatorThousand=. +FormatDateShort=%d/%m/%Y +FormatDateShortInput=%d/%m/%Y +FormatDateShortJava=dd/MM/yyyy +FormatDateShortJavaInput=dd/MM/yyyy +FormatDateShortJQuery=dd/mm/yy +FormatDateShortJQueryInput=dd/mm/yy +FormatHourShort=%H:%M +FormatHourShortDuration=%H:%M +FormatDateTextShort=%d %b %Y +FormatDateText=%d %B %Y +FormatDateHourShort=%d/%m/%Y %H:%M +FormatDateHourSecShort=%d/%m/%Y %H:%M:%S +FormatDateHourTextShort=%d %b %Y %H:%M +FormatDateHourText=%d %B %Y %H:%M +ErrorNoVATRateDefinedForSellerCountry=Error, ningún tipo de ITBIS definido para el país '%s'. +AmountVAT=Importe ITBIS +TotalVAT=Total ITBIS +IncludedVAT=ITBIS incluido +HT=Sin ITBIS +TTC=ITBIS incluido +VAT=ITBIS +VATRate=Tasa ITBIS \ No newline at end of file diff --git a/htdocs/langs/es_ES/admin.lang b/htdocs/langs/es_ES/admin.lang index 0981a1fdadf..f4132934936 100644 --- a/htdocs/langs/es_ES/admin.lang +++ b/htdocs/langs/es_ES/admin.lang @@ -116,7 +116,7 @@ LanguageBrowserParameter=Variable %s LocalisationDolibarrParameters=Parámetros de localización ClientTZ=Zona horaria cliente (usuario) ClientHour=Hora cliente (usuario) -OSTZ=Zona horaria Servidor SO +OSTZ=Zona horaria Servidor PHPTZ=Zona horaria Servidor PHP PHPServerOffsetWithGreenwich=Offset servidor con Greenwich (segundos) ClientOffsetWithGreenwich=Offset cliente/navegador con Greenwich (segundos) @@ -233,7 +233,9 @@ OfficialWebSiteFr=sitio web oficial habla francesa OfficialWiki=Wiki documentación Dolibarr OfficialDemo=Demo en línea Dolibarr OfficialMarketPlace=Sitio oficial de módulos complementarios y extensiones -OfficialWebHostingService=Servicio oficial de alojamiento (SaaS) +OfficialWebHostingService=Servicios de hosting web (Cloud hosting) +ReferencedPreferredPartners=Preferred Partners +OtherResources=Otros recursos ForDocumentationSeeWiki=Para la documentación de usuario, desarrollador o Preguntas Frecuentes (FAQ), consulte el wiki Dolibarr:
    %s ForAnswersSeeForum=Para otras cuestiones o realizar sus propias consultas, puede utilizar el foro Dolibarr:
    %s HelpCenterDesc1=Esta aplicación, independiente de Dolibarr, le permite ayudarle a obtener un servicio de soporte de Dolibarr. @@ -369,9 +371,9 @@ ExtrafieldSelectList = Lista desde una tabla ExtrafieldSeparator=Separador ExtrafieldCheckBox=Casilla de verificación ExtrafieldRadio=Botón de selección excluyente -ExtrafieldParamHelpselect=El listado tiene que ser en forma clave, valor

    por ejemplo :
    1,text1
    2,text2
    3,text3
    ... -ExtrafieldParamHelpcheckbox=El listado tiene que ser en forma clave, valor

    por ejemplo :
    1,text1
    2,text2
    3,text3
    ... -ExtrafieldParamHelpradio=El listado tiene que ser en forma clave, valor

    por ejemplo :
    1,text1
    2,text2
    3,text3
    ... +ExtrafieldParamHelpselect=El listado de parámetros tiene que ser key,valor

    por ejemplo:\n
    1,value1
    2,value2
    3,value3
    ...

    Para tener la lista en función de otra:
    1,value1|parent_list_code:parent_key
    2,value2|parent_list_code:parent_key +ExtrafieldParamHelpcheckbox=El listado de parámetros tiene que ser key,valor

    por ejemplo:\n
    1,value1
    2,value2
    3,value3
    ... +ExtrafieldParamHelpradio=El listado de parámetros tiene que ser key,valor

    por ejemplo:\n
    1,value1
    2,value2
    3,value3
    ... ExtrafieldParamHelpsellist=Lista Parámetros viene de una tabla
    Sintaxis: nombre_tabla: etiqueta_campo: identificador_campo :: filtro
    Ejemplo: c_typent: libelle: id :: filtro
    filtro puede ser una prueba simple (por ejemplo, activo = 1) para mostrar el valor sólo se activa
    si desea filtrar un campo extra utilizar la sintáxis extra.fieldcode = ... (donde el código de campo es el código del campo extra)
    para tener la lista en función de otra:
    c_typent: libelle: id: parent_list_code | parent_column: filtro LibraryToBuildPDF=Librería usada para la creación de archivos PDF WarningUsingFPDF=Atención: Su archivo conf.php contiene la directiva dolibarr_pdf_force_fpdf=1. Esto hace que se use la librería FPDF para generar sus archivos PDF. Esta librería es antigua y no cubre algunas funcionalidades (Unicode, transparencia de imágenes, idiomas cirílicos, árabes o asiáticos, etc.), por lo que puede tener problemas en la generación de los PDF.
    Para resolverlo, y disponer de un soporte completo de PDF, puede descargar la librería TCPDF , y a continuación comentar o eliminar la línea $dolibarr_pdf_force_fpdf=1, y añadir en su lugar $dolibarr_lib_TCPDF_PATH='ruta_a_TCPDF' @@ -472,7 +474,7 @@ Module410Desc=Interfaz con el calendario Webcalendar Module500Name=Gastos especiales (impuestos, gastos sociales, dividendos) Module500Desc=Gestión de los gastos especiales como impuestos, gastos sociales, dividendos y salarios Module510Name=Salarios -Module510Desc=Gestión de salarios de empleados y sus pagos +Module510Desc=Gestión de salarios y pagos Module600Name=Notificaciones Module600Desc=Envío de notificaciones (por correo electrónico) sobre los eventos de trabajo Dolibarr Module700Name=Donaciones @@ -495,15 +497,15 @@ Module2400Name=Agenda Module2400Desc=Gestión de la agenda y de las acciones Module2500Name=Gestión Electrónica de Documentos Module2500Desc=Permite administrar una base de documentos -Module2600Name= WebServices -Module2600Desc= Activa los servicios de servidor web services de Dolibarr -Module2700Name= Gravatar -Module2700Desc= Utiliza el servicio en línea de Gravatar (www.gravatar.com) para mostrar fotos de los usuarios/miembros (que se encuentran en sus mensajes de correo electrónico). Necesita un acceso a Internet +Module2600Name=WebServices +Module2600Desc=Activa los servicios de servidor web services de Dolibarr +Module2700Name=Gravatar +Module2700Desc=Utiliza el servicio en línea de Gravatar (www.gravatar.com) para mostrar fotos de los usuarios/miembros (que se encuentran en sus mensajes de correo electrónico). Necesita un acceso a Internet Module2800Desc=Cliente FTP -Module2900Name= GeoIPMaxmind -Module2900Desc= Capacidades de conversión GeoIP Maxmind -Module3100Name= Skype -Module3100Desc= Añade un botón Skype en las fichas de miembros / terceros / contactos +Module2900Name=GeoIPMaxmind +Module2900Desc=Capacidades de conversión GeoIP Maxmind +Module3100Name=Skype +Module3100Desc=Añade un botón Skype en las fichas de miembros / terceros / contactos Module5000Name=Multi-empresa Module5000Desc=Permite gestionar varias empresas Module6000Name=Flujo de trabajo @@ -681,6 +683,10 @@ Permission401=Consultar haberes Permission402=Crear/modificar haberes Permission403=Validar haberes Permission404=Eliminar haberes +Permission510=Consultar salarios +Permission512=Crear/modificar salarios +Permission514=Eliminar salarios +Permission517=Exportar salarios Permission531=Consultar servicios Permission532=Crear/modificar servicios Permission534=Eliminar servicios @@ -999,7 +1005,7 @@ ExtraFieldsSupplierOrders=Atributos adicionales (pedidos a proveedores) ExtraFieldsSupplierInvoices=Atributos adicionales (facturas) ExtraFieldsProject=Atributos adicionales (proyectos) ExtraFieldsProjectTask=Atributos adicionales (tareas) -ExtraFieldHasWrongValue=El atributo %s tiene un valor incorrecto. +ExtraFieldHasWrongValue=El atributo %s tiene un valor no válido AlphaNumOnlyCharsAndNoSpace=solamente caracteres alfanuméricos sin espacios AlphaNumOnlyLowerCharsAndNoSpace=sólo alfanuméricos y minúsculas sin espacio SendingMailSetup=Configuración del envío por mail @@ -1018,7 +1024,7 @@ SuhosinSessionEncrypt=Almacenamiento de sesiones cifradas por Suhosin ConditionIsCurrently=Actualmente la condición es %s TestNotPossibleWithCurrentBrowsers=La detección automática no es posible con el navegador actual YouUseBestDriver=Está usando el driver %s, actualmente es el mejor driver disponible. -YouDoNotUseBestDriver=Está usando el driver %s pero es recomendado el uso del driver %s. +YouDoNotUseBestDriver=Usa el driver %s aunque se recomienda usar el driver %s. NbOfProductIsLowerThanNoPb=Tiene %s productos/servicios en su base de datos. No es necesaria ninguna optimización en particular. SearchOptim=Buscar optimización YouHaveXProductUseSearchOptim=Tiene %s productos en su base de datos. Debería añadir la constante PRODUCT_DONOTSEARCH_ANYWHERE a 1 en Inicio-Configuración-Varios, limitando la búsqueda al principio de la cadena lo que hace posible que la base de datos use el índice y se obtenga una respuesta inmediata. @@ -1073,7 +1079,7 @@ WebCalServer=Servidor de la base de datos del calendario WebCalDatabaseName=Nombre de la base de datos WebCalUser=Usuario con acceso a la base WebCalSetupSaved=Los datos de enlace se han guardado correctamente. -WebCalTestOk=La conexión al servidor '%s' en la base '%s' por el usuario '%s' ha sido satisfactoria. +WebCalTestOk=Conectado correctamente al servidor '%s', base de datos '%s', usuario '%s'. WebCalTestKo1=La conexión al servidor '%s' ha sido satisfactoria, pero la base '%s' no se ha podido comprobar. WebCalTestKo2=La conexión al servidor '%s' por el usuario '%s' ha fallado. WebCalErrorConnectOkButWrongDatabase=La conexión salió bien pero la base no parece ser una base Webcalendar. @@ -1119,7 +1125,7 @@ WatermarkOnDraftProposal=Marca de agua en presupuestos borrador (en caso de esta OrdersSetup=Configuración del módulo pedidos OrdersNumberingModules=Módulos de numeración de los pedidos OrdersModelModule=Modelos de documentos de pedidos -HideTreadedOrders=Ocultar los pedidos procesados o anulados del listado +HideTreadedOrders=Ocultar del listado los pedidos tratados o cancelados ValidOrderAfterPropalClosed=Validar el pedido después del cierre del presupuesto, permite no pasar por el pedido provisional FreeLegalTextOnOrders=Texto libre en pedidos WatermarkOnDraftOrders=Marca de agua en pedidos borrador (en caso de estar vacío) @@ -1214,9 +1220,9 @@ LDAPSynchroKO=Prueba de sincronización erronea LDAPSynchroKOMayBePermissions=Error de la prueba de sincronización. Compruebe que la conexión al servidor sea correcta y que permite las actualizaciones LDAP LDAPTCPConnectOK=Conexión TCP al servidor LDAP efectuada (Servidor=%s, Puerto=%s) LDAPTCPConnectKO=Fallo de conexión TCP al servidor LDAP (Servidor=%s, Puerto=%s) -LDAPBindOK=Conexión/Autenticación al servidor LDAP conseguida (Servidor=%s, Puerto=%s, Admin=%s, Password=%s) +LDAPBindOK=Conexión/Autenticación realizada al servidor LDAP (Servidor=%s, Puerto=%s, Admin=%s, Password=%s) LDAPBindKO=Fallo de conexión/autentificación al servidor LDAP (Servidor=%s, Puerto=%s, Admin=%s, Password=%s) -LDAPUnbindSuccessfull=Desconexión realizada +LDAPUnbindSuccessfull=Desconectado correctamente LDAPUnbindFailed=Desconexión fallada LDAPConnectToDNSuccessfull=Conexión a DN (%s) realizada LDAPConnectToDNFailed=Connexión a DN (%s) fallada @@ -1273,7 +1279,7 @@ LDAPFieldSidExample=Ejemplo : objectsid LDAPFieldEndLastSubscription=Fecha finalización como miembro LDAPFieldTitle=Puesto/Función LDAPFieldTitleExample=Ejemplo:titulo -LDAPParametersAreStillHardCoded=Los parámetros LDAP son codificados en duro (en la clase contact) +LDAPParametersAreStillHardCoded=Los Parámetros LDAP todavía están codificados (en la clase de contacto) LDAPSetupNotComplete=Configuración LDAP incompleta (a completar en las otras pestañas) LDAPNoUserOrPasswordProvidedAccessIsReadOnly=Administrador o contraseña no indicados. Los accesos LDAP serán anónimos y en solo lectura. LDAPDescContact=Esta página permite definir el nombre de los atributos del árbol LDAP para cada información de los contactos Dolibarr. @@ -1429,7 +1435,7 @@ OptionVATDefault=Estándar OptionVATDebitOption=Opción servicios a débito OptionVatDefaultDesc=La carga del IVA es:
    -en el envío de los bienes (en la práctica se usa la fecha de la factura)
    -sobre el pago por los servicios OptionVatDebitOptionDesc=La carga del IVA es:
    -en el envío de los bienes (en la práctica se usa la fecha de la factura)
    -sobre la facturación de los servicios -SummaryOfVatExigibilityUsedByDefault=Momento de exigibilidad por defecto el IVA para la opción escogida: +SummaryOfVatExigibilityUsedByDefault=Tiempo de exigibilidad de IVA por defecto según la opción eligida OnDelivery=En la entrega OnPayment=En el pago OnInvoice=En la factura @@ -1446,7 +1452,7 @@ AccountancyCodeBuy=Código contable compras AgendaSetup=Módulo configuración de acciones y agenda PasswordTogetVCalExport=Clave de autorización vcal export link PastDelayVCalExport=No exportar los eventos de más de -AGENDA_USE_EVENT_TYPE=Usar tipos de eventos (configurables desde Configuración->Diccionarios->Tipos de eventos de la agenda) +AGENDA_USE_EVENT_TYPE=Usar tipos de evento (gestionados en el menú Configuración->Diccionarios->Tipos de eventos de la agenda) ##### ClickToDial ##### ClickToDialDesc=Este módulo permite agregar un icono después del número de teléfono de contactos Dolibarr. Un clic en este icono, Llama a un servidor con una URL que se indica a continuación. Esto puede ser usado para llamar al sistema call center de Dolibarr que puede llamar al número de teléfono en un sistema SIP, por ejemplo. ##### Point Of Sales (CashDesk) ##### diff --git a/htdocs/langs/es_ES/contracts.lang b/htdocs/langs/es_ES/contracts.lang index e0886108a1d..9ccf62cfcb4 100644 --- a/htdocs/langs/es_ES/contracts.lang +++ b/htdocs/langs/es_ES/contracts.lang @@ -89,6 +89,8 @@ ListOfServicesToExpireWithDuration=Listado de servicios activos a expirar en %s ListOfServicesToExpireWithDurationNeg=Listado de servicios expirados más de %s días ListOfServicesToExpire=Listado de servicios activos a expirar NoteListOfYourExpiredServices=Este listado contiene solamente los servicios de contratos de terceros de los que usted es comercial +StandardContractsTemplate=Modelo de contrato estandar +ContactNameAndSignature=Para %s, nombre y firma: ##### Types de contacts ##### TypeContact_contrat_internal_SALESREPSIGN=Comercial firmante del contrato diff --git a/htdocs/langs/es_ES/exports.lang b/htdocs/langs/es_ES/exports.lang index f0ac8c62a64..f1f6e4d3c09 100644 --- a/htdocs/langs/es_ES/exports.lang +++ b/htdocs/langs/es_ES/exports.lang @@ -8,7 +8,7 @@ ImportableDatas=Conjunto de datos importables SelectExportDataSet=Elija un conjunto predefinido de datos que desee exportar... SelectImportDataSet=Seleccione un lote de datos predefinidos que desee importar... SelectExportFields=Elija los campos que deben exportarse, o elija un perfil de exportación predefinido -SelectImportFields=Seleccione los campos a importar, o seleccione un perfil predefinido de importación +SelectImportFields=Escoja los campos del archivo que desea importar y sus campos de destino en la base de datos moviéndolos arriba y abajo con el ancla %s, o seleccione un perfil de importación predefinido. NotImportedFields=Campos del archivo origen no importados SaveExportModel=Guardar este perfil de exportación si desea reutilizarlo posteriormente... SaveImportModel=Guarde este perfil de importación si desea reutilizarlo de nuevo posteriormente... @@ -81,7 +81,7 @@ DoNotImportFirstLine=No importar la primera línea del archivo fuente NbOfSourceLines=Número de líneas del archivo fuente NowClickToTestTheImport=Compruebe los parámetros de importación establecidos. Si está de acuerdo, haga clic en el botón "%s" para ejecutar una simulación de importación (ningún dato será modificado, inicialmente sólo será una simulación)... RunSimulateImportFile=Ejecutar la simulación de importación -FieldNeedSource=Este campo requiere obligatoriamente una fuente de datos +FieldNeedSource=Este campo requiere datos desde el archivo origen SomeMandatoryFieldHaveNoSource=Algunos campos obligatorios no tienen campo fuente en el archivo de origen InformationOnSourceFile=Información del archivo origen InformationOnTargetTables=Información sobre los campos de destino diff --git a/htdocs/langs/es_ES/holiday.lang b/htdocs/langs/es_ES/holiday.lang index 4f888f88e8b..8c34109bf13 100644 --- a/htdocs/langs/es_ES/holiday.lang +++ b/htdocs/langs/es_ES/holiday.lang @@ -8,7 +8,6 @@ NotActiveModCP=Debe activar el módulo Vacaciones para ver esta página. NotConfigModCP=Debe configurar el módulo Vacaciones para ver esta página. Para configurarlo, haga clic aquí. NoCPforUser=No tiene peticiones de vacaciones. AddCP=Crear petición de vacaciones -CPErrorSQL=Ha ocurrido un error de SQL : Employe=Empleado DateDebCP=Fecha inicio DateFinCP=Fecha fin diff --git a/htdocs/langs/es_ES/languages.lang b/htdocs/langs/es_ES/languages.lang index f32453299a3..124d8ae8cd3 100644 --- a/htdocs/langs/es_ES/languages.lang +++ b/htdocs/langs/es_ES/languages.lang @@ -19,6 +19,7 @@ Language_en_SA=Inglés (Arabia Saudita) Language_en_US=Inglés (Estados Unidos) Language_en_ZA=Inglés (Sudáfrica) Language_es_ES=Español +Language_es_DO=Español (República Dominicana) Language_es_AR=Español (Argentina) Language_es_CL=Español (Chile) Language_es_HN=Español (Honduras) @@ -38,6 +39,7 @@ Language_fr_NC=Francés (Nueva Caledonia) Language_he_IL=Hebreo Language_hr_HR=Croata Language_hu_HU=Húngaro +Language_id_ID=Indonesio Language_is_IS=Islandés Language_it_IT=Italiano Language_ja_JP=Japonés diff --git a/htdocs/langs/es_ES/mails.lang b/htdocs/langs/es_ES/mails.lang index d65df280f31..9c2dd9f8d4e 100644 --- a/htdocs/langs/es_ES/mails.lang +++ b/htdocs/langs/es_ES/mails.lang @@ -79,6 +79,7 @@ MailtoEMail=mailto email (hyperlink) ActivateCheckRead=Activar confirmación de lectura y opción de desuscripción ActivateCheckReadKey=Clave usada para encriptar la URL de la confirmación de lectura y la función de desuscripción EMailSentToNRecipients=E-Mail enviado a %s destinatarios. +XTargetsAdded=%s destinatarios agregados a la lista EachInvoiceWillBeAttachedToEmail=Se creará y adjuntará a cada e-mail un documento usando el modelo de factura por defecto. MailTopicSendRemindUnpaidInvoices=Recordatorio de la factura %s (%s) SendRemind=Enviar recordatorios por e-mail diff --git a/htdocs/langs/es_ES/main.lang b/htdocs/langs/es_ES/main.lang index a83ad4dc7aa..4d743557b16 100644 --- a/htdocs/langs/es_ES/main.lang +++ b/htdocs/langs/es_ES/main.lang @@ -551,6 +551,7 @@ MailSentBy=Mail enviado por TextUsedInTheMessageBody=Texto utilizado en el cuerpo del mensaje SendAcknowledgementByMail=Enviar recibo por e-mail NoEMail=Sin e-mail +NoMobilePhone=Sin teléfono móvil Owner=Propietario DetectedVersion=Versión detectada FollowingConstantsWillBeSubstituted=Las siguientes constantes serán substituidas por su valor correspondiente. diff --git a/htdocs/langs/es_ES/products.lang b/htdocs/langs/es_ES/products.lang index 2365d7710e8..51f594b02c0 100644 --- a/htdocs/langs/es_ES/products.lang +++ b/htdocs/langs/es_ES/products.lang @@ -28,8 +28,10 @@ ProductsAndServicesStatistics=Estadísticas productos y servicios ProductsStatistics=Estadísticas productos ProductsOnSell=Productos en venta o en compra ProductsNotOnSell=Productos fuera de venta y de compra +ProductsOnSellAndOnBuy=Productos ni a la venta ni a la compra ServicesOnSell=Servicios en venta o en compra ServicesNotOnSell=Servicios fuera de venta y de compra +ServicesOnSellAndOnBuy=Servicios ni a la venta ni a la compra InternalRef=Referencia interna LastRecorded=Ultimos productos/servicios en venta registrados LastRecordedProductsAndServices=Los %s últimos productos/servicios registrados @@ -70,6 +72,8 @@ PublicPrice=Precio público CurrentPrice=Precio actual NewPrice=Nuevo precio MinPrice=Precio de venta min. +MinPriceHT=Precio mín. de venta (a.i.) +MinPriceTTC=Precio mín de venta (i.i.) CantBeLessThanMinPrice=El precio de venta no debe ser inferior al mínimo para este producto (%s sin IVA). Este mensaje puede estar causado por un descuento muy grande. ContractStatus=Estado de contrato ContractStatusClosed=Cerrado @@ -179,6 +183,7 @@ ProductIsUsed=Este producto es utilizado NewRefForClone=Ref. del nuevo producto/servicio CustomerPrices=Precios clientes SuppliersPrices=Precios proveedores +SuppliersPricesOfProductsOrServices=Precios proveedores (productos o servicios) CustomCode=Código aduanero CountryOrigin=País de origen HiddenIntoCombo=Oculto en las listas @@ -208,6 +213,7 @@ CostPmpHT=Coste de compra sin IVA ProductUsedForBuild=Auto consumido por producción ProductBuilded=Producción completada ProductsMultiPrice=Producto multi-precio +ProductsOrServiceMultiPrice=Precios a clientes (productos o servicios, multiprecios) ProductSellByQuarterHT=Ventas de productos base imponible ServiceSellByQuarterHT=Ventas de servicios base imponible Quarter1=1º trimestre diff --git a/htdocs/langs/es_ES/shop.lang b/htdocs/langs/es_ES/shop.lang index 25ba4a68aa9..f6ed51eb407 100644 --- a/htdocs/langs/es_ES/shop.lang +++ b/htdocs/langs/es_ES/shop.lang @@ -1,4 +1,5 @@ # Dolibarr language file - Source file is en_US - shop +FailedConnectDBCheckModuleSetup=Failed to connect to oscommerce database. Check your module setup Shop=Tienda ShopWeb=Tienda web LastOrders=Últimos pedidos diff --git a/htdocs/langs/es_ES/stocks.lang b/htdocs/langs/es_ES/stocks.lang index 55b8419dffe..0599fffcdfe 100644 --- a/htdocs/langs/es_ES/stocks.lang +++ b/htdocs/langs/es_ES/stocks.lang @@ -112,6 +112,7 @@ ReplenishmentOrdersDesc=Este es el listado de pedidos a proveedores en curso Replenishments=Reaprovisionamiento NbOfProductBeforePeriod=Cantidad del producto %s en stock antes del periodo seleccionado (< %s) NbOfProductAfterPeriod=Cantidad del producto %s en stock después del periodo seleccionado (> %s) +MassMovement=Movimientos en masa MassStockMovement=Movimientos de stock en masa SelectProductInAndOutWareHouse=Selecccione un producto, una cantidad, un almacén origen y un almacén destino, seguidamente haga clic "%s". Una vez seleccionados todos los movimientos, haga clic en "%s". RecordMovement=Registrar transferencias diff --git a/htdocs/langs/es_ES/suppliers.lang b/htdocs/langs/es_ES/suppliers.lang index 573b078e440..52458b713de 100644 --- a/htdocs/langs/es_ES/suppliers.lang +++ b/htdocs/langs/es_ES/suppliers.lang @@ -17,7 +17,7 @@ SomeSubProductHaveNoPrices=Algunos subproductos no tienen precio definido AddSupplierPrice=Añadir precio de proveedor ChangeSupplierPrice=Modificar precio de proveedor ErrorQtyTooLowForThisSupplier=Cantidad insuficiente para este proveedor -ErrorSupplierCountryIsNotDefined=El país de este proveedor no está definido, corrígalo en su ficha +ErrorSupplierCountryIsNotDefined=El país de este proveedor no está definido, corríjalo en su ficha ProductHasAlreadyReferenceInThisSupplier=Este producto ya tiene una referencia en este proveedor ReferenceSupplierIsAlreadyAssociatedWithAProduct=Esta referencia de proveedor ya está asociada a la referencia: %s NoRecordedSuppliers=Sin proveedores registrados diff --git a/htdocs/langs/et_EE/admin.lang b/htdocs/langs/et_EE/admin.lang index 3894a88eea8..bf148c779ff 100644 --- a/htdocs/langs/et_EE/admin.lang +++ b/htdocs/langs/et_EE/admin.lang @@ -50,10 +50,10 @@ ErrorCodeCantContainZero=Kood ei või sisaldada väärtust 0 DisableJavascript=Keela JavaScript ja Ajax funktsioonid ConfirmAjax=Kasuta Ajax kinnituse hüpikaknaid UseSearchToSelectCompanyTooltip=Also if you have a large number of third parties (> 100 000), you can increase speed by setting constant COMPANY_DONOTSEARCH_ANYWHERE to 1 in Setup->Other. Search will then be limited to start of string. -UseSearchToSelectCompany=Use autocompletion fields to choose third parties instead of using a list box. +UseSearchToSelectCompany=Kasuta kolmandate isikute valimiseks rippmenüü asemel automaatsete vastete pakkumisega välju ActivityStateToSelectCompany= Lisa filter, mis võimaldab filtreerida kolmandaid isikuid nende aktiivsuse järgi UseSearchToSelectContactTooltip=Also if you have a large number of third parties (> 100 000), you can increase speed by setting constant CONTACT_DONOTSEARCH_ANYWHERE to 1 in Setup->Other. Search will then be limited to start of string. -UseSearchToSelectContact=Use autocompletion fields to choose contact (instead of using a list box). +UseSearchToSelectContact=Kasuta kontakti valimiseks rippmenüü asemel automaatsete vastete pakkumisega välju SearchFilter=Otsingufiltrite seaded NumberOfKeyToSearch=Sisestatud märkide arv otsingu käivitamiseks: %s ViewFullDateActions=Näita terve päev kestvaid sündmusi kolmandal lehel @@ -102,9 +102,9 @@ OtherOptions=Muud seaded OtherSetup=Muud seadistused CurrentValueSeparatorDecimal=Kümnendkoha eraldaja CurrentValueSeparatorThousand=Tuhandete eraldaja -Destination=Destination -IdModule=Module ID -IdPermissions=Permissions ID +Destination=Sihtkoht +IdModule=Mooduli ID +IdPermissions=Kasutajaõiguste ID Modules=Moodulid ModulesCommon=Põhimoodulid ModulesOther=Muud moodulid @@ -116,7 +116,7 @@ LanguageBrowserParameter=Parameeter %s LocalisationDolibarrParameters=Lokaliseerimise parameetrid ClientTZ=Kliendi ajavöönd (kasutaja) ClientHour=Kliendi aeg (kasutaja) -OSTZ=Time Zone OS server +OSTZ=Serveri operatsioonisüsteemi ajavöönd PHPTZ=Time Zone PHP server PHPServerOffsetWithGreenwich=PHP serveri nihe Greenwichi aja suhtes (sekundites) ClientOffsetWithGreenwich=Kliendi/brauseri nihe Greenwichi aja suhtes (sekundites) @@ -233,7 +233,9 @@ OfficialWebSiteFr=Prantsuskeelne ametlik kodulehekülg OfficialWiki=Dolibarri dokumentatsioon Wikis OfficialDemo=Dolibarri online demo OfficialMarketPlace=Väliste moodulite ja lisade ametlik müügikoht -OfficialWebHostingService=Ametlikud veebiteenuse pakkujad (pilveteenus) +OfficialWebHostingService=Viidatavad veebimajutuse pakkujad (pilveteenused) +ReferencedPreferredPartners=Eelistatud partnerid +OtherResources=Muud ressursid ForDocumentationSeeWiki=Kasutaja või arendaja dokumentatsiooni (KKK jms) võid leida
    ametlikust Dolibarri Wikist:
    %s ForAnswersSeeForum=Muude küsimuste või abi küsimise tarbeks saab kasutada Dolibarri foorumit:
    %s HelpCenterDesc1=See ala võib aidata saada Dolibarri tugiteenust. @@ -369,9 +371,9 @@ ExtrafieldSelectList = Vali tabelist ExtrafieldSeparator=Eraldaja ExtrafieldCheckBox=Märkeruut ExtrafieldRadio=Raadionupp -ExtrafieldParamHelpselect=Parameetrite nimekiri peab olema kujul võti,väärtus

    Näiteks:
    1,väärtus1
    2,väärtus2
    3,väärtus3
    jne

    Nimekirja teisest nimekirjast sõltuvaks muutmiseks:
    1,väärtus1|ema_nimekirja_kood:ema_võti
    2,väärtus2|ema_nimekirja_kood:ema_kood -ExtrafieldParamHelpcheckbox=Parameetrite nimekiri peab olema kujul võti,väärtus

    Näiteks:
    1,väärtus1
    2,väärtus2
    3,väärtus3
    jne -ExtrafieldParamHelpradio=Parameetrite nimekiri peab olema kujul võti,väärtus

    Näiteks:
    1,väärtus1
    2,väärtus2
    3,väärtus3
    jne +ExtrafieldParamHelpselect=Parameters list have to be like key,value

    for example :
    1,value1
    2,value2
    3,value3
    ...

    In order to have the list depending on another :
    1,value1|parent_list_code:parent_key
    2,value2|parent_list_code:parent_key +ExtrafieldParamHelpcheckbox=Parameters list have to be like key,value

    for example :
    1,value1
    2,value2
    3,value3
    ... +ExtrafieldParamHelpradio=Parameters list have to be like key,value

    for example :
    1,value1
    2,value2
    3,value3
    ... ExtrafieldParamHelpsellist=Parameters list comes from a table
    Syntax : table_name:label_field:id_field::filter
    Example : c_typent:libelle:id::filter

    filter can be a simple test (eg active=1) to display only active value
    if you want to filter on extrafields use syntaxt extra.fieldcode=... (where field code is the code of extrafield)

    In order to have the list depending on another :
    c_typent:libelle:id:parent_list_code|parent_column:filter LibraryToBuildPDF=PDFide loomiseks kasutatav teek WarningUsingFPDF=Hoiatus: conf.php sisaldab direktiivi dolibarr_pdf_force_fpdf=1. See tähendab, et PDF failide loomiseks kasutatakse FPDF teeki. FPDF teek on vananenud ja ei toeta paljusid võimalusi (Unicode, läbipaistvad pildid, kirillitsa, araabia ja aasia märgistikke jne), seega võib PDFi loomise ajal tekkida vigu.
    Probleemide vältimiseks ja täieliku PDFi loomise toe jaoks palun lae alla TCPDF teek ning seejärel kommenteeri välja või kustuta rida $dolibarr_pdf_force_fpdf=1 ja lisa rida $dolibarr_lib_TCPDF_PATH='TCPDF_kausta_rada' @@ -388,8 +390,8 @@ BarcodeInitForThirdparties=Mass barcode init for thirdparties BarcodeInitForProductsOrServices=Mass barcode init or reset for products or services CurrentlyNWithoutBarCode=Currently, you have %s records on %s %s without barcode defined. InitEmptyBarCode=Init value for next %s empty records -EraseAllCurrentBarCode=Erase all current barcode values -ConfirmEraseAllCurrentBarCode=Are you sure you want to erase all current barcode values ? +EraseAllCurrentBarCode=Kustuta kõik hetkel kasutatavad vöötkoodide väärtused +ConfirmEraseAllCurrentBarCode=Kas oled täiesti kindel, et soovid kustutada kõik hetkel kasutatavad vöötkoodide väärtused? AllBarcodeReset=Kõik triipkoodi väärtused on eemaldatud NoBarcodeNumberingTemplateDefined=No numbering barcode template enabled into barcode module setup. NoRecordWithoutBarcodeDefined=No record with no barcode value defined. @@ -469,10 +471,10 @@ Module400Name=Projektid Module400Desc=Projektide haldamine teiste moodulite sees Module410Name=Webcalendar Module410Desc=WebCalendari integratsioon -Module500Name=Special expenses (tax, social contributions, dividends) -Module500Desc=Management of special expenses like taxes, social contribution, dividends and salaries +Module500Name=Erikulud (maksud, sotsiaalmaks, dividendid) +Module500Desc=Erikulude: nt maksude, sotsiaalmaksude, dividendide ja palkade haldamine Module510Name=Palgad -Module510Desc=Management of empoyees salaries and payments +Module510Desc=Töötajate palkade ja palkade maksmise haldamine Module600Name=Teated Module600Desc=Saada mõnede Dolibarri äritegevusega seotud sündmuste puhul teade kolmandate isikute kontaktidele Module700Name=Annetused @@ -495,15 +497,15 @@ Module2400Name=Päevakava Module2400Desc=Tegevuste/ülesannete ja päevakava haldamine Module2500Name=Dokumendihaldus Module2500Desc=Salvesta ja jaga dokumente -Module2600Name= Veebiteenused -Module2600Desc= Lülita Dolibarri veebiteenuste server sisse -Module2700Name= Gravatar -Module2700Desc= Kasuta Gravatar (www.gravatar.com) teenust, et näidata kasutajate/liikmete pilte (loodud nende e-posti aadresside põhjal). Vajab Interneti ligipääsu. +Module2600Name=Veebiteenused +Module2600Desc=Lülita Dolibarri veebiteenuste server sisse +Module2700Name=Gravatar +Module2700Desc=Kasuta Gravatar (www.gravatar.com) teenust, et näidata kasutajate/liikmete pilte (loodud nende e-posti aadresside põhjal). Vajab Interneti ligipääsu. Module2800Desc=FTP klient -Module2900Name= GeoIPMaxmind -Module2900Desc= GeoIP Maxmind konverteerimise võimekus -Module3100Name= Skype -Module3100Desc= Lisa Skypei nupp toetajate/kolmandate isikute/kontaktide kaardile +Module2900Name=GeoIPMaxmind +Module2900Desc=GeoIP Maxmind konverteerimise võimekus +Module3100Name=Skype +Module3100Desc=Lisa Skypei nupp toetajate/kolmandate isikute/kontaktide kaardile Module5000Name=Multi-ettevõte Module5000Desc=Võimaldab hallata mitut ettevõtet Module6000Name=Töövoog @@ -681,6 +683,10 @@ Permission401=Allahindluste vaatamine Permission402=Allahindluste loomine/muutmine Permission403=Allahindluste kinnitamine Permission404=Allahindluste kustutamine +Permission510=Palkade vaatamine +Permission512=Palkade loomine/muutmine +Permission514=Palkade kustutamine +Permission517=Palkade eksportimine Permission531=Teenuste vaatamine Permission532=Teenuste loomine/muutmine Permission534=Teenuste kustutamine @@ -742,7 +748,7 @@ Permission55001=Küsitluste vaatamine Permission55002=Küsitluste loomine/muutmine Permission59001=Read commercial margins Permission59002=Define commercial margins -DictionaryCompanyType=Thirdparties type +DictionaryCompanyType=Kolmandate isikute tüüp DictionaryCompanyJuridicalType=Juridical kinds of thirdparties DictionaryProspectLevel=Prospect potential level DictionaryCanton=Maakonnad @@ -752,24 +758,24 @@ DictionaryCurrency=Valuutad DictionaryCivility=Civility title DictionaryActions=Päevakava sündmuste tüüp DictionarySocialContributions=Social contributions types -DictionaryVAT=VAT Rates or Sales Tax Rates +DictionaryVAT=Käibe- või müügimaksumäärad DictionaryRevenueStamp=Amount of revenue stamps DictionaryPaymentConditions=Maksetingimused DictionaryPaymentModes=Maksmine režiimid DictionaryTypeContact=Kontakti/Aadressi tüübid DictionaryEcotaxe=Ökomaks (WEEE) -DictionaryPaperFormat=Paper formats +DictionaryPaperFormat=Paberiformaadid DictionaryFees=Type of fees -DictionarySendingMethods=Shipping methods +DictionarySendingMethods=Saatmismeetodid DictionaryStaff=Personal -DictionaryAvailability=Delivery delay +DictionaryAvailability=Tarneaeg DictionaryOrderMethods=Tellimisviisid DictionarySource=Origin of proposals/orders DictionaryAccountancyplan=Kontode graafik DictionaryAccountancysystem=Models for chart of accounts SetupSaved=Seadistused salvestatud BackToModuleList=Tagasi moodulite nimekirja -BackToDictionaryList=Back to dictionaries list +BackToDictionaryList=Tagasi sõnastike nimekirja VATReceivedOnly=Erihinda ei maksustata VATManagement=Käibemaksu haldamine VATIsUsedDesc=Pakkumiste, tellimuste, arvete jne loomisel kasutatav vaikimisi käibemaksumäär järgib aktiivset reeglit:
    Kui müüja ei ole käibemaksukohuslane, siis on käibemaks vaikimisi 0. Reegli lõpp.
    Juhul, kui (müümise maa=ostmise maa), siis kasututakse müümise maa käibemaksumäära. Reegli lõpp.
    Kui müüja ja ostja on Euroopa Ühenduses ja tegu on transpordikaupadega (auto, laev, lennuk), siis on vaikimisi maksumäär 0 (käibemaksu peaks ostja maksma oma maa tollis ja mitte müüja juures). Reegli lõpp.
    Kui müüja ja ostja on Euroopa Ühenduses ja ostja ei ole ettevõte, siis on käibemaksumääraks müüdava toote vaikimisi käibemaksumäär. Reegli lõpp.
    Kui müüja ja ostja on Euroopa Ühenduses ja ostja on ettevõte, siis on käibemaks vaikimisi 0. Reegli lõpp.
    Muul juhul on vaikimisi pakutud määraks 0. Reegli lõpp. @@ -999,9 +1005,9 @@ ExtraFieldsSupplierOrders=Täiendavad atribuudid (orders e tellimused) ExtraFieldsSupplierInvoices=Täiendavad atribuudid (invoices e arved) ExtraFieldsProject=Täiendavad atribuudid (projects e projektid) ExtraFieldsProjectTask=Täiendavad atribuudid (tasks e ülesanded) -ExtraFieldHasWrongValue=Atribuut %s on vale väärtusega. +ExtraFieldHasWrongValue=Atribuudil %s on vale väärtus. AlphaNumOnlyCharsAndNoSpace=sümbolid ainult A..Za..z0..9 tühikuteta -AlphaNumOnlyLowerCharsAndNoSpace=only alphanumericals and lower case characters without space +AlphaNumOnlyLowerCharsAndNoSpace=ainult tühikuteta väikesed tähed ja numbrid SendingMailSetup=E-kirja saatmise seadistamine SendmailOptionNotComplete=Hoiatus: mõnedel Linuxi süsteemidel peab e-kirja saatmiseks sendmaili käivitamise seadistus sisaldama võtit -ba (php.ini failis parameeter mail.force_extra_parameters). Kui mõned adressaadid ei saa kunagi kirju kätte, siis proovi parameetri väärtust mail.force_extra_parameters = -ba PathToDocuments=Dokumentide rada @@ -1018,7 +1024,7 @@ SuhosinSessionEncrypt=Sessiooni andmehoidla krüpteeritud Suhosini poolt ConditionIsCurrently=Olek on hetkel %s TestNotPossibleWithCurrentBrowsers=Automaatne tuvastamine ei ole võimalik YouUseBestDriver=Kasutad draiverit %s, mis on hetkel saadaolevatest parim. -YouDoNotUseBestDriver=Kasutad draiverit %s, kuid soovitatav on draiver %s. +YouDoNotUseBestDriver=Kasutad draiverit %s, kuid soovitatav on kasutada draiverit %s. NbOfProductIsLowerThanNoPb=Andmebaasis on vaid %s toodet/teenust. See ei nõua mingit erilist optimeerimist. SearchOptim=Otsingu optimeerimine YouHaveXProductUseSearchOptim=Andmebaasis on %s toodet. Peaksid lisama konstandi PRODUCT_DONOTSEARCH_ANYWHERE väärtusega 1 Kodu->Seadistamine->Muu paneeli, et piirata otsing sõne algusesse ning võimaldada andmebaasil indeksite kasutamine kohese vastuse saamiseks. @@ -1119,7 +1125,7 @@ WatermarkOnDraftProposal=Vesimärk pakkumiste mustanditel (puudub, kui tühi) OrdersSetup=Tellimuste haldamise seadistamine OrdersNumberingModules=Tellimuste numeratsiooni mudelid OrdersModelModule=Tellimuste dokumentide mudelid -HideTreadedOrders=Peida nimekirjas töödeldud või tühistatud tellimused +HideTreadedOrders=Peida nimekirjas täidetud või tühistatud tellimused ValidOrderAfterPropalClosed=Tellimuse kinnitamine pärast pakkumise sulgemist võimaldab vältida tellimuse sammu vahele jätmist FreeLegalTextOnOrders=Vaba tekst tellimustel WatermarkOnDraftOrders=Vesimärk tellimuste mustanditel (puudub, kui tühi) @@ -1214,7 +1220,7 @@ LDAPSynchroKO=Sünkroniseerimise testimine ebaõnnestus LDAPSynchroKOMayBePermissions=Sünkroniseerimise test ebaõnnestus. Kontrolli, et ühendus serveriga on õigestu seadistatud ning et LDAPi uuendused on lubatud LDAPTCPConnectOK=TCP ühendust LDAPi serveriga õnnestus (server=%s, port=%s) LDAPTCPConnectKO=TCP ühendust LDAPi serveriga ebaõnnestus (server=%s, port=%s) -LDAPBindOK=LDAPi serveriga ühendumine/autentimine õnnestus (Server=%s, Port=%s, Admin=%s, Password=%s) +LDAPBindOK=Connect/Authentificate to LDAP server successful (Server=%s, Port=%s, Admin=%s, Password=%s) LDAPBindKO=LDAPi serveriga ühendumine/autentimine ebaõnnestus (Server=%s, Port=%s, Admin=%s, Password=%s) LDAPUnbindSuccessfull=Lahti ühendumine oli edukas LDAPUnbindFailed=Lahti ühendumine ebaõnnestus @@ -1309,8 +1315,8 @@ ConfirmDeleteProductLineAbility=Küsi vormides tooteridade eemaldamisel kinnitus ModifyProductDescAbility=Toodete kirjeldusi on vormides võimalik muuta ViewProductDescInFormAbility=Toodete kirjelduste visualiseerimine vormides (hüpikaknas) ViewProductDescInThirdpartyLanguageAbility=Toodete kirjelduste visualiseerimine kolmanda isiku keeles -UseSearchToSelectProductTooltip=Also if you have a large number of product (> 100 000), you can increase speed by setting constant PRODUCT_DONOTSEARCH_ANYWHERE to 1 in Setup->Other. Search will then be limited to start of string. -UseSearchToSelectProduct=Use a search form to choose a product (rather than a drop-down list). +UseSearchToSelectProductTooltip=Suure toodete arvu korral (> 100 000) saab kiiruse suurendamiseks seadistada Seadistamine->Muu menüüs konstandi PRODUCT_DONOTSEARCH_ANYWHERE väärtuseks 1. Sellisel juhul piirdub otsing sõne algusega. +UseSearchToSelectProduct=Kasuta toote valimiseks otsinguvormi (rippmenüü asemel). UseEcoTaxeAbility=Eco-Taxe (WEEE) tugi SetDefaultBarcodeTypeProducts=Vaikimisi vöötkoodi tüüp toodetel SetDefaultBarcodeTypeThirdParties=Vaikimisi vöötkoodi tüüpi kolmandatel isikutel @@ -1429,7 +1435,7 @@ OptionVATDefault=Standard OptionVATDebitOption=Teenuste eest debiteerimisel OptionVatDefaultDesc=KM on tingitud:
    - kaupade üleandmisel (arve kuupäev)
    - teenuste eest maksmisel OptionVatDebitOptionDesc=KM on tingitud:
    - kaupade üleandmisel (arve kuupäev)
    - arve esitamisel (deebet) teenuste eest -SummaryOfVatExigibilityUsedByDefault=Vastavalt valitud võimalusele tekkiv vaikimisi KM kohustuse aeg: +SummaryOfVatExigibilityUsedByDefault=Time of VAT exigibility by default according to chosen option: OnDelivery=Üleandmisel OnPayment=Maksmisel OnInvoice=Arve esitamisel @@ -1446,7 +1452,7 @@ AccountancyCodeBuy=Ostukonto kood AgendaSetup=Tegevuste ja päevakava mooduli seadistamine PasswordTogetVCalExport=Ekspordilingi autoriseerimise võti PastDelayVCalExport=Ära ekspordi tegevusi, mis on vanemad kui -AGENDA_USE_EVENT_TYPE=Use events types (managed into menu Setup -> Dictionnary -> Type of agenda events) +AGENDA_USE_EVENT_TYPE=Use events types (managed into menu Setup -> Dictionary -> Type of agenda events) ##### ClickToDial ##### ClickToDialDesc=See moodul võimaldab lisada ikooni pärast telefoninumbreid. Klõps sellel ikoonil helistab allpool määratletud URLiga serverisse. See võimaldab näiteks Dolibarrist helistada kõnekeskuse süsteemi, mis helistab SIP-süsteemis olevale numbrile. ##### Point Of Sales (CashDesk) ##### @@ -1499,4 +1505,4 @@ ECMSetup = GED seadistamine ECMAutoTree = Automaatmne kaustapuu ja dokument -Format=Format +Format=Formaat diff --git a/htdocs/langs/et_EE/contracts.lang b/htdocs/langs/et_EE/contracts.lang index 43a35672476..9b3d08292cf 100644 --- a/htdocs/langs/et_EE/contracts.lang +++ b/htdocs/langs/et_EE/contracts.lang @@ -89,6 +89,8 @@ ListOfServicesToExpireWithDuration=%s päeva pärast aeguvate teenuste nimekiri ListOfServicesToExpireWithDurationNeg=Teenuste nimekiri, mis aegusid rohkem kui %s päeva tagasi ListOfServicesToExpire=Aeguvate teenuste nimekiri NoteListOfYourExpiredServices=See nimekiri sisaldab vaid nende lepingute teenuseid, millega seotud kolmandate isikute kohta oled märgitud müügiesindajaks +StandardContractsTemplate=Standard contracts template +ContactNameAndSignature=For %s, name and signature: ##### Types de contacts ##### TypeContact_contrat_internal_SALESREPSIGN=Lepingu allkirjastanud müügiesindaja diff --git a/htdocs/langs/et_EE/exports.lang b/htdocs/langs/et_EE/exports.lang index d06c67df025..057b98bcca9 100644 --- a/htdocs/langs/et_EE/exports.lang +++ b/htdocs/langs/et_EE/exports.lang @@ -8,7 +8,7 @@ ImportableDatas=Imporditav andmekog SelectExportDataSet=Vali eksporditav andmekog... SelectImportDataSet=Vali imporditav andmehulk... SelectExportFields=Vali väljad, mida soovid eksportida või vali eelmääratletud ekspordi profiil -SelectImportFields=Vali imporditavad lähteväljad ja nende sihtväli andmebaasis, liigutades neid üles-alla ankru %s abil või kasuta eelmääratletud profiili: +SelectImportFields=Choose source file fields you want to import and their target field in database by moving them up and down with anchor %s, or select a predefined import profile: NotImportedFields=Lähtefaili väljad, mida ei impordita SaveExportModel=Salvesta see ekspordi profiil, kui kavatsed seda hiljem uuesti kasutada... SaveImportModel=Salvesta see impordi profiil, kui kavatsed seda hiljem uuesti kasutada... @@ -81,7 +81,7 @@ DoNotImportFirstLine=Ära impordi lähtefaili esimest rida NbOfSourceLines=Lähtefaili ridade arv NowClickToTestTheImport=Kontrolli üle seadistatud importimise parameetrid. Kui nad on õiged, siis klõpsa nupul "%s" importimise simulatsiooni käivitamiseks (andmebaasis andmeid ei muudeta, vaid lihtsalt simuleeritakse muudatusi hetkel) RunSimulateImportFile=Käivita importimise simulatsioo -FieldNeedSource=Need andmebaasi väljad nõuavad lähtefailis andmeid +FieldNeedSource=This field requires data from the source file SomeMandatoryFieldHaveNoSource=Mõnedel kohustuslikel väljadel pole andmefailis allikat InformationOnSourceFile=Lähtefaili informatsioone InformationOnTargetTables=Sihtväljade informatsioon @@ -102,14 +102,14 @@ NbOfLinesImported=Edukalt imporditud ridu: %s. DataComeFromNoWhere=Sisestavat väärtust ei ole mitte kuskil lähtefailis. DataComeFromFileFieldNb=Sisestav väärtus pärineb lähtefaili %s. väljalt. DataComeFromIdFoundFromRef=Väärtust, mis pärineb lähtefaili %s. realt, kasutatakse emaobjekti ID leidmiseks (selle kindlustamiseks, et objekt %s, millel on lähtefaili viide, oleks Dolibarris olemas). -# DataComeFromIdFoundFromCodeId=Code that comes from field number %s of source file will be used to find id of parent object to use (So the code from source file must exists into dictionary %s). Note that if you know id, you can also use it into source file instead of code. Import should work in both cases. +DataComeFromIdFoundFromCodeId=Code that comes from field number %s of source file will be used to find id of parent object to use (So the code from source file must exists into dictionary %s). Note that if you know id, you can also use it into source file instead of code. Import should work in both cases. DataIsInsertedInto=Lähtefailist pärinevad andmed sisestatakse järgmisse välja: DataIDSourceIsInsertedInto=Lähtefailis leitud emaobjekti ID sisestatakse järgmisse välja: DataCodeIDSourceIsInsertedInto=Koodist leitud emarea ID sisestatakse järgmisse välja: SourceRequired=Andmeväärtus on kohustuslik SourceExample=Võimaliku andmeväärtuse näide ExampleAnyRefFoundIntoElement=Iga elemendi %s jaoks leitud viide -# ExampleAnyCodeOrIdFoundIntoDictionary=Any code (or id) found into dictionary %s +ExampleAnyCodeOrIdFoundIntoDictionary=Any code (or id) found into dictionary %s CSVFormatDesc=Comma Separated Value faili formaat (.csv).
    See on tekstifaili formaat, kus väljad on eraldatud eraldajaga [ %s ]. Kui välja sisus leidub eraldaja, eraldatakse väli teistest väljadest eraldusssümboliga [ %s ]. Eraldussümboli paomärk on [ %s ]. Excel95FormatDesc=Excel faili formaat (.xls)
    Excel 95 formaat (BIFF5). Excel2007FormatDesc=Excel faili formaat (.xlsx)
    Excel 2007 formaat (SpreadsheetML). @@ -123,10 +123,10 @@ BankCode=Panga kood DeskCode=Laua kood BankAccountNumber=Konto number BankAccountNumberKey=Võti -# SpecialCode=Special code -# ExportStringFilter=%% allows replacing one or more characters in the text -# ExportDateFilter='YYYY' 'YYYYMM' 'YYYYMMDD': filters by one year/month/day
    'YYYY+YYYY' 'YYYYMM+YYYYMM' 'YYYYMMDD+YYYYMMDD': filters over a range of years/months/days
    '>YYYY' '>YYYYMM' '>YYYYMMDD': filters on the following years/months/days
    '<YYYY' '<YYYYMM' '<YYYYMMDD': filters on the previous years/months/days -# ExportNumericFilter='NNNNN' filters by one value
    'NNNNN+NNNNN' filters over a range of values
    '>NNNNN' filters by lower values
    '>NNNNN' filters by higher values +SpecialCode=Erikood +ExportStringFilter=%% allows replacing one or more characters in the text +ExportDateFilter='YYYY' 'YYYYMM' 'YYYYMMDD': filters by one year/month/day
    'YYYY+YYYY' 'YYYYMM+YYYYMM' 'YYYYMMDD+YYYYMMDD': filters over a range of years/months/days
    '>YYYY' '>YYYYMM' '>YYYYMMDD': filters on the following years/months/days
    '<YYYY' '<YYYYMM' '<YYYYMMDD': filters on the previous years/months/days +ExportNumericFilter='NNNNN' filters by one value
    'NNNNN+NNNNN' filters over a range of values
    '>NNNNN' filters by lower values
    '>NNNNN' filters by higher values ## filters SelectFilterFields=Kui soovid mõnede väärtuste põhjal filtreerida, siis sisesta nad siia. FilterableFields=Filtreeritav ala diff --git a/htdocs/langs/et_EE/holiday.lang b/htdocs/langs/et_EE/holiday.lang index 3d6eed89067..372a684ee5e 100644 --- a/htdocs/langs/et_EE/holiday.lang +++ b/htdocs/langs/et_EE/holiday.lang @@ -8,7 +8,6 @@ NotActiveModCP=Selle lehe vaatamiseks pead sisse lülitama puhkuste mooduli NotConfigModCP=Selle lehe vaatamiseks pead seadistama puhkuste mooduli. Selle jaoks klõpsa siia. NoCPforUser=Sul ei ole puhkuse vajadust. AddCP=Taotle puhkust -CPErrorSQL=Tekkis SQLi viga: Employe=Töötaja DateDebCP=Alguskuupäev DateFinCP=Lõppkuupäev diff --git a/htdocs/langs/et_EE/languages.lang b/htdocs/langs/et_EE/languages.lang index d9135cbb457..dc2e3766ce2 100644 --- a/htdocs/langs/et_EE/languages.lang +++ b/htdocs/langs/et_EE/languages.lang @@ -19,6 +19,7 @@ Language_en_SA=Inglise (Saudi Araabia) Language_en_US=Inglise (Ameerika Ühendriigid) Language_en_ZA=Inglise (Lõuna-Aafrika) Language_es_ES=Hispaania +Language_es_DO=Spanish (Dominican Republic) Language_es_AR=Hispaania (Argentiina) Language_es_CL=Spanish (Chile) Language_es_HN=Hispaania (Honduras) @@ -38,6 +39,7 @@ Language_fr_NC=Prantsuse (Uus-Kaledoonia) Language_he_IL=Heebrea Language_hr_HR=Horvaadi Language_hu_HU=Ungari +Language_id_ID=Indonesian Language_is_IS=Islandi Language_it_IT=Itaalia Language_ja_JP=Jaapani diff --git a/htdocs/langs/et_EE/mails.lang b/htdocs/langs/et_EE/mails.lang index 404820c3d5f..40d75731c49 100644 --- a/htdocs/langs/et_EE/mails.lang +++ b/htdocs/langs/et_EE/mails.lang @@ -79,6 +79,7 @@ MailtoEMail=E-kirja hüperlink ActivateCheckRead=Luba "Tühista tellimus" lingi kasutamine ActivateCheckReadKey="Vaata kviitungit" ja "Tühista tellimus" linkide URLi krüpteerimiseks kasutatav võti EMailSentToNRecipients=E-kiri saadetud %s aadressile. +XTargetsAdded=%s recipients added into target list EachInvoiceWillBeAttachedToEmail=A document using default invoice document template will be created and attached to each email. MailTopicSendRemindUnpaidInvoices=Reminder of invoice %s (%s) SendRemind=Send reminder by EMails diff --git a/htdocs/langs/et_EE/main.lang b/htdocs/langs/et_EE/main.lang index f002f705d36..12a1485d362 100644 --- a/htdocs/langs/et_EE/main.lang +++ b/htdocs/langs/et_EE/main.lang @@ -206,7 +206,7 @@ Limit=Piir Limits=Piirid DevelopmentTeam=Arendusmeeskond Logout=Logi välja -NoLogoutProcessWithAuthMode=No applicative disconnect feature with authentication mode %s +NoLogoutProcessWithAuthMode=Autentisrežiimiga %s pole seotud ühtki lahtiühendamise rakendust Connection=Logi sisse Setup=Seadistamine Alert=Hoiatus @@ -315,7 +315,7 @@ SubTotal=Vahesumma TotalHTShort=Kokku (neto) TotalTTCShort=Kokku (km-ga) TotalHT=Kokku (km-ta) -TotalHTforthispage=Total (net of tax) for this page +TotalHTforthispage=Selle lehekülje summa (neto) TotalTTC=Kokku (km-ga) TotalTTCToYourCredit=Kokku (km-ga) krediidile lisaks TotalVAT=Kokku maksud @@ -551,6 +551,7 @@ MailSentBy=E-posti saatis TextUsedInTheMessageBody=E-kirja sisu SendAcknowledgementByMail=Saada kinnitus e-postiga NoEMail=E-posti aadress puudub +NoMobilePhone=Mobiiltelefon puudub Owner=Omanik DetectedVersion=Tuvastatud versioon FollowingConstantsWillBeSubstituted=Järgnevad konstandid asendatakse vastavate väärtustega. @@ -576,7 +577,7 @@ TotalWoman=Täielik TotalMan=Täielik NeverReceived=Pole vastu võetud Canceled=Tühistatud -YouCanChangeValuesForThisListFromDictionarySetup=You can change values for this list from menu setup - dictionary +YouCanChangeValuesForThisListFromDictionarySetup=Antud nimekirja väärtusi saab muuta Seadistamine->Sõnastik menüüst Color=Värv Documents=Seotud failid DocumentsNb=Seotud failid (%s) @@ -605,8 +606,8 @@ Notes=Märkused AddNewLine=Lisa uus rida AddFile=Lisa fail ListOfFiles=Kättesaadavate failide nimekiri -FreeZone=Free entry -FreeLineOfType=Free entry of type +FreeZone=Vaba sisestus +FreeLineOfType=Vaba sisestuse tüüp CloneMainAttributes=Klooni objekt selle põhiliste omadustega PDFMerge=PDFi ühendamine Merge=Ühendamine diff --git a/htdocs/langs/et_EE/products.lang b/htdocs/langs/et_EE/products.lang index 50c9dbd083a..fd64e200422 100644 --- a/htdocs/langs/et_EE/products.lang +++ b/htdocs/langs/et_EE/products.lang @@ -28,8 +28,10 @@ ProductsAndServicesStatistics=Toodete ja teenuste statistika ProductsStatistics=Toodete statistika ProductsOnSell=Saadaval tooted ProductsNotOnSell=Vananenud tooted +ProductsOnSellAndOnBuy=Products not for sale nor purchase ServicesOnSell=Saadaval teenused ServicesNotOnSell=Vananenud teenused +ServicesOnSellAndOnBuy=Services not for sale nor purchase InternalRef=Sisemine viide LastRecorded=Viimased salvestatud müügil olevad tooted/teenused LastRecordedProductsAndServices=Viimased %s salvestatud toodet/teenust @@ -70,6 +72,8 @@ PublicPrice=Avalik hind CurrentPrice=Praegune hind NewPrice=Uus hind MinPrice=Min müügihind +MinPriceHT=Minim. selling price (net of tax) +MinPriceTTC=Minim. selling price (inc. tax) CantBeLessThanMinPrice=Müügihind ei saa olla madalam kui selle toote minimaalne lubatud hind (%s km-ta). Antud sõnumit näidatakse ka siis, kui sisestad liiga suure allahindluse. ContractStatus=Lepingu staatus ContractStatusClosed=Suletud @@ -179,6 +183,7 @@ ProductIsUsed=Seda toodet kasutatakse NewRefForClone=Uue toote/teenuse viide CustomerPrices=Klientide hinnad SuppliersPrices=Hankijate hinnad +SuppliersPricesOfProductsOrServices=Suppliers prices (of products or services) CustomCode=Tolli kood CountryOrigin=Päritolumaa HiddenIntoCombo=Peida valitud nimekirjades @@ -208,6 +213,7 @@ CostPmpHT=Neto kokku VWAP ProductUsedForBuild=Automaatne tootmise kul ProductBuilded=Tootmine lõpetatud ProductsMultiPrice=Toote mitmikhind +ProductsOrServiceMultiPrice=Customers prices (of products or services, multi-prices) ProductSellByQuarterHT=Toodete müügikäive kvartalis VWAP ServiceSellByQuarterHT=Teenuste müügikäive kvartalis VWAP Quarter1=1. kvartal diff --git a/htdocs/langs/et_EE/propal.lang b/htdocs/langs/et_EE/propal.lang index 0db9d1ea9f4..c7a320ce8c4 100644 --- a/htdocs/langs/et_EE/propal.lang +++ b/htdocs/langs/et_EE/propal.lang @@ -60,7 +60,7 @@ FileUploaded=Fail on edukalt üles laetud AssociatedDocuments=Pakkumisega seotud dokumendid: ErrorCantOpenDir=Ei saa kausta avada DatePropal=Pakkumise kuupäev -DateEndPropal=Kehtib kun +DateEndPropal=Kehtib kuni DateEndPropalShort=Lõppkuupäev ValidityDuration=Kehtivuse kestvus CloseAs=Sulge staatusega diff --git a/htdocs/langs/et_EE/shop.lang b/htdocs/langs/et_EE/shop.lang index a5a8ed05501..5de29a9d33e 100644 --- a/htdocs/langs/et_EE/shop.lang +++ b/htdocs/langs/et_EE/shop.lang @@ -1,4 +1,5 @@ # Dolibarr language file - Source file is en_US - shop +FailedConnectDBCheckModuleSetup=Failed to connect to oscommerce database. Check your module setup Shop=Pood ShopWeb=Veebipood LastOrders=Viimased tellimused diff --git a/htdocs/langs/et_EE/stocks.lang b/htdocs/langs/et_EE/stocks.lang index c9bc86f7135..a50d1ce151e 100644 --- a/htdocs/langs/et_EE/stocks.lang +++ b/htdocs/langs/et_EE/stocks.lang @@ -112,6 +112,7 @@ ReplenishmentOrdersDesc=See on kõigi avatud ostutellimuste nimekiri Replenishments=Värskendamised NbOfProductBeforePeriod=Toote %s laojääk enne valitud perioodi (< %s) NbOfProductAfterPeriod=Toote %s laojääk pärast valitud perioodi (> %s) +MassMovement=Mass movement MassStockMovement=Massiline lao liikumine SelectProductInAndOutWareHouse=Vali toode, kogus, lähteladu ja sihtladu, siis klõpsa "%s". Kui see on kõigi soovitud liikumiste jaoks tehtud, klõpsa "%s". RecordMovement=Registreeri ülekanne diff --git a/htdocs/langs/eu_ES/admin.lang b/htdocs/langs/eu_ES/admin.lang index a716743ae2e..a77022efb9e 100644 --- a/htdocs/langs/eu_ES/admin.lang +++ b/htdocs/langs/eu_ES/admin.lang @@ -116,7 +116,7 @@ LanguageBrowserParameter=Parameter %s LocalisationDolibarrParameters=Localisation parameters ClientTZ=Client Time Zone (user) ClientHour=Client time (user) -OSTZ=Servre OS Time Zone +OSTZ=Server OS Time Zone PHPTZ=PHP server Time Zone PHPServerOffsetWithGreenwich=PHP server offset width Greenwich (seconds) ClientOffsetWithGreenwich=Client/Browser offset width Greenwich (seconds) @@ -233,7 +233,9 @@ OfficialWebSiteFr=French official web site OfficialWiki=Dolibarr documentation on Wiki OfficialDemo=Dolibarr online demo OfficialMarketPlace=Official market place for external modules/addons -OfficialWebHostingService=Official web hosting services (Cloud hosting) +OfficialWebHostingService=Referenced web hosting services (Cloud hosting) +ReferencedPreferredPartners=Preferred Partners +OtherResources=Autres ressources ForDocumentationSeeWiki=For user or developer documentation (Doc, FAQs...),
    take a look at the Dolibarr Wiki:
    %s ForAnswersSeeForum=For any other questions/help, you can use the Dolibarr forum:
    %s HelpCenterDesc1=This area can help you to get a Help support service on Dolibarr. @@ -369,9 +371,9 @@ ExtrafieldSelectList = Select from table ExtrafieldSeparator=Separator ExtrafieldCheckBox=Checkbox ExtrafieldRadio=Radio button -ExtrafieldParamHelpselect=Parameters list have to be like key,value

    for exemple :
    1,value1
    2,value2
    3,value3
    ...

    In order to have the list depending on another :
    1,value1|parent_list_code:parent_key
    2,value2|parent_list_code:parent_key -ExtrafieldParamHelpcheckbox=Parameters list have to be like key,value

    for exemple :
    1,value1
    2,value2
    3,value3
    ... -ExtrafieldParamHelpradio=Parameters list have to be like key,value

    for exemple :
    1,value1
    2,value2
    3,value3
    ... +ExtrafieldParamHelpselect=Parameters list have to be like key,value

    for example :
    1,value1
    2,value2
    3,value3
    ...

    In order to have the list depending on another :
    1,value1|parent_list_code:parent_key
    2,value2|parent_list_code:parent_key +ExtrafieldParamHelpcheckbox=Parameters list have to be like key,value

    for example :
    1,value1
    2,value2
    3,value3
    ... +ExtrafieldParamHelpradio=Parameters list have to be like key,value

    for example :
    1,value1
    2,value2
    3,value3
    ... ExtrafieldParamHelpsellist=Parameters list comes from a table
    Syntax : table_name:label_field:id_field::filter
    Example : c_typent:libelle:id::filter

    filter can be a simple test (eg active=1) to display only active value
    if you want to filter on extrafields use syntaxt extra.fieldcode=... (where field code is the code of extrafield)

    In order to have the list depending on another :
    c_typent:libelle:id:parent_list_code|parent_column:filter LibraryToBuildPDF=Library used to build PDF WarningUsingFPDF=Warning: Your conf.php contains directive dolibarr_pdf_force_fpdf=1. This means you use the FPDF library to generate PDF files. This library is old and does not support a lot of features (Unicode, image transparency, cyrillic, arab and asiatic languages, ...), so you may experience errors during PDF generation.
    To solve this and have a full support of PDF generation, please download TCPDF library, then comment or remove the line $dolibarr_pdf_force_fpdf=1, and add instead $dolibarr_lib_TCPDF_PATH='path_to_TCPDF_dir' @@ -472,7 +474,7 @@ Module410Desc=Webcalendar integration Module500Name=Special expenses (tax, social contributions, dividends) Module500Desc=Management of special expenses like taxes, social contribution, dividends and salaries Module510Name=Salaries -Module510Desc=Management of empoyees salaries and payments +Module510Desc=Management of employees salaries and payments Module600Name=Notifications Module600Desc=Send notifications by email on some Dolibarr business events to third party contacts Module700Name=Donations @@ -495,15 +497,15 @@ Module2400Name=Agenda Module2400Desc=Events/tasks and agenda management Module2500Name=Electronic Content Management Module2500Desc=Save and share documents -Module2600Name= WebServices -Module2600Desc= Enable the Dolibarr web services server -Module2700Name= Gravatar -Module2700Desc= Use online Gravatar service (www.gravatar.com) to show photo of users/members (found with their emails). Need an internet access +Module2600Name=WebServices +Module2600Desc=Enable the Dolibarr web services server +Module2700Name=Gravatar +Module2700Desc=Use online Gravatar service (www.gravatar.com) to show photo of users/members (found with their emails). Need an internet access Module2800Desc=FTP Client -Module2900Name= GeoIPMaxmind -Module2900Desc= GeoIP Maxmind conversions capabilities -Module3100Name= Skype -Module3100Desc= Add a Skype button into card of adherents / third parties / contacts +Module2900Name=GeoIPMaxmind +Module2900Desc=GeoIP Maxmind conversions capabilities +Module3100Name=Skype +Module3100Desc=Add a Skype button into card of adherents / third parties / contacts Module5000Name=Multi-company Module5000Desc=Allows you to manage multiple companies Module6000Name=Workflow @@ -681,6 +683,10 @@ Permission401=Read discounts Permission402=Create/modify discounts Permission403=Validate discounts Permission404=Delete discounts +Permission510=Read Salaries +Permission512=Create/modify salaries +Permission514=Delete salaries +Permission517=Export salaries Permission531=Read services Permission532=Create/modify services Permission534=Delete services @@ -999,7 +1005,7 @@ ExtraFieldsSupplierOrders=Complementary attributes (orders) ExtraFieldsSupplierInvoices=Complementary attributes (invoices) ExtraFieldsProject=Complementary attributes (projects) ExtraFieldsProjectTask=Complementary attributes (tasks) -ExtraFieldHasWrongValue=Attribut %s has a wrong value. +ExtraFieldHasWrongValue=Attribute %s has a wrong value. AlphaNumOnlyCharsAndNoSpace=only alphanumericals characters without space AlphaNumOnlyLowerCharsAndNoSpace=only alphanumericals and lower case characters without space SendingMailSetup=Setup of sendings by email @@ -1018,13 +1024,13 @@ SuhosinSessionEncrypt=Session storage encrypted by Suhosin ConditionIsCurrently=Condition is currently %s TestNotPossibleWithCurrentBrowsers=Automatic detection not possible YouUseBestDriver=You use driver %s that is best driver available currently. -YouDoNotUseBestDriver=You use drive %s but driver %s is recommanded. +YouDoNotUseBestDriver=You use drive %s but driver %s is recommended. NbOfProductIsLowerThanNoPb=You have only %s products/services into database. This does not required any particular optimization. SearchOptim=Search optimization YouHaveXProductUseSearchOptim=You have %s product into database. You should add the constant PRODUCT_DONOTSEARCH_ANYWHERE to 1 into Home-Setup-Other, you limit the search to the beginning of strings making possible for database to use index and you should get an immediate response. BrowserIsOK=You are using the web browser %s. This browser is ok for security and performance. BrowserIsKO=You are using the web browser %s. This browser is known to be a bad choice for security, performance and reliability. We recommand you to use Firefox, Chrome, Opera or Safari. -XDebugInstalled=XDebug est chargé. +XDebugInstalled=XDebug is loaded. XCacheInstalled=XCache is loaded. AddRefInList=Display customer/supplier ref into list (select list or combobox) and most of hyperlink FieldEdition=Edition of field %s @@ -1073,7 +1079,7 @@ WebCalServer=Server hosting calendar database WebCalDatabaseName=Database name WebCalUser=User to access database WebCalSetupSaved=Webcalendar setup saved successfully. -WebCalTestOk=Connection to server '%s' on database '%s' with user '%s' successfull. +WebCalTestOk=Connection to server '%s' on database '%s' with user '%s' successful. WebCalTestKo1=Connection to server '%s' succeed but database '%s' could not be reached. WebCalTestKo2=Connection to server '%s' with user '%s' failed. WebCalErrorConnectOkButWrongDatabase=Connection succeeded but database doesn't look to be a Webcalendar database. @@ -1119,7 +1125,7 @@ WatermarkOnDraftProposal=Watermark on draft commercial proposals (none if empty) OrdersSetup=Order management setup OrdersNumberingModules=Orders numbering models OrdersModelModule=Order documents models -HideTreadedOrders=Hide the treated or canceled orders in the list +HideTreadedOrders=Hide the treated or cancelled orders in the list ValidOrderAfterPropalClosed=To validate the order after proposal closer, makes it possible not to step by the provisional order FreeLegalTextOnOrders=Free text on orders WatermarkOnDraftOrders=Watermark on draft orders (none if empty) @@ -1214,9 +1220,9 @@ LDAPSynchroKO=Failed synchronization test LDAPSynchroKOMayBePermissions=Failed synchronization test. Check that connexion to server is correctly configured and allows LDAP udpates LDAPTCPConnectOK=TCP connect to LDAP server successful (Server=%s, Port=%s) LDAPTCPConnectKO=TCP connect to LDAP server failed (Server=%s, Port=%s) -LDAPBindOK=Connect/Authentificate to LDAP server sucessfull (Server=%s, Port=%s, Admin=%s, Password=%s) +LDAPBindOK=Connect/Authentificate to LDAP server successful (Server=%s, Port=%s, Admin=%s, Password=%s) LDAPBindKO=Connect/Authentificate to LDAP server failed (Server=%s, Port=%s, Admin=%s, Password=%s) -LDAPUnbindSuccessfull=Disconnect successfull +LDAPUnbindSuccessfull=Disconnect successful LDAPUnbindFailed=Disconnect failed LDAPConnectToDNSuccessfull=Connection to DN (%s) successful LDAPConnectToDNFailed=Connection to DN (%s) failed @@ -1273,7 +1279,7 @@ LDAPFieldSidExample=Example : objectsid LDAPFieldEndLastSubscription=Date of subscription end LDAPFieldTitle=Post/Function LDAPFieldTitleExample=Example: title -LDAPParametersAreStillHardCoded=LDAP parametres are still hardcoded (in contact class) +LDAPParametersAreStillHardCoded=LDAP parameters are still hardcoded (in contact class) LDAPSetupNotComplete=LDAP setup not complete (go on others tabs) LDAPNoUserOrPasswordProvidedAccessIsReadOnly=No administrator or password provided. LDAP access will be anonymous and in read only mode. LDAPDescContact=This page allows you to define LDAP attributes name in LDAP tree for each data found on Dolibarr contacts. @@ -1429,7 +1435,7 @@ OptionVATDefault=Standard OptionVATDebitOption=Option services on Debit OptionVatDefaultDesc=VAT is due:
    - on delivery for goods (we use invoice date)
    - on payments for services OptionVatDebitOptionDesc=VAT is due:
    - on delivery for goods (we use invoice date)
    - on invoice (debit) for services -SummaryOfVatExigibilityUsedByDefault=Time of VAT exigibility by default according to choosed option: +SummaryOfVatExigibilityUsedByDefault=Time of VAT exigibility by default according to chosen option: OnDelivery=On delivery OnPayment=On payment OnInvoice=On invoice @@ -1446,7 +1452,7 @@ AccountancyCodeBuy=Purchase account. code AgendaSetup=Events and agenda module setup PasswordTogetVCalExport=Key to authorize export link PastDelayVCalExport=Do not export event older than -AGENDA_USE_EVENT_TYPE=Use events types (managed into menu Setup -> Dictionnary -> Type of agenda events) +AGENDA_USE_EVENT_TYPE=Use events types (managed into menu Setup -> Dictionary -> Type of agenda events) ##### ClickToDial ##### ClickToDialDesc=This module allows to add an icon after phone numbers. A click on this icon will call a server with a particular URL you define below. This can be used to call a call center system from Dolibarr that can call the phone number on a SIP system for example. ##### Point Of Sales (CashDesk) ##### diff --git a/htdocs/langs/eu_ES/contracts.lang b/htdocs/langs/eu_ES/contracts.lang index def3d8aceff..e5ad112b222 100644 --- a/htdocs/langs/eu_ES/contracts.lang +++ b/htdocs/langs/eu_ES/contracts.lang @@ -1,99 +1,101 @@ # Dolibarr language file - Source file is en_US - contracts -# ContractsArea=Contracts area -# ListOfContracts=List of contracts -# LastContracts=Last %s modified contracts -# AllContracts=All contracts -# ContractCard=Contract card -# ContractStatus=Contract status -# ContractStatusNotRunning=Not running -# ContractStatusRunning=Running -# ContractStatusDraft=Draft -# ContractStatusValidated=Validated -# ContractStatusClosed=Closed -# ServiceStatusInitial=Not running -# ServiceStatusRunning=Running -# ServiceStatusNotLate=Running, not expired -# ServiceStatusNotLateShort=Not expired -# ServiceStatusLate=Running, expired -# ServiceStatusLateShort=Expired -# ServiceStatusClosed=Closed -# ServicesLegend=Services legend -# Contracts=Contracts -# Contract=Contract -# NoContracts=No contracts -# MenuServices=Services -# MenuInactiveServices=Services not active -# MenuRunningServices=Running services -# MenuExpiredServices=Expired services -# MenuClosedServices=Closed services -# NewContract=New contract -# AddContract=Add contract -# SearchAContract=Search a contract -# DeleteAContract=Delete a contract -# CloseAContract=Close a contract -# ConfirmDeleteAContract=Are you sure you want to delete this contract and all its services ? -# ConfirmValidateContract=Are you sure you want to validate this contract under name %s ? -# ConfirmCloseContract=This will close all services (active or not). Are you sure you want to close this contract ? -# ConfirmCloseService=Are you sure you want to close this service with date %s ? -# ValidateAContract=Validate a contract -# ActivateService=Activate service -# ConfirmActivateService=Are you sure you want to activate this service with date %s ? -# RefContract=Contract reference -# DateContract=Contract date -# DateServiceActivate=Service activation date -# DateServiceUnactivate=Service deactivation date -# DateServiceStart=Date for beginning of service -# DateServiceEnd=Date for end of service -# ShowContract=Show contract -# ListOfServices=List of services -# ListOfInactiveServices=List of not active services -# ListOfExpiredServices=List of expired active services -# ListOfClosedServices=List of closed services -# ListOfRunningContractsLines=List of running contract lines -# ListOfRunningServices=List of running services -# NotActivatedServices=Inactive services (among validated contracts) -# BoardNotActivatedServices=Services to activate among validated contracts -# LastContracts=Last %s modified contracts -# LastActivatedServices=Last %s activated services -# LastModifiedServices=Last %s modified services -# EditServiceLine=Edit service line -# ContractStartDate=Start date -# ContractEndDate=End date -# DateStartPlanned=Planned start date -# DateStartPlannedShort=Planned start date -# DateEndPlanned=Planned end date -# DateEndPlannedShort=Planned end date -# DateStartReal=Real start date -# DateStartRealShort=Real start date -# DateEndReal=Real end date -# DateEndRealShort=Real end date -# NbOfServices=Nb of services -# CloseService=Close service -# ServicesNomberShort=%s service(s) -# RunningServices=Running services -# BoardRunningServices=Expired running services -# ServiceStatus=Status of service -# DraftContracts=Drafts contracts -# CloseRefusedBecauseOneServiceActive=Contract can't be closed as ther is at least one open service on it -# CloseAllContracts=Close all contract lines -# DeleteContractLine=Delete a contract line -# ConfirmDeleteContractLine=Are you sure you want to delete this contract line ? -# MoveToAnotherContract=Move service into another contract. -# ConfirmMoveToAnotherContract=I choosed new target contract and confirm I want to move this service into this contract. -# ConfirmMoveToAnotherContractQuestion=Choose in which existing contract (of same third party), you want to move this service to ? -# PaymentRenewContractId=Renew contract line (number %s) -# ExpiredSince=Expiration date -# RelatedContracts=Related contracts -# NoExpiredServices=No expired active services -# ListOfServicesToExpireWithDuration=List of Services to expire in %s days -# ListOfServicesToExpireWithDurationNeg=List of Services expired from more than %s days -# ListOfServicesToExpire=List of Services to expire -# NoteListOfYourExpiredServices=This list contains only services of contracts for third parties you are linked to as a sale representative. +ContractsArea=Contracts area +ListOfContracts=List of contracts +LastContracts=Last %s modified contracts +AllContracts=All contracts +ContractCard=Contract card +ContractStatus=Contract status +ContractStatusNotRunning=Not running +ContractStatusRunning=Running +ContractStatusDraft=Draft +ContractStatusValidated=Validated +ContractStatusClosed=Closed +ServiceStatusInitial=Not running +ServiceStatusRunning=Running +ServiceStatusNotLate=Running, not expired +ServiceStatusNotLateShort=Not expired +ServiceStatusLate=Running, expired +ServiceStatusLateShort=Expired +ServiceStatusClosed=Closed +ServicesLegend=Services legend +Contracts=Contracts +Contract=Contract +NoContracts=No contracts +MenuServices=Services +MenuInactiveServices=Services not active +MenuRunningServices=Running services +MenuExpiredServices=Expired services +MenuClosedServices=Closed services +NewContract=New contract +AddContract=Add contract +SearchAContract=Search a contract +DeleteAContract=Delete a contract +CloseAContract=Close a contract +ConfirmDeleteAContract=Are you sure you want to delete this contract and all its services ? +ConfirmValidateContract=Are you sure you want to validate this contract under name %s ? +ConfirmCloseContract=This will close all services (active or not). Are you sure you want to close this contract ? +ConfirmCloseService=Are you sure you want to close this service with date %s ? +ValidateAContract=Validate a contract +ActivateService=Activate service +ConfirmActivateService=Are you sure you want to activate this service with date %s ? +RefContract=Contract reference +DateContract=Contract date +DateServiceActivate=Service activation date +DateServiceUnactivate=Service deactivation date +DateServiceStart=Date for beginning of service +DateServiceEnd=Date for end of service +ShowContract=Show contract +ListOfServices=List of services +ListOfInactiveServices=List of not active services +ListOfExpiredServices=List of expired active services +ListOfClosedServices=List of closed services +ListOfRunningContractsLines=List of running contract lines +ListOfRunningServices=List of running services +NotActivatedServices=Inactive services (among validated contracts) +BoardNotActivatedServices=Services to activate among validated contracts +LastContracts=Last %s modified contracts +LastActivatedServices=Last %s activated services +LastModifiedServices=Last %s modified services +EditServiceLine=Edit service line +ContractStartDate=Start date +ContractEndDate=End date +DateStartPlanned=Planned start date +DateStartPlannedShort=Planned start date +DateEndPlanned=Planned end date +DateEndPlannedShort=Planned end date +DateStartReal=Real start date +DateStartRealShort=Real start date +DateEndReal=Real end date +DateEndRealShort=Real end date +NbOfServices=Nb of services +CloseService=Close service +ServicesNomberShort=%s service(s) +RunningServices=Running services +BoardRunningServices=Expired running services +ServiceStatus=Status of service +DraftContracts=Drafts contracts +CloseRefusedBecauseOneServiceActive=Contract can't be closed as ther is at least one open service on it +CloseAllContracts=Close all contract lines +DeleteContractLine=Delete a contract line +ConfirmDeleteContractLine=Are you sure you want to delete this contract line ? +MoveToAnotherContract=Move service into another contract. +ConfirmMoveToAnotherContract=I choosed new target contract and confirm I want to move this service into this contract. +ConfirmMoveToAnotherContractQuestion=Choose in which existing contract (of same third party), you want to move this service to ? +PaymentRenewContractId=Renew contract line (number %s) +ExpiredSince=Expiration date +RelatedContracts=Related contracts +NoExpiredServices=No expired active services +ListOfServicesToExpireWithDuration=List of Services to expire in %s days +ListOfServicesToExpireWithDurationNeg=List of Services expired from more than %s days +ListOfServicesToExpire=List of Services to expire +NoteListOfYourExpiredServices=This list contains only services of contracts for third parties you are linked to as a sale representative. +StandardContractsTemplate=Standard contracts template +ContactNameAndSignature=For %s, name and signature: ##### Types de contacts ##### -# TypeContact_contrat_internal_SALESREPSIGN=Sales representative signing contract -# TypeContact_contrat_internal_SALESREPFOLL=Sales representative following-up contract -# TypeContact_contrat_external_BILLING=Billing customer contact -# TypeContact_contrat_external_CUSTOMER=Follow-up customer contact -# TypeContact_contrat_external_SALESREPSIGN=Signing contract customer contact -# Error_CONTRACT_ADDON_NotDefined=Constant CONTRACT_ADDON not defined +TypeContact_contrat_internal_SALESREPSIGN=Sales representative signing contract +TypeContact_contrat_internal_SALESREPFOLL=Sales representative following-up contract +TypeContact_contrat_external_BILLING=Billing customer contact +TypeContact_contrat_external_CUSTOMER=Follow-up customer contact +TypeContact_contrat_external_SALESREPSIGN=Signing contract customer contact +Error_CONTRACT_ADDON_NotDefined=Constant CONTRACT_ADDON not defined diff --git a/htdocs/langs/eu_ES/exports.lang b/htdocs/langs/eu_ES/exports.lang index 09915556286..3acad0d32cd 100644 --- a/htdocs/langs/eu_ES/exports.lang +++ b/htdocs/langs/eu_ES/exports.lang @@ -1,134 +1,134 @@ # Dolibarr language file - Source file is en_US - exports -# ExportsArea=Exports area -# ImportArea=Import area -# NewExport=New export -# NewImport=New import -# ExportableDatas=Exportable dataset -# ImportableDatas=Importable dataset -# SelectExportDataSet=Choose dataset you want to export... -# SelectImportDataSet=Choose dataset you want to import... -# SelectExportFields=Choose fields you want to export, or select a predefined export profile -# SelectImportFields=Choose source file fields you want to import and their target field in database by moving them up and down with anchor %s, or select a predefined import profil: -# NotImportedFields=Fields of source file not imported -# SaveExportModel=Save this export profile if you plan to reuse it later... -# SaveImportModel=Save this import profile if you plan to reuse it later... -# ExportModelName=Export profile name -# ExportModelSaved=Export profile saved under name %s. -# ExportableFields=Exportable fields -# ExportedFields=Exported fields -# ImportModelName=Import profile name -# ImportModelSaved=Import profile saved under name %s. -# ImportableFields=Importable fields -# ImportedFields=Imported fields -# DatasetToExport=Dataset to export -# DatasetToImport=Import file into dataset -# NoDiscardedFields=No fields in source file are discarded -# Dataset=Dataset -# ChooseFieldsOrdersAndTitle=Choose fields order... -# FieldsOrder=Fields order -# FieldsTitle=Fields title -# FieldOrder=Field order -# FieldTitle=Field title -# ChooseExportFormat=Choose export format -# NowClickToGenerateToBuildExportFile=Now, select file format in combo box and click on "Generate" to build export file... -# AvailableFormats=Available formats -# LibraryShort=Library -# LibraryUsed=Library used -# LibraryVersion=Version -# Step=Step -# FormatedImport=Import assistant -# FormatedImportDesc1=This area allows to import personalized data, using an assistant to help you in process without technical knowledge. -# FormatedImportDesc2=First step is to choose a king of data you want to load, then file to load, then to choose which fields you want to load. -# FormatedExport=Export assistant -# FormatedExportDesc1=This area allows to export personalized data, using an assistant to help you in process without technical knowledge. -# FormatedExportDesc2=First step is to choose a predefined dataset, then to choose which fields you want in your result files, and which order. -# FormatedExportDesc3=When data to export are selected, you can define output file format you want to export your data to. -# Sheet=Sheet -# NoImportableData=No importable data (no module with definitions to allow data imports) -# FileSuccessfullyBuilt=Export file generated -# SQLUsedForExport=SQL Request used to build export file -# LineId=Id of line -# LineDescription=Description of line -# LineUnitPrice=Unit price of line -# LineVATRate=VAT Rate of line -# LineQty=Quantity for line -# LineTotalHT=Amount net of tax for line -# LineTotalTTC=Amount with tax for line -# LineTotalVAT=Amount of VAT for line -# TypeOfLineServiceOrProduct=Type of line (0=product, 1=service) -# FileWithDataToImport=File with data to import -# FileToImport=Source file to import -# FileMustHaveOneOfFollowingFormat=File to import must have one of following format -# DownloadEmptyExample=Download example of empty source file -# ChooseFormatOfFileToImport=Choose file format to use as import file format by clicking on picto %s to select it... -# ChooseFileToImport=Upload file then click on picto %s to select file as source import file... -# SourceFileFormat=Source file format -# FieldsInSourceFile=Fields in source file -# FieldsInTargetDatabase=Target fields in Dolibarr database (bold=mandatory) -# Field=Field -# NoFields=No fields -# MoveField=Move field column number %s -# ExampleOfImportFile=Example_of_import_file -# SaveImportProfile=Save this import profile -# ErrorImportDuplicateProfil=Failed to save this import profile with this name. An existing profile already exists with this name. -# ImportSummary=Import setup summary -# TablesTarget=Targeted tables -# FieldsTarget=Targeted fields -# TableTarget=Targeted table -# FieldTarget=Targeted field -# FieldSource=Source field -# DoNotImportFirstLine=Do not import first line of source file -# NbOfSourceLines=Number of lines in source file -# NowClickToTestTheImport=Check import parameters you have defined. If they are correct, click on button "%s" to launch a simulation of import process (no data will be changed in your database, it's only a simulation for the moment)... -# RunSimulateImportFile=Launch the import simulation -# FieldNeedSource=This fiels in database require a data from source file -# SomeMandatoryFieldHaveNoSource=Some mandatory fields have no source from data file -# InformationOnSourceFile=Information on source file -# InformationOnTargetTables=Information on target fields -# SelectAtLeastOneField=Switch at least one source field in the column of fields to export -# SelectFormat=Choose this import file format -# RunImportFile=Launch import file -# NowClickToRunTheImport=Check result of import simulation. If everything is ok, launch the definitive import. -# DataLoadedWithId=All data will be loaded with the following import id: %s -# ErrorMissingMandatoryValue=Mandatory data is empty in source file for field %s. -# TooMuchErrors=There is still %s other source lines with errors but output has been limited. -# TooMuchWarnings=There is still %s other source lines with warnings but output has been limited. -# EmptyLine=Empty line (will be discarded) -# CorrectErrorBeforeRunningImport=You must first correct all errors before running definitive import. -# FileWasImported=File was imported with number %s. -# YouCanUseImportIdToFindRecord=You can find all imported records in your database by filtering on field import_key='%s'. -# NbOfLinesOK=Number of lines with no errors and no warnings: %s. -# NbOfLinesImported=Number of lines successfully imported: %s. -# DataComeFromNoWhere=Value to insert comes from nowhere in source file. -# DataComeFromFileFieldNb=Value to insert comes from field number %s in source file. -# DataComeFromIdFoundFromRef=Value that comes from field number %s of source file will be used to find id of parent object to use (So the objet %s that has the ref. from source file must exists into Dolibarr). -# DataComeFromIdFoundFromCodeId=Code that comes from field number %s of source file will be used to find id of parent object to use (So the code from source file must exists into dictionary %s). Note that if you know id, you can also use it into source file instead of code. Import should work in both cases. -# DataIsInsertedInto=Data coming from source file will be inserted into the following field: -# DataIDSourceIsInsertedInto=The id of parent object found using the data in source file, will be inserted into the following field: -# DataCodeIDSourceIsInsertedInto=The id of parent line found from code, will be inserted into following field: -# SourceRequired=Data value is mandatory -# SourceExample=Example of possible data value -# ExampleAnyRefFoundIntoElement=Any ref found for element %s -# ExampleAnyCodeOrIdFoundIntoDictionary=Any code (or id) found into dictionary %s -# CSVFormatDesc=Comma Separated Value file format (.csv).
    This is a text file format where fields are separated by separator [ %s ]. If separator is found inside a field content, field is rounded by round character [ %s ]. Escape character to escape round character is [ %s ]. -# Excel95FormatDesc=Excel file format (.xls)
    This is native Excel 95 format (BIFF5). -# Excel2007FormatDesc=Excel file format (.xlsx)
    This is native Excel 2007 format (SpreadsheetML). -# TsvFormatDesc=Tab Separated Value file format (.tsv)
    This is a text file format where fields are separated by a tabulator [tab]. -# ExportFieldAutomaticallyAdded=Field %s was automatically added. It will avoid you to have similar lines to be treated as duplicate records (with this field added, all lines will own their own id and will differ). -# CsvOptions=Csv Options -# Separator=Separator -# Enclosure=Enclosure -# SuppliersProducts=Suppliers Products -# BankCode=Bank code -# DeskCode=Desk code -# BankAccountNumber=Account number -# BankAccountNumberKey=Key -# SpecialCode=Special code -# ExportStringFilter=%% allows replacing one or more characters in the text -# ExportDateFilter='YYYY' 'YYYYMM' 'YYYYMMDD': filters by one year/month/day
    'YYYY+YYYY' 'YYYYMM+YYYYMM' 'YYYYMMDD+YYYYMMDD': filters over a range of years/months/days
    '>YYYY' '>YYYYMM' '>YYYYMMDD': filters on the following years/months/days
    '<YYYY' '<YYYYMM' '<YYYYMMDD': filters on the previous years/months/days -# ExportNumericFilter='NNNNN' filters by one value
    'NNNNN+NNNNN' filters over a range of values
    '>NNNNN' filters by lower values
    '>NNNNN' filters by higher values +ExportsArea=Exports area +ImportArea=Import area +NewExport=New export +NewImport=New import +ExportableDatas=Exportable dataset +ImportableDatas=Importable dataset +SelectExportDataSet=Choose dataset you want to export... +SelectImportDataSet=Choose dataset you want to import... +SelectExportFields=Choose fields you want to export, or select a predefined export profile +SelectImportFields=Choose source file fields you want to import and their target field in database by moving them up and down with anchor %s, or select a predefined import profile: +NotImportedFields=Fields of source file not imported +SaveExportModel=Save this export profile if you plan to reuse it later... +SaveImportModel=Save this import profile if you plan to reuse it later... +ExportModelName=Export profile name +ExportModelSaved=Export profile saved under name %s. +ExportableFields=Exportable fields +ExportedFields=Exported fields +ImportModelName=Import profile name +ImportModelSaved=Import profile saved under name %s. +ImportableFields=Importable fields +ImportedFields=Imported fields +DatasetToExport=Dataset to export +DatasetToImport=Import file into dataset +NoDiscardedFields=No fields in source file are discarded +Dataset=Dataset +ChooseFieldsOrdersAndTitle=Choose fields order... +FieldsOrder=Fields order +FieldsTitle=Fields title +FieldOrder=Field order +FieldTitle=Field title +ChooseExportFormat=Choose export format +NowClickToGenerateToBuildExportFile=Now, select file format in combo box and click on "Generate" to build export file... +AvailableFormats=Available formats +LibraryShort=Library +LibraryUsed=Library used +LibraryVersion=Version +Step=Step +FormatedImport=Import assistant +FormatedImportDesc1=This area allows to import personalized data, using an assistant to help you in process without technical knowledge. +FormatedImportDesc2=First step is to choose a king of data you want to load, then file to load, then to choose which fields you want to load. +FormatedExport=Export assistant +FormatedExportDesc1=This area allows to export personalized data, using an assistant to help you in process without technical knowledge. +FormatedExportDesc2=First step is to choose a predefined dataset, then to choose which fields you want in your result files, and which order. +FormatedExportDesc3=When data to export are selected, you can define output file format you want to export your data to. +Sheet=Sheet +NoImportableData=No importable data (no module with definitions to allow data imports) +FileSuccessfullyBuilt=Export file generated +SQLUsedForExport=SQL Request used to build export file +LineId=Id of line +LineDescription=Description of line +LineUnitPrice=Unit price of line +LineVATRate=VAT Rate of line +LineQty=Quantity for line +LineTotalHT=Amount net of tax for line +LineTotalTTC=Amount with tax for line +LineTotalVAT=Amount of VAT for line +TypeOfLineServiceOrProduct=Type of line (0=product, 1=service) +FileWithDataToImport=File with data to import +FileToImport=Source file to import +FileMustHaveOneOfFollowingFormat=File to import must have one of following format +DownloadEmptyExample=Download example of empty source file +ChooseFormatOfFileToImport=Choose file format to use as import file format by clicking on picto %s to select it... +ChooseFileToImport=Upload file then click on picto %s to select file as source import file... +SourceFileFormat=Source file format +FieldsInSourceFile=Fields in source file +FieldsInTargetDatabase=Target fields in Dolibarr database (bold=mandatory) +Field=Field +NoFields=No fields +MoveField=Move field column number %s +ExampleOfImportFile=Example_of_import_file +SaveImportProfile=Save this import profile +ErrorImportDuplicateProfil=Failed to save this import profile with this name. An existing profile already exists with this name. +ImportSummary=Import setup summary +TablesTarget=Targeted tables +FieldsTarget=Targeted fields +TableTarget=Targeted table +FieldTarget=Targeted field +FieldSource=Source field +DoNotImportFirstLine=Do not import first line of source file +NbOfSourceLines=Number of lines in source file +NowClickToTestTheImport=Check import parameters you have defined. If they are correct, click on button "%s" to launch a simulation of import process (no data will be changed in your database, it's only a simulation for the moment)... +RunSimulateImportFile=Launch the import simulation +FieldNeedSource=This field requires data from the source file +SomeMandatoryFieldHaveNoSource=Some mandatory fields have no source from data file +InformationOnSourceFile=Information on source file +InformationOnTargetTables=Information on target fields +SelectAtLeastOneField=Switch at least one source field in the column of fields to export +SelectFormat=Choose this import file format +RunImportFile=Launch import file +NowClickToRunTheImport=Check result of import simulation. If everything is ok, launch the definitive import. +DataLoadedWithId=All data will be loaded with the following import id: %s +ErrorMissingMandatoryValue=Mandatory data is empty in source file for field %s. +TooMuchErrors=There is still %s other source lines with errors but output has been limited. +TooMuchWarnings=There is still %s other source lines with warnings but output has been limited. +EmptyLine=Empty line (will be discarded) +CorrectErrorBeforeRunningImport=You must first correct all errors before running definitive import. +FileWasImported=File was imported with number %s. +YouCanUseImportIdToFindRecord=You can find all imported records in your database by filtering on field import_key='%s'. +NbOfLinesOK=Number of lines with no errors and no warnings: %s. +NbOfLinesImported=Number of lines successfully imported: %s. +DataComeFromNoWhere=Value to insert comes from nowhere in source file. +DataComeFromFileFieldNb=Value to insert comes from field number %s in source file. +DataComeFromIdFoundFromRef=Value that comes from field number %s of source file will be used to find id of parent object to use (So the objet %s that has the ref. from source file must exists into Dolibarr). +DataComeFromIdFoundFromCodeId=Code that comes from field number %s of source file will be used to find id of parent object to use (So the code from source file must exists into dictionary %s). Note that if you know id, you can also use it into source file instead of code. Import should work in both cases. +DataIsInsertedInto=Data coming from source file will be inserted into the following field: +DataIDSourceIsInsertedInto=The id of parent object found using the data in source file, will be inserted into the following field: +DataCodeIDSourceIsInsertedInto=The id of parent line found from code, will be inserted into following field: +SourceRequired=Data value is mandatory +SourceExample=Example of possible data value +ExampleAnyRefFoundIntoElement=Any ref found for element %s +ExampleAnyCodeOrIdFoundIntoDictionary=Any code (or id) found into dictionary %s +CSVFormatDesc=Comma Separated Value file format (.csv).
    This is a text file format where fields are separated by separator [ %s ]. If separator is found inside a field content, field is rounded by round character [ %s ]. Escape character to escape round character is [ %s ]. +Excel95FormatDesc=Excel file format (.xls)
    This is native Excel 95 format (BIFF5). +Excel2007FormatDesc=Excel file format (.xlsx)
    This is native Excel 2007 format (SpreadsheetML). +TsvFormatDesc=Tab Separated Value file format (.tsv)
    This is a text file format where fields are separated by a tabulator [tab]. +ExportFieldAutomaticallyAdded=Field %s was automatically added. It will avoid you to have similar lines to be treated as duplicate records (with this field added, all lines will own their own id and will differ). +CsvOptions=Csv Options +Separator=Separator +Enclosure=Enclosure +SuppliersProducts=Suppliers Products +BankCode=Bank code +DeskCode=Desk code +BankAccountNumber=Account number +BankAccountNumberKey=Key +SpecialCode=Special code +ExportStringFilter=%% allows replacing one or more characters in the text +ExportDateFilter='YYYY' 'YYYYMM' 'YYYYMMDD': filters by one year/month/day
    'YYYY+YYYY' 'YYYYMM+YYYYMM' 'YYYYMMDD+YYYYMMDD': filters over a range of years/months/days
    '>YYYY' '>YYYYMM' '>YYYYMMDD': filters on the following years/months/days
    '<YYYY' '<YYYYMM' '<YYYYMMDD': filters on the previous years/months/days +ExportNumericFilter='NNNNN' filters by one value
    'NNNNN+NNNNN' filters over a range of values
    '>NNNNN' filters by lower values
    '>NNNNN' filters by higher values ## filters -# SelectFilterFields=If you want to filter on some values, just input values here. -# FilterableFields=Champs Filtrables -# FilteredFields=Filtered fields -# FilteredFieldsValues=Value for filter +SelectFilterFields=If you want to filter on some values, just input values here. +FilterableFields=Champs Filtrables +FilteredFields=Filtered fields +FilteredFieldsValues=Value for filter diff --git a/htdocs/langs/eu_ES/holiday.lang b/htdocs/langs/eu_ES/holiday.lang index 0c755ca3301..da03299e0da 100644 --- a/htdocs/langs/eu_ES/holiday.lang +++ b/htdocs/langs/eu_ES/holiday.lang @@ -8,7 +8,6 @@ NotActiveModCP=You must enable the module holidays to view this page. NotConfigModCP=You must configure the module holidays to view this page. To do this, click here . NoCPforUser=You don't have a demand for holidays. AddCP=Apply for holidays -CPErrorSQL=An SQL error occurred: Employe=Employee DateDebCP=Start date DateFinCP=End date diff --git a/htdocs/langs/eu_ES/languages.lang b/htdocs/langs/eu_ES/languages.lang index 77558748ed3..e94e8e13ac3 100644 --- a/htdocs/langs/eu_ES/languages.lang +++ b/htdocs/langs/eu_ES/languages.lang @@ -19,6 +19,7 @@ Language_en_SA=English (Saudi Arabia) Language_en_US=English (United States) Language_en_ZA=English (South Africa) Language_es_ES=Spanish +Language_es_DO=Spanish (Dominican Republic) Language_es_AR=Spanish (Argentina) Language_es_CL=Spanish (Chile) Language_es_HN=Spanish (Honduras) @@ -38,6 +39,7 @@ Language_fr_NC=French (New Caledonia) Language_he_IL=Hebrew Language_hr_HR=Croatian Language_hu_HU=Hungarian +Language_id_ID=Indonesian Language_is_IS=Icelandic Language_it_IT=Italian Language_ja_JP=Japanese diff --git a/htdocs/langs/eu_ES/mails.lang b/htdocs/langs/eu_ES/mails.lang index 08ee8a280cb..98e6dc335ee 100644 --- a/htdocs/langs/eu_ES/mails.lang +++ b/htdocs/langs/eu_ES/mails.lang @@ -79,6 +79,7 @@ MailtoEMail=Hyper link to email ActivateCheckRead=Allow to use the "Unsubcribe" link ActivateCheckReadKey=Key use to encrypt URL use for "Read Receipt" and "Unsubcribe" feature EMailSentToNRecipients=EMail sent to %s recipients. +XTargetsAdded=%s recipients added into target list EachInvoiceWillBeAttachedToEmail=A document using default invoice document template will be created and attached to each email. MailTopicSendRemindUnpaidInvoices=Reminder of invoice %s (%s) SendRemind=Send reminder by EMails diff --git a/htdocs/langs/eu_ES/main.lang b/htdocs/langs/eu_ES/main.lang index fa5b59e816d..8ef187f862b 100644 --- a/htdocs/langs/eu_ES/main.lang +++ b/htdocs/langs/eu_ES/main.lang @@ -551,6 +551,7 @@ MailSentBy=Email sent by TextUsedInTheMessageBody=Email body SendAcknowledgementByMail=Send Ack. by email NoEMail=No email +NoMobilePhone=No mobile phone Owner=Owner DetectedVersion=Detected version FollowingConstantsWillBeSubstituted=The following constants will be replaced with the corresponding value. diff --git a/htdocs/langs/eu_ES/products.lang b/htdocs/langs/eu_ES/products.lang index e56b9cc59c2..37012349b02 100644 --- a/htdocs/langs/eu_ES/products.lang +++ b/htdocs/langs/eu_ES/products.lang @@ -28,8 +28,10 @@ ProductsAndServicesStatistics=Products and Services statistics ProductsStatistics=Products statistics ProductsOnSell=Available products ProductsNotOnSell=Obsolete products +ProductsOnSellAndOnBuy=Products not for sale nor purchase ServicesOnSell=Available services ServicesNotOnSell=Obsolete services +ServicesOnSellAndOnBuy=Services not for sale nor purchase InternalRef=Internal reference LastRecorded=Last products/services on sell recorded LastRecordedProductsAndServices=Last %s recorded products/services @@ -70,6 +72,8 @@ PublicPrice=Public price CurrentPrice=Current price NewPrice=New price MinPrice=Minim. selling price +MinPriceHT=Minim. selling price (net of tax) +MinPriceTTC=Minim. selling price (inc. tax) CantBeLessThanMinPrice=The selling price can't be lower than minimum allowed for this product (%s without tax). This message can also appears if you type a too important discount. ContractStatus=Contract status ContractStatusClosed=Closed @@ -179,6 +183,7 @@ ProductIsUsed=This product is used NewRefForClone=Ref. of new product/service CustomerPrices=Customers prices SuppliersPrices=Suppliers prices +SuppliersPricesOfProductsOrServices=Suppliers prices (of products or services) CustomCode=Customs code CountryOrigin=Origin country HiddenIntoCombo=Hidden into select lists @@ -208,6 +213,7 @@ CostPmpHT=Net total VWAP ProductUsedForBuild=Auto consumed by production ProductBuilded=Production completed ProductsMultiPrice=Product multi-price +ProductsOrServiceMultiPrice=Customers prices (of products or services, multi-prices) ProductSellByQuarterHT=Products turnover quarterly VWAP ServiceSellByQuarterHT=Services turnover quarterly VWAP Quarter1=1st. Quarter diff --git a/htdocs/langs/eu_ES/shop.lang b/htdocs/langs/eu_ES/shop.lang index b6cd78b5028..156af426bb0 100644 --- a/htdocs/langs/eu_ES/shop.lang +++ b/htdocs/langs/eu_ES/shop.lang @@ -1,10 +1,11 @@ # Dolibarr language file - Source file is en_US - shop -# Shop=Shop -# ShopWeb=Web Shop -# LastOrders=Last orders -# OnStandBy=On standby -# TreatmentInProgress=Treatment in progress -# LastCustomers=Last customers -# OSCommerceShop=OSCommerce shop -# OSCommerce=OSCommerce -# AddProd=Sell online +FailedConnectDBCheckModuleSetup=Failed to connect to oscommerce database. Check your module setup +Shop=Shop +ShopWeb=Web Shop +LastOrders=Last orders +OnStandBy=On standby +TreatmentInProgress=Treatment in progress +LastCustomers=Last customers +OSCommerceShop=OSCommerce shop +OSCommerce=OSCommerce +AddProd=Sell online diff --git a/htdocs/langs/eu_ES/stocks.lang b/htdocs/langs/eu_ES/stocks.lang index 54ff037d912..710f42d1581 100644 --- a/htdocs/langs/eu_ES/stocks.lang +++ b/htdocs/langs/eu_ES/stocks.lang @@ -112,6 +112,7 @@ ReplenishmentOrdersDesc=This is list of all opened supplier orders Replenishments=Replenishments NbOfProductBeforePeriod=Quantity of product %s in stock before selected period (< %s) NbOfProductAfterPeriod=Quantity of product %s in stock after selected period (> %s) +MassMovement=Mass movement MassStockMovement=Mass stock movement SelectProductInAndOutWareHouse=Select a product, a quantity, a source warehouse and a target warehouse, then click "%s". Once this is done for all required movements, click onto "%s". RecordMovement=Record transfert diff --git a/htdocs/langs/fa_IR/admin.lang b/htdocs/langs/fa_IR/admin.lang index 0db7499d997..279578bc6bd 100644 --- a/htdocs/langs/fa_IR/admin.lang +++ b/htdocs/langs/fa_IR/admin.lang @@ -1,888 +1,894 @@ # Dolibarr language file - Source file is en_US - admin -Foundation=Foundation -Version=ورژن -VersionProgram=ورژن برنامه -VersionLastInstall=آخرین ورژن نصب شده -VersionLastUpgrade=آخرین نسخه ارتقا یافته -VersionExperimental=آزمایشی -VersionDevelopment=تولید +Foundation=پايه +Version=نسخه +VersionProgram=برنامه نسخه +VersionLastInstall=نسخه اوليه نصب +VersionLastUpgrade=نسخه آخرين به روز رسانی +VersionExperimental=آزمايشی +VersionDevelopment=توسعه VersionUnknown=ناشناخته -VersionRecommanded=توصیه شده -SessionId=شناسه دوره اتصال -SessionSaveHandler=مسئول ذخیره دوره اتصال -SessionSavePath=مسیر ذخیره دوره اتصال -PurgeSessions=پالایش دوره های اتصال -ConfirmPurgeSessions=Do you really want to purge all sessions ? This will disconnect every user (except yourself). -NoSessionListWithThisHandler=تنظیمات پی اچ پی شما برای ذخیره دوره های اتصال اجازه ایجاد لیست از دوره های اتصال را نمیدهد -LockNewSessions=قفل کردن اتصال های جدید -ConfirmLockNewSessions=Are you sure you want to restrict any new Dolibarr connection to yourself. Only user %s will be able to connect after that. -UnlockNewSessions=Remove connection lock -YourSession=Your session -Sessions=Users session -WebUserGroup=کاربر/گروه وب سرور -NoSessionFound=Your PHP seems to not allow to list active sessions. Directory used to save sessions (%s) might be protected (For example, by OS permissions or by PHP directive open_basedir). -HTMLCharset=سیستم کاراکتری برای صفحات اچ تی ام ال ایجاد شده -DBStoringCharset=سیستم کاراکتری پایگاه داده -DBSortingCharset=سیستم کاراکتری مرتب سازی پایگاه داده -WarningModuleNotActive=ماژول ٪ ها باید فعال باشند -WarningOnlyPermissionOfActivatedModules=فقط الأذونات المتعلقة بتنشيط وحدات تظهر هنا. يمكنك تفعيل وحدات أخرى في الصفحة الرئيسية> الإعداد -> نمائط الصفحة. -DolibarrSetup=نصب یا ارتقای دلیبار -DolibarrUser=کاربر دلیبار +VersionRecommanded=توصيه شده +SessionId=جلسه ID +SessionSaveHandler=هندلر برای صرفه جويی در جلسات +SessionSavePath=محلی سازی را وارد نماييد و ذخيره سازی +PurgeSessions=پاکسازی جلسات +ConfirmPurgeSessions=آيا واقعاً می خواهيد تمام جلسات پاک شود؟ در اين حالت اتصال همه کاربران قطع می شود( بجز خودتان)\n +NoSessionListWithThisHandler=تنظيمات پی اچ پی شما برای ذخيره دوره های اتصال، اجازه ايجاد ليست از دوره های اتصال را نميدهد. +LockNewSessions=قفل کردن اتصالات جديد +ConfirmLockNewSessions=آيا برای محدود کردن هر اتصال جديد Dolibarr به خودتان مطمئن هستيد. تنها کاربر تا قادر به اتصال خواهد بود. +UnlockNewSessions=حذف قفل اتصال +YourSession=نشست شما +Sessions=کاربران را وارد نماييد +WebUserGroup=کاربر وب سرور / گروه +NoSessionFound=به نظر می رسد PHP شما به ليست جلسات فعال اجازه نمی دهد \nبرای صرفه جويی در جلسات از دايرکتوری استفاده می شود و ممکن است محافظت شده باشد (به عنوان مثال، با مجوز OS يا بخشنامهPHP open_basedir باشد). +HTMLCharset=مجموعه کاراکتر توليد شده برای صفحات HTML +DBStoringCharset=پايگاه داده مجموعه کاراکتر برای ذخيره داده ها +DBSortingCharset=پايگاه داده مجموعه کاراکتر مرتب سازی داده ها +WarningModuleNotActive=بخش٪ s باید فعال باشد +WarningOnlyPermissionOfActivatedModules=تنها مجوز مربوط به ماژول های فعال در اينجا نشان داده شده است. شما می توانيد ماژول های ديگر را درقسمت صفحه اصلی-> راه اندازی-> ماژول ها فعال کنید. +DolibarrSetup=نصب يا بروزرسانی Dolibarr +DolibarrUser=کاربرDolibarr InternalUser=کاربر داخلی ExternalUser=کاربر خارجی InternalUsers=کاربران داخلی ExternalUsers=کاربران خارجی -GlobalSetup=تنظیمات سراسری -GUISetup=تنظیمات رابط کاربری -SetupArea=بخش تنظیمات -FormToTestFileUploadForm=فرم تست بارگذاری فایل(آپلود) بر حسب تنظیمات +GlobalSetup=راه اندازی جهانی +GUISetup=نمايش +SetupArea=منطقه راه اندازی +FormToTestFileUploadForm=فرم برای تست آپلود فايل (با توجه به راه اندازی) IfModuleEnabled=ملاحظه: تنها در صورت فعال بودن ماژول ها موثر است -RemoveLock=پاک کردن فایل ها در صورت وجود برای امکان استفاده از ابزار بارگذاری -RestoreLock=مجوز فایل %s را به صورت فقط خواندنی در آورید تااستفاده از ابزار بروزرسانی را غیر فعال کنید -SecuritySetup=تنظیمات امنیتی -ErrorModuleRequirePHPVersion=خطا! این ماژول نیازمند پی اچ پی نسخه %s و ب -ErrorModuleRequireDolibarrVersion=خطا این ماژول نیازمند دلیبار نسخه %s و به بالاست -ErrorDecimalLargerThanAreForbidden=خطا دقت بیش از %s امکان پذیر نیست -DictionarySetup=Dictionary setup -Dictionary=Dictionaries -ErrorReservedTypeSystemSystemAuto=Value 'system' and 'systemauto' for type is reserved. You can use 'user' as value to add your own record -ErrorCodeCantContainZero=Code can't contain value 0 -DisableJavascript=غیر فعال سازی جاوا اسکریپت -ConfirmAjax=پنجره جدا باز شونده تایید استفاده از آژاکس -UseSearchToSelectCompanyTooltip=Also if you have a large number of third parties (> 100 000), you can increase speed by setting constant COMPANY_DONOTSEARCH_ANYWHERE to 1 in Setup->Other. Search will then be limited to start of string. -UseSearchToSelectCompany=Use autocompletion fields to choose third parties instead of using a list box. -ActivityStateToSelectCompany= Add a filter option to show/hide thirdparties which are currently in activity or has ceased it -UseSearchToSelectContactTooltip=Also if you have a large number of third parties (> 100 000), you can increase speed by setting constant CONTACT_DONOTSEARCH_ANYWHERE to 1 in Setup->Other. Search will then be limited to start of string. -UseSearchToSelectContact=Use autocompletion fields to choose contact (instead of using a list box). -SearchFilter=Search filters options -NumberOfKeyToSearch=Nbr of characters to trigger search: %s -ViewFullDateActions=Show full dates events in the third sheet -NotAvailableWhenAjaxDisabled=در حالت غیر فعال بودن آژاکس در دست رس نیست -JavascriptDisabled=غیرفعال کردن جاوا اسکریپت -UsePopupCalendar=استفاده از تقویم در پنجره جداگانه -UsePreviewTabs=Use preview tabs -ShowPreview=پیش نمایش -PreviewNotAvailable=المعاينة غير متاحة -ThemeCurrentlyActive=قالب ظاهری فعال -CurrentTimeZone=منظقه زمانی سرور پی اچ پی +RemoveLock=حذف فايل در صورت مجوز از ابزار بروزرسانی صورت می گيرد. +RestoreLock=به هرکسی که استفاده از ابزار بروزرسانی را غير فعال کند، بازگرداندن فايل با مجوز فقط خواندن تعلق می گيرد. +SecuritySetup=تنظيمات امنيت +ErrorModuleRequirePHPVersion=خطا، اين ماژول نياز به PHP نسخه s ويا بالاتر را دارد +ErrorModuleRequireDolibarrVersion=خطا، اين ماژول نياز به Dolibarr نسخه s و يا بالاتر را دارد +ErrorDecimalLargerThanAreForbidden=خطا، دقت بالاتر ٪ s را پشتيبانی نمی شود. +DictionarySetup=راه اندازی فرهنگ لغت +Dictionary=واژه نامه ها +ErrorReservedTypeSystemSystemAuto=ارزش 'سيستم' و برای نوع محفوظ است. شما می توانيد 'کاربر' به عنوان ارزش برای اضافه کردن رکورد خود استفاده کنيد +ErrorCodeCantContainZero=کد می تواند مقدار 0 را شامل نمی شود +DisableJavascript=غیر فعال کردن توابع جاوا اسکریپت و آژاکس +ConfirmAjax=استفاده از popup ها به تایید آژاکس +UseSearchToSelectCompanyTooltip=همچنین اگر شما تعداد زیادی از اشخاص ثالث (> 100 000)، شما می توانید سرعت با تنظیم COMPANY_DONOTSEARCH_ANYWHERE ثابت به 1 در راه اندازی-> دیگر افزایش دهد. جست و جو خواهد شد و سپس محدود به شروع از رشته است. +UseSearchToSelectCompany=استفاده از رشته های تکمیل خودکار را انتخاب کنید اشخاص ثالث به جای استفاده از یک جعبه لیست. +ActivityStateToSelectCompany= اضافه کردن یک گزینه فیلتر برای نشان دادن / پنهان کن thirdparties که در حال حاضر در فعالیت و یا تا به آن متوقف شد +UseSearchToSelectContactTooltip=همچنین اگر شما تعداد زیادی از اشخاص ثالث (> 100 000)، شما می توانید سرعت با تنظیم CONTACT_DONOTSEARCH_ANYWHERE ثابت به 1 در راه اندازی-> دیگر افزایش دهد. جست و جو خواهد شد و سپس محدود به شروع از رشته است. +UseSearchToSelectContact=استفاده از رشته های تکمیل خودکار را انتخاب کنید تماس با (به جای استفاده از جعبه لیست). +SearchFilter=جستجو فیلتر گزینه +NumberOfKeyToSearch=اسمشو نبر از شخصیت های به ماشه جستجو:٪ s را +ViewFullDateActions=نمایش رویدادهای تاریخ های کامل در برگه سوم +NotAvailableWhenAjaxDisabled=در دسترس نیست زمانی که آژاکس غیر فعال است +JavascriptDisabled=جاوا اسکریپت غیر فعال شده +UsePopupCalendar=استفاده از پنجره برای تاریخ های ورودی +UsePreviewTabs=استفاده از زبانه ها پیش نمایش +ShowPreview=نشان دادن پیش نمایش +PreviewNotAvailable=پیش بازی در دسترس نیست +ThemeCurrentlyActive=تم در حال حاضر فعال +CurrentTimeZone=منطقه زمانی PHP (سرور) Space=فضا Table=جدول -Fields=قسمت ها +Fields=زمینه Index=شاخص Mask=ماسک -NextValue=مقدار بعدی -NextValueForInvoices=مقدار بعدی (برای صورتحساب) -NextValueForCreditNotes=Next value (credit notes) -NextValueForDeposit=Next value (deposit) -NextValueForReplacements=Next value (replacements) -MustBeLowerThanPHPLimit=Note: your PHP limits each file upload's size to %s %s, whatever this parameter's value is -NoMaxSizeByPHPLimit=خطا: هیچ میزانی در تنظیمات پی اچ پی تعیین نشده است -MaxSizeForUploadedFiles=حداکثر حجم برای بارگذاری فایل ها به سرور(0 برای غیر فعال سازی) -UseCaptchaCode=استفاده از کد امنیتی ضد اسپم -UseAvToScanUploadedFiles=استفاده از ویروس کش برای بررسی فایل ها -AntiVirusCommand= المسار الكامل لقيادة مكافحة الفيروسات -AntiVirusCommandExample= c:\\Progra~1\\ClamWin\\bin\\clamscan.exe -AntiVirusParam= مزيد من المعلمات على سطر الأوامر -AntiVirusParamExample= --database="C:\\Program Files (x86)\\ClamWin\\lib" -ComptaSetup=تنظیمات ماژول حسابداری -UserSetup=تنظیمات مدیریت کاربران -MenuSetup=تنظیمات منو ها -MenuLimits=محدودیت ها و دقت -MenuIdParent=شناسه منوی مادر -DetailMenuIdParent=شناسه منوی مادر (خالی برای منوی بالاتر) -DetailPosition=مرتبسازی اعداد برای ترتیب منوها -PersonalizedMenusNotSupported=منو های شخصی شده غیر قابل پشتیبانی -AllMenus=تمام منوها -NotConfigured=ماژول پیکربندی نشده -Setup=نتظیمات +NextValue=ارزش بعدی +NextValueForInvoices=ارزش بعدی (صورت حساب) +NextValueForCreditNotes=ارزش بعدی (یادداشت های اعتباری) +NextValueForDeposit=ارزش بعدی (سپرده) +NextValueForReplacements=ارزش بعدی (جایگزین) +MustBeLowerThanPHPLimit=توجه: PHP خود را محدود به اندازه هر فایل آپلود را به٪ s٪ s را، هر چه مقدار این پارامتر است +NoMaxSizeByPHPLimit=توجه داشته باشید: هیچ محدودیتی در تنظیمات PHP شما تنظیم +MaxSizeForUploadedFiles=حداکثر اندازه فایل ارسالی (0 تا ندهید هر آپلود) +UseCaptchaCode=استفاده از کد های گرافیکی (CAPTCHA) در صفحه ورود +UseAvToScanUploadedFiles=استفاده از ضد ویروس به اسکن فایل های آپلود شده +AntiVirusCommand= مسیر کامل فرمان آنتی ویروس +AntiVirusCommandExample= به عنوان مثال برای کلموین: c: \\ Progra ~ 1 \\ کلموین \\ بن \\ clamscan.exe
    به عنوان مثال برای ClamAV درحال: / usr / بن / clamscan +AntiVirusParam= پارامترهای بیشتر در خط فرمان +AntiVirusParamExample= به عنوان مثال برای کلموین: - پایگاه داده = "C: \\ فایلها برنامه (X86) \\ کلموین \\ معاونت" +ComptaSetup=راه اندازی ماژول حسابداری +UserSetup=راه اندازی مدیریت کاربر +MenuSetup=راه اندازی مدیریت منو +MenuLimits=محدوده و دقت +MenuIdParent=منو پدر و مادر ID +DetailMenuIdParent=ID از منو پدر و مادر (خالی برای منوی بالا) +DetailPosition=تعداد مرتب سازی بر برای تعریف موقعیت منو +PersonalizedMenusNotSupported=منوهای شخصی پشتیبانی نمی شود +AllMenus=همه +NotConfigured=ماژول تنظیم نشده است +Setup=برپایی Activation=فعال سازی Active=فعال -SetupShort=تنظیمات -OtherOptions=دیگر تنظیمات -OtherSetup=دیگر تنظیمات -CurrentValueSeparatorDecimal=ممیز -CurrentValueSeparatorThousand=جدا کننده هزارگان -Destination=Destination -IdModule=Module ID -IdPermissions=Permissions ID +SetupShort=برپایی +OtherOptions=گزینه های دیگر +OtherSetup=دیگر راه اندازی +CurrentValueSeparatorDecimal=جداکننده دهدهی +CurrentValueSeparatorThousand=هزار جدا +Destination=مقصد +IdModule=ماژول ID +IdPermissions=مجوز های ID Modules=ماژول ها ModulesCommon=ماژول های اصلی -ModulesOther=ماژول های دیگر -ModulesInterfaces=رابط کاربری ماژول ها +ModulesOther=سایر ماژول ها +ModulesInterfaces=رابط و مبدل های ماژول ModulesSpecial=ماژول های بسیار خاص -ParameterInDolibarr=پارامتر %s -LanguageParameter=پارامتر های زبان %s -LanguageBrowserParameter=پارامتر %s -LocalisationDolibarrParameters=پارمتر های بومی سازی -ClientTZ=Client Time Zone (user) -ClientHour=Client time (user) -OSTZ=موقعیت زمانی سرور -PHPTZ=موقعیت زمانی پی اچ پی -PHPServerOffsetWithGreenwich=اختلاف زمانی سرور پی اچ پی با گرینویچ(بر حسب ثانیه) -ClientOffsetWithGreenwich=Client/Browser offset width Greenwich (seconds) -DaylingSavingTime=Daylight saving time -CurrentHour=ساعت سرور پی اچ پی -CompanyTZ=موقعیت زمانی شرکت -CompanyHour=ساعت در شرکت -CurrentSessionTimeOut=Current session timeout -YouCanEditPHPTZ=To set a different PHP timezone (not required), you can try to add a file .htacces with a line like this "SetEnv TZ Europe/Paris" -OSEnv=محیط سیستم عامل -Box=حعبه -Boxes=جعبه ها -MaxNbOfLinesForBoxes=حداکثر خطوط برای جعبه ها -PositionByDefault=موقعیت اصلی -Position=ترتيب -MenusDesc=القوائم المديرين تحديد المحتوى من القائمة القضبان 2 (الأفقي والرأسي بار بار). -MenusEditorDesc=مدیرر منوه ها به شما اجازه تعیین شخصی سازی 2 تا از منو ها را میدهد -MenuForUsers=منو ها برای کاربران +ParameterInDolibarr=پارامتر٪ بازدید کنندگان +LanguageParameter=پارامتر زبان از٪ s +LanguageBrowserParameter=پارامتر٪ بازدید کنندگان +LocalisationDolibarrParameters=پارامترهای محلی سازی +ClientTZ=کارفرما منطقه زمان (کاربر) +ClientHour=زمان مشتری (کاربر) +OSTZ=Server OS Time Zone +PHPTZ=PHP سرور منطقه زمان +PHPServerOffsetWithGreenwich=PHP سرور جبران عرض گرینویچ (ثانیه) +ClientOffsetWithGreenwich=مشتری / مرورگر جبران عرض گرینویچ (ثانیه) +DaylingSavingTime=نور روز صرفه جویی در زمان +CurrentHour=PHP زمان (سرور) +CompanyTZ=شرکت منطقه زمان (شرکت اصلی) +CompanyHour=شرکت زمان (شرکت اصلی) +CurrentSessionTimeOut=فاصله را وارد نمایید کنونی +YouCanEditPHPTZ=برای تنظیم منطقه زمانی PHP مختلف (مورد نیاز نمی باشد)، شما می توانید سعی کنید برای اضافه کردن یک فایل. htacces با یک خط مثل این "SetEnv TZ اروپا / پاریس" +OSEnv=OS محیط زیست +Box=جعبه +Boxes=جعبه +MaxNbOfLinesForBoxes=حداکثر تعداد خطوط برای جعبه +PositionByDefault=به طور پیش فرض منظور +Position=سفارش +MenusDesc=مدیران منوها محتوا از 2 میله منو (نوار افقی و نوار عمودی) را تعریف کنیم. +MenusEditorDesc=ویرایشگر منو به شما اجازه تعریف نوشته های شخصی در منوها. استفاده از آن را به دقت برای جلوگیری از ساخت dolibarr نوشته های ناپایدار و منو برای همیشه غیر قابل دسترس.
    برخی از ماژول اضافه کردن ورودی در منو (در منو همه در اغلب موارد). اگر برخی از این نوشته های به اشتباه حذف خواهند، شما می توانید آنها را غیر فعال و reenabling ماژول بازگرداند. +MenuForUsers=منو برای کاربران LangFile=فایل زبان -System=سیسیتم +System=سیستم SystemInfo=اطلاعات سیستم SystemTools=ابزار های سیستم -SystemToolsArea=محیط ابزار های سیستم -SystemToolsAreaDesc=این محیط امکانات مدیریتی را فراهم میکند با استفاده از منو ها ابزار مدیریت مورد نظر را انتخاب کنید -Purge=Purge -PurgeAreaDesc=تسمح لك هذه الصفحة لحذف كل الملفات التي بنيت أو تخزينها بوسائل Dolibarr (الملفات المؤقتة ، أو كافة الملفات في الدليل ٪ ق). استخدام هذه الميزة ليست ضرورية. ومن المقدمة للمستخدمين والتي تستضيفها Dolibarr موفر الخدمات التي لا تقدم أذونات لحذف الملفات التي أقامها خادم الويب. -PurgeDeleteLogFile=حذف الملفات والمستندات المحددة ل٪ Syslog حدة (أي عدم وجود خطر لتفقد بيانات) -PurgeDeleteTemporaryFiles=حذف جميع الملفات المؤقتة (أي عدم وجود خطر لتفقد بيانات) -PurgeDeleteAllFilesInDocumentsDir=حذف كل الملفات في دليل ٪ ق. الملفات المؤقتة ، بل أيضا عناصر الملفات المرفقة (أطراف ثالثة ، والفواتير...) وتحمل في وحدة إدارة المحتوى في المؤسسة وسيتم حذفها. -PurgeRunNow=تطهير الآن -PurgeNothingToDelete=أي دليل أو حذف الملف. -PurgeNDirectoriesDeleted=٪ ق حذف الملفات أو الدلائل. -PurgeAuditEvents=تطهير جميع الأحداث -ConfirmPurgeAuditEvents=هل أنت متأكد من تطهير جميع الأحداث الأمنية؟ جميع سجلات الأمن سيتم حذف أي بيانات أخرى ستزيله. -NewBackup=احتياطية جديدة -GenerateBackup=توليد احتياطية -Backup=پشتیبان گیری +SystemToolsArea=ابزار های سیستم منطقه +SystemToolsAreaDesc=این منطقه فراهم می کند ویژگی های دولت. با استفاده از منوی را انتخاب کنید از ویژگی های شما دنبال آن هستید. +Purge=پالایش +PurgeAreaDesc=این صفحه اجازه می دهد تا شما را به حذف تمام فایل های ساخته شده و یا ذخیره شده توسط Dolibarr (فایل های موقت و یا تمام فایل ها در شاخه٪ s). با استفاده از این ویژگی ضروری نیست. این است که برای کاربران که Dolibarr است که توسط یک ارائه دهنده است که مجوز فایل های ساخته شده توسط وب سرور به حذف ارائه نمی میزبانی. +PurgeDeleteLogFile=فایل حذف ورود به سیستم٪ s را تعریف ماژول های Syslog (بدون ریسک از دست داده) +PurgeDeleteTemporaryFiles=حذف همه فایل های موقت (بدون خطر از دست داده) +PurgeDeleteAllFilesInDocumentsDir=حذف همه فایل ها در دایرکتوری٪ است. فایل های موقتی، بلکه افسردگی پشتیبان پایگاه داده، فایل های پیوست شده به عناصر (اشخاص ثالث، فاکتورها، ...) و ارسال به ماژول ECM حذف خواهد شد. +PurgeRunNow=اکنون پاکسازی +PurgeNothingToDelete=بدون شاخه یا فایل را حذف کنید. +PurgeNDirectoriesDeleted=٪ s فایل یا دایرکتوری حذف شده است. +PurgeAuditEvents=پاکسازی تمام حوادث امنیتی +ConfirmPurgeAuditEvents=آیا مطمئن هستید که می خواهید برای پاکسازی تمامی رویدادهای امنیتی؟ تمام سیاهههای مربوط به امنیت حذف خواهد شد، هیچ اطلاعات دیگر حذف خواهد شد. +NewBackup=پشتیبان گیری جدید +GenerateBackup=ایجاد پشتیبان گیری +Backup=پشتیبان Restore=بازیابی -RunCommandSummary=پشتیبان گیری آغاز شده است با دستور زیر -RunCommandSummaryToLaunch=Backup can be launched with the following command -WebServerMustHavePermissionForCommand=سرور شا باید اجازه های لازم را برای اجرای این دستورات داشته باشد +RunCommandSummary=پشتیبان گیری شده است با دستور زیر راه اندازی +RunCommandSummaryToLaunch=پشتیبان گیری را می توان با دستور زیر راه اندازی +WebServerMustHavePermissionForCommand=وب سرور شما باید اجازه برای اجرای دستورات دارند BackupResult=نتیجه پشتیبان گیری -BackupFileSuccessfullyCreated=فایل های پشتیبان با موفقیت ساخته شده -YouCanDownloadBackupFile=يمكن أن الملفات التي تم إنشاؤها الآن يمكن تحميلها -NoBackupFileAvailable=هیچ فایل پشتیبانی موجود نیست -ExportMethod=طریقه ایجاد خروجی -ImportMethod=طریقه ایجاد ورودی -ToBuildBackupFileClickHere=برای ایجاد پشتیبان
    اینجا کلیک کنید -ImportMySqlDesc=لاستيراد ملف النسخة الاحتياطية ، يجب استخدام mysql القيادة من سطر : -ImportPostgreSqlDesc=To import a backup file, you must use pg_restore command from command line: -ImportMySqlCommand=ق ق ٪ ٪ <mybackupfile.sql -ImportPostgreSqlCommand=%s %s mybackupfile.sql -FileNameToGenerate=اسم الملف لتوليد -Compression=Compression -CommandsToDisableForeignKeysForImport=القيادة تعطيل مفاتيح الخارجية على استيراد -CommandsToDisableForeignKeysForImportWarning=Mandatory if you want to be able to restore your sql dump later -ExportCompatibility=التوافق تولد ملف التصدير -MySqlExportParameters=MySQL تصدير البارامترات -PostgreSqlExportParameters= PostgreSQL export parameters -UseTransactionnalMode=طريقة استخدام المعاملات -FullPathToMysqldumpCommand=المسار الكامل لقيادة mysqldump -FullPathToPostgreSQLdumpCommand=Full path to pg_dump command -ExportOptions=خيارات التصدير -AddDropDatabase=حذف یا ایجاد پایگاه داده -AddDropTable=ایجاد یا حذف جدول در پایگاه داده -ExportStructure=Structure -Datas=داده ها -NameColumn=یک ستون جدید -ExtendedInsert=Extended INSERT -NoLockBeforeInsert=No lock commands around INSERT -DelayedInsert=Delayed insert -EncodeBinariesInHexa=Encode binary data in hexadecimal -IgnoreDuplicateRecords=تجاهل الأخطاء في سجلات مكررة (إدراج تجاهل) -Yes=بلی -No=خیر -AutoDetectLang=شناسایی خودکار زبان -FeatureDisabledInDemo=امکانات در دمو غیر فعال است -Rights=مجوزها -BoxesDesc=Boxes are screen area that show a piece of information on some pages. You can choose between showing the box or not by selecting target page and clicking 'Activate', or by clicking the dustbin to disable it. -OnlyActiveElementsAreShown=Only elements from enabled modules are shown. -ModulesDesc=Dolibarr modules define which functionality is enabled in software. Some modules require permissions you must grant to users, after enabling module. Click on button on/off in column "Status" to enable a module/feature. -ModulesInterfaceDesc=The Dolibarr modules interface allows you to add features depending on external software, systems or services. -ModulesSpecialDesc=وحدات خاصة أو محددة جدا ونادرا ما تستخدم وحدات. -ModulesJobDesc=توفير وحدات تجارية بسيطة ومحددة سلفا من Dolibarr الإعداد لأعمال معين. -ModulesMarketPlaceDesc=يمكنك العثور على مزيد من وحدات للتحميل على مواقع الإنترنت الخارجية على شبكة الانترنت... -ModulesMarketPlaces=مزيد من وحدات... -DoliStoreDesc=DoliStore ، في السوق الرسمي لتخطيط موارد المؤسسات وحدات Dolibarr / خارجي إدارة علاقات العملاء -WebSiteDesc=مزودي موقع ويب يمكنك البحث للعثور على المزيد من وحدات... -URL=رابط -BoxesAvailable=صناديق متاحة -BoxesActivated=تفعيل صناديق -ActivateOn=على تفعيل -ActiveOn=على تفعيلها -SourceFile=ملف المصدر -AutomaticIfJavascriptDisabled=تلقائيا إذا تم تعطيل جافاسكريبت -AvailableOnlyIfJavascriptNotDisabled=متاحا إلا إذا كان جافا سكريبت غير المعوقين -AvailableOnlyIfJavascriptAndAjaxNotDisabled=متاحا إلا إذا كان جافا سكريبت غير المعوقين -Required=مورد نیاز +BackupFileSuccessfullyCreated=فایل پشتیبان با موفقیت تولید +YouCanDownloadBackupFile=فایل های تولید شده هم اکنون می توانید دانلود شود +NoBackupFileAvailable=بدون فایل های پشتیبان در دسترس است. +ExportMethod=روش صادرات +ImportMethod=روش واردات +ToBuildBackupFileClickHere=برای ساخت یک فایل پشتیبان، کلیک کنید اینجا . +ImportMySqlDesc=برای وارد کردن یک فایل پشتیبان، شما باید دستور خروجی زیر را از خط فرمان استفاده کنید: +ImportPostgreSqlDesc=برای وارد کردن یک فایل پشتیبان، شما باید دستور pg_restore از خط فرمان استفاده کنید: +ImportMySqlCommand=٪ s به٪ s را ماژول های فعال نمایش داده می شود. +ModulesDesc=ماژول های Dolibarr تعریف که قابلیت در نرم افزار را فعال کنید. برخی از ماژول نیاز به مجوز شما باید به کاربران عطا کند، پس از فعال کردن ماژول. بر روی دکمه روشن / خاموش در ستون "وضعیت" را کلیک کنید برای فعال کردن یک ماژول / ویژگی. +ModulesInterfaceDesc=رابط ماژول Dolibarr شما اجازه می دهد برای اضافه کردن ویژگی های بسته نرم افزار خارجی، سیستم و یا خدمات. +ModulesSpecialDesc=ماژول های ویژه ماژول های بسیار خاص و یا به ندرت استفاده می شود. +ModulesJobDesc=ماژول های کسب و کار راه اندازی از پیش تعریف ساده از Dolibarr برای یک کسب و کار خاص فراهم می کند. +ModulesMarketPlaceDesc=شما می توانید ماژول های بیشتری برای دانلود در وب سایت های خارجی را در اینترنت پیدا کنید ... +ModulesMarketPlaces=ماژول های بیشتر ... +DoliStoreDesc=DoliStore، محل رسمی بازار برای ماژول های خارجی Dolibarr ERP / CRM +WebSiteDesc=ارائه دهندگان وب سایت شما می توانید جستجو برای پیدا کردن ماژول های بیشتر ... +URL=پیوند +BoxesAvailable=جعبه دسترس +BoxesActivated=جعبه های فعال +ActivateOn=فعال در +ActiveOn=فعال در +SourceFile=فایل منبع +AutomaticIfJavascriptDisabled=به صورت خودکار اگر جاوا اسکریپت غیر فعال است +AvailableOnlyIfJavascriptNotDisabled=فقط در صورت های جاوا اسکریپت غیر فعال است +AvailableOnlyIfJavascriptAndAjaxNotDisabled=فقط در صورت های جاوا اسکریپت غیر فعال است +Required=ضروری Security=امنیت -Passwords=کلمه عبود -DoNotStoreClearPassword=کلمات عبور را بصورت رمزنگاری شده در پایگاه داده ثبت شود(پیشنهاد شده) -MainDbPasswordFileConfEncrypted=كلمة السر في قاعدة بيانات مشفرة conf.php -InstrucToEncodePass=لديك كلمة المرور المشفرة في ملف conf.php ، استبدال خط
    dolibarr_main_db_pass $ ="..."
    من قبل
    "= $ crypted dolibarr_main_db_pass : ٪ ق" -InstrucToClearPass=لديك كلمة السر فك الشفرة (واضح) في conf.php الملف ، استبدال السطر
    dolibarr_main_db_pass $ = ":..." crypted
    من قبل
    dolibarr_main_db_pass $ = "٪ ق" -ProtectAndEncryptPdfFiles=حماية الملفات ولدت الشعبي (لا recommandd ، تقتحم الجماهيري الشعبي وتوليد) -ProtectAndEncryptPdfFilesDesc=حماية وجود وثيقة من وثائق وتبقي الشعبي توفيرها لقراءة وطباعة أي متصفح الشعبي. ومع ذلك ، وتحريرها ونسخها وليس من الممكن بعد الآن. علما أن استخدام هذه الميزة تجعل بناء عالمي لا يعمل المتراكمة الشعبي (مثل الفواتير غير المدفوعة). -Feature=امکانات -DolibarrLicense=مجوز -DolibarrProjectLeader=مدیر پروژه -Developpers=توسعه دهندگان -OtherDeveloppers=دیگر توسعه دهندگان -OfficialWebSite=Dolibarr وبسایت رسمی -OfficialWebSiteFr=وبسایت رسمی -فرانسوی -OfficialWiki=Dolibarr ویکی -OfficialDemo=Dolibarr دمو -OfficialMarketPlace=المسؤول عن وحدات السوق الخارجية / أدونس -OfficialWebHostingService=Official web hosting services (Cloud hosting) -ForDocumentationSeeWiki=For user's or developer's documentation (Doc, FAQs...),
    take a look at the Dolibarr Wiki:
    إلقاء نظرة على ويكي Dolibarr :
    ق ٪ ق ٪ -HelpCenterDesc1=هذا المجال يمكن أن تساعدك في الحصول على مساعدة لتقديم خدمات الدعم على Dolibarr. -HelpCenterDesc2=جزء من هذه الخدمة متوفرة باللغة الانكليزية فقط. -CurrentTopMenuHandler=مناول الحالية الأعلى -CurrentLeftMenuHandler=مناول الحالية القائمة اليمنى -CurrentMenuHandler=Current menu handler -CurrentSmartphoneMenuHandler=Current smartphone menu handler -MeasuringUnit=وحدة قياس -Emails=البريد الإلكتروني -EMailsSetup=إعداد رسائل البريد الإلكتروني -EMailsDesc=تسمح لك هذه الصفحة الخاصة بك فوق PHP معايير لإرسال رسائل البريد الإلكتروني. في معظم الحالات على يونيكس / نظام لينكس ، PHP الخاصة بك الإعداد صحيح وهذه الثوابت هي عديمة الفائدة. -MAIN_MAIL_SMTP_PORT=بروتوكول نقل البريد الإلكتروني / SMTPS ميناء (افتراضيا في php.ini : ٪) -MAIN_MAIL_SMTP_SERVER=بروتوكول نقل البريد الإلكتروني / SMTPS المضيف (افتراضيا في php.ini : ٪) -MAIN_MAIL_SMTP_PORT_NotAvailableOnLinuxLike=بروتوكول نقل البريد الإلكتروني / SMTPS ميناء (غير محددة في مثل PHP على أنظمة يونكس) -MAIN_MAIL_SMTP_SERVER_NotAvailableOnLinuxLike=بروتوكول نقل البريد الإلكتروني / SMTPS المضيف (غير محددة في مثل PHP على أنظمة يونكس) -MAIN_MAIL_EMAIL_FROM=مرسل البريد الإلكتروني للرسائل البريد الإلكتروني تلقائيا (افتراضيا في php.ini : ٪) -MAIN_MAIL_ERRORS_TO=Sender e-mail used for error returns emails sent -MAIN_MAIL_AUTOCOPY_TO= إرسال منهجية خفية الكربون نسخة من جميع رسائل البريد الإلكتروني المرسلة إلى -MAIN_DISABLE_ALL_MAILS=تعطيل جميع رسائل البريد الإلكتروني الإرسال (لأغراض الاختبار أو تجريبية) -MAIN_MAIL_SENDMODE=طريقة استخدام لإرسال رسائل البريد الإلكتروني -MAIN_MAIL_SMTPS_ID=إذا الهوية SMTP التوثيق اللازم -MAIN_MAIL_SMTPS_PW=كلمة السر اذا SMTP التوثيق اللازم -MAIN_MAIL_EMAIL_TLS= استخدام تلس (خدمة تصميم المواقع) تشفير -MAIN_DISABLE_ALL_SMS=Disable all SMS sendings (for test purposes or demos) -MAIN_SMS_SENDMODE=Method to use to send SMS -MAIN_MAIL_SMS_FROM=Default sender phone number for Sms sending -FeatureNotAvailableOnLinux=ميزة لا تتوفر على مثل أنظمة يونكس. sendmail برنامج الاختبار الخاص بك محليا. -SubmitTranslation=إذا كان ترجمة لهذه اللغة ليست كاملة أو تجد الأخطاء ، يمكنك تصحيح هذا عن طريق تحرير الملفات إلى الدليل langs / ق ٪ ، وإرسال ملفات تعديل على www.dolibarr.org المنتدى. -ModuleSetup=تنظیمات ماژول -ModulesSetup=تنظیمات ماژولها +Passwords=کلمه عبور +DoNotStoreClearPassword=آیا بدون رمز عبور روشن ذخیره در پایگاه داده، اما ذخیره تنها مقدار رمز شده (فعال توصیه می شود) +MainDbPasswordFileConfEncrypted=رمز عبور پایگاه داده را در conf.php رمز شده (فعال توصیه می شود) +InstrucToEncodePass=برای داشتن رمز عبور کد گذاری شده به فایل conf.php، جایگزین خط
    $ dolibarr_main_db_pass = "..."
    توسط
    $ dolibarr_main_db_pass = "crypted:٪ s" +InstrucToClearPass=برای داشتن رمز عبور رمز گشایی (روشن) را در فایل conf.php، جایگزین خط
    $ dolibarr_main_db_pass = "crypted: ..."
    توسط
    $ dolibarr_main_db_pass = "٪ s" +ProtectAndEncryptPdfFiles=حفاظت از فایل های پی دی اف ایجاد شده (فعال توصیه نمی شود، می شکند نسل پی دی اف توده) +ProtectAndEncryptPdfFilesDesc=محافظت از یک سند PDF آن را نگه می دارد قابل مطالعه و چاپ با هر مرورگر PDF. با این حال، ویرایش و کپی امکان پذیر نیست. توجه داشته باشید که با استفاده از این ویژگی ساختمان از پی دی اف انباشت شده و متراکم جهانی کار نمی کند (مثل صورت حساب های پرداخت نشده). +Feature=خصیصه +DolibarrLicense=پروانه +DolibarrProjectLeader=رهبر پروژه +Developpers=توسعه دهندگان / همکاران +OtherDeveloppers=دیگر توسعه دهندگان / همکاران +OfficialWebSite=Dolibarr وب سایت رسمی بین المللی +OfficialWebSiteFr=وب سایت رسمی فرانسه +OfficialWiki=Dolibarr مستندات در ویکی +OfficialDemo=Dolibarr نسخه ی نمایشی آنلاین +OfficialMarketPlace=بازار رسمی برای ماژول های خارجی / افزونه +OfficialWebHostingService=Referenced web hosting services (Cloud hosting) +ReferencedPreferredPartners=Preferred Partners +OtherResources=Autres ressources +ForDocumentationSeeWiki=برای کاربر و یا اسناد و مدارک توسعه (دکتر، پرسش و ...)،
    نگاهی به Dolibarr ویکی:
    از٪ s +ForAnswersSeeForum=برای هر گونه سوال / کمک های دیگر، شما می توانید انجمن Dolibarr استفاده کنید:
    از٪ s +HelpCenterDesc1=این منطقه می تواند به شما کمک کند برای دریافت خدمات پشتیبانی راهنما در Dolibarr. +HelpCenterDesc2=بخشی از این سرویس تنها در انگلیسی موجود است. +CurrentTopMenuHandler=منوی بالای کنونی کنترل +CurrentLeftMenuHandler=منوی سمت چپ کنونی کنترل +CurrentMenuHandler=منو کنترل کنونی +CurrentSmartphoneMenuHandler=منو گوشی های هوشمند کنونی کنترل +MeasuringUnit=اندازه گیری واحد +Emails=ایمیل +EMailsSetup=راه اندازی ایمیل +EMailsDesc=این صفحه اجازه می دهد تا شما را به بازنویسی پارامترهای PHP خود را برای ایمیل فرستادن. در اغلب موارد در یونیکس / سیستم عامل لینوکس، نصب PHP شما درست است و این پارامترها غیر قابل استفاده می باشد. +MAIN_MAIL_SMTP_PORT=SMTP / SMTPS بندر (به طور پیش فرض در فایل php.ini اجرا:٪ بازدید کنندگان) +MAIN_MAIL_SMTP_SERVER=SMTP / SMTPS میزبان (به طور پیش فرض در فایل php.ini اجرا:٪ بازدید کنندگان) +MAIN_MAIL_SMTP_PORT_NotAvailableOnLinuxLike=SMTP / SMTPS بندر (به PHP بر روی یونیکس تعریف نشده مانند سیستم) +MAIN_MAIL_SMTP_SERVER_NotAvailableOnLinuxLike=SMTP / SMTPS هاست (به PHP بر روی یونیکس تعریف نشده مانند سیستم) +MAIN_MAIL_EMAIL_FROM=فرستنده ایمیل برای ایمیل های خودکار (به طور پیش فرض در فایل php.ini اجرا:٪ بازدید کنندگان) +MAIN_MAIL_ERRORS_TO=فرستنده ایمیل مورد استفاده برای خطا را برمی گرداند ایمیل های فرستاده شده +MAIN_MAIL_AUTOCOPY_TO= ارسال سیستماتیک مخفی کربن کپی از همه ایمیل های ارسال شده به +MAIN_DISABLE_ALL_MAILS=غیر فعال کردن همه sendings ایمیل (برای تست و یا دموی) +MAIN_MAIL_SENDMODE=روش استفاده برای ارسال ایمیل +MAIN_MAIL_SMTPS_ID=SMTP ID اگر احراز هویت مورد نیاز +MAIN_MAIL_SMTPS_PW=SMTP رمز عبور در صورت احراز هویت مورد نیاز +MAIN_MAIL_EMAIL_TLS= استفاده از TLS (SSL) رمزگذاری +MAIN_DISABLE_ALL_SMS=غیر فعال کردن همه sendings SMS (برای تست و یا دموی) +MAIN_SMS_SENDMODE=روش استفاده برای ارسال SMS +MAIN_MAIL_SMS_FROM=شماره تلفن پیش فرض فرستنده برای ارسال SMS +FeatureNotAvailableOnLinux=این قابلیت وجود ندارد در یونیکس مانند سیستم های. تست برنامه در Sendmail خود را به صورت محلی. +SubmitTranslation=اگر ترجمه را برای این زبان کامل نیست و یا شما خطاهای پیدا کنید، شما می توانید این را با ویرایش فایل ها را به langs دایرکتوری /٪ s را تصحیح و ارسال فایل های اصلاح شده در www.dolibarr.org انجمن. +ModuleSetup=ماژول راه اندازی +ModulesSetup=راه اندازی ماژول ها ModuleFamilyBase=سیستم -ModuleFamilyCrm=سیستم ارتباط با مشتریان -ModuleFamilyProducts=سیسیتم کالاها -ModuleFamilyHr=سیستم استخدامی -ModuleFamilyProjects=سیستم پروژه ها -ModuleFamilyOther=دیگر سیستم ها -ModuleFamilyTechnic=Multi بين وحدات وأدوات -ModuleFamilyExperimental=نماذج تجريبية -ModuleFamilyFinancial=الوحدات المالية (المحاسبة / الخزانة) -ModuleFamilyECM=تولید محتوی الکترونیکی -MenuHandlers=نگهدارنده منوها -MenuAdmin=منو مدیر -DoNotUseInProduction=Do not use in production -ThisIsProcessToFollow=این پروسه ای هست که باید دنبال شود -StepNb=مرحله %s -FindPackageFromWebSite=العثور على الحزمة التي توفر ميزة تريد (على سبيل المثال على موقع الويب ق ٪). -DownloadPackageFromWebSite=التحميل من الموقع حزمة ٪ s. -UnpackPackageInDolibarrRoot=تفريغ الملف إلى مجموعة Dolibarr 'sجذور دليل ٪ ق -SetupIsReadyForUse=الانتهاء من تركيب وDolibarr على استعداد لاستخدام هذا العنصر الجديد. -NotExistsDirect=The alternative root directory is not defined.
    -InfDirAlt=Since version 3 it is possible to define an alternative root directory.This allows you to store, same place, plug-ins and custom templates.
    Just create a directory at the root of Dolibarr (eg: custom).
    -InfDirExample=
    Then declare it in the file conf.php
    $dolibarr_main_url_root_alt='http://myserver/custom'
    $dolibarr_main_document_root_alt='/path/of/dolibarr/htdocs/custom'
    *These lines are commented with "#", to uncomment only remove the character. -YouCanSubmitFile=Select module: -CurrentVersion=Dolibarr النسخة الحالية -CallUpdatePage=الذهاب إلى صفحة التحديثات وdatas هيكل قاعدة البيانات : ٪ s. -LastStableVersion=آخر نسخة مستقرة -GenericMaskCodes=يمكنك إدخال أي قناع الترقيم. في هذا القناع ، وبعد ويمكن استخدام العلامات :
    (000000) يطابق عدد الذي سيكون على كل يزداد ٪ s. كما تدخل العديد من أصفار على النحو المنشود طول المضادة. المضاد وسيتم الانتهاء من اصفار من اليسار من أجل الحصول على أكبر عدد اصفار كما القناع.
    000000 +000) (نفس السابقة ولكن يقابل المقابلة لعدد للحق من علامة + يطبق اعتبارا من أول ٪ s.
    000000 @ (س) نفس السابقة ولكن المضاد هو إعادة الصفر عندما يتم التوصل إلى الشهر خ خ ما بين 1 و 12). إذا كان هذا الخيار هو المستخدمة وس 2 أو أعلى ، ثم تسلسل (ذ ذ م م)) ((سنة أو ملم)) (مطلوب أيضا.
    (ب) اليوم (01 الى 31).
    () ملم في الشهر (01 الى 12).
    (كذا) ، (سنة)) أو السنة أكثر من 2 أو 4 أو 1 الأرقام.
    -GenericMaskCodes2={cccc} the client code on n characters
    {cccc000} the client code on n characters is followed by a counter dedicated for customer. This counter dedicated to customer is reset at same time than global counter.
    {tttt} The code of company type on n characters (see dictionary-company types).
    -GenericMaskCodes3=جميع الشخصيات الاخرى في قناع سوف تظل سليمة.
    المساحات غير مسموح بها.
    -GenericMaskCodes4a=ومثال على 99th ق ٪ من طرف ثالث TheCompany عمله 2007-01-31 :
    -GenericMaskCodes4b=ومثال على طرف ثالث على خلق 2007-03-01 :
    -GenericMaskCodes4c=Example on product created on 2007-03-01:
    -GenericMaskCodes5=ABC{yy}{mm}-{000000} will give ABC0701-000099
    {0000+100@1}-ZZZ/{dd}/XXX will give 0199-ZZZ/31/XXX -GenericNumRefModelDesc=العودة للتخصيص وفقا لعدد محدد القناع. -ServerAvailableOnIPOrPort=الخدمة متاحة في معالجة ٪ ق ق ٪ على الميناء -ServerNotAvailableOnIPOrPort=الخدمة غير متاحة في التصدي ٪ ق ق ٪ على الميناء -DoTestServerAvailability=اختبار خدمة التوصيل -DoTestSend=ارسال الاختبار -DoTestSendHTML=اختبار ارسال هتمل -ErrorCantUseRazIfNoYearInMask=Error, can't use option @ to reset counter each year if sequence {yy} or {yyyy} is not in mask. -ErrorCantUseRazInStartedYearIfNoYearMonthInMask=خطأ ، لا يمكن للمستخدم الخيار في حال تسلسل @ (ذ ذ م م)) ((سنة أو ملم)) (لا تخفي. -UMask=معلمة جديدة UMask صورة يونيكس / لينكس / بي إس دي نظام الملفات. -UMaskExplanation=تسمح لك هذه المعلمة لتحديد الاذونات التي حددها تقصير من الملفات التي أنشأتها Dolibarr على الخادم (خلال تحميلها على سبيل المثال).
    يجب أن يكون ثمانية القيمة (على سبيل المثال ، 0666 وسائل القراءة والكتابة للجميع).
    م شمال شرق paramètre سرت sous الامم المتحدة لتقييم الأداء ويندوز serveur. -SeeWikiForAllTeam=إلقاء نظرة على صفحة ويكي قائمة كاملة لجميع الجهات الفاعلة والمنظمة -UseACacheDelay= التخزين المؤقت للتأخير في الرد على الصادرات ثانية (0 فارغة أو لا مخبأ) -DisableLinkToHelpCenter=الاختباء وصلة "هل تحتاج إلى مساعدة أو دعم" على صفحة تسجيل الدخول -DisableLinkToHelp=إخفاء ارتباط "ق ٪ أخبار يساعد" على القائمة اليمنى -AddCRIfTooLong=ليس هناك التفاف تلقائي ، حتى إذا خرج من خط صفحة على وثائق لفترة طويلة جدا ، يجب إضافة حرف إرجاع نفسك في ناحية النص. -ModuleDisabled=نميطة المعوقين -ModuleDisabledSoNoEvent=نميطة المعوقين بغية خلق حالة أبدا -ConfirmPurge=هل أنت متأكد من ذلك لتنفيذ تطهير؟
    وهذا من شأنه بالتأكيد حذف جميع بيانات ملفك بأي حال من الأحوال لترميمها (صورة إدارة المحتوى في المؤسسة ، والملفات المرفقة...). -MinLength=الحد الأدني لمدة -LanguageFilesCachedIntoShmopSharedMemory=لانغ لتحميل الملفات. في الذاكرة المشتركة -ExamplesWithCurrentSetup=أمثلة مع تشغيل الإعداد الحالي -ListOfDirectories=قائمة الدلائل المفتوحة قوالب -ListOfDirectoriesForModelGenODT=قائمة الدلائل التي تحتوي على ملفات ذات شكل قوالب المفتوحة.

    هنا وضع المسار الكامل من الدلائل.
    إضافة حرف إرجاع بين الدليل ايه.
    لإضافة دليل وحدة [جد] ، أضيف هنا DOL_DATA_ROOT / إدارة المحتوى في المؤسسة / yourdirectoryname.

    في هذه الدلائل يجب أن تنتهي مع ملفات. odt. -NumberOfModelFilesFound=Number of ODT/ODS templates files found in those directories -ExampleOfDirectoriesForModelGen=أمثلة على بناء الجملة :
    ج : mydir \\
    / الوطن / mydir
    DOL_DATA_ROOT / إدارة المحتوى في المؤسسة / ecmdir -FollowingSubstitutionKeysCanBeUsed=
    To know how to create your odt document templates, before storing them in those directories, read wiki documentation: +ModuleFamilyCrm=مدیریت ارتباط با مشتری (CRM) +ModuleFamilyProducts=مدیریت محصولات +ModuleFamilyHr=مدیریت منابع انسانی +ModuleFamilyProjects=پروژه ها / کار مشارکتی +ModuleFamilyOther=دیگر +ModuleFamilyTechnic=چند ماژول ابزار +ModuleFamilyExperimental=ماژول های تجربی +ModuleFamilyFinancial=ماژول های مالی (حسابداری / خزانه داری) +ModuleFamilyECM=مدیریت محتوا الکترونیکی (ECM) +MenuHandlers=گرداننده منو +MenuAdmin=ویرایشگر منو +DoNotUseInProduction=آیا در استفاده از تولید نیست +ThisIsProcessToFollow=این راه اندازی به فرآیند است: +StepNb=مرحله٪ s را +FindPackageFromWebSite=پیدا کردن یک بسته است که ویژگی فراهم می کند شما می خواهید (به عنوان مثال در وب سایت رسمی٪ بازدید کنندگان). +DownloadPackageFromWebSite=دانلود بسته. +UnpackPackageInDolibarrRoot=باز کردن فایل بسته به پوشه ریشه Dolibarr هست٪ s +SetupIsReadyForUse=نصب به پایان رسید و Dolibarr آماده استفاده است با این بخش جدید است. +NotExistsDirect=ریشه جایگزین تعریف نشده است.
    +InfDirAlt=از آنجا که نسخه 3 این امکان وجود دارد که تعریف کند directory.This ریشه جایگزین شما اجازه می دهد برای ذخیره، همان محل، پلاگین ها و قالب های سفارشی.
    (: سفارشی به عنوان مثال) فقط یک پوشه در ریشه Dolibarr ایجاد کنید.
    +InfDirExample=
    سپس آن را در conf.php فایل اعلام
    $ dolibarr_main_url_root_alt = 'http://myserver/custom'
    $ dolibarr_main_document_root_alt = '/ راه / از / dolibarr / htdocs / سفارشی'
    * این خطوط با "#" نظر، به کامنت فقط حذف شخصیت. +YouCanSubmitFile=ماژول را انتخاب کنید: +CurrentVersion=نسخه فعلی Dolibarr +CallUpdatePage=برو به صفحه ای که به روز رسانی ساختار بانک اطلاعاتی و دادهها:٪ است. +LastStableVersion=آخرین نسخه پایدار +GenericMaskCodes=شما می توانید ماسک شماره را وارد کنید. در این ماسک، تگ های زیر می تواند مورد استفاده قرار گیرد:
    {000000} مربوط به تعداد خواهد شد که در هر یک از٪ s را افزایش مییابد. به عنوان بسیاری از صفر را وارد کنید به عنوان طول مورد نظر از ضد. شمارنده خواهد شد صفر از سمت چپ به منظور به صفر کرده اند و بسیاری از ماسک به پایان رسید.
    {000.000 +000} همان قبلی است اما جبران مربوطه را به شماره در سمت راست علامت + شروع به کار رفته در اولین٪ است.
    {000000 @ X} همان قبلی است اما شمارنده به صفر زمانی که ماه X برسد (x بین 1 و 12، و یا 0 به استفاده از ماه های اولیه سال مالی تعیین شده در تنظیمات خود را، و یا 99 به صفر هر ماه ). اگر این گزینه استفاده می شود و x است 2 یا بالاتر، و سپس دنباله {YY} {میلی متر} یا {تاریخ برای ورود yyyy} {میلی متر} نیز مورد نیاز است.
    {تولد} روز (01 تا 31).
    {میلی متر} ماه (01 تا 12).
    {YY}، {تاریخ برای ورود yyyy} یا {Y} سال بیش از 2، 4 و یا 1 عدد.
    +GenericMaskCodes2={CCCC} کد مشتری در N کاراکتر
    {cccc000} کد مشتری در N کاراکتر با یک ضد اختصاص داده شده برای مشتری به دنبال. این مبارزه اختصاص داده شده به مشتریان است و در همان زمان از مبارزه جهانی را بازنشانی کنید.
    {TTTT} کد از نوع شرکت در N حرف (نگاه کنید به انواع فرهنگ لغت، شرکت).
    +GenericMaskCodes3=تمام شخصیت های دیگر در ماسک دست نخورده باقی خواهد ماند.
    فضاهای امکان پذیر نیست.
    +GenericMaskCodes4a=به عنوان مثال در 99٪ از TheCompany شخص ثالث انجام می شود 2007/1/31:
    +GenericMaskCodes4b=به عنوان مثال در شخص ثالث ایجاد شده در 2007/03/01:
    +GenericMaskCodes4c=به عنوان مثال در محصول ایجاد شده در 2007/03/01:
    +GenericMaskCodes5=ABC {YY} {میلی متر} - {000000} خواهد ABC0701-000099 را
    {0000 +100 @ 1}-ZZZ / {تولد} / XXX خواهد 0199-ZZZ/31/XXX را +GenericNumRefModelDesc=تعداد قابل تنظیم می گرداند با توجه به ماسک تعریف شده است. +ServerAvailableOnIPOrPort=سرور در آدرس٪ s روی پورت٪ در دسترس است +ServerNotAvailableOnIPOrPort=سرور در دسترس نیست در آدرس٪ s روی پورت٪ بازدید کنندگان +DoTestServerAvailability=اتصال به سرور تست +DoTestSend=تست ارسال +DoTestSendHTML=تست ارسال HTML +ErrorCantUseRazIfNoYearInMask=خطا، می تواند گزینه ای @ استفاده نمی کند در هر سال برای تنظیم مجدد شمارنده اگر دنباله {YY} یا {تاریخ برای ورود yyyy} است در ماسک نیست. +ErrorCantUseRazInStartedYearIfNoYearMonthInMask=خطا، می تواند گزینه ای @ استفاده کنید اگر دنباله {YY} {میلی متر} یا {تاریخ برای ورود yyyy} {میلی متر} در ماسک نیست. +UMask=پارامتر UMask برای فایل های جدید در فایل یونیکس / لینوکس / BSD / مک سیستم. +UMaskExplanation=این پارامتر به شما اجازه تعریف اجازه انتخاب به طور پیش فرض بر روی فایل های ایجاد شده توسط Dolibarr بر روی سرور (در آپلود به عنوان مثال).
    باید آن را به ارزش هشت هشتی (به عنوان مثال، 0666 به معنای خواندن و نوشتن برای همه) باشد.
    این پارامتر در سرور ویندوز بی فایده است. +SeeWikiForAllTeam=نگاهی به صفحه ویکی برای لیست کامل از تمام بازیگران و سازمان خود را +UseACacheDelay= تاخیر برای ذخیره پاسخ صادرات در ثانیه (0 یا خالی بدون هیچ کش) +DisableLinkToHelpCenter=مخفی کردن لینک "آیا نیازمند کمک و یا حمایت" در صفحه ورود +DisableLinkToHelp=پنهان کردن لینک از "٪ s کمک آنلاین" در منوی سمت چپ +AddCRIfTooLong=هیچ بسته بندی اتوماتیک وجود دارد، بنابراین اگر خط از صفحه در اسناد به دلیل بیش از حد طولانی، شما باید خودتان بازده حمل در ناحیه ی متن اضافه کنید. +ModuleDisabled=ماژول غیر فعال است +ModuleDisabledSoNoEvent=بنابراین رویداد ماژول غیر فعال است هرگز وجود نداشته است +ConfirmPurge=آیا مطمئن هستید که می خواهید برای اجرای این پاکسازی؟
    این قطعا با هیچ راهی به آنها (فایل های ECM، فایل های پیوست ...) بازگرداندن حذف تمام فایل های داده های شما خواهد شد. +MinLength=حداقل طول +LanguageFilesCachedIntoShmopSharedMemory=فایل های. زبان بارگذاری شده در حافظه به اشتراک گذاشته شده +ExamplesWithCurrentSetup=به عنوان مثال با راه اندازی فعلی در حال اجرا +ListOfDirectories=فهرست دایرکتوری قالب مستندات باز +ListOfDirectoriesForModelGenODT=فهرست از پوشه هایی که حاوی قالب فایل های با فرمت سند باز.

    قرار دادن در اینجا مسیر کامل دایرکتوری ها.
    اضافه کردن بازگشت نورد بین دایرکتوری EAH.
    برای اضافه کردن یک دایرکتوری از ماژول GED، اضافه کردن اینجا DOL_DATA_ROOT / ECM / yourdirectoryname.

    فایل در این دایرکتوری باید با. ODT پایان. +NumberOfModelFilesFound=تعداد ODT / ODS فایل های قالب که در آن دایرکتوری +ExampleOfDirectoriesForModelGen=نمونه هایی از سینتکس:
    c: \\ mydir
    / صفحه اصلی / mydir
    DOL_DATA_ROOT / ECM / ecmdir +FollowingSubstitutionKeysCanBeUsed=
    بدانید که چگونه برای ایجاد خود را از قالب سند ODT، قبل از ذخیره سازی آنها را در آن دایرکتوری ها، به عنوان خوانده شده اسناد ویکی: FullListOnOnlineDocumentation=http://wiki.dolibarr.org/index.php/Create_an_ODT_document_template -FirstnameNamePosition=موقف الإسم / اسم -DescWeather=The following pictures will be shown on dashboard when number of late actions reach the following values: -KeyForWebServicesAccess=Key to use Web Services (parameter "dolibarrkey" in webservices) -TestSubmitForm=Input test form -ThisForceAlsoTheme=Using this menu manager will also use its own theme whatever is user choice. Also this menu manager specialized for smartphones does not works on all smartphone. Use another menu manager if you experience problems on yours. -ThemeDir=Skins directory -ConnectionTimeout=Connexion timeout -ResponseTimeout=Response timeout -SmsTestMessage=Test message from __PHONEFROM__ to __PHONETO__ -ModuleMustBeEnabledFirst=Module %s must be enabled first before using this feature. -SecurityToken=Key to secure URLs -NoSmsEngine=No SMS sender manager available. SMS sender manager are not installed with default distribution (because they depends on an external supplier) but you can find some on %s +FirstnameNamePosition=موقعیت نام / نام خانوادگی +DescWeather=تصاویر زیر را در مجموعه اطلاعات نشان داده شده است زمانی که تعدادی از اقدامات دیر رسیدن به مقادیر زیر: +KeyForWebServicesAccess=کلیدی برای استفاده از خدمات وب (پارامتر "dolibarrkey" در webservices) +TestSubmitForm=فرم آزمون ورودی +ThisForceAlsoTheme=با استفاده از این مدیر منو نیز تم خاص خود را از هر چه به انتخاب کاربر می باشد. همچنین این مدیریت منو های تخصصی برای گوشی های هوشمند می کند بر روی تمام گوشی های هوشمند کار می کند نیست. استفاده از مدیریت منو یکی دیگر از صورت بروز مشکل در شما باشد. +ThemeDir=دایرکتوری پوسته +ConnectionTimeout=فاصله وابستگی +ResponseTimeout=تایم پاسخ +SmsTestMessage=پیام تست از __ PHONEFROM__ به __ PHONETO__ +ModuleMustBeEnabledFirst=بخش٪ s باید قبل از استفاده از این ویژگی فعال باشد. +SecurityToken=کلیدی برای ایمن سازی آدرس ها +NoSmsEngine=بدون SMS مدیر فرستنده در دسترس است. مدیر فرستنده SMS با توزیع به طور پیش فرض نصب نشده است (به این دلیل که یک تامین کننده خارجی بستگی دارد) اما شما می توانید برخی از٪ s را پیدا PDF=PDF -PDFDesc=You can set each global options related to the PDF generation -PDFAddressForging=Rules to forge address boxes -HideAnyVATInformationOnPDF=Hide all information related to VAT on generated PDF -HideDescOnPDF=Hide products description on generated PDF -HideRefOnPDF=Hide products ref. on generated PDF -HideDetailsOnPDF=Hide products lines details on generated PDF -Library=المكتبة -UrlGenerationParameters=Parameters to secure URLs -SecurityTokenIsUnique=Use a unique securekey parameter for each URL -EnterRefToBuildUrl=Enter reference for object %s -GetSecuredUrl=Get calculated URL -ButtonHideUnauthorized=Hide buttons for unauthorized actions instead of showing disabled buttons -OldVATRates=Old VAT rate -NewVATRates=New VAT rate -PriceBaseTypeToChange=Modify on prices with base reference value defined on -MassConvert=Launch mass convert -String=سلسلة -TextLong=Long text -Int=Integer -Float=Float -DateAndTime=Date and hour -Unique=Unique -Boolean=Boolean (Checkbox) -ExtrafieldPhone = الهاتف -ExtrafieldPrice = الأسعار -ExtrafieldMail = Email -ExtrafieldSelect = Select list -ExtrafieldSelectList = Select from table -ExtrafieldSeparator=Separator -ExtrafieldCheckBox=Checkbox -ExtrafieldRadio=Radio button -ExtrafieldParamHelpselect=Parameters list have to be like key,value

    for exemple :
    1,value1
    2,value2
    3,value3
    ...

    In order to have the list depending on another :
    1,value1|parent_list_code:parent_key
    2,value2|parent_list_code:parent_key -ExtrafieldParamHelpcheckbox=Parameters list have to be like key,value

    for exemple :
    1,value1
    2,value2
    3,value3
    ... -ExtrafieldParamHelpradio=Parameters list have to be like key,value

    for exemple :
    1,value1
    2,value2
    3,value3
    ... -ExtrafieldParamHelpsellist=Parameters list comes from a table
    Syntax : table_name:label_field:id_field::filter
    Example : c_typent:libelle:id::filter

    filter can be a simple test (eg active=1) to display only active value
    if you want to filter on extrafields use syntaxt extra.fieldcode=... (where field code is the code of extrafield)

    In order to have the list depending on another :
    c_typent:libelle:id:parent_list_code|parent_column:filter -LibraryToBuildPDF=Library used to build PDF -WarningUsingFPDF=Warning: Your conf.php contains directive dolibarr_pdf_force_fpdf=1. This means you use the FPDF library to generate PDF files. This library is old and does not support a lot of features (Unicode, image transparency, cyrillic, arab and asiatic languages, ...), so you may experience errors during PDF generation.
    To solve this and have a full support of PDF generation, please download TCPDF library, then comment or remove the line $dolibarr_pdf_force_fpdf=1, and add instead $dolibarr_lib_TCPDF_PATH='path_to_TCPDF_dir' -LocalTaxDesc=Some countries apply 2 or 3 taxes on each invoice line. If this is the case, choose type for second and third tax and its rate. Possible type are:
    1 : local tax apply on products and services without vat (vat is not applied on local tax)
    2 : local tax apply on products and services before vat (vat is calculated on amount + localtax)
    3 : local tax apply on products without vat (vat is not applied on local tax)
    4 : local tax apply on products before vat (vat is calculated on amount + localtax)
    5 : local tax apply on services without vat (vat is not applied on local tax)
    6 : local tax apply on services before vat (vat is calculated on amount + localtax) +PDFDesc=شما می توانید هر یک از گزینه های جهانی مربوط به نسل PDF مجموعه +PDFAddressForging=قوانین برای ایجاد جعبه آدرس +HideAnyVATInformationOnPDF=مخفی کردن همه اطلاعات مربوط به مالیات بر ارزش افزوده در تولید PDF +HideDescOnPDF=پنهان کردن محصولات توضیحات در تولید PDF +HideRefOnPDF=پنهان کردن محصولات کد عکس. در تولید PDF +HideDetailsOnPDF=جزئیات پنهان کردن محصولات خطوط در تولید PDF +Library=کتابخانه +UrlGenerationParameters=پارامترهای به امن آدرس +SecurityTokenIsUnique=استفاده از یک پارامتر securekey منحصر به فرد برای هر URL +EnterRefToBuildUrl=مرجع را برای شی از٪ s +GetSecuredUrl=دریافت URL محاسبه +ButtonHideUnauthorized=مخفی کردن دکمه های برای اقدامات غیر مجاز به جای نشان دادن دکمه های غیر فعال +OldVATRates=قدیمی نرخ مالیات بر ارزش افزوده +NewVATRates=نرخ مالیات بر ارزش افزوده جدید +PriceBaseTypeToChange=تغییر در قیمت با ارزش پایه مرجع تعریف شده در +MassConvert=راه اندازی توده تبدیل +String=رشته +TextLong=متن طولانی +Int=عدد صحیح +Float=شناور +DateAndTime=تاریخ و ساعت +Unique=منحصر به فرد +Boolean=بولی (جعبه) +ExtrafieldPhone = تلفن +ExtrafieldPrice = قیمت +ExtrafieldMail = پست الکترونیک +ExtrafieldSelect = لیست انتخاب کنید +ExtrafieldSelectList = انتخاب از جدول +ExtrafieldSeparator=تفکیک کننده +ExtrafieldCheckBox=جعبه +ExtrafieldRadio=دکمه های رادیویی +ExtrafieldParamHelpselect=Parameters list have to be like key,value

    for example :
    1,value1
    2,value2
    3,value3
    ...

    In order to have the list depending on another :
    1,value1|parent_list_code:parent_key
    2,value2|parent_list_code:parent_key +ExtrafieldParamHelpcheckbox=Parameters list have to be like key,value

    for example :
    1,value1
    2,value2
    3,value3
    ... +ExtrafieldParamHelpradio=Parameters list have to be like key,value

    for example :
    1,value1
    2,value2
    3,value3
    ... +ExtrafieldParamHelpsellist=لیست پارامترها می آید از یک جدول
    نحو: table_name از: label_field: id_field :: فیلتر
    به عنوان مثال: c_typent: libelle: شناسه :: فیلتر

    فیلتر می تواند یک آزمون ساده است (به عنوان مثال فعال = 1) برای نمایش تنها ارزش فعال
    اگر شما می خواهید برای فیلتر کردن در extrafields استفاده syntaxt extra.fieldcode = ... (که در آن کد رشته کد extrafield است)

    به منظور داشتن لیست بسته به نوع دیگر:
    c_typent: libelle: شناسه: parent_list_code | parent_column: فیلتر +LibraryToBuildPDF=کتابخانه مورد استفاده برای ساخت PDF +WarningUsingFPDF=اخطار: conf.php شما شامل dolibarr_pdf_force_fpdf بخشنامه = 1. این به این معنی شما استفاده از کتابخانه FPDF برای تولید فایل های PDF. این کتابخانه قدیمی است و بسیاری از ویژگی های (یونیکد، شفافیت تصویر، زبان سیریلیک، عربی و آسیایی، ...) را پشتیبانی نمی کند، بنابراین شما ممکن است خطا در PDF نسل را تجربه کنند.
    برای حل این و دارای پشتیبانی کامل از PDF نسل، لطفا دانلود کنید کتابخانه TCPDF ، پس از آن اظهار نظر و یا حذف خط $ dolibarr_pdf_force_fpdf = 1، و اضافه کردن به جای $ dolibarr_lib_TCPDF_PATH = 'path_to_TCPDF_dir' +LocalTaxDesc=برخی از کشورها 2 یا 3 مالیات در هر خط فاکتور اعمال می شود. اگر این مورد است، نوع مالیات دوم و سوم و نرخ آن را انتخاب کنید. نوع ممکن است:
    1: مالیات های محلی اعمال می شود بر روی محصولات و خدمات بدون مالیات بر ارزش افزوده (مالیات بر ارزش افزوده بر مالیات های محلی به کار گرفته نمی شود)
    2: مالیات های محلی اعمال می شود بر روی محصولات و خدمات قبل از مالیات بر ارزش افزوده (مالیات بر ارزش افزوده بر مقدار + localtax محاسبه)
    3: مالیات های محلی اعمال می شود بر روی محصولات بدون مالیات بر ارزش افزوده (مالیات بر ارزش افزوده بر مالیات های محلی به کار گرفته نمی شود)
    4: مالیات های محلی اعمال می شود بر روی محصولات قبل از مالیات بر ارزش افزوده (مالیات بر ارزش افزوده بر مقدار + localtax محاسبه)
    5: مالیات های محلی اعمال می شود در خدمات بدون مالیات بر ارزش افزوده (مالیات بر ارزش افزوده بر مالیات های محلی به کار گرفته نمی شود)
    6: مالیات های محلی اعمال می شود در مورد خدمات قبل از مالیات بر ارزش افزوده (مالیات بر ارزش افزوده بر مقدار + localtax محاسبه) SMS=SMS -LinkToTestClickToDial=Enter a phone number to call to show a link to test the ClickToDial url for user %s -RefreshPhoneLink=Refresh link -LinkToTest=Clickable link generated for user %s (click phone number to test) -KeepEmptyToUseDefault=Keep empty to use default value -DefaultLink=Default link -ValueOverwrittenByUserSetup=Warning, this value may be overwritten by user specific setup (each user can set his own clicktodial url) -ExternalModule=External module - Installed into directory %s -BarcodeInitForThirdparties=Mass barcode init for thirdparties -BarcodeInitForProductsOrServices=Mass barcode init or reset for products or services -CurrentlyNWithoutBarCode=Currently, you have %s records on %s %s without barcode defined. -InitEmptyBarCode=Init value for next %s empty records -EraseAllCurrentBarCode=Erase all current barcode values -ConfirmEraseAllCurrentBarCode=Are you sure you want to erase all current barcode values ? -AllBarcodeReset=All barcode values have been removed -NoBarcodeNumberingTemplateDefined=No numbering barcode template enabled into barcode module setup. -NoRecordWithoutBarcodeDefined=No record with no barcode value defined. +LinkToTestClickToDial=شماره تلفن را وارد کنید تماس بگیرید برای نشان دادن یک لینک برای تست آدرس ClickToDial برای کاربر٪ s را +RefreshPhoneLink=تازه کردن لینک +LinkToTest=لینک قابل کلیک تولید شده برای کاربر٪ s را (کلیک کنید شماره تلفن برای تست) +KeepEmptyToUseDefault=خالی نگه دارید به استفاده از مقدار پیش فرض +DefaultLink=لینک پیش فرض +ValueOverwrittenByUserSetup=اخطار، این مقدار ممکن است با راه اندازی خاص کاربر رونویسی (هر کاربر می تواند آدرس clicktodial خود تنظیم) +ExternalModule=ماژول های خارجی - نصب به شاخه٪ s +BarcodeInitForThirdparties=init انجام بارکد جمعی برای thirdparties +BarcodeInitForProductsOrServices=init انجام بارکد جرم یا تنظیم مجدد برای محصولات یا خدمات +CurrentlyNWithoutBarCode=در حال حاضر، شما٪ پرونده باید در٪ s در٪ s را بدون بارکد تعریف شده است. +InitEmptyBarCode=ارزش init انجام برای٪ بعدی پرونده خالی +EraseAllCurrentBarCode=پاک کردن همه ارزش بارکد فعلی +ConfirmEraseAllCurrentBarCode=آیا مطمئن هستید که می خواهید برای پاک کردن تمام ارزش های بارکد در حال حاضر؟ +AllBarcodeReset=همه مقادیر بارکد حذف شده اند +NoBarcodeNumberingTemplateDefined=بدون قالب بارکد شماره فعال به راه اندازی ماژول بارکد. +NoRecordWithoutBarcodeDefined=هیچ سابقه ای با ارزش بارکد تعریف شده است. # Modules -Module0Name=& مجموعات المستخدمين -Module0Desc=إدارة المستخدمين والمجموعات -Module1Name=أطراف ثالثة -Module1Desc=شركات الاتصالات وإدارة -Module2Name=التجارية -Module2Desc=الإدارة التجارية -Module10Name=المحاسبة -Module10Desc=إدارة المحاسبة البسيطة (ارسال الفواتير والمدفوعات) -Module20Name=مقترحات -Module20Desc=مقترحات تجارية إدارة -Module22Name=كتلة بالبريد الإلكتروني -Module22Desc=البريد الإلكتروني الدمار إدارة -Module23Name= طاقة -Module23Desc= مراقبة استهلاك الطاقة -Module25Name=طلبات الزبائن -Module25Desc=طلبات الزبائن إدارة -Module30Name=فواتير -Module30Desc=ويلاحظ اعتماد الفواتير وإدارة العملاء. فواتير إدارة الموردين -Module40Name=الموردين -Module40Desc=الموردين وإدارة وشراء (الأوامر والفواتير) -Module42Name=Syslog -Module42Desc=قطع الأشجار مرافق (syslog) -Module49Name=المحررين -Module49Desc=المحررين إدارة -Module50Name=المنتجات -Module50Desc=منتجات إدارة -Module51Name=الرسائل الجماعية -Module51Desc=الدمار ورقة الرسائل الإدارية -Module52Name=الاسهم -Module52Desc=مخزون إدارة المنتجات -Module53Name=الخدمات -Module53Desc=الخدمات الإدارية -Module54Name=عقود -Module54Desc=العقود والخدمات الإدارية -Module55Name=Barcodes -Module55Desc=Barcodes إدارة -Module56Name=الخدمات الهاتفية -Module56Desc=تكامل الخدمات الهاتفية -Module57Name=أوامر دائمة -Module57Desc=أوامر دائمة وسحب إدارة +Module0Name=کاربران و گروه های +Module0Desc=کاربران و گروه های مدیریت +Module1Name=احزاب سوم +Module1Desc=شرکت ها و مدیریت تماس (مشتریان، چشم انداز ...) +Module2Name=تجاری +Module2Desc=مدیریت بازرگانی +Module10Name=حسابداری +Module10Desc=گزارش حسابداری ساده (مجلات، گردش مالی) بر روی محتوای پایگاه داده باشد. بدون اعزام. +Module20Name=پیشنهادات +Module20Desc=مدیریت طرح های تجاری +Module22Name=توده E-نامههای پستی +Module22Desc=توده E-پستی مدیریت +Module23Name= انرژی +Module23Desc= نظارت بر مصرف انرژی +Module25Name=سفارشات مشتری +Module25Desc=مدیریت سفارش مشتری +Module30Name=صورت حساب +Module30Desc=فاکتور و مدیریت توجه داشته باشید اعتباری برای مشتریان. مدیریت فاکتور برای تامین کنندگان +Module40Name=تولید کنندگان +Module40Desc=مدیریت تامین و خرید (سفارشات و فاکتورها) +Module42Name=گزارش ها +Module42Desc=امکانات ورود به سیستم (فایل، syslog را، ...) +Module49Name=ویراستاران +Module49Desc=مدیریت ویرایشگر +Module50Name=محصولات +Module50Desc=مدیریت محصولات +Module51Name=نامههای پستی جرم +Module51Desc=توده مدیریت پستی مقاله +Module52Name=سهام +Module52Desc=مدیریت انبار (محصول) +Module53Name=خدمات +Module53Desc=مدیریت خدمات +Module54Name=قراردادها +Module54Desc=قرارداد و خدمات مدیریت +Module55Name=بارکد +Module55Desc=مدیریت بارکد +Module56Name=تلفن +Module56Desc=یکپارچه سازی تلفن +Module57Name=سفارشات ایستاده +Module57Desc=ایستاده سفارشات و مدیریت خروج Module58Name=ClickToDial -Module58Desc=ClickToDial التكامل +Module58Desc=یکپارچه سازی سیستم ClickToDial (ستاره، ...) Module59Name=Bookmark4u -Module59Desc=إضافة مهمة لتوليد Bookmark4u الحساب من حساب Dolibarr -Module70Name=المداخلات -Module70Desc=التدخلات الإدارية -Module75Name=ويلاحظ نفقات رحلات -Module75Desc=ونفقات الرحلات تلاحظ إدارة -Module80Name=الإرسال -Module80Desc=الإرسال وتسليم الأوامر الإدارية -Module85Name=المصارف والنقد -Module85Desc=إدارة حسابات مصرفية أو نقدا -Module100Name=ExternalSite -Module100Desc=وتشمل أي موقع خارجي في القوائم Dolibarr ومشاهدته في إطار Dolibarr -Module105Name=Mailman and SPIP -Module105Desc=Mailman or SPIP interface for member module +Module59Desc=اضافه کردن تابع برای ایجاد حساب کاربری Bookmark4u از یک حساب Dolibarr +Module70Name=مداخلات +Module70Desc=مدیریت مداخله +Module75Name=هزینه و سفر یادداشت ها +Module75Desc=مدیریت هزینه و سفر یادداشت ها +Module80Name=حمل و نقل +Module80Desc=حمل و نقل و مدیریت سفارش تحویل +Module85Name=بانک ها و پول نقد +Module85Desc=مدیریت بانک و یا پول نقد حساب +Module100Name=سایت خارجی +Module100Desc=این ماژول شامل وب سایت های خارجی و یا صفحه را به منوهای Dolibarr و مشاهده آن را به یک قاب Dolibarr +Module105Name=پستچی و SPIP +Module105Desc=پستچی و یا رابط SPIP برای ماژول عضو Module200Name=LDAP -Module200Desc=دليل LDAP نمازتلا +Module200Desc=هماهنگ سازی دایرکتوری LDAP Module210Name=PostNuke -Module210Desc=PostNuke التكامل -Module240Name=بيانات الصادرات -Module240Desc=أداة لتصدير Dolibarr datas (مساعدين) -Module250Name=بيانات الاستيراد -Module250Desc=أداة لاستيراد datas في Dolibarr (مساعدين) +Module210Desc=ادغام PostNuke +Module240Name=صادرات داده ها +Module240Desc=ابزار به صادرات دادهها Dolibarr (با دستیاران) +Module250Name=واردات داده ها +Module250Desc=ابزار برای وارد کردن دادهها در Dolibarr (با دستیاران) Module310Name=کاربران -Module310Desc=أعضاء إدارة المؤسسة -Module320Name=تغذية RSS -Module320Desc=إضافة تغذية RSS داخل الشاشة صفحة Dolibarr -Module330Name=العناوين -Module330Desc=العناوين إدارة -Module400Name=المشاريع -Module400Desc=إدارة المشاريع داخل وحدات أخرى +Module310Desc=مدیریت اعضای بنیاد +Module320Name=خوراک RSS +Module320Desc=اضافه کردن خوراک RSS در داخل صفحات صفحه نمایش Dolibarr +Module330Name=بوک مارک ها +Module330Desc=مدیریت چوب الف +Module400Name=پروژه ها +Module400Desc=مدیریت پروژه در داخل ماژول های دیگر Module410Name=Webcalendar -Module410Desc=Webcalendar التكامل -Module500Name=Special expenses (tax, social contributions, dividends) -Module500Desc=Management of special expenses like taxes, social contribution, dividends and salaries -Module510Name=Salaries -Module510Desc=Management of empoyees salaries and payments -Module600Name=الإخطارات -Module600Desc=إرسال الإشعارات عن طريق البريد الإلكتروني على بعض الفعاليات التجارية Dolibarr لطرف ثالث اتصالات -Module700Name=التبرعات -Module700Desc=التبرعات إدارة -Module800Name=OSCommerce المباشر -Module800Desc=وتظهر على واجهة OSCommerce أو متجر OSCSS مباشرة عن طريق الوصول إلى قواعد البيانات -Module900Name=وكان من قبل OSCommerce -Module900Desc=وتظهر على واجهة المحل OSCommerce الخدمات عبر الإنترنت. \\ nThis حدة requiere لك لتثبيت عناصر من / oscommerce_ws / ws_server الى OSCommerce الخادم الخاص بك. انظر في الملف التمهيدي / oscommerce_ws / ws_server. -Module1200Name=فرس النبي -Module1200Desc=فرس النبي التكامل -Module1400Name=المحاسبة -Module1400Desc=المحاسبة الإدارية (ضعف الأحزاب) -Module1780Name=الفئات -Module1780Desc=الفئات إدارة المنتجات والموردين والزبائن) -Module2000Name=Fckeditor -Module2000Desc=سوغ محرر -Module2300Name=Cron -Module2300Desc=Scheduled task management -Module2400Name=جدول الأعمال -Module2400Desc=الأعمال / الإدارة المهام وجدول الأعمال -Module2500Name=إدارة المحتوى الإلكتروني -Module2500Desc=حفظ وتبادل الوثائق -Module2600Name= WebServices -Module2600Desc= تمكين خدمات الويب Dolibarr الملقم -Module2700Name= غرفتر -Module2700Desc= استخدام خدمة غرفتر على الانترنت (www.gravatar.com) لإظهار الصورة من المستخدمين / أعضاء (وجدت مع رسائل البريد الإلكتروني الخاصة بهم). في حاجة الى الوصول الى شبكة الانترنت -Module2800Desc=FTP Client -Module2900Name= GeoIPMaxmind -Module2900Desc= GeoIP التحويلات Maxmind القدرات -Module3100Name= Skype -Module3100Desc= Add a Skype button into card of adherents / third parties / contacts -Module5000Name=شركة متعددة -Module5000Desc=يسمح لك لإدارة الشركات المتعددة -Module6000Name=Workflow -Module6000Desc=Workflow management -Module20000Name=Holidays -Module20000Desc=Declare and follow employees holidays -Module50000Name=PayBox -Module50000Desc=Module to offer an online payment page by credit card with PayBox -Module50100Name=نقطة البيع -Module50100Desc=نقطة بيع وحدة -Module50200Name= Paypal -Module50200Desc= Module to offer an online payment page by credit card with Paypal +Module410Desc=ادغام Webcalendar +Module500Name=هزینه های ویژه (مالیاتی، کمک های اجتماعی، سود سهام) +Module500Desc=مدیریت هزینه های خاص مانند مالیات، مشارکت اجتماعی، سود سهام و حقوق +Module510Name=حقوق +Module510Desc=Management of employees salaries and payments +Module600Name=اطلاعیه ها +Module600Desc=ارسال اطلاعیه ها از طریق ایمیل در برخی از وقایع کسب و کار Dolibarr به تماس با شخص ثالث +Module700Name=کمک های مالی +Module700Desc=مدیریت کمک مالی +Module800Name=آهنگ تولد با دسترسی به پایگاه داده مستقیم +Module800Desc=رابط برای نشان دادن آهنگ تولد و یا فروشگاه OSCSS از طریق دسترسی به پایگاه داده مستقیم +Module900Name=آهنگ تولد توسط WS +Module900Desc=رابط برای نشان دادن یک فروشگاه آهنگ تولد از طریق خدمات وب است. این ماژول requiere شما به نصب قطعات از / oscommerce_ws / ws_server به سرور آهنگ تولد خود را. فایل README را در / oscommerce_ws / ws_server کنید. +Module1200Name=اخوندک +Module1200Desc=ادغام آخوندک +Module1400Name=حسابداری +Module1400Desc=مدیریت حسابداری (احزاب دو) +Module1780Name=دسته بندی ها +Module1780Desc=مدیریت گروه (محصولات، تامین کنندگان و مشتریان) +Module2000Name=ویرایشگر WYSIWYG +Module2000Desc=اجازه می دهد به ویرایش برخی از متن با استفاده از ویرایشگر پیشرفته +Module2300Name=cron را +Module2300Desc=وظیفه مدیریت برنامه ریزی +Module2400Name=دستور کار +Module2400Desc=رویدادهای / وظایف و مدیریت برنامه +Module2500Name=الکترونیکی مدیریت محتوا +Module2500Desc=ذخیره و به اشتراک اسناد +Module2600Name=WebServices +Module2600Desc=فعال کردن Dolibarr خدمات وب سرور +Module2700Name=Gravatar در +Module2700Desc=استفاده از سرویس آنلاین Gravatar در (www.gravatar.com) برای نشان دادن عکس از کاربران / کاربران (که با ایمیل های خود را). نیاز به دسترسی به اینترنت +Module2800Desc=FTP کارفرما +Module2900Name=GeoIPMaxmind +Module2900Desc=GeoIP با Maxmind قابلیت تبدیل +Module3100Name=اسکایپ +Module3100Desc=اضافه کردن یک دکمه اسکایپ را به کارت از پیروان / حزب سوم / تماس با ما +Module5000Name=چند شرکت +Module5000Desc=اجازه می دهد تا به شما برای مدیریت شرکت های متعدد +Module6000Name=گردش کار +Module6000Desc=مدیریت گردش کار +Module20000Name=تعطیلات +Module20000Desc=اعلام و کارکنان تعطیلات را دنبال +Module50000Name=خزانه +Module50000Desc=ماژول برای ارائه یک صفحه پرداخت آنلاین از طریق کارت اعتباری با خزانه +Module50100Name=نقطه ای از فروش +Module50100Desc=نقطه ای از ماژول فروش +Module50200Name= پی پال +Module50200Desc= ماژول برای ارائه یک صفحه پرداخت آنلاین از طریق کارت اعتباری با پی پال Module54000Name=PrintIPP -Module54000Desc=Print via Cups IPP Printer. -Module55000Name=Open Poll -Module55000Desc=Module to make online polls (like Doodle, Studs, Rdvz, ...) -Module59000Name=Margins -Module59000Desc=Module to manage margins -Module60000Name=Commissions -Module60000Desc=Module to manage commissions -Module150010Name=Batch number, eat-by date and sell-by date -Module150010Desc=batch number, eat-by date and sell-by date management for product -Permission11=قراءة الفواتير -Permission12=خلق الفواتير -Permission13=تعديل الفواتير -Permission14=التحقق من صحة الفواتير -Permission15=ارسال الفواتير عن طريق البريد الإلكتروني -Permission16=خلق دفع الفواتير -Permission19=حذف الفواتير -Permission21=قراءة مقترحات تجارية -Permission22=إنشاء / تعديل مقترحات تجارية -Permission24=مصادقة على مقترحات تجارية -Permission25=ارسال مقترحات تجارية -Permission26=وثيقة المقترحات التجارية -Permission27=حذف مقترحات تجارية -Permission28=الصادرات التجارية مقترحات -Permission31=قراءة المنتجات -Permission32=إنشاء / تعديل المنتجات -Permission34=حذف المنتجات -Permission36=انظر / إدارة المنتجات المخفية -Permission38=منتجات التصدير -Permission41=قراءة المشاريع والمهام -Permission42=إنشاء / تعديل مشاريع تعديل مهام بلدي المشاريع -Permission44=حذف مشاريع -Permission61=قراءة التدخلات -Permission62=إنشاء / تعديل التدخلات -Permission64=حذف التدخلات -Permission67=تصدير التدخلات -Permission71=قراءة الأعضاء -Permission72=إنشاء / تعديل أعضاء -Permission74=حذف أعضاء -Permission75=إعداد أنواع وسمات أعضاء -Permission76=تصدير datas -Permission78=قراءة الاشتراكات -Permission79=إنشاء / تعديل والاشتراكات -Permission81=قراءة أوامر العملاء -Permission82=إنشاء / تعديل أوامر العملاء -Permission84=صحة أوامر العملاء -Permission86=إرسال أوامر العملاء -Permission87=وثيقة أوامر العملاء -Permission88=إلغاء أوامر العملاء -Permission89=حذف أوامر العملاء -Permission91=قراءة المساهمات الاجتماعية وضريبة القيمة المضافة -Permission92=إنشاء / تعديل المساهمات الاجتماعية وضريبة القيمة المضافة -Permission93=حذف المساهمات الاجتماعية وضريبة القيمة المضافة -Permission94=تصدير المساهمات الاجتماعية -Permission95=قراءة تقارير -Permission96=ارسال الإعداد -Permission97=قراءة ارسال الفواتير والمحاسبة -Permission98=ارسال الفاتورة 'sخطوط المحاسبة -Permission101=قراءة الإرسال -Permission102=إنشاء / تعديل الإرسال -Permission104=صحة الإرسال -Permission106=Export sendings -Permission109=حذف الإرسال -Permission111=قراءة الحسابات المالية -Permission112=إنشاء / تعديل أو حذف ، وقارن المعاملات -Permission113=إعداد الحسابات financiel (إنشاء وإدارة الفئات) -Permission114=توحيد المعاملات -Permission115=صفقات التصدير وكشوفات الحساب -Permission116=التحويلات بين الحسابات -Permission117=إدارة ارسال الشيكات -Permission121=قراءة الغير مرتبطة المستخدم -Permission122=إنشاء / تغيير الغير مرتبطة المستخدم -Permission125=حذف الغير مرتبطة المستخدم -Permission126=الصادرات الغير -Permission141=المهام اقرأ -Permission142=إنشاء / تعديل المهام -Permission144=حذف المهام -Permission146=قراءة موفري -Permission147=قراءة احصائيات -Permission151=قراءة أوامر دائمة -Permission152=إعداد أوامر دائمة -Permission153=قراءة أوامر دائمة إيصالات -Permission154=Credit/refuse standing orders receipts -Permission161=قراءة العقود -Permission162=إنشاء / تغيير العقود -Permission163=تفعيل خدمة للعقد -Permission164=تعطيل خدمة للعقد -Permission165=حذف العقود -Permission171=قراءة رحلات -Permission172=إنشاء / تغيير الرحلات -Permission173=حذف رحلات -Permission178=رحلات التصدير -Permission180=قراءة الموردين -Permission181=قراءة مورد أوامر -Permission182=إنشاء / تغيير المورد أوامر -Permission183=صحة أوامر المورد -Permission184=الموافقة على أوامر المورد -Permission185=من أجل المورد أوامر -Permission186=تلقي أوامر المورد -Permission187=وثيقة أوامر المورد -Permission188=المورد إلغاء أوامر -Permission192=خلق خطوط -Permission193=إلغاء خطوط -Permission194=قراءة خطوط باندوتز -Permission202=إنشاء خط المشترك الرقمي غير المتماثل وصلات -Permission203=وصلات من أجل أوامر -Permission204=من أجل وصلات -Permission205=إدارة وصلات -Permission206=قراءة صلات -Permission211=قراءة الاتصالات الهاتفية -Permission212=من أجل خطوط -Permission213=تفعيل خط -Permission214=إعداد الهاتف -Permission215=الإعداد موفري -Permission221=قراءة emailings -Permission222=إنشاء / تعديل emailings (الموضوع والمستفيدين...) -Permission223=صحة emailings (يسمح بارسال) +Module54000Desc=چاپ از طریق جام IPP پرینتر. +Module55000Name=نظرسنجی گسترش +Module55000Desc=ماژول را به نظر سنجی آنلاین (مانند دودل، خاتم کاری، Rdvz، ...) +Module59000Name=حاشیه +Module59000Desc=ماژول برای مدیریت حاشیه +Module60000Name=کمیسیون ها +Module60000Desc=ماژول برای مدیریت کمیسیون +Module150010Name=شماره بچ، غذا خوردن، بر اساس تاریخ و فروش بر اساس تاریخ +Module150010Desc=تعداد دسته، غذا خوردن، بر اساس تاریخ و فروش توسط مدیریت تاریخ برای محصول +Permission11=خوانده شده فاکتورها مشتری +Permission12=ایجاد / اصلاح صورت حساب مشتری +Permission13=صورت حساب مشتری Unvalidate +Permission14=اعتبارسنجی صورت حساب مشتری +Permission15=ارسال صورت حساب به مشتری از طریق ایمیل +Permission16=ایجاد پرداخت برای فاکتورها مشتری +Permission19=حذف فاکتورها مشتری +Permission21=دفعات بازدید: طرح های تجاری +Permission22=ایجاد / تغییر طرح تجاری +Permission24=اعتبار طرح های تجاری +Permission25=ارسال طرح تجاری +Permission26=طرح تجاری نزدیک +Permission27=حذف طرح تجاری +Permission28=صادرات طرح های تجاری +Permission31=خوانده شده محصول +Permission32=ایجاد / تغییر محصول +Permission34=حذف محصول +Permission36=مشاهده / مدیریت محصولات مخفی +Permission38=محصولات صادراتی +Permission41=خوانده شده پروژه (پروژه مشترک و پروژه های I تماس با هستم) +Permission42=ایجاد / تغییر پروژه (پروژه مشترک و پروژه های I تماس با هستم) +Permission44=حذف پروژه (پروژه مشترک و پروژه های I تماس با هستم) +Permission61=خوانده شده مداخله +Permission62=ایجاد / تغییر مداخلات +Permission64=حذف مداخلات +Permission67=مداخلات صادرات +Permission71=کاربران +Permission72=ایجاد / تغییر کاربران +Permission74=حذف کاربران +Permission75=انواع راه اندازی و ویژگی برای کاربران +Permission76=دادهها صادرات +Permission78=خوانده شده اشتراک ها +Permission79=ایجاد / تغییر اشتراک ها +Permission81=خوانده شده مشتریان سفارشات +Permission82=ایجاد / تغییر مشتریان سفارشات +Permission84=اعتبارسنجی مشتریان سفارشات +Permission86=ارسال سفارشات مشتریان +Permission87=سفارشات نزدیک مشتریان +Permission88=لغو سفارشات مشتریان +Permission89=حذف مشتریان سفارشات +Permission91=خوانده شده مشارکتهای اجتماعی و مالیات بر ارزش افزوده +Permission92=ایجاد / تغییر مشارکتهای اجتماعی و مالیات بر ارزش افزوده +Permission93=حذف کمک های اجتماعی و مالیات بر ارزش افزوده +Permission94=کمک های اجتماعی صادرات +Permission95=دفعات بازدید: گزارش +Permission96=راه اندازی اعزام +Permission97=خوانده شده فاکتور اعزام حسابداری +Permission98=خطوط حسابداری فاکتور اعزام +Permission101=خوانده شده sendings +Permission102=ایجاد / تغییر sendings +Permission104=اعتبارسنجی sendings +Permission106=sendings صادرات +Permission109=حذف sendings +Permission111=دفعات بازدید: حساب های مالی +Permission112=ایجاد / تغییر / حذف و مقایسه معاملات +Permission113=حساب های راه اندازی financiel (ایجاد، مدیریت مجموعه ها) +Permission114=تحکیم معاملات +Permission115=معاملات صادرات و اظهارات حساب کاربری +Permission116=نقل و انتقالات بین حساب +Permission117=مدیریت چک اعزام +Permission121=خوانده شده اشخاص ثالث مرتبط به کاربر +Permission122=ایجاد / تغییر اشخاص ثالث مرتبط به کاربر +Permission125=حذف اشخاص ثالث مرتبط به کاربر +Permission126=صادرات اشخاص ثالث +Permission141=خوانده شده پروژه (همچنین به خصوصی من به تماس نیست) +Permission142=ایجاد / تغییر پروژه های (همچنین به خصوصی من به تماس نیست) +Permission144=حذف پروژه (همچنین به خصوصی من به تماس نیست) +Permission146=خوانده شده ارائه دهندگان +Permission147=دفعات بازدید: آمار +Permission151=خوانده شده سفارشات ایستاده +Permission152=ایجاد / تغییر درخواست سفارشات ایستاده +Permission153=سفارشات ایستاده انتقال رسید +Permission154=اعتبار / امتناع ایستاده سفارشات رسید +Permission161=خوانده شده قرارداد +Permission162=ایجاد / اصلاح قرارداد +Permission163=فعال کردن یک سرویس از یک قرارداد +Permission164=غیر فعال کردن یک سرویس از یک قرارداد +Permission165=حذف قرارداد +Permission171=خوانده شده سفر +Permission172=ایجاد / اصلاح سفر +Permission173=حذف سفر +Permission178=سفرهای صادرات +Permission180=دفعات بازدید: تامین کنندگان +Permission181=خوانده شده سفارشات کالا +Permission182=ایجاد / تغییر سفارشات کالا +Permission183=اعتبارسنجی سفارشات کالا +Permission184=تصویب سفارشات کالا +Permission185=سفارشات تامین کننده نظم +Permission186=دریافت سفارشات کالا +Permission187=نزدیک سفارشات کالا +Permission188=لغو سفارشات کالا +Permission192=ایجاد خطوط +Permission193=لغو خطوط +Permission194=دفعات بازدید: خطوط پهنای باند +Permission202=ایجاد اتصالات ADSL +Permission203=سفارشات اتصالات منظور +Permission204=اتصالات منظور +Permission205=مدیریت اتصالات +Permission206=خوانده شده اتصالات +Permission211=دفعات بازدید: تلفن +Permission212=خطوط نظم +Permission213=فعال کردن خط +Permission214=راه اندازی تلفن +Permission215=ارائه دهندگان راه اندازی +Permission221=خوانده شده emailings +Permission222=ایجاد / تغییر emailings (موضوع، دریافت کنندگان ...) +Permission223=اعتبارسنجی emailings (اجازه می دهد تا ارسال) Permission229=حذف emailings -Permission237=View recipients and info -Permission238=Manually send mailings -Permission239=Delete mailings after validation or sent -Permission241=قراءة الفئات -Permission242=إنشاء / تعديل الفئات -Permission243=حذف فئات -Permission244=انظر محتويات الخفية الفئات -Permission251=قراءة أخرى للمستخدمين والمجموعات -PermissionAdvanced251=Read other users -Permission252=إنشاء / تغيير المستخدمين الآخرين والجماعات ولكم permisssions -Permission253=تغيير كلمة مرور المستخدمين الآخرين -PermissionAdvanced253=Create/modify internal/external users and permissions -Permission254=حذف أو تعطيل المستخدمين الآخرين -Permission255=إنشاء / تعديل بلده معلومات المستخدم -Permission256=تعديل بنفسه كلمة المرور -Permission262=توسيع نطاق الوصول إلى جميع الأطراف الثالثة (وليس فقط تلك المرتبطة المستخدم). ليست فعالة للمستعملين الخارجيين (دائما يقتصر على نفسها). -Permission271=قراءة في كاليفورنيا -Permission272=قراءة الفواتير -Permission273=قضية الفواتير -Permission281=قراءة اتصالات -Permission282=إنشاء / تغيير الاتصالات -Permission283=حذف اتصالات -Permission286=تصدير اتصالات -Permission291=قراءة التعريفات -Permission292=مجموعة أذونات على التعريفات -Permission293=مصممو الأزياء تعديل الرسوم الجمركية -Permission300=شريط قراءة المدونات -Permission301=إنشاء / تغيير شريط الرموز -Permission302=حذف شريط الرموز -Permission311=قراءة الخدمات -Permission312=إسناد عقود الخدمة -Permission331=قراءة العناوين -Permission332=إنشاء / تغيير العناوين -Permission333=حذف العناوين -Permission341=Read its own permissions -Permission342=Create/modify his own user information -Permission343=Modify his own password -Permission344=Modify its own permissions -Permission351=Read groups -Permission352=Read groups permissions -Permission353=Create/modify groups -Permission354=Delete or disable groups -Permission358=Export users -Permission401=قراءة خصومات -Permission402=إنشاء / تعديل الخصومات -Permission403=تحقق من الخصومات -Permission404=حذف خصومات -Permission531=قراءة الخدمات -Permission532=إنشاء / تعديل الخدمات +Permission237=مشخصات دریافت کنندگان و اطلاعات +Permission238=دستی ارسال نامههای پستی +Permission239=حذف نامههای پستی پس از اعتبار سنجی و یا ارسال +Permission241=دفعات بازدید: دسته بندی +Permission242=ایجاد / تغییر مجموعه ها +Permission243=حذف مجموعه ها +Permission244=مشاهده محتویات دسته بندی های مخفی +Permission251=خوانده شده کاربران و گروه های دیگر +PermissionAdvanced251=خوانده شده کاربران دیگر +Permission252=خوانده شده مجوز از کاربران دیگر +Permission253=ایجاد / تغییر دیگر کاربران، گروه ها و permisssions +PermissionAdvanced253=ایجاد / تغییر کاربران خارجی / داخلی و مجوز +Permission254=ایجاد / تغییر کاربران خارجی فقط +Permission255=تغییر دیگر کاربران رمز عبور +Permission256=حذف و یا کاربران دیگر را غیر فعال کنید +Permission262=گسترش دسترسی به تمام اشخاص ثالث (نه فقط کسانی که در ارتباط با کاربر). برای کاربران خارجی (همیشه به خود محدود) موثر است. +Permission271=خوانده شده CA +Permission272=خوانده شده فاکتورها +Permission273=صورت حساب شماره +Permission281=دفعات بازدید: اطلاعات تماس +Permission282=ایجاد / اصلاح اطلاعات تماس +Permission283=حذف اطلاعات تماس +Permission286=تماس با صادرات +Permission291=خوانده شده تعرفه ها +Permission292=اجازه انتخاب در تعرفه ها +Permission293=تغییر مشتریان تعرفه ها +Permission300=دفعات بازدید: بارکد +Permission301=ایجاد / تغییر کدهای نوار +Permission302=حذف کدهای نوار +Permission311=خوانده شده خدمات +Permission312=اختصاص خدمات به قرارداد +Permission331=خوانده شده بوک مارک ها +Permission332=ایجاد / تغییر بوک مارک ها +Permission333=حذف بوک مارک ها +Permission341=خوانده شده مجوز خود را +Permission342=ایجاد / اصلاح اطلاعات کاربر خود را +Permission343=رمز عبور خود را تغییر دهید +Permission344=تغییر مجوز خود را +Permission351=خوانده شده گروه +Permission352=خوانده شده گروه مجوز +Permission353=ایجاد / تغییر گروه +Permission354=گروه حذف و یا غیر فعال کنید +Permission358=کاربران صادرات +Permission401=خوانده شده تخفیف +Permission402=ایجاد / اصلاح تخفیف +Permission403=اعتبار تخفیف +Permission404=حذف تخفیف +Permission510=Read Salaries +Permission512=Create/modify salaries +Permission514=Delete salaries +Permission517=Export salaries +Permission531=خوانده شده خدمات +Permission532=ایجاد / اصلاح خدمات Permission534=حذف خدمات -Permission536=انظر / إدارة الخدمات الخفية -Permission538=تصدير الخدمات -Permission701=قراءة التبرعات -Permission702=إنشاء / تعديل والهبات -Permission703=حذف التبرعات -Permission1001=قراءة مخزونات -Permission1002=إنشاء / تغيير المخزونات -Permission1003=حذف الأرصدة -Permission1004=قراءة تحركات الأسهم -Permission1005=إنشاء / تعديل تحركات الأسهم -Permission1101=قراءة تسليم أوامر -Permission1102=إنشاء / تعديل أوامر التسليم -Permission1104=تحقق من توصيل الأوامر -Permission1109=حذف تسليم أوامر -Permission1181=قراءة الموردين -Permission1182=قراءة مورد أوامر -Permission1183=خلق مورد أوامر -Permission1184=صحة أوامر المورد -Permission1185=الموافقة على أوامر المورد -Permission1186=من أجل المورد أوامر -Permission1187=باستلام المورد أوامر -Permission1188=وثيقة أوامر المورد -Permission1201=ونتيجة للحصول على التصدير -Permission1202=إنشاء / تعديل للتصدير -Permission1231=قراءة فواتير الموردين -Permission1232=خلق فواتير الموردين -Permission1233=التحقق من فواتير الموردين -Permission1234=حذف فواتير الموردين -Permission1235=Send supplier invoices by email -Permission1236=تصدير فواتير الموردين والصفات والمدفوعات -Permission1237=Export supplier orders and their details -Permission1251=ادارة الدمار الواردات الخارجية البيانات في قاعدة البيانات (بيانات تحميل) -Permission1321=تصدير العملاء والفواتير والمدفوعات والصفات -Permission1421=التصدير طلبات الزبائن وصفاته -Permission23001 = Read Scheduled task -Permission23002 = Create/update Scheduled task -Permission23003 = Delete Scheduled task -Permission23004 = Execute Scheduled task -Permission2401=قراءة الأعمال (أو أحداث المهام) مرتبطة حسابه -Permission2402=إنشاء / تعديل أو حذف الإجراءات (الأحداث أو المهام) مرتبطة حسابه -Permission2403=قراءة الأعمال (أو أحداث المهام) آخرين -Permission2411=الإجراءات قراءة (أحداث أو المهام) للاخرين -Permission2412=إنشاء / تعديل الإجراءات (أحداث أو المهام) للاخرين -Permission2413=حذف الإجراءات (أحداث أو المهام) للاخرين -Permission2501=قراءة وثائق -Permission2502=تقديم وثائق أو حذف -Permission2503=Submit or delete documents -Permission2515=إعداد وثائق وأدلة -Permission2801=Use FTP client in read mode (browse and download only) -Permission2802=Use FTP client in write mode (delete or upload files) -Permission50101=Use Point of sales -Permission50201=Read transactions -Permission50202=Import transactions -Permission54001=Print -Permission55001=Read polls -Permission55002=Create/modify polls -Permission59001=Read commercial margins -Permission59002=Define commercial margins -DictionaryCompanyType=Thirdparties type -DictionaryCompanyJuridicalType=Juridical kinds of thirdparties -DictionaryProspectLevel=Prospect potential level -DictionaryCanton=State/Cantons -DictionaryRegion=Regions -DictionaryCountry=Countries -DictionaryCurrency=Currencies -DictionaryCivility=Civility title -DictionaryActions=Type of agenda events -DictionarySocialContributions=Social contributions types -DictionaryVAT=VAT Rates or Sales Tax Rates -DictionaryRevenueStamp=Amount of revenue stamps -DictionaryPaymentConditions=Payment terms -DictionaryPaymentModes=Payment modes -DictionaryTypeContact=Contact/Address types +Permission536=مشاهده / مدیریت خدمات مخفی +Permission538=خدمات صادرات +Permission701=خوانده شده +Permission702=ایجاد / تغییر کمک های مالی +Permission703=حذف کمک های مالی +Permission1001=خوانده شده سهام +Permission1002=ایجاد / تغییر سهام +Permission1003=حذف سهام +Permission1004=خوانده شده جنبش های سهام +Permission1005=ایجاد / تغییر جنبش های سهام +Permission1101=خوانده شده تحویل سفارشات +Permission1102=ایجاد / اصلاح تحویل سفارشات +Permission1104=اعتبارسنجی تحویل سفارشات +Permission1109=حذف تحویل سفارشات +Permission1181=دفعات بازدید: تامین کنندگان +Permission1182=خوانده شده سفارشات کالا +Permission1183=ایجاد / تغییر سفارشات کالا +Permission1184=اعتبارسنجی سفارشات کالا +Permission1185=تصویب سفارشات کالا +Permission1186=سفارشات تامین کننده نظم +Permission1187=اذعان دریافت سفارشات کالا +Permission1188=حذف سفارشات کالا +Permission1201=دریافت نتیجه شده از صادرات +Permission1202=ایجاد / اصلاح صادرات +Permission1231=خوانده شده فاکتورها منبع +Permission1232=ایجاد / اصلاح فاکتورها منبع +Permission1233=اعتبارسنجی فاکتورها منبع +Permission1234=حذف فاکتورها منبع +Permission1235=ارسال فاکتورها عرضه کننده کالا از طریق ایمیل +Permission1236=فاکتورها منبع صادرات، صفات و پرداخت +Permission1237=سفارشات عرضه کننده کالا صادرات و مشخصات آنها +Permission1251=اجرای واردات انبوه از داده های خارجی به پایگاه داده (بار داده ها) +Permission1321=فاکتورها صادرات به مشتریان، ویژگی ها و پرداخت ها +Permission1421=سفارشات صادرات مشتری و ویژگی های +Permission23001 = به نشانه خوانده شدن برنامه ریزی شده کار +Permission23002 = ایجاد / بروز رسانی برنامه ریزی شده کار +Permission23003 = حذف کار برنامه ریزی شده +Permission23004 = اجرای کار برنامه ریزی شده +Permission2401=دفعات بازدید: اقدامات (رویدادها و وظایف) مرتبط با حساب کاربری خود +Permission2402=ایجاد / اصلاح اعمال (رویدادها و وظایف) به حساب او در ارتباط است +Permission2403=حذف اقدامات (رویدادها و وظایف) مرتبط با حساب کاربری خود +Permission2411=دفعات بازدید: اقدامات (رویدادها و وظایف) از دیگران +Permission2412=ایجاد / اصلاح اعمال (رویدادها و وظایف) از دیگران +Permission2413=حذف اقدامات (رویدادها و وظایف) از دیگران +Permission2501=خوانده شده / دانلود اسناد +Permission2502=دانلود اسناد +Permission2503=ثبت کردن و یا حذف اسناد +Permission2515=اسناد و مدارک راه اندازی دایرکتوری +Permission2801=استفاده از سرویس گیرنده FTP در حالت خواندن (فهرست و دانلود فقط) +Permission2802=استفاده از سرویس گیرنده FTP در حالت نوشتن (پاک کنید یا آپلود فایل) +Permission50101=استفاده از نقطه ای از فروش +Permission50201=خوانده شده معاملات +Permission50202=واردات معاملات +Permission54001=چاپ +Permission55001=دفعات بازدید نظر سنجی +Permission55002=ایجاد / تغییر نظر سنجی +Permission59001=دفعات بازدید: حاشیه های تجاری +Permission59002=تعریف حاشیه های تجاری +DictionaryCompanyType=نوع Thirdparties +DictionaryCompanyJuridicalType=انواع حقوقی thirdparties +DictionaryProspectLevel=سطح بالقوه چشم انداز +DictionaryCanton=استان / استان +DictionaryRegion=مناطق +DictionaryCountry=کشورها +DictionaryCurrency=واحد پول +DictionaryCivility=عنوان تمدن +DictionaryActions=نوع حوادث در دستور کار +DictionarySocialContributions=انواع کمک های اجتماعی +DictionaryVAT=نرخ مالیات بر ارزش افزوده و یا فروش نرخ مالیات +DictionaryRevenueStamp=مقدار تمبر درآمد +DictionaryPaymentConditions=شرایط پرداخت +DictionaryPaymentModes=حالت های پرداخت +DictionaryTypeContact=انواع تماس / آدرس DictionaryEcotaxe=Ecotax (WEEE) -DictionaryPaperFormat=Paper formats -DictionaryFees=Type of fees -DictionarySendingMethods=Shipping methods -DictionaryStaff=Staff -DictionaryAvailability=Delivery delay -DictionaryOrderMethods=Ordering methods -DictionarySource=Origin of proposals/orders -DictionaryAccountancyplan=Chart of accounts -DictionaryAccountancysystem=Models for chart of accounts -SetupSaved=الإعداد المحفوظة -BackToModuleList=العودة إلى قائمة الوحدات -BackToDictionaryList=Back to dictionaries list -VATReceivedOnly=سعر خاص لا تحمل -VATManagement=إدارة الضريبة على القيمة المضافة -VATIsUsedDesc=معدل ضريبة القيمة المضافة بشكل افتراضي عند إنشاء الآفاق ، والفواتير ، وما يتبع أوامر النشطة القياسية للمادة :
    إذا كان البائع هو تعرض لضريبة القيمة المضافة ، وضريبة القيمة المضافة بعد ذلك تلقائيا= 0. نهاية المادة.
    إذا كان (بيع وشراء= بلد في البلد) ، فإن ضريبة القيمة المضافة بشكل افتراضي= ضريبة القيمة المضافة من بيع المنتج في البلد. نهاية المادة.
    إذا كان البائع والمشتري في الجماعة الأوروبية ، وبيعت البضاعة الجديدة بعد أن وسائل النقل (السيارات ، والسفن ، والطائرات) ، الافتراضي= 0 ضريبة القيمة المضافة (ضريبة القيمة المضافة وينبغي أن تدفع من قبل المشتري في customoffice بلاده وليس على البائع . نهاية المادة.
    إذا كان البائع والمشتري في الجماعة الأوروبية والسلع التي تباع عن طريق وسائل أخرى جديدة بدلا من وسائل النقل ، فإن ضريبة القيمة المضافة بشكل افتراضي= ضريبة القيمة المضافة للمنتجات المباعة. نهاية المادة.
    وإلا فإن ضريبة القيمة المضافة المقترحة الافتراضي= 1. نهاية المادة. -VATIsNotUsedDesc=افتراضي المقترحة 0 ضريبة القيمة المضافة هو الذي يمكن أن يستخدم في حالات مثل الجمعيات والأفراد والشركات الصغيرة où. -VATIsUsedExampleFR=في فرنسا ، فإن ذلك يعني وجود منظمات أو شركات حقيقية في النظام المالي (المبسطة حقيقية أو طبيعية حقيقية). نظام ضريبة القيمة المضافة هي التي أعلنت. -VATIsNotUsedExampleFR=في فرنسا ، فإن ذلك يعني أن الجمعيات غير المعلنة ضريبة القيمة المضافة أو شركات أو مؤسسات المهن الحرة التي اختارت المشاريع الصغيرة النظام الضريبي (ضريبة القيمة المضافة في الانتخاب) ، ودفع ضريبة القيمة المضافة في الانتخاب دون أي إعلان من ضريبة القيمة المضافة. هذا الخيار سيتم عرض المرجعي "غير الضريبة على القيمة المضافة المطبقة -- الفن - 293B من المجموعة الاستشارية لاندونيسيا" على الفواتير. +DictionaryPaperFormat=فرمت مقاله +DictionaryFees=نوع هزینه ها +DictionarySendingMethods=روش های حمل و نقل +DictionaryStaff=کارکنان +DictionaryAvailability=تاخیر در تحویل +DictionaryOrderMethods=مرتب سازی بر روش +DictionarySource=منبع از پیشنهادات / سفارشات +DictionaryAccountancyplan=نمودار حساب +DictionaryAccountancysystem=مدل برای نمودار حساب +SetupSaved=راه اندازی نجات داد +BackToModuleList=بازگشت به لیست ماژول ها +BackToDictionaryList=برگشت به فهرست واژه نامه ها +VATReceivedOnly=نرخ ویژه اتهام نشده است +VATManagement=مدیریت مالیات بر ارزش افزوده +VATIsUsedDesc=نرخ مالیات بر ارزش افزوده به طور پیش فرض هنگام ایجاد چشم انداز، فاکتورها، سفارشات و غیره پیروی از قانون استاندارد های فعال:
    اگر فروشنده به مالیات بر ارزش افزوده در نمی آید، پس از آن مالیات بر ارزش افزوده به طور پیش فرض = 0. پایان حکومت.
    اگر (فروش کشور = خرید کشور)، پس از آن مالیات بر ارزش افزوده به طور پیش فرض = مالیات بر ارزش افزوده از محصولات در کشور فروش. پایان حکومت.
    اگر فروشنده و خریدار در جامعه و کالاهای اروپایی محصولات حمل و نقل (اتومبیل، کشتی، هواپیما)، مالیات بر ارزش افزوده به طور پیش فرض = 0 (مالیات بر ارزش افزوده باید توسط خریدار در customoffice کشور خود پرداخت و نه در فروشنده). پایان حکومت.
    اگر فروشنده و خریدار در جامعه اروپا و خریدار است یک شرکت نیست، پس از آن مالیات بر ارزش افزوده به طور پیش فرض = مالیات بر ارزش افزوده از تولید به فروش می رسد. پایان حکومت.
    اگر فروشنده و خریدار در جامعه اروپا و خریدار یک شرکت، پس از آن مالیات بر ارزش افزوده به طور پیش فرض = 0 است. پایان حکومت.
    دیگری به طور پیش فرض مالیات بر ارزش افزوده پیشنهاد = 0. پایان حکومت. +VATIsNotUsedDesc=به طور پیش فرض مالیات بر ارزش افزوده ارائه شده است 0 که می تواند برای موارد مانند ارتباط استفاده می شود، افراد عضو جدید می توانید شرکت های کوچک است. +VATIsUsedExampleFR=در فرانسه، به این معنی شرکت و یا سازمان داشتن یک سیستم مالی واقعی (ساده شده واقعی یا عادی واقعی). یک سیستم است که در آن مالیات بر ارزش افزوده اعلام شده است. +VATIsNotUsedExampleFR=در فرانسه، به این معنی انجمن هایی که بدون مالیات بر ارزش افزوده اعلام کرد و شرکت ها، سازمان ها و یا حرفه های لیبرال که انتخاب کرده اند سیستم میکرو به شرکت های مالی (مالیات بر ارزش افزوده در حق رای دادن) و بدون اعلان مالیات بر ارزش افزوده پرداخت مالیات بر ارزش افزوده حق رای دادن. در فاکتورها - این انتخاب خواهد شد مرجع "هنر 293B از CGI مالیات بر ارزش افزوده قابل اعمال غیر" نشان می دهد. ##### Local Taxes ##### -LocalTax1IsUsed=Use second tax -LocalTax1IsNotUsed=Do not use second tax -LocalTax1IsUsedDesc=Use a second type of tax (other than VAT) -LocalTax1IsNotUsedDesc=Do not use other type of tax (other than VAT) -LocalTax1Management=Second type of tax +LocalTax1IsUsed=استفاده از مالیات دوم +LocalTax1IsNotUsed=آیا مالیات دوم استفاده نکنید +LocalTax1IsUsedDesc=استفاده از نوع دوم از مالیات (به غیر از مالیات بر ارزش افزوده) +LocalTax1IsNotUsedDesc=آیا نوع دیگری از مالیات (به غیر از مالیات بر ارزش افزوده) استفاده کنید +LocalTax1Management=نوع دوم از مالیات LocalTax1IsUsedExample= LocalTax1IsNotUsedExample= -LocalTax2IsUsed=Use third tax -LocalTax2IsNotUsed=Do not use third tax -LocalTax2IsUsedDesc=Use a third type of tax (other than VAT) -LocalTax2IsNotUsedDesc=Do not use other type of tax (other than VAT) -LocalTax2Management=Third type of tax +LocalTax2IsUsed=استفاده از مالیات سوم +LocalTax2IsNotUsed=آیا مالیات سوم استفاده کنید +LocalTax2IsUsedDesc=استفاده از یک نوع سوم از مالیات (به غیر از مالیات بر ارزش افزوده) +LocalTax2IsNotUsedDesc=آیا نوع دیگری از مالیات (به غیر از مالیات بر ارزش افزوده) استفاده کنید +LocalTax2Management=نوع سوم از مالیات LocalTax2IsUsedExample= LocalTax2IsNotUsedExample= -LocalTax1ManagementES= إدارة الطاقة المتجددة -LocalTax1IsUsedDescES= معدل الطاقة المتجددة بشكل افتراضي عند احتمالات خلق ، والفواتير ، وأوامر الخ اتباع القاعدة نشط القياسية :
    إذا لم تعرض الشركة المصرية للاتصالات لمشتري الطاقة المتجددة ، الطاقة المتجددة بشكل افتراضي = 0. نهاية الحكم.
    في حال التعرض للمشتري بعد ذلك الطاقة المتجددة الطاقة المتجددة بشكل افتراضي. نهاية الحكم.
    -LocalTax1IsNotUsedDescES= افتراضيا الطاقة المتجددة المقترحة هي 0. نهاية الحكم. -LocalTax1IsUsedExampleES= في اسبانيا هم من المهنيين تخضع لبعض المقاطع المحددة للشركة التعليم الصوتي التفاعلي الاسبانية. -LocalTax1IsNotUsedExampleES= في اسبانيا هم المهنية والجمعيات وتخضع لقطاعات معينة من شركة التعليم الصوتي التفاعلي الاسبانية. -LocalTax2ManagementES= IRPF الإدارة -LocalTax2IsUsedDescES= معدل الطاقة المتجددة بشكل افتراضي عند احتمالات خلق ، والفواتير ، وأوامر الخ اتباع القاعدة نشط القياسية :
    إذا لم يتم التعرض للبائع IRPF ، ثم IRPF افتراضيا = 0. نهاية الحكم.
    في حال التعرض للبائع IRPF ثم IRPF افتراضيا. نهاية الحكم.
    -LocalTax2IsNotUsedDescES= افتراضيا IRPF المقترحة هي 0. نهاية الحكم. -LocalTax2IsUsedExampleES= في اسبانيا ، لحسابهم الخاص والمهنيين المستقلين الذين يقدمون الخدمات والشركات الذين اختاروا النظام الضريبي من وحدات. -LocalTax2IsNotUsedExampleES= في اسبانيا هم bussines لا تخضع لنظام ضريبي وحدات. -LabelUsedByDefault=العلامة التي يستخدمها التقصير إذا لم يمكن العثور على ترجمة للقانون -LabelOnDocuments=علامة على وثائق -NbOfDays=ملاحظة : من الأيام -AtEndOfMonth=في نهاية الشهر -Offset=ويقابل -AlwaysActive=حركة دائمة -UpdateRequired=Your system needs to be updated. To do this, click on تحديث الآن. -Upgrade=ترقية -MenuUpgrade=ترقية / توسيع -AddExtensionThemeModuleOrOther=إضافة التمديد) الموضوع ، وحدة ،...) -WebServer=خادم الويب -DocumentRootServer=خادم الويب 'sالدليل الرئيسي -DataRootServer=دليل ملفات البيانات -IP=الملكية الفكرية -Port=الميناء -VirtualServerName=اسم الخادم الافتراضي -AllParameters=جميع البارامترات -OS=نظام التشغيل -PhpEnv=Env -PhpModules=وحدات -PhpConf=Conf -PhpWebLink=Php ربط الشبكة -Pear=الكمثرى -PearPackages=الكمثرى الحزم -Browser=Browser -Server=الخادم -Database=قاعدة بيانات -DatabaseServer=قاعدة بيانات المضيف -DatabaseName=اسم قاعدة البيانات -DatabasePort=قاعدة بيانات الميناء -DatabaseUser=قاعدة بيانات المستخدم -DatabasePassword=قاعدة بيانات كلمة السر -DatabaseConfiguration=إعداد قاعدة بيانات -Tables=الجداول -TableName=اسم الجدول -TableLineFormat=شكل الخط -NbOfRecord=ملاحظة : من السجلات -Constraints=القيود -ConstraintsType=نوع القيد -ConstraintsToShowOrNotEntry=قيدا أو لم تظهر القائمة دخول -AllMustBeOk=كل هذه لا بد من وقفها +LocalTax1ManagementES= RE مدیریت +LocalTax1IsUsedDescES= نرخ RE به طور پیش فرض هنگام ایجاد چشم انداز، فاکتورها، سفارشات و غیره پیروی از قانون استاندارد های فعال:
    اگر ته خریدار است قرار نیست که دوباره، RE طور پیش فرض = 0. پایان حکومت.
    اگر خریدار است در معرض RE سپس RE به طور پیش فرض. پایان حکومت.
    +LocalTax1IsNotUsedDescES= به طور پیش فرض RE پیشنهادی 0. پایان حکومت است. +LocalTax1IsUsedExampleES= در اسپانیا آنها حرفه ای موضوع را به برخی از بخش های خاصی از IAE اسپانیایی می باشد. +LocalTax1IsNotUsedExampleES= در اسپانیا آنها حرفه ای و جوامع و موضوع را به بخش های خاصی از IAE اسپانیایی می باشد. +LocalTax2ManagementES= مدیریت IRPF +LocalTax2IsUsedDescES= نرخ RE به طور پیش فرض هنگام ایجاد چشم انداز، فاکتورها، سفارشات و غیره پیروی از قانون استاندارد های فعال:
    اگر فروشنده به IRPF به طور پیش فرض = 0 قرار نیست، پس IRPF. پایان حکومت.
    اگر فروشنده در معرض IRPF سپس IRPF به طور پیش فرض. پایان حکومت.
    +LocalTax2IsNotUsedDescES= به طور پیش فرض IRPF پیشنهاد 0. پایان حکومت است. +LocalTax2IsUsedExampleES= در اسپانیا، مترجمان آزاد و مستقل حرفه ای که ارائه خدمات و شرکت های که انتخاب کرده اند نظام مالیاتی از ماژول های. +LocalTax2IsNotUsedExampleES= در اسپانیا آنها bussines به سیستم مالیاتی از ماژول های موضوع نیست. +LabelUsedByDefault=برچسب استفاده می شود به طور پیش فرض اگر هیچ ترجمه ای برای کد یافت +LabelOnDocuments=برچسب در اسناد +NbOfDays=Nb در روز +AtEndOfMonth=در پایان ماه +Offset=افست +AlwaysActive=همیشه فعال +UpdateRequired=سیستم شما باید به روز شود. برای این کار، با کلیک بر روی به روز رسانی در حال حاضر . +Upgrade=به روز رسانی +MenuUpgrade=ارتقا / تمدید +AddExtensionThemeModuleOrOther=اضافه کردن پسوند (تم، ماژول، ...) +WebServer=وب سرور +DocumentRootServer=دایرکتوری ریشه وب سرور +DataRootServer=دایرکتوری فایل داده ها +IP=IP +Port=بندر +VirtualServerName=نام سرور مجازی +AllParameters=تمام پارامترهای +OS=OS +PhpEnv=پاکت +PhpModules=ماژول ها +PhpConf=کنفرانس +PhpWebLink=لینک وب پی اچ پی +Pear=گلابی +PearPackages=بسته های گلابی +Browser=مرورگر +Server=سرور +Database=پایگاه داده +DatabaseServer=میزبان پایگاه داده +DatabaseName=نام پایگاه داده +DatabasePort=پورت پایگاه داده +DatabaseUser=کاربر پایگاه داده +DatabasePassword=رمز عبور پایگاه داده +DatabaseConfiguration=راه اندازی پایگاه داده +Tables=جداول +TableName=نام جدول +TableLineFormat=فرمت خط +NbOfRecord=Nb و سوابق +Constraints=محدودیت +ConstraintsType=نوع محدودیت +ConstraintsToShowOrNotEntry=محدودیت ورود به منو را نشان می دهد یا نه +AllMustBeOk=همه از این باید بررسی می شود Host=سرور DriverType=نوع درایور -SummarySystem=چکیده سیستم -SummaryConst=قائمة بجميع Dolibarr الإعداد البارامترات -SystemUpdate=تحديث النظام -SystemSuccessfulyUpdate=النظام الخاص بك تم تحديث بنجاح -MenuCompanySetup=الشركة / المؤسسة -MenuNewUser=مستخدم جديد -MenuTopManager=المدير الأعلى -MenuLeftManager=مدير القائمة اليمنى -MenuManager=Menu manager -MenuSmartphoneManager=Smartphone menu manager -DefaultMenuTopManager=المدير الأعلى -DefaultMenuLeftManager=مدير القائمة اليمنى -DefaultMenuManager= Standard menu manager -DefaultMenuSmartphoneManager=Smartphone menu manager -Skin=پوسته -DefaultSkin=پوسته اولیه -MaxSizeList=الحد الأقصى لطول قائمة -DefaultMaxSizeList=تقصير المدة القصوى للقائمة +SummarySystem=سیستم خلاصه اطلاعات +SummaryConst=فهرست تمام پارامترهای راه اندازی Dolibarr +SystemUpdate=به روز رسانی سیستم +SystemSuccessfulyUpdate=سیستم شما با موفقیت به روز رسانی شده است +MenuCompanySetup=شرکت / موسسه +MenuNewUser=کاربر جدید +MenuTopManager=مدیر منو بالا +MenuLeftManager=مدیر منوی سمت چپ +MenuManager=مدیریت منو +MenuSmartphoneManager=مدیر منو گوشی های هوشمند +DefaultMenuTopManager=مدیر منو بالا +DefaultMenuLeftManager=مدیر منوی سمت چپ +DefaultMenuManager= مدیر منوی استاندارد +DefaultMenuSmartphoneManager=مدیر منو گوشی های هوشمند +Skin=تم پوست +DefaultSkin=پیش فرض پوست +MaxSizeList=حداکثر طول برای لیست +DefaultMaxSizeList=به طور پیش فرض حداکثر طول برای فهرست MessageOfDay=پیام روز -MessageLogin=ادخل صفحة الرسالة -PermanentLeftSearchForm=دائم البحث عن شكل القائمة اليمنى -DefaultLanguage=زبانی اصلی -EnableMultilangInterface=تتيح واجهة متعددة اللغات -EnableShowLogo=عرض الشعار على اليسار القائمة -SystemSuccessfulyUpdated=النظام الخاص بك تم تحديث بنجاح -CompanyInfo=الشركة / المؤسسة المعلومات -CompanyIds=الشركة / المؤسسة الهويات -CompanyName=نام شرکت -CompanyAddress=آدرس شرکت -CompanyZip=کد پستی +MessageLogin=ارسال صفحه ورود +PermanentLeftSearchForm=فرم جستجو دائمی در منوی سمت چپ +DefaultLanguage=زبان پیش فرض برای استفاده از (زبان) +EnableMultilangInterface=فعال کردن رابط کاربری چند زبانه +EnableShowLogo=نمایش لوگو را در منوی سمت چپ +SystemSuccessfulyUpdated=سیستم شما با موفقیت به روز رسانی شده است +CompanyInfo=شرکت / اطلاعات پایه +CompanyIds=هویت شرکت / بنیاد +CompanyName=نام +CompanyAddress=نشانی +CompanyZip=زیپ CompanyTown=شهر CompanyCountry=کشور -CompanyCurrency=واحد پولی -Logo=آرم -DoNotShow=نشان نده -DoNotSuggestPaymentMode=نوع پرداخت پیشنهاد نده -NoActiveBankAccountDefined=هیچ حساب بانکی فعال نیست -OwnerOfBankAccount=صاحب حساب بانکی %s -BankModuleNotActive=ماژول حساب بانکی فعال نشده +CompanyCurrency=ارز اصلی +Logo=لوگو +DoNotShow=را نشان نمی +DoNotSuggestPaymentMode=آیا نشان نمی +NoActiveBankAccountDefined=بدون حساب بانکی فعال تعریف +OwnerOfBankAccount=صاحب حساب بانکی از٪ s +BankModuleNotActive=ماژول حساب بانکی فعال نیست ShowBugTrackLink=نمایش لینک "گزارش خرابی" ShowWorkBoard=وتظهر "طاولة العمل" على الصفحة الرئيسية Alerts=تنبيهات @@ -893,7 +899,7 @@ DelaysOfToleranceBeforeWarning=محذرا من التأخير قبل التسا DelaysOfToleranceDesc=تتيح لك هذه الشاشة لتحديد التأخير قبل السماح تنبيه يقال على الشاشة مع picto ٪ ق لكل عنصر في وقت متأخر. Delays_MAIN_DELAY_ACTIONS_TODO=تأخير التسامح (أيام) قبل اتخاذ إجراءات في حالة تأهب على المخطط لم تتحقق Delays_MAIN_DELAY_ORDERS_TO_PROCESS=تأخير التسامح (أيام) قبل تنبيه على أوامر لم -Delays_MAIN_DELAY_SUPPLIER_ORDERS_TO_PROCESS=Delay tolerance (in days) before alert on suppliers orders not yet processed +Delays_MAIN_DELAY_SUPPLIER_ORDERS_TO_PROCESS=تحمل (در روز) تاخیر قبل از آماده باش در تامین کنندگان سفارشات هنوز پردازش نشده Delays_MAIN_DELAY_PROPALS_TO_CLOSE=التسامح التأخير (في يوم) في حالة تأهب على المقترحات المعروضة ليقفل Delays_MAIN_DELAY_PROPALS_TO_BILL=تأخير التسامح (أيام) قبل تنبيه بشأن المقترحات لا توصف Delays_MAIN_DELAY_NOT_ACTIVATED_SERVICES=تأخير التسامح (في يوم) في حالة تأهب قبل يوم والخدمات لتفعيل @@ -911,15 +917,15 @@ SetupDescription5=القيود الأخرى القائمة في إدارة اخ EventsSetup=پیکربندی برای رویدادهای گزارشات LogEvents=مراجعة الحسابات الأحداث الأمنية Audit=ممیزی -InfoDolibarr=Infos Dolibarr -InfoOS=Infos OS -InfoWebServer=Infos web server -InfoDatabase=Infos database -InfoPHP=Infos PHP -InfoPerf=Infos performances +InfoDolibarr=ساعات Dolibarr +InfoOS=ساعات OS +InfoWebServer=ساعات وب سرور +InfoDatabase=پایگاه داده ساعات روز +InfoPHP=ساعات PHP +InfoPerf=ساعات اجرای ListEvents=مراجعة الأحداث ListOfSecurityEvents=قائمة الأحداث الأمنية Dolibarr -SecurityEventsPurged=Security events purged +SecurityEventsPurged=رویدادهای امنیتی پاکسازی LogEventDesc=هنا يمكنك تمكين قطع الأشجار لDolibarr الأحداث الأمنية. يمكن للمشرفين ثم انظر مضمونه عبر نظام القائمة أدوات -- لمراجعة الحسابات. محذرا من أن هذه الميزة يمكن أن تستهلك كمية كبيرة من البيانات في قاعدة البيانات. AreaForAdminOnly=هذه الميزات يمكن أن تستخدم من قبل مدير المستخدمين فقط. SystemInfoDesc=نظام المعلومات المتنوعة المعلومات التقنية تحصل في قراءة فقط وواضحة للمشرفين فقط. @@ -937,7 +943,7 @@ TriggerDisabledAsModuleDisabled=يتسبب في تعطيل هذه الصورة TriggerAlwaysActive=يطلق في هذا الملف هي حركة دائمة ، وتفعيل ما هي وحدات Dolibarr. TriggerActiveAsModuleActive=يطلق في هذا الملف كما ينشط حدة تمكين ٪ ق. GeneratedPasswordDesc=هنا تعريف القاعدة التي تريد استخدامه لكلمة السر اذا كنت أسأل لصناعة السيارات ولدت كلمة السر -DictionaryDesc=Define here all reference datas. You can complete predefined value with yours. +DictionaryDesc=تعریف در اینجا تمام دادهها مرجع. شما می توانید مقدار از پیش تعریف شده با شما کامل است. ConstDesc=تسمح لك هذه الصفحة لتحرير جميع البارامترات الأخرى غير المتوفرة في الصفحات السابقة. فهي محفوظة لمعايير متقدمة للمطورين أو troubleshouting. OnceSetupFinishedCreateUsers=تحذير فأنت Dolibarr مدير المستخدم. مدير المستخدمين تستخدم لإعداد Dolibarr. لالمعتاد استخدام Dolibarr ، يوصى باستخدام غير مستخدم مدير خلق مجموعات من المستخدمين & القائمة. MiscellaneousDesc=هنا تعريف جميع البارامترات الأخرى ذات الصلة بالأمن. @@ -959,11 +965,11 @@ BackupDesc2=* حفظ الوثائق محتوى الدليل (٪) والذ BackupDesc3=* حفظ محتوى قاعدة البيانات مع نفايات. لهذا ، يمكنك استخدام التالية مساعد. BackupDescX=الأرشيف دليل ينبغي أن تحفظ في مكان آمن. BackupDescY=وقد ولدت وينبغي التخلص من الملفات المخزنة في مكان آمن. -BackupPHPWarning=Backup can't be guaranted with this method. Prefer previous one +BackupPHPWarning=پشتیبان گیری می توانید با این روش نمی توان guaranted. ترجیح می دهند قبل RestoreDesc=Dolibarr لاستعادة النسخ الاحتياطي ، يجب عليك : RestoreDesc2=* استعادة ارشيف ملف (ملف مضغوط على سبيل المثال) للوثائق ودليل لانتزاع شجرة الملفات في دليل وثائق جديدة أو Dolibarr تركيب هذه الوثائق الحالية directoy (٪). RestoreDesc3=* استعادة البيانات ، احتياطية من إلقاء الملف في قاعدة البيانات من جديد Dolibarr تركيب أو في قاعدة البيانات الحالية لهذا التثبيت. تحذير ، بعد الانتهاء من اعادة ، يجب استخدام ادخل كلمة السر ، التي كانت موجودة عندما تم احتياطية ، لربط جديد. النسخ الاحتياطي لاستعادة قاعدة بيانات في هذا التركيب الحالي ، يمكنك اتباع هذه مساعدا. -RestoreMySQL=MySQL import +RestoreMySQL=واردات خروجی زیر ForcedToByAModule= هذه القاعدة ق ٪ الى جانب تفعيل وحدة PreviousDumpFiles=متاح تفريغ النسخ الاحتياطي ملفات قاعدة البيانات WeekStartOnDay=اولین روز از هفته @@ -972,66 +978,66 @@ YouMustRunCommandFromCommandLineAfterLoginToUser=يجب تشغيل هذا الأ YourPHPDoesNotHaveSSLSupport=وظائف خدمة تصميم المواقع لا تتوفر في بي الخاص بك DownloadMoreSkins=مزيد من جلود بتحميل SimpleNumRefModelDesc=عودة الرقم المرجعي للتنسيق مع nnnn - ٪ syymm ث ث حيث هي السنة ، هو شهر ملم وnnnn هو تسلسل بدون ثقب ودون إعادة تعيين -ShowProfIdInAddress=Show professionnal id with addresses on documents -ShowVATIntaInAddress=Hide VAT Intra num with addresses on documents -TranslationUncomplete=Partial translation -SomeTranslationAreUncomplete=Some languages may be partially translated or may contains errors. If you detect some, you can fix language files registering to http://transifex.com/projects/p/dolibarr/. -MenuUseLayout=Make vertical menu hidable (option javascript must not be disabled) -MAIN_DISABLE_METEO=Disable meteo view -TestLoginToAPI=Test login to API -ProxyDesc=Some features of Dolibarr need to have an Internet access to work. Define here parameters for this. If the Dolibarr server is behind a Proxy server, those parameters tells Dolibarr how to access Internet through it. -ExternalAccess=External access -MAIN_PROXY_USE=Use a proxy server (otherwise direct access to internet) -MAIN_PROXY_HOST=Name/Address of proxy server -MAIN_PROXY_PORT=Port of proxy server -MAIN_PROXY_USER=Login to use the proxy server -MAIN_PROXY_PASS=Password to use the proxy server -DefineHereComplementaryAttributes=Define here all attributes, not already available by default, and that you want to be supported for %s. -ExtraFields=Complementary attributes -ExtraFieldsLines=Complementary attributes (lines) -ExtraFieldsThirdParties=Complementary attributes (thirdparty) -ExtraFieldsContacts=Complementary attributes (contact/address) -ExtraFieldsMember=Complementary attributes (member) -ExtraFieldsMemberType=Complementary attributes (member type) -ExtraFieldsCustomerOrders=Complementary attributes (orders) -ExtraFieldsCustomerInvoices=Complementary attributes (invoices) -ExtraFieldsSupplierOrders=Complementary attributes (orders) -ExtraFieldsSupplierInvoices=Complementary attributes (invoices) -ExtraFieldsProject=Complementary attributes (projects) -ExtraFieldsProjectTask=Complementary attributes (tasks) -ExtraFieldHasWrongValue=Attribut %s has a wrong value. -AlphaNumOnlyCharsAndNoSpace=only alphanumericals characters without space -AlphaNumOnlyLowerCharsAndNoSpace=only alphanumericals and lower case characters without space -SendingMailSetup=Setup of sendings by email -SendmailOptionNotComplete=Warning, on some Linux systems, to send email from your email, sendmail execution setup must contains option -ba (parameter mail.force_extra_parameters into your php.ini file). If some recipients never receive emails, try to edit this PHP parameter with mail.force_extra_parameters = -ba). +ShowProfIdInAddress=نمایش شناسه professionnal با آدرس در اسناد +ShowVATIntaInAddress=مخفی کردن مالیات بر ارزش افزوده تعداد داخل با آدرس در اسناد +TranslationUncomplete=ترجمه جزئی +SomeTranslationAreUncomplete=بعضی از زبان های ممکن است تا حدی ترجمه شده و یا ممکن است دارای خطا است. اگر شما تشخیص برخی، شما می توانید فایل های زبان از ثبت نام به رفع http://transifex.com/projects/p/dolibarr/ . +MenuUseLayout=را hidable منو عمودی (گزینه جاوا اسکریپت باید غیر فعال نمی شود) +MAIN_DISABLE_METEO=غیر فعال کردن دیدگاه هواشناسی +TestLoginToAPI=ورود به سیستم تست به API +ProxyDesc=برخی از ویژگی های Dolibarr نیاز به دسترسی به اینترنت به کار می کنند. تعریف در اینجا پارامتر ها را برای این. اگر سرور Dolibarr است در پشت یک پروکسی سرور، این پارامترها Dolibarr می گوید که چگونه برای دسترسی به اینترنت از طریق آن. +ExternalAccess=دسترسی خارجی +MAIN_PROXY_USE=استفاده از یک پروکسی سرور (دسترسی در غیر این صورت مستقیم به اینترنت) +MAIN_PROXY_HOST=نام / آدرس پروکسی سرور +MAIN_PROXY_PORT=بندر از پروکسی سرور +MAIN_PROXY_USER=ورود به استفاده از پروکسی سرور +MAIN_PROXY_PASS=رمز عبور به استفاده از پروکسی سرور +DefineHereComplementaryAttributes=تعریف در اینجا تمام صفات، در حال حاضر به طور پیش فرض در دسترس نیست، و این که شما می خواهید برای٪ s پشتیبانی می شود. +ExtraFields=ویژگی های مکمل +ExtraFieldsLines=ویژگی های مکمل (خط) +ExtraFieldsThirdParties=ویژگی های مکمل (thirdparty) +ExtraFieldsContacts=ویژگی های مکمل (تماس / آدرس) +ExtraFieldsMember=ویژگی های مکمل (عضو) +ExtraFieldsMemberType=ویژگی های مکمل (نوع عضو) +ExtraFieldsCustomerOrders=ویژگی های مکمل (سفارشات) +ExtraFieldsCustomerInvoices=ویژگی های مکمل (فاکتورها) +ExtraFieldsSupplierOrders=ویژگی های مکمل (سفارشات) +ExtraFieldsSupplierInvoices=ویژگی های مکمل (فاکتورها) +ExtraFieldsProject=ویژگی های مکمل (پروژه ها) +ExtraFieldsProjectTask=ویژگی های مکمل (وظایف) +ExtraFieldHasWrongValue=Attribute %s has a wrong value. +AlphaNumOnlyCharsAndNoSpace=فقط alphanumericals بی فضا +AlphaNumOnlyLowerCharsAndNoSpace=فقط alphanumericals و شخصیت های حروف کوچک و بدون فضا +SendingMailSetup=راه اندازی sendings توسط ایمیل +SendmailOptionNotComplete=اخطار، در برخی از سیستم های لینوکس، برای ارسال ایمیل از ایمیل شما، از sendmail باید راه اندازی حکم اعدام گزینه-BA (mail.force_extra_parameters پارامتر به یک فایل php.ini خود را). اگر برخی از دریافت کنندگان هرگز ایمیل های دریافت، سعی کنید به ویرایش این پارامتر PHP با mail.force_extra_parameters =-BA). PathToDocuments=مسیر اسناد PathDirectory=دایرکتوری -SendmailOptionMayHurtBuggedMTA=Feature to send mails using method "PHP mail direct" will generate a mail message that might be not correctly parsed by some receiving mail servers. Result is that some mails can't be read by people hosted by thoose bugged platforms. It's case for some Internet providers (Ex: Orange in France). This is not a problem into Dolibarr nor into PHP but onto receiving mail server. You can however add option MAIN_FIX_FOR_BUGGED_MTA to 1 into setup - other to modify Dolibarr to avoid this. However, you may experience problem with other servers that respect strictly the SMTP standard. The other solution (recommanded) is to use the method "SMTP socket library" that has no disadvantages. -TranslationSetup=Configuration de la traduction -TranslationDesc=Choice of language visible on screen can be modified:
    * Globally from menu Home - Setup - Display
    * For user only from tab User display of user card (click on login on top of screen). -TotalNumberOfActivatedModules=Total number of activated feature modules: %s -YouMustEnableOneModule=You must at least enable 1 module -ClassNotFoundIntoPathWarning=Class %s not found into PHP path -YesInSummer=Yes in summer -OnlyFollowingModulesAreOpenedToExternalUsers=Note, only following modules are opened to external users (whatever are permission of such users): -SuhosinSessionEncrypt=Session storage encrypted by Suhosin -ConditionIsCurrently=Condition is currently %s -TestNotPossibleWithCurrentBrowsers=Automatic detection not possible -YouUseBestDriver=You use driver %s that is best driver available currently. -YouDoNotUseBestDriver=You use drive %s but driver %s is recommanded. -NbOfProductIsLowerThanNoPb=You have only %s products/services into database. This does not required any particular optimization. -SearchOptim=Search optimization -YouHaveXProductUseSearchOptim=You have %s product into database. You should add the constant PRODUCT_DONOTSEARCH_ANYWHERE to 1 into Home-Setup-Other, you limit the search to the beginning of strings making possible for database to use index and you should get an immediate response. -BrowserIsOK=You are using the web browser %s. This browser is ok for security and performance. -BrowserIsKO=You are using the web browser %s. This browser is known to be a bad choice for security, performance and reliability. We recommand you to use Firefox, Chrome, Opera or Safari. -XDebugInstalled=XDebug est chargé. -XCacheInstalled=XCache is loaded. -AddRefInList=Display customer/supplier ref into list (select list or combobox) and most of hyperlink -FieldEdition=Edition of field %s -FixTZ=TimeZone fix -FillThisOnlyIfRequired=Example: +2 (fill only if timezone offset problems are experienced) -GetBarCode=Get barcode -EmptyNumRefModelDesc=The code is free. This code can be modified at any time. +SendmailOptionMayHurtBuggedMTA=قابلیت ارسال ایمیل با استفاده از روش "پست الکترونیکی PHP مستقیم" به یک پیام پست الکترونیک است که ممکن است به درستی از سوی برخی از سرویس دهنده پست الکترونیکی گیرنده تجزیه نه. نتیجه این است که چند نامه می تواند توسط افراد به میزبانی thoose سیستم عامل bugged خوانده شوند. (: نارنجی در فرانسه سابق) این پرونده برای برخی از ارائه دهندگان اینترنت است. این مشکل به Dolibarr و نه به PHP اما بر روی دریافت میل سرور نیست. با این حال شما می توانید MAIN_FIX_FOR_BUGGED_MTA گزینه اضافه به 1 به نصب - دیگر برای تغییر Dolibarr برای جلوگیری از این. با این حال، شما ممکن است مشکل با سرور های دیگر که به شدت استاندارد SMTP احترام را تجربه کنند. راه حل دیگر (توصیه) استفاده از روش "کتابخانه سوکت SMTP" است که هیچ معایب. +TranslationSetup=پیکربندی د لا traduction +TranslationDesc=انتخاب زبان بر روی صفحه نمایش قابل مشاهده است می تواند اصلاح شود:
    * در سطح جهانی را از منوی صفحه اصلی - راه اندازی - نمایش
    * برای کاربر تنها از تب صفحه نمایش کاربر از کارت کاربر (در ورود در بالای صفحه کلیک کنید). +TotalNumberOfActivatedModules=مجموع ماژول ها از ویژگی های فعال:٪ s را +YouMustEnableOneModule=شما باید حداقل قادر می سازد 1 ماژول +ClassNotFoundIntoPathWarning=کلاس٪ s ​​را به مسیر PHP یافت نشد +YesInSummer=بله در فصل تابستان +OnlyFollowingModulesAreOpenedToExternalUsers=توجه داشته باشید، فقط ماژول های زیر را به کاربران خارجی (هر چه باشد اجازه چنین کاربران) باز: +SuhosinSessionEncrypt=ذخیره سازی جلسه رمز شده توسط Suhosin +ConditionIsCurrently=وضعیت در حال حاضر از٪ s +TestNotPossibleWithCurrentBrowsers=تشخیص خودکار امکان پذیر نمی باشد +YouUseBestDriver=شما با استفاده از راننده٪ است که بهترین راننده های موجود در حال حاضر. +YouDoNotUseBestDriver=You use drive %s but driver %s is recommended. +NbOfProductIsLowerThanNoPb=شما فقط٪ محصولات / خدمات را به پایگاه داده باشد. این به این مورد نیاز هر بهینه سازی خاص است. +SearchOptim=بهینه سازی جستجو +YouHaveXProductUseSearchOptim=شما محصول٪ s را به پایگاه داده باشد. شما باید PRODUCT_DONOTSEARCH_ANYWHERE ثابت تا 1 را به خانه، راه اندازی، دیگر اضافه کنید، شما جستجو را محدود به ابتدای رشته های ساخت ممکن است برای پایگاه داده برای استفاده از شاخص و شما باید پاسخ فوری دریافت کنید. +BrowserIsOK=شما با استفاده از مرورگر وب از٪ s. این مرورگر خوب برای امنیت و عملکرد است. +BrowserIsKO=شما با استفاده از مرورگر وب از٪ s. این مرورگر شناخته شده است به یک انتخاب بد برای امنیت، عملکرد و قابلیت اطمینان. ما recommand شما را به استفاده از فایرفاکس، کروم، اپرا و یا سافاری. +XDebugInstalled=XDebug is loaded. +XCacheInstalled=XCache بارگذاری شده است. +AddRefInList=نمایش مشتری / تامین کننده کد عکس را به لیست (لیست و یا جعبهترکیب را انتخاب کنید) و بیشتر از لینک +FieldEdition=نسخه فیلد٪ s +FixTZ=ثابت منطقه زمانی +FillThisOnlyIfRequired=به عنوان مثال: +2 (را پر کنید فقط اگر منطقه زمانی جبران مشکلات با تجربه هستند) +GetBarCode=دریافت بارکد +EmptyNumRefModelDesc=کد آزاد است. این کد را می توان در هر زمان تغییر یافتهاست. ##### Module password generation PasswordGenerationStandard=عودة كلمة سر ولدت الداخلية وفقا لخوارزمية Dolibarr : 8 أحرف مشتركة تتضمن الأرقام والحروف في حرف صغير. PasswordGenerationNone=لا توحي بأي كلمة المرور المتولدة. يجب أن تكون كلمة السر في نوع يدويا. @@ -1048,18 +1054,18 @@ UserMailRequired=مطلوب بريد إلكتروني لإنشاء مستخدم CompanySetup=وحدة الإعداد للشركات CompanyCodeChecker=نموذج للجيل الثالث لقانون الأحزاب ومراجعة (عميل أو مورد) AccountCodeManager=رمز وحدة لتوليد المحاسبة (عميل أو مورد) -ModuleCompanyCodeAquarium=Return an accountancy code built by:
    %s followed by third party supplier code for a supplier accountancy code,
    %s followed by third party customer code for a customer accountancy code. +ModuleCompanyCodeAquarium=بازگشت یک کد حسابداری ساخته شده توسط:
    ٪ s را به دنبال شخص ثالث کد منبع برای کد منبع حسابداری،
    ٪ s را پس از کد مشتری شخص ثالث برای یک کد حسابداری مشتری می باشد. ModuleCompanyCodePanicum=العودة فارغة مدونة المحاسبة. ModuleCompanyCodeDigitaria=قانون المحاسبة طرف ثالث يعتمد على الرمز. الشفرة تتكون من طابع "جيم" في المركز الأول يليه 5 الحروف الأولى من طرف ثالث المدونة. UseNotifications=استخدام الإخطارات NotificationsDesc=إشعارات البريد الإلكتروني ميزة تسمح لك صمت إرسال البريد الآلي ، وبالنسبة لبعض الأحداث Dolibarr ، لأطراف ثالثة (العملاء أو الموردين) التي هي لتهيئتها. اختيار نشط الاشعار الاتصالات واعتماد أهداف واحدة لطرف ثالث في الوقت المناسب. ModelModules=وثائق قوالب -DocumentModelOdt=Generate documents from OpenDocuments templates (.ODT or .ODS files for OpenOffice, KOffice, TextEdit,...) +DocumentModelOdt=تولید اسناد از OpenDocuments قالب (. ODT و یا فایل های ODS برای آفیس اپن سورس کنند، KOffice، TextEdit، ...) WatermarkOnDraft=علامة مائية على مشروع الوثيقة -CompanyIdProfChecker=Rules on Professional Ids -MustBeUnique=Must be unique ? -MustBeMandatory=Mandatory to create third parties ? -MustBeInvoiceMandatory=Mandatory to validate invoices ? +CompanyIdProfChecker=قوانین در حرفه شناسه +MustBeUnique=باید منحصر به فرد باشد؟ +MustBeMandatory=اجباری برای ایجاد اشخاص ثالث؟ +MustBeInvoiceMandatory=اجباری به اعتبار فاکتورها؟ Miscellaneous=متفرقات ##### Webcal setup ##### WebCalSetup=Webcalendar ربط الإعداد @@ -1073,7 +1079,7 @@ WebCalServer=خدمة استضافة قاعدة بيانات التقويم WebCalDatabaseName=اسم قاعدة البيانات WebCalUser=المستخدم من الوصول إلى قاعدة البيانات WebCalSetupSaved=أنقذ Webcalendar الإعداد بنجاح. -WebCalTestOk=علاقة الخادم '٪ ق' على قاعدة البيانات '٪ ق' مستخدم '٪ ق' ناجحة. +WebCalTestOk=Connection to server '%s' on database '%s' with user '%s' successful. WebCalTestKo1=علاقة الخادم '٪ ق' تنجح ولكن قاعدة البيانات '٪ ق' لا يمكن التوصل إليها. WebCalTestKo2=علاقة الخادم '٪ ق' مستخدم '٪ ق' فشلت. WebCalErrorConnectOkButWrongDatabase=نجح الصدد ولكن قاعدة البيانات لا يبدو أن Webcalendar في قاعدة البيانات. @@ -1101,7 +1107,7 @@ EnableEditDeleteValidInvoice=تتيح إمكانية تعديل أو حذف صح SuggestPaymentByRIBOnAccount=وتشير دفع سحب على حساب SuggestPaymentByChequeToAddress=وتشير إلى دفع الشيكات FreeLegalTextOnInvoices=نص حر على الفواتير -WatermarkOnDraftInvoices=Watermark on draft invoices (none if empty) +WatermarkOnDraftInvoices=تعیین میزان مد آب در پیش نویس فاکتورها (هیچ اگر خالی) ##### Proposals ##### PropalSetup=وحدة إعداد مقترحات تجارية CreateForm=خلق أشكال @@ -1114,15 +1120,15 @@ AddShippingDateAbility=إضافة قدرة الشحن والتاريخ AddDeliveryAddressAbility=إضافة قدرة تاريخ التسليم UseOptionLineIfNoQuantity=خط من المنتجات / الخدمات ذات الصفر المبلغ يعتبر خيارا FreeLegalTextOnProposal=نص تجارية حرة على مقترحات -WatermarkOnDraftProposal=Watermark on draft commercial proposals (none if empty) +WatermarkOnDraftProposal=تعیین میزان مد آب در پیش نویس طرح تجاری (هیچ اگر خالی) ##### Orders ##### OrdersSetup=أوامر إدارة الإعداد OrdersNumberingModules=أوامر الترقيم نمائط OrdersModelModule=وثائق من أجل النماذج -HideTreadedOrders=إخفاء أو معاملة الغاء الاوامر في قائمة +HideTreadedOrders=Hide the treated or cancelled orders in the list ValidOrderAfterPropalClosed=للمصادقة على النظام بعد اقتراح أوثق ، لا يجعل من الممكن للخطوة من جانب النظام المؤقت FreeLegalTextOnOrders=بناء على أوامر النص الحر -WatermarkOnDraftOrders=Watermark on draft orders (none if empty) +WatermarkOnDraftOrders=تعیین میزان مد آب به دستور پیش نویس (هیچ اگر خالی) ##### Clicktodial ##### ClickToDialSetup=انقر لإعداد وحدة الاتصال الهاتفي ClickToDialUrlDesc=ودعا الموقع عندما تنقر على الهاتف picto ذلك. Dans l' رابط ، vous pouvez utiliser ليه balises
    ٪ ٪ 1 $ ق qui الأمصال remplacé قدم المساواة جنيه téléphone دي l' appelé
    ٪ ٪ 2 $ ق qui الأمصال remplacé لو قدم المساواة téléphone دي l' appelant جنيه مصري vôtre)
    ٪ ٪ ل 3 دولار qui الأمصال remplacé vôtre ادخل clicktodial الفقرة (défini سور vôtre فيشه utilisateur)
    ٪ ٪ 4 $ ق qui الأمصال remplacé الفقرة vôtre يذكره دي clicktodial عتيق (défini سور vôtre فيشه utilisateur). @@ -1133,18 +1139,18 @@ InterventionsSetup=وحدة التدخل الإعداد FreeLegalTextOnInterventions=حرر النص على وثائق التدخل FicheinterNumberingModules=الترقيم وحدات التدخل TemplatePDFInterventions=تدخل بطاقة نماذج الوثائق -WatermarkOnDraftInterventionCards=Watermark on intervention card documents (none if empty) +WatermarkOnDraftInterventionCards=تعیین میزان مد آب در اسناد کارت مداخله (هیچ اگر خالی) ##### Contracts ##### -ContractsSetup=Contracts module setup -ContractsNumberingModules=Contracts numbering modules -TemplatePDFContracts=Contracts documents models -FreeLegalTextOnContracts=Free text on contracts -WatermarkOnDraftContractCards=Watermark on draft contracts (none if empty) +ContractsSetup=راه اندازی ماژول قراردادها +ContractsNumberingModules=قرارداد شماره ماژول ها +TemplatePDFContracts=اسناد قرارداد مدل +FreeLegalTextOnContracts=متن رایگان در قرارداد +WatermarkOnDraftContractCards=تعیین میزان مد آب در پیش نویس قرارداد (هیچ اگر خالی) ##### Members ##### MembersSetup=أعضاء وحدة الإعداد MemberMainOptions=الخيارات الرئيسية AddSubscriptionIntoAccount=إضافة إلى الاشتراك في حساب مصرفي أو نقدا ، وحدة مصرفية -AdherentLoginRequired= Manage a Login for each member +AdherentLoginRequired= مدیریت ورود برای هر عضو AdherentMailRequired=البريد الإلكتروني المطلوب لإنشاء عضو جديد MemberSendInformationByMailByDefault=مربع لإرسال الرسائل للأعضاء تأكيدا على افتراضي ##### LDAP setup ##### @@ -1208,15 +1214,15 @@ LDAPTestSynchroContact=اختبار الاتصال 'sالتزامن LDAPTestSynchroUser=تجربة المستخدم التزامن LDAPTestSynchroGroup=اختبار المجموعة التزامن LDAPTestSynchroMember=اختبار العضو التزامن -LDAPTestSearch= Test a LDAP search +LDAPTestSearch= تست یک جستجوی LDAP LDAPSynchroOK=تزامن اختبار ناجح LDAPSynchroKO=فشل تزامن الاختبار LDAPSynchroKOMayBePermissions=تزامن فشل الاختبار. تأكد من أن ارتباط لخادم تهيئتها بشكل صحيح ، ويسمح LDAP udpates LDAPTCPConnectOK=TCP connect to LDAP server successful (Server=%s, Port=ربط برنامج التعاون الفني لخادم LDAP ناجحة (٪ ق= خادم بورت= ٪) LDAPTCPConnectKO=TCP connect to LDAP server failed (Server=%s, Port=ربط برنامج التعاون الفني لخادم LDAP فشل (خادم ق= ٪ بورت= ٪) -LDAPBindOK=Connect/Authentificate to LDAP server sucessfull (Server=%s, Port=%s, Admin=%s, Password=ربط / Authentificate ناجحة لخادم LDAP (خادم ق= ٪ بورت= ٪ ق ، ق= ٪ الادارية ، كلمة المرور= ٪) +LDAPBindOK=Connect/Authentificate to LDAP server successful (Server=%s, Port=%s, Admin=%s, Password=%s) LDAPBindKO=Connect/Authentificate to LDAP server failed (Server=%s, Port=%s, Admin=%s, Password=ربط / Authentificate لخادم LDAP فشل (خادم ق= ٪ بورت= ٪ ق ، ق= ٪ الادارية ، كلمة المرور= ٪) -LDAPUnbindSuccessfull=فصل ناجحة +LDAPUnbindSuccessfull=Disconnect successful LDAPUnbindFailed=قطع فشل LDAPConnectToDNSuccessfull=الاتحاد الافريقي بصدد DN (٪) ري ¿½ ussie LDAPConnectToDNFailed=الاتحاد الافريقي بصدد DN (٪) ¿½ ï ¿½ ه chouï @@ -1250,253 +1256,253 @@ LDAPFieldHomePhone=رقم الهاتف الشخصي LDAPFieldHomePhoneExample=مثال ذلك : homephone LDAPFieldMobile=الهاتف الخليوي LDAPFieldMobileExample=مثال ذلك : الجوال -LDAPFieldFax=رقم الفاكس -LDAPFieldFaxExample=مثال ذلك : facsimiletelephonenumber -LDAPFieldAddress=الشارع -LDAPFieldAddressExample=على سبيل المثال : في الشارع -LDAPFieldZip=الرمز البريدي -LDAPFieldZipExample=مثلا : الرمز البريدي -LDAPFieldTown=مدينة -LDAPFieldTownExample=على سبيل المثال : ل -LDAPFieldCountry=قطر -LDAPFieldCountryExample=على سبيل المثال : (ج) -LDAPFieldDescription=وصف -LDAPFieldDescriptionExample=مثال ذلك : وصف -LDAPFieldGroupMembers= أعضاء الفريق -LDAPFieldGroupMembersExample= على سبيل المثال : uniqueMember -LDAPFieldBirthdate=تاريخ الميلاد -LDAPFieldBirthdateExample=على سبيل المثال : -LDAPFieldCompany=شركة -LDAPFieldCompanyExample=على سبيل المثال : س -LDAPFieldSid=سيد -LDAPFieldSidExample=مثال ذلك : objectsid -LDAPFieldEndLastSubscription=تاريخ انتهاء الاكتتاب -LDAPFieldTitle=وظيفة / وظيفة -LDAPFieldTitleExample=Example: title -LDAPParametersAreStillHardCoded=LDAP المعايير ما زالت hardcoded (الطبقة اتصال) -LDAPSetupNotComplete=LDAP الإعداد غير كاملة (على آخرين علامات التبويب) -LDAPNoUserOrPasswordProvidedAccessIsReadOnly=أي مدير أو كلمة السر. LDAP الوصول مجهولة وسيكون في قراءة فقط. -LDAPDescContact=تسمح لك هذه الصفحة لتحديد اسم LDAP الصفات LDAP شجرة في كل البيانات التي وجدت على Dolibarr الاتصالات. -LDAPDescUsers=تسمح لك هذه الصفحة لتحديد اسم LDAP الصفات LDAP شجرة في كل البيانات التي وجدت على Dolibarr المستخدمين. -LDAPDescGroups=تسمح لك هذه الصفحة لتحديد اسم LDAP الصفات LDAP شجرة في كل البيانات التي وجدت على Dolibarr. -LDAPDescMembers=تسمح لك هذه الصفحة لتحديد اسم LDAP الصفات LDAP شجرة في كل البيانات التي وجدت على Dolibarr أعضاء الوحدة. -LDAPDescValues=مثال قيم تهدف لOpenLDAP مع مخططات بعد تحميلها : core.schema ، cosine.schema ، inetorgperson.schema). إذا كنت تستخدم thoose القيم وOpenLDAP تعديل LDAP الخاص بك ملف slapd.conf لجميع مخططات thoose تحميله. -ForANonAnonymousAccess=لصحتها accès (لكتابة الحصول على سبيل المثال) -PerfDolibarr=Performance setup/optimizing report -YouMayFindPerfAdviceHere=You will find on this page some checks or advices related to performance. -NotInstalled=Not installed, so your server is not slow down by this. -ApplicativeCache=Applicative cache -MemcachedNotAvailable=No applicative cache found. You can enhance performance by installing a cache server Memcached and a module able to use this cache server.
    More information here http://wiki.dolibarr.org/index.php/Module_MemCached_EN.
    Note that a lot of web hosting provider does not provide such cache server. -MemcachedModuleAvailableButNotSetup=Module memcached for applicative cache found but setup of module is not complete. -MemcachedAvailableAndSetup=Module memcached dedicated to use memcached server is enabled. -OPCodeCache=OPCode cache -NoOPCodeCacheFound=No OPCode cache found. May be you use another OPCode cache than XCache or eAccelerator (good), may be you don't have OPCode cache (very bad). -HTTPCacheStaticResources=HTTP cache for static resources (css, img, javascript) -FilesOfTypeCached=Files of type %s are cached by HTTP server -FilesOfTypeNotCached=Files of type %s are not cached by HTTP server -FilesOfTypeCompressed=Files of type %s are compressed by HTTP server -FilesOfTypeNotCompressed=Files of type %s are not compressed by HTTP server -CacheByServer=Cache by server -CacheByClient=Cache by browser -CompressionOfResources=Compression of HTTP responses -TestNotPossibleWithCurrentBrowsers=Automatic detection not possible +LDAPFieldFax=شماره فکس +LDAPFieldFaxExample=به عنوان مثال: facsimiletelephonenumber +LDAPFieldAddress=خیابان +LDAPFieldAddressExample=به عنوان مثال: خیابان +LDAPFieldZip=زیپ +LDAPFieldZipExample=به عنوان مثال: کدپستی +LDAPFieldTown=شهر +LDAPFieldTownExample=به عنوان مثال: L +LDAPFieldCountry=کشور +LDAPFieldCountryExample=به عنوان مثال: ج +LDAPFieldDescription=توصیف +LDAPFieldDescriptionExample=به عنوان مثال: توضیحات +LDAPFieldGroupMembers= اعضای گروه +LDAPFieldGroupMembersExample= به عنوان مثال: uniqueMember +LDAPFieldBirthdate=تاریخ تولد +LDAPFieldBirthdateExample=به عنوان مثال: +LDAPFieldCompany=شرکت +LDAPFieldCompanyExample=به عنوان مثال: O +LDAPFieldSid=SID +LDAPFieldSidExample=به عنوان مثال: objectsid +LDAPFieldEndLastSubscription=تاریخ پایان اشتراک +LDAPFieldTitle=ارسال / تابع +LDAPFieldTitleExample=به عنوان مثال: عنوان +LDAPParametersAreStillHardCoded=LDAP parameters are still hardcoded (in contact class) +LDAPSetupNotComplete=راه اندازی LDAP کامل نیست (به به دیگران زبانه) +LDAPNoUserOrPasswordProvidedAccessIsReadOnly=هیچ مدیر یا کلمه عبور ارائه شده است. دسترسی LDAP ناشناس و در حالت فقط خواندنی خواهد بود. +LDAPDescContact=این صفحه به شما اجازه تعریف LDAP ویژگی نام در درخت LDAP برای هر یک از داده ها بر روی تماس های Dolibarr. +LDAPDescUsers=این صفحه به شما اجازه تعریف LDAP ویژگی نام در درخت LDAP برای هر یک از داده ها بر روی کاربران Dolibarr. +LDAPDescGroups=این صفحه به شما اجازه تعریف LDAP ویژگی نام در درخت LDAP برای هر یک از اطلاعات موجود در گروه Dolibarr. +LDAPDescMembers=این صفحه به شما اجازه تعریف LDAP ویژگی نام در درخت LDAP برای هر یک از داده های موجود در Dolibarr ماژول عضو دارد. +LDAPDescValues=ارزش به عنوان مثال برای OpenLDAP با زیر طرحواره لود طراحی: core.schema، cosine.schema، inetorgperson.schema). اگر شما استفاده از thoose ارزش ها و OpenLDAP، تغییر پیکربندی LDAP فایل slapd.conf خود را به تمام طرحواره thoose لود می شود. +ForANonAnonymousAccess=برای دسترسی تصدیق (برای دسترسی به عنوان مثال) +PerfDolibarr=گزارش راه اندازی عملکرد / بهینه سازی +YouMayFindPerfAdviceHere=شما در این صفحه برخی از چک و یا توصیه های مربوط به عملکرد پیدا کنید. +NotInstalled=نصب نشده است، به طوری که سرور شما توسط این نمی کند. +ApplicativeCache=کش کاربردی +MemcachedNotAvailable=بدون کش عملی در بر داشت. شما می توانید عملکرد با نصب کش Memcached سرور و ماژول قادر به استفاده از این کش سرور را بالا ببرد.
    اطلاعات بیشتر در اینجا http://wiki.dolibarr.org/index.php/Module_MemCached_EN .
    توجه داشته باشید که بسیاری از ارائه دهنده خدمات میزبانی وب چنین کش سرور ارائه نمی دهد. +MemcachedModuleAvailableButNotSetup=ماژول memcached برای ذخیره سازی عملی در بر داشت اما راه اندازی ماژول کامل نیست. +MemcachedAvailableAndSetup=memcached ماژول اختصاص داده شده به استفاده از سرور memcached را فعال کنید. +OPCodeCache=کش شناسنده +NoOPCodeCacheFound=بدون کش شناسنده یافت. ممکن است شما با استفاده از یکی دیگر از کش شناسنده از XCache یا eAccelerator (خوب)، ممکن است شما کش شناسنده (خیلی بد) ندارد. +HTTPCacheStaticResources=کش HTTP برای منابع استاتیک (css، img، جاوا اسکریپت) +FilesOfTypeCached=فایل های از نوع٪ s را با HTTP سرور ذخیره سازی +FilesOfTypeNotCached=فایل های از نوع٪ s را با HTTP سرور کش نشده +FilesOfTypeCompressed=فایل های از نوع٪ s را با HTTP سرور فشرده +FilesOfTypeNotCompressed=فایل های از نوع٪ s را با HTTP سرور فشرده نیست +CacheByServer=کش سرور +CacheByClient=کش شده توسط مرورگر +CompressionOfResources=فشرده سازی از پاسخهای HTTP +TestNotPossibleWithCurrentBrowsers=تشخیص خودکار امکان پذیر نمی باشد ##### Products ##### -ProductSetup=المنتجات وحدة الإعداد -ServiceSetup=Services module setup -ProductServiceSetup=Products and Services modules setup -NumberOfProductShowInSelect=Max number of products in combos select lists (0=الحد الأقصى لعدد من المنتجات في اختيار قوائم المجموعات (0= لا حدود) -ConfirmDeleteProductLineAbility=تأكيد عندما إزالة خطوط الإنتاج في الأشكال -ModifyProductDescAbility=الشخصي من الأشكال في وصف المنتج -ViewProductDescInFormAbility=تصور وصف المنتج في أشكال (ما المنبثقة tooltip) -ViewProductDescInThirdpartyLanguageAbility=Visualization of products descriptions in the thirdparty language -UseSearchToSelectProductTooltip=Also if you have a large number of product (> 100 000), you can increase speed by setting constant PRODUCT_DONOTSEARCH_ANYWHERE to 1 in Setup->Other. Search will then be limited to start of string. -UseSearchToSelectProduct=Use a search form to choose a product (rather than a drop-down list). -UseEcoTaxeAbility=الدعم الاقتصادي Taxe (WEEE) -SetDefaultBarcodeTypeProducts=النوع الافتراضي لاستخدام الباركود للمنتجات -SetDefaultBarcodeTypeThirdParties=النوع الافتراضي لاستخدام الباركود لأطراف ثالثة -ProductCodeChecker= Module for product code generation and checking (product or service) -ProductOtherConf= Product / Service configuration +ProductSetup=راه اندازی ماژول محصولات +ServiceSetup=راه اندازی خدمات ماژول +ProductServiceSetup=راه اندازی محصولات و خدمات ماژول ها +NumberOfProductShowInSelect=تعداد حداکثر از محصولات در combos را از لیست انتخاب کنید (0 = بدون محدودیت) +ConfirmDeleteProductLineAbility=تأییدیه زمانی که از بین بردن خطوط تولید در اشکال +ModifyProductDescAbility=شخصی از توصیف محصول در اشکال +ViewProductDescInFormAbility=تجسم از توصیف محصول در اشکال (در غیر این صورت به عنوان دوست پنجره) +ViewProductDescInThirdpartyLanguageAbility=تجسم از محصولات توصیف در زبان thirdparty +UseSearchToSelectProductTooltip=همچنین اگر شما تعداد زیادی از محصول (> 100 000)، شما می توانید سرعت با تنظیم PRODUCT_DONOTSEARCH_ANYWHERE ثابت به 1 در راه اندازی-> دیگر افزایش دهد. جست و جو خواهد شد و سپس محدود به شروع از رشته است. +UseSearchToSelectProduct=استفاده از یک فرم جستجو برای انتخاب یک محصول (و نه از لیست کشویی). +UseEcoTaxeAbility=پشتیبانی سازگار با محیط زیست Taxe (WEEE) +SetDefaultBarcodeTypeProducts=فرض نوع بارکد استفاده برای محصولات +SetDefaultBarcodeTypeThirdParties=فرض نوع بارکد استفاده برای اشخاص ثالث +ProductCodeChecker= ماژول برای تولید کد محصول و چک کردن (محصول یا خدمات) +ProductOtherConf= پیکربندی محصولات / خدمات ##### Syslog ##### -SyslogSetup=Syslog حدة الإعداد -SyslogOutput=سجل الناتج +SyslogSetup=راه اندازی ماژول گزارش ها +SyslogOutput=گزارش خروجی SyslogSyslog=Syslog -SyslogFacility=مرفق -SyslogLevel=المستوى -SyslogSimpleFile=ملف -SyslogFilename=اسم الملف ومسار -YouCanUseDOL_DATA_ROOT=يمكنك استخدام DOL_DATA_ROOT / dolibarr.log لملف الدخول في Dolibarr "وثائق" دليل. يمكنك أن تحدد مسارا مختلفا لتخزين هذا الملف. -ErrorUnknownSyslogConstant=ق المستمر ٪ ليست معروفة syslog مستمر -OnlyWindowsLOG_USER=Windows only supports LOG_USER +SyslogFacility=امکان +SyslogLevel=سطح +SyslogSimpleFile=پرونده +SyslogFilename=نام فایل و مسیر +YouCanUseDOL_DATA_ROOT=شما می توانید DOL_DATA_ROOT / dolibarr.log برای یک فایل در "اسناد" Dolibarr دایرکتوری استفاده کنید. شما می توانید راه های مختلفی را برای ذخیره این فایل را. +ErrorUnknownSyslogConstant=٪ ثابت است ثابت های Syslog شناخته نشده است +OnlyWindowsLOG_USER=ویندوز تنها پشتیبانی از LOG_USER ##### Donations ##### -DonationsSetup=وحدة الإعداد للتبرع -DonationsReceiptModel=قالب من استلام التبرع +DonationsSetup=راه اندازی ماژول کمک مالی +DonationsReceiptModel=الگو از دریافت کمک مالی ##### Barcode ##### -BarcodeSetup=الباركود الإعداد -PaperFormatModule=شكل وحدة طباعة -BarcodeEncodeModule=نوع ترميز الباركود -UseBarcodeInProductModule=يمنع استخدام الرموز للمنتجات -CodeBarGenerator=مولد الباركود -ChooseABarCode=مولد لا يعرف -FormatNotSupportedByGenerator=الشكل لا تدعمها هذه المولدات -BarcodeDescEAN8=الباركود من نوع EAN8 -BarcodeDescEAN13=الباركود من نوع EAN13 -BarcodeDescUPC=الباركود نوع من اتحاد الوطنيين الكونغوليين -BarcodeDescISBN=الباركود من نوع ردمك -BarcodeDescC39=الباركود من نوع C39 -BarcodeDescC128=الباركود من نوع C128 -GenbarcodeLocation=باركود الجيل سطر أداة تستخدمها phpbarcode المحرك لبعض أنواع باركود) -BarcodeInternalEngine=Internal engine -BarCodeNumberManager=Manager to auto define barcode numbers +BarcodeSetup=راه اندازی بارکد +PaperFormatModule=ماژول فرمت چاپ +BarcodeEncodeModule=نوع پشتیبانی می کند بارکد +UseBarcodeInProductModule=استفاده از بارکد برای محصولات +CodeBarGenerator=ژنراتور بارکد +ChooseABarCode=هیچ ژنراتور تعریف +FormatNotSupportedByGenerator=نوع های این ژنراتور پشتیبانی نمی شود +BarcodeDescEAN8=بارکد از نوع EAN8 +BarcodeDescEAN13=بارکد از نوع EAN13 +BarcodeDescUPC=بارکد از نوع UPC +BarcodeDescISBN=بارکد از نوع ISBN +BarcodeDescC39=بارکد از نوع C39 +BarcodeDescC128=بارکد از نوع C128 +GenbarcodeLocation=تولید کد نوار ابزار خط فرمان (استفاده شده توسط موتور داخلی برای برخی از انواع بارکد) +BarcodeInternalEngine=موتور داخلی +BarCodeNumberManager=مدیر به صورت خودکار تعریف اعداد بارکد ##### Prelevements ##### -WithdrawalsSetup=انسحاب وحدة الإعداد +WithdrawalsSetup=راه اندازی ماژول برداشت ##### ExternalRSS ##### -ExternalRSSSetup=RSS الواردات الخارجية الإعداد -NewRSS=الجديد تغذية RSS -RSSUrl=RSS URL -RSSUrlExample=An interesting RSS feed +ExternalRSSSetup=خارجی راه اندازی واردات RSS +NewRSS=خوراک RSS جدید +RSSUrl=URL RSS +RSSUrlExample=خوراک RSS جالب ##### Mailing ##### -MailingSetup=إعداد وحدة الارسال بالبريد الالكتروني -MailingEMailFrom=مرسل البريد الالكتروني (من) لرسائل البريد الإلكتروني التي بعث بها وحدة الإنترنت -MailingEMailError=بريد إلكتروني العودة (إلى أخطاء) لرسائل البريد الإلكتروني مع الأخطاء +MailingSetup=ایمیل راه اندازی ماژول +MailingEMailFrom=پست الکترونیکی فرستنده (از) برای ایمیل های فرستاده شده توسط ایمیل ماژول +MailingEMailError=ایمیل بازگشت (خطاها به) برای ایمیل با اشتباهات ##### Notification ##### -NotificationSetup=الإخطار بو الإعداد وحدة البريد الإلكتروني -NotificationEMailFrom=مرسل البريد الالكتروني (من) لإرسال رسائل البريد الإلكتروني لالإخطارات -ListOfAvailableNotifications=List of available notifications (This list depends on activated modules) +NotificationSetup=بو هشدار از طریق راه اندازی ماژول ایمیل +NotificationEMailFrom=پست الکترونیکی فرستنده (از) برای ایمیل های ارسال شده اطلاعیه +ListOfAvailableNotifications=فهرست اطلاعیه در دسترس است (این لیست بستگی به ماژول های فعال) ##### Sendings ##### -SendingsSetup=ارسال وحدة الإعداد -SendingsReceiptModel=ارسال استلام نموذج -SendingsNumberingModules=Sendings numbering modules -SendingsAbility=دعم الإرسال صحائف تسليم العميل -NoNeedForDeliveryReceipts=في معظم الحالات ، تستخدم الإرسال إيصالات سواء صحائف لتسليم العميل (قائمة المنتجات ارسال) ، وصحائف التي وقعت عليها recevied الزبون. حتى المنتج تسليم الإيصالات هي سمة مزدوجة ونادرا ما تفعيلها. -FreeLegalTextOnShippings=Free text on shippings +SendingsSetup=در حال ارسال راه اندازی ماژول +SendingsReceiptModel=ارسال مدل رسید +SendingsNumberingModules=Sendings تعداد ماژول ها +SendingsAbility=sendings پشتیبانی ورق برای تحویل به مشتری +NoNeedForDeliveryReceipts=در اغلب موارد، sendings رسید هر دو به عنوان ورق برای تحویل به مشتری (لیستی از محصولات برای ارسال) و ورق است که recevied و امضا شده توسط مشتری استفاده می شود. بنابراین تحویل محصول رسید یکی از ویژگی های تکرار است و به ندرت فعال می شود. +FreeLegalTextOnShippings=متن رایگان در shippings ##### Deliveries ##### -DeliveryOrderNumberingModules=تلقي شحنات المنتجات الترقيم وحدة -DeliveryOrderModel=تلقي شحنات المنتجات النموذجية -DeliveriesOrderAbility=دعم المنتجات تسليم الإيصالات -FreeLegalTextOnDeliveryReceipts=نص حر بتسليم إيصالات +DeliveryOrderNumberingModules=محصولات تحویل رسید ماژول شماره +DeliveryOrderModel=محصولات تحویل مدل رسید +DeliveriesOrderAbility=پشتیبانی محصولات تحویل رسید +FreeLegalTextOnDeliveryReceipts=متن رایگان در رسید تحویل ##### FCKeditor ##### -AdvancedEditor=Advanced editor -ActivateFCKeditor=تفعيل FCKeditor ل: -FCKeditorForCompany=WYSIWIG إنشاء / الطبعة شركات ووصف المذكرة -FCKeditorForProduct=WYSIWIG إنشاء / الطبعة المنتجات / الخدمات ووصف المذكرة -FCKeditorForProductDetails=WYSIWIG إنشاء / الطبعة تفاصيل خطوط المنتجات لجميع الكيانات (المقترحات والأوامر والفواتير ، الخ...)
    تحذير : استخدام هذا الخيار بجدية recommanded لأنه لا يمكن أن تخلق مشاكل مع الأحرف الخاصة وبناء صفحة صيغة عندما الشعبي الملفات. -FCKeditorForMailing= WYSIWIG إنشاء / الطبعة بالبريد -FCKeditorForUserSignature=WYSIWIG creation/edition of user signature -FCKeditorForMail=WYSIWIG creation/edition for all mail (except Outils->eMailing) +AdvancedEditor=ویرایشگر پیشرفته +ActivateFCKeditor=فعال کردن ویرایشگر پیشرفته برای: +FCKeditorForCompany=ایجاد WYSIWIG / نسخه عناصر توضیحات و توجه داشته باشید (به جز محصولات / خدمات) +FCKeditorForProduct=ایجاد WYSIWIG / نسخه از محصولات / خدمات شرح و توجه داشته باشید +FCKeditorForProductDetails=ایجاد WYSIWIG / نسخه از محصولات جزئیات خطوط برای همه اشخاص (پیشنهادات، سفارشات، فاکتورها، و غیره ..) هشدار: با استفاده از این گزینه برای این مورد است که به طور جدی توصیه نه به عنوان آن می تواند مشکلاتی را با شخصیت های خاص و صفحه قالب بندی در هنگام ساختن PDF ایجاد کنید فایل های. +FCKeditorForMailing= ایجاد WYSIWIG / نسخه برای eMailings جرم (ابزار> ایمیل) +FCKeditorForUserSignature=ایجاد WYSIWIG / نسخه از امضای کاربر +FCKeditorForMail=ایجاد WYSIWIG / نسخه برای تمام نامه (به جز Outils-> ایمیل) ##### OSCommerce 1 ##### -OSCommerceErrorConnectOkButWrongDatabase=نجح الصدد ولكن قاعدة البيانات لا يبدو أن قاعدة بيانات OSCommerce (ق ٪ الرئيسية غير موجودة في الجدول ٪). -OSCommerceTestOk=علاقة الخادم '٪ ق' على قاعدة البيانات '٪ ق' مستخدم '٪ ق' ناجحة. -OSCommerceTestKo1=علاقة الخادم '٪ ق' تنجح ولكن قاعدة البيانات '٪ ق' لا يمكن التوصل إليها. -OSCommerceTestKo2=علاقة الخادم '٪ ق' مستخدم '٪ ق' فشلت. +OSCommerceErrorConnectOkButWrongDatabase=اتصال موفق پایگاه داده اما به نظر نمی آید که یک پایگاه داده آهنگ تولد (٪ بازدید کنندگان کلیدی در جدول٪ s را یافت نشد). +OSCommerceTestOk=اتصال به سرور '٪ s' را در پایگاه داده '٪ s' را با کاربر '٪ s' موفق. +OSCommerceTestKo1=اتصال به کارگزار «٪ s 'موفق اما پایگاه داده'٪ s 'را نمی تواند رسید. +OSCommerceTestKo2=اتصال به کارگزار «٪ s 'با کاربر'٪ s 'شکست خورده است. ##### Stock ##### -StockSetup=تكوين وحدة المخزون -UserWarehouse=استخدام الأرصدة الشخصية للمستخدم +StockSetup=سهام ماژول تنظیمات +UserWarehouse=استفاده از سهام شخصی کاربر ##### Menu ##### -MenuDeleted=حذف من القائمة -TreeMenu=شجرة القوائم -Menus=القوائم -TreeMenuPersonalized=شخصي قوائم -NewMenu=قائمة جديدة -MenuConf=إعداد القوائم -Menu=اختيار قائمة -MenuHandler=قائمة مناول -MenuModule=مصدر في وحدة -HideUnauthorizedMenu= Hide unauthorized menus (gray) -DetailId=معرف القائمة -DetailMenuHandler=قائمة المعالج حيث تظهر قائمة جديدة -DetailMenuModule=اسم وحدة قائمة في حال الدخول من وحدة -DetailType=نوع القائمة (أعلى أو إلى اليسار) -DetailTitre=قائمة علامة أو بطاقة رمز للترجمة -DetailMainmenu=المجموعة التي تنتمي إليها (العتيقة) -DetailUrl=عنوان القائمة حيث يرسل لك (عنوان الارتباط المطلق أو خارجية مع وصلة http://) -DetailLeftmenu=عرض شرط أو لا (العتيقة) -DetailEnabled=شرط أن لا تظهر أو الدخول -DetailRight=حالة رمادية غير مصرح بها للعرض القوائم -DetailLangs=لانغ لتسمية اسم ملف الترجمة مدونة -DetailUser=المتدرب / خارجي / الكل -Target=Target -DetailTarget=هدف وصلات (_blank كبار فتح نافذة جديدة) -DetailLevel=المستوى (-1 : الأعلى ، 0 : رأس القائمة ،> 0 القائمة والقائمة الفرعية) -ModifMenu=قائمة التغيير -DeleteMenu=حذف من القائمة الدخول -ConfirmDeleteMenu=هل أنت متأكد من أنك تريد حذف القائمة دخول ٪ ق؟ -DeleteLine=حذف السطر -ConfirmDeleteLine=هل أنت متأكد من أنك تريد حذف هذا الخط؟ +MenuDeleted=منوی حذف +TreeMenu=منوها درخت +Menus=منوها +TreeMenuPersonalized=منوهای شخصی +NewMenu=منو های جدید +MenuConf=راه اندازی منوها +Menu=انتخاب از منو +MenuHandler=منوی کنترل +MenuModule=ماژول منبع +HideUnauthorizedMenu= مخفی کردن منوها غیر مجاز (خاکستری) +DetailId=منو کد +DetailMenuHandler=که در آن منو کنترل برای نشان دادن منوی جدید +DetailMenuModule=نام ماژول در صورت ورود به منو از یک ماژول است +DetailType=نوع منو (بالا و یا سمت چپ) +DetailTitre=منوی برچسب و یا کد برچسب برای ترجمه +DetailMainmenu=گروه که به آن تعلق داشت (منسوخ شده) +DetailUrl=URL که منو شما ارسال (لینک URL مطلق و یا لینک های خارجی با http://) +DetailLeftmenu=شرایط نمایش یا نه (منسوخ شده) +DetailEnabled=شرایط برای نشان دادن و یا ورود نمی +DetailRight=وضعیت برای نمایش منوها خاکستری غیر مجاز +DetailLangs=نام فایل زبان برای ترجمه کد برچسب +DetailUser=کارورز / خارج / همه +Target=هدف +DetailTarget=هدف در پیوندهای (_blank بالا باز کردن یک پنجره جدید) +DetailLevel=سطح (-1: منوی بالای صفحه، 0: منو هدر،> 0 منو و زیر منو) +ModifMenu=تغییر منو +DeleteMenu=حذف ورود به منو +ConfirmDeleteMenu=آیا مطمئن هستید که می خواهید منو ورود به٪ s را حذف کنید؟ +DeleteLine=حذف خط +ConfirmDeleteLine=آیا مطمئن هستید که می خواهید این خط را حذف کنید؟ ##### Tax ##### -TaxSetup=الضرائب والمساهمات الاجتماعية والأرباح وحدة الإعداد -OptionVatMode=ضريبة القيمة المضافة المستحقة -OptionVATDefault=القياسية -OptionVATDebitOption=الخيار خدمات الخصم -OptionVatDefaultDesc=ومن المقرر ان ضريبة القيمة المضافة :
    -- التسليم / الدفع للسلع
    -- على دفع تكاليف الخدمات -OptionVatDebitOptionDesc=ومن المقرر ان ضريبة القيمة المضافة :
    -- التسليم / الدفع للسلع
    -- على الفاتورة (الخصم) للخدمات -SummaryOfVatExigibilityUsedByDefault=زمن افتراضي exigibility ضريبة القيمة المضافة وفقا لخيار choosed : +TaxSetup=مالیات، مشارکت اجتماعی و سود سهام راه اندازی ماژول +OptionVatMode=مالیات بر ارزش افزوده به دلیل +OptionVATDefault=استاندارد +OptionVATDebitOption=خدمات گزینه در اعتباری +OptionVatDefaultDesc=مالیات بر ارزش افزوده است به دلیل:
    - تحویل کالا (ما استفاده از تاریخ فاکتور)
    - در پرداختهای مربوط به خدمات +OptionVatDebitOptionDesc=مالیات بر ارزش افزوده است به دلیل:
    - تحویل کالا (ما استفاده از تاریخ فاکتور)
    - در فاکتور (بدهی) برای خدمات +SummaryOfVatExigibilityUsedByDefault=Time of VAT exigibility by default according to chosen option: OnDelivery=در هنگام تحویل -OnPayment=عن الدفع +OnPayment=در پرداخت OnInvoice=در هنگام قبض -SupposedToBePaymentDate=تاريخ الدفع المستخدمة اذا لم يعرف تاريخ التسليم -SupposedToBeInvoiceDate=Invoice date used +SupposedToBePaymentDate=تاریخ پرداخت استفاده می شود +SupposedToBeInvoiceDate=تاریخ فاکتور استفاده می شود Buy=خرید Sell=فروش -InvoiceDateUsed=Invoice date used -YourCompanyDoesNotUseVAT=وقد تم تسجيل شركة محددة لعدم استخدام ضريبة القيمة المضافة (الصفحة الرئيسية -- إعداد -- شركة / مؤسسة) ، لذلك لا يوجد خيارات لضريبة القيمة المضافة الإعداد. -AccountancyCode=Accountancy Code -AccountancyCodeSell=Sale account. code -AccountancyCodeBuy=Purchase account. code +InvoiceDateUsed=تاریخ فاکتور استفاده می شود +YourCompanyDoesNotUseVAT=شرکت شما تعریف شده مالیات بر ارزش افزوده (صفحه اصلی - راه اندازی - شرکت / بنیاد) استفاده نمی کند، بنابراین هیچ گزینه های مالیات بر ارزش افزوده به نصب وجود دارد. +AccountancyCode=حسابداری کد +AccountancyCodeSell=حساب فروش. رمز +AccountancyCodeBuy=خرید حساب. رمز ##### Agenda ##### -AgendaSetup=جدول الأعمال وحدة الإعداد -PasswordTogetVCalExport=مفتاح ربط تصدير تأذن -PastDelayVCalExport=لا تصدر الحدث الأكبر من -AGENDA_USE_EVENT_TYPE=Use events types (managed into menu Setup -> Dictionnary -> Type of agenda events) +AgendaSetup=رویدادها و برنامه راه اندازی ماژول +PasswordTogetVCalExport=کلیدی به اجازه لینک صادرات +PastDelayVCalExport=آیا رویداد صادرات و نه بزرگتر از +AGENDA_USE_EVENT_TYPE=Use events types (managed into menu Setup -> Dictionary -> Type of agenda events) ##### ClickToDial ##### -ClickToDialDesc=هذا النموذج يسمح لإضافة رمز بعد رقم هاتف Dolibarr الاتصالات. وهناك اضغط على هذه الأيقونة ، سوف يطلب من أحد serveur معينة مع تحديد عنوان لكم أدناه. ويمكن استخدام هذه الكلمة لدعوة من مركز نظام Dolibarr التي يمكن الاتصال على رقم الهاتف هذا المسبار النظام على سبيل المثال. +ClickToDialDesc=این ماژول اجازه می دهد تا پس از شماره تلفن به اضافه کردن یک آیکون. با کلیک بر روی این آیکون به یک سرور با یک URL خاص زیر تعریف می کنید تماس بگیرید. این می تواند مورد استفاده قرار گیرد به تماس سیستم مرکز تماس از Dolibarr است که می تواند شماره تلفن را بر روی یک سیستم SIP به عنوان مثال تماس بگیرید. ##### Point Of Sales (CashDesk) ##### -CashDesk=نقاط البيع -CashDeskSetup=مكتب الإعداد وحدة نقدية -CashDeskThirdPartyForSell=عامة لاستخدام طرف ثالث لتبيعها -CashDeskBankAccountForSell=الحساب النقدي لاستخدامها لتبيع -CashDeskBankAccountForCheque= حساب لاستخدام لتلقي المدفوعات عن طريق الشيكات -CashDeskBankAccountForCB= حساب لاستخدام لاستلام المبالغ النقدية عن طريق بطاقات الائتمان -CashDeskIdWareHouse=Datawarehous لتبيع للمستخدم +CashDesk=نقطه ای از فروش +CashDeskSetup=نقطه ای از راه اندازی ماژول فروش +CashDeskThirdPartyForSell=شخص ثالث عمومی به استفاده از برای فروش +CashDeskBankAccountForSell=پیش فرض حساب استفاده برای دریافت پرداخت های نقدی +CashDeskBankAccountForCheque= پیش فرض حساب استفاده برای دریافت پرداخت توسط چک +CashDeskBankAccountForCB= پیش فرض حساب استفاده برای دریافت پرداخت توسط کارت های اعتباری +CashDeskIdWareHouse=انبار استفاده برای فروش ##### Bookmark ##### -BookmarkSetup=إعداد وحدة المرجعية -BookmarkDesc=هذا النموذج يسمح لك لإدارة العناوين. يمكنك أيضا إضافة أي Dolibarr اختصارات لصفحات أو مواقع الويب externale على القائمة اليمنى. -NbOfBoomarkToShow=أكبر عدد ممكن من العناوين تظهر في القائمة اليمنى +BookmarkSetup=راه اندازی ماژول چوب الف +BookmarkDesc=این ماژول به شما اجازه مدیریت بوک مارک ها. شما همچنین می توانید کلید های میانبر برای هر صفحه Dolibarr و یا وب سایت های externale در منوی سمت چپ خود را اضافه کنید. +NbOfBoomarkToShow=بیشترین تعداد بوک مارک های به نمایش در منو سمت چپ ##### WebServices ##### -WebServicesSetup=إعداد وحدة Webservices -WebServicesDesc=من خلال تمكين هذه الوحدة ، Dolibarr تصبح خدمة الإنترنت لتوفير خدمات الإنترنت وخدمات متنوعة. -WSDLCanBeDownloadedHere=اختصار الواصفة ملف قدمت serviceses هنا يمكن التحميل -EndPointIs=الصابون العملاء يجب إرسال الطلبات إلى نقطة النهاية Dolibarr متاحة في الموقع +WebServicesSetup=راه اندازی ماژول Webservices +WebServicesDesc=با فعال کردن این ماژول، Dolibarr تبدیل شدن به یک سرور خدمات وب به ارائه خدمات وب متفرقه. +WSDLCanBeDownloadedHere=فایل توصیف WSDL از خدمات ارائه شده را می توان به دانلود در اینجا +EndPointIs=مشتریان SOAP باید درخواست خود را به نقطه پایانی Dolibarr در آدرس ارسال دسترس ##### Bank ##### -BankSetupModule=إعداد وحدة مصرفية -FreeLegalTextOnChequeReceipts=نص حر على الشيكات والإيصالات -BankOrderShow=Display order of bank accounts for countries using "detailed bank number" -BankOrderGlobal=العامة -BankOrderGlobalDesc=General display order +BankSetupModule=راه اندازی ماژول بانک +FreeLegalTextOnChequeReceipts=متن رایگان در چک رسید +BankOrderShow=نمایش منظور از حساب های بانکی برای کشور با استفاده از "شماره بانک دقیق" +BankOrderGlobal=عمومی +BankOrderGlobalDesc=ترتیب نمایش عمومی BankOrderES=اسپانیایی -BankOrderESDesc=Spanish display order +BankOrderESDesc=ترتیب نمایش اسپانیایی ##### Multicompany ##### -MultiCompanySetup=نموذج متعدد شركة الإعداد +MultiCompanySetup=چند شرکت نصب ماژول ##### Suppliers ##### -SuppliersSetup=المورد الإعداد وحدة -SuppliersCommandModel=قالب كاملة من أجل المورد (logo...) -SuppliersInvoiceModel=Complete template of supplier invoice (logo...) -SuppliersInvoiceNumberingModel=Supplier invoices numbering models +SuppliersSetup=تامین کننده راه اندازی ماژول +SuppliersCommandModel=قالب کامل جهت عرضه کننده کالا (logo. ..) +SuppliersInvoiceModel=قالب کامل منبع فاکتور (logo. ..) +SuppliersInvoiceNumberingModel=فاکتورها تامین کننده شماره مدل ##### GeoIPMaxmind ##### -GeoIPMaxmindSetup=GeoIP Maxmind الإعداد وحدة -PathToGeoIPMaxmindCountryDataFile=Path to file containing Maxmind ip to country translation.
    Examples:
    /usr/local/share/GeoIP/GeoIP.dat
    /usr/share/GeoIP/GeoIP.dat -NoteOnPathLocation=لاحظ أن الملكية الفكرية الخاصة بك على البيانات القطرية الملف يجب أن تكون داخل الدليل الخاص بي يمكن قراءة (راجع الإعداد open_basedir بى وأذونات نظام الملفات). -YouCanDownloadFreeDatFileTo=يمكنك تحميل نسخة تجريبية مجانية من GeoIP ملف Maxmind البلاد في ٪ s. -YouCanDownloadAdvancedDatFileTo=كما يمكنك تحميل نسخة كاملة أكثر من ذلك ، مع التحديثات ، من GeoIP ملف Maxmind البلاد في ٪ s. -TestGeoIPResult=اختبار لتحويل الملكية الفكرية --> البلاد +GeoIPMaxmindSetup=راه اندازی ماژول GeoIP با Maxmind +PathToGeoIPMaxmindCountryDataFile=مسیر فایل حاوی Maxmind آی پی به ترجمه کشور است.
    مثال:
    / usr / محلی / سهم / GeoIP با / GeoIP.dat
    / usr / اشتراک / GeoIP با / GeoIP.dat +NoteOnPathLocation=توجه داشته باشید که آی پی شما به کشور فایل داده ها باید در داخل یک دایرکتوری است PHP شما قادر به خواندن (بررسی کنید PHP راه اندازی open_basedir باشد شما و مجوز فایل سیستم). +YouCanDownloadFreeDatFileTo=شما می توانید نسخه رایگان نسخه ی نمایشی از فایل های کشور Maxmind GeoIP با در٪ s دانلود کنید. +YouCanDownloadAdvancedDatFileTo=شما همچنین می توانید نسخه کامل تر، در٪ s دانلود با به روز رسانی، از فایل های کشور Maxmind GeoIP با. +TestGeoIPResult=تست از یک IP تبدیل -> کشور ##### Projects ##### -ProjectsNumberingModules=مشاريع وحدة الترقيم -ProjectsSetup=مشروع إعداد وحدة -ProjectsModelModule=المشروع نموذج التقرير وثيقة -TasksNumberingModules=Tasks numbering module -TaskModelModule=Tasks reports document model +ProjectsNumberingModules=پروژه شماره ماژول +ProjectsSetup=راه اندازی ماژول پروژه +ProjectsModelModule=گزارش پروژه مدل سند +TasksNumberingModules=ماژول وظایف شماره +TaskModelModule=گزارش کارهای سند مدل ##### ECM (GED) ##### -ECMSetup = GED Setup -ECMAutoTree = Automatic tree folder and document +ECMSetup = راه اندازی GED +ECMAutoTree = پوشه درخت به صورت خودکار و سند -Format=Format +Format=قالب diff --git a/htdocs/langs/fa_IR/agenda.lang b/htdocs/langs/fa_IR/agenda.lang index 45b385223aa..04e6693f708 100644 --- a/htdocs/langs/fa_IR/agenda.lang +++ b/htdocs/langs/fa_IR/agenda.lang @@ -1,82 +1,82 @@ # Dolibarr language file - Source file is en_US - agenda -IdAgenda=ID event -Actions=الإجراءات -ActionsArea=الإجراءات منطقة الأحداث والمهام) -Agenda= جدول الأعمال -Agendas= جداول الأعمال -Calendar= التقويم -Calendars= التقاويم -LocalAgenda=Local calendar -AffectedTo= إلى المتضررين -DoneBy= الذي قام به -Events= الأحداث -EventsNb=Number of events -MyEvents=My events -OtherEvents=Other events -ListOfActions=قائمة الأحداث -Location=موقع -EventOnFullDay=Event on all day(s) -SearchAnAction= البحث عن عمل / المهمة -MenuToDoActions= جميع الأعمال غير مكتملة -MenuDoneActions= أنهت جميع الإجراءات -MenuToDoMyActions= بلدي مكتمل الإجراءات -MenuDoneMyActions= بلدي إنهاء الإجراءات -ListOfEvents= قائمة الأحداث Dolibarr -ActionsAskedBy=الإجراءات التي سجلتها -ActionsToDoBy=الإجراءات التي أثرت على -ActionsDoneBy=الإجراءات التي قامت به -AllMyActions= كل أفعالي / المهام -AllActions= Toutes ليه الإجراءات / المهام -ViewList=وبالنظر إلى قائمة -ViewCal=وبالنظر إلى الجدول الزمني -ViewDay=Day view -ViewWeek=Week view -ViewWithPredefinedFilters= وترى مسبقا مع الفلاتر -AutoActions= التلقائي ملء جدول الأعمال -AgendaAutoActionDesc= هنا تعريف الأحداث التي تريد Dolibarr لخلق عمل تلقائيا في جدول الأعمال. إذا لم فحصها (افتراضي) ، إلا دليل الإجراءات التي ستدرج في جدول الأعمال. -AgendaSetupOtherDesc= وتسمح هذه الصفحة لتكوين البارامترات الأخرى من جدول الأعمال وحدة. -AgendaExtSitesDesc=This page allows to declare external sources of calendars to see their events into Dolibarr agenda. -ActionsEvents= الأحداث التي ستخلق Dolibarr عمل تلقائيا في جدول الأعمال -PropalValidatedInDolibarr= المصادقة على اقتراح -InvoiceValidatedInDolibarr= فاتورة مصادق -InvoiceBackToDraftInDolibarr=Invoice %s go back to draft status -InvoiceDeleteDolibarr=Invoice %s deleted -OrderValidatedInDolibarr= من أجل التحقق من صحة -OrderApprovedInDolibarr=Order %s approved -OrderRefusedInDolibarr=Order %s refused -OrderBackToDraftInDolibarr=Order %s go back to draft status -OrderCanceledInDolibarr=Order %s canceled -InterventionValidatedInDolibarr=التحقق من صحة التدخل %s -ProposalSentByEMail=Commercial proposal %s sent by EMail -OrderSentByEMail=Customer order %s sent by EMail -InvoiceSentByEMail=Customer invoice %s sent by EMail -SupplierOrderSentByEMail=Supplier order %s sent by EMail -SupplierInvoiceSentByEMail=Supplier invoice %s sent by EMail -ShippingSentByEMail=Shipping %s sent by EMail -ShippingValidated= Shipping %s validated -InterventionSentByEMail=Intervention %s sent by EMail -NewCompanyToDolibarr= طرف ثالث خلق -DateActionPlannedStart= تاريخ البدء المخطط -DateActionPlannedEnd= المخطط لها تاريخ انتهاء -DateActionDoneStart= البداية الحقيقية لتاريخ -DateActionDoneEnd= نهاية التاريخ الحقيقي -DateActionStart= تاريخ البدء -DateActionEnd= نهاية التاريخ -AgendaUrlOptions1=يمكنك أيضا إضافة المعايير التالية لترشيح الناتج : -AgendaUrlOptions2=login=login=%s لتقييد الانتاج لإجراءات التي أوجدتها ، وأثرت على المستخدم الذي قام به أو %s -AgendaUrlOptions3=logina=logina=%s لتقييد الانتاج لإجراءات التي أنشأها مستخدم %s -AgendaUrlOptions4=logint=logint=%s لتقييد الانتاج لإجراءات المتضررة لمستخدم %s -AgendaUrlOptions5=logind=logind=%s لتقييد الانتاج لإجراءات قامت به المستخدم %s -AgendaShowBirthdayEvents=عيد ميلاد تظهر اتصالات -AgendaHideBirthdayEvents=عيد ميلاد إخفاء اتصالات -Busy=Busy -ExportDataset_event1=List of agenda events +IdAgenda=رویداد ID +Actions=رویدادها +ActionsArea=منطقه رویدادها (عملیات و وظایف) +Agenda= دستور کار +Agendas= برنامه +Calendar= تقویم +Calendars= تقویم +LocalAgenda=تقویم محلی +AffectedTo= واگذار شده به +DoneBy= انجام شده توسط +Events= رویدادها +EventsNb=تعداد حوادث +MyEvents=رویدادهای من +OtherEvents=رویدادهای دیگر +ListOfActions=فهرست وقایع +Location=محل +EventOnFullDay=رویداد در تمام طول روز (بازدید کنندگان) +SearchAnAction= جستجو یک رویداد / کار +MenuToDoActions= همه رویدادها ناقص +MenuDoneActions= همه رویدادها خاتمه یافته +MenuToDoMyActions= رویدادهای ناقص من +MenuDoneMyActions= رویدادهای خاتمه من +ListOfEvents= فهرست وقایع Dolibarr +ActionsAskedBy=رویدادهای گزارش شده توسط +ActionsToDoBy=رویدادهای اختصاص یافته به +ActionsDoneBy=رویدادهای انجام شده توسط +AllMyActions= همه رویدادها من / وظایف +AllActions= همه رویدادها / وظایف +ViewList=مشاهده لیست +ViewCal=مشاهده ماه +ViewDay=نمای روز +ViewWeek=مشاهده هفته +ViewWithPredefinedFilters= نمایش با فیلترهای از پیش تعریف شده +AutoActions= پر کردن خودکار +AgendaAutoActionDesc= تعریف اینجا رویدادی که می خواهید Dolibarr برای ایجاد به طور خودکار یک رویداد در دستور کار. اگر چیزی (به طور پیش فرض) انتخاب شود، فقط اقدامات تجاری خواهد شد در دستور کار گنجانده شده است. +AgendaSetupOtherDesc= این صفحه فراهم می کند گزینه اجازه می دهد تا صادرات رویدادی Dolibarr خود را در تقویم های خارجی (تاندربرد، تقویم گوگل، ...) +AgendaExtSitesDesc=این صفحه اجازه می دهد تا به اعلام منابع خارجی از تقویم برای دیدن رویدادی خود را در دستور کار Dolibarr. +ActionsEvents= رویدادهای که Dolibarr یک اقدام در دستور کار به طور خودکار ایجاد +PropalValidatedInDolibarr= پیشنهاد از%s معتبر +InvoiceValidatedInDolibarr= فاکتور٪ بازدید کنندگان اعتبار +InvoiceBackToDraftInDolibarr=فاکتور%s را به بازگشت به پیش نویس وضعیت +InvoiceDeleteDolibarr=فاکتور%s را حذف +OrderValidatedInDolibarr= منظور از%s معتبر +OrderApprovedInDolibarr=منظور از%s را تایید +OrderRefusedInDolibarr=منظور از%s را رد کرد +OrderBackToDraftInDolibarr=منظور از%s به بازگشت به پیش نویس وضعیت +OrderCanceledInDolibarr=منظور از%s را لغو +InterventionValidatedInDolibarr=مداخله٪ بازدید کنندگان اعتبار +ProposalSentByEMail=پیشنهاد تجاری%s ارسال با ایمیل +OrderSentByEMail=سفارش مشتری%s ارسال با ایمیل +InvoiceSentByEMail=صورت حساب به مشتری%s ارسال با ایمیل +SupplierOrderSentByEMail=تامین کننده نظم%s ارسال با ایمیل +SupplierInvoiceSentByEMail=تامین کننده فاکتور%s ارسال با ایمیل +ShippingSentByEMail=حمل و نقل%s ارسال با ایمیل +ShippingValidated= حمل و نقل از%s معتبر +InterventionSentByEMail=مداخله%s ارسال با ایمیل +NewCompanyToDolibarr= شخص ثالث ایجاد شده +DateActionPlannedStart= تاریخ شروع برنامه ریزی شده +DateActionPlannedEnd= تاریخ پایان برنامه ریزی شده +DateActionDoneStart= تاریخ شروع واقعی +DateActionDoneEnd= تاریخ پایان واقعی +DateActionStart= تاریخ شروع +DateActionEnd= تاریخ پایان +AgendaUrlOptions1=شما همچنین می توانید پارامترهای زیر برای فیلتر کردن خروجی اضافه: +AgendaUrlOptions2=ورود =%s را برای محدود کردن خروجی به اقدامات ایجاد شده توسط، اختصاص یافته به و یا انجام شده توسط کاربر%s را. +AgendaUrlOptions3=logina =%s را برای محدود کردن خروجی به اقدامات ایجاد شده توسط کاربر%s را. +AgendaUrlOptions4=logint =%s را برای محدود کردن خروجی به اقدامات داده شده به کاربر از%s. +AgendaUrlOptions5=logind =%s را برای محدود کردن خروجی به اقدامات انجام شده توسط کاربر%s را. +AgendaShowBirthdayEvents=نمایش تماس های تولد را +AgendaHideBirthdayEvents=مخفی کردن تماس های تولد را +Busy=مشغول +ExportDataset_event1=فهرست رویدادی دستور کار # External Sites ical -ExportCal=Export calendar -ExtSites=Import external calendars -ExtSitesEnableThisTool=Show external calendars into agenda -ExtSitesNbOfAgenda=Number of calendars -AgendaExtNb=Calendar nb %s -ExtSiteUrlAgenda=URL to access .ical file -ExtSiteNoLabel=No Description +ExportCal=تقویم صادرات +ExtSites=واردات تقویم خارجی +ExtSitesEnableThisTool=نمایش تقویم های خارجی را در دستور کار +ExtSitesNbOfAgenda=شماره تقویم +AgendaExtNb=تقویم توجه از%s +ExtSiteUrlAgenda=فایل مقرون URL برای دسترسی به. +ExtSiteNoLabel=بدون شرح diff --git a/htdocs/langs/fa_IR/banks.lang b/htdocs/langs/fa_IR/banks.lang index 18624a2c61f..c0e70ef787a 100644 --- a/htdocs/langs/fa_IR/banks.lang +++ b/htdocs/langs/fa_IR/banks.lang @@ -8,153 +8,153 @@ FinancialAccount=حساب FinancialAccounts=حسابها BankAccount=حساب بانکی BankAccounts=حسابهای بانکی -AccountRef=الحساب المالي المرجع -AccountLabel=الحساب المالي العلامة +AccountRef=کد عکس حساب مالی +AccountLabel=برچسب حساب مالی CashAccount=حساب صندوق CashAccounts=حسابهای صندوق MainAccount=حساب اصلی -CurrentAccount=الحساب الجاري -CurrentAccounts=الحسابات الجارية -SavingAccount=حساب توفير -SavingAccounts=حسابات التوفير -ErrorBankLabelAlreadyExists=الحساب المالي الملصق موجود بالفعل -BankBalance=التوازن -BankBalanceBefore=Balance before -BankBalanceAfter=Balance after -BalanceMinimalAllowed=الحد الأدنى المسموح التوازن -BalanceMinimalDesired=الحد الأدنى من التوازن المطلوب -InitialBankBalance=الرصيد الأولي -EndBankBalance=رصيد نهاية -CurrentBalance=الرصيد الحالي -FutureBalance=التوازن في المستقبل -ShowAllTimeBalance=يظهر من البداية على التوازن -AllTime=From start -Reconciliation=المصالحة +CurrentAccount=حساب جاری +CurrentAccounts=حساب های جاری +SavingAccount=حساب پسانداز +SavingAccounts=حساب های پس انداز +ErrorBankLabelAlreadyExists=برچسب حساب مالی از قبل وجود دارد +BankBalance=تعادل +BankBalanceBefore=تعادل قبل +BankBalanceAfter=تعادل پس از +BalanceMinimalAllowed=تعادل حداقل +BalanceMinimalDesired=حداقل تعادل مورد نظر +InitialBankBalance=موجودی اولیه +EndBankBalance=موجودی پایان +CurrentBalance=تعادل کنونی +FutureBalance=تعادل آینده +ShowAllTimeBalance=نمایش موجودی از آغاز +AllTime=از شروع +Reconciliation=مصالحه RIB=شماره حساب بانکی -IBAN=عدد إيبان -BIC=بيك / سويفت عدد -StandingOrders=أوامر دائمة -StandingOrder=من أجل الوقوف -Withdrawals=انسحابات -Withdrawal=انسحاب -AccountStatement=كشف حساب -AccountStatementShort=بيان -AccountStatements=بيانات الحساب -LastAccountStatements=كشوفات الحساب الأخير -Rapprochement=المصالحة -IOMonthlyReporting=تقارير شهرية -BankAccountDomiciliation=معالجة حساب -BankAccountCountry=حساب البلاد -BankAccountOwner=اسم صاحب الحساب -BankAccountOwnerAddress=معالجة حساب المالك -RIBControlError=کنترل یکپارچگی از ارزش ها با شکست مواجه. این به این معنی است که اطلاعات برای این شماره حساب کامل و یا غلط نیست (بررسی کشور ، اعداد و IBAN). -CreateAccount=إنشاء حساب +IBAN=شماره IBAN +BIC=BIC / تعداد SWIFT +StandingOrders=سفارشات ایستاده +StandingOrder=نظام نامه +Withdrawals=برداشت ها +Withdrawal=برداشت +AccountStatement=بیانیه حساب +AccountStatementShort=بیانیه +AccountStatements=اظهارات حساب +LastAccountStatements=آخرین اظهارات حساب کاربری +Rapprochement=Reconciliate +IOMonthlyReporting=گزارش ماهانه +BankAccountDomiciliation=آدرس حساب +BankAccountCountry=کشور حساب +BankAccountOwner=نام صاحب حساب +BankAccountOwnerAddress=حساب آدرس صاحب +RIBControlError=کنترل یکپارچگی از ارزش مواجه شد. این به این معنی اطلاعات برای این شماره حساب است کامل و یا اشتباه نیست (چک کشور، اعداد و IBAN). +CreateAccount=ایجاد حساب کاربری NewAccount=حساب جديد NewBankAccount=حساب جديد بانکی NewFinancialAccount=الحساب المالي الجديد -MenuNewFinancialAccount=الحساب المالي الجديد -NewCurrentAccount=الجديد في الحساب الجاري -NewSavingAccount=حساب توفير جديد -NewCashAccount=حساب نقدية جديدة +MenuNewFinancialAccount=حساب های مالی جدید +NewCurrentAccount=حساب جاری جدید +NewSavingAccount=حساب پس انداز جدید +NewCashAccount=حساب نقدی جدید EditFinancialAccount=ویرایش حساب -AccountSetup=إعداد الحسابات المالية -SearchBankMovement=بحث الحركة المصرفية -Debts=ديون -LabelBankCashAccount=بطاقة مصرفية أو نقدا -AccountType=نوع الحساب -BankType0=حساب توفير -BankType1=الحساب الجاري -BankType2=الحساب النقدي -IfBankAccount=إذا كان حساب مصرفي -AccountsArea=حسابات المنطقة +AccountSetup=راه اندازی حساب های مالی +SearchBankMovement=جنبش بانک جستجو +Debts=بدهی +LabelBankCashAccount=بانک و یا برچسب نقدی +AccountType=نوع حساب +BankType0=حساب پسانداز +BankType1=کنونی و یا اعتبار حساب کارت +BankType2=حساب های نقدی +IfBankAccount=اگر حساب بانکی +AccountsArea=منطقه حساب AccountCard=حساب کارت DeleteAccount=حذف حساب ConfirmDeleteAccount=آیا برای پاک کردن حساب مطمئن هستید؟ Account=حساب ByCategories=بر اساس دسته ها ByRubriques=بر اساس دسته ها -BankTransactionByCategories=المعاملات المصرفية وفقا للفئات -BankTransactionForCategory=المعاملات المصرفية لفئة ق ٪ -RemoveFromRubrique=إزالة الارتباط مع هذه الفئة -RemoveFromRubriqueConfirm=هل أنت متأكد من أنك تريد إزالة الربط بين الصفقة والفئة؟ -ListBankTransactions=قائمة المعاملات المصرفية -IdTransaction=رقم المعاملات -BankTransactions=المعاملات المصرفية -SearchTransaction=بحث الصفقة -ListTransactions=قائمة المعاملات -ListTransactionsByCategory=قائمة المعاملات / الفئة -TransactionsToConciliate=المعاملات التوفيق -Conciliable=Conciliable -Conciliate=التوفيق -Conciliation=توفيق -ConciliationForAccount=التوفيق في هذا الحساب -IncludeClosedAccount=وتشمل حسابات مغلقة -OnlyOpenedAccount=إلا فتح حسابات -AccountToCredit=الحساب على الائتمان -AccountToDebit=لحساب الخصم -DisableConciliation=تعطيل ميزة التوفيق لهذا الحساب -ConciliationDisabled=توفيق سمة المعوقين +BankTransactionByCategories=معاملات بانک های دسته بندی +BankTransactionForCategory=معاملات بانک برای گروه%s را +RemoveFromRubrique=حذف پیوند با طبقه بندی +RemoveFromRubriqueConfirm=آیا مطمئن هستید که می خواهید به حذف ارتباط بین معامله و گروه؟ +ListBankTransactions=فهرست معاملات بانکی +IdTransaction=ID معامله +BankTransactions=معاملات بانک +SearchTransaction=جستجو در معامله +ListTransactions=معاملات فهرست +ListTransactionsByCategory=لیست معامله / مجموعه +TransactionsToConciliate=معاملات برای آشتی +Conciliable=می توان آشتی +Conciliate=وفق دادن +Conciliation=مصالحه +ConciliationForAccount=آشتی دادن این حساب کاربری +IncludeClosedAccount=شامل حساب های بسته شده +OnlyOpenedAccount=حساب های تنها باز +AccountToCredit=حساب به اعتبار +AccountToDebit=حساب به بدهی +DisableConciliation=غیر فعال کردن ویژگی های آشتی برای این حساب +ConciliationDisabled=از ویژگی های آشتی غیر فعال است StatusAccountOpened=باز شده StatusAccountClosed=بسته شده AccountIdShort=شماره -EditBankRecord=تعديل السجل -LineRecord=المعاملات -AddBankRecord=إضافة المعاملات -AddBankRecordLong=إضافة المعاملات يدويا -ConciliatedBy=طريق التصالح -DateConciliating=التوفيق التاريخ -BankLineConciliated=صفقة التصالح -CustomerInvoicePayment=عملاء الدفع -CustomerInvoicePaymentBack=Customer payment back -SupplierInvoicePayment=المورد الدفع +EditBankRecord=ویرایش رکورد +LineRecord=معامله +AddBankRecord=اضافه کردن معامله +AddBankRecordLong=اضافه کردن معامله دستی +ConciliatedBy=آشتی با +DateConciliating=تاریخ آشتی +BankLineConciliated=معامله آشتی +CustomerInvoicePayment=پرداخت با مشتری +CustomerInvoicePaymentBack=پرداخت به مشتری برگشت +SupplierInvoicePayment=پرداخت کننده WithdrawalPayment=پرداخت برداشت -SocialContributionPayment=دفع المساهمة الاجتماعية -FinancialAccountJournal=مجلة الحساب المالي -BankTransfer=حوالة مصرفية -BankTransfers=التحويلات المصرفية -TransferDesc=التحويل من حساب إلى آخر واحد ، وسوف يكتب Dolibarr اثنين من السجلات (أ مصدر في حساب الخصم والائتمان في الاعتبار الهدف من نفس المبلغ. العلامة نفسها وحتى الآن وسيتم استخدام هذه الصفقة) +SocialContributionPayment=پرداخت مشارکت های اجتماعی +FinancialAccountJournal=مجله حساب مالی +BankTransfer=انتقال بانک +BankTransfers=نقل و انتقالات بانکی +TransferDesc=انتقال از یک حساب به دیگری، Dolibarr دو پرونده ارسال (بدهی در حساب منبع و اعتبار در حساب هدف، از همان مقدار. همان برچسب و تاریخ را برای این معامله استفاده می شود) TransferFrom=از TransferTo=به TransferFromToDone=ونقل من هناك إلى ٪ ٪ ق ق ق ٪ ٪ وقد سجلت ق. -CheckTransmitter=الإرسال -ValidateCheckReceipt=التحقق من صحة هذا الاستلام؟ -ConfirmValidateCheckReceipt=هل أنت متأكد من ذلك فحص للتحقق من تلقي أي تغيير سيكون ممكنا بمجرد أن يتم ذلك؟ -DeleteCheckReceipt=تأكد من ورود حذف هذا؟ -ConfirmDeleteCheckReceipt=هل أنت متأكد من أنك تريد حذف هذا التحقق من ورود؟ -BankChecks=الشيكات المصرفية -BankChecksToReceipt=في انتظار إيداع الشيكات -ShowCheckReceipt=نمایش بررسی رسید سپرده. -NumberOfCheques=ملاحظة : للشيكات +CheckTransmitter=فرستنده +ValidateCheckReceipt=اعتبار این دریافت چک؟ +ConfirmValidateCheckReceipt=آیا مطمئن هستید که می خواهید به اعتبار این دریافت چک، هیچ تغییری ممکن خواهد بود یک بار این کار انجام شود؟ +DeleteCheckReceipt=این دریافت چک حذف شود؟ +ConfirmDeleteCheckReceipt=آیا مطمئن هستید که می خواهید این دریافت چک را حذف کنید؟ +BankChecks=چک های بانکی +BankChecksToReceipt=چک انتظار برای سپرده +ShowCheckReceipt=نمایش چک دریافت سپرده +NumberOfCheques=Nb در چک DeleteTransaction=پاک کردن تراکنش -ConfirmDeleteTransaction=هل أنت متأكد من أنك تريد حذف هذه الصفقة؟ -ThisWillAlsoDeleteBankRecord=وهذا من شأنه أيضا حذف المتولدة المعاملات المصرفية -BankMovements=حركات -CashBudget=الميزانية النقدية -PlannedTransactions=المخطط المعاملات +ConfirmDeleteTransaction=آیا مطمئن هستید که می خواهید این معامله را حذف کنید؟ +ThisWillAlsoDeleteBankRecord=این نیز معاملات بانکی تولید را حذف کنید +BankMovements=جنبش +CashBudget=بودجه نقدی +PlannedTransactions=معاملات برنامه ریزی شده Graph=گرافیک -ExportDataset_banque_1=المعاملات المصرفية وحساب -ExportDataset_banque_2=Deposit slip -TransactionOnTheOtherAccount=صفقة على حساب الآخرين +ExportDataset_banque_1=معاملات بانک و صورتحساب +ExportDataset_banque_2=لغزش سپرده +TransactionOnTheOtherAccount=معامله در حساب های دیگر TransactionWithOtherAccount=انتقال حساب -PaymentNumberUpdateSucceeded=دفع عدد تحديث بنجاح -PaymentNumberUpdateFailed=دفع عددا لا يمكن تحديث -PaymentDateUpdateSucceeded=تاريخ التحديث الدفع بنجاح -PaymentDateUpdateFailed=دفع حتى الآن لا يمكن تحديث +PaymentNumberUpdateSucceeded=تعداد پرداخت به روز رسانی با موفقیت +PaymentNumberUpdateFailed=تعداد پرداخت نمی تواند به روز شود +PaymentDateUpdateSucceeded=تاریخ پرداخت با موفقیت به روز رسانی +PaymentDateUpdateFailed=تاریخ پرداخت نمی تواند به روز شود Transactions=تراکنش ها BankTransactionLine=تراکنش بانک -AllAccounts=جميع المصرفية / حسابات نقدية -BackToAccount=إلى حساب -ShowAllAccounts=وتبين للجميع الحسابات -FutureTransaction=معامله در futur. هیچ راهی برای ساکت کردن. -SelectChequeTransactionAndGenerate=انتخاب / فیلتر چک به وصول چک سپرده باشد و بر روی "ایجاد" را کلیک کنید. -InputReceiptNumber=Choose the bank statement related with the conciliation. Use a sortable numeric value (such as, YYYYMM) -EventualyAddCategory=Eventually, specify a category in which to classify the records -ToConciliate=To conciliate? -ThenCheckLinesAndConciliate=Then, check the lines present in the bank statement and click -BankDashboard=Bank accounts summary -DefaultRIB=Default BAN -AllRIB=All BAN -LabelRIB=BAN Label -NoBANRecord=No BAN record -DeleteARib=Delete BAN record -ConfirmDeleteRib=Are you sure you want to delete this BAN record ? +AllAccounts=تمام حساب های بانکی / نقدی +BackToAccount=برگشت به حساب +ShowAllAccounts=نمایش برای همه حساب ها +FutureTransaction=معامله در futur. هیچ راهی برای مصالحه. +SelectChequeTransactionAndGenerate=انتخاب چک / فیلتر به چک دریافت سپرده شامل و کلیک بر روی "ایجاد". +InputReceiptNumber=بیانیه بانک مرتبط با مصالحه را انتخاب کنید. استفاده از یک مقدار عددی قابل مرتب شدن است (مانند، YYYYMM) +EventualyAddCategory=در نهایت، تعیین یک دسته بندی است که در آن برای طبقه بندی پرونده +ToConciliate=به مصالحه؟ +ThenCheckLinesAndConciliate=سپس، بررسی خطوط موجود در صورت حساب بانکی و کلیک کنید +BankDashboard=حساب های بانکی خلاصه +DefaultRIB=به طور پیش فرض BAN +AllRIB=همه BAN +LabelRIB=BAN برچسب +NoBANRecord=هیچ سابقه BAN +DeleteARib=حذف رکورد BAN +ConfirmDeleteRib=آیا مطمئن هستید که می خواهید این رکورد BAN را حذف کنید؟ diff --git a/htdocs/langs/fa_IR/bills.lang b/htdocs/langs/fa_IR/bills.lang index abe6920de45..0eeaa5e170d 100644 --- a/htdocs/langs/fa_IR/bills.lang +++ b/htdocs/langs/fa_IR/bills.lang @@ -1,413 +1,412 @@ # Dolibarr language file - Source file is en_US - bills -Bill=فاتورة -Bills=فواتير -BillsCustomers=العملاء والفواتير -BillsCustomer=Customer's invoice -BillsSuppliers=الموردين -BillsCustomersUnpaid=غير المدفوعة للعملاء الفواتير -BillsCustomersUnpaidForCompany=غير المدفوعة للعملاء فواتير ق ٪ -BillsSuppliersUnpaid=غير المدفوعة الموردين -BillsSuppliersUnpaidForCompany=Unpaid supplier's invoices for %s -BillsLate=Late payments -BillsStatistics=العملاء والفواتير والإحصاءات -BillsStatisticsSuppliers=الموردين إحصاءات -DisabledBecauseNotErasable=Disabled because can not be erased -InvoiceStandard=فاتورة موحدة -InvoiceStandardAsk=فاتورة موحدة -InvoiceStandardDesc=هذا النوع من الفاتورة هي فاتورة عام. -InvoiceDeposit=إيداع فاتورة -InvoiceDepositAsk=إيداع فاتورة -InvoiceDepositDesc=هذا النوع من الفاتورة يتم فيه ايداع وقد وردت. -InvoiceProForma=Proforma الفاتورة -InvoiceProFormaAsk=Proforma الفاتورة -InvoiceProFormaDesc=Proforma الفاتورة هو صورة حقيقية فاتورة المحاسبة ولكن ليس له قيمة. -InvoiceReplacement=استبدال الفاتورة -InvoiceReplacementAsk=استبدال فاتورة الفاتورة -InvoiceReplacementDesc=Replacement invoice is used to cancel and replace completely an invoice with no payment already received.

    Note: Only invoices with no payment on it can be replaced. If the invoice you replace is not yet closed, it will be automatically closed to 'abandoned'. -InvoiceAvoir=علما الائتمان -InvoiceAvoirAsk=علما الائتمان لتصحيح الفاتورة -InvoiceAvoirDesc=الفضل في المذكرة سلبية الفاتورة تستخدم لحل كون فاتورة بمبلغ قد يختلف عن المبلغ المدفوع فعلا (لأنه دفع الكثير من العملاء عن طريق الخطأ ، أو لن تدفع بالكامل منذ عودته لبعض المنتجات على سبيل المثال). -invoiceAvoirWithLines=Create Credit Note with lines from the origin invoice -invoiceAvoirWithPaymentRestAmount=Create Credit Note with the amount of origin invoice payment's lake -invoiceAvoirLineWithPaymentRestAmount=Credit Note amount of invoice payment's lake -ReplaceInvoice=يستعاض عن فاتورة ٪ ق -ReplacementInvoice=استبدال الفاتورة -ReplacedByInvoice=بعبارة فاتورة ق ٪ -ReplacementByInvoice=استعيض عن الفاتورة -CorrectInvoice=تصحيح الفاتورة ٪ ق -CorrectionInvoice=تصحيح الفاتورة -UsedByInvoice=وتستخدم لدفع فاتورة ق ٪ -ConsumedBy=يستهلكها -NotConsumed=لا يستهلك -NoReplacableInvoice=لا replacable الفواتير -NoInvoiceToCorrect=أي فاتورة لتصحيح -InvoiceHasAvoir=تصحيح واحدة أو عدة الفواتير -CardBill=فاتورة بطاقة -PredefinedInvoices=الفواتير مسبقا -Invoice=فاتورة -Invoices=فواتير -InvoiceLine=فاتورة الخط -InvoiceCustomer=الزبون فاتورة -CustomerInvoice=الزبون فاتورة -CustomersInvoices=العملاء والفواتير -SupplierInvoice=فاتورة المورد -SuppliersInvoices=الموردين -SupplierBill=فاتورة المورد -SupplierBills=فاتورة الاتصالات -Payment=الدفع -PaymentBack=دفع العودة -Payments=المدفوعات -PaymentsBack=عودة المدفوعات -PaidBack=Paid back -DatePayment=تاريخ الدفع -DeletePayment=حذف الدفع -ConfirmDeletePayment=هل أنت متأكد من أنك تريد حذف هذا المبلغ؟ -ConfirmConvertToReduc=هل تريد تحويل هذه القروض إلى الودائع أو علما مطلقة الخصم؟
    المبلغ حتى يتم حفظ جميع الخصومات ويمكن استخدام خصم لحالي أو مستقبلي الفاتورة لهذا العميل. -SupplierPayments=الموردين والمدفوعات -ReceivedPayments=تلقت مدفوعات -ReceivedCustomersPayments=المدفوعات المقبوضة من الزبائن -PayedSuppliersPayments=Payments payed to suppliers -ReceivedCustomersPaymentsToValid=تلقى مدفوعات عملاء للمصادقة -PaymentsReportsForYear=تقارير المدفوعات للق ٪ -PaymentsReports=تقارير المدفوعات -PaymentsAlreadyDone=المدفوعات قد فعلت -PaymentsBackAlreadyDone=Payments back already done -PaymentRule=دفع الحكم -PaymentMode=نوع الدفع -PaymentConditions=مدة السداد -PaymentConditionsShort=مدة السداد -PaymentAmount=دفع مبلغ -ValidatePayment=Validate payment -PaymentHigherThanReminderToPay=دفع أعلى من دفع تذكرة -HelpPaymentHigherThanReminderToPay=الاهتمام ، على دفع مبلغ واحد أو أكثر من فواتير أعلى من الراحة على الدفع.
    تعديل الدخول ، تؤكد خلاف ذلك والتفكير في خلق الائتمان علما الزائدة وتلقى كل الفواتير الزائدة. -HelpPaymentHigherThanReminderToPaySupplier=Attention, the payment amount of one or more bills is higher than the rest to pay.
    Edit your entry, otherwise confirm. -ClassifyPaid=تصنيف 'مدفوع' -ClassifyPaidPartially=تصنيف 'مدفوع جزئيا' -ClassifyCanceled=تصنيف 'المهجورة' -ClassifyClosed=تصنيف 'مغلقة' -CreateBill=إنشاء الفاتورة -AddBill=تضيف المذكرة الائتمان أو فاتورة -AddToDraftInvoices=Add to draft invoice -DeleteBill=شطب فاتورة -SearchACustomerInvoice=البحث عن زبون فاتورة -SearchASupplierInvoice=البحث عن مورد فاتورة -CancelBill=شطب فاتورة -SendRemindByMail=إرسال تذكرة عن طريق البريد الإلكتروني -DoPayment=هل لدفع -DoPaymentBack=هل لدفع الظهر -ConvertToReduc=تحويل الخصم في المستقبل -EnterPaymentReceivedFromCustomer=دخول الدفع الواردة من العملاء -EnterPaymentDueToCustomer=من المقرر أن يسدد العميل -DisabledBecauseRemainderToPayIsZero=لأن بقية المعوقين الدفع صفر -Amount=مبلغ -PriceBase=سعر الأساس -BillStatus=حالة الفاتورة -BillStatusDraft=مشروع (لا بد من التحقق من صحة) -BillStatusPaid=دفع -BillStatusPaidBackOrConverted=يدفع أو تحويلها إلى الخصم -BillStatusConverted=وتحول إلى خصم -BillStatusCanceled=المهجورة -BillStatusValidated=مصادق عليه (لا بد من دفعها) -BillStatusStarted=بدأت -BillStatusNotPaid=لم تدفع -BillStatusClosedUnpaid=مغلقة (غير مدفوعة الأجر) -BillStatusClosedPaidPartially=دفعت (جزئيا) -BillShortStatusDraft=مسودة -BillShortStatusPaid=دفع -BillShortStatusPaidBackOrConverted=تجهيز -BillShortStatusConverted=تجهيز -BillShortStatusCanceled=المهجورة -BillShortStatusValidated=صادق -BillShortStatusStarted=بدأت -BillShortStatusNotPaid=لم تدفع -BillShortStatusClosedUnpaid=مغلقة -BillShortStatusClosedPaidPartially=دفعت (جزئيا) -PaymentStatusToValidShort=للمصادقة -ErrorVATIntraNotConfigured=Intracommunautary رقم الضريبة على القيمة المضافة لم تحدد بعد -ErrorNoPaiementModeConfigured=لا يعرف طريقة الدفع الافتراضية. الذهاب الى الفاتورة وحدة لتحديد هذا الإعداد. -ErrorCreateBankAccount=إنشاء حساب مصرفي ، ثم يذهب إلى إعداد فريق من الفاتورة وحدة لتحديد طرق الدفع -ErrorBillNotFound=فاتورة ٪ ق لا يوجد -ErrorInvoiceAlreadyReplaced=خطأ ، في محاولة لإثبات صحة فاتورة لتحل محل الفاتورة ٪ s. ولكن هذا قد تم الاستعاضة عن فاتورة ٪ s. -ErrorDiscountAlreadyUsed=خطأ الخصم المستخدمة بالفعل -ErrorInvoiceAvoirMustBeNegative=خطأ ، والصحيح يجب أن يكون للفاتورة بمبلغ سلبي -ErrorInvoiceOfThisTypeMustBePositive=خطأ ، وهذا النوع من فاتورة يجب أن يكون إيجابيا المبلغ -ErrorCantCancelIfReplacementInvoiceNotValidated=خطأ ، لا يمكن إلغاء الفاتورة التي حلت محلها اخرى الفاتورة التي لا تزال في حالة مشروع -BillFrom=من -BillTo=مشروع قانون ل -ActionsOnBill=الإجراءات على فاتورة -NewBill=فاتورة جديدة -Prélèvements=من أجل الوقوف -Prélèvements=من أجل الوقوف -LastBills=آخر الفواتير ق ٪ -LastCustomersBills=٪ ق الماضي فواتير العملاء -LastSuppliersBills=٪ ق الماضي فواتير الموردين -AllBills=جميع الفواتير -OtherBills=غيرها من الفواتير -DraftBills=مشروع الفواتير -CustomersDraftInvoices=مشروع فواتير العملاء -SuppliersDraftInvoices=مشروع فواتير الموردين -Unpaid=غير المدفوعة -ConfirmDeleteBill=هل أنت متأكد من أنك تريد حذف هذه الفاتورة؟ -ConfirmValidateBill=هل أنت متأكد أنك تريد التحقق من صحة هذه الفاتورة مع الإشارة ٪ ق؟ -ConfirmUnvalidateBill=Are you sure you want to change invoice %s to draft status ? -ConfirmClassifyPaidBill=هل أنت متأكد من أنك تريد تغيير فاتورة ٪ ق لمركز paid؟ -ConfirmCancelBill=هل أنت متأكد من أنك تريد إلغاء الفاتورة ٪ ق؟ -ConfirmCancelBillQuestion=لماذا تريدها لتصنيف هذه الفاتورة 'المهجورة؟ -ConfirmClassifyPaidPartially=هل أنت متأكد من أنك تريد تغيير فاتورة ٪ ق لمركز paid؟ -ConfirmClassifyPaidPartiallyQuestion=هذه الفاتورة لم تدفع بالكامل. ما هي أسباب قريبة لك هذه الفاتورة؟ -ConfirmClassifyPaidPartiallyReasonAvoir=دفع ما تبقى (٪ ق ٪) هي الخصم الممنوح لدفع مبلغ من قبل. أنا مع تصحيح وضع ضريبة القيمة المضافة علما ائتمان. -ConfirmClassifyPaidPartiallyReasonDiscountNoVat=دفع ما تبقى (٪ ق ٪) هي الخصم الممنوح لدفع مبلغ من قبل. إنني أقبل أن تفقد ضريبة القيمة المضافة على هذا الخصم. -ConfirmClassifyPaidPartiallyReasonDiscountVat=دفع ما تبقى (٪ ق ٪) هي الخصم الممنوح لدفع مبلغ من قبل. أنا استرداد ضريبة القيمة المضافة على هذا الائتمان والخصم من دون ملاحظة. -ConfirmClassifyPaidPartiallyReasonBadCustomer=العملاء سيئة -ConfirmClassifyPaidPartiallyReasonProductReturned=المنتجات عاد جزئيا -ConfirmClassifyPaidPartiallyReasonOther=التخلي عن المبلغ لسبب آخر -ConfirmClassifyPaidPartiallyReasonDiscountNoVatDesc=هذا الخيار ممكن إذا الفاتورة تم تزويد مناسبة. (مثال «فقط الضرائب المقابلة إلى أن الأسعار قد دفعت فعلا تعطي الحقوق لخصم») -ConfirmClassifyPaidPartiallyReasonDiscountVatDesc=في بعض البلدان ، وهذا الخيار قد يكون ممكنا إلا إذا الفاتورة صحيحة وتتضمن المذكرة. -ConfirmClassifyPaidPartiallyReasonAvoirDesc=استخدام هذا الخيار إذا كان كل ما لا يتناسب مع -ConfirmClassifyPaidPartiallyReasonBadCustomerDesc=وهناك سوء العميل عميل التي ترفض سداد ديونه. -ConfirmClassifyPaidPartiallyReasonProductReturnedDesc=ويستخدم هذا الاختيار عند الدفع ليس كاملا لأن بعض المنتجات أعيدت -ConfirmClassifyPaidPartiallyReasonOtherDesc=استخدام هذا الخيار إذا كان كل ما لا يتناسب مع غيرها ، على سبيل المثال في الحالة التالية :
    -- دفع ليست كاملة لأن بعض المنتجات شحنت العودة
    -- أهم من المبلغ المطالب به لأن الخصم هو نسيان
    في جميع الحالات ، والمبالغة في المبلغ المطالب به لا بد من تصحيحه في نظام المحاسبة عن طريق خلق الائتمان المذكرة. -ConfirmClassifyAbandonReasonOther=أخرى -ConfirmClassifyAbandonReasonOtherDesc=هذا الخيار وسوف يستخدم في جميع الحالات الأخرى. على سبيل المثال لأنك من خطة لإقامة استبدال الفاتورة. -ConfirmCustomerPayment=هل تؤكد ذلك دفع مساهمات ٪ ٪ ق ق؟ -ConfirmSupplierPayment=Do you confirm this payment input for %s %s ? -ConfirmValidatePayment=هل أنت متأكد أنك تريد التحقق من صحة هذا الدفع؟ لم يطرأ أي تغيير يمكن الدفع مرة واحدة على صحتها. -ValidateBill=التحقق من صحة الفواتير -UnvalidateBill=Unvalidate invoice -NumberOfBills=ملاحظة : من الفواتير -NumberOfBillsByMonth=Nb of invoices by month -AmountOfBills=مبلغ الفواتير -AmountOfBillsByMonthHT=Amount of invoices by month (net of tax) -ShowSocialContribution=وتظهر مساهمة الاجتماعية -ShowBill=وتظهر الفاتورة -ShowInvoice=وتظهر الفاتورة -ShowInvoiceReplace=وتظهر استبدال الفاتورة -ShowInvoiceAvoir=وتظهر المذكرة الائتمان -ShowInvoiceDeposit=وتبين أن تودع الفاتورة -ShowPayment=وتظهر الدفع -File=ملف -AlreadyPaid=دفعت بالفعل -AlreadyPaidBack=Already paid back -AlreadyPaidNoCreditNotesNoDeposits=دفعت بالفعل (بدون تلاحظ الائتمان والودائع) -Abandoned=المهجورة -RemainderToPay=تبقى على الدفع -RemainderToTake=ما تبقى لاتخاذ -RemainderToPayBack=Remainder to pay back -Rest=Pending -AmountExpected=المبلغ المطالب به -ExcessReceived=تلقى الزائدة -EscompteOffered=عرض الخصم (الدفع قبل الأجل) -SendBillRef=ارسال الفاتورة ٪ ق -SendReminderBillRef=ارسال الفاتورة ٪ ق (تذكرة) -StandingOrders=أوامر دائمة -StandingOrder=من أجل الوقوف -NoDraftBills=أي مشروع الفواتير -NoOtherDraftBills=أي مشروع الفواتير -NoDraftInvoices=No draft invoices -RefBill=فاتورة المرجع -ToBill=على مشروع قانون -RemainderToBill=تبقى لمشروع قانون -SendBillByMail=ارسال الفاتورة عن طريق البريد الإلكتروني -SendReminderBillByMail=إرسال تذكرة عن طريق البريد الإلكتروني -RelatedCommercialProposals=المقترحات المتعلقة التجارية -MenuToValid=لصحيحة -DateMaxPayment=قبل استحقاق الدفع -DateEcheance=الحد من الموعد المقرر -DateInvoice=تاريخ الفاتورة -NoInvoice=لا الفاتورة -ClassifyBill=تصنيف الفاتورة -SupplierBillsToPay=دفع فواتير الموردين -CustomerBillsUnpaid=فواتير غير مدفوعة للعملاء -DispenseMontantLettres=ليه factures rédigées قدم المساواة طرائق mécanographiques sont l' arrêté dispensées دي én lettres -DispenseMontantLettres=ليه factures rédigées قدم المساواة طرائق mécanographiques sont l' arrêté dispensées دي én lettres -NonPercuRecuperable=غير القابلة للاسترداد -SetConditions=تحدد شروط الدفع -SetMode=حدد طريقة الدفع -Billed=فواتير -RepeatableInvoice=محددة مسبقا فاتورة -RepeatableInvoices=محددة مسبقا والفواتير -Repeatable=محددة مسبقا -Repeatables=محددة مسبقا -ChangeIntoRepeatableInvoice=تحويل محددة مسبقا -CreateRepeatableInvoice=إنشاء فاتورة محددة مسبقا -CreateFromRepeatableInvoice=خلق من فاتورة محددة مسبقا -CustomersInvoicesAndInvoiceLines=فواتير العملاء والفواتير 'خطوط -CustomersInvoicesAndPayments=العملاء والفواتير والمدفوعات -ExportDataset_invoice_1=قائمة العملاء والفواتير والفواتير 'خطوط -ExportDataset_invoice_2=العملاء والفواتير والمدفوعات -ProformaBill=Proforma بيل : -Reduction=تخفيض -ReductionShort=Reduc. -Reductions=التخفيضات -ReductionsShort=Reduc. -Discount=الخصم -Discounts=خصومات -AddDiscount=إضافة الخصم -AddRelativeDiscount=Create relative discount -EditRelativeDiscount=Edit relative discount -AddGlobalDiscount=إضافة الخصم -EditGlobalDiscounts=Edit absolute discounts -AddCreditNote=Create credit note -ShowDiscount=وتظهر الخصم -ShowReduc=Show the deduction -RelativeDiscount=الخصم النسبي -GlobalDiscount=خصم العالمية -CreditNote=علما الائتمان -CreditNotes=ويلاحظ الائتمان -Deposit=إيداع -Deposits=الودائع -DiscountFromCreditNote=خصم ٪ من الائتمان علما ق -DiscountFromDeposit=دفع فاتورة ٪ من الودائع ق -AbsoluteDiscountUse=هذا النوع من الائتمان يمكن استخدامها على الفاتورة قبل المصادقة -CreditNoteDepositUse=الفاتورة يجب أن يصادق على استخدام هذه الأرصدة ملك -NewGlobalDiscount=تحديد خصم جديد -NewRelativeDiscount=خصم جديد النسبية -NoteReason=ملاحظة / السبب -ReasonDiscount=السبب -DiscountOfferedBy=التي تمنحها -DiscountStillRemaining=خصم لا يزالون -DiscountAlreadyCounted=بالفعل خصم أحصى -BillAddress=مشروع قانون معالجة -HelpEscompte=هذا الخصم هو الخصم الممنوح للعميل لأن الدفع قبل البعيد. -HelpAbandonBadCustomer=هذا المبلغ قد تم التخلي عنها (وذكر أن العملاء سيئة العملاء) ، ويعتبر أحد exceptionnal فضفاضة. -HelpAbandonOther=هذا المبلغ قد تم التخلي عنها لأنها كانت خطأ (خطأ أو فاتورة العميل أي بعبارة أخرى على سبيل المثال) -IdSocialContribution=المساهمة الاجتماعية معرف -PaymentId=دفع معرف -InvoiceId=فاتورة معرف -InvoiceRef=المرجع الفاتورة. -InvoiceDateCreation=فاتورة تاريخ الإنشاء -InvoiceStatus=حالة الفاتورة -InvoiceNote=علما الفاتورة -InvoicePaid=دفعت الفاتورة -PaymentNumber=دفع عدد -RemoveDiscount=إزالة الخصم -WatermarkOnDraftBill=مشاريع مائية على فواتير (إذا كانت فارغة لا شيء) -InvoiceNotChecked=No invoice selected -CloneInvoice=استنساخ الفاتورة -ConfirmCloneInvoice=هل أنت متأكد من استنساخ هذه الفاتورة ٪ ق؟ -DisabledBecauseReplacedInvoice=العمل والمعوقين بسبب الفاتورة قد استبدل -DescTaxAndDividendsArea=This area presents a summary of all payments made for special expenses. Only records with payment during the fixed year are included here. -NbOfPayments=ملاحظة : للمدفوعات -SplitDiscount=انقسام في الخصم -ConfirmSplitDiscount=هل أنت متأكد من أن هذا الانقسام خصم ٪ ق ق ٪ الى 2 خصومات أقل؟ -TypeAmountOfEachNewDiscount=مقدار مساهمة كل من جزأين : -TotalOfTwoDiscountMustEqualsOriginal=مجموعه جديدتين الخصم يجب أن تكون مساوية للخصم المبلغ الأصلي. -ConfirmRemoveDiscount=هل أنت متأكد من أنك تريد إزالة هذا الخصم؟ -RelatedBill=الفاتورة ذات الصلة -RelatedBills=الفواتير ذات الصلة +Bill=صورت حساب +Bills=صورت حساب +BillsCustomers=صورت حساب مشتری +BillsCustomer=صورت حساب مشتری +BillsSuppliers=فاکتورها تامین کننده +BillsCustomersUnpaid=صورت حساب به مشتری پرداخت نشده است +BillsCustomersUnpaidForCompany=صورت حساب به مشتری پرداخت نشده است برای%s +BillsSuppliersUnpaid=فاکتورها منبع پرداخت نشده است +BillsSuppliersUnpaidForCompany=فاکتورها منبع پرداخت نشده است برای%s +BillsLate=پرداخت در اواخر +BillsStatistics=فاکتورها آمار مشتری +BillsStatisticsSuppliers=فاکتورها آمار تامین کننده +DisabledBecauseNotErasable=غیر فعال چون نمی تواند پاک شود +InvoiceStandard=صورت حساب استاندارد +InvoiceStandardAsk=صورت حساب استاندارد +InvoiceStandardDesc=این نوع از فاکتور فاکتور معمول است. +InvoiceDeposit=صورت حساب سپرده +InvoiceDepositAsk=صورت حساب سپرده +InvoiceDepositDesc=این نوع از فاکتور انجام شده است زمانی که سپرده دریافت شده است. +InvoiceProForma=فاکتورمقدماتی +InvoiceProFormaAsk=فاکتورمقدماتی +InvoiceProFormaDesc=فاکتور را یک تصویر از یک فاکتور درست است اما هیچ ارزش حسابداری. +InvoiceReplacement=فاکتور تعویض +InvoiceReplacementAsk=فاکتور جایگزین برای فاکتور +InvoiceReplacementDesc=فاکتور جایگزین استفاده شده است به لغو و جایگزین به طور کامل صورت حساب بدون پرداخت در حال حاضر دریافت.

    نکته: فقط فاکتورها بدون پرداخت بر روی آن را می توان جایگزین کرد. اگر صورت حساب را عوض کنید هنوز بسته نشده است، آن را به طور خودکار به "رها" بسته است. +InvoiceAvoir=توجه داشته باشید اعتباری +InvoiceAvoirAsk=توجه داشته باشید اعتباری برای اصلاح صورت حساب +InvoiceAvoirDesc=توجه داشته باشید اعتباری فاکتور منفی استفاده می شود برای حل این واقعیت است که فاکتور دارای مقدار است که از مقدار واقعا پرداخت می شود، متفاوت است (به دلیل مشتری های خطا بیش از حد پرداخت می شود، و یا به طور کامل پرداخت می شود چرا که او بازگشت برخی از محصولات به عنوان مثال) است. +invoiceAvoirWithLines=ایجاد اعتبار توجه با خطوط از فاکتور مبدا +invoiceAvoirWithPaymentRestAmount=ایجاد اعتبار توجه با مقدار دریاچه منشاء فاکتور پرداخت در +invoiceAvoirLineWithPaymentRestAmount=مقدار اعتبار توجه از دریاچه پرداخت صورتحساب در +ReplaceInvoice=به جای صورتحساب از%s +ReplacementInvoice=فاکتور تعویض +ReplacedByInvoice=به جای صورتحساب از%s +ReplacementByInvoice=به جای صورتحساب +CorrectInvoice=فاکتور صحیح از%s +CorrectionInvoice=فاکتور تصحیح +UsedByInvoice=مورد استفاده به پرداخت صورتحساب از%s +ConsumedBy=مصرف شده توسط +NotConsumed=مصرف نشده +NoReplacableInvoice=بدون فاکتورها جایگزین +NoInvoiceToCorrect=بدون فاکتور برای اصلاح +InvoiceHasAvoir=تصحیح شده توسط یک یا چند فاکتور +CardBill=کارت فاکتور +PredefinedInvoices=فاکتورها از پیش تعریف شده +Invoice=صورت حساب +Invoices=صورت حساب +InvoiceLine=خط فاکتور +InvoiceCustomer=صورت حساب به مشتری +CustomerInvoice=صورت حساب به مشتری +CustomersInvoices=مشتریان فاکتورها +SupplierInvoice=فاکتور تامین کننده +SuppliersInvoices=تولید کنندگان فاکتورها +SupplierBill=فاکتور تامین کننده +SupplierBills=تامین کنندگان فاکتورها +Payment=پرداخت +PaymentBack=برگشت پرداخت +Payments=پرداخت +PaymentsBack=پرداخت به عقب +PaidBack=پرداخت به عقب +DatePayment=تاریخ پرداخت +DeletePayment=حذف پرداخت +ConfirmDeletePayment=آیا مطمئن هستید که می خواهید به حذف این پرداخت؟ +ConfirmConvertToReduc=آیا شما می خواهید برای تبدیل این توجه داشته باشید اعتباری و یا واریز به تخفیف مطلق؟
    مقدار بنابراین در میان همه تخفیف ذخیره خواهد شد و می تواند به عنوان تخفیف برای یک جریان یا یک فاکتور آینده برای این مشتری استفاده می شود. +SupplierPayments=تولید کنندگان پرداخت +ReceivedPayments=دریافت پرداخت +ReceivedCustomersPayments=پرداخت دریافت از مشتریان +PayedSuppliersPayments=پرداخت غیر انتفایی به تامین کنندگان +ReceivedCustomersPaymentsToValid=مشتریان دریافت پرداخت ها به اعتبار +PaymentsReportsForYear=گزارش پرداخت برای%s +PaymentsReports=گزارش پرداخت +PaymentsAlreadyDone=پرداخت از قبل انجام می شود +PaymentsBackAlreadyDone=پرداخت به عقب در حال حاضر انجام می شود +PaymentRule=قانون پرداخت +PaymentMode=نحوه پرداخت +PaymentConditions=مدت پرداخت +PaymentConditionsShort=مدت پرداخت +PaymentAmount=مقدار پرداخت +ValidatePayment=اعتبار پرداخت +PaymentHigherThanReminderToPay=پرداخت بالاتر از یادآوری به پرداخت +HelpPaymentHigherThanReminderToPay=توجه، مقدار پرداخت یک یا چند صورت حساب بالاتر از بقیه به پرداخت است.
    ویرایش ورود خود را، در غیر این صورت تایید و فکر می کنم در مورد ایجاد توجه داشته باشید اعتباری بیش از حد دریافت شده در هر فاکتورها پرداخت. +HelpPaymentHigherThanReminderToPaySupplier=توجه، مقدار پرداخت یک یا چند صورت حساب بالاتر از بقیه به پرداخت است.
    ویرایش ورود خود را، در غیر این صورت تایید. +ClassifyPaid=طبقه بندی 'پرداخت' +ClassifyPaidPartially=طبقه بندی 'پرداخت تا حدی' +ClassifyCanceled=طبقه بندی 'رها' +ClassifyClosed=طبقه بندی »بسته ' +CreateBill=ایجاد فاکتور +AddBill=اضافه کردن فاکتور و یا اعتباری توجه داشته باشید +AddToDraftInvoices=اضافه کردن به پیش نویس فاکتور +DeleteBill=حذف فاکتور +SearchACustomerInvoice=جستجو برای یک صورتحساب مشتری +SearchASupplierInvoice=جستجو برای یک فاکتور منبع +CancelBill=لغو فاکتور +SendRemindByMail=ارسال یادآور با ایمیل +DoPayment=آیا پرداخت +DoPaymentBack=آیا پرداخت به عقب +ConvertToReduc=تبدیل به تخفیف آینده +EnterPaymentReceivedFromCustomer=پرداخت های دریافت شده از مشتری را وارد کنید +EnterPaymentDueToCustomer=پرداخت با توجه به مشتری +DisabledBecauseRemainderToPayIsZero=غیر فعال به دلیل باقی مانده به پرداخت صفر است +Amount=مقدار +PriceBase=پایه قیمت +BillStatus=وضعیت فاکتور +BillStatusDraft=پیش نویس (نیاز به تایید می شود) +BillStatusPaid=پرداخت +BillStatusPaidBackOrConverted=پرداخت شده و یا تبدیل به تخفیف +BillStatusConverted=پرداخت (آماده برای فاکتور نهایی) +BillStatusCanceled=متروک +BillStatusValidated=اعتبار (نیاز به پرداخت می شود) +BillStatusStarted=آغاز شده +BillStatusNotPaid=پرداخت نشده +BillStatusClosedUnpaid=بسته (بدون حقوق) +BillStatusClosedPaidPartially=پرداخت (تا حدی) +BillShortStatusDraft=پیش نویس +BillShortStatusPaid=پرداخت +BillShortStatusPaidBackOrConverted=پردازش +BillShortStatusConverted=پردازش +BillShortStatusCanceled=متروک +BillShortStatusValidated=اعتبار +BillShortStatusStarted=آغاز شده +BillShortStatusNotPaid=پرداخت نشده +BillShortStatusClosedUnpaid=بسته +BillShortStatusClosedPaidPartially=پرداخت (تا حدی) +PaymentStatusToValidShort=به اعتبار +ErrorVATIntraNotConfigured=تعداد مالیات بر ارزش افزوده Intracommunautary هنوز تعریف نشده +ErrorNoPaiementModeConfigured=بدون حالت پرداخت به طور پیش فرض تعریف شده است. برو به نصب ماژول فاکتور به رفع این. +ErrorCreateBankAccount=ایجاد یک حساب بانکی، سپس به پنل راه اندازی ماژول فاکتور به تعریف حالت های پرداخت +ErrorBillNotFound=فاکتور%s وجود ندارد +ErrorInvoiceAlreadyReplaced=خطا، شما سعی می کنید به اعتبار صورتحساب به جای صورتحساب٪ است. اما این یکی در حال حاضر توسط فاکتور%s را جایگزین کرد. +ErrorDiscountAlreadyUsed=خطا، تخفیف ویژه در حال حاضر استفاده می شود +ErrorInvoiceAvoirMustBeNegative=خطا، فاکتور صحیح باید یک مقدار منفی داشته +ErrorInvoiceOfThisTypeMustBePositive=خطا، این نوع از فاکتور باید یک مقدار مثبت +ErrorCantCancelIfReplacementInvoiceNotValidated=خطا، می تواند یک فاکتور است که توسط فاکتور دیگری است که هنوز هم در وضعیت پیش نویس جایگزین لغو کنید +BillFrom=از +BillTo=به +ActionsOnBill=عملیات در فاکتور +NewBill=صورت حساب جدید +Prélèvements=نظام نامه +Prélèvements=نظام نامه +LastBills=تاریخ و زمان آخرین%s را فاکتورها +LastCustomersBills=تاریخ و زمان آخرین٪ مشتریان فاکتورها +LastSuppliersBills=تاریخ و زمان آخرین٪ بازدید کنندگان تامین کنندگان فاکتورها +AllBills=تمام فاکتورها +OtherBills=دیگر فاکتورها +DraftBills=فاکتورها پیش نویس +CustomersDraftInvoices=مشتریان پیش نویس فاکتورها +SuppliersDraftInvoices=تولید کنندگان پیش نویس فاکتورها +Unpaid=پرداخت نشده +ConfirmDeleteBill=آیا مطمئن هستید که می خواهید این فاکتور را حذف کنید؟ +ConfirmValidateBill=آیا مطمئن هستید که می خواهید به اعتبار این فاکتور با مرجع%s را؟ +ConfirmUnvalidateBill=آیا مطمئن هستید که می خواهید به تغییر صورت حساب%s به پیش نویس وضعیت؟ +ConfirmClassifyPaidBill=آیا مطمئن هستید که می خواهید به تغییر صورت حساب%s به وضعیت پرداخت می شود؟ +ConfirmCancelBill=آیا مطمئن هستید که می خواهید برای صرفنظر کردن از فاکتور%s را؟ +ConfirmCancelBillQuestion=چرا شما می خواهید برای طبقه بندی این فاکتور "رها"؟ +ConfirmClassifyPaidPartially=آیا مطمئن هستید که می خواهید به تغییر صورت حساب%s به وضعیت پرداخت می شود؟ +ConfirmClassifyPaidPartiallyQuestion=این فاکتور به طور کامل پرداخت نشده است. دلایل شما برای بستن این فاکتور ها چه هستند؟ +ConfirmClassifyPaidPartiallyReasonAvoir=باقی مانده به پرداخت (٪ S٪ بازدید کنندگان) تخفیف داده است به دلیل پرداخت قبل از واژه ساخته شده است. I تنظیم مالیات بر ارزش افزوده با توجه داشته باشید اعتباری. +ConfirmClassifyPaidPartiallyReasonDiscountNoVat=باقی مانده به پرداخت (٪ S٪ بازدید کنندگان) تخفیف داده است به دلیل پرداخت قبل از واژه ساخته شده است. من قبول می کنم به از دست دادن مالیات بر ارزش افزوده در این تخفیف. +ConfirmClassifyPaidPartiallyReasonDiscountVat=باقی مانده به پرداخت (٪ S٪ بازدید کنندگان) تخفیف داده است به دلیل پرداخت قبل از واژه ساخته شده است. I مالیات بر ارزش افزوده در این تخفیف بهبود می یابند بدون توجه داشته باشید اعتباری. +ConfirmClassifyPaidPartiallyReasonBadCustomer=مشتری بد +ConfirmClassifyPaidPartiallyReasonProductReturned=محصولات نیمه بازگشت +ConfirmClassifyPaidPartiallyReasonOther=میزان دلیل دیگر رها +ConfirmClassifyPaidPartiallyReasonDiscountNoVatDesc=این انتخاب ممکن است اگر صورت حساب خود را با نظر مناسب ارائه شده است. (به عنوان مثال «تنها مالیات مربوط به قیمت است که در واقع پرداخت شده است را می دهد حقوق به کسر») +ConfirmClassifyPaidPartiallyReasonDiscountVatDesc=در برخی از کشورها، این انتخاب ممکن است تنها اگر صورت حساب خود شامل توجه داشته باشید درست است. +ConfirmClassifyPaidPartiallyReasonAvoirDesc=با استفاده از این انتخاب اگر تمام دیگر مناسب نیست +ConfirmClassifyPaidPartiallyReasonBadCustomerDesc=مشتری بد یک مشتری که به پرداخت بدهی خود امتناع است. +ConfirmClassifyPaidPartiallyReasonProductReturnedDesc=این گزینه استفاده می شود که پرداخت کامل نیست چرا که برخی از محصولات بازگردانده شدند +ConfirmClassifyPaidPartiallyReasonOtherDesc=با استفاده از این انتخاب اگر تمام دیگر مناسب نیست، به عنوان مثال در شرایط زیر است:
    - پرداخت کامل نیست چرا که برخی از محصولات پشت حمل می شد
    - مقدار بیش از حد مهم است ادعا کرد به دلیل تخفیف به فراموشی سپرده شد
    در همه موارد، مقدار بیش از حد ادعا باید در سیستم حسابداری با ایجاد یک یادداشت اعتباری را اصلاح کرد. +ConfirmClassifyAbandonReasonOther=دیگر +ConfirmClassifyAbandonReasonOtherDesc=این انتخاب خواهد شد در تمام موارد دیگر استفاده می شود. به عنوان مثال دلیل این که شما برنامه ریزی برای ایجاد یک فاکتور جایگزین. +ConfirmCustomerPayment=آیا شما تایید این ورودی پرداخت شده برای%s٪ s را؟ +ConfirmSupplierPayment=آیا شما تایید این ورودی پرداخت شده برای%s٪ s را؟ +ConfirmValidatePayment=آیا مطمئن هستید که می خواهید به اعتبار این پرداخت؟ بدون تغییر می تواند به صورت یک بار پرداخت اعتبار است. +ValidateBill=اعتبار فاکتور +UnvalidateBill=فاکتور Unvalidate +NumberOfBills=Nb و از فاکتورها +NumberOfBillsByMonth=Nb و از فاکتورها در ماه +AmountOfBills=مقدار فاکتورها +AmountOfBillsByMonthHT=مقدار فاکتورها توسط ماه (خالص از مالیات) +ShowSocialContribution=نمایش مشارکت های اجتماعی +ShowBill=نمایش فاکتور +ShowInvoice=نمایش فاکتور +ShowInvoiceReplace=نمایش جایگزین فاکتور +ShowInvoiceAvoir=نمایش توجه داشته باشید اعتباری +ShowInvoiceDeposit=نمایش فاکتور سپرده +ShowPayment=نمایش پرداخت +File=پرونده +AlreadyPaid=در حال حاضر پرداخت می شود +AlreadyPaidBack=در حال حاضر باز پرداخت +AlreadyPaidNoCreditNotesNoDeposits=در حال حاضر (بدون یادداشت های اعتباری و سپرده) پرداخت می شود +Abandoned=متروک +RemainderToPay=باقی مانده به پرداخت +RemainderToTake=باقی مانده را به +RemainderToPayBack=باقی مانده به پرداخت +Rest=در انتظار +AmountExpected=مقدار ادعا +ExcessReceived=اضافی دریافت +EscompteOffered=تخفیف ارائه شده (پرداخت قبل از ترم) +SendBillRef=ارسال صورتحساب از%s +SendReminderBillRef=ارسال صورتحساب از%s (یادآوری) +StandingOrders=سفارشات ایستاده +StandingOrder=نظام نامه +NoDraftBills=بدون پیش نویس فاکتورها +NoOtherDraftBills=بدون پیش نویس دیگر فاکتورها +NoDraftInvoices=بدون پیش نویس فاکتورها +RefBill=کد عکس فاکتور +ToBill=به بیل +RemainderToBill=باقی مانده به لایحه +SendBillByMail=ارسال صورتحساب از طریق ایمیل +SendReminderBillByMail=ارسال یادآور شده توسط ایمیل +RelatedCommercialProposals=طرح تجاری مرتبط +MenuToValid=به معتبر +DateMaxPayment=پرداخت به دلیل قبل از +DateEcheance=حد موعد مقرر +DateInvoice=تاریخ صورتحساب +NoInvoice=بدون فاکتور +ClassifyBill=طبقه بندی صورت حساب +SupplierBillsToPay=تولید کنندگان فاکتورها به پرداخت +CustomerBillsUnpaid=صورت حساب مشتریان پرداخت نشده +DispenseMontantLettres=این لایحه پیش نویس توسط mechanographical از نظم در نامه معاف هستند +DispenseMontantLettres=این لایحه پیش نویس توسط mechanographical از نظم در نامه معاف هستند +NonPercuRecuperable=غیر قابل بازیابی +SetConditions=تنظیم شرایط پرداخت +SetMode=تنظیم حالت پرداخت +Billed=ثبت شده در صورتحساب یا لیست +RepeatableInvoice=فاکتور از پیش تعریف شده +RepeatableInvoices=فاکتورها از پیش تعریف شده +Repeatable=از پیش تعریف شده +Repeatables=از پیش تعریف شده +ChangeIntoRepeatableInvoice=تبدیل به از پیش تعریف شده +CreateRepeatableInvoice=فاکتور ایجاد از پیش تعریف شده +CreateFromRepeatableInvoice=ایجاد از فاکتور از پیش تعریف شده +CustomersInvoicesAndInvoiceLines=صورت حساب مشتری و خطوط صورت حساب را +CustomersInvoicesAndPayments=صورت حساب مشتری و پرداخت +ExportDataset_invoice_1=فهرست فاکتورها مشتری و خطوط صورت حساب را +ExportDataset_invoice_2=صورت حساب مشتری و پرداخت +ProformaBill=PROFORMA بیل: +Reduction=کاهش +ReductionShort=کاهش. +Reductions=کاهش +ReductionsShort=کاهش. +Discount=تخفیف +Discounts=تخفیف +AddDiscount=ایجاد تخفیف +AddRelativeDiscount=ایجاد تخفیف نسبی +EditRelativeDiscount=ویرایش تخفیف نسبی +AddGlobalDiscount=ایجاد تخفیف مطلق +EditGlobalDiscounts=ویرایش تخفیف مطلق +AddCreditNote=ایجاد یادداشت های اعتباری +ShowDiscount=نمایش تخفیف +ShowReduc=نمایش کسر +RelativeDiscount=تخفیف نسبی +GlobalDiscount=تخفیف سراسری +CreditNote=توجه داشته باشید اعتباری +CreditNotes=یادداشت های اعتباری +Deposit=سپرده +Deposits=سپرده ها +DiscountFromCreditNote=تخفیف از اعتبار توجه داشته باشید از%s +DiscountFromDeposit=پرداخت از سپرده فاکتور از%s +AbsoluteDiscountUse=این نوع از اعتبار را می توان در صورتحساب قبل از اعتبار آن استفاده می شود +CreditNoteDepositUse=فاکتور باید دارای اعتبار برای استفاده از این پادشاه اعتبارات +NewGlobalDiscount=تخفیف های جدید مطلق +NewRelativeDiscount=تخفیف نسبی جدید +NoteReason=توجه داشته باشید / عقل +ReasonDiscount=دلیل +DiscountOfferedBy=اعطا شده از +DiscountStillRemaining=تخفیف هنوز هم باقی مانده +DiscountAlreadyCounted=تخفیف در حال حاضر شمارش +BillAddress=آدرس بیل +HelpEscompte=این تخفیف تخفیف اعطا شده به مشتری است، زیرا پرداخت آن قبل از واژه ساخته شده است. +HelpAbandonBadCustomer=این مقدار متوقف شده (مشتری گفته می شود یک مشتری بد) است و به عنوان یک شل استثنایی در نظر گرفته. +HelpAbandonOther=این مقدار متوقف شده از آن خطا بود (مشتری اشتباه و یا فاکتور های دیگر به عنوان مثال به جای) +IdSocialContribution=شناسه مشارکت های اجتماعی +PaymentId=شناسه پرداخت +InvoiceId=شناسه فاکتور +InvoiceRef=کد عکس فاکتور. +InvoiceDateCreation=تاریخ ایجاد فاکتور +InvoiceStatus=وضعیت فاکتور +InvoiceNote=توجه داشته باشید فاکتور +InvoicePaid=فاکتور پرداخت می شود +PaymentNumber=تعداد پرداخت +RemoveDiscount=حذف تخفیف +WatermarkOnDraftBill=تعیین میزان مد آب در پیش نویس فاکتورها (هیچ اگر خالی) +InvoiceNotChecked=بدون فاکتور انتخاب شده +CloneInvoice=فاکتور کلون +ConfirmCloneInvoice=آیا مطمئن هستید که می خواهید به کلون کردن این فاکتور%s را؟ +DisabledBecauseReplacedInvoice=اقدام غیر فعال به دلیل فاکتور جایگزین شده است +DescTaxAndDividendsArea=این منطقه خلاصه ای از تمام پرداخت های ساخته شده برای مصارف خاص است. تنها پرونده با پرداخت در طول سال ثابت هستند در اینجا گنجانده شده است. +NbOfPayments=Nb و پرداخت +SplitDiscount=تخفیف تقسیم در دو +ConfirmSplitDiscount=آیا مطمئن هستید که می خواهید به تقسیم این تخفیف از%s در٪ s به 2 تخفیف پایین تر؟ +TypeAmountOfEachNewDiscount=مقدار ورودی برای هر یک از دو بخش است: +TotalOfTwoDiscountMustEqualsOriginal=مجموع دو تخفیف های جدید باید به مقدار تخفیف اصلی برابر باشد. +ConfirmRemoveDiscount=آیا مطمئن هستید که می خواهید به حذف این تخفیف؟ +RelatedBill=فاکتور های مرتبط +RelatedBills=فاکتورها مرتبط # PaymentConditions -PaymentConditionShortRECEP=فورا -PaymentConditionRECEP=فورا -PaymentConditionShort30D=30 يوما -PaymentCondition30D=30 يوما -PaymentConditionShort30DENDMONTH=30 يوما من نهاية الشهر -PaymentCondition30DENDMONTH=30 يوما من نهاية الشهر -PaymentConditionShort60D=60 يوما -PaymentCondition60D=60 يوما -PaymentConditionShort60DENDMONTH=60 يوما من نهاية الشهر -PaymentCondition60DENDMONTH=60 يوما من نهاية الشهر -PaymentConditionShortPT_DELIVERY=تسليم -PaymentConditionPT_DELIVERY=در هنگام تحویل -PaymentConditionShortPT_ORDER=On order -PaymentConditionPT_ORDER=On order +PaymentConditionShortRECEP=فوری +PaymentConditionRECEP=فوری +PaymentConditionShort30D=30 روز +PaymentCondition30D=30 روز +PaymentConditionShort30DENDMONTH=30 روز آخر ماه +PaymentCondition30DENDMONTH=30 روز آخر ماه +PaymentConditionShort60D=60 روز +PaymentCondition60D=60 روز +PaymentConditionShort60DENDMONTH=60 روز آخر ماه +PaymentCondition60DENDMONTH=60 روز آخر ماه +PaymentConditionShortPT_DELIVERY=تحویل +PaymentConditionPT_DELIVERY=در زایمان +PaymentConditionShortPT_ORDER=بر اساس سفارش +PaymentConditionPT_ORDER=بر اساس سفارش PaymentConditionShortPT_5050=50-50 -PaymentConditionPT_5050=50%% in advance, 50%% on delivery -FixAmount=Fix amount -VarAmount=Variable amount (%% tot.) - +PaymentConditionPT_5050=50٪ درصد در سال پیش، 50٪ در تحویل +FixAmount=ثابت مقدار +VarAmount=مقدار متغیر (٪٪ جمع.) # PaymentType -PaymentTypeVIR=الودائع المصرفية -PaymentTypeShortVIR=الودائع المصرفية -PaymentTypePRE=البنك بغية -PaymentTypeShortPRE=البنك بغية -PaymentTypeLIQ=نقدا -PaymentTypeShortLIQ=نقدا -PaymentTypeCB=بطاقة الائتمان -PaymentTypeShortCB=بطاقة الائتمان -PaymentTypeCHQ=الشيكات -PaymentTypeShortCHQ=الشيكات -PaymentTypeTIP=تلميح -PaymentTypeShortTIP=تلميح -PaymentTypeVAD=على خط التسديد -PaymentTypeShortVAD=على خط التسديد -PaymentTypeTRA=تسديد الفواتير -PaymentTypeShortTRA=فاتورة -BankDetails=التفاصيل المصرفية -BankCode=رمز المصرف -DeskCode=مدونة مكتبية -BankAccountNumber=رقم الحساب -BankAccountNumberKey=مفتاح -Residence=توطين -IBANNumber=عدد إيبان -IBAN=إيبان -BIC=بيك / سويفت -BICNumber=بيك / سويفت عدد -ExtraInfos=معلومات اضافية -RegulatedOn=وتنظم على -ChequeNumber=رقم الشيك -ChequeOrTransferNumber=شيك / نقل رقم -ChequeMaker=فحص جهاز الإرسال -ChequeBank=الشيكات المصرفية -NetToBePaid=الصافي للدفع -PhoneNumber=الهاتف : -FullPhoneNumber=الهاتف -TeleFax=الفاكس -PrettyLittleSentence=قبول مبلغ المدفوعات المستحقة عن طريق الشيكات الصادرة باسمي بوصفها عضوا في الرابطة للمحاسبة المالية وافقت عليها الإدارة. -IntracommunityVATNumber=Intracommunity عدد من ضريبة القيمة المضافة -PaymentByChequeOrderedTo=دفع الشيكات تدفع لإرسال المستندات ٪ -PaymentByChequeOrderedToShort=الشيكات تدفع لسداد -SendTo=أرسل إلى -PaymentByTransferOnThisBankAccount=الدفع عن طريق التحويل على الحساب البنكي التالي -VATIsNotUsedForInvoice=* عدم الفنية للتطبيق ضريبة القيمة المضافة 293B من المجموعة الاستشارية لاندونيسيا -LawApplicationPart1=من خلال تطبيق القانون 80.335 من 12/05/80 -LawApplicationPart2=البضاعة تظل ملكا لل -LawApplicationPart3=البائع إلى حين استكمال صرف -LawApplicationPart4=ثمنها. -LimitedLiabilityCompanyCapital=SARL برأس مال -UseLine=Apply -UseDiscount=استخدام الخصم -UseCredit=استخدام القروض -UseCreditNoteInInvoicePayment=تخفيض المبلغ لدفع هذه القروض -MenuChequeDeposits=الشيكات الودائع -MenuCheques=الشيكات -MenuChequesReceipts=الشيكات والإيصالات -NewChequeDeposit=ايداع جديدة -ChequesReceipts=الشيكات والإيصالات -ChequesArea=الشيكات مجال الودائع -ChequeDeposits=الشيكات الودائع -Cheques=الشيكات -CreditNoteConvertedIntoDiscount=هذه المذكرة الائتمان أو إيداع فاتورة تم تحويلها إلى ٪ ق -UsBillingContactAsIncoiveRecipientIfExist=فواتير العملاء استخدام عنوان الاتصال بدلا من التصدي لطرف ثالث كما المتلقية للفواتير -ShowUnpaidAll=Show all unpaid invoices -ShowUnpaidLateOnly=وتبين في وقت متأخر من الفواتير غير المدفوعة فقط -PaymentInvoiceRef=دفع فاتورة ٪ ق -ValidateInvoice=تحقق من صحة الفواتير -Cash=نقد -Reported=تأخر -DisabledBecausePayments=غير ممكن لأن هناك بعض المدفوعات -CantRemovePaymentWithOneInvoicePaid=تصنيف لا يمكن إزالة الدفع لأنه ليس هناك على الأقل على الفاتورة سيولي -ExpectedToPay=من المتوقع الدفع -PayedByThisPayment=سيولي هذا الدفع -ClosePaidInvoicesAutomatically=Classify "Paid" all standard or replacement invoices entirely paid. -ClosePaidCreditNotesAutomatically=Classify "Paid" all credit notes entirely paid back. -AllCompletelyPayedInvoiceWillBeClosed=All invoice with no remain to pay will be automatically closed to status "Paid". -ToMakePayment=Pay -ToMakePaymentBack=Pay back -ListOfYourUnpaidInvoices=List of unpaid invoices -NoteListOfYourUnpaidInvoices=Note: This list contains only invoices for third parties you are linked to as a sale representative. -RevenueStamp=Revenue stamp -YouMustCreateInvoiceFromThird=This option is only available when creating invoice from tab "customer" of thirdparty -PDFCrabeDescription=نموذج فاتورة Crabe. نموذج الفاتورة كاملة (دعم الخيار الضريبة على القيمة المضافة ، والخصومات ، وشروط الدفع ، والشعار ، الخ..) -TerreNumRefModelDesc1=Return number with format %syymm-nnnn for standard invoices and %syymm-nnnn for credit notes where yy is year, mm is month and nnnn is a sequence with no break and no return to 0 -MarsNumRefModelDesc1=Return number with format %syymm-nnnn for standard invoices, %syymm-nnnn for replacement invoices, %syymm-nnnn for credit notes and %syymm-nnnn for credit notes where yy is year, mm is month and nnnn is a sequence with no break and no return to 0 -TerreNumRefModelError=وهناك مشروع قانون بدءا من دولار ويوجد بالفعل syymm لا تتفق مع هذا النموذج من التسلسل. إزالة أو تغيير تسميتها لتصبح لتفعيل هذه الوحدة. +PaymentTypeVIR=سپرده های بانکی +PaymentTypeShortVIR=سپرده های بانکی +PaymentTypePRE=منظور بانک +PaymentTypeShortPRE=منظور بانک +PaymentTypeLIQ=پول نقد +PaymentTypeShortLIQ=پول نقد +PaymentTypeCB=کارت های اعتباری +PaymentTypeShortCB=کارت های اعتباری +PaymentTypeCHQ=بررسی +PaymentTypeShortCHQ=بررسی +PaymentTypeTIP=TIP +PaymentTypeShortTIP=TIP +PaymentTypeVAD=در پرداخت خط +PaymentTypeShortVAD=در پرداخت خط +PaymentTypeTRA=پرداخت قبض +PaymentTypeShortTRA=لایحه +BankDetails=اطلاعات بانکی +BankCode=کد بانک +DeskCode=کد میز +BankAccountNumber=شماره حساب +BankAccountNumberKey=کلید +Residence=ماواگیری +IBANNumber=شماره IBAN +IBAN=IBAN +BIC=BIC / SWIFT +BICNumber=BIC / تعداد SWIFT +ExtraInfos=ساعات اضافی +RegulatedOn=تنظیم در +ChequeNumber=چک N ° +ChequeOrTransferNumber=بررسی / انتقال N ° +ChequeMaker=چک فرستنده +ChequeBank=بانک مرکزی ورود +NetToBePaid=خالص پرداخت می شود +PhoneNumber=تلفن +FullPhoneNumber=تلفن +TeleFax=فکس +PrettyLittleSentence=قبول مقدار پرداخت دلیل توسط چک به نام من به عنوان یک عضو انجمن حسابداری تایید شده توسط اداره مالی صادر شده است. +IntracommunityVATNumber=تعداد Intracommunity از مالیات بر ارزش افزوده +PaymentByChequeOrderedTo=چک پرداخت (از جمله مالیات) قابل پرداخت می باشد به%s ارسال به +PaymentByChequeOrderedToShort=چک پرداخت (از جمله مالیات) قابل پرداخت به می باشد +SendTo=ارسال شده به +PaymentByTransferOnThisBankAccount=پرداخت از طریق انتقال در حساب بانکی زیر +VATIsNotUsedForInvoice=* مالیات بر ارزش افزوده غیر قابل اجرا هنر 293B از CGI +LawApplicationPart1=با استفاده از قانون 80.335 از 12/05/80 +LawApplicationPart2=کالا باقی می ماند دارایی +LawApplicationPart3=فروشنده تا تجاری کامل +LawApplicationPart4=قیمت خود را. +LimitedLiabilityCompanyCapital=SARL با سرمایه از +UseLine=درخواست +UseDiscount=استفاده از تخفیف ویژه +UseCredit=استفاده از اعتبار +UseCreditNoteInInvoicePayment=کاهش مقدار به پرداخت با این اعتبار +MenuChequeDeposits=چک سپرده +MenuCheques=چک +MenuChequesReceipts=چک رسید +NewChequeDeposit=سپرده های جدید +ChequesReceipts=چک رسید +ChequesArea=منطقه چک سپرده +ChequeDeposits=چک سپرده +Cheques=چک +CreditNoteConvertedIntoDiscount=این یادداشت اعتباری و یا واریز صورت حساب شده است به%s را تبدیل +UsBillingContactAsIncoiveRecipientIfExist=استفاده از حسابداری و مدیریت مشتری آدرس تماس به جای آدرس شخص ثالث به عنوان دریافت کننده برای صورت حساب +ShowUnpaidAll=نمایش همه فاکتورها پرداخت نشده +ShowUnpaidLateOnly=نمایش فاکتورها اواخر سال پرداخت نشده و تنها +PaymentInvoiceRef=پرداخت صورتحساب از%s +ValidateInvoice=اعتبار فاکتور +Cash=پول نقد +Reported=به تاخیر افتاده +DisabledBecausePayments=ممکن نیست زیرا بعضی از پرداخت وجود دارد +CantRemovePaymentWithOneInvoicePaid=آیا می توانم پرداخت را حذف کنید از حداقل یک فاکتور طبقه بندی شده پرداخت می شود وجود دارد +ExpectedToPay=پرداخت مورد انتظار +PayedByThisPayment=پرداخت شده توسط این پرداخت +ClosePaidInvoicesAutomatically=طبقه بندی "پرداخت" تمام فاکتورها استاندارد یا تعویض به طور کامل پرداخت می شود. +ClosePaidCreditNotesAutomatically=طبقه بندی "پرداخت" تمام یادداشت های اعتباری به طور کامل دوباره پرداخت می شود. +AllCompletelyPayedInvoiceWillBeClosed=همه فاکتور بدون باقی می ماند به پرداخت به طور خودکار به وضعیت "پرداخت" بسته است. +ToMakePayment=پرداخت +ToMakePaymentBack=پرداخت +ListOfYourUnpaidInvoices=فهرست فاکتورها پرداخت نشده +NoteListOfYourUnpaidInvoices=توجه: این لیست فقط شامل صورت حساب برای اشخاص ثالث به شما به عنوان یک نماینده فروش مرتبط است. +RevenueStamp=تمبر درآمد +YouMustCreateInvoiceFromThird=این گزینه تنها زمانی ایجاد فاکتور از تب "مشتری" از thirdparty +PDFCrabeDescription=فاکتور PDF قالب Crabe. قالب فاکتور کامل (قالب توصیه می شود) +TerreNumRefModelDesc1=تعداد بازگشت با فرمت%syymm-NNNN برای فاکتورها استاندارد و%syymm-NNNN برای یادداشت های اعتباری که در آن YY سال است، میلی متر در ماه است و NNNN دنباله بدون استراحت و بدون بازگشت به 0 است +MarsNumRefModelDesc1=تعداد بازگشت با فرمت%syymm-NNNN برای صورت حساب استاندارد،%syymm-NNNN برای فاکتورها جایگزین،%syymm-NNNN برای یادداشت های اعتباری و%syymm-NNNN برای یادداشت های اعتباری که در آن YY سال است، میلی متر در ماه است و NNNN یک دنباله با هیچ است استراحت و بدون بازگشت به 0 +TerreNumRefModelError=لایحه با $ شروع میشوند syymm حال حاضر وجود دارد و سازگار با این مدل توالی نیست. آن را حذف و یا تغییر نام آن را به این ماژول را فعال کنید. ##### Types de contacts ##### -TypeContact_facture_internal_SALESREPFOLL=ممثل العميل متابعة فاتورة -TypeContact_facture_external_BILLING=الزبون فاتورة الاتصال -TypeContact_facture_external_SHIPPING=العملاء الشحن الاتصال -TypeContact_facture_external_SERVICE=خدمة العملاء الاتصال -TypeContact_invoice_supplier_internal_SALESREPFOLL=ممثل المورد متابعة فاتورة -TypeContact_invoice_supplier_external_BILLING=المورد فاتورة الاتصال -TypeContact_invoice_supplier_external_SHIPPING=المورد الشحن الاتصال -TypeContact_invoice_supplier_external_SERVICE=المورد خدمة الاتصال +TypeContact_facture_internal_SALESREPFOLL=نماینده زیر تا صورتحساب مشتری +TypeContact_facture_external_BILLING=تماس با فاکتور به مشتری +TypeContact_facture_external_SHIPPING=تماس با حمل و نقل با مشتری +TypeContact_facture_external_SERVICE=خدمات مشتریان تماس با +TypeContact_invoice_supplier_internal_SALESREPFOLL=نماینده زیر کردن منبع فاکتور +TypeContact_invoice_supplier_external_BILLING=منبع تماس با فاکتور +TypeContact_invoice_supplier_external_SHIPPING=تماس با تامین کننده حمل و نقل +TypeContact_invoice_supplier_external_SERVICE=خدمات منبع تماس با diff --git a/htdocs/langs/fa_IR/boxes.lang b/htdocs/langs/fa_IR/boxes.lang index ec7ae80a60c..9ce956f693d 100644 --- a/htdocs/langs/fa_IR/boxes.lang +++ b/htdocs/langs/fa_IR/boxes.lang @@ -1,91 +1,91 @@ # Dolibarr language file - Source file is en_US - boxes -BoxLastRssInfos=Rss المعلومات -BoxLastProducts=ق الماضي ٪ منتجات / خدمات -# BoxProductsAlertStock=Products in stock alert -BoxLastProductsInContract=٪ ق الماضي التعاقد المنتجات / الخدمات -BoxLastSupplierBills=الماضي فواتير المورد -BoxLastCustomerBills=الماضي العميل الفواتير -BoxOldestUnpaidCustomerBills=اقدم العميل الفواتير غير المدفوعة -BoxOldestUnpaidSupplierBills=أقدم المورد الفواتير غير المدفوعة -BoxLastProposals=آخر مقترحات تجارية -BoxLastProspects=آفاق الماضي -BoxLastCustomers=آخر الزبائن -BoxLastSuppliers=الماضي الموردين -BoxLastCustomerOrders=آخر طلبات الزبائن -BoxLastBooks=آخر الكتب -BoxLastActions=آخر الأعمال -BoxLastContracts=آخر العقود -# BoxLastContacts=Last contacts/addresses -# BoxLastMembers=Last members -# BoxFicheInter=Last interventions -# BoxCurrentAccounts=Opened accounts balance -BoxSalesTurnover=مبيعات -BoxTotalUnpaidCustomerBills=مجموع الفواتير غير المدفوعة للعميل -BoxTotalUnpaidSuppliersBills=مجموع الفواتير غير المدفوعة المورد -BoxTitleLastBooks=آخر الكتب المسجلة ق ٪ -BoxTitleNbOfCustomers=دي اسم العميل -BoxTitleLastRssInfos=آخر الأخبار من ٪ ق ق ٪ -BoxTitleLastProducts=آخر تعديل ٪ ق المنتجات / الخدمات -# BoxTitleProductsAlertStock=Products in stock alert -BoxTitleLastCustomerOrders=آخر تعديل ق ٪ طلبات الزبائن -BoxTitleLastSuppliers=الماضي وسجل الموردين ق ٪ -BoxTitleLastCustomers=الماضي وسجل للعملاء ل ٪ -BoxTitleLastModifiedSuppliers=%s آخر تعديل الموردين -BoxTitleLastModifiedCustomers=%s آخر تعديل الزبائن -BoxTitleLastCustomersOrProspects=آخر تعديل ق ٪ العملاء أو آفاق -BoxTitleLastPropals=٪ ق الماضي سجلت مقترحات -BoxTitleLastCustomerBills=ق الماضي ٪ العميل الفواتير -BoxTitleLastSupplierBills=ق الماضي ٪ فواتير المورد -BoxTitleLastProspects=الماضي وسجل آفاق ق ٪ -BoxTitleLastModifiedProspects=%s آخر تعديل آفاق -BoxTitleLastProductsInContract=الماضي ٪ ق المنتجات / الخدمات في عقد -BoxTitleLastModifiedMembers=آخر تعديل اعضاء ق ٪ -# BoxTitleLastFicheInter=Last %s modified intervention -BoxTitleOldestUnpaidCustomerBills=أقدم ٪ ق العميل الفواتير غير المدفوعة -BoxTitleOldestUnpaidSupplierBills=أقدم ٪ ق المورد الفواتير غير المدفوعة -# BoxTitleCurrentAccounts=Opened account's balances -BoxTitleSalesTurnover=مبيعات -BoxTitleTotalUnpaidCustomerBills=العميل الفواتير غير المدفوعة -BoxTitleTotalUnpaidSuppliersBills=المورد الفواتير غير المدفوعة -# BoxTitleLastModifiedContacts=Last %s modified contacts/addresses -BoxMyLastBookmarks=آخر العناوين ق ٪ -# BoxOldestExpiredServices=Oldest active expired services -# BoxLastExpiredServices=Last %s oldest contacts with active expired services -BoxTitleLastActionsToDo=ق ٪ الإجراءات الأخيرة للقيام -BoxTitleLastContracts=%s العقود الماضية -# BoxTitleLastModifiedDonations=Last %s modified donations -# BoxTitleLastModifiedExpenses=Last %s modified expenses -# BoxGlobalActivity=Global activity (invoices, proposals, orders) -FailedToRefreshDataInfoNotUpToDate=فشلت في تجديد تدفق RSS. اخر تحديث تاريخ : ٪ ق -LastRefreshDate=تاريخ آخر تجديد -NoRecordedBookmarks=No bookmarks defined. Click هنا لإضافة إشارات مرجعية. -# ClickToAdd=Click here to add. -NoRecordedCustomers=لم تسجل العملاء -# NoRecordedContacts=No recorded contacts -NoActionsToDo=أي إجراءات للقيام -NoRecordedOrders=لم تسجل أوامر العملاء -NoRecordedProposals=لم تسجل مقترحات -NoRecordedInvoices=لم تسجل العملاء والفواتير -NoUnpaidCustomerBills=لا العميل الفواتير غير المدفوعة -NoRecordedSupplierInvoices=لم تسجل فواتير المورد -NoUnpaidSupplierBills=لا المورد الفواتير غير المدفوعة -NoModifiedSupplierBills=أي مورد مسجل في الفواتير -NoRecordedProducts=لم تسجل المنتجات / الخدمات -NoRecordedProspects=لم تسجل آفاق -NoContractedProducts=أي المنتجات / الخدمات المتعاقد عليها -NoRecordedContracts=لا عقود المسجلة -# NoRecordedInterventions=No recorded interventions -# BoxLatestSupplierOrders=Latest supplier orders -# BoxTitleLatestSupplierOrders=%s latest supplier orders -# NoSupplierOrder=No recorded supplier order -# BoxCustomersInvoicesPerMonth=Customer invoices per month -# BoxSuppliersInvoicesPerMonth=Supplier invoices per month -# BoxCustomersOrdersPerMonth=Customer orders per month -# BoxSuppliersOrdersPerMonth=Supplier orders per month -# BoxProposalsPerMonth=Proposals per month -# NoTooLowStockProducts=No product under the low stock limit -# BoxProductDistribution=Products/Services distribution -# BoxProductDistributionFor=Distribution of %s for %s -ForCustomersInvoices=العملاء والفواتير -# ForCustomersOrders=Customers orders -ForProposals=مقترحات +BoxLastRssInfos=اطلاعات آر اس اس +BoxLastProducts=تاریخ و زمان آخرین٪ محصولات / خدمات +BoxProductsAlertStock=محصولات موجود در انبار هشدار +BoxLastProductsInContract=تاریخ و زمان آخرین٪ از ناحیهی محصولات / خدمات +BoxLastSupplierBills=صورت حساب آخرین کننده +BoxLastCustomerBills=صورت حساب آخرین مشتری +BoxOldestUnpaidCustomerBills=فاکتورها قدیمی تر مشتری پرداخت نشده است +BoxOldestUnpaidSupplierBills=فاکتورها قدیمی تر عرضه کننده کالا پرداخت نشده است +BoxLastProposals=آخرین طرح های تجاری +BoxLastProspects=چشم انداز تاریخ و زمان آخرین اصلاح شده +BoxLastCustomers=مشتریان آخرین تغییر +BoxLastSuppliers=تامین کنندگان آخرین تغییر +BoxLastCustomerOrders=آخرین سفارشات مشتری +BoxLastBooks=آخرین کتاب ها +BoxLastActions=تاریخ و زمان آخرین اقدامات +BoxLastContracts=تاریخ و زمان آخرین قرارداد +BoxLastContacts=تاریخ و زمان آخرین تماس / آدرس +BoxLastMembers=آخرین عضو +BoxFicheInter=تاریخ و زمان آخرین مداخلات +BoxCurrentAccounts=افتتاح موجودی حساب +BoxSalesTurnover=گردش مالی فروش +BoxTotalUnpaidCustomerBills=فاکتورها مجموع مشتری پرداخت نشده است +BoxTotalUnpaidSuppliersBills=فاکتورها مجموع عرضه کننده کالا پرداخت نشده است +BoxTitleLastBooks=تاریخ و زمان آخرین٪ کتاب ثبت +BoxTitleNbOfCustomers=تعدادی از مشتریان +BoxTitleLastRssInfos=تاریخ و زمان آخرین٪ خبر از%s +BoxTitleLastProducts=تاریخ و زمان آخرین%s تغییر داده محصولات / خدمات +BoxTitleProductsAlertStock=محصولات موجود در انبار هشدار +BoxTitleLastCustomerOrders=تاریخ و زمان آخرین%s را سفارش مشتری تغییر +BoxTitleLastSuppliers=تاریخ و زمان آخرین٪ بازدید کنندگان تامین کنندگان ثبت +BoxTitleLastCustomers=تاریخ و زمان آخرین٪ ثبت مشتریان +BoxTitleLastModifiedSuppliers=تاریخ و زمان آخرین٪ بازدید کنندگان تامین کنندگان اصلاح شده +BoxTitleLastModifiedCustomers=تاریخ و زمان آخرین٪ مشتریان اصلاح شده +BoxTitleLastCustomersOrProspects=تاریخ و زمان آخرین٪ مشتریان اصلاح و یا چشم انداز +BoxTitleLastPropals=تاریخ و زمان آخرین%s را پیشنهاد ثبت +BoxTitleLastCustomerBills=صورت حساب آخرین٪ بازدید کنندگان مشتری +BoxTitleLastSupplierBills=صورت حساب آخرین٪ کننده است +BoxTitleLastProspects=تاریخ و زمان آخرین%s در چشم انداز ثبت +BoxTitleLastModifiedProspects=تاریخ و زمان آخرین%s در چشم انداز تغییر +BoxTitleLastProductsInContract=تاریخ و زمان آخرین٪ محصولات / خدمات در قرارداد +BoxTitleLastModifiedMembers=تاریخ و زمان آخرین٪ اعضای اصلاح شده +BoxTitleLastFicheInter=تاریخ و زمان آخرین%s را مداخله اصلاح شده +BoxTitleOldestUnpaidCustomerBills=فاکتورها قدیمی تر از%s مشتری پرداخت نشده است +BoxTitleOldestUnpaidSupplierBills=فاکتورها قدیمی تر از%s عرضه کننده کالا پرداخت نشده است +BoxTitleCurrentAccounts=مانده حساب باز است +BoxTitleSalesTurnover=گردش مالی فروش +BoxTitleTotalUnpaidCustomerBills=صورت حساب به مشتری پرداخت نشده است +BoxTitleTotalUnpaidSuppliersBills=فاکتورها منبع پرداخت نشده است +BoxTitleLastModifiedContacts=تاریخ و زمان آخرین%s تغییر اطلاعات تماس / آدرس +BoxMyLastBookmarks=آخرین٪ من بازدید کنندگان بوک مارک ها +BoxOldestExpiredServices=قدیمی تر خدمات منقضی فعال +BoxLastExpiredServices=تاریخ و زمان آخرین٪ قدیمی ترین ارتباط با خدمات منقضی فعال +BoxTitleLastActionsToDo=تاریخ و زمان آخرین اقدامات%s را به انجام +BoxTitleLastContracts=تاریخ و زمان آخرین%s در قرارداد +BoxTitleLastModifiedDonations=تاریخ و زمان آخرین٪ بازدید کنندگان کمک های مالی اصلاح شده +BoxTitleLastModifiedExpenses=تاریخ و زمان آخرین%s در هزینه های اصلاح شده +BoxGlobalActivity=فعالیت های جهانی (فاکتورها، پیشنهادات، سفارشات) +FailedToRefreshDataInfoNotUpToDate=به روز کردن شار RSS شکست خورده است. آخرین تاریخ تازه کردن موفق:%s را +LastRefreshDate=آخرین تاریخ تازه کردن +NoRecordedBookmarks=بدون بوک مارک ها تعریف شده است. +ClickToAdd=برای اضافه کردن اینجا کلیک کنید. +NoRecordedCustomers=بدون مشتریان ثبت +NoRecordedContacts=بدون اطلاعات تماس ثبت +NoActionsToDo=هیچ عملیاتی برای انجام +NoRecordedOrders=سفارشات بدون مشتری ثبت شده است +NoRecordedProposals=هیچ طرح ثبت +NoRecordedInvoices=فاکتورها هیچ مشتری ثبت شده است +NoUnpaidCustomerBills=فاکتورها هیچ مشتری پرداخت نشده است +NoRecordedSupplierInvoices=فاکتورها بدون منبع ثبت در +NoUnpaidSupplierBills=فاکتورها بدون منبع پرداخت نشده است +NoModifiedSupplierBills=فاکتورها بدون منبع ثبت در +NoRecordedProducts=بدون ثبت محصولات / خدمات +NoRecordedProspects=بدون چشم انداز ثبت +NoContractedProducts=محصولات / خدمات قرارداد +NoRecordedContracts=بدون قرارداد ثبت +NoRecordedInterventions=بدون مداخلات ثبت +BoxLatestSupplierOrders=آخرین سفارشات کالا +BoxTitleLatestSupplierOrders=٪ آخرین سفارشات کالا +NoSupplierOrder=بدون منظور عرضه کننده کالا ثبت +BoxCustomersInvoicesPerMonth=صورت حساب به مشتری در هر ماه +BoxSuppliersInvoicesPerMonth=فاکتورها منبع در هر ماه +BoxCustomersOrdersPerMonth=مشتری در هر ماه +BoxSuppliersOrdersPerMonth=سفارشات تامین کننده در هر ماه +BoxProposalsPerMonth=پیشنهادات در هر ماه +NoTooLowStockProducts=هیچ محصولی در زیر حد سهام کم +BoxProductDistribution=محصولات / خدمات توزیع +BoxProductDistributionFor=توزیع از%s را برای%s +ForCustomersInvoices=مشتریان فاکتورها +ForCustomersOrders=سفارشات مشتریان +ForProposals=پیشنهادات diff --git a/htdocs/langs/fa_IR/cashdesk.lang b/htdocs/langs/fa_IR/cashdesk.lang index fae73427a12..29dbb438312 100644 --- a/htdocs/langs/fa_IR/cashdesk.lang +++ b/htdocs/langs/fa_IR/cashdesk.lang @@ -1,40 +1,40 @@ # Language file - Source file is en_US - cashdesk -# CashDeskMenu=Point of sale -# CashDesk=Point of sale -CashDesks=نقاط البيع -CashDeskBank=الحساب المصرفي -# CashDeskBankCash=Bank account (cash) -# CashDeskBankCB=Bank account (card) -# CashDeskBankCheque=Bank account (cheque) +CashDeskMenu=نقطه فروش +CashDesk=نقطه فروش +CashDesks=نقطه ای از فروش +CashDeskBank=حساب بانکی +CashDeskBankCash=حساب بانکی (پول نقد) +CashDeskBankCB=حساب بانکی (کارت) +CashDeskBankCheque=حساب بانکی (چک) CashDeskWarehouse=مخزن -# CashdeskShowServices=Selling services -CashDeskProducts=المنتجات -CashDeskStock=الأسهم -# CashDeskOn=on -CashDeskThirdParty=طرف ثالث -# CashdeskDashboard=Point of sale access -# ShoppingCart=Shopping cart -# NewSell=New sell -# BackOffice=Back office -# AddThisArticle=Add this article -# RestartSelling=Go back on sell -# SellFinished=Sell finished -# PrintTicket=Print ticket -# NoProductFound=No article found -# ProductFound=product found -# ProductsFound=products found -# NoArticle=No article -# Identification=Identification -# Article=Article -# Difference=Difference -# TotalTicket=Total ticket -# NoVAT=No VAT for this sale -Change=تلقى الزائدة -# CalTip=Click to view the calendar -# CashDeskSetupStock=You ask to decrease stock on invoice creation but warehouse for this is was not defined
    Change stock module setup, or choose a warehouse -# BankToPay=Charge Account -ShowCompany=وتبين للشركة -# ShowStock=Show warehouse -# DeleteArticle=Click to remove this article -# FilterRefOrLabelOrBC=Search (Ref/Label) -# UserNeedPermissionToEditStockToUsePos=You ask to decrease stock on invoice creation, so user that use POS need to have permission to edit stock. +CashdeskShowServices=فروش خدمات +CashDeskProducts=محصولات +CashDeskStock=موجودی +CashDeskOn=بر +CashDeskThirdParty=شخص ثالث +CashdeskDashboard=نقطه دسترسی فروش +ShoppingCart=سبد خرید +NewSell=فروش جدید +BackOffice=دفتر برگشت +AddThisArticle=اضافه کردن این مقاله +RestartSelling=بازگشت در فروش +SellFinished=فروش به پایان رسید +PrintTicket=چاپ بلیط +NoProductFound=هیچ مقاله در بر داشت +ProductFound=محصول یافت +ProductsFound=محصولات یافت +NoArticle=هیچ مقاله +Identification=شناسایی +Article=مقاله +Difference=تفاوت +TotalTicket=بلیط ها +NoVAT=بدون مالیات بر ارزش افزوده برای این فروش +Change=اضافی دریافت +CalTip=برای مشاهده تقویم کلیک کنید +CashDeskSetupStock=از شما درخواست برای کاهش سهام در ایجاد صورتحساب اما انبار برای این بود تعریف نشده
    تغییر تنظیمات ماژول سهام، و یا یک انبار را انتخاب کنید +BankToPay=شارژ حساب +ShowCompany=نمایش شرکت +ShowStock=نمایش انبار +DeleteArticle=برای حذف این مقاله کلیک کنید +FilterRefOrLabelOrBC=جستجو (کد عکس / برچسب) +UserNeedPermissionToEditStockToUsePos=از شما درخواست برای کاهش سهام در ایجاد فاکتور، تا کاربر که با استفاده از POS نیاز به اجازه ویرایش سهام. diff --git a/htdocs/langs/fa_IR/categories.lang b/htdocs/langs/fa_IR/categories.lang index 5d0f6c31c56..53d7abd3002 100644 --- a/htdocs/langs/fa_IR/categories.lang +++ b/htdocs/langs/fa_IR/categories.lang @@ -1,113 +1,113 @@ # Dolibarr language file - Source file is en_US - categories -Category=الفئة -Categories=الفئات -Rubrique=الفئة -Rubriques=الفئات -categories=الفئات -TheCategorie=فئة -NoCategoryYet=أي فئة من هذا النوع التي أنشئت -In=في -AddIn=أضيف في -modify=تعديل -Classify=تصنيف -CategoriesArea=منطقة الفئات -ProductsCategoriesArea=منتجات / خدمات الفئات المنطقة -SuppliersCategoriesArea=الموردين منطقة الفئات -CustomersCategoriesArea=العملاء منطقة الفئات -ThirdPartyCategoriesArea=أطراف ثالثة 'منطقة الفئات -MembersCategoriesArea=أعضاء فئات المناطق -# ContactsCategoriesArea=Contacts categories area -MainCats=الفئات الرئيسية -SubCats=فرعية -CatStatistics=احصاءات -CatList=قائمة الفئات -AllCats=جميع الفئات -ViewCat=وترى هذه الفئة -NewCat=إضافة فئة -NewCategory=فئة جديدة -ModifCat=تعديل الفئة -CatCreated=فئة خلق -CreateCat=خلق فئة -CreateThisCat=تهيئة هذه الفئة -ValidateFields=صحة المجالات -NoSubCat=لا فرعية. -SubCatOf=فرعية -FoundCats=العثور على الفئات -FoundCatsForName=فئات إيجاد اسم : -FoundSubCatsIn=فرعية موجودة في الفئة -ErrSameCatSelected=كنت قد اخترت نفس الفئة عدة مرات -ErrForgotCat=نسيت اختيار الفئة -ErrForgotField=نسيت أن أبلغ المجالات -ErrCatAlreadyExists=هذا الاسم مستخدم بالفعل -AddProductToCat=إضافة هذا المنتج إلى الفئة؟ -ImpossibleAddCat=من المستحيل أن تضيف فئة -ImpossibleAssociateCategory=من المستحيل المنتسبين لهذه الفئة -WasAddedSuccessfully=ق ٪ أضيفت بنجاح. -ObjectAlreadyLinkedToCategory=العنصر المرتبط بالفعل في هذه الفئة. -CategorySuccessfullyCreated=ق ٪ من هذه الفئة تم اضافة بالنجاح. -ProductIsInCategories=المنتجات / الخدمات وتملك على الفئات التالية -SupplierIsInCategories=لطرف ثالث يملك الموردين الفئات التالية -CompanyIsInCustomersCategories=هذا الطرف الثالث وتملك ليلي العملاء / آفاق الفئات -CompanyIsInSuppliersCategories=ويملك هذا الطرف الثالث على الفئات التالية الموردين -MemberIsInCategories=يملك هذا العضو إلى الفئات التالية الأعضاء -# ContactIsInCategories=This contact owns to following contacts categories -ProductHasNoCategory=هذا المنتج / الخدمة وليس في أي فئات -SupplierHasNoCategory=هذا المورد ليست في أي فئات -CompanyHasNoCategory=هذه الشركة ليست في أي فئات -MemberHasNoCategory=هذا العضو غير موجود في أي فئات -# ContactHasNoCategory=This contact is not in any categories -ClassifyInCategory=تصنف في الفئة -NoneCategory=بلا -# NotCategorized=Without category -CategoryExistsAtSameLevel=هذه الفئة موجودة بالفعل في نفس المكان -ReturnInProduct=عودة إلى المنتجات / الخدمات بطاقة -ReturnInSupplier=عودة الى مورد بطاقة -ReturnInCompany=عودة الى الزبون / احتمال بطاقة -ContentsVisibleByAll=محتويات سوف تكون واضحة من جانب جميع -ContentsVisibleByAllShort=محتويات مرئية من قبل جميع -ContentsNotVisibleByAllShort=محتويات غير مرئي من قبل جميع -# CategoriesTree=Categories tree -DeleteCategory=حذف فئة -ConfirmDeleteCategory=هل أنت متأكد من أنك تريد حذف هذه الفئة؟ -RemoveFromCategory=إزالة الارتباط مع catégorie -RemoveFromCategoryConfirm=هل أنت متأكد من أنك تريد إزالة الربط بين الصفقة والفئة؟ -NoCategoriesDefined=أي فئة محددة -SuppliersCategoryShort=فئة الموردين -CustomersCategoryShort=فئة الزبائن -ProductsCategoryShort=فئة المنتجات -MembersCategoryShort=أعضاء الفئة -SuppliersCategoriesShort=فئات الموردين -CustomersCategoriesShort=فئات العملاء -CustomersProspectsCategoriesShort=Custo. / Prosp. الفئات -ProductsCategoriesShort=فئات المنتجات -MembersCategoriesShort=أعضاء الفئات -# ContactCategoriesShort=Contacts categories -ThisCategoryHasNoProduct=هذه الفئة لا تحتوي على أي منتج. -ThisCategoryHasNoSupplier=هذه الفئة لا تحتوي على أي مورد. -ThisCategoryHasNoCustomer=هذه الفئة لا تحتوي على أي عميل. -ThisCategoryHasNoMember=هذا التصنيف لا يحتوي على أي عضو. -# ThisCategoryHasNoContact=This category does not contain any contact. -AssignedToCustomer=المخصصة للعميل -AssignedToTheCustomer=يكلف العميل -InternalCategory=فئة Inernal -CategoryContents=محتويات هذه الفئة -CategId=معرف الفئة -CatSupList=قائمة الموردين الفئات -CatCusList=قائمة العملاء / احتمال الفئات -CatProdList=قائمة المنتجات فئات -CatMemberList=قائمة بأسماء أعضاء الفئات -# CatContactList=List of contact categories and contact -# CatSupLinks=Links between suppliers and categories -# CatCusLinks=Links between customers/prospects and categories -# CatProdLinks=Links between products/services and categories -# CatMemberLinks=Links between members and categories -# CatProdLinks=Links between products/services and categories -# CatCusLinks=Links between customers/prospects and categories -# CatSupLinks=Links between suppliers and categories -# DeleteFromCat=Remove from category -# DeletePicture=Picture delete -# ConfirmDeletePicture=Confirm picture deletion? -# ExtraFieldsCategories=Complementary attributes -# CategoriesSetup=Categories setup -# CategorieRecursiv=Link with parent category automatically -# CategorieRecursivHelp=If activated, product will also linked to parent category when adding into a subcategory +Category=رده +Categories=دسته بندی ها +Rubrique=رده +Rubriques=دسته بندی ها +categories=مجموعه ها +TheCategorie=دسته +NoCategoryYet=بدون دسته از این نوع ایجاد +In=به +AddIn=اضافه کردن در +modify=تغییر دادن +Classify=دسته بندی کردن +CategoriesArea=دسته بندی های منطقه +ProductsCategoriesArea=منطقه محصولات / خدمات مجموعه ها +SuppliersCategoriesArea=منطقه تولید کنندگان مجموعه ها +CustomersCategoriesArea=منطقه مشتریان مجموعه ها +ThirdPartyCategoriesArea=منطقه احزاب سوم مجموعه ها +MembersCategoriesArea=منطقه گروهها کاربران +ContactsCategoriesArea=منطقه تماس ها مجموعه ها +MainCats=دسته بندی های اصلی +SubCats=زیر شاخه ها +CatStatistics=ارقام +CatList=فهرست مجموعه ها +AllCats=تمام دسته بندی +ViewCat=گروه نمایش +NewCat=اضافه کردن دسته بندی +NewCategory=رده جدید +ModifCat=تغییر دسته +CatCreated=رده ایجاد +CreateCat=ایجاد گروه +CreateThisCat=ایجاد این گروه +ValidateFields=اعتبارسنجی زمینه +NoSubCat=بدون زیرشاخه. +SubCatOf=زیرشاخه +FoundCats=دسته بندی پیدا نشد +FoundCatsForName=دسته بندی پیدا نشد برای نام: +FoundSubCatsIn=زیر شاخه موجود در گروه +ErrSameCatSelected=شما انتخاب شده گروه های مشابه چند بار +ErrForgotCat=شما را فراموش کرده به انتخاب گروه +ErrForgotField=شما را فراموش کرده به اطلاع زمینه +ErrCatAlreadyExists=این نام قبلا استفاده شده +AddProductToCat=اضافه کردن این محصول را به یک موضوع؟ +ImpossibleAddCat=غیر ممکن برای اضافه کردن گروه +ImpossibleAssociateCategory=غیر ممکن است از دسته +WasAddedSuccessfully=%s با موفقیت اضافه شد. +ObjectAlreadyLinkedToCategory=عنصر در حال حاضر به این گروه مرتبط است. +CategorySuccessfullyCreated=این رده در%s را با موفقیت اضافه شده است. +ProductIsInCategories=محصولات / خدمات دارای به مقوله های زیر است +SupplierIsInCategories=شخص ثالث صاحب به زیر تامین کنندگان مجموعه ها +CompanyIsInCustomersCategories=این شخص ثالث صاحب به زیر مشتریان / چشم انداز مجموعه ها +CompanyIsInSuppliersCategories=این شخص ثالث صاحب به زیر تامین کنندگان مجموعه ها +MemberIsInCategories=این عضو صاحب به زیر اعضا گروهها +ContactIsInCategories=این تماس با مالک به زیر تماس ها مجموعه ها +ProductHasNoCategory=این محصول / خدمات در هر دسته بندی نشده +SupplierHasNoCategory=این منبع در هر دسته بندی نشده +CompanyHasNoCategory=این شرکت در هر دسته بندی نشده +MemberHasNoCategory=این عضو است در هر دسته بندی نشده +ContactHasNoCategory=این تماس است در هر دسته بندی نشده +ClassifyInCategory=طبقه بندی در گروه +NoneCategory=هیچ یک +NotCategorized=بدون دسته بندی +CategoryExistsAtSameLevel=این رده در حال حاضر با این کد عکس وجود دارد +ReturnInProduct=برگشت به کارت محصول / خدمات +ReturnInSupplier=برگشت به کارت کالا +ReturnInCompany=برگشت به کارت مشتری / چشم انداز +ContentsVisibleByAll=مطالب توسط همه قابل مشاهده خواهد بود +ContentsVisibleByAllShort=مطالب توسط همه قابل مشاهده +ContentsNotVisibleByAllShort=مطالب توسط همه قابل رویت نیست +CategoriesTree=شاخه درخت +DeleteCategory=حذف گروه +ConfirmDeleteCategory=آیا مطمئن هستید که می خواهید این دسته را حذف کنید؟ +RemoveFromCategory=حذف لینک با categorie +RemoveFromCategoryConfirm=آیا مطمئن هستید که می خواهید به حذف ارتباط بین معامله و گروه؟ +NoCategoriesDefined=بدون دسته بندی های تعریف شده +SuppliersCategoryShort=طبقه بندی تامین کنندگان +CustomersCategoryShort=دسته بندی +ProductsCategoryShort=دسته بندی محصولات +MembersCategoryShort=گروه کاربران +SuppliersCategoriesShort=تولید کنندگان مجموعه ها +CustomersCategoriesShort=مشتریان مجموعه ها +CustomersProspectsCategoriesShort=مشتریان مشخصات. / Prosp. مجموعه ها +ProductsCategoriesShort=دسته بندی محصولات +MembersCategoriesShort=گروهها کاربران +ContactCategoriesShort=تماس ها مجموعه ها +ThisCategoryHasNoProduct=این رده در کل حاوی هر محصول نیست. +ThisCategoryHasNoSupplier=این رده در هیچ منبع نیست. +ThisCategoryHasNoCustomer=این رده در کل حاوی هر مشتری نیست. +ThisCategoryHasNoMember=این رده در هیچ عضو نیست. +ThisCategoryHasNoContact=این رده در کل حاوی هر گونه ارتباط نیست. +AssignedToCustomer=واگذار شده به یک مشتری +AssignedToTheCustomer=واگذار شده به مشتری +InternalCategory=گروه داخلی +CategoryContents=مطالب دسته بندی +CategId=شناسه گروه +CatSupList=فهرست دسته بندی های منبع +CatCusList=فهرست دسته بندی های مشتری / چشم انداز +CatProdList=لیست محصولات دسته بندی +CatMemberList=فهرست کاربران گروهها +CatContactList=فهرست دسته بندی های تماس و ارتباط با ما +CatSupLinks=ارتباط بین تامین کنندگان و گروهها +CatCusLinks=ارتباط بین مشتریان / چشم انداز ها و دسته ها +CatProdLinks=لینک بین محصولات / خدمات و دسته ها +CatMemberLinks=ارتباط بین اعضا و گروهها +CatProdLinks=لینک بین محصولات / خدمات و دسته ها +CatCusLinks=ارتباط بین مشتریان / چشم انداز ها و دسته ها +CatSupLinks=ارتباط بین تامین کنندگان و گروهها +DeleteFromCat=حذف از گروه +DeletePicture=تصویر حذف کنید +ConfirmDeletePicture=تأیید حذف تصویر؟ +ExtraFieldsCategories=ویژگی های مکمل +CategoriesSetup=شاخه ها راه اندازی +CategorieRecursiv=پیوند با گروه پدر و مادر به طور خودکار +CategorieRecursivHelp=اگر فعال شود، محصول نیز به دسته پدر و مادر مرتبط است که با اضافه کردن به زیرشاخه diff --git a/htdocs/langs/fa_IR/commercial.lang b/htdocs/langs/fa_IR/commercial.lang index 84b0e7476f5..ffe74b95edb 100644 --- a/htdocs/langs/fa_IR/commercial.lang +++ b/htdocs/langs/fa_IR/commercial.lang @@ -1,95 +1,95 @@ # Dolibarr language file - Source file is en_US - commercial -Commercial=التجارية -CommercialArea=منطقة تجارية -CommercialCard=بطاقة تجارية -CustomerArea=منطقة العملاء -Customer=العميل -Customers=العملاء -Prospect=احتمال -Prospects=آفاق -DeleteAction=حذف عمل / المهمة -NewAction=عمل جديدة / المهمة -AddAction=أضف العمل / المهمة -AddAnAction=إضافة عمل / المهمة -AddActionRendezVous=إضافة مهمة رانديفو -Rendez-Vous=الموعد -ConfirmDeleteAction=هل أنت متأكد من أنك تريد حذف هذه المهمة؟ -CardAction=بطاقة العمل -PercentDone=النسبة المئوية لعمله -ActionOnCompany=مهمة عن الشركة -ActionOnContact=مهمة حول الاتصال -TaskRDV=اجتماعات -TaskRDVWith=لقاء مع ق ٪ -ShowTask=وتظهر هذه المهمة -ShowAction=وتظهر العمل -ActionsReport=تقرير الأعمال -# ThirdPartiesOfSaleRepresentative=Thirdparties with sales representative -SalesRepresentative=ممثل مبيعات -SalesRepresentatives=مندوبي المبيعات -SalesRepresentativeFollowUp=ممثل مبيعات (متابعة) -SalesRepresentativeSignature=ممثل مبيعات (التوقيع) -CommercialInterlocutor=المحاور التجارية -ErrorWrongCode=رمز الخطأ -NoSalesRepresentativeAffected=أي ممثل مبيعات المتضررة -ShowCustomer=وتبين للعملاء -ShowProspect=وتظهر احتمال -ListOfProspects=قائمة التوقعات -ListOfCustomers=قائمة العملاء -LastDoneTasks=٪ ق الماضي مهام عمله -LastRecordedTasks=وسجلت آخر المهام -LastActionsToDo=الماضي ٪ اقدم الإجراءات لم تكتمل -DoneAndToDoActionsFor=وعمله من أجل القيام بالمهام ق ٪ -DoneAndToDoActions=ويتم القيام بمهام -DoneActions=إجراءات عمله -DoneActionsFor=إجراءات لعمله ق ٪ -ToDoActions=عدم اكتمال الإجراءات -ToDoActionsFor=لعدم اكتمال الإجراءات ق ٪ -SendPropalRef=اقتراح ارسال التجارية ق ٪ -SendOrderRef=من أجل إرسال المستندات ٪ -# StatusNotApplicable=Not applicable -StatusActionToDo=القيام -StatusActionDone=فعل -MyActionsAsked=لقد سجلت الأعمال -MyActionsToDo=الإجراءات التي يتعين علي القيام به -MyActionsDone=الإجراءات التي أثرت لي -StatusActionInProcess=في العملية -TasksHistoryForThisContact=إجراءات لهذا الاتصال -LastProspectDoNotContact=لا اتصال -LastProspectNeverContacted=اتصل أبدا -LastProspectToContact=للاتصال -LastProspectContactInProcess=في عملية الاتصال -LastProspectContactDone=الاتصال به -DateActionPlanned=تاريخ العمل المزمع -DateActionDone=تاريخ العمل به -ActionAskedBy=طلبت العمل -ActionAffectedTo=العمل على المتضررين -ActionDoneBy=العمل الذي قام به -ActionUserAsk=التي سجلتها -ErrorStatusCantBeZeroIfStarted=إذا كان المجال 'تاريخ عمله هو شغلها ، وبدأ العمل (أو انتهت) ، وذلك الميدان' الحالة 'لا يمكن أن يكون 0 ٪ ٪. -ActionAC_TEL=اتصال هاتفي -ActionAC_FAX=إرسال فاكس -ActionAC_PROP=إرسال اقتراح -ActionAC_EMAIL=ارسال بريد الكتروني -ActionAC_RDV=اجتماعات -ActionAC_FAC=ارسال الفواتير -ActionAC_REL=ارسال الفواتير (للتذكير) -ActionAC_CLO=إغلاق -ActionAC_EMAILING=إرسال البريد الإلكتروني الجماعي -ActionAC_COM=لكي ترسل عن طريق البريد -# ActionAC_SHIP=Send shipping by mail -ActionAC_SUP_ORD=أرسل النظام المورد عن طريق البريد -ActionAC_SUP_INV=إرسال فاتورة المورد عن طريق البريد -ActionAC_OTH=أخرى -# ActionAC_OTH_AUTO=Other (automatically inserted events) -# ActionAC_MANUAL=Manually inserted events -# ActionAC_AUTO=Automatically inserted events -# Stats=Sales statistics -# CAOrder=Sales volume (validated orders) -# FromTo=from %s to %s -# MargeOrder=Margins (validated orders) -# RecapAnnee=Summary of the year -# NoData=There is no data -StatusProsp=آفاق الوضع -DraftPropals=مقترحات مشاريع تجارية -# SearchPropal=Search a commercial proposal -# CommercialDashboard=Commercial summary +Commercial=تجاری +CommercialArea=منطقه تجاری +CommercialCard=کارت بازرگانی +CustomerArea=منطقه مشتریان +Customer=مشتری +Customers=مشتریان +Prospect=چشم انداز +Prospects=چشم انداز +DeleteAction=حذف یک رویداد / کار +NewAction=رویداد جدید / کار +AddAction=اضافه کردن رویداد / کار +AddAnAction=اضافه کردن یک رویداد / کار +AddActionRendezVous=اضافه کردن یک رویداد Rendez-vous +Rendez-Vous=قرار ملاقات گذاشتن +ConfirmDeleteAction=آیا مطمئن هستید که می خواهید این رویداد / وظیفه را حذف کنید؟ +CardAction=کارت رویداد +PercentDone=درصد کامل +ActionOnCompany=کار در مورد شرکت +ActionOnContact=کار درباره ما تماس با +TaskRDV=جلسات +TaskRDVWith=نشست با%s +ShowTask=نمایش کار +ShowAction=نمایش رویداد +ActionsReport=رویدادهای گزارش +ThirdPartiesOfSaleRepresentative=Thirdparties با نمایندگی فروش +SalesRepresentative=نمایندگی فروش +SalesRepresentatives=نمایندگان فروش +SalesRepresentativeFollowUp=نماینده فروش (پیگیری) +SalesRepresentativeSignature=نماینده فروش (امضا) +CommercialInterlocutor=مخاطب تجاری +ErrorWrongCode=کد اشتباه است +NoSalesRepresentativeAffected=بدون نمایندگی فروش خاصی اختصاص داده شود +ShowCustomer=نمایش مشتری +ShowProspect=نمایش چشم انداز +ListOfProspects=لیست چشم انداز +ListOfCustomers=فهرست مشتریان +LastDoneTasks=تاریخ و زمان آخرین%s به کارهای انجام شده +LastRecordedTasks=وظایف آخرین ثبت +LastActionsToDo=تاریخ و زمان آخرین٪ قدیمی ترین عملیات به اتمام است +DoneAndToDoActionsFor=انجام شده و برای این کار رویدادی برای%s +DoneAndToDoActions=انجام شده و برای این کار وقایع +DoneActions=رویدادهای انجام شده +DoneActionsFor=رویدادهای انجام شده برای%s +ToDoActions=رویدادهای ناقص +ToDoActionsFor=رویدادهای ناقص برای%s +SendPropalRef=ارسال پیشنهاد تجاری از%s +SendOrderRef=ارسال منظور از%s +StatusNotApplicable=قابل اجرا نیست +StatusActionToDo=برای انجام این کار +StatusActionDone=کامل +MyActionsAsked=رویدادهای I ثبت شده اند +MyActionsToDo=رویدادهای من باید انجام دهید +MyActionsDone=رویدادهای اختصاص داده به من +StatusActionInProcess=در فرآیند +TasksHistoryForThisContact=رویدادهای این تماس +LastProspectDoNotContact=آیا تماس بگیرید +LastProspectNeverContacted=هرگز تماس +LastProspectToContact=برای تماس با +LastProspectContactInProcess=تماس در فرایند +LastProspectContactDone=تماس با انجام +DateActionPlanned=تاریخ رویداد برنامه ریزی شده برای +DateActionDone=تاریخ رویداد انجام می شود +ActionAskedBy=رویداد گزارش شده توسط +ActionAffectedTo=رویداد اختصاص یافته به +ActionDoneBy=رویداد های انجام شده توسط +ActionUserAsk=به گزارش +ErrorStatusCantBeZeroIfStarted=اگر زمینه 'تاریخ انجام می شود' پر شده است، اقدام آغاز شده است (و یا به پایان رسید)، پس درست است 'وضعیت' می تواند 0٪٪ نیست. +ActionAC_TEL=تلفن تماس +ActionAC_FAX=ارسال فکس +ActionAC_PROP=ارسال پیشنهاد از طریق پست +ActionAC_EMAIL=ارسال ایمیل +ActionAC_RDV=جلسات +ActionAC_FAC=ارسال صورت حساب به مشتری از طریق پست +ActionAC_REL=ارسال صورت حساب به مشتری از طریق پست (یادآوری) +ActionAC_CLO=نزدیک +ActionAC_EMAILING=ارسال ایمیل انبوه +ActionAC_COM=ارسال سفارش مشتری از طریق پست +ActionAC_SHIP=ارسال حمل و نقل از طریق پست +ActionAC_SUP_ORD=ارسال سفارش کالا از طریق پست +ActionAC_SUP_INV=ارسال کننده کالا صورت حساب از طریق پست +ActionAC_OTH=دیگر +ActionAC_OTH_AUTO=دیگر (رویدادی به طور خودکار قرار داده) +ActionAC_MANUAL=رویدادهای دستی قرار داده +ActionAC_AUTO=رویدادی به صورت خودکار قرار داده +Stats=آمار فروش +CAOrder=حجم فروش (سفارشات اعتبار) +FromTo=از%s به%s +MargeOrder=حاشیه (سفارشات اعتبار) +RecapAnnee=خلاصه از سال +NoData=هیچ اطلاعات وجود دارد +StatusProsp=وضعیت چشم انداز +DraftPropals=طرح تجاری پیش نویس +SearchPropal=جستجوی یک طرح تجاری +CommercialDashboard=خلاصه تجاری diff --git a/htdocs/langs/fa_IR/companies.lang b/htdocs/langs/fa_IR/companies.lang index 6bd47ad7a29..9f984184d85 100644 --- a/htdocs/langs/fa_IR/companies.lang +++ b/htdocs/langs/fa_IR/companies.lang @@ -1,408 +1,409 @@ # Dolibarr language file - Source file is en_US - companies -ErrorCompanyNameAlreadyExists=اسم الشركة ل ٪ موجود بالفعل. اختيار آخر. -ErrorPrefixAlreadyExists=بادئة ٪ ق موجود بالفعل. اختيار آخر. -ErrorSetACountryFirst=المجموعة الأولى في البلد -# SelectThirdParty=Select a third party -DeleteThirdParty=حذف طرف ثالث -ConfirmDeleteCompany=هل أنت متأكد من أنك تريد حذف هذه الشركة وجميع المعلومات الموروث؟ -DeleteContact=حذف اتصال -ConfirmDeleteContact=هل أنت متأكد من أنك تريد حذف هذا الاتصال ، وجميع الموروث من المعلومات؟ -MenuNewThirdParty=طرف ثالث جديد -MenuNewCompany=شركة جديدة -MenuNewCustomer=عميل جديد -MenuNewProspect=آفاق جديدة -MenuNewSupplier=مورد جديد -MenuNewPrivateIndividual=فرد جديد -MenuSocGroup=المجموعات -NewCompany=الشركة الجديدة (آفاق ، والعملاء ، والموردين) -NewThirdParty=طرف ثالث جديد (آفاق ، والعملاء ، والموردين) -NewSocGroup=مجموعة شركات جديدة -NewPrivateIndividual=خاصة جديدة الفردية (آفاق ، والعملاء ، والموردين) -ProspectionArea=مجال التنقيب -SocGroup=مجموعة شركات -IdThirdParty=هوية الطرف الثالث -IdCompany=رقم تعريف الشركة -IdContact=رقم تعريف الاتصال -Contacts=اتصالات -ThirdPartyContacts=طرف ثالث اتصالات -ThirdPartyContact=طرف ثالث اتصال -StatusContactValidated=مركز الاتصال -Company=شركة -CompanyName=اسم الشركة -Companies=الشركات -CountryIsInEEC=البلد داخل المجموعة الاقتصادية الأوروبية -ThirdPartyName=اسم طرف ثالث -ThirdParty=طرف ثالث -ThirdParties=أطراف ثالثة -ThirdPartyAll=أطراف ثالثة (جميع) -ThirdPartyProspects=آفاق -ThirdPartyProspectsStats=آفاق -ThirdPartyCustomers=العملاء -ThirdPartyCustomersStats=العملاء -ThirdPartyCustomersWithIdProf12=الزبائن ٪ أو ٪ ق ق -ThirdPartySuppliers=الموردين -ThirdPartyType=طرف ثالث من نوع -Company/Fundation=الشركة / المؤسسة -Individual=فرد -ToCreateContactWithSameName=سيخلق تلقائيا مادية نفس معلومات الاتصال -ParentCompany=الشركة الأم -# Subsidiary=Subsidiary -# Subsidiaries=Subsidiaries -# NoSubsidiary=No subsidiary -ReportByCustomers=تقرير للعملاء -ReportByQuarter=تقرير الربع -CivilityCode=قانون الكياسة -RegisteredOffice=المكتب المسجل -Name=اسم -Lastname=اللقب -Firstname=Firstname -PostOrFunction=وظيفة / وظيفة -UserTitle=العنوان -Surname=لقب / مزيف -Address=عنوان -State=الولاية / المقاطعة -Region=المنطقة -Country=قطر -CountryCode=رمز البلد -# CountryId=Country id -Phone=الهاتف -# Skype=Skype -# Call=Call -# Chat=Chat -PhonePro=الأستاذ الهاتف -PhonePerso=عدد الأفراد. الهاتف -PhoneMobile=الجوال -# No_Email=Don't send mass e-mailings -Fax=الفاكس -Zip=الرمز البريدي -Town=مدينة -Web=الويب -Poste= موقف -DefaultLang=اللغة افتراضيا -VATIsUsed=وتستخدم ضريبة القيمة المضافة -VATIsNotUsed=ضريبة القيمة المضافة لا يستخدم -# CopyAddressFromSoc=Fill address with thirdparty address -# NoEmailDefined=There is no email defined +ErrorCompanyNameAlreadyExists=نام شرکت%s در حال حاضر وجود دارد. یکی دیگر را انتخاب کنید. +ErrorPrefixAlreadyExists=پیشوند%s در حال حاضر وجود دارد. یکی دیگر را انتخاب کنید. +ErrorSetACountryFirst=مجموعه ای از کشور برای اولین بار +SelectThirdParty=انتخاب شخص ثالث +DeleteThirdParty=حذف شخص ثالث +ConfirmDeleteCompany=آیا مطمئن هستید که می خواهید این شرکت و تمام اطلاعات به ارث برده را حذف کنید؟ +DeleteContact=حذف یک تماس / آدرس +ConfirmDeleteContact=آیا مطمئن هستید که می خواهید این مخاطب و تمام اطلاعات به ارث برده را حذف کنید؟ +MenuNewThirdParty=شخص ثالث جدید +MenuNewCompany=شرکت های جدید +MenuNewCustomer=مشتری جدید +MenuNewProspect=چشم انداز جدید +MenuNewSupplier=منبع جدید +MenuNewPrivateIndividual=فرد خصوصی جدید +MenuSocGroup=گروه +NewCompany=شرکت جدید (چشم انداز، مشتری، عرضه کننده کالا) +NewThirdParty=شخص ثالث جدید (چشم انداز، مشتری، عرضه کننده کالا) +NewSocGroup=گروه شرکت های جدید +NewPrivateIndividual=فرد خصوصی جدید (چشم انداز، مشتری، عرضه کننده کالا) +CreateDolibarrThirdPartySupplier=ایجاد یک شخص ثالث (منبع) +ProspectionArea=منطقه Prospection +SocGroup=گروه شرکت های +IdThirdParty=شناسه شخص ثالث +IdCompany=شرکت آیدی +IdContact=تماس با شناسه +Contacts=تماس / آدرس +ThirdPartyContacts=اطلاعات تماس شخص ثالث +ThirdPartyContact=تماس با حزب سوم / آدرس +StatusContactValidated=وضعیت تماس / آدرس +Company=شرکت +CompanyName=نام شرکت +Companies=شرکت +CountryIsInEEC=کشور است در داخل جامعه اقتصادی اروپا +ThirdPartyName=نام و نام خانوادگی شخص ثالث +ThirdParty=شخص ثالث +ThirdParties=احزاب سوم +ThirdPartyAll=اشخاص ثالث (همه) +ThirdPartyProspects=چشم انداز +ThirdPartyProspectsStats=چشم انداز +ThirdPartyCustomers=مشتریان +ThirdPartyCustomersStats=مشتریان +ThirdPartyCustomersWithIdProf12=مشتریان با%s و یا%s را +ThirdPartySuppliers=تولید کنندگان +ThirdPartyType=نوع شخص ثالث +Company/Fundation=شرکت / موسسه +Individual=فرد خصوصی +ToCreateContactWithSameName=به طور خودکار ایجاد تماس فیزیکی با همان اطلاعات +ParentCompany=شرکت مادر +Subsidiary=فرعی +Subsidiaries=شرکتهای تابعه +NoSubsidiary=بدون تابعه +ReportByCustomers=گزارش شده توسط مشتریان +ReportByQuarter=گزارش های سرعت +CivilityCode=کد تمدن +RegisteredOffice=دفتر ثبت نام +Name=نام +Lastname=نام خانوادگی +Firstname=نام +PostOrFunction=ارسال / تابع +UserTitle=عنوان +Surname=نام خانوادگی / شبه +Address=نشانی +State=ایالت / استان +Region=منطقه +Country=کشور +CountryCode=کد کشور +CountryId=شناسه کشور +Phone=تلفن +Skype=اسکایپ +Call=دعوت +Chat=چت +PhonePro=تلفن دکتر +PhonePerso=شخصی سازی. تلفن +PhoneMobile=سیار +No_Email=آیا توده ایمیلها ارسال کنید +Fax=فکس +Zip=کد پستی +Town=شهرستان +Web=وب سایت +Poste= موقعیت +DefaultLang=زبان پیش فرض +VATIsUsed=مالیات بر ارزش افزوده استفاده می شود +VATIsNotUsed=مالیات بر ارزش افزوده استفاده نمی شود +CopyAddressFromSoc=آدرس زیر را پر کنید با آدرس thirdparty +NoEmailDefined=هیچ ایمیل تعریف شده وجود دارد ##### Local Taxes ##### -LocalTax1IsUsedES= يتم استخدام الطاقة المتجددة -LocalTax1IsNotUsedES= لا يتم استخدام الطاقة المتجددة -LocalTax2IsUsedES= يستخدم IRPF -LocalTax2IsNotUsedES= IRPF لا يستخدم -# LocalTax1ES=RE -# LocalTax2ES=IRPF -ThirdPartyEMail=ق ٪ -WrongCustomerCode=رمز غير صالح العملاء -WrongSupplierCode=رمز المورد غير صالحة -CustomerCodeModel=العميل رمز النموذج -SupplierCodeModel=المورد رمز النموذج -Gencod=باركود +LocalTax1IsUsedES= RE استفاده شده است +LocalTax1IsNotUsedES= RE استفاده نمی شود +LocalTax2IsUsedES= IRPF استفاده شده است +LocalTax2IsNotUsedES= IRPF استفاده نمی شود +LocalTax1ES=RE +LocalTax2ES=IRPF +ThirdPartyEMail=از%s +WrongCustomerCode=کد مشتری نامعتبر است +WrongSupplierCode=کد منبع نامعتبر +CustomerCodeModel=مدل کد مشتری +SupplierCodeModel=مدل کد تامین کننده +Gencod=بارکد ##### Professional ID ##### -ProfId1Short=الأستاذ معرف 1 -ProfId2Short=معرف الأستاذ 2 -ProfId3Short=الأستاذ معرف 3 -ProfId4Short=الأستاذ معرف 4 -# ProfId5Short=Prof. id 5 -# ProfId6Short=Prof. id 5 -ProfId1=الهوية المهنية (1) -ProfId2=الهوية المهنية (2) -ProfId3=3 الهوية المهنية -ProfId4=الهوية المهنية 4 -# ProfId5=Professional ID 5 -# ProfId6=Professional ID 6 -ProfId1AR=معرف البروفيسور 1 (CUIT / [كيل]) -ProfId2AR=البروفيسور رقم 2 (المتوحشون الايرادات) +ProfId1Short=شناسه پروفسور 1 +ProfId2Short=شناسه پروفسور 2 +ProfId3Short=شناسه پروفسور 3 +ProfId4Short=شناسه پروفسور 4 +ProfId5Short=شناسه پروفسور 5 +ProfId6Short=شناسه پروفسور 5 +ProfId1=ID حرفه ای 1 +ProfId2=ID حرفه ای 2 +ProfId3=ID حرفه ای 3 +ProfId4=ID حرفه ای 4 +ProfId5=ID حرفه ای 5 +ProfId6=ID حرفه ای 6 +ProfId1AR=پروفسور شناسه 1 (CUIT / Cuil در) +ProfId2AR=پروفسور کد 2 (متخصص Revenu) ProfId3AR=- ProfId4AR=- -# ProfId5AR=- -# ProfId6AR=- -ProfId1AU=الأستاذ عيد 1 (ايه. بي.) +ProfId5AR=- +ProfId6AR=- +ProfId1AU=پروفسور شناسه 1 (ABN) ProfId2AU=- ProfId3AU=- ProfId4AU=- -# ProfId5AU=- -# ProfId6AU=- -ProfId1BE=الأستاذ عيد 1 (عدد المهنية) +ProfId5AU=- +ProfId6AU=- +ProfId1BE=پروفسور شناسه 1 (تعداد و حرفه ای) ProfId2BE=- ProfId3BE=- ProfId4BE=- -# ProfId5BE=- -# ProfId6BE=- -# ProfId1BR=- -# ProfId2BR=IE (Inscricao Estadual) -# ProfId3BR=IM (Inscricao Municipal) -# ProfId4BR=CPF +ProfId5BE=- +ProfId6BE=- +ProfId1BR=- +ProfId2BR=IE (Inscricao Estadual) +ProfId3BR=IM (Inscricao شهری) +ProfId4BR=CPF #ProfId5BR=CNAE #ProfId6BR=INSS ProfId1CH=- ProfId2CH=- -ProfId3CH=الأستاذ عيد 1 (عدد الاتحادية) -ProfId4CH=الأستاذ عيد 2 (رقم السجل التجاري) -# ProfId5CH=- -# ProfId6CH=- -# ProfId1CL=Prof Id 1 (R.U.T.) -# ProfId2CL=- -# ProfId3CL=- -# ProfId4CL=- -# ProfId5CL=- -# ProfId6CL=- -# ProfId1CO=Prof Id 1 (R.U.T.) -# ProfId2CO=- -# ProfId3CO=- -# ProfId4CO=- -# ProfId5CO=- -# ProfId6CO=- -ProfId1DE=الأستاذ عيد 1 (USt. - IdNr) -ProfId2DE=الأستاذ عيد 2 (رقم USt. -) -ProfId3DE=الأستاذ عيد 3 (Handelsregister-Nr.) +ProfId3CH=پروفسور شناسه 1 (تعداد فدرال) +ProfId4CH=پروفسور کد 2 (شماره ثبت تجاری) +ProfId5CH=- +ProfId6CH=- +ProfId1CL=پروفسور شناسه 1 (RUT) +ProfId2CL=- +ProfId3CL=- +ProfId4CL=- +ProfId5CL=- +ProfId6CL=- +ProfId1CO=پروفسور شناسه 1 (RUT) +ProfId2CO=- +ProfId3CO=- +ProfId4CO=- +ProfId5CO=- +ProfId6CO=- +ProfId1DE=پروفسور شناسه 1 (USt.-IdNr) +ProfId2DE=پروفسور کد 2 (USt.-NR) +ProfId3DE=پروفسور کد 3 (Handelsregister-Nr.) ProfId4DE=- -# ProfId5DE=- -# ProfId6DE=- -ProfId1ES=(CNAE) -ProfId2ES=(رقم الضمان الاجتماعي) -ProfId3ES=(IAE) -ProfId4ES=(عدد الجماعية) -# ProfId5ES=- -# ProfId6ES=- -ProfId1FR=الأستاذ عيد 1 (صفارة إنذار) -ProfId2FR=الأستاذ عيد 2 (SIRET) -ProfId3FR=الأستاذ عيد 3 (NAF ، البالغ من العمر قرد) -ProfId4FR=الأستاذ عيد 4 (نظام المنسقين المقيمين / لجمهورية مقدونيا) -# ProfId5FR=- -# ProfId6FR=- -ProfId1GB=الأستاذ عيد 1 (رقم التسجيل) +ProfId5DE=- +ProfId6DE=- +ProfId1ES=پروفسور شناسه 1 (CIF / NIF) +ProfId2ES=پروفسور کد 2 (شماره تامین اجتماعی) +ProfId3ES=پروفسور کد 3 (CNAE) +ProfId4ES=پروفسور کد 4 (تعداد دانشگاهی) +ProfId5ES=- +ProfId6ES=- +ProfId1FR=پروفسور شناسه 1 (SIREN) +ProfId2FR=پروفسور کد 2 (SIRET) +ProfId3FR=پروفسور کد 3 (NAF، قدیمی APE) +ProfId4FR=پروفسور کد 4 (RCS / RM) +ProfId5FR=- +ProfId6FR=- +ProfId1GB=شماره ثبت ProfId2GB=- -ProfId3GB=3 الأستاذ عيد حسبما +ProfId3GB=SIC ProfId4GB=- -# ProfId5GB=- -# ProfId6GB=- -# ProfId1HN=Id prof. 1 (RTN) -# ProfId2HN=- -# ProfId3HN=- -# ProfId4HN=- -# ProfId5HN=- -# ProfId6HN=- -ProfId1IN=معرف البروفيسور 1 (القصدير) -ProfId2IN=معرف البروفيسور 2 -ProfId3IN=معرف البروفيسور 3 -ProfId4IN=معرف البروفيسور 4 -# ProfId5IN=Prof Id 5 -# ProfId6IN=- -# ProfId1MA=Id prof. 1 (R.C.) -# ProfId2MA=Id prof. 2 (Patente) -# ProfId3MA=Id prof. 3 (I.F.) -# ProfId4MA=Id prof. 4 (C.N.S.S.) -# ProfId5MA=- -# ProfId6MA=- -# ProfId1MX=Prof Id 1 (R.F.C). -# ProfId2MX=Prof Id 2 (R..P. IMSS) -# ProfId3MX=Prof Id 3 (Profesional Charter) -# ProfId4MX=- -# ProfId5MX=- -# ProfId6MX=- -ProfId1NL=KVK نومير +ProfId5GB=- +ProfId6GB=- +ProfId1HN=پروفسور شناسه. 1 (RTN) +ProfId2HN=- +ProfId3HN=- +ProfId4HN=- +ProfId5HN=- +ProfId6HN=- +ProfId1IN=پروفسور شناسه 1 (TIN) +ProfId2IN=پروفسور کد 2 (PAN) +ProfId3IN=پروفسور کد 3 (SRVC TAX) +ProfId4IN=پروفسور کد 4 +ProfId5IN=پروفسور کد 5 +ProfId6IN=- +ProfId1MA=پروفسور شناسه. 1 (RC) +ProfId2MA=پروفسور شناسه. 2 (Patente) +ProfId3MA=پروفسور شناسه. 3 (IF) +ProfId4MA=پروفسور شناسه. 4 (CNSS) +ProfId5MA=- +ProfId6MA=- +ProfId1MX=پروفسور شناسه 1 (RFC). +ProfId2MX=پروفسور کد 2 (R.. P. IMSS) +ProfId3MX=پروفسور کد 3 (حرفه ای منشور) +ProfId4MX=- +ProfId5MX=- +ProfId6MX=- +ProfId1NL=nummer KVK ProfId2NL=- ProfId3NL=- -ProfId4NL=- -# ProfId5NL=- -# ProfId6NL=- -ProfId1PT=الأستاذ عيد 1 (NIPC) -ProfId2PT=الأستاذ عيد 2 (رقم الضمان الاجتماعي) -ProfId3PT=الأستاذ عيد 3 (رقم السجل التجاري) -ProfId4PT=الأستاذ عيد 4 (يضم) -# ProfId5PT=- -# ProfId6PT=- -# ProfId1SN=RC -# ProfId2SN=NINEA -# ProfId3SN=- -# ProfId4SN=- -# ProfId5SN=- -# ProfId6SN=- -ProfId1TN=الأستاذ عيد 1 (اتفاقية روتردام) -ProfId2TN=الأستاذ عيد 2 (المالية matricule) -ProfId3TN=الأستاذ عيد 3 (قانون جمارك) -ProfId4TN=الأستاذ عيد 4 (حظر) -# ProfId5TN=- -# ProfId6TN=- -# ProfId1RU=Prof Id 1 (OGRN) -# ProfId2RU=Prof Id 2 (INN) -# ProfId3RU=Prof Id 3 (KPP) -# ProfId4RU=Prof Id 4 (OKPO) -# ProfId5RU=- -# ProfId6RU=- -VATIntra=رقم الضريبة على القيمة المضافة -VATIntraShort=رقم الضريبة على القيمة المضافة -VATIntraVeryShort=ضريبة القيمة المضافة -VATIntraSyntaxIsValid=تركيب صالحة -VATIntraValueIsValid=قيمة صالحة -ProspectCustomer=احتمال / العملاء -Prospect=احتمال -CustomerCard=بطاقة الزبون -Customer=العميل -CustomerDiscount=العميل الخصم -CustomerRelativeDiscount=العميل الخصم النسبي -CustomerAbsoluteDiscount=العميل الخصم المطلقة -CustomerRelativeDiscountShort=الخصم النسبي -CustomerAbsoluteDiscountShort=مطلق الخصم -CompanyHasRelativeDiscount=هذا العميل قد خصم ٪ ق ٪ ٪ -CompanyHasNoRelativeDiscount=هذا العميل ليس لديها النسبية خصم افتراضي -CompanyHasAbsoluteDiscount=هذا الزبون لا يزال خصم القروض ل٪ ق ق ٪ -CompanyHasCreditNote=ولا يزال هذا العميل الائتمانية ويلاحظ السابقة أو ودائع ل٪ ق ق ٪ -CompanyHasNoAbsoluteDiscount=هذا العميل ليس الخصم الائتمان المتاح -CustomerAbsoluteDiscountAllUsers=خصومات المطلقة (الممنوحة من جميع المستخدمين) -CustomerAbsoluteDiscountMy=خصومات المطلقة) التي منحتها لنفسك) -DefaultDiscount=خصم افتراضي -AvailableGlobalDiscounts=مطلق الخصومات المتاحة -DiscountNone=بلا -Supplier=المورد -CompanyList=شركات قائمة -AddContact=إضافة -# AddContactAddress=Add contact/address -# EditContact=Edit contact -# EditContactAddress=Edit contact/address -Contact=جهة اتصال -# ContactsAddresses=Contacts/Addresses -# NoContactDefinedForThirdParty=No contact defined for this third party -NoContactDefined=لا يوجد اتصال محددة لهذا الطرف الثالث -DefaultContact=الاتصال الافتراضية -AddCompany=إضافة شركة -AddThirdParty=إضافة طرف ثالث -DeleteACompany=حذف شركة -PersonalInformations=البيانات الشخصية -AccountancyCode=قانون المحاسبة -CustomerCode=رمز العميل -SupplierCode=رمز المورد -CustomerAccount=حساب الزبون -SupplierAccount=مورد الحساب -CustomerCodeDesc=شفرة الزبون ، فريدة من نوعها لجميع العملاء -SupplierCodeDesc=رمز المورد ، وفريدة من نوعها لجميع الموردين -RequiredIfCustomer=إذا كان الطرف الثالث هو عميل أو احتمال -RequiredIfSupplier=إذا كان الطرف الثالث هو مورد -ValidityControledByModule=صحة تسيطر عليها وحدة -ThisIsModuleRules=هذه هي قواعد لهذه الوحدة -LastProspect=أخير -ProspectToContact=إمكانية الاتصال -CompanyDeleted=شركة "٪ ل" حذفها من قاعدة البيانات. -ListOfContacts=قائمة الاتصالات -# ListOfContactsAddresses=List of contacts/adresses -ListOfProspectsContacts=قائمة آفاق الاتصالات -ListOfCustomersContacts=قائمة عملاء الاتصالات -ListOfSuppliersContacts=قائمة الموردين اتصالات -ListOfCompanies=قائمة الشركات -ListOfThirdParties=قائمة أطراف ثالثة -ShowCompany=وتبين للشركة -ShowContact=وتظهر الاتصال -ContactsAllShort=جميع (بدون فلتر) -ContactType=نوع الاتصال -ContactForOrders=أوامر اتصال -ContactForProposals=مقترحات اتصال -ContactForContracts=عقود اتصال -ContactForInvoices=فواتير اتصال -NoContactForAnyOrder=هذا الاتصال ليس من أجل أي اتصال -NoContactForAnyProposal=هذا الاتصال ليست على اتصال في أي اقتراح التجارية -NoContactForAnyContract=هذا الاتصال ليس أي عقد للاتصال -NoContactForAnyInvoice=هذا الاتصال ليست على اتصال في أي فاتورة -NewContact=اتصال جديد -# NewContactAddress=New contact/address -LastContacts=آخر الاتصالات -MyContacts=اتصالاتي -Phones=الهواتف -Capital=رأس المال -CapitalOf=ق ٪ من رأس المال -EditCompany=تحرير الشركة -EditDeliveryAddress=تحرير عنوان التسليم -ThisUserIsNot=هذا المستخدم امر غير مطروح ، ولا مورد للعملاء -VATIntraCheck=فحص -VATIntraCheckDesc=الصلة ٪ ق يسمح نسأل الأوروبي من ضريبة القيمة المضافة فاحص الخدمة. خارجي من خدمة الإنترنت ويلزم لهذه الخدمة في العمل. +ProfId4NL=Burgerservicenummer (BSN) +ProfId5NL=- +ProfId6NL=- +ProfId1PT=پروفسور شناسه 1 (پتروشیمی) +ProfId2PT=پروفسور کد 2 (شماره تامین اجتماعی) +ProfId3PT=پروفسور کد 3 (شماره ثبت تجاری) +ProfId4PT=پروفسور کد 4 (هنرستان) +ProfId5PT=- +ProfId6PT=- +ProfId1SN=RC +ProfId2SN=NINEA +ProfId3SN=- +ProfId4SN=- +ProfId5SN=- +ProfId6SN=- +ProfId1TN=پروفسور شناسه 1 (RC) +ProfId2TN=پروفسور کد 2 (matricule مالی) +ProfId3TN=پروفسور کد 3 (کد Douane) +ProfId4TN=پروفسور کد 4 (BAN) +ProfId5TN=- +ProfId6TN=- +ProfId1RU=پروفسور شناسه 1 (OGRN) +ProfId2RU=پروفسور کد 2 (INN) +ProfId3RU=پروفسور کد 3 (KPP) +ProfId4RU=پروفسور کد 4 (OKPO) +ProfId5RU=- +ProfId6RU=- +VATIntra=تعداد مالیات بر ارزش افزوده +VATIntraShort=تعداد مالیات بر ارزش افزوده +VATIntraVeryShort=مالیات بر ارزش افزوده +VATIntraSyntaxIsValid=نحو معتبر است +VATIntraValueIsValid=مقدار معتبر است +ProspectCustomer=چشم انداز / مشتریان +Prospect=چشم انداز +CustomerCard=کارت مشتری +Customer=مشتری +CustomerDiscount=تخفیف ویژه +CustomerRelativeDiscount=تخفیف ویژه نسبی +CustomerAbsoluteDiscount=تخفیف ویژه مطلق +CustomerRelativeDiscountShort=تخفیف نسبی +CustomerAbsoluteDiscountShort=تخفیف مطلق +CompanyHasRelativeDiscount=این مشتری تخفیف به طور پیش فرض از٪ S٪٪ +CompanyHasNoRelativeDiscount=این مشتری است تخفیف نسبی به طور پیش فرض +CompanyHasAbsoluteDiscount=این مشتری هنوز اعتبارات تخفیف و یا سپرده برای%s٪ s را +CompanyHasCreditNote=این مشتری هنوز یادداشت های اعتباری برای%s٪ s را +CompanyHasNoAbsoluteDiscount=این مشتری هیچ اعتباری تخفیف در دسترس +CustomerAbsoluteDiscountAllUsers=تخفیف مطلق (اعطا شده توسط همه کاربران) +CustomerAbsoluteDiscountMy=تخفیف مطلق (اعطا شده توسط خودتان) +DefaultDiscount=به طور پیش فرض از تخفیف +AvailableGlobalDiscounts=تخفیف مطلق دسترس +DiscountNone=هیچ یک +Supplier=تهیه کننده +CompanyList=لیست شرکت +AddContact=اضافه کردن تماس +AddContactAddress=اضافه کردن تماس / آدرس +EditContact=ویرایش تماس +EditContactAddress=ویرایش مخاطب / آدرس +Contact=تماس +ContactsAddresses=تماس / آدرس +NoContactDefinedForThirdParty=بدون تماس تعریف شده برای این حزب سوم +NoContactDefined=بدون تماس با تعریف +DefaultContact=به طور پیش فرض از تماس / آدرس +AddCompany=اضافه کردن شرکت +AddThirdParty=اضافه کردن شخص ثالث +DeleteACompany=حذف یک شرکت +PersonalInformations=اطلاعات شخصی +AccountancyCode=کد حسابداری +CustomerCode=کد مشتری +SupplierCode=کد تامین کننده +CustomerAccount=حساب کاربری مشتری +SupplierAccount=حساب تامین کننده +CustomerCodeDesc=کد مشتری، منحصر به فرد برای همه مشتریان +SupplierCodeDesc=کد تامین کننده، منحصر به فرد برای همه تامین کنندگان +RequiredIfCustomer=لازم اگر شخص ثالث مشتری یا چشم انداز است +RequiredIfSupplier=لازم است شخص ثالث یک تامین کننده است +ValidityControledByModule=اعتبار کنترل های ماژول +ThisIsModuleRules=این قوانین برای این ماژول است +LastProspect=آخر +ProspectToContact=چشم انداز برای تماس با +CompanyDeleted=شرکت "%s" حذف از پایگاه داده باشد. +ListOfContacts=لیست مخاطبین / آدرس +ListOfContactsAddresses=لیست مخاطبین / آدرس +ListOfProspectsContacts=لیست مخاطبین چشم انداز +ListOfCustomersContacts=فهرست مشتریان +ListOfSuppliersContacts=فهرست تماس های منبع +ListOfCompanies=فهرست شرکت ها +ListOfThirdParties=فهرست اشخاص ثالث +ShowCompany=نمایش شرکت +ShowContact=نمایش تماس +ContactsAllShort=همه (بدون فیلتر) +ContactType=تماس با نوع +ContactForOrders=تماس با سفارش +ContactForProposals=تماس با پیشنهاد است +ContactForContracts=تماس با قرارداد است +ContactForInvoices=تماس با فاکتور به +NoContactForAnyOrder=این تماس با یک تماس برای هر سفارش نمی +NoContactForAnyProposal=این تماس با یک تماس برای هر پیشنهاد تجاری +NoContactForAnyContract=این تماس با یک تماس برای هر قرارداد نیست +NoContactForAnyInvoice=این تماس با یک تماس برای هر فاکتور نمی +NewContact=تماس جدید +NewContactAddress=تماس جدید / آدرس +LastContacts=تاریخ و زمان آخرین تماس +MyContacts=تماس با من +Phones=تلفن +Capital=سرمایه +CapitalOf=سرمایه از%s +EditCompany=ویرایش شرکت +EditDeliveryAddress=ویرایش آدرس تحویل +ThisUserIsNot=این کاربر، چشم انداز، مشتری و نه عرضه کننده کالا نمی +VATIntraCheck=بررسی +VATIntraCheckDesc=لینک از%s اجازه می دهد تا به درخواست سرویس جستجوگر مالیات بر ارزش افزوده اروپا. دسترسی به اینترنت خارجی از سرور برای این سرویس لازم است به کار می کنند. VATIntraCheckURL=http://ec.europa.eu/taxation_customs/vies/vieshome.do -VATIntraCheckableOnEUSite=فحص Intracomunnautary ضريبة القيمة المضافة على موقع المفوضية الاوروبية -VATIntraManualCheck=You can also check manually from european web site ق ٪ -ErrorVATCheckMS_UNAVAILABLE=وليس من الممكن التحقق. تأكد من خدمة لا تقدمها دولة عضو (في المائة). -NorProspectNorCustomer=ولا آفاق ولا العملاء -JuridicalStatus=المركز القانوني -Staff=الموظفون -ProspectLevelShort=المحتملة -ProspectLevel=آفاق محتملة -ContactPrivate=القطاع الخاص -ContactPublic=تقاسم -ContactVisibility=الرؤية -OthersNotLinkedToThirdParty=أخرى ، لا صلة لطرف ثالث -ProspectStatus=آفاق الوضع -PL_NONE=Aucun -PL_UNKNOWN=غير معروف -PL_LOW=منخفض -PL_MEDIUM=المتوسط -PL_HIGH=عال +VATIntraCheckableOnEUSite=چک کردن مالیات بر ارزش افزوده Intracomunnautary در سایت کمیسیون اروپا +VATIntraManualCheck=شما همچنین می توانید به صورت دستی از وب سایت اروپا بررسی از%s +ErrorVATCheckMS_UNAVAILABLE=ممکن است بررسی کنید. خدمات ورود به توسط دولت عضو (٪ بازدید کنندگان) ارائه نشده است. +NorProspectNorCustomer=و نه چشم انداز، و نه مشتری +JuridicalStatus=وضع حقوقی +Staff=کارکنان +ProspectLevelShort=پتانسیل +ProspectLevel=بالقوه چشم انداز +ContactPrivate=خصوصی +ContactPublic=به اشتراک گذاشته شده +ContactVisibility=دید +OthersNotLinkedToThirdParty=دیگران، به شخص ثالث در ارتباط نیست +ProspectStatus=وضعیت چشم انداز +PL_NONE=هیچ یک +PL_UNKNOWN=ناشناخته +PL_LOW=کم +PL_MEDIUM=متوسط +PL_HIGH=زیاد TE_UNKNOWN=- -TE_STARTUP=بدء التشغيل -TE_GROUP=شركة كبرى -TE_MEDIUM=شركة المتوسط -TE_ADMIN=الحكومية ، -TE_SMALL=شركة صغيرة -TE_RETAIL=مبيعات التجزئة +TE_STARTUP=راه اندازی +TE_GROUP=شرکت بزرگ +TE_MEDIUM=شرکت متوسط +TE_ADMIN=دولتی +TE_SMALL=شرکت های کوچک +TE_RETAIL=خرده فروش TE_WHOLE=Wholetailer -TE_PRIVATE=فرد -TE_OTHER=أخرى -StatusProspect-1=لا اتصال -StatusProspect0=اتصل أبدا -StatusProspect1=للاتصال -StatusProspect2=في عملية الاتصال -StatusProspect3=الاتصال به -ChangeDoNotContact=لتغيير الوضع لا اتصال ' -ChangeNeverContacted=لتغيير الوضع 'اتصل أبدا' -ChangeToContact=لتغيير الوضع 'للاتصال' -ChangeContactInProcess=لتغيير الوضع 'في عملية' -ChangeContactDone=لتغيير الوضع 'فعل' -ProspectsByStatus=آفاق الوضع -BillingContact=فواتير الاتصالات -NbOfAttachedFiles=عدد الملفات المرفقة -AttachANewFile=إرفاق ملف جديد -NoRIB=لا يعرف الحظر -NoParentCompany=بلا -ExportImport=الاستيراد والتصدير -ExportCardToFormat=تصدير بطاقة شكل -ContactNotLinkedToCompany=اتصالات ليست مرتبطة بطرف ثالث -DolibarrLogin=ادخل Dolibarr -NoDolibarrAccess=لا Dolibarr الوصول -# ExportDataset_company_1=Third parties (Companies/foundations/physical people) and properties -ExportDataset_company_2=الاتصالات والعقارات -# ImportDataset_company_1=Third parties (Companies/foundations/physical people) and properties -# ImportDataset_company_2=Contacts/Addresses (of thirdparties or not) and attributes -ImportDataset_company_3=التفاصيل المصرفية -PriceLevel=مستوى الأسعار -DeliveriesAddress=تقديم عناوين -DeliveryAddress=عنوان التسليم -DeliveryAddressLabel=تسليم بطاقة معالجة -DeleteDeliveryAddress=حذف عنوان التسليم -ConfirmDeleteDeliveryAddress=هل أنت متأكد من أنك تريد حذف هذا عنوان التسليم؟ -NewDeliveryAddress=تقديم معالجة جديدة -AddDeliveryAddress=أضف معالجة -AddAddress=أضف معالجة -NoOtherDeliveryAddress=لا بديل عن تقديم معالجة محددة -SupplierCategory=المورد الفئة -JuridicalStatus200=المستقلة -DeleteFile=حذف الملفات -ConfirmDeleteFile=هل أنت متأكد من أنك تريد حذف هذا الملف؟ -AllocateCommercial=تخصص تجاري -SelectCountry=اختر البلد -SelectCompany=اختيار طرف ثالث -Organization=المنظمة -AutomaticallyGenerated=تلقائيا -FiscalYearInformation=معلومات عن السنة المالية -FiscalMonthStart=ابتداء من شهر من السنة المالية -YouMustCreateContactFirst=يجب إنشاء رسائل البريد الإلكتروني لطرف ثالث الاتصالات الأولى أن تكون قادرة على رسائل البريد الإلكتروني إضافة الإخطارات. -ListSuppliersShort=قائمة الموردين -ListProspectsShort=قائمة التوقعات -ListCustomersShort=قائمة العملاء -# ThirdPartiesArea=Third parties area -# LastModifiedThirdParties=Last %s modified third parties -# UniqueThirdParties=Total of unique third parties -# InActivity=Open -ActivityCeased=مغلقة -# ActivityStateFilter=Activity status -# ProductsIntoElements=List of products into -# CurrentOutstandingBill=Current outstanding bill -# OutstandingBill=Max. for outstanding bill -# OutstandingBillReached=Reached max. for outstanding bill -MonkeyNumRefModelDesc=عودة número مع الشكل nnnn - ٪ syymm الزبون ورمز وnnnn - ٪ syymm مورد للقانون حيث السنة هو السنة ، هو شهر ملم وnnnn هو تسلسل بلا كسر وعدم العودة إلى 0. -LeopardNumRefModelDesc=العميل / المورد مدونة مجانية. هذا القانون يمكن تعديلها في أي وقت. -# ManagingDirectors=Manager(s) name (CEO, director, president...) +TE_PRIVATE=فرد خصوصی +TE_OTHER=دیگر +StatusProspect-1=آیا تماس بگیرید +StatusProspect0=هرگز تماس +StatusProspect1=برای تماس با +StatusProspect2=تماس در فرایند +StatusProspect3=تماس با انجام +ChangeDoNotContact=تغییر وضعیت به 'آیا تماس نیست' +ChangeNeverContacted=تغییر وضعیت به "هرگز تماس ' +ChangeToContact=تغییر وضعیت به 'برای ارتباط با " +ChangeContactInProcess=تغییر وضعیت به تماس در فرایند ' +ChangeContactDone=تغییر وضعیت به تماس انجام می شود ' +ProspectsByStatus=چشم انداز های وضعیت +BillingContact=تماس با حسابداری +NbOfAttachedFiles=تعداد فایل های پیوست شده +AttachANewFile=ضمیمه کردن فایل جدید +NoRIB=بدون BAN تعریف +NoParentCompany=هیچ یک +ExportImport=صادرات و واردات +ExportCardToFormat=کارت صادرات به فرمت +ContactNotLinkedToCompany=تماس با اشخاص ثالث در ارتباط نیست +DolibarrLogin=ورود Dolibarr +NoDolibarrAccess=بدون دسترسی Dolibarr +ExportDataset_company_1=احزاب سوم (شرکت / پایه / مردم فیزیکی) و خواص +ExportDataset_company_2=اطلاعات تماس و خواص +ImportDataset_company_1=احزاب سوم (شرکت / پایه / مردم فیزیکی) و خواص +ImportDataset_company_2=تماس / آدرس (از thirdparties یا نه) و ویژگی +ImportDataset_company_3=اطلاعات بانکی +PriceLevel=سطح قیمت ها +DeliveriesAddress=آدرس های تحویل +DeliveryAddress=آدرس تحویل +DeliveryAddressLabel=آدرس تحویل برچسب +DeleteDeliveryAddress=حذف آدرس تحویل +ConfirmDeleteDeliveryAddress=آیا مطمئن هستید که می خواهید این آدرس تحویل را حذف کنید؟ +NewDeliveryAddress=آدرس تحویل جدید +AddDeliveryAddress=اضافه کردن آدرس +AddAddress=اضافه کردن آدرس +NoOtherDeliveryAddress=بدون آدرس تحویل جایگزین تعریف +SupplierCategory=گروه تامین کننده +JuridicalStatus200=مستقل +DeleteFile=حذف فایل +ConfirmDeleteFile=آیا مطمئن هستید که می خواهید این فایل را حذف کنید؟ +AllocateCommercial=واگذار شده به نماینده فروش +SelectCountry=انتخاب کشور +SelectCompany=انتخاب شخص ثالث +Organization=سازمان +AutomaticallyGenerated=تولید به صورت خودکار +FiscalYearInformation=اطلاعات در سال مالی +FiscalMonthStart=شروع ماه از سال مالی +YouMustCreateContactFirst=شما باید ایمیل های تماس برای شخص ثالث برای اولین بار ایجاد می شود قادر به اضافه کردن اطلاعیه های ایمیل. +ListSuppliersShort=لیست تامین کنندگان +ListProspectsShort=لیست چشم انداز +ListCustomersShort=فهرست مشتریان +ThirdPartiesArea=منطقه احزاب سوم +LastModifiedThirdParties=تاریخ و زمان آخرین%s به اشخاص ثالث اصلاح شده +UniqueThirdParties=مجموع اشخاص ثالث منحصر به فرد +InActivity=باز +ActivityCeased=بسته +ActivityStateFilter=وضعیت فعالیت +ProductsIntoElements=لیست محصولات به +CurrentOutstandingBill=لایحه برجسته کنونی +OutstandingBill=حداکثر. برای لایحه برجسته +OutstandingBillReached=حداکثر رسیده است. برای لایحه برجسته +MonkeyNumRefModelDesc=numero بازگشت با فرمت%syymm-NNNN برای کد مشتری و syymm-NNNN برای کد منبع که در آن YY سال است٪، میلی متر در ماه است و NNNN دنباله بدون استراحت و بدون بازگشت به 0 است. +LeopardNumRefModelDesc=کد آزاد است. این کد را می توان در هر زمان تغییر یافتهاست. +ManagingDirectors=مدیریت (بازدید کنندگان) نام و نام خانوادگی (مدیر عامل، مدیر، رئيس جمهور ...) diff --git a/htdocs/langs/fa_IR/compta.lang b/htdocs/langs/fa_IR/compta.lang index 296780485ba..f87f8b1e8b2 100644 --- a/htdocs/langs/fa_IR/compta.lang +++ b/htdocs/langs/fa_IR/compta.lang @@ -1,185 +1,185 @@ # Dolibarr language file - Source file is en_US - compta -Accountancy=المحاسبة -AccountancyCard=بطاقة المحاسبة -Treasury=الخزانة -MenuFinancial=المالية -# TaxModuleSetupToModifyRules=Go to Taxes module setup to modify rules for calculation -OptionMode=الخيار المحاسبة -OptionModeTrue=خيار المدخلات والمخرجات -OptionModeVirtual=الخيار بين اعتمادات الديون -OptionModeTrueDesc=وفي هذا السياق ، ويحسب حجم المدفوعات (تاريخ المدفوعات). \\ nThe صحة الأرقام مضمونا إلا إذا مسك الدفاتر ومن خلال التدقيق في المدخلات والمخرجات على الحسابات عن طريق الفواتير. -OptionModeVirtualDesc=وفي هذا السياق ، فإن أكثر من الدوران يحسب الفواتير (تاريخ التصديق). إذا كانت هذه الفواتير المستحقة ، وعما إذا كانت قد دفعت أم لا ، فهي مدرجة في حجم الانتاج. -FeatureIsSupportedInInOutModeOnly=الميزة الوحيدة المتاحة في سداد ديون قروض المحاسبة طريقة (انظر التكوين وحدة المحاسبة) -VATReportBuildWithOptionDefinedInModule=المبالغ المبينة هنا يتم حسابها باستخدام القواعد التي تحددها وحدة الإعداد الضرائب. -Param=الإعداد -RemainingAmountPayment=پرداخت مبلغ باقیمانده : -AmountToBeCharged=کل مبلغ پرداخت : -AccountsGeneral=الحسابات +Accountancy=حسابداری +AccountancyCard=کارت حسابداری +Treasury=خزانه داری +MenuFinancial=مالی +TaxModuleSetupToModifyRules=برو به نصب ماژول مالیات برای تغییر قوانین برای محاسبه +OptionMode=انتخاب برای حسابداری +OptionModeTrue=انتخاب درآمدها، هزینه های +OptionModeVirtual=گزینه ادعا، بدهی +OptionModeTrueDesc=در این زمینه، گردش مالی بیش از پرداخت (تاریخ پرداخت) محاسبه می شود. اعتبار ارقام تضمین شده است تنها در صورتی که کتاب حفظ شده است از طریق ورودی / خروجی در حساب از طریق فاکتورها مورد بررسی قرار. +OptionModeVirtualDesc=در این زمینه، گردش مالی بیش از فاکتورها (تاریخ اعتبار) محاسبه می شود. هنگامی که این فاکتورها به علت، آیا آنها پرداخت شده اند یا نه، آنها در خروجی گردش مالی ذکر شده است. +FeatureIsSupportedInInOutModeOnly=ویژگی تنها در اعتبارات-بدهی حالت حسابداری موجود را ببینید (حسابداری پیکربندی ماژول) +VATReportBuildWithOptionDefinedInModule=مقدار در اینجا نشان داده شده است با استفاده از قواعد تعریف شده توسط راه اندازی ماژول مالیات محاسبه می شود. +Param=برپایی +RemainingAmountPayment=پرداخت مقدار باقی مانده: +AmountToBeCharged=کل مبلغ پرداخت: +AccountsGeneral=حساب Account=حساب -Accounts=الحسابات -# Accountparent=Account parent -# Accountsparent=Accounts parent -BillsForSuppliers=فواتير الموردين -Income=الدخل -Outcome=نتائج -ReportInOut=دخل / نتائج -ReportTurnover=دوران -PaymentsNotLinkedToInvoice=المدفوعات ليست مرتبطة بأي الفاتورة ، وذلك ليس مرتبطا بأي طرف ثالث -PaymentsNotLinkedToUser=المدفوعات ليست مرتبطة بأي مستخدم -Profit=الأرباح -Balance=التوازن -Debit=الخصم -Credit=الائتمان -# Piece=Accounting Doc. -Withdrawal=انسحاب -Withdrawals=انسحابات -AmountHTVATRealReceived=جمعت HT -AmountHTVATRealPaid=HT المدفوعة -VATToPay=ضريبة القيمة المضافة وتبيع -VATReceived=وتلقى الضريبة على القيمة المضافة -VATToCollect=ضريبة القيمة المضافة مشتريات -VATSummary=رصيد الضريبة على القيمة المضافة -# LT2SummaryES=IRPF Balance -VATPaid=دفع ضريبة القيمة المضافة -# SalaryPaid=Salary paid -# LT2PaidES=IRPF Paid -# LT2CustomerES=IRPF sales -# LT2SupplierES=IRPF purchases -VATCollected=جمعت ضريبة القيمة المضافة -ToPay=دفع -ToGet=العودة -# SpecialExpensesArea=Area for all special paiements -TaxAndDividendsArea=ضريبة أرباح الأسهم والمساهمات الاجتماعية ، ومنطقة -SocialContribution=المساهمة الاجتماعية -SocialContributions=المساهمات الاجتماعية -# MenuSpecialExpenses=Special expenses -MenuTaxAndDividends=الضرائب وعوائد -# MenuSalaries=Salaries -MenuSocialContributions=المساهمات الاجتماعية -MenuNewSocialContribution=مساهمة جديدة -NewSocialContribution=المساهمة الاجتماعية الجديدة -ContributionsToPay=دفع الاشتراكات -AccountancyTreasuryArea=المحاسبة / الخزانة المنطقة -AccountancySetup=المحاسبة الإعداد -NewPayment=دفع جديدة -Payments=المدفوعات -PaymentCustomerInvoice=الزبون تسديد الفاتورة -PaymentSupplierInvoice=دفع فاتورة المورد -PaymentSocialContribution=دفع المساهمة الاجتماعية -PaymentVat=دفع ضريبة القيمة المضافة -# PaymentSalary=Salary payment -ListPayment=قائمة المدفوعات -ListOfPayments=قائمة المدفوعات -ListOfCustomerPayments=قائمة مدفوعات العملاء -ListOfSupplierPayments=قائمة الموردين المدفوعات -DatePayment=تاريخ الدفع -# DateStartPeriod=Date start period -# DateEndPeriod=Date end period -NewVATPayment=دفع ضريبة القيمة المضافة الجديدة -# newLT2PaymentES=New IRPF payment -# LT2PaymentES=IRPF Payment -# LT2PaymentsES=IRPF Payments -VATPayment=دفع ضريبة القيمة المضافة -VATPayments=دفع ضريبة القيمة المضافة -SocialContributionsPayments=المساهمات الاجتماعية المدفوعات -ShowVatPayment=وتظهر دفع ضريبة القيمة المضافة -TotalToPay=على دفع ما مجموعه -TotalVATReceived=تلقى مجموع الضريبة على القيمة المضافة -CustomerAccountancyCode=قانون محاسبة العملاء -SupplierAccountancyCode=مورد قانون المحاسبة -AccountNumberShort=رقم الحساب -AccountNumber=رقم الحساب -NewAccount=حساب جديد -SalesTurnover=مبيعات -# SalesTurnoverMinimum=Minimum sales turnover -ByThirdParties=بو أطراف ثالثة -ByUserAuthorOfInvoice=فاتورة من قبل المؤلف -AccountancyExport=المحاسبة التصدير -ErrorWrongAccountancyCodeForCompany=قانون محاسبة العملاء سيئة للق ٪ -SuppliersProductsSellSalesTurnover=وقد ولدت عن طريق الدوران مبيعات الموردين المنتجات. -CheckReceipt=التحقق من إيداع -CheckReceiptShort=التحقق من إيداع -NewCheckReceipt=خصم جديد -NewCheckDeposit=تأكد من ايداع جديدة -NewCheckDepositOn=تهيئة لتلقي الودائع على حساب : ٪ ق -NoWaitingChecks=لم ينتظر إيداع الشيكات. -DateChequeReceived=استقبال المدخلات تاريخ الشيك -NbOfCheques=ملاحظة : للشيكات -PaySocialContribution=دفع المساهمات الاجتماعية -ConfirmPaySocialContribution=هل أنت متأكد من أن يصنف هذه المساهمة paid الاجتماعية؟ -DeleteSocialContribution=حذف المساهمات الاجتماعية -ConfirmDeleteSocialContribution=هل أنت متأكد من أنك تريد حذف هذه المساهمة الاجتماعية؟ -ExportDataset_tax_1=المساهمات الاجتماعية والمدفوعات -# CalcModeVATDebt=Mode %sVAT on commitment accounting%s. -# CalcModeVATEngagement=Mode %sVAT on incomes-expenses%s. -# CalcModeDebt=Mode %sClaims-Debts%s said Commitment accounting. -# CalcModeEngagement=Mode %sIncomes-Expenses%s said cash accounting -# AnnualSummaryDueDebtMode=Balance of income and expenses, annual summary -# AnnualSummaryInputOutputMode=Balance of income and expenses, annual summary -AnnualByCompaniesDueDebtMode=ميزان الإيرادات والنفقات ، وبالتفصيل من قبل أطراف ثالثة ، وطريقة سداد ديون sClaims ٪ ٪ ق قال الالتزام والمحاسبة. -AnnualByCompaniesInputOutputMode=ميزان الإيرادات والنفقات ، وبالتفصيل من قبل أطراف ثالثة ، واسطة بين sRevenues ٪ من مصروفات ٪ ق قال المحاسبة النقدية. -SeeReportInInputOutputMode=انظر التقرير sIncomes ٪ بين المصروفات ٪ ق قال المحاسبة النقدية لحساب المدفوعات الفعلية -SeeReportInDueDebtMode=انظر التقرير sClaims ٪ بين ديونها ٪ ق الالتزام والمحاسبة وقال لحساب فواتير -# RulesAmountWithTaxIncluded=- Amounts shown are with all taxes included -RulesResultDue=-- المبالغ المبينة مع كل الضرائب وشملت
    -- ويشمل الفواتير غير المسددة والنفقات والضريبة على القيمة المضافة المدفوعة سواء كانوا أم لا.
    -- يقوم على تاريخ المصادقة على الفواتير وضريبة القيمة المضافة وعلى الموعد المقرر لتغطية النفقات. -# RulesResultInOut=- It includes the real payments made on invoices, expenses and VAT.
    - It is based on the payment dates of the invoices, expenses and VAT. -RulesCADue=-- ويشمل العملاء الفواتير المستحقة ما إذا كانت دفعت أم لا.
    -- يقوم على تاريخ المصادقة على هذه الفواتير.
    -RulesCAIn=-- ويشمل جميع الفعال دفع الفواتير الواردة من العملاء.
    -- يقوم على دفع هذه الفواتير تاريخ
    -# DepositsAreNotIncluded=- Deposit invoices are nor included -# DepositsAreIncluded=- Deposit invoices are included -# LT2ReportByCustomersInInputOutputModeES=Report by third party IRPF -# VATReportByCustomersInInputOutputMode=Report by the customer VAT collected and paid -# VATReportByCustomersInDueDebtMode=Report by the customer VAT collected and paid -# VATReportByQuartersInInputOutputMode=Report by rate of the VAT collected and paid -# VATReportByQuartersInDueDebtMode=Report by rate of the VAT collected and paid -SeeVATReportInInputOutputMode=انظر التقرير تغطية sVAT ٪ ق ٪ لحساب موحد -SeeVATReportInDueDebtMode=انظر التقرير عن تدفق sVAT ٪ ق ٪ لحساب مع خيار على تدفق -# RulesVATInServices=- For services, the report includes the VAT regulations actually received or issued on the basis of the date of payment. -# RulesVATInProducts=- For material assets, it includes the VAT invoices on the basis of the invoice date. -# RulesVATDueServices=- For services, the report includes VAT invoices due, paid or not, based on the invoice date. -# RulesVATDueProducts=- For material assets, it includes the VAT invoices, based on the invoice date. -OptionVatInfoModuleComptabilite=ملاحظة : للحصول على الأصول المادية ، فإنه ينبغي استخدام تاريخ التسليم ليكون أكثر إنصافا. -PercentOfInvoice=٪ ٪ / الفاتورة -NotUsedForGoods=لا تستخدم على السلع -ProposalStats=آمار در مورد پیشنهادها -OrderStats=آمار به دستور -InvoiceStats=آمار در صورتحساب -Dispatch=إرسال -Dispatched=أوفدت -ToDispatch=إيفاد -ThirdPartyMustBeEditAsCustomer=ويجب تحديد الطرف الثالث كزبون -# SellsJournal=Sales Journal -# PurchasesJournal=Purchases Journal -# DescSellsJournal=Sales Journal -# DescPurchasesJournal=Purchases Journal -InvoiceRef=المرجع الفاتورة. -CodeNotDef=غير معرف +Accounts=حساب +Accountparent=حساب پدر و مادر +Accountsparent=حساب پدر و مادر +BillsForSuppliers=صورت حساب برای تامین کنندگان +Income=درامد +Outcome=هزینه +ReportInOut=درآمد / هزینه +ReportTurnover=حجم معاملات +PaymentsNotLinkedToInvoice=پرداخت به هر فاکتور در ارتباط نیست، بنابراین به هر شخص ثالث مرتبط نیست +PaymentsNotLinkedToUser=پرداخت به هر کاربر در ارتباط نیست +Profit=سود +Balance=تعادل +Debit=بدهی +Credit=اعتبار +Piece=حسابداری توضیحات. +Withdrawal=برداشت +Withdrawals=برداشت ها +AmountHTVATRealReceived=شبکه جمع آوری +AmountHTVATRealPaid=خالص پرداخت می شود +VATToPay=مالیات بر ارزش افزوده به فروش می رساند +VATReceived=مالیات بر ارزش افزوده دریافت +VATToCollect=خرید مالیات بر ارزش افزوده +VATSummary=موجودی مالیات بر ارزش افزوده +LT2SummaryES=IRPF موجودی +VATPaid=مالیات بر ارزش افزوده پرداخت می شود +SalaryPaid=حقوق و دستمزد پرداخت می شود +LT2PaidES=IRPF پرداخت +LT2CustomerES=فروش IRPF +LT2SupplierES=خرید IRPF +VATCollected=مالیات بر ارزش افزوده جمع آوری +ToPay=به پرداخت +ToGet=به عقب بر گردیم +SpecialExpensesArea=منطقه برای تمام پرداخت های ویژه +TaxAndDividendsArea=مالیات، مشارکت اجتماعی و سود سهام منطقه +SocialContribution=مشارکت های اجتماعی +SocialContributions=مشارکت های اجتماعی +MenuSpecialExpenses=هزینه های ویژه +MenuTaxAndDividends=مالیات و سود سهام +MenuSalaries=حقوق +MenuSocialContributions=مشارکت های اجتماعی +MenuNewSocialContribution=سهم های جدید +NewSocialContribution=نقش های جدید اجتماعی +ContributionsToPay=مشارکت به پرداخت +AccountancyTreasuryArea=منطقه حسابداری / خزانه داری +AccountancySetup=راه اندازی حسابداری +NewPayment=پرداخت جدید +Payments=پرداخت +PaymentCustomerInvoice=پرداخت صورت حساب به مشتری +PaymentSupplierInvoice=پرداخت صورتحساب تامین کننده +PaymentSocialContribution=پرداخت مشارکت های اجتماعی +PaymentVat=پرداخت مالیات بر ارزش افزوده +PaymentSalary=پرداخت حقوق و دستمزد +ListPayment=فهرست پرداخت +ListOfPayments=فهرست پرداخت +ListOfCustomerPayments=لیست پرداخت های مشتری +ListOfSupplierPayments=لیست پرداخت های منبع +DatePayment=تاریخ پرداخت +DateStartPeriod=دوره تاریخ شروع +DateEndPeriod=دوره تاریخ پایان +NewVATPayment=پرداخت مالیات بر ارزش افزوده جدید +newLT2PaymentES=پرداخت IRPF جدید +LT2PaymentES=پرداخت IRPF +LT2PaymentsES=IRPF پرداخت +VATPayment=مالیات بر ارزش افزوده پرداخت +VATPayments=پرداخت مالیات بر ارزش افزوده +SocialContributionsPayments=کمک های اجتماعی پرداخت +ShowVatPayment=نمایش پرداخت مالیات بر ارزش افزوده +TotalToPay=مجموع به پرداخت +TotalVATReceived=مالیات بر ارزش افزوده دریافت شده +CustomerAccountancyCode=کد حسابداری مشتری +SupplierAccountancyCode=کد حسابداری تامین کننده +AccountNumberShort=شماره حساب +AccountNumber=شماره حساب +NewAccount=حساب کاربری جدید +SalesTurnover=گردش مالی فروش +SalesTurnoverMinimum=حداقل گردش مالی فروش +ByThirdParties=توسط اشخاص ثالث +ByUserAuthorOfInvoice=توسط نویسنده فاکتور +AccountancyExport=صادرات حسابداری +ErrorWrongAccountancyCodeForCompany=بد کد حسابداری مشتری برای%s +SuppliersProductsSellSalesTurnover=گردش مالی تولید شده توسط فروش محصولات تولید کننده است. +CheckReceipt=چک سپرده +CheckReceiptShort=چک سپرده +NewCheckReceipt=تخفیف های جدید +NewCheckDeposit=واریز چک های جدید +NewCheckDepositOn=ایجاد رسید سپرده در حساب:%s را +NoWaitingChecks=بدون چک انتظار برای سپرده. +DateChequeReceived=تاریخ دریافت چک +NbOfCheques=Nb در چک +PaySocialContribution=پرداخت کمک های اجتماعی +ConfirmPaySocialContribution=آیا مطمئن هستید که می خواهید برای طبقه بندی این کمک های اجتماعی به عنوان پرداخت می شود؟ +DeleteSocialContribution=حذف مشارکت های اجتماعی +ConfirmDeleteSocialContribution=آیا مطمئن هستید که می خواهید این مشارکت اجتماعی را حذف کنید؟ +ExportDataset_tax_1=مشارکت اجتماعی و پرداخت +CalcModeVATDebt=حالت٪ SVAT در تعهد حسابداری٪ است. +CalcModeVATEngagement=حالت٪ SVAT در درآمد، هزینه٪ است. +CalcModeDebt=حالت%sClaims-بدهی٪ گفت حسابداری تعهد. +CalcModeEngagement=حالت%sIncomes، هزینه٪ گفت حسابداری نقدی +AnnualSummaryDueDebtMode=تعادل درآمد و هزینه، خلاصه سالانه +AnnualSummaryInputOutputMode=تعادل درآمد و هزینه، خلاصه سالانه +AnnualByCompaniesDueDebtMode=تعادل درآمد و هزینه، با جزئیات توسط اشخاص ثالث، حالت%sClaims-بدهی٪ گفت حسابداری تعهد. +AnnualByCompaniesInputOutputMode=تعادل درآمد و هزینه، با جزئیات توسط اشخاص ثالث، حالت%sIncomes، هزینه٪ گفت حسابداری نقدی. +SeeReportInInputOutputMode=مشاهده گزارش%sIncomes، هزینه٪ گفت حسابداری نقدی برای محاسبه پرداخت های واقعی ساخته شده است +SeeReportInDueDebtMode=مشاهده گزارش%sClaims-بدهی٪ گفت تعهد حسابداری برای محاسبه در فاکتور صادر شده +RulesAmountWithTaxIncluded=- مقدار نشان داده شده است با تمام مالیات گنجانده شده اند +RulesResultDue=- شامل فاکتورها برجسته، هزینه ها و مالیات بر ارزش افزوده که آیا آنها پول پرداخت می شود یا نه.
    - این است که در تاریخ اعتبار از فاکتورها و مالیات بر ارزش افزوده و در موعد مقرر برای هزینه است. +RulesResultInOut=- این شامل پرداخت های واقعی ساخته شده در صورت حساب، هزینه ها و مالیات بر ارزش افزوده.
    - این است که در تاریخ های پرداخت صورت حساب، هزینه ها و مالیات بر ارزش افزوده است. +RulesCADue=- شامل فاکتورها به دلیل مشتری که آیا آنها پول پرداخت می شود یا نه.
    - این است که در تاریخ اعتبار سنجی از این فاکتورها است.
    +RulesCAIn=- این شامل تمام پرداخت های موثر از فاکتورها دریافت شده از مشتریان.
    - این است که در روز پرداخت از این فاکتورها بر اساس
    +DepositsAreNotIncluded=- صورت حساب های سپرده ها و نه شامل +DepositsAreIncluded=- صورت حساب های سپرده را شامل می شوند +LT2ReportByCustomersInInputOutputModeES=گزارش شده توسط شخص ثالث IRPF +VATReportByCustomersInInputOutputMode=گزارش های مالیات بر ارزش افزوده مشتری جمع آوری و پرداخت +VATReportByCustomersInDueDebtMode=گزارش های مالیات بر ارزش افزوده مشتری جمع آوری و پرداخت +VATReportByQuartersInInputOutputMode=گزارش های نرخ مالیات بر ارزش افزوده جمع آوری و پرداخت +VATReportByQuartersInDueDebtMode=گزارش های نرخ مالیات بر ارزش افزوده جمع آوری و پرداخت +SeeVATReportInInputOutputMode=گزارش٪ SVAT قفسه٪ برای محاسبه های استاندارد مشاهده +SeeVATReportInDueDebtMode=گزارش٪ SVAT در جریان٪ برای محاسبه با گزینه ای در جریان مشاهده +RulesVATInServices=- برای خدمات، این گزارش شامل مقررات مالیات بر ارزش افزوده در واقع دریافت و یا صادر شده بر اساس تاریخ پرداخت. +RulesVATInProducts=- برای دارایی های مادی، آن را شامل فاکتورها مالیات بر ارزش افزوده بر اساس تاریخ فاکتور. +RulesVATDueServices=- برای خدمات، این گزارش شامل فاکتور مالیات بر ارزش افزوده به علت، پرداخت می شود یا نه، بر اساس تاریخ فاکتور. +RulesVATDueProducts=- برای دارایی های مادی، آن را شامل فاکتورها مالیات بر ارزش افزوده، بر اساس تاریخ فاکتور. +OptionVatInfoModuleComptabilite=توجه: برای دارایی های مادی، باید از تاریخ تحویل به عادلانه تر استفاده کنید. +PercentOfInvoice=٪٪ / فاکتور +NotUsedForGoods=در محصولات استفاده نشده +ProposalStats=آمار در طرح +OrderStats=آمار در سفارشات +InvoiceStats=آمار در صورت حساب +Dispatch=توزیع +Dispatched=اعزام +ToDispatch=اعزام +ThirdPartyMustBeEditAsCustomer=شخص ثالث باید به عنوان یک مشتری تعریف شده +SellsJournal=مجله فروش +PurchasesJournal=مجله خرید +DescSellsJournal=مجله فروش +DescPurchasesJournal=مجله خرید +InvoiceRef=کد عکس فاکتور. +CodeNotDef=تعریف نشده AddRemind=اعزام مقدار موجود -RemainToDivide= باقی مانده اند که اعزام : -WarningDepositsNotIncluded=پول واریز کردن فاکتورها در این نسخه با این ماژول حسابداری گنجانده شده است. -# DatePaymentTermCantBeLowerThanObjectDate=Payment term date can't be lower than object date. -# Pcg_version=Pcg version -# Pcg_type=Pcg type -# Pcg_subtype=Pcg subtype -# InvoiceLinesToDispatch=Invoice lines to dispatch -# InvoiceDispatched=Dispatched invoices -# AccountancyDashboard=Accountancy summary -# ByProductsAndServices=By products and services -# RefExt=External ref -# ToCreateAPredefinedInvoice=To create a predefined invoice, create a standard invoice then, without validating it, click onto button "Convert to predefined invoice". -# LinkedOrder=linked to order -# ReCalculate=Recalculate -# Mode1=Method 1 -# Mode2=Method 2 -# CalculationRuleDesc=To calculate total VAT, there is two methods:
    Method 1 is rounding vat on each line, then summing them.
    Method 2 is summing all vat on each line, then rounding result.
    Final result may differs from few cents. Default mode is mode %s. -# CalculationRuleDescSupplier=according to supplier, choose appropriate method to apply same calculation rule and get same result expected by your supplier. -# TurnoverPerProductInCommitmentAccountingNotRelevant=Turnover report per product, when using a cash accountancy mode is not relevant. This report is only available when using engagement accountancy mode (see setup of accountancy module). -# CalculationMode=Calculation mode -# COMPTA_PRODUCT_BUY_ACCOUNT=Default accountancy code to buy products -# COMPTA_PRODUCT_SOLD_ACCOUNT=Default accountancy code to sell products -# COMPTA_SERVICE_BUY_ACCOUNT=Default accountancy code to buy services -# COMPTA_SERVICE_SOLD_ACCOUNT=Default accountancy code to sell services -# COMPTA_VAT_ACCOUNT=Default accountancy code for collecting VAT -# COMPTA_VAT_BUY_ACCOUNT=Default accountancy code for paying VAT -# COMPTA_ACCOUNT_CUSTOMER=Accountancy code by default for customer thirdparties -# COMPTA_ACCOUNT_SUPPLIER=Accountancy code by default for supplier thirdparties +RemainToDivide= باقی می ماند به اعزام: +WarningDepositsNotIncluded=سپرده فاکتورها در این نسخه با این ماژول حسابداری گنجانده نشده است. +DatePaymentTermCantBeLowerThanObjectDate=تاریخ مدت پرداخت نمی تواند کمتر از تاریخ شی. +Pcg_version=نسخه PCG +Pcg_type=نوع PCG +Pcg_subtype=زیر گروه PCG +InvoiceLinesToDispatch=خطوط فاکتور به اعزام +InvoiceDispatched=فاکتورها اعزام +AccountancyDashboard=خلاصه حسابداری +ByProductsAndServices=با محصولات و خدمات +RefExt=کد عکس خارجی +ToCreateAPredefinedInvoice=برای ایجاد یک فاکتور از پیش تعریف شده، ایجاد یک فاکتور استاندارد پس از آن، بدون تأیید آن، با کلیک بر روی دکمه "تبدیل به فاکتور از پیش تعریف شده". +LinkedOrder=وابسته به سفارش +ReCalculate=دوباره حساب کردن +Mode1=روش 1 +Mode2=روش 2 +CalculationRuleDesc=برای محاسبه مالیات بر ارزش افزوده در کل، دو روش وجود دارد:
    روش 1 است گرد کردن مالیات بر ارزش افزوده در هر خط، و سپس جمع آنها.
    روش 2 است جمع تمام مالیات بر ارزش افزوده در هر خط، و سپس گرد کردن نتیجه.
    نتیجه نهایی ممکن است از چند سنت متفاوت است. حالت پیش فرض حالت%s است. +CalculationRuleDescSupplier=با توجه به منبع، انتخاب روش مناسب برای اعمال قانون محاسبه همان و گرفتن همان نتیجه انتظار می رود با عرضه کننده کالا خود را. +TurnoverPerProductInCommitmentAccountingNotRelevant=گزارش گردش مالی در هر محصول، در هنگام استفاده از حالت حسابداری نقدی مربوط نیست. این گزارش که با استفاده از تعامل حالت حسابداری (راه اندازی ماژول حسابداری را مشاهده کنید) فقط در دسترس است. +CalculationMode=حالت محاسبه +COMPTA_PRODUCT_BUY_ACCOUNT=کد پیش فرض حسابداری برای خرید محصولات +COMPTA_PRODUCT_SOLD_ACCOUNT=کد پیش فرض حسابداری برای فروش محصولات +COMPTA_SERVICE_BUY_ACCOUNT=کد پیش فرض حسابداری برای خرید خدمات +COMPTA_SERVICE_SOLD_ACCOUNT=کد پیش فرض حسابداری به فروش خدمات +COMPTA_VAT_ACCOUNT=پیش فرض کد حسابداری برای جمع آوری مالیات بر ارزش افزوده +COMPTA_VAT_BUY_ACCOUNT=پیش فرض کد حسابداری برای پرداخت مالیات بر ارزش افزوده +COMPTA_ACCOUNT_CUSTOMER=کد حسابداری به طور پیش فرض برای thirdparties مشتری +COMPTA_ACCOUNT_SUPPLIER=کد حسابداری به طور پیش فرض برای thirdparties منبع diff --git a/htdocs/langs/fa_IR/contracts.lang b/htdocs/langs/fa_IR/contracts.lang index 873075557e2..2951d988ee5 100644 --- a/htdocs/langs/fa_IR/contracts.lang +++ b/htdocs/langs/fa_IR/contracts.lang @@ -1,99 +1,101 @@ # Dolibarr language file - Source file is en_US - contracts -ContractsArea=عقود منطقة -ListOfContracts=قائمة العقود -LastContracts=آخر تعديل العقود ق ٪ -AllContracts=جميع العقود -ContractCard=عقد بطاقة -ContractStatus=عقد مركز -ContractStatusNotRunning=لا تعمل -ContractStatusRunning=على التوالي -ContractStatusDraft=مسودة -ContractStatusValidated=صادق -ContractStatusClosed=مغلقة -ServiceStatusInitial=لا تعمل -ServiceStatusRunning=على التوالي -ServiceStatusNotLate=على التوالي ، وليس انتهاء -ServiceStatusNotLateShort=لا تنتهي -ServiceStatusLate=على التوالي ، وانتهت -ServiceStatusLateShort=انتهى -ServiceStatusClosed=مغلقة -ServicesLegend=خدمات أسطورة -Contracts=عقود -Contract=العقد -NoContracts=أي عقود -MenuServices=الخدمات -MenuInactiveServices=الخدمات غير الفعالة -MenuRunningServices=ادارة الخدمات -MenuExpiredServices=انتهت الخدمات -MenuClosedServices=أغلقت الخدمات -NewContract=العقد الجديد -AddContract=إضافة العقد -SearchAContract=بحث عقد -DeleteAContract=الغاء العقد -CloseAContract=وثيقة العقد -ConfirmDeleteAContract=هل أنت متأكد من أنك تريد حذف هذا العقد ، وجميع الخدمات التي تقدمها؟ -ConfirmValidateContract=هل أنت متأكد أنك تريد التحقق من صحة هذا العقد؟ -ConfirmCloseContract=هذا ستغلق جميع الخدمات (أو لا). هل أنت متأكد أنك تريد إغلاق هذا العقد؟ -ConfirmCloseService=هل أنت متأكد من أن وثيقة مع هذه الخدمة حتى الآن ٪ ق؟ -ValidateAContract=مصادقة على العقود -ActivateService=تفعيل الخدمة -ConfirmActivateService=هل أنت متأكد من تفعيل هذه الخدمة في تاريخ ٪ ق؟ -# RefContract=Contract reference -DateContract=تاريخ العقد -DateServiceActivate=تاريخ تفعيل الخدمة -DateServiceUnactivate=تاريخ خدمة unactivation -DateServiceStart=موعدا لبدء الخدمة -DateServiceEnd=موعد لنهاية الخدمة -ShowContract=وتظهر العقد -ListOfServices=قائمة الخدمات -ListOfInactiveServices=قائمة الخدمات غير الفعالة -ListOfExpiredServices=انتهت نشطة قائمة الخدمات -ListOfClosedServices=قائمة مغلقة الخدمات -ListOfRunningContractsLines=قائمة تشغيل خطوط العقد -ListOfRunningServices=لائحة ادارة الخدمات -NotActivatedServices=لا تنشيط الخدمات) بين مصدق العقود) -BoardNotActivatedServices=خدمات لتفعيل العقود بين مصدق -LastContracts=آخر تعديل العقود ق ٪ -LastActivatedServices=ق الماضي ٪ تنشيط الخدمات -LastModifiedServices=آخر تعديل ٪ ق الخدمات -EditServiceLine=تعديل خط الخدمات -ContractStartDate=تاريخ البدء -ContractEndDate=نهاية التاريخ -DateStartPlanned=تاريخ البدء المخطط -DateStartPlannedShort=تاريخ البدء المخطط -DateEndPlanned=المخطط لها تاريخ انتهاء -DateEndPlannedShort=المخطط لها تاريخ انتهاء -DateStartReal=البداية الحقيقية لتاريخ -DateStartRealShort=البداية الحقيقية لتاريخ -DateEndReal=نهاية التاريخ الحقيقي -DateEndRealShort=نهاية التاريخ الحقيقي -NbOfServices=ملاحظة : الخدمات -CloseService=قريبة من الخدمة -ServicesNomberShort=ق ٪ خدمة (ق) -RunningServices=ادارة الخدمات -BoardRunningServices=انتهت إدارة الخدمات -ServiceStatus=مركز الخدمة -DraftContracts=عقود مشاريع -CloseRefusedBecauseOneServiceActive=العقد لا يمكن أن تكون مغلقة حيث يوجد واحد على الأقل من الخدمة على فتح -CloseAllContracts=إغلاق جميع العقود -DeleteContractLine=عقد حذف السطر -ConfirmDeleteContractLine=هل أنت متأكد من أنك تريد حذف هذا العقد الخط؟ -MoveToAnotherContract=الانتقال إلى خدمة أخرى. -ConfirmMoveToAnotherContract=الهدف الأول choosed جديدة العقد وأريد التأكد من هذه الخدمة للتحرك في هذا العقد. -ConfirmMoveToAnotherContractQuestion=اختيار القائمة التي العقد (من نفس الطرف الثالث) ، وترغب في نقل هذه الخدمة؟ -PaymentRenewContractId=تجديد العقد الخط (رقم ٪) -ExpiredSince=تاريخ الانتهاء -RelatedContracts=العقود ذات الصلة -# NoExpiredServices=No expired active services -# ListOfServicesToExpireWithDuration=List of Services to expire in %s days -# ListOfServicesToExpireWithDurationNeg=List of Services expired from more than %s days -# ListOfServicesToExpire=List of Services to expire -# NoteListOfYourExpiredServices=This list contains only services of contracts for third parties you are linked to as a sale representative. +ContractsArea=منطقه قرارداد +ListOfContracts=فهرست قرارداد +LastContracts=تاریخ و زمان آخرین%s در قرارداد اصلاح شده +AllContracts=همه قراردادها +ContractCard=کارت قرارداد +ContractStatus=وضعیت قرارداد +ContractStatusNotRunning=در حال اجرا نیست +ContractStatusRunning=در حال اجرا +ContractStatusDraft=پیش نویس +ContractStatusValidated=اعتبار +ContractStatusClosed=بسته +ServiceStatusInitial=در حال اجرا نیست +ServiceStatusRunning=در حال اجرا +ServiceStatusNotLate=در حال اجرا، نه تمام شده +ServiceStatusNotLateShort=تمام نشده است +ServiceStatusLate=در حال اجرا، تمام شده +ServiceStatusLateShort=منقضی شده +ServiceStatusClosed=بسته +ServicesLegend=خدمات افسانه +Contracts=قراردادها +Contract=قرارداد +NoContracts=بدون قرارداد +MenuServices=خدمات +MenuInactiveServices=خدمات فعال است +MenuRunningServices=در حال اجرا خدمات +MenuExpiredServices=خدمات منقضی شده +MenuClosedServices=خدمات بسته شده +NewContract=قرارداد جدید +AddContract=اضافه کردن قرارداد +SearchAContract=جستجوی یک قرارداد +DeleteAContract=حذف یک قرارداد +CloseAContract=بستن یک قرارداد +ConfirmDeleteAContract=آیا مطمئن هستید که می خواهید این قرارداد و تمام خدمات خود را حذف کنید؟ +ConfirmValidateContract=آیا مطمئن هستید که می خواهید به اعتبار این قرارداد با نام%s را؟ +ConfirmCloseContract=این همه خدمات (فعال یا نه) نزدیک است. آیا مطمئن هستید که می خواهید برای بستن این قرارداد؟ +ConfirmCloseService=آیا مطمئن هستید که می خواهید برای بستن این سرویس با تاریخ از%s؟ +ValidateAContract=اعتبار قرارداد +ActivateService=فعال خدمات +ConfirmActivateService=آیا مطمئن هستید که می خواهید برای فعال سازی این سرویس با تاریخ از%s؟ +RefContract=قرارداد مرجع +DateContract=تاریخ قرارداد +DateServiceActivate=تاریخ فعال سازی سرویس +DateServiceUnactivate=سرویس تاریخ بی اثر سازی +DateServiceStart=تاریخ برای آغاز خدمات +DateServiceEnd=تاریخ برای پایان خدمات +ShowContract=نمایش قرارداد +ListOfServices=فهرست خدمات +ListOfInactiveServices=فهرست خدمات فعال است +ListOfExpiredServices=فهرست خدمات فعال منقضی شده +ListOfClosedServices=فهرست خدمات بسته +ListOfRunningContractsLines=فهرست در حال اجرا خطوط قرارداد +ListOfRunningServices=لیست خدمات در حال اجرا +NotActivatedServices=خدمات غیر فعال (در قرارداد اعتبار) +BoardNotActivatedServices=خدمات برای فعال سازی در قرارداد اعتبار +LastContracts=تاریخ و زمان آخرین%s در قرارداد اصلاح شده +LastActivatedServices=تاریخ و زمان آخرین%s به خدمات فعال +LastModifiedServices=تاریخ و زمان آخرین٪ بازدید کنندگان خدمات اصلاح شده +EditServiceLine=خط ویرایش خدمات +ContractStartDate=تاریخ شروع +ContractEndDate=تاریخ پایان +DateStartPlanned=تاریخ شروع برنامه ریزی شده +DateStartPlannedShort=تاریخ شروع برنامه ریزی شده +DateEndPlanned=تاریخ پایان برنامه ریزی شده +DateEndPlannedShort=تاریخ پایان برنامه ریزی شده +DateStartReal=تاریخ شروع واقعی +DateStartRealShort=تاریخ شروع واقعی +DateEndReal=تاریخ پایان واقعی +DateEndRealShort=تاریخ پایان واقعی +NbOfServices=Nb و خدمات +CloseService=نزدیک خدمات +ServicesNomberShort=٪ سرویس (ها) +RunningServices=در حال اجرا خدمات +BoardRunningServices=خدمات تمام شده در حال اجرا +ServiceStatus=وضعیت خدمات +DraftContracts=پیش نویس قرارداد +CloseRefusedBecauseOneServiceActive=قرارداد نمی تواند بسته شود وجود دارد حداقل یک سرویس باز شده بر روی آن است +CloseAllContracts=بستن تمام خطوط قرارداد +DeleteContractLine=حذف یک خط قرارداد +ConfirmDeleteContractLine=آیا مطمئن هستید که می خواهید این قرارداد خط را حذف کنید؟ +MoveToAnotherContract=انتقال خدمات به قرارداد دیگری. +ConfirmMoveToAnotherContract=من انتخاب قرارداد هدف جدید و تایید من می خواهم به حرکت می کند این سرویس به این قرارداد. +ConfirmMoveToAnotherContractQuestion=را انتخاب کنید که در آن قرارداد موجود (از شخص ثالث همان)، شما می خواهید به حرکت می کند این سرویس به؟ +PaymentRenewContractId=تمدید قرارداد خط (تعداد٪ بازدید کنندگان) +ExpiredSince=تاریخ انقضا +RelatedContracts=قراردادهای مرتبط +NoExpiredServices=بدون خدمات فعال منقضی شده +ListOfServicesToExpireWithDuration=فهرست خدمات به پایان می رسد در%s روز +ListOfServicesToExpireWithDurationNeg=فهرست خدمات تمام شده از بیش از%s روز +ListOfServicesToExpire=فهرست خدمات دات کام +NoteListOfYourExpiredServices=این لیست فقط شامل خدمات قرارداد برای اشخاص ثالث به شما به عنوان یک نماینده فروش مرتبط است. +StandardContractsTemplate=Standard contracts template +ContactNameAndSignature=For %s, name and signature: ##### Types de contacts ##### -TypeContact_contrat_internal_SALESREPSIGN=ممثل مبيعات توقيع العقد -TypeContact_contrat_internal_SALESREPFOLL=ممثل مبيعات متابعة العقد -TypeContact_contrat_external_BILLING=فواتير العملاء الاتصال -TypeContact_contrat_external_CUSTOMER=متابعة العملاء الاتصال -TypeContact_contrat_external_SALESREPSIGN=توقيع عقد خدمات العملاء -# Error_CONTRACT_ADDON_NotDefined=Constant CONTRACT_ADDON not defined +TypeContact_contrat_internal_SALESREPSIGN=نمایندگی فروش امضای قرارداد +TypeContact_contrat_internal_SALESREPFOLL=نمایندگی فروش محصولات زیر را تا قرارداد +TypeContact_contrat_external_BILLING=حسابداری ارتباط با مشتری +TypeContact_contrat_external_CUSTOMER=پیگیری ارتباط با مشتری +TypeContact_contrat_external_SALESREPSIGN=قرارداد امضای ارتباط با مشتری +Error_CONTRACT_ADDON_NotDefined=CONTRACT_ADDON ثابت تعریف نشده diff --git a/htdocs/langs/fa_IR/cron.lang b/htdocs/langs/fa_IR/cron.lang index 4b2504ebe4c..d05a3a71902 100644 --- a/htdocs/langs/fa_IR/cron.lang +++ b/htdocs/langs/fa_IR/cron.lang @@ -1,114 +1,87 @@ # Dolibarr language file - Source file is en_US - cron -# # About page -# -About = حول -# CronAbout = About Cron -# CronAboutPage = Cron about page - -# +About = در حدود +CronAbout = درباره cron را +CronAboutPage = cron را در مورد صفحه # Right -# -# Permission23101 = Read Scheduled task -# Permission23102 = Create/update Scheduled task -# Permission23103 = Delete Scheduled task -# Permission23104 = Execute Scheduled task - -# +Permission23101 = به نشانه خوانده شدن برنامه ریزی شده کار +Permission23102 = ایجاد / بروز رسانی برنامه ریزی شده کار +Permission23103 = حذف کار برنامه ریزی شده +Permission23104 = اجرای کار برنامه ریزی شده # Admin -# -# CronSetup= Scheduled job management setup -# URLToLaunchCronJobs=URL to check and launch cron jobs if required -# OrToLaunchASpecificJob=Or to check and launch a specific job -# KeyForCronAccess=Security key for URL to launch cron jobs -# FileToLaunchCronJobs=Command line to launch cron jobs -# CronExplainHowToRunUnix=On Unix environment you should use crontab to run Command line each minutes -# CronExplainHowToRunWin=On Microsoft(tm) Windows environement you can use Scheduled task tools to run Command line each minutes - - -# +CronSetup= برنامه ریزی راه اندازی مدیریت کار +URLToLaunchCronJobs=URL برای بررسی و راه اندازی کارهای cron در صورت لزوم +OrToLaunchASpecificJob=و یا برای بررسی و راه اندازی یک کار خاص +KeyForCronAccess=کلید امنیتی برای URL برای راه اندازی کارهای cron +FileToLaunchCronJobs=خط فرمان برای راه اندازی کارهای cron +CronExplainHowToRunUnix=در محیط یونیکس شما باید crontab کاربر برای اجرای خط فرمان در هر دقیقه استفاده +CronExplainHowToRunWin=در مایکروسافت، محصول محیط ویندوز شما می توانید ابزار کار برنامه ریزی شده برای اجرای خط فرمان در هر دقیقه استفاده # Menu -# -# CronJobs=Scheduled jobs -# CronListActive= List of active jobs -# CronListInactive= List of disabled jobs -# CronListActive= List of active jobs - - -# +CronJobs=شغل برنامه ریزی +CronListActive= لیست شغل ها فعال +CronListInactive= لیست شغل ها غیر فعال +CronListActive= لیست شغل ها فعال # Page list -# -# CronDateLastRun=Last run -# CronLastOutput=Last run output -# CronLastResult=Last result code -# CronListOfCronJobs=List of scheduled jobs -# CronCommand=Command -# CronList=Jobs list -# CronDelete= Delete cron jobs -# CronConfirmDelete= Are you sure you want to delete this cron job ? -# CronExecute=Launch job -# CronConfirmExecute= Are you sure to execute this job now -# CronInfo= Jobs allow to execute task that have been planned -# CronWaitingJobs=Wainting jobs -# CronTask=Job -CronNone= بلا -CronDtStart=تاريخ البدء -CronDtEnd=نهاية التاريخ -# CronDtNextLaunch=Next execution -# CronDtLastLaunch=Last execution -# CronFrequency=Frequancy -# CronClass=Classe -CronMethod=الطريقة -CronModule=وحدة -# CronAction=Action -CronStatus=حالة -CronStatusActive=روشن -CronStatusInactive=خاموش -# CronNoJobs=No jobs registered -CronPriority=الأولوية -CronLabel=وصف -# CronNbRun=Nb. launch -# CronEach=Every -# JobFinished=Job launched and finished - -# +CronDateLastRun=تاریخ و زمان آخرین اجرا +CronLastOutput=تاریخ و زمان آخرین خروجی اجرا +CronLastResult=آخرین نتیجه +CronListOfCronJobs=لیست شغل ها برنامه ریزی شده +CronCommand=فرمان +CronList=فهرست مشاغل +CronDelete= حذف کارهای cron +CronConfirmDelete= آیا مطمئن هستید که می خواهید این برنامه cron را حذف کنید؟ +CronExecute=کار راه اندازی +CronConfirmExecute= آیا مطمئن به اجرای این کار در حال حاضر +CronInfo= شغل اجازه می دهد برای اجرای وظیفه ای که برنامه ریزی شده است +CronWaitingJobs=شغل Wainting +CronTask=کار +CronNone= هیچ یک +CronDtStart=تاریخ شروع +CronDtEnd=تاریخ پایان +CronDtNextLaunch=اعدام بعدی +CronDtLastLaunch=تاریخ و زمان آخرین اعدام +CronFrequency=Frequancy +CronClass=CLASSE +CronMethod=روش +CronModule=واحد +CronAction=عمل +CronStatus=وضعیت +CronStatusActive=فعال بودن +CronStatusInactive=غیر فعال +CronNoJobs=بدون شغل ثبت نام +CronPriority=اولویت +CronLabel=توصیف +CronNbRun=نیوبیوم. راه اندازی +CronEach=هر +JobFinished=کار راه اندازی به پایان رسید و #Page card -# -# CronAdd= Add jobs -# CronHourStart= Start Hour and date of task -# CronEvery= And execute task each -# CronObject= Instance/Object to create -CronArgs=البارامترات -# CronSaveSucess=Save succesfully -CronNote=التعليق -# CronFieldMandatory=Fields %s is mandatory -# CronErrEndDateStartDt=End date cannot be before start date -# CronStatusActiveBtn=Enable -CronStatusInactiveBtn=يعطل -# CronTaskInactive=This job is disabled -# CronDtLastResult=Last result date -# CronId=Id -# CronClassFile=Classes (filename.class.php) -# CronModuleHelp=Name of Dolibarr module directory (also work with external Dolibarr module).
    For exemple to fetch method of Dolibarr Product object /htdocs/product/class/product.class.php, the value of module is product -# CronClassFileHelp=The file name to load.
    For exemple to fetch method of Dolibarr Product object /htdocs/product/class/product.class.php, the value of class file name is product.class.php -# CronObjectHelp=The object name to load.
    For exemple to fetch method of Dolibarr Product object /htdocs/product/class/product.class.php, the value of class file name is Product -# CronMethodHelp=The object method to launch.
    For exemple to fetch method of Dolibarr Product object /htdocs/product/class/product.class.php, the value of method is is fecth -# CronArgsHelp=The method arguments.
    For exemple to fetch method of Dolibarr Product object /htdocs/product/class/product.class.php, the value of paramters can be 0, ProductRef -# CronCommandHelp=The system command line to execute. - -# +CronAdd= اضافه کردن شغل +CronHourStart= شروع ساعت و تاریخ کار +CronEvery= و وظیفه هر یک از اجرا +CronObject= به عنوان مثال / شی برای ایجاد +CronArgs=پارامترها +CronSaveSucess=صرفه جویی در موفقیت +CronNote=توضیح +CronFieldMandatory=زمینه های از%s الزامی است +CronErrEndDateStartDt=تاریخ پایان نمی تواند قبل از تاریخ شروع می شود +CronStatusActiveBtn=قادر ساختن +CronStatusInactiveBtn=از کار انداختن +CronTaskInactive=این کار غیر فعال است +CronDtLastResult=آخرین تاریخ نتیجه +CronId=شناسایی +CronClassFile=کلاس ها (filename.class.php) +CronModuleHelp=نام Dolibarr دایرکتوری ماژول (با ماژول Dolibarr خارجی کار می کنند).
    برای exemple به بهانه روش Dolibarr شی محصولات / htdocs / محصول / کلاس / product.class.php، ارزش ماژول محصول +CronClassFileHelp=نام فایل برای بارگذاری.
    برای exemple به بهانه روش Dolibarr محصولات شی / htdocs / محصول / کلاس / product.class.php، ارزش نام فایل کلاس product.class.php است +CronObjectHelp=نام شی برای بارگذاری.
    برای exemple به بهانه روش Dolibarr شی محصولات / htdocs / محصول / کلاس / product.class.php، ارزش نام فایل کلاس محصولات است +CronMethodHelp=روش شی برای راه اندازی.
    برای exemple به بهانه روش Dolibarr محصولات شی / htdocs / محصول / کلاس / product.class.php، ارزش روش است fecth +CronArgsHelp=استدلال از روش.
    برای exemple به بهانه روش Dolibarr محصولات شی / htdocs / محصول / کلاس / product.class.php، مقدار پارامترهای می تواند 0، ProductRef +CronCommandHelp=خط فرمان سیستم را اجرا کند. # Info -# -# CronInfoPage=Information - - -# +CronInfoPage=اطلاعات # Common -# -# CronType=Task type -# CronType_method=Call method of a Dolibarr Class -# CronType_command=Shell command -# CronMenu=Cron -# CronCannotLoadClass=Cannot load class %s or object %s - -# UseMenuModuleToolsToAddCronJobs=Go into menu "Home - Modules tools - Job list" to see and edit scheduled jobs. +CronType=نوع کار +CronType_method=روش تماس از یک کلاس Dolibarr +CronType_command=فرمان شل +CronMenu=cron را +CronCannotLoadClass=آیا می توانم کلاس%s ​​را بار نیست و یا شی از%s +UseMenuModuleToolsToAddCronJobs=برو به منوی "صفحه اصلی - ماژول ابزار - فهرست فرصت های شغلی" برای دیدن و ویرایش کار برنامه ریزی شده. diff --git a/htdocs/langs/fa_IR/deliveries.lang b/htdocs/langs/fa_IR/deliveries.lang index 599889b1645..b2526f06e6b 100644 --- a/htdocs/langs/fa_IR/deliveries.lang +++ b/htdocs/langs/fa_IR/deliveries.lang @@ -1,26 +1,26 @@ # Dolibarr language file - Source file is en_US - deliveries -Delivery=تسليم -Deliveries=الولادة -DeliveryCard=تسليم البطاقة -DeliveryOrder=من أجل تقديم -DeliveryOrders=توصيل الطلبات -DeliveryDate=تاريخ التسليم -DeliveryDateShort=Deliv. تاريخ -CreateDeliveryOrder=ومن أجل توليد التسليم -QtyDelivered=الكمية المسلمة -SetDeliveryDate=حدد تاريخ الشحن -ValidateDeliveryReceipt=تحقق من إنجاز ورود -ValidateDeliveryReceiptConfirm=هل أنت متأكد من أن هذا الإنجاز تحقق من ورود؟ -# DeleteDeliveryReceipt=Delete delivery receipt -# DeleteDeliveryReceiptConfirm=Are you sure you want to delete delivery receipt %s ? -DeliveryMethod=طريقة التسليم -TrackingNumber=تتبع عدد -# DeliveryNotValidated=Delivery not validated +Delivery=تحویل +Deliveries=تحویل +DeliveryCard=کارت تحویل +DeliveryOrder=منظور تحویل +DeliveryOrders=تحویل سفارشات +DeliveryDate=تاریخ تحویل +DeliveryDateShort=تحویل سیستمهای. تاریخ +CreateDeliveryOrder=تولید منظور تحویل +QtyDelivered=تعداد تحویل +SetDeliveryDate=تنظیم تاریخ حمل و نقل +ValidateDeliveryReceipt=اعتبارسنجی رسید تحویل +ValidateDeliveryReceiptConfirm=آیا مطمئن هستید که می خواهید به اعتبار این رسید تحویل؟ +DeleteDeliveryReceipt=حذف رسید تحویل +DeleteDeliveryReceiptConfirm=آیا مطمئن هستید که می خواهید تحویل رسید از%s را حذف کنید؟ +DeliveryMethod=روش تحویل +TrackingNumber=تعداد پیگیری +DeliveryNotValidated=تحویل اعتبار نیست # merou PDF model -NameAndSignature=الاسم والتوقيع : -ToAndDate=To___________________________________ على ____ / _____ / __________ -GoodStatusDeclaration=وتلقى البضائع الواردة أعلاه في حالة جيدة ، -Deliverer=المنفذ : -Sender=مرسل -Recipient=المتلقي -# ErrorStockIsNotEnough=There's not enough stock +NameAndSignature=نام و امضا: +ToAndDate=To___________________________________ در ____ / ____ / __________ +GoodStatusDeclaration=محصولات فوق در شرایط خوبی دریافت کرده اند، +Deliverer=منجی: +Sender=فرستنده +Recipient=دریافت کننده +ErrorStockIsNotEnough=این سهام به اندازه کافی وجود ندارد diff --git a/htdocs/langs/fa_IR/dict.lang b/htdocs/langs/fa_IR/dict.lang index e8e41499db3..85319c4b5ce 100644 --- a/htdocs/langs/fa_IR/dict.lang +++ b/htdocs/langs/fa_IR/dict.lang @@ -1,329 +1,325 @@ # Dolibarr language file - Source file is en_US - dict -CountryFR=فرنسا -CountryBE=بلجيكا -CountryIT=ايطاليا -CountryES=أسبانيا -CountryDE=ألمانيا -CountryCH=سويسرا -CountryGB=بريطانيا العظمى -# CountryUK=United Kingdom -CountryIE=أيرلاندا -CountryCN=الصين +CountryFR=فرانسه +CountryBE=بلژیک +CountryIT=ایتالیا +CountryES=کشور اسپانیا +CountryDE=آلمان +CountryCH=سویس +CountryGB=بریتانیا +CountryUK=پادشاهی متحده +CountryIE=ایرلند +CountryCN=کشور چین CountryTN=تونس -CountryUS=الولايات المتحدة الأمريكية -CountryMA=المغرب -CountryDZ=الجزائر -CountryCA=كندا -CountryTG=توغو -CountryGA=الغابون -CountryNL=هولندا -CountryHU=Hongria -CountryRU=روسيا -CountrySE=السويد -CountryCI=Ivoiry الساحل -CountrySN=السنغال -CountryAR=الأرجنتين -CountryCM=الكاميرون -CountryPT=البرتغال -CountrySA=المملكة العربية السعودية -CountryMC=موناكو -CountryAU=أستراليا -CountrySG=سنغافورة -CountryAF=أفغانستان -CountryAX=جزر أولان -CountryAL=ألبانيا -CountryAS=ساموا الأمريكية -CountryAD=أندورا -CountryAO=أنجولا -CountryAI=أنجويلا -CountryAQ=أنتاركتيكا -CountryAG=أنتيغوا وبربودا -CountryAM=أرمينيا -CountryAW=أروبا -CountryAT=النمسا -CountryAZ=أذربيجان -CountryBS=الباهاما -CountryBH=البحرين -CountryBD=بنجلاديش +CountryUS=ایالات متحده +CountryMA=مراکش +CountryDZ=الجزایر +CountryCA=کشور کانادا +CountryTG=توگو +CountryGA=گابن +CountryNL=هلند +CountryHU=مجارستان +CountryRU=روسیه، +CountrySE=سوئد +CountryCI=Ivoiry ساحل +CountrySN=سنگال +CountryAR=آرژانتین +CountryCM=کامرون +CountryPT=پرتغال +CountrySA=عربستان سعودی +CountryMC=اهل موناکو +CountryAU=استرالیا +CountrySG=سنگاپور +CountryAF=افغانستان +CountryAX=جزایر آلاند +CountryAL=آلبانی +CountryAS=ساموا ی آمریکا +CountryAD=آندورا +CountryAO=آنگولا +CountryAI=آنگویلا +CountryAQ=قطب جنوب +CountryAG=آنتیگوا و باربودا +CountryAM=ارمنستان +CountryAW=آروبا +CountryAT=اتریش +CountryAZ=آذربایجان +CountryBS=باهاما +CountryBH=بحرین +CountryBD=بنگلادش CountryBB=باربادوس -CountryBY=روسيا البيضاء -CountryBZ=بليز -CountryBJ=بنين +CountryBY=بلاروس +CountryBZ=بلیز +CountryBJ=بنین CountryBM=برمودا CountryBT=بوتان -CountryBO=بوليفيا -CountryBA=البوسنة والهرسك -CountryBW=بتسوانا -CountryBV=جزيرة بوفيت -CountryBR=البرازيل -CountryIO=المحيط الهندي البريطاني -CountryBN=بروناي دار السلام -CountryBG=بلغاريا -CountryBF=بوركينا فاسو -CountryBI=بوروندي -CountryKH=كمبوديا -CountryCV=الرأس الأخضر -CountryKY=جزر الكايمان -CountryCF=جمهورية افريقيا الوسطى -CountryTD=تشاد -CountryCL=شيلي -CountryCX=جزيرة الكريسماس -CountryCC=جزر كوكس) كيلنغ -CountryCO=كولومبيا -CountryKM=جزر القمر -CountryCG=الكونغو -CountryCD=الكونغو ، جمهورية الكونغو الديمقراطية من -CountryCK=جزر كوك -CountryCR=كوستاريكا -CountryHR=كرواتيا -CountryCU=كوبا -CountryCY=قبرص -CountryCZ=جمهورية التشيك -CountryDK=الدنمارك -CountryDJ=جيبوتي -CountryDM=دومينيكا -CountryDO=جمهورية الدومينيكان -CountryEC=الاكوادور -CountryEG=مصر -CountrySV=السلفادور -CountryGQ=غينيا الاستوائية -CountryER=اريتريا -CountryEE=استونيا -CountryET=اثيوبيا -CountryFK=جزر فوكلاند -CountryFO=جزر فارو -CountryFJ=جزر فيجي -CountryFI=فنلندا -CountryGF=غويانا -CountryPF=بولينيزيا الفرنسية -CountryTF=المقاطعات الجنوبية الفرنسية -CountryGM=غامبيا -CountryGE=جورجيا -CountryGH=غانا -CountryGI=جبل طارق -CountryGR=اليونان -CountryGL=جرينلاند -CountryGD=جرينادا -CountryGP=جوادلوب -CountryGU=غوام -CountryGT=جواتيمالا -CountryGN=غينيا -CountryGW=غينيا بيساو -CountryGY=غيانا -CountryHT=Haïti -CountryHM=واستمع وجزر ماكدونالد -CountryVA=الكرسي الرسولي (دولة الفاتيكان) +CountryBO=بولیوی +CountryBA=بوسنی و هرزگوین +CountryBW=بوتسوانا +CountryBV=جزیره بووت +CountryBR=برزیل +CountryIO=بریتانیا قلمرو اقیانوس هند +CountryBN=برونئی دارالسلام +CountryBG=بلغارستان +CountryBF=بورکینافاسو +CountryBI=بروندی +CountryKH=کامبوج +CountryCV=کیپ ورد +CountryKY=جزایر کیمن +CountryCF=جمهوری آفریقای مرکزی +CountryTD=خرده کاغذ +CountryCL=دارفلفل +CountryCX=جزیره کریسمس +CountryCC=کوکوس (Keeling) جزایر +CountryCO=کلمبیا +CountryKM=کومور +CountryCG=کنگو +CountryCD=کنگو، جمهوری دموکراتیک +CountryCK=جزایر کوک +CountryCR=کاستاریکا +CountryHR=کرواسی +CountryCU=کوبا +CountryCY=قبرس +CountryCZ=جمهوری چک +CountryDK=دانمارک +CountryDJ=جیبوتی +CountryDM=دومینیکا +CountryDO=جمهوری دومینیکن +CountryEC=اکوادور +CountryEG=کشور مصر +CountrySV=السالوادور +CountryGQ=گینه استوایی +CountryER=اریتره +CountryEE=استونی +CountryET=اتیوپی +CountryFK=جزایر فالکلند +CountryFO=جزایر فارو +CountryFJ=جزایر فیجی +CountryFI=فنلاند +CountryGF=گویان فرانسه +CountryPF=پلینزی فرانسه +CountryTF=سرزمین های جنوبی فرانسه +CountryGM=گامبیا +CountryGE=گرجستان +CountryGH=غنا +CountryGI=جبل الطارق +CountryGR=یونان +CountryGL=گرینلند +CountryGD=گرانادا +CountryGP=جزیره گوادلوپ +CountryGU=گوام +CountryGT=گواتمالا +CountryGN=گینه +CountryGW=گینه بیسائو +CountryGY=گویان +CountryHT=هائیتی +CountryHM=جزیره هرد و مک دونالد +CountryVA=مقدس (شهر واتیکان) CountryHN=هندوراس -CountryHK=هونج كونج +CountryHK=هنگ کنگ CountryIS=Icelande -CountryIN=الهند -CountryID=اندونيسيا -CountryIR=إيران -CountryIQ=العراق +CountryIN=هندوستان +CountryID=اندونزی +CountryIR=ایران +CountryIQ=عراق CountryIL=اسرائيل -CountryJM=جامايكا -CountryJP=اليابان -CountryJO=الأردن -CountryKZ=كازاخستان -CountryKE=كينيا -CountryKI=كيريباس -CountryKP=كوريا الشمالية -CountryKR=كوريا الجنوبية -CountryKW=الكويت +CountryJM=جامائیکا +CountryJP=ژاپن +CountryJO=اردن +CountryKZ=قزاقستان +CountryKE=کنیا +CountryKI=کیریباتی +CountryKP=کره شمالی +CountryKR=کره جنوبی +CountryKW=کویت CountryKG=Kyrghyztan -CountryLA=لاوس -CountryLV=لاتفيا +CountryLA=لائوس +CountryLV=لتونی CountryLB=لبنان -CountryLS=ليسوتو -CountryLR=ليبيريا -CountryLY=الجماهيرية -CountryLI=ليختنشتاين +CountryLS=لسوتو +CountryLR=کشور لیبریا +CountryLY=اهل لیبی +CountryLI=لیختن اشتاین CountryLT=Lituania -CountryLU=لوكسمبورج -CountryMO=ماكاو -CountryMK=مقدونيا ، من يوغوسلافيا السابقة -CountryMG=مدغشقر -CountryMW=مالاوي -CountryMY=ماليزيا -CountryMV=جزر المالديف -CountryML=مالي -CountryMT=مالطا -CountryMH=جزر مارشال -CountryMQ=مارتينيك -CountryMR=موريتانيا -CountryMU=موريشيوس -CountryYT=مايوت -CountryMX=المكسيك -CountryFM=ميكرونيزيا -CountryMD=مولدافيا -CountryMN=منغوليا -CountryMS=مونتسرات -CountryMZ=موزامبيق -CountryMM=Birmania (ميانمار) -CountryNA=ناميبيا -CountryNR=ناورو -CountryNP=نيبال -CountryAN=هولندا -CountryNC=كاليدونيا الجديدة -CountryNZ=نيوزيلندا -CountryNI=نيكاراجوا -CountryNE=النيجر -CountryNG=نيجيريا -CountryNU=نيوي -CountryNF=جزيرة نورفولك -CountryMP=جزر ماريانا الشمالية -CountryNO=النرويج -CountryOM=سلطنة عمان -CountryPK=باكستان -CountryPW=بالاو -CountryPS=فلسطين المحتلة -CountryPA=بنما -CountryPG=بابوا غينيا الجديدة -CountryPY=باراجواي -CountryPE=بيرو -CountryPH=الفلبين -CountryPN=جزر بيتكايرن -CountryPL=بولندا -CountryPR=بورتوريكو +CountryLU=لوکزامبورگ +CountryMO=ماکائو +CountryMK=مقدونیه، یوگسلاوی سابق +CountryMG=جزیره مالاگازی +CountryMW=مالاوی +CountryMY=مالزی +CountryMV=مالدیو +CountryML=مالی +CountryMT=جزیره مالت +CountryMH=جزایر مارشال +CountryMQ=مارتینیک +CountryMR=موریتانی +CountryMU=موریس +CountryYT=مایوت +CountryMX=مکزیک +CountryFM=میکرونزی +CountryMD=مولدووا +CountryMN=مغولستان +CountryMS=Monserrat از +CountryMZ=موزامبیک +CountryMM=Birmania (میانمار) +CountryNA=نامیبیا +CountryNR=نائورو +CountryNP=نپال +CountryAN=آنتیل هلند +CountryNC=کالدونیای جدید +CountryNZ=نیوزیلند +CountryNI=نیکاراگوئه +CountryNE=نیجر +CountryNG=نیجریه +CountryNU=نیوئه +CountryNF=جزیره نورفولک +CountryMP=جزایر ماریانای شمالی +CountryNO=نروژ +CountryOM=عمان +CountryPK=پاکستان +CountryPW=پالائو +CountryPS=فلسطین، اشغالی +CountryPA=پاناما +CountryPG=پاپوآ گینه نو +CountryPY=پاراگوئه +CountryPE=پرو +CountryPH=فیلیپین +CountryPN=جزایر پیت کرن +CountryPL=لهستان +CountryPR=پورتوریکو CountryQA=قطر -CountryRE=ريونيون -CountryRO=رومانيا +CountryRE=تجدید دیدار +CountryRO=رومانی CountryRW=رواندا -CountrySH=سانت هيلينا -CountryKN=سانت كيتس ونيفيس -CountryLC=سانت لوسيا -CountryPM=سانت بيير وميكولون -CountryVC=سانت فنسنت وغرينادين -CountryWS=ساموا -CountrySM=سان مارينو -CountryST=ساو تومي وبرينسيبي -CountryRS=صربيا -CountrySC=سيشيل -CountrySL=سيراليون -CountrySK=سلوفاكيا -CountrySI=سلوفينيا -CountrySB=جزر سليمان -CountrySO=الصومال -CountryZA=جنوب إفريقيا -CountryGS=جورجيا الجنوبية وجزر ساندويتش الجنوبية -CountryLK=سريلانكا -CountrySD=السودان -CountrySR=سورينام -CountrySJ=سفالبارد وجان مايان -CountrySZ=سوازيلاند -CountrySY=السورية -CountryTW=تايوان -CountryTJ=طاجكستان -CountryTZ=تنزانيا -CountryTH=تايلاند -CountryTL=تيمور الشرقية -CountryTK=توكلو -CountryTO=تونجا -CountryTT=ترينيداد وتوباغو -CountryTR=تركيا -CountryTM=تركمانستان -CountryTC=الأتراك وجزر Cailos -CountryTV=توفالو -CountryUG=أوغندا -CountryUA=أوكرانيا -CountryAE=الامارات العربية المتحدة -CountryUM=جزر الولايات المتحدة البعيدة الصغيرة -CountryUY=أوروغواي -CountryUZ=أوزبكستان -CountryVU=فانواتو -CountryVE=فنزويلا -CountryVN=فيتنام -CountryVG=وجزر فيرجن البريطانية -CountryVI=وجزر فيرجن ، الولايات المتحدة -CountryWF=جزر واليس وفوتونا -CountryEH=الصحراء الغربية -CountryYE=اليمن -CountryZM=زامبيا -CountryZW=زيمبابوي -CountryGG=غويرنسي -CountryIM=جزيرة مان -CountryJE=جيرسي -CountryME=الجبل الأسود -CountryBL=سانت بارتيليمي -CountryMF=سانت مارتين +CountrySH=جزیره سنت هلن در جنوب غربی افریقا +CountryKN=سنت کیتس و نویس +CountryLC=سنت لوسیا +CountryPM=سنت پیر و میکلون +CountryVC=سنت وینسنت و گرنادین +CountryWS=ساموآ +CountrySM=سان مارینو +CountryST=سائو تومه و پرنسیپ +CountryRS=صربستان +CountrySC=سیشل +CountrySL=سیرالئون +CountrySK=اسلواکی +CountrySI=اسلوونی +CountrySB=جزایر سلیمان +CountrySO=سومالی +CountryZA=آفریقای جنوبی +CountryGS=جزایر ساندویچ گرجستان جنوبی و جنوب +CountryLK=سری لانکا +CountrySD=سودان +CountrySR=سورینام +CountrySJ=اسوالبارد و جان ماین +CountrySZ=سوازیلند +CountrySY=سوری +CountryTW=تایوان +CountryTJ=تاجیکستان +CountryTZ=تانزانیا +CountryTH=تایلند +CountryTL=تیمور لسته +CountryTK=توکلائو +CountryTO=تونگا +CountryTT=ترینیداد و توباگو +CountryTR=بوقلمون +CountryTM=ترکمنستان +CountryTC=جزایر ترک و Cailos +CountryTV=تووالو +CountryUG=اوگاندا +CountryUA=اوکراین است +CountryAE=امارات متحده عربی +CountryUM=ایالات متحده جزایر حاشیهای صغیر +CountryUY=اروگوئه +CountryUZ=ازبکستان +CountryVU=وانواتو +CountryVE=ونزوئلا +CountryVN=ویتنام +CountryVG=جزایر ویرجین، بریتانیا +CountryVI=جزایر ویرجین، ایالات متحده آمریکا +CountryWF=والیس و فوتونا +CountryEH=صحرای غربی +CountryYE=یمن +CountryZM=زامبیا +CountryZW=زیمبابوه +CountryGG=لباس بافته پشمی +CountryIM=جزیره من +CountryJE=پارچه کشباف +CountryME=مونته نگرو +CountryBL=سنت بارتلیمی +CountryMF=سنت مارتین ##### Civilities ##### -CivilityMME=السيدة -CivilityMR=السيد -CivilityMLE=السيدة -CivilityMTRE=السيد -# CivilityDR=Doctor - +CivilityMME=خانم +CivilityMR=آقای +CivilityMLE=خانم +CivilityMTRE=استاد +CivilityDR=دکتر ##### Currencies ##### -Currencyeuros=يورو -CurrencyAUD=دولار للاتحاد الافريقي -CurrencySingAUD=الاتحاد الافريقي الدولار -CurrencyCAD=الدولار -CurrencySingCAD=هل يستطيع الدولار -CurrencyCHF=فرنك سويسري -CurrencySingCHF=الفرنك السويسري -CurrencyEUR=يورو -CurrencySingEUR=اليورو -CurrencyFRF=فرنك فرنسي -CurrencySingFRF=الفرنك الفرنسي -CurrencyGBP=جيجابايت ليرة -CurrencySingGBP=غيغابايت باوند -CurrencyINR=روبية هندية -CurrencySingINR=روبية هندية -CurrencyMAD=الدرهم +Currencyeuros=یورو +CurrencyAUD=دلار AU +CurrencySingAUD=AU دلار +CurrencyCAD=CAN دلار +CurrencySingCAD=CAN دلار +CurrencyCHF=فرانک سوئیس +CurrencySingCHF=فرانک سوئیس +CurrencyEUR=یورو +CurrencySingEUR=یورو +CurrencyFRF=فرانک فرانسه +CurrencySingFRF=فرانک فرانسه +CurrencyGBP=GB پوند +CurrencySingGBP=GB پوند +CurrencyINR=روپیه هند +CurrencySingINR=روپیه هند +CurrencyMAD=درهم CurrencySingMAD=درهم CurrencyMGA=Ariary CurrencySingMGA=Ariary -CurrencyMUR=موريشيوس روبية -CurrencySingMUR=موريشيوس روبية -CurrencyNOK=النرويجية بالكرون -CurrencySingNOK=الكرونة النرويجية -CurrencyTND=دينار -CurrencySingTND=الدينار التونسي -CurrencyUSD=الدولار الأمريكي -CurrencySingUSD=الدولار الأمريكي -# CurrencyUAH=Hryvnia -# CurrencySingUAH=Hryvnia -CurrencyXAF=من الفرنكات BEAC -CurrencySingXAF=اتفاق وقف إطلاق النار BEAC الفرنك -CurrencyXOF=BCEAO فرنك أفريقي -CurrencySingXOF=اتفاق وقف إطلاق النار الفرنك تشريعي ملائم -CurrencyXPF=الحراجية المعتمدة الفرنك -CurrencySingXPF=الحراجية المعتمدة الفرنك - -# CurrencyCentSingEUR=cent -# CurrencyThousandthSingTND=thousandth - +CurrencyMUR=روپیه موریس +CurrencySingMUR=روپیه موریس +CurrencyNOK=krones نروژی +CurrencySingNOK=کرون نروژی +CurrencyTND=دینار تونس +CurrencySingTND=دینار تونس +CurrencyUSD=دلار آمریکا +CurrencySingUSD=دلار آمریکا +CurrencyUAH=hryvnia در +CurrencySingUAH=hryvnia در +CurrencyXAF=CFA BEAC فرانک +CurrencySingXAF=فرانک CFA BEAC +CurrencyXOF=CFA BCEAO فرانک +CurrencySingXOF=فرانک CFA BCEAO +CurrencyXPF=فرانک CFP +CurrencySingXPF=CFP فرانک +CurrencyCentSingEUR=در صد +CurrencyThousandthSingTND=هزارم #### Input reasons ##### -DemandReasonTypeSRC_INTE=الإنترنت -# DemandReasonTypeSRC_CAMP_MAIL=Mailing campaign -DemandReasonTypeSRC_CAMP_EMAIL=ایمیل کمپین +DemandReasonTypeSRC_INTE=اینترنت +DemandReasonTypeSRC_CAMP_MAIL=کمپین پستی +DemandReasonTypeSRC_CAMP_EMAIL=ایمیل مبارزات انتخاباتی DemandReasonTypeSRC_CAMP_PHO=کمپین تلفن -DemandReasonTypeSRC_CAMP_FAX=کمپین فاکس +DemandReasonTypeSRC_CAMP_FAX=کمپین فکس DemandReasonTypeSRC_COMM=تماس با بازرگانی -DemandReasonTypeSRC_SHOP=تماس با ما -# DemandReasonTypeSRC_WOM=Word of mouth -# DemandReasonTypeSRC_PARTNER=Partner -# DemandReasonTypeSRC_EMPLOYEE=Employee -# DemandReasonTypeSRC_SPONSORING=Sponsorship - +DemandReasonTypeSRC_SHOP=تماس با فروشگاه +DemandReasonTypeSRC_WOM=دهان به دهان +DemandReasonTypeSRC_PARTNER=شریک +DemandReasonTypeSRC_EMPLOYEE=کارمند +DemandReasonTypeSRC_SPONSORING=ضمانت #### Paper formats #### -# PaperFormatEU4A0=Format 4A0 -# PaperFormatEU2A0=Format 2A0 -# PaperFormatEUA0=Format A0 -# PaperFormatEUA1=Format A1 -# PaperFormatEUA2=Format A2 -# PaperFormatEUA3=Format A3 -# PaperFormatEUA4=Format A4 -# PaperFormatEUA5=Format A5 -# PaperFormatEUA6=Format A6 -# PaperFormatUSLETTER=Format Letter US -# PaperFormatUSLEGAL=Format Legal US -# PaperFormatUSEXECUTIVE=Format Executive US -# PaperFormatUSLEDGER=Format Ledger/Tabloid -# PaperFormatCAP1=Format P1 Canada -# PaperFormatCAP2=Format P2 Canada -# PaperFormatCAP3=Format P3 Canada -# PaperFormatCAP4=Format P4 Canada -# PaperFormatCAP5=Format P5 Canada -# PaperFormatCAP6=Format P6 Canada +PaperFormatEU4A0=نوع 4A0 +PaperFormatEU2A0=نوع 2A0 +PaperFormatEUA0=نوع A0 +PaperFormatEUA1=نوع A1 +PaperFormatEUA2=نوع A2 +PaperFormatEUA3=نوع A3 +PaperFormatEUA4=نوع A4 +PaperFormatEUA5=نوع A5 +PaperFormatEUA6=نوع A6 +PaperFormatUSLETTER=فرمت نامه آمریکا +PaperFormatUSLEGAL=قالب حقوقی ایالات متحده +PaperFormatUSEXECUTIVE=فرمت اجرایی ایالات متحده +PaperFormatUSLEDGER=نوع لجر / خلاصه +PaperFormatCAP1=نوع P1 کانادا +PaperFormatCAP2=نوع P2 کانادا +PaperFormatCAP3=نوع P3 کانادا +PaperFormatCAP4=نوع P4 کانادا +PaperFormatCAP5=نوع P5 کانادا +PaperFormatCAP6=نوع P6 کانادا diff --git a/htdocs/langs/fa_IR/donations.lang b/htdocs/langs/fa_IR/donations.lang index 36cc57cc56e..af3a84a2a75 100644 --- a/htdocs/langs/fa_IR/donations.lang +++ b/htdocs/langs/fa_IR/donations.lang @@ -1,32 +1,32 @@ # Dolibarr language file - Source file is en_US - donations -Donation=تبرع -Donations=التبرعات -# DonationRef=Donation ref. -Donor=الجهات المانحة -Donors=الجهات المانحة -AddDonation=إضافة تبرع -NewDonation=منحة جديدة -# ShowDonation=Show donation -DonationPromise=هدية الوعد -PromisesNotValid=وعود لم يصادق -PromisesValid=صادق الوعود -DonationsPaid=التبرعات المدفوعة -DonationsReceived=تلقى التبرعات -PublicDonation=تبرع العامة -DonationsNumber=تبرع عدد -DonationsArea=التبرعات المنطقة -DonationStatusPromiseNotValidated=مشروع وعد -DonationStatusPromiseValidated=صادق الوعد -DonationStatusPaid=تلقى تبرع -DonationStatusPromiseNotValidatedShort=مسودة -DonationStatusPromiseValidatedShort=صادق -DonationStatusPaidShort=وردت -ValidPromess=التحقق من صحة الوعد -# DonationReceipt=Donation receipt -BuildDonationReceipt=بناء استلام -DonationsModels=نماذج لوثائق ايصالات للتبرع -# LastModifiedDonations=Last %s modified donations -# SearchADonation=Search a donation -# DonationRecipient=Donation recipient -# ThankYou=Thank You -# IConfirmDonationReception=The recipient declare reception, as a donation, of the following amount +Donation=اهداء +Donations=کمک های مالی +DonationRef=کد عکس کمک مالی. +Donor=دهنده +Donors=اهدا کنندگان +AddDonation=اضافه کردن یک کمک مالی +NewDonation=کمک مالی جدید +ShowDonation=نمایش کمک مالی +DonationPromise=وعده هدیه +PromisesNotValid=وعده اعتبار نیست +PromisesValid=وعده های معتبر +DonationsPaid=کمک های مالی پرداخت می شود +DonationsReceived=کمک مالی دریافت کرد +PublicDonation=کمک مالی عمومی +DonationsNumber=مبلغ +DonationsArea=منطقه کمک مالی +DonationStatusPromiseNotValidated=پیش نویس وعده +DonationStatusPromiseValidated=وعده اعتبار +DonationStatusPaid=کمک مالی دریافت کرد +DonationStatusPromiseNotValidatedShort=پیش نویس +DonationStatusPromiseValidatedShort=اعتبار +DonationStatusPaidShort=رسیده +ValidPromess=اعتبار قول +DonationReceipt=دریافت کمک مالی +BuildDonationReceipt=ساخت رسید +DonationsModels=اسناد مدل برای رسید کمک مالی +LastModifiedDonations=تاریخ و زمان آخرین٪ بازدید کنندگان کمک های مالی اصلاح شده +SearchADonation=جستجوی یک کمک مالی +DonationRecipient=دریافت کننده کمک مالی +ThankYou=با تشکر از شما +IConfirmDonationReception=گیرنده اعلام پذیرش، به عنوان یک کمک مالی، از مقدار زیر diff --git a/htdocs/langs/fa_IR/ecm.lang b/htdocs/langs/fa_IR/ecm.lang index 1a72264bea6..074bd81df6f 100644 --- a/htdocs/langs/fa_IR/ecm.lang +++ b/htdocs/langs/fa_IR/ecm.lang @@ -1,55 +1,55 @@ # Dolibarr language file - Source file is en_US - ecm -MenuECM=وثائق -DocsMine=بلدي وثائق -DocsGenerated=ولدت وثائق -DocsElements=عناصر وثائق -DocsThirdParties=الوثائق أطراف ثالثة -DocsContracts=وثائق العقود -DocsProposals=الوثائق مقترحات -DocsOrders=الوثائق الأوامر -DocsInvoices=وثائق وفواتير -ECMNbOfDocs=ملاحظة : الوثائق في الدليل -ECMNbOfDocsSmall=ملاحظة : من وثيقة. -ECMSection=دليل -ECMSectionManual=دليل دليل -ECMSectionAuto=الدليل الآلي -ECMSectionsManual=دليل الشجرة -ECMSectionsAuto=شجرة الآلي -ECMSections=أدلة -ECMRoot=جذور -ECMNewSection=دليل جديد -ECMAddSection=إضافة دليل دليل -ECMNewDocument=وثيقة جديدة -ECMCreationDate=تاريخ الإنشاء -ECMNbOfFilesInDir=عدد من الملفات في دليل -ECMNbOfSubDir=من دون أدلة -# ECMNbOfFilesInSubDir=Number of files in sub-directories -ECMCreationUser=مبدع -# ECMArea=EDM area -# ECMAreaDesc=The EDM (Electronic Document Management) area allows you to save, share and search quickly all kind of documents in Dolibarr. -ECMAreaDesc2=* أدلة تلقائية تملأ تلقائيا عند إضافة الوثائق من بطاقة عنصر.
    * دليل أدلة يمكن استخدامها لانقاذ وثائق ليست مرتبطة بشكل خاص عنصر. -ECMSectionWasRemoved=دليل ٪ ق حذفت. -ECMDocumentsSection=وثيقة من وثائق ودليل -ECMSearchByKeywords=بحث الكلمات الرئيسية -ECMSearchByEntity=بحث عن وجوه -ECMSectionOfDocuments=أدلة وثائق -ECMTypeManual=دليل -ECMTypeAuto=التلقائي -# ECMDocsBySocialContributions=Documents linked to social contributions -ECMDocsByThirdParties=وثائق مرتبطة أطراف ثالثة -ECMDocsByProposals=وثائق مرتبطة مقترحات -ECMDocsByOrders=وثائق مرتبطة أوامر العملاء -ECMDocsByContracts=وثائق مرتبطة بعقود -ECMDocsByInvoices=وثائق مرتبطة عملاء الفواتير -ECMDocsByProducts=الوثائق المرتبطة بالمنتجات -# ECMDocsByProjects=Documents linked to projects -ECMNoDirectoryYet=لا الدليل -ShowECMSection=وتظهر الدليل -DeleteSection=إزالة الدليل -ConfirmDeleteSection=يمكنك التأكد من أنك تريد حذف الدليل ٪ ق؟ -ECMDirectoryForFiles=دليل النسبي للملفات -CannotRemoveDirectoryContainsFiles=لا يمكن إزالتها لأنه يحتوي على بعض الملفات -ECMFileManager=مدير الملفات -ECMSelectASection=اختر دليل على ترك شجرة... -# DirNotSynchronizedSyncFirst=This directory seems to be created or modified outside ECM module. You must click on "Refresh" button first to synchronize disk and database to get content of this directory. +MenuECM=اسناد +DocsMine=اسناد من +DocsGenerated=اسناد تولید شده +DocsElements=عناصر اسناد +DocsThirdParties=اسناد اشخاص ثالث +DocsContracts=اسناد قرارداد +DocsProposals=طرح های اسناد +DocsOrders=سفارشات اسناد +DocsInvoices=اسناد فاکتورها +ECMNbOfDocs=Nb و اسناد در دایرکتوری +ECMNbOfDocsSmall=Nb و از توضیحات. +ECMSection=دایرکتوری +ECMSectionManual=دایرکتوری دستی +ECMSectionAuto=دایرکتوری ها به صورت خودکار +ECMSectionsManual=درخت دستی +ECMSectionsAuto=درخت ها به صورت خودکار +ECMSections=راهنماها +ECMRoot=ریشه +ECMNewSection=دایرکتوری جدید +ECMAddSection=اضافه کردن دایرکتوری +ECMNewDocument=سند جدید +ECMCreationDate=تاریخ ایجاد +ECMNbOfFilesInDir=تعداد فایل ها در دایرکتوری +ECMNbOfSubDir=تعداد زیر دایرکتوری ها +ECMNbOfFilesInSubDir=تعداد فایل ها در زیر دایرکتوری ها +ECMCreationUser=خالق +ECMArea=منطقه EDM +ECMAreaDesc=EDM (سند الکترونیکی مدیریت) منطقه اجازه می دهد تا شما را به صرفه جویی، به اشتراک گذاری و جستجو به سرعت همه نوع اسناد در Dolibarr. +ECMAreaDesc2=* دایرکتوری ها به صورت خودکار به طور خودکار در هنگام اضافه کردن اسناد از کارت یک عنصر پر شده است.
    * دایرکتوری دستی می توان برای ذخیره اسناد به یک عنصر خاصی پیوند ندارد. +ECMSectionWasRemoved=شاخه%s حذف شده است. +ECMDocumentsSection=سند دایرکتوری +ECMSearchByKeywords=جستجو با کلمات کلیدی +ECMSearchByEntity=جستجو توسط شی +ECMSectionOfDocuments=راهنماها اسناد +ECMTypeManual=دستی +ECMTypeAuto=اتوماتیک +ECMDocsBySocialContributions=اسناد مربوط به کمک های اجتماعی +ECMDocsByThirdParties=اسناد مربوط به اشخاص ثالث +ECMDocsByProposals=اسناد مربوط به طرح +ECMDocsByOrders=اسناد مربوط به سفارشات مشتریان +ECMDocsByContracts=اسناد مربوط به قرارداد +ECMDocsByInvoices=اسناد مربوط به صورت حساب مشتریان +ECMDocsByProducts=اسناد مرتبط به محصولات +ECMDocsByProjects=اسناد مربوط به پروژه +ECMNoDirectoryYet=بدون دایرکتوری ایجاد شده +ShowECMSection=نمایش دایرکتوری +DeleteSection=حذف دایرکتوری +ConfirmDeleteSection=آیا تائید می کنید که می خواهید این شاخه%s را حذف کنید؟ +ECMDirectoryForFiles=دایرکتوری نسبی برای فایل ها +CannotRemoveDirectoryContainsFiles=ممکن است حذف شده، زیرا حاوی بعضی از فایل ها نمی +ECMFileManager=مدیریت فایل ها +ECMSelectASection=انتخاب یک دایرکتوری در درخت سمت چپ ... +DirNotSynchronizedSyncFirst=این دایرکتوری به نظر می رسد ایجاد می شود و یا تغییر در خارج ماژول ECM. شما باید در "تازه کردن" را فشار دهید کلیک کنید برای اولین بار برای همزمان سازی دیسک و پایگاه داده برای دریافت مطالب از این شاخه. diff --git a/htdocs/langs/fa_IR/errors.lang b/htdocs/langs/fa_IR/errors.lang index 4abcb8cd22c..14162827517 100644 --- a/htdocs/langs/fa_IR/errors.lang +++ b/htdocs/langs/fa_IR/errors.lang @@ -1,155 +1,155 @@ # Dolibarr language file - Source file is en_US - errors # No errors -NoErrorCommitIsDone=No error, we commit +NoErrorCommitIsDone=بدون خطا، ما متعهد # Errors -Error=خطأ -Errors=أخطاء -ErrorButCommitIsDone=Errors found but we validate despite this -ErrorBadEMail=بريد إلكتروني خاطئ %s -ErrorBadUrl=عنوان الموقع هو الخطأ %s -ErrorLoginAlreadyExists=ادخل ٪ ق موجود بالفعل. -ErrorGroupAlreadyExists=المجموعة ٪ ق موجود بالفعل. -ErrorRecordNotFound=لم يتم العثور على السجل. -ErrorFailToCopyFile=Failed to copy file '%s' into '%s'. -ErrorFailToRenameFile=Failed to rename file '%s' into '%s'. -ErrorFailToDeleteFile=فشل إزالة الملف '٪ ق. -ErrorFailToCreateFile=فشل إنشاء الملف '٪ ق. -ErrorFailToRenameDir=فشل إعادة تسمية الدليل '٪ ق' الى '٪ ق. -ErrorFailToCreateDir=فشل إنشاء الدليل '٪ ق. -ErrorFailToDeleteDir=فشل حذف الدليل '٪ ق. -ErrorFailedToDeleteJoinedFiles=لا يمكن حذف كيان لان هناك انضم بعض الملفات. إزالة ملفات الانضمام الأولى. -ErrorThisContactIsAlreadyDefinedAsThisType=هذا الاتصال هو اتصال بالفعل تعريف لهذا النوع. -ErrorCashAccountAcceptsOnlyCashMoney=هذا الحساب المصرفي هو الحساب النقدي ، وذلك ما وافق على نوع من المدفوعات النقدية فقط. -ErrorFromToAccountsMustDiffers=المصدر والأهداف يجب أن تكون الحسابات المصرفية المختلفة. -ErrorBadThirdPartyName=سوء قيمة اسم طرف ثالث -ErrorProdIdIsMandatory=The %s is mandatory -ErrorBadCustomerCodeSyntax=سوء تركيب الزبون مدونة -ErrorBadBarCodeSyntax=Bad syntax for bar code -ErrorCustomerCodeRequired=رمز العميل المطلوبة -ErrorBarCodeRequired=Bar code required -ErrorCustomerCodeAlreadyUsed=الشفرة المستخدمة بالفعل العملاء -ErrorBarCodeAlreadyUsed=Bar code already used -ErrorPrefixRequired=المطلوب ببادئة -ErrorUrlNotValid=موقع معالجة صحيحة -ErrorBadSupplierCodeSyntax=مورد سوء تركيب لمدونة -ErrorSupplierCodeRequired=رمز المورد المطلوب -ErrorSupplierCodeAlreadyUsed=الشفرة المستخدمة بالفعل مورد -ErrorBadParameters=بارامترات سيئة -ErrorBadValueForParameter=Wrong value '%s' for parameter incorrect '%s' -ErrorBadImageFormat=Image file has not a supported format -ErrorBadDateFormat=Value '%s' has wrong date format -ErrorWrongDate=Date is not correct! -ErrorFailedToWriteInDir=لم يكتب في دليل ٪ ق -ErrorFoundBadEmailInFile=Found incorrect email syntax for %s lines in file (example line %s with email=العثور على بريد إلكتروني صحيح لتركيب خطوط ق ٪ في ملف (على سبيل المثال خط ٪ ق= ٪ مع البريد الإلكتروني) -ErrorUserCannotBeDelete=المستخدم لا يمكن حذفها. قد يكون ذلك مرتبطا Dolibarr على الكيانات. -ErrorFieldsRequired=تتطلب بعض المجالات لم تملأ. -ErrorFailedToCreateDir=فشل إنشاء دليل. تأكد من أن خادم الويب المستخدم أذونات لكتابة وثائق Dolibarr في الدليل. إذا تم تمكين المعلم safe_mode على هذا PHP ، تحقق من أن ملفات Dolibarr php تملك لخدمة الويب المستخدم (أو مجموعة). -ErrorNoMailDefinedForThisUser=البريد لا يعرف لهذا المستخدم -ErrorFeatureNeedJavascript=هذه الميزة تحتاج إلى تفعيل جافا سكريبت في العمل. هذا التغيير في البنية -- عرض. -ErrorTopMenuMustHaveAParentWithId0=وهناك قائمة من نوع 'توب' لا يمكن أن يكون أحد الوالدين القائمة. 0 وضعت في القائمة أو الأم في اختيار قائمة من نوع 'اليسار'. -ErrorLeftMenuMustHaveAParentId=وهناك قائمة من نوع 'اليسار' يجب أن يكون لها هوية الوالد. -ErrorFileNotFound=لم يتم العثور على الملف (باد الطريق الخطأ أو أذونات الوصول نفى المعلم openbasedir) -ErrorDirNotFound=لم يتم العثور على دليل %s (مسار غير صالح ، أو الحصول على أذونات خاطئة نفته openbasedir بي إتش بي أو safe_mode المعلمة) -ErrorFunctionNotAvailableInPHP=ق ٪ وظيفة مطلوبة لهذه الميزة ولكن لا تتوافر في هذه النسخة / الإعداد للPHP. -ErrorDirAlreadyExists=دليل بهذا الاسم بالفعل. -ErrorFileAlreadyExists=ملف بهذا الاسم موجود مسبقا. -ErrorPartialFile=الملف لم تتلق تماما بواسطة الخادم. -ErrorNoTmpDir=%s directy مؤقتة لا وجود. -ErrorUploadBlockedByAddon=حظر حمل من قبل البرنامج المساعد بى اباتشي /. -ErrorFileSizeTooLarge=حجم الملف كبير جدا. -ErrorSizeTooLongForIntType=Size too long for int type (%s digits maximum) -ErrorSizeTooLongForVarcharType=Size too long for string type (%s chars maximum) -ErrorNoValueForSelectType=Please fill value for select list -ErrorNoValueForCheckBoxType=Please fill value for checkbox list -ErrorNoValueForRadioType=Please fill value for radio list -ErrorBadFormatValueList=The list value cannot have more than one come : %s, but need at least one: llave,valores -ErrorFieldCanNotContainSpecialCharacters=ميدان ٪ ق يجب ألا يحتوي على أحرف خاصة. -ErrorFieldCanNotContainSpecialNorUpperCharacters=Field %s must not contains special characters, nor upper case characters. -ErrorNoAccountancyModuleLoaded=أي وحدة المحاسبة وتفعيل -ErrorExportDuplicateProfil=This profile name already exists for this export set. -ErrorLDAPSetupNotComplete=Dolibarr - LDAP المطابقة وليس كاملا. -ErrorLDAPMakeManualTest=ألف. ldif الملف قد ولدت في الدليل ٪ s. انها محاولة لتحميل يدويا من سطر في الحصول على مزيد من المعلومات عن الأخطاء. -ErrorCantSaveADoneUserWithZeroPercentage=لا يمكن انقاذ عمل مع "المركز الخاص لم تبدأ" اذا الميدان "الذي قام به" كما شغلها. -ErrorRefAlreadyExists=المرجع المستخدمة لإنشاء موجود بالفعل. -ErrorPleaseTypeBankTransactionReportName=الرجاء كتابة اسم البنك استلام المعاملات ويقال فيها (شكل YYYYMM أو YYYYMMDD) -ErrorRecordHasChildren=فشل حذف السجلات منذ نحو الطفل. -ErrorRecordIsUsedCantDelete=Can't delete record. It is already used or included into other object. -ErrorModuleRequireJavascript=يجب عدم تعطيل جافا سكريبت لجعل هذا العمل الميزة. لتمكين / تعطيل جافا سكريبت ، انتقل إلى القائمة الرئيسية -> الإعداد -> العرض. -ErrorPasswordsMustMatch=ويجب على كلا كلمات المرور المكتوبة تطابق بعضها البعض -ErrorContactEMail=A technical error occured. Please, contact administrator to following email %s en provide the error code %s in your message, or even better by adding a screen copy of this page. -ErrorWrongValueForField=قيمة خاطئة لعدد %s الحقل (قيمة '%s' لا يتطابق %s حكم [رجإكس]) -ErrorFieldValueNotIn=Wrong value for field number %s (value '%s' is not a value available into field %s of table %s) -ErrorFieldRefNotIn=Wrong value for field number %s (value '%s' is not a %s existing ref) -ErrorsOnXLines=الأخطاء على خطوط مصدر %s -ErrorFileIsInfectedWithAVirus=وكان برنامج مكافحة الفيروسات غير قادرة على التحقق من صحة الملف (ملف قد يكون مصابا بواسطة فيروس) -ErrorSpecialCharNotAllowedForField=غير مسموح الأحرف الخاصة لحقل "%s" -ErrorDatabaseParameterWrong=قاعدة بيانات المعلمة الإعداد '%s' يحتوي على قيمة غير متوافق لاستخدام Dolibarr (يجب أن يكون قيمة '%s'). -ErrorNumRefModel=إشارة إلى وجود قاعدة بيانات (%s) ، وغير متوافق مع هذه القاعدة الترقيم. سجل إزالة أو إعادة تسميته اشارة الى تفعيل هذه الوحدة. -ErrorQtyTooLowForThisSupplier=كمية قليلة جدا لهذا المورد أو السعر لا تعرف عن هذا المنتج لهذا المورد -ErrorModuleSetupNotComplete=Setup of module looks to be uncomplete. Go on Setup - Modules to complete. -ErrorBadMask=Error on mask -ErrorBadMaskFailedToLocatePosOfSequence=Error, mask without sequence number -ErrorBadMaskBadRazMonth=Error, bad reset value -ErrorSelectAtLeastOne=Error. Select at least one entry. -ErrorProductWithRefNotExist=Product with reference '%s' don't exist -ErrorDeleteNotPossibleLineIsConsolidated=Delete not possible because record is linked to a bank transation that is conciliated -ErrorProdIdAlreadyExist=%s is assigned to another third -ErrorFailedToSendPassword=لم ترسل كلمة السر -ErrorFailedToLoadRSSFile=Fails to get RSS feed. Try to add constant MAIN_SIMPLEXMLLOAD_DEBUG if error messages does not provide enough information. -ErrorPasswordDiffers=وتختلف كلمات السر ، يرجى منها من نوع جديد. -ErrorForbidden=الوصول ممنوع.
    محاولة الوصول إلى صفحة ، أو منطقة دون سمة في الدورة من صحة أو عدم السماح لالمستخدم. -ErrorForbidden2=إذن لدخول هذا يمكن تعريف بلدكم من قائمة مدير Dolibarr ٪ ق -> ٪ s. -ErrorForbidden3=يبدو أن Dolibarr لا يستخدم من صحتها من خلال هذه الدورة. إلقاء نظرة على Dolibarr إعداد الوثائق لمعرفة كيفية ادارة التوثيقات (htaccess ، mod_auth أو غيرها...). -ErrorNoImagickReadimage=وظيفة imagick_readimage لا يوجد في هذا PHP. لا يمكن معاينة المتاحة. يمكن للمشرفين تعطيل هذه القائمة من علامة التبويب إعداد -- عرض. -ErrorRecordAlreadyExists=سجل موجود بالفعل -ErrorCantReadFile=فشل في قراءة الملف '٪ ق' -ErrorCantReadDir=فشل في قراءة الدليل '٪ ق' -ErrorFailedToFindEntity=لم يقرأ كيان '٪ ق' -ErrorBadLoginPassword=سوء قيمة أو كلمة السر للدخول -ErrorLoginDisabled=لقد تم تعطيل حسابك -ErrorFailedToRunExternalCommand=فشل القيادة الخارجية التي تديرها. تأكد من أن يصبح متاحا في بلدكم وrunnable الخادم PHP. إذا PHP تمكين الوضع الآمن ، وتأكد من أن القيادة داخل حددها دليل المعلم safe_mode_exec_dir. -ErrorFailedToChangePassword=فشل تغيير كلمة المرور -ErrorLoginDoesNotExists=للمستخدم تسجيل الدخول ٪ ق لم يتم العثور على. -ErrorLoginHasNoEmail=هذا المستخدم ليس لديها عنوان بريد إلكتروني. عملية اجهاض. -ErrorBadValueForCode=قيمة أنواع سيئة للقانون. حاول مرة أخرى مع قيمة جديدة... -ErrorBothFieldCantBeNegative=Fields %s and %s can't be both negative -ErrorWebServerUserHasNotPermission=User account %s used to execute web server has no permission for that -ErrorNoActivatedBarcode=No barcode type activated -ErrUnzipFails=Failed to unzip %s with ZipArchive -ErrNoZipEngine=No engine to unzip %s file in this PHP -ErrorFileMustBeADolibarrPackage=The file %s must be a Dolibarr zip package -ErrorFileRequired=It takes a package Dolibarr file -ErrorPhpCurlNotInstalled=The PHP CURL is not installed, this is essential to talk with Paypal -ErrorFailedToAddToMailmanList=Failed to add record %s to Mailman list %s or SPIP base -ErrorFailedToRemoveToMailmanList=Failed to remove record %s to Mailman list %s or SPIP base -ErrorNewValueCantMatchOldValue=New value can't be equal to old one -ErrorFailedToValidatePasswordReset=Failed to reinit password. May be the reinit was already done (this link can be used only one time). If not, try to restart the reinit process. -ErrorToConnectToMysqlCheckInstance=Connect to database fails. Check Mysql server is running (in most cases, you can launch it from command line with 'sudo /etc/init.d/mysql start'). -ErrorFailedToAddContact=Failed to add contact -ErrorDateMustBeBeforeToday=The date can not be greater than today -ErrorPaymentModeDefinedToWithoutSetup=A payment mode was set to type %s but setup of module Invoice was not completed to define information to show for this payment mode. -ErrorPHPNeedModule=Error, your PHP must have module %s installed to use this feature. -ErrorOpenIDSetupNotComplete=You setup Dolibarr config file to allow OpenID authentication, but URL of OpenID service is not defined into constant %s -ErrorWarehouseMustDiffers=Source and target warehouses must differs -ErrorBadFormat=Bad format! -ErrorPaymentDateLowerThanInvoiceDate=Payment date (%s) cant' be before invoice date (%s) for invoice %s. -ErrorMemberNotLinkedToAThirpartyLinkOrCreateFirst=Error, this member is not yet linked to any thirdparty. Link member to an existing third party or create a new thirdparty before creating subscription with invoice. -ErrorThereIsSomeDeliveries=Error, there is some deliveries linked to this shipment. Deletion refused. +Error=خطا +Errors=خطاها +ErrorButCommitIsDone=خطاهای یافت اما ما با وجود این اعتبار +ErrorBadEMail=ایمیل٪ اشتباه است +ErrorBadUrl=آدرس%s در اشتباه است +ErrorLoginAlreadyExists=ورود به%s در حال حاضر وجود دارد. +ErrorGroupAlreadyExists=گروه%s در حال حاضر وجود دارد. +ErrorRecordNotFound=صفحه موجود نیست. +ErrorFailToCopyFile=برای کپی کردن پرونده «%s 'به'%s» شکست خورد. +ErrorFailToRenameFile=برای تغییر نام فایل '%s' را به '%s »شکست خورد. +ErrorFailToDeleteFile=حذف پرونده «%s» شکست خورد. +ErrorFailToCreateFile=برای ایجاد پرونده «%s» شکست خورد. +ErrorFailToRenameDir=برای تغییر نام دایرکتوری '%s' را به '%s »شکست خورد. +ErrorFailToCreateDir=برای ایجاد دایرکتوری '%s »شکست خورد. +ErrorFailToDeleteDir=دایرکتوری '%s' به حذف انجام نشد. +ErrorFailedToDeleteJoinedFiles=می تواند محیط زیست را حذف کنید چون برخی از فایل های پیوست وجود دارد. حذف اولین پیوستن به فایل های. +ErrorThisContactIsAlreadyDefinedAsThisType=این تماس در حال حاضر به عنوان تماس برای این نوع تعریف شده است. +ErrorCashAccountAcceptsOnlyCashMoney=این حساب بانکی یک حساب نقدی، پس از آن پرداخت و تنها نوع پول نقد را می پذیرد. +ErrorFromToAccountsMustDiffers=منبع و اهداف حساب های بانکی باید متفاوت باشد. +ErrorBadThirdPartyName=ارزش بد برای نام شخص ثالث +ErrorProdIdIsMandatory=٪ بازدید کنندگان الزامی است +ErrorBadCustomerCodeSyntax=نحو بد برای کد مشتری +ErrorBadBarCodeSyntax=نحو بد بارکد +ErrorCustomerCodeRequired=کد مشتریان مورد نیاز +ErrorBarCodeRequired=کد نوار مورد نیاز +ErrorCustomerCodeAlreadyUsed=کد مشتری در حال حاضر استفاده می شود +ErrorBarCodeAlreadyUsed=کد نوار در حال حاضر استفاده می شود +ErrorPrefixRequired=پیشوند مورد نیاز +ErrorUrlNotValid=آدرس وب سایت اشتباه است +ErrorBadSupplierCodeSyntax=نحو بد برای کد منبع +ErrorSupplierCodeRequired=کد تامین کننده مورد نیاز +ErrorSupplierCodeAlreadyUsed=کد تامین کننده در حال حاضر استفاده می شود +ErrorBadParameters=پارامترهای بد +ErrorBadValueForParameter=ارزش اشتباه '%s' را برای پارامتر نادرست '%s' را +ErrorBadImageFormat=فایل تصویر است نه یک فرمت پشتیبانی +ErrorBadDateFormat=مقدار «%s 'است قالب تاریخ اشتباه +ErrorWrongDate=تاریخ صحیح نمی باشد! +ErrorFailedToWriteInDir=برای نوشتن در پوشه%s شکست خورد +ErrorFoundBadEmailInFile=یافت نحو ایمیل نادرست برای%s خط در فایل (به عنوان مثال خط٪ با ایمیل =٪ بازدید کنندگان) +ErrorUserCannotBeDelete=کاربر نمی تواند حذف شود. ممکن است آن را در نهادهای Dolibarr همراه است. +ErrorFieldsRequired=برخی از زمینه های مورد نیاز است نه شد. +ErrorFailedToCreateDir=برای ایجاد یک دایرکتوری شکست خورده است. بررسی کنید که کاربر وب سرور دارای مجوز به ارسال به Dolibarr دایرکتوری اسناد. اگر safe_mode پارامتر در این PHP را فعال کنید، بررسی کنید که فایل های پی اچ پی Dolibarr صاحب به کاربر وب سرور (یا گروه). +ErrorNoMailDefinedForThisUser=بدون پست تعریف شده برای این کاربر +ErrorFeatureNeedJavascript=این قابلیت نیاز به جاوا اسکریپت را فعال شود به کار می کنند. تغییر این در نصب - صفحه نمایش. +ErrorTopMenuMustHaveAParentWithId0=منو از نوع "بالا" می توانید یک منو پدر و مادر ندارد. 0 قرار دهید و در منو پدر و مادر و یا یک منو از نوع "چپ" را انتخاب کنید. +ErrorLeftMenuMustHaveAParentId=منو از نوع "چپ" باید یک شناسه (شماره) پدر و مادر داشته باشد. +ErrorFileNotFound=پرونده%s (مسیر نادرست، مجوز اشتباه و یا دسترسی های openbasedir PHP و یا پارامتر safe_mode) یافت نشد +ErrorDirNotFound=شاخه%s (مسیر نادرست، مجوز اشتباه و یا دسترسی های openbasedir PHP و یا پارامتر safe_mode) یافت نشد +ErrorFunctionNotAvailableInPHP=تابع٪ برای این ویژگی لازم است اما در دسترس در این نسخه / راه اندازی PHP نیست. +ErrorDirAlreadyExists=یک دایرکتوری با این نام وجود دارد. +ErrorFileAlreadyExists=یک فایل با این نام وجود دارد. +ErrorPartialFile=فایل های سرور به طور کامل دریافت نکرده اند. +ErrorNoTmpDir=موقت directy%s را می کند وجود ندارد. +ErrorUploadBlockedByAddon=بارگذاری مسدود شده توسط یک پلاگین PHP / آپاچی. +ErrorFileSizeTooLarge=حجم فایل بیش از حد بزرگ است. +ErrorSizeTooLongForIntType=حجم بیش از حد طولانی برای نوع int (%s را حداکثر رقم) +ErrorSizeTooLongForVarcharType=حجم بیش از حد طولانی برای نوع رشته (از%s کاراکتر حداکثر) +ErrorNoValueForSelectType=لطفا ارزش برای انتخاب لیست را پر کنید +ErrorNoValueForCheckBoxType=لطفا ارزش برای استخراج را پر کنید +ErrorNoValueForRadioType=لطفا ارزش برای فهرست های رادیویی را پر کنید +ErrorBadFormatValueList=ارزش لیست نیست می توانید بیش از یک آمده است:%s را، اما باید حداقل یک: هیدرولیکی Llave، VALORES +ErrorFieldCanNotContainSpecialCharacters=٪ درست ها باید شامل کاراکترهای خاص نیست. +ErrorFieldCanNotContainSpecialNorUpperCharacters=٪ درست ها باید شامل کاراکترهای خاص، و نه حروف بزرگ نیست. +ErrorNoAccountancyModuleLoaded=بدون ماژول حسابداری فعال +ErrorExportDuplicateProfil=این نام مشخصات در حال حاضر برای این مجموعه صادرات وجود دارد. +ErrorLDAPSetupNotComplete=تطبیق Dolibarr-LDAP کامل نیست. +ErrorLDAPMakeManualTest=فایل LDIF. شده است در شاخه%s تولید می شود. سعی کنید به آن بار دستی از خط فرمان به کسب اطلاعات بیشتر در مورد خطا است. +ErrorCantSaveADoneUserWithZeroPercentage=آیا می توانم اقدام با "statut آغاز شده است" اگر درست "انجام شده توسط" نیز پر را نجات دهد. +ErrorRefAlreadyExists=کد عکس مورد استفاده برای ایجاد وجود دارد. +ErrorPleaseTypeBankTransactionReportName=لطفا نام رسید بانکی نوع که در آن معامله گزارش شده است (YYYYMM فرمت و یا YYYYMMDD) +ErrorRecordHasChildren=برای حذف رکورد از آن تا به برخی از کودکان شکست خورده است. +ErrorRecordIsUsedCantDelete=می توانید ضبط را حذف کنید. این است که در حال حاضر به شی دیگر استفاده می شود و یا گنجانده شده است. +ErrorModuleRequireJavascript=جاوا اسکریپت نمی باید غیر فعال شود که این ویژگی کار. برای فعال کردن / غیر فعال کردن جاوا اسکریپت، رفتن به منو صفحه اصلی> راه اندازی> نمایش. +ErrorPasswordsMustMatch=هر دو کلمه عبور تایپ شده باید با یکدیگر مطابقت +ErrorContactEMail=یک خطای فنی رخ داد. لطفا، با مدیر سایت تماس به زیر ایمیل از%s EN ارائه کد خطا%s در پیام خود، و یا حتی بهتر با اضافه کردن یک کپی روی صفحه نمایش از این صفحه. +ErrorWrongValueForField=ارزش اشتباه برای تعداد فیلد%s (مقدار «%s» به عبارت منظم حکومت از%s مطابقت ندارد) +ErrorFieldValueNotIn=ارزش اشتباه برای تعداد فیلد%s (مقدار «%s» است مقدار موجود در فیلد%s را از جدول٪ نیست) +ErrorFieldRefNotIn=ارزش اشتباه برای تعداد فیلد%s (مقدار «%s» است از%s کد عکس موجود نیست) +ErrorsOnXLines=خطا در%s را ثبت منبع (ها) +ErrorFileIsInfectedWithAVirus=برنامه آنتی ویروس قادر به اعتبار فایل (فایل ممکن است توسط یک ویروس آلوده) +ErrorSpecialCharNotAllowedForField=شخصیت های ویژه برای رشته "%s" مجاز نیست +ErrorDatabaseParameterWrong=پایگاه داده های پارامتر راه اندازی '%s' را تا به ارزش سازگار به استفاده از Dolibarr (باید مقدار «%s 'داشته باشد). +ErrorNumRefModel=مرجع به پایگاه داده وجود دارد (%s) و سازگار با این قانون شماره نیست. حذف رکورد و یا مرجع تغییر نام داد و به این ماژول را فعال کنید. +ErrorQtyTooLowForThisSupplier=مقدار خیلی کم برای این عرضه کننده کالا یا بدون قیمت در این محصول برای این کالا تعریف شده +ErrorModuleSetupNotComplete=راه اندازی ماژول به نظر می رسد ناقص. برو در راه اندازی - ماژول ها را پر کنید. +ErrorBadMask=خطا در ماسک +ErrorBadMaskFailedToLocatePosOfSequence=خطا، ماسک بدون شماره ترتیب +ErrorBadMaskBadRazMonth=خطا، مقدار تنظیم مجدد بد +ErrorSelectAtLeastOne=خطا. حداقل یک ورودی را انتخاب کنید. +ErrorProductWithRefNotExist=محصولات با مرجع '%s' را وجود ندارد +ErrorDeleteNotPossibleLineIsConsolidated=حذف ممکن نیست چون رکورد به یک transation بانکی است که با آشتی خاتمه نیافت مرتبط +ErrorProdIdAlreadyExist=%s را به یک سوم دیگر اختصاص داده +ErrorFailedToSendPassword=برای ارسال رمز عبور ناموفق +ErrorFailedToLoadRSSFile=نتواند به دریافت خوراک RSS. سعی کنید برای اضافه کردن MAIN_SIMPLEXMLLOAD_DEBUG ثابت اگر پیغام خطا می کند اطلاعات کافی را فراهم نمی کند. +ErrorPasswordDiffers=کلمات عبور متفاوت است، لطفا دوباره آنها را تایپ کنید. +ErrorForbidden=دسترسی ممنوع است.
    شما سعی می کنید برای دسترسی به یک صفحه، منطقه و یا ویژگی بدون اینکه در جلسه تصدیق و یا است که به کاربر خود پذیر نیست. +ErrorForbidden2=اجازه این ورود می تواند توسط مدیر Dolibarr خود را از منوی%s->%s را تعریف شده است. +ErrorForbidden3=به نظر می رسد که Dolibarr از طریق یک جلسه تصدیق استفاده نمی شود. نگاهی به اسناد و مدارک راه اندازی Dolibarr بدانید که چگونه برای مدیریت احراز اصالت (htaccess تغییر نام دهید، mod_auth و یا دیگر ...). +ErrorNoImagickReadimage=کلاس Imagick در این PHP یافت نشد. بدون پیش نمایش را می توان در دسترس است. مدیران می توانند این برگه را از منوی راه اندازی غیر فعال کردن - نمایش. +ErrorRecordAlreadyExists=ضبط از قبل وجود دارد +ErrorCantReadFile=برای خواندن پرونده «%s» شکست خورد +ErrorCantReadDir=برای خواندن دایرکتوری شکست خورد '%s' را +ErrorFailedToFindEntity=برای خواندن محیط زیست «%s» شکست خورد +ErrorBadLoginPassword=ارزش بد برای ورود و یا کلمه عبور +ErrorLoginDisabled=حساب شما غیر فعال شده است +ErrorFailedToRunExternalCommand=برای اجرای دستور خارجی ها انجام نشد. آن را چک کنید در دسترس است و شده runnable توسط سرور PHP شما می باشد. اگر PHP حالت Safe Mode را فعال کنید، بررسی کنید که فرمان است در داخل یک پوشه تعریف شده توسط safe_mode_exec_dir پارامتر. +ErrorFailedToChangePassword=برای تغییر رمز عبور ناموفق +ErrorLoginDoesNotExists=کاربر با ورود به%s را می تواند یافت نمی شود. +ErrorLoginHasNoEmail=این کاربر هیچ آدرس ایمیل. فرآیند سقط شده. +ErrorBadValueForCode=ارزش بد برای کد امنیتی. دوباره سعی کنید با ارزش جدید ... +ErrorBothFieldCantBeNegative=زمینه های%s و%s نمی تواند هر دو منفی +ErrorWebServerUserHasNotPermission=حساب کاربری%s را برای اجرای وب سرور بدون اجازه که +ErrorNoActivatedBarcode=بدون بارکد از نوع فعال +ErrUnzipFails=برای جدا کردن%s با ZipArchive ناموفق +ErrNoZipEngine=بدون موتور را از حالت زیپ خارج از%s فایل در این PHP +ErrorFileMustBeADolibarrPackage=پرونده%s باید یک بسته فشرده Dolibarr است +ErrorFileRequired=طول می کشد تا یک فایل Dolibarr بسته +ErrorPhpCurlNotInstalled=PHP CURL نصب نشده است، این ضروری است که با پی پال صحبت +ErrorFailedToAddToMailmanList=برای اضافه کردن رکورد٪ به پستچی فهرست٪ یا پایه SPIP ناموفق +ErrorFailedToRemoveToMailmanList=برای حذف رکورد٪ به پستچی فهرست٪ یا پایه SPIP ناموفق +ErrorNewValueCantMatchOldValue=ارزش های جدید را نمی توان به یکی از قدیمی برابر +ErrorFailedToValidatePasswordReset=به راه اندازی مجدد کنتور رمز عبور شکست خورده است. ممکن است راه اندازی مجدد کنتور در حال حاضر انجام شده است (این لینک را می توان مورد استفاده فقط یک بار). اگر نه، سعی کنید به راه اندازی مجدد فرآیند راه اندازی مجدد کنتور. +ErrorToConnectToMysqlCheckInstance=اتصال به پایگاه داده نتواند. چک کردن سرور خروجی زیر در حال اجرا است (در بیشتر موارد، شما می توانید آن را از خط فرمان با 'کد: sudo / و غیره / init.d / خروجی زیر شروع به' راه اندازی). +ErrorFailedToAddContact=برای اضافه کردن مخاطب انجام نشد +ErrorDateMustBeBeforeToday=تاریخ نمی تواند بیشتر از امروز +ErrorPaymentModeDefinedToWithoutSetup=حالت پرداخت به نوع%s را تعیین شد، اما راه اندازی فاکتور ماژول شد کامل نیست برای تعریف اطلاعات به این حالت پرداخت نشان می دهد. +ErrorPHPNeedModule=خطا، PHP شما باید بخش%s نصب کرده باشید برای استفاده از این ویژگی. +ErrorOpenIDSetupNotComplete=شما راه اندازی Dolibarr فایل پیکربندی اجازه می دهد تا احراز هویت ایجاد حساب کاربری، اما URL خدمات ایجاد حساب کاربری به٪ ثابت تعریف نشده +ErrorWarehouseMustDiffers=منبع و هدف انبارها باید متفاوت +ErrorBadFormat=فرمت بد! +ErrorPaymentDateLowerThanInvoiceDate=تاریخ پرداخت (٪ بازدید کنندگان) نمی باشد قبل از تاریخ فاکتور (%s) برای فاکتور٪ است. +ErrorMemberNotLinkedToAThirpartyLinkOrCreateFirst=خطا، این عضو هنوز رتبهدهی نشده است به هر thirdparty مرتبط است. عضو لینک به یک شخص ثالث موجود یا ایجاد یک thirdparty جدید قبل از ایجاد اشتراک با فاکتور. +ErrorThereIsSomeDeliveries=خطا، برخی از زایمان مرتبط با این حمل و نقل وجود دارد. حذف خودداری کرد. # Warnings -WarningMandatorySetupNotComplete=Mandatory setup parameters are not yet defined -WarningSafeModeOnCheckExecDir=انذار ، فب safe_mode الخيار في ذلك تخزين الأمر يجب أن يكون داخل الدليل الذي أعلنته safe_mode_exec_dir المعلمة بي. -WarningAllowUrlFopenMustBeOn=allow_url_fopen المعلم يجب أن يوضع على المدون في php.ini لتعمل هذه الوحدة بشكل كامل. يجب عليك أن تعدل عن هذا الملف يدويا. -WarningBuildScriptNotRunned=السيناريو ٪ ق لم يكن يتعارض مع بناء الرسومات ، أو عدم وجود بيانات تظهر. -WarningBookmarkAlreadyExists=المرجعية هذا الكتاب أو هذا الهدف (عنوان) موجود بالفعل. -WarningPassIsEmpty=تحذير كلمة سر قاعدة بيانات فارغة. هذه هي ثغرة أمنية. يجب عليك أن تضيف كلمة السر الخاصة بك لقاعدة البيانات وتغيير conf.php ليعكس هذا الملف. -WarningConfFileMustBeReadOnly=انذار ، ملف (التكوين htdocs / أسيوط / conf.php) الخاص يمكن أن تكون الكتابة بواسطة خادم الويب. هذه هي ثغرة أمنية خطيرة. أذونات تعديل على ملف ليكون في وضع القراءة فقط لمستخدم نظام التشغيل المستخدمة من قبل ملقم ويب. إذا كنت تستخدم ويندوز وشكل نسبة الدهون لمدة القرص الخاص بك ، فإنك يجب أن نعرف أن هذا النظام لا يسمح ملف لإضافة الأذونات على الملف ، بحيث لا تكون آمنة تماما. -WarningsOnXLines=تحذيرات عن مصدر خطوط %s -WarningNoDocumentModelActivated=لا يوجد نموذج لجيل وثيقة ، قد تم تنشيط. سيكون نموذج المختار افتراضيا حتى يمكنك التحقق من إعداد وحدة الخاص. -WarningLockFileDoesNotExists=Warning, once setup is finished, you must disable install/migrate tools by adding a file install.lock into directory %s. Missing this file is a security hole. -WarningUntilDirRemoved=هذا التحذير وسوف تظل نشطة ما دام هذا الدليل هو هذا (يظهر فقط لمستخدمي المشرف). -WarningCloseAlways=Warning, closing is done even if amount differs between source and target elements. Enable this feature with caution. -WarningUsingThisBoxSlowDown=Warning, using this box slow down seriously all pages showing the box. -WarningClickToDialUserSetupNotComplete=Setup of ClickToDial information for your user are not complete (see tab ClickToDial onto your user card). -WarningNotRelevant=Irrelevant operation for this dataset +WarningMandatorySetupNotComplete=پارامترهای راه اندازی اجباری هنوز تعریف نشده +WarningSafeModeOnCheckExecDir=هشدار، safe_mode گزینه PHP در تا دستور باید در داخل یک دایرکتوری اعلام شده توسط پی اچ پی safe_mode_exec_dir پارامتر های ذخیره شده است. +WarningAllowUrlFopenMustBeOn=خاموش allow_url_fopen پارامتر باید به در در فایل php.ini فیلتر برای داشتن این ماژول کار کاملا تنظیم شده است. شما باید این فایل را به صورت دستی تغییر دهید. +WarningBuildScriptNotRunned=اسکریپت٪ بود هنوز اجرا نشده است برای ساخت گرافیک، و یا هیچ اطلاعات برای نشان دادن وجود ندارد. +WarningBookmarkAlreadyExists=چوب الف با این عنوان و یا این هدف (URL) وجود دارد. +WarningPassIsEmpty=هشدار، رمز عبور پایگاه داده خالی است. این یک حفره امنیتی است. شما باید یک رمز عبور را به پایگاه داده خود اضافه کنید و تغییر فایل conf.php خود را به منعکس کننده این. +WarningConfFileMustBeReadOnly=اخطار، فایل پیکربندی خود را (htdocs / کنفرانس / conf.php) می تواند توسط وب سرور رونویسی. این یک حفره امنیتی جدی است. تغییر مجوز فایل را در حالت فقط خواندنی است برای کاربر سیستم عامل های استفاده شده توسط وب سرور. در صورت استفاده از ویندوز و FAT فرمت برای هارد دیسک شما، شما باید بدانید که این فایل سیستم اجازه نمی دهد برای اضافه کردن مجوز در فایل، بنابراین نمی تواند به طور کامل امن است. +WarningsOnXLines=اخطار در%s را ثبت منبع (ها) +WarningNoDocumentModelActivated=بدون مدل، برای تولید سند، فعال شده است. یک مدل خواهد شد به طور پیش فرض انتخاب تا زمانی که شما راه اندازی ماژول خود را چک کنید. +WarningLockFileDoesNotExists=اخطار، یک بار نصب به پایان رسید، شما باید با اضافه کردن یک install.lock فایل به شاخه%s غیر فعال کردن نصب / مهاجرت ابزار. گمشده این فایل یک حفره امنیتی است. +WarningUntilDirRemoved=تمام هشدارهای امنیتی (قابل مشاهده توسط کاربران مدیر تنها) خواهد فعال تا زمانی که آسیب پذیری وجود داشته باشد باقی می ماند (و یا که MAIN_REMOVE_INSTALL_WARNING ثابت است در راه اندازی-> دیگر تنظیمات اضافه شده است). +WarningCloseAlways=هشدار، بسته شدن انجام می شود حتی اگر مقدار بین منبع و مقصد عناصر متفاوت است. فعال کردن این ویژگی با احتیاط. +WarningUsingThisBoxSlowDown=اخطار، با استفاده از این جعبه کاهش سرعت به طور جدی تمام صفحات نشان دادن جعبه. +WarningClickToDialUserSetupNotComplete=راه اندازی از اطلاعات ClickToDial برای کاربر شما کامل نیست (ClickToDial زبانه دیدن بر روی کارت کاربر خود را). +WarningNotRelevant=عملیات بی ربط برای این مجموعه داده diff --git a/htdocs/langs/fa_IR/exports.lang b/htdocs/langs/fa_IR/exports.lang index e076ce33cdb..9ee85818d28 100644 --- a/htdocs/langs/fa_IR/exports.lang +++ b/htdocs/langs/fa_IR/exports.lang @@ -1,134 +1,134 @@ # Dolibarr language file - Source file is en_US - exports -ExportsArea=صادرات المنطقة -ImportArea=مجال الاستيراد -NewExport=تصديرية جديدة -NewImport=استيراد جديدة -ExportableDatas=تصدير البيانات -ImportableDatas=بيانات وارداتها -SelectExportDataSet=اختر البيانات التي تريد تصديرها... -SelectImportDataSet=اختر البيانات التي تريد الاستيراد... -SelectExportFields=اختيار الحقول التي تريد تصديرها ، أو اختيار ملف التصدير مسبقا -SelectImportFields=اختيار الحقول التي تريد استيراد ، أو حدد ملف استيراد محددة سلفا ، -NotImportedFields=حقول من الملف المصدر يتم استيراد -SaveExportModel=احفظ هذا التصدير صورة لو كنت تخطط لإعادة استخدامها في وقت لاحق... -SaveImportModel=إنقاذ هذه استيراد صورة لو كنت تخطط لإعادة استخدامها في وقت لاحق... -ExportModelName=اسم تصدير صورة -ExportModelSaved=تصدير صورة المحفوظة تحت اسم ٪ ق. -ExportableFields=مجالات للتصدير -ExportedFields=صدرت المجالات -ImportModelName=استيراد صورة الاسم -ImportModelSaved=استيراد صورة المحفوظة تحت اسم ٪ ق. -ImportableFields=ارداتها المجالات -ImportedFields=الحقول المستوردة -DatasetToExport=بيانات التصدير -DatasetToImport=استيراد البيانات -NoDiscardedFields=يتم تجاهل أي حقول في الملف المصدر -Dataset=بيانات -ChooseFieldsOrdersAndTitle=اختيار الحقول من أجل... -FieldsOrder=المجالات من أجل -FieldsTitle=عنوان الحقول -FieldOrder=مجال النظام -FieldTitle=حقل العنوان -ChooseExportFormat=اختيار شكل للتصدير -NowClickToGenerateToBuildExportFile=الآن ، انقر على "توليد" لبناء ملف التصدير... -AvailableFormats=الصيغ المتاحة و -LibraryShort=المكتبة -LibraryUsed=وتستخدم المكتبة -LibraryVersion=النسخة -Step=خطوة -FormatedImport=مساعد والاستيراد -FormatedImportDesc1=ويسمح هذا المجال لاستيراد البيانات الشخصية ، وذلك باستخدام مساعد لمساعدتكم في هذه العملية من دون المعرفة التقنية. -FormatedImportDesc2=والخطوة الأولى هي اختيار ملك للبيانات التي تريد تحميل ، ثم تحميل ملف ، ثم اختيار الحقول التي تريد تحميل. -FormatedExport=مساعد والتصدير -FormatedExportDesc1=ويسمح هذا المجال لتصدير البيانات الشخصية ، وذلك باستخدام مساعد لمساعدتكم في هذه العملية من دون المعرفة التقنية. -FormatedExportDesc2=والخطوة الأولى هي اختيار مجموعة بيانات محددة سلفا ، ثم اختيار الحقول التي تريد نتيجة في الملفات الخاصة بك ، والذي النظام. -FormatedExportDesc3=عند تصدير البيانات ويتم اختيار ، يمكنك تحديد صيغة الملف الناتج تريد تصديره إلى بياناتك. -Sheet=ورقة -NoImportableData=لا ارداتها البيانات (أي وحدة مع السماح للبيانات تعريفات الواردات) -FileSuccessfullyBuilt=ملف التصدير ولدت -SQLUsedForExport=SQL طلب استخدامه لبناء ملف التصدير -LineId=معرف السطر -LineDescription=وصف خط -LineUnitPrice=سعر الوحدة من خط -LineVATRate=ضريبة القيمة المضافة من سعر الخط -LineQty=خط للكمية -LineTotalHT=المبلغ الصافي بعد خصم الضرائب عن الخط -LineTotalTTC=المبلغ تمشيا مع ضريبة -LineTotalVAT=مبلغ الضريبة على القيمة المضافة لخط -TypeOfLineServiceOrProduct=Type of line (0=product, 1=نوع الخط (0= منتج الخدمة= 1) -FileWithDataToImport=ملف استيراد البيانات -FileToImport=مصدر لاستيراد ملف -FileMustHaveOneOfFollowingFormat=ملف لاستيراد ويجب أن يكون واحدا من الشكل التالي -DownloadEmptyExample=تحميل مثال على مصدر ملف فارغ -ChooseFormatOfFileToImport=اختيار تنسيق ملف لاستخدام تنسيق ملف الاستيراد عن طريق النقر على %s picto لتحديده. -ChooseFileToImport=اختيار ملف لاستيراد ثم اضغط على picto ٪ ق... -SourceFileFormat=مصدر تنسيق ملف -FieldsInSourceFile=الحقول في ملف المصدر -# FieldsInTargetDatabase=Target fields in Dolibarr database (bold=mandatory) -Field=حقل -NoFields=لا الحقول -MoveField=تحرك %s حقل رقم العمود +ExportsArea=منطقه صادرات +ImportArea=منطقه واردات +NewExport=صادرات جدید +NewImport=واردات جدید +ExportableDatas=مجموعه داده های صادراتی +ImportableDatas=مجموعه داده های واردات +SelectExportDataSet=انتخاب مجموعه داده های شما می خواهید به صادرات ... +SelectImportDataSet=انتخاب مجموعه داده های شما می خواهید به واردات ... +SelectExportFields=رشته های شما می خواهید به صادرات را انتخاب کنید، و یا یک پروفایل صادرات از پیش تعریف شده را انتخاب کنید +SelectImportFields=Choose source file fields you want to import and their target field in database by moving them up and down with anchor %s, or select a predefined import profile: +NotImportedFields=زمینه های از فایل منبع وارد نشده +SaveExportModel=ذخیره سازی این مشخصات صادرات اگر شما قصد دارید از آن استفاده مجدد بعد ... +SaveImportModel=ذخیره سازی این مشخصات واردات اگر شما قصد دارید از آن استفاده مجدد بعد ... +ExportModelName=پروفایل صادرات +ExportModelSaved=مشخصات صادرات تحت نام%s را نجات داد. +ExportableFields=زمینه های صادراتی +ExportedFields=زمینه های صادراتی +ImportModelName=پروفایل واردات +ImportModelSaved=مشخصات واردات تحت نام%s را نجات داد. +ImportableFields=زمینه واردات +ImportedFields=رشته های وارداتی +DatasetToExport=مجموعه داده برای صادرات +DatasetToImport=واردات فایل را به مجموعه داده +NoDiscardedFields=بدون زمینه در فایل منبع دور انداخته شده +Dataset=مجموعه داده +ChooseFieldsOrdersAndTitle=رشته های سفارش ... +FieldsOrder=منظور زمینه +FieldsTitle=عنوان زمینه +FieldOrder=منظور درست است +FieldTitle=عنوان درست +ChooseExportFormat=فرمت صادرات را انتخاب کنید +NowClickToGenerateToBuildExportFile=در حال حاضر، فرمت فایل را انتخاب کنید در جعبه دسته کوچک موسیقی جاز و کلیک بر روی "ایجاد" برای ساخت فایل صادرات ... +AvailableFormats=فرمت های موجود +LibraryShort=کتابخانه +LibraryUsed=کتابخانه استفاده می شود +LibraryVersion=نسخه +Step=گام +FormatedImport=دستیار واردات +FormatedImportDesc1=این منطقه اجازه می دهد تا برای وارد کردن داده های شخصی، با استفاده از یک دستیار برای کمک به شما در فرایند بدون دانش فنی. +FormatedImportDesc2=گام اول برای انتخاب یک شاه از اطلاعات شما می خواهید به بار، پس از آن پرونده برای بارگذاری و پس از آن را انتخاب کنید که زمینه شما می خواهید برای بارگذاری. +FormatedExport=معاون صادرات +FormatedExportDesc1=این منطقه اجازه می دهد تا به صادرات داده های شخصی، با استفاده از یک دستیار برای کمک به شما در فرایند بدون دانش فنی. +FormatedExportDesc2=گام اول برای انتخاب یک مجموعه داده از پیش تعریف شده، پس از آن را انتخاب کنید که زمینه شما می خواهید در فایل نتیجه خود را، و آن منظور. +FormatedExportDesc3=هنگامی که داده به صادرات انتخاب می شوند، شما می توانید فرمت فایل خروجی شما می خواهید به صادرات داده خود را به کار گیرید. +Sheet=ورق +NoImportableData=بدون اطلاعات واردات (بدون ماژول با تعاریف به اجازه واردات داده ها) +FileSuccessfullyBuilt=فایل صادرات تولید +SQLUsedForExport=درخواست SQL مورد استفاده برای ایجاد فایل صادرات +LineId=کد خط +LineDescription=شرح خط +LineUnitPrice=قیمت واحد خط +LineVATRate=نرخ مالیات بر ارزش افزوده از خط +LineQty=تعداد خط +LineTotalHT=خالص میزان مالیات بر خط +LineTotalTTC=مبلغ با مالیات برای خط +LineTotalVAT=میزان مالیات بر ارزش افزوده برای خط +TypeOfLineServiceOrProduct=نوع خط (0 = محصول، 1 = خدمات) +FileWithDataToImport=فایل با داده ها به واردات +FileToImport=منبع فایل را به واردات +FileMustHaveOneOfFollowingFormat=فایل به واردات باید یکی از فرمت های زیر را داشته +DownloadEmptyExample=دانلود نمونه ای از فایل منبع خالی +ChooseFormatOfFileToImport=فرمت فایل را انتخاب کنید به عنوان فرمت فایل های واردات استفاده توسط کلیک کردن بر روی picto%s به آن را انتخاب کنید ... +ChooseFileToImport=آپلود فایل کلیک کنید و سپس در picto%s را برای انتخاب فایل به عنوان منبع فایل واردات ... +SourceFileFormat=فرمت فایل منبع +FieldsInSourceFile=زمینه در فایل منبع +FieldsInTargetDatabase=رشته های مورد نظر در پایگاه داده Dolibarr (با حروف درشت = اجباری) +Field=رشته +NoFields=بدون زمینه +MoveField=درست است حرکت شماره ستون از%s ExampleOfImportFile=Example_of_import_file -SaveImportProfile=حفظ هذا الملف الاستيراد -ErrorImportDuplicateProfil=فشلت في انقاذ هذا الملف استيراد بهذا الاسم. تشكيل جانبي موجود مسبقا بهذا الاسم. -ImportSummary=استيراد الإعداد ملخص -TablesTarget=استهدفت الجداول -FieldsTarget=استهداف حقول -TableTarget=استهدفت الجدول -FieldTarget=استهدف حقل -FieldSource=مصدر الحقل -DoNotImportFirstLine=لا استيراد السطر الأول من الملف المصدر -NbOfSourceLines=عدد الأسطر في الملف المصدر -NowClickToTestTheImport=الاختيار المعلمات استيراد عرفتها. وإذا كانت صحيحة ، انقر على %s "زر" لإطلاق محاكاة لعملية الاستيراد (يمكن تغيير أية بيانات في قاعدة البيانات وسوف ، انها مجرد محاكاة لحظة)... -RunSimulateImportFile=بدء استيراد محاكاة -FieldNeedSource=هذا يشعر في قاعدة البيانات تتطلب البيانات من الملف المصدر -SomeMandatoryFieldHaveNoSource=بعض الحقول إلزامية ليس لديها مصدر من ملف البيانات -InformationOnSourceFile=معلومات عن الملف المصدر -InformationOnTargetTables=معلومات عن الهدف الحقول -SelectAtLeastOneField=التبديل حقل واحد على الأقل مصدر في عمود من الحقول لتصدير -SelectFormat=اختيار تنسيق الملف هذا الاستيراد -RunImportFile=بدء استيراد الملف -NowClickToRunTheImport=تحقق نتيجة لمحاكاة الاستيراد. إذا كان كل شيء على ما يرام ، بدء استيراد نهائي. -DataLoadedWithId=يمكن تحميل جميع البيانات ومع معرف استيراد التالية : %s -ErrorMissingMandatoryValue=البيانات الإلزامية فارغ في الملف المصدر ل%s الميدان. -TooMuchErrors=لا يزال هناك %s خطوط مصدر آخر مع وجود أخطاء ولكن محدودة الانتاج و. -TooMuchWarnings=لا يزال هناك %s خطوط مصدر آخر مع تحذيرات ولكن محدودة الانتاج و. -EmptyLine=سيتم تجاهل سطر فارغ () -CorrectErrorBeforeRunningImport=أولا يجب أن تقوم بتصحيح كافة الأخطاء قبل تشغيل استيراد نهائي. -# FileWasImported=File was imported with number %s. -YouCanUseImportIdToFindRecord=يمكنك العثور على كافة السجلات المستوردة في قاعدة البيانات الخاصة بك عن طريق تصفية على import_key الحقل = '%s'. -NbOfLinesOK=عدد الأسطر مع عدم وجود أخطاء وتحذيرات لا : %s. -NbOfLinesImported=عدد خطوط المستوردة بنجاح : %s. -DataComeFromNoWhere=قيمة لادخال تأتي من أي مكان في الملف المصدر. -DataComeFromFileFieldNb=قيمة لادخال يأتي من %s عدد الحقول في الملف المصدر. -DataComeFromIdFoundFromRef=من حقل رقم %s ملف مصدر سوف تستخدم القيمة التي تأتي للعثور على معرف الكائن الأصل لاستخدام (هكذا %s objet الذي يحتوي على المرجع من الملف المصدر يجب أن يوجد في Dolibarr). -# DataComeFromIdFoundFromCodeId=Code that comes from field number %s of source file will be used to find id of parent object to use (So the code from source file must exists into dictionary %s). Note that if you know id, you can also use it into source file instead of code. Import should work in both cases. -DataIsInsertedInto=البيانات سوف تأتي من الملف المصدر يتم إدراجها في الحقل التالي : -DataIDSourceIsInsertedInto=العثور على كائن معرف الأصل باستخدام البيانات الموجودة في الملف المصدر ، سيتم إدراج في الحقل التالي : -# DataCodeIDSourceIsInsertedInto=The id of parent line found from code, will be inserted into following field: -SourceRequired=بيانات قيمة إلزامية -SourceExample=مثال على قيمة البيانات ممكن -# ExampleAnyRefFoundIntoElement=Any ref found for element %s -# ExampleAnyCodeOrIdFoundIntoDictionary=Any code (or id) found into dictionary %s -CSVFormatDesc=فاصلة فصل ملف القيمة تنسيق (csv.).
    هذا هو شكل ملف نصي ، حيث يتم فصل الحقول بواسطة فاصل [%s]. إذا تم العثور على فاصل داخل محتوى الحقل ، يتم تقريب الجولة الميدانية التي قام بها حرف] %s [. الهروب حرف وحرف الهروب جولة هو [%s]. -# Excel95FormatDesc=Excel file format (.xls)
    This is native Excel 95 format (BIFF5). -# Excel2007FormatDesc=Excel file format (.xlsx)
    This is native Excel 2007 format (SpreadsheetML). -# TsvFormatDesc=Tab Separated Value file format (.tsv)
    This is a text file format where fields are separated by a tabulator [tab]. -# ExportFieldAutomaticallyAdded=Field %s was automatically added. It will avoid you to have similar lines to be treated as duplicate records (with this field added, all lines will own their own id and will differ). -# CsvOptions=Csv Options -# Separator=Separator -# Enclosure=Enclosure -# SuppliersProducts=Suppliers Products -BankCode=رمز المصرف -DeskCode=مدونة مكتبية -BankAccountNumber=رقم الحساب -BankAccountNumberKey=مفتاح -# SpecialCode=Special code -# ExportStringFilter=%% allows replacing one or more characters in the text -# ExportDateFilter='YYYY' 'YYYYMM' 'YYYYMMDD': filters by one year/month/day
    'YYYY+YYYY' 'YYYYMM+YYYYMM' 'YYYYMMDD+YYYYMMDD': filters over a range of years/months/days
    '>YYYY' '>YYYYMM' '>YYYYMMDD': filters on the following years/months/days
    '<YYYY' '<YYYYMM' '<YYYYMMDD': filters on the previous years/months/days -# ExportNumericFilter='NNNNN' filters by one value
    'NNNNN+NNNNN' filters over a range of values
    '>NNNNN' filters by lower values
    '>NNNNN' filters by higher values +SaveImportProfile=ذخیره سازی این مشخصات واردات +ErrorImportDuplicateProfil=برای صرفه جویی در این پروفایل واردات با این نام انجام نشد. مشخصات موجود در حال حاضر با این نام وجود دارد. +ImportSummary=خلاصه راه اندازی واردات +TablesTarget=جداول هدفمند +FieldsTarget=رشته های هدفمند +TableTarget=جدول هدفمند +FieldTarget=درست هدفمند +FieldSource=درست است منبع +DoNotImportFirstLine=آیا خط اول از فایل منبع وارد نشده است +NbOfSourceLines=تعداد خطوط در فایل منبع +NowClickToTestTheImport=پارامترهای واردات شما تعریف شده اند را بررسی کنید. اگر آنها درست هستند، بر روی دکمه کلیک کنید "%s" را برای راه اندازی یک شبیه سازی از روند واردات (هیچ داده ای را در پایگاه داده خود را تغییر، آن را تنها یک شبیه سازی برای لحظه ای) ... +RunSimulateImportFile=راه اندازی شبیه سازی واردات +FieldNeedSource=This field requires data from the source file +SomeMandatoryFieldHaveNoSource=برخی از موارد الزامی هیچ منبع از فایل داده +InformationOnSourceFile=اطلاعات در فایل منبع +InformationOnTargetTables=اطلاعات در زمینه های مورد نظر +SelectAtLeastOneField=تغییر حداقل یکی از فیلد منبع در ستون از زمینه های به صادرات +SelectFormat=را انتخاب کنید این فرمت فایل واردات +RunImportFile=راه اندازی فایل واردات +NowClickToRunTheImport=نتیجه شبیه سازی واردات را بررسی کنید. اگر همه چیز خوب است، راه اندازی واردات قطعی. +DataLoadedWithId=همه داده خواهد شد با شناسه (شماره) واردات زیر آپلود شده:%s را +ErrorMissingMandatoryValue=اطلاعات اجباری خالی در فایل منبع را برای فیلد%s است. +TooMuchErrors=هنوز هم وجود دارد از%s خط منبع دیگر با اشتباهات اما خروجی محدود بوده است. +TooMuchWarnings=هنوز هم وجود دارد از%s خط منبع دیگر با هشدارهای اما خروجی محدود بوده است. +EmptyLine=خط خالی (دور ریخته خواهد شد) +CorrectErrorBeforeRunningImport=ابتدا باید، درست قبل از اجرای واردات قطعی تمام خطا است. +FileWasImported=فایل را با تعداد%s را وارد شد. +YouCanUseImportIdToFindRecord=شما می توانید تمام پرونده های وارد شده در پایگاه داده خود را از طریق فیلتر کردن در import_key درست پیدا = '%s' را. +NbOfLinesOK=تعداد خطوط بدون خطا و بدون اخطار:٪ است. +NbOfLinesImported=شماره خطوط با موفقیت وارد کنید:%s. +DataComeFromNoWhere=ارزش برای وارد می آید از هیچ جا در فایل منبع. +DataComeFromFileFieldNb=ارزش برای وارد می آید از میدان تعداد%s را در فایل منبع. +DataComeFromIdFoundFromRef=ارزش است که از میدان تعداد٪ از فایل منبع می آید استفاده می شود برای پیدا کردن شناسه (شماره) از جسم پدر و مادر به استفاده از (بنابراین ابژهی کوچک a٪ که دارای کد عکس. از فایل منبع باید به Dolibarr وجود دارد). +DataComeFromIdFoundFromCodeId=کد است که از تعدادی فیلد%s از فایل منبع می آید استفاده می شود برای پیدا کردن شناسه (شماره) از جسم پدر و مادر به استفاده از (بنابراین کد آن را از فایل منبع باید وجود داشته باشد به فرهنگ لغت٪ بازدید کنندگان). توجه داشته باشید که اگر شما می دانید شناسه، شما همچنین می توانید آن را در فایل منبع به جای کد استفاده کنید. واردات باید در هر دو مورد کار می کنند. +DataIsInsertedInto=داده که از فایل منبع خواهد شد را به زمینه های زیر قرار داده شده: +DataIDSourceIsInsertedInto=شناسه شی والدین مشاهده با استفاده از داده ها را در فایل منبع، خواهد شد را به زمینه های زیر قرار داده شده: +DataCodeIDSourceIsInsertedInto=شناسه (شماره) خط پدر و مادر پیدا از کد، خواهد شد را در قسمت زیر قرار داده شده: +SourceRequired=ارزش داده ها اجباری است +SourceExample=نمونه ای از ارزش اطلاعات ممکن +ExampleAnyRefFoundIntoElement=هر کد عکس برای عنصر٪ یافت +ExampleAnyCodeOrIdFoundIntoDictionary=هر گونه کد (یا شناسه) یافت به فرهنگ لغت از%s +CSVFormatDesc=کاما جدا فرمت فایل ارزش (CSV).
    این فرمت یک فایل متنی که در آن زمینه های جداکننده [%s] را از هم جدا است. اگر جدا در داخل محتوای حوزه به دست آمد، درست است که شخصیت دور [%s] را گرد. شخصیت فرار برای فرار از شخصیت دور [%s] را است. +Excel95FormatDesc=فرمت فایل اکسل (. XLS)
    این مادری اکسل 95 فرمت (BIFF5) است. +Excel2007FormatDesc=فرمت فایل اکسل (. XLSX)
    این مادری اکسل 2007 فرمت (SpreadsheetML) است. +TsvFormatDesc=فرمت تب فایل مقادیر جدا شده (. TSV)
    این فرمت یک فایل متنی که در آن زمینه توسط یک جدول نویس [تب] از هم جدا شده است. +ExportFieldAutomaticallyAdded=٪ درست ها به طور خودکار اضافه شده است. اجتناب از آن شما را به خطوط مشابه به عنوان رکورد تکراری درمان می شود (با این رشته اضافه شده است، تمام خطوط شناسه (شماره) آن خودشان و متفاوت خواهد بود). +CsvOptions=گزینه CSV +Separator=تفکیک کننده +Enclosure=محوطه +SuppliersProducts=تولید کنندگان محصولات +BankCode=کد بانک +DeskCode=کد میز +BankAccountNumber=شماره حساب +BankAccountNumberKey=کلید +SpecialCode=کد ویژه +ExportStringFilter=٪٪ اجازه می دهد تا به جای یک یا چند کاراکتر در متن +ExportDateFilter='YYYY' 'YYYYMM' 'YYYYMMDD: فیلتر های یک سال / ماه / روز
    'YYYY + YYYY' 'YYYYMM + YYYYMM' 'YYYYMMDD + YYYYMMDD: فیلتر بیش از یک طیف وسیعی از سال / ماه / روز
    '> YYYY' '> YYYYMM' '> YYYYMMDD: فیلتر در زیر سال / ماه / روز
    ' فیلتر 'NNNNN + NNNNN' بیش از یک طیف وسیعی از مقادیر
    '> NNNNN' فیلتر شده توسط مقادیر پایین تر
    '> NNNNN' فیلتر شده توسط ارزش بالاتر ## filters -# SelectFilterFields=If you want to filter on some values, just input values here. -# FilterableFields=Champs Filtrables -# FilteredFields=Filtered fields -# FilteredFieldsValues=Value for filter +SelectFilterFields=اگر می خواهید برای فیلتر کردن در برخی از ارزش ها، فقط مقادیر ورودی در اینجا. +FilterableFields=شانزه Filtrables +FilteredFields=رشته های فیلتر شده +FilteredFieldsValues=ارزش فیلتر diff --git a/htdocs/langs/fa_IR/externalsite.lang b/htdocs/langs/fa_IR/externalsite.lang index b915c37a5ab..d2359ac5bb7 100644 --- a/htdocs/langs/fa_IR/externalsite.lang +++ b/htdocs/langs/fa_IR/externalsite.lang @@ -1,4 +1,4 @@ # Dolibarr language file - Source file is en_US - externalsite -# ExternalSiteSetup=Setup link to external website -# ExternalSiteURL=External Site URL -# ExternalSiteModuleNotComplete=Module ExternalSite was not configured properly. +ExternalSiteSetup=راه اندازی لينک به وب سايت های خارجی +ExternalSiteURL=URL سايت خارجی +ExternalSiteModuleNotComplete=ماژول سايت خارجی به درستی پيکربندی نشده است. diff --git a/htdocs/langs/fa_IR/ftp.lang b/htdocs/langs/fa_IR/ftp.lang index 18b27d19ff8..9f3ccb127bf 100644 --- a/htdocs/langs/fa_IR/ftp.lang +++ b/htdocs/langs/fa_IR/ftp.lang @@ -1,12 +1,12 @@ # Dolibarr language file - Source file is en_US - ftp -FTPClientSetup=بروتوكول نقل الملفات العملاء الإعداد وحدة -NewFTPClient=جديد الإعداد بروتوكول نقل الملفات الصدد -FTPArea=بروتوكول نقل الملفات المنطقة -FTPAreaDesc=هذه الشاشة تظهر لك المحتوى من وجهة نظر خادم بروتوكول نقل الملفات -SetupOfFTPClientModuleNotComplete=إعداد وحدة من بروتوكول نقل الملفات العملاء ويبدو أن عدم اكتمال -FTPFeatureNotSupportedByYourPHP=الخاص بي لا يدعم وظائف بروتوكول نقل الملفات -FailedToConnectToFTPServer=فشل الاتصال بخادم بروتوكول نقل الملفات (%s الخادم ، %s منفذ) -FailedToConnectToFTPServerWithCredentials=فشل في تسجيل الدخول إلى خادم بروتوكول نقل الملفات مع تعريف الدخول / كلمة المرور -FTPFailedToRemoveFile=فشل لإزالة %s الملف. -FTPFailedToRemoveDir=فشل لإزالة %s الدليل (راجع الأذونات وهذا الدليل فارغ). -# FTPPassiveMode=Passive mode +FTPClientSetup=راه اندازی ماژول FTP کارفرما +NewFTPClient=جدید راه اندازی اتصال به FTP +FTPArea=منطقه FTP +FTPAreaDesc=این صفحه نمایش نشان می دهد محتوای شما را از مشخصات سرور FTP +SetupOfFTPClientModuleNotComplete=راه اندازی ماژول سرویس گیرنده FTP به نظر می رسد کامل نیست +FTPFeatureNotSupportedByYourPHP=PHP شما توابع FTP پشتیبانی نمی کند +FailedToConnectToFTPServer=برای اتصال به سرور FTP با شکست مواجه شد (%s سرور، پورت٪ بازدید کنندگان) +FailedToConnectToFTPServerWithCredentials=برای ورود به سایت به سرور FTP با ورود به سیستم / رمز عبور تعریف شده شکست خورده +FTPFailedToRemoveFile=حذف فایل%s شکست خورد. +FTPFailedToRemoveDir=برای حذف دایرکتوری%s شکست خورد (مجوز ورود و پوشه خالی است). +FTPPassiveMode=حالت منفعل diff --git a/htdocs/langs/fa_IR/help.lang b/htdocs/langs/fa_IR/help.lang index 95fd4df9a12..8e286b72e43 100644 --- a/htdocs/langs/fa_IR/help.lang +++ b/htdocs/langs/fa_IR/help.lang @@ -1,28 +1,28 @@ # Dolibarr language file - Source file is en_US - help -CommunitySupport=منتدى / الدعم ويكي -EMailSupport=رسائل البريد الإلكتروني لدعم -RemoteControlSupport=الانترنت في الوقت الحقيقي / النائية الدعم -OtherSupport=الدعم الأخرى -ToSeeListOfAvailableRessources=للاتصال / انظر الموارد المتاحة : -ClickHere=اضغط هنا -HelpCenter=مركز المساعدة -DolibarrHelpCenter=Dolibarr مركز المساعدة والدعم -ToGoBackToDolibarr=Otherwise, click هنا لاستخدام Dolibarr -TypeOfSupport=مصدر الدعم -TypeSupportCommunauty=المجتمع (مجاني) -TypeSupportCommercial=التجارية +CommunitySupport=انجمن / پشتیبانی از ویکی +EMailSupport=پشتیبانی ایمیل +RemoteControlSupport=زمان واقعی آنلاین / پشتیبانی از راه دور +OtherSupport=پشتیبانی دیگر +ToSeeListOfAvailableRessources=برای تماس / نگاه کنید به منابع در دسترس: +ClickHere=اینجا را کلیک کنید +HelpCenter=مرکز راهنما +DolibarrHelpCenter=کمک Dolibarr و پشتیبانی مرکز +ToGoBackToDolibarr=در غیر این صورت، با کلیک در اینجا به استفاده از Dolibarr +TypeOfSupport=منبع پشتیبانی +TypeSupportCommunauty=ارتباطات (رایگان) +TypeSupportCommercial=تجاری TypeOfHelp=نوع -NeedHelpCenter=بحاجة إلى مساعدة أو دعم؟ -Efficiency=الكفاءة -TypeHelpOnly=يساعد فقط -TypeHelpDev=+ المساعدة على التنمية -TypeHelpDevForm=مساعدة التنمية + + تشكيل -ToGetHelpGoOnSparkAngels1=ويمكن أن توفر بعض الشركات سريعة (ما الفورية) ، وزيادة كفاءة شبكة الإنترنت عن طريق دعم السيطرة على جهاز الكمبيوتر الخاص بك. مساعدات من هذا القبيل يمكن الاطلاع على الموقع الإلكتروني ل ٪ : -ToGetHelpGoOnSparkAngels3=كما يمكنك الذهاب الى قائمة المدربين كل ما هو متاح لDolibarr ، لهذا اضغط على زر -ToGetHelpGoOnSparkAngels2=في بعض الأحيان ، لا يوجد أي شركة المتاحة في الوقت الراهن تقوم بإجراء البحث ، لذلك اعتقد تغيير فلتر للبحث عن "توافر جميع". ستتمكن من ارسال المزيد من الطلبات. -BackToHelpCenter=Otherwise, click here to go الى الصفحة الرئيسية لمركز المساعدة. -LinkToGoldMember=تستطيع الاتصال به من قبل المدرب مختار مسبقا لغتك Dolibarr (٪) عن طريق النقر فوق القطعة له (والحد الاعلى لسعر يتم تحديثها تلقائيا) : -PossibleLanguages=وأيد لغات -MakeADonation=مساعدة Dolibarr المشروع ، تقديم تبرع -# SubscribeToFoundation=Help Dolibarr project, subscribe to the foundation -# SeeOfficalSupport=For official Dolibarr support in your language:
    %s +NeedHelpCenter=نیاز به کمک یا حمایت؟ +Efficiency=بهره وری +TypeHelpOnly=راهنما تنها +TypeHelpDev=راهنما + توسعه +TypeHelpDevForm=سازند راهنما + توسعه + +ToGetHelpGoOnSparkAngels1=برخی از شرکت ها می توانند پشتیبانی آنلاین سریع (گاهی اوقات فوری) و کارآمد تر با در نظر گرفتن کنترل کامپیوتر شما را فراهم کنند. این کمک کننده ها را می توان در٪ بازدید کنندگان وب سایت یافت: +ToGetHelpGoOnSparkAngels3=شما همچنین می توانید به لیستی از تمام مربیان برای Dolibarr بروید، برای این کار با کلیک بر روی دکمه +ToGetHelpGoOnSparkAngels2=گاهی اوقات، هیچ شرکت های موجود در حال حاضر شما می توانید جستجوی خود را وجود دارد، بنابراین فکر می کنم برای تغییر فیلتر برای "همه در دسترس بودن" است. شما قادر به ارسال درخواست بیشتر خواهد شد. +BackToHelpCenter=در غیر این صورت، در اینجا کلیک کنید برای رفتن به عقب برای کمک به صفحه اصلی مرکز . +LinkToGoldMember=شما می توانید یکی از مربی های Dolibarr برای زبان خود را (از%s) با کلیک کردن ویجت خود (وضعیت و حداکثر قیمت ها به طور خودکار به روز رسانی) از پیش انتخاب شده تماس بگیرید: +PossibleLanguages=زبانهای پشتیبانی شده +MakeADonation=کمک به پروژه Dolibarr، کمک مالی +SubscribeToFoundation=کمک به پروژه Dolibarr، مشترک به پایه و اساس +SeeOfficalSupport=برای حمایت Dolibarr رسمی در زبان شما:
    از%s diff --git a/htdocs/langs/fa_IR/holiday.lang b/htdocs/langs/fa_IR/holiday.lang index 06be0a89799..29606821a20 100644 --- a/htdocs/langs/fa_IR/holiday.lang +++ b/htdocs/langs/fa_IR/holiday.lang @@ -1,150 +1,149 @@ # Dolibarr language file - Source file is en_US - holiday HRM=HRM -Holidays=Holidays -CPTitreMenu=Holidays -MenuReportMonth=Monthly statement -MenuAddCP=Apply for holidays -NotActiveModCP=You must enable the module holidays to view this page. -NotConfigModCP=You must configure the module holidays to view this page. To do this, click here . -NoCPforUser=You don't have a demand for holidays. -AddCP=Apply for holidays -CPErrorSQL=An SQL error occurred: -Employe=Employee -DateDebCP=تاريخ البدء -DateFinCP=نهاية التاريخ -DateCreateCP=تاريخ الإنشاء -DraftCP=مسودة -ToReviewCP=Awaiting approval -ApprovedCP=وافق -CancelCP=ألغيت -RefuseCP=رفض +Holidays=تعطیلات +CPTitreMenu=تعطیلات +MenuReportMonth=بیانیه ماهانه +MenuAddCP=درخواست برای تعطیلات +NotActiveModCP=شما باید تعطیلات ماژول را قادر می سازد به این صفحه. +NotConfigModCP=شما باید تعطیلات ماژول را پیکربندی کنید به این صفحه. برای این کار، اینجا را کلیک کنید . +NoCPforUser=شما یک تقاضا برای تعطیلات ندارد. +AddCP=درخواست برای تعطیلات +Employe=کارمند +DateDebCP=تاریخ شروع +DateFinCP=تاریخ پایان +DateCreateCP=تاریخ ایجاد +DraftCP=پیش نویس +ToReviewCP=در انتظار تایید +ApprovedCP=تایید شده +CancelCP=لغو شد +RefuseCP=رد ValidatorCP=Approbator -ListeCP=List of holidays -ReviewedByCP=Will be reviewed by -DescCP=وصف -SendRequestCP=Creating demand for holidays -DelayToRequestCP=Applications for holidays must be made at least %s day(s) before them. -MenuConfCP=Edit balance of holidays -UpdateAllCP=Update the holidays -SoldeCPUser=Holidays balance is %s days. -ErrorEndDateCP=You must select an end date greater than the start date. -ErrorSQLCreateCP=An SQL error occurred during the creation: -ErrorIDFicheCP=An error has occurred, the request for holidays does not exist. -ReturnCP=Return to previous page -ErrorUserViewCP=You are not authorized to read this request for holidays. -InfosCP=Information of the demand of holidays -InfosWorkflowCP=Information Workflow -RequestByCP=Requested by -TitreRequestCP=Sheet of holidays -NbUseDaysCP=Number of days of holidays consumed +ListeCP=فهرست از تعطیلات +ReviewedByCP=خواهد شد بررسی +DescCP=توصیف +SendRequestCP=ایجاد تقاضا برای تعطیلات +DelayToRequestCP=برنامه های کاربردی برای تعطیلات باید حداقل%s را روز قبل از آنها ساخته شده است. +MenuConfCP=ویرایش تعادل از تعطیلات +UpdateAllCP=به روز رسانی تعطیلات +SoldeCPUser=تعادل تعطیلات%s روز است. +ErrorEndDateCP=شما باید تاریخ پایان بیشتر از تاریخ شروع انتخاب کنید. +ErrorSQLCreateCP=خطای SQL در ایجاد رخ داده است: +ErrorIDFicheCP=یک خطا رخ داده است، درخواست برای تعطیلات وجود ندارد. +ReturnCP=بازگشت به صفحه قبل +ErrorUserViewCP=شما مجاز به خواندن این درخواست برای تعطیلات. +InfosCP=اطلاعات تقاضا از تعطیلات +InfosWorkflowCP=گردش کار اطلاعات +RequestByCP=درخواست شده توسط +TitreRequestCP=ورق از تعطیلات +NbUseDaysCP=تعداد روز از تعطیلات مصرف EditCP=ویرایش -DeleteCP=حذف -ActionValidCP=تایید کردن -ActionRefuseCP=Refuse -ActionCancelCP=لغو -StatutCP=حالة -SendToValidationCP=Send to validation -TitleDeleteCP=Delete the request of holidays -ConfirmDeleteCP=Confirm the deletion of this request for holidays? -ErrorCantDeleteCP=Error you don't have the right to delete this holiday request. -CantCreateCP=You don't have the right to apply for holidays. -InvalidValidatorCP=You must choose an approbator to your holiday request. -UpdateButtonCP=به روز کردن -CantUpdate=You cannot update this request of holidays. -NoDateDebut=You must select a start date. -NoDateFin=You must select an end date. -ErrorDureeCP=Your request for holidays does not contain working day. -TitleValidCP=Approve the request holidays -ConfirmValidCP=Are you sure you want to approve the holiday request? -DateValidCP=Date approved -TitleToValidCP=Send request holidays -ConfirmToValidCP=Are you sure you want to send the request of holidays? -TitleRefuseCP=Refuse the request holidays -ConfirmRefuseCP=Are you sure you want to refuse the request of holidays? -NoMotifRefuseCP=You must choose a reason for refusing the request. -TitleCancelCP=Cancel the request holidays -ConfirmCancelCP=Are you sure you want to cancel the request of holidays? -DetailRefusCP=Reason for refusal -DateRefusCP=Date of refusal -DateCancelCP=Date of cancellation -DefineEventUserCP=Assign an exceptional leave for a user -addEventToUserCP=Assign leave -MotifCP=سبب -UserCP=مستخدم -ErrorAddEventToUserCP=An error occurred while adding the exceptional leave. -AddEventToUserOkCP=The addition of the exceptional leave has been completed. -MenuLogCP=View logs of holidays -LogCP=Log of updates of holidays -ActionByCP=Performed by -UserUpdateCP=For the user -PrevSoldeCP=Previous Balance -NewSoldeCP=New Balance -alreadyCPexist=A request for holidays has already been done on this period. -UserName=اسم -Employee=Employee -FirstDayOfHoliday=First day of holiday -LastDayOfHoliday=Last day of holiday -HolidaysMonthlyUpdate=Monthly update -ManualUpdate=Manual update -HolidaysCancelation=Holidays cancelation +DeleteCP=حذف کردن +ActionValidCP=معتبر ساختن +ActionRefuseCP=رد کردن +ActionCancelCP=لغو کردن +StatutCP=وضعیت +SendToValidationCP=ارسال به اعتبار سنجی +TitleDeleteCP=حذف درخواست از تعطیلات +ConfirmDeleteCP=تایید حذف این درخواست برای تعطیلات؟ +ErrorCantDeleteCP=خطا شما حق این درخواست تعطیلی را حذف کنید ندارد. +CantCreateCP=شما این حق را برای تعطیلات اعمال می شود ندارد. +InvalidValidatorCP=شما باید approbator به درخواست تعطیلات خود را انتخاب کنید. +UpdateButtonCP=به روز رسانی +CantUpdate=شما می توانید این درخواست از تعطیلات به روز رسانی نیست. +NoDateDebut=شما باید یک تاریخ شروع انتخاب کنید. +NoDateFin=شما باید تاریخ پایان را انتخاب کنید. +ErrorDureeCP=درخواست شما برای تعطیلات حاوی روز کار نمی کند. +TitleValidCP=تصویب تعطیلات درخواست +ConfirmValidCP=آیا مطمئن هستید که می خواهید برای تایید درخواست تعطیلات؟ +DateValidCP=تاریخ تصویب +TitleToValidCP=ارسال تعطیلات درخواست +ConfirmToValidCP=آیا مطمئن هستید که می خواهید برای ارسال درخواست از تعطیلات؟ +TitleRefuseCP=امتناع تعطیلات درخواست +ConfirmRefuseCP=آیا مطمئن هستید که می خواهید به رد درخواست از تعطیلات؟ +NoMotifRefuseCP=شما باید دلیلی برای امتناع از درخواست را انتخاب کنید. +TitleCancelCP=لغو تعطیلات درخواست +ConfirmCancelCP=آیا مطمئن هستید که می خواهید برای صرفنظر کردن از درخواست از تعطیلات؟ +DetailRefusCP=دلیل امتناع +DateRefusCP=تاریخ امتناع +DateCancelCP=عضویت لغو +DefineEventUserCP=اختصاص مرخصی استثنایی برای کاربر +addEventToUserCP=اختصاص مرخصی +MotifCP=دلیل +UserCP=کاربر +ErrorAddEventToUserCP=در حالی که با اضافه کردن مرخصی استثنایی خطایی رخ داد. +AddEventToUserOkCP=علاوه بر این از مرخصی استثنایی کامل شده است. +MenuLogCP=نمایش سیاهههای مربوط از تعطیلات +LogCP=ورود از به روز رسانی از تعطیلات +ActionByCP=انجام شده توسط +UserUpdateCP=برای کاربر +PrevSoldeCP=موجودی قبلی +NewSoldeCP=موجودی جدید +alreadyCPexist=درخواست برای تعطیلات در حال حاضر در این دوره انجام می شود. +UserName=نام +Employee=کارمند +FirstDayOfHoliday=اولین روز از تعطیلات +LastDayOfHoliday=آخرین روز از تعطیلات +HolidaysMonthlyUpdate=به روز رسانی ماهانه +ManualUpdate=دستی به روز رسانی +HolidaysCancelation=تعطیلات لغو ## Configuration du Module ## -ConfCP=Configuration of holidays module -DescOptionCP=Description of the option -ValueOptionCP=القيمة -GroupToValidateCP=Group with the ability to approve holidays -ConfirmConfigCP=Validate the configuration -LastUpdateCP=Last updated automatically of holidays -UpdateConfCPOK=Updated successfully. -ErrorUpdateConfCP=An error occurred during the update, please try again. -AddCPforUsers=Please add the balance of holidays of users by clicking here. -DelayForSubmitCP=Deadline to apply for holidays -AlertapprobatortorDelayCP=Prevent the approbator if the holiday request does not match the deadline -AlertValidatorDelayCP=Préevent the approbator if the holiday request exceed delay -AlertValidorSoldeCP=Prevent the approbator if the holiday request exceed the balance -nbUserCP=Number of users supported in the module holidays -nbHolidayDeductedCP=Number of holidays to be deducted per day of holiday taken -nbHolidayEveryMonthCP=Number of holidays added every month -Module27130Name= Management of holidays -Module27130Desc= Management of holidays -TitleOptionMainCP=Main settings of holidays -TitleOptionEventCP=Settings of holidays related to events -ValidEventCP=تایید کردن -UpdateEventCP=Update events -CreateEventCP=خلق -NameEventCP=Event name -OkCreateEventCP=The addition of the event went well. -ErrorCreateEventCP=Error creating the event. -UpdateEventOkCP=The update of the event went well. -ErrorUpdateEventCP=Error while updating the event. -DeleteEventCP=Delete Event -DeleteEventOkCP=The event has been deleted. -ErrorDeleteEventCP=Error while deleting the event. -TitleDeleteEventCP=Delete a exceptional leave -TitleCreateEventCP=Create a exceptional leave -TitleUpdateEventCP=Edit or delete a exceptional leave -DeleteEventOptionCP=حذف -UpdateEventOptionCP=به روز کردن -ErrorMailNotSend=An error occurred while sending email: -NoCPforMonth=No leave this month. -nbJours=Number days -TitleAdminCP=Configuration of Holidays +ConfCP=تنظیمات ماژول تعطیلات +DescOptionCP=شرح گزینه +ValueOptionCP=ارزش +GroupToValidateCP=گروه با توانایی به تصویب تعطیلات +ConfirmConfigCP=اعتبارسنجی پیکربندی +LastUpdateCP=تاریخ و زمان آخرین طور خودکار از تعطیلات به روز شده +UpdateConfCPOK=به روز رسانی با موفقیت. +ErrorUpdateConfCP=خطا در به روز رسانی رخ داد، لطفا دوباره سعی کنید. +AddCPforUsers=لطفا تعادل از تعطیلات از کاربران با استفاده از Add اینجا را کلیک کنید . +DelayForSubmitCP=آخرین مهلت برای تعطیلات اعمال می شود +AlertapprobatortorDelayCP=جلوگیری از approbator اگر درخواست تعطیلات می کند مهلت مطابقت ندارد +AlertValidatorDelayCP=Préevent approbator اگر درخواست تعطیلات تجاوز تاخیر +AlertValidorSoldeCP=جلوگیری از approbator اگر درخواست تعطیلات بیش از تعادل +nbUserCP=شماره کاربر پشتیبانی در تعطیلات ماژول +nbHolidayDeductedCP=تعداد تعطیلات به در روز از تعطیلات گرفته شده کسر می شود +nbHolidayEveryMonthCP=تعداد تعطیلات اضافه شده هر ماه +Module27130Name= مدیریت از تعطیلات +Module27130Desc= مدیریت از تعطیلات +TitleOptionMainCP=تنظیمات اصلی از تعطیلات +TitleOptionEventCP=تنظیمات از تعطیلات مربوط به حوادث +ValidEventCP=معتبر ساختن +UpdateEventCP=رویدادی به روز رسانی +CreateEventCP=ساختن +NameEventCP=نام رویداد +OkCreateEventCP=علاوه بر این از این رویداد خوب پیش رفت. +ErrorCreateEventCP=خطا در ایجاد رویداد. +UpdateEventOkCP=به روز رسانی از این رویداد خوب پیش رفت. +ErrorUpdateEventCP=خطا در به روز رسانی این رویداد. +DeleteEventCP=حذف رویداد +DeleteEventOkCP=این رویداد حذف شده است. +ErrorDeleteEventCP=خطا در هنگام حذف رویداد. +TitleDeleteEventCP=حذف یک مرخصی استثنایی +TitleCreateEventCP=ایجاد یک مرخصی استثنایی +TitleUpdateEventCP=میتوانید ویرایش و یا حذف یک مرخصی استثنایی +DeleteEventOptionCP=حذف کردن +UpdateEventOptionCP=به روز رسانی +ErrorMailNotSend=در حالی که ارسال ایمیل یک خطا رخ داده است: +NoCPforMonth=بدون این ماه را ترک کنند. +nbJours=شماره روز +TitleAdminCP=تنظیمات تعطیلات #Messages -Hello=Hello -HolidaysToValidate=Validate holidays -HolidaysToValidateBody=Below is a request for holidays to validate -HolidaysToValidateDelay=This request for holidays will take place within a period of less than %s days. -HolidaysToValidateAlertSolde=The user who made this request for holidays do not have enough available days. -HolidaysValidated=Validated holidays -HolidaysValidatedBody=Your request for holidays for %s to %s has been validated. -HolidaysRefused=Denied holidays -HolidaysRefusedBody=Your request for holidays for %s to %s has been denied for the following reason : -HolidaysCanceled=Canceled holidays -HolidaysCanceledBody=Your request for holidays for %s to %s has been canceled. -Permission20000=Read you own holidays -Permission20001=Create/modify your holidays -Permission20002=Create/modify holidays for everybody -Permission20003=Delete holidays requests -Permission20004=Setup users holidays -Permission20005=Review log of modified holidays -Permission20006=Read holidays monthly report +Hello=سلام +HolidaysToValidate=اعتبارسنجی تعطیلات +HolidaysToValidateBody=در زیر یک درخواست برای تعطیلات به اعتبار است +HolidaysToValidateDelay=این درخواست برای تعطیلات در طی یک دوره کمتر از%s روز است. +HolidaysToValidateAlertSolde=کاربری که این درخواست برای تعطیلات ساخته شده را روز به اندازه کافی در دسترس ندارد. +HolidaysValidated=تعطیلات اعتبار +HolidaysValidatedBody=درخواست شما برای تعطیلات را برای%s به%s دارای اعتبار بوده است. +HolidaysRefused=تعطیلات را رد کرد +HolidaysRefusedBody=درخواست شما برای تعطیلات را برای%s به%s شده است به این دلیل رد کرده است: +HolidaysCanceled=تعطیلات لغو شد +HolidaysCanceledBody=درخواست شما برای تعطیلات را برای%s به%s لغو شده است. +Permission20000=خوانده شده شما تعطیلات خود +Permission20001=ایجاد / اصلاح تعطیلات خود را +Permission20002=ایجاد / اصلاح تعطیلات برای همه +Permission20003=حذف تعطیلات درخواست +Permission20004=کاربران راه اندازی تعطیلات +Permission20005=ورود به سیستم فایل را نقد کنید از تعطیلات تغییر +Permission20006=دفعات بازدید: تعطیلات گزارش ماهانه diff --git a/htdocs/langs/fa_IR/install.lang b/htdocs/langs/fa_IR/install.lang index 155fbd71ed0..affb451ad1e 100644 --- a/htdocs/langs/fa_IR/install.lang +++ b/htdocs/langs/fa_IR/install.lang @@ -1,211 +1,211 @@ # Dolibarr language file - Source file is en_US - install -InstallEasy=فقط اتبع التعليمات خطوة بخطوة. -MiscellaneousChecks=التحقق من الشروط الأساسية -DolibarrWelcome=مرحبا بكم في Dolibarr +InstallEasy=فقط به گام دستورالعمل های گام به گام دنبال کنید. +MiscellaneousChecks=پیش نیازها بررسی +DolibarrWelcome=به Dolibarr خوش آمدید ConfFileExists=فایل پیکربندی %s موجود است -ConfFileDoesNotExists=ملفات ل ٪ لا وجود له! -ConfFileDoesNotExistsAndCouldNotBeCreated=ملفات ل ٪ لا وجود له وأنه لا يمكن خلق! -ConfFileCouldBeCreated=ملفات ل ٪ ويمكن أن تنشأ. -ConfFileIsNotWritable=ملفات ٪ ق ليست للكتابة. التحقق من الأذونات. أولا لتركيب وخدمة الويب الخاص بك يجب أن تمنح ليكون قادرا على الكتابة في هذا الملف خلال عملية التهيئة ( "chmod 666" على سبيل المثال ، مثل نظام التشغيل يونكس). -ConfFileIsWritable=ملفات للكتابة هو ٪ ق. -ConfFileReload=Reload all information from configuration file. -PHPSupportSessions=ويدعم هذا PHP الدورات. -PHPSupportPOSTGETOk=ويدعم هذا PHP المتغيرات والحصول على الوظائف. -PHPSupportPOSTGETKo=فمن الممكن PHP الإعداد الخاص بك لا يدعم الوظائف المتغيرات و / أو الحصول عليه. التحقق من اتصالك variables_order معلمة في php.ini. -PHPSupportGD=PHP هذا الدعم البيانية ش ج المهام. -PHPSupportUTF8=PHP دعم UTF8 هذه المهام. -PHPMemoryOK=الحد الأقصى الخاص بك PHP دورة الذاكرة ومن المقرر ٪ ق. وينبغي أن يكون هذا كافيا. -PHPMemoryTooLow=الحد الأقصى الخاص بك PHP دورة الذاكرة ومن المقرر ٪ ق بايت. لهذا ينبغي أن يكون منخفضا جدا. تغيير php.ini وضع memory_limit المعلم إلى ما لا يقل عن ٪ ق بايت. -Recheck=اضغط هنا لمزيد من الاختبار ذو معنى -ErrorPHPDoesNotSupportSessions=PHP تركيب الخاص بك لا يدعم الدورات. هذه الميزة هو مطلوب لجعل العمل Dolibarr. التحقق من اتصالك PHP الإعداد. -ErrorPHPDoesNotSupportGD=PHP تركيب الخاص بك لا يدعم وظيفة بيانية ش ج. لا الرسم البياني سيكون متاحا. -ErrorPHPDoesNotSupportUTF8=PHP تركيب الخاص بك لا يدعم UTF8 المهام. Dolibarr لا يمكن أن تعمل بشكل صحيح. لحل هذه قبل تثبيت Dolibarr. -ErrorDirDoesNotExists=دليل ٪ ق لا يوجد. -ErrorGoBackAndCorrectParameters=العودة إلى الوراء وتصحيح الخطأ البارامترات. -ErrorWrongValueForParameter=قد تكون لديكم مطبوعة خاطئة قيمة معلمة '٪ ق. -ErrorFailedToCreateDatabase=فشل إنشاء قاعدة بيانات '٪ ق. -ErrorFailedToConnectToDatabase=فشل في الاتصال بقاعدة البيانات '٪ ق. -ErrorDatabaseVersionTooLow=Database version (%s) too old. Version %s or higher is required. -ErrorPHPVersionTooLow=PHP نسخة قديمة جدا. النسخة ٪ ق هو مطلوب. -WarningPHPVersionTooLow=PHP version too old. Version %s or more is expected. This version should allow install but is not supported. -ErrorConnectedButDatabaseNotFound=خادم الصدد الى قاعدة البيانات ولكن النجاح في '٪ ق' لم يتم العثور عليه. -ErrorDatabaseAlreadyExists=قاعدة البيانات '٪ ق' موجود بالفعل. -IfDatabaseNotExistsGoBackAndUncheckCreate=إذا كان لا وجود قاعدة بيانات ، والتأكد من العودة الخيار "إنشاء قاعدة بيانات". -IfDatabaseExistsGoBackAndCheckCreate=إذا كانت قاعدة البيانات موجود بالفعل ، من العودة وإلغاء "إنشاء قاعدة بيانات" الخيار. -WarningBrowserTooOld=Too old version of browser. Upgrading your browser to a recent version of Firefox, Chrome or Opera is highly recommanded. -PHPVersion=PHP الإصدار -YouCanContinue=يمكنك الاستمرار... -PleaseBePatient=يرجى التحلي بالصبر... -License=الترخيص باستعمال -ConfigurationFile=ملفات -WebPagesDirectory=الدليل حيث يتم تخزين صفحات الويب -DocumentsDirectory=دليل لتخزين وتحميل وثائق ولدت -URLRoot=عنوان روت -ForceHttps=اتصالات آمنة قوة ([هتبس) -CheckToForceHttps=تحقق هذا الخيار لفرض اتصالات آمنة ([هتبس).
    وهذا يتطلب أن يتم تكوين خادم الويب مع شهادة خدمة تصميم المواقع. -DolibarrDatabase=قاعدة بيانات Dolibarr -DatabaseChoice=اختيار قاعدة البيانات -DatabaseType=قاعدة بيانات من نوع -DriverType=سائق نوع -Server=الخادم -ServerAddressDescription=الملكية الفكرية في اسم أو عنوان خادم قاعدة البيانات ، وعادة 'localhost' عندما يستضيف خادم قاعدة البيانات على نفس الخادم من خدمة الويب -ServerPortDescription=قاعدة بيانات الميناء. تبقي فارغة إذا كانت غير معروفة. -DatabaseServer=خادم قاعدة البيانات -DatabaseName=اسم قاعدة البيانات -DatabasePrefix=Database prefix table -Login=تسجيل الدخول -AdminLogin=ادخل لDolibarr مدير قاعدة البيانات. تبقي فارغة إذا لم يذكر اسمه في اتصال -Password=كلمة السر -PasswordAgain=أعد كتابة كلمة المرور مرة ثانية -AdminPassword=Dolibarr كلمة السر لمدير قاعدة البيانات. تبقي فارغة إذا لم يذكر اسمه في اتصال -CreateDatabase=إنشاء قاعدة بيانات -CreateUser=إنشاء مستخدم -DatabaseSuperUserAccess=قاعدة بيانات -- وصول مستخدم الكومبيوتر ذو الصلاحيات العليا -CheckToCreateDatabase=المربع إذا كان لا وجود قاعدة بيانات ، ويجب تهيئة.
    في هذه الحالة ، يجب عليك ملء ادخل كلمة السر لحساب المستعملين المتميزين في أسفل هذه الصفحة. -CheckToCreateUser=المربع اذا ادخل لا وجود له ، ويجب تهيئة.
    في هذه الحالة ، يجب عليك ملء ادخل كلمة السر لحساب المستعملين المتميزين في أسفل هذه الصفحة. -Experimental=(التجريبية وغير التشغيلية) -DatabaseRootLoginDescription=ادخل يسمح للمستخدم لإنشاء قواعد بيانات جديدة أو المستخدمين الجدد ، وإذا كانت غير مجدية وقاعدة البيانات وقاعدة البيانات ادخل موجود بالفعل (مثل عندما كنت استضافته استضافة ويب). -KeepEmptyIfNoPassword=ترك فارغا إذا لم المستخدم كلمة السر (تجنب هذا؟) -SaveConfigurationFile=إنقاذ القيم -ConfigurationSaving=إنقاذ ملفات -ServerConnection=اتصال الخادم -DatabaseConnection=قاعدة بيانات الصدد -DatabaseCreation=إنشاء قاعدة بيانات -UserCreation=إنشاء مستخدم -CreateDatabaseObjects=إنشاء قاعدة بيانات الأجسام -ReferenceDataLoading=تحميل البيانات المرجعية -TablesAndPrimaryKeysCreation=الجداول وإنشاء المفاتيح الأساسية -CreateTableAndPrimaryKey=إنشاء الجدول ق ٪ -CreateOtherKeysForTable=خلق الخارجية مفاتيح الأرقام القياسية والجدول ق ٪ -OtherKeysCreation=مفاتيح الخارجية وإنشاء الفهارس -FunctionsCreation=خلق وظائف -AdminAccountCreation=مدير ادخل خلق -PleaseTypePassword=الرجاء كتابة كلمة المرور ، وكلمات السر فارغة لا يسمح! -PleaseTypeALogin=اكتب من فضلك ادخل! -PasswordsMismatch=وتختلف كلمات السر ، يرجى المحاولة مرة أخرى! -SetupEnd=نهاية الإعداد -SystemIsInstalled=هذا التثبيت الكامل. -SystemIsUpgraded=وقد تم تطوير Dolibarr بنجاح. -YouNeedToPersonalizeSetup=عليك تكوين Dolibarr لتناسب احتياجاتك (ظهور مقالات...). لذلك ، يرجى اتباع الوصلة التالية : -AdminLoginCreatedSuccessfuly=مدير Dolibarr ادخل '٪ ق' خلق بنجاح. -GoToDolibarr=الذهاب إلى Dolibarr -GoToSetupArea=الذهاب إلى Dolibarr (مجال الإعداد) -MigrationNotFinished=نسخة من قاعدة البيانات الخاصة بك لا يصل تماما حتى الآن ، لذلك سيكون لديك لتشغيل عملية الترقية مرة أخرى. -GoToUpgradePage=الذهاب لتحديث الصفحة مرة أخرى -Examples=أمثلة -WithNoSlashAtTheEnd=بدون خفض "/" في نهاية -DirectoryRecommendation=وrecommanded به لاستخدام دليل خارج الدليل الخاص من صفحات موقعك. -LoginAlreadyExists=موجود بالفعل -DolibarrAdminLogin=ادخل Dolibarr مشرف -AdminLoginAlreadyExists=Dolibarr حساب مشرف '٪ ق' موجود بالفعل. -WarningRemoveInstallDir=تحذير ، لأسباب أمنية ، بعد تثبيت أو تحديث كاملة ، يجب إزالة تثبيت أو إعادة تسمية الدليل على install.lock من أجل تجنب استخدام الخبيثة. -ThisPHPDoesNotSupportTypeBase=PHP هذا النظام لا يدعم أي واجهة للحصول على قاعدة بيانات من نوع ق ٪ -FunctionNotAvailableInThisPHP=لا تتوفر على هذا PHP -MigrateScript=تهاجر سكريبت -ChoosedMigrateScript=اختار الهجرة سكريبت -DataMigration=بيانات الهجرة -DatabaseMigration=هيكل قاعدة بيانات الهجرة -ProcessMigrateScript=السيناريو تجهيز -ChooseYourSetupMode=اختر طريقة الإعداد وانقر على "ابدأ"... -FreshInstall=تركيب جديد -FreshInstallDesc=استخدام هذا الأسلوب إذا كان هذا هو أول تركيب. إذا لم يكن هذا الوضع لا يمكن إصلاح تثبيت سابقة غير مكتملة ، ولكن إذا كنت ترغب في تحديث الإصدار الخاص بك ، اختر "ترقية" واسطة. -Upgrade=ترقية -UpgradeDesc=استخدام هذه الطريقة إذا كنت قد حلت محل القديمة Dolibarr الملفات من الملفات مع إصدار أحدث. وهذا من شأنه رفع مستوى قاعدة البيانات والبيانات. -Start=يبدأ -InstallNotAllowed=الإعداد غير مسموح به conf.php الاذونات -NotAvailable=غير متاحة -YouMustCreateWithPermission=يجب إنشاء ملف ق ٪ ومجموعة الكتابة على أذونات لملقم الويب أثناء عملية التثبيت. -CorrectProblemAndReloadPage=يرجى تحديد المشكلة والصحافة F5 لإعادة تحميل الصفحة. -AlreadyDone=بالفعل هاجر -DatabaseVersion=قاعدة بيانات النسخة -ServerVersion=خادم قاعدة البيانات النسخة -YouMustCreateItAndAllowServerToWrite=يجب إنشاء هذا الدليل ، والسماح لخادم الويب أن يكتبوا فيه. -CharsetChoice=اختيار مجموعة حروف -CharacterSetClient=مجموعة الحروف المستخدمة في توليدها صفحات هتمل -CharacterSetClientComment=اختيار الطابع المحدد لعرضها على الإنترنت.
    واقترحت مجموعة الطابع الافتراضي هو واحد من قاعدة البيانات. -DBSortingCollation=طابع الفرز بغية -DBSortingCollationComment=اختر صفحة المدونة التي تحدد طبيعة النظام 'sفرز قاعدة البيانات التي تستخدمها. هذا هو المعلم كما دعا 'مقارنتها' بعض قواعد البيانات.
    هذا المعلم لا يمكن أن يعرف إذا كانت قاعدة البيانات موجودة بالفعل. -CharacterSetDatabase=الطابع المحدد لقاعدة البيانات -CharacterSetDatabaseComment=اختيار مجموعة حروف تريد لإنشاء قاعدة بيانات.
    هذا المعلم لا يمكن أن يعرف إذا كانت قاعدة البيانات موجودة بالفعل. -YouAskDatabaseCreationSoDolibarrNeedToConnect=كنت أسأل لإنشاء قاعدة بيانات ٪ ق ، ولكن لهذا ، Dolibarr الحاجة الى الاتصال بخادم ٪ ق السوبر مع المستخدم أذونات ٪ ق. -YouAskLoginCreationSoDolibarrNeedToConnect=كنت أسأل لإنشاء قاعدة بيانات ادخل ٪ ق ، ولكن لهذا ، Dolibarr الحاجة الى الاتصال بخادم ٪ ق السوبر مع أذونات المستخدم ٪ ق. -BecauseConnectionFailedParametersMayBeWrong=كما فشلت الصدد ، أو استضافة السوبر معالم المستخدم يجب أن يكون على خطأ. -OrphelinsPaymentsDetectedByMethod=Orphelins من اكتشاف طريقة الدفع ق ٪ -RemoveItManuallyAndPressF5ToContinue=إزالته يدويا واضغط F5 للمتابعة. -KeepDefaultValuesWamp=استخدام معالج الإعداد DoliWamp ، حتى القيم المقترحة هنا بالفعل الأمثل. تغييرها إلا إذا كنت تعرف ما تفعله. -KeepDefaultValuesDeb=يمكنك استخدام معالج الإعداد Dolibarr من أوبونتو أو حزمة ديبيان ، لذلك القيم المقترحة هنا هي الأمثل بالفعل. يجب أن تكتمل إلا كلمة السر للمالك قاعدة البيانات لإنشاء. تغيير معلمات أخرى إلا إذا كنت تعرف ما تفعله. -KeepDefaultValuesMamp=استخدام معالج الإعداد DoliMamp ، حتى القيم المقترحة هنا بالفعل الأمثل. تغييرها إلا إذا كنت تعرف ما تفعله. -KeepDefaultValuesProxmox=You use the Dolibarr setup wizard from a Proxmox virtual appliance, so values proposed here are already optimized. Change them only if you know what you do. -FieldRenamed=تغيير اسم الميدان -IfLoginDoesNotExistsCheckCreateUser=اذا ادخل لا يوجد حتى الآن ، يجب عليك التحقق من خيار "تكوين المستخدم" -ErrorConnection=الخادم "٪ ل" اسم قاعدة بيانات "٪ ل" ادخل "٪ ل" أو كلمة سر قاعدة البيانات قد تكون خاطئة أو PHP العميل نسخة قديمة جدا ويمكن مقارنة مع قاعدة البيانات نسخة. -InstallChoiceRecommanded=وأوصت لتثبيت اختيار النسخة ٪ المستندات الخاصة بك من النسخة الحالية ل ٪ -InstallChoiceSuggested=اقترح تثبيت اختيار المثبت. -MigrateIsDoneStepByStep=The targeted version (%s) has a gap of several versions, so install wizard will come back to suggest next migration once this one will be finished. -CheckThatDatabasenameIsCorrect=تأكد من أن اسم قاعدة البيانات "%s" هو الصحيح. -IfAlreadyExistsCheckOption=وإذا كان هذا الاسم هو الصحيح وأنه لا وجود قاعدة بيانات حتى الآن ، ويجب التحقق من خيار "إنشاء قاعدة بيانات". -OpenBaseDir=بي openbasedir المعلمة -YouAskToCreateDatabaseSoRootRequired=يمكنك التحقق من مربع "إنشاء قاعدة بيانات". لهذا ، تحتاج إلى توفير الدخول وكلمة السر من المستعملين المتميزين (الجزء السفلي من النموذج). -YouAskToCreateDatabaseUserSoRootRequired=يمكنك التحقق من مربع "إنشاء قاعدة بيانات مالك". لهذا ، تحتاج إلى توفير الدخول وكلمة السر من المستعملين المتميزين (الجزء السفلي من النموذج). -NextStepMightLastALongTime=الخطوة الحالية قد تستمر لعدة دقائق. ويرد الرجاء الانتظار حتى الشاشة التالية تماما قبل الشروع في الاستمرار. -MigrationCustomerOrderShipping=ترحيل الشحن لتخزين طلبات العملاء -MigrationShippingDelivery=ترقية تخزين الشحن -MigrationShippingDelivery2=ترقية تخزين الشحن 2 +ConfFileDoesNotExists=فایل پیکربندی%s وجود ندارد! +ConfFileDoesNotExistsAndCouldNotBeCreated=فایل پیکربندی%s وجود ندارد و نمی توان آن را! +ConfFileCouldBeCreated=فایل پیکربندی%s را می تواند ایجاد شود. +ConfFileIsNotWritable=فایل پیکربندی٪ است قابل نوشتن نیست. مجوز بررسی کنید. برای اولین بار نصب کنید، وب سرور شما باید اعطا می شود که قادر به ارسال این فایل در فرایند پیکربندی (به عنوان مثال در یونیکس مانند سیستم عامل "سطح دسترسی 666"). +ConfFileIsWritable=فایل پیکربندی%s قابل نوشتن است. +ConfFileReload=بازنگری تمام اطلاعات از فایل پیکربندی. +PHPSupportSessions=این جلسات PHP پشتیبانی می کند. +PHPSupportPOSTGETOk=این PHP پشتیبانی از متغیر های POST و GET. +PHPSupportPOSTGETKo=این امکان وجود دارد راه اندازی PHP شما از متغیر های POST پشتیبانی نمی کند و / یا. بررسی کنید variables_order پارامتر خود را در php.ini. +PHPSupportGD=این GD پشتیبانی از PHP توابع گرافیکی. +PHPSupportUTF8=این پشتیبانی از PHP توابع UTF8. +PHPMemoryOK=PHP حداکثر شما حافظه جلسه به%s تنظیم شده است. این باید به اندازه کافی باشد. +PHPMemoryTooLow=PHP حداکثر شما حافظه را وارد نمایید به%s بایت تنظیم شده است. این باید بسیار کم باشد. تغییر فایل php.ini خود را به تنظیم پارامتر memory_limit را به حداقل%s بایت. +Recheck=برای تست نشانگر بیشتر اینجا را کلیک کنید +ErrorPHPDoesNotSupportSessions=نصب و راه اندازی PHP شما جلسات را پشتیبانی نمی کند. این ویژگی مورد نیاز است تا Dolibarr کار. راه اندازی PHP خود را چک کنید. +ErrorPHPDoesNotSupportGD=نصب و راه اندازی PHP شما از عملکرد گرافیکی GD پشتیبانی نمی کند. بدون نمودار در دسترس خواهد بود. +ErrorPHPDoesNotSupportUTF8=نصب و راه اندازی PHP شما توابع UTF8 را پشتیبانی نمی کند. Dolibarr نمی تواند به درستی کار می کنند. حل این قبل از نصب Dolibarr. +ErrorDirDoesNotExists=شاخه%s وجود ندارد. +ErrorGoBackAndCorrectParameters=برو به عقب و اصلاح پارامترهای اشتباه است. +ErrorWrongValueForParameter=شما ممکن است یک مقدار اشتباه برای پارامتر '%s' را تایپ. +ErrorFailedToCreateDatabase=برای ایجاد پایگاه داده '%s »شکست خورد. +ErrorFailedToConnectToDatabase=برای اتصال به پایگاه داده '%s »شکست خورد. +ErrorDatabaseVersionTooLow=نسخه پایگاه داده (٪ بازدید کنندگان) خیلی قدیمی است. نسخه%s یا بالاتر مورد نیاز است. +ErrorPHPVersionTooLow=نسخه PHP خیلی قدیمی است. نسخه%s مورد نیاز است. +WarningPHPVersionTooLow=نسخه PHP خیلی قدیمی است. نسخه٪ یا بیشتر مورد انتظار است. این نسخه باید اجازه نصب اما پشتیبانی نمی شود. +ErrorConnectedButDatabaseNotFound=اتصال به موفق سرور، اما پایگاه داده '%s' یافت نشد. +ErrorDatabaseAlreadyExists=پایگاه داده '%s' از قبل وجود دارد. +IfDatabaseNotExistsGoBackAndUncheckCreate=اگر پایگاه داده وجود دارد، به عقب برگردید و گزینه تیک بزنید "ایجاد پایگاه داده". +IfDatabaseExistsGoBackAndCheckCreate=اگر پایگاه داده در حال حاضر وجود دارد، بازگشت و تیک گزینه "ایجاد پایگاه داده" گزینه است. +WarningBrowserTooOld=نسخه خیلی قدیمی از مرورگر. به روز رسانی مرورگر خود را به آخرین ورژن فایرفاکس، کروم و اپرا است که به شدت توصیه. +PHPVersion=PHP نسخه +YouCanContinue=شما می توانید ادامه ... +PleaseBePatient=لطفا صبور باشید ... +License=با استفاده از مجوز +ConfigurationFile=فایل پیکربندی +WebPagesDirectory=دایرکتوری که در آن صفحات وب ذخیره می شوند +DocumentsDirectory=پوشه برای ذخیره اسناد آپلود و تولید +URLRoot=URL ریشه +ForceHttps=مجبور ارتباط امن (HTTPS) +CheckToForceHttps=این گزینه به زور ارتباط امن را بررسی کنید (صفحه ی).
    این مستلزم آن است که وب سرور با گواهی SSL پیکربندی شده است. +DolibarrDatabase=پایگاه داده Dolibarr +DatabaseChoice=انتخاب پایگاه داده +DatabaseType=نوع پایگاه داده +DriverType=نوع درایور +Server=سرور +ServerAddressDescription=نام یا آدرس آی پی برای سرور پایگاه داده، معمولا "localhost را 'زمانی که سرور پایگاه داده است در همان سرور از وب سرور میزبانی +ServerPortDescription=پایگاه داده پورت سرور. خالی اگر ناشناخته نگه دارید. +DatabaseServer=بانک اطلاعات سرور +DatabaseName=نام پایگاه داده +DatabasePrefix=پایگاه داده جدول پیشوند +Login=ورود به سیستم +AdminLogin=ورود برای صاحب پایگاه داده Dolibarr. +Password=رمز عبور +PasswordAgain=تکرار گذرواژه بار دوم +AdminPassword=رمز عبور برای صاحب پایگاه داده Dolibarr. +CreateDatabase=ایجاد پایگاه داده +CreateUser=ایجاد صاحب +DatabaseSuperUserAccess=بانک اطلاعات سرور - دسترسی به کاربران بالاتر را میدهد +CheckToCreateDatabase=جعبه چک کنید اگر پایگاه داده وجود ندارد و باید ایجاد شود.
    در این مورد، شما باید وارد شوید / رمز عبور برای نام کاربر مدیر در پایین این صفحه را پر کنید. +CheckToCreateUser=جعبه چک کنید اگر صاحب پایگاه داده وجود ندارد و باید ایجاد شود.
    در این مورد، شما باید نام کاربری و رمز عبور خود را انتخاب کنید و همچنین ورود / رمز عبور در پایین این صفحه را پر کنید برای حساب کاربر مدیر. اگر این جعبه خالی، پایگاه داده مالک و کلمه عبور خود را باید وجود داشته باشد. +Experimental=(تجربی) +DatabaseRootLoginDescription=ورود از کاربر مجاز به ایجاد پایگاه داده جدید و یا کاربران جدید، اجباری اگر بانک اطلاعاتی شما و یا صاحب آن می کند در حال حاضر وجود ندارد. +KeepEmptyIfNoPassword=دیدگاهتان را خالی اگر کاربر هیچ رمز عبور (جلوگیری از این) +SaveConfigurationFile=صرفه جویی در مقدار +ConfigurationSaving=صرفه جویی در فایل پیکربندی +ServerConnection=اتصال به سرور +DatabaseConnection=اتصال به پایگاه داده +DatabaseCreation=ایجاد پایگاه داده +UserCreation=ایجاد کاربر +CreateDatabaseObjects=اشیاء پایگاه داده ایجاد +ReferenceDataLoading=مرجع بارگذاری داده ها +TablesAndPrimaryKeysCreation=جداول و کلید اولیه ایجاد +CreateTableAndPrimaryKey=ایجاد جدول%s را +CreateOtherKeysForTable=ایجاد کلید های خارجی و شاخص برای جدول%s را +OtherKeysCreation=کلید های خارجی و شاخص ایجاد +FunctionsCreation=ایجاد توابع +AdminAccountCreation=ایجاد ورود مدیر +PleaseTypePassword=لطفا رمز عبور را تایپ کنید، کلمه عبور خالی امکان پذیر نیست! +PleaseTypeALogin=لطفا وارد شوید و تایپ کنید! +PasswordsMismatch=کلمات عبور متفاوت، لطفا دوباره سعی کنید! +SetupEnd=پایان از راه اندازی +SystemIsInstalled=این نصب کامل شده است. +SystemIsUpgraded=Dolibarr با موفقیت به روز رسانی شده است. +YouNeedToPersonalizeSetup=شما نیاز به پیکربندی Dolibarr را با توجه به نیاز خود (ظاهر، امکانات، ...). برای این کار، لطفا لینک زیر را دنبال کنید: +AdminLoginCreatedSuccessfuly=Dolibarr مدیر ورود '%s' را ایجاد موفقیت. +GoToDolibarr=برو به Dolibarr +GoToSetupArea=برو به Dolibarr (منطقه راه اندازی) +MigrationNotFinished=نسخه از پایگاه داده خود را به طور کامل به روز نیست، بنابراین شما باید برای اجرای عملیات ارتقا دوباره. +GoToUpgradePage=برو به ارتقاء دوباره صفحه +Examples=نمونه +WithNoSlashAtTheEnd=بدون اسلش "/" در انتهای +DirectoryRecommendation=این است توصیه به استفاده از یک دایرکتوری در خارج از دایرکتوری خود را از صفحات وب خود را. +LoginAlreadyExists=در حال حاضر وجود دارد +DolibarrAdminLogin=Dolibarr مدیر در انجمن +AdminLoginAlreadyExists=حساب مدیر Dolibarr '%s' از قبل وجود دارد. برو به عقب، اگر شما می خواهید برای ایجاد یک دیگر. +WarningRemoveInstallDir=اخطار، به دلایل امنیتی، پس از نصب و یا ارتقا کامل است، برای جلوگیری از استفاده از ابزار را دوباره نصب کنید، شما باید یک فایل install.lock به دایرکتوری سند Dolibarr نام اضافه، به منظور جلوگیری از سوء استفاده از آن را. +ThisPHPDoesNotSupportTypeBase=این سیستم PHP هیچ رابط کاربری را پشتیبانی نمی کند برای دسترسی به نوع پایگاه داده از%s +FunctionNotAvailableInThisPHP=در این پی اچ پی در دسترس نیست +MigrateScript=اسکریپت مهاجرت +ChoosedMigrateScript=را انتخاب کنید اسکریپت مهاجرت +DataMigration=اطلاعات مهاجرت +DatabaseMigration=مهاجرت پایگاه داده ساختار +ProcessMigrateScript=پردازش اسکریپت +ChooseYourSetupMode=حالت راه اندازی خود را انتخاب کنید و دکمه "شروع" ... +FreshInstall=تازه نصب +FreshInstallDesc=با استفاده از این حالت اگر اولین بار از این شما نصب می شود. اگر نه، این حالت می تواند تعمیر نصب قبلی ناقص، اما اگر شما می خواهید برای ارتقاء نسخه خود را، را انتخاب کنید "به روز رسانی" حالت. +Upgrade=به روز رسانی +UpgradeDesc=با استفاده از این حالت اگر شما فایل های قدیمی Dolibarr با فایل ها از یک نسخه جدیدتر جایگزین شده است. این پایگاه داده ها و اطلاعات خود را ارتقا دهید. +Start=شروع +InstallNotAllowed=راه اندازی شده توسط مجوز conf.php مجاز نیست +NotAvailable=در دسترس نیست +YouMustCreateWithPermission=شما باید فایل%s و مجوز نوشتن در آن را برای وب سرور ایجاد در طول فرایند نصب کنید. +CorrectProblemAndReloadPage=لطفا مشکل را رفع و F5 را فشار دهید به بارگذاری مجدد صفحه. +AlreadyDone=در حال حاضر مهاجرت +DatabaseVersion=بانک اطلاعات نسخه +ServerVersion=نسخه سرور پایگاه داده +YouMustCreateItAndAllowServerToWrite=شما باید این پوشه ایجاد کنید و اجازه می دهد برای وب سرور برای ارسال به آن. +CharsetChoice=انتخاب شخصیت مجموعه +CharacterSetClient=مجموعه کاراکتر های مورد استفاده برای تولید صفحات وب HTML +CharacterSetClientComment=مجموعه کاراکتر برای نمایش وب را انتخاب کنید.
    به طور پیش فرض پیشنهاد مجموعه کاراکتر یکی از پایگاه داده خود را است. +DBSortingCollation=شخصیت منظور مرتب سازی +DBSortingCollationComment=کد صفحه ای که تعریف منظور مرتب سازی شخصیت استفاده شده توسط پایگاه داده را انتخاب کنید. این پارامتر نیز 'میترا' از سوی برخی از پایگاه های داده نامیده می شود.
    این پارامتر نمی تواند تعریف شود اگر پایگاه داده در حال حاضر وجود دارد. +CharacterSetDatabase=مجموعه کاراکتر برای پایگاه داده +CharacterSetDatabaseComment=را انتخاب کنید مجموعه کاراکتر می خواستم برای ایجاد پایگاه داده باشد.
    این پارامتر نمی تواند تعریف شود اگر پایگاه داده در حال حاضر وجود دارد. +YouAskDatabaseCreationSoDolibarrNeedToConnect=از شما درخواست برای ایجاد پایگاه داده٪ است، اما برای این، Dolibarr نیاز به اتصال به%s سرور با مجوز فوق العاده کاربر%s را. +YouAskLoginCreationSoDolibarrNeedToConnect=از شما درخواست برای ایجاد پایگاه داده ورود به%s را، اما برای این، Dolibarr نیاز به اتصال به%s سرور با مجوز فوق العاده کاربر%s را. +BecauseConnectionFailedParametersMayBeWrong=به عنوان اتصال، میزبان یا پارامترهای کاربر فوق العاده باید اشتباه باشد. +OrphelinsPaymentsDetectedByMethod=یتیمان پرداخت شناسایی شده با استفاده از روش از%s +RemoveItManuallyAndPressF5ToContinue=حذف آن دستی و F5 را فشار دهید تا ادامه خواهد داد. +KeepDefaultValuesWamp=شما با استفاده از جادوگر در راه اندازی Dolibarr از DoliWamp، بنابراین مقادیر ارائه شده در اینجا در حال حاضر بهینه شده است. تغییر آنها را تنها در صورتی شما می دانید آنچه شما انجام دهد. +KeepDefaultValuesDeb=شما با استفاده از جادوگر Dolibarr راه اندازی از یک بسته لینوکس (اوبونتو، دبیان، فدورا ...)، بنابراین مقادیر ارائه شده در اینجا در حال حاضر بهینه شده است. تنها رمز صاحب پایگاه داده برای ایجاد باید پر شوند. تغییر پارامترهای دیگر تنها در صورتی شما می دانید آنچه شما انجام دهد. +KeepDefaultValuesMamp=شما با استفاده از جادوگر در راه اندازی Dolibarr از DoliMamp، بنابراین مقادیر ارائه شده در اینجا در حال حاضر بهینه شده است. تغییر آنها را تنها در صورتی شما می دانید آنچه شما انجام دهد. +KeepDefaultValuesProxmox=شما با استفاده از جادوگر در راه اندازی Dolibarr از یک دستگاه مجازی بورس، بنابراین مقادیر ارائه شده در اینجا در حال حاضر بهینه شده است. تغییر آنها را تنها در صورتی شما می دانید آنچه شما انجام دهد. +FieldRenamed=درست است تغییر نام داد +IfLoginDoesNotExistsCheckCreateUser=اگر وارد کند وجود دارد نشده است، شما باید گزینه را تیک "ایجاد کاربر" +ErrorConnection=سرور "%s"، نام پایگاه داده "%s"، برای ورود اینجا "%s"، و یا رمز عبور پایگاه داده ممکن است اشتباه باشد و یا نسخه PHP مشتری ممکن است خیلی قدیمی در مقایسه با نسخه پایگاه داده باشد. +InstallChoiceRecommanded=توصیه می شود انتخاب به نصب نسخه%s از نسخه فعلی خود را از%s +InstallChoiceSuggested=نصب انتخاب پیشنهاد شده توسط نصب. +MigrateIsDoneStepByStep=نسخه هدف قرار دادند (٪ بازدید کنندگان) دارای یک شکاف از چندین نسخه، پس از نصب ویزارد باز خواهد گشت تا نشان می دهد مهاجرت بعدی یک بار این یکی تمام می شود. +CheckThatDatabasenameIsCorrect=بررسی کنید که نام پایگاه داده "%s" درست است. +IfAlreadyExistsCheckOption=اگر این نام درست است و پایگاه داده هنوز وجود ندارد، شما باید گزینه "ایجاد پایگاه داده" تیک بزنید. +OpenBaseDir=پارامتر PHP openbasedir +YouAskToCreateDatabaseSoRootRequired=شما چک باکس "ایجاد پایگاه داده". برای این کار، شما نیاز به ارائه ورود / رمز عبور کاربر مدیر (پایین فرم). +YouAskToCreateDatabaseUserSoRootRequired=شما چک باکس "ایجاد صاحب پایگاه داده". برای این کار، شما نیاز به ارائه ورود / رمز عبور کاربر مدیر (پایین فرم). +NextStepMightLastALongTime=مرحله کنونی ممکن است چند دقیقه طول بکشد. لطفا صبر کنید تا صفحه بعدی به طور کامل قبل از ادامه نشان داده شده است. +MigrationCustomerOrderShipping=مهاجرت حمل و نقل برای سفارشات مشتری ذخیره سازی +MigrationShippingDelivery=به روز رسانی ذخیره سازی حمل و نقل +MigrationShippingDelivery2=به روز رسانی ذخیره سازی حمل و نقل 2 MigrationFinished=مهاجرت به پایان رسید -LastStepDesc=آخرین مرحله : در اینجا با نام کاربری خود وارد شوید و رمز عبور تعریف شما قصد دارید استفاده برای اتصال به نرم افزار. سست این ، آن را به عنوان حساب اداره از همه دیگران نیست. -ActivateModule=Activate module %s -ShowEditTechnicalParameters=Click here to show/edit advanced parameters (expert mode) +LastStepDesc=آخرین مرحله: تعریف اینجا کاربری و رمز عبور شما قصد استفاده برای اتصال به نرم افزار. آیا این شل نیست آن را به عنوان حساب به اداره همه دیگران است. +ActivateModule=فعال بخش%s +ShowEditTechnicalParameters=برای نشان دادن پارامترهای پیشرفته / ویرایش اینجا را کلیک کنید (حالت کارشناسی) ######### # upgrade -MigrationFixData=إصلاح البيانات الذي لم تتم تسويته -MigrationOrder=بيانات الهجرة طلبات الزبائن -MigrationSupplierOrder=بيانات الهجرة من أجل الموردين أوامر -MigrationProposal=بيانات الهجرة لأغراض تجارية اقتراحات -MigrationInvoice=بيانات الهجرة لعملاء الفواتير -MigrationContract=بيانات الهجرة للحصول على عقود -MigrationSuccessfullUpdate=تحديث ناجحة -MigrationUpdateFailed=فشلت عملية تحديث -MigrationRelationshipTables=بيانات الهجرة للجداول العلاقة (%s) -MigrationPaymentsUpdate=تصحيح بيانات الدفع -MigrationPaymentsNumberToUpdate=٪ ق الدفع (ق) لتحديث -MigrationProcessPaymentUpdate=تحديث الدفع (ق) ق ٪ -MigrationPaymentsNothingToUpdate=لا أكثر مما ينبغي فعله -MigrationPaymentsNothingUpdatable=لا مزيد من المدفوعات التي يمكن أن تصحح -MigrationContractsUpdate=تصحيح بيانات العقد -MigrationContractsNumberToUpdate=٪ ق العقد (ق) لتحديث -MigrationContractsLineCreation=عقد إنشاء خط لعقد المرجع ق ٪ -MigrationContractsNothingToUpdate=لا أكثر مما ينبغي فعله -MigrationContractsFieldDontExist=الميدان fk_facture لا وجود بعد الآن. لا علاقة. -MigrationContractsEmptyDatesUpdate=عقد فارغ تصحيح التاريخ -MigrationContractsEmptyDatesUpdateSuccess=تصحيح تاريخ العقد emtpy عمله بنجاح -MigrationContractsEmptyDatesNothingToUpdate=أي عقد حتى الآن لتصحيح فارغة -MigrationContractsEmptyCreationDatesNothingToUpdate=إنشاء أي عقد لتصحيح التاريخ -MigrationContractsInvalidDatesUpdate=سوء قيمة العقد تصحيح التاريخ -MigrationContractsInvalidDateFix=Correct contract %s (Contract date=%s, Starting service date min=تصحيح العقد ٪ ق (تاريخ العقد ق= ٪ ، اعتبارا من تاريخ الخدمة دقيقة= ٪) -MigrationContractsInvalidDatesNumber=ق ٪ العقود المعدلة -MigrationContractsInvalidDatesNothingToUpdate=اي موعد مع سوء قيمة تصحيح -MigrationContractsIncoherentCreationDateUpdate=سوء خلق قيمة العقد تصحيح التاريخ -MigrationContractsIncoherentCreationDateUpdateSuccess=سوء خلق قيمة العقد حتى الآن تصحيح ذلك بنجاح -MigrationContractsIncoherentCreationDateNothingToUpdate=ليس سيئا بالنسبة للقيمة العقد إنشاء لتصحيح التاريخ -MigrationReopeningContracts=أغلقت العقود المفتوحة خطأ -MigrationReopenThisContract=اعادة فتح العقد ق ٪ -MigrationReopenedContractsNumber=ق ٪ العقود المعدلة -MigrationReopeningContractsNothingToUpdate=لا أغلقت العقود فتح -MigrationBankTransfertsUpdate=تحديث الروابط بين المعاملات المصرفية وتحويل مصرفي -MigrationBankTransfertsNothingToUpdate=كل الروابط حتى الآن -MigrationShipmentOrderMatching=الإرسال استلام آخر التطورات -MigrationDeliveryOrderMatching=إيصال استلام آخر التطورات -MigrationDeliveryDetail=تسليم تحديث -MigrationStockDetail=تحديث قيمة المخزون من المنتجات -MigrationMenusDetail=تحديث القوائم الديناميكية الجداول -MigrationDeliveryAddress=تتناول آخر التطورات في تسليم شحنات -MigrationProjectTaskActors=بيانات الهجرة لllx_projet_task_actors الجدول -MigrationProjectUserResp=بيانات fk_user_resp مجال الهجرة من llx_projet لllx_element_contact -MigrationProjectTaskTime=تحديث الوقت الذي يقضيه في ثوان -MigrationActioncommElement=به روز رسانی داده ها در اعمال -MigrationPaymentMode=Data migration for payment mode -MigrationCategorieAssociation=Migration of categories +MigrationFixData=ثابت برای داده های denormalized +MigrationOrder=اطلاعات مهاجرت برای سفارشات مشتری +MigrationSupplierOrder=اطلاعات مهاجرت برای سفارشات کننده +MigrationProposal=مهاجرت داده ها برای طرح های تجاری +MigrationInvoice=اطلاعات مهاجرت برای صورت حساب مشتری +MigrationContract=اطلاعات مهاجرت برای قرارداد +MigrationSuccessfullUpdate=به روز رسانی موفق +MigrationUpdateFailed=روند ارتقاء شکست خورده +MigrationRelationshipTables=مهاجرت به داده ها برای جداول رابطه (٪ بازدید کنندگان) +MigrationPaymentsUpdate=پرداخت اصلاح داده ها +MigrationPaymentsNumberToUpdate=%s را پرداخت (ها) برای به روز رسانی +MigrationProcessPaymentUpdate=پرداخت به روز رسانی (بازدید کنندگان)٪ بازدید کنندگان +MigrationPaymentsNothingToUpdate=هیچ چیز بیشتری برای انجام +MigrationPaymentsNothingUpdatable=بدون پرداخت است که می تواند اصلاح شود +MigrationContractsUpdate=قرارداد اصلاح داده ها +MigrationContractsNumberToUpdate=%s در قرارداد (ها) برای به روز رسانی +MigrationContractsLineCreation=ایجاد خط قرارداد برای قرارداد کد عکس از%s +MigrationContractsNothingToUpdate=هیچ چیز بیشتری برای انجام +MigrationContractsFieldDontExist=fk_facture درست می کند وجود دارد نیست. هیچ چیز به انجام. +MigrationContractsEmptyDatesUpdate=قرارداد تصحیح تاریخ خالی +MigrationContractsEmptyDatesUpdateSuccess=قرارداد تصحیح تاریخ emtpy انجام موفقیت +MigrationContractsEmptyDatesNothingToUpdate=بدون قرارداد تاریخ خالی برای اصلاح +MigrationContractsEmptyCreationDatesNothingToUpdate=تاریخ ایجاد قرارداد برای اصلاح +MigrationContractsInvalidDatesUpdate=تاریخ مقدار بد اصلاح قرارداد +MigrationContractsInvalidDateFix=قرارداد صحیح از%s (تاریخ قرارداد =٪ S، تاریخ شروع خدمات دقیقه =٪ بازدید کنندگان) +MigrationContractsInvalidDatesNumber=%s در قرارداد اصلاح شده +MigrationContractsInvalidDatesNothingToUpdate=تاریخ با ارزش بد برای اصلاح +MigrationContractsIncoherentCreationDateUpdate=بد قرارداد ارزش تصحیح تاریخ ایجاد +MigrationContractsIncoherentCreationDateUpdateSuccess=بد قرارداد ارزش تصحیح تاریخ ایجاد انجام succesfuly +MigrationContractsIncoherentCreationDateNothingToUpdate=بدون مقدار بد برای تاریخ ایجاد قرارداد برای اصلاح +MigrationReopeningContracts=قرارداد باز کردن بسته های خطا +MigrationReopenThisContract=بازگشایی قرارداد از%s +MigrationReopenedContractsNumber=%s در قرارداد اصلاح شده +MigrationReopeningContractsNothingToUpdate=بدون قرارداد بسته یا باز +MigrationBankTransfertsUpdate=لینک به روز رسانی بین معامله بانک و انتقال بانکی +MigrationBankTransfertsNothingToUpdate=تمامی لینک ها به روز می باشد +MigrationShipmentOrderMatching=Sendings به روز رسانی دریافت +MigrationDeliveryOrderMatching=به روز رسانی رسید تحویل +MigrationDeliveryDetail=به روز رسانی تحویل +MigrationStockDetail=به روز رسانی ارزش سهام از محصولات +MigrationMenusDetail=به روز رسانی جداول منوهای پویا +MigrationDeliveryAddress=آدرس تحویل به روز رسانی در محموله +MigrationProjectTaskActors=اطلاعات مهاجرت برای llx_projet_task_actors جدول +MigrationProjectUserResp=اطلاعات مهاجرت درست است fk_user_resp از llx_projet به llx_element_contact +MigrationProjectTaskTime=زمان به روز رسانی صرف در ثانیه +MigrationActioncommElement=به روز کردن اطلاعات در مورد اقدامات +MigrationPaymentMode=اطلاعات مهاجرت برای حالت پرداخت +MigrationCategorieAssociation=مهاجرت از دسته -ShowNotAvailableOptions=Show not available options -HideNotAvailableOptions=Hide not available options +ShowNotAvailableOptions=نمایش گزینه های در دسترس نیست +HideNotAvailableOptions=پنهان کردن گزینه های در دسترس نیست diff --git a/htdocs/langs/fa_IR/interventions.lang b/htdocs/langs/fa_IR/interventions.lang index 84fe5afe134..94e01b3ec51 100644 --- a/htdocs/langs/fa_IR/interventions.lang +++ b/htdocs/langs/fa_IR/interventions.lang @@ -1,42 +1,42 @@ # Dolibarr language file - Source file is en_US - interventions -Intervention=التدخل -Interventions=المداخلات -InterventionCard=تدخل البطاقة -NewIntervention=التدخل الجديدة -AddIntervention=إضافة التدخل -ListOfInterventions=قائمة التدخلات -EditIntervention=Editer التدخل -# ActionsOnFicheInter=Actions on intervention -LastInterventions=آخر تدخلات ٪ ق -AllInterventions=كل التدخلات -CreateDraftIntervention=إنشاء مشروع -CustomerDoesNotHavePrefix=الزبون ليس لديها البادئة -InterventionContact=التدخل الاتصال -DeleteIntervention=حذف التدخل -ValidateIntervention=تحقق من التدخل -ModifyIntervention=تعديل التدخل -DeleteInterventionLine=حذف السطر التدخل -ConfirmDeleteIntervention=هل أنت متأكد من أنك تريد حذف هذا التدخل؟ -ConfirmValidateIntervention=هل أنت متأكد أنك تريد التحقق من صحة هذا التدخل؟ -ConfirmModifyIntervention=هل أنت متأكد من تعديل هذا التدخل؟ -ConfirmDeleteInterventionLine=هل أنت متأكد من أنك تريد حذف هذا السطر التدخل؟ -NameAndSignatureOfInternalContact=الاسم والتوقيع على التدخل : -NameAndSignatureOfExternalContact=اسم وتوقيع العميل : -DocumentModelStandard=نموذج وثيقة موحدة للتدخلات -# InterventionCardsAndInterventionLines=Interventions and lines of interventions -# ClassifyBilled=Classify "Billed" -StatusInterInvoiced=فواتير -# RelatedInterventions=Related interventions +Intervention=مداخله +Interventions=مداخلات +InterventionCard=کارت مداخله +NewIntervention=مداخله های جدید +AddIntervention=اضافه کردن مداخله +ListOfInterventions=فهرست مداخلات +EditIntervention=ویرایش مداخله +ActionsOnFicheInter=عملیات مداخله +LastInterventions=مداخلات آخرین٪ بازدید کنندگان +AllInterventions=تمام مداخلات +CreateDraftIntervention=ایجاد پیش نویس +CustomerDoesNotHavePrefix=مشتری یک پیشوند ندارد +InterventionContact=تماس با مداخله +DeleteIntervention=حذف مداخله +ValidateIntervention=اعتبارسنجی مداخله +ModifyIntervention=اصلاح مداخله +DeleteInterventionLine=حذف خط مداخله +ConfirmDeleteIntervention=آیا مطمئن هستید که می خواهید این مداخله را حذف کنید؟ +ConfirmValidateIntervention=آیا مطمئن هستید که می خواهید به اعتبار این مداخله تحت نام%s را؟ +ConfirmModifyIntervention=آیا مطمئن هستید که می خواهید به تغییر این مداخله؟ +ConfirmDeleteInterventionLine=آیا مطمئن هستید که می خواهید این خط مداخله را حذف کنید؟ +NameAndSignatureOfInternalContact=نام و امضا از مداخله: +NameAndSignatureOfExternalContact=نام و امضا از مشتری: +DocumentModelStandard=مدل استاندارد سند برای مداخلات +InterventionCardsAndInterventionLines=مداخلات و خطوط مداخلات +ClassifyBilled=طبقه بندی "صورتحساب" +StatusInterInvoiced=ثبت شده در صورتحساب یا لیست +RelatedInterventions=مداخلات مرتبط ShowIntervention=نمایش مداخله ##### Types de contacts ##### -TypeContact_fichinter_internal_INTERREPFOLL=ممثل متابعة التدخل -TypeContact_fichinter_internal_INTERVENING=التدخل -TypeContact_fichinter_external_BILLING=فواتير العملاء الاتصال -TypeContact_fichinter_external_CUSTOMER=متابعة العملاء الاتصال +TypeContact_fichinter_internal_INTERREPFOLL=نماینده زیر تا مداخله +TypeContact_fichinter_internal_INTERVENING=مداخله +TypeContact_fichinter_external_BILLING=حسابداری ارتباط با مشتری +TypeContact_fichinter_external_CUSTOMER=پس تا مشتری تماس # Modele numérotation -ArcticNumRefModelDesc1=عدد نموذج عامة -ArcticNumRefModelError=فشل لتفعيل -PacificNumRefModelDesc1=عودة número مع الشكل nnnn - ٪ syymm فيها السنة هي السنة ، هو شهر ملم وnnnn هو كسر التسلسل وليس هناك عودة لل0 -PacificNumRefModelError=تدخل البطاقة ابتداء من دولار ويوجد بالفعل syymm لا تتفق مع هذا النموذج من التسلسل. إزالة أو تغيير تسميتها لتصبح لتفعيل هذه الوحدة. -# PrintProductsOnFichinter=Print products on intervention card -# PrintProductsOnFichinterDetails=forinterventions generated from orders +ArcticNumRefModelDesc1=مدل تعداد عمومی +ArcticNumRefModelError=برای فعال سازی ناموفق +PacificNumRefModelDesc1=بازگشت numero با فرمت%syymm-NNNN که در آن YY سال است، میلی متر در ماه است و NNNN دنباله بدون استراحت و بدون بازگشت به 0 است +PacificNumRefModelError=کارت مداخله با $ شروع میشوند syymm حال حاضر وجود دارد و سازگار با این مدل توالی نیست. آن را حذف و یا تغییر نام آن را به این ماژول را فعال کنید. +PrintProductsOnFichinter=محصول چاپ بر روی کارت مداخله +PrintProductsOnFichinterDetails=forinterventions تولید شده از سفارشات diff --git a/htdocs/langs/fa_IR/languages.lang b/htdocs/langs/fa_IR/languages.lang index c3c4692f9fa..b5f26e70e58 100644 --- a/htdocs/langs/fa_IR/languages.lang +++ b/htdocs/langs/fa_IR/languages.lang @@ -19,8 +19,9 @@ Language_en_SA=انگلیسی عربستان سعودی Language_en_US=انگلیسی آمریکا Language_en_ZA=انگلیسی آفریقای جنوبی Language_es_ES=اسپانیایی +Language_es_DO=Spanish (Dominican Republic) Language_es_AR=اسپانیایی آرژانتین -Language_es_CL=Spanish (Chile) +Language_es_CL=اسپانیایی (شیلی) Language_es_HN=اسپانیایی (هندوراس) Language_es_MX=اسپانیایی (مکزیک) Language_es_PY=اسپانیایی پروگوئه @@ -38,6 +39,7 @@ Language_fr_NC=فرانسه (کالدونیای جدید) Language_he_IL=عبری Language_hr_HR=کرواتی Language_hu_HU=مجارستانی +Language_id_ID=Indonesian Language_is_IS=ایسلندی Language_it_IT=ایتالیایی Language_ja_JP=ژاپنی @@ -58,7 +60,7 @@ Language_tr_TR=ترکی Language_sl_SI=السلوفينية Language_sv_SV=سوئدی Language_sv_SE=سوئدی -Language_sq_AL=Albanian +Language_sq_AL=آلبانی Language_sk_SK=اسلواکی Language_th_TH=تایلندی Language_uk_UA=اوکراین diff --git a/htdocs/langs/fa_IR/mailmanspip.lang b/htdocs/langs/fa_IR/mailmanspip.lang index 4df2bf08bde..e5a85c4d820 100644 --- a/htdocs/langs/fa_IR/mailmanspip.lang +++ b/htdocs/langs/fa_IR/mailmanspip.lang @@ -1,27 +1,27 @@ # Dolibarr language file - Source file is en_US - mailmanspip -# MailmanSpipSetup=Mailman and SPIP module Setup -# MailmanTitle=Mailman mailing list system -# TestSubscribe=To test subscription to Mailman lists -# TestUnSubscribe=To test unsubscribe from Mailman lists -# MailmanCreationSuccess=Subscription test was executed succesfully -# MailmanDeletionSuccess=Unsubscription test was executed succesfully -# SynchroMailManEnabled=A Mailman update will be performed -# SynchroSpipEnabled=A Spip update will be performed -# DescADHERENT_MAILMAN_ADMINPW=Mailman administrator password -# DescADHERENT_MAILMAN_URL=URL for Mailman subscriptions -# DescADHERENT_MAILMAN_UNSUB_URL=URL for Mailman unsubscriptions -# DescADHERENT_MAILMAN_LISTS=List(s) for automatic inscription of new members (separated by a comma) -# SPIPTitle=SPIP Content Management System -# DescADHERENT_SPIP_SERVEUR=SPIP Server -# DescADHERENT_SPIP_DB=SPIP database name -# DescADHERENT_SPIP_USER=SPIP database login -# DescADHERENT_SPIP_PASS=SPIP database password -# AddIntoSpip=Add into SPIP -# AddIntoSpipConfirmation=Are you sure you want to add this member into SPIP? -# AddIntoSpipError=Failed to add the user in SPIP -# DeleteIntoSpip=Remove from SPIP -# DeleteIntoSpipConfirmation=Are you sure you want to remove this member from SPIP? -# DeleteIntoSpipError=Failed to suppress the user from SPIP -# SPIPConnectionFailed=Failed to connect to SPIP -# SuccessToAddToMailmanList=Add of %s to mailman list %s or SPIP database done -# SuccessToRemoveToMailmanList=Removal of %s from mailman list %s or SPIP database done +MailmanSpipSetup=پستچی و SPIP ماژول راه اندازی +MailmanTitle=پستچی لیست پستی سیستم +TestSubscribe=برای آزمایش اشتراک به لیست پستچی +TestUnSubscribe=برای آزمایش لغو اشتراک از لیست پستچی +MailmanCreationSuccess=آزمون اشتراک با موفقیت اجرا شد +MailmanDeletionSuccess=آزمون لغو عضویت با موفقیت اجرا شد +SynchroMailManEnabled=به روز رسانی پستچی انجام خواهد شد +SynchroSpipEnabled=به روز رسانی SPIP انجام خواهد شد +DescADHERENT_MAILMAN_ADMINPW=رمز عبور مدیر پستچی +DescADHERENT_MAILMAN_URL=URL برای اشتراک پستچی +DescADHERENT_MAILMAN_UNSUB_URL=URL برای unsubscriptions پستچی +DescADHERENT_MAILMAN_LISTS=لیست (ها) برای کتیبه خودکار از اعضای جدید (با کاما جدا شوند) +SPIPTitle=سیستم مدیریت محتوای SPIP +DescADHERENT_SPIP_SERVEUR=SPIP سرور +DescADHERENT_SPIP_DB=SPIP نام پایگاه داده +DescADHERENT_SPIP_USER=SPIP پایگاه داده ورود +DescADHERENT_SPIP_PASS=رمز عبور پایگاه داده SPIP +AddIntoSpip=اضافه کردن به SPIP +AddIntoSpipConfirmation=آیا مطمئن هستید که می خواهید برای اضافه کردن این عضو را SPIP؟ +AddIntoSpipError=برای اضافه کردن کاربر در SPIP ناموفق +DeleteIntoSpip=حذف از SPIP +DeleteIntoSpipConfirmation=آیا مطمئن هستید که می خواهید به حذف این عضو از SPIP؟ +DeleteIntoSpipError=به سرکوب کاربر از SPIP ناموفق +SPIPConnectionFailed=برای اتصال به SPIP ناموفق +SuccessToAddToMailmanList=اضافه کردن به%s به پستچی فهرست٪ و یا پایگاه داده SPIP انجام می شود +SuccessToRemoveToMailmanList=حذف از%s از پستچی فهرست٪ و یا پایگاه داده SPIP انجام می شود diff --git a/htdocs/langs/fa_IR/mails.lang b/htdocs/langs/fa_IR/mails.lang index d468cfe4ed1..25b677d5dee 100644 --- a/htdocs/langs/fa_IR/mails.lang +++ b/htdocs/langs/fa_IR/mails.lang @@ -1,137 +1,138 @@ # Dolibarr language file - Source file is en_US - mails -Mailing=مراسلة -EMailing=مراسلة +Mailing=ارسال ایمیل +EMailing=ارسال ایمیل Mailings=EMailings EMailings=EMailings -AllEMailings=جميع eMailings -MailCard=بطاقة الإنترنت -MailTargets=الأهداف -MailRecipients=المستفيدون -MailRecipient=المتلقي -MailTitle=العنوان -MailFrom=مرسل -MailErrorsTo=الأخطاء -MailReply=وردا على -MailTo=جهاز الاستقبال (ق) -MailCC=نسخة إلى -MailCCC=نسخة إلى نسخة -MailTopic=البريد الإلكتروني الموضوع -MailText=رسالة -MailFile=الملفات المرفقة -MailMessage=هيئة البريد الإلكتروني -ShowEMailing=وتظهر مراسلة -ListOfEMailings=قائمة emailings -NewMailing=مراسلة جديدة -EditMailing=تحرير مراسلة -ResetMailing=إعادة إرساله عبر البريد الإلكتروني -DeleteMailing=حذف البريد الإلكتروني -DeleteAMailing=حذف البريد الإلكتروني -PreviewMailing=معاينة مراسلة -PrepareMailing=إعداد البريد الإلكتروني -CreateMailing=خلق مراسلة -MailingDesc=هذه الصفحة يسمح لك بإرسال emailings على مجموعة من الناس. -MailingResult=ونتيجة لإرسال رسائل البريد الإلكتروني -TestMailing=تجربة استخدام الإنترنت -ValidMailing=صحيح مراسلة -ApproveMailing=الموافقة على استخدام الإنترنت -MailingStatusDraft=مسودة -MailingStatusValidated=صادق -MailingStatusApproved=وافق -MailingStatusSent=أرسل -MailingStatusSentPartialy=أرسلت جزئيا -MailingStatusSentCompletely=أرسلت تماما -MailingStatusError=خطأ -MailingStatusNotSent=لم ترسل -MailSuccessfulySent=أرسل بالبريد الإلكتروني بنجاح (٪ من المستندات ل٪) -MailingSuccessfullyValidated=EMailing successfully validated -MailUnsubcribe=Unsubscribe -Unsuscribe=Unsubscribe -MailingStatusNotContact=Don't contact anymore -ErrorMailRecipientIsEmpty=البريد الإلكتروني المتلقي فارغة -WarningNoEMailsAdded=بريد الكتروني جديدة تضاف الى قائمة المتلقي. -ConfirmValidMailing=هل أنت متأكد أنك تريد إرساله عبر البريد الإلكتروني للتحقق من هذا؟ -ConfirmResetMailing=تحذير ، وإعادة تشغيل البريد الإلكتروني ل ٪ ، يسمح لك أن الدمار إرسال هذه الرسالة مرة اخرى. هل أنت متأكد من أنك هذا هو ما تريد أن تفعل؟ -ConfirmDeleteMailing=هل أنت متأكد من أنك تريد حذف هذا emailling؟ -NbOfRecipients=عدد المستفيدين -NbOfUniqueEMails=ملاحظة : فريد من رسائل البريد الإلكتروني -NbOfEMails=ملاحظة : رسائل البريد الإلكتروني -TotalNbOfDistinctRecipients=عدد المستفيدين متميزة -NoTargetYet=ولم يعرف بعد المستفيدين (الذهاب على تبويبة 'المتلقين) -AddRecipients=إضافة المتلقين -RemoveRecipient=إزالة المتلقية -CommonSubstitutions=عام بدائل -YouCanAddYourOwnPredefindedListHere=البريد الإلكتروني الخاص بك لإنشاء وحدة منتق ، انظر htdocs / تضم / وحدات / الرسائل / إقرأني. -EMailTestSubstitutionReplacedByGenericValues=عند استخدام طريقة الاختبار ، واستبدال المتغيرات العامة الاستعاضة عن القيم -MailingAddFile=يرفق هذا الملف -NoAttachedFiles=ولا الملفات المرفقة -BadEMail=قيمة سيئة للبريد الإلكتروني -CloneEMailing=استنساخ الارسال بالبريد الالكتروني -ConfirmCloneEMailing=هل أنت متأكد من استنساخ هذا البريد الإلكتروني؟ -CloneContent=استنساخ الرسالة -CloneReceivers=شبيه المستفيدين -DateLastSend=تاريخ آخر ارسال -DateSending=تاريخ إرسال -SentTo=إرسالها إلى %s -MailingStatusRead=Read -CheckRead=Read Receipt -YourMailUnsubcribeOK=The email %s is correctly unsubcribe from mailing list -MailtoEMail=Hyper link to email -ActivateCheckRead=Allow to use the "Unsubcribe" link -ActivateCheckReadKey=Key use to encrypt URL use for "Read Receipt" and "Unsubcribe" feature -EMailSentToNRecipients=EMail sent to %s recipients. -EachInvoiceWillBeAttachedToEmail=A document using default invoice document template will be created and attached to each email. -MailTopicSendRemindUnpaidInvoices=Reminder of invoice %s (%s) -SendRemind=Send reminder by EMails -RemindSent=%s reminder(s) sent -AllRecipientSelectedForRemind=All thirdparties selected and if an email is set (note that one mail per invoice will be sent) -NoRemindSent=No EMail reminder sent -ResultOfMassSending=Result of mass EMail reminders sending +AllEMailings=همه eMailings +MailCard=ایمیل کارت +MailTargets=اهداف +MailRecipients=دریافت کنندگان +MailRecipient=دریافت کننده +MailTitle=توصیف +MailFrom=فرستنده +MailErrorsTo=خطاها به +MailReply=پاسخ به +MailTo=گیرنده (ها) +MailCC=کپی کنید به +MailCCC=نسخه های cache شده به +MailTopic=موضوع ایمیل +MailText=پیام +MailFile=فایل های پیوست شده +MailMessage=متن ایمیل +ShowEMailing=نمایش ایمیل +ListOfEMailings=فهرست emailings +NewMailing=ایمیل جدید +EditMailing=ویرایش ایمیل +ResetMailing=ارسال دوباره ایمیل +DeleteMailing=حذف ایمیل +DeleteAMailing=حذف ایمیل +PreviewMailing=ایمیل پیش +PrepareMailing=آماده ایمیل +CreateMailing=ایجاد ایمیل +MailingDesc=این صفحه به شما اجازه ارسال emailings به یک گروه از مردم. +MailingResult=ایمیل ارسال شود +TestMailing=ایمیل تست +ValidMailing=معتبر ایمیل +ApproveMailing=تصویب ایمیل +MailingStatusDraft=پیش نویس +MailingStatusValidated=اعتبار +MailingStatusApproved=تایید شده +MailingStatusSent=فرستاده +MailingStatusSentPartialy=قسمتی های ارسال شده +MailingStatusSentCompletely=به طور کامل ارسال شد +MailingStatusError=خطا +MailingStatusNotSent=ارسال نشده +MailSuccessfulySent=ایمیل با موفقیت ارسال شد (از%s به%s) +MailingSuccessfullyValidated=ایمیل با موفقیت معتبر +MailUnsubcribe=لغو اشتراک +Unsuscribe=لغو اشتراک +MailingStatusNotContact=آیا تماس نمی +ErrorMailRecipientIsEmpty=نشانی پست الکترونیکی خالی است +WarningNoEMailsAdded=آدرس ایمیل جدید برای اضافه کردن به لیست گیرنده. +ConfirmValidMailing=آیا مطمئن هستید که می خواهید به اعتبار این ایمیل؟ +ConfirmResetMailing=اخطار، توسط reinitializing ایمیل٪، شما اجازه می دهد به ایجاد یک توده از ارسال این ایمیل به زمان دیگر. آیا مطمئن هستید که این همان چیزی است که شما می خواهید انجام دهید؟ +ConfirmDeleteMailing=آیا مطمئن هستید که می خواهید این emailling را حذف کنید؟ +NbOfRecipients=تعداد دریافت کنندگان +NbOfUniqueEMails=NB از ایمیل های منحصر به فرد +NbOfEMails=Nb در ایمیل +TotalNbOfDistinctRecipients=تعداد دریافت کنندگان مشخص +NoTargetYet=بدون دریافت کنندگان تعریف شده است هنوز (برو روی تب در گیرندگان ') +AddRecipients=اضافه کردن دریافت کنندگان +RemoveRecipient=حذف گیرنده +CommonSubstitutions=تعویض مشترک +YouCanAddYourOwnPredefindedListHere=برای ایجاد ایمیل ماژول انتخاب خود را، htdocs / اصلی / ماژول / پستی / README. +EMailTestSubstitutionReplacedByGenericValues=هنگام استفاده از حالت تست، متغیرهای تعویض با ارزش کلی میشه +MailingAddFile=ضمیمه این فایل +NoAttachedFiles=بدون فایل های پیوست شده +BadEMail=ارزش بد برای ایمیل +CloneEMailing=کلون ایمیل +ConfirmCloneEMailing=آیا مطمئن هستید که می خواهید به کلون کردن این ایمیل؟ +CloneContent=پیام کلون +CloneReceivers=دریافت کنندگان Cloner به +DateLastSend=تاریخ و زمان آخرین ارسال +DateSending=تاریخ ارسال +SentTo=ارسال شده به%s +MailingStatusRead=خواندن +CheckRead=خوانده شده رسید +YourMailUnsubcribeOK=ایمیل به%s درست را از لیست پستی unsubcribe است +MailtoEMail=لینک بیش از حد به ایمیل +ActivateCheckRead=اجازه به استفاده از "Unsubcribe" لینک +ActivateCheckReadKey=استفاده از کلید برای رمزگذاری استفاده URL برای "خوانده شده دریافت" و "Unsubcribe" ویژگی +EMailSentToNRecipients=ارسال به%s را دریافت کنندگان ارسال می شود. +XTargetsAdded=%s recipients added into target list +EachInvoiceWillBeAttachedToEmail=یک سند با استفاده از پیش فرض فاکتور قالب سند ایجاد شده و متصل به هر یک از ایمیل. +MailTopicSendRemindUnpaidInvoices=یادآوری از فاکتور از%s (٪ بازدید کنندگان) +SendRemind=ارسال یادآور شده توسط ایمیل +RemindSent=%s را یادآور (بازدید کنندگان) ارسال می شود +AllRecipientSelectedForRemind=همه thirdparties انتخاب شده و اگر یک ایمیل تنظیم شده است (توجه داشته باشید که یک پست الکترونیکی در صورتحساب ارسال خواهد شد) +NoRemindSent=آدرس ایمیل یادآوری ارسال +ResultOfMassSending=نتیجه شده از یادآوری ایمیل انبوه ارسال # Libelle des modules de liste de destinataires mailing -MailingModuleDescContactCompanies=اتصالات لجميع الأطراف الثالثة (العملاء ، والاحتمال ، والمورد ،...) -MailingModuleDescDolibarrUsers=Dolibarr جميع مستخدمي البريد الإلكتروني -MailingModuleDescFundationMembers=مؤسسة البريد الالكتروني للأعضاء -MailingModuleDescEmailsFromFile=رسائل البريد الإلكتروني من ملف نصي (البريد الإلكتروني ؛ اسم الشهرة ؛ التعليقات) -MailingModuleDescEmailsFromUser=EMails from user input (email;lastname;firstname;other) -MailingModuleDescContactsCategories=أطراف ثالثة مع رسائل البريد الإلكتروني (حسب الفئة) -MailingModuleDescDolibarrContractsLinesExpired=أطراف ثالثة مع انتهاء العقد خطوط -MailingModuleDescContactsByCompanyCategory=Contacts/addresses of third parties (by third parties category) -MailingModuleDescContactsByCategory=Contacts/addresses of third parties by category -MailingModuleDescMembersCategories=Foundation members (by categories) -MailingModuleDescContactsByFunction=Contacts/addresses of third parties (by position/function) -LineInFile=خط المستندات في ملف ٪ -RecipientSelectionModules=حددت لطلبات المستفيدين الاختيار -MailSelectedRecipients=اختيار المستفيدين -MailingArea=EMailings المنطقة -LastMailings=ق emailings الماضي ٪ -TargetsStatistics=أهداف الإحصاءات -NbOfCompaniesContacts=فريدة من شركات الاتصالات -MailNoChangePossible=صادق المتلقين للمراسلة لا يمكن تغيير -SearchAMailing=البحث البريدية -SendMailing=إرسال البريد الإلكتروني -SendMail=إرسال بريد إلكتروني -SentBy=أرسلها -MailingNeedCommand=For security reason, sending an emailing is better when performed from command line. If you have one, ask your server administrator to launch the following command to send the emailing to all recipients: -MailingNeedCommand2=ولكن يمكنك إرسالها عبر الإنترنت عن طريق إضافة معلمة MAILING_LIMIT_SENDBYWEB مع قيمة الحد الأقصى لعدد من رسائل البريد الإلكتروني التي تريد إرسالها من خلال هذه الدورة. -ConfirmSendingEmailing=If you can't or prefer sending them with your www browser, please confirm you are sure you want to send emailing now from your browser ? -LimitSendingEmailing=Note: On line sending of emailings are limited for security and timeout reasons to %s recipients by sending session. -TargetsReset=لائحة واضحة -ToClearAllRecipientsClickHere=من الواضح أن المستفيدين قائمة لهذا البريد الإلكتروني ، انقر على زر -ToAddRecipientsChooseHere=إضافة إلى المتلقين ، وتختار في هذه القوائم -NbOfEMailingsReceived=وتلقى كتلة emailings -NbOfEMailingsSend=Mass emailings sent -IdRecord=رقم قياسي -DeliveryReceipt=إيصال استلام -YouCanUseCommaSeparatorForSeveralRecipients=يمكنك استخدام الفاصلة فاصل لتحديد عدد من المتلقين. -TagCheckMail=Track mail opening -TagUnsubscribe=Unsubscribe link -TagSignature=Signature sending user -TagMailtoEmail=Recipient EMail +MailingModuleDescContactCompanies=تماس / آدرس تمام اشخاص ثالث (مشتری، چشم انداز، تامین کننده، ...) +MailingModuleDescDolibarrUsers=کاربران Dolibarr +MailingModuleDescFundationMembers=اعضای بنیاد با ایمیل +MailingModuleDescEmailsFromFile=ایمیل از یک فایل متنی (ایمیل، نام خانوادگی، نام. دیگر) +MailingModuleDescEmailsFromUser=ایمیل از ورودی کاربر (ایمیل، نام خانوادگی، نام. دیگر) +MailingModuleDescContactsCategories=احزاب سوم (بر اساس طبقه بندی) +MailingModuleDescDolibarrContractsLinesExpired=احزاب سوم با خطوط قرارداد منقضی شده است +MailingModuleDescContactsByCompanyCategory=تماس / آدرس اشخاص ثالث (بر اساس طبقه بندی اشخاص ثالث) +MailingModuleDescContactsByCategory=تماس / آدرس اشخاص ثالث بر اساس طبقه بندی +MailingModuleDescMembersCategories=اعضای بنیاد (دسته) +MailingModuleDescContactsByFunction=تماس / آدرس اشخاص ثالث (موقعیت / تابع) +LineInFile=خط٪ در فایل +RecipientSelectionModules=درخواست تعریف شده برای انتخاب گیرنده +MailSelectedRecipients=دریافت کنندگان برگزیده +MailingArea=منطقه EMailings +LastMailings=تاریخ و زمان آخرین%s را emailings +TargetsStatistics=آمار اهداف +NbOfCompaniesContacts=تماس با ما منحصر به فرد / آدرس +MailNoChangePossible=دریافت کنندگان برای ایمیل معتبر نمی تواند تغییر کند +SearchAMailing=جستجو های پستی +SendMailing=ارسال ایمیل +SendMail=ارسال ایمیل +SentBy=ارسال شده توسط +MailingNeedCommand=برای دلیل امنیت، با ارسال یک ایمیل بهتر است زمانی که از خط فرمان انجام می شود. اگر شما یکی، مدیر سرور خود بخواهید برای راه اندازی از دستور زیر برای ارسال ایمیل به همه گیرندگان: +MailingNeedCommand2=با این حال شما می توانید آنها را به صورت آنلاین ارسال شده توسط اضافه کردن MAILING_LIMIT_SENDBYWEB پارامتر با مقدار حداکثر تعداد ایمیل های شما می خواهید به جلسه ارسال کنید. برای این کار، در خانه به - راه اندازی - سایر. +ConfirmSendingEmailing=اگر نمی توانید و یا ترجیح می دهند از ارسال آنها را با مرورگر وب خود، لطفا تایید شما مطمئن هستید که می خواهید برای ارسال ایمیل با شرکت از مرورگر خود هستند؟ +LimitSendingEmailing=توجه داشته باشید: در خط ارسال از emailings برای امنیت و فاصله دلایل به%s دریافت کنندگان با ارسال وارد نمایید محدود شده است. +TargetsReset=لیست پاک کردن +ToClearAllRecipientsClickHere=برای پاک کردن لیست دریافت کننده این ایمیل اینجا را کلیک کنید +ToAddRecipientsChooseHere=اضافه کردن گیرندگان با انتخاب از لیست +NbOfEMailingsReceived=emailings جرم دریافت +NbOfEMailingsSend=emailings انبوه ارسال +IdRecord=ثبت ID +DeliveryReceipt=رسید تحویل +YouCanUseCommaSeparatorForSeveralRecipients=شما می توانید جداکننده کاما از هم را مشخص چندین گیرنده استفاده کنید. +TagCheckMail=پیگیری پست الکترونیکی باز +TagUnsubscribe=لینک لغو عضویت +TagSignature=امضاء ارسال کاربر +TagMailtoEmail=ایمیل دریافت کننده # Module Notifications -Notifications=الإخطارات -NoNotificationsWillBeSent=إشعارات البريد الإلكتروني لا يجري التخطيط لهذا الحدث ، وشركة -ANotificationsWillBeSent=1 سيتم إرسال الإشعار عن طريق البريد الإلكتروني -SomeNotificationsWillBeSent=ق ٪ سوف يتم إرسال الإخطارات عبر البريد الإلكتروني -AddNewNotification=تفعيل جديد طلب إخطار بالبريد الإلكتروني -ListOfActiveNotifications=قائمة البريد الإلكتروني لجميع طلبات الإخطار -ListOfNotificationsDone=أرسلت قائمة جميع اشعارات بالبريد الالكتروني +Notifications=اطلاعیه ها +NoNotificationsWillBeSent=بدون اطلاعیه ها ایمیل ها برای این رویداد و شرکت برنامه ریزی +ANotificationsWillBeSent=1 اطلاع رسانی خواهد شد از طریق ایمیل ارسال می شود +SomeNotificationsWillBeSent=اطلاعیه٪ خواهد شد از طریق ایمیل ارسال می شود +AddNewNotification=فعال کردن یک درخواست ارسال ایمیل جدید +ListOfActiveNotifications=لیست همه درخواست ها ارسال ایمیل فعال +ListOfNotificationsDone=لیست همه اطلاعیه ها ایمیل فرستاده شده diff --git a/htdocs/langs/fa_IR/main.lang b/htdocs/langs/fa_IR/main.lang index 7c81e91d331..d1459eec73b 100644 --- a/htdocs/langs/fa_IR/main.lang +++ b/htdocs/langs/fa_IR/main.lang @@ -6,700 +6,701 @@ DIRECTION=rtl # To read Chinese pdf with Linux: sudo apt-get install poppler-data FONTFORPDF=DejaVuSans FONTSIZEFORPDF=9 -SeparatorDecimal=/ +SeparatorDecimal=. SeparatorThousand=, -FormatDateShort=%d/%m/%Y -FormatDateShortInput=%d/%m/%Y -FormatDateShortJava=dd/MM/yyyy -FormatDateShortJavaInput=dd/MM/yyyy -FormatDateShortJQuery=dd/mm/yy -FormatDateShortJQueryInput=dd/mm/yy +FormatDateShort=%Y/%m/%d +FormatDateShortInput=%Y/%m/%d +FormatDateShortJava=yyyy/MM/dd +FormatDateShortJavaInput=yyyy/MM/dd +FormatDateShortJQuery=yy/mm/dd +FormatDateShortJQueryInput=yy/mm/dd FormatHourShort=%H:%M FormatHourShortDuration=%H:%M FormatDateTextShort=%d %b %Y FormatDateText=%d %B %Y -FormatDateHourShort=%d/%m/%Y %H:%M -FormatDateHourSecShort=%m/%d/%Y %I:%M:%S %p +FormatDateHourShort=%Y/%m/%d %H:%M +FormatDateHourSecShort=%Y/%m/%d %I:%M:%S %p FormatDateHourTextShort=%d %b %Y %H:%M FormatDateHourText=%d %B %Y %H:%M -DatabaseConnection=قاعدة بيانات الصدد -NoTranslation=No translation -NoRecordFound=No record found -NoError=أي خطأ +DatabaseConnection=اتصال به پایگاه داده +NoTranslation=بدون ترجمه +NoRecordFound=هیچ سابقه ای پیدا نشد +NoError=بدون خطا Error=خطا -ErrorFieldRequired=خطا، فیلد '% ها' باید پر شوند -ErrorFieldFormat=الميدان '٪ ق' سيئة القيمة -ErrorFileDoesNotExists=ملف ٪ ق لا يوجد -ErrorFailedToOpenFile=فشل في فتح الملف ٪ ق -ErrorCanNotCreateDir=لا يمكن إنشاء دير ق -ErrorCanNotReadDir=لا يمكن قراءة دير ق -ErrorConstantNotDefined=معلمة ٪s ق لم تحدد -ErrorUnknown=Unknown error -ErrorSQL=خطأ SQL -ErrorLogoFileNotFound=شعار ملف '٪ ق' لم يتم العثور على -ErrorGoToGlobalSetup=اذهب إلى 'شركة / مؤسسة' الإعداد لتثبيت هذا -ErrorGoToModuleSetup=الذهاب الى الوحدة لتحديد هذا الإعداد -ErrorFailedToSendMail=فشل إرسال البريد (ق= ٪ مرسل ، واستقبال= ٪) -ErrorAttachedFilesDisabled=إرفاق ملفات الميزة المعوقين على هذا الخادم -ErrorFileNotUploaded=لم تحميل الملف. تأكد من أن حجمها لا يتجاوز الحد الأقصى المسموح به ، والتي توفر مساحة خالية على القرص الصلب ، وأنه لا يوجد بالفعل ملف بنفس الاسم في هذا الدليل. -ErrorInternalErrorDetected=اكتشاف الخطأ -ErrorNoRequestRan=لا يتعارض مع طلب -ErrorWrongHostParameter=خطأ المضيفة معلمة -ErrorYourCountryIsNotDefined=بلادكم ليست محددة. الذهاب إلى المنزل بين إعداد وتحرير وظيفة ثانية. -ErrorRecordIsUsedByChild=فشل حذف هذا المحضر. ويستخدم هذا السجل على الأقل من الأطفال السجلات. -ErrorWrongValue=قيمة خاطئة -ErrorWrongValueForParameterX=قيمة خاطئة لمعلمة ق ٪ -ErrorNoRequestInError=لا خطأ في الطلب -ErrorServiceUnavailableTryLater=الخدمة غير متاحة لحظة. المحاولة لاحقا. -ErrorDuplicateField=المكررة قيمة فريدة من نوعها في مجال -ErrorSomeErrorWereFoundRollbackIsDone=تم العثور على بعض الأخطاء. نحن تراجع التغييرات. -ErrorConfigParameterNotDefined=المعلم ل ٪ غير محدد Dolibarr داخل ملف conf.php. -ErrorCantLoadUserFromDolibarrDatabase=فشلت في العثور على المستخدم ٪ ق Dolibarr في قاعدة البيانات. -ErrorNoVATRateDefinedForSellerCountry=خطأ ، لم يعرف لمعدلات ضريبة القيمة المضافة فى البلاد ٪ ق. -ErrorNoSocialContributionForSellerCountry=خطأ ، لا يوجد نوع المساهمة الاجتماعية المحددة للبلد '%s'. -ErrorFailedToSaveFile=خطأ ، وفشلت في انقاذ الملف. -ErrorOnlyPngJpgSupported=خطأ فقط. بابوا نيو غينيا ، وجيه. شكل صورة ملف الدعم. -ErrorImageFormatNotSupported=PHP الخاص بك لا يدعم وظائف لتحويل الصور من هذا الشكل. -SetDate=Set date -SelectDate=Select a date -SeeAlso=See also %s -BackgroundColorByDefault=لون الخلفية الافتراضي -FileWasNotUploaded=يتم تحديد ملف مرفق لكنه لم يكن بعد تحميلها. انقر على "ملف إرفاق" لهذا الغرض. -NbOfEntries=ملاحظة : إدخالات -GoToWikiHelpPage=الانترنت تساعد على قراءة (على ضرورة الوصول إلى الإنترنت) -GoToHelpPage=قراءة مساعدة -RecordSaved=سجل المحفوظة -RecordDeleted=Record deleted -LevelOfFeature=مستوى الملامح -NotDefined=غير معرف -DefinedAndHasThisValue=وحددت قيمة -IsNotDefined=غير معروف -DolibarrInHttpAuthenticationSoPasswordUseless=Dolibarr التوثيق هو طريقة الإعداد لق ٪ في ملف conf.php.
    وهذا يعني ان كلمة السر لقاعدة البيانات Dolibarr خارجي ، وذلك في تغيير هذا المجال قد لا يكون من آثار. -Administrator=المدير العام -Undefined=غير معروف -PasswordForgotten=هل نسيت كلمة السر؟ -SeeAbove=انظر أعلاه -HomeArea=مساحة الوطن -LastConnexion=آخر الصدد -PreviousConnexion=السابقة الصدد -ConnectedOnMultiCompany=مرتبطة على الكيان -ConnectedSince=مرتبطة منذ -AuthenticationMode=صحة واسطة -RequestedUrl=وطلب الموقع -DatabaseTypeManager=مدير قاعدة بيانات من نوع -RequestLastAccess=طلب الماضي الوصول إلى قواعد البيانات -RequestLastAccessInError=طلب الماضي في الوصول إلى قاعدة بيانات خطأ -ReturnCodeLastAccessInError=عودة لمدونة الماضي خطأ في الوصول إلى قاعدة البيانات -InformationLastAccessInError=آخر المعلومات عن الوصول إلى قواعد البيانات في خطأ -DolibarrHasDetectedError=Dolibarr اكتشفت خطأ فني -InformationToHelpDiagnose=هذه هي المعلومات التي يمكن أن تساعد على تشخيص -MoreInformation=مزيد من المعلومات -TechnicalInformation=Technical information -NotePublic=علما (العامة) -NotePrivate=المذكرة (الخاصة) -PrecisionUnitIsLimitedToXDecimals=Dolibarr كان الإعداد بدقة للحد من أسعار الوحدات إلى ٪ ق عشرية. -DoTest=اختبار -ToFilter=فلتر -WarningYouHaveAtLeastOneTaskLate=تحذير لديك على الأقل أحد العناصر التي تجاوزت التسامح تأخير. -yes=بلی -Yes=بلی -no=خیر -No=خیر -All=تمام +ErrorFieldRequired=درست است '%s' را مورد نیاز است +ErrorFieldFormat=درست است '%s' را دارد یک مقدار بد +ErrorFileDoesNotExists=فایل%s وجود ندارد +ErrorFailedToOpenFile=برای باز کردن فایل%s شکست خورد +ErrorCanNotCreateDir=نمی توانید ایجاد پوشه از%s +ErrorCanNotReadDir=آیا می توانم به عنوان خوانده شده دیر شده%s +ErrorConstantNotDefined=پارامتر%s را تعریف نشده +ErrorUnknown=خطا مشخص نشده است +ErrorSQL=خطا در SQL +ErrorLogoFileNotFound=فایل لوگو '%s' یافت نشد +ErrorGoToGlobalSetup=برو به راه اندازی "شرکت / بنیاد برای رفع این +ErrorGoToModuleSetup=برو به ماژول راه اندازی به رفع این +ErrorFailedToSendMail=برای ارسال ایمیل (فرستنده =٪ S، گیرنده =٪ بازدید کنندگان) شکست خورد +ErrorAttachedFilesDisabled=اتصال فایل است بر روی این سرور غیر فعال است +ErrorFileNotUploaded=فایل آپلود نشد. بررسی کنید که اندازه حداکثر مجاز تجاوز نمی کند، که فضای خالی موجود بر روی دیسک است و در حال حاضر وجود دارد یک فایل با همین نام در این شاخه. +ErrorInternalErrorDetected=خطا در شناسایی +ErrorNoRequestRan=بدون فرار درخواست +ErrorWrongHostParameter=پارامتر میزبان اشتباه است +ErrorYourCountryIsNotDefined=کشور شما تعریف نشده است. برو به خانه، راه اندازی، ویرایش و ارسال دوباره فرم. +ErrorRecordIsUsedByChild=این رکورد را حذف کنید شکست خورده است. این رکورد توسط حداقل یک پرونده کودک استفاده می شود. +ErrorWrongValue=ارزش اشتباه است +ErrorWrongValueForParameterX=ارزش اشتباه برای پارامتر از%s +ErrorNoRequestInError=بدون درخواست در خطا +ErrorServiceUnavailableTryLater=خدمات برای لحظه ای در دسترس نیست. بعدا دوباره سعی کنید. +ErrorDuplicateField=مقدار تکراری در یک فیلد منحصر به فرد +ErrorSomeErrorWereFoundRollbackIsDone=برخی از خطاهای یافت شد. ما عقبگرد تغییرات. +ErrorConfigParameterNotDefined=پارامتر%s در داخل Dolibarr فایل پیکربندی conf.php تعریف نشده است. +ErrorCantLoadUserFromDolibarrDatabase=برای پیدا کردن کاربر%s در پایگاه داده Dolibarr شکست خورده است. +ErrorNoVATRateDefinedForSellerCountry=خطا، هیچ نرخ مالیات بر ارزش افزوده تعریف شده برای این کشور شد '%s'. +ErrorNoSocialContributionForSellerCountry=خطا، هیچ نوع کمک اجتماعی تعریف شده برای این کشور شد '%s'. +ErrorFailedToSaveFile=خطا، موفق به صرفه جویی در فایل. +ErrorOnlyPngJpgSupported=خطا، تنها. PNG و. تصویر jpg فرمت فایل پشتیبانی می شوند. +ErrorImageFormatNotSupported=PHP شما توابع برای تبدیل تصاویر از این فرمت پشتیبانی نمی کند. +SetDate=تاریخ تنظیم +SelectDate=یک تاریخ را انتخاب کنید +SeeAlso=همچنین نگاه کنید به%s را +BackgroundColorByDefault=رنگ به طور پیش فرض پس زمینه +FileWasNotUploaded=فایل برای پیوست انتخاب شده، اما هنوز ارسال نشده. بر روی "فایل ضمیمه" برای این کلیک کنید. +NbOfEntries=Nb و از نوشته +GoToWikiHelpPage=خوانده شده کمک آنلاین (نیاز به دسترسی به اینترنت) +GoToHelpPage=خوانده شده راهنما +RecordSaved=رکورد ذخیره شده +RecordDeleted=رکورد های حذف شده +LevelOfFeature=سطح از ویژگی های +NotDefined=تعریف نشده +DefinedAndHasThisValue=تعریف و ارزش به +IsNotDefined=تعریف نشده +DolibarrInHttpAuthenticationSoPasswordUseless=Dolibarr حالت تائید راه اندازی به%s در فایل پیکربندی conf.php است.
    این به این معنی است که پایگاه داده رمز عبور در خارج به Dolibarr است، بنابراین تغییر این زمینه ممکن است هیچ اثر داشته باشد. +Administrator=مدیر +Undefined=تعریف نشده +PasswordForgotten=رمز عبور فراموش شده؟ +SeeAbove=در بالا مشاهده کنید +HomeArea=منطقه خانه +LastConnexion=آخرین اتصال +PreviousConnexion=ارتباط قبلی +ConnectedOnMultiCompany=اتصال در محیط زیست +ConnectedSince=از اتصال +AuthenticationMode=حالت مجوزهای +RequestedUrl=آدرس درخواست شده +DatabaseTypeManager=مدیر نوع پایگاه داده +RequestLastAccess=درخواست برای آخرین دسترسی به پایگاه داده +RequestLastAccessInError=درخواست برای آخرین دسترسی به پایگاه داده در خطا +ReturnCodeLastAccessInError=کد بازگشت برای آخرین دسترسی به پایگاه داده در خطا +InformationLastAccessInError=اطلاعات برای آخرین دسترسی به پایگاه داده در خطا +DolibarrHasDetectedError=Dolibarr شناسایی کرده است یک خطای فنی +InformationToHelpDiagnose=این اطلاعات است که می تواند کمک تشخیصی است +MoreInformation=اطلاعات بیشتر +TechnicalInformation=اطلاعات فنی +NotePublic=توجه داشته باشید (عمومی) +NotePrivate=توجه داشته باشید (خصوصی) +PrecisionUnitIsLimitedToXDecimals=Dolibarr راه اندازی به دقت محدود از قیمت واحد به%s اعشار بود. +DoTest=تست +ToFilter=صافی +WarningYouHaveAtLeastOneTaskLate=اخطار، شما باید حداقل یک عنصر است که بیش از تأخیر تحمل. +yes=بله +Yes=بله +no=هیچ +No=بدون +All=همه Home=خانه -Help=راهنما -OnlineHelp=راهنمای آنلاین +Help=کمک +OnlineHelp=کمک آنلاین PageWiki=صفحه ویکی -Always=دائم -Never=هیچوقت -Under=زیر -Period=مدت زمان -PeriodEndDate=زمان انتهای مدت +Always=همیشه +Never=هرگز +Under=تحت +Period=دوره +PeriodEndDate=تاریخ پایان دوره Activate=فعال کردن Activated=فعال Closed=بسته -Closed2=بسته شده -Enabled=روشن -Deprecated=Deprecated -Disable=خاموش کردن -Disabled=خاموش +Closed2=بسته +Enabled=فعال بودن +Deprecated=توصیه +Disable=از کار انداختن +Disabled=غیر فعال Add=اضافه کردن -AddLink=Add link -Update=به روز کردن -AddActionToDo=اضافه کردن به کار های درلیست انجام -AddActionDone=اضافه کردن به لیست کار های انجام شده -Close=بستن -Close2=بستن -Confirm=تایید -ConfirmSendCardByMail=آیا اطمینان دارید که میخواهید محتویات این کارت را به وسیله ایمیل ارسال کنید؟ -Delete=پاک کردن -Remove=حذف کردن +AddLink=اضافه کردن لینک +Update=به روز رسانی +AddActionToDo=اضافه کردن رویداد به انجام +AddActionDone=اضافه کردن رویداد انجام می شود +Close=نزدیک +Close2=نزدیک +Confirm=تکرار +ConfirmSendCardByMail=آیا شما واقعا می خواهید برای ارسال مطالب این کارت از طریق پست به%s؟ +Delete=حذف کردن +Remove=برداشتن Resiliate=Resiliate -Cancel=لغو +Cancel=لغو کردن Modify=تغییر دادن Edit=ویرایش -Validate=تایید کردن -ToValidate=برای تایید -Save=ذخیره سازی -SaveAs=ذخیره سازی جدید -TestConnection=آزمایش اتصال -ToClone=شبیه سازی -ConfirmClone=داده هایی که میخواهید شبیه سازی شوند را انتخاب کنید -NoCloneOptionsSpecified=هیچ داده ای برای شبیه سازی انتخاب نشده -Of=of -Go=Go -Run=Run -CopyOf=کپی از -Show=ظاهر -ShowCardHere=نمایش کار در اینجا +Validate=معتبر ساختن +ToValidate=به اعتبار +Save=جویی در هزینه +SaveAs=ذخیره به عنوان +TestConnection=اتصال تست +ToClone=کلون +ConfirmClone=را انتخاب کنید اطلاعات شما می خواهید به کلون کردن: +NoCloneOptionsSpecified=داده ای برای کلون کردن تعریف شده است. +Of=از +Go=رفتن +Run=دویدن +CopyOf=کپی +Show=نمایش +ShowCardHere=نمایش کارت Search=جستجو -SearchOf=Search -Valid=صحيح -Approve=تایید کردن -ReOpen=دوباره باز کردن -Upload=بارگذاری(آپلود) -ToLink=Link +SearchOf=جستجو +Valid=معتبر +Approve=تصویب +ReOpen=دوباره باز +Upload=ارسال فایل +ToLink=پیوند Select=انتخاب -Choose=انتخاب -ChooseLangage=انتخاب زبا -Resize=تغيير حجم +Choose=را انتخاب کنید +ChooseLangage=لطفا زبان خود را انتخاب کنید +Resize=تغییر اندازه Recenter=Recenter -Author=المؤلف -User=مستخدم -Users=المستخدمين -Group=المجموعة -Groups=المجموعات -Password=كلمة السر -PasswordRetype=أعد كتابة كلمة السر -NoteSomeFeaturesAreDisabled=علما بأن الكثير من السمات / حدات المعوقين في هذه التظاهرة. -Name=اسم +Author=نویسنده +User=کاربر +Users=کاربران +Group=گروه +Groups=گروه +Password=رمز عبور +PasswordRetype=رمز عبور خود را تایپ مجدد +NoteSomeFeaturesAreDisabled=توجه داشته باشید که بسیاری از ویژگی های / ماژول ها در این تظاهرات غیر فعال می باشد. +Name=نام Person=شخص -Parameter=معلمة -Parameters=البارامترات -Value=القيمة -GlobalValue=القيمة العالمية -PersonalValue=القيمة الشخصية -NewValue=قيمة جديدة -CurrentValue=القيمة الحالية -Code=مدونة +Parameter=پارامتر +Parameters=پارامترها +Value=ارزش +GlobalValue=ارزش جهانی +PersonalValue=ارزش شخصی +NewValue=ارزش های جدید +CurrentValue=ارزش کنونی +Code=رمز Type=نوع -Language=لغة -MultiLanguage=متعدد اللغات -Note=علما -CurrentNote=المذكرة -Title=العنوان -Label=العلامة -RefOrLabel=المرجع. أو بطاقة -Info=سجل -Family=عائلة -Description=وصف -Designation=وصف -Model=النموذج -DefaultModel=النموذج الافتراضي -Action=العمل -About=حول -Number=عدد -NumberByMonth=عدد من الشهر -AmountByMonth=Amount by month -Numero=عدد -Limit=الحد -Limits=حدود -DevelopmentTeam=فريق التطوير -Logout=خروج -NoLogoutProcessWithAuthMode=No applicative disconnect feature with authentication mode %s -Connection=صلة -Setup=الإعداد -Alert=حالة تأهب -Previous=السابق -Next=التالي -Cards=بطاقات -Card=بطاقة -Now=الآن -Date=تاريخ -DateStart=تاريخ البدء -DateEnd=نهاية التاريخ -DateCreation=تاريخ الإنشاء -DateModification=تعديل التاريخ -DateModificationShort=Modif. تاريخ -DateLastModification=تاريخ آخر تعديل -DateValidation=تاريخ المصادقة -DateClosing=تاريخ اختتام -DateDue=تاريخ الاستحقاق -DateValue=قيمة التاريخ -DateValueShort=قيمة التاريخ -DateOperation=تاريخ العملية -DateOperationShort=مكتب تعزيز المساواة بين الجنسين. تاريخ -DateLimit=الحد من التاريخ -DateRequest=تاريخ الطلب -DateProcess=تاريخ العملية -DatePlanShort=تاريخ تعتزم -DateRealShort=التاريخ الحقيقي. -DateBuild=التقرير بناء التاريخ -DatePayment=Date of payment -DurationYear=سنة -DurationMonth=الشهر -DurationWeek=الأسبوع -DurationDay=يوم -DurationYears=سنوات -DurationMonths=أشهر -DurationWeeks=أسابيع -DurationDays=أيام -Year=سنة -Month=الشهر -Week=الأسبوع -Day=يوم -Hour=ساعة -Minute=لحظة -Second=الثانية -Years=سنوات -Months=أشهر -Days=أيام -days=أيام -Hours=ساعات -Minutes=دقائق -Seconds=ثانية -Today=اليوم -Yesterday=أمس -Tomorrow=غدا -Morning=Morning -Afternoon=Afternoon -Quadri=قادري -MonthOfDay=خلال شهر من اليوم -HourShort=حاء -Rate=سعر -UseLocalTax=Include tax -Bytes=بايت -KiloBytes=كيلو بايت -MegaBytes=ميغا بايت -GigaBytes=غيغا بايت -TeraBytes=Terabytes +Language=زبان +MultiLanguage=چند زبان +Note=یادداشت +CurrentNote=توجه داشته باشید کنونی +Title=عنوان +Label=برچسب +RefOrLabel=کد عکس. و یا برچسب +Info=ورود +Family=خانواده +Description=توصیف +Designation=توصیف +Model=مدل +DefaultModel=مدل پیش فرض +Action=واقعه +About=در حدود +Number=شماره +NumberByMonth=شماره ماه +AmountByMonth=مقدار در ماه +Numero=شماره +Limit=حد +Limits=محدوده +DevelopmentTeam=تیم توسعه +Logout=خروج از سیستم +NoLogoutProcessWithAuthMode=بدون قابلیت قطع عملی با حالت تائید شده%s +Connection=ارتباط +Setup=برپایی +Alert=هوشیار +Previous=قبلی +Next=بعد +Cards=کارت +Card=کارت +Now=اکنون +Date=تاریخ +DateStart=تاریخ شروع +DateEnd=تاریخ پایان +DateCreation=تاریخ ایجاد +DateModification=تاریخ اصلاح +DateModificationShort=تغییریافته. تاریخ +DateLastModification=آخرین تاریخ اصلاح +DateValidation=تاریخ اعتبار +DateClosing=تاریخ بسته شدن +DateDue=موعد مقرر +DateValue=تاریخ ارزش +DateValueShort=تاریخ ارزش +DateOperation=تاریخ عملیات +DateOperationShort=Oper. تاریخ +DateLimit=تاریخ محدود +DateRequest=تاریخ درخواست +DateProcess=تاریخ فرایند +DatePlanShort=تاریخ برنامه ریزی +DateRealShort=تاریخ واقعی است. +DateBuild=تاریخ گزارش ساخت +DatePayment=تاریخ پرداخت +DurationYear=سال +DurationMonth=ماه +DurationWeek=هفته +DurationDay=روز +DurationYears=سال +DurationMonths=ماه +DurationWeeks=هفته +DurationDays=روز +Year=سال +Month=ماه +Week=هفته +Day=روز +Hour=ساعت +Minute=دقیقه +Second=دوم +Years=سال +Months=ماه گذشته +Days=روز +days=روز +Hours=ساعت +Minutes=دقیقه +Seconds=ثانیه +Today=امروز +Yesterday=دیروز +Tomorrow=فردا +Morning=صبح +Afternoon=بعد از ظهر +Quadri=چهارتایی +MonthOfDay=ماه از روز +HourShort=H +Rate=نرخ +UseLocalTax=شامل مالیات +Bytes=بایت +KiloBytes=کیلوبایت +MegaBytes=مگابایت +GigaBytes=گیگابایت +TeraBytes=ترابایت b=ب. -Kb=كيلو بايت -Mb=ميغابايت -Gb=غيغابايت -Tb=Tb -Cut=قص -Copy=نسخة -Paste=لصق -Default=افتراضي -DefaultValue=القيمة الافتراضية -DefaultGlobalValue=القيمة العالمية -Price=الأسعار -UnitPrice=سعر الوحدة -UnitPriceHT=سعر الوحدة (صافي) -UnitPriceTTC=سعر الوحدة -PriceU=ارتفاع -PriceUHT=ارتفاع (صافي) -PriceUTTC=ارتفاع -Amount=مبلغ -AmountInvoice=مبلغ الفاتورة -AmountPayment=دفع مبلغ -AmountHTShort=مبلغ (صافي) -AmountTTCShort=المبلغ (شركة الضريبية) -AmountHT=المبلغ (صافي الضرائب) -AmountTTC=المبلغ (شركة الضريبية) -AmountVAT=مبلغ الضريبة على القيمة المضافة -AmountLT1=Amount tax 2 -AmountLT2=Amount tax 3 -AmountLT1ES=كمية الطاقة المتجددة -AmountLT2ES=مبلغ IRPF -AmountTotal=المبلغ الإجمالي -AmountAverage=متوسط المبلغ -PriceQtyHT=سعر هذه الكمية (بعد خصم الضريبة) -PriceQtyMinHT=سعر الكمية دقائق. (بعد خصم الضريبة) -PriceQtyTTC=ثمن هذه الكمية (شركة الضرائب) -PriceQtyMinTTC=سعر الكمية دقائق. (شركة الضرائب) -Percentage=ةعومجملاو -Total=المجموع -SubTotal=المجموع الفرعي -TotalHTShort=المجموع (الصافي) -TotalTTCShort=المجموع (شركة الضريبية) -TotalHT=المجموع (الصافي للضريبة) -TotalHTforthispage=Total (net of tax) for this page -TotalTTC=المجموع (شركة الضريبية) -TotalTTCToYourCredit=المجموع (شركة الضريبية) الائتمان الخاصة بك -TotalVAT=مجموع الضريبة على القيمة المضافة -TotalLT1=Total tax 2 -TotalLT2=Total tax 3 -TotalLT1ES=مجموع الطاقة المتجددة -TotalLT2ES=مجموع IRPF -IncludedVAT=وتشمل الضريبة على القيمة المضافة -HT=بعد خصم الضرائب -TTC=شركة ضريبة على القيمة المضافة -VAT=ضريبة القيمة المضافة +Kb=بایت +Mb=مگابایت +Gb=گیگابایت +Tb=سل +Cut=برش +Copy=نسخه +Paste=خمیر +Default=پیش فرض +DefaultValue=ارزش قرار دادی +DefaultGlobalValue=ارزش جهانی +Price=قیمت +UnitPrice=قیمت واحد +UnitPriceHT=قیمت واحد (خالص) +UnitPriceTTC=قیمت واحد +PriceU=UP +PriceUHT=UP (خالص) +PriceUTTC=UP +Amount=مقدار +AmountInvoice=مقدار فاکتور +AmountPayment=مقدار پرداخت +AmountHTShort=مقدار (خالص) +AmountTTCShort=مقدار (مالیات شرکت) +AmountHT=مقدار (خالص از مالیات) +AmountTTC=مقدار (مالیات شرکت) +AmountVAT=مالیات بر مقدار +AmountLT1=مالیات مقدار 2 +AmountLT2=مالیات مقدار 3 +AmountLT1ES=مقدار RE +AmountLT2ES=مقدار IRPF +AmountTotal=مقدار کل +AmountAverage=میانگین مقدار +PriceQtyHT=قیمت این مقدار (خالص از مالیات) +PriceQtyMinHT=دقیقه مقدار قیمت. (خالص از مالیات) +PriceQtyTTC=قیمت این مقدار (مالیات شرکت) +PriceQtyMinTTC=دقیقه مقدار قیمت. (شرکت از مالیات) +Percentage=در صد +Total=کل +SubTotal=جمع جزء +TotalHTShort=مجموع (خالص) +TotalTTCShort=مجموع (مالیات شرکت) +TotalHT=مجموع (خالص از مالیات) +TotalHTforthispage=مجموع (خالص از مالیات) به این صفحه +TotalTTC=مجموع (مالیات شرکت) +TotalTTCToYourCredit=مجموع (مالیات شرکت) به اعتبار شما +TotalVAT=مالیات بر مجموع +TotalLT1=مالیات بر مجموع 2 +TotalLT2=مالیات بر مجموع 3 +TotalLT1ES=مجموع RE +TotalLT2ES=IRPF ها +IncludedVAT=شامل مالیات +HT=خالص از مالیات +TTC=مالیات بر شرکت +VAT=مالیات بر فروش کالا LT1ES=RE LT2ES=IRPF -VATRate=سعر الضريبة على القيمة المضافة +VATRate=نرخ مالیات Average=متوسط -Sum=وخلاصة القول -Delta=الدلتا -Module=وحدة -Option=الخيار -List=قائمة -FullList=القائمة الكاملة -Statistics=احصاءات -OtherStatistics=Other statistics -Status=حالة -ShortInfo=Info. -Ref=المرجع. -RefSupplier=المرجع. المورد -RefPayment=المرجع. الدفع -CommercialProposalsShort=مقترحات تجارية -Comment=التعليق -Comments=تعليقات -ActionsToDo=الإجراءات للقيام -ActionsDone=إجراءات عمله -ActionsToDoShort=القيام -ActionsRunningshort=بدأت -ActionsDoneShort=فعل -ActionNotApplicable=Not applicable -ActionRunningNotStarted=لم تبدأ -ActionRunningShort=بدأت -ActionDoneShort=انتهى -CompanyFoundation=الشركة / المؤسسة -ContactsForCompany=اتصالات لهذا الطرف الثالث -ContactsAddressesForCompany=Contacts/addresses for this third party -AddressesForCompany=Addresses for this third party -ActionsOnCompany=الأعمال حول هذا الطرف الثالث -ActionsOnMember=Events about this member -NActions=ق ٪ الإجراءات -NActionsLate=ق ٪ في وقت متأخر -Filter=فلتر -RemoveFilter=إزالة فلتر -ChartGenerated=رسم ولدت -ChartNotGenerated=رسم لم تولد -GeneratedOn=بناء على المستندات ٪ -Generate=تولد -Duration=المدة -TotalDuration=المدة الإجمالية -Summary=موجز -MyBookmarks=مؤشراتي -OtherInformationsBoxes=معلومات أخرى صناديق -DolibarrBoard=مجلس Dolibarr -DolibarrStateBoard=احصاءات -DolibarrWorkBoard=مهام عمل المجلس -Available=متاح -NotYetAvailable=لم تتوفر بعد -NotAvailable=غير متاحة -Popularity=شعبية -Categories=الفئات -Category=الفئة -By=بواسطة -From=من -to=إلى +Sum=مجموع +Delta=دلتا +Module=واحد +Option=انتخاب +List=فهرست +FullList=لیست کامل +Statistics=ارقام +OtherStatistics=آمار دیگر +Status=وضعیت +ShortInfo=اطلاعات. +Ref=کد عکس. +RefSupplier=کد عکس. تهیه کننده +RefPayment=کد عکس. پرداخت +CommercialProposalsShort=طرح های تجاری +Comment=توضیح +Comments=نظرات +ActionsToDo=رویدادهای به انجام +ActionsDone=رویدادهای انجام شده +ActionsToDoShort=برای انجام این کار +ActionsRunningshort=آغاز شده +ActionsDoneShort=انجام شده +ActionNotApplicable=قابل اجرا نیست +ActionRunningNotStarted=برای شروع +ActionRunningShort=آغاز شده +ActionDoneShort=در دست اجرا +CompanyFoundation=شرکت / موسسه +ContactsForCompany=اطلاعات تماس این شخص ثالث +ContactsAddressesForCompany=تماس / آدرس برای این شخص ثالث +AddressesForCompany=آدرس برای این شخص ثالث +ActionsOnCompany=رویدادها در مورد این شخص ثالث +ActionsOnMember=رویدادها در مورد این عضو +NActions=٪ حوادث +NActionsLate=%s در اواخر +Filter=صافی +RemoveFilter=حذف فیلتر +ChartGenerated=نمودار تولید +ChartNotGenerated=نمودار تولید نمی +GeneratedOn=ساخت در%s +Generate=تولید +Duration=مدت +TotalDuration=مدت زمان کل +Summary=خلاصه +MyBookmarks=بوک مارک من +OtherInformationsBoxes=دیگر جعبه اطلاعات +DolibarrBoard=هیئت مدیره Dolibarr +DolibarrStateBoard=ارقام +DolibarrWorkBoard=وظایف کار هیئت مدیره +Available=در دسترس +NotYetAvailable=هنوز در دسترس نیست +NotAvailable=در دسترس نیست +Popularity=محبوبیت +Categories=دسته بندی ها +Category=رده +By=توسط +From=از +to=به and=و -or=أو -Other=أخرى -Others=آخرون -OtherInformations=معلومات أخرى -Quantity=الكمية -Qty=الكمية -ChangedBy=تغيير -ReCalculate=Recalculate -ResultOk=النجاح -ResultKo=فشل -Reporting=الإبلاغ -Reportings=الإبلاغ -Draft=مسودة -Drafts=المسودات -Validated=صادق -Opened=فتح -New=جديد -Discount=الخصم -Unknown=غير معروف -General=العامة -Size=حجم -Received=وردت -Paid=دفع +or=یا +Other=دیگر +Others=دیگران +OtherInformations=سایر اطلاعات +Quantity=مقدار +Qty=تعداد +ChangedBy=تغییر توسط +ReCalculate=دوباره حساب کردن +ResultOk=موفقیت +ResultKo=شکست +Reporting=گزارش +Reportings=گزارش +Draft=پیش نویس +Drafts=نوعی بازی چکرز +Validated=اعتبار +Opened=افتتاح شد +New=جدید +Discount=تخفیف +Unknown=ناشناخته +General=عمومی +Size=اندازه +Received=رسیده +Paid=پرداخت Topic=Sujet -ByCompanies=الشركات -ByUsers=من قبل المستخدمين -Links=الروابط -Link=رابط -Receipts=إيصالات -Rejects=وترفض -Preview=معاينة -NextStep=الخطوة التالية -PreviousStep=الخطوة السابقة -Datas=Datas -None=بلا -NoneF=بلا -Late=متأخر -Photo=صورة -Photos=الصور -AddPhoto=إضافة صورة -Login=تسجيل الدخول -CurrentLogin=ادخل الحالي -January=كانون الثاني / يناير -February=شباط / فبراير -March=آذار / مارس -April=نيسان / أبريل -May=ربما -June=حزيران / يونيو -July=تموز / يوليو -August=آب / أغسطس -September=أيلول / سبتمبر -October=تشرين الأول / أكتوبر -November=تشرين الثاني / نوفمبر -December=كانون الأول / ديسمبر -JanuaryMin=Jan -FebruaryMin=Feb -MarchMin=Mar -AprilMin=Apr -MayMin=May -JuneMin=Jun -JulyMin=Jul -AugustMin=Aug -SeptemberMin=Sep -OctoberMin=Oct -NovemberMin=Nov -DecemberMin=Dec -Month01=كانون الثاني / يناير -Month02=فبراير +ByCompanies=توسط اشخاص ثالث +ByUsers=با کاربران +Links=ها +Link=پیوند +Receipts=رسید +Rejects=رد +Preview=پیش بازی +NextStep=گام بعدی +PreviousStep=گام قبلی +Datas=اطلاعات +None=هیچ یک +NoneF=هیچ یک +Late=دیر +Photo=تصویر +Photos=تصاویر +AddPhoto=اضافه کردن عکس +Login=ورود به سیستم +CurrentLogin=ورود به سیستم کنونی +January=ژانویه +February=فوریه +March=مارس +April=آوریل +May=مه +June=ژوئن +July=جولای +August=اوت +September=سپتامبر +October=اکتبر +November=نوامبر +December=دسامبر +JanuaryMin=ژان +FebruaryMin=فوریه +MarchMin=ضایع کردن +AprilMin=آوریل +MayMin=مه +JuneMin=ژوئن +JulyMin=ژوئیه +AugustMin=اوت +SeptemberMin=سپتامبر +OctoberMin=اکتبر +NovemberMin=نوامبر +DecemberMin=دسامبر +Month01=ژانویه +Month02=فوریه Month03=مارس -Month04=نيسان / أبريل -Month05=ربما -Month06=يونيو -Month07=يوليو -Month08=آب / أغسطس -Month09=سبتمبر -Month10=أكتوبر -Month11=تشرين الثاني / نوفمبر -Month12=كانون الأول / ديسمبر -MonthShort01=يناير -MonthShort02=فبراير -MonthShort03=مارس -MonthShort04=أبريل -MonthShort05=ربما -MonthShort06=يونيو -MonthShort07=يوليو -MonthShort08=أغسطس -MonthShort09=سبتمبر -MonthShort10=أكتوبر -MonthShort11=نوفمبر -MonthShort12=ديسمبر -AttachedFiles=الملفات والوثائق المرفقة -FileTransferComplete=تم تحميل الملف بنجاح -DateFormatYYYYMM=سنة ملم -DateFormatYYYYMMDD=سنة ملم - دال -DateFormatYYYYMMDDHHMM=سنة ملم بين سمو دال : س. -ReportName=اسم التقرير -ReportPeriod=فترة التقرير -ReportDescription=وصف -Report=تقرير -Keyword=الفحص السنوي clé -Legend=أسطورة -FillTownFromZip=شغل البلدة من الرمز البريدي -Fill=Fill -Reset=Reset -ShowLog=وتظهر الدخول -File=ملف -Files=ملفات -NotAllowed=غير مسموح -ReadPermissionNotAllowed=إذن لا يسمح للقراءة -AmountInCurrency=المبلغ بالعملة ق ٪ +Month04=آوریل +Month05=مه +Month06=ژوئن +Month07=جولای +Month08=اوت +Month09=سپتامبر +Month10=اکتبر +Month11=نوامبر +Month12=دسامبر +MonthShort01=ژان +MonthShort02=فوریه +MonthShort03=ضایع کردن +MonthShort04=آوریل +MonthShort05=مه +MonthShort06=ژوئن +MonthShort07=ژوئیه +MonthShort08=اوت +MonthShort09=سپتامبر +MonthShort10=اکتبر +MonthShort11=نوامبر +MonthShort12=دسامبر +AttachedFiles=اسناد و فایل های پیوست شده +FileTransferComplete=فایل با موفقیت آپلود شد +DateFormatYYYYMM=YYYY-MM +DateFormatYYYYMMDD=YYYY-MM-DD +DateFormatYYYYMMDDHHMM=YYYY-MM-DD HH: SS +ReportName=گزارش نام +ReportPeriod=گزارش دوره +ReportDescription=توصیف +Report=گزارش +Keyword=CLE سخن نغز +Legend=افسانه +FillTownFromZip=پر کردن شهرستان از فایل های فشرده +Fill=پر کردن +Reset=تنظیم مجدد +ShowLog=نمایش ورود به سیستم +File=پرونده +Files=فایل +NotAllowed=مجاز +ReadPermissionNotAllowed=اجازه خوانده شده مجاز نیست +AmountInCurrency=مقدار در ارز از%s Example=مثال -Examples=أمثلة -NoExample=على سبيل المثال لا -FindBug=تقرير خلل -NbOfThirdParties=عدد من الأطراف الثالثة -NbOfCustomers=عدد من العملاء -NbOfLines=عدد الخطوط -NbOfObjects=عدد الأجسام -NbOfReferers=عدد referers -Referers=Referers -TotalQuantity=الكمية الإجمالية -DateFromTo=ل٪ من ق ق ٪ -DateFrom=من ق ٪ -DateUntil=حتى ق ٪ -Check=فحص -Internal=الداخلية -External=الخارجية -Internals=الداخلية -Externals=الخارجية -Warning=تحذير -Warnings=تحذيرات -BuildPDF=بناء الشعبي -RebuildPDF=إعادة بناء الشعبي -BuildDoc=بناء مستدات -RebuildDoc=إعادة بناء مستدات -Entity=كيان -Entities=الكيانات -EventLogs=الجذوع -CustomerPreview=العميل معاينة -SupplierPreview=المورد معاينة -AccountancyPreview=المحاسبة معاينة -ShowCustomerPreview=وتبين للعملاء معاينة -ShowSupplierPreview=وتظهر معاينة المورد -ShowAccountancyPreview=وتظهر معاينة المحاسبة -ShowProspectPreview=وتظهر احتمال معاينة -RefCustomer=المرجع. العميل -Currency=العملة -InfoAdmin=معلومات للإداريين -Undo=تراجع -Redo=إعادة -ExpandAll=توسيع الكل -UndoExpandAll=التراجع عن التوسع -Reason=سبب -FeatureNotYetSupported=ميزة لم يؤيد -CloseWindow=إغلاق النافذة -Question=السؤال -Response=رد -Priority=الأولوية -SendByMail=أرسل عن طريق البريد الالكتروني -MailSentBy=البريد الإلكتروني التي بعث بها -TextUsedInTheMessageBody=هيئة البريد الإلكتروني -SendAcknowledgementByMail=ارسال Ack. عن طريق البريد الإلكتروني -NoEMail=أي بريد إلكتروني -Owner=مالك -DetectedVersion=اكتشاف نسخة -FollowingConstantsWillBeSubstituted=الثوابت التالية ستكون بديلا المقابلة القيمة. -Refresh=تجديد -BackToList=العودة إلى قائمة -GoBack=العودة -CanBeModifiedIfOk=يمكن تعديلها إذا كان صحيحا -CanBeModifiedIfKo=يمكن تعديلها إذا لم يكن صحيحا -RecordModifiedSuccessfully=سجل تعديل بنجاح -RecordsModified=%s records modified -AutomaticCode=مدونة الآلي -NotManaged=لم يفلح -FeatureDisabled=سمة المعوقين -MoveBox=تحرك المربع ٪ ق -Offered=عرض -NotEnoughPermissions=ليس لديك إذن لهذا العمل -SessionName=اسم الدورة -Method=الطريقة -Receive=استقبال -PartialWoman=جزئي -PartialMan=جزئي -TotalWoman=المجموع -TotalMan=المجموع -NeverReceived=لم يتلق -Canceled=ألغى -YouCanChangeValuesForThisListFromDictionarySetup=You can change values for this list from menu setup - dictionary -Color=لون -Documents=ربط الملفات -DocumentsNb=ملفات مرتبطة (%s) -Documents2=وثائق -BuildDocuments=ولدت وثائق -UploadDisabled=تحميل المعوقين -MenuECM=وثائق +Examples=نمونه +NoExample=بدون عنوان مثال +FindBug=گزارش یک اشکال +NbOfThirdParties=تعداد اشخاص ثالث +NbOfCustomers=تعدادی از مشتریان +NbOfLines=تعداد خطوط +NbOfObjects=تعدادی از اشیاء +NbOfReferers=تعداد ارجاعات +Referers=مصرف +TotalQuantity=مقدار کل +DateFromTo=از%s به%s +DateFrom=از%s +DateUntil=تا از%s +Check=بررسی +Internal=داخلی +External=خارجی +Internals=داخلی +Externals=خارجی +Warning=هشدار +Warnings=هشدارها +BuildPDF=ساخت PDF +RebuildPDF=بازسازی PDF +BuildDoc=ساخت فیلم کارگردان تهیه کننده +RebuildDoc=بازسازی توضیحات +Entity=محیط +Entities=اشخاص +EventLogs=گزارش ها +CustomerPreview=پیش نمایش با مشتری +SupplierPreview=پیش نمایش تامین کننده +AccountancyPreview=پیش نمایش حسابداری +ShowCustomerPreview=نشان دادن پیش نمایش مشتری +ShowSupplierPreview=منبع نمایش پیش نمایش +ShowAccountancyPreview=پیش نمایش نشان می دهد حسابداری +ShowProspectPreview=نشان دادن پیش نمایش چشم انداز +RefCustomer=کد عکس. مشتری +Currency=پول +InfoAdmin=اطلاعات برای مدیران +Undo=خنثی کردن +Redo=ازنو +ExpandAll=باز کردن همه +UndoExpandAll=Undo در گسترش +Reason=دلیل +FeatureNotYetSupported=ویژگی هنوز پشتیبانی نشده +CloseWindow=بستن پنجره +Question=سوال +Response=پاسخ +Priority=اولویت +SendByMail=ارسال با ایمیل +MailSentBy=ایمیل های فرستاده شده توسط +TextUsedInTheMessageBody=بدن ایمیل +SendAcknowledgementByMail=ارسال ACK. از طریق ایمیل +NoEMail=بدون پست الکترونیک +NoMobilePhone=No mobile phone +Owner=مالک +DetectedVersion=نسخه یافت شد +FollowingConstantsWillBeSubstituted=ثابت های زیر را با مقدار متناظر جایگزین شده است. +Refresh=تازه کردن +BackToList=بازگشت به لیست +GoBack=بازگشت +CanBeModifiedIfOk=می تواند اصلاح شود اگر معتبر +CanBeModifiedIfKo=می تواند اصلاح شود اگر معتبر نیست +RecordModifiedSuccessfully=رکورد موفقیت اصلاح شده +RecordsModified=٪ پرونده اصلاح شده +AutomaticCode=کد به صورت خودکار +NotManaged=مدیریت نشده +FeatureDisabled=از ویژگی های غیر فعال +MoveBox=جعبه حرکت از%s +Offered=ارائه شده +NotEnoughPermissions=شما اجازه دسترسی به این اقدام ندارد +SessionName=نام و نام خانوادگی را وارد نمایید +Method=روش +Receive=دریافت +PartialWoman=بخشی +PartialMan=بخشی +TotalWoman=کل +TotalMan=کل +NeverReceived=هرگز دریافت +Canceled=لغو شد +YouCanChangeValuesForThisListFromDictionarySetup=شما می توانید مقادیر را برای این لیست را از تنظیمات منو را تغییر دهید - فرهنگ لغت +Color=رنگ +Documents=فایل های مرتبط +DocumentsNb=فایل های لینک شده (٪ بازدید کنندگان) +Documents2=اسناد +BuildDocuments=اسناد تولید شده +UploadDisabled=بارگذاری غیر فعال است +MenuECM=اسناد MenuAWStats=AWStats -MenuMembers=أعضاء -MenuAgendaGoogle=جوجل جدول الأعمال -ThisLimitIsDefinedInSetup=Dolibarr الحد (القائمة المنزل الإعداد للأمن) : ٪ ق كيلو بايت ، PHP الحد : ٪ ق كيلو بايت -NoFileFound=لا الوثائق المحفوظة في هذا المجلد -CurrentUserLanguage=الصيغة الحالية -CurrentTheme=الموضوع الحالي -CurrentMenuManager=Current menu manager -DisabledModules=والمعوقين وحدات -For=لأجل -ForCustomer=الزبون -Signature=التوقيع -HidePassword=وتبين للقيادة مع كلمة السر الخفي -UnHidePassword=وتظهر واضحة للقيادة حقيقية كلمة السر -Root=جذور -Informations=معلومات -Page=صفحة -Notes=وتلاحظ -AddNewLine=إضافة خط جديد -AddFile=إضافة ملف -ListOfFiles=قائمة الملفات المتوفرة -FreeZone=Free entry -FreeLineOfType=Free entry of type -CloneMainAttributes=استنساخ وجوه مع السمات الرئيسية -PDFMerge=دمج الشعبي -Merge=دمج -PrintContentArea=وتظهر الصفحة الرئيسية لطباعة ناحية المحتوى -MenuManager=Menu manager -NoMenu=لا القائمة الفرعية -WarningYouAreInMaintenanceMode=انذار ، كنت في وضع الصيانة ، %s الدخول فقط بحيث يتم السماح لاستخدام التطبيق في الوقت الراهن. -CoreErrorTitle=System error -CoreErrorMessage=Sorry, an error occurred. Check the logs or contact your system administrator. -CreditCard=بطاقة الائتمان -FieldsWithAreMandatory=حقول إلزامية مع %s -FieldsWithIsForPublic=%s تظهر الحقول التي تحتوي على قائمة العامة للأعضاء. إذا كنت لا تريد هذا ، والتحقق من "العامة" مربع. -AccordingToGeoIPDatabase=(وفقا لGeoIP التحويل) +MenuMembers=کاربران +MenuAgendaGoogle=دستور کار گوگل +ThisLimitIsDefinedInSetup=Dolibarr حد (منو خانه راه اندازی امنیت):%s را کیلو بایت، محدود PHP:%s را بایت +NoFileFound=بدون اسناد ذخیره شده در این شاخه +CurrentUserLanguage=زبان کنونی +CurrentTheme=موضوع کنونی +CurrentMenuManager=مدیر منو کنونی +DisabledModules=ماژول های غیر فعال +For=برای +ForCustomer=برای مشتری +Signature=امضا +HidePassword=نمایش دستور با رمز پنهان +UnHidePassword=نمایش دستور واقعی با رمز عبور روشن +Root=ریشه +Informations=اطلاعات +Page=صفحه +Notes=یادداشت ها +AddNewLine=اضافه کردن خط جدید +AddFile=اضافه کردن فایل +ListOfFiles=لیست فایل های موجود +FreeZone=ورود رایگان +FreeLineOfType=ورود رایگان از نوع +CloneMainAttributes=شی کلون با ویژگی های اصلی آن +PDFMerge=PDF ادغام +Merge=ادغام کردن +PrintContentArea=نمایش صفحه به چاپ منطقه محتوای اصلی +MenuManager=مدیریت منو +NoMenu=بدون زیر منو +WarningYouAreInMaintenanceMode=اخطار، شما در یک حالت تعمیر و نگهداری می باشد، بنابراین تنها ورود به%s را مجاز به استفاده از نرم افزار در حال حاضر. +CoreErrorTitle=خطای سیستم +CoreErrorMessage=متأسفیم، خطایی رخ داده است. بررسی سیاهههای مربوط و یا تماس با مدیر سیستم خود. +CreditCard=کارت های اعتباری +FieldsWithAreMandatory=زمینه با%s الزامی است +FieldsWithIsForPublic=مواردی که با%s را در لیست عمومی کاربران نشان داده شده است. اگر شما این کار را می خواهید نیست، چک کردن جعبه "عمومی". +AccordingToGeoIPDatabase=(با توجه به تبدیل GeoIP با) Line=خط -NotSupported=غير معتمد -RequiredField=الحقل مطلوب -Result=نتيجة -ToTest=اختبار -ValidateBefore=يجب التحقق من صحة البطاقة قبل استخدام هذه الميزة -Visibility=وضوح -Private=خاص -Hidden=مخفي -Resources=موارد -Source=مصدر -Prefix=بادئة -Before=Before -After=After -IPAddress=IP address -Frequency=Frequency -IM=Instant messaging -NewAttribute=New attribute -AttributeCode=Attribute code -OptionalFieldsSetup=Extra attributes setup -URLPhoto=URL of photo/logo -SetLinkToThirdParty=Link to another third party -CreateDraft=إنشاء مشروع -ClickToEdit=Click to edit -ObjectDeleted=Object %s deleted -ByCountry=By country -ByTown=By town -ByDate=By date -ByMonthYear=By month/year -ByYear=By year -ByMonth=By month -ByDay=By day -BySalesRepresentative=By sales representative -LinkedToSpecificUsers=Linked to a particular user contact -DeleteAFile=Delete a file -ConfirmDeleteAFile=Are you sure you want to delete file -NoResults=No results -ModulesSystemTools=Modules tools -Test=Test -Element=Element -NoPhotoYet=No pictures available yet -HomeDashboard=Home summary -Deductible=Deductible -from=from -toward=toward -Access=Access -HelpCopyToClipboard=Use Ctrl+C to copy to clipboard -SaveUploadedFileWithMask=Save file on server with name "%s" (otherwise "%s") -OriginFileName=Original filename -SetDemandReason=Set source -ViewPrivateNote=View notes -XMoreLines=%s line(s) hidden -PublicUrl=Public URL +NotSupported=پشتیبانی نمی شود +RequiredField=زمینه مورد نیاز +Result=نتیجه +ToTest=تست +ValidateBefore=کارت باید قبل از استفاده از این ویژگی معتبر +Visibility=دید +Private=خصوصی +Hidden=پنهان +Resources=منابع +Source=منبع +Prefix=پیشوند +Before=قبل از +After=پس از +IPAddress=آدرس IP +Frequency=فرکانس +IM=پیام های فوری +NewAttribute=ویژگی های جدید +AttributeCode=ویژگی کد +OptionalFieldsSetup=راه اندازی ویژگی های اضافی +URLPhoto=URL عکس / آرم +SetLinkToThirdParty=لینک به شخص ثالث دیگری +CreateDraft=ایجاد پیش نویس +ClickToEdit=برای ویرایش کلیک کنید +ObjectDeleted=شیء%s را حذف +ByCountry=براساس کشور +ByTown=توسط شهر +ByDate=بر اساس تاریخ +ByMonthYear=در ماه / سال +ByYear=در سال +ByMonth=در ماه +ByDay=به روز +BySalesRepresentative=با نمایندگی فروش +LinkedToSpecificUsers=لینک به تماس با کاربر خاص +DeleteAFile=حذف یک فایل +ConfirmDeleteAFile=آیا مطمئن هستید که می خواهید به حذف فایل +NoResults=هیچ نتیجه ای +ModulesSystemTools=ماژول ابزار +Test=تست +Element=عنصر +NoPhotoYet=بدون ورود دست هنوز +HomeDashboard=خلاصه صفحه اصلی +Deductible=مالیات پذیر +from=از +toward=نسبت به +Access=دسترسی +HelpCopyToClipboard=استفاده از کلیدهای Ctrl + C برای کپی به کلیپ بورد +SaveUploadedFileWithMask=ذخیره فایل بر روی سرور با نام "%s" (در غیر این صورت "%s") +OriginFileName=نام فایل اصلی +SetDemandReason=تنظیم منبع +ViewPrivateNote=مشاهده یادداشت +XMoreLines=٪ خط (بازدید کنندگان) پنهان +PublicUrl=URL عمومی # Week day -Monday=Monday -Tuesday=Tuesday -Wednesday=Wednesday -Thursday=Thursday -Friday=Friday -Saturday=Saturday -Sunday=Sunday -MondayMin=Mo -TuesdayMin=Tu -WednesdayMin=We -ThursdayMin=Th -FridayMin=Fr -SaturdayMin=Sa -SundayMin=Su -Day1=الاثنين -Day2=الثلاثاء -Day3=الأربعاء -Day4=الخميس -Day5=جمعة -Day6=السبت -Day0=الأحد -ShortMonday=م -ShortTuesday=تي -ShortWednesday=دبليو -ShortThursday=تي -ShortFriday=واو -ShortSaturday=دإ -ShortSunday=دإ +Monday=دوشنبه +Tuesday=سهشنبه +Wednesday=چهار شنبه +Thursday=پنج شنبه +Friday=جمعه +Saturday=روز شنبه +Sunday=یکشنبه +MondayMin=مو +TuesdayMin=توو +WednesdayMin=ما +ThursdayMin=توریم +FridayMin=چاپی +SaturdayMin=سعید +SundayMin=سو +Day1=دوشنبه +Day2=سهشنبه +Day3=چهار شنبه +Day4=پنج شنبه +Day5=جمعه +Day6=روز شنبه +Day0=یکشنبه +ShortMonday=M +ShortTuesday=T +ShortWednesday=W +ShortThursday=T +ShortFriday=F +ShortSaturday=S +ShortSunday=S diff --git a/htdocs/langs/fa_IR/margins.lang b/htdocs/langs/fa_IR/margins.lang index ac2e3e87070..b5de2f43621 100644 --- a/htdocs/langs/fa_IR/margins.lang +++ b/htdocs/langs/fa_IR/margins.lang @@ -1,50 +1,41 @@ # Dolibarr language file - Source file is en_US - marges -Margin=Margin -Margins=Margins -TotalMargin=Total Margin -MarginOnProducts=Margin / Products -MarginOnServices=Margin / Services -MarginRate=Margin rate -MarkRate=Mark rate -DisplayMarginRates=Display margin rates -DisplayMarkRates=Display mark rates -InputPrice=Input price - -margin=Profit margins management -margesSetup=Profit margins management setup - -MarginDetails=Margin details - -ProductMargins=Product margins -CustomerMargins=Customer margins -SalesRepresentativeMargins=Sales representative margins - -ProductService=المنتج أو الخدمة -AllProducts=All products and services -ChooseProduct/Service=Choose product or service - -StartDate=تاريخ البدء -EndDate=نهاية التاريخ -Launch=يبدأ - -ForceBuyingPriceIfNull=Force buying price if null -ForceBuyingPriceIfNullDetails=if "ON", margin will be zero on line (buying price = selling price), otherwise ("OFF"), marge will be equal to selling price (buying price = 0) -MARGIN_METHODE_FOR_DISCOUNT=Margin method for global discounts -UseDiscountAsProduct=As a product -UseDiscountAsService=As a service -UseDiscountOnTotal=On subtotal -MARGIN_METHODE_FOR_DISCOUNT_DETAILS=Defines if a global discount is treated as a product, a service, or only on subtotal for margin calculation. - -MARGIN_TYPE=Margin type -MargeBrute=Raw margin -MargeNette=Net margin -MARGIN_TYPE_DETAILS=Raw margin : Selling price - Buying price
    Net margin : Selling price - Cost price - -CostPrice=Cost price -BuyingCost=Cost price -UnitCharges=Unit charges -Charges=Charges - -AgentContactType=Commercial agent contact type -AgentContactTypeDetails=Défine what contact type (linked on invoices) will be used for margin report by commercial agents +Margin=حاشیه +Margins=حاشیه +TotalMargin=حاشیه ها +MarginOnProducts=حاشیه / محصولات +MarginOnServices=حاشیه / خدمات +MarginRate=میزان مارجین +MarkRate=نرخ علامت گذاری +DisplayMarginRates=نرخ حاشیه نمایش +DisplayMarkRates=نرخ علامت گذاری به عنوان صفحه نمایش +InputPrice=قیمت ورودی +margin=مدیریت سود +margesSetup=راه اندازی مدیریت سود +MarginDetails=جزئیات حاشیه +ProductMargins=حاشیه های محصولات +CustomerMargins=حاشیه مشتری +SalesRepresentativeMargins=فروش حاشیه نماینده +ProductService=محصولات و خدمات +AllProducts=همه محصولات و خدمات +ChooseProduct/Service=انتخاب محصول و یا خدمات +StartDate=تاریخ شروع +EndDate=تاریخ پایان +Launch=شروع +ForceBuyingPriceIfNull=نیروی قیمت خرید اگر تهی +ForceBuyingPriceIfNullDetails=اگر "ON"، حاشیه صفر خواهد بود در خط (خرید قیمت = قیمت فروش)، در غیر این صورت ("OFF")، مرگ به قیمت فروش برابر خواهد بود با (قیمت خرید = 0) +MARGIN_METHODE_FOR_DISCOUNT=روش مارجین برای تخفیف جهانی +UseDiscountAsProduct=به عنوان یک محصول +UseDiscountAsService=به عنوان یک سرویس +UseDiscountOnTotal=در ساب توتال +MARGIN_METHODE_FOR_DISCOUNT_DETAILS=معرفی می کند اگر تخفیف های جهانی به عنوان یک محصول، سرویس و یا فقط در ساب توتال برای محاسبه حاشیه درمان می شود. +MARGIN_TYPE=نوع حاشیه +MargeBrute=حاشیه خام +MargeNette=حاشیه خالص +MARGIN_TYPE_DETAILS=حاشیه خام: فروش قیمت - خرید قیمت
    حاشیه خالص: فروش قیمت - قیمت تمام شده +CostPrice=قیمت تمام شده +BuyingCost=قیمت تمام شده +UnitCharges=اتهامات واحد +Charges=عوارض +AgentContactType=عامل تجاری و نوع تماس +AgentContactTypeDetails=تعریف نوع آنچه در تماس با (مرتبط در فاکتورها) برای گزارش حاشیه های عامل تجاری استفاده می شود diff --git a/htdocs/langs/fa_IR/members.lang b/htdocs/langs/fa_IR/members.lang index 544886b7477..142a3e9dd00 100644 --- a/htdocs/langs/fa_IR/members.lang +++ b/htdocs/langs/fa_IR/members.lang @@ -1,204 +1,205 @@ # Dolibarr language file - Source file is en_US - members -MembersArea=منطقة الأعضاء -PublicMembersArea=أعضاء منطقة العامة -MemberCard=بطاقة عضو -SubscriptionCard=بطاقة الاشتراك +MembersArea=بخش کاربران +PublicMembersArea=بخش کاربران عمومی +MemberCard=کارت اعضا +SubscriptionCard=کارت اشتراک Member=عضو -Members=أعضاء -MemberAccount=دخول الأعضاء -ShowMember=وتظهر بطاقة عضو -UserNotLinkedToMember=المستخدم لا ترتبط عضو -# ThirdpartyNotLinkedToMember=Third-party not linked to a member -MembersTickets=أعضاء التذاكر -FundationMembers=أعضاء المؤسسة -Attributs=الصفات -ErrorMemberTypeNotDefined=عضو نوع غير معرف -ListOfPublicMembers=قائمة بأسماء أعضاء العمومية -ListOfValidatedPublicMembers=قائمة الأعضاء العامة المصادق -ErrorThisMemberIsNotPublic=ليست عضوا في هذا العام -ErrorMemberIsAlreadyLinkedToThisThirdParty=عضو آخر (الاسم : ٪ ق ، ادخل : ٪) مرتبطة بالفعل الى طرف ثالث ٪ ق. إزالة هذه الوصلة الاولى بسبب طرف ثالث لا يمكن أن يرتبط فقط عضو (والعكس بالعكس). -ErrorUserPermissionAllowsToLinksToItselfOnly=لأسباب أمنية ، يجب أن تمنح أذونات لتحرير جميع المستخدمين لتكون قادرة على ربط عضو لمستخدم هذا ليس لك. -ThisIsContentOfYourCard=هذه هي تفاصيل بطاقتك -CardContent=مضمون البطاقة الخاصة بك عضوا -SetLinkToUser=وصلة إلى مستخدم Dolibarr -SetLinkToThirdParty=وصلة إلى طرف ثالث Dolibarr -MembersCards=أعضاء طباعة البطاقات -MembersList=قائمة الأعضاء -MembersListToValid=قائمة مشاريع أعضاء (ينبغي التأكد من صحة) -MembersListValid=قائمة أعضاء صالحة -MembersListUpToDate=قائمة الأعضاء صالحة لغاية تاريخ الاكتتاب -MembersListNotUpToDate=قائمة صحيحة مع أعضاء من تاريخ الاكتتاب -MembersListResiliated=قائمة الأعضاء resiliated -MembersListQualified=قائمة الأعضاء المؤهلين -MenuMembersToValidate=أعضاء مشروع -MenuMembersValidated=صادق أعضاء -MenuMembersUpToDate=حتى الآن من أعضاء -MenuMembersNotUpToDate=وحتى الآن من أصل أعضاء -MenuMembersResiliated=أعضاء Resiliated -# MembersWithSubscriptionToReceive=Members with subscription to receive -DateAbonment=تاريخ الاكتتاب -DateSubscription=تاريخ الاكتتاب -DateNextSubscription=الاكتتاب القادم -DateEndSubscription=تاريخ انتهاء الاكتتاب -EndSubscription=انتهاء الاكتتاب -SubscriptionId=الاكتتاب معرف -MemberId=عضو المعرف -NewMember=عضو جديد -NewType=عضو جديد من نوع -MemberType=عضو نوع -MemberTypeId=عضو نوع معرف -MemberTypeLabel=عضو نوع العلامة -MembersTypes=أعضاء أنواع -MembersAttributes=أعضاء الصفات -SearchAMember=البحث عن عضو -MemberStatusDraft=مشروع (لا بد من التحقق من صحة) -MemberStatusDraftShort=مسودة -MemberStatusActive=صادق (تنتظر الاكتتاب) -MemberStatusActiveShort=صادق -MemberStatusActiveLate=انتهاء الاكتتاب -MemberStatusActiveLateShort=انتهى -MemberStatusPaid=الاكتتاب حتى الآن -MemberStatusPaidShort=حتى الآن +Members=کاربران +MemberAccount=ورود اعضا +ShowMember=کارت نمایش عضو +UserNotLinkedToMember=کاربر به یک عضو مرتبط نیست +ThirdpartyNotLinkedToMember=شخص ثالث به عضو لینک نشده است +MembersTickets=کاربران بلیط +FundationMembers=اعضای بنیاد +Attributs=خواص +ErrorMemberTypeNotDefined=نوع کاربران تعریف نشده +ListOfPublicMembers=فهرست کاربران عمومی +ListOfValidatedPublicMembers=فهرست کاربران عمومی معتبر +ErrorThisMemberIsNotPublic=این عضو است عمومی نمی +ErrorMemberIsAlreadyLinkedToThisThirdParty=یکی دیگر از عضو (نام و نام خانوادگی:٪ S، وارد کنید:%s) در حال حاضر به شخص ثالث%s در ارتباط است. حذف این لینک برای اولین بار به دلیل یک شخص ثالث می تواند تنها به یک عضو (و بالعکس) پیوند داده نمی شود. +ErrorUserPermissionAllowsToLinksToItselfOnly=به دلایل امنیتی، شما باید مجوز اعطا شده به ویرایش تمام کاربران قادر به پیوند عضو به یک کاربر است که مال شما نیست. +ThisIsContentOfYourCard=این جزئیات از کارت شما است +CardContent=محتوا از کارت عضو شما +SetLinkToUser=پیوند به یک کاربر Dolibarr +SetLinkToThirdParty=لینک به شخص ثالث Dolibarr +MembersCards=کاربران کارت های کسب و کار +MembersList=فهرست کاربران +MembersListToValid=لیست اعضای پیش نویس (به اعتبار شود) +MembersListValid=لیست اعضای معتبر +MembersListUpToDate=فهرست کاربران معتبر با به اشتراک عضویت +MembersListNotUpToDate=فهرست کاربران معتبر با اشتراک از تاریخ +MembersListResiliated=لیست اعضای resiliated +MembersListQualified=لیست اعضای واجد شرایط +MenuMembersToValidate=عضو پیش نویس +MenuMembersValidated=اعضای اعتبار +MenuMembersUpToDate=تا اعضای تاریخ +MenuMembersNotUpToDate=از اعضای تاریخ +MenuMembersResiliated=اعضای Resiliated +MembersWithSubscriptionToReceive=کاربران با اشتراک برای دریافت +DateAbonment=تاریخ ثبت نام +DateSubscription=تاریخ ثبت نام +DateNextSubscription=اشتراک بعدی +DateEndSubscription=تاریخ پایان ثبت نام +EndSubscription=اشتراک پایان +SubscriptionId=شناسه اشتراک +MemberId=نام کاربری +NewMember=عضو جدید +NewType=نوع عضو جدید +MemberType=نوع کاربران +MemberTypeId=نوع شناسه عضو +MemberTypeLabel=نوع کاربران برچسب +MembersTypes=انواع کاربران +MembersAttributes=ویژگی های کاربران +SearchAMember=جستجو در +MemberStatusDraft=پیش نویس (نیاز به تایید می شود) +MemberStatusDraftShort=پیش نویس +MemberStatusActive=اعتبار (انتظار آبونمان) +MemberStatusActiveShort=اعتبار +MemberStatusActiveLate=اشتراک منقضی +MemberStatusActiveLateShort=منقضی شده +MemberStatusPaid=اشتراک به روز +MemberStatusPaidShort=به روز MemberStatusResiliated=عضو Resiliated MemberStatusResiliatedShort=Resiliated -MembersStatusToValid=أعضاء مشروع -MembersStatusToValidShort=أعضاء مشروع -MembersStatusValidated=صادق أعضاء -MembersStatusPaid=الاكتتاب حتى الآن -MembersStatusPaidShort=حتى الآن -MembersStatusNotPaid=الاكتتاب قديمة -MembersStatusNotPaidShort=عفا عليها الزمن -MembersStatusResiliated=أعضاء Resiliated -MembersStatusResiliatedShort=أعضاء Resiliated -NewCotisation=مساهمة جديدة -PaymentSubscription=دفع مساهمة جديدة -EditMember=عضو تحرير -SubscriptionEndDate=تاريخ انتهاء الاكتتاب -MembersTypeSetup=أعضاء نوع الإعداد -NewSubscription=إشتراك جديد -# NewSubscriptionDesc=This form allows you to record your subscription as a new member of the foundation. If you want to renew your subscription (if already a member), please contact foundation board instead by email %s. -Subscription=الاكتتاب -Subscriptions=الاشتراكات -SubscriptionLate=متأخر -SubscriptionNotReceived=الاشتراك لم يتلق -SubscriptionLateShort=متأخر -SubscriptionNotReceivedShort=لم يتلق -ListOfSubscriptions=قائمة الاشتراكات -SendCardByMail=أرسل بطاقة -AddMember=إضافة عضو -MemberType=عضو نوع -NoTypeDefinedGoToSetup=لا يجوز لأي عضو في أنواع محددة. الذهاب إلى الإعداد -- أنواع الأعضاء -NewMemberType=عضو جديد من نوع -WelcomeEMail=مرحبا بك في البريد الإلكتروني -SubscriptionRequired=الاشتراك المطلوب -EditType=عضو تحرير نوع -DeleteType=حذف -VoteAllowed=يسمح التصويت -Physical=المادية -Moral=الأخلاقية -MorPhy=المعنوية / المادية -Reenable=Reenable -ResiliateMember=عضو Resiliate -ConfirmResiliateMember=هل أنت متأكد من أن هذا resiliate؟ +MembersStatusToValid=عضو پیش نویس +MembersStatusToValidShort=عضو پیش نویس +MembersStatusValidated=اعضای اعتبار +MembersStatusPaid=اشتراک به روز +MembersStatusPaidShort=به روز +MembersStatusNotPaid=اشتراک از تاریخ +MembersStatusNotPaidShort=از تاریخ +MembersStatusResiliated=اعضای Resiliated +MembersStatusResiliatedShort=اعضای Resiliated +NewCotisation=سهم های جدید +PaymentSubscription=پرداخت سهم جدید +EditMember=ویرایش عضو +SubscriptionEndDate=تاریخ پایان اشتراک در +MembersTypeSetup=نوع کاربران راه اندازی +NewSubscription=اشتراک جدید +NewSubscriptionDesc=این فرم به شما قابلیت ضبط اشتراک خود را به عنوان یک عضو جدید از پایه و اساس. اگر می خواهید به تمدید اشتراک خود را (اگر در حال حاضر عضو)، لطفا به جای تماس با هیئت مدیره بنیاد از طریق ایمیل٪ است. +Subscription=اشتراک +Subscriptions=اشتراک ها +SubscriptionLate=دیر +SubscriptionNotReceived=اشتراک هرگز دریافت +SubscriptionLateShort=دیر +SubscriptionNotReceivedShort=هرگز دریافت +ListOfSubscriptions=فهرست اشتراک ها +SendCardByMail=ارسال کارت توسط ایمیل +AddMember=اضافه کردن کاربر +NoTypeDefinedGoToSetup=هیچ نوع عضو تعریف شده است. برو به منوی "انواع کاربران" +NewMemberType=نوع عضو جدید +WelcomeEMail=خوش آمدید ایمیل +SubscriptionRequired=اشتراک مورد نیاز +EditType=نوع ویرایش عضو +DeleteType=حذف کردن +VoteAllowed=رای اجازه +Physical=فیزیکی +Moral=اخلاقی +MorPhy=با اخلاق / فیزیکی +Reenable=را دوباره فعال کنید +ResiliateMember=Resiliate عضو +ConfirmResiliateMember=آیا مطمئن هستید که می خواهید به resiliate این عضو؟ DeleteMember=حذف عضو -ConfirmDeleteMember=هل أنت متأكد من أنك تريد حذف هذا العضو (عضو حذف حذف كل ما له الاشتراك؟ -DeleteSubscription=الغاء الاشتراك -ConfirmDeleteSubscription=هل أنت متأكد من أنك تريد حذف هذا الاشتراك؟ -Filehtpasswd=htpasswd الملف -ValidateMember=صحة عضوا -ConfirmValidateMember=هل أنت متأكد أنك تريد التحقق من صحة هذا؟ -FollowingLinksArePublic=الارتباطات التالية تفتح صفحة لا يحمي أي Dolibarr تصريح. فهي ليست formated صفحة ، تقدم مثالا على الكيفية التي تظهر في قائمة الأعضاء في قاعدة البيانات. -PublicMemberList=عضو في لائحة عامة -BlankSubscriptionForm=استمارة الاشتراك -# BlankSubscriptionFormDesc=Dolibarr can provide you a public URL to allow external visitors to ask to subscribe to the foundation. If an online payment module is enabled, a payment form will also be automatically provided. -# EnablePublicSubscriptionForm=Enable the public auto-subscription form -MemberPublicLinks=الروابط العامة / صفحات -ExportDataset_member_1=واشتراكات الأعضاء -ImportDataset_member_1=أعضاء -LastMembers=ق أعضاء الماضي ٪ -LastMembersModified=آخر تعديل اعضاء ق ٪ -# LastSubscriptionsModified=Last %s modified subscriptions -AttributeName=اسم السمة -String=سلسلة -Text=النص -Int=Int -Date=تاريخ -DateAndTime=التاريخ والوقت -PublicMemberCard=عضو بطاقة العامة -MemberNotOrNoMoreExpectedToSubscribe=أو ليست عضوا في أي أكثر من المتوقع للاكتتاب -AddSubscription=إضافة اشتراك -ShowSubscription=وتظهر اكتتاب -MemberModifiedInDolibarr=عضو في تعديل Dolibarr -SendAnEMailToMember=البريد الإلكتروني لإرسال معلومات العضو -# DescADHERENT_AUTOREGISTER_NOTIF_MAIL_SUBJECT=Subject of the e-mail received in case of auto-inscription of a guest -# DescADHERENT_AUTOREGISTER_NOTIF_MAIL=E-mail received in case of auto-inscription of a guest -DescADHERENT_AUTOREGISTER_MAIL_SUBJECT=بريد إلكتروني الموضوع لautosubscription الأعضاء -DescADHERENT_AUTOREGISTER_MAIL=البريد الإلكتروني لعضو autosubscription -DescADHERENT_MAIL_VALID_SUBJECT=البريد الإلكتروني لعضو في موضوع المصادقة -DescADHERENT_MAIL_VALID=البريد الإلكتروني لعضو المصادقة -DescADHERENT_MAIL_COTIS_SUBJECT=موضوع البريد الالكتروني للاكتتاب -DescADHERENT_MAIL_COTIS=البريد الالكتروني للاكتتاب -DescADHERENT_MAIL_RESIL_SUBJECT=موضوع البريد الإلكتروني لعضو resiliation -DescADHERENT_MAIL_RESIL=البريد الإلكتروني لعضو resiliation -DescADHERENT_MAIL_FROM=البريد الإلكتروني للمرسل البريد الإلكتروني التلقائي -DescADHERENT_ETIQUETTE_TYPE=علامات الشكل -# DescADHERENT_ETIQUETTE_TEXT=Text printed on member address sheets -DescADHERENT_CARD_TYPE=شكل بطاقات صفحة -DescADHERENT_CARD_HEADER_TEXT=نص مطبوع على رأس عضو البطاقات -DescADHERENT_CARD_TEXT=نص مطبوع على بطاقات الأعضاء -DescADHERENT_CARD_TEXT_RIGHT=النص المطبوع على بطاقات الأعضاء (في محاذاة اليمين) -DescADHERENT_CARD_FOOTER_TEXT=نص مطبوع على أسفل بطاقات الأعضاء -# GlobalConfigUsedIfNotDefined=Text defined in Foundation module setup will be used if not defined here -# MayBeOverwrited=This text can be overwrited by value defined for member's type -ShowTypeCard=وتبين من نوع '٪ ق' -HTPasswordExport=الملف htpassword جيل -NoThirdPartyAssociatedToMember=لم يرتبط بها من طرف ثالث لهذا العضو -ThirdPartyDolibarr=Dolibarr طرف ثالث -MembersAndSubscriptions= وأعضاء Subscriptions -MoreActions=تكميلية العمل على تسجيل -# MoreActionsOnSubscription=Complementary action, suggested by default when recording a subscription -MoreActionBankDirect=إنشاء سجل المعاملات مباشرة على حساب -MoreActionBankViaInvoice=إنشاء الفاتورة والدفع على حساب -MoreActionInvoiceOnly=إنشاء فاتورة مع دفع أي مبلغ -LinkToGeneratedPages=بطاقات زيارة انتج -LinkToGeneratedPagesDesc=هذه الشاشة تسمح لك لإنشاء ملفات الشعبي مع بطاقات العمل لجميع أعضاء أو عضو معين. -DocForAllMembersCards=إنشاء بطاقات العمل لجميع أعضاء (تنسيق الإعداد للإخراج في الواقع : %s) -DocForOneMemberCards=إنشاء بطاقات العمل لعضو معين (تنسيق الإعداد للإخراج في الواقع : %s) -DocForLabels=أوراق عنوان انتج (تنسيق الإعداد للإخراج فعلا : %s) -# SubscriptionPayment=Subscription payment -LastSubscriptionDate=آخر موعد الاكتتاب -LastSubscriptionAmount=الاكتتاب المبلغ الأخير -# MembersStatisticsByCountries=Members statistics by country -# MembersStatisticsByState=Members statistics by state/province -# MembersStatisticsByTown=Members statistics by town -# NbOfMembers=Number of members -# NoValidatedMemberYet=No validated members found -# MembersByCountryDesc=This screen show you statistics on members by countries. Graphic depends however on Google online graph service and is available only if an internet connection is is working. -# MembersByStateDesc=This screen show you statistics on members by state/provinces/canton. -# MembersByTownDesc=This screen show you statistics on members by town. -# MembersStatisticsDesc=Choose statistics you want to read... -MenuMembersStats=احصاءات -# LastMemberDate=Last member date -# Nature=Nature -# Public=Information are public -# Exports=Exports -# NewMemberbyWeb=New member added. Awaiting approval -# NewMemberForm=New member form -# SubscriptionsStatistics=Statistics on subscriptions -# NbOfSubscriptions=Number of subscriptions -# AmountOfSubscriptions=Amount of subscriptions -# TurnoverOrBudget=Turnover (for a company) or Budget (for a foundation) -# DefaultAmount=Default amount of subscription -# CanEditAmount=Visitor can choose/edit amount of its subscription -# MEMBER_NEWFORM_PAYONLINE=Jump on integrated online payment page -# Associations=Foundations -# Collectivités=Organizations -# Particuliers=Personal -Entreprises=الشركات -# DOLIBARRFOUNDATION_PAYMENT_FORM=To make your subscription payment using a bank transfer, see page http://wiki.dolibarr.org/index.php/Subscribe.
    To pay using a Credit Card or Paypal, click on button at bottom of this page.
    -# ByProperties=By characteristics -# MembersStatisticsByProperties=Members statistics by characteristics -# MembersByNature=Members by nature -# VATToUseForSubscriptions=VAT rate to use for subscriptions -# NoVatOnSubscription=No TVA for subscriptions -# MEMBER_PAYONLINE_SENDEMAIL=Email to warn when Dolibarr receive a confirmation of a validated payment for subscription +ConfirmDeleteMember=آیا مطمئن هستید که می خواهید به حذف این عضو (حذف یک عضو تمام اشتراک های خود را حذف کنید)؟ +DeleteSubscription=حذف اشتراک +ConfirmDeleteSubscription=آیا مطمئن هستید که می خواهید این اشتراک را حذف کنید؟ +Filehtpasswd=فایل htpasswd +ValidateMember=اعتبارسنجی عضو +ConfirmValidateMember=آیا مطمئن هستید که می خواهید به اعتبار این عضو؟ +FollowingLinksArePublic=لینک های زیر صفحات باز شده توسط هر اجازه Dolibarr محافظت نشده است. آنها صفحات formated نیست، که به عنوان مثال برای نشان دادن چگونگی به لیست پایگاه داده کاربران. +PublicMemberList=فهرست کاربران عمومی +BlankSubscriptionForm=شکل خودکار اشتراک عمومی +BlankSubscriptionFormDesc=Dolibarr می تواند به شما URL های عمومی ارائه اجازه می دهد تا بازدید کننده خارجی به درخواست برای عضویت در پایه و اساس. اگر یک ماژول پرداخت آنلاین فعال باشد، به صورت پرداخت نیز به صورت خودکار ارائه خواهند شد. +EnablePublicSubscriptionForm=فعال کردن فرم خودکار اشتراک عمومی +MemberPublicLinks=لینک های عمومی / صفحات +ExportDataset_member_1=کاربران و اشتراک +ImportDataset_member_1=کاربران +LastMembers=عضو تاریخ و زمان آخرین٪ بازدید کنندگان +LastMembersModified=تاریخ و زمان آخرین٪ اعضای اصلاح شده +LastSubscriptionsModified=تاریخ و زمان آخرین%s به اشتراک اصلاح شده +AttributeName=نام صفت +String=رشته +Text=متن +Int=بین المللی +Date=تاریخ +DateAndTime=تاریخ و زمان +PublicMemberCard=کاربران کارت های عمومی +MemberNotOrNoMoreExpectedToSubscribe=کاربران بیشتری انتظار می رود نیست و یا هیچ به اشتراک +AddSubscription=اضافه کردن اشتراک +ShowSubscription=نمایش اشتراک +MemberModifiedInDolibarr=کاربران تغییر در Dolibarr +SendAnEMailToMember=ارسال ایمیل به اطلاعات به عضو +DescADHERENT_AUTOREGISTER_NOTIF_MAIL_SUBJECT=موضوع ایمیل را دریافت کرده در مورد خودکار کتیبه مهمان +DescADHERENT_AUTOREGISTER_NOTIF_MAIL=فرستادن به ایمیل دریافت در صورت خودکار کتیبه مهمان +DescADHERENT_AUTOREGISTER_MAIL_SUBJECT=موضوع ایمیل برای autosubscription عضو +DescADHERENT_AUTOREGISTER_MAIL=ایمیل برای autosubscription عضو +DescADHERENT_MAIL_VALID_SUBJECT=موضوع ایمیل برای اعتبار سنجی کاربران +DescADHERENT_MAIL_VALID=ایمیل برای اعتبار سنجی کاربران +DescADHERENT_MAIL_COTIS_SUBJECT=موضوع ایمیل برای اشتراک +DescADHERENT_MAIL_COTIS=ایمیل اشتراک +DescADHERENT_MAIL_RESIL_SUBJECT=موضوع ایمیل برای resiliation عضو +DescADHERENT_MAIL_RESIL=ایمیل برای resiliation عضو +DescADHERENT_MAIL_FROM=ایمیل فرستنده برای ایمیل های خودکار +DescADHERENT_ETIQUETTE_TYPE=فرمت صفحه برچسب ها +DescADHERENT_ETIQUETTE_TEXT=متن چاپ شده بر روی ورق آدرس عضو +DescADHERENT_CARD_TYPE=فرمت صفحه کارت +DescADHERENT_CARD_HEADER_TEXT=متن چاپ شده در بالای کارت های عضو +DescADHERENT_CARD_TEXT=متن چاپ شده بر روی کارت های عضو (چین در سمت چپ) +DescADHERENT_CARD_TEXT_RIGHT=متن چاپ شده بر روی کارت های عضو (چین در سمت راست) +DescADHERENT_CARD_FOOTER_TEXT=متن چاپ شده در پایین از کارت های عضو +GlobalConfigUsedIfNotDefined=متن تعریف شده در راه اندازی ماژول بنیاد استفاده خواهد شد اگر در اینجا تعریف نشده +MayBeOverwrited=این متن را می توان با مقدار مشخص شده برای نوع عضو overwrited +ShowTypeCard=نمایش نوع «%s ' +HTPasswordExport=نسل فایل htpassword +NoThirdPartyAssociatedToMember=بدون شخص ثالث مرتبط به این کاربر +ThirdPartyDolibarr=شخص ثالث Dolibarr +MembersAndSubscriptions= کاربران و اشتراک +MoreActions=اقدام مکمل در ضبط +MoreActionsOnSubscription=اقدام مکمل، پیشنهاد به طور پیش فرض هنگام ضبط اشتراک +MoreActionBankDirect=ایجاد یک رکورد معامله مستقیم بر روی حساب کاربری +MoreActionBankViaInvoice=ایجاد یک صورت حساب و پرداخت در حساب +MoreActionInvoiceOnly=ایجاد یک فاکتور بدون پرداخت +LinkToGeneratedPages=ایجاد کارت های کسب و +LinkToGeneratedPagesDesc=این صفحه نمایش شما اجازه می دهد برای تولید فایل های PDF با کارت های کسب و کار برای همه اعضای خود را یا یکی از اعضای خاص است. +DocForAllMembersCards=ایجاد کارت های کسب و کار برای همه اعضای +DocForOneMemberCards=ایجاد کارت های کسب و کار برای یک عضو خاص +DocForLabels=تولید ورق آدرس +SubscriptionPayment=پرداخت اشتراک +LastSubscriptionDate=آخرین تاریخ اشتراک +LastSubscriptionAmount=تاریخ و زمان آخرین مبلغ آبونمان +MembersStatisticsByCountries=آمار کاربران بر اساس کشور +MembersStatisticsByState=آمار کاربران توسط ایالت / استان +MembersStatisticsByTown=آمار کاربران توسط شهر +MembersStatisticsByRegion=آمار کاربران بر اساس منطقه +MemberByRegion=تعداد کاربران بر اساس منطقه +NbOfMembers=تعداد اعضا +NoValidatedMemberYet=هیچ اعتبار یافت +MembersByCountryDesc=این صفحه آمار در اعضا را با کشورهای به شما نشان دهد. گرافیک در گوگل خدمات گراف آنلاین بستگی دارد با این حال و در دسترس است تنها در صورت اتصال به اینترنت در حال کار است. +MembersByStateDesc=این صفحه آمار در عضو های دولتی / استان / کانتون شما نشان می دهد. +MembersByTownDesc=این صفحه آمار در عضو های شهر شما نشان می دهد. +MembersStatisticsDesc=را انتخاب کنید آمار شما می خواهید به عنوان خوانده شده ... +MenuMembersStats=ارقام +LastMemberDate=آخرین تاریخ عضو +Nature=طبیعت +Public=اطلاعات عمومی +Exports=صادرات +NewMemberbyWeb=عضو جدید اضافه شده است. در انتظار تایید +NewMemberForm=فرم عضو جدید +SubscriptionsStatistics=آمار اشتراک +NbOfSubscriptions=تعداد اشتراک +AmountOfSubscriptions=میزان اشتراک ها +TurnoverOrBudget=گردش مالی (برای یک شرکت) و یا بودجه (برای پایه) +DefaultAmount=مقدار پیش فرض از اشتراک +CanEditAmount=بازدید کنندگان می توانند / ویرایش میزان اشتراک خود را انتخاب کنید +MEMBER_NEWFORM_PAYONLINE=پرش در یکپارچه صفحه پرداخت آنلاین +Associations=مبانی +Collectivités=سازمان ها +Particuliers=شخصی +Entreprises=شرکت +DOLIBARRFOUNDATION_PAYMENT_FORM=برای پرداخت اشتراک خود را با استفاده از یک انتقال بانکی، صفحه را ببینید http://wiki.dolibarr.org/index.php/Subscribe .
    برای پرداخت با استفاده از یک کارت اعتباری یا پی پال، بر روی دکمه در پایین این صفحه کلیک کنید.
    +ByProperties=با ویژگی +MembersStatisticsByProperties=آمار کاربران توسط ویژگی +MembersByNature=کاربران از طبیعت +VATToUseForSubscriptions=نرخ مالیات بر ارزش افزوده برای استفاده از اشتراک ها +NoVatOnSubscription=بدون TVA برای اشتراک +MEMBER_PAYONLINE_SENDEMAIL=ایمیل برای هشدار دادن به هنگام Dolibarr دریافت تایید از پرداخت اعتبار برای اشتراک diff --git a/htdocs/langs/fa_IR/opensurvey.lang b/htdocs/langs/fa_IR/opensurvey.lang index 7d27651338e..c77a85f28b6 100644 --- a/htdocs/langs/fa_IR/opensurvey.lang +++ b/htdocs/langs/fa_IR/opensurvey.lang @@ -1,66 +1,66 @@ # Dolibarr language file - Source file is en_US - opensurvey -# Survey=Poll -# Surveys=Polls -# OrganizeYourMeetingEasily=Organize your meetings and polls easily. First select type of poll... -# NewSurvey=New poll -# NoSurveysInDatabase=%s poll(s) into database. -# OpenSurveyArea=Polls area -# AddACommentForPoll=You can add a comment into poll... -# AddComment=Add comment -# CreatePoll=Create poll -# PollTitle=Poll title -# ToReceiveEMailForEachVote=Receive an email for each vote -# TypeDate=Type date -# TypeClassic=Type standard -# OpenSurveyStep2=Select your dates amoung the free days (grey). The selected days are green. You can unselect a day previously selected by clicking again on it -# RemoveAllDays=Remove all days -# CopyHoursOfFirstDay=Copy hours of first day -# RemoveAllHours=Remove all hours -# SelectedDays=Selected days -# TheBestChoice=The best choice currently is -# TheBestChoices=The best choices currently are -# with=with -# OpenSurveyHowTo=If you agree to vote in this poll, you have to give your name, choose the values that fit best for you and validate with the plus button at the end of the line. -# CommentsOfVoters=Comments of voters -# ConfirmRemovalOfPoll=Are you sure you want to remove this poll (and all votes) -# RemovePoll=Remove poll -# UrlForSurvey=URL to communicate to get a direct access to poll -# PollOnChoice=You are creating a poll to make a multi-choice for a poll. First enter all possible choices for your poll: -# CreateSurveyDate=Create a date poll -# CreateSurveyStandard=Create a standard poll -# CheckBox=Simple checkbox -# YesNoList=List (empty/yes/no) -# PourContreList=List (empty/for/against) -# AddNewColumn=Add new column -# TitleChoice=Choice label -# ExportSpreadsheet=Export result spreadsheet -ExpireDate=الحد من التاريخ -# NbOfSurveys=Number of polls -# NbOfVoters=Nb of voters -# SurveyResults=Results -# PollAdminDesc=You are allowed to change all vote lines of this poll with button "Edit". You can, as well, remove a column or a line with %s. You can also add a new column with %s. -# 5MoreChoices=5 more choices -# Abstention=Abstention -# Against=Against -# YouAreInivitedToVote=You are invited to vote for this poll -# VoteNameAlreadyExists=This name was already used for this poll -# ErrorPollDoesNotExists=Error, poll %s does not exists. -# OpenSurveyNothingToSetup=There is no specific setup to do. -# PollWillExpire=Your poll will expire automatically %s days after the last date of your poll. -# AddADate=Add a date -# AddStartHour=Add start hour -# AddEndHour=Add end hour -# votes=vote(s) -# NoCommentYet=No comments have been posted for this poll yet -# CanEditVotes=Can change vote of others -# CanComment=Voters can comment in the poll -# CanSeeOthersVote=Voters can see other people's vote -# SelectDayDesc=For each selected day, you can choose, or not, meeting hours in the following format :
    - empty,
    - "8h", "8H" or "8:00" to give a meeting's start hour,
    - "8-11", "8h-11h", "8H-11H" or "8:00-11:00" to give a meeting's start and end hour,
    - "8h15-11h15", "8H15-11H15" or "8:15-11:15" for the same thing but with minutes. -# BackToCurrentMonth=Back to current month -# ErrorOpenSurveyFillFirstSection=You haven't filled the first section of the poll creation -# ErrorOpenSurveyOneChoice=Enter at least one choice -# ErrorOpenSurveyDateFormat=Date must have the format YYYY-MM-DD -# ErrorInsertingComment=There was an error while inserting your comment -# MoreChoices=Enter more choices for the voters -# SurveyExpiredInfo=The voting time of this poll has expired. -# EmailSomeoneVoted=%s has filled a line.\nYou can find your poll at the link: \n%s +Survey=رای +Surveys=نظرسنجی ها +OrganizeYourMeetingEasily=سازماندهی جلسات و نظر سنجی خود را به راحتی. نوع اول را انتخاب کنید نظر سنجی ... +NewSurvey=نظرسنجی جدید +NoSurveysInDatabase=٪ بازدید کنندگان نظر سنجی (ها) را به پایگاه داده باشد. +OpenSurveyArea=منطقه نظرسنجی ها +AddACommentForPoll=شما می توانید یک نظر به نظر سنجی اضافه کنید ... +AddComment=اضافه کردن نظر +CreatePoll=ایجاد نظرسنجی +PollTitle=عنوان نظرسنجی +ToReceiveEMailForEachVote=یک ایمیل دریافت خواهید کرد برای هر رای +TypeDate=تاریخ نوع +TypeClassic=نوع استاندارد +OpenSurveyStep2=تاریخ های خود را در میان روز رایگان (خاکستری) را انتخاب کنید. روز انتخاب شده به رنگ سبز می باشد. شما می توانید یک روز پیش از انتخاب با کلیک دوباره بر روی آن را انتخاب +RemoveAllDays=حذف تمام روز +CopyHoursOfFirstDay=ساعت کپی از روز اول +RemoveAllHours=حذف تمام ساعت +SelectedDays=روز انتخاب شده +TheBestChoice=بهترین انتخاب در حال حاضر است +TheBestChoices=بهترین انتخاب در حال حاضر است +with=با +OpenSurveyHowTo=اگر شما توافق می کنید به رای دادن در این نظرسنجی رای دهید، شما باید به نام خود، به ارزش های که مناسب برای شما بهتر است را انتخاب کنید و اعتبار با دکمه به علاوه در پایان خط. +CommentsOfVoters=نظرات رای دهندگان +ConfirmRemovalOfPoll=آیا مطمئن هستید که می خواهید به حذف این نظرسنجی رای دهید (و همه رای) +RemovePoll=حذف نظر سنجی +UrlForSurvey=URL برای برقراری ارتباط برای به دست آوردن دسترسی مستقیم به نظرسنجی رای دهید. +PollOnChoice=شما در حال ایجاد یک نظرسنجی را به یک چند انتخابی نظر سنجی. نخست وارد کنید تمام گزینه های ممکن را برای نظرسنجی شما: +CreateSurveyDate=ایجاد یک نظرسنجی تاریخ +CreateSurveyStandard=ایجاد یک نظرسنجی استاندارد +CheckBox=گزینه ساده +YesNoList=فهرست (خالی / بله / خیر) +PourContreList=فهرست (خالی / برای / علیه) +AddNewColumn=اضافه کردن ستون جدید +TitleChoice=برچسب انتخاب +ExportSpreadsheet=نتیجه صادرات گسترده +ExpireDate=تاریخ محدود +NbOfSurveys=مجموع نظرسنجی +NbOfVoters=Nb و از رای دهندگان +SurveyResults=نتایج +PollAdminDesc=شما مجاز به تغییر تمام خطوط رای این نظرسنجی با دکمه "ویرایش". شما می توانید، و همچنین، حذف یک ستون یا یک خط با%s. شما همچنین می توانید یک ستون جدید با%s اضافه کنید. +5MoreChoices=5 انتخاب های بیشتر +Abstention=خودداری از دادن رای +Against=در برابر +YouAreInivitedToVote=از شما دعوت شده برای این نظرسنجی رای دهید +VoteNameAlreadyExists=این نام از قبل برای این نظر سنجی مورد استفاده قرار گرفت +ErrorPollDoesNotExists=خطا، نظرسنجی از%s می کند وجود ندارد. +OpenSurveyNothingToSetup=هیچ تنظیم خاصی برای انجام این کار وجود دارد. +PollWillExpire=نظر سنجی شما به طور خودکار به%s را روز پس از آخرین روز از نظرسنجی شما منقضی خواهد شد. +AddADate=اضافه کردن یک تاریخ +AddStartHour=اضافه کردن شروع ساعت +AddEndHour=اضافه کردن پایان ساعت +votes=رای (ها) +NoCommentYet=هیچ نظری برای این نظرسنجی رای دهید ارسال نشده است +CanEditVotes=آیا می توانم به رای دیگران را تغییر دهید +CanComment=رای دهندگان می توانند در این نظرسنجی نظر +CanSeeOthersVote=رای دهندگان می توانند رای افراد دیگر را مشاهده کنید +SelectDayDesc=برای هر روز انتخاب شده، شما می توانید انتخاب کنید، یا نه، جلسه ساعت در فرمت های زیر است:
    - خالی،
    - "8H"، "8H" و یا "08:00" به شروع ساعت در جلسه،
    - "8-11"، "8H-11h"، "8H-11H" و یا "8:00-11:00" به شروع جلسه و در پایان ساعت،
    - "8h15-11h15"، "8H15-11H15" و یا "8:15-11:15" برای همین قضیه ولی با دقیقه. +BackToCurrentMonth=برگشت به ماه جاری +ErrorOpenSurveyFillFirstSection=شما اولین بخش ایجاد نظرسنجی را پر نمی کند +ErrorOpenSurveyOneChoice=حداقل یک انتخاب را وارد کنید +ErrorOpenSurveyDateFormat=تاریخ باید به فرمت YYYY-MM-DD +ErrorInsertingComment=خطایی وجود دارد در حالی که قرار دادن نظر شما +MoreChoices=انتخاب های بیشتر برای رای دهندگان را وارد کنید +SurveyExpiredInfo=زمان رای گیری از این نظرسنجی به پایان رسیده است. +EmailSomeoneVoted=%s را تا به یک خط پر شده است. شما می توانید نظر سنجی خود را در لینک پیدا کنید:%s diff --git a/htdocs/langs/fa_IR/orders.lang b/htdocs/langs/fa_IR/orders.lang index 0957503add1..d41523555b8 100644 --- a/htdocs/langs/fa_IR/orders.lang +++ b/htdocs/langs/fa_IR/orders.lang @@ -1,168 +1,163 @@ # Dolibarr language file - Source file is en_US - orders -OrdersArea=أوامر منطقة العملاء -SuppliersOrdersArea=الموردين أوامر المنطقة -OrderCard=من أجل بطاقة -# OrderId=Order Id -Order=ترتيب -Orders=أوامر -OrderLine=من أجل خط -OrderFollow=متابعة -OrderDate=من أجل التاريخ -OrderToProcess=من أجل عملية -NewOrder=النظام الجديد -ToOrder=ومن أجل جعل -MakeOrder=ومن أجل جعل -SupplierOrder=من أجل المورد -SuppliersOrders=الموردين أوامر -SuppliersOrdersRunning=الحالية الموردين أوامر -CustomerOrder=عملاء النظام -CustomersOrders=الزبائن -CustomersOrdersRunning=الحالية الزبائن -CustomersOrdersAndOrdersLines=أوامر العملاء وأوامر خطوط -OrdersToValid=أوامر صالحة -OrdersToBill=أوامر لمشروع قانون -OrdersInProcess=الأوامر في عملية -OrdersToProcess=أوامر لعملية -# SuppliersOrdersToProcess=Supplier's orders to process -StatusOrderCanceledShort=ألغى -StatusOrderDraftShort=مسودة -StatusOrderValidatedShort=صادق -StatusOrderSentShort=في العملية -# StatusOrderSent=Shipment in process -StatusOrderOnProcessShort=على عملية -StatusOrderProcessedShort=تجهيز -StatusOrderToBillShort=على مشروع قانون -StatusOrderToBill2Short=على مشروع قانون -StatusOrderApprovedShort=وافق -StatusOrderRefusedShort=رفض -StatusOrderToProcessShort=لعملية -StatusOrderReceivedPartiallyShort=تلقى جزئيا -StatusOrderReceivedAllShort=وتلقى كل شيء -StatusOrderCanceled=ألغى -StatusOrderDraft=مشروع (لا بد من التحقق من صحة) -StatusOrderValidated=صادق -StatusOrderOnProcess=على عملية -StatusOrderProcessed=تجهيز -StatusOrderToBill=على مشروع قانون -StatusOrderToBill2=على مشروع قانون -StatusOrderApproved=وافق -StatusOrderRefused=رفض -StatusOrderReceivedPartially=تلقى جزئيا -StatusOrderReceivedAll=وتلقى كل شيء -# ShippingExist=A shipment exists -DraftOrWaitingApproved=الموافقة على مشروع أو لم يأمر بعد -DraftOrWaitingShipped=مشروع مصادق عليه أو لم تشحن -MenuOrdersToBill=أوامر لمشروع قانون -# MenuOrdersToBill2=Orders to bill -SearchOrder=من أجل البحث -# SearchACustomerOrder=Search a customer order -ShipProduct=سفينة المنتج -Discount=الخصم -CreateOrder=خلق أمر -RefuseOrder=رفض النظام -ApproveOrder=قبول النظام -ValidateOrder=من أجل التحقق من صحة -# UnvalidateOrder=Unvalidate order -DeleteOrder=من أجل حذف -CancelOrder=من أجل إلغاء -AddOrder=من أجل إضافة -AddToMyOrders=أضف إلى أوامر -AddToOtherOrders=إضافة إلى أوامر أخرى -# AddToDraftOrders=Add to draft order -ShowOrder=وتبين من أجل -NoOpenedOrders=أي أوامر فتح -NoOtherOpenedOrders=أي أوامر فتح -# NoDraftOrders=No draft orders -OtherOrders=أوامر أخرى -LastOrders=ق الماضي أوامر ٪ -LastModifiedOrders=آخر تعديل أوامر ق ٪ -LastClosedOrders=٪ ق الماضي أوامر مغلقة -AllOrders=جميع أوامر -NbOfOrders=عدد الأوامر -OrdersStatistics=أوامر إحصاءات -OrdersStatisticsSuppliers=المورد أوامر إحصاءات -NumberOfOrdersByMonth=عدد أوامر الشهر -# AmountOfOrdersByMonthHT=Amount of orders by month (net of tax) -ListOfOrders=قائمة الأوامر -CloseOrder=وثيق من أجل -ConfirmCloseOrder=هل أنت متأكد من أجل اقفال هذا؟ مرة واحدة أمر قد انتهى ، فإنه لا يمكن إلا أن يكون فواتير. -ConfirmCloseOrderIfSending=هل أنت متأكد من أجل اقفال هذا؟ يجب عليك أمر وثيق إلا عندما يتم شحن جميع. -ConfirmDeleteOrder=هل أنت متأكد من أنك تريد حذف هذا النظام؟ -ConfirmValidateOrder=هل أنت متأكد أنك تريد التحقق من صحة هذا الأمر تحت اسم ٪ ق؟ -# ConfirmUnvalidateOrder=Are you sure you want to restore order %s to draft status ? -ConfirmCancelOrder=هل أنت متأكد من أنك تريد إلغاء هذا النظام؟ -ConfirmMakeOrder=هل أنت متأكد من أن يؤكد لك هذا النظام على ٪ ق؟ -GenerateBill=توليد الفاتورة -# ClassifyShipped=Classify delivered -ClassifyBilled=تصنيف "فواتير" -ComptaCard=بطاقة المحاسبة -DraftOrders=مشروع أوامر -RelatedOrders=الأوامر ذات الصلة -OnProcessOrders=على عملية أوامر -RefOrder=المرجع. ترتيب -RefCustomerOrder=المرجع. عملاء النظام -CustomerOrder=عملاء النظام -RefCustomerOrderShort=المرجع. العملاء. ترتيب -SendOrderByMail=لكي ترسل عن طريق البريد -ActionsOnOrder=إجراءات من أجل -NoArticleOfTypeProduct=أي مادة من نوع 'منتج' حتى لا مادة للشحن لهذا النظام -OrderMode=طريقة أوامر -AuthorRequest=طلب مقدم البلاغ -UseCustomerContactAsOrderRecipientIfExist=استخدام العميل عنوان الاتصال إذا حددت بدلا من التصدي لطرف ثالث من أجل التصدي للمتلقي -RunningOrders=أوامر بشأن عملية -UserWithApproveOrderGrant=مع منح المستخدمين "الموافقة على أوامر" إذن. -PaymentOrderRef=من أجل دفع ق ٪ -CloneOrder=استنساخ النظام -ConfirmCloneOrder=هل أنت متأكد من أن هذا الأمر استنساخ ٪ ق؟ -DispatchSupplierOrder=%s استقبال النظام مورد +OrdersArea=منطقه سفارشات مشتریان +SuppliersOrdersArea=منطقه سفارشات تولید کنندگان +OrderCard=کارت منظور +OrderId=سفارش کد سفارش +Order=سفارش +Orders=سفارشات +OrderLine=خط منظور +OrderFollow=پیگیری +OrderDate=تاریخ سفارش +OrderToProcess=منظور پردازش +NewOrder=سفارش +ToOrder=سفارش +MakeOrder=سفارش +SupplierOrder=منظور تامین کننده +SuppliersOrders=سفارشات تولید کنندگان +SuppliersOrdersRunning=سفارشات تامین کنندگان کنونی +CustomerOrder=سفارش مشتری +CustomersOrders=سفارشات مشتری +CustomersOrdersRunning=مشتری فعلی +CustomersOrdersAndOrdersLines=مشتری و خطوط سفارش +OrdersToValid=سفارشات مشتری به اعتبار +OrdersToBill=سفارشات مشتری تحویل داده +OrdersInProcess=سفارشات مشتری در فرآیند +OrdersToProcess=سفارشات مشتری برای پردازش +SuppliersOrdersToProcess=سفارشات تامین کننده به پردازش +StatusOrderCanceledShort=لغو شد +StatusOrderDraftShort=پیش نویس +StatusOrderValidatedShort=اعتبار +StatusOrderSentShort=در فرآیند +StatusOrderSent=حمل و نقل در فرایند +StatusOrderOnProcessShort=پذیرش +StatusOrderProcessedShort=پردازش +StatusOrderToBillShort=تحویل +StatusOrderToBill2Short=به بیل +StatusOrderApprovedShort=تایید شده +StatusOrderRefusedShort=رد +StatusOrderToProcessShort=به پردازش +StatusOrderReceivedPartiallyShort=نیمه دریافت کرد +StatusOrderReceivedAllShort=دریافت همه چیز +StatusOrderCanceled=لغو شد +StatusOrderDraft=پیش نویس (نیاز به تایید می شود) +StatusOrderValidated=اعتبار +StatusOrderOnProcess=در انتظار دریافت +StatusOrderProcessed=پردازش +StatusOrderToBill=تحویل +StatusOrderToBill2=به بیل +StatusOrderApproved=تایید شده +StatusOrderRefused=رد +StatusOrderReceivedPartially=نیمه دریافت کرد +StatusOrderReceivedAll=دریافت همه چیز +ShippingExist=حمل و نقل وجود دارد +DraftOrWaitingApproved=پیش نویس و یا مورد تایید در عین حال دستور داده +DraftOrWaitingShipped=پیش نویس و یا اعتبار هنوز حمل نشده است +MenuOrdersToBill=سفارشات تحویل +MenuOrdersToBill2=سفارشات به لایحه +SearchOrder=نتایج جستجو +SearchACustomerOrder=جستجوی یک سفارش مشتری +ShipProduct=محصول کشتی +Discount=تخفیف +CreateOrder=ایجاد نظم +RefuseOrder=منظور رد +ApproveOrder=قبول سفارش +ValidateOrder=منظور اعتبارسنجی +UnvalidateOrder=منظور Unvalidate +DeleteOrder=به منظور حذف +CancelOrder=جهت لغو +AddOrder=اضافه کردن منظور +AddToMyOrders=اضافه کردن به سفارشات من +AddToOtherOrders=اضافه کردن به دیگر سفارشات +AddToDraftOrders=اضافه کردن به پیش نویس منظور +ShowOrder=نمایش جهت +NoOpenedOrders=بدون سفارشات باز +NoOtherOpenedOrders=بدون دیگر سفارشات باز +NoDraftOrders=بدون پیش نویس سفارشات +OtherOrders=دیگر سفارشات +LastOrders=تاریخ و زمان آخرین٪ بازدید کنندگان سفارشات +LastModifiedOrders=تاریخ و زمان آخرین%s در دستور تغییر +LastClosedOrders=تاریخ و زمان آخرین%s در دستور بسته +AllOrders=تمام سفارشات +NbOfOrders=تعداد سفارشات +OrdersStatistics=آمار سفارش +OrdersStatisticsSuppliers=آمار تامین کننده سفارش +NumberOfOrdersByMonth=تعداد سفارشات در ماه +AmountOfOrdersByMonthHT=میزان سفارشات توسط ماه (خالص از مالیات) +ListOfOrders=فهرست سفارشات +CloseOrder=نزدیک منظور +ConfirmCloseOrder=آیا مطمئن هستید که میخواهید این منظور deliverd؟ پس از سفارش تحویل داده شده است، می توان آن را به صورتحساب تنظیم شده است. +ConfirmCloseOrderIfSending=آیا مطمئن هستید که می خواهید برای بستن این دستور؟ شما باید منظور تنها زمانی که تمام حمل و نقل انجام می شود نزدیک است. +ConfirmDeleteOrder=آیا مطمئن هستید که می خواهید این دستور را حذف کنید؟ +ConfirmValidateOrder=آیا مطمئن هستید که می خواهید به اعتبار این منظور با نام%s را؟ +ConfirmUnvalidateOrder=آیا مطمئن هستید که می خواهید برای بازگرداندن نظم به%s به پیش نویس وضعیت؟ +ConfirmCancelOrder=آیا مطمئن هستید که می خواهید به لغو این منظور؟ +ConfirmMakeOrder=آیا مطمئن هستید که می خواهید برای تایید شما به این منظور در%s ساخته شده است؟ +GenerateBill=تولید صورت حساب +ClassifyShipped=طبقه بندی تحویل +ClassifyBilled=طبقه بندی صورتحساب +ComptaCard=کارت حسابداری +DraftOrders=دستور پیش نویس +RelatedOrders=سفارشات مرتبط +OnProcessOrders=در دستور روند +RefOrder=کد عکس. سفارش +RefCustomerOrder=کد عکس. سفارش مشتری +RefCustomerOrderShort=کد عکس. cust در. سفارش +SendOrderByMail=ارسال سفارش از طریق پست +ActionsOnOrder=رویدادهای سفارش +NoArticleOfTypeProduct=هیچ مقاله از نوع «تولید» بنابراین هیچ مقاله قابل حمل با کشتی برای این منظور +OrderMode=روش سفارش +AuthorRequest=درخواست نویسنده +UseCustomerContactAsOrderRecipientIfExist=اگر به جای آدرس شخص ثالث به عنوان آدرس دریافت کننده منظور تعریف شده استفاده از آدرس ارتباط با مشتری +RunningOrders=سفارشات در فرآیند +UserWithApproveOrderGrant=کاربران داده با "سفارشات تایید" اجازه. +PaymentOrderRef=پرداخت منظور از%s +CloneOrder=منظور کلون +ConfirmCloneOrder=آیا مطمئن هستید که می خواهید به کلون کردن این منظور از%s؟ +DispatchSupplierOrder=دریافت کننده کالا منظور از%s ##### Types de contacts ##### -TypeContact_commande_internal_SALESREPFOLL=ممثل العميل متابعة النظام -TypeContact_commande_internal_SHIPPING=ممثل الشحن متابعة -TypeContact_commande_external_BILLING=الزبون فاتورة الاتصال -TypeContact_commande_external_SHIPPING=العملاء الشحن الاتصال -TypeContact_commande_external_CUSTOMER=اتصل العملاء بغية متابعة -TypeContact_order_supplier_internal_SALESREPFOLL=ممثل النظام المورد متابعة -TypeContact_order_supplier_internal_SHIPPING=ممثل الشحن متابعة -TypeContact_order_supplier_external_BILLING=المورد فاتورة الاتصال -TypeContact_order_supplier_external_SHIPPING=المورد الشحن الاتصال -TypeContact_order_supplier_external_CUSTOMER=المورد الاتصال أجل متابعة - -Error_COMMANDE_SUPPLIER_ADDON_NotDefined=لم تعرف COMMANDE_SUPPLIER_ADDON مستمر -Error_COMMANDE_ADDON_NotDefined=لم تعرف COMMANDE_ADDON مستمر -Error_FailedToLoad_COMMANDE_SUPPLIER_ADDON_File=لم يتم تحميل الملف وحدة '٪ ق' -Error_FailedToLoad_COMMANDE_ADDON_File=لم يتم تحميل الملف وحدة '٪ ق' -# Error_OrderNotChecked=No orders to invoice selected - +TypeContact_commande_internal_SALESREPFOLL=نماینده سفارش مشتری زیر به بالا +TypeContact_commande_internal_SHIPPING=نماینده زیر را به بالا حمل و نقل +TypeContact_commande_external_BILLING=تماس با فاکتور به مشتری +TypeContact_commande_external_SHIPPING=تماس با حمل و نقل با مشتری +TypeContact_commande_external_CUSTOMER=تماس با مشتری را در پی بالا جهت +TypeContact_order_supplier_internal_SALESREPFOLL=نماینده زیر تا تامین کننده نظم +TypeContact_order_supplier_internal_SHIPPING=نماینده زیر را به بالا حمل و نقل +TypeContact_order_supplier_external_BILLING=منبع تماس با فاکتور +TypeContact_order_supplier_external_SHIPPING=تماس با تامین کننده حمل و نقل +TypeContact_order_supplier_external_CUSTOMER=منبع تماس با منبع زیر تا منظور +Error_COMMANDE_SUPPLIER_ADDON_NotDefined=COMMANDE_SUPPLIER_ADDON ثابت تعریف نشده +Error_COMMANDE_ADDON_NotDefined=COMMANDE_ADDON ثابت تعریف نشده +Error_FailedToLoad_COMMANDE_SUPPLIER_ADDON_File=برای بارگذاری ماژول پرونده «%s» شکست خورد +Error_FailedToLoad_COMMANDE_ADDON_File=برای بارگذاری ماژول پرونده «%s» شکست خورد +Error_OrderNotChecked=بدون سفارشات به فاکتور انتخاب شده # Sources -OrderSource0=اقتراح التجارية -OrderSource1=الإنترنت -OrderSource2=حملة بريدية -OrderSource3=الهاتف compain -OrderSource4=حملة الفاكس -OrderSource5=التجارية -OrderSource6=مخزن -QtyOrdered=الكمية أمرت -AddDeliveryCostLine=تضاف تكلفة توصيل خط يبين الوزن من أجل - +OrderSource0=پیشنهاد تجاری +OrderSource1=اینترنت +OrderSource2=کمپین ایمیل +OrderSource3=compaign تلفن +OrderSource4=کمپین فکس +OrderSource5=تجاری +OrderSource6=فروشگاه +QtyOrdered=تعداد سفارش داده شده +AddDeliveryCostLine=اضافه کردن یک خط هزینه حمل که نشان دهنده وزن از نظم # Documents models -PDFEinsteinDescription=من أجل نموذج كامل (logo...) -PDFEdisonDescription=نموذج النظام بسيطة -# PDFProformaDescription=A complete proforma invoice (logo…) +PDFEinsteinDescription=مدل نظم کامل (logo. ..) +PDFEdisonDescription=یک مدل جهت ساده +PDFProformaDescription=فاکتور را کامل (آرم ...) # Orders modes -# OrderByMail=Mail -OrderByFax=الفاكس -# OrderByEMail=EMail -# OrderByWWW=Online -OrderByPhone=الهاتف - -# CreateInvoiceForThisCustomer=Bill orders -# NoOrdersToInvoice=No orders billable -# CloseProcessedOrdersAutomatically=Classify "Processed" all selected orders. -# MenuOrdersToBill2=Orders to bill -# OrderCreation=Order creation -# Ordered=Ordered -# OrderCreated=Your orders have been created -# OrderFail=An error happened during your orders creation -# CreateOrders=Create orders -# ToBillSeveralOrderSelectCustomer=To create an invoice for several orders, click first onto customer, then choose "%s". +OrderByMail=پست +OrderByFax=فکس +OrderByEMail=پست الکترونیکی +OrderByWWW=آنلاین +OrderByPhone=تلفن +CreateInvoiceForThisCustomer=سفارشات بیل +NoOrdersToInvoice=بدون سفارشات قابل پرداخت +CloseProcessedOrdersAutomatically=طبقه بندی "پردازش" سفارشات همه انتخاب شده است. +MenuOrdersToBill2=سفارشات به لایحه +OrderCreation=خلقت +Ordered=سفارش داده شده +OrderCreated=سفارشات شما ساخته شده است +OrderFail=خطا در هنگام ایجاد سفارشات شما اتفاق افتاده است +CreateOrders=ایجاد سفارشات +ToBillSeveralOrderSelectCustomer=برای ایجاد یک فاکتور برای چند دستور، برای اولین بار بر روی مشتری را کلیک کنید، و سپس "%s" را انتخاب کنید. diff --git a/htdocs/langs/fa_IR/other.lang b/htdocs/langs/fa_IR/other.lang index 6f0012b09e9..7b74f9b840a 100644 --- a/htdocs/langs/fa_IR/other.lang +++ b/htdocs/langs/fa_IR/other.lang @@ -1,226 +1,226 @@ # Dolibarr language file - Source file is en_US - other -SecurityCode=رمز الحماية -Calendar=التقويم -AddTrip=إضافة رحلة -Tools=أدوات -ToolsDesc=This area is dedicated to group miscellaneous tools not available into other menu entries.

    Those tools can be reached from menu on the side. -Birthday=عيد ميلاد -BirthdayDate=عيد ميلاد -DateToBirth=تاريخ الميلاد -BirthdayAlertOn= عيد ميلاد النشطة في حالة تأهب -BirthdayAlertOff= عيد الميلاد فى حالة تأهب الخاملة -Notify_FICHINTER_VALIDATE=تدخل المصادق -Notify_FICHINTER_SENTBYMAIL=Intervention sent by mail -Notify_BILL_VALIDATE=فاتورة مصادق -Notify_BILL_UNVALIDATE=Customer invoice unvalidated -Notify_ORDER_SUPPLIER_APPROVE=من أجل الموافقة على المورد -Notify_ORDER_SUPPLIER_REFUSE=من أجل رفض الموردين -Notify_ORDER_VALIDATE=التحقق من صحة النظام العميل -Notify_PROPAL_VALIDATE=التحقق من صحة اقتراح العملاء -Notify_PROPAL_CLOSE_SIGNED=Customer propal closed signed -Notify_PROPAL_CLOSE_REFUSED=Customer propal closed refused -Notify_WITHDRAW_TRANSMIT=Transmission withdrawal -Notify_WITHDRAW_CREDIT=Credit withdrawal -Notify_WITHDRAW_EMIT=Perform withdrawal -Notify_ORDER_SENTBYMAIL=Envío pedido POR پست الکترونیک -Notify_COMPANY_CREATE=شخص ثالث آفریده شده -Notify_COMPANY_SENTBYMAIL=Mails sent from third party card -Notify_PROPAL_SENTBYMAIL=پیشنهاد تجاری فرستاده شده توسط پست الکترونیکی -Notify_BILL_PAYED=صورتحساب مشتری payed -Notify_BILL_CANCEL=صورتحساب مشتری لغو شد -Notify_BILL_SENTBYMAIL=صورتحساب مشتری از طریق پست فرستاده -Notify_ORDER_SUPPLIER_VALIDATE=منظور تامین کننده اعتبار -Notify_ORDER_SUPPLIER_SENTBYMAIL=منظور تامین کننده فرستاده شده توسط پست الکترونیکی -Notify_BILL_SUPPLIER_VALIDATE=صورتحساب تامین کننده اعتبار -Notify_BILL_SUPPLIER_PAYED=صورتحساب تامین کننده payed -Notify_BILL_SUPPLIER_SENTBYMAIL=Supplier invoice sent by mail -Notify_BILL_SUPPLIER_CANCELED=Supplier invoice cancelled -Notify_CONTRACT_VALIDATE=Contract validated -Notify_FICHEINTER_VALIDATE=Intervention validated -Notify_SHIPPING_VALIDATE=Shipping validated -Notify_SHIPPING_SENTBYMAIL=Shipping sent by mail -Notify_MEMBER_VALIDATE=Member validated -Notify_MEMBER_MODIFY=Member modified -Notify_MEMBER_SUBSCRIPTION=عضو مشترک -Notify_MEMBER_RESILIATE=عضو resiliated -Notify_MEMBER_DELETE=اعضا حذف -Notify_PROJECT_CREATE=Project creation -Notify_TASK_CREATE=Task created -Notify_TASK_MODIFY=Task modified -Notify_TASK_DELETE=Task deleted -NbOfAttachedFiles=عدد الملفات المرفقة / وثائق -TotalSizeOfAttachedFiles=اجمالى حجم الملفات المرفقة / وثائق -MaxSize=الحجم الأقصى -AttachANewFile=إرفاق ملف جديد / وثيقة -LinkedObject=ربط وجوه -Miscellaneous=متفرقات -NbOfActiveNotifications=عدد الإخطارات -PredefinedMailTest=هذا هو الاختبار الإلكتروني. تكون مفصولة \\ nThe سطرين من قبل حرف إرجاع. -PredefinedMailTestHtml=هذا هو البريد الاختبار (الاختبار يجب أن تكون في كلمة جريئة).
    وتفصل بين الخطين من قبل حرف إرجاع. -PredefinedMailContentSendInvoice=__CONTACTCIVNAME__\n\nYou will find here the invoice __FACREF__\n\n__PERSONALIZED__Sincerely\n\n__SIGNATURE__ -PredefinedMailContentSendInvoiceReminder=__CONTACTCIVNAME__\n\nWe would like to warn you that the invoice __FACREF__ seems to not being payed. So this is the invoice in attachment again, as a reminder.\n\n__PERSONALIZED__Sincerely\n\n__SIGNATURE__ -PredefinedMailContentSendProposal=__CONTACTCIVNAME__\n\nYou will find here the commercial proposal __PROPREF__\n\n__PERSONALIZED__Sincerely\n\n__SIGNATURE__ -PredefinedMailContentSendOrder=__CONTACTCIVNAME__\n\nYou will find here the order __ORDERREF__\n\n__PERSONALIZED__Sincerely\n\n__SIGNATURE__ -PredefinedMailContentSendSupplierOrder=__CONTACTCIVNAME__\n\nYou will find here our order __ORDERREF__\n\n__PERSONALIZED__Sincerely\n\n__SIGNATURE__ -PredefinedMailContentSendSupplierInvoice=__CONTACTCIVNAME__\n\nYou will find here the invoice __FACREF__\n\n__PERSONALIZED__Sincerely\n\n__SIGNATURE__ -PredefinedMailContentSendShipping=__CONTACTCIVNAME__\n\nYou will find here the shipping __SHIPPINGREF__\n\n__PERSONALIZED__Sincerely\n\n__SIGNATURE__ -PredefinedMailContentSendFichInter=__CONTACTCIVNAME__\n\nYou will find here the intervention __FICHINTERREF__\n\n__PERSONALIZED__Sincerely\n\n__SIGNATURE__ -PredefinedMailContentThirdparty=__CONTACTCIVNAME__\n\n__PERSONALIZED__\n\n__SIGNATURE__ -DemoDesc=Dolibarr الاتفاق هو تخطيط موارد المؤسسات وإدارة علاقات العملاء وتتكون من عدة وحدات وظيفية. وقال ان العرض يشمل جميع وحدات لا يعني اي شيء يحدث هذا أبدا. بذلك ، عرض عدة ملامح المتاحة. -ChooseYourDemoProfil=اختيار عرض ملف المباراة التي أنشطتك... -DemoFundation=أعضاء في إدارة مؤسسة -DemoFundation2=إدارة وأعضاء في الحساب المصرفي للمؤسسة -DemoCompanyServiceOnly=إدارة نشاط بيع الخدمة لحسابهم الخاص فقط -DemoCompanyShopWithCashDesk=تدير متجر مع مكتب النقدية -DemoCompanyProductAndStocks=إدارة شركة صغيرة أو متوسطة بيع المنتجات -DemoCompanyAll=إدارة شركة صغيرة أو متوسطة متعددة الأنشطة الرئيسية لجميع وحدات) -GoToDemo=الذهاب الى التجريبي -CreatedBy=أوجدتها ٪ ق -ModifiedBy=المعدلة ق ٪ -ValidatedBy=يصادق عليها ق ٪ -CanceledBy=ألغى به ق ٪ -ClosedBy=أغلقت ٪ ق -FileWasRemoved=تم حذف الملف -DirWasRemoved=دليل أزيل -FeatureNotYetAvailableShort=متاحة في الإصدار التالي -FeatureNotYetAvailable=ميزة لم تتوفر بعد في هذه النسخة -FeatureExperimental=ميزة تجريبية. غير مستقر في هذه النسخة -FeatureDevelopment=تنمية الميزة. غير مستقر في هذه النسخة -FeaturesSupported=المزايا +SecurityCode=کد امنیتی +Calendar=تقویم +AddTrip=اضافه کردن سفر +Tools=ابزار +ToolsDesc=این منطقه به گروه ابزار دیگر در دسترس را به دیگر نوشته های منو نمی اختصاص یافته است.

    این ابزار را می توانید از منوی سمت رسیده است. +Birthday=جشن تولد +BirthdayDate=جشن تولد +DateToBirth=تاریخ تولد +BirthdayAlertOn= تولد هشدار فعال +BirthdayAlertOff= تولد غیر فعال هشدار +Notify_FICHINTER_VALIDATE=مداخله اعتبار +Notify_FICHINTER_SENTBYMAIL=مداخله با پست +Notify_BILL_VALIDATE=صورت حساب به مشتری اعتبار +Notify_BILL_UNVALIDATE=صورت حساب به مشتری unvalidated +Notify_ORDER_SUPPLIER_APPROVE=منظور تامین کننده تایید +Notify_ORDER_SUPPLIER_REFUSE=منظور تامین کننده خودداری کرد +Notify_ORDER_VALIDATE=سفارش مشتری معتبر +Notify_PROPAL_VALIDATE=پیشنهاد به مشتری اعتبار +Notify_PROPAL_CLOSE_SIGNED=propal با مشتری بسته امضا +Notify_PROPAL_CLOSE_REFUSED=propal با مشتری بسته خودداری کرد +Notify_WITHDRAW_TRANSMIT=خروج خطوط انتقال +Notify_WITHDRAW_CREDIT=خروج اعتباری +Notify_WITHDRAW_EMIT=انجام خروج +Notify_ORDER_SENTBYMAIL=سفارش مشتری با پست +Notify_COMPANY_CREATE=شخص ثالث ایجاد شده +Notify_COMPANY_SENTBYMAIL=ایمیل های فرستاده شده از کارت شخص ثالث +Notify_PROPAL_SENTBYMAIL=پیشنهاد تجاری با پست +Notify_BILL_PAYED=صورت حساب به مشتری غیر انتفایی +Notify_BILL_CANCEL=صورت حساب به مشتری لغو +Notify_BILL_SENTBYMAIL=صورت حساب به مشتری با پست +Notify_ORDER_SUPPLIER_VALIDATE=منظور تامین کننده معتبر +Notify_ORDER_SUPPLIER_SENTBYMAIL=منظور تامین کننده با پست +Notify_BILL_SUPPLIER_VALIDATE=فاکتور تامین کننده معتبر +Notify_BILL_SUPPLIER_PAYED=فاکتور تامین کننده غیر انتفایی +Notify_BILL_SUPPLIER_SENTBYMAIL=فاکتور تامین کننده با پست +Notify_BILL_SUPPLIER_CANCELED=فاکتور تامین کننده لغو +Notify_CONTRACT_VALIDATE=قرارداد معتبر +Notify_FICHEINTER_VALIDATE=مداخله اعتبار +Notify_SHIPPING_VALIDATE=حمل و نقل معتبر +Notify_SHIPPING_SENTBYMAIL=حمل و نقل با پست +Notify_MEMBER_VALIDATE=کاربران معتبر +Notify_MEMBER_MODIFY=کاربران اصلاح شده +Notify_MEMBER_SUBSCRIPTION=مشترک اعضا +Notify_MEMBER_RESILIATE=کاربران resiliated +Notify_MEMBER_DELETE=کاربران حذف +Notify_PROJECT_CREATE=ایجاد پروژه +Notify_TASK_CREATE=وظیفه ایجاد +Notify_TASK_MODIFY=وظیفه اصلاح شده +Notify_TASK_DELETE=وظیفه حذف +NbOfAttachedFiles=تعداد فایل های پیوست / اسناد +TotalSizeOfAttachedFiles=اندازه کل فایل های پیوست / اسناد +MaxSize=حداکثر اندازه +AttachANewFile=ضمیمه کردن فایل جدید / سند +LinkedObject=شی مرتبط +Miscellaneous=متفرقه +NbOfActiveNotifications=تعداد اطلاعیه ها +PredefinedMailTest=این یک پست تست است. دو خط با بازگشت نورد جدا شده است. __SIGNATURE__ +PredefinedMailTestHtml=این ایمیل آزمون (آزمون کلمه باید در پررنگ باشد) است.
    دو خط با بازگشت نورد جدا شده است.

    __SIGNATURE__ +PredefinedMailContentSendInvoice=__CONTACTCIVNAME__ شما در اینجا خواهید دید فاکتور __ FACREF__ __ PERSONALIZED__Sincerely __ SIGNATURE__ +PredefinedMailContentSendInvoiceReminder=__CONTACTCIVNAME__ ما می خواهیم به شما هشدار می دهند که فاکتور __ FACREF__ به نظر می رسد که غیر انتفایی نیست. پس این فاکتور در پیوست است دوباره، به عنوان یک یادآوری. __PERSONALIZED__Sincerely __ SIGNATURE__ +PredefinedMailContentSendProposal=__CONTACTCIVNAME__ شما در اینجا خواهید دید پیشنهاد تجاری __ PROPREF__ __ PERSONALIZED__Sincerely __ SIGNATURE__ +PredefinedMailContentSendOrder=__CONTACTCIVNAME__ شما در اینجا خواهید دید که منظور __ ORDERREF__ __ PERSONALIZED__Sincerely __ SIGNATURE__ +PredefinedMailContentSendSupplierOrder=__CONTACTCIVNAME__ شما در اینجا خواهید دید منظور ما __ ORDERREF__ __ PERSONALIZED__Sincerely __ SIGNATURE__ +PredefinedMailContentSendSupplierInvoice=__CONTACTCIVNAME__ شما در اینجا خواهید دید فاکتور __ FACREF__ __ PERSONALIZED__Sincerely __ SIGNATURE__ +PredefinedMailContentSendShipping=__CONTACTCIVNAME__ شما در اینجا خواهید دید حمل و نقل __ SHIPPINGREF__ __ PERSONALIZED__Sincerely __ SIGNATURE__ +PredefinedMailContentSendFichInter=__CONTACTCIVNAME__ شما در اینجا را پیدا خواهد کرد از مداخله __ FICHINTERREF__ __ PERSONALIZED__Sincerely __ SIGNATURE__ +PredefinedMailContentThirdparty=__CONTACTCIVNAME__ __ PERSONALIZED__ __ SIGNATURE__ +DemoDesc=Dolibarr ERP / CRM جمع و جور ساخته چند ماژول کاربردی است. نسخه ی نمایشی است که شامل همه ماژول ها هیچ معنی نیست که این هرگز رخ می دهد. بنابراین، چند پروفایل های دمو در دسترس هستند. +ChooseYourDemoProfil=را انتخاب کنید مشخصات آزمایشی که مطابقت دارند فعالیت های خود را ... +DemoFundation=مدیریت اعضای پایه +DemoFundation2=مدیریت اعضا و حساب بانکی از یک پایه +DemoCompanyServiceOnly=مدیریت تنها یک سرویس فروش فعالیت های آزاد +DemoCompanyShopWithCashDesk=مدیریت یک فروشگاه با یک میز نقدی +DemoCompanyProductAndStocks=مدیریت یک شرکت کوچک یا متوسط ​​فروش محصولات +DemoCompanyAll=مدیریت یک شرکت کوچک یا متوسط ​​با فعالیت های متعدد (تمام ماژول های اصلی) +GoToDemo=برو به نسخه ی نمایشی +CreatedBy=ایجاد شده توسط%s +ModifiedBy=اصلاح شده توسط%s +ValidatedBy=تایید شده توسط%s +CanceledBy=لغو شده توسط%s +ClosedBy=بسته شده توسط%s +FileWasRemoved=فایل%s حذف شد +DirWasRemoved=شاخه%s حذف شد +FeatureNotYetAvailableShort=موجود در نسخه های بعدی +FeatureNotYetAvailable=ویژگی هنوز در این نسخه در دسترس نیست +FeatureExperimental=از ویژگی های تجربی. در این نسخه پایدار نیست +FeatureDevelopment=از ویژگی های توسعه. در این نسخه پایدار نیست +FeaturesSupported=ویژگی های پشتیبانی Width=عرض Height=ارتفاع -Depth=متعمق +Depth=عمق Top=بالا Bottom=پایین Left=چپ -Right=حق -CalculatedWeight=يحسب الوزن -CalculatedVolume=يحسب حجم +Right=راست +CalculatedWeight=وزن محاسبه شده +CalculatedVolume=حجم محاسبه شده Weight=وزن -TotalWeight=الوزن الإجمالي -WeightUnitton=طن -WeightUnitkg=كجم -WeightUnitg=ز -WeightUnitmg=مغلم -WeightUnitpound=جنيه +TotalWeight=وزن مجموع +WeightUnitton=تن +WeightUnitkg=کیلوگرم +WeightUnitg=گرم +WeightUnitmg=میلی گرم +WeightUnitpound=پوند Length=طول -LengthUnitm=م -LengthUnitdm=مارك ألماني -LengthUnitcm=الطول -LengthUnitmm=مم -Surface=منطقة -SurfaceUnitm2=m2 -SurfaceUnitdm2=dm2 -SurfaceUnitcm2=cm2 -SurfaceUnitmm2=mm2 -SurfaceUnitfoot2=ft2 -SurfaceUnitinch2=in2 +LengthUnitm=متر +LengthUnitdm=دیابت +LengthUnitcm=سانتی متر +LengthUnitmm=میلیمتر +Surface=منطقه +SurfaceUnitm2=M2 +SurfaceUnitdm2=DM2 +SurfaceUnitcm2=CM2 +SurfaceUnitmm2=mm2 در +SurfaceUnitfoot2=FT2 +SurfaceUnitinch2=IN2 Volume=حجم -TotalVolume=الحجم الإجمالي -VolumeUnitm3=m3 -VolumeUnitdm3=dm3 -VolumeUnitcm3=cm3 -VolumeUnitmm3=mm3 -VolumeUnitfoot3=ft3 -VolumeUnitinch3=in3 -VolumeUnitounce=أوقية -VolumeUnitlitre=لتر -VolumeUnitgallon=غالون -Size=حجم -SizeUnitm=م -SizeUnitdm=مارك ألماني -SizeUnitcm=سم -SizeUnitmm=مم -SizeUnitinch=بوصة -SizeUnitfoot=قدم -SizeUnitpoint=point -BugTracker=علة تعقب -SendNewPasswordDesc=هذا الشكل يتيح لك طلب كلمة مرور جديدة. سيكون من إرسالها إلى عنوان البريد الإلكتروني الخاص بك.
    التغيير لن تكون فعالة إلا بعد النقر على تأكيد الصلة داخل هذه الرسالة.
    تحقق من بريدك الالكتروني القارئ البرمجيات. -BackToLoginPage=عودة إلى صفحة تسجيل الدخول -AuthenticationDoesNotAllowSendNewPassword=طريقة التوثيق ٪ ق.
    في هذا الوضع ، لا يمكن معرفة Dolibarr أو تغيير كلمة السر الخاصة بك.
    اتصل بمسؤول النظام إذا كنت تريد تغيير كلمة السر الخاصة بك. -EnableGDLibraryDesc=تثبيت أو تمكين ش ج مكتبة لديكم PHP لاستخدام هذا الخيار. -EnablePhpAVModuleDesc=كنت بحاجة إلى تثبيت وحدة متوافقة مع مكافحة الفيروسات الخاص بك. (Clamav : PHP4 - clamavlib où PHP5 - clamavlib) -ProfIdShortDesc=الأستاذ عيد ٪ ق هي المعلومات التي تعتمد على طرف ثالث.
    على سبيل المثال ، لبلد ق ٪ انها رمز ٪ ق. -DolibarrDemo=Dolibarr تخطيط موارد المؤسسات وإدارة علاقات العملاء التجريبي -StatsByNumberOfUnits=إحصاءات في عدد من المنتجات / الخدمات وحدات -StatsByNumberOfEntities=إحصاءات في عدد من الكيانات في اشارة -NumberOfProposals=عددا من المقترحات بشأن 12 الشهر الماضي -NumberOfCustomerOrders=عدد طلبات الزبائن على 12 في الشهر الماضي -NumberOfCustomerInvoices=عدد من العملاء والفواتير على 12 الشهر الماضي -NumberOfSupplierOrders=Number of supplier orders on last 12 month -NumberOfSupplierInvoices=عدد من فواتير الموردين على 12 الشهر الماضي -NumberOfUnitsProposals=عدد من الوحدات على مقترحات بشأن 12 الشهر الماضي -NumberOfUnitsCustomerOrders=عدد من الوحدات على طلبات الزبائن على 12 في الشهر الماضي -NumberOfUnitsCustomerInvoices=عدد من الوحدات على فواتير العملاء على 12 الشهر الماضي -NumberOfUnitsSupplierOrders=Number of units on supplier orders on last 12 month -NumberOfUnitsSupplierInvoices=عدد من الوحدات على فواتير الموردين على 12 الشهر الماضي -EMailTextInterventionValidated=التدخل ٪ ق المصادق -EMailTextInvoiceValidated=فاتورة ٪ ق المصادق -EMailTextProposalValidated=وقد تم اقتراح %s التحقق من صحة. -EMailTextOrderValidated=وقد تم التحقق من صحة %s النظام. -EMailTextOrderApproved=من أجل الموافقة على ق ٪ -EMailTextOrderApprovedBy=من أجل ٪ ق ق ٪ وافقت عليها -EMailTextOrderRefused=من أجل رفض ق ٪ -EMailTextOrderRefusedBy=من أجل أن ترفض ٪ ق ق ٪ -EMailTextExpeditionValidated=The shipping %s has been validated. -ImportedWithSet=استيراد مجموعة البيانات -DolibarrNotification=إشعار تلقائي -ResizeDesc=أدخل عرض جديدة أو ارتفاع جديد. وستبقى نسبة خلال تغيير حجم... -NewLength=عرض جديد -NewHeight=ارتفاع جديد -NewSizeAfterCropping=حجم جديد بعد الاقتصاص -DefineNewAreaToPick=تحديد منطقة جديدة على الصورة لاختيار (اليسار انقر على الصورة ثم اسحب حتى تصل إلى الزاوية المقابلة) -CurrentInformationOnImage=معلومات عن الصورة الحالية -ImageEditor=صورة المحرر -YouReceiveMailBecauseOfNotification=تلقيت هذه الرسالة لأنه قد تم إضافة البريد الإلكتروني الخاص بك إلى قائمة الأهداف التي يتعين على علم الأحداث ولا سيما في صناعة البرمجيات من %s %s. -YouReceiveMailBecauseOfNotification2=هذا الحدث هو ما يلي : -ThisIsListOfModules=This is a list of modules preselected by this demo profile (only most common modules are visible in this demo). Edit this to have a more personalized demo and click on "Start". -ClickHere=اضغط هنا -UseAdvancedPerms=Use the advanced permissions of some modules -FileFormat=File format -SelectAColor=Choose a color -AddFiles=اضافه کردن فایلها -StartUpload=شروع آپلود -CancelUpload=لغو بارگذاری -FileIsTooBig=فایلها خیلی بزرگ -PleaseBePatient=يرجى التحلي بالصبر... -RequestToResetPasswordReceived=A request to change your Dolibarr password has been received -NewKeyIs=This is your new keys to login -NewKeyWillBe=Your new key to login to software will be -ClickHereToGoTo=Click here to go to %s -YouMustClickToChange=You must however first click on the following link to validate this password change -ForgetIfNothing=If you didn't request this change, just forget this email. Your credentials are kept safe. +TotalVolume=حجم کل +VolumeUnitm3=M3 +VolumeUnitdm3=DM3 +VolumeUnitcm3=cm3 را +VolumeUnitmm3=MM3 +VolumeUnitfoot3=FT3 +VolumeUnitinch3=IN3 +VolumeUnitounce=اونس +VolumeUnitlitre=لیتر +VolumeUnitgallon=گالن +Size=اندازه +SizeUnitm=متر +SizeUnitdm=دیابت +SizeUnitcm=سانتی متر +SizeUnitmm=میلیمتر +SizeUnitinch=اینچ +SizeUnitfoot=پا +SizeUnitpoint=نقطه +BugTracker=اشکالات +SendNewPasswordDesc=این فرم به شما اجازه درخواست رمز عبور جدید. از آن خواهد شد به آدرس الکترونیک شما ارسال می کند.
    تغییر تنها پس از کلیک کردن بر روی لینک تایید در داخل این ایمیل موثر خواهد بود.
    نرم افزار ایمیل خوان خود را چک کنید. +BackToLoginPage=بازگشت به صفحه ورود +AuthenticationDoesNotAllowSendNewPassword=نحوه تایید%s است.
    در این حالت، Dolibarr نمی توانند بفهمند و نه رمز عبور خود را تغییر دهید.
    تماس با مدیر سیستم شما اگر می خواهید رمز عبور خود را تغییر دهید. +EnableGDLibraryDesc=نصب و یا فعال کتابخانه GD با PHP خود را برای استفاده از این گزینه. +EnablePhpAVModuleDesc=شما نیاز به نصب یک ماژول سازگار با آنتی ویروس خود را. (ClamAV درحال: PHP4-clamavlib OU PHP5-clamavlib) +ProfIdShortDesc=پروفسور کد از%s اطلاعات بسته به کشور های شخص ثالث است.
    به عنوان مثال، برای کشور٪، این کد٪ بازدید کنندگان است. +DolibarrDemo=Dolibarr ERP / CRM نسخه ی نمایشی +StatsByNumberOfUnits=آمار در تعدادی از محصولات / خدمات واحد +StatsByNumberOfEntities=آمار در تعداد اشخاص مراجعه کننده +NumberOfProposals=تعدادی از پیشنهادات در گذشته 12 ماه +NumberOfCustomerOrders=تعداد سفارش مشتری در گذشته 12 ماه +NumberOfCustomerInvoices=تعداد فاکتورها مشتری در گذشته 12 ماه +NumberOfSupplierOrders=تعداد سفارشات کالا در گذشته 12 ماه +NumberOfSupplierInvoices=تعداد فاکتورها منبع در گذشته 12 ماه +NumberOfUnitsProposals=تعداد واحد در طرح در گذشته 12 ماه +NumberOfUnitsCustomerOrders=تعداد واحد در سفارش مشتری در گذشته 12 ماه +NumberOfUnitsCustomerInvoices=تعداد واحد در صورت حساب مشتری در گذشته 12 ماه +NumberOfUnitsSupplierOrders=تعداد واحد در سفارشات کالا در گذشته 12 ماه +NumberOfUnitsSupplierInvoices=تعداد واحد در فاکتورها منبع در گذشته 12 ماه +EMailTextInterventionValidated=مداخله%s را دارای اعتبار بوده است. +EMailTextInvoiceValidated=صورتحساب%s را دارای اعتبار بوده است. +EMailTextProposalValidated=این پیشنهاد از%s دارای اعتبار بوده است. +EMailTextOrderValidated=منظور از%s دارای اعتبار بوده است. +EMailTextOrderApproved=منظور از%s تایید شده است. +EMailTextOrderApprovedBy=منظور از%s شده توسط%s تایید شده است. +EMailTextOrderRefused=منظور از%s رد شده است. +EMailTextOrderRefusedBy=منظور از%s شده توسط%s خودداری کرد. +EMailTextExpeditionValidated=حمل و نقل از%s دارای اعتبار بوده است. +ImportedWithSet=واردات مجموعه داده +DolibarrNotification=اطلاع رسانی به صورت خودکار +ResizeDesc=عرض جدید OR ارتفاع جدید را وارد کنید. نسبت در طول تغییر اندازه نگه داشته ... +NewLength=عرض جدید +NewHeight=ارتفاع جدید +NewSizeAfterCropping=اندازه های جدید پس از برداشت +DefineNewAreaToPick=تعریف منطقه جدید روی تصویر انتخاب کنید (کلیک چپ بر روی تصویر بکشید تا زمانی که شما رسیدن به گوشه مقابل) +CurrentInformationOnImage=این ابزار برای کمک به شما برای تغییر اندازه و یا برش یک تصویر طراحی شده است. این اطلاعات بر روی تصویر ویرایش شده در حال حاضر است +ImageEditor=ویرایشگر تصویر +YouReceiveMailBecauseOfNotification=شما این پیام را دریافت خواهید کرد چرا که ایمیل شما به لیست از اهداف به حوادث خاص به٪ نرم افزار از%s را مطلع اضافه شده است. +YouReceiveMailBecauseOfNotification2=این رویداد به شرح زیر است: +ThisIsListOfModules=این یک لیست از ماژول های از پیش انتخاب شده توسط این مشخصات نسخه ی نمایشی (فقط ماژول های متداول در این نسخه ی نمایشی قابل مشاهده هستند) است. ویرایش این را به یک نسخه ی نمایشی شخصی تر و با کلیک بر روی "شروع". +ClickHere=اینجا را کلیک کنید +UseAdvancedPerms=استفاده از مجوز های پیشرفته ی برخی از ماژول +FileFormat=فرمت فایل +SelectAColor=یک رنگ را انتخاب کنید +AddFiles=اضافه کردن فایل +StartUpload=شروع ارسال فایل +CancelUpload=لغو ارسال فایل +FileIsTooBig=فایل های بیش از حد بزرگ است +PleaseBePatient=لطفا صبور باشید ... +RequestToResetPasswordReceived=درخواست رمز عبور Dolibarr خود را تغییر دریافت شده است +NewKeyIs=این کلید جدید خود را برای ورود به سایت است +NewKeyWillBe=کلید جدید را برای ورود به نرم افزار خواهد بود +ClickHereToGoTo=برای رفتن به%s اینجا را کلیک کنید +YouMustClickToChange=با این حال شما باید اول بر روی لینک زیر کلیک کنید تا اعتبار این تغییر رمز عبور +ForgetIfNothing=اگر شما این تغییر را درخواست نکرده، فقط این ایمیل را فراموش کرده ام. اعتبار نامه های شما امن نگهداری می شود. ##### Calendar common ##### -AddCalendarEntry=إضافة الدخول في التقويم ق ٪ -NewCompanyToDolibarr=وأضافت الشركة ل ٪ الى Dolibarr -ContractValidatedInDolibarr=ق ٪ العقد المصادق عليه في Dolibarr -ContractCanceledInDolibarr=٪ ق الغاء العقد في Dolibarr -ContractClosedInDolibarr=ق ٪ مغلقا عقد في Dolibarr -PropalClosedSignedInDolibarr=اقتراح ٪ ق الذي وقع في Dolibarr -PropalClosedRefusedInDolibarr=ق رفض الاقتراح ٪ في Dolibarr -PropalValidatedInDolibarr=اقتراح ٪ في التحقق من صحة المستندات Dolibarr -InvoiceValidatedInDolibarr=فاتورة ٪ في التحقق من صحة المستندات Dolibarr -InvoicePaidInDolibarr=ق ٪ الفاتورة المدفوعة في تغيير Dolibarr -InvoiceCanceledInDolibarr=فاتورة ٪ ق الغى في Dolibarr -PaymentDoneInDolibarr=ق ٪ الدفع به في Dolibarr -CustomerPaymentDoneInDolibarr=العميل بدفع ٪ ق عمله في Dolibarr -SupplierPaymentDoneInDolibarr=المورد ٪ ق دفع به في Dolibarr -MemberValidatedInDolibarr=عضو ٪ في التحقق من صحة المستندات Dolibarr -MemberResiliatedInDolibarr=عضو في resiliated ٪ ق Dolibarr -MemberDeletedInDolibarr=عضو ٪ ق حذفها من Dolibarr -MemberSubscriptionAddedInDolibarr=الاكتتاب عضو ق ٪ وأضاف في Dolibarr -ShipmentValidatedInDolibarr=Shipment %s validated in Dolibarr -ShipmentDeletedInDolibarr=Shipment %s deleted from Dolibarr +AddCalendarEntry=اضافه کردن ورودی در تقویم از%s +NewCompanyToDolibarr=شرکت%s را اضافه در Dolibarr +ContractValidatedInDolibarr=قرارداد٪ بازدید کنندگان معتبر در Dolibarr +ContractCanceledInDolibarr=قرارداد%s را لغو در Dolibarr +ContractClosedInDolibarr=قرارداد٪ در Dolibarr بسته +PropalClosedSignedInDolibarr=پیشنهاد از%s امضا در Dolibarr +PropalClosedRefusedInDolibarr=پیشنهاد٪ در Dolibarr رد کرد +PropalValidatedInDolibarr=پیشنهاد از%s معتبر در Dolibarr +InvoiceValidatedInDolibarr=فاکتور٪ بازدید کنندگان معتبر در Dolibarr +InvoicePaidInDolibarr=فاکتور%s به پرداخت در Dolibarr تغییر +InvoiceCanceledInDolibarr=فاکتور%s را لغو در Dolibarr +PaymentDoneInDolibarr=پرداخت٪ انجام در Dolibarr +CustomerPaymentDoneInDolibarr=پرداخت مشتری٪ انجام در Dolibarr +SupplierPaymentDoneInDolibarr=پرداخت کننده٪ انجام در Dolibarr +MemberValidatedInDolibarr=کاربران از%s معتبر در Dolibarr +MemberResiliatedInDolibarr=کاربران از%s resiliated در Dolibarr +MemberDeletedInDolibarr=اعضا%s را حذف شده از Dolibarr +MemberSubscriptionAddedInDolibarr=اشتراک برای عضو از%s اضافه شده در Dolibarr +ShipmentValidatedInDolibarr=حمل و نقل از%s معتبر در Dolibarr +ShipmentDeletedInDolibarr=حمل و نقل از%s حذف شده از Dolibarr ##### Export ##### Export=صادرات -ExportsArea=صادرات المنطقة -AvailableFormats=الأشكال المتاحة -LibraryUsed=وتستخدم Librairy -LibraryVersion=النسخة -ExportableDatas=تصدير datas -NoExportableData=ليس للتصدير البيانات (أي وحدات للتصدير مع تحميل البيانات ، ومفقود أذونات) -ToExport=الصادرات -NewExport=تصديرية جديدة +ExportsArea=منطقه صادرات +AvailableFormats=فرمت های موجود +LibraryUsed=Librairy استفاده +LibraryVersion=نسخه +ExportableDatas=داده های صادراتی +NoExportableData=بدون داده های صادراتی (بدون ماژول ها با داده های صادراتی بارگذاری می شود، و یا مجوز از دست رفته) +ToExport=صادرات +NewExport=صادرات جدید ##### External sites ##### -ExternalSites=المواقع الخارجية +ExternalSites=سایت های خارجی diff --git a/htdocs/langs/fa_IR/paybox.lang b/htdocs/langs/fa_IR/paybox.lang index 7014e69a5b6..9bfcecfda66 100644 --- a/htdocs/langs/fa_IR/paybox.lang +++ b/htdocs/langs/fa_IR/paybox.lang @@ -1,37 +1,37 @@ # Dolibarr language file - Source file is en_US - paybox -PayBoxSetup=إعداد وحدة PayBox -PayBoxDesc=This module offer pages to allow payment on Paybox الواحد. هذه يمكن استخدامها لدفع حر أو لدفع مبلغ معين على وجوه Dolibarr (الفاتورة ، والنظام ،...) -FollowingUrlAreAvailableToMakePayments=فيما يلي عناوين المواقع المتاحة لعرض هذه الصفحة زبون لتسديد دفعة Dolibarr على الأجسام -PaymentForm=شكل الدفع -WelcomeOnPaymentPage=ونحن نرحب على خدمة الدفع عبر الإنترنت -ThisScreenAllowsYouToPay=تتيح لك هذه الشاشة إجراء الدفع الإلكتروني إلى ٪ s. -ThisIsInformationOnPayment=هذه هي المعلومات عن الدفع للقيام -ToComplete=لإكمال -YourEMail=البريد الالكتروني لتأكيد الدفع -Creditor=الدائن -PaymentCode=دفع رمز -PayBoxDoPayment=على الدفع -YouWillBeRedirectedOnPayBox=سوف يتم نقلك على تأمين Paybox لك صفحة لإدخال معلومات بطاقة الائتمان -PleaseBePatient=من فضلك ، والتحلي بالصبر -Continue=التالي -# ToOfferALinkForOnlinePayment=URL for %s payment -ToOfferALinkForOnlinePaymentOnOrder=عنوان لتقديم المستندات ٪ الدفع الإلكتروني واجهة المستخدم للأمر -ToOfferALinkForOnlinePaymentOnInvoice=عنوان لتقديم المستندات ٪ الدفع الإلكتروني واجهة المستخدم للفاتورة -ToOfferALinkForOnlinePaymentOnContractLine=عنوان لتقديم المستندات ٪ الدفع الإلكتروني واجهة المستخدم للحصول على عقد خط -ToOfferALinkForOnlinePaymentOnFreeAmount=عنوان لتقديم المستندات ٪ الدفع الإلكتروني واجهة المستخدم لمبلغ حرة -ToOfferALinkForOnlinePaymentOnMemberSubscription=عنوان الموقع لتقديم الدفع عبر الإنترنت %s واجهة المستخدم للاشتراك عضو -YouCanAddTagOnUrl=You can also add url parameter &tag=يمكنك أيضا إضافة رابط المعلم = & علامة على أي من قيمة تلك عنوان (مطلوب فقط لدفع الحر) الخاصة بك لإضافة تعليق دفع الوسم. -SetupPayBoxToHavePaymentCreatedAutomatically=الإعداد الخاص بك مع رابط PayBox ٪ ق قد تنشأ تلقائيا عند دفع يصادق عليها paybox. -# YourPaymentHasBeenRecorded=This page confirms that your payment has been recorded. Thank you. -# YourPaymentHasNotBeenRecorded=You payment has not been recorded and transaction has been canceled. Thank you. -# AccountParameter=Account parameters -# UsageParameter=Usage parameters -# InformationToFindParameters=Help to find your %s account information -# PAYBOX_CGI_URL_V2=Url of Paybox CGI module for payment -# VendorName=Name of vendor -# CSSUrlForPaymentForm=CSS style sheet url for payment form -MessageOK=پیام در صفحه دارای اعتبار پرداخت بازگشت -MessageKO=پیام در صفحه لغو پرداخت بازگشت -# NewPayboxPaymentReceived=New Paybox payment received -# NewPayboxPaymentFailed=New Paybox payment tried but failed -# PAYBOX_PAYONLINE_SENDEMAIL=EMail to warn after a payment (success or failed) +PayBoxSetup=راه اندازی ماژول خزانه +PayBoxDesc=این ماژول صفحات پیشنهاد به اجازه پرداخت در خزانه شده توسط مشتریان. این می تواند برای پرداخت رایگان و پرداخت در یک شیء خاص Dolibarr استفاده می شود (فاکتور، سفارش، ...) +FollowingUrlAreAvailableToMakePayments=از آدرس های زیر در دسترس است به ارائه یک صفحه به مشتریان به پرداخت در اشیاء Dolibarr است +PaymentForm=فرم پرداخت +WelcomeOnPaymentPage=در سرویس پرداخت آنلاین ما خوش آمدید +ThisScreenAllowsYouToPay=این صفحه نمایش به شما اجازه ایجاد پرداخت آنلاین به%s. +ThisIsInformationOnPayment=این اطلاعات در پرداخت به انجام است +ToComplete=برای تکمیل +YourEMail=ایمیل برای دریافت تاییدیه پرداخت +Creditor=بستانکار +PaymentCode=کد های پرداخت +PayBoxDoPayment=برو در پرداخت +YouWillBeRedirectedOnPayBox=شما می توانید در صفحه خزانه امن برای ورودی هدایت می شوید اطلاعات کارت اعتباری شما +PleaseBePatient=لطفا صبور باشید +Continue=بعد +ToOfferALinkForOnlinePayment=URL برای%s پرداخت +ToOfferALinkForOnlinePaymentOnOrder=URL برای ارائه٪ رابط کاربری پرداخت آنلاین برای سفارش مشتری +ToOfferALinkForOnlinePaymentOnInvoice=URL برای ارائه٪ رابط کاربری پرداخت آنلاین برای صورتحساب مشتری +ToOfferALinkForOnlinePaymentOnContractLine=URL برای ارائه٪ رابط کاربری پرداخت آنلاین برای قرارداد خط +ToOfferALinkForOnlinePaymentOnFreeAmount=URL برای ارائه٪ رابط کاربری پرداخت آنلاین برای مقدار رایگان +ToOfferALinkForOnlinePaymentOnMemberSubscription=URL برای ارائه٪ رابط کاربری پرداخت آنلاین برای به اشتراک عضو +YouCanAddTagOnUrl=شما همچنین می توانید پارامتر URL و برچسب = مقدار را به هر یک از این URL (فقط برای پرداخت رایگان مورد نیاز) برای اضافه کردن خود برچسب توضیحات پرداخت خود اضافه کنید. +SetupPayBoxToHavePaymentCreatedAutomatically=راه اندازی خزانه خود را با آدرس%s را به پرداخت زمانی که توسط خزانه اعتبار به طور خودکار ساخته. +YourPaymentHasBeenRecorded=این صفحه تایید می کند که پرداخت شما ثبت شده است. متشکرم. +YourPaymentHasNotBeenRecorded=شما پرداخت ثبت شده است نیست و معامله لغو شده است. متشکرم. +AccountParameter=پارامترهای حساب +UsageParameter=پارامترهای طریقه استفاده +InformationToFindParameters=کمک برای پیدا کردن٪ شما اطلاعات حساب +PAYBOX_CGI_URL_V2=آدرس از خزانه ماژول CGI برای پرداخت +VendorName=نام فروشنده +CSSUrlForPaymentForm=آدرس شیوه نامه CSS برای فرم پرداخت +MessageOK=پیام در اعتبار صفحه بازگشت پرداخت +MessageKO=پیام در لغو صفحه بازگشت پرداخت +NewPayboxPaymentReceived=پرداخت خزانه های جدید را دریافت کرد +NewPayboxPaymentFailed=پرداخت خزانه جدید تلاش کردند اما موفق +PAYBOX_PAYONLINE_SENDEMAIL=ایمیل پس از پرداخت برای هشدار دادن به (موفقیت یا شکست خورده) diff --git a/htdocs/langs/fa_IR/paypal.lang b/htdocs/langs/fa_IR/paypal.lang index d108114846a..96d8f0c1c15 100644 --- a/htdocs/langs/fa_IR/paypal.lang +++ b/htdocs/langs/fa_IR/paypal.lang @@ -1,25 +1,25 @@ # Dolibarr language file - Source file is en_US - paypal -PaypalSetup=پی پال نصب ماژول -PaypalDesc=این ماژول صفحات پیشنهاد پرداخت در پی پال توسط مشتریان اجازه می دهد. این را می توان برای پرداخت رایگان یا پرداخت بر روی یک شیء خاص Dolibarr استفاده می شود (فاکتور ، سفارش ،...) +PaypalSetup=راه اندازی ماژول پی پال +PaypalDesc=این ماژول صفحات پیشنهاد به اجازه پرداخت پی پال توسط مشتریان. این می تواند برای پرداخت رایگان و پرداخت در یک شیء خاص Dolibarr استفاده می شود (فاکتور، سفارش، ...) PaypalOrCBDoPayment=پرداخت با کارت اعتباری یا پی پال -PaypalDoPayment=Pay with Paypal -PaypalCBDoPayment=Pay with credit card -PAYPAL_API_SANDBOX=Mode test/sandbox -PAYPAL_API_USER=API username -PAYPAL_API_PASSWORD=API password -PAYPAL_API_SIGNATURE=API signature -PAYPAL_API_INTEGRAL_OR_PAYPALONLY=پیشنهاد "انتگرال" پرداخت (اعتباری کارت + پی پال) و یا "پی پال" تنها -PaypalModeIntegral=Integral -PaypalModeOnlyPaypal=PayPal only -PAYPAL_CSS_URL=آدرس کلیپ Optionnal شیوه نامه CSS در صفحه پرداخت -ThisIsTransactionId=%s : این شناسه (شماره) معامله -PAYPAL_ADD_PAYMENT_URL=اضافه کردن آدرس از پرداخت پی پال زمانی که شما از طریق پست ارسال یک سند -PAYPAL_IPN_MAIL_ADDRESS=آدرس پست الکترونیکی برای آگاه شدن از طریق از طریق مسنجر پرداخت (IPN) -PredefinedMailContentLink=You can click on the secure link below to make your payment (PayPal) if it is not already done.\n\n%s\n\n -YouAreCurrentlyInSandboxMode=You are currently in the "sandbox" mode -NewPaypalPaymentReceived=New Paypal payment received -NewPaypalPaymentFailed=New Paypal payment tried but failed -PAYPAL_PAYONLINE_SENDEMAIL=EMail to warn after a payment (success or not) -ReturnURLAfterPayment=Return URL after payment -ValidationOfPaypalPaymentFailed=Validation of Paypal payment failed -PaypalConfirmPaymentPageWasCalledButFailed=Payment confirmation page for Paypal was called by Paypal but confirmation failed +PaypalDoPayment=پرداخت با پی پال +PaypalCBDoPayment=پرداخت با کارت اعتباری +PAYPAL_API_SANDBOX=تست حالت / گودال ماسهبازی +PAYPAL_API_USER=نام کاربری API +PAYPAL_API_PASSWORD=رمز عبور API +PAYPAL_API_SIGNATURE=امضا API +PAYPAL_API_INTEGRAL_OR_PAYPALONLY=ارائه پرداخت "جدایی ناپذیر" (کارت اعتباری + پی پال) و یا "پی پال" تنها +PaypalModeIntegral=انتگرال +PaypalModeOnlyPaypal=پی پال تنها +PAYPAL_CSS_URL=آدرس Optionnal از سبک CSS ورق در صفحه پرداخت +ThisIsTransactionId=این شناسه از معامله است:%s +PAYPAL_ADD_PAYMENT_URL=اضافه کردن آدرس از پرداخت پی پال زمانی که شما یک سند ارسال از طریق پست +PAYPAL_IPN_MAIL_ADDRESS=آدرس پست الکترونیکی برای اطلاع رسانی فوری پرداخت (IPN) +PredefinedMailContentLink=شما می توانید بر روی لینک زیر کلیک کنید امن به پرداخت خود را (پی پال) اگر آن را در حال حاضر انجام می شود. از%s +YouAreCurrentlyInSandboxMode=شما در حال حاضر در "گودال ماسهبازی" حالت +NewPaypalPaymentReceived=پرداخت پی پال جدید دریافت +NewPaypalPaymentFailed=پرداخت جدید پی پال تلاش کردند اما موفق +PAYPAL_PAYONLINE_SENDEMAIL=ایمیل پس از پرداخت برای هشدار دادن به (موفقیت یا نه) +ReturnURLAfterPayment=URL بازگشت پس از پرداخت +ValidationOfPaypalPaymentFailed=اعتبار سنجی پرداخت پی پال شکست خورده +PaypalConfirmPaymentPageWasCalledButFailed=صفحه تایید پرداخت پی پال توسط پی پال نامیده می شد اما به تایید شکست خورده diff --git a/htdocs/langs/fa_IR/products.lang b/htdocs/langs/fa_IR/products.lang index e77a57612e6..8fae33d8567 100644 --- a/htdocs/langs/fa_IR/products.lang +++ b/htdocs/langs/fa_IR/products.lang @@ -1,235 +1,241 @@ # Dolibarr language file - Source file is en_US - products -ProductRef=المرجع المنتج. -ProductLabel=وصف المنتج -ProductServiceCard=منتجات / خدمات البطاقات -Products=المنتجات -Services=الخدمات -Product=المنتج -Service=الخدمة -ProductId=المنتجات / الخدمات معرف -Create=خلق -Reference=المرجعية -NewProduct=منتجات جديدة -NewService=خدمة جديدة -ProductCode=رمز المنتج -ServiceCode=قانون الخدمة -ProductVatMassChange=Mass VAT change -ProductVatMassChangeDesc=This page can be used to modify a VAT rate defined on products or services from a value to another. Warning, this change is done on all database. -MassBarcodeInit=Mass barcode init -MassBarcodeInitDesc=This page can be used to initialize a barcode on objects that does not have barcode defined. Check before that setup of module barcode is complete. -ProductAccountancyBuyCode=المحاسبة الرمز (شراء) -ProductAccountancySellCode=المحاسبة الرمز (بيع) -ProductOrService=المنتج أو الخدمة -ProductsAndServices=المنتجات والخدمات -ProductsOrServices=منتجات أو خدمات -ProductsAndServicesOnSell=المنتجات والخدمات على بيع -ProductsAndServicesNotOnSell=المنتجات والخدمات من بيع -ProductsAndServicesStatistics=المنتجات والخدمات والإحصاءات -ProductsStatistics=المنتجات إحصاءات -ProductsOnSell=بيع المنتجات -ProductsNotOnSell=من بيع المنتجات -ServicesOnSell=خدمات البيع -ServicesNotOnSell=من بيع الخدمات -InternalRef=إشارة الداخلية -LastRecorded=آخر المنتجات والخدمات المسجلة على بيع -LastRecordedProductsAndServices=٪ ق الماضي سجلت المنتجات / الخدمات -LastModifiedProductsAndServices=آخر تعديل ٪ ق المنتجات / الخدمات -LastRecordedProducts=آخر المنتجات المسجلة ق ٪ -LastRecordedServices=٪ ق الماضي سجلت الخدمات -LastProducts=آخر المنتجات -CardProduct0=منتجات البطاقات -CardProduct1=بطاقة الخدمة -CardContract=عقد بطاقة +ProductRef=کد عکس محصول. +ProductLabel=برچسب محصولات +ProductServiceCard=محصولات / خدمات کارت +Products=محصولات +Services=خدمات +Product=محصول +Service=سرویس +ProductId=کد محصول / خدمات +Create=ساختن +Reference=ارجاع +NewProduct=محصول جدید +NewService=خدمات جدید +ProductCode=کد محصول +ServiceCode=کد سرویس +ProductVatMassChange=تغییر مالیات بر ارزش افزوده جرم +ProductVatMassChangeDesc=این صفحه را می توان مورد استفاده برای تغییر نرخ مالیات بر ارزش افزوده در محصولات یا خدمات از یک مقدار را به دیگری تعریف شده است. اخطار، این تغییر در تمام پایگاه داده انجام می شود. +MassBarcodeInit=init انجام بارکد جرم +MassBarcodeInitDesc=این صفحه را می توان مورد استفاده قرار گیرد به مقداردهی اولیه یک بارکد بر روی اشیاء می کند که بارکد تعریف ندارد. بررسی کنید قبل از آن راه اندازی بارکد ماژول کامل است. +ProductAccountancyBuyCode=کد حسابداری (فروش) +ProductAccountancySellCode=کد حسابداری (فروش) +ProductOrService=محصولات و خدمات +ProductsAndServices=محصولات و خدمات +ProductsOrServices=محصولات و خدمات +ProductsAndServicesOnSell=محصولات و خدمات +ProductsAndServicesNotOnSell=محصولات منسوخ و خدمات +ProductsAndServicesStatistics=محصولات و خدمات آمار +ProductsStatistics=آمار محصولات +ProductsOnSell=محصولات موجود +ProductsNotOnSell=محصولات و منسوخ +ProductsOnSellAndOnBuy=Products not for sale nor purchase +ServicesOnSell=خدمات در دسترس +ServicesNotOnSell=خدمات منسوخ +ServicesOnSellAndOnBuy=Services not for sale nor purchase +InternalRef=مرجع داخلی +LastRecorded=آخرین محصولات / خدمات در فروش ثبت +LastRecordedProductsAndServices=تاریخ و زمان آخرین٪ ثبت محصولات / خدمات +LastModifiedProductsAndServices=تاریخ و زمان آخرین%s تغییر داده محصولات / خدمات +LastRecordedProducts=تاریخ و زمان آخرین٪ محصولات ثبت شده +LastRecordedServices=تاریخ و زمان آخرین٪ بازدید کنندگان خدمات ثبت +LastProducts=آخرین محصولات +CardProduct0=کارت +CardProduct1=کارت خدمات +CardContract=کارت قرارداد Warehouse=مخزن -Warehouses=المستودعات -WarehouseOpened=فتح مخزن -WarehouseClosed=مخزن مغلق -Stock=الأسهم -Stocks=الاسهم -Movement=الحركة -Movements=حركات -Sell=مبيعات -Buy=مشتريات -OnSell=على بيع -OnBuy=شراؤها -NotOnSell=من بيع -ProductStatusOnSell=على بيع -ProductStatusNotOnSell=من بيع -ProductStatusOnSellShort=على بيع -ProductStatusNotOnSellShort=من بيع -ProductStatusOnBuy=متاح -ProductStatusNotOnBuy=عفا عليها الزمن -ProductStatusOnBuyShort=متاح -ProductStatusNotOnBuyShort=عفا عليها الزمن -UpdatePrice=آخر التطورات في الأسعار -AppliedPricesFrom=تطبق الأسعار من -SellingPrice=سعر البيع -SellingPriceHT=سعر البيع (صافي الضرائب) -SellingPriceTTC=سعر البيع (شركة الضريبية) -PublicPrice=السعر العام -CurrentPrice=السعر الحالي -NewPrice=السعر الجديد -MinPrice=القطرة. سعر البيع -CantBeLessThanMinPrice=سعر البيع لا يمكن أن يكون أقل من الحد الأدنى المسموح لهذا المنتج (٪ ق بدون الضرائب) -ContractStatus=عقد مركز -ContractStatusClosed=مغلقة -ContractStatusRunning=على التوالي -ContractStatusExpired=انتهى -ContractStatusOnHold=لا تعمل -ContractStatusToRun=ألف mettre én الخدمة -ContractNotRunning=هذا العقد لا تعمل -ErrorProductAlreadyExists=منتج مع الإشارة ٪ ق موجود بالفعل. -ErrorProductBadRefOrLabel=قيمة خاطئة لإشارة أو علامة. -ErrorProductClone=There was a problem while trying to clone the product or service. -Suppliers=الموردين -SupplierRef=المرجع المورد. -ShowProduct=وتظهر المنتج -ShowService=وتظهر الخدمة -ProductsAndServicesArea=مجال المنتجات والخدمات -ProductsArea=منتجات المنطقة -ServicesArea=مجال الخدمات -AddToMyProposals=أضف الى مقترحاتي -AddToOtherProposals=إضافة إلى اقتراحات أخرى -AddToMyBills=أضف إلى الفواتير -AddToOtherBills=إضافة إلى غيرها من مشاريع القوانين -CorrectStock=تصحيح الأوراق المالية -AddPhoto=إضافة الصورة -ListOfStockMovements=قائمة الحركات الأسهم -BuyingPrice=سعر الشراء -SupplierCard=بطاقة المورد -CommercialCard=بطاقة تجارية -AllWays=الطريق إلى إيجاد منتجك في الأسهم -NoCat=المنتج ليس في أي فئة من فئات -PrimaryWay=الطريق الرئيسي -PriceRemoved=رفع الأسعار -BarCode=الباركود -BarcodeType=نوع الباركود -SetDefaultBarcodeType=حدد نوع الباركود -BarcodeValue=قيمة الباركود -NoteNotVisibleOnBill=علما) على الفواتير غير مرئي ، واقتراحات...) -CreateCopy=خلق صورة -ServiceLimitedDuration=إذا كان المنتج هو خدمة لفترة محدودة : -MultiPricesAbility=Several level of prices per product/service -MultiPricesNumPrices=عدد من السعر -MultiPriceLevelsName=سعر الفئات -AssociatedProductsAbility=تنشيط المنتجات -AssociatedProducts=المنتجات -AssociatedProductsNumber=عدد المنتجات -ParentProductsNumber=Number of parent virtual product -IfZeroItIsNotAVirtualProduct=If 0, this product is not a virtual product -IfZeroItIsNotUsedByVirtualProduct=If 0, this product is not used by any virtual product -EditAssociate=المنتسبون -Translation=الترجمة -KeywordFilter=الكلمة الرئيسية فلتر -CategoryFilter=فئة فلتر -ProductToAddSearch=إضافة إلى البحث عن المنتج -AddDel=إضافة / حذف -Quantity=الكمية -NoMatchFound=العثور على أي مباراة -ProductAssociationList=قائمة المنتجات المتعلقة / الخدمات : اسم المنتج / الخدمة (الكمية المتضررة) -ProductParentList=List of virtual products/services with this product as a component -ErrorAssociationIsFatherOfThis=واحد من اختيار المنتج الأم الحالية المنتج -DeleteProduct=حذف المنتجات / الخدمات -ConfirmDeleteProduct=هل أنت متأكد من حذف هذه المنتجات / الخدمات؟ -ProductDeleted=المنتجات والخدمات "٪ ل" حذفها من قاعدة البيانات. -DeletePicture=حذف الصورة -ConfirmDeletePicture=هل أنت متأكد من أنك تريد حذف هذه الصورة؟ -ExportDataset_produit_1=المنتجات -ExportDataset_service_1=الخدمات -ImportDataset_produit_1=المنتجات -ImportDataset_service_1=الخدمات -DeleteProductLine=حذف خط الإنتاج -ConfirmDeleteProductLine=هل أنت متأكد من أنك تريد حذف هذا السطر المنتج؟ -NoProductMatching=أي المنتجات / الخدمات تطابق معاييرك -MatchingProducts=مطابقة المنتجات / الخدمات -NoStockForThisProduct=لا رصيد لهذا المنتج -NoStock=اي للاسهم -Restock=اعادة -ProductSpecial=خاص -QtyMin=Minimum Qty -PriceQty=ثمن هذه الكمية -PriceQtyMin=Price for this min. qty (w/o discount) -VATRateForSupplierProduct=VAT Rate (for this supplier/product) -DiscountQtyMin=Default discount for qty -NoPriceDefinedForThisSupplier=لا السعر الكمية المحددة لهذا المورد / المنتج -NoSupplierPriceDefinedForThisProduct=لا مورد السعر الكمية المحددة لهذا المنتج -RecordedProducts=المنتجات المسجلة -RecordedServices=Services recorded -RecordedProductsAndServices=المنتجات / الخدمات المسجلة -PredefinedProductsToSell=Predefined products to sell -PredefinedServicesToSell=Predefined services to sell -PredefinedProductsAndServicesToSell=Predefined products/services to sell -PredefinedProductsToPurchase=Predefined product to purchase -PredefinedServicesToPurchase=Predefined services to purchase -PredefinedProductsAndServicesToPurchase=Predefined products/services to puchase -GenerateThumb=يولد الإبهام -ProductCanvasAbility=خاصة استخدام "قماش" addons -ServiceNb=خدمة ق # ٪ -ListProductServiceByPopularity=قائمة المنتجات / الخدمات حسب الشهرة -ListProductByPopularity=قائمة المنتجات / الخدمات شعبية -ListServiceByPopularity=قائمة الخدمات حسب الشهرة -Finished=المنتجات المصنعة -RowMaterial=المادة الأولى -CloneProduct=استنساخ المنتجات أو الخدمات -ConfirmCloneProduct=هل أنت متأكد من أن المنتج أو الخدمة استنساخ ٪ ق؟ -CloneContentProduct=استنساخ جميع المعلومات الرئيسية من المنتجات / الخدمات -ClonePricesProduct=استنساخ الرئيسية معلومات والأسعار -CloneCompositionProduct=Clone virtual product/services -ProductIsUsed=ويستخدم هذا المنتج -NewRefForClone=المرجع. من المنتجات الجديدة / خدمة -CustomerPrices=أسعار العملاء -SuppliersPrices=أسعار الموردين -CustomCode=Customs code -CountryOrigin=Origin country -HiddenIntoCombo=Hidden into select lists -Nature=Nature -ProductCodeModel=Product ref template -ServiceCodeModel=Service ref template -AddThisProductCard=Create product card -HelpAddThisProductCard=This option allows you to create or clone a product if it does not exist. -AddThisServiceCard=Create service card -HelpAddThisServiceCard=This option allows you to create or clone a service if it does not exist. -CurrentProductPrice=Current price -AlwaysUseNewPrice=Always use current price of product/service -AlwaysUseFixedPrice=Use the fixed price -PriceByQuantity=Price by quantity -PriceByQuantityRange=Quantity range -ProductsDashboard=Products/Services summary -UpdateOriginalProductLabel=Modify original label -HelpUpdateOriginalProductLabel=Allows to edit the name of the product +Warehouses=ساختمان و ذخیره سازی +WarehouseOpened=انبار را باز کرد +WarehouseClosed=انبار بسته شده +Stock=موجودی +Stocks=سهام +Movement=جنبش +Movements=جنبش +Sell=فروش +Buy=خرید +OnSell=برای فروش +OnBuy=برای خرید +NotOnSell=نه برای فروش +ProductStatusOnSell=برای فروش +ProductStatusNotOnSell=نه برای فروش +ProductStatusOnSellShort=برای فروش +ProductStatusNotOnSellShort=نه برای فروش +ProductStatusOnBuy=برای خرید +ProductStatusNotOnBuy=نه برای خرید +ProductStatusOnBuyShort=برای خرید +ProductStatusNotOnBuyShort=نه برای خرید +UpdatePrice=قیمت به روز رسانی +AppliedPricesFrom=قیمت های کاربردی از +SellingPrice=قیمت فروش +SellingPriceHT=قیمت فروش (خالص از مالیات) +SellingPriceTTC=قیمت فروش (مالیات شرکت) +PublicPrice=قیمت عمومی +CurrentPrice=قیمت کنونی +NewPrice=قیمت های جدید +MinPrice=هر چیز کوچک. قیمت فروش +MinPriceHT=Minim. selling price (net of tax) +MinPriceTTC=Minim. selling price (inc. tax) +CantBeLessThanMinPrice=قیمت فروش نمی تواند کمتر از حداقل مجاز برای این محصول (٪ بدون مالیات). این پیام همچنین می تواند به نظر می رسد اگر شما نوع تخفیف بیش از حد مهم است. +ContractStatus=وضعیت قرارداد +ContractStatusClosed=بسته +ContractStatusRunning=در حال اجرا +ContractStatusExpired=سپری +ContractStatusOnHold=در حال اجرا نیست +ContractStatusToRun=mettre EN خدمات +ContractNotRunning=این قرارداد در حال اجرا نیست +ErrorProductAlreadyExists=محصول با مرجع%s در حال حاضر وجود دارد. +ErrorProductBadRefOrLabel=ارزش اشتباه به عنوان مرجع و یا برچسب. +ErrorProductClone=یک مشکل وجود دارد در حالی که تلاش برای کلون کردن محصول و یا خدمات. +Suppliers=تولید کنندگان +SupplierRef=کد عکس محصول تامین کننده است. +ShowProduct=نمایش محصول +ShowService=نمایش خدمات +ProductsAndServicesArea=محصولات و خدمات منطقه +ProductsArea=منطقه محصولات +ServicesArea=خدمات منطقه +AddToMyProposals=اضافه کردن به پیشنهاد من +AddToOtherProposals=اضافه کردن به پیشنهادات دیگر +AddToMyBills=اضافه کردن به صورتحساب من +AddToOtherBills=اضافه کردن به صورتحساب های دیگر +CorrectStock=سهام صحیح +AddPhoto=اضافه کردن عکس +ListOfStockMovements=فهرست جنبش های سهام +BuyingPrice=قیمت خرید +SupplierCard=کارت تامین کننده +CommercialCard=کارت بازرگانی +AllWays=راه برای پیدا کردن محصول خود را در سهام +NoCat=محصول خود را در هر موضوع نیستید +PrimaryWay=مسیر اولیه +PriceRemoved=قیمت حذف +BarCode=بارکد +BarcodeType=نوع بارکد +SetDefaultBarcodeType=تنظیم نوع بارکد +BarcodeValue=ارزش بارکد +NoteNotVisibleOnBill=توجه داشته باشید (در صورت حساب قابل رویت نیست، پیشنهاد ...) +CreateCopy=ایجاد کپی +ServiceLimitedDuration=اگر محصول یک سرویس با مدت زمان محدود است: +MultiPricesAbility=سطح بسیاری از قیمت هر محصول / خدمات +MultiPricesNumPrices=تعداد قیمت +MultiPriceLevelsName=مقوله های قیمت +AssociatedProductsAbility=فعال محصولات مجازی از ویژگی های +AssociatedProducts=محصول مجازی +AssociatedProductsNumber=تعدادی از محصولات ساخت این محصول مجازی +ParentProductsNumber=تعداد پدر و مادر محصول مجازی +IfZeroItIsNotAVirtualProduct=اگر 0، این محصول یک محصول مجازی +IfZeroItIsNotUsedByVirtualProduct=اگر 0، این محصول با هر نوع محصول مجازی استفاده نمی شود +EditAssociate=وابسته +Translation=ترجمه +KeywordFilter=فیلتر کلمه کلیدی +CategoryFilter=فیلتر گروه +ProductToAddSearch=جستجو محصول برای اضافه کردن +AddDel=اضافه کردن / حذف +Quantity=مقدار +NoMatchFound=هیچ بازی یافت +ProductAssociationList=فهرست محصولات مرتبط / خدمات: نام محصول / خدمات (مقدار تحت تاثیر قرار) +ProductParentList=لیست محصولات مجازی / خدمات با این محصول به عنوان یک جزء +ErrorAssociationIsFatherOfThis=یکی از محصول انتخاب پدر و مادر با محصول فعلی است +DeleteProduct=حذف یک محصول / خدمات +ConfirmDeleteProduct=آیا مطمئن هستید که می خواهید به حذف این محصول / خدمات؟ +ProductDeleted=محصولات / خدمات "%s" حذف از پایگاه داده باشد. +DeletePicture=حذف یک عکس +ConfirmDeletePicture=آیا مطمئن هستید که می خواهید این تصویر را حذف کنید؟ +ExportDataset_produit_1=محصولات +ExportDataset_service_1=خدمات +ImportDataset_produit_1=محصولات +ImportDataset_service_1=خدمات +DeleteProductLine=حذف خط تولید +ConfirmDeleteProductLine=آیا مطمئن هستید که می خواهید این خط تولید را حذف کنید؟ +NoProductMatching=هیچ محصول / خدمات مطابقت با معیار شما +MatchingProducts=جستجوی محصولات / خدمات +NoStockForThisProduct=بدون سهام برای این محصول +NoStock=بدون سهام +Restock=Restock +ProductSpecial=ویژه +QtyMin=حداقل تعداد +PriceQty=قیمت این مقدار +PriceQtyMin=قیمت این دقیقه. تعداد (W / O تخفیف) +VATRateForSupplierProduct=نرخ مالیات بر ارزش افزوده (برای این عرضه کننده کالا / محصول) +DiscountQtyMin=به طور پیش فرض تخفیف ویژه برای تعداد +NoPriceDefinedForThisSupplier=بدون قیمت / تعداد تعریف شده برای این عرضه کننده کالا / محصول +NoSupplierPriceDefinedForThisProduct=بدون منبع قیمت / تعداد تعریف شده برای این محصول +RecordedProducts=محصولات ثبت شده +RecordedServices=خدمات ثبت +RecordedProductsAndServices=محصولات / خدمات ثبت +PredefinedProductsToSell=فرآورده های از پیش تعریف شده برای فروش +PredefinedServicesToSell=خدمات از پیش تعریف شده برای فروش +PredefinedProductsAndServicesToSell=فرآورده های از پیش تعریف شده / خدمات برای فروش +PredefinedProductsToPurchase=محصول از پیش تعریف شده برای خرید +PredefinedServicesToPurchase=خدمات از پیش تعریف شده برای خرید +PredefinedProductsAndServicesToPurchase=فرآورده های از پیش تعریف شده / خدمات به puchase +GenerateThumb=ساختن عکس کوچک +ProductCanvasAbility=استفاده از ویژه "بوم" افزونه +ServiceNb=خدمات #%s را +ListProductServiceByPopularity=لیست محصولات / خدمات محبوبیت +ListProductByPopularity=لیست محصولات بر اساس محبوبیت +ListServiceByPopularity=فهرست خدمات محبوبیت +Finished=محصول تولیدی +RowMaterial=مواد اولیه +CloneProduct=محصول کلون یا خدمات +ConfirmCloneProduct=آیا مطمئن هستید که می خواهید به کلون کردن محصول و یا خدمات از%s؟ +CloneContentProduct=کلون تمام اطلاعات اصلی محصول / خدمات +ClonePricesProduct=اطلاعات اصلی کلون و قیمت +CloneCompositionProduct=کلون مجازی محصولات / خدمات +ProductIsUsed=این محصول مورد استفاده قرار گیرد +NewRefForClone=کد عکس. محصول جدید / خدمات +CustomerPrices=مشتریان قیمت +SuppliersPrices=تولید کنندگان قیمت +SuppliersPricesOfProductsOrServices=Suppliers prices (of products or services) +CustomCode=کد آداب و رسوم +CountryOrigin=کشور مبدا +HiddenIntoCombo=پنهان به لیست انتخاب کنید +Nature=طبیعت +ProductCodeModel=قالب کد عکس محصول +ServiceCodeModel=قالب کد عکس خدمات +AddThisProductCard=ایجاد کارت محصول +HelpAddThisProductCard=این گزینه به شما اجازه می دهد که در ایجاد یا کلون کردن یک محصول اگر آن وجود ندارد. +AddThisServiceCard=ایجاد کارت خدمات +HelpAddThisServiceCard=این گزینه به شما اجازه می دهد که در ایجاد یا کلون کردن یک سرویس اگر آن وجود ندارد. +CurrentProductPrice=قیمت کنونی +AlwaysUseNewPrice=همیشه قیمت فعلی محصول / خدمات استفاده +AlwaysUseFixedPrice=استفاده از قیمت های ثابت +PriceByQuantity=قیمت با مقدار +PriceByQuantityRange=دامنه تعداد +ProductsDashboard=محصولات / خدمات خلاصه +UpdateOriginalProductLabel=تغییر برچسب اصلی +HelpUpdateOriginalProductLabel=اجازه می دهد تا به ویرایش نام محصول ### composition fabrication -Building=Production and items dispatchment -Build=Produce -BuildIt=Produce & Dispatch -BuildindListInfo=Available quantity for production per warehouse (set it to 0 for no further action) -QtyNeed=الكمية -UnitPmp=Net unit VWAP -CostPmpHT=Net total VWAP -ProductUsedForBuild=Auto consumed by production -ProductBuilded=Production completed -ProductsMultiPrice=Product multi-price -ProductSellByQuarterHT=Products turnover quarterly VWAP -ServiceSellByQuarterHT=Services turnover quarterly VWAP -Quarter1=1st. Quarter -Quarter2=2nd. Quarter -Quarter3=3rd. Quarter -Quarter4=4th. Quarter -BarCodePrintsheet=Print bar code -PageToGenerateBarCodeSheets=With this tool, you can print sheets of bar code stickers. Choose format of your sticker page, type of barcode and value of barcode, then click on button %s. -NumberOfStickers=Number of stickers to print on page -PrintsheetForOneBarCode=Print several stickers for one barcode -BuildPageToPrint=Generate page to print -FillBarCodeTypeAndValueManually=Fill barcode type and value manually. -FillBarCodeTypeAndValueFromProduct=Fill barcode type and value from barcode of a product. -FillBarCodeTypeAndValueFromThirdParty=Fill barcode type and value from barcode of a thirdparty. -DefinitionOfBarCodeForProductNotComplete=Definition of type or value of bar code not complete for product %s. -DefinitionOfBarCodeForThirdpartyNotComplete=Definition of type or value of bar code non complete for thirdparty %s. -BarCodeDataForProduct=Barcode information of product %s : -BarCodeDataForThirdparty=Barcode information of thirdparty %s : -ResetBarcodeForAllRecords=Define barcode value for all records (this will also reset barcode value already defined with new values) -PriceByCustomer=Price by customer -PriceCatalogue=Unique price per product/service -PricingRule=Pricing Rules -AddCustomerPrice=Add price by customers -ForceUpdateChildPriceSoc=Set same price on customer subsidiaries -PriceByCustomerLog=Price by customer log +Building=تولید و اقلام dispatchment +Build=محصول +BuildIt=تولید و اعزام +BuildindListInfo=مقدار موجود برای تولید در هر انبار (آن را به 0 برای هیچ اقدام دیگری) +QtyNeed=تعداد +UnitPmp=خالص واحد VWAP +CostPmpHT=خالص VWAP کل +ProductUsedForBuild=خودکار مصرف شده توسط تولید +ProductBuilded=تولید کامل +ProductsMultiPrice=محصولات چند قیمت +ProductsOrServiceMultiPrice=Customers prices (of products or services, multi-prices) +ProductSellByQuarterHT=گردش مالی محصولات VWAP سه ماهه +ServiceSellByQuarterHT=خدمات گردش مالی VWAP سه ماهه +Quarter1=1. یک چهارم +Quarter2=2. یک چهارم +Quarter3=3. یک چهارم +Quarter4=4. یک چهارم +BarCodePrintsheet=چاپ بارکد +PageToGenerateBarCodeSheets=با استفاده از این ابزار، شما می توانید ورق از برچسب بارکد چاپ کنید. انتخاب قالب صفحه برچسب شما، نوع بارکد و ارزش بارکد، و سپس بر روی دکمه%s را کلیک کنید. +NumberOfStickers=تعداد برچسب برای چاپ بر روی صفحه +PrintsheetForOneBarCode=چاپ چندین برچسب برای یک بارکد +BuildPageToPrint=تولید صفحه چاپ +FillBarCodeTypeAndValueManually=پر کردن بارکد از نوع و ارزش دستی. +FillBarCodeTypeAndValueFromProduct=پر کردن بارکد از نوع و مقدار از بارکد از محصول می باشد. +FillBarCodeTypeAndValueFromThirdParty=پر کردن بارکد از نوع و مقدار از بارکد از thirdparty. +DefinitionOfBarCodeForProductNotComplete=تعریف نوع یا مقدار بارکد برای محصول%s را کامل کنه. +DefinitionOfBarCodeForThirdpartyNotComplete=تعریف نوع و مقدار بار کد غیر کامل برای thirdparty٪ است. +BarCodeDataForProduct=اطلاعات بارکد محصول%s را: +BarCodeDataForThirdparty=اطلاعات بارکد از thirdparty٪ بازدید کنندگان: +ResetBarcodeForAllRecords=تعریف ارزش بارکد برای همه سوابق (این نیز به ارزش بارکد در حال حاضر با ارزش های جدید تعریف شده تنظیم مجدد) +PriceByCustomer=قیمت های مشتری +PriceCatalogue=قیمت منحصر به فرد در هر محصول / خدمات +PricingRule=قوانین قیمت گذاری +AddCustomerPrice=اضافه کردن قیمت های مشتریان +ForceUpdateChildPriceSoc=همان قیمت تعیین شده در شرکت های تابعه مشتری +PriceByCustomerLog=قیمت های ورود مشتری diff --git a/htdocs/langs/fa_IR/projects.lang b/htdocs/langs/fa_IR/projects.lang index 72fed9adc10..1a9069a7205 100644 --- a/htdocs/langs/fa_IR/projects.lang +++ b/htdocs/langs/fa_IR/projects.lang @@ -1,124 +1,127 @@ # Dolibarr language file - Source file is en_US - projects -# RefProject=Ref. project -# ProjectId=Project Id -Project=المشروع -Projects=المشاريع -SharedProject=مشاريع مشتركة -PrivateProject=اتصالات من المشروع -MyProjectsDesc=ويقتصر هذا الرأي على المشاريع التي تقوم على الاتصال (كل ما هو نوع). -ProjectsPublicDesc=هذا الرأي يعرض جميع المشاريع ويسمح لك قراءة. -ProjectsDesc=ويعرض هذا الرأي جميع المشاريع (أذونات المستخدم الخاص أعطى الصلاحية لعرض كل شيء). -MyTasksDesc=ويقتصر هذا الرأي على المشروعات أو المهام التي هي الاتصال للحصول على (ما هو نوع). -TasksPublicDesc=هذا الرأي يعرض جميع المشاريع والمهام ويسمح لك قراءة. -TasksDesc=هذا الرأي يعرض جميع المشاريع والمهام (أذونات المستخدم الخاص أعطى الصلاحية لعرض كل شيء). -Myprojects=بلدي المشاريع -ProjectsArea=مشاريع المنطقة -NewProject=مشروع جديد -AddProject=يضيف المشروع -DeleteAProject=حذف مشروع -DeleteATask=حذف مهمة -ConfirmDeleteAProject=هل أنت متأكد من أنك تريد حذف هذا المشروع؟ -ConfirmDeleteATask=هل أنت متأكد من أنك تريد حذف هذه المهمة؟ -OfficerProject=ضابط المشروع -LastProjects=آخر مشاريع ق ٪ -AllProjects=جميع المشاريع -ProjectsList=قائمة المشاريع -ShowProject=وتبين للمشروع -SetProject=وضع المشروع -NoProject=لا يعرف أو المملوكة للمشروع -NbOpenTasks=ملاحظة : من مهام فتح -NbOfProjects=ملاحظة : للمشاريع -TimeSpent=الوقت الذي تستغرقه -# TimesSpent=Time spent -RefTask=المرجع. مهمة -LabelTask=علامة مهمة -# TaskTimeSpent=Time spent on tasks -# TaskTimeUser=User -# TaskTimeNote=Note -# TaskTimeDate=Date -NewTimeSpent=جديد الوقت الذي يقضيه -MyTimeSpent=وقتي قضى -MyTasks=مهمتي -Tasks=المهام -Task=مهمة -# TaskDateStart=Task start date -# TaskDateEnd=Task end date -# TaskDescription=Task description -NewTask=مهمة جديدة -AddTask=إضافة مهمة -AddDuration=تضاف المدة -Activity=النشاط -Activities=المهام والأنشطة -MyActivity=نشاط بلدي -MyActivities=بلدي المهام والأنشطة -MyProjects=بلدي المشاريع -DurationEffective=فعالة لمدة -Progress=تقدم -# ProgressDeclared=Declared progress -# ProgressCalculated=Calculated progress -Time=وقت -ListProposalsAssociatedProject=قائمة المقترحات التجارية المرتبطة بالمشروع. -ListOrdersAssociatedProject=قائمة الزبائن المرتبطة بالمشروع. -ListInvoicesAssociatedProject=قائمة العملاء والفواتير المرتبطة بالمشروع -ListPredefinedInvoicesAssociatedProject=قائمة العملاء مسبقا والفواتير المرتبطة المشروع -ListSupplierOrdersAssociatedProject=قائمة الموردين الأوامر المرتبطة بالمشروع -ListSupplierInvoicesAssociatedProject=قائمة الموردين المرتبطة بالمشروع. -ListContractAssociatedProject=قائمة العقود المرتبطة بالمشروع. -ListFichinterAssociatedProject=قائمة التدخلات المرتبطة بالمشروع -ListTripAssociatedProject=قائمة من الرحلات والنفقات المرتبطة بالمشروع -ListActionsAssociatedProject=قائمة الإجراءات المرتبطة بالمشروع -ActivityOnProjectThisWeek=نشاط المشروع هذا الاسبوع -ActivityOnProjectThisMonth=نشاط المشروع هذا الشهر -ActivityOnProjectThisYear=نشاط المشروع هذا العام -ChildOfTask=طفل من مشروع / مهمة -NotOwnerOfProject=لا صاحب هذا المشروع من القطاع الخاص -AffectedTo=إلى المتضررين -CantRemoveProject=هذا المشروع لا يمكن إزالتها كما هي المرجعية بعض أشياء أخرى (الفاتورة ، أو غيرها من الأوامر). انظر referers تبويبة. -ValidateProject=تحقق من مشروع غابة -ConfirmValidateProject=هل أنت متأكد أنك تريد التحقق من صحة هذا المشروع؟ -CloseAProject=وثيقة المشروع -ConfirmCloseAProject=هل أنت متأكد أنك تريد إغلاق هذا المشروع؟ -ReOpenAProject=فتح مشروع -ConfirmReOpenAProject=هل أنت متأكد أنك تريد إعادة فتح هذا المشروع؟ -ProjectContact=مشروع اتصالات -ActionsOnProject=الإجراءات على المشروع -YouAreNotContactOfProject=كنت لا اتصال لهذا المشروع الخاص -DeleteATimeSpent=قضى الوقت حذف -ConfirmDeleteATimeSpent=هل أنت متأكد أنك تريد حذف هذا الوقت الذي يقضيه؟ -DoNotShowMyTasksOnly=أنا لم تتأثر وانظر أيضا إلى المهام ط -ShowMyTasksOnly=أنا تأثرت المهام عرض فقط الأول -TaskRessourceLinks=ملتقيات -ProjectsDedicatedToThisThirdParty=مشاريع مخصصة لهذا الطرف الثالث -NoTasks=أية مهام لهذا المشروع -LinkedToAnotherCompany=ربط طرف ثالث آخر -# TaskIsNotAffectedToYou=Task not allocated to you -# ErrorTimeSpentIsEmpty=Time spent is empty -# ThisWillAlsoRemoveTasks=This action will also delete all tasks of project (%s tasks at the moment) and all inputs of time spent. -# IfNeedToUseOhterObjectKeepEmpty=If some objects (invoice, order, ...), belonging to another third party, must be linked to the project to create, keep this empty to have the project being multi third parties. -# CloneProject=Clone project -# CloneTasks=Clone tasks -# CloneContacts=Clone contacts -# CloneNotes=Clone notes -# CloneProjectFiles=Clone project joined files -# CloneTaskFiles=Clone task(s) joined files (if task(s) cloned) -# ConfirmCloneProject=Are you sure to clone this project ? -# ProjectReportDate=Change task date according project start date -# ErrorShiftTaskDate=Impossible to shift task date according to new project start date -# ProjectsAndTasksLines=Projects and tasks -# ProjectCreatedInDolibarr=Project %s created +RefProject=کد عکس. پروژه +ProjectId=پروژه کد +Project=پروژه +Projects=پروژه ها +SharedProject=هر کسی +PrivateProject=اطلاعات تماس پروژه +MyProjectsDesc=این دیدگاه محدود به پروژه شما یک تماس برای (هر چه باشد نوع) می باشد. +ProjectsPublicDesc=این دیدگاه ارائه تمام پروژه ها به شما این اجازه را بخوانید. +ProjectsDesc=این دیدگاه ارائه تمام پروژه (مجوز دسترسی خود را به شما عطا اجازه دسترسی به همه چیز). +MyTasksDesc=این دیدگاه به پروژه ها و یا کارهای شما تماس برای (هر چه باشد نوع) می باشد محدود است. +TasksPublicDesc=این دیدگاه ارائه تمام پروژه ها و کارهای شما مجاز به خواندن. +TasksDesc=این دیدگاه ارائه تمام پروژه ها و وظایف (مجوز دسترسی خود را به شما عطا اجازه دسترسی به همه چیز). +Myprojects=پروژه های من +ProjectsArea=منطقه پروژه ها +NewProject=پروژه های جدید +AddProject=اضافه کردن پروژه +DeleteAProject=حذف یک پروژه +DeleteATask=حذف کار +ConfirmDeleteAProject=آیا مطمئن هستید که می خواهید این پروژه را حذف کنید؟ +ConfirmDeleteATask=آیا مطمئن هستید که می خواهید این کار را حذف کنید؟ +OfficerProject=پروژه افسر +LastProjects=پروژه تاریخ و زمان آخرین٪ بازدید کنندگان +AllProjects=همه پروژه ها +ProjectsList=لیست پروژه ها +ShowProject=نمایش پروژه +SetProject=تنظیم پروژه +NoProject=هیچ پروژه تعریف شده و یا متعلق به +NbOpenTasks=NB از وظایف باز +NbOfProjects=Nb در پروژه +TimeSpent=زمان صرف شده +TimesSpent=زمان صرف شده +RefTask=کد عکس. کار +LabelTask=کار برچسب +TaskTimeSpent=مدت زمان صرف شده در کارها +TaskTimeUser=کاربر +TaskTimeNote=یادداشت +TaskTimeDate=تاریخ +NewTimeSpent=زمان جدید به سر برد +MyTimeSpent=وقت من صرف +MyTasks=کارهای من +Tasks=وظایف +Task=کار +TaskDateStart=تاریخ شروع کار +TaskDateEnd=تاریخ پایان کار +TaskDescription=شرح وظیفه +NewTask=کار جدید +AddTask=اضافه کردن کار +AddDuration=اضافه کردن مدت زمان +Activity=فعالیت +Activities=وظایف / فعالیت ها +MyActivity=فعالیت های من +MyActivities=کارهای من / فعالیت ها +MyProjects=پروژه های من +DurationEffective=مدت زمان موثر +Progress=پیشرفت +ProgressDeclared=پیشرفت اعلام کرد +ProgressCalculated=پیشرفت محاسبه شده +Time=زمان +ListProposalsAssociatedProject=فهرست طرح تجاری مرتبط با پروژه +ListOrdersAssociatedProject=لیست سفارشات مشتری در ارتباط با پروژه +ListInvoicesAssociatedProject=فهرست فاکتورها مشتری در ارتباط با پروژه +ListPredefinedInvoicesAssociatedProject=فهرست فاکتورها از پیش تعریف شده مشتری در ارتباط با پروژه +ListSupplierOrdersAssociatedProject=فهرست سفارشات منبع در ارتباط با پروژه +ListSupplierInvoicesAssociatedProject=فهرست فاکتورها منبع در ارتباط با پروژه +ListContractAssociatedProject=فهرست قرارداد در ارتباط با پروژه +ListFichinterAssociatedProject=فهرست مداخلات مرتبط با پروژه +ListTripAssociatedProject=فهرست از سفر و هزینه های مرتبط با پروژه +ListActionsAssociatedProject=فهرست رویدادی به این پروژه +ActivityOnProjectThisWeek=فعالیت در پروژه این هفته +ActivityOnProjectThisMonth=فعالیت در پروژه این ماه +ActivityOnProjectThisYear=فعالیت در پروژه سال جاری +ChildOfTask=کودکان از پروژه / کار +NotOwnerOfProject=نه صاحب این پروژه خصوصی +AffectedTo=اختصاص داده شده به +CantRemoveProject=این پروژه نمی تواند حذف شود به عنوان آن است که توسط برخی از اشیاء دیگر (فاکتور، سفارشات و یا دیگر) اشاره شده است. تب مراجعه کنید. +ValidateProject=اعتبارسنجی projet +ConfirmValidateProject=آیا مطمئن هستید که می خواهید به اعتبار این پروژه؟ +CloseAProject=بستن پروژه +ConfirmCloseAProject=آیا مطمئن هستید که می خواهید برای بستن این پروژه؟ +ReOpenAProject=پروژه گسترش +ConfirmReOpenAProject=آیا مطمئن هستید که دوباره به باز کردن این پروژه را می خواهید؟ +ProjectContact=تماس با ما پروژه +ActionsOnProject=رویدادها در پروژه +YouAreNotContactOfProject=شما یک تماس از این پروژه خصوصی نیست +DeleteATimeSpent=زمان صرف شده حذف +ConfirmDeleteATimeSpent=آیا مطمئن هستید که می خواهید به حذف این زمان صرف شده؟ +DoNotShowMyTasksOnly=همچنین نگاه کنید به وظایف به من اختصاص داده نشده +ShowMyTasksOnly=نمایش فقط وظایف اختصاص داده شده به من +TaskRessourceLinks=Ressources +ProjectsDedicatedToThisThirdParty=پروژه ها اختصاص داده شده به این شخص ثالث +NoTasks=بدون وظایف برای این پروژه +LinkedToAnotherCompany=لینک به دیگر شخص ثالث +TaskIsNotAffectedToYou=کار به شما اختصاص ندارد +ErrorTimeSpentIsEmpty=مدت زمان صرف شده خالی است +ThisWillAlsoRemoveTasks=این کار همچنین تمام کارهای پروژه (وظایف%s در حال حاضر) حذف و تمام ورودی ها از زمان صرف شده. +IfNeedToUseOhterObjectKeepEmpty=اگر برخی از اشیاء (فاکتور، سفارش، ...)، متعلق به شخص ثالث دیگری، باید به این پروژه برای ایجاد، نگه داشتن این خالی به این پروژه که احزاب چند سوم مرتبط است. +CloneProject=پروژه کلون +CloneTasks=وظایف کلون +CloneContacts=تماس با کلون +CloneNotes=یادداشت کلون +CloneProjectFiles=پروژه کلون فایل های پیوست +CloneTaskFiles=کار کلون (بازدید کنندگان) فایل پیوست (در صورت کار (بازدید کنندگان) شبیه سازی شده) +ConfirmCloneProject=آیا مطمئن به کلون کردن این پروژه؟ +ProjectReportDate=تاریخ کار تغییر بر اساس تاریخ شروع پروژه +ErrorShiftTaskDate=غیر ممکن است به تغییر تاریخ کار با توجه به پروژه جدید تاریخ شروع +ProjectsAndTasksLines=پروژه ها و وظایف +ProjectCreatedInDolibarr=پروژه%s را ایجاد +TaskCreatedInDolibarr=وظیفه%s را ایجاد +TaskModifiedInDolibarr=وظیفه%s تغییر +TaskDeletedInDolibarr=وظیفه%s را حذف ##### Types de contacts ##### -TypeContact_project_internal_PROJECTLEADER=مشروع زعيم -TypeContact_project_external_PROJECTLEADER=مشروع زعيم -# TypeContact_project_internal_PROJECTCONTRIBUTOR=Contributor -# TypeContact_project_external_PROJECTCONTRIBUTOR=Contributor -TypeContact_project_task_internal_TASKEXECUTIVE=المهمة التنفيذية -TypeContact_project_task_external_TASKEXECUTIVE=المهمة التنفيذية -# TypeContact_project_task_internal_TASKCONTRIBUTOR=Contributor -# TypeContact_project_task_external_TASKCONTRIBUTOR=Contributor -# SelectElement=Select element -# AddElement=Link to element +TypeContact_project_internal_PROJECTLEADER=رهبر پروژه +TypeContact_project_external_PROJECTLEADER=رهبر پروژه +TypeContact_project_internal_PROJECTCONTRIBUTOR=شرکت کننده +TypeContact_project_external_PROJECTCONTRIBUTOR=شرکت کننده +TypeContact_project_task_internal_TASKEXECUTIVE=اجرایی کار +TypeContact_project_task_external_TASKEXECUTIVE=اجرایی کار +TypeContact_project_task_internal_TASKCONTRIBUTOR=شرکت کننده +TypeContact_project_task_external_TASKCONTRIBUTOR=شرکت کننده +SelectElement=انتخاب عنصر +AddElement=لینک به عنصر # Documents models -DocumentModelBaleine=وهناك مشروع كامل لنموذج التقرير (logo...) -# PlannedWorkload = Planned workload -# WorkloadOccupation= Workload affectation -# ProjectReferers=Refering objects +DocumentModelBaleine=مدل گزارش یک پروژه کامل (logo. ..) +PlannedWorkload = حجم کار برنامه ریزی شده +WorkloadOccupation= تظاهر حجم کار +ProjectReferers=مراجعه اشیاء diff --git a/htdocs/langs/fa_IR/propal.lang b/htdocs/langs/fa_IR/propal.lang index 5a3bc65ffde..1d521324941 100644 --- a/htdocs/langs/fa_IR/propal.lang +++ b/htdocs/langs/fa_IR/propal.lang @@ -1,102 +1,102 @@ # Dolibarr language file - Source file is en_US - propal -Proposals=مقترحات تجارية -Proposal=اقتراح التجارية -ProposalShort=اقتراح -ProposalsDraft=مقترحات مشاريع تجارية -ProposalDraft=اقتراح لمشروع تجاري -ProposalsOpened=افتتح مقترحات تجارية -Prop=مقترحات تجارية -CommercialProposal=اقتراح التجارية -CommercialProposals=مقترحات تجارية -# ProposalCard=Proposal card -NewProp=التجاري الجديد المقترح -NewProposal=التجاري الجديد المقترح -NewPropal=اقتراح جديد -Prospect=احتمال -ProspectList=احتمال قائمة -DeleteProp=اقتراح حذف التجارية -ValidateProp=مصادقة على اقتراح التجارية -AddProp=إضافة اقتراح -ConfirmDeleteProp=هل أنت متأكد من أنك تريد حذف هذا التجارية الاقتراح؟ -ConfirmValidateProp=هل أنت متأكد من هذا التجارية للمصادقة على الاقتراح؟ -LastPropals=آخر مقترحات ٪ -LastClosedProposals=٪ ق الماضي اقتراحات مغلقة -LastModifiedProposals=آخر تعديل المقترحات ق ٪ -AllPropals=جميع المقترحات -LastProposals=آخر مقترحات -SearchAProposal=بحث اقتراح -ProposalsStatistics=مقترحات تجارية 'إحصاءات -NumberOfProposalsByMonth=عدد شهر -AmountOfProposalsByMonthHT=المبلغ في الشهر (بعد خصم الضريبة) -NbOfProposals=عدد من المقترحات والتجاري -ShowPropal=وتظهر اقتراح -PropalsDraft=المسودات -PropalsOpened=فتح -PropalsNotBilled=مغلقة لا توصف -PropalStatusDraft=مشروع (لا بد من التحقق من صحة) -PropalStatusValidated=صادق (اقتراح فتح) -PropalStatusOpened=صادق (اقتراح فتح) -PropalStatusClosed=مغلقة -PropalStatusSigned=وقعت (لمشروع القانون) -PropalStatusNotSigned=لم يتم التوقيع (مغلقة) -PropalStatusBilled=فواتير -PropalStatusDraftShort=مسودة -PropalStatusValidatedShort=صادق -PropalStatusOpenedShort=فتح -PropalStatusClosedShort=مغلقة -PropalStatusSignedShort=وقعت -PropalStatusNotSignedShort=لم يتم التوقيع -PropalStatusBilledShort=فواتير -PropalsToClose=مقترحات ليقفل التجارية -PropalsToBill=ووقع على مشروع القانون التجاري مقترحات -ListOfProposals=قائمة مقترحات تجارية -ActionsOnPropal=الإجراءات على الاقتراح -NoOpenedPropals=فتحت أي مقترحات تجارية -NoOtherOpenedPropals=أي اقتراحات أخرى افتتح التجارية -RefProposal=اقتراح المرجع التجارية -SendPropalByMail=اقتراح ارسال التجارية عن طريق البريد -FileNotUploaded=الملف ليس تحميل -FileUploaded=الملف بنجاح تحميلها -AssociatedDocuments=الوثائق المرتبطة الاقتراح : -ErrorCantOpenDir=لا نستطيع فتح الدليل -DatePropal=تاريخ الاقتراح -DateEndPropal=تاريخ انتهاء الصلاحية -DateEndPropalShort=نهاية التاريخ -ValidityDuration=ومدة صلاحيتها -CloseAs=وثيق مع مركز -ClassifyBilled=تصنيف الفواتير -BuildBill=بناء الفاتورة -ErrorPropalNotFound=Propal ق لم يتم العثور على ٪ -Estimate=التقدير : -EstimateShort=التقدير -OtherPropals=مقترحات أخرى -# AddToDraftProposals=Add to draft proposal -# NoDraftProposals=No draft proposals -CopyPropalFrom=اقتراح إنشاء التجارية عن طريق نسخ وجود اقتراح -CreateEmptyPropal=خلق خاليا التجارية vierge مقترحات أو من قائمة المنتجات / الخدمات -DefaultProposalDurationValidity=تقصير مدة صلاحية اقتراح التجارية (أيام) -UseCustomerContactAsPropalRecipientIfExist=استخدام العميل عنوان الاتصال إذا حددت بدلا من التصدي لطرف ثالث حسب الاقتراح المستفيدة معالجة -ClonePropal=اقتراح استنساخ التجارية -ConfirmClonePropal=هل أنت متأكد من استنساخ هذا الاقتراح ٪ ق التجارية؟ -# ConfirmReOpenProp=Are you sure you want to open back the commercial proposal %s ? -ProposalsAndProposalsLines=واقتراح الخطوط التجارية -ProposalLine=اقتراح خط -# AvailabilityPeriod=Availability delay -# SetAvailability=Set availability delay -# AfterOrder=after order +Proposals=طرح های تجاری +Proposal=پیشنهاد تجاری +ProposalShort=پیشنهاد +ProposalsDraft=طرح تجاری پیش نویس +ProposalDraft=پیش نویس طرح تجاری +ProposalsOpened=طرح های تجاری افتتاح شد +Prop=طرح های تجاری +CommercialProposal=پیشنهاد تجاری +CommercialProposals=طرح های تجاری +ProposalCard=کارت های پیشنهادی +NewProp=طرح تجاری جدید +NewProposal=طرح تجاری جدید +NewPropal=پیشنهاد جدید +Prospect=چشم انداز +ProspectList=لیست چشم انداز +DeleteProp=حذف طرح تجاری +ValidateProp=اعتبار طرح های تجاری +AddProp=اضافه کردن پیشنهاد +ConfirmDeleteProp=آیا مطمئن هستید که می خواهید این پیشنهاد تجاری را حذف کنید؟ +ConfirmValidateProp=آیا مطمئن هستید که می خواهید به اعتبار این پیشنهاد تجاری تحت نام%s را؟ +LastPropals=پیشنهادات و زمان آخرین٪ بازدید کنندگان +LastClosedProposals=تاریخ و زمان آخرین%s را پیشنهاد بسته +LastModifiedProposals=تاریخ و زمان آخرین%s را پیشنهاد اصلاح +AllPropals=تمام طرح های پیشنهادی +LastProposals=آخرین پیشنهادات +SearchAProposal=جستجوی یک پیشنهاد +ProposalsStatistics=آمار طرح های تجاری +NumberOfProposalsByMonth=شماره ماه +AmountOfProposalsByMonthHT=مقدار در ماه (خالص از مالیات) +NbOfProposals=تعداد طرح های تجاری +ShowPropal=نمایش پیشنهاد +PropalsDraft=نوعی بازی چکرز +PropalsOpened=افتتاح شد +PropalsNotBilled=بسته در صورتحساب یا لیست نمی +PropalStatusDraft=پیش نویس (نیاز به تایید می شود) +PropalStatusValidated=اعتبار (پیشنهاد باز است) +PropalStatusOpened=اعتبار (پیشنهاد باز است) +PropalStatusClosed=بسته +PropalStatusSigned=امضا (نیازهای حسابداری و مدیریت) +PropalStatusNotSigned=امضا نشده (بسته شده) +PropalStatusBilled=ثبت شده در صورتحساب یا لیست +PropalStatusDraftShort=پیش نویس +PropalStatusValidatedShort=اعتبار +PropalStatusOpenedShort=افتتاح شد +PropalStatusClosedShort=بسته +PropalStatusSignedShort=امضاء شده +PropalStatusNotSignedShort=امضا نشده +PropalStatusBilledShort=ثبت شده در صورتحساب یا لیست +PropalsToClose=طرح تجاری برای بستن +PropalsToBill=طرح تجاری امضا به لایحه +ListOfProposals=فهرست طرح های تجاری +ActionsOnPropal=رویدادهای پیشنهاد +NoOpenedPropals=طرح های تجاری بدون باز +NoOtherOpenedPropals=هیچ طرح تجاری باز +RefProposal=کد عکس طرح تجاری +SendPropalByMail=ارسال پیشنهاد تجاری از طریق پست +FileNotUploaded=فایل آپلود نشد +FileUploaded=فایل با موفقیت آپلود شد +AssociatedDocuments=اسناد مرتبط با طرح: +ErrorCantOpenDir=آیا می توانم دایرکتوری باز نمی شود +DatePropal=تاریخ پیشنهاد +DateEndPropal=اعتبار تاریخ پایان +DateEndPropalShort=تاریخ پایان +ValidityDuration=مدت اعتبار +CloseAs=نزدیک با وضعیت +ClassifyBilled=طبقه بندی صورتحساب +BuildBill=ساخت فاکتور +ErrorPropalNotFound=Propal%s را یافت نشد +Estimate=برآورد: +EstimateShort=تخمین +OtherPropals=طرح های دیگر +AddToDraftProposals=اضافه کردن به پیش نویس پیشنهاد +NoDraftProposals=بدون پیش نویس پیشنهادات +CopyPropalFrom=ایجاد طرح های تجاری با کپی کردن طرح های موجود +CreateEmptyPropal=ایجاد خالی طرح تجاری vierge و یا از لیست محصولات / خدمات +DefaultProposalDurationValidity=پیش فرض طول مدت اعتبار پیشنهاد های تجاری (در روز) +UseCustomerContactAsPropalRecipientIfExist=اگر به جای آدرس شخص ثالث به عنوان آدرس دریافت کننده پیشنهاد تعریف شده استفاده از آدرس ارتباط با مشتری +ClonePropal=پیشنهاد تجاری کلون +ConfirmClonePropal=آیا مطمئن هستید که می خواهید به کلون های تجاری پیشنهاد شده%s؟ +ConfirmReOpenProp=آیا مطمئن هستید که می خواهید برای باز کردن پشت تجاری پیشنهاد شده%s؟ +ProposalsAndProposalsLines=پیشنهاد تجاری و خطوط +ProposalLine=خط پیشنهاد +AvailabilityPeriod=تاخیر در دسترس +SetAvailability=تنظیم تاخیر در دسترس +AfterOrder=پس از سفارش ##### Availability ##### -AvailabilityTypeAV_NOW=فورا -# AvailabilityTypeAV_1W=1 week -# AvailabilityTypeAV_2W=2 weeks -# AvailabilityTypeAV_3W=3 weeks -# AvailabilityTypeAV_1M=1 month +AvailabilityTypeAV_NOW=فوری +AvailabilityTypeAV_1W=1 هفته +AvailabilityTypeAV_2W=2 هفته +AvailabilityTypeAV_3W=3 هفته +AvailabilityTypeAV_1M=1 ماه ##### Types de contacts ##### -TypeContact_propal_internal_SALESREPFOLL=اقتراح ممثل متابعة -TypeContact_propal_external_BILLING=الزبون فاتورة الاتصال -TypeContact_propal_external_CUSTOMER=اتصل العملاء اقتراح متابعة +TypeContact_propal_internal_SALESREPFOLL=نماینده زیر تا پیشنهاد +TypeContact_propal_external_BILLING=تماس با فاکتور به مشتری +TypeContact_propal_external_CUSTOMER=تماس با مشتری را در پی بالا پیشنهاد # Document models -DocModelAzurDescription=اقتراح نموذج كامل (logo...) -DocModelJauneDescription=اقتراح نموذج اليد الصفراء -# DefaultModelPropalCreate=Default model creation -# DefaultModelPropalToBill=Default template when closing a business proposal (to be invoiced) -# DefaultModelPropalClosed=Default template when closing a business proposal (unbilled) +DocModelAzurDescription=یک مدل پیشنهاد کامل (logo. ..) +DocModelJauneDescription=مدل پیشنهاد Jaune +DefaultModelPropalCreate=ایجاد مدل پیش فرض +DefaultModelPropalToBill=قالب پیش فرض هنگام بستن یک طرح کسب و کار (به صورتحساب می شود) +DefaultModelPropalClosed=قالب پیش فرض هنگام بستن یک طرح کسب و کار (unbilled) diff --git a/htdocs/langs/fa_IR/salaries.lang b/htdocs/langs/fa_IR/salaries.lang index edca71a1829..2cb6f372f7e 100644 --- a/htdocs/langs/fa_IR/salaries.lang +++ b/htdocs/langs/fa_IR/salaries.lang @@ -1,8 +1,8 @@ # Dolibarr language file - Source file is en_US - users -Salary=Salary -Salaries=Salaries -Employee=Employee -NewSalaryPayment=New salary payment -SalaryPayment=Salary payment -SalariesPayments=Salaries payments -ShowSalaryPayment=Show salary payment +Salary=حقوق +Salaries=حقوق +Employee=کارمند +NewSalaryPayment=پرداخت حقوق و دستمزد جدید +SalaryPayment=پرداخت حقوق و دستمزد +SalariesPayments=حقوق پرداخت +ShowSalaryPayment=نمایش پرداخت حقوق و دستمزد diff --git a/htdocs/langs/fa_IR/sendings.lang b/htdocs/langs/fa_IR/sendings.lang index d209a29118e..fbffc79235b 100644 --- a/htdocs/langs/fa_IR/sendings.lang +++ b/htdocs/langs/fa_IR/sendings.lang @@ -1,76 +1,74 @@ # Dolibarr language file - Source file is en_US - sendings -RefSending=المرجع. إرسال -Sending=إرسال -Sendings=الإرسال -Shipment=إرسال -Shipments=شحنات +RefSending=کد عکس. حمل +Sending=حمل +Sendings=حمل و نقل +Shipment=حمل +Shipments=حمل و نقل Receivings=Receivings -SendingsArea=منطقة الإرسال -ListOfSendings=قائمة الإرسال -SendingMethod=طريقة إرسال -SendingReceipt=ارسال ورود -LastSendings=ق الماضي ٪ الإرسال -SearchASending=البحث المرسلة -StatisticsOfSendings=إحصاءات الإرسال -NbOfSendings=عدد الإرسال -# NumberOfShipmentsByMonth=Number of shipments by month -SendingCard=إرسال بطاقة -NewSending=ارسال جديدة -CreateASending=خلق إرسال -CreateSending=خلق إرسال -QtyOrdered=الكمية أمرت -QtyShipped=الكمية المشحونة -QtyToShip=لشحن الكمية -QtyReceived=الكمية الواردة -KeepToShip=إبقاء لشحن -OtherSendingsForSameOrder=الإرسال الأخرى لهذا النظام -DateSending=وحتى الآن من أجل إرسال -DateSendingShort=وحتى الآن من أجل إرسال -SendingsForSameOrder=الإرسال لهذا النظام -SendingsAndReceivingForSameOrder=الإرسال وreceivings لهذا النظام -SendingsToValidate=للمصادقة على إرسال -StatusSendingCanceled=ألغيت -StatusSendingDraft=مسودة -StatusSendingValidated=صادق (لشحن المنتجات أو شحنها بالفعل) -StatusSendingProcessed=معالجة -StatusSendingCanceledShort=ألغيت -StatusSendingDraftShort=مسودة -StatusSendingValidatedShort=صادق -StatusSendingProcessedShort=معالجة -SendingSheet=إرسال ورقة -Carriers=شركات الطيران -Carrier=الناقل -CarriersArea=ناقلات المنطقة -NewCarrier=الناقل الجديد -ConfirmDeleteSending=هل أنت متأكد من أنك تريد حذف هذا المرسلة؟ -ConfirmValidateSending=هل أنت متأكد من أنك تريد إرسال valdate هذا؟ -ConfirmCancelSending=هل أنت متأكد من أنك تريد إلغاء إرسال هذا؟ -GenericTransport=النقل العام -Enlevement=حصلت من قبل العميل -DocumentModelSimple=وثيقة نموذج بسيط -DocumentModelMerou=Mérou A5 نموذج -WarningNoQtyLeftToSend=تحذير ، لا تنتظر أن المنتجات المشحونة. -# StatsOnShipmentsOnlyValidated=Statistics conducted on shipments only validated. Date used is date of validation of shipment (planed delivery date is not always known). -DateDeliveryPlanned=مسطح تاريخ التسليم -DateReceived=تلقى تاريخ التسليم -# SendShippingByEMail=Send shipment by EMail -# SendShippingRef=Send shipment %s -# ActionsOnShipping=Events on shipment -# LinkToTrackYourPackage=Link to track your package -# ShipmentCreationIsDoneFromOrder=For the moment, creation of a new shipment is done from the order card. -# RelatedShippings=Related shippings -# ShipmentLine=Shipment line -# CarrierList=List of transporters +SendingsArea=منطقه حمل و نقل +ListOfSendings=فهرست محموله +SendingMethod=روش حمل و نقل +SendingReceipt=دریافت رایگان کالا +LastSendings=تاریخ و زمان آخرین٪ بازدید کنندگان محموله +SearchASending=جستجو برای حمل و نقل +StatisticsOfSendings=آمار برای محموله +NbOfSendings=تعداد محموله +NumberOfShipmentsByMonth=تعداد محموله های ماه +SendingCard=کارت حمل و نقل +NewSending=حمل و نقل جدید +CreateASending=ایجاد یک حمل و نقل +CreateSending=ایجاد حمل و نقل +QtyOrdered=تعداد سفارش داده شده +QtyShipped=تعداد حمل +QtyToShip=تعداد به کشتی +QtyReceived=تعداد دریافت +KeepToShip=نگه دارید به کشتی +OtherSendingsForSameOrder=دیگر محموله برای این منظور +DateSending=عضویت جهت ارسال +DateSendingShort=عضویت جهت ارسال +SendingsForSameOrder=حمل و نقل برای این منظور +SendingsAndReceivingForSameOrder=حمل و نقل و receivings برای این منظور +SendingsToValidate=حمل و نقل به اعتبار +StatusSendingCanceled=لغو شد +StatusSendingDraft=پیش نویس +StatusSendingValidated=اعتبار (محصولات به کشتی و یا در حال حمل می شود) +StatusSendingProcessed=پردازش +StatusSendingCanceledShort=لغو شد +StatusSendingDraftShort=پیش نویس +StatusSendingValidatedShort=اعتبار +StatusSendingProcessedShort=پردازش +SendingSheet=در حال ارسال ورق +Carriers=حمل +Carrier=حامل +CarriersArea=منطقه حامل +NewCarrier=حامل جدید +ConfirmDeleteSending=آیا مطمئن هستید که می خواهید این حمل و نقل را حذف کنید؟ +ConfirmValidateSending=آیا مطمئن هستید که می خواهید به اعتبار این حمل و نقل با اشاره%s را؟ +ConfirmCancelSending=آیا مطمئن هستید که می خواهید به لغو این حمل و نقل؟ +GenericTransport=عمومی حمل و نقل +Enlevement=بدست شده توسط مشتری +DocumentModelSimple=سند مدل ساده +DocumentModelMerou=مدل Merou A5 +WarningNoQtyLeftToSend=اخطار، محصولات در حال انتظار برای حمل شود. +StatsOnShipmentsOnlyValidated=آمار انجام شده بر روی محموله تنها به اعتبار. تاریخ استفاده از تاریخ اعتبار از حمل و نقل (تاریخ تحویل برنامه ریزی همیشه شناخته نشده است) است. +DateDeliveryPlanned=تاریخ ورقه زایمان +DateReceived=تاریخ تحویل +SendShippingByEMail=ارسال محموله از طریق ایمیل +SendShippingRef=ارسال محموله از%s +ActionsOnShipping=رویدادهای در حمل و نقل +LinkToTrackYourPackage=لینک به پیگیری بسته بندی خود را +ShipmentCreationIsDoneFromOrder=برای لحظه ای، ایجاد یک محموله های جدید از کارت منظور انجام می شود. +RelatedShippings=shippings های مرتبط +ShipmentLine=خط حمل و نقل +CarrierList=فهرست از حمل و نقل # Sending methods -SendingMethodCATCH=القبض على العملاء -SendingMethodTRANS=نقل +SendingMethodCATCH=گرفتن توسط مشتری +SendingMethodTRANS=ناقل SendingMethodCOLSUI=Colissimo - # ModelDocument -DocumentModelSirocco=نموذج بسيط لتسليم وثيقة من وثائق وإيصالات -DocumentModelTyphon=أكمل نموذج لتسليم وثيقة من وثائق الإيصالات (logo...) - -# Error_EXPEDITION_ADDON_NUMBER_NotDefined=Constant EXPEDITION_ADDON_NUMBER not defined -# SumOfProductVolumes=Sum of product volumes -# SumOfProductWeights=Sum of product weights +DocumentModelSirocco=سند مدل ساده برای رسید تحویل +DocumentModelTyphon=مدل سند کامل بیشتر برای رسید تحویل (logo. ..) +Error_EXPEDITION_ADDON_NUMBER_NotDefined=EXPEDITION_ADDON_NUMBER ثابت تعریف نشده +SumOfProductVolumes=مجموع حجم محصول +SumOfProductWeights=مجموع وزن محصول diff --git a/htdocs/langs/fa_IR/shop.lang b/htdocs/langs/fa_IR/shop.lang index 01a7da98666..4127cac2321 100644 --- a/htdocs/langs/fa_IR/shop.lang +++ b/htdocs/langs/fa_IR/shop.lang @@ -1,4 +1,5 @@ # Dolibarr language file - Source file is en_US - shop +FailedConnectDBCheckModuleSetup=Failed to connect to oscommerce database. Check your module setup Shop=متجر ShopWeb=تسوق على الإنترنت LastOrders=أوامر الماضي diff --git a/htdocs/langs/fa_IR/sms.lang b/htdocs/langs/fa_IR/sms.lang index 41429354e43..c4a3f0c0803 100644 --- a/htdocs/langs/fa_IR/sms.lang +++ b/htdocs/langs/fa_IR/sms.lang @@ -1,53 +1,53 @@ # Dolibarr language file - Source file is en_US - sms -Sms=پیامک -SmsSetup=پیکربندی پیامک -# SmsDesc=This page allows you to define globals options on SMS features -# SmsCard=SMS Card -# AllSms=All SMS campains -SmsTargets=الأهداف -SmsRecipients=الأهداف -# SmsRecipient=Target -SmsTitle=توضیحات -SmsFrom=فرستاده گر -# SmsTo=Target -# SmsTopic=Topic of SMS +Sms=اس ام اس +SmsSetup=راه اندازی اس ام اس +SmsDesc=این صفحه به شما اجازه تعریف گزینه های GLOBALS در ویژگی های SMS +SmsCard=کارت SMS +AllSms=همه campains SMS +SmsTargets=اهداف +SmsRecipients=اهداف +SmsRecipient=هدف +SmsTitle=توصیف +SmsFrom=فرستنده +SmsTo=هدف +SmsTopic=موضوع SMS SmsText=پیام -SmsMessage=پیامک -ShowSms=نمایش پیامک -# ListOfSms=List SMS campains -# NewSms=New SMS campain -EditSms=ویرایش پیامک -# ResetSms=New sending -# DeleteSms=Delete Sms campain -# DeleteASms=Remove a Sms campain -# PreviewSms=Previuw Sms -# PrepareSms=Prepare Sms -CreateSms=ساخت پیامک -# SmsResult=Result of Sms sending -TestSms=پیامک آزمایشی -# ValidSms=Validate Sms -# ApproveSms=Approve Sms -SmsStatusDraft=سطل زباله -SmsStatusValidated=صادق -SmsStatusApproved=وافق -SmsStatusSent=فرستاد شده -# SmsStatusSentPartialy=Sent partially -SmsStatusSentCompletely=فرستادن تکمیل شد +SmsMessage=SMS پیام +ShowSms=نمایش اس ام اس +ListOfSms=campains فهرست SMS +NewSms=campain جدید SMS +EditSms=ویرایش اس ام اس +ResetSms=تازه ارسال +DeleteSms=حذف campain اس ام اس +DeleteASms=حذف campain اس ام اس +PreviewSms=Previuw اس ام اس +PrepareSms=آماده اس ام اس +CreateSms=ایجاد اس ام اس +SmsResult=نتیجه شده از اس ام اس ارسال +TestSms=تست اس ام اس +ValidSms=اعتبارسنجی اس ام اس +ApproveSms=تصویب اس ام اس +SmsStatusDraft=پیش نویس +SmsStatusValidated=اعتبار +SmsStatusApproved=تایید شده +SmsStatusSent=فرستاده +SmsStatusSentPartialy=ارسال شده تا حدی +SmsStatusSentCompletely=به طور کامل ارسال شد SmsStatusError=خطا -SmsStatusNotSent=فرستاده نشده -# SmsSuccessfulySent=Sms correctly sent (from %s to %s) -# ErrorSmsRecipientIsEmpty=Number of target is empty -# WarningNoSmsAdded=No new phone number to add to target list -# ConfirmValidSms=Do you confirm validation of this campain ? -# ConfirmResetMailing=Warning, if you make a reinit of Sms campain %s, you will allow to make a mass sending of it a second time. Is it really what you wan to do ? -# ConfirmDeleteMailing=Do you confirm removing of campain ? -# NbOfRecipients=Number of targets -# NbOfUniqueSms=Nb dof unique phone numbers -# NbOfSms=Nbre of phon numbers -# ThisIsATestMessage=This is a test message -SendSms=فرستادن اس ام اس -# SmsInfoCharRemain=Nb of remaining characters -# SmsInfoNumero= (format international ie : +33899701761) -# DelayBeforeSending=Delay before sending (minutes) -# SmsNoPossibleRecipientFound=No target available. Check setup of your SMS provider. +SmsStatusNotSent=ارسال نشده +SmsSuccessfulySent=اس ام اس به درستی ارسال می شود (از%s به%s) +ErrorSmsRecipientIsEmpty=تعداد مورد نظر خالی است +WarningNoSmsAdded=بدون شماره تلفن جدید برای اضافه کردن به لیست مورد هدف قرار دهند +ConfirmValidSms=آیا اعتبار این campain از تایید شما؟ +ConfirmResetMailing=هشدار، اگر شما را به یک راه اندازی مجدد کنتور از اس ام اس campain٪، شما اجازه خواهد داد که به جرم ارسال از آن را برای بار دوم. آیا واقعا آنچه شما رنگ پریده کاری انجام دهید؟ +ConfirmDeleteMailing=آیا شما تایید حذف از campain؟ +NbOfRecipients=تعداد اهداف +NbOfUniqueSms=Nb در DOF شماره تلفن های منحصر به فرد +NbOfSms=Nbre از اعداد phon +ThisIsATestMessage=این یک پیام تست است +SendSms=ارسال SMS +SmsInfoCharRemain=Nb و از حرف باقی مانده است +SmsInfoNumero= (فرمت یعنی بین المللی: 33899701761) +DelayBeforeSending=تاخیری پیش از ارسال (دقیقه) +SmsNoPossibleRecipientFound=بدون هدف در دسترس است. راه اندازی ارائه دهنده SMS خود را چک کنید. diff --git a/htdocs/langs/fa_IR/stocks.lang b/htdocs/langs/fa_IR/stocks.lang index 2e579688c4b..2503e697fa1 100644 --- a/htdocs/langs/fa_IR/stocks.lang +++ b/htdocs/langs/fa_IR/stocks.lang @@ -1,124 +1,125 @@ # Dolibarr language file - Source file is en_US - stocks -WarehouseCard=بطاقة مخزن +WarehouseCard=کارت انبار Warehouse=مخزن -Warehouses=المستودعات -NewWarehouse=المستودع الجديد / بورصة المنطقة -WarehouseEdit=تعديل مستودع -MenuNewWarehouse=مستودع جديد -WarehouseOpened=فتح مخزن -WarehouseClosed=مخزن مغلق -WarehouseSource=مصدر مخزن -WarehouseSourceNotDefined=No warehouse defined, -AddOne=Add one -WarehouseTarget=الهدف مخزن +Warehouses=ساختمان و ذخیره سازی +NewWarehouse=جدید منطقه انبار / سهام +WarehouseEdit=اصلاح انبار +MenuNewWarehouse=انبار جدید +WarehouseOpened=انبار را باز کرد +WarehouseClosed=انبار بسته شده +WarehouseSource=انبار منبع +WarehouseSourceNotDefined=بدون انبار تعریف شده است، +AddOne=اضافه کردن یک +WarehouseTarget=انبار هدف ValidateSending=حذف ارسال -CancelSending=الغاء ارسال +CancelSending=لغو ارسال DeleteSending=حذف ارسال -Stock=الأسهم -Stocks=الاسهم -Movement=الحركة -Movements=حركات -ErrorWarehouseRefRequired=مستودع الاشارة اسم مطلوب -ErrorWarehouseLabelRequired=مستودع العلامة مطلوبة -CorrectStock=تصحيح الأوراق المالية -ListOfWarehouses=لائحة المخازن -ListOfStockMovements=قائمة الحركات الأسهم -StocksArea=مخزون المنطقة -Location=عوضا عن -LocationSummary=باختصار اسم الموقع -NumberOfDifferentProducts=Number of different products -NumberOfProducts=العدد الإجمالي للمنتجات -LastMovement=الماضي حركة -LastMovements=التحركات الأخيرة -Units=الوحدات -Unit=وحدة -StockCorrection=تصحيح الأوراق المالية -StockTransfer=Stock transfer -StockMovement=نقل -StockMovements=تحويلات الأوراق المالية -LabelMovement=Movement label -NumberOfUnit=عدد الوحدات -UnitPurchaseValue=Unit purchase price -TotalStock=إجمالي المخزون -StockTooLow=الاسهم منخفضة جدا -StockLowerThanLimit=Stock lower than alert limit -EnhancedValue=القيمة -PMPValue=المتوسط المرجح لسعر -PMPValueShort=الواب -EnhancedValueOfWarehouses=قيمة المستودعات -UserWarehouseAutoCreate=خلق مخزون تلقائيا عند إنشاء مستخدم -QtyDispatched=ارسال كمية -OrderDispatch=ارسال الأسهم -RuleForStockManagementDecrease=قاعدة لإدارة المخزون النقصان -RuleForStockManagementIncrease=قاعدة لإدارة المخزون وزيادة -DeStockOnBill=Decrease real stocks on customers invoices/credit notes validation -DeStockOnValidateOrder=Decrease real stocks on customers orders validation -DeStockOnShipment=انخفاض الاسهم الحقيقي على شحنة المصادقة (مستحسن) -ReStockOnBill=Increase real stocks on suppliers invoices/credit notes validation -ReStockOnValidateOrder=Increase real stocks on suppliers orders approbation -ReStockOnDispatchOrder=زيادة مخزونات دليل حقيقي على إيفاد في المستودعات ، وبعد تلقي أمر المورد -ReStockOnDeleteInvoice=Increase real stocks on invoice deletion -OrderStatusNotReadyToDispatch=أمر لم يتم بعد أو لا أكثر من ذلك الوضع الذي يسمح بإرسال من المنتجات في مخازن المخزون. -StockDiffPhysicTeoric=والسبب في الاختلاف المخزون المادي والنظرية -NoPredefinedProductToDispatch=لا توجد منتجات محددة سلفا لهذا الكائن. لذلك لا إرسال في المخزون المطلوب. -DispatchVerb=إيفاد -StockLimitShort=الحد -StockLimit=الأسهم للحد من التنبيهات -PhysicalStock=المخزون المادي -RealStock=الحقيقية للاسهم -VirtualStock=الأسهم الافتراضية -MininumStock=الحد الأدنى للرصيد -StockUp=تخزين -MininumStockShort=الأسهم دقيقة -StockUpShort=تخزين -IdWarehouse=معرف مخزن -DescWareHouse=وصف المخزن -LieuWareHouse=المكان مخزن -WarehousesAndProducts=والمستودعات والمنتجات -AverageUnitPricePMPShort=متوسط أسعار المدخلات -AverageUnitPricePMP=متوسط أسعار المدخلات -SellPriceMin=Selling Unit Price -EstimatedStockValueSellShort=Value to sell -EstimatedStockValueSell=Value to Sell -EstimatedStockValueShort=وتقدر قيمة المخزون -EstimatedStockValue=وتقدر قيمة المخزون -DeleteAWarehouse=حذف مستودع -ConfirmDeleteWarehouse=هل أنت متأكد أنك تريد حذف %s مستودع؟ -PersonalStock=%s طبيعة الشخصية -ThisWarehouseIsPersonalStock=هذا يمثل مستودع للطبيعة الشخصية لل%s %s -SelectWarehouseForStockDecrease=Choose warehouse to use for stock decrease -SelectWarehouseForStockIncrease=Choose warehouse to use for stock increase -NoStockAction=No stock action -LastWaitingSupplierOrders=Orders waiting for receptions -DesiredStock=Desired stock -StockToBuy=To order -Replenishment=Replenishment -ReplenishmentOrders=Replenishment orders -VirtualDiffersFromPhysical=According to increase/decrease stock options, physical stock and virtual stock (physical + current orders) may differs -UseVirtualStockByDefault=Use virtual stock by default, instead of physical stock, for replenishment feature -UseVirtualStock=Use virtual stock -UsePhysicalStock=Use physical stock -CurentSelectionMode=Curent selection mode -CurentlyUsingVirtualStock=Virtual stock -CurentlyUsingPhysicalStock=Physical stock -RuleForStockReplenishment=Rule for stocks replenishment -SelectProductWithNotNullQty=Select at least one product with a qty not null and a supplier -AlertOnly= Alerts only -WarehouseForStockDecrease=The warehouse %s will be used for stock decrease -WarehouseForStockIncrease=The warehouse %s will be used for stock increase -ForThisWarehouse=For this warehouse -ReplenishmentStatusDesc=This is list of all product with a stock lower than desired stock (or lower than alert value if checkbox "alert only" is checked), and suggest you to create supplier orders to fill the difference. -ReplenishmentOrdersDesc=This is list of all opened supplier orders -Replenishments=Replenishments -NbOfProductBeforePeriod=Quantity of product %s in stock before selected period (< %s) -NbOfProductAfterPeriod=Quantity of product %s in stock after selected period (> %s) -MassStockMovement=Mass stock movement -SelectProductInAndOutWareHouse=Select a product, a quantity, a source warehouse and a target warehouse, then click "%s". Once this is done for all required movements, click onto "%s". -RecordMovement=Record transfert -ReceivingForSameOrder=Receivings for this order -StockMovementRecorded=Stock movements recorded -RuleForStockAvailability=Rules on stock requirements -StockMustBeEnoughForInvoice=Stock level must be enough to add product/service into invoice -StockMustBeEnoughForOrder=Stock level must be enough to add product/service into order -StockMustBeEnoughForShipment= Stock level must be enough to add product/service into shipment +Stock=موجودی +Stocks=سهام +Movement=جنبش +Movements=جنبش +ErrorWarehouseRefRequired=نام انبار مرجع مورد نیاز است +ErrorWarehouseLabelRequired=برچسب انبار مورد نیاز است +CorrectStock=سهام صحیح +ListOfWarehouses=لیست انبار +ListOfStockMovements=فهرست جنبش های سهام +StocksArea=منطقه سهام +Location=محل +LocationSummary=محل نام کوتاه +NumberOfDifferentProducts=تعداد محصولات مختلف +NumberOfProducts=تعداد کل محصولات +LastMovement=جنبش آخرین +LastMovements=تاریخ و زمان آخرین جنبش های +Units=واحد +Unit=واحد +StockCorrection=سهام صحیح +StockTransfer=انتقال سهام +StockMovement=انتقال +StockMovements=نقل و انتقال سهام +LabelMovement=برچسب جنبش +NumberOfUnit=تعداد واحد +UnitPurchaseValue=قیمت خرید واحد +TotalStock=در انبار ها +StockTooLow=سهام بیش از حد کم +StockLowerThanLimit=سهام کمتر از حد هشدار +EnhancedValue=ارزش +PMPValue=قیمت به طور متوسط ​​وزنی +PMPValueShort=WAP +EnhancedValueOfWarehouses=ارزش ساختمان و ذخیره سازی +UserWarehouseAutoCreate=ایجاد یک انبار به طور خودکار در هنگام ایجاد یک کاربر +QtyDispatched=تعداد اعزام +OrderDispatch=اعزام سهام +RuleForStockManagementDecrease=قانون کاهش مدیریت سهام +RuleForStockManagementIncrease=قانون برای افزایش مدیریت سهام +DeStockOnBill=کاهش سهام واقعی بر روی مشتریان اعتبار فاکتورها / یادداشت های اعتباری +DeStockOnValidateOrder=کاهش سهام واقعی در اعتبار سنجی سفارشات مشتریان +DeStockOnShipment=کاهش سهام واقعی در اعتبار حمل و نقل +ReStockOnBill=افزایش سهام واقعی در تامین کنندگان فاکتورها / یادداشت های اعتباری اعتبار +ReStockOnValidateOrder=افزایش سهام واقعی در سفارشات تامین کنندگان موافقت +ReStockOnDispatchOrder=افزایش سهام واقعی در اعزام کتابچه راهنمای کاربر به انبارها، بعد از دریافت سفارش کالا +ReStockOnDeleteInvoice=افزایش سهام واقعی در حذف فاکتور +OrderStatusNotReadyToDispatch=منظور هنوز رتبهدهی نشده است و یا بیشتر یک وضعیت است که اجازه می دهد تا اعزام از محصولات در انبارها سهام. +StockDiffPhysicTeoric=دلیل سهام تفاوت های فیزیکی و نظری +NoPredefinedProductToDispatch=محصولات از پیش تعریف شده برای این شی. بنابراین بدون اعزام در انبار مورد نیاز است. +DispatchVerb=اعزام +StockLimitShort=حد +StockLimit=محدود سهام برای هشدار +PhysicalStock=سهام فیزیکی +RealStock=سهام و مستغلات +VirtualStock=سهام مجازی +MininumStock=حداقل سهام +StockUp=انبار کردن +MininumStockShort=دقیقه سهام +StockUpShort=انبار کردن +IdWarehouse=انبار شناسه +DescWareHouse=شرح انبار +LieuWareHouse=انبار محل +WarehousesAndProducts=سیستم های ذخیره سازی و محصولات +AverageUnitPricePMPShort=میانگین وزنی قیمت ورودی +AverageUnitPricePMP=میانگین وزنی قیمت ورودی +SellPriceMin=فروش قیمت واحد +EstimatedStockValueSellShort=ارزش به فروش +EstimatedStockValueSell=ارزش فروش +EstimatedStockValueShort=ارزش سهام ورودی +EstimatedStockValue=ارزش سهام ورودی +DeleteAWarehouse=حذف یک انبار +ConfirmDeleteWarehouse=آیا مطمئن هستید که می خواهید در انبار%s را حذف کنید؟ +PersonalStock=سهام شخصی از%s +ThisWarehouseIsPersonalStock=این انبار را نشان سهام شخصی از%s در%s را +SelectWarehouseForStockDecrease=انتخاب انبار استفاده برای سهام کاهش +SelectWarehouseForStockIncrease=انتخاب انبار استفاده برای افزایش سهام +NoStockAction=بدون عمل سهام +LastWaitingSupplierOrders=سفارشات در انتظار پذیرایی +DesiredStock=سهام مورد نظر +StockToBuy=برای سفارش +Replenishment=دوباره پر کردن +ReplenishmentOrders=سفارشات دوباره پر کردن +VirtualDiffersFromPhysical=با توجه به افزایش / کاهش گزینه های سهام، سهام جسمی و سهام مجازی (سفارشات فیزیکی + فعلی) ممکن است متفاوت +UseVirtualStockByDefault=استفاده از سهام مجازی به طور پیش فرض، به جای سهام فیزیکی، برای قابلیت دوباره پر کردن +UseVirtualStock=استفاده از سهام مجازی +UsePhysicalStock=استفاده از سهام فیزیکی +CurentSelectionMode=حالت انتخاب های برون مرزی جاری +CurentlyUsingVirtualStock=سهام مجازی +CurentlyUsingPhysicalStock=سهام فیزیکی +RuleForStockReplenishment=حکومت برای سهام دوباره پر کردن +SelectProductWithNotNullQty=حداقل یک محصول را انتخاب کنید با تعداد تهی نیست و یک منبع +AlertOnly= فقط هشدارها +WarehouseForStockDecrease=انبار٪ خواهد شد برای سهام کاهش استفاده +WarehouseForStockIncrease=انبار٪ خواهد شد برای افزایش سهام استفاده +ForThisWarehouse=برای این انبار +ReplenishmentStatusDesc=این لیست از همه محصول با سهام پایین تر از سهام مورد نظر (یا کمتر از ارزش هشدار اگر گزینه "هشدار تنها" بررسی می شود)، و نشان می دهد به شما برای ایجاد سفارشات منبع برای پر کردن تفاوت است. +ReplenishmentOrdersDesc=این لیست از تمام سفارشات منبع باز است +Replenishments=پر کردن +NbOfProductBeforePeriod=تعداد محصول%s را در انبار قبل از دوره (<٪) انتخاب +NbOfProductAfterPeriod=تعداد محصول%s را در سهام بعد از دوره زمانی انتخاب شده (>٪ بازدید کنندگان) +MassMovement=Mass movement +MassStockMovement=جنبش سهام توده +SelectProductInAndOutWareHouse=انتخاب محصول، مقدار، یک انبار منابع و انبار هدف، و سپس کلیک کنید "%s". به محض این که برای همه جنبش های مورد نیاز انجام می شود، بر روی "%s" را کلیک کنید. +RecordMovement=رکورد ی انتقال +ReceivingForSameOrder=Receivings برای این منظور +StockMovementRecorded=جنبش های سهام ثبت شده +RuleForStockAvailability=قوانین مورد نیاز سهام +StockMustBeEnoughForInvoice=سطح سهام باید به اندازه کافی برای اضافه کردن محصول / خدمات را به صورت حساب است +StockMustBeEnoughForOrder=سطح سهام باید به اندازه کافی برای اضافه کردن محصول / خدمات به منظور شود +StockMustBeEnoughForShipment= سطح سهام باید به اندازه کافی برای اضافه کردن محصول / خدمات را به حمل و نقل است diff --git a/htdocs/langs/fa_IR/suppliers.lang b/htdocs/langs/fa_IR/suppliers.lang index 1509e5a9d98..62385267614 100644 --- a/htdocs/langs/fa_IR/suppliers.lang +++ b/htdocs/langs/fa_IR/suppliers.lang @@ -1,42 +1,42 @@ # Dolibarr language file - Source file is en_US - suppliers -Suppliers=الموردين -Supplier=المورد -AddSupplier=إضافة مورد -SupplierRemoved=إزالة المورد -SuppliersInvoice=فاتورة الموردين -NewSupplier=مورد جديد -History=التاريخ -ListOfSuppliers=قائمة الموردين -ShowSupplier=وتظهر المورد -OrderDate=من أجل التاريخ -BuyingPrice=سعر الشراء -# BuyingPriceMin=Minimum buying price -# BuyingPriceMinShort=Min buying price -# TotalBuyingPriceMin=Total of subproducts buying prices -# SomeSubProductHaveNoPrices=Some sub-products have no price defined -AddSupplierPrice=إضافة مورد الأسعار -ChangeSupplierPrice=تغيير سعر المورد -ErrorQtyTooLowForThisSupplier=كمية منخفضة جدا لهذا المورد أو لا يعرف سعر هذا المنتج لهذا المورد -ErrorSupplierCountryIsNotDefined=لهذا البلد المورد غير محدد. تصحيح هذا أولا. -ProductHasAlreadyReferenceInThisSupplier=هذا المنتج بالفعل مرجعا في هذا المورد -ReferenceSupplierIsAlreadyAssociatedWithAProduct=ويرتبط هذا المورد بالفعل مرجع مع مرجع : %s -NoRecordedSuppliers=لم تسجل الموردين -SupplierPayment=المورد الدفع -SuppliersArea=الموردين المنطقة -RefSupplierShort=المرجع. المورد -# Availability=Availability -ExportDataset_fournisseur_1=قائمة فواتير الموردين والفواتير 'خطوط -ExportDataset_fournisseur_2=فواتير الموردين والمدفوعات -# ExportDataset_fournisseur_3=Supplier orders and order lines -ApproveThisOrder=الموافقة على هذا النظام -ConfirmApproveThisOrder=هل أنت متأكد من أن يوافق على هذا الأمر؟ -DenyingThisOrder=ونفى هذا الأمر -ConfirmDenyingThisOrder=هل أنت متأكد من إنكار هذا الأمر؟ -ConfirmCancelThisOrder=هل أنت متأكد من أنك تريد إلغاء هذا النظام؟ -AddCustomerOrder=العملاء من أجل خلق -AddCustomerInvoice=إنشاء فاتورة المستهلك -AddSupplierOrder=من أجل خلق مورد -AddSupplierInvoice=خلق مورد فاتورة -ListOfSupplierProductForSupplier=قائمة المنتجات والأسعار لمورد ق ٪ -NoneOrBatchFileNeverRan=أو لا شيء دفعة ٪ ق لا يتعارض مؤخرا -# SentToSuppliers=Sent to suppliers +Suppliers=تولید کنندگان +Supplier=تهیه کننده +AddSupplier=اضافه کردن یک تامین کننده +SupplierRemoved=تامین کننده حذف +SuppliersInvoice=تولید کنندگان صورتحساب +NewSupplier=منبع جدید +History=تاریخ +ListOfSuppliers=لیست تامین کنندگان +ShowSupplier=منبع نمایش +OrderDate=تاریخ سفارش +BuyingPrice=قیمت خرید +BuyingPriceMin=حداقل قیمت خرید +BuyingPriceMinShort=قیمت خرید حداقل +TotalBuyingPriceMin=کل subproducts خرید قیمت +SomeSubProductHaveNoPrices=برخی از زیر محصولات هیچ قیمت تعریف شده +AddSupplierPrice=اضافه کردن قیمت عرضه کننده کالا +ChangeSupplierPrice=تغییر قیمت عرضه کننده کالا +ErrorQtyTooLowForThisSupplier=مقدار خیلی کم برای این عرضه کننده کالا یا بدون قیمت در این محصول برای این کالا تعریف شده +ErrorSupplierCountryIsNotDefined=کشور برای این کالا تعریف نشده است. اولین تصحیح این. +ProductHasAlreadyReferenceInThisSupplier=این محصول در حال حاضر یک مرجع در این منبع +ReferenceSupplierIsAlreadyAssociatedWithAProduct=این منبع مرجع در حال حاضر با یک مرجع در ارتباط است:%s را +NoRecordedSuppliers=بدون تامین کنندگان ثبت +SupplierPayment=پرداخت کننده +SuppliersArea=منطقه تامین کنندگان +RefSupplierShort=کد عکس. تهیه کننده +Availability=دسترسی +ExportDataset_fournisseur_1=فهرست فاکتورها تامین کننده و فاکتور خطوط +ExportDataset_fournisseur_2=فاکتورها تامین کننده و پرداخت +ExportDataset_fournisseur_3=سفارشات تامین کننده و خطوط جهت +ApproveThisOrder=تصویب این منظور +ConfirmApproveThisOrder=آیا مطمئن هستید که می خواهید برای تایید از%s؟ +DenyingThisOrder=انکار این منظور +ConfirmDenyingThisOrder=آیا مطمئن هستید که می خواهید برای انکار این منظور از%s؟ +ConfirmCancelThisOrder=آیا مطمئن هستید که می خواهید به لغو این منظور از%s؟ +AddCustomerOrder=ایجاد سفارش مشتری +AddCustomerInvoice=ایجاد فاکتور مشتری +AddSupplierOrder=ایجاد نظم عرضه کننده کالا +AddSupplierInvoice=ایجاد کننده کالا فاکتور +ListOfSupplierProductForSupplier=لیست محصولات و قیمت ها را برای عرضه کننده کالا از%s +NoneOrBatchFileNeverRan=هیچ و یا دسته ای از%s فرار نمی اخیرا +SentToSuppliers=ارسال شده به تامین کنندگان diff --git a/htdocs/langs/fa_IR/trips.lang b/htdocs/langs/fa_IR/trips.lang index 9b1c10d1374..6143a83387f 100644 --- a/htdocs/langs/fa_IR/trips.lang +++ b/htdocs/langs/fa_IR/trips.lang @@ -1,21 +1,21 @@ # Dolibarr language file - Source file is en_US - trips -Trip=رحلة -Trips=رحلات -TripsAndExpenses=ونفقات الرحلات -TripsAndExpensesStatistics=رحلات ونفقات إحصاءات -TripCard=بطاقة زيارة -AddTrip=إضافة رحلة -ListOfTrips=قائمة الرحلات -ListOfFees=قائمة الرسوم -NewTrip=رحلة جديدة -CompanyVisited=الشركة / المؤسسة زارت -Kilometers=كم -FeesKilometersOrAmout=كم المبلغ أو -DeleteTrip=رحلة حذف -ConfirmDeleteTrip=هل أنت متأكد من أنك تريد حذف هذه الرحلة؟ -TF_OTHER=أخرى -TF_LUNCH=غداء -TF_TRIP=رحلة -ListTripsAndExpenses=قائمة الرحلات والمصاريف -# ExpensesArea=Trips and expenses area -# SearchATripAndExpense=Search a trip and expense +Trip=سفر +Trips=سفر +TripsAndExpenses=سفر و هزینه های عملیاتی +TripsAndExpensesStatistics=سفر و هزینه های آمار +TripCard=کارت سفر +AddTrip=اضافه کردن سفر +ListOfTrips=فهرست از سفر +ListOfFees=فهرست هزینه ها +NewTrip=سفر جدید +CompanyVisited=شرکت / بنیاد بازدید کردند +Kilometers=کیلومتر +FeesKilometersOrAmout=مقدار و یا کیلومتر +DeleteTrip=حذف سفر +ConfirmDeleteTrip=آیا مطمئن هستید که می خواهید این سفر را حذف کنید؟ +TF_OTHER=دیگر +TF_LUNCH=ناهار +TF_TRIP=سفر +ListTripsAndExpenses=فهرست سفر و هزینه های عملیاتی +ExpensesArea=سفر و هزینه های عملیاتی منطقه +SearchATripAndExpense=جستجوی یک سفر و هزینه diff --git a/htdocs/langs/fa_IR/users.lang b/htdocs/langs/fa_IR/users.lang index 3c941afe647..22fba49ed43 100644 --- a/htdocs/langs/fa_IR/users.lang +++ b/htdocs/langs/fa_IR/users.lang @@ -1,5 +1,5 @@ # Dolibarr language file - Source file is en_US - users -HRMArea=HRM area +HRMArea=منطقه HRM UserCard=کارت کاربر ContactCard=کارت دفتر تلفن GroupCard=کارت گروه @@ -26,13 +26,13 @@ EnableAUser=پویا کردن یک کاربر EnableAGroup=پویا کردن یک گروه DeleteGroup=پاک کردن DeleteAGroup=پاک کردن یک گروه -ConfirmDisableUser=هل أنت متأكد من أنك تريد تعطيل مستخدم ٪ ق؟ -ConfirmDisableGroup=هل أنت متأكد من أنك تريد تعطيل فريق ٪ ق؟ -ConfirmDeleteUser=هل أنت متأكد من أنك تريد حذف مستخدم ٪ ق؟ -ConfirmDeleteGroup=هل أنت متأكد من أنك تريد حذف مجموعة ٪ ق؟ -ConfirmEnableUser=هل تريد بالتأكيد لتمكين المستخدم ٪ ق؟ -ConfirmEnableGroup=هل تريد بالتأكيد لتمكين فريق ٪ ق؟ -ConfirmReinitPassword=هل أنت متأكد من أن تولد كلمة سر جديدة للمستخدم ٪ ق؟ +ConfirmDisableUser=آیا مطمئن هستید که می خواهید کاربر%s به غیر فعال کردن؟ +ConfirmDisableGroup=آیا مطمئن هستید که می خواهید گروه%s به غیر فعال کردن؟ +ConfirmDeleteUser=آیا مطمئن هستید که می خواهید کاربر%s را حذف کنید؟ +ConfirmDeleteGroup=آیا مطمئن هستید که می خواهید گروه%s را حذف کنید؟ +ConfirmEnableUser=آیا مطمئن هستید که می خواهید به فعال کردن کاربر%s را؟ +ConfirmEnableGroup=آیا مطمئن هستید که می خواهید به فعال کردن گروه%s؟ +ConfirmReinitPassword=آیا مطمئن هستید که می خواهید برای تولید یک کلمه رمز جدید برای کاربر%s را؟ ConfirmSendNewPassword=هل تريد بالتأكيد لتوليد وإرسال كلمة مرور جديدة للمستخدم ٪ ق؟ NewUser=کاربر تازه CreateUser=ساخت کاربر @@ -46,7 +46,7 @@ SuperAdministrator=Super Administrator SuperAdministratorDesc=administrator همگانی AdministratorDesc=نهاد مدیر DefaultRights=مجوزهای پیش پندار -DefaultRightsDesc=التقصير هنا تحديد الاذونات التي تمنح تلقائيا للمستخدم خلق جديد. +DefaultRightsDesc=تعریف در اینجا مجوز به طور پیش فرض است که به طور خودکار به یک کاربر جدید ایجاد شده (برو روی کارت کاربر به تغییر مجوز یک کاربر موجود) اعطا می شود. DolibarrUsers=Dolibarr کاربران LastName=نام FirstName=نام اول @@ -54,68 +54,68 @@ ListOfGroups=لیست گروهها NewGroup=گروه تازه CreateGroup=ساخت گروه RemoveFromGroup=پاک کردن از گروه -PasswordChangedAndSentTo=تم تغيير كلمة المرور وترسل إلى ٪ ق. -PasswordChangeRequestSent=طلب تغيير كلمة السر لإرسالها إلى ٪ ق ٪ ق. +PasswordChangedAndSentTo=تغییر رمز عبور و ارسال به%s. +PasswordChangeRequestSent=درخواست تغییر رمز عبور برای%s ارسال به%s. MenuUsersAndGroups=کاربران و گروهها -LastGroupsCreated=ق الماضي خلق مجموعات ٪ -LastUsersCreated=آخر مستخدمين خلق ق ٪ +LastGroupsCreated=تاریخ و زمان آخرین٪ گروه های ایجاد شده +LastUsersCreated=تاریخ و زمان آخرین٪ کاربران ایجاد شده ShowGroup=نمایش گروه ShowUser=نمایش کاربر -NonAffectedUsers=غير المتأثرة المستخدمين -UserModified=المعدل المستخدم بنجاح -GroupModified=تعديل المجموعة بنجاح +NonAffectedUsers=کاربران غیر اختصاص داده +UserModified=کاربر با موفقیت به اصلاح +GroupModified=گروه با موفقیت اصلاح شده PhotoFile=فایل نگاره -UserWithDolibarrAccess=مع وصول المستخدمين Dolibarr -ListOfUsersInGroup=قائمة المستخدمين في هذه المجموعة -ListOfGroupsForUser=قائمة الجماعات لهذا المستخدم -UsersToAdd=للمستخدمين إضافة إلى هذه المجموعة -GroupsToAdd=إضافة إلى مجموعات لهذا المستخدم +UserWithDolibarrAccess=کاربر با دسترسی Dolibarr +ListOfUsersInGroup=لیست کاربران در این گروه +ListOfGroupsForUser=لیست گروه های این کاربر +UsersToAdd=کاربران برای اضافه کردن به این گروه +GroupsToAdd=گروه برای اضافه کردن به این کاربر NoLogin=وارد نشده اید -LinkToCompanyContact=ربط طرف ثالث / اتصالات -LinkedToDolibarrMember=وصلة عضو -LinkedToDolibarrUser=وصلة مستخدم Dolibarr -LinkedToDolibarrThirdParty=Dolibarr الارتباط لطرف ثالث +LinkToCompanyContact=لینک به شخص ثالث / ارتباط با ما +LinkedToDolibarrMember=لینک به عضو +LinkedToDolibarrUser=لینک به کاربر Dolibarr +LinkedToDolibarrThirdParty=لینک به Dolibarr شخص ثالث CreateDolibarrLogin=ساختن یک کاربر CreateDolibarrThirdParty=إيجاد طرف ثالث -LoginAccountDisable=حساب والمعوقين ، ووضع جديد ادخل الى تنشيطها. -LoginAccountDisableInDolibarr=في حساب المعاقين Dolibarr. -LoginAccountDisableInLdap=الحساب في مجال المعوقين. -UsePersonalValue=استخدام الشخصي قيمة -GuiLanguage=لغة الواجهة +LoginAccountDisable=حساب غیر فعال شده، قرار دادن یک ورودی جدید برای آن را فعال کنید. +LoginAccountDisableInDolibarr=حساب قطع در Dolibarr. +LoginAccountDisableInLdap=حساب قطع در دامنه. +UsePersonalValue=استفاده از ارزش های شخصی +GuiLanguage=زبان رابط InternalUser=کاربر داخلی MyInformations=دیتای من -ExportDataset_user_1=Dolibarr مستخدمي وممتلكاتهم -DomainUser=النطاق المستخدم ق ٪ -Reactivate=تنشيط -CreateInternalUserDesc=هذا الشكل يتيح لك يخلق أي مستخدم الداخلي لتسجيل شركة أو مؤسسة. ليخلق خارجي المستخدم (العميل ، المورد ،...)، استخدام زر 'إنشاء مستخدم Dolibarr' من طرف ثالث بطاقة اتصال. -InternalExternalDesc=داخلي المستخدم المستخدم الذي يشكل جزءا من الشركة / المؤسسة.
    مستخدم خارجي هو عميل أو مورد أو غيرها.

    وفي كلتا الحالتين ، ويحدد الحقوق على أذونات Dolibarr ، كما يمكن للمستخدم خارجي له قائمة من مدير المستخدم الداخلي (انظر الصفحة الرئيسية -- إعداد -- عرض) -PermissionInheritedFromAGroup=منح إذن لأن الموروث من واحد من المستخدم. -Inherited=موروث -UserWillBeInternalUser=Created user will be an internal user (because not linked to a particular third party) -UserWillBeExternalUser=Created user will be an external user (because linked to a particular third party) -IdPhoneCaller=رقم تعريف الهاتف المتصل -UserLogged=ق صلة مستخدم ٪ +ExportDataset_user_1=کاربران Dolibarr و خواص +DomainUser=کاربر دامنه از%s +Reactivate=دوباره فعال کردن +CreateInternalUserDesc=این فرم شما اجازه می دهد به creat داخلی کاربر را به شرکت خود را / بنیاد. به creat یک کاربر خارجی (مشتریان، تامین کننده، ...)، دکمه استفاده 'ایجاد کاربر Dolibarr' از کارت تماس با شخص ثالث است. +InternalExternalDesc=داخلی یک کاربر است که بخشی از شرکت خود را / بنیاد است.
    کاربر خارجی مشتری، عرضه کننده کالا یا دیگر است.

    در هر دو مورد، مجوز حقوق در Dolibarr تعریف می کند، همچنین کاربر خارجی می تواند یک مدیر منو های مختلف از کاربر داخلی (صفحه اصلی - راه اندازی - نمایش) +PermissionInheritedFromAGroup=اجازه چرا که از یک گروه کاربر را به ارث برده. +Inherited=به ارث برده +UserWillBeInternalUser=کاربر های ایجاد شده خواهد بود داخلی (چون به شخص ثالث خاصی پیوند ندارد) +UserWillBeExternalUser=کاربر ایجاد خواهد شد یک کاربر خارجی (چون به شخص ثالث خاص مرتبط است) +IdPhoneCaller=شناسه تماس گیرنده تلفن +UserLogged=کاربر%s را وارد UserLogoff=کاربر %s خارج شد NewUserCreated=کاربر %s ساخته شد -NewUserPassword=لتغيير كلمة المرور ل ٪ -EventUserModified=مستخدم تعديل ق ٪ +NewUserPassword=تغییر رمز عبور برای%s +EventUserModified=کاربر%s تغییر UserDisabled=کاربر %s ناپویا شد UserEnabled=کاربر %s پویا شد. UserDeleted=کاربر %s پاک کشد NewGroupCreated=گروه %s ساخته شد -GroupModified=تعديل المجموعة بنجاح -GroupDeleted=فريق ازالة ق ٪ -ConfirmCreateContact=هل أنت متأكد من خلق Dolibarr حساب هذا الاتصال؟ -ConfirmCreateLogin=هل أنت متأكد من خلق Dolibarr حساب هذا؟ -ConfirmCreateThirdParty=هل أنت متأكد من خلق لهذا الطرف الثالث؟ -LoginToCreate=ادخل لخلق -NameToCreate=اسم طرف ثالث لخلق +GroupModified=گروه با موفقیت اصلاح شده +GroupDeleted=گروه%s را حذف +ConfirmCreateContact=آیا مطمئن هستید که می خواهید برای ایجاد یک حساب Dolibarr برای این مخاطب؟ +ConfirmCreateLogin=آیا مطمئن هستید که می خواهید برای ایجاد یک حساب Dolibarr برای این عضو؟ +ConfirmCreateThirdParty=آیا مطمئن هستید که می خواهید برای ایجاد یک شخص ثالث برای این عضو؟ +LoginToCreate=ورود برای ایجاد +NameToCreate=نام و نام خانوادگی شخص ثالث برای ایجاد YourRole=roleهای شما -YourQuotaOfUsersIsReached=يتم التوصل إلى حصة الخاص بك من المستخدمين النشطين! -NbOfUsers=Nb of users -DontDowngradeSuperAdmin=Only a superadmin can downgrade a superadmin -HierarchicalResponsible=Hierarchical responsible -HierarchicView=Hierarchical view -UseTypeFieldToChange=Use field Type to change +YourQuotaOfUsersIsReached=سهمیه شما از کاربران فعال رسیده است! +NbOfUsers=NB از کاربران +DontDowngradeSuperAdmin=فقط قسمت مدیریت می توانید یک قسمت مدیریت جمع و جور کردن +HierarchicalResponsible=سلسله مراتبی مسئول +HierarchicView=دیدگاه سلسله مراتبی +UseTypeFieldToChange=استفاده از نوع رشته به تغییر OpenIDURL=URL OpenID -LoginUsingOpenID=Use OpenID to login +LoginUsingOpenID=استفاده از حساب کاربری برای ورود به سایت diff --git a/htdocs/langs/fa_IR/withdrawals.lang b/htdocs/langs/fa_IR/withdrawals.lang index 0fe97ef9a6c..e7d54cdb466 100644 --- a/htdocs/langs/fa_IR/withdrawals.lang +++ b/htdocs/langs/fa_IR/withdrawals.lang @@ -1,96 +1,96 @@ # Dolibarr language file - Source file is en_US - withdrawals -StandingOrdersArea=أوامر دائمة المنطقة -CustomersStandingOrdersArea=أوامر دائمة منطقة العملاء -StandingOrders=أوامر دائمة -StandingOrder=أوامر دائمة -NewStandingOrder=دائمة جديدة من أجل -StandingOrderToProcess=لعملية -StandingOrderProcessed=معالجة -Withdrawals=انسحابات -Withdrawal=انسحاب -WithdrawalsReceipts=إيصالات السحب -WithdrawalReceipt=انسحاب ورود -WithdrawalReceiptShort=ورود -LastWithdrawalReceipts=ق الماضي سحب إيصالات ٪ -WithdrawedBills=Withdrawed الفواتير -WithdrawalsLines=خطوط السحب -RequestStandingOrderToTreat=طلب لأوامر دائمة لمعالجة -RequestStandingOrderTreated=طلب تعامل أوامر دائمة -CustomersStandingOrders=الزبون أوامر دائمة -CustomerStandingOrder=يقف النظام العميل -NbOfInvoiceToWithdraw=Nb. of invoice with withdraw request -NbOfInvoiceToWithdrawWithInfo=Nb. of invoice with withdraw request for customers having defined bank account information -InvoiceWaitingWithdraw=فاتورة انتظار الانسحاب -AmountToWithdraw=سحب المبلغ -WithdrawsRefused=ورفض سحب -NoInvoiceToWithdraw=فاتورة العميل في أي طريقة الدفع "سحب" تنتظر. على 'سحب' تبويبة على فاتورة بطاقة لتقديم الطلب. -ResponsibleUser=مسؤولة المستخدم -WithdrawalsSetup=الإعداد للانسحاب -WithdrawStatistics=تسحب 'إحصاءات -WithdrawRejectStatistics=وترفض الانسحاب 'إحصاءات -LastWithdrawalReceipt=ق الماضي سحب إيصالات ٪ -MakeWithdrawRequest=تقديم طلب سحب -ThirdPartyBankCode=طرف ثالث بنك مدونة -ThirdPartyDeskCode=طرف ثالث مكتب مدونة -NoInvoiceCouldBeWithdrawed=أي فاتورة withdrawed بالنجاح. تأكد من أن الفاتورة على الشركات الحظر ساري المفعول. -ClassCredited=تصنيف حساب -ClassCreditedConfirm=هل أنت متأكد من أن يصنف هذا الانسحاب كما تلقي على حساب حسابك المصرفي؟ -TransData=تاريخ الإرسال +StandingOrdersArea=ایستاده منطقه سفارشات +CustomersStandingOrdersArea=مشتریان ایستاده منطقه سفارشات +StandingOrders=سفارشات ایستاده +StandingOrder=سفارشات ایستاده +NewStandingOrder=منظور ایستاده جدید +StandingOrderToProcess=به پردازش +StandingOrderProcessed=پردازش +Withdrawals=برداشت ها +Withdrawal=برداشت +WithdrawalsReceipts=رسید برداشت +WithdrawalReceipt=دریافت برداشت +WithdrawalReceiptShort=دریافت +LastWithdrawalReceipts=تاریخ و زمان آخرین٪ بازدید کنندگان رسید خروج +WithdrawedBills=فاکتورها خارج +WithdrawalsLines=خطوط برداشت +RequestStandingOrderToTreat=درخواست دستورات برای درمان ایستاده +RequestStandingOrderTreated=درخواست دستورات ایستاده درمان +CustomersStandingOrders=سفارشات ایستاده با مشتری +CustomerStandingOrder=مشتری منظور ایستاده +NbOfInvoiceToWithdraw=نیوبیوم. از فاکتور با برداشت درخواست +NbOfInvoiceToWithdrawWithInfo=نیوبیوم. از فاکتور با درخواست مشتریان با اطلاعات حساب بانکی تعریف شده برداشت +InvoiceWaitingWithdraw=سیاهه انتظار برای برداشت +AmountToWithdraw=مقدار برای برداشت +WithdrawsRefused=خارج خودداری کرد +NoInvoiceToWithdraw=بدون فاکتور مشتری در حالت پرداخت "برداشت" در انتظار است. برو در تب 'برداشت' در کارت فاکتور به درخواست. +ResponsibleUser=کاربر مسئول +WithdrawalsSetup=راه اندازی برداشت +WithdrawStatistics=آمار برداشت است +WithdrawRejectStatistics=آمار برداشت رد در +LastWithdrawalReceipt=تاریخ و زمان آخرین٪ بازدید کنندگان رسید خروج +MakeWithdrawRequest=یک درخواست برداشت +ThirdPartyBankCode=کد های بانکی شخص ثالث +ThirdPartyDeskCode=کد میز شخص ثالث +NoInvoiceCouldBeWithdrawed=بدون فاکتور با موفقیت withdrawed. بررسی کنید که فاکتور در شرکت های با BAN معتبر هستند. +ClassCredited=طبقه بندی اعتبار +ClassCreditedConfirm=آیا مطمئن هستید که می خواهید برای طبقه بندی این دریافت و برداشت به عنوان در حساب بانکی شما اعتبار؟ +TransData=تاریخ انتقال TransMetod=طريقة البث Send=فرستادن Lines=خطوط -StandingOrderReject=رفض إصدار -InvoiceRefused=تهمة الرفض لزبون -WithdrawalRefused=سحب Refuseds -WithdrawalRefusedConfirm=هل أنت متأكد أنك تريد الدخول في رفض الانسحاب للمجتمع -RefusedData=تاريخ الرفض -RefusedReason=أسباب الرفض -RefusedInvoicing=رفض الفواتير -NoInvoiceRefused=لا تهمة الرفض -InvoiceRefused=تهمة الرفض لزبون +StandingOrderReject=شماره رد +InvoiceRefused=فاکتور خودداری کرد +WithdrawalRefused=برداشت خودداری کرد +WithdrawalRefusedConfirm=آیا مطمئن هستید که می خواهید را وارد کنید رد عقب نشینی برای جامعه +RefusedData=تاریخ رد +RefusedReason=دلیلی برای رد +RefusedInvoicing=حسابداری رد +NoInvoiceRefused=آیا رد اتهام نیست +InvoiceRefused=فاکتور خودداری کرد Status=وضعیت StatusUnknown=ناشناخته StatusWaiting=انتظار -StatusTrans=Sent -StatusCredited=الفضل -StatusRefused=رفض -StatusMotif0=غير محدد -StatusMotif1=توفير insuffisante -StatusMotif2=Tirage conteste -StatusMotif3=لا من أجل الانسحاب -StatusMotif4=طلب العملاء -StatusMotif5=الضلع inexploitable -StatusMotif6=حساب بدون رصيد -StatusMotif7=قرار قضائي -StatusMotif8=سبب آخر -CreateAll=سحب جميع -CreateGuichet=مكتب فقط -CreateBanque=البنك الوحيد -OrderWaiting=الانتظار لتلقي العلاج -NotifyTransmision=انسحاب البث -NotifyEmision=انسحاب الانبعاثات -NotifyCredit=انسحاب الائتمان -NumeroNationalEmetter=رقم المرسل وطنية -PleaseSelectCustomerBankBANToWithdraw=Select information about customer bank account to withdraw -WithBankUsingRIB=For bank accounts using RIB -WithBankUsingBANBIC=For bank accounts using IBAN/BIC/SWIFT -BankToReceiveWithdraw=Bank account to receive withdraws -CreditDate=Credit on -WithdrawalFileNotCapable=Unable to generate withdrawal receipt file for your country -ShowWithdraw=Show Withdraw -IfInvoiceNeedOnWithdrawPaymentWontBeClosed=However, if invoice has at least one withdrawal payment not yet processed, it won't be set as paid to allow prior withdrawal management. -DoStandingOrdersBeforePayments=This tab allows you to request a standing order. Once it is complete, you can type the payment to close the invoice. -WithdrawalFile=Withdrawal file -SetToStatusSent=Set to status "File Sent" -ThisWillAlsoAddPaymentOnInvoice=This will also apply payments to invoices and will classify them as "Paid" +StatusTrans=فرستاده +StatusCredited=اعتبار +StatusRefused=رد +StatusMotif0=نامشخص +StatusMotif1=منابع مالی ناکافی +StatusMotif2=درخواست اعتراض +StatusMotif3=بدون منظور برداشت +StatusMotif4=سفارش مشتری +StatusMotif5=RIB غیر قابل استفاده +StatusMotif6=حساب بدون موجودی +StatusMotif7=تصمیم گیری قضایی +StatusMotif8=دلیل دیگر +CreateAll=برداشت همه +CreateGuichet=تنها دفتر +CreateBanque=تنها بانک +OrderWaiting=در انتظار درمان +NotifyTransmision=برداشت انتقال +NotifyEmision=برداشت انتشار +NotifyCredit=برداشت اعتباری +NumeroNationalEmetter=شماره ملی فرستنده +PleaseSelectCustomerBankBANToWithdraw=اطلاعات مربوط به حساب بانکی مشتری را انتخاب کنید تا برداشت +WithBankUsingRIB=برای حساب های بانکی با استفاده از RIB +WithBankUsingBANBIC=برای حساب های بانکی با استفاده از IBAN / BIC / SWIFT +BankToReceiveWithdraw=حساب بانکی برای دریافت خارج +CreditDate=در اعتباری +WithdrawalFileNotCapable=قادر به تولید خروج فایل رسید برای کشور شما +ShowWithdraw=نمایش برداشت +IfInvoiceNeedOnWithdrawPaymentWontBeClosed=با این حال، اگر فاکتور حداقل یک عقب نشینی پرداخت هنوز پردازش نشده، آن را مجموعه ای به عنوان پرداخت می شود اجازه می دهد تا مدیریت خروج قبل. +DoStandingOrdersBeforePayments=در این تب شما اجازه می دهد به درخواست حکم ایستاده. پس از آن کامل شده است، شما می توانید پرداخت تایپ برای بستن صورتحساب. +WithdrawalFile=فایل برداشت +SetToStatusSent=تنظیم به وضعیت "فایل ارسال شد" +ThisWillAlsoAddPaymentOnInvoice=این نیز خواهد پرداخت به فاکتورها اعمال می شود و آنها را طبقه بندی به عنوان "پرداخت" ### Notifications -InfoCreditSubject=Payment of standing order %s by the bank -InfoCreditMessage=The standing order %s has been paid by the bank
    Data of payment: %s -InfoTransSubject=Transmission of standing order %s to bank -InfoTransMessage=The standing order %s has been sent to bank by %s %s.

    -InfoTransData=Amount: %s
    Method: %s
    Date: %s -InfoFoot=This is an automated message sent by Dolibarr -InfoRejectSubject=Standing order refused -InfoRejectMessage=Hello,

    the standing order of invoice %s related to the company %s, with an amount of %s has been refused by the bank.

    --
    %s -ModeWarning=Option for real mode was not set, we stop after this simulation +InfoCreditSubject=پرداخت سفارش ثابت٪ توسط بانک +InfoCreditMessage=منظور ایستاده٪ بازدید کنندگان شده است توسط بانک پرداخت می شود
    اطلاعات پرداخت:%s را +InfoTransSubject=انتقال ایستاده منظور٪ به بانک +InfoTransMessage=منظور ایستاده%s بر به بانک توسط%s%s ارسال شد.

    +InfoTransData=مقدار:%s را
    روش: از%s
    تاریخ:%s را +InfoFoot=این یک پیام خودکار ارسال شده توسط Dolibarr است +InfoRejectSubject=منظور ایستاده خودداری کرد +InfoRejectMessage=سلام،

    به ترتیب ایستاده از فاکتور%s را مربوط به شرکت٪، با میزان٪ بازدید کنندگان شده است توسط بانک خودداری کرد.

    -
    از%s +ModeWarning=انتخاب برای حالت واقعی تنظیم نشده بود، ما بعد از این شبیه سازی را متوقف کند diff --git a/htdocs/langs/fa_IR/workflow.lang b/htdocs/langs/fa_IR/workflow.lang index 9b5ab76792f..fb6feff33dc 100644 --- a/htdocs/langs/fa_IR/workflow.lang +++ b/htdocs/langs/fa_IR/workflow.lang @@ -1,11 +1,11 @@ # Dolibarr language file - Source file is en_US - admin -WorkflowSetup=پیکربندی ماژول گردش کاری -# WorkflowDesc=This module is designed to modify the behaviour of automatic actions into application. By default, workflow is opened (you make thing in order you want). You can enabled automatic actions that you are interesting in. -# ThereIsNoWorkflowToModify=There is no workflow you can modify for module you have activated. -# descWORKFLOW_PROPAL_AUTOCREATE_ORDER=Create a customer order automatically after a commercial proposal is signed -# descWORKFLOW_PROPAL_AUTOCREATE_INVOICE=Create a customer invoice automatically after a commercial proposal is signed -# descWORKFLOW_CONTRACT_AUTOCREATE_INVOICE=Create a customer invoice automatically after a contract is validated -# descWORKFLOW_ORDER_AUTOCREATE_INVOICE=Create a customer invoice automatically after a customer order is closed -# descWORKFLOW_ORDER_CLASSIFY_BILLED_PROPAL=Classify linked source proposal to billed when customer order is set to paid -# descWORKFLOW_INVOICE_CLASSIFY_BILLED_ORDER=Classify linked source customer order(s) to billed when customer invoice is set to paid -# descWORKFLOW_INVOICE_AMOUNT_CLASSIFY_BILLED_ORDER=Classify linked source customer order(s) to billed when customer invoice is validated +WorkflowSetup=راه اندازی ماژول گردش کار +WorkflowDesc=این ماژول طراحی شده است که به تغییر رفتار از اقدامات خودکار به برنامه. به طور پیش فرض، گردش کار باز می شود (شما را به چیزی که در شما می خواهید). شما می توانید اقدامات اتوماتیک است که می جالب شوید. فعال +ThereIsNoWorkflowToModify=هیچ گردش کار شما می توانید برای ماژول شما فعال شده است را تغییر دهید وجود دارد. +descWORKFLOW_PROPAL_AUTOCREATE_ORDER=ایجاد یک سفارش مشتری به طور خودکار پس از یک طرح تجاری امضا شده است +descWORKFLOW_PROPAL_AUTOCREATE_INVOICE=ایجاد یک فاکتور مشتری به طور خودکار پس از یک طرح تجاری امضا شده است +descWORKFLOW_CONTRACT_AUTOCREATE_INVOICE=ایجاد یک فاکتور مشتری به طور خودکار پس از یک قرارداد معتبر است +descWORKFLOW_ORDER_AUTOCREATE_INVOICE=ایجاد یک فاکتور به مشتری به صورت خودکار پس از سفارش مشتری بسته است +descWORKFLOW_ORDER_CLASSIFY_BILLED_PROPAL=طبقه بندی پیشنهاد منبع مربوط به صورتحساب در هنگام سفارش مشتری به پرداخت مجموعه +descWORKFLOW_INVOICE_CLASSIFY_BILLED_ORDER=طبقه بندی مرتبط با سفارش مشتری منبع (بازدید کنندگان) صورتحساب زمانی که صورت حساب مشتری به پرداخت مجموعه +descWORKFLOW_INVOICE_AMOUNT_CLASSIFY_BILLED_ORDER=طبقه بندی مرتبط با سفارش مشتری منبع (بازدید کنندگان) صورتحساب زمانی که صورت حساب به مشتری اعتبار است diff --git a/htdocs/langs/fi_FI/admin.lang b/htdocs/langs/fi_FI/admin.lang index 1441811c447..60968f150a3 100644 --- a/htdocs/langs/fi_FI/admin.lang +++ b/htdocs/langs/fi_FI/admin.lang @@ -1,7 +1,7 @@ # Dolibarr language file - Source file is en_US - admin Foundation=Foundation -Version=Version -VersionProgram=Version ohjelma +Version=Versio +VersionProgram=Ohjelmaversio VersionLastInstall=Versio alkuperäisestä asentaa VersionLastUpgrade=Version viime päivityksen VersionExperimental=Kokeellinen @@ -11,7 +11,7 @@ VersionRecommanded=Suositeltava SessionId=Istunnon tunnus SessionSaveHandler=Handler tallentaa istuntojen SessionSavePath=Varasto istuntojakson localization -PurgeSessions=Tuhoa Istuntoja +PurgeSessions=Tuhoa istuntoja ConfirmPurgeSessions=Do you really want to purge all sessions ? This will disconnect every user (except yourself). NoSessionListWithThisHandler=Tallenna istunto handler konfiguroitu PHP ei ole mahdollista luetella kaikkia lenkkivaatteita. LockNewSessions=Lukitse uusia yhteyksiä @@ -26,7 +26,7 @@ DBStoringCharset=Database charset tallentaa tiedot DBSortingCharset=Database charset lajitella tiedot WarningModuleNotActive=Moduuli %s on oltava käytössä WarningOnlyPermissionOfActivatedModules=Vain oikeudet liittyvät aktivoitu moduulit näkyvät täällä. Voit aktivoida muita moduulit asennuskuvaruudun - Moduuli sivulla. -DolibarrSetup=Dolibarr setup +DolibarrSetup=Dolibarr asennus tai päivitys DolibarrUser=Dolibarr käyttäjä InternalUser=Sisäinen käyttäjä ExternalUser=Ulkoinen käyttäjä @@ -34,7 +34,7 @@ InternalUsers=Sisäiset käyttäjät ExternalUsers=Ulkopuoliset käyttäjät GlobalSetup=Global setup GUISetup=Näyttö -SetupArea=Setup alueella +SetupArea=Asetusalue FormToTestFileUploadForm=Lomake testata tiedostonlähetyskiintiö (mukaan setup) IfModuleEnabled=Huomaa: kyllä on tehokas vain, jos moduuli %s on käytössä RemoveLock=Poista tiedosto %s, jos se on olemassa, jotta päivitys työkalu. @@ -116,7 +116,7 @@ LanguageBrowserParameter=Parametri %s LocalisationDolibarrParameters=Lokalisointi parametrit ClientTZ=Client Time Zone (user) ClientHour=Client time (user) -OSTZ=Aikavyöhyke Server OS +OSTZ=Server OS Time Zone PHPTZ=Aikavyöhyke Server PHP PHPServerOffsetWithGreenwich=Offset for PHP-palvelimen leveys Greenwich (sekunnin) ClientOffsetWithGreenwich=Client / Browser offset leveys Greenwich (sekuntia) @@ -233,7 +233,9 @@ OfficialWebSiteFr=Ranskan virallisella web-sivut OfficialWiki=Dolibarr Wiki OfficialDemo=Dolibarr online-demo OfficialMarketPlace=Virallinen markkinoilla ulkoisten moduulien / lisät -OfficialWebHostingService=Official web hosting services (Cloud hosting) +OfficialWebHostingService=Referenced web hosting services (Cloud hosting) +ReferencedPreferredPartners=Preferred Partners +OtherResources=Autres ressources ForDocumentationSeeWiki=Käyttäjälle tai kehittäjän dokumentaatio (doc, FAQs ...),
    katsoa, että Dolibarr Wiki:
    %s ForAnswersSeeForum=Muita kysymyksiä / apua, voit käyttää Dolibarr foorumilla:
    %s HelpCenterDesc1=Tämä alue voi auttaa sinua saamaan tukea palvelua Dolibarr. @@ -369,9 +371,9 @@ ExtrafieldSelectList = Select from table ExtrafieldSeparator=Separator ExtrafieldCheckBox=Checkbox ExtrafieldRadio=Radio button -ExtrafieldParamHelpselect=Parameters list have to be like key,value

    for exemple :
    1,value1
    2,value2
    3,value3
    ...

    In order to have the list depending on another :
    1,value1|parent_list_code:parent_key
    2,value2|parent_list_code:parent_key -ExtrafieldParamHelpcheckbox=Parameters list have to be like key,value

    for exemple :
    1,value1
    2,value2
    3,value3
    ... -ExtrafieldParamHelpradio=Parameters list have to be like key,value

    for exemple :
    1,value1
    2,value2
    3,value3
    ... +ExtrafieldParamHelpselect=Parameters list have to be like key,value

    for example :
    1,value1
    2,value2
    3,value3
    ...

    In order to have the list depending on another :
    1,value1|parent_list_code:parent_key
    2,value2|parent_list_code:parent_key +ExtrafieldParamHelpcheckbox=Parameters list have to be like key,value

    for example :
    1,value1
    2,value2
    3,value3
    ... +ExtrafieldParamHelpradio=Parameters list have to be like key,value

    for example :
    1,value1
    2,value2
    3,value3
    ... ExtrafieldParamHelpsellist=Parameters list comes from a table
    Syntax : table_name:label_field:id_field::filter
    Example : c_typent:libelle:id::filter

    filter can be a simple test (eg active=1) to display only active value
    if you want to filter on extrafields use syntaxt extra.fieldcode=... (where field code is the code of extrafield)

    In order to have the list depending on another :
    c_typent:libelle:id:parent_list_code|parent_column:filter LibraryToBuildPDF=Library used to build PDF WarningUsingFPDF=Warning: Your conf.php contains directive dolibarr_pdf_force_fpdf=1. This means you use the FPDF library to generate PDF files. This library is old and does not support a lot of features (Unicode, image transparency, cyrillic, arab and asiatic languages, ...), so you may experience errors during PDF generation.
    To solve this and have a full support of PDF generation, please download TCPDF library, then comment or remove the line $dolibarr_pdf_force_fpdf=1, and add instead $dolibarr_lib_TCPDF_PATH='path_to_TCPDF_dir' @@ -472,7 +474,7 @@ Module410Desc=Webcalendar yhdentyminen Module500Name=Special expenses (tax, social contributions, dividends) Module500Desc=Management of special expenses like taxes, social contribution, dividends and salaries Module510Name=Salaries -Module510Desc=Management of empoyees salaries and payments +Module510Desc=Management of employees salaries and payments Module600Name=Ilmoitukset Module600Desc=Lähetä ilmoitukset (sähköposti) on Dolibarr liiketoiminnan tapahtumat Module700Name=Lahjoitukset @@ -495,15 +497,15 @@ Module2400Name=Agenda Module2400Desc=Toimet / tehtävät ja esityslistan hallinta Module2500Name=Sähköinen Content Management Module2500Desc=Tallentaa ja jakaa asiakirjoja -Module2600Name= WebServices -Module2600Desc= Ota Dolibarr verkkopalvelut palvelimen -Module2700Name= Gravatar -Module2700Desc= Käytä online Gravatar palvelu (www.gravatar.com) näyttää kuvan käyttäjät / jäsenet (löytyi niiden sähköpostit). Tarvitsetko internetyhteys +Module2600Name=WebServices +Module2600Desc=Ota Dolibarr verkkopalvelut palvelimen +Module2700Name=Gravatar +Module2700Desc=Käytä online Gravatar palvelu (www.gravatar.com) näyttää kuvan käyttäjät / jäsenet (löytyi niiden sähköpostit). Tarvitsetko internetyhteys Module2800Desc=FTP Client -Module2900Name= GeoIPMaxmind -Module2900Desc= GeoIP Maxmind tulokset valmiuksia -Module3100Name= Skype -Module3100Desc= Add a Skype button into card of adherents / third parties / contacts +Module2900Name=GeoIPMaxmind +Module2900Desc=GeoIP Maxmind tulokset valmiuksia +Module3100Name=Skype +Module3100Desc=Add a Skype button into card of adherents / third parties / contacts Module5000Name=Multi-yhtiö Module5000Desc=Avulla voit hallita useita yrityksiä Module6000Name=Workflow @@ -681,6 +683,10 @@ Permission401=Lue alennukset Permission402=Luoda / muuttaa alennukset Permission403=Validate alennukset Permission404=Poista alennukset +Permission510=Read Salaries +Permission512=Create/modify salaries +Permission514=Delete salaries +Permission517=Export salaries Permission531=Lue palvelut Permission532=Luoda / muuttaa palvelut Permission534=Poista palvelut @@ -999,7 +1005,7 @@ ExtraFieldsSupplierOrders=Complementary attributes (orders) ExtraFieldsSupplierInvoices=Complementary attributes (invoices) ExtraFieldsProject=Complementary attributes (projects) ExtraFieldsProjectTask=Complementary attributes (tasks) -ExtraFieldHasWrongValue=Attribut %s on väärä arvo. +ExtraFieldHasWrongValue=Attribute %s has a wrong value. AlphaNumOnlyCharsAndNoSpace=only alphanumericals characters without space AlphaNumOnlyLowerCharsAndNoSpace=only alphanumericals and lower case characters without space SendingMailSetup=Setup of lähetysten sähköpostitse @@ -1018,13 +1024,13 @@ SuhosinSessionEncrypt=Session storage encrypted by Suhosin ConditionIsCurrently=Condition is currently %s TestNotPossibleWithCurrentBrowsers=Automatic detection not possible YouUseBestDriver=You use driver %s that is best driver available currently. -YouDoNotUseBestDriver=You use drive %s but driver %s is recommanded. +YouDoNotUseBestDriver=You use drive %s but driver %s is recommended. NbOfProductIsLowerThanNoPb=You have only %s products/services into database. This does not required any particular optimization. SearchOptim=Search optimization YouHaveXProductUseSearchOptim=You have %s product into database. You should add the constant PRODUCT_DONOTSEARCH_ANYWHERE to 1 into Home-Setup-Other, you limit the search to the beginning of strings making possible for database to use index and you should get an immediate response. BrowserIsOK=You are using the web browser %s. This browser is ok for security and performance. BrowserIsKO=You are using the web browser %s. This browser is known to be a bad choice for security, performance and reliability. We recommand you to use Firefox, Chrome, Opera or Safari. -XDebugInstalled=XDebug est chargé. +XDebugInstalled=XDebug is loaded. XCacheInstalled=XCache is loaded. AddRefInList=Display customer/supplier ref into list (select list or combobox) and most of hyperlink FieldEdition=Edition of field %s @@ -1073,7 +1079,7 @@ WebCalServer=Server hosting kalenteri tietokanta WebCalDatabaseName=Tietokannan nimi WebCalUser=Käyttäjän yhteys tietokantaan WebCalSetupSaved=Webcalendar asetukset on tallennettu. -WebCalTestOk=Yhteys palvelimeen ' %s' on tietokanta' %s' kanssa käyttäjä ' %s' onnistunut. +WebCalTestOk=Connection to server '%s' on database '%s' with user '%s' successful. WebCalTestKo1=Yhteys palvelimeen ' %s' onnistua mutta tietokanta' %s' ei tavoitettu. WebCalTestKo2=Yhteys palvelimeen ' %s' kanssa käyttäjä' %s' failed. WebCalErrorConnectOkButWrongDatabase=Yhteys onnistunut mutta tietokanta ei näytä olevan webcalendar tietokantaan. @@ -1119,7 +1125,7 @@ WatermarkOnDraftProposal=Watermark on draft commercial proposals (none if empty) OrdersSetup=Tilaukset hallinto-setup OrdersNumberingModules=Tilaukset numerointiin modules OrdersModelModule=Tilaa asiakirjojen malleja -HideTreadedOrders=Piilota kohdella tai peruuttaa tilaukset luettelon +HideTreadedOrders=Hide the treated or cancelled orders in the list ValidOrderAfterPropalClosed=Validoimiseksi tilauksen jälkeen ehdotus lähempänä, on mahdollista olla askel väliaikaisen jotta FreeLegalTextOnOrders=Vapaa tekstihaku tilauksissa WatermarkOnDraftOrders=Watermark on draft orders (none if empty) @@ -1214,9 +1220,9 @@ LDAPSynchroKO=Epäonnistui synkronointi testi LDAPSynchroKOMayBePermissions=Epäonnistui synkronointi testi. Tarkista, että connexion palvelimelle on määritetty oikein ja mahdollistaa LDAP udpates LDAPTCPConnectOK=TCP connect to LDAP server successful (Server=%s, Port=TCP yhteyden LDAP-palvelin onnistunut (Server= %s, Port= %s) LDAPTCPConnectKO=TCP connect to LDAP server failed (Server=%s, Port=TCP yhteyden LDAP-palvelimeen ei onnistunut (Server= %s, Port= %s) -LDAPBindOK=Connect/Authentificate to LDAP server sucessfull (Server=%s, Port=%s, Admin=%s, Password=Yhdistä / Authentificate on LDAP-palvelin onnistunut (Server= %s, Port= %s, Admin= %s, salasana= %s) +LDAPBindOK=Connect/Authentificate to LDAP server successful (Server=%s, Port=%s, Admin=%s, Password=%s) LDAPBindKO=Connect/Authentificate to LDAP server failed (Server=%s, Port=%s, Admin=%s, Password=Yhdistä / Authentificate on LDAP-palvelimeen ei onnistunut (Server= %s, Port= %s, Admin= %s, salasana= %s) -LDAPUnbindSuccessfull=Katkaise onnistunut +LDAPUnbindSuccessfull=Disconnect successful LDAPUnbindFailed=Katkaise epäonnistui LDAPConnectToDNSuccessfull=Yhteys au DN ( %s) Russie LDAPConnectToDNFailed=Yhteys au DN ( %s) choue @@ -1273,7 +1279,7 @@ LDAPFieldSidExample=Esimerkki: objectsid LDAPFieldEndLastSubscription=Päiväys merkintää varten LDAPFieldTitle=Virka / Tehtävä LDAPFieldTitleExample=Example: title -LDAPParametersAreStillHardCoded=LDAP parametrien ovat edelleen kovakoodattu (yhteydessä luokka) +LDAPParametersAreStillHardCoded=LDAP parameters are still hardcoded (in contact class) LDAPSetupNotComplete=LDAP-asetukset ole täydellinen (go muiden välilehdet) LDAPNoUserOrPasswordProvidedAccessIsReadOnly=N: o ylläpitäjä tai salasana tarjotaan. LDAP pääsy on nimetön ja vain luku-tilassa. LDAPDescContact=Tällä sivulla voit määritellä LDAP attributes nimi LDAP puu jokaisen tiedon löytyy Dolibarr yhteystiedot. @@ -1429,7 +1435,7 @@ OptionVATDefault=Standard OptionVATDebitOption=Vaihtoehto palvelut sur debet OptionVatDefaultDesc=Arvonlisävero on maksettava:
    - Toimituksen / maksuja tavaroista
    - Maksut palveluista OptionVatDebitOptionDesc=Arvonlisävero on maksettava:
    - Toimituksen / maksuja tavaroista
    - Laskulla (debet) ja palvelut -SummaryOfVatExigibilityUsedByDefault=Aika alv erääntyminen oletusarvon mukaan choosed vaihtoehto: +SummaryOfVatExigibilityUsedByDefault=Time of VAT exigibility by default according to chosen option: OnDelivery=Toimituksen OnPayment=Maksu OnInvoice=Käytössä lasku @@ -1446,7 +1452,7 @@ AccountancyCodeBuy=Purchase account. code AgendaSetup=Toimet ja esityslistan moduulin asetukset PasswordTogetVCalExport=Avain sallia viennin linkki PastDelayVCalExport=Älä viedä tapauksessa vanhempia kuin -AGENDA_USE_EVENT_TYPE=Use events types (managed into menu Setup -> Dictionnary -> Type of agenda events) +AGENDA_USE_EVENT_TYPE=Use events types (managed into menu Setup -> Dictionary -> Type of agenda events) ##### ClickToDial ##### ClickToDialDesc=Tämän moduulin avulla voidaan lisätä kuvake jälkeen puhelinnumero Dolibarr yhteystiedot. A napsautat tätä kuvaketta, tulee soittaa serveur tiettyyn URL määritellä alla. Tätä voidaan käyttää soittaa puhelun keskellä järjestelmän Dolibarr että voi soittaa puhelinnumeroon, joka SIP järjestelmä esimerkiksi. ##### Point Of Sales (CashDesk) ##### diff --git a/htdocs/langs/fi_FI/banks.lang b/htdocs/langs/fi_FI/banks.lang index f61618fd61e..7ece7788fe2 100644 --- a/htdocs/langs/fi_FI/banks.lang +++ b/htdocs/langs/fi_FI/banks.lang @@ -1,160 +1,160 @@ # Dolibarr language file - Source file is en_US - banks Bank=Pankki Banks=Pankit -MenuBankCash=Bank / Cash -MenuSetupBank=Bank / Cash setup +MenuBankCash=Pankki / Käteinen +MenuSetupBank=Pankki / Käteinen asetukset BankName=Pankin nimi FinancialAccount=Tili FinancialAccounts=Tilit -BankAccount=Pankkiyhteys +BankAccount=Pankkitili BankAccounts=Pankkitilit AccountRef=Rahoitustase ref AccountLabel=Rahoitustase etiketti -CashAccount=Rahat tilille -CashAccounts=Rahat ja pankkisaamiset +CashAccount=Käteistili +CashAccounts=Käteistilit MainAccount=Päätili -CurrentAccount=Vaihtotase -CurrentAccounts=Sekkitilit +CurrentAccount=Nykyinen tili +CurrentAccounts=Nykyiset tilit SavingAccount=Säästötili -SavingAccounts=Säästötileihin +SavingAccounts=Säästötilit ErrorBankLabelAlreadyExists=Rahoitustase etiketti on jo olemassa BankBalance=Saldo -BankBalanceBefore=Balance before -BankBalanceAfter=Balance after -BalanceMinimalAllowed=Pienin sallittu tasapaino -BalanceMinimalDesired=Pienin toivottu tasapaino -InitialBankBalance=Alkuperäiset tasapaino -EndBankBalance=Lopussa +BankBalanceBefore=Saldo ennen +BankBalanceAfter=Saldo jälkeen +BalanceMinimalAllowed=Pienin sallittu saldo +BalanceMinimalDesired=Pienin toivottu saldo +InitialBankBalance=Alkuperäinen saldo +EndBankBalance=Loppusaldo CurrentBalance=Nykyinen saldo FutureBalance=Tulevat tasapaino -ShowAllTimeBalance=Näytä tasapaino alusta -AllTime=From start -Reconciliation=Sovinto -RIB=Bank Account Number +ShowAllTimeBalance=Näytä saldo alusta asti +AllTime=Alkaen +Reconciliation=Yhteensovittaminen +RIB=Pankkitilin numero IBAN=IBAN-numero -BIC=BIC / SWIFT-numero -StandingOrders=Pysyvän tilaukset +BIC=BIC / SWIFT-koodi +StandingOrders=Kestotilaus StandingOrder=Kestotilaus Withdrawals=Nostot -Withdrawal=Peruuttaminen +Withdrawal=Nosto AccountStatement=Tiliote -AccountStatementShort=Lausunto -AccountStatements=Tiliotteisiin -LastAccountStatements=Viimeisin tiliotteisiin -Rapprochement=Reconciliate -IOMonthlyReporting=Kuukausittainen raportointi -BankAccountDomiciliation=Huomioon osoite -BankAccountCountry=Tili maa -BankAccountOwner=Tilin omistajan nimi -BankAccountOwnerAddress=Tilin omistajan osoite +AccountStatementShort=Laskelma +AccountStatements=Tiliotteet +LastAccountStatements=Viimeisimmät tiliotteet +Rapprochement=Yhteensovita +IOMonthlyReporting=Kuukausiraportti +BankAccountDomiciliation=Tilin osoite +BankAccountCountry=Tilin maa +BankAccountOwner=Tilinomistajan nimi +BankAccountOwnerAddress=Tilinomistajan osoite RIBControlError=Eheydentarkistus arvojen epäonnistuu. Tämä tarkoittaa tiedoista tilinumero eivät ole täydellisiä tai väärin (tarkista maassa, numerot ja IBAN). CreateAccount=Luo tili NewAccount=Uusi tili NewBankAccount=Uusi pankkitili -NewFinancialAccount=New rahoitustaseen -MenuNewFinancialAccount=New rahoitustaseen -NewCurrentAccount=Uusi vaihtotaseen +NewFinancialAccount=New rahoitustili +MenuNewFinancialAccount=Uusi rahoitustili +NewCurrentAccount=Uusi nykyinen tili NewSavingAccount=Uusi säästötili -NewCashAccount=Uusi käteisellä huomioon +NewCashAccount=Uusi käteistili EditFinancialAccount=Muokkaa tiliä -AccountSetup=Rahoitustilit setup -SearchBankMovement=Haku pankki liikkuvuus +AccountSetup=Rahoitustilien asetukset +SearchBankMovement=Hae pankkisiirtoa Debts=Velat -LabelBankCashAccount=Pankki tai rahan etiketti +LabelBankCashAccount=Pankki tai käteisen valuutta AccountType=Tilin tyyppi BankType0=Säästötili -BankType1=Vaihtotase -BankType2=Rahat tilille -IfBankAccount=Jos pankkitili -AccountsArea=Tilit alueella -AccountCard=Account-kortti +BankType1=Nykyinen tai luottokorttitili +BankType2=Käteistili +IfBankAccount=Mikäli pankkitili +AccountsArea=Tilialue +AccountCard=Tii-kortti DeleteAccount=Poista tili -ConfirmDeleteAccount=Oletko varma, että haluat poistaa tämän huomioon? +ConfirmDeleteAccount=Oletko varma, että haluat poistaa tämän tilin? Account=Tili ByCategories=Kategorioittain ByRubriques=Kategorioittain -BankTransactionByCategories=Pankki liiketoimia luokat -BankTransactionForCategory=Pankki liiketoimien luokan %s -RemoveFromRubrique=Poista yhteys luokka -RemoveFromRubriqueConfirm=Oletko varma, että haluat poistaa välinen kauppa-ja luokka? -ListBankTransactions=Luettelo pankin liiketoimia -IdTransaction=Transaction ID -BankTransactions=Pankki liiketoimet -SearchTransaction=Haku liiketoimi -ListTransactions=Luettelo liiketoimista -ListTransactionsByCategory=Luettelo liiketoimi / luokka +BankTransactionByCategories=Pankkitapahtumat kategorioittain +BankTransactionForCategory=Pankki tapahtumat kategoria%s +RemoveFromRubrique=Poista linkki kategoriaan +RemoveFromRubriqueConfirm=Oletko varma, että haluat poistaa linkin tapahtuman ja kategorian väliltä? +ListBankTransactions=Luettelo pankkitapahtumista +IdTransaction=Tapahtumatunnus +BankTransactions=Pankkitapahtumat +SearchTransaction=Hea tapahtumia +ListTransactions=Luettelo tapahtumista +ListTransactionsByCategory=Luettelo tapahtumista / kategoria TransactionsToConciliate=Liiketoimista hyvitellä Conciliable=Conciliable -Conciliate=Hyvitellä -Conciliation=Sovittelu +Conciliate=Sovita +Conciliation=Yhteensovita ConciliationForAccount=Hyvitellä tämän tilin IncludeClosedAccount=Sisällytä suljettu tilit -OnlyOpenedAccount=Vain avannut tilejä -AccountToCredit=Huomioon luoton -AccountToDebit=Huomioon veloittaa +OnlyOpenedAccount=Vain avatut tilit +AccountToCredit=Luottotili +AccountToDebit=Käteistili DisableConciliation=Poista sovittelu ominaisuus tämän tilin ConciliationDisabled=Sovittelukomitea ominaisuus pois päältä -StatusAccountOpened=Avoinna +StatusAccountOpened=Avattu StatusAccountClosed=Suljettu AccountIdShort=Numero -EditBankRecord=Muokkaa kirjaa -LineRecord=Transaktiotulostus -AddBankRecord=Lisää liiketoimi -AddBankRecordLong=Lisää liiketoimi käsin -ConciliatedBy=Conciliated jonka -DateConciliating=Hyvitellä päivämäärä -BankLineConciliated=Transaktiotulostus conciliated -CustomerInvoicePayment=Asiakas maksu -CustomerInvoicePaymentBack=Customer payment back -SupplierInvoicePayment=Toimittaja maksu -WithdrawalPayment=Irtisanominen maksu +EditBankRecord=Muokkaa +LineRecord=Tapahtuma +AddBankRecord=Lisää tapahtuma +AddBankRecordLong=Lisää tapahtuma manuaalisesti +ConciliatedBy=Sovetteli +DateConciliating=Sovittelupäivä +BankLineConciliated=Tapahtuma soviteltu +CustomerInvoicePayment=Asiakasmaksu +CustomerInvoicePaymentBack=Asiakasmaksu takaisin +SupplierInvoicePayment=Toimittajan maksu +WithdrawalPayment=Hyvitysmaksu SocialContributionPayment=Sosiaaliturvamaksujen maksamisesta FinancialAccountJournal=Rahoitustase journal BankTransfer=Pankkisiirto -BankTransfers=Pankkisiirtojen +BankTransfers=Pankkisiirrot TransferDesc=Siirtäminen tililtä toiselle yhden, Dolibarr kirjoittaa kaksi tietuetta (luottotililtä vuonna lähdetiliksi ja luottoa tavoite huomioon, että sama määrä. Sama merkki ja päivämäärä voidaan käyttää tästä tapahtumasta) TransferFrom=Mistä -TransferTo=Jos haluat -TransferFromToDone=A siirtää %s %s %s% s on kirjattu. -CheckTransmitter=Lähettimen -ValidateCheckReceipt=Validate tämän valintaruudun vastaanottamisesta? -ConfirmValidateCheckReceipt=Oletko varma, että haluamme vahvistaa tämän valintaruudun vastaanottamiselle, joten muutos on mahdollista, kun tämä on tehty? -DeleteCheckReceipt=Poista tämän valintaruudun vastaanottamisesta? -ConfirmDeleteCheckReceipt=Oletko varma, että haluat poistaa tämän valintaruudun vastaanottamisesta? -BankChecks=Pankki sekit +TransferTo=mihin +TransferFromToDone=A siirtää %s %s %s% s on tallennettu. +CheckTransmitter=Lähettäjä +ValidateCheckReceipt=Vahvista tämä sekkikuitti? +ConfirmValidateCheckReceipt=Oletko varma, että haluat vahvistaa tämän? Muutokset eivät ole enää mahdollisia, vahvistamisen jälkeen? +DeleteCheckReceipt=Poista tämä shekkikuitti? +ConfirmDeleteCheckReceipt=Oletko varma, että haluat poistaa tämän sekkikuitin? +BankChecks=Pankkisekit BankChecksToReceipt=Sekit odottaa talletusten ShowCheckReceipt=Näytä tarkistaa Talletus kuitti NumberOfCheques=Nb Sekkien -DeleteTransaction=Poista liiketoimi -ConfirmDeleteTransaction=Oletko varma, että haluat poistaa tämän liiketoimi? -ThisWillAlsoDeleteBankRecord=Tämä poistaa myös syntyy pankin liiketoimia -BankMovements=Liikkeet -CashBudget=Cash talousarvio -PlannedTransactions=Suunnitellut toimet +DeleteTransaction=Poista tapahtuma +ConfirmDeleteTransaction=Oletko varma, että haluat poistaa tämän tapahtuman? +ThisWillAlsoDeleteBankRecord=Tämä poistaa myös luodun pankkitapahtuman +BankMovements=Siirrot +CashBudget=Käteisbudjetti +PlannedTransactions=Suunnitellut tapahtumat Graph=Grafiikka -ExportDataset_banque_1=Pankki ja tilitiedot julkilausuma -ExportDataset_banque_2=Deposit slip -TransactionOnTheOtherAccount=Liiketoimen muut huomioon +ExportDataset_banque_1=Pankkitapahtumat ja tilitiedot +ExportDataset_banque_2=Talletuslomake +TransactionOnTheOtherAccount=Tapahtuma toisella tilillä TransactionWithOtherAccount=Tilisiirto PaymentNumberUpdateSucceeded=Maksu numero päivitetty onnistuneesti PaymentNumberUpdateFailed=Maksu numero ei voi päivittää PaymentDateUpdateSucceeded=Maksupäivä päivityksen onnistuneesti PaymentDateUpdateFailed=Maksupäivä ei voi päivittää -Transactions=Transactions -BankTransactionLine=Pankkitoimiin -AllAccounts=Kaikki pankin / tasetilit -BackToAccount=Palaa huomioon +Transactions=Tapahtumat +BankTransactionLine=Pankkitapahtuma +AllAccounts=Kaikki pankin/tilit +BackToAccount=Takaisin tiliin ShowAllAccounts=Näytä kaikki tilit -FutureTransaction=Tapahtuma on futur. Ei tapa lepyttää. +FutureTransaction=Tapahtuma on tulevaisuudessa. Ei soviteltavissa. SelectChequeTransactionAndGenerate=Valitse / suodattaa tarkastuksiin sisällyttää osaksi tarkastus talletuksen vastaanottamisesta ja klikkaa "Luo". InputReceiptNumber=Choose the bank statement related with the conciliation. Use a sortable numeric value (such as, YYYYMM) EventualyAddCategory=Eventually, specify a category in which to classify the records ToConciliate=To conciliate? ThenCheckLinesAndConciliate=Then, check the lines present in the bank statement and click -BankDashboard=Bank accounts summary -DefaultRIB=Default BAN -AllRIB=All BAN -LabelRIB=BAN Label -NoBANRecord=No BAN record -DeleteARib=Delete BAN record +BankDashboard=Pankkitilien yhteenveto +DefaultRIB=Oletun BAN +AllRIB=Kaikki BAN +LabelRIB=BAN tunnus +NoBANRecord=Ei BAN tietuetta +DeleteARib=Poista BAN tiedue ConfirmDeleteRib=Are you sure you want to delete this BAN record ? diff --git a/htdocs/langs/fi_FI/bills.lang b/htdocs/langs/fi_FI/bills.lang index 4353426fd49..436f09e71ca 100644 --- a/htdocs/langs/fi_FI/bills.lang +++ b/htdocs/langs/fi_FI/bills.lang @@ -2,27 +2,27 @@ Bill=Lasku Bills=Laskut BillsCustomers=Asiakkaiden laskut -BillsCustomer=Asiakkaan laskussa -BillsSuppliers=Tavarantoimittajat laskujen +BillsCustomer=Asiakkaan lasku +BillsSuppliers=Tavarantoimittajien lasku BillsCustomersUnpaid=Maksamattomat asiakkaiden laskut -BillsCustomersUnpaidForCompany=Maksamattomat asiakkaiden laskuja %s +BillsCustomersUnpaidForCompany=Maksamattomat asiakkaiden laskut %s BillsSuppliersUnpaid=Maksamattomat toimittajien laskut BillsSuppliersUnpaidForCompany=Maksamattomat toimittajan laskut %s BillsLate=Maksuviivästykset -BillsStatistics=Asiakkaiden laskut tilastot -BillsStatisticsSuppliers=Tavarantoimittajat laskujen tilastot -DisabledBecauseNotErasable=Käytössä sillä ei voida poistaa -InvoiceStandard=Standard lasku -InvoiceStandardAsk=Standard lasku -InvoiceStandardDesc=Tällainen lasku on yhteinen lasku. -InvoiceDeposit=Talletuslokero lasku -InvoiceDepositAsk=Talletuslokero lasku -InvoiceDepositDesc=Tällainen lasku on tehnyt, kun talletus on vastaanotettu. +BillsStatistics=Asiakkaiden laskutilastot +BillsStatisticsSuppliers=Tavarantoimittajien laskutilastot +DisabledBecauseNotErasable=Poistettu käytöstä koska ei voida poistaa +InvoiceStandard=Oletuslasku +InvoiceStandardAsk=Oletuslasku +InvoiceStandardDesc=Tämä lasku on oletuslasku. +InvoiceDeposit=Talletuslasku +InvoiceDepositAsk=Talletus lasku +InvoiceDepositDesc=Tällainen lasku tehdään kun talletus on vastaanotettu. InvoiceProForma=Proforma lasku InvoiceProFormaAsk=Proforma lasku -InvoiceProFormaDesc=Proforma laskun kuvan todellinen lasku, mutta sillä ei ole kirjanpidon arvoa. -InvoiceReplacement=Korvaus laskun -InvoiceReplacementAsk=Korvaus lasku lasku +InvoiceProFormaDesc=Proforma lasku on todellinen lasku, mutta sillä ei ole kirjanpidollista arvoa. +InvoiceReplacement=Korvaava lasku +InvoiceReplacementAsk=Laskun korvaava lasku InvoiceReplacementDesc=Replacement invoice is used to cancel and replace completely an invoice with no payment already received.

    Note: Only invoices with no payment on it can be replaced. If the invoice you replace is not yet closed, it will be automatically closed to 'abandoned'. InvoiceAvoir=Menoilmoitus InvoiceAvoirAsk=Menoilmoitus korjata laskun @@ -315,7 +315,6 @@ PaymentConditionShortPT_5050=50-50 PaymentConditionPT_5050=50%% in advance, 50%% on delivery FixAmount=Fix amount VarAmount=Variable amount (%% tot.) - # PaymentType PaymentTypeVIR=Pankkitalletus PaymentTypeShortVIR=Pankkitalletus diff --git a/htdocs/langs/fi_FI/boxes.lang b/htdocs/langs/fi_FI/boxes.lang index 7debd8b1f80..c42efbcd00f 100644 --- a/htdocs/langs/fi_FI/boxes.lang +++ b/htdocs/langs/fi_FI/boxes.lang @@ -1,91 +1,91 @@ # Dolibarr language file - Source file is en_US - boxes BoxLastRssInfos=Rss tiedot BoxLastProducts=Uusimmat tuotteet / palvelut -# BoxProductsAlertStock=Products in stock alert -BoxLastProductsInContract=Viimeisin sopimus tuotteet / palvelut -BoxLastSupplierBills=Viimeisin toimittajan laskut -BoxLastCustomerBills=Viimeisin asiakkaan laskut -BoxOldestUnpaidCustomerBills=Vanhin palkatonta asiakkaan laskut -BoxOldestUnpaidSupplierBills=Vanhin palkatonta toimittajan laskut -BoxLastProposals=Viimeisin kaupallinen ehdotuksia -BoxLastProspects=Viimeisin näkymät -BoxLastCustomers=Viimeisin asiakkaille -BoxLastSuppliers=Viimeisin toimittajat -BoxLastCustomerOrders=Viimeisin asiakkaan tilaukset +BoxProductsAlertStock=Tuotteita varastossa hälytys +BoxLastProductsInContract=Viimeisimmät %s sopimuksien tuotteet / palvelut +BoxLastSupplierBills=Viimeisimmät toimittajien laskut +BoxLastCustomerBills=Viimeisimmät asiakkaiden laskut +BoxOldestUnpaidCustomerBills=Vanhimmat maksamattomat asiakkaiden laskut +BoxOldestUnpaidSupplierBills=Vanhimmat maksamattomat toimittajien laskut +BoxLastProposals=Viimeisimmät kaupalliset ehdotukset +BoxLastProspects=Viimeksi muokatut mahdollisuudet +BoxLastCustomers=Viimeisin muokatut asiakkaat +BoxLastSuppliers=Viimeksi muokatut toimittajat +BoxLastCustomerOrders=Viimeisimmät asiakkaan tilaukset BoxLastBooks=Uusimmat kirjat -BoxLastActions=Viimeisin toimia -BoxLastContracts=Edellinen sopimukset -BoxLastContacts=Viimeksi kontaktit / osoitteet -BoxLastMembers=Viimeksi jäsentä -# BoxFicheInter=Last interventions -# BoxCurrentAccounts=Opened accounts balance +BoxLastActions=Viimeisimmät toiminnot +BoxLastContracts=Viimeisimmät sopimukset +BoxLastContacts=Viimeisimmät kontaktit/osoitteet +BoxLastMembers=Viimeisimmät jäsenet +BoxFicheInter=Viimeisimmät väliintulot +BoxCurrentAccounts=Avattujen tilien saldo BoxSalesTurnover=Myynnin liikevaihto -BoxTotalUnpaidCustomerBills=Yhteensä maksamattomia asiakkaan laskut -BoxTotalUnpaidSuppliersBills=Yhteensä maksamattomia toimittajan laskut -BoxTitleLastBooks=Viimeisin %s kirjataan kirjat -BoxTitleNbOfCustomers=Nombre de asiakas -BoxTitleLastRssInfos=Viimeisin %s uutisia %s -BoxTitleLastProducts=Viimeisin %s muunneltuja tuotteita / palveluita -# BoxTitleProductsAlertStock=Products in stock alert -BoxTitleLastCustomerOrders=Viimeisin %s muutettu asiakkaan tilaukset -BoxTitleLastSuppliers=Viimeisin %s kirjataan toimittajat -BoxTitleLastCustomers=Viimeisin %s kirjataan asiakkaille -BoxTitleLastModifiedSuppliers=Viimeksi %s muutettu toimittajien -BoxTitleLastModifiedCustomers=Viimeksi %s muutettu asiakkaiden -BoxTitleLastCustomersOrProspects=Viimeisin %s kirjataan asiakkaita tai näkymät -BoxTitleLastPropals=Viimeisin %s kirjataan ehdotuksia -BoxTitleLastCustomerBills=Viimeisin %s asiakkaan laskut -BoxTitleLastSupplierBills=Viimeisin %s toimittajan laskut -BoxTitleLastProspects=Viimeisin %s kirjataan näkymät -BoxTitleLastModifiedProspects=Viimeksi %s muutettu tulevaisuudennäkymät -BoxTitleLastProductsInContract=Edellinen %s tuotteita / palveluita sopimuksen -BoxTitleLastModifiedMembers=Viimeksi %s muutettu jäsentä -# BoxTitleLastFicheInter=Last %s modified intervention -BoxTitleOldestUnpaidCustomerBills=Vanhin %s palkatonta asiakkaan laskut -BoxTitleOldestUnpaidSupplierBills=Vanhin %s palkatonta toimittajan laskut -# BoxTitleCurrentAccounts=Opened account's balances +BoxTotalUnpaidCustomerBills=Maksamattomia asiakkaiden laskuja yhteensä +BoxTotalUnpaidSuppliersBills=Maksamattomia toimittajan laskuja yhteensä +BoxTitleLastBooks=Viimeisimmät %s kirjatatut kirjat +BoxTitleNbOfCustomers=Asiakasmäärä +BoxTitleLastRssInfos=Viimeisimmät %s uutiset %s +BoxTitleLastProducts=Viimeksi %s muokattuja tuotteita/palveluita +BoxTitleProductsAlertStock=Tuotteiden varastohälytykset +BoxTitleLastCustomerOrders=Viimeksi %s muokatut asiakkaiden tilaukset +BoxTitleLastSuppliers=Viimeksi %s lisätyt toimittajat +BoxTitleLastCustomers=Viimeisimmät %s lisätyt asiakkaat +BoxTitleLastModifiedSuppliers=Viimeksi %s muokatut toimittajat +BoxTitleLastModifiedCustomers=Viimeksi %s muokatut asiakkaat +BoxTitleLastCustomersOrProspects=Viimeisin %s muokatut asiakkaat tai mahdollisuudet +BoxTitleLastPropals=Viimeksi %s lisätyt mahdollisuudet +BoxTitleLastCustomerBills=Viimeisimmät %s asiakkaiden laskut +BoxTitleLastSupplierBills=Viimeisimmät %s toimittajien laskut +BoxTitleLastProspects=Viimeisimmät %s lisätyt mahdollisuudet +BoxTitleLastModifiedProspects=Viimeksi %s muokatut mahdollisuudet +BoxTitleLastProductsInContract=Viimeisimmät %s tuotteet / palvelut sopimuksissa +BoxTitleLastModifiedMembers=Viimeksi %s muutetut jäsenet +BoxTitleLastFicheInter=Viimeisimmät %s muokkaamat väliintulot +BoxTitleOldestUnpaidCustomerBills=Vanhimmat %s maksamattomat asiakkaiden laskut +BoxTitleOldestUnpaidSupplierBills=Vanhimmat %s maksamattomat toimittajan laskut +BoxTitleCurrentAccounts=Avattujen tilien saldot BoxTitleSalesTurnover=Myynnin liikevaihto -BoxTitleTotalUnpaidCustomerBills=Maksamattomat asiakkaan laskut -BoxTitleTotalUnpaidSuppliersBills=Maksamattomat toimittajan laskut -BoxTitleLastModifiedContacts=Viimeksi %s muutettu kontaktit / osoitteet -BoxMyLastBookmarks=Viimeinen %s kirjanmerkeistä -BoxOldestExpiredServices=Vanhin aktiivinen päättyi palvelut -BoxLastExpiredServices=Viimeksi %s vanhin yhteydet aktiivisten vanhentuneet palvelut -BoxTitleLastActionsToDo=Viimeisin %s toimet eivät -BoxTitleLastContracts=Edellinen %s sopimukset -BoxTitleLastModifiedDonations=Viimeksi %s muutettu lahjoitukset -BoxTitleLastModifiedExpenses=Viimeksi %s muutettu kulut -# BoxGlobalActivity=Global activity (invoices, proposals, orders) -FailedToRefreshDataInfoNotUpToDate=Päivitys ei onnistunut RSS muutostilassa. Viimeisin onnistunut virkistystaajuuden päivämäärä: %s -LastRefreshDate=Viimeisin päivitys päivämäärä -NoRecordedBookmarks=No bookmarks defined. Click tästä lisätä kirjanmerkkejä. -ClickToAdd=Klikkaa tästä lisätä. -NoRecordedCustomers=Ei kirjata asiakkaiden +BoxTitleTotalUnpaidCustomerBills=Maksamattomat asiakkaiden laskut +BoxTitleTotalUnpaidSuppliersBills=Maksamattomat toimittajien laskut +BoxTitleLastModifiedContacts=Viimeksi %s muokattuja kontaktit/osoitteet +BoxMyLastBookmarks=Viimeisimmät %s kirjanmerkit +BoxOldestExpiredServices=Vanhimat aktiiviset päättyneet palvelut +BoxLastExpiredServices=Viimeisimmät %s vanhimmat kontaktit aktiivisesti vanhenevilla palveluilla +BoxTitleLastActionsToDo=Viimeisimmät %s tehtävät +BoxTitleLastContracts=Viimeisimmät %s sopimukset +BoxTitleLastModifiedDonations=Viimeisimmät %s muokatut lahjoitukset +BoxTitleLastModifiedExpenses=Viimeisimmät %s muutetut kustannukset +BoxGlobalActivity=Yleisaktiviteetit (laskut, ehdotukset, tilaukset) +FailedToRefreshDataInfoNotUpToDate=RSS päivitys epäonnistui. Viimeisin onnistunut päivityksen päivämäärä: %s +LastRefreshDate=Viimeisin päivitys +NoRecordedBookmarks=Kirjanmerkkejä ei ole määritelty. +ClickToAdd=Klikkaa tästä lisätäksesi. +NoRecordedCustomers=Ei tallennettuja asiakkaita NoRecordedContacts=Ei tallennettuja yhteystietoja -NoActionsToDo=Mitään toimenpiteitä tehdä -NoRecordedOrders=N: o kirjataan asiakkaan tilaukset -NoRecordedProposals=Ei kirjata ehdotuksia -NoRecordedInvoices=N: o kirjataan asiakkaan laskut -NoUnpaidCustomerBills=N: o palkatonta asiakkaan laskut -NoRecordedSupplierInvoices=Ei kirjata toimittajan laskut -NoUnpaidSupplierBills=N: o palkatonta toimittajan laskut -NoModifiedSupplierBills=Ei kirjattu toimittajan laskut -NoRecordedProducts=N: o kirjataan tuotteet / palvelut -NoRecordedProspects=N: o kirjataan näkymät -NoContractedProducts=Ei tuotteita / palveluista -NoRecordedContracts=Ei kirjattu sopimuksiin -# NoRecordedInterventions=No recorded interventions -# BoxLatestSupplierOrders=Latest supplier orders -# BoxTitleLatestSupplierOrders=%s latest supplier orders -# NoSupplierOrder=No recorded supplier order -# BoxCustomersInvoicesPerMonth=Customer invoices per month -# BoxSuppliersInvoicesPerMonth=Supplier invoices per month -# BoxCustomersOrdersPerMonth=Customer orders per month -# BoxSuppliersOrdersPerMonth=Supplier orders per month -# BoxProposalsPerMonth=Proposals per month -# NoTooLowStockProducts=No product under the low stock limit -# BoxProductDistribution=Products/Services distribution -# BoxProductDistributionFor=Distribution of %s for %s +NoActionsToDo=Ei tehtäviä toimenpiteitä +NoRecordedOrders=Ei tallennettuja asiakastilauksia +NoRecordedProposals=Ei tallennettuja ehdotuksia +NoRecordedInvoices=Ei tallennettuja asiakkaan laskuja +NoUnpaidCustomerBills=Ei maksamattomia asiakkaiden laskuja +NoRecordedSupplierInvoices=Ei tallennettuja toimittajien laskuja +NoUnpaidSupplierBills=Ei maksamattomia toimittajien laskuja +NoModifiedSupplierBills=Ei tallennettuja toimittajien laskuja +NoRecordedProducts=Ei tallennettuja tuotteita/palveluita +NoRecordedProspects=Ei talennettuja mahdollisuuksia +NoContractedProducts=Ei tuotteita/palveluita sopimuksissa +NoRecordedContracts=Ei tallennetuja sopimuksia +NoRecordedInterventions=Ei tallennettuja väliintuloja +BoxLatestSupplierOrders=Viimeisin toimittajan tilaus +BoxTitleLatestSupplierOrders=%s viimeisintä toimittajan tilausta +NoSupplierOrder=Ei tallennettuja toimittajan tilauksia +BoxCustomersInvoicesPerMonth=Asiakaslaskuja kuukausittain +BoxSuppliersInvoicesPerMonth=Toimittajien laskuja kuukausittain +BoxCustomersOrdersPerMonth=Asiakastilauksia kuukausittain +BoxSuppliersOrdersPerMonth=Toimittajien tilauksia kuukausittain +BoxProposalsPerMonth=Mahdollisuutta kuukausittain +NoTooLowStockProducts=Ei tuotteita alle varaston hälytysrajan +BoxProductDistribution=Tuotteiden/palveluiden jakelu +BoxProductDistributionFor=%s jakelut %s ForCustomersInvoices=Asiakkaiden laskut -# ForCustomersOrders=Customers orders +ForCustomersOrders=Asiakkaiden tilaukset ForProposals=Ehdotukset diff --git a/htdocs/langs/fi_FI/commercial.lang b/htdocs/langs/fi_FI/commercial.lang index 4c45b9d9c35..d8dbb050531 100644 --- a/htdocs/langs/fi_FI/commercial.lang +++ b/htdocs/langs/fi_FI/commercial.lang @@ -1,12 +1,12 @@ # Dolibarr language file - Source file is en_US - commercial Commercial=Kaupalliset -CommercialArea=Kaupallinen ala +CommercialArea=Kaupalliset toiminnot CommercialCard=Kaupalliset kortti -CustomerArea=Asiakkaat alueella +CustomerArea=Asiakasalue Customer=Asiakas Customers=Asiakkaat -Prospect=Esitetilaus -Prospects=Näkymät +Prospect=Mahdollisuus +Prospects=Mahdollisuudet DeleteAction=Poista toiminto / tehtävä NewAction=Uusi toimi / tehtävä AddAction=Lisää toiminta / tehtävä @@ -14,29 +14,29 @@ AddAnAction=Lisää toiminta / tehtävä AddActionRendezVous=Lisää Rendezvous tehtävä Rendez-Vous=Rendezvous ConfirmDeleteAction=Oletko varma, että haluat poistaa tämän tehtävän? -CardAction=Toimi-kortti -PercentDone=Prosenttiosuus tehnyt -ActionOnCompany=Task noin yritys -ActionOnContact=Task noin yhteyttä -TaskRDV=Kokoukset -TaskRDVWith=Tapaaminen %s +CardAction=Tapahtumakortti +PercentDone=Prosenttia tehty +ActionOnCompany=Tehtävä yritykselle +ActionOnContact=Tehtävä kontaktille +TaskRDV=Tapaamiset +TaskRDVWith=Tapaaminen %s kanssa ShowTask=Näytä tehtävä ShowAction=Näytä toiminta -ActionsReport=Toimet raportti -# ThirdPartiesOfSaleRepresentative=Thirdparties with sales representative +ActionsReport=Tapahtumaraportti +ThirdPartiesOfSaleRepresentative=Sidosryhmät myyntiedustajalla SalesRepresentative=Myyntiedustaja SalesRepresentatives=Myyntiedustajat -SalesRepresentativeFollowUp=Myyntiedustajaasi (follow-up) -SalesRepresentativeSignature=Myyntiedustajaasi (allekirjoitus) -CommercialInterlocutor=Kaupalliset keskustelukumppani +SalesRepresentativeFollowUp=Myyntiedustaja (follow-up) +SalesRepresentativeSignature=Myyntiedustaja (allekirjoitus) +CommercialInterlocutor=Kaupallinen neuvottelija ErrorWrongCode=Väärä koodi -NoSalesRepresentativeAffected=Mitään erityistä myyntiedustajaasi vaikuttaa +NoSalesRepresentativeAffected=Ei kohdistettua myyntiedustajaa ShowCustomer=Näytä asiakas ShowProspect=Näytä näköpiirissä ListOfProspects=Luettelo näkymät ListOfCustomers=Luettelo asiakkaille -LastDoneTasks=Viimeisin %s tehnyt tehtävänsä -LastRecordedTasks=Viimeisin kirjataan tehtävät +LastDoneTasks=Viimeisimmät %s tehdyt tehtävät +LastRecordedTasks=Viimeisimmät kirjatut tehtävät LastActionsToDo=Viimeisin %s vanhin toimia ei ole saatu DoneAndToDoActionsFor=Tehty ja tehdä tehtäviä %s DoneAndToDoActions=Tehty ja tehdä tehtäviä @@ -52,9 +52,9 @@ StatusActionDone=Tehty MyActionsAsked=Toimet olen kirjataan MyActionsToDo=Toimet Olen tehdä MyActionsDone=Toimet vaikuttaa minusta -StatusActionInProcess=In process -TasksHistoryForThisContact=Toimet tähän yhteyttä -LastProspectDoNotContact=Älä yhteyttä +StatusActionInProcess=Työnalla +TasksHistoryForThisContact=Kontaktin tapahtumat +LastProspectDoNotContact=Älä ota yhteyttä LastProspectNeverContacted=Älä koskaan yhteyttä LastProspectToContact=Voit ottaa yhteyttä LastProspectContactInProcess=Yhteystiedot prosessi @@ -74,22 +74,22 @@ ActionAC_RDV=Kokoukset ActionAC_FAC=Lähetä laskutustietosi ActionAC_REL=Lähetä laskutustilanteesi (muistutus) ActionAC_CLO=Sulje -ActionAC_EMAILING=Lähetä massa sähköpostia -ActionAC_COM=Lähetä tilata postitse +ActionAC_EMAILING=Lähetä massasähköpostia +ActionAC_COM=Lähetä asiakastilaus postitse ActionAC_SHIP=Lähetä toimitus postitse -ActionAC_SUP_ORD=Lähetä toimittaja tilaa postitse -ActionAC_SUP_INV=Lähetä toimittaja lasku postitse +ActionAC_SUP_ORD=Lähetä toimittajan tilaus postitse +ActionAC_SUP_INV=Lähetä toimittajan lasku postitse ActionAC_OTH=Muut -# ActionAC_OTH_AUTO=Other (automatically inserted events) -# ActionAC_MANUAL=Manually inserted events -# ActionAC_AUTO=Automatically inserted events -# Stats=Sales statistics -# CAOrder=Sales volume (validated orders) -# FromTo=from %s to %s -# MargeOrder=Margins (validated orders) -# RecapAnnee=Summary of the year -# NoData=There is no data -StatusProsp=Prospect tila -DraftPropals=Suunnitelmiin liiketoimintaehdotukset -SearchPropal=Etsi kaupallinen ehdotuksen -# CommercialDashboard=Commercial summary +ActionAC_OTH_AUTO=Muut (automaattisesti lisätyt tapahtumat) +ActionAC_MANUAL=Manuaalisesti lisätyt tapahtumat +ActionAC_AUTO=Automaalliset lisätyt tapahtumat +Stats=Myyntitilastot +CAOrder=Myyntivolyymi (vahvistetut tilaukset) +FromTo=alkaen %s - %s asti +MargeOrder=Marginaalit (vahvistetut tilaukset) +RecapAnnee=Vuoden yhteenveto +NoData=Ei tietoja +StatusProsp=Mahdollisuuden tila +DraftPropals=Kaupallisten ehdotusten luonnos +SearchPropal=Hae kaupallisia ehdotuksia +CommercialDashboard=Kaupallinen yhteenveto diff --git a/htdocs/langs/fi_FI/companies.lang b/htdocs/langs/fi_FI/companies.lang index 41e8be6aca2..62bee66e26b 100644 --- a/htdocs/langs/fi_FI/companies.lang +++ b/htdocs/langs/fi_FI/companies.lang @@ -3,98 +3,99 @@ ErrorCompanyNameAlreadyExists=Yrityksen nimi %s on jo olemassa. Valitse toinen. ErrorPrefixAlreadyExists=Etunumero %s on jo olemassa. Valitse toinen. ErrorSetACountryFirst=Aseta ensin maa SelectThirdParty=Valitse kolmas osapuoli -DeleteThirdParty=Poista kolmasosaa osapuoli -ConfirmDeleteCompany=Oletko varma, että haluat poistaa tämän yrityksen ja kaikki perinyt tietoa? +DeleteThirdParty=Poista kolmas osapuoli +ConfirmDeleteCompany=Oletko varma, että haluat poistaa tämän yrityksen ja kaikki sen tiedot tiedot? DeleteContact=Poista yhteystieto -ConfirmDeleteContact=Oletko varma, että haluat poistaa tämän yhteystiedot ja kaikki perinyt tietoa? -MenuNewThirdParty=Uusi kolmannen osapuolen +ConfirmDeleteContact=Oletko varma, että haluat poistaa tämän yhteystiedot ja tiedot? +MenuNewThirdParty=Uusi kolmas osapuoli MenuNewCompany=Uusi yritys MenuNewCustomer=Uusi asiakas MenuNewProspect=Uusi mahdollisuus -MenuNewSupplier=Uuden toimittajan -MenuNewPrivateIndividual=Uusi yksityishenkilön +MenuNewSupplier=Uusi toimittaja +MenuNewPrivateIndividual=Uusi yksityishenkilö MenuSocGroup=Ryhmät NewCompany=Uusi yhtiö (mahdollisuus, asiakas, toimittaja) NewThirdParty=Uusi kolmas osapuoli (mahdollisuus, asiakas, toimittaja) -NewSocGroup=Uusien yritysten ryhmä -NewPrivateIndividual=Uusi yksityishenkilöltä (etsintä-, asiakas, toimittaja) -ProspectionArea=Etsintään alueella -SocGroup=Ryhmän yhtiöt -IdThirdParty=Id kolmannen osapuolen -IdCompany=Yritys Id -IdContact=Yhteystiedot Id -Contacts=Yhteystiedot +NewSocGroup=Uusi yritysryhmä +NewPrivateIndividual=Uusi yksityishenkilö (mahdollisuus, asiakas, toimittaja) +CreateDolibarrThirdPartySupplier=Create a third party (supplier) +ProspectionArea=Uusien mahdollisuuksien alue +SocGroup=Yritysryhmät +IdThirdParty=Kolmannen osapuolen tunnus +IdCompany=Yritystunnus +IdContact=Yhteystiedon tunnus +Contacts=Yhteystiedot/Osoitteet ThirdPartyContacts=Kolmannen osapuolen yhteystiedot -ThirdPartyContact=Kolmannen osapuolen yhteystiedot, -StatusContactValidated=Tila yhteystiedot +ThirdPartyContact=Kolmannen osapuolen yhteystiedot/osoitteet +StatusContactValidated=Yhteystietojen/osoitteiden tila Company=Yritys CompanyName=Yrityksen nimi Companies=Yritykset -CountryIsInEEC=Maa sisällä Euroopan talousyhteisö +CountryIsInEEC=Maa kuuluu EU:hun ThirdPartyName=Kolmannen osapuolen nimi -ThirdParty=Kolmannen osapuolen +ThirdParty=Kolmas osapuoli ThirdParties=Kolmannet osapuolet ThirdPartyAll=Kolmannet osapuolet (kaikki) -ThirdPartyProspects=Näkymät +ThirdPartyProspects=Mahdollisuudet ThirdPartyProspectsStats=Näkymät ThirdPartyCustomers=Asiakkaat ThirdPartyCustomersStats=Asiakkaat -ThirdPartyCustomersWithIdProf12=Asiakkaat, joilla on %s %s +ThirdPartyCustomersWithIdProf12=Asiakkaat, joilla on %s tai %s ThirdPartySuppliers=Tavarantoimittajat ThirdPartyType=Kolmannen osapuolen tyyppi Company/Fundation=Yritys / säätiö Individual=Yksityishenkilö -ToCreateContactWithSameName=Luo automaattisesti fyysinen kosketus saman informations +ToCreateContactWithSameName=Luo automaattisesti fyysinen kontakti samalla informaatiolla ParentCompany=Emoyhtiö Subsidiary=Tytäryhtiö Subsidiaries=Tytäryhtiöt -NoSubsidiary=Ei tytär -ReportByCustomers=Raportti asiakkaiden -ReportByQuarter=Raportti neljännesvuosittain -CivilityCode=Kohteliaisuus koodi +NoSubsidiary=Ei tytäryhtiö +ReportByCustomers=Raportti asiakkaiden mukaan +ReportByQuarter=Raportti tuloksittain +CivilityCode=Siviilisääty RegisteredOffice=Kotipaikka Name=Nimi Lastname=Sukunimi Firstname=Etunimi PostOrFunction=Virka / Tehtävä -UserTitle=Otsikko +UserTitle=Titteli Surname=Sukunimi / Pseudo Address=Osoite -State=Valtio / Canton +State=Valtio / Lääni Region=Alue Country=Maa CountryCode=Maakoodi -CountryId=Maa tunnus +CountryId=Maatunnus Phone=Puhelin -# Skype=Skype -# Call=Call -# Chat=Chat -PhonePro=Prof puhelin -PhonePerso=Pers. puhelin -PhoneMobile=Mobile -# No_Email=Don't send mass e-mailings +Skype=Skype +Call=Call +Chat=Chat +PhonePro=Työpuhelin +PhonePerso=Henkilökohtainen puhelin +PhoneMobile=Matkapuhelin +No_Email=Älä lähetä massasähköposteja Fax=Faksi Zip=Postinumero -Town=Kaupunki -Web=Web -Poste= Sijainti -DefaultLang=Kieli oletusarvoisesti -VATIsUsed=Arvonlisävero on käytetty -VATIsNotUsed=Arvonlisävero ei ole käytetty -# CopyAddressFromSoc=Fill address with thirdparty address -# NoEmailDefined=There is no email defined +Town=Postitoimipaikka +Web=Kotisivut +Poste= Asema +DefaultLang=Oletuskieli +VATIsUsed=Arvonlisävero käytössä +VATIsNotUsed=Arvonlisävero ei ole käytössä +CopyAddressFromSoc=Täytä kolmanen osapuolen osoite +NoEmailDefined=There is no email defined ##### Local Taxes ##### -LocalTax1IsUsedES= RE käytetään -LocalTax1IsNotUsedES= RE ei käytetä -LocalTax2IsUsedES= IRPF käytetään -LocalTax2IsNotUsedES= IRPF ei käytetä +LocalTax1IsUsedES= RE käytössä +LocalTax1IsNotUsedES= RE ei käytössä +LocalTax2IsUsedES= IRPF käytössä +LocalTax2IsNotUsedES= IRPF ei käytössä LocalTax1ES=RE LocalTax2ES=IRPF ThirdPartyEMail=%s -WrongCustomerCode=Asiakas koodi kelpaa -WrongSupplierCode=Toimittaja koodi kelpaa -CustomerCodeModel=Asiakas koodi malli -SupplierCodeModel=Toimittaja koodi malli +WrongCustomerCode=Asiakastunnus vihreellinen +WrongSupplierCode=Toimittajatunnus virheellinen +CustomerCodeModel=Asiakastunnuksen malli +SupplierCodeModel=Toimittajatunnuksen malli Gencod=Viivakoodi ##### Professional ID ##### ProfId1Short=Prof id 1 @@ -102,35 +103,35 @@ ProfId2Short=Prof id 2 ProfId3Short=Prof id 3 ProfId4Short=Prof id 4 ProfId5Short=Prof id 5 -# ProfId6Short=Prof. id 5 +ProfId6Short=Prof. id 5 ProfId1=Professional-tunnuksen 1 ProfId2=Professional-tunnuksen 2 ProfId3=Professional-tunnuksen 3 ProfId4=Professional-tunnuksen 4 ProfId5=Ammatillinen tunnus 5 -# ProfId6=Professional ID 6 +ProfId6=Professional ID 6 ProfId1AR=Prof Id 1 (CUIL) ProfId2AR=Prof Id 2 (revenu brutes) ProfId3AR=- ProfId4AR=- ProfId5AR=- -# ProfId6AR=- +ProfId6AR=- ProfId1AU=Prof Id 1 (ABN) ProfId2AU=- ProfId3AU=- ProfId4AU=- ProfId5AU=- -# ProfId6AU=- +ProfId6AU=- ProfId1BE=Prof Id 1 (professionnel numero) ProfId2BE=- ProfId3BE=- ProfId4BE=- ProfId5BE=- -# ProfId6BE=- -# ProfId1BR=- -# ProfId2BR=IE (Inscricao Estadual) -# ProfId3BR=IM (Inscricao Municipal) -# ProfId4BR=CPF +ProfId6BE=- +ProfId1BR=- +ProfId2BR=IE (Inscricao Estadual) +ProfId3BR=IM (Inscricao Municipal) +ProfId4BR=CPF #ProfId5BR=CNAE #ProfId6BR=INSS ProfId1CH=- @@ -138,134 +139,134 @@ ProfId2CH=- ProfId3CH=Prof Id 1 (liittovaltion numero) ProfId4CH=Prof Id 2 (Commercial Record numero) ProfId5CH=- -# ProfId6CH=- +ProfId6CH=- ProfId1CL=Professori Id 1 (RUT) ProfId2CL=- ProfId3CL=- ProfId4CL=- ProfId5CL=- -# ProfId6CL=- +ProfId6CL=- ProfId1CO=Professori Id 1 (RUT) ProfId2CO=- ProfId3CO=- ProfId4CO=- ProfId5CO=- -# ProfId6CO=- +ProfId6CO=- ProfId1DE=Prof Id 1 (USt.-IdNr) ProfId2DE=Prof Id 2 (USt.-Nr) ProfId3DE=Prof Id 3 (Handelsregister-Nr.) ProfId4DE=- ProfId5DE=- -# ProfId6DE=- +ProfId6DE=- ProfId1ES=Prof Id 1 (CIF / NIF) ProfId2ES=Prof Id 2 (henkilötunnus) ProfId3ES=Prof tunnus 3 (CNAE) ProfId4ES=Prof Id 4 (Collegiate numero) ProfId5ES=- -# ProfId6ES=- +ProfId6ES=- ProfId1FR=Prof Id 1 (SIREN) ProfId2FR=Prof Id 2 (Siret) ProfId3FR=Prof Id 3 (NAF, vanha APE) ProfId4FR=Prof Id 4 (RCS / RM) ProfId5FR=Prof Id 5 -# ProfId6FR=- +ProfId6FR=- ProfId1GB=Prof Id 1 (Registration Number) ProfId2GB=- ProfId3GB=Prof Id 3 (SIC) ProfId4GB=- ProfId5GB=- -# ProfId6GB=- +ProfId6GB=- ProfId1HN=Id prof. 1 (RTN) ProfId2HN=- ProfId3HN=- ProfId4HN=- ProfId5HN=- -# ProfId6HN=- +ProfId6HN=- ProfId1IN=Prof Id 1 (TIN) ProfId2IN=Prof tunnus 2 ProfId3IN=Prof Id 3 ProfId4IN=Prof Id 4 ProfId5IN=Prof Id 5 -# ProfId6IN=- +ProfId6IN=- ProfId1MA=Id prof. 1 (RC) ProfId2MA=Id prof. 2 (Patente) ProfId3MA=Id prof. 3 (IF) ProfId4MA=Id prof. 4 (CNSS) ProfId5MA=- -# ProfId6MA=- +ProfId6MA=- ProfId1MX=Professori Id 1 (RFC). ProfId2MX=Professori Id 2 (R. P. IMSS) ProfId3MX=Professori Id 3 (Profesional peruskirja) ProfId4MX=- ProfId5MX=- -# ProfId6MX=- +ProfId6MX=- ProfId1NL=KvK nummer ProfId2NL=- ProfId3NL=- ProfId4NL=- ProfId5NL=- -# ProfId6NL=- +ProfId6NL=- ProfId1PT=Prof Id 1 (NIPC) ProfId2PT=Prof Id 2 (Sosiaaliturva numero) ProfId3PT=Prof Id 3 (Commercial Record numero) ProfId4PT=Prof Id 4 (konservatorio) ProfId5PT=- -# ProfId6PT=- +ProfId6PT=- ProfId1SN=RC ProfId2SN=NINEA ProfId3SN=- ProfId4SN=- ProfId5SN=- -# ProfId6SN=- +ProfId6SN=- ProfId1TN=Prof Id 1 (RC) ProfId2TN=Prof Id 2 (Fiscal matricule) ProfId3TN=Prof Id 3 (Douane code) ProfId4TN=Prof Id 4 (BAN) ProfId5TN=- -# ProfId6TN=- +ProfId6TN=- ProfId1RU=Professori Id 1 (OGRN) ProfId2RU=Professori Id 2 (INN) ProfId3RU=Professori Id 3 (KPP) ProfId4RU=Professori Id 4 (Okpo) ProfId5RU=- -# ProfId6RU=- +ProfId6RU=- VATIntra=ALV-numero VATIntraShort=ALV-numero VATIntraVeryShort=Alv VATIntraSyntaxIsValid=Syntaksi on voimassa VATIntraValueIsValid=Arvo on voimassa -ProspectCustomer=Esitetilaus / Asiakaspalvelu -Prospect=Esitetilaus -CustomerCard=Asiakas Card +ProspectCustomer=Mahdollisuus / Asiakas +Prospect=Mahdollisuus +CustomerCard=Asiakaskortti Customer=Asiakas -CustomerDiscount=Asiakas Discount -CustomerRelativeDiscount=Suhteellinen asiakkaan alennus -CustomerAbsoluteDiscount=Absoluuttinen asiakkaan alennus -CustomerRelativeDiscountShort=Suhteellinen edullisista -CustomerAbsoluteDiscountShort=Absoluuttinen edullisista -CompanyHasRelativeDiscount=Tämä asiakas on edullisista %s%% -CompanyHasNoRelativeDiscount=Tällä asiakkaalla ei ole suhteellinen edullisista oletusarvoisesti -CompanyHasAbsoluteDiscount=Tämä asiakas on edelleen edullisista luottoja %s %s -CompanyHasCreditNote=Tämä asiakas on edelleen luotto muistiinpanoja %s %s -CompanyHasNoAbsoluteDiscount=Tällä asiakkaalla ei ole edullisista luottovalinnoissa +CustomerDiscount=Asiakasalennus +CustomerRelativeDiscount=Suhteellinen asiakasalennus +CustomerAbsoluteDiscount=Absoluuttinen asiakasalennus +CustomerRelativeDiscountShort=Suhteellinen alennus +CustomerAbsoluteDiscountShort=Absoluuttinen alennus +CompanyHasRelativeDiscount=Tällä asiakkaalla on oletusalennus %s%% +CompanyHasNoRelativeDiscount=Tällä asiakkaalla ei ole suhteellista alennusta oletuksena +CompanyHasAbsoluteDiscount=Tällä asiakkaalla on saatavia alennuksia tai talletuksia %s %s +CompanyHasCreditNote=Tällä asiakkaalla on vielä luottomerkintöjä %s %s +CompanyHasNoAbsoluteDiscount=Asiakkaalla ei ole alennuksia saatavilla CustomerAbsoluteDiscountAllUsers=Absoluuttinen alennuksia (myöntää kaikille käyttäjille) CustomerAbsoluteDiscountMy=Absoluuttinen alennuksia (myöntää itse) -DefaultDiscount=Oletus edullisista +DefaultDiscount=Oletusalennus AvailableGlobalDiscounts=Absoluuttinen alennuksia saatavilla DiscountNone=Ei mitään Supplier=Toimittaja -CompanyList=Yritysten luettelo +CompanyList=Yritysluettelo AddContact=Lisää yhteystieto -# AddContactAddress=Add contact/address +AddContactAddress=Lisää kontakti / osoite EditContact=Muokkaa yhteystiedot / osoite -# EditContactAddress=Edit contact/address +EditContactAddress=Edit contact/address Contact=Yhteydenotto ContactsAddresses=Yhteystiedot / Osoitteet -# NoContactDefinedForThirdParty=No contact defined for this third party +NoContactDefinedForThirdParty=No contact defined for this third party NoContactDefined=Ei yhteystietoja määritelty tämän kolmannen osapuolen -DefaultContact=Oletus yhteyttä +DefaultContact=Oletus kontakti / osoite AddCompany=Lisää yritys -AddThirdParty=Lisätä kolmannen osapuolen +AddThirdParty=Lisää kolmas osapuoli DeleteACompany=Poista yrityksen PersonalInformations=Henkilötiedot AccountancyCode=Kirjanpito-koodi @@ -283,7 +284,7 @@ LastProspect=Viimeinen ProspectToContact=Esitetilaus yhteyttä CompanyDeleted=Yritys " %s" poistettu tietokannasta. ListOfContacts=Luettelo yhteystiedot -# ListOfContactsAddresses=List of contacts/adresses +ListOfContactsAddresses=List of contacts/adresses ListOfProspectsContacts=Luettelo mahdollisuus yhteystiedot ListOfCustomersContacts=Luettelo asiakkaan yhteystiedot ListOfSuppliersContacts=Luettelo toimittajan yhteystietoja @@ -302,7 +303,7 @@ NoContactForAnyProposal=Tämä yhteys ei ole yhteyttä mihinkään kaupalliseen NoContactForAnyContract=Tämä yhteys ei ole yhteyttä mihinkään sopimukseen NoContactForAnyInvoice=Tämä yhteys ei ole yhteyttä mihinkään lasku NewContact=Uusi yhteystieto -# NewContactAddress=New contact/address +NewContactAddress=New contact/address LastContacts=Viimeisin yhteystiedot MyContacts=Omat yhteystiedot Phones=Phones @@ -363,10 +364,10 @@ ExportCardToFormat=Vienti kortin muodossa ContactNotLinkedToCompany=Yhteystiedot eivät liity minkään kolmannen osapuolen DolibarrLogin=Dolibarr sisäänkirjoittautumissivuksesi NoDolibarrAccess=N: o Dolibarr pääsy -# ExportDataset_company_1=Third parties (Companies/foundations/physical people) and properties +ExportDataset_company_1=Third parties (Companies/foundations/physical people) and properties ExportDataset_company_2=Yhteystiedot ja ominaisuudet -# ImportDataset_company_1=Third parties (Companies/foundations/physical people) and properties -# ImportDataset_company_2=Contacts/Addresses (of thirdparties or not) and attributes +ImportDataset_company_1=Third parties (Companies/foundations/physical people) and properties +ImportDataset_company_2=Contacts/Addresses (of thirdparties or not) and attributes ImportDataset_company_3=Pankkitiedot PriceLevel=Hintataso DeliveriesAddress=Toimitus osoitteet @@ -399,10 +400,10 @@ UniqueThirdParties=Yhteensä ainutlaatuinen kolmannen osapuolen InActivity=Avoinna ActivityCeased=Kiinni ActivityStateFilter=Työllisyystilanne -# ProductsIntoElements=List of products into -# CurrentOutstandingBill=Current outstanding bill -# OutstandingBill=Max. for outstanding bill -# OutstandingBillReached=Reached max. for outstanding bill +ProductsIntoElements=List of products into +CurrentOutstandingBill=Current outstanding bill +OutstandingBill=Max. for outstanding bill +OutstandingBillReached=Reached max. for outstanding bill MonkeyNumRefModelDesc=Paluu numero on muodossa %syymm-nnnn asiakkaan koodi ja %syymm-nnnn luovuttajalle koodi jos VV on vuosi, mm kuukausi ja nnnn on sarja ilman taukoa eikä palata 0. LeopardNumRefModelDesc=Asiakas / toimittaja-koodi on maksuton. Tämä koodi voidaan muuttaa milloin tahansa. -# ManagingDirectors=Manager(s) name (CEO, director, president...) +ManagingDirectors=Manager(s) name (CEO, director, president...) diff --git a/htdocs/langs/fi_FI/contracts.lang b/htdocs/langs/fi_FI/contracts.lang index 335148bf138..34a4b588692 100644 --- a/htdocs/langs/fi_FI/contracts.lang +++ b/htdocs/langs/fi_FI/contracts.lang @@ -38,7 +38,7 @@ ConfirmCloseService=Oletko varma, että haluat sulkea tämän palvelun päiv ValidateAContract=Vahvista sopimus ActivateService=Ota palvelu ConfirmActivateService=Oletko varma, että haluat aktivoida tämän palvelun päivämäärä %s? -# RefContract=Contract reference +RefContract=Contract reference DateContract=Sopimuspäivä DateServiceActivate=Tiedoksiantopäivä aktivointi DateServiceUnactivate=Tiedoksiantopäivä unactivation @@ -85,10 +85,12 @@ PaymentRenewContractId=Uudista sopimus linja (numero %s) ExpiredSince=Vanhenemispäivä RelatedContracts=Liittyvien sopimusten NoExpiredServices=Ei päättynyt aktiiviset palvelut -# ListOfServicesToExpireWithDuration=List of Services to expire in %s days -# ListOfServicesToExpireWithDurationNeg=List of Services expired from more than %s days -# ListOfServicesToExpire=List of Services to expire -# NoteListOfYourExpiredServices=This list contains only services of contracts for third parties you are linked to as a sale representative. +ListOfServicesToExpireWithDuration=List of Services to expire in %s days +ListOfServicesToExpireWithDurationNeg=List of Services expired from more than %s days +ListOfServicesToExpire=List of Services to expire +NoteListOfYourExpiredServices=This list contains only services of contracts for third parties you are linked to as a sale representative. +StandardContractsTemplate=Standard contracts template +ContactNameAndSignature=For %s, name and signature: ##### Types de contacts ##### TypeContact_contrat_internal_SALESREPSIGN=Myyntiedustajaasi allekirjoittamalla sopimuksen diff --git a/htdocs/langs/fi_FI/exports.lang b/htdocs/langs/fi_FI/exports.lang index 4eb926b0f63..73c3a74893f 100644 --- a/htdocs/langs/fi_FI/exports.lang +++ b/htdocs/langs/fi_FI/exports.lang @@ -8,7 +8,7 @@ ImportableDatas=Tuoda maahan tietokokonaisuus SelectExportDataSet=Valitse tiedot, jonka haluat viedä ... SelectImportDataSet=Valitse tiedot haluat tuoda ... SelectExportFields=Valitse kentät, jonka haluat viedä tai valita ennalta vienti profil -SelectImportFields=Valitse kentät haluat tuoda, tai valitse ennalta tuonti profil +SelectImportFields=Choose source file fields you want to import and their target field in database by moving them up and down with anchor %s, or select a predefined import profile: NotImportedFields=Aihealue lähdetiedoston ei tuoda SaveExportModel=Tallenna tämä vienti profiili, jos aiot käyttää uudelleen myöhemmin ... SaveImportModel=Tallenna tämä tuonti profiili, jos aiot käyttää uudelleen myöhemmin ... @@ -64,7 +64,7 @@ ChooseFormatOfFileToImport=Valitse tiedostomuoto käyttää kuin tuoda tiedostom ChooseFileToImport=Valitse tiedosto tuoda sitten picto %s ... SourceFileFormat=Lähde tiedostomuoto FieldsInSourceFile=Toimialoja lähdetiedostoa -# FieldsInTargetDatabase=Target fields in Dolibarr database (bold=mandatory) +FieldsInTargetDatabase=Target fields in Dolibarr database (bold=mandatory) Field=Kenttä NoFields=Ei kentät MoveField=Siirrä kenttä sarakkeeseen numero %s @@ -81,7 +81,7 @@ DoNotImportFirstLine=Älä tuo ensimmäinen rivi lähdetiedoston NbOfSourceLines=Määrä riviä lähdetiedoston NowClickToTestTheImport=Tarkista tuonti parametrit olet määrittänyt. Jos ne ovat oikein, klikkaa painiketta "%s" käynnistää simulaation tuominen (eikä tietoja muuttaa tietokannan, se on vain simulaatio tällä hetkellä) ... RunSimulateImportFile=Käynnistä tuonti simulointi -FieldNeedSource=Tämä tuntuu tietokannassa vaatia tietoja lähdetiedoston +FieldNeedSource=This field requires data from the source file SomeMandatoryFieldHaveNoSource=Jotkut pakolliset kentät eivät lähde tiedosto InformationOnSourceFile=Tietoa lähdetiedosto InformationOnTargetTables=Tietoa kohde-kentät @@ -102,33 +102,33 @@ NbOfLinesImported=Rivien määrä Tuodut: %s. DataComeFromNoWhere=Arvo lisätä peräisin missään lähdetiedostoon. DataComeFromFileFieldNb=Arvoa lisää tulee kentän numero %s vuonna lähdetiedostossa. DataComeFromIdFoundFromRef=Arvo, joka tulee kentän numero %s lähteitä tiedosto voidaan löytää id vanhempi vastustaa käyttää (siis esine %s joka on viite. Lähteestä tiedosto on olemassa osaksi Dolibarr). -# DataComeFromIdFoundFromCodeId=Code that comes from field number %s of source file will be used to find id of parent object to use (So the code from source file must exists into dictionary %s). Note that if you know id, you can also use it into source file instead of code. Import should work in both cases. +DataComeFromIdFoundFromCodeId=Code that comes from field number %s of source file will be used to find id of parent object to use (So the code from source file must exists into dictionary %s). Note that if you know id, you can also use it into source file instead of code. Import should work in both cases. DataIsInsertedInto=Tiedot ovat peräisin lähteestä tiedosto lisätään seuraavilla aloilla: DataIDSourceIsInsertedInto=Id emoyhtiön esine löytyi käyttää tietoja lähdetiedoston on lisättävä seuraavilla aloilla: DataCodeIDSourceIsInsertedInto=Id vanhemman linjan löydy koodia, lisätään osaksi seuraavilla aloilla: SourceRequired=Tiedon arvo on pakollinen SourceExample=Esimerkki mahdollisesta tietojen arvo ExampleAnyRefFoundIntoElement=Jos ref löytynyt elementin %s -# ExampleAnyCodeOrIdFoundIntoDictionary=Any code (or id) found into dictionary %s +ExampleAnyCodeOrIdFoundIntoDictionary=Any code (or id) found into dictionary %s CSVFormatDesc=Pilkuin erotellut tiedostomuodossa (. Csv).
    Tämä on tekstitiedosto muodossa, jossa kentät on erotettu separaattori [%s]. Jos erotin on sisäpuolella kentän sisältöä, kenttä on pyöristetty pyöreä merkki [%s]. Escape paeta pyöreä merkki on [%s]. -# Excel95FormatDesc=Excel file format (.xls)
    This is native Excel 95 format (BIFF5). -# Excel2007FormatDesc=Excel file format (.xlsx)
    This is native Excel 2007 format (SpreadsheetML). -# TsvFormatDesc=Tab Separated Value file format (.tsv)
    This is a text file format where fields are separated by a tabulator [tab]. -# ExportFieldAutomaticallyAdded=Field %s was automatically added. It will avoid you to have similar lines to be treated as duplicate records (with this field added, all lines will own their own id and will differ). -# CsvOptions=Csv Options -# Separator=Separator -# Enclosure=Enclosure -# SuppliersProducts=Suppliers Products +Excel95FormatDesc=Excel file format (.xls)
    This is native Excel 95 format (BIFF5). +Excel2007FormatDesc=Excel file format (.xlsx)
    This is native Excel 2007 format (SpreadsheetML). +TsvFormatDesc=Tab Separated Value file format (.tsv)
    This is a text file format where fields are separated by a tabulator [tab]. +ExportFieldAutomaticallyAdded=Field %s was automatically added. It will avoid you to have similar lines to be treated as duplicate records (with this field added, all lines will own their own id and will differ). +CsvOptions=Csv Options +Separator=Separator +Enclosure=Enclosure +SuppliersProducts=Suppliers Products BankCode=Pankin koodi DeskCode=Työpöytä-koodi BankAccountNumber=Tilinumero BankAccountNumberKey=Avain -# SpecialCode=Special code -# ExportStringFilter=%% allows replacing one or more characters in the text -# ExportDateFilter='YYYY' 'YYYYMM' 'YYYYMMDD': filters by one year/month/day
    'YYYY+YYYY' 'YYYYMM+YYYYMM' 'YYYYMMDD+YYYYMMDD': filters over a range of years/months/days
    '>YYYY' '>YYYYMM' '>YYYYMMDD': filters on the following years/months/days
    '<YYYY' '<YYYYMM' '<YYYYMMDD': filters on the previous years/months/days -# ExportNumericFilter='NNNNN' filters by one value
    'NNNNN+NNNNN' filters over a range of values
    '>NNNNN' filters by lower values
    '>NNNNN' filters by higher values +SpecialCode=Special code +ExportStringFilter=%% allows replacing one or more characters in the text +ExportDateFilter='YYYY' 'YYYYMM' 'YYYYMMDD': filters by one year/month/day
    'YYYY+YYYY' 'YYYYMM+YYYYMM' 'YYYYMMDD+YYYYMMDD': filters over a range of years/months/days
    '>YYYY' '>YYYYMM' '>YYYYMMDD': filters on the following years/months/days
    '<YYYY' '<YYYYMM' '<YYYYMMDD': filters on the previous years/months/days +ExportNumericFilter='NNNNN' filters by one value
    'NNNNN+NNNNN' filters over a range of values
    '>NNNNN' filters by lower values
    '>NNNNN' filters by higher values ## filters -# SelectFilterFields=If you want to filter on some values, just input values here. -# FilterableFields=Champs Filtrables -# FilteredFields=Filtered fields -# FilteredFieldsValues=Value for filter +SelectFilterFields=If you want to filter on some values, just input values here. +FilterableFields=Champs Filtrables +FilteredFields=Filtered fields +FilteredFieldsValues=Value for filter diff --git a/htdocs/langs/fi_FI/holiday.lang b/htdocs/langs/fi_FI/holiday.lang index 9b84235f47d..45287c46ec2 100644 --- a/htdocs/langs/fi_FI/holiday.lang +++ b/htdocs/langs/fi_FI/holiday.lang @@ -8,7 +8,6 @@ NotActiveModCP=Sinun täytyy aktivoida lomat -moduuli nähdäksesi tämän sivun NotConfigModCP=You must configure the module holidays to view this page. To do this, click here . NoCPforUser=Sinulla ei ole voimassa olevaa lomatoivomusta. AddCP=Apply for holidays -CPErrorSQL=An SQL error occurred: Employe=Työntekijä DateDebCP=Aloituspäivämäärä DateFinCP=Lopetuspäivä diff --git a/htdocs/langs/fi_FI/languages.lang b/htdocs/langs/fi_FI/languages.lang index 839f5f6c5f7..5327fc06efc 100644 --- a/htdocs/langs/fi_FI/languages.lang +++ b/htdocs/langs/fi_FI/languages.lang @@ -19,6 +19,7 @@ Language_en_SA=Englanti (Saudi-Arabia) Language_en_US=Englanti (Yhdysvallat) Language_en_ZA=Englanti (Etelä-Afrikka) Language_es_ES=Espanjalainen +Language_es_DO=Spanish (Dominican Republic) Language_es_AR=Espanja (Argentiina) Language_es_CL=Spanish (Chile) Language_es_HN=Espanja (Honduras) @@ -38,6 +39,7 @@ Language_fr_NC=Ranskan (Uusi-Kaledonia) Language_he_IL=Heprea Language_hr_HR=Kroaatti Language_hu_HU=Unkari +Language_id_ID=Indonesian Language_is_IS=Islannin Language_it_IT=Italialainen Language_ja_JP=Japanin kieli diff --git a/htdocs/langs/fi_FI/mails.lang b/htdocs/langs/fi_FI/mails.lang index 1e962682172..cbaac35666d 100644 --- a/htdocs/langs/fi_FI/mails.lang +++ b/htdocs/langs/fi_FI/mails.lang @@ -79,6 +79,7 @@ MailtoEMail=Hyper link to email ActivateCheckRead=Allow to use the "Unsubcribe" link ActivateCheckReadKey=Key use to encrypt URL use for "Read Receipt" and "Unsubcribe" feature EMailSentToNRecipients=EMail sent to %s recipients. +XTargetsAdded=%s recipients added into target list EachInvoiceWillBeAttachedToEmail=A document using default invoice document template will be created and attached to each email. MailTopicSendRemindUnpaidInvoices=Reminder of invoice %s (%s) SendRemind=Send reminder by EMails diff --git a/htdocs/langs/fi_FI/main.lang b/htdocs/langs/fi_FI/main.lang index ef26ab9896c..d4566acefd1 100644 --- a/htdocs/langs/fi_FI/main.lang +++ b/htdocs/langs/fi_FI/main.lang @@ -22,9 +22,9 @@ FormatDateHourShort=%d.%m.%Y %H.%M FormatDateHourSecShort=%m/%d/%Y %I:%M:%S %p FormatDateHourTextShort=%d. %b %Y %H.%M FormatDateHourText=%d. %B %Y %H.%M -DatabaseConnection=Tietokannan yhteydessä -NoTranslation=No translation -NoRecordFound=No record found +DatabaseConnection=Tietokantayhteys +NoTranslation=Ei käännöstä +NoRecordFound=Tietueita ei löytynyt NoError=Ei virheitä Error=Virhe ErrorFieldRequired=Kenttä '%s' on @@ -60,8 +60,8 @@ ErrorNoSocialContributionForSellerCountry=Virhe, ei sosiaaliturvamaksujen tyyppi ErrorFailedToSaveFile=Virhe, ei tallenna tiedosto. ErrorOnlyPngJpgSupported=Virhe vain. Png-ja. Jpg-kuvien muoto tiedosto ovat tuettuja. ErrorImageFormatNotSupported=Sinun PHP ei tue toimintoja muuntaa kuvia tätä muotoa. -SetDate=Set date -SelectDate=Select a date +SetDate=Aseta päivä +SelectDate=Valitse päivä SeeAlso=See also %s BackgroundColorByDefault=Default taustaväri FileWasNotUploaded=Tiedosto on valittu liite mutta ei ollut vielä ladattu. Klikkaa "Liitä tiedosto" tätä. @@ -76,16 +76,16 @@ DefinedAndHasThisValue=Määritelty ja arvo IsNotDefined=undefined DolibarrInHttpAuthenticationSoPasswordUseless=Dolibarr authentication tila on asetettu %s configuration file conf.php.
    Tämä tarkoittaa sitä, että salasana tietokannan extern on Dolibarr, joten muuttuvat tällä alalla voi olla mitään vaikutuksia. Administrator=Administrator -Undefined=Undefined +Undefined=Määrittelemätön PasswordForgotten=Salasana unohtunut? SeeAbove=Katso edellä -HomeArea=Etusivu alueella +HomeArea=Etusivu alue LastConnexion=Viimeisin yhteys PreviousConnexion=Edellinen yhteydessä ConnectedOnMultiCompany=Connected on kokonaisuus ConnectedSince=Sidossuhteessa koska AuthenticationMode=Todentamisjärjestelmien tilassa -RequestedUrl=Pyydettyä URL-osoitetta +RequestedUrl=Pyydetty URL-osoite DatabaseTypeManager=Database Type Manager RequestLastAccess=Pyyntö viime tietokantaan pääsy RequestLastAccessInError=Pyyntö viime tietokantaan pääsy virhe @@ -94,7 +94,7 @@ InformationLastAccessInError=Tietoja viimeksi tietokantaan pääsy virhe DolibarrHasDetectedError=Dolibarr on havaittu tekninen virhe InformationToHelpDiagnose=Tämä on tietoja, joiden avulla voidaan diagnosoida MoreInformation=Lisätietoa -TechnicalInformation=Technical information +TechnicalInformation=Tekniset tiedot NotePublic=Huomautus (julkinen) NotePrivate=Huomautus (yksityinen) PrecisionUnitIsLimitedToXDecimals=Dolibarr oli asetettu raja tarkkuus yksikköhinnat %s desimaalit. @@ -138,9 +138,9 @@ Resiliate=Resiliate Cancel=Peruuta Modify=Muokkaa Edit=Muokkaa -Validate=Validate +Validate=Vahvista ToValidate=Validoida -Save=Tallentaa +Save=Tallenna SaveAs=Tallenna nimellä TestConnection=Testaa yhteys ToClone=Klooni @@ -148,21 +148,21 @@ ConfirmClone=Valitse tietoja haluat klooni: NoCloneOptionsSpecified=Ei tietoja kloonata määritelty. Of=ja Go=Go -Run=Run -CopyOf=Jäljennös -Show=Näyttää -ShowCardHere=Näytä kortin +Run=Suorita +CopyOf=Kopio +Show=Näytä +ShowCardHere=Näytä kortti Search=Haku -SearchOf=Etsi +SearchOf=Haku Valid=Voimassa Approve=Hyväksy -ReOpen=Re-Open +ReOpen=Avaa uudelleen Upload=Lähetä tiedosto -ToLink=Link +ToLink=Linkki Select=Valitse Choose=Valitse ChooseLangage=Valitse kieli -Resize=Asua +Resize=Muuta kokoa Recenter=Keskitä Author=Laatija User=Käyttäjä @@ -170,75 +170,75 @@ Users=Käyttäjät Group=Ryhmä Groups=Ryhmät Password=Salasana -PasswordRetype=Kirjoittaa uudelleen salasana +PasswordRetype=Kirjoitta salasana uudelleen NoteSomeFeaturesAreDisabled=Huomaa, että monet piirteet / modules on poistettu käytöstä tämän esittelyn. Name=Nimi Person=Henkilö Parameter=Parametri Parameters=Parametrit -Value=Value -GlobalValue=Maapallon arvo -PersonalValue=Henkilökohtaiset arvo +Value=Arvo +GlobalValue=Yleinen arvo +PersonalValue=Henkilökohtainen arvo NewValue=Uusi arvo -CurrentValue=Käypä arvo +CurrentValue=Nykyinen arvo Code=Koodi Type=Tyyppi Language=Kieli -MultiLanguage=Multi-language +MultiLanguage=Monikielisyys Note=Huomautus CurrentNote=Nykyinen merkintä Title=Otsikko -Label=Label -RefOrLabel=Ref. tai etiketissä +Label=Etiketti +RefOrLabel=Viite tai etiketissä Info=Kirjaudu Family=Perhe Description=Kuvaus Designation=Kuvaus Model=Malli -DefaultModel=Oletus malli -Action=Toimi -About=Noin +DefaultModel=Oletusmalli +Action=Tapahtuma +About=Tietoa Number=Numero -NumberByMonth=Numero kuukausittain +NumberByMonth=Numeroa kuukausittain AmountByMonth=Määrä kuukausittain Numero=Numero -Limit=Limit +Limit=Raja Limits=Rajat -DevelopmentTeam=Development Team +DevelopmentTeam=Kehitystiimi Logout=Uloskirjaus NoLogoutProcessWithAuthMode=No applicative disconnect feature with authentication mode %s Connection=Yhteys -Setup=Setup -Alert=Alert +Setup=Asetukset +Alert=Hälytys Previous=Edellinen Next=Seuraava Cards=Kortit -Card=Card +Card=Kortti Now=Nyt -Date=Päivämäärä -DateStart=Päiväys aloittaa -DateEnd=Voimassaolo päättyy -DateCreation=Luontipäivämäärä -DateModification=Muutospäivämäärän -DateModificationShort=Modif. päivämäärä -DateLastModification=Viimeisin muutospäivämäärän -DateValidation=Validointi päivämäärä -DateClosing=Tilinpäätöspäivänä +Date=Päivä +DateStart=Alkaen +DateEnd=Päättyen +DateCreation=Luotu +DateModification=Muokattu +DateModificationShort=Muokattu +DateLastModification=Muokattu viimeksi +DateValidation=Vahvistettu +DateClosing=Suljettu DateDue=Eräpäivä DateValue=Arvopäivä DateValueShort=Arvopäivä -DateOperation=Operaatio päivämäärä -DateOperationShort=Ope. Päivämäärä -DateLimit=Raja-päivämäärä -DateRequest=Pyydä päivämäärä -DateProcess=Process päivämäärä -DatePlanShort=Päiväys höylätty -DateRealShort=Päiväys todellinen. +DateOperation=Operaatiopäivä +DateOperationShort=Operaatiopäivä +DateLimit=Rajapäivä +DateRequest=Pyydetty +DateProcess=Käsitelty +DatePlanShort=Suunniteltu +DateRealShort=Todellinen DateBuild=Raportti rakentaa päivämäärä DatePayment=Maksupäivä DurationYear=vuosi -DurationMonth=kuukauden -DurationWeek=viikolla +DurationMonth=kuukausi +DurationWeek=viikko DurationDay=päivä DurationYears=vuotta DurationMonths=kuukautta @@ -249,26 +249,26 @@ Month=Kuukausi Week=Viikko Day=Päivä Hour=H -Minute=Minute -Second=Toiseksi -Years=Vuodet +Minute=Minuutti +Second=Sekunti +Years=Vuotta Months=Kuukautta Days=Päivää days=päivää Hours=Tuntia -Minutes=Pöytäkirjat -Seconds=Seconds +Minutes=Minuuttia +Seconds=Sekuntia Today=Tänään -Yesterday=Eilinen +Yesterday=Eilen Tomorrow=Huomenna -Morning=Morning -Afternoon=Afternoon +Morning=Aamu +Afternoon=Iltapäivä Quadri=Quadri -MonthOfDay=Kuukauden päivä +MonthOfDay=Kuukaudenpäivä HourShort=H Rate=Kurssi -UseLocalTax=Include tax -Bytes=Bytes +UseLocalTax=Sisältää veron +Bytes=Tavua KiloBytes=Kilotavua MegaBytes=Megatavua GigaBytes=Gigatavua @@ -278,12 +278,12 @@ Kb=Kb Mb=Mb Gb=Gb Tb=Tb -Cut=Leikata +Cut=Leikkaa Copy=Kopioi Paste=Liitä Default=Oletus DefaultValue=Oletusarvo -DefaultGlobalValue=Maapallon arvo +DefaultGlobalValue=Yleisarvo Price=Hinta UnitPrice=Yksikköhinta UnitPriceHT=Yksikköhinta (netto) @@ -293,43 +293,43 @@ PriceUHT=UP (netto) PriceUTTC=UP Amount=Määrä AmountInvoice=Laskun summa -AmountPayment=Maksusumma +AmountPayment=Maksun summa AmountHTShort=Määrä (netto) AmountTTCShort=Määrä (sis. alv) AmountHT=Määrä (ilman veroja) AmountTTC=Määrä (sis. alv) -AmountVAT=Määrä alv -AmountLT1=Amount tax 2 -AmountLT2=Amount tax 3 +AmountVAT=Verot +AmountLT1=Verot 2 +AmountLT2=Verot 3 AmountLT1ES=Määrä RE AmountLT2ES=Määrä IRPF -AmountTotal=Kokonaismäärä +AmountTotal=Yhteissumma AmountAverage=Keskimääräinen summa PriceQtyHT=Hinta tämä määrä (ilman veroja) PriceQtyMinHT=Hinta määrä min. (ilman veroja) PriceQtyTTC=Hinta tämän määrän (sis. alv) PriceQtyMinTTC=Hinta määrä min. (sis. vero) -Percentage=Pourcentage +Percentage=Prosenttia Total=Yhteensä -SubTotal=Yhteensä +SubTotal=Välisumma TotalHTShort=Yhteensä (netto) TotalTTCShort=Yhteensä (sis. alv) TotalHT=Yhteensä (ilman veroja) -TotalHTforthispage=Total (net of tax) for this page +TotalHTforthispage=Yhteensä (veroton) tällä sivulla TotalTTC=Yhteensä (sis. alv) -TotalTTCToYourCredit=Yhteensä (sis. alv) on luottorajasi -TotalVAT=Yhteensä alv -TotalLT1=Total tax 2 -TotalLT2=Total tax 3 +TotalTTCToYourCredit=Yhteensä (sis. alv) on luotollesi +TotalVAT=Verot yhteensä +TotalLT1=Verot yhteensä 2 +TotalLT2=Verot yhteensä 3 TotalLT1ES=Yhteensä RE TotalLT2ES=Yhteensä IRPF IncludedVAT=Mukana alv -HT=Verottomia +HT=Veroton TTC=Sis. alv VAT=Alv LT1ES=RE LT2ES=IRPF -VATRate=Alv +VATRate=Veroaste Average=Keskimääräinen Sum=Sum Delta=Delta @@ -341,33 +341,33 @@ Statistics=Tilastot OtherStatistics=Muut tilastot Status=Tila ShortInfo=Info. -Ref=Ref. -RefSupplier=Ref. toimittaja -RefPayment=Ref. maksu -CommercialProposalsShort=Kaupalliset ehdotuksia +Ref=Viite +RefSupplier=Toimittajan viite +RefPayment=Maksun viite +CommercialProposalsShort=Kaupalliset ehdotukset Comment=Kommentti Comments=Kommentit -ActionsToDo=Toimet tehdä -ActionsDone=Toimet tehnyt -ActionsToDoShort=Voit tehdä -ActionsRunningshort=Started -ActionsDoneShort=Tehty +ActionsToDo=Tehtävät +ActionsDone=Tehdyt +ActionsToDoShort=Tehtävät +ActionsRunningshort=Aloitettu +ActionsDoneShort=Valmis ActionNotApplicable=Ei sovelleta -ActionRunningNotStarted=Ei aloitettu -ActionRunningShort=Started -ActionDoneShort=Päättynyt +ActionRunningNotStarted=Aloitetaan +ActionRunningShort=Aloitettu +ActionDoneShort=Päättetty CompanyFoundation=Yritys / säätiö -ContactsForCompany=Yhteystietoja tämän kolmannen osapuolen -ContactsAddressesForCompany=Contacts/addresses for this third party -AddressesForCompany=Addresses for this third party -ActionsOnCompany=Toimet tästä kolmannen osapuolen -ActionsOnMember=Tapahtumia tästä jäseneksi -NActions=%s toimet -NActionsLate=%s myöhään +ContactsForCompany=Sidosryhmien yhteystiedot +ContactsAddressesForCompany=Sidosryhmien kontaktit/osoitteet +AddressesForCompany=Sidosryhmien osoitteet +ActionsOnCompany=Sidosryhmien tapahtumat +ActionsOnMember=Jäsenen tapahtumat +NActions=%s tapahtumat +NActionsLate=%s myöhässä Filter=Suodata RemoveFilter=Poista suodatin -ChartGenerated=Kuvio syntyy -ChartNotGenerated=Kuvio ei ole tuotettu +ChartGenerated=Luo kuvio +ChartNotGenerated=Kuviota ei ole luotu GeneratedOn=Rakenna %s Generate=Luo Duration=Kesto @@ -375,9 +375,9 @@ TotalDuration=Kokonaiskesto Summary=Yhteenveto MyBookmarks=Omat kirjanmerkit OtherInformationsBoxes=Muut tiedot laatikot -DolibarrBoard=Dolibarr aluksella +DolibarrBoard=Dolibarr pöytä DolibarrStateBoard=Tilastot -DolibarrWorkBoard=Työtehtäviä aluksella +DolibarrWorkBoard=Työtehtäväpöytä Available=Saatavissa NotYetAvailable=Ei vielä saatavilla NotAvailable=Ei saatavilla @@ -394,42 +394,42 @@ Others=Muut OtherInformations=Muut tiedot Quantity=Määrä Qty=Kpl -ChangedBy=Muutettu -ReCalculate=Recalculate +ChangedBy=Muuttanut +ReCalculate=Laske uudelleen ResultOk=Onnistuminen -ResultKo=Vika +ResultKo=Virhe Reporting=Raportointi Reportings=Raportointi Draft=Vedos -Drafts=Drafts -Validated=Validoidut +Drafts=Vedokset +Validated=Vahvistetut Opened=Avoinna New=Uusi -Discount=Discount +Discount=Alennus Unknown=Tuntematon -General=Yleistä +General=Yleiset Size=Koko -Received=Vastatut -Paid=Maksetaan +Received=Vastaanotetut +Paid=Maksetut Topic=SUJET -ByCompanies=Yritykset -ByUsers=Käyttäjien +ByCompanies=Sidosryhmittäin +ByUsers=Käyttäjittäin Links=Linkit Link=Linkki Receipts=Kuitit -Rejects=Hylkää +Rejects=Hylkäykset Preview=Esikatselu NextStep=Seuraava askel PreviousStep=Edellinen vaihe -Datas=Datas +Datas=Tiedot None=Ei mitään NoneF=Ei mitään -Late=Myöhäinen +Late=Myöhässä Photo=Kuva -Photos=Kuvia +Photos=Kuvat AddPhoto=Lisää kuva Login=Kirjautuminen -CurrentLogin=Nykyinen kirjautumistunnuksesi +CurrentLogin=Nykyinen kirjautuminen January=Tammikuu February=Helmikuu March=Maaliskuu @@ -444,7 +444,7 @@ November=Marraskuu December=Joulukuu JanuaryMin=Tammikuu FebruaryMin=Helmikuu -MarchMin=Mar +MarchMin=Maaliskuu AprilMin=Huhtikuu MayMin=Toukokuu JuneMin=Kesäkuu @@ -474,72 +474,72 @@ MonthShort05=toukokuu MonthShort06=kesäkuu MonthShort07=heinäkuu MonthShort08=elokuu -MonthShort09=sep +MonthShort09=syyskuu MonthShort10=lokakuu MonthShort11=marraskuu MonthShort12=joulukuu AttachedFiles=Liitetyt tiedostot ja asiakirjat -FileTransferComplete=Tiedosto on ladattu onnistui +FileTransferComplete=Tiedoston lataus onnistui DateFormatYYYYMM=VVVV-KK DateFormatYYYYMMDD=VVVV-KK-PP -DateFormatYYYYMMDDHHMM=YYYY-MM-DD HH: SS +DateFormatYYYYMMDDHHMM=YYYY-KK-PP HH: SS ReportName=Raportin nimi ReportPeriod=Raportointikausi ReportDescription=Kuvaus Report=Raportti Keyword=Mot cl Legend=Legend -FillTownFromZip=Täytä kaupunki zip -Fill=Fill -Reset=Reset +FillTownFromZip=Täytä postitoimipaikka postinumerosta +Fill=Täytä +Reset=Nollaa ShowLog=Näytä loki File=Tiedosto Files=Tiedostot NotAllowed=Ei sallittu -ReadPermissionNotAllowed=Lue lupaa ei saa -AmountInCurrency=Määrä %s valuutta +ReadPermissionNotAllowed=Lukuoikeutta ei sallita +AmountInCurrency=Määrä %s valuutassa Example=Esimerkki Examples=Esimerkkejä -NoExample=Ei esimerkiksi -FindBug=Report a bug -NbOfThirdParties=Useiden kolmansien osapuolten +NoExample=Ei esimerkkiä +FindBug=Ilmoita virheestä +NbOfThirdParties=Sidosryhmien määrä NbOfCustomers=Asiakkaiden määrä -NbOfLines=Rivien -NbOfObjects=Numero esineitä -NbOfReferers=Lukumäärä viittaajan -Referers=Viittaajan +NbOfLines=Rivien määrä +NbOfObjects=Kohteiden määrä +NbOfReferers=Viittaajien määrä +Referers=Kulutus TotalQuantity=Kokonaismäärä DateFromTo=Kohteesta %s %s DateFrom=Kohteesta %s DateUntil=Vasta %s Check=Shekki Internal=Sisäinen -External=Ulkopuolinen +External=Ulkoinen Internals=Sisäinen -Externals=Ulkopuolinen +Externals=Ulkoinen Warning=Varoitus -Warnings=Vaaratasot +Warnings=Varoitukset BuildPDF=Rakenna PDF -RebuildPDF=Rebuild PDF -BuildDoc=Rakenna Asiak -RebuildDoc=Rebuild Asiak -Entity=Entity -Entities=Yksiköt +RebuildPDF=Uudelleenrakenna PDF +BuildDoc=Rakenna dokumentti +RebuildDoc=Uudelleenrakenna dokumentti +Entity=Ympäristö +Entities=Ympäristöt EventLogs=Lokit -CustomerPreview=Asiakas esikatselu -SupplierPreview=Toimittaja esikatselu +CustomerPreview=Asiakkaan esikatselu +SupplierPreview=Toimittajan esikatselu AccountancyPreview=Kirjanpidon esikatselu -ShowCustomerPreview=Näytä asiakas esikatselu -ShowSupplierPreview=Näytä toimittaja esikatselu +ShowCustomerPreview=Näytä asiakkaan esikatselu +ShowSupplierPreview=Näytä toimittajan esikatselu ShowAccountancyPreview=Näytä kirjanpitotietojen esikatselu -ShowProspectPreview=Näytä mahdollisuus esikatsella -RefCustomer=Ref. asiakas +ShowProspectPreview=Näytä mahdollisuuden esikatselu +RefCustomer=Asiakasviite Currency=Valuutta InfoAdmin=Tietoja järjestelmänvalvojille Undo=Kumoa -Redo=Redo +Redo=Toista ExpandAll=Laajenna kaikki -UndoExpandAll=Kumoa laajentaa +UndoExpandAll=Kumoa laajentaminen Reason=Syy FeatureNotYetSupported=Ominaisuus ei vielä tue CloseWindow=Sulje ikkuna @@ -547,10 +547,11 @@ Question=Kysymys Response=Vastaus Priority=Prioriteetti SendByMail=Lähetä sähköpostilla -MailSentBy=Sähköposti lähetetään -TextUsedInTheMessageBody=Sähköposti elin +MailSentBy=Sähköpostin lähetti +TextUsedInTheMessageBody=Sähköpostiviesti SendAcknowledgementByMail=Lähetä Ack. sähköpostitse NoEMail=Ei sähköpostia +NoMobilePhone=Ei matkapuhelinta Owner=Omistaja DetectedVersion=Tunnistettu versio FollowingConstantsWillBeSubstituted=Seuraavat vakiot voidaan korvata ja vastaava arvo. @@ -559,73 +560,73 @@ BackToList=Palaa luetteloon GoBack=Mene takaisin CanBeModifiedIfOk=Voidaan muuttaa, jos voimassa CanBeModifiedIfKo=Voidaan muuttaa, jos ei kelpaa -RecordModifiedSuccessfully=Record muunnettu onnistuneesti -RecordsModified=%s records modified +RecordModifiedSuccessfully=Tietue muunnettu onnistuneesti +RecordsModified=%s tietuetta muokattu AutomaticCode=Automaattinen koodi -NotManaged=Ole onnistunut +NotManaged=Ei hallittu FeatureDisabled=Ominaisuus pois päältä MoveBox=Siirrä ruutuun %s -Offered=Vapaa +Offered=Tarjottu NotEnoughPermissions=Sinulla ei ole lupaa tätä toimintaa varten -SessionName=Session nimi +SessionName=Istunnon nimi Method=Menetelmä Receive=Vastaanota PartialWoman=Osittainen PartialMan=Osittainen TotalWoman=Yhteensä TotalMan=Yhteensä -NeverReceived=Koskaan saanut +NeverReceived=Ei ole saapunut Canceled=Peruutettu YouCanChangeValuesForThisListFromDictionarySetup=You can change values for this list from menu setup - dictionary Color=Väri Documents=Linkitettyjä tiedostoja -DocumentsNb=Linkitettyä kuvaa (%s) +DocumentsNb=Linkitetyt tiedostot (%s) Documents2=Asiakirjat -BuildDocuments=Muodostettu asiakirjat -UploadDisabled=Lähetä vammaisten +BuildDocuments=Muodostettu asiakirjoja +UploadDisabled=Lähetys pois käytöstä MenuECM=Asiakirjat MenuAWStats=AWStats MenuMembers=Jäsenet -MenuAgendaGoogle=Google asialistalla +MenuAgendaGoogle=Google agenda ThisLimitIsDefinedInSetup=Dolibarr raja (Valikko koti-setup-turvallisuus): %s Kb, PHP raja: %s Kb -NoFileFound=No documents tallennetaan tähän hakemistoon +NoFileFound=Ei asiakirjoja tallennettuna tähän hakemistoon CurrentUserLanguage=Nykyinen kieli CurrentTheme=Nykyinen teema -CurrentMenuManager=Current menu manager -DisabledModules=Disabled modules +CurrentMenuManager=Nykyinen valikkohallinta +DisabledModules=Ei käytössä olevat moduulit For=Saat ForCustomer=Asiakkaan Signature=Allekirjoitus -HidePassword=Show käskyllä salasanalla piilossa -UnHidePassword=Näytä todellinen komento selkeät salasana +HidePassword=Näytä komento salasana piilotettuna +UnHidePassword=Näytä todellinen komento salasana näkyen Root=Juuri -Informations=Informations -Page=Page -Notes=Huomautuksia -AddNewLine=Lisää uusi linja +Informations=Informaatiot +Page=Sivu +Notes=Huomiot +AddNewLine=Lisää uusi rivi AddFile=Lisää tiedosto ListOfFiles=Luettelo saatavilla olevista tiedostoista -FreeZone=Free entry -FreeLineOfType=Free entry of type +FreeZone=Vapaa pääsy +FreeLineOfType=Ilmaisen pääsyn tyyppi CloneMainAttributes=Klooni objekti sen tärkeimmät attribuutit PDFMerge=PDF Merge Merge=Merge PrintContentArea=Näytä sivu tulostaa päävalikkoon alue -MenuManager=Menu manager -NoMenu=Ei alivalikko +MenuManager=Valikkomanageri +NoMenu=Ei alivalikkoa WarningYouAreInMaintenanceMode=Varoitus, olet ylläpitotilassa, joten vain kirjautunut %s saa käyttää hakemuksen tällä hetkellä. -CoreErrorTitle=System error -CoreErrorMessage=Anteeksi, virhe. Tarkista lokit tai ota yhteyttä järjestelmänvalvojaan. +CoreErrorTitle=Järjestelmävirhe +CoreErrorMessage=Tapahtui virhe. Tarkista lokit tai ota yhteyttä järjestelmänvalvojaan. CreditCard=Luottokortti FieldsWithAreMandatory=Tähdellä %s ovat pakollisia -FieldsWithIsForPublic=Tähdellä %s näkyvät julkisen jäsenluettelo. Jos et halua tätä, tarkista "julkinen"-kenttään. +FieldsWithIsForPublic=Tähdellä %s näkyvät julkisessa jäsenluettelossa. Jos et halua tätä, poista valinta "julkinen"-kentästä. AccordingToGeoIPDatabase=(Mukaan GeoIP muuntaminen) Line=Rivi NotSupported=Ei tuettu RequiredField=Pakollinen kenttä Result=Tulos ToTest=Testi -ValidateBefore=Kortti on validoitava ennen tämän toiminnon +ValidateBefore=Kortti on vahvistettava ennen toiminnon käyttöä Visibility=Näkyvyys Private=Yksityinen Hidden=Kätketty @@ -635,44 +636,44 @@ Prefix=Etuliite Before=Ennen After=Jälkeen IPAddress=IP-osoite -Frequency=Taajuus +Frequency=Toistuvuus IM=Pikaviestit NewAttribute=Uusi ominaisuus -AttributeCode=Ominaisuuden code -OptionalFieldsSetup=Extra ominaisuuksia setup -URLPhoto=Url on kuva / logo -SetLinkToThirdParty=Linkki toiselle kolmannelle osapuolelle +AttributeCode=Ominaisuuden koodi +OptionalFieldsSetup=Lisäominaisuuksien asetukset +URLPhoto=Kuvan tai logon url +SetLinkToThirdParty=Linkki toiseen sidosryhmään CreateDraft=Luo luonnos -ClickToEdit=Klikkaa Muokkaa -ObjectDeleted=Object %s poistettu +ClickToEdit=Klikkaa muokataksesi +ObjectDeleted=Kohde %s poistettu ByCountry=Maittain -ByTown=By kaupunki +ByTown=Postitoimipaikoittain ByDate=Päivämäärän mukaan -ByMonthYear=Kun kuukausi / vuosi -ByYear=By vuosi -ByMonth=kuukausittain -ByDay=Päivällä -BySalesRepresentative=By myyntiedustaja -LinkedToSpecificUsers=Linked to a particular user contact -DeleteAFile=Delete a file -ConfirmDeleteAFile=Are you sure you want to delete file -NoResults=No results -ModulesSystemTools=Modules tools -Test=Test -Element=Element -NoPhotoYet=No pictures available yet -HomeDashboard=Home summary +ByMonthYear=Kuukauden / vuoden mukaan +ByYear=Vuoden mukaan +ByMonth=Kuukauden mukaan +ByDay=Päivän mukaan +BySalesRepresentative=Myyntiedustajittain +LinkedToSpecificUsers=Linkitetty käyttäjätietoon +DeleteAFile=Poista tiedosto +ConfirmDeleteAFile=Haluatko varmasti poistaa tiedoston +NoResults=Ei tuloksia +ModulesSystemTools=Moduuli työkalut +Test=Testi +Element=Osa +NoPhotoYet=Ei kuvaa saatavilla vielä +HomeDashboard=Kotiyhteenveto Deductible=Deductible from=from -toward=toward -Access=Access -HelpCopyToClipboard=Use Ctrl+C to copy to clipboard +toward=eteenpäin +Access=Käyttöoikeus +HelpCopyToClipboard=Käytä Ctrl+C kopioisaksesi leikepöydälle SaveUploadedFileWithMask=Save file on server with name "%s" (otherwise "%s") -OriginFileName=Original filename -SetDemandReason=Set source -ViewPrivateNote=View notes -XMoreLines=%s line(s) hidden -PublicUrl=Public URL +OriginFileName=Alkuperäinen tiedostonimi +SetDemandReason=Aseta lähde +ViewPrivateNote=Katso huomiot +XMoreLines=%s rivi(ä) piilossa +PublicUrl=Julkinen URL # Week day Monday=Maanantai @@ -682,24 +683,24 @@ Thursday=Torstai Friday=Perjantai Saturday=Lauantai Sunday=Sunnuntai -MondayMin=Mo -TuesdayMin=Tu -WednesdayMin=Me -ThursdayMin=Th -FridayMin=Fr -SaturdayMin=Sa +MondayMin=Ma +TuesdayMin=TI +WednesdayMin=Ke +ThursdayMin=To +FridayMin=Pe +SaturdayMin=La SundayMin=Su Day1=Maanantai Day2=Tiistai Day3=Keskiviikko Day4=Torstai Day5=Perjantai -Day6=Lau +Day6=Lauantai Day0=Sunnuntai -ShortMonday=M -ShortTuesday=T -ShortWednesday=W -ShortThursday=T -ShortFriday=F -ShortSaturday=S -ShortSunday=S +ShortMonday=MA +ShortTuesday=TI +ShortWednesday=KE +ShortThursday=TO +ShortFriday=PE +ShortSaturday=LA +ShortSunday=SU diff --git a/htdocs/langs/fi_FI/products.lang b/htdocs/langs/fi_FI/products.lang index 5cf3a388d75..9163fdf5791 100644 --- a/htdocs/langs/fi_FI/products.lang +++ b/htdocs/langs/fi_FI/products.lang @@ -28,8 +28,10 @@ ProductsAndServicesStatistics=Tuotteet ja palvelut tilastojen ProductsStatistics=Tuotteet tilastot ProductsOnSell=Tuotteita myyvät ProductsNotOnSell=Tuotteet pois myydä +ProductsOnSellAndOnBuy=Products not for sale nor purchase ServicesOnSell=Palvelut myydä ServicesNotOnSell=Palvelut pois myydä +ServicesOnSellAndOnBuy=Services not for sale nor purchase InternalRef=Kertomus LastRecorded=Uusimmat tuotteet / palvelut myydä kirjataan LastRecordedProductsAndServices=Viimeisin %s kirjataan tuotteet / palvelut @@ -70,6 +72,8 @@ PublicPrice=Julkiset hinta CurrentPrice=Nykyinen hinta NewPrice=Uusi hinta MinPrice=Puolinuotti. myyntihinta +MinPriceHT=Minim. selling price (net of tax) +MinPriceTTC=Minim. selling price (inc. tax) CantBeLessThanMinPrice=Myyntihinta ei voi olla pienempi kuin pienin sallittu tämän tuotteen ( %s ilman veroja) ContractStatus=Sopimus asema ContractStatusClosed=Suljettu @@ -179,6 +183,7 @@ ProductIsUsed=Tämä tuote on käytetty NewRefForClone=Ref. uuden tuotteen tai palvelun CustomerPrices=Asiakkaat hinnat SuppliersPrices=Toimittajat hinnat +SuppliersPricesOfProductsOrServices=Suppliers prices (of products or services) CustomCode=Tullikoodeksi CountryOrigin=Alkuperä maa HiddenIntoCombo=Piilotettu osaksi valitse listat @@ -208,6 +213,7 @@ CostPmpHT=Net total VWAP ProductUsedForBuild=Auto consumed by production ProductBuilded=Production completed ProductsMultiPrice=Product multi-price +ProductsOrServiceMultiPrice=Customers prices (of products or services, multi-prices) ProductSellByQuarterHT=Products turnover quarterly VWAP ServiceSellByQuarterHT=Services turnover quarterly VWAP Quarter1=1st. Quarter diff --git a/htdocs/langs/fi_FI/shop.lang b/htdocs/langs/fi_FI/shop.lang index e268553e56d..cef02012db1 100644 --- a/htdocs/langs/fi_FI/shop.lang +++ b/htdocs/langs/fi_FI/shop.lang @@ -1,4 +1,5 @@ # Dolibarr language file - Source file is en_US - shop +FailedConnectDBCheckModuleSetup=Failed to connect to oscommerce database. Check your module setup Shop=Shop ShopWeb=Web Shop LastOrders=Viimeisin tilaukset diff --git a/htdocs/langs/fi_FI/stocks.lang b/htdocs/langs/fi_FI/stocks.lang index e2172c3c398..8635395d4fb 100644 --- a/htdocs/langs/fi_FI/stocks.lang +++ b/htdocs/langs/fi_FI/stocks.lang @@ -112,6 +112,7 @@ ReplenishmentOrdersDesc=This is list of all opened supplier orders Replenishments=Replenishments NbOfProductBeforePeriod=Quantity of product %s in stock before selected period (< %s) NbOfProductAfterPeriod=Quantity of product %s in stock after selected period (> %s) +MassMovement=Mass movement MassStockMovement=Mass stock movement SelectProductInAndOutWareHouse=Select a product, a quantity, a source warehouse and a target warehouse, then click "%s". Once this is done for all required movements, click onto "%s". RecordMovement=Record transfert diff --git a/htdocs/langs/fi_FI/suppliers.lang b/htdocs/langs/fi_FI/suppliers.lang index 22276d31e3d..137e021fd2a 100644 --- a/htdocs/langs/fi_FI/suppliers.lang +++ b/htdocs/langs/fi_FI/suppliers.lang @@ -3,19 +3,19 @@ Suppliers=Tavarantoimittajat Supplier=Toimittaja AddSupplier=Lisää toimittaja SupplierRemoved=Toimittaja poistettu -SuppliersInvoice=Tavarantoimittajat lasku -NewSupplier=Uuden toimittajan +SuppliersInvoice=Tavarantoimittajan lasku +NewSupplier=Uudsi toimittaja History=Historia -ListOfSuppliers=Luettelo toimittajat +ListOfSuppliers=Luettelo toimittajista ShowSupplier=Näytä toimittaja -OrderDate=Tilaa päivämäärä -BuyingPrice=Osto -BuyingPriceMin=Minimi ostohinnan -BuyingPriceMinShort=Min ostohinnan -# TotalBuyingPriceMin=Total of subproducts buying prices -# SomeSubProductHaveNoPrices=Some sub-products have no price defined -AddSupplierPrice=Lisää toimittaja hinta -ChangeSupplierPrice=Vaihtaa toimittajaa hinta +OrderDate=Tilauspäivä +BuyingPrice=Ostohinta +BuyingPriceMin=Minimi ostohinta +BuyingPriceMinShort=Minimi ostohinta +TotalBuyingPriceMin=Total of subproducts buying prices +SomeSubProductHaveNoPrices=Some sub-products have no price defined +AddSupplierPrice=Lisää toimittajan hinta +ChangeSupplierPrice=Vaihda toimittajan hinta ErrorQtyTooLowForThisSupplier=Määrä liian alhaisia tämän toimittajan tai ei hinta määritellään tämän tuotteen tämän toimittajan ErrorSupplierCountryIsNotDefined=Maa tämä toimittaja ei ole määritelty. Korjata ensin. ProductHasAlreadyReferenceInThisSupplier=Tämä tuote on jo viittaus tässä toimittaja @@ -27,7 +27,7 @@ RefSupplierShort=Ref. toimittaja Availability=Saatavuus ExportDataset_fournisseur_1=Toimittajan laskujen luettelo ja laskut "linjat ExportDataset_fournisseur_2=Toimittajan laskut ja maksut -# ExportDataset_fournisseur_3=Supplier orders and order lines +ExportDataset_fournisseur_3=Supplier orders and order lines ApproveThisOrder=Hyväksy tämä tilaus ConfirmApproveThisOrder=Oletko varma, että haluat hyväksyä tämän tilauksen? DenyingThisOrder=Kiellä tätä järjestystä @@ -39,4 +39,4 @@ AddSupplierOrder=Luo toimittaja jotta AddSupplierInvoice=Luo toimittajan laskun ListOfSupplierProductForSupplier=Luettelo tuotteista ja hinnoista toimittaja %s NoneOrBatchFileNeverRan=Ei mitään tai erän %s ei juoksi hiljattain -# SentToSuppliers=Sent to suppliers +SentToSuppliers=Sent to suppliers diff --git a/htdocs/langs/fr_FR/admin.lang b/htdocs/langs/fr_FR/admin.lang index bc29d977ed2..0c9d9c92481 100644 --- a/htdocs/langs/fr_FR/admin.lang +++ b/htdocs/langs/fr_FR/admin.lang @@ -233,7 +233,9 @@ OfficialWebSiteFr=Site web officiel francophone OfficialWiki=Wiki de documentation Dolibarr OfficialDemo=Démo en ligne Dolibarr OfficialMarketPlace=Place de marché officielle des modules et extensions complémentaires -OfficialWebHostingService=Service d'hébergement partenaires (Cloud) +OfficialWebHostingService=Services d'hébergements référencés (Cloud) +ReferencedPreferredPartners=Preferred Partners +OtherResources=Autres ressources ForDocumentationSeeWiki=Pour la documentation utilisateur, développeur ou les FAQs,
    consultez le wiki Dolibarr:
    %s ForAnswersSeeForum=Pour tout autre question/aide, vous pouvez utiliser le forum Dolibarr:
    %s HelpCenterDesc1=Cette application, indépendante de Dolibarr, permet de vous aider à obtenir un service d'assistance sur Dolibarr. @@ -370,8 +372,8 @@ ExtrafieldSeparator=Séparateur de champ ExtrafieldCheckBox=Case à cocher ExtrafieldRadio=Bouton radio ExtrafieldParamHelpselect=La liste doit être de la forme clef,valeur

    par exemple :
    1,valeur1
    2,valeur2
    3,valeur3
    ...

    Pour que la liste soit dépendante d'une autre :
    1,valeur1|code_liste_parent:clef_parent
    2,valeur2|code_liste_parent:clef_parent -ExtrafieldParamHelpcheckbox=La liste doit être de la forme clef,valeur

    par exemple :
    1,valeur1
    2,valeur2
    3,valeur3
    ... -ExtrafieldParamHelpradio=La liste doit être de la forme clef,valeur

    par exemple :
    1,valeur1
    2,valeur2
    3,valeur3
    ... +ExtrafieldParamHelpcheckbox=La liste doit être de la forme clef,valeur

    par exemple :
    1,valeur1
    2,valeur2
    3,valeur3
    ... +ExtrafieldParamHelpradio=La liste doit être de la forme clef,valeur

    par exemple :
    1,valeur1
    2,valeur2
    3,valeur3
    ... ExtrafieldParamHelpsellist=La liste vient d'une table
    Syntaxe:
    nom_de_table:nom_de_champ:id_champ::filtre
    Exemple :
    c_typent:libelle:id::filter

    filter peux être un test simple (exemple active=1 pour ne proposer que les valeur active)
    si vous voulez faire un filtre sur des attributs supplémentaires, utilisez la syntax extra.champ=... (où champ est la code de l'attribut supplémentaire)

    Pour que la liste soit dépendante d'une autre :
    c_typent:libelle:id:code_liste_parent|colonne_parent:filter LibraryToBuildPDF=Bibliothèque utilisée pour la génération des PDF WarningUsingFPDF=Attention : votre fichier conf.php contient la directive dolibarr_pdf_force_fpdf=1. Cela signifie que vous utilisez la librairie FPDF pour générer vos fichiers PDF. Cette librairie est ancienne et ne couvre pas de nombreuses fonctionnalités (Unicode, transparence des images, langues cyrilliques, arabes ou asiatiques...), aussi vous pouvez rencontrer des problèmes durant la génération des PDF.
    Pour résoudre cela et avoir une prise en charge complète de PDF, vous pouvez télécharger la bibliothèque TCPDF puis commenter ou supprimer la ligne $dolibarr_pdf_force_fpdf=1, et ajouter à la place $dolibarr_lib_TCPDF_PATH='chemin_vers_TCPDF' @@ -495,15 +497,15 @@ Module2400Name=Agenda Module2400Desc=Gestion des actions (événements et tâches) et de l'agenda Module2500Name=Gestion électronique de documents Module2500Desc=Permet de stocker et administrer une base de documents -Module2600Name= WebServices -Module2600Desc= Active le serveur de Web Services de Dolibarr -Module2700Name= Gravatar -Module2700Desc= Utilise le service en ligne Gravatar (www.gravatar.com) pour afficher les photos d'utilisateurs/membres (en fonction leur e-mail). Besoin d'un accès Internet +Module2600Name=WebServices +Module2600Desc=Active le serveur de Web Services de Dolibarr +Module2700Name=Gravatar +Module2700Desc=Utilise le service en ligne Gravatar (www.gravatar.com) pour afficher les photos d'utilisateurs/membres (en fonction leur e-mail). Besoin d'un accès Internet Module2800Desc=Client FTP -Module2900Name= GeoIPMaxmind -Module2900Desc= Capacités de conversion GeoIP Maxmind -Module3100Name= Skype -Module3100Desc= Ajouter un button Skype dans les fiches adhérents / tiers / contacts +Module2900Name=GeoIPMaxmind +Module2900Desc=Capacités de conversion GeoIP Maxmind +Module3100Name=Skype +Module3100Desc=Ajouter un button Skype dans les fiches adhérents / tiers / contacts Module5000Name=Multi-société Module5000Desc=Permet de gérer plusieurs sociétés Module6000Name=Workflow @@ -681,6 +683,10 @@ Permission401=Consulter les avoirs Permission402=Créer/modifier les avoirs Permission403=Valider les avoirs Permission404=Supprimer les avoirs +Permission510=Consulter les salaires +Permission512=Créer/modifier les salaires +Permission514=Supprimer les salaires +Permission517=Exporter les salaires Permission531=Consulter les services Permission532=Créer/modifier les services Permission534=Supprimer les services @@ -1214,9 +1220,9 @@ LDAPSynchroKO=Échec du test de synchronisation LDAPSynchroKOMayBePermissions=Échec du test de synchronisation. Vérifier que la connexion au serveur est correctement configurée et permet les mises à jour LDAP LDAPTCPConnectOK=Connexion TCP au serveur LDAP réussie (Serveur=%s, Port=%s) LDAPTCPConnectKO=Connexion TCP au serveur LDAP échouée (Serveur=%s, Port=%s) -LDAPBindOK=Connexion/Authentification au serveur LDAP réussie (Serveur=%s, Port=%s, Admin=%s, Password=%s) +LDAPBindOK=Connection/Authentification au serveur LDAP réussie (Serveur=%s, Port=%s, Admin=%s, Password=%s) LDAPBindKO=Connexion/Authentification au serveur LDAP échouée (Serveur=%s, Port=%s, Admin=%s, Password=%s) -LDAPUnbindSuccessfull=Déconnexion réussie +LDAPUnbindSuccessfull=Déconnection réussie LDAPUnbindFailed=Déconnexion échouée LDAPConnectToDNSuccessfull=Connexion au DN (%s) réussie LDAPConnectToDNFailed=Connexion au DN (%s) échouée @@ -1429,7 +1435,7 @@ OptionVATDefault=Standard OptionVATDebitOption=Option services sur Débit OptionVatDefaultDesc=TVA sur encaissement, l'exigibilité de la TVA est:
    - sur livraison pour les biens (en pratique on utilise la date de facturation)
    - sur paiement pour les services OptionVatDebitOptionDesc=TVA sur débit, l'exigibilité de la TVA est:
    - sur livraison pour les biens (en pratique on utilise la date de facturation)
    - sur facturation (débit) pour les services -SummaryOfVatExigibilityUsedByDefault=Moment d'exigibilité par défaut de la TVA pour l'option choisie : +SummaryOfVatExigibilityUsedByDefault=Moment d'exigibilité par défaut de la TVA pour l'option choisie: OnDelivery=Sur livraison OnPayment=Sur paiement OnInvoice=Sur facture diff --git a/htdocs/langs/fr_FR/contracts.lang b/htdocs/langs/fr_FR/contracts.lang index 0af08b41b95..391da0f6968 100644 --- a/htdocs/langs/fr_FR/contracts.lang +++ b/htdocs/langs/fr_FR/contracts.lang @@ -89,6 +89,8 @@ ListOfServicesToExpireWithDuration=Liste des services actifs expirant dans %s jo ListOfServicesToExpireWithDurationNeg=Liste des services actifs expiré depuis plus de %s jours ListOfServicesToExpire=Liste des services actifs en expiration NoteListOfYourExpiredServices=Cette list ne contient que les contrats de services des tiers pour lesquels vous êtes liés comme représentant commercial. +StandardContractsTemplate=Modèle standard de contrats +ContactNameAndSignature=Pour %s, nom et signature: ##### Types de contacts ##### TypeContact_contrat_internal_SALESREPSIGN=Commercial signataire du contrat diff --git a/htdocs/langs/fr_FR/exports.lang b/htdocs/langs/fr_FR/exports.lang index 78121bec842..cd946767a58 100644 --- a/htdocs/langs/fr_FR/exports.lang +++ b/htdocs/langs/fr_FR/exports.lang @@ -8,7 +8,7 @@ ImportableDatas=Lot de données importables SelectExportDataSet=Choisissez un lot prédéfini de données que vous désirez exporter… SelectImportDataSet=Choisissez un lot prédéfini de données que vous désirez importer… SelectExportFields=Choisissez les champs à exporter, ou choisissez un profil d'export prédéfini -SelectImportFields=Choisissez les champs du fichier source à importer et leur destination dans la base en les déplaçant vers le haut ou vers le bas via l'ancre %s,
    ou choisissez un profil d'import prédéfini : +SelectImportFields=Choisissez les champs du fichier source à importer et leur destination dans la base en les déplaçant vers le haut ou vers le bas via l'ancre %s,
    ou choisissez un profil d'import prédéfini: NotImportedFields=Champs du fichier source non importés SaveExportModel=Enregistrer ce profil d'export si vous désirez le réutiliser ultérieurement… SaveImportModel=Enregistrer ce profil d'import si vous désirez le réutiliser ultérieurement… diff --git a/htdocs/langs/fr_FR/holiday.lang b/htdocs/langs/fr_FR/holiday.lang index 85187ffb24a..e4c997cb859 100644 --- a/htdocs/langs/fr_FR/holiday.lang +++ b/htdocs/langs/fr_FR/holiday.lang @@ -8,7 +8,6 @@ NotActiveModCP=Vous devez activer le module Congés pour afficher cette page. NotConfigModCP=Vous devez configurer le module Congés pour afficher cette page. Pour effectuer cette opération, cliquer ici. NoCPforUser=Vous n'avez pas encore de demande de congés. AddCP=Créer demande de congés -CPErrorSQL=Une erreur SQL est survenue : Employe=Employé DateDebCP=Date Début DateFinCP=Date Fin diff --git a/htdocs/langs/fr_FR/languages.lang b/htdocs/langs/fr_FR/languages.lang index 17e9eb65f3d..e1ee1ca52d2 100644 --- a/htdocs/langs/fr_FR/languages.lang +++ b/htdocs/langs/fr_FR/languages.lang @@ -19,6 +19,7 @@ Language_en_SA=Anglais (Arabie Saoudite) Language_en_US=Anglais (Etats-Unis) Language_en_ZA=Anglais (Afrique du Sud) Language_es_ES=Espagnol +Language_es_DO=Espagnol (République dominicaine) Language_es_AR=Espagnol (Argentine) Language_es_CL=Espagnol (Chili) Language_es_HN=Espagnol (Honduras) @@ -38,6 +39,7 @@ Language_fr_NC=Français (Nouvelle Calédonie) Language_he_IL=Hébreux Language_hr_HR=Croate Language_hu_HU=Hongrois +Language_id_ID=Indonésien Language_is_IS=Islandais Language_it_IT=Italien Language_ja_JP=Japonais @@ -58,7 +60,7 @@ Language_tr_TR=Turque Language_sl_SI=Slovène Language_sv_SV=Suédois Language_sv_SE=Suédois -Language_sq_AL=Albanian +Language_sq_AL=Albanais Language_sk_SK=Slovaque Language_th_TH=Thaï Language_uk_UA=Ukrainien diff --git a/htdocs/langs/fr_FR/mails.lang b/htdocs/langs/fr_FR/mails.lang index 6fb9ec92871..9bc53fc6293 100644 --- a/htdocs/langs/fr_FR/mails.lang +++ b/htdocs/langs/fr_FR/mails.lang @@ -79,6 +79,7 @@ MailtoEMail=Écrire un e-mail (lien) ActivateCheckRead=Permettre l'utilisation du lien de désinscription ActivateCheckReadKey=Clé de sécurité permettant le chiffrement des URL utilisées dans les fonctions d'accusé de lecture et de désinscription EMailSentToNRecipients=Email envoyé à %s destinataires. +XTargetsAdded=%s destinataires ajoutés dans la liste cible EachInvoiceWillBeAttachedToEmail=Un document utilisant le modèle par défaut de facture sera généré et attaché à l'email. MailTopicSendRemindUnpaidInvoices=Rappel de la facture %s (%s) SendRemind=Envoyer relance par EMail diff --git a/htdocs/langs/fr_FR/main.lang b/htdocs/langs/fr_FR/main.lang index 98b10934e24..89c2589941b 100644 --- a/htdocs/langs/fr_FR/main.lang +++ b/htdocs/langs/fr_FR/main.lang @@ -551,6 +551,7 @@ MailSentBy=Mail envoyé par TextUsedInTheMessageBody=Corps du mail SendAcknowledgementByMail=Envoi A.R. par mail NoEMail=Pas d'email +NoMobilePhone=Pas de téléphone portable Owner=Propriétaire DetectedVersion=Version détectée FollowingConstantsWillBeSubstituted=Les constantes suivantes seront substituées par leur valeur correspondante. diff --git a/htdocs/langs/fr_FR/products.lang b/htdocs/langs/fr_FR/products.lang index f65bfcb080e..f17afd0a7b3 100644 --- a/htdocs/langs/fr_FR/products.lang +++ b/htdocs/langs/fr_FR/products.lang @@ -28,8 +28,10 @@ ProductsAndServicesStatistics=Statistiques produits et services ProductsStatistics=Statistiques produits ProductsOnSell=Produits en vente ou en achat ProductsNotOnSell=Produits hors vente et hors achat +ProductsOnSellAndOnBuy=Produit hors vente et hors achat ServicesOnSell=Services en vente ou en achat ServicesNotOnSell=Services hors vente et hors achat +ServicesOnSellAndOnBuy=Services hors vente et hors achat InternalRef=Référence interne LastRecorded=Derniers produits/services en vente enregistrés LastRecordedProductsAndServices=Les %s derniers produits/services enregistrés @@ -70,6 +72,8 @@ PublicPrice=Prix public CurrentPrice=Prix actuel NewPrice=Nouveau prix MinPrice=Prix de vente min. +MinPriceHT=Prix de vente min. (HT) +MinPriceTTC=Prix de vente min. (TTC) CantBeLessThanMinPrice=Le prix de vente ne doit pas être inférieur au minimum pour ce produit (%s HT). Ce message peut aussi être provoqué par une remise trop importante. ContractStatus=État du contrat ContractStatusClosed=Clôturé @@ -179,6 +183,7 @@ ProductIsUsed=Ce produit est utilisé NewRefForClone=Réf. du nouveau produit/service CustomerPrices=Prix clients SuppliersPrices=Prix fournisseurs +SuppliersPricesOfProductsOrServices=Prix fournisseurs (de produits ou services) CustomCode=Code douane CountryOrigin=Pays d'origine HiddenIntoCombo=Caché dans les listes @@ -208,6 +213,7 @@ CostPmpHT=Cout à l'achat HT ProductUsedForBuild=Consommé automatiquement par la fabrication ProductBuilded=Fabrication terminée ProductsMultiPrice=Produits multi-prix +ProductsOrServiceMultiPrice=Prix clients (des produits ou services, mode multi-prix) ProductSellByQuarterHT=Chiffre d'affaire des produits par trimestre ServiceSellByQuarterHT=Chiffre d'affaire des services par trimestre Quarter1=1er trimestre diff --git a/htdocs/langs/fr_FR/shop.lang b/htdocs/langs/fr_FR/shop.lang index f82a1853e10..b6872323fb8 100644 --- a/htdocs/langs/fr_FR/shop.lang +++ b/htdocs/langs/fr_FR/shop.lang @@ -1,4 +1,5 @@ # Dolibarr language file - Source file is en_US - shop +FailedConnectDBCheckModuleSetup=Failed to connect to oscommerce database. Check your module setup Shop=Boutique ShopWeb=Boutique Web LastOrders=Dernières commandes diff --git a/htdocs/langs/fr_FR/stocks.lang b/htdocs/langs/fr_FR/stocks.lang index fa2c3228966..2ef0af0f5c5 100644 --- a/htdocs/langs/fr_FR/stocks.lang +++ b/htdocs/langs/fr_FR/stocks.lang @@ -112,6 +112,7 @@ ReplenishmentOrdersDesc=Voici la liste des commandes fournisseurs en cours Replenishments=Réapprovisionnement NbOfProductBeforePeriod=Quantité du produit %s en stock avant la période sélectionnée (< %s) NbOfProductAfterPeriod=Quantité du produit %s en stock après la période sélectionnée (> %s) +MassMovement=Mouvement en masse MassStockMovement=Mouvement de stock en masse SelectProductInAndOutWareHouse=Sélectionner un produit, une quantité à transférer, un entrepôt source et destination et cliquer sur "%s". Une fois tous les mouvements choisis, cliquer sur "%s". RecordMovement=Enregistrer transferts diff --git a/htdocs/langs/he_IL/admin.lang b/htdocs/langs/he_IL/admin.lang index 4e5800d8cc2..93e44704ec2 100644 --- a/htdocs/langs/he_IL/admin.lang +++ b/htdocs/langs/he_IL/admin.lang @@ -116,7 +116,7 @@ LanguageBrowserParameter=פרמטר %s LocalisationDolibarrParameters=Localisation פרמטרים ClientTZ=Client Time Zone (user) ClientHour=Client time (user) -OSTZ=אזור זמן OS שרת +OSTZ=Server OS Time Zone PHPTZ=אזור זמן PHP שרת PHPServerOffsetWithGreenwich=PHP שרת לקזז רוחב גריניץ' (שניות) ClientOffsetWithGreenwich=לקוח / דפדפן לקזז רוחב גריניץ' (שניות) @@ -233,7 +233,9 @@ OfficialWebSiteFr=הצרפתי האינטרנט הרשמי OfficialWiki=Dolibarr תיעוד בוויקי OfficialDemo=Dolibarr הדגמה מקוון OfficialMarketPlace=שוק המקום הרשמי של מודולים / addons חיצוניים -OfficialWebHostingService=Official web hosting services (Cloud hosting) +OfficialWebHostingService=Referenced web hosting services (Cloud hosting) +ReferencedPreferredPartners=Preferred Partners +OtherResources=Autres ressources ForDocumentationSeeWiki=עבור המשתמש או תיעוד של מפתח (דוק, שאלות ...)
    תסתכל על ויקי Dolibarr:
    %s ForAnswersSeeForum=אם יש לך שאלות נוספות / עזרה, אתה יכול להשתמש בפורום Dolibarr:
    %s HelpCenterDesc1=שטח זה יכול לעזור לך לקבל תמיכה ועזרה שירות Dolibarr. @@ -369,9 +371,9 @@ ExtrafieldSelectList = Select from table ExtrafieldSeparator=Separator ExtrafieldCheckBox=Checkbox ExtrafieldRadio=Radio button -ExtrafieldParamHelpselect=Parameters list have to be like key,value

    for exemple :
    1,value1
    2,value2
    3,value3
    ...

    In order to have the list depending on another :
    1,value1|parent_list_code:parent_key
    2,value2|parent_list_code:parent_key -ExtrafieldParamHelpcheckbox=Parameters list have to be like key,value

    for exemple :
    1,value1
    2,value2
    3,value3
    ... -ExtrafieldParamHelpradio=Parameters list have to be like key,value

    for exemple :
    1,value1
    2,value2
    3,value3
    ... +ExtrafieldParamHelpselect=Parameters list have to be like key,value

    for example :
    1,value1
    2,value2
    3,value3
    ...

    In order to have the list depending on another :
    1,value1|parent_list_code:parent_key
    2,value2|parent_list_code:parent_key +ExtrafieldParamHelpcheckbox=Parameters list have to be like key,value

    for example :
    1,value1
    2,value2
    3,value3
    ... +ExtrafieldParamHelpradio=Parameters list have to be like key,value

    for example :
    1,value1
    2,value2
    3,value3
    ... ExtrafieldParamHelpsellist=Parameters list comes from a table
    Syntax : table_name:label_field:id_field::filter
    Example : c_typent:libelle:id::filter

    filter can be a simple test (eg active=1) to display only active value
    if you want to filter on extrafields use syntaxt extra.fieldcode=... (where field code is the code of extrafield)

    In order to have the list depending on another :
    c_typent:libelle:id:parent_list_code|parent_column:filter LibraryToBuildPDF=Library used to build PDF WarningUsingFPDF=Warning: Your conf.php contains directive dolibarr_pdf_force_fpdf=1. This means you use the FPDF library to generate PDF files. This library is old and does not support a lot of features (Unicode, image transparency, cyrillic, arab and asiatic languages, ...), so you may experience errors during PDF generation.
    To solve this and have a full support of PDF generation, please download TCPDF library, then comment or remove the line $dolibarr_pdf_force_fpdf=1, and add instead $dolibarr_lib_TCPDF_PATH='path_to_TCPDF_dir' @@ -472,7 +474,7 @@ Module410Desc=שילוב לוח השנה Module500Name=Special expenses (tax, social contributions, dividends) Module500Desc=Management of special expenses like taxes, social contribution, dividends and salaries Module510Name=Salaries -Module510Desc=Management of empoyees salaries and payments +Module510Desc=Management of employees salaries and payments Module600Name=הודעות Module600Desc=שלח דיווחים בדואר אלקטרוני על כמה אירועים עסקיים Dolibarr לאנשי הקשר הצד השלישי Module700Name=תרומות @@ -495,15 +497,15 @@ Module2400Name=סדר היום Module2400Desc=אירועים / משימות וניהול סדר היום Module2500Name=תוכן אלקטרוני ניהול Module2500Desc=לשמור ולשתף מסמכים -Module2600Name= WebServices -Module2600Desc= אפשר האינטרנט Dolibarr שירותי שרת -Module2700Name= Gravatar -Module2700Desc= השתמש באינטרנט בשירות Gravatar (www.gravatar.com) להראות תמונה של משתמשים / חברים (נמצא עם מיילים שלהם). צריך גישה לאינטרנט +Module2600Name=WebServices +Module2600Desc=אפשר האינטרנט Dolibarr שירותי שרת +Module2700Name=Gravatar +Module2700Desc=השתמש באינטרנט בשירות Gravatar (www.gravatar.com) להראות תמונה של משתמשים / חברים (נמצא עם מיילים שלהם). צריך גישה לאינטרנט Module2800Desc=FTP Client -Module2900Name= GeoIPMaxmind -Module2900Desc= GeoIP Maxmind המרות יכולות -Module3100Name= Skype -Module3100Desc= Add a Skype button into card of adherents / third parties / contacts +Module2900Name=GeoIPMaxmind +Module2900Desc=GeoIP Maxmind המרות יכולות +Module3100Name=Skype +Module3100Desc=Add a Skype button into card of adherents / third parties / contacts Module5000Name=רב החברה Module5000Desc=מאפשר לך לנהל מספר רב של חברות Module6000Name=Workflow @@ -681,6 +683,10 @@ Permission401=קרא הנחות Permission402=יצירה / שינוי הנחות Permission403=אמת הנחות Permission404=מחק את הנחות +Permission510=Read Salaries +Permission512=Create/modify salaries +Permission514=Delete salaries +Permission517=Export salaries Permission531=לקרוא שירותים Permission532=יצירה / שינוי שירותים Permission534=מחק את השירותים @@ -999,7 +1005,7 @@ ExtraFieldsSupplierOrders=Complementary attributes (orders) ExtraFieldsSupplierInvoices=Complementary attributes (invoices) ExtraFieldsProject=Complementary attributes (projects) ExtraFieldsProjectTask=Complementary attributes (tasks) -ExtraFieldHasWrongValue=Attribut %s יש ערך לא נכון. +ExtraFieldHasWrongValue=Attribute %s has a wrong value. AlphaNumOnlyCharsAndNoSpace=only alphanumericals characters without space AlphaNumOnlyLowerCharsAndNoSpace=only alphanumericals and lower case characters without space SendingMailSetup=ההתקנה של sendings בדוא"ל @@ -1018,13 +1024,13 @@ SuhosinSessionEncrypt=Session storage encrypted by Suhosin ConditionIsCurrently=Condition is currently %s TestNotPossibleWithCurrentBrowsers=Automatic detection not possible YouUseBestDriver=You use driver %s that is best driver available currently. -YouDoNotUseBestDriver=You use drive %s but driver %s is recommanded. +YouDoNotUseBestDriver=You use drive %s but driver %s is recommended. NbOfProductIsLowerThanNoPb=You have only %s products/services into database. This does not required any particular optimization. SearchOptim=Search optimization YouHaveXProductUseSearchOptim=You have %s product into database. You should add the constant PRODUCT_DONOTSEARCH_ANYWHERE to 1 into Home-Setup-Other, you limit the search to the beginning of strings making possible for database to use index and you should get an immediate response. BrowserIsOK=You are using the web browser %s. This browser is ok for security and performance. BrowserIsKO=You are using the web browser %s. This browser is known to be a bad choice for security, performance and reliability. We recommand you to use Firefox, Chrome, Opera or Safari. -XDebugInstalled=XDebug est chargé. +XDebugInstalled=XDebug is loaded. XCacheInstalled=XCache is loaded. AddRefInList=Display customer/supplier ref into list (select list or combobox) and most of hyperlink FieldEdition=Edition of field %s @@ -1073,7 +1079,7 @@ WebCalServer=אירוח שרתים לוח השנה באתר WebCalDatabaseName=שם מסד הנתונים WebCalUser=למשתמש גישה באתר WebCalSetupSaved=התקנת לוח השנה נשמרו בהצלחה. -WebCalTestOk=חיבור "%s של שרת" %s "מסד נתונים עם מוצלחת" %s של המשתמש. +WebCalTestOk=Connection to server '%s' on database '%s' with user '%s' successful. WebCalTestKo1=חיבור "%s" שרת להצליח אבל "%s" מסד נתונים לא ניתן היה להשיג. WebCalTestKo2=חיבור "%s של שרת עם" %s "המשתמש נכשל. WebCalErrorConnectOkButWrongDatabase=החיבור הצליח אבל הנתונים לא נראה להיות באתר לוח השנה. @@ -1119,7 +1125,7 @@ WatermarkOnDraftProposal=סימן מים על הצעות טיוטה מסחריי OrdersSetup=התקנה וניהול של סדר OrdersNumberingModules=הזמנות מספור מודולים OrdersModelModule=מסמכים הזמנת דגמים -HideTreadedOrders=הסתר את ההזמנות שטופלו או בוטלו ברשימה +HideTreadedOrders=Hide the treated or cancelled orders in the list ValidOrderAfterPropalClosed=כדי לאמת את הסדר אחרי קרוב ההצעה, מאפשרת לא לדרוך על פי צו זמני FreeLegalTextOnOrders=טקסט חינם על הזמנות WatermarkOnDraftOrders=סימן מים על צווי הגיוס (כל אם ריק) @@ -1214,9 +1220,9 @@ LDAPSynchroKO=הסנכרון נכשל במבחן LDAPSynchroKOMayBePermissions=נכשל במבחן הסנכרון. בדוק כי הקשר לשרת מוגדר כהלכה ומאפשרת udpates של LDAP LDAPTCPConnectOK=TCP להתחבר ל-LDAP מוצלחים שרת (Server = %s, נמל %s =) LDAPTCPConnectKO=TCP להתחבר לשרת LDAP נכשל (שרת = %s, נמל %s =) -LDAPBindOK=חבר / Authentificate אל שרת LDAP sucessfull (שרת = %s, פורט = %s, מנהל = %s, סיסמה = %s) +LDAPBindOK=Connect/Authentificate to LDAP server successful (Server=%s, Port=%s, Admin=%s, Password=%s) LDAPBindKO=חבר / Authentificate לשרת LDAP נכשל (שרת = %s, פורט = %s, מנהל = %s, סיסמה = %s) -LDAPUnbindSuccessfull=נתק מוצלחת +LDAPUnbindSuccessfull=Disconnect successful LDAPUnbindFailed=הניתוק נכשל LDAPConnectToDNSuccessfull=חיבור au DN (%s) רי ¿½ ussie LDAPConnectToDNFailed=חיבור au DN (%s) אני ¿½ chouï ¿½ דואר @@ -1273,7 +1279,7 @@ LDAPFieldSidExample=דוגמה: objectsid LDAPFieldEndLastSubscription=תאריך סיום המנוי LDAPFieldTitle=Post/Function LDAPFieldTitleExample=Example: title -LDAPParametersAreStillHardCoded=Parametres LDAP בעלות hardcoded הם עדיין (בכיתה קשר) +LDAPParametersAreStillHardCoded=LDAP parameters are still hardcoded (in contact class) LDAPSetupNotComplete=ההתקנה LDAP אינה שלמה (ללכת על כרטיסיות ואחרים) LDAPNoUserOrPasswordProvidedAccessIsReadOnly=אין מנהל או הסיסמה סיפק. גישה LDAP יהיה אנונימי ב למצב קריאה בלבד. LDAPDescContact=דף זה מאפשר לך להגדיר תכונות LDAP שם בעץ LDAP עבור כל הנתונים שנמצאו על הקשר Dolibarr. @@ -1429,7 +1435,7 @@ OptionVATDefault=תקן OptionVATDebitOption=אופציות על שירותי חיוב OptionVatDefaultDesc=במע"מ:
    - על משלוח של סחורות (אנו משתמשים תאריך החשבונית)
    - על תשלומים עבור שירותים OptionVatDebitOptionDesc=במע"מ:
    - על משלוח של סחורות (אנו משתמשים תאריך החשבונית)
    - על החשבונית (חיוב) עבור שירותים -SummaryOfVatExigibilityUsedByDefault=בימי exigibility מע"מ כברירת מחדל על פי אפשרות choosed: +SummaryOfVatExigibilityUsedByDefault=Time of VAT exigibility by default according to chosen option: OnDelivery=על משלוח OnPayment=על התשלום OnInvoice=בחשבונית @@ -1446,7 +1452,7 @@ AccountancyCodeBuy=Purchase account. code AgendaSetup=אירועים מודול ההתקנה סדר היום PasswordTogetVCalExport=מפתח לאשר הקישור יצוא PastDelayVCalExport=לא יצא אירוע מבוגרת -AGENDA_USE_EVENT_TYPE=Use events types (managed into menu Setup -> Dictionnary -> Type of agenda events) +AGENDA_USE_EVENT_TYPE=Use events types (managed into menu Setup -> Dictionary -> Type of agenda events) ##### ClickToDial ##### ClickToDialDesc=מודול זה מאפשר להוסיף סמל אחרי מספרי טלפון. לחץ על סמל זה נקרא שרת עם כתובת ה-URL מסוים אתה מגדיר להלן. זה יכול לשמש כדי להתקשר למוקד הטלפוני המערכת Dolibarr שיכול להתקשר למספר הטלפון על מערכת SIP למשל. ##### Point Of Sales (CashDesk) ##### diff --git a/htdocs/langs/he_IL/contracts.lang b/htdocs/langs/he_IL/contracts.lang index c541b0ac986..245466d70e1 100644 --- a/htdocs/langs/he_IL/contracts.lang +++ b/htdocs/langs/he_IL/contracts.lang @@ -1,99 +1,101 @@ # Dolibarr language file - Source file is en_US - contracts -# ContractsArea=Contracts area -# ListOfContracts=List of contracts -# LastContracts=Last %s modified contracts -# AllContracts=All contracts -# ContractCard=Contract card -# ContractStatus=Contract status -# ContractStatusNotRunning=Not running -# ContractStatusRunning=Running -# ContractStatusDraft=Draft -# ContractStatusValidated=Validated -# ContractStatusClosed=Closed -# ServiceStatusInitial=Not running -# ServiceStatusRunning=Running -# ServiceStatusNotLate=Running, not expired -# ServiceStatusNotLateShort=Not expired -# ServiceStatusLate=Running, expired -# ServiceStatusLateShort=Expired -# ServiceStatusClosed=Closed -# ServicesLegend=Services legend +ContractsArea=Contracts area +ListOfContracts=List of contracts +LastContracts=Last %s modified contracts +AllContracts=All contracts +ContractCard=Contract card +ContractStatus=Contract status +ContractStatusNotRunning=Not running +ContractStatusRunning=Running +ContractStatusDraft=Draft +ContractStatusValidated=Validated +ContractStatusClosed=Closed +ServiceStatusInitial=Not running +ServiceStatusRunning=Running +ServiceStatusNotLate=Running, not expired +ServiceStatusNotLateShort=Not expired +ServiceStatusLate=Running, expired +ServiceStatusLateShort=Expired +ServiceStatusClosed=Closed +ServicesLegend=Services legend Contracts=חוזים -# Contract=Contract -# NoContracts=No contracts +Contract=Contract +NoContracts=No contracts MenuServices=שירותים -# MenuInactiveServices=Services not active -# MenuRunningServices=Running services -# MenuExpiredServices=Expired services -# MenuClosedServices=Closed services -# NewContract=New contract -# AddContract=Add contract -# SearchAContract=Search a contract -# DeleteAContract=Delete a contract -# CloseAContract=Close a contract -# ConfirmDeleteAContract=Are you sure you want to delete this contract and all its services ? -# ConfirmValidateContract=Are you sure you want to validate this contract under name %s ? -# ConfirmCloseContract=This will close all services (active or not). Are you sure you want to close this contract ? -# ConfirmCloseService=Are you sure you want to close this service with date %s ? -# ValidateAContract=Validate a contract -# ActivateService=Activate service -# ConfirmActivateService=Are you sure you want to activate this service with date %s ? -# RefContract=Contract reference -# DateContract=Contract date -# DateServiceActivate=Service activation date -# DateServiceUnactivate=Service deactivation date -# DateServiceStart=Date for beginning of service -# DateServiceEnd=Date for end of service -# ShowContract=Show contract -# ListOfServices=List of services -# ListOfInactiveServices=List of not active services -# ListOfExpiredServices=List of expired active services -# ListOfClosedServices=List of closed services -# ListOfRunningContractsLines=List of running contract lines -# ListOfRunningServices=List of running services -# NotActivatedServices=Inactive services (among validated contracts) -# BoardNotActivatedServices=Services to activate among validated contracts -# LastContracts=Last %s modified contracts -# LastActivatedServices=Last %s activated services -# LastModifiedServices=Last %s modified services -# EditServiceLine=Edit service line -# ContractStartDate=Start date -# ContractEndDate=End date -# DateStartPlanned=Planned start date -# DateStartPlannedShort=Planned start date -# DateEndPlanned=Planned end date -# DateEndPlannedShort=Planned end date -# DateStartReal=Real start date -# DateStartRealShort=Real start date -# DateEndReal=Real end date -# DateEndRealShort=Real end date -# NbOfServices=Nb of services -# CloseService=Close service -# ServicesNomberShort=%s service(s) -# RunningServices=Running services -# BoardRunningServices=Expired running services -# ServiceStatus=Status of service -# DraftContracts=Drafts contracts -# CloseRefusedBecauseOneServiceActive=Contract can't be closed as ther is at least one open service on it -# CloseAllContracts=Close all contract lines -# DeleteContractLine=Delete a contract line -# ConfirmDeleteContractLine=Are you sure you want to delete this contract line ? -# MoveToAnotherContract=Move service into another contract. -# ConfirmMoveToAnotherContract=I choosed new target contract and confirm I want to move this service into this contract. -# ConfirmMoveToAnotherContractQuestion=Choose in which existing contract (of same third party), you want to move this service to ? -# PaymentRenewContractId=Renew contract line (number %s) -# ExpiredSince=Expiration date -# RelatedContracts=Related contracts -# NoExpiredServices=No expired active services -# ListOfServicesToExpireWithDuration=List of Services to expire in %s days -# ListOfServicesToExpireWithDurationNeg=List of Services expired from more than %s days -# ListOfServicesToExpire=List of Services to expire -# NoteListOfYourExpiredServices=This list contains only services of contracts for third parties you are linked to as a sale representative. +MenuInactiveServices=Services not active +MenuRunningServices=Running services +MenuExpiredServices=Expired services +MenuClosedServices=Closed services +NewContract=New contract +AddContract=Add contract +SearchAContract=Search a contract +DeleteAContract=Delete a contract +CloseAContract=Close a contract +ConfirmDeleteAContract=Are you sure you want to delete this contract and all its services ? +ConfirmValidateContract=Are you sure you want to validate this contract under name %s ? +ConfirmCloseContract=This will close all services (active or not). Are you sure you want to close this contract ? +ConfirmCloseService=Are you sure you want to close this service with date %s ? +ValidateAContract=Validate a contract +ActivateService=Activate service +ConfirmActivateService=Are you sure you want to activate this service with date %s ? +RefContract=Contract reference +DateContract=Contract date +DateServiceActivate=Service activation date +DateServiceUnactivate=Service deactivation date +DateServiceStart=Date for beginning of service +DateServiceEnd=Date for end of service +ShowContract=Show contract +ListOfServices=List of services +ListOfInactiveServices=List of not active services +ListOfExpiredServices=List of expired active services +ListOfClosedServices=List of closed services +ListOfRunningContractsLines=List of running contract lines +ListOfRunningServices=List of running services +NotActivatedServices=Inactive services (among validated contracts) +BoardNotActivatedServices=Services to activate among validated contracts +LastContracts=Last %s modified contracts +LastActivatedServices=Last %s activated services +LastModifiedServices=Last %s modified services +EditServiceLine=Edit service line +ContractStartDate=Start date +ContractEndDate=End date +DateStartPlanned=Planned start date +DateStartPlannedShort=Planned start date +DateEndPlanned=Planned end date +DateEndPlannedShort=Planned end date +DateStartReal=Real start date +DateStartRealShort=Real start date +DateEndReal=Real end date +DateEndRealShort=Real end date +NbOfServices=Nb of services +CloseService=Close service +ServicesNomberShort=%s service(s) +RunningServices=Running services +BoardRunningServices=Expired running services +ServiceStatus=Status of service +DraftContracts=Drafts contracts +CloseRefusedBecauseOneServiceActive=Contract can't be closed as ther is at least one open service on it +CloseAllContracts=Close all contract lines +DeleteContractLine=Delete a contract line +ConfirmDeleteContractLine=Are you sure you want to delete this contract line ? +MoveToAnotherContract=Move service into another contract. +ConfirmMoveToAnotherContract=I choosed new target contract and confirm I want to move this service into this contract. +ConfirmMoveToAnotherContractQuestion=Choose in which existing contract (of same third party), you want to move this service to ? +PaymentRenewContractId=Renew contract line (number %s) +ExpiredSince=Expiration date +RelatedContracts=Related contracts +NoExpiredServices=No expired active services +ListOfServicesToExpireWithDuration=List of Services to expire in %s days +ListOfServicesToExpireWithDurationNeg=List of Services expired from more than %s days +ListOfServicesToExpire=List of Services to expire +NoteListOfYourExpiredServices=This list contains only services of contracts for third parties you are linked to as a sale representative. +StandardContractsTemplate=Standard contracts template +ContactNameAndSignature=For %s, name and signature: ##### Types de contacts ##### -# TypeContact_contrat_internal_SALESREPSIGN=Sales representative signing contract -# TypeContact_contrat_internal_SALESREPFOLL=Sales representative following-up contract -# TypeContact_contrat_external_BILLING=Billing customer contact -# TypeContact_contrat_external_CUSTOMER=Follow-up customer contact -# TypeContact_contrat_external_SALESREPSIGN=Signing contract customer contact -# Error_CONTRACT_ADDON_NotDefined=Constant CONTRACT_ADDON not defined +TypeContact_contrat_internal_SALESREPSIGN=Sales representative signing contract +TypeContact_contrat_internal_SALESREPFOLL=Sales representative following-up contract +TypeContact_contrat_external_BILLING=Billing customer contact +TypeContact_contrat_external_CUSTOMER=Follow-up customer contact +TypeContact_contrat_external_SALESREPSIGN=Signing contract customer contact +Error_CONTRACT_ADDON_NotDefined=Constant CONTRACT_ADDON not defined diff --git a/htdocs/langs/he_IL/exports.lang b/htdocs/langs/he_IL/exports.lang index 0e4af1a0b9f..785cb5043d3 100644 --- a/htdocs/langs/he_IL/exports.lang +++ b/htdocs/langs/he_IL/exports.lang @@ -1,134 +1,134 @@ # Dolibarr language file - Source file is en_US - exports -# ExportsArea=Exports area -# ImportArea=Import area -# NewExport=New export -# NewImport=New import -# ExportableDatas=Exportable dataset -# ImportableDatas=Importable dataset -# SelectExportDataSet=Choose dataset you want to export... -# SelectImportDataSet=Choose dataset you want to import... -# SelectExportFields=Choose fields you want to export, or select a predefined export profile -# SelectImportFields=Choose source file fields you want to import and their target field in database by moving them up and down with anchor %s, or select a predefined import profil: -# NotImportedFields=Fields of source file not imported -# SaveExportModel=Save this export profile if you plan to reuse it later... -# SaveImportModel=Save this import profile if you plan to reuse it later... -# ExportModelName=Export profile name -# ExportModelSaved=Export profile saved under name %s. -# ExportableFields=Exportable fields -# ExportedFields=Exported fields -# ImportModelName=Import profile name -# ImportModelSaved=Import profile saved under name %s. -# ImportableFields=Importable fields -# ImportedFields=Imported fields -# DatasetToExport=Dataset to export -# DatasetToImport=Import file into dataset -# NoDiscardedFields=No fields in source file are discarded -# Dataset=Dataset -# ChooseFieldsOrdersAndTitle=Choose fields order... -# FieldsOrder=Fields order -# FieldsTitle=Fields title -# FieldOrder=Field order -# FieldTitle=Field title -# ChooseExportFormat=Choose export format -# NowClickToGenerateToBuildExportFile=Now, select file format in combo box and click on "Generate" to build export file... -# AvailableFormats=Available formats -# LibraryShort=Library -# LibraryUsed=Library used +ExportsArea=Exports area +ImportArea=Import area +NewExport=New export +NewImport=New import +ExportableDatas=Exportable dataset +ImportableDatas=Importable dataset +SelectExportDataSet=Choose dataset you want to export... +SelectImportDataSet=Choose dataset you want to import... +SelectExportFields=Choose fields you want to export, or select a predefined export profile +SelectImportFields=Choose source file fields you want to import and their target field in database by moving them up and down with anchor %s, or select a predefined import profile: +NotImportedFields=Fields of source file not imported +SaveExportModel=Save this export profile if you plan to reuse it later... +SaveImportModel=Save this import profile if you plan to reuse it later... +ExportModelName=Export profile name +ExportModelSaved=Export profile saved under name %s. +ExportableFields=Exportable fields +ExportedFields=Exported fields +ImportModelName=Import profile name +ImportModelSaved=Import profile saved under name %s. +ImportableFields=Importable fields +ImportedFields=Imported fields +DatasetToExport=Dataset to export +DatasetToImport=Import file into dataset +NoDiscardedFields=No fields in source file are discarded +Dataset=Dataset +ChooseFieldsOrdersAndTitle=Choose fields order... +FieldsOrder=Fields order +FieldsTitle=Fields title +FieldOrder=Field order +FieldTitle=Field title +ChooseExportFormat=Choose export format +NowClickToGenerateToBuildExportFile=Now, select file format in combo box and click on "Generate" to build export file... +AvailableFormats=Available formats +LibraryShort=Library +LibraryUsed=Library used LibraryVersion=גרסה -# Step=Step -# FormatedImport=Import assistant -# FormatedImportDesc1=This area allows to import personalized data, using an assistant to help you in process without technical knowledge. -# FormatedImportDesc2=First step is to choose a king of data you want to load, then file to load, then to choose which fields you want to load. -# FormatedExport=Export assistant -# FormatedExportDesc1=This area allows to export personalized data, using an assistant to help you in process without technical knowledge. -# FormatedExportDesc2=First step is to choose a predefined dataset, then to choose which fields you want in your result files, and which order. -# FormatedExportDesc3=When data to export are selected, you can define output file format you want to export your data to. -# Sheet=Sheet -# NoImportableData=No importable data (no module with definitions to allow data imports) -# FileSuccessfullyBuilt=Export file generated -# SQLUsedForExport=SQL Request used to build export file -# LineId=Id of line -# LineDescription=Description of line -# LineUnitPrice=Unit price of line -# LineVATRate=VAT Rate of line -# LineQty=Quantity for line -# LineTotalHT=Amount net of tax for line -# LineTotalTTC=Amount with tax for line -# LineTotalVAT=Amount of VAT for line -# TypeOfLineServiceOrProduct=Type of line (0=product, 1=service) -# FileWithDataToImport=File with data to import -# FileToImport=Source file to import -# FileMustHaveOneOfFollowingFormat=File to import must have one of following format -# DownloadEmptyExample=Download example of empty source file -# ChooseFormatOfFileToImport=Choose file format to use as import file format by clicking on picto %s to select it... -# ChooseFileToImport=Upload file then click on picto %s to select file as source import file... -# SourceFileFormat=Source file format -# FieldsInSourceFile=Fields in source file -# FieldsInTargetDatabase=Target fields in Dolibarr database (bold=mandatory) -# Field=Field -# NoFields=No fields -# MoveField=Move field column number %s -# ExampleOfImportFile=Example_of_import_file -# SaveImportProfile=Save this import profile -# ErrorImportDuplicateProfil=Failed to save this import profile with this name. An existing profile already exists with this name. -# ImportSummary=Import setup summary -# TablesTarget=Targeted tables -# FieldsTarget=Targeted fields -# TableTarget=Targeted table -# FieldTarget=Targeted field -# FieldSource=Source field -# DoNotImportFirstLine=Do not import first line of source file -# NbOfSourceLines=Number of lines in source file -# NowClickToTestTheImport=Check import parameters you have defined. If they are correct, click on button "%s" to launch a simulation of import process (no data will be changed in your database, it's only a simulation for the moment)... -# RunSimulateImportFile=Launch the import simulation -# FieldNeedSource=This fiels in database require a data from source file -# SomeMandatoryFieldHaveNoSource=Some mandatory fields have no source from data file -# InformationOnSourceFile=Information on source file -# InformationOnTargetTables=Information on target fields -# SelectAtLeastOneField=Switch at least one source field in the column of fields to export -# SelectFormat=Choose this import file format -# RunImportFile=Launch import file -# NowClickToRunTheImport=Check result of import simulation. If everything is ok, launch the definitive import. -# DataLoadedWithId=All data will be loaded with the following import id: %s -# ErrorMissingMandatoryValue=Mandatory data is empty in source file for field %s. -# TooMuchErrors=There is still %s other source lines with errors but output has been limited. -# TooMuchWarnings=There is still %s other source lines with warnings but output has been limited. -# EmptyLine=Empty line (will be discarded) -# CorrectErrorBeforeRunningImport=You must first correct all errors before running definitive import. -# FileWasImported=File was imported with number %s. -# YouCanUseImportIdToFindRecord=You can find all imported records in your database by filtering on field import_key='%s'. -# NbOfLinesOK=Number of lines with no errors and no warnings: %s. -# NbOfLinesImported=Number of lines successfully imported: %s. -# DataComeFromNoWhere=Value to insert comes from nowhere in source file. -# DataComeFromFileFieldNb=Value to insert comes from field number %s in source file. -# DataComeFromIdFoundFromRef=Value that comes from field number %s of source file will be used to find id of parent object to use (So the objet %s that has the ref. from source file must exists into Dolibarr). -# DataComeFromIdFoundFromCodeId=Code that comes from field number %s of source file will be used to find id of parent object to use (So the code from source file must exists into dictionary %s). Note that if you know id, you can also use it into source file instead of code. Import should work in both cases. -# DataIsInsertedInto=Data coming from source file will be inserted into the following field: -# DataIDSourceIsInsertedInto=The id of parent object found using the data in source file, will be inserted into the following field: -# DataCodeIDSourceIsInsertedInto=The id of parent line found from code, will be inserted into following field: -# SourceRequired=Data value is mandatory -# SourceExample=Example of possible data value -# ExampleAnyRefFoundIntoElement=Any ref found for element %s -# ExampleAnyCodeOrIdFoundIntoDictionary=Any code (or id) found into dictionary %s -# CSVFormatDesc=Comma Separated Value file format (.csv).
    This is a text file format where fields are separated by separator [ %s ]. If separator is found inside a field content, field is rounded by round character [ %s ]. Escape character to escape round character is [ %s ]. -# Excel95FormatDesc=Excel file format (.xls)
    This is native Excel 95 format (BIFF5). -# Excel2007FormatDesc=Excel file format (.xlsx)
    This is native Excel 2007 format (SpreadsheetML). -# TsvFormatDesc=Tab Separated Value file format (.tsv)
    This is a text file format where fields are separated by a tabulator [tab]. -# ExportFieldAutomaticallyAdded=Field %s was automatically added. It will avoid you to have similar lines to be treated as duplicate records (with this field added, all lines will own their own id and will differ). -# CsvOptions=Csv Options -# Separator=Separator -# Enclosure=Enclosure -# SuppliersProducts=Suppliers Products -# BankCode=Bank code -# DeskCode=Desk code -# BankAccountNumber=Account number -# BankAccountNumberKey=Key -# SpecialCode=Special code -# ExportStringFilter=%% allows replacing one or more characters in the text -# ExportDateFilter='YYYY' 'YYYYMM' 'YYYYMMDD': filters by one year/month/day
    'YYYY+YYYY' 'YYYYMM+YYYYMM' 'YYYYMMDD+YYYYMMDD': filters over a range of years/months/days
    '>YYYY' '>YYYYMM' '>YYYYMMDD': filters on the following years/months/days
    '<YYYY' '<YYYYMM' '<YYYYMMDD': filters on the previous years/months/days -# ExportNumericFilter='NNNNN' filters by one value
    'NNNNN+NNNNN' filters over a range of values
    '>NNNNN' filters by lower values
    '>NNNNN' filters by higher values +Step=Step +FormatedImport=Import assistant +FormatedImportDesc1=This area allows to import personalized data, using an assistant to help you in process without technical knowledge. +FormatedImportDesc2=First step is to choose a king of data you want to load, then file to load, then to choose which fields you want to load. +FormatedExport=Export assistant +FormatedExportDesc1=This area allows to export personalized data, using an assistant to help you in process without technical knowledge. +FormatedExportDesc2=First step is to choose a predefined dataset, then to choose which fields you want in your result files, and which order. +FormatedExportDesc3=When data to export are selected, you can define output file format you want to export your data to. +Sheet=Sheet +NoImportableData=No importable data (no module with definitions to allow data imports) +FileSuccessfullyBuilt=Export file generated +SQLUsedForExport=SQL Request used to build export file +LineId=Id of line +LineDescription=Description of line +LineUnitPrice=Unit price of line +LineVATRate=VAT Rate of line +LineQty=Quantity for line +LineTotalHT=Amount net of tax for line +LineTotalTTC=Amount with tax for line +LineTotalVAT=Amount of VAT for line +TypeOfLineServiceOrProduct=Type of line (0=product, 1=service) +FileWithDataToImport=File with data to import +FileToImport=Source file to import +FileMustHaveOneOfFollowingFormat=File to import must have one of following format +DownloadEmptyExample=Download example of empty source file +ChooseFormatOfFileToImport=Choose file format to use as import file format by clicking on picto %s to select it... +ChooseFileToImport=Upload file then click on picto %s to select file as source import file... +SourceFileFormat=Source file format +FieldsInSourceFile=Fields in source file +FieldsInTargetDatabase=Target fields in Dolibarr database (bold=mandatory) +Field=Field +NoFields=No fields +MoveField=Move field column number %s +ExampleOfImportFile=Example_of_import_file +SaveImportProfile=Save this import profile +ErrorImportDuplicateProfil=Failed to save this import profile with this name. An existing profile already exists with this name. +ImportSummary=Import setup summary +TablesTarget=Targeted tables +FieldsTarget=Targeted fields +TableTarget=Targeted table +FieldTarget=Targeted field +FieldSource=Source field +DoNotImportFirstLine=Do not import first line of source file +NbOfSourceLines=Number of lines in source file +NowClickToTestTheImport=Check import parameters you have defined. If they are correct, click on button "%s" to launch a simulation of import process (no data will be changed in your database, it's only a simulation for the moment)... +RunSimulateImportFile=Launch the import simulation +FieldNeedSource=This field requires data from the source file +SomeMandatoryFieldHaveNoSource=Some mandatory fields have no source from data file +InformationOnSourceFile=Information on source file +InformationOnTargetTables=Information on target fields +SelectAtLeastOneField=Switch at least one source field in the column of fields to export +SelectFormat=Choose this import file format +RunImportFile=Launch import file +NowClickToRunTheImport=Check result of import simulation. If everything is ok, launch the definitive import. +DataLoadedWithId=All data will be loaded with the following import id: %s +ErrorMissingMandatoryValue=Mandatory data is empty in source file for field %s. +TooMuchErrors=There is still %s other source lines with errors but output has been limited. +TooMuchWarnings=There is still %s other source lines with warnings but output has been limited. +EmptyLine=Empty line (will be discarded) +CorrectErrorBeforeRunningImport=You must first correct all errors before running definitive import. +FileWasImported=File was imported with number %s. +YouCanUseImportIdToFindRecord=You can find all imported records in your database by filtering on field import_key='%s'. +NbOfLinesOK=Number of lines with no errors and no warnings: %s. +NbOfLinesImported=Number of lines successfully imported: %s. +DataComeFromNoWhere=Value to insert comes from nowhere in source file. +DataComeFromFileFieldNb=Value to insert comes from field number %s in source file. +DataComeFromIdFoundFromRef=Value that comes from field number %s of source file will be used to find id of parent object to use (So the objet %s that has the ref. from source file must exists into Dolibarr). +DataComeFromIdFoundFromCodeId=Code that comes from field number %s of source file will be used to find id of parent object to use (So the code from source file must exists into dictionary %s). Note that if you know id, you can also use it into source file instead of code. Import should work in both cases. +DataIsInsertedInto=Data coming from source file will be inserted into the following field: +DataIDSourceIsInsertedInto=The id of parent object found using the data in source file, will be inserted into the following field: +DataCodeIDSourceIsInsertedInto=The id of parent line found from code, will be inserted into following field: +SourceRequired=Data value is mandatory +SourceExample=Example of possible data value +ExampleAnyRefFoundIntoElement=Any ref found for element %s +ExampleAnyCodeOrIdFoundIntoDictionary=Any code (or id) found into dictionary %s +CSVFormatDesc=Comma Separated Value file format (.csv).
    This is a text file format where fields are separated by separator [ %s ]. If separator is found inside a field content, field is rounded by round character [ %s ]. Escape character to escape round character is [ %s ]. +Excel95FormatDesc=Excel file format (.xls)
    This is native Excel 95 format (BIFF5). +Excel2007FormatDesc=Excel file format (.xlsx)
    This is native Excel 2007 format (SpreadsheetML). +TsvFormatDesc=Tab Separated Value file format (.tsv)
    This is a text file format where fields are separated by a tabulator [tab]. +ExportFieldAutomaticallyAdded=Field %s was automatically added. It will avoid you to have similar lines to be treated as duplicate records (with this field added, all lines will own their own id and will differ). +CsvOptions=Csv Options +Separator=Separator +Enclosure=Enclosure +SuppliersProducts=Suppliers Products +BankCode=Bank code +DeskCode=Desk code +BankAccountNumber=Account number +BankAccountNumberKey=Key +SpecialCode=Special code +ExportStringFilter=%% allows replacing one or more characters in the text +ExportDateFilter='YYYY' 'YYYYMM' 'YYYYMMDD': filters by one year/month/day
    'YYYY+YYYY' 'YYYYMM+YYYYMM' 'YYYYMMDD+YYYYMMDD': filters over a range of years/months/days
    '>YYYY' '>YYYYMM' '>YYYYMMDD': filters on the following years/months/days
    '<YYYY' '<YYYYMM' '<YYYYMMDD': filters on the previous years/months/days +ExportNumericFilter='NNNNN' filters by one value
    'NNNNN+NNNNN' filters over a range of values
    '>NNNNN' filters by lower values
    '>NNNNN' filters by higher values ## filters -# SelectFilterFields=If you want to filter on some values, just input values here. -# FilterableFields=Champs Filtrables -# FilteredFields=Filtered fields -# FilteredFieldsValues=Value for filter +SelectFilterFields=If you want to filter on some values, just input values here. +FilterableFields=Champs Filtrables +FilteredFields=Filtered fields +FilteredFieldsValues=Value for filter diff --git a/htdocs/langs/he_IL/holiday.lang b/htdocs/langs/he_IL/holiday.lang index bd237ffd2cc..7b5c96e3671 100644 --- a/htdocs/langs/he_IL/holiday.lang +++ b/htdocs/langs/he_IL/holiday.lang @@ -8,7 +8,6 @@ NotActiveModCP=You must enable the module holidays to view this page. NotConfigModCP=You must configure the module holidays to view this page. To do this, click here . NoCPforUser=You don't have a demand for holidays. AddCP=Apply for holidays -CPErrorSQL=An SQL error occurred: Employe=Employee DateDebCP=Start date DateFinCP=End date diff --git a/htdocs/langs/he_IL/languages.lang b/htdocs/langs/he_IL/languages.lang index 03f8744e099..c1d73f3ed25 100644 --- a/htdocs/langs/he_IL/languages.lang +++ b/htdocs/langs/he_IL/languages.lang @@ -19,6 +19,7 @@ Language_en_SA=אנגלית (ערב הסעודית) Language_en_US=אנגלית (ארצות הברית) Language_en_ZA=אנגלית (דרום אפריקה) Language_es_ES=ספרדית +Language_es_DO=Spanish (Dominican Republic) Language_es_AR=ספרדית (ארגנטינה) Language_es_CL=Spanish (Chile) Language_es_HN=ספרדית (הונדורס) @@ -38,6 +39,7 @@ Language_fr_NC=צרפתית (קלדוניה החדשה) Language_he_IL=עברית Language_hr_HR=קרואטי Language_hu_HU=הונגרי +Language_id_ID=Indonesian Language_is_IS=איסלנדי Language_it_IT=איטלקי Language_ja_JP=יפני diff --git a/htdocs/langs/he_IL/mails.lang b/htdocs/langs/he_IL/mails.lang index ba0f54b97ae..49a8bbc543b 100644 --- a/htdocs/langs/he_IL/mails.lang +++ b/htdocs/langs/he_IL/mails.lang @@ -79,6 +79,7 @@ MailtoEMail=Hyper link to email ActivateCheckRead=Allow to use the "Unsubcribe" link ActivateCheckReadKey=Key use to encrypt URL use for "Read Receipt" and "Unsubcribe" feature EMailSentToNRecipients=EMail sent to %s recipients. +XTargetsAdded=%s recipients added into target list EachInvoiceWillBeAttachedToEmail=A document using default invoice document template will be created and attached to each email. MailTopicSendRemindUnpaidInvoices=Reminder of invoice %s (%s) SendRemind=Send reminder by EMails diff --git a/htdocs/langs/he_IL/main.lang b/htdocs/langs/he_IL/main.lang index 89769a56d27..7dc84f70a8e 100644 --- a/htdocs/langs/he_IL/main.lang +++ b/htdocs/langs/he_IL/main.lang @@ -551,6 +551,7 @@ MailSentBy=Email sent by TextUsedInTheMessageBody=Email body SendAcknowledgementByMail=Send Ack. by email NoEMail=No email +NoMobilePhone=No mobile phone Owner=Owner DetectedVersion=Detected version FollowingConstantsWillBeSubstituted=The following constants will be replaced with the corresponding value. diff --git a/htdocs/langs/he_IL/products.lang b/htdocs/langs/he_IL/products.lang index e5f152c4a8b..e6f659b9a07 100644 --- a/htdocs/langs/he_IL/products.lang +++ b/htdocs/langs/he_IL/products.lang @@ -28,8 +28,10 @@ ProductsAndServicesStatistics=Products and Services statistics ProductsStatistics=Products statistics ProductsOnSell=Available products ProductsNotOnSell=Obsolete products +ProductsOnSellAndOnBuy=Products not for sale nor purchase ServicesOnSell=Available services ServicesNotOnSell=Obsolete services +ServicesOnSellAndOnBuy=Services not for sale nor purchase InternalRef=Internal reference LastRecorded=Last products/services on sell recorded LastRecordedProductsAndServices=Last %s recorded products/services @@ -70,6 +72,8 @@ PublicPrice=Public price CurrentPrice=Current price NewPrice=New price MinPrice=Minim. selling price +MinPriceHT=Minim. selling price (net of tax) +MinPriceTTC=Minim. selling price (inc. tax) CantBeLessThanMinPrice=The selling price can't be lower than minimum allowed for this product (%s without tax). This message can also appears if you type a too important discount. ContractStatus=Contract status ContractStatusClosed=Closed @@ -179,6 +183,7 @@ ProductIsUsed=This product is used NewRefForClone=Ref. of new product/service CustomerPrices=Customers prices SuppliersPrices=Suppliers prices +SuppliersPricesOfProductsOrServices=Suppliers prices (of products or services) CustomCode=Customs code CountryOrigin=Origin country HiddenIntoCombo=Hidden into select lists @@ -208,6 +213,7 @@ CostPmpHT=Net total VWAP ProductUsedForBuild=Auto consumed by production ProductBuilded=Production completed ProductsMultiPrice=Product multi-price +ProductsOrServiceMultiPrice=Customers prices (of products or services, multi-prices) ProductSellByQuarterHT=Products turnover quarterly VWAP ServiceSellByQuarterHT=Services turnover quarterly VWAP Quarter1=1st. Quarter diff --git a/htdocs/langs/he_IL/shop.lang b/htdocs/langs/he_IL/shop.lang index b6cd78b5028..156af426bb0 100644 --- a/htdocs/langs/he_IL/shop.lang +++ b/htdocs/langs/he_IL/shop.lang @@ -1,10 +1,11 @@ # Dolibarr language file - Source file is en_US - shop -# Shop=Shop -# ShopWeb=Web Shop -# LastOrders=Last orders -# OnStandBy=On standby -# TreatmentInProgress=Treatment in progress -# LastCustomers=Last customers -# OSCommerceShop=OSCommerce shop -# OSCommerce=OSCommerce -# AddProd=Sell online +FailedConnectDBCheckModuleSetup=Failed to connect to oscommerce database. Check your module setup +Shop=Shop +ShopWeb=Web Shop +LastOrders=Last orders +OnStandBy=On standby +TreatmentInProgress=Treatment in progress +LastCustomers=Last customers +OSCommerceShop=OSCommerce shop +OSCommerce=OSCommerce +AddProd=Sell online diff --git a/htdocs/langs/he_IL/stocks.lang b/htdocs/langs/he_IL/stocks.lang index 8fc9e92de02..cbecd2ce3ec 100644 --- a/htdocs/langs/he_IL/stocks.lang +++ b/htdocs/langs/he_IL/stocks.lang @@ -112,6 +112,7 @@ ReplenishmentOrdersDesc=This is list of all opened supplier orders Replenishments=Replenishments NbOfProductBeforePeriod=Quantity of product %s in stock before selected period (< %s) NbOfProductAfterPeriod=Quantity of product %s in stock after selected period (> %s) +MassMovement=Mass movement MassStockMovement=Mass stock movement SelectProductInAndOutWareHouse=Select a product, a quantity, a source warehouse and a target warehouse, then click "%s". Once this is done for all required movements, click onto "%s". RecordMovement=Record transfert diff --git a/htdocs/langs/hr_HR/admin.lang b/htdocs/langs/hr_HR/admin.lang index 8ea853f87ce..7c2e68b512c 100644 --- a/htdocs/langs/hr_HR/admin.lang +++ b/htdocs/langs/hr_HR/admin.lang @@ -116,7 +116,7 @@ LanguageBrowserParameter=Parametri %s LocalisationDolibarrParameters=Parametri prijevoda ClientTZ=Client Time Zone (user) ClientHour=Client time (user) -OSTZ=Servre OS Time Zone +OSTZ=Server OS Time Zone PHPTZ=PHP server Time Zone PHPServerOffsetWithGreenwich=PHP server offset width Greenwich (seconds) ClientOffsetWithGreenwich=Client/Browser offset width Greenwich (seconds) @@ -233,7 +233,9 @@ OfficialWebSiteFr=French official web site OfficialWiki=Dolibarr documentation on Wiki OfficialDemo=Dolibarr online demo OfficialMarketPlace=Official market place for external modules/addons -OfficialWebHostingService=Official web hosting services (Cloud hosting) +OfficialWebHostingService=Referenced web hosting services (Cloud hosting) +ReferencedPreferredPartners=Preferred Partners +OtherResources=Autres ressources ForDocumentationSeeWiki=For user or developer documentation (Doc, FAQs...),
    take a look at the Dolibarr Wiki:
    %s ForAnswersSeeForum=For any other questions/help, you can use the Dolibarr forum:
    %s HelpCenterDesc1=This area can help you to get a Help support service on Dolibarr. @@ -369,9 +371,9 @@ ExtrafieldSelectList = Select from table ExtrafieldSeparator=Separator ExtrafieldCheckBox=Checkbox ExtrafieldRadio=Radio button -ExtrafieldParamHelpselect=Parameters list have to be like key,value

    for exemple :
    1,value1
    2,value2
    3,value3
    ...

    In order to have the list depending on another :
    1,value1|parent_list_code:parent_key
    2,value2|parent_list_code:parent_key -ExtrafieldParamHelpcheckbox=Parameters list have to be like key,value

    for exemple :
    1,value1
    2,value2
    3,value3
    ... -ExtrafieldParamHelpradio=Parameters list have to be like key,value

    for exemple :
    1,value1
    2,value2
    3,value3
    ... +ExtrafieldParamHelpselect=Parameters list have to be like key,value

    for example :
    1,value1
    2,value2
    3,value3
    ...

    In order to have the list depending on another :
    1,value1|parent_list_code:parent_key
    2,value2|parent_list_code:parent_key +ExtrafieldParamHelpcheckbox=Parameters list have to be like key,value

    for example :
    1,value1
    2,value2
    3,value3
    ... +ExtrafieldParamHelpradio=Parameters list have to be like key,value

    for example :
    1,value1
    2,value2
    3,value3
    ... ExtrafieldParamHelpsellist=Parameters list comes from a table
    Syntax : table_name:label_field:id_field::filter
    Example : c_typent:libelle:id::filter

    filter can be a simple test (eg active=1) to display only active value
    if you want to filter on extrafields use syntaxt extra.fieldcode=... (where field code is the code of extrafield)

    In order to have the list depending on another :
    c_typent:libelle:id:parent_list_code|parent_column:filter LibraryToBuildPDF=Library used to build PDF WarningUsingFPDF=Warning: Your conf.php contains directive dolibarr_pdf_force_fpdf=1. This means you use the FPDF library to generate PDF files. This library is old and does not support a lot of features (Unicode, image transparency, cyrillic, arab and asiatic languages, ...), so you may experience errors during PDF generation.
    To solve this and have a full support of PDF generation, please download TCPDF library, then comment or remove the line $dolibarr_pdf_force_fpdf=1, and add instead $dolibarr_lib_TCPDF_PATH='path_to_TCPDF_dir' @@ -472,7 +474,7 @@ Module410Desc=Webcalendar integration Module500Name=Special expenses (tax, social contributions, dividends) Module500Desc=Management of special expenses like taxes, social contribution, dividends and salaries Module510Name=Salaries -Module510Desc=Management of empoyees salaries and payments +Module510Desc=Management of employees salaries and payments Module600Name=Notifications Module600Desc=Send notifications by email on some Dolibarr business events to third party contacts Module700Name=Donations @@ -495,15 +497,15 @@ Module2400Name=Agenda Module2400Desc=Events/tasks and agenda management Module2500Name=Electronic Content Management Module2500Desc=Save and share documents -Module2600Name= WebServices -Module2600Desc= Enable the Dolibarr web services server -Module2700Name= Gravatar -Module2700Desc= Use online Gravatar service (www.gravatar.com) to show photo of users/members (found with their emails). Need an internet access +Module2600Name=WebServices +Module2600Desc=Enable the Dolibarr web services server +Module2700Name=Gravatar +Module2700Desc=Use online Gravatar service (www.gravatar.com) to show photo of users/members (found with their emails). Need an internet access Module2800Desc=FTP Client -Module2900Name= GeoIPMaxmind -Module2900Desc= GeoIP Maxmind conversions capabilities -Module3100Name= Skype -Module3100Desc= Add a Skype button into card of adherents / third parties / contacts +Module2900Name=GeoIPMaxmind +Module2900Desc=GeoIP Maxmind conversions capabilities +Module3100Name=Skype +Module3100Desc=Add a Skype button into card of adherents / third parties / contacts Module5000Name=Multi-company Module5000Desc=Allows you to manage multiple companies Module6000Name=Workflow @@ -681,6 +683,10 @@ Permission401=Read discounts Permission402=Create/modify discounts Permission403=Validate discounts Permission404=Delete discounts +Permission510=Read Salaries +Permission512=Create/modify salaries +Permission514=Delete salaries +Permission517=Export salaries Permission531=Read services Permission532=Create/modify services Permission534=Delete services @@ -999,7 +1005,7 @@ ExtraFieldsSupplierOrders=Complementary attributes (orders) ExtraFieldsSupplierInvoices=Complementary attributes (invoices) ExtraFieldsProject=Complementary attributes (projects) ExtraFieldsProjectTask=Complementary attributes (tasks) -ExtraFieldHasWrongValue=Attribut %s has a wrong value. +ExtraFieldHasWrongValue=Attribute %s has a wrong value. AlphaNumOnlyCharsAndNoSpace=only alphanumericals characters without space AlphaNumOnlyLowerCharsAndNoSpace=only alphanumericals and lower case characters without space SendingMailSetup=Setup of sendings by email @@ -1018,13 +1024,13 @@ SuhosinSessionEncrypt=Session storage encrypted by Suhosin ConditionIsCurrently=Condition is currently %s TestNotPossibleWithCurrentBrowsers=Automatic detection not possible YouUseBestDriver=You use driver %s that is best driver available currently. -YouDoNotUseBestDriver=You use drive %s but driver %s is recommanded. +YouDoNotUseBestDriver=You use drive %s but driver %s is recommended. NbOfProductIsLowerThanNoPb=You have only %s products/services into database. This does not required any particular optimization. SearchOptim=Search optimization YouHaveXProductUseSearchOptim=You have %s product into database. You should add the constant PRODUCT_DONOTSEARCH_ANYWHERE to 1 into Home-Setup-Other, you limit the search to the beginning of strings making possible for database to use index and you should get an immediate response. BrowserIsOK=You are using the web browser %s. This browser is ok for security and performance. BrowserIsKO=You are using the web browser %s. This browser is known to be a bad choice for security, performance and reliability. We recommand you to use Firefox, Chrome, Opera or Safari. -XDebugInstalled=XDebug est chargé. +XDebugInstalled=XDebug is loaded. XCacheInstalled=XCache is loaded. AddRefInList=Display customer/supplier ref into list (select list or combobox) and most of hyperlink FieldEdition=Edition of field %s @@ -1073,7 +1079,7 @@ WebCalServer=Server hosting calendar database WebCalDatabaseName=Database name WebCalUser=User to access database WebCalSetupSaved=Webcalendar setup saved successfully. -WebCalTestOk=Connection to server '%s' on database '%s' with user '%s' successfull. +WebCalTestOk=Connection to server '%s' on database '%s' with user '%s' successful. WebCalTestKo1=Connection to server '%s' succeed but database '%s' could not be reached. WebCalTestKo2=Connection to server '%s' with user '%s' failed. WebCalErrorConnectOkButWrongDatabase=Connection succeeded but database doesn't look to be a Webcalendar database. @@ -1119,7 +1125,7 @@ WatermarkOnDraftProposal=Watermark on draft commercial proposals (none if empty) OrdersSetup=Order management setup OrdersNumberingModules=Orders numbering models OrdersModelModule=Order documents models -HideTreadedOrders=Hide the treated or canceled orders in the list +HideTreadedOrders=Hide the treated or cancelled orders in the list ValidOrderAfterPropalClosed=To validate the order after proposal closer, makes it possible not to step by the provisional order FreeLegalTextOnOrders=Free text on orders WatermarkOnDraftOrders=Watermark on draft orders (none if empty) @@ -1214,9 +1220,9 @@ LDAPSynchroKO=Failed synchronization test LDAPSynchroKOMayBePermissions=Failed synchronization test. Check that connexion to server is correctly configured and allows LDAP udpates LDAPTCPConnectOK=TCP connect to LDAP server successful (Server=%s, Port=%s) LDAPTCPConnectKO=TCP connect to LDAP server failed (Server=%s, Port=%s) -LDAPBindOK=Connect/Authentificate to LDAP server sucessfull (Server=%s, Port=%s, Admin=%s, Password=%s) +LDAPBindOK=Connect/Authentificate to LDAP server successful (Server=%s, Port=%s, Admin=%s, Password=%s) LDAPBindKO=Connect/Authentificate to LDAP server failed (Server=%s, Port=%s, Admin=%s, Password=%s) -LDAPUnbindSuccessfull=Disconnect successfull +LDAPUnbindSuccessfull=Disconnect successful LDAPUnbindFailed=Disconnect failed LDAPConnectToDNSuccessfull=Connection to DN (%s) successful LDAPConnectToDNFailed=Connection to DN (%s) failed @@ -1273,7 +1279,7 @@ LDAPFieldSidExample=Example : objectsid LDAPFieldEndLastSubscription=Date of subscription end LDAPFieldTitle=Post/Function LDAPFieldTitleExample=Example: title -LDAPParametersAreStillHardCoded=LDAP parametres are still hardcoded (in contact class) +LDAPParametersAreStillHardCoded=LDAP parameters are still hardcoded (in contact class) LDAPSetupNotComplete=LDAP setup not complete (go on others tabs) LDAPNoUserOrPasswordProvidedAccessIsReadOnly=No administrator or password provided. LDAP access will be anonymous and in read only mode. LDAPDescContact=This page allows you to define LDAP attributes name in LDAP tree for each data found on Dolibarr contacts. @@ -1429,7 +1435,7 @@ OptionVATDefault=Standard OptionVATDebitOption=Option services on Debit OptionVatDefaultDesc=VAT is due:
    - on delivery for goods (we use invoice date)
    - on payments for services OptionVatDebitOptionDesc=VAT is due:
    - on delivery for goods (we use invoice date)
    - on invoice (debit) for services -SummaryOfVatExigibilityUsedByDefault=Time of VAT exigibility by default according to choosed option: +SummaryOfVatExigibilityUsedByDefault=Time of VAT exigibility by default according to chosen option: OnDelivery=On delivery OnPayment=On payment OnInvoice=On invoice @@ -1446,7 +1452,7 @@ AccountancyCodeBuy=Purchase account. code AgendaSetup=Events and agenda module setup PasswordTogetVCalExport=Key to authorize export link PastDelayVCalExport=Do not export event older than -AGENDA_USE_EVENT_TYPE=Use events types (managed into menu Setup -> Dictionnary -> Type of agenda events) +AGENDA_USE_EVENT_TYPE=Use events types (managed into menu Setup -> Dictionary -> Type of agenda events) ##### ClickToDial ##### ClickToDialDesc=This module allows to add an icon after phone numbers. A click on this icon will call a server with a particular URL you define below. This can be used to call a call center system from Dolibarr that can call the phone number on a SIP system for example. ##### Point Of Sales (CashDesk) ##### diff --git a/htdocs/langs/hr_HR/agenda.lang b/htdocs/langs/hr_HR/agenda.lang index 3d7e596b545..1260c003f9d 100644 --- a/htdocs/langs/hr_HR/agenda.lang +++ b/htdocs/langs/hr_HR/agenda.lang @@ -43,7 +43,7 @@ InvoiceBackToDraftInDolibarr=Račun %s vraćen u status skice InvoiceDeleteDolibarr=Račun %s obrisan OrderValidatedInDolibarr= Narudžba %s ovjerena OrderApprovedInDolibarr=Narudžba %s odobrena -OrderRefusedInDolibarr=Order %s refused +OrderRefusedInDolibarr=Narudžba %s je odbijena OrderBackToDraftInDolibarr=Narudžba %s vraćena u status skice OrderCanceledInDolibarr=Narudžba %s otkazana InterventionValidatedInDolibarr=Intervencija %s ovjerena @@ -53,7 +53,7 @@ InvoiceSentByEMail=Račun kupca %s poslan Emailom SupplierOrderSentByEMail=Narudžba dobavljača %s poslana Emailom SupplierInvoiceSentByEMail=Račun dobavljača %s poslan Emailom ShippingSentByEMail=Dostava %s poslana putem Emaila -ShippingValidated= Shipping %s validated +ShippingValidated= Pošiljka %s je ovjerena InterventionSentByEMail=Intervencija %s poslana putem Emaila NewCompanyToDolibarr= Treća stranka stvorena DateActionPlannedStart= Planirani početni datum diff --git a/htdocs/langs/hr_HR/bills.lang b/htdocs/langs/hr_HR/bills.lang index 5dbb169d4fb..bd0b6e8aff9 100644 --- a/htdocs/langs/hr_HR/bills.lang +++ b/htdocs/langs/hr_HR/bills.lang @@ -23,10 +23,10 @@ InvoiceProFormaAsk=Predračun InvoiceProFormaDesc= Predračun je kopija pravog računa, ali nema knjigovodstvene vrijednosti. InvoiceReplacement=Zamjenski račun InvoiceReplacementAsk=Zamjenski račun za račun -InvoiceReplacementDesc=Replacement invoice is used to cancel and replace completely an invoice with no payment already received.

    Note: Only invoices with no payment on it can be replaced. If the invoice you replace is not yet closed, it will be automatically closed to 'abandoned'. +InvoiceReplacementDesc=Zamjenski računkoristi se za opozivanje i zamjenu postojećeg računa koji još nije plaćen.

    Bilješka: Mogu biti zamijenjeni samo računi uz koje nije vezano nikakvo plaćanje. Ako račun kojeg mijenjate nije još zatvoren, bit će samostalno zatvoren kao "napušten". InvoiceAvoir=Bonifikacija InvoiceAvoirAsk=Bonifikacija za ispravan račun -InvoiceAvoirDesc=The credit note is a negative invoice used to solve fact that an invoice has an amount that differs than amount really paid (because customer paid too much by error, or will not paid completely since he returned some products for example). +InvoiceAvoirDesc=kredit je negativan račun koji se koristi prilikom riješavanja problema koji nastaje kada je na računu drugačiji iznos od plaćenog (npr. kada je kupac uplatio više greškom ili neće platiti sve jer je jedan dio proizvoda vratio). invoiceAvoirWithLines=Create Credit Note with lines from the origin invoice invoiceAvoirWithPaymentRestAmount=Create Credit Note with the amount of origin invoice payment's lake invoiceAvoirLineWithPaymentRestAmount=Credit Note amount of invoice payment's lake @@ -80,7 +80,7 @@ PaymentAmount=Iznos plaćanja ValidatePayment=Ovjeri plaćanje PaymentHigherThanReminderToPay=Plaćanje je veće nego podsjetnik za plaćanje HelpPaymentHigherThanReminderToPay=Attention, the payment amount of one or more bills is higher than the rest to pay.
    Edit your entry, otherwise confirm and think about creating a credit note of the excess received for each overpaid invoices. -HelpPaymentHigherThanReminderToPaySupplier=Attention, the payment amount of one or more bills is higher than the rest to pay.
    Edit your entry, otherwise confirm. +HelpPaymentHigherThanReminderToPaySupplier=Upozorenje! Iznos uplate za jedan ili više računa viši je od iznosa preostalog za plaćanje.
    izmjenite unos ili potvrdite. ClassifyPaid=Označi kao plaćeno ClassifyPaidPartially=Označi kao djelomično plaćeno ClassifyCanceled=Označi kao napušteno @@ -160,7 +160,7 @@ ConfirmClassifyPaidPartiallyReasonDiscountNoVat=Remainder to pay (%s %s) ConfirmClassifyPaidPartiallyReasonDiscountVat=Remainder to pay (%s %s) is a discount granted because payment was made before term. I recover the VAT on this discount without a credit note. ConfirmClassifyPaidPartiallyReasonBadCustomer=Loš kupac ConfirmClassifyPaidPartiallyReasonProductReturned=Proizvod djelomično vraćen -ConfirmClassifyPaidPartiallyReasonOther=Amount abandoned for other reason +ConfirmClassifyPaidPartiallyReasonOther=Iznos otpisan iz drugih razloga ConfirmClassifyPaidPartiallyReasonDiscountNoVatDesc=This choice is possible if your invoice have been provided with suitable comment. (Example «Only the tax corresponding to the price that have been actually paid gives rights to deduction») ConfirmClassifyPaidPartiallyReasonDiscountVatDesc=In some countries, this choice might be possible only if your invoice contains correct note. ConfirmClassifyPaidPartiallyReasonAvoirDesc=Koristi ovaj izbor ako ni jedan drugi nije odgovarajući @@ -169,7 +169,7 @@ ConfirmClassifyPaidPartiallyReasonProductReturnedDesc=Ovaj izbor se koristi kada ConfirmClassifyPaidPartiallyReasonOtherDesc=Use this choice if all other does not suit, for example in following situation:
    - payment not complete because some products were shipped back
    - amount claimed too important because a discount was forgotten
    In all cases, amount over-claimed must be corrected in accountancy system by creating a credit note. ConfirmClassifyAbandonReasonOther=Drugo ConfirmClassifyAbandonReasonOtherDesc=This choice will be used in all other cases. For example because you plan to create a replacing invoice. -ConfirmCustomerPayment=Do you confirm this payment input for %s %s ? +ConfirmCustomerPayment=Potvrđujete li ovo plaćanje za %s %s ? ConfirmSupplierPayment=Imate li potvrdu ove unušene uplata %s %s ? ConfirmValidatePayment=Are you sure you want to validate this payment ? No change can be made once payment is validated. ValidateBill=Ovjeri račun @@ -195,8 +195,8 @@ RemainderToTake=Podsjetnik za uzimanje RemainderToPayBack=Podsjetnik za povrat Rest=U toku AmountExpected=Utvrđen iznos -ExcessReceived=Excess received -EscompteOffered=Discount offered (payment before term) +ExcessReceived=Previše primljeno +EscompteOffered=Ponuđen je popust (za plaćanje prije dospijeća) SendBillRef=Pošalji račun %s SendReminderBillRef=Pošalji račun %s (podsjetnik) StandingOrders=Otvorene narudžbe @@ -220,7 +220,7 @@ SupplierBillsToPay=Računi dobavljača za plaćanje CustomerBillsUnpaid=Neplaćeni računi za kupce DispenseMontantLettres=The bill drafted by mechanographical are exempt from the order in letters DispenseMontantLettres=The bill drafted by mechanographical are exempt from the order in letters -NonPercuRecuperable=Non-recoverable +NonPercuRecuperable=Nepovratno SetConditions=Odredi rok plaćanja SetMode=Odredi oblik plaćanja Billed=Nplaćeno @@ -249,15 +249,15 @@ AddGlobalDiscount=Izradi apsolutni popust EditGlobalDiscounts=Izmjeni apsolutni popust AddCreditNote=Izradi bonifikaciju ShowDiscount=Prikaži popust -ShowReduc=Show the deduction +ShowReduc=Prikaži odbitak RelativeDiscount=Relativni popust -GlobalDiscount=Global discount +GlobalDiscount=Opći popust CreditNote=Bonifikacija CreditNotes=Bonifikacija Deposit=Polog Deposits=Polozi DiscountFromCreditNote=Popust iz bonifikacije %s -DiscountFromDeposit=Payments from deposit invoice %s +DiscountFromDeposit=Plaćanja s računa za predujam %s AbsoluteDiscountUse=This kind of credit can be used on invoice before its validation CreditNoteDepositUse=Invoice must be validated to use this king of credits NewGlobalDiscount=Novi apsolutni popust @@ -281,7 +281,7 @@ InvoiceNote=Bilješka računa InvoicePaid=Račun plaćen PaymentNumber=Broj plaćanja RemoveDiscount=Ukloni popust -WatermarkOnDraftBill=Watermark on draft invoices (nothing if empty) +WatermarkOnDraftBill=Vodeni žig na računu (ništa ako se ostavi prazno) InvoiceNotChecked=Račun nije izabran CloneInvoice=Kloniraj račun ConfirmCloneInvoice=Jeste li sigurni da želite klonirati ovaj račun %s? @@ -315,12 +315,11 @@ PaymentConditionShortPT_5050=50-50 PaymentConditionPT_5050=50%% unaprijed, 50%% nakon isporuke FixAmount=Utvrđeni iznos VarAmount=Variable amount (%% tot.) - # PaymentType PaymentTypeVIR=Bankovni polog PaymentTypeShortVIR=Bankovni polog -PaymentTypePRE=Bank's order -PaymentTypeShortPRE=Bank's order +PaymentTypePRE=Narudžbenica banke +PaymentTypeShortPRE=Narudžbenica banke PaymentTypeLIQ=Gotovina PaymentTypeShortLIQ=Gotovina PaymentTypeCB=Kreditna kartica @@ -398,7 +397,7 @@ ListOfYourUnpaidInvoices=Popis neplaćenih računa NoteListOfYourUnpaidInvoices=Napomena: Ovaj popis sadrži samo račune za treće osobe kojima ste vi prodajni predstavnik RevenueStamp=Revenue stamp YouMustCreateInvoiceFromThird=This option is only available when creating invoice from tab "customer" of thirdparty -PDFCrabeDescription=Invoice PDF template Crabe. A complete invoice template (recommended Template) +PDFCrabeDescription="Crabe" predložak PDF računa. Potpuni predložak računa (preporučeni) TerreNumRefModelDesc1=Return number with format %syymm-nnnn for standard invoices and %syymm-nnnn for credit notes where yy is year, mm is month and nnnn is a sequence with no break and no return to 0 MarsNumRefModelDesc1=Return number with format %syymm-nnnn for standard invoices, %syymm-nnnn for replacement invoices, %syymm-nnnn for credit notes and %syymm-nnnn for credit notes where yy is year, mm is month and nnnn is a sequence with no break and no return to 0 TerreNumRefModelError=A bill starting with $syymm already exists and is not compatible with this model of sequence. Remove it or rename it to activate this module. @@ -407,7 +406,7 @@ TypeContact_facture_internal_SALESREPFOLL=Representative following-up customer i TypeContact_facture_external_BILLING=Kontakt osoba za račun TypeContact_facture_external_SHIPPING=Kontakt osoba za isporuku TypeContact_facture_external_SERVICE=Kontakt osoba za usluge kupcima -TypeContact_invoice_supplier_internal_SALESREPFOLL=Representative following-up supplier invoice -TypeContact_invoice_supplier_external_BILLING=Supplier invoice contact -TypeContact_invoice_supplier_external_SHIPPING=Supplier shipping contact -TypeContact_invoice_supplier_external_SERVICE=Supplier service contact +TypeContact_invoice_supplier_internal_SALESREPFOLL=Predstavnik koji prati račun dobavljača +TypeContact_invoice_supplier_external_BILLING=Osoba za račune pri dobavljaču +TypeContact_invoice_supplier_external_SHIPPING=Osoba za pošiljke pri dobavljaču +TypeContact_invoice_supplier_external_SERVICE=Osoba za usluge pri dobavljaču diff --git a/htdocs/langs/hr_HR/companies.lang b/htdocs/langs/hr_HR/companies.lang index e92b8a890db..3e8c44ebcd6 100644 --- a/htdocs/langs/hr_HR/companies.lang +++ b/htdocs/langs/hr_HR/companies.lang @@ -1,10 +1,10 @@ # Dolibarr language file - Source file is en_US - companies ErrorCompanyNameAlreadyExists=Ime poduzeća %s već postoji. Odaberite drugo. ErrorPrefixAlreadyExists=Prefiks %s već postoji. Molimo izaberite drugo ime. -ErrorSetACountryFirst=Odaberite državu prvo -SelectThirdParty=Odaberite treću stranku +ErrorSetACountryFirst=Odaberite prvo državu +SelectThirdParty=Odaberite treću osobu DeleteThirdParty=Izbrišite treću stranku -ConfirmDeleteCompany=Jeste li sigurni da želite izbrisati ovu kompaniju i sve njezine nasljeđene podatke? +ConfirmDeleteCompany=Jeste li sigurni da želite izbrisati ovu poduzeće i sve njezine nasljeđene podatke? DeleteContact=Izbriši kontakt/adresu. ConfirmDeleteContact=Jeste li sigurni da želite izbrisati ovaj kontakt i sve nasljeđene informacije? MenuNewThirdParty=Nova treća strana @@ -18,23 +18,24 @@ NewCompany=Nova kompanija(potencijalni kupac, kupac, dobavljač) NewThirdParty=Nova stranka(potencijalni kupac, kupac, dobavljač) NewSocGroup=Nova grupa kompanija NewPrivateIndividual=Nova privatna osoba(potencijalni kupac, kupac, dobavljač) -# ProspectionArea=Prospection area +CreateDolibarrThirdPartySupplier=Create a third party (supplier) +ProspectionArea=Prospection area SocGroup=Grupa kompanija IdThirdParty=Id treće strane IdCompany=Id kompanije IdContact=Id kontakta Contacts=Kontakti/Adrese ThirdPartyContacts=Kontakti treće stranke -# ThirdPartyContact=Third party contact/address -# StatusContactValidated=Status of contact/address +ThirdPartyContact=Third party contact/address +StatusContactValidated=Status of contact/address Company=Kompanija CompanyName=Ime kompanije Companies=Kompanije -# CountryIsInEEC=Country is inside European Economic Community +CountryIsInEEC=Country is inside European Economic Community ThirdPartyName=Ime treće stranke -# ThirdParty=Third party -# ThirdParties=Third parties -# ThirdPartyAll=Third parties (all) +ThirdParty=Third party +ThirdParties=Third parties +ThirdPartyAll=Third parties (all) ThirdPartyProspects=Potencijalni kupac ThirdPartyProspectsStats=Potencijalni kupci ThirdPartyCustomers=Kupci @@ -44,21 +45,21 @@ ThirdPartySuppliers=Dobavljači ThirdPartyType=Tip treće stane Company/Fundation=Kompanija/fundacija Individual=Privatna osoba -# ToCreateContactWithSameName=Will create automatically a physical contact with same informations +ToCreateContactWithSameName=Will create automatically a physical contact with same informations ParentCompany=Kompanija vlasnik Subsidiary=Podružnica Subsidiaries=Podružnice NoSubsidiary=Nema podružnica ReportByCustomers=Izvještaj od kupaca -# ReportByQuarter=Report by rate -# CivilityCode=Civility code -# RegisteredOffice=Registered office +ReportByQuarter=Report by rate +CivilityCode=Civility code +RegisteredOffice=Registered office Name=Ime Lastname=Prezime Firstname=Ime PostOrFunction=Pozicija/Funkcija UserTitle=Titula -# Surname=Surname/Pseudo +Surname=Surname/Pseudo Address=Adresa State=Država/provincija Region=Regija @@ -81,178 +82,178 @@ Poste= Pozicija DefaultLang=Primarni jezik VATIsUsed=Porez se koristi VATIsNotUsed=Porez se ne korisit -# CopyAddressFromSoc=Fill address with thirdparty address +CopyAddressFromSoc=Fill address with thirdparty address NoEmailDefined=Nema definirane email adrese ##### Local Taxes ##### -# LocalTax1IsUsedES= RE is used -# LocalTax1IsNotUsedES= RE is not used -# LocalTax2IsUsedES= IRPF is used -# LocalTax2IsNotUsedES= IRPF is not used -# LocalTax1ES=RE -# LocalTax2ES=IRPF +LocalTax1IsUsedES= RE is used +LocalTax1IsNotUsedES= RE is not used +LocalTax2IsUsedES= IRPF is used +LocalTax2IsNotUsedES= IRPF is not used +LocalTax1ES=RE +LocalTax2ES=IRPF ThirdPartyEMail=%s -# WrongCustomerCode=Customer code invalid -# WrongSupplierCode=Supplier code invalid -# CustomerCodeModel=Customer code model -# SupplierCodeModel=Supplier code model -# Gencod=Bar code +WrongCustomerCode=Customer code invalid +WrongSupplierCode=Supplier code invalid +CustomerCodeModel=Customer code model +SupplierCodeModel=Supplier code model +Gencod=Bar code ##### Professional ID ##### -# ProfId1Short=Prof. id 1 -# ProfId2Short=Prof. id 2 -# ProfId3Short=Prof. id 3 -# ProfId4Short=Prof. id 4 -# ProfId5Short=Prof. id 5 -# ProfId6Short=Prof. id 5 -# ProfId1=Professional ID 1 -# ProfId2=Professional ID 2 -# ProfId3=Professional ID 3 -# ProfId4=Professional ID 4 -# ProfId5=Professional ID 5 -# ProfId6=Professional ID 6 -# ProfId1AR=Prof Id 1 (CUIT/CUIL) -# ProfId2AR=Prof Id 2 (Revenu brutes) +ProfId1Short=Prof. id 1 +ProfId2Short=Prof. id 2 +ProfId3Short=Prof. id 3 +ProfId4Short=Prof. id 4 +ProfId5Short=Prof. id 5 +ProfId6Short=Prof. id 5 +ProfId1=Professional ID 1 +ProfId2=Professional ID 2 +ProfId3=Professional ID 3 +ProfId4=Professional ID 4 +ProfId5=Professional ID 5 +ProfId6=Professional ID 6 +ProfId1AR=Prof Id 1 (CUIT/CUIL) +ProfId2AR=Prof Id 2 (Revenu brutes) ProfId3AR=- ProfId4AR=- -# ProfId5AR=- -# ProfId6AR=- -# ProfId1AU=Prof Id 1 (ABN) +ProfId5AR=- +ProfId6AR=- +ProfId1AU=Prof Id 1 (ABN) ProfId2AU=- ProfId3AU=- ProfId4AU=- ProfId5AU=- ProfId6AU=- -# ProfId1BE=Prof Id 1 (Professional number) +ProfId1BE=Prof Id 1 (Professional number) ProfId2BE=- ProfId3BE=- ProfId4BE=- ProfId5BE=- ProfId6BE=- ProfId1BR=- -# ProfId2BR=IE (Inscricao Estadual) -# ProfId3BR=IM (Inscricao Municipal) -# ProfId4BR=CPF +ProfId2BR=IE (Inscricao Estadual) +ProfId3BR=IM (Inscricao Municipal) +ProfId4BR=CPF #ProfId5BR=CNAE #ProfId6BR=INSS ProfId1CH=- ProfId2CH=- -# ProfId3CH=Prof Id 1 (Federal number) -# ProfId4CH=Prof Id 2 (Commercial Record number) +ProfId3CH=Prof Id 1 (Federal number) +ProfId4CH=Prof Id 2 (Commercial Record number) ProfId5CH=- ProfId6CH=- -# ProfId1CL=Prof Id 1 (R.U.T.) +ProfId1CL=Prof Id 1 (R.U.T.) ProfId2CL=- ProfId3CL=- ProfId4CL=- ProfId5CL=- ProfId6CL=- -# ProfId1CO=Prof Id 1 (R.U.T.) +ProfId1CO=Prof Id 1 (R.U.T.) ProfId2CO=- ProfId3CO=- ProfId4CO=- ProfId5CO=- ProfId6CO=- -# ProfId1DE=Prof Id 1 (USt.-IdNr) -# ProfId2DE=Prof Id 2 (USt.-Nr) -# ProfId3DE=Prof Id 3 (Handelsregister-Nr.) +ProfId1DE=Prof Id 1 (USt.-IdNr) +ProfId2DE=Prof Id 2 (USt.-Nr) +ProfId3DE=Prof Id 3 (Handelsregister-Nr.) ProfId4DE=- ProfId5DE=- ProfId6DE=- -# ProfId1ES=Prof Id 1 (CIF/NIF) -# ProfId2ES=Prof Id 2 (Social security number) -# ProfId3ES=Prof Id 3 (CNAE) -# ProfId4ES=Prof Id 4 (Collegiate number) +ProfId1ES=Prof Id 1 (CIF/NIF) +ProfId2ES=Prof Id 2 (Social security number) +ProfId3ES=Prof Id 3 (CNAE) +ProfId4ES=Prof Id 4 (Collegiate number) ProfId5ES=- ProfId6ES=- -# ProfId1FR=Prof Id 1 (SIREN) -# ProfId2FR=Prof Id 2 (SIRET) -# ProfId3FR=Prof Id 3 (NAF, old APE) -# ProfId4FR=Prof Id 4 (RCS/RM) +ProfId1FR=Prof Id 1 (SIREN) +ProfId2FR=Prof Id 2 (SIRET) +ProfId3FR=Prof Id 3 (NAF, old APE) +ProfId4FR=Prof Id 4 (RCS/RM) ProfId5FR=- ProfId6FR=- -# ProfId1GB=Registration Number +ProfId1GB=Registration Number ProfId2GB=- -# ProfId3GB=SIC +ProfId3GB=SIC ProfId4GB=- ProfId5GB=- ProfId6GB=- -# ProfId1HN=Id prof. 1 (RTN) +ProfId1HN=Id prof. 1 (RTN) ProfId2HN=- ProfId3HN=- ProfId4HN=- ProfId5HN=- ProfId6HN=- -# ProfId1IN=Prof Id 1 (TIN) -# ProfId2IN=Prof Id 2 (PAN) -# ProfId3IN=Prof Id 3 (SRVC TAX) -# ProfId4IN=Prof Id 4 -# ProfId5IN=Prof Id 5 +ProfId1IN=Prof Id 1 (TIN) +ProfId2IN=Prof Id 2 (PAN) +ProfId3IN=Prof Id 3 (SRVC TAX) +ProfId4IN=Prof Id 4 +ProfId5IN=Prof Id 5 ProfId6IN=- -# ProfId1MA=Id prof. 1 (R.C.) -# ProfId2MA=Id prof. 2 (Patente) -# ProfId3MA=Id prof. 3 (I.F.) -# ProfId4MA=Id prof. 4 (C.N.S.S.) +ProfId1MA=Id prof. 1 (R.C.) +ProfId2MA=Id prof. 2 (Patente) +ProfId3MA=Id prof. 3 (I.F.) +ProfId4MA=Id prof. 4 (C.N.S.S.) ProfId5MA=- ProfId6MA=- -# ProfId1MX=Prof Id 1 (R.F.C). -# ProfId2MX=Prof Id 2 (R..P. IMSS) -# ProfId3MX=Prof Id 3 (Profesional Charter) +ProfId1MX=Prof Id 1 (R.F.C). +ProfId2MX=Prof Id 2 (R..P. IMSS) +ProfId3MX=Prof Id 3 (Profesional Charter) ProfId4MX=- ProfId5MX=- ProfId6MX=- -# ProfId1NL=KVK nummer +ProfId1NL=KVK nummer ProfId2NL=- ProfId3NL=- -# ProfId4NL=Burgerservicenummer (BSN) +ProfId4NL=Burgerservicenummer (BSN) ProfId5NL=- ProfId6NL=- -# ProfId1PT=Prof Id 1 (NIPC) -# ProfId2PT=Prof Id 2 (Social security number) -# ProfId3PT=Prof Id 3 (Commercial Record number) -# ProfId4PT=Prof Id 4 (Conservatory) +ProfId1PT=Prof Id 1 (NIPC) +ProfId2PT=Prof Id 2 (Social security number) +ProfId3PT=Prof Id 3 (Commercial Record number) +ProfId4PT=Prof Id 4 (Conservatory) ProfId5PT=- ProfId6PT=- -# ProfId1SN=RC -# ProfId2SN=NINEA +ProfId1SN=RC +ProfId2SN=NINEA ProfId3SN=- ProfId4SN=- ProfId5SN=- ProfId6SN=- -# ProfId1TN=Prof Id 1 (RC) -# ProfId2TN=Prof Id 2 (Fiscal matricule) -# ProfId3TN=Prof Id 3 (Douane code) -# ProfId4TN=Prof Id 4 (BAN) +ProfId1TN=Prof Id 1 (RC) +ProfId2TN=Prof Id 2 (Fiscal matricule) +ProfId3TN=Prof Id 3 (Douane code) +ProfId4TN=Prof Id 4 (BAN) ProfId5TN=- ProfId6TN=- -# ProfId1RU=Prof Id 1 (OGRN) -# ProfId2RU=Prof Id 2 (INN) -# ProfId3RU=Prof Id 3 (KPP) -# ProfId4RU=Prof Id 4 (OKPO) +ProfId1RU=Prof Id 1 (OGRN) +ProfId2RU=Prof Id 2 (INN) +ProfId3RU=Prof Id 3 (KPP) +ProfId4RU=Prof Id 4 (OKPO) ProfId5RU=- ProfId6RU=- VATIntra=Porezni broj VATIntraShort=Porezni broj VATIntraVeryShort=Porez -# VATIntraSyntaxIsValid=Syntax is valid -# VATIntraValueIsValid=Value is valid -# ProspectCustomer=Prospect / Customer -# Prospect=Prospect -# CustomerCard=Customer Card +VATIntraSyntaxIsValid=Syntax is valid +VATIntraValueIsValid=Value is valid +ProspectCustomer=Prospect / Customer +Prospect=Prospect +CustomerCard=Customer Card Customer=Kupac CustomerDiscount=Popust za kupca -# CustomerRelativeDiscount=Relative customer discount -# CustomerAbsoluteDiscount=Absolute customer discount -# CustomerRelativeDiscountShort=Relative discount -# CustomerAbsoluteDiscountShort=Absolute discount -# CompanyHasRelativeDiscount=This customer has a default discount of %s%% -# CompanyHasNoRelativeDiscount=This customer has no relative discount by default -# CompanyHasAbsoluteDiscount=This customer still has discount credits or deposits for %s %s -# CompanyHasCreditNote=This customer still has credit notes for %s %s -# CompanyHasNoAbsoluteDiscount=This customer has no discount credit available -# CustomerAbsoluteDiscountAllUsers=Absolute discounts (granted by all users) -# CustomerAbsoluteDiscountMy=Absolute discounts (granted by yourself) -# DefaultDiscount=Default discount -# AvailableGlobalDiscounts=Absolute discounts available -# DiscountNone=None +CustomerRelativeDiscount=Relative customer discount +CustomerAbsoluteDiscount=Absolute customer discount +CustomerRelativeDiscountShort=Relative discount +CustomerAbsoluteDiscountShort=Absolute discount +CompanyHasRelativeDiscount=This customer has a default discount of %s%% +CompanyHasNoRelativeDiscount=This customer has no relative discount by default +CompanyHasAbsoluteDiscount=This customer still has discount credits or deposits for %s %s +CompanyHasCreditNote=This customer still has credit notes for %s %s +CompanyHasNoAbsoluteDiscount=This customer has no discount credit available +CustomerAbsoluteDiscountAllUsers=Absolute discounts (granted by all users) +CustomerAbsoluteDiscountMy=Absolute discounts (granted by yourself) +DefaultDiscount=Default discount +AvailableGlobalDiscounts=Absolute discounts available +DiscountNone=None Supplier=Dobavljač CompanyList=Lista kompanija AddContact=Dodaj kontakt @@ -262,47 +263,47 @@ EditContactAddress=Uredi kontakt/adresu Contact=Kontakt ContactsAddresses=Kontakt/adrese NoContactDefinedForThirdParty=Nema kontakta za ovo stranku -# NoContactDefined=No contact defined -# DefaultContact=Default contact/address +NoContactDefined=No contact defined +DefaultContact=Default contact/address AddCompany=Dodaj firmu -# AddThirdParty=Add third party +AddThirdParty=Add third party DeleteACompany=Izbriši firmu -# PersonalInformations=Personal data -# AccountancyCode=Accountancy code -# CustomerCode=Customer code -# SupplierCode=Supplier code +PersonalInformations=Personal data +AccountancyCode=Accountancy code +CustomerCode=Customer code +SupplierCode=Supplier code CustomerAccount=Rečun kupca SupplierAccount=Račun dobavljača -# CustomerCodeDesc=Customer code, unique for all customers -# SupplierCodeDesc=Supplier code, unique for all suppliers -# RequiredIfCustomer=Required if third party is a customer or prospect -# RequiredIfSupplier=Required if third party is a supplier -# ValidityControledByModule=Validity controled by module -# ThisIsModuleRules=This is rules for this module +CustomerCodeDesc=Customer code, unique for all customers +SupplierCodeDesc=Supplier code, unique for all suppliers +RequiredIfCustomer=Required if third party is a customer or prospect +RequiredIfSupplier=Required if third party is a supplier +ValidityControledByModule=Validity controled by module +ThisIsModuleRules=This is rules for this module LastProspect=Zadnje -# ProspectToContact=Prospect to contact -# CompanyDeleted=Company "%s" deleted from database. -# ListOfContacts=List of contacts/addresses -# ListOfContactsAddresses=List of contacts/adresses -# ListOfProspectsContacts=List of prospect contacts -# ListOfCustomersContacts=List of customer contacts -# ListOfSuppliersContacts=List of supplier contacts -# ListOfCompanies=List of companies -# ListOfThirdParties=List of third parties +ProspectToContact=Prospect to contact +CompanyDeleted=Company "%s" deleted from database. +ListOfContacts=List of contacts/addresses +ListOfContactsAddresses=List of contacts/adresses +ListOfProspectsContacts=List of prospect contacts +ListOfCustomersContacts=List of customer contacts +ListOfSuppliersContacts=List of supplier contacts +ListOfCompanies=List of companies +ListOfThirdParties=List of third parties ShowCompany=Prikaži kompaniju ShowContact=Prikaži kontakt ContactsAllShort=Sve(bez filtera) ContactType=Tip kontakta -# ContactForOrders=Order's contact -# ContactForProposals=Proposal's contact -# ContactForContracts=Contract's contact -# ContactForInvoices=Invoice's contact -# NoContactForAnyOrder=This contact is not a contact for any order -# NoContactForAnyProposal=This contact is not a contact for any commercial proposal -# NoContactForAnyContract=This contact is not a contact for any contract -# NoContactForAnyInvoice=This contact is not a contact for any invoice -# NewContact=New contact -# NewContactAddress=New contact/address +ContactForOrders=Order's contact +ContactForProposals=Proposal's contact +ContactForContracts=Contract's contact +ContactForInvoices=Invoice's contact +NoContactForAnyOrder=This contact is not a contact for any order +NoContactForAnyProposal=This contact is not a contact for any commercial proposal +NoContactForAnyContract=This contact is not a contact for any contract +NoContactForAnyInvoice=This contact is not a contact for any invoice +NewContact=New contact +NewContactAddress=New contact/address LastContacts=Zadnji kontakti MyContacts=Moji kontakti Phones=Telefoni @@ -312,34 +313,34 @@ EditCompany=Uredi firmu EditDeliveryAddress=Uredi adresu dostave ThisUserIsNot=Ovaj korisnik nije ni potencijalni kupac, kupac ni dobavljač VATIntraCheck=Ček -# VATIntraCheckDesc=The link %s allows to ask the european VAT checker service. An external internet access from server is required for this service to work. +VATIntraCheckDesc=The link %s allows to ask the european VAT checker service. An external internet access from server is required for this service to work. VATIntraCheckURL=http://ec.europa.eu/taxation_customs/vies/vieshome.do -# VATIntraCheckableOnEUSite=Check Intracomunnautary VAT on European commision site -# VATIntraManualCheck=You can also check manually from european web site %s -# ErrorVATCheckMS_UNAVAILABLE=Check not possible. Check service is not provided by the member state (%s). -# NorProspectNorCustomer=Nor prospect, nor customer -# JuridicalStatus=Juridical status -# Staff=Staff -# ProspectLevelShort=Potential -# ProspectLevel=Prospect potential -# ContactPrivate=Private -# ContactPublic=Shared -# ContactVisibility=Visibility -# OthersNotLinkedToThirdParty=Others, not linked to a third party -# ProspectStatus=Prospect status -# PL_NONE=None -# PL_UNKNOWN=Unknown -# PL_LOW=Low -# PL_MEDIUM=Medium -# PL_HIGH=High +VATIntraCheckableOnEUSite=Check Intracomunnautary VAT on European commision site +VATIntraManualCheck=You can also check manually from european web site %s +ErrorVATCheckMS_UNAVAILABLE=Check not possible. Check service is not provided by the member state (%s). +NorProspectNorCustomer=Nor prospect, nor customer +JuridicalStatus=Juridical status +Staff=Staff +ProspectLevelShort=Potential +ProspectLevel=Prospect potential +ContactPrivate=Private +ContactPublic=Shared +ContactVisibility=Visibility +OthersNotLinkedToThirdParty=Others, not linked to a third party +ProspectStatus=Prospect status +PL_NONE=None +PL_UNKNOWN=Unknown +PL_LOW=Low +PL_MEDIUM=Medium +PL_HIGH=High TE_UNKNOWN=- -# TE_STARTUP=Startup +TE_STARTUP=Startup TE_GROUP=Velika kompanija TE_MEDIUM=Srednja kompanija TE_ADMIN=Državna firma TE_SMALL=Mala komanija TE_RETAIL=Preprodavač -# TE_WHOLE=Wholetailer +TE_WHOLE=Wholetailer TE_PRIVATE=Privatna osoba TE_OTHER=Drugo StatusProspect-1=Nemoj kontaktirati @@ -350,38 +351,38 @@ StatusProspect3=Završen kontakt ChangeDoNotContact=Promjeni u status "nemoj kontaktirat" ChangeNeverContacted=Promjeni status u 'nikad kontaktiran' ChangeToContact=Promjeni status u 'treba kontaktirat' -# ChangeContactInProcess=Change status to 'Contact in process' -# ChangeContactDone=Change status to 'Contact done' -# ProspectsByStatus=Prospects by status -# BillingContact=Billing contact -# NbOfAttachedFiles=Number of attached files -# AttachANewFile=Attach a new file -# NoRIB=No BAN defined -# NoParentCompany=None +ChangeContactInProcess=Change status to 'Contact in process' +ChangeContactDone=Change status to 'Contact done' +ProspectsByStatus=Prospects by status +BillingContact=Billing contact +NbOfAttachedFiles=Number of attached files +AttachANewFile=Attach a new file +NoRIB=No BAN defined +NoParentCompany=None ExportImport=Uvoz-izvoz -# ExportCardToFormat=Export card to format -# ContactNotLinkedToCompany=Contact not linked to any third party -# DolibarrLogin=Dolibarr login -# NoDolibarrAccess=No Dolibarr access -# ExportDataset_company_1=Third parties (Companies/foundations/physical people) and properties -# ExportDataset_company_2=Contacts and properties -# ImportDataset_company_1=Third parties (Companies/foundations/physical people) and properties -# ImportDataset_company_2=Contacts/Addresses (of thirdparties or not) and attributes -# ImportDataset_company_3=Bank details -# PriceLevel=Price level +ExportCardToFormat=Export card to format +ContactNotLinkedToCompany=Contact not linked to any third party +DolibarrLogin=Dolibarr login +NoDolibarrAccess=No Dolibarr access +ExportDataset_company_1=Third parties (Companies/foundations/physical people) and properties +ExportDataset_company_2=Contacts and properties +ImportDataset_company_1=Third parties (Companies/foundations/physical people) and properties +ImportDataset_company_2=Contacts/Addresses (of thirdparties or not) and attributes +ImportDataset_company_3=Bank details +PriceLevel=Price level DeliveriesAddress=Adrese dostave DeliveryAddress=Adresa dostave -# DeliveryAddressLabel=Delivery address label +DeliveryAddressLabel=Delivery address label DeleteDeliveryAddress=IZbriši adresu dostave -# ConfirmDeleteDeliveryAddress=Are you sure you want to delete this delivery address? -# NewDeliveryAddress=New delivery address +ConfirmDeleteDeliveryAddress=Are you sure you want to delete this delivery address? +NewDeliveryAddress=New delivery address AddDeliveryAddress=Dodaj adresu AddAddress=Dodaj adresu -# NoOtherDeliveryAddress=No alternative delivery address defined +NoOtherDeliveryAddress=No alternative delivery address defined SupplierCategory=Kategorija dobavljača -# JuridicalStatus200=Independant +JuridicalStatus200=Independant DeleteFile=Izbriši datoteku -# ConfirmDeleteFile=Are you sure you want to delete this file? +ConfirmDeleteFile=Are you sure you want to delete this file? AllocateCommercial=Dodjeljen trgovačkom predstavniku SelectCountry=Odaberi državu SelectCompany=Odaberi treću stranu @@ -389,20 +390,20 @@ Organization=Organizacija AutomaticallyGenerated=Automatski generirano FiscalYearInformation=Informacije za fiskalnu godinu FiscalMonthStart=Početni mjesec fiskalne godine -# YouMustCreateContactFirst=You must create emails contacts for third party first to be able to add emails notifications. +YouMustCreateContactFirst=You must create emails contacts for third party first to be able to add emails notifications. ListSuppliersShort=Lista dobavljača ListProspectsShort=Lista potencijalnih kupaca ListCustomersShort=Lista kupaca -# ThirdPartiesArea=Third parties area -# LastModifiedThirdParties=Last %s modified third parties -# UniqueThirdParties=Total of unique third parties +ThirdPartiesArea=Third parties area +LastModifiedThirdParties=Last %s modified third parties +UniqueThirdParties=Total of unique third parties InActivity=Otvoren ActivityCeased=Zatvoren -# ActivityStateFilter=Activity status -# ProductsIntoElements=List of products into +ActivityStateFilter=Activity status +ProductsIntoElements=List of products into CurrentOutstandingBill=Trenutno otvoreni računi OutstandingBill=Maksimalno za otvorene račune OutstandingBillReached=Dosegnut je maksimalni iznos za otvorene stavke -# MonkeyNumRefModelDesc=Return numero with format %syymm-nnnn for customer code and %syymm-nnnn for supplier code where yy is year, mm is month and nnnn is a sequence with no break and no return to 0. +MonkeyNumRefModelDesc=Return numero with format %syymm-nnnn for customer code and %syymm-nnnn for supplier code where yy is year, mm is month and nnnn is a sequence with no break and no return to 0. LeopardNumRefModelDesc=Ova šifra je besplatne. Ova šifra se može modificirati u bilo koje vrijeme. -# ManagingDirectors=Manager(s) name (CEO, director, president...) +ManagingDirectors=Manager(s) name (CEO, director, president...) diff --git a/htdocs/langs/hr_HR/contracts.lang b/htdocs/langs/hr_HR/contracts.lang index 9f2a133c1ee..b5241ddd7f0 100644 --- a/htdocs/langs/hr_HR/contracts.lang +++ b/htdocs/langs/hr_HR/contracts.lang @@ -89,6 +89,8 @@ ListOfServicesToExpireWithDuration=Lista usluga koja ističe za %s dana ListOfServicesToExpireWithDurationNeg=Lista usluga koji ističe za više od %s dana ListOfServicesToExpire=Lista usluga koja ističe NoteListOfYourExpiredServices=Ova lista sadrži samo usluge kontakata treće strane sa kojima ste linkani kao prodajni predstavnik +StandardContractsTemplate=Predložak uobičajenog ugovora +ContactNameAndSignature=Za %s, ime i potpis ##### Types de contacts ##### TypeContact_contrat_internal_SALESREPSIGN=Predstavnik trgovca potpisuje ugovor diff --git a/htdocs/langs/hr_HR/deliveries.lang b/htdocs/langs/hr_HR/deliveries.lang index f73e51fe38f..89a43f02189 100644 --- a/htdocs/langs/hr_HR/deliveries.lang +++ b/htdocs/langs/hr_HR/deliveries.lang @@ -23,4 +23,4 @@ GoodStatusDeclaration=Primljenje su stavke navedene iznad u dobrom stanju, Deliverer=Dostavljač: Sender=Pošiljatelj Recipient=Primatelj -# ErrorStockIsNotEnough=There's not enough stock +ErrorStockIsNotEnough=Nema dovoljno robe na skladištu diff --git a/htdocs/langs/hr_HR/exports.lang b/htdocs/langs/hr_HR/exports.lang index 09915556286..3acad0d32cd 100644 --- a/htdocs/langs/hr_HR/exports.lang +++ b/htdocs/langs/hr_HR/exports.lang @@ -1,134 +1,134 @@ # Dolibarr language file - Source file is en_US - exports -# ExportsArea=Exports area -# ImportArea=Import area -# NewExport=New export -# NewImport=New import -# ExportableDatas=Exportable dataset -# ImportableDatas=Importable dataset -# SelectExportDataSet=Choose dataset you want to export... -# SelectImportDataSet=Choose dataset you want to import... -# SelectExportFields=Choose fields you want to export, or select a predefined export profile -# SelectImportFields=Choose source file fields you want to import and their target field in database by moving them up and down with anchor %s, or select a predefined import profil: -# NotImportedFields=Fields of source file not imported -# SaveExportModel=Save this export profile if you plan to reuse it later... -# SaveImportModel=Save this import profile if you plan to reuse it later... -# ExportModelName=Export profile name -# ExportModelSaved=Export profile saved under name %s. -# ExportableFields=Exportable fields -# ExportedFields=Exported fields -# ImportModelName=Import profile name -# ImportModelSaved=Import profile saved under name %s. -# ImportableFields=Importable fields -# ImportedFields=Imported fields -# DatasetToExport=Dataset to export -# DatasetToImport=Import file into dataset -# NoDiscardedFields=No fields in source file are discarded -# Dataset=Dataset -# ChooseFieldsOrdersAndTitle=Choose fields order... -# FieldsOrder=Fields order -# FieldsTitle=Fields title -# FieldOrder=Field order -# FieldTitle=Field title -# ChooseExportFormat=Choose export format -# NowClickToGenerateToBuildExportFile=Now, select file format in combo box and click on "Generate" to build export file... -# AvailableFormats=Available formats -# LibraryShort=Library -# LibraryUsed=Library used -# LibraryVersion=Version -# Step=Step -# FormatedImport=Import assistant -# FormatedImportDesc1=This area allows to import personalized data, using an assistant to help you in process without technical knowledge. -# FormatedImportDesc2=First step is to choose a king of data you want to load, then file to load, then to choose which fields you want to load. -# FormatedExport=Export assistant -# FormatedExportDesc1=This area allows to export personalized data, using an assistant to help you in process without technical knowledge. -# FormatedExportDesc2=First step is to choose a predefined dataset, then to choose which fields you want in your result files, and which order. -# FormatedExportDesc3=When data to export are selected, you can define output file format you want to export your data to. -# Sheet=Sheet -# NoImportableData=No importable data (no module with definitions to allow data imports) -# FileSuccessfullyBuilt=Export file generated -# SQLUsedForExport=SQL Request used to build export file -# LineId=Id of line -# LineDescription=Description of line -# LineUnitPrice=Unit price of line -# LineVATRate=VAT Rate of line -# LineQty=Quantity for line -# LineTotalHT=Amount net of tax for line -# LineTotalTTC=Amount with tax for line -# LineTotalVAT=Amount of VAT for line -# TypeOfLineServiceOrProduct=Type of line (0=product, 1=service) -# FileWithDataToImport=File with data to import -# FileToImport=Source file to import -# FileMustHaveOneOfFollowingFormat=File to import must have one of following format -# DownloadEmptyExample=Download example of empty source file -# ChooseFormatOfFileToImport=Choose file format to use as import file format by clicking on picto %s to select it... -# ChooseFileToImport=Upload file then click on picto %s to select file as source import file... -# SourceFileFormat=Source file format -# FieldsInSourceFile=Fields in source file -# FieldsInTargetDatabase=Target fields in Dolibarr database (bold=mandatory) -# Field=Field -# NoFields=No fields -# MoveField=Move field column number %s -# ExampleOfImportFile=Example_of_import_file -# SaveImportProfile=Save this import profile -# ErrorImportDuplicateProfil=Failed to save this import profile with this name. An existing profile already exists with this name. -# ImportSummary=Import setup summary -# TablesTarget=Targeted tables -# FieldsTarget=Targeted fields -# TableTarget=Targeted table -# FieldTarget=Targeted field -# FieldSource=Source field -# DoNotImportFirstLine=Do not import first line of source file -# NbOfSourceLines=Number of lines in source file -# NowClickToTestTheImport=Check import parameters you have defined. If they are correct, click on button "%s" to launch a simulation of import process (no data will be changed in your database, it's only a simulation for the moment)... -# RunSimulateImportFile=Launch the import simulation -# FieldNeedSource=This fiels in database require a data from source file -# SomeMandatoryFieldHaveNoSource=Some mandatory fields have no source from data file -# InformationOnSourceFile=Information on source file -# InformationOnTargetTables=Information on target fields -# SelectAtLeastOneField=Switch at least one source field in the column of fields to export -# SelectFormat=Choose this import file format -# RunImportFile=Launch import file -# NowClickToRunTheImport=Check result of import simulation. If everything is ok, launch the definitive import. -# DataLoadedWithId=All data will be loaded with the following import id: %s -# ErrorMissingMandatoryValue=Mandatory data is empty in source file for field %s. -# TooMuchErrors=There is still %s other source lines with errors but output has been limited. -# TooMuchWarnings=There is still %s other source lines with warnings but output has been limited. -# EmptyLine=Empty line (will be discarded) -# CorrectErrorBeforeRunningImport=You must first correct all errors before running definitive import. -# FileWasImported=File was imported with number %s. -# YouCanUseImportIdToFindRecord=You can find all imported records in your database by filtering on field import_key='%s'. -# NbOfLinesOK=Number of lines with no errors and no warnings: %s. -# NbOfLinesImported=Number of lines successfully imported: %s. -# DataComeFromNoWhere=Value to insert comes from nowhere in source file. -# DataComeFromFileFieldNb=Value to insert comes from field number %s in source file. -# DataComeFromIdFoundFromRef=Value that comes from field number %s of source file will be used to find id of parent object to use (So the objet %s that has the ref. from source file must exists into Dolibarr). -# DataComeFromIdFoundFromCodeId=Code that comes from field number %s of source file will be used to find id of parent object to use (So the code from source file must exists into dictionary %s). Note that if you know id, you can also use it into source file instead of code. Import should work in both cases. -# DataIsInsertedInto=Data coming from source file will be inserted into the following field: -# DataIDSourceIsInsertedInto=The id of parent object found using the data in source file, will be inserted into the following field: -# DataCodeIDSourceIsInsertedInto=The id of parent line found from code, will be inserted into following field: -# SourceRequired=Data value is mandatory -# SourceExample=Example of possible data value -# ExampleAnyRefFoundIntoElement=Any ref found for element %s -# ExampleAnyCodeOrIdFoundIntoDictionary=Any code (or id) found into dictionary %s -# CSVFormatDesc=Comma Separated Value file format (.csv).
    This is a text file format where fields are separated by separator [ %s ]. If separator is found inside a field content, field is rounded by round character [ %s ]. Escape character to escape round character is [ %s ]. -# Excel95FormatDesc=Excel file format (.xls)
    This is native Excel 95 format (BIFF5). -# Excel2007FormatDesc=Excel file format (.xlsx)
    This is native Excel 2007 format (SpreadsheetML). -# TsvFormatDesc=Tab Separated Value file format (.tsv)
    This is a text file format where fields are separated by a tabulator [tab]. -# ExportFieldAutomaticallyAdded=Field %s was automatically added. It will avoid you to have similar lines to be treated as duplicate records (with this field added, all lines will own their own id and will differ). -# CsvOptions=Csv Options -# Separator=Separator -# Enclosure=Enclosure -# SuppliersProducts=Suppliers Products -# BankCode=Bank code -# DeskCode=Desk code -# BankAccountNumber=Account number -# BankAccountNumberKey=Key -# SpecialCode=Special code -# ExportStringFilter=%% allows replacing one or more characters in the text -# ExportDateFilter='YYYY' 'YYYYMM' 'YYYYMMDD': filters by one year/month/day
    'YYYY+YYYY' 'YYYYMM+YYYYMM' 'YYYYMMDD+YYYYMMDD': filters over a range of years/months/days
    '>YYYY' '>YYYYMM' '>YYYYMMDD': filters on the following years/months/days
    '<YYYY' '<YYYYMM' '<YYYYMMDD': filters on the previous years/months/days -# ExportNumericFilter='NNNNN' filters by one value
    'NNNNN+NNNNN' filters over a range of values
    '>NNNNN' filters by lower values
    '>NNNNN' filters by higher values +ExportsArea=Exports area +ImportArea=Import area +NewExport=New export +NewImport=New import +ExportableDatas=Exportable dataset +ImportableDatas=Importable dataset +SelectExportDataSet=Choose dataset you want to export... +SelectImportDataSet=Choose dataset you want to import... +SelectExportFields=Choose fields you want to export, or select a predefined export profile +SelectImportFields=Choose source file fields you want to import and their target field in database by moving them up and down with anchor %s, or select a predefined import profile: +NotImportedFields=Fields of source file not imported +SaveExportModel=Save this export profile if you plan to reuse it later... +SaveImportModel=Save this import profile if you plan to reuse it later... +ExportModelName=Export profile name +ExportModelSaved=Export profile saved under name %s. +ExportableFields=Exportable fields +ExportedFields=Exported fields +ImportModelName=Import profile name +ImportModelSaved=Import profile saved under name %s. +ImportableFields=Importable fields +ImportedFields=Imported fields +DatasetToExport=Dataset to export +DatasetToImport=Import file into dataset +NoDiscardedFields=No fields in source file are discarded +Dataset=Dataset +ChooseFieldsOrdersAndTitle=Choose fields order... +FieldsOrder=Fields order +FieldsTitle=Fields title +FieldOrder=Field order +FieldTitle=Field title +ChooseExportFormat=Choose export format +NowClickToGenerateToBuildExportFile=Now, select file format in combo box and click on "Generate" to build export file... +AvailableFormats=Available formats +LibraryShort=Library +LibraryUsed=Library used +LibraryVersion=Version +Step=Step +FormatedImport=Import assistant +FormatedImportDesc1=This area allows to import personalized data, using an assistant to help you in process without technical knowledge. +FormatedImportDesc2=First step is to choose a king of data you want to load, then file to load, then to choose which fields you want to load. +FormatedExport=Export assistant +FormatedExportDesc1=This area allows to export personalized data, using an assistant to help you in process without technical knowledge. +FormatedExportDesc2=First step is to choose a predefined dataset, then to choose which fields you want in your result files, and which order. +FormatedExportDesc3=When data to export are selected, you can define output file format you want to export your data to. +Sheet=Sheet +NoImportableData=No importable data (no module with definitions to allow data imports) +FileSuccessfullyBuilt=Export file generated +SQLUsedForExport=SQL Request used to build export file +LineId=Id of line +LineDescription=Description of line +LineUnitPrice=Unit price of line +LineVATRate=VAT Rate of line +LineQty=Quantity for line +LineTotalHT=Amount net of tax for line +LineTotalTTC=Amount with tax for line +LineTotalVAT=Amount of VAT for line +TypeOfLineServiceOrProduct=Type of line (0=product, 1=service) +FileWithDataToImport=File with data to import +FileToImport=Source file to import +FileMustHaveOneOfFollowingFormat=File to import must have one of following format +DownloadEmptyExample=Download example of empty source file +ChooseFormatOfFileToImport=Choose file format to use as import file format by clicking on picto %s to select it... +ChooseFileToImport=Upload file then click on picto %s to select file as source import file... +SourceFileFormat=Source file format +FieldsInSourceFile=Fields in source file +FieldsInTargetDatabase=Target fields in Dolibarr database (bold=mandatory) +Field=Field +NoFields=No fields +MoveField=Move field column number %s +ExampleOfImportFile=Example_of_import_file +SaveImportProfile=Save this import profile +ErrorImportDuplicateProfil=Failed to save this import profile with this name. An existing profile already exists with this name. +ImportSummary=Import setup summary +TablesTarget=Targeted tables +FieldsTarget=Targeted fields +TableTarget=Targeted table +FieldTarget=Targeted field +FieldSource=Source field +DoNotImportFirstLine=Do not import first line of source file +NbOfSourceLines=Number of lines in source file +NowClickToTestTheImport=Check import parameters you have defined. If they are correct, click on button "%s" to launch a simulation of import process (no data will be changed in your database, it's only a simulation for the moment)... +RunSimulateImportFile=Launch the import simulation +FieldNeedSource=This field requires data from the source file +SomeMandatoryFieldHaveNoSource=Some mandatory fields have no source from data file +InformationOnSourceFile=Information on source file +InformationOnTargetTables=Information on target fields +SelectAtLeastOneField=Switch at least one source field in the column of fields to export +SelectFormat=Choose this import file format +RunImportFile=Launch import file +NowClickToRunTheImport=Check result of import simulation. If everything is ok, launch the definitive import. +DataLoadedWithId=All data will be loaded with the following import id: %s +ErrorMissingMandatoryValue=Mandatory data is empty in source file for field %s. +TooMuchErrors=There is still %s other source lines with errors but output has been limited. +TooMuchWarnings=There is still %s other source lines with warnings but output has been limited. +EmptyLine=Empty line (will be discarded) +CorrectErrorBeforeRunningImport=You must first correct all errors before running definitive import. +FileWasImported=File was imported with number %s. +YouCanUseImportIdToFindRecord=You can find all imported records in your database by filtering on field import_key='%s'. +NbOfLinesOK=Number of lines with no errors and no warnings: %s. +NbOfLinesImported=Number of lines successfully imported: %s. +DataComeFromNoWhere=Value to insert comes from nowhere in source file. +DataComeFromFileFieldNb=Value to insert comes from field number %s in source file. +DataComeFromIdFoundFromRef=Value that comes from field number %s of source file will be used to find id of parent object to use (So the objet %s that has the ref. from source file must exists into Dolibarr). +DataComeFromIdFoundFromCodeId=Code that comes from field number %s of source file will be used to find id of parent object to use (So the code from source file must exists into dictionary %s). Note that if you know id, you can also use it into source file instead of code. Import should work in both cases. +DataIsInsertedInto=Data coming from source file will be inserted into the following field: +DataIDSourceIsInsertedInto=The id of parent object found using the data in source file, will be inserted into the following field: +DataCodeIDSourceIsInsertedInto=The id of parent line found from code, will be inserted into following field: +SourceRequired=Data value is mandatory +SourceExample=Example of possible data value +ExampleAnyRefFoundIntoElement=Any ref found for element %s +ExampleAnyCodeOrIdFoundIntoDictionary=Any code (or id) found into dictionary %s +CSVFormatDesc=Comma Separated Value file format (.csv).
    This is a text file format where fields are separated by separator [ %s ]. If separator is found inside a field content, field is rounded by round character [ %s ]. Escape character to escape round character is [ %s ]. +Excel95FormatDesc=Excel file format (.xls)
    This is native Excel 95 format (BIFF5). +Excel2007FormatDesc=Excel file format (.xlsx)
    This is native Excel 2007 format (SpreadsheetML). +TsvFormatDesc=Tab Separated Value file format (.tsv)
    This is a text file format where fields are separated by a tabulator [tab]. +ExportFieldAutomaticallyAdded=Field %s was automatically added. It will avoid you to have similar lines to be treated as duplicate records (with this field added, all lines will own their own id and will differ). +CsvOptions=Csv Options +Separator=Separator +Enclosure=Enclosure +SuppliersProducts=Suppliers Products +BankCode=Bank code +DeskCode=Desk code +BankAccountNumber=Account number +BankAccountNumberKey=Key +SpecialCode=Special code +ExportStringFilter=%% allows replacing one or more characters in the text +ExportDateFilter='YYYY' 'YYYYMM' 'YYYYMMDD': filters by one year/month/day
    'YYYY+YYYY' 'YYYYMM+YYYYMM' 'YYYYMMDD+YYYYMMDD': filters over a range of years/months/days
    '>YYYY' '>YYYYMM' '>YYYYMMDD': filters on the following years/months/days
    '<YYYY' '<YYYYMM' '<YYYYMMDD': filters on the previous years/months/days +ExportNumericFilter='NNNNN' filters by one value
    'NNNNN+NNNNN' filters over a range of values
    '>NNNNN' filters by lower values
    '>NNNNN' filters by higher values ## filters -# SelectFilterFields=If you want to filter on some values, just input values here. -# FilterableFields=Champs Filtrables -# FilteredFields=Filtered fields -# FilteredFieldsValues=Value for filter +SelectFilterFields=If you want to filter on some values, just input values here. +FilterableFields=Champs Filtrables +FilteredFields=Filtered fields +FilteredFieldsValues=Value for filter diff --git a/htdocs/langs/hr_HR/holiday.lang b/htdocs/langs/hr_HR/holiday.lang index 0c755ca3301..da03299e0da 100644 --- a/htdocs/langs/hr_HR/holiday.lang +++ b/htdocs/langs/hr_HR/holiday.lang @@ -8,7 +8,6 @@ NotActiveModCP=You must enable the module holidays to view this page. NotConfigModCP=You must configure the module holidays to view this page. To do this, click here . NoCPforUser=You don't have a demand for holidays. AddCP=Apply for holidays -CPErrorSQL=An SQL error occurred: Employe=Employee DateDebCP=Start date DateFinCP=End date diff --git a/htdocs/langs/hr_HR/languages.lang b/htdocs/langs/hr_HR/languages.lang index d929c56d8be..3331736261b 100644 --- a/htdocs/langs/hr_HR/languages.lang +++ b/htdocs/langs/hr_HR/languages.lang @@ -19,8 +19,9 @@ Language_en_SA=Engleski (Saudijska Arabija) Language_en_US=Engleski (United States) Language_en_ZA=Engleski (Južna Afrika) Language_es_ES=Španjolski +Language_es_DO=Spanish (Dominican Republic) Language_es_AR=Španjolski (Argentina) -Language_es_CL=Spanish (Chile) +Language_es_CL=Španjolski (Čile) Language_es_HN=Španjolski (Honduras) Language_es_MX=Španjolski (Meksiko) Language_es_PY=Španjolski (Paragvaj) @@ -38,6 +39,7 @@ Language_fr_NC=Francuski (Nova Kaledonija) Language_he_IL=Hebrew Language_hr_HR=Hrvatski Language_hu_HU=Mađarski +Language_id_ID=Indonesian Language_is_IS=Islandski Language_it_IT=Talijanski Language_ja_JP=Japanski @@ -58,7 +60,7 @@ Language_tr_TR=Turski Language_sl_SI=Slovenac Language_sv_SV=Švedski Language_sv_SE=Švedski -Language_sq_AL=Albanian +Language_sq_AL=Albanski Language_sk_SK=Slovački Language_th_TH=Tajlandski Language_uk_UA=Ukrajinski diff --git a/htdocs/langs/hr_HR/mails.lang b/htdocs/langs/hr_HR/mails.lang index 08ee8a280cb..98e6dc335ee 100644 --- a/htdocs/langs/hr_HR/mails.lang +++ b/htdocs/langs/hr_HR/mails.lang @@ -79,6 +79,7 @@ MailtoEMail=Hyper link to email ActivateCheckRead=Allow to use the "Unsubcribe" link ActivateCheckReadKey=Key use to encrypt URL use for "Read Receipt" and "Unsubcribe" feature EMailSentToNRecipients=EMail sent to %s recipients. +XTargetsAdded=%s recipients added into target list EachInvoiceWillBeAttachedToEmail=A document using default invoice document template will be created and attached to each email. MailTopicSendRemindUnpaidInvoices=Reminder of invoice %s (%s) SendRemind=Send reminder by EMails diff --git a/htdocs/langs/hr_HR/main.lang b/htdocs/langs/hr_HR/main.lang index 672611dd34e..d7444cb2b19 100644 --- a/htdocs/langs/hr_HR/main.lang +++ b/htdocs/langs/hr_HR/main.lang @@ -23,27 +23,27 @@ FormatDateHourSecShort=%m/%d/%Y %I:%M:%S %p FormatDateHourTextShort=%b %d, %Y, %I:%M %p FormatDateHourText=%B %d, %Y, %I:%M %p DatabaseConnection=Database connection -NoTranslation=Bez prevoda -NoRecordFound=No record found +NoTranslation=Bez prijevoda +NoRecordFound=Nema pronađenih bilješki NoError=Bez greške Error=Greška -ErrorFieldRequired=Field '%s' is required -ErrorFieldFormat=Field '%s' has a bad value +ErrorFieldRequired=Potrebno je '%s' polje +ErrorFieldFormat=Neispravna vrijednost u polju '%s' ErrorFileDoesNotExists=Datoteka %s ne postoji -ErrorFailedToOpenFile=Failed to open file %s -ErrorCanNotCreateDir=Can not create dir %s -ErrorCanNotReadDir=Can not read dir %s -ErrorConstantNotDefined=Parameter %s not defined -ErrorUnknown=Unknown error -ErrorSQL=SQL Error -ErrorLogoFileNotFound=Logo file '%s' was not found -ErrorGoToGlobalSetup=Go to 'Company/Foundation' setup to fix this -ErrorGoToModuleSetup=Go to Module setup to fix this -ErrorFailedToSendMail=Failed to send mail (sender=%s, receiver=%s) -ErrorAttachedFilesDisabled=File attaching is disabled on this server -ErrorFileNotUploaded=File was not uploaded. Check that size does not exceed maximum allowed, that free space is available on disk and that there is not already a file with same name in this directory. -ErrorInternalErrorDetected=Error detected -ErrorNoRequestRan=No request ran +ErrorFailedToOpenFile=Datoteka %s nije uspješno otvorena +ErrorCanNotCreateDir=Mapa %s se ne može izraditi +ErrorCanNotReadDir=Mapa %s se ne može otvoriti +ErrorConstantNotDefined=Značajka %s nije određena +ErrorUnknown=Nepoznata greška +ErrorSQL=Greška na SQL-u +ErrorLogoFileNotFound=Datoteka s logom '%s' nije pronađena +ErrorGoToGlobalSetup=Idite na postavke 'Tvrtka/Organizacija' kako bi ste ovo popravili +ErrorGoToModuleSetup=Idite na postavke modula kako bi ste ovo popravili +ErrorFailedToSendMail=Elektronska pošta nije poslana (pošiljatelj=%s, primatelj=%s) +ErrorAttachedFilesDisabled=Na ovom poslužitelju nije dozvoljeno stavljanje datoteka u privitak +ErrorFileNotUploaded=Datoteka nije učitana. Proverite da veličina ne prelazi dozvoljenu, da imate slobodnog mjesta na disku i da u ovoj mapi nema datoteke sa istim imenom. +ErrorInternalErrorDetected=Pronađena greška +ErrorNoRequestRan=Nikakav zahtjev nije pokrenut ErrorWrongHostParameter=Wrong host parameter ErrorYourCountryIsNotDefined=Your country is not defined. Go to Home-Setup-Edit and post again the form. ErrorRecordIsUsedByChild=Failed to delete this record. This record is used by at least one child records. @@ -551,6 +551,7 @@ MailSentBy=Email sent by TextUsedInTheMessageBody=Email body SendAcknowledgementByMail=Send Ack. by email NoEMail=No email +NoMobilePhone=No mobile phone Owner=Owner DetectedVersion=Detected version FollowingConstantsWillBeSubstituted=The following constants will be replaced with the corresponding value. diff --git a/htdocs/langs/hr_HR/products.lang b/htdocs/langs/hr_HR/products.lang index e56b9cc59c2..f2db3018ac0 100644 --- a/htdocs/langs/hr_HR/products.lang +++ b/htdocs/langs/hr_HR/products.lang @@ -2,15 +2,15 @@ ProductRef=Product ref. ProductLabel=Product label ProductServiceCard=Products/Services card -Products=Products -Services=Services -Product=Product -Service=Service +Products=Proizvodi +Services=Usluge +Product=Proizvod +Service=Usluga ProductId=Product/service id -Create=Create +Create=Izradi Reference=Reference -NewProduct=New product -NewService=New service +NewProduct=Novi proizvod +NewService=Nova usluga ProductCode=Product code ServiceCode=Service code ProductVatMassChange=Mass VAT change @@ -19,143 +19,147 @@ MassBarcodeInit=Mass barcode init MassBarcodeInitDesc=This page can be used to initialize a barcode on objects that does not have barcode defined. Check before that setup of module barcode is complete. ProductAccountancyBuyCode=Accountancy code (buy) ProductAccountancySellCode=Accountancy code (sell) -ProductOrService=Product or Service -ProductsAndServices=Products and Services -ProductsOrServices=Products or Services -ProductsAndServicesOnSell=Available Products and Services -ProductsAndServicesNotOnSell=Obsolete Products and Services -ProductsAndServicesStatistics=Products and Services statistics -ProductsStatistics=Products statistics -ProductsOnSell=Available products -ProductsNotOnSell=Obsolete products -ServicesOnSell=Available services -ServicesNotOnSell=Obsolete services +ProductOrService=Proizvod ili usluga +ProductsAndServices=Proizvodi ili usluge +ProductsOrServices=Proizvodi ili usluge +ProductsAndServicesOnSell=Dostupni proizvodi i usluge +ProductsAndServicesNotOnSell=Zastarjeli proizvodi i usluge +ProductsAndServicesStatistics=Statistika proizvoda i usluga +ProductsStatistics=Statistika proizvoda +ProductsOnSell=Dostupni proizvodi +ProductsNotOnSell=Zastarjeli proizvodi +ProductsOnSellAndOnBuy=Products not for sale nor purchase +ServicesOnSell=Dostupne usluge +ServicesNotOnSell=Zastarjele usluge +ServicesOnSellAndOnBuy=Services not for sale nor purchase InternalRef=Internal reference -LastRecorded=Last products/services on sell recorded -LastRecordedProductsAndServices=Last %s recorded products/services -LastModifiedProductsAndServices=Last %s modified products/services -LastRecordedProducts=Last %s products recorded -LastRecordedServices=Last %s services recorded -LastProducts=Last products -CardProduct0=Product card -CardProduct1=Service card -CardContract=Contract card -Warehouse=Warehouse -Warehouses=Warehouses -WarehouseOpened=Warehouse opened -WarehouseClosed=Warehouse closed -Stock=Stock -Stocks=Stocks -Movement=Movement -Movements=Movements -Sell=Sales -Buy=Purchases -OnSell=For sale -OnBuy=For purchase -NotOnSell=Not for sale -ProductStatusOnSell=For sale -ProductStatusNotOnSell=Not for sale -ProductStatusOnSellShort=For sale -ProductStatusNotOnSellShort=Not for sale -ProductStatusOnBuy=For purchase -ProductStatusNotOnBuy=Not for purchase -ProductStatusOnBuyShort=For purchase -ProductStatusNotOnBuyShort=Not for purchase -UpdatePrice=Update price -AppliedPricesFrom=Applied prices from -SellingPrice=Selling price -SellingPriceHT=Selling price (net of tax) -SellingPriceTTC=Selling price (inc. tax) +LastRecorded=Zadnji zabilježeni proizvodi/usluge na prodaji +LastRecordedProductsAndServices=Zadnih %s zabilježeni proizvodi/usluge +LastModifiedProductsAndServices=Zadnjih %s izmjenjenih proizvoda/usluga +LastRecordedProducts=Zadnjih %s zabilježenih proizvoda +LastRecordedServices=Zadnjih %s zabilježenih usluga +LastProducts=Zadnji proizvodi +CardProduct0=Kartica proizvoda +CardProduct1=Kartica usluga +CardContract=Kartica ugovora +Warehouse=Skladište +Warehouses=Skladišta +WarehouseOpened=Otvoreno skladište +WarehouseClosed=Zatvoreno skladište +Stock=Zaliha +Stocks=Zalihe +Movement=Kretanje +Movements=Kretanja +Sell=Prodaja +Buy=Kupovine +OnSell=u +OnBuy=Za kupovinu +NotOnSell=Nije za prodaju +ProductStatusOnSell=Za prodaju +ProductStatusNotOnSell=Nije za prodaju +ProductStatusOnSellShort=Za prodaju +ProductStatusNotOnSellShort=Nije za prodaju +ProductStatusOnBuy=Za kupovinu +ProductStatusNotOnBuy=Nije za kupovinu +ProductStatusOnBuyShort=Za kupovinu +ProductStatusNotOnBuyShort=Nije za kupovinu +UpdatePrice=Obnovljena cijena +AppliedPricesFrom=Cijene preuzete od +SellingPrice=Prodajna cijena +SellingPriceHT=Prodajna cijena (bez PDV-a) +SellingPriceTTC=Prodajna cijena (sa PDV-om) PublicPrice=Public price -CurrentPrice=Current price -NewPrice=New price -MinPrice=Minim. selling price -CantBeLessThanMinPrice=The selling price can't be lower than minimum allowed for this product (%s without tax). This message can also appears if you type a too important discount. -ContractStatus=Contract status -ContractStatusClosed=Closed -ContractStatusRunning=Running -ContractStatusExpired=expired -ContractStatusOnHold=Not running -ContractStatusToRun=A mettre en service -ContractNotRunning=This contract is not running -ErrorProductAlreadyExists=A product with reference %s already exists. +CurrentPrice=Trenutna cijena +NewPrice=Nova cijena +MinPrice=Namanja prodajna cijena +MinPriceHT=Minim. selling price (net of tax) +MinPriceTTC=Minim. selling price (inc. tax) +CantBeLessThanMinPrice=Prodajna cijena za ovaj proizvod (%s bez PDV-a) ne može biti manja od najmanje dozvoljene. Ova poruka može se pojaviti i kada ste upisali bitan popust. +ContractStatus=Stanje ugovora +ContractStatusClosed=Zatvoreno +ContractStatusRunning=U tijeku +ContractStatusExpired=isteklo +ContractStatusOnHold=Nije u tijeku +ContractStatusToRun=Pustiti u rad +ContractNotRunning=Ovaj ugovor nije u tijeku +ErrorProductAlreadyExists=Proizvod s oznakom %s već postoji ErrorProductBadRefOrLabel=Wrong value for reference or label. ErrorProductClone=There was a problem while trying to clone the product or service. -Suppliers=Suppliers +Suppliers=Dobavljači SupplierRef=Supplier's product ref. -ShowProduct=Show product -ShowService=Show service -ProductsAndServicesArea=Product and Services area -ProductsArea=Product area -ServicesArea=Services area -AddToMyProposals=Add to my proposals -AddToOtherProposals=Add to other proposals -AddToMyBills=Add to my bills -AddToOtherBills=Add to other bills -CorrectStock=Correct stock -AddPhoto=Add photo -ListOfStockMovements=List of stock movements +ShowProduct=Prikaži proizvod +ShowService=Prikaži uslugu +ProductsAndServicesArea=Sučelje proizvoda i usluga +ProductsArea=Sučelje proizvoda +ServicesArea=Sučelje usluga +AddToMyProposals=Dodaj mojim ponudama +AddToOtherProposals=Dodaj među druge ponude +AddToMyBills=Dodaj mojim računima +AddToOtherBills=Dodaj među druge račune +CorrectStock=Ispravi zalihe +AddPhoto=Dodaj sliku +ListOfStockMovements=Popis kretanja zaliha BuyingPrice=Buying price -SupplierCard=Supplier card -CommercialCard=Commercial card -AllWays=Path to find your product in stock -NoCat=Your product is not in any category -PrimaryWay=Primary path -PriceRemoved=Price removed -BarCode=Barcode -BarcodeType=Barcode type -SetDefaultBarcodeType=Set barcode type -BarcodeValue=Barcode value -NoteNotVisibleOnBill=Note (not visible on invoices, proposals...) -CreateCopy=Create copy -ServiceLimitedDuration=If product is a service with limited duration: +SupplierCard=Kartica dobavljača +CommercialCard=Kartica Trgovine +AllWays=Slijed za pronalazak proizvoda na zalihi +NoCat=Vaš proizvod se ne nalazi u ni jednoj grupi +PrimaryWay=Osnovni slijed +PriceRemoved=Cijena uklonjena +BarCode=Barkod +BarcodeType=Tip barkoda +SetDefaultBarcodeType=Odredi tip barkoda +BarcodeValue=Vrijednost barkoda +NoteNotVisibleOnBill=Bilješka (ne vidi se na računima, ponudama...) +CreateCopy=Izradi preslik +ServiceLimitedDuration=Ako je proizvod usluga ograničenog trajanja: MultiPricesAbility=Several level of prices per product/service -MultiPricesNumPrices=Number of prices -MultiPriceLevelsName=Price categories +MultiPricesNumPrices=Broj cijena +MultiPriceLevelsName=Grupe cijena AssociatedProductsAbility=Activate the virtual products feature -AssociatedProducts=Virtual product +AssociatedProducts=Virtualni proizvod AssociatedProductsNumber=Number of products composing this virtual product ParentProductsNumber=Number of parent virtual product -IfZeroItIsNotAVirtualProduct=If 0, this product is not a virtual product +IfZeroItIsNotAVirtualProduct=Ako je 0, ovaj proizvod nije virtualnni proizvod IfZeroItIsNotUsedByVirtualProduct=If 0, this product is not used by any virtual product -EditAssociate=Associate -Translation=Translation +EditAssociate=Pridruži +Translation=Prijevod KeywordFilter=Keyword filter CategoryFilter=Category filter -ProductToAddSearch=Search product to add -AddDel=Add/Delete -Quantity=Quantity -NoMatchFound=No match found +ProductToAddSearch=Pronađi proizvod za dodavanje +AddDel=Dodaj/izbriši +Quantity=Količina +NoMatchFound=Ništa slično nije pronađeno ProductAssociationList=List of related products/services: name of product/service (quantity affected) ProductParentList=List of virtual products/services with this product as a component ErrorAssociationIsFatherOfThis=One of selected product is parent with current product DeleteProduct=Delete a product/service ConfirmDeleteProduct=Are you sure you want to delete this product/service? ProductDeleted=Product/Service "%s" deleted from database. -DeletePicture=Delete a picture -ConfirmDeletePicture=Are you sure you want to delete this picture ? -ExportDataset_produit_1=Products -ExportDataset_service_1=Services -ImportDataset_produit_1=Products -ImportDataset_service_1=Services -DeleteProductLine=Delete product line -ConfirmDeleteProductLine=Are you sure you want to delete this product line? +DeletePicture=Brisanje slike +ConfirmDeletePicture=Jeste li sigurni da želite izbrisati ovu sliku? +ExportDataset_produit_1=Proizvodi +ExportDataset_service_1=Usluge +ImportDataset_produit_1=Proizvodi +ImportDataset_service_1=Usluge +DeleteProductLine=Izbriši stavku proizvoda +ConfirmDeleteProductLine=Jeste li sigurni da želite izbrisati stavku proizvoda? NoProductMatching=No product/service match your criteria MatchingProducts=Matching products/services -NoStockForThisProduct=No stock for this product +NoStockForThisProduct=Nema na NoStock=No Stock Restock=Restock ProductSpecial=Special -QtyMin=Minimum Qty -PriceQty=Price for this quantity -PriceQtyMin=Price for this min. qty (w/o discount) -VATRateForSupplierProduct=VAT Rate (for this supplier/product) -DiscountQtyMin=Default discount for qty -NoPriceDefinedForThisSupplier=No price/qty defined for this supplier/product -NoSupplierPriceDefinedForThisProduct=No supplier price/qty defined for this product -RecordedProducts=Products recorded -RecordedServices=Services recorded -RecordedProductsAndServices=Products/services recorded +QtyMin=Najmanja količina +PriceQty=Cijena za ovu količinu +PriceQtyMin=Cijena za ovu najmanju količinu (bez popusta) +VATRateForSupplierProduct=Stopa PDV-a (za ovog dobavljača/proizvod) +DiscountQtyMin=Osnovi popust za količinu +NoPriceDefinedForThisSupplier=Cijena/količina nije određena za ovog dobavljača/proizvod +NoSupplierPriceDefinedForThisProduct=Za ovaj proizvod nije određena cijena/količina dobavljača +RecordedProducts=Zabilježeni proizvodi +RecordedServices=Zabilježene usluge +RecordedProductsAndServices=Zabilježeni proizvodi/usluge PredefinedProductsToSell=Predefined products to sell PredefinedServicesToSell=Predefined services to sell PredefinedProductsAndServicesToSell=Predefined products/services to sell @@ -164,10 +168,10 @@ PredefinedServicesToPurchase=Predefined services to purchase PredefinedProductsAndServicesToPurchase=Predefined products/services to puchase GenerateThumb=Generate thumb ProductCanvasAbility=Use special "canvas" addons -ServiceNb=Service #%s -ListProductServiceByPopularity=List of products/services by popularity -ListProductByPopularity=List of products by popularity -ListServiceByPopularity=List of services by popularity +ServiceNb=Usluga #%s +ListProductServiceByPopularity=Popis proizvoda/usluga poredanih po popularnosti +ListProductByPopularity=Popis proizvoda poredanih po popularnosti +ListServiceByPopularity=Popis usluga poredanih po popularnosti Finished=Manufactured product RowMaterial=Raw Material CloneProduct=Clone product or service @@ -179,6 +183,7 @@ ProductIsUsed=This product is used NewRefForClone=Ref. of new product/service CustomerPrices=Customers prices SuppliersPrices=Suppliers prices +SuppliersPricesOfProductsOrServices=Suppliers prices (of products or services) CustomCode=Customs code CountryOrigin=Origin country HiddenIntoCombo=Hidden into select lists @@ -208,6 +213,7 @@ CostPmpHT=Net total VWAP ProductUsedForBuild=Auto consumed by production ProductBuilded=Production completed ProductsMultiPrice=Product multi-price +ProductsOrServiceMultiPrice=Customers prices (of products or services, multi-prices) ProductSellByQuarterHT=Products turnover quarterly VWAP ServiceSellByQuarterHT=Services turnover quarterly VWAP Quarter1=1st. Quarter diff --git a/htdocs/langs/hr_HR/propal.lang b/htdocs/langs/hr_HR/propal.lang index e9428c467a2..0a0f8a55ea4 100644 --- a/htdocs/langs/hr_HR/propal.lang +++ b/htdocs/langs/hr_HR/propal.lang @@ -12,8 +12,8 @@ ProposalCard=Kartica ponude NewProp=Nova trgovačka ponuda NewProposal=Nova trgovačka ponuda NewPropal=Nova ponuda -# Prospect=Prospect -# ProspectList=Prospect list +Prospect=Mogući kupac +ProspectList=Popis mogućih kupaca DeleteProp=Izbriši trgovačku ponudu ValidateProp=Ovjeri trgovačku ponudu AddProp=Napravi ponudu @@ -50,10 +50,10 @@ PropalStatusBilledShort=Naplaćena PropalsToClose=Trgovačke ponude za zatvaranje PropalsToBill=Potpisane trgovačke ponude za naplatu ListOfProposals=Popis trgovačkih ponuda -# ActionsOnPropal=Events on proposal +ActionsOnPropal=Događaji vezani uz ponudu NoOpenedPropals=Nema otvorenih trgovačkih ponuda NoOtherOpenedPropals=nema drugih otvorenih trgovačkih ponuda -# RefProposal=Commercial proposal ref +RefProposal=Broj trgovačke ponude SendPropalByMail=Pošalji trgovačku ponudu e-poštom FileNotUploaded=Datoteka nije učitana FileUploaded=Datoteka je uspješno učitana @@ -61,7 +61,7 @@ AssociatedDocuments=Dokumenti povezani s ovom ponudom: ErrorCantOpenDir=Mapa se ne može otvoriti DatePropal=Datum ponude DateEndPropal=Datum dospijeća -# DateEndPropalShort=Date end +DateEndPropalShort=Datum završetka ValidityDuration=Vrijedi do CloseAs=Zatvori sa stanjem ClassifyBilled=Označi kao naplaćena @@ -73,17 +73,17 @@ OtherPropals=Ostale ponude AddToDraftProposals=Dodati skici ponude NoDraftProposals=Nema skica ponuda CopyPropalFrom=Izradi trgovačku ponudu preslikanjem postojeće ponude -# CreateEmptyPropal=Create empty commercial proposals vierge or from list of products/services -# DefaultProposalDurationValidity=Default commercial proposal validity duration (in days) -# UseCustomerContactAsPropalRecipientIfExist=Use customer contact address if defined instead of third party address as proposal recipient address +CreateEmptyPropal=Izradi prazan predložak ponude ili popis proizvoda i usluga +DefaultProposalDurationValidity=Osnovni rok valjanosti trgovačke ponude (u danima) +UseCustomerContactAsPropalRecipientIfExist=Koristiti adresu kupca za ponude umjesto adrese Treće osobe ako je tako određeno ClonePropal=Kloniraj trgovačku ponudu ConfirmClonePropal=Jeste li sigurni da želite klonirati trgovačku ponudu %s ? ConfirmReOpenProp=Jeste li sigurno da želite ponovo otvoriti trgovačku ponudu %s ? -# ProposalsAndProposalsLines=Commercial proposal and lines -# ProposalLine=Proposal line -# AvailabilityPeriod=Availability delay -# SetAvailability=Set availability delay -# AfterOrder=after order +ProposalsAndProposalsLines=Trgovačke ponude i stavke +ProposalLine=Stavka ponude +AvailabilityPeriod=Odgoda dostupnosti +SetAvailability=Odredi odgodu dostupnosti +AfterOrder=poslije narudžbe ##### Availability ##### AvailabilityTypeAV_NOW=Odmah AvailabilityTypeAV_1W=Tjedan dana @@ -95,8 +95,8 @@ TypeContact_propal_internal_SALESREPFOLL=Suradnik koji prati ponudu TypeContact_propal_external_BILLING=Kontakt osoba pri kupcu za račun TypeContact_propal_external_CUSTOMER=Kontakt osoba pri kupcu za ponudu # Document models -# DocModelAzurDescription=A complete proposal model (logo...) -# DocModelJauneDescription=Jaune proposal model -# DefaultModelPropalCreate=Default model creation -# DefaultModelPropalToBill=Default template when closing a business proposal (to be invoiced) -# DefaultModelPropalClosed=Default template when closing a business proposal (unbilled) +DocModelAzurDescription=Cjeloviti model ponude (logo...) +DocModelJauneDescription="Žuti" model ponude +DefaultModelPropalCreate=Izrada osnovnog modela +DefaultModelPropalToBill=Osnovni predložak prilikom zatvaranja poslovne ponude (za naplatu) +DefaultModelPropalClosed=Osnovni predložak prilikom zatvaranja poslovne ponude (nenaplaćeno) diff --git a/htdocs/langs/hr_HR/shop.lang b/htdocs/langs/hr_HR/shop.lang index 0cf353399ce..595948cc6fb 100644 --- a/htdocs/langs/hr_HR/shop.lang +++ b/htdocs/langs/hr_HR/shop.lang @@ -1,4 +1,5 @@ # Dolibarr language file - Source file is en_US - shop +FailedConnectDBCheckModuleSetup=Failed to connect to oscommerce database. Check your module setup Shop=Trgovina ShopWeb=Web trgovina LastOrders=Zadnje narudžbe diff --git a/htdocs/langs/hr_HR/stocks.lang b/htdocs/langs/hr_HR/stocks.lang index 54ff037d912..710f42d1581 100644 --- a/htdocs/langs/hr_HR/stocks.lang +++ b/htdocs/langs/hr_HR/stocks.lang @@ -112,6 +112,7 @@ ReplenishmentOrdersDesc=This is list of all opened supplier orders Replenishments=Replenishments NbOfProductBeforePeriod=Quantity of product %s in stock before selected period (< %s) NbOfProductAfterPeriod=Quantity of product %s in stock after selected period (> %s) +MassMovement=Mass movement MassStockMovement=Mass stock movement SelectProductInAndOutWareHouse=Select a product, a quantity, a source warehouse and a target warehouse, then click "%s". Once this is done for all required movements, click onto "%s". RecordMovement=Record transfert diff --git a/htdocs/langs/hu_HU/admin.lang b/htdocs/langs/hu_HU/admin.lang index fc20c077951..79b21209f2f 100644 --- a/htdocs/langs/hu_HU/admin.lang +++ b/htdocs/langs/hu_HU/admin.lang @@ -116,7 +116,7 @@ LanguageBrowserParameter=Paraméter %s LocalisationDolibarrParameters=Lokalizáció paraméterek ClientTZ=Client Time Zone (user) ClientHour=Client time (user) -OSTZ=Időzóna szerver OS +OSTZ=Server OS Time Zone PHPTZ=Időzóna PHP szerver PHPServerOffsetWithGreenwich=PHP szerver offset szélessége Greenwich (másodperc) ClientOffsetWithGreenwich=Client / Böngésző offset szélessége Greenwich (másodperc) @@ -233,7 +233,9 @@ OfficialWebSiteFr=Francia hivatalos honlapján OfficialWiki=Dolibarr dokumentáció Wiki OfficialDemo=Dolibarr online demo OfficialMarketPlace=Hivatalos piac külső modulok / addons -OfficialWebHostingService=Official web hosting services (Cloud hosting) +OfficialWebHostingService=Referenced web hosting services (Cloud hosting) +ReferencedPreferredPartners=Preferred Partners +OtherResources=Autres ressources ForDocumentationSeeWiki=A felhasználó vagy fejlesztői dokumentáció (doc, GYIK ...),
    vessünk egy pillantást a Dolibarr Wiki:
    %s ForAnswersSeeForum=Ha bármilyen további kérdése / help, akkor használja a fórumot Dolibarr:
    %s HelpCenterDesc1=Ez a terület is segít, hogy a Help támogató szolgáltatás Dolibarr. @@ -369,9 +371,9 @@ ExtrafieldSelectList = Select from table ExtrafieldSeparator=Separator ExtrafieldCheckBox=Checkbox ExtrafieldRadio=Radio button -ExtrafieldParamHelpselect=Parameters list have to be like key,value

    for exemple :
    1,value1
    2,value2
    3,value3
    ...

    In order to have the list depending on another :
    1,value1|parent_list_code:parent_key
    2,value2|parent_list_code:parent_key -ExtrafieldParamHelpcheckbox=Parameters list have to be like key,value

    for exemple :
    1,value1
    2,value2
    3,value3
    ... -ExtrafieldParamHelpradio=Parameters list have to be like key,value

    for exemple :
    1,value1
    2,value2
    3,value3
    ... +ExtrafieldParamHelpselect=Parameters list have to be like key,value

    for example :
    1,value1
    2,value2
    3,value3
    ...

    In order to have the list depending on another :
    1,value1|parent_list_code:parent_key
    2,value2|parent_list_code:parent_key +ExtrafieldParamHelpcheckbox=Parameters list have to be like key,value

    for example :
    1,value1
    2,value2
    3,value3
    ... +ExtrafieldParamHelpradio=Parameters list have to be like key,value

    for example :
    1,value1
    2,value2
    3,value3
    ... ExtrafieldParamHelpsellist=Parameters list comes from a table
    Syntax : table_name:label_field:id_field::filter
    Example : c_typent:libelle:id::filter

    filter can be a simple test (eg active=1) to display only active value
    if you want to filter on extrafields use syntaxt extra.fieldcode=... (where field code is the code of extrafield)

    In order to have the list depending on another :
    c_typent:libelle:id:parent_list_code|parent_column:filter LibraryToBuildPDF=Library used to build PDF WarningUsingFPDF=Warning: Your conf.php contains directive dolibarr_pdf_force_fpdf=1. This means you use the FPDF library to generate PDF files. This library is old and does not support a lot of features (Unicode, image transparency, cyrillic, arab and asiatic languages, ...), so you may experience errors during PDF generation.
    To solve this and have a full support of PDF generation, please download TCPDF library, then comment or remove the line $dolibarr_pdf_force_fpdf=1, and add instead $dolibarr_lib_TCPDF_PATH='path_to_TCPDF_dir' @@ -472,7 +474,7 @@ Module410Desc=WebCalendar integráció Module500Name=Special expenses (tax, social contributions, dividends) Module500Desc=Management of special expenses like taxes, social contribution, dividends and salaries Module510Name=Salaries -Module510Desc=Management of empoyees salaries and payments +Module510Desc=Management of employees salaries and payments Module600Name=Értesítések Module600Desc=Küldés e-mailben értesítést néhány Dolibarr üzleti rendezvények, harmadik fél kapcsolatok Module700Name=Adományok @@ -495,15 +497,15 @@ Module2400Name=Napirend Module2400Desc=Események / feladatok és napirend menedzsment Module2500Name=Elektronikus Content Management Module2500Desc=Mentés és dokumentumok megosztása -Module2600Name= WebServices -Module2600Desc= Engedélyezze a Dolibarr web szerver szolgáltatás -Module2700Name= Gravatar -Module2700Desc= Használja online szolgáltatást Gravatar (www.gravatar.com), hogy fotó a felhasználók / tagok (találtak a levelek). Szüksége van egy internet-hozzáférési +Module2600Name=WebServices +Module2600Desc=Engedélyezze a Dolibarr web szerver szolgáltatás +Module2700Name=Gravatar +Module2700Desc=Használja online szolgáltatást Gravatar (www.gravatar.com), hogy fotó a felhasználók / tagok (találtak a levelek). Szüksége van egy internet-hozzáférési Module2800Desc=FTP Client -Module2900Name= GeoIPMaxmind -Module2900Desc= GeoIP MaxMind konverziók képességek -Module3100Name= Skype -Module3100Desc= Add a Skype button into card of adherents / third parties / contacts +Module2900Name=GeoIPMaxmind +Module2900Desc=GeoIP MaxMind konverziók képességek +Module3100Name=Skype +Module3100Desc=Add a Skype button into card of adherents / third parties / contacts Module5000Name=Multi-cég Module5000Desc=Lehetővé teszi, hogy több vállalat kezelése Module6000Name=Workflow @@ -681,6 +683,10 @@ Permission401=Olvassa kedvezmények Permission402=Létrehozza / módosítja kedvezmények Permission403=Kedvezmények érvényesítése Permission404=Törlés kedvezmények +Permission510=Read Salaries +Permission512=Create/modify salaries +Permission514=Delete salaries +Permission517=Export salaries Permission531=Olvassa szolgáltatások Permission532=Létrehozza / módosítja szolgáltatások Permission534=Törlés szolgáltatások @@ -999,7 +1005,7 @@ ExtraFieldsSupplierOrders=Complementary attributes (orders) ExtraFieldsSupplierInvoices=Complementary attributes (invoices) ExtraFieldsProject=Complementary attributes (projects) ExtraFieldsProjectTask=Complementary attributes (tasks) -ExtraFieldHasWrongValue=Attribut %s van egy rossz értéket. +ExtraFieldHasWrongValue=Attribute %s has a wrong value. AlphaNumOnlyCharsAndNoSpace=only alphanumericals characters without space AlphaNumOnlyLowerCharsAndNoSpace=only alphanumericals and lower case characters without space SendingMailSetup=Beállítás a küldések e-mailben @@ -1018,13 +1024,13 @@ SuhosinSessionEncrypt=Session storage encrypted by Suhosin ConditionIsCurrently=Condition is currently %s TestNotPossibleWithCurrentBrowsers=Automatic detection not possible YouUseBestDriver=You use driver %s that is best driver available currently. -YouDoNotUseBestDriver=You use drive %s but driver %s is recommanded. +YouDoNotUseBestDriver=You use drive %s but driver %s is recommended. NbOfProductIsLowerThanNoPb=You have only %s products/services into database. This does not required any particular optimization. SearchOptim=Search optimization YouHaveXProductUseSearchOptim=You have %s product into database. You should add the constant PRODUCT_DONOTSEARCH_ANYWHERE to 1 into Home-Setup-Other, you limit the search to the beginning of strings making possible for database to use index and you should get an immediate response. BrowserIsOK=You are using the web browser %s. This browser is ok for security and performance. BrowserIsKO=You are using the web browser %s. This browser is known to be a bad choice for security, performance and reliability. We recommand you to use Firefox, Chrome, Opera or Safari. -XDebugInstalled=XDebug est chargé. +XDebugInstalled=XDebug is loaded. XCacheInstalled=XCache is loaded. AddRefInList=Display customer/supplier ref into list (select list or combobox) and most of hyperlink FieldEdition=Edition of field %s @@ -1073,7 +1079,7 @@ WebCalServer=Szerver hosting adatbázis-naptár WebCalDatabaseName=Az adatbázis neve WebCalUser=Felhasználó adatbázishoz való hozzáférés WebCalSetupSaved=WebCalendar telepítés sikeresen elmentve. -WebCalTestOk=Csatlakozás a szerverhez "%s" az adatbázis "%s" felhasználói "%s" sikeres. +WebCalTestOk=Connection to server '%s' on database '%s' with user '%s' successful. WebCalTestKo1=Csatlakozás a szerverhez "%s" sikerül, de adatbázis "%s" nem lehet elérni. WebCalTestKo2=Csatlakozás a szerverhez "%s" felhasználói "%s" sikerült. WebCalErrorConnectOkButWrongDatabase=Connection sikerült, de az adatbázisban nem úgy néz ki, hogy egy WebCalendar adatbázisban. @@ -1119,7 +1125,7 @@ WatermarkOnDraftProposal=Watermark on draft commercial proposals (none if empty) OrdersSetup=Order Management Setup OrdersNumberingModules=Megrendelés számozási modulok OrdersModelModule=Rendelés dokumentumok modellek -HideTreadedOrders=Elrejtése a kezelt vagy törölt megrendeléseket a listában +HideTreadedOrders=Hide the treated or cancelled orders in the list ValidOrderAfterPropalClosed=Ahhoz, hogy érvényesítse a megbízást, miután javaslat közelebb, lehetővé teszi, hogy ne lépjen az ideiglenes sorrendben FreeLegalTextOnOrders=Szabad szöveg rendelés WatermarkOnDraftOrders=Watermark on draft orders (none if empty) @@ -1214,9 +1220,9 @@ LDAPSynchroKO=Nem sikerült a szinkronizálás teszt LDAPSynchroKOMayBePermissions=Sikertelen teszt szinkronizálás. Ellenőrizze, hogy a Connexion szerver helyesen van konfigurálva, és lehetővé teszi az LDAP udpates LDAPTCPConnectOK=TCP csatlakozni az LDAP szerver sikeres (= %s Server, Port = %s) LDAPTCPConnectKO=TCP csatlakozni az LDAP kiszolgáló nem (Server = %s, Port = %s) -LDAPBindOK=Csatlakozás / Authentificate az LDAP-szerver sucessfull (Server = %s, Port = %s, Admin = %s, Password = %s) +LDAPBindOK=Connect/Authentificate to LDAP server successful (Server=%s, Port=%s, Admin=%s, Password=%s) LDAPBindKO=Csatlakozás / Authentificate az LDAP-kiszolgáló nem (Server = %s, Port = %s, Admin = %s, Password = %s) -LDAPUnbindSuccessfull=Húzza sikeres +LDAPUnbindSuccessfull=Disconnect successful LDAPUnbindFailed=Bontása nem sikerült LDAPConnectToDNSuccessfull=Csatlakozás au DN (%s) ri ¿½ ussie LDAPConnectToDNFailed=Csatlakozás au DN (%s) ï ¿½ ¿½ chouï e @@ -1273,7 +1279,7 @@ LDAPFieldSidExample=Példa: objectsid LDAPFieldEndLastSubscription=Születési előfizetés vége LDAPFieldTitle=Hozzászólás / Function LDAPFieldTitleExample=Example: title -LDAPParametersAreStillHardCoded=LDAP paraméterei még bedrótozva (érintkező osztály) +LDAPParametersAreStillHardCoded=LDAP parameters are still hardcoded (in contact class) LDAPSetupNotComplete=LDAP telepítés nem teljes (go másokra fül) LDAPNoUserOrPasswordProvidedAccessIsReadOnly=Nem rendszergazdai jelszót vagy biztosított. LDAP hozzáférés lesz, névtelen és csak olvasható módba. LDAPDescContact=Ez az oldal lehetővé teszi, hogy meghatározza az LDAP attribútumok név LDAP fa minden egyes adat található Dolibarr kapcsolatok. @@ -1429,7 +1435,7 @@ OptionVATDefault=Szabvány OptionVATDebitOption=Opció szolgáltatások Tartozik OptionVatDefaultDesc=ÁFA oka:
    - Utánvéttel áruk (az általunk használt számla dátum)
    - A fizetési szolgáltatások OptionVatDebitOptionDesc=ÁFA oka:
    - Utánvéttel áruk (az általunk használt számla dátum)
    - A számla (debit) szolgáltatások -SummaryOfVatExigibilityUsedByDefault=Idő HÉA-alapból exigibility A választott opció szerint: +SummaryOfVatExigibilityUsedByDefault=Time of VAT exigibility by default according to chosen option: OnDelivery=A szállítási OnPayment=A fizetési OnInvoice=A számlát @@ -1446,7 +1452,7 @@ AccountancyCodeBuy=Purchase account. code AgendaSetup=Rendezvények és napirend modul beállítási PasswordTogetVCalExport=Főbb kiviteli engedélyezésének linket PastDelayVCalExport=Ne export esetén, mint a régebbi -AGENDA_USE_EVENT_TYPE=Use events types (managed into menu Setup -> Dictionnary -> Type of agenda events) +AGENDA_USE_EVENT_TYPE=Use events types (managed into menu Setup -> Dictionary -> Type of agenda events) ##### ClickToDial ##### ClickToDialDesc=Ez a modul lehetővé teszi, hogy egészítsék ki egy ikont telefonszámot. Egy kattintással erre az ikonra fogja hívni a szerver egy adott URL-t meg az alábbiakban. Ezt fel lehet használni, hogy hívja a call center rendszert Dolibarr hogy hívhatjuk a telefonszámot egy SIP rendszert pl. ##### Point Of Sales (CashDesk) ##### diff --git a/htdocs/langs/hu_HU/contracts.lang b/htdocs/langs/hu_HU/contracts.lang index 27ab3612f88..b0d80e83dae 100644 --- a/htdocs/langs/hu_HU/contracts.lang +++ b/htdocs/langs/hu_HU/contracts.lang @@ -38,7 +38,7 @@ ConfirmCloseService=Biztos le akarja zárni a %s dátummal ellátott szol ValidateAContract=Szerződés hitelesítése ActivateService=Aktív szolgáltatás ConfirmActivateService=Biztos aktiválni akarja a %s dátummal ellátott szolgáltatást? -# RefContract=Contract reference +RefContract=Contract reference DateContract=Szerződés dátuma DateServiceActivate=Szolgáltatás aktiválásának dátuma DateServiceUnactivate=Szolgáltatás deaktiválásának dátuma @@ -85,10 +85,12 @@ PaymentRenewContractId=Szerződés sor megújítása (%s) ExpiredSince=Lejárati dátum RelatedContracts=Csatlakozó szerződések NoExpiredServices=Nincs lejárt aktív szolgáltatások -# ListOfServicesToExpireWithDuration=List of Services to expire in %s days -# ListOfServicesToExpireWithDurationNeg=List of Services expired from more than %s days -# ListOfServicesToExpire=List of Services to expire -# NoteListOfYourExpiredServices=This list contains only services of contracts for third parties you are linked to as a sale representative. +ListOfServicesToExpireWithDuration=List of Services to expire in %s days +ListOfServicesToExpireWithDurationNeg=List of Services expired from more than %s days +ListOfServicesToExpire=List of Services to expire +NoteListOfYourExpiredServices=This list contains only services of contracts for third parties you are linked to as a sale representative. +StandardContractsTemplate=Standard contracts template +ContactNameAndSignature=For %s, name and signature: ##### Types de contacts ##### TypeContact_contrat_internal_SALESREPSIGN=Értékesítési képviselő a szerződés aláírásakor diff --git a/htdocs/langs/hu_HU/exports.lang b/htdocs/langs/hu_HU/exports.lang index 177cb7f402e..f4b83ce25b0 100644 --- a/htdocs/langs/hu_HU/exports.lang +++ b/htdocs/langs/hu_HU/exports.lang @@ -8,7 +8,7 @@ ImportableDatas=Adathalmaz importálható SelectExportDataSet=Válassza ki a kívánt adatsor exportálni ... SelectImportDataSet=Válasszon adathalmaz kíván importálni ... SelectExportFields=Válassza ki a mezőket szeretné exportálni, vagy válasszunk egy előre export profil -SelectImportFields=Válassza ki a forrás file mezőket importálni kívánt cél és a mező az adatbázisban mozgatásával fel őket, és le horgony %s, vagy válasszunk egy előre import profil: +SelectImportFields=Choose source file fields you want to import and their target field in database by moving them up and down with anchor %s, or select a predefined import profile: NotImportedFields=Területek forrás fájl importálása nem SaveExportModel=Mentése export profilt, ha azt tervezi, hogy újra később ... SaveImportModel=Mentése import profilt, ha azt tervezi, hogy újra később ... @@ -64,7 +64,7 @@ ChooseFormatOfFileToImport=Válasszon fájlformátumot használni import fájl f ChooseFileToImport=Fájl feltöltése majd kattintson a Picto %s, hogy válasszon ki egy fájlt forrásként import file ... SourceFileFormat=Forrás fájlformátum FieldsInSourceFile=Mezői forrásfájlban -# FieldsInTargetDatabase=Target fields in Dolibarr database (bold=mandatory) +FieldsInTargetDatabase=Target fields in Dolibarr database (bold=mandatory) Field=Mező NoFields=Nem mezők MoveField=Mező áthelyezése oszlop száma %s @@ -81,7 +81,7 @@ DoNotImportFirstLine=Ne importálja első sorban a forrás fájl NbOfSourceLines=Sorok száma a forrás fájlban NowClickToTestTheImport=Ellenőrizze import paramétereket megadtuk. Ha az adatok helyesek, kattintson a gombra "%s" elindítani egy szimulációt behozatali folyamat (az adatok nem változtak az adatbázisban, ez ​​csak egy szimuláció egyelőre) ... RunSimulateImportFile=Indítsd el a behozatali szimuláció -FieldNeedSource=Ez az adatbázis fiels szükséges adatokat forrásfájl +FieldNeedSource=This field requires data from the source file SomeMandatoryFieldHaveNoSource=Néhány kötelező mező nincs forrás adatfájl InformationOnSourceFile=Információ forrás fájl InformationOnTargetTables=Tájékoztatás a cél mezők @@ -102,33 +102,33 @@ NbOfLinesImported=Sorok száma sikeresen importálva: %s. DataComeFromNoWhere=Érték beszúrni jön elő a semmiből a forrás fájlt. DataComeFromFileFieldNb=Érték beszúrni származik %s mező számát a forrás fájlt. DataComeFromIdFoundFromRef=Érték, hogy jön a mező száma %s a forrás fájlt fogja használni, hogy megtalálja az id szülőobjektum használni (tehát a objet %s, amely a ref. Forrásból kell file létezik a Dolibarr). -# DataComeFromIdFoundFromCodeId=Code that comes from field number %s of source file will be used to find id of parent object to use (So the code from source file must exists into dictionary %s). Note that if you know id, you can also use it into source file instead of code. Import should work in both cases. +DataComeFromIdFoundFromCodeId=Code that comes from field number %s of source file will be used to find id of parent object to use (So the code from source file must exists into dictionary %s). Note that if you know id, you can also use it into source file instead of code. Import should work in both cases. DataIsInsertedInto=Érkező adatokat forrás fájlt be kell illeszteni a következő területen: DataIDSourceIsInsertedInto=Az id a szülő objektum található adatok felhasználásával a forrás fájlt, majd be kell illeszteni az alábbi mezőbe: DataCodeIDSourceIsInsertedInto=Az id a szülői vonal megtalálható a kód, akkor be kell illeszteni a következő területen: SourceRequired=Adatérték kötelező SourceExample=Példa lehet az adatok értékét ExampleAnyRefFoundIntoElement=Minden ref talált elem %s -# ExampleAnyCodeOrIdFoundIntoDictionary=Any code (or id) found into dictionary %s +ExampleAnyCodeOrIdFoundIntoDictionary=Any code (or id) found into dictionary %s CSVFormatDesc=Vesszővel elválasztott fájlformátum (. Csv).
    Ez egy szöveges fájl formátum ahol a mezők egymástól elválasztó [%s]. Ha az elválasztó belsejében található egy mező tartalmát, mező kerekíteni kerek karakter [%s]. Escape karakter menekülni kerek karakter [%s]. -# Excel95FormatDesc=Excel file format (.xls)
    This is native Excel 95 format (BIFF5). -# Excel2007FormatDesc=Excel file format (.xlsx)
    This is native Excel 2007 format (SpreadsheetML). -# TsvFormatDesc=Tab Separated Value file format (.tsv)
    This is a text file format where fields are separated by a tabulator [tab]. -# ExportFieldAutomaticallyAdded=Field %s was automatically added. It will avoid you to have similar lines to be treated as duplicate records (with this field added, all lines will own their own id and will differ). -# CsvOptions=Csv Options -# Separator=Separator -# Enclosure=Enclosure -# SuppliersProducts=Suppliers Products +Excel95FormatDesc=Excel file format (.xls)
    This is native Excel 95 format (BIFF5). +Excel2007FormatDesc=Excel file format (.xlsx)
    This is native Excel 2007 format (SpreadsheetML). +TsvFormatDesc=Tab Separated Value file format (.tsv)
    This is a text file format where fields are separated by a tabulator [tab]. +ExportFieldAutomaticallyAdded=Field %s was automatically added. It will avoid you to have similar lines to be treated as duplicate records (with this field added, all lines will own their own id and will differ). +CsvOptions=Csv Options +Separator=Separator +Enclosure=Enclosure +SuppliersProducts=Suppliers Products BankCode=Bank kódja DeskCode=Íróasztal kód BankAccountNumber=Számlaszám BankAccountNumberKey=Kulcs -# SpecialCode=Special code -# ExportStringFilter=%% allows replacing one or more characters in the text -# ExportDateFilter='YYYY' 'YYYYMM' 'YYYYMMDD': filters by one year/month/day
    'YYYY+YYYY' 'YYYYMM+YYYYMM' 'YYYYMMDD+YYYYMMDD': filters over a range of years/months/days
    '>YYYY' '>YYYYMM' '>YYYYMMDD': filters on the following years/months/days
    '<YYYY' '<YYYYMM' '<YYYYMMDD': filters on the previous years/months/days -# ExportNumericFilter='NNNNN' filters by one value
    'NNNNN+NNNNN' filters over a range of values
    '>NNNNN' filters by lower values
    '>NNNNN' filters by higher values +SpecialCode=Special code +ExportStringFilter=%% allows replacing one or more characters in the text +ExportDateFilter='YYYY' 'YYYYMM' 'YYYYMMDD': filters by one year/month/day
    'YYYY+YYYY' 'YYYYMM+YYYYMM' 'YYYYMMDD+YYYYMMDD': filters over a range of years/months/days
    '>YYYY' '>YYYYMM' '>YYYYMMDD': filters on the following years/months/days
    '<YYYY' '<YYYYMM' '<YYYYMMDD': filters on the previous years/months/days +ExportNumericFilter='NNNNN' filters by one value
    'NNNNN+NNNNN' filters over a range of values
    '>NNNNN' filters by lower values
    '>NNNNN' filters by higher values ## filters -# SelectFilterFields=If you want to filter on some values, just input values here. -# FilterableFields=Champs Filtrables -# FilteredFields=Filtered fields -# FilteredFieldsValues=Value for filter +SelectFilterFields=If you want to filter on some values, just input values here. +FilterableFields=Champs Filtrables +FilteredFields=Filtered fields +FilteredFieldsValues=Value for filter diff --git a/htdocs/langs/hu_HU/holiday.lang b/htdocs/langs/hu_HU/holiday.lang index 4acdfc694de..1bab1342ddc 100644 --- a/htdocs/langs/hu_HU/holiday.lang +++ b/htdocs/langs/hu_HU/holiday.lang @@ -8,7 +8,6 @@ NotActiveModCP=You must enable the module holidays to view this page. NotConfigModCP=You must configure the module holidays to view this page. To do this, click here . NoCPforUser=You don't have a demand for holidays. AddCP=Apply for holidays -CPErrorSQL=An SQL error occurred: Employe=Employee DateDebCP=Kezdési dátum DateFinCP=Befejezési dátum diff --git a/htdocs/langs/hu_HU/languages.lang b/htdocs/langs/hu_HU/languages.lang index 789ad865818..df1e854bbfd 100644 --- a/htdocs/langs/hu_HU/languages.lang +++ b/htdocs/langs/hu_HU/languages.lang @@ -19,6 +19,7 @@ Language_en_SA=English (Szaúd-Arábia) Language_en_US=Angol (Egyesült Államok) Language_en_ZA=English (Dél-Afrika) Language_es_ES=Spanyo +Language_es_DO=Spanish (Dominican Republic) Language_es_AR=Spanyo (Argentina) Language_es_CL=Spanish (Chile) Language_es_HN=Spanyol (Honduras) @@ -38,6 +39,7 @@ Language_fr_NC=Francia (Új-Kaledónia) Language_he_IL=Héber Language_hr_HR=Horvát Language_hu_HU=Magyar +Language_id_ID=Indonesian Language_is_IS=Grönlandi Language_it_IT=Olasz Language_ja_JP=Japán diff --git a/htdocs/langs/hu_HU/mails.lang b/htdocs/langs/hu_HU/mails.lang index b9f58622b57..12d18648519 100644 --- a/htdocs/langs/hu_HU/mails.lang +++ b/htdocs/langs/hu_HU/mails.lang @@ -79,6 +79,7 @@ MailtoEMail=Hyper link to email ActivateCheckRead=Allow to use the "Unsubcribe" link ActivateCheckReadKey=Key use to encrypt URL use for "Read Receipt" and "Unsubcribe" feature EMailSentToNRecipients=EMail sent to %s recipients. +XTargetsAdded=%s recipients added into target list EachInvoiceWillBeAttachedToEmail=A document using default invoice document template will be created and attached to each email. MailTopicSendRemindUnpaidInvoices=Reminder of invoice %s (%s) SendRemind=Send reminder by EMails diff --git a/htdocs/langs/hu_HU/main.lang b/htdocs/langs/hu_HU/main.lang index 5d2508df237..1dc86be50cd 100644 --- a/htdocs/langs/hu_HU/main.lang +++ b/htdocs/langs/hu_HU/main.lang @@ -551,6 +551,7 @@ MailSentBy=Email feladója TextUsedInTheMessageBody=Email test SendAcknowledgementByMail=Visszaigazolás küldése (email) NoEMail=Nincs email +NoMobilePhone=No mobile phone Owner=Tulajdonos DetectedVersion=Észlelt verzió FollowingConstantsWillBeSubstituted=Az alábbi konstansok helyettesítve leszenek a hozzájuk tartozó értékekkel. diff --git a/htdocs/langs/hu_HU/products.lang b/htdocs/langs/hu_HU/products.lang index ef6f111e8a8..be99ba4cbd8 100644 --- a/htdocs/langs/hu_HU/products.lang +++ b/htdocs/langs/hu_HU/products.lang @@ -28,8 +28,10 @@ ProductsAndServicesStatistics=Termékek és Szolgáltatások statisztika ProductsStatistics=Termék statisztika ProductsOnSell=Aktív Termékek ProductsNotOnSell=Lejárt Termékek +ProductsOnSellAndOnBuy=Products not for sale nor purchase ServicesOnSell=Aktív Szolgáltatások ServicesNotOnSell=Lejárt Szolgáltatások +ServicesOnSellAndOnBuy=Services not for sale nor purchase InternalRef=Belső referencia LastRecorded=Utolsó termékek/szolgáltatások on sell recorded LastRecordedProductsAndServices=Utolsó %s nyílvántartásba vett termék/szolgáltatás @@ -70,6 +72,8 @@ PublicPrice=Nyilvános ár CurrentPrice=Jelenlegi ár NewPrice=Új ár MinPrice=Minimum eladási ár +MinPriceHT=Minim. selling price (net of tax) +MinPriceTTC=Minim. selling price (inc. tax) CantBeLessThanMinPrice=Az eladási ár nem lehet kisebb a minimum árnál (nettó %s) ContractStatus=Szerzőséd állapot ContractStatusClosed=Lezárva @@ -179,6 +183,7 @@ ProductIsUsed=Ez a termék használatban van NewRefForClone=Új termék/szolgáltatás ref#. CustomerPrices=Fogyasztói árának SuppliersPrices=Beszállítók árak +SuppliersPricesOfProductsOrServices=Suppliers prices (of products or services) CustomCode=Vámkódex CountryOrigin=Származási ország HiddenIntoCombo=Rejtett a select lista @@ -208,6 +213,7 @@ CostPmpHT=Net total VWAP ProductUsedForBuild=Auto consumed by production ProductBuilded=Production completed ProductsMultiPrice=Product multi-price +ProductsOrServiceMultiPrice=Customers prices (of products or services, multi-prices) ProductSellByQuarterHT=Products turnover quarterly VWAP ServiceSellByQuarterHT=Services turnover quarterly VWAP Quarter1=1st. Quarter diff --git a/htdocs/langs/hu_HU/shop.lang b/htdocs/langs/hu_HU/shop.lang index b43740e7e63..07c66d77d53 100644 --- a/htdocs/langs/hu_HU/shop.lang +++ b/htdocs/langs/hu_HU/shop.lang @@ -1,4 +1,5 @@ # Dolibarr language file - Source file is en_US - shop +FailedConnectDBCheckModuleSetup=Failed to connect to oscommerce database. Check your module setup Shop=Bolt ShopWeb=Web Bolt LastOrders=Utolsó rendelések diff --git a/htdocs/langs/hu_HU/stocks.lang b/htdocs/langs/hu_HU/stocks.lang index 30cdfee7e30..910a83d78ea 100644 --- a/htdocs/langs/hu_HU/stocks.lang +++ b/htdocs/langs/hu_HU/stocks.lang @@ -112,6 +112,7 @@ ReplenishmentOrdersDesc=This is list of all opened supplier orders Replenishments=Replenishments NbOfProductBeforePeriod=Quantity of product %s in stock before selected period (< %s) NbOfProductAfterPeriod=Quantity of product %s in stock after selected period (> %s) +MassMovement=Mass movement MassStockMovement=Mass stock movement SelectProductInAndOutWareHouse=Select a product, a quantity, a source warehouse and a target warehouse, then click "%s". Once this is done for all required movements, click onto "%s". RecordMovement=Record transfert diff --git a/htdocs/langs/id_ID/admin.lang b/htdocs/langs/id_ID/admin.lang index e150ee8b2f2..1b1873ab4e8 100644 --- a/htdocs/langs/id_ID/admin.lang +++ b/htdocs/langs/id_ID/admin.lang @@ -116,7 +116,7 @@ LanguageBrowserParameter=Parameter %s LocalisationDolibarrParameters=Localisation parameters ClientTZ=Client Time Zone (user) ClientHour=Client time (user) -OSTZ=Servre OS Time Zone +OSTZ=Server OS Time Zone PHPTZ=PHP server Time Zone PHPServerOffsetWithGreenwich=PHP server offset width Greenwich (seconds) ClientOffsetWithGreenwich=Client/Browser offset width Greenwich (seconds) @@ -233,7 +233,9 @@ OfficialWebSiteFr=French official web site OfficialWiki=Dolibarr documentation on Wiki OfficialDemo=Dolibarr online demo OfficialMarketPlace=Official market place for external modules/addons -OfficialWebHostingService=Official web hosting services (Cloud hosting) +OfficialWebHostingService=Referenced web hosting services (Cloud hosting) +ReferencedPreferredPartners=Preferred Partners +OtherResources=Autres ressources ForDocumentationSeeWiki=For user or developer documentation (Doc, FAQs...),
    take a look at the Dolibarr Wiki:
    %s ForAnswersSeeForum=For any other questions/help, you can use the Dolibarr forum:
    %s HelpCenterDesc1=This area can help you to get a Help support service on Dolibarr. @@ -369,9 +371,9 @@ ExtrafieldSelectList = Select from table ExtrafieldSeparator=Separator ExtrafieldCheckBox=Checkbox ExtrafieldRadio=Radio button -ExtrafieldParamHelpselect=Parameters list have to be like key,value

    for exemple :
    1,value1
    2,value2
    3,value3
    ...

    In order to have the list depending on another :
    1,value1|parent_list_code:parent_key
    2,value2|parent_list_code:parent_key -ExtrafieldParamHelpcheckbox=Parameters list have to be like key,value

    for exemple :
    1,value1
    2,value2
    3,value3
    ... -ExtrafieldParamHelpradio=Parameters list have to be like key,value

    for exemple :
    1,value1
    2,value2
    3,value3
    ... +ExtrafieldParamHelpselect=Parameters list have to be like key,value

    for example :
    1,value1
    2,value2
    3,value3
    ...

    In order to have the list depending on another :
    1,value1|parent_list_code:parent_key
    2,value2|parent_list_code:parent_key +ExtrafieldParamHelpcheckbox=Parameters list have to be like key,value

    for example :
    1,value1
    2,value2
    3,value3
    ... +ExtrafieldParamHelpradio=Parameters list have to be like key,value

    for example :
    1,value1
    2,value2
    3,value3
    ... ExtrafieldParamHelpsellist=Parameters list comes from a table
    Syntax : table_name:label_field:id_field::filter
    Example : c_typent:libelle:id::filter

    filter can be a simple test (eg active=1) to display only active value
    if you want to filter on extrafields use syntaxt extra.fieldcode=... (where field code is the code of extrafield)

    In order to have the list depending on another :
    c_typent:libelle:id:parent_list_code|parent_column:filter LibraryToBuildPDF=Library used to build PDF WarningUsingFPDF=Warning: Your conf.php contains directive dolibarr_pdf_force_fpdf=1. This means you use the FPDF library to generate PDF files. This library is old and does not support a lot of features (Unicode, image transparency, cyrillic, arab and asiatic languages, ...), so you may experience errors during PDF generation.
    To solve this and have a full support of PDF generation, please download TCPDF library, then comment or remove the line $dolibarr_pdf_force_fpdf=1, and add instead $dolibarr_lib_TCPDF_PATH='path_to_TCPDF_dir' @@ -472,7 +474,7 @@ Module410Desc=Webcalendar integration Module500Name=Special expenses (tax, social contributions, dividends) Module500Desc=Management of special expenses like taxes, social contribution, dividends and salaries Module510Name=Salaries -Module510Desc=Management of empoyees salaries and payments +Module510Desc=Management of employees salaries and payments Module600Name=Notifications Module600Desc=Send notifications by email on some Dolibarr business events to third party contacts Module700Name=Donations @@ -495,15 +497,15 @@ Module2400Name=Agenda Module2400Desc=Events/tasks and agenda management Module2500Name=Electronic Content Management Module2500Desc=Save and share documents -Module2600Name= WebServices -Module2600Desc= Enable the Dolibarr web services server -Module2700Name= Gravatar -Module2700Desc= Use online Gravatar service (www.gravatar.com) to show photo of users/members (found with their emails). Need an internet access +Module2600Name=WebServices +Module2600Desc=Enable the Dolibarr web services server +Module2700Name=Gravatar +Module2700Desc=Use online Gravatar service (www.gravatar.com) to show photo of users/members (found with their emails). Need an internet access Module2800Desc=FTP Client -Module2900Name= GeoIPMaxmind -Module2900Desc= GeoIP Maxmind conversions capabilities -Module3100Name= Skype -Module3100Desc= Add a Skype button into card of adherents / third parties / contacts +Module2900Name=GeoIPMaxmind +Module2900Desc=GeoIP Maxmind conversions capabilities +Module3100Name=Skype +Module3100Desc=Add a Skype button into card of adherents / third parties / contacts Module5000Name=Multi-company Module5000Desc=Allows you to manage multiple companies Module6000Name=Workflow @@ -681,6 +683,10 @@ Permission401=Read discounts Permission402=Create/modify discounts Permission403=Validate discounts Permission404=Delete discounts +Permission510=Read Salaries +Permission512=Create/modify salaries +Permission514=Delete salaries +Permission517=Export salaries Permission531=Read services Permission532=Create/modify services Permission534=Delete services @@ -999,7 +1005,7 @@ ExtraFieldsSupplierOrders=Complementary attributes (orders) ExtraFieldsSupplierInvoices=Complementary attributes (invoices) ExtraFieldsProject=Complementary attributes (projects) ExtraFieldsProjectTask=Complementary attributes (tasks) -ExtraFieldHasWrongValue=Attribut %s has a wrong value. +ExtraFieldHasWrongValue=Attribute %s has a wrong value. AlphaNumOnlyCharsAndNoSpace=only alphanumericals characters without space AlphaNumOnlyLowerCharsAndNoSpace=only alphanumericals and lower case characters without space SendingMailSetup=Setup of sendings by email @@ -1018,13 +1024,13 @@ SuhosinSessionEncrypt=Session storage encrypted by Suhosin ConditionIsCurrently=Condition is currently %s TestNotPossibleWithCurrentBrowsers=Automatic detection not possible YouUseBestDriver=You use driver %s that is best driver available currently. -YouDoNotUseBestDriver=You use drive %s but driver %s is recommanded. +YouDoNotUseBestDriver=You use drive %s but driver %s is recommended. NbOfProductIsLowerThanNoPb=You have only %s products/services into database. This does not required any particular optimization. SearchOptim=Search optimization YouHaveXProductUseSearchOptim=You have %s product into database. You should add the constant PRODUCT_DONOTSEARCH_ANYWHERE to 1 into Home-Setup-Other, you limit the search to the beginning of strings making possible for database to use index and you should get an immediate response. BrowserIsOK=You are using the web browser %s. This browser is ok for security and performance. BrowserIsKO=You are using the web browser %s. This browser is known to be a bad choice for security, performance and reliability. We recommand you to use Firefox, Chrome, Opera or Safari. -XDebugInstalled=XDebug est chargé. +XDebugInstalled=XDebug is loaded. XCacheInstalled=XCache is loaded. AddRefInList=Display customer/supplier ref into list (select list or combobox) and most of hyperlink FieldEdition=Edition of field %s @@ -1073,7 +1079,7 @@ WebCalServer=Server hosting calendar database WebCalDatabaseName=Database name WebCalUser=User to access database WebCalSetupSaved=Webcalendar setup saved successfully. -WebCalTestOk=Connection to server '%s' on database '%s' with user '%s' successfull. +WebCalTestOk=Connection to server '%s' on database '%s' with user '%s' successful. WebCalTestKo1=Connection to server '%s' succeed but database '%s' could not be reached. WebCalTestKo2=Connection to server '%s' with user '%s' failed. WebCalErrorConnectOkButWrongDatabase=Connection succeeded but database doesn't look to be a Webcalendar database. @@ -1119,7 +1125,7 @@ WatermarkOnDraftProposal=Watermark on draft commercial proposals (none if empty) OrdersSetup=Order management setup OrdersNumberingModules=Orders numbering models OrdersModelModule=Order documents models -HideTreadedOrders=Hide the treated or canceled orders in the list +HideTreadedOrders=Hide the treated or cancelled orders in the list ValidOrderAfterPropalClosed=To validate the order after proposal closer, makes it possible not to step by the provisional order FreeLegalTextOnOrders=Free text on orders WatermarkOnDraftOrders=Watermark on draft orders (none if empty) @@ -1214,9 +1220,9 @@ LDAPSynchroKO=Failed synchronization test LDAPSynchroKOMayBePermissions=Failed synchronization test. Check that connexion to server is correctly configured and allows LDAP udpates LDAPTCPConnectOK=TCP connect to LDAP server successful (Server=%s, Port=%s) LDAPTCPConnectKO=TCP connect to LDAP server failed (Server=%s, Port=%s) -LDAPBindOK=Connect/Authentificate to LDAP server sucessfull (Server=%s, Port=%s, Admin=%s, Password=%s) +LDAPBindOK=Connect/Authentificate to LDAP server successful (Server=%s, Port=%s, Admin=%s, Password=%s) LDAPBindKO=Connect/Authentificate to LDAP server failed (Server=%s, Port=%s, Admin=%s, Password=%s) -LDAPUnbindSuccessfull=Disconnect successfull +LDAPUnbindSuccessfull=Disconnect successful LDAPUnbindFailed=Disconnect failed LDAPConnectToDNSuccessfull=Connection to DN (%s) successful LDAPConnectToDNFailed=Connection to DN (%s) failed @@ -1273,7 +1279,7 @@ LDAPFieldSidExample=Example : objectsid LDAPFieldEndLastSubscription=Date of subscription end LDAPFieldTitle=Post/Function LDAPFieldTitleExample=Example: title -LDAPParametersAreStillHardCoded=LDAP parametres are still hardcoded (in contact class) +LDAPParametersAreStillHardCoded=LDAP parameters are still hardcoded (in contact class) LDAPSetupNotComplete=LDAP setup not complete (go on others tabs) LDAPNoUserOrPasswordProvidedAccessIsReadOnly=No administrator or password provided. LDAP access will be anonymous and in read only mode. LDAPDescContact=This page allows you to define LDAP attributes name in LDAP tree for each data found on Dolibarr contacts. @@ -1429,7 +1435,7 @@ OptionVATDefault=Standard OptionVATDebitOption=Option services on Debit OptionVatDefaultDesc=VAT is due:
    - on delivery for goods (we use invoice date)
    - on payments for services OptionVatDebitOptionDesc=VAT is due:
    - on delivery for goods (we use invoice date)
    - on invoice (debit) for services -SummaryOfVatExigibilityUsedByDefault=Time of VAT exigibility by default according to choosed option: +SummaryOfVatExigibilityUsedByDefault=Time of VAT exigibility by default according to chosen option: OnDelivery=On delivery OnPayment=On payment OnInvoice=On invoice @@ -1446,7 +1452,7 @@ AccountancyCodeBuy=Purchase account. code AgendaSetup=Events and agenda module setup PasswordTogetVCalExport=Key to authorize export link PastDelayVCalExport=Do not export event older than -AGENDA_USE_EVENT_TYPE=Use events types (managed into menu Setup -> Dictionnary -> Type of agenda events) +AGENDA_USE_EVENT_TYPE=Use events types (managed into menu Setup -> Dictionary -> Type of agenda events) ##### ClickToDial ##### ClickToDialDesc=This module allows to add an icon after phone numbers. A click on this icon will call a server with a particular URL you define below. This can be used to call a call center system from Dolibarr that can call the phone number on a SIP system for example. ##### Point Of Sales (CashDesk) ##### diff --git a/htdocs/langs/id_ID/contracts.lang b/htdocs/langs/id_ID/contracts.lang index def3d8aceff..e5ad112b222 100644 --- a/htdocs/langs/id_ID/contracts.lang +++ b/htdocs/langs/id_ID/contracts.lang @@ -1,99 +1,101 @@ # Dolibarr language file - Source file is en_US - contracts -# ContractsArea=Contracts area -# ListOfContracts=List of contracts -# LastContracts=Last %s modified contracts -# AllContracts=All contracts -# ContractCard=Contract card -# ContractStatus=Contract status -# ContractStatusNotRunning=Not running -# ContractStatusRunning=Running -# ContractStatusDraft=Draft -# ContractStatusValidated=Validated -# ContractStatusClosed=Closed -# ServiceStatusInitial=Not running -# ServiceStatusRunning=Running -# ServiceStatusNotLate=Running, not expired -# ServiceStatusNotLateShort=Not expired -# ServiceStatusLate=Running, expired -# ServiceStatusLateShort=Expired -# ServiceStatusClosed=Closed -# ServicesLegend=Services legend -# Contracts=Contracts -# Contract=Contract -# NoContracts=No contracts -# MenuServices=Services -# MenuInactiveServices=Services not active -# MenuRunningServices=Running services -# MenuExpiredServices=Expired services -# MenuClosedServices=Closed services -# NewContract=New contract -# AddContract=Add contract -# SearchAContract=Search a contract -# DeleteAContract=Delete a contract -# CloseAContract=Close a contract -# ConfirmDeleteAContract=Are you sure you want to delete this contract and all its services ? -# ConfirmValidateContract=Are you sure you want to validate this contract under name %s ? -# ConfirmCloseContract=This will close all services (active or not). Are you sure you want to close this contract ? -# ConfirmCloseService=Are you sure you want to close this service with date %s ? -# ValidateAContract=Validate a contract -# ActivateService=Activate service -# ConfirmActivateService=Are you sure you want to activate this service with date %s ? -# RefContract=Contract reference -# DateContract=Contract date -# DateServiceActivate=Service activation date -# DateServiceUnactivate=Service deactivation date -# DateServiceStart=Date for beginning of service -# DateServiceEnd=Date for end of service -# ShowContract=Show contract -# ListOfServices=List of services -# ListOfInactiveServices=List of not active services -# ListOfExpiredServices=List of expired active services -# ListOfClosedServices=List of closed services -# ListOfRunningContractsLines=List of running contract lines -# ListOfRunningServices=List of running services -# NotActivatedServices=Inactive services (among validated contracts) -# BoardNotActivatedServices=Services to activate among validated contracts -# LastContracts=Last %s modified contracts -# LastActivatedServices=Last %s activated services -# LastModifiedServices=Last %s modified services -# EditServiceLine=Edit service line -# ContractStartDate=Start date -# ContractEndDate=End date -# DateStartPlanned=Planned start date -# DateStartPlannedShort=Planned start date -# DateEndPlanned=Planned end date -# DateEndPlannedShort=Planned end date -# DateStartReal=Real start date -# DateStartRealShort=Real start date -# DateEndReal=Real end date -# DateEndRealShort=Real end date -# NbOfServices=Nb of services -# CloseService=Close service -# ServicesNomberShort=%s service(s) -# RunningServices=Running services -# BoardRunningServices=Expired running services -# ServiceStatus=Status of service -# DraftContracts=Drafts contracts -# CloseRefusedBecauseOneServiceActive=Contract can't be closed as ther is at least one open service on it -# CloseAllContracts=Close all contract lines -# DeleteContractLine=Delete a contract line -# ConfirmDeleteContractLine=Are you sure you want to delete this contract line ? -# MoveToAnotherContract=Move service into another contract. -# ConfirmMoveToAnotherContract=I choosed new target contract and confirm I want to move this service into this contract. -# ConfirmMoveToAnotherContractQuestion=Choose in which existing contract (of same third party), you want to move this service to ? -# PaymentRenewContractId=Renew contract line (number %s) -# ExpiredSince=Expiration date -# RelatedContracts=Related contracts -# NoExpiredServices=No expired active services -# ListOfServicesToExpireWithDuration=List of Services to expire in %s days -# ListOfServicesToExpireWithDurationNeg=List of Services expired from more than %s days -# ListOfServicesToExpire=List of Services to expire -# NoteListOfYourExpiredServices=This list contains only services of contracts for third parties you are linked to as a sale representative. +ContractsArea=Contracts area +ListOfContracts=List of contracts +LastContracts=Last %s modified contracts +AllContracts=All contracts +ContractCard=Contract card +ContractStatus=Contract status +ContractStatusNotRunning=Not running +ContractStatusRunning=Running +ContractStatusDraft=Draft +ContractStatusValidated=Validated +ContractStatusClosed=Closed +ServiceStatusInitial=Not running +ServiceStatusRunning=Running +ServiceStatusNotLate=Running, not expired +ServiceStatusNotLateShort=Not expired +ServiceStatusLate=Running, expired +ServiceStatusLateShort=Expired +ServiceStatusClosed=Closed +ServicesLegend=Services legend +Contracts=Contracts +Contract=Contract +NoContracts=No contracts +MenuServices=Services +MenuInactiveServices=Services not active +MenuRunningServices=Running services +MenuExpiredServices=Expired services +MenuClosedServices=Closed services +NewContract=New contract +AddContract=Add contract +SearchAContract=Search a contract +DeleteAContract=Delete a contract +CloseAContract=Close a contract +ConfirmDeleteAContract=Are you sure you want to delete this contract and all its services ? +ConfirmValidateContract=Are you sure you want to validate this contract under name %s ? +ConfirmCloseContract=This will close all services (active or not). Are you sure you want to close this contract ? +ConfirmCloseService=Are you sure you want to close this service with date %s ? +ValidateAContract=Validate a contract +ActivateService=Activate service +ConfirmActivateService=Are you sure you want to activate this service with date %s ? +RefContract=Contract reference +DateContract=Contract date +DateServiceActivate=Service activation date +DateServiceUnactivate=Service deactivation date +DateServiceStart=Date for beginning of service +DateServiceEnd=Date for end of service +ShowContract=Show contract +ListOfServices=List of services +ListOfInactiveServices=List of not active services +ListOfExpiredServices=List of expired active services +ListOfClosedServices=List of closed services +ListOfRunningContractsLines=List of running contract lines +ListOfRunningServices=List of running services +NotActivatedServices=Inactive services (among validated contracts) +BoardNotActivatedServices=Services to activate among validated contracts +LastContracts=Last %s modified contracts +LastActivatedServices=Last %s activated services +LastModifiedServices=Last %s modified services +EditServiceLine=Edit service line +ContractStartDate=Start date +ContractEndDate=End date +DateStartPlanned=Planned start date +DateStartPlannedShort=Planned start date +DateEndPlanned=Planned end date +DateEndPlannedShort=Planned end date +DateStartReal=Real start date +DateStartRealShort=Real start date +DateEndReal=Real end date +DateEndRealShort=Real end date +NbOfServices=Nb of services +CloseService=Close service +ServicesNomberShort=%s service(s) +RunningServices=Running services +BoardRunningServices=Expired running services +ServiceStatus=Status of service +DraftContracts=Drafts contracts +CloseRefusedBecauseOneServiceActive=Contract can't be closed as ther is at least one open service on it +CloseAllContracts=Close all contract lines +DeleteContractLine=Delete a contract line +ConfirmDeleteContractLine=Are you sure you want to delete this contract line ? +MoveToAnotherContract=Move service into another contract. +ConfirmMoveToAnotherContract=I choosed new target contract and confirm I want to move this service into this contract. +ConfirmMoveToAnotherContractQuestion=Choose in which existing contract (of same third party), you want to move this service to ? +PaymentRenewContractId=Renew contract line (number %s) +ExpiredSince=Expiration date +RelatedContracts=Related contracts +NoExpiredServices=No expired active services +ListOfServicesToExpireWithDuration=List of Services to expire in %s days +ListOfServicesToExpireWithDurationNeg=List of Services expired from more than %s days +ListOfServicesToExpire=List of Services to expire +NoteListOfYourExpiredServices=This list contains only services of contracts for third parties you are linked to as a sale representative. +StandardContractsTemplate=Standard contracts template +ContactNameAndSignature=For %s, name and signature: ##### Types de contacts ##### -# TypeContact_contrat_internal_SALESREPSIGN=Sales representative signing contract -# TypeContact_contrat_internal_SALESREPFOLL=Sales representative following-up contract -# TypeContact_contrat_external_BILLING=Billing customer contact -# TypeContact_contrat_external_CUSTOMER=Follow-up customer contact -# TypeContact_contrat_external_SALESREPSIGN=Signing contract customer contact -# Error_CONTRACT_ADDON_NotDefined=Constant CONTRACT_ADDON not defined +TypeContact_contrat_internal_SALESREPSIGN=Sales representative signing contract +TypeContact_contrat_internal_SALESREPFOLL=Sales representative following-up contract +TypeContact_contrat_external_BILLING=Billing customer contact +TypeContact_contrat_external_CUSTOMER=Follow-up customer contact +TypeContact_contrat_external_SALESREPSIGN=Signing contract customer contact +Error_CONTRACT_ADDON_NotDefined=Constant CONTRACT_ADDON not defined diff --git a/htdocs/langs/id_ID/exports.lang b/htdocs/langs/id_ID/exports.lang index c9560c019ed..c5ecb8afa63 100644 --- a/htdocs/langs/id_ID/exports.lang +++ b/htdocs/langs/id_ID/exports.lang @@ -1,134 +1,134 @@ # Dolibarr language file - Source file is en_US - exports -# ExportsArea=Exports area -# ImportArea=Import area -# NewExport=New export -# NewImport=New import -# ExportableDatas=Exportable dataset -# ImportableDatas=Importable dataset -# SelectExportDataSet=Choose dataset you want to export... -# SelectImportDataSet=Choose dataset you want to import... -# SelectExportFields=Choose fields you want to export, or select a predefined export profile -# SelectImportFields=Choose source file fields you want to import and their target field in database by moving them up and down with anchor %s, or select a predefined import profil: -# NotImportedFields=Fields of source file not imported -# SaveExportModel=Save this export profile if you plan to reuse it later... -# SaveImportModel=Save this import profile if you plan to reuse it later... -# ExportModelName=Export profile name -# ExportModelSaved=Export profile saved under name %s. -# ExportableFields=Exportable fields -# ExportedFields=Exported fields -# ImportModelName=Import profile name -# ImportModelSaved=Import profile saved under name %s. -# ImportableFields=Importable fields -# ImportedFields=Imported fields -# DatasetToExport=Dataset to export -# DatasetToImport=Import file into dataset -# NoDiscardedFields=No fields in source file are discarded -# Dataset=Dataset -# ChooseFieldsOrdersAndTitle=Choose fields order... -# FieldsOrder=Fields order -# FieldsTitle=Fields title -# FieldOrder=Field order -# FieldTitle=Field title -# ChooseExportFormat=Choose export format -# NowClickToGenerateToBuildExportFile=Now, select file format in combo box and click on "Generate" to build export file... -# AvailableFormats=Available formats -# LibraryShort=Library -# LibraryUsed=Library used +ExportsArea=Exports area +ImportArea=Import area +NewExport=New export +NewImport=New import +ExportableDatas=Exportable dataset +ImportableDatas=Importable dataset +SelectExportDataSet=Choose dataset you want to export... +SelectImportDataSet=Choose dataset you want to import... +SelectExportFields=Choose fields you want to export, or select a predefined export profile +SelectImportFields=Choose source file fields you want to import and their target field in database by moving them up and down with anchor %s, or select a predefined import profile: +NotImportedFields=Fields of source file not imported +SaveExportModel=Save this export profile if you plan to reuse it later... +SaveImportModel=Save this import profile if you plan to reuse it later... +ExportModelName=Export profile name +ExportModelSaved=Export profile saved under name %s. +ExportableFields=Exportable fields +ExportedFields=Exported fields +ImportModelName=Import profile name +ImportModelSaved=Import profile saved under name %s. +ImportableFields=Importable fields +ImportedFields=Imported fields +DatasetToExport=Dataset to export +DatasetToImport=Import file into dataset +NoDiscardedFields=No fields in source file are discarded +Dataset=Dataset +ChooseFieldsOrdersAndTitle=Choose fields order... +FieldsOrder=Fields order +FieldsTitle=Fields title +FieldOrder=Field order +FieldTitle=Field title +ChooseExportFormat=Choose export format +NowClickToGenerateToBuildExportFile=Now, select file format in combo box and click on "Generate" to build export file... +AvailableFormats=Available formats +LibraryShort=Library +LibraryUsed=Library used LibraryVersion=Versi -# Step=Step -# FormatedImport=Import assistant -# FormatedImportDesc1=This area allows to import personalized data, using an assistant to help you in process without technical knowledge. -# FormatedImportDesc2=First step is to choose a king of data you want to load, then file to load, then to choose which fields you want to load. -# FormatedExport=Export assistant -# FormatedExportDesc1=This area allows to export personalized data, using an assistant to help you in process without technical knowledge. -# FormatedExportDesc2=First step is to choose a predefined dataset, then to choose which fields you want in your result files, and which order. -# FormatedExportDesc3=When data to export are selected, you can define output file format you want to export your data to. -# Sheet=Sheet -# NoImportableData=No importable data (no module with definitions to allow data imports) -# FileSuccessfullyBuilt=Export file generated -# SQLUsedForExport=SQL Request used to build export file -# LineId=Id of line -# LineDescription=Description of line -# LineUnitPrice=Unit price of line -# LineVATRate=VAT Rate of line -# LineQty=Quantity for line -# LineTotalHT=Amount net of tax for line -# LineTotalTTC=Amount with tax for line -# LineTotalVAT=Amount of VAT for line -# TypeOfLineServiceOrProduct=Type of line (0=product, 1=service) -# FileWithDataToImport=File with data to import -# FileToImport=Source file to import -# FileMustHaveOneOfFollowingFormat=File to import must have one of following format -# DownloadEmptyExample=Download example of empty source file -# ChooseFormatOfFileToImport=Choose file format to use as import file format by clicking on picto %s to select it... -# ChooseFileToImport=Upload file then click on picto %s to select file as source import file... -# SourceFileFormat=Source file format -# FieldsInSourceFile=Fields in source file -# FieldsInTargetDatabase=Target fields in Dolibarr database (bold=mandatory) -# Field=Field -# NoFields=No fields -# MoveField=Move field column number %s -# ExampleOfImportFile=Example_of_import_file -# SaveImportProfile=Save this import profile -# ErrorImportDuplicateProfil=Failed to save this import profile with this name. An existing profile already exists with this name. -# ImportSummary=Import setup summary -# TablesTarget=Targeted tables -# FieldsTarget=Targeted fields -# TableTarget=Targeted table -# FieldTarget=Targeted field -# FieldSource=Source field -# DoNotImportFirstLine=Do not import first line of source file -# NbOfSourceLines=Number of lines in source file -# NowClickToTestTheImport=Check import parameters you have defined. If they are correct, click on button "%s" to launch a simulation of import process (no data will be changed in your database, it's only a simulation for the moment)... -# RunSimulateImportFile=Launch the import simulation -# FieldNeedSource=This fiels in database require a data from source file -# SomeMandatoryFieldHaveNoSource=Some mandatory fields have no source from data file -# InformationOnSourceFile=Information on source file -# InformationOnTargetTables=Information on target fields -# SelectAtLeastOneField=Switch at least one source field in the column of fields to export -# SelectFormat=Choose this import file format -# RunImportFile=Launch import file -# NowClickToRunTheImport=Check result of import simulation. If everything is ok, launch the definitive import. -# DataLoadedWithId=All data will be loaded with the following import id: %s -# ErrorMissingMandatoryValue=Mandatory data is empty in source file for field %s. -# TooMuchErrors=There is still %s other source lines with errors but output has been limited. -# TooMuchWarnings=There is still %s other source lines with warnings but output has been limited. -# EmptyLine=Empty line (will be discarded) -# CorrectErrorBeforeRunningImport=You must first correct all errors before running definitive import. -# FileWasImported=File was imported with number %s. -# YouCanUseImportIdToFindRecord=You can find all imported records in your database by filtering on field import_key='%s'. -# NbOfLinesOK=Number of lines with no errors and no warnings: %s. -# NbOfLinesImported=Number of lines successfully imported: %s. -# DataComeFromNoWhere=Value to insert comes from nowhere in source file. -# DataComeFromFileFieldNb=Value to insert comes from field number %s in source file. -# DataComeFromIdFoundFromRef=Value that comes from field number %s of source file will be used to find id of parent object to use (So the objet %s that has the ref. from source file must exists into Dolibarr). -# DataComeFromIdFoundFromCodeId=Code that comes from field number %s of source file will be used to find id of parent object to use (So the code from source file must exists into dictionary %s). Note that if you know id, you can also use it into source file instead of code. Import should work in both cases. -# DataIsInsertedInto=Data coming from source file will be inserted into the following field: -# DataIDSourceIsInsertedInto=The id of parent object found using the data in source file, will be inserted into the following field: -# DataCodeIDSourceIsInsertedInto=The id of parent line found from code, will be inserted into following field: -# SourceRequired=Data value is mandatory -# SourceExample=Example of possible data value -# ExampleAnyRefFoundIntoElement=Any ref found for element %s -# ExampleAnyCodeOrIdFoundIntoDictionary=Any code (or id) found into dictionary %s -# CSVFormatDesc=Comma Separated Value file format (.csv).
    This is a text file format where fields are separated by separator [ %s ]. If separator is found inside a field content, field is rounded by round character [ %s ]. Escape character to escape round character is [ %s ]. -# Excel95FormatDesc=Excel file format (.xls)
    This is native Excel 95 format (BIFF5). -# Excel2007FormatDesc=Excel file format (.xlsx)
    This is native Excel 2007 format (SpreadsheetML). -# TsvFormatDesc=Tab Separated Value file format (.tsv)
    This is a text file format where fields are separated by a tabulator [tab]. -# ExportFieldAutomaticallyAdded=Field %s was automatically added. It will avoid you to have similar lines to be treated as duplicate records (with this field added, all lines will own their own id and will differ). -# CsvOptions=Csv Options -# Separator=Separator -# Enclosure=Enclosure -# SuppliersProducts=Suppliers Products -# BankCode=Bank code -# DeskCode=Desk code -# BankAccountNumber=Account number -# BankAccountNumberKey=Key -# SpecialCode=Special code -# ExportStringFilter=%% allows replacing one or more characters in the text -# ExportDateFilter='YYYY' 'YYYYMM' 'YYYYMMDD': filters by one year/month/day
    'YYYY+YYYY' 'YYYYMM+YYYYMM' 'YYYYMMDD+YYYYMMDD': filters over a range of years/months/days
    '>YYYY' '>YYYYMM' '>YYYYMMDD': filters on the following years/months/days
    '<YYYY' '<YYYYMM' '<YYYYMMDD': filters on the previous years/months/days -# ExportNumericFilter='NNNNN' filters by one value
    'NNNNN+NNNNN' filters over a range of values
    '>NNNNN' filters by lower values
    '>NNNNN' filters by higher values +Step=Step +FormatedImport=Import assistant +FormatedImportDesc1=This area allows to import personalized data, using an assistant to help you in process without technical knowledge. +FormatedImportDesc2=First step is to choose a king of data you want to load, then file to load, then to choose which fields you want to load. +FormatedExport=Export assistant +FormatedExportDesc1=This area allows to export personalized data, using an assistant to help you in process without technical knowledge. +FormatedExportDesc2=First step is to choose a predefined dataset, then to choose which fields you want in your result files, and which order. +FormatedExportDesc3=When data to export are selected, you can define output file format you want to export your data to. +Sheet=Sheet +NoImportableData=No importable data (no module with definitions to allow data imports) +FileSuccessfullyBuilt=Export file generated +SQLUsedForExport=SQL Request used to build export file +LineId=Id of line +LineDescription=Description of line +LineUnitPrice=Unit price of line +LineVATRate=VAT Rate of line +LineQty=Quantity for line +LineTotalHT=Amount net of tax for line +LineTotalTTC=Amount with tax for line +LineTotalVAT=Amount of VAT for line +TypeOfLineServiceOrProduct=Type of line (0=product, 1=service) +FileWithDataToImport=File with data to import +FileToImport=Source file to import +FileMustHaveOneOfFollowingFormat=File to import must have one of following format +DownloadEmptyExample=Download example of empty source file +ChooseFormatOfFileToImport=Choose file format to use as import file format by clicking on picto %s to select it... +ChooseFileToImport=Upload file then click on picto %s to select file as source import file... +SourceFileFormat=Source file format +FieldsInSourceFile=Fields in source file +FieldsInTargetDatabase=Target fields in Dolibarr database (bold=mandatory) +Field=Field +NoFields=No fields +MoveField=Move field column number %s +ExampleOfImportFile=Example_of_import_file +SaveImportProfile=Save this import profile +ErrorImportDuplicateProfil=Failed to save this import profile with this name. An existing profile already exists with this name. +ImportSummary=Import setup summary +TablesTarget=Targeted tables +FieldsTarget=Targeted fields +TableTarget=Targeted table +FieldTarget=Targeted field +FieldSource=Source field +DoNotImportFirstLine=Do not import first line of source file +NbOfSourceLines=Number of lines in source file +NowClickToTestTheImport=Check import parameters you have defined. If they are correct, click on button "%s" to launch a simulation of import process (no data will be changed in your database, it's only a simulation for the moment)... +RunSimulateImportFile=Launch the import simulation +FieldNeedSource=This field requires data from the source file +SomeMandatoryFieldHaveNoSource=Some mandatory fields have no source from data file +InformationOnSourceFile=Information on source file +InformationOnTargetTables=Information on target fields +SelectAtLeastOneField=Switch at least one source field in the column of fields to export +SelectFormat=Choose this import file format +RunImportFile=Launch import file +NowClickToRunTheImport=Check result of import simulation. If everything is ok, launch the definitive import. +DataLoadedWithId=All data will be loaded with the following import id: %s +ErrorMissingMandatoryValue=Mandatory data is empty in source file for field %s. +TooMuchErrors=There is still %s other source lines with errors but output has been limited. +TooMuchWarnings=There is still %s other source lines with warnings but output has been limited. +EmptyLine=Empty line (will be discarded) +CorrectErrorBeforeRunningImport=You must first correct all errors before running definitive import. +FileWasImported=File was imported with number %s. +YouCanUseImportIdToFindRecord=You can find all imported records in your database by filtering on field import_key='%s'. +NbOfLinesOK=Number of lines with no errors and no warnings: %s. +NbOfLinesImported=Number of lines successfully imported: %s. +DataComeFromNoWhere=Value to insert comes from nowhere in source file. +DataComeFromFileFieldNb=Value to insert comes from field number %s in source file. +DataComeFromIdFoundFromRef=Value that comes from field number %s of source file will be used to find id of parent object to use (So the objet %s that has the ref. from source file must exists into Dolibarr). +DataComeFromIdFoundFromCodeId=Code that comes from field number %s of source file will be used to find id of parent object to use (So the code from source file must exists into dictionary %s). Note that if you know id, you can also use it into source file instead of code. Import should work in both cases. +DataIsInsertedInto=Data coming from source file will be inserted into the following field: +DataIDSourceIsInsertedInto=The id of parent object found using the data in source file, will be inserted into the following field: +DataCodeIDSourceIsInsertedInto=The id of parent line found from code, will be inserted into following field: +SourceRequired=Data value is mandatory +SourceExample=Example of possible data value +ExampleAnyRefFoundIntoElement=Any ref found for element %s +ExampleAnyCodeOrIdFoundIntoDictionary=Any code (or id) found into dictionary %s +CSVFormatDesc=Comma Separated Value file format (.csv).
    This is a text file format where fields are separated by separator [ %s ]. If separator is found inside a field content, field is rounded by round character [ %s ]. Escape character to escape round character is [ %s ]. +Excel95FormatDesc=Excel file format (.xls)
    This is native Excel 95 format (BIFF5). +Excel2007FormatDesc=Excel file format (.xlsx)
    This is native Excel 2007 format (SpreadsheetML). +TsvFormatDesc=Tab Separated Value file format (.tsv)
    This is a text file format where fields are separated by a tabulator [tab]. +ExportFieldAutomaticallyAdded=Field %s was automatically added. It will avoid you to have similar lines to be treated as duplicate records (with this field added, all lines will own their own id and will differ). +CsvOptions=Csv Options +Separator=Separator +Enclosure=Enclosure +SuppliersProducts=Suppliers Products +BankCode=Bank code +DeskCode=Desk code +BankAccountNumber=Account number +BankAccountNumberKey=Key +SpecialCode=Special code +ExportStringFilter=%% allows replacing one or more characters in the text +ExportDateFilter='YYYY' 'YYYYMM' 'YYYYMMDD': filters by one year/month/day
    'YYYY+YYYY' 'YYYYMM+YYYYMM' 'YYYYMMDD+YYYYMMDD': filters over a range of years/months/days
    '>YYYY' '>YYYYMM' '>YYYYMMDD': filters on the following years/months/days
    '<YYYY' '<YYYYMM' '<YYYYMMDD': filters on the previous years/months/days +ExportNumericFilter='NNNNN' filters by one value
    'NNNNN+NNNNN' filters over a range of values
    '>NNNNN' filters by lower values
    '>NNNNN' filters by higher values ## filters -# SelectFilterFields=If you want to filter on some values, just input values here. -# FilterableFields=Champs Filtrables -# FilteredFields=Filtered fields -# FilteredFieldsValues=Value for filter +SelectFilterFields=If you want to filter on some values, just input values here. +FilterableFields=Champs Filtrables +FilteredFields=Filtered fields +FilteredFieldsValues=Value for filter diff --git a/htdocs/langs/id_ID/holiday.lang b/htdocs/langs/id_ID/holiday.lang index 0c755ca3301..da03299e0da 100644 --- a/htdocs/langs/id_ID/holiday.lang +++ b/htdocs/langs/id_ID/holiday.lang @@ -8,7 +8,6 @@ NotActiveModCP=You must enable the module holidays to view this page. NotConfigModCP=You must configure the module holidays to view this page. To do this, click here . NoCPforUser=You don't have a demand for holidays. AddCP=Apply for holidays -CPErrorSQL=An SQL error occurred: Employe=Employee DateDebCP=Start date DateFinCP=End date diff --git a/htdocs/langs/id_ID/languages.lang b/htdocs/langs/id_ID/languages.lang index 494fd298eb3..8d55ff1e2fc 100644 --- a/htdocs/langs/id_ID/languages.lang +++ b/htdocs/langs/id_ID/languages.lang @@ -19,8 +19,9 @@ Language_en_SA=English (Saudi Arabia) Language_en_US=Bahasa Inggris (Amerika Serikat) Language_en_ZA=Inggris (Afrika Selatan) Language_es_ES=Spanyol +Language_es_DO=Spanish (Dominican Republic) Language_es_AR=Spanyol (Argentina) -Language_es_CL=Spanish (Chile) +Language_es_CL=Spanyol (Cili) Language_es_HN=Spanyol (Honduras) Language_es_MX=Spanyol (Mexico) Language_es_PY=Spanyol (Paraguay) @@ -38,6 +39,7 @@ Language_fr_NC=Perancis (Kaledonia Baru) Language_he_IL=Ibrani Language_hr_HR=Kroasia Language_hu_HU=Hongaria +Language_id_ID=Indonesian Language_is_IS=Icelandic Language_it_IT=Italia Language_ja_JP=Jepang @@ -58,7 +60,7 @@ Language_tr_TR=Turki Language_sl_SI=Slovenia Language_sv_SV=Swedia Language_sv_SE=Swedia -Language_sq_AL=Albanian +Language_sq_AL=Albania Language_sk_SK=Slovakia Language_th_TH=Thai Language_uk_UA=Ukraina diff --git a/htdocs/langs/id_ID/mails.lang b/htdocs/langs/id_ID/mails.lang index 08ee8a280cb..98e6dc335ee 100644 --- a/htdocs/langs/id_ID/mails.lang +++ b/htdocs/langs/id_ID/mails.lang @@ -79,6 +79,7 @@ MailtoEMail=Hyper link to email ActivateCheckRead=Allow to use the "Unsubcribe" link ActivateCheckReadKey=Key use to encrypt URL use for "Read Receipt" and "Unsubcribe" feature EMailSentToNRecipients=EMail sent to %s recipients. +XTargetsAdded=%s recipients added into target list EachInvoiceWillBeAttachedToEmail=A document using default invoice document template will be created and attached to each email. MailTopicSendRemindUnpaidInvoices=Reminder of invoice %s (%s) SendRemind=Send reminder by EMails diff --git a/htdocs/langs/id_ID/main.lang b/htdocs/langs/id_ID/main.lang index 2a3177c4aa8..ed3aca59cfc 100644 --- a/htdocs/langs/id_ID/main.lang +++ b/htdocs/langs/id_ID/main.lang @@ -551,6 +551,7 @@ MailSentBy=Email sent by TextUsedInTheMessageBody=Email body SendAcknowledgementByMail=Send Ack. by email NoEMail=No email +NoMobilePhone=No mobile phone Owner=Owner DetectedVersion=Detected version FollowingConstantsWillBeSubstituted=The following constants will be replaced with the corresponding value. diff --git a/htdocs/langs/id_ID/products.lang b/htdocs/langs/id_ID/products.lang index e56b9cc59c2..37012349b02 100644 --- a/htdocs/langs/id_ID/products.lang +++ b/htdocs/langs/id_ID/products.lang @@ -28,8 +28,10 @@ ProductsAndServicesStatistics=Products and Services statistics ProductsStatistics=Products statistics ProductsOnSell=Available products ProductsNotOnSell=Obsolete products +ProductsOnSellAndOnBuy=Products not for sale nor purchase ServicesOnSell=Available services ServicesNotOnSell=Obsolete services +ServicesOnSellAndOnBuy=Services not for sale nor purchase InternalRef=Internal reference LastRecorded=Last products/services on sell recorded LastRecordedProductsAndServices=Last %s recorded products/services @@ -70,6 +72,8 @@ PublicPrice=Public price CurrentPrice=Current price NewPrice=New price MinPrice=Minim. selling price +MinPriceHT=Minim. selling price (net of tax) +MinPriceTTC=Minim. selling price (inc. tax) CantBeLessThanMinPrice=The selling price can't be lower than minimum allowed for this product (%s without tax). This message can also appears if you type a too important discount. ContractStatus=Contract status ContractStatusClosed=Closed @@ -179,6 +183,7 @@ ProductIsUsed=This product is used NewRefForClone=Ref. of new product/service CustomerPrices=Customers prices SuppliersPrices=Suppliers prices +SuppliersPricesOfProductsOrServices=Suppliers prices (of products or services) CustomCode=Customs code CountryOrigin=Origin country HiddenIntoCombo=Hidden into select lists @@ -208,6 +213,7 @@ CostPmpHT=Net total VWAP ProductUsedForBuild=Auto consumed by production ProductBuilded=Production completed ProductsMultiPrice=Product multi-price +ProductsOrServiceMultiPrice=Customers prices (of products or services, multi-prices) ProductSellByQuarterHT=Products turnover quarterly VWAP ServiceSellByQuarterHT=Services turnover quarterly VWAP Quarter1=1st. Quarter diff --git a/htdocs/langs/id_ID/shop.lang b/htdocs/langs/id_ID/shop.lang index b6cd78b5028..156af426bb0 100644 --- a/htdocs/langs/id_ID/shop.lang +++ b/htdocs/langs/id_ID/shop.lang @@ -1,10 +1,11 @@ # Dolibarr language file - Source file is en_US - shop -# Shop=Shop -# ShopWeb=Web Shop -# LastOrders=Last orders -# OnStandBy=On standby -# TreatmentInProgress=Treatment in progress -# LastCustomers=Last customers -# OSCommerceShop=OSCommerce shop -# OSCommerce=OSCommerce -# AddProd=Sell online +FailedConnectDBCheckModuleSetup=Failed to connect to oscommerce database. Check your module setup +Shop=Shop +ShopWeb=Web Shop +LastOrders=Last orders +OnStandBy=On standby +TreatmentInProgress=Treatment in progress +LastCustomers=Last customers +OSCommerceShop=OSCommerce shop +OSCommerce=OSCommerce +AddProd=Sell online diff --git a/htdocs/langs/id_ID/stocks.lang b/htdocs/langs/id_ID/stocks.lang index 54ff037d912..710f42d1581 100644 --- a/htdocs/langs/id_ID/stocks.lang +++ b/htdocs/langs/id_ID/stocks.lang @@ -112,6 +112,7 @@ ReplenishmentOrdersDesc=This is list of all opened supplier orders Replenishments=Replenishments NbOfProductBeforePeriod=Quantity of product %s in stock before selected period (< %s) NbOfProductAfterPeriod=Quantity of product %s in stock after selected period (> %s) +MassMovement=Mass movement MassStockMovement=Mass stock movement SelectProductInAndOutWareHouse=Select a product, a quantity, a source warehouse and a target warehouse, then click "%s". Once this is done for all required movements, click onto "%s". RecordMovement=Record transfert diff --git a/htdocs/langs/is_IS/admin.lang b/htdocs/langs/is_IS/admin.lang index d814774e5f4..05156fc06d3 100644 --- a/htdocs/langs/is_IS/admin.lang +++ b/htdocs/langs/is_IS/admin.lang @@ -116,7 +116,7 @@ LanguageBrowserParameter=Viðfang %s LocalisationDolibarrParameters=Staðsetning stika ClientTZ=Client Time Zone (user) ClientHour=Client time (user) -OSTZ=Time Zone OS miðlara +OSTZ=Server OS Time Zone PHPTZ=Time Zone PHP miðlara PHPServerOffsetWithGreenwich=PHP-miðlara móti breidd Greenwich (sekúndur) ClientOffsetWithGreenwich=Viðskiptavinur / Browser móti breidd Greenwich (sekúndur) @@ -233,7 +233,9 @@ OfficialWebSiteFr=Franska opinber vefur staður OfficialWiki=Dolibarr Wiki OfficialDemo=Dolibarr netinu kynningu OfficialMarketPlace=Opinber markaði fyrir ytri modules / addons -OfficialWebHostingService=Official web hosting services (Cloud hosting) +OfficialWebHostingService=Referenced web hosting services (Cloud hosting) +ReferencedPreferredPartners=Preferred Partners +OtherResources=Autres ressources ForDocumentationSeeWiki=Notandanafn eða skjölum verktaki '(Doc, FAQs ...),
    kíkið á Dolibarr Wiki:
    %s ForAnswersSeeForum=Fyrir einhverjar aðrar spurningar / hjálp, getur þú notað Dolibarr spjall:
    %s HelpCenterDesc1=Þetta svæði getur hjálpað þér að fá stuðning Hjálp þjónusta á Dolibarr. @@ -369,9 +371,9 @@ ExtrafieldSelectList = Select from table ExtrafieldSeparator=Separator ExtrafieldCheckBox=Checkbox ExtrafieldRadio=Radio button -ExtrafieldParamHelpselect=Parameters list have to be like key,value

    for exemple :
    1,value1
    2,value2
    3,value3
    ...

    In order to have the list depending on another :
    1,value1|parent_list_code:parent_key
    2,value2|parent_list_code:parent_key -ExtrafieldParamHelpcheckbox=Parameters list have to be like key,value

    for exemple :
    1,value1
    2,value2
    3,value3
    ... -ExtrafieldParamHelpradio=Parameters list have to be like key,value

    for exemple :
    1,value1
    2,value2
    3,value3
    ... +ExtrafieldParamHelpselect=Parameters list have to be like key,value

    for example :
    1,value1
    2,value2
    3,value3
    ...

    In order to have the list depending on another :
    1,value1|parent_list_code:parent_key
    2,value2|parent_list_code:parent_key +ExtrafieldParamHelpcheckbox=Parameters list have to be like key,value

    for example :
    1,value1
    2,value2
    3,value3
    ... +ExtrafieldParamHelpradio=Parameters list have to be like key,value

    for example :
    1,value1
    2,value2
    3,value3
    ... ExtrafieldParamHelpsellist=Parameters list comes from a table
    Syntax : table_name:label_field:id_field::filter
    Example : c_typent:libelle:id::filter

    filter can be a simple test (eg active=1) to display only active value
    if you want to filter on extrafields use syntaxt extra.fieldcode=... (where field code is the code of extrafield)

    In order to have the list depending on another :
    c_typent:libelle:id:parent_list_code|parent_column:filter LibraryToBuildPDF=Library used to build PDF WarningUsingFPDF=Warning: Your conf.php contains directive dolibarr_pdf_force_fpdf=1. This means you use the FPDF library to generate PDF files. This library is old and does not support a lot of features (Unicode, image transparency, cyrillic, arab and asiatic languages, ...), so you may experience errors during PDF generation.
    To solve this and have a full support of PDF generation, please download TCPDF library, then comment or remove the line $dolibarr_pdf_force_fpdf=1, and add instead $dolibarr_lib_TCPDF_PATH='path_to_TCPDF_dir' @@ -472,7 +474,7 @@ Module410Desc=Webcalendar sameining Module500Name=Special expenses (tax, social contributions, dividends) Module500Desc=Management of special expenses like taxes, social contribution, dividends and salaries Module510Name=Salaries -Module510Desc=Management of empoyees salaries and payments +Module510Desc=Management of employees salaries and payments Module600Name=Tilkynningar Module600Desc=tengiliðir Senda tilkynningar í tölvupósti um sum Dolibarr viðskipti viðburðir til þriðja aðila Module700Name=Fjárframlög @@ -495,15 +497,15 @@ Module2400Name=Dagskrá Module2400Desc=Aðgerðir / verkefni og dagskrá stjórnun Module2500Name=Rafræn Innihald Stjórnun Module2500Desc=Vista og samnýta skjöl -Module2600Name= WebServices -Module2600Desc= Virkja Dolibarr vefþjónusta miðlara -Module2700Name= Gravatar -Module2700Desc= Nota online Gravatar þjónusta (www.gravatar.com) til að sýna mynd af notendum og meðlimum (stofna með tölvupósti þeirra). Vantar internet +Module2600Name=WebServices +Module2600Desc=Virkja Dolibarr vefþjónusta miðlara +Module2700Name=Gravatar +Module2700Desc=Nota online Gravatar þjónusta (www.gravatar.com) til að sýna mynd af notendum og meðlimum (stofna með tölvupósti þeirra). Vantar internet Module2800Desc=FTP Client -Module2900Name= GeoIPMaxmind -Module2900Desc= GeoIP Maxmind viðskipti viðbúnað -Module3100Name= Skype -Module3100Desc= Add a Skype button into card of adherents / third parties / contacts +Module2900Name=GeoIPMaxmind +Module2900Desc=GeoIP Maxmind viðskipti viðbúnað +Module3100Name=Skype +Module3100Desc=Add a Skype button into card of adherents / third parties / contacts Module5000Name=Multi-fyrirtæki Module5000Desc=Leyfir þér að stjórna mörgum fyrirtækjum Module6000Name=Workflow @@ -681,6 +683,10 @@ Permission401=Lesa afsláttur Permission402=Búa til / breyta afsláttur Permission403=Staðfesta afsláttur Permission404=Eyða afsláttur +Permission510=Read Salaries +Permission512=Create/modify salaries +Permission514=Delete salaries +Permission517=Export salaries Permission531=Lesa þjónusta Permission532=Búa til / breyta þjónusta Permission534=Eyða þjónustu @@ -999,7 +1005,7 @@ ExtraFieldsSupplierOrders=Complementary attributes (orders) ExtraFieldsSupplierInvoices=Complementary attributes (invoices) ExtraFieldsProject=Complementary attributes (projects) ExtraFieldsProjectTask=Complementary attributes (tasks) -ExtraFieldHasWrongValue=Rekja má %s hefur rangt gildi. +ExtraFieldHasWrongValue=Attribute %s has a wrong value. AlphaNumOnlyCharsAndNoSpace=only alphanumericals characters without space AlphaNumOnlyLowerCharsAndNoSpace=only alphanumericals and lower case characters without space SendingMailSetup=Uppsetning sendings með tölvupósti @@ -1018,13 +1024,13 @@ SuhosinSessionEncrypt=Session storage encrypted by Suhosin ConditionIsCurrently=Condition is currently %s TestNotPossibleWithCurrentBrowsers=Automatic detection not possible YouUseBestDriver=You use driver %s that is best driver available currently. -YouDoNotUseBestDriver=You use drive %s but driver %s is recommanded. +YouDoNotUseBestDriver=You use drive %s but driver %s is recommended. NbOfProductIsLowerThanNoPb=You have only %s products/services into database. This does not required any particular optimization. SearchOptim=Search optimization YouHaveXProductUseSearchOptim=You have %s product into database. You should add the constant PRODUCT_DONOTSEARCH_ANYWHERE to 1 into Home-Setup-Other, you limit the search to the beginning of strings making possible for database to use index and you should get an immediate response. BrowserIsOK=You are using the web browser %s. This browser is ok for security and performance. BrowserIsKO=You are using the web browser %s. This browser is known to be a bad choice for security, performance and reliability. We recommand you to use Firefox, Chrome, Opera or Safari. -XDebugInstalled=XDebug est chargé. +XDebugInstalled=XDebug is loaded. XCacheInstalled=XCache is loaded. AddRefInList=Display customer/supplier ref into list (select list or combobox) and most of hyperlink FieldEdition=Edition of field %s @@ -1073,7 +1079,7 @@ WebCalServer=Server hýsingu dagatal gagnasafn WebCalDatabaseName=Gagnasafn nafn WebCalUser=Notandi aðgang gagnasafn WebCalSetupSaved=Webcalendar skipulag vistuð án vandkvæða. -WebCalTestOk=árangursrík Tenging við miðlara ' %s ' á gagnagrunni ' %s ' sem notanda ' %s '. +WebCalTestOk=Connection to server '%s' on database '%s' with user '%s' successful. WebCalTestKo1=Tenging við miðlara ' %s ' ná árangri en% gagnagrunni 's' ekki næst. WebCalTestKo2=Tenging við miðlara ' %s ' sem notanda ' %s ' mistókst. WebCalErrorConnectOkButWrongDatabase=Tengsl tekist en gagnasafn lítur ekki vera Webcalendar gagnagrunninum. @@ -1119,7 +1125,7 @@ WatermarkOnDraftProposal=Watermark on draft commercial proposals (none if empty) OrdersSetup=Stjórn Order's skipulag OrdersNumberingModules=Pantanir tala mát OrdersModelModule=Panta skjöl módel -HideTreadedOrders=Fela meðferð eða niður pantanir í lista +HideTreadedOrders=Hide the treated or cancelled orders in the list ValidOrderAfterPropalClosed=Til að sannreyna röð eftir tillögu nær, gerir það mögulegt að stíga við til bráðabirgða til FreeLegalTextOnOrders=Frjáls texti á pantanir WatermarkOnDraftOrders=Watermark on draft orders (none if empty) @@ -1214,9 +1220,9 @@ LDAPSynchroKO=Tókst samstillingu próf LDAPSynchroKOMayBePermissions=Tókst samstillingu próf. Athugaðu að connexion á miðlara sé rétt uppsettur og leyfa LDAP udpates LDAPTCPConnectOK=TCP tengingu við LDAP miðlara árangri (Server = %s , Port = %s ) LDAPTCPConnectKO=TCP tengingu við LDAP miðlara mistókst (Server = %s , Port = %s ) -LDAPBindOK=Tengja / Authentificate að LDAP miðlara árangri (Server = %s , Port = %s , Admin = %s , Lykilorð = %s ) +LDAPBindOK=Connect/Authentificate to LDAP server successful (Server=%s, Port=%s, Admin=%s, Password=%s) LDAPBindKO=Tengja / Authentificate að LDAP miðlara mistókst (Server = %s , Port = %s , Admin = %s , Lykilorð = %s ) -LDAPUnbindSuccessfull=Aftengjast vel +LDAPUnbindSuccessfull=Disconnect successful LDAPUnbindFailed=Aftengjast mistókst LDAPConnectToDNSuccessfull=Tengsl au DN ( %s ) ri ¿½ ussie LDAPConnectToDNFailed=Tengsl au DN ( %s ) ï ¿½ chouï ¿½ E @@ -1273,7 +1279,7 @@ LDAPFieldSidExample=Dæmi: objectsid LDAPFieldEndLastSubscription=Dagsetning áskrift enda LDAPFieldTitle=Post / virka LDAPFieldTitleExample=Example: title -LDAPParametersAreStillHardCoded=LDAP parametres eru enn innbundin bók (í snertingu bekknum) +LDAPParametersAreStillHardCoded=LDAP parameters are still hardcoded (in contact class) LDAPSetupNotComplete=LDAP skipulag heill ekki (fara á aðra tabs) LDAPNoUserOrPasswordProvidedAccessIsReadOnly=Nei stjórnandi eða aðgangsorðið sem þú fékkst. LDAP aðgang mun vera nafnlaus og lesa aðeins ham. LDAPDescContact=Þessi síða leyfir þér að skilgreina LDAP eiginleiki nafn í LDAP tré fyrir hvern gögn fundust á Dolibarr tengiliði. @@ -1429,7 +1435,7 @@ OptionVATDefault=Standard OptionVATDebitOption=Valkostur þjónustu á beingreiðslur OptionVatDefaultDesc=VSK er vegna:
    - Á afhendingu / greiðslum fyrir vörur
    - Um greiðslur fyrir þjónustu OptionVatDebitOptionDesc=VSK er vegna:
    - Á afhendingu / greiðslum fyrir vörur
    - Á nótum (skuldfærslu) fyrir þjónustu -SummaryOfVatExigibilityUsedByDefault=Tími VSK exigibility sjálfgefið samkvæmt choosed valkostur: +SummaryOfVatExigibilityUsedByDefault=Time of VAT exigibility by default according to chosen option: OnDelivery=Á afhendingu OnPayment=Um greiðslu OnInvoice=Á reikning @@ -1446,7 +1452,7 @@ AccountancyCodeBuy=Purchase account. code AgendaSetup=Aðgerðir og dagskrá mát skipulag PasswordTogetVCalExport=Lykill að heimila útflutning hlekkur PastDelayVCalExport=Ekki flytja atburður eldri en -AGENDA_USE_EVENT_TYPE=Use events types (managed into menu Setup -> Dictionnary -> Type of agenda events) +AGENDA_USE_EVENT_TYPE=Use events types (managed into menu Setup -> Dictionary -> Type of agenda events) ##### ClickToDial ##### ClickToDialDesc=Þessi eining leyfir þér að bæta við tákn eftir símanúmeri Dolibarr tengiliði. A smella á þetta tákn mun hringja í serveur með ákveðinni vefslóð sem þú tilgreinir hér að neðan. Þetta má nota til að hringja í miðju símtali kerfi frá Dolibarr að geta hringt í símanúmer á SIP kerfi til dæmis. ##### Point Of Sales (CashDesk) ##### diff --git a/htdocs/langs/is_IS/contracts.lang b/htdocs/langs/is_IS/contracts.lang index 60b7463451b..ea2f0fb2108 100644 --- a/htdocs/langs/is_IS/contracts.lang +++ b/htdocs/langs/is_IS/contracts.lang @@ -38,7 +38,7 @@ ConfirmCloseService=Ertu viss um að þú viljir loka þessum þjónustu með ValidateAContract=Staðfesta samning ActivateService=Virkja þjónusta ConfirmActivateService=Ertu viss um að þú viljir virkja þessa þjónustu með% dagsetning s? -# RefContract=Contract reference +RefContract=Contract reference DateContract=Samningur dagsetningu DateServiceActivate=Þjónusta Virkjunardagsetning DateServiceUnactivate=Þjónusta deactivation dagsetningu @@ -85,10 +85,12 @@ PaymentRenewContractId=Endurnýja samning línu (númer %s ) ExpiredSince=Gildistími RelatedContracts=Svipaðir samningar NoExpiredServices=Engar útrunnin virk þjónusta -# ListOfServicesToExpireWithDuration=List of Services to expire in %s days -# ListOfServicesToExpireWithDurationNeg=List of Services expired from more than %s days -# ListOfServicesToExpire=List of Services to expire -# NoteListOfYourExpiredServices=This list contains only services of contracts for third parties you are linked to as a sale representative. +ListOfServicesToExpireWithDuration=List of Services to expire in %s days +ListOfServicesToExpireWithDurationNeg=List of Services expired from more than %s days +ListOfServicesToExpire=List of Services to expire +NoteListOfYourExpiredServices=This list contains only services of contracts for third parties you are linked to as a sale representative. +StandardContractsTemplate=Standard contracts template +ContactNameAndSignature=For %s, name and signature: ##### Types de contacts ##### TypeContact_contrat_internal_SALESREPSIGN=Sölufulltrúi undirrita samning diff --git a/htdocs/langs/is_IS/exports.lang b/htdocs/langs/is_IS/exports.lang index 82185e00687..bfa012411ee 100644 --- a/htdocs/langs/is_IS/exports.lang +++ b/htdocs/langs/is_IS/exports.lang @@ -8,7 +8,7 @@ ImportableDatas=Importable dataset SelectExportDataSet=Veldu dataset þú vilt flytja út ... SelectImportDataSet=Veldu dataset þú vilt flytja inn ... SelectExportFields=Veldu svæði sem þú vilt flytja út, eða velja fyrirfram útflutningur profil -SelectImportFields=Veldu frumskrár reiti sem þú vilt flytja inn og miða sínu sviði í gagnagrunninum með því að færa þá upp og niður með akkeri %s eða velja fyrirfram innflutningur profil: +SelectImportFields=Choose source file fields you want to import and their target field in database by moving them up and down with anchor %s, or select a predefined import profile: NotImportedFields=Svið frumskrár ekki innflytjandi SaveExportModel=Vista þessa útflutnings upplýsingar ef þú ætlar að endurnýta það síðar ... SaveImportModel=Vista þessa innflutnings upplýsingar ef þú ætlar að endurnýta það síðar ... @@ -64,7 +64,7 @@ ChooseFormatOfFileToImport=Veldu skráarsnið til að nota sem flytja inn skrá ChooseFileToImport=Hlaða inn skrá smelltu síðan á picto %s til að velja skrá sem innflutningur frumskrár ... SourceFileFormat=Heimild skráarsnið FieldsInSourceFile=Reitir í frumskrár -# FieldsInTargetDatabase=Target fields in Dolibarr database (bold=mandatory) +FieldsInTargetDatabase=Target fields in Dolibarr database (bold=mandatory) Field=Field NoFields=Engin svæði MoveField=Færa sviði dálki númer %s @@ -81,7 +81,7 @@ DoNotImportFirstLine=Ekki flytja fyrstu línu frumskrár NbOfSourceLines=Fjöldi lína í frumskrár NowClickToTestTheImport=Athugaðu að flytja viðföng sem þú hefur skilgreint. Ef þau eru rétt, smelltu á hnappinn " %s " til að ráðast í eftirlíkingu af ferli innflutningur (engin gögn verði breytt í gagnasafninu, það er bara uppgerð fyrir stundu) ... RunSimulateImportFile=Hefja innflutning uppgerð -FieldNeedSource=Þetta finnst í gagnagrunni þarf að senda gögn frá frumskrár +FieldNeedSource=This field requires data from the source file SomeMandatoryFieldHaveNoSource=Sumir nauðsynlega reiti hafa ekki fengið frá gögnum skrá InformationOnSourceFile=Upplýsingar um frumskrár InformationOnTargetTables=Upplýsingar um miða á sviði @@ -102,33 +102,33 @@ NbOfLinesImported=Fjöldi lína flutt með góðum árangri: %s . DataComeFromNoWhere=Gildi til að setja inn koma frá hvergi í skrá uppspretta. DataComeFromFileFieldNb=Gildi til að setja inn kemur af akri númer %s í skrá uppspretta. DataComeFromIdFoundFromRef=Gildi sem koma frá svæði númer %s af skrá fengið verða notaðar til að finna kt foreldris andmæla notkun (Svo objet %s sem hefur dómari. Frá frumskrár verða til staðar í Dolibarr). -# DataComeFromIdFoundFromCodeId=Code that comes from field number %s of source file will be used to find id of parent object to use (So the code from source file must exists into dictionary %s). Note that if you know id, you can also use it into source file instead of code. Import should work in both cases. +DataComeFromIdFoundFromCodeId=Code that comes from field number %s of source file will be used to find id of parent object to use (So the code from source file must exists into dictionary %s). Note that if you know id, you can also use it into source file instead of code. Import should work in both cases. DataIsInsertedInto=Gögn sem koma frá skrá fengið mun vera sett inn í eftirfarandi svæði: DataIDSourceIsInsertedInto=The kt foreldris mótmæla fannst með gögnin í skrá uppspretta, verður sett inn í eftirfarandi svæði: DataCodeIDSourceIsInsertedInto=Einkennisnúmer línu foreldri finnst af kóða, verður sett inn eftirfarandi sviði: SourceRequired=Gögn gildi er nauðsynlegur SourceExample=Dæmi um hugsanlegar gildi gögn ExampleAnyRefFoundIntoElement=Allar tilv fann fyrir %s þátturinn -# ExampleAnyCodeOrIdFoundIntoDictionary=Any code (or id) found into dictionary %s +ExampleAnyCodeOrIdFoundIntoDictionary=Any code (or id) found into dictionary %s CSVFormatDesc=Comma Seperated Gildi skráarsnið (. Csv).
    Þetta er textaskrá snið þar sem reitir eru aðskilin með skiltákn [%s]. Ef skiltákn finnst inni í reitinn innihald er á sviði rúnnuð með umferð karakter [%s]. Flýja staf til að flýja umferð eðli er [%s]. -# Excel95FormatDesc=Excel file format (.xls)
    This is native Excel 95 format (BIFF5). -# Excel2007FormatDesc=Excel file format (.xlsx)
    This is native Excel 2007 format (SpreadsheetML). -# TsvFormatDesc=Tab Separated Value file format (.tsv)
    This is a text file format where fields are separated by a tabulator [tab]. -# ExportFieldAutomaticallyAdded=Field %s was automatically added. It will avoid you to have similar lines to be treated as duplicate records (with this field added, all lines will own their own id and will differ). -# CsvOptions=Csv Options -# Separator=Separator -# Enclosure=Enclosure -# SuppliersProducts=Suppliers Products +Excel95FormatDesc=Excel file format (.xls)
    This is native Excel 95 format (BIFF5). +Excel2007FormatDesc=Excel file format (.xlsx)
    This is native Excel 2007 format (SpreadsheetML). +TsvFormatDesc=Tab Separated Value file format (.tsv)
    This is a text file format where fields are separated by a tabulator [tab]. +ExportFieldAutomaticallyAdded=Field %s was automatically added. It will avoid you to have similar lines to be treated as duplicate records (with this field added, all lines will own their own id and will differ). +CsvOptions=Csv Options +Separator=Separator +Enclosure=Enclosure +SuppliersProducts=Suppliers Products BankCode=Bankakóði DeskCode=Skrifborð kóða BankAccountNumber=Reikningsnúmer BankAccountNumberKey=Lykill -# SpecialCode=Special code -# ExportStringFilter=%% allows replacing one or more characters in the text -# ExportDateFilter='YYYY' 'YYYYMM' 'YYYYMMDD': filters by one year/month/day
    'YYYY+YYYY' 'YYYYMM+YYYYMM' 'YYYYMMDD+YYYYMMDD': filters over a range of years/months/days
    '>YYYY' '>YYYYMM' '>YYYYMMDD': filters on the following years/months/days
    '<YYYY' '<YYYYMM' '<YYYYMMDD': filters on the previous years/months/days -# ExportNumericFilter='NNNNN' filters by one value
    'NNNNN+NNNNN' filters over a range of values
    '>NNNNN' filters by lower values
    '>NNNNN' filters by higher values +SpecialCode=Special code +ExportStringFilter=%% allows replacing one or more characters in the text +ExportDateFilter='YYYY' 'YYYYMM' 'YYYYMMDD': filters by one year/month/day
    'YYYY+YYYY' 'YYYYMM+YYYYMM' 'YYYYMMDD+YYYYMMDD': filters over a range of years/months/days
    '>YYYY' '>YYYYMM' '>YYYYMMDD': filters on the following years/months/days
    '<YYYY' '<YYYYMM' '<YYYYMMDD': filters on the previous years/months/days +ExportNumericFilter='NNNNN' filters by one value
    'NNNNN+NNNNN' filters over a range of values
    '>NNNNN' filters by lower values
    '>NNNNN' filters by higher values ## filters -# SelectFilterFields=If you want to filter on some values, just input values here. -# FilterableFields=Champs Filtrables -# FilteredFields=Filtered fields -# FilteredFieldsValues=Value for filter +SelectFilterFields=If you want to filter on some values, just input values here. +FilterableFields=Champs Filtrables +FilteredFields=Filtered fields +FilteredFieldsValues=Value for filter diff --git a/htdocs/langs/is_IS/holiday.lang b/htdocs/langs/is_IS/holiday.lang index e78ece3754c..5b48021e0c2 100644 --- a/htdocs/langs/is_IS/holiday.lang +++ b/htdocs/langs/is_IS/holiday.lang @@ -8,7 +8,6 @@ NotActiveModCP=You must enable the module holidays to view this page. NotConfigModCP=You must configure the module holidays to view this page. To do this, click here . NoCPforUser=You don't have a demand for holidays. AddCP=Apply for holidays -CPErrorSQL=An SQL error occurred: Employe=Employee DateDebCP=Upphafsdagur DateFinCP=Lokadagur diff --git a/htdocs/langs/is_IS/languages.lang b/htdocs/langs/is_IS/languages.lang index bdad4c1e00a..0ad994f362e 100644 --- a/htdocs/langs/is_IS/languages.lang +++ b/htdocs/langs/is_IS/languages.lang @@ -19,6 +19,7 @@ Language_en_SA=English (Saudi Arabia) Language_en_US=Enska (United States) Language_en_ZA=English (Suður Afríka) Language_es_ES=Spænska +Language_es_DO=Spanish (Dominican Republic) Language_es_AR=Spænska (Austria) Language_es_CL=Spanish (Chile) Language_es_HN=Spænska (Hondúras) @@ -38,6 +39,7 @@ Language_fr_NC=Franska (New Caledonia) Language_he_IL=Hebreska Language_hr_HR=Króatíska Language_hu_HU=Ungverska +Language_id_ID=Indonesian Language_is_IS=Íslenska Language_it_IT=Italien Language_ja_JP=Japanska diff --git a/htdocs/langs/is_IS/mails.lang b/htdocs/langs/is_IS/mails.lang index c3b1d3a4aae..bb9e2f48bea 100644 --- a/htdocs/langs/is_IS/mails.lang +++ b/htdocs/langs/is_IS/mails.lang @@ -79,6 +79,7 @@ MailtoEMail=Hyper link to email ActivateCheckRead=Allow to use the "Unsubcribe" link ActivateCheckReadKey=Key use to encrypt URL use for "Read Receipt" and "Unsubcribe" feature EMailSentToNRecipients=EMail sent to %s recipients. +XTargetsAdded=%s recipients added into target list EachInvoiceWillBeAttachedToEmail=A document using default invoice document template will be created and attached to each email. MailTopicSendRemindUnpaidInvoices=Reminder of invoice %s (%s) SendRemind=Send reminder by EMails diff --git a/htdocs/langs/is_IS/main.lang b/htdocs/langs/is_IS/main.lang index 9d52043b9f7..9ee1b6175f1 100644 --- a/htdocs/langs/is_IS/main.lang +++ b/htdocs/langs/is_IS/main.lang @@ -551,6 +551,7 @@ MailSentBy=Email sent TextUsedInTheMessageBody=Email líkami SendAcknowledgementByMail=Senda Ack. með tölvupósti NoEMail=No email +NoMobilePhone=No mobile phone Owner=Eigandi DetectedVersion=Uppgötva útgáfa FollowingConstantsWillBeSubstituted=Eftir Fastar verður staðgengill með samsvarandi gildi. diff --git a/htdocs/langs/is_IS/products.lang b/htdocs/langs/is_IS/products.lang index 31d14c5f570..e726c1a7636 100644 --- a/htdocs/langs/is_IS/products.lang +++ b/htdocs/langs/is_IS/products.lang @@ -28,8 +28,10 @@ ProductsAndServicesStatistics=Vörur og þjónusta tölfræði ProductsStatistics=Vörur tölfræði ProductsOnSell=Laus vörur ProductsNotOnSell=Úrelt vörur +ProductsOnSellAndOnBuy=Products not for sale nor purchase ServicesOnSell=Laus þjónusta ServicesNotOnSell=Úrelt þjónusta +ServicesOnSellAndOnBuy=Services not for sale nor purchase InternalRef=Innri tilvísun LastRecorded=Síðasta vörur / þjónustu á selja á skrá LastRecordedProductsAndServices=Last %s skrá vörur / þjónustu @@ -70,6 +72,8 @@ PublicPrice=Almenn verð CurrentPrice=Núverandi verð NewPrice=Ný verð MinPrice=Minim. Söluverð +MinPriceHT=Minim. selling price (net of tax) +MinPriceTTC=Minim. selling price (inc. tax) CantBeLessThanMinPrice=Söluverð er ekki vera lægra en lágmarks leyfð fyrir þessa vöru ( %s án skatta) ContractStatus=Samningur stöðu ContractStatusClosed=Loka @@ -179,6 +183,7 @@ ProductIsUsed=Þessi vara er notuð NewRefForClone=Tilv. nýrra vara / þjónusta CustomerPrices=Viðskiptavinir verð SuppliersPrices=Birgjar verð +SuppliersPricesOfProductsOrServices=Suppliers prices (of products or services) CustomCode=Tollareglna CountryOrigin=Uppruni land HiddenIntoCombo=Falinn í að velja lista @@ -208,6 +213,7 @@ CostPmpHT=Net total VWAP ProductUsedForBuild=Auto consumed by production ProductBuilded=Production completed ProductsMultiPrice=Product multi-price +ProductsOrServiceMultiPrice=Customers prices (of products or services, multi-prices) ProductSellByQuarterHT=Products turnover quarterly VWAP ServiceSellByQuarterHT=Services turnover quarterly VWAP Quarter1=1st. Quarter diff --git a/htdocs/langs/is_IS/shop.lang b/htdocs/langs/is_IS/shop.lang index 64c5dcba7f4..1647180583a 100644 --- a/htdocs/langs/is_IS/shop.lang +++ b/htdocs/langs/is_IS/shop.lang @@ -1,4 +1,5 @@ # Dolibarr language file - Source file is en_US - shop +FailedConnectDBCheckModuleSetup=Failed to connect to oscommerce database. Check your module setup Shop=Shop ShopWeb=Vefverslun LastOrders=Síðasta pantanir diff --git a/htdocs/langs/is_IS/stocks.lang b/htdocs/langs/is_IS/stocks.lang index dac542ca64b..f1983252e09 100644 --- a/htdocs/langs/is_IS/stocks.lang +++ b/htdocs/langs/is_IS/stocks.lang @@ -112,6 +112,7 @@ ReplenishmentOrdersDesc=This is list of all opened supplier orders Replenishments=Replenishments NbOfProductBeforePeriod=Quantity of product %s in stock before selected period (< %s) NbOfProductAfterPeriod=Quantity of product %s in stock after selected period (> %s) +MassMovement=Mass movement MassStockMovement=Mass stock movement SelectProductInAndOutWareHouse=Select a product, a quantity, a source warehouse and a target warehouse, then click "%s". Once this is done for all required movements, click onto "%s". RecordMovement=Record transfert diff --git a/htdocs/langs/it_IT/admin.lang b/htdocs/langs/it_IT/admin.lang index c3f8aea459b..313d6361ce1 100644 --- a/htdocs/langs/it_IT/admin.lang +++ b/htdocs/langs/it_IT/admin.lang @@ -116,7 +116,7 @@ LanguageBrowserParameter=Parametro %s LocalisationDolibarrParameters=Parametri di localizzazione ClientTZ=Fuso orario client (utente) ClientHour=Orario client (utente) -OSTZ=Fuso orario server OS +OSTZ=Server OS Time Zone PHPTZ=Fuso orario server PHP PHPServerOffsetWithGreenwich=Scostamento rispetto a Greenwich del server PHP (secondi) ClientOffsetWithGreenwich=Scostamento del Client/Browser da Greenwich (secondi) @@ -233,7 +233,9 @@ OfficialWebSiteFr=Sito ufficiale francese OfficialWiki=Dolibarr Wiki OfficialDemo=Dolibarr demo online OfficialMarketPlace=Market ufficiale per moduli esterni e addon -OfficialWebHostingService=Servizio di hosting ufficiale (Cloud hosting) +OfficialWebHostingService=Referenced web hosting services (Cloud hosting) +ReferencedPreferredPartners=Preferred Partners +OtherResources=Autres ressources ForDocumentationSeeWiki=La documentazione per utenti e sviluppatori e le FAQ sono disponibili sul wiki di Dolibarr:
    Dai un'occhiata a
    %s ForAnswersSeeForum=Per qualsiasi altro problema/domanda, si può utilizzare il forum di Dolibarr:
    %s HelpCenterDesc1=In quest'area puoi cercare un servizio di supporto su Dolibarr. @@ -369,9 +371,9 @@ ExtrafieldSelectList = Select from table ExtrafieldSeparator=Separatore ExtrafieldCheckBox=Checkbox ExtrafieldRadio=Radio button -ExtrafieldParamHelpselect=Parameters list have to be like key,value

    for exemple :
    1,value1
    2,value2
    3,value3
    ...

    In order to have the list depending on another :
    1,value1|parent_list_code:parent_key
    2,value2|parent_list_code:parent_key -ExtrafieldParamHelpcheckbox=La lista dei parametri deve contenere chiave univoca e valore.

    Per esempio:
    1, valore1
    2, valore2
    3, valore3
    ... -ExtrafieldParamHelpradio=Parameters list have to be like key,value

    for exemple :
    1,value1
    2,value2
    3,value3
    ... +ExtrafieldParamHelpselect=Parameters list have to be like key,value

    for example :
    1,value1
    2,value2
    3,value3
    ...

    In order to have the list depending on another :
    1,value1|parent_list_code:parent_key
    2,value2|parent_list_code:parent_key +ExtrafieldParamHelpcheckbox=Parameters list have to be like key,value

    for example :
    1,value1
    2,value2
    3,value3
    ... +ExtrafieldParamHelpradio=Parameters list have to be like key,value

    for example :
    1,value1
    2,value2
    3,value3
    ... ExtrafieldParamHelpsellist=Parameters list comes from a table
    Syntax : table_name:label_field:id_field::filter
    Example : c_typent:libelle:id::filter

    filter can be a simple test (eg active=1) to display only active value
    if you want to filter on extrafields use syntaxt extra.fieldcode=... (where field code is the code of extrafield)

    In order to have the list depending on another :
    c_typent:libelle:id:parent_list_code|parent_column:filter LibraryToBuildPDF=Libreria utilizzata per generare PDF WarningUsingFPDF=Warning: Your conf.php contains directive dolibarr_pdf_force_fpdf=1. This means you use the FPDF library to generate PDF files. This library is old and does not support a lot of features (Unicode, image transparency, cyrillic, arab and asiatic languages, ...), so you may experience errors during PDF generation.
    To solve this and have a full support of PDF generation, please download TCPDF library, then comment or remove the line $dolibarr_pdf_force_fpdf=1, and add instead $dolibarr_lib_TCPDF_PATH='path_to_TCPDF_dir' @@ -472,7 +474,7 @@ Module410Desc=Integrazione calendario web Module500Name=Special expenses (tax, social contributions, dividends) Module500Desc=Management of special expenses like taxes, social contribution, dividends and salaries Module510Name=Salaries -Module510Desc=Management of empoyees salaries and payments +Module510Desc=Management of employees salaries and payments Module600Name=Notifiche Module600Desc=Inviare notifiche (via email), per eventi aziendali Dolibarr Module700Name=Donazioni @@ -495,15 +497,15 @@ Module2400Name=Ordine del giorno Module2400Desc=Gestione eventi/compiti e ordine del giorno Module2500Name=Gestione dei contenuti digitali Module2500Desc=Salvare e condividere documenti -Module2600Name= WebServices -Module2600Desc= Attivare i webservices di Dolibarr -Module2700Name= Gravatar -Module2700Desc= Usa il servizio online Gravatar (www.gravatar.com) per mostrare le foto degli utenti/membri. Necessita dell'accesso a Internet +Module2600Name=WebServices +Module2600Desc=Attivare i webservices di Dolibarr +Module2700Name=Gravatar +Module2700Desc=Usa il servizio online Gravatar (www.gravatar.com) per mostrare le foto degli utenti/membri. Necessita dell'accesso a Internet Module2800Desc=Client FTP -Module2900Name= GeoIPMaxmind -Module2900Desc= Localizzazione degli accessi tramite GeoIP Maxmind -Module3100Name= Skype -Module3100Desc= Add a Skype button into card of adherents / third parties / contacts +Module2900Name=GeoIPMaxmind +Module2900Desc=Localizzazione degli accessi tramite GeoIP Maxmind +Module3100Name=Skype +Module3100Desc=Add a Skype button into card of adherents / third parties / contacts Module5000Name=Multiazienda Module5000Desc=Permette la gestione di diverse aziende Module6000Name=Workflow @@ -681,6 +683,10 @@ Permission401=Vedere sconti Permission402=Creare/modificare sconti Permission403=Convalidare sconti Permission404=Eliminare sconti +Permission510=Read Salaries +Permission512=Create/modify salaries +Permission514=Delete salaries +Permission517=Export salaries Permission531=Vedere servizi Permission532=Creare/modificare servizi Permission534=Eliminare servizi @@ -999,7 +1005,7 @@ ExtraFieldsSupplierOrders=Complementary attributes (orders) ExtraFieldsSupplierInvoices=Complementary attributes (invoices) ExtraFieldsProject=Complementary attributes (projects) ExtraFieldsProjectTask=Complementary attributes (tasks) -ExtraFieldHasWrongValue=Il campo %s contiene un valore errato. +ExtraFieldHasWrongValue=Attribute %s has a wrong value. AlphaNumOnlyCharsAndNoSpace=Solo lettere e numeri, senza spazi AlphaNumOnlyLowerCharsAndNoSpace=only alphanumericals and lower case characters without space SendingMailSetup=Impostazioni per l'invio di email @@ -1018,13 +1024,13 @@ SuhosinSessionEncrypt=Session storage encrypted by Suhosin ConditionIsCurrently=Condition is currently %s TestNotPossibleWithCurrentBrowsers=Rilevamento automatico non è possibile YouUseBestDriver=You use driver %s that is best driver available currently. -YouDoNotUseBestDriver=You use drive %s but driver %s is recommanded. +YouDoNotUseBestDriver=You use drive %s but driver %s is recommended. NbOfProductIsLowerThanNoPb=You have only %s products/services into database. This does not required any particular optimization. SearchOptim=Search optimization YouHaveXProductUseSearchOptim=You have %s product into database. You should add the constant PRODUCT_DONOTSEARCH_ANYWHERE to 1 into Home-Setup-Other, you limit the search to the beginning of strings making possible for database to use index and you should get an immediate response. BrowserIsOK=You are using the web browser %s. This browser is ok for security and performance. BrowserIsKO=You are using the web browser %s. This browser is known to be a bad choice for security, performance and reliability. We recommand you to use Firefox, Chrome, Opera or Safari. -XDebugInstalled=XDebug est chargé. +XDebugInstalled=XDebug is loaded. XCacheInstalled=XCache is loaded. AddRefInList=Display customer/supplier ref into list (select list or combobox) and most of hyperlink FieldEdition=Edition of field %s @@ -1073,7 +1079,7 @@ WebCalServer=Server di hosting calendario WebCalDatabaseName=Nome del database WebCalUser=Utente per l'accesso al database WebCalSetupSaved=Configurazione del calendario salvata con successo. -WebCalTestOk=Connessione al server ' %s' sul database' %s' con l'utente ' %s' effettuata con successo. +WebCalTestOk=Connection to server '%s' on database '%s' with user '%s' successful. WebCalTestKo1=Connessione al server ' %s' effettuata con successo, ma il database' %s' non è raggiungibile. WebCalTestKo2=Connessione al server ' %s' con l'utente' %s' fallita. WebCalErrorConnectOkButWrongDatabase=Connessione dati effettuata, ma il database è errato. @@ -1119,7 +1125,7 @@ WatermarkOnDraftProposal=Watermark on draft commercial proposals (none if empty) OrdersSetup=Configurazione della gestione ordini OrdersNumberingModules=Modelli di numerazione degli ordini OrdersModelModule=Modelli per ordini in pdf -HideTreadedOrders=Nascondi ordini trattati o annullati +HideTreadedOrders=Hide the treated or cancelled orders in the list ValidOrderAfterPropalClosed=Rendi possibile non passare per l'ordine provvisorio per la convalida dopo la chiusura della proposta commerciale FreeLegalTextOnOrders=Testo libero sugli ordini WatermarkOnDraftOrders=Watermark on draft orders (none if empty) @@ -1214,9 +1220,9 @@ LDAPSynchroKO=Test sincronizzazione fallito LDAPSynchroKOMayBePermissions=Sincronizzazione di prova non riuscita. Controllare che la connessione al server sia configurata correttamente e permetta gli aggiornamenti LDAP LDAPTCPConnectOK=Connessione TCP al server LDAP Ok (Server=%s, Port=%s) LDAPTCPConnectKO=Connessione TCP al server LDAP non riuscita (Server=%s, Port=%s) -LDAPBindOK=Connessione/Autenticazione sul server LDAP OK (Server=%s, Port=%s, Admin=%s, Password=%s) +LDAPBindOK=Connect/Authentificate to LDAP server successful (Server=%s, Port=%s, Admin=%s, Password=%s) LDAPBindKO=Connessione/Autenticazione sul server LDAP non riuscita (Server=%s, Port=%s, Admin=%s, Password=%s) -LDAPUnbindSuccessfull=Disconnessione riuscita +LDAPUnbindSuccessfull=Disconnect successful LDAPUnbindFailed=Disconnessione fallita LDAPConnectToDNSuccessfull=Connessione al DN ( %s) riuscita LDAPConnectToDNFailed=Connessione al DN ( %s) fallita @@ -1273,7 +1279,7 @@ LDAPFieldSidExample=Esempio: objectSid LDAPFieldEndLastSubscription=Data di fine abbonamento LDAPFieldTitle=Posizione/funzione LDAPFieldTitleExample=Esempio: titolo -LDAPParametersAreStillHardCoded=I parametri LDAP sono ancora hardcoded (nella classe contact) +LDAPParametersAreStillHardCoded=LDAP parameters are still hardcoded (in contact class) LDAPSetupNotComplete=Configurazione LDAP incompleta (vai alle altre schede) LDAPNoUserOrPasswordProvidedAccessIsReadOnly=Nessun amministratore o password forniti. L'accesso a LDAP sarà eseguito in forma anonima e in sola lettura. LDAPDescContact=Questa pagina consente di definire i nomi degli attributi nella gerarchia LDAP corrispondenti ad ognuno dei dati dei contatti in Dolibarr. @@ -1429,7 +1435,7 @@ OptionVATDefault=Standard OptionVATDebitOption=Opzioni per i servizi a debito OptionVatDefaultDesc=L'IVA è dovuta:
    - sulla consegna/pagamento per i beni
    - sui pagamenti per i servizi OptionVatDebitOptionDesc=L'IVA è dovuta:
    - alla consegna/pagamento per i beni
    - alla fatturazione (a debito) per i servizi -SummaryOfVatExigibilityUsedByDefault=Pagamento IVA secondo l'opzione prescelta: +SummaryOfVatExigibilityUsedByDefault=Time of VAT exigibility by default according to chosen option: OnDelivery=Alla consegna OnPayment=Al pagamento OnInvoice=Alla fatturazione @@ -1446,7 +1452,7 @@ AccountancyCodeBuy=Purchase account. code AgendaSetup=Impostazioni modulo agenda PasswordTogetVCalExport=Chiave per autorizzare l'esportazione di link PastDelayVCalExport=Non esportare evento più vecchio di -AGENDA_USE_EVENT_TYPE=Use events types (managed into menu Setup -> Dictionnary -> Type of agenda events) +AGENDA_USE_EVENT_TYPE=Use events types (managed into menu Setup -> Dictionary -> Type of agenda events) ##### ClickToDial ##### ClickToDialDesc=Questo modulo aggiunge una icona accanto ai numeri telefonici dei contatti in Dolibarr.
    Cliccando sull'icona si attiva il collegamento al server che effettuerà le chiamate telefoniche. ##### Point Of Sales (CashDesk) ##### diff --git a/htdocs/langs/it_IT/contracts.lang b/htdocs/langs/it_IT/contracts.lang index a49be57de72..71fc48cce2c 100644 --- a/htdocs/langs/it_IT/contracts.lang +++ b/htdocs/langs/it_IT/contracts.lang @@ -89,6 +89,8 @@ ListOfServicesToExpireWithDuration=Lista di servizi in scadenza entro %s giorni ListOfServicesToExpireWithDurationNeg=Lista di servizi scaduti da più di %s giorni ListOfServicesToExpire=Lista dei servizi in scadenza NoteListOfYourExpiredServices=Questa lista contiene i servizi relativi a contratti di terze parti per le quali siete collegati come rappresentanti commerciali. +StandardContractsTemplate=Standard contracts template +ContactNameAndSignature=For %s, name and signature: ##### Types de contacts ##### TypeContact_contrat_internal_SALESREPSIGN=Contatto interno per la firma del contratto diff --git a/htdocs/langs/it_IT/exports.lang b/htdocs/langs/it_IT/exports.lang index 7f3b91035c2..aeb24b7e453 100644 --- a/htdocs/langs/it_IT/exports.lang +++ b/htdocs/langs/it_IT/exports.lang @@ -8,7 +8,7 @@ ImportableDatas=Dati importabili SelectExportDataSet=Scegli di dati che si desidera esportare ... SelectImportDataSet=Scegli di dati che si desidera importare ... SelectExportFields=Scegli i campi che si desidera esportare, o selezionare un profilo predefinito di esportazione -SelectImportFields=Scegli i campi che si desidera importare o selezionare un profilo predefinito di importazione +SelectImportFields=Choose source file fields you want to import and their target field in database by moving them up and down with anchor %s, or select a predefined import profile: NotImportedFields=Campi di fonte non file importato SaveExportModel=Salvare il profilo di esportazione, se si ha intenzione di riutilizzare in un secondo momento ... SaveImportModel=Salva il profilo di importazione, se si prevede di riutilizzare in un secondo momento ... @@ -81,7 +81,7 @@ DoNotImportFirstLine=Non importare prima riga del file sorgente NbOfSourceLines=Numero di linee nel file sorgente NowClickToTestTheImport=Verificare i parametri di importazione che avete definito. Se sono corretti, fare clic sul pulsante "%s" per lanciare una simulazione del processo di importazione (i dati non saranno modificate nel database, è solo una simulazione per il momento) ... RunSimulateImportFile=Lanciare la simulazione di importazione -FieldNeedSource=Questo si sente nel database i dati da richiedere un file di origine +FieldNeedSource=This field requires data from the source file SomeMandatoryFieldHaveNoSource=Alcuni campi obbligatori non hanno origine dai dati del file InformationOnSourceFile=Informazioni sui file di origine InformationOnTargetTables=Informazioni sui campi di destinazione diff --git a/htdocs/langs/it_IT/holiday.lang b/htdocs/langs/it_IT/holiday.lang index 795c79f03de..13427049139 100644 --- a/htdocs/langs/it_IT/holiday.lang +++ b/htdocs/langs/it_IT/holiday.lang @@ -8,7 +8,6 @@ NotActiveModCP=Per vedere questa pagina devi attivare il modulo ferie. NotConfigModCP=Per vedere questa pagina devi configurare il modulo ferie. Clicca qui per attivarlo. NoCPforUser=Non hai richieste di ferie. AddCP=Richiedi ferie -CPErrorSQL=Si è verificato un errore SQL: Employe=Dipendente DateDebCP=Data di inizio DateFinCP=Data di fine diff --git a/htdocs/langs/it_IT/languages.lang b/htdocs/langs/it_IT/languages.lang index 8056b17bafb..48a71230080 100644 --- a/htdocs/langs/it_IT/languages.lang +++ b/htdocs/langs/it_IT/languages.lang @@ -19,6 +19,7 @@ Language_en_SA=Inglese (Arabia Saudita) Language_en_US=Inglese (Stati Uniti) Language_en_ZA=Inglese (Sud Africa) Language_es_ES=Spagnolo +Language_es_DO=Spanish (Dominican Republic) Language_es_AR=Spagnolo (Argentina) Language_es_CL=Spanish (Chile) Language_es_HN=Spagnolo (Honduras) @@ -38,6 +39,7 @@ Language_fr_NC=Francese (Nuova Caledonia) Language_he_IL=Ebraico Language_hr_HR=Croato Language_hu_HU=Ungherese +Language_id_ID=Indonesian Language_is_IS=Islandese Language_it_IT=Italiano Language_ja_JP=Giapponese diff --git a/htdocs/langs/it_IT/mails.lang b/htdocs/langs/it_IT/mails.lang index c5966e163eb..50cdc435a9c 100644 --- a/htdocs/langs/it_IT/mails.lang +++ b/htdocs/langs/it_IT/mails.lang @@ -79,6 +79,7 @@ MailtoEMail=Hyper link to email ActivateCheckRead=Permetti l'utilizzo del link "Cancella sottoscrizione" ActivateCheckReadKey=Key use to encrypt URL use for "Read Receipt" and "Unsubcribe" feature EMailSentToNRecipients=EMail sent to %s recipients. +XTargetsAdded=%s recipients added into target list EachInvoiceWillBeAttachedToEmail=A document using default invoice document template will be created and attached to each email. MailTopicSendRemindUnpaidInvoices=Reminder of invoice %s (%s) SendRemind=Send reminder by EMails diff --git a/htdocs/langs/it_IT/main.lang b/htdocs/langs/it_IT/main.lang index 09e949ef4f9..2dfef4188f2 100644 --- a/htdocs/langs/it_IT/main.lang +++ b/htdocs/langs/it_IT/main.lang @@ -551,6 +551,7 @@ MailSentBy=Email inviate da TextUsedInTheMessageBody=Testo dell'email SendAcknowledgementByMail=Invia ricevuta via email NoEMail=Nessuna email +NoMobilePhone=No mobile phone Owner=Proprietario DetectedVersion=Versione riconosciuta FollowingConstantsWillBeSubstituted=Le seguenti costanti saranno sostitute con i valori corrispondenti diff --git a/htdocs/langs/it_IT/products.lang b/htdocs/langs/it_IT/products.lang index 45ceef7f29d..01e6e194907 100644 --- a/htdocs/langs/it_IT/products.lang +++ b/htdocs/langs/it_IT/products.lang @@ -28,8 +28,10 @@ ProductsAndServicesStatistics=Statistiche Prodotti e Servizi ProductsStatistics=Statistiche Prodotti ProductsOnSell=Prodotti in vendita ProductsNotOnSell=Prodotti non in vendita +ProductsOnSellAndOnBuy=Products not for sale nor purchase ServicesOnSell=Servizi in vendita ServicesNotOnSell=Servizi non in vendita +ServicesOnSellAndOnBuy=Services not for sale nor purchase InternalRef=Riferimento interno LastRecorded=Ultimi prodotti/servizi in vendita registrati LastRecordedProductsAndServices=Ultimi %s prodotti/servizi registrati @@ -70,6 +72,8 @@ PublicPrice=Prezzo al pubblico CurrentPrice=Prezzo attuale NewPrice=Nuovo prezzo MinPrice=Prezzo minimo di vendita +MinPriceHT=Minim. selling price (net of tax) +MinPriceTTC=Minim. selling price (inc. tax) CantBeLessThanMinPrice=Il prezzo di vendita non può essere inferiore al minimo consentito per questo prodotto ( %s IVA esclusa) ContractStatus=Stato del Contratto ContractStatusClosed=Chiuso @@ -179,6 +183,7 @@ ProductIsUsed=Questo prodotto è in uso NewRefForClone=Rif. del nuovo prodotto/servizio CustomerPrices=Prezzi al cliente SuppliersPrices=Prezzi fornitori +SuppliersPricesOfProductsOrServices=Suppliers prices (of products or services) CustomCode=Codice dogana CountryOrigin=Paese di origine HiddenIntoCombo=Nascosti nelle tendine di selezione @@ -208,6 +213,7 @@ CostPmpHT=Totale netto VWAP ProductUsedForBuild=Autoconsumato dalla produzione ProductBuilded=Produzione completata ProductsMultiPrice=Prodotto con più prezzi +ProductsOrServiceMultiPrice=Customers prices (of products or services, multi-prices) ProductSellByQuarterHT=Turnover dei prodotti trimestrale VWAP ServiceSellByQuarterHT=Turnover trimestrale dei servizi VWAP Quarter1=Primo trimestre diff --git a/htdocs/langs/it_IT/shop.lang b/htdocs/langs/it_IT/shop.lang index 089ffeb7bcb..8e9b3a5e015 100644 --- a/htdocs/langs/it_IT/shop.lang +++ b/htdocs/langs/it_IT/shop.lang @@ -1,4 +1,5 @@ # Dolibarr language file - Source file is en_US - shop +FailedConnectDBCheckModuleSetup=Failed to connect to oscommerce database. Check your module setup Shop=Negozio ShopWeb=Negozio online LastOrders=Ultimi ordini diff --git a/htdocs/langs/it_IT/stocks.lang b/htdocs/langs/it_IT/stocks.lang index e1086fc647c..8d9ad13e572 100644 --- a/htdocs/langs/it_IT/stocks.lang +++ b/htdocs/langs/it_IT/stocks.lang @@ -112,6 +112,7 @@ ReplenishmentOrdersDesc=Questa è una lista di tutti gli ordini di acquisto aper Replenishments=Rifornimento NbOfProductBeforePeriod=Quantità del prodotto %s in magazzino prima del periodo selezionato (< %s) NbOfProductAfterPeriod=Quantity of product %s in stock after selected period (> %s) +MassMovement=Mass movement MassStockMovement=Mass stock movement SelectProductInAndOutWareHouse=Select a product, a quantity, a source warehouse and a target warehouse, then click "%s". Once this is done for all required movements, click onto "%s". RecordMovement=Record transfert diff --git a/htdocs/langs/ja_JP/admin.lang b/htdocs/langs/ja_JP/admin.lang index 749e20dca99..859321837a0 100644 --- a/htdocs/langs/ja_JP/admin.lang +++ b/htdocs/langs/ja_JP/admin.lang @@ -116,7 +116,7 @@ LanguageBrowserParameter=パラメータ%s LocalisationDolibarrParameters=ローカリゼーションのパラメータ ClientTZ=Client Time Zone (user) ClientHour=Client time (user) -OSTZ=タイムゾーンのOSサーバー +OSTZ=Server OS Time Zone PHPTZ=タイムゾーンは、PHPサーバー PHPServerOffsetWithGreenwich=PHPサーバのオフセット幅グリニッジ(秒) ClientOffsetWithGreenwich=クライアント/ブラウザオフセット幅グリニッジ(秒) @@ -233,7 +233,9 @@ OfficialWebSiteFr=フランスの公式ウェブサイト OfficialWiki=WikiのDolibarrドキュメント OfficialDemo=Dolibarrオンラインデモ OfficialMarketPlace=外部モジュール/アドオンの公式市場の場所 -OfficialWebHostingService=Official web hosting services (Cloud hosting) +OfficialWebHostingService=Referenced web hosting services (Cloud hosting) +ReferencedPreferredPartners=Preferred Partners +OtherResources=Autres ressources ForDocumentationSeeWiki=ユーザーまたは開発者のドキュメント(DOC、よくある質問(FAQ)...)のために、
    Dolibarr Wikiで見てみましょう。
    %s ForAnswersSeeForum=他の質問/ヘルプについては、Dolibarrフォーラムを使用することができます。
    %s HelpCenterDesc1=この領域には、Dolibarrのヘルプサポートサービスを取得することができます。 @@ -369,9 +371,9 @@ ExtrafieldSelectList = Select from table ExtrafieldSeparator=Separator ExtrafieldCheckBox=Checkbox ExtrafieldRadio=Radio button -ExtrafieldParamHelpselect=Parameters list have to be like key,value

    for exemple :
    1,value1
    2,value2
    3,value3
    ...

    In order to have the list depending on another :
    1,value1|parent_list_code:parent_key
    2,value2|parent_list_code:parent_key -ExtrafieldParamHelpcheckbox=Parameters list have to be like key,value

    for exemple :
    1,value1
    2,value2
    3,value3
    ... -ExtrafieldParamHelpradio=Parameters list have to be like key,value

    for exemple :
    1,value1
    2,value2
    3,value3
    ... +ExtrafieldParamHelpselect=Parameters list have to be like key,value

    for example :
    1,value1
    2,value2
    3,value3
    ...

    In order to have the list depending on another :
    1,value1|parent_list_code:parent_key
    2,value2|parent_list_code:parent_key +ExtrafieldParamHelpcheckbox=Parameters list have to be like key,value

    for example :
    1,value1
    2,value2
    3,value3
    ... +ExtrafieldParamHelpradio=Parameters list have to be like key,value

    for example :
    1,value1
    2,value2
    3,value3
    ... ExtrafieldParamHelpsellist=Parameters list comes from a table
    Syntax : table_name:label_field:id_field::filter
    Example : c_typent:libelle:id::filter

    filter can be a simple test (eg active=1) to display only active value
    if you want to filter on extrafields use syntaxt extra.fieldcode=... (where field code is the code of extrafield)

    In order to have the list depending on another :
    c_typent:libelle:id:parent_list_code|parent_column:filter LibraryToBuildPDF=Library used to build PDF WarningUsingFPDF=Warning: Your conf.php contains directive dolibarr_pdf_force_fpdf=1. This means you use the FPDF library to generate PDF files. This library is old and does not support a lot of features (Unicode, image transparency, cyrillic, arab and asiatic languages, ...), so you may experience errors during PDF generation.
    To solve this and have a full support of PDF generation, please download TCPDF library, then comment or remove the line $dolibarr_pdf_force_fpdf=1, and add instead $dolibarr_lib_TCPDF_PATH='path_to_TCPDF_dir' @@ -472,7 +474,7 @@ Module410Desc=のwebcalendar統合 Module500Name=Special expenses (tax, social contributions, dividends) Module500Desc=Management of special expenses like taxes, social contribution, dividends and salaries Module510Name=Salaries -Module510Desc=Management of empoyees salaries and payments +Module510Desc=Management of employees salaries and payments Module600Name=通知 Module600Desc=サードパーティの連絡先にいくつかのDolibarrのビジネスイベントを電子メールで通知を送信 Module700Name=寄付 @@ -495,15 +497,15 @@ Module2400Name=議題 Module2400Desc=イベント/タスクと議題の管理 Module2500Name=電子コンテンツ管理 Module2500Desc=ドキュメントを保存および共有 -Module2600Name= Webサービス -Module2600Desc= Dolibarr Webサービスのサーバをイネーブルにします。 -Module2700Name= グラバター -Module2700Desc= ユーザー/メンバーの写真を(それらのメールに見られる)を表示するオンライングラバターサービス(www.gravatar.com)を使用します。インターネットへのアクセスを必要とする +Module2600Name=Webサービス +Module2600Desc=Dolibarr Webサービスのサーバをイネーブルにします。 +Module2700Name=グラバター +Module2700Desc=ユーザー/メンバーの写真を(それらのメールに見られる)を表示するオンライングラバターサービス(www.gravatar.com)を使用します。インターネットへのアクセスを必要とする Module2800Desc=FTP Client -Module2900Name= GeoIPMaxmind -Module2900Desc= のGeoIP Maxmindの変換機能 -Module3100Name= Skype -Module3100Desc= Add a Skype button into card of adherents / third parties / contacts +Module2900Name=GeoIPMaxmind +Module2900Desc=のGeoIP Maxmindの変換機能 +Module3100Name=Skype +Module3100Desc=Add a Skype button into card of adherents / third parties / contacts Module5000Name=マルチ会社 Module5000Desc=あなたが複数の企業を管理することができます Module6000Name=Workflow @@ -681,6 +683,10 @@ Permission401=割引を読む Permission402=割引を作成/変更 Permission403=割引を検証する Permission404=割引を削除します。 +Permission510=Read Salaries +Permission512=Create/modify salaries +Permission514=Delete salaries +Permission517=Export salaries Permission531=サービスを読む Permission532=サービスを作成/変更 Permission534=サービスを削除する @@ -999,7 +1005,7 @@ ExtraFieldsSupplierOrders=Complementary attributes (orders) ExtraFieldsSupplierInvoices=Complementary attributes (invoices) ExtraFieldsProject=Complementary attributes (projects) ExtraFieldsProjectTask=Complementary attributes (tasks) -ExtraFieldHasWrongValue=Attribut %sは間違った値を持っています。 +ExtraFieldHasWrongValue=Attribute %s has a wrong value. AlphaNumOnlyCharsAndNoSpace=only alphanumericals characters without space AlphaNumOnlyLowerCharsAndNoSpace=only alphanumericals and lower case characters without space SendingMailSetup=電子メールによるsendingsのセットアップ @@ -1018,13 +1024,13 @@ SuhosinSessionEncrypt=Session storage encrypted by Suhosin ConditionIsCurrently=Condition is currently %s TestNotPossibleWithCurrentBrowsers=Automatic detection not possible YouUseBestDriver=You use driver %s that is best driver available currently. -YouDoNotUseBestDriver=You use drive %s but driver %s is recommanded. +YouDoNotUseBestDriver=You use drive %s but driver %s is recommended. NbOfProductIsLowerThanNoPb=You have only %s products/services into database. This does not required any particular optimization. SearchOptim=Search optimization YouHaveXProductUseSearchOptim=You have %s product into database. You should add the constant PRODUCT_DONOTSEARCH_ANYWHERE to 1 into Home-Setup-Other, you limit the search to the beginning of strings making possible for database to use index and you should get an immediate response. BrowserIsOK=You are using the web browser %s. This browser is ok for security and performance. BrowserIsKO=You are using the web browser %s. This browser is known to be a bad choice for security, performance and reliability. We recommand you to use Firefox, Chrome, Opera or Safari. -XDebugInstalled=XDebug est chargé. +XDebugInstalled=XDebug is loaded. XCacheInstalled=XCache is loaded. AddRefInList=Display customer/supplier ref into list (select list or combobox) and most of hyperlink FieldEdition=Edition of field %s @@ -1073,7 +1079,7 @@ WebCalServer=サーバホスティング、カレンダーデータベース WebCalDatabaseName=データベース名 WebCalUser=データベースにアクセスするユーザー WebCalSetupSaved=のwebcalendarのセットアップは正常に保存されます。 -WebCalTestOk=ユーザー '%s'成功したデータベース "%s"のサーバ "%s"への接続を確立します。 +WebCalTestOk=Connection to server '%s' on database '%s' with user '%s' successful. WebCalTestKo1=サーバー '%s'への接続が成功しますが、データベース '%s'は到達できませんでした。 WebCalTestKo2=ユーザー '%s'でサーバー '%s'への接続に失敗しました。 WebCalErrorConnectOkButWrongDatabase=接続に成功しましたが、データベースは、WebCalendarデータベースには見えない。 @@ -1119,7 +1125,7 @@ WatermarkOnDraftProposal=Watermark on draft commercial proposals (none if empty) OrdersSetup=注文の管理セットアップ OrdersNumberingModules=モジュールの番号受注 OrdersModelModule=注文書のモデル -HideTreadedOrders=リスト内の処理またはキャンセルされた注文を隠す +HideTreadedOrders=Hide the treated or cancelled orders in the list ValidOrderAfterPropalClosed=、近くに提案した後に順序を検証するために、それは暫定的な順序でステップ実行しないように可能になります FreeLegalTextOnOrders=受注上のフリーテキスト WatermarkOnDraftOrders=Watermark on draft orders (none if empty) @@ -1214,9 +1220,9 @@ LDAPSynchroKO=失敗した同期のテスト LDAPSynchroKOMayBePermissions=同期テストに失敗しました。サーバへのコネクションが正しく設定されていることを確認し、LDAP udpatesすることができます LDAPTCPConnectOK=TCPは、LDAPサーバに成功(SERVER = %s、ポート= %s)に接続 LDAPTCPConnectKO=TCPは、LDAPサーバへの接続(SERVER = %s、ポート= %s)に失敗しました -LDAPBindOK=LDAPサーバsucessfull(SERVER = %s、ポート= %sは、Admin = %s、パスワード= %s)にAuthentificate接続/ +LDAPBindOK=Connect/Authentificate to LDAP server successful (Server=%s, Port=%s, Admin=%s, Password=%s) LDAPBindKO=LDAPサーバへのAuthentificate /接続(SERVER = %s、ポート= %sは、Admin = %s、パスワード= %s)に失敗しました -LDAPUnbindSuccessfull=成功を切断 +LDAPUnbindSuccessfull=Disconnect successful LDAPUnbindFailed=切断に失敗しました LDAPConnectToDNSuccessfull=接続auのDN(%s)RI¿½ussie LDAPConnectToDNFailed=接続auのDN(%s)�¿½チョイ電子 @@ -1273,7 +1279,7 @@ LDAPFieldSidExample=例:objectSidが LDAPFieldEndLastSubscription=サブスクリプション終了の日付 LDAPFieldTitle=/ポスト機能 LDAPFieldTitleExample=Example: title -LDAPParametersAreStillHardCoded=LDAP parametresはまだ(接触クラスの)ハードコードされています +LDAPParametersAreStillHardCoded=LDAP parameters are still hardcoded (in contact class) LDAPSetupNotComplete=(他のタブに行く)LDAPセットアップ完了していません LDAPNoUserOrPasswordProvidedAccessIsReadOnly=いいえ、管理者またはパスワードが提供されません。 LDAPのアクセスは匿名で、読み取り専用モードになります。 LDAPDescContact=このページでは、Dolibarr接点で検出された各データのためにLDAPツリー内のLDAP属性名を定義することができます。 @@ -1429,7 +1435,7 @@ OptionVATDefault=標準 OptionVATDebitOption=デビットのオプションサービス OptionVatDefaultDesc=付加価値税(VAT)が原因です。
    - 貨物の配達に(我々は請求書の日付を使用します)
    - サービスの支払いに OptionVatDebitOptionDesc=付加価値税(VAT)が原因です。
    - 貨物の配達に(我々は請求書の日付を使用します)
    - サービスの請求書(デビット)の -SummaryOfVatExigibilityUsedByDefault=選びましたオプションに従って、デフォルトでは付加価値税exigibilityの時間: +SummaryOfVatExigibilityUsedByDefault=Time of VAT exigibility by default according to chosen option: OnDelivery=着払い OnPayment=支払いに OnInvoice=請求書 @@ -1446,7 +1452,7 @@ AccountancyCodeBuy=Purchase account. code AgendaSetup=イベントと議題モジュールのセットアップ PasswordTogetVCalExport=エクスポートのリンクを許可するキー PastDelayVCalExport=より古いイベントはエクスポートされません -AGENDA_USE_EVENT_TYPE=Use events types (managed into menu Setup -> Dictionnary -> Type of agenda events) +AGENDA_USE_EVENT_TYPE=Use events types (managed into menu Setup -> Dictionary -> Type of agenda events) ##### ClickToDial ##### ClickToDialDesc=このモジュールは、電話番号の後にアイコンを追加することができます。このアイコンをクリックすると、あなたは以下の定義、特定のURLを使用してサーバーを呼び出します。これは、例えばSIPシステム上で電話番号を呼び出すことができますDolibarrからのコール·センター·システムを呼び出すために使用することができます。 ##### Point Of Sales (CashDesk) ##### diff --git a/htdocs/langs/ja_JP/contracts.lang b/htdocs/langs/ja_JP/contracts.lang index ccbe68d01e0..f056617c84f 100644 --- a/htdocs/langs/ja_JP/contracts.lang +++ b/htdocs/langs/ja_JP/contracts.lang @@ -38,7 +38,7 @@ ConfirmCloseService=あなたは日付の%sでこのサービスを閉じ ValidateAContract=契約を検証 ActivateService=サービスをアクティブに ConfirmActivateService=あなたは日付の%sでこのサービスをアクティブにしてもよろしいですか? -# RefContract=Contract reference +RefContract=Contract reference DateContract=契約日 DateServiceActivate=サービスのアクティブ化の日付 DateServiceUnactivate=サービスの非アクティブ化の日付 @@ -85,10 +85,12 @@ PaymentRenewContractId=契約回線(番号の%s)を​​更新 ExpiredSince=有効期限の日付 RelatedContracts=関連する契約 NoExpiredServices=アクティブなサービスの期限が切れない -# ListOfServicesToExpireWithDuration=List of Services to expire in %s days -# ListOfServicesToExpireWithDurationNeg=List of Services expired from more than %s days -# ListOfServicesToExpire=List of Services to expire -# NoteListOfYourExpiredServices=This list contains only services of contracts for third parties you are linked to as a sale representative. +ListOfServicesToExpireWithDuration=List of Services to expire in %s days +ListOfServicesToExpireWithDurationNeg=List of Services expired from more than %s days +ListOfServicesToExpire=List of Services to expire +NoteListOfYourExpiredServices=This list contains only services of contracts for third parties you are linked to as a sale representative. +StandardContractsTemplate=Standard contracts template +ContactNameAndSignature=For %s, name and signature: ##### Types de contacts ##### TypeContact_contrat_internal_SALESREPSIGN=営業担当者の署名の契約 diff --git a/htdocs/langs/ja_JP/exports.lang b/htdocs/langs/ja_JP/exports.lang index d6e1079851f..d94a41b3f0c 100644 --- a/htdocs/langs/ja_JP/exports.lang +++ b/htdocs/langs/ja_JP/exports.lang @@ -8,7 +8,7 @@ ImportableDatas=インポート可能なデータセット SelectExportDataSet=エクスポートするデータセットを選択... SelectImportDataSet=インポートしたいデータを選択... SelectExportFields=エクスポートするフィールドを選択するか、または事前に定義された輸出プロファイリングを選択 -SelectImportFields=アンカー%sでダウンしてそれらを移動してデータベースにインポートするソース·ファイルのフィールドとそのターゲットフィールドを選択するか、または事前に定義されたインポートプロファイリングを選択します。 +SelectImportFields=Choose source file fields you want to import and their target field in database by moving them up and down with anchor %s, or select a predefined import profile: NotImportedFields=ソースファイルのフィールドがインポートされません SaveExportModel=後でそれを再利用する予定がある場合は、このエクスポート·プロファイルを保存... SaveImportModel=後でそれを再利用する予定がある場合は、このインポート·プロファイルを保存... @@ -64,7 +64,7 @@ ChooseFormatOfFileToImport=それを選択するにはピクトの%sをクリッ ChooseFileToImport=ソースのインポートファイルとしてファイルを選択するピクトの%s]をクリックしてファイルをアップロード... SourceFileFormat=ソースファイルの形式 FieldsInSourceFile=ソースファイル内のフィールド -# FieldsInTargetDatabase=Target fields in Dolibarr database (bold=mandatory) +FieldsInTargetDatabase=Target fields in Dolibarr database (bold=mandatory) Field=フィールド NoFields=Noフィールド MoveField=フィールドの列番号%sを移動 @@ -81,7 +81,7 @@ DoNotImportFirstLine=ソースファイルの最初の行をインポートし NbOfSourceLines=ソースファイルの行数 NowClickToTestTheImport=あなたが定義したインポートパラメータを確認してください。彼らが正しい場合は、インポートプロセスのシミュレーションを起動するボタン"%s"(データがデータベースに変更されません、それは一瞬だけのためのシミュレーションです)をクリックしてください... RunSimulateImportFile=インポートシミュレーションを起動します。 -FieldNeedSource=データベース内のこのfielsは、ソースファイルからのデータを必要と +FieldNeedSource=This field requires data from the source file SomeMandatoryFieldHaveNoSource=いくつかの必須フィールドは、データファイルからのソースがありません InformationOnSourceFile=ソースファイルに関する情報 InformationOnTargetTables=ターゲットフィールドに関する情報 @@ -102,33 +102,33 @@ NbOfLinesImported=正常にインポート行数:%s。 DataComeFromNoWhere=挿入する値は、ソース·ファイル内のどこから来ている。 DataComeFromFileFieldNb=挿入する値は、ソースファイル内のフィールド番号%sから来ています。 DataComeFromIdFoundFromRef=ソース·ファイルのフィールド番号%sから来ている値が(だからrefを持つオブジェ%s。ソースファイルからはDolibarrに存在する必要があります)を使用して、親オブジェクトのIDを見つけるために使用されます。 -# DataComeFromIdFoundFromCodeId=Code that comes from field number %s of source file will be used to find id of parent object to use (So the code from source file must exists into dictionary %s). Note that if you know id, you can also use it into source file instead of code. Import should work in both cases. +DataComeFromIdFoundFromCodeId=Code that comes from field number %s of source file will be used to find id of parent object to use (So the code from source file must exists into dictionary %s). Note that if you know id, you can also use it into source file instead of code. Import should work in both cases. DataIsInsertedInto=ソースファイルからのデータは、次のフィールドに挿入されます。 DataIDSourceIsInsertedInto=ソースファイル内のデータを使用して見つかった親オブジェクトのIDは、次のフィールドに挿入されます。 DataCodeIDSourceIsInsertedInto=コー​​ドから見つかった親行のIDは、次のフィールドに挿入されます。 SourceRequired=データ値は必須です。 SourceExample=可能なデータ値の例 ExampleAnyRefFoundIntoElement=任意のref要素の%s見つかりました -# ExampleAnyCodeOrIdFoundIntoDictionary=Any code (or id) found into dictionary %s +ExampleAnyCodeOrIdFoundIntoDictionary=Any code (or id) found into dictionary %s CSVFormatDesc=カンマ区切りファイル形式(。CSV)。
    これは、フィールドがセパレータ[%s]で区切られたテキストフ​​ァイル形式です。区切り文字はフィールドの内容の中に発見されている場合は、フィールドが円形文字[%s]で丸められます。 [%s]は丸い文字をエスケープする文字をエスケープします。 -# Excel95FormatDesc=Excel file format (.xls)
    This is native Excel 95 format (BIFF5). -# Excel2007FormatDesc=Excel file format (.xlsx)
    This is native Excel 2007 format (SpreadsheetML). -# TsvFormatDesc=Tab Separated Value file format (.tsv)
    This is a text file format where fields are separated by a tabulator [tab]. -# ExportFieldAutomaticallyAdded=Field %s was automatically added. It will avoid you to have similar lines to be treated as duplicate records (with this field added, all lines will own their own id and will differ). -# CsvOptions=Csv Options -# Separator=Separator -# Enclosure=Enclosure -# SuppliersProducts=Suppliers Products +Excel95FormatDesc=Excel file format (.xls)
    This is native Excel 95 format (BIFF5). +Excel2007FormatDesc=Excel file format (.xlsx)
    This is native Excel 2007 format (SpreadsheetML). +TsvFormatDesc=Tab Separated Value file format (.tsv)
    This is a text file format where fields are separated by a tabulator [tab]. +ExportFieldAutomaticallyAdded=Field %s was automatically added. It will avoid you to have similar lines to be treated as duplicate records (with this field added, all lines will own their own id and will differ). +CsvOptions=Csv Options +Separator=Separator +Enclosure=Enclosure +SuppliersProducts=Suppliers Products BankCode=銀行コード DeskCode=デスクのコード BankAccountNumber=口座番号 BankAccountNumberKey=キー -# SpecialCode=Special code -# ExportStringFilter=%% allows replacing one or more characters in the text -# ExportDateFilter='YYYY' 'YYYYMM' 'YYYYMMDD': filters by one year/month/day
    'YYYY+YYYY' 'YYYYMM+YYYYMM' 'YYYYMMDD+YYYYMMDD': filters over a range of years/months/days
    '>YYYY' '>YYYYMM' '>YYYYMMDD': filters on the following years/months/days
    '<YYYY' '<YYYYMM' '<YYYYMMDD': filters on the previous years/months/days -# ExportNumericFilter='NNNNN' filters by one value
    'NNNNN+NNNNN' filters over a range of values
    '>NNNNN' filters by lower values
    '>NNNNN' filters by higher values +SpecialCode=Special code +ExportStringFilter=%% allows replacing one or more characters in the text +ExportDateFilter='YYYY' 'YYYYMM' 'YYYYMMDD': filters by one year/month/day
    'YYYY+YYYY' 'YYYYMM+YYYYMM' 'YYYYMMDD+YYYYMMDD': filters over a range of years/months/days
    '>YYYY' '>YYYYMM' '>YYYYMMDD': filters on the following years/months/days
    '<YYYY' '<YYYYMM' '<YYYYMMDD': filters on the previous years/months/days +ExportNumericFilter='NNNNN' filters by one value
    'NNNNN+NNNNN' filters over a range of values
    '>NNNNN' filters by lower values
    '>NNNNN' filters by higher values ## filters -# SelectFilterFields=If you want to filter on some values, just input values here. -# FilterableFields=Champs Filtrables -# FilteredFields=Filtered fields -# FilteredFieldsValues=Value for filter +SelectFilterFields=If you want to filter on some values, just input values here. +FilterableFields=Champs Filtrables +FilteredFields=Filtered fields +FilteredFieldsValues=Value for filter diff --git a/htdocs/langs/ja_JP/holiday.lang b/htdocs/langs/ja_JP/holiday.lang index 932bd5e2001..d50a1db2f96 100644 --- a/htdocs/langs/ja_JP/holiday.lang +++ b/htdocs/langs/ja_JP/holiday.lang @@ -8,7 +8,6 @@ NotActiveModCP=You must enable the module holidays to view this page. NotConfigModCP=You must configure the module holidays to view this page. To do this, click here . NoCPforUser=You don't have a demand for holidays. AddCP=Apply for holidays -CPErrorSQL=An SQL error occurred: Employe=Employee DateDebCP=開始日 DateFinCP=終了日 diff --git a/htdocs/langs/ja_JP/languages.lang b/htdocs/langs/ja_JP/languages.lang index ecb0809e67b..c411159d347 100644 --- a/htdocs/langs/ja_JP/languages.lang +++ b/htdocs/langs/ja_JP/languages.lang @@ -19,6 +19,7 @@ Language_en_SA=英語(サウジアラビア) Language_en_US=英語 (アメリカ) Language_en_ZA=英語(南アフリカ) Language_es_ES=スペイン語 +Language_es_DO=Spanish (Dominican Republic) Language_es_AR=スペイン語 (アルゼンチン) Language_es_CL=Spanish (Chile) Language_es_HN=スペイン語(ホンジュラス) @@ -38,6 +39,7 @@ Language_fr_NC=フランス(ニューカレドニア) Language_he_IL=ヘブライ語の Language_hr_HR=クロアチア語 Language_hu_HU=ハンガリー語 +Language_id_ID=Indonesian Language_is_IS=アイスランド語 Language_it_IT=イタリア語 Language_ja_JP=日本語 diff --git a/htdocs/langs/ja_JP/mails.lang b/htdocs/langs/ja_JP/mails.lang index f381f544ac8..9df270c9d72 100644 --- a/htdocs/langs/ja_JP/mails.lang +++ b/htdocs/langs/ja_JP/mails.lang @@ -79,6 +79,7 @@ MailtoEMail=Hyper link to email ActivateCheckRead=Allow to use the "Unsubcribe" link ActivateCheckReadKey=Key use to encrypt URL use for "Read Receipt" and "Unsubcribe" feature EMailSentToNRecipients=EMail sent to %s recipients. +XTargetsAdded=%s recipients added into target list EachInvoiceWillBeAttachedToEmail=A document using default invoice document template will be created and attached to each email. MailTopicSendRemindUnpaidInvoices=Reminder of invoice %s (%s) SendRemind=Send reminder by EMails diff --git a/htdocs/langs/ja_JP/main.lang b/htdocs/langs/ja_JP/main.lang index e7f3c63ce75..94c04746669 100644 --- a/htdocs/langs/ja_JP/main.lang +++ b/htdocs/langs/ja_JP/main.lang @@ -551,6 +551,7 @@ MailSentBy=によって送信される電子メール TextUsedInTheMessageBody=電子メールの本文 SendAcknowledgementByMail=Ackを送信します。電子メールによる NoEMail=まだメールしない +NoMobilePhone=No mobile phone Owner=所有者 DetectedVersion=検出されたバージョン FollowingConstantsWillBeSubstituted=以下の定数は、対応する値を持つ代替となります。 diff --git a/htdocs/langs/ja_JP/products.lang b/htdocs/langs/ja_JP/products.lang index 0d1d7a31b25..7aeca3bfaf2 100644 --- a/htdocs/langs/ja_JP/products.lang +++ b/htdocs/langs/ja_JP/products.lang @@ -28,8 +28,10 @@ ProductsAndServicesStatistics=製品とサービスの統計情報 ProductsStatistics=製品統計 ProductsOnSell=利用可能な製品 ProductsNotOnSell=廃止された製品 +ProductsOnSellAndOnBuy=Products not for sale nor purchase ServicesOnSell=利用可能なサービス ServicesNotOnSell=廃止されたサービス +ServicesOnSellAndOnBuy=Services not for sale nor purchase InternalRef=内部基準 LastRecorded=販売上の最後の製品/サービスは、記録 LastRecordedProductsAndServices=最後%sは、製品/サービスを記録 @@ -70,6 +72,8 @@ PublicPrice=公共の価格 CurrentPrice=現行価格 NewPrice=新価格 MinPrice=ミニム。販売価格 +MinPriceHT=Minim. selling price (net of tax) +MinPriceTTC=Minim. selling price (inc. tax) CantBeLessThanMinPrice=販売価格は、本製品(税抜き%s)に許可される最小値より小さくなることはありません。あなたはあまりにも重要な割引を入力した場合にも、このメッセージが表示されますことができます。 ContractStatus=契約状況 ContractStatusClosed=閉じた @@ -179,6 +183,7 @@ ProductIsUsed=本製品が使用されます NewRefForClone=REF。新製品/サービスの CustomerPrices=お客様の価格 SuppliersPrices=仕入価格 +SuppliersPricesOfProductsOrServices=Suppliers prices (of products or services) CustomCode=税関コード CountryOrigin=原産国 HiddenIntoCombo=selectリストの中に隠れて @@ -208,6 +213,7 @@ CostPmpHT=Net total VWAP ProductUsedForBuild=Auto consumed by production ProductBuilded=Production completed ProductsMultiPrice=Product multi-price +ProductsOrServiceMultiPrice=Customers prices (of products or services, multi-prices) ProductSellByQuarterHT=Products turnover quarterly VWAP ServiceSellByQuarterHT=Services turnover quarterly VWAP Quarter1=1st. Quarter diff --git a/htdocs/langs/ja_JP/shop.lang b/htdocs/langs/ja_JP/shop.lang index e6577a5dcff..d6aee12c58e 100644 --- a/htdocs/langs/ja_JP/shop.lang +++ b/htdocs/langs/ja_JP/shop.lang @@ -1,4 +1,5 @@ # Dolibarr language file - Source file is en_US - shop +FailedConnectDBCheckModuleSetup=Failed to connect to oscommerce database. Check your module setup Shop=ショップ ShopWeb=ウェブショップ LastOrders=ラストオーダー diff --git a/htdocs/langs/ja_JP/stocks.lang b/htdocs/langs/ja_JP/stocks.lang index 540eadc11fb..303ebb2284b 100644 --- a/htdocs/langs/ja_JP/stocks.lang +++ b/htdocs/langs/ja_JP/stocks.lang @@ -112,6 +112,7 @@ ReplenishmentOrdersDesc=This is list of all opened supplier orders Replenishments=Replenishments NbOfProductBeforePeriod=Quantity of product %s in stock before selected period (< %s) NbOfProductAfterPeriod=Quantity of product %s in stock after selected period (> %s) +MassMovement=Mass movement MassStockMovement=Mass stock movement SelectProductInAndOutWareHouse=Select a product, a quantity, a source warehouse and a target warehouse, then click "%s". Once this is done for all required movements, click onto "%s". RecordMovement=Record transfert diff --git a/htdocs/langs/ko_KR/admin.lang b/htdocs/langs/ko_KR/admin.lang index 44f10514acd..d188910e206 100644 --- a/htdocs/langs/ko_KR/admin.lang +++ b/htdocs/langs/ko_KR/admin.lang @@ -116,7 +116,7 @@ LanguageBrowserParameter=Parameter %s LocalisationDolibarrParameters=Localisation parameters ClientTZ=Client Time Zone (user) ClientHour=Client time (user) -OSTZ=Servre OS Time Zone +OSTZ=Server OS Time Zone PHPTZ=PHP server Time Zone PHPServerOffsetWithGreenwich=PHP server offset width Greenwich (seconds) ClientOffsetWithGreenwich=Client/Browser offset width Greenwich (seconds) @@ -233,7 +233,9 @@ OfficialWebSiteFr=French official web site OfficialWiki=Dolibarr documentation on Wiki OfficialDemo=Dolibarr online demo OfficialMarketPlace=Official market place for external modules/addons -OfficialWebHostingService=Official web hosting services (Cloud hosting) +OfficialWebHostingService=Referenced web hosting services (Cloud hosting) +ReferencedPreferredPartners=Preferred Partners +OtherResources=Autres ressources ForDocumentationSeeWiki=For user or developer documentation (Doc, FAQs...),
    take a look at the Dolibarr Wiki:
    %s ForAnswersSeeForum=For any other questions/help, you can use the Dolibarr forum:
    %s HelpCenterDesc1=This area can help you to get a Help support service on Dolibarr. @@ -369,9 +371,9 @@ ExtrafieldSelectList = Select from table ExtrafieldSeparator=Separator ExtrafieldCheckBox=Checkbox ExtrafieldRadio=Radio button -ExtrafieldParamHelpselect=Parameters list have to be like key,value

    for exemple :
    1,value1
    2,value2
    3,value3
    ...

    In order to have the list depending on another :
    1,value1|parent_list_code:parent_key
    2,value2|parent_list_code:parent_key -ExtrafieldParamHelpcheckbox=Parameters list have to be like key,value

    for exemple :
    1,value1
    2,value2
    3,value3
    ... -ExtrafieldParamHelpradio=Parameters list have to be like key,value

    for exemple :
    1,value1
    2,value2
    3,value3
    ... +ExtrafieldParamHelpselect=Parameters list have to be like key,value

    for example :
    1,value1
    2,value2
    3,value3
    ...

    In order to have the list depending on another :
    1,value1|parent_list_code:parent_key
    2,value2|parent_list_code:parent_key +ExtrafieldParamHelpcheckbox=Parameters list have to be like key,value

    for example :
    1,value1
    2,value2
    3,value3
    ... +ExtrafieldParamHelpradio=Parameters list have to be like key,value

    for example :
    1,value1
    2,value2
    3,value3
    ... ExtrafieldParamHelpsellist=Parameters list comes from a table
    Syntax : table_name:label_field:id_field::filter
    Example : c_typent:libelle:id::filter

    filter can be a simple test (eg active=1) to display only active value
    if you want to filter on extrafields use syntaxt extra.fieldcode=... (where field code is the code of extrafield)

    In order to have the list depending on another :
    c_typent:libelle:id:parent_list_code|parent_column:filter LibraryToBuildPDF=Library used to build PDF WarningUsingFPDF=Warning: Your conf.php contains directive dolibarr_pdf_force_fpdf=1. This means you use the FPDF library to generate PDF files. This library is old and does not support a lot of features (Unicode, image transparency, cyrillic, arab and asiatic languages, ...), so you may experience errors during PDF generation.
    To solve this and have a full support of PDF generation, please download TCPDF library, then comment or remove the line $dolibarr_pdf_force_fpdf=1, and add instead $dolibarr_lib_TCPDF_PATH='path_to_TCPDF_dir' @@ -472,7 +474,7 @@ Module410Desc=Webcalendar integration Module500Name=Special expenses (tax, social contributions, dividends) Module500Desc=Management of special expenses like taxes, social contribution, dividends and salaries Module510Name=Salaries -Module510Desc=Management of empoyees salaries and payments +Module510Desc=Management of employees salaries and payments Module600Name=Notifications Module600Desc=Send notifications by email on some Dolibarr business events to third party contacts Module700Name=Donations @@ -495,15 +497,15 @@ Module2400Name=Agenda Module2400Desc=Events/tasks and agenda management Module2500Name=Electronic Content Management Module2500Desc=Save and share documents -Module2600Name= WebServices -Module2600Desc= Enable the Dolibarr web services server -Module2700Name= Gravatar -Module2700Desc= Use online Gravatar service (www.gravatar.com) to show photo of users/members (found with their emails). Need an internet access +Module2600Name=WebServices +Module2600Desc=Enable the Dolibarr web services server +Module2700Name=Gravatar +Module2700Desc=Use online Gravatar service (www.gravatar.com) to show photo of users/members (found with their emails). Need an internet access Module2800Desc=FTP Client -Module2900Name= GeoIPMaxmind -Module2900Desc= GeoIP Maxmind conversions capabilities -Module3100Name= Skype -Module3100Desc= Add a Skype button into card of adherents / third parties / contacts +Module2900Name=GeoIPMaxmind +Module2900Desc=GeoIP Maxmind conversions capabilities +Module3100Name=Skype +Module3100Desc=Add a Skype button into card of adherents / third parties / contacts Module5000Name=Multi-company Module5000Desc=Allows you to manage multiple companies Module6000Name=Workflow @@ -681,6 +683,10 @@ Permission401=Read discounts Permission402=Create/modify discounts Permission403=Validate discounts Permission404=Delete discounts +Permission510=Read Salaries +Permission512=Create/modify salaries +Permission514=Delete salaries +Permission517=Export salaries Permission531=Read services Permission532=Create/modify services Permission534=Delete services @@ -999,7 +1005,7 @@ ExtraFieldsSupplierOrders=Complementary attributes (orders) ExtraFieldsSupplierInvoices=Complementary attributes (invoices) ExtraFieldsProject=Complementary attributes (projects) ExtraFieldsProjectTask=Complementary attributes (tasks) -ExtraFieldHasWrongValue=Attribut %s has a wrong value. +ExtraFieldHasWrongValue=Attribute %s has a wrong value. AlphaNumOnlyCharsAndNoSpace=only alphanumericals characters without space AlphaNumOnlyLowerCharsAndNoSpace=only alphanumericals and lower case characters without space SendingMailSetup=Setup of sendings by email @@ -1018,13 +1024,13 @@ SuhosinSessionEncrypt=Session storage encrypted by Suhosin ConditionIsCurrently=Condition is currently %s TestNotPossibleWithCurrentBrowsers=Automatic detection not possible YouUseBestDriver=You use driver %s that is best driver available currently. -YouDoNotUseBestDriver=You use drive %s but driver %s is recommanded. +YouDoNotUseBestDriver=You use drive %s but driver %s is recommended. NbOfProductIsLowerThanNoPb=You have only %s products/services into database. This does not required any particular optimization. SearchOptim=Search optimization YouHaveXProductUseSearchOptim=You have %s product into database. You should add the constant PRODUCT_DONOTSEARCH_ANYWHERE to 1 into Home-Setup-Other, you limit the search to the beginning of strings making possible for database to use index and you should get an immediate response. BrowserIsOK=You are using the web browser %s. This browser is ok for security and performance. BrowserIsKO=You are using the web browser %s. This browser is known to be a bad choice for security, performance and reliability. We recommand you to use Firefox, Chrome, Opera or Safari. -XDebugInstalled=XDebug est chargé. +XDebugInstalled=XDebug is loaded. XCacheInstalled=XCache is loaded. AddRefInList=Display customer/supplier ref into list (select list or combobox) and most of hyperlink FieldEdition=Edition of field %s @@ -1073,7 +1079,7 @@ WebCalServer=Server hosting calendar database WebCalDatabaseName=Database name WebCalUser=User to access database WebCalSetupSaved=Webcalendar setup saved successfully. -WebCalTestOk=Connection to server '%s' on database '%s' with user '%s' successfull. +WebCalTestOk=Connection to server '%s' on database '%s' with user '%s' successful. WebCalTestKo1=Connection to server '%s' succeed but database '%s' could not be reached. WebCalTestKo2=Connection to server '%s' with user '%s' failed. WebCalErrorConnectOkButWrongDatabase=Connection succeeded but database doesn't look to be a Webcalendar database. @@ -1119,7 +1125,7 @@ WatermarkOnDraftProposal=Watermark on draft commercial proposals (none if empty) OrdersSetup=Order management setup OrdersNumberingModules=Orders numbering models OrdersModelModule=Order documents models -HideTreadedOrders=Hide the treated or canceled orders in the list +HideTreadedOrders=Hide the treated or cancelled orders in the list ValidOrderAfterPropalClosed=To validate the order after proposal closer, makes it possible not to step by the provisional order FreeLegalTextOnOrders=Free text on orders WatermarkOnDraftOrders=Watermark on draft orders (none if empty) @@ -1214,9 +1220,9 @@ LDAPSynchroKO=Failed synchronization test LDAPSynchroKOMayBePermissions=Failed synchronization test. Check that connexion to server is correctly configured and allows LDAP udpates LDAPTCPConnectOK=TCP connect to LDAP server successful (Server=%s, Port=%s) LDAPTCPConnectKO=TCP connect to LDAP server failed (Server=%s, Port=%s) -LDAPBindOK=Connect/Authentificate to LDAP server sucessfull (Server=%s, Port=%s, Admin=%s, Password=%s) +LDAPBindOK=Connect/Authentificate to LDAP server successful (Server=%s, Port=%s, Admin=%s, Password=%s) LDAPBindKO=Connect/Authentificate to LDAP server failed (Server=%s, Port=%s, Admin=%s, Password=%s) -LDAPUnbindSuccessfull=Disconnect successfull +LDAPUnbindSuccessfull=Disconnect successful LDAPUnbindFailed=Disconnect failed LDAPConnectToDNSuccessfull=Connection to DN (%s) successful LDAPConnectToDNFailed=Connection to DN (%s) failed @@ -1273,7 +1279,7 @@ LDAPFieldSidExample=Example : objectsid LDAPFieldEndLastSubscription=Date of subscription end LDAPFieldTitle=Post/Function LDAPFieldTitleExample=Example: title -LDAPParametersAreStillHardCoded=LDAP parametres are still hardcoded (in contact class) +LDAPParametersAreStillHardCoded=LDAP parameters are still hardcoded (in contact class) LDAPSetupNotComplete=LDAP setup not complete (go on others tabs) LDAPNoUserOrPasswordProvidedAccessIsReadOnly=No administrator or password provided. LDAP access will be anonymous and in read only mode. LDAPDescContact=This page allows you to define LDAP attributes name in LDAP tree for each data found on Dolibarr contacts. @@ -1429,7 +1435,7 @@ OptionVATDefault=Standard OptionVATDebitOption=Option services on Debit OptionVatDefaultDesc=VAT is due:
    - on delivery for goods (we use invoice date)
    - on payments for services OptionVatDebitOptionDesc=VAT is due:
    - on delivery for goods (we use invoice date)
    - on invoice (debit) for services -SummaryOfVatExigibilityUsedByDefault=Time of VAT exigibility by default according to choosed option: +SummaryOfVatExigibilityUsedByDefault=Time of VAT exigibility by default according to chosen option: OnDelivery=On delivery OnPayment=On payment OnInvoice=On invoice @@ -1446,7 +1452,7 @@ AccountancyCodeBuy=Purchase account. code AgendaSetup=Events and agenda module setup PasswordTogetVCalExport=Key to authorize export link PastDelayVCalExport=Do not export event older than -AGENDA_USE_EVENT_TYPE=Use events types (managed into menu Setup -> Dictionnary -> Type of agenda events) +AGENDA_USE_EVENT_TYPE=Use events types (managed into menu Setup -> Dictionary -> Type of agenda events) ##### ClickToDial ##### ClickToDialDesc=This module allows to add an icon after phone numbers. A click on this icon will call a server with a particular URL you define below. This can be used to call a call center system from Dolibarr that can call the phone number on a SIP system for example. ##### Point Of Sales (CashDesk) ##### diff --git a/htdocs/langs/ko_KR/contracts.lang b/htdocs/langs/ko_KR/contracts.lang index def3d8aceff..e5ad112b222 100644 --- a/htdocs/langs/ko_KR/contracts.lang +++ b/htdocs/langs/ko_KR/contracts.lang @@ -1,99 +1,101 @@ # Dolibarr language file - Source file is en_US - contracts -# ContractsArea=Contracts area -# ListOfContracts=List of contracts -# LastContracts=Last %s modified contracts -# AllContracts=All contracts -# ContractCard=Contract card -# ContractStatus=Contract status -# ContractStatusNotRunning=Not running -# ContractStatusRunning=Running -# ContractStatusDraft=Draft -# ContractStatusValidated=Validated -# ContractStatusClosed=Closed -# ServiceStatusInitial=Not running -# ServiceStatusRunning=Running -# ServiceStatusNotLate=Running, not expired -# ServiceStatusNotLateShort=Not expired -# ServiceStatusLate=Running, expired -# ServiceStatusLateShort=Expired -# ServiceStatusClosed=Closed -# ServicesLegend=Services legend -# Contracts=Contracts -# Contract=Contract -# NoContracts=No contracts -# MenuServices=Services -# MenuInactiveServices=Services not active -# MenuRunningServices=Running services -# MenuExpiredServices=Expired services -# MenuClosedServices=Closed services -# NewContract=New contract -# AddContract=Add contract -# SearchAContract=Search a contract -# DeleteAContract=Delete a contract -# CloseAContract=Close a contract -# ConfirmDeleteAContract=Are you sure you want to delete this contract and all its services ? -# ConfirmValidateContract=Are you sure you want to validate this contract under name %s ? -# ConfirmCloseContract=This will close all services (active or not). Are you sure you want to close this contract ? -# ConfirmCloseService=Are you sure you want to close this service with date %s ? -# ValidateAContract=Validate a contract -# ActivateService=Activate service -# ConfirmActivateService=Are you sure you want to activate this service with date %s ? -# RefContract=Contract reference -# DateContract=Contract date -# DateServiceActivate=Service activation date -# DateServiceUnactivate=Service deactivation date -# DateServiceStart=Date for beginning of service -# DateServiceEnd=Date for end of service -# ShowContract=Show contract -# ListOfServices=List of services -# ListOfInactiveServices=List of not active services -# ListOfExpiredServices=List of expired active services -# ListOfClosedServices=List of closed services -# ListOfRunningContractsLines=List of running contract lines -# ListOfRunningServices=List of running services -# NotActivatedServices=Inactive services (among validated contracts) -# BoardNotActivatedServices=Services to activate among validated contracts -# LastContracts=Last %s modified contracts -# LastActivatedServices=Last %s activated services -# LastModifiedServices=Last %s modified services -# EditServiceLine=Edit service line -# ContractStartDate=Start date -# ContractEndDate=End date -# DateStartPlanned=Planned start date -# DateStartPlannedShort=Planned start date -# DateEndPlanned=Planned end date -# DateEndPlannedShort=Planned end date -# DateStartReal=Real start date -# DateStartRealShort=Real start date -# DateEndReal=Real end date -# DateEndRealShort=Real end date -# NbOfServices=Nb of services -# CloseService=Close service -# ServicesNomberShort=%s service(s) -# RunningServices=Running services -# BoardRunningServices=Expired running services -# ServiceStatus=Status of service -# DraftContracts=Drafts contracts -# CloseRefusedBecauseOneServiceActive=Contract can't be closed as ther is at least one open service on it -# CloseAllContracts=Close all contract lines -# DeleteContractLine=Delete a contract line -# ConfirmDeleteContractLine=Are you sure you want to delete this contract line ? -# MoveToAnotherContract=Move service into another contract. -# ConfirmMoveToAnotherContract=I choosed new target contract and confirm I want to move this service into this contract. -# ConfirmMoveToAnotherContractQuestion=Choose in which existing contract (of same third party), you want to move this service to ? -# PaymentRenewContractId=Renew contract line (number %s) -# ExpiredSince=Expiration date -# RelatedContracts=Related contracts -# NoExpiredServices=No expired active services -# ListOfServicesToExpireWithDuration=List of Services to expire in %s days -# ListOfServicesToExpireWithDurationNeg=List of Services expired from more than %s days -# ListOfServicesToExpire=List of Services to expire -# NoteListOfYourExpiredServices=This list contains only services of contracts for third parties you are linked to as a sale representative. +ContractsArea=Contracts area +ListOfContracts=List of contracts +LastContracts=Last %s modified contracts +AllContracts=All contracts +ContractCard=Contract card +ContractStatus=Contract status +ContractStatusNotRunning=Not running +ContractStatusRunning=Running +ContractStatusDraft=Draft +ContractStatusValidated=Validated +ContractStatusClosed=Closed +ServiceStatusInitial=Not running +ServiceStatusRunning=Running +ServiceStatusNotLate=Running, not expired +ServiceStatusNotLateShort=Not expired +ServiceStatusLate=Running, expired +ServiceStatusLateShort=Expired +ServiceStatusClosed=Closed +ServicesLegend=Services legend +Contracts=Contracts +Contract=Contract +NoContracts=No contracts +MenuServices=Services +MenuInactiveServices=Services not active +MenuRunningServices=Running services +MenuExpiredServices=Expired services +MenuClosedServices=Closed services +NewContract=New contract +AddContract=Add contract +SearchAContract=Search a contract +DeleteAContract=Delete a contract +CloseAContract=Close a contract +ConfirmDeleteAContract=Are you sure you want to delete this contract and all its services ? +ConfirmValidateContract=Are you sure you want to validate this contract under name %s ? +ConfirmCloseContract=This will close all services (active or not). Are you sure you want to close this contract ? +ConfirmCloseService=Are you sure you want to close this service with date %s ? +ValidateAContract=Validate a contract +ActivateService=Activate service +ConfirmActivateService=Are you sure you want to activate this service with date %s ? +RefContract=Contract reference +DateContract=Contract date +DateServiceActivate=Service activation date +DateServiceUnactivate=Service deactivation date +DateServiceStart=Date for beginning of service +DateServiceEnd=Date for end of service +ShowContract=Show contract +ListOfServices=List of services +ListOfInactiveServices=List of not active services +ListOfExpiredServices=List of expired active services +ListOfClosedServices=List of closed services +ListOfRunningContractsLines=List of running contract lines +ListOfRunningServices=List of running services +NotActivatedServices=Inactive services (among validated contracts) +BoardNotActivatedServices=Services to activate among validated contracts +LastContracts=Last %s modified contracts +LastActivatedServices=Last %s activated services +LastModifiedServices=Last %s modified services +EditServiceLine=Edit service line +ContractStartDate=Start date +ContractEndDate=End date +DateStartPlanned=Planned start date +DateStartPlannedShort=Planned start date +DateEndPlanned=Planned end date +DateEndPlannedShort=Planned end date +DateStartReal=Real start date +DateStartRealShort=Real start date +DateEndReal=Real end date +DateEndRealShort=Real end date +NbOfServices=Nb of services +CloseService=Close service +ServicesNomberShort=%s service(s) +RunningServices=Running services +BoardRunningServices=Expired running services +ServiceStatus=Status of service +DraftContracts=Drafts contracts +CloseRefusedBecauseOneServiceActive=Contract can't be closed as ther is at least one open service on it +CloseAllContracts=Close all contract lines +DeleteContractLine=Delete a contract line +ConfirmDeleteContractLine=Are you sure you want to delete this contract line ? +MoveToAnotherContract=Move service into another contract. +ConfirmMoveToAnotherContract=I choosed new target contract and confirm I want to move this service into this contract. +ConfirmMoveToAnotherContractQuestion=Choose in which existing contract (of same third party), you want to move this service to ? +PaymentRenewContractId=Renew contract line (number %s) +ExpiredSince=Expiration date +RelatedContracts=Related contracts +NoExpiredServices=No expired active services +ListOfServicesToExpireWithDuration=List of Services to expire in %s days +ListOfServicesToExpireWithDurationNeg=List of Services expired from more than %s days +ListOfServicesToExpire=List of Services to expire +NoteListOfYourExpiredServices=This list contains only services of contracts for third parties you are linked to as a sale representative. +StandardContractsTemplate=Standard contracts template +ContactNameAndSignature=For %s, name and signature: ##### Types de contacts ##### -# TypeContact_contrat_internal_SALESREPSIGN=Sales representative signing contract -# TypeContact_contrat_internal_SALESREPFOLL=Sales representative following-up contract -# TypeContact_contrat_external_BILLING=Billing customer contact -# TypeContact_contrat_external_CUSTOMER=Follow-up customer contact -# TypeContact_contrat_external_SALESREPSIGN=Signing contract customer contact -# Error_CONTRACT_ADDON_NotDefined=Constant CONTRACT_ADDON not defined +TypeContact_contrat_internal_SALESREPSIGN=Sales representative signing contract +TypeContact_contrat_internal_SALESREPFOLL=Sales representative following-up contract +TypeContact_contrat_external_BILLING=Billing customer contact +TypeContact_contrat_external_CUSTOMER=Follow-up customer contact +TypeContact_contrat_external_SALESREPSIGN=Signing contract customer contact +Error_CONTRACT_ADDON_NotDefined=Constant CONTRACT_ADDON not defined diff --git a/htdocs/langs/ko_KR/exports.lang b/htdocs/langs/ko_KR/exports.lang index e2bce5ba45b..dbcd9b0c858 100644 --- a/htdocs/langs/ko_KR/exports.lang +++ b/htdocs/langs/ko_KR/exports.lang @@ -1,134 +1,134 @@ # Dolibarr language file - Source file is en_US - exports -# ExportsArea=Exports area -# ImportArea=Import area -# NewExport=New export -# NewImport=New import -# ExportableDatas=Exportable dataset -# ImportableDatas=Importable dataset -# SelectExportDataSet=Choose dataset you want to export... -# SelectImportDataSet=Choose dataset you want to import... -# SelectExportFields=Choose fields you want to export, or select a predefined export profile -# SelectImportFields=Choose source file fields you want to import and their target field in database by moving them up and down with anchor %s, or select a predefined import profil: -# NotImportedFields=Fields of source file not imported -# SaveExportModel=Save this export profile if you plan to reuse it later... -# SaveImportModel=Save this import profile if you plan to reuse it later... -# ExportModelName=Export profile name -# ExportModelSaved=Export profile saved under name %s. -# ExportableFields=Exportable fields -# ExportedFields=Exported fields -# ImportModelName=Import profile name -# ImportModelSaved=Import profile saved under name %s. -# ImportableFields=Importable fields -# ImportedFields=Imported fields -# DatasetToExport=Dataset to export -# DatasetToImport=Import file into dataset -# NoDiscardedFields=No fields in source file are discarded -# Dataset=Dataset -# ChooseFieldsOrdersAndTitle=Choose fields order... -# FieldsOrder=Fields order -# FieldsTitle=Fields title -# FieldOrder=Field order -# FieldTitle=Field title -# ChooseExportFormat=Choose export format -# NowClickToGenerateToBuildExportFile=Now, select file format in combo box and click on "Generate" to build export file... -# AvailableFormats=Available formats -# LibraryShort=Library -# LibraryUsed=Library used +ExportsArea=Exports area +ImportArea=Import area +NewExport=New export +NewImport=New import +ExportableDatas=Exportable dataset +ImportableDatas=Importable dataset +SelectExportDataSet=Choose dataset you want to export... +SelectImportDataSet=Choose dataset you want to import... +SelectExportFields=Choose fields you want to export, or select a predefined export profile +SelectImportFields=Choose source file fields you want to import and their target field in database by moving them up and down with anchor %s, or select a predefined import profile: +NotImportedFields=Fields of source file not imported +SaveExportModel=Save this export profile if you plan to reuse it later... +SaveImportModel=Save this import profile if you plan to reuse it later... +ExportModelName=Export profile name +ExportModelSaved=Export profile saved under name %s. +ExportableFields=Exportable fields +ExportedFields=Exported fields +ImportModelName=Import profile name +ImportModelSaved=Import profile saved under name %s. +ImportableFields=Importable fields +ImportedFields=Imported fields +DatasetToExport=Dataset to export +DatasetToImport=Import file into dataset +NoDiscardedFields=No fields in source file are discarded +Dataset=Dataset +ChooseFieldsOrdersAndTitle=Choose fields order... +FieldsOrder=Fields order +FieldsTitle=Fields title +FieldOrder=Field order +FieldTitle=Field title +ChooseExportFormat=Choose export format +NowClickToGenerateToBuildExportFile=Now, select file format in combo box and click on "Generate" to build export file... +AvailableFormats=Available formats +LibraryShort=Library +LibraryUsed=Library used LibraryVersion=버전 -# Step=Step -# FormatedImport=Import assistant -# FormatedImportDesc1=This area allows to import personalized data, using an assistant to help you in process without technical knowledge. -# FormatedImportDesc2=First step is to choose a king of data you want to load, then file to load, then to choose which fields you want to load. -# FormatedExport=Export assistant -# FormatedExportDesc1=This area allows to export personalized data, using an assistant to help you in process without technical knowledge. -# FormatedExportDesc2=First step is to choose a predefined dataset, then to choose which fields you want in your result files, and which order. -# FormatedExportDesc3=When data to export are selected, you can define output file format you want to export your data to. -# Sheet=Sheet -# NoImportableData=No importable data (no module with definitions to allow data imports) -# FileSuccessfullyBuilt=Export file generated -# SQLUsedForExport=SQL Request used to build export file -# LineId=Id of line -# LineDescription=Description of line -# LineUnitPrice=Unit price of line -# LineVATRate=VAT Rate of line -# LineQty=Quantity for line -# LineTotalHT=Amount net of tax for line -# LineTotalTTC=Amount with tax for line -# LineTotalVAT=Amount of VAT for line -# TypeOfLineServiceOrProduct=Type of line (0=product, 1=service) -# FileWithDataToImport=File with data to import -# FileToImport=Source file to import -# FileMustHaveOneOfFollowingFormat=File to import must have one of following format -# DownloadEmptyExample=Download example of empty source file -# ChooseFormatOfFileToImport=Choose file format to use as import file format by clicking on picto %s to select it... -# ChooseFileToImport=Upload file then click on picto %s to select file as source import file... -# SourceFileFormat=Source file format -# FieldsInSourceFile=Fields in source file -# FieldsInTargetDatabase=Target fields in Dolibarr database (bold=mandatory) -# Field=Field -# NoFields=No fields -# MoveField=Move field column number %s -# ExampleOfImportFile=Example_of_import_file -# SaveImportProfile=Save this import profile -# ErrorImportDuplicateProfil=Failed to save this import profile with this name. An existing profile already exists with this name. -# ImportSummary=Import setup summary -# TablesTarget=Targeted tables -# FieldsTarget=Targeted fields -# TableTarget=Targeted table -# FieldTarget=Targeted field -# FieldSource=Source field -# DoNotImportFirstLine=Do not import first line of source file -# NbOfSourceLines=Number of lines in source file -# NowClickToTestTheImport=Check import parameters you have defined. If they are correct, click on button "%s" to launch a simulation of import process (no data will be changed in your database, it's only a simulation for the moment)... -# RunSimulateImportFile=Launch the import simulation -# FieldNeedSource=This fiels in database require a data from source file -# SomeMandatoryFieldHaveNoSource=Some mandatory fields have no source from data file -# InformationOnSourceFile=Information on source file -# InformationOnTargetTables=Information on target fields -# SelectAtLeastOneField=Switch at least one source field in the column of fields to export -# SelectFormat=Choose this import file format -# RunImportFile=Launch import file -# NowClickToRunTheImport=Check result of import simulation. If everything is ok, launch the definitive import. -# DataLoadedWithId=All data will be loaded with the following import id: %s -# ErrorMissingMandatoryValue=Mandatory data is empty in source file for field %s. -# TooMuchErrors=There is still %s other source lines with errors but output has been limited. -# TooMuchWarnings=There is still %s other source lines with warnings but output has been limited. -# EmptyLine=Empty line (will be discarded) -# CorrectErrorBeforeRunningImport=You must first correct all errors before running definitive import. -# FileWasImported=File was imported with number %s. -# YouCanUseImportIdToFindRecord=You can find all imported records in your database by filtering on field import_key='%s'. -# NbOfLinesOK=Number of lines with no errors and no warnings: %s. -# NbOfLinesImported=Number of lines successfully imported: %s. -# DataComeFromNoWhere=Value to insert comes from nowhere in source file. -# DataComeFromFileFieldNb=Value to insert comes from field number %s in source file. -# DataComeFromIdFoundFromRef=Value that comes from field number %s of source file will be used to find id of parent object to use (So the objet %s that has the ref. from source file must exists into Dolibarr). -# DataComeFromIdFoundFromCodeId=Code that comes from field number %s of source file will be used to find id of parent object to use (So the code from source file must exists into dictionary %s). Note that if you know id, you can also use it into source file instead of code. Import should work in both cases. -# DataIsInsertedInto=Data coming from source file will be inserted into the following field: -# DataIDSourceIsInsertedInto=The id of parent object found using the data in source file, will be inserted into the following field: -# DataCodeIDSourceIsInsertedInto=The id of parent line found from code, will be inserted into following field: -# SourceRequired=Data value is mandatory -# SourceExample=Example of possible data value -# ExampleAnyRefFoundIntoElement=Any ref found for element %s -# ExampleAnyCodeOrIdFoundIntoDictionary=Any code (or id) found into dictionary %s -# CSVFormatDesc=Comma Separated Value file format (.csv).
    This is a text file format where fields are separated by separator [ %s ]. If separator is found inside a field content, field is rounded by round character [ %s ]. Escape character to escape round character is [ %s ]. -# Excel95FormatDesc=Excel file format (.xls)
    This is native Excel 95 format (BIFF5). -# Excel2007FormatDesc=Excel file format (.xlsx)
    This is native Excel 2007 format (SpreadsheetML). -# TsvFormatDesc=Tab Separated Value file format (.tsv)
    This is a text file format where fields are separated by a tabulator [tab]. -# ExportFieldAutomaticallyAdded=Field %s was automatically added. It will avoid you to have similar lines to be treated as duplicate records (with this field added, all lines will own their own id and will differ). -# CsvOptions=Csv Options -# Separator=Separator -# Enclosure=Enclosure -# SuppliersProducts=Suppliers Products -# BankCode=Bank code -# DeskCode=Desk code -# BankAccountNumber=Account number -# BankAccountNumberKey=Key -# SpecialCode=Special code -# ExportStringFilter=%% allows replacing one or more characters in the text -# ExportDateFilter='YYYY' 'YYYYMM' 'YYYYMMDD': filters by one year/month/day
    'YYYY+YYYY' 'YYYYMM+YYYYMM' 'YYYYMMDD+YYYYMMDD': filters over a range of years/months/days
    '>YYYY' '>YYYYMM' '>YYYYMMDD': filters on the following years/months/days
    '<YYYY' '<YYYYMM' '<YYYYMMDD': filters on the previous years/months/days -# ExportNumericFilter='NNNNN' filters by one value
    'NNNNN+NNNNN' filters over a range of values
    '>NNNNN' filters by lower values
    '>NNNNN' filters by higher values +Step=Step +FormatedImport=Import assistant +FormatedImportDesc1=This area allows to import personalized data, using an assistant to help you in process without technical knowledge. +FormatedImportDesc2=First step is to choose a king of data you want to load, then file to load, then to choose which fields you want to load. +FormatedExport=Export assistant +FormatedExportDesc1=This area allows to export personalized data, using an assistant to help you in process without technical knowledge. +FormatedExportDesc2=First step is to choose a predefined dataset, then to choose which fields you want in your result files, and which order. +FormatedExportDesc3=When data to export are selected, you can define output file format you want to export your data to. +Sheet=Sheet +NoImportableData=No importable data (no module with definitions to allow data imports) +FileSuccessfullyBuilt=Export file generated +SQLUsedForExport=SQL Request used to build export file +LineId=Id of line +LineDescription=Description of line +LineUnitPrice=Unit price of line +LineVATRate=VAT Rate of line +LineQty=Quantity for line +LineTotalHT=Amount net of tax for line +LineTotalTTC=Amount with tax for line +LineTotalVAT=Amount of VAT for line +TypeOfLineServiceOrProduct=Type of line (0=product, 1=service) +FileWithDataToImport=File with data to import +FileToImport=Source file to import +FileMustHaveOneOfFollowingFormat=File to import must have one of following format +DownloadEmptyExample=Download example of empty source file +ChooseFormatOfFileToImport=Choose file format to use as import file format by clicking on picto %s to select it... +ChooseFileToImport=Upload file then click on picto %s to select file as source import file... +SourceFileFormat=Source file format +FieldsInSourceFile=Fields in source file +FieldsInTargetDatabase=Target fields in Dolibarr database (bold=mandatory) +Field=Field +NoFields=No fields +MoveField=Move field column number %s +ExampleOfImportFile=Example_of_import_file +SaveImportProfile=Save this import profile +ErrorImportDuplicateProfil=Failed to save this import profile with this name. An existing profile already exists with this name. +ImportSummary=Import setup summary +TablesTarget=Targeted tables +FieldsTarget=Targeted fields +TableTarget=Targeted table +FieldTarget=Targeted field +FieldSource=Source field +DoNotImportFirstLine=Do not import first line of source file +NbOfSourceLines=Number of lines in source file +NowClickToTestTheImport=Check import parameters you have defined. If they are correct, click on button "%s" to launch a simulation of import process (no data will be changed in your database, it's only a simulation for the moment)... +RunSimulateImportFile=Launch the import simulation +FieldNeedSource=This field requires data from the source file +SomeMandatoryFieldHaveNoSource=Some mandatory fields have no source from data file +InformationOnSourceFile=Information on source file +InformationOnTargetTables=Information on target fields +SelectAtLeastOneField=Switch at least one source field in the column of fields to export +SelectFormat=Choose this import file format +RunImportFile=Launch import file +NowClickToRunTheImport=Check result of import simulation. If everything is ok, launch the definitive import. +DataLoadedWithId=All data will be loaded with the following import id: %s +ErrorMissingMandatoryValue=Mandatory data is empty in source file for field %s. +TooMuchErrors=There is still %s other source lines with errors but output has been limited. +TooMuchWarnings=There is still %s other source lines with warnings but output has been limited. +EmptyLine=Empty line (will be discarded) +CorrectErrorBeforeRunningImport=You must first correct all errors before running definitive import. +FileWasImported=File was imported with number %s. +YouCanUseImportIdToFindRecord=You can find all imported records in your database by filtering on field import_key='%s'. +NbOfLinesOK=Number of lines with no errors and no warnings: %s. +NbOfLinesImported=Number of lines successfully imported: %s. +DataComeFromNoWhere=Value to insert comes from nowhere in source file. +DataComeFromFileFieldNb=Value to insert comes from field number %s in source file. +DataComeFromIdFoundFromRef=Value that comes from field number %s of source file will be used to find id of parent object to use (So the objet %s that has the ref. from source file must exists into Dolibarr). +DataComeFromIdFoundFromCodeId=Code that comes from field number %s of source file will be used to find id of parent object to use (So the code from source file must exists into dictionary %s). Note that if you know id, you can also use it into source file instead of code. Import should work in both cases. +DataIsInsertedInto=Data coming from source file will be inserted into the following field: +DataIDSourceIsInsertedInto=The id of parent object found using the data in source file, will be inserted into the following field: +DataCodeIDSourceIsInsertedInto=The id of parent line found from code, will be inserted into following field: +SourceRequired=Data value is mandatory +SourceExample=Example of possible data value +ExampleAnyRefFoundIntoElement=Any ref found for element %s +ExampleAnyCodeOrIdFoundIntoDictionary=Any code (or id) found into dictionary %s +CSVFormatDesc=Comma Separated Value file format (.csv).
    This is a text file format where fields are separated by separator [ %s ]. If separator is found inside a field content, field is rounded by round character [ %s ]. Escape character to escape round character is [ %s ]. +Excel95FormatDesc=Excel file format (.xls)
    This is native Excel 95 format (BIFF5). +Excel2007FormatDesc=Excel file format (.xlsx)
    This is native Excel 2007 format (SpreadsheetML). +TsvFormatDesc=Tab Separated Value file format (.tsv)
    This is a text file format where fields are separated by a tabulator [tab]. +ExportFieldAutomaticallyAdded=Field %s was automatically added. It will avoid you to have similar lines to be treated as duplicate records (with this field added, all lines will own their own id and will differ). +CsvOptions=Csv Options +Separator=Separator +Enclosure=Enclosure +SuppliersProducts=Suppliers Products +BankCode=Bank code +DeskCode=Desk code +BankAccountNumber=Account number +BankAccountNumberKey=Key +SpecialCode=Special code +ExportStringFilter=%% allows replacing one or more characters in the text +ExportDateFilter='YYYY' 'YYYYMM' 'YYYYMMDD': filters by one year/month/day
    'YYYY+YYYY' 'YYYYMM+YYYYMM' 'YYYYMMDD+YYYYMMDD': filters over a range of years/months/days
    '>YYYY' '>YYYYMM' '>YYYYMMDD': filters on the following years/months/days
    '<YYYY' '<YYYYMM' '<YYYYMMDD': filters on the previous years/months/days +ExportNumericFilter='NNNNN' filters by one value
    'NNNNN+NNNNN' filters over a range of values
    '>NNNNN' filters by lower values
    '>NNNNN' filters by higher values ## filters -# SelectFilterFields=If you want to filter on some values, just input values here. -# FilterableFields=Champs Filtrables -# FilteredFields=Filtered fields -# FilteredFieldsValues=Value for filter +SelectFilterFields=If you want to filter on some values, just input values here. +FilterableFields=Champs Filtrables +FilteredFields=Filtered fields +FilteredFieldsValues=Value for filter diff --git a/htdocs/langs/ko_KR/holiday.lang b/htdocs/langs/ko_KR/holiday.lang index 0c755ca3301..da03299e0da 100644 --- a/htdocs/langs/ko_KR/holiday.lang +++ b/htdocs/langs/ko_KR/holiday.lang @@ -8,7 +8,6 @@ NotActiveModCP=You must enable the module holidays to view this page. NotConfigModCP=You must configure the module holidays to view this page. To do this, click here . NoCPforUser=You don't have a demand for holidays. AddCP=Apply for holidays -CPErrorSQL=An SQL error occurred: Employe=Employee DateDebCP=Start date DateFinCP=End date diff --git a/htdocs/langs/ko_KR/languages.lang b/htdocs/langs/ko_KR/languages.lang index 2670c212100..e01ea8e6c44 100644 --- a/htdocs/langs/ko_KR/languages.lang +++ b/htdocs/langs/ko_KR/languages.lang @@ -19,6 +19,7 @@ Language_en_SA=영어 (사우디 아라비아) Language_en_US=영어 (미국) Language_en_ZA=영어 (남아프리카 공화국) Language_es_ES=스페인어 +Language_es_DO=Spanish (Dominican Republic) Language_es_AR=스페인어 (아르헨티나) Language_es_CL=Spanish (Chile) Language_es_HN=스페인어 (온두라스) @@ -38,6 +39,7 @@ Language_fr_NC=불어 (뉴 칼레도니아) Language_he_IL=히브리어 Language_hr_HR=Horvātijas Language_hu_HU=헝가리의 +Language_id_ID=Indonesian Language_is_IS=아이슬란드의 Language_it_IT=이탈리아의 Language_ja_JP=일본의 diff --git a/htdocs/langs/ko_KR/mails.lang b/htdocs/langs/ko_KR/mails.lang index df003157ff2..6c9a445d4c1 100644 --- a/htdocs/langs/ko_KR/mails.lang +++ b/htdocs/langs/ko_KR/mails.lang @@ -79,6 +79,7 @@ MailtoEMail=Hyper link to email ActivateCheckRead=Allow to use the "Unsubcribe" link ActivateCheckReadKey=Key use to encrypt URL use for "Read Receipt" and "Unsubcribe" feature EMailSentToNRecipients=EMail sent to %s recipients. +XTargetsAdded=%s recipients added into target list EachInvoiceWillBeAttachedToEmail=A document using default invoice document template will be created and attached to each email. MailTopicSendRemindUnpaidInvoices=Reminder of invoice %s (%s) SendRemind=Send reminder by EMails diff --git a/htdocs/langs/ko_KR/main.lang b/htdocs/langs/ko_KR/main.lang index 148ae4c9db6..b204c78ad99 100644 --- a/htdocs/langs/ko_KR/main.lang +++ b/htdocs/langs/ko_KR/main.lang @@ -551,6 +551,7 @@ MailSentBy=Email sent by TextUsedInTheMessageBody=Email body SendAcknowledgementByMail=Send Ack. by email NoEMail=No email +NoMobilePhone=No mobile phone Owner=Owner DetectedVersion=Detected version FollowingConstantsWillBeSubstituted=The following constants will be replaced with the corresponding value. diff --git a/htdocs/langs/ko_KR/products.lang b/htdocs/langs/ko_KR/products.lang index e56b9cc59c2..37012349b02 100644 --- a/htdocs/langs/ko_KR/products.lang +++ b/htdocs/langs/ko_KR/products.lang @@ -28,8 +28,10 @@ ProductsAndServicesStatistics=Products and Services statistics ProductsStatistics=Products statistics ProductsOnSell=Available products ProductsNotOnSell=Obsolete products +ProductsOnSellAndOnBuy=Products not for sale nor purchase ServicesOnSell=Available services ServicesNotOnSell=Obsolete services +ServicesOnSellAndOnBuy=Services not for sale nor purchase InternalRef=Internal reference LastRecorded=Last products/services on sell recorded LastRecordedProductsAndServices=Last %s recorded products/services @@ -70,6 +72,8 @@ PublicPrice=Public price CurrentPrice=Current price NewPrice=New price MinPrice=Minim. selling price +MinPriceHT=Minim. selling price (net of tax) +MinPriceTTC=Minim. selling price (inc. tax) CantBeLessThanMinPrice=The selling price can't be lower than minimum allowed for this product (%s without tax). This message can also appears if you type a too important discount. ContractStatus=Contract status ContractStatusClosed=Closed @@ -179,6 +183,7 @@ ProductIsUsed=This product is used NewRefForClone=Ref. of new product/service CustomerPrices=Customers prices SuppliersPrices=Suppliers prices +SuppliersPricesOfProductsOrServices=Suppliers prices (of products or services) CustomCode=Customs code CountryOrigin=Origin country HiddenIntoCombo=Hidden into select lists @@ -208,6 +213,7 @@ CostPmpHT=Net total VWAP ProductUsedForBuild=Auto consumed by production ProductBuilded=Production completed ProductsMultiPrice=Product multi-price +ProductsOrServiceMultiPrice=Customers prices (of products or services, multi-prices) ProductSellByQuarterHT=Products turnover quarterly VWAP ServiceSellByQuarterHT=Services turnover quarterly VWAP Quarter1=1st. Quarter diff --git a/htdocs/langs/ko_KR/shop.lang b/htdocs/langs/ko_KR/shop.lang index b6cd78b5028..156af426bb0 100644 --- a/htdocs/langs/ko_KR/shop.lang +++ b/htdocs/langs/ko_KR/shop.lang @@ -1,10 +1,11 @@ # Dolibarr language file - Source file is en_US - shop -# Shop=Shop -# ShopWeb=Web Shop -# LastOrders=Last orders -# OnStandBy=On standby -# TreatmentInProgress=Treatment in progress -# LastCustomers=Last customers -# OSCommerceShop=OSCommerce shop -# OSCommerce=OSCommerce -# AddProd=Sell online +FailedConnectDBCheckModuleSetup=Failed to connect to oscommerce database. Check your module setup +Shop=Shop +ShopWeb=Web Shop +LastOrders=Last orders +OnStandBy=On standby +TreatmentInProgress=Treatment in progress +LastCustomers=Last customers +OSCommerceShop=OSCommerce shop +OSCommerce=OSCommerce +AddProd=Sell online diff --git a/htdocs/langs/ko_KR/stocks.lang b/htdocs/langs/ko_KR/stocks.lang index d0b8fb28cc5..fa82c8a1f40 100644 --- a/htdocs/langs/ko_KR/stocks.lang +++ b/htdocs/langs/ko_KR/stocks.lang @@ -112,6 +112,7 @@ ReplenishmentOrdersDesc=This is list of all opened supplier orders Replenishments=Replenishments NbOfProductBeforePeriod=Quantity of product %s in stock before selected period (< %s) NbOfProductAfterPeriod=Quantity of product %s in stock after selected period (> %s) +MassMovement=Mass movement MassStockMovement=Mass stock movement SelectProductInAndOutWareHouse=Select a product, a quantity, a source warehouse and a target warehouse, then click "%s". Once this is done for all required movements, click onto "%s". RecordMovement=Record transfert diff --git a/htdocs/langs/lt_LT/admin.lang b/htdocs/langs/lt_LT/admin.lang index 681b8719781..f782304c375 100644 --- a/htdocs/langs/lt_LT/admin.lang +++ b/htdocs/langs/lt_LT/admin.lang @@ -116,7 +116,7 @@ LanguageBrowserParameter=Parametro %-as LocalisationDolibarrParameters=Vietos parametrai ClientTZ=Kliento Laiko Juosta (vartotojas) ClientHour=Kliento laikas (vartotojas) -OSTZ=Serverio OS Laiko Juosta +OSTZ=Server OS Time Zone PHPTZ=PHP serverio Laiko Juosta PHPServerOffsetWithGreenwich=PHP serverio nuokrypis nuo Grinvičo (sekundės) ClientOffsetWithGreenwich=Kliento/Brauzerio nuokrypis nuo Grinvičo (sekundės) @@ -233,7 +233,9 @@ OfficialWebSiteFr=Prancūzijos oficiali interneto svetainė OfficialWiki=Dolibarr dokumentai Wiki OfficialDemo=Dolibarr tiesioginis demo OfficialMarketPlace=Oficiali išorinių Modulių/papildinių parduotuvė -OfficialWebHostingService=Oficialios web hosting paslaugos (Cloud hosting) +OfficialWebHostingService=Referenced web hosting services (Cloud hosting) +ReferencedPreferredPartners=Preferred Partners +OtherResources=Autres ressources ForDocumentationSeeWiki=Vartotojo arba kūrėjo dokumentacijos (doc, DUK ...)
    ieškoti Dolibarr Wiki:
    %s ForAnswersSeeForum=Dėl kitų klausimų/pagalbos galite kreiptis į Dolibarr forumą:
    %s HelpCenterDesc1=Ši sritis gali padėti jums gauti Dolibarr Help žinyno palaikymo paslaugą @@ -369,9 +371,9 @@ ExtrafieldSelectList = Pasirinkite iš lentelės ExtrafieldSeparator=Separatorius ExtrafieldCheckBox=Žymimasis langelis ("paukščiukas") ExtrafieldRadio=Opcijų mygtukai -ExtrafieldParamHelpselect=Parametrų sąrašas turi būti kaip raktas, reikšmė

    pavyzdžiui:
    1, reikšmė1
    2, reikšmė2
    3, reikšmė3
    ...

    Siekiant turėti sąrašą, priklausomai nuo kito:
    1, reikšmė1|parent_list_code:parent_key
    2, reikšmė2|parent_list_code:parent_key -ExtrafieldParamHelpcheckbox=Parametrų sąrašas turi būti kaip raktas, reikšmė

    pavyzdžiui:
    1, reikšmė1
    2, reikšmė2
    3, reikšmė3
    ... -ExtrafieldParamHelpradio=Parametrų sąrašas turi būti kaip raktas, reikšmė

    pavyzdžiui:
    1, reikšmė1
    2, reikšmė2
    3, reikšmė3
    ... +ExtrafieldParamHelpselect=Parameters list have to be like key,value

    for example :
    1,value1
    2,value2
    3,value3
    ...

    In order to have the list depending on another :
    1,value1|parent_list_code:parent_key
    2,value2|parent_list_code:parent_key +ExtrafieldParamHelpcheckbox=Parameters list have to be like key,value

    for example :
    1,value1
    2,value2
    3,value3
    ... +ExtrafieldParamHelpradio=Parameters list have to be like key,value

    for example :
    1,value1
    2,value2
    3,value3
    ... ExtrafieldParamHelpsellist=Parametrų sąrašas ateina iš lentelės
    Sintaksė: table_name:label_field:id_field::filter
    Pavyzdys: c_typent:libelle:id::filter

    filtras gali būti paprastas bandymas (pvz., aktyvi=1) rodyti tik aktyvią reikšmę
    jei norite filtruoti extrafield laukelius, naudokite syntaksę: extra.fieldcode=... (kur laukelio kodas yra extrafield kodas)

    Siekiant turėti sąrašą, priklausomą nuo kito:
    c_typent:libelle:id:parent_list_code|parent_column:filter LibraryToBuildPDF=Biblioteka naudojama sukurti PDF WarningUsingFPDF=Įspėjimas: Jūsų conf.php yra ribojanti direktyva dolibarr_pdf_force_fpdf=1. Tai reiškia, kad jūs naudojate FPDF biblioteką PDF failų generavimui. Ši biblioteka yra sena ir nepalaiko daug funkcijų (Unicode, vaizdo skaidrumo, kirilicos, arabų ir Azijos kalbų, ...), todėl galite patirti klaidų generuojant PDF.
    Norėdami išspręsti šią problemą ir turėti visapusišką palaikymą generuojant PDF, atsisiųskite TCPDF library , tada pažymėkite (comment) arba pašalinkite eilutę $dolibarr_pdf_force_fpdf=1 ir įdėkite vietoje jos $dolibarr_lib_TCPDF_PATH='path_to_TCPDF_dir' @@ -472,7 +474,7 @@ Module410Desc=Web kalendoriaus integracija Module500Name=Specialiosios išlaidos (mokesčiai, socialinės įmokos, dividendai) Module500Desc=Spec. išlaidų valdymas, pavyzdžiui: mokesčių, socialinių įmokų, dividendų ir atlyginimų Module510Name=Atlyginimai -Module510Desc=Darbuotojų atlyginimų ir išmokų valdymas +Module510Desc=Management of employees salaries and payments Module600Name=Pranešimai Module600Desc=Siųsti pranešimus elektroniniu paštu apie kai kokius Dolibarr verslo įvykius į trečiųjų šalių kontaktus Module700Name=Parama @@ -495,15 +497,15 @@ Module2400Name=Darbotvarkė Module2400Desc=Renginių/užduočių ir darbotvarkės valdymas Module2500Name=Elektroninis Turinio Valdymas Module2500Desc=Išsaugoti dokumentus ir dalintis jais -Module2600Name= WebServices -Module2600Desc= Įjungti Dolibarr interneto paslaugas serveryje -Module2700Name= Gravatar -Module2700Desc= Naudokite Gravatar interneto paslaugą (www.gravatar.com) kad parodyti nuotrauką vartotojams/nariams (surandami prie jų laiškų). Reikalinga interneto prieiga. +Module2600Name=WebServices +Module2600Desc=Įjungti Dolibarr interneto paslaugas serveryje +Module2700Name=Gravatar +Module2700Desc=Naudokite Gravatar interneto paslaugą (www.gravatar.com) kad parodyti nuotrauką vartotojams/nariams (surandami prie jų laiškų). Reikalinga interneto prieiga. Module2800Desc=FTP klientas -Module2900Name= GeoIPMaxmind -Module2900Desc= GeoIP MaxMind konvertavimo galimybes -Module3100Name= Skype -Module3100Desc= Pridėti Skype mygtuką į šalininkų/trečiųjų šalių/adresatų kortelę +Module2900Name=GeoIPMaxmind +Module2900Desc=GeoIP MaxMind konvertavimo galimybes +Module3100Name=Skype +Module3100Desc=Pridėti Skype mygtuką į šalininkų/trečiųjų šalių/adresatų kortelę Module5000Name=Multi įmonė Module5000Desc=Jums leidžiama valdyti kelias įmones Module6000Name=Darbo eiga @@ -681,6 +683,10 @@ Permission401=Skaityti nuolaidas Permission402=Sukurti/keisti nuolaidas Permission403=Patvirtinti nuolaidas Permission404=Ištrinti nuolaidas +Permission510=Read Salaries +Permission512=Create/modify salaries +Permission514=Delete salaries +Permission517=Export salaries Permission531=Skaityti paslaugas Permission532=Sukurti/keisti paslaugas Permission534=Ištrinti paslaugas @@ -999,7 +1005,7 @@ ExtraFieldsSupplierOrders=Papildomi požymiai (užsakymai) ExtraFieldsSupplierInvoices=Papildomi požymiai (sąskaitos-faktūros) ExtraFieldsProject=Papildomi požymiai (projektai) ExtraFieldsProjectTask=Papildomi požymiai (užduotys) -ExtraFieldHasWrongValue=Požymis %s turi klaidingą reikšmę. +ExtraFieldHasWrongValue=Attribute %s has a wrong value. AlphaNumOnlyCharsAndNoSpace=Tik raidiniai skaitmeniniai simboliai be tarpų AlphaNumOnlyLowerCharsAndNoSpace=Tik raidiniai-skaitmeniniai simboliai, mažosiomis raidėmis, be tarpų SendingMailSetup=El. pašto siuntinių nuostatos @@ -1018,13 +1024,13 @@ SuhosinSessionEncrypt=Sesijų saugykla užšifruota Suhosin ConditionIsCurrently=Dabartinė būklė yra %s TestNotPossibleWithCurrentBrowsers=Automatinė detekcija negalima YouUseBestDriver=Jūs naudojate tvarkyklę %s, kuri yra geriausia tvarkyklė prieinama šiuo metu. -YouDoNotUseBestDriver=Jūs naudojate diską %s, o tvarkyklė %s rekomenduojama. +YouDoNotUseBestDriver=You use drive %s but driver %s is recommended. NbOfProductIsLowerThanNoPb=Turite tik %s produktus/paslaugas duomenų bazėje. Tam nereikia jokio ypatingo optimizavimo. SearchOptim=Paieškos optimizavimas YouHaveXProductUseSearchOptim=Jūs turite %s produktą duomenų bazėje. Jums reikia pridėti konstantą PRODUCT_DONOTSEARCH_ANYWHERE prie 1 į Pagrindinis-Nustatymai-Kiti. Jūs apribojate paiešką eilutės pradžia ir nustatote galimybę duomenų bazėjė naudoti indeksą ir jūs turėtumėte gauti greitesnius atsakymus į paieškos užklausas. BrowserIsOK=Jūs naudojate interneto naršyklę %s. Ši naršyklė yra gera saugumo ir charakteristikų požiūriu. BrowserIsKO=Jūs naudojate interneto naršyklę %s. Ši naršyklė yra žinoma, kaip blogas pasirinkimas saugumo, charakteristikų ir patikimumo požiūriu. Mes recommanduojame Jums Firefox, Chrome, Opera ar Safari. -XDebugInstalled=Xdebug yra įkeltas +XDebugInstalled=XDebug is loaded. XCacheInstalled=Xcache yra įkelta. AddRefInList=Rodyti kliento/tiekėjo nuorodą į sąrašą (pasirinkite sąrašą arba "iškrentantį" sąrašą) ir daugumą hypernuorodų FieldEdition=Lauko %s redagavimas @@ -1073,7 +1079,7 @@ WebCalServer=Kalendoriaus duomenų bazės talpinimas serveryje WebCalDatabaseName=Duomenų bazės pavadinimas WebCalUser=Vartotojo prieiga prie duomenų bazės WebCalSetupSaved=Web kalendoriaus nuostatos sėkmingai išsaugotos. -WebCalTestOk=Prisijungimas prie serverio '%s' duomenų bazės '%s' su vartotoju '%s' sėkmingas. +WebCalTestOk=Connection to server '%s' on database '%s' with user '%s' successful. WebCalTestKo1=Prisijungimas prie serverio '%s' pavyko, bet duomenų bazė '%s' nepasiekiama. WebCalTestKo2=Prisijungimas prie serverio '%s' vartotojui '%s' nepavyko. WebCalErrorConnectOkButWrongDatabase=Prisijungimas pavyko, bet duomenų bazė nėra Web kalendoriaus duomenų bazė. @@ -1119,7 +1125,7 @@ WatermarkOnDraftProposal=Vandens ženklas komercinių pasiūlymų projekte (nėr OrdersSetup=Užsakymų valdymo nuostatos OrdersNumberingModules=Užsakymų numeracijos modeliai OrdersModelModule=Užsakymo dokumentų modeliai -HideTreadedOrders=Sąraše nerodyti jau apdorotų ar panaikintų užsakymų +HideTreadedOrders=Hide the treated or cancelled orders in the list ValidOrderAfterPropalClosed=Patvirtinti užsakymą, kuriam komercinis pasiūlymas jau pasibaigęs, leidžia be laikino užsakymo. FreeLegalTextOnOrders=Laisvas tekstas užsakymuose WatermarkOnDraftOrders=Vandens ženklas užsakymų projektuose (nėra, jei lapas tuščias) @@ -1214,9 +1220,9 @@ LDAPSynchroKO=Sinchronizacijos bandymas nepavyko LDAPSynchroKOMayBePermissions=Sinchronizacijos bandymas nepavyko. Patikrinkite, ar prisijungimas prie serverio yra tinkamai sukonfigūruotas ir ar leidžiami LDAP atnaujinimai LDAPTCPConnectOK=TCP prisijungimas prie LDAP serverio sėkmingas (Server=%s, Port=%s) LDAPTCPConnectKO=TCP prisijungimas prie LDAP serverio nepavyko (Server=%s, Port=%s) -LDAPBindOK=Prisijungimas/Patvirtinimas prie LDAP serverio sėkmingas (Server=%s, Port=%s, Admin=%s, Password=%s) +LDAPBindOK=Connect/Authentificate to LDAP server successful (Server=%s, Port=%s, Admin=%s, Password=%s) LDAPBindKO=Prisijungimas/Patvirtinimas prie LDAP serverio nepavyko (Server=%s, Port=%s, Admin=%s, Password=%s) -LDAPUnbindSuccessfull=Atsijungimas sėkmingas +LDAPUnbindSuccessfull=Disconnect successful LDAPUnbindFailed=Atsijungimas nepavyko LDAPConnectToDNSuccessfull=Prisijungimas prie DN (%s) sėkmingas LDAPConnectToDNFailed=Prisijungimas prie DN (%s) nepavyko @@ -1273,7 +1279,7 @@ LDAPFieldSidExample=Pavyzdys: objectsid LDAPFieldEndLastSubscription=Prenumeratos pabaigos data LDAPFieldTitle=Pareigos/Funkcijos LDAPFieldTitleExample=Pavyzdys: title -LDAPParametersAreStillHardCoded=LDAP parametrai vis dar kietai užkoduoti (adresato klasėje) +LDAPParametersAreStillHardCoded=LDAP parameters are still hardcoded (in contact class) LDAPSetupNotComplete=LDAP nuostatos nėra pilnos (eiti prie kitų laukelių) LDAPNoUserOrPasswordProvidedAccessIsReadOnly=Nėra pateiktas administratorius arba slaptažodžis. LDAP prieiga bus anoniminė ir tik skaitymo režimu. LDAPDescContact=Šis puslapis leidžia Jums nustatyti LDAP atributų vardą LDAP medyje kiekvienam iš duomenų rastam Dolibarr adresatų sąraše. @@ -1429,7 +1435,7 @@ OptionVATDefault=Standartas OptionVATDebitOption=Pasirinkimo prievolė Debete OptionVatDefaultDesc=PVM atsiranda:
    - prekėms - nuo pristatymo (mes naudojame sąskaitos-faktūros datą)
    - paslaugoms - nuo apmokėjimo OptionVatDebitOptionDesc=PVM atsiranda:
    - prekėms - nuo pristatymo (mes naudojame sąskaito-faktūros datą)
    - paslaugoms - nuo sąskaitos-fakrtūros datos -SummaryOfVatExigibilityUsedByDefault=PVM reikalavimo laikas pagal nutylėjimą yra priklausomas nuo pasirinkto varianto: +SummaryOfVatExigibilityUsedByDefault=Time of VAT exigibility by default according to chosen option: OnDelivery=Pristatymo metu OnPayment=Apmokėjimo metu OnInvoice=Sąskaitos-faktūros pateikimo metu @@ -1446,7 +1452,7 @@ AccountancyCodeBuy=Pirkimo sąskaita. Kodas AgendaSetup=Įvykių ir operacijų modulio nustatymas PasswordTogetVCalExport=Eksporto sąsajos leidimo mygtukas PastDelayVCalExport=Neeksportuoti įvykių senesnių nei -AGENDA_USE_EVENT_TYPE=Naudoti įvykių tipus (valdomi iš meniu Nustatymai -> Žodynas -> Operacijų įvykių tipas) +AGENDA_USE_EVENT_TYPE=Use events types (managed into menu Setup -> Dictionary -> Type of agenda events) ##### ClickToDial ##### ClickToDialDesc=Šis modulis leidžia pridėti ikoną už telefono numerio. Šios ikonos paspaudimas leis kreiptis į serverį su konkrečiu URL adresu Jūsų aprašytu žemiau. Tai gali būti naudojama pvz.: skambinti iš Dolibarr į skambučių centro sistemą, kad paskambinti telefono numeriu per SIP sistemą. ##### Point Of Sales (CashDesk) ##### diff --git a/htdocs/langs/lt_LT/contracts.lang b/htdocs/langs/lt_LT/contracts.lang index def3d8aceff..3e4b6b1f9ad 100644 --- a/htdocs/langs/lt_LT/contracts.lang +++ b/htdocs/langs/lt_LT/contracts.lang @@ -1,99 +1,101 @@ # Dolibarr language file - Source file is en_US - contracts -# ContractsArea=Contracts area -# ListOfContracts=List of contracts -# LastContracts=Last %s modified contracts -# AllContracts=All contracts -# ContractCard=Contract card -# ContractStatus=Contract status -# ContractStatusNotRunning=Not running -# ContractStatusRunning=Running -# ContractStatusDraft=Draft -# ContractStatusValidated=Validated -# ContractStatusClosed=Closed -# ServiceStatusInitial=Not running -# ServiceStatusRunning=Running -# ServiceStatusNotLate=Running, not expired -# ServiceStatusNotLateShort=Not expired -# ServiceStatusLate=Running, expired -# ServiceStatusLateShort=Expired -# ServiceStatusClosed=Closed -# ServicesLegend=Services legend -# Contracts=Contracts -# Contract=Contract -# NoContracts=No contracts -# MenuServices=Services -# MenuInactiveServices=Services not active -# MenuRunningServices=Running services -# MenuExpiredServices=Expired services -# MenuClosedServices=Closed services -# NewContract=New contract -# AddContract=Add contract -# SearchAContract=Search a contract -# DeleteAContract=Delete a contract -# CloseAContract=Close a contract -# ConfirmDeleteAContract=Are you sure you want to delete this contract and all its services ? -# ConfirmValidateContract=Are you sure you want to validate this contract under name %s ? -# ConfirmCloseContract=This will close all services (active or not). Are you sure you want to close this contract ? -# ConfirmCloseService=Are you sure you want to close this service with date %s ? -# ValidateAContract=Validate a contract -# ActivateService=Activate service -# ConfirmActivateService=Are you sure you want to activate this service with date %s ? -# RefContract=Contract reference -# DateContract=Contract date -# DateServiceActivate=Service activation date -# DateServiceUnactivate=Service deactivation date -# DateServiceStart=Date for beginning of service -# DateServiceEnd=Date for end of service -# ShowContract=Show contract -# ListOfServices=List of services -# ListOfInactiveServices=List of not active services -# ListOfExpiredServices=List of expired active services -# ListOfClosedServices=List of closed services -# ListOfRunningContractsLines=List of running contract lines -# ListOfRunningServices=List of running services -# NotActivatedServices=Inactive services (among validated contracts) -# BoardNotActivatedServices=Services to activate among validated contracts -# LastContracts=Last %s modified contracts -# LastActivatedServices=Last %s activated services -# LastModifiedServices=Last %s modified services -# EditServiceLine=Edit service line -# ContractStartDate=Start date -# ContractEndDate=End date -# DateStartPlanned=Planned start date -# DateStartPlannedShort=Planned start date -# DateEndPlanned=Planned end date -# DateEndPlannedShort=Planned end date -# DateStartReal=Real start date -# DateStartRealShort=Real start date -# DateEndReal=Real end date -# DateEndRealShort=Real end date -# NbOfServices=Nb of services -# CloseService=Close service -# ServicesNomberShort=%s service(s) -# RunningServices=Running services -# BoardRunningServices=Expired running services -# ServiceStatus=Status of service -# DraftContracts=Drafts contracts -# CloseRefusedBecauseOneServiceActive=Contract can't be closed as ther is at least one open service on it -# CloseAllContracts=Close all contract lines -# DeleteContractLine=Delete a contract line -# ConfirmDeleteContractLine=Are you sure you want to delete this contract line ? -# MoveToAnotherContract=Move service into another contract. -# ConfirmMoveToAnotherContract=I choosed new target contract and confirm I want to move this service into this contract. -# ConfirmMoveToAnotherContractQuestion=Choose in which existing contract (of same third party), you want to move this service to ? -# PaymentRenewContractId=Renew contract line (number %s) -# ExpiredSince=Expiration date -# RelatedContracts=Related contracts -# NoExpiredServices=No expired active services -# ListOfServicesToExpireWithDuration=List of Services to expire in %s days -# ListOfServicesToExpireWithDurationNeg=List of Services expired from more than %s days -# ListOfServicesToExpire=List of Services to expire -# NoteListOfYourExpiredServices=This list contains only services of contracts for third parties you are linked to as a sale representative. +ContractsArea=Sutarčių sritis +ListOfContracts=Sutarčių sąrašas +LastContracts=Paskutinės %s pakeistos sutartys +AllContracts=Visos sutartys +ContractCard=Sutarties kortelė +ContractStatus=Sutarties būklė +ContractStatusNotRunning=Neveikia +ContractStatusRunning=Veikia +ContractStatusDraft=Projektas +ContractStatusValidated=Pripažintas galiojančiu +ContractStatusClosed=Uždarytas +ServiceStatusInitial=Neveikia +ServiceStatusRunning=Veikia +ServiceStatusNotLate=Veikia, nėra pasibaigęs +ServiceStatusNotLateShort=Nėra pasibaigęs +ServiceStatusLate=Veikia, pasibaigęs +ServiceStatusLateShort=Pasibaigęs +ServiceStatusClosed=Uždarytas +ServicesLegend=Paslaugų legenda +Contracts=Sutartys +Contract=Sutartis +NoContracts=Nėra sutarčių +MenuServices=Paslaugos +MenuInactiveServices=Paslaugos neaktyvios +MenuRunningServices=Veikiančios paslaugas +MenuExpiredServices=Pasibaigusios paslaugos +MenuClosedServices=Uždarytos paslaugos +NewContract=Nauja sutartis +AddContract=Pridėti sutartį +SearchAContract=Ieškoti sutarties +DeleteAContract=Ištrinti sutartį +CloseAContract=Uždaryti sutartį +ConfirmDeleteAContract=Ar tikrai norite ištrinti šią sutartį ir visas jos paslaugas ? +ConfirmValidateContract=Ar tikrai norite patvirtinti šią sutartį su pavadinimu %s ? +ConfirmCloseContract=Tai uždarys visas paslaugas (aktyvias ar ne). Ar tikrai norite uždaryti šią sutartį ? +ConfirmCloseService=Ar tikrai norite uždaryti šią paslaugą su data %s ? +ValidateAContract=Patvirtinti sutartį +ActivateService=Aktyvinti paslaugą +ConfirmActivateService=Ar tikrai norite aktyvinti šią paslaugą su data %s ? +RefContract=Sutarties nuoroda +DateContract=Sutarties data +DateServiceActivate=Paslaugos įjugimo data +DateServiceUnactivate=Paslaugos išjungimo data +DateServiceStart=Data paslaugos pradžiai +DateServiceEnd=Data paslaugos pabaigai +ShowContract=Rodyti sutartį +ListOfServices=Paslaugų sąrašas +ListOfInactiveServices=Neįjungtų paslaugų sąrašas +ListOfExpiredServices=Pasibaigusių aktyvių paslaugų sąrašas +ListOfClosedServices=Uždarytų paslaugų sąrašas +ListOfRunningContractsLines=Veikiančių sutarčių eilučių sąrašas +ListOfRunningServices=Veikiančių paslaugų sąrašas +NotActivatedServices=Neaktyvios paslaugos (tarp patvirtintų sutarčių) +BoardNotActivatedServices=Paslaugos aktyvavimui iš patvirtintų sutarčių +LastContracts=Paskutinės %s pakeistos sutartys +LastActivatedServices=Paskutinės %s aktyvuotos paslaugos +LastModifiedServices=Paskutinės %s modifikuotos paslaugos +EditServiceLine=Redaguoti paslaugos eilutę +ContractStartDate=Pradžios data +ContractEndDate=Pabaigos data +DateStartPlanned=Planuojama pradžios data +DateStartPlannedShort=Planuojama pradžios data +DateEndPlanned=Planuojama pabaigos data +DateEndPlannedShort=Planuojama pabaigos data +DateStartReal=Reali pradžios data +DateStartRealShort=Reali pradžios data +DateEndReal=Reali pabaigos data +DateEndRealShort=Reali pabaigos data +NbOfServices=Paslaugų skaičius +CloseService=Uždaryti paslaugą +ServicesNomberShort=%s paslauga (-os) +RunningServices=Veikiančios paslaugos +BoardRunningServices=Pasibaigusios veikiančios paslaugos +ServiceStatus=Paslaugos būklė +DraftContracts=Sutarčių projektai +CloseRefusedBecauseOneServiceActive=Sutartis negali būti uždaryta, nes joje yra nors viena atvira paslauga +CloseAllContracts=Uždaryti visas sutarties eilutes +DeleteContractLine=Ištrinti sutarties eilutę +ConfirmDeleteContractLine=Ar tikrai norite ištrinti šią sutarties eilutę ? +MoveToAnotherContract=Perkelti paslaugą į kitą sutartį +ConfirmMoveToAnotherContract=Aš pasirinkto naują sutartį ir patvirtinu, kad noriu perkelti šią paslaugą į šią sutartį. +ConfirmMoveToAnotherContractQuestion=Pasirinkite, į kokią galiojančią sutartį (iš tos pačios trečiosios šalies), norite perkelti šią paslaugą ? +PaymentRenewContractId=Atnaujinti sutarties eilutę (numeris %s) +ExpiredSince=Galiojimo data +RelatedContracts=Susijusios sutartys +NoExpiredServices=Nėra pasibaigusių aktyvių paslaugų +ListOfServicesToExpireWithDuration=Paslaugų, kurios baigsis už %s dienų, sąrašas +ListOfServicesToExpireWithDurationNeg=Paslaugų, kurios pasibaigė daugiau kaip prieš %s dienų, sąrašas +ListOfServicesToExpire=Paslaugų, kurios baigiasi, sąrašas +NoteListOfYourExpiredServices=Šiame sąraše yra tik paslaugos sutarčių trečiosioms šalims, su kuriom Jūs susijęs kaip pardavimo atstovas. +StandardContractsTemplate=Standard contracts template +ContactNameAndSignature=For %s, name and signature: ##### Types de contacts ##### -# TypeContact_contrat_internal_SALESREPSIGN=Sales representative signing contract -# TypeContact_contrat_internal_SALESREPFOLL=Sales representative following-up contract -# TypeContact_contrat_external_BILLING=Billing customer contact -# TypeContact_contrat_external_CUSTOMER=Follow-up customer contact -# TypeContact_contrat_external_SALESREPSIGN=Signing contract customer contact -# Error_CONTRACT_ADDON_NotDefined=Constant CONTRACT_ADDON not defined +TypeContact_contrat_internal_SALESREPSIGN=Pardavimų atstovas pasirašantis sutartį +TypeContact_contrat_internal_SALESREPFOLL=Pardavimų atstovo einamoji sutartis +TypeContact_contrat_external_BILLING=Kliento kontaktas atsiskaitymams +TypeContact_contrat_external_CUSTOMER=Einamasis Kliento kontaktas +TypeContact_contrat_external_SALESREPSIGN=Sutartį pasirašančio kliento kontaktas +Error_CONTRACT_ADDON_NotDefined=Konstanta CONTRACT_ADDON nėra apibrėžta diff --git a/htdocs/langs/lt_LT/exports.lang b/htdocs/langs/lt_LT/exports.lang index 09915556286..8d0728dce41 100644 --- a/htdocs/langs/lt_LT/exports.lang +++ b/htdocs/langs/lt_LT/exports.lang @@ -1,134 +1,134 @@ # Dolibarr language file - Source file is en_US - exports -# ExportsArea=Exports area -# ImportArea=Import area -# NewExport=New export -# NewImport=New import -# ExportableDatas=Exportable dataset -# ImportableDatas=Importable dataset -# SelectExportDataSet=Choose dataset you want to export... -# SelectImportDataSet=Choose dataset you want to import... -# SelectExportFields=Choose fields you want to export, or select a predefined export profile -# SelectImportFields=Choose source file fields you want to import and their target field in database by moving them up and down with anchor %s, or select a predefined import profil: -# NotImportedFields=Fields of source file not imported -# SaveExportModel=Save this export profile if you plan to reuse it later... -# SaveImportModel=Save this import profile if you plan to reuse it later... -# ExportModelName=Export profile name -# ExportModelSaved=Export profile saved under name %s. -# ExportableFields=Exportable fields -# ExportedFields=Exported fields -# ImportModelName=Import profile name -# ImportModelSaved=Import profile saved under name %s. -# ImportableFields=Importable fields -# ImportedFields=Imported fields -# DatasetToExport=Dataset to export -# DatasetToImport=Import file into dataset -# NoDiscardedFields=No fields in source file are discarded -# Dataset=Dataset -# ChooseFieldsOrdersAndTitle=Choose fields order... -# FieldsOrder=Fields order -# FieldsTitle=Fields title -# FieldOrder=Field order -# FieldTitle=Field title -# ChooseExportFormat=Choose export format -# NowClickToGenerateToBuildExportFile=Now, select file format in combo box and click on "Generate" to build export file... -# AvailableFormats=Available formats -# LibraryShort=Library -# LibraryUsed=Library used -# LibraryVersion=Version -# Step=Step -# FormatedImport=Import assistant -# FormatedImportDesc1=This area allows to import personalized data, using an assistant to help you in process without technical knowledge. -# FormatedImportDesc2=First step is to choose a king of data you want to load, then file to load, then to choose which fields you want to load. -# FormatedExport=Export assistant -# FormatedExportDesc1=This area allows to export personalized data, using an assistant to help you in process without technical knowledge. -# FormatedExportDesc2=First step is to choose a predefined dataset, then to choose which fields you want in your result files, and which order. -# FormatedExportDesc3=When data to export are selected, you can define output file format you want to export your data to. -# Sheet=Sheet -# NoImportableData=No importable data (no module with definitions to allow data imports) -# FileSuccessfullyBuilt=Export file generated -# SQLUsedForExport=SQL Request used to build export file -# LineId=Id of line -# LineDescription=Description of line -# LineUnitPrice=Unit price of line -# LineVATRate=VAT Rate of line -# LineQty=Quantity for line -# LineTotalHT=Amount net of tax for line -# LineTotalTTC=Amount with tax for line -# LineTotalVAT=Amount of VAT for line -# TypeOfLineServiceOrProduct=Type of line (0=product, 1=service) -# FileWithDataToImport=File with data to import -# FileToImport=Source file to import -# FileMustHaveOneOfFollowingFormat=File to import must have one of following format -# DownloadEmptyExample=Download example of empty source file -# ChooseFormatOfFileToImport=Choose file format to use as import file format by clicking on picto %s to select it... -# ChooseFileToImport=Upload file then click on picto %s to select file as source import file... -# SourceFileFormat=Source file format -# FieldsInSourceFile=Fields in source file -# FieldsInTargetDatabase=Target fields in Dolibarr database (bold=mandatory) -# Field=Field -# NoFields=No fields -# MoveField=Move field column number %s -# ExampleOfImportFile=Example_of_import_file -# SaveImportProfile=Save this import profile -# ErrorImportDuplicateProfil=Failed to save this import profile with this name. An existing profile already exists with this name. -# ImportSummary=Import setup summary -# TablesTarget=Targeted tables -# FieldsTarget=Targeted fields -# TableTarget=Targeted table -# FieldTarget=Targeted field -# FieldSource=Source field -# DoNotImportFirstLine=Do not import first line of source file -# NbOfSourceLines=Number of lines in source file -# NowClickToTestTheImport=Check import parameters you have defined. If they are correct, click on button "%s" to launch a simulation of import process (no data will be changed in your database, it's only a simulation for the moment)... -# RunSimulateImportFile=Launch the import simulation -# FieldNeedSource=This fiels in database require a data from source file -# SomeMandatoryFieldHaveNoSource=Some mandatory fields have no source from data file -# InformationOnSourceFile=Information on source file -# InformationOnTargetTables=Information on target fields -# SelectAtLeastOneField=Switch at least one source field in the column of fields to export -# SelectFormat=Choose this import file format -# RunImportFile=Launch import file -# NowClickToRunTheImport=Check result of import simulation. If everything is ok, launch the definitive import. -# DataLoadedWithId=All data will be loaded with the following import id: %s -# ErrorMissingMandatoryValue=Mandatory data is empty in source file for field %s. -# TooMuchErrors=There is still %s other source lines with errors but output has been limited. -# TooMuchWarnings=There is still %s other source lines with warnings but output has been limited. -# EmptyLine=Empty line (will be discarded) -# CorrectErrorBeforeRunningImport=You must first correct all errors before running definitive import. -# FileWasImported=File was imported with number %s. -# YouCanUseImportIdToFindRecord=You can find all imported records in your database by filtering on field import_key='%s'. -# NbOfLinesOK=Number of lines with no errors and no warnings: %s. -# NbOfLinesImported=Number of lines successfully imported: %s. -# DataComeFromNoWhere=Value to insert comes from nowhere in source file. -# DataComeFromFileFieldNb=Value to insert comes from field number %s in source file. -# DataComeFromIdFoundFromRef=Value that comes from field number %s of source file will be used to find id of parent object to use (So the objet %s that has the ref. from source file must exists into Dolibarr). -# DataComeFromIdFoundFromCodeId=Code that comes from field number %s of source file will be used to find id of parent object to use (So the code from source file must exists into dictionary %s). Note that if you know id, you can also use it into source file instead of code. Import should work in both cases. -# DataIsInsertedInto=Data coming from source file will be inserted into the following field: -# DataIDSourceIsInsertedInto=The id of parent object found using the data in source file, will be inserted into the following field: -# DataCodeIDSourceIsInsertedInto=The id of parent line found from code, will be inserted into following field: -# SourceRequired=Data value is mandatory -# SourceExample=Example of possible data value -# ExampleAnyRefFoundIntoElement=Any ref found for element %s -# ExampleAnyCodeOrIdFoundIntoDictionary=Any code (or id) found into dictionary %s -# CSVFormatDesc=Comma Separated Value file format (.csv).
    This is a text file format where fields are separated by separator [ %s ]. If separator is found inside a field content, field is rounded by round character [ %s ]. Escape character to escape round character is [ %s ]. -# Excel95FormatDesc=Excel file format (.xls)
    This is native Excel 95 format (BIFF5). -# Excel2007FormatDesc=Excel file format (.xlsx)
    This is native Excel 2007 format (SpreadsheetML). -# TsvFormatDesc=Tab Separated Value file format (.tsv)
    This is a text file format where fields are separated by a tabulator [tab]. -# ExportFieldAutomaticallyAdded=Field %s was automatically added. It will avoid you to have similar lines to be treated as duplicate records (with this field added, all lines will own their own id and will differ). -# CsvOptions=Csv Options -# Separator=Separator -# Enclosure=Enclosure -# SuppliersProducts=Suppliers Products -# BankCode=Bank code -# DeskCode=Desk code -# BankAccountNumber=Account number -# BankAccountNumberKey=Key -# SpecialCode=Special code -# ExportStringFilter=%% allows replacing one or more characters in the text -# ExportDateFilter='YYYY' 'YYYYMM' 'YYYYMMDD': filters by one year/month/day
    'YYYY+YYYY' 'YYYYMM+YYYYMM' 'YYYYMMDD+YYYYMMDD': filters over a range of years/months/days
    '>YYYY' '>YYYYMM' '>YYYYMMDD': filters on the following years/months/days
    '<YYYY' '<YYYYMM' '<YYYYMMDD': filters on the previous years/months/days -# ExportNumericFilter='NNNNN' filters by one value
    'NNNNN+NNNNN' filters over a range of values
    '>NNNNN' filters by lower values
    '>NNNNN' filters by higher values +ExportsArea=Eksporto sritis +ImportArea=Importas sritis +NewExport=Naujas eksportas +NewImport=Naujas importas +ExportableDatas=Eksportuojamų duomenų rinkinys +ImportableDatas=Importuojamų duomenų rinkinys +SelectExportDataSet=Pasirinkite duomenų rinkinį, kurį norite eksportuoti ... +SelectImportDataSet=Pasirinkite duomenų rinkinį, kurį norite importuoti ... +SelectExportFields=Pasirinkite laukus, kuriuos norite eksportuoti, arba pasirinkite iš anksto apibrėžtą eksporto profilį +SelectImportFields=Choose source file fields you want to import and their target field in database by moving them up and down with anchor %s, or select a predefined import profile: +NotImportedFields=Šaltinio failo laukai nesuimportuoti +SaveExportModel=Išsaugoti šį eksporto profilį, jei jūs planuojate pakartotinai naudoti jį vėliau ... +SaveImportModel=Išsaugoti šį importo profilį, jei jūs planuojate pakartotinai naudoti jį vėliau ... +ExportModelName=Eksporto profilio pavadinimas +ExportModelSaved=Eksporto profilis išsaugotas su pavadinimu %s. +ExportableFields=Eksportuojami laukai +ExportedFields=Eksportuoti laukai +ImportModelName=Importo profilio pavadinimas +ImportModelSaved=Importo profilis išsaugotas su pavadinimu %s. +ImportableFields=Importuojami laukai +ImportedFields=Importuoti laukai +DatasetToExport=Duomenų rinkinys eksportui +DatasetToImport=Importo failas duomenų rinkiniui +NoDiscardedFields=Šaltinio faile atmestų laukų nėra +Dataset=Duomenų rinkinys +ChooseFieldsOrdersAndTitle=Pasirinkite laukų eilės tvarką ... +FieldsOrder=Laukų eilės tvarka +FieldsTitle=Laukų pavadinimai +FieldOrder=Lauko eilės tvarka +FieldTitle=Lauko pavadinimas +ChooseExportFormat=Pasirinkite eksporto formatą +NowClickToGenerateToBuildExportFile=Dabar pasirinkite failo formatą iš iškrentančio įvedimo laukelio ir paspauskite mygtuką "Sukurti", kad sukurti eksporto failą ... +AvailableFormats=Galimi formatai +LibraryShort=Biblioteka +LibraryUsed=Panaudota biblioteka +LibraryVersion=Versija +Step=Žingsnis +FormatedImport=Importo asistentas +FormatedImportDesc1=Ši sritis leidžia importuoti personalizuotuos duomenis, naudojamas asistentas padės jums procese neturint techninių žinių. +FormatedImportDesc2=Pirmasis žingsnis yra pasirinkti pagrindinius duomenis, kuriuos norite įkelti, tada failą, kurį norite įkelti, tada pasirinkti, kokius laukus norite įkelti. +FormatedExport=Eksporto asistentas +FormatedExportDesc1=Ši sritis leidžia eksportuoti personalizuotus duomenis panaudojant asistentą, kuris padės jums procese neturint techninių žinių. +FormatedExportDesc2=Pirmasis žingsnis yra pasirinkti iš anksto nustatytą duomenų rinkinį, tada pasirinkti, kokius laukus norite matyti savo rezultatų faile ir kokia eilės tvarka. +FormatedExportDesc3=Kai duomenys eksportui atrinkti, galite nustatyti išvesties failo formatą, į kurį norite eksportuoti savo duomenis. +Sheet=Lapas +NoImportableData=Nėra importuojamų duomenų (nėra modulio su apibrėžimais leidžiančiais duomenų importą) +FileSuccessfullyBuilt=Eksporto failas sukurtas +SQLUsedForExport=SQL užklausa naudojamos sukurti eksporto failą +LineId=Eilutės ID +LineDescription=Eilutės aprašymas +LineUnitPrice=Eilutės vieneto kaina +LineVATRate=Eilutės PVM tarifas +LineQty=Eilutės kiekis +LineTotalHT=Grynųjų mokesčių suma eilutei +LineTotalTTC=Mokesčių suma eilutei +LineTotalVAT=PVM suma eilutei +TypeOfLineServiceOrProduct=Eilutės tipas (0 = produktas, 1 = paslaugos) +FileWithDataToImport=Failas su duomenimis importui +FileToImport=Šaltinio failas importui +FileMustHaveOneOfFollowingFormat=Importo failas turi būti vieno iš sekančių formatų +DownloadEmptyExample=Parsisiųsti tuščio šaltinio failo pavyzdį +ChooseFormatOfFileToImport=Pasirinkite failo formatą, kurį naudosite kaip importo failo formatą, paspaudę ant piktogramos %s jo pasirinkimui +ChooseFileToImport=Įkelkite failą, tada spustelėkite piktogramą %s, norėdami pasirinkti failą kaip šaltinio failą importui +SourceFileFormat=Šaltinio failo formatas +FieldsInSourceFile=Šaltinio failo laukai +FieldsInTargetDatabase=Uždavinių laukai Dolibarr duomenų bazėje (paryškinta=privaloma) +Field=Laukas +NoFields=Nėra laukų +MoveField=Perkelti lauko stulpelio numerį %s +ExampleOfImportFile=Importo failo pavyzdys +SaveImportProfile=Išsaugoti šį importo profilį +ErrorImportDuplicateProfil=Nepavyko išsaugoti šio importo profilio su šiuo pavadinimu. Profilis su šiuo pavadinimu jau yra. +ImportSummary=Importo nustatymų suvestinė +TablesTarget=Adresuotos lentelės +FieldsTarget=Adresuoti laukai +TableTarget=Adresuota lentelė +FieldTarget=Adresuotas laukas +FieldSource=Šaltinio laukas +DoNotImportFirstLine=Neimportuoti šaltinio failo pirmosios eilutės +NbOfSourceLines=Šaltinio failo eilučių skaičius +NowClickToTestTheImport=Patikrinkite importo parametrus, kuriuos nustatėte. Jeigu jie teisingi, spauskite mygtuką "%s" pradėti importo proceso simuliaciją (jokie duomenys nebus pakeisti duomenų bazėje, tai tik simuliacija) +RunSimulateImportFile=Pradėti importo simuliaciją +FieldNeedSource=This field requires data from the source file +SomeMandatoryFieldHaveNoSource=Kai kurie privalomi laukai neturi šaltinio iš duomenų failo +InformationOnSourceFile=Šaltinio failo informacija +InformationOnTargetTables=Duomenų adresatų informacija +SelectAtLeastOneField=Eksportui įjungti bent vieną šaltinio lauką laukų stulpelyje +SelectFormat=Pasirinkite šį importo failo formatą +RunImportFile=Pradėti importuoti failą +NowClickToRunTheImport=Patikrinkite importo simuliacijos rezultatą. Jei viskas gerai, pradėti tikrą galutinį importą. +DataLoadedWithId=Visi duomenys bus įkrauti su šiuo importo ID: %s +ErrorMissingMandatoryValue=Privalomi duomenys yra tušti šaltinio failo lauke %s. +TooMuchErrors=Čia yra %s kito šaltinio eilutės su klaidomis, bet išvestis buvo apribota. +TooMuchWarnings=Čia yra dar %s kito šaltinio eilutės su įspėjimais, bet išvestis buvo apribota. +EmptyLine=Tuščia eilutė (bus atmesta) +CorrectErrorBeforeRunningImport=Pirmiausia reikia ištaisyti visas klaidas prieš pradedant tikrą galutinį importą. +FileWasImported=Failas buvo importuotas su numeriu: %s +YouCanUseImportIdToFindRecord=Galite rasti visus importuotus įrašus į duomenų bazę filtruodami lauką import_key='%s' +NbOfLinesOK=Eilučių be klaidų ir be įspėjimų skaičius: %s +NbOfLinesImported=Sėkmingai importuotų eilučių skaičius: %s +DataComeFromNoWhere=Įterpiama reikšmė ateina nežinia iš kur iš šaltinio failo. +DataComeFromFileFieldNb=Įterpiama reikšmė ateina iš lauko numeriu %s iš šaltinio failo. +DataComeFromIdFoundFromRef=Reikšmė, ateinanti iš lauko numeriu %s iš šaltinio failo, bus naudojama patronuojančio objekto ID radimui (Taigi objektas %s, kuris turi nuorodą iš šaltinio failo turi egzistuoti Dolibarr). +DataComeFromIdFoundFromCodeId=Kodas, kuris ateina iš lauko numeriu %s iš šaltinio failo, bus naudojamaspatronuojančio objekto ID radimui (Taigi kodas iš šaltinio failo turi egzistuoti aplanke %s. Atkreipkite dėmesį, jei Jūs žinote ID, Jūs taip pat galite naudoti jį šaltinio faile vietoje kodo. Importas turėtų veikti abiem atvejais. +DataIsInsertedInto=Duomenys, gauti iš šaltinio failo, bus įtraukti į sekančius laukus: +DataIDSourceIsInsertedInto=Patronuojančio objekto ID, rastas naudojant šaltinio failo duomenis, bus įtrauktas į sekantį laukelį: +DataCodeIDSourceIsInsertedInto=Patronuojančios eilutės ID, rastas kode, bus įtrauktas į sekantį laukelį: +SourceRequired=Duomenų reikšmė yra privaloma +SourceExample=Galimos duomenų reikšmės pavyzdys +ExampleAnyRefFoundIntoElement=Bet kuri nuoroda rasta elementui %s. +ExampleAnyCodeOrIdFoundIntoDictionary=Bet koks kodas (arba ID) rastas aplanke %s +CSVFormatDesc=Kableliais atskirta reikšmė failo formatas (.csv).
    Tai tekstinis failas, kur laukeliai atskiriami ženklu [%s]. Jei atskyrimo ženklas rastas laukelio turinio viduje, laukelis apvalinamas pagal apvalinimo simbolį [%s]. Escape apvalinimo simbolis yra [%s]. +Excel95FormatDesc=Excel failo formatas (.xls)
    Tai įprastas Excel 95 formatas (BIFF5). +Excel2007FormatDesc=Excel failo formatas (.xlsx)
    Tai įprastas Excel 2007 formatas (SpreadsheetML). +TsvFormatDesc=Tab atskirta reikšmė failo formatas (.tsv)
    Tai tekstinis failas, kur laukeliai atskiriami tabulatoriumi [Tab]. +ExportFieldAutomaticallyAdded=Laukelis %s buvo pridėtas automatiškai. Tai padės išvengti panašių eilučių, kurios laikomos besikartojančiais įrašais (dublicated) (su šiuo pridėtu laukeliu, visos eilutės turės savo ID ir bus skirtingos). +CsvOptions=CSV opcijos +Separator=Atskyrimo ženklas +Enclosure=Priedas +SuppliersProducts=Tiekėjų produktai +BankCode=Banko kodas +DeskCode=Skyriaus kodas +BankAccountNumber=Sąskaitos numeris +BankAccountNumberKey=Raktas +SpecialCode=Specialusis kodas +ExportStringFilter=%% leidžia pakeisti vieną ar daugiau simbolių tekste +ExportDateFilter='YYYY' 'YYYYMM' 'YYYYMMDD': filtruos pagal vieną metai/mėnuo/diena
    'YYYY+YYYY' 'YYYYMM+YYYYMM' 'YYYYMMDD+YYYYMMDD': filtruos diapazoną metų/mėnesių/dienų
    '>YYYY' '>YYYYMM' '>YYYYMMDD': filtruos ateinančių metų/mėnesių/dienų
    '<YYYY' '<YYYYMM' '<YYYYMMDD': filtruos praėjusių metų/mėnesių/dienų +ExportNumericFilter='NNNNN' filtruos pagal vieną reikšmę
    'NNNNN+NNNNN' filtruos diapazono reikšmes
    '>NNNNN' filtruos mažesnes reikšmes
    '>NNNNN' filtruos didesnes reikšmes. ## filters -# SelectFilterFields=If you want to filter on some values, just input values here. -# FilterableFields=Champs Filtrables -# FilteredFields=Filtered fields -# FilteredFieldsValues=Value for filter +SelectFilterFields=Jei norite filtruoti pagal kai kokias reikšmes, įveskite reikšmes čia. +FilterableFields=Filtruojami laukeliai +FilteredFields=Atfiltruoti laukeliai +FilteredFieldsValues=Reikšmės filtravimui diff --git a/htdocs/langs/lt_LT/holiday.lang b/htdocs/langs/lt_LT/holiday.lang index d48b7f2e6c5..2e27a46a61a 100644 --- a/htdocs/langs/lt_LT/holiday.lang +++ b/htdocs/langs/lt_LT/holiday.lang @@ -8,7 +8,6 @@ NotActiveModCP=Turite įjungti atostogų modulį, kad galėtumėte mstyti šį p NotConfigModCP=Reikia sukonfigūruoti atostogų modulį, kad galėtumėte matyti šį puslapį. Norėdami tai padaryti, spauskite čia. NoCPforUser=Jūs neturite atostogų paraiškų. AddCP=Prašyti atostogų -CPErrorSQL=Įvyko SQL klaida: Employe=Darbuotojas DateDebCP=Pradžios data DateFinCP=Pabaigos data diff --git a/htdocs/langs/lt_LT/languages.lang b/htdocs/langs/lt_LT/languages.lang index 84a1957afd6..f444bf8f318 100644 --- a/htdocs/langs/lt_LT/languages.lang +++ b/htdocs/langs/lt_LT/languages.lang @@ -19,6 +19,7 @@ Language_en_SA=Anglų (Saudo Arabija) Language_en_US=Anglų (JAV) Language_en_ZA=Anglų (Pietų Afrika) Language_es_ES=Ispanų +Language_es_DO=Spanish (Dominican Republic) Language_es_AR=Ispanų (Argentina) Language_es_CL=Ispanų (Čilė) Language_es_HN=Ispanų (Hondūras) @@ -38,6 +39,7 @@ Language_fr_NC=Prancūzų (Naujoji Kaledonija) Language_he_IL=Hebrajų Language_hr_HR=Kroatijos Language_hu_HU=Vengrų +Language_id_ID=Indonesian Language_is_IS=Islandų Language_it_IT=Italijos Language_ja_JP=Japonijos diff --git a/htdocs/langs/lt_LT/mails.lang b/htdocs/langs/lt_LT/mails.lang index 2a299a4f66d..5ffb0fd7525 100644 --- a/htdocs/langs/lt_LT/mails.lang +++ b/htdocs/langs/lt_LT/mails.lang @@ -79,6 +79,7 @@ MailtoEMail=Hiper sąsaja e-paštui ActivateCheckRead=Leisti naudotis "Unsubcribe" sąsaja ActivateCheckReadKey=Naudoti raktą URL naudojimo užšifravimui "Skaityti siuntą" ir "Pašalinti" funkcijai EMailSentToNRecipients=E-laiškas išsiųstas %s gavėjams. +XTargetsAdded=%s recipients added into target list EachInvoiceWillBeAttachedToEmail=Dokumentas, naudojantis sąskaitos-faktūros šabloną pagal nutylėjimą, bus sukurtas ir pridedamas prie kiekvieno e-laiško. MailTopicSendRemindUnpaidInvoices=Sąskaitos-faktūros %s (%s) priminimas SendRemind=Siųsti priminimą e-paštu diff --git a/htdocs/langs/lt_LT/main.lang b/htdocs/langs/lt_LT/main.lang index ce6d0bd0480..499b1ac9dbe 100644 --- a/htdocs/langs/lt_LT/main.lang +++ b/htdocs/langs/lt_LT/main.lang @@ -551,6 +551,7 @@ MailSentBy=E-Laišką atsiuntė TextUsedInTheMessageBody=E-laiško pagrindinė dalis SendAcknowledgementByMail=Siųsti patvirtinimą e-paštu NoEMail=E-laiškų nėra +NoMobilePhone=No mobile phone Owner=Savininkas DetectedVersion=Aptikta versija FollowingConstantsWillBeSubstituted=Šios konstantos bus pakeistos atitinkamomis reikšmėmis diff --git a/htdocs/langs/lt_LT/products.lang b/htdocs/langs/lt_LT/products.lang index 47e8e47625b..a064b9a26d9 100644 --- a/htdocs/langs/lt_LT/products.lang +++ b/htdocs/langs/lt_LT/products.lang @@ -28,8 +28,10 @@ ProductsAndServicesStatistics=Produktų ir paslaugų statistika ProductsStatistics=Produktų statistika ProductsOnSell=Galimi produktai ProductsNotOnSell=Pasenę produktai +ProductsOnSellAndOnBuy=Products not for sale nor purchase ServicesOnSell=Galimos paslaugos ServicesNotOnSell=Pasenusios paslaugos +ServicesOnSellAndOnBuy=Services not for sale nor purchase InternalRef=Vidinė nuoroda LastRecorded=Naujausi produktai / paslaugos įregistruoti pardavimuose LastRecordedProductsAndServices=Paskutiniai %s įrašyti produktai/paslaugos @@ -70,6 +72,8 @@ PublicPrice=Vieša kaina CurrentPrice=Dabartinė kaina NewPrice=Nauja kaina MinPrice=Minimali pardavimo kaina +MinPriceHT=Minim. selling price (net of tax) +MinPriceTTC=Minim. selling price (inc. tax) CantBeLessThanMinPrice=Pardavimo kaina negali būti mažesnė už minimalią leidžiamą šiam produktui (%s be mokesčių). Šis pranešimas taip pat gali pasirodyti, jei įvedate per labai didelę nuolaidą. ContractStatus=Sutarties būklė ContractStatusClosed=Uždarytas @@ -179,6 +183,7 @@ ProductIsUsed=Šis produktas naudojamas NewRefForClone=Naujo produkto/paslaugos nuoroda CustomerPrices=Klientų kainos SuppliersPrices=Tiekėjų kainos +SuppliersPricesOfProductsOrServices=Suppliers prices (of products or services) CustomCode=Muitinės kodas CountryOrigin=Kilmės šalis HiddenIntoCombo=Nematoma pasirinktuose sąrašuose @@ -208,6 +213,7 @@ CostPmpHT=Grynasis visų VWAP ProductUsedForBuild=Auto suvartotojimas pagal gamybą ProductBuilded=Gamyba baigta ProductsMultiPrice=Produkto multi-kaina +ProductsOrServiceMultiPrice=Customers prices (of products or services, multi-prices) ProductSellByQuarterHT=Produktų apyvarta per ketvirtį VWAP ServiceSellByQuarterHT=Paslaugų apyvarta per ketvirtį VWAP Quarter1=I ketvirtis diff --git a/htdocs/langs/lt_LT/shop.lang b/htdocs/langs/lt_LT/shop.lang index b6cd78b5028..5d214fe63fa 100644 --- a/htdocs/langs/lt_LT/shop.lang +++ b/htdocs/langs/lt_LT/shop.lang @@ -1,10 +1,11 @@ # Dolibarr language file - Source file is en_US - shop -# Shop=Shop -# ShopWeb=Web Shop -# LastOrders=Last orders -# OnStandBy=On standby -# TreatmentInProgress=Treatment in progress -# LastCustomers=Last customers -# OSCommerceShop=OSCommerce shop -# OSCommerce=OSCommerce -# AddProd=Sell online +FailedConnectDBCheckModuleSetup=Failed to connect to oscommerce database. Check your module setup +Shop=Parduotuvė +ShopWeb=Interneto parduotuvė +LastOrders=Paskutiniai užsakymai +OnStandBy=Budėjimo režimu +TreatmentInProgress=Apdorojimas vyksta +LastCustomers=Naujausi klientai +OSCommerceShop=OSCommerce parduotuvė +OSCommerce=OSCommerce +AddProd=Parduoti internete diff --git a/htdocs/langs/lt_LT/stocks.lang b/htdocs/langs/lt_LT/stocks.lang index 4d5bbc8995e..b47fcc060a6 100644 --- a/htdocs/langs/lt_LT/stocks.lang +++ b/htdocs/langs/lt_LT/stocks.lang @@ -112,6 +112,7 @@ ReplenishmentOrdersDesc=Tai sąrašas visų atidarytų tiekėjo užsakymų Replenishments=Papildymai NbOfProductBeforePeriod=Produkto %s kiekis atsargose iki pasirinkto periodo (< %s) NbOfProductAfterPeriod=Produkto %s kiekis sandėlyje po pasirinkto periodo (> %s) +MassMovement=Mass movement MassStockMovement=Masinis atsargų judėjimas SelectProductInAndOutWareHouse=Pasirinkite produktą, kiekį, sandėlį šaltinį ir galutinį sandėlį, tada spauskite "%s". Kai tai bus padaryta visiems reikiamiems judėjimams, spauskite "%s". RecordMovement=Įrašyti perdavimą diff --git a/htdocs/langs/lv_LV/admin.lang b/htdocs/langs/lv_LV/admin.lang index 6fe586d7f4e..0716ffa3345 100644 --- a/htdocs/langs/lv_LV/admin.lang +++ b/htdocs/langs/lv_LV/admin.lang @@ -25,7 +25,7 @@ HTMLCharset=Charset par rada HTML lapas DBStoringCharset=Datu bāzes rakstzīmju kopas, lai datus uzglabātu DBSortingCharset=Datu bāzes rakstzīmju kopas, lai kārtotu datus WarningModuleNotActive=Modulim %s ir jābūt aktivizētam -WarningOnlyPermissionOfActivatedModules=Tikai atļaujas, kas saistīti ar aktīviem moduļi tiek parādīts šeit. Jūs varat aktivizēt citus moduļus Home-> Setup-> moduļi lapā. +WarningOnlyPermissionOfActivatedModules=Tikai atļaujas, kas saistīti ar aktīviem moduļi tiek parādīts šeit. Jūs varat aktivizēt citus moduļus Home->Setup->moduļi lapā. DolibarrSetup=Dolibarr instalēšana vai atjaunināšana DolibarrUser=Dolibarr lietotājs InternalUser=Iekšējais lietotājs @@ -50,10 +50,10 @@ ErrorCodeCantContainZero=Kods nevar saturēt 0 vērtību DisableJavascript=Atslēgt JavaScript un Ajax funkcijas ConfirmAjax=Izmantot Ajax uznirstošos logus UseSearchToSelectCompanyTooltip=Also if you have a large number of third parties (> 100 000), you can increase speed by setting constant COMPANY_DONOTSEARCH_ANYWHERE to 1 in Setup->Other. Search will then be limited to start of string. -UseSearchToSelectCompany=Use autocompletion fields to choose third parties instead of using a list box. +UseSearchToSelectCompany=Izmantojiet automātiskos laukus, lai izvēlētos trešās personas tā vietā, lai izmantojot sarakstlodziņu. ActivityStateToSelectCompany= Pievienot filtru iespēja parādīt / slēpt thirdparties kas pašlaik darbībā vai ir pārtraucis to UseSearchToSelectContactTooltip=Also if you have a large number of third parties (> 100 000), you can increase speed by setting constant CONTACT_DONOTSEARCH_ANYWHERE to 1 in Setup->Other. Search will then be limited to start of string. -UseSearchToSelectContact=Use autocompletion fields to choose contact (instead of using a list box). +UseSearchToSelectContact=Izmantojiet automātiskos laukus, lai izvēlētos kontaktu (tā vietā, lai izmantojot sarakstlodziņu). SearchFilter=Meklēšanas filtru iespējas NumberOfKeyToSearch=Rakstzīmju skaits, lai iedarbinātu meklēšanu: %s ViewFullDateActions=Rādīt pilnu datumus notikumus trešajā lapā @@ -102,7 +102,7 @@ OtherOptions=Citas iespējas OtherSetup=Citi iestatījumi CurrentValueSeparatorDecimal=Decimālais atdalītājs CurrentValueSeparatorThousand=Tūkstošu atdalītājs -Destination=Destination +Destination=Galamērķis IdModule=Module ID IdPermissions=Permissions ID Modules=Moduļi @@ -114,8 +114,8 @@ ParameterInDolibarr=Parametrs %s LanguageParameter=Valodas parametrs %s LanguageBrowserParameter=Parametrs %s LocalisationDolibarrParameters=Lokalizācijas parametri -ClientTZ=Client Time Zone (user) -ClientHour=Client time (user) +ClientTZ=Klienta laika zona (lietotāja) +ClientHour=Klienta laiks (lietotājs) OSTZ=Servera laika zona PHPTZ=PHP servera Laika zona PHPServerOffsetWithGreenwich=PHP servera kompensēt platums Greenwich (sekundes) @@ -125,7 +125,7 @@ CurrentHour=PHP laiks (servera) CompanyTZ=Uzņēmuma Time Zone (galvenais uzņēmums) CompanyHour=Uzņēmums laiks (galvenais uzņēmums) CurrentSessionTimeOut=Pašreizējais sesijas taimauts -YouCanEditPHPTZ=Noteikt atšķirīgu PHP laika joslu (nav obligāti), jūs varat mēģināt, lai pievienotu failu htacces ar līniju, piemēram, šīs "setenv TZ Eiropa / Paris". +YouCanEditPHPTZ=Noteikt atšķirīgu PHP laika joslu (nav obligāti), jūs varat mēģināt, lai pievienotu failu htacces ar līniju, piemēram, šīs "setenv TZ Eiropa / Paris" OSEnv=OS Vide Box=Kaste Boxes=Kastes @@ -168,7 +168,7 @@ ToBuildBackupFileClickHere=Lai izveidotu rezerves kopiju noklikšķiniet conf.php
    failu, nomainiet līnija
    $ Dolibarr_main_db_pass = "..."
    līdz
    $ Dolibarr_main_db_pass = "crypted: %s" -InstrucToClearPass=Lai iegūtu paroli, dekodēt (skaidri) uz conf.php failu, nomainiet līnija
    $ Dolibarr_main_db_pass = "crypted: ..."
    līdz
    $ Dolibarr_main_db_pass = "%s" +InstrucToClearPass=Lai iegūtu paroli, dekodēt (skaidri) uz conf.php failu, nomainiet līnija
    $ Dolibarr_main_db_pass = "crypted: ..."
    līdz
    $ Dolibarr_main_db_pass = "%s" ProtectAndEncryptPdfFiles=Aizsardzību radīto PDF failus (aktivētā nav ieteicama, pārtraukumiem masveida pdf paaudze) ProtectAndEncryptPdfFilesDesc=Aizsardzība PDF dokumentu saglabā to pieejamu lasīt un izdrukāt ar jebkuru PDF pārlūkprogrammu. Tomēr, rediģēšanu un kopēšanu nav iespējams vairs. Ņemiet vērā, ka, izmantojot šo funkciju veikt ēku no pasaules uzkrātā pdf nedarbojas (piemēram, neapmaksātiem rēķiniem). Feature=Iespēja @@ -233,7 +233,9 @@ OfficialWebSiteFr=Franču oficiālā tīmekļa vietne OfficialWiki=Dolibarr Wiki dokumentācija OfficialDemo=Dolibarr tiešsaistes demo OfficialMarketPlace=Oficiālais tirgus vieta ārējiem moduļiem/papildinājumiem -OfficialWebHostingService=Oficiālais mājaslapu hostinga pakalpojumi (Cloud hostings) +OfficialWebHostingService=Referenced web hosting services (Cloud hosting) +ReferencedPreferredPartners=Preferred Partners +OtherResources=Autres ressources ForDocumentationSeeWiki=Par lietotāju vai attīstītājs dokumentācijas (Doc, FAQ ...),
    ieskatieties uz Dolibarr Wiki:
    %s ForAnswersSeeForum=Attiecībā uz jebkuru citu jautājumu / palīdzēt, jūs varat izmantot Dolibarr forumu:
    %s HelpCenterDesc1=Šī joma var palīdzēt jums, lai saņemtu palīdzības atbalsta dienests par Dolibarr. @@ -286,7 +288,7 @@ UnpackPackageInDolibarrRoot=Izkravāt paketi failu Dolibarr saknes direktorijā SetupIsReadyForUse=Instalēšana ir pabeigta, un Dolibarr ir gatavs lietošanai ar šo jauno komponentu. NotExistsDirect=Alternatīva saknes direktorijs nav definēta.
    InfDirAlt=Kopš 3 versijas, ir iespējams noteikt alternatīvu sakne directory.Tas ļauj jums saglabāt, tajā pašā vietā, papildinājumus un pielāgotas veidnes.
    Jums tikai jāizveido direktoriju Dolibarr saknē (piemēram: custom).
    -InfDirExample=
    Tad paziņo to failu conf.php
    $ Dolibarr_main_url_root_alt = 'http://myserver/custom'
    $ Dolibarr_main_document_root_alt = '/ ceļš / uz / dolibarr / htdocs / custom "
    * Šīs līnijas ir komentēja ar "#", lai uncomment tikai noņemt raksturs. +InfDirExample=
    Tad paziņo to failu conf.php
    $ Dolibarr_main_url_root_alt = 'http://myserver/custom'
    $ Dolibarr_main_document_root_alt = '/ ceļš / uz / dolibarr / htdocs / custom'
    * Šīs līnijas ir komentēja ar "#", lai uncomment tikai noņemt raksturs. YouCanSubmitFile=Izvēlieties moduli: CurrentVersion=Dolibarr pašreizējā versija CallUpdatePage=Iet uz lapu, kas aktualizē datu bāzes struktūru un datus: %s. @@ -327,12 +329,12 @@ FollowingSubstitutionKeysCanBeUsed=
    Lai uzzinātu, kā izveidot savu odt dok FullListOnOnlineDocumentation=http://wiki.dolibarr.org/index.php/Create_an_ODT_document_template FirstnameNamePosition=Vārda/Uzvārda atrašanās vieta DescWeather=Šādas bildes tiks parādīta paneļa kad vairāki vēlu darbību sasniedz šādas vērtības: -KeyForWebServicesAccess=Galvenais, lai izmantotu Web Services (parametrs "dolibarrkey", kas veikalu) +KeyForWebServicesAccess=Galvenais, lai izmantotu Web Services (parametrs "dolibarrkey", kas veikalu) TestSubmitForm=Ieejas tests formu ThisForceAlsoTheme=Izmantojot šo izvēlni vadītājs būs arī izmantot savu tēmu kāds ir lietotāja izvēles. Arī šī izvēlne vadītājs specializējies smartphones nav strādā uz visām viedtālrunis. Izmantot citu izvēlnes pārvaldnieku, ja jums rodas problēmas jums. ThemeDir=Skins katalogs -ConnectionTimeout=Dzimumsakars taimautu -ResponseTimeout=Response timeout +ConnectionTimeout=Savienojuma taimauts +ResponseTimeout=Atbildes taimauts SmsTestMessage=Testa ziņojums no __ PHONEFROM__ to __ PHONETO__ ModuleMustBeEnabledFirst=Moduļu %s ir jābūt aktivizētam pirmais, pirms izmantojot šo funkciju. SecurityToken=Galvenais, lai drošu URL @@ -369,10 +371,10 @@ ExtrafieldSelectList = Izvēlieties kādu no tabulas ExtrafieldSeparator=Atdalītājs ExtrafieldCheckBox=Rūtiņa ExtrafieldRadio=Radio poga -ExtrafieldParamHelpselect=Parametri sarakstā jābūt, piemēram, atslēgas, vērtības

    par exemple:
    1, vērtība1
    2, vērtība2
    3, value3
    ...

    Lai iegūtu sarakstu atkarībā no citu:
    1, vērtība1 | parent_list_code: parent_key
    2, vērtība2 | parent_list_code: parent_key -ExtrafieldParamHelpcheckbox=Parametri sarakstā jābūt, piemēram, atslēgas, vērtības

    par exemple:
    1, vērtība1
    2, vērtība2
    3, value3
    ... -ExtrafieldParamHelpradio=Parametri sarakstā jābūt, piemēram, atslēgas, vērtības

    par exemple:
    1, vērtība1
    2, vērtība2
    3, value3
    ... -ExtrafieldParamHelpsellist=Parameters list comes from a table
    Syntax : table_name:label_field:id_field::filter
    Example : c_typent:libelle:id::filter

    filter can be a simple test (eg active=1) to display only active value
    if you want to filter on extrafields use syntaxt extra.fieldcode=... (where field code is the code of extrafield)

    In order to have the list depending on another :
    c_typent:libelle:id:parent_list_code|parent_column:filter +ExtrafieldParamHelpselect=Parameters list have to be like key,value

    for example :
    1,value1
    2,value2
    3,value3
    ...

    In order to have the list depending on another :
    1,value1|parent_list_code:parent_key
    2,value2|parent_list_code:parent_key +ExtrafieldParamHelpcheckbox=Parameters list have to be like key,value

    for example :
    1,value1
    2,value2
    3,value3
    ... +ExtrafieldParamHelpradio=Parameters list have to be like key,value

    for example :
    1,value1
    2,value2
    3,value3
    ... +ExtrafieldParamHelpsellist=Parameters list comes from a table
    Syntax : table_name:label_field:id_field::filter
    Example : c_typent:libelle:id::filter

    filter can be a simple test (eg active=1) to display only active value
    if you want to filter on extrafields use syntaxt extra.fieldcode=... (where field code is the code of extrafield)

    In order to have the list depending on another :
    c_typent:libelle:id:parent_list_code|parent_column:filter LibraryToBuildPDF=Bibliotēka, lai izveidotu PDF WarningUsingFPDF=Uzmanību: Jūsu conf.php satur direktīvu dolibarr_pdf_force_fpdf = 1. Tas nozīmē, ka jūs izmantojat FPDF bibliotēku, lai radītu PDF failus. Šī bibliotēka ir vecs un neatbalsta daudz funkcijām (Unicode, attēlu pārredzamība, kirilicas, arābu un Āzijas valodās, ...), tāpēc var rasties kļūdas laikā PDF paaudzes.
    Lai atrisinātu šo problēmu, un ir pilnībā atbalsta PDF paaudzes, lūdzu, lejupielādējiet TCPDF bibliotēka , tad komentēt vai noņemt līnijas $ dolibarr_pdf_force_fpdf = 1, un pievienojiet vietā $ dolibarr_lib_TCPDF_PATH = 'path_to_TCPDF_dir' LocalTaxDesc=Dažas valstis piemēro 2 vai 3 nodokļus par katru PVN rēķinu rindā. Ja tas ir gadījums, izvēlieties veidu otrajā un trešajā nodokli un tā likmi. Iespējamais veids ir:
    1: vietējais nodoklis attiecas uz produktiem un pakalpojumiem, bez PVN (PVN netiek piemērots vietējiem nodokļiem)
    2: vietējais nodoklis attiecas uz produktiem un pakalpojumiem, bez PVN (PVN aprēķina summas + localtax)
    3: vietējais nodoklis attiecas uz produktiem, bez PVN (PVN netiek piemērots vietējiem nodokļiem)
    4: vietējais nodoklis attiecas uz produktiem, bez PVN (PVN aprēķina summas + localtax)
    5: vietējais nodoklis attiecas uz pakalpojumiem, bez PVN (PVN netiek piemērots vietējiem nodokļiem)
    6: vietējais nodoklis attiecas uz pakalpojumiem, bez PVN (PVN aprēķina summas + localtax) @@ -471,8 +473,8 @@ Module410Name=WebCalendar Module410Desc=WebCalendar integrācija Module500Name=Special expenses (tax, social contributions, dividends) Module500Desc=Management of special expenses like taxes, social contribution, dividends and salaries -Module510Name=Salaries -Module510Desc=Management of empoyees salaries and payments +Module510Name=Atalgojums +Module510Desc=Management of employees salaries and payments Module600Name=Paziņojumi Module600Desc=Sūtīt paziņojumus pa e-pastu uz dažiem Dolibarr biznesa notikumiem trešo pušu kontaktiem Module700Name=Ziedojumi @@ -495,15 +497,15 @@ Module2400Name=Darba kārtība Module2400Desc=Notikumi / uzdevumi un darba kārtības vadība Module2500Name=Elektronisko Content Management Module2500Desc=Saglabāt un koplietot dokumentus -Module2600Name= Veikalu -Module2600Desc= Ļautu Dolibarr tīmekļa pakalpojumu serveri -Module2700Name= Gravatar -Module2700Desc= Izmantot tiešsaistes Gravatar pakalpojumu (www.gravatar.com), lai parādītu fotogrāfijas lietotāju / dalībnieku (atrasts ar saviem e-pastiem). Nepieciešams interneta piekļuves +Module2600Name=Veikalu +Module2600Desc=Ļautu Dolibarr tīmekļa pakalpojumu serveri +Module2700Name=Gravatar +Module2700Desc=Izmantot tiešsaistes Gravatar pakalpojumu (www.gravatar.com), lai parādītu fotogrāfijas lietotāju / dalībnieku (atrasts ar saviem e-pastiem). Nepieciešams interneta piekļuves Module2800Desc=FTP klients -Module2900Name= GeoIPMaxmind -Module2900Desc= GeoIP MaxMind pārveidošanu iespējas -Module3100Name= Skaips -Module3100Desc= Pievienot Skype pogu uz karti piekritējus / trešo personu / Kontakti +Module2900Name=GeoIPMaxmind +Module2900Desc=GeoIP MaxMind pārveidošanu iespējas +Module3100Name=Skaips +Module3100Desc=Pievienot Skype pogu uz karti piekritējus / trešo personu / Kontakti Module5000Name=Multi-kompānija Module5000Desc=Ļauj jums pārvaldīt vairākus uzņēmumus Module6000Name=Darba plūsma @@ -518,7 +520,7 @@ Module50200Name= Paypal Module50200Desc= Modulis piedāvā tiešsaistes maksājumu lapā ar kredītkarti ar Paypal Module54000Name=PrintIPP Module54000Desc=Drukāt ar Kausi IPP printeri. -Module55000Name=Open Poll +Module55000Name=Atvērta aptauja Module55000Desc=Module to make online polls (like Doodle, Studs, Rdvz, ...) Module59000Name=Malas Module59000Desc=Moduli, lai pārvaldītu peļņu @@ -681,6 +683,10 @@ Permission401=Lasīt atlaides Permission402=Izveidot/mainīt atlaides Permission403=Apstiprināt atlaides Permission404=Dzēst atlaides +Permission510=Apskatīt algas +Permission512=Izveidot/labot algas +Permission514=Dzēst algas +Permission517=Eksportēt algas Permission531=Lasīt pakalpojumus Permission532=Izveidot/mainīt pakalpojumus Permission534=Dzēst pakalpojumus @@ -739,7 +745,7 @@ Permission50201=Lasīt darījumus Permission50202=Importēt darījumus Permission54001=Drukāt Permission55001=Read polls -Permission55002=Create/modify polls +Permission55002=Izveidot/labot aptaujas Permission59001=Read commercial margins Permission59002=Define commercial margins DictionaryCompanyType=Thirdparties type @@ -760,10 +766,10 @@ DictionaryTypeContact=Contact/Address types DictionaryEcotaxe=Ecotax (WEEE) DictionaryPaperFormat=Papīra formāts DictionaryFees=Type of fees -DictionarySendingMethods=Shipping methods +DictionarySendingMethods=Piegādes veidi DictionaryStaff=Personāls DictionaryAvailability=Piegādes kavēšanās -DictionaryOrderMethods=Ordering methods +DictionaryOrderMethods=Pasūtījumu veidi DictionarySource=Origin of proposals/orders DictionaryAccountancyplan=Kontu līknes DictionaryAccountancysystem=Models for chart of accounts @@ -775,7 +781,7 @@ VATManagement=PVN Vadība VATIsUsedDesc=PVN likme pēc noklusējuma, veidojot izredzes, rēķini, rīkojumi uc sekot aktīvo standarta noteikums:
    Ja pārdevējs nav pakļauta PVN, tad PVN pēc noklusējuma = 0. Beigas varu.
    Ja (pārdošanas valstij = pērkot valsti), tad pēc noklusējuma PVN = PVN no produkta pārdošanas valstī. Beigas varu.
    Ja pārdevējs un pircējs Eiropas Kopienā, un preces ir transporta līdzekļi (auto, kuģis, lidmašīna), noklusējuma PVN = 0 (PVN būtu jāmaksā pircējam pie customoffice savas valsts, nevis pārdevējs). Beigas varu.
    Ja pārdevējs un pircējs Eiropas Kopienas un pircējs nav uzņēmums, tad PVN pēc noklusējuma = PVN no pārdotā produkta. Beigas varu.
    Ja pārdevējs un pircējs Eiropas Kopienas un pircējs ir uzņēmums, tad PVN pēc noklusējuma = 0. Beigas varu.
    Else ierosinātā noklusējuma PVN = 0. Beigas varu. VATIsNotUsedDesc=Pēc noklusējuma piedāvātais PVN ir 0, ko var izmantot gadījumos, piemēram, asociācijām, cilvēki ou mazos uzņēmumus. VATIsUsedExampleFR=Francijā, tas nozīmē, uzņēmumiem vai organizācijām, kas reāli fiskālo sistēmu (Vienkāršota reālu vai normāla īsto). Sistēma, kurā PVN ir deklarēta. -VATIsNotUsedExampleFR=Francijā, tas ir asociācijas, kas nav PVN deklarētas vai uzņēmumi, organizācijas vai brīvo profesiju, kas ir izvēlējušies mikrouzņēmumu nodokļu sistēmu (PVN ar franšīzes), un tā maksā franšīzes PVN bez PVN deklarācijas. Šī izvēle būs redzams atskaites "Nav piemērojams PVN - art-293B CGI" rēķinā. +VATIsNotUsedExampleFR=Francijā, tas ir asociācijas, kas nav PVN deklarētas vai uzņēmumi, organizācijas vai brīvo profesiju, kas ir izvēlējušies mikrouzņēmumu nodokļu sistēmu (PVN ar franšīzes), un tā maksā franšīzes PVN bez PVN deklarācijas. Šī izvēle būs redzams atskaites "Nav piemērojams PVN - art-293B CGI" rēķinā. ##### Local Taxes ##### LocalTax1IsUsed=Izmantot otru nodokli LocalTax1IsNotUsed=Nelietot otru nodokli @@ -905,8 +911,8 @@ Delays_MAIN_DELAY_MEMBERS=Tolerance kavēšanās (dienās) pirms brīdinājumu p Delays_MAIN_DELAY_CHEQUES_TO_DEPOSIT=Tolerance kavēšanās (dienās) pirms brīdinājumu par pārbaudēm, depozītu darīt SetupDescription1=Visi parametri, kas pieejami uzstādīšanas jomā ļauj iestatīt Dolibarr pirms to izmanto. SetupDescription2=Par 2 Svarīgākie uzstādīšanas soļi ir 2 pirmie, kas kreisajā iestatīšanas izvēlnē, tādā veidā Sabiedrības / nodibinājums uzstādīšanas lapu un moduļi iestatīšanas lapā: -SetupDescription3=Parametru izvēlnes Setup -> Kompānija / nodibinājums ir nepieciešami tāpēc, ievadi informācija tiek izmantota Dolibarr displejiem un mainīt Dolibarr uzvedību (piemēram, attiecībā uz funkcijām, kas saistītas ar jūsu valstī). -SetupDescription4=Parametru izvēlnes Setup -> Moduļi ir nepieciešama, jo Dolibarr nav fiksēta ERP / CRM, bet no vairākiem moduļiem, kas visi vairāk vai mazāk neatkarīgo summu. Tas ir tikai pēc tam, kad aktivizējot moduļus jūs esat interesanti, ka jūs redzēsiet pazīmes parādījās izvēlnēs. +SetupDescription3=Parametru izvēlnes Setup -> Kompānija / nodibinājums ir nepieciešami tāpēc, ievadi informācija tiek izmantota Dolibarr displejiem un mainīt Dolibarr uzvedību (piemēram, attiecībā uz funkcijām, kas saistītas ar jūsu valstī). +SetupDescription4=Parametru izvēlnes Setup -> Moduļi ir nepieciešama, jo Dolibarr nav fiksēta ERP / CRM, bet no vairākiem moduļiem, kas visi vairāk vai mazāk neatkarīgo summu. Tas ir tikai pēc tam, kad aktivizējot moduļus jūs esat interesanti, ka jūs redzēsiet pazīmes parādījās izvēlnēs. SetupDescription5=Citas izvēlnes ieraksti pārvaldīt izvēles parametrus. EventsSetup=Setup notikumu žurnāli LogEvents=Drošības revīzijas pasākumi @@ -924,10 +930,10 @@ LogEventDesc=Jūs varat ļaut šeit reģistrēšanu par Dolibarr drošības pas AreaForAdminOnly=Minētās funkcijas var izmantot administratora lietotājiem. SystemInfoDesc=Sistēmas informācija ir dažādi tehniskā informācija jums tikai lasīšanas režīmā un redzama tikai administratoriem. SystemAreaForAdminOnly=Šī joma ir pieejama administratora lietotājiem. Neviens no Dolibarr atļauju var samazināt šo robežu. -CompanyFundationDesc=Labot šajā lapā visu zināmo informāciju par uzņēmuma vai nodibinājuma jums ir nepieciešams, lai pārvaldītu (Lai to izdarītu, noklikšķiniet uz "Mainīt" pogu lapas apakšā) +CompanyFundationDesc=Labot šajā lapā visu zināmo informāciju par uzņēmuma vai nodibinājuma jums ir nepieciešams, lai pārvaldītu (Lai to izdarītu, noklikšķiniet uz "Labot" pogu lapas apakšā) DisplayDesc=Jūs varat izvēlēties katru parametru, kas saistīts ar Dolibarr izskatu un justies šeit AvailableModules=Pieejamie moduļi -ToActivateModule=Lai aktivizētu moduļus, dodieties uz iestatīšanas zonas (Home-> Setup-> Moduļi). +ToActivateModule=Lai aktivizētu moduļus, dodieties uz iestatīšanas zonas (Home->Setup->Moduļi). SessionTimeOut=Pārtraukums par sesiju SessionExplanation=Šis numurs garantiju, ka sesija nekad beidzas pirms šī kavēšanās, ja sesija tīrītājs tiek darīts ar Iekšējā PHP sesijas tīrāku (un nekas cits). Iekšējā PHP sesijas tīrītājs nav garantija, ka sesija beigsies tikai pēc šīs kavēšanās. Tas beigsies, pēc šī kavēšanās, un, kad sesija tīrītājs ir ilga, tāpēc ik %s / %s piekļuves, bet tikai laikā piekļūt dokumentiem, ko citās sēdēs.
    Piezīme: par dažiem ar ārēju sesijas tīrīšanas mehānisma (cron zem Debian, Ubuntu ...) serveriem, sesijas var tikt iznīcināti pēc posmā, kas noteikts pēc noklusējuma session.gc_maxlifetime, vienalga kāds vērtību ieraksta šeit. TriggersAvailable=Pieejamie izraisa @@ -951,7 +957,7 @@ MAIN_ROUNDING_RULE_TOT= Izmērs noapaļošanas diapazons (par retajām valstīm, UnitPriceOfProduct=Neto vienības produkta cena TotalPriceAfterRounding=Kopējā cena (neto / pvn / ar nodokli) pēc noapaļošanas ParameterActiveForNextInputOnly=Parametrs spēkā nākamās ievades tikai -NoEventOrNoAuditSetup=Nav drošības pasākums ir ierakstīta vēl. Tas var būt normāls, ja audits nav iespējots uz "Setup - drošība - revīzijas" lapā. +NoEventOrNoAuditSetup=Nav drošības pasākums ir ierakstīta vēl. Tas var būt normāls, ja audits nav iespējots uz "Setup - drošība - revīzijas" lapā. NoEventFoundWithCriteria=Nav drošības pasākums ir atzīts par šādiem meklēšanas kritērijiem ir. SeeLocalSendMailSetup=Skatiet sendmail iestatījumus BackupDesc=Lai izveidotu pilnu Dolibarr rezerves kopiju jums ir: @@ -999,14 +1005,14 @@ ExtraFieldsSupplierOrders=Papildinošas atribūti (rīkojumi) ExtraFieldsSupplierInvoices=Papildinošas atribūti (rēķini) ExtraFieldsProject=Papildinošas atribūti (projekti) ExtraFieldsProjectTask=Papildinošas atribūti (uzdevumi) -ExtraFieldHasWrongValue=Attribut %s ir nepareiza vērtība. +ExtraFieldHasWrongValue=Attribute %s has a wrong value. AlphaNumOnlyCharsAndNoSpace=tikai burti un cipari bez atstarpes AlphaNumOnlyLowerCharsAndNoSpace=only alphanumericals and lower case characters without space SendingMailSetup=Iestatīšana sendings pa e-pastu SendmailOptionNotComplete=Brīdinājums, par dažiem Linux sistēmām, lai nosūtītu e-pastu no jūsu e-pastu, sendmail izpilde uzstādīšana ir iekļauti variants-ba (parametrs mail.force_extra_parameters savā php.ini failā). Ja daži saņēmēji nekad saņemt e-pastus, mēģina labot šo PHP parametru ar mail.force_extra_parameters =-BA). PathToDocuments=Ceļš līdz dokumentiem PathDirectory=Katalogs -SendmailOptionMayHurtBuggedMTA=Feature nosūtīt vēstules, izmantojot metodi "PHP pasta Direct" radīs pasta ziņu, kas varētu būt nepareizi parsēt daži saņēma pasta serveriem. Rezultāts ir, ka dažas vēstules nevar nolasīt ar cilvēkiem rīkotajos thoose bugged platformas. Tas ir darīts attiecībā uz dažiem interneta pakalpojumu sniedzējiem (Ex: Orange Francijā). Tas nav problēma, par Dolibarr ne par PHP, bet uz saņemšanas pasta serveri. Taču jūs varat pievienot opciju MAIN_FIX_FOR_BUGGED_MTA līdz 1 uz iestatīšanu - cits, lai mainītu Dolibarr lai izvairītos no šīs. Tomēr var rasties problēmas ar citiem serveriem, kas stingri ievērot SMTP standarta. Cits risinājums (recommanded), ir izmantot metodi "SMTP ligzda bibliotēku", kurai nav trūkumi. +SendmailOptionMayHurtBuggedMTA=Feature nosūtīt vēstules, izmantojot metodi "PHP pasta Direct" radīs pasta ziņu, kas varētu būt nepareizi parsēt daži saņēma pasta serveriem. Rezultāts ir, ka dažas vēstules nevar nolasīt ar cilvēkiem rīkotajos thoose bugged platformas. Tas ir darīts attiecībā uz dažiem interneta pakalpojumu sniedzējiem (Ex: Orange Francijā). Tas nav problēma, par Dolibarr ne par PHP, bet uz saņemšanas pasta serveri. Taču jūs varat pievienot opciju MAIN_FIX_FOR_BUGGED_MTA līdz 1 uz iestatīšanu - cits, lai mainītu Dolibarr lai izvairītos no šīs. Tomēr var rasties problēmas ar citiem serveriem, kas stingri ievērot SMTP standarta. Cits risinājums (recommanded), ir izmantot metodi "SMTP ligzda bibliotēku", kurai nav trūkumi. TranslationSetup=Tulkojumu konfigurēšana TranslationDesc=Valodu izvēle redzams uz ekrāna var mainīt:
    * Globāli no izvēlnes Home - Setup - Displejs
    * Lietotāju tikai no tab lietotāja displeja lietotāja kartes (uzklikšķiniet uz pieteikšanās uz augšu ekrāna). TotalNumberOfActivatedModules=Kopskaits aktivēto iezīme moduļiem: %s @@ -1018,19 +1024,19 @@ SuhosinSessionEncrypt=Sesija uzglabāšana šifrēta ar Suhosin ConditionIsCurrently=Stāvoklis šobrīd ir %s TestNotPossibleWithCurrentBrowsers=Automātiska noteikšana nav iespējama YouUseBestDriver=Jūs varat izmantot vadītāja %s, kas ir labākais draiveris, kas pieejams šobrīd. -YouDoNotUseBestDriver=Jūs varat izmantot disku %s, bet vadītājs %s ir recommanded. +YouDoNotUseBestDriver=You use drive %s but driver %s is recommended. NbOfProductIsLowerThanNoPb=Tev ir tikai %s produktus / pakalpojumus Into datu bāze. Tas nav nepieciešams kādu konkrētu optimizāciju. SearchOptim=Meklēšanas optimizācija YouHaveXProductUseSearchOptim=Jums ir %s ražojumu par datu bāzē. Jums vajadzētu pievienot pastāvīgu PRODUCT_DONOTSEARCH_ANYWHERE uz 1 par Home-Setup-citādi, jūs ierobežot meklēšanu uz sākuma stīgām padarot iespējams datubāzē izmantot indeksu, un jums vajadzētu saņemt tūlītēju atbildi. BrowserIsOK=Jūs izmantojat interneta pārlūka %s. Šī pārlūkprogramma ir ok drošību un veiktspēju. BrowserIsKO=Jūs izmantojat interneta pārlūka %s. Šī pārlūkprogramma ir zināms, ka slikta izvēle drošību, veiktspēju un uzticamību. Mēs recommand jums izmantot Firefox, Chrome, Opera vai Safari. -XDebugInstalled=Xdebug est maksas. +XDebugInstalled=XDebug ir ielādēts XCacheInstalled=XCache ir piekrauts. AddRefInList=Parādīt klientu / piegādātāju ref uz sarakstā (izvēlēties sarakstu vai combobox), un lielākā daļa no hipersaites FieldEdition=Izdevums lauka %s FixTZ=Laika zonas labojums FillThisOnlyIfRequired=Piemērs: +2 (aizpildiet tikai, ja sastopaties ar problēmām) -GetBarCode=Get barcode +GetBarCode=Iegūt svītrukodu EmptyNumRefModelDesc=The code is free. This code can be modified at any time. ##### Module password generation PasswordGenerationStandard=Atgriešanās paroli radīts saskaņā ar iekšējo Dolibarr algoritmu: 8 rakstzīmēm, kas satur kopīgos ciparus un rakstzīmes mazie burti. @@ -1050,7 +1056,7 @@ CompanyCodeChecker=Modulis trešajām personām koda paaudzes un pārbaudes (kli AccountCodeManager=Modulis grāmatvedības kodu paaudzes (klients vai piegādātājs) ModuleCompanyCodeAquarium=Atgriezties grāmatvedības kodu būvēts pēc:
    %s seko trešās puses piegādātājs kodu par piegādātāju grāmatvedības kodu,
    %s pēc trešo personu klientu kodu klientu grāmatvedības kodu. ModuleCompanyCodePanicum=Atgriezt tukšu grāmatvedības uzskaites kodu. -ModuleCompanyCodeDigitaria=Grāmatvedība kods ir atkarīgs no trešās personas kodu. Kods sastāv no simbols "C" pirmajā pozīcijā un pēc tam pirmais 5 zīmēm no trešās puses kodu. +ModuleCompanyCodeDigitaria=Grāmatvedība kods ir atkarīgs no trešās personas kodu. Kods sastāv no simbols "C" pirmajā pozīcijā un pēc tam pirmais 5 zīmēm no trešās puses kodu. UseNotifications=Izmantot paziņojumus NotificationsDesc=E-pastus paziņojumi funkcija ļauj jums klusi sūtīt automātisko pastu, dažiem Dolibarr notikumiem, trešajām personām (klientiem vai piegādātājiem), kas ir konfigurēti. Izvēle aktīvas paziņošanas un Mērķu kontaktiem tiek veikta viena trešā persona laikā. ModelModules=Dokumentu veidnes @@ -1073,9 +1079,9 @@ WebCalServer=Servera hosting kalendārs datu bāzes WebCalDatabaseName=Datubāzes nosaukums WebCalUser=Lietotājs, lai piekļūtu datubāzei WebCalSetupSaved=WebCalendar uzstādīšana ir veiksmīgi saglabāta. -WebCalTestOk=Savienojums ar serveri "%s" par datu bāzē "%s" ar lietotāja %s "sekmīgi pabeigta. -WebCalTestKo1=Savienojums ar serveri "%s" izdoties, bet datubāze "%s" nevar sasniegt. -WebCalTestKo2=Savienojums ar serveri "%s" ar lietotāja "%s" neizdevās. +WebCalTestOk=Connection to server '%s' on database '%s' with user '%s' successful. +WebCalTestKo1=Savienojums ar serveri '%s' izdoties, bet datubāze '%s' nevar sasniegt. +WebCalTestKo2=Savienojums ar serveri '%s' ar lietotāja '%s' neizdevās. WebCalErrorConnectOkButWrongDatabase=Savienojums izdevās, bet datu bāzē neizskatās būt WebCalendar datubāzi. WebCalAddEventOnCreateActions=Pievienot kalendāra notikumu par darbībām rada WebCalAddEventOnCreateCompany=Pievienot Kalendāra notikuma uzņēmumi rada @@ -1119,7 +1125,7 @@ WatermarkOnDraftProposal=Ūdenszīme projektu komerciālo priekšlikumu (none ja OrdersSetup=Pasūtīt vadības iestatīšana OrdersNumberingModules=Pasūtījumi numerācijas modeļus OrdersModelModule=Pasūtīt dokumenti modeļi -HideTreadedOrders=Paslēpt apstrādātas vai atcelts rīkojumus sarakstā +HideTreadedOrders=Hide the treated or cancelled orders in the list ValidOrderAfterPropalClosed=Lai apstiprinātu pasūtījumu pēc priekšlikuma tuvāk, ļauj ne soli pa pagaidu rīkojumu FreeLegalTextOnOrders=Brīvs teksts pasūtījumos WatermarkOnDraftOrders=Ūdenszīme projektu pasūtījumiem (none ja tukšs) @@ -1156,8 +1162,8 @@ LDAPContactsSynchro=Kontakti LDAPMembersSynchro=Dalībnieki LDAPSynchronization=LDAP sinhronizācija LDAPFunctionsNotAvailableOnPHP=LDAP funkcijas nav pieejama jūsu PHP -LDAPToDolibarr=LDAP -> Dolibarr -DolibarrToLDAP=Dolibarr -> LDAP +LDAPToDolibarr=LDAP -> Dolibarr +DolibarrToLDAP=Dolibarr -> LDAP LDAPNamingAttribute=Ievadiet LDAP LDAPSynchronizeUsers=Organizēšana lietotāju LDAP LDAPSynchronizeGroups=Organizēšana grupu LDAP @@ -1214,9 +1220,9 @@ LDAPSynchroKO=Neizdevās sinhronizācijas pārbaude LDAPSynchroKOMayBePermissions=Neizdevās sinhronizācijas pārbaude. Pārbaudiet, vai saistība ar serveri ir pareizi konfigurēts un ļauj LDAP udpates LDAPTCPConnectOK=TCP savienojumu ar LDAP servera veiksmīgiem (Server = %s, Port = %s) LDAPTCPConnectKO=TCP savienojumu ar LDAP serveri neizdevās (Server = %s, Port = %s) -LDAPBindOK=Savienot / Authentificate ar LDAP serveri sucessfull (Server = %s, Port = %s, Admin = %s, Password = %s) +LDAPBindOK=Connect/Authentificate to LDAP server successful (Server=%s, Port=%s, Admin=%s, Password=%s) LDAPBindKO=Savienot / Authentificate ar LDAP serveri neizdevās (Server = %s, Port = %s, Admin = %s, Password = %s) -LDAPUnbindSuccessfull=Atvienojies veiksmīgi +LDAPUnbindSuccessfull=Atvienošanās veiksmīga LDAPUnbindFailed=Atvienoties neizdevās LDAPConnectToDNSuccessfull=Savienojums ar DN (%s) veiksmīgs LDAPConnectToDNFailed=Savienojums ar DN (%s) neizdevās @@ -1273,7 +1279,7 @@ LDAPFieldSidExample=Piemērs: objectsid LDAPFieldEndLastSubscription=Datums, kad parakstīšanās beigu LDAPFieldTitle=Post / Funkcija LDAPFieldTitleExample=Piemērs: virsraksts -LDAPParametersAreStillHardCoded=LDAP parametriem joprojām hardcoded (saskarē klasē) +LDAPParametersAreStillHardCoded=LDAP parameters are still hardcoded (in contact class) LDAPSetupNotComplete=LDAP uzstādīšana nav pilnīga (doties uz citām cilnēm) LDAPNoUserOrPasswordProvidedAccessIsReadOnly=Nav administrators vai parole sniegta. LDAP pieeja būs anonīmi un tikai lasīšanas režīmā. LDAPDescContact=Šī lapa ļauj definēt LDAP atribūti vārdu LDAP kokā uz katru datiem, uz Dolibarr kontaktiem. @@ -1324,7 +1330,7 @@ SyslogFacility=Iekārtas SyslogLevel=Līmenis SyslogSimpleFile=Fails SyslogFilename=Faila nosaukums un ceļš -YouCanUseDOL_DATA_ROOT=Jūs varat izmantot DOL_DATA_ROOT / dolibarr.log uz log failu Dolibarr "dokumenti" direktorijā. Jūs varat iestatīt citu ceļu, lai saglabātu šo failu. +YouCanUseDOL_DATA_ROOT=Jūs varat izmantot DOL_DATA_ROOT / dolibarr.log uz log failu Dolibarr "dokumenti" direktorijā. Jūs varat iestatīt citu ceļu, lai saglabātu šo failu. ErrorUnknownSyslogConstant=Constant %s nav zināms Syslog konstante OnlyWindowsLOG_USER=Windows atbalsta tikai LOG_USER ##### Donations ##### @@ -1380,14 +1386,14 @@ ActivateFCKeditor=Aktivizēt uzlabotas redaktoru, lai: FCKeditorForCompany=WYSIWYG izveidi / izdevums no elementiem apraksta un piezīmi (izņemot produktu / pakalpojumu) FCKeditorForProduct=WYSIWYG radīšana / izdevums produktu / pakalpojumu apraksts un atzīmēt FCKeditorForProductDetails=WYSIWYG izveidi / izdevums Produktu detaļu pozīcijās attiecībā uz visām iestādēm (priekšlikumi, rīkojumi, rēķini, utt ..) Brīdinājums:. Izmantojot šo iespēju, lai šajā gadījumā ir nopietni nav recommanded, jo tas var radīt problēmas ar speciālām zīmēm un lapas formating, kad ēka PDF failus. -FCKeditorForMailing= WYSIWYG izveidi / izdevums masveida emailings (Tools-> e-pastu) +FCKeditorForMailing= WYSIWYG izveide/ izdevums masveida emailings (Tools-> e-pastu) FCKeditorForUserSignature=WYSIWYG izveidi / izdevums lietotāja parakstu -FCKeditorForMail=WYSIWYG izveidi / izdevums visām vēstulēm (izņemot Outils-> e-pastu) +FCKeditorForMail=WYSIWYG izveidi / izdevums visām vēstulēm (izņemot Outils-> e-pastu) ##### OSCommerce 1 ##### OSCommerceErrorConnectOkButWrongDatabase=Savienojums izdevās, bet datu bāzē neizskatās būt OsCommerce datubāzi (Pamatrādītāji %s nav atrasts galda %s). -OSCommerceTestOk=Savienojums ar serveri "%s" par datu bāzē "%s" ar lietotāja %s "sekmīgi pabeigta. -OSCommerceTestKo1=Savienojums ar serveri "%s" izdoties, bet datubāze "%s" nevar sasniegt. -OSCommerceTestKo2=Savienojums ar serveri "%s" ar lietotāja "%s" neizdevās. +OSCommerceTestOk=Savienojums ar serveri '%s' par datu bāzē '%s' ar lietotāja '%s' sekmīgi pabeigta. +OSCommerceTestKo1=Savienojums ar serveri '%s' izdoties, bet datubāze '%s' nevar sasniegt. +OSCommerceTestKo2=Savienojums ar serveri '%s' ar lietotāja '%s' neizdevās. ##### Stock ##### StockSetup=Konfigurācijas modulis akciju UserWarehouse=Izmantojiet lietotāja personīgos krājumus @@ -1416,7 +1422,7 @@ DetailLangs=Lang faila nosaukumu etiķetes kodu tulkošanai DetailUser=Iekšējie / Ārējie / Visi Target=Mērķis DetailTarget=Mērķis saitēm (_blank top atvērts jauns logs) -DetailLevel=Līmenis (-1: top menu, 0: header menu,> 0 izvēlne un apakšizvēlne) +DetailLevel=Līmenis (-1: top menu, 0: header menu >0 izvēlne un apakšizvēlne) ModifMenu=Izvēlnes maiņa DeleteMenu=Dzēst izvēlnes ierakstu ConfirmDeleteMenu=Vai tiešām vēlaties dzēst izvēlnes ierakstu %s ? @@ -1429,7 +1435,7 @@ OptionVATDefault=Standarts OptionVATDebitOption=Variants pakalpojumi par debetu OptionVatDefaultDesc=PVN ir jāmaksā:
    - Piegādes laikā precēm (mēs izmantojam rēķina datumu)
    - Par maksājumiem par pakalpojumiem OptionVatDebitOptionDesc=PVN ir jāmaksā:
    - Piegādes laikā precēm (mēs izmantojam rēķina datumu)
    - Par rēķinu (debets) attiecībā uz pakalpojumiem -SummaryOfVatExigibilityUsedByDefault=Laiks PVN exigibility pēc noklusējuma saskaņā ar choosed iespēju: +SummaryOfVatExigibilityUsedByDefault=Time of VAT exigibility by default according to chosen option: OnDelivery=Piegādes brīdī OnPayment=Par samaksu OnInvoice=Uz rēķina @@ -1446,7 +1452,7 @@ AccountancyCodeBuy=Iegādāties kontu. kods AgendaSetup=Notikumi un kārtības modulis uzstādīšana PasswordTogetVCalExport=Galvenais atļaut eksporta saiti PastDelayVCalExport=Neeksportē notikums vecāki par -AGENDA_USE_EVENT_TYPE=Use events types (managed into menu Setup -> Dictionnary -> Type of agenda events) +AGENDA_USE_EVENT_TYPE=Use events types (managed into menu Setup -> Dictionary -> Type of agenda events) ##### ClickToDial ##### ClickToDialDesc=Šis modulis ļauj pievienot ikonu pēc tālruņa numuriem. Uz šīs ikonas, noklikšķiniet sauksim serveri ar īpašu URL, noteikt turpmāk. To var izmantot, lai izsauktu zvanu centrs sistēmu no Dolibarr kas var telefona numuru, uz SIP sistēmu, piemēram,. ##### Point Of Sales (CashDesk) ##### @@ -1469,7 +1475,7 @@ EndPointIs=SOAP klientiem jānosūta savus lūgumus Dolibarr beigu pieejama Url ##### Bank ##### BankSetupModule=Bankas moduļa uzstādīšana FreeLegalTextOnChequeReceipts=Bez teksta uz čeku ieņēmumiem -BankOrderShow=Displejs secībā bankas kontu valstīm, izmantojot "sīki bankas numurs" +BankOrderShow=Displejs secībā bankas kontu valstīm, izmantojot "sīki bankas numurs" BankOrderGlobal=Vispārējs BankOrderGlobalDesc=Vispārējā displejs rīkojums BankOrderES=Spāņu @@ -1487,7 +1493,7 @@ PathToGeoIPMaxmindCountryDataFile=Ceļš uz failu, kas satur MaxMind ip uz valst NoteOnPathLocation=Ņemiet vērā, ka jūsu ip uz valsts datu failā jābūt iekšā direktoriju jūsu PHP var lasīt (uz Jūsu PHP open_basedir iestatīšanu un filesystem atļaujas). YouCanDownloadFreeDatFileTo=Jūs varat lejupielādēt bezmaksas demo versiju MaxMind GeoIP valsts failu no %s. YouCanDownloadAdvancedDatFileTo=Jūs varat arī lejupielādēt pilnīgāku versiju, ar jaunumiem, no MaxMind GeoIP valsts failu no %s. -TestGeoIPResult=Tests pārveides IP -> valsts +TestGeoIPResult=Tests pārveides IP -> valsts ##### Projects ##### ProjectsNumberingModules=Projekti numerācijas modulis ProjectsSetup=Projekta moduļa uzstādīšana @@ -1499,4 +1505,4 @@ ECMSetup = GED Setup ECMAutoTree = Automātiska koku mapes un dokumentu -Format=Format +Format=Formāts diff --git a/htdocs/langs/lv_LV/agenda.lang b/htdocs/langs/lv_LV/agenda.lang index a4e83e5ef5f..7f4bcb3a32f 100644 --- a/htdocs/langs/lv_LV/agenda.lang +++ b/htdocs/langs/lv_LV/agenda.lang @@ -18,11 +18,11 @@ Location=Atrašanās vieta EventOnFullDay=Notikums visu -ām dienu -ām SearchAnAction= Meklēt notikumu/uzdevumu MenuToDoActions= Visi nepabeigtie pasākumi -MenuDoneActions= Visi izbeigta notikumi +MenuDoneActions= Visi izbeigtie notikumi MenuToDoMyActions= Mani nepabeigtie notikumi -MenuDoneMyActions= Mani izbeigta notikumi +MenuDoneMyActions= Mani izbeigtie notikumi ListOfEvents= Dolibarr notikumu saraksts -ActionsAskedBy=Notikumi ziņoja +ActionsAskedBy=Notikumu ziņoja ActionsToDoBy=Pasākums piešķirts ActionsDoneBy=Pasākumi, ko veikušas AllMyActions= Visi mani notikumi/uzdevumi @@ -43,7 +43,7 @@ InvoiceBackToDraftInDolibarr=Rēķins %s doties atpakaļ uz melnrakstu InvoiceDeleteDolibarr=Rēķins %s dzēsts OrderValidatedInDolibarr= Pasūtījums %s pārbaudīts OrderApprovedInDolibarr=Pasūtījums %s apstiprināts -OrderRefusedInDolibarr=Order %s refused +OrderRefusedInDolibarr=Pasūtījums %s atteikts OrderBackToDraftInDolibarr=Pasūtījums %s doties atpakaļ uz melnrakstu OrderCanceledInDolibarr=Pasūtījums %s atcelts InterventionValidatedInDolibarr=Intervences %s apstiprināts @@ -53,7 +53,7 @@ InvoiceSentByEMail=Klienta rēķins %s nosūtīts pa e-pastu SupplierOrderSentByEMail=Piegādātāja pasūtījums %s nosūtīts pa e-pastu SupplierInvoiceSentByEMail=Piegādātāja rēķins %s nosūtīts pa e-pastu ShippingSentByEMail=Piegāde %s nosūtīta pa pastu -ShippingValidated= Shipping %s validated +ShippingValidated= Piegāde %s apstiprināta InterventionSentByEMail=Intervences %s nosūtīta pa pastu NewCompanyToDolibarr= Trešā puses izveidota DateActionPlannedStart= Plānotais sākuma datums @@ -78,5 +78,5 @@ ExtSites=Importēt ārējos kalendārus ExtSitesEnableThisTool=Rādīt ārējos kalendārus programmā ExtSitesNbOfAgenda=Kalendāru skaits AgendaExtNb=Kalendārs nb %s -ExtSiteUrlAgenda=URL, lai piekļūtu. ICal failu +ExtSiteUrlAgenda=URL, lai piekļūtu. ICal failam ExtSiteNoLabel=Nav Apraksta diff --git a/htdocs/langs/lv_LV/bills.lang b/htdocs/langs/lv_LV/bills.lang index d21ebe2a373..58f9eb05557 100644 --- a/htdocs/langs/lv_LV/bills.lang +++ b/htdocs/langs/lv_LV/bills.lang @@ -11,7 +11,7 @@ BillsSuppliersUnpaidForCompany=Neapmaksātie piegādātāja -u rēķini %s BillsLate=Kavētie maksājumi BillsStatistics=Klienta-u rēķinu statistika BillsStatisticsSuppliers=Piegādātāja-u rēķinu statistika -DisabledBecauseNotErasable=Bloķēts, jo nevar izdzēst +DisabledBecauseNotErasable=Bloķēts, jo nedrīkst dzēst InvoiceStandard=Standarta rēķins InvoiceStandardAsk=Standarta rēķins InvoiceStandardDesc=Šis rēķins veids ir kopīgs rēķins. @@ -24,7 +24,7 @@ InvoiceProFormaDesc=Formāta rēķins ir attēls patiesu rēķina, bet na InvoiceReplacement=Nomaiņa rēķins InvoiceReplacementAsk=Nomaiņa rēķins par rēķinu InvoiceReplacementDesc=Replacement invoice is used to cancel and replace completely an invoice with no payment already received.

    Note: Only invoices with no payment on it can be replaced. If the invoice you replace is not yet closed, it will be automatically closed to 'abandoned'. -InvoiceAvoir=Kredīts piezīme +InvoiceAvoir=Kredīta piezīme InvoiceAvoirAsk=Kredītu piezīmi, lai koriģētu rēķinu InvoiceAvoirDesc=Kredīts piezīme ir negatīvs rēķins izmantot, lai atrisinātu to, ka rēķins ir summa, kas atšķiras par summu, patiesībā maksā (jo klients maksā pārāk daudz kļūdas dēļ, vai arī nav samaksāta pilnībā, jo viņš atgriezās dažus produktus, piemēram). invoiceAvoirWithLines=Create Credit Note with lines from the origin invoice @@ -212,7 +212,7 @@ SendReminderBillByMail=Sūtīt atgādinājumu pa e-pastu RelatedCommercialProposals=Saistītie tirdzniecības priekšlikumi MenuToValid=Lai derīgs DateMaxPayment=Maksājums jāveic līdz -DateEcheance=Izpildes datums robeža +DateEcheance=Izpildes datums DateInvoice=Rēķina datums NoInvoice=Nav rēķinu ClassifyBill=Klasificēt rēķinu @@ -297,7 +297,7 @@ RelatedBill=Saistītie rēķins RelatedBills=Saistītie rēķini # PaymentConditions -PaymentConditionShortRECEP=Tūlītējs +PaymentConditionShortRECEP=Tūlītēja PaymentConditionRECEP=Nekavējoties PaymentConditionShort30D=30 dienas PaymentCondition30D=30 dienas @@ -315,7 +315,6 @@ PaymentConditionShortPT_5050=50-50 PaymentConditionPT_5050=50%% iepriekš, 50%% uz piegādes FixAmount=Noteikt daudzumu VarAmount=Mainīgais apjoms (%% tot.) - # PaymentType PaymentTypeVIR=Bankas noguldījums PaymentTypeShortVIR=Bankas noguldījums @@ -365,7 +364,7 @@ LawApplicationPart2=preces paliek īpašumā LawApplicationPart3=pārdevējs kamēr pilnīga Čeka LawApplicationPart4=to cenu. LimitedLiabilityCompanyCapital=SARL ar galvaspilsētu -UseLine=Pieteikties +UseLine=Pielietot UseDiscount=Izmantot atlaidi UseCredit=Izmantot kredītu UseCreditNoteInInvoicePayment=Samazināt summu maksāt ar šo kredītu diff --git a/htdocs/langs/lv_LV/boxes.lang b/htdocs/langs/lv_LV/boxes.lang index dedefeb493c..a731beb2c38 100644 --- a/htdocs/langs/lv_LV/boxes.lang +++ b/htdocs/langs/lv_LV/boxes.lang @@ -1,11 +1,11 @@ # Dolibarr language file - Source file is en_US - boxes BoxLastRssInfos=RSS informācija BoxLastProducts=Pēdējie %s produkti / pakalpojumi -BoxProductsAlertStock=Produkti pārdošanā brīdinājumu +BoxProductsAlertStock=Produktu pārdošanā brīdinājumi BoxLastProductsInContract=Pēdējās %s līgumi produktu / pakalpojumu BoxLastSupplierBills=Pēdējais piegādātāja rēķins -BoxLastCustomerBills=Pagājušā klienta rēķini -BoxOldestUnpaidCustomerBills=Vecākās bezalgas klienta rēķini +BoxLastCustomerBills=Pēdējie klientu rēķini +BoxOldestUnpaidCustomerBills=Vecākās neapmaksātais klienta rēķins BoxOldestUnpaidSupplierBills=Vecākās bezalgas piegādātāja rēķinus BoxLastProposals=Pēdējie tirdzniecības priekšlikumi BoxLastProspects=Pēdējās modificēti perspektīvas @@ -18,7 +18,7 @@ BoxLastContracts=Pēdējie līgumi BoxLastContacts=Pēdējie kontakti/adreses BoxLastMembers=Pēdējie dalībnieki BoxFicheInter=Pēdējie pasākumi -# BoxCurrentAccounts=Opened accounts balance +BoxCurrentAccounts=Atvērtā konta bilance BoxSalesTurnover=Apgrozījums BoxTotalUnpaidCustomerBills=Kopējie neapmaksātie klientu rēķini BoxTotalUnpaidSuppliersBills=Kopējie neapmaksātie piegādātāju rēķini @@ -43,7 +43,7 @@ BoxTitleLastModifiedMembers=Pēdējie %s labotie dalībnieki BoxTitleLastFicheInter=Pēdējās %s modificēts iejaukšanās BoxTitleOldestUnpaidCustomerBills=Vecākais %s neapmaksātais klienta'u rēķins BoxTitleOldestUnpaidSupplierBills=Vecākie %s neapmaksātie piegādātāja'u rēķini -# BoxTitleCurrentAccounts=Opened account's balances +BoxTitleCurrentAccounts=Atvērto kontu bilances BoxTitleSalesTurnover=Apgrozījums BoxTitleTotalUnpaidCustomerBills=Nesamaksātie klienta(-u) rēķini BoxTitleTotalUnpaidSuppliersBills=Neapmaksātie piegādātāja -u rēķini diff --git a/htdocs/langs/lv_LV/cashdesk.lang b/htdocs/langs/lv_LV/cashdesk.lang index efb3a7aa710..6943f846fec 100644 --- a/htdocs/langs/lv_LV/cashdesk.lang +++ b/htdocs/langs/lv_LV/cashdesk.lang @@ -12,15 +12,15 @@ CashDeskProducts=Produkti CashDeskStock=Krājumi CashDeskOn=uz CashDeskThirdParty=Trešās puses -CashdeskDashboard=Tirdzniecības vietu piekļuvi +CashdeskDashboard=Tirdzniecības vietu piekļuve ShoppingCart=Iepirkumu grozs NewSell=Jauna pārdošana BackOffice=Back office AddThisArticle=Pievienot šo rakstu -RestartSelling=Iet atpakaļ uz pārdot -SellFinished=Pārdod pabeigts +RestartSelling=Iet atpakaļ uz pārdošanu +SellFinished=Pārdošana pabeigta PrintTicket=Drukāt biļeti -NoProductFound=Nav rakstu atrasts +NoProductFound=Raksts nav atrasts ProductFound=Produkts atrasts ProductsFound=produkti atrasti NoArticle=Nav rakstu @@ -37,4 +37,4 @@ ShowCompany=Rādīt uzņēmumu ShowStock=Rādīt noliktavu DeleteArticle=Klikšķiniet, lai izņemtu šo rakstu FilterRefOrLabelOrBC=Meklēšana (Ref/Nosaukums) -# UserNeedPermissionToEditStockToUsePos=You ask to decrease stock on invoice creation, so user that use POS need to have permission to edit stock. +UserNeedPermissionToEditStockToUsePos=Jūs vēlaties samazināt krājumus rēķinu izveides brīdī. Lietotājs, kas izmanto POS nepieciešama atļauja rediģēt krājumus. diff --git a/htdocs/langs/lv_LV/categories.lang b/htdocs/langs/lv_LV/categories.lang index 501c2a2faaa..7307e7a8029 100644 --- a/htdocs/langs/lv_LV/categories.lang +++ b/htdocs/langs/lv_LV/categories.lang @@ -66,7 +66,7 @@ ReturnInCompany=Atpakaļ uz klienta / izredzes kartes ContentsVisibleByAll=Saturs būs redzams visiem ContentsVisibleByAllShort=Saturs redzams visiem ContentsNotVisibleByAllShort=Saturs nav redzami visi -# CategoriesTree=Categories tree +CategoriesTree=Sadaļu koks DeleteCategory=Dzēst kategoriju ConfirmDeleteCategory=Vai tiešām vēlaties dzēst šo sadaļu? RemoveFromCategory=Noņemt saiti ar Categorie @@ -88,7 +88,7 @@ ThisCategoryHasNoCustomer=Šī kategorija nesatur klientu. ThisCategoryHasNoMember=Šajā kategorijā nav nekādu locekli. ThisCategoryHasNoContact=Šajā kategorijā nav nekādu kontaktu. AssignedToCustomer=Piešķirts klientam -AssignedToTheCustomer=Piešķir klientam +AssignedToTheCustomer=Piešķirts klientam InternalCategory=Iekšējā sadaļa CategoryContents=Sadaļas saturs CategId=Sadaļas id @@ -105,9 +105,9 @@ CatProdLinks=Saiknes starp produktu / pakalpojumu un kategoriju CatCusLinks=Saiknes starp klientu / perspektīvām un kategorijām CatSupLinks=Saikne starp piegādātājiem un kategorijām DeleteFromCat=Noņemt no sadaļas -# DeletePicture=Picture delete -# ConfirmDeletePicture=Confirm picture deletion? -# ExtraFieldsCategories=Complementary attributes -# CategoriesSetup=Categories setup -# CategorieRecursiv=Link with parent category automatically -# CategorieRecursivHelp=If activated, product will also linked to parent category when adding into a subcategory +DeletePicture=Dzēst attēlu +ConfirmDeletePicture=Apstiprināt attēla dzēšanu +ExtraFieldsCategories=Complementary attributes +CategoriesSetup=Sadaļas iestatījumi +CategorieRecursiv=Link with parent category automatically +CategorieRecursivHelp=If activated, product will also linked to parent category when adding into a subcategory diff --git a/htdocs/langs/lv_LV/companies.lang b/htdocs/langs/lv_LV/companies.lang index f5c85afbc49..8f7fe0c4dbb 100644 --- a/htdocs/langs/lv_LV/companies.lang +++ b/htdocs/langs/lv_LV/companies.lang @@ -18,6 +18,7 @@ NewCompany=Jauns uzņēmums (perspektīva, klients, piegādātājs) NewThirdParty=Jauna trešā persona (perspektīva, klients, piegādātājs) NewSocGroup=Jauna uzņēmumu grupa NewPrivateIndividual=Jauna privātpersona (perspektīva, klients, piegādātājs) +CreateDolibarrThirdPartySupplier=Izveidot trešo pusi (pegādātjs) ProspectionArea=Apzināšanas lauks SocGroup=Uzņēmumu grupa IdThirdParty=Trešās personas Id @@ -82,7 +83,7 @@ DefaultLang=Valoda pēc noklusējuma VATIsUsed=PVN tiek izmantots VATIsNotUsed=PVN netiek izmantots CopyAddressFromSoc=Aizpildiet trešās puses adresi -# NoEmailDefined=There is no email defined +NoEmailDefined=Nav definēta e-pasta adrese ##### Local Taxes ##### LocalTax1IsUsedES= Tiek izmantots RE LocalTax1IsNotUsedES= RE netiek izmantots @@ -363,10 +364,10 @@ ExportCardToFormat=Eksporta karti formātā ContactNotLinkedToCompany=Kontakts nav saistīts ar trešajām personām DolibarrLogin=Dolibarr pieteikšanās NoDolibarrAccess=Nav Dolibarr piekļuve -# ExportDataset_company_1=Third parties (Companies/foundations/physical people) and properties +ExportDataset_company_1=Trešās puses (Kompānijas/dibinājums/fiziski cilvēki) un īpašumi ExportDataset_company_2=Kontakti un rekvizīti -# ImportDataset_company_1=Third parties (Companies/foundations/physical people) and properties -# ImportDataset_company_2=Contacts/Addresses (of thirdparties or not) and attributes +ImportDataset_company_1=Third parties (Companies/foundations/physical people) and properties +ImportDataset_company_2=Kontakti/Adreses (trešo pušu vai arī nē) ImportDataset_company_3=Bankas rekvizīti PriceLevel=Cenu līmenis DeliveriesAddress=Piegādes adreses @@ -400,9 +401,9 @@ InActivity=Atvērt ActivityCeased=Slēgts ActivityStateFilter=Aktivitātes statuss ProductsIntoElements=Produktu saraksts uz -# CurrentOutstandingBill=Current outstanding bill +CurrentOutstandingBill=Current outstanding bill OutstandingBill=Maks. par izcilu rēķinu -# OutstandingBillReached=Reached max. for outstanding bill +OutstandingBillReached=Sasniedza maks. par izcilu rēķinu MonkeyNumRefModelDesc=Atgriešanās Numero ar formātu %syymm-NNNN par klientu kodu un %syymm-NNNN forsupplier kodu, kur gg ir gads, MM ir mēnesis, un nnnn ir secība bez pārtraukuma un bez atgriezties 0. LeopardNumRefModelDesc=Kods ir bez maksas. Šo kodu var mainīt jebkurā laikā. -# ManagingDirectors=Manager(s) name (CEO, director, president...) +ManagingDirectors=Menedžera(u) vārds (CEO, direktors, prezidents...) diff --git a/htdocs/langs/lv_LV/compta.lang b/htdocs/langs/lv_LV/compta.lang index a4204362be0..f7adafbe2da 100644 --- a/htdocs/langs/lv_LV/compta.lang +++ b/htdocs/langs/lv_LV/compta.lang @@ -30,7 +30,7 @@ Profit=Peļņa Balance=Bilance Debit=Debets Credit=Kredīts -# Piece=Accounting Doc. +Piece=Accounting Doc. Withdrawal=Atsaukšana Withdrawals=Izņemts AmountHTVATRealReceived=Neto iekasēto @@ -41,20 +41,20 @@ VATToCollect=PVN pirkumi VATSummary=PVN Bilance LT2SummaryES=IRPF Bilance VATPaid=Samaksātais PVN -# SalaryPaid=Salary paid +SalaryPaid=Salary paid LT2PaidES=IRPF Maksas LT2CustomerES=IRPF pārdošanu LT2SupplierES=IRPF pirkumi VATCollected=Iekasētā PVN ToPay=Jāsamaksā ToGet=Lai saņemtu atpakaļ -# SpecialExpensesArea=Area for all special paiements +SpecialExpensesArea=Area for all special payments TaxAndDividendsArea=Nodokļi, sociālās iemaksas un dividendes zona SocialContribution=Sociālās iemaksas SocialContributions=Sociālās iemaksas -# MenuSpecialExpenses=Special expenses +MenuSpecialExpenses=Īpašie izdevumi MenuTaxAndDividends=Nodokļi un dividendes -# MenuSalaries=Salaries +MenuSalaries=Algas MenuSocialContributions=Sociālās iemaksas MenuNewSocialContribution=Jauns ieguldījums NewSocialContribution=Jauns sociālās iemaksas @@ -66,15 +66,15 @@ Payments=Maksājumi PaymentCustomerInvoice=Klienta rēķinu apmaksa PaymentSupplierInvoice=Piegādātāju rēķinu apmaksa PaymentSocialContribution=Sociālo iemaksu maksājumi -PaymentVat=PVN maksāšanas -# PaymentSalary=Salary payment +PaymentVat=PVN maksājumi +PaymentSalary=Algu maksājumi ListPayment=Maksājumu saraksts ListOfPayments=Maksājumu saraksts ListOfCustomerPayments=Saraksts klientu maksājumu ListOfSupplierPayments=Saraksts piegādātāja maksājumu DatePayment=Maksājuma datums -# DateStartPeriod=Date start period -# DateEndPeriod=Date end period +DateStartPeriod=Date start period +DateEndPeriod=Datums un periods NewVATPayment=Jauns PVN maksājums newLT2PaymentES=Jauns IRPF maksājums LT2PaymentES=IRPF Maksājumu @@ -167,7 +167,7 @@ AccountancyDashboard=Grāmatvedība kopsavilkums ByProductsAndServices=Ar precēm un pakalpojumiem RefExt=Ārējā ref ToCreateAPredefinedInvoice=Lai izveidotu iepriekš rēķinu, izveidot standarta rēķinu, tad, bez apstiprinot to, noklikšķiniet uz pogas "Konvertēt uz iepriekš rēķinu". -# LinkedOrder=linked to order +LinkedOrder=linked to order ReCalculate=Pārrēķināt Mode1=Metode 1 Mode2=Metode 2 @@ -175,11 +175,11 @@ CalculationRuleDesc=Lai aprēķinātu kopējo PVN, ir divas metodes:
    1 meto CalculationRuleDescSupplier=no piegādātāja, izvēlēties piemērotu metodi piemērot pašu aprēķina noteikumu un iegūt tādu pašu rezultātu sagaida savu piegādātāju. TurnoverPerProductInCommitmentAccountingNotRelevant=Apgrozījums ziņojums par produktu, izmantojot skaidras naudas uzskaites režīmu nav nozīmes. Šis ziņojums ir pieejams tikai tad, ja izmanto saderināšanās grāmatvedības režīmu (skat. iestatīšanu grāmatvedības moduli). CalculationMode=Aprēķinu režīms -# COMPTA_PRODUCT_BUY_ACCOUNT=Default accountancy code to buy products -# COMPTA_PRODUCT_SOLD_ACCOUNT=Default accountancy code to sell products -# COMPTA_SERVICE_BUY_ACCOUNT=Default accountancy code to buy services -# COMPTA_SERVICE_SOLD_ACCOUNT=Default accountancy code to sell services -# COMPTA_VAT_ACCOUNT=Default accountancy code for collecting VAT -# COMPTA_VAT_BUY_ACCOUNT=Default accountancy code for paying VAT +COMPTA_PRODUCT_BUY_ACCOUNT=Default accountancy code to buy products +COMPTA_PRODUCT_SOLD_ACCOUNT=Default accountancy code to sell products +COMPTA_SERVICE_BUY_ACCOUNT=Default accountancy code to buy services +COMPTA_SERVICE_SOLD_ACCOUNT=Default accountancy code to sell services +COMPTA_VAT_ACCOUNT=Default accountancy code for collecting VAT +COMPTA_VAT_BUY_ACCOUNT=Default accountancy code for paying VAT COMPTA_ACCOUNT_CUSTOMER=Grāmatvedība kods pēc noklusējuma klientu thirdparties COMPTA_ACCOUNT_SUPPLIER=Grāmatvedība kods pēc noklusējuma piegādātāja thirdparties diff --git a/htdocs/langs/lv_LV/contracts.lang b/htdocs/langs/lv_LV/contracts.lang index 5ccb04035c9..fd068a06acf 100644 --- a/htdocs/langs/lv_LV/contracts.lang +++ b/htdocs/langs/lv_LV/contracts.lang @@ -89,6 +89,8 @@ ListOfServicesToExpireWithDuration=Pakalpojumu sarakstu beidzas %s dienās ListOfServicesToExpireWithDurationNeg=Saraksts pakalpojumu beidzies no vairāk nekā %s dienas ListOfServicesToExpire=Saraksts pakalpojumu beigsies NoteListOfYourExpiredServices=Šajā sarakstā ir tikai pakalpojumu līgumi par trešo pušu jums ir saistītas kā pārdošanas pārstāvis. +StandardContractsTemplate=Standard contracts template +ContactNameAndSignature=For %s, name and signature: ##### Types de contacts ##### TypeContact_contrat_internal_SALESREPSIGN=Tirdzniecības pārstāvis, parakstot līgumu, diff --git a/htdocs/langs/lv_LV/cron.lang b/htdocs/langs/lv_LV/cron.lang index 8e1cbb1547f..cead5aed64c 100644 --- a/htdocs/langs/lv_LV/cron.lang +++ b/htdocs/langs/lv_LV/cron.lang @@ -1,43 +1,27 @@ # Dolibarr language file - Source file is en_US - cron -# # About page -# About = Par CronAbout = Par Cron CronAboutPage = Cron par lapu - -# # Right -# Permission23101 = Lasīt plānoto uzdevumu Permission23102 = Izveidot/atjaunināt plānoto uzdevumu Permission23103 = Dzēst plānoto uzdevumu Permission23104 = Izpildīt plānoto uzdevumu - -# # Admin -# CronSetup= Plānotais darbu vadības iestatīšana -# URLToLaunchCronJobs=URL to check and launch cron jobs if required -# OrToLaunchASpecificJob=Or to check and launch a specific job +URLToLaunchCronJobs=URL to check and launch cron jobs if required +OrToLaunchASpecificJob=Or to check and launch a specific job KeyForCronAccess=Drošības atslēga URL uzsākt cron darbavietas FileToLaunchCronJobs=Komandrindas uzsākt cron darbavietas CronExplainHowToRunUnix=Par Unix vidē, jums vajadzētu izmantot crontab palaist komandrindas viena otras minūtes CronExplainHowToRunWin=Microsoft (tm), Windows environement jūs varat izmantot regulāro uzdevums rīkus, lai palaistu komandrindas viena otras minūtes - - -# # Menu -# CronJobs=Plānotais darba vietas CronListActive= Saraksts aktīvo darbu CronListInactive= Saraksts ar invaliditāti darba vietas CronListActive= Saraksts aktīvo darbu - - -# # Page list -# CronDateLastRun=Pēdējā run CronLastOutput=Pēdējo reizi palaist izejas CronLastResult=Pēdējais rezultāts kods @@ -70,10 +54,7 @@ CronLabel=Apraksts CronNbRun=Nb. sākt CronEach=Katru JobFinished=Darba uzsākta un pabeigta - -# #Page card -# CronAdd= Pievienot darbu CronHourStart= Starta laiks un uzdevuma datumu CronEvery= Un izpildīt uzdevumu katrā @@ -95,20 +76,12 @@ CronObjectHelp=Objekta nosaukums, lai slodze.
    Par exemple atnest metodi Dol CronMethodHelp=Objekts metode, lai palaistu.
    Par exemple atnest metodi Dolibarr Produkta objekts / htdocs / produktu / klase / product.class.php, metodes vērtība ir ir fecth CronArgsHelp=Šī metode argumentus.
    Par exemple atnest metodi Dolibarr Produkta objekts / htdocs / produktu / klase / product.class.php, no paramters vērtība var būt 0, ProductRef CronCommandHelp=Sistēma komandrindas izpildīt. - -# # Info -# CronInfoPage=Informācija - - -# # Common -# CronType=Darba veids CronType_method=Zvanu metode ir Dolibarr klases CronType_command=Shell komandu CronMenu=Cron CronCannotLoadClass=Nevar ielādēt klases %s vai objektu %s - UseMenuModuleToolsToAddCronJobs=Iet uz izvēlni "Home - moduļi instrumenti - Darbs sarakstu", lai redzētu un rediģēt plānoto darbu. diff --git a/htdocs/langs/lv_LV/deliveries.lang b/htdocs/langs/lv_LV/deliveries.lang index 99119bd0bf7..6c21f0b4e71 100644 --- a/htdocs/langs/lv_LV/deliveries.lang +++ b/htdocs/langs/lv_LV/deliveries.lang @@ -23,4 +23,4 @@ GoodStatusDeclaration=Ir saņēmuši preces iepriekš labā stāvoklī, Deliverer=Piegādātājs: Sender=Nosūtītājs Recipient=Saņēmējs -# ErrorStockIsNotEnough=There's not enough stock +ErrorStockIsNotEnough=Nav pietiekami daudz krājumu diff --git a/htdocs/langs/lv_LV/dict.lang b/htdocs/langs/lv_LV/dict.lang index cdf2273b0c8..20d22986f1d 100644 --- a/htdocs/langs/lv_LV/dict.lang +++ b/htdocs/langs/lv_LV/dict.lang @@ -253,23 +253,22 @@ CivilityMR=Kungs CivilityMLE=Ms CivilityMTRE=Meistars CivilityDR=Doktors - ##### Currencies ##### Currencyeuros=Eiro CurrencyAUD=AU dolāri CurrencySingAUD=AU dolārs -CurrencyCAD=CAN dolāri -CurrencySingCAD=CAN dolārs +CurrencyCAD=Kanādas dolāri +CurrencySingCAD=Kanādas dolārs CurrencyCHF=Šveices franks CurrencySingCHF=Šveices franks CurrencyEUR=Eiro CurrencySingEUR=Eiro CurrencyFRF=Francijas franki CurrencySingFRF=Francijas franks -CurrencyGBP=GB mārciņas -CurrencySingGBP=GB mārciņa +CurrencyGBP=Lielbritānijas mārciņas +CurrencySingGBP=Lielbritānijas mārciņa CurrencyINR=Indijas rūpijas -CurrencySingINR=Indijas rūpiju +CurrencySingINR=Indijas rūpija CurrencyMAD=Dirhams CurrencySingMAD=Dirhams CurrencyMGA=Ariary @@ -290,10 +289,8 @@ CurrencyXOF=CFA franki BCEAO CurrencySingXOF=CFA Franc BCEAO CurrencyXPF=KZP franki CurrencySingXPF=CFP Franc - CurrencyCentSingEUR=cents CurrencyThousandthSingTND=tūkstošais - #### Input reasons ##### DemandReasonTypeSRC_INTE=Internets DemandReasonTypeSRC_CAMP_MAIL=Pasta kampaņu @@ -306,7 +303,6 @@ DemandReasonTypeSRC_WOM=No mutes mutē DemandReasonTypeSRC_PARTNER=Partneris DemandReasonTypeSRC_EMPLOYEE=Darbinieks DemandReasonTypeSRC_SPONSORING=Sponsorēšana - #### Paper formats #### PaperFormatEU4A0=Formāts 4A0 PaperFormatEU2A0=Formāts 2A0 diff --git a/htdocs/langs/lv_LV/exports.lang b/htdocs/langs/lv_LV/exports.lang index 3e75f1f5f98..70aa2b2c137 100644 --- a/htdocs/langs/lv_LV/exports.lang +++ b/htdocs/langs/lv_LV/exports.lang @@ -8,7 +8,7 @@ ImportableDatas=Importēšanai datu kopa SelectExportDataSet=Izvēlieties datu kopumu, kuru vēlaties eksportēt ... SelectImportDataSet=Izvēlieties datu kopumu, kuru vēlaties importēt ... SelectExportFields=Izvēlieties laukus, kurus vēlaties eksportēt, vai izvēlieties sākotnēji definētu eksporta profilu -SelectImportFields=Izvēlieties avota failu laukus, kurus vēlaties importēt un to mērķa jomā datubāzē, pārvietojot tos uz augšu un uz leju ar enkuru %s, vai arī izvēlieties sākotnēji definētu importa profil: +SelectImportFields=Choose source file fields you want to import and their target field in database by moving them up and down with anchor %s, or select a predefined import profile: NotImportedFields=Jomas avota failā nav importēti SaveExportModel=Saglabāt šo eksporta profilu, ja jūs plānojat atkārtoti izmantot to vēlāk ... SaveImportModel=Saglabāt šo importa profilu, ja jūs plānojat atkārtoti izmantot to vēlāk ... @@ -81,7 +81,7 @@ DoNotImportFirstLine=Neimportē pirmo rindiņu avota faila NbOfSourceLines=Skaits līniju avota failā NowClickToTestTheImport=Pārbaudiet importa rādītājus esat definējis. Ja tie ir pareizi, noklikšķiniet uz pogas "%s", lai palaistu simulāciju importa process (dati tiks mainīti jūsu datu bāzē, tas ir tikai simulācija uz brīdi) ... RunSimulateImportFile=Uzsākt importa simulāciju -FieldNeedSource=Tas rada datu bāzē fiels prasa datus no avota faila +FieldNeedSource=This field requires data from the source file SomeMandatoryFieldHaveNoSource=Daži obligātie lauki nav avotu, no datu faila InformationOnSourceFile=Informācija par avota failā InformationOnTargetTables=Informācija par mērķa laukiem @@ -102,14 +102,14 @@ NbOfLinesImported=Skaits līniju veiksmīgi importēto: %s. DataComeFromNoWhere=Vērtību, lai ievietotu nāk no nekur avota failā. DataComeFromFileFieldNb=Vērtību, lai ievietotu nāk no lauka skaits %s, kas avota failā. DataComeFromIdFoundFromRef=Vērtība, kas nāk no lauka numurs %s no avota fails tiks izmantoti, lai atrastu ID mātes objekta izmantot (Tātad Objet %s, kas ir ref. No avota failā ir pastāv uz Dolibarr). -# DataComeFromIdFoundFromCodeId=Code that comes from field number %s of source file will be used to find id of parent object to use (So the code from source file must exists into dictionary %s). Note that if you know id, you can also use it into source file instead of code. Import should work in both cases. +DataComeFromIdFoundFromCodeId=Code that comes from field number %s of source file will be used to find id of parent object to use (So the code from source file must exists into dictionary %s). Note that if you know id, you can also use it into source file instead of code. Import should work in both cases. DataIsInsertedInto=Dati, kas nāk no avota fails tiks ievietota pēc lauka: DataIDSourceIsInsertedInto=Mātes objekta atrasts izmantojot datus avota failā id, tiks ievietota pēc lauka: DataCodeIDSourceIsInsertedInto=Mātes līnijas atrasts no koda id, tiks ievietota šādā jomā: SourceRequired=Datu vērtība ir obligāta SourceExample=Piemērs par iespējamo datu vērtības ExampleAnyRefFoundIntoElement=Jebkura atsauce atrasts elementu %s -# ExampleAnyCodeOrIdFoundIntoDictionary=Any code (or id) found into dictionary %s +ExampleAnyCodeOrIdFoundIntoDictionary=Any code (or id) found into dictionary %s CSVFormatDesc=Ar komatu atdalītu vērtību failu formāts (. Csv).
    Tas ir teksta faila formāts, kur lauki ir atdalīti ar atdalītāju [%s]. Ja atdalītājs atrodas iekšpusē lauka saturu, lauks tiek noapaļota ar apaļo raksturs [%s]. Escape raksturs izvairīties apaļas raksturs ir [%s]. Excel95FormatDesc=Excel faila formātā (. Xls)
    Tas ir dzimtā Excel 95 formātā (BIFF5). Excel2007FormatDesc=Excel faila formātā (. Xlsx)
    Tas ir dzimtā Excel 2007 formātā (SpreadsheetML). @@ -123,10 +123,10 @@ BankCode=Bankas kods DeskCode=Desk kods BankAccountNumber=Konta numurs BankAccountNumberKey=Taustiņš -# SpecialCode=Special code -# ExportStringFilter=%% allows replacing one or more characters in the text -# ExportDateFilter='YYYY' 'YYYYMM' 'YYYYMMDD': filters by one year/month/day
    'YYYY+YYYY' 'YYYYMM+YYYYMM' 'YYYYMMDD+YYYYMMDD': filters over a range of years/months/days
    '>YYYY' '>YYYYMM' '>YYYYMMDD': filters on the following years/months/days
    '<YYYY' '<YYYYMM' '<YYYYMMDD': filters on the previous years/months/days -# ExportNumericFilter='NNNNN' filters by one value
    'NNNNN+NNNNN' filters over a range of values
    '>NNNNN' filters by lower values
    '>NNNNN' filters by higher values +SpecialCode=Special code +ExportStringFilter=%% allows replacing one or more characters in the text +ExportDateFilter='YYYY' 'YYYYMM' 'YYYYMMDD': filters by one year/month/day
    'YYYY+YYYY' 'YYYYMM+YYYYMM' 'YYYYMMDD+YYYYMMDD': filters over a range of years/months/days
    '>YYYY' '>YYYYMM' '>YYYYMMDD': filters on the following years/months/days
    '<YYYY' '<YYYYMM' '<YYYYMMDD': filters on the previous years/months/days +ExportNumericFilter='NNNNN' filters by one value
    'NNNNN+NNNNN' filters over a range of values
    '>NNNNN' filters by lower values
    '>NNNNN' filters by higher values ## filters SelectFilterFields=Ja jūs vēlaties filtrēt dažas vērtības, vienkārši ievadi vērtības šeit. FilterableFields=Champs Filtrables diff --git a/htdocs/langs/lv_LV/holiday.lang b/htdocs/langs/lv_LV/holiday.lang index bfaf7c93479..257ffa63666 100644 --- a/htdocs/langs/lv_LV/holiday.lang +++ b/htdocs/langs/lv_LV/holiday.lang @@ -8,7 +8,6 @@ NotActiveModCP=Jums ir ļaut modulis brīvdienas, lai apskatītu šo lapu. NotConfigModCP=Jums ir konfigurēt modulis brīvdienas, lai apskatītu šo lapu. Lai to izdarītu, noklikšķiniet šeit . NoCPforUser=Jums nav pieprasījumu pēc brīvdienām. AddCP=Pieteikties brīvdienām -CPErrorSQL=SQL kļūda: Employe=Darbinieks DateDebCP=Sākuma datums DateFinCP=Beigu datums @@ -142,9 +141,9 @@ HolidaysRefusedBody=Jūsu pieprasījums brīvdienās %s uz %s ir liegta šādu i HolidaysCanceled=Atceltās brīvdienas HolidaysCanceledBody=Jūsu pieprasījums brīvdienās %s uz %s ir atcelts. Permission20000=Read you own holidays -Permission20001=Create/modify your holidays -Permission20002=Create/modify holidays for everybody -Permission20003=Delete holidays requests +Permission20001=Izveidot/labot brīvdienas +Permission20002=Izveidot/labot brīvdienas visiem +Permission20003=Dzēst brīvdienu pieprasījumus Permission20004=Setup users holidays Permission20005=Pārskatīt žurnālu modificētu brīvdienas Permission20006=Read holidays monthly report diff --git a/htdocs/langs/lv_LV/install.lang b/htdocs/langs/lv_LV/install.lang index 86c4789df7a..32bf7eadf2a 100644 --- a/htdocs/langs/lv_LV/install.lang +++ b/htdocs/langs/lv_LV/install.lang @@ -6,7 +6,7 @@ ConfFileExists=Konfigurācijas fails %s eksistē. ConfFileDoesNotExists=Konfigurācijas fails %s neeksistē! ConfFileDoesNotExistsAndCouldNotBeCreated=Konfigurācijas fails %s nav un nevar tikt izveidots! ConfFileCouldBeCreated=Konfigurācijas failu %s var izveidot. -ConfFileIsNotWritable=Konfigurācijas failam %s nav rakstīšanas tiesības. Pārbaudiet atļaujas. Par pirmo instalēt, jūsu tīmekļa serveris ir jāpiešķir, lai varētu rakstīt šajā failā laikā konfigurācijas process ("chmod 666", piemēram, uz kā OS UNIX). +ConfFileIsNotWritable=Konfigurācijas failam %s nav rakstīšanas tiesības. Pārbaudiet atļaujas. Par pirmo instalēt, jūsu tīmekļa serveris ir jāpiešķir, lai varētu rakstīt šajā failā laikā konfigurācijas process ("chmod 666", piemēram, uz kā OS UNIX). ConfFileIsWritable=Konfigurācijas failā %s var ierakstīt. ConfFileReload=Pārlādēt visu informāciju no konfigurācijas faila. PHPSupportSessions=PHP atbalsta sesijas. @@ -48,7 +48,7 @@ DatabaseChoice=Datubāzes izvēle DatabaseType=Datubāzes tips DriverType=Driver tips Server=Serveris -ServerAddressDescription=Nosaukums vai IP adrese datu bāzes serveri, parasti "localhost", kad datu bāzes serveris ir izvietots uz paša servera, kā web serveri +ServerAddressDescription=Nosaukums vai IP adrese datu bāzes serveri, parasti 'localhost', kad datu bāzes serveris ir izvietots uz paša servera, kā web serveri ServerPortDescription=Datu bāzes servera ports. Atstājiet tukšu, ja nav zināms. DatabaseServer=Datubāzes serveris DatabaseName=Datubāzes nosaukums @@ -87,17 +87,17 @@ SetupEnd=Beigas iestatīšanas SystemIsInstalled=Instalācija ir pabeigta. SystemIsUpgraded=Dolibarr ir atjaunota veiksmīgi. YouNeedToPersonalizeSetup=Jums ir nepieciešams, lai konfigurētu Dolibarr, lai atbilstu jūsu vajadzībām (izskats, funkcijas, ...). Lai to izdarītu, lūdzu, sekojiet saitei zemāk: -AdminLoginCreatedSuccessfuly=Dolibarr Administrator Login "%s" izveidots successfuly. +AdminLoginCreatedSuccessfuly=Dolibarr Administrator Login '%s' izveidots successfuly. GoToDolibarr=Iet uz Dolibarr GoToSetupArea=Iet uz Dolibarr (iestatīšanas apgabalu) MigrationNotFinished=Versija jūsu datu bāzē, nav pilnībā atjaunināta, tāpēc jums ir, lai palaistu jaunināšanas procesu vēlreiz. GoToUpgradePage=Iet uz uzlabotu lapu vēlreiz Examples=Piemēri -WithNoSlashAtTheEnd=Bez slīpsvītru "/" beigās +WithNoSlashAtTheEnd=Bez slīpsvītras "/" beigās DirectoryRecommendation=Tas ir recommanded izmantot direktoriju ārpus jūsu direktoriju jūsu tīmekļa lapas. LoginAlreadyExists=Jau eksistē DolibarrAdminLogin=Dolibarr admin login -AdminLoginAlreadyExists=Dolibarr administratora konts "%s" jau eksistē. Iet atpakaļ, ja jūs vēlaties, lai izveidotu vēl vienu. +AdminLoginAlreadyExists=Dolibarr administratora konts '%s' jau eksistē. Dodieties atpakaļ, ja jūs vēlaties izveidot vēl vienu kontu. WarningRemoveInstallDir=Brīdinājums, drošības apsvērumu dēļ, kad instalēt vai jaunināšana ir pabeigta, izvairīties no instalētu rīku atkal, jums vajadzētu pievienot failu ar nosaukumu install.lock uz Dolibarr dokumentu direktoriju, lai novērstu ļaunprātīgu izmantošanu, tā. ThisPHPDoesNotSupportTypeBase=Šis PHP sistēma neatbalsta nevienu interfeisu, lai piekļūtu datu bāzes tipa %s FunctionNotAvailableInThisPHP=Nav pieejams šajā PHP versijā @@ -108,7 +108,7 @@ DatabaseMigration=Struktūra datu bāzes migrācija ProcessMigrateScript=Skripts darbojas ChooseYourSetupMode=Izvēlies savu instalācijas režīmu un noklikšķiniet uz "Sākt" ... FreshInstall=Svaiga instalēšana -FreshInstallDesc=Izmantojiet šo režīmu, ja tas ir jūsu pirmo reizi instalēt. Ja nē, šis režīms var izlabot nepilnīgu iepriekšējo instalēt, bet, ja jūs vēlaties uzlabot savu versiju, izvēlieties "Upgrade" režīmā. +FreshInstallDesc=Izmantojiet šo režīmu, ja tas ir jūsu pirmo reizi instalēt. Ja nē, šis režīms var izlabot nepilnīgu iepriekšējo instalēt, bet, ja jūs vēlaties uzlabot savu versiju, izvēlieties "Upgrade" režīmā. Upgrade=Atjaunot UpgradeDesc=Izmantojiet šo režīmu, ja esat nomainījis veco Dolibarr failus ar failiem no jaunāku versiju. Tas būs uzlabot savu datu bāzi un datus. Start=Sākt @@ -124,7 +124,7 @@ CharsetChoice=Rakstzīmju kopa izvēle CharacterSetClient=Rakstzīmju kopa, ko izmanto radīto HTML interneta lapas CharacterSetClientComment=Izvēlieties rakstzīmju kopu web displeju.
    Noklusējuma ierosinātā rakstzīmju kopa ir viens no jūsu datu bāzē. DBSortingCollation=Raksturs šķirošana, lai -DBSortingCollationComment=Izvēlieties lapas kodu, kas definē varoņa kārtošanas secību, ko izmanto datu bāzi. Šis parametrs ir arī sauc par "salīdzināšana", daži datu bāzēm.
    Šis parametrs nav definēts, ja datubāze jau eksistē. +DBSortingCollationComment=Izvēlieties lapas kodu, kas definē varoņa kārtošanas secību, ko izmanto datu bāzi. Šis parametrs ir arī sauc par 'salīdzināšana', daži datu bāzēm.
    Šis parametrs nav definēts, ja datubāze jau eksistē. CharacterSetDatabase=Rakstzīmju komplekts datu bāzē CharacterSetDatabaseComment=Izvēlieties rakstzīmju kopu gribēja datu bāzes izveidei.
    Šis parametrs nav definēts, ja datubāze jau eksistē. YouAskDatabaseCreationSoDolibarrNeedToConnect=Jūs lūdzat, lai izveidotu datu bāzi %s, bet par to, Dolibarr ir nepieciešams, lai izveidotu savienojumu ar serveri %s ar super lietotāja %s atļaujas. @@ -137,16 +137,16 @@ KeepDefaultValuesDeb=Jūs izmantojat Dolibarr iestatīšanas vedni no Linux pake KeepDefaultValuesMamp=Jūs izmantojat Dolibarr iestatīšanas vedni no DoliMamp, tāpēc vērtības ierosinātās šeit jau ir optimizēta. Mainīt tikai tad, ja jūs zināt, ko jūs darāt. KeepDefaultValuesProxmox=Jūs izmantojat Dolibarr iestatīšanas vedni no Proxmox virtuālās ierīces, tāpēc vērtības ierosinātās šeit jau ir optimizēta. Mainīt tikai tad, ja jūs zināt, ko jūs darāt. FieldRenamed=Lauks pārdēvēts -IfLoginDoesNotExistsCheckCreateUser=Ja pieteikšanās neeksistē vēl, jums ir pārbaudīt opciju "Izveidot lietotāju" -ErrorConnection=Server "%s", datu bāzes nosaukums "%s" login "%s", vai datu bāzes parole var būt nepareizi vai PHP klienta versijas var būt pārāk vecs, salīdzinot ar bāzes versiju. +IfLoginDoesNotExistsCheckCreateUser=Ja pieteikšanās neeksistē vēl, jums ir pārbaudīt opciju "Izveidot lietotāju" +ErrorConnection=Server "%s", datu bāzes nosaukums "%s" login "%s", vai datu bāzes parole var būt nepareizi vai PHP klienta versijas var būt pārāk vecs, salīdzinot ar bāzes versiju. InstallChoiceRecommanded=Ieteicams izvēlēties, lai instalētu versiju %s no jūsu pašreizējā versijā %s InstallChoiceSuggested=Instalējiet izvēli ierosināja uzstādītājam. MigrateIsDoneStepByStep=Mērķtiecīga versija (%s) ir plaisa vairākas versijas, tāpēc instalēt vednis nāks atpakaļ ieteikt nākamo migrāciju, kad tas viens būs pabeigts. CheckThatDatabasenameIsCorrect=Pārbaudiet, ka datubāzes nosaukums "%s" ir pareizs. IfAlreadyExistsCheckOption=Ja šis vārds ir pareizs un ka datu bāze neeksistē vēl, jums ir pārbaudīt opciju "Izveidot datu bāzi". OpenBaseDir=PHP openbasedir parametrs -YouAskToCreateDatabaseSoRootRequired=Jūs pārbauda kaste "Izveidot datu bāzi". Lai to izdarītu, jums ir nepieciešams, lai nodrošinātu login / paroles no superlietotājs (apakšējā formas). -YouAskToCreateDatabaseUserSoRootRequired=Jūs pārbauda kaste "Izveidot datu bāzes īpašnieks". Lai to izdarītu, jums ir nepieciešams, lai nodrošinātu login / paroles no superlietotājs (apakšējā formas). +YouAskToCreateDatabaseSoRootRequired=Jūs pārbauda kaste "Izveidot datu bāzi". Lai to izdarītu, jums ir nepieciešams, lai nodrošinātu login / paroles no superlietotājs (apakšējā formas). +YouAskToCreateDatabaseUserSoRootRequired=Jūs pārbauda kaste "Izveidot datu bāzes lietotāju". Lai to izdarītu, jums ir nepieciešams, lai nodrošinātu login / paroles no superlietotājs (apakšējā formas). NextStepMightLastALongTime=Pašreizējā posms var ilgt vairākas minūtes. Lūdzu, uzgaidiet, kamēr nākamais ekrāns tiek rādīts pilnīgi pirms turpināt. MigrationCustomerOrderShipping=Migrēt piegāde par klientu pasūtījumu uzglabāšanai MigrationShippingDelivery=Upgrade uzglabāšanu kuģniecības @@ -202,10 +202,10 @@ MigrationMenusDetail=Atjaunināt dinamisks izvēlnes tabulas MigrationDeliveryAddress=Atjaunināt piegādes adresi sūtījumiem MigrationProjectTaskActors=Datu migrācija uz llx_projet_task_actors galda MigrationProjectUserResp=Datu migrācija jomā fk_user_resp no llx_projet lai llx_element_contact -MigrationProjectTaskTime=Update pavadītais laiks sekundēs +MigrationProjectTaskTime=Atjaunināšanas laiks sekundēs MigrationActioncommElement=Atjaunināt informāciju par pasākumiem MigrationPaymentMode=Datu migrācija uz maksājumu režīmā MigrationCategorieAssociation=Kategoriju migrācija -ShowNotAvailableOptions=Show not available options -HideNotAvailableOptions=Hide not available options +ShowNotAvailableOptions=Rādīt nepieejamās iespējas +HideNotAvailableOptions=Slēpt nepieejamās iespējas diff --git a/htdocs/langs/lv_LV/languages.lang b/htdocs/langs/lv_LV/languages.lang index bc7fc0f8127..09c7a297bc6 100644 --- a/htdocs/langs/lv_LV/languages.lang +++ b/htdocs/langs/lv_LV/languages.lang @@ -19,8 +19,9 @@ Language_en_SA=Angļu (Saūda Arābija) Language_en_US=Angļu (ASV) Language_en_ZA=English (Dienvidāfrika) Language_es_ES=Spāņu +Language_es_DO=Spāņu (Dominikānas Republika) Language_es_AR=Spāņu (Argentīna) -Language_es_CL=Spanish (Chile) +Language_es_CL=Spāņu (Ķīle) Language_es_HN=Spāņu (Hondurasa) Language_es_MX=Spāņu (Meksika) Language_es_PY=Spāņu (Paragvaja) @@ -36,15 +37,16 @@ Language_fr_CH=Franču (Šveices) Language_fr_FR=Franču Language_fr_NC=Franču (Jaunkaledonija) Language_he_IL=Ebreju -Language_hr_HR=Horvātijas +Language_hr_HR=Horvātu Language_hu_HU=Ungāru +Language_id_ID=Indonēziešu Language_is_IS=Islandiešu Language_it_IT=Itāļu Language_ja_JP=Japāņu Language_ko_KR=Korejiešu Language_lt_LT=Lietuviešu Language_lv_LV=Latviešu -Language_mk_MK=Maķedonietis +Language_mk_MK=Maķedoniešu Language_nb_NO=Norvēģu (bukmols) Language_nl_BE=Holandiešu (Beļģijas) Language_nl_NL=Holandiešu (Nīderlandes) @@ -58,7 +60,7 @@ Language_tr_TR=Turku Language_sl_SI=Slovēņu Language_sv_SV=Zviedru Language_sv_SE=Zviedru -Language_sq_AL=Albanian +Language_sq_AL=Albāņu Language_sk_SK=Slovāku Language_th_TH=Thai Language_uk_UA=Ukraiņu diff --git a/htdocs/langs/lv_LV/mails.lang b/htdocs/langs/lv_LV/mails.lang index 5bfe574c4da..d2ea399d27a 100644 --- a/htdocs/langs/lv_LV/mails.lang +++ b/htdocs/langs/lv_LV/mails.lang @@ -79,10 +79,11 @@ MailtoEMail=Saite uz e-pastu ActivateCheckRead=Ļauj izmantot "Unsubcribe" saiti ActivateCheckReadKey=Galvenais izmantot, lai šifrētu URL izmantošanu, lai "izlasītu saņemšanai" un "Unsubcribe" funkciju EMailSentToNRecipients=E-pastu nosūtīja %s saņēmējiem. +XTargetsAdded=%s recipients added into target list EachInvoiceWillBeAttachedToEmail=A document using default invoice document template will be created and attached to each email. MailTopicSendRemindUnpaidInvoices=Reminder of invoice %s (%s) SendRemind=Send reminder by EMails -RemindSent=%s reminder(s) sent +RemindSent=%s atgādiājums(i) nosūtīti AllRecipientSelectedForRemind=All thirdparties selected and if an email is set (note that one mail per invoice will be sent) NoRemindSent=No EMail reminder sent ResultOfMassSending=Result of mass EMail reminders sending @@ -119,7 +120,7 @@ TargetsReset=Nodzēst sarakstu ToClearAllRecipientsClickHere=Klikšķiniet šeit, lai notīrītu adresātu sarakstu par šo pasta vēstuļu sūtīšanas ToAddRecipientsChooseHere=Pievienotu adresātus, izvēloties no sarakstiem NbOfEMailingsReceived=Masu emailings saņemti -NbOfEMailingsSend=Mass emailings sent +NbOfEMailingsSend=Masveida e-pasts izsūtīts IdRecord=ID ierakstu DeliveryReceipt=Piegāde saņemšana YouCanUseCommaSeparatorForSeveralRecipients=Jūs varat izmantot komatu atdalītāju, lai norādītu vairākus adresātus. diff --git a/htdocs/langs/lv_LV/main.lang b/htdocs/langs/lv_LV/main.lang index 42e6ce7a8f3..a92884acb19 100644 --- a/htdocs/langs/lv_LV/main.lang +++ b/htdocs/langs/lv_LV/main.lang @@ -315,7 +315,7 @@ SubTotal=Starpsumma TotalHTShort=Kopējais (neto) TotalTTCShort=Pavisam (ar PVN) TotalHT=Pavisam (bez PVN) -TotalHTforthispage=Total (net of tax) for this page +TotalHTforthispage=Kopā (bez PVN) šajā lapā TotalTTC=Pavisam (ar PVN) TotalTTCToYourCredit=Pavisam (ieskaitot nodokli), pie jūsu kredīta TotalVAT=Kopējā nodokļu @@ -551,6 +551,7 @@ MailSentBy=Nosūtīts e-pasts ar TextUsedInTheMessageBody=E-pasts ķermeņa SendAcknowledgementByMail=Send Ack. pa e-pastu NoEMail=Nav e-pasta +NoMobilePhone=Nav mob. tel. Owner=Īpašnieks DetectedVersion=Noteiktā versija FollowingConstantsWillBeSubstituted=Šādas konstantes tiks aizstāts ar atbilstošo vērtību. @@ -576,7 +577,7 @@ TotalWoman=Kopsumma TotalMan=Kopsumma NeverReceived=Nekad nav saņemts Canceled=Atcelts -YouCanChangeValuesForThisListFromDictionarySetup=You can change values for this list from menu setup - dictionary +YouCanChangeValuesForThisListFromDictionarySetup=Jūs varat mainīt vērtības šim sarakstam no iestatījumiem - vārdnīcas Color=Krāsa Documents=Piesaistītie faili DocumentsNb=Piesaistītie faili (%s) @@ -605,7 +606,7 @@ Notes=Piezīmes AddNewLine=Pievienot jaunu līniju AddFile=Pievienot failu ListOfFiles=Saraksts ar pieejamiem failiem -FreeZone=Free entry +FreeZone=Brīvs ieraksts FreeLineOfType=Free entry of type CloneMainAttributes=Klonēt objektu ar tā galvenajiem atribūtiem PDFMerge=Apvienot PDF @@ -640,7 +641,7 @@ IM=Tūlītējā ziņapmaiņa NewAttribute=Jauns atribūts AttributeCode=Atribūts kods OptionalFieldsSetup=Papildus atribūtu iestatīšana -URLPhoto=URL of photo/logo +URLPhoto=Saite bildei/logo SetLinkToThirdParty=Saite uz citu trešo pusei CreateDraft=Izveidot melnrakstu ClickToEdit=Klikšķiniet, lai rediģētu @@ -669,10 +670,10 @@ Access=Pieeja HelpCopyToClipboard=Izmantot taustiņu kombināciju Ctrl + C, lai kopētu SaveUploadedFileWithMask=Saglabāt failu uz servera ar nosaukumu "%s" (citādi "%s") OriginFileName=Oriģinālais faila nosaukums -SetDemandReason=Set source +SetDemandReason=Izvēlēties avotu ViewPrivateNote=Apskatīt piezīmes -XMoreLines=%s line(s) hidden -PublicUrl=Public URL +XMoreLines=%s līnija(as) noslēptas +PublicUrl=Publiskā saite # Week day Monday=Pirmdiena diff --git a/htdocs/langs/lv_LV/margins.lang b/htdocs/langs/lv_LV/margins.lang index a2c391f0130..a9974fc02f7 100644 --- a/htdocs/langs/lv_LV/margins.lang +++ b/htdocs/langs/lv_LV/margins.lang @@ -10,24 +10,18 @@ MarkRate=Mark likme DisplayMarginRates=Displeja maržinālās DisplayMarkRates=Displeja zīmju cenas InputPrice=Ieejas cena - margin=Peļņas norma vadība margesSetup=Peļņa vadības iestatīšanas - MarginDetails=Maržinālā detaļas - ProductMargins=Produktu rezerves CustomerMargins=Klientu robežas SalesRepresentativeMargins=Sales representative margins - ProductService=Produkts vai pakalpojums AllProducts=Visi produkti un pakalpojumi ChooseProduct/Service=Izvēlies preci vai pakalpojumu - StartDate=Sākuma datums EndDate=Beigu datums Launch=Sākt - ForceBuyingPriceIfNull=Force iepirkuma cena, ja null ForceBuyingPriceIfNullDetails=ja "ON", starpība būs nulle tiešsaistē (pirkšanas cena = pārdošanas cenu), pretējā gadījumā ("OFF"), Marge būs vienāda ar pārdošanas cenu (pirkšanas cena = 0) MARGIN_METHODE_FOR_DISCOUNT=Maržinālā metode pasaules atlaides @@ -35,16 +29,13 @@ UseDiscountAsProduct=Kā produktu UseDiscountAsService=Kā pakalpojums UseDiscountOnTotal=Par starpsummu MARGIN_METHODE_FOR_DISCOUNT_DETAILS=Nosaka, ja globālā atlaide tiek uzskatīts par produktu, pakalpojumu, vai tikai starpsumma starpības aprēķinu. - MARGIN_TYPE=Maržinālā veids MargeBrute=Raw rezerve MargeNette=Neto starpība MARGIN_TYPE_DETAILS=Raw rezervi: Pārdošanas cena - Pērk cena
    Neto starpība: Pārdošanas cena - Iepirkuma cena - CostPrice=Pašizmaksa BuyingCost=Pašizmaksa UnitCharges=Vienības izmaksas Charges=Maksas - AgentContactType=Commercial agent contact type AgentContactTypeDetails=Défine what contact type (linked on invoices) will be used for margin report by commercial agents diff --git a/htdocs/langs/lv_LV/members.lang b/htdocs/langs/lv_LV/members.lang index c63079ac4c9..2287bab6660 100644 --- a/htdocs/langs/lv_LV/members.lang +++ b/htdocs/langs/lv_LV/members.lang @@ -86,7 +86,6 @@ SubscriptionNotReceivedShort=Nekad nav saņēmusi ListOfSubscriptions=Saraksts abonementu SendCardByMail=Nosūtīt kartiņu pa e-pastu AddMember=Pievienot dalībnieku -MemberType=Dalībnieka veids NoTypeDefinedGoToSetup=Neviens loceklis veidiem definēts. Iet uz izvēlnes "deputātu veidiem" NewMemberType=Jauns dalībnieka veids WelcomeEMail=Welcome e-pastu @@ -171,6 +170,8 @@ LastSubscriptionAmount=Pēdējā parakstīšanās summu MembersStatisticsByCountries=Dalībnieku statistika pa valstīm MembersStatisticsByState=Dalībnieku statistika pēc valsts / province MembersStatisticsByTown=Dalībnieku statistika pa pilsētu +MembersStatisticsByRegion=Members statistics by region +MemberByRegion=Members by region NbOfMembers=Biedru skaits NoValidatedMemberYet=Nav apstiprinātas locekļi atrasti MembersByCountryDesc=Šis ekrāns parādīs statistiku par biedriem pa valstīm. Grafiskais tomēr ir atkarīga Google tiešsaistes grafiku pakalpojums un ir pieejama tikai tad, ja interneta pieslēgums darbojas. diff --git a/htdocs/langs/lv_LV/opensurvey.lang b/htdocs/langs/lv_LV/opensurvey.lang index a11fde0da62..2518a13d42b 100644 --- a/htdocs/langs/lv_LV/opensurvey.lang +++ b/htdocs/langs/lv_LV/opensurvey.lang @@ -1,18 +1,18 @@ # Dolibarr language file - Source file is en_US - opensurvey -# Survey=Poll -# Surveys=Polls -# OrganizeYourMeetingEasily=Organize your meetings and polls easily. First select type of poll... -# NewSurvey=New poll -# NoSurveysInDatabase=%s poll(s) into database. -# OpenSurveyArea=Polls area -# AddACommentForPoll=You can add a comment into poll... +Survey=Balsojums +Surveys=Balsojumi +OrganizeYourMeetingEasily=Organize your meetings and polls easily. First select type of poll... +NewSurvey=Jauna aptauja +NoSurveysInDatabase=%s poll(s) into database. +OpenSurveyArea=Aptaujas sadaļa +AddACommentForPoll=Jūs varat pievienot komentārus aptaujā AddComment=Pievienot komentāru CreatePoll=Izveidot aptauju PollTitle=Aptauja virsraksts -# ToReceiveEMailForEachVote=Receive an email for each vote +ToReceiveEMailForEachVote=Saņemt e-pastu par katru balsojumu TypeDate=Tipa datums TypeClassic=Tipa standarts -# OpenSurveyStep2=Select your dates amoung the free days (grey). The selected days are green. You can unselect a day previously selected by clicking again on it +OpenSurveyStep2=Select your dates amoung the free days (grey). The selected days are green. You can unselect a day previously selected by clicking again on it RemoveAllDays=Noņemt visas dienas CopyHoursOfFirstDay=Kopēt stundas pirmajā dienā RemoveAllHours=Noņemt visas stundas @@ -20,14 +20,14 @@ SelectedDays=Izvēlētās dienas TheBestChoice=Labākā izvēle šobrīd ir TheBestChoices=Labākā izvēle šobrīd ir with=ar -# OpenSurveyHowTo=If you agree to vote in this poll, you have to give your name, choose the values that fit best for you and validate with the plus button at the end of the line. +OpenSurveyHowTo=If you agree to vote in this poll, you have to give your name, choose the values that fit best for you and validate with the plus button at the end of the line. CommentsOfVoters=Balsotāju komentāri ConfirmRemovalOfPoll=Vai tiešām vēlaties noņemt šo aptauju (un visas balsis) RemovePoll=Noņemt aptauju -# UrlForSurvey=URL to communicate to get a direct access to poll -# PollOnChoice=You are creating a poll to make a multi-choice for a poll. First enter all possible choices for your poll: -# CreateSurveyDate=Create a date poll -# CreateSurveyStandard=Create a standard poll +UrlForSurvey=URL to communicate to get a direct access to poll +PollOnChoice=You are creating a poll to make a multi-choice for a poll. First enter all possible choices for your poll: +CreateSurveyDate=Create a date poll +CreateSurveyStandard=Izveidot standarta aptauju CheckBox=Vienkāršs rūtiņu YesNoList=Saraksts (tukšs/jā/nē) PourContreList=Saraksts (tukšs/par/pret) @@ -35,7 +35,7 @@ AddNewColumn=Pievienot jaunu kolonnu TitleChoice=Izvēlies nosaukumu ExportSpreadsheet=Eksporta rezultātu izklājlapu ExpireDate=Ierobežot datumu -# NbOfSurveys=Number of polls +NbOfSurveys=Number of polls NbOfVoters=Balsotāju skaits SurveyResults=Rezultāti PollAdminDesc=Jums ir atļauts mainīt visus balsot līnijas šajā aptaujā ar pogu "Edit". Jūs varat, kā arī, noņemt kolonnu vai ar %s līniju. Jūs varat arī pievienot jaunu kolonnu ar %s. @@ -57,10 +57,10 @@ CanComment=Balsotāji var komentēt aptauju CanSeeOthersVote=Balsotāji var redzēt citu cilvēku balsis SelectDayDesc=Attiecībā uz katru izvēlēto dienu, jūs varat izvēlēties, vai ne, tiekoties stundas šādā formātā:
    - Tukša,
    - "8h", "8H" vai "08:00", lai sniegtu tikšanos s starta stundu,
    - "8-11", "8h-11h", "8H-11H" vai "8:00-11:00", lai sniegtu sanāksmi sākuma un beigu stundu,
    - "8h15-11h15", "8H15-11H15" vai "8:15-11:15" par to pašu, bet ar minūtes. BackToCurrentMonth=Atpakaļ uz tekošā mēneša -# ErrorOpenSurveyFillFirstSection=You haven't filled the first section of the poll creation +ErrorOpenSurveyFillFirstSection=You haven't filled the first section of the poll creation ErrorOpenSurveyOneChoice=Ievadiet vismaz vienu iespēju -# ErrorOpenSurveyDateFormat=Date must have the format YYYY-MM-DD +ErrorOpenSurveyDateFormat=Datumam jābūt sekojošā formā YYYY-MM-DD ErrorInsertingComment=Kļūda pievienojot komentāru -# MoreChoices=Enter more choices for the voters -# SurveyExpiredInfo=The voting time of this poll has expired. -# EmailSomeoneVoted=%s has filled a line.\nYou can find your poll at the link: \n%s +MoreChoices=Enter more choices for the voters +SurveyExpiredInfo=The voting time of this poll has expired. +EmailSomeoneVoted=%s has filled a line.\nYou can find your poll at the link: \n%s diff --git a/htdocs/langs/lv_LV/orders.lang b/htdocs/langs/lv_LV/orders.lang index e04af5d7451..6c726322d2f 100644 --- a/htdocs/langs/lv_LV/orders.lang +++ b/htdocs/langs/lv_LV/orders.lang @@ -101,7 +101,6 @@ RelatedOrders=Saistītie pasūtījumi OnProcessOrders=Šajā procesā pasūtījumiem RefOrder=Ref. pasūtījuma RefCustomerOrder=Ref. klienta rīkojums -CustomerOrder=Klienta rīkojums RefCustomerOrderShort=Ref. Cust. pasūtījums SendOrderByMail=Nosūtīt pasūtījumu pa pastu ActionsOnOrder=Notikumi pēc pasūtījuma @@ -132,8 +131,6 @@ Error_COMMANDE_ADDON_NotDefined=Pastāvīga COMMANDE_ADDON nav noteikts Error_FailedToLoad_COMMANDE_SUPPLIER_ADDON_File=Neizdevās ielādēt moduļa failu "%s" Error_FailedToLoad_COMMANDE_ADDON_File=Neizdevās ielādēt moduļa failu '%s' Error_OrderNotChecked=Nav pasūtījumus izvēlētā rēķina - - # Sources OrderSource0=Commercial priekšlikums OrderSource1=Internets @@ -144,7 +141,6 @@ OrderSource5=Tirdzniecības OrderSource6=Glabājiet QtyOrdered=Pasūtītais daudzums AddDeliveryCostLine=Pievienot piegādes izmaksu līnijas, kas norāda svaru pasūtījuma - # Documents models PDFEinsteinDescription=Pilnīgā kārtībā modelis (logo. ..) PDFEdisonDescription=Vienkāršs pasūtīt modeli @@ -155,7 +151,6 @@ OrderByFax=Faksa OrderByEMail=E-Mail OrderByWWW=Online OrderByPhone=Telefons - CreateInvoiceForThisCustomer=Rēķinu pasūtījumi NoOrdersToInvoice=Nav pasūtījumi apmaksājamo CloseProcessedOrdersAutomatically=Klasificēt "apstrādā" visus atlasītos pasūtījumus. @@ -165,4 +160,4 @@ Ordered=Sakārtots OrderCreated=Jūsu pasūtījumi ir radīti OrderFail=Kļūda notika laikā jūsu pasūtījumu radīšanu CreateOrders=Izveidot pasūtījumus -# ToBillSeveralOrderSelectCustomer=To create an invoice for several orders, click first onto customer, then choose "%s". +ToBillSeveralOrderSelectCustomer=To create an invoice for several orders, click first onto customer, then choose "%s". diff --git a/htdocs/langs/lv_LV/other.lang b/htdocs/langs/lv_LV/other.lang index dfd9468da13..c1f1ec065e7 100644 --- a/htdocs/langs/lv_LV/other.lang +++ b/htdocs/langs/lv_LV/other.lang @@ -45,9 +45,9 @@ Notify_MEMBER_SUBSCRIPTION=Dalībvalsts parakstītā Notify_MEMBER_RESILIATE=Biedrs resiliated Notify_MEMBER_DELETE=Biedrs svītrots Notify_PROJECT_CREATE=Projekts izveidots -Notify_TASK_CREATE=Task created -Notify_TASK_MODIFY=Task modified -Notify_TASK_DELETE=Task deleted +Notify_TASK_CREATE=Uzdevums izveidots +Notify_TASK_MODIFY=Uzdevums labots +Notify_TASK_DELETE=Uzdevums dzēsts NbOfAttachedFiles=Skaits pievienotos failus / dokumentus TotalSizeOfAttachedFiles=Kopējais apjoms pievienotos failus / dokumentus MaxSize=Maksimālais izmērs @@ -57,8 +57,8 @@ Miscellaneous=Dažādi NbOfActiveNotifications=Paziņojumu skaits PredefinedMailTest=Šis ir testa e-pasts \\ nthe divas līnijas ir atdalīti ar rakstatgriezi.. \n\n __ SIGNATURE__ PredefinedMailTestHtml=Tas ir tests pasts (vārds testam jābūt treknrakstā).
    Abas līnijas ir atdalīti ar rakstatgriezi.

    __SIGNATURE__ -PredefinedMailContentSendInvoice=__CONTACTCIVNAME__\n\nYou will find here the invoice __FACREF__\n\n__PERSONALIZED__Sincerely\n\n__SIGNATURE__ -PredefinedMailContentSendInvoiceReminder=__CONTACTCIVNAME__\n\nWe would like to warn you that the invoice __FACREF__ seems to not being payed. So this is the invoice in attachment again, as a reminder.\n\n__PERSONALIZED__Sincerely\n\n__SIGNATURE__ +PredefinedMailContentSendInvoice=__CONTACTCIVNAME__\n\n\nYou will find here the invoice __FACREF__\n\n\n__PERSONALIZED__Sincerely\n\n\n__SIGNATURE__ +PredefinedMailContentSendInvoiceReminder=__CONTACTCIVNAME__\n\n\nWe would like to warn you that the invoice __FACREF__ seems to not being payed. So this is the invoice in attachment again, as a reminder.\n\n\n__PERSONALIZED__Sincerely\n\n\n\n__SIGNATURE__ PredefinedMailContentSendProposal=__CONTACTCIVNAME__\n\nYou will find here the commercial proposal __PROPREF__\n\n__PERSONALIZED__Sincerely\n\n__SIGNATURE__ PredefinedMailContentSendOrder=__CONTACTCIVNAME__\n\nYou will find here the order __ORDERREF__\n\n__PERSONALIZED__Sincerely\n\n__SIGNATURE__ PredefinedMailContentSendSupplierOrder=__CONTACTCIVNAME__\n\nYou will find here our order __ORDERREF__\n\n__PERSONALIZED__Sincerely\n\n__SIGNATURE__ diff --git a/htdocs/langs/lv_LV/paypal.lang b/htdocs/langs/lv_LV/paypal.lang index 51a482e2cf3..a0dca54fae5 100644 --- a/htdocs/langs/lv_LV/paypal.lang +++ b/htdocs/langs/lv_LV/paypal.lang @@ -21,5 +21,5 @@ NewPaypalPaymentReceived=Jauns Paypal maksājums saņemts NewPaypalPaymentFailed=Jauns Paypal maksājumu mēģināju, bet neizdevās PAYPAL_PAYONLINE_SENDEMAIL=E-pastu, lai brīdinātu pēc maksājuma (veiksme vai ne) ReturnURLAfterPayment=Return URL after payment -ValidationOfPaypalPaymentFailed=Validation of Paypal payment failed +ValidationOfPaypalPaymentFailed=Paypal rēķina apmaksas pārbaude neizdevās PaypalConfirmPaymentPageWasCalledButFailed=Payment confirmation page for Paypal was called by Paypal but confirmation failed diff --git a/htdocs/langs/lv_LV/products.lang b/htdocs/langs/lv_LV/products.lang index 8dcf6523934..6f77e30c48b 100644 --- a/htdocs/langs/lv_LV/products.lang +++ b/htdocs/langs/lv_LV/products.lang @@ -5,7 +5,7 @@ ProductServiceCard=Produktu / Pakalpojumu kartiņa Products=Produkti Services=Pakalpojumi Product=Produkts -Service=Apkalpošana +Service=Pakalpojums ProductId=Produkta / pakalpojuma id Create=Izveidot Reference=Atsauce @@ -28,8 +28,10 @@ ProductsAndServicesStatistics=Produktu un pakalpojumu statistika ProductsStatistics=Produktu statistika ProductsOnSell=Pieejamie produkti ProductsNotOnSell=Novecojušie produkti +ProductsOnSellAndOnBuy=Prece netiek pārdota un netiek iepirkta ServicesOnSell=Pieejamie pakalpojumi ServicesNotOnSell=Novecojušie pakalpojumi +ServicesOnSellAndOnBuy=Pakalpojums netiek pārdots un netiek iepirkts InternalRef=Iekšējā atsauce LastRecorded=Jaunākie produkti / pakalpojumi par pārdot reģistrē LastRecordedProductsAndServices=Pēdējie %s reģistrētie produkti / pakalpojumi @@ -46,8 +48,8 @@ WarehouseOpened=Noliktava atvērta WarehouseClosed=Noliktava slēgta Stock=Krājums Stocks=Krājumi -Movement=Kustība -Movements=Kustības +Movement=Pārvietošana +Movements=Pārvietošanas Sell=Pārdošanas Buy=Iepirkumi OnSell=Pārdošanai @@ -66,10 +68,12 @@ AppliedPricesFrom=Piemērotās cenas no SellingPrice=Pārdošanas cena SellingPriceHT=Pārdošanas cena (bez PVN) SellingPriceTTC=Pārdošanas cena (ar PVN) -PublicPrice=Sabiedrības cena +PublicPrice=Publiskā cena CurrentPrice=Pašreizējā cena NewPrice=Jaunā cena MinPrice=Min. pārdošanas cena +MinPriceHT=Minimālā pārdošanas cena (bez PVN) +MinPriceTTC=Minimālā pārdošanas cena (ar PVN) CantBeLessThanMinPrice=Pārdošanas cena nevar būt zemāka par minimālo pieļaujamo šī produkta (%s bez PVN). Šis ziņojums var būt arī parādās, ja esat ievadījis pārāk lielu atlaidi. ContractStatus=Līguma statuss ContractStatusClosed=Slēgts @@ -94,12 +98,12 @@ AddToMyBills=Pievienot rēķinus AddToOtherBills=Pievienot pie citiem rēķiniem CorrectStock=Labot krājumus AddPhoto=Pievienot foto -ListOfStockMovements=Saraksts krājumu pārvietošanu +ListOfStockMovements=Krājumu pārvietošanas saraksts BuyingPrice=Pirkšanas cena -SupplierCard=Piegādātājs karte +SupplierCard=Piegādātāju kartiņa CommercialCard=Commercial karte AllWays=Ceļš, lai atrastu savu produktu noliktavā -NoCat=Jūsu produkts nav nevienā kategorijā +NoCat=Jūsu produkts nav nevienā sadaļā PrimaryWay=Primārā ceļš PriceRemoved=Cena noņemta BarCode=Svītrkods @@ -112,7 +116,7 @@ ServiceLimitedDuration=Ja produkts ir pakalpojums ir ierobežots darbības laiks MultiPricesAbility=Several level of prices per product/service MultiPricesNumPrices=Cenu skaits MultiPriceLevelsName=Cenu kategorijas -AssociatedProductsAbility=Aktivizētu virtuālo produktiem funkciju +AssociatedProductsAbility=Aktivizētu virtuālo produktu funkciju AssociatedProducts=Virtuāls produkts AssociatedProductsNumber=Produktu skaits kas veido šo virtuālo produktu ParentProductsNumber=Skaits mātes virtuālā produkta @@ -131,7 +135,7 @@ ProductParentList=Saraksts virtuālo produktu / pakalpojumu ar šo produktu kā ErrorAssociationIsFatherOfThis=Viens no izvēlētā produkta mātes ar pašreizējo produktu DeleteProduct=Dzēst produktu / pakalpojumu ConfirmDeleteProduct=Vai tiešām vēlaties dzēst šo produktu / pakalpojumu? -ProductDeleted=Produkts / Pakalpojums "%s" svītro no datu bāzes. +ProductDeleted=Produkts / Pakalpojums "%s" dzēsts no datubāzes. DeletePicture=Izdzēstu attēlu ConfirmDeletePicture=Vai tiešām vēlaties izdzēst šo attēlu? ExportDataset_produit_1=Produkti @@ -148,7 +152,7 @@ Restock=Atjaunotu ProductSpecial=Īpašs QtyMin=Minimālais Daudzums PriceQty=Cena par šo daudzumu -PriceQtyMin=Cena par šo min. Daudzums (w / o atlaide) +PriceQtyMin=Cena par šo min. daudzums (bez atlaides) VATRateForSupplierProduct=PVN likme (šim piegādātājam / produktam) DiscountQtyMin=Noklusējuma atlaide qty NoPriceDefinedForThisSupplier=Nē cena / gab definētas šim piegādātājam / produktu @@ -164,14 +168,14 @@ PredefinedServicesToPurchase=Predefined services to purchase PredefinedProductsAndServicesToPurchase=Predefined products/services to puchase GenerateThumb=Izveidot īkšķi ProductCanvasAbility=Izmantot īpašu "audekls" addons -ServiceNb=Pakalpojumu # %s +ServiceNb=Pakalpojums # %s ListProductServiceByPopularity=Saraksts ar produktu / pakalpojumu pēc pārdošanas popularitātes ListProductByPopularity=Produktu saraksts pēc popularitātes ListServiceByPopularity=Pakalpojumu saraksts pēc pārdošanas popularitātes Finished=Ražota prece RowMaterial=Izejviela -CloneProduct=Klons produkts vai pakalpojums -ConfirmCloneProduct=Vai jūs tiešām vēlaties, lai klons produktu vai pakalpojumu %s? +CloneProduct=Klonēt produktu vai pakalpojumu +ConfirmCloneProduct=Vai jūs tiešām vēlaties klonēt šo produktu vai pakalpojumu %s? CloneContentProduct=Klons visus galvenos informations par produktu / pakalpojumu ClonePricesProduct=Klons galvenos informations un cenas CloneCompositionProduct=Clone virtual product/services @@ -179,21 +183,22 @@ ProductIsUsed=Šis produkts tiek izmantots NewRefForClone=Ref. jaunu produktu / pakalpojumu CustomerPrices=Klientu cenas SuppliersPrices=Piegādātāju cenas +SuppliersPricesOfProductsOrServices=Piegādātāju cenas (preču vai pakalpojumu) CustomCode=Muitas kods CountryOrigin=Izcelsmes valsts HiddenIntoCombo=Slēpta vērā izvēlieties sarakstos Nature=Daba -ProductCodeModel=Product ref template -ServiceCodeModel=Service ref template +ProductCodeModel=Produkta art. paraugs +ServiceCodeModel=Pakalpojuma art. paraugs AddThisProductCard=Izveidot produkta karti HelpAddThisProductCard=Šī iespēja ļauj izveidot vai klons produktu, ja tas neeksistē. AddThisServiceCard=Izveidot dienesta apliecība HelpAddThisServiceCard=Šī iespēja ļauj izveidot vai klons pakalpojumu, ja tas neeksistē. CurrentProductPrice=Pašreizējā cena -AlwaysUseNewPrice=Vienmēr izmantot pašreizējo cenu produkta / pakalpojuma -AlwaysUseFixedPrice=Izmantojiet fiksētu cenu +AlwaysUseNewPrice=Vienmēr izmantot pašreizējo cenu produktam / pakalpojumam +AlwaysUseFixedPrice=Izmantot fiksētu cenu PriceByQuantity=Cena pēc daudzuma -PriceByQuantityRange=Daudzums diapazons +PriceByQuantityRange=Daudzuma diapazons ProductsDashboard=Produkti / Pakalpojumi kopsavilkums UpdateOriginalProductLabel=Modificēt sākotnējo etiķeti HelpUpdateOriginalProductLabel=Ļauj, lai rediģētu produkta nosaukumu @@ -208,6 +213,7 @@ CostPmpHT=Neto kopā VWAP ProductUsedForBuild=Auto patērē uzrādot ProductBuilded=Ražošanas pabeigta ProductsMultiPrice=Produkts multi-cena +ProductsOrServiceMultiPrice=Klientu cenas (precēm pakalpojumiem, mult enas) ProductSellByQuarterHT=Produkti apgrozījums ceturksnī VWAP ServiceSellByQuarterHT=Pakalpojumi apgrozījums ceturksnī VWAP Quarter1=1. Ceturksnis @@ -227,9 +233,9 @@ DefinitionOfBarCodeForThirdpartyNotComplete=Definition of type or value of bar c BarCodeDataForProduct=Barcode information of product %s : BarCodeDataForThirdparty=Barcode information of thirdparty %s : ResetBarcodeForAllRecords=Define barcode value for all records (this will also reset barcode value already defined with new values) -PriceByCustomer=Price by customer -PriceCatalogue=Unique price per product/service -PricingRule=Pricing Rules +PriceByCustomer=Klienta cena +PriceCatalogue=Unikāla cena poduktam/pakalpojumam +PricingRule=Cenu veidošanas noteikumi AddCustomerPrice=Add price by customers ForceUpdateChildPriceSoc=Set same price on customer subsidiaries PriceByCustomerLog=Price by customer log diff --git a/htdocs/langs/lv_LV/projects.lang b/htdocs/langs/lv_LV/projects.lang index 7b7bf2bf007..54661f1865f 100644 --- a/htdocs/langs/lv_LV/projects.lang +++ b/htdocs/langs/lv_LV/projects.lang @@ -1,5 +1,5 @@ # Dolibarr language file - Source file is en_US - projects -# RefProject=Ref. project +RefProject=Ref. project ProjectId=Projekta ID Project=Projekts Projects=Projekti @@ -32,10 +32,10 @@ TimeSpent=Laiks, kas pavadīts TimesSpent=Laiks, kas patērēts RefTask=Ref. uzdevums LabelTask=Label uzdevums -# TaskTimeSpent=Time spent on tasks -# TaskTimeUser=User -# TaskTimeNote=Note -# TaskTimeDate=Date +TaskTimeSpent=Time spent on tasks +TaskTimeUser=Lietotājs +TaskTimeNote=Piezīme +TaskTimeDate=Datums NewTimeSpent=Jauns pavadītais laiks MyTimeSpent=Mans laiks pavadīts MyTasks=Mani uzdevumi @@ -106,15 +106,18 @@ ProjectReportDate=Mainīt uzdevumu datums atbilstoši projekta sākuma datumu ErrorShiftTaskDate=Nav iespējams novirzīt uzdevumu datumu saskaņā ar jaunu projektu uzsākšanas datuma ProjectsAndTasksLines=Projekti un uzdevumi ProjectCreatedInDolibarr=Projekta %s izveidots +TaskCreatedInDolibarr=Uzdevums %s izveidots +TaskModifiedInDolibarr=Uzdevums %s labots +TaskDeletedInDolibarr=Uzdevums %s dzēsts ##### Types de contacts ##### TypeContact_project_internal_PROJECTLEADER=Projekta vadītājs TypeContact_project_external_PROJECTLEADER=Projekta vadītājs -# TypeContact_project_internal_PROJECTCONTRIBUTOR=Contributor -# TypeContact_project_external_PROJECTCONTRIBUTOR=Contributor +TypeContact_project_internal_PROJECTCONTRIBUTOR=Ieguldītājs +TypeContact_project_external_PROJECTCONTRIBUTOR=Ieguldītājs TypeContact_project_task_internal_TASKEXECUTIVE=Uzdevums izpildvaras TypeContact_project_task_external_TASKEXECUTIVE=Uzdevums izpildvaras -# TypeContact_project_task_internal_TASKCONTRIBUTOR=Contributor -# TypeContact_project_task_external_TASKCONTRIBUTOR=Contributor +TypeContact_project_task_internal_TASKCONTRIBUTOR=Ieguldītājs +TypeContact_project_task_external_TASKCONTRIBUTOR=Ieguldītājs SelectElement=Izvēlieties elementu AddElement=Saite uz elementa # Documents models diff --git a/htdocs/langs/lv_LV/salaries.lang b/htdocs/langs/lv_LV/salaries.lang index edca71a1829..18b4acbec94 100644 --- a/htdocs/langs/lv_LV/salaries.lang +++ b/htdocs/langs/lv_LV/salaries.lang @@ -1,8 +1,8 @@ # Dolibarr language file - Source file is en_US - users -Salary=Salary -Salaries=Salaries -Employee=Employee -NewSalaryPayment=New salary payment -SalaryPayment=Salary payment -SalariesPayments=Salaries payments -ShowSalaryPayment=Show salary payment +Salary=Alga +Salaries=Algas +Employee=Darbinieks +NewSalaryPayment=Jauna algas izmaksa +SalaryPayment=Algas maksājums +SalariesPayments=Algu maksājumi +ShowSalaryPayment=Rādīt algu maksājumus diff --git a/htdocs/langs/lv_LV/shop.lang b/htdocs/langs/lv_LV/shop.lang index 0b2f6697161..c8a38f179f3 100644 --- a/htdocs/langs/lv_LV/shop.lang +++ b/htdocs/langs/lv_LV/shop.lang @@ -1,4 +1,5 @@ # Dolibarr language file - Source file is en_US - shop +FailedConnectDBCheckModuleSetup=Failed to connect to oscommerce database. Check your module setup Shop=Veikals ShopWeb=Interneta veikals LastOrders=Pēdējie pasūtījumi diff --git a/htdocs/langs/lv_LV/stocks.lang b/htdocs/langs/lv_LV/stocks.lang index 954168b049a..30f05d9b28a 100644 --- a/htdocs/langs/lv_LV/stocks.lang +++ b/htdocs/langs/lv_LV/stocks.lang @@ -7,7 +7,7 @@ WarehouseEdit=Modificēt noliktavas MenuNewWarehouse=Jauna noliktava WarehouseOpened=Noliktava atvērts WarehouseClosed=Noliktava slēgts -WarehouseSource=Avots noliktava +WarehouseSource=Sākotnējā noliktava WarehouseSourceNotDefined=Nē noliktava noteikts, AddOne=Pievieno vienu WarehouseTarget=Mērķa noliktava @@ -18,14 +18,14 @@ Stock=Krājums Stocks=Krājumi Movement=Kustība Movements=Kustības -ErrorWarehouseRefRequired=Noliktava atskaites nosaukums ir obligāts +ErrorWarehouseRefRequired=Noliktava nosaukums ir obligāts ErrorWarehouseLabelRequired=Noliktavas nosaukums ir nepieciešams CorrectStock=Labot krājumus ListOfWarehouses=Saraksts noliktavās ListOfStockMovements=Krājumu pārvietošanas saraksts StocksArea=Krājumi platība Location=Vieta -LocationSummary=Īsais nosaukums atrašanās vieta +LocationSummary=Īsais atrašanās vietas nosaukums NumberOfDifferentProducts=Skaits dažādu produktu NumberOfProducts=Kopējais produktu skaits LastMovement=Pēdējā pārvietošana @@ -112,6 +112,7 @@ ReplenishmentOrdersDesc=Šis ir saraksts ar visiem atvērtajiem piegādātāju p Replenishments=Papildinājumus NbOfProductBeforePeriod=Daudzums produktu %s noliktavā pirms izvēlētajā periodā (<%s) NbOfProductAfterPeriod=Daudzums produktu %s krājumā pēc izvēlētā perioda (> %s) +MassMovement=Masveida pārvietošana MassStockMovement=Masveida krājumu pārvietošana SelectProductInAndOutWareHouse=Izvēlieties produktu, daudzumu, avota noliktavu un mērķa noliktavu, tad noklikšķiniet uz "%s". Kad tas ir izdarīts visām nepieciešamajām kustībām, noklikšķiniet uz "%s". RecordMovement=Ierakstīt transfert diff --git a/htdocs/langs/lv_LV/suppliers.lang b/htdocs/langs/lv_LV/suppliers.lang index 792383df03b..25ba65c548f 100644 --- a/htdocs/langs/lv_LV/suppliers.lang +++ b/htdocs/langs/lv_LV/suppliers.lang @@ -12,7 +12,7 @@ OrderDate=Pasūtīt datumu BuyingPrice=Pirkšanas cena BuyingPriceMin=Minimālā iepirkuma cena BuyingPriceMinShort=Min pirkuma cena -# TotalBuyingPriceMin=Total of subproducts buying prices +TotalBuyingPriceMin=Total of subproducts buying prices SomeSubProductHaveNoPrices=Dažiem apakšproduktiem nav norādītas cenas AddSupplierPrice=Pievienot piegādātāju cenu ChangeSupplierPrice=Mainīt piegādātāju cenu diff --git a/htdocs/langs/lv_LV/trips.lang b/htdocs/langs/lv_LV/trips.lang index 0552cdb1580..38f09dc35ef 100644 --- a/htdocs/langs/lv_LV/trips.lang +++ b/htdocs/langs/lv_LV/trips.lang @@ -8,7 +8,7 @@ AddTrip=Pievienot ceļojumu ListOfTrips=Saraksts braucieniem ListOfFees=Saraksts maksu NewTrip=Jauns brauciens -CompanyVisited=Kompānija / nodibinājums apmeklēja +CompanyVisited=Kompānija / organizācija apmeklēta Kilometers=Kilometri FeesKilometersOrAmout=Summa vai kilometri DeleteTrip=Dzēst ceļojumu diff --git a/htdocs/langs/lv_LV/users.lang b/htdocs/langs/lv_LV/users.lang index 7287f61c2cd..db0e8ba1a20 100644 --- a/htdocs/langs/lv_LV/users.lang +++ b/htdocs/langs/lv_LV/users.lang @@ -1,5 +1,5 @@ # Dolibarr language file - Source file is en_US - users -HRMArea=HRM area +HRMArea=HRM sadaļa UserCard=Lietotāja karte ContactCard=Kontaktu karte GroupCard=Grupas karte @@ -22,8 +22,8 @@ DeleteUser=Izdzēst DeleteAUser=Dzēst lietotāju DisableGroup=Bloķēt DisableAGroup=Bloķēt grupu -EnableAUser=Ļautu lietotājam -EnableAGroup=Ieslēgt grupu +EnableAUser=Atbloķēt lietotāju +EnableAGroup=Atbloķēt grupu DeleteGroup=Dzēst DeleteAGroup=Dzēst grupu ConfirmDisableUser=Vai tiešām vēlaties bloķēt lietotāju %s? @@ -31,9 +31,9 @@ ConfirmDisableGroup=Vai tiešām vēlaties bloķēt grupu %s? ConfirmDeleteUser=Vai jūs tiešām vēlaties dzēst lietotāju %s? ConfirmDeleteGroup=Vai tiešām vēlaties dzēst grupu %s? ConfirmEnableUser=Vai jūs tiešām vēlaties atbloķēt lietotāju %s? -ConfirmEnableGroup=Vai jūs tiešām vēlaties, lai ļautu grupas %s? -ConfirmReinitPassword=Vai jūs tiešām vēlaties, lai radītu jaunu paroli lietotāju %s? -ConfirmSendNewPassword=Vai jūs tiešām vēlaties, lai radītu un nosūtīt jaunu paroli lietotāju %s? +ConfirmEnableGroup=Vai jūs tiešām vēlaties atbloķēt grupu %s? +ConfirmReinitPassword=Vai jūs tiešām vēlaties ģenerēt jaunu lietotāja paroli %s? +ConfirmSendNewPassword=Vai jūs tiešām vēlaties ģenerēt un nosūtīt paroli lietotājam %s? NewUser=Jauns lietotājs CreateUser=Izveidot lietotāju SearchAGroup=Meklēt grupu @@ -55,7 +55,7 @@ NewGroup=Jauna grupa CreateGroup=Izveidot grupu RemoveFromGroup=Dzēst no grupas PasswordChangedAndSentTo=Parole nomainīta un nosūtīta %s. -PasswordChangeRequestSent=Pieprasīt, lai mainītu paroli, %s nosūtīti %s. +PasswordChangeRequestSent=Pieprasīt, lai nomaina paroli, %s nosūtīt %s. MenuUsersAndGroups=Lietotāji un grupas LastGroupsCreated=Pēdējās %s izveidotās grupas LastUsersCreated=Pēdējie %s izveidotie lietotāji @@ -67,17 +67,17 @@ GroupModified=Grupa modificēta veiksmīgi PhotoFile=Attēla fails UserWithDolibarrAccess=Lietotājs ar Dolibarr piekļuvi ListOfUsersInGroup=Lietotāju saraksts, kas atrodas šajā grupā -ListOfGroupsForUser=Saraksts no grupām par lietotāju +ListOfGroupsForUser=Saraksts ar grupām, kurās iekļauts lietotājs UsersToAdd=Lietotājiem pievienot šai grupai GroupsToAdd=Grupas pievienot šim lietotājam NoLogin=Nav pieteikšanās LinkToCompanyContact=Saite uz trešajai personai / kontaktu LinkedToDolibarrMember=Saite uz dalībnieku -LinkedToDolibarrUser=Saite uz Dolibarr lietotājam -LinkedToDolibarrThirdParty=Saite uz Dolibarr trešajai personai +LinkedToDolibarrUser=Saite uz Dolibarr lietotāju +LinkedToDolibarrThirdParty=Saite uz Dolibarr trešo personu CreateDolibarrLogin=Izveidot lietotāju CreateDolibarrThirdParty=Izveidot trešo pusi -LoginAccountDisable=Kontu invalīdiem, ielieciet jaunu ienāciet, lai to aktivizētu. +LoginAccountDisable=Konts bloķēts, izveidojiet jaunu lietotāja vārdu, lai to aktivizētu. LoginAccountDisableInDolibarr=Konts bloķēts Dolibarr. LoginAccountDisableInLdap=Konta invalīdu jomā. UsePersonalValue=Izmantot personisko vērtību @@ -111,7 +111,7 @@ ConfirmCreateThirdParty=Vai jūs tiešām vēlaties, lai izveidotu trešās pers LoginToCreate=Pieslēdzies, lai izveidotu NameToCreate=Nosaukums trešās puses, lai radītu YourRole=Jūsu lomas -YourQuotaOfUsersIsReached=Jūsu kvota aktīvo lietotāju ir sasniegts! +YourQuotaOfUsersIsReached=Jūsu aktīvo lietotāju limits ir sasniegts! NbOfUsers=Nb lietotāju DontDowngradeSuperAdmin=Tikai superadmin var pazemināt superadmin HierarchicalResponsible=Hierarhiska atbildīga diff --git a/htdocs/langs/lv_LV/withdrawals.lang b/htdocs/langs/lv_LV/withdrawals.lang index b9db91d56d2..2b81d811bad 100644 --- a/htdocs/langs/lv_LV/withdrawals.lang +++ b/htdocs/langs/lv_LV/withdrawals.lang @@ -40,14 +40,14 @@ TransMetod=Darījuma veids Send=Sūtīt Lines=Lines StandingOrderReject=Issue a rejection -InvoiceRefused=Rēķina atteicās +InvoiceRefused=Rēķins atteikts WithdrawalRefused=Withdrawal refused WithdrawalRefusedConfirm=Vai jūs tiešām vēlaties, lai ievadītu izdalīšanās noraidījumu sabiedrībai RefusedData=Noraidījuma datums RefusedReason=Noraidījuma iemesls RefusedInvoicing=Rēķinu noraidījumu NoInvoiceRefused=Nav maksas noraidīšanu -InvoiceRefused=Rēķina atteicās +InvoiceRefused=Rēķins atteikts Status=Status StatusUnknown=Nezināms StatusWaiting=Gaidīšana diff --git a/htdocs/langs/mk_MK/admin.lang b/htdocs/langs/mk_MK/admin.lang index eb85572a4b3..d784d75b43c 100644 --- a/htdocs/langs/mk_MK/admin.lang +++ b/htdocs/langs/mk_MK/admin.lang @@ -116,7 +116,7 @@ LanguageBrowserParameter=Parameter %s LocalisationDolibarrParameters=Localisation parameters ClientTZ=Client Time Zone (user) ClientHour=Client time (user) -OSTZ=Servre OS Time Zone +OSTZ=Server OS Time Zone PHPTZ=PHP server Time Zone PHPServerOffsetWithGreenwich=PHP server offset width Greenwich (seconds) ClientOffsetWithGreenwich=Client/Browser offset width Greenwich (seconds) @@ -233,7 +233,9 @@ OfficialWebSiteFr=French official web site OfficialWiki=Dolibarr documentation on Wiki OfficialDemo=Dolibarr online demo OfficialMarketPlace=Official market place for external modules/addons -OfficialWebHostingService=Official web hosting services (Cloud hosting) +OfficialWebHostingService=Referenced web hosting services (Cloud hosting) +ReferencedPreferredPartners=Preferred Partners +OtherResources=Autres ressources ForDocumentationSeeWiki=For user or developer documentation (Doc, FAQs...),
    take a look at the Dolibarr Wiki:
    %s ForAnswersSeeForum=For any other questions/help, you can use the Dolibarr forum:
    %s HelpCenterDesc1=This area can help you to get a Help support service on Dolibarr. @@ -369,9 +371,9 @@ ExtrafieldSelectList = Select from table ExtrafieldSeparator=Separator ExtrafieldCheckBox=Checkbox ExtrafieldRadio=Radio button -ExtrafieldParamHelpselect=Parameters list have to be like key,value

    for exemple :
    1,value1
    2,value2
    3,value3
    ...

    In order to have the list depending on another :
    1,value1|parent_list_code:parent_key
    2,value2|parent_list_code:parent_key -ExtrafieldParamHelpcheckbox=Parameters list have to be like key,value

    for exemple :
    1,value1
    2,value2
    3,value3
    ... -ExtrafieldParamHelpradio=Parameters list have to be like key,value

    for exemple :
    1,value1
    2,value2
    3,value3
    ... +ExtrafieldParamHelpselect=Parameters list have to be like key,value

    for example :
    1,value1
    2,value2
    3,value3
    ...

    In order to have the list depending on another :
    1,value1|parent_list_code:parent_key
    2,value2|parent_list_code:parent_key +ExtrafieldParamHelpcheckbox=Parameters list have to be like key,value

    for example :
    1,value1
    2,value2
    3,value3
    ... +ExtrafieldParamHelpradio=Parameters list have to be like key,value

    for example :
    1,value1
    2,value2
    3,value3
    ... ExtrafieldParamHelpsellist=Parameters list comes from a table
    Syntax : table_name:label_field:id_field::filter
    Example : c_typent:libelle:id::filter

    filter can be a simple test (eg active=1) to display only active value
    if you want to filter on extrafields use syntaxt extra.fieldcode=... (where field code is the code of extrafield)

    In order to have the list depending on another :
    c_typent:libelle:id:parent_list_code|parent_column:filter LibraryToBuildPDF=Library used to build PDF WarningUsingFPDF=Warning: Your conf.php contains directive dolibarr_pdf_force_fpdf=1. This means you use the FPDF library to generate PDF files. This library is old and does not support a lot of features (Unicode, image transparency, cyrillic, arab and asiatic languages, ...), so you may experience errors during PDF generation.
    To solve this and have a full support of PDF generation, please download TCPDF library, then comment or remove the line $dolibarr_pdf_force_fpdf=1, and add instead $dolibarr_lib_TCPDF_PATH='path_to_TCPDF_dir' @@ -472,7 +474,7 @@ Module410Desc=Webcalendar integration Module500Name=Special expenses (tax, social contributions, dividends) Module500Desc=Management of special expenses like taxes, social contribution, dividends and salaries Module510Name=Salaries -Module510Desc=Management of empoyees salaries and payments +Module510Desc=Management of employees salaries and payments Module600Name=Notifications Module600Desc=Send notifications by email on some Dolibarr business events to third party contacts Module700Name=Donations @@ -495,15 +497,15 @@ Module2400Name=Agenda Module2400Desc=Events/tasks and agenda management Module2500Name=Electronic Content Management Module2500Desc=Save and share documents -Module2600Name= WebServices -Module2600Desc= Enable the Dolibarr web services server -Module2700Name= Gravatar -Module2700Desc= Use online Gravatar service (www.gravatar.com) to show photo of users/members (found with their emails). Need an internet access +Module2600Name=WebServices +Module2600Desc=Enable the Dolibarr web services server +Module2700Name=Gravatar +Module2700Desc=Use online Gravatar service (www.gravatar.com) to show photo of users/members (found with their emails). Need an internet access Module2800Desc=FTP Client -Module2900Name= GeoIPMaxmind -Module2900Desc= GeoIP Maxmind conversions capabilities -Module3100Name= Skype -Module3100Desc= Add a Skype button into card of adherents / third parties / contacts +Module2900Name=GeoIPMaxmind +Module2900Desc=GeoIP Maxmind conversions capabilities +Module3100Name=Skype +Module3100Desc=Add a Skype button into card of adherents / third parties / contacts Module5000Name=Multi-company Module5000Desc=Allows you to manage multiple companies Module6000Name=Workflow @@ -681,6 +683,10 @@ Permission401=Read discounts Permission402=Create/modify discounts Permission403=Validate discounts Permission404=Delete discounts +Permission510=Read Salaries +Permission512=Create/modify salaries +Permission514=Delete salaries +Permission517=Export salaries Permission531=Read services Permission532=Create/modify services Permission534=Delete services @@ -999,7 +1005,7 @@ ExtraFieldsSupplierOrders=Complementary attributes (orders) ExtraFieldsSupplierInvoices=Complementary attributes (invoices) ExtraFieldsProject=Complementary attributes (projects) ExtraFieldsProjectTask=Complementary attributes (tasks) -ExtraFieldHasWrongValue=Attribut %s has a wrong value. +ExtraFieldHasWrongValue=Attribute %s has a wrong value. AlphaNumOnlyCharsAndNoSpace=only alphanumericals characters without space AlphaNumOnlyLowerCharsAndNoSpace=only alphanumericals and lower case characters without space SendingMailSetup=Setup of sendings by email @@ -1018,13 +1024,13 @@ SuhosinSessionEncrypt=Session storage encrypted by Suhosin ConditionIsCurrently=Condition is currently %s TestNotPossibleWithCurrentBrowsers=Automatic detection not possible YouUseBestDriver=You use driver %s that is best driver available currently. -YouDoNotUseBestDriver=You use drive %s but driver %s is recommanded. +YouDoNotUseBestDriver=You use drive %s but driver %s is recommended. NbOfProductIsLowerThanNoPb=You have only %s products/services into database. This does not required any particular optimization. SearchOptim=Search optimization YouHaveXProductUseSearchOptim=You have %s product into database. You should add the constant PRODUCT_DONOTSEARCH_ANYWHERE to 1 into Home-Setup-Other, you limit the search to the beginning of strings making possible for database to use index and you should get an immediate response. BrowserIsOK=You are using the web browser %s. This browser is ok for security and performance. BrowserIsKO=You are using the web browser %s. This browser is known to be a bad choice for security, performance and reliability. We recommand you to use Firefox, Chrome, Opera or Safari. -XDebugInstalled=XDebug est chargé. +XDebugInstalled=XDebug is loaded. XCacheInstalled=XCache is loaded. AddRefInList=Display customer/supplier ref into list (select list or combobox) and most of hyperlink FieldEdition=Edition of field %s @@ -1073,7 +1079,7 @@ WebCalServer=Server hosting calendar database WebCalDatabaseName=Database name WebCalUser=User to access database WebCalSetupSaved=Webcalendar setup saved successfully. -WebCalTestOk=Connection to server '%s' on database '%s' with user '%s' successfull. +WebCalTestOk=Connection to server '%s' on database '%s' with user '%s' successful. WebCalTestKo1=Connection to server '%s' succeed but database '%s' could not be reached. WebCalTestKo2=Connection to server '%s' with user '%s' failed. WebCalErrorConnectOkButWrongDatabase=Connection succeeded but database doesn't look to be a Webcalendar database. @@ -1119,7 +1125,7 @@ WatermarkOnDraftProposal=Watermark on draft commercial proposals (none if empty) OrdersSetup=Order management setup OrdersNumberingModules=Orders numbering models OrdersModelModule=Order documents models -HideTreadedOrders=Hide the treated or canceled orders in the list +HideTreadedOrders=Hide the treated or cancelled orders in the list ValidOrderAfterPropalClosed=To validate the order after proposal closer, makes it possible not to step by the provisional order FreeLegalTextOnOrders=Free text on orders WatermarkOnDraftOrders=Watermark on draft orders (none if empty) @@ -1214,9 +1220,9 @@ LDAPSynchroKO=Failed synchronization test LDAPSynchroKOMayBePermissions=Failed synchronization test. Check that connexion to server is correctly configured and allows LDAP udpates LDAPTCPConnectOK=TCP connect to LDAP server successful (Server=%s, Port=%s) LDAPTCPConnectKO=TCP connect to LDAP server failed (Server=%s, Port=%s) -LDAPBindOK=Connect/Authentificate to LDAP server sucessfull (Server=%s, Port=%s, Admin=%s, Password=%s) +LDAPBindOK=Connect/Authentificate to LDAP server successful (Server=%s, Port=%s, Admin=%s, Password=%s) LDAPBindKO=Connect/Authentificate to LDAP server failed (Server=%s, Port=%s, Admin=%s, Password=%s) -LDAPUnbindSuccessfull=Disconnect successfull +LDAPUnbindSuccessfull=Disconnect successful LDAPUnbindFailed=Disconnect failed LDAPConnectToDNSuccessfull=Connection to DN (%s) successful LDAPConnectToDNFailed=Connection to DN (%s) failed @@ -1273,7 +1279,7 @@ LDAPFieldSidExample=Example : objectsid LDAPFieldEndLastSubscription=Date of subscription end LDAPFieldTitle=Post/Function LDAPFieldTitleExample=Example: title -LDAPParametersAreStillHardCoded=LDAP parametres are still hardcoded (in contact class) +LDAPParametersAreStillHardCoded=LDAP parameters are still hardcoded (in contact class) LDAPSetupNotComplete=LDAP setup not complete (go on others tabs) LDAPNoUserOrPasswordProvidedAccessIsReadOnly=No administrator or password provided. LDAP access will be anonymous and in read only mode. LDAPDescContact=This page allows you to define LDAP attributes name in LDAP tree for each data found on Dolibarr contacts. @@ -1429,7 +1435,7 @@ OptionVATDefault=Standard OptionVATDebitOption=Option services on Debit OptionVatDefaultDesc=VAT is due:
    - on delivery for goods (we use invoice date)
    - on payments for services OptionVatDebitOptionDesc=VAT is due:
    - on delivery for goods (we use invoice date)
    - on invoice (debit) for services -SummaryOfVatExigibilityUsedByDefault=Time of VAT exigibility by default according to choosed option: +SummaryOfVatExigibilityUsedByDefault=Time of VAT exigibility by default according to chosen option: OnDelivery=On delivery OnPayment=On payment OnInvoice=On invoice @@ -1446,7 +1452,7 @@ AccountancyCodeBuy=Purchase account. code AgendaSetup=Events and agenda module setup PasswordTogetVCalExport=Key to authorize export link PastDelayVCalExport=Do not export event older than -AGENDA_USE_EVENT_TYPE=Use events types (managed into menu Setup -> Dictionnary -> Type of agenda events) +AGENDA_USE_EVENT_TYPE=Use events types (managed into menu Setup -> Dictionary -> Type of agenda events) ##### ClickToDial ##### ClickToDialDesc=This module allows to add an icon after phone numbers. A click on this icon will call a server with a particular URL you define below. This can be used to call a call center system from Dolibarr that can call the phone number on a SIP system for example. ##### Point Of Sales (CashDesk) ##### diff --git a/htdocs/langs/mk_MK/contracts.lang b/htdocs/langs/mk_MK/contracts.lang index def3d8aceff..e5ad112b222 100644 --- a/htdocs/langs/mk_MK/contracts.lang +++ b/htdocs/langs/mk_MK/contracts.lang @@ -1,99 +1,101 @@ # Dolibarr language file - Source file is en_US - contracts -# ContractsArea=Contracts area -# ListOfContracts=List of contracts -# LastContracts=Last %s modified contracts -# AllContracts=All contracts -# ContractCard=Contract card -# ContractStatus=Contract status -# ContractStatusNotRunning=Not running -# ContractStatusRunning=Running -# ContractStatusDraft=Draft -# ContractStatusValidated=Validated -# ContractStatusClosed=Closed -# ServiceStatusInitial=Not running -# ServiceStatusRunning=Running -# ServiceStatusNotLate=Running, not expired -# ServiceStatusNotLateShort=Not expired -# ServiceStatusLate=Running, expired -# ServiceStatusLateShort=Expired -# ServiceStatusClosed=Closed -# ServicesLegend=Services legend -# Contracts=Contracts -# Contract=Contract -# NoContracts=No contracts -# MenuServices=Services -# MenuInactiveServices=Services not active -# MenuRunningServices=Running services -# MenuExpiredServices=Expired services -# MenuClosedServices=Closed services -# NewContract=New contract -# AddContract=Add contract -# SearchAContract=Search a contract -# DeleteAContract=Delete a contract -# CloseAContract=Close a contract -# ConfirmDeleteAContract=Are you sure you want to delete this contract and all its services ? -# ConfirmValidateContract=Are you sure you want to validate this contract under name %s ? -# ConfirmCloseContract=This will close all services (active or not). Are you sure you want to close this contract ? -# ConfirmCloseService=Are you sure you want to close this service with date %s ? -# ValidateAContract=Validate a contract -# ActivateService=Activate service -# ConfirmActivateService=Are you sure you want to activate this service with date %s ? -# RefContract=Contract reference -# DateContract=Contract date -# DateServiceActivate=Service activation date -# DateServiceUnactivate=Service deactivation date -# DateServiceStart=Date for beginning of service -# DateServiceEnd=Date for end of service -# ShowContract=Show contract -# ListOfServices=List of services -# ListOfInactiveServices=List of not active services -# ListOfExpiredServices=List of expired active services -# ListOfClosedServices=List of closed services -# ListOfRunningContractsLines=List of running contract lines -# ListOfRunningServices=List of running services -# NotActivatedServices=Inactive services (among validated contracts) -# BoardNotActivatedServices=Services to activate among validated contracts -# LastContracts=Last %s modified contracts -# LastActivatedServices=Last %s activated services -# LastModifiedServices=Last %s modified services -# EditServiceLine=Edit service line -# ContractStartDate=Start date -# ContractEndDate=End date -# DateStartPlanned=Planned start date -# DateStartPlannedShort=Planned start date -# DateEndPlanned=Planned end date -# DateEndPlannedShort=Planned end date -# DateStartReal=Real start date -# DateStartRealShort=Real start date -# DateEndReal=Real end date -# DateEndRealShort=Real end date -# NbOfServices=Nb of services -# CloseService=Close service -# ServicesNomberShort=%s service(s) -# RunningServices=Running services -# BoardRunningServices=Expired running services -# ServiceStatus=Status of service -# DraftContracts=Drafts contracts -# CloseRefusedBecauseOneServiceActive=Contract can't be closed as ther is at least one open service on it -# CloseAllContracts=Close all contract lines -# DeleteContractLine=Delete a contract line -# ConfirmDeleteContractLine=Are you sure you want to delete this contract line ? -# MoveToAnotherContract=Move service into another contract. -# ConfirmMoveToAnotherContract=I choosed new target contract and confirm I want to move this service into this contract. -# ConfirmMoveToAnotherContractQuestion=Choose in which existing contract (of same third party), you want to move this service to ? -# PaymentRenewContractId=Renew contract line (number %s) -# ExpiredSince=Expiration date -# RelatedContracts=Related contracts -# NoExpiredServices=No expired active services -# ListOfServicesToExpireWithDuration=List of Services to expire in %s days -# ListOfServicesToExpireWithDurationNeg=List of Services expired from more than %s days -# ListOfServicesToExpire=List of Services to expire -# NoteListOfYourExpiredServices=This list contains only services of contracts for third parties you are linked to as a sale representative. +ContractsArea=Contracts area +ListOfContracts=List of contracts +LastContracts=Last %s modified contracts +AllContracts=All contracts +ContractCard=Contract card +ContractStatus=Contract status +ContractStatusNotRunning=Not running +ContractStatusRunning=Running +ContractStatusDraft=Draft +ContractStatusValidated=Validated +ContractStatusClosed=Closed +ServiceStatusInitial=Not running +ServiceStatusRunning=Running +ServiceStatusNotLate=Running, not expired +ServiceStatusNotLateShort=Not expired +ServiceStatusLate=Running, expired +ServiceStatusLateShort=Expired +ServiceStatusClosed=Closed +ServicesLegend=Services legend +Contracts=Contracts +Contract=Contract +NoContracts=No contracts +MenuServices=Services +MenuInactiveServices=Services not active +MenuRunningServices=Running services +MenuExpiredServices=Expired services +MenuClosedServices=Closed services +NewContract=New contract +AddContract=Add contract +SearchAContract=Search a contract +DeleteAContract=Delete a contract +CloseAContract=Close a contract +ConfirmDeleteAContract=Are you sure you want to delete this contract and all its services ? +ConfirmValidateContract=Are you sure you want to validate this contract under name %s ? +ConfirmCloseContract=This will close all services (active or not). Are you sure you want to close this contract ? +ConfirmCloseService=Are you sure you want to close this service with date %s ? +ValidateAContract=Validate a contract +ActivateService=Activate service +ConfirmActivateService=Are you sure you want to activate this service with date %s ? +RefContract=Contract reference +DateContract=Contract date +DateServiceActivate=Service activation date +DateServiceUnactivate=Service deactivation date +DateServiceStart=Date for beginning of service +DateServiceEnd=Date for end of service +ShowContract=Show contract +ListOfServices=List of services +ListOfInactiveServices=List of not active services +ListOfExpiredServices=List of expired active services +ListOfClosedServices=List of closed services +ListOfRunningContractsLines=List of running contract lines +ListOfRunningServices=List of running services +NotActivatedServices=Inactive services (among validated contracts) +BoardNotActivatedServices=Services to activate among validated contracts +LastContracts=Last %s modified contracts +LastActivatedServices=Last %s activated services +LastModifiedServices=Last %s modified services +EditServiceLine=Edit service line +ContractStartDate=Start date +ContractEndDate=End date +DateStartPlanned=Planned start date +DateStartPlannedShort=Planned start date +DateEndPlanned=Planned end date +DateEndPlannedShort=Planned end date +DateStartReal=Real start date +DateStartRealShort=Real start date +DateEndReal=Real end date +DateEndRealShort=Real end date +NbOfServices=Nb of services +CloseService=Close service +ServicesNomberShort=%s service(s) +RunningServices=Running services +BoardRunningServices=Expired running services +ServiceStatus=Status of service +DraftContracts=Drafts contracts +CloseRefusedBecauseOneServiceActive=Contract can't be closed as ther is at least one open service on it +CloseAllContracts=Close all contract lines +DeleteContractLine=Delete a contract line +ConfirmDeleteContractLine=Are you sure you want to delete this contract line ? +MoveToAnotherContract=Move service into another contract. +ConfirmMoveToAnotherContract=I choosed new target contract and confirm I want to move this service into this contract. +ConfirmMoveToAnotherContractQuestion=Choose in which existing contract (of same third party), you want to move this service to ? +PaymentRenewContractId=Renew contract line (number %s) +ExpiredSince=Expiration date +RelatedContracts=Related contracts +NoExpiredServices=No expired active services +ListOfServicesToExpireWithDuration=List of Services to expire in %s days +ListOfServicesToExpireWithDurationNeg=List of Services expired from more than %s days +ListOfServicesToExpire=List of Services to expire +NoteListOfYourExpiredServices=This list contains only services of contracts for third parties you are linked to as a sale representative. +StandardContractsTemplate=Standard contracts template +ContactNameAndSignature=For %s, name and signature: ##### Types de contacts ##### -# TypeContact_contrat_internal_SALESREPSIGN=Sales representative signing contract -# TypeContact_contrat_internal_SALESREPFOLL=Sales representative following-up contract -# TypeContact_contrat_external_BILLING=Billing customer contact -# TypeContact_contrat_external_CUSTOMER=Follow-up customer contact -# TypeContact_contrat_external_SALESREPSIGN=Signing contract customer contact -# Error_CONTRACT_ADDON_NotDefined=Constant CONTRACT_ADDON not defined +TypeContact_contrat_internal_SALESREPSIGN=Sales representative signing contract +TypeContact_contrat_internal_SALESREPFOLL=Sales representative following-up contract +TypeContact_contrat_external_BILLING=Billing customer contact +TypeContact_contrat_external_CUSTOMER=Follow-up customer contact +TypeContact_contrat_external_SALESREPSIGN=Signing contract customer contact +Error_CONTRACT_ADDON_NotDefined=Constant CONTRACT_ADDON not defined diff --git a/htdocs/langs/mk_MK/exports.lang b/htdocs/langs/mk_MK/exports.lang index 09915556286..3acad0d32cd 100644 --- a/htdocs/langs/mk_MK/exports.lang +++ b/htdocs/langs/mk_MK/exports.lang @@ -1,134 +1,134 @@ # Dolibarr language file - Source file is en_US - exports -# ExportsArea=Exports area -# ImportArea=Import area -# NewExport=New export -# NewImport=New import -# ExportableDatas=Exportable dataset -# ImportableDatas=Importable dataset -# SelectExportDataSet=Choose dataset you want to export... -# SelectImportDataSet=Choose dataset you want to import... -# SelectExportFields=Choose fields you want to export, or select a predefined export profile -# SelectImportFields=Choose source file fields you want to import and their target field in database by moving them up and down with anchor %s, or select a predefined import profil: -# NotImportedFields=Fields of source file not imported -# SaveExportModel=Save this export profile if you plan to reuse it later... -# SaveImportModel=Save this import profile if you plan to reuse it later... -# ExportModelName=Export profile name -# ExportModelSaved=Export profile saved under name %s. -# ExportableFields=Exportable fields -# ExportedFields=Exported fields -# ImportModelName=Import profile name -# ImportModelSaved=Import profile saved under name %s. -# ImportableFields=Importable fields -# ImportedFields=Imported fields -# DatasetToExport=Dataset to export -# DatasetToImport=Import file into dataset -# NoDiscardedFields=No fields in source file are discarded -# Dataset=Dataset -# ChooseFieldsOrdersAndTitle=Choose fields order... -# FieldsOrder=Fields order -# FieldsTitle=Fields title -# FieldOrder=Field order -# FieldTitle=Field title -# ChooseExportFormat=Choose export format -# NowClickToGenerateToBuildExportFile=Now, select file format in combo box and click on "Generate" to build export file... -# AvailableFormats=Available formats -# LibraryShort=Library -# LibraryUsed=Library used -# LibraryVersion=Version -# Step=Step -# FormatedImport=Import assistant -# FormatedImportDesc1=This area allows to import personalized data, using an assistant to help you in process without technical knowledge. -# FormatedImportDesc2=First step is to choose a king of data you want to load, then file to load, then to choose which fields you want to load. -# FormatedExport=Export assistant -# FormatedExportDesc1=This area allows to export personalized data, using an assistant to help you in process without technical knowledge. -# FormatedExportDesc2=First step is to choose a predefined dataset, then to choose which fields you want in your result files, and which order. -# FormatedExportDesc3=When data to export are selected, you can define output file format you want to export your data to. -# Sheet=Sheet -# NoImportableData=No importable data (no module with definitions to allow data imports) -# FileSuccessfullyBuilt=Export file generated -# SQLUsedForExport=SQL Request used to build export file -# LineId=Id of line -# LineDescription=Description of line -# LineUnitPrice=Unit price of line -# LineVATRate=VAT Rate of line -# LineQty=Quantity for line -# LineTotalHT=Amount net of tax for line -# LineTotalTTC=Amount with tax for line -# LineTotalVAT=Amount of VAT for line -# TypeOfLineServiceOrProduct=Type of line (0=product, 1=service) -# FileWithDataToImport=File with data to import -# FileToImport=Source file to import -# FileMustHaveOneOfFollowingFormat=File to import must have one of following format -# DownloadEmptyExample=Download example of empty source file -# ChooseFormatOfFileToImport=Choose file format to use as import file format by clicking on picto %s to select it... -# ChooseFileToImport=Upload file then click on picto %s to select file as source import file... -# SourceFileFormat=Source file format -# FieldsInSourceFile=Fields in source file -# FieldsInTargetDatabase=Target fields in Dolibarr database (bold=mandatory) -# Field=Field -# NoFields=No fields -# MoveField=Move field column number %s -# ExampleOfImportFile=Example_of_import_file -# SaveImportProfile=Save this import profile -# ErrorImportDuplicateProfil=Failed to save this import profile with this name. An existing profile already exists with this name. -# ImportSummary=Import setup summary -# TablesTarget=Targeted tables -# FieldsTarget=Targeted fields -# TableTarget=Targeted table -# FieldTarget=Targeted field -# FieldSource=Source field -# DoNotImportFirstLine=Do not import first line of source file -# NbOfSourceLines=Number of lines in source file -# NowClickToTestTheImport=Check import parameters you have defined. If they are correct, click on button "%s" to launch a simulation of import process (no data will be changed in your database, it's only a simulation for the moment)... -# RunSimulateImportFile=Launch the import simulation -# FieldNeedSource=This fiels in database require a data from source file -# SomeMandatoryFieldHaveNoSource=Some mandatory fields have no source from data file -# InformationOnSourceFile=Information on source file -# InformationOnTargetTables=Information on target fields -# SelectAtLeastOneField=Switch at least one source field in the column of fields to export -# SelectFormat=Choose this import file format -# RunImportFile=Launch import file -# NowClickToRunTheImport=Check result of import simulation. If everything is ok, launch the definitive import. -# DataLoadedWithId=All data will be loaded with the following import id: %s -# ErrorMissingMandatoryValue=Mandatory data is empty in source file for field %s. -# TooMuchErrors=There is still %s other source lines with errors but output has been limited. -# TooMuchWarnings=There is still %s other source lines with warnings but output has been limited. -# EmptyLine=Empty line (will be discarded) -# CorrectErrorBeforeRunningImport=You must first correct all errors before running definitive import. -# FileWasImported=File was imported with number %s. -# YouCanUseImportIdToFindRecord=You can find all imported records in your database by filtering on field import_key='%s'. -# NbOfLinesOK=Number of lines with no errors and no warnings: %s. -# NbOfLinesImported=Number of lines successfully imported: %s. -# DataComeFromNoWhere=Value to insert comes from nowhere in source file. -# DataComeFromFileFieldNb=Value to insert comes from field number %s in source file. -# DataComeFromIdFoundFromRef=Value that comes from field number %s of source file will be used to find id of parent object to use (So the objet %s that has the ref. from source file must exists into Dolibarr). -# DataComeFromIdFoundFromCodeId=Code that comes from field number %s of source file will be used to find id of parent object to use (So the code from source file must exists into dictionary %s). Note that if you know id, you can also use it into source file instead of code. Import should work in both cases. -# DataIsInsertedInto=Data coming from source file will be inserted into the following field: -# DataIDSourceIsInsertedInto=The id of parent object found using the data in source file, will be inserted into the following field: -# DataCodeIDSourceIsInsertedInto=The id of parent line found from code, will be inserted into following field: -# SourceRequired=Data value is mandatory -# SourceExample=Example of possible data value -# ExampleAnyRefFoundIntoElement=Any ref found for element %s -# ExampleAnyCodeOrIdFoundIntoDictionary=Any code (or id) found into dictionary %s -# CSVFormatDesc=Comma Separated Value file format (.csv).
    This is a text file format where fields are separated by separator [ %s ]. If separator is found inside a field content, field is rounded by round character [ %s ]. Escape character to escape round character is [ %s ]. -# Excel95FormatDesc=Excel file format (.xls)
    This is native Excel 95 format (BIFF5). -# Excel2007FormatDesc=Excel file format (.xlsx)
    This is native Excel 2007 format (SpreadsheetML). -# TsvFormatDesc=Tab Separated Value file format (.tsv)
    This is a text file format where fields are separated by a tabulator [tab]. -# ExportFieldAutomaticallyAdded=Field %s was automatically added. It will avoid you to have similar lines to be treated as duplicate records (with this field added, all lines will own their own id and will differ). -# CsvOptions=Csv Options -# Separator=Separator -# Enclosure=Enclosure -# SuppliersProducts=Suppliers Products -# BankCode=Bank code -# DeskCode=Desk code -# BankAccountNumber=Account number -# BankAccountNumberKey=Key -# SpecialCode=Special code -# ExportStringFilter=%% allows replacing one or more characters in the text -# ExportDateFilter='YYYY' 'YYYYMM' 'YYYYMMDD': filters by one year/month/day
    'YYYY+YYYY' 'YYYYMM+YYYYMM' 'YYYYMMDD+YYYYMMDD': filters over a range of years/months/days
    '>YYYY' '>YYYYMM' '>YYYYMMDD': filters on the following years/months/days
    '<YYYY' '<YYYYMM' '<YYYYMMDD': filters on the previous years/months/days -# ExportNumericFilter='NNNNN' filters by one value
    'NNNNN+NNNNN' filters over a range of values
    '>NNNNN' filters by lower values
    '>NNNNN' filters by higher values +ExportsArea=Exports area +ImportArea=Import area +NewExport=New export +NewImport=New import +ExportableDatas=Exportable dataset +ImportableDatas=Importable dataset +SelectExportDataSet=Choose dataset you want to export... +SelectImportDataSet=Choose dataset you want to import... +SelectExportFields=Choose fields you want to export, or select a predefined export profile +SelectImportFields=Choose source file fields you want to import and their target field in database by moving them up and down with anchor %s, or select a predefined import profile: +NotImportedFields=Fields of source file not imported +SaveExportModel=Save this export profile if you plan to reuse it later... +SaveImportModel=Save this import profile if you plan to reuse it later... +ExportModelName=Export profile name +ExportModelSaved=Export profile saved under name %s. +ExportableFields=Exportable fields +ExportedFields=Exported fields +ImportModelName=Import profile name +ImportModelSaved=Import profile saved under name %s. +ImportableFields=Importable fields +ImportedFields=Imported fields +DatasetToExport=Dataset to export +DatasetToImport=Import file into dataset +NoDiscardedFields=No fields in source file are discarded +Dataset=Dataset +ChooseFieldsOrdersAndTitle=Choose fields order... +FieldsOrder=Fields order +FieldsTitle=Fields title +FieldOrder=Field order +FieldTitle=Field title +ChooseExportFormat=Choose export format +NowClickToGenerateToBuildExportFile=Now, select file format in combo box and click on "Generate" to build export file... +AvailableFormats=Available formats +LibraryShort=Library +LibraryUsed=Library used +LibraryVersion=Version +Step=Step +FormatedImport=Import assistant +FormatedImportDesc1=This area allows to import personalized data, using an assistant to help you in process without technical knowledge. +FormatedImportDesc2=First step is to choose a king of data you want to load, then file to load, then to choose which fields you want to load. +FormatedExport=Export assistant +FormatedExportDesc1=This area allows to export personalized data, using an assistant to help you in process without technical knowledge. +FormatedExportDesc2=First step is to choose a predefined dataset, then to choose which fields you want in your result files, and which order. +FormatedExportDesc3=When data to export are selected, you can define output file format you want to export your data to. +Sheet=Sheet +NoImportableData=No importable data (no module with definitions to allow data imports) +FileSuccessfullyBuilt=Export file generated +SQLUsedForExport=SQL Request used to build export file +LineId=Id of line +LineDescription=Description of line +LineUnitPrice=Unit price of line +LineVATRate=VAT Rate of line +LineQty=Quantity for line +LineTotalHT=Amount net of tax for line +LineTotalTTC=Amount with tax for line +LineTotalVAT=Amount of VAT for line +TypeOfLineServiceOrProduct=Type of line (0=product, 1=service) +FileWithDataToImport=File with data to import +FileToImport=Source file to import +FileMustHaveOneOfFollowingFormat=File to import must have one of following format +DownloadEmptyExample=Download example of empty source file +ChooseFormatOfFileToImport=Choose file format to use as import file format by clicking on picto %s to select it... +ChooseFileToImport=Upload file then click on picto %s to select file as source import file... +SourceFileFormat=Source file format +FieldsInSourceFile=Fields in source file +FieldsInTargetDatabase=Target fields in Dolibarr database (bold=mandatory) +Field=Field +NoFields=No fields +MoveField=Move field column number %s +ExampleOfImportFile=Example_of_import_file +SaveImportProfile=Save this import profile +ErrorImportDuplicateProfil=Failed to save this import profile with this name. An existing profile already exists with this name. +ImportSummary=Import setup summary +TablesTarget=Targeted tables +FieldsTarget=Targeted fields +TableTarget=Targeted table +FieldTarget=Targeted field +FieldSource=Source field +DoNotImportFirstLine=Do not import first line of source file +NbOfSourceLines=Number of lines in source file +NowClickToTestTheImport=Check import parameters you have defined. If they are correct, click on button "%s" to launch a simulation of import process (no data will be changed in your database, it's only a simulation for the moment)... +RunSimulateImportFile=Launch the import simulation +FieldNeedSource=This field requires data from the source file +SomeMandatoryFieldHaveNoSource=Some mandatory fields have no source from data file +InformationOnSourceFile=Information on source file +InformationOnTargetTables=Information on target fields +SelectAtLeastOneField=Switch at least one source field in the column of fields to export +SelectFormat=Choose this import file format +RunImportFile=Launch import file +NowClickToRunTheImport=Check result of import simulation. If everything is ok, launch the definitive import. +DataLoadedWithId=All data will be loaded with the following import id: %s +ErrorMissingMandatoryValue=Mandatory data is empty in source file for field %s. +TooMuchErrors=There is still %s other source lines with errors but output has been limited. +TooMuchWarnings=There is still %s other source lines with warnings but output has been limited. +EmptyLine=Empty line (will be discarded) +CorrectErrorBeforeRunningImport=You must first correct all errors before running definitive import. +FileWasImported=File was imported with number %s. +YouCanUseImportIdToFindRecord=You can find all imported records in your database by filtering on field import_key='%s'. +NbOfLinesOK=Number of lines with no errors and no warnings: %s. +NbOfLinesImported=Number of lines successfully imported: %s. +DataComeFromNoWhere=Value to insert comes from nowhere in source file. +DataComeFromFileFieldNb=Value to insert comes from field number %s in source file. +DataComeFromIdFoundFromRef=Value that comes from field number %s of source file will be used to find id of parent object to use (So the objet %s that has the ref. from source file must exists into Dolibarr). +DataComeFromIdFoundFromCodeId=Code that comes from field number %s of source file will be used to find id of parent object to use (So the code from source file must exists into dictionary %s). Note that if you know id, you can also use it into source file instead of code. Import should work in both cases. +DataIsInsertedInto=Data coming from source file will be inserted into the following field: +DataIDSourceIsInsertedInto=The id of parent object found using the data in source file, will be inserted into the following field: +DataCodeIDSourceIsInsertedInto=The id of parent line found from code, will be inserted into following field: +SourceRequired=Data value is mandatory +SourceExample=Example of possible data value +ExampleAnyRefFoundIntoElement=Any ref found for element %s +ExampleAnyCodeOrIdFoundIntoDictionary=Any code (or id) found into dictionary %s +CSVFormatDesc=Comma Separated Value file format (.csv).
    This is a text file format where fields are separated by separator [ %s ]. If separator is found inside a field content, field is rounded by round character [ %s ]. Escape character to escape round character is [ %s ]. +Excel95FormatDesc=Excel file format (.xls)
    This is native Excel 95 format (BIFF5). +Excel2007FormatDesc=Excel file format (.xlsx)
    This is native Excel 2007 format (SpreadsheetML). +TsvFormatDesc=Tab Separated Value file format (.tsv)
    This is a text file format where fields are separated by a tabulator [tab]. +ExportFieldAutomaticallyAdded=Field %s was automatically added. It will avoid you to have similar lines to be treated as duplicate records (with this field added, all lines will own their own id and will differ). +CsvOptions=Csv Options +Separator=Separator +Enclosure=Enclosure +SuppliersProducts=Suppliers Products +BankCode=Bank code +DeskCode=Desk code +BankAccountNumber=Account number +BankAccountNumberKey=Key +SpecialCode=Special code +ExportStringFilter=%% allows replacing one or more characters in the text +ExportDateFilter='YYYY' 'YYYYMM' 'YYYYMMDD': filters by one year/month/day
    'YYYY+YYYY' 'YYYYMM+YYYYMM' 'YYYYMMDD+YYYYMMDD': filters over a range of years/months/days
    '>YYYY' '>YYYYMM' '>YYYYMMDD': filters on the following years/months/days
    '<YYYY' '<YYYYMM' '<YYYYMMDD': filters on the previous years/months/days +ExportNumericFilter='NNNNN' filters by one value
    'NNNNN+NNNNN' filters over a range of values
    '>NNNNN' filters by lower values
    '>NNNNN' filters by higher values ## filters -# SelectFilterFields=If you want to filter on some values, just input values here. -# FilterableFields=Champs Filtrables -# FilteredFields=Filtered fields -# FilteredFieldsValues=Value for filter +SelectFilterFields=If you want to filter on some values, just input values here. +FilterableFields=Champs Filtrables +FilteredFields=Filtered fields +FilteredFieldsValues=Value for filter diff --git a/htdocs/langs/mk_MK/holiday.lang b/htdocs/langs/mk_MK/holiday.lang index 0c755ca3301..da03299e0da 100644 --- a/htdocs/langs/mk_MK/holiday.lang +++ b/htdocs/langs/mk_MK/holiday.lang @@ -8,7 +8,6 @@ NotActiveModCP=You must enable the module holidays to view this page. NotConfigModCP=You must configure the module holidays to view this page. To do this, click here . NoCPforUser=You don't have a demand for holidays. AddCP=Apply for holidays -CPErrorSQL=An SQL error occurred: Employe=Employee DateDebCP=Start date DateFinCP=End date diff --git a/htdocs/langs/mk_MK/languages.lang b/htdocs/langs/mk_MK/languages.lang index 0a2ce786e4c..71099b15dc3 100644 --- a/htdocs/langs/mk_MK/languages.lang +++ b/htdocs/langs/mk_MK/languages.lang @@ -19,6 +19,7 @@ Language_en_SA=Англиски (Саудиска Арабија) Language_en_US=Англиски јазик (САД) Language_en_ZA=Англиски (Јужна Африка) Language_es_ES=Шпански +Language_es_DO=Spanish (Dominican Republic) Language_es_AR=Шпански (Аргентина) Language_es_CL=Spanish (Chile) Language_es_HN=Шпански (Хондурас) @@ -38,6 +39,7 @@ Language_fr_NC=Француски (Нова Каледонија) Language_he_IL=Хебрејски Language_hr_HR=Хрватската Language_hu_HU=Унгарската +Language_id_ID=Indonesian Language_is_IS=Исландски Language_it_IT=Италијански Language_ja_JP=Јапонски diff --git a/htdocs/langs/mk_MK/mails.lang b/htdocs/langs/mk_MK/mails.lang index 08ee8a280cb..98e6dc335ee 100644 --- a/htdocs/langs/mk_MK/mails.lang +++ b/htdocs/langs/mk_MK/mails.lang @@ -79,6 +79,7 @@ MailtoEMail=Hyper link to email ActivateCheckRead=Allow to use the "Unsubcribe" link ActivateCheckReadKey=Key use to encrypt URL use for "Read Receipt" and "Unsubcribe" feature EMailSentToNRecipients=EMail sent to %s recipients. +XTargetsAdded=%s recipients added into target list EachInvoiceWillBeAttachedToEmail=A document using default invoice document template will be created and attached to each email. MailTopicSendRemindUnpaidInvoices=Reminder of invoice %s (%s) SendRemind=Send reminder by EMails diff --git a/htdocs/langs/mk_MK/main.lang b/htdocs/langs/mk_MK/main.lang index 2a3177c4aa8..ed3aca59cfc 100644 --- a/htdocs/langs/mk_MK/main.lang +++ b/htdocs/langs/mk_MK/main.lang @@ -551,6 +551,7 @@ MailSentBy=Email sent by TextUsedInTheMessageBody=Email body SendAcknowledgementByMail=Send Ack. by email NoEMail=No email +NoMobilePhone=No mobile phone Owner=Owner DetectedVersion=Detected version FollowingConstantsWillBeSubstituted=The following constants will be replaced with the corresponding value. diff --git a/htdocs/langs/mk_MK/products.lang b/htdocs/langs/mk_MK/products.lang index e56b9cc59c2..37012349b02 100644 --- a/htdocs/langs/mk_MK/products.lang +++ b/htdocs/langs/mk_MK/products.lang @@ -28,8 +28,10 @@ ProductsAndServicesStatistics=Products and Services statistics ProductsStatistics=Products statistics ProductsOnSell=Available products ProductsNotOnSell=Obsolete products +ProductsOnSellAndOnBuy=Products not for sale nor purchase ServicesOnSell=Available services ServicesNotOnSell=Obsolete services +ServicesOnSellAndOnBuy=Services not for sale nor purchase InternalRef=Internal reference LastRecorded=Last products/services on sell recorded LastRecordedProductsAndServices=Last %s recorded products/services @@ -70,6 +72,8 @@ PublicPrice=Public price CurrentPrice=Current price NewPrice=New price MinPrice=Minim. selling price +MinPriceHT=Minim. selling price (net of tax) +MinPriceTTC=Minim. selling price (inc. tax) CantBeLessThanMinPrice=The selling price can't be lower than minimum allowed for this product (%s without tax). This message can also appears if you type a too important discount. ContractStatus=Contract status ContractStatusClosed=Closed @@ -179,6 +183,7 @@ ProductIsUsed=This product is used NewRefForClone=Ref. of new product/service CustomerPrices=Customers prices SuppliersPrices=Suppliers prices +SuppliersPricesOfProductsOrServices=Suppliers prices (of products or services) CustomCode=Customs code CountryOrigin=Origin country HiddenIntoCombo=Hidden into select lists @@ -208,6 +213,7 @@ CostPmpHT=Net total VWAP ProductUsedForBuild=Auto consumed by production ProductBuilded=Production completed ProductsMultiPrice=Product multi-price +ProductsOrServiceMultiPrice=Customers prices (of products or services, multi-prices) ProductSellByQuarterHT=Products turnover quarterly VWAP ServiceSellByQuarterHT=Services turnover quarterly VWAP Quarter1=1st. Quarter diff --git a/htdocs/langs/mk_MK/shop.lang b/htdocs/langs/mk_MK/shop.lang index b6cd78b5028..156af426bb0 100644 --- a/htdocs/langs/mk_MK/shop.lang +++ b/htdocs/langs/mk_MK/shop.lang @@ -1,10 +1,11 @@ # Dolibarr language file - Source file is en_US - shop -# Shop=Shop -# ShopWeb=Web Shop -# LastOrders=Last orders -# OnStandBy=On standby -# TreatmentInProgress=Treatment in progress -# LastCustomers=Last customers -# OSCommerceShop=OSCommerce shop -# OSCommerce=OSCommerce -# AddProd=Sell online +FailedConnectDBCheckModuleSetup=Failed to connect to oscommerce database. Check your module setup +Shop=Shop +ShopWeb=Web Shop +LastOrders=Last orders +OnStandBy=On standby +TreatmentInProgress=Treatment in progress +LastCustomers=Last customers +OSCommerceShop=OSCommerce shop +OSCommerce=OSCommerce +AddProd=Sell online diff --git a/htdocs/langs/mk_MK/stocks.lang b/htdocs/langs/mk_MK/stocks.lang index 54ff037d912..710f42d1581 100644 --- a/htdocs/langs/mk_MK/stocks.lang +++ b/htdocs/langs/mk_MK/stocks.lang @@ -112,6 +112,7 @@ ReplenishmentOrdersDesc=This is list of all opened supplier orders Replenishments=Replenishments NbOfProductBeforePeriod=Quantity of product %s in stock before selected period (< %s) NbOfProductAfterPeriod=Quantity of product %s in stock after selected period (> %s) +MassMovement=Mass movement MassStockMovement=Mass stock movement SelectProductInAndOutWareHouse=Select a product, a quantity, a source warehouse and a target warehouse, then click "%s". Once this is done for all required movements, click onto "%s". RecordMovement=Record transfert diff --git a/htdocs/langs/nb_NO/admin.lang b/htdocs/langs/nb_NO/admin.lang index 2161f8bfd18..9676445381c 100644 --- a/htdocs/langs/nb_NO/admin.lang +++ b/htdocs/langs/nb_NO/admin.lang @@ -116,7 +116,7 @@ LanguageBrowserParameter=Parameter %s LocalisationDolibarrParameters=Språkparametere for Dolibarr ClientTZ=Tidssone (bruker) ClientHour=Klienttid (bruker) -OSTZ=Tidssone server OS +OSTZ=Server OS Time Zone PHPTZ=Tidssone PHP PHPServerOffsetWithGreenwich=Forskyvning for PHP-server mot Greenwich (sekunder) ClientOffsetWithGreenwich=Klient / Browser offset bredde Greenwich (sekunder) @@ -233,7 +233,9 @@ OfficialWebSiteFr=Fransk offisielt nettsted OfficialWiki=Dolibarr Wiki OfficialDemo=Dolibarr online demonstrasjon OfficialMarketPlace=Offisiell markedsplass for eksterne moduler / addons -OfficialWebHostingService=Offisielle web hosting-tjenester (Cloud hosting) +OfficialWebHostingService=Referenced web hosting services (Cloud hosting) +ReferencedPreferredPartners=Preferred Partners +OtherResources=Autres ressources ForDocumentationSeeWiki=For brukeren eller utviklerens dokumentasjon (Doc, FAQs ...),
    ta en titt på Dolibarr Wiki:
    %s ForAnswersSeeForum=For andre spørsmål / hjelp, kan du bruke Dolibarr forumet:
    %s HelpCenterDesc1=Dette området kan hjelpe deg å få en Help support tjeneste på Dolibarr. @@ -369,9 +371,9 @@ ExtrafieldSelectList = Velg fra tabell ExtrafieldSeparator=Separator ExtrafieldCheckBox=Avmerkingsboks ExtrafieldRadio=Radio-knapp -ExtrafieldParamHelpselect=Parameters list have to be like key,value

    for exemple :
    1,value1
    2,value2
    3,value3
    ...

    In order to have the list depending on another :
    1,value1|parent_list_code:parent_key
    2,value2|parent_list_code:parent_key -ExtrafieldParamHelpcheckbox=Parameters list have to be like key,value

    for exemple :
    1,value1
    2,value2
    3,value3
    ... -ExtrafieldParamHelpradio=Parameters list have to be like key,value

    for exemple :
    1,value1
    2,value2
    3,value3
    ... +ExtrafieldParamHelpselect=Parameters list have to be like key,value

    for example :
    1,value1
    2,value2
    3,value3
    ...

    In order to have the list depending on another :
    1,value1|parent_list_code:parent_key
    2,value2|parent_list_code:parent_key +ExtrafieldParamHelpcheckbox=Parameters list have to be like key,value

    for example :
    1,value1
    2,value2
    3,value3
    ... +ExtrafieldParamHelpradio=Parameters list have to be like key,value

    for example :
    1,value1
    2,value2
    3,value3
    ... ExtrafieldParamHelpsellist=Parameters list comes from a table
    Syntax : table_name:label_field:id_field::filter
    Example : c_typent:libelle:id::filter

    filter can be a simple test (eg active=1) to display only active value
    if you want to filter on extrafields use syntaxt extra.fieldcode=... (where field code is the code of extrafield)

    In order to have the list depending on another :
    c_typent:libelle:id:parent_list_code|parent_column:filter LibraryToBuildPDF=Bibliotek som brukes til å bygge PDF WarningUsingFPDF=Warning: Your conf.php contains directive dolibarr_pdf_force_fpdf=1. This means you use the FPDF library to generate PDF files. This library is old and does not support a lot of features (Unicode, image transparency, cyrillic, arab and asiatic languages, ...), so you may experience errors during PDF generation.
    To solve this and have a full support of PDF generation, please download TCPDF library, then comment or remove the line $dolibarr_pdf_force_fpdf=1, and add instead $dolibarr_lib_TCPDF_PATH='path_to_TCPDF_dir' @@ -472,7 +474,7 @@ Module410Desc=Intergrasjon med webkalender Module500Name=Spesielle utgifter (skatt, sosiale bidrag, utbytte) Module500Desc=Forvaltning av spesielle utgifter som skatt, sosiale bidrag, utbytte og lønn Module510Name=Salaries -Module510Desc=Management of empoyees salaries and payments +Module510Desc=Management of employees salaries and payments Module600Name=Varselmeldinger Module600Desc=Sender beskjeder (med e-post) om Dolibarrhendleser Module700Name=Donasjoner @@ -495,15 +497,15 @@ Module2400Name=Agenda Module2400Desc=Handlinger/oppgaver og agendabehandling Module2500Name=Electronic Content Management Module2500Desc=Lagre og dele dokumenter -Module2600Name= SOAP baserte WebServices -Module2600Desc= Aktiver Dolibarr webtjenester server -Module2700Name= Gravatar -Module2700Desc= Bruke elektronisk Gravatar tjeneste (www.gravatar.com) for å vise bilde av brukere / medlemmer (funnet med e-post). Trenger du en Internett-tilgang +Module2600Name=SOAP baserte WebServices +Module2600Desc=Aktiver Dolibarr webtjenester server +Module2700Name=Gravatar +Module2700Desc=Bruke elektronisk Gravatar tjeneste (www.gravatar.com) for å vise bilde av brukere / medlemmer (funnet med e-post). Trenger du en Internett-tilgang Module2800Desc=FTP-klient -Module2900Name= GeoIPMaxmind -Module2900Desc= GeoIP Maxmind konverteringer evner -Module3100Name= Skype -Module3100Desc= Add a Skype button into card of adherents / third parties / contacts +Module2900Name=GeoIPMaxmind +Module2900Desc=GeoIP Maxmind konverteringer evner +Module3100Name=Skype +Module3100Desc=Add a Skype button into card of adherents / third parties / contacts Module5000Name=Multi-selskap Module5000Desc=Lar deg administrere flere selskaper Module6000Name=Workflow @@ -681,6 +683,10 @@ Permission401=Vise rabatter Permission402=Lage/endre rabatter Permission403=Godkjenne rabatter Permission404=Slette rabatter +Permission510=Read Salaries +Permission512=Create/modify salaries +Permission514=Delete salaries +Permission517=Export salaries Permission531=Les tjenester Permission532=Opprett / endre tjenester Permission534=Slett tjenester @@ -999,7 +1005,7 @@ ExtraFieldsSupplierOrders=Komplementære attributter (ordre) ExtraFieldsSupplierInvoices=Komplementære attributter (fakturaer) ExtraFieldsProject=Komplementære attributter (prosjekter) ExtraFieldsProjectTask=Komplementære attributter (oppgaver) -ExtraFieldHasWrongValue=Attribut %s har en feil verdi. +ExtraFieldHasWrongValue=Attribute %s has a wrong value. AlphaNumOnlyCharsAndNoSpace=bare alfanumeriske tegn tegn uten mellomrom AlphaNumOnlyLowerCharsAndNoSpace=only alphanumericals and lower case characters without space SendingMailSetup=Oppsett av sendings e-post @@ -1018,13 +1024,13 @@ SuhosinSessionEncrypt=Session lagring kryptert av Suhosin ConditionIsCurrently=Tilstand er for øyeblikket %s TestNotPossibleWithCurrentBrowsers=Automatic detection not possible YouUseBestDriver=You use driver %s that is best driver available currently. -YouDoNotUseBestDriver=You use drive %s but driver %s is recommanded. +YouDoNotUseBestDriver=You use drive %s but driver %s is recommended. NbOfProductIsLowerThanNoPb=You have only %s products/services into database. This does not required any particular optimization. SearchOptim=Search optimization YouHaveXProductUseSearchOptim=You have %s product into database. You should add the constant PRODUCT_DONOTSEARCH_ANYWHERE to 1 into Home-Setup-Other, you limit the search to the beginning of strings making possible for database to use index and you should get an immediate response. BrowserIsOK=You are using the web browser %s. This browser is ok for security and performance. BrowserIsKO=You are using the web browser %s. This browser is known to be a bad choice for security, performance and reliability. We recommand you to use Firefox, Chrome, Opera or Safari. -XDebugInstalled=XDebug est chargé. +XDebugInstalled=XDebug is loaded. XCacheInstalled=XCache is loaded. AddRefInList=Display customer/supplier ref into list (select list or combobox) and most of hyperlink FieldEdition=Edition of field %s @@ -1073,7 +1079,7 @@ WebCalServer=Server som driver kalendedatabase WebCalDatabaseName=Databasenavn WebCalUser=Databasebruker WebCalSetupSaved=Webcalendar-instillinger er lagret. -WebCalTestOk=Tilkobling til serveren '%s' på database '%s' med brukernavn '%s' vellykket. +WebCalTestOk=Connection to server '%s' on database '%s' with user '%s' successful. WebCalTestKo1=Tilkobling til serveren '%s' vellykket, men databasen '%s' kunne ikke nåes. WebCalTestKo2=Tilkobling til serveren '%s' med brukeren '%s' feilet. WebCalErrorConnectOkButWrongDatabase=Tilkobling vellykket, men databasen ser ikke ut til å være en Webcalendar-database. @@ -1119,7 +1125,7 @@ WatermarkOnDraftProposal=Watermark on draft commercial proposals (none if empty) OrdersSetup=Innstillinger for ordre OrdersNumberingModules=Nummereringsmodul for ordre OrdersModelModule=Ordremaler -HideTreadedOrders=Skjul behandlede og kansellerte ordre fra listen +HideTreadedOrders=Hide the treated or cancelled orders in the list ValidOrderAfterPropalClosed=Ordre krever godkjenning etter at tilbudet er lukket FreeLegalTextOnOrders=Fritekst på ordre WatermarkOnDraftOrders=Watermark on draft orders (none if empty) @@ -1214,9 +1220,9 @@ LDAPSynchroKO=Failed synchronization test LDAPSynchroKOMayBePermissions=Failed synchronization test. Check that connexion to server is correctly configured and allows LDAP udpates LDAPTCPConnectOK=TCP connect to LDAP server successful (Server=%s, Port=%s) LDAPTCPConnectKO=TCP connect to LDAP server failed (Server=%s, Port=%s) -LDAPBindOK=Connect/Authentificate to LDAP server sucessfull (Server=%s, Port=%s, Admin=%s, Password=%s) +LDAPBindOK=Connect/Authentificate to LDAP server successful (Server=%s, Port=%s, Admin=%s, Password=%s) LDAPBindKO=Connect/Authentificate to LDAP server failed (Server=%s, Port=%s, Admin=%s, Password=%s) -LDAPUnbindSuccessfull=Disconnect successfull +LDAPUnbindSuccessfull=Disconnect successful LDAPUnbindFailed=Disconnect failed LDAPConnectToDNSuccessfull=Connection au DN (%s) rᅵussie LDAPConnectToDNFailed=Connection au DN (%s) ᅵchouᅵe @@ -1273,7 +1279,7 @@ LDAPFieldSidExample=Example : objectsid LDAPFieldEndLastSubscription=Date of subscription end LDAPFieldTitle=Stilling LDAPFieldTitleExample=Example: title -LDAPParametersAreStillHardCoded=LDAP parametres are still hardcoded (in contact class) +LDAPParametersAreStillHardCoded=LDAP parameters are still hardcoded (in contact class) LDAPSetupNotComplete=LDAP setup not complete (go on others tabs) LDAPNoUserOrPasswordProvidedAccessIsReadOnly=No administrator or password provided. LDAP access will be anonymous and in read only mode. LDAPDescContact=This page allows you to define LDAP attributes name in LDAP tree for each data found on Dolibarr contacts. @@ -1429,7 +1435,7 @@ OptionVATDefault=Standard OptionVATDebitOption=Beregning på tjenester OptionVatDefaultDesc=Mva skal beregnes:
    - ved levering av produkter
    - ved levering av tjenester OptionVatDebitOptionDesc=MVA skal beregnes: :
    - ved levering av produkter
    - ved fakturering av tjenester -SummaryOfVatExigibilityUsedByDefault=Tidspunkt for merverdiavgift exigibility som standard i henhold til choosed alternativ: +SummaryOfVatExigibilityUsedByDefault=Time of VAT exigibility by default according to chosen option: OnDelivery=Ved levering OnPayment=På betaling OnInvoice=På faktura @@ -1446,7 +1452,7 @@ AccountancyCodeBuy=Purchase account. code AgendaSetup=Instillinger for modulen hendelser og agenda PasswordTogetVCalExport=Nøkkel for å autorisere eksportlenke PastDelayVCalExport=Må ikke eksportere hendelse eldre enn -AGENDA_USE_EVENT_TYPE=Use events types (managed into menu Setup -> Dictionnary -> Type of agenda events) +AGENDA_USE_EVENT_TYPE=Use events types (managed into menu Setup -> Dictionary -> Type of agenda events) ##### ClickToDial ##### ClickToDialDesc=Denne modulen gir et telefonikon etter telefonnummeret til kontaktpersoner. Et trykk på dette ikonet vil kalle opp en egen server med en URL som du definerer nedenfor. Du kan da få et system som ringer opp kontaktpersonen automatisk for deg, for eksempel på et SIP-system. ##### Point Of Sales (CashDesk) ##### diff --git a/htdocs/langs/nb_NO/contracts.lang b/htdocs/langs/nb_NO/contracts.lang index 57447902d69..3a686d49669 100644 --- a/htdocs/langs/nb_NO/contracts.lang +++ b/htdocs/langs/nb_NO/contracts.lang @@ -89,6 +89,8 @@ ListOfServicesToExpireWithDuration=Liste over tjenester som utløper innen %s da ListOfServicesToExpireWithDurationNeg=Liste over tjenester utløpt fra mer enn %s dager ListOfServicesToExpire=Liste over utløpende tjenester NoteListOfYourExpiredServices=Denne listen inneholder kun tjenester av kontrakter for tredjeparter du er koblet til som salgsrepresentant. +StandardContractsTemplate=Standard contracts template +ContactNameAndSignature=For %s, name and signature: ##### Types de contacts ##### TypeContact_contrat_internal_SALESREPSIGN=Salgsrepresentant som signerer kontrakten diff --git a/htdocs/langs/nb_NO/exports.lang b/htdocs/langs/nb_NO/exports.lang index d412f1bc960..3171d99c57d 100644 --- a/htdocs/langs/nb_NO/exports.lang +++ b/htdocs/langs/nb_NO/exports.lang @@ -8,7 +8,7 @@ ImportableDatas=Importerbart datasett SelectExportDataSet=Velg det datasett du vil eksportere... SelectImportDataSet=Velg dataset du vil importere ... SelectExportFields=Velg felter for eksport, eller velg en forhåndsdefinert eksportprofil -SelectImportFields=Velg kildefil feltene du ønsker å importere og et felt i databasen ved å flytte dem opp og ned med anker %s, eller velg en forhåndsdefinert import profil: +SelectImportFields=Choose source file fields you want to import and their target field in database by moving them up and down with anchor %s, or select a predefined import profile: NotImportedFields=Felt av kildefilen ikke importert SaveExportModel=Lagre denne eksportprofilen hvis du har tenkt å bruke den senere ... SaveImportModel=Lagre denne importen profilen hvis du har tenkt å bruke den senere ... @@ -64,7 +64,7 @@ ChooseFormatOfFileToImport=Velg filformatet du vil bruke som importere filformat ChooseFileToImport=Last opp fil klikk picto %s å velge filen som kilde importfil ... SourceFileFormat=Kilde filformat FieldsInSourceFile=Felt i kildefilen -# FieldsInTargetDatabase=Target fields in Dolibarr database (bold=mandatory) +FieldsInTargetDatabase=Target fields in Dolibarr database (bold=mandatory) Field=Field NoFields=Ingen felt MoveField=Flytt feltet kolonnenummer %s @@ -81,7 +81,7 @@ DoNotImportFirstLine=Ikke importer første linje av kildefilen NbOfSourceLines=Antall linjer i kildefilen NowClickToTestTheImport=Sjekk import parametre du har definert. Hvis de er riktige, klikker du på knappen "%s" til å lansere en simulering av importen (ingen data vil bli endret i databasen, det er bare en simulering for øyeblikket) ... RunSimulateImportFile=Start import simuleringen -FieldNeedSource=Dette føles i databasen krever en data fra kildefil +FieldNeedSource=This field requires data from the source file SomeMandatoryFieldHaveNoSource=Noen obligatoriske felt er ikke noen kilder fra datafilen InformationOnSourceFile=Informasjon om kildefilen InformationOnTargetTables=Informasjon om målet felt @@ -102,33 +102,33 @@ NbOfLinesImported=Antall linjer importert: %s. DataComeFromNoWhere=Verdi for å sette inn kommer fra ingensteds i kildefilen. DataComeFromFileFieldNb=Verdi for å sette inn kommer fra felt nummer %s i kildefilen. DataComeFromIdFoundFromRef=Verdi som kommer fra feltet antall %s av kildefilen vil bli brukt til å finne id av overordnede objektet som skal brukes (Så Objet %s som har dommeren. Fra kildefilen må finnes i Dolibarr). -# DataComeFromIdFoundFromCodeId=Code that comes from field number %s of source file will be used to find id of parent object to use (So the code from source file must exists into dictionary %s). Note that if you know id, you can also use it into source file instead of code. Import should work in both cases. +DataComeFromIdFoundFromCodeId=Code that comes from field number %s of source file will be used to find id of parent object to use (So the code from source file must exists into dictionary %s). Note that if you know id, you can also use it into source file instead of code. Import should work in both cases. DataIsInsertedInto=Data kommer fra kildefil blir satt inn på følgende felt: DataIDSourceIsInsertedInto=IDen til overordnede objektet ble funnet ved hjelp av dataene i kildefilen, vil bli satt inn på følgende felt: DataCodeIDSourceIsInsertedInto=Id av foreldrene linje funnet fra kode, vil bli satt inn i følgende felt: SourceRequired=Dataverdi er obligatorisk SourceExample=Eksempel på mulige dataverdi ExampleAnyRefFoundIntoElement=Enhver ref funnet for element %s -# ExampleAnyCodeOrIdFoundIntoDictionary=Any code (or id) found into dictionary %s +ExampleAnyCodeOrIdFoundIntoDictionary=Any code (or id) found into dictionary %s CSVFormatDesc=Kommadelte Verdi filformatet (. CSV).
    Dette er en tekstfil format der feltene er atskilt med skilletegn [%s]. Hvis separatoren blir funnet inne i et felt innhold, er felt omgitt av runde tegn [%s]. Escape karakter å unnslippe runde tegn er [%s]. -# Excel95FormatDesc=Excel file format (.xls)
    This is native Excel 95 format (BIFF5). -# Excel2007FormatDesc=Excel file format (.xlsx)
    This is native Excel 2007 format (SpreadsheetML). -# TsvFormatDesc=Tab Separated Value file format (.tsv)
    This is a text file format where fields are separated by a tabulator [tab]. -# ExportFieldAutomaticallyAdded=Field %s was automatically added. It will avoid you to have similar lines to be treated as duplicate records (with this field added, all lines will own their own id and will differ). -# CsvOptions=Csv Options -# Separator=Separator -# Enclosure=Enclosure -# SuppliersProducts=Suppliers Products +Excel95FormatDesc=Excel file format (.xls)
    This is native Excel 95 format (BIFF5). +Excel2007FormatDesc=Excel file format (.xlsx)
    This is native Excel 2007 format (SpreadsheetML). +TsvFormatDesc=Tab Separated Value file format (.tsv)
    This is a text file format where fields are separated by a tabulator [tab]. +ExportFieldAutomaticallyAdded=Field %s was automatically added. It will avoid you to have similar lines to be treated as duplicate records (with this field added, all lines will own their own id and will differ). +CsvOptions=Csv Options +Separator=Separator +Enclosure=Enclosure +SuppliersProducts=Suppliers Products BankCode=Bank code (ikke i Norge) DeskCode=Desk code (ikke i Norge) BankAccountNumber=Kontonummer BankAccountNumberKey=Nøkkel -# SpecialCode=Special code -# ExportStringFilter=%% allows replacing one or more characters in the text -# ExportDateFilter='YYYY' 'YYYYMM' 'YYYYMMDD': filters by one year/month/day
    'YYYY+YYYY' 'YYYYMM+YYYYMM' 'YYYYMMDD+YYYYMMDD': filters over a range of years/months/days
    '>YYYY' '>YYYYMM' '>YYYYMMDD': filters on the following years/months/days
    '<YYYY' '<YYYYMM' '<YYYYMMDD': filters on the previous years/months/days -# ExportNumericFilter='NNNNN' filters by one value
    'NNNNN+NNNNN' filters over a range of values
    '>NNNNN' filters by lower values
    '>NNNNN' filters by higher values +SpecialCode=Special code +ExportStringFilter=%% allows replacing one or more characters in the text +ExportDateFilter='YYYY' 'YYYYMM' 'YYYYMMDD': filters by one year/month/day
    'YYYY+YYYY' 'YYYYMM+YYYYMM' 'YYYYMMDD+YYYYMMDD': filters over a range of years/months/days
    '>YYYY' '>YYYYMM' '>YYYYMMDD': filters on the following years/months/days
    '<YYYY' '<YYYYMM' '<YYYYMMDD': filters on the previous years/months/days +ExportNumericFilter='NNNNN' filters by one value
    'NNNNN+NNNNN' filters over a range of values
    '>NNNNN' filters by lower values
    '>NNNNN' filters by higher values ## filters -# SelectFilterFields=If you want to filter on some values, just input values here. -# FilterableFields=Champs Filtrables -# FilteredFields=Filtered fields -# FilteredFieldsValues=Value for filter +SelectFilterFields=If you want to filter on some values, just input values here. +FilterableFields=Champs Filtrables +FilteredFields=Filtered fields +FilteredFieldsValues=Value for filter diff --git a/htdocs/langs/nb_NO/holiday.lang b/htdocs/langs/nb_NO/holiday.lang index 43b8139a22b..43d8718f4f1 100644 --- a/htdocs/langs/nb_NO/holiday.lang +++ b/htdocs/langs/nb_NO/holiday.lang @@ -8,7 +8,6 @@ NotActiveModCP=You must enable the module holidays to view this page. NotConfigModCP=You must configure the module holidays to view this page. To do this, click here . NoCPforUser=You don't have a demand for holidays. AddCP=Apply for holidays -CPErrorSQL=An SQL error occurred: Employe=Employee DateDebCP=Startdato DateFinCP=Sluttdato diff --git a/htdocs/langs/nb_NO/languages.lang b/htdocs/langs/nb_NO/languages.lang index ba8323a4530..9dd3dfaec5b 100644 --- a/htdocs/langs/nb_NO/languages.lang +++ b/htdocs/langs/nb_NO/languages.lang @@ -19,6 +19,7 @@ Language_en_SA=Norsk (Saudi-Arabia) Language_en_US=English (United States) Language_en_ZA=Norsk (Sør-Afrika) Language_es_ES=Spansk +Language_es_DO=Spanish (Dominican Republic) Language_es_AR=Spansk (Argentina) Language_es_CL=Spansk (Chile) Language_es_HN=Spansk (Honduras) @@ -38,6 +39,7 @@ Language_fr_NC=Fransk (Ny Caledonia) Language_he_IL=Hebrew Language_hr_HR=Croatian Language_hu_HU=Ungarsk +Language_id_ID=Indonesian Language_is_IS=Islandsk Language_it_IT=Italiensk Language_ja_JP=Japansk diff --git a/htdocs/langs/nb_NO/mails.lang b/htdocs/langs/nb_NO/mails.lang index db7f7059647..630eb5dcee9 100644 --- a/htdocs/langs/nb_NO/mails.lang +++ b/htdocs/langs/nb_NO/mails.lang @@ -79,6 +79,7 @@ MailtoEMail=Link til e-post ActivateCheckRead=Tillate å bruke "Avmelding" linken ActivateCheckReadKey=Key bruk for å kryptere URL bruk for "Les kvittering" og "melder"-funksjonen EMailSentToNRecipients=E-post sendt til %s mottakere. +XTargetsAdded=%s recipients added into target list EachInvoiceWillBeAttachedToEmail=Et dokument med standard faktura dokumentmal vil bli opprettet og sendt med hver e-post. MailTopicSendRemindUnpaidInvoices=Påminnelse om faktura %s (%s) SendRemind=Send påminnelse som e-post diff --git a/htdocs/langs/nb_NO/main.lang b/htdocs/langs/nb_NO/main.lang index bdb487e48cd..ce3f351628e 100644 --- a/htdocs/langs/nb_NO/main.lang +++ b/htdocs/langs/nb_NO/main.lang @@ -551,6 +551,7 @@ MailSentBy=E-post sendt av TextUsedInTheMessageBody=E-mail meldingstekst SendAcknowledgementByMail=Send bekreftelse med e-post NoEMail=Ingen e-post +NoMobilePhone=No mobile phone Owner=Eier DetectedVersion=Oppdager versjon FollowingConstantsWillBeSubstituted=Følgende konstanter vil bli erstattet med korresponderende verdi. diff --git a/htdocs/langs/nb_NO/products.lang b/htdocs/langs/nb_NO/products.lang index 8099cdb9109..db52ea1dc67 100644 --- a/htdocs/langs/nb_NO/products.lang +++ b/htdocs/langs/nb_NO/products.lang @@ -28,8 +28,10 @@ ProductsAndServicesStatistics=Statistikk over varer og tjenester ProductsStatistics=Varestatistikk ProductsOnSell=Varer i salg ProductsNotOnSell=Varer ute av salg +ProductsOnSellAndOnBuy=Products not for sale nor purchase ServicesOnSell=Tjenester i salg ServicesNotOnSell=Tjenester ute av salg +ServicesOnSellAndOnBuy=Services not for sale nor purchase InternalRef=Inter referanse LastRecorded=Siste registrerte varer/tjenester i salg LastRecordedProductsAndServices=Siste %s registrerte varer/tjenester @@ -70,6 +72,8 @@ PublicPrice=Veiledende pris CurrentPrice=Gjeldende pris NewPrice=Ny pris MinPrice=Minim. salgspris +MinPriceHT=Minim. selling price (net of tax) +MinPriceTTC=Minim. selling price (inc. tax) CantBeLessThanMinPrice=Salgsprisen kan ikke være lavere enn minste tillatte for dette produktet (%s uten skatt) ContractStatus=Kontraktstatus ContractStatusClosed=Lukket @@ -179,6 +183,7 @@ ProductIsUsed=Dette produktet brukes NewRefForClone=Ref. av nye produkt / tjeneste CustomerPrices=Kunder priser SuppliersPrices=Leverandører priser +SuppliersPricesOfProductsOrServices=Suppliers prices (of products or services) CustomCode=Tollkodeks CountryOrigin=Opprinnelseslandet HiddenIntoCombo=Gjemt i enkelte lister @@ -208,6 +213,7 @@ CostPmpHT=Net total VWAP ProductUsedForBuild=Auto consumed by production ProductBuilded=Production completed ProductsMultiPrice=Product multi-price +ProductsOrServiceMultiPrice=Customers prices (of products or services, multi-prices) ProductSellByQuarterHT=Products turnover quarterly VWAP ServiceSellByQuarterHT=Services turnover quarterly VWAP Quarter1=1st. Quarter diff --git a/htdocs/langs/nb_NO/shop.lang b/htdocs/langs/nb_NO/shop.lang index 6e02901ba85..0a89a344017 100644 --- a/htdocs/langs/nb_NO/shop.lang +++ b/htdocs/langs/nb_NO/shop.lang @@ -1,4 +1,5 @@ # Dolibarr language file - Source file is en_US - shop +FailedConnectDBCheckModuleSetup=Failed to connect to oscommerce database. Check your module setup Shop=Butikk ShopWeb=Nettbutikk LastOrders=Siste ordre diff --git a/htdocs/langs/nb_NO/stocks.lang b/htdocs/langs/nb_NO/stocks.lang index 1ea14edb551..bb15d17da40 100644 --- a/htdocs/langs/nb_NO/stocks.lang +++ b/htdocs/langs/nb_NO/stocks.lang @@ -112,6 +112,7 @@ ReplenishmentOrdersDesc=This is list of all opened supplier orders Replenishments=Replenishments NbOfProductBeforePeriod=Quantity of product %s in stock before selected period (< %s) NbOfProductAfterPeriod=Quantity of product %s in stock after selected period (> %s) +MassMovement=Mass movement MassStockMovement=Mass stock movement SelectProductInAndOutWareHouse=Select a product, a quantity, a source warehouse and a target warehouse, then click "%s". Once this is done for all required movements, click onto "%s". RecordMovement=Record transfert diff --git a/htdocs/langs/nl_NL/admin.lang b/htdocs/langs/nl_NL/admin.lang index 0440cf1e14e..d1497621c2a 100644 --- a/htdocs/langs/nl_NL/admin.lang +++ b/htdocs/langs/nl_NL/admin.lang @@ -116,7 +116,7 @@ LanguageBrowserParameter=Instelling %s LocalisationDolibarrParameters=Localisatie-instellingen ClientTZ=Tijdzone van de klant (gebruiker) ClientHour=Tijd bij de klant (gebruiker) -OSTZ=Tijdzone in het OS van de webserver +OSTZ=Server OS Time Zone PHPTZ=Tijdzone binnen de PHP server PHPServerOffsetWithGreenwich=Gecompenseerd voor PHP server breedte Greenwich (seconden) ClientOffsetWithGreenwich=Gecompenseerd voor cliënt / browser breedte Greenwich (seconden) @@ -233,7 +233,9 @@ OfficialWebSiteFr=Officiële Franse website OfficialWiki=Documentatie op de Wiki pagina's van Dolibarr OfficialDemo=Online demonstratie van Dolibarr OfficialMarketPlace=Officiële markt voor externe modules / addons -OfficialWebHostingService=Official web hosting services (Cloud hosting) +OfficialWebHostingService=Referenced web hosting services (Cloud hosting) +ReferencedPreferredPartners=Preferred Partners +OtherResources=Autres ressources ForDocumentationSeeWiki=Documentatie voor gebruikers of ontwikkelaars kunt u inzien door
    te kijken op de Dolibarr Wiki-pagina's:
    %s ForAnswersSeeForum=Voor alle andere vragen / hulp, kunt u gebruik maken van het Dolibarr forum:
    %s HelpCenterDesc1=Dit scherm kan u helpen om ondersteuning voor Dolibarr te krijgen. @@ -369,9 +371,9 @@ ExtrafieldSelectList = Kies uit tabel ExtrafieldSeparator=Scheidingsteken ExtrafieldCheckBox=Aanvink-vak ExtrafieldRadio=Radioknop -ExtrafieldParamHelpselect=Parameters list have to be like key,value

    for exemple :
    1,value1
    2,value2
    3,value3
    ...

    In order to have the list depending on another :
    1,value1|parent_list_code:parent_key
    2,value2|parent_list_code:parent_key -ExtrafieldParamHelpcheckbox=Lijst van parameters moet telkens bestaan uit sleutel,waarde

    bv:
    1,waarde
    2,waarde2
    3,waarde3
    ... -ExtrafieldParamHelpradio=Parameters list have to be like key,value

    for exemple :
    1,value1
    2,value2
    3,value3
    ... +ExtrafieldParamHelpselect=Parameters list have to be like key,value

    for example :
    1,value1
    2,value2
    3,value3
    ...

    In order to have the list depending on another :
    1,value1|parent_list_code:parent_key
    2,value2|parent_list_code:parent_key +ExtrafieldParamHelpcheckbox=Parameters list have to be like key,value

    for example :
    1,value1
    2,value2
    3,value3
    ... +ExtrafieldParamHelpradio=Parameters list have to be like key,value

    for example :
    1,value1
    2,value2
    3,value3
    ... ExtrafieldParamHelpsellist=Parameters list comes from a table
    Syntax : table_name:label_field:id_field::filter
    Example : c_typent:libelle:id::filter

    filter can be a simple test (eg active=1) to display only active value
    if you want to filter on extrafields use syntaxt extra.fieldcode=... (where field code is the code of extrafield)

    In order to have the list depending on another :
    c_typent:libelle:id:parent_list_code|parent_column:filter LibraryToBuildPDF=Bibliotheek om PDF's te maken WarningUsingFPDF=Opgelet: je
    conf.php
    bevat de instelling dolibarr_pdf_force_fpdf=1. Dat betekent dat je de FPDF bibliotheek gebruikt om PDF bestanden te maken. Deze bibliotheek is oud, en ondersteunt een aantal mogelijkheden niet (Unicode, transparantie in beelden, cyrillische, arabische en aziatische talen, ...), dus er kunnen fouten optreden bij het maken van PDF's.
    Om dat op te lossen, en om volledige ondersteuning van PDF-maken te hebben, download aub TCPDF library, en dan verwijder of maak commentaar van de lijn $dolibarr_pdf_force_fpdf=1, en voeg in plaats daarvan $dolibarr_lib_TCPDF_PATH='path_to_TCPDF_dir' toe. @@ -472,7 +474,7 @@ Module410Desc=Integratie van een webkalender Module500Name=Special expenses (tax, social contributions, dividends) Module500Desc=Management of special expenses like taxes, social contribution, dividends and salaries Module510Name=Salaries -Module510Desc=Management of empoyees salaries and payments +Module510Desc=Management of employees salaries and payments Module600Name=Kennisgevingen Module600Desc=Stuur kennisgevingen per e-mail van sommige Dolibarr zakelijke gebeurtenisen naar contactpersonen van derde partijen Module700Name=Giften @@ -495,15 +497,15 @@ Module2400Name=Agenda Module2400Desc=Acties-, taken- en agendabeheer Module2500Name=Electronic Content Management Module2500Desc=Opslaan en delen van documenten -Module2600Name= Webdiensten -Module2600Desc= Activeer de Dolibarr webdienstenserver -Module2700Name= Gravatar -Module2700Desc= Gebruik de online dienst 'Gravatar' (www.gravatar.com) voor het posten van afbeeldingen van gebruikers / leden (gevonden door hun e-mails). Internet toegang vereist. +Module2600Name=Webdiensten +Module2600Desc=Activeer de Dolibarr webdienstenserver +Module2700Name=Gravatar +Module2700Desc=Gebruik de online dienst 'Gravatar' (www.gravatar.com) voor het posten van afbeeldingen van gebruikers / leden (gevonden door hun e-mails). Internet toegang vereist. Module2800Desc=FTP Client -Module2900Name= GeoIPMaxmind -Module2900Desc= Capaciteitconversie GeoIP Maxmind -Module3100Name= Skype -Module3100Desc= Add a Skype button into card of adherents / third parties / contacts +Module2900Name=GeoIPMaxmind +Module2900Desc=Capaciteitconversie GeoIP Maxmind +Module3100Name=Skype +Module3100Desc=Add a Skype button into card of adherents / third parties / contacts Module5000Name=Multi-bedrijf Module5000Desc=Hiermee kunt meerdere bedrijven beheren in Dolibarr Module6000Name=Workflow @@ -681,6 +683,10 @@ Permission401=Bekijk kortingen Permission402=Creëren / wijzigen kortingen Permission403=Kortingen valideren Permission404=Kortingen verwijderen +Permission510=Read Salaries +Permission512=Create/modify salaries +Permission514=Delete salaries +Permission517=Export salaries Permission531=Diensten inzien Permission532=Creëren / wijzigen van diensten Permission534=Diensten verwijderen @@ -999,7 +1005,7 @@ ExtraFieldsSupplierOrders=Complementary attributes (orders) ExtraFieldsSupplierInvoices=Complementary attributes (invoices) ExtraFieldsProject=Complementary attributes (projects) ExtraFieldsProjectTask=Complementary attributes (tasks) -ExtraFieldHasWrongValue=Toe te schrijven %s heeft een verkeerde waarde. +ExtraFieldHasWrongValue=Attribute %s has a wrong value. AlphaNumOnlyCharsAndNoSpace=only alphanumericals characters without space AlphaNumOnlyLowerCharsAndNoSpace=only alphanumericals and lower case characters without space SendingMailSetup=Instellen van verzendingen via e-mail @@ -1018,13 +1024,13 @@ SuhosinSessionEncrypt=Session storage encrypted by Suhosin ConditionIsCurrently=Condition is currently %s TestNotPossibleWithCurrentBrowsers=Automatic detection not possible YouUseBestDriver=You use driver %s that is best driver available currently. -YouDoNotUseBestDriver=You use drive %s but driver %s is recommanded. +YouDoNotUseBestDriver=You use drive %s but driver %s is recommended. NbOfProductIsLowerThanNoPb=You have only %s products/services into database. This does not required any particular optimization. SearchOptim=Search optimization YouHaveXProductUseSearchOptim=You have %s product into database. You should add the constant PRODUCT_DONOTSEARCH_ANYWHERE to 1 into Home-Setup-Other, you limit the search to the beginning of strings making possible for database to use index and you should get an immediate response. BrowserIsOK=You are using the web browser %s. This browser is ok for security and performance. BrowserIsKO=You are using the web browser %s. This browser is known to be a bad choice for security, performance and reliability. We recommand you to use Firefox, Chrome, Opera or Safari. -XDebugInstalled=XDebug est chargé. +XDebugInstalled=XDebug is loaded. XCacheInstalled=XCache is loaded. AddRefInList=Display customer/supplier ref into list (select list or combobox) and most of hyperlink FieldEdition=Edition of field %s @@ -1073,7 +1079,7 @@ WebCalServer=Server die kalenderdatabase host WebCalDatabaseName=Databasenaam WebCalUser=Databasegebruikersnaam WebCalSetupSaved=Webkalenderinstellingen opgeslagen. -WebCalTestOk=Verbinding met server '%s' en database '%s' voor gebruiker '%s' geslaagd. +WebCalTestOk=Connection to server '%s' on database '%s' with user '%s' successful. WebCalTestKo1=Verbinding met server '%s' geslaagd maar database '%s' is niet bereikbaar. WebCalTestKo2=Verbinding met server '%s' met gebruiker '%s' is mislukt. WebCalErrorConnectOkButWrongDatabase=Verbinding geslaagd maar de database lijkt geen Webkalender database te zijn. @@ -1119,7 +1125,7 @@ WatermarkOnDraftProposal=Watermark on draft commercial proposals (none if empty) OrdersSetup=Opdrachtenbeheerinstellingen OrdersNumberingModules=Opdrachtennummeringmodules OrdersModelModule=Oprachtendocumentsjablonen -HideTreadedOrders=Verberg de behandelde of geannuleerde opdracht in de lijst +HideTreadedOrders=Hide the treated or cancelled orders in the list ValidOrderAfterPropalClosed=Om de opdracht te valideren na sluiting van de offerte, maakt het mogelijk om (TODO franse vertaling erbij pakken) FreeLegalTextOnOrders=Vrije tekst op opdrachten WatermarkOnDraftOrders=Watermark on draft orders (none if empty) @@ -1214,9 +1220,9 @@ LDAPSynchroKO=Synchronisatietest mislukt LDAPSynchroKOMayBePermissions=Synchronisatie test mislukt. Controleer of de verbinding met de server correct is ingesteld en LDAP udpates toestaat. LDAPTCPConnectOK=TCP verbinding met de LDAP-server succesvol (Server=%s, Port=%s) LDAPTCPConnectKO=TCP verbinding met de LDAP-server mislukt (Server=%s, Port=%s) -LDAPBindOK=Verbinden en autorisatie met LDAP server geslaagd (Server=%s, Port=%s, Admin=%s, Password=%s) +LDAPBindOK=Connect/Authentificate to LDAP server successful (Server=%s, Port=%s, Admin=%s, Password=%s) LDAPBindKO=Verbinden en autoriseren met LDAP server mislukt (Server=%s, Port=%s, Admin=%s, Password=%s) -LDAPUnbindSuccessfull=Verbinding succesvol verbroken +LDAPUnbindSuccessfull=Disconnect successful LDAPUnbindFailed=Verbreken verbinding mislukt LDAPConnectToDNSuccessfull=Verbinding met DN (%s) geslaagd LDAPConnectToDNFailed=Verbinding met DN (%s) mislukt @@ -1273,7 +1279,7 @@ LDAPFieldSidExample=Voorbeeld: objectsid LDAPFieldEndLastSubscription=Datum van abonnementseinde LDAPFieldTitle=Functie LDAPFieldTitleExample=Example: title -LDAPParametersAreStillHardCoded=LDAP instellngen staat nog ingesteld ('hardcoded') in de PHP klasse contact +LDAPParametersAreStillHardCoded=LDAP parameters are still hardcoded (in contact class) LDAPSetupNotComplete=LDAP instellingen niet compleet (ga naar de andere tabbladen) LDAPNoUserOrPasswordProvidedAccessIsReadOnly=Geen beheerder of wachtwoord opgegeven. LDAP toegang zal anoniem zijn en in alleen-lezen modus. LDAPDescContact=Deze pagina maakt het u mogelijk LDAP-waarden in de LDAP structuur te koppelen aan elk gegeven in de Dolibarr contactpersonen @@ -1429,7 +1435,7 @@ OptionVATDefault=Standaard OptionVATDebitOption=Optie BTW bij Debet OptionVatDefaultDesc=BTW is verplicht:
    - op levering / betalingen van goederen (wij gebruiken de factuurdatum)
    - op betalingen van diensten OptionVatDebitOptionDesc=BTW is verplicht:
    - op levering / betalingen van goederen
    - op factuur (debet) voor diensten -SummaryOfVatExigibilityUsedByDefault=Tijd van de BTW opeisbaarheid standaard volgens gekozen methode: +SummaryOfVatExigibilityUsedByDefault=Time of VAT exigibility by default according to chosen option: OnDelivery=Bij levering OnPayment=Bij betaling OnInvoice=Op factuur @@ -1446,7 +1452,7 @@ AccountancyCodeBuy=Purchase account. code AgendaSetup=Acties- en agendamoduleinstellingen PasswordTogetVCalExport=autorisatiecode van de exportlink PastDelayVCalExport=Exporteer geen gebeurtenissen ouder dan -AGENDA_USE_EVENT_TYPE=Use events types (managed into menu Setup -> Dictionnary -> Type of agenda events) +AGENDA_USE_EVENT_TYPE=Use events types (managed into menu Setup -> Dictionary -> Type of agenda events) ##### ClickToDial ##### ClickToDialDesc=Deze module maakt het mogelijk om een icoontje te tonen achter het telefoonnummer van Dolibarr contactpersonen. Een klik op dit icoontje, zal een server bellen met een specifieke URL, die u hieronder instelt. Dit kan gebruikt worden om een 'call center'-systeem te bellen vanuit Dolibarr dat vervolgens het telefoonnummer kan bellen via bijvoorbeeld een SIP systeem. ##### Point Of Sales (CashDesk) ##### diff --git a/htdocs/langs/nl_NL/contracts.lang b/htdocs/langs/nl_NL/contracts.lang index 2adfce1ab4e..68ecd908079 100644 --- a/htdocs/langs/nl_NL/contracts.lang +++ b/htdocs/langs/nl_NL/contracts.lang @@ -38,7 +38,7 @@ ConfirmCloseService=Weet u zeker dat u de dienst met datum %s wilt sluite ValidateAContract=Valideer een contract ActivateService=Activeer een contract ConfirmActivateService=Weet u zeker dat u de dienst met de datum van %s wilt activeren? -# RefContract=Contract reference +RefContract=Contract reference DateContract=Contractdatum DateServiceActivate=Datum van de dienstactivering DateServiceUnactivate=Datum van dienstdeactivatie @@ -85,10 +85,12 @@ PaymentRenewContractId=Vernieuwing contractregel (%s) ExpiredSince=Verlopen sinds RelatedContracts=Gerelateerde contracten NoExpiredServices=Geen verlopen actieve diensten -# ListOfServicesToExpireWithDuration=List of Services to expire in %s days -# ListOfServicesToExpireWithDurationNeg=List of Services expired from more than %s days -# ListOfServicesToExpire=List of Services to expire -# NoteListOfYourExpiredServices=This list contains only services of contracts for third parties you are linked to as a sale representative. +ListOfServicesToExpireWithDuration=List of Services to expire in %s days +ListOfServicesToExpireWithDurationNeg=List of Services expired from more than %s days +ListOfServicesToExpire=List of Services to expire +NoteListOfYourExpiredServices=This list contains only services of contracts for third parties you are linked to as a sale representative. +StandardContractsTemplate=Standard contracts template +ContactNameAndSignature=For %s, name and signature: ##### Types de contacts ##### TypeContact_contrat_internal_SALESREPSIGN=Vertegenwoordiger ondertekening contract diff --git a/htdocs/langs/nl_NL/exports.lang b/htdocs/langs/nl_NL/exports.lang index 0d45ecdbcc8..1afaa7b18b7 100644 --- a/htdocs/langs/nl_NL/exports.lang +++ b/htdocs/langs/nl_NL/exports.lang @@ -8,7 +8,7 @@ ImportableDatas=Importeerbare gegevensgroep SelectExportDataSet=Kies de gegevensgroep welke u wilt exporteren SelectImportDataSet=Kies de gegevensgroep welke u wilt importeren SelectExportFields=Kies velden die u wilt exporteren, of selecteer een voorgedefinieerde exporteerprofiel -SelectImportFields=Kies bronbestandvelden die u wilt importeren en hun doelvelden in database door hen op en neer te verplaatsen met anker %s, of selecteer een voorgedefinieerde importeerprofiel: +SelectImportFields=Choose source file fields you want to import and their target field in database by moving them up and down with anchor %s, or select a predefined import profile: NotImportedFields=Niet geïmporteerde velden van bronbestand SaveExportModel=Bewaar dit exporteerprofiel als u van plan bent om het later nog een keer te gebruiken SaveImportModel=Bewaar dit importeerprofiel als u van plan bent om het later nog een keer te gebruiken @@ -81,7 +81,7 @@ DoNotImportFirstLine=Eerste regel van het bronbestand niet importeren NbOfSourceLines=Aantal regels in het bronbestand NowClickToTestTheImport=Controleer de importeerinstellingen die u heeft opgegegeven. Als deze correct zijn, klik u u de knop "%s" om een simulatie van het importeerproces te starten (Op dit moment veranderen er nog geen gegevens in uw database, het is enkel een simulatie) RunSimulateImportFile=Start de importeersimulatie -FieldNeedSource=Dit veld van de database vereist een gegevensbron +FieldNeedSource=This field requires data from the source file SomeMandatoryFieldHaveNoSource=Sommige verplichte velden hebben geen bronveld uit het gegevensbestand InformationOnSourceFile=Informatie over het bronbestand InformationOnTargetTables=Informatie over doelvelden @@ -123,10 +123,10 @@ BankCode=Bankcode DeskCode=Bankcode BankAccountNumber=Rekeningnummer BankAccountNumberKey=Sleutel -# SpecialCode=Special code -# ExportStringFilter=%% allows replacing one or more characters in the text -# ExportDateFilter='YYYY' 'YYYYMM' 'YYYYMMDD': filters by one year/month/day
    'YYYY+YYYY' 'YYYYMM+YYYYMM' 'YYYYMMDD+YYYYMMDD': filters over a range of years/months/days
    '>YYYY' '>YYYYMM' '>YYYYMMDD': filters on the following years/months/days
    '<YYYY' '<YYYYMM' '<YYYYMMDD': filters on the previous years/months/days -# ExportNumericFilter='NNNNN' filters by one value
    'NNNNN+NNNNN' filters over a range of values
    '>NNNNN' filters by lower values
    '>NNNNN' filters by higher values +SpecialCode=Special code +ExportStringFilter=%% allows replacing one or more characters in the text +ExportDateFilter='YYYY' 'YYYYMM' 'YYYYMMDD': filters by one year/month/day
    'YYYY+YYYY' 'YYYYMM+YYYYMM' 'YYYYMMDD+YYYYMMDD': filters over a range of years/months/days
    '>YYYY' '>YYYYMM' '>YYYYMMDD': filters on the following years/months/days
    '<YYYY' '<YYYYMM' '<YYYYMMDD': filters on the previous years/months/days +ExportNumericFilter='NNNNN' filters by one value
    'NNNNN+NNNNN' filters over a range of values
    '>NNNNN' filters by lower values
    '>NNNNN' filters by higher values ## filters SelectFilterFields=Vul hier de waarden in waarop je wil filteren. FilterableFields=Filtervelden diff --git a/htdocs/langs/nl_NL/holiday.lang b/htdocs/langs/nl_NL/holiday.lang index a2e35d81be8..fa2ce079c18 100644 --- a/htdocs/langs/nl_NL/holiday.lang +++ b/htdocs/langs/nl_NL/holiday.lang @@ -8,7 +8,6 @@ NotActiveModCP=You must enable the module holidays to view this page. NotConfigModCP=You must configure the module holidays to view this page. To do this, click here . NoCPforUser=You don't have a demand for holidays. AddCP=Apply for holidays -CPErrorSQL=An SQL error occurred: Employe=Employee DateDebCP=Begindatum DateFinCP=Einddatum diff --git a/htdocs/langs/nl_NL/languages.lang b/htdocs/langs/nl_NL/languages.lang index 19cc2b57afd..cc324dcf045 100644 --- a/htdocs/langs/nl_NL/languages.lang +++ b/htdocs/langs/nl_NL/languages.lang @@ -19,6 +19,7 @@ Language_en_SA=Engels (Saoedi-Arabië) Language_en_US=Engels (Verenigde Staten) Language_en_ZA=Engels (Zuid-Afrika) Language_es_ES=Spaans +Language_es_DO=Spanish (Dominican Republic) Language_es_AR=Spaans (Argentinië) Language_es_CL=Spanish (Chile) Language_es_HN=Spaans (Honduras) @@ -38,6 +39,7 @@ Language_fr_NC=Frans (Nieuw-Caledonië) Language_he_IL=Hebreeuws Language_hr_HR=Kroatisch Language_hu_HU=Hongaars +Language_id_ID=Indonesian Language_is_IS=IJslands Language_it_IT=Italiaans Language_ja_JP=Japans diff --git a/htdocs/langs/nl_NL/mails.lang b/htdocs/langs/nl_NL/mails.lang index 83ae37e08e9..0b1967a5cff 100644 --- a/htdocs/langs/nl_NL/mails.lang +++ b/htdocs/langs/nl_NL/mails.lang @@ -79,6 +79,7 @@ MailtoEMail=Hyper link to email ActivateCheckRead=Allow to use the "Unsubcribe" link ActivateCheckReadKey=Key use to encrypt URL use for "Read Receipt" and "Unsubcribe" feature EMailSentToNRecipients=EMail sent to %s recipients. +XTargetsAdded=%s recipients added into target list EachInvoiceWillBeAttachedToEmail=A document using default invoice document template will be created and attached to each email. MailTopicSendRemindUnpaidInvoices=Reminder of invoice %s (%s) SendRemind=Send reminder by EMails diff --git a/htdocs/langs/nl_NL/main.lang b/htdocs/langs/nl_NL/main.lang index 570a7d7f8c0..a549841d4c1 100644 --- a/htdocs/langs/nl_NL/main.lang +++ b/htdocs/langs/nl_NL/main.lang @@ -551,6 +551,7 @@ MailSentBy=E-mail verzonden door TextUsedInTheMessageBody=E-mailinhoud SendAcknowledgementByMail=Stuur Bevestiging per e-mail NoEMail=Geen e-mail +NoMobilePhone=No mobile phone Owner=Eigenaar DetectedVersion=Gedetecteerd versie FollowingConstantsWillBeSubstituted=De volgende constanten worden vervangen met de overeenkomstige waarde. diff --git a/htdocs/langs/nl_NL/products.lang b/htdocs/langs/nl_NL/products.lang index cc138ed7381..62984eceb6a 100644 --- a/htdocs/langs/nl_NL/products.lang +++ b/htdocs/langs/nl_NL/products.lang @@ -28,8 +28,10 @@ ProductsAndServicesStatistics=Producten- en dienstenstatistieken ProductsStatistics=Productenstatistieken ProductsOnSell=Beschikbare producten ProductsNotOnSell=Vervallen producten +ProductsOnSellAndOnBuy=Products not for sale nor purchase ServicesOnSell=Beschikbare diensten ServicesNotOnSell=Vervallen diensten +ServicesOnSellAndOnBuy=Services not for sale nor purchase InternalRef=Interne referentie LastRecorded=Laatste geregistreerde verkochte producten / diensten LastRecordedProductsAndServices=Laatste %s geregistreerde producten / diensten @@ -70,6 +72,8 @@ PublicPrice=Adviesprijs CurrentPrice=Huidige prijs NewPrice=Nieuwe prijs MinPrice=Minimum verkoopprijs +MinPriceHT=Minim. selling price (net of tax) +MinPriceTTC=Minim. selling price (inc. tax) CantBeLessThanMinPrice=De verkoopprijs kan niet lager zijn dan de minimumprijs voor dit product ( %s zonder belasting) ContractStatus=Contractstatus ContractStatusClosed=Gesloten @@ -179,6 +183,7 @@ ProductIsUsed=Dit product wordt gebruikt NewRefForClone=Referentie naar nieuw produkt / dienst CustomerPrices=Consumentenprijs SuppliersPrices=Leveranciersprijs +SuppliersPricesOfProductsOrServices=Suppliers prices (of products or services) CustomCode=Code op maat CountryOrigin=Land van herkomst HiddenIntoCombo=Verborgen in selectielijsten @@ -208,6 +213,7 @@ CostPmpHT=Netto VWAP totaal ProductUsedForBuild=Automatisch opgebruiken bij productie ProductBuilded=Productie klaar ProductsMultiPrice=Multi-prijs product +ProductsOrServiceMultiPrice=Customers prices (of products or services, multi-prices) ProductSellByQuarterHT=VWAP kwartaalomzet producten ServiceSellByQuarterHT=VWAP kwartaalomzet diensten Quarter1=1e kwartaal diff --git a/htdocs/langs/nl_NL/shop.lang b/htdocs/langs/nl_NL/shop.lang index 2dc3d4edd4d..95f3ad3c5ee 100644 --- a/htdocs/langs/nl_NL/shop.lang +++ b/htdocs/langs/nl_NL/shop.lang @@ -1,4 +1,5 @@ # Dolibarr language file - Source file is en_US - shop +FailedConnectDBCheckModuleSetup=Failed to connect to oscommerce database. Check your module setup Shop=Winkel ShopWeb=Webwinkel LastOrders=Laatste orders diff --git a/htdocs/langs/nl_NL/stocks.lang b/htdocs/langs/nl_NL/stocks.lang index b16d81f359c..d329a011dc6 100644 --- a/htdocs/langs/nl_NL/stocks.lang +++ b/htdocs/langs/nl_NL/stocks.lang @@ -112,6 +112,7 @@ ReplenishmentOrdersDesc=Lijst van alle open leveranciersbestellingen Replenishments=Bevoorradingen NbOfProductBeforePeriod=Aantal op voorraad van product %s voor de gekozen periode (<%s) NbOfProductAfterPeriod=Aantal op voorraad van product %s na de gekozen periode (<%s) +MassMovement=Mass movement MassStockMovement=Globale voorraadbeweging SelectProductInAndOutWareHouse=Kies een product, een aantal, een van-magazijn, een naar-magazijn, en klik "%s". Als alle nodige bewegingen zijn aangeduid, klik op "%s". RecordMovement=Kaart overbrengen diff --git a/htdocs/langs/pl_PL/admin.lang b/htdocs/langs/pl_PL/admin.lang index ae17b446cfe..a776924c210 100644 --- a/htdocs/langs/pl_PL/admin.lang +++ b/htdocs/langs/pl_PL/admin.lang @@ -116,7 +116,7 @@ LanguageBrowserParameter=Parametr %s LocalisationDolibarrParameters=Lokalizacja parametry ClientTZ=Strefa Czasowa Klienta (użytkownik) ClientHour=Czas klienta (użytkownik) -OSTZ=Strefa czasowa Server OS +OSTZ=Server OS Time Zone PHPTZ=Strefa czasowa serwera PHP PHPServerOffsetWithGreenwich=Offset dla PHP serwer szerokość Greenwich (secondes) ClientOffsetWithGreenwich=Klient / Przeglądarka offset szerokość Greenwich (sekund) @@ -233,7 +233,9 @@ OfficialWebSiteFr=Francuski oficjalnej strony www OfficialWiki=Dolibarr Wiki OfficialDemo=Dolibarr online demo OfficialMarketPlace=Dziennik rynku zewnętrznych modułów / addons -OfficialWebHostingService=Oficjalny serwis usług hostingowych (Cloud hosting) +OfficialWebHostingService=Referenced web hosting services (Cloud hosting) +ReferencedPreferredPartners=Preferred Partners +OtherResources=Autres ressources ForDocumentationSeeWiki=Dla użytkownika lub dewelopera dokumentacji (Doc, FAQ ...),
    zajrzyj do Dolibarr Wiki:
    %s ForAnswersSeeForum=Na wszelkie inne pytania / pomoc, można skorzystać z Dolibarr forum:
    %s HelpCenterDesc1=Obszar ten może pomóc uzyskać wsparcie na usługi Dolibarr. @@ -369,9 +371,9 @@ ExtrafieldSelectList = Wybierz z tabeli ExtrafieldSeparator=Separator ExtrafieldCheckBox=Pole wyboru ExtrafieldRadio=Przełącznik -ExtrafieldParamHelpselect=Lista parametrów musi zostać podana zgodnie z kluczem,wartość

    przykładowo :
    1, wartość1
    2,wartosc2
    3,wartość3
    ...

    Aby uzyskać listę zależną od innej:
    1, wartość1 | parent_list_code: parent_key
    2, wartość2 | parent_list_code: parent_key -ExtrafieldParamHelpcheckbox=Lista parametrów musi zostać podana zgodnie z kluczem, wartość

    przykładowo :
    1, wartość1
    2, wartość2
    3, wartość3
    ... -ExtrafieldParamHelpradio=Parameters list have to be like key,value

    for exemple :
    1,value1
    2,value2
    3,value3
    ... +ExtrafieldParamHelpselect=Parameters list have to be like key,value

    for example :
    1,value1
    2,value2
    3,value3
    ...

    In order to have the list depending on another :
    1,value1|parent_list_code:parent_key
    2,value2|parent_list_code:parent_key +ExtrafieldParamHelpcheckbox=Parameters list have to be like key,value

    for example :
    1,value1
    2,value2
    3,value3
    ... +ExtrafieldParamHelpradio=Parameters list have to be like key,value

    for example :
    1,value1
    2,value2
    3,value3
    ... ExtrafieldParamHelpsellist=Parameters list comes from a table
    Syntax : table_name:label_field:id_field::filter
    Example : c_typent:libelle:id::filter

    filter can be a simple test (eg active=1) to display only active value
    if you want to filter on extrafields use syntaxt extra.fieldcode=... (where field code is the code of extrafield)

    In order to have the list depending on another :
    c_typent:libelle:id:parent_list_code|parent_column:filter LibraryToBuildPDF=Library used to build PDF WarningUsingFPDF=Warning: Your conf.php contains directive dolibarr_pdf_force_fpdf=1. This means you use the FPDF library to generate PDF files. This library is old and does not support a lot of features (Unicode, image transparency, cyrillic, arab and asiatic languages, ...), so you may experience errors during PDF generation.
    To solve this and have a full support of PDF generation, please download TCPDF library, then comment or remove the line $dolibarr_pdf_force_fpdf=1, and add instead $dolibarr_lib_TCPDF_PATH='path_to_TCPDF_dir' @@ -472,7 +474,7 @@ Module410Desc=Webcalendar integracji Module500Name=Special expenses (tax, social contributions, dividends) Module500Desc=Management of special expenses like taxes, social contribution, dividends and salaries Module510Name=Salaries -Module510Desc=Management of empoyees salaries and payments +Module510Desc=Management of employees salaries and payments Module600Name=Powiadomienia Module600Desc=Wyślij powiadomienia (przez e-mail) na Dolibarr działalności wydarzenia Module700Name=Darowizny @@ -495,15 +497,15 @@ Module2400Name=Porządek obrad Module2400Desc=Działania / zadania i porządku zarządzania Module2500Name=Electronic Content Management Module2500Desc=Zapisz i udostępniania dokumentów -Module2600Name= WebServices -Module2600Desc= Włącz serwer usług internetowych Dolibarr -Module2700Name= Gravatar -Module2700Desc= Użyj Gravatar usług online (www.gravatar.com), aby pokazać zdjęcia użytkowników / członków (znaleziono ich e-maile). Konieczność dostępu do Internetu +Module2600Name=WebServices +Module2600Desc=Włącz serwer usług internetowych Dolibarr +Module2700Name=Gravatar +Module2700Desc=Użyj Gravatar usług online (www.gravatar.com), aby pokazać zdjęcia użytkowników / członków (znaleziono ich e-maile). Konieczność dostępu do Internetu Module2800Desc=FTP Client -Module2900Name= GeoIPMaxmind -Module2900Desc= GeoIP możliwości konwersji Maxmind -Module3100Name= Skype -Module3100Desc= Add a Skype button into card of adherents / third parties / contacts +Module2900Name=GeoIPMaxmind +Module2900Desc=GeoIP możliwości konwersji Maxmind +Module3100Name=Skype +Module3100Desc=Add a Skype button into card of adherents / third parties / contacts Module5000Name=Multi-firma Module5000Desc=Pozwala na zarządzanie wieloma firmami Module6000Name=Workflow @@ -681,6 +683,10 @@ Permission401=Czytaj zniżki Permission402=Tworzenie / modyfikować rabaty Permission403=Sprawdź rabaty Permission404=Usuń zniżki +Permission510=Read Salaries +Permission512=Create/modify salaries +Permission514=Delete salaries +Permission517=Export salaries Permission531=Czytaj usług Permission532=Tworzenie / modyfikowania usług Permission534=Usuwanie usług @@ -999,7 +1005,7 @@ ExtraFieldsSupplierOrders=Complementary attributes (orders) ExtraFieldsSupplierInvoices=Complementary attributes (invoices) ExtraFieldsProject=Complementary attributes (projects) ExtraFieldsProjectTask=Complementary attributes (tasks) -ExtraFieldHasWrongValue=Przypisanych %s ma złą wartość. +ExtraFieldHasWrongValue=Attribute %s has a wrong value. AlphaNumOnlyCharsAndNoSpace=only alphanumericals characters without space AlphaNumOnlyLowerCharsAndNoSpace=only alphanumericals and lower case characters without space SendingMailSetup=Ustawienie sendings emailem @@ -1018,13 +1024,13 @@ SuhosinSessionEncrypt=Session storage encrypted by Suhosin ConditionIsCurrently=Condition is currently %s TestNotPossibleWithCurrentBrowsers=Automatic detection not possible YouUseBestDriver=You use driver %s that is best driver available currently. -YouDoNotUseBestDriver=You use drive %s but driver %s is recommanded. +YouDoNotUseBestDriver=You use drive %s but driver %s is recommended. NbOfProductIsLowerThanNoPb=You have only %s products/services into database. This does not required any particular optimization. SearchOptim=Search optimization YouHaveXProductUseSearchOptim=You have %s product into database. You should add the constant PRODUCT_DONOTSEARCH_ANYWHERE to 1 into Home-Setup-Other, you limit the search to the beginning of strings making possible for database to use index and you should get an immediate response. BrowserIsOK=You are using the web browser %s. This browser is ok for security and performance. BrowserIsKO=You are using the web browser %s. This browser is known to be a bad choice for security, performance and reliability. We recommand you to use Firefox, Chrome, Opera or Safari. -XDebugInstalled=XDebug est chargé. +XDebugInstalled=XDebug is loaded. XCacheInstalled=XCache is loaded. AddRefInList=Display customer/supplier ref into list (select list or combobox) and most of hyperlink FieldEdition=Edition of field %s @@ -1073,7 +1079,7 @@ WebCalServer=Serwerze bazy danych kalendarza WebCalDatabaseName=Nazwa bazy danych WebCalUser=Użytkownicy mają dostęp do bazy danych WebCalSetupSaved=Webcalendar konfiguracji zapisany pomyślnie. -WebCalTestOk=Połączenie do serwera ' %s' w bazie danych " %s" z użytkownika' %s' powiodło się. +WebCalTestOk=Connection to server '%s' on database '%s' with user '%s' successful. WebCalTestKo1=Połączenie do serwera ' %s' sukces, ale baza danych' %s' nie mógł zostać osiągnięty. WebCalTestKo2=Połączenie do serwera ' %s' z użytkownika' %s' nie powiodło się. WebCalErrorConnectOkButWrongDatabase=Połączenie udało, ale baza danych nie patrzy się Webcalendar danych. @@ -1119,7 +1125,7 @@ WatermarkOnDraftProposal=Watermark on draft commercial proposals (none if empty) OrdersSetup=Zamówienia zarządzania konfiguracją OrdersNumberingModules=Zamówienia numeracji modules OrdersModelModule=Zamów dokumenty modeli -HideTreadedOrders=Ukryj leczonych lub anulowaniu zamówienia na liście +HideTreadedOrders=Hide the treated or cancelled orders in the list ValidOrderAfterPropalClosed=Aby zatwierdzić wniosek, aby po bliższa, umożliwia nie krok po tymczasowym porządku FreeLegalTextOnOrders=Wolny tekst na zamówienie WatermarkOnDraftOrders=Watermark on draft orders (none if empty) @@ -1214,9 +1220,9 @@ LDAPSynchroKO=Niepowodzenie testu synchronizacji LDAPSynchroKOMayBePermissions=Niepowodzenie testu synchronizacji. Upewnij się, że łączenie się z serwerem jest poprawnie skonfigurowany i pozwala LDAP udpates LDAPTCPConnectOK=TCP connect to LDAP server successful (Server=%s, Port=TCP podłączyć do serwera LDAP powiodło się (Server= %s, port= %s) LDAPTCPConnectKO=TCP connect to LDAP server failed (Server=%s, Port=TCP podłączyć do serwera LDAP nie powiodło się (Server= %s, port= %s) -LDAPBindOK=Connect/Authentificate to LDAP server sucessfull (Server=%s, Port=%s, Admin=%s, Password=Kontakt / Authentificate do serwera LDAP udane (Server= %s, port= %s, %s= Administrator, Password= %s) +LDAPBindOK=Connect/Authentificate to LDAP server successful (Server=%s, Port=%s, Admin=%s, Password=%s) LDAPBindKO=Connect/Authentificate to LDAP server failed (Server=%s, Port=%s, Admin=%s, Password=Kontakt / Authentificate do serwera LDAP nie powiodło się (Server= %s, port= %s, %s= Administrator, Password= %s) -LDAPUnbindSuccessfull=Odłącz udane +LDAPUnbindSuccessfull=Disconnect successful LDAPUnbindFailed=Odłącz nie LDAPConnectToDNSuccessfull=Połączenie au DN ( %s) Russie LDAPConnectToDNFailed=Połączenie au DN ( %s) choue @@ -1273,7 +1279,7 @@ LDAPFieldSidExample=Przykład: objectSid LDAPFieldEndLastSubscription=Data zakończenia subskrypcji LDAPFieldTitle=Post / Funkcja LDAPFieldTitleExample=Example: title -LDAPParametersAreStillHardCoded=LDAP parametry są nadal hardcoded (kontakt w klasie) +LDAPParametersAreStillHardCoded=LDAP parameters are still hardcoded (in contact class) LDAPSetupNotComplete=LDAP konfiguracji nie są kompletne (przejdź na innych kartach) LDAPNoUserOrPasswordProvidedAccessIsReadOnly=Nr hasło administratora lub przewidziane. LDAP dostęp będą anonimowe i w trybie tylko do odczytu. LDAPDescContact=Ta strona pozwala na zdefiniowanie atrybutów LDAP nazwę LDAP drzewa dla każdego danych na Dolibarr kontakty. @@ -1429,7 +1435,7 @@ OptionVATDefault=Standard OptionVATDebitOption=Opcja usługi sur debetowych OptionVatDefaultDesc=VAT jest należny:
    - W dniu dostawy / płatności za towary
    - Na opłatę za usługi OptionVatDebitOptionDesc=VAT jest należny:
    - W dniu dostawy / płatności za towary
    - Na fakturze (obciążenie) na usługi -SummaryOfVatExigibilityUsedByDefault=Godzina VAT wymagalność domyślnie według choosed opcji: +SummaryOfVatExigibilityUsedByDefault=Time of VAT exigibility by default according to chosen option: OnDelivery=Na dostawy OnPayment=W sprawie wypłaty OnInvoice=Na fakturze @@ -1446,7 +1452,7 @@ AccountancyCodeBuy=Purchase account. code AgendaSetup=Działania i porządku konfiguracji modułu PasswordTogetVCalExport=Klucz do wywozu zezwolić na link PastDelayVCalExport=Nie starsze niż eksport przypadku -AGENDA_USE_EVENT_TYPE=Use events types (managed into menu Setup -> Dictionnary -> Type of agenda events) +AGENDA_USE_EVENT_TYPE=Use events types (managed into menu Setup -> Dictionary -> Type of agenda events) ##### ClickToDial ##### ClickToDialDesc=Moduł ten pozwala dodać ikonę po numer telefonu Dolibarr kontakty. Kliknięcie na tę ikonę, będzie połączenie z serveur z danego adresu URL można zdefiniować poniżej. Może to być wykorzystane, aby połączyć się z Call Center z systemu Dolibarr, że mogą dzwonić na numer telefonu SIP system przykład. ##### Point Of Sales (CashDesk) ##### diff --git a/htdocs/langs/pl_PL/contracts.lang b/htdocs/langs/pl_PL/contracts.lang index ad9bc6487ed..3a8c8fb161e 100644 --- a/htdocs/langs/pl_PL/contracts.lang +++ b/htdocs/langs/pl_PL/contracts.lang @@ -38,7 +38,7 @@ ConfirmCloseService=Czy na pewno chcesz zamknąć tej usługi wraz z datą %s ValidateAContract=Sprawdź umowę ActivateService=Aktywacja usługi ConfirmActivateService=Czy na pewno chcesz, aby uaktywnić tę usługę z dnia %s? -# RefContract=Contract reference +RefContract=Contract reference DateContract=Kontrakt daty DateServiceActivate=Data aktywacji usługi DateServiceUnactivate=Data doręczenia unactivation @@ -85,10 +85,12 @@ PaymentRenewContractId=Odnowienie umowy linii (liczba %s) ExpiredSince=Data ważności RelatedContracts=Związane z nimi umowy NoExpiredServices=Nie minął aktywne usługi -# ListOfServicesToExpireWithDuration=List of Services to expire in %s days -# ListOfServicesToExpireWithDurationNeg=List of Services expired from more than %s days -# ListOfServicesToExpire=List of Services to expire -# NoteListOfYourExpiredServices=This list contains only services of contracts for third parties you are linked to as a sale representative. +ListOfServicesToExpireWithDuration=List of Services to expire in %s days +ListOfServicesToExpireWithDurationNeg=List of Services expired from more than %s days +ListOfServicesToExpire=List of Services to expire +NoteListOfYourExpiredServices=This list contains only services of contracts for third parties you are linked to as a sale representative. +StandardContractsTemplate=Standard contracts template +ContactNameAndSignature=For %s, name and signature: ##### Types de contacts ##### TypeContact_contrat_internal_SALESREPSIGN=Podpisanie umowy sprzedaży diff --git a/htdocs/langs/pl_PL/exports.lang b/htdocs/langs/pl_PL/exports.lang index c7341e0e11a..b6381dc08c3 100644 --- a/htdocs/langs/pl_PL/exports.lang +++ b/htdocs/langs/pl_PL/exports.lang @@ -8,7 +8,7 @@ ImportableDatas=Przywozowe danych SelectExportDataSet=Wybierz dane, które chcesz wyeksportować ... SelectImportDataSet=Wybierz dane, które chcesz zaimportować ... SelectExportFields=Wybierz pola, które chcesz wyeksportować, lub wybrać predefiniowany profil eksportu -SelectImportFields=Wybierz pola, które chcesz zaimportować, lub wybrać predefiniowany profil importu +SelectImportFields=Choose source file fields you want to import and their target field in database by moving them up and down with anchor %s, or select a predefined import profile: NotImportedFields=Obszary plik przywożonych źródła nie SaveExportModel=Zapisz ten wywóz profil jeśli masz zamiar ponownego użycia go później ... SaveImportModel=Zapisz ten przywóz profil jeśli masz zamiar ponownego użycia go później ... @@ -64,7 +64,7 @@ ChooseFormatOfFileToImport=Wybierz format pliku do wykorzystania jako format pli ChooseFileToImport=Wybierz plik do zaimportowania, a następnie kliknij przycisk picto %s ... SourceFileFormat=format pliku źródłowego FieldsInSourceFile=Obszary w pliku źródłowym -# FieldsInTargetDatabase=Target fields in Dolibarr database (bold=mandatory) +FieldsInTargetDatabase=Target fields in Dolibarr database (bold=mandatory) Field=Pole NoFields=Nie pól MoveField=Przenieś %s kolumnie polu numeru @@ -81,7 +81,7 @@ DoNotImportFirstLine=Nie przywozili pierwszym wierszu pliku źródłowego NbOfSourceLines=Liczba linii w pliku źródłowym NowClickToTestTheImport=Sprawdź parametry na przywóz zostało to określone. Jeśli są one prawidłowe, kliknij na przycisk "%s", aby uruchomić symulację procesu importowania (żadne dane nie zostaną zmienione w bazie danych, to tylko symulacja na razie) ... RunSimulateImportFile=Uruchomienie symulacji import -FieldNeedSource=Czuje się w bazie danych wymaga danych z pliku źródłowego +FieldNeedSource=This field requires data from the source file SomeMandatoryFieldHaveNoSource=Niektóre z pól obowiązkowych nie ma źródła danych z pliku InformationOnSourceFile=Informacje o pliku źródłowego InformationOnTargetTables=Informacji na temat docelowego pola @@ -102,33 +102,33 @@ NbOfLinesImported=Liczba linii zaimportowany: %s. DataComeFromNoWhere=Wartości, aby dodać pochodzi z nigdzie w pliku źródłowym. DataComeFromFileFieldNb=Wartości, aby dodać pochodzi z %s numer pola w pliku źródłowym. DataComeFromIdFoundFromRef=Wartość, która pochodzi z %s numer dziedzinie pliku źródłowego zostaną wykorzystane w celu znalezienia id rodzica obiektu do użytkowania (So %s objet że ma ref. Od pliku źródłowego musi istnieć w Dolibarr). -# DataComeFromIdFoundFromCodeId=Code that comes from field number %s of source file will be used to find id of parent object to use (So the code from source file must exists into dictionary %s). Note that if you know id, you can also use it into source file instead of code. Import should work in both cases. +DataComeFromIdFoundFromCodeId=Code that comes from field number %s of source file will be used to find id of parent object to use (So the code from source file must exists into dictionary %s). Note that if you know id, you can also use it into source file instead of code. Import should work in both cases. DataIsInsertedInto=Danych pochodzących z pliku źródłowego zostanie wstawiony w pole następujące brzmienie: DataIDSourceIsInsertedInto=Id rodzica znalezionego obiektu na podstawie danych w pliku źródłowym, zostaną włączone do następujących dziedzinach: DataCodeIDSourceIsInsertedInto=Id linii macierzystej znaleźć z kodem, zostaną włączone do następnego pola: SourceRequired=Wartość danych jest obowiązkowe SourceExample=Przykład możliwych wartości danych ExampleAnyRefFoundIntoElement=Wszelkie ref dla %s elementów -# ExampleAnyCodeOrIdFoundIntoDictionary=Any code (or id) found into dictionary %s +ExampleAnyCodeOrIdFoundIntoDictionary=Any code (or id) found into dictionary %s CSVFormatDesc=Format pliku oddzielonych przecinkami jakości (. Csv).
    Jest to format pliku tekstowego, gdzie pola oddzielone są separatorem [%s]. Jeśli wewnątrz znajduje się separator zawartości pola, jest zaokrąglona przez cały charakter [%s]. Ucieczka do charakteru uciec charakter rundy [%s]. -# Excel95FormatDesc=Excel file format (.xls)
    This is native Excel 95 format (BIFF5). -# Excel2007FormatDesc=Excel file format (.xlsx)
    This is native Excel 2007 format (SpreadsheetML). -# TsvFormatDesc=Tab Separated Value file format (.tsv)
    This is a text file format where fields are separated by a tabulator [tab]. -# ExportFieldAutomaticallyAdded=Field %s was automatically added. It will avoid you to have similar lines to be treated as duplicate records (with this field added, all lines will own their own id and will differ). -# CsvOptions=Csv Options -# Separator=Separator -# Enclosure=Enclosure -# SuppliersProducts=Suppliers Products +Excel95FormatDesc=Excel file format (.xls)
    This is native Excel 95 format (BIFF5). +Excel2007FormatDesc=Excel file format (.xlsx)
    This is native Excel 2007 format (SpreadsheetML). +TsvFormatDesc=Tab Separated Value file format (.tsv)
    This is a text file format where fields are separated by a tabulator [tab]. +ExportFieldAutomaticallyAdded=Field %s was automatically added. It will avoid you to have similar lines to be treated as duplicate records (with this field added, all lines will own their own id and will differ). +CsvOptions=Csv Options +Separator=Separator +Enclosure=Enclosure +SuppliersProducts=Suppliers Products BankCode=Kod banku DeskCode=Recepcja kod BankAccountNumber=Numer konta BankAccountNumberKey=Klucz -# SpecialCode=Special code -# ExportStringFilter=%% allows replacing one or more characters in the text -# ExportDateFilter='YYYY' 'YYYYMM' 'YYYYMMDD': filters by one year/month/day
    'YYYY+YYYY' 'YYYYMM+YYYYMM' 'YYYYMMDD+YYYYMMDD': filters over a range of years/months/days
    '>YYYY' '>YYYYMM' '>YYYYMMDD': filters on the following years/months/days
    '<YYYY' '<YYYYMM' '<YYYYMMDD': filters on the previous years/months/days -# ExportNumericFilter='NNNNN' filters by one value
    'NNNNN+NNNNN' filters over a range of values
    '>NNNNN' filters by lower values
    '>NNNNN' filters by higher values +SpecialCode=Special code +ExportStringFilter=%% allows replacing one or more characters in the text +ExportDateFilter='YYYY' 'YYYYMM' 'YYYYMMDD': filters by one year/month/day
    'YYYY+YYYY' 'YYYYMM+YYYYMM' 'YYYYMMDD+YYYYMMDD': filters over a range of years/months/days
    '>YYYY' '>YYYYMM' '>YYYYMMDD': filters on the following years/months/days
    '<YYYY' '<YYYYMM' '<YYYYMMDD': filters on the previous years/months/days +ExportNumericFilter='NNNNN' filters by one value
    'NNNNN+NNNNN' filters over a range of values
    '>NNNNN' filters by lower values
    '>NNNNN' filters by higher values ## filters -# SelectFilterFields=If you want to filter on some values, just input values here. -# FilterableFields=Champs Filtrables -# FilteredFields=Filtered fields -# FilteredFieldsValues=Value for filter +SelectFilterFields=If you want to filter on some values, just input values here. +FilterableFields=Champs Filtrables +FilteredFields=Filtered fields +FilteredFieldsValues=Value for filter diff --git a/htdocs/langs/pl_PL/holiday.lang b/htdocs/langs/pl_PL/holiday.lang index bbb7a899408..9d6a6d89525 100644 --- a/htdocs/langs/pl_PL/holiday.lang +++ b/htdocs/langs/pl_PL/holiday.lang @@ -8,7 +8,6 @@ NotActiveModCP=You must enable the module holidays to view this page. NotConfigModCP=You must configure the module holidays to view this page. To do this, click here . NoCPforUser=You don't have a demand for holidays. AddCP=Apply for holidays -CPErrorSQL=An SQL error occurred: Employe=Employee DateDebCP=Data rozpoczęcia DateFinCP=Data zakończenia diff --git a/htdocs/langs/pl_PL/languages.lang b/htdocs/langs/pl_PL/languages.lang index b4184e2adc1..a0ec95d8e20 100644 --- a/htdocs/langs/pl_PL/languages.lang +++ b/htdocs/langs/pl_PL/languages.lang @@ -19,6 +19,7 @@ Language_en_SA=Angielski (Arabia Saudyjska) Language_en_US=Angielski (Stany Zjednoczone) Language_en_ZA=Angielski (Republika Południowej Afryki) Language_es_ES=Hiszpański +Language_es_DO=Spanish (Dominican Republic) Language_es_AR=Hiszpański (Argentyna) Language_es_CL=Spanish (Chile) Language_es_HN=Hiszpański (Honduras) @@ -38,6 +39,7 @@ Language_fr_NC=Francuski (Nowa Kaledonia) Language_he_IL=Hebrajski Language_hr_HR=Chorwacki Language_hu_HU=Węgierski +Language_id_ID=Indonesian Language_is_IS=Islandzki Language_it_IT=Włoski Language_ja_JP=Japoński diff --git a/htdocs/langs/pl_PL/mails.lang b/htdocs/langs/pl_PL/mails.lang index 73e1fa3d891..3785889299f 100644 --- a/htdocs/langs/pl_PL/mails.lang +++ b/htdocs/langs/pl_PL/mails.lang @@ -79,6 +79,7 @@ MailtoEMail=Hyper link to email ActivateCheckRead=Allow to use the "Unsubcribe" link ActivateCheckReadKey=Key use to encrypt URL use for "Read Receipt" and "Unsubcribe" feature EMailSentToNRecipients=EMail sent to %s recipients. +XTargetsAdded=%s recipients added into target list EachInvoiceWillBeAttachedToEmail=A document using default invoice document template will be created and attached to each email. MailTopicSendRemindUnpaidInvoices=Reminder of invoice %s (%s) SendRemind=Send reminder by EMails diff --git a/htdocs/langs/pl_PL/main.lang b/htdocs/langs/pl_PL/main.lang index 8711e8b2aa8..9babeeb78b0 100644 --- a/htdocs/langs/pl_PL/main.lang +++ b/htdocs/langs/pl_PL/main.lang @@ -551,6 +551,7 @@ MailSentBy=E-mail został wysłany przez TextUsedInTheMessageBody=Email ciała SendAcknowledgementByMail=Wyślij Ack. przez e-mail NoEMail=Brak e-mail +NoMobilePhone=No mobile phone Owner=Właściciel DetectedVersion=Wykryto wersji FollowingConstantsWillBeSubstituted=Po stałych będzie zastąpić o odpowiedniej wartości. diff --git a/htdocs/langs/pl_PL/products.lang b/htdocs/langs/pl_PL/products.lang index 8aae8d606db..f58dbad39cc 100644 --- a/htdocs/langs/pl_PL/products.lang +++ b/htdocs/langs/pl_PL/products.lang @@ -28,8 +28,10 @@ ProductsAndServicesStatistics=Statystyki produktów i usług ProductsStatistics=Statystyki produktów ProductsOnSell=Produkty dostępne ProductsNotOnSell=Produkty nieaktualne +ProductsOnSellAndOnBuy=Products not for sale nor purchase ServicesOnSell=Usługi dostępne ServicesNotOnSell=Usługi nieaktualne +ServicesOnSellAndOnBuy=Services not for sale nor purchase InternalRef=Wewnętrzny nr referencyjny LastRecorded=Ostatnie produkty / usługi na sprzedaż rejestrowana LastRecordedProductsAndServices=Ostatnie %s zarejestrowanych produktów / usług @@ -70,6 +72,8 @@ PublicPrice=Cena publiczna CurrentPrice=Aktualna cena NewPrice=Nowa cena MinPrice=Min. cena sprzedaży +MinPriceHT=Minim. selling price (net of tax) +MinPriceTTC=Minim. selling price (inc. tax) CantBeLessThanMinPrice=Cena sprzedaży nie może być niższa niż minimalna dopuszczalna dla tego produktu (%s bez podatku). Ten komunikat może się również pojawić po wpisaniu zbyt wysokiego rabatu. ContractStatus=Status zamówienia ContractStatusClosed=Zamknięte @@ -179,6 +183,7 @@ ProductIsUsed=Ten produkt jest używany NewRefForClone=Ref. nowych produktów / usług CustomerPrices=Ceny klientów SuppliersPrices=Ceny dostawców +SuppliersPricesOfProductsOrServices=Suppliers prices (of products or services) CustomCode=Kod taryfy celnej CountryOrigin=Kraj pochodzenia HiddenIntoCombo=Ukryty na listach wyboru @@ -208,6 +213,7 @@ CostPmpHT=Łączna VWAP netto ProductUsedForBuild=Automatycznie zużyte przez produkcję ProductBuilded=Produkcja została zakończona ProductsMultiPrice=Multi-cena produktu +ProductsOrServiceMultiPrice=Customers prices (of products or services, multi-prices) ProductSellByQuarterHT=Obroty kwartalne VWAP produktów ServiceSellByQuarterHT=Obroty kwartalne VWAP usług Quarter1=1-szy Kwartał diff --git a/htdocs/langs/pl_PL/shop.lang b/htdocs/langs/pl_PL/shop.lang index cd68d5f0fe0..cebcc7e1a75 100644 --- a/htdocs/langs/pl_PL/shop.lang +++ b/htdocs/langs/pl_PL/shop.lang @@ -1,4 +1,5 @@ # Dolibarr language file - Source file is en_US - shop +FailedConnectDBCheckModuleSetup=Failed to connect to oscommerce database. Check your module setup Shop=Sklep ShopWeb=Shop internetowy LastOrders=Ostatnie zamówienia diff --git a/htdocs/langs/pl_PL/stocks.lang b/htdocs/langs/pl_PL/stocks.lang index 2dc75526828..6e0dd8cb088 100644 --- a/htdocs/langs/pl_PL/stocks.lang +++ b/htdocs/langs/pl_PL/stocks.lang @@ -112,6 +112,7 @@ ReplenishmentOrdersDesc=This is list of all opened supplier orders Replenishments=Replenishments NbOfProductBeforePeriod=Quantity of product %s in stock before selected period (< %s) NbOfProductAfterPeriod=Quantity of product %s in stock after selected period (> %s) +MassMovement=Mass movement MassStockMovement=Mass stock movement SelectProductInAndOutWareHouse=Select a product, a quantity, a source warehouse and a target warehouse, then click "%s". Once this is done for all required movements, click onto "%s". RecordMovement=Record transfert diff --git a/htdocs/langs/pt_BR/admin.lang b/htdocs/langs/pt_BR/admin.lang index 9e4c4cfdd38..0bb138efa70 100644 --- a/htdocs/langs/pt_BR/admin.lang +++ b/htdocs/langs/pt_BR/admin.lang @@ -3,15 +3,16 @@ Foundation=Empresa/Instituição VersionProgram=Versão Programa VersionLastInstall=Versão da instalação inicial VersionLastUpgrade=Versão da última atualização -SessionId=Sessão ID +SessionId=ID da sessao SessionSaveHandler=Manipulador para salvar sessões. SessionSavePath=Localizacao da sessao guardada PurgeSessions=Remover sessões +ConfirmPurgeSessions=Você tem certeza de que deseja desconectar todas as sessões? Isto irá desconectar TODOS usuários (exceto você). NoSessionListWithThisHandler=Salvar manipulador de sessão configurado no PHP não permite listar todas as sessões em execução. LockNewSessions=Bloquear novas conexões ConfirmLockNewSessions=Você tem certeza que quer restringir qualquer nova conexão Dolibarr para si mesmo. Apenas usuário %s será capaz de se conectar depois. UnlockNewSessions=Remover bloqueio conexão -YourSession=Vossa sessão +YourSession=Sua sessao Sessions=Sessão de usuarios WebUserGroup=usuario/grupo do servidor web NoSessionFound=Seu PHP parece não permitir listar as sessões ativas. Diretório usado para salvar sessões (%s) pode ser protegido (por exemplo, pelas permissões do sistema operacional ou por diretiva PHP "open_basedir"). @@ -28,114 +29,183 @@ InternalUsers=Usuários Internos ExternalUsers=Usuários Externos SetupArea=Área Configuração FormToTestFileUploadForm=Formulário para testar upload de arquivo (de acordo com a configuração) -IfModuleEnabled=Rem: Sim só é eficaz se o módulo %s estiver ativado +IfModuleEnabled=Nota: Sim só é eficaz se o módulo %s estiver ativado RemoveLock=Exclua o arquivo %s se tem permissão da ferramenta de atualização. RestoreLock=Substituir o arquivo %s e apenas dar direito de ler a esse arquivo, a fim de proibir novas atualizações. ErrorModuleRequireDolibarrVersion=Erro, este módulo requer uma versão %s ou superior do ERP -DictionarySetup=Dicionários -DisableJavascript=Desativar as funções Javascript +DictionarySetup=Dictionary setup +Dictionary=Dictionaries +ErrorReservedTypeSystemSystemAuto=Valores 'system' e 'systemauto' para o tipo é reservado. Você pode usar "usuário" como valor para adicionar seu próprio registro +ErrorCodeCantContainZero=Código não pode conter valor 0 +DisableJavascript=Desativar as funções Javascript e AJax ConfirmAjax=Utilizar os popups de confirmação Ajax -UseSearchToSelectCompany=Utilizar um formulário de pesquisa para procurar fornecedores (em vez da lista abaixo) +UseSearchToSelectCompany=Use campos de completação automática para escolher terceiros em vez de usar uma caixa de listagem. +ActivityStateToSelectCompany=Adicionar uma opção de filtro para exibir / ocultar thirdparties que estão atualmente em atividade ou deixou de ativar +UseSearchToSelectContact=Use campos de completação automática para escolher de contato (em vez de usar uma caixa de lista). +SearchFilter=Opções de filtro para pesquisa +NumberOfKeyToSearch=Número de caracteres para iniciar a pesquisa: %s ViewFullDateActions=Ver as datas das ações na totalidade na ficha do fornecedor UsePopupCalendar=Utilizar popups para a introdução das datas +UsePreviewTabs=Use guias de visualização ShowPreview=Ver Preview ThemeCurrentlyActive=Tema Atualmente Ativo CurrentTimeZone=Zona Horária atual NextValueForInvoices=Próximo Valor (Faturas) MustBeLowerThanPHPLimit=Observação: Parâmetros PHP limita o tamanho a %s %s de máximo, qualquer que seja o valor deste parâmetros -NoMaxSizeByPHPLimit=Nenhuma limitação interna não servidor PHP +NoMaxSizeByPHPLimit=Nota: Não há limite definido em sua configuração do PHP +UseCaptchaCode=Utilização do Captcha no login UseAvToScanUploadedFiles=Utilização de um antivírus para scanear os arquivos enviados AntiVirusCommandExample=Exemplo de Comando: c: \\ Program Files (x86) \\ ClamWin \\ bin \\ clamscan.exe
    Exemplo de Mexilhão: / usr / bin / clamscan -AntiVirusParam=Mais informações sobre parâmetros de linha de comando +AntiVirusParam=Mais parâmetros na linha de comando AntiVirusParamExample=Exemplo de Parametro de Comando: - database = "C: \\ Program Files (x86) \\ lib ClamWin \\" UserSetup=Configuração e Administração dos Usuário -MenuSetup=Administração dos menus por base de dados +MenuSetup=Configuração do gerenciamento de menu MenuLimits=Limites e Precisão DetailPosition=Número de ordem para a posição do menu +PersonalizedMenusNotSupported=Menus personalizados não são suportados +NotConfigured=Modulo nao configurado Setup=Configuração do Sistema Activation=Ativação Active=Ativo +SetupShort=Configuracao +OtherSetup=Outras configuracoes CurrentValueSeparatorThousand=Separador milhar -LocalisationDolibarrParameters=parâmetros de localização +ModulesCommon=Módulos Principais +ModulesInterfaces=Módulos de interface +ModulesSpecial=Módulos muito específico +ClientTZ=Fuso horário do cliente (usuário). +ClientHour=Horário do cliente (usuário) +PHPTZ=Fuso horário do servidor PHP PHPServerOffsetWithGreenwich=Offset com Greenwich (segundos) -CurrentSessionTimeOut=Time out Sessão atual -OSEnv=Entorno SO -MaxNbOfLinesForBoxes=N� de linhas máximo para as caixas -PositionByDefault=Posição por default +ClientOffsetWithGreenwich=Largura do Browser/Cleinte compesa Greenwich(segundos) +DaylingSavingTime=Horário de verão +CurrentHour=PHP Time (servidor) +CompanyTZ=Fuso Horario da empresa(empresa principal) +CompanyHour=Tempo empresa(empresa principal) +CurrentSessionTimeOut=Tempo limite da sessão atual +OSEnv=OS Ambiente +MaxNbOfLinesForBoxes=Numero de linhas máximo para as caixas +PositionByDefault=Posição por padrao MenusDesc=Os configuradores do menu definem o conteúdo das 2 barras de menus (a barra horizontal e a barra vertical). É possível atribuir configuradores diferentes segundo o usuário seja interno ou externo. MenusEditorDesc=O editor de menus permite definir entradas personalizadas nos menus. Deve utilizar com prudência sobe pena de colocar o ERP numa situação instável sendo necessário uma reinstalação para encontrar um menu coerente. -MenuForUsers=menu para os Usuário +MenuForUsers=menu para os usuarios +LangFile=Arquivo .lang SystemInfo=Informações de Sistema -SystemToolsAreaDesc=Esta área oferece diferentes funções da administração. Use o menu para escolher a Funcionalidadee pesquisada. +SystemTools=Ferramentas do Sistema +SystemToolsArea=Área de ferramentas do sistema +SystemToolsAreaDesc=Esta área oferece diferentes funções da administração. Use o menu para escolher a Funcionalidade que procura. Purge=Limpar PurgeAreaDesc=Esta página permite eliminar todos os arquivos criados ou guardados pelo ERP (Arquivos temporários ou todos os arquivos da pasta %s). O uso desta função não é necessária. Proporciona-se para os Usuários que albergam o ERP não servidor que oferece as permissões de eliminação de arquivos salvaguardados pela servidor Web. +PurgeDeleteLogFile=Excluir arquivo de log % s definido para o módulo Syslog (sem risco de perder dados) PurgeDeleteTemporaryFiles=Eliminar todos os arquivos temporários (sem perigo de perca de dados) PurgeDeleteAllFilesInDocumentsDir=Eliminar todos os arquivos da pasta %s. Arquivos temporários e Arquivos agregados a elementos (Fornecedores, faturas, etc.) serão eliminados. PurgeRunNow=Eliminar Agora -PurgeNDirectoriesDeleted=%s Arquivos o pastas eliminados -PurgeAuditEvents=Eliminar os eventos de segurança -ConfirmPurgeAuditEvents=Tem a certeza que pretende limpar a lista de eventos de auditoria de segurança (perde toda a lista, mas isso não afeta a sua opinião)? -BackupFileSuccessfullyCreated=Arquivo de cópia gerado corretamente -YouCanDownloadBackupFile=Os arquivos gerados podem agora ser descarregados -NoBackupFileAvailable=Nenhuma cópia disponível -ImportMySqlDesc=Para importar uma cópia, deve usar o mysql e na linha de comando seguinte: -ImportMySqlCommand=%s %s < miArquivobackup.sql +PurgeNothingToDelete=Nenhum diretorio ou arquivo para ser apagado. +PurgeNDirectoriesDeleted=%s Arquivos o pastas apagados. +PurgeAuditEvents=Apagar os eventos de segurança +ConfirmPurgeAuditEvents=Tem a certeza que pretende limpar a lista de eventos de auditoria de segurança? Todos os logs de seguranca serao apagaos, nenhum outro dado sera removido. +NewBackup=Novo Backup +GenerateBackup=Gerar Backup +Backup=Backup +RunCommandSummary=A cópia será executada pelo seguinte comando +RunCommandSummaryToLaunch=O backup pode ser executado com o seguinte comando +WebServerMustHavePermissionForCommand=Seu servidor deve ter permissoes para executar esta ordem +BackupResult=Resultado do Backup +BackupFileSuccessfullyCreated=Arquivo de Backup gerado corretamente +YouCanDownloadBackupFile=Pode ser feito o download dos arquivos gerados +NoBackupFileAvailable=Nenhum Backup Disponivel +ToBuildBackupFileClickHere=Para criar uma cópia, clique
    here. +ImportMySqlDesc=Para importar um backup, deve usar o mysql e na linha de comando seguinte: +ImportPostgreSqlDesc=Para importar um arquivo de backup, você deve utilizar o pg_restore através do prompt de comando: +ImportMySqlCommand=%s %s < meuArquivobackup.sql +ImportPostgreSqlCommand=%s %s meuarquivodebackup.sql FileNameToGenerate=Nome do arquivo a gerar -CommandsToDisableForeignKeysForImport=Comando para desativar as chave exclusiva para a importação +CommandsToDisableForeignKeysForImport=Comando para desativar as chave estrangeira para a importação +CommandsToDisableForeignKeysForImportWarning=Obrigatório se você quer ser capaz de restaurar o despejo sql mais tarde ExportCompatibility=Compatibilidade do arquivo de exportação gerado +PostgreSqlExportParameters=Parâmetros de exportação do PostgreSQL UseTransactionnalMode=Utilizar o modo transacional -ExportOptions=Opções de exportação de ordens +FullPathToPostgreSQLdumpCommand=Caminho completo para o comando pg_dump +AddDropDatabase=Adicionar comando DROP DATABASE +AddDropTable=Adicionar comando DROP TABLE ExtendedInsert=Instruções INSERT estendidas +NoLockBeforeInsert=Sem comandos de bloqueio em torno INSERIR EncodeBinariesInHexa=Codificar os campos binários em hexadecimal -BoxesDesc=As caixas são zonas de informação reduzidas que se mostram em algumas páginas. Pode escolher ativar ou desativar uma caixa fazendo click em 'Ativar', ou fazendo click não ícone de reciclagem para desativar. Só se mostram as Caixas relacionadas com um habilitado módulos são mostrados. ModulesDesc=Os módulos do ERP definem as Funcionalidades disponíveis na aplicação. Alguns módulos requerem direitos que deverão indicar-se nos Usuários para que possam acessar ás suas Funcionalidades. -ModulesJobDesc=Os módulos ofícios permitem uma pré-configuração simplificada do ERP para um oficio específico. +ModulesJobDesc=Os módulos mpresariais permitem uma pré-configuração simplificada do ERP para um negocio especifico. +ModulesMarketPlaceDesc=Voce pode encontrar mais modulos para download em sites externos na internet +ModulesMarketPlaces=Mais módulos +DoliStoreDesc=DoliStore, Pagina oficial para modulos externos do Dolibarr ERP/CRM. +WebSiteDesc=Você pode pesquisar para encontrar mais módulos em Provedores de sites BoxesAvailable=Caixas disponíveis BoxesActivated=Caixas ativadas -ActivateOn=Ativar sobre -ActiveOn=Ativa sobre +ActivateOn=Ative em +ActiveOn=Ativada em SourceFile=Arquivo origem AutomaticIfJavascriptDisabled=Automático se Javascript está desativado AvailableOnlyIfJavascriptNotDisabled=Disponível somente se Javascript esta ativado AvailableOnlyIfJavascriptAndAjaxNotDisabled=Disponível somente se Javascript e Ajax estão ativados Passwords=Senhas -DoNotStoreClearPassword=Não guardar a senha sem criptografar na base -MainDbPasswordFileConfEncrypted=Encriptar a senha da base em arquivo conf.php -ProtectAndEncryptPdfFiles=Proteção e encriptação dos pdf gerados +DoNotStoreClearPassword=Nao salve senhas faceis no banco de dados mas salvar senhas criptografadas(Ativacao recomendada) +MainDbPasswordFileConfEncrypted=Encriptar a senha da base em arquivo conf.php(Ativacao Recomendada) +InstrucToEncodePass=Para ter a senha codificada na conf.php file , substitua a linha
    $ dolibarr_main_db_pass = "..."
    por
    $ dolibarr_main_db_pass = "encriptadas:% s" +InstrucToClearPass=Para ter a senha codificada na conf.php file , substitua a linha
    $ dolibarr_main_db_pass = "..."
    por
    $ dolibarr_main_db_pass = "encriptadas:% s" +ProtectAndEncryptPdfFiles=Proteção e encriptação dos pdf gerados(Ativado não recomendado, quebra geração pdf massa) ProtectAndEncryptPdfFilesDesc=A proteção de um documento pdf deixa o documento livre para leitura e para impressão a qualquer leitor de PDF. Ao contrário, a modificação e a cópia resultam impossível. -DolibarrProjectLeader=Chefe de projeto +Feature=Caracteristica +DolibarrProjectLeader=Lider de projeto Developpers=Programadores/contribuidores OtherDeveloppers=Outros Programadores/contribuidores -OfficialWebSite=Site web oficial internacional +OfficialWebSite=Site oficial do Dolibarr OfficialWebSiteFr=site web oficial falado/escrito em francês -OfficialDemo=Demo em linha ERP -ForDocumentationSeeWiki=Para a documentação de usuário, programador ou Perguntas Freq�entess (FAQ), consulte o wiki do ERP:
    %s +ForAnswersSeeForum=Para outras questões ou realizar as suas próprias consultas, pode utilizar o fórum do ERP:
    %s HelpCenterDesc1=Esta área permite ajudá-lo a obter um serviço de suporte do ERP. HelpCenterDesc2=Alguns destes serviços só estão disponíveis em inglé. -CurrentTopMenuHandler=Gerente de menu superior -CurrentLeftMenuHandler=Gerente de menu esquerdo +CurrentTopMenuHandler=Manipulador de menu superior atual +CurrentLeftMenuHandler=Manipulador de menu à esquerda atual +CurrentMenuHandler=Manipulador do menu atual +CurrentSmartphoneMenuHandler=Manipular do Menu Smartphone Atual EMailsSetup=configuração E-Mails -EMailsDesc=Esta página permite substituir os parâmetros PHP relacionados com o envio de correios eletrônicos. Na maioria dos casos não SO como UNIX/Linux, os parâmetros PHP estão corretos e esta página é inútil. -MAIN_MAIL_SMTP_PORT=Porta do servidor SMTP (Por default não php.ini: %s) -MAIN_MAIL_SMTP_SERVER=Nome host ou ip do servidor SMTP (Por default em php.ini: %s) -MAIN_MAIL_EMAIL_FROM=E-Mail do emissor para envios E-Mail automáticos (Por default em php.ini: %s) +EMailsDesc=Esta página permite substituir os parâmetros PHP relacionados com o envio de correios eletrônicos. Na maioria dos casos como UNIX/Linux, os parâmetros PHP estão corretos e esta página é inútil. +MAIN_MAIL_SMTP_PORT=Porta do servidor SMTP (Por default no php.ini: %s) +MAIN_MAIL_SMTP_SERVER=Nome host ou ip do servidor SMTP (Por padrao em php.ini: %s) +MAIN_MAIL_EMAIL_FROM=E-Mail do emissor para envios E-Mail automáticos (Por padrao no php.ini: %s) +MAIN_MAIL_ERRORS_TO=Remetente de e-mail utilizado para retornar emails enviados com erros +MAIN_MAIL_AUTOCOPY_TO=Enviar sistematicamente uma cópia oculta de todos os emails enviados para MAIN_DISABLE_ALL_MAILS=Desativar globalmente todo o envio de correios eletrônicos (para modo de testes) MAIN_MAIL_SENDMODE=Método de envio de e-mails +MAIN_MAIL_EMAIL_TLS=Usar encryptacao TLS(SSL) +MAIN_DISABLE_ALL_SMS=Desabilitar todos os envios de SMS(para testes ou demonstracoes) +MAIN_SMS_SENDMODE=Método para envio de SMS +MAIN_MAIL_SMS_FROM=Número padrão para envio de SMS FeatureNotAvailableOnLinux=Funcionalidade não disponível em sistemas Unix. Teste parâmetros sendmail localmente. +SubmitTranslation=Se a tradução para esse idioma não estiver completa ou você encontrar erros, você pode corrigir isso através da edição de arquivos no diretório langs /% s e enviar arquivos modificados no forum www.dolibarr.org. ModuleFamilyCrm=Administração cliente (CRM) ModuleFamilyProducts=Administração produtos ModuleFamilyProjects=Projetos/Trabalho cooperativo +ModuleFamilyECM=Gerenciamento de Conteúdo Eletrônico (ECM) MenuHandlers=Configuradores menu MenuAdmin=Editor menu +DoNotUseInProduction=Não utilizar em produção ThisIsProcessToFollow=Está aqui o procedimento a seguir: -DownloadPackageFromWebSite=Descarregar o pacote a partir do site %s. -SetupIsReadyForUse=A Instalação está finalizada e o ERP está disponível com o novo componente. +FindPackageFromWebSite=Encontre um pacote que oferece recurso desejado (por exemplo, no site oficial % s). +DownloadPackageFromWebSite=Descarregar o pacote +SetupIsReadyForUse=A Instalação está finalizada e o ERP está liberada para usar com o novo componente +NotExistsDirect=O diretório alternativo para o root não foi definido +InfDirAlt=Desde a versão 3, é possível definir um diretorio root alternativo. Esta funcoa permitepermite que você armazene, no mesmo lugar, plug-ins e templates personalizados
    apenas crie um diretório na raiz do Dolibarr. (Por exemplo: custom)
    +InfDirExample=
    então declará-lo no arquivo conf.php
    $dolibarr_main_url_root_alt='http://myserver/custom'
    $dolibarr_main_document_root_alt='/path/of/dolibarr/htdocs/custom'
    *These linhas estão comentadas com "#", descomentar apenas remover o caractere. +YouCanSubmitFile=Selecione o módulo CurrentVersion=Versão atual do ERP CallUpdatePage=Chamar a página de atualização da estrutura e dados da base de dados %s. -LastStableVersion=�ltima Versão estável +LastStableVersion=Ultima Versão estável GenericMaskCodes=Pode introduzir qualquer máscara numérica. Nesta máscara, pode utilizar as seguintes etiquetas:
    {000000} corresponde a um número que se incrementa em cada um de %s. Introduza tantos zeros como longitude que deseje mostrar. O contador completarse-á a partir de zeros pela esquerda com o fim de ter tantos zeros como a máscara.
    {000000+000} Igual que o anterior, com uma compensação correspondente ao número da direita do sinal + aplica-se a partir do primeiro %s.
    {000000@x} igual que o anterior, mas o contador restabelece-se a zero quando se chega a x meses (x entre 1 e 12). Se esta opção se utiliza e x é de 2 ou superior, então a seq�ência {yy}{mm} ou {yyyy}{mm} também é necessário.
    {dd} dias (01 a 31).
    {mm} mês (01 a 12).
    {yy}, {yyyy} ou {e} ano em 2, 4 ou 1 figura.
    -GenericMaskCodes2={cccc} o código de cliente em n� de caracteres
    {cccc000} o código de cliente em n� caracter é seguido por um contador próprio ao cliente sem offset, completado com zeros até completar a máscara, e voltando a zero ao mesmo tempo que o contador global.
    GenericMaskCodes3=qualquer outro caracter0 na máscara se fica sem alterações.
    Não é permitido espaços
    GenericMaskCodes4a=Exemplo em 99 � %s o Fornecedor a Empresa realizada em 31/03/2007:
    GenericMaskCodes4b=Exemplo sobre um Fornecedor criado em 31/03/2007:
    @@ -148,6 +218,61 @@ ErrorCantUseRazInStartedYearIfNoYearMonthInMask=Erro, não se pode usar opção UMask=Parâmetro UMask de novos arquivos em Unix/Linux/BSD. UMaskExplanation=Este parâmetro determina os direitos dos arquivos criados não servidor do ERP (durante o carregamento, por Exemplo).
    Este deve ter o valor octal (por Exemplo, 0666 significa leitura / escrita para todos).
    Este parâmetro não tem nenhum efeito sobre um servidor Windows. SeeWikiForAllTeam=Veja o wiki para mais detalhes de todos os autores e da sua organização +UseACacheDelay=Delay for caching export response in seconds (0 or empty for no cache) +DisableLinkToHelpCenter=Hide link "Need help or support" on login page +DisableLinkToHelp=Hide link "%s Online help" on left menu +AddCRIfTooLong=There is no automatic wrapping, so if line is out of page on documents because too long, you must add yourself carriage returns in the textarea. +ModuleDisabled=Módulo desabilitado +ModuleDisabledSoNoEvent=Módulo desabilitado, portanto, o evento não será criado. +ConfirmPurge=Are you sure you want to execute this purge ?
    This will delete definitely all your data files with no way to restore them (ECM files, attached files...). +MinLength=Tamanho mínimo +LanguageFilesCachedIntoShmopSharedMemory=Files .lang loaded in shared memory +ExamplesWithCurrentSetup=Examples with current running setup +ListOfDirectories=List of OpenDocument templates directories +ListOfDirectoriesForModelGenODT=List of directories containing templates files with OpenDocument format.

    Put here full path of directories.
    Add a carriage return between eah directory.
    To add a directory of the GED module, add here DOL_DATA_ROOT/ecm/yourdirectoryname.

    Files in those directories must end with .odt. +ExampleOfDirectoriesForModelGen=Examples of syntax:
    c:\\mydir
    /home/mydir
    DOL_DATA_ROOT/ecm/ecmdir +FollowingSubstitutionKeysCanBeUsed=
    To know how to create your odt document templates, before storing them in those directories, read wiki documentation: +FirstnameNamePosition=Position of Name/Lastname +DescWeather=The following pictures will be shown on dashboard when number of late actions reach the following values: +KeyForWebServicesAccess=Key to use Web Services (parameter "dolibarrkey" in webservices) +TestSubmitForm=Input test form +ThisForceAlsoTheme=Using this menu manager will also use its own theme whatever is user choice. Also this menu manager specialized for smartphones does not works on all smartphone. Use another menu manager if you experience problems on yours. +ThemeDir=Diretório de Skins +ConnectionTimeout=Tempo de conexão esgotado +ResponseTimeout=Tempo de resposta esgotado +SmsTestMessage=Test message from __PHONEFROM__ to __PHONETO__ +ModuleMustBeEnabledFirst=Module %s must be enabled first before using this feature. +SecurityToken=Chave para URLs seguras +NoSmsEngine=No SMS sender manager available. SMS sender manager are not installed with default distribution (because they depends on an external supplier) but you can find some on %s +PDFDesc=You can set each global options related to the PDF generation +PDFAddressForging=Rules to forge address boxes +HideAnyVATInformationOnPDF=Hide all information related to VAT on generated PDF +HideDescOnPDF=Hide products description on generated PDF +HideRefOnPDF=Hide products ref. on generated PDF +UrlGenerationParameters=Parameters to secure URLs +SecurityTokenIsUnique=Use a unique securekey parameter for each URL +EnterRefToBuildUrl=Enter reference for object %s +GetSecuredUrl=Get calculated URL +ButtonHideUnauthorized=Hide buttons for unauthorized actions instead of showing disabled buttons +OldVATRates=Old VAT rate +NewVATRates=New VAT rate +TextLong=Long text +Int=Integer +Float=Float +DateAndTime=Date and hour +Unique=Unique +Boolean=Boolean (Checkbox) +ExtrafieldSelect =Select list +ExtrafieldSelectList =Select from table +ExtrafieldSeparator=Separator +ExtrafieldCheckBox=Checkbox +ExtrafieldRadio=Radio button +LibraryToBuildPDF=Library used to build PDF +SMS=Mensagem de texto +RefreshPhoneLink=Refresh link +KeepEmptyToUseDefault=Keep empty to use default value +DefaultLink=Default link +CurrentlyNWithoutBarCode=Currently, you have %s records on %s %s without barcode defined. Module0Name=Usuários e Grupos Module0Desc=Administração de Usuários e Grupos Module1Name=Fornecedores @@ -156,12 +281,16 @@ Module2Desc=Administração comercial Module10Desc=Administração simples da Contabilidade (repartição das receitas e pagamentos) Module20Desc=Administração de Orçamentos/Propostas comerciais Module22Desc=Administração e envio de E-Mails massivos +Module23Name=Energy +Module23Desc=Monitoring the consumption of energies Module25Desc=Administração de pedidos de clientes Module30Name=Faturas e Recibos Module30Desc=Administração de faturas e recibos de clientes. Administração de faturas de Fornecedores Module40Desc=Administração de Fornecedores Module49Desc=Administração de Editores Module50Desc=Administração de produtos +Module51Name=Mass mailings +Module51Desc=Mass paper mailing management Module52Name=Estoques de produtos Module52Desc=Administração de estoques de produtos Module53Desc=Administração de serviços @@ -178,35 +307,56 @@ Module75Name=Notas de despesas e deslocamentos Module75Desc=Administração das notas de despesas e deslocamentos Module80Desc=Administração de Expedições e Recepções Module85Desc=Administração das contas financeiras de tipo contas bancarias, postais o efetivo +Module100Name=External site +Module100Desc=This module include an external web site or page into Dolibarr menus and view it into a Dolibarr frame +Module105Name=Mailman and SPIP +Module105Desc=Mailman or SPIP interface for member module Module200Desc=sincronização com um anuário LDAP Module310Desc=Administração de Membros de uma associação Module330Desc=Administração de Favoritos Module400Name=Projetos Module400Desc=Administração dos projetos nos outros módulos Module410Desc=Interface com calendário Webcalendar -Module500Name=Impostos, gastos sociais e dividendos -Module500Desc=Administração de Impostos e gastos sociais +Module510Name=Salaries Module600Desc=Envio de Notificações (por correio eletrônico) sobre os eventos de trabalho Dolibarr Module700Desc=Administração de Bolsas Module800Desc=Interface de visualização de uma loja OSCommerce mediante acesso direto à sua base de dados Module900Desc=Interface de visualização de uma loja OSCommerce mediante Web services.\nEste módulo requer instalar os arquivos de /oscommerce_ws/ws_server em OSCommerce. Leia o Arquivo README da pasta /oscommerce_ws/ws_server. Module1200Desc=Interface com o sistema de seguimento de incidências Mantis +Module1400Name=Accounting +Module1400Desc=Accounting management (double parties) Module1780Name=Categorias Module1780Desc=Administração de categorias (produtos, Fornecedores e clientes) +Module2000Name=WYSIWYG editor +Module2000Desc=Allow to edit some text area using an advanced editor Module2300Desc=Gerenciamento de tarefas agendadas Module2400Desc=Administração da agenda e das ações Module2500Name=Administração Eletrônica de Documentos +Module2600Name=Webservices +Module2600Desc=Enable the Dolibarr web services server +Module2700Desc=Use online Gravatar service (www.gravatar.com) to show photo of users/members (found with their emails). Need an internet access +Module2800Desc=Cliente de FTP +Module2900Desc=GeoIP Maxmind conversions capabilities Module5000Name=Multi-Empresa Module5000Desc=Permite-lhe gerenciar várias empresas +Module6000Name=Workflow +Module6000Desc=Workflow management Module20000Name=Ferias +Module50000Name=PayBox +Module50000Desc=Module to offer an online payment page by credit card with PayBox Module50100Desc=Caixa registradora +Module50200Desc=Module to offer an online payment page by credit card with Paypal Module59000Name=Margems +Module59000Desc=Module to manage margins +Module60000Desc=Módulo para gerenciar comissões Permission11=Consultar faturas Permission12=Criar/Modificar faturas +Permission13=Unvalidate customer invoices Permission14=Confirmar faturas Permission15=Enviar faturas por correio Permission16=Emitir pagamentos de faturas Permission19=Eliminar faturas +Permission28=Export commercial proposals Permission41=Consultar projetos Permission42=Criar/Modificar projetos Permission44=Eliminar projetos @@ -221,27 +371,36 @@ Permission114=Exportar transações e registros bancários Permission115=Exportar transações e extratos Permission116=Captar transferências entre contas Permission117=Gerenciar envio de cheques +Permission141=Read projects (also private i am not contact for) +Permission142=Create/modify projects (also private i am not contact for) +Permission144=Delete projects (also private i am not contact for) Permission146=Consultar Prestadores Permission151=Consultar Débitos Diretos Permission152=Configurar Débitos Diretos Permission153=Consultar Débitos Diretos +Permission154=Credit/refuse standing orders receipts Permission163=Ativar os serviços de um contrato Permission164=Desativar os serviços de um contrato Permission171=Criar/Modificar Deslocamento Permission172=Eliminar Deslocamento +Permission173=Delete trips Permission178=Exportar Deslocamento Permission194=Consultar Linhas da Lagura de Banda Permission205=Gerenciar Ligações Permission213=Ativar Linha Permission222=Criar/Modificar E-Mails (assunto, destinatários, etc.) Permission223=Confirmar E-Mails (permite o envio) +Permission238=Envio manual de e-mails +Permission239=Deletar e-mail após o envio Permission241=Consultar categorias Permission242=Criar/Modificar categorias Permission243=Eliminar categorias Permission244=Ver conteúdo de categorias ocultas Permission251=Consultar Outros Usuário, grupos e permissões +PermissionAdvanced251=Read other users Permission252=Criar/Modificar outros usuário, grupos e permissões Permission253=Modificar a senha de outros usuário +PermissionAdvanced253=Criar ou modificar usuários internos ou externos e suas permissões Permission254=Eliminar ou desativar outros usuário Permission255=Criar/Modificar a sua propia informação de usuário Permission256=Modificar a sua propia senha @@ -253,12 +412,25 @@ Permission282=Criar/Modificar contatos Permission283=Eliminar contatos Permission286=Exportar os contatos Permission312=Assinalar Serviço ao Contrato +Permission341=Ler suas próprias permissões +Permission342=Criar ou modificar informações do próprio usuário +Permission343=Modificar sua senha +Permission351=Ler grupos +Permission352=Ler permissões do grupo +Permission353=Criar ou modificar grupos +Permission354=Excluir ou desabilitar grupos +Permission358=Exportar usuários Permission401=Consultar ativos Permission402=Criar/Modificar ativos Permission403=Confirmar ativos Permission404=Eliminar ativos +Permission532=Criar ou modificar serviços +Permission534=Excluir serviços +Permission536=Visualizar ou gerenciar serviços ocultos +Permission538=Exportar serviços Permission701=Criar/Modificar Bolsas Permission702=Eliminar Bolsas +Permission703=Excluir doações Permission1001=Consultar estoques Permission1002=Criar/Modificar estoques Permission1003=Eliminar estoques @@ -272,7 +444,9 @@ Permission1231=Consultar faturas de Fornecedores Permission1232=Criar faturas de Fornecedores Permission1233=Confirmar faturas de Fornecedores Permission1234=Eliminar faturas de Fornecedores +Permission1235=Send supplier invoices by email Permission1236=Exportar faturas de Fornecedores, atributos e pagamentos +Permission1251=Run mass imports of external data into database (data load) Permission1321=Exportar faturas a clientes, atributos e cobranças Permission1421=Exportar faturas de clientes e atributos Permission23001 =Ler tarefa agendada @@ -281,36 +455,61 @@ Permission23003 =Apagar tarefa agendada Permission2401=Ler ações (eventos ou tarefas) vinculadas na sua conta Permission2402=Criar/Modificar/Eliminar ações (eventos ou tarefas) vinculadas na sua conta Permission2403=Consultar ações (acontecimientos ou tarefas) de outros +Permission2411=Read actions (events or tasks) of others +Permission2412=Create/modify actions (events or tasks) of others +Permission2413=Delete actions (events or tasks) of others Permission2501=Enviar ou eliminar documentos +Permission2502=Baixar documentos Permission2515=Configuração de diretorios de documentos -DictionaryCompanyType=Tipos de empresa -DictionaryCompanyJuridicalType=Formas jurídicas -DictionaryProspectLevel=Perspectiva ao nível de cliente potencial -DictionaryCanton=Departamentos/Distritos/Zonas -DictionaryCountry=Paises -DictionaryCivility=Título cortesía -DictionaryActions=Lista de ações -DictionarySocialContributions=Tipos de gastos sociais -DictionaryVAT=Taxa de ICMS -DictionaryPaymentModes=Modos de pagamento -DictionaryTypeContact=Tipos de contatos -DictionaryEcotaxe=ECO Taxa (DEEE) -DictionaryPaperFormat=Formatos de papel -DictionarySendingMethods=Métodos de expedição +Permission2801=Use FTP client in read mode (browse and download only) +Permission2802=Use FTP client in write mode (delete or upload files) +Permission50101=Use Point of sales +Permission50201=Read transactions +Permission50202=Import transactions +Permission54001=Print +DictionaryCompanyType=Thirdparties type +DictionaryRegion=Regions +DictionaryCountry=Countries +DictionaryCurrency=Currencies +DictionaryPaymentConditions=Payment terms +DictionaryPaymentModes=Payment modes +DictionaryTypeContact=Contact/Address types +DictionaryPaperFormat=Paper formats +DictionaryFees=Type of fees +DictionarySendingMethods=Shipping methods +DictionaryStaff=Staff +DictionaryAvailability=Delivery delay +DictionaryOrderMethods=Ordering methods +DictionarySource=Origin of proposals/orders SetupSaved=configuração guardada +BackToDictionaryList=Voltar para a lista de dicionários VATReceivedOnly=Impostos especiais não faturaveis VATManagement=Administração ICMS VATIsUsedDesc=o tipo de ICMS proposto por default em criações de Orçamentos, faturas, pedidos, etc. Responde e a seguinte regra:
    sim o vendedor não está sujeito a ICMS, ICMS por default VATIsNotUsedDesc=o tipo de ICMS proposto por default é 0. Este é o caso de associações, particulares o algunas pequenhas sociedades. VATIsUsedExampleFR=em Francia, se trata das sociedades u organismos que eligen um regime fiscal general (General simplificado o General normal), regime ao qual se declara o ICMS. VATIsNotUsedExampleFR=em Francia, se trata de associações exentas de ICMS o sociedades, organismos o profesiones liberales que han eligedo o regime fiscal de módulos (ICMS em franquicia), pagando um ICMS em franquicia sem fazer declaração de ICMS. Esta elecção hace aparecer a anotação "IVA não aplicable - art-293B do CGI" em faturas. +LocalTax1ManagementES=RE Management +LocalTax1IsUsedDescES=The RE rate by default when creating prospects, invoices, orders etc follow the active standard rule:
    If te buyer is not subjected to RE, RE by default=0. End of rule.
    If the buyer is subjected to RE then the RE by default. End of rule.
    +LocalTax1IsNotUsedDescES=By default the proposed RE is 0. End of rule. +LocalTax1IsUsedExampleES=In Spain they are professionals subject to some specific sections of the Spanish IAE. +LocalTax1IsNotUsedExampleES=In Spain they are professional and societies and subject to certain sections of the Spanish IAE. +LocalTax2ManagementES=IRPF Management +LocalTax2IsUsedDescES=The RE rate by default when creating prospects, invoices, orders etc follow the active standard rule:
    If the seller is not subjected to IRPF, then IRPF by default=0. End of rule.
    If the seller is subjected to IRPF then the IRPF by default. End of rule.
    +LocalTax2IsNotUsedDescES=By default the proposed IRPF is 0. End of rule. +LocalTax2IsUsedExampleES=In Spain, freelancers and independent professionals who provide services and companies who have chosen the tax system of modules. +LocalTax2IsNotUsedExampleES=In Spain they are bussines not subject to tax system of modules. NbOfDays=N� de Dias AlwaysActive=Sempre Ativo UpdateRequired=Parâmetros sistema necessita de uma atualização. Para atualizar click em Módulos
    é indispensável já que Dolibarr não é um ERP/CRM monolítico, é um conjunto de módulos mais ou menos independente. Depois de ativar os módulos que lhe interessem verificar as suas funcionalidades nos menus de Dolibarr. +SetupDescription5=Other menu entries manage optional parameters. +InfoDolibarr=Infos Dolibarr +InfoOS=Informações do sistema operacional +InfoWebServer=Informações do Web Server +InfoDatabase=Informações da base de dados +InfoPHP=Informações do PHP +InfoPerf=Infos performances ListOfSecurityEvents=Listado de eventos de segurança Dolibarr +SecurityEventsPurged=Security events purged LogEventDesc=Pode ativar o registo de eventos de segurança Dolibarr aqui. os administradores podem ver o seu conteúdo a travé de menu ferramentas do sistema - Auditoria.Atenção, esta característica pode consumir uma gran quantidade de dados na base de dados. AreaForAdminOnly=Estas funções só são acessíveis a um Usuário administrador. a função de administrador e as ajudas para os administradores são definidas em Dolibarr por o seguinte símbolo: SystemInfoDesc=Esta informação do sistema é informação técnica acessíveis só de leitura a aos administradores. @@ -360,7 +572,6 @@ TriggerDisabledAsModuleDisabled=Triggers deste Arquivo desativados já que o mó TriggerAlwaysActive=Triggers deste Arquivo sempre ativos, já que os módulos Dolibarr relacionados estão ativados TriggerActiveAsModuleActive=Triggers deste Arquivo ativos já que o módulo %s está ativado GeneratedPasswordDesc=Indique aqui que norma quer utilizar para Gerar as Senhas quando queira Gerar uma Nova senha -DictionaryDesc=Indique aqui os dados de referencia. pode completar/modificar os dados predefinidos com os seus ConstDesc=qualquer outro parâmetro não editável em páginas anteriores OnceSetupFinishedCreateUsers=Atenção, está baixo de uma conta de administrador de Dolibarr. os administradores se utilizam para configurar a Dolibarr. Para um uso corrente de Dolibarr, recomenda-se utilizar uma conta não administrador criada a partir do menu "Usuários e grupos" MiscellaneousDesc=Defina aqui os Outros parâmetros relacionados com a segurança. @@ -370,6 +581,9 @@ MAIN_MAX_DECIMALS_UNIT=Casas decimais máximas para os preços unitários MAIN_MAX_DECIMALS_TOT=Casas decimais máximas para os preços totais MAIN_MAX_DECIMALS_SHOWN=Casas decimais máximas para os valores mostrados em janela (Colocar ... depois do máximo quer ver ... quando o número se trunque à mostrar em janela) MAIN_DISABLE_PDF_COMPRESSION=Utilizar a compressão PDF para os Arquivos PDF gerados +MAIN_ROUNDING_RULE_TOT=Size of rounding range (for rare countries where rounding is done on something else than base 10) +UnitPriceOfProduct=Net unit price of a product +TotalPriceAfterRounding=Total price (net/vat/incl tax) after rounding ParameterActiveForNextInputOnly=parâmetro efetivo somente a partir das próximas sessões NoEventOrNoAuditSetup=não são registrado eventos de segurança. Esto pode ser normal sim a auditoría não ha sido habilitado na página "configuração->segurança->auditoría". NoEventFoundWithCriteria=não são encontrado eventos de segurança para tais criterios de pesquisa. @@ -381,7 +595,54 @@ BackupDescY=O arquivo gerado devevrá ser colocado em local seguro. RestoreDesc=Para restaurar uma Cópia de segurança de Dolibarr, voçê deve: RestoreDesc2=* Tomar o Arquivo (Arquivo zip, por Exemplo) da pasta dos documentos e Descompactá-lo na pasta dos documentos de uma Nova Instalação de Dolibarr diretorio o na pasta dos documentos desta Instalação (%s). RestoreDesc3=* Recargar o Arquivo de despejo guardado na base de dados de uma Nova Instalação de Dolibarr o desta Instalação. Atenção, uma vez realizada a Restaurar, deverá utilizar um login/senha de administrador existente ao momento da Cópia de segurança para conectarse. Para restaurar a base de dados na Instalação atual, pode utilizar o assistente a continuação. +RestoreMySQL=MySQL import +ForcedToByAModule=This rule is forced to %s by an activated module +PreviousDumpFiles=Available database backup dump files +WeekStartOnDay=First day of week +RunningUpdateProcessMayBeRequired=Running the upgrade process seems to be required (Programs version %s differs from database version %s) +YouMustRunCommandFromCommandLineAfterLoginToUser=You must run this command from command line after login to a shell with user %s or you must add -W option at end of command line to provide %s password. +YourPHPDoesNotHaveSSLSupport=SSL functions not available in your PHP +DownloadMoreSkins=More skins to download +SimpleNumRefModelDesc=Returns the reference number with format %syymm-nnnn where yy is year, mm is month and nnnn is a sequence without hole and with no reset +ShowProfIdInAddress=Show professionnal id with addresses on documents +TranslationUncomplete=Partial translation +MenuUseLayout=Make vertical menu hidable (option javascript must not be disabled) +MAIN_DISABLE_METEO=Disable meteo view +TestLoginToAPI=Test login to API +ProxyDesc=Some features of Dolibarr need to have an Internet access to work. Define here parameters for this. If the Dolibarr server is behind a Proxy server, those parameters tells Dolibarr how to access Internet through it. +ExternalAccess=External access +MAIN_PROXY_USE=Use a proxy server (otherwise direct access to internet) +MAIN_PROXY_HOST=Name/Address of proxy server +MAIN_PROXY_PORT=Port of proxy server +MAIN_PROXY_USER=Login to use the proxy server +MAIN_PROXY_PASS=Password to use the proxy server +DefineHereComplementaryAttributes=Define here all attributes, not already available by default, and that you want to be supported for %s. +ExtraFields=Complementary attributes +ExtraFieldsLines=Complementary attributes (lines) +ExtraFieldsThirdParties=Complementary attributes (thirdparty) +ExtraFieldsContacts=Complementary attributes (contact/address) +ExtraFieldsMember=Complementary attributes (member) +ExtraFieldsMemberType=Complementary attributes (member type) +ExtraFieldsCustomerOrders=Complementary attributes (orders) +ExtraFieldsCustomerInvoices=Complementary attributes (invoices) +ExtraFieldsSupplierOrders=Complementary attributes (orders) +ExtraFieldsSupplierInvoices=Complementary attributes (invoices) +ExtraFieldsProject=Complementary attributes (projects) +ExtraFieldsProjectTask=Complementary attributes (tasks) +AlphaNumOnlyCharsAndNoSpace=only alphanumericals characters without space +SendingMailSetup=Setup of sendings by email +SendmailOptionNotComplete=Warning, on some Linux systems, to send email from your email, sendmail execution setup must contains option -ba (parameter mail.force_extra_parameters into your php.ini file). If some recipients never receive emails, try to edit this PHP parameter with mail.force_extra_parameters = -ba). PathToDocuments=Rotas de acesso a documentos +SendmailOptionMayHurtBuggedMTA=Feature to send mails using method "PHP mail direct" will generate a mail message that might be not correctly parsed by some receiving mail servers. Result is that some mails can't be read by people hosted by thoose bugged platforms. It's case for some Internet providers (Ex: Orange in France). This is not a problem into Dolibarr nor into PHP but onto receiving mail server. You can however add option MAIN_FIX_FOR_BUGGED_MTA to 1 into setup - other to modify Dolibarr to avoid this. However, you may experience problem with other servers that respect strictly the SMTP standard. The other solution (recommanded) is to use the method "SMTP socket library" that has no disadvantages. +TranslationSetup=Configuration de la traduction +TotalNumberOfActivatedModules=Total number of activated feature modules: %s +YouMustEnableOneModule=You must at least enable 1 module +YesInSummer=Yes in summer +TestNotPossibleWithCurrentBrowsers=Automatic detection not possible +SearchOptim=Search optimization +FixTZ=TimeZone fix +GetBarCode=Get barcode +EmptyNumRefModelDesc=The code is free. This code can be modified at any time. PasswordGenerationStandard=Devolve uma senha generada por o algoritmo interno Dolibarr: 8 caracteres, números e caracteres em minúsculas mescladas. PasswordGenerationNone=não oferece Senhas. a senha se introduce manualmente. UserGroupSetup=Configuração Módulo Usuários e Grupos @@ -390,6 +651,8 @@ RuleForGeneratedPasswords=Norma para a geração das Senhas Propostas DoNotSuggest=não propor EncryptedPasswordInDatabase=Permitir encriptação das Senhas na base de dados DisableForgetPasswordLinkOnLogonPage=não mostrar o link "senha esquecida" na página de login +UsersSetup=Users module setup +UserMailRequired=EMail required to create a new user CompanySetup=configuração do módulo empresas CompanyCodeChecker=Módulo de geração e control dos códigos de Fornecedores (clientes/Fornecedores) AccountCodeManager=Módulo de geração dos códigos contabíls (clientes/Fornecedores) @@ -397,6 +660,12 @@ ModuleCompanyCodeAquarium=Devolve um código contabíl composto de %s seguido do ModuleCompanyCodePanicum=Devolve um código contabíl vazio. ModuleCompanyCodeDigitaria=Devolve um código contabíl composto seguindo o código de Fornecedor. o código está formado por caracter0 ' C ' em primeiroa posição seguido dos 5 primeiroos caracteres do código Fornecedor. NotificationsDesc=a função das Notificações permite enviar automaticamente um correio eletrônico para um determinado evento Dolibarr em empresas configuradas para ele +ModelModules=Documents templates +WatermarkOnDraft=Watermark on draft document +CompanyIdProfChecker=Rules on Professional Ids +MustBeUnique=Must be unique ? +MustBeMandatory=Mandatory to create third parties ? +MustBeInvoiceMandatory=Mandatory to validate invoices ? WebCalSetup=configuração de link com o calendário Webcalendar WebCalSyncro=Integrar os eventos Dolibarr em WebCalendar WebCalYesByDefault=Consultar (sim por default) @@ -405,7 +674,6 @@ WebCalURL=endereço (URL) de acesso ao calendário WebCalServer=Servidor da base de dados do calendário WebCalUser=Usuário com acesso e a base WebCalSetupSaved=os dados de link são guardado corretamente. -WebCalTestOk=a login à servidor '%s' na base '%s' por o Usuário '%s' ha sido satisfactoria. WebCalTestKo1=a login à servidor '%s' ha sido satisfactoria, mas a base '%s' não se ha podido comTeste. WebCalTestKo2=a login à servidor '%s' por o Usuário '%s' ha falhado. WebCalErrorConnectOkButWrongDatabase=a login salió bien mas a base não parece ser uma base Webcalendar. @@ -438,14 +706,17 @@ AddDeliveryAddressAbility=possibilidade de selecionar uma endereço de envio UseOptionLineIfNoQuantity=uma linha de produto/serviço que tem uma quantidade nula se considera como uma Opção OrdersSetup=configuração do módulo pedidos OrdersModelModule=Modelos de documentos de pedidos -HideTreadedOrders=Ocultar os pedidos processados ou anulados do listado ClickToDialSetup=configuração do módulo Click To Dial ClickToDialUrlDesc=Url de chamada fazendo click ao ícone telefone.
    a 'url completa chamada será: URL?login Bookmark4uSetup=configuração do módulo Bookmark4u InterventionsSetup=configuração do módulo Intervenções +FreeLegalTextOnInterventions=Free text on intervention documents +ContractsSetup=Contracts module setup +ContractsNumberingModules=Contracts numbering modules MembersSetup=configuração do módulo associações MemberMainOptions=opções principales AddSubscriptionIntoAccount=Registar honorários em conta bancaria ou Caixa do módulo bancario +AdherentLoginRequired=Manage a Login for each member AdherentMailRequired=E-Mail obrigatório para criar um membro novo MemberSendInformationByMailByDefault=Caixa de verificação para enviar o correio de confirmação a os Membros é por default "sí" LDAPSetup=Configuracón do módulo LDAP @@ -481,12 +752,12 @@ LDAPContactObjectClassListExample=Lista de objectClass que definem os atributos LDAPTestConnect=Teste a login LDAP LDAPTestSynchroContact=Teste a sincronização de contatos LDAPTestSynchroUser=Teste a sincronização de Usuário +LDAPTestSearch=Test a LDAP search LDAPSynchroOK=Prueba de sincronização realizada corretamente LDAPSynchroKO=Prueba de sincronização errada LDAPSynchroKOMayBePermissions=Error da prueba de sincronização. verifique que a login à servidor sea correta e que permite as atualizaciones LDAP LDAPTCPConnectOK=login TCP à servidor LDAP efetuada (Servidor LDAPTCPConnectKO=Fallo de login TCP à servidor LDAP (Servidor -LDAPBindOK=ligação/autenticação à servidor LDAP conseguida (Servidor LDAPBindKO=Fallo de login/autentificação à servidor LDAP (Servidor LDAPConnectToDNSuccessfull=login a DN (%s) realizada LDAPConnectToDNFailed=Connexión a DN (%s) falhada @@ -509,10 +780,12 @@ LDAPFieldZip=Código Postal LDAPFieldZipExample=Exemplo : postalcode LDAPFieldTown=Município LDAPFieldDescriptionExample=Exemplo : description +LDAPFieldGroupMembers=Group members +LDAPFieldGroupMembersExample=Example : uniqueMember LDAPFieldBirthdate=data de nascimento LDAPFieldSidExample=Exemplo : objectsid LDAPFieldEndLastSubscription=data finalização como membro -LDAPParametersAreStillHardCoded=os parâmetros LDAP são codificados em duro (na clase contact) +LDAPFieldTitleExample=Example: title LDAPSetupNotComplete=configuração LDAP incompleta (a completar em Outras pestanhas) LDAPNoUserOrPasswordProvidedAccessIsReadOnly=Administrador o senha não indicados. os acessos LDAP serão anônimos e em só leitura. LDAPDescContact=Esta página permite definir o Nome dos atributos da árvore LDAP para cada informação dos contatos Dolibarr. @@ -520,15 +793,25 @@ LDAPDescUsers=Esta página permite definir o Nome dos atributos da árvore LDAP LDAPDescGroups=Esta página permite definir o Nome dos atributos da árvore LDAP para cada informação dos grupos Usuários Dolibarr. LDAPDescMembers=Esta página permite definir o Nome dos atributos da árvore LDAP para cada informação dos Membros do módulo associações Dolibarr. LDAPDescValues=os valores de Exemplos se adaptan a OpenLDAP com os schemas carregados: core.schema, cosine.schema, inetorgperson.schema). sim voçê utiliza os a valores sugeridos e OpenLDAP, modifique a sua arquivo de configuração LDAP slapd.conf para tener todos estos schemas ativos. +NotInstalled=Not installed, so your server is not slow down by this. +HTTPCacheStaticResources=HTTP cache for static resources (css, img, javascript) +FilesOfTypeCached=Files of type %s are cached by HTTP server +FilesOfTypeNotCached=Files of type %s are not cached by HTTP server +FilesOfTypeCompressed=Files of type %s are compressed by HTTP server +FilesOfTypeNotCompressed=Files of type %s are not compressed by HTTP server +CompressionOfResources=Compression of HTTP responses ProductSetup=configuração do módulo produtos +ServiceSetup=Services module setup +ProductServiceSetup=Products and Services modules setup NumberOfProductShowInSelect=N� de produtos max em listas (0 ConfirmDeleteProductLineAbility=confirmação de eliminação de uma linha de produzido nos formulários ModifyProductDescAbility=Personalização das descripciones dos produtos nos formulários ViewProductDescInFormAbility=visualização das descripciones dos produtos nos formulários -UseSearchToSelectProduct=Utilizar um formulário de pesquisa para a seleção de um produto (em vez da lista abaixo) +ViewProductDescInThirdpartyLanguageAbility=Visualization of products descriptions in the thirdparty language UseEcoTaxeAbility=Asumir ecotaxa (DEEE) SetDefaultBarcodeTypeProducts=Tipo de código de barras utilizado por default para os produtos SetDefaultBarcodeTypeThirdParties=Tipo de código de barras utilizado por default para os Fornecedores +ProductOtherConf=Product / Service configuration SyslogOutput=Saída do log SyslogLevel=Nível SyslogSimpleFile=Arquivo @@ -536,6 +819,7 @@ SyslogFilename=Nome e Rota do Arquivo YouCanUseDOL_DATA_ROOT=pode utilizar DOL_DATA_ROOT/dolibarr.log para um log na pasta 'documentos' de Dolibarr. ErrorUnknownSyslogConstant=a constante %s não é uma constante syslog conhecida DonationsSetup=configuração do módulo Bolsas +DonationsReceiptModel=Template of donation receipt BarcodeSetup=configuração dos códigos de barra BarcodeEncodeModule=Módulos de codificação dos códigos de barra CodeBarGenerator=gerador do código @@ -546,15 +830,23 @@ BarcodeDescUPC=Códigos de barra tipo UPC BarcodeDescISBN=Códigos de barra tipo ISBN BarcodeDescC39=Códigos de barra tipo C39 BarcodeDescC128=Códigos de barra tipo C128 +BarcodeInternalEngine=Internal engine WithdrawalsSetup=configuração do módulo Débitos Diretos ExternalRSSSetup=configuração das importações do fluxos RSS NewRSS=Sindicação de um Novo fluxos RSS +RSSUrl=RSS URL +RSSUrlExample=An interesting RSS feed +MailingEMailError=Return EMail (Errors-to) for emails with errors NotificationSetup=configuração do módulo Notificações +ListOfAvailableNotifications=List of available notifications (This list depends on activated modules) SendingsSetup=configuração do módulos envios +SendingsNumberingModules=Sendings numbering modules SendingsAbility=Fretes pagos pelo cliente NoNeedForDeliveryReceipts=na maioria dos casos, as entregas utilizam como nota de entregas ao cliente (lista de produtos a enviar), se recebem e assinam por o cliente. Por o tanto, a hoja de entregas de produtos é uma característica duplicada e rara vez é ativada. +FreeLegalTextOnShippings=Free text on shippings DeliveryOrderModel=Modelo de ordem de envio DeliveriesOrderAbility=Fretes pagos por o cliente +AdvancedEditor=Advanced editor ActivateFCKeditor=Ativar FCKeditor para : FCKeditorForCompany=Criação/Edição WYSIWIG da descrição e notas dos Fornecedores FCKeditorForProductDetails=Criação/Edição WYSIWIG das linhas de detalhe dos produtos (em pedidos, Orçamentos, faturas, etc.) @@ -566,6 +858,7 @@ StockSetup=configuração do módulo Estoque UserWarehouse=Utilizar os estoques personais de Usuário Menu=Seleção dos menus MenuHandler=Gerente de menus +HideUnauthorizedMenu=Hide unauthorized menus (gray) DetailMenuHandler=Nome do gerente de menus DetailMenuModule=Nome do módulo sim a entrada do menu é resultante de um módulo DetailType=Tipo de menu (superior o izquierdp) @@ -573,6 +866,7 @@ DetailTitre=Etiqueta de menu DetailMainmenu=Grupo à qual pertence (obsoleto) DetailUrl=URL da página fazia a qual o menu aponta DetailLeftmenu=Condição de visualização o não (obsoleto) +DetailEnabled=Condition to show or not entry DetailRight=Condição de visualização completa o cristálida DetailLangs=Arquivo langs para a tradução do título DetailTarget=Objetivo @@ -583,16 +877,51 @@ ConfirmDeleteLine=Tem certeza que quer eliminar esta linha? OptionVatMode=Opção de carga de ICMS OptionVatDefaultDesc=a carga do ICMS é:
    -ao envio dos bens
    -sobre o pagamento por os serviços OptionVatDebitOptionDesc=a carga do ICMS é:
    -ao envio dos bens
    -sobre o faturamento dos serviços +OnDelivery=On delivery +OnPayment=On payment +OnInvoice=On invoice +SupposedToBePaymentDate=Payment date used +SupposedToBeInvoiceDate=Invoice date used +Buy=Buy +Sell=Sell +InvoiceDateUsed=Invoice date used +YourCompanyDoesNotUseVAT=Your company has been defined to not use VAT (Home - Setup - Company/Foundation), so there is no VAT options to setup. +AccountancyCode=Accountancy Code AgendaSetup=Módulo configuração de ações e agenda PasswordTogetVCalExport=Chave de autorização vcal export link +PastDelayVCalExport=Do not export event older than ClickToDialDesc=Este módulo permite agregar um ícone depois do número de telefone de contatos Dolibarr. um clic neste ícone, Chama a um servidor com uma URL que se indica a continuação. Esto pode ser usado para Chamar à sistema call center de Dolibarr que pode Chamar à número de telefone em um sistema SIP, por Exemplo. CashDeskSetup=configuração do módulo de Caixa registradora CashDeskThirdPartyForSell=Fornecedor genérico a usar para a venda CashDeskBankAccountForSell=conta de efetivo que se utilizará para as vendas +CashDeskBankAccountForCheque=Default account to use to receive payments by cheque +CashDeskBankAccountForCB=Default account to use to receive payments by credit cards CashDeskIdWareHouse=Almoxarifado que se utiliza para as vendas BookmarkSetup=Configuração do Módulo de Favoritos BookmarkDesc=Este módulo lhe permite Gerenciar os links e acessos diretos. também permite Adicionar qualquer página de Dolibarr o link web ao menu de acesso rápido da esquerda. NbOfBoomarkToShow=Número máximo de marcadores que se mostrará ao menu +WebServicesSetup=Webservices module setup +WebServicesDesc=By enabling this module, Dolibarr become a web service server to provide miscellaneous web services. +WSDLCanBeDownloadedHere=WSDL descriptor files of provided services can be download here +EndPointIs=SOAP clients must send their requests to the Dolibarr endpoint available at Url +BankSetupModule=Bank module setup +FreeLegalTextOnChequeReceipts=Free text on cheque receipts +BankOrderShow=Display order of bank accounts for countries using "detailed bank number" BankOrderGlobal=General +BankOrderGlobalDesc=General display order BankOrderES=Espanhol +BankOrderESDesc=Spanish display order +MultiCompanySetup=Multi-company module setup SuppliersSetup=Configuração Módulo Fornecedor +SuppliersCommandModel=Complete template of supplier order (logo...) +SuppliersInvoiceModel=Complete template of supplier invoice (logo...) +GeoIPMaxmindSetup=GeoIP Maxmind module setup +NoteOnPathLocation=Note that your ip to country data file must be inside a directory your PHP can read (Check your PHP open_basedir setup and filesystem permissions). +YouCanDownloadFreeDatFileTo=You can download a free demo version of the Maxmind GeoIP country file at %s. +YouCanDownloadAdvancedDatFileTo=You can also download a more complete version, with updates, of the Maxmind GeoIP country file at %s. +TestGeoIPResult=Test of a conversion IP -> country +ProjectsNumberingModules=Projects numbering module +ProjectsSetup=Project module setup +ProjectsModelModule=Project reports document model +TasksNumberingModules=Tasks numbering module +ECMSetup =GED Setup diff --git a/htdocs/langs/pt_BR/exports.lang b/htdocs/langs/pt_BR/exports.lang index 156a4862387..e835f6556d9 100644 --- a/htdocs/langs/pt_BR/exports.lang +++ b/htdocs/langs/pt_BR/exports.lang @@ -2,14 +2,18 @@ ImportableDatas=Conjunto de dados importaveis SelectExportDataSet=Escolha um conjunto predefinido de dados que deseja exportar... SelectImportDataSet=Escolha um conjunto predefinido de dados que deseja importar... -SelectImportFields=Escolha os campos que devem importar-se, ou escolha um perfil de importação predefinido +NotImportedFields=Fields of source file not imported SaveImportModel=Guardar este perfil de importação assim pode reutiliza-lo posteriormente... ImportModelName=Nome do perfil de importação ImportModelSaved=Perfil de importação guardado com o nome de %s. ImportableFields=Campos Importáveis ImportedFields=Campos a Importar DatasetToImport=Conjunto de dados a importar +NoDiscardedFields=No fields in source file are discarded +FieldOrder=Field order +FieldTitle=Field title NowClickToGenerateToBuildExportFile=Agora, faça click em "Gerar" para gerar o arquivo exportação... +LibraryShort=Library LibraryUsed=Bibliotéca Utilizada FormatedImportDesc2=O primeiro passo consiste em escolher o tipo de dado que deve importar, logo o arquivo e a continuação escolher os campos que deseja importar. FormatedExportDesc2=O primeiro passo consiste em escolher um dos conjuntos de dados predefinidos, a continuação escolher os campos que quer exportar para o arquivo e em que ordem. @@ -26,3 +30,59 @@ LineTotalHT=Valor do HT por linha LineTotalTTC=Acrescido de ICMS da linha LineTotalVAT=Valor ICMS por Linha TypeOfLineServiceOrProduct=Tipo de Linha (0 +FileWithDataToImport=File with data to import +FileToImport=Source file to import +FileMustHaveOneOfFollowingFormat=File to import must have one of following format +DownloadEmptyExample=Download example of empty source file +ChooseFormatOfFileToImport=Choose file format to use as import file format by clicking on picto %s to select it... +ChooseFileToImport=Upload file then click on picto %s to select file as source import file... +SourceFileFormat=Source file format +FieldsInSourceFile=Fields in source file +FieldsInTargetDatabase=Target fields in Dolibarr database (bold=mandatory) +Field=Field +NoFields=No fields +MoveField=Move field column number %s +ExampleOfImportFile=Example_of_import_file +SaveImportProfile=Save this import profile +ErrorImportDuplicateProfil=Failed to save this import profile with this name. An existing profile already exists with this name. +ImportSummary=Import setup summary +TablesTarget=Targeted tables +FieldsTarget=Targeted fields +TableTarget=Targeted table +FieldTarget=Targeted field +FieldSource=Source field +DoNotImportFirstLine=Do not import first line of source file +NbOfSourceLines=Number of lines in source file +NowClickToTestTheImport=Check import parameters you have defined. If they are correct, click on button "%s" to launch a simulation of import process (no data will be changed in your database, it's only a simulation for the moment)... +RunSimulateImportFile=Launch the import simulation +SomeMandatoryFieldHaveNoSource=Some mandatory fields have no source from data file +InformationOnSourceFile=Information on source file +InformationOnTargetTables=Information on target fields +SelectAtLeastOneField=Switch at least one source field in the column of fields to export +SelectFormat=Choose this import file format +RunImportFile=Launch import file +NowClickToRunTheImport=Check result of import simulation. If everything is ok, launch the definitive import. +DataLoadedWithId=All data will be loaded with the following import id: %s +ErrorMissingMandatoryValue=Mandatory data is empty in source file for field %s. +TooMuchErrors=There is still %s other source lines with errors but output has been limited. +TooMuchWarnings=There is still %s other source lines with warnings but output has been limited. +EmptyLine=Empty line (will be discarded) +CorrectErrorBeforeRunningImport=You must first correct all errors before running definitive import. +FileWasImported=File was imported with number %s. +YouCanUseImportIdToFindRecord=You can find all imported records in your database by filtering on field import_key='%s'. +NbOfLinesOK=Number of lines with no errors and no warnings: %s. +NbOfLinesImported=Number of lines successfully imported: %s. +DataComeFromNoWhere=Value to insert comes from nowhere in source file. +DataComeFromFileFieldNb=Value to insert comes from field number %s in source file. +DataComeFromIdFoundFromRef=Value that comes from field number %s of source file will be used to find id of parent object to use (So the objet %s that has the ref. from source file must exists into Dolibarr). +DataIsInsertedInto=Data coming from source file will be inserted into the following field: +DataIDSourceIsInsertedInto=The id of parent object found using the data in source file, will be inserted into the following field: +DataCodeIDSourceIsInsertedInto=The id of parent line found from code, will be inserted into following field: +SourceRequired=Data value is mandatory +SourceExample=Example of possible data value +ExampleAnyRefFoundIntoElement=Any ref found for element %s +CSVFormatDesc=Comma Separated Value file format (.csv).
    This is a text file format where fields are separated by separator [ %s ]. If separator is found inside a field content, field is rounded by round character [ %s ]. Escape character to escape round character is [ %s ]. +CsvOptions=Csv Options +Separator=Separator +SpecialCode=Special code +FilteredFieldsValues=Value for filter diff --git a/htdocs/langs/pt_BR/holiday.lang b/htdocs/langs/pt_BR/holiday.lang index 69510d52c61..97a3b9139ef 100644 --- a/htdocs/langs/pt_BR/holiday.lang +++ b/htdocs/langs/pt_BR/holiday.lang @@ -1,4 +1,5 @@ # Dolibarr language file - Source file is en_US - holiday +HRM=HRM Holidays=Ferias CPTitreMenu=Ferias MenuReportMonth=Relatorio mensal @@ -7,10 +8,10 @@ NotActiveModCP=Voce tem que abilitar o modulo de ferias para ver esta pagina. NotConfigModCP=Voce precisa configurar o modulo de ferias para ver esta pagina. Para faze-lo,
    clickque aqui . NoCPforUser=Voce nao tem demandado as ferias. AddCP=Aplique-se para as ferias. -CPErrorSQL=Ocorreu erro de SQL: DateDebCP=Data inicio DateFinCP=Data fim DateCreateCP=Data criacão +ToReviewCP=Awaiting approval RefuseCP=Negado ValidatorCP=Aprovador ListeCP=Lista de feriados @@ -20,18 +21,24 @@ DelayToRequestCP=Demandas para ferias teram que ser feitas no minimo %s dias< MenuConfCP=Editar balancete das ferias UpdateAllCP=Atualizar ferias ErrorEndDateCP=Você deve selecionar uma data final posterior à data inicial. +ErrorSQLCreateCP=An SQL error occurred during the creation: +ErrorIDFicheCP=An error has occurred, the request for holidays does not exist. ReturnCP=Retorne à página anterior ErrorUserViewCP=Você não está autorizado a ler essa requisição de férias. +InfosCP=Information of the demand of holidays RequestByCP=Requisitado por NbUseDaysCP=Número de dias utilizados das férias DeleteCP=Eliminar ActionValidCP=Confirmar ActionRefuseCP=Não autorizar TitleDeleteCP=Apagar a requisição de férias +ConfirmDeleteCP=Confirm the deletion of this request for holidays? ErrorCantDeleteCP=Você não tem privilégios para apanhar essa requisição de férias UpdateButtonCP=Modificar +CantUpdate=You cannot update this request of holidays. NoDateDebut=Você deve selecionar uma data inicial. NoDateFin=Você deve selecionar uma data final. +ErrorDureeCP=Your request for holidays does not contain working day. TitleValidCP=Aprovar a requisição de férias ConfirmValidCP=Você tem certeza que deseja aprovar a requisição de férias? TitleToValidCP=Enviar requisição de férias @@ -41,11 +48,32 @@ ConfirmRefuseCP=Você tem certeza que não deseja autorizar a requisição de f NoMotifRefuseCP=Você deve selecionar uma razão para não autorizar a requisição. TitleCancelCP=Cancelar a requisição de férias ConfirmCancelCP=Você tem certeza que deseja cancelar a requisição de férias? +DetailRefusCP=Reason for refusal +DateRefusCP=Date of refusal DateCancelCP=Data do cancelamento MotifCP=Razão UserCP=Usuário +ActionByCP=Performed by +UserUpdateCP=For the user UserName=Apelidos +FirstDayOfHoliday=First day of holiday +LastDayOfHoliday=Last day of holiday +HolidaysMonthlyUpdate=Monthly update +ManualUpdate=Manual update +HolidaysCancelation=Holidays cancelation ValueOptionCP=Valor ValidEventCP=Confirmar DeleteEventOptionCP=Eliminar UpdateEventOptionCP=Modificar +TitleAdminCP=Configuration of Holidays +Hello=Hello +HolidaysToValidate=Validate holidays +HolidaysToValidateBody=Below is a request for holidays to validate +HolidaysToValidateDelay=This request for holidays will take place within a period of less than %s days. +HolidaysToValidateAlertSolde=The user who made this request for holidays do not have enough available days. +HolidaysValidated=Validated holidays +HolidaysValidatedBody=Your request for holidays for %s to %s has been validated. +HolidaysRefused=Denied holidays +HolidaysRefusedBody=Your request for holidays for %s to %s has been denied for the following reason : +HolidaysCanceled=Canceled holidays +HolidaysCanceledBody=Your request for holidays for %s to %s has been canceled. diff --git a/htdocs/langs/pt_BR/main.lang b/htdocs/langs/pt_BR/main.lang index 728062366d8..3b5a071445b 100644 --- a/htdocs/langs/pt_BR/main.lang +++ b/htdocs/langs/pt_BR/main.lang @@ -3,7 +3,7 @@ DIRECTION=ltr FONTFORPDF=helvetica FONTSIZEFORPDF=10 SeparatorDecimal=, -SeparatorThousand=None +SeparatorThousand=Space FormatDateShort=%d/%m/%Y FormatDateShortInput=%d/%m/%Y FormatDateShortJava=dd/MM/yyyy @@ -14,16 +14,16 @@ FormatHourShort=%I:%M %p FormatHourShortDuration=%H:%M FormatDateTextShort=%b %d, %Y FormatDateText=%B %d, %Y -FormatDateHourShort=%m/%d/%Y %I:%M %p -FormatDateHourSecShort=%m/%d/%Y %I:%M:%S %p -FormatDateHourTextShort=%b %d, %Y, %I:%M %p -FormatDateHourText=%B %d, %Y, %I:%M %p +FormatDateHourShort=%d/%m/%Y %I:%M %p +FormatDateHourSecShort=%d/%m/%Y %I:%M:%S %p +FormatDateHourTextShort=%d %b, %Y, %I:%M %p +FormatDateHourText=%d %B, %Y, %I:%M %p NoRecordFound=Registro nao encontrado NoError=Sem erro ErrorFieldFormat=O campo '%s' tem um valor incorreto ErrorFileDoesNotExists=O Arquivo %s não existe ErrorFailedToOpenFile=Impossível abrir o arquivo %s -ErrorUnknown=Erro Desconhecido +ErrorUnknown=Unknown error ErrorLogoFileNotFound=O arquivo logo '%s' não se encontra ErrorFailedToSendMail=Erro ao envio do e-mail (emissor ErrorAttachedFilesDisabled=A Administração dos arquivos associados está desativada neste servidor @@ -38,7 +38,8 @@ ErrorCantLoadUserFromDolibarrDatabase=Impossível encontrar o usuário %s ErrorNoVATRateDefinedForSellerCountry=Erro, nenhum tipo de ICMS definido para o país '%s'. ErrorNoSocialContributionForSellerCountry=Erro, nenhum tipo de contribuição social definido para o pais '%s'. ErrorFailedToSaveFile=Erro, o registo do arquivo falhou. -SetDate=Definir Data +SetDate=Set date +SelectDate=Select a date SeeAlso=Ver tambem %s BackgroundColorByDefault=Cor do fundo padrão FileWasNotUploaded=O arquivo foi selecionado, mas nao foi ainda enviado. Clique no "Anexar arquivo" para proceder. @@ -58,6 +59,7 @@ RequestLastAccess=Petição último acesso e a base de dados RequestLastAccessInError=Petição último acesso e a base de dados errado ReturnCodeLastAccessInError=Código devolvido último acesso e a base de dados errado InformationLastAccessInError=informação sobre o último acesso e a base de dados errado +TechnicalInformation=Technical information PrecisionUnitIsLimitedToXDecimals=Dolibarr está configurado para limitar a precisão dos preços unitários a %s Decimais. WarningYouHaveAtLeastOneTaskLate=Atenção, tem um elemento a menos que passou a data de tolerância. yes=sim @@ -106,6 +108,7 @@ DateLimit=Data Límite DurationDay=Día Day=Día days=Dias +Morning=Manha Quadri=Trimistre UseLocalTax=Incluindo taxa Tb=Tb @@ -133,6 +136,7 @@ AmountAverage=Valor médio TotalHTShort=Total (neto) TotalTTCShort=Total (incl. taxas) TotalHT=Valor +TotalHTforthispage=Total (sem impostos) desta pagina TotalTTC=Total TotalVAT=Total do ICMS TotalLT1=Total taxa 2 @@ -180,6 +184,18 @@ SeptemberMin=Set OctoberMin=Out NovemberMin=Nov DecemberMin=Dez +MonthShort01=Jan +MonthShort02=Fev +MonthShort03=Mar +MonthShort04=Abr +MonthShort05=Mai +MonthShort06=Jun +MonthShort07=Jul +MonthShort08=Ago +MonthShort09=Set +MonthShort10=Out +MonthShort11=Nov +MonthShort12=Dez AttachedFiles=Arquivos e Documentos Anexos FileTransferComplete=Foi transferido corretamente o Arquivo ReportPeriod=Periodo de Análise @@ -209,6 +225,7 @@ CanBeModifiedIfKo=Pode modificarse senão é valido RecordsModified=%s registros modificados FeatureDisabled=Função Desativada NotEnoughPermissions=Não tem permissões para esta ação +YouCanChangeValuesForThisListFromDictionarySetup=Voce pode modificar os valores para esta lista no menu Configuração - dicionario DocumentsNb=Arquivos conectados (%s) UploadDisabled=Carregamento Desativada CurrentUserLanguage=Idioma atual @@ -219,7 +236,6 @@ HidePassword=Mostrar comando com senha oculta UnHidePassword=Mostrar comando com senha e a vista AddFile=Adicionar arquivo ListOfFiles=Lista de arquivos disponiveis -FreeZone=Texto livre CloneMainAttributes=Clonar o objeto com estes atributos PDFMerge=Fusão de PDF Merge=Fusão @@ -241,12 +257,12 @@ Frequency=Frequencia IM=Mensagems instantaneas AttributeCode=Codigo do atributo OptionalFieldsSetup=Configuração dos atributos extra -URLPhoto=URL da foto/logo +URLPhoto=URL da photo/logo CreateDraft=Criar RascunhoCriar rascunho ObjectDeleted=Objeto %s apagado ByMonthYear=Por mes/ano ByYear=Por ano -ByMonth=Por mês +ByMonth=Por mes ByDay=Por día BySalesRepresentative=Por vendedor representante LinkedToSpecificUsers=Conectado com um contato particular do usuario @@ -258,5 +274,12 @@ HomeDashboard=Resumo de inicio Deductible=Deduzivel from=de toward=para +HelpCopyToClipboard=Use Ctrl+C para copiar para o clipboard +SaveUploadedFileWithMask=Salvar arquivo no servidor com nome "%s" (alternativamente "%s") +OriginFileName=Nome original do arquivo +SetDemandReason=Escolher fonte +ViewPrivateNote=Ver anotaçoes +XMoreLines=%s linha(s) escondidas +PublicUrl=Public URL Saturday=Sabado SaturdayMin=Sab diff --git a/htdocs/langs/pt_BR/products.lang b/htdocs/langs/pt_BR/products.lang index e57e0a4cb4f..768ae7bcb34 100644 --- a/htdocs/langs/pt_BR/products.lang +++ b/htdocs/langs/pt_BR/products.lang @@ -32,7 +32,6 @@ AddToOtherBills=Adicionar a Outras faturas AllWays=Rota para encontrar o sua produto ao estoque NoCat=O sua produto não pertence a nenhuma categoria NoteNotVisibleOnBill=Nota (Não é visivel as faturas, orçamentos, etc.) -MultiPricesAbility=Ativar multiplos preços MultiPricesNumPrices=Numero de preços MultiPriceLevelsName=Categoria de preços AssociatedProductsAbility=Ativar produtos associados @@ -49,7 +48,10 @@ ConfirmDeletePicture=? Tem certeza que quer eliminar esta foto? ConfirmDeleteProductLine=Tem certeza que quer eliminar esta linha de produto? NoStockForThisProduct=Não existe estoque deste produto NoStock=Sem estoque +QtyMin=Quantidade min +PriceQtyMin=Preco para esta qtd min. (sem desconto) VATRateForSupplierProduct=Percentual ICMS (para este fornecedor/produto) +DiscountQtyMin=Desconto padrao para qtd RecordedServices=Serviços gravados ServiceNb=Serviço n� %s ListProductServiceByPopularity=Lista de produtos/serviços por popularidade @@ -61,7 +63,6 @@ CloneProduct=Clonar produto ou serviço ConfirmCloneProduct=Voce tem certeza que deseja clonar o produto ou servico %s ? CloneContentProduct=Clonar todas as principais informações de um produto/serviço ClonePricesProduct=Clonar principais informações e preços -CloneCompositionProduct=Clonar composição do produto/servico ProductIsUsed=Este produto é usado NewRefForClone=Ref. do novo produto/serviço CustomerPrices=Preços de clientes @@ -69,8 +70,6 @@ SuppliersPrices=Preços de fornecedores CustomCode=Codigo NCM CountryOrigin=Pais de origem HiddenIntoCombo=Escondido nas listas de seleções -ProductCodeModel=Modelo de codigo produto -ServiceCodeModel=Modelo de codigo serviço AddThisProductCard=Criar ficha produto HelpAddThisProductCard=Esta opção permite de criar ou clonar um produto caso nao exista. AddThisServiceCard=Criar ficha serviço @@ -89,3 +88,21 @@ UnitPmp=Unidades VWAP CostPmpHT=Total unidades VWAP ProductUsedForBuild=Automaticamente consumidos pela produção ProductBuilded=Produção completada +ProductSellByQuarterHT=Total de produtos vendidos no trimestre +ServiceSellByQuarterHT=Total de servicos vendidos no trimestre +Quarter1=1° Trimestre +Quarter2=2° Trimestre +Quarter3=3° Trimestre +Quarter4=4° Trimestre +BarCodePrintsheet=Imprimir codigo de barras +NumberOfStickers=Numero de etiquetas a se imprimir numa pagina +PrintsheetForOneBarCode=Imprimir varias etiquetas para um codigo de barras +BuildPageToPrint=Gerar pagina a se imprimir +FillBarCodeTypeAndValueManually=Preencher codigo de barras e valor manualmente. +BarCodeDataForProduct=Barcode information of product %s : +BarCodeDataForThirdparty=Barcode information of thirdparty %s : +PriceByCustomer=Price by customer +PriceCatalogue=Unique price per product/service +PricingRule=Pricing Rules +AddCustomerPrice=Add price by customers +PriceByCustomerLog=Price by customer log diff --git a/htdocs/langs/pt_BR/stocks.lang b/htdocs/langs/pt_BR/stocks.lang index e00c1bc0282..6a7aa57fb5b 100644 --- a/htdocs/langs/pt_BR/stocks.lang +++ b/htdocs/langs/pt_BR/stocks.lang @@ -3,10 +3,13 @@ WarehouseCard=Ficha Armazém Warehouse=Armazém Warehouses=Armazens NewWarehouse=Novo Armazém ou Zona de Armazenagem +WarehouseEdit=Modify warehouse MenuNewWarehouse=Novo Armazém WarehouseOpened=Armazém Aberto WarehouseClosed=Armazém Encerrado WarehouseSource=Armazém Origem +WarehouseSourceNotDefined=No warehouse defined, +AddOne=Add one WarehouseTarget=Armazém Destino ValidateSending=Confirmar Envio CancelSending=Cancelar Envio @@ -20,8 +23,10 @@ ListOfStockMovements=Lista de movimentos de estoque StocksArea=Área estoques StockCorrection=Correção estoque StockMovements=Movimentos de estoque +UnitPurchaseValue=Unit purchase price TotalStock=Total em estoque StockTooLow=Estoque insuficiente +StockLowerThanLimit=Stock lower than alert limit EnhancedValueOfWarehouses=Valor de estoques UserWarehouseAutoCreate=Criar existencias automaticamente na criação de um usuário OrderDispatch=Recepção de estoques @@ -32,6 +37,10 @@ DeStockOnValidateOrder=Decrementar os estoques físicos sobre os pedidos DeStockOnShipment=Decrementar os estoques físicos sobre os envios (recomendado) ReStockOnBill=Incrementar os estoques físicos sobre as faturas/recibos ReStockOnValidateOrder=Incrementar os estoques físicos sobre os pedidos +ReStockOnDispatchOrder=Increase real stocks on manual dispatching into warehouses, after supplier order receiving +OrderStatusNotReadyToDispatch=Order has not yet or no more a status that allows dispatching of products in stock warehouses. +NoPredefinedProductToDispatch=No predefined products for this object. So no dispatching in stock is required. +DispatchVerb=Dispatch PhysicalStock=Estoque físico RealStock=Estoque real VirtualStock=Estoque virtual @@ -42,3 +51,19 @@ StockUpShort=Estoque max. IdWarehouse=Id. armazém DescWareHouse=Descrição armazém LieuWareHouse=Localização armazém +AverageUnitPricePMPShort=Weighted average input price +AverageUnitPricePMP=Weighted average input price +SellPriceMin=Selling Unit Price +EstimatedStockValueSellShort=Value to sell +EstimatedStockValueSell=Value to Sell +EstimatedStockValueShort=Input stock value +EstimatedStockValue=Input stock value +DeleteAWarehouse=Delete a warehouse +ConfirmDeleteWarehouse=Are you sure you want to delete the warehouse %s ? +PersonalStock=Personal stock %s +ThisWarehouseIsPersonalStock=This warehouse represents personal stock of %s %s +SelectWarehouseForStockDecrease=Choose warehouse to use for stock decrease +SelectWarehouseForStockIncrease=Choose warehouse to use for stock increase +DesiredStock=Desired stock +AlertOnly=Alerts only +ForThisWarehouse=For this warehouse diff --git a/htdocs/langs/pt_PT/admin.lang b/htdocs/langs/pt_PT/admin.lang index 7c5a1ca7227..6297fa069b0 100644 --- a/htdocs/langs/pt_PT/admin.lang +++ b/htdocs/langs/pt_PT/admin.lang @@ -116,7 +116,7 @@ LanguageBrowserParameter=Variável %s LocalisationDolibarrParameters=Parâmetros de localização ClientTZ=Fuso Horário do Cliente (utilizador) ClientHour=Hora do Cliente (utilizador) -OSTZ=Zona horaria +OSTZ=Server OS Time Zone PHPTZ=Zona horaria PHP PHPServerOffsetWithGreenwich=Offset con Greenwich (segundos) ClientOffsetWithGreenwich=Greenwich (segundos) @@ -233,7 +233,9 @@ OfficialWebSiteFr=Sitio web oficial falado/escrito em francês OfficialWiki=Wiki ERP OfficialDemo=Demo em linha ERP/CRM OfficialMarketPlace=Mercado Oficial externo para os módulos / addons -OfficialWebHostingService=Official web hosting services (Cloud hosting) +OfficialWebHostingService=Referenced web hosting services (Cloud hosting) +ReferencedPreferredPartners=Preferred Partners +OtherResources=Autres ressources ForDocumentationSeeWiki=Para a documentação de utilizador, programador ou Perguntas Frequentes (FAQ), consulte o wiki do ERP:

    for exemple :
    1,value1
    2,value2
    3,value3
    ...

    In order to have the list depending on another :
    1,value1|parent_list_code:parent_key
    2,value2|parent_list_code:parent_key -ExtrafieldParamHelpcheckbox=Parameters list have to be like key,value

    for exemple :
    1,value1
    2,value2
    3,value3
    ... -ExtrafieldParamHelpradio=Parameters list have to be like key,value

    for exemple :
    1,value1
    2,value2
    3,value3
    ... +ExtrafieldParamHelpselect=Parameters list have to be like key,value

    for example :
    1,value1
    2,value2
    3,value3
    ...

    In order to have the list depending on another :
    1,value1|parent_list_code:parent_key
    2,value2|parent_list_code:parent_key +ExtrafieldParamHelpcheckbox=Parameters list have to be like key,value

    for example :
    1,value1
    2,value2
    3,value3
    ... +ExtrafieldParamHelpradio=Parameters list have to be like key,value

    for example :
    1,value1
    2,value2
    3,value3
    ... ExtrafieldParamHelpsellist=Parameters list comes from a table
    Syntax : table_name:label_field:id_field::filter
    Example : c_typent:libelle:id::filter

    filter can be a simple test (eg active=1) to display only active value
    if you want to filter on extrafields use syntaxt extra.fieldcode=... (where field code is the code of extrafield)

    In order to have the list depending on another :
    c_typent:libelle:id:parent_list_code|parent_column:filter LibraryToBuildPDF=Biblioteca usada para gerar PDF WarningUsingFPDF=Warning: Your conf.php contains directive dolibarr_pdf_force_fpdf=1. This means you use the FPDF library to generate PDF files. This library is old and does not support a lot of features (Unicode, image transparency, cyrillic, arab and asiatic languages, ...), so you may experience errors during PDF generation.
    To solve this and have a full support of PDF generation, please download
    TCPDF library, then comment or remove the line $dolibarr_pdf_force_fpdf=1, and add instead $dolibarr_lib_TCPDF_PATH='path_to_TCPDF_dir' @@ -472,7 +474,7 @@ Module410Desc=Interface com calendario Webcalendar Module500Name=Special expenses (tax, social contributions, dividends) Module500Desc=Management of special expenses like taxes, social contribution, dividends and salaries Module510Name=Salários -Module510Desc=Management of empoyees salaries and payments +Module510Desc=Management of employees salaries and payments Module600Name=Notificações Module600Desc=Envío de Notificações (por correio electrónico) sobre os eventos de trabalho ERP/CRM Module700Name=Bolsas @@ -495,15 +497,15 @@ Module2400Name=Agenda Module2400Desc=Gestão da agenda e das acções Module2500Name=Gestão Electrónica de Documentos Module2500Desc=Permite administrar uma base de documentos -Module2600Name= WebServices -Module2600Desc= O servidor de serviços web ERP/CRM está Disponível -Module2700Name= Gravatar -Module2700Desc= Usar o serviço online Gravatar (www.gravatar.com) para mostrar as fotos dos utilizadores / membros (que encontrar nos seus e-mails). Necessita de um acesso à Internet +Module2600Name=WebServices +Module2600Desc=O servidor de serviços web ERP/CRM está Disponível +Module2700Name=Gravatar +Module2700Desc=Usar o serviço online Gravatar (www.gravatar.com) para mostrar as fotos dos utilizadores / membros (que encontrar nos seus e-mails). Necessita de um acesso à Internet Module2800Desc=Cliente FTP -Module2900Name= GeoIPMaxmind -Module2900Desc= Capacidades GeoIP conversões MaxMind -Module3100Name= Skype -Module3100Desc= Add a Skype button into card of adherents / third parties / contacts +Module2900Name=GeoIPMaxmind +Module2900Desc=Capacidades GeoIP conversões MaxMind +Module3100Name=Skype +Module3100Desc=Add a Skype button into card of adherents / third parties / contacts Module5000Name=Multi-empresa Module5000Desc=Permite-lhe gerir várias empresas Module6000Name=Fluxo de Trabalho @@ -681,6 +683,10 @@ Permission401=Consultar activos Permission402=Criar/Modificar activos Permission403=Confirmar activos Permission404=Eliminar activos +Permission510=Read Salaries +Permission512=Create/modify salaries +Permission514=Delete salaries +Permission517=Export salaries Permission531=Ler serviços Permission532=Criar / modificar serviços Permission534=Apagar serviços @@ -999,7 +1005,7 @@ ExtraFieldsSupplierOrders=Atributos complementares (encomendas) ExtraFieldsSupplierInvoices=Atributos complementares (faturas) ExtraFieldsProject=Atributos complementares (projetos) ExtraFieldsProjectTask=Atributos complementares (tarefas) -ExtraFieldHasWrongValue=Atributos complementares %s tem um valor errado. +ExtraFieldHasWrongValue=Attribute %s has a wrong value. AlphaNumOnlyCharsAndNoSpace=apenas caracteres alfanuméricos sem espaços AlphaNumOnlyLowerCharsAndNoSpace=only alphanumericals and lower case characters without space SendingMailSetup=Instalação de envios por e-mail @@ -1018,13 +1024,13 @@ SuhosinSessionEncrypt=Session storage encrypted by Suhosin ConditionIsCurrently=Condition is currently %s TestNotPossibleWithCurrentBrowsers=A detecção automática não é possível YouUseBestDriver=You use driver %s that is best driver available currently. -YouDoNotUseBestDriver=You use drive %s but driver %s is recommanded. +YouDoNotUseBestDriver=You use drive %s but driver %s is recommended. NbOfProductIsLowerThanNoPb=You have only %s products/services into database. This does not required any particular optimization. SearchOptim=Optimização da pesquisa YouHaveXProductUseSearchOptim=You have %s product into database. You should add the constant PRODUCT_DONOTSEARCH_ANYWHERE to 1 into Home-Setup-Other, you limit the search to the beginning of strings making possible for database to use index and you should get an immediate response. BrowserIsOK=You are using the web browser %s. This browser is ok for security and performance. BrowserIsKO=You are using the web browser %s. This browser is known to be a bad choice for security, performance and reliability. We recommand you to use Firefox, Chrome, Opera or Safari. -XDebugInstalled=XDebug est chargé. +XDebugInstalled=XDebug is loaded. XCacheInstalled=XCache is loaded. AddRefInList=Display customer/supplier ref into list (select list or combobox) and most of hyperlink FieldEdition=Edition of field %s @@ -1073,7 +1079,7 @@ WebCalServer=Servidor da base de dados do calendario WebCalDatabaseName=Nome da base de dados WebCalUser=Utilizador com acesso á base de dados. WebCalSetupSaved=Os dados de link foram guardados correctamente. -WebCalTestOk=A ligação ao servidor '%s' na base '%s' pelo Utilizador '%s' foi satisfactoria. +WebCalTestOk=Connection to server '%s' on database '%s' with user '%s' successful. WebCalTestKo1=A ligação ao servidor '%s' foi satisfactoria, mas a base '%s' não se pode como Teste. WebCalTestKo2=A ligação ao servidor '%s' pelo Utilizador '%s' falhou. WebCalErrorConnectOkButWrongDatabase=A ligação realizou-se correctamente mas a base não parece ser uma base Webcalendar. @@ -1119,7 +1125,7 @@ WatermarkOnDraftProposal=Watermark on draft commercial proposals (none if empty) OrdersSetup=Configuração do módulo pedidos OrdersNumberingModules=Módulos de numeração dos pedidos OrdersModelModule=Modelos de documentos dos pedidos -HideTreadedOrders=Ocultar os pedidos processados ou anulados da listagem +HideTreadedOrders=Hide the treated or cancelled orders in the list ValidOrderAfterPropalClosed=Confirmar o pedido depois de fechar o orçamento, permite não passar por um pedido provisório FreeLegalTextOnOrders=Texto livre em pedidos WatermarkOnDraftOrders=Watermark on draft orders (none if empty) @@ -1214,9 +1220,9 @@ LDAPSynchroKO=Teste de sincronização errado LDAPSynchroKOMayBePermissions=Erro do teste de sincronização. verifique que a ligação ao servidor está correcta e que permite as actualizações LDAP LDAPTCPConnectOK=Ligação TCP ao servidor LDAP efectuada (Servidor LDAPTCPConnectKO=Falha de ligação TCP ao servidor LDAP (Servidor -LDAPBindOK=Ligação/autenticação ao servidor LDAP conseguida (Servidor +LDAPBindOK=Connect/Authentificate to LDAP server successful (Server=%s, Port=%s, Admin=%s, Password=%s) LDAPBindKO=Fallo de ligação/autenticação ao servidor LDAP (Servidor -LDAPUnbindSuccessfull=Saida realizada +LDAPUnbindSuccessfull=Disconnect successful LDAPUnbindFailed=Saida falhada LDAPConnectToDNSuccessfull=Ligação a DN (%s) realizada LDAPConnectToDNFailed=Conecção ao DN (%s) falhada @@ -1273,7 +1279,7 @@ LDAPFieldSidExample=Exemplo : objecto sid LDAPFieldEndLastSubscription=Data finalização como membro LDAPFieldTitle=Posto/Função LDAPFieldTitleExample=Exemplo: título -LDAPParametersAreStillHardCoded=Os parâmetros LDAP são codificados (na classe contactos) +LDAPParametersAreStillHardCoded=LDAP parameters are still hardcoded (in contact class) LDAPSetupNotComplete=Configuração LDAP incompleta (a completar em Outras pestañas) LDAPNoUserOrPasswordProvidedAccessIsReadOnly=Administrador o palavra-passe não inindicados. os acessos LDAP serão anónimos e em solo leitura. LDAPDescContact=Esta página permite definir o Nome dos atributos da árvore LDAP para cada informação dos contactos ERP/CRM. @@ -1429,7 +1435,7 @@ OptionVATDefault=Standard OptionVATDebitOption=Opção serviços a débito OptionVatDefaultDesc=A carga do IVA é:
    -ao envio dos bens
    -sobre o pagamento dos serviços OptionVatDebitOptionDesc=A carga do IVA é:
    -ao envío dos bens
    -sobre a facturação dos serviços -SummaryOfVatExigibilityUsedByDefault=Data do IVA elegido por padrão de acordo com a opção escolhida: +SummaryOfVatExigibilityUsedByDefault=Time of VAT exigibility by default according to chosen option: OnDelivery=Na entrega OnPayment=Pagamento OnInvoice=Em factura @@ -1446,7 +1452,7 @@ AccountancyCodeBuy=Purchase account. code AgendaSetup=Módulo configuração de acções e agenda PasswordTogetVCalExport=Chave de autorização para exportação do link vcal. PastDelayVCalExport=Não exportar evento com mais de -AGENDA_USE_EVENT_TYPE=Use events types (managed into menu Setup -> Dictionnary -> Type of agenda events) +AGENDA_USE_EVENT_TYPE=Use events types (managed into menu Setup -> Dictionary -> Type of agenda events) ##### ClickToDial ##### ClickToDialDesc=Este módulo permite juntar um icon depois do número de telefone de contactos ERP/CRM. Um click no icon, liga a um servidor com uma URL . Pode ser usado para ligar a um sistema call center, ligando a um número de telefone de um sistema SIP, por Exemplo. ##### Point Of Sales (CashDesk) ##### diff --git a/htdocs/langs/pt_PT/contracts.lang b/htdocs/langs/pt_PT/contracts.lang index a2a1ec198c5..7ce40bddee1 100644 --- a/htdocs/langs/pt_PT/contracts.lang +++ b/htdocs/langs/pt_PT/contracts.lang @@ -89,6 +89,8 @@ ListOfServicesToExpireWithDuration=Lista de Serviços para expirar em% s dias ListOfServicesToExpireWithDurationNeg=Lista de Serviços expirados há mais de %s dias ListOfServicesToExpire=Lista de Serviços para expirar NoteListOfYourExpiredServices=Esta lista contém apenas os serviços de contratos de terceiros aos quais está ligado como representante de vendas. +StandardContractsTemplate=Standard contracts template +ContactNameAndSignature=For %s, name and signature: ##### Types de contacts ##### TypeContact_contrat_internal_SALESREPSIGN=Comercial assinante do contrato diff --git a/htdocs/langs/pt_PT/exports.lang b/htdocs/langs/pt_PT/exports.lang index 4fcb6148ee7..29bc1c0ff10 100644 --- a/htdocs/langs/pt_PT/exports.lang +++ b/htdocs/langs/pt_PT/exports.lang @@ -8,7 +8,7 @@ ImportableDatas=Conjunto de dados importáveis SelectExportDataSet=Escolha um conjunto predefinido de dados que deseje exportar... SelectImportDataSet=Escolha de dados que pretende importar ... SelectExportFields=Escolha os campos que devem exportar-se, ou escolha um perfil de exportação predefinido -SelectImportFields=Escolha os campos que deseja importar, ou escolha um perfil predefinido importação +SelectImportFields=Choose source file fields you want to import and their target field in database by moving them up and down with anchor %s, or select a predefined import profile: NotImportedFields=Os campos não importados SaveExportModel=Guardar este perfil de exportação assim pode reutiliza-lo posteriormente... SaveImportModel=Guarde este perfil de importação, se pretender reutilizá-la mais tarde ... @@ -81,7 +81,7 @@ DoNotImportFirstLine=Não importar primeira linha do arquivo de origem NbOfSourceLines=Número de linhas no arquivo de origem NowClickToTestTheImport=Verifique os parâmetros de importação que você definiu. Se eles estiverem correctos, clique no botão "%s" para iniciar uma simulação do processo de importação (dados não serão alterados em seu banco de dados, é apenas uma simulação para o momento) ... RunSimulateImportFile=Inicie a simulação de importação -FieldNeedSource=Este campo da base de dados requere uma fonte de dados de arquivo +FieldNeedSource=This field requires data from the source file SomeMandatoryFieldHaveNoSource=Alguns campos obrigatórios não têm nenhuma fonte de dados de arquivo InformationOnSourceFile=Informações sobre a fonte de arquivo InformationOnTargetTables=Informações sobre os campos de destino diff --git a/htdocs/langs/pt_PT/holiday.lang b/htdocs/langs/pt_PT/holiday.lang index 8f5eeb3d982..996875e7368 100644 --- a/htdocs/langs/pt_PT/holiday.lang +++ b/htdocs/langs/pt_PT/holiday.lang @@ -8,7 +8,6 @@ NotActiveModCP=É necessário activar o módulo "Férias" para visualizar esta p NotConfigModCP=É necessário configurar o módulo "Férias" para visualizar esta página. Clique aqui para o fazer. NoCPforUser=Não possui qualquer pedido de férias. AddCP=Efectuar pedido de férias -CPErrorSQL=Ocorreu um erro SQL: Employe=Empregado DateDebCP=Data de início DateFinCP=Data de fim diff --git a/htdocs/langs/pt_PT/languages.lang b/htdocs/langs/pt_PT/languages.lang index 9ba49568eaf..5ec3d9da875 100644 --- a/htdocs/langs/pt_PT/languages.lang +++ b/htdocs/langs/pt_PT/languages.lang @@ -19,6 +19,7 @@ Language_en_SA=Inglês (Arábia Saudita) Language_en_US=Inglês (Estados Unidos) Language_en_ZA=Inglês (África do Sul) Language_es_ES=Espanhol +Language_es_DO=Spanish (Dominican Republic) Language_es_AR=Espanhol (Argentina) Language_es_CL=Spanish (Chile) Language_es_HN=Espanhol (Honduras) @@ -38,6 +39,7 @@ Language_fr_NC=Francês (Nova Caledónia) Language_he_IL=Hebreu Language_hr_HR=Croata Language_hu_HU=Húngaro +Language_id_ID=Indonesian Language_is_IS=Islandês Language_it_IT=Italiano Language_ja_JP=Japonês diff --git a/htdocs/langs/pt_PT/mails.lang b/htdocs/langs/pt_PT/mails.lang index 1c43f8c7a94..a20b5e02227 100644 --- a/htdocs/langs/pt_PT/mails.lang +++ b/htdocs/langs/pt_PT/mails.lang @@ -79,6 +79,7 @@ MailtoEMail=Hyper link to email ActivateCheckRead=Permitir usar o link "Cancelar Subscrição" ActivateCheckReadKey=Key use to encrypt URL use for "Read Receipt" and "Unsubcribe" feature EMailSentToNRecipients=E-mail enviado para %s destinatários. +XTargetsAdded=%s recipients added into target list EachInvoiceWillBeAttachedToEmail=A document using default invoice document template will be created and attached to each email. MailTopicSendRemindUnpaidInvoices=Reminder of invoice %s (%s) SendRemind=Send reminder by EMails diff --git a/htdocs/langs/pt_PT/main.lang b/htdocs/langs/pt_PT/main.lang index 8c1beeb079d..7fa91fd887d 100644 --- a/htdocs/langs/pt_PT/main.lang +++ b/htdocs/langs/pt_PT/main.lang @@ -551,6 +551,7 @@ MailSentBy=Mail enviado por TextUsedInTheMessageBody=Texto utilizado no corpo da mensagem SendAcknowledgementByMail=Envio rec. por e-mail NoEMail=Sem e-mail +NoMobilePhone=No mobile phone Owner=Propietario DetectedVersion=Versão Detectada FollowingConstantsWillBeSubstituted=As seguintes constantes serão substituidas pelo seu valor correspondente. diff --git a/htdocs/langs/pt_PT/products.lang b/htdocs/langs/pt_PT/products.lang index 10f14f746a0..69a6e8b887c 100644 --- a/htdocs/langs/pt_PT/products.lang +++ b/htdocs/langs/pt_PT/products.lang @@ -28,8 +28,10 @@ ProductsAndServicesStatistics=Estatísticas Produtos e Serviços ProductsStatistics=Estatísticas Produtos ProductsOnSell=Produtos em Venda ProductsNotOnSell=Produtos Fora de Venda +ProductsOnSellAndOnBuy=Products not for sale nor purchase ServicesOnSell=Serviços em Venda ServicesNotOnSell=Serviços Fora de Venda +ServicesOnSellAndOnBuy=Services not for sale nor purchase InternalRef=Referencia Interna LastRecorded=Ultimos Produtos/Serviços em Venda Registados LastRecordedProductsAndServices=Os %s Ultimos Produtos/Perviços Registados @@ -70,6 +72,8 @@ PublicPrice=Preço público CurrentPrice=Preço actual NewPrice=Novo preço MinPrice=Mínima. preço de venda +MinPriceHT=Minim. selling price (net of tax) +MinPriceTTC=Minim. selling price (inc. tax) CantBeLessThanMinPrice=O preço de venda não pode ser inferior ao mínimo permitido para este produto ( %s sem impostos) ContractStatus=Estado de contrato ContractStatusClosed=Fechado @@ -179,6 +183,7 @@ ProductIsUsed=Este produto é utilizado NewRefForClone=Ref. do novo produto / serviço CustomerPrices=preços de Clientes SuppliersPrices=preços dos fornecedores +SuppliersPricesOfProductsOrServices=Suppliers prices (of products or services) CustomCode=Código alfandega CountryOrigin=País de origem HiddenIntoCombo=Escondido em listas de seleção @@ -208,6 +213,7 @@ CostPmpHT=Net total VWAP ProductUsedForBuild=Auto consumed by production ProductBuilded=Production completed ProductsMultiPrice=Produto multi-preço +ProductsOrServiceMultiPrice=Customers prices (of products or services, multi-prices) ProductSellByQuarterHT=Products turnover quarterly VWAP ServiceSellByQuarterHT=Services turnover quarterly VWAP Quarter1=1º Trimestre diff --git a/htdocs/langs/pt_PT/shop.lang b/htdocs/langs/pt_PT/shop.lang index db2799cbd2c..39b80d52387 100644 --- a/htdocs/langs/pt_PT/shop.lang +++ b/htdocs/langs/pt_PT/shop.lang @@ -1,4 +1,5 @@ # Dolibarr language file - Source file is en_US - shop +FailedConnectDBCheckModuleSetup=Failed to connect to oscommerce database. Check your module setup Shop=Loja ShopWeb=Loja web LastOrders=Últimos pedidos diff --git a/htdocs/langs/pt_PT/stocks.lang b/htdocs/langs/pt_PT/stocks.lang index 13a105ae154..a98f01fc0f9 100644 --- a/htdocs/langs/pt_PT/stocks.lang +++ b/htdocs/langs/pt_PT/stocks.lang @@ -112,6 +112,7 @@ ReplenishmentOrdersDesc=This is list of all opened supplier orders Replenishments=Replenishments NbOfProductBeforePeriod=Quantity of product %s in stock before selected period (< %s) NbOfProductAfterPeriod=Quantity of product %s in stock after selected period (> %s) +MassMovement=Mass movement MassStockMovement=Mass stock movement SelectProductInAndOutWareHouse=Select a product, a quantity, a source warehouse and a target warehouse, then click "%s". Once this is done for all required movements, click onto "%s". RecordMovement=Record transfert diff --git a/htdocs/langs/ro_RO/admin.lang b/htdocs/langs/ro_RO/admin.lang index 62e5d393ecb..e52e09451c7 100644 --- a/htdocs/langs/ro_RO/admin.lang +++ b/htdocs/langs/ro_RO/admin.lang @@ -116,7 +116,7 @@ LanguageBrowserParameter=Parametru %s LocalisationDolibarrParameters=Parametrii Localizare ClientTZ=Client Time Zone (user) ClientHour=Client time (user) -OSTZ=Time Zone Server OS +OSTZ=Server OS Time Zone PHPTZ=Time Zone Server PHP PHPServerOffsetWithGreenwich=Offset pentru PHP server de latime Greenwich (secondes) ClientOffsetWithGreenwich=Client / Browser offset lăţime Greenwich (secunde) @@ -233,7 +233,9 @@ OfficialWebSiteFr=Site-ul web oficial francofon OfficialWiki=Dolibarr Wiki OfficialDemo=Dolibarr demo online OfficialMarketPlace=Oficial loc pe piaţă pentru modulelor externe / addons -OfficialWebHostingService=Servicii oficiale de web hosting (Cloud hosting) +OfficialWebHostingService=Referenced web hosting services (Cloud hosting) +ReferencedPreferredPartners=Preferred Partners +OtherResources=Autres ressources ForDocumentationSeeWiki=Pentru utilizator sau developer documentaţia (doc, FAQs ...),
    aruncăm o privire la Dolibarr Wiki:
    %s ForAnswersSeeForum=Pentru orice alte întrebări / ajutor, se poate utiliza Dolibarr forum:
    %s HelpCenterDesc1=Această zonă vă poate ajuta să obţineţi un suport de Ajutor de servicii pe Dolibarr. @@ -369,9 +371,9 @@ ExtrafieldSelectList = Select din tabel ExtrafieldSeparator=Separator ExtrafieldCheckBox=Checkbox ExtrafieldRadio=Radio buton -ExtrafieldParamHelpselect=Lista de parametri trebuie să fie ca cheie, valoare

    pentru exemplul:
    1, valoare1
    2, valoare2
    3, value3
    ...

    Pentru a avea listă în funcție de o alta:
    1,value1|parent_list_code:parent_key
    2,value2|parent_list_code:parent_key -ExtrafieldParamHelpcheckbox=Lista de parametri trebuie să fie de tip cheie, valoare

    pentru exemplul:
    1, valoare1
    2, valoare2
    3, value3
    ... -ExtrafieldParamHelpradio=Lista de parametri trebuie să fie de tip cheie, valoare

    pentru exemplul:
    1, valoare1
    2, valoare2
    3, value3
    ... +ExtrafieldParamHelpselect=Parameters list have to be like key,value

    for example :
    1,value1
    2,value2
    3,value3
    ...

    In order to have the list depending on another :
    1,value1|parent_list_code:parent_key
    2,value2|parent_list_code:parent_key +ExtrafieldParamHelpcheckbox=Parameters list have to be like key,value

    for example :
    1,value1
    2,value2
    3,value3
    ... +ExtrafieldParamHelpradio=Parameters list have to be like key,value

    for example :
    1,value1
    2,value2
    3,value3
    ... ExtrafieldParamHelpsellist=Parameters list comes from a table
    Syntax : table_name:label_field:id_field::filter
    Example : c_typent:libelle:id::filter

    filter can be a simple test (eg active=1) to display only active value
    if you want to filter on extrafields use syntaxt extra.fieldcode=... (where field code is the code of extrafield)

    In order to have the list depending on another :
    c_typent:libelle:id:parent_list_code|parent_column:filter LibraryToBuildPDF=Librairie utilizată la construirea PDF ului WarningUsingFPDF=Atenție: conf.php contine Directiva dolibarr_pdf_force_fpdf = 1. Acest lucru înseamnă că utilizați biblioteca FPDF pentru a genera fișiere PDF. Această bibliotecă este vechi și nu suportă o mulțime de caracteristici (Unicode, transparența imagine, cu litere chirilice, limbi arabe și asiatice, ...), astfel încât este posibil să apară erori în timpul generație PDF.
    Pentru a rezolva acest lucru și au un suport complet de generare PDF, vă rugăm să descărcați biblioteca TCPDF , atunci comentariu sau elimina linia $ dolibarr_pdf_force_fpdf = 1, și se adaugă în schimb $ dolibarr_lib_TCPDF_PATH = 'path_to_TCPDF_dir' @@ -472,7 +474,7 @@ Module410Desc=Webcalendar integrare Module500Name=Special expenses (tax, social contributions, dividends) Module500Desc=Management of special expenses like taxes, social contribution, dividends and salaries Module510Name=Salaries -Module510Desc=Management of empoyees salaries and payments +Module510Desc=Management of employees salaries and payments Module600Name=Notificări Module600Desc=Trimite notificări (prin e-mail) pe Dolibarr de afaceri evenimente Module700Name=Donatii @@ -495,15 +497,15 @@ Module2400Name=Agenda Module2400Desc=Acţiuni / activităţi de ordine de zi şi de gestionare a Module2500Name=Electronic Content Management Module2500Desc=Salvaţi şi partaja documente -Module2600Name= Servicii web -Module2600Desc= Activarea serviciilor Dolibarr serverul web -Module2700Name= Gravatar -Module2700Desc= Folosiţi serviciul online Gravatar (www.gravatar.com) pentru a arăta fotografie de utilizatori / membri (găsit cu mesajele de poştă electronică). Aveţi nevoie de un acces la internet +Module2600Name=Servicii web +Module2600Desc=Activarea serviciilor Dolibarr serverul web +Module2700Name=Gravatar +Module2700Desc=Folosiţi serviciul online Gravatar (www.gravatar.com) pentru a arăta fotografie de utilizatori / membri (găsit cu mesajele de poştă electronică). Aveţi nevoie de un acces la internet Module2800Desc=FTP Client -Module2900Name= GeoIPMaxmind -Module2900Desc= GeoIP conversii Maxmind capacităţile -Module3100Name= Skype -Module3100Desc= Adăugați un buton Skype în fişa de aderent / terț / contact +Module2900Name=GeoIPMaxmind +Module2900Desc=GeoIP conversii Maxmind capacităţile +Module3100Name=Skype +Module3100Desc=Adăugați un buton Skype în fişa de aderent / terț / contact Module5000Name=Multi-societate Module5000Desc=Vă permite să administraţi mai multe companii Module6000Name=Flux de lucru @@ -681,6 +683,10 @@ Permission401=Citiţi cu reduceri Permission402=Creare / Modificare reduceri Permission403=Validate reduceri Permission404=Ştergere reduceri +Permission510=Read Salaries +Permission512=Create/modify salaries +Permission514=Delete salaries +Permission517=Export salaries Permission531=Citeşte servicii Permission532=Creare / Modificare servicii Permission534=Ştergere servicii @@ -999,7 +1005,7 @@ ExtraFieldsSupplierOrders=Atribute complementare (comenzi) ExtraFieldsSupplierInvoices=Atribute complementare (facturi) ExtraFieldsProject=Atribute complementare (proiecte) ExtraFieldsProjectTask=Atribute complementare (sarcini) -ExtraFieldHasWrongValue=Fi atribuite %s are o valoare greşită. +ExtraFieldHasWrongValue=Attribute %s has a wrong value. AlphaNumOnlyCharsAndNoSpace=numai caractere alfanumerice fără spaţiu AlphaNumOnlyLowerCharsAndNoSpace=only alphanumericals and lower case characters without space SendingMailSetup=Setup de trimiteri prin e-mail @@ -1018,13 +1024,13 @@ SuhosinSessionEncrypt=Stocarea sesiune criptată prin Suhosin ConditionIsCurrently=Condiția este momentan %s TestNotPossibleWithCurrentBrowsers=Detectarea automată nu este posibilă YouUseBestDriver=Utilizaţi driverul %s care este cel mai bun driver disponibil acum. -YouDoNotUseBestDriver=Utilizaţi driverul %s dar driverul %s este recomandat. +YouDoNotUseBestDriver=You use drive %s but driver %s is recommended. NbOfProductIsLowerThanNoPb=Aveți doar % s produse / servicii în baza de date. Aceasta nu necesită nicio optimizare specială. SearchOptim=Optimizare căutare YouHaveXProductUseSearchOptim=Aveți % s produse în baza de date. Ar trebui să adăugați constanta PRODUCT_DONOTSEARCH_ANYWHERE la 1 în Acasă-Setup-Altele, să limitați căutarea la începutul siruri de caractere ţi a face posibil ca baza de date să utilizeze indexul și să obțineți un răspuns imediat. BrowserIsOK=Folosiţi navigatorul web %s. Acest navigator este ok pentru performanţă şi securitate. BrowserIsKO=Folosiţi browser-ul % s. Acest browser-ul pare a fi o alegere proasta pentru securitate, performanță și fiabilitate. Noi recomandam sa folositi Firefox, Chrome, Opera sau Safari. -XDebugInstalled=XDebug este încărcată. +XDebugInstalled=XDebug is loaded. XCacheInstalled=XCache este încărcată. AddRefInList=Afişează referinţele clienţilor şi furnizorilor într-o listă ( selectează lista sau casutele ) si in plus a linkurilor. FieldEdition=Editarea campului %s @@ -1073,7 +1079,7 @@ WebCalServer=Server de găzduire de date calendaristice WebCalDatabaseName=Baza de date nume WebCalUser=De utilizator pentru a accesa baza de date WebCalSetupSaved=Webcalendar setup fost salvate cu succes. -WebCalTestOk=Conectarea la server ' %s' pe bază de date " %s" cu utilizatorul " %s" de succes. +WebCalTestOk=Connection to server '%s' on database '%s' with user '%s' successful. WebCalTestKo1=Conectarea la server ' %s' reuseste, dar baza de date " %s" nu a putut fi atins. WebCalTestKo2=Conectarea la server ' %s' cu utilizatorul " %s" nu a reuşit. WebCalErrorConnectOkButWrongDatabase=Conexiunii la baza de date a reusit, dar nu arata a fi o bază de date Webcalendar. @@ -1119,7 +1125,7 @@ WatermarkOnDraftProposal=Filigranul pe propunerile comerciale ciornă (niciunul OrdersSetup=Ordinele de gestionare setup OrdersNumberingModules=Ordinele de numerotare module OrdersModelModule=Ordinul modele de documente -HideTreadedOrders=Ascunde tratate sau anulat comenzile în lista +HideTreadedOrders=Hide the treated or cancelled orders in the list ValidOrderAfterPropalClosed=Pentru a valida pentru propunerea după mai aproape, face posibil să nu se pas cu provizoriu pentru FreeLegalTextOnOrders=Free text de pe ordinele de WatermarkOnDraftOrders=Filigranul pe comenzile ciornă (niciunul daca e gol) @@ -1214,9 +1220,9 @@ LDAPSynchroKO=Eşuare încercare de sincronizare LDAPSynchroKOMayBePermissions=Eşuare încercare de sincronizare. Verificaţi dacă conexiune la serverul este configurat corect şi permite LDAP udpates LDAPTCPConnectOK=TCP connect to LDAP server successful (Server=%s, Port=TCP se conecteze la serverul LDAP de succes (Server= %s, port= %s) LDAPTCPConnectKO=TCP connect to LDAP server failed (Server=%s, Port=TCP se conecteze la serverul LDAP a eşuat (Server= %s, port= %s) -LDAPBindOK=Connect/Authentificate to LDAP server sucessfull (Server=%s, Port=%s, Admin=%s, Password=Conectare / Authentificate la server LDAP de succes (Server= %s, port= %s, %s= admin, parola= %s) +LDAPBindOK=Connect/Authentificate to LDAP server successful (Server=%s, Port=%s, Admin=%s, Password=%s) LDAPBindKO=Connect/Authentificate to LDAP server failed (Server=%s, Port=%s, Admin=%s, Password=Conectare / Authentificate la serverul LDAP a eşuat (Server= %s, port= %s, %s= admin, parola= %s) -LDAPUnbindSuccessfull=Deconectaţi de succes +LDAPUnbindSuccessfull=Disconnect successful LDAPUnbindFailed=Deconectaţi eşuat LDAPConnectToDNSuccessfull=Conexiune au DN ( %s) Russie LDAPConnectToDNFailed=Conexiune au DN ( %s) choue @@ -1273,7 +1279,7 @@ LDAPFieldSidExample=Exemplu: objectsid LDAPFieldEndLastSubscription=Data de sfârşit de abonament LDAPFieldTitle=Post / Funcţia LDAPFieldTitleExample=Examplu: titlu -LDAPParametersAreStillHardCoded=LDAP parametres sunt încă hardcoded (în clasa de contact) +LDAPParametersAreStillHardCoded=LDAP parameters are still hardcoded (in contact class) LDAPSetupNotComplete=LDAP setup nu complet (merg pe alţii file) LDAPNoUserOrPasswordProvidedAccessIsReadOnly=Nr administrator sau parola furnizate. LDAP de acces vor fi anonime şi modul doar în citire. LDAPDescContact=Această pagină vă permite să definiţi numele atribute LDAP LDAP în copac pentru fiecare date găsite pe Dolibarr contact. @@ -1429,7 +1435,7 @@ OptionVATDefault=Standard OptionVATDebitOption=Opţiunea servicii de debit OptionVatDefaultDesc=TVA este datorată:
    - La livrare / plăţile pentru mărfurile
    - Privind plăţile pentru serviciile OptionVatDebitOptionDesc=TVA este datorată:
    - La livrare / plăţile pentru mărfurile
    - Pe factura (de debit) pentru serviciile -SummaryOfVatExigibilityUsedByDefault=Timp de TVA exigibility, în mod implicit în funcţie de choosed opţiune: +SummaryOfVatExigibilityUsedByDefault=Time of VAT exigibility by default according to chosen option: OnDelivery=Pe livrare OnPayment=Pe plată OnInvoice=Pe factura @@ -1446,7 +1452,7 @@ AccountancyCodeBuy=Cont cumpărare. cod AgendaSetup=Acţiuni de ordine de zi şi de modul de configurare PasswordTogetVCalExport=Cheia de a autoriza export link PastDelayVCalExport=Nu de export eveniment mai în vârstă decât -AGENDA_USE_EVENT_TYPE=Use events types (managed into menu Setup -> Dictionnary -> Type of agenda events) +AGENDA_USE_EVENT_TYPE=Use events types (managed into menu Setup -> Dictionary -> Type of agenda events) ##### ClickToDial ##### ClickToDialDesc=Acest modul permite să adăugaţi o pictogramă după numărul de telefon de contact Dolibarr. Un clic pe această pictogramă, se va apela un serveur cu un URL particular definiţi mai jos. Acest lucru poate fi utilizat pentru a apela un sistem de call center din Dolibarr care pot apela numărul de telefon pe un sistem de SIP, de exemplu. ##### Point Of Sales (CashDesk) ##### diff --git a/htdocs/langs/ro_RO/contracts.lang b/htdocs/langs/ro_RO/contracts.lang index 40e77b641d6..997550f1177 100644 --- a/htdocs/langs/ro_RO/contracts.lang +++ b/htdocs/langs/ro_RO/contracts.lang @@ -89,6 +89,8 @@ ListOfServicesToExpireWithDuration=Lista servicii care expiră în %s zile ListOfServicesToExpireWithDurationNeg=Lista serviciilor expirate de mai bine de %s zile ListOfServicesToExpire=Lista servicii care expiră NoteListOfYourExpiredServices=Această listă conține numai serviciile pentru terții la care sunteţi reprezentant de vânzării. +StandardContractsTemplate=Standard contracts template +ContactNameAndSignature=For %s, name and signature: ##### Types de contacts ##### TypeContact_contrat_internal_SALESREPSIGN=Reprezentant vanzari de semnare a contractului diff --git a/htdocs/langs/ro_RO/exports.lang b/htdocs/langs/ro_RO/exports.lang index 0ab67f58e06..84d9d7f0615 100644 --- a/htdocs/langs/ro_RO/exports.lang +++ b/htdocs/langs/ro_RO/exports.lang @@ -8,7 +8,7 @@ ImportableDatas=Importable de date SelectExportDataSet=Alegeţi de date pe care doriţi să le export ... SelectImportDataSet=Alegeţi de date pe care doriţi să o import ... SelectExportFields=Alegeţi câmpurile pe care doriţi să le de export, sau selectaţi un profil predefinit de export -SelectImportFields=Alegeţi câmpurile pe care doriţi să le import, sau a selecta un profil predefinit de import +SelectImportFields=Choose source file fields you want to import and their target field in database by moving them up and down with anchor %s, or select a predefined import profile: NotImportedFields=Domenii de fişier sursă nu importate SaveExportModel=Salvaţi acest profil de export dacă aveţi de gând să-l refolosire mai târziu ... SaveImportModel=Salvaţi acest profil de import dacă aveţi de gând să-l refolosire mai târziu ... @@ -81,7 +81,7 @@ DoNotImportFirstLine=Nu de import prima linie a fişierului sursă NbOfSourceLines=Numărul de linii în fişierul sursă NowClickToTestTheImport=Verificaţi parametrii de import aţi definit. Dacă sunt corecte, faceţi clic pe butonul "%s" pentru a lansa o simulare a procesului de import (nu există date va fi schimbat în baza de date, e doar o simulare pentru moment) ... RunSimulateImportFile=Lansarea simulare de import -FieldNeedSource=Acest lucru se simte in baza de date necesită o sursă de date de la dosar +FieldNeedSource=This field requires data from the source file SomeMandatoryFieldHaveNoSource=Unele câmpuri obligatorii nu au nicio sursă de date de la dosar InformationOnSourceFile=Informaţii privind fişier sursă InformationOnTargetTables=Informaţii privind domeniile-ţintă @@ -102,14 +102,14 @@ NbOfLinesImported=Numărul de linii cu succes importate: %s. DataComeFromNoWhere=Valoare pentru a introduce vine de nicăieri în fişierul sursă. DataComeFromFileFieldNb=Valoare pentru a introduce %s vine de la numărul de câmp în fişierul sursă. DataComeFromIdFoundFromRef=Valoare care vine de la %s numărul de câmp de fişier sursă vor fi utilizate pentru a găsi ID-ul de mamă obiectul pentru a utiliza (Deci %s Objet care a ref). Sursă de la dosar trebuie să există în Dolibarr. -# DataComeFromIdFoundFromCodeId=Code that comes from field number %s of source file will be used to find id of parent object to use (So the code from source file must exists into dictionary %s). Note that if you know id, you can also use it into source file instead of code. Import should work in both cases. +DataComeFromIdFoundFromCodeId=Code that comes from field number %s of source file will be used to find id of parent object to use (So the code from source file must exists into dictionary %s). Note that if you know id, you can also use it into source file instead of code. Import should work in both cases. DataIsInsertedInto=Datele provin din fişierul sursă va fi inserat în câmpul de următoarele: DataIDSourceIsInsertedInto=Id-ul de mamă obiect găsit folosind datele din fişierul sursă, vor fi inserate în câmpul următoarele: DataCodeIDSourceIsInsertedInto=ID-ul de linie de la mamă găsit codul, va fi introdus în câmpul următorul text: SourceRequired=valoarea datelor este obligatorie SourceExample=Exemplu de valoare posibilă de date ExampleAnyRefFoundIntoElement=Orice Ref gasit pentru %s element -# ExampleAnyCodeOrIdFoundIntoDictionary=Any code (or id) found into dictionary %s +ExampleAnyCodeOrIdFoundIntoDictionary=Any code (or id) found into dictionary %s CSVFormatDesc=Comma Separated Value formatul de fişier (). Csv.
    Acesta este un format de fişier text în care câmpurile sunt separate prin separatorul [%s]. În cazul în care se găseşte în interiorul separatorului cu un conţinut de domeniu, domeniu este rotunjit cu caracter rotunde [%s]. caracter Escape pentru a scăpa de caractere rundă este [%s]. Excel95FormatDesc=Excel format fişier (.xls)
    Acesta este format nativ Excel 95 (BIFF5). Excel2007FormatDesc=Excel format fişier (.xlsx)
    Acesta este format nativ Excel 2007 (SpreadsheetML). @@ -123,10 +123,10 @@ BankCode=Cod bancă DeskCode=Cod birou BankAccountNumber=Număr cont BankAccountNumberKey=Cheie -# SpecialCode=Special code -# ExportStringFilter=%% allows replacing one or more characters in the text -# ExportDateFilter='YYYY' 'YYYYMM' 'YYYYMMDD': filters by one year/month/day
    'YYYY+YYYY' 'YYYYMM+YYYYMM' 'YYYYMMDD+YYYYMMDD': filters over a range of years/months/days
    '>YYYY' '>YYYYMM' '>YYYYMMDD': filters on the following years/months/days
    '<YYYY' '<YYYYMM' '<YYYYMMDD': filters on the previous years/months/days -# ExportNumericFilter='NNNNN' filters by one value
    'NNNNN+NNNNN' filters over a range of values
    '>NNNNN' filters by lower values
    '>NNNNN' filters by higher values +SpecialCode=Special code +ExportStringFilter=%% allows replacing one or more characters in the text +ExportDateFilter='YYYY' 'YYYYMM' 'YYYYMMDD': filters by one year/month/day
    'YYYY+YYYY' 'YYYYMM+YYYYMM' 'YYYYMMDD+YYYYMMDD': filters over a range of years/months/days
    '>YYYY' '>YYYYMM' '>YYYYMMDD': filters on the following years/months/days
    '<YYYY' '<YYYYMM' '<YYYYMMDD': filters on the previous years/months/days +ExportNumericFilter='NNNNN' filters by one value
    'NNNNN+NNNNN' filters over a range of values
    '>NNNNN' filters by lower values
    '>NNNNN' filters by higher values ## filters SelectFilterFields=Dacă doriți să filtrați pe anumite valori, doar introduceţi valorile aici. FilterableFields=Câmpuri filtrabile diff --git a/htdocs/langs/ro_RO/holiday.lang b/htdocs/langs/ro_RO/holiday.lang index 6acc73503b0..2c0416d083a 100644 --- a/htdocs/langs/ro_RO/holiday.lang +++ b/htdocs/langs/ro_RO/holiday.lang @@ -8,7 +8,6 @@ NotActiveModCP=Trebuie să activaţi modulul de concedii pentru a vedea această NotConfigModCP=Trebuie să configuraţi modulul de concedii pentru a vedea această pagină.Pentru aceasta , clic aici . NoCPforUser=Nu aveţi o cerere de concediu. AddCP=Aplică pentru concediu -CPErrorSQL=O eroare SQL întâlnită Employe=Angajat DateDebCP=Dată început DateFinCP=Dată sfărşit diff --git a/htdocs/langs/ro_RO/languages.lang b/htdocs/langs/ro_RO/languages.lang index cc3b0453c06..0a3f12b9ef9 100644 --- a/htdocs/langs/ro_RO/languages.lang +++ b/htdocs/langs/ro_RO/languages.lang @@ -19,6 +19,7 @@ Language_en_SA=Engleză (Arabia Saudită) Language_en_US=Engleză (Statele Unite) Language_en_ZA=Engleză (Africa de Sud) Language_es_ES=Spaniolă +Language_es_DO=Spanish (Dominican Republic) Language_es_AR=Spaniolă (Argentina) Language_es_CL=Spanish (Chile) Language_es_HN=Spaniolă (Honduras) @@ -38,6 +39,7 @@ Language_fr_NC=Franceză (Noua Caledonie) Language_he_IL=Ebraică Language_hr_HR=Croat Language_hu_HU=Maghiară +Language_id_ID=Indonesian Language_is_IS=Islandeză Language_it_IT=Italiană Language_ja_JP=Japoneză diff --git a/htdocs/langs/ro_RO/mails.lang b/htdocs/langs/ro_RO/mails.lang index a26217f944c..e5394eeffc5 100644 --- a/htdocs/langs/ro_RO/mails.lang +++ b/htdocs/langs/ro_RO/mails.lang @@ -79,6 +79,7 @@ MailtoEMail=Hyper link către email ActivateCheckRead=Permite utiliyarea linkului "Dezabonare" ActivateCheckReadKey=Utilizaţi cheia pentru a cripta URL-ul folosit pentru funcţiunile "Confirmare de citire" și "Dezabonare" EMailSentToNRecipients=EMail trimis la %s destinatari. +XTargetsAdded=%s recipients added into target list EachInvoiceWillBeAttachedToEmail=A document using default invoice document template will be created and attached to each email. MailTopicSendRemindUnpaidInvoices=Reminder of invoice %s (%s) SendRemind=Send reminder by EMails diff --git a/htdocs/langs/ro_RO/main.lang b/htdocs/langs/ro_RO/main.lang index 13d0af526f5..14501d25c6a 100644 --- a/htdocs/langs/ro_RO/main.lang +++ b/htdocs/langs/ro_RO/main.lang @@ -34,7 +34,7 @@ ErrorFailedToOpenFile=Nu se poate deschide fișierul % s ErrorCanNotCreateDir=Nu se poate crea dir %s ErrorCanNotReadDir=Nu se poate citi dir %s ErrorConstantNotDefined=Parametrul %s nedefinit -ErrorUnknown=Unknown error +ErrorUnknown=Eroare Necunoscută ErrorSQL=Eroare SQL ErrorLogoFileNotFound=Fișierul logo '% s' nu a fost găsit ErrorGoToGlobalSetup=Du-te la Configurare "Societate / Fundație" pentru a rezolva aceasta @@ -60,8 +60,8 @@ ErrorNoSocialContributionForSellerCountry=Eroare, nici un tip de contribuții s ErrorFailedToSaveFile=Eroare, salvarea fişierului eşuată. ErrorOnlyPngJpgSupported=Eroare, numai formatele .jpg şi .png sunt acceptate. ErrorImageFormatNotSupported=PHP dvs nu acceptă funcții pentru a converti imagini de acest format. -SetDate=Set date -SelectDate=Select a date +SetDate=setează data +SelectDate=selectează data SeeAlso=Vezi şi %s BackgroundColorByDefault=Culoarea de fundal implicită FileWasNotUploaded=Un fișier este selectat pentru atașament, dar nu a fost încă încărcat. Clic pe "Ataşează fișier" pentru aceasta. @@ -94,7 +94,7 @@ InformationLastAccessInError=Informatii pentru ultima accesare eronată a bazei DolibarrHasDetectedError=Dolibarr a detectat o eroare tehnică InformationToHelpDiagnose=Informaţii ce pot ajuta la diagnosticare MoreInformation=Mai multe informaţii -TechnicalInformation=Technical information +TechnicalInformation=Informații Tehnice NotePublic=Notă (publică) NotePrivate=Notă (privată) PrecisionUnitIsLimitedToXDecimals=Dolibarr a fost de configurat pentru o limita de precizie pentru prețuri unitare la% s zecimale. @@ -206,7 +206,7 @@ Limit=Limita Limits=Limite DevelopmentTeam=Echipa de dezvoltare Logout=Deconectare -NoLogoutProcessWithAuthMode=No applicative disconnect feature with authentication mode %s +NoLogoutProcessWithAuthMode=Nu există funcție de deconectare ce poate fi aplicată cu modul de autentificare %s Connection=Conexiune Setup=Setări Alert=Alerta @@ -261,8 +261,8 @@ Seconds=Secunde Today=Azi Yesterday=Ieri Tomorrow=Mâine -Morning=Morning -Afternoon=Afternoon +Morning=Dimineață +Afternoon=După amiază Quadri=Trimestru MonthOfDay=Luna curentă HourShort=H @@ -315,7 +315,7 @@ SubTotal=Subtotal TotalHTShort=Total (net) TotalTTCShort=Total (inc. tax) TotalHT=Total (net ) -TotalHTforthispage=Total (net of tax) for this page +TotalHTforthispage=Total (net din taxe) pentru această pagină TotalTTC=Total (inc. tax) TotalTTCToYourCredit=Total (taxa Inc) în creditul dvs TotalVAT=Total TVA @@ -551,6 +551,7 @@ MailSentBy=E-mail trimis de TextUsedInTheMessageBody=Continut Email SendAcknowledgementByMail=Trimite A.R. prin e-mail NoEMail=Nici un email +NoMobilePhone=Fără număr mobil Owner=Proprietar DetectedVersion=Versiunea Detectată FollowingConstantsWillBeSubstituted=Următoarele constante vor fi înlocuite cu valoarea corespunzătoare. @@ -576,7 +577,7 @@ TotalWoman=Total TotalMan=Total NeverReceived=Niciodată primit Canceled=Anulat -YouCanChangeValuesForThisListFromDictionarySetup=You can change values for this list from menu setup - dictionary +YouCanChangeValuesForThisListFromDictionarySetup=Se pot schimba valorile pentru această listă din meniul setări - dicționar Color=Culoare Documents=Fişiere ataşate DocumentsNb=Fişiere ataşate (%s) @@ -605,8 +606,8 @@ Notes=Note AddNewLine=Adaugă linie nouă AddFile=Adaugă fişier ListOfFiles=Lista fişiere disponibile -FreeZone=Free entry -FreeLineOfType=Free entry of type +FreeZone=Câmp liber de modificat +FreeLineOfType=Câmp liber de introdus CloneMainAttributes=Clonează obiect cu atributele sale principale PDFMerge=Îmbină PDF Merge=Îmbină @@ -670,9 +671,9 @@ HelpCopyToClipboard=Utilizați Ctrl + C pentru a copia în clipboard SaveUploadedFileWithMask=Salvați fișierul pe server cu numele "%s" (altfel"%s") OriginFileName=Nume fişier original SetDemandReason=Setează sursa -ViewPrivateNote=View notes -XMoreLines=%s line(s) hidden -PublicUrl=Public URL +ViewPrivateNote=Vezi notițe +XMoreLines=%s linii(e) ascunse +PublicUrl=URL Public # Week day Monday=Luni diff --git a/htdocs/langs/ro_RO/products.lang b/htdocs/langs/ro_RO/products.lang index 6d9e9afc9c7..1ea8aa11a31 100644 --- a/htdocs/langs/ro_RO/products.lang +++ b/htdocs/langs/ro_RO/products.lang @@ -28,8 +28,10 @@ ProductsAndServicesStatistics=Statistici Produse si Servicii ProductsStatistics=Statistici Produse ProductsOnSell=Produse disponibile ProductsNotOnSell=Produse fără mişcare +ProductsOnSellAndOnBuy=Products not for sale nor purchase ServicesOnSell=Servicii disponibile ServicesNotOnSell=Servicii fără miscare +ServicesOnSellAndOnBuy=Services not for sale nor purchase InternalRef=Referinţă internă LastRecorded=Ultimele produse / servicii disponibile înregistrate LastRecordedProductsAndServices=Ultimele %s produse / servicii înregistrate @@ -70,6 +72,8 @@ PublicPrice=Preţ Public CurrentPrice=Preţ curent NewPrice=Preţ nou MinPrice=Preţ min. vânzare +MinPriceHT=Minim. selling price (net of tax) +MinPriceTTC=Minim. selling price (inc. tax) CantBeLessThanMinPrice=Prețul de vânzare nu poate fi mai mic decât minimul permis pentru acest produs (% s fără taxe). Acest mesaj poate apărea, de asemenea, dacă tastați o reducere prea important. ContractStatus=Status Contract ContractStatusClosed=Închis @@ -179,6 +183,7 @@ ProductIsUsed=Acest produs este utilizat NewRefForClone=Ref. de produs / serviciu nou CustomerPrices=Preţuri Clienţii SuppliersPrices=Preţuri Furnizori +SuppliersPricesOfProductsOrServices=Suppliers prices (of products or services) CustomCode=Codul vamal CountryOrigin=Ţara de origine HiddenIntoCombo=Ascuns în liste selectaţi @@ -208,6 +213,7 @@ CostPmpHT=Net total VWAP ProductUsedForBuild=Autoconsum de producție ProductBuilded=Producţie completată ProductsMultiPrice=Produse preţ multiplu +ProductsOrServiceMultiPrice=Customers prices (of products or services, multi-prices) ProductSellByQuarterHT=Cifra de afaceri trimestrială a produselor VWAP ServiceSellByQuarterHT=Cifra de afaceri trimestrială servicii VWAP Quarter1=Trimestru 1. diff --git a/htdocs/langs/ro_RO/shop.lang b/htdocs/langs/ro_RO/shop.lang index f28160da802..cb9e5b921e4 100644 --- a/htdocs/langs/ro_RO/shop.lang +++ b/htdocs/langs/ro_RO/shop.lang @@ -1,4 +1,5 @@ # Dolibarr language file - Source file is en_US - shop +FailedConnectDBCheckModuleSetup=Failed to connect to oscommerce database. Check your module setup Shop=Shop ShopWeb=Web Shop LastOrders=Ultima ordinelor diff --git a/htdocs/langs/ro_RO/stocks.lang b/htdocs/langs/ro_RO/stocks.lang index c45b7d60915..832754a5978 100644 --- a/htdocs/langs/ro_RO/stocks.lang +++ b/htdocs/langs/ro_RO/stocks.lang @@ -112,6 +112,7 @@ ReplenishmentOrdersDesc=Aceasta este lista cu toate comenzile furnizor deschise Replenishments=Reaprovizionări NbOfProductBeforePeriod=Cantitatea de produs %s în stoc înainte de perioada selectată (< %s) NbOfProductAfterPeriod=Cantitatea de produs %s în stoc după perioada selectată (> %s) +MassMovement=Mass movement MassStockMovement=Transfer stoc în masă SelectProductInAndOutWareHouse=Selectați un produs, o cantitate, un depozit sursă și un depozit țintă, apoi faceți clic pe"%s". Odată făcut acest lucru pentru toate transferurile cerute, faceți clic pe "%s". RecordMovement=Înregistrare transfer diff --git a/htdocs/langs/ru_RU/admin.lang b/htdocs/langs/ru_RU/admin.lang index 61cd625c4ca..7f1b4575f58 100644 --- a/htdocs/langs/ru_RU/admin.lang +++ b/htdocs/langs/ru_RU/admin.lang @@ -116,7 +116,7 @@ LanguageBrowserParameter=Параметр %s LocalisationDolibarrParameters=Параметры локализации ClientTZ=Часовой пояс пользователя ClientHour=Время клиента (пользователя) -OSTZ=Time Zone операционной системы +OSTZ=Server OS Time Zone PHPTZ=Time Zone PHP сервера PHPServerOffsetWithGreenwich=Сдвиг времени PHP сервера по отношению к Гринвичу (в секундах) ClientOffsetWithGreenwich=Сдвиг времени браузера / Клиента по отношению к Гринвичу (в секундах) @@ -233,7 +233,9 @@ OfficialWebSiteFr=Французский официальный веб-сайт OfficialWiki=Dolibarr Wiki OfficialDemo=Dolibarr Online Demo OfficialMarketPlace=Официальный рынок внешних модулей / дополнений -OfficialWebHostingService=Услуги официального хостинга (Облачный хостинг) +OfficialWebHostingService=Referenced web hosting services (Cloud hosting) +ReferencedPreferredPartners=Preferred Partners +OtherResources=Autres ressources ForDocumentationSeeWiki=Для документации пользователя или разработчика (Doc, FAQs...),
    взгляните на Dolibarr Wiki:
    %s ForAnswersSeeForum=Для любых других вопросов / помощи, вы можете использовать Dolibarr форум:
    %s HelpCenterDesc1=Этот раздел может помочь вам получить помощь службы поддержки по Dolibarr. @@ -369,9 +371,9 @@ ExtrafieldSelectList = Select from table ExtrafieldSeparator=Разделитель ExtrafieldCheckBox=Checkbox ExtrafieldRadio=Radio button -ExtrafieldParamHelpselect=Parameters list have to be like key,value

    for exemple :
    1,value1
    2,value2
    3,value3
    ...

    In order to have the list depending on another :
    1,value1|parent_list_code:parent_key
    2,value2|parent_list_code:parent_key -ExtrafieldParamHelpcheckbox=Parameters list have to be like key,value

    for exemple :
    1,value1
    2,value2
    3,value3
    ... -ExtrafieldParamHelpradio=Parameters list have to be like key,value

    for exemple :
    1,value1
    2,value2
    3,value3
    ... +ExtrafieldParamHelpselect=Parameters list have to be like key,value

    for example :
    1,value1
    2,value2
    3,value3
    ...

    In order to have the list depending on another :
    1,value1|parent_list_code:parent_key
    2,value2|parent_list_code:parent_key +ExtrafieldParamHelpcheckbox=Parameters list have to be like key,value

    for example :
    1,value1
    2,value2
    3,value3
    ... +ExtrafieldParamHelpradio=Parameters list have to be like key,value

    for example :
    1,value1
    2,value2
    3,value3
    ... ExtrafieldParamHelpsellist=Parameters list comes from a table
    Syntax : table_name:label_field:id_field::filter
    Example : c_typent:libelle:id::filter

    filter can be a simple test (eg active=1) to display only active value
    if you want to filter on extrafields use syntaxt extra.fieldcode=... (where field code is the code of extrafield)

    In order to have the list depending on another :
    c_typent:libelle:id:parent_list_code|parent_column:filter LibraryToBuildPDF=Библиотека, использованная для генерации PDF WarningUsingFPDF=Warning: Your conf.php contains directive dolibarr_pdf_force_fpdf=1. This means you use the FPDF library to generate PDF files. This library is old and does not support a lot of features (Unicode, image transparency, cyrillic, arab and asiatic languages, ...), so you may experience errors during PDF generation.
    To solve this and have a full support of PDF generation, please download TCPDF library, then comment or remove the line $dolibarr_pdf_force_fpdf=1, and add instead $dolibarr_lib_TCPDF_PATH='path_to_TCPDF_dir' @@ -472,7 +474,7 @@ Module410Desc=Webcalendar интеграции Module500Name=Special expenses (tax, social contributions, dividends) Module500Desc=Management of special expenses like taxes, social contribution, dividends and salaries Module510Name=Зарплаты -Module510Desc=Управление зарплатой и выплатами сотрудникам +Module510Desc=Management of employees salaries and payments Module600Name=Уведомления Module600Desc=Отправить уведомления (по электронной почте) о Dolibarr деловых мероприятий Module700Name=Пожертвования @@ -495,15 +497,15 @@ Module2400Name=Повестка дня Module2400Desc=Деятельность / задачи и программы управления Module2500Name=Электронное управление Module2500Desc=Сохранение и обмен документами -Module2600Name= WebServices -Module2600Desc= Включить сервер услуг Dolibarr Сети -Module2700Name= Gravatar -Module2700Desc= Использование онлайн Gravatar службы (www.gravatar.com), чтобы показать фото пользователей / участников (нашли с их электронной почты). Необходимость доступа в Интернет +Module2600Name=WebServices +Module2600Desc=Включить сервер услуг Dolibarr Сети +Module2700Name=Gravatar +Module2700Desc=Использование онлайн Gravatar службы (www.gravatar.com), чтобы показать фото пользователей / участников (нашли с их электронной почты). Необходимость доступа в Интернет Module2800Desc=FTP Client -Module2900Name= GeoIPMaxmind -Module2900Desc= GeoIP MaxMind возможности преобразования -Module3100Name= Skype -Module3100Desc= Add a Skype button into card of adherents / third parties / contacts +Module2900Name=GeoIPMaxmind +Module2900Desc=GeoIP MaxMind возможности преобразования +Module3100Name=Skype +Module3100Desc=Add a Skype button into card of adherents / third parties / contacts Module5000Name=Multi-компании Module5000Desc=Позволяет управлять несколькими компаниями Module6000Name=Бизнес-Процесс @@ -681,6 +683,10 @@ Permission401=Читать скидки Permission402=Создать / изменить скидки Permission403=Проверить скидку Permission404=Удалить скидки +Permission510=Read Salaries +Permission512=Create/modify salaries +Permission514=Delete salaries +Permission517=Export salaries Permission531=Читать услуги Permission532=Создать / изменить услуг Permission534=Удаление услуги @@ -999,7 +1005,7 @@ ExtraFieldsSupplierOrders=Дополнительные атрибуты (Зак ExtraFieldsSupplierInvoices=Дополнительные атрибуты (Счета-фактуры) ExtraFieldsProject=Дополнительные атрибуты (Проекты) ExtraFieldsProjectTask=Дополнительные атрибуты (Задачи) -ExtraFieldHasWrongValue=Обуслов %s имеет неверное значение. +ExtraFieldHasWrongValue=Attribute %s has a wrong value. AlphaNumOnlyCharsAndNoSpace=только буквы и цифры без пробелов AlphaNumOnlyLowerCharsAndNoSpace=только латинские строчные буквы и цифры без пробелов SendingMailSetup=Настройка отправки по электронной почте @@ -1018,13 +1024,13 @@ SuhosinSessionEncrypt=Session storage encrypted by Suhosin ConditionIsCurrently=Condition is currently %s TestNotPossibleWithCurrentBrowsers=Автоматическое определение невозможно YouUseBestDriver=Вы используете драйвер %s, который на текущий момент является самым подходящим -YouDoNotUseBestDriver=Вы используете драйвер %s, но рекомендуется использовать %s. +YouDoNotUseBestDriver=You use drive %s but driver %s is recommended. NbOfProductIsLowerThanNoPb=У вас только %s Товаров/Услуг в базе данных. Это не требует никакой оптимизации. SearchOptim=Search optimization YouHaveXProductUseSearchOptim=You have %s product into database. You should add the constant PRODUCT_DONOTSEARCH_ANYWHERE to 1 into Home-Setup-Other, you limit the search to the beginning of strings making possible for database to use index and you should get an immediate response. BrowserIsOK=You are using the web browser %s. This browser is ok for security and performance. BrowserIsKO=You are using the web browser %s. This browser is known to be a bad choice for security, performance and reliability. We recommand you to use Firefox, Chrome, Opera or Safari. -XDebugInstalled=XDebug est chargé. +XDebugInstalled=XDebug is loaded. XCacheInstalled=XCache is loaded. AddRefInList=Display customer/supplier ref into list (select list or combobox) and most of hyperlink FieldEdition=Edition of field %s @@ -1073,7 +1079,7 @@ WebCalServer=Сервер хостинга календарных данных WebCalDatabaseName=Название базы данных WebCalUser=Пользователя для доступа к базе данных WebCalSetupSaved=Webcalendar настройки успешно сохранены. -WebCalTestOk=Соединение с сервером ' %s' на базе ' %s' пользователя ' %s' успешно. +WebCalTestOk=Connection to server '%s' on database '%s' with user '%s' successful. WebCalTestKo1=Соединение с сервером ' %s' успешными, но база данных ' %s' не может быть достигнута. WebCalTestKo2=Соединение с сервером ' %s' пользователя ' %s' провалилась. WebCalErrorConnectOkButWrongDatabase=Подключение удалось, но база данных не будет смотреть Webcalendar данных. @@ -1119,7 +1125,7 @@ WatermarkOnDraftProposal=Водяные знаки на черновиках К OrdersSetup=Приказ 'Management Setup OrdersNumberingModules=Приказы нумерации модулей OrdersModelModule=Заказ документов моделей -HideTreadedOrders=Скрыть лечение или отменены заказов в списке +HideTreadedOrders=Hide the treated or cancelled orders in the list ValidOrderAfterPropalClosed=Чтобы проверить порядок после предложения ближе, позволяет не шаг за временное распоряжение FreeLegalTextOnOrders=Свободный текст распоряжения WatermarkOnDraftOrders=Водяные знаки на черновиках Заказов ("Нет" если пусто) @@ -1214,9 +1220,9 @@ LDAPSynchroKO=Сбой синхронизации тест LDAPSynchroKOMayBePermissions=Сбой синхронизации испытания. Убедитесь, что соединение с сервером правильно настроен, и позволяет LDAP udpates LDAPTCPConnectOK=TCP connect to LDAP server successful (Server=%s, Port=TCP соединение с сервером LDAP успешного (Server= %s, Порт= %s) LDAPTCPConnectKO=TCP connect to LDAP server failed (Server=%s, Port=TCP соединение с сервером LDAP Failed (Server= %s, Порт= %s) -LDAPBindOK=Connect/Authentificate to LDAP server sucessfull (Server=%s, Port=%s, Admin=%s, Password=Подключение / Authentificate LDAP сервер для успешного (Server= %s, Порт= %s, Admin= %s, Пароль= %s) +LDAPBindOK=Connect/Authentificate to LDAP server successful (Server=%s, Port=%s, Admin=%s, Password=%s) LDAPBindKO=Connect/Authentificate to LDAP server failed (Server=%s, Port=%s, Admin=%s, Password=Подключение / Authentificate для LDAP-сервера Ошибка (Server= %s, Порт= %s, Admin= %s, Пароль= %s) -LDAPUnbindSuccessfull=Разъединить успешной +LDAPUnbindSuccessfull=Disconnect successful LDAPUnbindFailed=Разъединить Failed LDAPConnectToDNSuccessfull=Подключение АС Д.Н. ( %s) Russie LDAPConnectToDNFailed=Подключение АС Д.Н. ( %s) choue @@ -1273,7 +1279,7 @@ LDAPFieldSidExample=Пример: objectsid LDAPFieldEndLastSubscription=Дата окончания подписки LDAPFieldTitle=Должность/Функция LDAPFieldTitleExample=Example: title -LDAPParametersAreStillHardCoded=LDAP параметры по-прежнему жестко (в контакт-класс) +LDAPParametersAreStillHardCoded=LDAP parameters are still hardcoded (in contact class) LDAPSetupNotComplete=Установка не завершена (переход на другие вкладки) LDAPNoUserOrPasswordProvidedAccessIsReadOnly=Нет администратора или пароль предусмотрено. LDAP доступ будет анонимным и в режиме только для чтения. LDAPDescContact=Эта страница позволяет определить название атрибутов LDAP в LDAP дерева для каждого данных по Dolibarr контакты. @@ -1429,7 +1435,7 @@ OptionVATDefault=Стандартный OptionVATDebitOption=Вариант услуги сюр дебет OptionVatDefaultDesc=НДС из-за:
    - По доставке / оплате товаров
    - На оплату услуг OptionVatDebitOptionDesc=НДС из-за:
    - По доставке / оплате товаров
    - На счета (дебетовой) на услуги -SummaryOfVatExigibilityUsedByDefault=Время НДС exigibility по умолчанию в соответствии с выбранным вариантом: +SummaryOfVatExigibilityUsedByDefault=Time of VAT exigibility by default according to chosen option: OnDelivery=О доставке OnPayment=Об оплате OnInvoice=В счете-фактуре @@ -1446,7 +1452,7 @@ AccountancyCodeBuy=Purchase account. code AgendaSetup=Акции и повестки модуль настройки PasswordTogetVCalExport=Ключевые разрешить экспорт ссылке PastDelayVCalExport=Не экспортировать события старше -AGENDA_USE_EVENT_TYPE=Use events types (managed into menu Setup -> Dictionnary -> Type of agenda events) +AGENDA_USE_EVENT_TYPE=Use events types (managed into menu Setup -> Dictionary -> Type of agenda events) ##### ClickToDial ##### ClickToDialDesc=Этот модуль позволяет добавлять иконки после телефонный номер Dolibarr контакты. Нажмите на эту иконку, будем называть serveur с определенным URL вы указываете ниже. Это может быть использовано для вызова Call Center с системой Dolibarr, что можете позвонить по телефону SIP системы например. ##### Point Of Sales (CashDesk) ##### diff --git a/htdocs/langs/ru_RU/bills.lang b/htdocs/langs/ru_RU/bills.lang index 0182295522b..c8b59f92d08 100644 --- a/htdocs/langs/ru_RU/bills.lang +++ b/htdocs/langs/ru_RU/bills.lang @@ -66,7 +66,7 @@ ConfirmConvertToReduc=Вы хотите перевести это кредито SupplierPayments=Платежи Поставщикам ReceivedPayments=Полученные платежи ReceivedCustomersPayments=Платежи, полученные от покупателей -PayedSuppliersPayments=Payments payed to suppliers +PayedSuppliersPayments=Платежи, отправленные поставщикам ReceivedCustomersPaymentsToValid=Полученные платежи покупателей для подтверждения PaymentsReportsForYear=Отчеты о платежах за %s PaymentsReports=Отчеты о платежах @@ -364,7 +364,7 @@ LawApplicationPart2=товары остаются в собственности LawApplicationPart3=продавца до полной оплаты LawApplicationPart4=их стоимости. LimitedLiabilityCompanyCapital=SARL с капиталом -UseLine=Apply +UseLine=Применить UseDiscount=Использовать скидку UseCredit=Использовать кредит UseCreditNoteInInvoicePayment=Уменьшить сумму к оплате по этому кредиту diff --git a/htdocs/langs/ru_RU/boxes.lang b/htdocs/langs/ru_RU/boxes.lang index 250a672a2e8..eacd9d94a10 100644 --- a/htdocs/langs/ru_RU/boxes.lang +++ b/htdocs/langs/ru_RU/boxes.lang @@ -3,7 +3,7 @@ BoxLastRssInfos=Информация RSS BoxLastProducts=Последние %s товары / услуги BoxProductsAlertStock=Products in stock alert BoxLastProductsInContract=Последние %s проданные товары / услуги -BoxLastSupplierBills=Последние счета-фактуры поставщиков +BoxLastSupplierBills=Последние счета-фактуры от поставщиков BoxLastCustomerBills=Последние счета-фактуры покупателям BoxOldestUnpaidCustomerBills=Самые старые неоплаченные счета-фактуры покупателям BoxOldestUnpaidSupplierBills=Самые старые неоплаченные счета-фактуры поставщиков @@ -24,7 +24,7 @@ BoxTotalUnpaidCustomerBills=Общая сумма неоплаченных сч BoxTotalUnpaidSuppliersBills=Общая сумма неоплаченных счетов-фактур поставщиков BoxTitleLastBooks=Последние %s зарегистрированных сделок BoxTitleNbOfCustomers=Кол-во покупателей -BoxTitleLastRssInfos=Последние новости %s из %s +BoxTitleLastRssInfos=Последние %s новостей от %s BoxTitleLastProducts=Последние %s измененные товары / услуги BoxTitleProductsAlertStock=Products in stock alert BoxTitleLastCustomerOrders=Последние %s измененные заказы покупателей diff --git a/htdocs/langs/ru_RU/commercial.lang b/htdocs/langs/ru_RU/commercial.lang index 4325bcb1d1c..819b4a8fe6a 100644 --- a/htdocs/langs/ru_RU/commercial.lang +++ b/htdocs/langs/ru_RU/commercial.lang @@ -15,7 +15,7 @@ AddActionRendezVous=Добавить рандеву задачи Rendez-Vous=Свидание ConfirmDeleteAction=Вы уверены, что хотите удалить эту задачу? CardAction=Действия карточки -PercentDone=Процент сделали +PercentDone=Процент завершенности ActionOnCompany=Задача о компании ActionOnContact=Задача о контакте TaskRDV=Встречи @@ -25,7 +25,7 @@ ShowAction=Показать действий ActionsReport=Действия доклад ThirdPartiesOfSaleRepresentative=Контрагенты с торговым представителем SalesRepresentative=Торговый представитель -SalesRepresentatives=Представители по продажам +SalesRepresentatives=Торговые представители SalesRepresentativeFollowUp=Представитель по продажам (последующих) SalesRepresentativeSignature=Торговый представитель (подпись) CommercialInterlocutor=Коммерческая собеседник @@ -35,7 +35,7 @@ ShowCustomer=Показать заказчика ShowProspect=Показать проспект ListOfProspects=Список перспективы ListOfCustomers=Список клиентов -LastDoneTasks=Последнее %s сделали задач +LastDoneTasks=Последние %s завершенных задач LastRecordedTasks=Последние зарегистрированные задач LastActionsToDo=Последнее %s старейших действия не завершены DoneAndToDoActionsFor=Составлено и делать задач %s @@ -68,7 +68,7 @@ ActionUserAsk=Зарегистрировано ErrorStatusCantBeZeroIfStarted=Если поле 'Дата сделали' заполнен, действие начинается (или закончили), так что поле "Статус" не может быть 0%%. ActionAC_TEL=Телефонный звонок ActionAC_FAX=Отправить факс -ActionAC_PROP=Отправить предложение +ActionAC_PROP=Отправить предложение по Email ActionAC_EMAIL=Отправить электронное письмо ActionAC_RDV=Встречи ActionAC_FAC=Отправить платежную @@ -80,9 +80,9 @@ ActionAC_SHIP=Отправить доставку по почте ActionAC_SUP_ORD=Отправить поставщиком заказы по почте ActionAC_SUP_INV=Отправить поставщиком счета по почте ActionAC_OTH=Другой -ActionAC_OTH_AUTO=Other (automatically inserted events) -ActionAC_MANUAL=Manually inserted events -ActionAC_AUTO=Automatically inserted events +ActionAC_OTH_AUTO=Другие (мероприятия, созданные автоматически) +ActionAC_MANUAL=Мероприятия, созданные вручную +ActionAC_AUTO=Мероприятия созданные автоматически Stats=Статистика продаж CAOrder=Объем продаж (подтвержденные заказы) FromTo=от %s к %s diff --git a/htdocs/langs/ru_RU/compta.lang b/htdocs/langs/ru_RU/compta.lang index 7c5fcbd4f57..9ca829464a8 100644 --- a/htdocs/langs/ru_RU/compta.lang +++ b/htdocs/langs/ru_RU/compta.lang @@ -41,7 +41,7 @@ VATToCollect=НДС для сбора VATSummary=НДС Резюме LT2SummaryES=IRPF баланс VATPaid=НДС оплачивается -SalaryPaid=Salary paid +SalaryPaid=Зарплата выплачена LT2PaidES=Платные IRPF LT2CustomerES=IRPF продаж LT2SupplierES=IRPF покупки diff --git a/htdocs/langs/ru_RU/contracts.lang b/htdocs/langs/ru_RU/contracts.lang index 41990517a16..158bfa2048b 100644 --- a/htdocs/langs/ru_RU/contracts.lang +++ b/htdocs/langs/ru_RU/contracts.lang @@ -89,6 +89,8 @@ ListOfServicesToExpireWithDuration=Список услуг, истекающих ListOfServicesToExpireWithDurationNeg=List of Services expired from more than %s days ListOfServicesToExpire=Список истекающих услуг NoteListOfYourExpiredServices=Этот список содержит только услуги по договорам с Контрагентами, с которыми связаны как торговый представитель +StandardContractsTemplate=Standard contracts template +ContactNameAndSignature=For %s, name and signature: ##### Types de contacts ##### TypeContact_contrat_internal_SALESREPSIGN=Торговый представитель подписания контракта diff --git a/htdocs/langs/ru_RU/errors.lang b/htdocs/langs/ru_RU/errors.lang index 7a870cf1dd3..476a73e6e4a 100644 --- a/htdocs/langs/ru_RU/errors.lang +++ b/htdocs/langs/ru_RU/errors.lang @@ -23,23 +23,23 @@ ErrorThisContactIsAlreadyDefinedAsThisType=Этот контакт уже опр ErrorCashAccountAcceptsOnlyCashMoney=Этот банковский счет определен как счет для наличных, так что он принимает только наличные платежи. ErrorFromToAccountsMustDiffers=Источник и цели банковского счета должны быть разными. ErrorBadThirdPartyName=Неправильное значение для имени контрагента -ErrorProdIdIsMandatory=The %s is mandatory +ErrorProdIdIsMandatory=%s является обязательным ErrorBadCustomerCodeSyntax=Плохо синтаксис для заказчика код ErrorBadBarCodeSyntax=Bad syntax for bar code -ErrorCustomerCodeRequired=Клиенту требуется код +ErrorCustomerCodeRequired=Требуется код клиента ErrorBarCodeRequired=Bar code required -ErrorCustomerCodeAlreadyUsed=Клиент код уже используется +ErrorCustomerCodeAlreadyUsed=Код клиента уже используется ErrorBarCodeAlreadyUsed=Bar code already used ErrorPrefixRequired=Префикс обязателен ErrorUrlNotValid=Адрес веб-сайта является неверным ErrorBadSupplierCodeSyntax=Плохо синтаксис поставщиком код -ErrorSupplierCodeRequired=Поставщик код необходимо -ErrorSupplierCodeAlreadyUsed=Поставщик код уже используется +ErrorSupplierCodeRequired=Требуется код Поставщика +ErrorSupplierCodeAlreadyUsed=Код Поставщика уже используется ErrorBadParameters=Неверные параметры ErrorBadValueForParameter=Неверное значение %s для параметра неправильной %s ErrorBadImageFormat=Файл изображения имеет не поддерживаемый формат ErrorBadDateFormat= Значение '%s' имеет неверный формат даты -ErrorWrongDate=Date is not correct! +ErrorWrongDate=Дата некорректна! ErrorFailedToWriteInDir=Не удалось записать в директорию %s ErrorFoundBadEmailInFile=Found incorrect email syntax for %s lines in file (example line %s with email=Найдено неверный электронный синтаксис% с линии в файл (например, строка %s с электронной почтой= %s) ErrorUserCannotBeDelete=Пользователь не может быть удален. Может быть, это связано в Dolibarr образований. @@ -74,7 +74,7 @@ ErrorCantSaveADoneUserWithZeroPercentage=Не удается сохранить ErrorRefAlreadyExists=Ссылки, используемые для создания, уже существует. ErrorPleaseTypeBankTransactionReportName=Введите название банка, где получение сделки (в формате ГГГГММ или ГГГГММДД) ErrorRecordHasChildren=Не удается удалить записи, поскольку он имеет некоторые хлеб. -ErrorRecordIsUsedCantDelete=Can't delete record. It is already used or included into other object. +ErrorRecordIsUsedCantDelete=Нельзя удалить запись. Она уже используется или включена в другой объект. ErrorModuleRequireJavascript=Javascript не должна быть отключена, чтобы эта функция работает. Чтобы включить / отключить Javascript, перейдите в меню Главная-> Настройка-> Экран. ErrorPasswordsMustMatch=Оба введенных пароля должны совпадать друг с другом ErrorContactEMail=Техническая ошибка. Пожалуйста, обратитесь к администратору следующую электронную почту %s ан обеспечить %s код ошибки в ваше сообщение, или даже лучше, добавив экран копию этой страницы. @@ -123,22 +123,22 @@ ErrorFileRequired=It takes a package Dolibarr file ErrorPhpCurlNotInstalled=The PHP CURL is not installed, this is essential to talk with Paypal ErrorFailedToAddToMailmanList=Failed to add record %s to Mailman list %s or SPIP base ErrorFailedToRemoveToMailmanList=Failed to remove record %s to Mailman list %s or SPIP base -ErrorNewValueCantMatchOldValue=New value can't be equal to old one +ErrorNewValueCantMatchOldValue=Новое значение не может быть равно старому ErrorFailedToValidatePasswordReset=Failed to reinit password. May be the reinit was already done (this link can be used only one time). If not, try to restart the reinit process. ErrorToConnectToMysqlCheckInstance=Connect to database fails. Check Mysql server is running (in most cases, you can launch it from command line with 'sudo /etc/init.d/mysql start'). -ErrorFailedToAddContact=Failed to add contact -ErrorDateMustBeBeforeToday=The date can not be greater than today +ErrorFailedToAddContact=Ошибка при добавлении контакта +ErrorDateMustBeBeforeToday=Дата не может быть больше сегодняшней ErrorPaymentModeDefinedToWithoutSetup=A payment mode was set to type %s but setup of module Invoice was not completed to define information to show for this payment mode. ErrorPHPNeedModule=Error, your PHP must have module %s installed to use this feature. ErrorOpenIDSetupNotComplete=You setup Dolibarr config file to allow OpenID authentication, but URL of OpenID service is not defined into constant %s ErrorWarehouseMustDiffers=Source and target warehouses must differs -ErrorBadFormat=Bad format! +ErrorBadFormat=Неправильный формат! ErrorPaymentDateLowerThanInvoiceDate=Payment date (%s) cant' be before invoice date (%s) for invoice %s. ErrorMemberNotLinkedToAThirpartyLinkOrCreateFirst=Error, this member is not yet linked to any thirdparty. Link member to an existing third party or create a new thirdparty before creating subscription with invoice. ErrorThereIsSomeDeliveries=Error, there is some deliveries linked to this shipment. Deletion refused. # Warnings -WarningMandatorySetupNotComplete=Mandatory setup parameters are not yet defined +WarningMandatorySetupNotComplete=Обязательные параметры не определены WarningSafeModeOnCheckExecDir=Предупреждение, PHP safe_mode вариант находится на так команда должна храниться в каталог заявил на PHP safe_mode_exec_dir параметра. WarningAllowUrlFopenMustBeOn=Параметр allow_url_fopen должен быть установлен на заполнителя в php.ini за этот модуль полностью рабочий. Вы должны изменить этот файл вручную. WarningBuildScriptNotRunned=Сценарий %s еще не побежал строить графики, или нет никаких данных, чтобы показать. diff --git a/htdocs/langs/ru_RU/exports.lang b/htdocs/langs/ru_RU/exports.lang index 24c2624a5ba..8e08fc9a1ab 100644 --- a/htdocs/langs/ru_RU/exports.lang +++ b/htdocs/langs/ru_RU/exports.lang @@ -8,7 +8,7 @@ ImportableDatas=ИМПОРТИРОВАННАЯ данных SelectExportDataSet=Выберите набор данных вы хотите экспортировать ... SelectImportDataSet=Выбор данных, вы хотите импортировать ... SelectExportFields=Выбрать поля, вы хотите экспортировать, или выбрать заранее экспортировать профиль -SelectImportFields=Выбрать поля, вы хотите импортировать, или выбрать заранее импорта профиль +SelectImportFields=Choose source file fields you want to import and their target field in database by moving them up and down with anchor %s, or select a predefined import profile: NotImportedFields=Области исходный файл не импортируется SaveExportModel=Сохранить этот экспортный профиль, если вы планируете использовать повторно момент ... SaveImportModel=Сохранить профиль импорт, если вы планируете использовать повторно момент ... @@ -64,7 +64,7 @@ ChooseFormatOfFileToImport=Выберите формат файла для ис ChooseFileToImport=Выберите файл для импорта выберите пункт о picto %s ... SourceFileFormat=Формат исходного файла FieldsInSourceFile=Поля в исходном файле -# FieldsInTargetDatabase=Target fields in Dolibarr database (bold=mandatory) +FieldsInTargetDatabase=Target fields in Dolibarr database (bold=mandatory) Field=Поле NoFields=Нет поля MoveField=Перемещение поля %s номер столбца @@ -81,7 +81,7 @@ DoNotImportFirstLine=Не импортировать первые строки NbOfSourceLines=Количество строк в исходном файле NowClickToTestTheImport=Проверить параметры импорта вы определили. Если они верны, нажмите на кнопку "%s", чтобы начать моделирование процесса импорта (данные не будут изменены в базе данных, это только имитация на данный момент) ... RunSimulateImportFile=Запуск импорта моделирования -FieldNeedSource=Это чувствует себя в базе данных требует данных из исходных файлов +FieldNeedSource=This field requires data from the source file SomeMandatoryFieldHaveNoSource=Некоторые обязательные поля не имеют источника из файла данных InformationOnSourceFile=Информация об исходном файле InformationOnTargetTables=Информация о целевых полей @@ -102,33 +102,33 @@ NbOfLinesImported=Количество линий успешно импорти DataComeFromNoWhere=Соотношение вставить приходит из ниоткуда в исходном файле. DataComeFromFileFieldNb=Соотношение вставить происходит от области число %s в исходном файле. DataComeFromIdFoundFromRef=Соотношение, что исходит от области число %s исходного файла будет использоваться, чтобы найти идентификатор родительского объекта для использования (так Objet %s которая исх. Из исходного файла должно существует в Dolibarr). -# DataComeFromIdFoundFromCodeId=Code that comes from field number %s of source file will be used to find id of parent object to use (So the code from source file must exists into dictionary %s). Note that if you know id, you can also use it into source file instead of code. Import should work in both cases. +DataComeFromIdFoundFromCodeId=Code that comes from field number %s of source file will be used to find id of parent object to use (So the code from source file must exists into dictionary %s). Note that if you know id, you can also use it into source file instead of code. Import should work in both cases. DataIsInsertedInto=Данные поступившие от исходного файла будет вставлено в следующее поле: DataIDSourceIsInsertedInto=Идентификатор родительского объекта найти с помощью данных в исходном файле, будут включены в следующие поля: DataCodeIDSourceIsInsertedInto=Идентификатор материнской линии обнаружил в коде, будут включены в следующее поле: SourceRequired=Данные значения является обязательным SourceExample=Пример возможных значений данных ExampleAnyRefFoundIntoElement=Любая ссылка на элемент найден %s -# ExampleAnyCodeOrIdFoundIntoDictionary=Any code (or id) found into dictionary %s +ExampleAnyCodeOrIdFoundIntoDictionary=Any code (or id) found into dictionary %s CSVFormatDesc=Разделителями-запятыми файл (формат. CSV).
    Это текстовый формат файла, в котором поля разделены сепаратором [%s]. Если разделитель находится внутри области содержания, поля окружены круглый характер [%s]. Escape характер бежать вокруг характер [%s]. -# Excel95FormatDesc=Excel file format (.xls)
    This is native Excel 95 format (BIFF5). -# Excel2007FormatDesc=Excel file format (.xlsx)
    This is native Excel 2007 format (SpreadsheetML). -# TsvFormatDesc=Tab Separated Value file format (.tsv)
    This is a text file format where fields are separated by a tabulator [tab]. -# ExportFieldAutomaticallyAdded=Field %s was automatically added. It will avoid you to have similar lines to be treated as duplicate records (with this field added, all lines will own their own id and will differ). -# CsvOptions=Csv Options -# Separator=Separator -# Enclosure=Enclosure -# SuppliersProducts=Suppliers Products +Excel95FormatDesc=Excel file format (.xls)
    This is native Excel 95 format (BIFF5). +Excel2007FormatDesc=Excel file format (.xlsx)
    This is native Excel 2007 format (SpreadsheetML). +TsvFormatDesc=Tab Separated Value file format (.tsv)
    This is a text file format where fields are separated by a tabulator [tab]. +ExportFieldAutomaticallyAdded=Field %s was automatically added. It will avoid you to have similar lines to be treated as duplicate records (with this field added, all lines will own their own id and will differ). +CsvOptions=Csv Options +Separator=Separator +Enclosure=Enclosure +SuppliersProducts=Suppliers Products BankCode=Код банка DeskCode=Код описания BankAccountNumber=Номер счета BankAccountNumberKey=Ключ -# SpecialCode=Special code -# ExportStringFilter=%% allows replacing one or more characters in the text -# ExportDateFilter='YYYY' 'YYYYMM' 'YYYYMMDD': filters by one year/month/day
    'YYYY+YYYY' 'YYYYMM+YYYYMM' 'YYYYMMDD+YYYYMMDD': filters over a range of years/months/days
    '>YYYY' '>YYYYMM' '>YYYYMMDD': filters on the following years/months/days
    '<YYYY' '<YYYYMM' '<YYYYMMDD': filters on the previous years/months/days -# ExportNumericFilter='NNNNN' filters by one value
    'NNNNN+NNNNN' filters over a range of values
    '>NNNNN' filters by lower values
    '>NNNNN' filters by higher values +SpecialCode=Special code +ExportStringFilter=%% allows replacing one or more characters in the text +ExportDateFilter='YYYY' 'YYYYMM' 'YYYYMMDD': filters by one year/month/day
    'YYYY+YYYY' 'YYYYMM+YYYYMM' 'YYYYMMDD+YYYYMMDD': filters over a range of years/months/days
    '>YYYY' '>YYYYMM' '>YYYYMMDD': filters on the following years/months/days
    '<YYYY' '<YYYYMM' '<YYYYMMDD': filters on the previous years/months/days +ExportNumericFilter='NNNNN' filters by one value
    'NNNNN+NNNNN' filters over a range of values
    '>NNNNN' filters by lower values
    '>NNNNN' filters by higher values ## filters -# SelectFilterFields=If you want to filter on some values, just input values here. -# FilterableFields=Champs Filtrables -# FilteredFields=Filtered fields -# FilteredFieldsValues=Value for filter +SelectFilterFields=If you want to filter on some values, just input values here. +FilterableFields=Champs Filtrables +FilteredFields=Filtered fields +FilteredFieldsValues=Value for filter diff --git a/htdocs/langs/ru_RU/externalsite.lang b/htdocs/langs/ru_RU/externalsite.lang index 334eaedf3f5..98e718918a3 100644 --- a/htdocs/langs/ru_RU/externalsite.lang +++ b/htdocs/langs/ru_RU/externalsite.lang @@ -1,4 +1,4 @@ # Dolibarr language file - Source file is en_US - externalsite ExternalSiteSetup=Установка ссылки на внешние веб-сайт -ExternalSiteURL=Внешний URL сайта -# ExternalSiteModuleNotComplete=Module ExternalSite was not configured properly. +ExternalSiteURL=URL внешнего сайта +ExternalSiteModuleNotComplete=Модуль ВнешнийСайт не был надлежащим образом настроен. diff --git a/htdocs/langs/ru_RU/holiday.lang b/htdocs/langs/ru_RU/holiday.lang index e4c56d0d971..0c48cd60953 100644 --- a/htdocs/langs/ru_RU/holiday.lang +++ b/htdocs/langs/ru_RU/holiday.lang @@ -8,7 +8,6 @@ NotActiveModCP=Вы должны включить модуль Выходные NotConfigModCP=You must configure the module holidays to view this page. To do this, click here . NoCPforUser=You don't have a demand for holidays. AddCP=Apply for holidays -CPErrorSQL=Произошла ошибка SQL: Employe=Сотрудник DateDebCP=Начальная дата DateFinCP=Конечная дата @@ -35,7 +34,7 @@ ErrorUserViewCP=У вас нет прав на просмотр списка в InfosCP=Information of the demand of holidays InfosWorkflowCP=Information Workflow RequestByCP=Requested by -TitreRequestCP=Sheet of holidays +TitreRequestCP=График отпусков NbUseDaysCP=Number of days of holidays consumed EditCP=Редактировать DeleteCP=Удалить @@ -82,7 +81,7 @@ NewSoldeCP=Новый баланс alreadyCPexist=A request for holidays has already been done on this period. UserName=Имя Employee=Сотрудник -FirstDayOfHoliday=Перввый день отпуска +FirstDayOfHoliday=Первый день отпуска LastDayOfHoliday=Последний день отпуска HolidaysMonthlyUpdate=Ежемесячное обновление ManualUpdate=Manual update diff --git a/htdocs/langs/ru_RU/install.lang b/htdocs/langs/ru_RU/install.lang index 15465f92682..aa17464f187 100644 --- a/htdocs/langs/ru_RU/install.lang +++ b/htdocs/langs/ru_RU/install.lang @@ -26,15 +26,15 @@ ErrorWrongValueForParameter=Вы ввели неправильное значе ErrorFailedToCreateDatabase=Не удается создать базу данных ' %s'. ErrorFailedToConnectToDatabase=Не удалось подключиться к базе данных ' %s'. ErrorDatabaseVersionTooLow=Версия базы данных (%s) слишком старая. Требуется версия %s или выше -ErrorPHPVersionTooLow=PHP версии слишком стар. Версия %s обязательна. -WarningPHPVersionTooLow=PHP версии слишком стар. Версия %s или более не ожидается. Эта версия должна позволить установить, но не поддерживается. +ErrorPHPVersionTooLow=Версия PHP слишком стара. Версия %s обязательна. +WarningPHPVersionTooLow=Версия PHP устарела. Желательна версия %s или новее. Текущая версия должна позволить установить, но не поддерживается. ErrorConnectedButDatabaseNotFound=Подключение к серверу базы данных, но успешным ' %s' не найден. ErrorDatabaseAlreadyExists=База данных ' %s' уже существует. IfDatabaseNotExistsGoBackAndUncheckCreate=Если база данных не существует, вернитесь назад и проверьте параметр "Создать базу данных". IfDatabaseExistsGoBackAndCheckCreate=Если база данных уже существует, вернитесь назад и снимите флажок "Создать базу данных" вариант. WarningBrowserTooOld=Слишком старая версия браузера. Настоятельно рекомендуем обновить до свежей версии Firefox, Chrom или Opera -PHPVersion=PHP Version -YouCanContinue=Вы можете продолжать ... +PHPVersion=Версия PHP +YouCanContinue=Вы можете продолжить ... PleaseBePatient=Пожалуйста, будьте терпеливы ... License=Использование лицензии ConfigurationFile=Файл конфигурации @@ -45,8 +45,8 @@ ForceHttps=Force sikre tilkoblinger (https) CheckToForceHttps=Sjekk dette alternativet for å tvinge sikre tilkoblinger (https).
    Dette krever at web-serveren er satt opp med en SSL-sertifikat. DolibarrDatabase=Dolibarr База данных DatabaseChoice=Выбор базы данных -DatabaseType=База данных типа -DriverType=Водитель типа +DatabaseType=Тип Базы данных +DriverType=Тип драйвера Server=Сервер ServerAddressDescription=Имя или IP-адрес сервера баз данных, как правило, 'локальный', когда сервер базы данных размещается на одном сервере, чем веб-сервер ServerPortDescription=База данных сервера порт. Держите пустым, если неизвестно. @@ -56,7 +56,7 @@ DatabasePrefix=Таблица базы данных префиксов Login=Войти AdminLogin=Логин Dolibarr для администратора базы данных. Держите пустым, если вы подключаетесь в анонимном Password=Пароль -PasswordAgain=Повторите пароль еще раз +PasswordAgain=Введите пароль еще раз AdminPassword=Пароль Dolibarr для администратора базы данных. Держите пустым, если вы подключаетесь в анонимном CreateDatabase=Создание базы данных CreateUser=Создать пользователя @@ -66,25 +66,25 @@ CheckToCreateUser=Флажок, если логин не существует и Experimental=(экспериментальная, не действуют) DatabaseRootLoginDescription=Войти на пользователя разрешается создавать новые базы данных и новых пользователей, бесполезны, если ваша база данных, и ваша база данных логин уже существует (например, когда вы Хостинг провайдер веб-хостинга). KeepEmptyIfNoPassword=Оставьте пустым, если пользователь не имеет пароля (избежать этого) -SaveConfigurationFile=Сохранить ценности +SaveConfigurationFile=Сохранить значения ConfigurationSaving=Сохранение файла конфигурации ServerConnection=Сервер связи DatabaseConnection=Подключение к базе данных DatabaseCreation=Создание базы данных UserCreation=Создание пользователя -CreateDatabaseObjects=База данных объектов, создание +CreateDatabaseObjects=Создание объектов базы данных ReferenceDataLoading=Исходные данные погрузки -TablesAndPrimaryKeysCreation=Столы и создания первичных ключей +TablesAndPrimaryKeysCreation=Создание таблиц и первичных ключей CreateTableAndPrimaryKey=CREATE TABLE %s CreateOtherKeysForTable=Создать внешние ключи и индексы для таблицы %s -OtherKeysCreation=Внешние ключи и индексы в создании +OtherKeysCreation=Создание внешних ключей и индексов FunctionsCreation=Функции создания -AdminAccountCreation=Администратор логин создания +AdminAccountCreation=Создание логина Администратора PleaseTypePassword=Пожалуйста, введите пароль, пустые пароли не допускаются! PleaseTypeALogin=Пожалуйста, введите логин! PasswordsMismatch=Пароли отличается, пожалуйста, попробуйте еще раз! SetupEnd=Окончание установки -SystemIsInstalled=Эта установка будет завершена. +SystemIsInstalled=Эта установка завершена. SystemIsUpgraded=Dolibarr был обновлен успешно. YouNeedToPersonalizeSetup=Вам нужно настроить Dolibarr, чтобы они соответствовали вашим потребностям (внешний вид, особенности, ...). Для этого, пожалуйста, перейдите по ссылке ниже: AdminLoginCreatedSuccessfuly=Dolibarr логин администратора ' %s' создан успешно. @@ -93,18 +93,18 @@ GoToSetupArea=Перейти к Dolibarr (настройка область) MigrationNotFinished=Версия базы данных не совсем в курсе, так что вам придется запустить процесс обновления еще раз. GoToUpgradePage=Перейти на страницу снова обновить Examples=Примеры -WithNoSlashAtTheEnd=Без черту "/" в конце +WithNoSlashAtTheEnd=Без слеша "/" в конце DirectoryRecommendation=Det er recommanded å bruke en ut av ditt katalogen av websidene dine. LoginAlreadyExists=Уже существует DolibarrAdminLogin=Dolibarr администратора AdminLoginAlreadyExists=Dolibarr администратора учетной записи ' %s' уже существует. WarningRemoveInstallDir=Предупреждение, по соображениям безопасности после того, как установить или обновить завершено, Вы должны удалить каталог или переименовать его в install.lock во избежание ее злонамеренного использования. -ThisPHPDoesNotSupportTypeBase=Эта система PHP не поддерживает интерфейс для доступа к базе данных типа S% -FunctionNotAvailableInThisPHP=Нет данных по этому PHP +ThisPHPDoesNotSupportTypeBase=Эта версия PHP не поддерживает интерфейс для доступа к базе данных типа %s +FunctionNotAvailableInThisPHP=Не доступно в текущей версии PHP MigrateScript=Переносите сценарий ChoosedMigrateScript=Выбранная перенести скрипт -DataMigration=Данные миграции -DatabaseMigration=Структура базы данных миграции +DataMigration=Миграция данных +DatabaseMigration=Миграция Структуры базы данных ProcessMigrateScript=Сценарий обработки ChooseYourSetupMode=Выберите режим настройки и нажмите кнопку "Пуск" ... FreshInstall=Свежие установить @@ -117,7 +117,7 @@ NotAvailable=Не имеется YouMustCreateWithPermission=Вы должны создать файл %s и установить запись по этому вопросу для веб-сервера во время установки. CorrectProblemAndReloadPage=Просьба решить эту проблему, и нажмите F5, чтобы перезагрузить страницу. AlreadyDone=Уже мигрировали -DatabaseVersion=База данных версии +DatabaseVersion=Версия Базы данных ServerVersion=Версия сервера базы данных YouMustCreateItAndAllowServerToWrite=Вы должны создать этот каталог и позволит веб-серверу, чтобы написать на ней. CharsetChoice=Выбор набора символов @@ -136,7 +136,7 @@ KeepDefaultValuesWamp=Вы можете использовать мастер н KeepDefaultValuesDeb=Du bruker Dolibarr konfigurasjonsveiviseren fra en Ubuntu eller Debian-pakke, så verdiene foreslått her allerede er optimalisert. Bare passordet til databasen eieren til å opprette må fullføres. Endre andre parametere bare hvis du vet hva du gjør. KeepDefaultValuesMamp=Вы можете использовать мастер настройки DoliMamp, поэтому ценности предлагаемого здесь уже оптимизирован. Изменить их только, если вы знаете, что вы делаете. KeepDefaultValuesProxmox=Вы можете использовать мастер установки из Dolibarr прибор Proxmox виртуальные, поэтому значения предлагаемых здесь уже оптимизированы. Изменение их, только если вы знаете, что вы делаете. -FieldRenamed=Поле переименовали +FieldRenamed=Поле переименовано IfLoginDoesNotExistsCheckCreateUser=Если вход не существует еще, вы должны проверить опцию "Создать пользователя" ErrorConnection=Сервер " %s", имя базы данных " %s", логин " %s", или базы данных паролей могут быть неправильными или PHP версии клиента может быть слишком стар, по сравнению с версией базы данных. InstallChoiceRecommanded=Anbefalt valget å installere versjon %s fra din nåværende versjonen %s @@ -151,7 +151,7 @@ NextStepMightLastALongTime=Gjeldende trinn kan vare i flere minutter. Vennligst MigrationCustomerOrderShipping=Migrer frakt for kundeordrer oppbevaring MigrationShippingDelivery=Oppgrader lagring av shipping MigrationShippingDelivery2=Oppgrader lagring av shipping 2 -MigrationFinished=Миграция готового +MigrationFinished=Миграция завершена LastStepDesc=Последний шаг: Определить здесь Логин и пароль, которые вы планируете использовать для подключения к программному обеспечению. Как не потерять эту, как это внимание, чтобы управлять всеми другими. ActivateModule=Активировать модуль %s ShowEditTechnicalParameters=Click here to show/edit advanced parameters (expert mode) @@ -164,7 +164,7 @@ MigrationSupplierOrder=Данные миграции для поставщико MigrationProposal=Данные миграции для коммерческих предложений MigrationInvoice=Данные миграции для клиентов, счета-фактуры MigrationContract=Данные по миграции контрактов -MigrationSuccessfullUpdate=Обновление успешной +MigrationSuccessfullUpdate=Обновление успешно MigrationUpdateFailed=Сбой процесса обновления MigrationRelationshipTables=Data migrering for forholdet tabeller (%s) MigrationPaymentsUpdate=Оплата данных коррекции @@ -183,14 +183,14 @@ MigrationContractsEmptyDatesNothingToUpdate=Ни один контракт не MigrationContractsEmptyCreationDatesNothingToUpdate=Нет контракта дата создания исправить MigrationContractsInvalidDatesUpdate=Плохо стоимости контракта дата коррекции MigrationContractsInvalidDateFix=Correct contract %s (Contract date=%s, Starting service date min=Правильно% с контракта (контракт даты= %s, начиная службу дата мин= %s) -MigrationContractsInvalidDatesNumber=%s контрактов измененные +MigrationContractsInvalidDatesNumber=%s контрактов изменено MigrationContractsInvalidDatesNothingToUpdate=Нет даты с плохим значение для исправления MigrationContractsIncoherentCreationDateUpdate=Плохо стоимость контракта дата создания коррекции MigrationContractsIncoherentCreationDateUpdateSuccess=Плохо стоимость контракта дата создания коррекции сделали успешно MigrationContractsIncoherentCreationDateNothingToUpdate=Нет плохих стоимости контракта на создание дата правильная MigrationReopeningContracts=Открыть контракт закрыт ошибке -MigrationReopenThisContract=Вновь контракт %s -MigrationReopenedContractsNumber=%s контрактов измененные +MigrationReopenThisContract=Возобновить контракт %s +MigrationReopenedContractsNumber=%s контрактов изменено MigrationReopeningContractsNothingToUpdate=Нет закрытых контракту, чтобы открыть MigrationBankTransfertsUpdate=Обновление связей между Банком сделки и банковские передачи MigrationBankTransfertsNothingToUpdate=Все ссылки в курсе @@ -205,7 +205,7 @@ MigrationProjectUserResp=Data migrering feltet fk_user_resp av llx_projet å llx MigrationProjectTaskTime=Oppdater tid i sekunder MigrationActioncommElement=Обновление данных о действиях MigrationPaymentMode=Миграция данных для оплаты режим -MigrationCategorieAssociation=Migration of categories +MigrationCategorieAssociation=Миграция категорий -ShowNotAvailableOptions=Show not available options -HideNotAvailableOptions=Hide not available options +ShowNotAvailableOptions=Показать недоступные опции +HideNotAvailableOptions=Скрыть недоступные опции diff --git a/htdocs/langs/ru_RU/languages.lang b/htdocs/langs/ru_RU/languages.lang index 1864bffeab5..d04c710bf8f 100644 --- a/htdocs/langs/ru_RU/languages.lang +++ b/htdocs/langs/ru_RU/languages.lang @@ -19,8 +19,9 @@ Language_en_SA=Английский (Саудовская Аравия) Language_en_US=Английский (США) Language_en_ZA=Английский (Южная Африка) Language_es_ES=Испанский +Language_es_DO=Испанский (Доминиканская Республика) Language_es_AR=Испанский (Аргентина) -Language_es_CL=Spanish (Chile) +Language_es_CL=Испанский (Чили) Language_es_HN=Испанский (Гондурас) Language_es_MX=Испанский (Мексика) Language_es_PY=Испанский (Парагвай) @@ -38,6 +39,7 @@ Language_fr_NC=Французский (Новая Каледония) Language_he_IL=Иврит Language_hr_HR=Хорватский Language_hu_HU=Венгерский +Language_id_ID=Индонезийский Language_is_IS=Исландский Language_it_IT=Итальянский Language_ja_JP=Японский @@ -45,7 +47,7 @@ Language_ko_KR=Корейский Language_lt_LT=Литовский Language_lv_LV=Латышский Language_mk_MK=Македонский -Language_nb_NO=Норвежский (букмол) +Language_nb_NO=Норвежский (Букмол) Language_nl_BE=Голландский (Бельгия) Language_nl_NL=Голландский (Нидерланды) Language_pl_PL=Польский @@ -58,8 +60,8 @@ Language_tr_TR=Турецкий Language_sl_SI=Словенский Language_sv_SV=Шведский Language_sv_SE=Шведский -Language_sq_AL=Albanian -Language_sk_SK=Словакии +Language_sq_AL=Албанский +Language_sk_SK=Словацкий Language_th_TH=Тайский Language_uk_UA=Украинский Language_uz_UZ=Узбекский diff --git a/htdocs/langs/ru_RU/mails.lang b/htdocs/langs/ru_RU/mails.lang index 3873873ef12..b05271e4bb9 100644 --- a/htdocs/langs/ru_RU/mails.lang +++ b/htdocs/langs/ru_RU/mails.lang @@ -79,10 +79,11 @@ MailtoEMail=Ссылка на email ActivateCheckRead=Разрешить использовать ссылку "Отказаться от подписки" ActivateCheckReadKey=Key use to encrypt URL use for "Read Receipt" and "Unsubcribe" feature EMailSentToNRecipients=Email отправлено %s получателям. +XTargetsAdded=%s recipients added into target list EachInvoiceWillBeAttachedToEmail=A document using default invoice document template will be created and attached to each email. MailTopicSendRemindUnpaidInvoices=Reminder of invoice %s (%s) -SendRemind=Send reminder by EMails -RemindSent=%s reminder(s) sent +SendRemind=Отправить напоминание по Email +RemindSent=%s напоминания(й) отправлено AllRecipientSelectedForRemind=All thirdparties selected and if an email is set (note that one mail per invoice will be sent) NoRemindSent=No EMail reminder sent ResultOfMassSending=Result of mass EMail reminders sending @@ -96,7 +97,7 @@ MailingModuleDescEmailsFromUser=EMails from user input (email;lastname;firstname MailingModuleDescContactsCategories=Контакты всех третьих лиц (по категориям) MailingModuleDescDolibarrContractsLinesExpired=Третьи стороны истек контракт с линий MailingModuleDescContactsByCompanyCategory=Контакты третьих лиц (по третьей категории сторон) -MailingModuleDescContactsByCategory=Contacts/addresses of third parties by category +MailingModuleDescContactsByCategory=Контакты/Адреса контрагентов по категориям MailingModuleDescMembersCategories=Фонд членов (по категориям) MailingModuleDescContactsByFunction=Контакты третьих лиц (по должности / функции) LineInFile=Линия %s в файл @@ -119,7 +120,7 @@ TargetsReset=Очистить список ToClearAllRecipientsClickHere=Чтобы очистить получателей список для этого адреса, нажмите кнопку ToAddRecipientsChooseHere=Чтобы добавить адресатов, выберите в этих списках NbOfEMailingsReceived=Массовые emailings получил -NbOfEMailingsSend=Mass emailings sent +NbOfEMailingsSend=Массовая Email-рассылка IdRecord=Код записи DeliveryReceipt=Доставка квитанции YouCanUseCommaSeparatorForSeveralRecipients=Вы можете использовать сепаратор для запятую указать несколько получателей. diff --git a/htdocs/langs/ru_RU/main.lang b/htdocs/langs/ru_RU/main.lang index 0df8cca4def..67eea423e46 100644 --- a/htdocs/langs/ru_RU/main.lang +++ b/htdocs/langs/ru_RU/main.lang @@ -551,6 +551,7 @@ MailSentBy=Отправлено по Email TextUsedInTheMessageBody=Текст Email SendAcknowledgementByMail=Отправить Подтверждение по Email NoEMail=Нет Email +NoMobilePhone=No mobile phone Owner=Владелец DetectedVersion=Обнаруженная версия FollowingConstantsWillBeSubstituted=Следующие константы будут подменять соответствующие значения. diff --git a/htdocs/langs/ru_RU/products.lang b/htdocs/langs/ru_RU/products.lang index c10cc4256ce..476874e2df7 100644 --- a/htdocs/langs/ru_RU/products.lang +++ b/htdocs/langs/ru_RU/products.lang @@ -28,8 +28,10 @@ ProductsAndServicesStatistics=Продукты и услуги статисти ProductsStatistics=Продукты статистика ProductsOnSell=Товары на продажу ProductsNotOnSell=Продукты из продать +ProductsOnSellAndOnBuy=Products not for sale nor purchase ServicesOnSell=Услуги по продаже ServicesNotOnSell=Услуги вне продать +ServicesOnSellAndOnBuy=Services not for sale nor purchase InternalRef=Внутренние ссылки LastRecorded=Последние продукты / услуги по продаже зарегистрировано LastRecordedProductsAndServices=Последнее %s зарегистрированные продукции / услуг @@ -70,6 +72,8 @@ PublicPrice=Государственные цены CurrentPrice=Текущая цена NewPrice=Новая цена MinPrice=Миним. продажная цена +MinPriceHT=Минимальная цена продажи (net of tax) +MinPriceTTC=Минимальная цена продажи (inc. tax) CantBeLessThanMinPrice=В продаже цена не может быть ниже минимального позволило этот продукт (S% без учета налогов) ContractStatus=Контракт статус ContractStatusClosed=Закрытые @@ -179,6 +183,7 @@ ProductIsUsed=Этот продукт используется NewRefForClone=Ссылка нового продукта / услуги CustomerPrices=Клиенты цены SuppliersPrices=Поставщики цены +SuppliersPricesOfProductsOrServices=Suppliers prices (of products or services) CustomCode=Пользовательский код CountryOrigin=Страна происхождения HiddenIntoCombo=Скрытые в списках выбора @@ -208,13 +213,14 @@ CostPmpHT=Net total VWAP ProductUsedForBuild=Auto consumed by production ProductBuilded=Производство завершено ProductsMultiPrice=Product multi-price +ProductsOrServiceMultiPrice=Customers prices (of products or services, multi-prices) ProductSellByQuarterHT=Products turnover quarterly VWAP ServiceSellByQuarterHT=Services turnover quarterly VWAP -Quarter1=1st. Quarter -Quarter2=2nd. Quarter -Quarter3=3rd. Quarter -Quarter4=4th. Quarter -BarCodePrintsheet=Print bar code +Quarter1=I квартал +Quarter2=II квартал +Quarter3=III квартал +Quarter4=IV квартал +BarCodePrintsheet=Печать штрих-кода PageToGenerateBarCodeSheets=With this tool, you can print sheets of bar code stickers. Choose format of your sticker page, type of barcode and value of barcode, then click on button %s. NumberOfStickers=Number of stickers to print on page PrintsheetForOneBarCode=Print several stickers for one barcode @@ -224,12 +230,12 @@ FillBarCodeTypeAndValueFromProduct=Fill barcode type and value from barcode of a FillBarCodeTypeAndValueFromThirdParty=Fill barcode type and value from barcode of a thirdparty. DefinitionOfBarCodeForProductNotComplete=Definition of type or value of bar code not complete for product %s. DefinitionOfBarCodeForThirdpartyNotComplete=Definition of type or value of bar code non complete for thirdparty %s. -BarCodeDataForProduct=Barcode information of product %s : +BarCodeDataForProduct=Информация по штрих-коду продукта %s: BarCodeDataForThirdparty=Barcode information of thirdparty %s : ResetBarcodeForAllRecords=Define barcode value for all records (this will also reset barcode value already defined with new values) PriceByCustomer=Price by customer PriceCatalogue=Unique price per product/service -PricingRule=Pricing Rules +PricingRule=Правила ценообразования AddCustomerPrice=Add price by customers ForceUpdateChildPriceSoc=Set same price on customer subsidiaries PriceByCustomerLog=Price by customer log diff --git a/htdocs/langs/ru_RU/projects.lang b/htdocs/langs/ru_RU/projects.lang index 6818b0b9cc1..e1fd31b9665 100644 --- a/htdocs/langs/ru_RU/projects.lang +++ b/htdocs/langs/ru_RU/projects.lang @@ -1,6 +1,6 @@ # Dolibarr language file - Source file is en_US - projects -# RefProject=Ref. project -# ProjectId=Project Id +RefProject=Ref. project +ProjectId=ID Проекта Project=Проект Projects=Проекты SharedProject=Общий проект @@ -32,18 +32,18 @@ TimeSpent=Время, затраченное TimesSpent=Время, проведенное RefTask=Ref. задача LabelTask=Этикетка задачи -# TaskTimeSpent=Time spent on tasks -# TaskTimeUser=User -# TaskTimeNote=Note -# TaskTimeDate=Date +TaskTimeSpent=Время, потраченное на задачи +TaskTimeUser=Пользователь +TaskTimeNote=Заметка +TaskTimeDate=Дата NewTimeSpent=Новое время MyTimeSpent=Мое время MyTasks=Мои задачи Tasks=Задание Task=Задача -# TaskDateStart=Task start date -# TaskDateEnd=Task end date -# TaskDescription=Task description +TaskDateStart=Дата начала задачи +TaskDateEnd=Дата завершения задачи +TaskDescription=Описание задачи NewTask=Новые задачи AddTask=Добавить задачу AddDuration=Добавить продолжительность @@ -54,8 +54,8 @@ MyActivities=Мои задачи / мероприятия MyProjects=Мои проекты DurationEffective=Эффективная длительность Progress=Прогресс -# ProgressDeclared=Declared progress -# ProgressCalculated=Calculated progress +ProgressDeclared=Declared progress +ProgressCalculated=Calculated progress Time=Время ListProposalsAssociatedProject=Списки коммерческих предложений, связанных с проектом ListOrdersAssociatedProject=Списки заказы, связанные с проектом @@ -95,30 +95,33 @@ TaskIsNotAffectedToYou=Задача не выделено для вас ErrorTimeSpentIsEmpty=Время, проведенное пуста ThisWillAlsoRemoveTasks=Это действие приведет к удалению всех задач проекта (%s задач на данный момент), и все входы затраченного времени. IfNeedToUseOhterObjectKeepEmpty=Если некоторые объекты (счет-фактура, заказ, ...), принадлежащей другому третьему лицу, должна быть увязана с проектом по созданию, держать этот пустой иметь проект, несколько третьих лиц. -# CloneProject=Clone project -# CloneTasks=Clone tasks -# CloneContacts=Clone contacts -# CloneNotes=Clone notes -# CloneProjectFiles=Clone project joined files -# CloneTaskFiles=Clone task(s) joined files (if task(s) cloned) -# ConfirmCloneProject=Are you sure to clone this project ? -# ProjectReportDate=Change task date according project start date -# ErrorShiftTaskDate=Impossible to shift task date according to new project start date -# ProjectsAndTasksLines=Projects and tasks -# ProjectCreatedInDolibarr=Project %s created +CloneProject=Дублировать Проект +CloneTasks=Дублировать задачи +CloneContacts=Дублировать контакты +CloneNotes=Дублировать заметки +CloneProjectFiles=Дублировать файлы, связанные с проектом +CloneTaskFiles=Clone task(s) joined files (if task(s) cloned) +ConfirmCloneProject=Вы уверены, что хотите дублировать этот проект? +ProjectReportDate=Изменить дату задачи в соответствии с датой начала проекта +ErrorShiftTaskDate=Impossible to shift task date according to new project start date +ProjectsAndTasksLines=Проекты и задачи +ProjectCreatedInDolibarr=Проект %s создан +TaskCreatedInDolibarr=Задача %s создана +TaskModifiedInDolibarr=Задача %s изменена +TaskDeletedInDolibarr=Задача %s удалена ##### Types de contacts ##### TypeContact_project_internal_PROJECTLEADER=Руководитель проекта TypeContact_project_external_PROJECTLEADER=Руководитель проекта -# TypeContact_project_internal_PROJECTCONTRIBUTOR=Contributor -# TypeContact_project_external_PROJECTCONTRIBUTOR=Contributor +TypeContact_project_internal_PROJECTCONTRIBUTOR=Contributor +TypeContact_project_external_PROJECTCONTRIBUTOR=Contributor TypeContact_project_task_internal_TASKEXECUTIVE=Целевая исполнительной TypeContact_project_task_external_TASKEXECUTIVE=Целевая исполнительной -# TypeContact_project_task_internal_TASKCONTRIBUTOR=Contributor -# TypeContact_project_task_external_TASKCONTRIBUTOR=Contributor -# SelectElement=Select element -# AddElement=Link to element +TypeContact_project_task_internal_TASKCONTRIBUTOR=Contributor +TypeContact_project_task_external_TASKCONTRIBUTOR=Contributor +SelectElement=Выберите элемент +AddElement=Link to element # Documents models DocumentModelBaleine=доклад полной проекта модели (logo. ..) -# PlannedWorkload = Planned workload -# WorkloadOccupation= Workload affectation -# ProjectReferers=Refering objects +PlannedWorkload = Запланированная нагрузка +WorkloadOccupation= Workload affectation +ProjectReferers=Refering objects diff --git a/htdocs/langs/ru_RU/shop.lang b/htdocs/langs/ru_RU/shop.lang index 7e497b208a9..b982ab65dd9 100644 --- a/htdocs/langs/ru_RU/shop.lang +++ b/htdocs/langs/ru_RU/shop.lang @@ -1,4 +1,5 @@ # Dolibarr language file - Source file is en_US - shop +FailedConnectDBCheckModuleSetup=Failed to connect to oscommerce database. Check your module setup Shop=Магазин ShopWeb=Интернет-магазин LastOrders=Последние заказы diff --git a/htdocs/langs/ru_RU/stocks.lang b/htdocs/langs/ru_RU/stocks.lang index 55f36f95818..610b6f0a2bd 100644 --- a/htdocs/langs/ru_RU/stocks.lang +++ b/htdocs/langs/ru_RU/stocks.lang @@ -1,19 +1,19 @@ # Dolibarr language file - Source file is en_US - stocks -WarehouseCard=Склад-карты +WarehouseCard=Карточка склада Warehouse=Склад Warehouses=Склады NewWarehouse=Новый склад / Фондовый области -WarehouseEdit=Изменить склад +WarehouseEdit=Редактировать склад MenuNewWarehouse=Новый склад WarehouseOpened=Склад открыт -WarehouseClosed=Склад закрыто +WarehouseClosed=Склад закрыт WarehouseSource=Источник склад WarehouseSourceNotDefined=Склад не определен, AddOne=Add one WarehouseTarget=Целевой показатель на складе -ValidateSending=Удалить отправке +ValidateSending=Удалить отправку CancelSending=Отменить отправку -DeleteSending=Удалить отправке +DeleteSending=Удалить отправку Stock=Фондовый Stocks=Акции Movement=Движение @@ -112,6 +112,7 @@ ReplenishmentOrdersDesc=Это список всех открытых заказ Replenishments=Пополнения NbOfProductBeforePeriod=Количество продукта %s в остатке на начало выбранного периода (< %s) NbOfProductAfterPeriod=Количество продукта %s в остатке на конец выбранного периода (< %s) +MassMovement=Mass movement MassStockMovement=Массовое перемещение остатков SelectProductInAndOutWareHouse=Select a product, a quantity, a source warehouse and a target warehouse, then click "%s". Once this is done for all required movements, click onto "%s". RecordMovement=Record transfert diff --git a/htdocs/langs/ru_RU/withdrawals.lang b/htdocs/langs/ru_RU/withdrawals.lang index 10790982266..760ba7a4671 100644 --- a/htdocs/langs/ru_RU/withdrawals.lang +++ b/htdocs/langs/ru_RU/withdrawals.lang @@ -37,7 +37,7 @@ ClassCredited=Классифицировать зачисленных ClassCreditedConfirm=Вы уверены, что хотите классифицировать этот вывод получения как кредитуются на ваш счет в банке? TransData=Дата передачи TransMetod=Метод передачи -Send=Послать +Send=Отправить Lines=Линии StandingOrderReject=Выпуск отклонить InvoiceRefused=Зарядка отказа клиента diff --git a/htdocs/langs/ru_RU/workflow.lang b/htdocs/langs/ru_RU/workflow.lang index 05f3b136872..7356cca7b25 100644 --- a/htdocs/langs/ru_RU/workflow.lang +++ b/htdocs/langs/ru_RU/workflow.lang @@ -1,11 +1,11 @@ # Dolibarr language file - Source file is en_US - admin -WorkflowSetup=Рабочий процесс установки модуля +WorkflowSetup=Установка модуля Рабочих процессов WorkflowDesc=Этот модуль является designed изменить поведение автоматического действия в приложении. По умолчанию рабочий процесс открыт (вы делаете вещь, чтобы вы хотите). Вы можете включить автоматическую действия, которые вам интересны дюйма ThereIsNoWorkflowToModify=Существует не рабочий процесс можно изменить для модуля активации. descWORKFLOW_PROPAL_AUTOCREATE_ORDER=Создать заказ клиента автоматически после коммерческое предложение подписано descWORKFLOW_PROPAL_AUTOCREATE_INVOICE=Создать счет клиента автоматически после коммерческое предложение подписано descWORKFLOW_CONTRACT_AUTOCREATE_INVOICE=Создать счет клиента автоматически после контракт проверяется descWORKFLOW_ORDER_AUTOCREATE_INVOICE=Создать счет клиента автоматически после заказа клиента закрыт -# descWORKFLOW_ORDER_CLASSIFY_BILLED_PROPAL=Classify linked source proposal to billed when customer order is set to paid -# descWORKFLOW_INVOICE_CLASSIFY_BILLED_ORDER=Classify linked source customer order(s) to billed when customer invoice is set to paid -# descWORKFLOW_INVOICE_AMOUNT_CLASSIFY_BILLED_ORDER=Classify linked source customer order(s) to billed when customer invoice is validated +descWORKFLOW_ORDER_CLASSIFY_BILLED_PROPAL=Classify linked source proposal to billed when customer order is set to paid +descWORKFLOW_INVOICE_CLASSIFY_BILLED_ORDER=Classify linked source customer order(s) to billed when customer invoice is set to paid +descWORKFLOW_INVOICE_AMOUNT_CLASSIFY_BILLED_ORDER=Classify linked source customer order(s) to billed when customer invoice is validated diff --git a/htdocs/langs/sk_SK/admin.lang b/htdocs/langs/sk_SK/admin.lang index 14248774c8b..f309f3064b9 100644 --- a/htdocs/langs/sk_SK/admin.lang +++ b/htdocs/langs/sk_SK/admin.lang @@ -116,7 +116,7 @@ LanguageBrowserParameter=Parameter %s LocalisationDolibarrParameters=Lokalizácia parametre ClientTZ=Client Time Zone (user) ClientHour=Client time (user) -OSTZ=Servri OS Časová zóna +OSTZ=Server OS Time Zone PHPTZ=PHP servera Časová zóna PHPServerOffsetWithGreenwich=PHP servera offset šírka Greenwich (v sekundách) ClientOffsetWithGreenwich=Klient / Browser offset šírka Greenwich (v sekundách) @@ -233,7 +233,9 @@ OfficialWebSiteFr=Francúzsky oficiálne internetové stránky OfficialWiki=Dolibarr dokumentácie na Wiki OfficialDemo=Dolibarr on-line demo OfficialMarketPlace=Oficiálny trh pre externé moduly / addons -OfficialWebHostingService=Official web hosting services (Cloud hosting) +OfficialWebHostingService=Referenced web hosting services (Cloud hosting) +ReferencedPreferredPartners=Preferred Partners +OtherResources=Autres ressources ForDocumentationSeeWiki=Pre používateľov alebo vývojárov dokumentácie (doc, FAQs ...)
    pozrite sa na Dolibarr Wiki:
    %s ForAnswersSeeForum=V prípade akýchkoľvek ďalších otázok / help, môžete použiť fórum Dolibarr:
    %s HelpCenterDesc1=Táto oblasť vám môže pomôcť získať pomocníka služby podpory na Dolibarr. @@ -369,9 +371,9 @@ ExtrafieldSelectList = Vyberte z tabuľky ExtrafieldSeparator=Oddeľovač ExtrafieldCheckBox=Zaškrtávacie políčko ExtrafieldRadio=Prepínač -ExtrafieldParamHelpselect=Zoznam parametrov musí byť ako kľúčový, hodnota

    napr:
    1 hodnota1
    2, hodnota2
    3 value3
    ...

    Aby bolo možné mať zoznam v závislosti na druhého:
    1 hodnota1 | parent_list_code: parent_key
    2, hodnota2 | parent_list_code: parent_key -ExtrafieldParamHelpcheckbox=Zoznam parametrov musí byť ako kľúčový, hodnota

    napr:
    1 hodnota1
    2, hodnota2
    3 value3
    ... -ExtrafieldParamHelpradio=Zoznam parametrov musí byť ako kľúčový, hodnota

    napr:
    1 hodnota1
    2, hodnota2
    3 value3
    ... +ExtrafieldParamHelpselect=Parameters list have to be like key,value

    for example :
    1,value1
    2,value2
    3,value3
    ...

    In order to have the list depending on another :
    1,value1|parent_list_code:parent_key
    2,value2|parent_list_code:parent_key +ExtrafieldParamHelpcheckbox=Parameters list have to be like key,value

    for example :
    1,value1
    2,value2
    3,value3
    ... +ExtrafieldParamHelpradio=Parameters list have to be like key,value

    for example :
    1,value1
    2,value2
    3,value3
    ... ExtrafieldParamHelpsellist=Parameters list comes from a table
    Syntax : table_name:label_field:id_field::filter
    Example : c_typent:libelle:id::filter

    filter can be a simple test (eg active=1) to display only active value
    if you want to filter on extrafields use syntaxt extra.fieldcode=... (where field code is the code of extrafield)

    In order to have the list depending on another :
    c_typent:libelle:id:parent_list_code|parent_column:filter LibraryToBuildPDF=Knižnica použiť na vytvorenie PDF WarningUsingFPDF=Upozornenie: Váš conf.php obsahuje direktívu dolibarr_pdf_force_fpdf = 1. To znamená, že môžete používať knižnicu FPDF pre generovanie PDF súborov. Táto knižnica je stará a nepodporuje mnoho funkcií (Unicode, obraz transparentnosť, azbuka, arabské a ázijské jazyky, ...), takže môže dôjsť k chybám pri generovaní PDF.
    Ak chcete vyriešiť tento a majú plnú podporu generovanie PDF, stiahnite si TCPDF knižnice , potom komentár alebo odstrániť riadok $ dolibarr_pdf_force_fpdf = 1, a namiesto neho doplniť $ dolibarr_lib_TCPDF_PATH = 'path_to_TCPDF_dir " @@ -472,7 +474,7 @@ Module410Desc=WebCalendar integrácia Module500Name=Special expenses (tax, social contributions, dividends) Module500Desc=Management of special expenses like taxes, social contribution, dividends and salaries Module510Name=Salaries -Module510Desc=Management of empoyees salaries and payments +Module510Desc=Management of employees salaries and payments Module600Name=Upozornenie Module600Desc=Zasielať upozornenia e-mailom na niektorých firemných akcií Dolibarr tretích strán kontakty Module700Name=Dary @@ -495,15 +497,15 @@ Module2400Name=Program rokovania Module2400Desc=Udalosti / úlohy a agendy vedenie Module2500Name=Elektronický Redakčný Module2500Desc=Uložiť a zdieľať dokumenty -Module2600Name= WebServices -Module2600Desc= Povoliť Dolibarr webových služieb servera -Module2700Name= Gravatar -Module2700Desc= Pomocou on-line služby (Gravatar www.gravatar.com) ukázať fotku užívateľov / členov (nájdený s ich e-maily). Potrebujete prístup k internetu +Module2600Name=WebServices +Module2600Desc=Povoliť Dolibarr webových služieb servera +Module2700Name=Gravatar +Module2700Desc=Pomocou on-line služby (Gravatar www.gravatar.com) ukázať fotku užívateľov / členov (nájdený s ich e-maily). Potrebujete prístup k internetu Module2800Desc=FTP klient -Module2900Name= GeoIPMaxmind -Module2900Desc= GeoIP MaxMind konverzie možnosti -Module3100Name= Skype -Module3100Desc= Pridajte Skype tlačidlá na karte prívržencov / tretích osôb / kontakty +Module2900Name=GeoIPMaxmind +Module2900Desc=GeoIP MaxMind konverzie možnosti +Module3100Name=Skype +Module3100Desc=Pridajte Skype tlačidlá na karte prívržencov / tretích osôb / kontakty Module5000Name=Multi-spoločnosť Module5000Desc=Umožňuje spravovať viac spoločností Module6000Name=Workflow @@ -681,6 +683,10 @@ Permission401=Prečítajte zľavy Permission402=Vytvoriť / upraviť zľavy Permission403=Overiť zľavy Permission404=Odstrániť zľavy +Permission510=Read Salaries +Permission512=Create/modify salaries +Permission514=Delete salaries +Permission517=Export salaries Permission531=Prečítajte služby Permission532=Vytvoriť / upraviť služby Permission534=Odstrániť služby @@ -999,7 +1005,7 @@ ExtraFieldsSupplierOrders=Doplnkové atribúty (objednávky) ExtraFieldsSupplierInvoices=Doplnkové atribúty (faktúry) ExtraFieldsProject=Doplnkové atribúty (projekty) ExtraFieldsProjectTask=Doplnkové atribúty (úlohy) -ExtraFieldHasWrongValue=Plynúcich %s má nesprávnu hodnotu. +ExtraFieldHasWrongValue=Attribute %s has a wrong value. AlphaNumOnlyCharsAndNoSpace=iba alphanumericals znaky bez medzier AlphaNumOnlyLowerCharsAndNoSpace=only alphanumericals and lower case characters without space SendingMailSetup=Nastavenie sendings e-mailom @@ -1018,13 +1024,13 @@ SuhosinSessionEncrypt=Úložisko relácie šifrovaná Suhosin ConditionIsCurrently=Podmienkou je v súčasnej dobe %s TestNotPossibleWithCurrentBrowsers=Automatická detekcia nie je možné YouUseBestDriver=Pomocou ovládača %s, že je najlepší vodič súčasnej dobe k dispozícii. -YouDoNotUseBestDriver=Pomocou pohonu %s ale vodič %s je odporúčané. +YouDoNotUseBestDriver=You use drive %s but driver %s is recommended. NbOfProductIsLowerThanNoPb=Máte len %s produktov / služieb do databázy. To však nie je nutné žiadne špeciálne optimalizácie. SearchOptim=Optimalizácia pre vyhľadávače YouHaveXProductUseSearchOptim=Máte %s produkt do databázy. Mali by ste pridať konštantný PRODUCT_DONOTSEARCH_ANYWHERE do 1 do Home-Nastavenie-Ostatné, môžete obmedziť vyhľadávanie na začiatku reťazca, ktoré umožňujú pre databázy používať index, a vy by ste mali dostať okamžitú odpoveď. BrowserIsOK=Používate %s webovom prehliadači. Tento prehliadač je v poriadku pre bezpečnosť a výkon. BrowserIsKO=Používate %s webovom prehliadači. Tento prehliadač je známe, že zlá voľba pre bezpečnosť, výkon a spoľahlivosť. Sme Odporúčam vám používať Firefox, Chrome, Operu alebo Safari. -XDebugInstalled=Xdebug est poplatok. +XDebugInstalled=XDebug is loaded. XCacheInstalled=XCache načítaný. AddRefInList=Displej zákazníka / dodávateľa ref do zoznamu (vyberte zoznam alebo ComboBox) a väčšina z hypertextového odkazu FieldEdition=Vydanie poľných %s @@ -1073,7 +1079,7 @@ WebCalServer=Server hosting kalendár databázy WebCalDatabaseName=Názov databázy WebCalUser=Užívateľ prístup k databáze WebCalSetupSaved=WebCalendar nastavenie bolo úspešne uložené. -WebCalTestOk=Pripojenie k serveru "%s" na databázu "%s" s úspešní užívateľ "%s. +WebCalTestOk=Connection to server '%s' on database '%s' with user '%s' successful. WebCalTestKo1=Pripojenie k "%s" servera úspešná, ale databáza "%s" by nebolo možné dosiahnuť. WebCalTestKo2=Pripojenie k serveru "%s" s užívateľom "%s 'zlyhalo. WebCalErrorConnectOkButWrongDatabase=Pripojenie úspešné, ale databáza nevyzerá byť WebCalendar databázy. @@ -1119,7 +1125,7 @@ WatermarkOnDraftProposal=Vodoznak na predlôh návrhov komerčných (none ak pr OrdersSetup=Objednať riadenie nastavenia OrdersNumberingModules=Objednávky číslovanie modelov OrdersModelModule=Objednať dokumenty modely -HideTreadedOrders=Skryť ošetrené alebo zrušenie objednávky v zozname +HideTreadedOrders=Hide the treated or cancelled orders in the list ValidOrderAfterPropalClosed=Pre potvrdenie objednávky po návrhu užší, umožňuje, aby krok za dočasné poradí FreeLegalTextOnOrders=Voľný text o objednávkach WatermarkOnDraftOrders=Vodoznak na konceptoch objednávok (ak žiadny prázdny) @@ -1214,9 +1220,9 @@ LDAPSynchroKO=Nepodarilo synchronizácia testu LDAPSynchroKOMayBePermissions=Nepodarilo synchronizácia test. Skontrolujte, či je prípojka na server je správne nakonfigurovaný a umožňuje LDAP udpates LDAPTCPConnectOK=TCP pripojenie k LDAP servera (Server úspešných = %s, %s port =) LDAPTCPConnectKO=TCP pripojenie k LDAP serveru zlyhalo (Server = %s, Port = %s) -LDAPBindOK=Pripojiť / Authentificate k LDAP servera (Server sucessfull = %s, Port = %s, Admin = %s, Password = %s) +LDAPBindOK=Connect/Authentificate to LDAP server successful (Server=%s, Port=%s, Admin=%s, Password=%s) LDAPBindKO=Pripojiť / Authentificate k LDAP serveru zlyhalo (Server = %s, Port = %s, Admin = %s, Password = %s) -LDAPUnbindSuccessfull=Odpojte úspešné +LDAPUnbindSuccessfull=Disconnect successful LDAPUnbindFailed=Odpojenie zlyhalo LDAPConnectToDNSuccessfull=Pripojenie k DN (%s) úspešná LDAPConnectToDNFailed=Pripojenie k DN (%s) zlyhala @@ -1273,7 +1279,7 @@ LDAPFieldSidExample=Príklad: objectSID LDAPFieldEndLastSubscription=Dátum ukončenia predplatného LDAPFieldTitle=Post / Funkcia LDAPFieldTitleExample=Príklad: title -LDAPParametersAreStillHardCoded=LDAP parametre sú stále napevno (v kontakte triede) +LDAPParametersAreStillHardCoded=LDAP parameters are still hardcoded (in contact class) LDAPSetupNotComplete=Nastavenie LDAP nie je úplná (prejdite na záložku Iné) LDAPNoUserOrPasswordProvidedAccessIsReadOnly=Žiadny správcu alebo heslo k dispozícii. LDAP prístup budú anonymné a iba pre čítanie. LDAPDescContact=Táto stránka umožňuje definovať atribúty LDAP názov stromu LDAP pre každý údajom o kontaktoch Dolibarr. @@ -1429,7 +1435,7 @@ OptionVATDefault=Štandardné OptionVATDebitOption=Voliteľné služby na inkaso OptionVatDefaultDesc=DPH je splatná:
    - Na dobierku za tovar (používame dátumu vystavenia faktúry)
    - Platby za služby OptionVatDebitOptionDesc=DPH je splatná:
    - Na dobierku za tovar (používame dátumu vystavenia faktúry)
    - Na faktúru (debetné) na služby -SummaryOfVatExigibilityUsedByDefault=Čas DPH exigibility štandardne Podľa požadovaného možností: +SummaryOfVatExigibilityUsedByDefault=Time of VAT exigibility by default according to chosen option: OnDelivery=Na dobierku OnPayment=Na zaplatenie OnInvoice=Na faktúre @@ -1446,7 +1452,7 @@ AccountancyCodeBuy=Nákup účet. kód AgendaSetup=Akcie a agenda Nastavenie modulu PasswordTogetVCalExport=Kľúč povoliť export odkaz PastDelayVCalExport=Neexportovať udalosti staršie ako -AGENDA_USE_EVENT_TYPE=Use events types (managed into menu Setup -> Dictionnary -> Type of agenda events) +AGENDA_USE_EVENT_TYPE=Use events types (managed into menu Setup -> Dictionary -> Type of agenda events) ##### ClickToDial ##### ClickToDialDesc=Tento modul umožňuje pridať ikonu po telefónnych čísel. Kliknutím na túto ikonu bude volať server s konkrétne URL, ktorú definujete nižšie. To možno použiť na volanie call centra systému z Dolibarr ktoré môžu volať na telefónne číslo SIP systému pre príklad. ##### Point Of Sales (CashDesk) ##### diff --git a/htdocs/langs/sk_SK/contracts.lang b/htdocs/langs/sk_SK/contracts.lang index 1b041c78a86..e2db9882421 100644 --- a/htdocs/langs/sk_SK/contracts.lang +++ b/htdocs/langs/sk_SK/contracts.lang @@ -89,6 +89,8 @@ ListOfServicesToExpireWithDuration=Zoznam služieb, ktoré vyprší v %s dní ListOfServicesToExpireWithDurationNeg=Zoznam služieb uplynula od viac ako %s dní ListOfServicesToExpire=Zoznam služieb vyprší NoteListOfYourExpiredServices=Tento zoznam obsahuje iba služby zmlúv pre tretie strany si sú prepojené ako obchodného zástupcu. +StandardContractsTemplate=Standard contracts template +ContactNameAndSignature=For %s, name and signature: ##### Types de contacts ##### TypeContact_contrat_internal_SALESREPSIGN=Obchodný zástupca podpise zmluvy diff --git a/htdocs/langs/sk_SK/exports.lang b/htdocs/langs/sk_SK/exports.lang index 1847b7100a7..920422248e9 100644 --- a/htdocs/langs/sk_SK/exports.lang +++ b/htdocs/langs/sk_SK/exports.lang @@ -8,7 +8,7 @@ ImportableDatas=Importovateľné dataset SelectExportDataSet=Vyberte dátový súbor, ktorý chcete exportovať ... SelectImportDataSet=Vyberte dátový súbor, ktorý chcete importovať ... SelectExportFields=Vyberte polia, ktoré chcete exportovať, alebo vyberte preddefinovanú export profil -SelectImportFields=Zvoľte pole zdrojových súbor, ktorý chcete importovať a ich cieľové polia v databáze pohybom hore a dolu pomocou kotevných %s, alebo vyberte preddefinovanú importu Profil: +SelectImportFields=Choose source file fields you want to import and their target field in database by moving them up and down with anchor %s, or select a predefined import profile: NotImportedFields=Oblasti zdrojovom súbore sa nedovážajú SaveExportModel=Uložiť tento export profil, ak máte v pláne znova neskôr ... SaveImportModel=Uložiť túto importu profilu, ak máte v pláne znova neskôr ... @@ -81,7 +81,7 @@ DoNotImportFirstLine=Neimportujte prvý riadok zdrojového súboru NbOfSourceLines=Počet riadkov v zdrojovom súbore NowClickToTestTheImport=Kontrola parametrov importu, ktoré ste definovali. Ak sú v poriadku, kliknite na tlačidlo "%s" spustíte simuláciu procesu importu (žiadne dáta sa zmení v databáze, je to len simulácia pre túto chvíľu) ... RunSimulateImportFile=Spustite import simuláciu -FieldNeedSource=To fiels v databáze vyžadovať len údaje zo zdrojového súboru +FieldNeedSource=This field requires data from the source file SomeMandatoryFieldHaveNoSource=Niektoré povinné polia nemajú zdroje z dátového súboru InformationOnSourceFile=Informácie o zdrojovom súbore InformationOnTargetTables=Informácie o cieľových oblastiach, @@ -102,14 +102,14 @@ NbOfLinesImported=Počet riadkov úspešne importovaných: %s. DataComeFromNoWhere=Hodnota vložiť pochádza z ničoho nič v zdrojovom súbore. DataComeFromFileFieldNb=Hodnota vložiť pochádza z %s číslo poľa v zdrojovom súbore. DataComeFromIdFoundFromRef=Hodnota, ktorá pochádza z %s číslo poľa zdrojový súbor bude použitý k nájdeniu id nadradený objekt používať (teda obísť %s ktorý má čj. Zo zdrojového súboru musí byť do Dolibarr existuje). -# DataComeFromIdFoundFromCodeId=Code that comes from field number %s of source file will be used to find id of parent object to use (So the code from source file must exists into dictionary %s). Note that if you know id, you can also use it into source file instead of code. Import should work in both cases. +DataComeFromIdFoundFromCodeId=Code that comes from field number %s of source file will be used to find id of parent object to use (So the code from source file must exists into dictionary %s). Note that if you know id, you can also use it into source file instead of code. Import should work in both cases. DataIsInsertedInto=Dáta prichádzajúce zo zdrojového súboru budú vložené do nasledujúceho poľa: DataIDSourceIsInsertedInto=Id z nadradeného objektu zistené na základe údajov v zdrojovom súbore, sa vloží do nasledujúceho poľa: DataCodeIDSourceIsInsertedInto=Id materskej línie našli kódu, bude vložený do nasledujúceho políčka: SourceRequired=Hodnota dát je povinné SourceExample=Príklad možné hodnoty údajov ExampleAnyRefFoundIntoElement=Akékoľvek ref našli prvkov %s -# ExampleAnyCodeOrIdFoundIntoDictionary=Any code (or id) found into dictionary %s +ExampleAnyCodeOrIdFoundIntoDictionary=Any code (or id) found into dictionary %s CSVFormatDesc=Hodnoty oddelené čiarkami formát súboru (. Csv).
    Jedná sa o textový formát súboru, kde sú polia oddelené oddeľovačom [%s]. Ak oddeľovač sa nachádza vo vnútri poľa obsahu je pole zaoblené charakteru kola [%s]. Útek charakter unikať okolo znaku je %s []. Excel95FormatDesc=Excel formát súboru (. Xls)
    Toto je natívny formát programu Excel 95 (BIFF5). Excel2007FormatDesc=Excel formát súboru (. Xlsx)
    Toto je natívny formát programu Excel 2007 (SpreadsheetML). @@ -123,10 +123,10 @@ BankCode=Kód banky DeskCode=Stôl kód BankAccountNumber=Číslo účtu BankAccountNumberKey=Kľúč -# SpecialCode=Special code -# ExportStringFilter=%% allows replacing one or more characters in the text -# ExportDateFilter='YYYY' 'YYYYMM' 'YYYYMMDD': filters by one year/month/day
    'YYYY+YYYY' 'YYYYMM+YYYYMM' 'YYYYMMDD+YYYYMMDD': filters over a range of years/months/days
    '>YYYY' '>YYYYMM' '>YYYYMMDD': filters on the following years/months/days
    '<YYYY' '<YYYYMM' '<YYYYMMDD': filters on the previous years/months/days -# ExportNumericFilter='NNNNN' filters by one value
    'NNNNN+NNNNN' filters over a range of values
    '>NNNNN' filters by lower values
    '>NNNNN' filters by higher values +SpecialCode=Special code +ExportStringFilter=%% allows replacing one or more characters in the text +ExportDateFilter='YYYY' 'YYYYMM' 'YYYYMMDD': filters by one year/month/day
    'YYYY+YYYY' 'YYYYMM+YYYYMM' 'YYYYMMDD+YYYYMMDD': filters over a range of years/months/days
    '>YYYY' '>YYYYMM' '>YYYYMMDD': filters on the following years/months/days
    '<YYYY' '<YYYYMM' '<YYYYMMDD': filters on the previous years/months/days +ExportNumericFilter='NNNNN' filters by one value
    'NNNNN+NNNNN' filters over a range of values
    '>NNNNN' filters by lower values
    '>NNNNN' filters by higher values ## filters SelectFilterFields=Ak chcete filtrovať niektoré hodnoty, stačí zadať hodnoty tu. FilterableFields=Champs Filtrables diff --git a/htdocs/langs/sk_SK/holiday.lang b/htdocs/langs/sk_SK/holiday.lang index 370bab9c23d..afd04a2ddf8 100644 --- a/htdocs/langs/sk_SK/holiday.lang +++ b/htdocs/langs/sk_SK/holiday.lang @@ -8,7 +8,6 @@ NotActiveModCP=Musíte umožniť modul sviatky zobrazenie tejto stránky. NotConfigModCP=Musíte nakonfigurovať modul dovolenku na zobrazenie tejto stránky. Ak to chcete vykonať, kliknite sem . NoCPforUser=Nemáte dopyt na dovolenku. AddCP=Použiť pre dovolenku -CPErrorSQL=SQL chyba: Employe=Zamestnanec DateDebCP=Dátum začatia DateFinCP=Dátum ukončenia diff --git a/htdocs/langs/sk_SK/languages.lang b/htdocs/langs/sk_SK/languages.lang index f7908fa43bc..999b1d36f50 100644 --- a/htdocs/langs/sk_SK/languages.lang +++ b/htdocs/langs/sk_SK/languages.lang @@ -19,6 +19,7 @@ Language_en_SA=Angličtina (Saudská Arábia) Language_en_US=Angličtina (Spojené štáty) Language_en_ZA=Angličtina (Južná Afrika) Language_es_ES=Španielčina +Language_es_DO=Spanish (Dominican Republic) Language_es_AR=Španielčina (Argentína) Language_es_CL=Spanish (Chile) Language_es_HN=Španielčina (Honduras) @@ -38,6 +39,7 @@ Language_fr_NC=Francúzština (Nová Kaledónia) Language_he_IL=Hebrejčina Language_hr_HR=Chorvátsky Language_hu_HU=Maďarčina +Language_id_ID=Indonesian Language_is_IS=Islandský Language_it_IT=Taliančina Language_ja_JP=Japonec diff --git a/htdocs/langs/sk_SK/mails.lang b/htdocs/langs/sk_SK/mails.lang index e622961437c..10915612721 100644 --- a/htdocs/langs/sk_SK/mails.lang +++ b/htdocs/langs/sk_SK/mails.lang @@ -79,6 +79,7 @@ MailtoEMail=Hyper odkaz na e-mail ActivateCheckRead=Nechá sa použiť "" Unsubcribe odkaz ActivateCheckReadKey=Tlačidlo slúži pre šifrovanie URL využitie pre "prečítanie" a "Unsubcribe" funkcia EMailSentToNRecipients=Email bol odoslaný na %s príjemcom. +XTargetsAdded=%s recipients added into target list EachInvoiceWillBeAttachedToEmail=A document using default invoice document template will be created and attached to each email. MailTopicSendRemindUnpaidInvoices=Reminder of invoice %s (%s) SendRemind=Send reminder by EMails diff --git a/htdocs/langs/sk_SK/main.lang b/htdocs/langs/sk_SK/main.lang index 7a4a03ba5ea..aca87ecdbf2 100644 --- a/htdocs/langs/sk_SK/main.lang +++ b/htdocs/langs/sk_SK/main.lang @@ -551,6 +551,7 @@ MailSentBy=E-mail zaslaná TextUsedInTheMessageBody=E-mail telo SendAcknowledgementByMail=Poslať Ack. e-mailom NoEMail=Žiadny e-mail +NoMobilePhone=No mobile phone Owner=Majiteľ DetectedVersion=Zistená verzia FollowingConstantsWillBeSubstituted=Nasledujúci konštanty bude nahradený zodpovedajúcou hodnotou. diff --git a/htdocs/langs/sk_SK/products.lang b/htdocs/langs/sk_SK/products.lang index cfb296c5722..f16ba7d540a 100644 --- a/htdocs/langs/sk_SK/products.lang +++ b/htdocs/langs/sk_SK/products.lang @@ -28,8 +28,10 @@ ProductsAndServicesStatistics=Produkty a služby štatistika ProductsStatistics=Produkty štatistiky ProductsOnSell=Dostupné produkty ProductsNotOnSell=Vyradené produkty +ProductsOnSellAndOnBuy=Products not for sale nor purchase ServicesOnSell=Dostupné služby ServicesNotOnSell=Zastarané služby +ServicesOnSellAndOnBuy=Services not for sale nor purchase InternalRef=Interné referenčné číslo LastRecorded=Najnovšie produkty / služby na predaji zaznamenaný LastRecordedProductsAndServices=Posledné %s zaznamenaný produktov / služieb @@ -70,6 +72,8 @@ PublicPrice=Verejné cena CurrentPrice=Aktuálna cena NewPrice=Nová cena MinPrice=Minim. predajná cena +MinPriceHT=Minim. selling price (net of tax) +MinPriceTTC=Minim. selling price (inc. tax) CantBeLessThanMinPrice=Predajná cena nesmie byť nižšia ako minimálna povolená pre tento produkt (%s bez dane). Toto hlásenie sa môže tiež zobrazí, ak zadáte príliš dôležitú zľavu. ContractStatus=Stav zmluvy ContractStatusClosed=Zatvorené @@ -179,6 +183,7 @@ ProductIsUsed=Tento produkt sa používa NewRefForClone=Ref nového produktu / služby CustomerPrices=Zákazníci ceny SuppliersPrices=Dodávatelia ceny +SuppliersPricesOfProductsOrServices=Suppliers prices (of products or services) CustomCode=Colné kód CountryOrigin=Krajina pôvodu HiddenIntoCombo=Skryté do vybraných zoznamov @@ -208,6 +213,7 @@ CostPmpHT=Čistá hodnota VWAP ProductUsedForBuild=Auto spotrebujú pri výrobe ProductBuilded=Výroba dokončená ProductsMultiPrice=Produkt multi-cena +ProductsOrServiceMultiPrice=Customers prices (of products or services, multi-prices) ProductSellByQuarterHT=Produkty obrat štvrťročné VWAP ServiceSellByQuarterHT=Služby obrat štvrťročné VWAP Quarter1=Prvý. Štvrťrok diff --git a/htdocs/langs/sk_SK/shop.lang b/htdocs/langs/sk_SK/shop.lang index e8369aa24f5..db6390a243c 100644 --- a/htdocs/langs/sk_SK/shop.lang +++ b/htdocs/langs/sk_SK/shop.lang @@ -1,4 +1,5 @@ # Dolibarr language file - Source file is en_US - shop +FailedConnectDBCheckModuleSetup=Failed to connect to oscommerce database. Check your module setup Shop=Obchod ShopWeb=Web Shop LastOrders=Posledné objednávky diff --git a/htdocs/langs/sk_SK/stocks.lang b/htdocs/langs/sk_SK/stocks.lang index 592cec33ccf..9f3a82d951d 100644 --- a/htdocs/langs/sk_SK/stocks.lang +++ b/htdocs/langs/sk_SK/stocks.lang @@ -112,6 +112,7 @@ ReplenishmentOrdersDesc=Toto je zoznam všetkých otvorených dodávateľských Replenishments=Splátky NbOfProductBeforePeriod=Množstvo produktov %s na sklade, než zvolené obdobie (<%s) NbOfProductAfterPeriod=Množstvo produktov %s na sklade po zvolené obdobie (> %s) +MassMovement=Mass movement MassStockMovement=Mass pohyb zásob SelectProductInAndOutWareHouse=Vyberte si produkt, množstvo, zdrojový sklad a cieľový sklad, potom kliknite na "%s". Akonáhle sa tak stane pre všetky požadované pohyby, kliknite na "%s". RecordMovement=Záznam transfert diff --git a/htdocs/langs/sl_SI/admin.lang b/htdocs/langs/sl_SI/admin.lang index 7f152f703a7..85f31da4387 100644 --- a/htdocs/langs/sl_SI/admin.lang +++ b/htdocs/langs/sl_SI/admin.lang @@ -1,5 +1,5 @@ # Dolibarr language file - Source file is en_US - admin -Foundation=Foundation +Foundation=Ustanova Version=Različica VersionProgram=Različica programa VersionLastInstall=Različica osnovne namestitve @@ -12,7 +12,7 @@ SessionId=ID seje SessionSaveHandler=Rutina za shranjevanje seje SessionSavePath=Lokalizacija shranjevanja seje PurgeSessions=Odstranitev sej -ConfirmPurgeSessions=Do you really want to purge all sessions ? This will disconnect every user (except yourself). +ConfirmPurgeSessions=Ali res želite odstraniti vse seje ? S tem boste odklopili vse uporabnike (razen vas samih). NoSessionListWithThisHandler=Shranitev rutine za shranjevanje seje v vašem PHP ne omogoča prikaza seznama vseh sej, ki se izvajajo. LockNewSessions=Zaklepanje novih povezav ConfirmLockNewSessions=Ali zares želite omejiti vse nove Dolibarr povezave samo nase. Samo uporabnik %s se bo potem lahko priklopil. @@ -45,15 +45,15 @@ ErrorModuleRequireDolibarrVersion=Napaka, Ta modul zahteva Dolibarr različico % ErrorDecimalLargerThanAreForbidden=Napaka, višja natančnost od %s ni podprta. DictionarySetup=Dictionary setup Dictionary=Dictionaries -ErrorReservedTypeSystemSystemAuto=Value 'system' and 'systemauto' for type is reserved. You can use 'user' as value to add your own record -ErrorCodeCantContainZero=Code can't contain value 0 +ErrorReservedTypeSystemSystemAuto=Vrednosti 'system' in 'systemauto' za tip sta rezervirani. Uporabite lahko 'user' za dodajanje lastnih zapisov +ErrorCodeCantContainZero=Koda ne sme vsebovati vrednosti 0 DisableJavascript=Onemogoči JavaScript in Ajax funkcije ConfirmAjax=Za potrditev uporabi Ajax pojavni meni UseSearchToSelectCompanyTooltip=Also if you have a large number of third parties (> 100 000), you can increase speed by setting constant COMPANY_DONOTSEARCH_ANYWHERE to 1 in Setup->Other. Search will then be limited to start of string. -UseSearchToSelectCompany=Use autocompletion fields to choose third parties instead of using a list box. +UseSearchToSelectCompany=Za izbiranje partnerjev uporabite polja z avtomatsko izpolnitvijo namesto seznama. ActivityStateToSelectCompany= Dodaj opcijo filtra za prikaz/skritje partnerjev, ki so trenutno neaktivni ali so prekinili aktivnosti UseSearchToSelectContactTooltip=Also if you have a large number of third parties (> 100 000), you can increase speed by setting constant CONTACT_DONOTSEARCH_ANYWHERE to 1 in Setup->Other. Search will then be limited to start of string. -UseSearchToSelectContact=Use autocompletion fields to choose contact (instead of using a list box). +UseSearchToSelectContact=Zaizbiro kontakta uporabite polja z avtomatsko izpolnitvijo (namesto uporabe seznama). SearchFilter=Opcije iskalnega filtra NumberOfKeyToSearch=Število znakov za sproženje iskanja: %s ViewFullDateActions=Prikaži celotne datume aktivnosti na tretjem listu ViewFullDateActions=Prikaz polnih datumov aktivnosti v tretjem zavihku @@ -66,9 +66,9 @@ PreviewNotAvailable=Predogled ni na voljo ThemeCurrentlyActive=Trenutno aktivna tema CurrentTimeZone=Časovni pas PHP strežnika Space=Presledek -Table=Table +Table=Tabela Fields=Polja -Index=Index +Index=Indeks Mask=Maska NextValue=Naslednja vrednost NextValueForInvoices=Naslednja vrednost (fakture) @@ -114,9 +114,9 @@ ParameterInDolibarr=Parameter %s LanguageParameter=Jezikovni parameter %s LanguageBrowserParameter=Parameter %s LocalisationDolibarrParameters=Lokalizacijski parameteri -ClientTZ=Client Time Zone (user) -ClientHour=Client time (user) -OSTZ=časovni pas OS strežnika +ClientTZ=Časovni pas klienta (uporabnika) +ClientHour=Ura klienta (uporabnika) +OSTZ=Časovni pas OS strežnika PHPTZ=Časovni pas PHP strežnika PHPServerOffsetWithGreenwich=Odstopanje PHP strežnika od Greenwicha (sekunde) ClientOffsetWithGreenwich=Odstopanje brskalnika klienta od Greenwicha (seconds) @@ -141,7 +141,7 @@ SystemInfo=Sistemske informacije SystemTools=Sistemska orodja SystemToolsArea=Področje sistemskih orodij SystemToolsAreaDesc=To področje omogoča administrativne funkcije. Preko menija izberite funkcijo, ki jo iščete. -Purge=Purge +Purge=Počisti PurgeAreaDesc=Ta stran omogoča brisanje vseh datotek, ki jih je kreiral in shranil program Dolibarr (začasne datoteke ali vse datoteke v mapi %s). Uporaba te funkcije ni potrebna. Namenjena je uporabnikom, katerih Dolibarr gostuje pri ponudniku, ki ne dovoljuje brisanja datotek, ki jih je kreiral web strežnik. PurgeDeleteLogFile=Izbris log datoteke %s, ki jo je kreiral modul Syslog (ni tveganja izgube podatkov) PurgeDeleteTemporaryFiles=Izbris vseh začasnih datotek (ni tveganja izgube podatkov) @@ -170,19 +170,19 @@ ImportPostgreSqlDesc=Za uvoz datoteke z varnostno kopijo, morate uporabiti ukaz ImportMySqlCommand=%s %s < mybackupfile.sql ImportPostgreSqlCommand=%s %s mybackupfile.sql FileNameToGenerate=Ime datoteke za generiranje -Compression=Compression +Compression=Kompresija CommandsToDisableForeignKeysForImport=Ukaz za onemogočenje tujega ključa pri uvozu -CommandsToDisableForeignKeysForImportWarning=Mandatory if you want to be able to restore your sql dump later +CommandsToDisableForeignKeysForImportWarning=Obvezno, če želite imeti možnost kasnejše obnovitve vašega sql izpisa ExportCompatibility=Kompatibilnost generirane izvozne datoteke MySqlExportParameters=MySQL izvozni parametri -PostgreSqlExportParameters= PostgreSQL export parameters +PostgreSqlExportParameters= PostgreSQL izvozni parametri UseTransactionnalMode=Uporabi transakcijski način FullPathToMysqldumpCommand=Celotna pot do ukaza mysqldump FullPathToPostgreSQLdumpCommand=Celotna pot do ukaza pg_dump ExportOptions=Izvozne opcije AddDropDatabase=Dodaj ukaz OPUSTI BAZO PODATKOV AddDropTable=Dodaj ukaz OPUSTI TABELO -ExportStructure=Structure +ExportStructure=Struktura Datas=Podatki NameColumn=Imenuj kolone ExtendedInsert=Razširjeno vstavljanje @@ -233,7 +233,9 @@ OfficialWebSiteFr=Uradna spletna stran v francoščini OfficialWiki=Dolibarr Wiki OfficialDemo=Dolibarr online demo OfficialMarketPlace=Uradna tržnica za zunanje module/dodatke -OfficialWebHostingService=Official web hosting services (Cloud hosting) +OfficialWebHostingService=Referenčne storitve spletnega gostovanja (gostovanje v oblaku) +ReferencedPreferredPartners=Preferred Partners +OtherResources=Autres ressources ForDocumentationSeeWiki=Glede dokumentacije za uporabnike in razvojnike (Doc, FAQ...),
    poglejte na Dolibarr Wiki:
    %s ForAnswersSeeForum=Za vsa ostala vprašanja/pomoč lahko uporabite Dolibarr forum:
    %s HelpCenterDesc1=To področje vam omogoča dostop do storitve »Dolibarr Help Support«. @@ -277,27 +279,27 @@ ModuleFamilyFinancial=Finančni moduli (računovodstvo/blagajna) ModuleFamilyECM=ECM MenuHandlers=Menijski vmesniki MenuAdmin=Urejevalnik menijev -DoNotUseInProduction=Do not use in production +DoNotUseInProduction=Ne uporabljajte v proizvodnji ThisIsProcessToFollow=To je nastavitev za proces: StepNb=Korak %s FindPackageFromWebSite=Poiščite paket, ki omogoča funkcijo, ki jo želite (na primer na spletni strani %s). DownloadPackageFromWebSite=Prenesi paket z internetne strani. UnpackPackageInDolibarrRoot=Razpakiraj paketno datoteko v Dolibarr korensko mapo %s SetupIsReadyForUse=Instalacija je zaključena in Dolibarr je pripravljen na uporabo s to novo komponento. -NotExistsDirect=The alternative root directory is not defined.
    -InfDirAlt=Since version 3 it is possible to define an alternative root directory.This allows you to store, same place, plug-ins and custom templates.
    Just create a directory at the root of Dolibarr (eg: custom).
    -InfDirExample=
    Then declare it in the file conf.php
    $dolibarr_main_url_root_alt='http://myserver/custom'
    $dolibarr_main_document_root_alt='/path/of/dolibarr/htdocs/custom'
    *These lines are commented with "#", to uncomment only remove the character. -YouCanSubmitFile=Select module: +NotExistsDirect=Ni definirana alternativna korenska mapa.
    +InfDirAlt=Od 3. različice dalje je možno definirati alternativno korensko mapo. To omogoča shranjevanje vtičnikov in uporabniških predlog na isto mesto.
    Ustvariti je potrebno samo mapo v korenu Dolibarr (npr: custom).
    +InfDirExample=
    Nato jo določite v datoteki conf.php
    $dolibarr_main_url_root_alt='http://myserver/custom'
    $dolibarr_main_document_root_alt='/path/of/dolibarr/htdocs/custom'
    *Te vrstice so označene kot komentar z znakom "#", če želite, da bodo vrstice izvedene, odstranite ta znak. +YouCanSubmitFile=Izberi modul: CurrentVersion=Trenutna različica Dolibarr CallUpdatePage=Pojdite na stran za nadgradnjo strukture in podatkov v podatkovni bazi: %s. LastStableVersion=Zadnja stabilna različica GenericMaskCodes=Vnesete lahko kakršnokoli številčno masko. V tej maski lahko uporabite naslednje oznake:
    {000000} ustreza številki, ki se poveča pri vsakem %s. Vnesite toliko ničel, kot je želena dolžina števca. Števec se bo zapolnil z ničlami na levi strani, da bi velikost ustrezala maski.
    {000000+000} enako kot prej, vendar je desno od znaka + odmik, ki je uporabljen na prvi %s.
    {000000@x} enako kot prej, vendar se števec resetira na 0, ko se doseže mesec x (x je med 1 in 12). Če je uporabljena ta opcija, ,in je x enak ali večji od 2, je zahtevana tudi sekvenca {yy}{mm} ali {yyyy}{mm}.
    {dd} dan (01 do 31).
    {mm} mesec (01 do 12).
    {yy}, {yyyy} ali {y} leto, izraženo z 2, 4 ali 1 številko.
    -GenericMaskCodes2={cccc} the client code on n characters
    {cccc000} the client code on n characters is followed by a counter dedicated for customer. This counter dedicated to customer is reset at same time than global counter.
    {tttt} The code of company type on n characters (see dictionary-company types).
    +GenericMaskCodes2={cccc} koda klienta z n znaki
    {cccc000} koda klienta z n znaki se nadaljuje s števcem stranke. Ta namenski števec stranke se resetira obenem z globalnim števcem.
    {tttt} Koda podjetja z n znaki (glejte slovar-tipi podjetij).
    GenericMaskCodes3=Vsi ostali znaki v maski bodo ostali nedotaknjeni.
    Presledki niso dovoljeni.
    GenericMaskCodes4a=Primer 99-ega %s partnerja podjetja narejen 2007-01-31:
    GenericMaskCodes4b=Primer partnerja 99, kreiranega 2007-03-01:
    -GenericMaskCodes4c=Example on product created on 2007-03-01:
    -GenericMaskCodes5=ABC{yy}{mm}-{000000} will give ABC0701-000099
    {0000+100@1}-ZZZ/{dd}/XXX will give 0199-ZZZ/31/XXX +GenericMaskCodes4c=Primer proizvoda, kreiranega 2007-03-01:
    +GenericMaskCodes5=ABC{yy}{mm}-{000000} bo dal rezultat ABC0701-000099
    {0000+100@1}-ZZZ/{dd}/XXX bo dal rezultat 0199-ZZZ/31/XXX GenericNumRefModelDesc=Predlaga prilagodljivo številko glede na definirano masko. ServerAvailableOnIPOrPort=Strežnik je na voljo na naslovu %s na vratih %s ServerNotAvailableOnIPOrPort=Strežnik ni na voljo na naslovu %s na vratih %s @@ -321,7 +323,7 @@ LanguageFilesCachedIntoShmopSharedMemory=Datoteke .lang naložene v spomin v sku ExamplesWithCurrentSetup=Primeri pri trenutno veljavnih nastavitvah ListOfDirectories=Seznam map z OpenDocument predlogami ListOfDirectoriesForModelGenODT=Seznam imenikov, ki vsebujejo datoteke predlog v formatu OpenDocument.

    Tukaj vstavite celotno pot imenikov.
    Dodajte prelom vrstice CR med med vsako mapo.
    Če želite dodati mapo GED modula, dodajte tukaj DOL_DATA_ROOT/ecm/imevašemape.

    Datoteke v teh mapah morajo imeti končnico .odt -NumberOfModelFilesFound=Number of ODT/ODS templates files found in those directories +NumberOfModelFilesFound=Število ODT/ODS predlog v teh mapah ExampleOfDirectoriesForModelGen=Primeri sintakse:
    c:\\mydir
    /home/mydir
    DOL_DATA_ROOT/ecm/ecmdir FollowingSubstitutionKeysCanBeUsed=Z dodatkom takih oznak v predlogo, boste ob kreiranju dokumenta dobili personalizirane vrednosti: FullListOnOnlineDocumentation=http://wiki.dolibarr.org @@ -341,47 +343,47 @@ PDF=PDF PDFDesc=Nastavite lahko vsak globalne možnosti, povezanih z PDF generacije PDFAddressForging=Pravila oblikovati naslov polja HideAnyVATInformationOnPDF=Skrij vse informacije v zvezi z DDV za nastali PDF -HideDescOnPDF=Hide products description on generated PDF -HideRefOnPDF=Hide products ref. on generated PDF -HideDetailsOnPDF=Hide products lines details on generated PDF +HideDescOnPDF=Skrij opis proizvoda v ustvarjenem PDF +HideRefOnPDF=Skrij reference proizvoda v ustvarjenem PDF +HideDetailsOnPDF=Skrij vrstice s podrobnostmi o proizvodu v ustvarjenem PDF Library=Knjižnica UrlGenerationParameters=Parametri za zagotovitev URL SecurityTokenIsUnique=Uporabite edinstven parameter securekey za vsako URL EnterRefToBuildUrl=Vnesite sklic za predmet %s GetSecuredUrl=Get izračuna URL -ButtonHideUnauthorized=Hide buttons for unauthorized actions instead of showing disabled buttons -OldVATRates=Old VAT rate -NewVATRates=New VAT rate -PriceBaseTypeToChange=Modify on prices with base reference value defined on -MassConvert=Launch mass convert +ButtonHideUnauthorized=Skrij gumbe za neavtorizirano uporabo, namesto prikaza zasenčenih gumbov +OldVATRates=Stara stopnja DDV +NewVATRates=Nova stopnja DDV +PriceBaseTypeToChange=Sprememba cen z definirano osnovno referenčno vrednostjo +MassConvert=Poženi množično pretvorbo String=Niz -TextLong=Long text -Int=Integer -Float=Float -DateAndTime=Date and hour -Unique=Unique -Boolean=Boolean (Checkbox) +TextLong=Dolgo besedilo +Int=Celo število +Float=Plavajoče +DateAndTime=Datum in ura +Unique=Enoličen +Boolean=Boolov izraz (potrditveno polje) ExtrafieldPhone = Telefon ExtrafieldPrice = Cena -ExtrafieldMail = Email -ExtrafieldSelect = Select list -ExtrafieldSelectList = Select from table -ExtrafieldSeparator=Separator -ExtrafieldCheckBox=Checkbox -ExtrafieldRadio=Radio button -ExtrafieldParamHelpselect=Parameters list have to be like key,value

    for exemple :
    1,value1
    2,value2
    3,value3
    ...

    In order to have the list depending on another :
    1,value1|parent_list_code:parent_key
    2,value2|parent_list_code:parent_key -ExtrafieldParamHelpcheckbox=Parameters list have to be like key,value

    for exemple :
    1,value1
    2,value2
    3,value3
    ... -ExtrafieldParamHelpradio=Parameters list have to be like key,value

    for exemple :
    1,value1
    2,value2
    3,value3
    ... +ExtrafieldMail = E-pošta +ExtrafieldSelect = Izberi seznam +ExtrafieldSelectList = Izberi iz tabele +ExtrafieldSeparator=Ločilo +ExtrafieldCheckBox=Potrditveno polje +ExtrafieldRadio=Radijski gumb +ExtrafieldParamHelpselect=Seznam parametrov mora biti kot ključ,vrednost

    na primer :
    1,vrednost1
    2,vrednost2
    3,vrednost3
    ...

    Če želite imeti seznam odvisen od drugega :
    1,vrednost1|parent_list_code:parent_key
    2,vrednost2|parent_list_code:parent_key +ExtrafieldParamHelpcheckbox=Seznam parametrov mora biti kot ključ,vrednost

    na primer :
    1,vrednost1
    2,vrednost2
    3,vrednost3
    ... +ExtrafieldParamHelpradio=Seznam parametrov mora biti kot ključ,vrednost

    na primer :
    1,vrednost1
    2,vrednost2
    3,vrednost3
    ... ExtrafieldParamHelpsellist=Parameters list comes from a table
    Syntax : table_name:label_field:id_field::filter
    Example : c_typent:libelle:id::filter

    filter can be a simple test (eg active=1) to display only active value
    if you want to filter on extrafields use syntaxt extra.fieldcode=... (where field code is the code of extrafield)

    In order to have the list depending on another :
    c_typent:libelle:id:parent_list_code|parent_column:filter -LibraryToBuildPDF=Library used to build PDF +LibraryToBuildPDF=Uporabljena knjižnica za ustvarjanje PDF WarningUsingFPDF=Warning: Your conf.php contains directive dolibarr_pdf_force_fpdf=1. This means you use the FPDF library to generate PDF files. This library is old and does not support a lot of features (Unicode, image transparency, cyrillic, arab and asiatic languages, ...), so you may experience errors during PDF generation.
    To solve this and have a full support of PDF generation, please download TCPDF library, then comment or remove the line $dolibarr_pdf_force_fpdf=1, and add instead $dolibarr_lib_TCPDF_PATH='path_to_TCPDF_dir' LocalTaxDesc=Some countries apply 2 or 3 taxes on each invoice line. If this is the case, choose type for second and third tax and its rate. Possible type are:
    1 : local tax apply on products and services without vat (vat is not applied on local tax)
    2 : local tax apply on products and services before vat (vat is calculated on amount + localtax)
    3 : local tax apply on products without vat (vat is not applied on local tax)
    4 : local tax apply on products before vat (vat is calculated on amount + localtax)
    5 : local tax apply on services without vat (vat is not applied on local tax)
    6 : local tax apply on services before vat (vat is calculated on amount + localtax) SMS=SMS LinkToTestClickToDial=Enter a phone number to call to show a link to test the ClickToDial url for user %s -RefreshPhoneLink=Refresh link +RefreshPhoneLink=Osveži pšovezavo LinkToTest=Clickable link generated for user %s (click phone number to test) KeepEmptyToUseDefault=Keep empty to use default value -DefaultLink=Default link +DefaultLink=Privzeta povezava ValueOverwrittenByUserSetup=Warning, this value may be overwritten by user specific setup (each user can set his own clicktodial url) ExternalModule=External module - Installed into directory %s BarcodeInitForThirdparties=Mass barcode init for thirdparties @@ -469,10 +471,10 @@ Module400Name=Projekti Module400Desc=Upravljanje projektov znotraj drugih modulov Module410Name=Internetni koledar Module410Desc=Integracija internetnega koledarja -Module500Name=Special expenses (tax, social contributions, dividends) -Module500Desc=Management of special expenses like taxes, social contribution, dividends and salaries +Module500Name=Posebni stroški (davki, socialni prispevki, dividende) +Module500Desc=Upravljanje posebnih stroškov, kot so davki, socialni prispevki, dividende in plače Module510Name=Salaries -Module510Desc=Management of empoyees salaries and payments +Module510Desc=Management of employees salaries and payments Module600Name=Obvestila Module600Desc=Pošiljanje obvestil o nekaterih Dolibarr dogodkih po e-mailu kontaktom pri partnerjih Module700Name=Donacije @@ -490,26 +492,26 @@ Module1780Desc=Upravljanje kategorij (proizvodi, dobavitelji in kupci) Module2000Name=Fck urejevalnik Module2000Desc=WYSIWYG urejevalnik Module2300Name=Cron -Module2300Desc=Scheduled task management +Module2300Desc=Načrtovano upravljanje nalog Module2400Name=Dnevni red Module2400Desc=Upravljanje aktivnosti/nalog in dnevnih redov Module2500Name=Upravljanje elektronskih vsebin Module2500Desc=Shranjevanje dokumentov in dajanje v skupno rabo -Module2600Name= Spletne storitve -Module2600Desc= Omogočanje Dolibarr strežnika za spletne storitve -Module2700Name= Gravatar -Module2700Desc= Uporaba online Gravatar storitev (www.gravatar.com) za prikaz fotografij uporabnikov/članov (na osnovi njihovih emailov). Potreben je internetni dostop +Module2600Name=Spletne storitve +Module2600Desc=Omogočanje Dolibarr strežnika za spletne storitve +Module2700Name=Gravatar +Module2700Desc=Uporaba online Gravatar storitev (www.gravatar.com) za prikaz fotografij uporabnikov/članov (na osnovi njihovih emailov). Potreben je internetni dostop Module2800Desc=FTP Client -Module2900Name= GeoIPMaxmind -Module2900Desc= Možnost konverzije GeoIP Maxmind -Module3100Name= Skype -Module3100Desc= Add a Skype button into card of adherents / third parties / contacts +Module2900Name=GeoIPMaxmind +Module2900Desc=Možnost konverzije GeoIP Maxmind +Module3100Name=Skype +Module3100Desc=Add a Skype button into card of adherents / third parties / contacts Module5000Name=Skupine podjetij Module5000Desc=Omogoča upravljaje skupine podjetij Module6000Name=Workflow Module6000Desc=Workflow management -Module20000Name=Holidays -Module20000Desc=Declare and follow employees holidays +Module20000Name=Počitnice +Module20000Desc=Določitev in sledenje dopustov zaposlenih Module50000Name=PayBox Module50000Desc=Modul za omogočanje strani za spletno plačevanje s kreditno kartico - PayBox Module50100Name=Prodajalne @@ -520,10 +522,10 @@ Module54000Name=PrintIPP Module54000Desc=Print via Cups IPP Printer. Module55000Name=Open Poll Module55000Desc=Module to make online polls (like Doodle, Studs, Rdvz, ...) -Module59000Name=Margins -Module59000Desc=Module to manage margins -Module60000Name=Commissions -Module60000Desc=Module to manage commissions +Module59000Name=Marže +Module59000Desc=Modul za upravljanje z maržami +Module60000Name=Provizije +Module60000Desc=Modul za upravljanje s provizijami Module150010Name=Batch number, eat-by date and sell-by date Module150010Desc=batch number, eat-by date and sell-by date management for product Permission11=Branje računov @@ -639,7 +641,7 @@ Permission238=Manually send mailings Permission239=Delete mailings after validation or sent Permission241=Branje kategorij Permission242=Kreiranje/spreminjanje kategorij -Permission243=Delete kategorij +Permission243=Izbriši kategorije Permission244=Ogled vsebine skritih kategorij Permission251=Branje ostalih uporabnikov ali skupin PermissionAdvanced251=Branje ostalih uporabnikov @@ -681,6 +683,10 @@ Permission401=Branje popustov Permission402=Kreiranje/spreminjanje popustov Permission403=Potrjevanje popustov Permission404=Brisanje popustov +Permission510=Read Salaries +Permission512=Ustvari/spremeni plače +Permission514=Izbris plač +Permission517=Izvoz plač Permission531=Branje storitev Permission532=Kreiranje/spreminjanje storitev Permission534=Brisanje storitev @@ -999,7 +1005,7 @@ ExtraFieldsSupplierOrders=Complementary attributes (orders) ExtraFieldsSupplierInvoices=Complementary attributes (invoices) ExtraFieldsProject=Complementary attributes (projects) ExtraFieldsProjectTask=Complementary attributes (tasks) -ExtraFieldHasWrongValue=Pripišejo %s ima napačno vrednost. +ExtraFieldHasWrongValue=Attribute %s has a wrong value. AlphaNumOnlyCharsAndNoSpace=only alphanumericals characters without space AlphaNumOnlyLowerCharsAndNoSpace=only alphanumericals and lower case characters without space SendingMailSetup=Nastavitev pošiljanja z elektronsko pošto @@ -1018,13 +1024,13 @@ SuhosinSessionEncrypt=Session storage encrypted by Suhosin ConditionIsCurrently=Condition is currently %s TestNotPossibleWithCurrentBrowsers=Automatic detection not possible YouUseBestDriver=You use driver %s that is best driver available currently. -YouDoNotUseBestDriver=You use drive %s but driver %s is recommanded. +YouDoNotUseBestDriver=You use drive %s but driver %s is recommended. NbOfProductIsLowerThanNoPb=You have only %s products/services into database. This does not required any particular optimization. SearchOptim=Search optimization YouHaveXProductUseSearchOptim=You have %s product into database. You should add the constant PRODUCT_DONOTSEARCH_ANYWHERE to 1 into Home-Setup-Other, you limit the search to the beginning of strings making possible for database to use index and you should get an immediate response. BrowserIsOK=You are using the web browser %s. This browser is ok for security and performance. BrowserIsKO=You are using the web browser %s. This browser is known to be a bad choice for security, performance and reliability. We recommand you to use Firefox, Chrome, Opera or Safari. -XDebugInstalled=XDebug est chargé. +XDebugInstalled=XDebug is loaded. XCacheInstalled=XCache is loaded. AddRefInList=Display customer/supplier ref into list (select list or combobox) and most of hyperlink FieldEdition=Edition of field %s @@ -1073,7 +1079,7 @@ WebCalServer=Strežnik, na katerem gostuje koledarska baza podatkov WebCalDatabaseName=Ime baze podatkov WebCalUser=Uporabnik, ki dostopa do baze podatkov WebCalSetupSaved=Nastavitve internetnega koledarja so bile uspešno shranjene. -WebCalTestOk=Povezava na strežnik '%s', na bazo '%s', kot uporabnik '%s', je bila uspešna. +WebCalTestOk=Connection to server '%s' on database '%s' with user '%s' successful. WebCalTestKo1=Povezava na strežnik '%s' je bila uspešna, vendar baza podatkov '%s' ni dosegljiva. WebCalTestKo2=Povezava na strtežnik '%s', kot uporabnik '%s', ni uspela. WebCalErrorConnectOkButWrongDatabase=Povezava je uspela, vendar baza podatkov ni videti kot baza podatkov internetnega koledarja. @@ -1119,7 +1125,7 @@ WatermarkOnDraftProposal=Watermark on draft commercial proposals (none if empty) OrdersSetup=Nastavitve upravljanja z naročili OrdersNumberingModules=Moduli za številčenje naročil OrdersModelModule=Modeli obrazcev naročil -HideTreadedOrders=Skrij obravnavana ali preklicana naročila na seznamu +HideTreadedOrders=Hide the treated or cancelled orders in the list ValidOrderAfterPropalClosed=Za potrditev naročila po zaključku ponudbe, naj ne bo možno preskočiti začasnega naročila FreeLegalTextOnOrders=Poljubno besedilo na naročilih WatermarkOnDraftOrders=Watermark on draft orders (none if empty) @@ -1214,9 +1220,9 @@ LDAPSynchroKO=Failed synchronization test LDAPSynchroKOMayBePermissions=Failed synchronization test. Check that connexion to server is correctly configured and allows LDAP udpates LDAPTCPConnectOK=TCP connect to LDAP server successful (Server=%s, Port=%s) LDAPTCPConnectKO=TCP connect to LDAP server failed (Server=%s, Port=%s) -LDAPBindOK=Connect/Authentificate to LDAP server sucessfull (Server=%s, Port=%s, Admin=%s, Password=%s) +LDAPBindOK=Connect/Authentificate to LDAP server successful (Server=%s, Port=%s, Admin=%s, Password=%s) LDAPBindKO=Connect/Authentificate to LDAP server failed (Server=%s, Port=%s, Admin=%s, Password=%s) -LDAPUnbindSuccessfull=Disconnect successfull +LDAPUnbindSuccessfull=Disconnect successful LDAPUnbindFailed=Disconnect failed LDAPConnectToDNSuccessfull=Connection au DN (%s) r�ussie LDAPConnectToDNFailed=Connection au DN (%s) �chou�e @@ -1273,7 +1279,7 @@ LDAPFieldSidExample=Example : objectsid LDAPFieldEndLastSubscription=Date of subscription end LDAPFieldTitle=Položaj/Funkcija LDAPFieldTitleExample=Example: title -LDAPParametersAreStillHardCoded=LDAP parametres are still hardcoded (in contact class) +LDAPParametersAreStillHardCoded=LDAP parameters are still hardcoded (in contact class) LDAPSetupNotComplete=LDAP setup not complete (go on others tabs) LDAPNoUserOrPasswordProvidedAccessIsReadOnly=No administrator or password provided. LDAP access will be anonymous and in read only mode. LDAPDescContact=This page allows you to define LDAP attributes name in LDAP tree for each data found on Dolibarr contacts. @@ -1429,7 +1435,7 @@ OptionVATDefault=Standard OptionVATDebitOption=Opcija storitev ob zapadlosti OptionVatDefaultDesc=DDV zapade:
    - ob dobavi/plačilu blaga
    - ob plačilu storitev OptionVatDebitOptionDesc=DDV zapade:
    - ob dobavi/plačilu blaga
    - ob računu (zapadlosti) za storitev -SummaryOfVatExigibilityUsedByDefault=Privzeta zapadlost DDV glede na izbrano opcijo: +SummaryOfVatExigibilityUsedByDefault=Time of VAT exigibility by default according to chosen option: OnDelivery=Ob dobavi OnPayment=Ob plačilu OnInvoice=Ob izdaji računa @@ -1446,7 +1452,7 @@ AccountancyCodeBuy=Purchase account. code AgendaSetup=Nastavitev modula za aktivnosti in dnevni red PasswordTogetVCalExport=Ključ za avtorizacijo izvoznega linka PastDelayVCalExport=Ne izvažaj dogodekov, starejših od -AGENDA_USE_EVENT_TYPE=Use events types (managed into menu Setup -> Dictionnary -> Type of agenda events) +AGENDA_USE_EVENT_TYPE=Use events types (managed into menu Setup -> Dictionary -> Type of agenda events) ##### ClickToDial ##### ClickToDialDesc=Ta modul omogoča dodajanje ikone za telefonsko številko Dolibarr kontakta. S klikom na ikono boste poklicali strežnik z določenim URL naslovom, ki ga definirate spodaj. To lahko uporabite za klic sistema klicnega centra iz aplikacije Dolibarr, ki lahko kliče telefonsko številko na primer na sistemu SIP. ##### Point Of Sales (CashDesk) ##### diff --git a/htdocs/langs/sl_SI/agenda.lang b/htdocs/langs/sl_SI/agenda.lang index 3b56725c738..99ceb434b13 100644 --- a/htdocs/langs/sl_SI/agenda.lang +++ b/htdocs/langs/sl_SI/agenda.lang @@ -1,51 +1,51 @@ # Dolibarr language file - Source file is en_US - agenda -IdAgenda=ID event -Actions=Aktivnosti -ActionsArea=Področje aktivnosti (dogodki in naloge) -Agenda= Program -Agendas= Programi +IdAgenda=ID dogodka +Actions=Dogodki +ActionsArea=Področje dogodkov (aktivnosti in naloge) +Agenda= Urnik +Agendas= Urniki Calendar= Koledar Calendars= Koledarji LocalAgenda=Lokalni koledar AffectedTo= Se nanaša na DoneBy= Izdelal Events= Dogodki -EventsNb=Number of events +EventsNb=Število dogodkov MyEvents=Moji dogodki OtherEvents=Drugi dogodki ListOfActions=Seznam dogodkov Location=Lokacija -EventOnFullDay=Dogodek na zaseden dan -SearchAnAction= Iskanje aktivnosti/naloge -MenuToDoActions= Vse nedokončane aktivnosti -MenuDoneActions= Vse prekinjene aktivnosti -MenuToDoMyActions= Moje nedokončane aktivnosti -MenuDoneMyActions= Moje prekinjene aktivnosti +EventOnFullDay=Dogodek na celoten dan(ni) +SearchAnAction= Iskanje dogodka/naloge +MenuToDoActions= Vsi nedokončani dogodki +MenuDoneActions= Vsi prekinjeni dogodki +MenuToDoMyActions= Moji nedokončani dogodki +MenuDoneMyActions= Moji prekinjeni dogodki ListOfEvents= Seznam Dolibarr dogodkov -ActionsAskedBy=Aktivnost vnesel -ActionsToDoBy=Aktivnost se nanaša na -ActionsDoneBy=Aktivnost izvedel -AllMyActions= Vse moje aktivnosti/naloge -AllActions= Vse aktivnosti/naloge -ViewList=Gelj seznam -ViewCal=Glej koledar +ActionsAskedBy=Dogodek vnesel +ActionsToDoBy=Dogoki, ki se nanašajo na +ActionsDoneBy=Dogodke izvedel +AllMyActions= Vsi moji dogodki/naloge +AllActions= Vse dogodki/naloge +ViewList=Glej seznam +ViewCal=Mesečni pogled ViewDay=Dnevni pogled ViewWeek=Tedenski pogled ViewWithPredefinedFilters= Glej z prednastavljenimi filtri -AutoActions= Avtomatska izpolnitev programa -AgendaAutoActionDesc= Tukaj definirajte dogodke, za katere želite, da Dolibarr avtomatsko kreira aktivnost v programu. Če ni označeno ničesar (privzeto), bodo v program vključene samo ročno vnesene aktivnosti. -AgendaSetupOtherDesc= Ta stran omogoča konfiguracijo drugih parametrov modula za programe. -AgendaExtSitesDesc=Ta stran omogoča konfiguracijo zunanjih koledarjev -ActionsEvents= Dogodki, za katere bo Dolibarr avtomatsko kreiral aktivnost v programu +AutoActions= Avtomatska izpolnitev +AgendaAutoActionDesc= Tukaj definirajte dogodke, za katere želite, da Dolibarr avtomatsko kreira aktivnost v urniku. Če ni označeno ničesar (privzeto), bodo v urnik vključene samo ročno vnesene aktivnosti. +AgendaSetupOtherDesc= Ta stran omogoča izvoz Dolibarr dogodkov v zunanji koledar (thunderbird, google koledar, ...) +AgendaExtSitesDesc=Ta stran omogoča določitev zunanjih virov koledarjev za ogled njihovih dogodkov v Dolibarr urniku +ActionsEvents= Dogodki, za katere bo Dolibarr avtomatsko kreiral aktivnost v urniku PropalValidatedInDolibarr= Potrjena ponudba %s InvoiceValidatedInDolibarr= Potrjen račun %s InvoiceBackToDraftInDolibarr=Račun %s se vrača v status osnutka -InvoiceDeleteDolibarr=Invoice %s deleted +InvoiceDeleteDolibarr=Račun %s izbrisan OrderValidatedInDolibarr= Potrjeno naročilo %s -OrderApprovedInDolibarr=Naročite %s odobril -OrderRefusedInDolibarr=Order %s refused -OrderBackToDraftInDolibarr=Naročite %s segajo v stanju osnutka -OrderCanceledInDolibarr=Naročite %s odpovedana +OrderApprovedInDolibarr=Naročilo %s odobreno +OrderRefusedInDolibarr=Naročilo %s zavrnjeno +OrderBackToDraftInDolibarr=Naročilo %s se vrača v status osnutka +OrderCanceledInDolibarr=Naročilo %s odpovedano InterventionValidatedInDolibarr=Potrjena intervencija %s ProposalSentByEMail=Komercialna ponudba %s poslana po elektronski pošti OrderSentByEMail=Naročilo kupca %s poslano po elektronski pošti @@ -53,7 +53,7 @@ InvoiceSentByEMail=Račun kupcu %s poslan po elektronski pošti SupplierOrderSentByEMail=Naročilo dobavitelju %s poslano po elektronski pošti SupplierInvoiceSentByEMail=Račun odbavitelja %s poslan po elektronski pošti ShippingSentByEMail=Pošiljka %s poslana po EMailu -ShippingValidated= Shipping %s validated +ShippingValidated= Odprema %s potrjena InterventionSentByEMail=Intervencija %s poslana po EMailu NewCompanyToDolibarr= Kreiran partner DateActionPlannedStart= Planiran začetni datum @@ -69,13 +69,13 @@ AgendaUrlOptions4=logint=%s za omejitev izhoda na aktivnosti, ki se nana AgendaUrlOptions5=logind=%s za omejitev izhoda na aktivnosti uporabnika %s. AgendaShowBirthdayEvents=Prikaži rojstni dan kontakta AgendaHideBirthdayEvents=Skrij rojstni dan kontakta -Busy=Busy -ExportDataset_event1=List of agenda events +Busy=Zaseden +ExportDataset_event1=Seznam aktivnosti # External Sites ical -ExportCal=Izvoz koledar +ExportCal=Izvoz koledarja ExtSites=Zunanji koledarji -ExtSitesEnableThisTool=Kako prenesti zunanji koledar v urnik +ExtSitesEnableThisTool=Prikaži zunanji koledar v urniku ExtSitesNbOfAgenda=Število koledarjev AgendaExtNb=Koledar št. %s ExtSiteUrlAgenda=URL za dostop do .ical datoteke diff --git a/htdocs/langs/sl_SI/banks.lang b/htdocs/langs/sl_SI/banks.lang index 3bbc518812b..acd34b7393c 100644 --- a/htdocs/langs/sl_SI/banks.lang +++ b/htdocs/langs/sl_SI/banks.lang @@ -19,8 +19,8 @@ SavingAccount=Hranilni račun SavingAccounts=Hranilni računi ErrorBankLabelAlreadyExists=Naziv finančnega računa že obstaja BankBalance=Stanje -BankBalanceBefore=Balance before -BankBalanceAfter=Balance after +BankBalanceBefore=Začetno stanje +BankBalanceAfter=Končno stanje BalanceMinimalAllowed=Minimalno dovoljeno stanje BalanceMinimalDesired=Minimalno želeno stanje InitialBankBalance=Začetno stanje @@ -28,7 +28,7 @@ EndBankBalance=Končno stanje CurrentBalance=Trenutno stanje FutureBalance=Bodoče stanje ShowAllTimeBalance=Prikaži stanje od začetka -AllTime=From start +AllTime=Od začetka Reconciliation=Usklajevanje RIB=Transakcijski račun IBAN=IBAN številka @@ -105,7 +105,7 @@ ConciliatedBy=Uskladil DateConciliating=Datum uskladitve BankLineConciliated=Transakcija usklajena CustomerInvoicePayment=Plačilo kupca -CustomerInvoicePaymentBack=Customer payment back +CustomerInvoicePaymentBack=Vrnitev plačila kupcu SupplierInvoicePayment=Plačilo dobavitelju WithdrawalPayment=Nakazano plačilo SocialContributionPayment=Plačilo socialnih prispevkov @@ -133,28 +133,28 @@ CashBudget=Gotovinski proračun PlannedTransactions=Planirane transakcije Graph=Grafika ExportDataset_banque_1=Bančne transakcije in izpis računa -ExportDataset_banque_2=Deposit slip +ExportDataset_banque_2=Potrdilo o avansu TransactionOnTheOtherAccount=Transakcija na drug račun TransactionWithOtherAccount=Prenos računa PaymentNumberUpdateSucceeded=Številka plačila uspešno posodobljena PaymentNumberUpdateFailed=Številke plačila ni mogoče posodobiti PaymentDateUpdateSucceeded=Datum plačila uspešno posodobljen PaymentDateUpdateFailed=Datuma plačila ni mogoče posodobiti -Transactions=Transactions +Transactions=Transakcije BankTransactionLine=Bančna transakcija AllAccounts=Vsi bančno/gotovinski računi BackToAccount=Nazaj na račun ShowAllAccounts=Prikaži vse račune FutureTransaction=Bodoča transakcija. Ni možna uskladitev. SelectChequeTransactionAndGenerate=Izberi/filtriraj čeke za vključitev v prevzemnico čekovnih nakazil in klikni na "Ustvari" -InputReceiptNumber=Choose the bank statement related with the conciliation. Use a sortable numeric value (such as, YYYYMM) -EventualyAddCategory=Eventually, specify a category in which to classify the records -ToConciliate=To conciliate? -ThenCheckLinesAndConciliate=Then, check the lines present in the bank statement and click -BankDashboard=Bank accounts summary -DefaultRIB=Default BAN -AllRIB=All BAN -LabelRIB=BAN Label -NoBANRecord=No BAN record -DeleteARib=Delete BAN record -ConfirmDeleteRib=Are you sure you want to delete this BAN record ? +InputReceiptNumber=Izberi bančni izpisek, povezan s posredovanjem. Uporabi numerično vrednost, ki se lahko sortira (npr.: YYYYMM) +EventualyAddCategory=Eventuelno določi kategorijo, v katero se razvrsti zapis +ToConciliate=Za posredovanje? +ThenCheckLinesAndConciliate=Nato preveri vrstice na bančnem izpisku in klikni +BankDashboard=Povzetek bančnih računov +DefaultRIB=Privzet BAN +AllRIB=Vsi BAN-i +LabelRIB=Naziv BAN-a +NoBANRecord=Ni BAN zapisa +DeleteARib=Izbriši BAN zapis +ConfirmDeleteRib=Ali zares želite izbrisati ta BAN zapis diff --git a/htdocs/langs/sl_SI/bills.lang b/htdocs/langs/sl_SI/bills.lang index 9f9a95317d7..48e937c5e5d 100644 --- a/htdocs/langs/sl_SI/bills.lang +++ b/htdocs/langs/sl_SI/bills.lang @@ -23,13 +23,13 @@ InvoiceProFormaAsk=Predračun InvoiceProFormaDesc=Predračun izgleda enako kot račun, vendar nima računovodske vrednosti. InvoiceReplacement=Nadomestni račun InvoiceReplacementAsk=Nadomestni račun za račun -InvoiceReplacementDesc=Replacement invoice is used to cancel and replace completely an invoice with no payment already received.

    Note: Only invoices with no payment on it can be replaced. If the invoice you replace is not yet closed, it will be automatically closed to 'abandoned'. +InvoiceReplacementDesc=Nadomestni račun se uporablja za preklic in popolno zamenjavo računa, ki še ni bil plačan.

    Opomba: Zamenja se lahko samo račun, ki še ni bil plačan. Če račun, ki ga nadomeščate, še ni bil zaključen, se bo avtomatsko zaključil, da postane 'opuščen'. InvoiceAvoir=Dobropis InvoiceAvoirAsk=Dobropis za korekcijo računa InvoiceAvoirDesc=Dobropis je negativni račun, ki se uporabi za rešitev problema, ko je znesek na računu drugačen od dejansko plačanega zneska (ker je kupec pomotoma plačal preveč, ali ne bo plačal v celoti, ker je na primer vrnil nekatere proizvode). -invoiceAvoirWithLines=Create Credit Note with lines from the origin invoice -invoiceAvoirWithPaymentRestAmount=Create Credit Note with the amount of origin invoice payment's lake -invoiceAvoirLineWithPaymentRestAmount=Credit Note amount of invoice payment's lake +invoiceAvoirWithLines=Ustvari dobropis z vrsticami iz originalnega računa +invoiceAvoirWithPaymentRestAmount=Ustvari dobropis s presežnimi zneski plačil iz originalnega računa +invoiceAvoirLineWithPaymentRestAmount=Znesek dobropisa s presežnimi plačili ReplaceInvoice=Zamenjava računa %s ReplacementInvoice=Nadomestni račun ReplacedByInvoice=Zamenjan z računom %s @@ -58,7 +58,7 @@ Payment=Plačilo PaymentBack=Vrnitev plačila Payments=Plačila PaymentsBack=Vrnitev plačil -PaidBack=Paid back +PaidBack=Vrnjeno plačilo DatePayment=Datum plačila DeletePayment=Brisanje plačila ConfirmDeletePayment=Ali zares želite zbrisati to plačilo ? @@ -66,28 +66,28 @@ ConfirmConvertToReduc=Ali želite spremeniti ta dobropis ali avans v absolutni p SupplierPayments=Plačila dobaviteljem ReceivedPayments=Prejeta plačila ReceivedCustomersPayments=Prejeta plačila od kupcev -PayedSuppliersPayments=Payments payed to suppliers +PayedSuppliersPayments=Plačila, plačana dobaviteljem ReceivedCustomersPaymentsToValid=Prejeta plačila od kupcev za potrditev PaymentsReportsForYear=Poročilo o plačilih za %s PaymentsReports=Poročila o plačilih PaymentsAlreadyDone=Izvršena plačila -PaymentsBackAlreadyDone=Payments back already done +PaymentsBackAlreadyDone=Vrnitev plačila že izvršena PaymentRule=Pravilo plačila PaymentMode=Način plačila PaymentConditions=Rok plačila PaymentConditionsShort=Rok plačila PaymentAmount=Znesek plačila -ValidatePayment=Validate payment +ValidatePayment=Potrdi plačilo PaymentHigherThanReminderToPay=Plačilo višje od opomina HelpPaymentHigherThanReminderToPay=Pozor, plačilo zneska enega ali več računov je višje od preostanka za plačilo.
    Popravite vaš vnos, ali potrdite znesek in pripravite dobropise za prekoračene zneske za vsak preveč plačan račun. -HelpPaymentHigherThanReminderToPaySupplier=Attention, the payment amount of one or more bills is higher than the rest to pay.
    Edit your entry, otherwise confirm. +HelpPaymentHigherThanReminderToPaySupplier=Pozor, plačilo zneska enega ali več računov je višje od preostanka za plačilo.
    Popravite vaš vnos, ali potrdite znesek. ClassifyPaid=Označeno kot 'Plačano' ClassifyPaidPartially=Označeno kot 'Delno plačano' ClassifyCanceled=Označeno kot 'Opuščeno' ClassifyClosed=Označeno kot 'Zaključeno' CreateBill=Kreiraj račun AddBill=Dodaj račun ali dobropis -AddToDraftInvoices=Add to draft invoice +AddToDraftInvoices=Dodaj osnutku računa DeleteBill=Izbriši račun SearchACustomerInvoice=Iskanje računa za kupca SearchASupplierInvoice=Iskanje računa dobavitelja @@ -170,7 +170,7 @@ ConfirmClassifyPaidPartiallyReasonOtherDesc=To izbiro uporabite, če nobena drug ConfirmClassifyAbandonReasonOther=Ostalo ConfirmClassifyAbandonReasonOtherDesc=Ta izbira se uporabi v vseh drugih primerih. Na primer, ker planirate izdelavo nadomestnega računa. ConfirmCustomerPayment=Ali želite potrditi ta vnos plačila za %s %s ? -ConfirmSupplierPayment=Do you confirm this payment input for %s %s ? +ConfirmSupplierPayment=Ali želite potrditi ta vnos plačila za %s %s ? ConfirmValidatePayment=Ali zares želite potrditi to plačilo ? Po potrditvi plačila spremembe niso več možne. ValidateBill=Potrdi račun UnvalidateBill=Unvalidate račun @@ -187,13 +187,13 @@ ShowInvoiceDeposit=Prikaži avansni račun ShowPayment=Prikaži plačilo File=Datoteka AlreadyPaid=Že plačano -AlreadyPaidBack=Already paid back +AlreadyPaidBack=Že vrnjeno plačilo AlreadyPaidNoCreditNotesNoDeposits=Že plačano (brez dobropisa in avansa) Abandoned=Opuščeno RemainderToPay=Opomin za plačilo RemainderToTake=Pripravljeni opomini -RemainderToPayBack=Remainder to pay back -Rest=Pending +RemainderToPayBack=Opomin za vrnitev plačila +Rest=Na čakanju AmountExpected=Reklamiran znesek ExcessReceived=Prejet presežek EscompteOffered=Ponujen popust (plačilo pred rokom) @@ -203,7 +203,7 @@ StandingOrders=Trajniki StandingOrder=Trajnik NoDraftBills=Ni osnutka računa NoOtherDraftBills=Ni drugih osnutkov računov -NoDraftInvoices=No draft invoices +NoDraftInvoices=Ni osnutkov računov RefBill=Referenca računa ToBill=Za fakturiranje RemainderToBill=Opomnik za fakturiranje @@ -244,12 +244,12 @@ Discount=Popust Discounts=Popusti AddDiscount=Ustvari absolutni popust AddRelativeDiscount=Ustvarite relativno popust -EditRelativeDiscount=Edit relative discount +EditRelativeDiscount=Uredi relativni popust AddGlobalDiscount=Dodaj popust EditGlobalDiscounts=Uredi absolutne popuste AddCreditNote=Ustvari dobropis ShowDiscount=Prikaži popust -ShowReduc=Show the deduction +ShowReduc=Prikaži odbitek RelativeDiscount=Relativni popust GlobalDiscount=Globalni popust CreditNote=Dobropis @@ -286,7 +286,7 @@ InvoiceNotChecked=Noben račun ni izbran CloneInvoice=Kloniraj račun ConfirmCloneInvoice=Ali zares želite klonirati ta račun %s ? DisabledBecauseReplacedInvoice=Aktivnost onemogočena, ker je bil račun zamenjan -DescTaxAndDividendsArea=This area presents a summary of all payments made for special expenses. Only records with payment during the fixed year are included here. +DescTaxAndDividendsArea=To področje predstavlja vsoto vseh plačil posebnih stroškov. Vključeni so le zapisi s plačili v določenem letu. NbOfPayments=Število plačil SplitDiscount=Razdeli popust na dva ConfirmSplitDiscount=Ali zares želite razdeliti ta popust %s %s na dva manjša popusta ? @@ -309,12 +309,12 @@ PaymentConditionShort60DENDMONTH=60 dni konec meseca PaymentCondition60DENDMONTH=60 dni konec meseca PaymentConditionShortPT_DELIVERY=Dobava PaymentConditionPT_DELIVERY=Ob dobavi -PaymentConditionShortPT_ORDER=On order -PaymentConditionPT_ORDER=On order +PaymentConditionShortPT_ORDER=Naročeno +PaymentConditionPT_ORDER=Naročeno PaymentConditionShortPT_5050=50-50 -PaymentConditionPT_5050=50%% in advance, 50%% on delivery -FixAmount=Fix amount -VarAmount=Variable amount (%% tot.) +PaymentConditionPT_5050=50%% vnaprej, 50%% ob dobavi +FixAmount=Fiksni znesek +VarAmount=Variabilni znesek (%% tot.) # PaymentType PaymentTypeVIR=Bančni depozit PaymentTypeShortVIR=Bančni depozit @@ -364,7 +364,7 @@ LawApplicationPart2=Blago ostane last prodajalca LawApplicationPart3=do poplačila njegove celotne LawApplicationPart4=vrednosti. LimitedLiabilityCompanyCapital=d.o.o. s kapitalom -UseLine=Apply +UseLine=Uporabi UseDiscount=Uporabi popust UseCredit=Uporabi dobropis UseCreditNoteInInvoicePayment=Znižana vrednost za plačilo s tem dobropipsom @@ -389,17 +389,17 @@ CantRemovePaymentWithOneInvoicePaid=Brisanje plačila ni možno, ker je vsaj en ExpectedToPay=Pričakovano plačilo PayedByThisPayment=Plačano s tem plačilom ClosePaidInvoicesAutomatically=Označi s "Plačano" vse standardne ali nadomestne račune, ki so bili v celoti plačani. -ClosePaidCreditNotesAutomatically=Classify "Paid" all credit notes entirely paid back. +ClosePaidCreditNotesAutomatically=Označi s "Plačano" vse dobropise, ki so bili v celoti vrnjeni. AllCompletelyPayedInvoiceWillBeClosed=Vsi računi, ki nimajo neplačanih preostankov, bodo avtomatsko zaključeni v status "Plačano". -ToMakePayment=Pay -ToMakePaymentBack=Pay back -ListOfYourUnpaidInvoices=List of unpaid invoices -NoteListOfYourUnpaidInvoices=Note: This list contains only invoices for third parties you are linked to as a sale representative. -RevenueStamp=Revenue stamp -YouMustCreateInvoiceFromThird=This option is only available when creating invoice from tab "customer" of thirdparty +ToMakePayment=Plačati +ToMakePaymentBack=Vrniti plačilo +ListOfYourUnpaidInvoices=Seznam neplačanih računov +NoteListOfYourUnpaidInvoices=Opomba: Ta seznam vsebuje samo račune za partnerje, ki so povezani z referentom. +RevenueStamp=Žig prihodka +YouMustCreateInvoiceFromThird=Ta opcija je na voljo samo, kadar ustvarite račun z zavihka "kupci" na področju Partnerjev PDFCrabeDescription=Predloga računa Crabe. Predloga kompletnega računa (Podpora DDV opcije, popusti, pogoji plačila, logo, itd...) -TerreNumRefModelDesc1=Return number with format %syymm-nnnn for standard invoices and %syymm-nnnn for credit notes where yy is year, mm is month and nnnn is a sequence with no break and no return to 0 -MarsNumRefModelDesc1=Return number with format %syymm-nnnn for standard invoices, %syymm-nnnn for replacement invoices, %syymm-nnnn for credit notes and %syymm-nnnn for credit notes where yy is year, mm is month and nnnn is a sequence with no break and no return to 0 +TerreNumRefModelDesc1=Predlaga številko v formatu %syymm-nnnn za standardne račune in %syymm-nnnn za dobropise kjer je yy leto, mm mesec in nnnn zaporedna številka brez presledkov in večja od 0 +MarsNumRefModelDesc1=Predlaga številko v formatu %syymm-nnnn za standardne račune, %syymm-nnnn za nadomestne račune, %syymm-nnnn za dobropise in %syymm-nnnn za dobropise kjer je yy leto, mm mesec in nnnn zaporedna številka brez presledkov in večja od 0 TerreNumRefModelError=Račun z začetkom $syymm že obstaja in ni kompatibilen s tem modelom zaporedja. Odstranite ga ali ga preimenujte za aktiviranje tega modula. ##### Types de contacts ##### TypeContact_facture_internal_SALESREPFOLL=Predstavnik za sledenje računa kupcu diff --git a/htdocs/langs/sl_SI/boxes.lang b/htdocs/langs/sl_SI/boxes.lang index 50c79f63a6d..0c402a1109e 100644 --- a/htdocs/langs/sl_SI/boxes.lang +++ b/htdocs/langs/sl_SI/boxes.lang @@ -1,7 +1,7 @@ # Dolibarr language file - Source file is en_US - boxes BoxLastRssInfos=Rss informacija BoxLastProducts=Zadnji proizvodi/storitve -# BoxProductsAlertStock=Products in stock alert +BoxProductsAlertStock=Opozorilo za izdelke na zalogi BoxLastProductsInContract=Zadnji pogodbeni proizvodi/storitve BoxLastSupplierBills=Zadnji računi dobavitelja BoxLastCustomerBills=Zadnji računi za kupca @@ -17,8 +17,8 @@ BoxLastActions=Zadnje aktivnosti BoxLastContracts=Zadnja naročila BoxLastContacts=Zadnji kontakti/naslovi BoxLastMembers=Zadnji člani -# BoxFicheInter=Last interventions -# BoxCurrentAccounts=Opened accounts balance +BoxFicheInter=Zadnje intervencije +BoxCurrentAccounts=Stanje odprtih računov BoxSalesTurnover=Prihodek od prodaje BoxTotalUnpaidCustomerBills=Skupaj neplačani računi kupca BoxTotalUnpaidSuppliersBills=Skupaj neplačani računi dobavitelju @@ -26,7 +26,7 @@ BoxTitleLastBooks=Zadnjih %s vnesenih vknjižb BoxTitleNbOfCustomers=Število kupcev BoxTitleLastRssInfos=Zadnjih %s novic od %s BoxTitleLastProducts=Zadnjih %s spremenjenih proizvodov/storitev -# BoxTitleProductsAlertStock=Products in stock alert +BoxTitleProductsAlertStock=Opozorilo za izdelke na zalogi BoxTitleLastCustomerOrders=Zadnjih %s spremenjenih naročil kupcev BoxTitleLastSuppliers=Zadnjih %s vnesenih dobaviteljev BoxTitleLastCustomers=Zadnjih %s vnesenih kupcev @@ -40,10 +40,10 @@ BoxTitleLastProspects=Zadnjih %s vnesenih možnih strank BoxTitleLastModifiedProspects=Zadnjih %s spremenjenih možnih kupcev BoxTitleLastProductsInContract=Zadnjih %s proizvodov/storitev v pogodbi BoxTitleLastModifiedMembers=Zadnjih %s spremenjenih članov -# BoxTitleLastFicheInter=Last %s modified intervention +BoxTitleLastFicheInter=Zadnjih %s spremenjenih intervencij BoxTitleOldestUnpaidCustomerBills=Najstarejših %s neplačanih računov kupcev BoxTitleOldestUnpaidSupplierBills=Najstarejših %s neplačanih računov dobaviteljev -# BoxTitleCurrentAccounts=Opened account's balances +BoxTitleCurrentAccounts=Stanja odprtih računov BoxTitleSalesTurnover=Prihodek od prodaje BoxTitleTotalUnpaidCustomerBills=Neplačani računi kupca BoxTitleTotalUnpaidSuppliersBills=Neplačani računi dobavitelju @@ -55,7 +55,7 @@ BoxTitleLastActionsToDo=Zadnjih %s planiranih aktivnosti BoxTitleLastContracts=Zadnjih %s pogodb BoxTitleLastModifiedDonations=Zadnjih %s spremenjenih donacij BoxTitleLastModifiedExpenses=Zadnjih %s spremenjenih stroškov -# BoxGlobalActivity=Global activity (invoices, proposals, orders) +BoxGlobalActivity=Globalna aktivnost (računi, ponudbe, naročila) FailedToRefreshDataInfoNotUpToDate=Neuspešna osvežitev RSS fluxa. Datum zadnje uspešne osvežitve: %s LastRefreshDate=Datum zadnje osvežitve NoRecordedBookmarks=Ni definiranih zaznamkov. @@ -69,23 +69,23 @@ NoRecordedInvoices=Ni vnesenih računov kupca NoUnpaidCustomerBills=Ni neplačanih računov kupca NoRecordedSupplierInvoices=Ni vnesenih računov dobavitelja NoUnpaidSupplierBills=Ni neplačanih računov dobavitelja -NoModifiedSupplierBills=Ni spremenjenih računov dobavitelja +NoModifiedSupplierBills=Ni vnesenih računov dobavitelja NoRecordedProducts=Ni vnesenih proizvodov/storitev NoRecordedProspects=Ni vnesenih ponudb NoContractedProducts=Ni pogodbenih proizvodov/storitev NoRecordedContracts=Ni vnesenih pogodb -# NoRecordedInterventions=No recorded interventions -# BoxLatestSupplierOrders=Latest supplier orders -# BoxTitleLatestSupplierOrders=%s latest supplier orders -# NoSupplierOrder=No recorded supplier order -# BoxCustomersInvoicesPerMonth=Customer invoices per month -# BoxSuppliersInvoicesPerMonth=Supplier invoices per month -# BoxCustomersOrdersPerMonth=Customer orders per month -# BoxSuppliersOrdersPerMonth=Supplier orders per month -# BoxProposalsPerMonth=Proposals per month -# NoTooLowStockProducts=No product under the low stock limit -# BoxProductDistribution=Products/Services distribution -# BoxProductDistributionFor=Distribution of %s for %s +NoRecordedInterventions=Ni zabeleženih intervencij +BoxLatestSupplierOrders=Zadnja naročila pri dobaviteljih +BoxTitleLatestSupplierOrders=%s zadnjih naročil pri dobaviteljih +NoSupplierOrder=Ni zabeleženih naročil pri dobavitelju +BoxCustomersInvoicesPerMonth=Računi za kupce na mesec +BoxSuppliersInvoicesPerMonth=Računi dobaviteljev na mesec +BoxCustomersOrdersPerMonth=Naročila kupcev na mesec +BoxSuppliersOrdersPerMonth=Naročila pri dobaviteljih na mesec +BoxProposalsPerMonth=Ponudbe na mesec +NoTooLowStockProducts=Ni proizvodov pod spodnjo omejitvijo zaloge +BoxProductDistribution=Distribucija proizvodov/storitev +BoxProductDistributionFor=Distribucija of %s za %s ForCustomersInvoices=Računi za kupce -# ForCustomersOrders=Customers orders +ForCustomersOrders=Naročila kupcev ForProposals=Ponudbe diff --git a/htdocs/langs/sl_SI/cashdesk.lang b/htdocs/langs/sl_SI/cashdesk.lang index 2bcbb81b0a3..ff574cb09ce 100644 --- a/htdocs/langs/sl_SI/cashdesk.lang +++ b/htdocs/langs/sl_SI/cashdesk.lang @@ -12,7 +12,7 @@ CashDeskProducts=Proizvodi CashDeskStock=Zaloga CashDeskOn=vklopljen CashDeskThirdParty=Partner -# CashdeskDashboard=Point of sale access +CashdeskDashboard=Dostop do prodajnega mesta ShoppingCart=Nakupovalni voziček NewSell=Nova prodaja BackOffice=Administracija @@ -36,5 +36,5 @@ BankToPay=Bremenitev računa ShowCompany=Prikaži podjetje ShowStock=Prikaži skladišče DeleteArticle=Kliknite za izbris tega artikla -# FilterRefOrLabelOrBC=Search (Ref/Label) -# UserNeedPermissionToEditStockToUsePos=You ask to decrease stock on invoice creation, so user that use POS need to have permission to edit stock. +FilterRefOrLabelOrBC=Iskanje (Referenca/Naziv) +UserNeedPermissionToEditStockToUsePos=Zahtevali ste zmanjšanje zaloge ob izdaji računa, torej mora imeti uporabnik POS-a dovoljenje za popravljanje zaloge diff --git a/htdocs/langs/sl_SI/commercial.lang b/htdocs/langs/sl_SI/commercial.lang index 8a51ac5e527..9d3b111b509 100644 --- a/htdocs/langs/sl_SI/commercial.lang +++ b/htdocs/langs/sl_SI/commercial.lang @@ -23,7 +23,7 @@ TaskRDVWith=Sestanek z %s ShowTask=Prikaži naloge ShowAction=Prikaži aktivnosti ActionsReport=Poročilo o aktivnostih -# ThirdPartiesOfSaleRepresentative=Thirdparties with sales representative +ThirdPartiesOfSaleRepresentative=Partnerji s prodajnimi predstavniki SalesRepresentative=Prodajni predstavnik SalesRepresentatives=Prodajni predstavniki SalesRepresentativeFollowUp=Prodajni predstavnik (nadaljevanje) @@ -80,16 +80,16 @@ ActionAC_SHIP=Pošlji pošiljko po pošti ActionAC_SUP_ORD=Poslati naročilo dobavitelju po pošti ActionAC_SUP_INV=Poslati račun dobavitelja po pošti ActionAC_OTH=Ostalo -# ActionAC_OTH_AUTO=Other (automatically inserted events) -# ActionAC_MANUAL=Manually inserted events -# ActionAC_AUTO=Automatically inserted events -# Stats=Sales statistics -# CAOrder=Sales volume (validated orders) -# FromTo=from %s to %s -# MargeOrder=Margins (validated orders) -# RecapAnnee=Summary of the year -# NoData=There is no data +ActionAC_OTH_AUTO=Ostalo (avtomatsko vnešeni dogodki) +ActionAC_MANUAL=Ročno vnešeni dogodki +ActionAC_AUTO=Avtomatsko vnešeni dogodki +Stats=Statistika prodaje +CAOrder=Obseg prodaje (potrjena naročila) +FromTo=od %s do %s +MargeOrder=Marže (potrjena naročila) +RecapAnnee=Letna vsota +NoData=Tu ni podatkov StatusProsp=Status možne stranke DraftPropals=Osnutek komercialne ponudbe SearchPropal=Iskanje komercialne ponudbe -# CommercialDashboard=Commercial summary +CommercialDashboard=Komercialna vsota diff --git a/htdocs/langs/sl_SI/companies.lang b/htdocs/langs/sl_SI/companies.lang index b77bb8ddb78..6f73aa9c7dc 100644 --- a/htdocs/langs/sl_SI/companies.lang +++ b/htdocs/langs/sl_SI/companies.lang @@ -18,6 +18,7 @@ NewCompany=Novo podjetje (možna stranka, kupec, dobavitelj) NewThirdParty=Nov partner (možna stranka, kupec, dobavitelj) NewSocGroup=Nova skupina podjetij NewPrivateIndividual=Nov posameznik (možna stranka, kupec, dobavitelj) +CreateDolibarrThirdPartySupplier=Kreiraj partnerja (dobavitelj) ProspectionArea=Področje možnih strank SocGroup=Skupina podjetij IdThirdParty=ID partnerja @@ -66,13 +67,13 @@ Country=Država CountryCode=Koda države CountryId=Država id Phone=Telefon -# Skype=Skype -# Call=Call -# Chat=Chat +Skype=Skype +Call=Kliči +Chat=Klepetaj PhonePro=Službeni telefon PhonePerso=Osebni telefon PhoneMobile=Mobilni telefon -# No_Email=Don't send mass e-mailings +No_Email=Ne pošiljaj masovne e-pošte Fax=Faks Zip=Poštna številka Town=Mesto @@ -81,8 +82,8 @@ Poste= Položaj DefaultLang=Privzet jezik VATIsUsed=Davčni zavezanec VATIsNotUsed=Ni davčni zavezanec -# CopyAddressFromSoc=Fill address with thirdparty address -# NoEmailDefined=There is no email defined +CopyAddressFromSoc=Izpolni naslov z naslovom partnerja +NoEmailDefined=Ni določena e-pošta ##### Local Taxes ##### LocalTax1IsUsedES= RE is used LocalTax1IsNotUsedES= RE is not used @@ -102,35 +103,35 @@ ProfId2Short=Reg. sodišče ProfId3Short=Št. reg. vpisa ProfId4Short=Osn. kapital ProfId5Short== -# ProfId6Short=Prof. id 5 +ProfId6Short=Prof. id 5 ProfId1=Matična številka ProfId2=Sodišče vpisa družbe ProfId3=Številka registrskega vpisa ProfId4=Višina osnovnega kapitala ProfId5== -# ProfId6=Professional ID 6 +ProfId6=Professional ID 6 ProfId1AR=Prof Id 1 (CUIT/CUIL) ProfId2AR=Prof Id 2 (Revenu brutes) ProfId3AR=- ProfId4AR=- ProfId5AR== -# ProfId6AR=- +ProfId6AR=- ProfId1AU=Prof Id 1 (ABN) ProfId2AU=- ProfId3AU=- ProfId4AU=- ProfId5AU== -# ProfId6AU=- +ProfId6AU=- ProfId1BE=Prof Id 1 (Professional number) ProfId2BE=- ProfId3BE=- ProfId4BE=- ProfId5BE== -# ProfId6BE=- -# ProfId1BR=- -# ProfId2BR=IE (Inscricao Estadual) -# ProfId3BR=IM (Inscricao Municipal) -# ProfId4BR=CPF +ProfId6BE=- +ProfId1BR=- +ProfId2BR=IE() +ProfId3BR=IM() +ProfId4BR=CPF #ProfId5BR=CNAE #ProfId6BR=INSS ProfId1CH=- @@ -138,97 +139,97 @@ ProfId2CH=- ProfId3CH=Prof Id 1 (Federal number) ProfId4CH=Prof Id 2 (Commercial Record number) ProfId5CH== -# ProfId6CH=- +ProfId6CH=- ProfId1CL== ProfId2CL== ProfId3CL== ProfId4CL== ProfId5CL== -# ProfId6CL=- +ProfId6CL=- ProfId1CO== ProfId2CO== ProfId3CO== ProfId4CO== ProfId5CO== -# ProfId6CO=- +ProfId6CO=- ProfId1DE=Prof Id 1 (USt.-IdNr) ProfId2DE=Prof Id 2 (USt.-Nr) ProfId3DE=Prof Id 3 (Handelsregister-Nr.) ProfId4DE=- ProfId5DE== -# ProfId6DE=- +ProfId6DE=- ProfId1ES=(CNAE) ProfId2ES=(Social security number) ProfId3ES=(IAE) ProfId4ES=(Collegiate number) ProfId5ES== -# ProfId6ES=- +ProfId6ES=- ProfId1FR=Prof Id 1 (SIREN) ProfId2FR=Prof Id 2 (SIRET) ProfId3FR=Prof Id 3 (NAF, old APE) ProfId4FR=Prof Id 4 (RCS/RM) ProfId5FR== -# ProfId6FR=- +ProfId6FR=- ProfId1GB=Prof Id 1 (Registration Number) ProfId2GB=- ProfId3GB=Prof Id 3 (SIC) ProfId4GB=- ProfId5GB== -# ProfId6GB=- +ProfId6GB=- ProfId1HN== ProfId2HN== ProfId3HN== ProfId4HN== ProfId5HN== -# ProfId6HN=- +ProfId6HN=- ProfId1IN=Prof Id 1 (TIN) ProfId2IN=Prof Id 2 ProfId3IN=Prof Id 3 ProfId4IN=Prof Id 4 ProfId5IN== -# ProfId6IN=- +ProfId6IN=- ProfId1MA== ProfId2MA== ProfId3MA== ProfId4MA== ProfId5MA== -# ProfId6MA=- +ProfId6MA=- ProfId1MX== ProfId2MX== ProfId3MX== ProfId4MX== ProfId5MX== -# ProfId6MX=- +ProfId6MX=- ProfId1NL=KVK nummer ProfId2NL=- ProfId3NL=- ProfId4NL=- ProfId5NL== -# ProfId6NL=- +ProfId6NL=- ProfId1PT=Prof Id 1 (NIPC) ProfId2PT=Prof Id 2 (Social security number) ProfId3PT=Prof Id 3 (Commercial Record number) ProfId4PT=Prof Id 4 (Conservatory) ProfId5PT== -# ProfId6PT=- +ProfId6PT=- ProfId1SN== ProfId2SN== ProfId3SN== ProfId4SN== ProfId5SN== -# ProfId6SN=- +ProfId6SN=- ProfId1TN=Prof Id 1 (RC) ProfId2TN=Prof Id 2 (Fiscal matricule) ProfId3TN=Prof Id 3 (Douane code) ProfId4TN=Prof Id 4 (BAN) ProfId5TN== -# ProfId6TN=- +ProfId6TN=- ProfId1RU=Prof ID 1 (OGRN) ProfId2RU=Prof Id 2 (INN) ProfId3RU=Prof Id 3 (KPP) ProfId4RU=Prof Id 4 (OKPO) ProfId5RU=- -# ProfId6RU=- +ProfId6RU=- VATIntra=Davčna številka VATIntraShort=Davčna številka VATIntraVeryShort=DDV številka @@ -256,12 +257,12 @@ DiscountNone=Brez popusta Supplier=Dobavitelj CompanyList=Seznam podjetij AddContact=Dodaj kontakt/naslov -# AddContactAddress=Add contact/address +AddContactAddress=Dodaj kontakt/naslov EditContact=Uredi osebo / naslov -# EditContactAddress=Edit contact/address +EditContactAddress=Uredi kontakt/naslov Contact=Kontakt ContactsAddresses=Kontakti/naslovi -# NoContactDefinedForThirdParty=No contact defined for this third party +NoContactDefinedForThirdParty=Pri tem partnerju ni definiranega kontakta NoContactDefined=Pri tem partnerju ni definiranega kontakta DefaultContact=Privzeti kontakt AddCompany=Dodaj podjetje @@ -283,7 +284,7 @@ LastProspect=Zadnji ProspectToContact=Možna stranka v kontakt CompanyDeleted=Podjetje "%s" izbrisano iz baze. ListOfContacts=Seznam kontaktov -# ListOfContactsAddresses=List of contacts/adresses +ListOfContactsAddresses=Seznam kontaktov/naslovov ListOfProspectsContacts=Seznam kontaktov možnih strank ListOfCustomersContacts=Seznam kontaktov kupcev ListOfSuppliersContacts=Seznam kontaktov dobaviteljev @@ -302,7 +303,7 @@ NoContactForAnyProposal=Ta kontakt ni pravi za komercialne ponudbe NoContactForAnyContract=Ta kontakt ni pravi za pogodbe NoContactForAnyInvoice=Ta kontakt ni pravi za račune NewContact=Nov kontakt -# NewContactAddress=New contact/address +NewContactAddress=Nov kontakt/naslov LastContacts=Zadnji kontakti MyContacts=Moji kontakti Phones=Telefoni @@ -363,10 +364,10 @@ ExportCardToFormat=Izvoz podatkov v formatu ContactNotLinkedToCompany=Kontakt ni povezan z nobenim partnerjem DolibarrLogin=Uporabniško ime za Dolibarr NoDolibarrAccess=Nima dostopa v Dolibarr -# ExportDataset_company_1=Third parties (Companies/foundations/physical people) and properties +ExportDataset_company_1=Partnerji (podjetja/ustanove/fizične osebe) in lastnosti ExportDataset_company_2=Kontakti in lastništvo -# ImportDataset_company_1=Third parties (Companies/foundations/physical people) and properties -# ImportDataset_company_2=Contacts/Addresses (of thirdparties or not) and attributes +ImportDataset_company_1=Partnerji (podjetja/ustanove/fizične osebe) in lastnosti +ImportDataset_company_2=Kontakti/naslovi (partnerjev ali ne) in atributi ImportDataset_company_3=Podatki o banki PriceLevel=Cenovni nivo DeliveriesAddress=Naslovi za dostavo @@ -399,10 +400,10 @@ UniqueThirdParties=Skupno število partnerjev InActivity=Aktiven ActivityCeased=Neaktiven ActivityStateFilter=Status aktivnosti -# ProductsIntoElements=List of products into -# CurrentOutstandingBill=Current outstanding bill -# OutstandingBill=Max. for outstanding bill -# OutstandingBillReached=Reached max. for outstanding bill +ProductsIntoElements=Seznam proizvodov v +CurrentOutstandingBill=Trenutni neplačan račun +OutstandingBill=Max. za neplačan račun +OutstandingBillReached=Dosežen maksimum za neplačan račun MonkeyNumRefModelDesc=Predlaga kodo kupca v formatu %syymm-nnnn in kodo dobavitelja v formatu %syymm-nnnn kjer je yy leto, mm mesec in nnnn zaporedna številka brez presledka, večja od 0. LeopardNumRefModelDesc=Koda kupca / dobavitelja po želji. Lahko jo kadarkoli spremenite. -# ManagingDirectors=Manager(s) name (CEO, director, president...) +ManagingDirectors=Ime direktorja(ev) (CEO, direktor, predsednik...) diff --git a/htdocs/langs/sl_SI/contracts.lang b/htdocs/langs/sl_SI/contracts.lang index 7519b463cff..8b0f31b8996 100644 --- a/htdocs/langs/sl_SI/contracts.lang +++ b/htdocs/langs/sl_SI/contracts.lang @@ -38,7 +38,7 @@ ConfirmCloseService=Ali zares želite zapreti to storitev na dan %s ? ValidateAContract=Potrdite pogodbo ActivateService=Aktivirajte storitev ConfirmActivateService=Ali zares želite aktivirati to storitev na dan %s ? -# RefContract=Contract reference +RefContract=Referenca pogodbe DateContract=Datum pogodbe DateServiceActivate=Datum aktiviranja storitve DateServiceUnactivate=Datum deaktiviranja storitve @@ -85,10 +85,12 @@ PaymentRenewContractId=Obnovi pogodbeno vrstico (številka %s) ExpiredSince=Datum poteka RelatedContracts=Pogodbe, ki se nanašajo na to NoExpiredServices=Ni potekla aktivne službe -# ListOfServicesToExpireWithDuration=List of Services to expire in %s days -# ListOfServicesToExpireWithDurationNeg=List of Services expired from more than %s days -# ListOfServicesToExpire=List of Services to expire -# NoteListOfYourExpiredServices=This list contains only services of contracts for third parties you are linked to as a sale representative. +ListOfServicesToExpireWithDuration=Seznam storitev, ki potečejo v %s dneh +ListOfServicesToExpireWithDurationNeg=Seznam storitev, ki potečejo v več kot %s dneh +ListOfServicesToExpire=Seznam storitev, ki potečejo +NoteListOfYourExpiredServices=Ta seznam vsebuje samo storitve po pogodbah s partnerji, ki so povezane z referentom. +StandardContractsTemplate=Predloga standardnih pogodb +ContactNameAndSignature=Za %s, ime in podpis: ##### Types de contacts ##### TypeContact_contrat_internal_SALESREPSIGN=Podpisnik pogodbe diff --git a/htdocs/langs/sl_SI/deliveries.lang b/htdocs/langs/sl_SI/deliveries.lang index b79ae2c338e..158fb6372b9 100644 --- a/htdocs/langs/sl_SI/deliveries.lang +++ b/htdocs/langs/sl_SI/deliveries.lang @@ -23,4 +23,4 @@ GoodStatusDeclaration=Potrjujem prejem zgornjega blaga v dobrem stanju, Deliverer=Dostavil : Sender=Pošiljatelj Recipient=Prejemnik -# ErrorStockIsNotEnough=There's not enough stock +ErrorStockIsNotEnough=Zaloga je premajhna diff --git a/htdocs/langs/sl_SI/dict.lang b/htdocs/langs/sl_SI/dict.lang index 8757eb05e9b..47d74f64774 100644 --- a/htdocs/langs/sl_SI/dict.lang +++ b/htdocs/langs/sl_SI/dict.lang @@ -6,7 +6,7 @@ CountryES=Španija CountryDE=Nemčija CountryCH=Švica CountryGB=Velika Britanija -# CountryUK=United Kingdom +CountryUK=Velika Britanija CountryIE=Irska CountryCN=Kitajska CountryTN=Tunizija @@ -252,8 +252,7 @@ CivilityMME=Ga. CivilityMR=G. CivilityMLE=Gdč. CivilityMTRE=Mojster -# CivilityDR=Doctor - +CivilityDR=Doktor ##### Currencies ##### Currencyeuros=EUR CurrencyAUD=Avstralski Dolarji @@ -290,10 +289,8 @@ CurrencyXOF=CFA Francs BCEAO CurrencySingXOF=CFA Franc BCEAO CurrencyXPF=CFP Francs CurrencySingXPF=CFP Franc - -# CurrencyCentSingEUR=cent -# CurrencyThousandthSingTND=thousandth - +CurrencyCentSingEUR=cent +CurrencyThousandthSingTND=tisočina #### Input reasons ##### DemandReasonTypeSRC_INTE=Internet DemandReasonTypeSRC_CAMP_MAIL=Poštna kampanja @@ -302,28 +299,27 @@ DemandReasonTypeSRC_CAMP_PHO=Telefonska kampanja DemandReasonTypeSRC_CAMP_FAX=Kampanja po faksu DemandReasonTypeSRC_COMM=Komercialni kontakt DemandReasonTypeSRC_SHOP=Kontakt v prodajalni -# DemandReasonTypeSRC_WOM=Word of mouth -# DemandReasonTypeSRC_PARTNER=Partner -# DemandReasonTypeSRC_EMPLOYEE=Employee -# DemandReasonTypeSRC_SPONSORING=Sponsorship - +DemandReasonTypeSRC_WOM=Ustno +DemandReasonTypeSRC_PARTNER=Partner +DemandReasonTypeSRC_EMPLOYEE=Zaposleni +DemandReasonTypeSRC_SPONSORING=Sponzorstvo #### Paper formats #### -# PaperFormatEU4A0=Format 4A0 -# PaperFormatEU2A0=Format 2A0 -# PaperFormatEUA0=Format A0 -# PaperFormatEUA1=Format A1 -# PaperFormatEUA2=Format A2 -# PaperFormatEUA3=Format A3 -# PaperFormatEUA4=Format A4 -# PaperFormatEUA5=Format A5 -# PaperFormatEUA6=Format A6 -# PaperFormatUSLETTER=Format Letter US -# PaperFormatUSLEGAL=Format Legal US -# PaperFormatUSEXECUTIVE=Format Executive US -# PaperFormatUSLEDGER=Format Ledger/Tabloid -# PaperFormatCAP1=Format P1 Canada -# PaperFormatCAP2=Format P2 Canada -# PaperFormatCAP3=Format P3 Canada -# PaperFormatCAP4=Format P4 Canada -# PaperFormatCAP5=Format P5 Canada -# PaperFormatCAP6=Format P6 Canada +PaperFormatEU4A0=Format 4A0 +PaperFormatEU2A0=Format 2A0 +PaperFormatEUA0=Format A0 +PaperFormatEUA1=Format A1 +PaperFormatEUA2=Format A2 +PaperFormatEUA3=Format A3 +PaperFormatEUA4=Format A4 +PaperFormatEUA5=Format A5 +PaperFormatEUA6=Format A6 +PaperFormatUSLETTER=Format Letter US +PaperFormatUSLEGAL=Format Legal US +PaperFormatUSEXECUTIVE=Format Executive US +PaperFormatUSLEDGER=Format Ledger/Tabloid +PaperFormatCAP1=Format P1 Canada +PaperFormatCAP2=Format P2 Canada +PaperFormatCAP3=Format P3 Canada +PaperFormatCAP4=Format P4 Canada +PaperFormatCAP5=Format P5 Canada +PaperFormatCAP6=Format P6 Canada diff --git a/htdocs/langs/sl_SI/ecm.lang b/htdocs/langs/sl_SI/ecm.lang index f4a2afdecc0..7807ec7e85c 100644 --- a/htdocs/langs/sl_SI/ecm.lang +++ b/htdocs/langs/sl_SI/ecm.lang @@ -23,10 +23,10 @@ ECMNewDocument=Nov dokument ECMCreationDate=Datum kreiranja ECMNbOfFilesInDir=Število datotek v mapi ECMNbOfSubDir=Število poddirektorijev -# ECMNbOfFilesInSubDir=Number of files in sub-directories +ECMNbOfFilesInSubDir=Število datotek v poddirektorijih ECMCreationUser=Kreator -# ECMArea=EDM area -# ECMAreaDesc=The EDM (Electronic Document Management) area allows you to save, share and search quickly all kind of documents in Dolibarr. +ECMArea=EDM področje +ECMAreaDesc=Področje za upravljanje elektronskih dokumentov (EDM - Electronic Document Management) omogoča shranjevanje, skupno rabo in hitro iskanje vseh vrst dokumentov v Dolibarrju. ECMAreaDesc2=* Avtomatske mape se polnijo avtomatsko, ko se doda dokument s kartice elementa.
    * Ročne mape se lahko uporabijo za shranitev dokumentov, ki niso vezani na določen element. ECMSectionWasRemoved=Mapa %s je bila izbrisana. ECMDocumentsSection=Dokument v mapi @@ -35,14 +35,14 @@ ECMSearchByEntity=Iskanje po objektu ECMSectionOfDocuments=Mape dokumentov ECMTypeManual=Ročno ECMTypeAuto=Avtomatsko -# ECMDocsBySocialContributions=Documents linked to social contributions +ECMDocsBySocialContributions=Dokumenti, povezani s socialnimi prispevki ECMDocsByThirdParties=Dokumenti, povezani s partnerjem ECMDocsByProposals=Dokumenti, povezani s ponudbami ECMDocsByOrders=Dokumenti, povezani z naročili kupcev ECMDocsByContracts=Dokumenti, povezani s pogodbami ECMDocsByInvoices=Dokumenti, povezani z računi za kupce ECMDocsByProducts=Dokumenti, povezani s proizvodi -# ECMDocsByProjects=Documents linked to projects +ECMDocsByProjects=Dokumenti, povezani s projekti ECMNoDirectoryYet=Ni kreiranih map ShowECMSection=Prikaži mapo DeleteSection=Odstrani mapo @@ -51,5 +51,5 @@ ECMDirectoryForFiles=Odvisna mapa za datoteke CannotRemoveDirectoryContainsFiles=Odstranitev ni možna, ker mapa vsebuje datoteke ECMFileManager=Upravljanje z datotekami ECMSelectASection=Izberite mapo na levi drevesni strukturi... -# DirNotSynchronizedSyncFirst=This directory seems to be created or modified outside ECM module. You must click on "Refresh" button first to synchronize disk and database to get content of this directory. +DirNotSynchronizedSyncFirst=Kaže, da je bila ta mapa ustvarjena ali spremenjena zunaj ECM modula. Za ogled vsebine mape morate najprej klikniti na gumb "Osveži", da sinhronizirate disk in bazo podatkov diff --git a/htdocs/langs/sl_SI/exports.lang b/htdocs/langs/sl_SI/exports.lang index 676391ad07f..88d1c8f6e2f 100644 --- a/htdocs/langs/sl_SI/exports.lang +++ b/htdocs/langs/sl_SI/exports.lang @@ -8,7 +8,7 @@ ImportableDatas=Podatkovni niz, ki se lahko uvozi SelectExportDataSet=Izberite podatkovni niz, ki ga želite izvoziti... SelectImportDataSet=Izberite podatkovni niz, ki ga želite uvoziti... SelectExportFields=Izberite polja, ki jih želite izvoziti, ali izberite preddefiniran izvozni profil -SelectImportFields=Izberite polja v izvorni datoteki, ki jih želite izvoziti in njihova ciljna polja v bazi podatkov, s premikanjem sidra %s gor in dol, ali z izbiro prednastavljenega uvoznega profila: +SelectImportFields=Choose source file fields you want to import and their target field in database by moving them up and down with anchor %s, or select a predefined import profile: NotImportedFields=Neuvožena polja izvorne datoteke SaveExportModel=Shranite ta izvozni profil, če ga nameravate kasneje znova uporabiti... SaveImportModel=Shranite ta uvozni profil, če ga nameravate kasneje znova uporabiti... @@ -64,7 +64,7 @@ ChooseFormatOfFileToImport=Format datoteke, ki naj se uporabi kot uvozni format, ChooseFileToImport=Naložite datoteko in zatem kliknite na piktogram %s za izbor izvorne uvozne datoteke... SourceFileFormat=Format izvorne datoteke FieldsInSourceFile=Polja v izvorni datoteki -# FieldsInTargetDatabase=Target fields in Dolibarr database (bold=mandatory) +FieldsInTargetDatabase=Target fields in Dolibarr database (bold=mandatory) Field=Polje NoFields=Ni polj MoveField=Premaknite kolono s polji številka %s @@ -81,7 +81,7 @@ DoNotImportFirstLine=Ne uvozite prve vrstice izvorne datoteke NbOfSourceLines=Število vrstic v izvorni datoteki NowClickToTestTheImport=Preverite definirane uvozne parametre. Če so pravilni, kliknite gumb "%s" za zagon simulacije postopka uvoza (nobeni podatki v vaši bazi podatkov ne bodo spremenjeni, trenutno gre samo za simulacijo)... RunSimulateImportFile=Zagon simulacije uvoza -FieldNeedSource=Ta polja v bazi podatkov zahtevajo podatek iz izvorne datoteke +FieldNeedSource=This field requires data from the source file SomeMandatoryFieldHaveNoSource=Nekatera uvozna polja nimajo izvora v podatkovni datoteki InformationOnSourceFile=Informacije o izvorni datoteki InformationOnTargetTables=Informacije o ciljnih poljih @@ -102,33 +102,33 @@ NbOfLinesImported=Število uspešno uvoženih vrstic: %s. DataComeFromNoWhere=Vrednost za vstavljanje ne prihaja iz izvorne datoteke. DataComeFromFileFieldNb=Vrednost za vstavljanje prihaja iz polja %s izvorne datoteke. DataComeFromIdFoundFromRef=Vrednost, ki prihaja iz polja %s izvorne datoteke bo uporabljena za iskanje id nadrejenega objekta (Torej mora objekt %s , ki ima referenco v izvorni datoteki, obstajati v Dolibarr). -# DataComeFromIdFoundFromCodeId=Code that comes from field number %s of source file will be used to find id of parent object to use (So the code from source file must exists into dictionary %s). Note that if you know id, you can also use it into source file instead of code. Import should work in both cases. +DataComeFromIdFoundFromCodeId=Code that comes from field number %s of source file will be used to find id of parent object to use (So the code from source file must exists into dictionary %s). Note that if you know id, you can also use it into source file instead of code. Import should work in both cases. DataIsInsertedInto=Podatki iz izvorne datoteke bodo vstavljeni v naslednja polja: DataIDSourceIsInsertedInto=Id nadrejenega objekta, ki je bil najden ob uporabi podatkov iz izvorne datoteke, bo vstavljen v naslednje polje: DataCodeIDSourceIsInsertedInto=Id starševske linije najdete na kodo, bo vstavljena v naslednjem področju: SourceRequired=Podatkovna vrednost je obvezna SourceExample=Primer možnih podatkovnih vrednosti ExampleAnyRefFoundIntoElement=Vsak ref našel elementov za %s -# ExampleAnyCodeOrIdFoundIntoDictionary=Any code (or id) found into dictionary %s +ExampleAnyCodeOrIdFoundIntoDictionary=Any code (or id) found into dictionary %s CSVFormatDesc=Comma Separated Value format datoteke (.csv).
    To je tekstovni format datoteke, kjer so polja ločena z ločilom [ %s ]. Če se v vsebini polja nahaja ločilo, se polje zaokroži z znakom za zaokrožitev [ %s ]. Znak za preklic zaokrožitve je [ %s ]. -# Excel95FormatDesc=Excel file format (.xls)
    This is native Excel 95 format (BIFF5). -# Excel2007FormatDesc=Excel file format (.xlsx)
    This is native Excel 2007 format (SpreadsheetML). -# TsvFormatDesc=Tab Separated Value file format (.tsv)
    This is a text file format where fields are separated by a tabulator [tab]. -# ExportFieldAutomaticallyAdded=Field %s was automatically added. It will avoid you to have similar lines to be treated as duplicate records (with this field added, all lines will own their own id and will differ). -# CsvOptions=Csv Options -# Separator=Separator -# Enclosure=Enclosure -# SuppliersProducts=Suppliers Products +Excel95FormatDesc=Excel file format (.xls)
    This is native Excel 95 format (BIFF5). +Excel2007FormatDesc=Excel file format (.xlsx)
    This is native Excel 2007 format (SpreadsheetML). +TsvFormatDesc=Tab Separated Value file format (.tsv)
    This is a text file format where fields are separated by a tabulator [tab]. +ExportFieldAutomaticallyAdded=Field %s was automatically added. It will avoid you to have similar lines to be treated as duplicate records (with this field added, all lines will own their own id and will differ). +CsvOptions=Csv Options +Separator=Separator +Enclosure=Enclosure +SuppliersProducts=Suppliers Products BankCode=Koda banke DeskCode=Koda blagajne BankAccountNumber=Številka konta BankAccountNumberKey=Ključ -# SpecialCode=Special code -# ExportStringFilter=%% allows replacing one or more characters in the text -# ExportDateFilter='YYYY' 'YYYYMM' 'YYYYMMDD': filters by one year/month/day
    'YYYY+YYYY' 'YYYYMM+YYYYMM' 'YYYYMMDD+YYYYMMDD': filters over a range of years/months/days
    '>YYYY' '>YYYYMM' '>YYYYMMDD': filters on the following years/months/days
    '<YYYY' '<YYYYMM' '<YYYYMMDD': filters on the previous years/months/days -# ExportNumericFilter='NNNNN' filters by one value
    'NNNNN+NNNNN' filters over a range of values
    '>NNNNN' filters by lower values
    '>NNNNN' filters by higher values +SpecialCode=Special code +ExportStringFilter=%% allows replacing one or more characters in the text +ExportDateFilter='YYYY' 'YYYYMM' 'YYYYMMDD': filters by one year/month/day
    'YYYY+YYYY' 'YYYYMM+YYYYMM' 'YYYYMMDD+YYYYMMDD': filters over a range of years/months/days
    '>YYYY' '>YYYYMM' '>YYYYMMDD': filters on the following years/months/days
    '<YYYY' '<YYYYMM' '<YYYYMMDD': filters on the previous years/months/days +ExportNumericFilter='NNNNN' filters by one value
    'NNNNN+NNNNN' filters over a range of values
    '>NNNNN' filters by lower values
    '>NNNNN' filters by higher values ## filters -# SelectFilterFields=If you want to filter on some values, just input values here. -# FilterableFields=Champs Filtrables -# FilteredFields=Filtered fields -# FilteredFieldsValues=Value for filter +SelectFilterFields=If you want to filter on some values, just input values here. +FilterableFields=Champs Filtrables +FilteredFields=Filtered fields +FilteredFieldsValues=Value for filter diff --git a/htdocs/langs/sl_SI/ftp.lang b/htdocs/langs/sl_SI/ftp.lang index 9de7a1a9799..359e4c52a57 100644 --- a/htdocs/langs/sl_SI/ftp.lang +++ b/htdocs/langs/sl_SI/ftp.lang @@ -9,4 +9,4 @@ FailedToConnectToFTPServer=Neuspešna povezava s FTP strežnikom (strežnik %s, FailedToConnectToFTPServerWithCredentials=Neuspešna prijava na FTP strežnik z določenim uporabniškim imenom/geslom FTPFailedToRemoveFile=Neuspešna odstranitev datoteke %s. FTPFailedToRemoveDir=Neuspešna odstranitev mape %s (Preverite dovoljenja in če je ta mapa prazna). -# FTPPassiveMode=Passive mode +FTPPassiveMode=Pasivni način diff --git a/htdocs/langs/sl_SI/help.lang b/htdocs/langs/sl_SI/help.lang index a0f529c921b..1450e305a56 100644 --- a/htdocs/langs/sl_SI/help.lang +++ b/htdocs/langs/sl_SI/help.lang @@ -24,5 +24,5 @@ BackToHelpCenter=Sicer kliknite tukaj za prehod nazaj na domačo st LinkToGoldMember=Lahko pokličete enega of inštruktorjev, ki jih je Dolibarr izbral vnaprej za vaš jezik (%s) s kliko na ustrezno ikono (status in maksimalna cena se posodobita avtomatsko): PossibleLanguages=Podprti jeziki MakeADonation=Pomagajte projektu Dolibarr z vašo donacijo -# SubscribeToFoundation=Help Dolibarr project, subscribe to the foundation -# SeeOfficalSupport=For official Dolibarr support in your language:
    %s +SubscribeToFoundation=POmagajte projektu Dolibarr z včlanitvijo v združenje +SeeOfficalSupport=Za uradno Dolibarr podporo v vašem jeziku:
    %s diff --git a/htdocs/langs/sl_SI/holiday.lang b/htdocs/langs/sl_SI/holiday.lang index 7acbb634c1e..42f3b6da611 100644 --- a/htdocs/langs/sl_SI/holiday.lang +++ b/htdocs/langs/sl_SI/holiday.lang @@ -8,7 +8,6 @@ NotActiveModCP=You must enable the module holidays to view this page. NotConfigModCP=You must configure the module holidays to view this page. To do this, click here . NoCPforUser=You don't have a demand for holidays. AddCP=Apply for holidays -CPErrorSQL=An SQL error occurred: Employe=Employee DateDebCP=Začetni datum DateFinCP=Končni datum diff --git a/htdocs/langs/sl_SI/install.lang b/htdocs/langs/sl_SI/install.lang index ea8cb23699e..af1a819a9fc 100644 --- a/htdocs/langs/sl_SI/install.lang +++ b/htdocs/langs/sl_SI/install.lang @@ -25,14 +25,14 @@ ErrorGoBackAndCorrectParameters=Vrnite se nazaj in popravite napačne parametre. ErrorWrongValueForParameter=Morda ste vnesli napačno vrednost parametra '%s'. ErrorFailedToCreateDatabase=Neuspešno kreiranje baze podatkov '%s'. ErrorFailedToConnectToDatabase=Neuspešna povezava z bazo podatkov '%s'. -ErrorDatabaseVersionTooLow=Database version (%s) too old. Version %s or higher is required. +ErrorDatabaseVersionTooLow=Verzija baze podatkov (%s) je prestara. Zahtevana je verzija %s ali novejša. ErrorPHPVersionTooLow=PHP verzija je prestara. Zahtevana je verzija %s. WarningPHPVersionTooLow=PHP verzija je prestara. Pričakovana je verzija %s ali novejša. Ta verzija bi morala dovoliti namestitev, vendar ni podprta. ErrorConnectedButDatabaseNotFound=Povezava s strežnikom je vzpostavljena, vendar ni najdena baza podatkov'%s'. ErrorDatabaseAlreadyExists=Baza podatkov '%s' že obstaja. IfDatabaseNotExistsGoBackAndUncheckCreate=Če baza podatkov ne obstaja, se vrnite nazaj in označite opcijo "Ustvari bazo podatkov". IfDatabaseExistsGoBackAndCheckCreate=Če baza podatkov že obstaja, se vrnite nazaj in odznačite opcijo "Ustvari bazo podatkov". -WarningBrowserTooOld=Too old version of browser. Upgrading your browser to a recent version of Firefox, Chrome or Opera is highly recommanded. +WarningBrowserTooOld=Verzija brskalnika je prestara. Priporočamo nadgraditev vašega brskalnika na zadnjo verzijo Firefox, Chrome ali Opera. PHPVersion=PHP Verzija YouCanContinue=Lahko nadaljujete... PleaseBePatient=Prosim, bodite potrpežljivi... @@ -154,7 +154,7 @@ MigrationShippingDelivery2=Nadgraditev skladišča za odpremo 2 MigrationFinished=Prenos končan LastStepDesc=Zadnji korak: Tukaj določite uporabniško ime in geslo, ki ju nameravate uporabiti za priklop v software. Ne izgubite ju, ker je to račun za administriranje vseh ostalih računov. ActivateModule=Vključite modul %s -ShowEditTechnicalParameters=Click here to show/edit advanced parameters (expert mode) +ShowEditTechnicalParameters=Kliknite tukaj za prikaz/popravek naprednih parametrov (expertni način) ######### # upgrade @@ -205,7 +205,7 @@ MigrationProjectUserResp=Prenos podatkov polja fk_user_resp tabele llx_projet v MigrationProjectTaskTime=Posodobitev porabljenega časa v sekundah MigrationActioncommElement=Posodobitev podatkov o aktivnostih MigrationPaymentMode=Podatki, migracije za način plačila -MigrationCategorieAssociation=Migration of categories +MigrationCategorieAssociation=Migracija kategorij -ShowNotAvailableOptions=Show not available options -HideNotAvailableOptions=Hide not available options +ShowNotAvailableOptions=Prikaži opcije, ki niso na voljo +HideNotAvailableOptions=Skrij opcije, ki niso na voljo diff --git a/htdocs/langs/sl_SI/interventions.lang b/htdocs/langs/sl_SI/interventions.lang index 1946b4d96c6..9e9727bca9e 100644 --- a/htdocs/langs/sl_SI/interventions.lang +++ b/htdocs/langs/sl_SI/interventions.lang @@ -23,7 +23,7 @@ ConfirmDeleteInterventionLine=Ali zares želite izbrisati to vrstico intervencij NameAndSignatureOfInternalContact=Ime in podpis serviserja : NameAndSignatureOfExternalContact=Ime in podpis kupca : DocumentModelStandard=Standardni vzorec dokumenta za intervencijo -# InterventionCardsAndInterventionLines=Interventions and lines of interventions +InterventionCardsAndInterventionLines=Intervencije in vrstice na intervenciji ClassifyBilled=Označi kot "Zaračunano" StatusInterInvoiced=Zaračunano RelatedInterventions=Odvisne intervencije @@ -38,5 +38,5 @@ ArcticNumRefModelDesc1=Generični številčni model ArcticNumRefModelError=Aktivacija ni uspela PacificNumRefModelDesc1=Predlaga številko v formatu %syymm-nnnn kjer je yy leto, mm mesec in nnnn zaporedna številka brez presledkov in različna od 0 PacificNumRefModelError=Kartica intervencije, ki se začne z $syymm že obstaja in ni kompatibilna s tem modelom sekvence. Odstranite jo ali jo preimenujte, če želite aktivirati ta modul. -# PrintProductsOnFichinter=Print products on intervention card -# PrintProductsOnFichinterDetails=forinterventions generated from orders +PrintProductsOnFichinter=Natisni proizvode na intervencijsko kartico +PrintProductsOnFichinterDetails=za intervencije na osnovi naročil diff --git a/htdocs/langs/sl_SI/languages.lang b/htdocs/langs/sl_SI/languages.lang index e28d8fcc7bd..052160f6a7a 100644 --- a/htdocs/langs/sl_SI/languages.lang +++ b/htdocs/langs/sl_SI/languages.lang @@ -19,8 +19,9 @@ Language_en_SA=Angleški (Savdska Arabija) Language_en_US=Angleščina (ZDA) Language_en_ZA=Angleščina (Južna Afrika) Language_es_ES=Španščina +Language_es_DO=Španščina (Dominikanska republika) Language_es_AR=Španščina (Argentina) -Language_es_CL=Spanish (Chile) +Language_es_CL=Španščina (Čile) Language_es_HN=Španščina (Honduras) Language_es_MX=Španščina (Mehika) Language_es_PY=Španski (Paragvaj) @@ -38,6 +39,7 @@ Language_fr_NC=Francoski (Nova Kaledonija) Language_he_IL=Hebrew Language_hr_HR=Hrvaški Language_hu_HU=Madžarščina +Language_id_ID=Indonezijščina Language_is_IS=Islandščina Language_it_IT=Italijanščina Language_ja_JP=Japonščina @@ -58,7 +60,7 @@ Language_tr_TR=Turščina Language_sl_SI=Slovenščina Language_sv_SV=Švedščina Language_sv_SE=Švedščina -Language_sq_AL=Albanian +Language_sq_AL=Albanščina Language_sk_SK=Slovaški Language_th_TH=Thai Language_uk_UA=Ukrajinski diff --git a/htdocs/langs/sl_SI/mails.lang b/htdocs/langs/sl_SI/mails.lang index 6447e048f83..494e459df64 100644 --- a/htdocs/langs/sl_SI/mails.lang +++ b/htdocs/langs/sl_SI/mails.lang @@ -79,6 +79,7 @@ MailtoEMail=Hyper link to email ActivateCheckRead=Allow to use the "Unsubcribe" link ActivateCheckReadKey=Key use to encrypt URL use for "Read Receipt" and "Unsubcribe" feature EMailSentToNRecipients=EMail sent to %s recipients. +XTargetsAdded=%s recipients added into target list EachInvoiceWillBeAttachedToEmail=A document using default invoice document template will be created and attached to each email. MailTopicSendRemindUnpaidInvoices=Reminder of invoice %s (%s) SendRemind=Send reminder by EMails diff --git a/htdocs/langs/sl_SI/main.lang b/htdocs/langs/sl_SI/main.lang index f98d6699f67..dbab5707dee 100644 --- a/htdocs/langs/sl_SI/main.lang +++ b/htdocs/langs/sl_SI/main.lang @@ -23,8 +23,8 @@ FormatDateHourSecShort=%m/%d/%Y %I:%M:%S %p FormatDateHourTextShort=%d. %b, %Y, %I:%M %p FormatDateHourText=%d. %B, %Y, %I:%M %p DatabaseConnection=Povezave podatkovnih baz -NoTranslation=No translation -NoRecordFound=No record found +NoTranslation=Ni prevoda +NoRecordFound=Ni najden zapis NoError=Ni napake Error=Napaka ErrorFieldRequired=Polje '%s' je obvezno @@ -34,7 +34,7 @@ ErrorFailedToOpenFile=Napaka pri odpiranju datoteke %s ErrorCanNotCreateDir=Ni možno kreiranje mape %s ErrorCanNotReadDir=Ni možno branje mape %s ErrorConstantNotDefined=Parameter %s ni definiran -ErrorUnknown=Unknown error +ErrorUnknown=Neznana napaka ErrorSQL=SQL napaka ErrorLogoFileNotFound=Datoteka z logotipom '%s' ni bila najdena ErrorGoToGlobalSetup=Popravite v meniju 'Nastavitve', 'Podjetje/Ustanova' @@ -60,16 +60,16 @@ ErrorNoSocialContributionForSellerCountry=Napaka, za državo '%s' niso definiran ErrorFailedToSaveFile=Napaka, datoteka ni bila shranjena. ErrorOnlyPngJpgSupported=Napaka, podprta sta samo slikovna formata .png in .jpg. ErrorImageFormatNotSupported=Vaš PHP ne podpira funkcije pretvarjanja slik tega formata. -SetDate=Set date -SelectDate=Select a date -SeeAlso=See also %s +SetDate=Nastavi datum +SelectDate=Izberi datum +SeeAlso=Glejte tudi %s BackgroundColorByDefault=Privzeta barva ozadja FileWasNotUploaded=Izbrana je bila datoteka za prilogo, vendar še ni dodana. Kliknite na "Pripni datoteko". NbOfEntries=Število vpisov GoToWikiHelpPage=Preberite online pomoč (potreben je internetni dostop) GoToHelpPage=Preberite pomoč RecordSaved=Zapis je shranjen -RecordDeleted=Record deleted +RecordDeleted=Zapis je izbrisan LevelOfFeature=Nivo značilnosti NotDefined=Ni definiran DefinedAndHasThisValue=Definiran z vrednostjo @@ -94,7 +94,7 @@ InformationLastAccessInError=Napaka informacije zahtevka za dostop do zadnje baz DolibarrHasDetectedError=Dolibarr je zaznal tehnično napako InformationToHelpDiagnose=Ta informacija lahko pomaga pri diagnozi MoreInformation=Več informacij -TechnicalInformation=Technical information +TechnicalInformation=Tehnična informacija NotePublic=Opomba (javna) NotePrivate=Opomba (privatna) PrecisionUnitIsLimitedToXDecimals=Dolibarr je nastavljen na omejitev natančnosti cen posameznih enot na %s decimalk. @@ -120,7 +120,7 @@ Activated=Aktiviran Closed=Zaključen Closed2=Zaključen Enabled=Omogočen -Deprecated=Deprecated +Deprecated=Nasprotovanje Disable=Onemogoči Disabled=Onemogočen Add=Dodaj @@ -147,8 +147,8 @@ ToClone=Kloniraj ConfirmClone=Izberi podatke za kloniranje : NoCloneOptionsSpecified=Ni definiranih podatkov za kloniranje. Of=od -Go=Go -Run=Run +Go=Pojdi +Run=Zaženi CopyOf=Kopija od Show=Prikaži ShowCardHere=Prikaži kartico @@ -158,7 +158,7 @@ Valid=Veljaven Approve=Potrdi ReOpen=Ponovno odpri Upload=Dodaj datoteko -ToLink=Link +ToLink=POvezava Select=Dodaj kot lastnika Choose=Izbira ChooseLangage=Prosimo, izberite vaš jezik @@ -206,7 +206,7 @@ Limit=Omejitev Limits=Omejitve DevelopmentTeam=Razvojni tim Logout=Odjava -NoLogoutProcessWithAuthMode=No applicative disconnect feature with authentication mode %s +NoLogoutProcessWithAuthMode=Ni zahtevana funkcija odklopa pri avtentifikacijskem načinu %s Connection=Prijava Setup=Nastavitve Alert=Opozorilo @@ -261,13 +261,13 @@ Seconds=Sekund Today=Danes Yesterday=Včeraj Tomorrow=Jutri -Morning=Morning -Afternoon=Afternoon +Morning=Jutro +Afternoon=Popoldan Quadri=Četrtletje MonthOfDay=Dan v mesecu HourShort=H Rate=Stopnja -UseLocalTax=Include tax +UseLocalTax=Vključi davek Bytes=Byti KiloBytes=Kilobyti MegaBytes=Megabyti @@ -299,8 +299,8 @@ AmountTTCShort=Znesek (z DDV) AmountHT=Znesek (neto) AmountTTC=Znesek (z DDV) AmountVAT=Znesek DDV -AmountLT1=Amount tax 2 -AmountLT2=Amount tax 3 +AmountLT1=Znesek davka 2 +AmountLT2=Znesek davka 3 AmountLT1ES=Znesek RE AmountLT2ES=Znesek IRPF AmountTotal=Skupni znesek @@ -315,12 +315,12 @@ SubTotal=Delna vsota TotalHTShort=Skupaj (neto) TotalTTCShort=Skupaj (z DDV) TotalHT=Skupaj (neto) -TotalHTforthispage=Total (net of tax) for this page +TotalHTforthispage=Skupaj (brez davka) za to stran TotalTTC=Skupaj (z DDV) TotalTTCToYourCredit=Skupaj (z DDV) na vaš dobropis TotalVAT=Skupaj DDV -TotalLT1=Total tax 2 -TotalLT2=Total tax 3 +TotalLT1=Skupaj davek 2 +TotalLT2=Skupaj davek 3 TotalLT1ES=Skupaj RE TotalLT2ES=Skupaj IRPF IncludedVAT=Vključen DDV @@ -358,8 +358,8 @@ ActionRunningShort=Začete ActionDoneShort=Končane CompanyFoundation=Podjetje/Ustanova ContactsForCompany=Kontakti tega partnerja -ContactsAddressesForCompany=Contacts/addresses for this third party -AddressesForCompany=Addresses for this third party +ContactsAddressesForCompany=Kontakti/naslovi za tega partnerja +AddressesForCompany=Naslovi za tega partnerja ActionsOnCompany=Aktivnosti v zvezi s tem partnerjem ActionsOnMember=Dogodki okoli tega člana NActions=%s aktivnosti @@ -395,7 +395,7 @@ OtherInformations=Ostale informacije Quantity=Količina Qty=Kol. ChangedBy=Spremenil -ReCalculate=Recalculate +ReCalculate=Ponovno izračunaj ResultOk=Uspeh ResultKo=Napaka Reporting=Poročilo @@ -490,8 +490,8 @@ Report=Poročilo Keyword=Ključna beseda Legend=Legenda FillTownFromZip=Zapolni mesto iz poštne številke -Fill=Fill -Reset=Reset +Fill=Zapolni +Reset=Ponastavi ShowLog=Prikaži dnevnik File=Datoteka Files=Datoteke @@ -551,6 +551,7 @@ MailSentBy=Email poslal TextUsedInTheMessageBody=Vsebina Email-a SendAcknowledgementByMail=Pošlji potrditev po email-u NoEMail=Ni email-a +NoMobilePhone=Ni mobilnega telefona Owner=Lastnik DetectedVersion=Zaznana različica FollowingConstantsWillBeSubstituted=Naslednje konstante bodo zamenjane z ustrezno vrednostjo. @@ -560,7 +561,7 @@ GoBack=Pojdi nazaj CanBeModifiedIfOk=Lahko se spremeni, če je veljaven CanBeModifiedIfKo=Lahko se spremeni, če ni veljaven RecordModifiedSuccessfully=Zapis uspešno spremenjen -RecordsModified=%s records modified +RecordsModified=%s zapisov spremenjenih AutomaticCode=Avtomatska koda NotManaged=Ni upravljan FeatureDisabled=Funkcija onemogočena @@ -576,7 +577,7 @@ TotalWoman=Skupna TotalMan=Skupni NeverReceived=Nikoli prejeto Canceled=Preklicano -YouCanChangeValuesForThisListFromDictionarySetup=You can change values for this list from menu setup - dictionary +YouCanChangeValuesForThisListFromDictionarySetup=Vrednosti za ta seznam lahko spremenite na meniju 'Nastavitve – Slovarji' Color=Barva Documents=Povezane datoteke DocumentsNb=Število povezanih datotek (%s) @@ -591,7 +592,7 @@ ThisLimitIsDefinedInSetup=Dolibarr omejitve (Meni domov-nastavitve-varnost): %s NoFileFound=V tej mapi ni shranjenih dokumentov CurrentUserLanguage=Trenutni jezik CurrentTheme=Trenutna tema -CurrentMenuManager=Current menu manager +CurrentMenuManager=Trenutni upravljalnik menija DisabledModules=Onemogočeni moduli For=Za ForCustomer=Za kupca @@ -605,13 +606,13 @@ Notes=Opombe AddNewLine=Dodaj novo vrstico AddFile=Dodaj datoteko ListOfFiles=Seznam datotek, ki so na voljo -FreeZone=Free entry -FreeLineOfType=Free entry of type +FreeZone=Prost vnos +FreeLineOfType=Prost vnos tipa CloneMainAttributes=Kloniraj objekt z osnovnimi atributi PDFMerge=Spoji PDF Merge=Spoji PrintContentArea=Prikaži stran za izpis področja z osnovno vsebino -MenuManager=Menu manager +MenuManager=Upravljalnik menija NoMenu=Ni podmenija WarningYouAreInMaintenanceMode=Pozor, ste v vzdrževalnem načinu, zato je trenutno samo prijavljenemu %s dovoljena uporaba aplikacije. CoreErrorTitle=Sistemska napaka @@ -653,26 +654,26 @@ ByYear=Po letih ByMonth=po mesecih ByDay=Po dnevih BySalesRepresentative=Z prodajni predstavnik -LinkedToSpecificUsers=Linked to a particular user contact -DeleteAFile=Delete a file -ConfirmDeleteAFile=Are you sure you want to delete file -NoResults=No results -ModulesSystemTools=Modules tools +LinkedToSpecificUsers=Povezano z določenim kontaktom uporabnika +DeleteAFile=Izbriši datoteko +ConfirmDeleteAFile=Ali zares želite izbrisati datoteko +NoResults=Ni rezultata +ModulesSystemTools=Orodja za module Test=Test Element=Element -NoPhotoYet=No pictures available yet -HomeDashboard=Home summary -Deductible=Deductible -from=from -toward=toward -Access=Access -HelpCopyToClipboard=Use Ctrl+C to copy to clipboard -SaveUploadedFileWithMask=Save file on server with name "%s" (otherwise "%s") -OriginFileName=Original filename -SetDemandReason=Set source -ViewPrivateNote=View notes -XMoreLines=%s line(s) hidden -PublicUrl=Public URL +NoPhotoYet=Slik še ni na voljo +HomeDashboard=Povzetek domačega področja +Deductible=Odbiten +from=od +toward=proti +Access=Dostop +HelpCopyToClipboard=Uporabi Ctrl+C za kopiranje na odložišče +SaveUploadedFileWithMask=Shrani datoteko na strežnik z imenom "%s" (otherwise "%s") +OriginFileName=Originalno ime datoteke +SetDemandReason=Nastavi vir +ViewPrivateNote=Glej opombe +XMoreLines=%s zasenčena(ih) vrstic +PublicUrl=Javni URL # Week day Monday=Ponedeljek diff --git a/htdocs/langs/sl_SI/members.lang b/htdocs/langs/sl_SI/members.lang index db76e3e97c3..291108ce99a 100644 --- a/htdocs/langs/sl_SI/members.lang +++ b/htdocs/langs/sl_SI/members.lang @@ -8,7 +8,7 @@ Members=Člani MemberAccount=Prijava za člane ShowMember=Prikaži člansko kartico UserNotLinkedToMember=Uporabnik ni povezan s članstvom -# ThirdpartyNotLinkedToMember=Third-party not linked to a member +ThirdpartyNotLinkedToMember=Partner ni povezan s članom MembersTickets=Članske vstopnice FundationMembers=Člani fundacije Attributs=Atributi @@ -86,7 +86,6 @@ SubscriptionNotReceivedShort=Nikoli prejeto ListOfSubscriptions=Spisek članarin SendCardByMail=Pošlji kartico AddMember=Dodaj člana -MemberType=Tip člana NoTypeDefinedGoToSetup=Tipi članov niso določeni. Pojdite v Nastavitve – ipi članov NewMemberType=Nov tip člana WelcomeEMail=e-pošta za dobrodošlico @@ -130,8 +129,8 @@ AddSubscription=Dodaj naročnino ShowSubscription=Prikaži naročnino MemberModifiedInDolibarr=Član je spremenjen v Dolibarr SendAnEMailToMember=Pošlji članu informativno e-pošto -# DescADHERENT_AUTOREGISTER_NOTIF_MAIL_SUBJECT=Subject of the e-mail received in case of auto-inscription of a guest -# DescADHERENT_AUTOREGISTER_NOTIF_MAIL=E-mail received in case of auto-inscription of a guest +DescADHERENT_AUTOREGISTER_NOTIF_MAIL_SUBJECT=Zadeva v e-pošti, ki je prejeta ob avtomatskem vpisu gosta +DescADHERENT_AUTOREGISTER_NOTIF_MAIL=E-pošta, ki je prejeta ob avtomatskem vpisu gosta DescADHERENT_AUTOREGISTER_MAIL_SUBJECT=E-Mail obrazec za avtomatsko včlanitev DescADHERENT_AUTOREGISTER_MAIL=E-Mail za avtomatsko včlanitev DescADHERENT_MAIL_VALID_SUBJECT=E-Mail obrazec za potrditev člana @@ -142,7 +141,7 @@ DescADHERENT_MAIL_RESIL_SUBJECT=E-Mail obrazec za obnovitev članstva DescADHERENT_MAIL_RESIL=E-Mail za obnovitev članstva DescADHERENT_MAIL_FROM=Pošiljateljev E-Mail za avtomatsko pošto DescADHERENT_ETIQUETTE_TYPE=Format nalepk -# DescADHERENT_ETIQUETTE_TEXT=Text printed on member address sheets +DescADHERENT_ETIQUETTE_TEXT=Tekst na evidenčnem listu člana DescADHERENT_CARD_TYPE=Format kartic DescADHERENT_CARD_HEADER_TEXT=Tekst v glavi članske kartice DescADHERENT_CARD_TEXT=Tekst na članski kartici @@ -156,7 +155,7 @@ NoThirdPartyAssociatedToMember=Noben partner ni povezan s tem članom ThirdPartyDolibarr=Dolibarr partner MembersAndSubscriptions= Člani in naročnine MoreActions=Dopolnilna aktivnost pri zapisovanju -# MoreActionsOnSubscription=Complementary action, suggested by default when recording a subscription +MoreActionsOnSubscription=Dopolnilna aktivnost, ki je privzeto predlagana pri zapisovanju naročnine MoreActionBankDirect=Ustvarjanje neposrednega zapisa transakcije na račun MoreActionBankViaInvoice=Ustvarjanje računa in plačila na račun MoreActionInvoiceOnly=Ustvarjanje računa brez plačila @@ -171,6 +170,8 @@ LastSubscriptionAmount=Zadnji znesek članarine MembersStatisticsByCountries=Statistika članov po državah MembersStatisticsByState=Statistika članov po deželah MembersStatisticsByTown=Statistika članov po mestih +MembersStatisticsByRegion=Statistika članov po regijah +MemberByRegion=Člani po regijah NbOfMembers=Število članov NoValidatedMemberYet=Najdeni so nepotrjeni člani MembersByCountryDesc=Na tem zaslonu je prikazana statistika članov po državah. Grafika je odvisna od Google storitve in je na voljo samo pri delujoči internetni povezavi. @@ -196,9 +197,9 @@ Collectivités=Organizacije Particuliers=Osebe Entreprises=Podjetja DOLIBARRFOUNDATION_PAYMENT_FORM=Če želite plačati članarino z bančnim nakazilom, glejte stran http://wiki.dolibarr.org/index.php/Subscribe.
    Za plačilo s kreditno kartico ali Paypal, kliknite na gumb na dnu te strani.
    -# ByProperties=By characteristics -# MembersStatisticsByProperties=Members statistics by characteristics -# MembersByNature=Members by nature -# VATToUseForSubscriptions=VAT rate to use for subscriptions -# NoVatOnSubscription=No TVA for subscriptions -# MEMBER_PAYONLINE_SENDEMAIL=Email to warn when Dolibarr receive a confirmation of a validated payment for subscription +ByProperties=Po lastnostih +MembersStatisticsByProperties=Statistika članov po lastnostih +MembersByNature=Naravni člani +VATToUseForSubscriptions=Stopnja DDV za naročnine +NoVatOnSubscription=Ni davka za naročnine +MEMBER_PAYONLINE_SENDEMAIL=Opozorilno e-sporočilo, ko Dilibarr prejme potrdilo potrjenega plačila za naročnino diff --git a/htdocs/langs/sl_SI/orders.lang b/htdocs/langs/sl_SI/orders.lang index 2ce15daa5b8..9d1de0771ea 100644 --- a/htdocs/langs/sl_SI/orders.lang +++ b/htdocs/langs/sl_SI/orders.lang @@ -2,7 +2,7 @@ OrdersArea=Področje naročil kupcev SuppliersOrdersArea=Področje naročil pri dobaviteljih OrderCard=Kartica naročila -# OrderId=Order Id +OrderId=ID naročila Order=Naročilo Orders=Naročila OrderLine=Vrstica naročila @@ -28,7 +28,7 @@ StatusOrderCanceledShort=Preklicano StatusOrderDraftShort=Osnutek StatusOrderValidatedShort=Potrjeno StatusOrderSentShort=V postopku -# StatusOrderSent=Shipment in process +StatusOrderSent=Pošiljanje v teku StatusOrderOnProcessShort=V obdelavi StatusOrderProcessedShort=Obdelano StatusOrderToBillShort=Za fakturiranje @@ -53,9 +53,9 @@ ShippingExist=Pošiljka ne obstaja DraftOrWaitingApproved=Osnutek ali odobritev, še ne naročen DraftOrWaitingShipped=Osnutek ali potrditev, še ne odposlan MenuOrdersToBill=Naročila za fakturiranje -# MenuOrdersToBill2=Orders to bill +MenuOrdersToBill2=Naročila za fakturiranje SearchOrder=Iskanje naročila -# SearchACustomerOrder=Search a customer order +SearchACustomerOrder=Iskanje naročila kupca ShipProduct=Pošlji izdelek Discount=Popust CreateOrder=Kreiraj naročilo @@ -68,11 +68,11 @@ CancelOrder=Prekliči naročilo AddOrder=Dodaj naročilo AddToMyOrders=Dodaj mojim naročilom AddToOtherOrders=Dodaj ostalim naročilom -# AddToDraftOrders=Add to draft order +AddToDraftOrders=Dodaj osnutku naročila ShowOrder=Prikaži naročilo NoOpenedOrders=Ni odprtih naročil NoOtherOpenedOrders=Ni drugih odprtih naročil -# NoDraftOrders=No draft orders +NoDraftOrders=Ni osnutkov naročil OtherOrders=Ostala naročila LastOrders=Zadnjih %s naročil LastModifiedOrders=Zadnjih %s spremenjenih naročil @@ -82,7 +82,7 @@ NbOfOrders=Število naročil OrdersStatistics=Statistika naročil OrdersStatisticsSuppliers=Statistika naročil pri dobaviteljih NumberOfOrdersByMonth=Število naročil po mesecih -# AmountOfOrdersByMonthHT=Amount of orders by month (net of tax) +AmountOfOrdersByMonthHT=Znesek naročil po mesecih (brez DDV) ListOfOrders=Seznam naročil CloseOrder=Zaključi naročilo ConfirmCloseOrder=Ali zares želite zaključiti to naročilo? Ko je naročilo zaključeno, ga lahko samo še fakturirate. @@ -93,7 +93,7 @@ ConfirmUnvalidateOrder=Ali ste prepričani, da želite ponovno vzpostavi red ConfirmCancelOrder=Ali zares želite preklicati to naročilo ? ConfirmMakeOrder=Ali zares želite potrditi izdelavo naročila %s ? GenerateBill=Kreiraj račun -# ClassifyShipped=Classify delivered +ClassifyShipped=Označi kot dobavljeno ClassifyBilled=Označi kot "Fakturiran" ComptaCard=Računovodska kartica DraftOrders=Osnutki naročil @@ -101,7 +101,6 @@ RelatedOrders=Odvisna naročila OnProcessOrders=Naročila v obdelavi RefOrder=Ref. naročilo RefCustomerOrder=Ref. naročilo kupca -CustomerOrder=Naročilo kupca RefCustomerOrderShort=Ref. nar. kupca SendOrderByMail=Pošlji naročilo po pošti ActionsOnOrder=Aktivnosti ob naročilu @@ -131,9 +130,7 @@ Error_COMMANDE_SUPPLIER_ADDON_NotDefined=Konstanta COMMANDE_SUPPLIER_ADDON ni de Error_COMMANDE_ADDON_NotDefined=Konstanta COMMANDE_ADDON ni definirana Error_FailedToLoad_COMMANDE_SUPPLIER_ADDON_File=Napaka pri nalaganju modulske datoteke '%s' Error_FailedToLoad_COMMANDE_ADDON_File=Napaka pri nalaganju modulske datoteke '%s' -# Error_OrderNotChecked=No orders to invoice selected - - +Error_OrderNotChecked=Ni izbranih naročil za račun # Sources OrderSource0=Komercialna ponudba OrderSource1=Internet @@ -144,25 +141,23 @@ OrderSource5=Reklama OrderSource6=Trgovina QtyOrdered=Naročena količina AddDeliveryCostLine=Dodaj vrstico s stroški dobave in navedeno težo - # Documents models PDFEinsteinDescription=Vzorec popolnega naročila (logo...) PDFEdisonDescription=Vzorec enostavnega naročila -# PDFProformaDescription=A complete proforma invoice (logo…) +PDFProformaDescription=Kompleten predračun (logo...) # Orders modes OrderByMail=Pošta OrderByFax=Faks OrderByEMail=E-pošta OrderByWWW=Internet OrderByPhone=Telefon - -# CreateInvoiceForThisCustomer=Bill orders -# NoOrdersToInvoice=No orders billable -# CloseProcessedOrdersAutomatically=Classify "Processed" all selected orders. -# MenuOrdersToBill2=Orders to bill -# OrderCreation=Order creation -# Ordered=Ordered -# OrderCreated=Your orders have been created -# OrderFail=An error happened during your orders creation -# CreateOrders=Create orders -# ToBillSeveralOrderSelectCustomer=To create an invoice for several orders, click first onto customer, then choose "%s". +CreateInvoiceForThisCustomer=Zaračunaj naročila +NoOrdersToInvoice=Ni naročil, ki bi jih lahko zaračunali +CloseProcessedOrdersAutomatically=Označi vsa izbrana naročila kot "Procesirano" +MenuOrdersToBill2=Naročila za fakturiranje +OrderCreation=Ustvarjanje naročila +Ordered=Naročeno +OrderCreated=Vaša naročila so bila ustvarjena +OrderFail=Pri ustvarjanju naročil je prišlo do napake +CreateOrders=Ustvari naročila +ToBillSeveralOrderSelectCustomer=Za ustvarjanje računa za več naročil najprej kliknite na kupca, nato izberite "%s". diff --git a/htdocs/langs/sl_SI/paybox.lang b/htdocs/langs/sl_SI/paybox.lang index 4d8c46dac71..d3c604917b8 100644 --- a/htdocs/langs/sl_SI/paybox.lang +++ b/htdocs/langs/sl_SI/paybox.lang @@ -32,6 +32,6 @@ VendorName=Ime prodajalca CSSUrlForPaymentForm=url CSS vzorca obrazca plačila MessageOK=Sporočilo na strani za potrditev plačila MessageKO=Sporočilo na strani za preklic plačila -# NewPayboxPaymentReceived=New Paybox payment received -# NewPayboxPaymentFailed=New Paybox payment tried but failed -# PAYBOX_PAYONLINE_SENDEMAIL=EMail to warn after a payment (success or failed) +NewPayboxPaymentReceived=Novo Paybox plačilo prejeto +NewPayboxPaymentFailed=Zavrnjen poskus novega Paybox plačila +PAYBOX_PAYONLINE_SENDEMAIL=E-poštno opozorilo po plačilu (uspešno ali zavrnjeno) diff --git a/htdocs/langs/sl_SI/products.lang b/htdocs/langs/sl_SI/products.lang index 37383ce4491..e7e2607ec30 100644 --- a/htdocs/langs/sl_SI/products.lang +++ b/htdocs/langs/sl_SI/products.lang @@ -28,8 +28,10 @@ ProductsAndServicesStatistics=Statistika proizvodov in storitev ProductsStatistics=Statistika proizvodov ProductsOnSell=Proizvodi, ki so na voljo ProductsNotOnSell=Opuščeni proizvodi +ProductsOnSellAndOnBuy=Products not for sale nor purchase ServicesOnSell=Storitve, ki so na voljo ServicesNotOnSell=Opuščene storitve +ServicesOnSellAndOnBuy=Services not for sale nor purchase InternalRef=Interna referenca LastRecorded=Zadnji vneseni proizvodi/storitve za prodajo LastRecordedProductsAndServices=Zadnjih %s vnesenih proizvodov/storitev @@ -70,6 +72,8 @@ PublicPrice=Javna cena CurrentPrice=Trenutna cena NewPrice=Nova cena MinPrice=Minimalna Prodajna cena +MinPriceHT=Minim. selling price (net of tax) +MinPriceTTC=Minim. selling price (inc. tax) CantBeLessThanMinPrice=Prodajna cena ne more biti nižja od minimalne za ta proizvod (%s brez DDV). To sporočilo se pojavi lahko tudi, če vnesete prevelik popust ContractStatus=Status pogodbe ContractStatusClosed=Zaprta @@ -179,6 +183,7 @@ ProductIsUsed=Ta proizvod je rabljen NewRefForClone=Ref. novega proizvoda/storitve CustomerPrices=Cene za kupce SuppliersPrices=Nabavne cene +SuppliersPricesOfProductsOrServices=Suppliers prices (of products or services) CustomCode=Carinska tarifa CountryOrigin=Država porekla HiddenIntoCombo=Skrito v izbranem seznamu @@ -208,6 +213,7 @@ CostPmpHT=Net total VWAP ProductUsedForBuild=Auto consumed by production ProductBuilded=Production completed ProductsMultiPrice=Product multi-price +ProductsOrServiceMultiPrice=Customers prices (of products or services, multi-prices) ProductSellByQuarterHT=Products turnover quarterly VWAP ServiceSellByQuarterHT=Services turnover quarterly VWAP Quarter1=1st. Quarter diff --git a/htdocs/langs/sl_SI/propal.lang b/htdocs/langs/sl_SI/propal.lang index d017b31b5eb..5068047ba25 100644 --- a/htdocs/langs/sl_SI/propal.lang +++ b/htdocs/langs/sl_SI/propal.lang @@ -70,8 +70,8 @@ ErrorPropalNotFound=Ponudbe %s ne najdem Estimate=Ocena: EstimateShort=Ocena OtherPropals=Ostale ponudbe -# AddToDraftProposals=Add to draft proposal -# NoDraftProposals=No draft proposals +AddToDraftProposals=Dodaj osnutku ponudbe +NoDraftProposals=Ni osnutkov ponudbe CopyPropalFrom=Kreiraj komercialno ponudbo s kopiranjem obstoječe ponudbe CreateEmptyPropal=Kreiraj prazno komercialno ponudbo ali izberi s seznama prizvodov/storitev DefaultProposalDurationValidity=Privzeto trajanje veljavnosti komercialne ponudbe (v dneh) @@ -97,6 +97,6 @@ TypeContact_propal_external_CUSTOMER=Kontakt pri kupcu za sledenje ponudbe # Document models DocModelAzurDescription=Vzorec kompletne ponudbe (logo...) DocModelJauneDescription=Vzorec ponudbe Jaune -# DefaultModelPropalCreate=Default model creation -# DefaultModelPropalToBill=Default template when closing a business proposal (to be invoiced) -# DefaultModelPropalClosed=Default template when closing a business proposal (unbilled) +DefaultModelPropalCreate=Ustvarjanje privzetega modela +DefaultModelPropalToBill=Privzeta predloga za zaključek ponudbe (za fakturiranje) +DefaultModelPropalClosed=Privzeta predloga za zaključek ponudbe (nefakturirana) diff --git a/htdocs/langs/sl_SI/salaries.lang b/htdocs/langs/sl_SI/salaries.lang index edca71a1829..28358cd23ec 100644 --- a/htdocs/langs/sl_SI/salaries.lang +++ b/htdocs/langs/sl_SI/salaries.lang @@ -1,8 +1,8 @@ # Dolibarr language file - Source file is en_US - users -Salary=Salary -Salaries=Salaries -Employee=Employee -NewSalaryPayment=New salary payment -SalaryPayment=Salary payment -SalariesPayments=Salaries payments -ShowSalaryPayment=Show salary payment +Salary=Plača +Salaries=Plače +Employee=Zaposleni +NewSalaryPayment=Novo izplačilo plače +SalaryPayment=Izplačilo plače +SalariesPayments=Izplačila plač +ShowSalaryPayment=Prikaži izplačilo plač diff --git a/htdocs/langs/sl_SI/sendings.lang b/htdocs/langs/sl_SI/sendings.lang index 086619af2f6..2185f869726 100644 --- a/htdocs/langs/sl_SI/sendings.lang +++ b/htdocs/langs/sl_SI/sendings.lang @@ -13,7 +13,7 @@ LastSendings=Zadnjih %s pošiljk SearchASending=Iskanje pošiljke StatisticsOfSendings=Statistika pošiljk NbOfSendings=Število pošiljk -# NumberOfShipmentsByMonth=Number of shipments by month +NumberOfShipmentsByMonth=Število pošiljk po mesecih SendingCard=Kartica pošiljke NewSending=Nova pošiljka CreateASending=Kreiraj pošiljko @@ -50,7 +50,7 @@ Enlevement=Prevzeto s strani kupca DocumentModelSimple=Enostaven vzorec dokumenta DocumentModelMerou=Vzorec dokumenta Merou A5 WarningNoQtyLeftToSend=Pozor, noben proizvod ne čaka na pošiljanje. -# StatsOnShipmentsOnlyValidated=Statistics conducted on shipments only validated. Date used is date of validation of shipment (planed delivery date is not always known). +StatsOnShipmentsOnlyValidated=Statistika na osnovi potrjenih pošiljk. Uporabljen je datum potrditve pošiljanja (planiran datum dobave ni vedno znan) DateDeliveryPlanned=Planiran datum dobave DateReceived=Datum prejema dobave SendShippingByEMail=Pošlji odpremnico po e-mailu @@ -58,19 +58,17 @@ SendShippingRef=Pošlji odpremnico %s ActionsOnShipping=Aktivnosti v zvezi z odpremnico LinkToTrackYourPackage=Povezave za sledenje vaše pošiljke ShipmentCreationIsDoneFromOrder=Za trenutek je oblikovanje nove pošiljke opravi od naročila kartice. -# RelatedShippings=Related shippings -# ShipmentLine=Shipment line -# CarrierList=List of transporters +RelatedShippings=Povezane pošiljke +ShipmentLine=Vrstica na odpremnici +CarrierList=Seznam prevoznikov # Sending methods SendingMethodCATCH=Lasten prevzem kupca SendingMethodTRANS=Direkten prevoz SendingMethodCOLSUI=Zbirnik - # ModelDocument DocumentModelSirocco=Enostaven vzorec dobavnice DocumentModelTyphon=Popolnejši vzorec dobavnice (logo...) - Error_EXPEDITION_ADDON_NUMBER_NotDefined== -# SumOfProductVolumes=Sum of product volumes -# SumOfProductWeights=Sum of product weights +SumOfProductVolumes=Vsota volumnov proizvodov +SumOfProductWeights=Vsota tež proizvodov diff --git a/htdocs/langs/sl_SI/shop.lang b/htdocs/langs/sl_SI/shop.lang index eed914fde96..167729c1de0 100644 --- a/htdocs/langs/sl_SI/shop.lang +++ b/htdocs/langs/sl_SI/shop.lang @@ -1,4 +1,5 @@ # Dolibarr language file - Source file is en_US - shop +FailedConnectDBCheckModuleSetup=Failed to connect to oscommerce database. Check your module setup Shop=Trgovina ShopWeb=Spletna trgovina LastOrders=Zadnja naročila diff --git a/htdocs/langs/sl_SI/stocks.lang b/htdocs/langs/sl_SI/stocks.lang index c76963aa6b8..bbeded1270c 100644 --- a/htdocs/langs/sl_SI/stocks.lang +++ b/htdocs/langs/sl_SI/stocks.lang @@ -112,6 +112,7 @@ ReplenishmentOrdersDesc=This is list of all opened supplier orders Replenishments=Replenishments NbOfProductBeforePeriod=Quantity of product %s in stock before selected period (< %s) NbOfProductAfterPeriod=Quantity of product %s in stock after selected period (> %s) +MassMovement=Mass movement MassStockMovement=Mass stock movement SelectProductInAndOutWareHouse=Select a product, a quantity, a source warehouse and a target warehouse, then click "%s". Once this is done for all required movements, click onto "%s". RecordMovement=Record transfert diff --git a/htdocs/langs/sl_SI/suppliers.lang b/htdocs/langs/sl_SI/suppliers.lang index b5227461fb1..283374dce1c 100644 --- a/htdocs/langs/sl_SI/suppliers.lang +++ b/htdocs/langs/sl_SI/suppliers.lang @@ -12,8 +12,8 @@ OrderDate=Datum naročila BuyingPrice=Nabavna cena BuyingPriceMin=Najnižjo odkupno ceno BuyingPriceMinShort=Min odkup cena -# TotalBuyingPriceMin=Total of subproducts buying prices -# SomeSubProductHaveNoPrices=Some sub-products have no price defined +TotalBuyingPriceMin=Seštevek nabavnih cen pod-proizvodov +SomeSubProductHaveNoPrices=Nekateri pod-proizvodi nimajo določenih cen AddSupplierPrice=Dodaj ceno dobavitelja ChangeSupplierPrice=Spremeni ceno dobavitelja ErrorQtyTooLowForThisSupplier=Premajhna količina za tega dobavitelja ali ni določena cena za ta proizvod od tega dobavitelja @@ -27,7 +27,7 @@ RefSupplierShort=Ref. dobavitelja Availability=Razpoložljivost ExportDataset_fournisseur_1=Seznam računov dobavitelja in vrstic računa ExportDataset_fournisseur_2=Računi dobaviteljev in plačila -# ExportDataset_fournisseur_3=Supplier orders and order lines +ExportDataset_fournisseur_3=Naročila pri dobaviteljih in vrstice naročila ApproveThisOrder=Odobri to naročilo ConfirmApproveThisOrder=Ali zares želite odobriti to naročilo ? DenyingThisOrder=Zavrni to naročilo @@ -39,4 +39,4 @@ AddSupplierOrder=Kreirajte naročilo pri dobavitelju AddSupplierInvoice=Kreirajte račun dobavitelja ListOfSupplierProductForSupplier=Seznam proizvodov in cen dobavitelja %s NoneOrBatchFileNeverRan=Nobena datoteka ali paket %s nedavno ni bila zagnana -# SentToSuppliers=Sent to suppliers +SentToSuppliers=Pošlji dobaviteljem diff --git a/htdocs/langs/sl_SI/users.lang b/htdocs/langs/sl_SI/users.lang index aa7e633d4db..d18cf255023 100644 --- a/htdocs/langs/sl_SI/users.lang +++ b/htdocs/langs/sl_SI/users.lang @@ -1,5 +1,5 @@ # Dolibarr language file - Source file is en_US - users -HRMArea=HRM area +HRMArea=Področje HRM UserCard=Kartica uporabnika ContactCard=Kartica kontakta GroupCard=Kartica skupine @@ -114,8 +114,8 @@ YourRole=Vaše vloge YourQuotaOfUsersIsReached=Dosežena je vaša kvota aktivnih uporabnikov ! NbOfUsers=Število uporabnikov DontDowngradeSuperAdmin=Samo superadmin lahko degradira samo superadmin -HierarchicalResponsible=Hierarchical responsible -HierarchicView=Hierarchical view -UseTypeFieldToChange=Use field Type to change -OpenIDURL=OpenID URL -LoginUsingOpenID=Use OpenID to login +HierarchicalResponsible=Hierarhična odgovornost +HierarchicView=Hierarhični pogled +UseTypeFieldToChange=Uporabi polje "Vnos" za spremembo +OpenIDURL=Spletni naslov OpenID +LoginUsingOpenID=Uporabi OpenID za prijavo diff --git a/htdocs/langs/sl_SI/withdrawals.lang b/htdocs/langs/sl_SI/withdrawals.lang index 394c798f6a0..16128d0b7ac 100644 --- a/htdocs/langs/sl_SI/withdrawals.lang +++ b/htdocs/langs/sl_SI/withdrawals.lang @@ -18,8 +18,8 @@ RequestStandingOrderToTreat=Zahtevek po izvršitvi trajnikov RequestStandingOrderTreated=Zahtevek po izvršenih trajnikih CustomersStandingOrders=Trajniki kupcev CustomerStandingOrder=Trajnik kupca -NbOfInvoiceToWithdraw=Nb. of invoice with withdraw request -NbOfInvoiceToWithdrawWithInfo=Nb. of invoice with withdraw request for customers having defined bank account information +NbOfInvoiceToWithdraw=Št. računov z zahtevkom za nakazilo +NbOfInvoiceToWithdrawWithInfo=Št. računov z zahtevkom za nakazilo za stranke z navedenimi podatki o bančnem računu InvoiceWaitingWithdraw=Računi, ki čakajo na nakazilo AmountToWithdraw=Vrednost za nakazilo WithdrawsRefused=Zavrnjena nakazila @@ -80,9 +80,9 @@ WithdrawalFileNotCapable=Ni možno generirati datoteke za prejem nakazil za vaš ShowWithdraw=Prikaži nakazilo IfInvoiceNeedOnWithdrawPaymentWontBeClosed=Vendar, če ima račun najmanj eno neizvršeno nakazilo, ne bo označeno kot plačano, da bi bilo pred tem možno izvršiti nakazilo. DoStandingOrdersBeforePayments=Ti zavihki omogočajo zahtevo za trajnik. Ko je končano, lahko vnesete plačilo in zaprete račun. -WithdrawalFile=Withdrawal file -SetToStatusSent=Set to status "File Sent" -ThisWillAlsoAddPaymentOnInvoice=This will also apply payments to invoices and will classify them as "Paid" +WithdrawalFile=Datoteka nakazila +SetToStatusSent=Nastavi status na "Datoteka poslana" +ThisWillAlsoAddPaymentOnInvoice=S tem bodo plačila povezana z računi, ki bodo spremenili status v "Plačano" ### Notifications InfoCreditSubject=Plačilo odprtega naročila %s s strani banke @@ -92,5 +92,5 @@ InfoTransMessage=Odprto naročilo %s je bilo preneseno na banko z %s %s.

    InfoTransData=Znesek: %s
    Način: %s
    Datum: %s InfoFoot=To sporočilo je avtomatsko poslal Dolibarr InfoRejectSubject=Odprto naročilo zavrnjeno -InfoRejectMessage=Hello,

    the standing order of invoice %s related to the company %s, with an amount of %s has been refused by the bank.

    --
    %s +InfoRejectMessage=Pozdravljeni,

    odprto naročilo za račun %s, ki se nanaša na podjetje %s, v znesku %s je banka zavrnila.

    --
    %s ModeWarning=Opcija za delo v živo ni bila nastavljena, zato se bo sistem ustavil po simulaciji diff --git a/htdocs/langs/sq_AL/admin.lang b/htdocs/langs/sq_AL/admin.lang index eb85572a4b3..d784d75b43c 100644 --- a/htdocs/langs/sq_AL/admin.lang +++ b/htdocs/langs/sq_AL/admin.lang @@ -116,7 +116,7 @@ LanguageBrowserParameter=Parameter %s LocalisationDolibarrParameters=Localisation parameters ClientTZ=Client Time Zone (user) ClientHour=Client time (user) -OSTZ=Servre OS Time Zone +OSTZ=Server OS Time Zone PHPTZ=PHP server Time Zone PHPServerOffsetWithGreenwich=PHP server offset width Greenwich (seconds) ClientOffsetWithGreenwich=Client/Browser offset width Greenwich (seconds) @@ -233,7 +233,9 @@ OfficialWebSiteFr=French official web site OfficialWiki=Dolibarr documentation on Wiki OfficialDemo=Dolibarr online demo OfficialMarketPlace=Official market place for external modules/addons -OfficialWebHostingService=Official web hosting services (Cloud hosting) +OfficialWebHostingService=Referenced web hosting services (Cloud hosting) +ReferencedPreferredPartners=Preferred Partners +OtherResources=Autres ressources ForDocumentationSeeWiki=For user or developer documentation (Doc, FAQs...),
    take a look at the Dolibarr Wiki:
    %s ForAnswersSeeForum=For any other questions/help, you can use the Dolibarr forum:
    %s HelpCenterDesc1=This area can help you to get a Help support service on Dolibarr. @@ -369,9 +371,9 @@ ExtrafieldSelectList = Select from table ExtrafieldSeparator=Separator ExtrafieldCheckBox=Checkbox ExtrafieldRadio=Radio button -ExtrafieldParamHelpselect=Parameters list have to be like key,value

    for exemple :
    1,value1
    2,value2
    3,value3
    ...

    In order to have the list depending on another :
    1,value1|parent_list_code:parent_key
    2,value2|parent_list_code:parent_key -ExtrafieldParamHelpcheckbox=Parameters list have to be like key,value

    for exemple :
    1,value1
    2,value2
    3,value3
    ... -ExtrafieldParamHelpradio=Parameters list have to be like key,value

    for exemple :
    1,value1
    2,value2
    3,value3
    ... +ExtrafieldParamHelpselect=Parameters list have to be like key,value

    for example :
    1,value1
    2,value2
    3,value3
    ...

    In order to have the list depending on another :
    1,value1|parent_list_code:parent_key
    2,value2|parent_list_code:parent_key +ExtrafieldParamHelpcheckbox=Parameters list have to be like key,value

    for example :
    1,value1
    2,value2
    3,value3
    ... +ExtrafieldParamHelpradio=Parameters list have to be like key,value

    for example :
    1,value1
    2,value2
    3,value3
    ... ExtrafieldParamHelpsellist=Parameters list comes from a table
    Syntax : table_name:label_field:id_field::filter
    Example : c_typent:libelle:id::filter

    filter can be a simple test (eg active=1) to display only active value
    if you want to filter on extrafields use syntaxt extra.fieldcode=... (where field code is the code of extrafield)

    In order to have the list depending on another :
    c_typent:libelle:id:parent_list_code|parent_column:filter LibraryToBuildPDF=Library used to build PDF WarningUsingFPDF=Warning: Your conf.php contains directive dolibarr_pdf_force_fpdf=1. This means you use the FPDF library to generate PDF files. This library is old and does not support a lot of features (Unicode, image transparency, cyrillic, arab and asiatic languages, ...), so you may experience errors during PDF generation.
    To solve this and have a full support of PDF generation, please download TCPDF library, then comment or remove the line $dolibarr_pdf_force_fpdf=1, and add instead $dolibarr_lib_TCPDF_PATH='path_to_TCPDF_dir' @@ -472,7 +474,7 @@ Module410Desc=Webcalendar integration Module500Name=Special expenses (tax, social contributions, dividends) Module500Desc=Management of special expenses like taxes, social contribution, dividends and salaries Module510Name=Salaries -Module510Desc=Management of empoyees salaries and payments +Module510Desc=Management of employees salaries and payments Module600Name=Notifications Module600Desc=Send notifications by email on some Dolibarr business events to third party contacts Module700Name=Donations @@ -495,15 +497,15 @@ Module2400Name=Agenda Module2400Desc=Events/tasks and agenda management Module2500Name=Electronic Content Management Module2500Desc=Save and share documents -Module2600Name= WebServices -Module2600Desc= Enable the Dolibarr web services server -Module2700Name= Gravatar -Module2700Desc= Use online Gravatar service (www.gravatar.com) to show photo of users/members (found with their emails). Need an internet access +Module2600Name=WebServices +Module2600Desc=Enable the Dolibarr web services server +Module2700Name=Gravatar +Module2700Desc=Use online Gravatar service (www.gravatar.com) to show photo of users/members (found with their emails). Need an internet access Module2800Desc=FTP Client -Module2900Name= GeoIPMaxmind -Module2900Desc= GeoIP Maxmind conversions capabilities -Module3100Name= Skype -Module3100Desc= Add a Skype button into card of adherents / third parties / contacts +Module2900Name=GeoIPMaxmind +Module2900Desc=GeoIP Maxmind conversions capabilities +Module3100Name=Skype +Module3100Desc=Add a Skype button into card of adherents / third parties / contacts Module5000Name=Multi-company Module5000Desc=Allows you to manage multiple companies Module6000Name=Workflow @@ -681,6 +683,10 @@ Permission401=Read discounts Permission402=Create/modify discounts Permission403=Validate discounts Permission404=Delete discounts +Permission510=Read Salaries +Permission512=Create/modify salaries +Permission514=Delete salaries +Permission517=Export salaries Permission531=Read services Permission532=Create/modify services Permission534=Delete services @@ -999,7 +1005,7 @@ ExtraFieldsSupplierOrders=Complementary attributes (orders) ExtraFieldsSupplierInvoices=Complementary attributes (invoices) ExtraFieldsProject=Complementary attributes (projects) ExtraFieldsProjectTask=Complementary attributes (tasks) -ExtraFieldHasWrongValue=Attribut %s has a wrong value. +ExtraFieldHasWrongValue=Attribute %s has a wrong value. AlphaNumOnlyCharsAndNoSpace=only alphanumericals characters without space AlphaNumOnlyLowerCharsAndNoSpace=only alphanumericals and lower case characters without space SendingMailSetup=Setup of sendings by email @@ -1018,13 +1024,13 @@ SuhosinSessionEncrypt=Session storage encrypted by Suhosin ConditionIsCurrently=Condition is currently %s TestNotPossibleWithCurrentBrowsers=Automatic detection not possible YouUseBestDriver=You use driver %s that is best driver available currently. -YouDoNotUseBestDriver=You use drive %s but driver %s is recommanded. +YouDoNotUseBestDriver=You use drive %s but driver %s is recommended. NbOfProductIsLowerThanNoPb=You have only %s products/services into database. This does not required any particular optimization. SearchOptim=Search optimization YouHaveXProductUseSearchOptim=You have %s product into database. You should add the constant PRODUCT_DONOTSEARCH_ANYWHERE to 1 into Home-Setup-Other, you limit the search to the beginning of strings making possible for database to use index and you should get an immediate response. BrowserIsOK=You are using the web browser %s. This browser is ok for security and performance. BrowserIsKO=You are using the web browser %s. This browser is known to be a bad choice for security, performance and reliability. We recommand you to use Firefox, Chrome, Opera or Safari. -XDebugInstalled=XDebug est chargé. +XDebugInstalled=XDebug is loaded. XCacheInstalled=XCache is loaded. AddRefInList=Display customer/supplier ref into list (select list or combobox) and most of hyperlink FieldEdition=Edition of field %s @@ -1073,7 +1079,7 @@ WebCalServer=Server hosting calendar database WebCalDatabaseName=Database name WebCalUser=User to access database WebCalSetupSaved=Webcalendar setup saved successfully. -WebCalTestOk=Connection to server '%s' on database '%s' with user '%s' successfull. +WebCalTestOk=Connection to server '%s' on database '%s' with user '%s' successful. WebCalTestKo1=Connection to server '%s' succeed but database '%s' could not be reached. WebCalTestKo2=Connection to server '%s' with user '%s' failed. WebCalErrorConnectOkButWrongDatabase=Connection succeeded but database doesn't look to be a Webcalendar database. @@ -1119,7 +1125,7 @@ WatermarkOnDraftProposal=Watermark on draft commercial proposals (none if empty) OrdersSetup=Order management setup OrdersNumberingModules=Orders numbering models OrdersModelModule=Order documents models -HideTreadedOrders=Hide the treated or canceled orders in the list +HideTreadedOrders=Hide the treated or cancelled orders in the list ValidOrderAfterPropalClosed=To validate the order after proposal closer, makes it possible not to step by the provisional order FreeLegalTextOnOrders=Free text on orders WatermarkOnDraftOrders=Watermark on draft orders (none if empty) @@ -1214,9 +1220,9 @@ LDAPSynchroKO=Failed synchronization test LDAPSynchroKOMayBePermissions=Failed synchronization test. Check that connexion to server is correctly configured and allows LDAP udpates LDAPTCPConnectOK=TCP connect to LDAP server successful (Server=%s, Port=%s) LDAPTCPConnectKO=TCP connect to LDAP server failed (Server=%s, Port=%s) -LDAPBindOK=Connect/Authentificate to LDAP server sucessfull (Server=%s, Port=%s, Admin=%s, Password=%s) +LDAPBindOK=Connect/Authentificate to LDAP server successful (Server=%s, Port=%s, Admin=%s, Password=%s) LDAPBindKO=Connect/Authentificate to LDAP server failed (Server=%s, Port=%s, Admin=%s, Password=%s) -LDAPUnbindSuccessfull=Disconnect successfull +LDAPUnbindSuccessfull=Disconnect successful LDAPUnbindFailed=Disconnect failed LDAPConnectToDNSuccessfull=Connection to DN (%s) successful LDAPConnectToDNFailed=Connection to DN (%s) failed @@ -1273,7 +1279,7 @@ LDAPFieldSidExample=Example : objectsid LDAPFieldEndLastSubscription=Date of subscription end LDAPFieldTitle=Post/Function LDAPFieldTitleExample=Example: title -LDAPParametersAreStillHardCoded=LDAP parametres are still hardcoded (in contact class) +LDAPParametersAreStillHardCoded=LDAP parameters are still hardcoded (in contact class) LDAPSetupNotComplete=LDAP setup not complete (go on others tabs) LDAPNoUserOrPasswordProvidedAccessIsReadOnly=No administrator or password provided. LDAP access will be anonymous and in read only mode. LDAPDescContact=This page allows you to define LDAP attributes name in LDAP tree for each data found on Dolibarr contacts. @@ -1429,7 +1435,7 @@ OptionVATDefault=Standard OptionVATDebitOption=Option services on Debit OptionVatDefaultDesc=VAT is due:
    - on delivery for goods (we use invoice date)
    - on payments for services OptionVatDebitOptionDesc=VAT is due:
    - on delivery for goods (we use invoice date)
    - on invoice (debit) for services -SummaryOfVatExigibilityUsedByDefault=Time of VAT exigibility by default according to choosed option: +SummaryOfVatExigibilityUsedByDefault=Time of VAT exigibility by default according to chosen option: OnDelivery=On delivery OnPayment=On payment OnInvoice=On invoice @@ -1446,7 +1452,7 @@ AccountancyCodeBuy=Purchase account. code AgendaSetup=Events and agenda module setup PasswordTogetVCalExport=Key to authorize export link PastDelayVCalExport=Do not export event older than -AGENDA_USE_EVENT_TYPE=Use events types (managed into menu Setup -> Dictionnary -> Type of agenda events) +AGENDA_USE_EVENT_TYPE=Use events types (managed into menu Setup -> Dictionary -> Type of agenda events) ##### ClickToDial ##### ClickToDialDesc=This module allows to add an icon after phone numbers. A click on this icon will call a server with a particular URL you define below. This can be used to call a call center system from Dolibarr that can call the phone number on a SIP system for example. ##### Point Of Sales (CashDesk) ##### diff --git a/htdocs/langs/sq_AL/contracts.lang b/htdocs/langs/sq_AL/contracts.lang index 797b5708e50..e5ad112b222 100644 --- a/htdocs/langs/sq_AL/contracts.lang +++ b/htdocs/langs/sq_AL/contracts.lang @@ -89,6 +89,8 @@ ListOfServicesToExpireWithDuration=List of Services to expire in %s days ListOfServicesToExpireWithDurationNeg=List of Services expired from more than %s days ListOfServicesToExpire=List of Services to expire NoteListOfYourExpiredServices=This list contains only services of contracts for third parties you are linked to as a sale representative. +StandardContractsTemplate=Standard contracts template +ContactNameAndSignature=For %s, name and signature: ##### Types de contacts ##### TypeContact_contrat_internal_SALESREPSIGN=Sales representative signing contract diff --git a/htdocs/langs/sq_AL/exports.lang b/htdocs/langs/sq_AL/exports.lang index 2a3ba5d712f..3acad0d32cd 100644 --- a/htdocs/langs/sq_AL/exports.lang +++ b/htdocs/langs/sq_AL/exports.lang @@ -8,7 +8,7 @@ ImportableDatas=Importable dataset SelectExportDataSet=Choose dataset you want to export... SelectImportDataSet=Choose dataset you want to import... SelectExportFields=Choose fields you want to export, or select a predefined export profile -SelectImportFields=Choose source file fields you want to import and their target field in database by moving them up and down with anchor %s, or select a predefined import profil: +SelectImportFields=Choose source file fields you want to import and their target field in database by moving them up and down with anchor %s, or select a predefined import profile: NotImportedFields=Fields of source file not imported SaveExportModel=Save this export profile if you plan to reuse it later... SaveImportModel=Save this import profile if you plan to reuse it later... @@ -81,7 +81,7 @@ DoNotImportFirstLine=Do not import first line of source file NbOfSourceLines=Number of lines in source file NowClickToTestTheImport=Check import parameters you have defined. If they are correct, click on button "%s" to launch a simulation of import process (no data will be changed in your database, it's only a simulation for the moment)... RunSimulateImportFile=Launch the import simulation -FieldNeedSource=This fiels in database require a data from source file +FieldNeedSource=This field requires data from the source file SomeMandatoryFieldHaveNoSource=Some mandatory fields have no source from data file InformationOnSourceFile=Information on source file InformationOnTargetTables=Information on target fields diff --git a/htdocs/langs/sq_AL/holiday.lang b/htdocs/langs/sq_AL/holiday.lang index 0c755ca3301..da03299e0da 100644 --- a/htdocs/langs/sq_AL/holiday.lang +++ b/htdocs/langs/sq_AL/holiday.lang @@ -8,7 +8,6 @@ NotActiveModCP=You must enable the module holidays to view this page. NotConfigModCP=You must configure the module holidays to view this page. To do this, click here . NoCPforUser=You don't have a demand for holidays. AddCP=Apply for holidays -CPErrorSQL=An SQL error occurred: Employe=Employee DateDebCP=Start date DateFinCP=End date diff --git a/htdocs/langs/sq_AL/languages.lang b/htdocs/langs/sq_AL/languages.lang index 77558748ed3..e94e8e13ac3 100644 --- a/htdocs/langs/sq_AL/languages.lang +++ b/htdocs/langs/sq_AL/languages.lang @@ -19,6 +19,7 @@ Language_en_SA=English (Saudi Arabia) Language_en_US=English (United States) Language_en_ZA=English (South Africa) Language_es_ES=Spanish +Language_es_DO=Spanish (Dominican Republic) Language_es_AR=Spanish (Argentina) Language_es_CL=Spanish (Chile) Language_es_HN=Spanish (Honduras) @@ -38,6 +39,7 @@ Language_fr_NC=French (New Caledonia) Language_he_IL=Hebrew Language_hr_HR=Croatian Language_hu_HU=Hungarian +Language_id_ID=Indonesian Language_is_IS=Icelandic Language_it_IT=Italian Language_ja_JP=Japanese diff --git a/htdocs/langs/sq_AL/mails.lang b/htdocs/langs/sq_AL/mails.lang index 08ee8a280cb..98e6dc335ee 100644 --- a/htdocs/langs/sq_AL/mails.lang +++ b/htdocs/langs/sq_AL/mails.lang @@ -79,6 +79,7 @@ MailtoEMail=Hyper link to email ActivateCheckRead=Allow to use the "Unsubcribe" link ActivateCheckReadKey=Key use to encrypt URL use for "Read Receipt" and "Unsubcribe" feature EMailSentToNRecipients=EMail sent to %s recipients. +XTargetsAdded=%s recipients added into target list EachInvoiceWillBeAttachedToEmail=A document using default invoice document template will be created and attached to each email. MailTopicSendRemindUnpaidInvoices=Reminder of invoice %s (%s) SendRemind=Send reminder by EMails diff --git a/htdocs/langs/sq_AL/main.lang b/htdocs/langs/sq_AL/main.lang index 3bba4eb6c32..ef19ddde2f0 100644 --- a/htdocs/langs/sq_AL/main.lang +++ b/htdocs/langs/sq_AL/main.lang @@ -551,6 +551,7 @@ MailSentBy=Email sent by TextUsedInTheMessageBody=Email body SendAcknowledgementByMail=Send Ack. by email NoEMail=No email +NoMobilePhone=No mobile phone Owner=Owner DetectedVersion=Detected version FollowingConstantsWillBeSubstituted=The following constants will be replaced with the corresponding value. diff --git a/htdocs/langs/sq_AL/products.lang b/htdocs/langs/sq_AL/products.lang index e56b9cc59c2..37012349b02 100644 --- a/htdocs/langs/sq_AL/products.lang +++ b/htdocs/langs/sq_AL/products.lang @@ -28,8 +28,10 @@ ProductsAndServicesStatistics=Products and Services statistics ProductsStatistics=Products statistics ProductsOnSell=Available products ProductsNotOnSell=Obsolete products +ProductsOnSellAndOnBuy=Products not for sale nor purchase ServicesOnSell=Available services ServicesNotOnSell=Obsolete services +ServicesOnSellAndOnBuy=Services not for sale nor purchase InternalRef=Internal reference LastRecorded=Last products/services on sell recorded LastRecordedProductsAndServices=Last %s recorded products/services @@ -70,6 +72,8 @@ PublicPrice=Public price CurrentPrice=Current price NewPrice=New price MinPrice=Minim. selling price +MinPriceHT=Minim. selling price (net of tax) +MinPriceTTC=Minim. selling price (inc. tax) CantBeLessThanMinPrice=The selling price can't be lower than minimum allowed for this product (%s without tax). This message can also appears if you type a too important discount. ContractStatus=Contract status ContractStatusClosed=Closed @@ -179,6 +183,7 @@ ProductIsUsed=This product is used NewRefForClone=Ref. of new product/service CustomerPrices=Customers prices SuppliersPrices=Suppliers prices +SuppliersPricesOfProductsOrServices=Suppliers prices (of products or services) CustomCode=Customs code CountryOrigin=Origin country HiddenIntoCombo=Hidden into select lists @@ -208,6 +213,7 @@ CostPmpHT=Net total VWAP ProductUsedForBuild=Auto consumed by production ProductBuilded=Production completed ProductsMultiPrice=Product multi-price +ProductsOrServiceMultiPrice=Customers prices (of products or services, multi-prices) ProductSellByQuarterHT=Products turnover quarterly VWAP ServiceSellByQuarterHT=Services turnover quarterly VWAP Quarter1=1st. Quarter diff --git a/htdocs/langs/sq_AL/shop.lang b/htdocs/langs/sq_AL/shop.lang index d648f03f350..156af426bb0 100644 --- a/htdocs/langs/sq_AL/shop.lang +++ b/htdocs/langs/sq_AL/shop.lang @@ -1,4 +1,5 @@ # Dolibarr language file - Source file is en_US - shop +FailedConnectDBCheckModuleSetup=Failed to connect to oscommerce database. Check your module setup Shop=Shop ShopWeb=Web Shop LastOrders=Last orders diff --git a/htdocs/langs/sq_AL/stocks.lang b/htdocs/langs/sq_AL/stocks.lang index 54ff037d912..710f42d1581 100644 --- a/htdocs/langs/sq_AL/stocks.lang +++ b/htdocs/langs/sq_AL/stocks.lang @@ -112,6 +112,7 @@ ReplenishmentOrdersDesc=This is list of all opened supplier orders Replenishments=Replenishments NbOfProductBeforePeriod=Quantity of product %s in stock before selected period (< %s) NbOfProductAfterPeriod=Quantity of product %s in stock after selected period (> %s) +MassMovement=Mass movement MassStockMovement=Mass stock movement SelectProductInAndOutWareHouse=Select a product, a quantity, a source warehouse and a target warehouse, then click "%s". Once this is done for all required movements, click onto "%s". RecordMovement=Record transfert diff --git a/htdocs/langs/sv_SE/admin.lang b/htdocs/langs/sv_SE/admin.lang index ddbd8affadc..f9fa74ff37d 100644 --- a/htdocs/langs/sv_SE/admin.lang +++ b/htdocs/langs/sv_SE/admin.lang @@ -116,7 +116,7 @@ LanguageBrowserParameter=Parameter %s LocalisationDolibarrParameters=Lokalisering parametrar ClientTZ=Kund tidzon (användare) ClientHour=Kund tid (användare) -OSTZ=Tidszon OS-server +OSTZ=Server OS Time Zone PHPTZ=Tidszon PHP server PHPServerOffsetWithGreenwich=PHP server offset bredd Greenwich (sekunder) ClientOffsetWithGreenwich=Klient / Browser offset bredd Greenwich (sekunder) @@ -233,7 +233,9 @@ OfficialWebSiteFr=Officiella franska hemsida OfficialWiki=Dolibarr Wiki OfficialDemo=Dolibarr online demo OfficialMarketPlace=Officiella marknadsplats för externa moduler / addons -OfficialWebHostingService=Officiell webbhotelltjänst (Cloud hosting) +OfficialWebHostingService=Referenced web hosting services (Cloud hosting) +ReferencedPreferredPartners=Preferred Partners +OtherResources=Autres ressources ForDocumentationSeeWiki=För användarens eller utvecklarens dokumentation (Doc, FAQs ...),
    ta en titt på Dolibarr Wiki:
    %s ForAnswersSeeForum=För alla andra frågor / hjälp, kan du använda Dolibarr forumet:
    %s HelpCenterDesc1=Detta område kan hjälpa dig att få en tjänst Hjälp stöd på Dolibarr. @@ -369,9 +371,9 @@ ExtrafieldSelectList = Välj från tabell ExtrafieldSeparator=Avskiljare ExtrafieldCheckBox=Kryssruta ExtrafieldRadio=Radioknapp -ExtrafieldParamHelpselect=Parameterlista enligt: nyckel,värde

    Exempel:
    1,värde1
    2,värde2
    3,värde3
    ...

    För att listan ska bero på en annan:
    1,värde1|parent_list_code:parent_key
    2,värde2|parent_list_code:parent_key -ExtrafieldParamHelpcheckbox=Parameterlista enligt: nyckel,värde

    Exempel:
    1,värde1
    2,värde2
    3,värde3
    ... -ExtrafieldParamHelpradio=Parameterlista enligt: nyckel,värde

    Exempel:
    1,värde1
    2,värde2
    3,värde3
    ... +ExtrafieldParamHelpselect=Parameters list have to be like key,value

    for example :
    1,value1
    2,value2
    3,value3
    ...

    In order to have the list depending on another :
    1,value1|parent_list_code:parent_key
    2,value2|parent_list_code:parent_key +ExtrafieldParamHelpcheckbox=Parameters list have to be like key,value

    for example :
    1,value1
    2,value2
    3,value3
    ... +ExtrafieldParamHelpradio=Parameters list have to be like key,value

    for example :
    1,value1
    2,value2
    3,value3
    ... ExtrafieldParamHelpsellist=Parameters list comes from a table
    Syntax : table_name:label_field:id_field::filter
    Example : c_typent:libelle:id::filter

    filter can be a simple test (eg active=1) to display only active value
    if you want to filter on extrafields use syntaxt extra.fieldcode=... (where field code is the code of extrafield)

    In order to have the list depending on another :
    c_typent:libelle:id:parent_list_code|parent_column:filter LibraryToBuildPDF=Katalog som används för att skapa PDF WarningUsingFPDF=Warning: Your conf.php contains directive dolibarr_pdf_force_fpdf=1. This means you use the FPDF library to generate PDF files. This library is old and does not support a lot of features (Unicode, image transparency, cyrillic, arab and asiatic languages, ...), so you may experience errors during PDF generation.
    To solve this and have a full support of PDF generation, please download TCPDF library, then comment or remove the line $dolibarr_pdf_force_fpdf=1, and add instead $dolibarr_lib_TCPDF_PATH='path_to_TCPDF_dir' @@ -472,7 +474,7 @@ Module410Desc=WebCalendar integration Module500Name=Speciella utgifter (skatt, sociala avgifter, utdelningar) Module500Desc=Management of special expenses like taxes, social contribution, dividends and salaries Module510Name=Löner -Module510Desc=Hantering av anställdas löner och ersättningar +Module510Desc=Management of employees salaries and payments Module600Name=Anmälningar Module600Desc=Skicka meddelanden via e-post på några Dolibarr affärshändelser till annans kontakter Module700Name=Donationer @@ -495,15 +497,15 @@ Module2400Name=Agenda Module2400Desc=Åtgärder / uppgifter och dagordning förvaltning Module2500Name=Electronic Content Management Module2500Desc=Spara och dela dokument -Module2600Name= WebServices -Module2600Desc= Aktivera Dolibarr webbtjänster server -Module2700Name= Gravatar -Module2700Desc= Använder online Gravatar tjänst (www.gravatar.com) för att visa foto av användare / medlemmar (hittade med sin e-post). Behöver en internet +Module2600Name=WebServices +Module2600Desc=Aktivera Dolibarr webbtjänster server +Module2700Name=Gravatar +Module2700Desc=Använder online Gravatar tjänst (www.gravatar.com) för att visa foto av användare / medlemmar (hittade med sin e-post). Behöver en internet Module2800Desc=FTP Client -Module2900Name= GeoIPMaxmind -Module2900Desc= GeoIP Maxmind omvandlingar kapacitet -Module3100Name= Skype -Module3100Desc= Add a Skype button into card of adherents / third parties / contacts +Module2900Name=GeoIPMaxmind +Module2900Desc=GeoIP Maxmind omvandlingar kapacitet +Module3100Name=Skype +Module3100Desc=Add a Skype button into card of adherents / third parties / contacts Module5000Name=Multi-bolag Module5000Desc=Gör att du kan hantera flera företag Module6000Name=Workflow @@ -681,6 +683,10 @@ Permission401=Läs rabatter Permission402=Skapa / ändra rabatter Permission403=Validate rabatter Permission404=Ta bort rabatter +Permission510=Read Salaries +Permission512=Create/modify salaries +Permission514=Delete salaries +Permission517=Export salaries Permission531=Läs tjänster Permission532=Skapa / modifiera tjänster Permission534=Ta bort tjänster @@ -999,7 +1005,7 @@ ExtraFieldsSupplierOrders=Complementary attributes (orders) ExtraFieldsSupplierInvoices=Complementary attributes (invoices) ExtraFieldsProject=Complementary attributes (projects) ExtraFieldsProjectTask=Complementary attributes (tasks) -ExtraFieldHasWrongValue=Hänförlig %s har ett felaktigt värde. +ExtraFieldHasWrongValue=Attribute %s has a wrong value. AlphaNumOnlyCharsAndNoSpace=endast alfanumeriska tecken utan mellanslag AlphaNumOnlyLowerCharsAndNoSpace=endast gemena alfanumeriska tecken utan mellanslag SendingMailSetup=Inställning av sändningarna via e-post @@ -1018,13 +1024,13 @@ SuhosinSessionEncrypt=Session storage encrypted by Suhosin ConditionIsCurrently=Condition is currently %s TestNotPossibleWithCurrentBrowsers=Automatic detection not possible YouUseBestDriver=You use driver %s that is best driver available currently. -YouDoNotUseBestDriver=You use drive %s but driver %s is recommanded. +YouDoNotUseBestDriver=You use drive %s but driver %s is recommended. NbOfProductIsLowerThanNoPb=You have only %s products/services into database. This does not required any particular optimization. SearchOptim=Search optimization YouHaveXProductUseSearchOptim=You have %s product into database. You should add the constant PRODUCT_DONOTSEARCH_ANYWHERE to 1 into Home-Setup-Other, you limit the search to the beginning of strings making possible for database to use index and you should get an immediate response. BrowserIsOK=You are using the web browser %s. This browser is ok for security and performance. BrowserIsKO=You are using the web browser %s. This browser is known to be a bad choice for security, performance and reliability. We recommand you to use Firefox, Chrome, Opera or Safari. -XDebugInstalled=XDebug est chargé. +XDebugInstalled=XDebug is loaded. XCacheInstalled=XCache is loaded. AddRefInList=Display customer/supplier ref into list (select list or combobox) and most of hyperlink FieldEdition=Edition of field %s @@ -1073,7 +1079,7 @@ WebCalServer=Server-hosting kalender databas WebCalDatabaseName=Databas namn WebCalUser=Användaren tillgång till databasen WebCalSetupSaved=WebCalendar setup sparats. -WebCalTestOk=Anslutning till servern "%s" på databas %s "med användare" %s framgångsrika. +WebCalTestOk=Connection to server '%s' on database '%s' with user '%s' successful. WebCalTestKo1=Anslutning till servern "%s" lyckas, men databas %s "kunde inte nås. WebCalTestKo2=Anslutning till servern "%s" med användare "%s" misslyckades. WebCalErrorConnectOkButWrongDatabase=Anslutning lyckats men databasen inte ser ut att vara en WebCalendar databas. @@ -1119,7 +1125,7 @@ WatermarkOnDraftProposal=Vattenstämpel på utkast till affärsförslag (ingen o OrdersSetup=Beställ ledning setup OrdersNumberingModules=Beställningar numrering moduler OrdersModelModule=Beställ dokument modeller -HideTreadedOrders=Dölj behandlas eller annullerade beställningar i listan +HideTreadedOrders=Hide the treated or cancelled orders in the list ValidOrderAfterPropalClosed=Att godkänna beställningen efter förslaget närmare, gör det möjligt att inte steg av den provisoriska ordning FreeLegalTextOnOrders=Fri text på order WatermarkOnDraftOrders=Vattenstämpel på utkast till beställningar (ingen om tom) @@ -1214,9 +1220,9 @@ LDAPSynchroKO=Misslyckades synkronisering test LDAPSynchroKOMayBePermissions=Misslyckades synkronisering test. Kontrollera att connexion att servern är korrekt konfigurerad och tillåter LDAP udpates LDAPTCPConnectOK=TCP ansluta till LDAP-servern framgångsrika (Server = %s, Port = %s) LDAPTCPConnectKO=TCP ansluta till LDAP-servern misslyckades (Server = %s, Port = %s) -LDAPBindOK=Anslut / Authentificate till LDAP-servern framgångsrika (Server = %s, Port = %s, Admin = %s, Lösenord = %s) +LDAPBindOK=Connect/Authentificate to LDAP server successful (Server=%s, Port=%s, Admin=%s, Password=%s) LDAPBindKO=Anslut / Authentificate till LDAP-servern misslyckades (Server = %s, Port = %s, Admin = %s, Lösenord = %s) -LDAPUnbindSuccessfull=Koppla framgångsrika +LDAPUnbindSuccessfull=Disconnect successful LDAPUnbindFailed=Koppla misslyckades LDAPConnectToDNSuccessfull=Anslutning au DN (%s) ri ¿½ ussie LDAPConnectToDNFailed=Anslutning au DN (%s) ï ¿½ chouï ¿½ e @@ -1273,7 +1279,7 @@ LDAPFieldSidExample=Exempel: objectsid LDAPFieldEndLastSubscription=Datum för teckning slut LDAPFieldTitle=Post / Funktion LDAPFieldTitleExample=Example: title -LDAPParametersAreStillHardCoded=LDAP parametrar är fortfarande hårdkodad (i kontakt klass) +LDAPParametersAreStillHardCoded=LDAP parameters are still hardcoded (in contact class) LDAPSetupNotComplete=LDAP setup komplett inte (gå på andra flikar) LDAPNoUserOrPasswordProvidedAccessIsReadOnly=Ingen administratör eller lösenord anges. LDAP tillgång kommer att bli anonym och i skrivskyddat läge. LDAPDescContact=På denna sida kan du ange LDAP-attribut namn i LDAP träd för varje data finns på Dolibarr kontakter. @@ -1429,7 +1435,7 @@ OptionVATDefault=Standard OptionVATDebitOption=Alternativ tjänster på Debit OptionVatDefaultDesc=Mervärdesskatt skall betalas:
    - Om leverans / betalning för varor
    - Bestämmelser om betalningar för tjänster OptionVatDebitOptionDesc=Mervärdesskatt skall betalas:
    - Om leverans / betalning för varor
    - På fakturan (debet) för tjänster -SummaryOfVatExigibilityUsedByDefault=Tid för moms exigibility som standard enligt valde alternativ: +SummaryOfVatExigibilityUsedByDefault=Time of VAT exigibility by default according to chosen option: OnDelivery=Vid leverans OnPayment=Mot betalning OnInvoice=På faktura @@ -1446,7 +1452,7 @@ AccountancyCodeBuy=Purchase account. code AgendaSetup=Åtgärder och dagordning modul setup PasswordTogetVCalExport=Viktiga att tillåta export länk PastDelayVCalExport=Inte exporterar fall äldre än -AGENDA_USE_EVENT_TYPE=Use events types (managed into menu Setup -> Dictionnary -> Type of agenda events) +AGENDA_USE_EVENT_TYPE=Use events types (managed into menu Setup -> Dictionary -> Type of agenda events) ##### ClickToDial ##### ClickToDialDesc=Denna modul gör det möjligt att lägga till en ikon efter telefonnummer. Ett klick på denna ikon för att kalla en server med en viss webbadress du anger nedan. Detta kan användas för att ringa ett system call center från Dolibarr som kan ringa upp telefonnumret på en SIP-system till exempel. ##### Point Of Sales (CashDesk) ##### diff --git a/htdocs/langs/sv_SE/bills.lang b/htdocs/langs/sv_SE/bills.lang index 2ed0212627e..781c61e811e 100644 --- a/htdocs/langs/sv_SE/bills.lang +++ b/htdocs/langs/sv_SE/bills.lang @@ -27,7 +27,7 @@ InvoiceReplacementDesc=Replacement invoice is used to cancel and replace InvoiceAvoir=Kreditnota InvoiceAvoirAsk=Kreditnota att korrigera fakturan InvoiceAvoirDesc=Den kreditnota är en negativ faktura används för att lösa det faktum att en faktura har ett värde som skiljer än beloppet verkligen betalat (eftersom kunden betalat för mycket av misstag, eller kommer inte betalas helt sedan han återvände vissa produkter till exempel). -invoiceAvoirWithLines=Create Credit Note with lines from the origin invoice +invoiceAvoirWithLines=Skapa kreditnota med innehållet i originalfakturan invoiceAvoirWithPaymentRestAmount=Create Credit Note with the amount of origin invoice payment's lake invoiceAvoirLineWithPaymentRestAmount=Credit Note amount of invoice payment's lake ReplaceInvoice=Byt faktura %s @@ -58,7 +58,7 @@ Payment=Betalning PaymentBack=Betalning tillbaka Payments=Betalningar PaymentsBack=Betalningar tillbaka -PaidBack=Paid back +PaidBack=Återbetald DatePayment=Betalningsdag DeletePayment=Radera betalning ConfirmDeletePayment=Är du säker på att du vill ta bort denna betalning? @@ -66,18 +66,18 @@ ConfirmConvertToReduc=Vill du omvandla detta kreditnota eller deponering i en ab SupplierPayments=Leverantörer betalningar ReceivedPayments=Mottagna betalningar ReceivedCustomersPayments=Inbetalningar från kunder -PayedSuppliersPayments=Payments payed to suppliers +PayedSuppliersPayments=Utförda leverantörsbetalningar ReceivedCustomersPaymentsToValid=Mottagna kunder betalningar för att validera PaymentsReportsForYear=Betalningar rapporter för %s PaymentsReports=Betalningar rapporter PaymentsAlreadyDone=Betalningar redan gjort -PaymentsBackAlreadyDone=Payments back already done +PaymentsBackAlreadyDone=Återbetalningar är utförda tidigare PaymentRule=Betalning regel PaymentMode=Betalning typ PaymentConditions=Betalning sikt PaymentConditionsShort=Betalning sikt PaymentAmount=Betalningsbelopp -ValidatePayment=Validate payment +ValidatePayment=Bekräfta betalning PaymentHigherThanReminderToPay=Betalning högre än påminnelse att betala HelpPaymentHigherThanReminderToPay=Uppmärksamheten är för betalning är en eller flera räkningar högre än resten att betala.
    Redigera din post, bekräfta något annat och tänka på att skapa en kreditnota det felaktigt erhållna beloppet för varje överskjutande fakturor. HelpPaymentHigherThanReminderToPaySupplier=Attention, the payment amount of one or more bills is higher than the rest to pay.
    Edit your entry, otherwise confirm. @@ -87,7 +87,7 @@ ClassifyCanceled=Klassificera "svikna" ClassifyClosed=Klassificera "sluten" CreateBill=Skapa faktura AddBill=Lägg faktura eller kreditnota -AddToDraftInvoices=Add to draft invoice +AddToDraftInvoices=Lägg till faktura-utkast DeleteBill=Ta bort faktura SearchACustomerInvoice=Sök efter en kundfaktura SearchASupplierInvoice=Sök efter en leverantörsfaktura @@ -170,7 +170,7 @@ ConfirmClassifyPaidPartiallyReasonOtherDesc=Använd detta val om alla andra inte ConfirmClassifyAbandonReasonOther=Andra ConfirmClassifyAbandonReasonOtherDesc=Detta val kommer att användas i alla andra fall. Till exempel därför att du planerar att skapa en ersättning faktura. ConfirmCustomerPayment=Har du bekräfta denna betalning ingång för %s %s? -ConfirmSupplierPayment=Do you confirm this payment input for %s %s ? +ConfirmSupplierPayment=Bekräftar du denna betalning för %s %s? ConfirmValidatePayment=Är du säker på att du vill godkänna denna betalning? Inga ändringar kan göras efter det att betalning är godkänd. ValidateBill=Validate faktura UnvalidateBill=Unvalidate faktura @@ -187,13 +187,13 @@ ShowInvoiceDeposit=Visa insättning faktura ShowPayment=Visa betalning File=Arkiv AlreadyPaid=Redan betalats ut -AlreadyPaidBack=Already paid back +AlreadyPaidBack=Redan återbetald AlreadyPaidNoCreditNotesNoDeposits=Redan betalats (utan kreditnotor och inlåning) Abandoned=Övergiven RemainderToPay=Återstår att betala RemainderToTake=Återstår att ta -RemainderToPayBack=Remainder to pay back -Rest=Pending +RemainderToPayBack=Påminnelse om återbetalning +Rest=Avvaktande AmountExpected=Yrkade beloppet ExcessReceived=Överskott fått EscompteOffered=Rabatterna (betalning innan terminen) @@ -203,7 +203,7 @@ StandingOrders=Stående order StandingOrder=Stående order NoDraftBills=Inget förslag fakturor NoOtherDraftBills=Inga andra förslag fakturor -NoDraftInvoices=No draft invoices +NoDraftInvoices=Inget faktura-utkast RefBill=Faktura ref ToBill=Till Bill RemainderToBill=Återstår att räkningen @@ -244,12 +244,12 @@ Discount=Rabatt Discounts=Rabatter AddDiscount=Lägg rabatt AddRelativeDiscount=Skapa relativ rabatt -EditRelativeDiscount=Edit relative discount +EditRelativeDiscount=Redigera procentuell rabatt AddGlobalDiscount=Lägg rabatt EditGlobalDiscounts=Redigera absoluta rabatter AddCreditNote=Skapa kreditnota ShowDiscount=Visa rabatt -ShowReduc=Show the deduction +ShowReduc=Visa rabatt RelativeDiscount=Relativ rabatt GlobalDiscount=Global rabatt CreditNote=Kreditnota @@ -309,12 +309,12 @@ PaymentConditionShort60DENDMONTH=60 dagar i slutet av månaden PaymentCondition60DENDMONTH=60 dagar i slutet av månaden PaymentConditionShortPT_DELIVERY=Leverans PaymentConditionPT_DELIVERY=Vid leverans -PaymentConditionShortPT_ORDER=On order -PaymentConditionPT_ORDER=On order +PaymentConditionShortPT_ORDER=Beställda +PaymentConditionPT_ORDER=Beställda PaymentConditionShortPT_5050=50-50 -PaymentConditionPT_5050=50%% in advance, 50%% on delivery -FixAmount=Fix amount -VarAmount=Variable amount (%% tot.) +PaymentConditionPT_5050=50%% i förskott, 50%% vid leverans +FixAmount=Fast belopp +VarAmount=Variabelt belopp (%% summa) # PaymentType PaymentTypeVIR=Bankinsättning PaymentTypeShortVIR=Bankinsättning @@ -364,7 +364,7 @@ LawApplicationPart2=Varan förblir egendom LawApplicationPart3=säljaren tills hela inlösen av LawApplicationPart4=deras pris. LimitedLiabilityCompanyCapital=SARL med kapital av -UseLine=Apply +UseLine=Tillämpa UseDiscount=Använd rabattkod UseCredit=Använd kredit UseCreditNoteInInvoicePayment=Minska belopp att betala med denna kredit @@ -389,11 +389,11 @@ CantRemovePaymentWithOneInvoicePaid=Kan inte ta bort betalning eftersom det inte ExpectedToPay=Förväntad utbetalning PayedByThisPayment=Betalas av denna betalning ClosePaidInvoicesAutomatically=Klassificera "betalade" alla standard eller fakturor ersättning entirely betalt. -ClosePaidCreditNotesAutomatically=Classify "Paid" all credit notes entirely paid back. +ClosePaidCreditNotesAutomatically=Beteckna "Betalda" alla fullständigt återbetalda kreditnotor. AllCompletelyPayedInvoiceWillBeClosed=Alla fakturor utan återstår att betala kommer automatiskt stängd för status "betald". -ToMakePayment=Pay -ToMakePaymentBack=Pay back -ListOfYourUnpaidInvoices=List of unpaid invoices +ToMakePayment=Betala +ToMakePaymentBack=Återbetala +ListOfYourUnpaidInvoices=Lista över obetalda fakturor NoteListOfYourUnpaidInvoices=Note: This list contains only invoices for third parties you are linked to as a sale representative. RevenueStamp=Revenue stamp YouMustCreateInvoiceFromThird=This option is only available when creating invoice from tab "customer" of thirdparty diff --git a/htdocs/langs/sv_SE/commercial.lang b/htdocs/langs/sv_SE/commercial.lang index 64d1261ddf1..3d81cb68e39 100644 --- a/htdocs/langs/sv_SE/commercial.lang +++ b/htdocs/langs/sv_SE/commercial.lang @@ -74,7 +74,7 @@ ActionAC_RDV=Möten ActionAC_FAC=Skicka kundfaktura med post ActionAC_REL=Skicka kundfaktura via post (påminnelse) ActionAC_CLO=Stäng -ActionAC_EMAILING=Skicka massa e-post +ActionAC_EMAILING=Skicka mängd-e-post ActionAC_COM=Skicka kundorder per post ActionAC_SHIP=Skicka Leverans med e-post ActionAC_SUP_ORD=Skicka leverantör beställning av e-post @@ -87,9 +87,9 @@ Stats=Försäljningsstatistik CAOrder=Försäljningsvolym (attesterade order) FromTo=från %s till %s MargeOrder=Marginaler (attesterade order) -RecapAnnee=Summary of the year +RecapAnnee=Årssammanfattning NoData=Det finns inga data StatusProsp=Prospect status DraftPropals=Utforma kommersiella förslag SearchPropal=Sök en kommersiell förslag -CommercialDashboard=Commercial summary +CommercialDashboard=Kommersiell sammanfattning diff --git a/htdocs/langs/sv_SE/contracts.lang b/htdocs/langs/sv_SE/contracts.lang index 74554ad91c6..98e98e079c6 100644 --- a/htdocs/langs/sv_SE/contracts.lang +++ b/htdocs/langs/sv_SE/contracts.lang @@ -10,11 +10,11 @@ ContractStatusRunning=Running ContractStatusDraft=Förslag ContractStatusValidated=Validerad ContractStatusClosed=Stängt -ServiceStatusInitial=Inte kör -ServiceStatusRunning=Running -ServiceStatusNotLate=Löpning, inte löpt ut +ServiceStatusInitial=Inte löpande +ServiceStatusRunning=Löpande +ServiceStatusNotLate=Löpande, inte löpt ut ServiceStatusNotLateShort=Inte löpt ut -ServiceStatusLate=Löpning, löpte ut +ServiceStatusLate=Löpande, löpt ut ServiceStatusLateShort=Utgångna ServiceStatusClosed=Stängt ServicesLegend=Tjänster legend @@ -23,39 +23,39 @@ Contract=Kontrakt NoContracts=Inga kontrakt MenuServices=Tjänster MenuInactiveServices=Tjänster inte aktiv -MenuRunningServices=Köra tjänster -MenuExpiredServices=Passerat tjänster -MenuClosedServices=Stängt tjänster +MenuRunningServices=Löpande tjänster +MenuExpiredServices=Utlöpta tjänster +MenuClosedServices=Stängda tjänster NewContract=Nytt kontrakt -AddContract=Lägg kontrakt +AddContract=Lägg till kontrakt SearchAContract=Sök ett kontrakt DeleteAContract=Ta bort ett kontrakt CloseAContract=Stäng ett kontrakt ConfirmDeleteAContract=Är du säker på att du vill ta bort detta avtal och alla dess tjänster? ConfirmValidateContract=Är du säker på att du vill godkänna detta avtal? -ConfirmCloseContract=Då stängs alla tjänster (aktiv eller inte). Är du säker på att du vill avsluta detta kontrakt? +ConfirmCloseContract=Stänger alla tjänster (aktiva eller inte). Är du säker på att du vill stänga detta avtal? ConfirmCloseService=Är du säker på att du vill avsluta denna tjänst med datum %s? ValidateAContract=Validera ett kontrakt ActivateService=Aktivera tjänsten ConfirmActivateService=Är du säker på att du vill aktivera denna tjänst med datum %s? -# RefContract=Contract reference +RefContract=Avtalsreferens DateContract=Kontraktsdatum -DateServiceActivate=Service aktivering datum -DateServiceUnactivate=Service avaktivering datum +DateServiceActivate=Aktiveringsdatum för tjänst +DateServiceUnactivate=Avaktiveringsdatum för tjänst DateServiceStart=Datum för början av tjänst -DateServiceEnd=Datum för sista service +DateServiceEnd=Datum då tjänst löper ut ShowContract=Visa kontrakt ListOfServices=Förteckning över tjänster ListOfInactiveServices=Förteckning över ej aktiva tjänster -ListOfExpiredServices=Förteckning över löpte aktiva tjänster +ListOfExpiredServices=Förteckning över utlöpta aktiva tjänster ListOfClosedServices=Lista över stängda tjänster ListOfRunningContractsLines=Förteckning över löpande kontrakt linjer -ListOfRunningServices=Förteckning över körande tjänster -NotActivatedServices=Inaktiv tjänster (bland valideras kontrakt) -BoardNotActivatedServices=Tjänster för att aktivera bland validerade kontrakt +ListOfRunningServices=Förteckning över löpande tjänster +NotActivatedServices=Inaktiva tjänster (bland validerade kontrakt) +BoardNotActivatedServices=Tjänster att aktivera bland validerade kontrakt LastContracts=Senast %s ändrat avtal -LastActivatedServices=Senaste %s aktiverad tjänster -LastModifiedServices=Senast %s uppdaterad tjänster +LastActivatedServices=Senaste %s aktiverade tjänster +LastModifiedServices=Senast %s uppdaterade tjänster EditServiceLine=Redigera servicelinjen ContractStartDate=Startdatum ContractEndDate=Slutdatum @@ -63,18 +63,18 @@ DateStartPlanned=Planerat startdatum DateStartPlannedShort=Planerat startdatum DateEndPlanned=Planerat slutdatum DateEndPlannedShort=Planerat slutdatum -DateStartReal=Real startdatum -DateStartRealShort=Real startdatum -DateEndReal=Real slutdatum -DateEndRealShort=Real slutdatum -NbOfServices=Nb av tjänster -CloseService=Stäng service +DateStartReal=Verkligt startdatum +DateStartRealShort=Verkligt startdatum +DateEndReal=Verkligt slutdatum +DateEndRealShort=Verkligt slutdatum +NbOfServices=Antal tjänster +CloseService=Stäng tjänst ServicesNomberShort=%s tjänst (er) -RunningServices=Köra tjänster -BoardRunningServices=Passerat körande tjänster +RunningServices=Löpande tjänster +BoardRunningServices=Utlöpta löpande tjänster ServiceStatus=Status för tjänst DraftContracts=Utkast avtal -CloseRefusedBecauseOneServiceActive=Kontrakt inte kan stängas eftersom det finns minst en öppen tjänst på det +CloseRefusedBecauseOneServiceActive=Kontrakt kan inte stängas eftersom det innehåller minst en öppen tjänst CloseAllContracts=Stäng alla kontrakt linjer DeleteContractLine=Ta bort ett kontrakt linje ConfirmDeleteContractLine=Är du säker på att du vill ta bort detta kontrakt linje? @@ -85,14 +85,16 @@ PaymentRenewContractId=Förnya kontrakt linje (nummer %s) ExpiredSince=Utgångsdatum RelatedContracts=Liknande avtal NoExpiredServices=Inga utgångna aktiva tjänster -# ListOfServicesToExpireWithDuration=List of Services to expire in %s days -# ListOfServicesToExpireWithDurationNeg=List of Services expired from more than %s days -# ListOfServicesToExpire=List of Services to expire -# NoteListOfYourExpiredServices=This list contains only services of contracts for third parties you are linked to as a sale representative. +ListOfServicesToExpireWithDuration=Förteckning över tjänster som löper ut inom %s dagar +ListOfServicesToExpireWithDurationNeg=Förteckning över tjänster som löpt ut sedan mer än %s dagar +ListOfServicesToExpire=Förteckning över tjänster som löper ut +NoteListOfYourExpiredServices=Denna förteckning omfattar endast tjänster från avtal med tredje part i förhållande till vilka du är säljare. +StandardContractsTemplate=Standard contracts template +ContactNameAndSignature=For %s, name and signature: ##### Types de contacts ##### -TypeContact_contrat_internal_SALESREPSIGN=Säljare undertecknar avtal -TypeContact_contrat_internal_SALESREPFOLL=Försäljare följa upp avtal +TypeContact_contrat_internal_SALESREPSIGN=Säljare som tecknar avtal +TypeContact_contrat_internal_SALESREPFOLL=Säljare som följer upp avtal TypeContact_contrat_external_BILLING=Fakturering kundkontakt TypeContact_contrat_external_CUSTOMER=Uppföljning kundkontakt TypeContact_contrat_external_SALESREPSIGN=Undertecknande kontrakt kundkontakt diff --git a/htdocs/langs/sv_SE/deliveries.lang b/htdocs/langs/sv_SE/deliveries.lang index e964850aea1..393ba2ebbcc 100644 --- a/htdocs/langs/sv_SE/deliveries.lang +++ b/htdocs/langs/sv_SE/deliveries.lang @@ -9,18 +9,18 @@ DeliveryDateShort=Leve. datum CreateDeliveryOrder=Generera leveransorder QtyDelivered=Antal levererade SetDeliveryDate=Ställ in leveransdatum -ValidateDeliveryReceipt=Validate kvitto +ValidateDeliveryReceipt=ttestera kvitto ValidateDeliveryReceiptConfirm=Är du säker på att du vill godkänna detta kvitto? -DeleteDeliveryReceipt=Bort kvitto +DeleteDeliveryReceipt=Radera leveranskvittens DeleteDeliveryReceiptConfirm=Är du säker på att du vill ta bort %s kvitto? DeliveryMethod=Leveransmetod TrackingNumber=Spårningsnummer -DeliveryNotValidated=Leverans inte validerade +DeliveryNotValidated=Leverans är inte attesterad # merou PDF model NameAndSignature=Namn och namnteckning: ToAndDate=To___________________________________ den ____ / _____ / __________ GoodStatusDeclaration=Har tagit emot varan ovan i gott skick, -Deliverer=Befriare: +Deliverer=Utlämnad av: Sender=Avsändare Recipient=Mottagare -# ErrorStockIsNotEnough=There's not enough stock +ErrorStockIsNotEnough=Det finns inte tillräckligt i lager diff --git a/htdocs/langs/sv_SE/exports.lang b/htdocs/langs/sv_SE/exports.lang index a938ca8bfb8..951a2d1d05b 100644 --- a/htdocs/langs/sv_SE/exports.lang +++ b/htdocs/langs/sv_SE/exports.lang @@ -8,7 +8,7 @@ ImportableDatas=Importeras dataset SelectExportDataSet=Välj uppsättning data du vill exportera ... SelectImportDataSet=Välj uppsättning data du vill importera ... SelectExportFields=Välj fält du vill exportera, eller välj en fördefinierad export profil -SelectImportFields=Välj källfil fält du vill importera och deras mål fält i databasen genom att flytta dem upp och ned med ankare %s, eller välj en fördefinierad import profil: +SelectImportFields=Choose source file fields you want to import and their target field in database by moving them up and down with anchor %s, or select a predefined import profile: NotImportedFields=Fält av källfil importeras inte SaveExportModel=Spara den här exportera profilen om du tänker återanvända det senare ... SaveImportModel=Spara denna import profil om du planerar att återanvända den senare ... @@ -64,7 +64,7 @@ ChooseFormatOfFileToImport=Välj filformat som ska användas som importera filfo ChooseFileToImport=Ladda upp filer klicka sedan på Picto %s för att välja fil som källa importera filen ... SourceFileFormat=Källa filformat FieldsInSourceFile=Fält i källfilen -# FieldsInTargetDatabase=Target fields in Dolibarr database (bold=mandatory) +FieldsInTargetDatabase=Target fields in Dolibarr database (bold=mandatory) Field=Fält NoFields=Inga fält MoveField=Flytta fält %s kolumn nummer @@ -81,7 +81,7 @@ DoNotImportFirstLine=Importera inte första raden i källfilen NbOfSourceLines=Antal rader i källfilen NowClickToTestTheImport=Kontrollera importera parametrar som du har definierat. Om de är korrekta, klicka på knappen "%s" för att starta en simulering av importprocessen (inga data kommer att ändras i databasen, det är bara en simulering för tillfället) ... RunSimulateImportFile=Starta import simulering -FieldNeedSource=Det känns i databasen krävs att uppgifter från källfilen +FieldNeedSource=This field requires data from the source file SomeMandatoryFieldHaveNoSource=Vissa obligatoriska fält inte har någon källa från datafil InformationOnSourceFile=Information om källfil InformationOnTargetTables=Information om mål fält @@ -102,33 +102,33 @@ NbOfLinesImported=Antal rader importerades: %s. DataComeFromNoWhere=Värde att infoga kommer från ingenstans i källfilen. DataComeFromFileFieldNb=Värde att infoga kommer från nummer %s fältet i källfilen. DataComeFromIdFoundFromRef=Värde som kommer från flera %s på källfil kommer att användas för att hitta ID förälder motsätta sig att använda (Så objet %s som har ref. Från källfilen måste finns i Dolibarr). -# DataComeFromIdFoundFromCodeId=Code that comes from field number %s of source file will be used to find id of parent object to use (So the code from source file must exists into dictionary %s). Note that if you know id, you can also use it into source file instead of code. Import should work in both cases. +DataComeFromIdFoundFromCodeId=Code that comes from field number %s of source file will be used to find id of parent object to use (So the code from source file must exists into dictionary %s). Note that if you know id, you can also use it into source file instead of code. Import should work in both cases. DataIsInsertedInto=Uppgifter från källfilen kommer att införas i följande område: DataIDSourceIsInsertedInto=ID på överordnat objekt hittas med hjälp av data i källfilen kommer att införas i följande område: DataCodeIDSourceIsInsertedInto=Id av förälder linje hittades från kod, kommer att införas i följande fält: SourceRequired=Data värde är obligatoriskt SourceExample=Exempel på möjliga datavärde ExampleAnyRefFoundIntoElement=Varje ref för element %s -# ExampleAnyCodeOrIdFoundIntoDictionary=Any code (or id) found into dictionary %s +ExampleAnyCodeOrIdFoundIntoDictionary=Any code (or id) found into dictionary %s CSVFormatDesc=Semikolonavgränsade filformat (. Csv).
    Detta är en text filformat där separeras fält av separator [%s]. Om separator finns inuti ett fält innehållet är området rundad med rund karaktär [%s]. Escape karaktär att fly rund karaktär är [%s]. -# Excel95FormatDesc=Excel file format (.xls)
    This is native Excel 95 format (BIFF5). -# Excel2007FormatDesc=Excel file format (.xlsx)
    This is native Excel 2007 format (SpreadsheetML). -# TsvFormatDesc=Tab Separated Value file format (.tsv)
    This is a text file format where fields are separated by a tabulator [tab]. -# ExportFieldAutomaticallyAdded=Field %s was automatically added. It will avoid you to have similar lines to be treated as duplicate records (with this field added, all lines will own their own id and will differ). -# CsvOptions=Csv Options -# Separator=Separator -# Enclosure=Enclosure -# SuppliersProducts=Suppliers Products +Excel95FormatDesc=Excel file format (.xls)
    This is native Excel 95 format (BIFF5). +Excel2007FormatDesc=Excel file format (.xlsx)
    This is native Excel 2007 format (SpreadsheetML). +TsvFormatDesc=Tab Separated Value file format (.tsv)
    This is a text file format where fields are separated by a tabulator [tab]. +ExportFieldAutomaticallyAdded=Field %s was automatically added. It will avoid you to have similar lines to be treated as duplicate records (with this field added, all lines will own their own id and will differ). +CsvOptions=Csv Options +Separator=Separator +Enclosure=Enclosure +SuppliersProducts=Suppliers Products BankCode=Bankkod DeskCode=Reception kod BankAccountNumber=Kontonummer BankAccountNumberKey=Nyckel -# SpecialCode=Special code -# ExportStringFilter=%% allows replacing one or more characters in the text -# ExportDateFilter='YYYY' 'YYYYMM' 'YYYYMMDD': filters by one year/month/day
    'YYYY+YYYY' 'YYYYMM+YYYYMM' 'YYYYMMDD+YYYYMMDD': filters over a range of years/months/days
    '>YYYY' '>YYYYMM' '>YYYYMMDD': filters on the following years/months/days
    '<YYYY' '<YYYYMM' '<YYYYMMDD': filters on the previous years/months/days -# ExportNumericFilter='NNNNN' filters by one value
    'NNNNN+NNNNN' filters over a range of values
    '>NNNNN' filters by lower values
    '>NNNNN' filters by higher values +SpecialCode=Special code +ExportStringFilter=%% allows replacing one or more characters in the text +ExportDateFilter='YYYY' 'YYYYMM' 'YYYYMMDD': filters by one year/month/day
    'YYYY+YYYY' 'YYYYMM+YYYYMM' 'YYYYMMDD+YYYYMMDD': filters over a range of years/months/days
    '>YYYY' '>YYYYMM' '>YYYYMMDD': filters on the following years/months/days
    '<YYYY' '<YYYYMM' '<YYYYMMDD': filters on the previous years/months/days +ExportNumericFilter='NNNNN' filters by one value
    'NNNNN+NNNNN' filters over a range of values
    '>NNNNN' filters by lower values
    '>NNNNN' filters by higher values ## filters -# SelectFilterFields=If you want to filter on some values, just input values here. -# FilterableFields=Champs Filtrables -# FilteredFields=Filtered fields -# FilteredFieldsValues=Value for filter +SelectFilterFields=If you want to filter on some values, just input values here. +FilterableFields=Champs Filtrables +FilteredFields=Filtered fields +FilteredFieldsValues=Value for filter diff --git a/htdocs/langs/sv_SE/holiday.lang b/htdocs/langs/sv_SE/holiday.lang index 8586de587f6..62c7499ad0f 100644 --- a/htdocs/langs/sv_SE/holiday.lang +++ b/htdocs/langs/sv_SE/holiday.lang @@ -8,7 +8,6 @@ NotActiveModCP=You must enable the module holidays to view this page. NotConfigModCP=You must configure the module holidays to view this page. To do this, click here . NoCPforUser=You don't have a demand for holidays. AddCP=Apply for holidays -CPErrorSQL=An SQL error occurred: Employe=Employee DateDebCP=Startdatum DateFinCP=Slutdatum diff --git a/htdocs/langs/sv_SE/languages.lang b/htdocs/langs/sv_SE/languages.lang index be7e63a2131..150ecbf9d04 100644 --- a/htdocs/langs/sv_SE/languages.lang +++ b/htdocs/langs/sv_SE/languages.lang @@ -1,35 +1,36 @@ # Dolibarr language file - Source file is en_US - languages Language_ar_AR=Arabiska -Language_ar_SA=Arabicum +Language_ar_SA=Arabiskt Language_bg_BG=Bulgariska Language_bs_BA=Bosniska Language_ca_ES=Katalanska Language_cs_CZ=Tjeckiska Language_da_DA=Danska -Language_da_DK=Danska +Language_da_DK=Danskt Language_de_DE=Tyska Language_de_AT=Tyska (Österrike) Language_el_GR=Grekiska Language_en_AU=Engelska (Australien) -Language_en_GB=English (United Kingdom) +Language_en_GB=Engelska (Storbritannien) Language_en_IN=Engelska (Indien) Language_en_NZ=Engelska (Nya Zeeland) Language_en_SA=Engelska (Saudiarabien) Language_en_US=Engelska (USA) Language_en_ZA=Engelska (Sydafrika) Language_es_ES=Spanska +Language_es_DO=Spanish (Dominican Republic) Language_es_AR=Spanska (Argentina) -Language_es_CL=Spanish (Chile) +Language_es_CL=Spanska (Chile) Language_es_HN=Spanska (Honduras) Language_es_MX=Spanska (Mexiko) Language_es_PY=Spanska (Paraguay) Language_es_PE=Spanska (Peru) Language_es_PR=Spanska (Puerto Rico) Language_et_EE=Estniska -Language_eu_ES=Basque +Language_eu_ES=Baskiska Language_fa_IR=Persiska -Language_fi_FI=Fins +Language_fi_FI=Finska Language_fr_BE=Franska (Belgien) Language_fr_CA=Franska (Kanada) Language_fr_CH=Franska (Schweiz) @@ -38,13 +39,14 @@ Language_fr_NC=Franska (Nya Kaledonien) Language_he_IL=Hebreiska Language_hr_HR=Kroatiska Language_hu_HU=Ungerska +Language_id_ID=Indonesian Language_is_IS=Isländska Language_it_IT=Italienska Language_ja_JP=Japanska Language_ko_KR=Koreanska -Language_lt_LT=Litauen -Language_lv_LV=Lett -Language_mk_MK=Macedonian +Language_lt_LT=Litauiska +Language_lv_LV=Lettländska +Language_mk_MK=Makedonska Language_nb_NO=Norska (bokmål) Language_nl_BE=Holländska (Belgien) Language_nl_NL=Nederländska (Nederländerna) @@ -55,14 +57,14 @@ Language_ro_RO=Rumänska Language_ru_RU=Ryska Language_ru_UA=Ryska (Ukraina) Language_tr_TR=Turkiska -Language_sl_SI=Slovenian +Language_sl_SI=Slovenska Language_sv_SV=Svenska Language_sv_SE=Svenskt -Language_sq_AL=Albanian +Language_sq_AL=Albanska Language_sk_SK=Slovakiska -Language_th_TH=Thai +Language_th_TH=Thailändska Language_uk_UA=Ukrainska -Language_uz_UZ=Uzbekistan -Language_vi_VN=Vietnamesiskt +Language_uz_UZ=Uzbekiska +Language_vi_VN=Vietnamesiska Language_zh_CN=Kinesiska Language_zh_TW=Kinesiska (traditionell) diff --git a/htdocs/langs/sv_SE/mails.lang b/htdocs/langs/sv_SE/mails.lang index 4491ad815ba..7e607f65742 100644 --- a/htdocs/langs/sv_SE/mails.lang +++ b/htdocs/langs/sv_SE/mails.lang @@ -79,6 +79,7 @@ MailtoEMail=Hyper link to email ActivateCheckRead=Allow to use the "Unsubcribe" link ActivateCheckReadKey=Key use to encrypt URL use for "Read Receipt" and "Unsubcribe" feature EMailSentToNRecipients=EMail sent to %s recipients. +XTargetsAdded=%s recipients added into target list EachInvoiceWillBeAttachedToEmail=A document using default invoice document template will be created and attached to each email. MailTopicSendRemindUnpaidInvoices=Reminder of invoice %s (%s) SendRemind=Send reminder by EMails diff --git a/htdocs/langs/sv_SE/main.lang b/htdocs/langs/sv_SE/main.lang index 4ffc7d1ed18..fe680f195d8 100644 --- a/htdocs/langs/sv_SE/main.lang +++ b/htdocs/langs/sv_SE/main.lang @@ -19,7 +19,7 @@ FormatHourShortDuration=%H:%M FormatDateTextShort=%b %d %Y FormatDateText=%B %d %Y FormatDateHourShort=%Y-%m-%d %H:%M -FormatDateHourSecShort=%m/%d/%Y %I:%M:%S %p +FormatDateHourSecShort=%Y-%m-%d %I:%M:%S %p FormatDateHourTextShort=%d %b %Y, %H:%M FormatDateHourText=%d %B %Y, %H:%M DatabaseConnection=Databasanslutning @@ -551,6 +551,7 @@ MailSentBy=E-post skickas med TextUsedInTheMessageBody=E-organ SendAcknowledgementByMail=Skicka Ack. via e-post NoEMail=Ingen e-post +NoMobilePhone=No mobile phone Owner=Ägare DetectedVersion=Upptäckta version FollowingConstantsWillBeSubstituted=Följande konstanter kommer att ersätta med motsvarande värde. @@ -657,7 +658,7 @@ LinkedToSpecificUsers=Länkad till särskild användarekontakt DeleteAFile=Radera fil ConfirmDeleteAFile=Är du säker på att du vill radera fil NoResults=Inga resultat -ModulesSystemTools=Modules tools +ModulesSystemTools=Modulverktyg Test=Test Element=Element NoPhotoYet=Inga bilder tillgängliga diff --git a/htdocs/langs/sv_SE/margins.lang b/htdocs/langs/sv_SE/margins.lang index 8f0689946b4..a5639a012ac 100644 --- a/htdocs/langs/sv_SE/margins.lang +++ b/htdocs/langs/sv_SE/margins.lang @@ -1,40 +1,40 @@ # Dolibarr language file - Source file is en_US - marges -Margin=Margin -Margins=Margins -TotalMargin=Total Margin -MarginOnProducts=Margin / Products -MarginOnServices=Margin / Services -MarginRate=Margin rate -MarkRate=Mark rate -DisplayMarginRates=Display margin rates +Margin=Marginal +Margins=Marginaler +TotalMargin=Summa marginal +MarginOnProducts=Marginal / Produkter +MarginOnServices=Marginal / Tjänster +MarginRate=Marginalsats +MarkRate=Markera sats +DisplayMarginRates=Visa marginalsatser DisplayMarkRates=Display mark rates -InputPrice=Input price -margin=Profit margins management -margesSetup=Profit margins management setup -MarginDetails=Margin details -ProductMargins=Product margins -CustomerMargins=Customer margins -SalesRepresentativeMargins=Sales representative margins +InputPrice=Inpris +margin=Hantering av vinstmarginaler +margesSetup=Inställningar för vinstmarginalhantering +MarginDetails=Marginaldetaljer +ProductMargins=Produktmarginaler +CustomerMargins=Kundmarginaler +SalesRepresentativeMargins=Återförsäljares marginaler ProductService=Produkt eller tjänst -AllProducts=All products and services -ChooseProduct/Service=Choose product or service +AllProducts=Alla produkter och tjänster +ChooseProduct/Service=Välj produkt eller tjänst StartDate=Startdatum EndDate=Slutdatum Launch=Start -ForceBuyingPriceIfNull=Force buying price if null +ForceBuyingPriceIfNull=Tvinga inköpspris om tom ForceBuyingPriceIfNullDetails=if "ON", margin will be zero on line (buying price = selling price), otherwise ("OFF"), marge will be equal to selling price (buying price = 0) -MARGIN_METHODE_FOR_DISCOUNT=Margin method for global discounts -UseDiscountAsProduct=As a product -UseDiscountAsService=As a service -UseDiscountOnTotal=On subtotal +MARGIN_METHODE_FOR_DISCOUNT=Marginalmetod för globala rabatter +UseDiscountAsProduct=Som produkt +UseDiscountAsService=Som tjänst +UseDiscountOnTotal=På delsumma MARGIN_METHODE_FOR_DISCOUNT_DETAILS=Defines if a global discount is treated as a product, a service, or only on subtotal for margin calculation. -MARGIN_TYPE=Margin type -MargeBrute=Raw margin -MargeNette=Net margin -MARGIN_TYPE_DETAILS=Raw margin : Selling price - Buying price
    Net margin : Selling price - Cost price -CostPrice=Cost price -BuyingCost=Cost price +MARGIN_TYPE=Typ av marginal +MargeBrute=Bruttomarginal +MargeNette=Nettomarginal +MARGIN_TYPE_DETAILS=Bruttomarginal: Säljpris - Inköpspris
    Nettomarginal: Säljpris - Kostnadspris +CostPrice=Kostnadspris +BuyingCost=Kostnadspris UnitCharges=Unit charges Charges=Charges AgentContactType=Commercial agent contact type diff --git a/htdocs/langs/sv_SE/members.lang b/htdocs/langs/sv_SE/members.lang index b5e94a94df9..63e23311d96 100644 --- a/htdocs/langs/sv_SE/members.lang +++ b/htdocs/langs/sv_SE/members.lang @@ -1,28 +1,28 @@ # Dolibarr language file - Source file is en_US - members -MembersArea=Medlemmar område -PublicMembersArea=Offentlig medlemmar område -MemberCard=Medlem kort +MembersArea=Rum för medlemmar +PublicMembersArea=Offentligt rum för medlemmar +MemberCard=Medlemskort SubscriptionCard=Abonnemangskort Member=Medlem Members=Medlemmar MemberAccount=Medlemsinloggning ShowMember=Visa medlemskort UserNotLinkedToMember=Användare länkade inte till en medlem -# ThirdpartyNotLinkedToMember=Third-party not linked to a member +ThirdpartyNotLinkedToMember=Tredje part inte kopplad till någon medlem MembersTickets=Medlemmar biljetter -FundationMembers=Stiftelsen medlemmar +FundationMembers=Stiftelsemedlemmar Attributs=Egenskaper -ErrorMemberTypeNotDefined=Medlem typ inte definierat +ErrorMemberTypeNotDefined=Medlemstyp inte definierat ListOfPublicMembers=Förteckning över offentliga medlemmar -ListOfValidatedPublicMembers=Förteckning över validerade offentlig medlemmar -ErrorThisMemberIsNotPublic=Denna medlem är inte offentliga +ListOfValidatedPublicMembers=Förteckning över validerade, offentliga medlemmar +ErrorThisMemberIsNotPublic=Denna medlem är inte offentlig ErrorMemberIsAlreadyLinkedToThisThirdParty=En annan ledamot (namn: %s, login: %s) är redan kopplad till en tredje part %s. Ta bort denna länk först, eftersom en tredje part inte kan kopplas till endast en ledamot (och vice versa). ErrorUserPermissionAllowsToLinksToItselfOnly=Av säkerhetsskäl måste du beviljas behörighet att redigera alla användare att kunna koppla en medlem till en användare som inte är din. ThisIsContentOfYourCard=Detta är uppgifter om ditt kort CardContent=Innehållet i ditt medlemskort -SetLinkToUser=Länk till en Dolibarr användare -SetLinkToThirdParty=Länk till en Dolibarr tredje part -MembersCards=Medlemmar skriva kort +SetLinkToUser=Koppla till en Dolibarr användare +SetLinkToThirdParty=Koppla till en Dolibarr tredje part +MembersCards=Medlemmars visitkort MembersList=Förteckning över medlemmar MembersListToValid=Förteckning över förslag till medlemmar (att valideras) MembersListValid=Förteckning över giltiga medlemmar @@ -80,20 +80,19 @@ NewSubscriptionDesc=Denna blankett kan du spela in din prenumeration som en ny m Subscription=Teckning Subscriptions=Abonnemang SubscriptionLate=Sent -SubscriptionNotReceived=Prenumeration fick aldrig +SubscriptionNotReceived=Prenumeration aldrig mottagen SubscriptionLateShort=Sent -SubscriptionNotReceivedShort=Aldrig fick -ListOfSubscriptions=Lista över abonnemang +SubscriptionNotReceivedShort=Aldrig fått +ListOfSubscriptions=Förteckning över abonnemang SendCardByMail=Sänd kort via e-post AddMember=Lägg till medlem -MemberType=Medlem typ NoTypeDefinedGoToSetup=Ingen medlem definierade typer. Gå till Setup - Medlemmar typer -NewMemberType=Ny medlem typ -WelcomeEMail=Välkommen e-post +NewMemberType=Ny medlemstyp +WelcomeEMail=Välkomst e-post SubscriptionRequired=Prenumeration krävs -EditType=Redigera medlem typ +EditType=Redigera medlemstyp DeleteType=Ta bort -VoteAllowed=Rösta tillåtet +VoteAllowed=Röstning tillåten Physical=Fysisk Moral=Moral MorPhy=Moral / Fysisk @@ -128,39 +127,39 @@ PublicMemberCard=Medlem offentlig kort MemberNotOrNoMoreExpectedToSubscribe=Medlem som inte eller inte mer förväntas prenumerera AddSubscription=Lägg till prenumeration ShowSubscription=Visa prenumeration -MemberModifiedInDolibarr=Medlem ändrats Dolibarr -SendAnEMailToMember=Skicka information e-post till medlem -# DescADHERENT_AUTOREGISTER_NOTIF_MAIL_SUBJECT=Subject of the e-mail received in case of auto-inscription of a guest -# DescADHERENT_AUTOREGISTER_NOTIF_MAIL=E-mail received in case of auto-inscription of a guest -DescADHERENT_AUTOREGISTER_MAIL_SUBJECT=E-post ämne för medlem autosubscription -DescADHERENT_AUTOREGISTER_MAIL=E-post för medlem autosubscription -DescADHERENT_MAIL_VALID_SUBJECT=E-post ämne för medlem validering -DescADHERENT_MAIL_VALID=E-post för medlem validering -DescADHERENT_MAIL_COTIS_SUBJECT=E-post ämne för teckning +MemberModifiedInDolibarr=Medlem ändrad i Dolibarr +SendAnEMailToMember=Skicka informations-e-post till medlem +DescADHERENT_AUTOREGISTER_NOTIF_MAIL_SUBJECT=Ämne för e-post mottagen vid automatisk inskrivning av gäst +DescADHERENT_AUTOREGISTER_NOTIF_MAIL=E-post mottagen vid automatisk inskrivning av gäst +DescADHERENT_AUTOREGISTER_MAIL_SUBJECT=E-post-ämne för medlems auto-prenumeration +DescADHERENT_AUTOREGISTER_MAIL=E-post för medlems auto-prenumeration +DescADHERENT_MAIL_VALID_SUBJECT=E-post-ämne för medlems validering +DescADHERENT_MAIL_VALID=E-post för medlems validering +DescADHERENT_MAIL_COTIS_SUBJECT=E-post-ämne för prenumeration DescADHERENT_MAIL_COTIS=E-post för prenumeration -DescADHERENT_MAIL_RESIL_SUBJECT=E-post ämne för medlem resiliation -DescADHERENT_MAIL_RESIL=E-post för ledamot resiliation +DescADHERENT_MAIL_RESIL_SUBJECT=E-post-ämne för medlems uppsägning +DescADHERENT_MAIL_RESIL=E-post för medlems uppsägning DescADHERENT_MAIL_FROM=Avsändare E-post för automatisk e-post -DescADHERENT_ETIQUETTE_TYPE=Utformning av etiketter sida -# DescADHERENT_ETIQUETTE_TEXT=Text printed on member address sheets +DescADHERENT_ETIQUETTE_TYPE=Utformning av etikettsida +DescADHERENT_ETIQUETTE_TEXT=Text på medlems adressflik DescADHERENT_CARD_TYPE=Format för kort sida -DescADHERENT_CARD_HEADER_TEXT=Text trycks ovanpå medlem kort +DescADHERENT_CARD_HEADER_TEXT=Text trycks högst upp på medlemskort DescADHERENT_CARD_TEXT=Text tryckt på medlemskort (Anpassning till vänster) DescADHERENT_CARD_TEXT_RIGHT=Text tryckt på medlemskort (Anpassning till höger) -DescADHERENT_CARD_FOOTER_TEXT=Text tryckt på undersidan av medlemskort -GlobalConfigUsedIfNotDefined=Text som anges i stiftelsen modulen installationen kommer att användas om inte definieras här -MayBeOverwrited=Denna text kan overwrited i värde definieras för medlemmens typ -ShowTypeCard=Visa typ "%s" -HTPasswordExport=htpassword fil generation +DescADHERENT_CARD_FOOTER_TEXT=Text tryckt längst ner på medlemskort +GlobalConfigUsedIfNotDefined=Text som anges i stiftelse-modulens inställningar kommer att användas om ingen annan definieras här +MayBeOverwrited=Denna text kan skrivas över av värde som definieras för medlemmens typ +ShowTypeCard=Visa typ '%' +HTPasswordExport=htpassword-fil skapas NoThirdPartyAssociatedToMember=Ingen tredje part som är associerade till denna medlem ThirdPartyDolibarr=Dolibarr tredje part MembersAndSubscriptions= Medlemmar och Subscriptions -MoreActions=Kompletterande åtgärder för inspelning -# MoreActionsOnSubscription=Complementary action, suggested by default when recording a subscription -MoreActionBankDirect=Skapa en direkt transaktionsregister på grund +MoreActions=Kompletterande åtgärder vid registrering +MoreActionsOnSubscription=Extra åtgärder, föreslagna som standard när prenumeration registreras +MoreActionBankDirect=Skapa ett direkt transaktionsregister för konto MoreActionBankViaInvoice=Skapa en faktura och delbetalning MoreActionInvoiceOnly=Skapa en faktura utan betalning -LinkToGeneratedPages=Generera besök kort +LinkToGeneratedPages=Generera besökskort LinkToGeneratedPagesDesc=Den här skärmen kan du skapa PDF-filer med visitkort för alla dina medlemmar eller en viss medlem. DocForAllMembersCards=Generera visitkort för alla medlemmar (Format för utgång faktiskt setup: %s) DocForOneMemberCards=Generera visitkort för en viss medlem (Format för utgång faktiskt setup: %s) @@ -171,6 +170,8 @@ LastSubscriptionAmount=Senast teckningsbelopp MembersStatisticsByCountries=Medlemmar statistik per land MembersStatisticsByState=Medlemmar statistik från stat / provins MembersStatisticsByTown=Medlemmar statistik per kommun +MembersStatisticsByRegion=Medlemsstatistik på region +MemberByRegion=Medlemmar på region NbOfMembers=Antal medlemmar NoValidatedMemberYet=Inga godkända medlemmar hittades MembersByCountryDesc=Denna skärm visar statistik om medlemmar med länder. Grafisk beror dock på Google online grafen service och är tillgänglig endast om en Internet-anslutning fungerar. @@ -184,9 +185,9 @@ Public=Information är offentliga Exports=Export NewMemberbyWeb=Ny ledamot till. Väntar på godkännande NewMemberForm=Ny medlem formen -SubscriptionsStatistics=Statistik om abonnemang -NbOfSubscriptions=Antal abonnemang -AmountOfSubscriptions=Mängd abonnemang +SubscriptionsStatistics=Statistik om prenumerationer +NbOfSubscriptions=Antal prenumerationer +AmountOfSubscriptions=Mängd prenumeration TurnoverOrBudget=Omsättning (för ett företag) eller Budget (för en stiftelse) DefaultAmount=Standard mängd av abonnemang CanEditAmount=Besökare kan välja / redigera del av sin teckning @@ -196,9 +197,9 @@ Collectivités=Organisationer Particuliers=Personlig Entreprises=Företag DOLIBARRFOUNDATION_PAYMENT_FORM=För att göra din prenumeration betalning via en banköverföring, se sidan
    http://wiki.dolibarr.org/index.php/Subscribe .
    Att betala med kreditkort eller Paypal, klicka på knappen längst ner på denna sida.
    -# ByProperties=By characteristics -# MembersStatisticsByProperties=Members statistics by characteristics -# MembersByNature=Members by nature -# VATToUseForSubscriptions=VAT rate to use for subscriptions -# NoVatOnSubscription=No TVA for subscriptions -# MEMBER_PAYONLINE_SENDEMAIL=Email to warn when Dolibarr receive a confirmation of a validated payment for subscription +ByProperties=På egenskaper +MembersStatisticsByProperties=Medlemsstatistik på egenskaper +MembersByNature=Medlemmar på sort +VATToUseForSubscriptions=Moms-sats för prenumeration +NoVatOnSubscription=Ingen moms för prenumeration +MEMBER_PAYONLINE_SENDEMAIL=E-post för att varna när Dolibarr mottager en bekräftelse för en validerad betalning för en prenumeration diff --git a/htdocs/langs/sv_SE/products.lang b/htdocs/langs/sv_SE/products.lang index 20193ba1efb..061286bf548 100644 --- a/htdocs/langs/sv_SE/products.lang +++ b/htdocs/langs/sv_SE/products.lang @@ -28,8 +28,10 @@ ProductsAndServicesStatistics=Produkter och tjänster statistik ProductsStatistics=Produkter statistik ProductsOnSell=Tillgängliga produkter ProductsNotOnSell=Föråldrade produkter +ProductsOnSellAndOnBuy=Products not for sale nor purchase ServicesOnSell=Tillgängliga tjänster ServicesNotOnSell=Föråldrade tjänster +ServicesOnSellAndOnBuy=Services not for sale nor purchase InternalRef=Intern hänvisning LastRecorded=Senaste produkter / tjänster att sälja in LastRecordedProductsAndServices=Senaste %s inspelade produkter / tjänster @@ -70,6 +72,8 @@ PublicPrice=Offentliga pris CurrentPrice=Nuvarande pris NewPrice=Nytt pris MinPrice=Halvnot. försäljningspris +MinPriceHT=Minim. selling price (net of tax) +MinPriceTTC=Minim. selling price (inc. tax) CantBeLessThanMinPrice=Försäljningspriset kan inte vara lägre än lägsta tillåtna för denna bok (%s utan skatt) ContractStatus=Kontrakt status ContractStatusClosed=Stängt @@ -109,7 +113,7 @@ BarcodeValue=Barcode värde NoteNotVisibleOnBill=Obs (ej synlig på fakturor, förslag ...) CreateCopy=Skapa kopia ServiceLimitedDuration=Om produkten är en tjänst med begränsad varaktighet: -MultiPricesAbility=Several level of prices per product/service +MultiPricesAbility=Flera prisnivåer per produkt eller tjänst MultiPricesNumPrices=Antal pris MultiPriceLevelsName=Pris kategorier AssociatedProductsAbility=Aktivera biprodukter @@ -156,12 +160,12 @@ NoSupplierPriceDefinedForThisProduct=Ingen leverantör pris / st fastställts f RecordedProducts=Produkter som registrerats RecordedServices=Registrerade tjänster RecordedProductsAndServices=Produkter / tjänster registreras -PredefinedProductsToSell=Predefined products to sell -PredefinedServicesToSell=Predefined services to sell -PredefinedProductsAndServicesToSell=Predefined products/services to sell -PredefinedProductsToPurchase=Predefined product to purchase -PredefinedServicesToPurchase=Predefined services to purchase -PredefinedProductsAndServicesToPurchase=Predefined products/services to puchase +PredefinedProductsToSell=Fördefinierade produkter att sälja +PredefinedServicesToSell=Fördefinierade tjänster att sälja +PredefinedProductsAndServicesToSell=Fördefinierade produkter eller tjänster att sälja +PredefinedProductsToPurchase=Fördefinierade produkter för upphandling +PredefinedServicesToPurchase=Fördefinierade tjänster för upphandling +PredefinedProductsAndServicesToPurchase=Fördefinierade produkter eller tjänster för upphandling GenerateThumb=Generera tumme ProductCanvasAbility=Använd speciell "duk" addons ServiceNb=Service # %s @@ -179,6 +183,7 @@ ProductIsUsed=Denna produkt används NewRefForClone=Ref. av ny produkt / tjänst CustomerPrices=Kunder priser SuppliersPrices=Leverantörer priser +SuppliersPricesOfProductsOrServices=Suppliers prices (of products or services) CustomCode=Tullkodex CountryOrigin=Ursprungsland HiddenIntoCombo=Dold i vissa utvalda listor @@ -207,7 +212,8 @@ UnitPmp=Net unit VWAP CostPmpHT=Net total VWAP ProductUsedForBuild=Automatiskt förbrukad för tillverkning ProductBuilded=Tillverkning klar -ProductsMultiPrice=Product multi-price +ProductsMultiPrice=Produkt multi-priser +ProductsOrServiceMultiPrice=Customers prices (of products or services, multi-prices) ProductSellByQuarterHT=Products turnover quarterly VWAP ServiceSellByQuarterHT=Services turnover quarterly VWAP Quarter1=1:a kvartalet @@ -228,7 +234,7 @@ BarCodeDataForProduct=Streckkodsinfo för produkt %s: BarCodeDataForThirdparty=Streckkodsinfo för tredje part %s: ResetBarcodeForAllRecords=Definiera streckkodsvärde för alla poster (detta kommer även att återställa streckkodsvärden som redan är definierade med nya värden) PriceByCustomer=Pris per kund -PriceCatalogue=Unique price per product/service +PriceCatalogue=Unikt pris för produkt eller tjänst PricingRule=Prisregler AddCustomerPrice=Lägg till pris per kund ForceUpdateChildPriceSoc=Sätt samma pris på kunds filialer diff --git a/htdocs/langs/sv_SE/propal.lang b/htdocs/langs/sv_SE/propal.lang index 9e400987cde..1dcf8a037fd 100644 --- a/htdocs/langs/sv_SE/propal.lang +++ b/htdocs/langs/sv_SE/propal.lang @@ -70,8 +70,8 @@ ErrorPropalNotFound=Propal %s hittades inte Estimate=Uppskattning: EstimateShort=Uppskattning OtherPropals=Andra förslag -# AddToDraftProposals=Add to draft proposal -# NoDraftProposals=No draft proposals +AddToDraftProposals=Lägg till förslagsutkast +NoDraftProposals=Inga förslagsutkast CopyPropalFrom=Skapa kommersiella förslag genom att kopiera befintliga förslaget CreateEmptyPropal=Skapa tomma kommersiella förslag VIERGE eller från förteckningen över produkter / tjänster DefaultProposalDurationValidity=Standard kommersiella förslag giltighet längd (i dagar) @@ -97,6 +97,6 @@ TypeContact_propal_external_CUSTOMER=Kundkontakt följa upp förslag # Document models DocModelAzurDescription=Ett fullständigt förslag modell (logo. ..) DocModelJauneDescription=Jaune förslag modell -# DefaultModelPropalCreate=Default model creation -# DefaultModelPropalToBill=Default template when closing a business proposal (to be invoiced) -# DefaultModelPropalClosed=Default template when closing a business proposal (unbilled) +DefaultModelPropalCreate=Skapa standardmodell +DefaultModelPropalToBill=Standardmall när ett affärsförslag sluts (att fakturera) +DefaultModelPropalClosed=Standardmall när ett affärsförslag sluts (ofakturerat) diff --git a/htdocs/langs/sv_SE/shop.lang b/htdocs/langs/sv_SE/shop.lang index 944980ecee2..94f6e3efb88 100644 --- a/htdocs/langs/sv_SE/shop.lang +++ b/htdocs/langs/sv_SE/shop.lang @@ -1,4 +1,5 @@ # Dolibarr language file - Source file is en_US - shop +FailedConnectDBCheckModuleSetup=Failed to connect to oscommerce database. Check your module setup Shop=Shop ShopWeb=Web Shop LastOrders=Sista beställningen diff --git a/htdocs/langs/sv_SE/stocks.lang b/htdocs/langs/sv_SE/stocks.lang index ab6f3de690c..1598b68c744 100644 --- a/htdocs/langs/sv_SE/stocks.lang +++ b/htdocs/langs/sv_SE/stocks.lang @@ -112,6 +112,7 @@ ReplenishmentOrdersDesc=Detta är en lista över alla öppna leverantörsorder Replenishments=Påfyllningar NbOfProductBeforePeriod=Antal av produkt %s i lager före vald period (< %s) NbOfProductAfterPeriod=Antal av produkt %s i lager efter vald period (> %s) +MassMovement=Mass movement MassStockMovement=Mass stock movement SelectProductInAndOutWareHouse=Välj produkt, antal, ursprungslager och mållager och klicka "%s". När det är gjort för alla lageröverföringar klicka på "%s". RecordMovement=Spela in överföring diff --git a/htdocs/langs/th_TH/admin.lang b/htdocs/langs/th_TH/admin.lang index bca63ff8a89..354a9c70ea5 100644 --- a/htdocs/langs/th_TH/admin.lang +++ b/htdocs/langs/th_TH/admin.lang @@ -116,7 +116,7 @@ LanguageBrowserParameter=Parameter %s LocalisationDolibarrParameters=Localisation parameters ClientTZ=Client Time Zone (user) ClientHour=Client time (user) -OSTZ=Servre OS Time Zone +OSTZ=Server OS Time Zone PHPTZ=PHP server Time Zone PHPServerOffsetWithGreenwich=PHP server offset width Greenwich (seconds) ClientOffsetWithGreenwich=Client/Browser offset width Greenwich (seconds) @@ -233,7 +233,9 @@ OfficialWebSiteFr=French official web site OfficialWiki=Dolibarr documentation on Wiki OfficialDemo=Dolibarr online demo OfficialMarketPlace=Official market place for external modules/addons -OfficialWebHostingService=Official web hosting services (Cloud hosting) +OfficialWebHostingService=Referenced web hosting services (Cloud hosting) +ReferencedPreferredPartners=Preferred Partners +OtherResources=Autres ressources ForDocumentationSeeWiki=For user or developer documentation (Doc, FAQs...),
    take a look at the Dolibarr Wiki:
    %s ForAnswersSeeForum=For any other questions/help, you can use the Dolibarr forum:
    %s HelpCenterDesc1=This area can help you to get a Help support service on Dolibarr. @@ -369,9 +371,9 @@ ExtrafieldSelectList = Select from table ExtrafieldSeparator=Separator ExtrafieldCheckBox=Checkbox ExtrafieldRadio=Radio button -ExtrafieldParamHelpselect=Parameters list have to be like key,value

    for exemple :
    1,value1
    2,value2
    3,value3
    ...

    In order to have the list depending on another :
    1,value1|parent_list_code:parent_key
    2,value2|parent_list_code:parent_key -ExtrafieldParamHelpcheckbox=Parameters list have to be like key,value

    for exemple :
    1,value1
    2,value2
    3,value3
    ... -ExtrafieldParamHelpradio=Parameters list have to be like key,value

    for exemple :
    1,value1
    2,value2
    3,value3
    ... +ExtrafieldParamHelpselect=Parameters list have to be like key,value

    for example :
    1,value1
    2,value2
    3,value3
    ...

    In order to have the list depending on another :
    1,value1|parent_list_code:parent_key
    2,value2|parent_list_code:parent_key +ExtrafieldParamHelpcheckbox=Parameters list have to be like key,value

    for example :
    1,value1
    2,value2
    3,value3
    ... +ExtrafieldParamHelpradio=Parameters list have to be like key,value

    for example :
    1,value1
    2,value2
    3,value3
    ... ExtrafieldParamHelpsellist=Parameters list comes from a table
    Syntax : table_name:label_field:id_field::filter
    Example : c_typent:libelle:id::filter

    filter can be a simple test (eg active=1) to display only active value
    if you want to filter on extrafields use syntaxt extra.fieldcode=... (where field code is the code of extrafield)

    In order to have the list depending on another :
    c_typent:libelle:id:parent_list_code|parent_column:filter LibraryToBuildPDF=Library used to build PDF WarningUsingFPDF=Warning: Your conf.php contains directive dolibarr_pdf_force_fpdf=1. This means you use the FPDF library to generate PDF files. This library is old and does not support a lot of features (Unicode, image transparency, cyrillic, arab and asiatic languages, ...), so you may experience errors during PDF generation.
    To solve this and have a full support of PDF generation, please download TCPDF library, then comment or remove the line $dolibarr_pdf_force_fpdf=1, and add instead $dolibarr_lib_TCPDF_PATH='path_to_TCPDF_dir' @@ -472,7 +474,7 @@ Module410Desc=Webcalendar integration Module500Name=Special expenses (tax, social contributions, dividends) Module500Desc=Management of special expenses like taxes, social contribution, dividends and salaries Module510Name=Salaries -Module510Desc=Management of empoyees salaries and payments +Module510Desc=Management of employees salaries and payments Module600Name=Notifications Module600Desc=Send notifications by email on some Dolibarr business events to third party contacts Module700Name=Donations @@ -495,15 +497,15 @@ Module2400Name=Agenda Module2400Desc=Events/tasks and agenda management Module2500Name=Electronic Content Management Module2500Desc=Save and share documents -Module2600Name= WebServices -Module2600Desc= Enable the Dolibarr web services server -Module2700Name= Gravatar -Module2700Desc= Use online Gravatar service (www.gravatar.com) to show photo of users/members (found with their emails). Need an internet access +Module2600Name=WebServices +Module2600Desc=Enable the Dolibarr web services server +Module2700Name=Gravatar +Module2700Desc=Use online Gravatar service (www.gravatar.com) to show photo of users/members (found with their emails). Need an internet access Module2800Desc=FTP Client -Module2900Name= GeoIPMaxmind -Module2900Desc= GeoIP Maxmind conversions capabilities -Module3100Name= Skype -Module3100Desc= Add a Skype button into card of adherents / third parties / contacts +Module2900Name=GeoIPMaxmind +Module2900Desc=GeoIP Maxmind conversions capabilities +Module3100Name=Skype +Module3100Desc=Add a Skype button into card of adherents / third parties / contacts Module5000Name=Multi-company Module5000Desc=Allows you to manage multiple companies Module6000Name=Workflow @@ -681,6 +683,10 @@ Permission401=Read discounts Permission402=Create/modify discounts Permission403=Validate discounts Permission404=Delete discounts +Permission510=Read Salaries +Permission512=Create/modify salaries +Permission514=Delete salaries +Permission517=Export salaries Permission531=Read services Permission532=Create/modify services Permission534=Delete services @@ -999,7 +1005,7 @@ ExtraFieldsSupplierOrders=Complementary attributes (orders) ExtraFieldsSupplierInvoices=Complementary attributes (invoices) ExtraFieldsProject=Complementary attributes (projects) ExtraFieldsProjectTask=Complementary attributes (tasks) -ExtraFieldHasWrongValue=Attribut %s has a wrong value. +ExtraFieldHasWrongValue=Attribute %s has a wrong value. AlphaNumOnlyCharsAndNoSpace=only alphanumericals characters without space AlphaNumOnlyLowerCharsAndNoSpace=only alphanumericals and lower case characters without space SendingMailSetup=Setup of sendings by email @@ -1018,13 +1024,13 @@ SuhosinSessionEncrypt=Session storage encrypted by Suhosin ConditionIsCurrently=Condition is currently %s TestNotPossibleWithCurrentBrowsers=Automatic detection not possible YouUseBestDriver=You use driver %s that is best driver available currently. -YouDoNotUseBestDriver=You use drive %s but driver %s is recommanded. +YouDoNotUseBestDriver=You use drive %s but driver %s is recommended. NbOfProductIsLowerThanNoPb=You have only %s products/services into database. This does not required any particular optimization. SearchOptim=Search optimization YouHaveXProductUseSearchOptim=You have %s product into database. You should add the constant PRODUCT_DONOTSEARCH_ANYWHERE to 1 into Home-Setup-Other, you limit the search to the beginning of strings making possible for database to use index and you should get an immediate response. BrowserIsOK=You are using the web browser %s. This browser is ok for security and performance. BrowserIsKO=You are using the web browser %s. This browser is known to be a bad choice for security, performance and reliability. We recommand you to use Firefox, Chrome, Opera or Safari. -XDebugInstalled=XDebug est chargé. +XDebugInstalled=XDebug is loaded. XCacheInstalled=XCache is loaded. AddRefInList=Display customer/supplier ref into list (select list or combobox) and most of hyperlink FieldEdition=Edition of field %s @@ -1073,7 +1079,7 @@ WebCalServer=Server hosting calendar database WebCalDatabaseName=Database name WebCalUser=User to access database WebCalSetupSaved=Webcalendar setup saved successfully. -WebCalTestOk=Connection to server '%s' on database '%s' with user '%s' successfull. +WebCalTestOk=Connection to server '%s' on database '%s' with user '%s' successful. WebCalTestKo1=Connection to server '%s' succeed but database '%s' could not be reached. WebCalTestKo2=Connection to server '%s' with user '%s' failed. WebCalErrorConnectOkButWrongDatabase=Connection succeeded but database doesn't look to be a Webcalendar database. @@ -1119,7 +1125,7 @@ WatermarkOnDraftProposal=Watermark on draft commercial proposals (none if empty) OrdersSetup=Order management setup OrdersNumberingModules=Orders numbering models OrdersModelModule=Order documents models -HideTreadedOrders=Hide the treated or canceled orders in the list +HideTreadedOrders=Hide the treated or cancelled orders in the list ValidOrderAfterPropalClosed=To validate the order after proposal closer, makes it possible not to step by the provisional order FreeLegalTextOnOrders=Free text on orders WatermarkOnDraftOrders=Watermark on draft orders (none if empty) @@ -1214,9 +1220,9 @@ LDAPSynchroKO=Failed synchronization test LDAPSynchroKOMayBePermissions=Failed synchronization test. Check that connexion to server is correctly configured and allows LDAP udpates LDAPTCPConnectOK=TCP connect to LDAP server successful (Server=%s, Port=%s) LDAPTCPConnectKO=TCP connect to LDAP server failed (Server=%s, Port=%s) -LDAPBindOK=Connect/Authentificate to LDAP server sucessfull (Server=%s, Port=%s, Admin=%s, Password=%s) +LDAPBindOK=Connect/Authentificate to LDAP server successful (Server=%s, Port=%s, Admin=%s, Password=%s) LDAPBindKO=Connect/Authentificate to LDAP server failed (Server=%s, Port=%s, Admin=%s, Password=%s) -LDAPUnbindSuccessfull=Disconnect successfull +LDAPUnbindSuccessfull=Disconnect successful LDAPUnbindFailed=Disconnect failed LDAPConnectToDNSuccessfull=Connection to DN (%s) successful LDAPConnectToDNFailed=Connection to DN (%s) failed @@ -1273,7 +1279,7 @@ LDAPFieldSidExample=Example : objectsid LDAPFieldEndLastSubscription=Date of subscription end LDAPFieldTitle=Post/Function LDAPFieldTitleExample=Example: title -LDAPParametersAreStillHardCoded=LDAP parametres are still hardcoded (in contact class) +LDAPParametersAreStillHardCoded=LDAP parameters are still hardcoded (in contact class) LDAPSetupNotComplete=LDAP setup not complete (go on others tabs) LDAPNoUserOrPasswordProvidedAccessIsReadOnly=No administrator or password provided. LDAP access will be anonymous and in read only mode. LDAPDescContact=This page allows you to define LDAP attributes name in LDAP tree for each data found on Dolibarr contacts. @@ -1429,7 +1435,7 @@ OptionVATDefault=Standard OptionVATDebitOption=Option services on Debit OptionVatDefaultDesc=VAT is due:
    - on delivery for goods (we use invoice date)
    - on payments for services OptionVatDebitOptionDesc=VAT is due:
    - on delivery for goods (we use invoice date)
    - on invoice (debit) for services -SummaryOfVatExigibilityUsedByDefault=Time of VAT exigibility by default according to choosed option: +SummaryOfVatExigibilityUsedByDefault=Time of VAT exigibility by default according to chosen option: OnDelivery=On delivery OnPayment=On payment OnInvoice=On invoice @@ -1446,7 +1452,7 @@ AccountancyCodeBuy=Purchase account. code AgendaSetup=Events and agenda module setup PasswordTogetVCalExport=Key to authorize export link PastDelayVCalExport=Do not export event older than -AGENDA_USE_EVENT_TYPE=Use events types (managed into menu Setup -> Dictionnary -> Type of agenda events) +AGENDA_USE_EVENT_TYPE=Use events types (managed into menu Setup -> Dictionary -> Type of agenda events) ##### ClickToDial ##### ClickToDialDesc=This module allows to add an icon after phone numbers. A click on this icon will call a server with a particular URL you define below. This can be used to call a call center system from Dolibarr that can call the phone number on a SIP system for example. ##### Point Of Sales (CashDesk) ##### diff --git a/htdocs/langs/th_TH/contracts.lang b/htdocs/langs/th_TH/contracts.lang index 797b5708e50..e5ad112b222 100644 --- a/htdocs/langs/th_TH/contracts.lang +++ b/htdocs/langs/th_TH/contracts.lang @@ -89,6 +89,8 @@ ListOfServicesToExpireWithDuration=List of Services to expire in %s days ListOfServicesToExpireWithDurationNeg=List of Services expired from more than %s days ListOfServicesToExpire=List of Services to expire NoteListOfYourExpiredServices=This list contains only services of contracts for third parties you are linked to as a sale representative. +StandardContractsTemplate=Standard contracts template +ContactNameAndSignature=For %s, name and signature: ##### Types de contacts ##### TypeContact_contrat_internal_SALESREPSIGN=Sales representative signing contract diff --git a/htdocs/langs/th_TH/exports.lang b/htdocs/langs/th_TH/exports.lang index 2a3ba5d712f..3acad0d32cd 100644 --- a/htdocs/langs/th_TH/exports.lang +++ b/htdocs/langs/th_TH/exports.lang @@ -8,7 +8,7 @@ ImportableDatas=Importable dataset SelectExportDataSet=Choose dataset you want to export... SelectImportDataSet=Choose dataset you want to import... SelectExportFields=Choose fields you want to export, or select a predefined export profile -SelectImportFields=Choose source file fields you want to import and their target field in database by moving them up and down with anchor %s, or select a predefined import profil: +SelectImportFields=Choose source file fields you want to import and their target field in database by moving them up and down with anchor %s, or select a predefined import profile: NotImportedFields=Fields of source file not imported SaveExportModel=Save this export profile if you plan to reuse it later... SaveImportModel=Save this import profile if you plan to reuse it later... @@ -81,7 +81,7 @@ DoNotImportFirstLine=Do not import first line of source file NbOfSourceLines=Number of lines in source file NowClickToTestTheImport=Check import parameters you have defined. If they are correct, click on button "%s" to launch a simulation of import process (no data will be changed in your database, it's only a simulation for the moment)... RunSimulateImportFile=Launch the import simulation -FieldNeedSource=This fiels in database require a data from source file +FieldNeedSource=This field requires data from the source file SomeMandatoryFieldHaveNoSource=Some mandatory fields have no source from data file InformationOnSourceFile=Information on source file InformationOnTargetTables=Information on target fields diff --git a/htdocs/langs/th_TH/holiday.lang b/htdocs/langs/th_TH/holiday.lang index 0c755ca3301..da03299e0da 100644 --- a/htdocs/langs/th_TH/holiday.lang +++ b/htdocs/langs/th_TH/holiday.lang @@ -8,7 +8,6 @@ NotActiveModCP=You must enable the module holidays to view this page. NotConfigModCP=You must configure the module holidays to view this page. To do this, click here . NoCPforUser=You don't have a demand for holidays. AddCP=Apply for holidays -CPErrorSQL=An SQL error occurred: Employe=Employee DateDebCP=Start date DateFinCP=End date diff --git a/htdocs/langs/th_TH/languages.lang b/htdocs/langs/th_TH/languages.lang index b2e6cef7147..c7b6ca5a807 100644 --- a/htdocs/langs/th_TH/languages.lang +++ b/htdocs/langs/th_TH/languages.lang @@ -19,6 +19,7 @@ Language_en_SA=ภาษาอังกฤษ (ซาอุดีอาระเ Language_en_US=ภาษาอังกฤษ (สหรัฐอเมริกา) Language_en_ZA=ภาษาอังกฤษ (แอฟริกาใต้) Language_es_ES=ภาษาสเปน +Language_es_DO=Spanish (Dominican Republic) Language_es_AR=สเปน (อาร์เจนตินา) Language_es_CL=ภาษาสเปน (ชิลี) Language_es_HN=สเปน (ฮอนดูรัส) @@ -38,6 +39,7 @@ Language_fr_NC=ฝรั่งเศส (ใหม่แคลิโดเนี Language_he_IL=ภาษาฮิบ​​รู Language_hr_HR=โครเอเชีย Language_hu_HU=ชาวฮังการี +Language_id_ID=Indonesian Language_is_IS=ไอซ์แลนด์ Language_it_IT=อิตาเลียน Language_ja_JP=ญี่ปุ่น diff --git a/htdocs/langs/th_TH/mails.lang b/htdocs/langs/th_TH/mails.lang index 08ee8a280cb..98e6dc335ee 100644 --- a/htdocs/langs/th_TH/mails.lang +++ b/htdocs/langs/th_TH/mails.lang @@ -79,6 +79,7 @@ MailtoEMail=Hyper link to email ActivateCheckRead=Allow to use the "Unsubcribe" link ActivateCheckReadKey=Key use to encrypt URL use for "Read Receipt" and "Unsubcribe" feature EMailSentToNRecipients=EMail sent to %s recipients. +XTargetsAdded=%s recipients added into target list EachInvoiceWillBeAttachedToEmail=A document using default invoice document template will be created and attached to each email. MailTopicSendRemindUnpaidInvoices=Reminder of invoice %s (%s) SendRemind=Send reminder by EMails diff --git a/htdocs/langs/th_TH/main.lang b/htdocs/langs/th_TH/main.lang index 6c221fd71e1..8aea093267c 100644 --- a/htdocs/langs/th_TH/main.lang +++ b/htdocs/langs/th_TH/main.lang @@ -551,6 +551,7 @@ MailSentBy=Email sent by TextUsedInTheMessageBody=Email body SendAcknowledgementByMail=Send Ack. by email NoEMail=No email +NoMobilePhone=No mobile phone Owner=Owner DetectedVersion=Detected version FollowingConstantsWillBeSubstituted=The following constants will be replaced with the corresponding value. diff --git a/htdocs/langs/th_TH/products.lang b/htdocs/langs/th_TH/products.lang index e56b9cc59c2..37012349b02 100644 --- a/htdocs/langs/th_TH/products.lang +++ b/htdocs/langs/th_TH/products.lang @@ -28,8 +28,10 @@ ProductsAndServicesStatistics=Products and Services statistics ProductsStatistics=Products statistics ProductsOnSell=Available products ProductsNotOnSell=Obsolete products +ProductsOnSellAndOnBuy=Products not for sale nor purchase ServicesOnSell=Available services ServicesNotOnSell=Obsolete services +ServicesOnSellAndOnBuy=Services not for sale nor purchase InternalRef=Internal reference LastRecorded=Last products/services on sell recorded LastRecordedProductsAndServices=Last %s recorded products/services @@ -70,6 +72,8 @@ PublicPrice=Public price CurrentPrice=Current price NewPrice=New price MinPrice=Minim. selling price +MinPriceHT=Minim. selling price (net of tax) +MinPriceTTC=Minim. selling price (inc. tax) CantBeLessThanMinPrice=The selling price can't be lower than minimum allowed for this product (%s without tax). This message can also appears if you type a too important discount. ContractStatus=Contract status ContractStatusClosed=Closed @@ -179,6 +183,7 @@ ProductIsUsed=This product is used NewRefForClone=Ref. of new product/service CustomerPrices=Customers prices SuppliersPrices=Suppliers prices +SuppliersPricesOfProductsOrServices=Suppliers prices (of products or services) CustomCode=Customs code CountryOrigin=Origin country HiddenIntoCombo=Hidden into select lists @@ -208,6 +213,7 @@ CostPmpHT=Net total VWAP ProductUsedForBuild=Auto consumed by production ProductBuilded=Production completed ProductsMultiPrice=Product multi-price +ProductsOrServiceMultiPrice=Customers prices (of products or services, multi-prices) ProductSellByQuarterHT=Products turnover quarterly VWAP ServiceSellByQuarterHT=Services turnover quarterly VWAP Quarter1=1st. Quarter diff --git a/htdocs/langs/th_TH/shop.lang b/htdocs/langs/th_TH/shop.lang index d648f03f350..156af426bb0 100644 --- a/htdocs/langs/th_TH/shop.lang +++ b/htdocs/langs/th_TH/shop.lang @@ -1,4 +1,5 @@ # Dolibarr language file - Source file is en_US - shop +FailedConnectDBCheckModuleSetup=Failed to connect to oscommerce database. Check your module setup Shop=Shop ShopWeb=Web Shop LastOrders=Last orders diff --git a/htdocs/langs/th_TH/stocks.lang b/htdocs/langs/th_TH/stocks.lang index 54ff037d912..710f42d1581 100644 --- a/htdocs/langs/th_TH/stocks.lang +++ b/htdocs/langs/th_TH/stocks.lang @@ -112,6 +112,7 @@ ReplenishmentOrdersDesc=This is list of all opened supplier orders Replenishments=Replenishments NbOfProductBeforePeriod=Quantity of product %s in stock before selected period (< %s) NbOfProductAfterPeriod=Quantity of product %s in stock after selected period (> %s) +MassMovement=Mass movement MassStockMovement=Mass stock movement SelectProductInAndOutWareHouse=Select a product, a quantity, a source warehouse and a target warehouse, then click "%s". Once this is done for all required movements, click onto "%s". RecordMovement=Record transfert diff --git a/htdocs/langs/tr_TR/admin.lang b/htdocs/langs/tr_TR/admin.lang index 509d49b1e39..df9e5735d9f 100644 --- a/htdocs/langs/tr_TR/admin.lang +++ b/htdocs/langs/tr_TR/admin.lang @@ -116,7 +116,7 @@ LanguageBrowserParameter=Parametre %s LocalisationDolibarrParameters=Yerelleştirme parametreleri ClientTZ=İstemci Zaman Dilimi (kullanıcı) ClientHour=İstemci zamanı (kullanıcı) -OSTZ=İşletim Sistemi sunucusu Saat Dilimi +OSTZ=Sunucu OS Zaman Dilimi PHPTZ=PHP Saat Dilimi (sunucu) PHPServerOffsetWithGreenwich=PHP sunucusu Greenwich genişlik sapması (saniye) ClientOffsetWithGreenwich=İstemci/Tarayıcı Greenwich genişlik sapması (saniye) @@ -233,7 +233,9 @@ OfficialWebSiteFr=Fransızca resmi web sitesi OfficialWiki=Wiki'de Dolibarr belgeleri OfficialDemo=Dolibarr çevrimiçi demo OfficialMarketPlace=Dış modüller/eklentiler için resmi Pazar yeri -OfficialWebHostingService=Resmi web barındırma hizmetleri (Bulut barındırma) +OfficialWebHostingService=Referenced web hosting services (Cloud hosting) +ReferencedPreferredPartners=Preferred Partners +OtherResources=Autres ressources ForDocumentationSeeWiki=Kullanıcıların ve geliştiricilerin belgeleri (Doc, FAQs…),
    Dolibarr Wiki ye bir göz atın:
    %s ForAnswersSeeForum=Herhangi bir başka soru/yardım için Dolibarr forumunu kullanabilirsiniz:
    %s HelpCenterDesc1=Bu alan Dolibarr’dan Yardım destek hizmeti almanıza olanak sağlar. @@ -369,9 +371,9 @@ ExtrafieldSelectList = Tablodan seç ExtrafieldSeparator=Ayırıcı ExtrafieldCheckBox=Onay kutusu ExtrafieldRadio=Onay düğmesi -ExtrafieldParamHelpselect=Parametre listesi anahtar gibi olmalı, örneğin değer

    :
    1,değer1
    2,değer2
    3,değer3
    ...

    Başka bir listeye bağlı bir liste elde etmek için :
    1,değer1|parent_list_code:parent_key
    2,değer2|parent_list_code:parent_key -ExtrafieldParamHelpcheckbox=Parametre listesi anahtar gibi olmalı, örneğin değer

    :
    1,değer1
    2,değer2
    3,değer3
    ... -ExtrafieldParamHelpradio=Parametre listesi anahtar gibi olmalı, örneğin değer

    :
    1,değer1
    2,değer2
    3,değer3
    ... +ExtrafieldParamHelpselect=Parameters list have to be like key,value

    for example :
    1,value1
    2,value2
    3,value3
    ...

    In order to have the list depending on another :
    1,value1|parent_list_code:parent_key
    2,value2|parent_list_code:parent_key +ExtrafieldParamHelpcheckbox=Parameters list have to be like key,value

    for example :
    1,value1
    2,value2
    3,value3
    ... +ExtrafieldParamHelpradio=Parameters list have to be like key,value

    for example :
    1,value1
    2,value2
    3,value3
    ... ExtrafieldParamHelpsellist=Parameters list comes from a table
    Syntax : table_name:label_field:id_field::filter
    Example : c_typent:libelle:id::filter

    filter can be a simple test (eg active=1) to display only active value
    if you want to filter on extrafields use syntaxt extra.fieldcode=... (where field code is the code of extrafield)

    In order to have the list depending on another :
    c_typent:libelle:id:parent_list_code|parent_column:filter LibraryToBuildPDF=PDF oluşturmada kullanılan kütüphane WarningUsingFPDF=Warning: Your conf.php contains directive dolibarr_pdf_force_fpdf=1. This means you use the FPDF library to generate PDF files. This library is old and does not support a lot of features (Unicode, image transparency, cyrillic, arab and asiatic languages, ...), so you may experience errors during PDF generation.
    To solve this and have a full support of PDF generation, please download TCPDF library, then comment or remove the line $dolibarr_pdf_force_fpdf=1, and add instead $dolibarr_lib_TCPDF_PATH='path_to_TCPDF_dir' @@ -472,7 +474,7 @@ Module410Desc=WebT akvimi entegrasyonu Module500Name=Özel giderler (vergi, sosyal katkı payları, temettüler) Module500Desc=Vergiler, sosyal katkı payları, temettüler ve maaşlar gibi özel giderlerin yönetimi Module510Name=Ücretler -Module510Desc=Çalışanların ücret ve ödemelerinin yönetimi +Module510Desc=Çalışanların maaş ve ödeme yönetimi Module600Name=Duyurlar Module600Desc=Dolibarr iş etkinleri için üçüncü partilerin ilgililerine eposta ile duyurular gönderin Module700Name=Bağışlar @@ -495,15 +497,15 @@ Module2400Name=Gündem Module2400Desc=Eylemler/görevler ve gündem yönetimi Module2500Name=Elektronik İçerik Yönetimi Module2500Desc=Belgeleri saklayın ve yönetin -Module2600Name= Web Hizmetleri -Module2600Desc= Dolibarr web hizmetleri sunucusunu etkinleştirin -Module2700Name= Gravatar -Module2700Desc= Kullanıcıların/Üyelerin resimlerini (epostalarında bulunan) göstermek için çevrimiçi Gravatar hizmetini kullanın (www.gravatar.com). İnternet erişimi gerektirir. +Module2600Name=Web Hizmetleri +Module2600Desc=Dolibarr web hizmetleri sunucusunu etkinleştirin +Module2700Name=Gravatar +Module2700Desc=Kullanıcıların/Üyelerin resimlerini (epostalarında bulunan) göstermek için çevrimiçi Gravatar hizmetini kullanın (www.gravatar.com). İnternet erişimi gerektirir. Module2800Desc=FTP İstemcisi -Module2900Name= GeoIPMaxmind -Module2900Desc= GeoIP Maxmind dönüştürme becerileri -Module3100Name= Skype -Module3100Desc= Üçüncü parti/kişi/lehdar kartlarına Skype düğmesi ekle +Module2900Name=GeoIPMaxmind +Module2900Desc=GeoIP Maxmind dönüştürme becerileri +Module3100Name=Skype +Module3100Desc=Üçüncü parti/kişi/lehdar kartlarına Skype düğmesi ekle Module5000Name=Çoklu-firma Module5000Desc=Birden çok firmayı yönetmenizi sağlar Module6000Name=İş akışı @@ -681,6 +683,10 @@ Permission401=İndirim oku Permission402=İndirim oluştur/değiştir Permission403=İndirim doğrula Permission404=İndirim sil +Permission510=Read Salaries +Permission512=Create/modify salaries +Permission514=Delete salaries +Permission517=Export salaries Permission531=Hizmet oku Permission532=Hizmet oluştur/değiştir Permission534=Hizmet sil @@ -999,7 +1005,7 @@ ExtraFieldsSupplierOrders=Tamamlayıcı öznitelikler (siparişler) ExtraFieldsSupplierInvoices=Tamamlayıcı öznitelikler (faturalar) ExtraFieldsProject=Tamamlayıcı öznitelikler (projeler) ExtraFieldsProjectTask=Tamamlayıcı öznitelikler (görevler) -ExtraFieldHasWrongValue=Öznitelik %s yanlış bir değerdir. +ExtraFieldHasWrongValue=Öznitelik %s için hatalı değer. AlphaNumOnlyCharsAndNoSpace=boşluk olmadan yalnızca alfasayısal karakterler AlphaNumOnlyLowerCharsAndNoSpace=yalnızca boşluksuz olarak alfasayısal ve küçük harfli karakterler SendingMailSetup=E-posta gönderilerinin kurulumu @@ -1018,13 +1024,13 @@ SuhosinSessionEncrypt=Oturum depolaması Suhosin tarafından şifrelendi ConditionIsCurrently=Koşul şu anda %s durumunda TestNotPossibleWithCurrentBrowsers=\t\nOtomatik algılama olası değil YouUseBestDriver=Kullandığınız sürücü %s şu anda en iyi sürücüdür. -YouDoNotUseBestDriver=%s sürücüsünü kullanıyorsunuz, ancak %s sürücüsü öneriliyor. +YouDoNotUseBestDriver=You use drive %s but driver %s is recommended. NbOfProductIsLowerThanNoPb=Veritabanında yalnızca %s ürün/hizmet var. Bu, herhangi bir optimizasyon gerektirmez. SearchOptim=Optimizasyon ara YouHaveXProductUseSearchOptim=Veritabanında %s ürün var. Giriş-Ayarlar-Diğer den PRODUCT_DONOTSEARCH_ANYWHERE değişmezini 1 olarak eklemelisiniz. Veritabanının dizin kullanmasını sağlamak için aramayı dizelerin başlangıcıyla sınırlandırır ve hemen yanıt alırsınız. BrowserIsOK=%s web tarayıcısını kullanıyorsunuz. Bu tarayıcı güvenlik ve performans için uygundur. BrowserIsKO=%s web tarayıcısını kullanıyorsunuz. Bu tarayıcı güvenlik, performans ve güvenirlik için kötü bir seçimdir. Firefox, Chrome, Opera veya Safari kullanmanızı öneririz. -XDebugInstalled=XDebug yükleniyor. +XDebugInstalled=XDebug is loaded. XCacheInstalled=XDebug yüklüdür. AddRefInList=Listede müşteri/tedarikçi ref (liste ya da combobox seç) ve köprülerin çoğunu göster FieldEdition=%s Alanının düzenlenmesi @@ -1073,7 +1079,7 @@ WebCalServer=Takvim veritabanını barındıran sunucu WebCalDatabaseName=Veritabanı ismi WebCalUser=Veritabanına erişecek kullanıcı WebCalSetupSaved=WebTakvimi kurulumu başarıyla kaydedildi. -WebCalTestOk=%s Sunucusuna %s veritabanında, %s kullanıcısı ile bağlantı başarılı oldu. +WebCalTestOk=Connection to server '%s' on database '%s' with user '%s' successful. WebCalTestKo1=%s Sunucusuna bağlantısı başarıldı ama %s veritabanına ulaşılamadı. WebCalTestKo2=Sunucusu 'Bağlantısı%' user '% s s' başarısız oldu. WebCalErrorConnectOkButWrongDatabase=Bağlantı başarılı ama veritabanı WebTakvimi veritabanı olarak görünmüyor. @@ -1119,7 +1125,7 @@ WatermarkOnDraftProposal=Taslak tekliflerde filigran (boşsa yoktur) OrdersSetup=Sipariş yönetimi kurulumu OrdersNumberingModules=Sipariş numaralandırma modülü OrdersModelModule=Sipariş belgesi modelleri -HideTreadedOrders=İşlem görmüş ya da iptal edilmiş siprişleri listede gizle +HideTreadedOrders=Hide the treated or cancelled orders in the list ValidOrderAfterPropalClosed=Teklifin kapatılmasından sonra siparişi doğrulamak için geçici teklifin izlenmemesini sağlar FreeLegalTextOnOrders=Siparişte serbest metin WatermarkOnDraftOrders=Taslak siparişlerde filigran (boşsa yoktur) @@ -1214,9 +1220,9 @@ LDAPSynchroKO=Başarısız senkronizasyon testi LDAPSynchroKOMayBePermissions=Başarısız senkronizasyon testi. Bu sunucuya bağlantının düzgün yapılandırılmış olduğunu ve LDAP güncellemesi sağladığını kontrol edin LDAPTCPConnectOK=LDAP sunucusu için TCP bağlantı başarılı (Sunucu =%s, Port =%s) LDAPTCPConnectKO=LDAP sunucusuna TCP bağlantısı başarısız (Server =%s başarısız, Port =% s) -LDAPBindOK=LDAP sunucusuna bağlantı/kimlik doğrulama başarılı (Server=%s, Port=%s, Yönetici=%s, Parola=%s) +LDAPBindOK=Connect/Authentificate to LDAP server successful (Server=%s, Port=%s, Admin=%s, Password=%s) LDAPBindKO=LDAP sunucusuna bağlantı/kimlik doğrulama başarısız (Server=%s, Port=%s, Yönetici=%s, Parola=%s -LDAPUnbindSuccessfull=Bağlantı kesme başarılı +LDAPUnbindSuccessfull=Bağlantı keme başarılı LDAPUnbindFailed=Bağlantı kesme başarısız LDAPConnectToDNSuccessfull=Bağlantı au DN (%) ¿½ ussie ri s LDAPConnectToDNFailed=Bağlantı au DN (% s) ï ¿½ chouï ¿½ e @@ -1273,7 +1279,7 @@ LDAPFieldSidExample=Örnek: objectsid LDAPFieldEndLastSubscription=Abonelik tarihi sonu LDAPFieldTitle=Görev/İşlev LDAPFieldTitleExample=Örnek: unvan -LDAPParametersAreStillHardCoded=LDAP parametreleri hala sabit kodludur (iletişim sınıfında) +LDAPParametersAreStillHardCoded=LDAP parameters are still hardcoded (in contact class) LDAPSetupNotComplete=LDAP kurulumu tamamlanmamış (diğer sekmelere git) LDAPNoUserOrPasswordProvidedAccessIsReadOnly=Hiçbir yönetici veya parola verilmiştir. LDAP erişimi anonim ve salt okunur modunda olacaktır. LDAPDescContact=Bu sayfa Dolibarr kişileri üzerinde bulunan her bir veri için LDAP ağacındaki LDAP öznitelikleri adını tanımlamanızı sağlar. @@ -1429,7 +1435,7 @@ OptionVATDefault=Standart OptionVATDebitOption=Borçlar üzerinde hizmet seçeneği OptionVatDefaultDesc=KDV nedeniyle:
    - malların tesliminde ( fatura tarihini kullanırız)
    - hizmet ödemelerinde (borç) OptionVatDebitOptionDesc=KDV nedeniyle:
    - malların tesliminde ( fatura tarihini kullanırız)
    - hizmet faturalarında (borç) -SummaryOfVatExigibilityUsedByDefault=KDV uygunluğu olarak varsayılan olarak seçilen parametreye göre: +SummaryOfVatExigibilityUsedByDefault=Time of VAT exigibility by default according to chosen option: OnDelivery=Teslimatta OnPayment=Ödemede OnInvoice=Faturada @@ -1446,7 +1452,7 @@ AccountancyCodeBuy=Alış hesap. kodu AgendaSetup=Eylem ve gündem modülü kurulumu PasswordTogetVCalExport=Verme bağlantısı yetki anahtarı PastDelayVCalExport=Daha büyük eylemi dışaaktarma -AGENDA_USE_EVENT_TYPE=Etkinlik türlerini kullan (Ayarlar -> Sözlük -> Gündem etkinlik türleri) menüsünden yönetilir +AGENDA_USE_EVENT_TYPE=Use events types (managed into menu Setup -> Dictionary -> Type of agenda events) ##### ClickToDial ##### ClickToDialDesc=Bu modül, telefon numaraları ardına bir simge eklemenizi sağlar. Bu simgeye tıkladığınızda aşağıda tanımladığınız belirli bir URL ile bir sunucuyu arar. Bu Dolibarr’dan bir çağrı merkezi sisteminin aranması için kullanılır, örneğin SIP sistemindeki bir telefon numarası aranır. ##### Point Of Sales (CashDesk) ##### diff --git a/htdocs/langs/tr_TR/contracts.lang b/htdocs/langs/tr_TR/contracts.lang index e2141674839..068824b8b54 100644 --- a/htdocs/langs/tr_TR/contracts.lang +++ b/htdocs/langs/tr_TR/contracts.lang @@ -31,28 +31,28 @@ AddContract=Sözleşme ekle SearchAContract=Bir sözleşme ara DeleteAContract=Bir sözleşme sil CloseAContract=Bir sözleşme kapat -ConfirmDeleteAContract=Bu sözleşme ve bütün hizmetlerinin silmek istediğinizden emin misiniz? -ConfirmValidateContract=Bunu sözleşmeyi doğrulamak istediğinizden emin misiniz? -ConfirmCloseContract=Bu tüm hizmetleri kapatacaktır (etkin ya da değil). Bu sözleşmeyi kapatmak istediğinizden emin misiniz? -ConfirmCloseService=%s Tarihli bu hizmeti kapatmak istediğiniz emin? +ConfirmDeleteAContract=Bu sözleşme ve bütün hizmetlerini silmek istediğinize emin misiniz? +ConfirmValidateContract=%s adındaki sözleşmeyi doğrulamak istediğinize emin misiniz? +ConfirmCloseContract=Bu işlem tüm hizmetleri (etkin ya da değil) kapatacaktır. Bu sözleşmeyi kapatmak istediğinize emin misiniz? +ConfirmCloseService=%s tarihli bu hizmeti kapatmak istediğinize emin misiniz? ValidateAContract=Bir sözleşme doğrula ActivateService=Hizmet etkinleştir -ConfirmActivateService=%s Tarihli bu hizmeti etkinleştirmek istediğiniz eminmisiniz? +ConfirmActivateService=%s tarihli bu hizmeti etkinleştirmek istediğinize emin misiniz? RefContract=Sözleşme referansı DateContract=Sözleşme tarihi DateServiceActivate=Hizmet etkinleştirme tarihi DateServiceUnactivate=Hizmet devre dışı bırakma tarihi -DateServiceStart=Hizmet başlagıç tarihi -DateServiceEnd=Hizmet bitiş tarih -ShowContract=Sözleşme göster +DateServiceStart=Hizmet başlangıç tarihi +DateServiceEnd=Hizmet bitiş tarihi +ShowContract=Sözleşmeye bakın ListOfServices=Hizmet listesi ListOfInactiveServices=Etkin olmayan hizmetler listesi ListOfExpiredServices=Süresi dolmuş etkin hizmetler listesi ListOfClosedServices=Kapalı hizmetler listesi -ListOfRunningContractsLines=Yürülükte olan hizmet kalemleri -ListOfRunningServices=Yürülükteki hizmetler listesi +ListOfRunningContractsLines=Yürürlükte olan hizmet kalemleri +ListOfRunningServices=Yürürlükteki hizmetler listesi NotActivatedServices=Etkin olmayan hizmetler (doğrulanmış sözleşmeler arasından) -BoardNotActivatedServices=Doğrulanmış sözleşmeler arasındaki etkinleştirilecek hizmetler +BoardNotActivatedServices=Doğrulanmış sözleşmelerden etkinleştirilecek hizmetler LastContracts=Değiştirilen son %s sözleşme LastActivatedServices=Etkinleştirilen son %s hizmet LastModifiedServices=Değiştirilen son %s hizmet @@ -60,7 +60,7 @@ EditServiceLine=Hizmet kalemi düzenle ContractStartDate=Başlama tarihi ContractEndDate=Bitiş tarihi DateStartPlanned=Planlanan başlama tarihi -DateStartPlannedShort=Planlanan başlamatarihi +DateStartPlannedShort=Planlanan başlama tarihi DateEndPlanned=Planlanan bitiş tarihi DateEndPlannedShort=Planlanan bitiş tarihi DateStartReal=Gerçek başlama tarihi @@ -72,28 +72,30 @@ CloseService=Hizmet kapat ServicesNomberShort=%s hizmet RunningServices=Yürürlükteki hizmetler BoardRunningServices=Süresi dolmuş yürürlükteki hizmetler -ServiceStatus=Hizmet Durumu +ServiceStatus=Hizmet durumu DraftContracts=Taslak sözleşmeler CloseRefusedBecauseOneServiceActive=En az bir açık hizmeti olduğundan dolayı sözleşme kapatılamıyor CloseAllContracts=Bütün sözleşme kalemlerini kapat DeleteContractLine=Bir sözleşme kalemi sil -ConfirmDeleteContractLine=Bu sözleşme kalemini silmek istediğinizden emin misiniz? +ConfirmDeleteContractLine=Bu sözleşme kalemini silmek istediğinize emin misiniz? MoveToAnotherContract=Hizmeti başka bir sözleşmeye taşıyın. -ConfirmMoveToAnotherContract=Yeni hedefi seçtim ve bu hizmeti bu sözleşmeye taşımayı onaylıyorum. +ConfirmMoveToAnotherContract=Yeni hedefi seçtim ve bu hizmetin bu sözleşmeye taşınmasını onaylıyorum. ConfirmMoveToAnotherContractQuestion=Bu hizmeti taşımak istediğiniz varolan sözleşmeyi seçin (aynı üçüncü partinin)? PaymentRenewContractId=Sözleşme satırını yenile (sayı %s) ExpiredSince=Süre bitiş tarihi RelatedContracts=İlgili sözleşmeler NoExpiredServices=Süresi dolmamış etkin hizmetler ListOfServicesToExpireWithDuration=%s günde süresi dolacak Hizmetler Listesi -ListOfServicesToExpireWithDurationNeg=%s günden fazla günde süresi dolacak Hizmetler Listesi -ListOfServicesToExpire=Süresi dolacak hizmetler listesi -NoteListOfYourExpiredServices=Bu liste yalnızca satış temsilcisi olarak bağlı olduğunuz üçüncü partilere ait hizmet sözleşmelerini içerir. +ListOfServicesToExpireWithDurationNeg=%s günden fazla zamanda süresi dolacak Hizmetler Listesi +ListOfServicesToExpire=Süresi dolacak Hizmetler Listesi +NoteListOfYourExpiredServices=Bu listede yalnızca satış temsilcisi olarak atandığınız üçüncü partilere ait hizmet sözleşmeleri bulunur. +StandardContractsTemplate=Standart sözleşme kalıbı +ContactNameAndSignature=%s için, ad ve imza ##### Types de contacts ##### -TypeContact_contrat_internal_SALESREPSIGN=Sözleşme imzalalayacak satış temsilcisi +TypeContact_contrat_internal_SALESREPSIGN=Sözleşmeyi imzalalayacak satış temsilcisi TypeContact_contrat_internal_SALESREPFOLL=Sözleşmeyi izleyecek satış temsilcisi TypeContact_contrat_external_BILLING=Müşteri fatura ilgilisi TypeContact_contrat_external_CUSTOMER=Müşteri izleme ilgilisi -TypeContact_contrat_external_SALESREPSIGN=Sözleşme imzalayacak müşteri ilgilisi +TypeContact_contrat_external_SALESREPSIGN=Sözleşmeyi imzalayacak müşteri ilgilisi Error_CONTRACT_ADDON_NotDefined=CONTRACT_ADDON değişmezi tanımlanmamış diff --git a/htdocs/langs/tr_TR/exports.lang b/htdocs/langs/tr_TR/exports.lang index 5d273489a3d..7e8630d9252 100644 --- a/htdocs/langs/tr_TR/exports.lang +++ b/htdocs/langs/tr_TR/exports.lang @@ -8,7 +8,7 @@ ImportableDatas=Alınabilir veri kümesi SelectExportDataSet=Vermek istediğiniz veri kümesini seçin... SelectImportDataSet=Almak istediğiniz veri kümesini seçin... SelectExportFields=Vermek istediğiniz dosyaları ya da önceden tanımlanmış bir verme profilini seçin -SelectImportFields=Almak istediğiniz kaynak dosyayı ve hedef alanlarını veritabanında aşağı yukarı taşıyarak %s çapası ile seçin ya da önceden tanımlanmış bir alma profili seçin: +SelectImportFields=Choose source file fields you want to import and their target field in database by moving them up and down with anchor %s, or select a predefined import profile: NotImportedFields=Kaynak dosyadaki alanlar alınmadı SaveExportModel=Yeniden kullanmak için bu verme profilini kaydedebilirsiniz... SaveImportModel=Yeniden kullanmak için bu alma profilini kaydedebilirsiniz... @@ -81,7 +81,7 @@ DoNotImportFirstLine=Kaynak dosyasının ilk satırı alınmasın NbOfSourceLines=Kaynak dosyadaki satır sayısı NowClickToTestTheImport=Seçtiğiniz alma ayarlarını denetleyin. Doğru görünüyorsa, alma provasını başlatmak için "%s" düğmesine tıklayın (veritabanınızda hiçbir veri değiştirilmeden işlemin provası yapılır)… RunSimulateImportFile=Alma provasını başlatın -FieldNeedSource=Veritabanındaki bu alanlar için kaynak dosyada veri bulunmalıdır +FieldNeedSource=This field requires data from the source file SomeMandatoryFieldHaveNoSource=Veri dosyasında, bazı zorunlu alanların kaynağı yok InformationOnSourceFile=Kaynak dosya bilgileri InformationOnTargetTables=Hedef alan bilgileri diff --git a/htdocs/langs/tr_TR/holiday.lang b/htdocs/langs/tr_TR/holiday.lang index da2121a7813..38944b4b5e0 100644 --- a/htdocs/langs/tr_TR/holiday.lang +++ b/htdocs/langs/tr_TR/holiday.lang @@ -8,7 +8,6 @@ NotActiveModCP=Bu sayfayı görmek için tatiller modülünü etkinleştirmelisi NotConfigModCP=Bu sayfayı görmek için tatiller modülünü etkinleştirmelisiniz. Bunu yapmak için, buraya tıklayın . NoCPforUser=Bir tatil isteğiniz yok. AddCP=Tatil için başvur -CPErrorSQL=Bir SQL hatası oluştu: Employe=Çalışan DateDebCP=Başlama tarihi DateFinCP=Bitiş tarihi diff --git a/htdocs/langs/tr_TR/install.lang b/htdocs/langs/tr_TR/install.lang index 76909daf8f2..36330eae61b 100644 --- a/htdocs/langs/tr_TR/install.lang +++ b/htdocs/langs/tr_TR/install.lang @@ -207,5 +207,5 @@ MigrationActioncommElement=Eylemlere ilişkin veri güncellemesi MigrationPaymentMode=Ödeme biçimi için veri taşıma MigrationCategorieAssociation=Kategorilerin taşınması -ShowNotAvailableOptions=Show not available options -HideNotAvailableOptions=Hide not available options +ShowNotAvailableOptions=Kullanılamayacak seçenekler görüntülensin +HideNotAvailableOptions=Kullanılamayacak seçenekler gizlensin diff --git a/htdocs/langs/tr_TR/languages.lang b/htdocs/langs/tr_TR/languages.lang index 62b6aa9a53d..00d0d24fc8a 100644 --- a/htdocs/langs/tr_TR/languages.lang +++ b/htdocs/langs/tr_TR/languages.lang @@ -19,6 +19,7 @@ Language_en_SA=İngilizce (Suudi Arabistan) Language_en_US=İngilizce (ABD) Language_en_ZA=İngilizce (Güney Afrika) Language_es_ES=İspanyolca +Language_es_DO=Spanish (Dominican Republic) Language_es_AR=İspanyolca (Arjantin) Language_es_CL=İspanyolca (Şilil) Language_es_HN=İspanyolca (Honduras) @@ -38,6 +39,7 @@ Language_fr_NC=Fransızca (Yeni Kaledonya) Language_he_IL=İbranice Language_hr_HR=Hırvatça Language_hu_HU=Macarca +Language_id_ID=Indonesian Language_is_IS=İzlandaca Language_it_IT=İtalyanca Language_ja_JP=Japonca diff --git a/htdocs/langs/tr_TR/mails.lang b/htdocs/langs/tr_TR/mails.lang index adb5216784c..0d1c70ce236 100644 --- a/htdocs/langs/tr_TR/mails.lang +++ b/htdocs/langs/tr_TR/mails.lang @@ -79,6 +79,7 @@ MailtoEMail=Eposta hiper bağlantısı ActivateCheckRead="Alıcı oku" izleyicisini ve "Aboneliği kaldır" linkinin kullanılmasına izin ver ActivateCheckReadKey=Key use to encrypt URL use for "Read Receipt" and "Unsubcribe" feature EMailSentToNRecipients=EMail sent to %s recipients. +XTargetsAdded=%s recipients added into target list EachInvoiceWillBeAttachedToEmail=Varsayılan fatura belgesi şablonu kullanan bir belge oluşturulacak ve her epostaya eklenecektir. MailTopicSendRemindUnpaidInvoices=%s (%s) faturası için anımsatma SendRemind=Anımsatmayı Eposta ile gönder diff --git a/htdocs/langs/tr_TR/main.lang b/htdocs/langs/tr_TR/main.lang index 3cf990501dc..6026f13003f 100644 --- a/htdocs/langs/tr_TR/main.lang +++ b/htdocs/langs/tr_TR/main.lang @@ -551,6 +551,7 @@ MailSentBy=E-posta ile gönderildi TextUsedInTheMessageBody=Mesaj gövdesinde yazı kullanıldı. SendAcknowledgementByMail=Alındı bilgisini e-posta ile gönder. NoEMail=E-posta yok +NoMobilePhone=No mobile phone Owner=Sahibi DetectedVersion=Belirlenen sürüm FollowingConstantsWillBeSubstituted=Aşağıdaki değişmezler uygun değerlerin yerine konacaktır. diff --git a/htdocs/langs/tr_TR/products.lang b/htdocs/langs/tr_TR/products.lang index 18a06970dff..1f9fa56e647 100644 --- a/htdocs/langs/tr_TR/products.lang +++ b/htdocs/langs/tr_TR/products.lang @@ -28,8 +28,10 @@ ProductsAndServicesStatistics=Ürün ve Hizme istatistikleri ProductsStatistics=Ürün istatistikleri ProductsOnSell=Varolan ürünler ProductsNotOnSell=Eskimiş ürünler +ProductsOnSellAndOnBuy=Products not for sale nor purchase ServicesOnSell=Varolan hizmetler ServicesNotOnSell=Eskimiş hizmetler +ServicesOnSellAndOnBuy=Services not for sale nor purchase InternalRef=İç referans LastRecorded=Satışta kaydedilen son ürünler/hizmetler LastRecordedProductsAndServices=Son kaydedilen %s ürünler/hizmetler @@ -70,6 +72,8 @@ PublicPrice=Perakende fiyatı CurrentPrice=Güncel fiyat NewPrice=Yeni fiyat MinPrice=Enaz satış fiyatı +MinPriceHT=Minim. selling price (net of tax) +MinPriceTTC=Minim. selling price (inc. tax) CantBeLessThanMinPrice=Satış fiyatı bu ürün için izin verilenden enaz fiyattan düşük olamaz (%s vergi hariç). Bu mesaj, çok fazla indirim yazarsanız da belirir. ContractStatus=Sözleşme durumu ContractStatusClosed=Kapalı @@ -179,6 +183,7 @@ ProductIsUsed=Bu ürün kullanılır. NewRefForClone=Yeni ürün/hizmet ref. CustomerPrices=Müşteri fiyatları SuppliersPrices=Tedarikçi Fiyatları +SuppliersPricesOfProductsOrServices=Suppliers prices (of products or services) CustomCode=Özel kod CountryOrigin=Menşei ülke HiddenIntoCombo=Seçme listeleri içine gizle @@ -208,6 +213,7 @@ CostPmpHT=Net toplam HAOF ProductUsedForBuild=Üretim tarafından kendiliğinden tüketilir ProductBuilded=Üretim tamamlandı ProductsMultiPrice=Ürün çoklu fiyatı +ProductsOrServiceMultiPrice=Customers prices (of products or services, multi-prices) ProductSellByQuarterHT=Ürün üç aylık cirosu HAOF ServiceSellByQuarterHT=Hizmet üç aylık cirosu HAOF Quarter1=1. Çeyrek diff --git a/htdocs/langs/tr_TR/shop.lang b/htdocs/langs/tr_TR/shop.lang index 2fccf450e4e..0c59a300dce 100644 --- a/htdocs/langs/tr_TR/shop.lang +++ b/htdocs/langs/tr_TR/shop.lang @@ -1,4 +1,5 @@ # Dolibarr language file - Source file is en_US - shop +FailedConnectDBCheckModuleSetup=Failed to connect to oscommerce database. Check your module setup Shop=Mağaza ShopWeb=Web Mağazası LastOrders=Son siparişler diff --git a/htdocs/langs/tr_TR/stocks.lang b/htdocs/langs/tr_TR/stocks.lang index 19977871718..7f9320bad5d 100644 --- a/htdocs/langs/tr_TR/stocks.lang +++ b/htdocs/langs/tr_TR/stocks.lang @@ -112,6 +112,7 @@ ReplenishmentOrdersDesc=Bu liste tüm açık tedarikçi siparişlerinindir Replenishments=İkmal NbOfProductBeforePeriod=Stoktaki %s ürününün, seçilen dönemden (<%s) önceki miktarıdır NbOfProductAfterPeriod=Stoktaki %s ürününün, seçilen dönemden (<%s) sonraki miktarıdır +MassMovement=Mass movement MassStockMovement=Toplu stok hareketi SelectProductInAndOutWareHouse=Bir ürün, bir miktar, bir kaynak depo ve bir hedef depo seçin, sonra "%s" e tıklayın. Bütün gerekli hareketler için bu işlem yapıldığında "%s" e tıklayın. RecordMovement=Kayıt aktarımı diff --git a/htdocs/langs/uk_UA/admin.lang b/htdocs/langs/uk_UA/admin.lang index eb85572a4b3..d784d75b43c 100644 --- a/htdocs/langs/uk_UA/admin.lang +++ b/htdocs/langs/uk_UA/admin.lang @@ -116,7 +116,7 @@ LanguageBrowserParameter=Parameter %s LocalisationDolibarrParameters=Localisation parameters ClientTZ=Client Time Zone (user) ClientHour=Client time (user) -OSTZ=Servre OS Time Zone +OSTZ=Server OS Time Zone PHPTZ=PHP server Time Zone PHPServerOffsetWithGreenwich=PHP server offset width Greenwich (seconds) ClientOffsetWithGreenwich=Client/Browser offset width Greenwich (seconds) @@ -233,7 +233,9 @@ OfficialWebSiteFr=French official web site OfficialWiki=Dolibarr documentation on Wiki OfficialDemo=Dolibarr online demo OfficialMarketPlace=Official market place for external modules/addons -OfficialWebHostingService=Official web hosting services (Cloud hosting) +OfficialWebHostingService=Referenced web hosting services (Cloud hosting) +ReferencedPreferredPartners=Preferred Partners +OtherResources=Autres ressources ForDocumentationSeeWiki=For user or developer documentation (Doc, FAQs...),
    take a look at the Dolibarr Wiki:
    %s ForAnswersSeeForum=For any other questions/help, you can use the Dolibarr forum:
    %s HelpCenterDesc1=This area can help you to get a Help support service on Dolibarr. @@ -369,9 +371,9 @@ ExtrafieldSelectList = Select from table ExtrafieldSeparator=Separator ExtrafieldCheckBox=Checkbox ExtrafieldRadio=Radio button -ExtrafieldParamHelpselect=Parameters list have to be like key,value

    for exemple :
    1,value1
    2,value2
    3,value3
    ...

    In order to have the list depending on another :
    1,value1|parent_list_code:parent_key
    2,value2|parent_list_code:parent_key -ExtrafieldParamHelpcheckbox=Parameters list have to be like key,value

    for exemple :
    1,value1
    2,value2
    3,value3
    ... -ExtrafieldParamHelpradio=Parameters list have to be like key,value

    for exemple :
    1,value1
    2,value2
    3,value3
    ... +ExtrafieldParamHelpselect=Parameters list have to be like key,value

    for example :
    1,value1
    2,value2
    3,value3
    ...

    In order to have the list depending on another :
    1,value1|parent_list_code:parent_key
    2,value2|parent_list_code:parent_key +ExtrafieldParamHelpcheckbox=Parameters list have to be like key,value

    for example :
    1,value1
    2,value2
    3,value3
    ... +ExtrafieldParamHelpradio=Parameters list have to be like key,value

    for example :
    1,value1
    2,value2
    3,value3
    ... ExtrafieldParamHelpsellist=Parameters list comes from a table
    Syntax : table_name:label_field:id_field::filter
    Example : c_typent:libelle:id::filter

    filter can be a simple test (eg active=1) to display only active value
    if you want to filter on extrafields use syntaxt extra.fieldcode=... (where field code is the code of extrafield)

    In order to have the list depending on another :
    c_typent:libelle:id:parent_list_code|parent_column:filter LibraryToBuildPDF=Library used to build PDF WarningUsingFPDF=Warning: Your conf.php contains directive dolibarr_pdf_force_fpdf=1. This means you use the FPDF library to generate PDF files. This library is old and does not support a lot of features (Unicode, image transparency, cyrillic, arab and asiatic languages, ...), so you may experience errors during PDF generation.
    To solve this and have a full support of PDF generation, please download TCPDF library, then comment or remove the line $dolibarr_pdf_force_fpdf=1, and add instead $dolibarr_lib_TCPDF_PATH='path_to_TCPDF_dir' @@ -472,7 +474,7 @@ Module410Desc=Webcalendar integration Module500Name=Special expenses (tax, social contributions, dividends) Module500Desc=Management of special expenses like taxes, social contribution, dividends and salaries Module510Name=Salaries -Module510Desc=Management of empoyees salaries and payments +Module510Desc=Management of employees salaries and payments Module600Name=Notifications Module600Desc=Send notifications by email on some Dolibarr business events to third party contacts Module700Name=Donations @@ -495,15 +497,15 @@ Module2400Name=Agenda Module2400Desc=Events/tasks and agenda management Module2500Name=Electronic Content Management Module2500Desc=Save and share documents -Module2600Name= WebServices -Module2600Desc= Enable the Dolibarr web services server -Module2700Name= Gravatar -Module2700Desc= Use online Gravatar service (www.gravatar.com) to show photo of users/members (found with their emails). Need an internet access +Module2600Name=WebServices +Module2600Desc=Enable the Dolibarr web services server +Module2700Name=Gravatar +Module2700Desc=Use online Gravatar service (www.gravatar.com) to show photo of users/members (found with their emails). Need an internet access Module2800Desc=FTP Client -Module2900Name= GeoIPMaxmind -Module2900Desc= GeoIP Maxmind conversions capabilities -Module3100Name= Skype -Module3100Desc= Add a Skype button into card of adherents / third parties / contacts +Module2900Name=GeoIPMaxmind +Module2900Desc=GeoIP Maxmind conversions capabilities +Module3100Name=Skype +Module3100Desc=Add a Skype button into card of adherents / third parties / contacts Module5000Name=Multi-company Module5000Desc=Allows you to manage multiple companies Module6000Name=Workflow @@ -681,6 +683,10 @@ Permission401=Read discounts Permission402=Create/modify discounts Permission403=Validate discounts Permission404=Delete discounts +Permission510=Read Salaries +Permission512=Create/modify salaries +Permission514=Delete salaries +Permission517=Export salaries Permission531=Read services Permission532=Create/modify services Permission534=Delete services @@ -999,7 +1005,7 @@ ExtraFieldsSupplierOrders=Complementary attributes (orders) ExtraFieldsSupplierInvoices=Complementary attributes (invoices) ExtraFieldsProject=Complementary attributes (projects) ExtraFieldsProjectTask=Complementary attributes (tasks) -ExtraFieldHasWrongValue=Attribut %s has a wrong value. +ExtraFieldHasWrongValue=Attribute %s has a wrong value. AlphaNumOnlyCharsAndNoSpace=only alphanumericals characters without space AlphaNumOnlyLowerCharsAndNoSpace=only alphanumericals and lower case characters without space SendingMailSetup=Setup of sendings by email @@ -1018,13 +1024,13 @@ SuhosinSessionEncrypt=Session storage encrypted by Suhosin ConditionIsCurrently=Condition is currently %s TestNotPossibleWithCurrentBrowsers=Automatic detection not possible YouUseBestDriver=You use driver %s that is best driver available currently. -YouDoNotUseBestDriver=You use drive %s but driver %s is recommanded. +YouDoNotUseBestDriver=You use drive %s but driver %s is recommended. NbOfProductIsLowerThanNoPb=You have only %s products/services into database. This does not required any particular optimization. SearchOptim=Search optimization YouHaveXProductUseSearchOptim=You have %s product into database. You should add the constant PRODUCT_DONOTSEARCH_ANYWHERE to 1 into Home-Setup-Other, you limit the search to the beginning of strings making possible for database to use index and you should get an immediate response. BrowserIsOK=You are using the web browser %s. This browser is ok for security and performance. BrowserIsKO=You are using the web browser %s. This browser is known to be a bad choice for security, performance and reliability. We recommand you to use Firefox, Chrome, Opera or Safari. -XDebugInstalled=XDebug est chargé. +XDebugInstalled=XDebug is loaded. XCacheInstalled=XCache is loaded. AddRefInList=Display customer/supplier ref into list (select list or combobox) and most of hyperlink FieldEdition=Edition of field %s @@ -1073,7 +1079,7 @@ WebCalServer=Server hosting calendar database WebCalDatabaseName=Database name WebCalUser=User to access database WebCalSetupSaved=Webcalendar setup saved successfully. -WebCalTestOk=Connection to server '%s' on database '%s' with user '%s' successfull. +WebCalTestOk=Connection to server '%s' on database '%s' with user '%s' successful. WebCalTestKo1=Connection to server '%s' succeed but database '%s' could not be reached. WebCalTestKo2=Connection to server '%s' with user '%s' failed. WebCalErrorConnectOkButWrongDatabase=Connection succeeded but database doesn't look to be a Webcalendar database. @@ -1119,7 +1125,7 @@ WatermarkOnDraftProposal=Watermark on draft commercial proposals (none if empty) OrdersSetup=Order management setup OrdersNumberingModules=Orders numbering models OrdersModelModule=Order documents models -HideTreadedOrders=Hide the treated or canceled orders in the list +HideTreadedOrders=Hide the treated or cancelled orders in the list ValidOrderAfterPropalClosed=To validate the order after proposal closer, makes it possible not to step by the provisional order FreeLegalTextOnOrders=Free text on orders WatermarkOnDraftOrders=Watermark on draft orders (none if empty) @@ -1214,9 +1220,9 @@ LDAPSynchroKO=Failed synchronization test LDAPSynchroKOMayBePermissions=Failed synchronization test. Check that connexion to server is correctly configured and allows LDAP udpates LDAPTCPConnectOK=TCP connect to LDAP server successful (Server=%s, Port=%s) LDAPTCPConnectKO=TCP connect to LDAP server failed (Server=%s, Port=%s) -LDAPBindOK=Connect/Authentificate to LDAP server sucessfull (Server=%s, Port=%s, Admin=%s, Password=%s) +LDAPBindOK=Connect/Authentificate to LDAP server successful (Server=%s, Port=%s, Admin=%s, Password=%s) LDAPBindKO=Connect/Authentificate to LDAP server failed (Server=%s, Port=%s, Admin=%s, Password=%s) -LDAPUnbindSuccessfull=Disconnect successfull +LDAPUnbindSuccessfull=Disconnect successful LDAPUnbindFailed=Disconnect failed LDAPConnectToDNSuccessfull=Connection to DN (%s) successful LDAPConnectToDNFailed=Connection to DN (%s) failed @@ -1273,7 +1279,7 @@ LDAPFieldSidExample=Example : objectsid LDAPFieldEndLastSubscription=Date of subscription end LDAPFieldTitle=Post/Function LDAPFieldTitleExample=Example: title -LDAPParametersAreStillHardCoded=LDAP parametres are still hardcoded (in contact class) +LDAPParametersAreStillHardCoded=LDAP parameters are still hardcoded (in contact class) LDAPSetupNotComplete=LDAP setup not complete (go on others tabs) LDAPNoUserOrPasswordProvidedAccessIsReadOnly=No administrator or password provided. LDAP access will be anonymous and in read only mode. LDAPDescContact=This page allows you to define LDAP attributes name in LDAP tree for each data found on Dolibarr contacts. @@ -1429,7 +1435,7 @@ OptionVATDefault=Standard OptionVATDebitOption=Option services on Debit OptionVatDefaultDesc=VAT is due:
    - on delivery for goods (we use invoice date)
    - on payments for services OptionVatDebitOptionDesc=VAT is due:
    - on delivery for goods (we use invoice date)
    - on invoice (debit) for services -SummaryOfVatExigibilityUsedByDefault=Time of VAT exigibility by default according to choosed option: +SummaryOfVatExigibilityUsedByDefault=Time of VAT exigibility by default according to chosen option: OnDelivery=On delivery OnPayment=On payment OnInvoice=On invoice @@ -1446,7 +1452,7 @@ AccountancyCodeBuy=Purchase account. code AgendaSetup=Events and agenda module setup PasswordTogetVCalExport=Key to authorize export link PastDelayVCalExport=Do not export event older than -AGENDA_USE_EVENT_TYPE=Use events types (managed into menu Setup -> Dictionnary -> Type of agenda events) +AGENDA_USE_EVENT_TYPE=Use events types (managed into menu Setup -> Dictionary -> Type of agenda events) ##### ClickToDial ##### ClickToDialDesc=This module allows to add an icon after phone numbers. A click on this icon will call a server with a particular URL you define below. This can be used to call a call center system from Dolibarr that can call the phone number on a SIP system for example. ##### Point Of Sales (CashDesk) ##### diff --git a/htdocs/langs/uk_UA/contracts.lang b/htdocs/langs/uk_UA/contracts.lang index 797b5708e50..e5ad112b222 100644 --- a/htdocs/langs/uk_UA/contracts.lang +++ b/htdocs/langs/uk_UA/contracts.lang @@ -89,6 +89,8 @@ ListOfServicesToExpireWithDuration=List of Services to expire in %s days ListOfServicesToExpireWithDurationNeg=List of Services expired from more than %s days ListOfServicesToExpire=List of Services to expire NoteListOfYourExpiredServices=This list contains only services of contracts for third parties you are linked to as a sale representative. +StandardContractsTemplate=Standard contracts template +ContactNameAndSignature=For %s, name and signature: ##### Types de contacts ##### TypeContact_contrat_internal_SALESREPSIGN=Sales representative signing contract diff --git a/htdocs/langs/uk_UA/exports.lang b/htdocs/langs/uk_UA/exports.lang index 2a3ba5d712f..3acad0d32cd 100644 --- a/htdocs/langs/uk_UA/exports.lang +++ b/htdocs/langs/uk_UA/exports.lang @@ -8,7 +8,7 @@ ImportableDatas=Importable dataset SelectExportDataSet=Choose dataset you want to export... SelectImportDataSet=Choose dataset you want to import... SelectExportFields=Choose fields you want to export, or select a predefined export profile -SelectImportFields=Choose source file fields you want to import and their target field in database by moving them up and down with anchor %s, or select a predefined import profil: +SelectImportFields=Choose source file fields you want to import and their target field in database by moving them up and down with anchor %s, or select a predefined import profile: NotImportedFields=Fields of source file not imported SaveExportModel=Save this export profile if you plan to reuse it later... SaveImportModel=Save this import profile if you plan to reuse it later... @@ -81,7 +81,7 @@ DoNotImportFirstLine=Do not import first line of source file NbOfSourceLines=Number of lines in source file NowClickToTestTheImport=Check import parameters you have defined. If they are correct, click on button "%s" to launch a simulation of import process (no data will be changed in your database, it's only a simulation for the moment)... RunSimulateImportFile=Launch the import simulation -FieldNeedSource=This fiels in database require a data from source file +FieldNeedSource=This field requires data from the source file SomeMandatoryFieldHaveNoSource=Some mandatory fields have no source from data file InformationOnSourceFile=Information on source file InformationOnTargetTables=Information on target fields diff --git a/htdocs/langs/uk_UA/holiday.lang b/htdocs/langs/uk_UA/holiday.lang index 0c755ca3301..da03299e0da 100644 --- a/htdocs/langs/uk_UA/holiday.lang +++ b/htdocs/langs/uk_UA/holiday.lang @@ -8,7 +8,6 @@ NotActiveModCP=You must enable the module holidays to view this page. NotConfigModCP=You must configure the module holidays to view this page. To do this, click here . NoCPforUser=You don't have a demand for holidays. AddCP=Apply for holidays -CPErrorSQL=An SQL error occurred: Employe=Employee DateDebCP=Start date DateFinCP=End date diff --git a/htdocs/langs/uk_UA/languages.lang b/htdocs/langs/uk_UA/languages.lang index 08398a75311..cc195e6ac21 100644 --- a/htdocs/langs/uk_UA/languages.lang +++ b/htdocs/langs/uk_UA/languages.lang @@ -19,6 +19,7 @@ Language_en_SA=Англійська (Саудівська Аравія) Language_en_US=Англійська (США) Language_en_ZA=Англійська (Південна Африка) Language_es_ES=Іспанська +Language_es_DO=Spanish (Dominican Republic) Language_es_AR=Іспанська (Аргентина) Language_es_CL=Spanish (Chile) Language_es_HN=Іспанська (Гондурас) @@ -38,6 +39,7 @@ Language_fr_NC=Французька (Нова Каледонія) Language_he_IL=Іврит Language_hr_HR=Хорватська Language_hu_HU=Угорська +Language_id_ID=Indonesian Language_is_IS=Ісландський Language_it_IT=Італійський Language_ja_JP=Японський diff --git a/htdocs/langs/uk_UA/mails.lang b/htdocs/langs/uk_UA/mails.lang index 08ee8a280cb..98e6dc335ee 100644 --- a/htdocs/langs/uk_UA/mails.lang +++ b/htdocs/langs/uk_UA/mails.lang @@ -79,6 +79,7 @@ MailtoEMail=Hyper link to email ActivateCheckRead=Allow to use the "Unsubcribe" link ActivateCheckReadKey=Key use to encrypt URL use for "Read Receipt" and "Unsubcribe" feature EMailSentToNRecipients=EMail sent to %s recipients. +XTargetsAdded=%s recipients added into target list EachInvoiceWillBeAttachedToEmail=A document using default invoice document template will be created and attached to each email. MailTopicSendRemindUnpaidInvoices=Reminder of invoice %s (%s) SendRemind=Send reminder by EMails diff --git a/htdocs/langs/uk_UA/main.lang b/htdocs/langs/uk_UA/main.lang index 7377b271809..9d2fbeca26c 100644 --- a/htdocs/langs/uk_UA/main.lang +++ b/htdocs/langs/uk_UA/main.lang @@ -551,6 +551,7 @@ MailSentBy=Email sent by TextUsedInTheMessageBody=Email body SendAcknowledgementByMail=Send Ack. by email NoEMail=No email +NoMobilePhone=No mobile phone Owner=Owner DetectedVersion=Detected version FollowingConstantsWillBeSubstituted=The following constants will be replaced with the corresponding value. diff --git a/htdocs/langs/uk_UA/products.lang b/htdocs/langs/uk_UA/products.lang index e56b9cc59c2..37012349b02 100644 --- a/htdocs/langs/uk_UA/products.lang +++ b/htdocs/langs/uk_UA/products.lang @@ -28,8 +28,10 @@ ProductsAndServicesStatistics=Products and Services statistics ProductsStatistics=Products statistics ProductsOnSell=Available products ProductsNotOnSell=Obsolete products +ProductsOnSellAndOnBuy=Products not for sale nor purchase ServicesOnSell=Available services ServicesNotOnSell=Obsolete services +ServicesOnSellAndOnBuy=Services not for sale nor purchase InternalRef=Internal reference LastRecorded=Last products/services on sell recorded LastRecordedProductsAndServices=Last %s recorded products/services @@ -70,6 +72,8 @@ PublicPrice=Public price CurrentPrice=Current price NewPrice=New price MinPrice=Minim. selling price +MinPriceHT=Minim. selling price (net of tax) +MinPriceTTC=Minim. selling price (inc. tax) CantBeLessThanMinPrice=The selling price can't be lower than minimum allowed for this product (%s without tax). This message can also appears if you type a too important discount. ContractStatus=Contract status ContractStatusClosed=Closed @@ -179,6 +183,7 @@ ProductIsUsed=This product is used NewRefForClone=Ref. of new product/service CustomerPrices=Customers prices SuppliersPrices=Suppliers prices +SuppliersPricesOfProductsOrServices=Suppliers prices (of products or services) CustomCode=Customs code CountryOrigin=Origin country HiddenIntoCombo=Hidden into select lists @@ -208,6 +213,7 @@ CostPmpHT=Net total VWAP ProductUsedForBuild=Auto consumed by production ProductBuilded=Production completed ProductsMultiPrice=Product multi-price +ProductsOrServiceMultiPrice=Customers prices (of products or services, multi-prices) ProductSellByQuarterHT=Products turnover quarterly VWAP ServiceSellByQuarterHT=Services turnover quarterly VWAP Quarter1=1st. Quarter diff --git a/htdocs/langs/uk_UA/shop.lang b/htdocs/langs/uk_UA/shop.lang index b6cd78b5028..156af426bb0 100644 --- a/htdocs/langs/uk_UA/shop.lang +++ b/htdocs/langs/uk_UA/shop.lang @@ -1,10 +1,11 @@ # Dolibarr language file - Source file is en_US - shop -# Shop=Shop -# ShopWeb=Web Shop -# LastOrders=Last orders -# OnStandBy=On standby -# TreatmentInProgress=Treatment in progress -# LastCustomers=Last customers -# OSCommerceShop=OSCommerce shop -# OSCommerce=OSCommerce -# AddProd=Sell online +FailedConnectDBCheckModuleSetup=Failed to connect to oscommerce database. Check your module setup +Shop=Shop +ShopWeb=Web Shop +LastOrders=Last orders +OnStandBy=On standby +TreatmentInProgress=Treatment in progress +LastCustomers=Last customers +OSCommerceShop=OSCommerce shop +OSCommerce=OSCommerce +AddProd=Sell online diff --git a/htdocs/langs/uk_UA/stocks.lang b/htdocs/langs/uk_UA/stocks.lang index 54ff037d912..710f42d1581 100644 --- a/htdocs/langs/uk_UA/stocks.lang +++ b/htdocs/langs/uk_UA/stocks.lang @@ -112,6 +112,7 @@ ReplenishmentOrdersDesc=This is list of all opened supplier orders Replenishments=Replenishments NbOfProductBeforePeriod=Quantity of product %s in stock before selected period (< %s) NbOfProductAfterPeriod=Quantity of product %s in stock after selected period (> %s) +MassMovement=Mass movement MassStockMovement=Mass stock movement SelectProductInAndOutWareHouse=Select a product, a quantity, a source warehouse and a target warehouse, then click "%s". Once this is done for all required movements, click onto "%s". RecordMovement=Record transfert diff --git a/htdocs/langs/uz_UZ/admin.lang b/htdocs/langs/uz_UZ/admin.lang index eb85572a4b3..d784d75b43c 100644 --- a/htdocs/langs/uz_UZ/admin.lang +++ b/htdocs/langs/uz_UZ/admin.lang @@ -116,7 +116,7 @@ LanguageBrowserParameter=Parameter %s LocalisationDolibarrParameters=Localisation parameters ClientTZ=Client Time Zone (user) ClientHour=Client time (user) -OSTZ=Servre OS Time Zone +OSTZ=Server OS Time Zone PHPTZ=PHP server Time Zone PHPServerOffsetWithGreenwich=PHP server offset width Greenwich (seconds) ClientOffsetWithGreenwich=Client/Browser offset width Greenwich (seconds) @@ -233,7 +233,9 @@ OfficialWebSiteFr=French official web site OfficialWiki=Dolibarr documentation on Wiki OfficialDemo=Dolibarr online demo OfficialMarketPlace=Official market place for external modules/addons -OfficialWebHostingService=Official web hosting services (Cloud hosting) +OfficialWebHostingService=Referenced web hosting services (Cloud hosting) +ReferencedPreferredPartners=Preferred Partners +OtherResources=Autres ressources ForDocumentationSeeWiki=For user or developer documentation (Doc, FAQs...),
    take a look at the Dolibarr Wiki:
    %s ForAnswersSeeForum=For any other questions/help, you can use the Dolibarr forum:
    %s HelpCenterDesc1=This area can help you to get a Help support service on Dolibarr. @@ -369,9 +371,9 @@ ExtrafieldSelectList = Select from table ExtrafieldSeparator=Separator ExtrafieldCheckBox=Checkbox ExtrafieldRadio=Radio button -ExtrafieldParamHelpselect=Parameters list have to be like key,value

    for exemple :
    1,value1
    2,value2
    3,value3
    ...

    In order to have the list depending on another :
    1,value1|parent_list_code:parent_key
    2,value2|parent_list_code:parent_key -ExtrafieldParamHelpcheckbox=Parameters list have to be like key,value

    for exemple :
    1,value1
    2,value2
    3,value3
    ... -ExtrafieldParamHelpradio=Parameters list have to be like key,value

    for exemple :
    1,value1
    2,value2
    3,value3
    ... +ExtrafieldParamHelpselect=Parameters list have to be like key,value

    for example :
    1,value1
    2,value2
    3,value3
    ...

    In order to have the list depending on another :
    1,value1|parent_list_code:parent_key
    2,value2|parent_list_code:parent_key +ExtrafieldParamHelpcheckbox=Parameters list have to be like key,value

    for example :
    1,value1
    2,value2
    3,value3
    ... +ExtrafieldParamHelpradio=Parameters list have to be like key,value

    for example :
    1,value1
    2,value2
    3,value3
    ... ExtrafieldParamHelpsellist=Parameters list comes from a table
    Syntax : table_name:label_field:id_field::filter
    Example : c_typent:libelle:id::filter

    filter can be a simple test (eg active=1) to display only active value
    if you want to filter on extrafields use syntaxt extra.fieldcode=... (where field code is the code of extrafield)

    In order to have the list depending on another :
    c_typent:libelle:id:parent_list_code|parent_column:filter LibraryToBuildPDF=Library used to build PDF WarningUsingFPDF=Warning: Your conf.php contains directive dolibarr_pdf_force_fpdf=1. This means you use the FPDF library to generate PDF files. This library is old and does not support a lot of features (Unicode, image transparency, cyrillic, arab and asiatic languages, ...), so you may experience errors during PDF generation.
    To solve this and have a full support of PDF generation, please download TCPDF library, then comment or remove the line $dolibarr_pdf_force_fpdf=1, and add instead $dolibarr_lib_TCPDF_PATH='path_to_TCPDF_dir' @@ -472,7 +474,7 @@ Module410Desc=Webcalendar integration Module500Name=Special expenses (tax, social contributions, dividends) Module500Desc=Management of special expenses like taxes, social contribution, dividends and salaries Module510Name=Salaries -Module510Desc=Management of empoyees salaries and payments +Module510Desc=Management of employees salaries and payments Module600Name=Notifications Module600Desc=Send notifications by email on some Dolibarr business events to third party contacts Module700Name=Donations @@ -495,15 +497,15 @@ Module2400Name=Agenda Module2400Desc=Events/tasks and agenda management Module2500Name=Electronic Content Management Module2500Desc=Save and share documents -Module2600Name= WebServices -Module2600Desc= Enable the Dolibarr web services server -Module2700Name= Gravatar -Module2700Desc= Use online Gravatar service (www.gravatar.com) to show photo of users/members (found with their emails). Need an internet access +Module2600Name=WebServices +Module2600Desc=Enable the Dolibarr web services server +Module2700Name=Gravatar +Module2700Desc=Use online Gravatar service (www.gravatar.com) to show photo of users/members (found with their emails). Need an internet access Module2800Desc=FTP Client -Module2900Name= GeoIPMaxmind -Module2900Desc= GeoIP Maxmind conversions capabilities -Module3100Name= Skype -Module3100Desc= Add a Skype button into card of adherents / third parties / contacts +Module2900Name=GeoIPMaxmind +Module2900Desc=GeoIP Maxmind conversions capabilities +Module3100Name=Skype +Module3100Desc=Add a Skype button into card of adherents / third parties / contacts Module5000Name=Multi-company Module5000Desc=Allows you to manage multiple companies Module6000Name=Workflow @@ -681,6 +683,10 @@ Permission401=Read discounts Permission402=Create/modify discounts Permission403=Validate discounts Permission404=Delete discounts +Permission510=Read Salaries +Permission512=Create/modify salaries +Permission514=Delete salaries +Permission517=Export salaries Permission531=Read services Permission532=Create/modify services Permission534=Delete services @@ -999,7 +1005,7 @@ ExtraFieldsSupplierOrders=Complementary attributes (orders) ExtraFieldsSupplierInvoices=Complementary attributes (invoices) ExtraFieldsProject=Complementary attributes (projects) ExtraFieldsProjectTask=Complementary attributes (tasks) -ExtraFieldHasWrongValue=Attribut %s has a wrong value. +ExtraFieldHasWrongValue=Attribute %s has a wrong value. AlphaNumOnlyCharsAndNoSpace=only alphanumericals characters without space AlphaNumOnlyLowerCharsAndNoSpace=only alphanumericals and lower case characters without space SendingMailSetup=Setup of sendings by email @@ -1018,13 +1024,13 @@ SuhosinSessionEncrypt=Session storage encrypted by Suhosin ConditionIsCurrently=Condition is currently %s TestNotPossibleWithCurrentBrowsers=Automatic detection not possible YouUseBestDriver=You use driver %s that is best driver available currently. -YouDoNotUseBestDriver=You use drive %s but driver %s is recommanded. +YouDoNotUseBestDriver=You use drive %s but driver %s is recommended. NbOfProductIsLowerThanNoPb=You have only %s products/services into database. This does not required any particular optimization. SearchOptim=Search optimization YouHaveXProductUseSearchOptim=You have %s product into database. You should add the constant PRODUCT_DONOTSEARCH_ANYWHERE to 1 into Home-Setup-Other, you limit the search to the beginning of strings making possible for database to use index and you should get an immediate response. BrowserIsOK=You are using the web browser %s. This browser is ok for security and performance. BrowserIsKO=You are using the web browser %s. This browser is known to be a bad choice for security, performance and reliability. We recommand you to use Firefox, Chrome, Opera or Safari. -XDebugInstalled=XDebug est chargé. +XDebugInstalled=XDebug is loaded. XCacheInstalled=XCache is loaded. AddRefInList=Display customer/supplier ref into list (select list or combobox) and most of hyperlink FieldEdition=Edition of field %s @@ -1073,7 +1079,7 @@ WebCalServer=Server hosting calendar database WebCalDatabaseName=Database name WebCalUser=User to access database WebCalSetupSaved=Webcalendar setup saved successfully. -WebCalTestOk=Connection to server '%s' on database '%s' with user '%s' successfull. +WebCalTestOk=Connection to server '%s' on database '%s' with user '%s' successful. WebCalTestKo1=Connection to server '%s' succeed but database '%s' could not be reached. WebCalTestKo2=Connection to server '%s' with user '%s' failed. WebCalErrorConnectOkButWrongDatabase=Connection succeeded but database doesn't look to be a Webcalendar database. @@ -1119,7 +1125,7 @@ WatermarkOnDraftProposal=Watermark on draft commercial proposals (none if empty) OrdersSetup=Order management setup OrdersNumberingModules=Orders numbering models OrdersModelModule=Order documents models -HideTreadedOrders=Hide the treated or canceled orders in the list +HideTreadedOrders=Hide the treated or cancelled orders in the list ValidOrderAfterPropalClosed=To validate the order after proposal closer, makes it possible not to step by the provisional order FreeLegalTextOnOrders=Free text on orders WatermarkOnDraftOrders=Watermark on draft orders (none if empty) @@ -1214,9 +1220,9 @@ LDAPSynchroKO=Failed synchronization test LDAPSynchroKOMayBePermissions=Failed synchronization test. Check that connexion to server is correctly configured and allows LDAP udpates LDAPTCPConnectOK=TCP connect to LDAP server successful (Server=%s, Port=%s) LDAPTCPConnectKO=TCP connect to LDAP server failed (Server=%s, Port=%s) -LDAPBindOK=Connect/Authentificate to LDAP server sucessfull (Server=%s, Port=%s, Admin=%s, Password=%s) +LDAPBindOK=Connect/Authentificate to LDAP server successful (Server=%s, Port=%s, Admin=%s, Password=%s) LDAPBindKO=Connect/Authentificate to LDAP server failed (Server=%s, Port=%s, Admin=%s, Password=%s) -LDAPUnbindSuccessfull=Disconnect successfull +LDAPUnbindSuccessfull=Disconnect successful LDAPUnbindFailed=Disconnect failed LDAPConnectToDNSuccessfull=Connection to DN (%s) successful LDAPConnectToDNFailed=Connection to DN (%s) failed @@ -1273,7 +1279,7 @@ LDAPFieldSidExample=Example : objectsid LDAPFieldEndLastSubscription=Date of subscription end LDAPFieldTitle=Post/Function LDAPFieldTitleExample=Example: title -LDAPParametersAreStillHardCoded=LDAP parametres are still hardcoded (in contact class) +LDAPParametersAreStillHardCoded=LDAP parameters are still hardcoded (in contact class) LDAPSetupNotComplete=LDAP setup not complete (go on others tabs) LDAPNoUserOrPasswordProvidedAccessIsReadOnly=No administrator or password provided. LDAP access will be anonymous and in read only mode. LDAPDescContact=This page allows you to define LDAP attributes name in LDAP tree for each data found on Dolibarr contacts. @@ -1429,7 +1435,7 @@ OptionVATDefault=Standard OptionVATDebitOption=Option services on Debit OptionVatDefaultDesc=VAT is due:
    - on delivery for goods (we use invoice date)
    - on payments for services OptionVatDebitOptionDesc=VAT is due:
    - on delivery for goods (we use invoice date)
    - on invoice (debit) for services -SummaryOfVatExigibilityUsedByDefault=Time of VAT exigibility by default according to choosed option: +SummaryOfVatExigibilityUsedByDefault=Time of VAT exigibility by default according to chosen option: OnDelivery=On delivery OnPayment=On payment OnInvoice=On invoice @@ -1446,7 +1452,7 @@ AccountancyCodeBuy=Purchase account. code AgendaSetup=Events and agenda module setup PasswordTogetVCalExport=Key to authorize export link PastDelayVCalExport=Do not export event older than -AGENDA_USE_EVENT_TYPE=Use events types (managed into menu Setup -> Dictionnary -> Type of agenda events) +AGENDA_USE_EVENT_TYPE=Use events types (managed into menu Setup -> Dictionary -> Type of agenda events) ##### ClickToDial ##### ClickToDialDesc=This module allows to add an icon after phone numbers. A click on this icon will call a server with a particular URL you define below. This can be used to call a call center system from Dolibarr that can call the phone number on a SIP system for example. ##### Point Of Sales (CashDesk) ##### diff --git a/htdocs/langs/uz_UZ/contracts.lang b/htdocs/langs/uz_UZ/contracts.lang index 797b5708e50..e5ad112b222 100644 --- a/htdocs/langs/uz_UZ/contracts.lang +++ b/htdocs/langs/uz_UZ/contracts.lang @@ -89,6 +89,8 @@ ListOfServicesToExpireWithDuration=List of Services to expire in %s days ListOfServicesToExpireWithDurationNeg=List of Services expired from more than %s days ListOfServicesToExpire=List of Services to expire NoteListOfYourExpiredServices=This list contains only services of contracts for third parties you are linked to as a sale representative. +StandardContractsTemplate=Standard contracts template +ContactNameAndSignature=For %s, name and signature: ##### Types de contacts ##### TypeContact_contrat_internal_SALESREPSIGN=Sales representative signing contract diff --git a/htdocs/langs/uz_UZ/exports.lang b/htdocs/langs/uz_UZ/exports.lang index 2a3ba5d712f..3acad0d32cd 100644 --- a/htdocs/langs/uz_UZ/exports.lang +++ b/htdocs/langs/uz_UZ/exports.lang @@ -8,7 +8,7 @@ ImportableDatas=Importable dataset SelectExportDataSet=Choose dataset you want to export... SelectImportDataSet=Choose dataset you want to import... SelectExportFields=Choose fields you want to export, or select a predefined export profile -SelectImportFields=Choose source file fields you want to import and their target field in database by moving them up and down with anchor %s, or select a predefined import profil: +SelectImportFields=Choose source file fields you want to import and their target field in database by moving them up and down with anchor %s, or select a predefined import profile: NotImportedFields=Fields of source file not imported SaveExportModel=Save this export profile if you plan to reuse it later... SaveImportModel=Save this import profile if you plan to reuse it later... @@ -81,7 +81,7 @@ DoNotImportFirstLine=Do not import first line of source file NbOfSourceLines=Number of lines in source file NowClickToTestTheImport=Check import parameters you have defined. If they are correct, click on button "%s" to launch a simulation of import process (no data will be changed in your database, it's only a simulation for the moment)... RunSimulateImportFile=Launch the import simulation -FieldNeedSource=This fiels in database require a data from source file +FieldNeedSource=This field requires data from the source file SomeMandatoryFieldHaveNoSource=Some mandatory fields have no source from data file InformationOnSourceFile=Information on source file InformationOnTargetTables=Information on target fields diff --git a/htdocs/langs/uz_UZ/holiday.lang b/htdocs/langs/uz_UZ/holiday.lang index 0c755ca3301..da03299e0da 100644 --- a/htdocs/langs/uz_UZ/holiday.lang +++ b/htdocs/langs/uz_UZ/holiday.lang @@ -8,7 +8,6 @@ NotActiveModCP=You must enable the module holidays to view this page. NotConfigModCP=You must configure the module holidays to view this page. To do this, click here . NoCPforUser=You don't have a demand for holidays. AddCP=Apply for holidays -CPErrorSQL=An SQL error occurred: Employe=Employee DateDebCP=Start date DateFinCP=End date diff --git a/htdocs/langs/uz_UZ/languages.lang b/htdocs/langs/uz_UZ/languages.lang index 77558748ed3..e94e8e13ac3 100644 --- a/htdocs/langs/uz_UZ/languages.lang +++ b/htdocs/langs/uz_UZ/languages.lang @@ -19,6 +19,7 @@ Language_en_SA=English (Saudi Arabia) Language_en_US=English (United States) Language_en_ZA=English (South Africa) Language_es_ES=Spanish +Language_es_DO=Spanish (Dominican Republic) Language_es_AR=Spanish (Argentina) Language_es_CL=Spanish (Chile) Language_es_HN=Spanish (Honduras) @@ -38,6 +39,7 @@ Language_fr_NC=French (New Caledonia) Language_he_IL=Hebrew Language_hr_HR=Croatian Language_hu_HU=Hungarian +Language_id_ID=Indonesian Language_is_IS=Icelandic Language_it_IT=Italian Language_ja_JP=Japanese diff --git a/htdocs/langs/uz_UZ/mails.lang b/htdocs/langs/uz_UZ/mails.lang index 08ee8a280cb..98e6dc335ee 100644 --- a/htdocs/langs/uz_UZ/mails.lang +++ b/htdocs/langs/uz_UZ/mails.lang @@ -79,6 +79,7 @@ MailtoEMail=Hyper link to email ActivateCheckRead=Allow to use the "Unsubcribe" link ActivateCheckReadKey=Key use to encrypt URL use for "Read Receipt" and "Unsubcribe" feature EMailSentToNRecipients=EMail sent to %s recipients. +XTargetsAdded=%s recipients added into target list EachInvoiceWillBeAttachedToEmail=A document using default invoice document template will be created and attached to each email. MailTopicSendRemindUnpaidInvoices=Reminder of invoice %s (%s) SendRemind=Send reminder by EMails diff --git a/htdocs/langs/uz_UZ/main.lang b/htdocs/langs/uz_UZ/main.lang index be292aa5efd..ebdf6ba715b 100644 --- a/htdocs/langs/uz_UZ/main.lang +++ b/htdocs/langs/uz_UZ/main.lang @@ -551,6 +551,7 @@ MailSentBy=Email sent by TextUsedInTheMessageBody=Email body SendAcknowledgementByMail=Send Ack. by email NoEMail=No email +NoMobilePhone=No mobile phone Owner=Owner DetectedVersion=Detected version FollowingConstantsWillBeSubstituted=The following constants will be replaced with the corresponding value. diff --git a/htdocs/langs/uz_UZ/products.lang b/htdocs/langs/uz_UZ/products.lang index e56b9cc59c2..37012349b02 100644 --- a/htdocs/langs/uz_UZ/products.lang +++ b/htdocs/langs/uz_UZ/products.lang @@ -28,8 +28,10 @@ ProductsAndServicesStatistics=Products and Services statistics ProductsStatistics=Products statistics ProductsOnSell=Available products ProductsNotOnSell=Obsolete products +ProductsOnSellAndOnBuy=Products not for sale nor purchase ServicesOnSell=Available services ServicesNotOnSell=Obsolete services +ServicesOnSellAndOnBuy=Services not for sale nor purchase InternalRef=Internal reference LastRecorded=Last products/services on sell recorded LastRecordedProductsAndServices=Last %s recorded products/services @@ -70,6 +72,8 @@ PublicPrice=Public price CurrentPrice=Current price NewPrice=New price MinPrice=Minim. selling price +MinPriceHT=Minim. selling price (net of tax) +MinPriceTTC=Minim. selling price (inc. tax) CantBeLessThanMinPrice=The selling price can't be lower than minimum allowed for this product (%s without tax). This message can also appears if you type a too important discount. ContractStatus=Contract status ContractStatusClosed=Closed @@ -179,6 +183,7 @@ ProductIsUsed=This product is used NewRefForClone=Ref. of new product/service CustomerPrices=Customers prices SuppliersPrices=Suppliers prices +SuppliersPricesOfProductsOrServices=Suppliers prices (of products or services) CustomCode=Customs code CountryOrigin=Origin country HiddenIntoCombo=Hidden into select lists @@ -208,6 +213,7 @@ CostPmpHT=Net total VWAP ProductUsedForBuild=Auto consumed by production ProductBuilded=Production completed ProductsMultiPrice=Product multi-price +ProductsOrServiceMultiPrice=Customers prices (of products or services, multi-prices) ProductSellByQuarterHT=Products turnover quarterly VWAP ServiceSellByQuarterHT=Services turnover quarterly VWAP Quarter1=1st. Quarter diff --git a/htdocs/langs/uz_UZ/shop.lang b/htdocs/langs/uz_UZ/shop.lang index d648f03f350..156af426bb0 100644 --- a/htdocs/langs/uz_UZ/shop.lang +++ b/htdocs/langs/uz_UZ/shop.lang @@ -1,4 +1,5 @@ # Dolibarr language file - Source file is en_US - shop +FailedConnectDBCheckModuleSetup=Failed to connect to oscommerce database. Check your module setup Shop=Shop ShopWeb=Web Shop LastOrders=Last orders diff --git a/htdocs/langs/uz_UZ/stocks.lang b/htdocs/langs/uz_UZ/stocks.lang index 54ff037d912..710f42d1581 100644 --- a/htdocs/langs/uz_UZ/stocks.lang +++ b/htdocs/langs/uz_UZ/stocks.lang @@ -112,6 +112,7 @@ ReplenishmentOrdersDesc=This is list of all opened supplier orders Replenishments=Replenishments NbOfProductBeforePeriod=Quantity of product %s in stock before selected period (< %s) NbOfProductAfterPeriod=Quantity of product %s in stock after selected period (> %s) +MassMovement=Mass movement MassStockMovement=Mass stock movement SelectProductInAndOutWareHouse=Select a product, a quantity, a source warehouse and a target warehouse, then click "%s". Once this is done for all required movements, click onto "%s". RecordMovement=Record transfert diff --git a/htdocs/langs/vi_VN/admin.lang b/htdocs/langs/vi_VN/admin.lang index 0b2b7638d35..a7c0cb755b3 100644 --- a/htdocs/langs/vi_VN/admin.lang +++ b/htdocs/langs/vi_VN/admin.lang @@ -116,7 +116,7 @@ LanguageBrowserParameter=Thông số %s LocalisationDolibarrParameters=Địa phương hóa thông số ClientTZ=Client Time Zone (user) ClientHour=Client time (user) -OSTZ=Servre OS Time Zone +OSTZ=Server OS Time Zone PHPTZ=PHP server Time Zone PHPServerOffsetWithGreenwich=PHP server offset width Greenwich (giây) ClientOffsetWithGreenwich=Client/Trình duyệt độ rộng offset Greenwich (giây) @@ -233,7 +233,9 @@ OfficialWebSiteFr=French official web site OfficialWiki=Dolibarr documentation on Wiki OfficialDemo=Dolibarr online demo OfficialMarketPlace=Official market place for external modules/addons -OfficialWebHostingService=Official web hosting services (Cloud hosting) +OfficialWebHostingService=Referenced web hosting services (Cloud hosting) +ReferencedPreferredPartners=Preferred Partners +OtherResources=Autres ressources ForDocumentationSeeWiki=For user or developer documentation (Doc, FAQs...),
    take a look at the Dolibarr Wiki:
    %s ForAnswersSeeForum=For any other questions/help, you can use the Dolibarr forum:
    %s HelpCenterDesc1=This area can help you to get a Help support service on Dolibarr. @@ -369,9 +371,9 @@ ExtrafieldSelectList = Select from table ExtrafieldSeparator=Separator ExtrafieldCheckBox=Checkbox ExtrafieldRadio=Radio button -ExtrafieldParamHelpselect=Parameters list have to be like key,value

    for exemple :
    1,value1
    2,value2
    3,value3
    ...

    In order to have the list depending on another :
    1,value1|parent_list_code:parent_key
    2,value2|parent_list_code:parent_key -ExtrafieldParamHelpcheckbox=Parameters list have to be like key,value

    for exemple :
    1,value1
    2,value2
    3,value3
    ... -ExtrafieldParamHelpradio=Parameters list have to be like key,value

    for exemple :
    1,value1
    2,value2
    3,value3
    ... +ExtrafieldParamHelpselect=Parameters list have to be like key,value

    for example :
    1,value1
    2,value2
    3,value3
    ...

    In order to have the list depending on another :
    1,value1|parent_list_code:parent_key
    2,value2|parent_list_code:parent_key +ExtrafieldParamHelpcheckbox=Parameters list have to be like key,value

    for example :
    1,value1
    2,value2
    3,value3
    ... +ExtrafieldParamHelpradio=Parameters list have to be like key,value

    for example :
    1,value1
    2,value2
    3,value3
    ... ExtrafieldParamHelpsellist=Parameters list comes from a table
    Syntax : table_name:label_field:id_field::filter
    Example : c_typent:libelle:id::filter

    filter can be a simple test (eg active=1) to display only active value
    if you want to filter on extrafields use syntaxt extra.fieldcode=... (where field code is the code of extrafield)

    In order to have the list depending on another :
    c_typent:libelle:id:parent_list_code|parent_column:filter LibraryToBuildPDF=Library used to build PDF WarningUsingFPDF=Warning: Your conf.php contains directive dolibarr_pdf_force_fpdf=1. This means you use the FPDF library to generate PDF files. This library is old and does not support a lot of features (Unicode, image transparency, cyrillic, arab and asiatic languages, ...), so you may experience errors during PDF generation.
    To solve this and have a full support of PDF generation, please download TCPDF library, then comment or remove the line $dolibarr_pdf_force_fpdf=1, and add instead $dolibarr_lib_TCPDF_PATH='path_to_TCPDF_dir' @@ -472,7 +474,7 @@ Module410Desc=Webcalendar integration Module500Name=Special expenses (tax, social contributions, dividends) Module500Desc=Management of special expenses like taxes, social contribution, dividends and salaries Module510Name=Salaries -Module510Desc=Management of empoyees salaries and payments +Module510Desc=Management of employees salaries and payments Module600Name=Notifications Module600Desc=Send notifications by email on some Dolibarr business events to third party contacts Module700Name=Donations @@ -495,15 +497,15 @@ Module2400Name=Agenda Module2400Desc=Events/tasks and agenda management Module2500Name=Electronic Content Management Module2500Desc=Save and share documents -Module2600Name= WebServices -Module2600Desc= Enable the Dolibarr web services server -Module2700Name= Gravatar -Module2700Desc= Use online Gravatar service (www.gravatar.com) to show photo of users/members (found with their emails). Need an internet access +Module2600Name=WebServices +Module2600Desc=Enable the Dolibarr web services server +Module2700Name=Gravatar +Module2700Desc=Use online Gravatar service (www.gravatar.com) to show photo of users/members (found with their emails). Need an internet access Module2800Desc=FTP Client -Module2900Name= GeoIPMaxmind -Module2900Desc= GeoIP Maxmind conversions capabilities -Module3100Name= Skype -Module3100Desc= Add a Skype button into card of adherents / third parties / contacts +Module2900Name=GeoIPMaxmind +Module2900Desc=GeoIP Maxmind conversions capabilities +Module3100Name=Skype +Module3100Desc=Add a Skype button into card of adherents / third parties / contacts Module5000Name=Multi-company Module5000Desc=Allows you to manage multiple companies Module6000Name=Workflow @@ -681,6 +683,10 @@ Permission401=Read discounts Permission402=Create/modify discounts Permission403=Validate discounts Permission404=Delete discounts +Permission510=Read Salaries +Permission512=Create/modify salaries +Permission514=Delete salaries +Permission517=Export salaries Permission531=Read services Permission532=Create/modify services Permission534=Delete services @@ -999,7 +1005,7 @@ ExtraFieldsSupplierOrders=Complementary attributes (orders) ExtraFieldsSupplierInvoices=Complementary attributes (invoices) ExtraFieldsProject=Complementary attributes (projects) ExtraFieldsProjectTask=Complementary attributes (tasks) -ExtraFieldHasWrongValue=Attribut %s has a wrong value. +ExtraFieldHasWrongValue=Attribute %s has a wrong value. AlphaNumOnlyCharsAndNoSpace=only alphanumericals characters without space AlphaNumOnlyLowerCharsAndNoSpace=only alphanumericals and lower case characters without space SendingMailSetup=Setup of sendings by email @@ -1018,13 +1024,13 @@ SuhosinSessionEncrypt=Session storage encrypted by Suhosin ConditionIsCurrently=Condition is currently %s TestNotPossibleWithCurrentBrowsers=Automatic detection not possible YouUseBestDriver=You use driver %s that is best driver available currently. -YouDoNotUseBestDriver=You use drive %s but driver %s is recommanded. +YouDoNotUseBestDriver=You use drive %s but driver %s is recommended. NbOfProductIsLowerThanNoPb=You have only %s products/services into database. This does not required any particular optimization. SearchOptim=Search optimization YouHaveXProductUseSearchOptim=You have %s product into database. You should add the constant PRODUCT_DONOTSEARCH_ANYWHERE to 1 into Home-Setup-Other, you limit the search to the beginning of strings making possible for database to use index and you should get an immediate response. BrowserIsOK=You are using the web browser %s. This browser is ok for security and performance. BrowserIsKO=You are using the web browser %s. This browser is known to be a bad choice for security, performance and reliability. We recommand you to use Firefox, Chrome, Opera or Safari. -XDebugInstalled=XDebug est chargé. +XDebugInstalled=XDebug is loaded. XCacheInstalled=XCache is loaded. AddRefInList=Display customer/supplier ref into list (select list or combobox) and most of hyperlink FieldEdition=Edition of field %s @@ -1073,7 +1079,7 @@ WebCalServer=Server hosting calendar database WebCalDatabaseName=Database name WebCalUser=User to access database WebCalSetupSaved=Webcalendar setup saved successfully. -WebCalTestOk=Connection to server '%s' on database '%s' with user '%s' successfull. +WebCalTestOk=Connection to server '%s' on database '%s' with user '%s' successful. WebCalTestKo1=Connection to server '%s' succeed but database '%s' could not be reached. WebCalTestKo2=Connection to server '%s' with user '%s' failed. WebCalErrorConnectOkButWrongDatabase=Connection succeeded but database doesn't look to be a Webcalendar database. @@ -1119,7 +1125,7 @@ WatermarkOnDraftProposal=Watermark on draft commercial proposals (none if empty) OrdersSetup=Order management setup OrdersNumberingModules=Orders numbering models OrdersModelModule=Order documents models -HideTreadedOrders=Hide the treated or canceled orders in the list +HideTreadedOrders=Hide the treated or cancelled orders in the list ValidOrderAfterPropalClosed=To validate the order after proposal closer, makes it possible not to step by the provisional order FreeLegalTextOnOrders=Free text on orders WatermarkOnDraftOrders=Watermark on draft orders (none if empty) @@ -1214,9 +1220,9 @@ LDAPSynchroKO=Failed synchronization test LDAPSynchroKOMayBePermissions=Failed synchronization test. Check that connexion to server is correctly configured and allows LDAP udpates LDAPTCPConnectOK=TCP connect to LDAP server successful (Server=%s, Port=%s) LDAPTCPConnectKO=TCP connect to LDAP server failed (Server=%s, Port=%s) -LDAPBindOK=Connect/Authentificate to LDAP server sucessfull (Server=%s, Port=%s, Admin=%s, Password=%s) +LDAPBindOK=Connect/Authentificate to LDAP server successful (Server=%s, Port=%s, Admin=%s, Password=%s) LDAPBindKO=Connect/Authentificate to LDAP server failed (Server=%s, Port=%s, Admin=%s, Password=%s) -LDAPUnbindSuccessfull=Disconnect successfull +LDAPUnbindSuccessfull=Disconnect successful LDAPUnbindFailed=Disconnect failed LDAPConnectToDNSuccessfull=Connection to DN (%s) successful LDAPConnectToDNFailed=Connection to DN (%s) failed @@ -1273,7 +1279,7 @@ LDAPFieldSidExample=Example : objectsid LDAPFieldEndLastSubscription=Date of subscription end LDAPFieldTitle=Post/Function LDAPFieldTitleExample=Example: title -LDAPParametersAreStillHardCoded=LDAP parametres are still hardcoded (in contact class) +LDAPParametersAreStillHardCoded=LDAP parameters are still hardcoded (in contact class) LDAPSetupNotComplete=LDAP setup not complete (go on others tabs) LDAPNoUserOrPasswordProvidedAccessIsReadOnly=No administrator or password provided. LDAP access will be anonymous and in read only mode. LDAPDescContact=This page allows you to define LDAP attributes name in LDAP tree for each data found on Dolibarr contacts. @@ -1429,7 +1435,7 @@ OptionVATDefault=Standard OptionVATDebitOption=Option services on Debit OptionVatDefaultDesc=VAT is due:
    - on delivery for goods (we use invoice date)
    - on payments for services OptionVatDebitOptionDesc=VAT is due:
    - on delivery for goods (we use invoice date)
    - on invoice (debit) for services -SummaryOfVatExigibilityUsedByDefault=Time of VAT exigibility by default according to choosed option: +SummaryOfVatExigibilityUsedByDefault=Time of VAT exigibility by default according to chosen option: OnDelivery=On delivery OnPayment=On payment OnInvoice=On invoice @@ -1446,7 +1452,7 @@ AccountancyCodeBuy=Purchase account. code AgendaSetup=Events and agenda module setup PasswordTogetVCalExport=Key to authorize export link PastDelayVCalExport=Do not export event older than -AGENDA_USE_EVENT_TYPE=Use events types (managed into menu Setup -> Dictionnary -> Type of agenda events) +AGENDA_USE_EVENT_TYPE=Use events types (managed into menu Setup -> Dictionary -> Type of agenda events) ##### ClickToDial ##### ClickToDialDesc=This module allows to add an icon after phone numbers. A click on this icon will call a server with a particular URL you define below. This can be used to call a call center system from Dolibarr that can call the phone number on a SIP system for example. ##### Point Of Sales (CashDesk) ##### diff --git a/htdocs/langs/vi_VN/contracts.lang b/htdocs/langs/vi_VN/contracts.lang index 797b5708e50..e5ad112b222 100644 --- a/htdocs/langs/vi_VN/contracts.lang +++ b/htdocs/langs/vi_VN/contracts.lang @@ -89,6 +89,8 @@ ListOfServicesToExpireWithDuration=List of Services to expire in %s days ListOfServicesToExpireWithDurationNeg=List of Services expired from more than %s days ListOfServicesToExpire=List of Services to expire NoteListOfYourExpiredServices=This list contains only services of contracts for third parties you are linked to as a sale representative. +StandardContractsTemplate=Standard contracts template +ContactNameAndSignature=For %s, name and signature: ##### Types de contacts ##### TypeContact_contrat_internal_SALESREPSIGN=Sales representative signing contract diff --git a/htdocs/langs/vi_VN/exports.lang b/htdocs/langs/vi_VN/exports.lang index dbdb7f5dc15..3983ee5fe32 100644 --- a/htdocs/langs/vi_VN/exports.lang +++ b/htdocs/langs/vi_VN/exports.lang @@ -8,7 +8,7 @@ ImportableDatas=Importable dataset SelectExportDataSet=Choose dataset you want to export... SelectImportDataSet=Choose dataset you want to import... SelectExportFields=Choose fields you want to export, or select a predefined export profile -SelectImportFields=Choose source file fields you want to import and their target field in database by moving them up and down with anchor %s, or select a predefined import profil: +SelectImportFields=Choose source file fields you want to import and their target field in database by moving them up and down with anchor %s, or select a predefined import profile: NotImportedFields=Fields of source file not imported SaveExportModel=Save this export profile if you plan to reuse it later... SaveImportModel=Save this import profile if you plan to reuse it later... @@ -81,7 +81,7 @@ DoNotImportFirstLine=Do not import first line of source file NbOfSourceLines=Number of lines in source file NowClickToTestTheImport=Check import parameters you have defined. If they are correct, click on button "%s" to launch a simulation of import process (no data will be changed in your database, it's only a simulation for the moment)... RunSimulateImportFile=Launch the import simulation -FieldNeedSource=This fiels in database require a data from source file +FieldNeedSource=This field requires data from the source file SomeMandatoryFieldHaveNoSource=Some mandatory fields have no source from data file InformationOnSourceFile=Information on source file InformationOnTargetTables=Information on target fields diff --git a/htdocs/langs/vi_VN/holiday.lang b/htdocs/langs/vi_VN/holiday.lang index 0c755ca3301..da03299e0da 100644 --- a/htdocs/langs/vi_VN/holiday.lang +++ b/htdocs/langs/vi_VN/holiday.lang @@ -8,7 +8,6 @@ NotActiveModCP=You must enable the module holidays to view this page. NotConfigModCP=You must configure the module holidays to view this page. To do this, click here . NoCPforUser=You don't have a demand for holidays. AddCP=Apply for holidays -CPErrorSQL=An SQL error occurred: Employe=Employee DateDebCP=Start date DateFinCP=End date diff --git a/htdocs/langs/vi_VN/languages.lang b/htdocs/langs/vi_VN/languages.lang index be0acd4e48b..6df477b5e90 100644 --- a/htdocs/langs/vi_VN/languages.lang +++ b/htdocs/langs/vi_VN/languages.lang @@ -19,6 +19,7 @@ Language_en_SA=Tiếng Anh (Saudi Arabia) Language_en_US=English (United States) Language_en_ZA=Tiếng Anh (Nam Phi) Language_es_ES=Tây Ban Nha +Language_es_DO=Spanish (Dominican Republic) Language_es_AR=Tây Ban Nha (Argentina) Language_es_CL=Spanish (Chile) Language_es_HN=Tây Ban Nha (Honduras) @@ -38,6 +39,7 @@ Language_fr_NC=Pháp (New Caledonia) Language_he_IL=Tiếng Do Thái Language_hr_HR=Croatia Language_hu_HU=Hungary +Language_id_ID=Indonesian Language_is_IS=Iceland Language_it_IT=Ý Language_ja_JP=Nhật Bản diff --git a/htdocs/langs/vi_VN/mails.lang b/htdocs/langs/vi_VN/mails.lang index c23b5c59d69..0130de1547b 100644 --- a/htdocs/langs/vi_VN/mails.lang +++ b/htdocs/langs/vi_VN/mails.lang @@ -79,6 +79,7 @@ MailtoEMail=Hyper link to email ActivateCheckRead=Allow to use the "Unsubcribe" link ActivateCheckReadKey=Key use to encrypt URL use for "Read Receipt" and "Unsubcribe" feature EMailSentToNRecipients=EMail sent to %s recipients. +XTargetsAdded=%s recipients added into target list EachInvoiceWillBeAttachedToEmail=A document using default invoice document template will be created and attached to each email. MailTopicSendRemindUnpaidInvoices=Reminder of invoice %s (%s) SendRemind=Send reminder by EMails diff --git a/htdocs/langs/vi_VN/main.lang b/htdocs/langs/vi_VN/main.lang index 601c4665003..f34bf1f439b 100644 --- a/htdocs/langs/vi_VN/main.lang +++ b/htdocs/langs/vi_VN/main.lang @@ -551,6 +551,7 @@ MailSentBy=Email sent by TextUsedInTheMessageBody=Email body SendAcknowledgementByMail=Send Ack. by email NoEMail=No email +NoMobilePhone=No mobile phone Owner=Owner DetectedVersion=Detected version FollowingConstantsWillBeSubstituted=The following constants will be replaced with the corresponding value. diff --git a/htdocs/langs/vi_VN/products.lang b/htdocs/langs/vi_VN/products.lang index e56b9cc59c2..37012349b02 100644 --- a/htdocs/langs/vi_VN/products.lang +++ b/htdocs/langs/vi_VN/products.lang @@ -28,8 +28,10 @@ ProductsAndServicesStatistics=Products and Services statistics ProductsStatistics=Products statistics ProductsOnSell=Available products ProductsNotOnSell=Obsolete products +ProductsOnSellAndOnBuy=Products not for sale nor purchase ServicesOnSell=Available services ServicesNotOnSell=Obsolete services +ServicesOnSellAndOnBuy=Services not for sale nor purchase InternalRef=Internal reference LastRecorded=Last products/services on sell recorded LastRecordedProductsAndServices=Last %s recorded products/services @@ -70,6 +72,8 @@ PublicPrice=Public price CurrentPrice=Current price NewPrice=New price MinPrice=Minim. selling price +MinPriceHT=Minim. selling price (net of tax) +MinPriceTTC=Minim. selling price (inc. tax) CantBeLessThanMinPrice=The selling price can't be lower than minimum allowed for this product (%s without tax). This message can also appears if you type a too important discount. ContractStatus=Contract status ContractStatusClosed=Closed @@ -179,6 +183,7 @@ ProductIsUsed=This product is used NewRefForClone=Ref. of new product/service CustomerPrices=Customers prices SuppliersPrices=Suppliers prices +SuppliersPricesOfProductsOrServices=Suppliers prices (of products or services) CustomCode=Customs code CountryOrigin=Origin country HiddenIntoCombo=Hidden into select lists @@ -208,6 +213,7 @@ CostPmpHT=Net total VWAP ProductUsedForBuild=Auto consumed by production ProductBuilded=Production completed ProductsMultiPrice=Product multi-price +ProductsOrServiceMultiPrice=Customers prices (of products or services, multi-prices) ProductSellByQuarterHT=Products turnover quarterly VWAP ServiceSellByQuarterHT=Services turnover quarterly VWAP Quarter1=1st. Quarter diff --git a/htdocs/langs/vi_VN/shop.lang b/htdocs/langs/vi_VN/shop.lang index d648f03f350..156af426bb0 100644 --- a/htdocs/langs/vi_VN/shop.lang +++ b/htdocs/langs/vi_VN/shop.lang @@ -1,4 +1,5 @@ # Dolibarr language file - Source file is en_US - shop +FailedConnectDBCheckModuleSetup=Failed to connect to oscommerce database. Check your module setup Shop=Shop ShopWeb=Web Shop LastOrders=Last orders diff --git a/htdocs/langs/vi_VN/stocks.lang b/htdocs/langs/vi_VN/stocks.lang index 54ff037d912..710f42d1581 100644 --- a/htdocs/langs/vi_VN/stocks.lang +++ b/htdocs/langs/vi_VN/stocks.lang @@ -112,6 +112,7 @@ ReplenishmentOrdersDesc=This is list of all opened supplier orders Replenishments=Replenishments NbOfProductBeforePeriod=Quantity of product %s in stock before selected period (< %s) NbOfProductAfterPeriod=Quantity of product %s in stock after selected period (> %s) +MassMovement=Mass movement MassStockMovement=Mass stock movement SelectProductInAndOutWareHouse=Select a product, a quantity, a source warehouse and a target warehouse, then click "%s". Once this is done for all required movements, click onto "%s". RecordMovement=Record transfert diff --git a/htdocs/langs/zh_CN/admin.lang b/htdocs/langs/zh_CN/admin.lang index 975f1209758..559b50684e3 100644 --- a/htdocs/langs/zh_CN/admin.lang +++ b/htdocs/langs/zh_CN/admin.lang @@ -116,7 +116,7 @@ LanguageBrowserParameter=参数 %s LocalisationDolibarrParameters=本地化参数 ClientTZ=客户端时区(用户侧) ClientHour=客户端时间(用户侧) -OSTZ=服务器作业系统时区 +OSTZ=Server OS Time Zone PHPTZ=PHP服务器时区 PHPServerOffsetWithGreenwich=PHP服务器与 GMT 时差(秒) ClientOffsetWithGreenwich=客户机/浏览器与 GMT 时差(秒) @@ -233,7 +233,9 @@ OfficialWebSiteFr=法国官方网站 OfficialWiki=Dolibarr Wiki 上的文档 OfficialDemo=Dolibarr在线演示 OfficialMarketPlace=官方市场提供外部模块/扩展 -OfficialWebHostingService=官方网页托管服务(云托管) +OfficialWebHostingService=Referenced web hosting services (Cloud hosting) +ReferencedPreferredPartners=Preferred Partners +OtherResources=Autres ressources ForDocumentationSeeWiki=用户或开发人员用文档(文档,常见问题…),
    参见 Dolibarr 百科:
    %s ForAnswersSeeForum=您有任何其他问题/帮助,可以到 Dolibarr 论坛:
    %s HelpCenterDesc1=此处可以帮助你获得 Dolibarr 帮助支持服务。 @@ -369,9 +371,9 @@ ExtrafieldSelectList = 从表格中选取 ExtrafieldSeparator=分隔符 ExtrafieldCheckBox=复选框 ExtrafieldRadio=单选框 -ExtrafieldParamHelpselect=参数列表必须要像:键,值

    例如 :
    1,值1
    2,值2
    3,值3
    ...

    因为有的列表取决于另一个 :
    1,值1|parent_list_code:parent_key
    2,值2|parent_list_code:parent_key -ExtrafieldParamHelpcheckbox=Parameters list have to be like key,value

    for exemple :
    1,value1
    2,value2
    3,value3
    ... -ExtrafieldParamHelpradio=Parameters list have to be like key,value

    for exemple :
    1,value1
    2,value2
    3,value3
    ... +ExtrafieldParamHelpselect=Parameters list have to be like key,value

    for example :
    1,value1
    2,value2
    3,value3
    ...

    In order to have the list depending on another :
    1,value1|parent_list_code:parent_key
    2,value2|parent_list_code:parent_key +ExtrafieldParamHelpcheckbox=Parameters list have to be like key,value

    for example :
    1,value1
    2,value2
    3,value3
    ... +ExtrafieldParamHelpradio=Parameters list have to be like key,value

    for example :
    1,value1
    2,value2
    3,value3
    ... ExtrafieldParamHelpsellist=Parameters list comes from a table
    Syntax : table_name:label_field:id_field::filter
    Example : c_typent:libelle:id::filter

    filter can be a simple test (eg active=1) to display only active value
    if you want to filter on extrafields use syntaxt extra.fieldcode=... (where field code is the code of extrafield)

    In order to have the list depending on another :
    c_typent:libelle:id:parent_list_code|parent_column:filter LibraryToBuildPDF=Library used to build PDF WarningUsingFPDF=Warning: Your conf.php contains directive dolibarr_pdf_force_fpdf=1. This means you use the FPDF library to generate PDF files. This library is old and does not support a lot of features (Unicode, image transparency, cyrillic, arab and asiatic languages, ...), so you may experience errors during PDF generation.
    To solve this and have a full support of PDF generation, please download TCPDF library, then comment or remove the line $dolibarr_pdf_force_fpdf=1, and add instead $dolibarr_lib_TCPDF_PATH='path_to_TCPDF_dir' @@ -472,7 +474,7 @@ Module410Desc=Webcalendar 整合 Module500Name=Special expenses (tax, social contributions, dividends) Module500Desc=Management of special expenses like taxes, social contribution, dividends and salaries Module510Name=Salaries -Module510Desc=员工工资和报销管理 +Module510Desc=Management of employees salaries and payments Module600Name=通知 Module600Desc=当系统中一些商业事件发生时,通过电邮通知第三方联系人。 Module700Name=捐赠 @@ -495,15 +497,15 @@ Module2400Name=日程 Module2400Desc=事件/任务和日程管理 Module2500Name=电子内容管理 Module2500Desc=保存和共享文件 -Module2600Name= SOAP WebServices -Module2600Desc= 启用 Dolibarr Web 服务的服务器 -Module2700Name= Gravatar -Module2700Desc= 使用网上的 Gravatar 服务(www.gravatar.com),显示 用户/成员的头像(通过电邮搜索)。需要互联网连接。 +Module2600Name=SOAP WebServices +Module2600Desc=启用 Dolibarr Web 服务的服务器 +Module2700Name=Gravatar +Module2700Desc=使用网上的 Gravatar 服务(www.gravatar.com),显示 用户/成员的头像(通过电邮搜索)。需要互联网连接。 Module2800Desc=FTP 客户端 -Module2900Name= GeoIPMaxmind -Module2900Desc= Maxmind geoip 数据库的转换能力 -Module3100Name= Skype -Module3100Desc= Add a Skype button into card of adherents / third parties / contacts +Module2900Name=GeoIPMaxmind +Module2900Desc=Maxmind geoip 数据库的转换能力 +Module3100Name=Skype +Module3100Desc=Add a Skype button into card of adherents / third parties / contacts Module5000Name=多公司 Module5000Desc=允许你管理多个公司 Module6000Name=工作流程 @@ -681,6 +683,10 @@ Permission401=读取折扣 Permission402=建立/修改折扣 Permission403=确认折扣 Permission404=删除折扣 +Permission510=Read Salaries +Permission512=Create/modify salaries +Permission514=Delete salaries +Permission517=Export salaries Permission531=阅读服务 Permission532=建立/修改服务 Permission534=删除服务 @@ -999,7 +1005,7 @@ ExtraFieldsSupplierOrders=增补属性 (订单) ExtraFieldsSupplierInvoices=增补属性 (账单) ExtraFieldsProject=增补属性 (项目) ExtraFieldsProjectTask=增补属性 (任务) -ExtraFieldHasWrongValue=属性 %s 的值有错误。 +ExtraFieldHasWrongValue=Attribute %s has a wrong value. AlphaNumOnlyCharsAndNoSpace=仅限英文字母 (不包括空格) AlphaNumOnlyLowerCharsAndNoSpace=only alphanumericals and lower case characters without space SendingMailSetup=通过电邮发送的设置 @@ -1018,13 +1024,13 @@ SuhosinSessionEncrypt=会话存储空间已用 Suhosin 加密 ConditionIsCurrently=当前条件为 %s TestNotPossibleWithCurrentBrowsers=自动检测不能使用 YouUseBestDriver=你使用的驱动程序 %s 就是目前最佳驱动程式。 -YouDoNotUseBestDriver=您使用的驱动程序 %s ,但建议使用%s 。 +YouDoNotUseBestDriver=You use drive %s but driver %s is recommended. NbOfProductIsLowerThanNoPb=你只有 %s 的产品/服务在数据库。这并不需要任何特别的优化。 SearchOptim=搜索优化 YouHaveXProductUseSearchOptim=你有 %s 产品进入数据库。你应该加常数PRODUCT_DONOTSEARCH_ANYWHERE 1到 首页-设置-其他,你将限制数据库开始搜索范围索引的使用字符串,你应该得到即时响应。 BrowserIsOK=您正在使用 %s 浏览器。这个浏览器安全和性能都ok。 BrowserIsKO=您正在使用 %s 浏览器。这个浏览器的安全性,性能和可靠性都不错。我们推荐您使用火狐,Chrome,Opera和Safari。 -XDebugInstalled=XDebug已经加载。 +XDebugInstalled=XDebug is loaded. XCacheInstalled=XCache已经加载。 AddRefInList=显示客户/供应商参考列表(选择列表或组合框)和大部分超级链接 FieldEdition=Edition of field %s @@ -1073,7 +1079,7 @@ WebCalServer=服务器托管日历数据库 WebCalDatabaseName=数据库名称 WebCalUser=访问数据库的用户名 WebCalSetupSaved=Webcalendar 设置保存成功。 -WebCalTestOk=成功连接到服务器'%s'的数据库'%s'上,身份用户 '%s'。 +WebCalTestOk=Connection to server '%s' on database '%s' with user '%s' successful. WebCalTestKo1=服务器'%s'连接成功,但无法打开数据库'%s'。 WebCalTestKo2=以用户身份'%s'连接至服务器'%s' 失败。 WebCalErrorConnectOkButWrongDatabase=数据库连接成功,但并不指望成为Webcalendar数据库。 @@ -1119,7 +1125,7 @@ WatermarkOnDraftProposal=为商业计划书草案添加水印(如果空) OrdersSetup=订单管理设置 OrdersNumberingModules=订单编号模块 OrdersModelModule=订单文档模板 -HideTreadedOrders=列表中隐藏已处理或取消的订单 +HideTreadedOrders=Hide the treated or cancelled orders in the list ValidOrderAfterPropalClosed=To validate the order after proposal closer, makes it possible not to step by the provisional order FreeLegalTextOnOrders=订单中的额外说明文本 WatermarkOnDraftOrders=为订单草稿加水印(如果空) @@ -1214,9 +1220,9 @@ LDAPSynchroKO=同步测试失败 LDAPSynchroKOMayBePermissions=同步测试失败。请检查连接服务器已经正确设置并允许LDAP更新 LDAPTCPConnectOK=TCP 连接到 LDAP 服务器连接成功 (服务器=%s, 端口=%s) LDAPTCPConnectKO=TCP 连接到 LDAP 服务器连接失败 (服务器=%s, 端口=%s) -LDAPBindOK=LDAP 服务器连接/认证 成功(服务器=%s,用户=%s,密码=%s) +LDAPBindOK=Connect/Authentificate to LDAP server successful (Server=%s, Port=%s, Admin=%s, Password=%s) LDAPBindKO=LDAP 服务器连接/认证 失败(服务器=%s,用户=%s,密码=%s) -LDAPUnbindSuccessfull=成功断开 +LDAPUnbindSuccessfull=Disconnect successful LDAPUnbindFailed=断开失败 LDAPConnectToDNSuccessfull=成功连接至 DN (%s) LDAPConnectToDNFailed=连接至 DN (%s) 失败 @@ -1273,7 +1279,7 @@ LDAPFieldSidExample=例如:objectSID LDAPFieldEndLastSubscription=订阅结束日期 LDAPFieldTitle=职位/角色 LDAPFieldTitleExample=例如: CXO -LDAPParametersAreStillHardCoded=LDAP 参数仍直接写入了联系人类(Class)的代码中无法修改 +LDAPParametersAreStillHardCoded=LDAP parameters are still hardcoded (in contact class) LDAPSetupNotComplete=LDAP 的安装程序不完整的 (请检查其他选项卡) LDAPNoUserOrPasswordProvidedAccessIsReadOnly=未提供管理员名称或密码LDAP 将以只读模式匿名访问。 LDAPDescContact=此页面中可以定义 Dolibarr 联系人各项数据在 LDAP 树中的 LDAP 属性名称。 @@ -1429,7 +1435,7 @@ OptionVATDefault=标准 OptionVATDebitOption=借记可选服务 OptionVatDefaultDesc=增值税到期:
    - 商品完成交货(按账单的时间)
    - 服务付款 OptionVatDebitOptionDesc=增值税到期:
    - 交货/付款商品 (按账单的时间)
    - 服务的付款明细(借记)发出 -SummaryOfVatExigibilityUsedByDefault=Time of VAT exigibility by default according to choosed option: +SummaryOfVatExigibilityUsedByDefault=Time of VAT exigibility by default according to chosen option: OnDelivery=交货时 OnPayment=付款时 OnInvoice=发出账单时 @@ -1446,7 +1452,7 @@ AccountancyCodeBuy=采购账户代码 AgendaSetup=事件及行程模块设置 PasswordTogetVCalExport=导出链接的授权密钥 PastDelayVCalExport=不要导出事件,如果事件日期旧于 -AGENDA_USE_EVENT_TYPE=Use events types (managed into menu Setup -> Dictionnary -> Type of agenda events) +AGENDA_USE_EVENT_TYPE=Use events types (managed into menu Setup -> Dictionary -> Type of agenda events) ##### ClickToDial ##### ClickToDialDesc=此模块可以在电话号码后添加图标点击此图标将根据您设置的URL呼叫服务器。您可以用此从Dolibarr中拨打呼叫中心系统,例如来通过SIP系统呼叫电话号码。 ##### Point Of Sales (CashDesk) ##### diff --git a/htdocs/langs/zh_CN/contracts.lang b/htdocs/langs/zh_CN/contracts.lang index 6dc6ea473ab..c89675f574a 100644 --- a/htdocs/langs/zh_CN/contracts.lang +++ b/htdocs/langs/zh_CN/contracts.lang @@ -89,6 +89,8 @@ ListOfServicesToExpireWithDuration=在 %s 天内将期满的服务列表 ListOfServicesToExpireWithDurationNeg=服务超过 %s 天过期列表 ListOfServicesToExpire=服务到期列表 NoteListOfYourExpiredServices=此列表只包含你作为一个销售代表与第三方的服务合同 。 +StandardContractsTemplate=Standard contracts template +ContactNameAndSignature=For %s, name and signature: ##### Types de contacts ##### TypeContact_contrat_internal_SALESREPSIGN=销售代表签订合同 diff --git a/htdocs/langs/zh_CN/exports.lang b/htdocs/langs/zh_CN/exports.lang index 5b640973593..e4e11aa02d7 100644 --- a/htdocs/langs/zh_CN/exports.lang +++ b/htdocs/langs/zh_CN/exports.lang @@ -8,7 +8,7 @@ ImportableDatas=导入数据集 SelectExportDataSet=选择您要导出数据集... SelectImportDataSet=选择要导入的数据集... SelectExportFields=选择您要导出字段,或选择一个预定义的出口材 -SelectImportFields=选择源文件要导入的字段在数据库领域的目标通过移动向上和向下与%s的锚,或选择一个预定义的进口材: +SelectImportFields=Choose source file fields you want to import and their target field in database by moving them up and down with anchor %s, or select a predefined import profile: NotImportedFields=田源文件不导入 SaveExportModel=保存这个导出配置,如果你打算以后再用... SaveImportModel=保存这个导入配置文件,如果你打算以后再用... @@ -46,8 +46,8 @@ FormatedExportDesc3=当数据出口都被选中,你可以定义输出文件格 Sheet=片 NoImportableData=没有导入数据(没有定义模块,让数据导入) FileSuccessfullyBuilt=导出生成文件 -# SQLUsedForExport=SQL Request used to build export file -# LineId=Id of line +SQLUsedForExport=SQL Request used to build export file +LineId=Id of line LineDescription=说明线 LineUnitPrice=优惠价线 LineVATRate=增值税率线 @@ -81,7 +81,7 @@ DoNotImportFirstLine=不要进口源文件的第一行 NbOfSourceLines=在源文件的行数 NowClickToTestTheImport=检查输入你所定义的参数。如果他们是正确的,按一下按钮%“S”来启动数据库的导入过程的模拟(无数据将在你改变,这只是一个模拟的时刻)... RunSimulateImportFile=启动进口仿真 -FieldNeedSource=这种感觉需要从源数据库中的数据文件 +FieldNeedSource=This field requires data from the source file SomeMandatoryFieldHaveNoSource=有些领域没有强制性的从数据源文件 InformationOnSourceFile=关于源信息文件 InformationOnTargetTables=在信息领域的目标 @@ -102,19 +102,19 @@ NbOfLinesImported=线成功导入数:%s的 。 DataComeFromNoWhere=值插入来自无处源文件。 DataComeFromFileFieldNb=值插入来自S的源文件%来自外地的数目。 DataComeFromIdFoundFromRef=值%来自外地号码文件 S来源将被用来找到父对象的ID使用(因此,客体%s的具有参考。Dolibarr从源文件必须存在到)。 -# DataComeFromIdFoundFromCodeId=Code that comes from field number %s of source file will be used to find id of parent object to use (So the code from source file must exists into dictionary %s). Note that if you know id, you can also use it into source file instead of code. Import should work in both cases. +DataComeFromIdFoundFromCodeId=Code that comes from field number %s of source file will be used to find id of parent object to use (So the code from source file must exists into dictionary %s). Note that if you know id, you can also use it into source file instead of code. Import should work in both cases. DataIsInsertedInto=未来的数据源文件将被插入到以下领域: DataIDSourceIsInsertedInto=标识对象的家长发现使用源文件中的数据,将被插入到下面的字段: DataCodeIDSourceIsInsertedInto=ID从父行代码中发现,将被插入到下面的字段: SourceRequired=数据值是强制性的 SourceExample=例如可能的数据值 ExampleAnyRefFoundIntoElement=任何ref元素%s -# ExampleAnyCodeOrIdFoundIntoDictionary=Any code (or id) found into dictionary %s +ExampleAnyCodeOrIdFoundIntoDictionary=Any code (or id) found into dictionary %s CSVFormatDesc=逗号分隔值文件格式(。csv格式)。
    这是一个文本文件格式字段被分隔在[%s]分开。如果一个字段分隔符是里面的内容发现,现场是圆形的圆字[%s]。字符转义字符是为了逃避轮[%s]。 Excel95FormatDesc=Excel 文件格式 (.xls)
    这是本地的Excel 95格式 (BIFF5).\n Excel2007FormatDesc=Excel文件格式(.XLSX)
    这是本地的Excel 2007格式(SpreadsheetML)。 TsvFormatDesc=制表符分隔值文件格式(.tsv)
    这是一个字段之间用制表符[tab]分隔的文本文件格式。 -# ExportFieldAutomaticallyAdded=Field %s was automatically added. It will avoid you to have similar lines to be treated as duplicate records (with this field added, all lines will own their own id and will differ). +ExportFieldAutomaticallyAdded=Field %s was automatically added. It will avoid you to have similar lines to be treated as duplicate records (with this field added, all lines will own their own id and will differ). CsvOptions=CSV选项 Separator=分隔符 Enclosure=附件 @@ -123,10 +123,10 @@ BankCode=银行代码 DeskCode=台代码 BankAccountNumber=帐号 BankAccountNumberKey=关键 -# SpecialCode=Special code -# ExportStringFilter=%% allows replacing one or more characters in the text -# ExportDateFilter='YYYY' 'YYYYMM' 'YYYYMMDD': filters by one year/month/day
    'YYYY+YYYY' 'YYYYMM+YYYYMM' 'YYYYMMDD+YYYYMMDD': filters over a range of years/months/days
    '>YYYY' '>YYYYMM' '>YYYYMMDD': filters on the following years/months/days
    '<YYYY' '<YYYYMM' '<YYYYMMDD': filters on the previous years/months/days -# ExportNumericFilter='NNNNN' filters by one value
    'NNNNN+NNNNN' filters over a range of values
    '>NNNNN' filters by lower values
    '>NNNNN' filters by higher values +SpecialCode=Special code +ExportStringFilter=%% allows replacing one or more characters in the text +ExportDateFilter='YYYY' 'YYYYMM' 'YYYYMMDD': filters by one year/month/day
    'YYYY+YYYY' 'YYYYMM+YYYYMM' 'YYYYMMDD+YYYYMMDD': filters over a range of years/months/days
    '>YYYY' '>YYYYMM' '>YYYYMMDD': filters on the following years/months/days
    '<YYYY' '<YYYYMM' '<YYYYMMDD': filters on the previous years/months/days +ExportNumericFilter='NNNNN' filters by one value
    'NNNNN+NNNNN' filters over a range of values
    '>NNNNN' filters by lower values
    '>NNNNN' filters by higher values ## filters SelectFilterFields=如果你想过滤一些值,这里只是输入值。 FilterableFields=筛选字段 diff --git a/htdocs/langs/zh_CN/holiday.lang b/htdocs/langs/zh_CN/holiday.lang index af389a1c3ae..fed57183de2 100644 --- a/htdocs/langs/zh_CN/holiday.lang +++ b/htdocs/langs/zh_CN/holiday.lang @@ -8,7 +8,6 @@ NotActiveModCP=您必须启用假期模块,才能浏览这个页面。 NotConfigModCP=查看此页面,您必须配置模块假期。请点击这里 NoCPforUser=You don't have a demand for holidays. AddCP=申请假期 -CPErrorSQL=An SQL error occurred: Employe=雇员 DateDebCP=开始日期 DateFinCP=结束日期 diff --git a/htdocs/langs/zh_CN/languages.lang b/htdocs/langs/zh_CN/languages.lang index ed21aa99aa3..9282fb9b6b6 100644 --- a/htdocs/langs/zh_CN/languages.lang +++ b/htdocs/langs/zh_CN/languages.lang @@ -19,6 +19,7 @@ Language_en_SA=英语(沙特阿拉伯) Language_en_US=英语(美国) Language_en_ZA=英语(南非) Language_es_ES=西班牙语 +Language_es_DO=Spanish (Dominican Republic) Language_es_AR=西班牙语(阿根廷) Language_es_CL=Spanish (Chile) Language_es_HN=西班牙语(洪都拉斯) @@ -38,6 +39,7 @@ Language_fr_NC=法语(新喀里多尼亚) Language_he_IL=希伯来语 Language_hr_HR=克罗地亚 Language_hu_HU=匈牙利 +Language_id_ID=Indonesian Language_is_IS=冰岛 Language_it_IT=意大利语 Language_ja_JP=日语 diff --git a/htdocs/langs/zh_CN/mails.lang b/htdocs/langs/zh_CN/mails.lang index 488085752f1..447d8021405 100644 --- a/htdocs/langs/zh_CN/mails.lang +++ b/htdocs/langs/zh_CN/mails.lang @@ -79,6 +79,7 @@ MailtoEMail=超链接的电子邮件 ActivateCheckRead=允许使用“取消订阅”链接 ActivateCheckReadKey=“读回执”和“取消订阅”功能键用于加密URL使用 EMailSentToNRecipients=电子邮件发送到 %s 的收件人。 +XTargetsAdded=%s recipients added into target list EachInvoiceWillBeAttachedToEmail=A document using default invoice document template will be created and attached to each email. MailTopicSendRemindUnpaidInvoices=Reminder of invoice %s (%s) SendRemind=Send reminder by EMails diff --git a/htdocs/langs/zh_CN/main.lang b/htdocs/langs/zh_CN/main.lang index 81b06b388dd..350f1b11a46 100644 --- a/htdocs/langs/zh_CN/main.lang +++ b/htdocs/langs/zh_CN/main.lang @@ -551,6 +551,7 @@ MailSentBy=通过电子邮件发送 TextUsedInTheMessageBody=电子邮件正文 SendAcknowledgementByMail=发送的ACK。通过电子邮件 NoEMail=没有电子邮件 +NoMobilePhone=No mobile phone Owner=业主 DetectedVersion=检测到的版本 FollowingConstantsWillBeSubstituted=以下常量将与相应的值代替。 diff --git a/htdocs/langs/zh_CN/products.lang b/htdocs/langs/zh_CN/products.lang index f4bf64efe08..aaa978f6ff7 100644 --- a/htdocs/langs/zh_CN/products.lang +++ b/htdocs/langs/zh_CN/products.lang @@ -28,8 +28,10 @@ ProductsAndServicesStatistics=产品和服务统计 ProductsStatistics=产品统计数据 ProductsOnSell=可用产品 ProductsNotOnSell=淘汰产品 +ProductsOnSellAndOnBuy=Products not for sale nor purchase ServicesOnSell=可用服务 ServicesNotOnSell=淘汰服务 +ServicesOnSellAndOnBuy=Services not for sale nor purchase InternalRef=内部编号 LastRecorded=最近销售的产品/服务 LastRecordedProductsAndServices=最近添加的 %s 项产品/服务 @@ -70,6 +72,8 @@ PublicPrice=公开价格 CurrentPrice=当前价格 NewPrice=新增价格 MinPrice=最低售价 +MinPriceHT=Minim. selling price (net of tax) +MinPriceTTC=Minim. selling price (inc. tax) CantBeLessThanMinPrice=售价不能低于此产品的最低价格 (%s 税前)。此消息也可能在您输入折扣巨大时出现 ContractStatus=合同状态 ContractStatusClosed=已关闭 @@ -179,6 +183,7 @@ ProductIsUsed=此产品已使用 NewRefForClone=新产品/服务的编号 CustomerPrices=销售价格 SuppliersPrices=采购价格 +SuppliersPricesOfProductsOrServices=Suppliers prices (of products or services) CustomCode=海关编码 CountryOrigin=产地国 HiddenIntoCombo=Hidden into select lists @@ -208,6 +213,7 @@ CostPmpHT=Net total VWAP ProductUsedForBuild=因生产自动消耗 ProductBuilded=生产完成 ProductsMultiPrice=产品多重价格 +ProductsOrServiceMultiPrice=Customers prices (of products or services, multi-prices) ProductSellByQuarterHT=Products turnover quarterly VWAP ServiceSellByQuarterHT=Services turnover quarterly VWAP Quarter1=1st. Quarter diff --git a/htdocs/langs/zh_CN/shop.lang b/htdocs/langs/zh_CN/shop.lang index 6cb64a3663c..a51ce042f69 100644 --- a/htdocs/langs/zh_CN/shop.lang +++ b/htdocs/langs/zh_CN/shop.lang @@ -1,4 +1,5 @@ # Dolibarr language file - Source file is en_US - shop +FailedConnectDBCheckModuleSetup=Failed to connect to oscommerce database. Check your module setup Shop=店 ShopWeb=网上商店 LastOrders=最后的订单 diff --git a/htdocs/langs/zh_CN/stocks.lang b/htdocs/langs/zh_CN/stocks.lang index ecbbb43f6ba..fb6d601f545 100644 --- a/htdocs/langs/zh_CN/stocks.lang +++ b/htdocs/langs/zh_CN/stocks.lang @@ -112,6 +112,7 @@ ReplenishmentOrdersDesc=This is list of all opened supplier orders Replenishments=Replenishments NbOfProductBeforePeriod=Quantity of product %s in stock before selected period (< %s) NbOfProductAfterPeriod=Quantity of product %s in stock after selected period (> %s) +MassMovement=Mass movement MassStockMovement=Mass stock movement SelectProductInAndOutWareHouse=Select a product, a quantity, a source warehouse and a target warehouse, then click "%s". Once this is done for all required movements, click onto "%s". RecordMovement=Record transfert diff --git a/htdocs/langs/zh_TW/admin.lang b/htdocs/langs/zh_TW/admin.lang index e305ca2686d..b922a26de19 100644 --- a/htdocs/langs/zh_TW/admin.lang +++ b/htdocs/langs/zh_TW/admin.lang @@ -116,7 +116,7 @@ LanguageBrowserParameter=%s的參數 LocalisationDolibarrParameters=本地化參數 ClientTZ=Client Time Zone (user) ClientHour=Client time (user) -OSTZ=伺服器作業系統時區 +OSTZ=Server OS Time Zone PHPTZ=PHP伺服器時區 PHPServerOffsetWithGreenwich=PHP伺服器抵消寬度格林威治(秒) ClientOffsetWithGreenwich=客戶機/瀏覽器偏移寬度格林威治時間(秒) @@ -233,7 +233,9 @@ OfficialWebSiteFr=法國官方網站 OfficialWiki=Dolibarr維基 OfficialDemo=Dolibarr在線演示 OfficialMarketPlace=官方/插件外部模組市場 -OfficialWebHostingService=Official web hosting services (Cloud hosting) +OfficialWebHostingService=Referenced web hosting services (Cloud hosting) +ReferencedPreferredPartners=Preferred Partners +OtherResources=Autres ressources ForDocumentationSeeWiki=對於用戶或開發人員的文件(文檔,常見問題...),
    看一看在Dolibarr維基看看:
    %s的 ForAnswersSeeForum=對於任何其他問題/幫助,您可以使用Dolibarr論壇:
    %s的 HelpCenterDesc1=這方面可以幫助你獲得一個Dolibarr幫助支持服務。 @@ -369,9 +371,9 @@ ExtrafieldSelectList = Select from table ExtrafieldSeparator=Separator ExtrafieldCheckBox=Checkbox ExtrafieldRadio=Radio button -ExtrafieldParamHelpselect=Parameters list have to be like key,value

    for exemple :
    1,value1
    2,value2
    3,value3
    ...

    In order to have the list depending on another :
    1,value1|parent_list_code:parent_key
    2,value2|parent_list_code:parent_key -ExtrafieldParamHelpcheckbox=Parameters list have to be like key,value

    for exemple :
    1,value1
    2,value2
    3,value3
    ... -ExtrafieldParamHelpradio=Parameters list have to be like key,value

    for exemple :
    1,value1
    2,value2
    3,value3
    ... +ExtrafieldParamHelpselect=Parameters list have to be like key,value

    for example :
    1,value1
    2,value2
    3,value3
    ...

    In order to have the list depending on another :
    1,value1|parent_list_code:parent_key
    2,value2|parent_list_code:parent_key +ExtrafieldParamHelpcheckbox=Parameters list have to be like key,value

    for example :
    1,value1
    2,value2
    3,value3
    ... +ExtrafieldParamHelpradio=Parameters list have to be like key,value

    for example :
    1,value1
    2,value2
    3,value3
    ... ExtrafieldParamHelpsellist=Parameters list comes from a table
    Syntax : table_name:label_field:id_field::filter
    Example : c_typent:libelle:id::filter

    filter can be a simple test (eg active=1) to display only active value
    if you want to filter on extrafields use syntaxt extra.fieldcode=... (where field code is the code of extrafield)

    In order to have the list depending on another :
    c_typent:libelle:id:parent_list_code|parent_column:filter LibraryToBuildPDF=Library used to build PDF WarningUsingFPDF=Warning: Your conf.php contains directive dolibarr_pdf_force_fpdf=1. This means you use the FPDF library to generate PDF files. This library is old and does not support a lot of features (Unicode, image transparency, cyrillic, arab and asiatic languages, ...), so you may experience errors during PDF generation.
    To solve this and have a full support of PDF generation, please download TCPDF library, then comment or remove the line $dolibarr_pdf_force_fpdf=1, and add instead $dolibarr_lib_TCPDF_PATH='path_to_TCPDF_dir' @@ -472,7 +474,7 @@ Module410Desc=Webcalendar一體化 Module500Name=Special expenses (tax, social contributions, dividends) Module500Desc=Management of special expenses like taxes, social contribution, dividends and salaries Module510Name=Salaries -Module510Desc=Management of empoyees salaries and payments +Module510Desc=Management of employees salaries and payments Module600Name=通知 Module600Desc=由一些商業活動的電子郵件發送Dolibarr通知給第三方的交往 Module700Name=捐贈 @@ -495,15 +497,15 @@ Module2400Name=議程 Module2400Desc=行動/任務和議程管理 Module2500Name=電子內容管理 Module2500Desc=保存和共享文件 -Module2600Name= 的WebServices -Module2600Desc= 啟用Web服務的服務器Dolibarr -Module2700Name= 的Gravatar -Module2700Desc= 使用網上的Gravatar服務(www.gravatar.com),以顯示/成員(與他們的電子郵件用戶發現照片)。需要一個互聯網接入 +Module2600Name=的WebServices +Module2600Desc=啟用Web服務的服務器Dolibarr +Module2700Name=的Gravatar +Module2700Desc=使用網上的Gravatar服務(www.gravatar.com),以顯示/成員(與他們的電子郵件用戶發現照片)。需要一個互聯網接入 Module2800Desc=FTP Client -Module2900Name= GeoIPMaxmind -Module2900Desc= geoip的Maxmind轉換能力 -Module3100Name= Skype -Module3100Desc= Add a Skype button into card of adherents / third parties / contacts +Module2900Name=GeoIPMaxmind +Module2900Desc=geoip的Maxmind轉換能力 +Module3100Name=Skype +Module3100Desc=Add a Skype button into card of adherents / third parties / contacts Module5000Name=多公司 Module5000Desc=允許你管理多個公司 Module6000Name=Workflow @@ -681,6 +683,10 @@ Permission401=閲讀折扣 Permission402=建立/修改折扣 Permission403=驗證折扣 Permission404=刪除折扣 +Permission510=Read Salaries +Permission512=Create/modify salaries +Permission514=Delete salaries +Permission517=Export salaries Permission531=閲讀服務 Permission532=建立/修改服務 Permission534=刪除服務 @@ -999,7 +1005,7 @@ ExtraFieldsSupplierOrders=Complementary attributes (orders) ExtraFieldsSupplierInvoices=Complementary attributes (invoices) ExtraFieldsProject=Complementary attributes (projects) ExtraFieldsProjectTask=Complementary attributes (tasks) -ExtraFieldHasWrongValue=attribut %s有一個錯誤的值。 +ExtraFieldHasWrongValue=Attribute %s has a wrong value. AlphaNumOnlyCharsAndNoSpace=only alphanumericals characters without space AlphaNumOnlyLowerCharsAndNoSpace=only alphanumericals and lower case characters without space SendingMailSetup=通過電子郵件的設置sendings @@ -1018,13 +1024,13 @@ SuhosinSessionEncrypt=Session storage encrypted by Suhosin ConditionIsCurrently=Condition is currently %s TestNotPossibleWithCurrentBrowsers=Automatic detection not possible YouUseBestDriver=You use driver %s that is best driver available currently. -YouDoNotUseBestDriver=You use drive %s but driver %s is recommanded. +YouDoNotUseBestDriver=You use drive %s but driver %s is recommended. NbOfProductIsLowerThanNoPb=You have only %s products/services into database. This does not required any particular optimization. SearchOptim=Search optimization YouHaveXProductUseSearchOptim=You have %s product into database. You should add the constant PRODUCT_DONOTSEARCH_ANYWHERE to 1 into Home-Setup-Other, you limit the search to the beginning of strings making possible for database to use index and you should get an immediate response. BrowserIsOK=You are using the web browser %s. This browser is ok for security and performance. BrowserIsKO=You are using the web browser %s. This browser is known to be a bad choice for security, performance and reliability. We recommand you to use Firefox, Chrome, Opera or Safari. -XDebugInstalled=XDebug est chargé. +XDebugInstalled=XDebug is loaded. XCacheInstalled=XCache is loaded. AddRefInList=Display customer/supplier ref into list (select list or combobox) and most of hyperlink FieldEdition=Edition of field %s @@ -1073,7 +1079,7 @@ WebCalServer=服務器託管日曆數據庫 WebCalDatabaseName=數據庫名稱 WebCalUser=用戶訪問數據庫 WebCalSetupSaved=Webcalendar設置保存成功。 -WebCalTestOk=連接到服務器'%s'於資料庫'用戶'%s'的%s'的成功。 +WebCalTestOk=Connection to server '%s' on database '%s' with user '%s' successful. WebCalTestKo1=連接到服務器'%s'的成功,但是數據庫'%s'的無法達成。 WebCalTestKo2=連接到服務器'%s的與用戶'%s'的失敗。 WebCalErrorConnectOkButWrongDatabase=數據庫連接成功,但並不指望成為Webcalendar數據庫。 @@ -1119,7 +1125,7 @@ WatermarkOnDraftProposal=Watermark on draft commercial proposals (none if empty) OrdersSetup=設定訂單管理模組 OrdersNumberingModules=訂單編號模組 OrdersModelModule=訂單文件範本 -HideTreadedOrders=隱藏在治療或取消訂單的名單 +HideTreadedOrders=Hide the treated or cancelled orders in the list ValidOrderAfterPropalClosed=為了驗證該命令後,建議密切,使得它可以不一步的臨時命令 FreeLegalTextOnOrders=可在下面輸入額外的訂單資訊 WatermarkOnDraftOrders=Watermark on draft orders (none if empty) @@ -1214,9 +1220,9 @@ LDAPSynchroKO=同步測試失敗 LDAPSynchroKOMayBePermissions=同步失敗的考驗。檢查聯接到服務器的正確配置,並允許LDAP的udpates LDAPTCPConnectOK=TCP連接到LDAP服務器的成功(服務器=%s連接埠=%s)的 LDAPTCPConnectKO=TCP連接到LDAP服務器失敗(服務器=%s連接埠=%s)的 -LDAPBindOK=連接/ Authentificate到LDAP服務器的成功(服務器=%s連接埠=%s後,管理員=%s的,密碼=%s)的 +LDAPBindOK=Connect/Authentificate to LDAP server successful (Server=%s, Port=%s, Admin=%s, Password=%s) LDAPBindKO=連接/ Authentificate到LDAP服務器失敗(服務器=%s連接埠=%s後,管理員=%s的,密碼=%s)的 -LDAPUnbindSuccessfull=斷開成功 +LDAPUnbindSuccessfull=Disconnect successful LDAPUnbindFailed=斷開失敗 LDAPConnectToDNSuccessfull=連接區的DN(%s)的裡¿ ½ ussie LDAPConnectToDNFailed=連接區的DN(%s的)我¿ ½ ¿ ½ é草衣 @@ -1273,7 +1279,7 @@ LDAPFieldSidExample=例如:的objectSID LDAPFieldEndLastSubscription=認購結束日期 LDAPFieldTitle=職位/職務 LDAPFieldTitleExample=Example: title -LDAPParametersAreStillHardCoded=LDAP的規範,仍然是硬編碼(接觸類) +LDAPParametersAreStillHardCoded=LDAP parameters are still hardcoded (in contact class) LDAPSetupNotComplete=LDAP的安裝程序不完整的(對別人去標籤) LDAPNoUserOrPasswordProvidedAccessIsReadOnly=沒有管理員或密碼。 LDAP的訪問將是匿名的,在只讀模式。 LDAPDescContact=此頁面允許您定義的LDAP屬性的LDAP樹就Dolibarr接觸發現每個數據的名稱。 @@ -1429,7 +1435,7 @@ OptionVATDefault=標準 OptionVATDebitOption=在收費服務選項 OptionVatDefaultDesc=增值稅是因為:
    - 交貨/付款商品
    - 關於服務費 OptionVatDebitOptionDesc=增值稅是因為:
    - 交貨/付款商品
    - 對發票(付款)服務 -SummaryOfVatExigibilityUsedByDefault=增值稅exigibility時間根據選用預設選項: +SummaryOfVatExigibilityUsedByDefault=Time of VAT exigibility by default according to chosen option: OnDelivery=交貨 OnPayment=關於付款 OnInvoice=關於發票 @@ -1446,7 +1452,7 @@ AccountancyCodeBuy=Purchase account. code AgendaSetup=模組設置的行動和議程 PasswordTogetVCalExport=授權出口的關鍵環節 PastDelayVCalExport=不要以上出口事件 -AGENDA_USE_EVENT_TYPE=Use events types (managed into menu Setup -> Dictionnary -> Type of agenda events) +AGENDA_USE_EVENT_TYPE=Use events types (managed into menu Setup -> Dictionary -> Type of agenda events) ##### ClickToDial ##### ClickToDialDesc=這個模組允許添加後Dolibarr聯繫電話號碼的圖標。關於這個圖標,會調用一個特定的URL serveur您定義如下。這可以用來調用一個從Dolibarr呼叫中心繫統,可致電1例如SIP系統的電話號碼。 ##### Point Of Sales (CashDesk) ##### diff --git a/htdocs/langs/zh_TW/contracts.lang b/htdocs/langs/zh_TW/contracts.lang index 0b8d48af4db..9d5a60567c5 100644 --- a/htdocs/langs/zh_TW/contracts.lang +++ b/htdocs/langs/zh_TW/contracts.lang @@ -38,7 +38,7 @@ ConfirmCloseService=您確定要關閉這項服務與日期%s嗎 ? ValidateAContract=驗證合同 ActivateService=激活服務 ConfirmActivateService=你確定要激活這項服務的日期%s嗎 ? -# RefContract=Contract reference +RefContract=Contract reference DateContract=合同日期 DateServiceActivate=服務激活日期 DateServiceUnactivate=服務停用日期 @@ -85,10 +85,12 @@ PaymentRenewContractId=續訂合同線(%s的數目) ExpiredSince=失效日期 RelatedContracts=有關合同 NoExpiredServices=沒有過期的主動服務 -# ListOfServicesToExpireWithDuration=List of Services to expire in %s days -# ListOfServicesToExpireWithDurationNeg=List of Services expired from more than %s days -# ListOfServicesToExpire=List of Services to expire -# NoteListOfYourExpiredServices=This list contains only services of contracts for third parties you are linked to as a sale representative. +ListOfServicesToExpireWithDuration=List of Services to expire in %s days +ListOfServicesToExpireWithDurationNeg=List of Services expired from more than %s days +ListOfServicesToExpire=List of Services to expire +NoteListOfYourExpiredServices=This list contains only services of contracts for third parties you are linked to as a sale representative. +StandardContractsTemplate=Standard contracts template +ContactNameAndSignature=For %s, name and signature: ##### Types de contacts ##### TypeContact_contrat_internal_SALESREPSIGN=銷售代表簽訂合同 diff --git a/htdocs/langs/zh_TW/exports.lang b/htdocs/langs/zh_TW/exports.lang index a900ad66463..742c41d219f 100644 --- a/htdocs/langs/zh_TW/exports.lang +++ b/htdocs/langs/zh_TW/exports.lang @@ -8,7 +8,7 @@ ImportableDatas=匯入資料集 SelectExportDataSet=選擇您要匯出的資料集... SelectImportDataSet=選擇要匯入的資料集... SelectExportFields=選擇您要匯出的欄位,或選擇一個事先定義的配置檔 -SelectImportFields=選擇您要匯入的來源欄位及目標欄位,您可藉由上下移動欄位(箭頭)的方式來調整,或選擇一個事先定義匯入配置檔。 +SelectImportFields=Choose source file fields you want to import and their target field in database by moving them up and down with anchor %s, or select a predefined import profile: NotImportedFields=來源檔案的欄位沒有被匯入 SaveExportModel=儲存這個匯出配置檔,如果您打算以後再使用... SaveImportModel=儲存這個匯入配置檔,如果您打算以後再用... @@ -45,9 +45,9 @@ FormatedExportDesc2=第一步是選擇一個事先定義的資料集,然後選 FormatedExportDesc3=當欲匯出的資料被選擇完成後,你可以定義匯出文件的格式。 Sheet=表 NoImportableData=沒有可匯入的資料(模組沒有此定義允許您匯入) -# FileSuccessfullyBuilt=Export file generated -# SQLUsedForExport=SQL Request used to build export file -# LineId=Id of line +FileSuccessfullyBuilt=Export file generated +SQLUsedForExport=SQL Request used to build export file +LineId=Id of line LineDescription=說明線 LineUnitPrice=優惠價線 LineVATRate=增值稅率線 @@ -64,7 +64,7 @@ ChooseFormatOfFileToImport=利用點選 %s 圖示的方式,選擇欲匯入檔 ChooseFileToImport=上傳檔案,然後點選 %s 圖示來選擇欲匯入來源檔案 SourceFileFormat=來源檔案格式 FieldsInSourceFile=來源檔案的欄位清單 -# FieldsInTargetDatabase=Target fields in Dolibarr database (bold=mandatory) +FieldsInTargetDatabase=Target fields in Dolibarr database (bold=mandatory) Field=欄位 NoFields=沒有欄位 MoveField=移動欄位的行號 %s @@ -81,7 +81,7 @@ DoNotImportFirstLine=不要匯入來源檔案的第一行 NbOfSourceLines=來源檔案的行數 NowClickToTestTheImport=請檢查你已經定義的匯入參數。如果確認無誤,請按一下%s按鈕,來啟動模擬資料庫匯入(按下後只是先模擬,並不會有任何資料不改變) RunSimulateImportFile=啟動模擬資料庫匯入 -FieldNeedSource=這種感覺需要從源數據庫中的數據文件 +FieldNeedSource=This field requires data from the source file SomeMandatoryFieldHaveNoSource=有些領域沒有強制性的從數據源文件 InformationOnSourceFile=關於來源檔案的資訊 InformationOnTargetTables=目標欄位的資訊 @@ -102,33 +102,33 @@ NbOfLinesImported=線成功導入數:%s的 。 DataComeFromNoWhere=值插入來自無處源文件。 DataComeFromFileFieldNb=值插入來自S的源文件%來自外地的數目。 DataComeFromIdFoundFromRef=值%來自外地號碼文件 S來源將被用來找到父對象的ID使用(因此,客體%s的具有參考。Dolibarr從源文件必須存在到)。 -# DataComeFromIdFoundFromCodeId=Code that comes from field number %s of source file will be used to find id of parent object to use (So the code from source file must exists into dictionary %s). Note that if you know id, you can also use it into source file instead of code. Import should work in both cases. +DataComeFromIdFoundFromCodeId=Code that comes from field number %s of source file will be used to find id of parent object to use (So the code from source file must exists into dictionary %s). Note that if you know id, you can also use it into source file instead of code. Import should work in both cases. DataIsInsertedInto=未來的數據源文件將被插入到以下領域: DataIDSourceIsInsertedInto=標識對象的家長發現使用源文件中的數據,將被插入到下面的字段: DataCodeIDSourceIsInsertedInto=ID從父行代碼中發現,將被插入到下面的字段: SourceRequired=資料值是強制性的 SourceExample=可能的資料值範例 ExampleAnyRefFoundIntoElement=任何ref元素%s -# ExampleAnyCodeOrIdFoundIntoDictionary=Any code (or id) found into dictionary %s +ExampleAnyCodeOrIdFoundIntoDictionary=Any code (or id) found into dictionary %s CSVFormatDesc=逗號分隔檔案格式(csv格式)。
    這是一個被[%s]所分隔的存文字格式檔案。如果欄位內容本身含有分隔字元,則此分隔字元會被[%s]所包圍。用來 escape 包圍用的Escape 字元為[%s]。 -# Excel95FormatDesc=Excel file format (.xls)
    This is native Excel 95 format (BIFF5). -# Excel2007FormatDesc=Excel file format (.xlsx)
    This is native Excel 2007 format (SpreadsheetML). -# TsvFormatDesc=Tab Separated Value file format (.tsv)
    This is a text file format where fields are separated by a tabulator [tab]. -# ExportFieldAutomaticallyAdded=Field %s was automatically added. It will avoid you to have similar lines to be treated as duplicate records (with this field added, all lines will own their own id and will differ). -# CsvOptions=Csv Options -# Separator=Separator -# Enclosure=Enclosure -# SuppliersProducts=Suppliers Products +Excel95FormatDesc=Excel file format (.xls)
    This is native Excel 95 format (BIFF5). +Excel2007FormatDesc=Excel file format (.xlsx)
    This is native Excel 2007 format (SpreadsheetML). +TsvFormatDesc=Tab Separated Value file format (.tsv)
    This is a text file format where fields are separated by a tabulator [tab]. +ExportFieldAutomaticallyAdded=Field %s was automatically added. It will avoid you to have similar lines to be treated as duplicate records (with this field added, all lines will own their own id and will differ). +CsvOptions=Csv Options +Separator=Separator +Enclosure=Enclosure +SuppliersProducts=Suppliers Products BankCode=銀行代碼 DeskCode=臺代碼 BankAccountNumber=帳號 BankAccountNumberKey=關鍵 -# SpecialCode=Special code -# ExportStringFilter=%% allows replacing one or more characters in the text -# ExportDateFilter='YYYY' 'YYYYMM' 'YYYYMMDD': filters by one year/month/day
    'YYYY+YYYY' 'YYYYMM+YYYYMM' 'YYYYMMDD+YYYYMMDD': filters over a range of years/months/days
    '>YYYY' '>YYYYMM' '>YYYYMMDD': filters on the following years/months/days
    '<YYYY' '<YYYYMM' '<YYYYMMDD': filters on the previous years/months/days -# ExportNumericFilter='NNNNN' filters by one value
    'NNNNN+NNNNN' filters over a range of values
    '>NNNNN' filters by lower values
    '>NNNNN' filters by higher values +SpecialCode=Special code +ExportStringFilter=%% allows replacing one or more characters in the text +ExportDateFilter='YYYY' 'YYYYMM' 'YYYYMMDD': filters by one year/month/day
    'YYYY+YYYY' 'YYYYMM+YYYYMM' 'YYYYMMDD+YYYYMMDD': filters over a range of years/months/days
    '>YYYY' '>YYYYMM' '>YYYYMMDD': filters on the following years/months/days
    '<YYYY' '<YYYYMM' '<YYYYMMDD': filters on the previous years/months/days +ExportNumericFilter='NNNNN' filters by one value
    'NNNNN+NNNNN' filters over a range of values
    '>NNNNN' filters by lower values
    '>NNNNN' filters by higher values ## filters -# SelectFilterFields=If you want to filter on some values, just input values here. -# FilterableFields=Champs Filtrables -# FilteredFields=Filtered fields -# FilteredFieldsValues=Value for filter +SelectFilterFields=If you want to filter on some values, just input values here. +FilterableFields=Champs Filtrables +FilteredFields=Filtered fields +FilteredFieldsValues=Value for filter diff --git a/htdocs/langs/zh_TW/holiday.lang b/htdocs/langs/zh_TW/holiday.lang index cd896233a54..8eaba699e0a 100644 --- a/htdocs/langs/zh_TW/holiday.lang +++ b/htdocs/langs/zh_TW/holiday.lang @@ -8,7 +8,6 @@ NotActiveModCP=You must enable the module holidays to view this page. NotConfigModCP=You must configure the module holidays to view this page. To do this, click here . NoCPforUser=You don't have a demand for holidays. AddCP=Apply for holidays -CPErrorSQL=An SQL error occurred: Employe=Employee DateDebCP=開始日期 DateFinCP=結束日期 diff --git a/htdocs/langs/zh_TW/languages.lang b/htdocs/langs/zh_TW/languages.lang index 7529a61a1e8..aba37864139 100644 --- a/htdocs/langs/zh_TW/languages.lang +++ b/htdocs/langs/zh_TW/languages.lang @@ -19,6 +19,7 @@ Language_en_SA=英语 (沙特阿拉伯) Language_en_US=英語(美國) Language_en_ZA=英语 (南非) Language_es_ES=西班牙語 +Language_es_DO=Spanish (Dominican Republic) Language_es_AR=西班牙語(阿根廷) Language_es_CL=Spanish (Chile) Language_es_HN=西班牙語(洪都拉斯) @@ -38,6 +39,7 @@ Language_fr_NC=法国 (新喀里多尼亚) Language_he_IL=希伯来语 Language_hr_HR=克罗地亚 Language_hu_HU=匈牙利 +Language_id_ID=Indonesian Language_is_IS=冰島 Language_it_IT=意大利語 Language_ja_JP=日語 diff --git a/htdocs/langs/zh_TW/mails.lang b/htdocs/langs/zh_TW/mails.lang index ee9dc6dee2b..0b6f99c6339 100644 --- a/htdocs/langs/zh_TW/mails.lang +++ b/htdocs/langs/zh_TW/mails.lang @@ -79,6 +79,7 @@ MailtoEMail=Hyper link to email ActivateCheckRead=Allow to use the "Unsubcribe" link ActivateCheckReadKey=Key use to encrypt URL use for "Read Receipt" and "Unsubcribe" feature EMailSentToNRecipients=EMail sent to %s recipients. +XTargetsAdded=%s recipients added into target list EachInvoiceWillBeAttachedToEmail=A document using default invoice document template will be created and attached to each email. MailTopicSendRemindUnpaidInvoices=Reminder of invoice %s (%s) SendRemind=Send reminder by EMails diff --git a/htdocs/langs/zh_TW/main.lang b/htdocs/langs/zh_TW/main.lang index e152b79fd55..d944af34cd3 100644 --- a/htdocs/langs/zh_TW/main.lang +++ b/htdocs/langs/zh_TW/main.lang @@ -551,6 +551,7 @@ MailSentBy=通過電子郵件發送 TextUsedInTheMessageBody=電子郵件正文 SendAcknowledgementByMail=發送的ACK。通過電子郵件 NoEMail=沒有電子郵件 +NoMobilePhone=No mobile phone Owner=業主 DetectedVersion=檢測到的版本 FollowingConstantsWillBeSubstituted=以下常量將與相應的值代替。 diff --git a/htdocs/langs/zh_TW/products.lang b/htdocs/langs/zh_TW/products.lang index a8fc99b9ed4..cf332a9d0fd 100644 --- a/htdocs/langs/zh_TW/products.lang +++ b/htdocs/langs/zh_TW/products.lang @@ -28,8 +28,10 @@ ProductsAndServicesStatistics=產品與服務的統計數字 ProductsStatistics=產品統計 ProductsOnSell=可用產品 ProductsNotOnSell=已停產的產品 +ProductsOnSellAndOnBuy=Products not for sale nor purchase ServicesOnSell=服務可銷售 ServicesNotOnSell=服務不可銷售 +ServicesOnSellAndOnBuy=Services not for sale nor purchase InternalRef=內部參考 LastRecorded=最新產品/服務的銷售記錄 LastRecordedProductsAndServices=上次%s的記錄產品/服務 @@ -70,6 +72,8 @@ PublicPrice=公眾價格 CurrentPrice=時價 NewPrice=新價格 MinPrice=最低售價 +MinPriceHT=Minim. selling price (net of tax) +MinPriceTTC=Minim. selling price (inc. tax) CantBeLessThanMinPrice=售價不能超過該產品(%s的允許在沒有稅收的最低水平) ContractStatus=合同地位 ContractStatusClosed=關閉 @@ -179,6 +183,7 @@ ProductIsUsed=該產品是用於 NewRefForClone=新的產品/服務編號 CustomerPrices=銷售價格 SuppliersPrices=採購價格 +SuppliersPricesOfProductsOrServices=Suppliers prices (of products or services) CustomCode=進出口報關海關代碼 CountryOrigin=原產地 HiddenIntoCombo=隱藏選擇列表 @@ -208,6 +213,7 @@ CostPmpHT=Net total VWAP ProductUsedForBuild=Auto consumed by production ProductBuilded=Production completed ProductsMultiPrice=Product multi-price +ProductsOrServiceMultiPrice=Customers prices (of products or services, multi-prices) ProductSellByQuarterHT=Products turnover quarterly VWAP ServiceSellByQuarterHT=Services turnover quarterly VWAP Quarter1=1st. Quarter diff --git a/htdocs/langs/zh_TW/shop.lang b/htdocs/langs/zh_TW/shop.lang index c8694644bac..df0cf54c4cc 100644 --- a/htdocs/langs/zh_TW/shop.lang +++ b/htdocs/langs/zh_TW/shop.lang @@ -1,4 +1,5 @@ # Dolibarr language file - Source file is en_US - shop +FailedConnectDBCheckModuleSetup=Failed to connect to oscommerce database. Check your module setup Shop=店 ShopWeb=網上商店 LastOrders=最後的訂單 diff --git a/htdocs/langs/zh_TW/stocks.lang b/htdocs/langs/zh_TW/stocks.lang index 9062243f748..ac14bece65c 100644 --- a/htdocs/langs/zh_TW/stocks.lang +++ b/htdocs/langs/zh_TW/stocks.lang @@ -112,6 +112,7 @@ ReplenishmentOrdersDesc=This is list of all opened supplier orders Replenishments=Replenishments NbOfProductBeforePeriod=Quantity of product %s in stock before selected period (< %s) NbOfProductAfterPeriod=Quantity of product %s in stock after selected period (> %s) +MassMovement=Mass movement MassStockMovement=Mass stock movement SelectProductInAndOutWareHouse=Select a product, a quantity, a source warehouse and a target warehouse, then click "%s". Once this is done for all required movements, click onto "%s". RecordMovement=Record transfert diff --git a/htdocs/main.inc.php b/htdocs/main.inc.php index 851e050fa64..948f200349c 100644 --- a/htdocs/main.inc.php +++ b/htdocs/main.inc.php @@ -361,16 +361,16 @@ if (! defined('NOLOGIN')) // It is not already authenticated and it requests the login / password include_once DOL_DOCUMENT_ROOT.'/core/lib/security2.lib.php'; - $dol_dst_observed=GETPOST("dst_observed",3); - $dol_dst_first=GETPOST("dst_first",3); - $dol_dst_second=GETPOST("dst_second",3); - $dol_screenwidth=GETPOST("screenwidth",3); - $dol_screenheight=GETPOST("screenheight",3); - $dol_hide_topmenu=GETPOST('dol_hide_topmenu',3); - $dol_hide_leftmenu=GETPOST('dol_hide_leftmenu',3); - $dol_optimize_smallscreen=GETPOST('dol_optimize_smallscreen',3); - $dol_no_mouse_hover=GETPOST('dol_no_mouse_hover',3); - $dol_use_jmobile=GETPOST('dol_use_jmobile',3); + $dol_dst_observed=GETPOST("dst_observed",'int',3); + $dol_dst_first=GETPOST("dst_first",'int',3); + $dol_dst_second=GETPOST("dst_second",'int',3); + $dol_screenwidth=GETPOST("screenwidth",'int',3); + $dol_screenheight=GETPOST("screenheight",'int',3); + $dol_hide_topmenu=GETPOST('dol_hide_topmenu','int',3); + $dol_hide_leftmenu=GETPOST('dol_hide_leftmenu','int',3); + $dol_optimize_smallscreen=GETPOST('dol_optimize_smallscreen','int',3); + $dol_no_mouse_hover=GETPOST('dol_no_mouse_hover','int',3); + $dol_use_jmobile=GETPOST('dol_use_jmobile','int',3); //dol_syslog("POST key=".join(array_keys($_POST),',').' value='.join($_POST,',')); // If in demo mode, we check we go to home page through the public/demo/index.php page @@ -891,11 +891,11 @@ if (! function_exists("llxHeader")) top_htmlhead($head, $title, $disablejs, $disablehead, $arrayofjs, $arrayofcss); // top menu and left menu area - if (empty($conf->global->MAIN_HIDE_TOP_MENU)) + if (empty($conf->dol_hide_topmenu)) { top_menu($head, $title, $target, $disablejs, $disablehead, $arrayofjs, $arrayofcss, $morequerystring); } - if (empty($conf->global->MAIN_HIDE_LEFT_MENU)) + if (empty($conf->dol_hide_leftmenu)) { left_menu('', $help_url, '', '', 1, $title); } @@ -1037,11 +1037,11 @@ function top_htmlhead($head, $title='', $disablejs=0, $disablehead=0, $arrayofjs $themeparam='?lang='.$langs->defaultlang.'&theme='.$conf->theme.(GETPOST('optioncss')?'&optioncss='.GETPOST('optioncss','alpha',1):'').'&userid='.$user->id.'&entity='.$conf->entity; $themeparam.=($ext?'&'.$ext:''); if (! empty($_SESSION['dol_resetcache'])) $themeparam.='&dol_resetcache='.$_SESSION['dol_resetcache']; - if (GETPOST('dol_hide_topmenu')) { $themeparam.='&dol_hide_topmenu='.GETPOST('dol_hide_topmenu'); } - if (GETPOST('dol_hide_leftmenu')) { $themeparam.='&dol_hide_leftmenu='.GETPOST('dol_hide_leftmenu'); } - if (GETPOST('dol_optimize_smallscreen')) { $themeparam.='&dol_optimize_smallscreen='.GETPOST('dol_optimize_smallscreen'); } - if (GETPOST('dol_no_mouse_hover')) { $themeparam.='&dol_no_mouse_hover='.GETPOST('dol_no_mouse_hover'); } - if (GETPOST('dol_use_jmobile')) { $themeparam.='&dol_use_jmobile='.GETPOST('dol_use_jmobile'); $conf->dol_use_jmobile=GETPOST('dol_use_jmobile'); } + if (GETPOST('dol_hide_topmenu')) { $themeparam.='&dol_hide_topmenu='.GETPOST('dol_hide_topmenu','int'); } + if (GETPOST('dol_hide_leftmenu')) { $themeparam.='&dol_hide_leftmenu='.GETPOST('dol_hide_leftmenu','int'); } + if (GETPOST('dol_optimize_smallscreen')) { $themeparam.='&dol_optimize_smallscreen='.GETPOST('dol_optimize_smallscreen','int'); } + if (GETPOST('dol_no_mouse_hover')) { $themeparam.='&dol_no_mouse_hover='.GETPOST('dol_no_mouse_hover','int'); } + if (GETPOST('dol_use_jmobile')) { $themeparam.='&dol_use_jmobile='.GETPOST('dol_use_jmobile','int'); $conf->dol_use_jmobile=GETPOST('dol_use_jmobile','int'); } //print 'themepath='.$themepath.' themeparam='.$themeparam;exit; print ''."\n"; @@ -1825,7 +1825,7 @@ if (! function_exists("llxFooter")) * @param string $zone 'private' (for private pages) or 'public' (for public pages) * @return void */ - function llxFooter($comment='',$zone='pivate') + function llxFooter($comment='',$zone='private') { global $conf, $langs; diff --git a/htdocs/master.inc.php b/htdocs/master.inc.php index 5d9babd0e89..3c2424ed88a 100644 --- a/htdocs/master.inc.php +++ b/htdocs/master.inc.php @@ -160,19 +160,22 @@ if (! defined('NOREQUIREDB')) { $conf->entity = GETPOST("entity",'int'); } - else if (defined('DOLENTITY') && is_int(DOLENTITY)) // For public page with MultiCompany module + else if (defined('DOLENTITY') && is_numeric(DOLENTITY)) // For public page with MultiCompany module { $conf->entity = DOLENTITY; } - else if (!empty($_COOKIE['DOLENTITY'])) // For other application with MultiCompany module + else if (!empty($_COOKIE['DOLENTITY'])) // For other application with MultiCompany module (TODO: We should remove this. entity to use should never be stored into client side) { $conf->entity = $_COOKIE['DOLENTITY']; } - else if (! empty($conf->multicompany->force_entity) && is_int($conf->multicompany->force_entity)) // To force entity in login page + else if (! empty($conf->multicompany->force_entity) && is_numeric($conf->multicompany->force_entity)) // To force entity in login page { $conf->entity = $conf->multicompany->force_entity; } + // Sanitize entity + if (! is_numeric($conf->entity)) $conf->entity=1; + //print "Will work with data into entity instance number '".$conf->entity."'"; // Here we read database (llx_const table) and define $conf->global->XXX var. diff --git a/htdocs/product/class/product.class.php b/htdocs/product/class/product.class.php index 5eaf183428d..1ba5f7b2283 100644 --- a/htdocs/product/class/product.class.php +++ b/htdocs/product/class/product.class.php @@ -269,7 +269,7 @@ class Product extends CommonObject // Barcode value $this->barcode=trim($this->barcode); - + // Check parameters if (empty($this->libelle)) { @@ -309,11 +309,11 @@ class Product extends CommonObject // For automatic creation during create action (not used by Dolibarr GUI, can be used by scripts) if ($this->barcode == -1) $this->barcode = $this->get_barcode($this,$this->barcode_type_code); - + // Check more parameters // If error, this->errors[] is filled $result = $this->verify(); - + if ($result >= 0) { $sql = "SELECT count(*) as nb"; @@ -520,7 +520,7 @@ class Product extends CommonObject } $mod = new $module(); - + dol_syslog(get_class($this)."::check_barcode value=".$valuetotest." type=".$typefortest." module=".$module); $result = $mod->verif($this->db, $valuetotest, $this, 0, $typefortest); return $result; @@ -586,7 +586,7 @@ class Product extends CommonObject { $result = $this->verify(); // We don't check when update called during a create because verify was already done } - + if ($result >= 0) { // For automatic creation @@ -600,7 +600,7 @@ class Product extends CommonObject $sql.= ", recuperableonly = " . $this->tva_npr; $sql.= ", localtax1_tx = " . $this->localtax1_tx; $sql.= ", localtax2_tx = " . $this->localtax2_tx; - + $sql.= ", barcode = ". (empty($this->barcode)?"null":"'".$this->db->escape($this->barcode)."'"); $sql.= ", fk_barcode_type = ". (empty($this->barcode_type)?"null":$this->db->escape($this->barcode_type)); @@ -627,7 +627,7 @@ class Product extends CommonObject $sql.= ", accountancy_code_sell= '" . $this->accountancy_code_sell."'"; $sql.= ", desiredstock = " . ((isset($this->desiredstock) && $this->desiredstock != '') ? $this->desiredstock : "null"); $sql.= " WHERE rowid = " . $id; - + dol_syslog(get_class($this)."update sql=".$sql); $resql=$this->db->query($sql); if ($resql) @@ -859,7 +859,7 @@ class Product extends CommonObject } /** - * Update ou cree les traductions des infos produits + * Update or add a translation for a product * * @return int <0 if KO, >0 if OK */ @@ -936,6 +936,29 @@ class Product extends CommonObject return 1; } + /** + * Delete a language for this product + * + * @param string $langtodelete Language to delete + * @return int <0 if KO, >0 if OK + */ + function delMultiLangs($langtodelete) + { + $sql = "DELETE FROM ".MAIN_DB_PREFIX."product_lang"; + $sql.= " WHERE fk_product=".$this->id." AND lang='".$this->db->escape($langtodelete)."'"; + + dol_syslog("Delete translation sql=".$sql); + $result = $this->db->query($sql); + if ($result) + { + return 1; + } + else + { + $this->error="Error: ".$this->db->error()." - ".$sql; + return -1; + } + } /** * Load array this->multilangs @@ -973,7 +996,7 @@ class Product extends CommonObject } else { - $this->error=$langs->trans("Error")." : ".$this->db->error()." - ".$sql; + $this->error="Error: ".$this->db->error()." - ".$sql; return -1; } } @@ -1043,14 +1066,14 @@ class Product extends CommonObject /** - * Lit le prix pratique par un fournisseur - * On renseigne le couple prodfournprice/qty ou le triplet qty/product_id/fourn_ref + * Read price used by a provider + * We enter as input couple prodfournprice/qty or triplet qty/product_id/fourn_ref * * @param int $prodfournprice Id du tarif = rowid table product_fournisseur_price * @param double $qty Quantity asked * @param int $product_id Filter on a particular product id * @param string $fourn_ref Filter on a supplier ref - * @return int <-1 if KO, -1 if qty not enough, 0 si ok mais rien trouve, id_product si ok et trouve + * @return int <-1 if KO, -1 if qty not enough, 0 si ok mais rien trouve, id_product si ok et trouve. May also initialize some properties like (->ref_supplier, buyprice, fourn_pu, vatrate_supplier...) */ function get_buyprice($prodfournprice,$qty,$product_id=0,$fourn_ref=0) { @@ -1081,7 +1104,7 @@ class Product extends CommonObject { // We do same select again but searching with qty, ref and id product $sql = "SELECT pfp.rowid, pfp.price as price, pfp.quantity as quantity, pfp.fk_soc,"; - $sql.= " pfp.fk_product, pfp.ref_fourn, pfp.tva_tx"; + $sql.= " pfp.fk_product, pfp.ref_fourn as ref_supplier, pfp.tva_tx"; $sql.= " FROM ".MAIN_DB_PREFIX."product_fournisseur_price as pfp"; $sql.= " WHERE pfp.ref_fourn = '".$fourn_ref."'"; $sql.= " AND pfp.fk_product = ".$product_id; @@ -1096,9 +1119,11 @@ class Product extends CommonObject $obj = $this->db->fetch_object($resql); if ($obj && $obj->quantity > 0) // If found { - $this->buyprice = $obj->price; // \deprecated + $this->buyprice = $obj->price; // deprecated + $this->fourn_qty = $obj->quantity; // min quantity for price $this->fourn_pu = $obj->price / $obj->quantity; // Prix unitaire du produit pour le fournisseur $fourn_id - $this->ref_fourn = $obj->ref_fourn; // Ref supplier + $this->ref_fourn = $obj->ref_supplier; // deprecated + $this->ref_supplier = $obj->ref_supplier; // Ref supplier $this->vatrate_supplier = $obj->tva_tx; // Vat ref supplier $result=$obj->fk_product; return $result; diff --git a/htdocs/product/fournisseurs.php b/htdocs/product/fournisseurs.php index 3957fbfd889..527615cc7c4 100644 --- a/htdocs/product/fournisseurs.php +++ b/htdocs/product/fournisseurs.php @@ -62,7 +62,7 @@ $result=restrictedArea($user,'produit|service&fournisseur',$fieldvalue,'product& // Initialize technical object to manage hooks of thirdparties. Note that conf->hooks_modules contains array array $hookmanager->initHooks(array('pricesuppliercard')); $product = new ProductFournisseur($db); -$product->fetch($id); +$product->fetch($id,$ref); $reshook=$hookmanager->executeHooks('doActions',$parameters,$product,$action); // Note that $action and $object may have been modified by some hooks $error=$hookmanager->error; $errors=$hookmanager->errors; diff --git a/htdocs/product/liste.php b/htdocs/product/liste.php index 2eccb9095a5..40e99a2d2ee 100644 --- a/htdocs/product/liste.php +++ b/htdocs/product/liste.php @@ -445,11 +445,15 @@ else if (! empty($conf->service->enabled) && $type != 0) { print '
    '; } diff --git a/htdocs/product/stock/class/entrepot.class.php b/htdocs/product/stock/class/entrepot.class.php index b28a8f9451f..61c88abcaa5 100644 --- a/htdocs/product/stock/class/entrepot.class.php +++ b/htdocs/product/stock/class/entrepot.class.php @@ -32,7 +32,7 @@ require_once DOL_DOCUMENT_ROOT.'/core/class/commonobject.class.php'; */ class Entrepot extends CommonObject { - public $element='label'; + public $element='stock'; public $table_element='entrepot'; var $id; diff --git a/htdocs/product/stock/class/mouvementstock.class.php b/htdocs/product/stock/class/mouvementstock.class.php index e8861d60ddb..2d4a8971f1b 100644 --- a/htdocs/product/stock/class/mouvementstock.class.php +++ b/htdocs/product/stock/class/mouvementstock.class.php @@ -265,7 +265,7 @@ class MouvementStock if (! $error) { $this->db->commit(); - return 1; + return $mvid; } else { diff --git a/htdocs/product/stock/lib/replenishment.lib.php b/htdocs/product/stock/lib/replenishment.lib.php index 21c3b4ee301..eb11b91a56d 100644 --- a/htdocs/product/stock/lib/replenishment.lib.php +++ b/htdocs/product/stock/lib/replenishment.lib.php @@ -26,9 +26,9 @@ require_once DOL_DOCUMENT_ROOT . '/fourn/class/fournisseur.commande.class.php'; /** * dispatched - * + * * @param int $order_id Id of order - * @return boolean + * @return boolean */ function dispatched($order_id) { @@ -39,7 +39,7 @@ function dispatched($order_id) $resql = $db->query($sql); $dispatched = array(); $ordered = array(); - if($resql && $db->num_rows($resql)) + if($resql && $db->num_rows($resql)) { while($res = $db->fetch_object($resql)) $dispatched[] = $res; @@ -57,7 +57,7 @@ function dispatched($order_id) /** * dispatchedOrders - * + * * @return Ambigous */ function dispatchedOrders() @@ -84,48 +84,53 @@ function dispatchedOrders() /** * ordered - * + * * @param int $product_id Product id * @return void */ function ordered($product_id) { - global $db, $langs, $conf; - $sql = 'SELECT DISTINCT cfd.fk_product, SUM(cfd.qty) FROM'; - $sql .= ' ' . MAIN_DB_PREFIX . 'commande_fournisseurdet as cfd '; - $sql .= ' LEFT JOIN ' . MAIN_DB_PREFIX . 'commande_fournisseur as cf'; - $sql .= ' ON cfd.fk_commande = cf.rowid WHERE'; - if ($conf->global->STOCK_CALCULATE_ON_SUPPLIER_VALIDATE_ORDER) { - $sql .= ' cf.fk_statut < 3'; - } else if ($conf->global->STOCK_CALCULATE_ON_SUPPLIER_DISPATCH_ORDER) { - $sql .= ' cf.fk_statut < 6 AND cf.rowid NOT IN ' . dispatchedOrders(); - } else { - $sql .= ' cf.fk_statut < 5'; - } - $sql .= ' AND cfd.fk_product = ' . $product_id; - $sql .= ' GROUP BY cfd.fk_product'; + global $db, $langs, $conf; - $resql = $db->query($sql); - if ($resql) { - $exists = $db->num_rows($resql); - if ($exists) { - $obj = $db->fetch_array($resql); - return $obj['SUM(cfd.qty)']; //. ' ' . img_picto('','tick'); - } else { - return null;//img_picto('', 'stcomm-1'); - } - } else { - $error = $db->lasterror(); - dol_print_error($db); - dol_syslog('replenish.php: ' . $error, LOG_ERR); + $sql = 'SELECT DISTINCT cfd.fk_product, SUM(cfd.qty) as qty FROM'; + $sql .= ' ' . MAIN_DB_PREFIX . 'commande_fournisseurdet as cfd '; + $sql .= ' LEFT JOIN ' . MAIN_DB_PREFIX . 'commande_fournisseur as cf'; + $sql .= ' ON cfd.fk_commande = cf.rowid WHERE'; + if ($conf->global->STOCK_CALCULATE_ON_SUPPLIER_VALIDATE_ORDER) { + $sql .= ' cf.fk_statut < 3'; + } else if ($conf->global->STOCK_CALCULATE_ON_SUPPLIER_DISPATCH_ORDER) { + $sql .= ' cf.fk_statut < 6 AND cf.rowid NOT IN ' . dispatchedOrders(); + } else { + $sql .= ' cf.fk_statut < 5'; + } + $sql .= ' AND cfd.fk_product = ' . $product_id; + $sql .= ' GROUP BY cfd.fk_product'; - return $langs->trans('error'); - } + $resql = $db->query($sql); + if ($resql) + { + $exists = $db->num_rows($resql); + if ($exists) + { + $obj = $db->fetch_array($resql); + return $obj['qty']; //. ' ' . img_picto('','tick'); + } else { + return null; //img_picto('', 'stcomm-1'); + } + } + else + { + $error = $db->lasterror(); + dol_print_error($db); + dol_syslog('replenish.php: ' . $error, LOG_ERR); + + return $langs->trans('error'); + } } /** * getProducts - * + * * @param int $order_id Order id * @return void */ diff --git a/htdocs/product/stock/massstockmove.php b/htdocs/product/stock/massstockmove.php index 54aa307fc95..afe9e20e28b 100644 --- a/htdocs/product/stock/massstockmove.php +++ b/htdocs/product/stock/massstockmove.php @@ -252,7 +252,6 @@ print '
    '; - if (preg_match('/([0-9]+)y/i',$objp->duration,$regs)) print $regs[1].' '.$langs->trans("DurationYear"); - elseif (preg_match('/([0-9]+)m/i',$objp->duration,$regs)) print $regs[1].' '.$langs->trans("DurationMonth"); - elseif (preg_match('/([0-9]+)w/i',$objp->duration,$regs)) print $regs[1].' '.$langs->trans("DurationWeek"); - elseif (preg_match('/([0-9]+)d/i',$objp->duration,$regs)) print $regs[1].' '.$langs->trans("DurationDay"); - else print $objp->duration; + if (preg_match('/([0-9]+)[a-z]/i',$objp->duration)) + { + if (preg_match('/([0-9]+)y/i',$objp->duration,$regs)) print $regs[1].' '.$langs->trans("DurationYear"); + elseif (preg_match('/([0-9]+)m/i',$objp->duration,$regs)) print $regs[1].' '.$langs->trans("DurationMonth"); + elseif (preg_match('/([0-9]+)w/i',$objp->duration,$regs)) print $regs[1].' '.$langs->trans("DurationWeek"); + elseif (preg_match('/([0-9]+)d/i',$objp->duration,$regs)) print $regs[1].' '.$langs->trans("DurationDay"); + //elseif (preg_match('/([0-9]+)h/i',$objp->duration,$regs)) print $regs[1].' '.$langs->trans("DurationHour"); + else print $objp->duration; + } print '
    '; print ''; print getTitleFieldOfList($langs->trans('ProductRef'),0,$_SERVER["PHP_SELF"],'',$param,'','class="tagtd"',$sortfield,$sortorder); -print getTitleFieldOfList($langs->trans('ProductLabel'),0,$_SERVER["PHP_SELF"],'',$param,'','class="tagtd"',$sortfield,$sortorder); print getTitleFieldOfList($langs->trans('WarehouseSource'),0,$_SERVER["PHP_SELF"],'',$param,'','class="tagtd"',$sortfield,$sortorder); print getTitleFieldOfList($langs->trans('WarehouseTarget'),0,$_SERVER["PHP_SELF"],'',$param,'','class="tagtd"',$sortfield,$sortorder); print getTitleFieldOfList($langs->trans('Qty'),0,$_SERVER["PHP_SELF"],'',$param,'','align="center" class="tagtd"',$sortfield,$sortorder); @@ -262,10 +261,18 @@ print ''; print ''; // Product -print ''; // In warehouse print ''; -// Lignes des titres -print ''. - ''; print_liste_field_titre( $langs->trans('Ref'), $_SERVER["PHP_SELF"], @@ -455,7 +487,7 @@ print ''. $prod = new Product($db); $var = True; -while ($i < min($num, $limit)) +while ($i < ($limit ? min($num, $limit) : $num)) { $objp = $db->fetch_object($resql); @@ -477,13 +509,15 @@ while ($i < min($num, $limit)) if (!empty($objtp->label)) $objp->label = $objtp->label; } } - $form = new Form($db); $var =! $var; $prod->ref = $objp->ref; $prod->id = $objp->rowid; $prod->type = $objp->fk_product_type; + + // Get number already ordered. $ordered = ordered($prod->id); + // Defined current stock number and warning if required if ($usevirtualstock) { // If option to increase/decrease is not on an object validation, virtual stock may differs from physical stock. @@ -505,26 +539,29 @@ while ($i < min($num, $limit)) $stock = $objp->stock_physique; } $warning=''; - if ($objp->seuil_stock_alerte && ($stock < $objp->seuil_stock_alerte)) { $warning = img_warning($langs->trans('StockTooLow')) . ' '; } + //depending on conf, use either physical stock or //virtual stock to compute the stock to buy value $stocktobuy = max($objp->desiredstock - $stock - $ordered, 0); + /* $disabled = ''; - if($ordered > 0) { - if($ordered + $stock >= $objp->desiredstock) { - $picto = img_picto('', './img/yes', '', 1); + if($ordered > 0) + { + if ($ordered + $stock >= $objp->desiredstock) + { + $picto = img_picto('', 'ok', ''); $disabled = 'disabled="disabled"'; } else { - $picto = img_picto('', './img/no', '', 1); + $picto = img_picto($langs->trans("NotEnough"), 'warning', ''); } } else { - $picto = img_picto('', './img/no', '', 1); - } + $picto = img_picto('', 'info', ''); + }*/ print ''; @@ -532,13 +569,12 @@ while ($i < min($num, $limit)) //print ''; print ''; - print ''. - ''. - ''; + print ''; - if (!empty($conf->service->enabled) && $type == 1) { + print ''; + + if (!empty($conf->service->enabled) && $type == 1) + { if (preg_match('/([0-9]+)y/i', $objp->duration, $regs)) { $duration = $regs[1] . ' ' . $langs->trans('DurationYear'); } elseif (preg_match('/([0-9]+)m/i', $objp->duration, $regs)) { @@ -548,19 +584,17 @@ while ($i < min($num, $limit)) } else { $duration = $objp->duration; } - print ''; + print ''; } - print ''. - ''. - ''; + // Desired stock + print ''; + + // Current stock + print ''; + + // Already ordered + print ''; // To order //print ''; @@ -589,6 +623,7 @@ if ($num > $conf->liste_limit) $filters = '&sref=' . $sref . '&snom=' . $snom; $filters .= '&sall=' . $sall; $filters .= '&salert=' . $salert; + $filters .= '&mode=' . $mode; print_barre_liste( '', $page, @@ -606,6 +641,7 @@ if ($num > $conf->liste_limit) $filters .= '&fourn_id=' . $fourn_id; $filters .= (isset($type)? '&type=' . $type : ''); $filters .= '&salert=' . $salert; + $filters .= '&mode=' . $mode; print_barre_liste( '', $page, diff --git a/htdocs/product/traduction.php b/htdocs/product/traduction.php index 045b9c8cf1d..f273eef35bf 100644 --- a/htdocs/product/traduction.php +++ b/htdocs/product/traduction.php @@ -55,6 +55,12 @@ if ($cancel == $langs->trans("Cancel")) $action = ''; } +if ($action == 'delete' && GETPOST('langtodelete','alpha')) +{ + $product = new Product($db); + $product->fetch($id); + $product->delMultiLangs(GETPOST('langtodelete','alpha')); +} // Validation de l'ajout if ($action == 'vadd' && @@ -209,7 +215,7 @@ else { $cnt_trans++; $s=picto_from_langcode($key); - print "
    ".($s?$s.' ':'')." ".$langs->trans('Language_'.$key).":
    "; + print "
    ".($s?$s.' ':'')." ".$langs->trans('Language_'.$key).": ".'
    '.img_delete('', '')."
    "; print '
    '; +print ''; $filtertype=0; if (! empty($conf->global->STOCK_SUPPORTS_SERVICES)) $filtertype=''; -print $form->select_produits($id_product,'productid',$filtertype); +if ($conf->global->PRODUIT_LIMIT_SIZE <= 0) +{ + $limit=''; +} +else +{ + $limit = $conf->global->PRODUIT_LIMIT_SIZE; +} +print $form->select_produits($id_product,'productid',$filtertype,$limit); print ''; diff --git a/htdocs/product/stock/replenish.php b/htdocs/product/stock/replenish.php index c833bcb2bb8..fc3591efc71 100644 --- a/htdocs/product/stock/replenish.php +++ b/htdocs/product/stock/replenish.php @@ -1,6 +1,6 @@ - * Copyright (C) 2013 Laurent Destaileur +/* Copyright (C) 2013 Cédric Salvador + * Copyright (C) 2013-2014 Laurent Destaileur * * 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 @@ -48,6 +48,7 @@ $sall = GETPOST('sall', 'alpha'); $type = GETPOST('type','int'); $tobuy = GETPOST('tobuy', 'int'); $salert = GETPOST('salert', 'alpha'); +$mode = GETPOST('mode','alpha'); $sortfield = GETPOST('sortfield','alpha'); $sortorder = GETPOST('sortorder','alpha'); @@ -63,6 +64,10 @@ if (!$sortorder) { $limit = $conf->liste_limit; $offset = $limit * $page ; +// Force limit to non (currently solution to solve loosing selection when using pagination. No pagination on this page) +$limit = 0; + + /* * Actions */ @@ -81,10 +86,10 @@ if ($action == 'order' && isset($_POST['valid'])) $linecount = GETPOST('linecount', 'int'); $box = 0; unset($_POST['linecount']); - if ($linecount > 0) + if ($linecount > 0) { $db->begin(); - + $suppliers = array(); for ($i = 0; $i < $linecount; $i++) { @@ -157,21 +162,21 @@ if ($action == 'order' && isset($_POST['valid'])) } $i++; } - - if (! $fail && $id) + + if (! $fail && $id) { $db->commit(); - + setEventMessage($langs->trans('OrderCreated'), 'mesgs'); header('Location: replenishorders.php'); exit; } else { - $db->rollback(); + $db->rollback(); } } - if ($box == 0) + if ($box == 0) { setEventMessage($langs->trans('SelectProductWithNotNullQty'), 'warnings'); } @@ -182,6 +187,8 @@ if ($action == 'order' && isset($_POST['valid'])) * View */ +$form = new Form($db); + $virtualdiffersfromphysical=0; if (! empty($conf->global->STOCK_CALCULATE_ON_SHIPMENT) || ! empty($conf->global->STOCK_CALCULATE_ON_SUPPLIER_DISPATCH_ORDER) @@ -191,8 +198,8 @@ $usevirtualstock=-1; if ($virtualdiffersfromphysical) { $usevirtualstock=($conf->global->STOCK_USE_VIRTUAL_STOCK?1:0); - if (GETPOST('mode')=='virtual') $usevirtualstock=1; - if (GETPOST('mode')=='physical') $usevirtualstock=0; + if ($mode=='virtual') $usevirtualstock=1; + if ($mode=='physical') $usevirtualstock=0; } $title = $langs->trans('Status'); @@ -240,8 +247,30 @@ $sql.= ' GROUP BY p.rowid, p.ref, p.label, p.price'; $sql.= ', p.price_ttc, p.price_base_type,p.fk_product_type, p.tms'; $sql.= ', p.duration, p.tobuy, p.seuil_stock_alerte'; $sql.= ', p.desiredstock, s.fk_product'; -$sql.= ' HAVING p.desiredstock > SUM('.$db->ifsql("s.reel IS NULL", "0", "s.reel").')'; -$sql.= ' AND p.desiredstock > 0'; + +if($usevirtualstock) { + $sqlCommandesCli = "(SELECT SUM(cd.qty) as qty"; + $sqlCommandesCli.= " FROM ".MAIN_DB_PREFIX."commandedet as cd"; + $sqlCommandesCli.= ", ".MAIN_DB_PREFIX."commande as c"; + $sqlCommandesCli.= " WHERE c.rowid = cd.fk_commande"; + $sqlCommandesCli.= " AND c.entity = ".$conf->entity; + $sqlCommandesCli.= " AND cd.fk_product = p.rowid"; + $sqlCommandesCli.= " AND c.fk_statut in (1,2))"; + + $sqlCommandesFourn = "(SELECT SUM(cd.qty) as qty"; + $sqlCommandesFourn.= " FROM ".MAIN_DB_PREFIX."commande_fournisseurdet as cd"; + $sqlCommandesFourn.= ", ".MAIN_DB_PREFIX."commande_fournisseur as c"; + $sqlCommandesFourn.= " WHERE c.rowid = cd.fk_commande"; + $sqlCommandesFourn.= " AND c.entity = ".$conf->entity; + $sqlCommandesFourn.= " AND cd.fk_product = p.rowid"; + $sqlCommandesFourn.= " AND c.fk_statut in (3))"; + + $sql.= ' HAVING p.desiredstock > SUM('.$db->ifsql("s.reel IS NULL", "0", "s.reel").')'; + $sql.= ' - '.$db->ifsql($sqlCommandesCli.' IS NULL', '0', $sqlCommandesCli).' + '.$db->ifsql($sqlCommandesFourn.' IS NULL', '0', $sqlCommandesFourn); +} else { + $sql.= ' HAVING p.desiredstock > SUM('.$db->ifsql("s.reel IS NULL", "0", "s.reel").')'; + $sql.= ' AND p.desiredstock > 0'; +} if ($salert == 'on') // Option to see when stock is lower than alert { $sql .= ' AND SUM('.$db->ifsql("s.reel IS NULL", "0", "s.reel").') < p.seuil_stock_alerte AND p.seuil_stock_alerte is not NULL'; @@ -295,6 +324,7 @@ if ($sref || $snom || $sall || $salert || GETPOST('search', 'alpha')) { $filters = '&sref=' . $sref . '&snom=' . $snom; $filters .= '&sall=' . $sall; $filters .= '&salert=' . $salert; + $filters .= '&mode=' . $mode; print_barre_liste( $texte, $page, @@ -310,6 +340,7 @@ if ($sref || $snom || $sall || $salert || GETPOST('search', 'alpha')) { $filters .= '&fourn_id=' . $fourn_id; $filters .= (isset($type)?'&type=' . $type:''); $filters .= '&salert=' . $salert; + $filters .= '&mode=' . $mode; print_barre_liste( $texte, $page, @@ -335,10 +366,11 @@ print '' $param = (isset($type)? '&type=' . $type : ''); $param .= '&fourn_id=' . $fourn_id . '&snom='. $snom . '&salert=' . $salert; $param .= '&sref=' . $sref; +$param .= '&mode=' . $mode; + +// Lines of title +print '
     
    '. - $prod->getNomUrl(1, '', 16). - '' . $objp->label . ''.$prod->getNomUrl(1, '', 16).'' . $objp->label . ''. - $duration. - ''.$duration.'' . $objp->desiredstock . ''. - $warning . $stock. - ''. - ''. - $ordered . ' ' . $picto. - '' . $objp->desiredstock . ''. $warning . $stock. ''. $ordered . ' ' . $picto. '
    '; print ''; print ''; @@ -257,8 +263,8 @@ if ($action == 'add' && ($user->rights->produit->creer || $user->rights->service print ''; print '
    '.$langs->trans('Label').''.$product->multilangs[$key]["label"].'
    '.$langs->trans('Description').''.$product->multilangs[$key]["description"].'
    '; - print ''; print ''; print ''; + // Date start + print ''; + + // Date end + print ''; + print "
    '.$langs->trans('Translation').''; - print $formadmin->select_language('','forcelangprod',0,$product->multilangs); + print '
    '.$langs->trans('Language').''; + print $formadmin->select_language('','forcelangprod',0,$product->multilangs,1); print '
    '.$langs->trans('Label').'
    '.$langs->trans('Description').''; diff --git a/htdocs/projet/class/project.class.php b/htdocs/projet/class/project.class.php index 1186de5e4ad..77591686983 100644 --- a/htdocs/projet/class/project.class.php +++ b/htdocs/projet/class/project.class.php @@ -83,6 +83,8 @@ class Project extends CommonObject $error = 0; $ret = 0; + $now=dol_now(); + // Check parameters if (!trim($this->ref)) { @@ -113,9 +115,9 @@ class Project extends CommonObject $sql.= ", " . $user->id; $sql.= ", 0"; $sql.= ", " . ($this->public ? 1 : 0); - $sql.= ", " . $this->db->idate(dol_now()); - $sql.= ", " . ($this->date_start != '' ? $this->db->idate($this->date_start) : 'null'); - $sql.= ", " . ($this->date_end != '' ? $this->db->idate($this->date_end) : 'null'); + $sql.= ", '".$this->db->idate($now)."'"; + $sql.= ", " . ($this->date_start != '' ? "'".$this->db->idate($this->date_start)."'" : 'null'); + $sql.= ", " . ($this->date_end != '' ? "'".$this->db->idate($this->date_end)."'" : 'null'); $sql.= ", ".$conf->entity; $sql.= ")"; diff --git a/htdocs/projet/class/task.class.php b/htdocs/projet/class/task.class.php index 0a56b5253a9..697d773f02c 100644 --- a/htdocs/projet/class/task.class.php +++ b/htdocs/projet/class/task.class.php @@ -852,7 +852,7 @@ class Task extends CommonObject $this->id = $obj->fk_task; $this->timespent_date = $obj->task_date; $this->timespent_duration = $obj->task_duration; - $this->timespent_user = $obj->fk_user; + $this->timespent_fk_user = $obj->fk_user; $this->timespent_note = $obj->note; } diff --git a/htdocs/projet/contact.php b/htdocs/projet/contact.php index 97b489cc3e4..c6880547c60 100644 --- a/htdocs/projet/contact.php +++ b/htdocs/projet/contact.php @@ -192,6 +192,16 @@ if ($id > 0 || ! empty($ref)) // Statut print '
    '.$langs->trans("Status").''.$object->getLibStatut(4).'
    '.$langs->trans("DateStart").''; + print dol_print_date($object->date_start,'day'); + print '
    '.$langs->trans("DateEnd").''; + print dol_print_date($object->date_end,'day'); + print '
    "; print '
    '; diff --git a/htdocs/projet/element.php b/htdocs/projet/element.php index b35f89dd1a7..6101f337471 100644 --- a/htdocs/projet/element.php +++ b/htdocs/projet/element.php @@ -128,6 +128,16 @@ print ''; // Statut print ''.$langs->trans("Status").''.$project->getLibStatut(4).''; +// Date start +print ''.$langs->trans("DateStart").''; +print dol_print_date($object->date_start,'day'); +print ''; + +// Date end +print ''.$langs->trans("DateEnd").''; +print dol_print_date($object->date_end,'day'); +print ''; + print ''; print '
    '; @@ -212,13 +222,18 @@ foreach ($listofreferent as $key => $value) $classname=$value['class']; $tablename=$value['table']; $qualified=$value['test']; + if ($qualified) { print '
    '; print_titre($langs->trans($title)); - + $selectList=$formproject->select_element($tablename); + if ($selectList<0) { + setEventMessage($formproject->error,'errors'); + } + if ($selectList) { print ''; @@ -317,7 +332,7 @@ foreach ($listofreferent as $key => $value) } if ($key == 'invoice' && ! empty($conf->facture->enabled) && $user->rights->facture->creer) { - print ''.$langs->trans("AddCustomerInvoice").''; + print ''.$langs->trans("AddCustomerInvoice").''; } } if ($project->societe->fournisseur) diff --git a/htdocs/projet/fiche.php b/htdocs/projet/fiche.php index d1fbf0d10ee..123b4a611b4 100644 --- a/htdocs/projet/fiche.php +++ b/htdocs/projet/fiche.php @@ -56,7 +56,7 @@ if ($object->id > 0) } // Security check -$socid=0; +$socid=GETPOST('socid'); if ($user->societe_id > 0) $socid=$user->societe_id; $result = restrictedArea($user, 'projet', $object->id); @@ -384,6 +384,10 @@ if ($action == 'create' && $user->rights->projet->creer) /* * Create */ + + $thirdparty=new Societe($db); + if ($socid > 0) $thirdparty->fetch($socid); + print_fiche_titre($langs->trans("NewProject")); dol_htmloutput_mesg($mesg); @@ -396,12 +400,28 @@ if ($action == 'create' && $user->rights->projet->creer) print ''; $defaultref=''; - $obj = empty($conf->global->PROJECT_ADDON)?'mod_project_simple':$conf->global->PROJECT_ADDON; - if (! empty($conf->global->PROJECT_ADDON) && is_readable(DOL_DOCUMENT_ROOT ."/core/modules/project/".$conf->global->PROJECT_ADDON.".php")) + $modele = empty($conf->global->PROJECT_ADDON)?'mod_project_simple':$conf->global->PROJECT_ADDON; + + // Search template files + $file=''; $classname=''; $filefound=0; + $dirmodels=array_merge(array('/'),(array) $conf->modules_parts['models']); + foreach($dirmodels as $reldir) { - require_once DOL_DOCUMENT_ROOT ."/core/modules/project/".$conf->global->PROJECT_ADDON.'.php'; - $modProject = new $obj; - $defaultref = $modProject->getNextValue($soc,$object); + $file=dol_buildpath($reldir."core/modules/project/".$modele.'.php',0); + if (file_exists($file)) + { + $filefound=1; + $classname = $modele; + break; + } + } + + if ($filefound) + { + $result=dol_include_once($reldir."core/modules/project/".$modele.'.php'); + $modProject = new $classname; + + $defaultref = $modProject->getNextValue($thirdparty,$object); } if (is_numeric($defaultref) && $defaultref <= 0) $defaultref=''; diff --git a/htdocs/projet/ganttchart.php b/htdocs/projet/ganttchart.inc.php similarity index 99% rename from htdocs/projet/ganttchart.php rename to htdocs/projet/ganttchart.inc.php index b3701191142..7b4249a0128 100644 --- a/htdocs/projet/ganttchart.php +++ b/htdocs/projet/ganttchart.inc.php @@ -16,7 +16,7 @@ */ /** - * \file htdocs/projet/ganttchart.php + * \file htdocs/projet/ganttchart.inc.php * \ingroup projet * \brief Gantt diagram of a project */ diff --git a/htdocs/projet/ganttview.php b/htdocs/projet/ganttview.php index 77767fd446f..79d302addd3 100644 --- a/htdocs/projet/ganttview.php +++ b/htdocs/projet/ganttview.php @@ -137,6 +137,17 @@ if ($id > 0 || ! empty($ref)) // Statut print ''; + // Date start + print ''; + + // Date end + print ''; + + print '
    '.$langs->trans("Status").''.$object->getLibStatut(4).'
    '.$langs->trans("DateStart").''; + print dol_print_date($object->date_start,'day'); + print '
    '.$langs->trans("DateEnd").''; + print dol_print_date($object->date_end,'day'); + print '
    '; print ''; @@ -184,8 +195,8 @@ if (count($tasksarray)>0) // Show Gant diagram from $taskarray using JSGantt - $dateformat=$langs->trans("FormatDateShort"); // Used by include ganttchart.php later - $dateformat=$langs->trans("FormatDateShortJQuery"); // Used by include ganttchart.php later + $dateformat=$langs->trans("FormatDateShort"); // Used by include ganttchart.inc.php later + $dateformat=$langs->trans("FormatDateShortJQuery"); // Used by include ganttchart.inc.php later $array_contacts=array(); $tasks=array(); $project_dependencies=array(); @@ -244,7 +255,7 @@ if (count($tasksarray)>0) { //var_dump($_SESSION); print '
    '."\n"; - include_once DOL_DOCUMENT_ROOT.'/projet/ganttchart.php'; + include_once DOL_DOCUMENT_ROOT.'/projet/ganttchart.inc.php'; print '
    '."\n"; } else diff --git a/htdocs/projet/note.php b/htdocs/projet/note.php index 710d4b9f50d..493141cbe95 100644 --- a/htdocs/projet/note.php +++ b/htdocs/projet/note.php @@ -118,6 +118,16 @@ if ($id > 0 || ! empty($ref)) // Statut print ''.$langs->trans("Status").''.$object->getLibStatut(4).''; + // Date start + print ''.$langs->trans("DateStart").''; + print dol_print_date($object->date_start,'day'); + print ''; + + // Date end + print ''.$langs->trans("DateEnd").''; + print dol_print_date($object->date_end,'day'); + print ''; + print ""; print '
    '; diff --git a/htdocs/projet/tasks.php b/htdocs/projet/tasks.php index fc02da1c821..356eed55e6d 100644 --- a/htdocs/projet/tasks.php +++ b/htdocs/projet/tasks.php @@ -232,12 +232,12 @@ if ($id > 0 || ! empty($ref)) // Date start print ''.$langs->trans("DateStart").''; - print dol_print_date($object->date_start,'dayhour'); + print dol_print_date($object->date_start,'day'); print ''; // Date end print ''.$langs->trans("DateEnd").''; - print dol_print_date($object->date_end,'dayhour'); + print dol_print_date($object->date_end,'day'); print ''; // Other options diff --git a/htdocs/projet/tasks/contact.php b/htdocs/projet/tasks/contact.php index a86dd329e4c..f0bdce25fca 100644 --- a/htdocs/projet/tasks/contact.php +++ b/htdocs/projet/tasks/contact.php @@ -202,6 +202,16 @@ if ($id > 0 || ! empty($ref)) // Statut print ''.$langs->trans("Status").''.$projectstatic->getLibStatut(4).''; + // Date start + print ''.$langs->trans("DateStart").''; + print dol_print_date($projectstatic->date_start,'day'); + print ''; + + // Date end + print ''.$langs->trans("DateEnd").''; + print dol_print_date($projectstatic->date_end,'day'); + print ''; + print ''; dol_fiche_end(); diff --git a/htdocs/projet/tasks/document.php b/htdocs/projet/tasks/document.php index 29aca5f23f7..50763f839f7 100644 --- a/htdocs/projet/tasks/document.php +++ b/htdocs/projet/tasks/document.php @@ -166,6 +166,16 @@ if ($object->id > 0) // Statut print ''.$langs->trans("Status").''.$projectstatic->getLibStatut(4).''; + // Date start + print ''.$langs->trans("DateStart").''; + print dol_print_date($projectstatic->date_start,'day'); + print ''; + + // Date end + print ''.$langs->trans("DateEnd").''; + print dol_print_date($projectstatic->date_end,'day'); + print ''; + print ''; dol_fiche_end(); diff --git a/htdocs/projet/tasks/index.php b/htdocs/projet/tasks/index.php index 94e05ece06a..d019a629bdd 100644 --- a/htdocs/projet/tasks/index.php +++ b/htdocs/projet/tasks/index.php @@ -126,7 +126,7 @@ print ''; print ''; print "\n"; -if (count($tasksarray) > (empty($conf->global->PROJECT_MAX_NB_TASKS)?1000:$conf->global->PROJECT_MAX_NB_TASKS)) +if (count($tasksarray) > (empty($conf->global->PROJECT_LIMIT_TASK_PROJECT_AREA)?1000:$conf->global->PROJECT_LIMIT_TASK_PROJECT_AREA)) { print ''; print ''; diff --git a/htdocs/projet/tasks/note.php b/htdocs/projet/tasks/note.php index f0f72810e8a..a6f8846ce0e 100644 --- a/htdocs/projet/tasks/note.php +++ b/htdocs/projet/tasks/note.php @@ -148,6 +148,16 @@ if ($object->id > 0) // Statut print ''.$langs->trans("Status").''.$projectstatic->getLibStatut(4).''; + // Date start + print ''.$langs->trans("DateStart").''; + print dol_print_date($projectstatic->date_start,'day'); + print ''; + + // Date end + print ''.$langs->trans("DateEnd").''; + print dol_print_date($projectstatic->date_end,'day'); + print ''; + print ''; dol_fiche_end(); diff --git a/htdocs/projet/tasks/task.php b/htdocs/projet/tasks/task.php index 62dfb3cbe68..dd83cf57d8f 100644 --- a/htdocs/projet/tasks/task.php +++ b/htdocs/projet/tasks/task.php @@ -243,6 +243,16 @@ if ($id > 0 || ! empty($ref)) // Statut print ''.$langs->trans("Status").''.$projectstatic->getLibStatut(4).''; + // Date start + print ''.$langs->trans("DateStart").''; + print dol_print_date($projectstatic->date_start,'day'); + print ''; + + // Date end + print ''.$langs->trans("DateEnd").''; + print dol_print_date($projectstatic->date_end,'day'); + print ''; + print ''; dol_fiche_end(); diff --git a/htdocs/projet/tasks/time.php b/htdocs/projet/tasks/time.php index 4d70ddae36b..2ef635dbe53 100644 --- a/htdocs/projet/tasks/time.php +++ b/htdocs/projet/tasks/time.php @@ -234,6 +234,16 @@ if ($id > 0 || ! empty($ref)) // Statut print ''.$langs->trans("Status").''.$projectstatic->getLibStatut(4).''; + // Date start + print ''.$langs->trans("DateStart").''; + print dol_print_date($projectstatic->date_start,'day'); + print ''; + + // Date end + print ''.$langs->trans("DateEnd").''; + print dol_print_date($projectstatic->date_end,'day'); + print ''; + print ''; dol_fiche_end(); diff --git a/htdocs/public/demo/index.php b/htdocs/public/demo/index.php index 60348965835..8a6bcd62e58 100644 --- a/htdocs/public/demo/index.php +++ b/htdocs/public/demo/index.php @@ -33,11 +33,11 @@ $langs->load("main"); $langs->load("install"); $langs->load("other"); -$conf->dol_hide_topmenu=GETPOST('dol_hide_topmenu'); -$conf->dol_hide_leftmenu=GETPOST('dol_hide_leftmenu'); -$conf->dol_optimize_smallscreen=GETPOST('dol_optimize_smallscreen'); -$conf->dol_no_mouse_hover=GETPOST('dol_no_mouse_hover'); -$conf->dol_use_jmobile=GETPOST('dol_use_jmobile'); +$conf->dol_hide_topmenu=GETPOST('dol_hide_topmenu','int'); +$conf->dol_hide_leftmenu=GETPOST('dol_hide_leftmenu','int'); +$conf->dol_optimize_smallscreen=GETPOST('dol_optimize_smallscreen','int'); +$conf->dol_no_mouse_hover=GETPOST('dol_no_mouse_hover','int'); +$conf->dol_use_jmobile=GETPOST('dol_use_jmobile','int'); // Security check global $dolibarr_main_demo; diff --git a/htdocs/public/members/new.php b/htdocs/public/members/new.php index f9c5b8a95a5..5728e1ae5f5 100644 --- a/htdocs/public/members/new.php +++ b/htdocs/public/members/new.php @@ -42,7 +42,7 @@ define("NOCSRFCHECK",1); // We accept to go on this page from external web site. // Do not use GETPOST here, function is not defined and define must be done before including main.inc.php // TODO This should be useless. Because entity must be retreive from object ref and not from url. $entity=(! empty($_GET['entity']) ? (int) $_GET['entity'] : (! empty($_POST['entity']) ? (int) $_POST['entity'] : 1)); -if (is_int($entity)) define("DOLENTITY", $entity); +if (is_numeric($entity)) define("DOLENTITY", $entity); require '../../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/adherents/class/adherent.class.php'; diff --git a/htdocs/public/members/public_card.php b/htdocs/public/members/public_card.php index 77c419e7b11..fd745e523c9 100644 --- a/htdocs/public/members/public_card.php +++ b/htdocs/public/members/public_card.php @@ -27,11 +27,11 @@ define("NOLOGIN",1); // This means this output page does not require to be logged. define("NOCSRFCHECK",1); // We accept to go on this page from external web site. -// For MultiCompany module. +// For MultiCompany module. // Do not use GETPOST here, function is not defined and define must be done before including main.inc.php // TODO This should be useless. Because entity must be retreive from object ref and not from url. $entity=(! empty($_GET['entity']) ? (int) $_GET['entity'] : (! empty($_POST['entity']) ? (int) $_POST['entity'] : 1)); -if (is_int($entity)) define("DOLENTITY", $entity); +if (is_numeric($entity)) define("DOLENTITY", $entity); require '../../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/adherents/class/adherent.class.php'; diff --git a/htdocs/public/members/public_list.php b/htdocs/public/members/public_list.php index 7a1ffffd54d..d88e87c2d12 100644 --- a/htdocs/public/members/public_list.php +++ b/htdocs/public/members/public_list.php @@ -27,11 +27,11 @@ define("NOLOGIN",1); // This means this output page does not require to be logged. define("NOCSRFCHECK",1); // We accept to go on this page from external web site. -// For MultiCompany module. +// For MultiCompany module. // Do not use GETPOST here, function is not defined and define must be done before including main.inc.php // TODO This should be useless. Because entity must be retreive from object ref and not from url. $entity=(! empty($_GET['entity']) ? (int) $_GET['entity'] : (! empty($_POST['entity']) ? (int) $_POST['entity'] : 1)); -if (is_int($entity)) define("DOLENTITY", $entity); +if (is_numeric($entity)) define("DOLENTITY", $entity); require '../../main.inc.php'; diff --git a/htdocs/public/paybox/newpayment.php b/htdocs/public/paybox/newpayment.php index d9e652abc35..47a93e39c32 100644 --- a/htdocs/public/paybox/newpayment.php +++ b/htdocs/public/paybox/newpayment.php @@ -27,11 +27,11 @@ define("NOLOGIN",1); // This means this output page does not require to be logged. define("NOCSRFCHECK",1); // We accept to go on this page from external web site. -// For MultiCompany module. +// For MultiCompany module. // Do not use GETPOST here, function is not defined and define must be done before including main.inc.php // TODO This should be useless. Because entity must be retreive from object ref and not from url. $entity=(! empty($_GET['entity']) ? (int) $_GET['entity'] : (! empty($_POST['entity']) ? (int) $_POST['entity'] : 1)); -if (is_int($entity)) define("DOLENTITY", $entity); +if (is_numeric($entity)) define("DOLENTITY", $entity); require '../../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/paybox/lib/paybox.lib.php'; diff --git a/htdocs/public/paybox/paymentko.php b/htdocs/public/paybox/paymentko.php index 9e094b9d394..47601fb8dab 100644 --- a/htdocs/public/paybox/paymentko.php +++ b/htdocs/public/paybox/paymentko.php @@ -26,11 +26,11 @@ define("NOLOGIN",1); // This means this output page does not require to be logged. define("NOCSRFCHECK",1); // We accept to go on this page from external web site. -// For MultiCompany module. +// For MultiCompany module. // Do not use GETPOST here, function is not defined and define must be done before including main.inc.php // TODO This should be useless. Because entity must be retreive from object ref and not from url. $entity=(! empty($_GET['entity']) ? (int) $_GET['entity'] : (! empty($_POST['entity']) ? (int) $_POST['entity'] : 1)); -if (is_int($entity)) define("DOLENTITY", $entity); +if (is_numeric($entity)) define("DOLENTITY", $entity); require '../../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/paybox/lib/paybox.lib.php'; diff --git a/htdocs/public/paybox/paymentok.php b/htdocs/public/paybox/paymentok.php index 34fbf265642..becfd7978c2 100644 --- a/htdocs/public/paybox/paymentok.php +++ b/htdocs/public/paybox/paymentok.php @@ -30,7 +30,7 @@ define("NOCSRFCHECK",1); // We accept to go on this page from external web site. // Do not use GETPOST here, function is not defined and define must be done before including main.inc.php // TODO This should be useless. Because entity must be retreive from object ref and not from url. $entity=(! empty($_GET['entity']) ? (int) $_GET['entity'] : (! empty($_POST['entity']) ? (int) $_POST['entity'] : 1)); -if (is_int($entity)) define("DOLENTITY", $entity); +if (is_numeric($entity)) define("DOLENTITY", $entity); require '../../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/paybox/lib/paybox.lib.php'; diff --git a/htdocs/public/paypal/newpayment.php b/htdocs/public/paypal/newpayment.php index d2f73d84b96..afe685fb6ac 100644 --- a/htdocs/public/paypal/newpayment.php +++ b/htdocs/public/paypal/newpayment.php @@ -29,11 +29,11 @@ define("NOLOGIN",1); // This means this output page does not require to be logged. define("NOCSRFCHECK",1); // We accept to go on this page from external web site. -// For MultiCompany module. +// For MultiCompany module. // Do not use GETPOST here, function is not defined and define must be done before including main.inc.php // TODO This should be useless. Because entity must be retreive from object ref and not from url. $entity=(! empty($_GET['entity']) ? (int) $_GET['entity'] : (! empty($_POST['entity']) ? (int) $_POST['entity'] : 1)); -if (is_int($entity)) define("DOLENTITY", $entity); +if (is_numeric($entity)) define("DOLENTITY", $entity); require '../../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/paypal/lib/paypal.lib.php'; diff --git a/htdocs/public/paypal/paymentko.php b/htdocs/public/paypal/paymentko.php index 33dabdd5a47..d6b1843b2b1 100644 --- a/htdocs/public/paypal/paymentko.php +++ b/htdocs/public/paypal/paymentko.php @@ -29,11 +29,11 @@ define("NOLOGIN",1); // This means this output page does not require to be logged. define("NOCSRFCHECK",1); // We accept to go on this page from external web site. -// For MultiCompany module. +// For MultiCompany module. // Do not use GETPOST here, function is not defined and define must be done before including main.inc.php // TODO This should be useless. Because entity must be retreive from object ref and not from url. $entity=(! empty($_GET['entity']) ? (int) $_GET['entity'] : (! empty($_POST['entity']) ? (int) $_POST['entity'] : 1)); -if (is_int($entity)) define("DOLENTITY", $entity); +if (is_numeric($entity)) define("DOLENTITY", $entity); require '../../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/paypal/lib/paypal.lib.php'; diff --git a/htdocs/public/paypal/paymentok.php b/htdocs/public/paypal/paymentok.php index 4cc44eca4ce..f7fad5ebb31 100644 --- a/htdocs/public/paypal/paymentok.php +++ b/htdocs/public/paypal/paymentok.php @@ -33,7 +33,7 @@ define("NOCSRFCHECK",1); // We accept to go on this page from external web site. // Do not use GETPOST here, function is not defined and define must be done before including main.inc.php // TODO This should be useless. Because entity must be retreive from object ref and not from url. $entity=(! empty($_GET['entity']) ? (int) $_GET['entity'] : (! empty($_POST['entity']) ? (int) $_POST['entity'] : 1)); -if (is_int($entity)) define("DOLENTITY", $entity); +if (is_numeric($entity)) define("DOLENTITY", $entity); require '../../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/paypal/lib/paypal.lib.php'; diff --git a/htdocs/societe/class/societe.class.php b/htdocs/societe/class/societe.class.php index 9ffa0546782..5893fbab021 100644 --- a/htdocs/societe/class/societe.class.php +++ b/htdocs/societe/class/societe.class.php @@ -3058,7 +3058,7 @@ class Societe extends CommonObject // Set outstanding amount $sql = "UPDATE ".MAIN_DB_PREFIX."societe SET "; - $sql.= " outstanding_limit= ".($outstanding!=''?$outstanding:'null'); + $sql.= " outstanding_limit= '".($outstanding!=''?$outstanding:'null')."'"; $sql.= " WHERE rowid = ".$this->id; dol_syslog(get_class($this)."::set_outstanding sql=".$sql); diff --git a/htdocs/societe/soc.php b/htdocs/societe/soc.php index f2d2e64791d..b88642cd83d 100644 --- a/htdocs/societe/soc.php +++ b/htdocs/societe/soc.php @@ -432,12 +432,12 @@ if (empty($reshook)) $sql = "UPDATE ".MAIN_DB_PREFIX."adherent"; $sql.= " SET fk_soc = NULL WHERE fk_soc = " . $id; - dol_syslog(get_class($this)."::delete sql=".$sql, LOG_DEBUG); - if (! $this->db->query($sql)) + dol_syslog(get_class($object)."::delete sql=".$sql, LOG_DEBUG); + if (! $object->db->query($sql)) { $error++; - $this->error .= $this->db->lasterror(); - dol_syslog(get_class($this)."::delete erreur -1 ".$this->error, LOG_ERR); + $object->error .= $object->db->lasterror(); + dol_syslog(get_class($object)."::delete erreur -1 ".$object->error, LOG_ERR); } } diff --git a/htdocs/theme/eldy/style.css.php b/htdocs/theme/eldy/style.css.php index a1bec8fe86c..63b789a4597 100644 --- a/htdocs/theme/eldy/style.css.php +++ b/htdocs/theme/eldy/style.css.php @@ -2270,6 +2270,8 @@ li.cal_event { border: none; list-style-type: none; } /* Ajax - Liste deroulante de l'autocompletion */ /* ============================================================================== */ +.ui-widget-content { border: solid 1px rgba(0,0,0,.3); background: #fff; } + .ui-autocomplete-loading { background: white url() right center no-repeat; } .ui-autocomplete { position:absolute; @@ -2483,7 +2485,7 @@ A.none, A.none:active, A.none:visited, A.none:hover { { line-height: 1em !important; } -.ui-autocomplete-input { margin: 0; } +.ui-autocomplete-input { margin: 0; padding: 2px; } /* ============================================================================== */ diff --git a/htdocs/user/class/user.class.php b/htdocs/user/class/user.class.php index b59b7dd0aa2..ac4c830fed2 100644 --- a/htdocs/user/class/user.class.php +++ b/htdocs/user/class/user.class.php @@ -809,7 +809,7 @@ class User extends CommonObject $sql = "SELECT login FROM ".MAIN_DB_PREFIX."user"; $sql.= " WHERE login ='".$this->db->escape($this->login)."'"; - $sql.= " AND entity IN (0,".$conf->entity.")"; + $sql.= " AND entity IN (0,".$this->db->escape($conf->entity).")"; dol_syslog(get_class($this)."::create sql=".$sql, LOG_DEBUG); $resql=$this->db->query($sql); @@ -828,7 +828,7 @@ class User extends CommonObject else { $sql = "INSERT INTO ".MAIN_DB_PREFIX."user (datec,login,ldap_sid,entity)"; - $sql.= " VALUES('".$this->db->idate($this->datec)."','".$this->db->escape($this->login)."','".$this->ldap_sid."',".$this->entity.")"; + $sql.= " VALUES('".$this->db->idate($this->datec)."','".$this->db->escape($this->login)."','".$this->ldap_sid."',".$this->db->escape($this->entity).")"; $result=$this->db->query($sql); dol_syslog(get_class($this)."::create sql=".$sql, LOG_DEBUG); @@ -925,7 +925,7 @@ class User extends CommonObject $this->lastname = $contact->lastname; $this->firstname = $contact->firstname; $this->email = $contact->email; - $this->skype = $contact->skype; + $this->skype = $contact->skype; $this->office_phone = $contact->phone_pro; $this->office_fax = $contact->fax; $this->user_mobile = $contact->phone_mobile; @@ -1878,7 +1878,7 @@ class User extends CommonObject /** * Retourne chaine DN complete dans l'annuaire LDAP pour l'objet * - * @param string $info Info string loaded by _load_ldap_info + * @param array $info Info array loaded by _load_ldap_info * @param int $mode 0=Return full DN (uid=qqq,ou=xxx,dc=aaa,dc=bbb) * 1= * 2=Return key only (uid=qqq) @@ -2231,16 +2231,24 @@ class User extends CommonObject */ function get_full_tree($markafterid=0) { + global $conf,$user; + $this->users = array(); // Init this->parentof that is array(id_son=>id_parent, ...) $this->load_parentof(); // Init $this->users array - $sql = "SELECT DISTINCT u.rowid, u.firstname, u.lastname, u.fk_user, u.login, u.statut"; // Distinct reduce pb with old tables with duplicates + $sql = "SELECT DISTINCT u.rowid, u.firstname, u.lastname, u.fk_user, u.login, u.statut, u.entity"; // Distinct reduce pb with old tables with duplicates $sql.= " FROM ".MAIN_DB_PREFIX."user as u"; - $sql.= " WHERE u.entity IN (".getEntity('user',1).")"; - + if(! empty($conf->multicompany->enabled) && $conf->entity == 1 && (! empty($conf->multicompany->transverse_mode) || (! empty($user->admin) && empty($user->entity)))) + { + $sql.= " WHERE u.entity IS NOT NULL"; + } + else + { + $sql.= " WHERE u.entity IN (".getEntity('user',1).")"; + } dol_syslog(get_class($this)."::get_full_tree get user list sql=".$sql, LOG_DEBUG); $resql = $this->db->query($sql); if ($resql) @@ -2255,6 +2263,7 @@ class User extends CommonObject $this->users[$obj->rowid]['lastname'] = $obj->lastname; $this->users[$obj->rowid]['login'] = $obj->login; $this->users[$obj->rowid]['statut'] = $obj->statut; + $this->users[$obj->rowid]['entity'] = $obj->entity; $i++; } } diff --git a/htdocs/user/class/usergroup.class.php b/htdocs/user/class/usergroup.class.php index 72dc0b7cf48..b43794a4b64 100644 --- a/htdocs/user/class/usergroup.class.php +++ b/htdocs/user/class/usergroup.class.php @@ -3,6 +3,7 @@ * Copyright (c) 2005-2013 Laurent Destailleur * Copyright (c) 2005-2012 Regis Houssin * Copyright (C) 2012 Florian Henry + * Copyright (C) 2014 Juanjo Menent * * 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 @@ -285,7 +286,7 @@ class UserGroup extends CommonObject // Pour compatibilite, si lowid = 0, on est en mode ajout de tout // TODO A virer quand sera gere par l'appelant - if (substr($rid,-1,1) == 0) $whereforadd="module='$module'"; + //if (substr($rid,-1,1) == 0) $whereforadd="module='$module'"; } else { // Where pour la liste des droits a ajouter @@ -385,7 +386,7 @@ class UserGroup extends CommonObject // Pour compatibilite, si lowid = 0, on est en mode suppression de tout // TODO A virer quand sera gere par l'appelant - if (substr($rid,-1,1) == 0) $wherefordel="module='$module'"; + //if (substr($rid,-1,1) == 0) $wherefordel="module='$module'"; } else { // Where pour la liste des droits a supprimer @@ -589,7 +590,7 @@ class UserGroup extends CommonObject $sql.= ") VALUES ("; $sql.= "'".$this->db->idate($now)."'"; $sql.= ",'".$this->db->escape($this->nom)."'"; - $sql.= ",".$entity; + $sql.= ",".$this->db->escape($entity); $sql.= ")"; dol_syslog(get_class($this)."::create sql=".$sql, LOG_DEBUG); @@ -640,7 +641,7 @@ class UserGroup extends CommonObject $sql = "UPDATE ".MAIN_DB_PREFIX."usergroup SET "; $sql.= " nom = '" . $this->db->escape($this->nom) . "'"; - $sql.= ", entity = " . $entity; + $sql.= ", entity = " . $this->db->escape($entity); $sql.= ", note = '" . $this->db->escape($this->note) . "'"; $sql.= " WHERE rowid = " . $this->id; @@ -672,7 +673,7 @@ class UserGroup extends CommonObject /** * Retourne chaine DN complete dans l'annuaire LDAP pour l'objet * - * @param string $info Info string loaded by _load_ldap_info + * @param array $info Info array loaded by _load_ldap_info * @param int $mode 0=Return full DN (uid=qqq,ou=xxx,dc=aaa,dc=bbb) * 1=Return DN without key inside (ou=xxx,dc=aaa,dc=bbb) * 2=Return key only (uid=qqq) diff --git a/htdocs/user/fiche.php b/htdocs/user/fiche.php index f108667ccb3..359b42856ab 100644 --- a/htdocs/user/fiche.php +++ b/htdocs/user/fiche.php @@ -178,16 +178,16 @@ if ($action == 'add' && $canadduser) if (! $message) { - $object->lastname = GETPOST("lastname"); - $object->firstname = GETPOST("firstname"); - $object->login = GETPOST("login"); - $object->admin = GETPOST("admin"); - $object->office_phone = GETPOST("office_phone"); - $object->office_fax = GETPOST("office_fax"); + $object->lastname = GETPOST("lastname",'alpha'); + $object->firstname = GETPOST("firstname",'alpha'); + $object->login = GETPOST("login",'alpha'); + $object->admin = GETPOST("admin",'alpha'); + $object->office_phone = GETPOST("office_phone",'alpha'); + $object->office_fax = GETPOST("office_fax",'alpha'); $object->user_mobile = GETPOST("user_mobile"); $object->skype = GETPOST("skype"); - $object->email = GETPOST("email"); - $object->job = GETPOST("job"); + $object->email = GETPOST("email",'alpha'); + $object->job = GETPOST("job",'alpha'); $object->signature = GETPOST("signature"); $object->accountancy_code = GETPOST("accountancy_code"); $object->note = GETPOST("note"); @@ -200,6 +200,7 @@ if ($action == 'add' && $canadduser) // If multicompany is off, admin users must all be on entity 0. if (! empty($conf->multicompany->enabled)) { + $entity=GETPOST('entity','int'); if (! empty($_POST["superadmin"])) { $object->entity = 0; @@ -210,12 +211,12 @@ if ($action == 'add' && $canadduser) } else { - $object->entity = (empty($_POST["entity"]) ? 0 : $_POST["entity"]); + $object->entity = (empty($entity) ? 0 : $entity); } } else { - $object->entity = (empty($_POST["entity"]) ? 0 : $_POST["entity"]); + $object->entity = (empty($entity) ? 0 : $entity); } $db->begin(); @@ -316,17 +317,17 @@ if ($action == 'update' && ! $_POST["cancel"]) $object->oldcopy=dol_clone($object); - $object->lastname = GETPOST("lastname"); - $object->firstname = GETPOST("firstname"); - $object->login = GETPOST("login"); + $object->lastname = GETPOST("lastname",'alpha'); + $object->firstname = GETPOST("firstname",'alpha'); + $object->login = GETPOST("login",'alpha'); $object->pass = GETPOST("password"); $object->admin = empty($user->admin)?0:GETPOST("admin"); // A user can only be set admin by an admin - $object->office_phone=GETPOST("office_phone"); - $object->office_fax = GETPOST("office_fax"); + $object->office_phone=GETPOST("office_phone",'alpha'); + $object->office_fax = GETPOST("office_fax",'alpha'); $object->user_mobile= GETPOST("user_mobile"); - $object->skype =GETPOST("skype"); - $object->email = GETPOST("email"); - $object->job = GETPOST("job"); + $object->skype = GETPOST("skype"); + $object->email = GETPOST("email",'alpha'); + $object->job = GETPOST("job",'alpha'); $object->signature = GETPOST("signature"); $object->accountancy_code = GETPOST("accountancy_code"); $object->openid = GETPOST("openid"); @@ -384,8 +385,8 @@ if ($action == 'update' && ! $_POST["cancel"]) $contact->fetch($contactid); $sql = "UPDATE ".MAIN_DB_PREFIX."user"; - $sql.= " SET fk_socpeople=".$contactid; - if ($contact->socid) $sql.=", fk_societe=".$contact->socid; + $sql.= " SET fk_socpeople=".$db->escape($contactid); + if ($contact->socid) $sql.=", fk_societe=".$db->escape($contact->socid); $sql.= " WHERE rowid=".$object->id; } else @@ -1301,19 +1302,23 @@ else } // Multicompany - if (! empty($conf->multicompany->enabled) && empty($conf->multicompany->transverse_mode) && $conf->entity == 1 && $user->admin && ! $user->entity) + // TODO This should be done with hook formObjectOption + if (is_object($mc)) { - print ''.$langs->trans("Entity").''; - if ($object->admin && ! $object->entity) - { - print $langs->trans("AllEntities"); - } - else - { - $mc->getInfo($object->entity); - print $mc->label; - } - print "\n"; + if (! empty($conf->multicompany->enabled) && empty($conf->multicompany->transverse_mode) && $conf->entity == 1 && $user->admin && ! $user->entity) + { + print ''.$langs->trans("Entity").''; + if ($object->admin && ! $object->entity) + { + print $langs->trans("AllEntities"); + } + else + { + $mc->getInfo($object->entity); + print $mc->label; + } + print "\n"; + } } // Other attributes diff --git a/htdocs/user/hierarchy.php b/htdocs/user/hierarchy.php index 8061163fca2..3c330f3a712 100644 --- a/htdocs/user/hierarchy.php +++ b/htdocs/user/hierarchy.php @@ -76,9 +76,9 @@ foreach($fulltree as $key => $val) $userstatic->id=$val['id']; $userstatic->ref=$val['label']; $userstatic->firstname=$val['firstname']; - $userstatic->lastname=$val['name']; + $userstatic->lastname=$val['lastname']; $userstatic->statut=$val['statut']; - $li=$userstatic->getNomUrl(1,'').' ('.$val['login'].')'; + $li=$userstatic->getNomUrl(1,'').' ('.$val['login'].(empty($conf->multicompany->enabled)?'':' - '.$langs->trans("Instance").' '.$val['entity']).')'; $data[] = array( 'rowid'=>$val['rowid'], diff --git a/htdocs/user/home.php b/htdocs/user/home.php index 44b40f7786b..824f505fddd 100644 --- a/htdocs/user/home.php +++ b/htdocs/user/home.php @@ -148,26 +148,30 @@ if ($resql) $companystatic->canvas=$obj->canvas; print $companystatic->getNomUrl(1); } - else if (! empty($conf->multicompany->enabled)) - { - if ($obj->admin && ! $obj->entity) - { - print $langs->trans("AllEntities"); - } - else - { - $mc->getInfo($obj->entity); - print $mc->label; - } - } - else if ($obj->ldap_sid) - { - print $langs->trans("DomainUser"); - } else { print $langs->trans("InternalUser"); } + if ($obj->ldap_sid) + { + print ' ('.$langs->trans("DomainUser").')'; + } + // TODO This should be done with a hook + if (is_object($mc)) + { + if (! empty($conf->multicompany->enabled)) + { + if ($obj->admin && ! $obj->entity) + { + print ' ('.$langs->trans("AllEntities").')'; + } + else + { + $mc->getInfo($obj->entity); + print ' ('.$mc->label.')'; + } + } + } print ''; print ''.dol_print_date($db->jdate($obj->datec),'dayhour').''; print ''; diff --git a/htdocs/user/index.php b/htdocs/user/index.php index 56d866f3ae9..743379f843c 100644 --- a/htdocs/user/index.php +++ b/htdocs/user/index.php @@ -42,7 +42,6 @@ if ($user->societe_id > 0) $sall=GETPOST('sall','alpha'); $search_user=GETPOST('search_user','alpha'); $search_statut=GETPOST('search_statut','alpha'); -if ($search_statut=='') $search_statut=1; // always display activ customer first $sortfield = GETPOST('sortfield','alpha'); $sortorder = GETPOST('sortorder','alpha'); @@ -82,14 +81,14 @@ if(! empty($conf->multicompany->enabled) && $conf->entity == 1 && (! empty($conf } else { - $sql.= " WHERE u.entity IN (0,".$conf->entity.")"; + $sql.= " WHERE u.entity IN (".getEntity('user',1).")"; } if (! empty($socid)) $sql.= " AND u.fk_societe = ".$socid; if (! empty($search_user)) { $sql.= " AND (u.login LIKE '%".$db->escape($search_user)."%' OR u.lastname LIKE '%".$db->escape($search_user)."%' OR u.firstname LIKE '%".$db->escape($search_user)."%')"; } -if ($search_statut!='') +if ($search_statut != '' && $search_statut >= 0) { $sql.= " AND (u.statut=".$search_statut.")"; } @@ -103,8 +102,10 @@ if ($result) $i = 0; print ''."\n"; - - $param="search_user=$search_user&sall=$sall"; + + $param="search_user=".$search_user."&sall=".$sall; + $param.="&search_statut=".$search_statut; + print ''; print ''; print_liste_field_titre($langs->trans("Login"),"index.php","u.login",$param,"","",$sortfield,$sortorder); @@ -116,19 +117,20 @@ if ($result) print_liste_field_titre($langs->trans("Status"),"index.php","u.statut",$param,"",'align="center"',$sortfield,$sortorder); print ''; print "\n"; - + //SearchBar print ''; print ''; + // Status print ''; - + print ''; - + print "\n"; $var=True; while ($i < $num) diff --git a/test/phpunit/FunctionsLibTest.php b/test/phpunit/FunctionsLibTest.php index 11035d148d5..2178ad6fb5a 100755 --- a/test/phpunit/FunctionsLibTest.php +++ b/test/phpunit/FunctionsLibTest.php @@ -186,6 +186,9 @@ class FunctionsLibTest extends PHPUnit_Framework_TestCase $input='xxx
    '; $after=dol_textishtml($input); $this->assertTrue($after); + $input='

    abc

    '; + $after=dol_textishtml($input); + $this->assertTrue($after); // False $input='xxx < br>'; @@ -594,16 +597,16 @@ class FunctionsLibTest extends PHPUnit_Framework_TestCase public function testVerifCond() { $verifcond=verifCond('1==1'); - $this->assertTrue($verifcond); + $this->assertTrue($verifcond,'Test a true comparison'); $verifcond=verifCond('1==2'); - $this->assertFalse($verifcond); + $this->assertFalse($verifcond,'Test a false comparison'); $verifcond=verifCond('$conf->facture->enabled'); - $this->assertTrue($verifcond); + $this->assertTrue($verifcond,'Test that conf property of a module report true when enabled'); $verifcond=verifCond('$conf->moduledummy->enabled'); - $this->assertFalse($verifcond); + $this->assertFalse($verifcond,'Test that conf property of a module report false when disabled'); $verifcond=verifCond(''); $this->assertTrue($verifcond); diff --git a/test/phpunit/LangTest.php b/test/phpunit/LangTest.php index 75bdc958c14..7d173481501 100755 --- a/test/phpunit/LangTest.php +++ b/test/phpunit/LangTest.php @@ -154,11 +154,11 @@ class LangTest extends PHPUnit_Framework_TestCase $result=$tmplangs->trans("SeparatorDecimal"); print __METHOD__." SeparatorDecimal=".$result."\n"; - $this->assertContains($result,array('.',',','/',' ','','None')); + $this->assertContains($result,array('.',',','/',' ','','None'), 'Error for code '.$code); $result=$tmplangs->trans("SeparatorThousand"); print __METHOD__." SeparatorThousand=".$result."\n"; - $this->assertContains($result,array('.',',','/',' ','','None','Space')); + $this->assertContains($result, array('.',',','/',' ','','None','Space'), 'Error for code '.$code); // Test java string contains only d,M,y,/,-,. and not m,... $result=$tmplangs->trans("FormatDateShortJava");
     
     '; - print $form->selectarray('search_statut', array('0'=>$langs->trans('Disabled'),'1'=>$langs->trans('Enabled')),$search_statut); + print $form->selectarray('search_statut', array('-1'=>'','0'=>$langs->trans('Disabled'),'1'=>$langs->trans('Enabled')),$search_statut); print ''; print ''; print '