Login
[x]
Log in using an account from:
Fedora Account System
Red Hat Associate
Red Hat Customer
Or login using a Red Hat Bugzilla account
Forgot Password
Login:
Hide Forgot
Create an Account
Red Hat Bugzilla – Attachment 1445971 Details for
Bug 1581722
libsmbios-devel: remove c++ pkgconfig file and headers
[?]
New
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
|
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh83 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
This site requires JavaScript to be enabled to function correctly, please enable it.
[patch]
Current patch work
0001-Fix-smbios-sys-info-lite-crashes-when-an-asset-tag-i.patch (text/plain), 15.95 KB, created by
Peter Jones
on 2018-05-30 18:28:54 UTC
(
hide
)
Description:
Current patch work
Filename:
MIME Type:
Creator:
Peter Jones
Created:
2018-05-30 18:28:54 UTC
Size:
15.95 KB
patch
obsolete
>From cdca330c7a657fa9c782fefd32e922e004253bdd Mon Sep 17 00:00:00 2001 >From: Peter Jones <pjones@redhat.com> >Date: Wed, 16 May 2018 16:19:21 -0400 >Subject: [PATCH] Fix smbios-sys-info-lite crashes when an asset tag is not set > >Also resolves some related collisions with the libsmbios C++ packaging. > >Related: rhbz#1562440 > >Signed-off-by: Peter Jones <pjones@redhat.com> >--- > ...error-always-return-a-new-allocation.patch | 32 ++++ > 0026-._get_id-don-t-promote-u16-int-u16.patch | 70 +++++++++ > ...y-better-token-debugging-information.patch | 141 ++++++++++++++++++ > ...-use-token_table_free-at-more-places.patch | 63 ++++++++ > libsmbios.spec | 29 ++-- > 5 files changed, 324 insertions(+), 11 deletions(-) > create mode 100644 0025-smbios_strerror-always-return-a-new-allocation.patch > create mode 100644 0026-._get_id-don-t-promote-u16-int-u16.patch > create mode 100644 0027-slightly-better-token-debugging-information.patch > create mode 100644 0028-libsmbios_c-use-token_table_free-at-more-places.patch > >diff --git a/0025-smbios_strerror-always-return-a-new-allocation.patch b/0025-smbios_strerror-always-return-a-new-allocation.patch >new file mode 100644 >index 00000000000..92d22ec9ed4 >--- /dev/null >+++ b/0025-smbios_strerror-always-return-a-new-allocation.patch >@@ -0,0 +1,32 @@ >+From 460b1910d7ab2897b3c50537b75284435bd8b03a Mon Sep 17 00:00:00 2001 >+From: Peter Jones <pjones@redhat.com> >+Date: Wed, 18 Apr 2018 10:40:44 -0400 >+Subject: [PATCH 25/27] smbios_strerror(): *always* return a new allocation. >+ >+Related: rhbz#1562440 >+ >+Signed-off-by: Peter Jones <pjones@redhat.com> >+--- >+ src/libsmbios_c/smbios/smbios.c | 3 +-- >+ 1 file changed, 1 insertion(+), 2 deletions(-) >+ >+diff --git a/src/libsmbios_c/smbios/smbios.c b/src/libsmbios_c/smbios/smbios.c >+index f7b90109136..745be4d5cd0 100644 >+--- a/src/libsmbios_c/smbios/smbios.c >++++ b/src/libsmbios_c/smbios/smbios.c >+@@ -74,11 +74,10 @@ char *smbios_strerror(const struct smbios_struct *cur) >+ char *ret; >+ struct smbios_table *table = smbios_table_factory(SMBIOS_DEFAULTS | SMBIOS_NO_ERR_CLEAR); >+ if (table) { >+- /* leak */ >+ ret = strdup(smbios_table_strerror(table)); >+ smbios_table_free(table); >+ } else { >+- ret = ""; >++ ret = strdup(""); >+ } >+ return ret; >+ } >+-- >+2.15.0 >+ >diff --git a/0026-._get_id-don-t-promote-u16-int-u16.patch b/0026-._get_id-don-t-promote-u16-int-u16.patch >new file mode 100644 >index 00000000000..22ec1e5f3a3 >--- /dev/null >+++ b/0026-._get_id-don-t-promote-u16-int-u16.patch >@@ -0,0 +1,70 @@ >+From 84324642457301172f1ab02a35b5fad9e43eab18 Mon Sep 17 00:00:00 2001 >+From: Peter Jones <pjones@redhat.com> >+Date: Wed, 18 Apr 2018 10:41:37 -0400 >+Subject: [PATCH 26/27] ..._get_id(): don't promote u16->int->u16 >+ >+Related: rhbz#1562440 >+ >+Signed-off-by: Peter Jones <pjones@redhat.com> >+--- >+ src/libsmbios_c/token/token_d4.c | 2 +- >+ src/libsmbios_c/token/token_da.c | 2 +- >+ src/libsmbios_c/token/token_impl.h | 2 +- >+ 3 files changed, 3 insertions(+), 3 deletions(-) >+ >+diff --git a/src/libsmbios_c/token/token_d4.c b/src/libsmbios_c/token/token_d4.c >+index 2659721360a..353155b9317 100644 >+--- a/src/libsmbios_c/token/token_d4.c >++++ b/src/libsmbios_c/token/token_d4.c >+@@ -46,7 +46,7 @@ static int _d4_get_type(const struct token_obj *t) >+ return 0xD4; >+ } >+ >+-static int _d4_get_id(const struct token_obj *t) >++static u16 _d4_get_id(const struct token_obj *t) >+ { >+ dbg_printf("_d4_get_id\n"); >+ return cast_token(t)->tokenId; >+diff --git a/src/libsmbios_c/token/token_da.c b/src/libsmbios_c/token/token_da.c >+index 5f80bea9ee1..b1a11c61f7d 100644 >+--- a/src/libsmbios_c/token/token_da.c >++++ b/src/libsmbios_c/token/token_da.c >+@@ -48,7 +48,7 @@ static int _da_get_type(const struct token_obj *t) >+ return 0xDA; >+ } >+ >+-static int _da_get_id(const struct token_obj *t) >++static u16 _da_get_id(const struct token_obj *t) >+ { >+ fnprintf("\n"); >+ return cast_token(t)->tokenId; >+diff --git a/src/libsmbios_c/token/token_impl.h b/src/libsmbios_c/token/token_impl.h >+index 75e2fea124f..e15c30eebb1 100644 >+--- a/src/libsmbios_c/token/token_impl.h >++++ b/src/libsmbios_c/token/token_impl.h >+@@ -46,7 +46,7 @@ enum // Token types >+ struct token_obj >+ { >+ int (*get_type)(const struct token_obj*); >+- int (*get_id)(const struct token_obj*); >++ u16 (*get_id)(const struct token_obj*); >+ int (*is_bool)(const struct token_obj*); >+ int (*is_string)(const struct token_obj*); >+ >+diff --git a/src/libsmbios_c/token/token_obj.c b/src/libsmbios_c/token/token_obj.c >+index b5948ae5a86..6928ace32c6 100644 >+--- a/src/libsmbios_c/token/token_obj.c >++++ b/src/libsmbios_c/token/token_obj.c >+@@ -178,7 +178,7 @@ const struct token_obj *token_table_get_next_by_id(const struct token_table *t, >+ } >+ >+ make_token_obj_fn( int, 0, get_type, "0x%04x" ) >+-make_token_obj_fn( u16, 0, get_id, "0x%04x" ) >++make_token_obj_fn( u16, 0, get_id, "0x%04hx" ) >+ make_token_obj_fn( int, -1, is_active, "%d" ) >+ make_token_obj_fn( int, -1, activate, "%d" ) >+ make_token_obj_fn( bool, 0, is_bool, "%d" ) >+ >+-- >+2.15.0 >+ >diff --git a/0027-slightly-better-token-debugging-information.patch b/0027-slightly-better-token-debugging-information.patch >new file mode 100644 >index 00000000000..a8535d2de89 >--- /dev/null >+++ b/0027-slightly-better-token-debugging-information.patch >@@ -0,0 +1,141 @@ >+From 2c695c2b28f36b38e99261cdc52a9ae46be0bf73 Mon Sep 17 00:00:00 2001 >+From: Peter Jones <pjones@redhat.com> >+Date: Wed, 18 Apr 2018 10:51:42 -0400 >+Subject: [PATCH 27/27] slightly better token debugging information >+ >+Related: rhbz#1562440 >+ >+Signed-off-by: Peter Jones <pjones@redhat.com> >+--- >+ src/libsmbios_c/token/token_d4.c | 12 +++++++++--- >+ src/libsmbios_c/token/token_da.c | 9 +++++---- >+ src/libsmbios_c/token/token_obj.c | 17 ++++++++++++----- >+ 3 files changed, 26 insertions(+), 12 deletions(-) >+ >+diff --git a/src/libsmbios_c/token/token_d4.c b/src/libsmbios_c/token/token_d4.c >+index 353155b9317..3e6ecf875b6 100644 >+--- a/src/libsmbios_c/token/token_d4.c >++++ b/src/libsmbios_c/token/token_d4.c >+@@ -43,23 +43,28 @@ >+ >+ static int _d4_get_type(const struct token_obj *t) >+ { >++ fnprintf("returning type 0xD4\n"); >+ return 0xD4; >+ } >+ >+ static u16 _d4_get_id(const struct token_obj *t) >+ { >+- dbg_printf("_d4_get_id\n"); >++ fnprintf("token ID 0x%04hx\n", cast_token(t)->tokenId); >+ return cast_token(t)->tokenId; >+ } >+ >+ static int _d4_is_bool(const struct token_obj *t) >+ { >+- return cast_token(t)->andMask != 0; >++ int ret = cast_token(t)->andMask != 0; >++ fnprintf("%s\n", ret ? "true" : "false"); >++ return ret; >+ } >+ >+ static int _d4_is_string(const struct token_obj *t) >+ { >+- return cast_token(t)->andMask == 0; >++ int ret = cast_token(t)->andMask == 0; >++ fnprintf("%s\n", ret ? "true" : "false"); >++ return ret; >+ } >+ >+ static int _d4_is_active(const struct token_obj *t) >+@@ -93,6 +98,7 @@ out_err: >+ retval = -2; >+ >+ out: >++ fnprintf("%s\n", retval ? "true" : "false"); >+ return retval; >+ } >+ >+diff --git a/src/libsmbios_c/token/token_da.c b/src/libsmbios_c/token/token_da.c >+index b1a11c61f7d..702929e6c44 100644 >+--- a/src/libsmbios_c/token/token_da.c >++++ b/src/libsmbios_c/token/token_da.c >+@@ -44,13 +44,13 @@ >+ >+ static int _da_get_type(const struct token_obj *t) >+ { >+- fnprintf("\n"); >++ fnprintf("returning type 0xDA\n"); >+ return 0xDA; >+ } >+ >+ static u16 _da_get_id(const struct token_obj *t) >+ { >+- fnprintf("\n"); >++ fnprintf("token ID 0x%04hx\n", cast_token(t)->tokenId); >+ return cast_token(t)->tokenId; >+ } >+ >+@@ -59,13 +59,13 @@ static u16 _da_get_id(const struct token_obj *t) >+ >+ static int _da_is_bool(const struct token_obj *t) >+ { >+- fnprintf("\n"); >++ fnprintf("true\n"); >+ return true; >+ } >+ >+ static int _da_is_string(const struct token_obj *t) >+ { >+- fnprintf("\n"); >++ fnprintf("true\n"); >+ return true; >+ } >+ >+@@ -86,6 +86,7 @@ static int _da_is_active(const struct token_obj *t) >+ retval = 1; >+ >+ out: >++ fnprintf("%s\n", retval ? "true" : "false"); >+ return retval; >+ } >+ >+diff --git a/src/libsmbios_c/token/token_obj.c b/src/libsmbios_c/token/token_obj.c >+index b5948ae5a86..6928ace32c6 100644 >+--- a/src/libsmbios_c/token/token_obj.c >++++ b/src/libsmbios_c/token/token_obj.c >+@@ -151,13 +151,19 @@ const struct token_obj *token_table_get_next(const struct token_table *t, const >+ >+ const struct token_obj *token_table_get_next_by_id(const struct token_table *t, const struct token_obj *cur, u16 id) >+ { >+- fnprintf("\n"); >++ fnprintf("looking for object 0x%hx\n", id); >++ >+ do { >+ cur = token_table_get_next(t, cur); >+- dbg_printf("look for %d, got %d\n", id, token_obj_get_id(cur)); >+- if (cur && token_obj_get_id(cur) == id) >+- break; >++ >++ if (cur) { >++ u16 obj_id = token_obj_get_id(cur); >++ fnprintf("got object 0x%hx\n", obj_id); >++ if (obj_id == id) >++ break; >++ } >+ } while ( cur ); >++ >+ return cur; >+ } >+ >+@@ -281,6 +287,7 @@ int init_token_table(struct token_table *t) >+ if (ret) >+ goto out_tokenfail; >+ >++ error = _("Error while trying to add 0xDA tokens.\n"); >+ ret = add_da_tokens(t); >+ if (ret) >+ goto out_tokenfail; >+-- >+2.15.0 >+ >diff --git a/0028-libsmbios_c-use-token_table_free-at-more-places.patch b/0028-libsmbios_c-use-token_table_free-at-more-places.patch >new file mode 100644 >index 00000000000..845ac7489d6 >--- /dev/null >+++ b/0028-libsmbios_c-use-token_table_free-at-more-places.patch >@@ -0,0 +1,63 @@ >+From 6281bd8a7136c0ee86e3f800bf8d2805e7100ae9 Mon Sep 17 00:00:00 2001 >+From: Peter Jones <pjones@redhat.com> >+Date: Wed, 16 May 2018 16:02:55 -0400 >+Subject: [PATCH] libsmbios_c: use token_table_free() at more places. >+ >+This should fix e.g. smbios-sys-info-lite when an asset tag is not set. >+ >+Related: rhbz#1562440 >+ >+Signed-off-by: Peter Jones <pjones@redhat.com> >+--- >+ src/libsmbios_c/token/token.c | 7 +++++-- >+ 1 file changed, 5 insertions(+), 2 deletions(-) >+ >+diff --git a/src/libsmbios_c/token/token.c b/src/libsmbios_c/token/token.c >+index 0771ca31d2f..7369d3e19e7 100644 >+--- a/src/libsmbios_c/token/token.c >++++ b/src/libsmbios_c/token/token.c >+@@ -42,7 +42,7 @@ const char * token_strerror() >+ fnprintf("\n"); >+ if (table) { >+ retval = token_table_strerror(table); >+- free(table); >++ token_table_free(table); >+ } >+ return retval; >+ } >+@@ -56,7 +56,7 @@ const char * token_strerror() >+ table = token_table_factory(TOKEN_DEFAULTS); \ >+ if (!table) goto out; \ >+ token = token_table_get_next_by_id(table, 0, id); \ >+- free(table); \ >++ token_table_free(table); \ >+ if (!token) goto out; \ >+ return token_obj_##callname (token); \ >+ out: \ >+@@ -79,6 +79,7 @@ char * token_get_string (u16 id, size_t *len) >+ table = token_table_factory(TOKEN_DEFAULTS); >+ if (!table) goto out; >+ token = token_table_get_next_by_id(table, 0, id); >++ token_table_free(table); >+ if (!token) goto out; >+ return token_obj_get_string(token, len); >+ out: >+@@ -99,6 +100,7 @@ int token_set_string(u16 id, const char *newstr, size_t size) >+ table = token_table_factory(TOKEN_DEFAULTS); >+ if (!table) goto out; >+ token = token_table_get_next_by_id(table, 0, id); >++ token_table_free(table); >+ if (!token) goto out; >+ return token -> set_string (token, newstr, size); >+ out: >+@@ -113,6 +115,7 @@ int token_try_password(u16 id, const char *pass_ascii, const char *pass_scancode >+ table = token_table_factory(TOKEN_DEFAULTS); >+ if (!table) goto out; >+ token = token_table_get_next_by_id(table, 0, id); >++ token_table_free(table); >+ if (!token) goto out; >+ return token -> try_password (token, pass_ascii, pass_scancode); >+ out: >+-- >+2.14.3 >+ >diff --git a/libsmbios.spec b/libsmbios.spec >index dcd9023679b..4708f1de906 100644 >--- a/libsmbios.spec >+++ b/libsmbios.spec >@@ -10,13 +10,13 @@ > > Name: libsmbios > Version: 2.3.3 >-Release: 6%{?dist} >+Release: 8%{?dist} > License: GPLv2+ or OSL 2.1 >-Summary: Libsmbios C/C++ shared libraries >+Summary: Libsmbios C shared libraries > Group: System Environment/Libraries > URL: https://github.com/dell/libsmbios > Buildroot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) >-BuildRequires: strace libxml2-devel gcc-c++ gettext git doxygen >+BuildRequires: strace libxml2-devel gettext git doxygen > BuildRequires: valgrind cppunit hardlink pkgconfig python-devel > BuildRequires: autoconf gettext-devel automake libtool help2man > >@@ -49,6 +49,10 @@ Patch0021: 0021-token.c-don-t-leak-allocated-token-tables.patch > Patch0022: 0022-Fix-two-pointer-arithmetic-errors.patch > Patch0023: 0023-memory_linux.c-remap-fix-some-types-to-avoid-compari.patch > Patch0024: 0024-Get-rid-of-a-bad-debug-print-coverity-found.patch >+Patch0025: 0025-smbios_strerror-always-return-a-new-allocation.patch >+Patch0026: 0026-._get_id-don-t-promote-u16-int-u16.patch >+Patch0027: 0027-slightly-better-token-debugging-information.patch >+Patch0028: 0028-libsmbios_c-use-token_table_free-at-more-places.patch > > %description > Libsmbios is a library and utilities that can be used by client programs to get >@@ -136,7 +140,6 @@ chmod +x ./configure > %configure > > mkdir -p out/libsmbios_c >-mkdir -p out/libsmbios_c++ > make CFLAGS="-Werror" %{?_smp_mflags} 2>&1 | tee build-%{_arch}.log > > echo \%doc _build/build-%{_arch}.log > buildlogs.txt >@@ -164,7 +167,7 @@ popd > runtest() { > mkdir _$1$2 > pushd _$1$2 >- ../configure >+ ../%configure > make -e $1 CFLAGS="$CFLAGS -DDEBUG_OUTPUT_ALL" 2>&1 | tee $1$2.log > touch -r ../configure.ac $1$2-%{_arch}.log > make -e $1 2>&1 | tee $1$2.log >@@ -204,9 +207,8 @@ cp -v $TOPDIR/_build/out/*.8 %{buildroot}/%{_mandir}/man8/ > cp -a $TOPDIR/src/include/* %{buildroot}/%{_includedir}/ > cp -a out/public-include/* %{buildroot}/%{_includedir}/ > rm -f %{buildroot}/%{_libdir}/lib*.{la,a} >-find %{buildroot}/%{_includedir} out/libsmbios_c++ out/libsmbios_c -exec touch -r $TOPDIR/configure.ac {} \; >+find %{buildroot}/%{_includedir} out/libsmbios_c -exec touch -r $TOPDIR/configure.ac {} \; > >-mv out/libsmbios_c++ out/libsmbios_c++-%{_arch} > mv out/libsmbios_c out/libsmbios_c-%{_arch} > > rename %{pot_file}.mo %{lang_dom}.mo $(find %{buildroot}/%{_datadir} -name %{pot_file}.mo) >@@ -228,10 +230,9 @@ rm -rf %{buildroot} > %files -n libsmbios-devel -f _build/buildlogs.txt > %defattr(-,root,root,-) > %doc COPYING-GPL COPYING-OSL README.md src/bin/getopts_LICENSE.txt src/include/smbios/config/boost_LICENSE_1_0_txt >-%{_includedir}/smbios > %{_includedir}/smbios_c > %{_libdir}/libsmbios_c.so >-%{_libdir}/pkgconfig/*.pc >+%{_libdir}/pkgconfig/libsmbios_c.pc > %doc _build/out/libsmbios_c-%{_arch} > > %files -n smbios-utils >@@ -243,7 +244,7 @@ rm -rf %{buildroot} > %files -n smbios-utils-bin > %defattr(-,root,root,-) > %doc COPYING-GPL COPYING-OSL README.md >-%doc src/bin/getopts_LICENSE.txt src/include/smbios/config/boost_LICENSE_1_0_txt >+%doc src/bin/getopts_LICENSE.txt > %{_sbindir}/smbios-state-byte-ctl > %{_mandir}/man8/smbios-state-byte-ctl.* > %{_sbindir}/smbios-get-ut-data >@@ -261,7 +262,7 @@ rm -rf %{buildroot} > %files -n smbios-utils-python > %defattr(-,root,root,-) > %doc COPYING-GPL COPYING-OSL README.md >-%doc src/bin/getopts_LICENSE.txt src/include/smbios/config/boost_LICENSE_1_0_txt >+%doc src/bin/getopts_LICENSE.txt > %dir %{_sysconfdir}/libsmbios > %config(noreplace) %{_sysconfdir}/libsmbios/* > >@@ -289,6 +290,12 @@ rm -rf %{buildroot} > %{_datadir}/smbios-utils > > %changelog >+* Wed May 16 2018 Peter Jones <pjones@redhat.com> - 2.3.3-8 >+- Fix smbios-sys-info-lite crashes when an asset tag is not set >+ Related: rhbz#1562440 >+- Fix vestigial c++ artifacts included in the package >+ Related: rhbz#1562440 >+ > * Wed Feb 14 2018 Peter Jones <pjones@redhat.com> - 2.3.3-6 > - Pull in all the coverity fixes we sent upstream. I had thought these > made it in to this release; they did not, but the 2.4.0 release they are >-- >2.17.0 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 1581722
: 1445971