tags 912126 patch
user debian-rele...@lists.debian.org
usertags 859224 + bsp-2019-02-de-bonn
usertags 912126 + bsp-2019-02-de-bonn
thanks

Dear maintainer,

find attached the fix for netkit-ftp-ssl.

For #912126, this goes beyond the usual scope of an NMU but it seemed
wise to brush up the entire build system so it is robust for any
forseeable changes to the Debian toolchain.

For a full explanation, see
    https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=911154#44

Upload to DELAYED+3 will follow in a few hours, I'd like to give
myself a moment to settle down, then ultimately revisit the
changes done. Feel free to tell me if I should wait a little longer.

Packaging could still take a lot of love.

It might be an idea to drop netkit-ftp in favour of netkit-ftp-ssl,
however netkit-ftp has patches that might be worth preserving.

Regards,

    Christoph

diff -Nru netkit-ftp-ssl-0.17.34+0.2/debian/changelog 
netkit-ftp-ssl-0.17.34+0.2/debian/changelog
--- netkit-ftp-ssl-0.17.34+0.2/debian/changelog 2017-02-08 18:39:46.000000000 
+0100
+++ netkit-ftp-ssl-0.17.34+0.2/debian/changelog 2019-02-24 14:39:23.000000000 
+0100
@@ -1,3 +1,12 @@
+netkit-ftp-ssl (0.17.34+0.2-4.1) unstable; urgency=high
+
+  * Non-maintainer upload
+  * Use cmake as build system. Closes: #912126
+  * Migrate to openssl 1.1, patches by Sebastian Andrzej Siewior.
+    Closes: #859224
+
+ -- Christoph Biedl <debian.a...@manchmal.in-ulm.de>  Sun, 24 Feb 2019 
14:39:23 +0100
+
 netkit-ftp-ssl (0.17.34+0.2-4) unstable; urgency=medium
 
   * Correctly reuse SSL session identity in data connection.
diff -Nru netkit-ftp-ssl-0.17.34+0.2/debian/compat 
netkit-ftp-ssl-0.17.34+0.2/debian/compat
--- netkit-ftp-ssl-0.17.34+0.2/debian/compat    2017-02-06 01:13:00.000000000 
+0100
+++ netkit-ftp-ssl-0.17.34+0.2/debian/compat    2019-02-24 14:39:23.000000000 
+0100
@@ -1 +1 @@
-9
+10
diff -Nru netkit-ftp-ssl-0.17.34+0.2/debian/control 
netkit-ftp-ssl-0.17.34+0.2/debian/control
--- netkit-ftp-ssl-0.17.34+0.2/debian/control   2017-02-08 18:30:50.000000000 
+0100
+++ netkit-ftp-ssl-0.17.34+0.2/debian/control   2019-02-24 14:39:23.000000000 
+0100
@@ -4,7 +4,7 @@
 Maintainer: Mats Erik Andersson <mats.anders...@gisladisker.se>
 Uploaders: Alberto Gonzalez Iniesta <a...@inittab.org>
 Standards-Version: 3.9.8
-Build-Depends: debhelper (>= 9), libeditline-dev, libncurses5-dev, 
libssl1.0-dev | libssl-dev (<< 1.1.0~)
+Build-Depends: debhelper (>= 10~), libeditline-dev, libncurses5-dev, 
libssl1.0-dev | libssl-dev (<< 1.1.0~), cmake
 
 Package: ftp-ssl
 Architecture: any
@@ -23,5 +23,5 @@
  to normal ftp protocol.
  .
  Advantages over normal ftp(d): Your passwords and the data you send
- will not go in cleartext over the line. Nobody can get it with 
- tcpdump or similar tools. 
+ will not go in cleartext over the line. Nobody can get it with
+ tcpdump or similar tools.
diff -Nru netkit-ftp-ssl-0.17.34+0.2/debian/dirs 
netkit-ftp-ssl-0.17.34+0.2/debian/dirs
--- netkit-ftp-ssl-0.17.34+0.2/debian/dirs      2017-02-06 01:13:00.000000000 
+0100
+++ netkit-ftp-ssl-0.17.34+0.2/debian/dirs      1970-01-01 01:00:00.000000000 
+0100
@@ -1,3 +0,0 @@
-usr/bin
-usr/share/man/man1
-usr/share/man/man5
diff -Nru netkit-ftp-ssl-0.17.34+0.2/debian/ftp-ssl.install 
netkit-ftp-ssl-0.17.34+0.2/debian/ftp-ssl.install
--- netkit-ftp-ssl-0.17.34+0.2/debian/ftp-ssl.install   1970-01-01 
01:00:00.000000000 +0100
+++ netkit-ftp-ssl-0.17.34+0.2/debian/ftp-ssl.install   2019-02-24 
14:39:23.000000000 +0100
@@ -0,0 +1,2 @@
+
+usr/bin/ftp-ssl
diff -Nru netkit-ftp-ssl-0.17.34+0.2/debian/ftp-ssl.manpages 
netkit-ftp-ssl-0.17.34+0.2/debian/ftp-ssl.manpages
--- netkit-ftp-ssl-0.17.34+0.2/debian/ftp-ssl.manpages  1970-01-01 
01:00:00.000000000 +0100
+++ netkit-ftp-ssl-0.17.34+0.2/debian/ftp-ssl.manpages  2019-02-24 
14:39:23.000000000 +0100
@@ -0,0 +1,3 @@
+
+debian/tmp/usr/share/man/man1/ftp-ssl.1
+debian/tmp/usr/share/man/man5/netrc-ssl.5
diff -Nru 
netkit-ftp-ssl-0.17.34+0.2/debian/patches/0001-ftp-ssl-shutdown-the-session-properly.patch
 
netkit-ftp-ssl-0.17.34+0.2/debian/patches/0001-ftp-ssl-shutdown-the-session-properly.patch
--- 
netkit-ftp-ssl-0.17.34+0.2/debian/patches/0001-ftp-ssl-shutdown-the-session-properly.patch
  1970-01-01 01:00:00.000000000 +0100
+++ 
netkit-ftp-ssl-0.17.34+0.2/debian/patches/0001-ftp-ssl-shutdown-the-session-properly.patch
  2019-02-24 14:39:23.000000000 +0100
@@ -0,0 +1,56 @@
+From 489397738dddd20c9fb2c48ec444b156099d1bae Mon Sep 17 00:00:00 2001
+From: Sebastian Andrzej Siewior <sebast...@breakpoint.cc>
+Date: Sat, 11 Nov 2017 11:10:07 +0000
+Subject: [PATCH 1/2] ftp-ssl: shutdown the session properly
+
+If the SSL session is not shutdown properly, the following SSL_free will
+free all SSL related structs including the session making it impossible
+to be reused in a later connection.
+
+Signed-off-by: Sebastian Andrzej Siewior <sebast...@breakpoint.cc>
+---
+ ftp/ftp.c | 5 +++++
+ 1 file changed, 5 insertions(+)
+
+--- a/ftp/ftp.c
++++ b/ftp/ftp.c
+@@ -951,6 +951,7 @@
+ 
+ #ifdef USE_SSL
+       if (ssl_data_active_flag && (ssl_data_con!=NULL)) {
++          SSL_shutdown(ssl_data_con);
+           SSL_free(ssl_data_con);
+           ssl_data_active_flag=0;
+           ssl_data_con=NULL;
+@@ -989,6 +990,7 @@
+ 
+ #ifdef USE_SSL
+       if (ssl_data_active_flag && (ssl_data_con!=NULL)) {
++          SSL_shutdown(ssl_data_con);
+           SSL_free(ssl_data_con);
+           ssl_data_active_flag=0;
+           ssl_data_con=NULL;
+@@ -1373,6 +1375,7 @@
+ 
+ #ifdef USE_SSL
+       if (ssl_data_active_flag && (ssl_data_con!=NULL)) {
++          SSL_shutdown(ssl_data_con);
+           SSL_free(ssl_data_con);
+           ssl_data_active_flag=0;
+           ssl_data_con=NULL;
+@@ -1420,6 +1423,7 @@
+ 
+ #ifdef USE_SSL
+       if (ssl_data_active_flag && (ssl_data_con!=NULL)) {
++          SSL_shutdown(ssl_data_con);
+           SSL_free(ssl_data_con);
+           ssl_data_active_flag=0;
+           ssl_data_con=NULL;
+@@ -1654,6 +1658,7 @@
+       if (ssl_active_flag && ssl_encrypt_data) {
+           /* do SSL */
+           if (ssl_data_con!=NULL) {
++            SSL_shutdown(ssl_data_con);
+             SSL_free(ssl_data_con);
+             ssl_data_con=NULL;
+           }
diff -Nru 
netkit-ftp-ssl-0.17.34+0.2/debian/patches/0002-ftp-ssl-use-get-set-session-instead-of-copy-id.patch
 
netkit-ftp-ssl-0.17.34+0.2/debian/patches/0002-ftp-ssl-use-get-set-session-instead-of-copy-id.patch
--- 
netkit-ftp-ssl-0.17.34+0.2/debian/patches/0002-ftp-ssl-use-get-set-session-instead-of-copy-id.patch
 1970-01-01 01:00:00.000000000 +0100
+++ 
netkit-ftp-ssl-0.17.34+0.2/debian/patches/0002-ftp-ssl-use-get-set-session-instead-of-copy-id.patch
 2019-02-24 14:39:23.000000000 +0100
@@ -0,0 +1,44 @@
+From d228c9e24e78047afdd04fcc9e335551fea87251 Mon Sep 17 00:00:00 2001
+From: Sebastian Andrzej Siewior <sebast...@breakpoint.cc>
+Date: Sat, 11 Nov 2017 11:11:55 +0000
+Subject: [PATCH 2/2] ftp-ssl: use get+set session instead of copy id
+
+This does mostly the same thing but may be more obvious, maybe not.
+
+Signed-off-by: Sebastian Andrzej Siewior <sebast...@breakpoint.cc>
+---
+ ftp/ftp.c | 9 ++++++++-
+ 1 file changed, 8 insertions(+), 1 deletion(-)
+
+--- a/ftp/ftp.c
++++ b/ftp/ftp.c
+@@ -94,6 +94,7 @@
+ static int ptflag = 0;
+ static int ptabflg = 0;
+ #ifdef USE_SSL
++static SSL_SESSION *ssl_data_session;
+ int             ssl_available=1;
+ static int    pdata = -1;
+ static int
+@@ -1677,7 +1678,8 @@
+            * this quick assuming Eric has this going
+            * okay! ;-)
+            */
+-          SSL_copy_session_id(ssl_data_con,ssl_con);
++          if (ssl_data_session)
++                  SSL_set_session(ssl_data_con, ssl_data_session);
+ 
+           /* we are doing I/O and not using select so 
+            * it is "safe" to read ahead
+@@ -2279,6 +2281,11 @@
+                   fprintf(stderr, "Data connection security level 
refused.\n");
+                   return ERROR;
+               }
++              if (ssl_encrypt_data) {
++                      SSL_SESSION_free(ssl_data_session);
++                      ssl_data_session = SSL_get1_session(ssl_con);
++              }
++
+               if (verbose && use_tls && ssl_encrypt_data)
+                   fprintf(stderr, "[Encrypted data transfer.]\n");
+           }
diff -Nru netkit-ftp-ssl-0.17.34+0.2/debian/patches/010_patches_in_sarge.diff 
netkit-ftp-ssl-0.17.34+0.2/debian/patches/010_patches_in_sarge.diff
--- netkit-ftp-ssl-0.17.34+0.2/debian/patches/010_patches_in_sarge.diff 
2017-02-06 01:13:00.000000000 +0100
+++ netkit-ftp-ssl-0.17.34+0.2/debian/patches/010_patches_in_sarge.diff 
2019-02-24 14:39:23.000000000 +0100
@@ -4,19 +4,8 @@
 Author: Herbert Xu <herb...@debian.org>
 Forwarded: no
 Last-Update: 2003-06-29
---- netkit-ftp-0.17.orig/ftp/Makefile
-+++ netkit-ftp-0.17/ftp/Makefile
-@@ -8,7 +8,7 @@
- LIBS += -lreadline $(LIBTERMCAP)
- endif
- 
--ftp: cmds.o cmdtab.o domacro.o ftp.o glob.o main.o ruserpass.o
-+ftp: cmds.o cmdtab.o domacro.o ftp.o main.o ruserpass.o
-       $(CC) $(LDFLAGS) $^ $(LIBS) -o $@
- 
- domacro.o ftp.o glob.o main.o ruserpass.o: ftp_var.h pathnames.h
---- netkit-ftp-0.17.orig/ftp/cmds.c
-+++ netkit-ftp-0.17/ftp/cmds.c
+--- a/ftp/cmds.c
++++ b/ftp/cmds.c
 @@ -50,6 +50,7 @@
  
  #include <signal.h>
@@ -955,8 +944,8 @@
 +#warning "Unix auto-mode code skipped"
 +#endif /* unix */
 +}
---- netkit-ftp-0.17.orig/ftp/cmds.h
-+++ netkit-ftp-0.17/ftp/cmds.h
+--- a/ftp/cmds.h
++++ b/ftp/cmds.h
 @@ -42,6 +42,7 @@
  void makedir(int argc, char *argv[]);
  void removedir(int argc, char *argv[]);
@@ -965,8 +954,8 @@
  void account(int argc, char *argv[]);
  void doproxy(int argc, char *argv[]);
  void reset(void);
---- netkit-ftp-0.17.orig/ftp/cmdtab.c
-+++ netkit-ftp-0.17/ftp/cmdtab.c
+--- a/ftp/cmdtab.c
++++ b/ftp/cmdtab.c
 @@ -56,6 +56,7 @@
  const char chmodhelp[] =   "change file permissions of remote file";
  const char connecthelp[] = "connect to remote ftp";
@@ -983,8 +972,8 @@
        { "sendport",   porthelp,       0, 0, 0, NULL, setport, NULL },
        { "put",        sendhelp,       1, 1, 1, put, NULL, NULL },
        { "pwd",        pwdhelp,        0, 1, 1, NULL, pwd, NULL },
---- netkit-ftp-0.17.orig/ftp/domacro.c
-+++ netkit-ftp-0.17/ftp/domacro.c
+--- a/ftp/domacro.c
++++ b/ftp/domacro.c
 @@ -40,9 +40,21 @@
  #include <errno.h>
  #include <ctype.h>
@@ -1094,8 +1083,8 @@
        }
 +      line = line2;
  }
---- netkit-ftp-0.17.orig/ftp/ftp.1
-+++ netkit-ftp-0.17/ftp/ftp.1
+--- a/ftp/ftp.1
++++ b/ftp/ftp.1
 @@ -43,10 +43,10 @@
  .Sh SYNOPSIS
  .Nm ftp
@@ -1150,8 +1139,8 @@
  RFC 959
  .Sh HISTORY
  The
---- netkit-ftp-0.17.orig/ftp/ftp.c
-+++ netkit-ftp-0.17/ftp/ftp.c
+--- a/ftp/ftp.c
++++ b/ftp/ftp.c
 @@ -50,6 +50,7 @@
  #include <arpa/inet.h>
  #include <arpa/telnet.h>
@@ -2527,8 +2516,8 @@
 +      printf("\rBytes transferred: %jd", (intmax_t) bytes);
 +      fflush(stdout);
 +}
