~alpine/aports

This thread contains a patchset. You're looking at the original emails, but you may wish to use the patch review UI. Review patch
5 3

[PATCH] Add hotfix for running `hg archive` with gzip files on python 3.8.2+

Ludovic Chabant <ludovic@chabant.com>
Details
Message ID
<20200310204748.28104-1-ludovic@chabant.com>
DKIM signature
missing
Download raw message
Patch: +26 -3
---
 main/mercurial/APKBUILD           |  7 ++++---
 main/mercurial/archive_gzip.patch | 22 ++++++++++++++++++++++
 2 files changed, 26 insertions(+), 3 deletions(-)
 create mode 100644 main/mercurial/archive_gzip.patch

diff --git a/main/mercurial/APKBUILD b/main/mercurial/APKBUILD
index 7932977c84..9c53e77fd3 100644
--- a/main/mercurial/APKBUILD
+++ b/main/mercurial/APKBUILD
@@ -2,7 +2,7 @@
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=mercurial
pkgver=5.3.1
pkgrel=0
pkgrel=1
pkgdesc="Scalable distributed SCM tool"
url="https://www.mercurial-scm.org"
arch="all"
@@ -15,7 +15,7 @@ subpackages="
	$pkgname-zsh-completion:zshcomp:noarch
	$pkgname-bash-completion:bashcomp:noarch
	"
source="https://www.mercurial-scm.org/release/mercurial-$pkgver.tar.gz"
source="https://www.mercurial-scm.org/release/mercurial-$pkgver.tar.gz archive_gzip.patch"

# secfixes:
#   4.9-r0:
@@ -65,4 +65,5 @@ bashcomp() {
		"$subpkgdir"/usr/share/bash-completion/completions/$pkgname
}

sha512sums="3bc49ea96cb4ac0e777f667a3243917af495a001534b6b91141fc93b5c47a8eddc84331e1cb0b981fac1bf451dcfc91b8c538134983733466248fdc20afd39c6  mercurial-5.3.1.tar.gz"
sha512sums="3bc49ea96cb4ac0e777f667a3243917af495a001534b6b91141fc93b5c47a8eddc84331e1cb0b981fac1bf451dcfc91b8c538134983733466248fdc20afd39c6  mercurial-5.3.1.tar.gz
42974b580e5dafc562fdce9728b90f882a2cfb10c3c0adbd50d41382bd6bcf3a430be6fc81c52a3baa3955677999bf4662c5e5b5bc90891ba9c862ec27c448a2  archive_gzip.patch"
diff --git a/main/mercurial/archive_gzip.patch b/main/mercurial/archive_gzip.patch
new file mode 100644
index 0000000000..5f4f81ecff
--- /dev/null
+++ b/main/mercurial/archive_gzip.patch
@@ -0,0 +1,22 @@
# HG changeset patch
# User Ludovic Chabant <ludovic@chabant.com>
# Date 1583871438 0
#      Tue Mar 10 20:17:18 2020 +0000
# Node ID 70878db5d0ede9c39128328cfa8cb6ee758d5374
# Parent  a08bbdf839ae08ff69c6f99a289ee85b3a012f03
archive: fix crash when archiving to gzip file with Python 3.8.2+

Differential Revision: https://phab.mercurial-scm.org/D8272

diff --git a/mercurial/archival.py b/mercurial/archival.py
--- a/mercurial/archival.py
+++ b/mercurial/archival.py
@@ -146,7 +146,7 @@
                 self.timestamp = timestamp
             gzip.GzipFile.__init__(self, *args, **kw)
 
-        def _write_gzip_header(self):
+        def _write_gzip_header(self, *args, **kwargs):
             self.fileobj.write(b'\037\213')  # magic header
             self.fileobj.write(b'\010')  # compression method
             fname = self.name
-- 
2.24.1
Ludovic Chabant <ludovic@chabant.com>
Details
Message ID
<775dd995-47b1-4853-9e26-9f37d87f5d39@www.fastmail.com>
In-Reply-To
<20200310204748.28104-1-ludovic@chabant.com> (view parent)
DKIM signature
missing
Download raw message
Hey Natanael, this is a gentle ping about this patch.

The  `hg archive` command is currently broken on Alpine edge without
this fix (or until the next Mercurial release). It's blocking us on
sourcehut at the moment because our deployments rely on that command.

Thanks!
Details
Message ID
<20200403185352.70ca07f9@ncopa-desktop.copa.dup.pw>
In-Reply-To
<775dd995-47b1-4853-9e26-9f37d87f5d39@www.fastmail.com> (view parent)
DKIM signature
missing
Download raw message
Hi!

On Fri, 03 Apr 2020 09:42:14 -0700
"Ludovic Chabant" <ludovic@chabant.com> wrote:

> Hey Natanael, this is a gentle ping about this patch.
> 
> The  `hg archive` command is currently broken on Alpine edge without
> this fix (or until the next Mercurial release). It's blocking us on
> sourcehut at the moment because our deployments rely on that command.
> 
> Thanks!

Sorry, the patch drowned in my inbox and I missed it completely.

The commit message should be something like:

  main/mercurial: hotfix for running `hg archive` with gzip files on python 3.8.2+

It would also be good with a reference to upstream bug report or
upstream commit in the commit message.

I can clean up the message this time (but for the future to minimize
risk that I confuse it with other mailing lists).

Second, the patch needs to be rebased since mercurial was updated to
5.3.2 - unless this fixes the issue ofc.

Thanks!
Ludovic Chabant <ludovic@chabant.com>
Details
Message ID
<ecac8847-46f4-4cb3-bf6d-4fe84e93cdfb@www.fastmail.com>
In-Reply-To
<20200403185352.70ca07f9@ncopa-desktop.copa.dup.pw> (view parent)
DKIM signature
missing
Download raw message
> Second, the patch needs to be rebased since mercurial was updated to
> 5.3.2 - unless this fixes the issue ofc.

A glance at the 5.3.2 branch seems to indicate it actually contains the
proper fix... we're still pulling mercurial 5.3.1 on our servers though
so I'll have to investigate that. But this means this patch hotfix isn't
needed anymore.

Cheers!
Ludovic Chabant <ludovic@chabant.com>
Details
Message ID
<e0bd0813-eb28-4843-9c9b-d208b6976b68@www.fastmail.com>
In-Reply-To
<ecac8847-46f4-4cb3-bf6d-4fe84e93cdfb@www.fastmail.com> (view parent)
DKIM signature
missing
Download raw message
Hi again,
Can the new package (mercurial 5.3.2) be backported to Alpine stable so we can pull the latest mercurial there?
Thanks!
Details
Message ID
<20200406142742.45021e10@enterprise>
In-Reply-To
<e0bd0813-eb28-4843-9c9b-d208b6976b68@www.fastmail.com> (view parent)
DKIM signature
missing
Download raw message
On Mon, 06 Apr 2020 10:23:27 -0700
"Ludovic Chabant" <ludovic@chabant.com> wrote:

> Hi again,
> Can the new package (mercurial 5.3.2) be backported to Alpine stable
> so we can pull the latest mercurial there? Thanks!

See: https://gitlab.alpinelinux.org/alpine/aports/-/merge_requests/6394
Reply to thread Export thread (mbox)