-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix builds on EPELs due to outdated components
Some of the new functionalities that are present in Fedora and are needed for distgen to build using the refreshed build system are not present in EPEL. This means that we have to rollback some changes to allow build on EPEL. This shouldn't impact functionality of the application, but keeping it in the main repository would create mess in the codebase. For that reason the rollbacks are handled by patches in spec file.
- Loading branch information
1 parent
9db30b0
commit a4b4aa9
Showing
3 changed files
with
341 additions
and
9 deletions.
There are no files selected for viewing
182 changes: 182 additions & 0 deletions
182
rpm/BUILT-Fix-builds-on-EPEL8-due-to-outdated-components.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,182 @@ | ||
From b4b3faaad0c1d7a3665b0a0709342267f2dc63e7 Mon Sep 17 00:00:00 2001 | ||
From: Ales Nezbeda <anezbeda@redhat.com> | ||
Date: Tue, 17 Sep 2024 09:17:24 +0200 | ||
Subject: [PATCH] Fix builds on EPEL8 due to outdated components | ||
|
||
Some of the new functionalities that are present in Fedora and are | ||
needed for distgen to build using the refreshed build system are not | ||
present in EPEL8. | ||
|
||
This means that we have to rollback some changes to allow build on | ||
EPEL8. This shouldn't impact functionality of the application, but | ||
keeping it in the main repository would create mess in the codebase. | ||
It can also be unpredictable how will setuptools work with different | ||
config files, so it's better to just use one config. | ||
--- | ||
distgen/cli_parser.py | 2 +- | ||
pyproject.toml | 47 ------------------------------------------- | ||
setup.cfg | 42 +++++++++++++++++++++++++++++++++++++- | ||
setup.py | 31 ++++++++++++++++++++++++++++ | ||
4 files changed, 73 insertions(+), 49 deletions(-) | ||
delete mode 100644 pyproject.toml | ||
create mode 100644 setup.py | ||
|
||
diff --git a/distgen/cli_parser.py b/distgen/cli_parser.py | ||
index 676f1ac..3040239 100644 | ||
--- a/distgen/cli_parser.py | ||
+++ b/distgen/cli_parser.py | ||
@@ -2,7 +2,7 @@ | ||
|
||
from argparse import ArgumentParser, RawDescriptionHelpFormatter | ||
|
||
-from importlib.metadata import version, PackageNotFoundError | ||
+from importlib_metadata import version, PackageNotFoundError | ||
|
||
try: | ||
VERSION = version("distgen") | ||
diff --git a/pyproject.toml b/pyproject.toml | ||
deleted file mode 100644 | ||
index 28652c5..0000000 | ||
--- a/pyproject.toml | ||
+++ /dev/null | ||
@@ -1,47 +0,0 @@ | ||
-[build-system] | ||
-requires = ["argparse-manpage[setuptools]"] | ||
-build-backend = "setuptools.build_meta" | ||
-# requires = ["setuptools>=58.5.0"] | ||
-# build-backend = "setuptools.build_meta" | ||
- | ||
-[project] | ||
-name = "distgen" | ||
-version = "2.0" | ||
-dependencies = [ | ||
- "distro", | ||
- "jinja2", | ||
- "pyyaml", | ||
- "setuptools" | ||
-] | ||
-requires-python = ">=3.0" | ||
-authors = [ | ||
- {name = "Red Hat Databases team"}, | ||
-] | ||
-maintainers = [ | ||
- {name = "Ales Nezbeda", email = "anezbeda@redhat.com"} | ||
-] | ||
-description = "Templating system/generator for distributions" | ||
-readme = "README.md" | ||
-license = {file = "LICENSE"} | ||
-classifiers = [ | ||
- "Development Status :: 5 - Production/Stable", | ||
- "Programming Language :: Python :: 3", | ||
- "License :: OSI Approved :: GNU General Public License v2 or later (GPLv2+)" | ||
-] | ||
- | ||
-[tool.setuptools.cmdclass] | ||
-build_py = "build_manpages.build_py" | ||
-install = "build_manpages.install" | ||
-build_manpages = "build_manpages.build_manpages" | ||
- | ||
-[project.scripts] | ||
-dg = "distgen.__main__:main" | ||
- | ||
-[tool.setuptools.packages.find] | ||
-where = ["."] | ||
-include = ['distgen*'] | ||
- | ||
-[tool.build_manpages] | ||
-manpages = [ | ||
- "man/dg.1:object=parser:pyfile=distgen/cli_parser.py", | ||
-] | ||
diff --git a/setup.cfg b/setup.cfg | ||
index acd96a0..12ff987 100644 | ||
--- a/setup.cfg | ||
+++ b/setup.cfg | ||
@@ -1,8 +1,49 @@ | ||
+[metadata] | ||
+name = distgen | ||
+version = 2.0 | ||
+author = Red Hat Databases team | ||
+description = Templating system/generator for distributions | ||
+long_description = file: README.md | ||
+license = GPLv2+ | ||
+classifiers = | ||
+ Development Status :: 5 - Production/Stable | ||
+ Programming Language :: Python :: 3 | ||
+ License :: OSI Approved :: GNU General Public License v2 or later (GPLv2+) | ||
+ | ||
+[options] | ||
+include_package_data = True | ||
+packages = find: | ||
+python_requires = >=3.0 | ||
+install_requires = | ||
+ importlib-metadata | ||
+ distro | ||
+ jinja2 | ||
+ pyyaml | ||
+ setuptools | ||
+ | ||
+[options.package_data] | ||
+distgen = distconf/*.yaml, distconf/**/*.yaml, templates/*.tpl, templates/**/*.tpl, templates/**/**/*.tpl | ||
+ | ||
+[options.packages.find] | ||
+exclude = | ||
+ rpm* | ||
+ man* | ||
+ build_manpages* | ||
+ | ||
+[options.entry_points] | ||
+console_scripts = | ||
+ dg = distgen.__main__:main | ||
+ | ||
+[build_manpages] | ||
+manpages = | ||
+ man/dg.1:object=parser:pyfile=distgen/cli_parser.py | ||
+ | ||
[flake8] | ||
-ignore = | ||
- E402, | ||
- C0116 | ||
-max-complexity = 15 | ||
+ignore= | ||
+ # E402 module level import not at top of file | ||
+ E402, | ||
+ C0116 | ||
+max-complexity=15 | ||
|
||
[egg_info] | ||
tag_build = | ||
diff --git a/setup.py b/setup.py | ||
new file mode 100644 | ||
index 0000000..fe58d0a | ||
--- /dev/null | ||
+++ b/setup.py | ||
@@ -0,0 +1,26 @@ | ||
+import sys | ||
+ | ||
+from os import path, getcwd | ||
+from setuptools import setup | ||
+ | ||
+from setuptools.command.build_py import build_py | ||
+from setuptools.command.install import install | ||
+ | ||
+project = "distgen" | ||
+datadir = "share" | ||
+pkgdatadir = datadir + "/" + project | ||
+tpldir = pkgdatadir + "/templates" | ||
+distconfdir = pkgdatadir + "/distconf" | ||
+ | ||
+sys.path = [path.join(getcwd(), 'build_manpages')] + sys.path | ||
+from build_manpages.build_manpages import ( | ||
+ build_manpages, get_build_py_cmd, get_install_cmd) | ||
+ | ||
+setup( | ||
+ cmdclass={ | ||
+ 'build_manpages': build_manpages, | ||
+ 'build_py': get_build_py_cmd(build_py), | ||
+ 'install': get_install_cmd(install), | ||
+ }, | ||
+) | ||
+ | ||
-- | ||
2.46.0 | ||
|
100 changes: 100 additions & 0 deletions
100
rpm/BUILT-Fix-builds-on-EPEL9-due-to-outdated-components.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,100 @@ | ||
From 59ad66a9f1d94e8fc6ef0cf34293ca7cd8ced590 Mon Sep 17 00:00:00 2001 | ||
From: Ales Nezbeda <anezbeda@redhat.com> | ||
Date: Tue, 17 Sep 2024 09:17:24 +0200 | ||
Subject: [PATCH] Fix builds on EPEL9 due to outdated components | ||
|
||
Some of the new functionalities that are present in Fedora and are | ||
needed for distgen to build using the refreshed build system are not | ||
present in EPEL9. | ||
|
||
This means that we have to rollback some changes to allow build on | ||
EPEL9. This shouldn't impact functionality of the application, but | ||
keeping it in the main repository would create mess in the codebase. | ||
It can also be unpredictable how will setuptools work with different | ||
config files, so it's better to just use one config. | ||
--- | ||
setup.cfg | 36 ++++++++++++++++++++++++++++++++++++ | ||
setup.py | 22 ++++++++++++++++++++++ | ||
2 files changed, 58 insertions(+) | ||
create mode 100644 setup.py | ||
|
||
diff --git a/setup.cfg b/setup.cfg | ||
index acd96a0..3151c89 100644 | ||
--- a/setup.cfg | ||
+++ b/setup.cfg | ||
@@ -1,8 +1,45 @@ | ||
+[metadata] | ||
+name = distgen | ||
+version = 2.0 | ||
+author = Red Hat Databases team | ||
+description = Templating system/generator for distributions | ||
+long_description = file: README.md | ||
+license = GPLv2+ | ||
+classifiers = | ||
+ Development Status :: 5 - Production/Stable | ||
+ Programming Language :: Python :: 3 | ||
+ License :: OSI Approved :: GNU General Public License v2 or later (GPLv2+) | ||
+ | ||
+[options] | ||
+setup_requires = | ||
+ argparse-manpage[setuptools] | ||
+include_package_data = True | ||
+packages = find: | ||
+python_requires = >=3.0 | ||
+ | ||
+[options.package_data] | ||
+distgen = distconf/*.yaml, distconf/**/*.yaml, templates/*.tpl, templates/**/*.tpl, templates/**/**/*.tpl | ||
+ | ||
+[options.packages.find] | ||
+exclude = | ||
+ rpm* | ||
+ man* | ||
+ build_manpages* | ||
+ | ||
+[options.entry_points] | ||
+console_scripts = | ||
+ dg = distgen.__main__:main | ||
+ | ||
+[build_manpages] | ||
+manpages = | ||
+ man/dg.1:object=parser:pyfile=distgen/cli_parser.py | ||
+ | ||
[flake8] | ||
-ignore = | ||
- E402, | ||
- C0116 | ||
-max-complexity = 15 | ||
+ignore= | ||
+ # E402 module level import not at top of file | ||
+ E402, | ||
+ C0116 | ||
+max-complexity=15 | ||
|
||
[egg_info] | ||
tag_build = | ||
diff --git a/setup.py b/setup.py | ||
new file mode 100644 | ||
index 0000000..ac2b9de | ||
--- /dev/null | ||
+++ b/setup.py | ||
@@ -0,0 +1,17 @@ | ||
+from setuptools import setup | ||
+ | ||
+from setuptools.command.build_py import build_py | ||
+from setuptools.command.install import install | ||
+ | ||
+from build_manpages.build_manpages import build_manpages | ||
+from build_manpages import get_build_py_cmd | ||
+from build_manpages import get_install_cmd | ||
+ | ||
+setup( | ||
+ cmdclass={ | ||
+ 'build_manpages': build_manpages, | ||
+ 'build_py': get_build_py_cmd(build_py), | ||
+ 'install': get_install_cmd(install), | ||
+ }, | ||
+) | ||
+ | ||
-- | ||
2.46.0 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters