From: Herton R. Krzesinski <her...@redhat.com>

redhat: do not compress the full kernel changelog in the src.rpm

Bugzilla: INTERNAL
Upstream Status: RHEL only

By default redhat/scripts/expand_srpm.sh adds a .gitignore entry excluding any
*.xz file in dist-git, since those are usually tarballs which can get very 
large.

The problem is that kernel.changelog.xz file recently added gets excluded and
can't be commited to dist-git due that.

To avoid it, since src.rpm and git can compress contents and the updates
are incremental, just use the uncompressed contents when adding it to
the src.rpm, and only compress the file when providing it to the
kernel-doc package.

This fixes commit "redhat: ship all the changelog from source git into 
kernel-doc"
recently merged into kernel-ark.

Reported-by: Justin Forbes <jfor...@redhat.com>
Signed-off-by: Herton R. Krzesinski <her...@redhat.com>

diff --git a/redhat/Makefile b/redhat/Makefile
index blahblah..blahblah 100644
--- a/redhat/Makefile
+++ b/redhat/Makefile
@@ -700,7 +700,7 @@ sources-rh: $(TARBALL) generate-testpatch-tmp setup-source 
dist-configs-check
                dracut-virt.conf \
                $(SOURCES)/
        @cat $$(ls -1 $(SPECPACKAGE_NAME).changelog-* | sort -t '.' -k 3 -n -r) 
\
-               | xz > $(SOURCES)/kernel.changelog.xz
+               > $(SOURCES)/kernel.changelog
        @if [ "$(RELEASED_KERNEL)" -ne 0 ]; then \
                cp keys/redhatsecureboot{301,501,ca5,ca1}.cer $(SOURCES)/; \
                cp keys/secureboot_{ppc,s390}.cer $(SOURCES)/; \
diff --git a/redhat/kernel.spec.template b/redhat/kernel.spec.template
index blahblah..blahblah 100644
--- a/redhat/kernel.spec.template
+++ b/redhat/kernel.spec.template
@@ -799,7 +799,7 @@ BuildRequires: tpm2-tools
 Source0: linux-%{tarfile_release}.tar.xz
 
 Source1: Makefile.rhelver
-Source2: kernel.changelog.xz
+Source2: kernel.changelog
 
 # Name of the packaged file containing signing key
 %ifarch ppc64le
@@ -2918,7 +2918,8 @@ 
docdir=$RPM_BUILD_ROOT%{_datadir}/doc/kernel-doc-%{specversion}-%{pkgrelease}
 # copy the source over
 mkdir -p $docdir
 tar -h -f - --exclude=man --exclude='.*' -c Documentation | tar xf - -C $docdir
-install -m644 %{SOURCE2} $docdir/
+cat %{SOURCE2} | xz > $docdir/kernel.changelog.xz
+chmod 0644 $docdir/kernel.changelog.xz
 
 # with_doc
 %endif

--
https://gitlab.com/cki-project/kernel-ark/-/merge_requests/2841
--
_______________________________________________
kernel mailing list -- kernel@lists.fedoraproject.org
To unsubscribe send an email to kernel-le...@lists.fedoraproject.org
Fedora Code of Conduct: 
https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: 
https://lists.fedoraproject.org/archives/list/kernel@lists.fedoraproject.org
Do not reply to spam, report it: 
https://pagure.io/fedora-infrastructure/new_issue

Reply via email to