From 3dc1759711f70f78e52b8fb968067d2214906e85 Mon Sep 17 00:00:00 2001 From: Peter Jones Date: Wed, 9 Mar 2016 13:37:15 -0500 Subject: [PATCH] Put back the patch to avoid needless #warn directives in public headers. - Once again, don't complain about compilers newer than tested with in the public headers. - Also use git to apply all patches. - Fix up bad %global vs %define directives - Fix up bad old changelog dates Signed-off-by: Peter Jones --- ...compiler-version-check-on-consumers-.patch | 149 ++++++++++++++++++ libsmbios.spec | 21 ++- 2 files changed, 168 insertions(+), 2 deletions(-) create mode 100644 0001-Don-t-force-the-compiler-version-check-on-consumers-.patch diff --git a/0001-Don-t-force-the-compiler-version-check-on-consumers-.patch b/0001-Don-t-force-the-compiler-version-check-on-consumers-.patch new file mode 100644 index 0000000..5489aeb --- /dev/null +++ b/0001-Don-t-force-the-compiler-version-check-on-consumers-.patch @@ -0,0 +1,149 @@ +From 74913b28e3a436a6c519f66332a0b140bf72aa67 Mon Sep 17 00:00:00 2001 +From: Peter Jones +Date: Thu, 25 Feb 2016 15:22:57 -0500 +Subject: [PATCH] Don't force the compiler version check on consumers of the + library. + +This check just stops things from building when the compiler gets +upgraded, and it clearly hasn't been maintained in some time. The .so +almost certainly still works fine, and if the headers don't, the +consuming build will fail anyway. + +Signed-off-by: Peter Jones +--- + Makefile.am | 6 +++--- + Makefile.in | 6 +++--- + src/include/smbios/config/compiler/gcc.hpp | 4 ++-- + src/include/smbios/config/compiler/sunpro_cc.hpp | 2 ++ + src/include/smbios/config/compiler/visualc.hpp | 2 ++ + src/include/smbios_c/config/compiler/gcc.h | 4 ++-- + src/include/smbios_c/config/compiler/visualc.h | 2 ++ + 7 files changed, 16 insertions(+), 10 deletions(-) + +diff --git a/Makefile.am b/Makefile.am +index 0f39e27..8ded6cd 100644 +--- a/Makefile.am ++++ b/Makefile.am +@@ -17,9 +17,9 @@ lib_LTLIBRARIES= + + TESTS= + +-AM_CPPFLAGS = -I$(top_builddir)/out/include -I$(top_srcdir)/src/include -DLIBSMBIOS_LOCALEDIR=\"$(localedir)\" +-AM_CFLAGS = -Wall +-AM_CXXFLAGS = -Wall ++AM_CPPFLAGS = -I$(top_builddir)/out/include -I$(top_srcdir)/src/include -DLIBSMBIOS_LOCALEDIR=\"$(localedir)\" -DLIBSMBIOS_BUILD ++AM_CFLAGS = -Wall -DLIBSMBIOS_BUILD ++AM_CXXFLAGS = -Wall -DLIBSMBIOS_BUILD + AM_LDADD = $(LIBINTL) + + AM_LDFLAGS = -L$(top_builddir)/out/ +diff --git a/Makefile.in b/Makefile.in +index 00a7c2b..f7a2126 100644 +--- a/Makefile.in ++++ b/Makefile.in +@@ -1213,9 +1213,9 @@ check_SCRIPTS = + noinst_LTLIBRARIES = out/libgetopt.la + lib_LTLIBRARIES = $(am__append_3) out/libsmbios_c.la + TESTS = src/pyunit/runtests.sh $(am__append_27) +-AM_CPPFLAGS = -I$(top_builddir)/out/include -I$(top_srcdir)/src/include -DLIBSMBIOS_LOCALEDIR=\"$(localedir)\" +-AM_CFLAGS = -Wall +-AM_CXXFLAGS = -Wall ++AM_CPPFLAGS = -I$(top_builddir)/out/include -I$(top_srcdir)/src/include -DLIBSMBIOS_LOCALEDIR=\"$(localedir)\" -DLIBSMBIOS_BUILD ++AM_CFLAGS = -Wall -DLIBSMBIOS_BUILD ++AM_CXXFLAGS = -Wall -DLIBSMBIOS_BUILD + AM_LDADD = $(LIBINTL) + AM_LDFLAGS = -L$(top_builddir)/out/ $(am__append_1) $(am__append_2) + +diff --git a/src/include/smbios/config/compiler/gcc.hpp b/src/include/smbios/config/compiler/gcc.hpp +index 13d97d9..c8b1b0d 100644 +--- a/src/include/smbios/config/compiler/gcc.hpp ++++ b/src/include/smbios/config/compiler/gcc.hpp +@@ -113,6 +113,7 @@ + # error "Compiler too old. GCC > 3.0 required" + #endif + // ++#ifdef LIBSMBIOS_BUILD + #if (__GNUC__ > 5) + # if defined(LIBSMBIOS_ASSERT_CONFIG) + # error "Unknown compiler version - please run the configure tests and report the results" +@@ -120,5 +121,4 @@ + # warning "Unknown compiler version - please run the configure tests and report the results" + # endif + #endif +- +- ++#endif +diff --git a/src/include/smbios/config/compiler/sunpro_cc.hpp b/src/include/smbios/config/compiler/sunpro_cc.hpp +index 64e5c7e..8fc8095 100644 +--- a/src/include/smbios/config/compiler/sunpro_cc.hpp ++++ b/src/include/smbios/config/compiler/sunpro_cc.hpp +@@ -123,11 +123,13 @@ + #endif + // + // last known and checked version is 0x590: ++#ifdef LIBSMBIOS_BUILD + #if (__SUNPRO_CC > 0x590) + # if defined(LIBSMBIOS_ASSERT_CONFIG) + # error "Unknown compiler version - please run the configure tests and report the results" + # endif + #endif ++#endif + + #ifndef UNREFERENCED_PARAMETER + #define UNREFERENCED_PARAMETER(P) ((void)(P)) +diff --git a/src/include/smbios/config/compiler/visualc.hpp b/src/include/smbios/config/compiler/visualc.hpp +index 564b09b..d244898 100644 +--- a/src/include/smbios/config/compiler/visualc.hpp ++++ b/src/include/smbios/config/compiler/visualc.hpp +@@ -171,6 +171,7 @@ + #endif + // + // last known and checked version is 1310: ++#ifdef LIBSMBIOS_BUILD + #if (_MSC_VER > 1400) + # if defined(LIBSMBIOS_ASSERT_CONFIG) + # error "Unknown compiler version - please run the configure tests and report the results" +@@ -178,3 +179,4 @@ + # pragma message("Unknown compiler version - please run the configure tests and report the results") + # endif + #endif ++#endif +diff --git a/src/include/smbios_c/config/compiler/gcc.h b/src/include/smbios_c/config/compiler/gcc.h +index 007cc73..a299e72 100644 +--- a/src/include/smbios_c/config/compiler/gcc.h ++++ b/src/include/smbios_c/config/compiler/gcc.h +@@ -24,6 +24,7 @@ + # error "GCC versions < 2.90 not supported" + #endif + // ++#ifdef LIBSMBIOS_BUILD + #if (__GNUC__ > 5) + # if defined(LIBSMBIOS_C_ASSERT_CONFIG) + # error "Unknown compiler version - please run the configure tests and report the results" +@@ -31,5 +32,4 @@ + # warning "Unknown compiler version - please run the configure tests and report the results" + # endif + #endif +- +- ++#endif +diff --git a/src/include/smbios_c/config/compiler/visualc.h b/src/include/smbios_c/config/compiler/visualc.h +index 545d4ef..f44ab62 100644 +--- a/src/include/smbios_c/config/compiler/visualc.h ++++ b/src/include/smbios_c/config/compiler/visualc.h +@@ -53,6 +53,7 @@ + #endif + // + // last known and checked version is 1310: ++#ifdef LIBSMBIOS_BUILD + #if (_MSC_VER > 1500) + # if defined(LIBSMBIOS_C_ASSERT_CONFIG) + # error "Unknown compiler version - please run the configure tests and report the results" +@@ -60,3 +61,4 @@ + # pragma message("Unknown compiler version - please run the configure tests and report the results") + # endif + #endif ++#endif +-- +2.5.0 + diff --git a/libsmbios.spec b/libsmbios.spec index dd3fce8..bd2e2f8 100644 --- a/libsmbios.spec +++ b/libsmbios.spec @@ -99,14 +99,15 @@ Name: %{release_name} Version: %{release_version} -Release: 1%{?dist} +Release: 2%{?dist} License: GPLv2+ or OSL 2.1 Summary: Libsmbios C/C++ shared libraries Group: System Environment/Libraries Source: http://linux.dell.com/libsmbios/download/libsmbios/libsmbios-%{version}/libsmbios-%{version}.tar.bz2 +Patch0001: 0001-Don-t-force-the-compiler-version-check-on-consumers-.patch URL: http://linux.dell.com/libsmbios/main Buildroot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) -BuildRequires: strace libxml2-devel gcc-c++ gettext doxygen %{valgrind_BR} %{cppunit_BR} %{fdupes_BR} %{pkgconfig_BR} %{python_devel_BR} +BuildRequires: strace libxml2-devel gcc-c++ gettext git doxygen %{valgrind_BR} %{cppunit_BR} %{fdupes_BR} %{pkgconfig_BR} %{python_devel_BR} # uncomment for official fedora Obsoletes: libsmbios-libs < 2.0.0 Provides: libsmbios-libs = 0:%{version}-%{release} @@ -217,6 +218,15 @@ substitutions in yum repository configuration files on Dell systems. find . -type d -exec chmod -f 755 {} \; find doc src -type f -exec chmod -f 644 {} \; chmod 755 src/cppunit/*.sh +git init +git config user.email "%{name}-owner@fedoraproject.org" +git config user.name "Fedora Ninjas" +git config gc.auto 0 +git add . +git commit -a -q -m "%{version} baseline." +git am %{patches} - 2.3.0-2 +- Once again, don't complain about compilers newer than tested with in the + public headers. +- Fix up bad %%global vs %%define directives +- Fix up bad old changelog dates +- Note there's a missing changelog here from the 2.3.0 rebase + * Thu Feb 25 2016 Peter Jones - 2.2.28-16 - Don't complain about compilers newer than tested with in the public headers.