public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [rpms/distgen] epel10: fix FTBFS on rawhide
@ 2026-09-14 11:57 Pavel Raiskup
  0 siblings, 0 replies; only message in thread
From: Pavel Raiskup @ 2026-09-14 11:57 UTC (permalink / raw)
  To: git-commits

            A new commit has been pushed.

            Repo   : rpms/distgen
            Branch : epel10
            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

            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

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2026-09-14 11:57 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-09-14 11:57 [rpms/distgen] epel10: fix FTBFS on rawhide Pavel Raiskup

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox