#1 FTBFS fix
Merged 5 years ago by tdawson. Opened 5 years ago by merlinm.
Unknown source master  into  master

The added file is too large to be shown here, see it at: torque-4.2.10-fix-bad-crypto-check.patch
@@ -0,0 +1,29 @@

+ From fb7c21c16423cecdbd8ac2429118305c26b82bb4 Mon Sep 17 00:00:00 2001

+ From: Justin Bronder <jsbronder@gmail.com>

+ Date: Sat, 1 Jun 2013 11:37:27 -0400

+ Subject: [PATCH] Libnet:  remove unused header

+ 

+ Do not include <rpc/rpc.h> as it is unused.  While this is normally

+ harmless, glibc is dropping support for rpc as of 2.14 [1] and ipv6 is

+ only supported in ti-rpc.

+ 

+ This fixes building on distros that have not manually patched rpc

+ support back into glibc.

+ 

+ 1. http://sourceware.org/bugzilla/show_bug.cgi?id=12949

+ ---

+  src/lib/Libnet/net_client.c | 1 -

+  1 file changed, 1 deletion(-)

+ 

+ diff --git a/src/lib/Libnet/net_client.c b/src/lib/Libnet/net_client.c

+ index d8e51312f8..04c3ba0d78 100644

+ --- a/src/lib/Libnet/net_client.c

+ +++ b/src/lib/Libnet/net_client.c

+ @@ -80,7 +80,6 @@

+  

+  #include <sys/types.h>

+  #include <sys/socket.h>

+ -#include <rpc/rpc.h>

+  #include <netinet/in.h>

+  #include <stdio.h>

+  #include <errno.h>

file modified
+19 -8
@@ -71,7 +71,7 @@

  

  Name:        torque

  Version:     4.2.10

- Release:     15%{?dist}

+ Release:     16%{?dist}

  Summary:     Tera-scale Open-source Resource and QUEue manager

  Source0:     http://www.adaptivecomputing.com/download/%{name}/%{name}-%{version}.tar.gz

  Source2:     xpbs.desktop
@@ -94,6 +94,10 @@

  # https://bugzilla.redhat.com/show_bug.cgi?id=713996

  Patch1:      torque-munge-size.patch

  Patch2:      torque-%{version}-port-args.patch

+ # Fixes https://bugzilla.redhat.com/show_bug.cgi?id=1424149

+ Patch3:      torque-%{version}-fix-bad-crypto-check.patch

+ # From https://github.com/adaptivecomputing/torque/pull/148

+ Patch4:      torque-%{version}-remove-unused-header.patch

  

  License:     OpenPBS and TORQUEv1.1

  Group:       System Environment/Daemons
@@ -126,23 +130,23 @@

  %if 0%{?doxydoc}

  BuildRequires:  graphviz

  BuildRequires:  doxygen

- %if "%{?rhel}" == "5"

+ %if 0%{?rhel} == 5

  BuildRequires: graphviz-gd

  %endif

- %if %{?fedora}%{!?fedora:0} >= 24

+ %if 0%{?fedora} >= 24 || 0%{?rhel} > 7

  BuildRequires:  texlive-tabu

  %endif

- %if %{?fedora}%{!?fedora:0} >= 9 || %{?rhel}%{!?rhel:0} >= 7

+ %if 0%{?fedora} >= 9 || 0%{?rhel} >= 7

  BuildRequires:  tex(latex)

  BuildRequires:  tex-xtab

  BuildRequires:  tex-sectsty

  BuildRequires:  tex-tocloft

  BuildRequires:  tex-multirow

- %if %{?fedora}%{!?fedora:0}

+ %if 0%{?fedora} || 0%{?rhel} > 7

  BuildRequires:  tex-adjustbox

  %endif

  %else

- %if %{?rhel}%{!?rhel:0} >= 6

+ %if 0%{?rhel} >= 6

  BuildRequires:  tex(latex)

  %else

  BuildRequires:  tetex-latex
@@ -367,6 +371,8 @@

  %setup -q -n torque-%{version}

  %patch1 -p 1

  %patch2 -p 1

+ %patch3 -p 0

+ %patch4 -p 1

  sed -i '/LATEX_BATCHMODE/d' src/drmaa/Doxyfile.in

  install -pm 644 %{SOURCE2} %{SOURCE3} %{SOURCE4} %{SOURCE5} \

     %{SOURCE6} %{SOURCE8} .
@@ -374,7 +380,8 @@

  chmod 644 torque.setup

  

  %build

- CFLAGS="%{optflags} -DUSE_INTERP_RESULT -DUSE_INTERP_ERRORLINE"

+ # -fpermissive added to downgrade numerous 'invalid conversion' errors to warnings

+ CFLAGS="%{optflags} -DUSE_INTERP_RESULT -DUSE_INTERP_ERRORLINE -fpermissive"

  %configure --includedir=%{_includedir}/torque \

    --with-server-home=%{torquehomedir} --with-pam=/%{_lib}/security \

    --with-sendmail=%{_sbindir}/sendmail --disable-static \
@@ -865,7 +872,7 @@

  %{_mandir}/man3/compat.h.3.*

  %{_mandir}/man3/drmaa.3.*

  %{_mandir}/man3/drmaa.h.3.*

- %if 0%{?rhel}%{?fedora} >= 6

+ %if 0%{?rhel} >= 6 || 0%{?fedora} >= 6

  %{_mandir}/man3/drmaa_attr_names_s.3.*

  %{_mandir}/man3/drmaa_attr_values_s.3.*

  %{_mandir}/man3/drmaa_attrib.3.*
@@ -889,6 +896,10 @@

  %endif

  

  %changelog

+ * Thu Jan 11 2018 Merlin Mathesius <mmathesi@redhat.com> - 4.2.10-16

+ - Cleanup spec file conditionals

+ - Fix FTBFS (BZ#1424149)

+ 

  * Thu Aug 03 2017 Fedora Release Engineering <releng@fedoraproject.org> - 4.2.10-15

  - Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild

  

torque currently fails to build from source in F27 and Rawhide, as noted in Bugzilla #1424149.

The build currently fails due to several reasons:
1. configure is checking for the obsolete function BN_init() when detecting the crypto lib.
2. Source file net_client.c attempts to include obsoleted header file <rpc/rpc.h>.
3. There are many invalid type conversions in the source causing fatal compiler errors.

This PR fixes all of the above, in addition to cleaning up the spec file conditionals.

Please see the following rawhide scratch build of this update: https://koji.fedoraproject.org/koji/taskinfo?taskID=24143770

LGTM
Wow, thank you for tracking that down and making a patch.

Pull-Request has been merged by tdawson

5 years ago