From 0437641412ac697bf25edb4fd3bb3356ede533e5 Mon Sep 17 00:00:00 2001 From: Debarshi Ray Date: Jun 09 2023 02:13:30 +0000 Subject: [PATCH 1/2] Golang: Be consistent when describing the naming of source packages Saying 'Golang source packages MUST be named after their main import path' as the first bullet point, makes one think that all Golang source packages should be named that way. However, then, the second bullet point says that 'source packages that provide a well-known application' should be named differently. So, not all Golang source packages need to be named the same way? Remove the confusion, by using the same wording from the section on Go code packages. https://pagure.io/packaging-committee/pull-request/1262 --- diff --git a/guidelines/modules/ROOT/pages/Golang.adoc b/guidelines/modules/ROOT/pages/Golang.adoc index bf32dd8..e154f40 100644 --- a/guidelines/modules/ROOT/pages/Golang.adoc +++ b/guidelines/modules/ROOT/pages/Golang.adoc @@ -43,7 +43,8 @@ Perform this fixing in `+%prep+`. === Source packages (src.rpm) -* Golang source packages MUST be named after their main import path. +* Golang source packages dedicated to providing code MUST be named after their + main import path. This process is automated by the `+%{goname}+` macro. This macro will remove any capitalization, "go" keywords, and any duplication in From 11c1041cf8fd1df8465f15e08754f61598688db6 Mon Sep 17 00:00:00 2001 From: Debarshi Ray Date: Jun 09 2023 02:13:30 +0000 Subject: [PATCH 2/2] Golang: Clarify how %gopkg fits in with the naming of code packages There are many Golang source packages dedicated to providing code that use %{gopkg} and friends to declare the %{goname}-devel subpackage. It was confusing to compare such a package against the naming guidelines because it wasn't clear where the %{goname}-devel subpackage was coming from. Readers shouldn't be expected to read the sources of RPM macros to understand what's going on. https://pagure.io/packaging-committee/pull-request/1262 --- diff --git a/guidelines/modules/ROOT/pages/Golang.adoc b/guidelines/modules/ROOT/pages/Golang.adoc index e154f40..875b22b 100644 --- a/guidelines/modules/ROOT/pages/Golang.adoc +++ b/guidelines/modules/ROOT/pages/Golang.adoc @@ -103,8 +103,7 @@ collision. Packages that ship Go code in `+%{goipath}+` should be named `+%{goname}-devel+`. -If your source package is already named `+%{goname}+`, that is easily achieved -with: +If your source package is already named `+%{goname}+` then: [source,RPMSpec] ---- @@ -115,6 +114,9 @@ with: %files devel -f devel.file-list ---- +This has been automated by the `+%{gopkg}+` and `+%{gopdevelkg}+` macros +described in the <> section below. + ==== In a another kind of source package If your source package is named something other than `+%{goname}+`, you SHOULD