Re: [OS-BUILD PATCH] redhat: Implement Makefile.dist

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Aug 21, 2020 at 01:44:55PM -0000, GitLab Bridge on behalf of prarit wrote:
> diff --git a/Makefile.rhelver b/Makefile.dist
> similarity index 77%
> rename from Makefile.rhelver
> rename to Makefile.dist
> index 8fceabade7c8..0b4f2d28e7b8 100644
> --- a/Makefile.rhelver
> +++ b/Makefile.dist
> @@ -12,7 +12,7 @@ RHEL_MINOR = 99
>  #
>  # Use this spot to avoid future merge conflicts.
>  # Do not trim this comment.
> -RHEL_RELEASE = 0
> +RHEL_RELEASE = 1

Please drop the above piece.

Cheers,
Don

>  
>  #
>  # Early y+1 numbering
> @@ -43,3 +43,20 @@ ifneq ("$(ZSTREAM)", "yes")
>      RHEL_RELEASE:=$(RHEL_RELEASE).$(EARLY_YRELEASE)
>    endif
>  endif
> +
> +no-dot-config-targets += dist-% distg-%
> +
> +ifneq ($(filter dist-% distg-%,$(MAKECMDGOALS)),)
> +_OUTPUT := "."
> +# this section is needed in order to make O= to work
> +ifeq ("$(origin O)", "command line")
> +  _OUTPUT := "$(abspath $(O))"
> +  _EXTRA_ARGS := O=$(_OUTPUT)
> +endif
> +endif
> +
> +dist-%::
> +	$(MAKE) -C redhat $(@) $(_EXTRA_ARGS)
> +
> +distg-%::
> +	$(MAKE) -C redhat $(@) $(_EXTRA_ARGS)
> diff --git a/makefile b/makefile
> deleted file mode 100644
> index 819ac9a5cd60..000000000000
> --- a/makefile
> +++ /dev/null
> @@ -1,16 +0,0 @@
> -ifeq ($(filter dist-% distg-%,$(MAKECMDGOALS)),)
> -	include Makefile
> -endif
> -
> -_OUTPUT := "."
> -# this section is needed in order to make O= to work
> -ifeq ("$(origin O)", "command line")
> -  _OUTPUT := "$(abspath $(O))"
> -  _EXTRA_ARGS := O=$(_OUTPUT)
> -endif
> -dist-%::
> -	$(MAKE) -C redhat $(@) $(_EXTRA_ARGS)
> -
> -distg-%::
> -	$(MAKE) -C redhat $(@) $(_EXTRA_ARGS)
> -
> diff --git a/redhat/Makefile b/redhat/Makefile
> index 61dcc522fbc6..8c6a3a510768 100644
> --- a/redhat/Makefile
> +++ b/redhat/Makefile
> @@ -256,7 +256,7 @@ sources-rh: $(TARBALL)
>  		configs/process_configs.sh \
>  		parallel_xz.sh \
>  		generate_bls_conf.sh \
> -		../Makefile.rhelver \
> +		../Makefile.dist \
>  		README.rst \
>  		$(SOURCES)/
>  	@for KABIARCH in $(ARCH_LIST); do \
> @@ -308,7 +308,7 @@ dist-release-finish: setup-source
>  	@git add $(REDHAT)/$(CHANGELOG)
>  	@echo $(MARKER) > $(REDHAT)/marker
>  	@git add $(REDHAT)/marker
> -	@git commit -s ../Makefile.rhelver $(REDHAT)/marker $(REDHAT)/$(CHANGELOG) $(PACKAGE_NAME).spec.template -m "[redhat] $(PACKAGE_NAME)-$(STAMP_VERSION)-$(PREBUILD)$(BUILD)$(BUILDID)"
> +	@git commit -s ../Makefile.dist $(REDHAT)/marker $(REDHAT)/$(CHANGELOG) $(PACKAGE_NAME).spec.template -m "[redhat] $(PACKAGE_NAME)-$(STAMP_VERSION)-$(PREBUILD)$(BUILD)$(BUILDID)"
>  	@$(MAKE) dist-configs
>  	@$(MAKE) dist-kabi
>  	@$(MAKE) dist-kabi-dup
> diff --git a/redhat/Makefile.common b/redhat/Makefile.common
> index 6d048415ba6d..d4e68369fb05 100644
> --- a/redhat/Makefile.common
> +++ b/redhat/Makefile.common
> @@ -1,6 +1,6 @@
>  TOPDIR:=$(shell git rev-parse --show-toplevel)
>  REDHAT:=$(TOPDIR)/redhat
> -include $(TOPDIR)/Makefile.rhelver
> +include $(TOPDIR)/Makefile.dist
>  
>  RPMBUILD := $(shell if [ -x "/usr/bin/rpmbuild" ]; then echo rpmbuild; \
>                     else echo rpm; fi)
> diff --git a/redhat/genspec.sh b/redhat/genspec.sh
> index b72dffe14729..1cd9095a69ea 100755
> --- a/redhat/genspec.sh
> +++ b/redhat/genspec.sh
> @@ -253,7 +253,7 @@ if [ "$SINGLE_TARBALL" = 0 ]; then
>  		":(exclude,top).gitignore" \
>  		":(exclude,top).gitlab-ci.yml" \
>  		":(exclude,top)makefile" \
> -		":(exclude,top)Makefile.rhelver" \
> +		":(exclude,top)Makefile.dist" \
>  		":(exclude,top)redhat")
>  	for c in $COMMITS; do
>  		patch=$(git format-patch --zero-commit -1 "$c")
> diff --git a/redhat/kernel.spec.template b/redhat/kernel.spec.template
> index d47c9cce8a0e..93fa8c2985b1 100644
> --- a/redhat/kernel.spec.template
> +++ b/redhat/kernel.spec.template
> @@ -569,7 +569,7 @@ BuildRequires: asciidoc
>  # xzcat -qq ${TARBALL} | git get-tar-commit-id
>  Source0: linux-%%TARBALL_VERSION%%.tar.xz
>  
> -Source1: Makefile.rhelver
> +Source1: Makefile.dist
>  
>  
>  # Name of the packaged file containing signing key
> diff --git a/redhat/scripts/new_release.sh b/redhat/scripts/new_release.sh
> index 1e4c7bb1dc86..f1025f458d04 100755
> --- a/redhat/scripts/new_release.sh
> +++ b/redhat/scripts/new_release.sh
> @@ -13,7 +13,7 @@ if [ -s "$RHPATH/linux-kernel-test.patch" ]; then
>  	exit 1;
>  fi
>  
> -RELEASE=$(sed -n -e 's/^RHEL_RELEASE\ =\ \(.*\)/\1/p' $RHPATH/../Makefile.rhelver)
> +RELEASE=$(sed -n -e 's/^RHEL_RELEASE\ =\ \(.*\)/\1/p' $RHPATH/../Makefile.dist)
>  
>  YVER=$(echo $RELEASE | cut -d "." -f 1)
>  YVER=${YVER:=$RELEASE}
> @@ -26,15 +26,15 @@ if [ "$ZSTREAM_FLAG" == "no" ]; then
>  	if [ "$YSTREAM_FLAG" == "yes" ]; then
>  		NEW_RELEASE="$[RELEASE + 1]";
>  	else
> -		EARLY_YBUILD=$(sed -n -e 's/^EARLY_YBUILD:=\(.*\)/\1/p' $RHPATH/../Makefile.rhelver);
> -		EARLY_YRELEASE=$(sed -n -e 's/^EARLY_YRELEASE:=\(.*\)/\1/p' $RHPATH/../Makefile.rhelver);
> +		EARLY_YBUILD=$(sed -n -e 's/^EARLY_YBUILD:=\(.*\)/\1/p' $RHPATH/../Makefile.dist);
> +		EARLY_YRELEASE=$(sed -n -e 's/^EARLY_YRELEASE:=\(.*\)/\1/p' $RHPATH/../Makefile.dist);
>  		if [ "$EARLY_YBUILD" != "$RELEASE" ]; then
>  			NEW_EARLY_YRELEASE=1;
>  		else
>  			NEW_EARLY_YRELEASE="$[EARLY_YRELEASE + 1]";
>  		fi
> -		sed -i -e "s/^EARLY_YBUILD:=$EARLY_YBUILD/EARLY_YBUILD:=$RELEASE/" $RHPATH/../Makefile.rhelver;
> -		sed -i -e "s/^EARLY_YRELEASE:=$EARLY_YRELEASE/EARLY_YRELEASE:=$NEW_EARLY_YRELEASE/" $RHPATH/../Makefile.rhelver;
> +		sed -i -e "s/^EARLY_YBUILD:=$EARLY_YBUILD/EARLY_YBUILD:=$RELEASE/" $RHPATH/../Makefile.dist;
> +		sed -i -e "s/^EARLY_YRELEASE:=$EARLY_YRELEASE/EARLY_YRELEASE:=$NEW_EARLY_YRELEASE/" $RHPATH/../Makefile.dist;
>  		NEW_RELEASE=$RELEASE;
>  	fi
>  elif [ "$ZSTREAM_FLAG" == "yes" ]; then
> @@ -46,5 +46,5 @@ else
>  	exit 1;
>  fi
>  
> -sed -i -e "s/RHEL_RELEASE\ =.*/RHEL_RELEASE\ =\ $NEW_RELEASE/" $RHPATH/../Makefile.rhelver;
> +sed -i -e "s/RHEL_RELEASE\ =.*/RHEL_RELEASE\ =\ $NEW_RELEASE/" $RHPATH/../Makefile.dist;
>  
> -- 
> GitLab
> _______________________________________________
> kernel mailing list -- kernel@xxxxxxxxxxxxxxxxxxxxxxx
> To unsubscribe send an email to kernel-leave@xxxxxxxxxxxxxxxxxxxxxxx
> 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@xxxxxxxxxxxxxxxxxxxxxxx
_______________________________________________
kernel mailing list -- kernel@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe send an email to kernel-leave@xxxxxxxxxxxxxxxxxxxxxxx
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@xxxxxxxxxxxxxxxxxxxxxxx




[Index of Archives]     [Fedora General Discussion]     [Older Fedora Users Archive]     [Fedora Advisory Board]     [Fedora Security]     [Fedora Devel Java]     [Fedora Legacy]     [Fedora Desktop]     [ATA RAID]     [Fedora Marketing]     [Fedora Mentors]     [Fedora Package Announce]     [Fedora Package Review]     [Fedora Music]     [Fedora Packaging]     [Centos]     [Fedora SELinux]     [Coolkey]     [Yum Users]     [Tux]     [Yosemite News]     [KDE Users]     [Fedora Art]     [Fedora Docs]     [USB]     [Asterisk PBX]

  Powered by Linux