Skip to content

Commit

Permalink
Fixup Fedora spec files
Browse files Browse the repository at this point in the history
Signed-off-by: Christopher M. Cantalupo <christopher.m.cantalupo@intel.com>
  • Loading branch information
cmcantalupo committed Jun 26, 2024
1 parent 412055b commit aecf6dd
Show file tree
Hide file tree
Showing 4 changed files with 60 additions and 6 deletions.
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
From 91d20b03954f41c05076e11b0d8feafafdc9abe1 Mon Sep 17 00:00:00 2001
From 2d73b8030ae787fe925b1859a81ac12b4d09192a Mon Sep 17 00:00:00 2001
From: "Christopher M. Cantalupo" <christopher.m.cantalupo@intel.com>
Date: Mon, 24 Jun 2024 09:34:51 -0700
Subject: [PATCH 1/2] Changes required for building from git archive
Subject: [PATCH 1/3] Changes required for building from git archive

- Provide options to avoid other downloads

Expand Down Expand Up @@ -266,5 +266,5 @@ index 6c03d08a3..611976fca 100644
AM_CPPFLAGS += -I$(googlemock)/include
BUILT_SOURCES += $(googletest_suite)/VERSION
--
2.26.2
2.34.1

6 changes: 3 additions & 3 deletions release/fedora/0002-Fixup-TestActiveSessions-assertion.patch
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
From a7f2e72aae1e890a4fc6c29844b198871962fdaf Mon Sep 17 00:00:00 2001
From 50e1f6b78e821d072bddad016e80e5e58d7ea245 Mon Sep 17 00:00:00 2001
From: Christopher Cantalupo <christopher.m.cantalupo@intel.com>
Date: Fri, 21 Jun 2024 15:34:20 -0700
Subject: [PATCH 2/2] Fixup TestActiveSessions assertion
Subject: [PATCH 2/3] Fixup TestActiveSessions assertion

Signed-off-by: Christopher Cantalupo <christopher.m.cantalupo@intel.com>
---
Expand All @@ -22,5 +22,5 @@ index 79befcc91..02525b308 100755
mock_pid_valid.assert_called_once_with(contents['client_pid'], session_mock.st_ctime)
mock_smf.assert_called_once_with(full_file_path, string_contents)
--
2.26.2
2.34.1

Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
From e6178b650da9b76686b294939dcee859479487d7 Mon Sep 17 00:00:00 2001
From: "Christopher M. Cantalupo" <christopher.m.cantalupo@intel.com>
Date: Tue, 25 Jun 2024 18:04:56 -0700
Subject: [PATCH 3/3] Fix import error handling for setuptools_scm

Signed-off-by: Christopher M. Cantalupo <christopher.m.cantalupo@intel.com>
---
geopmdpy/setup.py | 2 +-
geopmpy/setup.py | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/geopmdpy/setup.py b/geopmdpy/setup.py
index e2e090e52..d4cacfd27 100644
--- a/geopmdpy/setup.py
+++ b/geopmdpy/setup.py
@@ -8,9 +8,9 @@ import os

package_name = 'geopmdpy'

+script_dir = os.path.dirname(os.path.realpath(__file__))
try:
from setuptools_scm import get_version
- script_dir = os.path.dirname(os.path.realpath(__file__))
version = get_version(f'{script_dir}/..')
with open(f'{script_dir}/{package_name}/VERSION', 'w') as fid:
fid.write(version)
diff --git a/geopmpy/setup.py b/geopmpy/setup.py
index 719ab1405..095276d56 100644
--- a/geopmpy/setup.py
+++ b/geopmpy/setup.py
@@ -8,9 +8,9 @@ import os

package_name = 'geopmpy'

+script_dir = os.path.dirname(os.path.realpath(__file__))
try:
from setuptools_scm import get_version
- script_dir = os.path.dirname(os.path.realpath(__file__))
version = get_version(f'{script_dir}/..')
with open(f'{script_dir}/{package_name}/VERSION', 'w') as fid:
fid.write(version)
--
2.34.1

10 changes: 10 additions & 0 deletions release/fedora/geopmdpy.spec
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,20 @@ URL: https://geopm.github.io
Source0: https://github.com/geopm/geopm/archive/v3.1.0/geopm-3.1.0.tar.gz
Patch0: 0001-Changes-required-for-building-from-git-archive.patch
Patch1: 0002-Fixup-TestActiveSessions-assertion.patch
Patch2: 0003-Fix-import-error-handling-for-setuptools_scm.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
BuildRequires: python3-devel
BuildRequires: python3-setuptools
BuildRequires: python-rpm-macros
BuildRequires: marshalparser

# Packages required to run tests
BuildRequires: python3-dasbus >= 1.6
BuildRequires: python3-jsonschema
BuildRequires: python3-psutil
BuildRequires: python3-cffi
BuildRequires: libgeopmd2

%global debug_package %{nil}

%define python_bin %{__python3}
Expand Down Expand Up @@ -49,6 +58,7 @@ configuring the service.
%setup -n geopm-%{version}
%patch -P0 -p1
%patch -P1 -p1
%patch -P2 -p1
cd geopmdpy
echo %{version} > geopmdpy/VERSION

Expand Down

0 comments on commit aecf6dd

Please sign in to comment.