Clean up source tarball and license

The file doc/rear-release-notes.txt in upstream sources is CC-BY-ND-3.0,
which is not an allowed license for documentation. Therefore use a
modified tarball without this file. Add a Makefile to remove the file
and generate the modified tarball from the upstream tarball: invoke
make rear-%{version}-clean.tar.gz
while in the tarball's directory.

Adjust License: and %files accordingly.

Resolves: RHEL-26827
This commit is contained in:
Pavel Cahyna 2024-08-08 18:38:26 +02:00
parent 327047c583
commit d6b32523e0
2 changed files with 15 additions and 5 deletions

3
Makefile Normal file
View File

@ -0,0 +1,3 @@
rear-%-clean.tar.gz: rear-%.tar.gz
set -o pipefail; gunzip -c $< | tar --delete "rear-"$*"/doc/rear-release-notes.txt" -f - | gzip -c - > $@.tmp
mv $@.tmp $@

View File

@ -7,15 +7,20 @@ Release: 11%{?dist}
Summary: Relax-and-Recover is a Linux disaster recovery and system migration tool
URL: https://relax-and-recover.org
# doc/rear-release-notes.txt - CC-BY-ND-3.0
# the rest - GPL-3.0-or-later
License: GPL-3.0-or-later AND CC-BY-ND-3.0
License: GPL-3.0-or-later
Source0: https://github.com/rear/rear/archive/%{version}.tar.gz#/rear-%{version}.tar.gz
#Source0: https://github.com/rear/rear/archive/%%{version}.tar.gz#/rear-%%{version}.tar.gz
Source0: rear-%{version}-clean.tar.gz
# Add cronjob and systemd timer as documentation
Source1: rear.cron
Source2: rear.service
Source3: rear.timer
# doc/rear-release-notes.txt is CC-BY-ND-3.0, which is not an allowed license
# for documentation. Therefore we use this Makefile to remove the file
# before shipping it.
# Download the upstream tarball and invoke "make rear-%%{version}-clean.tar.gz"
# while in the tarball's directory:
Source4: Makefile
######################
# upstream backports #
@ -241,7 +246,9 @@ install -m 0644 %{SOURCE3} %{buildroot}%{_docdir}/%{name}/
#-- FILES ---------------------------------------------------------------------#
%files
%license COPYING
%doc MAINTAINERS README.adoc doc/*.txt doc/user-guide/*.html
%doc MAINTAINERS README.adoc doc/user-guide/*.html
# the only upstream *.txt file has an unacceptable license (CC-BY-ND-3.0)
#%%doc doc/*.txt
%dir %{_sysconfdir}/rear/
%config(noreplace) %{_sysconfdir}/rear/local.conf
%{_sysconfdir}/rear/os.conf