---- netkit-ftp-0.17.orig/ftp/ftp_var.h
-+++ netkit-ftp-0.17/ftp/ftp_var.h
+--- a/ftp/ftp_var.h
++++ b/ftp/ftp_var.h
 @@ -76,6 +76,7 @@
  Extern int    mapflag;        /* use mapin mapout templates on file names */
  Extern int    code;           /* return/reply code for ftp command */
@@ -2552,8 +2541,8 @@
  Extern char   *argbase;       /* current storage point in arg buffer */
  Extern int    cpend;          /* flag: if != 0, then pending server reply */
  Extern int    mflag;          /* flag: if != 0, then active multi command */
---- netkit-ftp-0.17.orig/ftp/main.c
-+++ netkit-ftp-0.17/ftp/main.c
+--- a/ftp/main.c
++++ b/ftp/main.c
 @@ -60,6 +60,7 @@
  #include <ctype.h>
  #include <netdb.h>
@@ -2850,8 +2839,8 @@
 +      obstack_free(stack, 0);
 +      obstack_init(stack);
 +}
---- netkit-ftp-0.17.orig/ftp/netrc.5
-+++ netkit-ftp-0.17/ftp/netrc.5
+--- a/ftp/netrc.5
++++ b/ftp/netrc.5
 @@ -37,8 +37,10 @@
  .Dt NETRC 5
  .Os "Linux NetKit (0.17)"
@@ -2864,8 +2853,8 @@
  .Sh DESCRIPTION
  This file contains configuration and autologin information for the 
  File Transfer Protocol client 
---- netkit-ftp-0.17.orig/ftp/ruserpass.c
-+++ netkit-ftp-0.17/ftp/ruserpass.c
+--- a/ftp/ruserpass.c
++++ b/ftp/ruserpass.c
 @@ -46,6 +46,7 @@
  #include <string.h>
  #include <unistd.h>
@@ -2904,8 +2893,8 @@
                        }
                        break;
                case MACDEF:
---- netkit-ftp-0.17.orig/ftp/main.h
-+++ netkit-ftp-0.17/ftp/main.h
+--- /dev/null
++++ b/ftp/main.h
 @@ -0,0 +1,20 @@
 +#include <obstack.h>
 +#include <signal.h>
