Browse code

elfutils: bump up to 0.180

- Modified the ruby spec to fix build failure
- Added Requires in libmicrohttpd
- Added a patch to fix build failure

Change-Id: Idffb42b750da5ef978102695b4b30d934db34aea
Reviewed-on: http://photon-jenkins.eng.vmware.com:8082/10180
Tested-by: Tapas Kundu <tkundu@vmware.com>
Reviewed-by: Keerthana K <keerthanak@vmware.com>

gerrit-photon authored on 2020/07/09 14:48:10
Showing 8 changed files
1 1
deleted file mode 100644
... ...
@@ -1,51 +0,0 @@
1
-There were two issues when reading note data from a core file.
2
-We didn't check if the data we already had in a buffer was big
3
-enough. And if we did get the data, we should check if we got
4
-everything, or just a part of the data.
5
-
6
-https://sourceware.org/bugzilla/show_bug.cgi?id=23752
7
-
8
-Signed-off-by: Mark Wielaard <mark@klomp.org>
9
- libdwfl/ChangeLog                    |  7 +++++++
10
- libdwfl/dwfl_segment_report_module.c | 13 +++++++++++--
11
- 2 files changed, 18 insertions(+), 2 deletions(-)
12
-
13
-diff --git a/libdwfl/dwfl_segment_report_module.c b/libdwfl/dwfl_segment_report_module.c
14
-index 36e5c82..8749884 100644
15
-+++ b/libdwfl/dwfl_segment_report_module.c
16
-@@ -1,5 +1,5 @@
17
- /* Sniff out modules from ELF headers visible in memory segments.
18
--   Copyright (C) 2008-2012, 2014, 2015 Red Hat, Inc.
19
-+   Copyright (C) 2008-2012, 2014, 2015, 2018 Red Hat, Inc.
20
-    This file is part of elfutils.
21
- 
22
-    This file is free software; you can redistribute it and/or modify
23
-@@ -301,7 +301,10 @@ dwfl_segment_report_module (Dwfl *dwfl, int ndx, const char *name,
24
-   inline bool read_portion (void **data, size_t *data_size,
25
- 			    GElf_Addr vaddr, size_t filesz)
26
-   {
27
--    if (vaddr - start + filesz > buffer_available
28
-+    /* Check whether we will have to read the segment data, or if it
29
-+       can be returned from the existing buffer.  */
30
-+    if (filesz > buffer_available
31
-+	|| vaddr - start > buffer_available - filesz
32
- 	/* If we're in string mode, then don't consider the buffer we have
33
- 	   sufficient unless it contains the terminator of the string.  */
34
- 	|| (filesz == 0 && memchr (vaddr - start + buffer, '\0',
35
-@@ -459,6 +462,12 @@ dwfl_segment_report_module (Dwfl *dwfl, int ndx, const char *name,
36
-     if (read_portion (&data, &data_size, vaddr, filesz))
37
-       return;
38
- 
39
-+    /* data_size will be zero if we got everything from the initial
40
-+       buffer, otherwise it will be the size of the new buffer that
41
-+       could be read.  */
42
-+    if (data_size != 0)
43
-+      filesz = data_size;
44
-+
45
-     assert (sizeof (Elf32_Nhdr) == sizeof (Elf64_Nhdr));
46
- 
47
-     void *notes;
48
-1.8.3.1
49 1
deleted file mode 100644
... ...
@@ -1,34 +0,0 @@
1
-diff --git a/elfutils-0.158-CVE-2014-0172.patch b/elfutils-0.158-CVE-2014-0172.patch
2
-new file mode 100644
3
-index 0000000..3b76360
4
-+++ b/elfutils-0.158-CVE-2014-0172.patch
5
-@@ -0,0 +1,28 @@
6
-+commit 7f1eec317db79627b473c5b149a22a1b20d1f68f
7
-+Author: Mark Wielaard <mjw@redhat.com>
8
-+Date:   Wed Apr 9 11:33:23 2014 +0200
9
-+
10
-+    CVE-2014-0172 Check for overflow before calling malloc to uncompress data.
11
-+    
12
-+    https://bugzilla.redhat.com/show_bug.cgi?id=1085663
13
-+    
14
-+    Reported-by: Florian Weimer <fweimer@redhat.com>
15
-+    Signed-off-by: Mark Wielaard <mjw@redhat.com>
16
-+
17
-+diff --git a/libdw/dwarf_begin_elf.c b/libdw/dwarf_begin_elf.c
18
-+index 79daeac..34ea373 100644
19
-+--- a/libdw/dwarf_begin_elf.c
20
-++++ b/libdw/dwarf_begin_elf.c
21
-+@@ -282,6 +282,12 @@ check_section (Dwarf *result, GElf_Ehdr *ehdr, Elf_Scn *scn, bool inscngrp)
22
-+ 	    memcpy (&size, data->d_buf + 4, sizeof size);
23
-+ 	    size = be64toh (size);
24
-+ 
25
-++	    /* Check for unsigned overflow so malloc always allocated
26
-++	       enough memory for both the Elf_Data header and the
27
-++	       uncompressed section data.  */
28
-++	    if (unlikely (sizeof (Elf_Data) + size < size))
29
-++	      break;
30
-++
31
-+ 	    Elf_Data *zdata = malloc (sizeof (Elf_Data) + size);
32
-+ 	    if (unlikely (zdata == NULL))
33
-+ 	      break;
34 1
new file mode 100644
... ...
@@ -0,0 +1,67 @@
0
+commit acb453851c9e6c46531b70fda7396885c0e7e1db
1
+Author: Frank Ch. Eigler <fche@redhat.com>
2
+Date:   Thu Jul 2 14:52:48 2020 +0000
3
+
4
+    PR26195: adapt debuginfod to API change in libmicrohttpd-0.9.71
5
+    
6
+    To make our code build with -Werror as well as against older libmicrohttpd,
7
+    we must conditionalize the data type (int vs. enum) returned by callbacks
8
+    and some mhd functions.
9
+    
10
+    Signed-off-by: Frank Ch. Eigler <fche@redhat.com>
11
+
12
+diff --git a/debuginfod/debuginfod.cxx b/debuginfod/debuginfod.cxx
13
+index 76f1fa52..56210302 100644
14
+--- a/debuginfod/debuginfod.cxx
15
+@@ -92,6 +92,14 @@ using namespace std;
16
+ #include <libdwelf.h>
17
+ 
18
+ #include <microhttpd.h>
19
++
20
++#if MHD_VERSION >= 0x00097002
21
++// libmicrohttpd 0.9.71 broke API
22
++#define MHD_RESULT enum MHD_Result
23
++#else
24
++#define MHD_RESULT int
25
++#endif
26
++
27
+ #include <curl/curl.h>
28
+ #include <archive.h>
29
+ #include <archive_entry.h>
30
+@@ -519,12 +527,12 @@ struct reportable_exception
31
+ 
32
+   void report(ostream& o) const; // defined under obatched() class below
33
+ 
34
+-  int mhd_send_response(MHD_Connection* c) const {
35
++  MHD_RESULT mhd_send_response(MHD_Connection* c) const {
36
+     MHD_Response* r = MHD_create_response_from_buffer (message.size(),
37
+                                                        (void*) message.c_str(),
38
+                                                        MHD_RESPMEM_MUST_COPY);
39
+     MHD_add_response_header (r, "Content-Type", "text/plain");
40
+-    int rc = MHD_queue_response (c, code, r);
41
++    MHD_RESULT rc = MHD_queue_response (c, code, r);
42
+     MHD_destroy_response (r);
43
+     return rc;
44
+   }
45
+@@ -1723,7 +1731,7 @@ handle_metrics (off_t* size)
46
+ 
47
+ 
48
+ /* libmicrohttpd callback */
49
+-static int
50
++static MHD_RESULT
51
+ handler_cb (void * /*cls*/,
52
+             struct MHD_Connection *connection,
53
+             const char *url,
54
+@@ -1736,7 +1744,11 @@ handler_cb (void * /*cls*/,
55
+   struct MHD_Response *r = NULL;
56
+   string url_copy = url;
57
+ 
58
++#if MHD_VERSION >= 0x00097002
59
++  enum MHD_Result rc;
60
++#else
61
+   int rc = MHD_NO; // mhd
62
++#endif
63
+   int http_code = 500;
64
+   off_t http_size = -1;
65
+   struct timeval tv_start, tv_end;
... ...
@@ -1,22 +1,23 @@
1 1
 # -*- rpm-spec-*-
2 2
 Summary:	A collection of utilities and DSOs to handle compiled objects
3 3
 Name:		elfutils
4
-Version:	0.174
5
-Release:	3%{?dist}
4
+Version:	0.180
5
+Release:	1%{?dist}
6 6
 License:	GPLv3+ and (GPLv2+ or LGPLv3+)
7 7
 Group:		Development/Tools
8 8
 URL:    	https://sourceware.org/elfutils
9 9
 Source0:	https://sourceware.org/elfutils/ftp/%{version}/%{name}-%{version}.tar.bz2
10
-%define sha1 elfutils=95899ce5fa55002e46bf4e02d01a249516e296fd
11
-Patch0:         CVE-2018-18310.patch
12
-Patch1:         remove-unused-internal-__elf64_msize-functions.patch
10
+%define sha1 elfutils=c1ed871515b0f7fcdf2d94fea23e4b8ba67e8fe3
13 11
 Vendor:		VMware, Inc.
14 12
 Distribution:	Photon
13
+Patch0:         elfutils-adapt-debuginfod-to-API-change.patch
15 14
 
16 15
 Obsoletes:	libelf libelf-devel
17 16
 Requires:	elfutils-libelf = %{version}-%{release}
18 17
 Requires:	glibc >= 2.7
19 18
 Requires:	bzip2-libs
19
+Requires:	libmicrohttpd
20
+Requires:	curl
20 21
 # ExcludeArch: xxx
21 22
 
22 23
 BuildRequires:	gcc >= 4.1.2-33
... ...
@@ -26,6 +27,10 @@ BuildRequires:	flex >= 2.5.4a
26 26
 BuildRequires:	m4
27 27
 BuildRequires:	gettext
28 28
 BuildRequires:	bzip2-devel
29
+BuildRequires:	libmicrohttpd-devel
30
+BuildRequires:	curl-devel
31
+BuildRequires:	libarchive-devel
32
+BuildRequires:	sqlite-devel
29 33
 
30 34
 %define _gnu %{nil}
31 35
 %define _programprefix eu-
... ...
@@ -108,7 +113,7 @@ These are the additional language files of elfutils.
108 108
 %prep
109 109
 %setup -q
110 110
 %patch0 -p1
111
-%patch1 -p1
111
+
112 112
 %build
113 113
 %configure --program-prefix=%{_programprefix}
114 114
 make %{?_smp_mflags}
... ...
@@ -120,7 +125,6 @@ mkdir -p ${RPM_BUILD_ROOT}%{_prefix}
120 120
 %makeinstall
121 121
 
122 122
 chmod +x ${RPM_BUILD_ROOT}/usr/lib/lib*.so*
123
-chmod +x ${RPM_BUILD_ROOT}/usr/lib/elfutils/lib*.so*
124 123
 
125 124
 # XXX Nuke unpackaged files
126 125
 { pushd ${RPM_BUILD_ROOT}
... ...
@@ -151,33 +155,36 @@ rm -rf ${RPM_BUILD_ROOT}
151 151
 %defattr(-,root,root)
152 152
 %doc COPYING COPYING-GPLV2 COPYING-LGPLV3 README TODO CONTRIBUTING
153 153
 %{_bindir}/eu-*
154
-%exclude %{_bindir}/eu-ld
154
+%{_bindir}/debuginfod
155
+%{_bindir}/debuginfod-find
155 156
 %{_libdir}/libasm-%{version}.so
156 157
 %{_libdir}/libdw-%{version}.so
157 158
 %{_libdir}/libasm.so.*
158 159
 %{_libdir}/libdw.so.*
159
-%dir %{_libdir}/elfutils
160
-%{_libdir}/elfutils/lib*.so
160
+%{_libdir}/libdebuginfod.so.*
161
+%{_mandir}/man1/eu-*.1*
162
+%{_mandir}/man1/debuginfod*.1*
161 163
 
162 164
 %files devel
163 165
 %defattr(-,root,root)
164 166
 %{_includedir}/dwarf.h
165 167
 %dir %{_includedir}/elfutils
166 168
 %{_includedir}/elfutils/elf-knowledge.h
167
-#%{_includedir}/elfutils/libasm.h
168
-%{_includedir}/elfutils/libebl.h
169 169
 %{_includedir}/elfutils/libdw.h
170 170
 %{_includedir}/elfutils/libdwfl.h
171 171
 %{_includedir}/elfutils/known-dwarf.h
172 172
 %{_includedir}/elfutils/libdwelf.h
173
-%{_libdir}/libebl.a
174
-#%{_libdir}/libasm.so
173
+%{_includedir}/elfutils/debuginfod.h
175 174
 %{_libdir}/libdw.so
175
+%{_libdir}/libdebuginfod.so
176
+%{_libdir}/libdebuginfod-%{version}.so
176 177
 %{_libdir}/pkgconfig/*.pc
178
+%{_mandir}/man3/elf_*.3*
179
+%{_mandir}/man3/debuginfod*.3*
180
+%{_mandir}/man8/debuginfod.8*
177 181
 
178 182
 %files devel-static
179 183
 %{_libdir}/libdw.a
180
-#%{_libdir}/libasm.a
181 184
 
182 185
 %files libelf
183 186
 %defattr(-,root,root)
... ...
@@ -199,6 +206,11 @@ rm -rf ${RPM_BUILD_ROOT}
199 199
 %defattr(-,root,root)
200 200
 
201 201
 %changelog
202
+* Wed Jul 08 2020 Gerrit Photon <photon-checkins@vmware.com> 0.180-1
203
+- Automatic Version Bump
204
+- Updated to 0.180
205
+- libdir/elfutils is removed
206
+- libebl.h and libebl.a is removed
202 207
 * Tue Mar 31 2020 Alexey Makhalov <amakhalov@vmware.com> 0.174-3
203 208
 - Fix compilation issue with gcc-8.4.0
204 209
 * Thu Jan 24 2019 Keerthana K <keerthanak@vmware.com> 0.174-2
205 210
deleted file mode 100644
... ...
@@ -1,47 +0,0 @@
1
-From: Mark Wielaard <mark@klomp.org>
2
-Date: Thu, 21 Feb 2019 23:28:01 +0000 (+0100)
3
-Subject: libelf: Remove unused internal __elf[32|64]_msize functions.
4
-X-Git-Tag: elfutils-0.177~43
5
-X-Git-Url: https://sourceware.org/git/?p=elfutils.git;a=commitdiff_plain;h=be8080bdd746ac2b07fb0bcad23a9677844bb200
6
-
7
-libelf: Remove unused internal __elf[32|64]_msize functions.
8
-
9
-Those functions were intended for ELF versions where the memory and
10
-file sizes of data structures are different. They were never used
11
-because libelf depends on the file and memory sizes being equal
12
-(otherwise using mmap wouldn't work).
13
-
14
-Signed-off-by: Mark Wielaard <mark@klomp.org>
15
-
16
-diff --git a/libelf/elf32_fsize.c b/libelf/elf32_fsize.c
17
-index 0f468de5..139f4a91 100644
18
-+++ b/libelf/elf32_fsize.c
19
-@@ -58,5 +58,3 @@ elfw2(LIBELFBITS, fsize) (Elf_Type type, size_t count, unsigned int version)
20
- 	  * __libelf_type_sizes[0][ELFW(ELFCLASS,LIBELFBITS) - 1][type]);
21
- #endif
22
- }
23
--#define local_strong_alias(n1, n2) strong_alias (n1, n2)
24
--local_strong_alias (elfw2(LIBELFBITS, fsize), __elfw2(LIBELFBITS, msize))
25
-diff --git a/libelf/libelfP.h b/libelf/libelfP.h
26
-index bc9a404d..3a96a3b0 100644
27
-+++ b/libelf/libelfP.h
28
-@@ -444,16 +444,6 @@ extern const uint_fast8_t __libelf_type_aligns[ELFCLASSNUM - 1][ELF_T_NUM]
29
-    be ELF_T_BYTE.  */
30
- extern Elf_Type __libelf_data_type (Elf *elf, int sh_type) internal_function;
31
- 
32
--/* The libelf API does not have such a function but it is still useful.
33
--   Get the memory size for the given type.
34
--
35
--   These functions cannot be marked internal since they are aliases
36
--   of the export elfXX_fsize functions.*/
37
--extern size_t __elf32_msize (Elf_Type __type, size_t __count,
38
--			     unsigned int __version);
39
--extern size_t __elf64_msize (Elf_Type __type, size_t __count,
40
--			     unsigned int __version);
41
--
42
- 
43
- /* Create Elf descriptor from memory image.  */
44
- extern Elf *__libelf_read_mmaped_file (int fildes, void *map_address,
... ...
@@ -1,7 +1,7 @@
1 1
 Name:           libmicrohttpd
2 2
 Summary:        Lightweight library for embedding a webserver in applications
3 3
 Version:        0.9.71
4
-Release:        1%{?dist}
4
+Release:        2%{?dist}
5 5
 License:        LGPLv2+
6 6
 URL:            http://www.gnu.org/software/libmicrohttpd/
7 7
 Source0:        https://ftp.gnu.org/gnu/libmicrohttpd/%{name}-%{version}.tar.gz
... ...
@@ -22,12 +22,12 @@ Key features that distinguish libmicrohttpd from other projects are:
22 22
 %package devel
23 23
 Summary:        Development files for libmicrohttpd
24 24
 Requires:       %{name} = %{version}-%{release}
25
-
25
+Requires:       gnutls-devel
26 26
 %description devel
27 27
 Development files for libmicrohttpd
28 28
 
29 29
 %prep
30
-%autosetup -p1
30
+%setup -q
31 31
 
32 32
 %build
33 33
 autoreconf --install
... ...
@@ -58,6 +58,8 @@ rm -f %{buildroot}%{_bindir}/demo
58 58
 %{_datadir}/man/man3/libmicrohttpd.3.gz
59 59
 
60 60
 %changelog
61
+* Tue Aug 25 2020 Ankit Jain <ankitja@vmware.com> 0.9.71-2
62
+- Requires gnutls-devel for installation
61 63
 * Fri Aug 21 2020 Gerrit Photon <photon-checkins@vmware.com> 0.9.71-1
62 64
 - Automatic Version Bump
63 65
 * Wed Aug 12 2020 Susant Sahani <ssahani@vmware.com> 0.9.70-1
... ...
@@ -1,7 +1,7 @@
1 1
 Summary:        Ruby
2 2
 Name:           ruby
3 3
 Version:        2.5.8
4
-Release:        1%{?dist}
4
+Release:        2%{?dist}
5 5
 License:        BSDL
6 6
 URL:            https://www.ruby-lang.org/en/
7 7
 Group:          System Environment/Security
... ...
@@ -26,7 +26,8 @@ This is useful for object-oriented scripting.
26 26
 %build
27 27
 %configure \
28 28
         --enable-shared \
29
-        --docdir=%{_docdir}/%{name}-%{version}
29
+        --docdir=%{_docdir}/%{name}-%{version} \
30
+	--with-compress-debug-sections=no
30 31
 make %{?_smp_mflags} COPY="cp -p"
31 32
 %install
32 33
 [ %{buildroot} != "/"] && rm -rf %{buildroot}/*
... ...
@@ -51,7 +52,10 @@ rm -rf %{buildroot}/*
51 51
 %{_datadir}/ri/*
52 52
 %{_docdir}/%{name}-%{version}
53 53
 %{_mandir}/man1/*
54
+
54 55
 %changelog
56
+*   Fri Jul 17 2020 Ankit Jain <ankitja@vmware.com> 2.5.8-2
57
+-   Added --with-compress-debug-sections=no to fix build issue
55 58
 *   Wed May 13 2020 Sujay G <gsujay@vmware.com> 2.5.8-1
56 59
 -   Bump version to 2.5.8
57 60
 *   Tue Jan 01 2019 Sujay G <gsujay@vmware.com> 2.5.3-1
... ...
@@ -9,7 +9,7 @@
9 9
 
10 10
 Name:          systemtap
11 11
 Version:       4.3
12
-Release:       2%{?dist}
12
+Release:       3%{?dist}
13 13
 Summary:       Programmable system-wide instrumentation system
14 14
 Group:         Development/System
15 15
 Vendor:	       VMware, Inc.
... ...
@@ -33,6 +33,7 @@ BuildRequires: perl
33 33
 BuildRequires: python3-setuptools
34 34
 BuildRequires: nss
35 35
 BuildRequires: shadow
36
+BuildRequires: curl-devel
36 37
 BuildRequires: python3-devel
37 38
 %if %with_boost
38 39
 BuildRequires: boost-devel
... ...
@@ -345,6 +346,8 @@ fi
345 345
 %{_mandir}/man8/systemtap-service.8*
346 346
 
347 347
 %changelog
348
+*   Wed Aug 19 2020 Ankit Jain <ankitja@vmware.com> 4.3-3
349
+-   BuildRequires curl-devel, required by libdebuginfod.so
348 350
 *   Fri Jul 17 2020 Tapas Kundu <tkundu@vmware.com> 4.3-2
349 351
 -   Mass removal python2
350 352
 *   Thu Jun 25 2020 Gerrit Photon <photon-checkins@vmware.com> 4.3-1