package/glibc: switch to using the maintenance branch
PATCH v3 1/1 package/glibc: switch to using the maintenance branch
From: "Yann E. MORIN" <[email protected]>
glibc upstream has ruled against doing regular point-releases, but they do have a lot of interesting and important fixes for regressions and security.
Backporting each patch, or cherry-picking individual patches is off limits for us, so we just switch to using the currently-latest HEAD of the maintenance branch instead.
The version number is obtained with:
$ git describe --match 'glibc-*' --abbrev=40 origin/release/2.26/master
The alternative options were:
- download the tarball from the git tree
--> does nto work; not an option
- download the 2.26 tarball, and bundle the individual patches in
Buildroot
--> maintenance of patches is a burden; not an option - download the 2.26 tarball, maintain the list of patches to download from the git tree
--> not an option for the same reason
So we end up just doing a git clone. The git tree is today about ten times the size of the tarball, so a rough estimate makes it at about ten times the download time.
Also upstream doesn't officially provide an https download location [1]. There is one but it's not reliable, sometimes the connection time out and end-up with a corrupted git repo:
fatal: unable to access 'https://sourceware.org/git/glibc.git/': Failed to connect to sourceware.org port 443: Connection timed out
So switch to using a git mirror from github which is updated once a day [2]. This allow at the same time to clone the git repository faster.
Note: The glibc 2.26 patches are not keept for the arc toolchain since they are fixing an issue with the new float128 support introduced in x86, x86_64 and powerpc64le.
[1] https://sourceware.org/git/?p=glibc.git;a=summary
[2] https://github.com/bminor/glibc.git
---
v3: Bump to 4b692dffb95ac4812b161eb6a16113d7e824982e
Add a comment for version bump process with github mirror. Fix the hash comment.
v2: bump to 77eea8950ce5495ff033bca3465ccfd2db072ae6
Switch to github and add a comment to explain why.
--- ...__builtin_types_compatible_p-in-C-mode-bu.patch | 50 ----- ...02-Do-not-use-generic-selection-in-C-mode.patch | 56 ----- ...-version-of-issignaling-that-does-not-use.patch | 225 --------------------- ...ersion-of-issignaling-when-__NO_LONG_DOUB.patch | 47 ----- ...-version-of-iszero-that-does-not-use-__MA.patch | 210 ------------------- ...ify-use-the-builtin-when-optimizing-for-s.patch | 63 ------ package/glibc/glibc.hash | 4 +- package/glibc/glibc.mk | 13 +- 8 files changed, 12 insertions(+), 656 deletions(-) delete mode 100644 package/glibc/0001-Do-not-use-__builtin_types_compatible_p-in-C-mode-bu.patch delete mode 100644 package/glibc/0002-Do-not-use-generic-selection-in-C-mode.patch delete mode 100644 package/glibc/0003-Provide-a-C-version-of-issignaling-that-does-not-use.patch delete mode 100644 package/glibc/0004-Fix-the-C-version-of-issignaling-when-__NO_LONG_DOUB.patch delete mode 100644 package/glibc/0005-Provide-a-C-version-of-iszero-that-does-not-use-__MA.patch delete mode 100644 package/glibc/0006-Let-fpclassify-use-the-builtin-when-optimizing-for-s.patch
package/glibc/0001-Do-not-use-__builtin_types_compatible_p-in-C-mode-bu.patch deleted +0 -50
@@ -1,50 +0,0 @@ -From f7439f9b1089e17b6721f28e228682831a2f0135 Mon Sep 17 00:00:00 2001 -From: "Gabriel F. T. Gomes" <[email protected]> -Date: Mon, 21 Aug 2017 14:23:27 +0200 -Subject: [PATCH] Do not use __builtin_types_compatible_p in C++ mode (bug - 21930) - -The logic to define isinf for float128 depends on the availability of -__builtin_types_compatible_p, which is only available in C mode, -however, the conditionals do not check for C or C++ mode. This lead to -an error in libstdc++ configure, as reported by bug 21930. - -This patch adds a conditional for C mode in the definition of isinf for -float128. No definition is provided in C++ mode, since libstdc++ -headers undefine isinf. - -Tested for powerpc64le (glibc test suite and libstdc++-v3 configure). - - [BZ #21930] - * math/math.h (isinf): Check if in C or C++ mode before using - __builtin_types_compatible_p, since this is a C mode feature. - -(cherry picked from commit 47a67213a9f51c5f8816d240500b10db605d8b77) -[Romain rebase on glibc 2.26] -Signed-off-by: Romain Naour <[email protected]> ---- - math/math.h | 8 ++++++-- - 1 file changed, 6 insertions(+), 2 deletions(-) - -diff --git a/math/math.h b/math/math.h -index e217080..dea8dbe 100644 ---- a/math/math.h -+++ b/math/math.h -@@ -442,8 +442,12 @@ enum - - /* Return nonzero value if X is positive or negative infinity. */ - # if __HAVE_DISTINCT_FLOAT128 && !__GNUC_PREREQ (7,0) \ -- && !defined __SUPPORT_SNAN__ -- /* __builtin_isinf_sign is broken for float128 only before GCC 7.0. */ -+ && !defined __SUPPORT_SNAN__ && !defined __cplusplus -+ /* Since __builtin_isinf_sign is broken for float128 before GCC 7.0, -+ use the helper function, __isinff128, with older compilers. This is -+ only provided for C mode, because in C++ mode, GCC has no support -+ for __builtin_types_compatible_p (and when in C++ mode, this macro is -+ not used anyway, because libstdc++ headers undefine it). */ - # define isinf(x) \ - (__builtin_types_compatible_p (__typeof (x), _Float128) \ - ? __isinff128 (x) : __builtin_isinf_sign (x)) --- -2.9.5 -
package/glibc/0002-Do-not-use-generic-selection-in-C-mode.patch deleted +0 -56
56 lines not on this page · raw message
package/glibc/0003-Provide-a-C-version-of-issignaling-that-does-not-use.patch deleted +0 -225
225 lines not on this page · raw message
package/glibc/0004-Fix-the-C-version-of-issignaling-when-__NO_LONG_DOUB.patch deleted +0 -47
47 lines not on this page · raw message
package/glibc/0005-Provide-a-C-version-of-iszero-that-does-not-use-__MA.patch deleted +0 -210
210 lines not on this page · raw message
package/glibc/0006-Let-fpclassify-use-the-builtin-when-optimizing-for-s.patch deleted +0 -63
63 lines not on this page · raw message
package/glibc/glibc.hash +2 -2
@@ -1,4 +1,4 @@ -# Locally calculated after checking pgp signature (glibc) -sha256 e54e0a934cd2bc94429be79da5e9385898d2306b9eaf3c92d5a77af96190f6bd glibc-2.26.tar.xz +# Locally calculated (fetched from Github) +sha256 f1f2566fea1518dd7244d322882242bbd654eb215fba51a7ab001b8fd2c9bcbe glibc-glibc-2.26-73-g4b692dffb95ac4812b161eb6a16113d7e824982e.tar.gz # Locally calculated (fetched from Github) sha256 adf2dd19a76705a6fb748492eba30cb0be621422190116382a891a3cf099e895 glibc-arc-2017.09-eng010.tar.gz
package/glibc/glibc.mk +10 -3
@@ -9,9 +9,16 @@ GLIBC_VERSION = arc-2017.09-eng010 GLIBC_SITE = $(call github,foss-for-synopsys-dwc-arc-processors,glibc,$(GLIBC_VERSION)) GLIBC_SOURCE = glibc-$(GLIBC_VERSION).tar.gz else -GLIBC_VERSION = 2.26 -GLIBC_SITE = $(BR2_GNU_MIRROR)/libc -GLIBC_SOURCE = glibc-$(GLIBC_VERSION).tar.xz +# Generate version string using: +# git describe --match 'glibc-*' --abbrev=40 origin/release/MAJOR.MINOR/master +GLIBC_VERSION = glibc-2.26-73-g4b692dffb95ac4812b161eb6a16113d7e824982e +# Upstream doesn't officially provide an https download link. +# There is one (https://sourceware.org/git/glibc.git) but it's not reliable, +# sometimes the connection time out. So use a git mirror using https. +# Before bumping the version, first verify that the sha1 really +# exists on the git mirror tree. +GLIBC_SITE = https://github.com/bminor/glibc.git +GLIBC_SITE_METHOD = git endif GLIBC_SRC_SUBDIR = .
Signature · 1 line
2.9.5
PATCH v3 1/1 package/glibc: switch to using the maintenance branch
Romain, All,
On 2017-10-28 14:00 +0200, Romain Naour spake thusly:
Quoted 4 lines
From: "Yann E. MORIN" <[email protected]>
glibc upstream has ruled against doing regular point-releases, but they do have a lot of interesting and important fixes for regressions and security.
[--SNIP--]
Quoted 9 lines
package/glibc/glibc.mk +0
-1@@ -9,9 +9,16 @@ GLIBC_VERSION = arc-2017.09-eng010 GLIBC_SITE = $(call github,foss-for-synopsys-dwc-arc-processors,glibc,$(GLIBC_VERSION)) GLIBC_SOURCE = glibc-$(GLIBC_VERSION).tar.gz else -GLIBC_VERSION = 2.26
package/glibc/glibc.mk GLIBC_VERSION = arc-2017.09-eng010 · line 19
Quoted 10 lines
package/glibc/glibc.mk +8
-2-GLIBC_SITE = $(BR2_GNU_MIRROR)/libc -GLIBC_SOURCE = glibc-$(GLIBC_VERSION).tar.xz +# Generate version string using: +# git describe --match 'glibc-*' --abbrev=40 origin/release/MAJOR.MINOR/master +GLIBC_VERSION = glibc-2.26-73-g4b692dffb95ac4812b161eb6a16113d7e824982e +# Upstream doesn't officially provide an https download link. +# There is one (https://sourceware.org/git/glibc.git) but it's not reliable, +# sometimes the connection time out. So use a git mirror using https. +# Before bumping the version, first verify that the sha1 really +# exists on the git mirror tree.
No, I really meant "exists in the official git tree".
The idea is that we use the gthub mirror, but it is not official. So nothing guarantees us that it only contains legit commits.
So, we want to get the version from the *official* git tree, and only do the download from the mirror.
Quoted 8 lines
package/glibc/glibc.mk +2
-0+GLIBC_SITE = https://github.com/bminor/glibc.git +GLIBC_SITE_METHOD = git endif GLIBC_SRC_SUBDIR = .Signature · 1 line
2.9.5
Signature · 6 lines
.-----------------.--------------------.------------------.--------------------. | Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: | | +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ | | +33 223 225 172 `------------.-------: X AGAINST | \e/ There is no | | http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. | '------------------------------^-------^------------------^--------------------'
PATCH v3 1/1 package/glibc: switch to using the maintenance branch
Yann, Thomas, All,
Le 28/10/2017 ? 15:24, Yann E. MORIN a ?crit?:
Quoted 30 lines
Romain, All,
On 2017-10-28 14:00 +0200, Romain Naour spake thusly:
Quoted 4 lines
From: "Yann E. MORIN" <[email protected]>
glibc upstream has ruled against doing regular point-releases, but they do have a lot of interesting and important fixes for regressions and security.[--SNIP--]
Quoted 9 lines
package/glibc/glibc.mk +0
-1@@ -9,9 +9,16 @@ GLIBC_VERSION = arc-2017.09-eng010 GLIBC_SITE = $(call github,foss-for-synopsys-dwc-arc-processors,glibc,$(GLIBC_VERSION)) GLIBC_SOURCE = glibc-$(GLIBC_VERSION).tar.gz else -GLIBC_VERSION = 2.26package/glibc/glibc.mk GLIBC_VERSION = arc-2017.09-eng010 · line 19
Quoted 10 lines
package/glibc/glibc.mk +8
-2-GLIBC_SITE = $(BR2_GNU_MIRROR)/libc -GLIBC_SOURCE = glibc-$(GLIBC_VERSION).tar.xz +# Generate version string using: +# git describe --match 'glibc-*' --abbrev=40 origin/release/MAJOR.MINOR/master +GLIBC_VERSION = glibc-2.26-73-g4b692dffb95ac4812b161eb6a16113d7e824982e +# Upstream doesn't officially provide an https download link. +# There is one (https://sourceware.org/git/glibc.git) but it's not reliable, +# sometimes the connection time out. So use a git mirror using https. +# Before bumping the version, first verify that the sha1 really +# exists on the git mirror tree.No, I really meant "exists in the official git tree".
Quoted 2 lines
The idea is that we use the gthub mirror, but it is not official. So nothing guarantees us that it only contains legit commits.
bminor seems really used as mirror of the official repo, so no new commit appear from here.
Quoted 3 lines
So, we want to get the version from the *official* git tree, and only do the download from the mirror.
Right obviously, but remember that the github mirror is sync each day from the upstream repo. So if you use a sha1 from the upstream repo (ex: stable branch HEAD), you have to make sure that the same commit is also present in the git mirror.
I guess we should extend the comment for both cases.
Best regards,
Romain
Quoted 10 lines
Quoted 9 lines
package/glibc/glibc.mk +2
-0+GLIBC_SITE = https://github.com/bminor/glibc.git +GLIBC_SITE_METHOD = git endif GLIBC_SRC_SUBDIR = .Signature · 1 line
2.9.5
PATCH v3 1/1 package/glibc: switch to using the maintenance branch
Romain, All,
On 2017-10-28 16:03 +0200, Romain Naour spake thusly:
Quoted 31 lines
Le 28/10/2017 ? 15:24, Yann E. MORIN a ?crit?:
Quoted 30 lines
Romain, All,
On 2017-10-28 14:00 +0200, Romain Naour spake thusly:
Quoted 4 lines
From: "Yann E. MORIN" <[email protected]>
glibc upstream has ruled against doing regular point-releases, but they do have a lot of interesting and important fixes for regressions and security.[--SNIP--]
Quoted 9 lines
package/glibc/glibc.mk +0
-1@@ -9,9 +9,16 @@ GLIBC_VERSION = arc-2017.09-eng010 GLIBC_SITE = $(call github,foss-for-synopsys-dwc-arc-processors,glibc,$(GLIBC_VERSION)) GLIBC_SOURCE = glibc-$(GLIBC_VERSION).tar.gz else -GLIBC_VERSION = 2.26package/glibc/glibc.mk GLIBC_VERSION = arc-2017.09-eng010 · line 19
Quoted 10 lines
package/glibc/glibc.mk +8
-2-GLIBC_SITE = $(BR2_GNU_MIRROR)/libc -GLIBC_SOURCE = glibc-$(GLIBC_VERSION).tar.xz +# Generate version string using: +# git describe --match 'glibc-*' --abbrev=40 origin/release/MAJOR.MINOR/master +GLIBC_VERSION = glibc-2.26-73-g4b692dffb95ac4812b161eb6a16113d7e824982e +# Upstream doesn't officially provide an https download link. +# There is one (https://sourceware.org/git/glibc.git) but it's not reliable, +# sometimes the connection time out. So use a git mirror using https. +# Before bumping the version, first verify that the sha1 really +# exists on the git mirror tree.No, I really meant "exists in the official git tree".
Quoted 5 lines
Quoted 2 lines
The idea is that we use the gthub mirror, but it is not official. So nothing guarantees us that it only contains legit commits.
bminor seems really used as mirror of the official repo, so no new commit appear from here.
Yet, it really is advertised as an "Unofficial mirror of sourceware glibc repository." As such, we can't trust it at all, whatever the current situation is.
Quoted 8 lines
Quoted 2 lines
So, we want to get the version from the *official* git tree, and only do the download from the mirror.
Right obviously, but remember that the github mirror is sync each day from the upstream repo. So if you use a sha1 from the upstream repo (ex: stable branch HEAD), you have to make sure that the same commit is also present in the git mirror.
I guess we should extend the comment for both cases.
What about:
# When updating the version, check it on the official repository; # *NEVER* decide on a version string by looking at the mirror. # Then check that the mirror has been synced already (happens once # a day.)
Regards,
Yann E. MORIN.
Quoted 14 lines
Best regards,
RomainQuoted 10 lines
Quoted 9 lines
package/glibc/glibc.mk +2
-0+GLIBC_SITE = https://github.com/bminor/glibc.git +GLIBC_SITE_METHOD = git endif GLIBC_SRC_SUBDIR = .Signature · 1 line
2.9.5
Signature · 6 lines
.-----------------.--------------------.------------------.--------------------. | Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: | | +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ | | +33 223 225 172 `------------.-------: X AGAINST | \e/ There is no | | http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. | '------------------------------^-------^------------------^--------------------'
PATCH v3 1/1 package/glibc: switch to using the maintenance branch
Yann, All,
Le 28/10/2017 ? 16:50, Yann E. MORIN a ?crit?:
Quoted 51 lines
Romain, All,
On 2017-10-28 16:03 +0200, Romain Naour spake thusly:
Quoted 31 lines
Le 28/10/2017 ? 15:24, Yann E. MORIN a ?crit?:
Quoted 30 lines
Romain, All,
On 2017-10-28 14:00 +0200, Romain Naour spake thusly:
Quoted 4 lines
From: "Yann E. MORIN" <[email protected]>
glibc upstream has ruled against doing regular point-releases, but they do have a lot of interesting and important fixes for regressions and security.[--SNIP--]
Quoted 9 lines
package/glibc/glibc.mk +0
-1@@ -9,9 +9,16 @@ GLIBC_VERSION = arc-2017.09-eng010 GLIBC_SITE = $(call github,foss-for-synopsys-dwc-arc-processors,glibc,$(GLIBC_VERSION)) GLIBC_SOURCE = glibc-$(GLIBC_VERSION).tar.gz else -GLIBC_VERSION = 2.26package/glibc/glibc.mk GLIBC_VERSION = arc-2017.09-eng010 · line 19
Quoted 10 lines
package/glibc/glibc.mk +8
-2-GLIBC_SITE = $(BR2_GNU_MIRROR)/libc -GLIBC_SOURCE = glibc-$(GLIBC_VERSION).tar.xz +# Generate version string using: +# git describe --match 'glibc-*' --abbrev=40 origin/release/MAJOR.MINOR/master +GLIBC_VERSION = glibc-2.26-73-g4b692dffb95ac4812b161eb6a16113d7e824982e +# Upstream doesn't officially provide an https download link. +# There is one (https://sourceware.org/git/glibc.git) but it's not reliable, +# sometimes the connection time out. So use a git mirror using https. +# Before bumping the version, first verify that the sha1 really +# exists on the git mirror tree.No, I really meant "exists in the official git tree".
Quoted 5 lines
Quoted 2 lines
The idea is that we use the gthub mirror, but it is not official. So nothing guarantees us that it only contains legit commits.
bminor seems really used as mirror of the official repo, so no new commit appear from here.
Yet, it really is advertised as an "Unofficial mirror of sourceware glibc repository." As such, we can't trust it at all, whatever the current situation is.
Quoted 7 lines
Quoted 2 lines
So, we want to get the version from the *official* git tree, and only do the download from the mirror.
Right obviously, but remember that the github mirror is sync each day from the upstream repo. So if you use a sha1 from the upstream repo (ex: stable branch HEAD), you have to make sure that the same commit is also present in the git mirror.
Quoted 8 lines
Quoted 1 line
I guess we should extend the comment for both cases.
What about:
# When updating the version, check it on the official repository; # *NEVER* decide on a version string by looking at the mirror. # Then check that the mirror has been synced already (happens once # a day.)
I'm ok with this comment.
Should I send a v4 or it can be fixed while applied ?
Best regards,
Romain
Quoted 19 lines
Regards,
Yann E. MORIN.Quoted 14 lines
Best regards,
RomainQuoted 10 lines
Quoted 9 lines
package/glibc/glibc.mk +2
-0+GLIBC_SITE = https://github.com/bminor/glibc.git +GLIBC_SITE_METHOD = git endif GLIBC_SRC_SUBDIR = .Signature · 1 line
2.9.5