Github messages for voidlinux
 help / color / mirror / Atom feed
From: voidlinux-github@inbox.vuxu.org
To: ml@inbox.vuxu.org
Subject: [PR PATCH] git: correct ac_cv_fread_reads_directories on all platforms
Date: Thu, 09 Jan 2020 15:36:23 +0100	[thread overview]
Message-ID: <gh-mailinglist-notifications-41a7ca26-5023-4802-975b-f1789d68868e-void-packages-18139@inbox.vuxu.org> (raw)

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

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

https://github.com/sgn/void-packages git-correct-freads
https://github.com/void-linux/void-packages/pull/18139

git: correct ac_cv_fread_reads_directories on all platforms 
From commit bf8bba6, (git: correct ac_cv_fread_reads_directories on
musl, 2018-11-14), we've correctly set ac_cv_fread_reads_directories for
git linked with musl-libc variant.

Unfortunately, glibc also allows fopen on directory. But, I was obsessed
with musl-libc at the time, hence forgot to run the test for glibc.

Correct it.

---

Discovered this problem when I run check on v2.25.0.rc2 in preparation for the next release.

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

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

From 27842716cf0f214cea9be7149321115d38bcd5b9 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C4=90o=C3=A0n=20Tr=E1=BA=A7n=20C=C3=B4ng=20Danh?=
 <congdanhqx@gmail.com>
Date: Thu, 9 Jan 2020 21:20:10 +0700
Subject: [PATCH 1/2] git: correct ac_cv_fread_reads_directories on all
 platforms

From commit bf8bba61b8, (git: correct ac_cv_fread_reads_directories on
musl, 2018-11-14), we've correctly set ac_cv_fread_reads_directories for
git linked with musl-libc variant.

Unfortunately, glibc also allows fopen on directory. But, I was obsessed
with musl-libc at the time, hence forgot to run the test for glibc.

Correct it.
---
 srcpkgs/git/template | 12 ++++--------
 1 file changed, 4 insertions(+), 8 deletions(-)

diff --git a/srcpkgs/git/template b/srcpkgs/git/template
index 7844b4b30ab..b413bacbbb7 100644
--- a/srcpkgs/git/template
+++ b/srcpkgs/git/template
@@ -1,17 +1,17 @@
 # Template file for 'git'
 pkgname=git
 version=2.24.1
-revision=1
+revision=2
 build_style=gnu-configure
 configure_args="--with-curl --with-expat --with-tcltk --with-libpcre2
- ac_cv_snprintf_returns_bogus=no"
+ ac_cv_snprintf_returns_bogus=no ac_cv_fread_reads_directories=yes"
 make_check_target=test
 hostmakedepends="asciidoc gettext perl pkg-config tar tk xmlto"
 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="Doan Tran Cong Danh <congdanhqx@gmail.com>"
+maintainer="Đoàn Trần Công 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"
@@ -23,11 +23,7 @@ register_shell=/usr/bin/git-shell
 subpackages="git-cvs git-svn gitk git-gui git-all git-libsecret git-netrc"
 
 case "$XBPS_TARGET_MACHINE" in
-	*-musl)
-		configure_args+=" ac_cv_fread_reads_directories=yes"
-		export GIT_SKIP_TESTS='t3900'
-		;;
-	*) configure_args+=" ac_cv_fread_reads_directories=no" ;;
+	*-musl) export GIT_SKIP_TESTS='t3900' ;;
 esac
 
 post_configure() {

From 14a02949f65b314ec1a390a88c0155748a2c242a Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C4=90o=C3=A0n=20Tr=E1=BA=A7n=20C=C3=B4ng=20Danh?=
 <congdanhqx@gmail.com>
Date: Thu, 9 Jan 2020 21:31:57 +0700
Subject: [PATCH 2/2] chroot-git: correct ac_cv_fread_reads_directories

From commit 9c0d651aa3, (chroot-git: update to 2.19.2., 2018-11-21),
ac_cv_fread_reads_directories for musl had been set to correct value,
but the value for glibc hadn't been corrected.

This oversight maybe caused by copy-pasted from my change in git's
template.

Correct it
---
 srcpkgs/chroot-git/template | 11 ++---------
 1 file changed, 2 insertions(+), 9 deletions(-)

diff --git a/srcpkgs/chroot-git/template b/srcpkgs/chroot-git/template
index a439e1d0414..60d484fdcba 100644
--- a/srcpkgs/chroot-git/template
+++ b/srcpkgs/chroot-git/template
@@ -1,14 +1,14 @@
 # Template file for 'chroot-git'
 pkgname=chroot-git
 version=2.24.1
-revision=1
+revision=2
 bootstrap=yes
 wrksrc="git-${version}"
 build_style=gnu-configure
 configure_args="--without-curl --without-openssl
  --without-python --without-expat --without-tcltk
  ac_cv_lib_curl_curl_global_init=no ac_cv_lib_expat_XML_ParserCreate=no
- ac_cv_snprintf_returns_bogus=no"
+ ac_cv_snprintf_returns_bogus=no ac_cv_fread_reads_directories=yes"
 makedepends="zlib-devel"
 short_desc="GIT Tree History Storage Tool -- for xbps-src use"
 maintainer="Enno Boland <gottox@voidlinux.org>"
@@ -23,13 +23,6 @@ else
 	configure_args+=" --with-zlib=${XBPS_MASTERDIR}/usr"
 fi
 
-case "$XBPS_TARGET_MACHINE" in
-	*-musl)
-		configure_args+=" ac_cv_fread_reads_directories=yes"
-		;;
-	*) configure_args+=" ac_cv_fread_reads_directories=no" ;;
-esac
-
 post_configure() {
 	cat <<-EOF >config.mak
 	CC_LD_DYNPATH=-L

             reply	other threads:[~2020-01-09 14:36 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-01-09 14:36 voidlinux-github [this message]
2020-01-09 17:57 ` [PR PATCH] [Merged]: " voidlinux-github
2020-01-09 17:57 ` voidlinux-github

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=gh-mailinglist-notifications-41a7ca26-5023-4802-975b-f1789d68868e-void-packages-18139@inbox.vuxu.org \
    --to=voidlinux-github@inbox.vuxu.org \
    --cc=ml@inbox.vuxu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).