public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [rpms/k9s] f43: Use a simpler mechanism to remove github.com/therootcompany/xz
@ 2026-06-07 16:36 Maxwell G
0 siblings, 0 replies; only message in thread
From: Maxwell G @ 2026-06-07 16:36 UTC (permalink / raw)
To: git-commits
A new commit has been pushed.
Repo : rpms/k9s
Branch : f43
Commit : fb2b679ad3e32076e0f579396adab9180ce03bb3
Author : Maxwell G <maxwell@gtmx.me>
Date : 2026-05-30T13:03:54-05:00
Stats : +7/-55 in 3 file(s)
URL : https://src.fedoraproject.org/rpms/k9s/c/fb2b679ad3e32076e0f579396adab9180ce03bb3?branch=f43
Log:
Use a simpler mechanism to remove github.com/therootcompany/xz
We cannot use github.com/therootcompany/xz since it is CC0-licensed.
Instead, handle this issue by replacing the squashfs module with
mikelolasagasti's version that does not depend on the problematic xz
library.
---
diff --git a/go-vendor-tools.toml b/go-vendor-tools.toml
index 15312e2..5190790 100644
--- a/go-vendor-tools.toml
+++ b/go-vendor-tools.toml
@@ -1,43 +1,12 @@
[archive]
pre_commands = [
- # We use the go workspace feature below to override dependencies.
- ["go", "work", "init"],
- ["go", "work", "use", "."],
-]
-post_commands = [
- [
- # See https://bugzilla.redhat.com/show_bug.cgi?id=2368453#c5.
- # github.com/therootcompany/xz is a fork of github.com/xi2/xz with a
- # different license that isn't allowed in Fedora.
- # Instead of usikng the fork, we can use a local copy of the original
- # version instead.
- "sh", "-xeuc",
- # XXX: Keep this script in sync with the specfile until go-vendor-tools allows
- # including extra files (i.e., the replacements directory) in the vendor archive.
- '''
- # Copy github.com/xi2/xz (which is already included as a dependency)
- # and create a local override.
- mkdir -p replacements
- # Copy original library
- cp -rp vendor/github.com/xi2/xz replacements/xz
- cp go.mod replacements/xz
- cd replacements/xz
- sed -i '/github.com\/therootcompany\/xz/d' go.mod
- # Rename to use import path of the fork.
- sed -i 's|github.com/xi2/xz|github.com/therootcompany/xz|' $(find -name '*.go')
- go mod edit -module=github.com/therootcompany/xz
-
- # These lines SHOULD NOT be copied to the specfile.
- # They edit the root go work and regen the vendor directory.
- go mod tidy
- cd -
- rm -r vendor/github.com/therootcompany/xz
- go work use replacements/xz
- go work sync
- go work vendor
- test ! -f vendor/github.com/therootcompany/xz
- '''
+ # https://github.com/sylabs/squashfs/pull/8
+ ["sh", "-xeuc", """
+ hash="1dcb4cdb009a19244e21d57ba7a700ec997799e5"
+ go mod edit \
+ -replace="github.com/sylabs/squashfs@v1.0.6=github.com/mikelolasagasti/squashfs@$hash"
+ """
],
]
@@ -103,8 +72,3 @@ expression = "MIT"
path = "vendor/modernc.org/memory/LICENSE-LOGO"
sha256sum = "5ae5bee3072a841376451b48d8cfcec7188e10543926d5870828d36c8a750dc5"
expression = "MIT"
-
-[[licensing.licenses]]
-path = "replacements/xz/LICENSE"
-sha256sum = "5c640056d513f276d56635af7a0bed81cb7eac02a31b6e56d40c416557a8d8ce"
-expression = "LicenseRef-Fedora-Public-Domain"
diff --git a/k9s.spec b/k9s.spec
index 4358f1d..9e9fed6 100644
--- a/k9s.spec
+++ b/k9s.spec
@@ -36,18 +36,6 @@ BuildRequires: go-vendor-tools
%setup -q -T -D -a1 %{forgesetupargs}
%autopatch -p1
-# Make sure to keep in sync with post_commands in go-vendor-tools.toml.
-# See the comment there for why we need this.
-mkdir -p replacements
-# Copy original library
-cp -rp vendor/github.com/xi2/xz replacements/xz
-cp go.mod replacements/xz
-cd replacements/xz
-sed -i '/github.com\/therootcompany\/xz/d' go.mod
-# Rename to use import path of the fork.
-sed -i 's|github.com/xi2/xz|github.com/therootcompany/xz|' $(find -name '*.go')
-go mod edit -module=github.com/therootcompany/xz
-
%generate_buildrequires
%go_vendor_license_buildrequires -c %{S:2}
diff --git a/sources b/sources
index 8f33a07..40523ba 100644
--- a/sources
+++ b/sources
@@ -1,2 +1,2 @@
SHA512 (k9s-0.50.18.tar.gz) = d02af24dee692f259f0148e380494daf38fa0a1e500b958d1480fa9a981c7f03d228a04a994fba14fc03beb1f6cddd7babf0d60aa1a650f9693eb185af948475
-SHA512 (k9s-0.50.18-vendor.tar.bz2) = cb251c49348e143733029b0fc4526ade3d95e27ca55651e238f649d73d26985db85a772ac4fdc09407604bae14a4c553b6c3adeae4d0d44bd34e1a42a657c71f
+SHA512 (k9s-0.50.18-vendor.tar.bz2) = 3559de7e4194b4b0033903b5e522f2104ca80594f847a999b62674179e9038f3ca550ff33e23f908aa439730de58d920c323bbe05b11f25e42018dfb2431e2cb
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2026-06-07 16:36 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-06-07 16:36 [rpms/k9s] f43: Use a simpler mechanism to remove github.com/therootcompany/xz Maxwell G
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox