Browse code

glibc: update to 2.31

Added python3 and python3-libs to publishedrpms, as python3
is now required to build glibc.

Cleanup glibc make check errors. Make check passes.

Extras:
- openssh: add couple more syscalls to seccomp filter
- fix ToolChainUtils builder when running as non-root
- fix compilation issue with new glibc for:
* gcc
* grpc
* libselinux
* lttng-tools
* lttng-ust
* powershell
* sendmail

Change-Id: I57128402efe6da33e605daeefbf7bd120e26ca1c
Reviewed-on: http://photon-jenkins.eng.vmware.com:8082/9259
Tested-by: michellew <michellew@vmware.com>
Reviewed-by: Anish Swaminathan <anishs@vmware.com>

Alexey Makhalov authored on 2020/03/14 17:17:31
Showing 26 changed files
... ...
@@ -3,7 +3,7 @@
3 3
 Summary:        Contains the GNU compiler collection
4 4
 Name:           gcc
5 5
 Version:        7.3.0
6
-Release:        5%{?dist}
6
+Release:        6%{?dist}
7 7
 License:        GPLv2+
8 8
 URL:            http://gcc.gnu.org
9 9
 Group:          Development/Tools
... ...
@@ -14,6 +14,8 @@ Source0:        http://ftp.gnu.org/gnu/gcc/%{name}-%{version}/%{name}-%{version}
14 14
 Patch0:         PLUGIN_TYPE_CAST.patch
15 15
 Patch1:         libsanitizer-avoidustat.h-glibc-2.28.patch
16 16
 Patch2:         090_all_pr55930-dependency-tracking.patch
17
+Patch3:         glibc-2.31-libsanitizer-1.patch
18
+Patch4:         glibc-2.31-libsanitizer-2.patch
17 19
 Requires:       libstdc++-devel = %{version}-%{release}
18 20
 Requires:       libgcc-devel = %{version}-%{release}
19 21
 Requires:       libgomp-devel = %{version}-%{release}
... ...
@@ -89,6 +91,8 @@ This package contains development headers and static library for libgomp
89 89
 %patch0 -p1
90 90
 %patch1 -p1
91 91
 %patch2 -p1
92
+%patch3 -p1
93
+%patch4 -p1
92 94
 
93 95
 # disable no-pie for gcc binaries
94 96
 sed -i '/^NO_PIE_CFLAGS = /s/@NO_PIE_CFLAGS@//' gcc/Makefile.in
... ...
@@ -208,6 +212,8 @@ make %{?_smp_mflags} check-gcc
208 208
 %{_lib64dir}/libgomp.spec
209 209
 
210 210
 %changelog
211
+*   Tue Mar 24 2020 Alexey Makhalov <amakhalov@vmware.com> 7.3.0-6
212
+-   Fix compilation issue with glibc-2.31
211 213
 *   Tue Nov 06 2018 Alexey Makhalov <amakhalov@vmware.com> 7.3.0-5
212 214
 -   Cross compilation support
213 215
 *   Fri Nov 02 2018 Alexey Makhalov <amakhalov@vmware.com> 7.3.0-4
214 216
new file mode 100644
... ...
@@ -0,0 +1,36 @@
0
+From ce9568e9e9cf6094be30e748821421e703754ffc Mon Sep 17 00:00:00 2001
1
+From: Jakub Jelinek <jakub@redhat.com>
2
+Date: Fri, 8 Nov 2019 19:53:18 +0100
3
+Subject: [PATCH] backport: re PR sanitizer/92154 (new glibc breaks arm
4
+ bootstrap due to libsanitizer)
5
+
6
+	Backported from mainline
7
+	2019-10-22  Tamar Christina  <tamar.christina@arm.com>
8
+
9
+	PR sanitizer/92154
10
+	* sanitizer_common/sanitizer_platform_limits_posix.cc:
11
+	Cherry-pick compiler-rt revision r375220.
12
+
13
+From-SVN: r277981
14
+---
15
+ .../sanitizer_common/sanitizer_platform_limits_posix.cc  | 6 +++++-
16
+ 1 files changed, 5 insertions(+), 1 deletion(-)
17
+
18
+diff --git a/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.cc b/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.cc
19
+index 6cd4a5bac8b0..06a605ff4670 100644
20
+--- a/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.cc
21
+@@ -1156,8 +1156,12 @@ CHECK_SIZE_AND_OFFSET(ipc_perm, uid);
22
+ CHECK_SIZE_AND_OFFSET(ipc_perm, gid);
23
+ CHECK_SIZE_AND_OFFSET(ipc_perm, cuid);
24
+ CHECK_SIZE_AND_OFFSET(ipc_perm, cgid);
25
+-#if !defined(__aarch64__) || !SANITIZER_LINUX || __GLIBC_PREREQ (2, 21)
26
++#if (!defined(__aarch64__) || !SANITIZER_LINUX || __GLIBC_PREREQ (2, 21)) && \
27
++    !defined(__arm__)
28
+ /* On aarch64 glibc 2.20 and earlier provided incorrect mode field.  */
29
++/* On Arm glibc 2.31 and later provide a different mode field, this field is
30
++   never used by libsanitizer so we can simply ignore this assert for all glibc
31
++   versions.  */
32
+ CHECK_SIZE_AND_OFFSET(ipc_perm, mode);
33
+ #endif
34
+ 
0 35
new file mode 100644
... ...
@@ -0,0 +1,72 @@
0
+From 75003cdd23c310ec385344e8040d490e8dd6d2be Mon Sep 17 00:00:00 2001
1
+From: Jakub Jelinek <jakub@redhat.com>
2
+Date: Fri, 20 Dec 2019 17:58:35 +0100
3
+Subject: [PATCH] backport: re PR sanitizer/92154 (new glibc breaks arm
4
+ bootstrap due to libsanitizer)
5
+
6
+	Backported from mainline
7
+	2019-11-26  Jakub Jelinek  <jakub@redhat.com>
8
+
9
+	PR sanitizer/92154
10
+	* sanitizer_common/sanitizer_platform_limits_posix.h: Cherry-pick
11
+	llvm-project revision 947f9692440836dcb8d88b74b69dd379d85974ce.
12
+	* sanitizer_common/sanitizer_platform_limits_posix.cc: Likewise.
13
+
14
+From-SVN: r279653
15
+---
16
+ .../sanitizer_platform_limits_posix.cc            |  9 +++------
17
+ .../sanitizer_platform_limits_posix.h             | 15 +--------------
18
+ 2 files changed, 4 insertions(+), 20 deletions(-)
19
+
20
+diff --git a/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.cc b/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.cc
21
+index 06a605ff4670..d823a12190c0 100644
22
+--- a/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.cc
23
+@@ -1156,12 +1156,9 @@ CHECK_SIZE_AND_OFFSET(ipc_perm, uid);
24
+ CHECK_SIZE_AND_OFFSET(ipc_perm, gid);
25
+ CHECK_SIZE_AND_OFFSET(ipc_perm, cuid);
26
+ CHECK_SIZE_AND_OFFSET(ipc_perm, cgid);
27
+-#if (!defined(__aarch64__) || !SANITIZER_LINUX || __GLIBC_PREREQ (2, 21)) && \
28
+-    !defined(__arm__)
29
+-/* On aarch64 glibc 2.20 and earlier provided incorrect mode field.  */
30
+-/* On Arm glibc 2.31 and later provide a different mode field, this field is
31
+-   never used by libsanitizer so we can simply ignore this assert for all glibc
32
+-   versions.  */
33
++#if !SANITIZER_LINUX || __GLIBC_PREREQ (2, 31)
34
++/* glibc 2.30 and earlier provided 16-bit mode field instead of 32-bit
35
++   on many architectures.  */
36
+ CHECK_SIZE_AND_OFFSET(ipc_perm, mode);
37
+ #endif
38
+ 
39
+diff --git a/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.h b/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.h
40
+index 73af92af1e8f..6a673a7c9959 100644
41
+--- a/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.h
42
+@@ -211,26 +211,13 @@ namespace __sanitizer {
43
+     u64 __unused1;
44
+     u64 __unused2;
45
+-#elif defined(__mips__) || defined(__aarch64__) || defined(__s390x__)
46
+-    unsigned int mode;
47
+-    unsigned short __seq;
48
+-    unsigned short __pad1;
49
+-    unsigned long __unused1;
50
+-    unsigned long __unused2;
51
+ #elif defined(__sparc__)
52
+-# if defined(__arch64__)
53
+     unsigned mode;
54
+-    unsigned short __pad1;
55
+-# else
56
+-    unsigned short __pad1;
57
+-    unsigned short mode;
58
+     unsigned short __pad2;
59
+-# endif
60
+     unsigned short __seq;
61
+     unsigned long long __unused1;
62
+     unsigned long long __unused2;
63
+ #else
64
+-    unsigned short mode;
65
+-    unsigned short __pad1;
66
++    unsigned int mode;
67
+     unsigned short __seq;
68
+     unsigned short __pad2;
69
+ #if defined(__x86_64__) && !defined(_LP64)
... ...
@@ -218,16 +218,16 @@ index 54e406b..29787a5 100644
218 218
 +}
