summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCoprDistGit <infra@openeuler.org>2025-02-17 09:06:42 +0000
committerCoprDistGit <infra@openeuler.org>2025-02-17 09:06:42 +0000
commita53bafe9e746e9f794956e1c9df074b6e230d33b (patch)
tree164f2e609c51452e416de544bf9a71727079cd50
parent28e1153e545527d4e1378f288172ddc3a2c563d9 (diff)
automatic import of prunerepo
-rw-r--r--.gitignore1
-rw-r--r--prunerepo.spec66
-rw-r--r--sources1
3 files changed, 68 insertions, 0 deletions
diff --git a/.gitignore b/.gitignore
index e69de29..ff6ff73 100644
--- a/.gitignore
+++ b/.gitignore
@@ -0,0 +1 @@
+/prunerepo-1.21.tar.gz
diff --git a/prunerepo.spec b/prunerepo.spec
new file mode 100644
index 0000000..7a66691
--- /dev/null
+++ b/prunerepo.spec
@@ -0,0 +1,66 @@
+Name: prunerepo
+Version: 1.21
+Summary: Remove old packages from rpm-md repository
+Release: 1
+Url: https://pagure.io/prunerepo
+
+Source0: %name-%version.tar.gz
+
+License: GPLv2+
+BuildArch: noarch
+BuildRequires: bash
+BuildRequires: python3-devel
+BuildRequires: python3-setuptools
+BuildRequires: python3-rpm
+BuildRequires: createrepo_c
+BuildRequires: asciidoc
+BuildRequires: findutils
+BuildRequires: dnf
+BuildRequires: dnf-plugins-core
+BuildRequires: coreutils
+Requires: createrepo_c
+Requires: dnf-plugins-core
+Requires: python3-rpm
+Requires: python3
+
+%description
+RPM packages that have newer version available in that same
+repository are deleted from filesystem and the rpm-md metadata are
+recreated afterwards. If there is a source rpm for a deleted rpm
+(and they both share the same directory path), then the source rpm
+will be deleted as well.
+
+Support for specific repository structure (e.g. COPR) is also available
+making it possible to additionally remove build logs and whole build
+directories associated with a package.
+
+After deletion of obsoleted packages, the command
+"createrepo_c --database --update" is called
+to recreate the repository metadata.
+
+%prep
+%setup -q
+
+%check
+tests/run.sh
+
+%build
+name="%{name}" version="%{version}" summary="%{summary}" %py3_build
+a2x -d manpage -f manpage man/prunerepo.1.asciidoc
+
+%install
+name="%{name}" version="%{version}" summary="%{summary}" %py3_install
+
+install -d %{buildroot}%{_mandir}/man1
+install -p -m 644 man/prunerepo.1 %{buildroot}/%{_mandir}/man1/
+
+%files
+%license LICENSE
+
+%{python3_sitelib}/*
+%{_bindir}/prunerepo
+%{_mandir}/man1/prunerepo.1*
+
+%changelog
+* Sun Jun 25 2023 lichaoran <pkwarcraft@hotmail.com> 1.21-1
+- Initial package version
diff --git a/sources b/sources
new file mode 100644
index 0000000..2894dde
--- /dev/null
+++ b/sources
@@ -0,0 +1 @@
+da5fc1e52c333e3ff55c616c0ffd77f0 prunerepo-1.21.tar.gz