Commit graph

276 commits

Author SHA1 Message Date
Joe Mooring
35e9b3ed1e
snap: Transition base snap from core20 to core22 (#11101)
- Syntax changes
- Bump Go from 1.19 to 1.20
- Remove unused build tag logic (we only build the extended version)
2023-06-13 14:52:19 -07:00
Joe Mooring
a950950f1b snap: Fix dart-sass-embedded installation
Closes #10783
2023-03-04 10:15:03 +01:00
Anthony Fok
76c6140c52 snap: Install dart-sass-embedded for 32-bit ARM (armhf) too
See https://github.com/sass/dart-sass-embedded/releases/tag/1.54.7
which "Add[ed] support for 32-bit ARM releases on Linux" on 2022-08-30.
2023-02-03 14:58:11 +01:00
Anthony Fok
d4482e8bf4 snap: Add read access for ~/.gitconfig.local and ~/.config/git/* too
in hugo:gitconfig plug (personal-files interface) in case end users need
the flexibility of using additional custom git config files.

Fixes #10337
2023-02-03 14:57:53 +01:00
Anthony Fok
160a067c81 snap: Use "snapcraftctl set-grade"
This, together with 'snapcraftctl set-version", negates the need to
modify snap/snapcraft.yaml upon each release, so the corresponding code
is removed from releaser/releaser.go.

Also, vendorInfo is extended to include the snap version number.

See #10225
2022-08-30 05:23:18 -06:00
Anthony Fok
e0ba1a805a
snap: Use "snapcraftctl set-version"
This allows the use of "git describe --tags" to recognize lightweight
version tags, and the removal of initial "v" in the hugo snap version.

See #10225
2022-08-29 23:14:22 -06:00
Anthony Fok
7b49c56a6a snap: Make external dependencies actually work
Git:
 - Set GIT_EXEC_PATH and include usr/lib/git-core so that git can find the
   git-remote-https helper (needed by e.g. "go mod download").

Go:
 - Put Go in its own snap part, and use stage-snaps instead of build-snaps
   so that it is included in the final snap.
 - Set GOCACHE to a writable directory. (In a previous commit,
   HOME is set to $SNAP_REAL_HOME which is unwritable.)

Hugo:
 - Patch config/security/securityConfig.go "[security.exec] osEnv" whitelist
   (during snap build) so that external dependencies can use the required
   environment variables to run properly from within the snap.

Asciidoctor:
 - Replace shebang line in asciidoctor so it can find the ruby executable.
 - Set RUBYLIB so that Ruby can find its libraries.
   Caveat/TODO: The Ruby version is hardcoded in our custom RUBYLIB.

Embedded Dart Sass:
 - Download from GitHub and install it, for amd64 and arm64 only.

Node.js:
 - Remove my incomplete include list so that npx is actually installed.
 - Set npm_config_{cache,init_module,userconfig} to writable locations.

Pandoc:
 - Set pandoc_datadir so that Pandoc can find its data files.

rst2html:
 - Install python3-docutils package for rst2html, rst2html5, etc.
 - Set PYTHONHOME so that Python can find its libraries.

Note that asciidoctor, pandoc and rst2html are not in Hugo’s default
"[security.exec] allow" whitelist, and the snap package does not change
that default, so they still needed to be whitelisted manually in
config.toml if necessary by the end user.

Special thanks to Joe Mooring (@jmooring) for meticulously diagnosing
the issue and providing a comprehensive test repository at
https://github.com/jmooring/hugo-snap-test without which I would not
have been able to understand and resolve the issue.

Fixes #9078
2022-08-29 12:24:58 -06:00
hugoreleaser
9eb9b70a29 releaser: Prepare repository for 0.103.0-DEV
[ci skip]
2022-08-28 16:41:06 +00:00
hugoreleaser
0ff4a9326f releaser: Bump versions for release of 0.102.0
[ci skip]
2022-08-28 16:29:34 +00:00
Anthony Fok
0e0fb1b648
snap: Delete obsolete custom x-nodejs plugins 2022-08-12 21:39:25 -06:00
Bjørn Erik Pedersen
0cd1929b9c Update to Go 1.19
Fixes #10145
2022-08-03 23:22:01 +02:00
Anthony Fok
241481931f
snap: Replace mage with "go build" and set VendorInfo=snap 2022-06-28 04:09:50 -06:00
Anthony Fok
5caed8a71f
snap: Use interface names etc-gitconfig and gitconfig, Take 2
as recommended by @alexmurray to keep consistency with other snaps; see
https://forum.snapcraft.io/t/system-files-and-personal-files-request-for-hugo/30598

I neglected to make the rename of system-gitconfig → etc-gitconfig and
user-gitconfig → gitconfig to the apps.plugs section in commit fd3953c,
hence this commit to fix the store upload scan failure:

  interface 'system-gitconfig' not found in base declaration
  interface 'user-gitconfig' not found in base declaration
  unknown plugs interface name reference 'system-gitconfig'
  unknown plugs interface name reference 'user-gitconfig'

Special thanks to Alex Murray and Igor Ljubuncic for approving the
system-files and personal-files request for Hugo.

Fixes #6226
2022-06-27 09:27:30 -06:00
Anthony Fok
fd3953c18c
snap: Use interface names etc-gitconfig and gitconfig
as recommended by @alexmurray to keep consistency with other snaps; see
https://forum.snapcraft.io/t/system-files-and-personal-files-request-for-hugo/30598/2

One closer step towards fixing #6226
2022-06-24 00:59:37 -06:00
hugoreleaser
15463f835b releaser: Prepare repository for 0.102.0-DEV
[ci skip]
2022-06-16 07:51:58 +00:00
hugoreleaser
466fa43c16 releaser: Bump versions for release of 0.101.0
[ci skip]
2022-06-16 07:09:16 +00:00
hugoreleaser
4276075c78 releaser: Prepare repository for 0.101.0-DEV
[ci skip]
2022-06-08 11:07:37 +00:00
hugoreleaser
d25cb2943f releaser: Bump versions for release of 0.100.2
[ci skip]
2022-06-08 10:25:57 +00:00
hugoreleaser
bfebd8c02c releaser: Prepare repository for 0.101.0-DEV
[ci skip]
2022-06-01 10:54:16 +00:00
hugoreleaser
0afb4866e3 releaser: Bump versions for release of 0.100.1
[ci skip]
2022-06-01 10:11:48 +00:00
hugoreleaser
4daac654d9 releaser: Prepare repository for 0.101.0-DEV
[ci skip]
2022-05-31 09:19:15 +00:00
hugoreleaser
27b077544d releaser: Bump versions for release of 0.100.0
[ci skip]
2022-05-31 08:37:12 +00:00
hugoreleaser
e164834f0a releaser: Prepare repository for 0.100.0-DEV
[ci skip]
2022-05-18 12:01:09 +00:00
hugoreleaser
d524067382 releaser: Bump versions for release of 0.99.1
[ci skip]
2022-05-18 11:18:14 +00:00
hugoreleaser
7bc3401eb5
common/hugo: Fix version logic
[ci skip]
2022-05-16 13:01:52 +02:00
hugoreleaser
1de333e7a3 releaser: Bump versions for release of 0.99.0
[ci skip]
2022-05-16 08:10:56 +00:00
hugoreleaser
89c1655ec8 releaser: Prepare repository for 0.99.0-DEV
[ci skip]
2022-04-28 11:02:45 +00:00
hugoreleaser
165d299cde releaser: Bump versions for release of 0.98.0
[ci skip]
2022-04-28 10:23:30 +00:00
hugoreleaser
41cc4e4ba3 releaser: Prepare repository for 0.98.0-DEV
[ci skip]
2022-04-18 18:01:38 +00:00
hugoreleaser
078053a43d releaser: Bump versions for release of 0.97.3
[ci skip]
2022-04-18 17:22:19 +00:00
hugoreleaser
5de6f8a02c releaser: Prepare repository for 0.98.0-DEV
[ci skip]
2022-04-17 09:16:40 +00:00
hugoreleaser
5099abe600 releaser: Bump versions for release of 0.97.2
[ci skip]
2022-04-17 08:39:27 +00:00
hugoreleaser
363bc907c0 releaser: Prepare repository for 0.98.0-DEV
[ci skip]
2022-04-16 17:35:04 +00:00
hugoreleaser
04efcb2a68 releaser: Bump versions for release of 0.97.1
[ci skip]
2022-04-16 16:57:30 +00:00
hugoreleaser
d0f731c039 releaser: Prepare repository for 0.98.0-DEV
[ci skip]
2022-04-14 09:24:30 +00:00
hugoreleaser
c07f3626e7 releaser: Bump versions for release of 0.97.0
[ci skip]
2022-04-14 08:45:07 +00:00
Further
2a231b0b57
Snap: Add {system,user}-gitconfig plugs to read gitconfig (#9619)
* Add system-gitconfig plug to read /etc/gitconfig
* Add user-gitconfig plug to read user-specific gitconfig file(s)
* Add app environment setting to set $HOME as $SNAP_REAL_HOME
2022-04-01 02:52:39 -06:00
Anthony Fok
2b7231097f snap: Make it build with Go 1.18 2022-03-21 21:01:24 -06:00
hugoreleaser
004bec2e9a releaser: Prepare repository for 0.96.0-DEV
[ci skip]
2022-03-16 15:00:05 +00:00
hugoreleaser
9f2e76af65 releaser: Bump versions for release of 0.95.0
[ci skip]
2022-03-16 14:20:17 +00:00
Bjørn Erik Pedersen
4d6d1d08da
build: Bump to Go 1.18
Updates #9677
2022-03-16 08:43:18 +01:00
hugoreleaser
38f778cfcc releaser: Prepare repository for 0.95.0-DEV
[ci skip]
2022-03-12 11:02:38 +00:00
hugoreleaser
48fb9e4de3 releaser: Bump versions for release of 0.94.2
[ci skip]
2022-03-12 10:28:41 +00:00
hugoreleaser
04ccde3e94 releaser: Prepare repository for 0.95.0-DEV
[ci skip]
2022-03-11 14:30:03 +00:00
hugoreleaser
0fcd9a5d87 releaser: Bump versions for release of 0.94.1
[ci skip]
2022-03-11 13:53:32 +00:00
hugoreleaser
3bc34666c8 releaser: Prepare repository for 0.95.0-DEV
[ci skip]
2022-03-10 10:25:00 +00:00
hugoreleaser
63b236603e releaser: Bump versions for release of 0.94.0
[ci skip]
2022-03-10 09:46:35 +00:00
hugoreleaser
d86eca5bb2 releaser: Prepare repository for 0.94.0-DEV
[ci skip]
2022-03-08 10:50:30 +00:00
hugoreleaser
44e3c002a8 releaser: Bump versions for release of 0.93.3
[ci skip]
2022-03-08 10:15:27 +00:00
hugoreleaser
9e76507da2 releaser: Prepare repository for 0.94.0-DEV
[ci skip]
2022-03-04 12:57:53 +00:00