public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
From: Yaakov Selkowitz <yselkowi@redhat.com>
To: git-commits@fedoraproject.org
Subject: [rpms/google-noto-fonts] rawhide: Use macros for string manipulation
Date: Thu, 03 Sep 2026 00:46:54 GMT	[thread overview]
Message-ID: <178839641416.1.12911780056162077328.rpms-google-noto-fonts-ed35fb33c2ae@fedoraproject.org> (raw)

            A new commit has been pushed.

            Repo   : rpms/google-noto-fonts
            Branch : rawhide
            Commit : ed35fb33c2ae0c65cb60f77d64c703dc044cdb77
            Author : Yaakov Selkowitz <yselkowi@redhat.com>
            Date   : 2026-09-02T12:14:43-04:00
            Stats  : +1/-5 in 1 file(s)
            URL    : https://src.fedoraproject.org/rpms/google-noto-fonts/c/ed35fb33c2ae0c65cb60f77d64c703dc044cdb77?branch=rawhide

            Log:
            Use macros for string manipulation

This is compatible with RPM 4.19 (3 years ago) and is safer than script
execution.

---
diff --git a/google-noto-fonts.spec b/google-noto-fonts.spec
index 7ed1042..65197cf 100644
--- a/google-noto-fonts.spec
+++ b/google-noto-fonts.spec
@@ -10,10 +10,6 @@ in Unicode.\
 %{nil}
 
 %global srcver	2026.09.01
-%global majorver	%{lua: v, _ = string.gsub(rpm.expand("%{srcver}"), "(%d+)%.%d+%.%d+", "%1"); print(v)}
-%global minorver	%{lua: v, _ = string.gsub(rpm.expand("%{srcver}"), "%d+%.(%d+)%.%d+", "%1"); print(v)}
-%global patchver	%{lua: v, _ = string.gsub(rpm.expand("%{srcver}"), "%d+%.%d+%.(%d+)", "%1"); print(v)}
-%global rpmver	%{lua: print(string.format("%04d%02d%02d", tonumber(rpm.expand("%{majorver}")), tonumber(rpm.expand("%{minorver}")), tonumber(rpm.expand("%{patchver}"))))}
 # for default font
 %global hprio	56
 # for default font but static
@@ -32,7 +28,7 @@ in Unicode.\
 %global	nlat_lprio	67
 
 Name:           %{fontname}-fonts
-Version:        %{rpmver}
+Version:        %{gsub %{srcver} %. %{quote:}}
 Release:        %autorelease
 Summary:        Hinted and Non Hinted OpenType fonts for Unicode scripts
 License:        OFL-1.1

                 reply	other threads:[~2026-09-03  0:46 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=178839641416.1.12911780056162077328.rpms-google-noto-fonts-ed35fb33c2ae@fedoraproject.org \
    --to=yselkowi@redhat.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