From eb4362dd5a0e35a7592897d2687e98f66bca3606 Mon Sep 17 00:00:00 2001 From: Jephte CLAIN Date: Thu, 7 Apr 2016 23:55:50 +0400 Subject: [PATCH 01/10] =?UTF-8?q?apacheconfig:=20d=C3=A9ploiement=20pour?= =?UTF-8?q?=20plusieurs=20syst=C3=A8mes=20=C3=A0=20partir=20des=20m=C3=AAm?= =?UTF-8?q?es=20sources?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apacheconfig | 19 ++-- lib/default/apacheconfig | 6 ++ lib/ulib/apache.tools | 86 ++++++++++++++----- lib/ulib/templates/apacheconfig/confs.conf | 0 .../confs.conf..d8} | 0 lib/ulib/templates/apacheconfig/ports.conf | 0 .../ports.conf => apacheconfig/ports.conf..d} | 0 .../ports.conf..d8} | 0 .../templates/apacheconfig/sites/default.conf | 0 .../sites/default.conf..d} | 0 .../sites/default.conf..d8} | 0 .../apacheconfig/sites/default.ssl.conf | 0 .../sites/default.ssl.conf..d} | 0 .../sites/default.ssl.conf..d8} | 0 14 files changed, 78 insertions(+), 33 deletions(-) create mode 100644 lib/default/apacheconfig create mode 100644 lib/ulib/templates/apacheconfig/confs.conf rename lib/ulib/templates/{apacheconfig8/confs.conf => apacheconfig/confs.conf..d8} (100%) create mode 100644 lib/ulib/templates/apacheconfig/ports.conf rename lib/ulib/templates/{apacheconfig7/ports.conf => apacheconfig/ports.conf..d} (100%) rename lib/ulib/templates/{apacheconfig8/ports.conf => apacheconfig/ports.conf..d8} (100%) create mode 100644 lib/ulib/templates/apacheconfig/sites/default.conf rename lib/ulib/templates/{apacheconfig7/sites/default.conf => apacheconfig/sites/default.conf..d} (100%) rename lib/ulib/templates/{apacheconfig8/sites/000-default.conf => apacheconfig/sites/default.conf..d8} (100%) create mode 100644 lib/ulib/templates/apacheconfig/sites/default.ssl.conf rename lib/ulib/templates/{apacheconfig7/sites/default.ssl.conf => apacheconfig/sites/default.ssl.conf..d} (100%) rename lib/ulib/templates/{apacheconfig8/sites/default-ssl.conf => apacheconfig/sites/default.ssl.conf..d8} (100%) diff --git a/apacheconfig b/apacheconfig index bf8e03e..aed47cc 100755 --- a/apacheconfig +++ b/apacheconfig @@ -139,13 +139,18 @@ function __template_updatef_dhost() { [ -n "$ips" ] || __template_set_var ips "" } +DEFAULT_ADMIN=supervision-gdrsi@listes.univ-reunion.fr +DEFAULT_CERTSDIR=1507-renater +DEFAULT_CANAME=1507-DigiCertCA.crt +set_defaults apacheconfig + TEMPLATECTL_NAME=apacheconfig TEMPLATECTL_SRCDIRS=(apacheconfig) TEMPLATECTL_CONFIG="$TEMPLATECTL_NAME" TEMPLATECTL_DEFAULTS=( - admin=supervision-gdrsi@listes.univ-reunion.fr - certsdir=1507-renater - caname=1507-DigiCertCA.crt + admin="$DEFAULT_ADMIN" + certsdir="$DEFAULT_CERTSDIR" + caname="$DEFAULT_CANAME" ) TEMPLATECTL_VARS=() @@ -205,13 +210,7 @@ fi __template_set_var sysname "$sysname" __template_set_var sysdist "$sysdist" __template_set_var sysver "$sysver" -if check_sysinfos --vars sysname sysdist sysver bits -d debian -v jessie+; then - array_add TEMPLATECTL_SRCDIRS apacheconfig8 -elif check_sysinfos --vars sysname sysdist sysver bits -d debian; then - array_add TEMPLATECTL_SRCDIRS apacheconfig7 -else - ewarn "$(get_sysinfos_desc sysname sysdist sysver): système non supporté pour le déploiement" -fi +#check_sysinfos --vars sysname sysdist sysver bits "${templatectl_suffix[@]} ################################################################################ if [ "$action" == create ]; then diff --git a/lib/default/apacheconfig b/lib/default/apacheconfig new file mode 100644 index 0000000..2007e83 --- /dev/null +++ b/lib/default/apacheconfig @@ -0,0 +1,6 @@ +# -*- coding: utf-8 mode: sh -*- vim:sw=4:sts=4:et:ai:si:sta:fenc=utf-8 +# Valeurs par défaut du template apacheconfig + +#DEFAULT_ADMIN=supervision-gdrsi@listes.univ-reunion.fr +#DEFAULT_CERTSDIR=1507-renater +#DEFAULT_CANAME=1507-DigiCertCA.crt diff --git a/lib/ulib/apache.tools b/lib/ulib/apache.tools index 814b4dc..0a92b80 100644 --- a/lib/ulib/apache.tools +++ b/lib/ulib/apache.tools @@ -155,6 +155,17 @@ OPTIONS return 0 } +__APACHE_AUTOCONF_SUFFIXES=(d8 d) +__APACHE_AUTOCONF_SUFFIX_d8=(-d debian -v jessie+) +__APACHE_AUTOCONF_SUFFIX_d=(-d debian) +function __apache_autoconf_check_suffix() { + array_contains __APACHE_AUTOCONF_SUFFIXES "$1" || return 1 + local sysinfos="__APACHE_AUTOCONF_SUFFIX_${1}[@]" + check_sysinfos --vars sysname sysdist sysver bits "${!sysinfos}" +} +function __apache_autoconf_filter_suffix_files() { + grep -vF .. +} function __apache_autoconf_setup() { if ! check_sysinfos --vars sysname sysdist sysver bits -s linux64 linux32 linux -d debian; then eerror "apache_autoconf n'est supporté que sur Debian linux" @@ -182,17 +193,33 @@ function __apache_autoconf_fillcopy() { # script sed $FILLSCRIPT. Le fichier temporaire $FILLTEMP est utilisé pour # le remplacement des valeurs. $3 contient le cas échéant des commandes sed # supplémentaires + # Si des fichiers suffixes existent, ne faire la copie que si un fichier + # approprié correspondant au système courant est trouvé local src="$1" dest="$2" sedscript="$3" perms="${4:-go+rX}" - local var found + # vérifier les fichiers suffixe + local suffix have_suffix found_suffix + for suffix in "${__APACHE_AUTOCONF_SUFFIXES[@]}"; do + if [ -f "$src..$suffix" ]; then + have_suffix=1 + if __apache_autoconf_check_suffix "$suffix"; then + found_suffix=1 + src="$src..$suffix" + break + fi + fi + done + [ -n "$have_suffix" -a -z "$found_suffix" ] && return 1 + + # valeurs à remplacer dans le fichier + local var found_var for var in "${FILLVARS[@]}"; do - if quietgrep "@@${var}@@" "$1"; then - found=1 + if quietgrep "@@${var}@@" "$src"; then + found_var=1 break fi done - - if [ "$found" ]; then + if [ "$found_var" ]; then sed "$FILLSCRIPT $sedscript" <"$src" >"$FILLTEMP" src="$FILLTEMP" @@ -272,10 +299,14 @@ function apache_autoconf() { bits="$MYBITS" fi __apache_autoconf_setup || return 1 - if check_sysinfos --vars sysname sysdist sysver bits -d debian -v jessie+; then + if __apache_autoconf_check_suffix d8; then + confdefault=000-default.conf + confdefaultssl=default-ssl.conf destconfsdir="$APACHECONFDIR/conf-available" a2xconf=1 - elif check_sysinfos --vars sysname sysdist sysver bits -d debian; then + elif __apache_autoconf_check_suffix d; then + confdefault=default + confdefaultssl=default-ssl destconfsdir="$APACHECONFDIR/conf.d" fi @@ -347,7 +378,7 @@ function apache_autoconf() { local -a confs local conf etitle "Installation des configurations" - array_from_lines confs "$(list_files "$confsdir" "*.conf")" + array_from_lines confs "$(list_files "$confsdir" "*.conf" | __apache_autoconf_filter_suffix_files)" for conf in "${confs[@]}"; do [ -z "$oneconf" -o "$conf" == "$oneconf" ] || continue @@ -364,7 +395,7 @@ function apache_autoconf() { local -a confs local conf etitle "Installation des configurations des modules" - array_from_lines confs "$(list_files "$modulesdir" "*.conf")" + array_from_lines confs "$(list_files "$modulesdir" "*.conf" | __apache_autoconf_filter_suffix_files)" for conf in "${confs[@]}"; do [ -z "$onemodule" -o "$conf" == "$onemodule" ] || continue @@ -397,9 +428,9 @@ function apache_autoconf() { local -a confs local conf confname destconf certsconf etitle "Installation des sites" - array_lsfiles confs "$sitesdir" "*.conf" - for conf in "${confs[@]}"; do - confname="$(basename "$conf")" + array_from_lines confs "$(list_files "$sitesdir" "*.conf" | __apache_autoconf_filter_suffix_files)" + for confname in "${confs[@]}"; do + conf="$sitesdir/$confname" [ -z "$onesite" -o "$confname" == "$onesite" ] || continue certsconf= @@ -411,8 +442,8 @@ function apache_autoconf() { fi fi case "$confname" in - default.conf) destconf=default;; - default.ssl.conf) destconf=default-ssl;; + default.conf) destconf="$confdefault";; + default.ssl.conf) destconf="$confdefaultssl";; *) destconf="$confname";; esac @@ -446,12 +477,10 @@ s#@@ca@@#$APACHESSLCERTSDIR/$(basename "$ca")#g local -a confs local conf etitle "Configuration de base" - array_from_lines confs "$(list_files "$confdir")" + array_add ignores confs.conf modules.conf sites.conf + array_from_lines confs "$(list_files "$confdir" | __apache_autoconf_filter_suffix_files)" for conf in "${confs[@]}"; do array_contains ignores "$conf" && continue - case "$conf" in - confs.conf|modules.conf|sites.conf) continue;; - esac estep "$conf" __apache_autoconf_fillcopy \ "$confdir/$conf" \ @@ -490,7 +519,7 @@ s#@@ca@@#$APACHESSLCERTSDIR/$(basename "$ca")#g done fi if [ -f "$confdir/sites.conf" ]; then - local -a sitesconfs; local sitesconf + local -a sitesconfs; local sitesconf enable array_from_lines sitesconfs "$(<"$confdir/sites.conf" filter_conf)" if [ ${#sitesconfs[*]} -gt 0 ]; then # si une configuration existe, ignorer la configuration @@ -499,14 +528,25 @@ s#@@ca@@#$APACHESSLCERTSDIR/$(basename "$ca")#g disablesites=() for sitesconf in "${sitesconfs[@]}"; do if [ "${sitesconf#+}" != "$sitesconf" ]; then - array_del disablesites "${sitesconf#+}" - array_add enablesites "${sitesconf#+}" + enable=1 + sitesconf="${sitesconf#+}" elif [ "${sitesconf#-}" != "$sitesconf" ]; then - array_del enablesites "${sitesconf#-}" - array_add disablesites "${sitesconf#-}" + enable= + sitesconf="${sitesconf#-}" else + enable=1 + fi + + case "$sitesconf" in + default.conf) sitesconf="$confdefault";; + default.ssl.conf) sitesconf="$confdefaultssl";; + esac + if [ -n "$enable" ]; then array_del disablesites "$sitesconf" array_add enablesites "$sitesconf" + else + array_del enablesites "$sitesconf" + array_add disablesites "$sitesconf" fi done fi diff --git a/lib/ulib/templates/apacheconfig/confs.conf b/lib/ulib/templates/apacheconfig/confs.conf new file mode 100644 index 0000000..e69de29 diff --git a/lib/ulib/templates/apacheconfig8/confs.conf b/lib/ulib/templates/apacheconfig/confs.conf..d8 similarity index 100% rename from lib/ulib/templates/apacheconfig8/confs.conf rename to lib/ulib/templates/apacheconfig/confs.conf..d8 diff --git a/lib/ulib/templates/apacheconfig/ports.conf b/lib/ulib/templates/apacheconfig/ports.conf new file mode 100644 index 0000000..e69de29 diff --git a/lib/ulib/templates/apacheconfig7/ports.conf b/lib/ulib/templates/apacheconfig/ports.conf..d similarity index 100% rename from lib/ulib/templates/apacheconfig7/ports.conf rename to lib/ulib/templates/apacheconfig/ports.conf..d diff --git a/lib/ulib/templates/apacheconfig8/ports.conf b/lib/ulib/templates/apacheconfig/ports.conf..d8 similarity index 100% rename from lib/ulib/templates/apacheconfig8/ports.conf rename to lib/ulib/templates/apacheconfig/ports.conf..d8 diff --git a/lib/ulib/templates/apacheconfig/sites/default.conf b/lib/ulib/templates/apacheconfig/sites/default.conf new file mode 100644 index 0000000..e69de29 diff --git a/lib/ulib/templates/apacheconfig7/sites/default.conf b/lib/ulib/templates/apacheconfig/sites/default.conf..d similarity index 100% rename from lib/ulib/templates/apacheconfig7/sites/default.conf rename to lib/ulib/templates/apacheconfig/sites/default.conf..d diff --git a/lib/ulib/templates/apacheconfig8/sites/000-default.conf b/lib/ulib/templates/apacheconfig/sites/default.conf..d8 similarity index 100% rename from lib/ulib/templates/apacheconfig8/sites/000-default.conf rename to lib/ulib/templates/apacheconfig/sites/default.conf..d8 diff --git a/lib/ulib/templates/apacheconfig/sites/default.ssl.conf b/lib/ulib/templates/apacheconfig/sites/default.ssl.conf new file mode 100644 index 0000000..e69de29 diff --git a/lib/ulib/templates/apacheconfig7/sites/default.ssl.conf b/lib/ulib/templates/apacheconfig/sites/default.ssl.conf..d similarity index 100% rename from lib/ulib/templates/apacheconfig7/sites/default.ssl.conf rename to lib/ulib/templates/apacheconfig/sites/default.ssl.conf..d diff --git a/lib/ulib/templates/apacheconfig8/sites/default-ssl.conf b/lib/ulib/templates/apacheconfig/sites/default.ssl.conf..d8 similarity index 100% rename from lib/ulib/templates/apacheconfig8/sites/default-ssl.conf rename to lib/ulib/templates/apacheconfig/sites/default.ssl.conf..d8 From 6411e639d9b0449ce06a161495e8504ef6d7dacd Mon Sep 17 00:00:00 2001 From: Jephte Clain Date: Wed, 13 Apr 2016 09:58:42 +0400 Subject: [PATCH 02/10] configurer la valeur de l'umask --- lib/profile.d/nutools.shared | 5 ++++- lib/profile.d/nutools.userconf | 3 +++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/lib/profile.d/nutools.shared b/lib/profile.d/nutools.shared index 05d0a93..33ed097 100644 --- a/lib/profile.d/nutools.shared +++ b/lib/profile.d/nutools.shared @@ -11,7 +11,7 @@ : "${UTOOLS_AUTO:=1}" export UTOOLS_AUTO # Activer le mode offline de git. Par exemple, les modifications ne sont pas -# pousser automatiquement vers l'origine. +# poussées automatiquement vers l'origine. : "${UTOOLS_VCS_OFFLINE:=}" export UTOOLS_VCS_OFFLINE @@ -93,6 +93,9 @@ if [ -n "$UTOOLS_USSH_ALIAS" ]; then } fi +# Configuration de l'umask +umask "${UTOOLS_UMASK:-0022}" + # Configuration __uaddpath "@@dest@@" PATH __uaddpath "@@dest@@" UINCPATH diff --git a/lib/profile.d/nutools.userconf b/lib/profile.d/nutools.userconf index c71ca8d..af0fa61 100644 --- a/lib/profile.d/nutools.userconf +++ b/lib/profile.d/nutools.userconf @@ -21,6 +21,9 @@ # Désactiver l'affichage en couleur pour les fonctions e* #export UTOOLS_NO_COLORS=1 +# Valeur de l'umask à configurer +#export UTOOLS_UMASK=0022 + # Editeur à utiliser #export EDITOR=vim From f460399dd546325ab1ee8b14e52c681e78c7e472 Mon Sep 17 00:00:00 2001 From: Jephte Clain Date: Wed, 13 Apr 2016 10:01:37 +0400 Subject: [PATCH 03/10] =?UTF-8?q?am=C3=A9liorer=20le=20calcul=20du=20r?= =?UTF-8?q?=C3=A9pertoire=20destination=20avec=20pclone/pcrone?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- uproject | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/uproject b/uproject index 3276c60..852a8e1 100755 --- a/uproject +++ b/uproject @@ -270,9 +270,13 @@ elif array_contains GITANNEX_CMDS "$CMD"; then elif [ "$CMD" == clone ]; then repourl="${1%.git}" [ -n "$repourl" ] || die "Vous devez spécifier l'url du dépôt git" + splitfsep "$repourl" : userhost path destdir="$2" - [ -n "$destdir" ] || setx destdir=basename -- "$repourl" + if [ -z "$destdir" ]; then + setx destdir=basename -- "$path" + destdir="${destdir%.git}" + fi [ -d "$destdir" ] && die "$(ppath "$destdir"): répertoire existant" use_ssh_wrapper @@ -282,12 +286,15 @@ elif [ "$CMD" == clone ]; then elif [ "$CMD" == crone ]; then repourl="${1%.git}" [ -n "$repourl" ] || die "Vous devez spécifier l'url du dépôt git" + splitfsep "$repourl" : userhost path destdir="$2" - [ -n "$destdir" ] || setx destdir=basename -- "$repourl" + if [ -z "$destdir" ]; then + setx destdir=basename -- "$path" + destdir="${destdir%.git}" + fi [ -d "$destdir" ] && die "$(ppath "$destdir"): répertoire existant" - splitfsep "$repourl" : userhost path splituserhost "$userhost" user host [ -n "$user" ] || user=git [ -n "$host" ] || die "Vous devez spécifier l'hôte" From 1ad804b0d5f3bd40779c23f6537e4714b32d6d2c Mon Sep 17 00:00:00 2001 From: Jephte Clain Date: Wed, 13 Apr 2016 14:51:37 +0400 Subject: [PATCH 04/10] =?UTF-8?q?impl=C3=A9mentation=20initiale=20de=20rum?= =?UTF-8?q?ount?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- rumount | 42 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100755 rumount diff --git a/rumount b/rumount new file mode 100755 index 0000000..9d65746 --- /dev/null +++ b/rumount @@ -0,0 +1,42 @@ +#!/bin/bash +# -*- coding: utf-8 mode: sh -*- vim:sw=4:sts=4:et:ai:si:sta:fenc=utf-8 +source "$(dirname "$0")/lib/ulib/ulib" || exit 1 +urequire DEFAULTS + +function display_help() { + uecho "$scriptname: démonter un système de fichier récursivement + +USAGE + $scriptname mountpoint + +Démonter tous les systèmes de fichiers qui sont montés en-dessous de mountpoint +puis démonter mountpoint. Démonter aussi tous les systèmes de fichiers +bind-montés à partir d'un sous-répertoire de mountpoint." +} + +args=(--help '$exit_with display_help') +parse_args "$@"; set -- "${args[@]}" + +mountp="$1" +[ -n "$mountp" ] || die "Vous dévez spécifier le système de fichier à démonter" +[ -d "$mountp" ] || die "$mountp: répertoire introuvable" +setx mountp=abspath "$mountp" + +run_as_root "$@" + +setx -a mountps=findmnt -nlo TARGET +array_contains mountps "$mountp" || die "Vous devez spécifier un répertoire de montage valide" + +function show_all() { + findmnt -T "$mountp" -Rnlo TARGET + findmnt -nlo TARGET | awkrun mountp="$mountp" '{ if (substr($0, 1, length(mountp) + 1) == (mountp "/")) print }' +} + +setx -a mounts=evalp show_all // sort -u // \ + awk '{print length($0) "," $0}' // \ + sort -nr // \ + awk '{sub(/[0-9]+,/, ""); print}' +for mount in "${mounts[@]}"; do + estep "$mount" + umount "$mount" || die +done From 48c04203bf01cebecc7e9d2ca763590a0908b143 Mon Sep 17 00:00:00 2001 From: Jephte Clain Date: Wed, 13 Apr 2016 15:39:57 +0400 Subject: [PATCH 05/10] =?UTF-8?q?ne=20pas=20afficher=20d'erreur=20si=20apa?= =?UTF-8?q?che=20n'est=20pas=20install=C3=A9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/ulib/apache | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/ulib/apache b/lib/ulib/apache index 547ee79..75d16f2 100644 --- a/lib/ulib/apache +++ b/lib/ulib/apache @@ -51,7 +51,7 @@ function get_default_apachebin_prefix() { function get_default_apacheversion_prefix() { [ -n "$APACHEBIN" ] || return - local version="$($APACHEBIN -v | grep version:)" + local version="$($APACHEBIN -v 2>/dev/null | grep version:)" if [[ "$version" == *1.3* ]]; then echo "" elif [[ "$version" == *2.0* ]]; then From 130b4d161830de8f8e0fe41e6dc2e71079f29cc7 Mon Sep 17 00:00:00 2001 From: Jephte CLAIN Date: Thu, 14 Apr 2016 05:39:07 +0400 Subject: [PATCH 06/10] tenir compte du fichier /etc/debian_chroot pour initialiser UTOOLS_CHROOT --- lib/nutoolsrc | 4 +++- lib/profile.d/bash_prompt.shared | 7 +++++++ lib/ulib/base.init | 1 + 3 files changed, 11 insertions(+), 1 deletion(-) diff --git a/lib/nutoolsrc b/lib/nutoolsrc index a503f2a..8b7e449 100644 --- a/lib/nutoolsrc +++ b/lib/nutoolsrc @@ -2,7 +2,9 @@ # Ce fichier contient des informations à charger systématiquement par nutools, # et qui doivent prendre la précédence sur toute valeur autodétectée. -# Ce "système" est-is dans un CHROOT? +# Ce "système" est-is dans un CHROOT? Le module base.init initialise cette +# variable au contenu du fichier /etc/debian_chroot s'il existe, mais il est +# possible de forcer la valeur sur une machine non debian. #export UTOOLS_CHROOT=1 # Si oui, les valeurs suivantes peuvent être forcées pour les données systèmes: diff --git a/lib/profile.d/bash_prompt.shared b/lib/profile.d/bash_prompt.shared index 3c8a410..6c035b5 100644 --- a/lib/profile.d/bash_prompt.shared +++ b/lib/profile.d/bash_prompt.shared @@ -7,6 +7,13 @@ if [ -n "$UTOOLS_BASH_PROMPT" ]; then else DEFAULT_PS1="$USER"'(\u)@\h \w \$ ' fi + if [ -z "$UTOOLS_CHROOT" ]; then + if [ -n "$debian_chroot" ]; then + UTOOLS_CHROOT="$debian_chroot" + elif [ -r /etc/debian_chroot ]; then + UTOOLS_CHROOT="$( Date: Thu, 14 Apr 2016 14:39:05 +0400 Subject: [PATCH 07/10] git_track_branch(): support de git >= 1.8.x --- lib/ulib/vcs | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/lib/ulib/vcs b/lib/ulib/vcs index 84dbf35..82992e2 100644 --- a/lib/ulib/vcs +++ b/lib/ulib/vcs @@ -676,7 +676,14 @@ function git_track_branch() { if ! git_have_rbranch "$branch" "$origin"; then git push "$origin" "$branch" || return fi - git branch -t --set-upstream "$branch" "$origin/$branch" + local version="$(LANG=C git version)" + version="${version#git version }" + eval "version=(${version//./ })" + if [ ${version[0]} -le 1 -a ${version[1]} -le 7 ]; then + git branch -t --set-upstream "$branch" "$origin/$branch" + else + git branch -u "$origin/$branch" "$branch" + fi } function git_ensure_branch() { # retourner 0 si la branche a été créée, 1 si elle existait déjà, 2 en cas d'erreur From 73391a9a72412923419e9612ad70126ad0f444c4 Mon Sep 17 00:00:00 2001 From: Jephte Clain Date: Fri, 15 Apr 2016 12:03:49 +0400 Subject: [PATCH 08/10] =?UTF-8?q?awkrun:=20ajout=20d'un=20champ=20field=20?= =?UTF-8?q?=C3=A0=20cqsql?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/ulib/base | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/ulib/base b/lib/ulib/base index 2e2571f..ce13062 100644 --- a/lib/ulib/base +++ b/lib/ulib/base @@ -1918,8 +1918,8 @@ function qsql(s) {'" gsub(/'/, \"''\", s) return \"'\" s \"'\" "'} -function cqsql(s) { - return "," qsql(s) +function cqsql(s, field) { + return "," qsql(s) (field != ""? " " field: "") } function unquote_mysqlcsv(s) { gsub(/\\n/, "\n", s) From 287c82374c2c95a92db9f3f0842652225ae25465 Mon Sep 17 00:00:00 2001 From: Jephte Clain Date: Fri, 15 Apr 2016 12:04:24 +0400 Subject: [PATCH 09/10] Init changelog & version 4.4.0 --- CHANGES.txt | 12 ++++++++++++ VERSION.txt | 2 +- 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/CHANGES.txt b/CHANGES.txt index 65234a0..dc912ae 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -1,3 +1,15 @@ +## Version 4.4.0 du 15/04/2016-12:04 + +73391a9 awkrun: ajout d'un champ field à cqsql +2f60fec git_track_branch(): support de git >= 1.8.x +130b4d1 tenir compte du fichier /etc/debian_chroot pour initialiser UTOOLS_CHROOT +48c0420 ne pas afficher d'erreur si apache n'est pas installé +5e1a6cf Intégration de la branche rumount +1ad804b implémentation initiale de rumount +f460399 améliorer le calcul du répertoire destination avec pclone/pcrone +6411e63 configurer la valeur de l'umask +eb4362d apacheconfig: déploiement pour plusieurs systèmes à partir des mêmes sources + ## Version 4.3.0 du 07/04/2016-14:57 d021c97 support de on_debian() avec des arguments diff --git a/VERSION.txt b/VERSION.txt index 8089590..fdc6698 100644 --- a/VERSION.txt +++ b/VERSION.txt @@ -1 +1 @@ -4.3.0 +4.4.0 From 57f608de2393a790ca22ac3189205e08e03f4331 Mon Sep 17 00:00:00 2001 From: Jephte Clain Date: Fri, 15 Apr 2016 12:04:36 +0400 Subject: [PATCH 10/10] maj ulib --- lib/ulib/.ulibver | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/ulib/.ulibver b/lib/ulib/.ulibver index be615a5..ff21241 100644 --- a/lib/ulib/.ulibver +++ b/lib/ulib/.ulibver @@ -1 +1 @@ -012002000 +012003000