Github messages for voidlinux
 help / color / mirror / Atom feed
* [PR PATCH] git: correct utf-16 and utf-32 conversion on musl
@ 2019-10-30  9:40 voidlinux-github
  2019-10-30 14:53 ` [PR PATCH] [Merged]: " voidlinux-github
  0 siblings, 1 reply; 2+ messages in thread
From: voidlinux-github @ 2019-10-30  9:40 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 691 bytes --]

There is a new pull request by zdtcd against master on the void-packages repository

https://github.com/zdtcd/void-packages git-iconv
https://github.com/void-linux/void-packages/pull/15943

git: correct utf-16 and utf-32 conversion on musl
musl's iconv treats utf-{16,32} encoding as utf-{16,32}be,
without BOM, correctly according to POSIX.

However, most tools out there think differently.

Change the build flag for the musl system to fix it.

Together with my patch here:
https://github.com/git/git/commit/840c40cea11290d40fd455cc3b23d5793056f4d4

git's test: t0028 should be fine now.

A patch file from https://github.com/void-linux/void-packages/pull/15943.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-git-iconv-15943.patch --]
[-- Type: text/x-diff, Size: 2934 bytes --]

From 2e641d7ae9ca582003efb8d4d1816e177480f308 Mon Sep 17 00:00:00 2001
From: Doan Tran Cong Danh <congdanhqx@gmail.com>
Date: Wed, 30 Oct 2019 16:30:20 +0700
Subject: [PATCH 1/2] git: correct utf-16 and utf-32 conversion on musl

musl's iconv treats utf-{16,32} encoding as utf-{16,32}be,
without BOM, correctly according to POSIX.

However, most tools out there think differently.

Change the build flag for the musl system to fix it.

Together with my patch here:
https://github.com/git/git/commit/840c40cea11290d40fd455cc3b23d5793056f4d4

git's test: t0028 should be fine now.
---
 srcpkgs/git/template | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/srcpkgs/git/template b/srcpkgs/git/template
index 7081d7d4bfc..4287e24962a 100644
--- a/srcpkgs/git/template
+++ b/srcpkgs/git/template
@@ -1,7 +1,7 @@
 # Template file for 'git'
 pkgname=git
 version=2.23.0
-revision=1
+revision=2
 build_style=gnu-configure
 configure_args="--with-curl --with-expat --with-tcltk --with-libpcre2
  ac_cv_snprintf_returns_bogus=no"
@@ -13,7 +13,7 @@ makedepends="libglib-devel libcurl-devel libsecret-devel pcre2-devel tk-devel"
 # Required by https://
 depends="ca-certificates perl-Authen-SASL perl-MIME-tools perl-Net-SMTP-SSL"
 short_desc="Git Tree History Storage Tool"
-maintainer="Orphaned <orphan@voidlinux.org>"
+maintainer="Doan Tran Cong Danh <congdanhqx@gmail.com>"
 license="GPL-2.0-only"
 homepage="https://git-scm.com/"
 changelog="https://raw.githubusercontent.com/git/git/master/Documentation/RelNotes/${version}.txt"
@@ -25,7 +25,10 @@ register_shell=/usr/bin/git-shell
 subpackages="git-cvs git-svn gitk git-gui git-all git-libsecret"
 
 case "$XBPS_TARGET_MACHINE" in
-	*-musl) configure_args+=" ac_cv_fread_reads_directories=yes" ;;
+	*-musl)
+		configure_args+=" ac_cv_fread_reads_directories=yes"
+		make_build_args+=" ICONV_OMITS_BOM=Yes"
+		;;
 	*) configure_args+=" ac_cv_fread_reads_directories=no" ;;
 esac
 

From f3329b809d2c6109456b4847d1d865d8af44d926 Mon Sep 17 00:00:00 2001
From: Doan Tran Cong Danh <congdanhqx@gmail.com>
Date: Wed, 30 Oct 2019 16:38:01 +0700
Subject: [PATCH 2/2] chroot-git: correct iconv usage on musl

---
 srcpkgs/chroot-git/template | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/chroot-git/template b/srcpkgs/chroot-git/template
index a733b2e8124..578609243c5 100644
--- a/srcpkgs/chroot-git/template
+++ b/srcpkgs/chroot-git/template
@@ -1,7 +1,7 @@
 # Template file for 'chroot-git'
 pkgname=chroot-git
 version=2.23.0
-revision=1
+revision=2
 bootstrap=yes
 wrksrc="git-${version}"
 build_style=gnu-configure
@@ -26,7 +26,10 @@ else
 fi
 
 case "$XBPS_TARGET_MACHINE" in
-	*-musl) configure_args+=" ac_cv_fread_reads_directories=yes" ;;
+	*-musl)
+		configure_args+=" ac_cv_fread_reads_directories=yes"
+		make_build_args+=" ICONV_OMITS_BOM=Yes"
+		;;
 	*) configure_args+=" ac_cv_fread_reads_directories=no" ;;
 esac
 

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PR PATCH] [Merged]: git: correct utf-16 and utf-32 conversion on musl
  2019-10-30  9:40 [PR PATCH] git: correct utf-16 and utf-32 conversion on musl voidlinux-github
@ 2019-10-30 14:53 ` voidlinux-github
  0 siblings, 0 replies; 2+ messages in thread
From: voidlinux-github @ 2019-10-30 14:53 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 542 bytes --]

There's a merged pull request on the void-packages repository

git: correct utf-16 and utf-32 conversion on musl
https://github.com/void-linux/void-packages/pull/15943

Description:
musl's iconv treats utf-{16,32} encoding as utf-{16,32}be,
without BOM, correctly according to POSIX.

However, most tools out there think differently.

Change the build flag for the musl system to fix it.

Together with my patch here:
https://github.com/git/git/commit/840c40cea11290d40fd455cc3b23d5793056f4d4

git's test: t0028 should be fine now.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2019-10-30 14:53 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-10-30  9:40 [PR PATCH] git: correct utf-16 and utf-32 conversion on musl voidlinux-github
2019-10-30 14:53 ` [PR PATCH] [Merged]: " voidlinux-github

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).