summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCoprDistGit <infra@openeuler.org>2025-02-18 12:58:28 +0000
committerCoprDistGit <infra@openeuler.org>2025-02-18 12:58:28 +0000
commitc504470c82b3fbdef7d4db5f89be47c83c88ed8d (patch)
tree59cdb01985853b7b3f499a020855e3a6b5c1d9e0
parent2401a1eb85bdf59ca255e0c92acdc365c1db8fe5 (diff)
automatic import of modulemd-tools
-rw-r--r--.gitignore1
-rw-r--r--0001-createrepo_mod-fix-failing-tests-on-F39-because-of-n.patch29
-rw-r--r--modulemd-tools.spec126
-rw-r--r--sources2
4 files changed, 43 insertions, 115 deletions
diff --git a/.gitignore b/.gitignore
index 98f8d55..1e0a85b 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1 +1,2 @@
/modulemd-tools-0.13-1.tar.gz
+/modulemd-tools-0.16.tar.gz
diff --git a/0001-createrepo_mod-fix-failing-tests-on-F39-because-of-n.patch b/0001-createrepo_mod-fix-failing-tests-on-F39-because-of-n.patch
new file mode 100644
index 0000000..389d86d
--- /dev/null
+++ b/0001-createrepo_mod-fix-failing-tests-on-F39-because-of-n.patch
@@ -0,0 +1,29 @@
+From d35e773d64a0b00b0f1bbf97cd9bf7eed75a9d30 Mon Sep 17 00:00:00 2001
+From: Jakub Kadlcik <frostyx@email.cz>
+Date: Wed, 1 Nov 2023 10:11:01 +0100
+Subject: [PATCH] createrepo_mod: fix failing tests on F39+ because of new
+ compresssion
+
+Fix RHBZ 2247292
+
+On F39+ we use `zst` instead of `gz`
+https://fedoraproject.org/wiki/Changes/createrepo_c_1.0.0
+---
+ tests/test_createrepo_mod/test_createrepo_mod.py | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/tests/test_createrepo_mod/test_createrepo_mod.py b/tests/test_createrepo_mod/test_createrepo_mod.py
+index a38eaea..0d93f49 100644
+--- a/tests/test_createrepo_mod/test_createrepo_mod.py
++++ b/tests/test_createrepo_mod/test_createrepo_mod.py
+@@ -48,6 +48,6 @@ def test_run_modifyrepo(test_output_dir):
+ os.path.join(test_output_dir, "modules.yaml"))
+
+ assert os.path.isfile(os.path.join(test_output_dir, "modules.yaml"))
+- retval = run_modifyrepo(test_output_dir)
++ retval = run_modifyrepo(test_output_dir, compress_type="gz")
+ assert glob.glob(os.path.join(test_output_dir, "repodata", "*-modules.yaml.gz"))
+ assert retval == 0
+--
+2.41.0
+
diff --git a/modulemd-tools.spec b/modulemd-tools.spec
index c03f0aa..6dc0598 100644
--- a/modulemd-tools.spec
+++ b/modulemd-tools.spec
@@ -1,26 +1,16 @@
Name: modulemd-tools
-Version: 0.13
+Version: 0.16
Release: 1
-Summary: Collection of tools for parsing and generating modulemd YAML files
+Summary: Collection of tools for modular (in terms of Fedora Modularity origin) content creators
License: MIT
BuildArch: noarch
-%global release_name %{name}-%{version}-1
-%global python3 %{__python3}
-# This is intended for Python 3 only, hence also no Python version in the name.
-%global __pytest /usr/bin/pytest%(test %{python3_pkgversion} == 3 || echo -%{python3_version})
-%global pytest %{expand:\\\
- CFLAGS="${CFLAGS:-${RPM_OPT_FLAGS}}" LDFLAGS="${LDFLAGS:-${RPM_LD_FLAGS}}"\\\
- PATH="%{buildroot}%{_bindir}:$PATH"\\\
- PYTHONPATH="${PYTHONPATH:-%{buildroot}%{python3_sitearch}:%{buildroot}%{python3_sitelib}}"\\\
- PYTHONDONTWRITEBYTECODE=1\\\
- %{?__pytest_addopts:PYTEST_ADDOPTS="${PYTEST_ADDOPTS:-} %{__pytest_addopts}"}\\\
- %__pytest}
-
URL: https://github.com/rpm-software-management/modulemd-tools
-Source0: %{url}/archive/%{release_name}.tar.gz
+Source0: https://github.com/rpm-software-management/modulemd-tools/archive/%{version}/%{name}-%{version}.tar.gz
+Patch0: 0001-createrepo_mod-fix-failing-tests-on-F39-because-of-n.patch
BuildRequires: createrepo_c
+BuildRequires: argparse-manpage
BuildRequires: python3-devel
BuildRequires: python3-pip
BuildRequires: python3-setuptools
@@ -31,7 +21,6 @@ BuildRequires: python3-hawkey
BuildRequires: python3-createrepo_c
BuildRequires: python3-pyyaml
BuildRequires: python3-pytest
-BuildRequires: python3-argparse-manpage
BuildRequires: python3-koji
Requires: createrepo_c
@@ -71,125 +60,34 @@ bld2repo - Simple tool for dowloading build required RPMs of a modular build fro
%prep
-%setup -q -n %{name}-%{release_name}
+%setup -q
+%patch 0 -p1
%build
-cd repo2module
-%py3_build
-cd ..
-
-cd dir2module
-%py3_build
-cd ..
-
-cd createrepo_mod
%py3_build
-cd ..
-cd modulemd-add-platform
-%py3_build
-cd ..
-
-cd modulemd-merge
-%py3_build
-cd ..
-
-cd modulemd_tools
-%py3_build
-cd ..
-
-cd bld2repo
-%py3_build
-cd ..
-
-PYTHONPATH=./modulemd_tools:./bld2repo ./man/generate-manpages.sh
+PYTHONPATH=: ./man/generate-manpages.sh
%install
-cd repo2module
-%py3_install
-cd ..
-
-cd dir2module
-%py3_install
-cd ..
-
-cd createrepo_mod
-%py3_install
-cd ..
-
-cd modulemd-add-platform
%py3_install
-cd ..
-
-cd modulemd-merge
-%py3_install
-cd ..
-
-cd modulemd_tools
-%py3_install
-cd ..
-
-cd bld2repo
-%py3_install
-cd ..
-
-cp modulemd-generate-macros/modulemd-generate-macros.py \
- %{buildroot}%{_bindir}/modulemd-generate-macros
install -d %{buildroot}%{_mandir}/man1
cp man/*.1 %{buildroot}%{_mandir}/man1/
%check
-export PATH=%{buildroot}%{_bindir}:$PATH
-
-cd repo2module
%{python3} -m pytest -vv
-cd ..
-cd dir2module
-%{python3} -m pytest -vv
-cd ..
-
-cd createrepo_mod
-%{python3} -m pytest -vv
-cd ..
-
-cd modulemd-add-platform
-%pytest
-cd ..
-
-cd modulemd-merge
-%{python3} -m pytest -vv -s
-cd ..
-
-cd modulemd_tools
-%{python3} -m pytest -vv
-cd ..
-
-cd bld2repo
-%{python3} -m pytest -vv
-cd ..
%files
%doc README.md
%license LICENSE
-%{python3_sitelib}/repo2module
-%{python3_sitelib}/repo2module-*.egg-info/
-%{python3_sitelib}/dir2module
-%{python3_sitelib}/dir2module-*.egg-info/
-%{python3_sitelib}/createrepo_mod
-%{python3_sitelib}/createrepo_mod-*.egg-info/
-%{python3_sitelib}/modulemd_merge
-%{python3_sitelib}/modulemd_merge-*.egg-info/
+
%{python3_sitelib}/modulemd_tools
%{python3_sitelib}/modulemd_tools-*.egg-info/
-%{python3_sitelib}/bld2repo
-%{python3_sitelib}/bld2repo-*.egg-info/
-%{python3_sitelib}/modulemd_add_platform
-%{python3_sitelib}/modulemd_add_platform-*.egg-info/
+
%{_bindir}/repo2module
%{_bindir}/dir2module
%{_bindir}/createrepo_mod
@@ -208,5 +106,5 @@ cd ..
%changelog
-* Thu Mar 23 2023 lichaoran <pkwarcraft@hotmail.com> - 0.13-1
-- Initial package
+* Tue Feb 18 2025 mywaaagh_admin <pkwarcraft@hotmail.com> - 0.16-1
+- Init package
diff --git a/sources b/sources
index c905cdb..4f4f2e3 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-32acf804c9b33ccb942b1106c84d517c modulemd-tools-0.13-1.tar.gz
+ca9183c6607631e4c3d804d562e5883e modulemd-tools-0.16.tar.gz