Source: netkit-bootparamd
Version: 0.17-10
Severity: serious
Tags: patch ftbfs
Justification: fails to build from source (but built successfully in the past)

Dear maintainer,

The glibc SunRPC implementation has been marked obsolete for some time.
It has been removed upstream from glibc 2.32, and it got disabled in the
recent glibc uploads. The TI RPC implementation should be used instead.

For this reason netkit-bootparamd now fails to build from source. You
will find attached a patch to switch to the TI RPC implementation,
fixing the FTBFS.

Regards,
Aurelien 
--- netkit-bootparamd-0.17/debian/control
+++ netkit-bootparamd-0.17/debian/control
@@ -3,7 +3,7 @@
 Priority: optional
 Maintainer: Alberto Gonzalez Iniesta <a...@inittab.org>
 Standards-Version: 4.3.0
-Build-Depends: debhelper (>= 10~), cmake
+Build-Depends: debhelper (>= 10~), cmake, pkg-config, libtirpc-dev
 
 Package: bootparamd
 Architecture: any
--- netkit-bootparamd-0.17/debian/patches/series
+++ netkit-bootparamd-0.17/debian/patches/series
@@ -1,3 +1,5 @@
 fix-getopt-return-type.patch
 use-cmake-as-buildsystem.patch
 use-cmake-as-buildsystem-debian-extras.patch