219 219
 +
220 220
  #if USE_TCACHE
221
- static inline int
222
- __always_inline
221
+ static __always_inline int
222
+ do_set_tcache_max (size_t value)
223 223
 @@ -5237,6 +5263,11 @@ __libc_mallopt (int param_number, int value)
224 224
        if (value > 0)
225
- 	do_set_arena_max (value);
225
+ 	res = do_set_arena_max (value);
226 226
        break;
227 227
 +
228 228
 +    case M_ARENA_STICKINESS:
229 229
 +      if (value > 0)
230
-+	do_set_arena_stickiness (value);
230
++	res = do_set_arena_stickiness (value);
231 231
 +      break;
232 232
      }
233 233
    __libc_lock_unlock (av->mutex);
234 234
deleted file mode 100644
... ...
@@ -1,33 +0,0 @@
1
-From 583dd860d5b833037175247230a328f0050dbfe9 Mon Sep 17 00:00:00 2001
2
-From: Paul Eggert <eggert@cs.ucla.edu>
3
-Date: Mon, 21 Jan 2019 11:08:13 -0800
4
-Subject: [PATCH] regex: fix read overrun [BZ #24114]
5
-
6
-Problem found by AddressSanitizer, reported by Hongxu Chen in:
7
-https://debbugs.gnu.org/34140
8
-* posix/regexec.c (proceed_next_node):
9
-Do not read past end of input buffer.
10
- posix/regexec.c |  6 ++++--
11
- 1 file changed, 3 insertions(+), 3 deletions(-)
12
-
13
-diff --git a/posix/regexec.c b/posix/regexec.c
14
-index 91d5a79..084b122 100644
15
-+++ b/posix/regexec.c
16
-@@ -1293,8 +1293,10 @@ proceed_next_node (const re_match_context_t *mctx, Idx nregs, regmatch_t *regs,
17
- 	      else if (naccepted)
18
- 		{
19
- 		  char *buf = (char *) re_string_get_buffer (&mctx->input);
20
--		  if (memcmp (buf + regs[subexp_idx].rm_so, buf + *pidx,
21
--			      naccepted) != 0)
22
-+		  if (mctx->input.valid_len - *pidx < naccepted
23
-+		      || (memcmp (buf + regs[subexp_idx].rm_so, buf + *pidx,
24
-+				  naccepted)
25
-+			  != 0))
26
- 		    return -1;
27
- 		}
28
- 	    }
29
-2.9.3
30
-
31 1
deleted file mode 100644
... ...
@@ -1,72 +0,0 @@
1
-Submitted By:            Armin K. <krejzi at email dot com>
2
-Date:                    2013-02-11
3
-Initial Package Version: 2.17
4
-Upstream Status:         Not Applicable
5
-Origin:                  Self
6
-Description:             This patch removes references to /var/db directory which is not part
7
-                         of FHS and replaces them with more suitable directories in /var
8
-                         hierarchy - /var/cache/nscd for nscd and /var/lib/nss_db for nss_db.
9
-
10
-+++ b/Makeconfig	2013-02-11 01:32:32.500667439 +0100
11
-@@ -250,7 +250,7 @@
12
- 
13
- # Directory for the database files and Makefile for nss_db.
14
- ifndef vardbdir
15
--vardbdir = $(localstatedir)/db
16
-+vardbdir = $(localstatedir)/lib/nss_db
17
- endif
18
- inst_vardbdir = $(install_root)$(vardbdir)
19
- 
20
-+++ b/nscd/nscd.h	2013-02-11 01:32:32.500667439 +0100
21
-@@ -112,11 +112,11 @@
22
- 
23
- 
24
- /* Paths of the file for the persistent storage.  */
25
--#define _PATH_NSCD_PASSWD_DB	"/var/db/nscd/passwd"
26
--#define _PATH_NSCD_GROUP_DB	"/var/db/nscd/group"
27
--#define _PATH_NSCD_HOSTS_DB	"/var/db/nscd/hosts"
28
--#define _PATH_NSCD_SERVICES_DB	"/var/db/nscd/services"
29
--#define _PATH_NSCD_NETGROUP_DB	"/var/db/nscd/netgroup"
30
-+#define _PATH_NSCD_PASSWD_DB	"/var/cache/nscd/passwd"
31
-+#define _PATH_NSCD_GROUP_DB	"/var/cache/nscd/group"
32
-+#define _PATH_NSCD_HOSTS_DB	"/var/cache/nscd/hosts"
33
-+#define _PATH_NSCD_SERVICES_DB	"/var/cache/nscd/services"
34
-+#define _PATH_NSCD_NETGROUP_DB	"/var/cache/nscd/netgroup"
35
- 
36
- /* Path used when not using persistent storage.  */
37
- #define _PATH_NSCD_XYZ_DB_TMP	"/var/run/nscd/dbXXXXXX"
38
-+++ b/nss/db-Makefile	2013-02-11 01:32:32.500667439 +0100
39
-@@ -22,7 +22,7 @@
40
- 		       /etc/rpc /etc/services /etc/shadow /etc/gshadow \
41
- 		       /etc/netgroup)
42
- 
43
--VAR_DB = /var/db
44
-+VAR_DB = /var/lib/nss_db
45
- 
46
- AWK = awk
47
- MAKEDB = makedb --quiet
48
-+++ b/sysdeps/generic/paths.h	2013-02-11 01:32:32.500667439 +0100
49
-@@ -68,7 +68,7 @@
50
- /* Provide trailing slash, since mostly used for building pathnames. */
51
- #define	_PATH_DEV	"/dev/"
52
- #define	_PATH_TMP	"/tmp/"
53
--#define	_PATH_VARDB	"/var/db/"
54
-+#define	_PATH_VARDB	"/var/lib/nss_db/"
55
- #define	_PATH_VARRUN	"/var/run/"
56
- #define	_PATH_VARTMP	"/var/tmp/"
57
- 
58
-+++ b/sysdeps/unix/sysv/linux/paths.h	2013-02-11 01:32:32.504000831 +0100
59
-@@ -68,7 +68,7 @@
60
- /* Provide trailing slash, since mostly used for building pathnames. */
61
- #define	_PATH_DEV	"/dev/"
62
- #define	_PATH_TMP	"/tmp/"
63
--#define	_PATH_VARDB	"/var/db/"
64
-+#define	_PATH_VARDB	"/var/lib/nss_db/"
65
- #define	_PATH_VARRUN	"/var/run/"
66
- #define	_PATH_VARTMP	"/var/tmp/"
67
- 
68 1
deleted file mode 100644
... ...
@@ -1,37 +0,0 @@
1
-From: Florian Weimer <fweimer@redhat.com>
2
-Date: Tue, 27 Nov 2018 15:12:43 +0000 (+0100)
3
-Subject: CVE-2018-19591: if_nametoindex: Fix descriptor for overlong name [BZ #23927]
4
-X-Git-Url: https://sourceware.org/git/gitweb.cgi?p=glibc.git;a=commitdiff_plain;h=d527c860f5a3f0ed687bd03f0cb464612dc23408
5
-
6
-CVE-2018-19591: if_nametoindex: Fix descriptor for overlong name [BZ #23927]
7
-
8
-diff --git a/sysdeps/unix/sysv/linux/if_index.c b/sysdeps/unix/sysv/linux/if_index.c
9
-index e3d0898..782fc5e 100644
10
-+++ b/sysdeps/unix/sysv/linux/if_index.c
11
-@@ -38,11 +38,6 @@ __if_nametoindex (const char *ifname)
12
-   return 0;
13
- #else
14
-   struct ifreq ifr;
15
--  int fd = __opensock ();
16
--
17
--  if (fd < 0)
18
--    return 0;
19
--
20
-   if (strlen (ifname) >= IFNAMSIZ)
21
-     {
22
-       __set_errno (ENODEV);
23
-@@ -50,6 +45,12 @@ __if_nametoindex (const char *ifname)
24
-     }
25
- 
26
-   strncpy (ifr.ifr_name, ifname, sizeof (ifr.ifr_name));
27
-+
28
-+  int fd = __opensock ();
29
-+
30
-+  if (fd < 0)
31
-+    return 0;
32
-+
33
-   if (__ioctl (fd, SIOCGIFINDEX, &ifr) < 0)
34
-     {
35
-       int saved_errno = errno;
36 1
new file mode 100644
... ...
@@ -0,0 +1,72 @@
0
+Submitted By:            Armin K. <krejzi at email dot com>
1
+Date:                    2013-02-11
2
+Initial Package Version: 2.17
3
+Upstream Status:         Not Applicable
4
+Origin:                  Self
5
+Description:             This patch removes references to /var/db directory which is not part
6
+                         of FHS and replaces them with more suitable directories in /var
7
+                         hierarchy - /var/cache/nscd for nscd and /var/lib/nss_db for nss_db.
8
+
9
+--- a/Makeconfig	2012-12-25 04:02:13.000000000 +0100
10
+@@ -250,7 +250,7 @@
11
+ 
12
+ # Directory for the database files and Makefile for nss_db.
13
+ ifndef vardbdir
14
+-vardbdir = $(localstatedir)/db
15
++vardbdir = $(localstatedir)/lib/nss_db
16
+ endif
17
+ inst_vardbdir = $(install_root)$(vardbdir)
18
+ 
19
+--- a/nscd/nscd.h	2012-12-25 04:02:13.000000000 +0100
20
+@@ -112,11 +112,11 @@
21
+ 
22
+ 
23
+ /* Paths of the file for the persistent storage.  */
24
+-#define _PATH_NSCD_PASSWD_DB	"/var/db/nscd/passwd"
25
+-#define _PATH_NSCD_GROUP_DB	"/var/db/nscd/group"
26
+-#define _PATH_NSCD_HOSTS_DB	"/var/db/nscd/hosts"
27
+-#define _PATH_NSCD_SERVICES_DB	"/var/db/nscd/services"
28
+-#define _PATH_NSCD_NETGROUP_DB	"/var/db/nscd/netgroup"
29
++#define _PATH_NSCD_PASSWD_DB	"/var/cache/nscd/passwd"
30
++#define _PATH_NSCD_GROUP_DB	"/var/cache/nscd/group"
31
++#define _PATH_NSCD_HOSTS_DB	"/var/cache/nscd/hosts"
32
++#define _PATH_NSCD_SERVICES_DB	"/var/cache/nscd/services"
33
++#define _PATH_NSCD_NETGROUP_DB	"/var/cache/nscd/netgroup"
34
+ 
35
+ /* Path used when not using persistent storage.  */
36
+ #define _PATH_NSCD_XYZ_DB_TMP	"/var/run/nscd/dbXXXXXX"
37
+--- a/nss/db-Makefile	2012-12-25 04:02:13.000000000 +0100
38
+@@ -22,7 +22,7 @@
39
+ 		       /etc/rpc /etc/services /etc/shadow /etc/gshadow \
40
+ 		       /etc/netgroup)
41
+ 
42
+-VAR_DB = /var/db
43
++VAR_DB = /var/lib/nss_db
44
+ 
45
+ AWK = awk
46
+ MAKEDB = makedb --quiet
47
+--- a/sysdeps/generic/paths.h	2012-12-25 04:02:13.000000000 +0100
48
+@@ -68,7 +68,7 @@
49
+ /* Provide trailing slash, since mostly used for building pathnames. */
50
+ #define	_PATH_DEV	"/dev/"
51
+ #define	_PATH_TMP	"/tmp/"
52
+-#define	_PATH_VARDB	"/var/db/"
53
++#define	_PATH_VARDB	"/var/lib/nss_db/"
54
+ #define	_PATH_VARRUN	"/var/run/"
55
+ #define	_PATH_VARTMP	"/var/tmp/"
56
+ 
57
+--- a/sysdeps/unix/sysv/linux/paths.h	2012-12-25 04:02:13.000000000 +0100
58
+@@ -68,7 +68,7 @@
59
+ /* Provide trailing slash, since mostly used for building pathnames. */
60
+ #define	_PATH_DEV	"/dev/"
61
+ #define	_PATH_TMP	"/tmp/"
62
+-#define	_PATH_VARDB	"/var/db/"
63
++#define	_PATH_VARDB	"/var/lib/nss_db/"
64
+ #define	_PATH_VARRUN	"/var/run/"
65
+ #define	_PATH_VARTMP	"/var/tmp/"
66
+ 
... ...
@@ -3,24 +3,23 @@
3 3
 
4 4
 Summary:        Main C library
5 5
 Name:           glibc
6
-Version:        2.28
7
-Release:        5%{?dist}
6
+Version:        2.31
7
+Release:        1%{?dist}
8 8
 License:        LGPLv2+
9 9
 URL:            http://www.gnu.org/software/libc
10 10
 Group:          Applications/System
11 11
 Vendor:         VMware, Inc.
12 12
 Distribution:   Photon
13 13
 Source0:        http://ftp.gnu.org/gnu/glibc/%{name}-%{version}.tar.xz
14
-%define sha1    glibc=ccb5dc9e51a9884df8488f86982439d47b283b2a
14
+%define sha1    glibc=55619672e5e13996e264d408949eb4aaa26e7ec8
15 15
 Source1:        locale-gen.sh
16 16
 Source2:        locale-gen.conf
17
-Patch0:         http://www.linuxfromscratch.org/patches/downloads/glibc/glibc-2.25-fhs-1.patch
17
+Patch0:         http://www.linuxfromscratch.org/patches/downloads/glibc/glibc-2.31-fhs-1.patch
18 18
 Patch1:         glibc-2.24-bindrsvport-blacklist.patch
19 19
 Patch2:         0002-malloc-arena-fix.patch
20
-Patch3:         glibc-2.28-CVE-2018-19591.patch
21
-Patch4:         CVE-2019-9169.patch
22 20
 Provides:       rtld(GNU_HASH)
23 21
 Requires:       filesystem
22
+%define ExtraBuildRequires python3, python3-libs
24 23
 %description
25 24
 This library provides the basic routines for allocating memory,
26 25
 searching directories, opening and closing files, reading and
... ...
@@ -75,8 +74,6 @@ sed -i 's/\\$$(pwd)/`pwd`/' timezone/Makefile
75 75
 %patch0 -p1
76 76
 %patch1 -p1
77 77
 %patch2 -p1
78
-%patch3 -p1
79
-%patch4 -p1
80 78
 install -vdm 755 %{_builddir}/%{name}-build
81 79
 # do not try to explicitly provide GLIBC_PRIVATE versioned libraries
82 80
 %define __find_provides %{_builddir}/%{name}-%{version}/find_provides.sh
... ...
@@ -107,19 +104,19 @@ chmod +x find_requires.sh
107 107
 
108 108
 %build
109 109
 
110
-# make aarch64 use /lib64 instead of /lib (same as x86_64)
111
-sed -i "s/libc_cv_rtlddir='\/lib'/libc_cv_rtlddir='\/lib64'/" sysdeps/unix/sysv/linux/aarch64/configure
112
-
113 110
 cd %{_builddir}/%{name}-build
114 111
 ../%{name}-%{version}/configure \
115 112
         --prefix=%{_prefix} \
116 113
         --build=%{_build} \
117 114
         --host=%{_host} \
118 115
         --disable-profile \
116
+        --disable-werror \
119 117
         --enable-kernel=3.2 \
120 118
         --enable-bind-now \
119
+        --enable-stack-protector=strong \
121 120
         --disable-experimental-malloc \
122
-        --disable-silent-rules
121
+        --disable-silent-rules \
122
+        libc_cv_slibdir=/lib
123 123
 
124 124
 # Sometimes we have false "out of memory" make error
125 125
 # just rerun/continue make to workaroung it.
... ...
@@ -197,11 +194,17 @@ make %{?_smp_mflags} check ||:
197 197
 # FAIL (intermittent) in chroot but PASS in container:
198 198
 # posix/tst-spawn3 and stdio-common/test-vfprintf
199 199
 n=0
200
-grep "^FAIL: posix/tst-spawn3" tests.sum >/dev/null && n=$((n+1)) ||:
201
-grep "^FAIL: stdio-common/test-vfprintf" tests.sum >/dev/null && n=$((n+1)) ||:
202
-# FAIL always on overlayfs/aufs (in container)
203
-grep "^FAIL: posix/tst-dir" tests.sum >/dev/null && n=$((n+1)) ||:
204 200
 
201
+grep "^FAIL: c++-types-check" tests.sum >/dev/null && n=$((n+1)) ||:
202
+# can fail in chroot
203
+grep "^FAIL: io/tst-fchownat" tests.sum >/dev/null && n=$((n+1)) ||:
204
+grep "^FAIL: malloc/tst-tcfree2" tests.sum >/dev/null && n=$((n+1)) ||:
205
+# can timeout
206
+grep "^FAIL: nptl/tst-mutex10" tests.sum >/dev/null && n=$((n+1)) ||:
207
+# can fail in chroot
208
+grep "^FAIL: nptl/tst-setuid3" tests.sum >/dev/null && n=$((n+1)) ||:
209
+grep "^FAIL: stdlib/tst-secure-getenv" tests.sum >/dev/null && n=$((n+1)) ||:
210
+grep "^FAIL: support/tst-support_descriptors" tests.sum >/dev/null && n=$((n+1)) ||:
205 211
 #https://sourceware.org/glibc/wiki/Testing/Testsuite
206 212
 grep "^FAIL: nptl/tst-eintr1" tests.sum >/dev/null && n=$((n+1)) ||:
207 213
 #This happens because the kernel fails to reap exiting threads fast enough,
... ...
@@ -224,16 +227,9 @@ grep "^FAIL: nptl/tst-eintr1" tests.sum >/dev/null && n=$((n+1)) ||:
224 224
 %attr(0644,root,root) %config(missingok,noreplace) %{_sysconfdir}/ld.so.cache
225 225
 %config %{_sysconfdir}/locale-gen.conf
226 226
 
227
-%ifarch %{ix86}
228 227
 /lib/*
229 228
 %exclude /lib/libpcprofile.so
230 229
 %{_libdir}/*.so
231
-%else
232
-/lib64/*
233
-%exclude /lib64/libpcprofile.so
234
-%{_lib64dir}/*.so
235
-%endif
236
-
237 230
 /sbin/ldconfig
238 231
 /sbin/locale-gen.sh
239 232
 %{_bindir}/*
... ...
@@ -254,11 +250,7 @@ grep "^FAIL: nptl/tst-eintr1" tests.sum >/dev/null && n=$((n+1)) ||:
254 254
 
255 255
 %files iconv
256 256
 %defattr(-,root,root)
257
-%ifarch %{ix86}
258 257
 %{_libdir}/gconv/*
259
-%else
260
-%{_lib64dir}/gconv/*
261
-%endif
262 258
 /usr/bin/iconv
263 259
 /usr/sbin/iconvconfig
264 260
 
... ...
@@ -274,13 +266,8 @@ grep "^FAIL: nptl/tst-eintr1" tests.sum >/dev/null && n=$((n+1)) ||:
274 274
 /usr/sbin/zdump
275 275
 /usr/sbin/zic
276 276
 /sbin/sln
277
-%ifarch %{ix86}
278 277
 %{_libdir}/audit/*
279 278
 /lib/libpcprofile.so
280
-%else
281
-%{_lib64dir}/audit/*
282
-/lib64/libpcprofile.so
283
-%endif
284 279
 
285 280
 %files nscd
286 281
 %defattr(-,root,root)
... ...
@@ -301,13 +288,8 @@ grep "^FAIL: nptl/tst-eintr1" tests.sum >/dev/null && n=$((n+1)) ||:
301 301
 %defattr(-,root,root)
302 302
 # TODO: Excluding for now to remove dependency on PERL
303 303
 # /usr/bin/mtrace
304
-%ifarch %{ix86}
305 304
 %{_libdir}/*.a
306 305
 %{_libdir}/*.o
307
-%else
308
-%{_lib64dir}/*.a
309
-%{_lib64dir}/*.o
310
-%endif
311 306
 %{_includedir}/*
312 307
 
313 308
 %files -f %{name}.lang lang
... ...
@@ -315,6 +297,8 @@ grep "^FAIL: nptl/tst-eintr1" tests.sum >/dev/null && n=$((n+1)) ||:
315 315
 
316 316
 
317 317
 %changelog
318
+*   Thu Mar 12 2020 Alexey Makhalov <amakhalov@vmware.com> 2.31-1
319
+-   Version update. Use /lib
318 320
 *   Tue Sep 24 2019 Alexey Makhalov <amakhalov@vmware.com> 2.28-5
319 321
 -   Cross compilling support
320 322
 -   Create empty ld.so.cache file for all builds (native and cross)
321 323
new file mode 100644
... ...
@@ -0,0 +1,78 @@
0
+From 57586a1ca7f17b1916aed3dea4ff8de872dbf853 Mon Sep 17 00:00:00 2001
1
+From: Benjamin Peterson <benjamin@dropbox.com>
2
+Date: Fri, 3 May 2019 08:11:00 -0700
3
+Subject: [PATCH] Rename gettid() functions.
4
+
5
+glibc 2.30 will declare its own gettid; see https://sourceware.org/git/?p=glibc.git;a=commit;h=1d0fc213824eaa2a8f8c4385daaa698ee8fb7c92. Rename the grpc versions to avoid naming conflicts.
6
+---
7
+ src/core/lib/gpr/log_linux.cc          | 6 ++----
8
+ src/core/lib/gpr/log_posix.cc          | 4 ++--
9
+ src/core/lib/iomgr/ev_epollex_linux.cc | 4 ++--
10
+ 3 files changed, 6 insertions(+), 8 deletions(-)
11
+
12
+diff --git a/src/core/lib/gpr/log_linux.cc b/src/core/lib/gpr/log_linux.cc
13
+index 81026e5689b..8b597b4cf2f 100644
14
+--- a/src/core/lib/gpr/log_linux.cc
15
+@@ -40,7 +40,7 @@
16
+ #include <time.h>
17
+ #include <unistd.h>
18
+ 
19
+-static long gettid(void) { return syscall(__NR_gettid); }
20
++static long sys_gettid(void) { return syscall(__NR_gettid); }
21
+ 
22
+ void gpr_log(const char* file, int line, gpr_log_severity severity,
23
+              const char* format, ...) {
24
+@@ -72,7 +70,7 @@ void gpr_default_log(gpr_log_func_args* args) {
25
+   gpr_timespec now = gpr_now(GPR_CLOCK_REALTIME);
26
+   struct tm tm;
27
+   static __thread long tid = 0;
28
+-  if (tid == 0) tid = gettid();
29
++  if (tid == 0) tid = sys_gettid();
30
+ 
31
+   timer = static_cast<time_t>(now.tv_sec);
32
+   final_slash = strrchr(args->file, '/');
33
+diff --git a/src/core/lib/gpr/log_posix.cc b/src/core/lib/gpr/log_posix.cc
34
+index b6edc14ab6b..2f7c6ce3760 100644
35
+--- a/src/core/lib/gpr/log_posix.cc
36
+@@ -31,7 +31,7 @@
37
+ #include <string.h>
38
+ #include <time.h>
39
+ 
40
+-static intptr_t gettid(void) { return (intptr_t)pthread_self(); }
41
++static intptr_t sys_gettid(void) { return (intptr_t)pthread_self(); }
42
+ 
43
+ void gpr_log(const char* file, int line, gpr_log_severity severity,
44
+              const char* format, ...) {
45
+@@ -86,7 +86,7 @@ void gpr_default_log(gpr_log_func_args* args) {
46
+   char* prefix;
47
+   gpr_asprintf(&prefix, "%s%s.%09d %7tu %s:%d]",
48
+                gpr_log_severity_string(args->severity), time_buffer,
49
+-               (int)(now.tv_nsec), gettid(), display_file, args->line);
50
++               (int)(now.tv_nsec), sys_gettid(), display_file, args->line);
51
+ 
52
+   fprintf(stderr, "%-70s %s\n", prefix, args->message);
53
+   gpr_free(prefix);
54
+diff --git a/src/core/lib/iomgr/ev_epollex_linux.cc b/src/core/lib/iomgr/ev_epollex_linux.cc
55
+index c2d80c08ddb..4a83cb6c215 100644
56
+--- a/src/core/lib/iomgr/ev_epollex_linux.cc
57
+@@ -1077,7 +1077,7 @@ static void end_worker(grpc_pollset* pollset, grpc_pollset_worker* worker,
58
+ }
59
+ 
60
+ #ifndef NDEBUG
61
+-static long gettid(void) { return syscall(__NR_gettid); }
62
++static long sys_gettid(void) { return syscall(__NR_gettid); }
63
+ #endif
64
+ 
65
+ /* pollset->mu lock must be held by the caller before calling this.
66
+@@ -1097,7 +1097,7 @@ static grpc_error* pollset_work(grpc_pollset* pollset,
67
+ #define WORKER_PTR (&worker)
68
+ #endif
69
+ #ifndef NDEBUG
70
+-  WORKER_PTR->originator = gettid();
71
++  WORKER_PTR->originator = sys_gettid();
72
+ #endif
73
+   if (grpc_polling_trace.enabled()) {
74
+     gpr_log(GPR_INFO,
... ...
@@ -1,7 +1,7 @@
1 1
 Summary:        Google RPC
2 2
 Name:           grpc
3 3
 Version:        1.15.1
4
-Release:        1%{?dist}
4
+Release:        2%{?dist}
5 5
 License:        Apache License, Version 2.0
6 6
 URL:            https://grpc.io
7 7
 Group:          Development/Libraries
... ...
@@ -9,6 +9,7 @@ Vendor:         VMware, Inc.
9 9
 Distribution:   Photon
10 10
 Source0:        https://github.com/grpc/grpc/archive/%{name}-%{version}.tar.gz
11 11
 %define sha1 grpc=0c5ab74d3f64800dbf6005ec337e4291f04df438
12
+Patch0:         grpc-rename-gettid-functions.patch
12 13
 BuildRequires:  build-essential
13 14
 BuildRequires:  which
14 15
 BuildRequires:  c-ares-devel
... ...
@@ -40,6 +41,7 @@ developing applications that use grpc.
40 40
 
41 41
 %prep
42 42
 %setup -q
43
+%patch0 -p1
43 44
 
44 45
 %build
45 46
 make  %{_smp_mflags} prefix=%{_prefix} libdir=%{_libdir}
... ...
@@ -64,6 +66,8 @@ ln -sf libgrpc++_error_details.so.6 %{buildroot}%{_libdir}/libgrpc++_error_detai
64 64
 %{_libdir}/pkgconfig/*
65 65
 
66 66
 %changelog
67
+* Wed Mar 25 2020 Alexey Makhalov <amakhalov@vmware.com> 1.15.1-2
68
+- Fix compilation issue with glibc >= 2.30.
67 69
 * Thu Oct 04 2018 Siju Maliakkal <smaliakkal@vmware.com> 1.15.1-1
68 70
 - Updated to latest version
69 71
 * Tue Mar 27 2018 Dheeraj Shetty <dheerajs@vmware.com> 1.10.0-1
70 72
new file mode 100644
... ...
@@ -0,0 +1,53 @@
0
+From f4f9d24860e1b5cd4f6a014f3fda7cd33ebe5be7 Mon Sep 17 00:00:00 2001
1
+From: Petr Lautrbach <plautrba@redhat.com>
2
+Date: Sat, 27 Jul 2019 08:20:20 -0700
3
+Subject: [PATCH] libselinux: Do not define gettid() if glibc >= 2.30 is used
4
+MIME-Version: 1.0
5
+Content-Type: text/plain; charset=UTF-8
6
+Content-Transfer-Encoding: 8bit
7
+
8
+Since version 2.30 glibc implements gettid() system call wrapper, see
9
+https://sourceware.org/bugzilla/show_bug.cgi?id=6399
10
+
11
+Fixes:
12
+cc -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -I../include -D_GNU_SOURCE  -DNO_ANDROID_BACKEND   -c -o procattr.o procattr.c
13
+procattr.c:28:14: error: static declaration of ‘gettid’ follows non-static declaration
14
+   28 | static pid_t gettid(void)
15
+      |              ^~~~~~
16
+In file included from /usr/include/unistd.h:1170,
17
+                 from procattr.c:2:
18
+/usr/include/bits/unistd_ext.h:34:16: note: previous declaration of ‘gettid’ was here
19
+   34 | extern __pid_t gettid (void) __THROW;
20
+      |                ^~~~~~
21
+
22
+Signed-off-by: Petr Lautrbach <plautrba@redhat.com>
23
+Acked-by: Stephen Smalley <sds@tycho.nsa.gov>
24
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
25
+---
26
+ src/procattr.c | 14 +++++++++++++-
27
+ 1 file changed, 13 insertions(+), 1 deletion(-)
28
+
29
+--- a/src/procattr.c
30
+@@ -21,8 +21,19 @@
31
+ static int destructor_key_initialized = 0;
32
+ static __thread char destructor_initialized;
33
+ 
34
+-#ifndef __BIONIC__
35
+-/* Bionic declares this in unistd.h and has a definition for it */
36
++/* Bionic and glibc >= 2.30 declare gettid() system call wrapper in unistd.h and
37
++ * has a definition for it */
38
++#ifdef __BIONIC__
39
++  #define OVERRIDE_GETTID 0
40
++#elif !defined(__GLIBC_PREREQ)
41
++  #define OVERRIDE_GETTID 1
42
++#elif !__GLIBC_PREREQ(2,29)
43
++  #define OVERRIDE_GETTID 1
44
++#else
45
++  #define OVERRIDE_GETTID 0
46
++#endif
47
++
48
++#if OVERRIDE_GETTID
49
+ static pid_t gettid(void)
50
+ {
51
+ 	return syscall(__NR_gettid);
... ...
@@ -3,11 +3,12 @@
3 3
 Summary:        SELinux library and simple utilities
4 4
 Name:           libselinux
5 5
 Version:        2.8
6
-Release:        2%{?dist}
6
+Release:        3%{?dist}
7 7
 License:        Public Domain
8 8
 Group:          System Environment/Libraries
9 9
 Source0:        https://raw.githubusercontent.com/wiki/SELinuxProject/selinux/files/releases/20160107/%{name}-%{version}.tar.gz
10 10
 %define sha1    libselinux=d45f2db91dbec82ef5a153aca247acc04234e8af
11
+Patch0:         0001-libselinux-Do-not-define-gettid-if-glibc-2.30-is-use.patch
11 12
 Url:            https://github.com/SELinuxProject/selinux/wiki
12 13
 Vendor:         VMware, Inc.
13 14
 Distribution:   Photon
... ...
@@ -77,6 +78,7 @@ SELinux applications.
77 77
 
78 78
 %prep
79 79
 %setup -qn %{name}-%{version}
80
+%patch0 -p1
80 81
 
81 82
 %build
82 83
 sed '/unistd.h/a#include <sys/uio.h>' -i src/setrans_client.c
... ...
@@ -131,6 +133,8 @@ rm -rf %{buildroot}
131 131
 %{python3_sitelib}/*
132 132
 
133 133
 %changelog
134
+*   Wed Mar 25 2020 Alexey Makhalov <amakhalov@vmware.com> 2.8-3
135
+-   Fix compilation issue with glibc >= 2.30.
134 136
 *   Tue Jan 08 2019 Alexey Makhalov <amakhalov@vmware.com> 2.8-2
135 137
 -   Added BuildRequires python2-devel
136 138
 *   Fri Aug 10 2018 Srivatsa S. Bhat <srivatsa@csail.mit.edu> 2.8-1
137 139
new file mode 100644
... ...
@@ -0,0 +1,48 @@
0
+Add support for gettid() provided by glibc 2.30+
1
+
2
+Since version 2.30 glibc provides gettid and it causes conflicts with
3
+locally defined gettid(). Use the local definition of
4
+gettid only if system gettid is not available.
5
+
6
+https://sourceware.org/git/?p=glibc.git;a=blob_plain;f=NEWS;hb=HEAD<Paste>
7
+
8
+Signed-off-by: Khem Raj <raj.khem at gmail.com>
9
+---
10
+ configure.ac            | 2 +-
11
+ src/common/compat/tid.h | 3 ++-
12
+ 2 files changed, 3 insertions(+), 2 deletions(-)
13
+
14
+diff --git a/configure.ac b/configure.ac
15
+index 7b99f5c..e4bd82c 100644
16
+--- a/configure.ac
17
+@@ -190,7 +190,7 @@ AC_CHECK_HEADERS([ \
18
+ # Basic functions check
19
+ AC_CHECK_FUNCS([ \
20
+ 	atexit bzero clock_gettime dup2 fdatasync fls ftruncate \
21
+-	gethostbyname gethostname getpagesize localtime_r memchr memset \
22
++	gethostbyname gethostname getpagesize gettid localtime_r memchr memset \
23
+ 	mkdir munmap putenv realpath rmdir socket strchr strcspn strdup \
24
+ 	strncasecmp strndup strnlen strpbrk strrchr strstr strtol strtoul \
25
+ 	strtoull dirfd gethostbyname2 getipnodebyname epoll_create1 \
26
+diff --git a/src/common/compat/tid.h b/src/common/compat/tid.h
27
+index 40f562f..aa07a85 100644
28
+--- a/src/common/compat/tid.h
29
+@@ -25,6 +25,7 @@
30
+ #ifndef LTTNG_TID_H
31
+ #define LTTNG_TID_H
32
+ 
33
++#if !HAVE_GETTID
34
+ #ifdef __linux__
35
+ #include <syscall.h>
36
+ #endif
37
+@@ -47,5 +48,5 @@ static inline pid_t gettid(void)
38
+ 	return getpid();
39
+ }
40
+ #endif
41
+-
42
++#endif /* HAVE_GETTID */
43
+ #endif /* LTTNG_TID_H */
44
+-- 
45
+2.22.0
... ...
@@ -1,11 +1,12 @@
1 1
 Summary: LTTng is an open source tracing framework for Linux.
2 2
 Name:    lttng-tools
3 3
 Version: 2.10.5
4
-Release: 1%{?dist}
4
+Release: 2%{?dist}
5 5
 License: GPLv2 and LGPLv2
6 6
 URL: https://lttng.org/download/
7 7
 Source: %{name}-%{version}.tar.bz2
8 8
 %define sha1 lttng-tools=68790d44529a3b29896c35bb2350e8a0e1226264
9
+Patch0:     add-support-for-gettid.patch
9 10
 Group:      Development/Tools
10 11
 Vendor:     VMware, Inc.
11 12
 Distribution:  Photon
... ...
@@ -26,11 +27,11 @@ LTTng is an open source tracing framework for Linux.
26 26
 
27 27
 %prep
28 28
 %setup -q
29
+%patch0 -p1
29 30
 
30 31
 %build
31
-./configure \
32
-	--prefix=%{_prefix} \
33
-	--disable-lttng-ust
32
+autoreconf -fiv
33
+%configure
34 34
 
35 35
 make %{?_smp_mflags}
36 36
 
... ...
@@ -46,6 +47,8 @@ find %{buildroot} -name '*.la' -delete
46 46
 %exclude %{_libdir}/debug
47 47
 
48 48
 %changelog
49
+*   Tue Mar 24 2020 Alexey Makhalov <amakhalov@vmware.com> 2.10.5-2
50
+-   Fix compilation issue with glibc >= 2.30.
49 51
 *   Wed Sep 05 2018 Srivatsa S. Bhat <srivatsa@csail.mit.edu> 2.10.5-1
50 52
 -   Update to version 2.10.5
51 53
 *   Fri Mar 31 2017 Michelle Wang <michellew@vmware.com> 2.9.4-1
... ...
@@ -58,4 +61,3 @@ find %{buildroot} -name '*.la' -delete
58 58
 -   Updated to version 2.7.1
59 59
 *   Tue Nov 24 2015 Xiaolin Li <xiaolinl@vmware.com> 2.7.0-1
60 60
 -   Initial build.  First version
61
- 
62 61
new file mode 100644
... ...
@@ -0,0 +1,87 @@
0
+From 3e2aaf78e6f8d57c7dbc42e39764862ba8c64bd7 Mon Sep 17 00:00:00 2001
1
+From: Michael Jeanson <mjeanson@efficios.com>
2
+Date: Mon, 3 Jun 2019 15:25:32 -0400
3
+Subject: [PATCH] Fix: namespace our gettid wrapper
4
+
5
+Since glibc 2.30, a gettid wrapper was added that conflicts with our
6
+static declaration. Namespace our wrapper so there is no conflict,
7
+we'll add support for the glibc provided wrapper in a further commit.
8
+
9
+Signed-off-by: Michael Jeanson <mjeanson@efficios.com>
10
+Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
11
+---
12
+ include/lttng/ust-tid.h           | 12 +++++++-----
13
+ include/usterr-signal-safe.h      |  2 +-
14
+ liblttng-ust/lttng-context-vtid.c |  4 ++--
15
+ 3 files changed, 10 insertions(+), 8 deletions(-)
16
+
17
+diff --git a/include/lttng/ust-tid.h b/include/lttng/ust-tid.h
18
+index e669d7e7..e637718a 100644
19
+--- a/include/lttng/ust-tid.h
20
+@@ -31,23 +31,25 @@
21
+ #include <syscall.h>
22
+ #endif
23
+ 
24
+-#if defined(_syscall0)
25
+-_syscall0(pid_t, gettid)
26
+-#elif defined(__NR_gettid)
27
++#if defined(__NR_gettid)
28
++
29
+ #include <unistd.h>
30
+-static inline pid_t gettid(void)
31
++static inline pid_t lttng_gettid(void)
32
+ {
33
+ 	return syscall(__NR_gettid);
34
+ }
35
++
36
+ #else
37
++
38
+ #include <sys/types.h>
39
+ #include <unistd.h>
40
+ 
41
+ /* Fall-back on getpid for tid if not available. */
42
+-static inline pid_t gettid(void)
43
++static inline pid_t lttng_gettid(void)
44
+ {
45
+ 	return getpid();
46
+ }
47
++
48
+ #endif
49
+ 
50
+ #endif /* _LTTNG_UST_TID_H */
51
+diff --git a/include/usterr-signal-safe.h b/include/usterr-signal-safe.h
52
+index 1df5ada0..d987c1f0 100644
53
+--- a/include/usterr-signal-safe.h
54
+@@ -95,7 +95,7 @@ do {									\
55
+ 	do {					\
56
+ 		sigsafe_print_err(UST_STR_COMPONENT "[%ld/%ld]: " fmt " (in %s() at " __FILE__ ":" UST_XSTR(__LINE__) ")\n", \
57
+ 		(long) getpid(),		\
58
+-		(long) gettid(),		\
59
++		(long) lttng_gettid(),		\
60
+ 		## args, __func__);		\
61
+ 	} while(0)
62
+ 
63
+diff --git a/liblttng-ust/lttng-context-vtid.c b/liblttng-ust/lttng-context-vtid.c
64
+index f28e470a..2f721fa0 100644
65
+--- a/liblttng-ust/lttng-context-vtid.c
66
+@@ -62,7 +62,7 @@ void vtid_record(struct lttng_ctx_field *field,
67
+ 		 struct lttng_channel *chan)
68
+ {
69
+ 	if (caa_unlikely(!URCU_TLS(cached_vtid)))
70
+-		URCU_TLS(cached_vtid) = gettid();
71
++		URCU_TLS(cached_vtid) = lttng_gettid();
72
+ 	lib_ring_buffer_align_ctx(ctx, lttng_alignof(URCU_TLS(cached_vtid)));
73
+ 	chan->ops->event_write(ctx, &URCU_TLS(cached_vtid),
74
+ 		sizeof(URCU_TLS(cached_vtid)));
75
+@@ -73,7 +73,7 @@ void vtid_get_value(struct lttng_ctx_field *field,
76
+ 		struct lttng_ctx_value *value)
77
+ {
78
+ 	if (caa_unlikely(!URCU_TLS(cached_vtid)))
79
+-		URCU_TLS(cached_vtid) = gettid();
80
++		URCU_TLS(cached_vtid) = lttng_gettid();
81
+ 	value->u.s64 = URCU_TLS(cached_vtid);
82
+ }
83
+ 
... ...
@@ -1,11 +1,12 @@
1 1
 Summary: LTTng-UST is an Userspace Tracer library
2 2
 Name:    lttng-ust
3 3
 Version: 2.10.2
4
-Release: 2%{?dist}
4
+Release: 3%{?dist}
5 5
 License: GPLv2, LGPLv2.1 and MIT
6 6
 URL: https://lttng.org/download/
7 7
 Source: https://lttng.org/files/lttng-ust/%{name}-%{version}.tar.bz2
8 8
 %define sha1 lttng-ust=b92d789c7277362715a6a9557f65f7e6066d8130
9
+Patch0:     lttng-ust-0001-namespace-gettid-wrapper.patch
9 10
 Group:      Development/Libraries
10 11
 Vendor:     VMware, Inc.
11 12
 Distribution:  Photon
... ...
@@ -16,7 +17,7 @@ BuildRequires: perl
16 16
 %endif
17 17
 Requires:      userspace-rcu
18 18
 %description
19
-This library may be used by user-space applications to generate 
19
+This library may be used by user-space applications to generate
20 20
 trace-points using LTTng.
21 21
 
22 22
 %package devel
... ...
@@ -28,10 +29,10 @@ The libraries and header files needed for LTTng-UST development.
28 28
 
29 29
 %prep
30 30
 %setup -q
31
+%patch0 -p1
31 32
 
32 33
 %build
33
-./configure \
34
-	--prefix=%{_prefix} \
34
+%configure \
35 35
 	--docdir=%{_docdir}/%{name} \
36 36
 	--disable-static
37 37
 
... ...
@@ -60,9 +61,11 @@ rm -vf %{buildroot}%{_libdir}/*.la
60 60
 %{_libdir}/pkgconfig/lttng-ust*.pc
61 61
 
62 62
 %changelog
63
-*       Wed Jan 02 2019 Keerthana K <keerthanak@vmware.com> 2.10.2-2
64
--       Added make check.
65
-*	Wed Sep 05 2018 Srivatsa S. Bhat <srivatsa@csail.mit.edu> 2.10.2-1
66
--	Update to version 2.10.2
67
-*	Mon Dec 19 2016 Dheeraj Shetty <dheerajs@vmware.com> 2.9.0-1
68
--   	Initial build.  First version
63
+* Tue Mar 24 2020 Alexey Makhalov <amakhalov@vmware.com> 2.10.2-3
64
+- Fix compilation issue with glibc >= 2.30.
65
+* Wed Jan 02 2019 Keerthana K <keerthanak@vmware.com> 2.10.2-2
66
+- Added make check.
67
+* Wed Sep 05 2018 Srivatsa S. Bhat <srivatsa@csail.mit.edu> 2.10.2-1
68
+- Update to version 2.10.2
69
+* Mon Dec 19 2016 Dheeraj Shetty <dheerajs@vmware.com> 2.9.0-1
70
+- Initial build. First version
... ...
@@ -1,7 +1,7 @@
1 1
 Summary:        Free version of the SSH connectivity tools
2 2
 Name:           openssh
3 3
 Version:        7.8p1
4
-Release:        5%{?dist}
4
+Release:        6%{?dist}
5 5
 License:        BSD
6 6
 URL:            https://www.openssh.com/
7 7
 Group:          System Environment/Security
... ...
@@ -23,6 +23,9 @@ Patch6:         openssh-CVE-2019-6111.patch
23 23
 Patch7:         openssh-CVE-2019-6111-filenames.patch
24 24
 Patch8:         scp-name-validator-CVE-2019-6110.patch
25 25
 Patch9:         openssh-CVE-2019-16905.patch
26
+# Add couple more syscalls to seccomp filter to support glibc-2.31
27
+Patch10:        seccomp-Allow-clock_nanosleep-in-sandbox.patch
28
+Patch11:        seccomp-Allow-clock_nanosleep_time64-in-sandbox.patch
26 29
 BuildRequires:  openssl-devel
27 30
 BuildRequires:  Linux-PAM-devel
28 31
 BuildRequires:  krb5-devel
... ...
@@ -67,6 +70,8 @@ tar xf %{SOURCE1} --no-same-owner
67 67
 %patch7 -p1
68 68
 %patch8 -p1
69 69
 %patch9 -p1
70
+%patch10 -p1
71
+%patch11 -p1
70 72
 %build
71 73
 %configure \
72 74
     --sysconfdir=/etc/ssh \
... ...
@@ -189,6 +194,8 @@ rm -rf %{buildroot}/*
189 189
 %{_mandir}/man8/ssh-pkcs11-helper.8.gz
190 190
 
191 191
 %changelog
192
+*   Fri Mar 27 2020 Alexey Makhalov <amakhalov@vmware.com> 7.8p1-6
193
+-   glibc-2.31 support.
192 194
 *   Mon Mar 16 2020 Ankit Jain <ankitja@vmware.comm> 7.8p1-5
193 195
 -   Fix CVE-2019-6109, CVE-2019-6110, CVE-2019-6111, CVE-2019-16905
194 196
 *   Wed Aug 07 2019 Anish Swaminathan <anishs@vmware.com> 7.8p1-4
195 197
new file mode 100644
... ...
@@ -0,0 +1,25 @@
0
+From b1c82f4b8adf3f42476d8a1f292df33fb7aa1a56 Mon Sep 17 00:00:00 2001
1
+From: Darren Tucker <dtucker@dtucker.net>
2
+Date: Wed, 13 Nov 2019 23:19:35 +1100
3
+Subject: [PATCH] seccomp: Allow clock_nanosleep() in sandbox.
4
+
5
+seccomp: Allow clock_nanosleep() to make OpenSSH working with latest
6
+glibc.  Patch from Jakub Jelen <jjelen@redhat.com> via bz #3093.
7
+---
8
+ sandbox-seccomp-filter.c | 6 ++++++
9
+ 1 file changed, 6 insertions(+)
10
+
11
+diff --git a/sandbox-seccomp-filter.c b/sandbox-seccomp-filter.c
12
+index b5cda70bb..96ab141f7 100644
13
+--- a/sandbox-seccomp-filter.c
14
+@@ -242,6 +242,9 @@ static const struct sock_filter preauth_insns[] = {
15
+ #ifdef __NR_nanosleep
16
+ 	SC_ALLOW(__NR_nanosleep),
17
+ #endif
18
++#ifdef __NR_clock_nanosleep
19
++	SC_ALLOW(__NR_clock_nanosleep),
20
++#endif
21
+ #ifdef __NR__newselect
22
+ 	SC_ALLOW(__NR__newselect),
23
+ #endif
0 24
new file mode 100644
... ...
@@ -0,0 +1,24 @@
0
+From 5af6fd5461bb709304e6979c8b7856c7af921c9e Mon Sep 17 00:00:00 2001
1
+From: Darren Tucker <dtucker@dtucker.net>
2
+Date: Mon, 16 Dec 2019 13:55:56 +1100
3
+Subject: [PATCH] Allow clock_nanosleep_time64 in seccomp sandbox.
4
+
5
+Needed on Linux ARM.  bz#3100, patch from jjelen@redhat.com.
6
+---
7
+ sandbox-seccomp-filter.c | 3 +++
8
+ 1 file changed, 3 insertions(+)
9
+
10
+diff --git a/sandbox-seccomp-filter.c b/sandbox-seccomp-filter.c
11
+index be2397671..3ef30c9d5 100644
12
+--- a/sandbox-seccomp-filter.c
13
+@@ -245,6 +245,9 @@ static const struct sock_filter preauth_insns[] = {
14
+ #ifdef __NR_clock_nanosleep
15
+ 	SC_ALLOW(__NR_clock_nanosleep),
16
+ #endif
17
++#ifdef __NR_clock_nanosleep_time64
18
++	SC_ALLOW(__NR_clock_nanosleep_time64),
19
++#endif
20
+ #ifdef __NR__newselect
21
+ 	SC_ALLOW(__NR__newselect),
22
+ #endif
... ...
@@ -1,7 +1,7 @@
1 1
 Summary:        PowerShell is an automation and configuration management platform.
2 2
 Name:           powershell
3 3
 Version:        6.2.3
4
-Release:        4%{?dist}
4
+Release:        5%{?dist}
5 5
 Vendor:         VMware, Inc.
6 6
 Distribution:   Photon
7 7
 License:        MIT
... ...
@@ -44,6 +44,10 @@ chmod +x ./build.sh
44 44
 ./build.sh
45 45
 cd %{_builddir}/PowerShell-Native/powershell-native-6.2.0
46 46
 pushd src/libpsl-native
47
+# sys/sysctl.h is deprecated
48
+sed -i '/sys\/sysctl.h/d' src/getuserfrompid.cpp
49
+sed -i '/sys\/sysctl.h/d' src/getppid.cpp
50
+
47 51
 cmake -DCMAKE_BUILD_TYPE=Debug .
48 52
 make -j
49 53
 
... ...
@@ -88,7 +92,9 @@ fi
88 88
     %{_docdir}/*
89 89
 
90 90
 %changelog
91
-*   Wed Dec 16 2019 Shreyas B <shreyasb@vmware.com> 6.2.3-4
91
+*   Thu Mar 26 2020 Alexey Makhalov <amakhalov@vmware.com> 6.2.3-5
92
+-   Fix compilation issue with glibc >= 2.30.
93
+*   Mon Dec 16 2019 Shreyas B <shreyasb@vmware.com> 6.2.3-4
92 94
 -   Build PowerShell with locally build "libpsl-native.so" from PowerShell-Native(6.2.0).
93 95
 *   Wed Dec 04 2019 Tapas Kundu <tkundu@vmware.com> 6.2.3-3
94 96
 -   Fixed ref folder to have right dlls
95 97
new file mode 100644
... ...
@@ -0,0 +1,57 @@
0
+The former deprecated macro RES_USE_INET6 is gone with glibc 2.30
1
+
2
+---
3
+ libmilter/sm_gethost.c |    6 ++++--
4
+ sendmail/conf.c        |    6 ++++--
5
+ 2 files changed, 8 insertions(+), 4 deletions(-)
6
+
7
+--- libmilter/sm_gethost.c
8
+@@ -51,18 +51,20 @@ sm_getipnodebyname(name, family, flags,
9
+ {
10
+ 	bool resv6 = true;
11
+ 	struct hostent *h;
12
+-
13
++#ifdef RES_USE_INET6
14
+ 	if (family == AF_INET6)
15
+ 	{
16
+ 		/* From RFC2133, section 6.1 */
17
+ 		resv6 = bitset(RES_USE_INET6, _res.options);
18
+ 		_res.options |= RES_USE_INET6;
19
+ 	}
20
++#endif
21
+ 	SM_SET_H_ERRNO(0);
22
+ 	h = gethostbyname(name);
23
++#ifdef RES_USE_INET6
24
+ 	if (family == AF_INET6 && !resv6)
25
+ 		_res.options &= ~RES_USE_INET6;
26
+-
27
++#endif
28
+ 	/* the function is supposed to return only the requested family */
29
+ 	if (h != NULL && h->h_addrtype != family)
30
+ 	{
31
+--- sendmail/conf.c
32
+@@ -4242,18 +4242,20 @@ sm_getipnodebyname(name, family, flags,
33
+ 
34
+ # else /* HAS_GETHOSTBYNAME2 */
35
+ 	bool resv6 = true;
36
+-
37
++#ifdef RES_USE_INET6
38
+ 	if (family == AF_INET6)
39
+ 	{
40
+ 		/* From RFC2133, section 6.1 */
41
+ 		resv6 = bitset(RES_USE_INET6, _res.options);
42
+ 		_res.options |= RES_USE_INET6;
43
+ 	}
44
++#endif
45
+ 	SM_SET_H_ERRNO(0);
46
+ 	h = gethostbyname(name);
47
++#ifdef RES_USE_INET6
48
+ 	if (!resv6)
49
+ 		_res.options &= ~RES_USE_INET6;
50
+-
51
++#endif
52
+ 	/* the function is supposed to return only the requested family */
53
+ 	if (h != NULL && h->h_addrtype != family)
54
+ 	{
... ...
@@ -1,13 +1,14 @@
1 1
 Summary:        Commonly used Mail transport agent (MTA)
2 2
 Name:           sendmail
3 3
 Version:        8.15.2
4
-Release:        16%{?dist}
4
+Release:        17%{?dist}
5 5
 URL:            http://www.sendmail.org/
6 6
 License:        BSD and CDDL1.1 and MIT
7 7
 Group:          Email/Server/Library
8 8
 Vendor:         VMware, Inc.
9 9
 Distribution:   Photon
10 10
 Source0:        http://ftp.vim.org/pub/mail/sendmail/sendmail-r8/sendmail.8.15.2.tar.gz
11
+Patch0:         sendmail-8.15.2-glibc-2.30.patch
11 12
 BuildRequires:	systemd
12 13
 BuildRequires:  openldap
13 14
 BuildRequires:  openssl-devel
... ...
@@ -33,6 +34,7 @@ of email from systems to network and is not just a mail client.
33 33
 %prep
34 34
 
35 35
 %setup
36
+%patch0 -p0
36 37
 
37 38
 %build
38 39
 
... ...
@@ -196,6 +198,8 @@ fi
196 196
 %exclude %{_sysconfdir}/mail/cf/*
197 197
 
198 198
 %changelog
199
+*   Thu Mar 26 2020 Alexey Makhalov <amakhalov@vmware.com> 8.15.2-17
200
+-   Fix compilation issue with glibc >= 2.30.
199 201
 *   Fri Nov 29 2019 Tapas Kundu <tkundu@vmware.com> 8.15.2-16
200 202
 -   Build with NETINET6 flag.
201 203
 *   Mon Oct 02 2017 Kumar Kaushik <kaushikk@vmware.com> 8.15.2-15
... ...
@@ -211,7 +211,7 @@ class ToolChainUtils(object):
211 211
             packages += " " + package
212 212
 
213 213
         self.logger.debug("Installing custom rpms:" + packages)
214
-        cmd = (self.rpmCommand + " -i -v --nodeps --noorder --force " + rpmFiles)
214
+        cmd = ("rpm -i -v --nodeps --noorder --force " + rpmFiles)
215 215
         retVal = sandbox.run(cmd, logfn=self.logger.debug)
216 216
         if retVal != 0:
217 217
             self.logger.debug("Command Executed:" + cmd)
... ...
@@ -93,6 +93,8 @@ aarch64/xz-5.2.3-2.ph2.aarch64.rpm
93 93
 aarch64/xz-libs-5.2.3-2.ph2.aarch64.rpm
94 94
 aarch64/zlib-1.2.11-1.ph2.aarch64.rpm
95 95
 aarch64/zlib-devel-1.2.11-1.ph2.aarch64.rpm
96
+aarch64/python3-3.7.5-1.ph3.aarch64.rpm
97
+aarch64/python3-libs-3.7.5-1.ph3.aarch64.rpm
96 98
 noarch/apache-maven-3.3.9-4.ph1.noarch.rpm
97 99
 noarch/autoconf-2.69-6.ph2.noarch.rpm
98 100
 noarch/automake-1.15-4.ph2.noarch.rpm
... ...
@@ -87,3 +87,5 @@ x86_64/go-1.4.2-5.ph1.x86_64.rpm
87 87
 x86_64/filesystem-1.0-7.ph1.x86_64.rpm
88 88
 x86_64/libdb-5.3.28-1.ph2dev.x86_64.rpm
89 89
 x86_64/libdb-devel-5.3.28-1.ph2dev.x86_64.rpm
90
+x86_64/python3-3.5.6-9.ph1.x86_64.rpm
91
+x86_64/python3-libs-3.5.6-9.ph1.x86_64.rpm