Compare commits

..

No commits in common. "3340df2434cc6e75ddf30a8f1ad578ce2bd7ce8f" and "7e94419d1b015acf365ed89983c2468f0f9d0aee" have entirely different histories.

4 changed files with 101 additions and 64 deletions

BIN
createrepo_c-0.16.0.tar.gz Normal file

Binary file not shown.

Binary file not shown.

View File

@ -1,29 +0,0 @@
From d30fe3b606fcc5052665c7e00d20fe4374ac4ada Mon Sep 17 00:00:00 2001
From: wzx <wuzx1226@qq.com>
Date: Fri, 28 Oct 2022 14:57:55 +0800
Subject: [PATCH] Add sw64 architecture
Add sw64 architecture in file src/mergerepo_c.c to support sw64 architecture.
Signed-off-by: wzx <wuzx1226@qq.com>
---
src/mergerepo_c.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/src/mergerepo_c.c b/src/mergerepo_c.c
index fa26879..bb65a18 100644
--- a/src/mergerepo_c.c
+++ b/src/mergerepo_c.c
@@ -180,6 +180,9 @@ append_arch(GSList *list, gchar *arch, gboolean expand)
list = append_arch(list, "alphaev67", FALSE);
list = append_arch(list, "alphaev68", FALSE);
list = append_arch(list, "alphaev7", FALSE);
+ } else if (!g_strcmp0(arch, "sw_64")) {
+ list = append_arch(list, "sw_64", FALSE);
+ list = append_arch(list, "sw_64sw6b", FALSE);
} else if (!g_strcmp0(arch, "armhfp")) {
list = append_arch(list, "armv7hl", FALSE);
list = append_arch(list, "armv7hnl", FALSE);
--
2.33.0

View File

@ -18,6 +18,12 @@
%bcond_without drpm
%endif
%if 0%{?openEuler} || 0%{?fedora} > 29 || 0%{?rhel} > 7
%bcond_with python2
%else
%bcond_without python2
%endif
%if 0%{?openEuler} || 0%{?rhel} || 0%{?fedora} < 29
%bcond_with zchunk
%else
@ -32,12 +38,11 @@
Summary: Creates a common metadata repository
Name: createrepo_c
Version: 0.17.6
Release: 3
Version: 0.16.0
Release: 1
License: GPLv2+
URL: https://github.com/rpm-software-management/createrepo_c
Source0: %{url}/archive/%{version}/%{name}-%{version}.tar.gz
Patch1: createrepo_c-Add-sw64-architecture.patch
BuildRequires: cmake
BuildRequires: gcc
@ -76,7 +81,7 @@ Obsoletes: createrepo < 0.11.0
Provides: createrepo = %{version}-%{release}
%endif
Provides: %{name}-libs = %{version}-%{release} %{name}-libs%{?_isa} = %{version}-%{release}
Obsoletes: %{name}-libs < %{version}-%{release}
Obsoletes: %{name}-libs
%description
C implementation of Createrepo.
@ -94,11 +99,30 @@ These development files are for easy manipulation with a repodata.
%package_help
%if %{with python2}
%package -n python2-%{name}
Summary: Python bindings for the createrepo_c library
%{?python_provide:%python_provide python2-%{name}}
BuildRequires: python2-devel
BuildRequires: python2-nose
%if 0%{?openEuler} == 0 && 0%{?rhel} && 0%{?rhel} <= 7
BuildRequires: python-sphinx
%else
BuildRequires: python2-sphinx
%endif
Requires: %{name}-libs = %{version}-%{release}
Provides: python-%{name}%{?_isa} = %{version}-%{release}
%description -n python2-%{name}
Python bindings for the createrepo_c library.
%endif
%if %{with python3}
%package -n python3-%{name}
Summary: Python 3 bindings for the createrepo_c library
%{?python_provide:%python_provide python3-%{name}}
BuildRequires: python3-devel
BuildRequires: python3-nose
BuildRequires: python3-sphinx
Requires: createrepo_c
@ -109,27 +133,75 @@ Python 3 bindings for the createrepo_c library.
%prep
%autosetup -p1
%if %{with python2}
mkdir build-py2
%endif
%if %{with python3}
mkdir build-py3
%endif
%build
# Build createrepo_c with Python 2
%if %{with python2}
pushd build-py2
%cmake .. -DPYTHON_DESIRED:FILEPATH=%{__python2} %{!?with_zchunk:-DWITH_ZCHUNK=OFF} %{!?with_libmodulemd:-DWITH_LIBMODULEMD=OFF}
make %{?_smp_mflags} RPM_OPT_FLAGS="%{optflags}"
%if %{without python3}
# Build C documentation
make doc-c
%endif
popd
%endif
# Build createrepo_c with Pyhon 3
%cmake -DPYTHON_DESIRED:FILEPATH=%{__python3} %{!?with_zchunk:-DWITH_ZCHUNK=OFF} %{!?with_libmodulemd:-DWITH_LIBMODULEMD=OFF} -DENABLE_DRPM=%{with_drpm:ON}%{!?with_drpm:OFF}
make %{?_smp_mflags} RPM_OPT_FLAGS="%{optflags}"
# Build C documentation
make doc-c
%if %{with python3}
pushd build-py3
%cmake .. -DPYTHON_DESIRED:FILEPATH=%{__python3} %{!?with_zchunk:-DWITH_ZCHUNK=OFF} %{!?with_libmodulemd:-DWITH_LIBMODULEMD=OFF}
make %{?_smp_mflags} RPM_OPT_FLAGS="%{optflags}"
# Build C documentation
make doc-c
popd
%endif
%check
# Run Python 3 tests
%if %{with python3}
# Compile C tests
make tests
%if 0%{?openEuler} == 0 && %{with python2}
pushd build-py2
%if %{without python3}
# Compile C tests
make tests
%endif
# Run Python 2 tests
make ARGS="-V" test
popd
%endif
# Run Python 3 tests
make ARGS="-V" test
%if %{with python3}
pushd build-py3
# Compile C tests
make tests
# Run Python 3 tests
make ARGS="-V" test
popd
%endif
%install
# Install createrepo_c with Python 3
make install DESTDIR=%{buildroot}
%if %{with python2}
pushd build-py2
# Install createrepo_c with Python 2
make install DESTDIR=%{buildroot}
popd
%endif
%if %{with python3}
pushd build-py3
# Install createrepo_c with Python 3
make install DESTDIR=%{buildroot}
popd
%endif
%if 0%{?openEuler} || 0%{?fedora} || 0%{?rhel} > 7
ln -sr %{buildroot}%{_bindir}/createrepo_c %{buildroot}%{_bindir}/createrepo
@ -138,10 +210,10 @@ ln -sr %{buildroot}%{_bindir}/modifyrepo_c %{buildroot}%{_bindir}/modifyrepo
%endif
%if 0%{?openEuler} == 0 && 0%{?rhel} && 0%{?rhel} <= 7
%post -p /sbin/ldconfig
%postun -p /sbin/ldconfig
%post libs -p /sbin/ldconfig
%postun libs -p /sbin/ldconfig
%else
%ldconfig_scriptlets
%ldconfig_scriptlets libs
%endif
%files
@ -166,12 +238,22 @@ ln -sr %{buildroot}%{_bindir}/modifyrepo_c %{buildroot}%{_bindir}/modifyrepo
%{_includedir}/%{name}/
%files help
%doc doc/html
%if %{with python3}
%doc build-py3/doc/html
%else
%doc build-py2/doc/html
%endif
%{_mandir}/man8/createrepo_c.8*
%{_mandir}/man8/mergerepo_c.8*
%{_mandir}/man8/modifyrepo_c.8*
%{_mandir}/man8/sqliterepo_c.8*
%if %{with python2}
%files -n python2-%{name}
%{python2_sitearch}/%{name}/
%{python2_sitearch}/%{name}-%{version}-py%{python2_version}.egg-info
%endif
%if %{with python3}
%files -n python3-%{name}
%{python3_sitearch}/%{name}/
@ -179,22 +261,6 @@ ln -sr %{buildroot}%{_bindir}/modifyrepo_c %{buildroot}%{_bindir}/modifyrepo
%endif
%changelog
* Mon Nov 14 2022 wuzx<wuzx1226@qq.com> - 0.17.6-3
- Add sw64 architecture
* Sat Oct 22 2022 yanglongkang <yanglongkang@h-partners.com> - 0.17.6-2
- add the dynamic library file in the rpm package to the ldconfig management
fix rpmbuild warning
* Fri Dec 17 2021 yangzhuangzhuang <yangzhuangzhuang1@huawei.com> - 0.17.6-1
- update version to 0.17.6
* Thu Jan 21 2021 yangzhuangzhuang <yangzhuangzhuang1@huawei.com> - 0.16.2-1
- update 0.16.2
* Sat Jul 25 2020 Liquor <lirui130@huawei.com> - 0.16.0-2
- remove python2
* Sat Jul 25 2020 Liquor <lirui130@huawei.com> - 0.16.0-1
- update 0.16.0