diff -Nru netkit-ftp-ssl-0.17.34+0.2/debian/patches/020_optional_stripping.diff 
netkit-ftp-ssl-0.17.34+0.2/debian/patches/020_optional_stripping.diff
--- netkit-ftp-ssl-0.17.34+0.2/debian/patches/020_optional_stripping.diff       
2017-02-06 01:13:00.000000000 +0100
+++ netkit-ftp-ssl-0.17.34+0.2/debian/patches/020_optional_stripping.diff       
1970-01-01 01:00:00.000000000 +0100
@@ -1,19 +0,0 @@
-Description: Hard coded stripping behaviour.
- Remove explicit stripping from makefile target.
-X-Closes: #437615
-X-Comment: debdiff netkit-ftp_0.17-{12,16}.dsc
-Author: Alberto Gonzalez Iniesta <a...@inittab.org>
-Forwarded: no
-Last-Update: 2008-03-21
-diff -u netkit-ftp-0.17/ftp/Makefile netkit-ftp-0.17/ftp/Makefile
---- netkit-ftp-0.17/ftp/Makefile
-+++ netkit-ftp-0.17/ftp/Makefile
-@@ -16,7 +16,7 @@
- cmds.o glob.o: glob.h
- 
- install: ftp
--      install -s -m$(BINMODE) ftp $(INSTALLROOT)$(BINDIR)
-+      install $(INSTALL_OPTS) -m$(BINMODE) ftp $(INSTALLROOT)$(BINDIR)
-       ln -sf ftp $(INSTALLROOT)$(BINDIR)/pftp
-       install -m$(MANMODE) ftp.1 $(INSTALLROOT)$(MANDIR)/man1
-       ln -sf ftp.1 $(INSTALLROOT)$(MANDIR)/man1/pftp.1
diff -Nru netkit-ftp-ssl-0.17.34+0.2/debian/patches/052_no_termcap_linking.diff 
netkit-ftp-ssl-0.17.34+0.2/debian/patches/052_no_termcap_linking.diff
--- netkit-ftp-ssl-0.17.34+0.2/debian/patches/052_no_termcap_linking.diff       
2017-02-06 01:13:00.000000000 +0100
+++ netkit-ftp-ssl-0.17.34+0.2/debian/patches/052_no_termcap_linking.diff       
1970-01-01 01:00:00.000000000 +0100
@@ -1,158 +0,0 @@
-Description: Remove explicit termcap linking.
- Present day libreadline includes all needed
- linking with libtinfo, so no explicit linking
- either with libncurses or libtermcap is needed.
-Author: Mats Erik Andersson <deb...@gisladisker.se>
-Forwarded: no
-Last-Update: 2012-03-26
-
-diff -Naurp netkit-ftp-0.17.debian/configure netkit-ftp-0.17/configure
---- netkit-ftp-0.17.debian/configure
-+++ netkit-ftp-0.17/configure
-@@ -187,61 +187,61 @@ rm -f __conftest*
- 
- ##################################################
- 
--echo -n 'Checking for ncurses... '
--cat <<EOF >__conftest.c
--#include <stdio.h>
--#include <curses.h>
--#ifndef KEY_DOWN
--syntax error. /* not ncurses */
--#endif
--int main() {
--    endwin();
--    return 0;
--}
--
--EOF
--if (
--      $CC $CFLAGS  __conftest.c -lncurses -o __conftest || exit 1
--   ) >/dev/null 2>&1; then
--    echo 'yes'
--    NCURSES=1
--else
--    if (
--          $CC $CFLAGS -I/usr/include/ncurses __conftest.c -lncurses -o 
__conftest || exit 1
--       ) >/dev/null 2>&1; then
--        echo '-I/usr/include/ncurses'
--        CFLAGS="$CFLAGS -I/usr/include/ncurses"
--        NCURSES=1
--    else
--        echo 'no'
--    fi
--fi
--
--if [ x$NCURSES != x ]; then
--    LIBTERMCAP=-lncurses
--else
--    echo -n 'Checking for traditional termcap... '
--cat <<EOF >__conftest.c
--#include <stdio.h>
--#include <termcap.h>
--int main() {
--    tgetent(NULL, NULL); return 0;
--}
--
--EOF
--    if (
--          $CC $CFLAGS  __conftest.c -ltermcap -o __conftest || exit 1
--       ) >/dev/null 2>&1; then
--        echo '-ltermcap'
--        LIBTERMCAP=-ltermcap
--    else
--        echo 'not found'
--        echo 'This package needs termcap to run.'
--        rm -f __conftest*
--        exit
--    fi
--fi
--rm -f __conftest*
-+#echo -n 'Checking for ncurses... '
-+#cat <<EOF >__conftest.c
-+##include <stdio.h>
-+##include <curses.h>
-+##ifndef KEY_DOWN
-+#syntax error. /* not ncurses */
-+##endif
-+#int main() {
-+#    endwin();
-+#    return 0;
-+#}
-+#
-+#EOF
-+#if (
-+#      $CC $CFLAGS  __conftest.c -lncurses -o __conftest || exit 1
-+#   ) >/dev/null 2>&1; then
-+#    echo 'yes'
-+#    NCURSES=1
-+#else
-+#    if (
-+#          $CC $CFLAGS -I/usr/include/ncurses __conftest.c -lncurses -o 
__conftest || exit 1
-+#       ) >/dev/null 2>&1; then
-+#        echo '-I/usr/include/ncurses'
-+#        CFLAGS="$CFLAGS -I/usr/include/ncurses"
-+#        NCURSES=1
-+#    else
-+#        echo 'no'
-+#    fi
-+#fi
-+#
-+#if [ x$NCURSES != x ]; then
-+#    LIBTERMCAP=-lncurses
-+#else
-+#    echo -n 'Checking for traditional termcap... '
-+#cat <<EOF >__conftest.c
-+##include <stdio.h>
-+##include <termcap.h>
-+#int main() {
-+#    tgetent(NULL, NULL); return 0;
-+#}
-+#
-+#EOF
-+#    if (
-+#          $CC $CFLAGS  __conftest.c -ltermcap -o __conftest || exit 1
-+#       ) >/dev/null 2>&1; then
-+#        echo '-ltermcap'
-+#        LIBTERMCAP=-ltermcap
-+#    else
-+#        echo 'not found'
-+#        echo 'This package needs termcap to run.'
-+#        rm -f __conftest*
-+#        exit
-+#    fi
-+#fi
-+#rm -f __conftest*
- 
- ##################################################
- 
-@@ -278,7 +278,7 @@ int main() { readline("foo"); return 0;
- 
- EOF
- if (
--      $CC $CFLAGS  __conftest.c -lreadline $LIBTERMCAP -o __conftest || exit 1
-+      $CC $CFLAGS  __conftest.c -lreadline -o __conftest || exit 1
-    ) >/dev/null 2>&1; then
-         echo 'yes'
-         USE_READLINE=1
-@@ -436,7 +436,7 @@ echo 'Generating MCONFIG...'
-     echo "LDFLAGS=$LDFLAGS" | sed 's/= */=/'
-     echo "LIBS=$LIBS" | sed 's/= */=/'
- 
--    echo "LIBTERMCAP=$LIBTERMCAP"
-+    #echo "LIBTERMCAP=$LIBTERMCAP"
-     echo "USE_GLIBC=$USE_GLIBC"
-     echo "USE_READLINE=$USE_READLINE"
- ) > MCONFIG
-diff -Naurp netkit-ftp-0.17.debian/ftp/Makefile netkit-ftp-0.17/ftp/Makefile
---- netkit-ftp-0.17.debian/ftp/Makefile        2012-03-26 11:50:15.000000000 
+0200
-+++ netkit-ftp-0.17/ftp/Makefile       2012-03-26 11:53:02.000000000 +0200
-@@ -5,7 +5,7 @@ include ../MRULES
- 
- ifeq ($(USE_READLINE),1)
- CFLAGS += -D__USE_READLINE__
--LIBS += -lreadline $(LIBTERMCAP)
-+LIBS += -lreadline
- endif
- 
- ftp: cmds.o cmdtab.o domacro.o ftp.o main.o ruserpass.o
diff -Nru netkit-ftp-ssl-0.17.34+0.2/debian/patches/500_ssl.diff 
netkit-ftp-ssl-0.17.34+0.2/debian/patches/500_ssl.diff
--- netkit-ftp-ssl-0.17.34+0.2/debian/patches/500_ssl.diff      2017-02-06 
01:13:00.000000000 +0100
+++ netkit-ftp-ssl-0.17.34+0.2/debian/patches/500_ssl.diff      2019-02-24 
14:39:23.000000000 +0100
@@ -6,24 +6,8 @@
 Author: Tim Hudson <t...@cryptsoft.com>
 Last-Update: 2014-12-22
 
-Index: netkit-ftp-ssl/ftp/Makefile
-===================================================================
---- netkit-ftp-ssl.orig/ftp/Makefile   2014-12-22 23:01:42.948580007 +0100
-+++ netkit-ftp-ssl/ftp/Makefile        2014-12-22 23:06:58.816591064 +0100
-@@ -8,6 +8,9 @@
- LIBS += -lreadline
- endif
- 
-+CFLAGS += -DUSE_SSL -g
-+LIBS += -lssl -lcrypto
-+
- ftp: cmds.o cmdtab.o domacro.o ftp.o main.o ruserpass.o
-       $(CC) $(LDFLAGS) $^ $(LIBS) -o $@
- 
-Index: netkit-ftp-ssl/ftp/cmds.c
-===================================================================
---- netkit-ftp-ssl.orig/ftp/cmds.c     2014-12-22 23:02:13.472581075 +0100
-+++ netkit-ftp-ssl/ftp/cmds.c  2014-12-22 23:06:58.820591064 +0100
+--- a/ftp/cmds.c
++++ b/ftp/cmds.c
 @@ -222,6 +222,32 @@
        }
        port = ftp_port;
@@ -57,10 +41,8 @@
                port = atoi(argv[2]);
                if (port < 1) {
                        printf("%s: bad port number-- %s\n", argv[1], argv[2]);
-Index: netkit-ftp-ssl/ftp/ftp.1
-===================================================================
---- netkit-ftp-ssl.orig/ftp/ftp.1      2014-12-22 23:02:13.488581076 +0100
-+++ netkit-ftp-ssl/ftp/ftp.1   2014-12-22 23:06:58.824591064 +0100
+--- a/ftp/ftp.1
++++ b/ftp/ftp.1
 @@ -101,6 +101,52 @@
  as report on data transfer statistics.
  .It Fl d
@@ -114,10 +96,8 @@
  .El
  .Pp
  The client host and an optional port number with which
-Index: netkit-ftp-ssl/ftp/ftp.c
-===================================================================
---- netkit-ftp-ssl.orig/ftp/ftp.c      2014-12-22 23:02:13.496581076 +0100
-+++ netkit-ftp-ssl/ftp/ftp.c   2014-12-22 23:06:58.872591066 +0100
+--- a/ftp/ftp.c
++++ b/ftp/ftp.c
 @@ -1,3 +1,15 @@
 +/* 
 + * The modifications to support SSLeay were done by Tim Hudson
@@ -646,10 +626,8 @@
 +}
 +
 +#endif /* USE_SSL */
-Index: netkit-ftp-ssl/ftp/ftp_var.h
-===================================================================
---- netkit-ftp-ssl.orig/ftp/ftp_var.h  2014-12-22 23:02:13.500581076 +0100
-+++ netkit-ftp-ssl/ftp/ftp_var.h       2014-12-22 23:06:58.876591066 +0100
+--- a/ftp/ftp_var.h
++++ b/ftp/ftp_var.h
 @@ -179,3 +179,6 @@
  void setpeer(int argc, char *argv[]);
  void quit(void);
@@ -657,10 +635,8 @@
 +
 +#include "sslapp.h"
 +#include "ssl_port.h"
-Index: netkit-ftp-ssl/ftp/main.c
-===================================================================
---- netkit-ftp-ssl.orig/ftp/main.c     2014-12-22 23:00:41.116577843 +0100
-+++ netkit-ftp-ssl/ftp/main.c  2014-12-22 23:06:58.884591066 +0100
+--- a/ftp/main.c
++++ b/ftp/main.c
 @@ -1,3 +1,15 @@
 +/* 
 + * The modifications to support SSLeay were done by Tim Hudson
@@ -833,10 +809,8 @@
        /*
         * We need this since we want to return from unsafe library calls ASAP
         * when a SIGINT happens.
-Index: netkit-ftp-ssl/ftp/sslapp.c
-===================================================================
---- /dev/null  1970-01-01 00:00:00.000000000 +0000
-+++ netkit-ftp-ssl/ftp/sslapp.c        2014-12-22 23:06:58.888591066 +0100
+--- /dev/null
++++ b/ftp/sslapp.c
 @@ -0,0 +1,186 @@
 +/* sslapp.c   - ssl application code */
 +
@@ -1024,10 +998,8 @@
 +
 +#endif /* USE_SSL */
 +
-Index: netkit-ftp-ssl/ftp/sslapp.h
-===================================================================
---- /dev/null  1970-01-01 00:00:00.000000000 +0000
-+++ netkit-ftp-ssl/ftp/sslapp.h        2014-12-22 23:06:58.892591066 +0100
+--- /dev/null
++++ b/ftp/sslapp.h
 @@ -0,0 +1,63 @@
 +/* sslapp.h   - ssl application code */
 +
@@ -1092,10 +1064,8 @@
 +#endif /* USE_SSL */
 +
 +
-Index: netkit-ftp-ssl/ftp/ssl_port.h
-===================================================================
---- /dev/null  1970-01-01 00:00:00.000000000 +0000
-+++ netkit-ftp-ssl/ftp/ssl_port.h      2014-12-22 23:06:58.896591067 +0100
+--- /dev/null
++++ b/ftp/ssl_port.h
 @@ -0,0 +1,85 @@
 +/* ssl_port.h    - standard porting things 
 + *
diff -Nru 
netkit-ftp-ssl-0.17.34+0.2/debian/patches/510_fix_ssl_auth_response.diff 
netkit-ftp-ssl-0.17.34+0.2/debian/patches/510_fix_ssl_auth_response.diff
--- netkit-ftp-ssl-0.17.34+0.2/debian/patches/510_fix_ssl_auth_response.diff    
2017-02-06 01:13:00.000000000 +0100
+++ netkit-ftp-ssl-0.17.34+0.2/debian/patches/510_fix_ssl_auth_response.diff    
2019-02-24 14:39:23.000000000 +0100
@@ -6,10 +6,8 @@
 Author: James Manning <j...@sublogic.com>
 Last-Update: 2010-04-07
 
-Index: netkit-ftp-ssl/ftp/ftp.c
-===================================================================
---- netkit-ftp-ssl.orig/ftp/ftp.c      2010-07-03 23:54:41.000000000 +0100
-+++ netkit-ftp-ssl/ftp/ftp.c   2010-07-03 23:54:41.000000000 +0100
+--- a/ftp/ftp.c
++++ b/ftp/ftp.c
 @@ -2103,7 +2103,7 @@
                 */
                if (ssl_secure_flag)
diff -Nru netkit-ftp-ssl-0.17.34+0.2/debian/patches/520_check_ssl_new.diff 
netkit-ftp-ssl-0.17.34+0.2/debian/patches/520_check_ssl_new.diff
--- netkit-ftp-ssl-0.17.34+0.2/debian/patches/520_check_ssl_new.diff    
2017-02-06 01:13:00.000000000 +0100
+++ netkit-ftp-ssl-0.17.34+0.2/debian/patches/520_check_ssl_new.diff    
2019-02-24 14:39:23.000000000 +0100
@@ -3,10 +3,8 @@
 Forwarded: no
 Last-Update: 2010-04-07
 
-Index: netkit-ftp-ssl/ftp/ftp.c
-===================================================================
---- netkit-ftp-ssl.orig/ftp/ftp.c      2010-07-03 23:58:22.000000000 +0100
-+++ netkit-ftp-ssl/ftp/ftp.c   2010-07-03 23:58:22.000000000 +0100
+--- a/ftp/ftp.c
++++ b/ftp/ftp.c
 @@ -1640,6 +1640,10 @@
              ssl_data_con=NULL;
            }
