public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [rpms/hugo] rawhide: 📝 docs: Document the package in `README.md` and `AGENTS.md`
@ 2026-11-06  5:37 Justin Wheeler
  0 siblings, 0 replies; only message in thread
From: Justin Wheeler @ 2026-11-06  5:37 UTC (permalink / raw)
  To: git-commits

            A new commit has been pushed.

            Repo   : rpms/hugo
            Branch : rawhide
            Commit : 1d2e3ccca2ec548b44cbaeecb12f212704874d8e
            Author : Justin Wheeler <jwheel@fedoraproject.org>
            Date   : 2026-11-06T00:36:29-05:00
            Stats  : +277/-2 in 2 file(s)
            URL    : https://src.fedoraproject.org/rpms/hugo/c/1d2e3ccca2ec548b44cbaeecb12f212704874d8e?branch=rawhide

            Log:
            📝 docs: Document the package in `README.md` and `AGENTS.md`

Replace the placeholder README with a welcoming overview of the repo,
the Extended build layout, the current branches, the release flow, and
the maintainers. Add `AGENTS.md` to record the packaging constraints
that are easy to miss: the Go version ceiling, the bundled LibSass
source, the ppc64le patch, the test exclusions, and the embedded WASM
compliance issue. Split the audience so newcomers start in the README
while maintainers and agents get the deeper notes, with the README
linking to `AGENTS.md` instead of duplicating the version table.

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
new file mode 100644
index 0000000..5a70fb7
--- /dev/null
+++ b/AGENTS.md
@@ -0,0 +1,177 @@
+# AGENTS.md — Hugo RPM packaging notes
+
+This file is for agents and contributors working on the **Fedora `hugo` package** in this dist-git repository.
+It is not upstream Hugo documentation; upstream's own `AGENTS.md` is shipped in the binary RPM under `%doc`.
+
+## Package shape
+
+- Source: <https://github.com/gohugoio/hugo>
+- Built as **Hugo Extended** (`GO_BUILDTAGS="extended"`).
+- **Not** built with `withdeploy`.
+- `Release: %autorelease` and `%changelog` + `%autochangelog` are used.
+  Do not hand-edit the changelog.
+- The binary is not split into library subpackages, and no Go dependency libraries are packaged separately.
+  All Go dependencies come from the generated vendor archive.
+
+## Go toolchain requirements
+
+Check `go.mod` (or the README) before bumping.
+The declared minimum is a build requirement only; Hugo does not need Go at runtime.
+
+| Hugo versions | Declared minimum Go |
+|---|---|
+| 0.162.1 | 1.25.0 |
+| 0.163.0–0.165.0 | 1.26.0 |
+| 0.166.0 and later (through 0.169.0) | 1.27.0 |
+
+At the time of the 0.169.0 update:
+
+- rawhide and F45 had Go 1.27.3 / 1.27.1 and were eligible.
+- F44 and F43 had Go 1.26.10 and were **not** eligible.
+
+`GOTOOLCHAIN=local` is set in `%build` so the toolchain cannot download a different Go release during the build.
+
+## Updating the package
+
+1. Bump `Version:` in `hugo.spec`.
+2. Fetch the release archive:
+   ```bash
+   spectool -g hugo.spec
+   ```
+3. Regenerate the vendor archive (network access is allowed for source preparation, never during the RPM build):
+   ```bash
+   go_vendor_archive create --config go-vendor-tools.toml hugo.spec
+   ```
+   Edit `go-vendor-tools.toml` only if dependencies or license detection actually change.
+4. Verify the cumulative license expression:
+   ```bash
+   go_vendor_license --config go-vendor-tools.toml --path hugo.spec \
+       report --autofill=auto --verify-spec
+   ```
+   `askalono-cli` must be present (install `go-vendor-tools+askalono` or `askalono-cli` in the Mock chroot).
+   Do not hand-edit the `License:` tag without this check.
+5. Update `sources` and `.gitignore` for the new archives.
+6. Build an SRPM, then build and test in Mock (see below).
+
+Do not commit downloaded archives; they belong in lookaside.
+
+## LibSass: bundled, deliberately
+
+Hugo Extended's LibSass support comes from `github.com/bep/golibsass`, which embeds a copy of LibSass as C++ sources.
+`go mod vendor` does **not** copy `libsass_src`, so the spec keeps:
+
+```
+Source3:        libsass-3.6.6.tar.gz
+```
+
+and extracts it in `%prep`:
+
+```spec
+mkdir vendor/github.com/bep/golibsass/libsass_src
+tar xvf %SOURCE3 -C vendor/github.com/bep/golibsass/libsass_src --strip-components=1
+```
+
+Notes:
+
+- `libsass-3.6.6.tar.gz` is already in lookaside and is unchanged across releases; its SHA512 must match the `sources` entry.
+- `3.6.6` is the final upstream release (December 2023), and the `sass/libsass` repository is archived.
+- golibsass also has a `dev` build tag that links against a **system** LibSass (`-DUSE_LIBSASS_SRC -lsass`, requiring `libsass-devel`).
+  That produces a strong `libsass.so.1()(64bit)` runtime dependency.
+  It was evaluated and intentionally **not** adopted for 0.169.0: this is not our package upstream and the conservative choice is to keep the existing bundled arrangement.
+- LibSass itself is deprecated upstream.
+  Re-evaluate when Hugo drops it.
+- Do not add `libsass-devel` to `BuildRequires` unless the whole build configuration is switched to the `dev` tag deliberately.
+
+## ppc64le patch
+
+`0001-unix-linux-revert-ppc64x-syscall-assembly-wrapper.patch` works around `golang.org/x/sys` syscall trampoline crashes with external PIE linking on ppc64le.
+
+- Declared unconditionally, applied only under `%ifarch ppc64le`.
+- `%prep` must use plain `%goprep` (no `-p1`), so the patch is applied **after** the vendor archive is extracted.
+- Preserve `//go:uintptrescapes` in the replaced wrappers.
+- This is Fedora-specific; do not assume upstream will take it.
+
+## Tests
+
+`%check` runs `%gocheck2` with a small exclusion list.
+Two test directories are skipped deliberately:
+
+- `internal/warpc` — fails on ppc64le.
+- `resources/images` — times out on riscv.
+
+Do not broaden these exclusions just to make a build pass.
+The remaining `-s Test...` skips cover tests that need network access or external services.
+
+## Known outstanding compliance issue: embedded WASM
+
+Hugo embeds five prebuilt WebAssembly programs in production code:
+
+```
+internal/warpc/wasm/avif.wasm
+internal/warpc/wasm/greet.wasm
+internal/warpc/wasm/quickjs.wasm
+internal/warpc/wasm/renderkatex.wasm
+internal/warpc/wasm/webp.wasm
+```
+
+They are executed by wazero at runtime and are shipped as-is.
+Rebuilding them from source is substantial:
+
+- `quickjs.wasm`, `greet.wasm`, `renderkatex.wasm`: Javy 9.1.0, esbuild, KaTeX 0.18.4.
+  **Javy is not packaged in Fedora.**
+- `webp.wasm`: WASI SDK 34, meson, ninja, libwebp sources.
+- `avif.wasm`: WASI SDK 34, libavif 1.4.2, aom 3.15.2, dav1d 1.5.4, libyuv, cmake.
+  **WASI SDK is not packaged in Fedora** (wasi-libc 34 is).
+
+Several upstream build recipes also clone dependencies from the network, which is not allowed during RPM build phases.
+Until these payloads are rebuilt from packaged sources, the package cannot claim full compliance with Fedora's "no pre-built binaries" policy.
+Do not disable Extended features or replace the files with placeholders to make the issue disappear.
+
+## Validation workflow
+
+Use `fedpkg` and Mock, not the host package manager.
+
+```bash
+fedpkg srpm
+fedpkg mockbuild -r fedora-rawhide-x86_64
+```
+
+Runtime smoke checks (inside a disposable Mock chroot):
+
+- `hugo version` must report `v0.169.0+extended` and must not contain `withdeploy`.
+- Render a minimal site.
+- Render an SCSS asset with `css.Sass (dict "transpiler" "libsass")`; this exercises the bundled LibSass.
+- Confirm `AGENTS.md` and `SECURITY.md` are installed as documentation.
+
+Koji scratch builds from the committed branch state:
+
+```bash
+fedpkg scratch-build --arches x86_64
+fedpkg scratch-build
+```
+
+Scratch builds are for validation only and are **not** eligible for Bodhi.
+
+## Bodhi and release flow
+
+- A production build (`fedpkg build`) in rawhide normally causes Bodhi to create the update automatically once the build is tagged.
+- Verify instead of duplicating:
+  ```bash
+  bodhi updates query --builds hugo-<version>-<release>.fcXX
+  ```
+- If automatic creation is missed, follow Bodhi's documented recovery procedure (re-tag in the candidate tag); do not create a manual rawhide update.
+- Stable branches need a normal `fedpkg update` run once a real production NVR exists.
+
+## Upcoming upstream changes
+
+Hugo 0.170.0 is reported to remove the `extended` build tag and LibSass support, leaving Dart Sass only, with `hugo.IsExtended` always false and only `withdeploy` remaining.
+That release was **not available** when this note was written.
+Before the next bump, verify against the actual tag's code and `go.mod`; don't trust changelogs or documentation that may still say "extended".
+If confirmed, the spec will need a different build tag set, the LibSass source and extraction removed, and the Sass tests and dependency story revisited.
+
+## Repository hygiene
+
+- Keep changes minimal; this package is maintained conservatively.
+- Do not commit or push without explicit approval.
+- Do not run production builds, lookaside uploads, or Bodhi actions without explicit approval.
+- Preserve local uncommitted work you did not create.

