public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
From: Maxwell G <maxwell@gtmx.me>
To: git-commits@fedoraproject.org
Subject: [rpms/k9s] f44: Use a simpler mechanism to remove github.com/therootcompany/xz
Date: Sun, 07 Jun 2026 16:36:37 GMT	[thread overview]
Message-ID: <178085019766.1.2713665950480591762.rpms-k9s-fb2b679ad3e3@fedoraproject.org> (raw)

            A new commit has been pushed.

            Repo   : rpms/k9s
            Branch : f44
            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=f44

            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

                 reply	other threads:[~2026-06-07 16:36 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=178085019766.1.2713665950480591762.rpms-k9s-fb2b679ad3e3@fedoraproject.org \
    --to=maxwell@gtmx.me \
    --cc=git-commits@fedoraproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox