From: Prarit Bhargava <pra...@redhat.com>

redhat/Makefile: Move SINGLE_TARBALL to Makefile.variables

Move the SINGLE_TARBALL variable to Makefile.variables, and clean up
comments.

Signed-off-by: Prarit Bhargava <pra...@redhat.com>

diff --git a/redhat/Makefile b/redhat/Makefile
index blahblah..blahblah 100644
--- a/redhat/Makefile
+++ b/redhat/Makefile
@@ -206,8 +206,6 @@ SRPM:=$(SRPMS)/$(PACKAGE_NAME)-$(RPMVERSION)$(DIST).src.rpm
 # specific values should be set.
 #
 ifeq ("$(DISTRO)", "fedora")
-  # A non-unified tarball means that the tarball is only upstream sources
-  # and the patches get applied as a diff in the spec file
   SINGLE_TARBALL:=0
   TARFILE_RELEASE:=$(UPSTREAM_TARBALL_NAME)
   RHDISTGIT_BRANCH:=rawhide
@@ -215,8 +213,6 @@ ifeq ("$(DISTRO)", "fedora")
     BUILD_SCRATCH_TARGET:=temp-ark-rhel-8-test
   endif
 else ifeq ("$(DISTRO)", "centos")
-  # A unified tarball means that the tarball in the srpm contains both the
-  # upstream sources and RHEL specific patches.
   SINGLE_TARBALL:=1
   RHDISTGIT_BRANCH:=c$(RHEL_MAJOR)s
   ifndef BUILD_PROFILE
@@ -227,8 +223,6 @@ else ifeq ("$(DISTRO)", "centos")
   endif
   TARFILE_RELEASE:=$(RPMVERSION)
 else
-  # A unified tarball means that the tarball in the srpm contains both the
-  # upstream sources and RHEL specific patches.
   SINGLE_TARBALL:=1
   RHDISTGIT_BRANCH:=rhel-$(RHEL_MAJOR).$(RHEL_MINOR).0
   ifndef BUILD_SCRATCH_TARGET
diff --git a/redhat/Makefile.variables b/redhat/Makefile.variables
index blahblah..blahblah 100644
--- a/redhat/Makefile.variables
+++ b/redhat/Makefile.variables
@@ -127,3 +127,8 @@ RHSELFTESTDATA ?=
 # This variable is used by the redhat/self-tests.  It should not be
 # considered stable and my be changed or removed without warning.
 RHDISTDATADIR ?=
+
+# This variable is used in redhat/genspec.sh, and determines if all commits are
+# rolled into a single tarball, or if the commits are individually broken out
+# into separate patches and then included in the tarball.
+SINGLE_TARBALL ?=
diff --git a/redhat/genspec.sh b/redhat/genspec.sh
index blahblah..blahblah 100755
--- a/redhat/genspec.sh
+++ b/redhat/genspec.sh
@@ -163,12 +163,16 @@ mv -f "$clogf.full" "$SOURCES/$CHANGELOG"
 echo "MARKER is $MARKER"
 
 if [ "$SINGLE_TARBALL" = 0 ]; then
+       # The tarball in the SRPM contains only the upstream sources.
+
        # May need to preserve word splitting in EXCLUDE_FILES
        # shellcheck disable=SC2086
        git diff -p --no-renames --stat "$MARKER"..  $EXCLUDE_FILES \
                > ${SOURCES}/patch-${RPMKVERSION}.${RPMKPATCHLEVEL}-redhat.patch
 else
-       # Need an empty file for dist-git compatibility
+       # The tarball in the SRPM contains both upstream sources and OS-specifc
+       # commits.  Even though this is the case, an empty file for dist-git
+       # compatibility is necessary.
        touch "${SOURCES}/patch-${RPMKVERSION}.${RPMKPATCHLEVEL}"-redhat.patch
 fi
 

--
https://gitlab.com/cki-project/kernel-ark/-/merge_requests/1647
_______________________________________________
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 on the list, report it: 
https://pagure.io/fedora-infrastructure

Reply via email to