diff --git a/README.md b/README.md
index 20a6f8b..2686dd7 100644
--- a/README.md
+++ b/README.md
@@ -1,3 +1,101 @@
-# hugo
+# Hugo for Fedora and EPEL
 
-The hugo package
\ No newline at end of file
+Welcome! 👋
+This is the Fedora dist-git repository for [Hugo](https://gohugo.io), the world's fastest framework for building websites.
+It holds the RPM spec, source metadata, patches, and vendor tooling needed to build Hugo for Fedora and EPEL.
+The upstream project lives at <https://github.com/gohugoio/hugo>; this repository is only about packaging it for Fedora.
+
+
+## What is Hugo?
+
+Hugo is a static site generator written in Go.
+It turns Markdown, templates, and assets into a complete website in milliseconds.
+The Fedora package builds the **Extended** edition, which enables the `extended` build tag and adds SCSS/SASS support through bundled LibSass.
+
+
+## What this repository contains
+
+| File | Purpose |
+|---|---|
+| `hugo.spec` | The RPM spec file. |
+| `sources` | SHA512 checksums for the upstream and vendor archives. |
+| `go-vendor-tools.toml` | Configuration for regenerating the vendor archive and checking licenses. |
+| `0001-unix-linux-revert-ppc64x-syscall-assembly-wrapper.patch` | ppc64le linking workaround, applied only on that architecture. |
+| `AGENTS.md` | Deeper packaging notes for agents and contributors. |
+
+Downloaded source archives are kept in Fedora's lookaside cache, not in git.
+
+
+## How the package works
+
+Hugo is written in Go and vendors all of its dependencies.
+`go-vendor-tools` generates a separate vendor archive from the upstream module graph, so the RPM build never needs network access.
+The spec also unpacks a copy of LibSass 3.6.6 into `vendor/github.com/bep/golibsass/libsass_src`, because `go mod vendor` does not include the C++ sources that the Extended edition needs.
+The build requires Go 1.27.0 or newer and sets `GOTOOLCHAIN=local` so the toolchain cannot download a different Go release mid-build.
+The resulting binary is `/usr/bin/hugo`, built with the `extended` tag and without `withdeploy`.
+The test suite runs in `%check` with a small, documented exclusion list.
+
+
+## Branches and releases
+
+| Branch | Purpose |
+|---|---|
+| `rawhide` | Development branch for the next Fedora release. |
+| `f43`, `f44`, `f45` | Current Fedora stable branches. |
+| `epel10` | EPEL 10. |
+
+The `Version:` field in `hugo.spec` is the source of truth for what each branch ships.
+Fedora's Go toolchain can lag behind upstream's minimum, so check `go.mod` before bumping; `AGENTS.md` has a version table.
+
+
+## Building and testing locally
+
+Use `fedpkg` so that the Mock configuration matches Fedora's buildroots:
+
+```bash
+fedpkg srpm
+fedpkg mockbuild
+```
+
+For a Koji scratch build across all architectures:
+
+```bash
+fedpkg scratch-build
+```
+
+
+## How updates reach users
+
+`fedpkg build` sends the package to Koji.
+A successful build is tagged into the candidate tag, and Bodhi creates an update from there.
+On stable branches the update moves through `updates-testing` to stable after karma or time; rawhide updates go straight to stable.
+Security updates can be marked as such in Bodhi so they follow the accelerated flow.
+
+
+## Package maintainers
+
+The Fedora `hugo` package is maintained by:
+
+| FAS account | Name | Role |
+|---|---|---|
+| [`athoscr`](https://src.fedoraproject.org/user/athoscr) | Athos Ribeiro | Owner |
+| [`mikep`](https://src.fedoraproject.org/user/mikep) | W. Michael Petullo | Admin |
+| [`neil`](https://src.fedoraproject.org/user/neil) | Neil Hanlon | Admin |
+| [`jflory7`](https://src.fedoraproject.org/user/jflory7) | Justin Wheeler | Committer |
+
+The [`go-sig`](https://fedoraproject.org/wiki/SIGs/Go) group has admin access, and [`epel-packagers-sig`](https://fedoraproject.org/wiki/SIGs/EPEL) has commit access for EPEL.
+
+
+## Getting help and contributing
+
+Bug reports and feature requests for the package go to [Bugzilla](https://bugzilla.redhat.com/enter_bug.cgi?product=Fedora&component=hugo) under the `hugo` component.
+Packaging questions can go to the [Fedora Go SIG](https://fedoraproject.org/wiki/SIGs/Go) or the [epel-devel mailing list](https://lists.fedoraproject.org/archives/list/epel-devel@lists.fedoraproject.org/).
+Pull requests against this repository are welcome; please keep changes focused and explain the reasoning.
+
+
+## Learn more
+
+- [Hugo documentation](https://gohugo.io/documentation/)
+- [Hugo releases](https://github.com/gohugoio/hugo/releases)
+- [Fedora Packaging Guidelines](https://docs.fedoraproject.org/en-US/packaging-guidelines/)
+- [`AGENTS.md`](AGENTS.md) in this repository

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

only message in thread, other threads:[~2026-11-06  5:37 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-11-06  5:37 [rpms/hugo] rawhide: 📝 docs: Document the package in `README.md` and `AGENTS.md` Justin Wheeler

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