6b26e3b
%{!?dnf_lowest_compatible: %global dnf_lowest_compatible 4.2.23}
6b26e3b
Name:    dnf-plugin-cow
e6b1a61
Version: 0.0.4
e64ab5d
Release: %autorelease
6b26e3b
Summary: DNF plugin to enable Copy on Write in RPM
6b26e3b
URL:     https://github.com/facebookincubator/dnf-plugin-cow
6b26e3b
License: MIT
6b26e3b
6b26e3b
Source0: %{url}/archive/%{version}/%{name}-%{version}.tar.gz
6b26e3b
6b26e3b
BuildArch: noarch
6b26e3b
BuildRequires: python3-devel
6b26e3b
BuildRequires: python3-dnf >= %{dnf_lowest_compatible}
6b26e3b
6b26e3b
%description
6b26e3b
Source package for DNF plugin to enable Copy on Write in DNF and RPM.
6b26e3b
6b26e3b
%package -n python3-%{name}
6b26e3b
Summary: DNF plugin to enable Copy on Write in RPM - Python3
6b26e3b
Requires: python3-dnf >= %{dnf_lowest_compatible}
6b26e3b
# Using recommends to allow the plugin to be installed even if the requirements
6b26e3b
# are not packaged/available yet.
6b26e3b
Recommends: /usr/bin/rpm2extents
6b26e3b
Recommends: rpm-plugin-reflink
6b26e3b
6b26e3b
%description -n python3-%{name}
6b26e3b
Installing this package enables a DNF plugin which changes the behaviour of
6b26e3b
librepo. Instead of downloading rpm files directly into cache before
6b26e3b
installation they will be "transcoded" into "extent based" rpms which contain
6b26e3b
all the constituent files of the rpm already uncompressed. This package
6b26e3b
depends on a version of rpm which includes /usr/bin/rpm2extents and the
6b26e3b
sub-package rpm-plugin-reflink which understands these "extent based" rpms
6b26e3b
and can install files without copying the underlying data.
6b26e3b
6b26e3b
This package broadly assumes the root filesystem supports copy on write /
6b26e3b
reflink'ing. Today this means btrfs or xfs.
6b26e3b
6b26e3b
%prep
6b26e3b
%autosetup -n %{name}-%{version}
6b26e3b
6b26e3b
%build
6b26e3b
6b26e3b
%install
6b26e3b
install -D -p reflink.conf %{buildroot}%{_sysconfdir}/dnf/plugins/reflink.conf
6b26e3b
install -D -p reflink.py %{buildroot}%{python3_sitelib}/dnf-plugins/reflink.py
6b26e3b
6b26e3b
%files -n python3-%{name}
6b26e3b
%license LICENSE
6b26e3b
%doc README.md
6b26e3b
%config(noreplace) %{_sysconfdir}/dnf/plugins/reflink.conf
6b26e3b
%{python3_sitelib}/dnf-plugins/reflink.py
6b26e3b
%{python3_sitelib}/dnf-plugins/__pycache__/reflink.*
6b26e3b
6b26e3b
%changelog
e64ab5d
%autochangelog