nim reported a new issue against the project: `go-rpm-macros` that you are following:
``
The macro code needs massaging to also work on EPEL.
Most of the work is spec side since some of the macros are going to collide with the ones provided by previous iterations of Go macro packages
``
To reply, visit the link below or just reply to this email
https://pagure.io/go-rpm-macros/issue/2
nim reported a new issue against the project: `go-rpm-macros` that you are following:
``
`%goprep` should apply patches automatically, so there is no convenience gap with `%autosetup`.
This is generic work that should be done *redhat-rpm-config* side in forge macros and then reused in`%goprep`. Basically:
1. define a `patch_flags<suffix>` rpm variable holding the parameters that should be passed to `%patch<suffix>`
2. define a `default_flags<suffix>` fallback
3. define a `source_patches<suffix>` holding an ordered space separated list of patch suffixes associated with a particular forge/go source.
And then write the usual lua loops to apply it all at the right moment in the spec.
``
To reply, visit the link below or just reply to this email
https://pagure.io/go-rpm-macros/issue/3
linkdupont reported a new issue against the project: `go-rpm-macros` that you are following:
``
In #34 and #35, it was brought up to rename the `BUILDTAGS` variable to `GOBUILDTAGS` in order to be more explicit about the intended use of the variables and to avoid any potential namespace collision with other variables. I looked into what packages are using `BUILDTAGS` today to figure out how much of an impact a rename like this will have.
As of this writing, the following packages are using `BUILDTAGS` in some capacity:
```
buildah.spec
containernetworking-plugins.spec
cri-tools.spec
go-compilers.spec
golang-github-prometheus-node-exporter.spec
golang-github-prometheus.spec
grafana.spec
hugo.spec
moby-engine.spec
oci-seccomp-bpf-hook.spec
pack.spec
podman.spec
reg.spec
runc.spec
skopeo.spec
snapd.spec
source-to-image.spec
stargz-snapshotter.spec
syncthing.spec
weldr-client.spec
```
And the follow packages use `LDFLAGS`:
```
aerc.spec
age.spec
butane.spec
clash.spec
containerd.spec
doctl.spec
fzf.spec
geoipupdate.spec
git-lfs.spec
golang-github-aliyun-cli.spec
golang-github-colinmarc-hdfs-2.spec
golang-github-haproxytech-dataplaneapi.spec
golang-github-hub.spec
golang-github-jsonnet-bundler.spec
golang-github-magefile-mage.spec
golang-github-prometheus.spec
golang-github-rfjakob-gocryptfs.spec
golang-github-tdewolff-minify.spec
golang-github-theoapp-theo-agent.spec
golang-mvdan-editorconfig.spec
ignition.spec
kiln.spec
micro.spec
open-policy-agent.spec
osbuild-composer.spec
rclone.spec
reg.spec
source-to-image.spec
syncthing.spec
tinygo.spec
vgrep.spec
weldr-client.spec
```
I identified these packages by grepping the contents of the [current spec tarball](https://src.fedoraproject.org/repo/rpm-specs-latest.tar.xz).
To avoid breaking these packages that are currently using `BUILDTAGS` or `LDFLAGS`, there are two possible approaches I see to safely rename the variables:
#### 1. Rebuild everything in a side-tag
Patch `go-rpm-macros` to rename `BUILDTAGS` and `LDFLAGS` to `GOBUILDTAGS` and `GOLDFLAGS` respectively. Then patch the above packages and stage them all in a side-tag to update them in one monolithic Bodhi update.
#### 2. Support both old and new variables at the same time
Patch `go-rpm-macros` to support **both** `BUILDTAGS`/`LDFLAGS` *and* `GOBUILDTAGS`/`GOLDFLAGS` simultaneously. Then patch the above packages over time until everything has been ported over to using `GOBUILDTAGS` and `GOLDFLAGS`, and then drop the old variables from `go-rpm-macros`.
I'm not sure how easy either of these approaches will be. They are both moving targets as new packages are constantly getting added. It might just be a constant effort to try and keep on top of all the patches as new packages come along and patches need to be rebased onto their target's changes.
``
To reply, visit the link below or just reply to this email
https://pagure.io/go-rpm-macros/issue/36
hruskape reported a new issue against the project: `go-rpm-macros` that you are following:
``
It seems that commit https://pagure.io/go-rpm-macros/c/359d80bbfe7f0490fc51c43af8d986863516c5bb?… breaking %gobuildflags usage in spec file.
Getting error, as double quotation marks are removed.
Specfile section
unset LDFLAGS
%make_build GOBUILDFLAGS="%{gobuildflags}"
Error:
+ /usr/bin/make -O -j16 V=1 VERBOSE=1 'GOBUILDFLAGS=-buildmode pie -compiler gc -tags=rpm_crashtraceback' ' -ldflags ' -B 0x3433f3bcad171c4e7f8f736da295a9fac8289b8c -compressdwarf=false -extldflags '-Wl,-z,relro -Wl,--as-needed -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -a -v -x'
/usr/bin/make: invalid option -- 'c'
/usr/bin/make: invalid option -- 'x'
Usage: make [options] [target] ...
``
To reply, visit the link below or just reply to this email
https://pagure.io/go-rpm-macros/issue/46
eclipseo opened a new pull-request against the project: `go-rpm-macros` that you are following:
``
Convert LDFLAGS to GOLDFLAGS and BUILTAGS to GOBUILDTAGS
``
To reply, visit the link below or just reply to this email
https://pagure.io/go-rpm-macros/pull-request/41
(Resending as it seems this didn't reach the ML the first time...)
Hi Fedorians,
Changes/Mass_Retire_Golang_Leaves [1] has been approved by FESCo. As
part of this Change, all Go library packages that are leaves will be be
mass retired and removed from the Fedora 39 repositories in
approximately one month.
The following maintainers/groups own co-maintain or watch at least one
package that we have identified as a leaf:
@deepinde-sig
@go-sig
@osbuild-sig
agerstmayr
anthr76
athoscr
atim
carlwgeorge
dcavalca
dctrud
eclipseo
fab
fale
fuller
gundersanne
jchaloup
jdoss
jjelen
laiot
logic
mayorga
mgoodwin
nathans
obudai
pwouters
qulogic
rga
rominf
yanqiyu
I will forward this message to those users separately instead of BCCing.
Apparently, some people have broken filters that hide any email sent to
the ML even if it's addressed to them directly.
See [2] for a full list of leaves and [3] for a maintainer by maintainer
breakdown. Maintainers may opt out by cloning
https://pagure.io/GoSIG/go-leaves/ and pushing an `opt-out/{PKGNAME}`
file with a short justification.
Something like:
```
git clone ssh://git@pagure.io/GoSIG/go-leaves.git
cd go-leaves
echo "Dependency for foo (review bug #XXXXX)" > ./opt-out/bar
git add ./opt-out/bar
git commit -m "opt out bar"
git push origin
```
All Go SIG members have write access to this repository. Other users can
submit a pull request. You're also welcome to file an issue and I'll
push the file for you.
After a month has passed, we'll remove Go SIG write access from the
repository and stop accepting additional opt-outs. Then, we'll preform
test builds in Copr to make sure there's no false positives in the list.
Finally, I'll verify the results, opt out any additional false
positives, and preform the mass retirement. As usual, anybody can
unretire packages without a re-review within eight weeks by filing a
releng ticket.
[1] https://fedoraproject.org/wiki/Changes/Mass_Retire_Golang_Leaves
[2] https://pagure.io/GoSIG/go-leaves/blob/main/f/leaves
[3] https://pagure.io/GoSIG/go-leaves/blob/main/f/leaves-by-maintainer
Thank you for your cooperation,
--
Maxwell G (@gotmax23)
Pronouns: He/They
krouma opened a new pull-request against the project: `golist` that you are following:
``
Don't skip testdata
``
To reply, visit the link below or just reply to this email
https://pagure.io/golist/pull-request/30
bcl opened a new pull-request against the project: `go-rpm-macros` that you are following:
``
Add BUILDTAGS to %gobuildflags
``
To reply, visit the link below or just reply to this email
https://pagure.io/go-rpm-macros/pull-request/34
krouma opened a new pull-request against the project: `golist` that you are following:
``
Deduplicate CollectProjectDeps
``
To reply, visit the link below or just reply to this email
https://pagure.io/golist/pull-request/29
https://fedoraproject.org/wiki/Changes/Mass_Retire_Golang_Leaves
This document represents a proposed Change. As part of the Changes
process, proposals are publicly announced in order to receive
community feedback. This proposal will only be implemented if approved
by the Fedora Engineering Steering Committee.
== Summary ==
As of Jan 2023, 275/1660 (17%) library only Go source packages are
leaves.
Overall, these packages are maintained by 35 different maintainers along with
the Go SIG.
[https://pagure.io/GoSIG/go-leaves/blob/main/f/leaves These leaves]
([https://pagure.io/GoSIG/go-leaves/blob/main/f/leaves-by-maintainer
by maintainer])
will be mass retired in Fedora 39.
== Owner ==
* Name: [[User:gotmax23| Maxwell G]]; [[User:alexsaezm | Alejandro
Sáez Morollón]]; [https://pagure.io/GoSIG/go-sig the Go SIG]
* Email: gotmax(a)e.email; asm(a)redhat.com; golang(a)lists.fedoraproject.org
== Definitions ==
* ''library only source package'' -- a component/source package that
only contains noarch golang ''*-devel'' subpackages.
* ''binary subpackage'' -- an arched subpackage that contains go binaries.
* ''source package with binaries'' - a component/source package that
contains at least one ''binary subpackage''; may also contain library
subpackages.
* ''leaf'' -- a library only source package whose subpackages don't
have any dependents
== Detailed Description ==
The Go SIG maintains over 2000 source packages. 275 of these packages are
''leaves''. Overall, these packages are assigned to 35 different maintainers.
We'd like to clean up these unneeded packages to allow us to better direct our
time and unclutter the distribution. Handling this large number of leaves one
by one and maintainer by maintainer proved ineffective, so we're taking a more
heavy handed approach and mass retiring these leaf packages prior to the
release of Fedora 39.
''Source packages with binaries'' will be excluded even if the ''binary
subpackage''(s) and/or the -devel subpackage(s) are leaves.
See the next section for more information on how we plan to implement this.
In short:
* We wrote a script to identify the ''leaf'' packages.
* The current list of ''leaf'' packages is available at
https://pagure.io/GoSIG/go-leaves/blob/main/f/leaves. A by maintainer
breakdown is available at
https://pagure.io/GoSIG/go-leaves/blob/main/f/leaves-by-maintainer.
* We will contact the maintainers of these packages and allow them to opt-out.
* We will use Copr to verify our work before proceeding with the mass removal.
=== Implementation ===
Finding the leaves:
([https://git.sr.ht/~gotmax23/fedora-scripts/tree/main/item/go-sig/go_leaves.…
go_leaves.py])
# Find the source packages that BuildRequire go-rpm-macros or any
golang.src subpackage
# Iterate over the source packages list and find the subpackages for each one
# If all of a source package's subpackages are noarch and contain
"-devel", it is considered a leaf.
# Remove packages from the leaves list if they've opted out.
# Store the output in
https://pagure.io/GoSIG/go-leaves/blob/main/f/leaves. Update it
periodically.
Confirmation:
# Create a blank ''blocker'' package that Conflicts with the to be
removed packages.
# Create a new Copr with the blocker package in its default buildroot.
This will simulate the actual removal of these packages.
# Rebuild all of the non leaf packages.
# Investigate new failures and rebuild in a control Copr.
Opt outs:
# A list of opt outs will be kept in
https://pagure.io/GoSIG/go-leaves. Go SIG members will have `commit`.
# As explained in the aforementioned repo's README, packagers can
simply push an `opt-out/{component}` text file with a short
justification to opt out.
Mass Retirement:
# Shallow clone the ''leaves''' distgit repositories and run `fedpkg
retire` on each.
# Double check that the packages are properly blocked/retired in Koji and PDC.
== Feedback ==
This was briefly discussed in a Go SIG meeting
([https://meetbot.fedoraproject.org/fedora-golang/2023-01-16/go_sig_meeting.2…
minutes]).
Feedback was generally positive.
== Benefit to Fedora ==
This change will allow the Go SIG to focus its limited people power on
maintaining packages that are actually needed.
Fedora won't waste resources uselessly rebuilding these packages.
Hopefully, the other packages will be better maintained.
== Scope ==
* Proposal owners:
** ✅ Write a script to determine leaves.
([https://git.sr.ht/~gotmax23/fedora-scripts/tree/main/item/go-sig/go_leaves.…
go_leaves.py])
** ✅ Store an updated list of leaves in https://pagure.io/GoSIG/go-leaves
** Directly contact affected maintainers and devel-announce. Ensure
opt outs are properly accounted for.
** Simulate the removal of these packages and rebuild the Golang stack
in Copr. Investigate any new failures.
** Mass retire packages after waiting a few weeks for maintainers to
opt out. Aim to have this completed before the mass rebuild.
* Release engineering: [https://pagure.io/releng/issue/11253 #11253]
** After we preform the mass retirement, releng will allow any Go SIG
member to unretire a ''leaf'' within eight weeks even if they're not
the main admin.
** The change owners will mass retire the packages themselves using
go-sig/provenpackager membership.
** Ensure that the packages are properly blocked/retired in Koji and PDC.
== Upgrade/compatibility impact ==
There should be none. These library packages are not meant for end users.
We will not Obsolete these packages, so they won't be removed from
existing systems.
== Contingency Plan ==
The change can be deferred if the prep work isn't completed in time.
The change owners are taking multiple measures to avoid retiring packages that
are not actually ''leaves'' (i.e. false positives).
In the event of unforeseen issues, some or all of the packages can be
unretired and rebuilt.
Retagging builds from F38 is also possible,
as Golang library packages only contain source code and are architecture
independent.
== Documentation ==
The current draft of the package leaves script
[https://git.sr.ht/~gotmax23/fedora-scripts/tree/main/item/go-sig/go_leaves.…
is available].
== Release Notes ==
Remove unused Golang libraries from the repositories.
These packages are not meant for end user consumption to begin with.
We will not Obsolete these packages, so they won't be removed from
existing systems.
--
Ben Cotton
He / Him / His
Fedora Program Manager
Red Hat
TZ=America/Indiana/Indianapolis