public inbox for gentoo-dev@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-dev] [PATCH] skel.ebuild: update SRC_URI
@ 2025-06-28 10:49 kangie
  2025-06-28 14:16 ` Ulrich Müller
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: kangie @ 2025-06-28 10:49 UTC (permalink / raw
  To: gentoo-dev; +Cc: Matt Jolly

From: Matt Jolly <kangie@gentoo.org>

In 2025 FTP is increasingly uncommon. The world we live in is (mostly)
HTTPS, and SRC_URI should reflect that.

Add additional commentry about (and use SRC_URI to show an example of)
renaming the distfile with `->` when required.

Signed-off-by: Matt Jolly <kangie@gentoo.org>
---
 skel.ebuild | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/skel.ebuild b/skel.ebuild
index 437e0d5c569d..29e679528778 100644
--- a/skel.ebuild
+++ b/skel.ebuild
@@ -29,8 +29,8 @@ DESCRIPTION="This is a sample skeleton ebuild file"
 HOMEPAGE="https://foo.example.org/"
 
 # Point to any required sources; these will be automatically downloaded by
-# Portage.
-SRC_URI="ftp://foo.example.org/${P}.tar.gz"
+# Portage. If a file needs to be renamed, use the "->" syntax.
+SRC_URI="https://files.example.org/foo/v${PV}.tar.xz -> ${P}.tar.xz"
 
 # Source directory; the dir where the sources can be found (automatically
 # unpacked) inside ${WORKDIR}.  The default value for S is ${WORKDIR}/${P}
-- 
2.49.0



^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [gentoo-dev] [PATCH] skel.ebuild: update SRC_URI
  2025-06-28 10:49 [gentoo-dev] [PATCH] skel.ebuild: update SRC_URI kangie
@ 2025-06-28 14:16 ` Ulrich Müller
  2025-06-29  1:43   ` Ionen Wolkens
  2025-06-29 12:34 ` [gentoo-dev] " Duncan
  2025-07-05  7:04 ` [gentoo-dev] [PATCH v2] " kangie
  2 siblings, 1 reply; 5+ messages in thread
From: Ulrich Müller @ 2025-06-28 14:16 UTC (permalink / raw
  To: kangie; +Cc: gentoo-dev

[-- Attachment #1: Type: text/plain, Size: 526 bytes --]

>>>>> On Sat, 28 Jun 2025, kangie  wrote:

> -# Portage.
> -SRC_URI="ftp://foo.example.org/${P}.tar.gz"
> +# Portage. If a file needs to be renamed, use the "->" syntax.
> +SRC_URI="https://files.example.org/foo/v${PV}.tar.xz -> ${P}.tar.xz"

Explaining "->" in the comment is fine, but not sure if it is a good
idea in the actual SRC_URI example. New contributors will inevitably
copy the line to their ebuild, even if it's not needed. (We've been
there before, that's why "econf" and "emake" are commented out now).

Ulrich

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 507 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [gentoo-dev] [PATCH] skel.ebuild: update SRC_URI
  2025-06-28 14:16 ` Ulrich Müller
@ 2025-06-29  1:43   ` Ionen Wolkens
  0 siblings, 0 replies; 5+ messages in thread
From: Ionen Wolkens @ 2025-06-29  1:43 UTC (permalink / raw
  To: gentoo-dev; +Cc: kangie

[-- Attachment #1: Type: text/plain, Size: 1146 bytes --]

On Sat, Jun 28, 2025 at 04:16:41PM +0200, Ulrich Müller wrote:
> >>>>> On Sat, 28 Jun 2025, kangie  wrote:
> 
> > -# Portage.
> > -SRC_URI="ftp://foo.example.org/${P}.tar.gz"
> > +# Portage. If a file needs to be renamed, use the "->" syntax.
> > +SRC_URI="https://files.example.org/foo/v${PV}.tar.xz -> ${P}.tar.xz"
> 
> Explaining "->" in the comment is fine, but not sure if it is a good
> idea in the actual SRC_URI example. New contributors will inevitably
> copy the line to their ebuild, even if it's not needed. (We've been
> there before, that's why "econf" and "emake" are commented out now).

Think I'd also prefer it be kept an example for "normal" tarballs rather
than what is more often automated git archive with v${PV} which we'd
rather not be used if normal tarballs exist.

I sometime do see people do ${P}.tar.xz -> ${P}.tar.xz just because they
copied it from somewhere too (pkgcheck can warn about that tho).

Note wouldn't hurt, but special knowledge (->) can in general be picked
up later when it's needed, skel.ebuild does not have cover every details
and is just a starting guideline.
-- 
ionen

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [gentoo-dev] Re: [PATCH] skel.ebuild: update SRC_URI
  2025-06-28 10:49 [gentoo-dev] [PATCH] skel.ebuild: update SRC_URI kangie
  2025-06-28 14:16 ` Ulrich Müller
