Intégration de la branche release-9.15.0
This commit is contained in:
		
						commit
						e5ab8dd240
					
				
							
								
								
									
										15
									
								
								CHANGES.md
									
									
									
									
									
								
							
							
						
						
									
										15
									
								
								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 | ||||
|  | ||||
							
								
								
									
										2
									
								
								TODO.md
									
									
									
									
									
								
							
							
						
						
									
										2
									
								
								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 | ||||
| @ -1 +1 @@ | ||||
| 9.14.0 | ||||
| 9.15.0 | ||||
|  | ||||
							
								
								
									
										15
									
								
								dk
									
									
									
									
									
								
							
							
						
						
									
										15
									
								
								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 et les images 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. | ||||
| @ -220,8 +222,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 +1942,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 +1998,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" | ||||
| @ -2940,6 +2944,11 @@ NR == 1 { print; next } | ||||
|         "$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 | ||||
|         ;; | ||||
|     composer|c|ci|cu|cr|cs) | ||||
|         build_set_options "$update_apps_mode" "$update_apps_origin" "$update_apps_branch" | ||||
|         [ -f .build.scripts.sh ] && source ./.build.scripts.sh | ||||
|  | ||||
							
								
								
									
										20
									
								
								dkbuild
									
									
									
									
									
								
							
							
						
						
									
										20
									
								
								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 | ||||
|  | ||||
| @ -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() { | ||||
|  | ||||
							
								
								
									
										3
									
								
								regcp
									
									
									
									
									
								
							
							
						
						
									
										3
									
								
								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 | ||||
|  | ||||
							
								
								
									
										73
									
								
								reginc
									
									
									
									
									
										Executable file
									
								
							
							
						
						
									
										73
									
								
								reginc
									
									
									
									
									
										Executable file
									
								
							| @ -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[@]}" | ||||
							
								
								
									
										2
									
								
								repoctl
									
									
									
									
									
								
							
							
						
						
									
										2
									
								
								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 | ||||
|  | ||||
| @ -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" | ||||
|  | ||||
							
								
								
									
										7
									
								
								uproject
									
									
									
									
									
								
							
							
						
						
									
										7
									
								
								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 | ||||
| @ -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 | ||||
| @ -591,11 +592,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" | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user