Patchwork D12182: contrib: refer to RHEL and derivatives instead of CentOS specifically

login
register
mail settings
Submitter phabricator
Date Feb. 15, 2022, 2:34 p.m.
Message ID <differential-rev-PHID-DREV-zx6s2n4ufhdtxm2dlj44-req@mercurial-scm.org>
Download mbox | patch
Permalink /patch/50519/
State New
Headers show

Comments

phabricator - Feb. 15, 2022, 2:34 p.m.
Mathiasdm created this revision.
Herald added a reviewer: hg-reviewers.
Herald added a subscriber: mercurial-patches.

REPOSITORY
  rHG Mercurial

BRANCH
  stable

REVISION DETAIL
  https://phab.mercurial-scm.org/D12182

AFFECTED FILES
  Makefile
  contrib/packaging/Makefile
  contrib/packaging/docker/centos7
  contrib/packaging/docker/centos8
  contrib/packaging/docker/rhel7
  contrib/packaging/docker/rhel8

CHANGE DETAILS




To: Mathiasdm, #hg-reviewers
Cc: mercurial-patches, mercurial-devel

Patch

diff --git a/contrib/packaging/docker/centos8 b/contrib/packaging/docker/rhel8
rename from contrib/packaging/docker/centos8
rename to contrib/packaging/docker/rhel8
diff --git a/contrib/packaging/docker/centos7 b/contrib/packaging/docker/rhel7
rename from contrib/packaging/docker/centos7
rename to contrib/packaging/docker/rhel7
diff --git a/contrib/packaging/Makefile b/contrib/packaging/Makefile
--- a/contrib/packaging/Makefile
+++ b/contrib/packaging/Makefile
@@ -13,20 +13,20 @@ 
 
 FEDORA_RELEASE := 31
 
-CENTOS_RELEASES := \
+RHEL_RELEASES := \
   7 \
   8
 
-# Build a Python for these CentOS releases.
-CENTOS_WITH_PYTHON_RELEASES :=
-CENTOS_WITH_NONVERSIONED_PYTHON :=
-CENTOS_WITH_36_DOCUTILS := 7
+# Build a Python for these RHEL (and derivatives) releases.
+RHEL_WITH_PYTHON_RELEASES :=
+RHEL_WITH_NONVERSIONED_PYTHON :=
+RHEL_WITH_36_DOCUTILS := 7
 
 help:
 	@echo 'Packaging Make Targets'
 	@echo ''
-	@echo 'docker-centos{$(strip $(CENTOS_RELEASES))}'
-	@echo '   Build an RPM for a specific CentOS version using Docker.'
+	@echo 'docker-rhel{$(strip $(RHEL_RELEASES))}'
+	@echo '   Build an RPM for a specific RHEL/derivative version using Docker.'
 	@echo ''
 	@echo 'docker-debian-{$(strip $(DEBIAN_CODENAMES))}'
 	@echo '   Build Debian packages specific to a Debian distro using Docker.'
@@ -53,8 +53,8 @@ 
 	@echo 'ppa'
 	@echo '   Build a Debian source package locally targeting the current system'
 	@echo ''
-	@echo 'centos{$(strip $(CENTOS_RELEASES))}'
-	@echo '   Build an RPM for a specific CentOS version locally'
+	@echo 'rhel{$(strip $(RHEL_RELEASES))}'
+	@echo '   Build an RPM for a specific RHEL/derivative version locally'
 	@echo ''
 	@echo 'fedora'
 	@echo '   Build an RPM for Fedora $(FEDORA_RELEASE) locally'
@@ -106,22 +106,22 @@ 
 docker-fedora:
 	./dockerrpm fedora$(FEDORA_RELEASE)
 
-# CentOS targets.
-define centos_targets
-.PHONY: centos$(1)
-centos$(1):
-	mkdir -p $$(HGROOT)/packages/centos$(1)
-	./buildrpm $$(if $$(filter $(1),$$(CENTOS_WITH_PYTHON_RELEASES)),--withpython,$$(if $$(filter $(1),$$(CENTOS_WITH_NONVERSIONED_PYTHON)),--python python,))$$(if $$(filter $(1),$$(CENTOS_WITH_36_DOCUTILS)), --docutilspackage python36-docutils,)
-	cp $$(HGROOT)/contrib/packaging/rpmbuild/RPMS/*/* $$(HGROOT)/packages/centos$(1)
-	cp $$(HGROOT)/contrib/packaging/rpmbuild/SRPMS/* $$(HGROOT)/packages/centos$(1)
+# RHEL targets.
+define rhel_targets
+.PHONY: rhel$(1)
+rhel$(1):
+	mkdir -p $$(HGROOT)/packages/rhel$(1)
+	./buildrpm $$(if $$(filter $(1),$$(RHEL_WITH_PYTHON_RELEASES)),--withpython,$$(if $$(filter $(1),$$(RHEL_WITH_NONVERSIONED_PYTHON)),--python python,))$$(if $$(filter $(1),$$(RHEL_WITH_36_DOCUTILS)), --docutilspackage python36-docutils,)
+	cp $$(HGROOT)/contrib/packaging/rpmbuild/RPMS/*/* $$(HGROOT)/packages/rhel$(1)
+	cp $$(HGROOT)/contrib/packaging/rpmbuild/SRPMS/* $$(HGROOT)/packages/rhel$(1)
 
-.PHONY: docker-centos$(1)
-docker-centos$(1):
-	./dockerrpm centos$(1) $$(if $$(filter $(1),$$(CENTOS_WITH_PYTHON_RELEASES)),--withpython,$$(if $$(filter $(1),$$(CENTOS_WITH_NONVERSIONED_PYTHON)),--python python,))$$(if $$(filter $(1),$$(CENTOS_WITH_36_DOCUTILS)), --docutilspackage python36-docutils,)
+.PHONY: docker-rhel$(1)
+docker-rhel$(1):
+	./dockerrpm rhel$(1) $$(if $$(filter $(1),$$(RHEL_WITH_PYTHON_RELEASES)),--withpython,$$(if $$(filter $(1),$$(RHEL_WITH_NONVERSIONED_PYTHON)),--python python,))$$(if $$(filter $(1),$$(RHEL_WITH_36_DOCUTILS)), --docutilspackage python36-docutils,)
 
 endef
 
-$(foreach release,$(CENTOS_RELEASES),$(eval $(call centos_targets,$(release))))
+$(foreach release,$(RHEL_RELEASES),$(eval $(call rhel_targets,$(release))))
 
 .PHONY: linux-wheels
 linux-wheels: linux-wheels-x86_64 linux-wheels-i686
diff --git a/Makefile b/Makefile
--- a/Makefile
+++ b/Makefile
@@ -204,11 +204,11 @@ 
 # Packaging targets
 
 packaging_targets := \
-  centos7 \
-  centos8 \
+  rhel7 \
+  rhel8 \
   deb \
-  docker-centos7 \
-  docker-centos8 \
+  docker-rhel7 \
+  docker-rhel8 \
   docker-debian-bullseye \
   docker-debian-buster \
   docker-debian-stretch \