~sircmpwn/sr.ht-dev

This thread contains a patchset. You're looking at the original emails, but you may wish to use the patch review UI. Review patch
9 4

[PATCH pages.sr.ht-examples 0/3] Update stale eleventy example

Details
Message ID
<20231109123737.28065-1-noelle_leigh@fastmail.com>
DKIM signature
missing
Download raw message
I saw a [post on the mailing list][1] where a user had some trouble
using the Debian + Eleventy example due to it referencing an old
version of Debian that is no longer supported by builds.st.ht.

This patchset improves the example in several ways:

  - Image changed from stale debian/buster to evergreen debian/stable
  - Node.js version updated to new LTS and a non-distro-specific repo
  - Updated env var to disable the npm progress bar

[1]: https://lists.sr.ht/~sircmpwn/sr.ht-discuss/%3CCAPxX4hCqQFqymCCdOy70gEiwQojAALO7iVjPujybp0433QZ3TA%40mail.gmail.com%3E

Noelle Leigh (3):
  eleventy.yml: Switch to debian/stable
  eleventy.yml: Switch to distroless nodesource, v20
  eleventy.yml: Disable progress bar correctly

 eleventy.yml | 13 +++++++------
 1 file changed, 7 insertions(+), 6 deletions(-)

--
2.30.2

[PATCH pages.sr.ht-examples 1/3] eleventy.yml: Switch to debian/stable

Details
Message ID
<20231109123737.28065-2-noelle_leigh@fastmail.com>
In-Reply-To
<20231109123737.28065-1-noelle_leigh@fastmail.com> (view parent)
DKIM signature
missing
Download raw message
Patch: +1 -1
Won't eventually fall off the support list
---
 eleventy.yml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/eleventy.yml b/eleventy.yml
index c74b315..7b1dd58 100644
--- a/eleventy.yml
+++ b/eleventy.yml
@@ -1,5 +1,5 @@
# Eleventy: https://www.11ty.dev/
image: debian/buster
image: debian/stable
packages:
  - nodejs
repositories:
-- 
2.30.2

[PATCH pages.sr.ht-examples 2/3] eleventy.yml: Switch to distroless nodesource, v20

Details
Message ID
<20231109123737.28065-3-noelle_leigh@fastmail.com>
In-Reply-To
<20231109123737.28065-1-noelle_leigh@fastmail.com> (view parent)
DKIM signature
missing
Download raw message
Patch: +3 -3
This way the distro doesn't need to be specified twice. v20 is the
current LTS release of Node.js.

The new key-id was obtained using:

  $ curl -s https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg -n -v --import
  gpg: pub  rsa2048/2F59B5F99B1BE0B4 2016-05-23  NSolid <nsolid-gpg@nodesource.com>
  gpg: Total number processed: 1
---
 eleventy.yml | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/eleventy.yml b/eleventy.yml
index 7b1dd58..99ac07b 100644
--- a/eleventy.yml
+++ b/eleventy.yml
@@ -3,10 +3,10 @@ image: debian/stable
packages:
  - nodejs
repositories:
  # https://github.com/nodesource/distributions/blob/master/README.md#debmanual
  # https://github.com/nodesource/distributions/blob/master/README.md#debian-and-ubuntu-based-distributions
  nodesource.com: >-
    https://deb.nodesource.com/node_14.x buster main
    9FD3B784BC1C6FC31A8A0A1C1655A0AB68576280
    https://deb.nodesource.com/node_20.x nodistro main
    2F59B5F99B1BE0B4
oauth: pages.sr.ht/PAGES:RW
environment:
  site: example.org
-- 
2.30.2

[PATCH pages.sr.ht-examples 3/3] eleventy.yml: Disable progress bar correctly

Details
Message ID
<20231109123737.28065-4-noelle_leigh@fastmail.com>
In-Reply-To
<20231109123737.28065-1-noelle_leigh@fastmail.com> (view parent)
DKIM signature
missing
Download raw message
Patch: +3 -2
Changed for newer versions of npm.
---
 eleventy.yml | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/eleventy.yml b/eleventy.yml
index 99ac07b..4e88172 100644
--- a/eleventy.yml
+++ b/eleventy.yml
@@ -10,8 +10,9 @@ repositories:
oauth: pages.sr.ht/PAGES:RW
environment:
  site: example.org
  # https://docs.npmjs.com/cli/v6/using-npm/config#progress
  CI: "TRUE"
  # Disable npm progress bar
  # https://docs.npmjs.com/cli/v10/using-npm/config#progress
  npm_config_progress: "false"
tasks:
- install: |
    cd $site
-- 
2.30.2

Re: [PATCH pages.sr.ht-examples 2/3] eleventy.yml: Switch to distroless nodesource, v20

Details
Message ID
<50deb132-abe9-4b4f-9823-b0fbe766e33c@taavi.wtf>
In-Reply-To
<20231109123737.28065-3-noelle_leigh@fastmail.com> (view parent)
DKIM signature
missing
Download raw message
Is the third-party repository actually necessary? Current Debian stable 
ships with Node 18 and NPM 9 which is well within Eleventy's required 
Node 14 or newer.