diff -Nru 
netkit-ftp-ssl-0.17.34+0.2/debian/patches/530_move_interrupt_handler.diff 
netkit-ftp-ssl-0.17.34+0.2/debian/patches/530_move_interrupt_handler.diff
--- netkit-ftp-ssl-0.17.34+0.2/debian/patches/530_move_interrupt_handler.diff   
2017-02-06 01:13:00.000000000 +0100
+++ netkit-ftp-ssl-0.17.34+0.2/debian/patches/530_move_interrupt_handler.diff   
2019-02-24 14:39:23.000000000 +0100
@@ -3,10 +3,8 @@
 Forwarded: no
 Last-Update: 2010-04-07
 
-Index: netkit-ftp-ssl/ftp/main.c
-===================================================================
---- netkit-ftp-ssl.orig/ftp/main.c     2010-05-16 22:15:20.000000000 +0100
-+++ netkit-ftp-ssl/ftp/main.c  2010-05-16 22:15:20.000000000 +0100
+--- a/ftp/main.c
++++ b/ftp/main.c
 @@ -354,6 +354,14 @@
                homedir[sizeof(homedir)-1] = 0;
                home = homedir;
diff -Nru netkit-ftp-ssl-0.17.34+0.2/debian/patches/540_tls.diff 
netkit-ftp-ssl-0.17.34+0.2/debian/patches/540_tls.diff
--- netkit-ftp-ssl-0.17.34+0.2/debian/patches/540_tls.diff      2017-02-06 
01:13:00.000000000 +0100
+++ netkit-ftp-ssl-0.17.34+0.2/debian/patches/540_tls.diff      2019-02-24 
14:39:23.000000000 +0100
@@ -13,10 +13,8 @@
 Forwarded: no
 Last-Update: 2010-04-06
 
-Index: netkit-ftp-ssl/ftp/ftp.c
-===================================================================
---- netkit-ftp-ssl.orig/ftp/ftp.c      2010-07-04 00:00:58.000000000 +0100
-+++ netkit-ftp-ssl/ftp/ftp.c   2010-07-04 00:00:58.000000000 +0100
+--- a/ftp/ftp.c
++++ b/ftp/ftp.c
 @@ -2098,8 +2098,13 @@
        int n;
  
diff -Nru netkit-ftp-ssl-0.17.34+0.2/debian/patches/550_doc_fixes.diff 
netkit-ftp-ssl-0.17.34+0.2/debian/patches/550_doc_fixes.diff
--- netkit-ftp-ssl-0.17.34+0.2/debian/patches/550_doc_fixes.diff        
2017-02-06 01:13:00.000000000 +0100
+++ netkit-ftp-ssl-0.17.34+0.2/debian/patches/550_doc_fixes.diff        
2019-02-24 14:39:23.000000000 +0100
@@ -6,10 +6,8 @@
 Forwarded: no
 Last-Update: 2014-12-23
 
-Index: netkit-ftp-ssl/ftp/ftp.1
-===================================================================
---- netkit-ftp-ssl.orig/ftp/ftp.1      2014-12-23 00:02:24.836707489 +0100
-+++ netkit-ftp-ssl/ftp/ftp.1   2014-12-23 00:25:42.392756410 +0100
+--- a/ftp/ftp.1
++++ b/ftp/ftp.1
 @@ -43,9 +43,29 @@
  .Sh SYNOPSIS
  .Nm ftp
diff -Nru netkit-ftp-ssl-0.17.34+0.2/debian/patches/560_hurd.diff 
netkit-ftp-ssl-0.17.34+0.2/debian/patches/560_hurd.diff
--- netkit-ftp-ssl-0.17.34+0.2/debian/patches/560_hurd.diff     2017-02-06 
01:13:00.000000000 +0100
+++ netkit-ftp-ssl-0.17.34+0.2/debian/patches/560_hurd.diff     2019-02-24 
14:39:23.000000000 +0100
@@ -10,10 +10,8 @@
 Forwarded: no
 Last-Update: 2010-04-07
 
-Index: netkit-ftp-ssl/ftp/ftp_var.h
-===================================================================
---- netkit-ftp-ssl.orig/ftp/ftp_var.h  2010-05-16 22:19:45.000000000 +0100
-+++ netkit-ftp-ssl/ftp/ftp_var.h       2010-05-16 22:19:45.000000000 +0100
+--- a/ftp/ftp_var.h
++++ b/ftp/ftp_var.h
 @@ -68,6 +68,10 @@
  #define Extern extern
  #endif
@@ -25,10 +23,8 @@
  
  /*
   * Options and other state info.
-Index: netkit-ftp-ssl/ftp/main.h
-===================================================================
---- netkit-ftp-ssl.orig/ftp/main.h     2010-05-16 22:19:45.000000000 +0100
-+++ netkit-ftp-ssl/ftp/main.h  2010-05-16 22:19:45.000000000 +0100
+--- a/ftp/main.h
++++ b/ftp/main.h
 @@ -18,3 +18,16 @@
              while(0)
  #define CHECKINT do { if (suppressint == 1 && intpending) { \
diff -Nru netkit-ftp-ssl-0.17.34+0.2/debian/patches/570_fix_warnings.diff 
netkit-ftp-ssl-0.17.34+0.2/debian/patches/570_fix_warnings.diff
--- netkit-ftp-ssl-0.17.34+0.2/debian/patches/570_fix_warnings.diff     
2017-02-06 01:13:00.000000000 +0100
+++ netkit-ftp-ssl-0.17.34+0.2/debian/patches/570_fix_warnings.diff     
2019-02-24 14:39:23.000000000 +0100
@@ -4,10 +4,8 @@
 Forwarded: no
 Last-Update: 2010-04-07
 
-Index: netkit-ftp-ssl/ftp/ftp.c
-===================================================================
---- netkit-ftp-ssl.orig/ftp/ftp.c      2010-07-04 00:03:20.000000000 +0100
-+++ netkit-ftp-ssl/ftp/ftp.c   2010-07-04 00:03:20.000000000 +0100
+--- a/ftp/ftp.c
++++ b/ftp/ftp.c
 @@ -127,8 +127,14 @@
  # define FTP_CONNECT_TIMEOUT 10
  #endif
@@ -43,10 +41,8 @@
                                                 "%c%c%c", IAC, DONT, c);
  #ifdef USE_SSL
                                        if (ssl_active_flag)
-Index: netkit-ftp-ssl/ftp/main.c
-===================================================================
---- netkit-ftp-ssl.orig/ftp/main.c     2010-07-04 00:03:20.000000000 +0100
-+++ netkit-ftp-ssl/ftp/main.c  2010-07-04 00:03:20.000000000 +0100
+--- a/ftp/main.c
++++ b/ftp/main.c
 @@ -134,11 +134,14 @@
  static long
  bio_dump_cb(BIO *bio,
@@ -111,10 +107,8 @@
        tick = 0;
  
        sp = getservbyname("ftp", "tcp");
-Index: netkit-ftp-ssl/ftp/ssl_port.h
-===================================================================
---- netkit-ftp-ssl.orig/ftp/ssl_port.h 2010-07-04 00:03:20.000000000 +0100
-+++ netkit-ftp-ssl/ftp/ssl_port.h      2010-07-04 00:03:20.000000000 +0100
+--- a/ftp/ssl_port.h
++++ b/ftp/ssl_port.h
 @@ -19,6 +19,7 @@
  #include <stdio.h>
  
@@ -123,10 +117,8 @@
  #define NOPROTO
  #include <openssl/buffer.h>
  #undef NOPROTO
-Index: netkit-ftp-ssl/ftp/sslapp.c
-===================================================================
---- netkit-ftp-ssl.orig/ftp/sslapp.c   2010-07-04 00:03:20.000000000 +0100
-+++ netkit-ftp-ssl/ftp/sslapp.c        2010-07-04 00:03:20.000000000 +0100
+--- a/ftp/sslapp.c
++++ b/ftp/sslapp.c
 @@ -34,7 +34,7 @@
  
  /* fwd decl */
@@ -145,10 +137,8 @@
  {
    if (where==SSL_CB_CONNECT_LOOP) {
      BIO_printf(bio_err,"SSL_connect:%s %s\r\n",
-Index: netkit-ftp-ssl/ftp/sslapp.h
-===================================================================
---- netkit-ftp-ssl.orig/ftp/sslapp.h   2010-07-04 00:03:20.000000000 +0100
-+++ netkit-ftp-ssl/ftp/sslapp.h        2010-07-04 00:03:20.000000000 +0100
+--- a/ftp/sslapp.h
++++ b/ftp/sslapp.h
 @@ -22,6 +22,7 @@
  #define ONELINE_NAME(X) X509_NAME_oneline(X,NULL,0)
    
diff -Nru netkit-ftp-ssl-0.17.34+0.2/debian/patches/580_ssl_fflush.diff 
netkit-ftp-ssl-0.17.34+0.2/debian/patches/580_ssl_fflush.diff
--- netkit-ftp-ssl-0.17.34+0.2/debian/patches/580_ssl_fflush.diff       
2017-02-06 01:13:00.000000000 +0100
+++ netkit-ftp-ssl-0.17.34+0.2/debian/patches/580_ssl_fflush.diff       
2019-02-24 14:39:23.000000000 +0100
@@ -5,10 +5,8 @@
 Forwarded: no
 Last-Update: 2014-12-23
 
-Index: netkit-ftp-ssl/ftp/ftp.c
-===================================================================
---- netkit-ftp-ssl.orig/ftp/ftp.c      2014-12-23 00:40:41.688787889 +0100
-+++ netkit-ftp-ssl/ftp/ftp.c   2014-12-23 00:43:47.604794397 +0100
+--- a/ftp/ftp.c
++++ b/ftp/ftp.c
 @@ -554,16 +554,14 @@
                                        if ((c = GETC(cin)) == EOF)
                                                goto goteof;
diff -Nru 
netkit-ftp-ssl-0.17.34+0.2/debian/patches/590_fix_ssl_without_autologin.diff 
netkit-ftp-ssl-0.17.34+0.2/debian/patches/590_fix_ssl_without_autologin.diff
--- 
netkit-ftp-ssl-0.17.34+0.2/debian/patches/590_fix_ssl_without_autologin.diff    
    2017-02-06 01:13:00.000000000 +0100
+++ 
netkit-ftp-ssl-0.17.34+0.2/debian/patches/590_fix_ssl_without_autologin.diff    
    2019-02-24 14:39:23.000000000 +0100
@@ -6,10 +6,8 @@
 Forwarded: no
 Last-Update: 2014-12-23
 
-Index: netkit-ftp-ssl/ftp/cmds.c
-===================================================================
---- netkit-ftp-ssl.orig/ftp/cmds.c     2014-12-23 00:02:24.828707489 +0100
-+++ netkit-ftp-ssl/ftp/cmds.c  2014-12-23 00:59:58.540828384 +0100
+--- a/ftp/cmds.c
++++ b/ftp/cmds.c
 @@ -273,6 +273,10 @@
                        (void) dologin(argv[1]);
                        dosyst();
@@ -20,11 +18,9 @@
 +#endif /* USE_SSL */
        }
  }
-
-Index: netkit-ftp-ssl/ftp/ftp.c
-===================================================================
---- netkit-ftp-ssl.orig/ftp/ftp.c      2014-12-23 00:52:33.148812793 +0100
-+++ netkit-ftp-ssl/ftp/ftp.c   2014-12-23 00:59:58.548828384 +0100
+ 
+--- a/ftp/ftp.c
++++ b/ftp/ftp.c
 @@ -2102,12 +2102,11 @@
        fflush(stdout);
  }
