diff --git a/.gitignore b/.gitignore index 320d150d..460bbf28 100644 --- a/.gitignore +++ b/.gitignore @@ -43,6 +43,7 @@ _build/ docs/dist # Ignore temp files used for signing +cdist-*.tar cdist-*.tar.gz cdist-*.tar.gz.asc diff --git a/bin/build-helper b/bin/build-helper index de4ced71..963f02f9 100755 --- a/bin/build-helper +++ b/bin/build-helper @@ -200,7 +200,10 @@ eof || exit 1 # make sure target version is generated "$0" target-version - tar -r -f "${archivename}" cdist/version.py || exit 1 + tar -x -f "${archivename}" || exit 1 + cp cdist/version.py "cdist-${tag}/cdist/version.py" || exit 1 + tar -c -f "${archivename}" "cdist-${tag}/" || exit 1 + rm -r -f "cdist-${tag}/" gzip "${archivename}" || exit 1 archivename="${archivename}.gz" fi diff --git a/bin/build-helper.freebsd b/bin/build-helper.freebsd index 2c5a54a7..58d985a6 100755 --- a/bin/build-helper.freebsd +++ b/bin/build-helper.freebsd @@ -235,7 +235,10 @@ eof || exit 1 # make sure target version is generated "$0" target-version - tar -r -f "${archivename}" cdist/version.py || exit 1 + tar -x -f "${archivename}" || exit 1 + cp cdist/version.py "cdist-${tag}/cdist/version.py" || exit 1 + tar -c -f "${archivename}" "cdist-${tag}/" || exit 1 + rm -r -f "cdist-${tag}/" gzip "${archivename}" || exit 1 archivename="${archivename}.gz" fi diff --git a/cdist/conf/type/__directory/explorer/stat b/cdist/conf/type/__directory/explorer/stat index 41bc8b04..3d150a21 100755 --- a/cdist/conf/type/__directory/explorer/stat +++ b/cdist/conf/type/__directory/explorer/stat @@ -25,21 +25,13 @@ destination="/$__object_id" os=$("$__explorer/os") case "$os" in - "freebsd"|"netbsd"|"openbsd") - # FIXME: should be something like this based on man page, but can not test - stat -f "type: %ST + "freebsd"|"netbsd"|"openbsd"|"macosx") + stat -f "type: %HT owner: %Du %Su group: %Dg %Sg -mode: %Op %Sp -" "$destination" +mode: %Lp %Sp +" "$destination" | awk '/^type/ { print tolower($0); next; } { print; }' ;; - "macosx") - stat -f "type: %HT - owner: %Du %Su - group: %Dg %Sg - mode: %Lp %Sp - " "$destination" - ;; *) stat --printf="type: %F owner: %u %U diff --git a/cdist/conf/type/__file/explorer/stat b/cdist/conf/type/__file/explorer/stat index 8a917556..fec0d6f3 100755 --- a/cdist/conf/type/__file/explorer/stat +++ b/cdist/conf/type/__file/explorer/stat @@ -25,24 +25,14 @@ destination="/$__object_id" os=$("$__explorer/os") case "$os" in - "freebsd"|"netbsd"|"openbsd") - # FIXME: should be something like this based on man page, but can not test - stat -f "type: %ST -owner: %Du %Su -group: %Dg %Sg -mode: %Op %Sp -size: %Dz -links: %Dl -" "$destination" - ;; - "macosx") - stat -f "type: %HT + "freebsd"|"netbsd"|"openbsd"|"macosx") + stat -f "type: %HT owner: %Du %Su group: %Dg %Sg mode: %Lp %Sp size: %Dz links: %Dl -" "$destination" +" "$destination" | awk '/^type/ { print tolower($0); next; } { print; }' ;; *) stat --printf="type: %F diff --git a/docs/changelog b/docs/changelog index 536b99e6..da503525 100644 --- a/docs/changelog +++ b/docs/changelog @@ -2,11 +2,15 @@ Changelog --------- next: + * Type __package: Add __package_apk support (Nico Schottelius) + * New type: __package_apk (Nico Schottelius) + +4.10.11: 2019-04-13 * Core: Fix broken quiet mode (Darko Poljak) * Build: Add version.py into generated raw source archive (Darko Poljak) * Explorer disks: Fix detecting disks, fix/add support for BSDs (Ander Punnar) - * Type __package: Add __package_apk support (Nico Schottelius) - * New type: __package_apk (Nico Schottelius) + * Type __file: Fix stat explorer for BSDs (Ander Punnar) + * Type __directory: Fix stat explorer for BSDs (Ander Punnar) 4.10.10: 2019-04-11 * New types: __ufw and __ufw_rule (Mark Polyakov)