@ 2025-06-29 12:34 ` Duncan
  2025-07-05  7:04 ` [gentoo-dev] [PATCH v2] " kangie
  2 siblings, 0 replies; 5+ messages in thread
From: Duncan @ 2025-06-29 12:34 UTC (permalink / raw
  To: gentoo-dev

kangie posted on Sat, 28 Jun 2025 20:49:29 +1000 as excerpted:

> In 2025 FTP is increasingly uncommon. The world we live in is (mostly)
> HTTPS, and SRC_URI should reflect that.

++

> Add additional commentry about (and use SRC_URI to show an example of)
> renaming the distfile with `->` when required.
>  # Point to any required sources; these will be automatically downloaded by
> -# Portage.
> -SRC_URI="ftp://foo.example.org/${P}.tar.gz"
> +# Portage. If a file needs to be renamed, use the "->" syntax.
> +SRC_URI="https://files.example.org/foo/v${PV}.tar.xz -> ${P}.tar.xz"

So I suppose I'm as portage-positive as the next guy, but...

Maybe take the opportunity to s/Portage/package manager/ (mangler?) or
some such while you're at it?  (Or maybe "EAPI compliant package manager"
if just PM's too generic, or just PM if it's not considered to ambiguous...)
Just seems a bit like tunnel vision to specifically name portage in something
like skel.ebuild these days, even if portage /is/ the vast majority, user-side.

(Of course doesn't /have/ to be /this/ commit if someone thinks that needs
more discussion than the simple s/ftp/https/ stuff or maybe council needs
to vote on a change like that... but the discussion would need to start
somewhere even if it won't go in this commit, so...)

-- 
Duncan - List replies preferred.   No HTML msgs.
"Every nonfree program has a lord, a master --
and if you use the program, he is your master."  Richard Stallman



^ permalink raw reply	[flat|nested] 5+ messages in thread

* [gentoo-dev] [PATCH v2] skel.ebuild: update SRC_URI
  2025-06-28 10:49 [gentoo-dev] [PATCH] skel.ebuild: update SRC_URI kangie
  2025-06-28 14:16 ` Ulrich Müller
  2025-06-29 12:34 ` [gentoo-dev] " Duncan
@ 2025-07-05  7:04 ` kangie
  2 siblings, 0 replies; 5+ messages in thread
From: kangie @ 2025-07-05  7:04 UTC (permalink / raw
  To: gentoo-dev; +Cc: Matt Jolly

From: Matt Jolly <kangie@gentoo.org>

In 2025 FTP is increasingly uncommon. The world we live in is (mostly)
HTTPS, and SRC_URI should reflect that.

Add commentry about renaming distfiles with `->` when required.

Signed-off-by: Matt Jolly <kangie@gentoo.org>
---
 skel.ebuild | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/skel.ebuild b/skel.ebuild
index 437e0d5c569d..213761669a41 100644
--- a/skel.ebuild
+++ b/skel.ebuild
@@ -29,8 +29,8 @@ DESCRIPTION="This is a sample skeleton ebuild file"
 HOMEPAGE="https://foo.example.org/"
 
 # Point to any required sources; these will be automatically downloaded by
-# Portage.
-SRC_URI="ftp://foo.example.org/${P}.tar.gz"
+# Portage. If a file needs to be renamed use the "->" syntax.
+SRC_URI="https://files.example.org/foo/${P}.tar.xz"
 
 # Source directory; the dir where the sources can be found (automatically
 # unpacked) inside ${WORKDIR}.  The default value for S is ${WORKDIR}/${P}
-- 
2.49.0



^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2025-07-05  7:07 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-06-28 10:49 [gentoo-dev] [PATCH] skel.ebuild: update SRC_URI kangie
2025-06-28 14:16 ` Ulrich Müller
2025-06-29  1:43   ` Ionen Wolkens
2025-06-29 12:34 ` [gentoo-dev] " Duncan
2025-07-05  7:04 ` [gentoo-dev] [PATCH v2] " kangie

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