@@ -80,10 +76,8 @@
        }
        return(n);
  }
-Index: netkit-ftp-ssl/ftp/sslapp.h
-===================================================================
---- netkit-ftp-ssl.orig/ftp/sslapp.h   2014-12-23 00:40:41.704787889 +0100
-+++ netkit-ftp-ssl/ftp/sslapp.h        2014-12-23 00:59:58.552828384 +0100
+--- a/ftp/sslapp.h
++++ b/ftp/sslapp.h
 @@ -59,6 +59,7 @@
  extern int server_verify_callback();
  extern int client_verify_callback();*/
diff -Nru netkit-ftp-ssl-0.17.34+0.2/debian/patches/600_fix_passive_mode.diff 
netkit-ftp-ssl-0.17.34+0.2/debian/patches/600_fix_passive_mode.diff
--- netkit-ftp-ssl-0.17.34+0.2/debian/patches/600_fix_passive_mode.diff 
2017-02-06 01:13:00.000000000 +0100
+++ netkit-ftp-ssl-0.17.34+0.2/debian/patches/600_fix_passive_mode.diff 
2019-02-24 14:39:23.000000000 +0100
@@ -5,10 +5,8 @@
 Forwarded: no
 Last-Update: 2014-12-23
 
-Index: netkit-ftp-ssl/ftp/ftp.c
-===================================================================
---- netkit-ftp-ssl.orig/ftp/ftp.c      2014-12-23 01:07:37.196844439 +0100
-+++ netkit-ftp-ssl/ftp/ftp.c   2014-12-23 22:56:40.069835207 +0100
+--- a/ftp/ftp.c
++++ b/ftp/ftp.c
 @@ -1622,24 +1622,23 @@
        socklen_t fromlen = sizeof(from);
        int ret;
diff -Nru netkit-ftp-ssl-0.17.34+0.2/debian/patches/610_usage.diff 
netkit-ftp-ssl-0.17.34+0.2/debian/patches/610_usage.diff
--- netkit-ftp-ssl-0.17.34+0.2/debian/patches/610_usage.diff    2017-02-06 
01:13:00.000000000 +0100
+++ netkit-ftp-ssl-0.17.34+0.2/debian/patches/610_usage.diff    2019-02-24 
14:39:23.000000000 +0100
@@ -3,10 +3,8 @@
 Forwarded: no
 Last-Update: 2014-12-23
 
-Index: netkit-ftp-ssl/ftp/main.c
-===================================================================
---- netkit-ftp-ssl.orig/ftp/main.c     2014-12-23 00:40:41.692787889 +0100
-+++ netkit-ftp-ssl/ftp/main.c  2014-12-23 23:12:08.389796005 +0100
+--- a/ftp/main.c
++++ b/ftp/main.c
 @@ -188,17 +188,33 @@
  void
  usage(void)
diff -Nru 
netkit-ftp-ssl-0.17.34+0.2/debian/patches/620_enforce_ssl_in_user_cmd.diff 
netkit-ftp-ssl-0.17.34+0.2/debian/patches/620_enforce_ssl_in_user_cmd.diff
--- netkit-ftp-ssl-0.17.34+0.2/debian/patches/620_enforce_ssl_in_user_cmd.diff  
2017-02-06 01:13:00.000000000 +0100
+++ netkit-ftp-ssl-0.17.34+0.2/debian/patches/620_enforce_ssl_in_user_cmd.diff  
2019-02-24 14:39:23.000000000 +0100
@@ -3,10 +3,8 @@
 Forwarded: no
 Last-Update: 2010-04-06
 
-Index: netkit-ftp-ssl/ftp/cmds.c
-===================================================================
---- netkit-ftp-ssl.orig/ftp/cmds.c     2010-07-04 00:52:02.000000000 +0100
-+++ netkit-ftp-ssl/ftp/cmds.c  2010-07-04 00:52:02.000000000 +0100
+--- a/ftp/cmds.c
++++ b/ftp/cmds.c
 @@ -1640,6 +1640,12 @@
                code = -1;
                return;
@@ -20,10 +18,8 @@
        n = command("USER %s", argv[1]);
        if (n == CONTINUE) {
                if (argc < 3 )
-Index: netkit-ftp-ssl/ftp/ftp.c
-===================================================================
---- netkit-ftp-ssl.orig/ftp/ftp.c      2010-07-04 00:52:02.000000000 +0100
-+++ netkit-ftp-ssl/ftp/ftp.c   2010-07-04 00:52:02.000000000 +0100
+--- a/ftp/ftp.c
++++ b/ftp/ftp.c
 @@ -94,6 +94,7 @@
  static int ptflag = 0;
  static int ptabflg = 0;
@@ -44,10 +40,8 @@
            } else if (n == CONTINUE || n == COMPLETE ) {
                /* do SSL */
                ssl_con=(SSL *)SSL_new(ssl_ctx);
-Index: netkit-ftp-ssl/ftp/sslapp.h
-===================================================================
---- netkit-ftp-ssl.orig/ftp/sslapp.h   2010-07-04 00:52:02.000000000 +0100
-+++ netkit-ftp-ssl/ftp/sslapp.h        2010-07-04 00:52:02.000000000 +0100
+--- a/ftp/sslapp.h
++++ b/ftp/sslapp.h
 @@ -59,7 +59,9 @@
  extern int server_verify_callback();
  extern int client_verify_callback();*/
diff -Nru netkit-ftp-ssl-0.17.34+0.2/debian/patches/630_fix_-z_segfault.diff 
netkit-ftp-ssl-0.17.34+0.2/debian/patches/630_fix_-z_segfault.diff
--- netkit-ftp-ssl-0.17.34+0.2/debian/patches/630_fix_-z_segfault.diff  
2017-02-06 01:13:00.000000000 +0100
+++ netkit-ftp-ssl-0.17.34+0.2/debian/patches/630_fix_-z_segfault.diff  
2019-02-24 14:39:23.000000000 +0100
@@ -5,10 +5,8 @@
 Forwarded: no
 Last-Update: 2010-04-06
 
-Index: netkit-ftp-ssl/ftp/main.c
-===================================================================
---- netkit-ftp-ssl.orig/ftp/main.c     2010-05-16 22:24:05.000000000 +0100
-+++ netkit-ftp-ssl/ftp/main.c  2010-05-16 22:24:05.000000000 +0100
+--- a/ftp/main.c
++++ b/ftp/main.c
 @@ -300,6 +300,11 @@
  
  #ifdef USE_SSL
diff -Nru netkit-ftp-ssl-0.17.34+0.2/debian/patches/640_use_editline.diff 
netkit-ftp-ssl-0.17.34+0.2/debian/patches/640_use_editline.diff
--- netkit-ftp-ssl-0.17.34+0.2/debian/patches/640_use_editline.diff     
2017-02-06 01:13:00.000000000 +0100
+++ netkit-ftp-ssl-0.17.34+0.2/debian/patches/640_use_editline.diff     
2019-02-24 14:39:23.000000000 +0100
@@ -7,95 +7,8 @@
 Forwarded: no
 Last-Update: 2014-12-23
 
-Index: netkit-ftp-ssl/configure
-===================================================================
---- netkit-ftp-ssl.orig/configure      2014-12-22 23:01:42.944580007 +0100
-+++ netkit-ftp-ssl/configure   2014-12-23 23:39:02.981727822 +0100
-@@ -3,6 +3,8 @@
- # This file was generated by confgen version 2.
- # Do not edit.
- #
-+# Which is all very well, except I can't find a copy of confgen
-+# hence manually edited to add editline support - i...@erislabs.net
- 
- PREFIX='/usr'
- #EXECPREFIX='$PREFIX'
-@@ -17,7 +19,8 @@
- Usage: configure [options]
-     --help                Show this message
-     --with-debug          Enable debugging
--    --without-readline      Disable readline support
-+    --with-editline       Use editline instead of readline
-+    --without-readline    Disable readline support
-     --prefix=path         Prefix for location of files [/usr]
-     --exec-prefix=path    Location for arch-depedent files [prefix]
-     --installroot=root    Top of filesystem tree to install in [/]
-@@ -39,6 +42,7 @@
-       --manmode=*) MANMODE=`echo $1 | sed 's/^[^=]*=//'` ;;
-       --with-c-compiler=*) CC=`echo $1 | sed 's/^[^=]*=//'` ;;
-       --without-readline|--disable-readline) WITHOUT_READLINE=1;;
-+      --with-editline) WITHOUT_READLINE=1; WITH_EDITLINE=1;;
-       *) echo "Unrecognized option: $1"; exit 1;;
- esac 
- shift
-@@ -266,8 +270,29 @@
- 
- ##################################################
- 
-+echo -n 'Checking for libeditline... '
-+if [ x$WITH_EDITLINE = x ]; then
-+    echo disabled
-+else
-+cat <<EOF >__conftest.c
-+#include <stdio.h>
-+#include <editline.h>
-+int main() { readline("foo"); return 0; }
-+
-+EOF
-+if (
-+      $CC $CFLAGS  __conftest.c -leditline $LIBTERMCAP -o __conftest || exit 1
-+   ) >/dev/null 2>&1; then
-+        echo 'yes'
-+        USE_EDITLINE=1
-+    else
-+        echo 'no'
-+    fi
-+fi
-+rm -f __conftest*
-+
- echo -n 'Checking for libreadline... '
--if [ x$WITHOUT_READLINE != x ]; then
-+if [ x$WITHOUT_READLINE != x ] || [ x$WITH_EDITLINEx = x ] ; then
-     echo disabled
- else
- cat <<EOF >__conftest.c
-@@ -439,5 +464,6 @@
-     #echo "LIBTERMCAP=$LIBTERMCAP"
-     echo "USE_GLIBC=$USE_GLIBC"
-     echo "USE_READLINE=$USE_READLINE"
-+    echo "USE_EDITLINE=$USE_EDITLINE"
- ) > MCONFIG
- 
-Index: netkit-ftp-ssl/ftp/Makefile
-===================================================================
---- netkit-ftp-ssl.orig/ftp/Makefile   2014-12-23 00:02:24.824707489 +0100
-+++ netkit-ftp-ssl/ftp/Makefile        2014-12-23 23:39:02.981727822 +0100
-@@ -8,6 +8,11 @@
- LIBS += -lreadline
- endif
- 
-+ifeq ($(USE_EDITLINE),1)
-+CFLAGS += -D__USE_EDITLINE__
-+LIBS += -leditline $(LIBTERMCAP)
-+endif
-+
- CFLAGS += -DUSE_SSL -g
- LIBS += -lssl -lcrypto
- 
-Index: netkit-ftp-ssl/ftp/cmds.c
-===================================================================
---- netkit-ftp-ssl.orig/ftp/cmds.c     2010-05-16 22:24:32.000000000 +0100
-+++ netkit-ftp-ssl/ftp/cmds.c  2010-05-16 22:24:32.000000000 +0100
+--- a/ftp/cmds.c
++++ b/ftp/cmds.c
 @@ -65,6 +65,10 @@
  #include <readline/history.h>
  #endif
