public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [rpms/hugo] epel10: 📝 docs: Document Dart Sass allow-list requirement
@ 2026-11-15 10:15 Justin Wheeler
  0 siblings, 0 replies; only message in thread
From: Justin Wheeler @ 2026-11-15 10:15 UTC (permalink / raw)
  To: git-commits

            A new commit has been pushed.

            Repo   : rpms/hugo
            Branch : epel10
            Commit : aaaf7ba16ea24fad645ed28349610111c4c66406
            Author : Justin Wheeler <jwheel@fedoraproject.org>
            Date   : 2026-11-13T15:35:23-05:00
            Stats  : +12/-2 in 2 file(s)
            URL    : https://src.fedoraproject.org/rpms/hugo/c/aaaf7ba16ea24fad645ed28349610111c4c66406?branch=epel10

            Log:
            📝 docs: Document Dart Sass allow-list requirement

The README suggested setting `DART_SASS_BINARY` to an absolute path, but
Hugo's `security.exec.allow` policy rejects a path that does not match
an allowed pattern, so that workaround failed with an "access denied"
error.

Recommend putting `sass` or `dart-sass` on `PATH` first, and show the
`security.exec.allow` entry needed when an absolute path is unavoidable.
Both approaches were verified with Dart Sass 1.108.2.

Assisted-by: DeepSeek V4.1 Flash (200K context window)
Signed-off-by: Justin Wheeler <jwheel@fedoraproject.org>

---
diff --git a/AGENTS.md b/AGENTS.md
index 6ea8546..8c223ad 100644
--- a/AGENTS.md
+++ b/AGENTS.md
@@ -80,6 +80,8 @@ Notes:
   Do not add `Recommends: dart-sass` until such a package exists.
 - Packaging Dart Sass from source is not currently feasible: it is written in Dart, Fedora has no Dart SDK, and shipping the prebuilt executable is prohibited.
 - Document the `DART_SASS_BINARY` workaround in `README.md` instead of pretending Sass works out of the box.
+- `DART_SASS_BINARY` with an absolute path is rejected by `security.exec.allow` unless the path is whitelisted.
+  Prefer a bare `sass` or `dart-sass` in `PATH`, which matches the default allow pattern.
 - Without Dart Sass, non-Sass site generation still works.
 
 ## ppc64le patch

diff --git a/README.md b/README.md
index bcb8f6f..052d3d8 100644
--- a/README.md
+++ b/README.md
@@ -44,10 +44,18 @@ Hugo looks for `dart-sass`, `sass`, or `dart-sass-embedded` in `PATH`, and `DART
 
 No Dart Sass package exists in Fedora as of this writing.
 Fedora's weak-dependency policy requires weak dependencies to be satisfiable from the official repositories, so `hugo` cannot declare one yet.
-Install Dart Sass from the upstream release page or from npm (`npm install --global sass`), then make it discoverable, for example:
+Install Dart Sass from the upstream release page or from npm (`npm install --global sass`), then make it discoverable.
+The simplest option is to put a `sass` or `dart-sass` executable in `PATH`:
 
 ```bash
-export DART_SASS_BINARY=/path/to/sass
+export PATH="$HOME/.local/bin:$PATH"
+```
+
+`DART_SASS_BINARY` can point at an absolute path, but Hugo's security policy only allows executables that match `security.exec.allow`, so the path must be whitelisted too:
+
+```toml
+[security.exec]
+allow = ['^(dart-)?sass$', '^/path/to/sass$']
 ```
 
 Without Dart Sass, Hugo still builds sites; only Sass transformations such as `css.Sass` fail.

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2026-11-15 10:15 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-11-15 10:15 [rpms/hugo] epel10: 📝 docs: Document Dart Sass allow-list requirement Justin Wheeler

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox