[PATCH 4 of 7 stable] packaging: introduce generic local rpm build target using python3

2019-10-27 Thread Mads Kiilerich
# HG changeset patch
# User Mads Kiilerich 
# Date 1572198921 -3600
#  Sun Oct 27 18:55:21 2019 +0100
# Branch stable
# Node ID 467d582886f688e01fe59b1d6f2de244d7be1458
# Parent  32dbdaffb2ae030119890e05b87c4677706e7c6a
packaging: introduce generic local rpm build target using python3

It is unnecessary extra work to explicitly add Makefile targets for a random
selection of Fedora versions. Generally, it just works. If not, the root cause
should be fixed.

diff --git a/Makefile b/Makefile
--- a/Makefile
+++ b/Makefile
@@ -208,7 +208,8 @@ packaging_targets := \
   linux-wheels \
   linux-wheels-x86_64 \
   linux-wheels-i686 \
-  ppa
+  ppa \
+  rpm
 
 # Forward packaging targets for convenience.
 $(packaging_targets):
diff --git a/contrib/packaging/Makefile b/contrib/packaging/Makefile
--- a/contrib/packaging/Makefile
+++ b/contrib/packaging/Makefile
@@ -56,6 +56,9 @@ help:
@echo 'ppa'
@echo '   Build a Debian source package locally targeting the current 
system'
@echo ''
+   @echo 'rpm'
+   @echo '   Build a RPM targeting the current system using Python 3'
+   @echo ''
@echo 'centos{$(strip $(CENTOS_RELEASES))}'
@echo '   Build an RPM for a specific CentOS version locally'
@echo ''
@@ -96,6 +99,14 @@ endef
 
 $(foreach codename,$(UBUNTU_CODENAMES),$(eval $(call 
ubuntu_targets,$(codename
 
+# Generic RPM target, mainly for Fedora/CentOS/RHEL.
+rpm:
+   mkdir -p $$(HGROOT)/packages/rpm
+   ./buildrpm --python3
+   cp $$(HGROOT)/contrib/packaging/rpmbuild/RPMS/*/* 
$$(HGROOT)/packages/rpm
+   cp $$(HGROOT)/contrib/packaging/rpmbuild/SRPMS/* $$(HGROOT)/packages/rpm
+   rm -rf $(HGROOT)/rpmbuild
+
 # Fedora targets.
 define fedora_targets
 .PHONY: fedora$(1)

___
Mercurial-devel mailing list
Mercurial-devel@mercurial-scm.org
https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel


Re: [PATCH 4 of 7 stable] packaging: introduce generic local rpm build target using python3

2019-10-31 Thread Mads Kiilerich

On 10/28/19 12:37 AM, Mads Kiilerich wrote:

packaging: introduce generic local rpm build target using python3



I realize this change is bad. It has not been pushed yet - please drop 
it. The rest of the series still looks good.


/Mads

___
Mercurial-devel mailing list
Mercurial-devel@mercurial-scm.org
https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel


Re: [PATCH 4 of 7 stable] packaging: introduce generic local rpm build target using python3

2019-10-31 Thread Yuya Nishihara
On Thu, 31 Oct 2019 12:42:49 +0100, Mads Kiilerich wrote:
> On 10/28/19 12:37 AM, Mads Kiilerich wrote:
> > packaging: introduce generic local rpm build target using python3
> 
> I realize this change is bad. It has not been pushed yet - please drop 
> it. The rest of the series still looks good.

Pruned from hg-committed. Please make sure to keep your local version alive.
___
Mercurial-devel mailing list
Mercurial-devel@mercurial-scm.org
https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel


Re: [PATCH 4 of 7 stable] packaging: introduce generic local rpm build target using python3

2019-10-31 Thread Mads Kiilerich
Actually ... testing shows so many small differences between versions 
that break something. Even the very first patch in series seems to break 
docker-centos5.


Pleasedrop everything except the last 3 trivial patches (hgweb.wsgi, 
"tested on", and whitespace). I will resend.


/Mads

___
Mercurial-devel mailing list
Mercurial-devel@mercurial-scm.org
https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel


Re: [PATCH 4 of 7 stable] packaging: introduce generic local rpm build target using python3

2019-10-31 Thread Gregory Szorc
On Thu, Oct 31, 2019 at 4:00 PM Mads Kiilerich  wrote:

> Actually ... testing shows so many small differences between versions
> that break something. Even the very first patch in series seems to break
> docker-centos5.
>
> Pleasedrop everything except the last 3 trivial patches (hgweb.wsgi,
> "tested on", and whitespace). I will resend.
>

I accepted these patches before I saw this email and it looks like they
were bumped to public before my drops went through. So we'll have to patch
forward. Sorry about that.
___
Mercurial-devel mailing list
Mercurial-devel@mercurial-scm.org
https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel