From 9d7594356e3f9bc646dcdc19ab6e99e250aaf533 Mon Sep 17 00:00:00 2001 From: Jephte Clain Date: Wed, 12 Apr 2023 08:37:49 +0400 Subject: [PATCH 01/13] =?UTF-8?q?repoctl:=20correction=20de=20l'url=20g?= =?UTF-8?q?=C3=A9n=C3=A9r=C3=A9=20des=20d=C3=A9p=C3=B4ts=20git?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- repoctl | 2 +- uproject | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/repoctl b/repoctl index 49a4410..4d223e1 100755 --- a/repoctl +++ b/repoctl @@ -132,7 +132,7 @@ function gogs_setvars() { function _update_origin() { estep "Mise à jour de l'origine" - git remote set-url origin "$repourl" + git remote set-url origin "${repourl%.git}.git" } function _update_origin_push() { if ask_yesno "Faut-il faire git push?" O; then diff --git a/uproject b/uproject index f6ccdf7..d68c8de 100755 --- a/uproject +++ b/uproject @@ -591,11 +591,11 @@ result: $result" if [ -n "$tmpdestdir" ]; then setxx destname=abspath "$destdir" // basename - git clone "$repourl" "$tmpdestdir/$destname" || die + git clone "${repourl%.git}.git" "$tmpdestdir/$destname" || die mv "$tmpdestdir/$destname/.git" "$destdir" || die ac_clean "$tmpdestdir" else - git clone "$repourl" "$destdir" || die + git clone "${repourl%.git}.git" "$destdir" || die fi else die "bug: mode non prévu" From 7ba7d1c5014fba9a7faa195edebdbfe17ed1e770 Mon Sep 17 00:00:00 2001 From: Jephte Clain Date: Wed, 12 Apr 2023 08:47:54 +0400 Subject: [PATCH 02/13] =?UTF-8?q?pcxone:=20correction=20de=20l'url=20g?= =?UTF-8?q?=C3=A9n=C3=A9r=C3=A9=20des=20d=C3=A9p=C3=B4ts=20git?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- uproject | 1 + 1 file changed, 1 insertion(+) diff --git a/uproject b/uproject index d68c8de..361a262 100755 --- a/uproject +++ b/uproject @@ -467,6 +467,7 @@ NR <= 2 { next } else repourl="$1" [ -n "$repourl" ] || die "Vous devez spécifier l'url du dépôt git" + [ "$rtype" == gogs -o "$rtype" == gitea ] && repourl="${repourl%.git}.git" destdir="$2" if [ -z "$destdir" ]; then From 6919352a5901fc7344aaacfdcbf94ad19e0d88e5 Mon Sep 17 00:00:00 2001 From: Jephte Clain Date: Wed, 12 Apr 2023 15:59:23 +0400 Subject: [PATCH 03/13] =?UTF-8?q?maj=20du=20message=20de=20commit=20par=20?= =?UTF-8?q?d=C3=A9faut?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- uproject | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/uproject b/uproject index 361a262..c656acc 100755 --- a/uproject +++ b/uproject @@ -338,7 +338,7 @@ elif array_contains GITANNEX_CMDS "$CMD"; then function xsync() { if ! git_have_annex; then setyesval offline "$UTOOLS_VCS_OFFLINE" - if git_commit -Al "Maj des fichiers"; then + if git_commit -Al "modifs.mineures sans commentaires"; then [ -n "$offline" ] && return 0 git_have_remote || return 0 git pull && git_push From c5796d6b2d782cfebc098b6cc3ac71713cfa86fe Mon Sep 17 00:00:00 2001 From: Jephte Clain Date: Sun, 14 May 2023 08:09:51 +0400 Subject: [PATCH 04/13] modifs.mineures sans commentaires --- TODO.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/TODO.md b/TODO.md index d8a4400..a57d611 100644 --- a/TODO.md +++ b/TODO.md @@ -4,5 +4,7 @@ dkbuild * setversion peut prendre la version depuis la branche git d'un dépôt * un argument permettrait de spécifier comment la version est calculée à partir du dépôt +* si cela a du sens, une commande setlatest qui permet de désigner quelle + distribution/version est la dernière -*- coding: utf-8 mode: markdown -*- vim:sw=4:sts=4:et:ai:si:sta:fenc=utf-8:noeol:binary \ No newline at end of file From 81cefdc51e70dd557b586b8c2021622bcda8dee4 Mon Sep 17 00:00:00 2001 From: Jephte Clain Date: Tue, 16 May 2023 11:13:58 +0400 Subject: [PATCH 05/13] regcp: activer support regexp-extended --- regcp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/regcp b/regcp index 4594ad5..c4feee8 100755 --- a/regcp +++ b/regcp @@ -30,6 +30,7 @@ USAGE $scriptname REGEXP FILEs.... NB: l'expression régulière est traitée avec sed, e.g s/FROM/TO/ +NB: le support de regexp-extended est activé OPTIONS -n, --fake @@ -47,7 +48,7 @@ regexp="$1"; shift [ -n "$regexp" ] || die "l'expression régulière est requise" for src in "$@"; do - dest="$(sed "$regexp" <<<"$src")" + dest="$(sed -r "$regexp" <<<"$src")" if [ "$src" == "$dest" ]; then eerror "$src: refus de $VERB le fichier sur lui-même" else From 9c1a8e67b2e722a27dd3d5c1f9bb90c475365bf3 Mon Sep 17 00:00:00 2001 From: Jephte Clain Date: Wed, 17 May 2023 09:03:33 +0400 Subject: [PATCH 06/13] =?UTF-8?q?dk:=20composer.phar=20est=20cherch=C3=A9?= =?UTF-8?q?=20dans=20sbin/=20aussi?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- dk | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/dk b/dk index ff3293f..f3a34f6 100755 --- a/dk +++ b/dk @@ -220,8 +220,8 @@ COMMANDES pour lancer l'image docker. La valeur par défaut est -u, ce qui force l'utilisation de l'instance docker locale. * COMPOSER_CMD -- Chemin vers l'exécutable composer. Par défaut, - utiliser composer.phar s'il existe dans le répertoire du projet. Sinon - utiliser /usr/bin/composer + utiliser composer.phar s'il existe dans le répertoire du projet ou + dans un sous-répertoire sbin/. Sinon utiliser /usr/bin/composer * COMPOSER_SETUP -- Liste de commandes à lancer pour configurer le container. Dans ce cas, un container ayant pour base \$COMPOSER_IMAGE et nommé d'après le nom du projet est préparé et les commandes @@ -1940,6 +1940,7 @@ function default_local_composer() { *) if [ -n "$COMPOSER_CMD" ]; then : elif [ -x composer.phar ]; then COMPOSER_CMD=./composer.phar + elif [ -x sbin/composer.phar ]; then COMPOSER_CMD=./sbin/composer.phar elif [ -x /usr/bin/composer ]; then COMPOSER_CMD=/usr/bin/composer else eerror "Impossible de trouver composer" @@ -1995,6 +1996,7 @@ echo "$group" >>/etc/group; group="${group%%:*}" cd "$projdir" if [ -n "$composer" ]; then : elif [ -x composer.phar ]; then composer=./composer.phar +elif [ -x sbin/composer.phar ]; then composer=./sbin/composer.phar elif [ -x /usr/bin/composer ]; then composer=/usr/bin/composer else echo "ERROR: Impossible de trouver composer" From 5e876652f8c0bc82b30417f0b61e92f27d82eaa7 Mon Sep 17 00:00:00 2001 From: Jephte Clain Date: Fri, 19 May 2023 10:31:56 +0400 Subject: [PATCH 07/13] dk: X supprimer aussi le cache --- dk | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/dk b/dk index f3a34f6..13065a3 100755 --- a/dk +++ b/dk @@ -179,7 +179,7 @@ COMMANDES sélectionner que les images correspondant au filtre qui ont le tag spécifié. X|prune - Supprimer les containers et les images inutilisées + Supprimer les containers, les images et les objets caches inutilisées composer|ci|cu|cr|cs [args...] Frontend pour lancer composer à l'intérieur d'un container. @@ -2941,6 +2941,7 @@ NR == 1 { print; next } X|prune) "$DOCKER" container prune -f || die "$DOCKER" image prune -f || die + "$DOCKER" builder prune -f || die ;; composer|c|ci|cu|cr|cs) build_set_options "$update_apps_mode" "$update_apps_origin" "$update_apps_branch" From dc94b5c0cf4d8d98eae9fe69d1f5d1b526a12f6e Mon Sep 17 00:00:00 2001 From: Jephte Clain Date: Tue, 23 May 2023 15:11:54 +0400 Subject: [PATCH 08/13] dkbuild: bug avec les chemins --- dkbuild | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) diff --git a/dkbuild b/dkbuild index 3df7a11..f071ec4 100755 --- a/dkbuild +++ b/dkbuild @@ -2213,7 +2213,10 @@ fi cd "$destdir" || die [ -n "$action" ] || action=install - [ "$action" == none ] && return + if [ "$action" == none ]; then + cd "$cwd" + return + fi local build="${DEFAULTS[build_build]-1}" local args @@ -2267,7 +2270,10 @@ fi shift done - [ -n "$build" ] || return + if [ -z "$build" ]; then + cd "$cwd" + return + fi if [ "$php" != force -a "$php" != any ]; then # Si php n'est pas disponible dans le PATH, forcer l'utilisation de @@ -2503,7 +2509,10 @@ cd "$projdir" cd "$destdir" || die [ -n "$action" ] || action=package - [ "$action" == none ] && return + if [ "$action" == none ]; then + cd "$cwd" + return + fi local build="${DEFAULTS[build_build]-1}" local args="${DEFAULTS[mvn_args]}" @@ -2549,7 +2558,10 @@ cd "$projdir" shift done - [ -n "$build" ] || return + if [ -z "$build" ]; then + cd "$cwd" + return + fi local version case "$action" in From efe9fbbbdbb9497017cd56671f008f7bf23c7f58 Mon Sep 17 00:00:00 2001 From: Jephte Clain Date: Tue, 6 Jun 2023 08:20:45 +0400 Subject: [PATCH 09/13] dk: ajout de XX pour prune-cache --- dk | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/dk b/dk index 13065a3..90712bd 100755 --- a/dk +++ b/dk @@ -179,7 +179,9 @@ COMMANDES sélectionner que les images correspondant au filtre qui ont le tag spécifié. X|prune - Supprimer les containers, les images et les objets caches inutilisées + XX|prune-cache + Supprimer les containers, les images et avec prune-cache, les objets + caches inutilisées composer|ci|cu|cr|cs [args...] Frontend pour lancer composer à l'intérieur d'un container. @@ -2939,6 +2941,10 @@ NR == 1 { print; next } fi ;; X|prune) + "$DOCKER" container prune -f || die + "$DOCKER" image prune -f || die + ;; + XX|prune-cache) "$DOCKER" container prune -f || die "$DOCKER" image prune -f || die "$DOCKER" builder prune -f || die From 92157dee4218a852b7263a005ab7edb14dac7155 Mon Sep 17 00:00:00 2001 From: Jephte Clain Date: Fri, 9 Jun 2023 17:29:47 +0400 Subject: [PATCH 10/13] =?UTF-8?q?regins:=20impl=C3=A9mentation=20initiale?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- reginc | 73 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 73 insertions(+) create mode 100755 reginc diff --git a/reginc b/reginc new file mode 100755 index 0000000..68acd27 --- /dev/null +++ b/reginc @@ -0,0 +1,73 @@ +#!/bin/bash +# -*- coding: utf-8 mode: sh -*- vim:sw=4:sts=4:et:ai:si:sta:fenc=utf-8 +source "$(dirname -- "$0")/lib/ulib/auto" || exit 1 + +function display_help() { + uecho "$scriptname: modifier en masse un ensemble de valeurs numériques contigües dans un fichier + +USAGE + $scriptname FILE FROMmin-FROMmax TO + +remplacer les nombres de FROMmin à FROMmax par leur valeur correspondante, +sachant que FROMmin doit être remplacé par TO. On peut mentionner autant de +couples (FROM, TO) que nécessaire: ils seront traités dans l'ordre + +OPTIONS + -n, --fake + Afficher le fichier tel qu'il serait modifié au lieu de le modifier en + place" +} + +fake= +args=( + --help '$exit_with display_help' + -n,--fake fake=1 +) +parse_args "$@"; set -- "${args[@]}" + +file="$1"; shift +[ -n "$file" ] || die "vous devez spécifier le fichier à modifier" + +seds= +while [ $# -ge 2 ]; do + from="$1" + if [[ "$from" == *-* ]]; then + let fromb="${from%-*}" + let frome="${from#*-}" + else + let fromb="$from" + let frome="$from" + fi + let to="$2"; shift 2 + + if [ "$to" -eq "$fromb" ]; then + einfo "$fromb --> $to aucune modification n'est nécessaire" + + elif [ "$to" -lt "$fromb" ]; then + einfo "$fromb-$frome --> $to-$((to+frome-fromb))" + + let from=fromb + while [ "$from" -le "$frome" ]; do + seds="$seds${seds:+; }s/$from/$to/g" + let from=from+1 + let to=to+1 + done + + elif [ "$to" -gt "$fromb" ]; then + einfo "$frome-$fromb --> $((to+frome-fromb))-$to" + + let from=frome + let to=to+frome-fromb + while [ "$from" -ge "$fromb" ]; do + seds="$seds${seds:+; }s/$from/$to/g" + let from=from-1 + let to=to-1 + done + fi +done + +edebug "Script sed: $seds" + +[ -n "$fake" ] && args=() || args=(-i) +args+=("$seds" "$file") +sed "${args[@]}" From 27a82e439bdd7db447ad00071847ae01a1aa9cc0 Mon Sep 17 00:00:00 2001 From: Jephte Clain Date: Mon, 12 Jun 2023 16:34:54 +0400 Subject: [PATCH 11/13] =?UTF-8?q?ajouter=20les=20num=C3=A9ros=20de=20versi?= =?UTF-8?q?on=20des=20debian=20et=20ubuntu?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/ulib/sysinfos | 27 +++++++++++++++++++++++---- 1 file changed, 23 insertions(+), 4 deletions(-) diff --git a/lib/ulib/sysinfos b/lib/ulib/sysinfos index ede5854..ae60c03 100644 --- a/lib/ulib/sysinfos +++ b/lib/ulib/sysinfos @@ -25,8 +25,19 @@ SYSDIST_ALIASES=( # attention: dans *_SYSVERS, les noms doivent être ordonnés du plus récent au # moins récent debianlike_SYSVERS=() -debian_SYSVERS=(bullseye buster stretch jessie wheezy squeeze lenny etch) -ubuntu_SYSVERS=(oneiric natty maverick lucid karmic jaunty intrepid hardy) +debian_SYSVERS=( + forky trixie bookworm bullseye buster stretch jessie wheezy squeeze lenny etch +) +ubuntu_SYSVERS=( + mantic lunar kinetic jammy + impish hirsute groovy focal + eoan disco cosmic bionic + artful zesty yakkety xenial + wily vivid utopic trusty + saucy raring quantal precise + oneiric natty maverick lucid + karmic jaunty intrepid hardy +) redhatlike_SYSVERS=() ol_SYSVERS=(ol8 ol7 ol6 redhat8 redhat7 redhat6) rhel_SYSVERS=(rhel8 rhel7 rhel6 rhel5 rhel4 redhat8 redhat7 redhat6 redhat5 redhat4) @@ -35,8 +46,16 @@ centos_SYSVERS=(centos7 centos6 centos5 centos4 redhat7 redhat6 redhat5 redhat4) suse_SYSVERS=() gentoo_SYSVERS=() SYSVER_ALIASES=( - 11=bullseye 10=buster 9=stretch 8=jessie 7=wheezy 6=squeeze 5=lenny 4=etch - 11.10=oneiric 11.04=natty 10.10=maverick 10.04=lucid 9.10=karmic 9.04=jaunty 8.10=intrepid 8.04=hardy + 14=forky 13=trixie 12=bookworm 11=bullseye 10=buster 9=stretch 8=jessie 7=wheezy 6=squeeze 5=lenny 4=etch + # les derniers de chaque lignes sont des LTS + 23.10=mantic 23.04=lunar 22.10=kinetic 22.04=jammy + 21.10=impish 21.04=hirsute 20.10=groovy 20.04=focal + 19.10=eoan 19.04=disco 18.10=cosmic 18.04=bionic + 17.10=artful 17.04=zesty 16.10=yakkety 16.04=xenial + 15.10=wily 15.04=vivid 14.10=utopic 14.04=trusty + 13.10=saucy 13.04=raring 12.10=quantal 12.04=precise + 11.10=oneiric 11.04=natty 10.10=maverick 10.04=lucid + 9.10=karmic 9.04=jaunty 8.10=intrepid 8.04=hardy ) function __setup_ALL_SYSvars() { From 2a023070e7a54f501913509752b7a28b8b20c4fb Mon Sep 17 00:00:00 2001 From: Jephte Clain Date: Wed, 14 Jun 2023 15:41:14 +0400 Subject: [PATCH 12/13] =?UTF-8?q?update-nutools:=20prendre=20le=20d=C3=A9p?= =?UTF-8?q?=C3=B4t=20public=20par=20d=C3=A9faut?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- update-nutools | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/update-nutools b/update-nutools index 09db8f7..233eb9e 100755 --- a/update-nutools +++ b/update-nutools @@ -62,16 +62,16 @@ WGET="$(which wget 2>/dev/null)" if [ -n "$NUTOOLS_REPO" ]; then REPO="$NUTOOLS_REPO" elif [ -n "$CURL" ]; then - if curl -fs "$PRIV_REPO" >&/dev/null; then - REPO="$PRIV_REPO" - else + if curl -fs -m 3 "$PUB_REPO" >&/dev/null; then REPO="$PUB_REPO" + else + REPO="$PRIV_REPO" fi elif [ -n "$WGET" ]; then - if wget -q -O - "$PRIV_REPO" >&/dev/null; then - REPO="$PRIV_REPO" - else + if wget -q --timeout=3 -O - "$PUB_REPO" >&/dev/null; then REPO="$PUB_REPO" + else + REPO="$PRIV_REPO" fi else REPO="$PUB_REPO" From 1025357631c57be46e660b629494c703d4240d5e Mon Sep 17 00:00:00 2001 From: Jephte Clain Date: Wed, 14 Jun 2023 15:41:57 +0400 Subject: [PATCH 13/13] Init changelog & version 9.15.0 --- CHANGES.md | 15 +++++++++++++++ VERSION.txt | 2 +- 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/CHANGES.md b/CHANGES.md index 0aa7f9a..b7d4de2 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -1,3 +1,18 @@ +## Version 9.15.0 du 14/06/2023-15:41 + +* `2a02307` update-nutools: prendre le dépôt public par défaut +* `27a82e4` ajouter les numéros de version des debian et ubuntu +* `92157de` regins: implémentation initiale +* `efe9fbb` dk: ajout de XX pour prune-cache +* `dc94b5c` dkbuild: bug avec les chemins +* `5e87665` dk: X supprimer aussi le cache +* `9c1a8e6` dk: composer.phar est cherché dans sbin/ aussi +* `81cefdc` regcp: activer support regexp-extended +* `c5796d6` modifs.mineures sans commentaires +* `6919352` maj du message de commit par défaut +* `7ba7d1c` pcxone: correction de l'url généré des dépôts git +* `9d75943` repoctl: correction de l'url généré des dépôts git + ## Version 9.14.0 du 15/03/2023-17:48 * `3ecb127` support docker compose v2 diff --git a/VERSION.txt b/VERSION.txt index 7961dfd..a4fac8e 100644 --- a/VERSION.txt +++ b/VERSION.txt @@ -1 +1 @@ -9.14.0 +9.15.0