From 61fc5e5de8adeb6d2e49c37b2cbb64c750edcb0b Mon Sep 17 00:00:00 2001 From: Daniel Fancsali Date: Fri, 8 Jul 2022 16:50:54 +0100 Subject: [PATCH 1/5] Fix typo in __apt_pin docs --- cdist/conf/type/__apt_pin/man.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cdist/conf/type/__apt_pin/man.rst b/cdist/conf/type/__apt_pin/man.rst index 4229c0cd..e6ec8b51 100644 --- a/cdist/conf/type/__apt_pin/man.rst +++ b/cdist/conf/type/__apt_pin/man.rst @@ -23,7 +23,7 @@ package Package name, glob or regular expression to match (multiple) packages. If not specified `__object_id` is used. priority - The priority value to assign to matching packages. Deafults to 500. (To match the default target distro's priority) + The priority value to assign to matching packages. Defaults to 500. (To match the default target distro's priority) state Will be passed to underlying `__file` type; see there for valid values and defaults. From b7394ff4c25846be5ad8bd4fa793ceda9efae5f3 Mon Sep 17 00:00:00 2001 From: Mark Verboom Date: Thu, 2 Nov 2023 11:01:45 +0100 Subject: [PATCH 2/5] Locally sort remote group information, to prevent differences in sort output. --- cdist/conf/type/__user_groups/explorer/group | 2 +- cdist/conf/type/__user_groups/gencode-remote | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/cdist/conf/type/__user_groups/explorer/group b/cdist/conf/type/__user_groups/explorer/group index 5bad9a0b..8a02f219 100755 --- a/cdist/conf/type/__user_groups/explorer/group +++ b/cdist/conf/type/__user_groups/explorer/group @@ -20,4 +20,4 @@ user="$(cat "$__object/parameter/user" 2>/dev/null || echo "$__object_id")" -(id -G -n "$user" | tr ' ' '\n' | sort) 2>/dev/null || true +(id -G -n "$user" | tr ' ' '\n') 2>/dev/null || true diff --git a/cdist/conf/type/__user_groups/gencode-remote b/cdist/conf/type/__user_groups/gencode-remote index 8120761a..0585e90f 100755 --- a/cdist/conf/type/__user_groups/gencode-remote +++ b/cdist/conf/type/__user_groups/gencode-remote @@ -26,13 +26,15 @@ os=$(cat "$__global/explorer/os") mkdir "$__object/files" # file has to be sorted for comparison with `comm` sort "$__object/parameter/group" > "$__object/files/group.sorted" +# Use local sort for remote groups +sort "$__object/explorer/group" > "$__object/files/group-remote.sorted" case "$state_should" in present) - changed_groups="$(comm -13 "$__object/explorer/group" "$__object/files/group.sorted")" + changed_groups="$(comm -13 "$__object/files/group-remote.sorted" "$__object/files/group.sorted")" ;; absent) - changed_groups="$(comm -12 "$__object/explorer/group" "$__object/files/group.sorted")" + changed_groups="$(comm -12 "$__object/files/group-remote.sorted" "$__object/files/group.sorted")" ;; esac From 3e82b0085b693e6b23f2b613e2f1dd975d67e6dc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C4=BDubom=C3=ADr=20Ku=C4=8Dera?= Date: Wed, 1 May 2024 12:11:07 +0000 Subject: [PATCH 3/5] Make development version strings PEP 440 compliant (#366) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit With current pip (23.1.2) and setuptools (67.7.2) versions, installation from Git was failing with "Invalid version: '7.0.0-17-ge57cf1e7'" message. The issue can be reproduced by running the following command with the latest pip and setuptools installed: $ pip install git+https://code.ungleich.ch/ungleich-public/cdist.git@e57cf1e70a3818180b3f54e1e0364ff3b6bbd9cc#egg=cdist Reviewed-on: https://code.ungleich.ch/ungleich-public/cdist/pulls/366 Co-authored-by: Ľubomír Kučera Co-committed-by: Ľubomír Kučera --- bin/cdist-build-helper | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/bin/cdist-build-helper b/bin/cdist-build-helper index cadddae7..6f514ef5 100755 --- a/bin/cdist-build-helper +++ b/bin/cdist-build-helper @@ -534,7 +534,8 @@ eof ;; version) - printf "VERSION = \"%s\"\n" "$(git describe)" > cdist/version.py + target_version="$(git describe | sed 's/-/.dev/; s/-/+/g')" + printf "VERSION = \"%s\"\n" "${target_version}" > cdist/version.py ;; target-version) From 27471a4a82ac29c1a1f3062178a509660d55e732 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Fri, 2 Aug 2024 12:05:37 +0200 Subject: [PATCH 4/5] [__timezone] add support for openwrt --- cdist/conf/type/__timezone/gencode-remote | 9 +++++++++ cdist/conf/type/__timezone/manifest | 5 ++++- 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/cdist/conf/type/__timezone/gencode-remote b/cdist/conf/type/__timezone/gencode-remote index b685c990..d8612986 100755 --- a/cdist/conf/type/__timezone/gencode-remote +++ b/cdist/conf/type/__timezone/gencode-remote @@ -34,3 +34,12 @@ case "$os" in echo "echo \"$timezone_should\" > /etc/timezone" ;; esac + +case "$os" in + openwrt) + cat <