+use-cmake-as-buildsystem-tirpc.patch
+tirpc-drop-glibc-fix.patch
--- netkit-bootparamd-0.17/debian/patches/tirpc-drop-glibc-fix.patch
+++ netkit-bootparamd-0.17/debian/patches/tirpc-drop-glibc-fix.patch
@@ -0,0 +1,19 @@
+Description: Drop a GNU libc fix now that TI RPC is used instead
+Author: Aurelien Jarno <aure...@debian.org>
+Forwarded: no
+Last-Update: 2021-08-25
+
+--- netkit-bootparamd-0.17.orig/rpc.bootparamd/main.c
++++ netkit-bootparamd-0.17/rpc.bootparamd/main.c
+@@ -16,11 +16,6 @@
+ #include "bootparam_prot.h"
+ 
+ 
+-#ifdef __GLIBC__
+-      /* quick fix */
+-      void get_myaddress(struct sockaddr_in *);
+-#endif
+-
+ int debug = 0;
+ int dolog = 0;
+ struct in_addr route_addr;
--- netkit-bootparamd-0.17/debian/patches/use-cmake-as-buildsystem-tirpc.patch
+++ netkit-bootparamd-0.17/debian/patches/use-cmake-as-buildsystem-tirpc.patch
@@ -0,0 +1,35 @@
+Description: Use TI RPC instead of GNU libc RPC 
+Author: Aurelien Jarno <aure...@debian.org>
+Forwarded: no
+Last-Update: 2021-08-25
+
+--- netkit-bootparamd-0.17.orig/CMakeLists.txt
++++ netkit-bootparamd-0.17/CMakeLists.txt
+@@ -5,4 +5,7 @@ set(BIN_DIR "${CMAKE_INSTALL_PREFIX}/bin
+ set(SBIN_DIR "${CMAKE_INSTALL_PREFIX}/sbin")
+ set(MAN_DIR "${CMAKE_INSTALL_PREFIX}/share/man")
+ 
++find_package(PkgConfig REQUIRED)
++pkg_check_modules(TIRPC REQUIRED libtirpc)
++
+ add_subdirectory(rpc.bootparamd)
+--- netkit-bootparamd-0.17.orig/rpc.bootparamd/CMakeLists.txt
++++ netkit-bootparamd-0.17/rpc.bootparamd/CMakeLists.txt
+@@ -13,6 +13,8 @@ add_executable(
+ 
+     bootparam_prot.h
+ )
++target_include_directories(rpc.bootparamd PUBLIC ${TIRPC_INCLUDE_DIRS})
++target_link_libraries(rpc.bootparamd ${TIRPC_LIBRARIES})
+ add_executable(
+     callbootd
+ 
+@@ -22,6 +24,8 @@ add_executable(
+ 
+     bootparam_prot.h
+ )
++target_include_directories(callbootd PUBLIC ${TIRPC_INCLUDE_DIRS})
++target_link_libraries(callbootd ${TIRPC_LIBRARIES})
+ 
+ install(
+     TARGETS rpc.bootparamd
--- netkit-bootparamd-0.17/debian/control
+++ netkit-bootparamd-0.17/debian/control
@@ -3,7 +3,7 @@
 Priority: optional
 Maintainer: Alberto Gonzalez Iniesta <a...@inittab.org>
 Standards-Version: 4.3.0
-Build-Depends: debhelper (>= 10~), cmake
+Build-Depends: debhelper (>= 10~), cmake, pkg-config, libtirpc-dev
 
 Package: bootparamd
 Architecture: any
--- netkit-bootparamd-0.17/debian/patches/series
+++ netkit-bootparamd-0.17/debian/patches/series
@@ -1,3 +1,5 @@
 fix-getopt-return-type.patch
 use-cmake-as-buildsystem.patch
 use-cmake-as-buildsystem-debian-extras.patch
+use-cmake-as-buildsystem-tirpc.patch
+tirpc-drop-glibc-fix.patch
--- netkit-bootparamd-0.17/debian/patches/tirpc-drop-glibc-fix.patch
+++ netkit-bootparamd-0.17/debian/patches/tirpc-drop-glibc-fix.patch
@@ -0,0 +1,19 @@
+Description: Drop a GNU libc fix now that TI RPC is used instead
+Author: Aurelien Jarno <aure...@debian.org>
+Forwarded: no
+Last-Update: 2021-08-25
+
+--- netkit-bootparamd-0.17.orig/rpc.bootparamd/main.c
++++ netkit-bootparamd-0.17/rpc.bootparamd/main.c
+@@ -16,11 +16,6 @@
+ #include "bootparam_prot.h"
+ 
+ 
+-#ifdef __GLIBC__
+-      /* quick fix */
+-      void get_myaddress(struct sockaddr_in *);
+-#endif
+-
+ int debug = 0;
+ int dolog = 0;
+ struct in_addr route_addr;
--- netkit-bootparamd-0.17/debian/patches/use-cmake-as-buildsystem-tirpc.patch
+++ netkit-bootparamd-0.17/debian/patches/use-cmake-as-buildsystem-tirpc.patch
@@ -0,0 +1,35 @@
+Description: Use TI RPC instead of GNU libc RPC 
+Author: Aurelien Jarno <aure...@debian.org>
+Forwarded: no
+Last-Update: 2021-08-25
+
+--- netkit-bootparamd-0.17.orig/CMakeLists.txt
++++ netkit-bootparamd-0.17/CMakeLists.txt
+@@ -5,4 +5,7 @@ set(BIN_DIR "${CMAKE_INSTALL_PREFIX}/bin
+ set(SBIN_DIR "${CMAKE_INSTALL_PREFIX}/sbin")
+ set(MAN_DIR "${CMAKE_INSTALL_PREFIX}/share/man")
+ 
++find_package(PkgConfig REQUIRED)
++pkg_check_modules(TIRPC REQUIRED libtirpc)
++
+ add_subdirectory(rpc.bootparamd)
+--- netkit-bootparamd-0.17.orig/rpc.bootparamd/CMakeLists.txt
++++ netkit-bootparamd-0.17/rpc.bootparamd/CMakeLists.txt
+@@ -13,6 +13,8 @@ add_executable(
+ 
+     bootparam_prot.h
+ )
++target_include_directories(rpc.bootparamd PUBLIC ${TIRPC_INCLUDE_DIRS})
++target_link_libraries(rpc.bootparamd ${TIRPC_LIBRARIES})
+ add_executable(
+     callbootd
+ 
+@@ -22,6 +24,8 @@ add_executable(
+ 
+     bootparam_prot.h
+ )
++target_include_directories(callbootd PUBLIC ${TIRPC_INCLUDE_DIRS})
++target_link_libraries(callbootd ${TIRPC_LIBRARIES})
+ 
+ install(
+     TARGETS rpc.bootparamd

Reply via email to