Compare commits

...
Author SHA1 Message Date
dependabot[bot] fdb5f47111 build(deps): bump actions/create-github-app-token from 1 to 3
Bumps [actions/create-github-app-token](https://github.com/actions/create-github-app-token) from 1 to 3.
- [Release notes](https://github.com/actions/create-github-app-token/releases)
- [Commits](https://github.com/actions/create-github-app-token/compare/v1...v3)

---
updated-dependencies:
- dependency-name: actions/create-github-app-token
  dependency-version: '3'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-03-16 19:52:23 +00:00
Jörg Thalheim 878ec37d6a Escape ZFS args (#1222)
Args to ZFS (like mountpoints) might have spaces or other
shell-unfriendly characters in them. This escapes those so they get
passed to zfs correctly.
2026-03-14 16:38:37 +00:00
Josh Gustafson dff80bbcd9 Escape ZFS args 2026-03-02 09:31:30 -07:00
4 changed files with 23 additions and 9 deletions

No files matched your search

+1 -1
View File
@@ -14,7 +14,7 @@ jobs:
with: with:
extra_nix_config: | extra_nix_config: |
access-tokens = github.com=${{ secrets.GITHUB_TOKEN }} access-tokens = github.com=${{ secrets.GITHUB_TOKEN }}
- uses: actions/create-github-app-token@v1 - uses: actions/create-github-app-token@v3
id: app-token id: app-token
with: with:
app-id: ${{ vars.APP_ID }} app-id: ${{ vars.APP_ID }}
+7 -5
View File
@@ -91,12 +91,14 @@
updateOptions = builtins.removeAttrs createOptions onetimeProperties; updateOptions = builtins.removeAttrs createOptions onetimeProperties;
in in
'' ''
if ! zfs get type ${config._name} >/dev/null 2>&1; then if ! zfs get type "${config._name}" >/dev/null 2>&1; then
${ ${
if config._createFilesystem then if config._createFilesystem then
'' ''
zfs create -up ${config._name} \ zfs create -up "${config._name}" \
${lib.concatStringsSep " " (lib.mapAttrsToList (n: v: "-o ${n}=${v}") (createOptions))} ${lib.concatStringsSep " " (
lib.mapAttrsToList (n: v: "-o ${n}=${lib.escapeShellArg v}") (createOptions)
)}
'' ''
else else
'' ''
@@ -107,8 +109,8 @@
${lib.optionalString (updateOptions != { }) '' ${lib.optionalString (updateOptions != { }) ''
else else
zfs set -u ${ zfs set -u ${
lib.concatStringsSep " " (lib.mapAttrsToList (n: v: "${n}=${v}") updateOptions) lib.concatStringsSep " " (lib.mapAttrsToList (n: v: "${n}=${lib.escapeShellArg v}") updateOptions)
} ${config._name} } "${config._name}"
''} ''}
fi fi
''; '';
+5 -1
View File
@@ -63,7 +63,11 @@
default = '' default = ''
if ! zfs get type "${config._parent.name}/${config.name}" >/dev/null 2>&1; then if ! zfs get type "${config._parent.name}/${config.name}" >/dev/null 2>&1; then
zfs create "${config._parent.name}/${config.name}" \ zfs create "${config._parent.name}/${config.name}" \
${lib.concatStringsSep " " (lib.mapAttrsToList (n: v: "-o ${n}=${v}") config.options)} \ ${
lib.concatStringsSep " " (
lib.mapAttrsToList (n: v: "-o ${n}=${lib.escapeShellArg v}") config.options
)
} \
-V ${config.size} ${toString (builtins.map lib.escapeShellArg config.extraArgs)} -V ${config.size} ${toString (builtins.map lib.escapeShellArg config.extraArgs)}
zvol_wait zvol_wait
partprobe "/dev/zvol/${config._parent.name}/${config.name}" partprobe "/dev/zvol/${config._parent.name}/${config.name}"
+10 -2
View File
@@ -377,8 +377,16 @@ in
else else
"" ""
} \ } \
${lib.concatStringsSep " " (lib.mapAttrsToList (n: v: "-o ${n}=${v}") config.options)} \ ${
${lib.concatStringsSep " " (lib.mapAttrsToList (n: v: "-O ${n}=${v}") config.rootFsOptions)} \ lib.concatStringsSep " " (
lib.mapAttrsToList (n: v: "-o ${n}=${lib.escapeShellArg v}") config.options
)
} \
${
lib.concatStringsSep " " (
lib.mapAttrsToList (n: v: "-O ${n}=${lib.escapeShellArg v}") config.rootFsOptions
)
} \
''${topology:+ $topology} ''${topology:+ $topology}
if [[ $(zfs get -H mounted "${config.name}" | cut -f3) == "yes" ]]; then if [[ $(zfs get -H mounted "${config.name}" | cut -f3) == "yes" ]]; then
zfs unmount "${config.name}" zfs unmount "${config.name}"