Taavi

Re: [PATCH pages.sr.ht-examples 2/3] eleventy.yml: Switch to distroless nodesource, v20

Details
Message ID
<2f47d2e2-5d29-40c6-a5e3-9afd4a3589e8@app.fastmail.com>
In-Reply-To
<50deb132-abe9-4b4f-9823-b0fbe766e33c@taavi.wtf> (view parent)
DKIM signature
missing
Download raw message
On Thu, Nov 9, 2023, at 7:48 AM, Taavi Väänänen wrote:
> Is the third-party repository actually necessary? Current Debian
> stable ships with Node 18 and NPM 9 which is well within Eleventy's
> required Node 14 or newer.
>
> Taavi

Technically it's not necessary, but it does provide a helpful example
for how to install a newer version from a third-party repo, which is not
intuitive for users who are unfamiliar with gpg.

Re: [PATCH pages.sr.ht-examples 2/3] eleventy.yml: Switch to distroless nodesource, v20

Details
Message ID
<CWUYLKAGP8S2.21GJIGABC2KHP@taiga>
In-Reply-To
<2f47d2e2-5d29-40c6-a5e3-9afd4a3589e8@app.fastmail.com> (view parent)
DKIM signature
missing
Download raw message
On Fri Nov 10, 2023 at 1:57 AM CET, Noelle Leigh wrote:
> Technically it's not necessary, but it does provide a helpful example
> for how to install a newer version from a third-party repo, which is not
> intuitive for users who are unfamiliar with gpg.

The examples should focus on one thing at time, it's better to
demonstrate one idea than two.

Re: [PATCH pages.sr.ht-examples 2/3] eleventy.yml: Switch to distroless nodesource, v20

Details
Message ID
<286db991-b7f0-467b-b060-1e010c4c66d7@app.fastmail.com>
In-Reply-To
<CWUYLKAGP8S2.21GJIGABC2KHP@taiga> (view parent)
DKIM signature
missing
Download raw message
On Fri, Nov 10, 2023, at 2:38 AM, Drew DeVault wrote:
> The examples should focus on one thing at time, it's better to
> demonstrate one idea than two.

I tried modifying the sample manifest to install [nodejs][1] and
[npm][2] from the built-in repos, and it ended up installing waaaay more
than I expected ([see build log][3]). It included stuff like eslint and
handlebars for whatever reason.

Is the lack of a third-party repo worth the trade off for a vastly over-
specified package installation process?

[1]: https://packages.debian.org/stable/nodejs
[2]: https://packages.debian.org/stable/npm
[3]: https://builds.sr.ht/~noelle/job/1091748

Re: [PATCH pages.sr.ht-examples 2/3] eleventy.yml: Switch to distroless nodesource, v20

Details
Message ID
<90a1f9c7-8b08-4836-b55b-a86656ee3428@bitfehler.net>
In-Reply-To
<286db991-b7f0-467b-b060-1e010c4c66d7@app.fastmail.com> (view parent)
DKIM signature
missing
Download raw message
On 11/10/23 14:39, Noelle Leigh wrote:
> On Fri, Nov 10, 2023, at 2:38 AM, Drew DeVault wrote:
>> The examples should focus on one thing at time, it's better to
>> demonstrate one idea than two.
> 
> I tried modifying the sample manifest to install [nodejs][1] and
> [npm][2] from the built-in repos, and it ended up installing waaaay more
> than I expected ([see build log][3]). It included stuff like eslint and
> handlebars for whatever reason.
> 
> Is the lack of a third-party repo worth the trade off for a vastly over-
> specified package installation process?

I would say yes, just to keep this simple. This is just Debian being 
Debian, and one could argue over whether we should install manifest 
packages with `--no-install-recommends`/`--no-install-suggests` or 
something, but for the purpose of demonstration, this is fine.

That said, while I am not the authority on anything NodeJS, I could see 
there being value in having a _separate_ example explaining how to 
install it from third-party repos for those who need/want that.

Cheers,
Conrad

Re: [PATCH pages.sr.ht-examples 2/3] eleventy.yml: Switch to distroless nodesource, v20

Details
Message ID
<e3717ff2-bede-495b-82b9-7869177bb6cb@app.fastmail.com>
In-Reply-To
<90a1f9c7-8b08-4836-b55b-a86656ee3428@bitfehler.net> (view parent)
DKIM signature
missing
Download raw message
On Thu, Nov 16, 2023, at 5:33 AM, Conrad Hoffmann wrote:
> I would say yes, just to keep this simple. This is just Debian being 
> Debian, and one could argue over whether we should install manifest 
> packages with `--no-install-recommends`/`--no-install-suggests` or 
> something, but for the purpose of demonstration, this is fine.

New patch series submitted [1].

[1]: https://lists.sr.ht/~sircmpwn/sr.ht-dev/%3C20231121115815.3938-1-noelle_leigh%40fastmail.com%3E
Reply to thread Export thread (mbox)