@@ -125,10 +38,8 @@
        }
  #endif
        return (*lyne != 'n' && *lyne != 'N');
-Index: netkit-ftp-ssl/ftp/main.c
-===================================================================
---- netkit-ftp-ssl.orig/ftp/main.c     2010-05-16 22:24:32.000000000 +0100
-+++ netkit-ftp-ssl/ftp/main.c  2010-05-16 22:24:32.000000000 +0100
+--- a/ftp/main.c
++++ b/ftp/main.c
 @@ -78,6 +78,10 @@
  #include <readline/history.h>
  #endif
@@ -158,10 +69,8 @@
        if (fromatty && !rl_inhibit) {
                lineread = readline("ftp> ");
                INTOFF;
-Index: netkit-ftp-ssl/ftp/main.h
-===================================================================
---- netkit-ftp-ssl.orig/ftp/main.h     2010-05-16 22:24:32.000000000 +0100
-+++ netkit-ftp-ssl/ftp/main.h  2010-05-16 22:24:32.000000000 +0100
+--- a/ftp/main.h
++++ b/ftp/main.h
 @@ -31,3 +31,11 @@
  #define MAXHOSTNAMELEN 64
  #endif
diff -Nru 
netkit-ftp-ssl-0.17.34+0.2/debian/patches/650_broken_ssl_connection.diff 
netkit-ftp-ssl-0.17.34+0.2/debian/patches/650_broken_ssl_connection.diff
--- netkit-ftp-ssl-0.17.34+0.2/debian/patches/650_broken_ssl_connection.diff    
2017-02-06 01:13:00.000000000 +0100
+++ netkit-ftp-ssl-0.17.34+0.2/debian/patches/650_broken_ssl_connection.diff    
2019-02-24 14:39:23.000000000 +0100
@@ -11,8 +11,8 @@
 Forwarded: no
 Last-Update: 2014-12-31
 
---- netkit-ftp-ssl.orig/ftp/cmds.c     2014-12-23 23:45:49.241710666 +0100
-+++ netkit-ftp-ssl/ftp/cmds.c  2014-12-31 16:16:49.866214592 +0100
+--- a/ftp/cmds.c
++++ b/ftp/cmds.c
 @@ -1880,6 +1880,13 @@
                data = -1;
                INTON;
@@ -27,8 +27,8 @@
        connected = 0;
        if (!proxy) {
                macnum = 0;
---- netkit-ftp-ssl.orig/ftp/ftp.c      2014-12-23 23:23:03.853768325 +0100
-+++ netkit-ftp-ssl/ftp/ftp.c   2014-12-30 12:46:04.540772544 +0100
+--- a/ftp/ftp.c
++++ b/ftp/ftp.c
 @@ -2216,7 +2216,8 @@
      if ((ret=SSL_read(ssl_con,&onebyte,1))!=1) {
        /* we want to know this stuff! */
diff -Nru netkit-ftp-ssl-0.17.34+0.2/debian/patches/660_hashes_and_ticks.diff 
netkit-ftp-ssl-0.17.34+0.2/debian/patches/660_hashes_and_ticks.diff
--- netkit-ftp-ssl-0.17.34+0.2/debian/patches/660_hashes_and_ticks.diff 
2017-02-06 01:13:00.000000000 +0100
+++ netkit-ftp-ssl-0.17.34+0.2/debian/patches/660_hashes_and_ticks.diff 
2019-02-24 14:39:23.000000000 +0100
@@ -6,8 +6,8 @@
 Forwarded: no
 Last-Update: 2015-11-24
 
---- netkit-ftp-ssl-0.17.33+0.2/ftp/ftp.c.orig  2015-11-24 00:23:27.000000000 
+0100
-+++ netkit-ftp-ssl-0.17.33+0.2/ftp/ftp.c       2015-11-24 01:17:35.922740374 
+0100
+--- a/ftp/ftp.c
++++ b/ftp/ftp.c
 @@ -1206,13 +1206,18 @@
                            if ((d = write(fileno(fout), buf, c)) != c)
                                    break;
diff -Nru netkit-ftp-ssl-0.17.34+0.2/debian/patches/670_capture_ssl_error.diff 
netkit-ftp-ssl-0.17.34+0.2/debian/patches/670_capture_ssl_error.diff
--- netkit-ftp-ssl-0.17.34+0.2/debian/patches/670_capture_ssl_error.diff        
2017-02-06 01:13:00.000000000 +0100
+++ netkit-ftp-ssl-0.17.34+0.2/debian/patches/670_capture_ssl_error.diff        
2019-02-24 14:39:23.000000000 +0100
@@ -10,8 +10,8 @@
 Forwarded: no
 Last-Update: 2015-11-24
 
---- netkit-ftp-ssl-0.17.33+0.2/ftp/ftp.c.orig2 2015-11-24 01:17:35.922740374 
+0100
-+++ netkit-ftp-ssl-0.17.33+0.2/ftp/ftp.c       2015-11-24 01:21:18.814739561 
+0100
+--- a/ftp/ftp.c
++++ b/ftp/ftp.c
 @@ -1219,7 +1219,7 @@
                                            hashbytes += 10 * hashstep;
                            }
diff -Nru netkit-ftp-ssl-0.17.34+0.2/debian/patches/700_prefer_tls.diff 
netkit-ftp-ssl-0.17.34+0.2/debian/patches/700_prefer_tls.diff
--- netkit-ftp-ssl-0.17.34+0.2/debian/patches/700_prefer_tls.diff       
2017-02-08 15:39:49.000000000 +0100
+++ netkit-ftp-ssl-0.17.34+0.2/debian/patches/700_prefer_tls.diff       
2019-02-24 14:39:23.000000000 +0100
@@ -25,10 +25,9 @@
 Forwarded: no
 Last-Update: 2017-02-07
 
-diff -Naurp netkit-ftp-0.17.debian/ftp/cmds.c netkit-ftp-0.17/ftp/cmds.c
---- netkit-ftp-0.17.debian/ftp/cmds.c  2016-12-23 00:05:51.820239257 +0100
-+++ netkit-ftp-0.17/ftp/cmds.c 2016-12-23 17:47:11.133840700 +0100
-@@ -1127,8 +1127,51 @@ status(void)
+--- a/ftp/cmds.c
++++ b/ftp/cmds.c
+@@ -1127,8 +1127,51 @@
  {
        int i;
  
@@ -81,10 +80,9 @@
        else
                printf("Not connected.\n");
        if (!proxy) {
-diff -Naurp netkit-ftp-0.17.debian/ftp/ftp.1 netkit-ftp-0.17/ftp/ftp.1
---- netkit-ftp-0.17.debian/ftp/ftp.1   2016-12-23 00:05:48.972372225 +0100
-+++ netkit-ftp-0.17/ftp/ftp.1  2017-01-05 15:47:23.606720435 +0100
-@@ -44,12 +44,13 @@ file transfer program
+--- a/ftp/ftp.1
++++ b/ftp/ftp.1
+@@ -44,12 +44,13 @@
  .Nm ftp
  .Op Fl 46pinegvd
  .Op Fl z Ar debug
@@ -100,7 +98,7 @@
  .Op Fl z Ar cert=cert_file
  .Op Fl z Ar key=key_file
  .Op Fl z Ar cipher=list
-@@ -57,12 +58,13 @@ file transfer program
+@@ -57,12 +58,13 @@
  .Nm pftp
  .Op Fl 46inegvd
  .Op Fl z Ar debug
@@ -116,7 +114,7 @@
  .Op Fl z Ar cert=cert_file
  .Op Fl z Ar key=key_file
  .Op Fl z Ar cipher=list
-@@ -131,41 +133,46 @@ The SSL parameters are:
+@@ -131,41 +133,46 @@
  .Bl -tag -width Fl
  .It Ic debug
  Send SSL related debugging information to stderr.
@@ -179,7 +177,7 @@
  .El
  .El
  .Pp
-@@ -1119,6 +1126,8 @@ For default location of a
+@@ -1119,6 +1126,8 @@
  file, if one exists.
  .It Ev SHELL
  For default shell.
@@ -188,10 +186,9 @@
  .El
  .Sh SEE ALSO
  .Xr ftpd 8 ,
-diff -Naurp netkit-ftp-0.17.debian/ftp/ftp.c netkit-ftp-0.17/ftp/ftp.c
---- netkit-ftp-0.17.debian/ftp/ftp.c   2016-12-23 00:05:52.380213160 +0100
-+++ netkit-ftp-0.17/ftp/ftp.c  2017-02-07 23:35:32.871433587 +0100
-@@ -1686,12 +1686,17 @@ dataconn(const char *lmode)
+--- a/ftp/ftp.c
++++ b/ftp/ftp.c
+@@ -1686,12 +1686,17 @@
  
            if ((ret=SSL_connect(ssl_data_con))<=0) {
                  static char errbuf[1024];
@@ -212,7 +209,7 @@
                fflush(stderr);
  
                /* abort time methinks ... */
-@@ -2111,16 +2116,50 @@ printbytes(off_t bytes)
+@@ -2111,16 +2116,50 @@
  }
  
  #ifdef USE_SSL
@@ -267,7 +264,7 @@
            }
            if (n == ERROR) {           /* do normal USER/PASS */
                printf("SSL not available\n");
-@@ -2133,6 +2172,31 @@ ssl_init(void)
+@@ -2133,6 +2172,31 @@
                }
            } else if (n == CONTINUE || n == COMPLETE ) {
                /* do SSL */
@@ -299,7 +296,7 @@
                ssl_con=(SSL *)SSL_new(ssl_ctx);
                if (!ssl_con) {
                    ERR_print_errors_fp(stderr);
-@@ -2142,37 +2206,60 @@ ssl_init(void)
+@@ -2142,37 +2206,60 @@
                SSL_set_fd(ssl_con,fileno(cout));
                set_ssl_trace(ssl_con);
  
@@ -369,7 +366,7 @@
                    fflush(stderr);
                    ssl_active_flag=1;
                }
-@@ -2187,6 +2274,8 @@ ssl_init(void)
+@@ -2187,6 +2274,8 @@
                    fprintf(stderr, "Data connection security level 
refused.\n");
                    return ERROR;
                }
@@ -378,10 +375,9 @@
            }
        }
        return CONTINUE;
-diff -Naurp netkit-ftp-0.17.debian/ftp/main.c netkit-ftp-0.17/ftp/main.c
---- netkit-ftp-0.17.debian/ftp/main.c  2016-12-23 00:05:51.524253061 +0100
-+++ netkit-ftp-0.17/ftp/main.c 2017-01-05 15:45:23.885255406 +0100
-@@ -132,6 +132,7 @@ int ssl_enabled=1;
+--- a/ftp/main.c
++++ b/ftp/main.c
+@@ -132,6 +132,7 @@
  
  char *my_ssl_key_file=NULL;
  char *my_ssl_cert_file=NULL;
@@ -389,7 +385,7 @@
  
  BIO *bio_err=NULL;
  
-@@ -209,12 +210,13 @@ usage(void)
+@@ -209,12 +210,13 @@
        printf("   -d                     enable debugging\n");
  #ifdef USE_SSL
        printf("   -z debug               enable SSL debugging\n");
@@ -405,7 +401,7 @@
        printf("   -z cert=cert_file      use the certificate(s) in 
cert_file\n");
        printf("   -z key=key_file        use the key(s) in key_file\n");
        printf("   -z cipher=cipher_list  set preferred ciphers to 
cipher_list\n");
-@@ -335,6 +337,12 @@ main(volatile int argc, char **volatile
+@@ -335,6 +337,12 @@
                                if (strncmp(optarg, "cert=", strlen("cert=")) 
== 0 ) {
                                    my_ssl_cert_file=optarg+strlen("cert=");
                                }
@@ -418,7 +414,7 @@
                                if (strncmp(optarg, "key=", strlen("key=")) == 
0 ) {
                                    my_ssl_key_file=optarg+strlen("key=");
                                }
-@@ -398,7 +406,13 @@ main(volatile int argc, char **volatile
+@@ -398,7 +406,13 @@
            if (!do_ssleay_init(0)) {
                fprintf(stderr,"ftp: SSLeay initialisation failed\n");
                fflush(stderr);
@@ -433,9 +429,8 @@
                exit(1);
            }
        }
-diff -Naurp netkit-ftp-0.17.debian/ftp/sslapp.c netkit-ftp-0.17/ftp/sslapp.c
---- netkit-ftp-0.17.debian/ftp/sslapp.c        2016-12-23 00:05:49.548345304 
+0100
-+++ netkit-ftp-0.17/ftp/sslapp.c       2017-01-18 17:41:55.268856150 +0100
+--- a/ftp/sslapp.c
++++ b/ftp/sslapp.c
 @@ -14,8 +14,11 @@
  
  #ifdef USE_SSL
@@ -448,7 +443,7 @@
  SSL_CTX *ssl_ctx;
  SSL *ssl_con;
  int ssl_debug_flag=0;
-@@ -27,6 +30,7 @@ int ssl_certsok_flag=0;
+@@ -27,6 +30,7 @@
  int ssl_cert_required=0;
  int ssl_verbose_flag=0;
  int ssl_disabled_flag=0;
@@ -456,7 +451,7 @@
  char *ssl_cert_file=NULL;
  char *ssl_key_file=NULL;
  char *ssl_cipher_list=NULL;
-@@ -40,6 +44,7 @@ int
+@@ -40,6 +44,7 @@
  do_ssleay_init(int server)
  {
    char *p;
@@ -464,7 +459,7 @@
  
    /* make sure we have somewhere we can log errors to */
    if (bio_err==NULL) {
-@@ -48,6 +53,11 @@ do_ssleay_init(int server)
+@@ -48,6 +53,11 @@
        BIO_set_fp(bio_err,stderr,BIO_NOCLOSE);
        else {
        if (BIO_write_filename(bio_err,ssl_log_file)<=0) {
@@ -476,7 +471,7 @@
          /* not a lot we can do */
        }
        }
-@@ -58,9 +68,10 @@ do_ssleay_init(int server)
+@@ -58,9 +68,10 @@
     * vars are long gone now SSLeay8 has rolled around and we have 
     * a clean interface for doing things
     */
@@ -489,7 +484,7 @@
  
    /* init things so we will get meaningful error messages
     * rather than numbers 
-@@ -68,19 +79,46 @@ do_ssleay_init(int server)
+@@ -68,19 +79,46 @@
    SSL_load_error_strings();
  
    SSLeay_add_ssl_algorithms();
@@ -538,7 +533,7 @@
        if (ssl_debug_flag)
          BIO_printf(bio_err,"Generation of temp (512 bit) RSA key done\r\n");
     
-@@ -92,20 +130,25 @@ do_ssleay_init(int server)
+@@ -92,20 +130,25 @@
          BIO_printf(bio_err,"Assigned temp (512 bit) RSA key\r\n");
      }
    }
@@ -567,7 +562,7 @@
  
    /* for verbose we use the 0.6.x info callback that I got
     * eric to finally add into the code :-) --tjh
-@@ -114,27 +157,94 @@ do_ssleay_init(int server)
+@@ -114,27 +157,94 @@
        SSL_CTX_set_info_callback(ssl_ctx,client_info_callback);
    }
  
@@ -670,7 +665,7 @@
    /* make sure we will find certificates in the standard
     * location ... otherwise we don't look anywhere for
     * these things which is going to make client certificate
-@@ -150,6 +260,9 @@ do_ssleay_init(int server)
+@@ -150,6 +260,9 @@
    SSL_set_verify(ssl_con,ssl_verify_flag,client_verify_callback);
  #endif
  
@@ -680,10 +675,9 @@
    return(1);
  }
  
-diff -Naurp netkit-ftp-0.17.debian/ftp/sslapp.h netkit-ftp-0.17/ftp/sslapp.h
---- netkit-ftp-0.17.debian/ftp/sslapp.h        2016-12-23 00:05:50.964279178 
+0100
-+++ netkit-ftp-0.17/ftp/sslapp.h       2017-01-15 22:43:03.686540857 +0100
-@@ -48,6 +48,7 @@ extern int ssl_cert_required;
+--- a/ftp/sslapp.h
++++ b/ftp/sslapp.h
+@@ -48,6 +48,7 @@
  extern int ssl_certsok_flag;
  
  extern char *ssl_log_file; 
@@ -691,10 +685,9 @@
  extern char *ssl_cert_file; 
  extern char *ssl_key_file;
  extern char *ssl_cipher_list;
-diff -Naurp netkit-ftp-0.17.debian/ftp/ssl_port.h 
netkit-ftp-0.17/ftp/ssl_port.h
---- netkit-ftp-0.17.debian/ftp/ssl_port.h      2016-12-23 00:05:49.548345304 
+0100
-+++ netkit-ftp-0.17/ftp/ssl_port.h     2017-01-03 14:18:05.775193079 +0100
-@@ -43,6 +43,7 @@ extern SSL *ssl_data_con;
+--- a/ftp/ssl_port.h
++++ b/ftp/ssl_port.h
+@@ -43,6 +43,7 @@
  extern int ssl_data_active_flag;
  
  extern char *my_ssl_cert_file;
diff -Nru netkit-ftp-ssl-0.17.34+0.2/debian/patches/series 
netkit-ftp-ssl-0.17.34+0.2/debian/patches/series
--- netkit-ftp-ssl-0.17.34+0.2/debian/patches/series    2017-02-06 
01:16:35.000000000 +0100
+++ netkit-ftp-ssl-0.17.34+0.2/debian/patches/series    2019-02-24 
14:39:23.000000000 +0100
@@ -2,7 +2,6 @@
 # From netkit-ftp
 #
 010_patches_in_sarge.diff
-020_optional_stripping.diff
 025_long_cmd_overflow.diff
 030_argv_handling.diff
 035_lintian_pedantic.diff
@@ -10,7 +9,6 @@
 041_user_address_commands.diff
 043_tune_non_autologin.diff
 050_support_gnu_hurd.diff
-052_no_termcap_linking.diff
 060_full_offset_range.diff
 070_hash_increments.diff
 #
@@ -38,3 +36,10 @@
 # Here begins substantial upgrade of abilities.
 #
 700_prefer_tls.diff
+
+use-cmake-as-buildsystem.patch
+use-cmake-as-buildsystem-debian-extras.patch
+use-cmake-as-buildsystem-ssl-extras.patch
+
+0001-ftp-ssl-shutdown-the-session-properly.patch
+0002-ftp-ssl-use-get-set-session-instead-of-copy-id.patch
diff -Nru 
netkit-ftp-ssl-0.17.34+0.2/debian/patches/use-cmake-as-buildsystem-debian-extras.patch
 
netkit-ftp-ssl-0.17.34+0.2/debian/patches/use-cmake-as-buildsystem-debian-extras.patch
--- 
netkit-ftp-ssl-0.17.34+0.2/debian/patches/use-cmake-as-buildsystem-debian-extras.patch
      1970-01-01 01:00:00.000000000 +0100
+++ 
netkit-ftp-ssl-0.17.34+0.2/debian/patches/use-cmake-as-buildsystem-debian-extras.patch
      2019-02-24 14:39:23.000000000 +0100
@@ -0,0 +1,58 @@
+Description: Adjust install paths and file names for Debian
+Author: Christoph Biedl <debian.a...@manchmal.in-ulm.de>
+Forwarded: not-needed
+Last-Update: 2019-02-24
+
+--- a/ftp/CMakeLists.txt
++++ b/ftp/CMakeLists.txt
+@@ -1,6 +1,11 @@
+ 
++set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64")
++if(USE_READLINE)
++    set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -D__USE_READLINE__")
++endif()
++
+ add_executable(
+-    ftp
++    netkit-ftp
+     cmds.c
+     cmdtab.c
+     domacro.c
+@@ -9,28 +14,23 @@
+     ruserpass.c
+ )
+ install(
+-    TARGETS ftp
++    TARGETS netkit-ftp
+     DESTINATION ${BIN_DIR}
+ )
+-install(
+-    CODE "execute_process( \
+-        COMMAND ${CMAKE_COMMAND} -E create_symlink \
+-        ptftp \$ENV{DESTDIR}${BIN_DIR}/ftp \
+-    )"
+-)
+-
++if(USE_READLINE)
++    target_link_libraries(
++        netkit-ftp
++        readline
++    )
++endif()
+ install(
+     FILES ftp.1
+     DESTINATION ${MAN_DIR}/man1/
+-)
+-install(
+-    CODE "execute_process( \
+-        COMMAND ${CMAKE_COMMAND} -E create_symlink \
+-        pftp.1 \$ENV{DESTDIR}${MAN_DIR}/pftp.1 \
+-    )"
++    RENAME netkit-ftp.1
+ )
+ 
+ install(
+     FILES netrc.5
+     DESTINATION ${MAN_DIR}/man5/
++    RENAME netkit-netrc.5
+ )
diff -Nru 
netkit-ftp-ssl-0.17.34+0.2/debian/patches/use-cmake-as-buildsystem.patch 
netkit-ftp-ssl-0.17.34+0.2/debian/patches/use-cmake-as-buildsystem.patch
--- netkit-ftp-ssl-0.17.34+0.2/debian/patches/use-cmake-as-buildsystem.patch    
1970-01-01 01:00:00.000000000 +0100
+++ netkit-ftp-ssl-0.17.34+0.2/debian/patches/use-cmake-as-buildsystem.patch    
2019-02-24 14:39:23.000000000 +0100
@@ -0,0 +1,57 @@
+Description: Use cmake as build system
+Author: Christoph Biedl <debian.a...@manchmal.in-ulm.de>
+Bug-Debian: https://bugs.debian.org/912126
+Last-Update: 2019-02-24
+
+--- /dev/null
++++ b/CMakeLists.txt
+@@ -0,0 +1,10 @@
++cmake_minimum_required(VERSION 3.7)
++project(netkit-ftp)
++
++set(BIN_DIR "${CMAKE_INSTALL_PREFIX}/bin")
++set(MAN_DIR "${CMAKE_INSTALL_PREFIX}/share/man")
++
++find_library(USE_READLINE readline)
++find_library(USE_CRYPT crypt REQUIRED)
++
++add_subdirectory(ftp)
+--- /dev/null
++++ b/ftp/CMakeLists.txt
+@@ -0,0 +1,36 @@
++
++add_executable(
++    ftp
++    cmds.c
++    cmdtab.c
++    domacro.c
++    ftp.c
++    main.c
++    ruserpass.c
++)
++install(
++    TARGETS ftp
++    DESTINATION ${BIN_DIR}
++)
++install(
++    CODE "execute_process( \
++        COMMAND ${CMAKE_COMMAND} -E create_symlink \
++        ptftp \$ENV{DESTDIR}${BIN_DIR}/ftp \
++    )"
++)
++
++install(
++    FILES ftp.1
++    DESTINATION ${MAN_DIR}/man1/
++)
++install(
++    CODE "execute_process( \
++        COMMAND ${CMAKE_COMMAND} -E create_symlink \
++        pftp.1 \$ENV{DESTDIR}${MAN_DIR}/pftp.1 \
++    )"
++)
++
++install(
++    FILES netrc.5
++    DESTINATION ${MAN_DIR}/man5/
++)
diff -Nru 
netkit-ftp-ssl-0.17.34+0.2/debian/patches/use-cmake-as-buildsystem-ssl-extras.patch
 
netkit-ftp-ssl-0.17.34+0.2/debian/patches/use-cmake-as-buildsystem-ssl-extras.patch
--- 
netkit-ftp-ssl-0.17.34+0.2/debian/patches/use-cmake-as-buildsystem-ssl-extras.patch
 1970-01-01 01:00:00.000000000 +0100
+++ 
netkit-ftp-ssl-0.17.34+0.2/debian/patches/use-cmake-as-buildsystem-ssl-extras.patch
 2019-02-24 14:39:23.000000000 +0100
@@ -0,0 +1,82 @@
+Description: Add SSL support
+Author: Christoph Biedl <debian.a...@manchmal.in-ulm.de>
+Forwarded: not-needed
+Last-Update: 2019-02-24
+
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -1,10 +1,11 @@
+ cmake_minimum_required(VERSION 3.7)
+-project(netkit-ftp)
++project(netkit-ftp-ssl)
+ 
+ set(BIN_DIR "${CMAKE_INSTALL_PREFIX}/bin")
+ set(MAN_DIR "${CMAKE_INSTALL_PREFIX}/share/man")
+ 
+-find_library(USE_READLINE readline)
+-find_library(USE_CRYPT crypt REQUIRED)
++find_library(USE_EDITLINE editline REQUIRED)
++find_library(LIBTERMCAP lncurses REQUIRED)
++find_library(USE_SSL ssl REQUIRED)
+ 
+ add_subdirectory(ftp)
+--- a/ftp/CMakeLists.txt
++++ b/ftp/CMakeLists.txt
+@@ -1,11 +1,21 @@
+ 
++set(
++    LIBS
++)
++
+ set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64")
+ if(USE_READLINE)
+     set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -D__USE_READLINE__")
++    set(LIBS ${LIBS} readline)
+ endif()
++if(USE_EDITLINE)
++    set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -D__USE_EDITLINE__")
++    set(LIBS ${LIBS} editline)
++endif()
++set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DUSE_SSL -DBUILD_SSL_CLIENT")
+ 
+ add_executable(
+-    netkit-ftp
++    ftp-ssl
+     cmds.c
+     cmdtab.c
+     domacro.c
+@@ -13,24 +23,25 @@
+     main.c
+     ruserpass.c
+ )
++target_link_libraries(
++    ftp-ssl
++    crypto
++    ssl
++    ${LIBS}
++)
+ install(
+-    TARGETS netkit-ftp
++    TARGETS ftp-ssl
+     DESTINATION ${BIN_DIR}
+ )
+-if(USE_READLINE)
+-    target_link_libraries(
+-        netkit-ftp
+-        readline
+-    )
+-endif()
++
+ install(
+     FILES ftp.1
+     DESTINATION ${MAN_DIR}/man1/
+-    RENAME netkit-ftp.1
++    RENAME ftp-ssl.1
+ )
+ 
+ install(
+     FILES netrc.5
+     DESTINATION ${MAN_DIR}/man5/
+-    RENAME netkit-netrc.5
++    RENAME netrc-ssl.5
+ )
diff -Nru netkit-ftp-ssl-0.17.34+0.2/debian/rules 
netkit-ftp-ssl-0.17.34+0.2/debian/rules
--- netkit-ftp-ssl-0.17.34+0.2/debian/rules     2017-02-06 01:13:00.000000000 
+0100
+++ netkit-ftp-ssl-0.17.34+0.2/debian/rules     2019-02-24 14:39:23.000000000 
+0100
@@ -1,99 +1,7 @@
 #!/usr/bin/make -f
-# $Id: rules,v 1.9 2001/12/11 09:03:39 herbert Exp $
-# Adapted for netkit-ftp.  Copyright 1999 by Herbert Xu.
-# Sample debian/rules that uses debhelper. GNU copyright 1997 by Joey Hess.
 
-# Uncomment this to turn on verbose mode.
-#export DH_VERBOSE=1
+%:
+       dh $@ --buildsystem=cmake
 
-DEFS := -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64
-
-CFLAGS += $(shell dpkg-buildflags --get CFLAGS) -fPIE -pie
-CPPFLAGS += $(shell dpkg-buildflags --get CPPFLAGS) -DBUILD_SSL_CLIENT
-LDFLAGS += $(shell dpkg-buildflags --get LDFLAGS) -Wl,-z,now
-
-DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
-DEB_HOST_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
-
-ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
-        CONFIGUREARGS=--with-debug
-else
-        CONFIGUREARGS=
-endif
-
-ifeq ($(DEB_BUILD_GNU_TYPE),$(DEB_HOST_GNU_TYPE))
-       CROSS :=
-else
-       CROSS := CC=$(DEB_HOST_GNU_TYPE)-gcc
-endif
-
-build: build-arch build-indep
-build-arch: build-stamp
-build-indep: build-stamp
-build-stamp:
-       dh_testdir
-
-       if [ ! -f MCONFIG ]; then \
-               ./configure $(CONFIGUREARGS) --with-editline ; \
-               sed -e 's;^CFLAGS=\(.*\)$$;CFLAGS= -g $(DEFS) 
-fno-strict-aliasing $(CFLAGS) $(CPPFLAGS) \1;' \
-                   -e 's;^LDFLAGS=\(.*\)$$;& $(LDFLAGS);' \
-                   -e 's;^\(LIBTERMCAP=\).*;\1;' \
-                   MCONFIG > MCONFIG.new; \
-               mv MCONFIG.new MCONFIG; \
-       fi
-       $(MAKE) $(CROSS)
-
-       touch build-stamp
-
-clean:
-       dh_testdir
-       dh_testroot
-       rm -f build-stamp install-stamp
-
-       [ ! -f MCONFIG ] || $(MAKE) distclean
-
-       dh_clean
-
-install: install-stamp
-install-stamp: build-stamp
-       dh_testdir
-       dh_testroot
-       dh_prep
-       dh_installdirs
-
-       $(MAKE) INSTALLROOT=`pwd`/debian/ftp-ssl MANDIR=/usr/share/man install
-       mv debian/ftp-ssl/usr/bin/ftp debian/ftp-ssl/usr/bin/ftp-ssl
-       #ln -sf ftp-ssl debian/ftp-ssl/usr/bin/pftp
-       rm -f debian/ftp-ssl/usr/bin/pftp
-       mv debian/ftp-ssl/usr/share/man/man1/ftp.1 \
-          debian/ftp-ssl/usr/share/man/man1/ftp-ssl.1
-       #ln -sf ftp-ssl.1 debian/ftp-ssl/usr/share/man/man1/pftp.1
-       rm -f debian/ftp-ssl/usr/share/man/man1/pftp.1
-       mv debian/ftp-ssl/usr/share/man/man5/netrc.5 \
-          debian/ftp-ssl/usr/share/man/man5/netrc-ssl.5
-
-       touch install-stamp
-
-# Build architecture-independent files here.
-binary-indep: build install
-# We have nothing to do by default.
-
-# Build architecture-dependent files here.
-binary-arch: build install
-       dh_testdir
-       dh_testroot
-       dh_installdocs
-       dh_installman
-       dh_installchangelogs ChangeLog
-       dh_link
-       dh_strip
-       dh_compress
-       dh_fixperms
-       dh_installdeb
-       dh_shlibdeps
-       dh_gencontrol
-       dh_md5sums
-       dh_builddeb
-
-binary: binary-indep binary-arch
-.PHONY: build clean binary-indep binary-arch binary install
+override_dh_auto_install:
+       dh_auto_install --destdir=debian/tmp

Attachment: signature.asc
Description: PGP signature

Reply via email to