~dricottone/huttese-apk

b32d073e090c6085c17c04542c38e59096fe0a9d — Ludovic Chabant 4 years ago c42694d
Update mercurial package from aports main, add hotfix for python 3.8.2
2 files changed, 29 insertions(+), 7 deletions(-)

M sr.ht/mercurial/APKBUILD
A sr.ht/mercurial/archive_gzip.patch
M sr.ht/mercurial/APKBUILD => sr.ht/mercurial/APKBUILD +7 -7
@@ 1,12 1,13 @@
# Contributor: Sören Tempel <soeren+alpine@soeren-tempel.net>
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=mercurial
pkgver=5.1.2
pkgver=5.3.1
pkgrel=1
pkgdesc="Scalable distributed SCM tool"
url="https://www.mercurial-scm.org"
arch="all"
license="GPL-2.0-or-later"
depends="python3"
makedepends="python3-dev"
subpackages="
	$pkgname-doc


@@ 14,20 15,18 @@ 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:
#   - CVE-2019-3902

build() {
	cd "$builddir"
	PYTHON=python3 HGPYTHON3=1 python3 setup.py build
	HGPYTHON3=1 python3 setup.py build
}

package() {
	cd "$builddir"
	PYTHON=python3 HGPYTHON3=1 python3 setup.py install --root="$pkgdir"
	HGPYTHON3=1 python3 setup.py install --root="$pkgdir"
	install -m755 contrib/hgk contrib/hg-ssh hgeditor "$pkgdir"/usr/bin

	local man


@@ 66,4 65,5 @@ bashcomp() {
		"$subpkgdir"/usr/share/bash-completion/completions/$pkgname
}

sha512sums="a8ce9d9220a5ddf452264801f06e81fe1e699ff700d085e3f82c6877910c6ef0e594203590f198b7b9e31c9a1ed627c8fa2a3a1513d0c5087cf775835a78c408  mercurial-5.1.2.tar.gz"
sha512sums="3bc49ea96cb4ac0e777f667a3243917af495a001534b6b91141fc93b5c47a8eddc84331e1cb0b981fac1bf451dcfc91b8c538134983733466248fdc20afd39c6  mercurial-5.3.1.tar.gz
42974b580e5dafc562fdce9728b90f882a2cfb10c3c0adbd50d41382bd6bcf3a430be6fc81c52a3baa3955677999bf4662c5e5b5bc90891ba9c862ec27c448a2  archive_gzip.patch"

A sr.ht/mercurial/archive_gzip.patch => sr.ht/mercurial/archive_gzip.patch +22 -0
@@ 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