Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 14 additions & 9 deletions .github/workflows/packaging.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,6 @@ jobs:
- name: Install setuptools-scm
run: pip install setuptools-scm

- name: Generate RPM spec file
run: python generate_spec.py

- name: Get version from spec
id: version
run: |
Expand Down Expand Up @@ -86,10 +83,14 @@ jobs:
# Setup RPM build tree
mkdir -p ~/rpmbuild/{BUILD,RPMS,SOURCES,SPECS,SRPMS}

# Copy source tarball to SOURCES (renamed to match spec version)
cp "dist/cvmfsutils-${VERSION}.tar.gz" ~/rpmbuild/SOURCES/
# Rename source paths and make source tarball in SOURCES
cd dist
tar xzf cvmfsutils-${VERSION}.tar.gz
mv cvmfsutils-${VERSION} python-cvmfsutils-${VERSION}
tar czf ~/rpmbuild/SOURCES/python-cvmfsutils-${VERSION}.tar.gz python-cvmfsutils-${VERSION}
cd ..

# Copy spec file to SPECS (now includes version, no macros needed)
# Copy spec file to SPECS
cp rpm/python-cvmfsutils.spec ~/rpmbuild/SPECS/

# Build the RPM (no version macro needed since it's in the spec file)
Expand Down Expand Up @@ -190,10 +191,14 @@ jobs:
# Setup RPM build tree
mkdir -p ~/rpmbuild/{BUILD,RPMS,SOURCES,SPECS,SRPMS}

# Copy source tarball to SOURCES (renamed to match spec version)
cp "dist/cvmfsutils-${VERSION}.tar.gz" ~/rpmbuild/SOURCES/
# Rename source paths and make source tarball in SOURCES
cd dist
tar xzf cvmfsutils-${VERSION}.tar.gz
mv cvmfsutils-${VERSION} python-cvmfsutils-${VERSION}
tar czf ~/rpmbuild/SOURCES/python-cvmfsutils-${VERSION}.tar.gz python-cvmfsutils-${VERSION}
cd ..

# Copy spec file to SPECS (already has version embedded)
# Copy spec file to SPECS
cp rpm/python-cvmfsutils.spec ~/rpmbuild/SPECS/

# Build the RPM (set topdir since SUSE defaults to /usr/src/packages)
Expand Down
10 changes: 0 additions & 10 deletions .github/workflows/version-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,13 +33,3 @@ jobs:
diff /tmp/checked-in.spec rpm/python-cvmfsutils.spec || true
exit 1
fi

- name: Verify spec file has no external macros
run: |
# Check that the spec file doesn't use %{version} macro
if grep -q "%{version}" rpm/python-cvmfsutils.spec; then
echo "✗ Spec file still contains %{version} macro - should be replaced with actual version"
exit 1
else
echo "✓ Spec file does not use external version macro"
fi
6 changes: 3 additions & 3 deletions rpm/python-cvmfsutils.spec
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Summary: Inspect CernVM-FS repositories
Name: python-cvmfsutils
Version: 0.6.0
Release: %{release_prefix}%{?dist}
Source0: cvmfsutils-0.6.0.tar.gz
Source0: %{name}-0.6.0.tar.gz
License: (c) 2015 CERN - BSD License
Group: Development/Libraries
BuildRoot: %{_tmppath}/%{name}-0.6.0-%{release}-buildroot
Expand All @@ -31,13 +31,13 @@ files) and the history of named snapshots inside any CernVM-FS repository.

%prep
#%%setup -n %{name}-0.6.0 -n %{name}-0.6.0
%autosetup -n cvmfsutils-0.6.0
%autosetup -n %{name}-0.6.0

%build
# No build step needed - pip install handles everything

%install
python3 -m pip install --no-deps --root=%{buildroot} %{_sourcedir}/cvmfsutils-0.6.0.tar.gz
SETUPTOOLS_SCM_PRETEND_VERSION=0.6.0 python3 -m pip install --no-deps -v --root=%{buildroot} %{_sourcedir}/%{name}-0.6.0.tar.gz

%clean
rm -rf $RPM_BUILD_ROOT
Expand Down
6 changes: 3 additions & 3 deletions rpm/python-cvmfsutils.spec.in
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Summary: Inspect CernVM-FS repositories
Name: python-cvmfsutils
Version: @VERSION@
Release: %{release_prefix}%{?dist}
Source0: cvmfsutils-@VERSION@.tar.gz
Source0: %{name}-@VERSION@.tar.gz
License: (c) 2015 CERN - BSD License
Group: Development/Libraries
BuildRoot: %{_tmppath}/%{name}-@VERSION@-%{release}-buildroot
Expand All @@ -31,13 +31,13 @@ files) and the history of named snapshots inside any CernVM-FS repository.

%prep
#%%setup -n %{name}-@VERSION@ -n %{name}-@VERSION@
%autosetup -n cvmfsutils-@VERSION@
%autosetup -n %{name}-@VERSION@

%build
# No build step needed - pip install handles everything

%install
python3 -m pip install --no-deps --root=%{buildroot} %{_sourcedir}/cvmfsutils-@VERSION@.tar.gz
SETUPTOOLS_SCM_PRETEND_VERSION=@VERSION@ python3 -m pip install --no-deps -v --root=%{buildroot} %{_sourcedir}/%{name}-@VERSION@.tar.gz

%clean
rm -rf $RPM_BUILD_ROOT
Expand Down
3 changes: 1 addition & 2 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name = cvmfsutils
description = Inspect CernVM-FS repositories
long_description = file: README.md
long_description_content_type = text/markdown
license = (c) 2015 CERN - BSD License
license = BSD
author = Rene Meusel
author_email = rene.meusel@cern.ch
url = http://cernvm.cern.ch
Expand All @@ -12,7 +12,6 @@ classifiers =
Environment :: Console
Intended Audience :: Developers
Intended Audience :: System Administrators
License :: OSI Approved :: BSD License
Natural Language :: English
Operating System :: POSIX :: Linux
Operating System :: MacOS :: MacOS X
Expand Down
Loading