From: voidlinux-github@inbox.vuxu.org
To: ml@inbox.vuxu.org
Subject: [PR PATCH] git: keep build flag consistent in all stage
Date: Fri, 01 Nov 2019 04:21:45 +0100 [thread overview]
Message-ID: <gh-mailinglist-notifications-41a7ca26-5023-4802-975b-f1789d68868e-void-packages-16019@inbox.vuxu.org> (raw)
[-- Attachment #1: Type: text/plain, Size: 1335 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/16019
git: keep build flag consistent in all stage
git build system will trigger a rebuild if it detects
if flags passed to make changed.
In commit 82a5337c07, ("git: correct utf-16 and utf-32 conversion on
musl", 2019-10-30) , we tried to correct the git-iconv interaction on
musl, but we forget to pass that flag into `make install'.
Hence, on do_install, git build system rebuild git without
ICONV_OMITS_BOM=Yes flag, thus produce faulty binary.
[Save that flag into config.mak][1] in order to keep it consistent across
build stage.
While we're at it, also move other make_*_args into config.mak
[1]: https://public-inbox.org/git/20191031181116.GC2133@sigill.intra.peff.net/
---
git make test isn't fully working in musl right now, so I couldn't find this earlier.
I'm proposing [a series of patch to git][2], if that series get merged,
we can run `./xbps-src check git` on musl. This mistake won't happen again.
[2]: https://public-inbox.org/git/20191101014006.GE30350@danh.dev/T/#re843bfd3d7b4e1592c6546e63d8c65ff57f564ef
A patch file from https://github.com/void-linux/void-packages/pull/16019.patch is attached
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-git-iconv-16019.patch --]
[-- Type: text/x-diff, Size: 4522 bytes --]
From 53d9b41a19fe319116b7969c9a6b069047314228 Mon Sep 17 00:00:00 2001
From: Doan Tran Cong Danh <congdanhqx@gmail.com>
Date: Fri, 1 Nov 2019 09:44:39 +0700
Subject: [PATCH 1/2] chroot-git: keep build flag consistent in all stage
git build system will trigger a rebuild if it detects
if flags passed to make changed.
In commit 886036d094, ("chroot-git: correct iconv usage on musl",
2019-10-30), we tried to correct the git-iconv interaction on musl,
but we forget to pass that flag into `make install'.
Hence, on do_install, git build system rebuild git without
ICONV_OMITS_BOM=Yes flag, thus produce faulty binary.
Save that flag into config.mak[1] in order to keep it consistent across
build stage.
While we're at it, also move other make_*_args into config.mak
[1]: https://public-inbox.org/git/20191031181116.GC2133@sigill.intra.peff.net/
---
srcpkgs/chroot-git/template | 15 +++++++++++----
1 file changed, 11 insertions(+), 4 deletions(-)
diff --git a/srcpkgs/chroot-git/template b/srcpkgs/chroot-git/template
index 578609243c5..47be736943e 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=2
+revision=3
bootstrap=yes
wrksrc="git-${version}"
build_style=gnu-configure
@@ -9,8 +9,6 @@ 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"
-make_build_args="CC_LD_DYNPATH=-L"
-make_install_args="NO_INSTALL_HARDLINKS=1"
makedepends="zlib-devel"
short_desc="GIT Tree History Storage Tool -- for xbps-src use"
maintainer="Enno Boland <gottox@voidlinux.org>"
@@ -28,11 +26,20 @@ fi
case "$XBPS_TARGET_MACHINE" in
*-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
+post_configure() {
+ cat <<-EOF >config.mak
+ CC_LD_DYNPATH=-L
+ NO_INSTALL_HARDLINKS=Yes
+ EOF
+ case "$XBPS_TARGET_MACHINE" in
+ *-musl) echo "ICONV_OMITS_BOM=Yes" >>config.mak ;;
+ esac
+}
+
do_install() {
# remove unneeded stuff.
make DESTDIR=${wrksrc}/build-tmp install
From 521aebbca43c86075302dd96fe08eb9f1239b1e4 Mon Sep 17 00:00:00 2001
From: Doan Tran Cong Danh <congdanhqx@gmail.com>
Date: Fri, 1 Nov 2019 09:44:39 +0700
Subject: [PATCH 2/2] git: keep build flag consistent in all stage
git build system will trigger a rebuild if it detects
if flags passed to make changed.
In commit 82a5337c07, ("git: correct utf-16 and utf-32 conversion on
musl", 2019-10-30) , we tried to correct the git-iconv interaction on
musl, but we forget to pass that flag into `make install'.
Hence, on do_install, git build system rebuild git without
ICONV_OMITS_BOM=Yes flag, thus produce faulty binary.
Save that flag into config.mak[1] in order to keep it consistent across
build stage.
While we're at it, also move other make_*_args into config.mak
[1]: https://public-inbox.org/git/20191031181116.GC2133@sigill.intra.peff.net/
---
srcpkgs/git/template | 16 ++++++++++++----
1 file changed, 12 insertions(+), 4 deletions(-)
diff --git a/srcpkgs/git/template b/srcpkgs/git/template
index 4287e24962a..774b789ac38 100644
--- a/srcpkgs/git/template
+++ b/srcpkgs/git/template
@@ -1,12 +1,10 @@
# Template file for 'git'
pkgname=git
version=2.23.0
-revision=2
+revision=3
build_style=gnu-configure
configure_args="--with-curl --with-expat --with-tcltk --with-libpcre2
ac_cv_snprintf_returns_bogus=no"
-make_install_args="NO_INSTALL_HARDLINKS=1 INSTALLDIRS=vendor
- perllibdir=/usr/share/perl5/vendor_perl"
make_check_target=test
hostmakedepends="asciidoc perl pkg-config tk xmlto"
makedepends="libglib-devel libcurl-devel libsecret-devel pcre2-devel tk-devel"
@@ -27,11 +25,21 @@ 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"
- make_build_args+=" ICONV_OMITS_BOM=Yes"
;;
*) configure_args+=" ac_cv_fread_reads_directories=no" ;;
esac
+post_configure() {
+ cat <<-EOF >config.mak
+ NO_INSTALL_HARDLINKS=Yes
+ INSTALLDIRS=vendor
+ perllibdir=/usr/share/perl5/vendor_perl
+ EOF
+ case "$XBPS_TARGET_MACHINE" in
+ *-musl) echo "ICONV_OMITS_BOM=Yes" >>config.mak ;;
+ esac
+}
+
post_build() {
make ${makejobs} -C Documentation man
make ${makejobs} -C contrib/contacts all git-contacts.1
next reply other threads:[~2019-11-01 3:21 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-11-01 3:21 voidlinux-github [this message]
2019-11-02 9:30 ` [PR PATCH] [Merged]: " 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-16019@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).