remove support for SSL on f27 because of openssl-1.1 - see specfile
authorThierry Parmentelat <thierry.parmentelat@inria.fr>
Tue, 13 Feb 2018 14:20:57 +0000 (15:20 +0100)
committerThierry Parmentelat <thierry.parmentelat@inria.fr>
Tue, 13 Feb 2018 14:20:57 +0000 (15:20 +0100)
pcucontrol.spec
pcucontrol/models/intelamt/Include/CommonDefinitions.h
pcucontrol/models/intelamt/Makefile

index a0c8968..a9b78eb 100644 (file)
@@ -33,13 +33,25 @@ supported models.
 %prep
 %setup -q
 
 %prep
 %setup -q
 
+#################### Important note
+# starting with fedora27, fedora comes with openssl-11.0g
+# and in this version 
+# X509_EXTENSION {aka struct X509_extension_st}
+# has become opaque
+# this is mentioned here
+# https://github.com/openssl/openssl/issues/2239
+# see https://wiki.openssl.org/index.php/OpenSSL_1.1.0_Changes#Compatibility_Layer
+# 
+# so we turn off support for SSL starting with fedora27
+# this is in pcucontrol/models/intelamt/Makefile - see FCDISTRO
+
 %build
 # NOTE: the build uses g++ cmdamt/
 # NOTE: TMPDIR is needed here b/c the tmpfs of the build vserver is too small.
 cd pcucontrol/models/intelamt
 export TMPDIR=$PWD/tmp
 mkdir -p $TMPDIR
 %build
 # NOTE: the build uses g++ cmdamt/
 # NOTE: TMPDIR is needed here b/c the tmpfs of the build vserver is too small.
 cd pcucontrol/models/intelamt
 export TMPDIR=$PWD/tmp
 mkdir -p $TMPDIR
-make
+make FCDISTRO=%{fcdistro}
 cd ..
 
 %install
 cd ..
 
 %install
index 79555ab..84f8381 100644 (file)
@@ -245,12 +245,16 @@ public:
   soap_imode(m_soap, SOAP_IO_KEEPALIVE);
        if ( !strncmp(m_ip, "https:", 6) )
        {
   soap_imode(m_soap, SOAP_IO_KEEPALIVE);
        if ( !strncmp(m_ip, "https:", 6) )
        {
+#ifdef WITH_OPENSSL
                soap_ssl_client_context(m_soap,
                                                                SOAP_SSL_DEFAULT,
                                                                certName,
                                                                certPass,
                                                                "/usr/share/ssl/cert.pem",
                                                                "/usr/share/ssl/certs/", NULL);
                soap_ssl_client_context(m_soap,
                                                                SOAP_SSL_DEFAULT,
                                                                certName,
                                                                certPass,
                                                                "/usr/share/ssl/cert.pem",
                                                                "/usr/share/ssl/certs/", NULL);
+#else
+                printf("WARNING, pcucontrol has no support for ssl starting with openssl-1.1\n");
+#endif
        }
 #endif
   }
        }
 #endif
   }
index ba2793d..b919fc6 100644 (file)
@@ -1,9 +1,20 @@
 CC = g++
 LIBTOOL = libtool
 ARCH := $(shell uname -m | sed 's/i.86/i386/')
 CC = g++
 LIBTOOL = libtool
 ARCH := $(shell uname -m | sed 's/i.86/i386/')
-X64FLAGS = -Wlong-long -Wformat -Wpointer-arith
-CFLAGS = -Dlinux  -Wall -Wno-deprecated
+
+# for f27: removing -Wlong-long
+X64FLAGS = -Wformat -Wpointer-arith 
+
+# for f27: getting rid of most warnings
+CFLAGS = -Dlinux -Wno-write-strings
+
+# for f27 : remove support for SSL - hopefully temporary
+# the changes to openssl 1.1 look a bit awkward though
+ifneq "$(FCDISTRO)" "$(filter $(FCDISTRO),f27)"
+SSL = 
+else
 SSL = -DWITH_OPENSSL
 SSL = -DWITH_OPENSSL
+endif
 
 ifeq ($(ARCH),x86_64)
        FLAGS = $(CFLAGS) $(X64FLAGS) $(SSL)
 
 ifeq ($(ARCH),x86_64)
        FLAGS = $(CFLAGS) $(X64FLAGS) $(SSL)
@@ -11,7 +22,7 @@ else
        FLAGS = $(CFLAGS) $(SSL)
 endif
 
        FLAGS = $(CFLAGS) $(SSL)
 endif
 
-CFLAGS = -Dlinux  -Wall -Wno-deprecated $(SSL)
+#CFLAGS = -Dlinux  -Wall -Wno-deprecated $(SSL)
 GSOAP_PATH = ./
 GSOAP_CODE = ./
 INC_PATH = ./Include
 GSOAP_PATH = ./
 GSOAP_CODE = ./
 INC_PATH = ./Include
@@ -37,7 +48,3 @@ Utils.o: $(SRC_PATH)/Utils.cpp
 clean:
        rm -f $(OBJS) $(APPNAME) *~
        rm -rf .libs
 clean:
        rm -f $(OBJS) $(APPNAME) *~
        rm -rf .libs
-       #dos2unix *.h
-       #dos2unix *.cpp
-       #dos2unix README
-       #dos2unix Makefile