tags -1 patch user [email protected] usertags -1 + bsp-2018-12-ch-bern thanks
Find attached the fix for netkit-tftp.
For a full explanation, see
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=911154#44
Regards,
Christoph
diff -Nru netkit-tftp-0.17/debian/control netkit-tftp-0.17/debian/control --- netkit-tftp-0.17/debian/control 2018-07-04 11:26:25.000000000 +0200 +++ netkit-tftp-0.17/debian/control 2018-07-04 11:26:25.000000000 +0200 @@ -3,7 +3,7 @@ Priority: optional Maintainer: Alberto Gonzalez Iniesta <[email protected]> Standards-Version: 4.1.4 -Build-Depends: debhelper (>= 11) +Build-Depends: debhelper (>= 11), cmake Package: tftp Architecture: any diff -Nru netkit-tftp-0.17/debian/not-installed netkit-tftp-0.17/debian/not-installed --- netkit-tftp-0.17/debian/not-installed 1970-01-01 01:00:00.000000000 +0100 +++ netkit-tftp-0.17/debian/not-installed 2018-07-04 11:26:25.000000000 +0200 @@ -0,0 +1,2 @@ + +usr/share/man/man8/tftpd.8 diff -Nru netkit-tftp-0.17/debian/patches/875885.patch netkit-tftp-0.17/debian/patches/875885.patch --- netkit-tftp-0.17/debian/patches/875885.patch 2018-07-04 11:26:25.000000000 +0200 +++ netkit-tftp-0.17/debian/patches/875885.patch 1970-01-01 01:00:00.000000000 +0100 @@ -1,37 +0,0 @@ -Index: netkit-tftp/configure -=================================================================== ---- netkit-tftp.orig/configure 2018-07-03 17:30:02.671087917 +0200 -+++ netkit-tftp/configure 2018-07-03 17:30:08.663136286 +0200 -@@ -1,4 +1,5 @@ - #!/bin/sh -+set -e - # - # This file was generated by confgen version 2. - # Do not edit. -@@ -85,7 +86,7 @@ - echo 'failed.' - echo 'Cannot find a C compiler. Run configure with --with-c-compiler.' - rm -f __conftest* -- exit -+ exit 33 - fi - echo "$CC" - else -@@ -99,7 +100,7 @@ - echo 'no' - echo 'Compiler '"$CC"' does not exist or cannot compile C; try another.' - rm -f __conftest* -- exit -+ exit 33 - fi - fi - -@@ -186,7 +187,7 @@ - echo 'no' - echo 'Cannot work out what to use for socklen_t. Help...' - rm -f __conftest* -- exit -+ exit 33 - fi - fi - fi diff -Nru netkit-tftp-0.17/debian/patches/cross.patch netkit-tftp-0.17/debian/patches/cross.patch --- netkit-tftp-0.17/debian/patches/cross.patch 2018-07-04 11:26:25.000000000 +0200 +++ netkit-tftp-0.17/debian/patches/cross.patch 1970-01-01 01:00:00.000000000 +0100 @@ -1,26 +0,0 @@ ---- netkit-tftp-0.17.orig/configure -+++ netkit-tftp-0.17/configure -@@ -75,10 +75,7 @@ - if [ x"$CC" = x ]; then - echo -n 'Looking for a C compiler... ' - for TRY in egcs gcc g++ CC c++ cc; do -- ( -- $TRY __conftest.c -o __conftest || exit 1; -- ./__conftest || exit 1; -- ) >/dev/null 2>&1 || continue; -+ $TRY __conftest.c -o __conftest >/dev/null 2>&1 || continue; - CC=$TRY - break; - done -@@ -91,10 +88,7 @@ - echo "$CC" - else - echo -n 'Checking if C compiler works... ' -- if ( -- $CC __conftest.c -o __conftest || exit 1 -- ./__conftest || exit 1 -- ) >/dev/null 2>&1; then -+ if $CC __conftest.c -o __conftest >/dev/null 2>&1; then - echo 'yes' - else - echo 'no' diff -Nru netkit-tftp-0.17/debian/patches/debian_changes_0.17-18.patch netkit-tftp-0.17/debian/patches/debian_changes_0.17-18.patch --- netkit-tftp-0.17/debian/patches/debian_changes_0.17-18.patch 2018-07-04 11:26:25.000000000 +0200 +++ netkit-tftp-0.17/debian/patches/debian_changes_0.17-18.patch 2018-07-04 11:26:25.000000000 +0200 @@ -3,10 +3,8 @@ Reviewed-By: Alberto Gonzalez Iniesta <[email protected]> Last-Update: 2018-07-03 -Index: netkit-tftp/MRULES -=================================================================== ---- netkit-tftp.orig/MRULES 2018-07-03 11:26:05.579450753 +0200 -+++ netkit-tftp/MRULES 2018-07-03 11:26:05.575450719 +0200 +--- a/MRULES ++++ b/MRULES @@ -1,8 +1,8 @@ # Standard compilation rules (don't use make builtins) @@ -18,23 +16,8 @@ - $(CC) $(CFLAGS) -I../include $< -c + $(CC) $(CFLAGS) $< -c -Index: netkit-tftp/tftp/Makefile -=================================================================== ---- netkit-tftp.orig/tftp/Makefile 2018-07-03 11:26:05.579450753 +0200 -+++ netkit-tftp/tftp/Makefile 2018-07-03 11:26:05.575450719 +0200 -@@ -12,7 +12,7 @@ - tftp.o: ../version.h - - install: tftp -- install -s -m$(BINMODE) tftp $(INSTALLROOT)$(BINDIR) -+ install -m$(BINMODE) tftp $(INSTALLROOT)$(BINDIR) - install -m$(MANMODE) tftp.1 $(INSTALLROOT)$(MANDIR)/man1 - - clean: -Index: netkit-tftp/tftp/main.c -=================================================================== ---- netkit-tftp.orig/tftp/main.c 2018-07-03 11:26:05.579450753 +0200 -+++ netkit-tftp/tftp/main.c 2018-07-03 11:26:05.575450719 +0200 +--- a/tftp/main.c ++++ b/tftp/main.c @@ -68,8 +68,9 @@ #define TIMEOUT 5 /* secs between rexmt's */ @@ -384,10 +367,8 @@ } -Index: netkit-tftp/tftp/tftp.1 -=================================================================== ---- netkit-tftp.orig/tftp/tftp.1 2018-07-03 11:26:05.579450753 +0200 -+++ netkit-tftp/tftp/tftp.1 2018-07-03 11:26:05.575450719 +0200 +--- a/tftp/tftp.1 ++++ b/tftp/tftp.1 @@ -84,7 +84,7 @@ protocol, unlike the .Tn FTP @@ -397,10 +378,8 @@ .Cm connect command does not actually create a connection, but merely remembers what host is to be used for transfers. -Index: netkit-tftp/tftp/tftp.c -=================================================================== ---- netkit-tftp.orig/tftp/tftp.c 2018-07-03 11:26:05.579450753 +0200 -+++ netkit-tftp/tftp/tftp.c 2018-07-03 11:26:05.575450719 +0200 +--- a/tftp/tftp.c ++++ b/tftp/tftp.c @@ -61,7 +61,8 @@ #include "../version.h" @@ -592,10 +571,8 @@ perror("nak"); } -Index: netkit-tftp/tftp/tftpsubs.c -=================================================================== ---- netkit-tftp.orig/tftp/tftpsubs.c 2018-07-03 11:26:05.579450753 +0200 -+++ netkit-tftp/tftp/tftpsubs.c 2018-07-03 11:26:05.575450719 +0200 +--- a/tftp/tftpsubs.c ++++ b/tftp/tftpsubs.c @@ -55,6 +55,7 @@ #include <arpa/tftp.h> #include <unistd.h> @@ -632,10 +609,8 @@ } } } -Index: netkit-tftp/tftp/tftpsubs.h -=================================================================== ---- netkit-tftp.orig/tftp/tftpsubs.h 2018-07-03 11:26:05.579450753 +0200 -+++ netkit-tftp/tftp/tftpsubs.h 2018-07-03 11:26:05.575450719 +0200 +--- a/tftp/tftpsubs.h ++++ b/tftp/tftpsubs.h @@ -1,6 +1,7 @@ #define PKTSIZE SEGSIZE+4 /* should be moved to tftp.h */ @@ -645,23 +620,8 @@ struct tftphdr *r_init(void); struct tftphdr *w_init(void); int readit(FILE *file, struct tftphdr **dpp, int convert); -Index: netkit-tftp/tftpd/Makefile -=================================================================== ---- netkit-tftp.orig/tftpd/Makefile 2018-07-03 11:26:05.579450753 +0200 -+++ netkit-tftp/tftpd/Makefile 2018-07-03 11:26:05.575450719 +0200 -@@ -17,7 +17,7 @@ - tftpd.o: ../version.h - - install: tftpd -- install -s -m$(DAEMONMODE) tftpd $(INSTALLROOT)$(SBINDIR)/in.tftpd -+ install -m$(DAEMONMODE) tftpd $(INSTALLROOT)$(SBINDIR)/in.tftpd - install -m$(MANMODE) tftpd.8 $(INSTALLROOT)$(MANDIR)/man8/in.tftpd.8 - ln -sf in.tftpd.8 $(INSTALLROOT)$(MANDIR)/man8/tftpd.8 - -Index: netkit-tftp/tftpd/tftpd.8 -=================================================================== ---- netkit-tftp.orig/tftpd/tftpd.8 2018-07-03 11:26:05.579450753 +0200 -+++ netkit-tftp/tftpd/tftpd.8 2018-07-03 11:26:05.575450719 +0200 +--- a/tftpd/tftpd.8 ++++ b/tftpd/tftpd.8 @@ -42,6 +42,8 @@ Trivial File Transfer Protocol server .Sh SYNOPSIS @@ -690,10 +650,8 @@ .Sh SEE ALSO .Xr tftp 1 , .Xr inetd 8 -Index: netkit-tftp/tftpd/tftpd.c -=================================================================== ---- netkit-tftp.orig/tftpd/tftpd.c 2018-07-03 11:26:05.579450753 +0200 -+++ netkit-tftp/tftpd/tftpd.c 2018-07-03 11:26:05.575450719 +0200 +--- a/tftpd/tftpd.c ++++ b/tftpd/tftpd.c @@ -89,28 +89,44 @@ static char buf[PKTSIZE]; diff -Nru netkit-tftp-0.17/debian/patches/series netkit-tftp-0.17/debian/patches/series --- netkit-tftp-0.17/debian/patches/series 2018-07-04 11:26:25.000000000 +0200 +++ netkit-tftp-0.17/debian/patches/series 2018-07-04 11:26:25.000000000 +0200 @@ -2,5 +2,4 @@ tftpd_use_sendto.patch memory_corruption.patch manpage_warning.patch -875885.patch -cross.patch +use-cmake-as-buildsystem.patch diff -Nru netkit-tftp-0.17/debian/patches/use-cmake-as-buildsystem.patch netkit-tftp-0.17/debian/patches/use-cmake-as-buildsystem.patch --- netkit-tftp-0.17/debian/patches/use-cmake-as-buildsystem.patch 1970-01-01 01:00:00.000000000 +0100 +++ netkit-tftp-0.17/debian/patches/use-cmake-as-buildsystem.patch 2018-07-04 11:26:25.000000000 +0200 @@ -0,0 +1,67 @@ +Description: Use cmake as build system +Author: Christoph Biedl <[email protected]> +Bug-Debian: https://bugs.debian.org/912133 +Last-Update: 2018-11-25 + +--- /dev/null ++++ b/CMakeLists.txt +@@ -0,0 +1,9 @@ ++cmake_minimum_required(VERSION 3.7) ++project(netkit-tftp) ++ ++set(BIN_DIR "${CMAKE_INSTALL_PREFIX}/bin") ++set(SBIN_DIR "${CMAKE_INSTALL_PREFIX}/sbin") ++set(MAN_DIR "${CMAKE_INSTALL_PREFIX}/share/man") ++ ++add_subdirectory(tftp) ++add_subdirectory(tftpd) +--- /dev/null ++++ b/tftp/CMakeLists.txt +@@ -0,0 +1,17 @@ ++ ++add_executable( ++ tftp ++ tftp.c ++ main.c ++ tftpsubs.c ++) ++install( ++ TARGETS tftp ++ DESTINATION ${BIN_DIR} ++) ++ ++install( ++ FILES tftp.1 ++ DESTINATION ${MAN_DIR}/man1/ ++) ++ +--- /dev/null ++++ b/tftpd/CMakeLists.txt +@@ -0,0 +1,27 @@ ++ ++include_directories( ++ BEFORE ++ "${CMAKE_SOURCE_DIR}/tftp/" ++) ++ ++add_executable( ++ in.tftpd ++ tftpd.c ++ "${CMAKE_SOURCE_DIR}/tftp/tftpsubs.c" ++) ++install( ++ TARGETS in.tftpd ++ DESTINATION ${SBIN_DIR} ++) ++ ++install( ++ FILES tftpd.8 ++ DESTINATION ${MAN_DIR}/man8/ ++ RENAME in.tftpd.8 ++) ++INSTALL( ++ CODE "execute_process( \ ++ COMMAND ${CMAKE_COMMAND} -E create_symlink \ ++ in.tftpd.8 \$ENV{DESTDIR}${MAN_DIR}/man8/tftpd.8 \ ++ )" ++) diff -Nru netkit-tftp-0.17/debian/rules netkit-tftp-0.17/debian/rules --- netkit-tftp-0.17/debian/rules 2018-07-04 11:26:25.000000000 +0200 +++ netkit-tftp-0.17/debian/rules 2018-07-04 11:26:25.000000000 +0200 @@ -1,101 +1,7 @@ #!/usr/bin/make -f -# GNU copyright 1997 to 1999 by Joey Hess. -# Copyright (c) 1999 Herbert Xu <[email protected]>. -# Uncomment this to turn on verbose mode. -#export DH_VERBOSE=1 +%: + dh $@ --buildsystem=cmake -# This is the debhelper compatability version to use. -#export DH_COMPAT=2 - -# This has to be exported to make some magic below work. -export DH_OPTIONS - -DPKG_EXPORT_BUILDTOOLS=1 --include /usr/share/dpkg/buildtools.mk - -build: build-stamp -build-stamp: - dh_testdir - - if [ ! -f MCONFIG ]; then \ - ./configure; \ - fi - $(MAKE) - - touch build-stamp - -clean: - dh_testdir - dh_testroot - rm -f build-stamp install-stamp - - [ ! -f MCONFIG ] || $(MAKE) distclean - - dh_clean - -install: DH_OPTIONS= -install: build - dh_testdir - dh_testroot - dh_prep - dh_installdirs - - $(MAKE) -C tftp install INSTALLROOT=`pwd`/debian/tftp \ - MANDIR='/usr/share/man' - $(MAKE) -C tftpd install INSTALLROOT=`pwd`/debian/tftpd \ - MANDIR='/usr/share/man' - - touch install-stamp - -# This single target is used to build all the packages, all at once, or -# one at a time. So keep in mind: any options passed to commands here will -# affect _all_ packages. Anything you want to only affect one package -# should be put in another target, such as the install target. -binary-common: build install - # Need this version of debhelper for DH_OPTIONS to work. - #deprecated#dh_testversion 1.1.17 - dh_testdir - dh_testroot -# dh_installdebconf - dh_installdocs - dh_installexamples - dh_installmenu -# dh_installemacsen -# dh_installpam -# dh_installinit - dh_installcron - dh_installinfo -# dh_undocumented - dh_installchangelogs ChangeLog - dh_link - dh_strip - dh_compress - dh_fixperms - # You may want to make some executables suid here. -# dh_makeshlibs - dh_installdeb -# dh_perl - dh_shlibdeps - dh_gencontrol - dh_md5sums - dh_builddeb - -# Build architecture independant packages using the common target. -binary-indep: -# (Uncomment this next line if you have such packages.) -# $(MAKE) -f debian/rules DH_OPTIONS=-i binary-common - -# Build architecture dependant packages using the common target. -binary-arch: - $(MAKE) -f debian/rules DH_OPTIONS=-a binary-common - -# Any other binary targets build just one binary package at a time. -binary-%: - make -f debian/rules binary-common DH_OPTIONS=-p$* - -binary: binary-indep binary-arch - -build-arch: build -build-indep: build -.PHONY: build clean binary-indep binary-arch binary install +override_dh_missing: + dh_missing --fail-missing diff -Nru netkit-tftp-0.17/debian/tftpd.dirs netkit-tftp-0.17/debian/tftpd.dirs --- netkit-tftp-0.17/debian/tftpd.dirs 2018-07-04 11:26:25.000000000 +0200 +++ netkit-tftp-0.17/debian/tftpd.dirs 1970-01-01 01:00:00.000000000 +0100 @@ -1,2 +0,0 @@ -usr/sbin -usr/share/man/man8 diff -Nru netkit-tftp-0.17/debian/tftpd.install netkit-tftp-0.17/debian/tftpd.install --- netkit-tftp-0.17/debian/tftpd.install 1970-01-01 01:00:00.000000000 +0100 +++ netkit-tftp-0.17/debian/tftpd.install 2018-07-04 11:26:25.000000000 +0200 @@ -0,0 +1,2 @@ + +usr/sbin/in.tftpd diff -Nru netkit-tftp-0.17/debian/tftp.dirs netkit-tftp-0.17/debian/tftp.dirs --- netkit-tftp-0.17/debian/tftp.dirs 2018-07-04 11:26:25.000000000 +0200 +++ netkit-tftp-0.17/debian/tftp.dirs 1970-01-01 01:00:00.000000000 +0100 @@ -1,2 +0,0 @@ -usr/bin -usr/share/man/man1 diff -Nru netkit-tftp-0.17/debian/tftpd.links netkit-tftp-0.17/debian/tftpd.links --- netkit-tftp-0.17/debian/tftpd.links 1970-01-01 01:00:00.000000000 +0100 +++ netkit-tftp-0.17/debian/tftpd.links 2018-07-04 11:26:25.000000000 +0200 @@ -0,0 +1,2 @@ + +usr/share/man/man8/in.tftpd.8 usr/share/man/man8/tftpd.8 diff -Nru netkit-tftp-0.17/debian/tftpd.manpages netkit-tftp-0.17/debian/tftpd.manpages --- netkit-tftp-0.17/debian/tftpd.manpages 1970-01-01 01:00:00.000000000 +0100 +++ netkit-tftp-0.17/debian/tftpd.manpages 2018-07-04 11:26:25.000000000 +0200 @@ -0,0 +1,2 @@ + +debian/tmp/usr/share/man/man8/in.tftpd.8 diff -Nru netkit-tftp-0.17/debian/tftp.install netkit-tftp-0.17/debian/tftp.install --- netkit-tftp-0.17/debian/tftp.install 1970-01-01 01:00:00.000000000 +0100 +++ netkit-tftp-0.17/debian/tftp.install 2018-07-04 11:26:25.000000000 +0200 @@ -0,0 +1,2 @@ + +usr/bin/tftp diff -Nru netkit-tftp-0.17/debian/tftp.manpages netkit-tftp-0.17/debian/tftp.manpages --- netkit-tftp-0.17/debian/tftp.manpages 1970-01-01 01:00:00.000000000 +0100 +++ netkit-tftp-0.17/debian/tftp.manpages 2018-07-04 11:26:25.000000000 +0200 @@ -0,0 +1,2 @@ + +debian/tmp/usr/share/man/man1/tftp.1
signature.asc
Description: PGP signature

