public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
From: Pavel Raiskup <praiskup@redhat.com>
To: git-commits@fedoraproject.org
Subject: [rpms/distgen] epel10.3: fix FTBFS on rawhide
Date: Mon, 14 Sep 2026 12:38:05 GMT	[thread overview]
Message-ID: <178938948537.1.343112865127920899.rpms-distgen-8a77972f9398@fedoraproject.org> (raw)

            A new commit has been pushed.

            Repo   : rpms/distgen
            Branch : epel10.3
            Commit : 8a77972f9398afff6011c497529d923e6b6c4a6c
            Author : Pavel Raiskup <praiskup@redhat.com>
            Date   : 2019-05-02T01:33:13+02:00
            Stats  : +73/-7 in 2 file(s)
            URL    : https://src.fedoraproject.org/rpms/distgen/c/8a77972f9398afff6011c497529d923e6b6c4a6c?branch=epel10.3

            Log:
            fix FTBFS on rawhide

Resolves: rhbz#1705262
Version: 1.3-2

---
diff --git a/0001-Use-distro-module-instead-of-platform.patch b/0001-Use-distro-module-instead-of-platform.patch
new file mode 100644
index 0000000..bd4fc14
--- /dev/null
+++ b/0001-Use-distro-module-instead-of-platform.patch
@@ -0,0 +1,52 @@
+From 0ede6d839982c2bc2e0f79da6ac3aafa02f04f76 Mon Sep 17 00:00:00 2001
+From: Pavel Raiskup <praiskup@redhat.com>
+Date: Thu, 2 May 2019 01:04:20 +0200
+Subject: [PATCH] Use distro module instead of platform
+
+Per rhbz#1705262
+---
+ distgen/distro_version.py                | 4 ++--
+ tests/unittests/test_distro_detection.py | 4 ++--
+ 2 files changed, 4 insertions(+), 4 deletions(-)
+
+diff --git a/distgen/distro_version.py b/distgen/distro_version.py
+index 421c4be..6208216 100644
+--- a/distgen/distro_version.py
++++ b/distgen/distro_version.py
+@@ -1,9 +1,9 @@
+-import platform
++import distro
+ import subprocess
+ 
+ 
+ def detect_default_distro():
+-    os, version, name = platform.dist()
++    os, version, name = distro.linux_distribution(full_distribution_name=True)
+     os = os.lower()
+ 
+     if os == 'fedora':
+diff --git a/tests/unittests/test_distro_detection.py b/tests/unittests/test_distro_detection.py
+index 27966d3..842a5fb 100644
+--- a/tests/unittests/test_distro_detection.py
++++ b/tests/unittests/test_distro_detection.py
+@@ -15,7 +15,7 @@ class TestDistroDetection(object):
+         ('rhel',    7, 'sth',             7),
+     ])
+     @patch('subprocess.check_output')
+-    @patch('platform.dist')
++    @patch('distro.linux_distribution')
+     def test_rpm(self, pdist, sp_co, distro, version, name, cversion, arch):
+         sp_co.return_value = arch
+         pdist.return_value = (distro, version, name)
+@@ -25,7 +25,7 @@ class TestDistroDetection(object):
+         )
+ 
+ 
+-    @patch('platform.dist')
++    @patch('distro.linux_distribution')
+     def test_others(self, dist):
+         dist.return_value = ('debian', 1, 'something')
+         assert detect_default_distro() == None
+-- 
+2.20.1
+

diff --git a/distgen.spec b/distgen.spec
index ebd0365..e6c2580 100644
--- a/distgen.spec
+++ b/distgen.spec
@@ -5,26 +5,37 @@
 Name:       distgen
 Summary:    Templating system/generator for distributions
 Version:    1.3
-Release:    1%{?dist}
+Release:    2%{?dist}
 License:    GPLv2+
 URL:        https://github.com/devexp-db/distgen
 BuildArch:  noarch
 
-%global both_requires %{pypkg}-jinja2, %{pypkg}-six, %{?fedora:%{pypkg}-}PyYAML
-
-Requires:      %both_requires
-BuildRequires: %{pypkg}-setuptools %{pypkg}-devel %{?fedora:%{pypkg}-}pytest %both_requires
-BuildRequires: %{pypkg}-pytest-catchlog %pypkg-mock
+Requires: %{pypkg}-jinja2
+Requires: %{pypkg}-distro
+Requires: %{?fedora:%{pypkg}-}PyYAML
+Requires: %{pypkg}-six
+
+BuildRequires: %{pypkg}-devel
+BuildRequires: %{pypkg}-distro
+BuildRequires: %{pypkg}-jinja2
+BuildRequires: %pypkg-mock
+BuildRequires: %{?fedora:%{pypkg}-}pytest
+BuildRequires: %{pypkg}-pytest-catchlog
+BuildRequires: %{?fedora:%{pypkg}-}PyYAML
+BuildRequires: %{pypkg}-setuptools
+BuildRequires: %{pypkg}-six
 
 Source0: https://pypi.org/packages/source/d/%name/%name-%version.tar.gz
 
+Patch0: 0001-Use-distro-module-instead-of-platform.patch
+
 %description
 Based on given template specification (configuration for template), template
 file and preexisting distribution metadata generate output file.
 
 
 %prep
-%setup -q
+%autosetup -p1
 
 
 %build
@@ -53,6 +64,9 @@ make PYTHON=%{pybin} check
 
 
 %changelog
+* Thu May 02 2019 Pavel Raiskup <praiskup@redhat.com> - 1.3-2
+- fix ftbfs on rawhide (rhbz#1705262)
+
 * Thu Mar 21 2019 Pavel Raiskup <praiskup@redhat.com> - 1.3-1
 - new upstream release, per release notes:
   https://github.com/devexp-db/distgen/releases/tag/v1.3

                 reply	other threads:[~2026-09-14 12:38 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=178938948537.1.343112865127920899.rpms-distgen-8a77972f9398@fedoraproject.org \
    --to=praiskup@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