From 82244eec6709701d49932c8848f3f308c33c597a Mon Sep 17 00:00:00 2001 From: Jean-Paul Chaput Date: Thu, 3 Oct 2024 14:59:29 +0200 Subject: [PATCH] Append the git hash number ot the release tag in spec package. --- packaging/coriolis-eda.spec | 8 +++++--- packaging/mkArchives.sh | 5 ++++- packaging/patchvenv.sh | 1 + 3 files changed, 10 insertions(+), 4 deletions(-) diff --git a/packaging/coriolis-eda.spec b/packaging/coriolis-eda.spec index 0a965762e..4bc0acf1e 100644 --- a/packaging/coriolis-eda.spec +++ b/packaging/coriolis-eda.spec @@ -73,6 +73,8 @@ BuildRequires: %{python_module setuptools} # ALmaLinux 8 %if 0%{?rhel} == 8 +%global python3_sitearch /usr/lib64/python3.11/site-packages + BuildRequires: python3.11-devel %endif @@ -154,15 +156,15 @@ Warning: This package is only a stub for now. cp $RPM_SOURCE_DIR/patchvenv.sh $RPM_SOURCE_DIR/find_files.sh . chmod u+x patchvenv.sh find_files.sh . patchVEnvArgs="--use-system-packages" - if [ \( 0%{?fedora} -ge 39 \) - -o\( 0%{?rhel} -eq 8 \) + if [ \( 0%{?fedora} -ge 39 \) \ + -o \( 0%{?rhel} -eq 8 \) \ -o \( 0%{?suse_version}%{?sle_version} -ne 0 \) ]; then patchVEnvArgs="${patchVEnvArgs} --remove-venv-watchfiles" fi ./patchvenv.sh ${patchVEnvArgs} make PREFIX=%{_prefix} -f Makefile.LIP6 help install - if [ \( 0%{?sle_version} -eq 150600 \) -a \( 0%{?is_opensuse} -ne 0 \) ]; then + if [ \( 0%{?sle_version} -eq 150600 \) -o \( 0%{?rhel} -eq 8 \) ]; then %{__mkdir_p} %{buildroot}%{_datadir}/doc pushd %{buildroot}%{_datadir}/doc tar zxf %{SOURCE10} diff --git a/packaging/mkArchives.sh b/packaging/mkArchives.sh index e3ecc3dee..98dade6a4 100755 --- a/packaging/mkArchives.sh +++ b/packaging/mkArchives.sh @@ -23,7 +23,8 @@ } if [ $# -eq 0 ]; then printHelp; fi - + + githash=`git log -1 --pretty=format:%h` doSources="false" doDocs="false" doVEnv="false" @@ -49,6 +50,7 @@ fi echo "Running mkArchives.sh" + echo "* Using HEAD githash as release: ${githash}." if [ "${doSources}" = "true" ]; then echo "* Making source file archive from Git HEAD ..." ./packaging/git-archive-all.sh -v --prefix coriolis-eda-2.5.5/ --format tar.gz coriolis-eda-${version}.tar.gz @@ -87,6 +89,7 @@ fi done + sed -i "s,^Release: *1,Release: ..${githash}," ${obsDir}/coriolis-eda.spec if [ "${doCommit}" = "true" ]; then pushd ${obsDir} osc commit diff --git a/packaging/patchvenv.sh b/packaging/patchvenv.sh index b6a0fd343..9cf892830 100755 --- a/packaging/patchvenv.sh +++ b/packaging/patchvenv.sh @@ -62,6 +62,7 @@ ls -al /usr/bin/python* if [ -f .venv/bin/pdm ]; then touch .venv/bin/pdm; fi + if [ -f .venv/bin/meson ]; then touch .venv/bin/meson; fi if [ -f .venv/bin/pelican ]; then touch .venv/bin/pelican; fi exit 0