public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
From: LuK1337 <priv.luk@gmail.com>
To: git-commits@fedoraproject.org
Subject: [rpms/pack] epel10.3: Inject package version via LDFLAGS
Date: Wed, 16 Sep 2026 13:45:43 GMT	[thread overview]
Message-ID: <178956634332.1.3808422443254139304.rpms-pack-a4d33d2f8cf6@fedoraproject.org> (raw)

            A new commit has been pushed.

            Repo   : rpms/pack
            Branch : epel10.3
            Commit : a4d33d2f8cf6fd87a123e84a312f202e47ff6494
            Author : LuK1337 <priv.luk@gmail.com>
            Date   : 2026-09-15T20:58:11+02:00
            Stats  : +2/-1 in 1 file(s)
            URL    : https://src.fedoraproject.org/rpms/pack/c/a4d33d2f8cf6fd87a123e84a312f202e47ff6494?branch=epel10.3

            Log:
            Inject package version via LDFLAGS

Test: Run `pack version`

---
diff --git a/pack.spec b/pack.spec
index f03b9c2..e1e472e 100644
--- a/pack.spec
+++ b/pack.spec
@@ -45,7 +45,8 @@ export CGO_CFLAGS=$CFLAGS
 CGO_CFLAGS=$(echo $CGO_CFLAGS | sed 's/-flto=auto//g')
 CGO_CFLAGS=$(echo $CGO_CFLAGS | sed 's/-Wp,D_GLIBCXX_ASSERTIONS//g')
 CGO_CFLAGS=$(echo $CGO_CFLAGS | sed 's/-specs=\/usr\/lib\/rpm\/redhat\/redhat-annobin-cc1//g')
-export LDFLAGS=''
+# As seen at https://github.com/buildpacks/pack/blob/9321d2c/Makefile#L61
+export LDFLAGS='-X github.com/buildpacks/pack/pkg/client.Version=%{version}'
 
 %ifarch x86_64
 export CGO_CFLAGS+=" -m64 -mtune=generic -fcf-protection=full"

                 reply	other threads:[~2026-09-16 13:45 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=178956634332.1.3808422443254139304.rpms-pack-a4d33d2f8cf6@fedoraproject.org \
    --to=priv.luk@gmail.com \
    --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