tags 912123 patch user debian-rele...@lists.debian.org usertags 912123 + bsp-2019-02-de-bonn thanks
Dear maintainer, find attached the fix for linux-ftpd-ssl. 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 linux-ftp in favour of linux-ftpd-ssl, however linux-ftp hasd patches that might be worth preserving. Regards, Christoph diff -Nru linux-ftpd-ssl-0.17.36+0.3/debian/changelog linux-ftpd-ssl-0.17.36+0.3/debian/changelog --- linux-ftpd-ssl-0.17.36+0.3/debian/changelog 2017-01-24 15:35:15.000000000 +0100 +++ linux-ftpd-ssl-0.17.36+0.3/debian/changelog 2019-02-24 14:39:30.000000000 +0100 @@ -1,3 +1,10 @@ +linux-ftpd-ssl (0.17.36+0.3-2.1) unstable; urgency=high + + * Non-maintainer upload + * Use cmake as build system. Closes: #912123 + + -- Christoph Biedl <debian.a...@manchmal.in-ulm.de> Sun, 24 Feb 2019 14:39:30 +0100 + linux-ftpd-ssl (0.17.36+0.3-2) unstable; urgency=low * Adaption to libssl of recent version. diff -Nru linux-ftpd-ssl-0.17.36+0.3/debian/compat linux-ftpd-ssl-0.17.36+0.3/debian/compat --- linux-ftpd-ssl-0.17.36+0.3/debian/compat 2016-12-25 23:06:11.000000000 +0100 +++ linux-ftpd-ssl-0.17.36+0.3/debian/compat 2019-02-24 14:39:30.000000000 +0100 @@ -1 +1 @@ -9 +10 diff -Nru linux-ftpd-ssl-0.17.36+0.3/debian/control linux-ftpd-ssl-0.17.36+0.3/debian/control --- linux-ftpd-ssl-0.17.36+0.3/debian/control 2017-01-16 21:04:22.000000000 +0100 +++ linux-ftpd-ssl-0.17.36+0.3/debian/control 2019-02-24 14:39:30.000000000 +0100 @@ -3,7 +3,7 @@ Priority: extra Maintainer: Mats Erik Andersson <mats.anders...@gisladisker.se> Uploaders: Alberto Gonzalez Iniesta <a...@inittab.org> -Build-Depends: bison, debhelper (>= 9), libpam0g-dev | libpam-dev, libssl-dev | libssl1.0-dev +Build-Depends: bison, debhelper (>= 10~), libpam0g-dev | libpam-dev, libssl-dev | libssl1.0-dev, cmake Standards-Version: 3.9.8 Package: ftpd-ssl diff -Nru linux-ftpd-ssl-0.17.36+0.3/debian/dirs linux-ftpd-ssl-0.17.36+0.3/debian/dirs --- linux-ftpd-ssl-0.17.36+0.3/debian/dirs 2016-12-25 23:06:11.000000000 +0100 +++ linux-ftpd-ssl-0.17.36+0.3/debian/dirs 1970-01-01 01:00:00.000000000 +0100 @@ -1,5 +0,0 @@ -etc/pam.d -usr/share/man/man5 -usr/share/man/man8 -usr/sbin -etc/ftpd-ssl diff -Nru linux-ftpd-ssl-0.17.36+0.3/debian/ftpd-ssl.install linux-ftpd-ssl-0.17.36+0.3/debian/ftpd-ssl.install --- linux-ftpd-ssl-0.17.36+0.3/debian/ftpd-ssl.install 1970-01-01 01:00:00.000000000 +0100 +++ linux-ftpd-ssl-0.17.36+0.3/debian/ftpd-ssl.install 2019-02-24 14:39:30.000000000 +0100 @@ -0,0 +1,6 @@ + +debian/openssl.cnf etc/ftpd-ssl/ +debian/pam.d/ftp etc/pam.d/ + +debian/ftpchroot etc/ +debian/ftpusers etc/ diff -Nru linux-ftpd-ssl-0.17.36+0.3/debian/ftpd-ssl.links linux-ftpd-ssl-0.17.36+0.3/debian/ftpd-ssl.links --- linux-ftpd-ssl-0.17.36+0.3/debian/ftpd-ssl.links 1970-01-01 01:00:00.000000000 +0100 +++ linux-ftpd-ssl-0.17.36+0.3/debian/ftpd-ssl.links 2019-02-24 14:39:30.000000000 +0100 @@ -0,0 +1,2 @@ + +usr/share/man/man8/in.ftpd.8 usr/share/man/man8/ftpd.8 diff -Nru linux-ftpd-ssl-0.17.36+0.3/debian/ftpd-ssl.manpages linux-ftpd-ssl-0.17.36+0.3/debian/ftpd-ssl.manpages --- linux-ftpd-ssl-0.17.36+0.3/debian/ftpd-ssl.manpages 1970-01-01 01:00:00.000000000 +0100 +++ linux-ftpd-ssl-0.17.36+0.3/debian/ftpd-ssl.manpages 2019-02-24 14:39:30.000000000 +0100 @@ -0,0 +1,2 @@ + +debian/ftpchroot.5 diff -Nru linux-ftpd-ssl-0.17.36+0.3/debian/patches/001-from_hamm.diff linux-ftpd-ssl-0.17.36+0.3/debian/patches/001-from_hamm.diff --- linux-ftpd-ssl-0.17.36+0.3/debian/patches/001-from_hamm.diff 2016-12-25 23:06:11.000000000 +0100 +++ linux-ftpd-ssl-0.17.36+0.3/debian/patches/001-from_hamm.diff 2018-12-01 19:06:05.000000000 +0100 @@ -4,8 +4,8 @@ and Rainer Weikusat Forwarded: no Last-Update: 2002-02-09 ---- linux-ftpd-0.17.orig/ftpd/ftpcmd.y -+++ linux-ftpd-0.17/ftpd/ftpcmd.y +--- a/ftpd/ftpcmd.y ++++ b/ftpd/ftpcmd.y @@ -55,6 +55,7 @@ #include <ctype.h> #include <errno.h> @@ -110,8 +110,8 @@ break; } default: reply(504, "SIZE not implemented for Type %c.", "?AEIL"[type]); ---- linux-ftpd-0.17.orig/ftpd/ftpd.8 -+++ linux-ftpd-0.17/ftpd/ftpd.8 +--- a/ftpd/ftpd.8 ++++ b/ftpd/ftpd.8 @@ -67,7 +67,9 @@ .It Fl A Permit only anonymous ftp connections or accounts listed in @@ -145,8 +145,8 @@ .It Pa ~ftp/pub Make this directory mode 555 and owned by .Dq root . ---- linux-ftpd-0.17.orig/ftpd/ftpd.c -+++ linux-ftpd-0.17/ftpd/ftpd.c +--- a/ftpd/ftpd.c ++++ b/ftpd/ftpd.c @@ -80,6 +80,7 @@ #include <pwd.h> #include <setjmp.h> @@ -1059,8 +1059,8 @@ return (0); } } ---- linux-ftpd-0.17.orig/ftpd/logwtmp.c -+++ linux-ftpd-0.17/ftpd/logwtmp.c +--- a/ftpd/logwtmp.c ++++ b/ftpd/logwtmp.c @@ -41,7 +41,6 @@ "$Id: logwtmp.c,v 1.5 1999/07/16 00:34:29 dholland Exp $"; @@ -1077,23 +1077,8 @@ #include "extern.h" static int fd = -1; ---- linux-ftpd-0.17.orig/support/Makefile -+++ linux-ftpd-0.17/support/Makefile -@@ -1,6 +1,6 @@ - include ../MCONFIG - --OBJS=daemon.o setproctitle.o isexpired.o vis.o -+OBJS=setproctitle.o isexpired.o vis.o - - all: libsupport.a - -@@ -16,4 +16,3 @@ - rm -f *.o libsupport.a - - setproctitle.o: setproctitle.h --daemon.o: daemon.h ---- linux-ftpd-0.17.orig/support/setproctitle.c -+++ linux-ftpd-0.17/support/setproctitle.c +--- a/support/setproctitle.c ++++ b/support/setproctitle.c @@ -139,7 +139,7 @@ (void) strcpy(Argv[0], buf); p = &Argv[0][i]; diff -Nru linux-ftpd-ssl-0.17.36+0.3/debian/patches/014-adjust_infrastruct.diff linux-ftpd-ssl-0.17.36+0.3/debian/patches/014-adjust_infrastruct.diff --- linux-ftpd-ssl-0.17.36+0.3/debian/patches/014-adjust_infrastruct.diff 2016-12-25 23:06:11.000000000 +0100 +++ linux-ftpd-ssl-0.17.36+0.3/debian/patches/014-adjust_infrastruct.diff 1970-01-01 01:00:00.000000000 +0100 @@ -1,16 +0,0 @@ -Description: Corrections to infrastructure for builds. - Insert harmless omission that eases tailored builds. -Author: Mats Erik Andersson <deb...@gisladisker.se> -Forwarded: no -Last-Update: 2010-04-26 ---- linux-ftpd-0.17.debian/ftpd/Makefile -+++ linux-ftpd-0.17/ftpd/Makefile -@@ -26,7 +26,7 @@ - -mv -f y.tab.c $@ - - ftpd: $(OBJS) -- $(CC) $(LDFLAGS) $^ $(LIBS) -o $@ -+ $(CC) $(LDFLAGS) $^ $(LIBS) $(LDADD) -o $@ - - install: ftpd - install -s -m$(DAEMONMODE) ftpd $(INSTALLROOT)$(SBINDIR)/in.ftpd diff -Nru linux-ftpd-ssl-0.17.36+0.3/debian/patches/040-refine_config.diff linux-ftpd-ssl-0.17.36+0.3/debian/patches/040-refine_config.diff --- linux-ftpd-ssl-0.17.36+0.3/debian/patches/040-refine_config.diff 2016-12-25 23:06:11.000000000 +0100 +++ linux-ftpd-ssl-0.17.36+0.3/debian/patches/040-refine_config.diff 1970-01-01 01:00:00.000000000 +0100 @@ -1,30 +0,0 @@ -Description: Do not link with libcrypt. - The test for libcrypt is only needed in cases - when USE_PAM is not set to active. -Author: Mats Erik Andersson <deb...@gisladisker.se> -Forwarded: no -Last-Update: 2012-03-29 - ---- linux-ftpd-0.17.debian/configure -+++ linux-ftpd-0.17/configure -@@ -261,6 +261,11 @@ - - ################################################## - -+# libcrypt is only needed in the absence of libpam. -+ -+if test -z "$USE_PAM"; then -+## Missing indentation in this clause! -+ - echo -n 'Checking for crypt... ' - cat <<EOF >__conftest.c - int main() { crypt("aa", "bb"); } -@@ -285,6 +290,8 @@ - fi - rm -f __conftest* - -+fi # test -z "$USE_PAM" -+ - ################################################## - - echo -n 'Checking for socklen_t... ' diff -Nru linux-ftpd-ssl-0.17.36+0.3/debian/patches/500-ssl.diff linux-ftpd-ssl-0.17.36+0.3/debian/patches/500-ssl.diff --- linux-ftpd-ssl-0.17.36+0.3/debian/patches/500-ssl.diff 2016-12-25 23:06:11.000000000 +0100 +++ linux-ftpd-ssl-0.17.36+0.3/debian/patches/500-ssl.diff 2018-12-01 19:07:30.000000000 +0100 @@ -5,24 +5,8 @@ Author: Tim Hudson <t...@cryptsoft.com> Last-Update: 2015-06-11 -Index: linux-ftpd-ssl/ftpd/Makefile -=================================================================== ---- linux-ftpd-ssl.orig/ftpd/Makefile 2010-06-08 19:16:05.000000000 +0100 -+++ linux-ftpd-ssl/ftpd/Makefile 2010-06-08 19:16:05.000000000 +0100 -@@ -1,7 +1,7 @@ - include ../MCONFIG - --CFLAGS+=-I../support --LIBS+=-L../support -lsupport -+CFLAGS+=-I../support -DUSE_SSL -g -+LIBS+=-L../support -lsupport -lssl -lcrypto - - - OBJS=ftpd.o ftpcmd.o logutmp.o logwtmp.o popen.o -Index: linux-ftpd-ssl/ftpd/ftpcmd.y -=================================================================== ---- linux-ftpd-ssl.orig/ftpd/ftpcmd.y 2010-06-08 19:16:05.000000000 +0100 -+++ linux-ftpd-ssl/ftpd/ftpcmd.y 2010-06-09 01:19:32.000000000 +0100 +--- a/ftpd/ftpcmd.y ++++ b/ftpd/ftpcmd.y @@ -1,3 +1,15 @@ +/* + * The modifications to support SSLeay we done by Tim Hudson @@ -201,10 +185,8 @@ ; return (-2); } -Index: linux-ftpd-ssl/ftpd/ftpd.c -=================================================================== ---- linux-ftpd-ssl.orig/ftpd/ftpd.c 2010-06-08 19:16:05.000000000 +0100 -+++ linux-ftpd-ssl/ftpd/ftpd.c 2010-06-09 01:19:24.000000000 +0100 +--- a/ftpd/ftpd.c ++++ b/ftpd/ftpd.c @@ -1,3 +1,15 @@ +/* + * The modifications to support SSLeay were done by Tim Hudson @@ -285,7 +267,7 @@ #ifdef __STDC__ #include <stdarg.h> #else -@@ -373,7 +442,7 @@ +@@ -384,7 +453,7 @@ socklen_t addrlen; char *cp, line[LINE_MAX]; FILE *fd; @@ -294,7 +276,7 @@ struct addrinfo hints, *aiptr; #if defined(__linux__) || defined(__GLIBC__) || defined(__GNU__) -@@ -483,12 +552,200 @@ +@@ -494,12 +563,200 @@ use_ipv4 = 1; break; @@ -495,7 +477,7 @@ (void) freopen(_PATH_DEVNULL, "w", stderr); /* -@@ -782,6 +1039,9 @@ +@@ -793,6 +1050,9 @@ static int askpasswd; /* had user command, ask for passwd */ static char curname[16]; /* current USER name */ @@ -505,7 +487,7 @@ /* * USER command. * Sets global passwd pointer pw if named account exists and is acceptable; -@@ -856,6 +1116,12 @@ +@@ -867,6 +1127,12 @@ return; } } @@ -518,7 +500,7 @@ #ifdef SKEY if (!skey_haskey(name)) { char *myskey, *skey_keyinfo __P((char *name)); -@@ -1156,7 +1422,11 @@ +@@ -1167,7 +1433,11 @@ } askpasswd = 0; #ifndef USE_PAM @@ -531,7 +513,7 @@ #endif /* * Try to authenticate the user -@@ -1429,6 +1699,15 @@ +@@ -1440,6 +1710,15 @@ (restart_point == 0 && cmd == 0 && S_ISREG(st.st_mode))); if ((cmd == 0) && stats) logxfer(name, st.st_size, start); @@ -547,7 +529,7 @@ (void) fclose(dout); data = -1; pdata = -1; -@@ -1650,6 +1929,69 @@ +@@ -1661,6 +1940,69 @@ (void) setsockopt(s, IPPROTO_IP, IP_TOS, (char *)&tos, sizeof(int)); /* Errors silently ignored: GNU/kfreebsd. */ #endif @@ -617,7 +599,7 @@ if (stou) { reply(150, "FILE: %s", name); } else { -@@ -1658,6 +2000,7 @@ +@@ -1669,6 +2011,7 @@ type == TYPE_A ? "ASCII" : "BINARY", name, sizebuf); } @@ -625,7 +607,7 @@ return (fdopen(pdata, mode)); } if (data >= 0) { -@@ -1721,6 +2064,68 @@ +@@ -1732,6 +2075,68 @@ data = -1; return (NULL); } @@ -694,7 +676,7 @@ if (stou) { reply(150, "FILE: %s", name); } else { -@@ -1729,6 +2134,7 @@ +@@ -1740,6 +2145,7 @@ type == TYPE_A ? "ASCII" : "BINARY", name, sizebuf); } @@ -702,7 +684,7 @@ return (file); } -@@ -1757,11 +2163,11 @@ +@@ -1768,11 +2174,11 @@ if (c == '\n') { if (ferror(outstr)) goto data_err; @@ -717,7 +699,7 @@ transflag = 0; if (ferror(instr)) goto file_err; -@@ -1779,7 +2185,11 @@ +@@ -1790,7 +2196,11 @@ netfd = fileno(outstr); filefd = fileno(instr); @@ -730,7 +712,7 @@ buf = mmap(0, filesize, PROT_READ, MAP_SHARED, filefd, (off_t)0); if (buf==MAP_FAILED || buf==NULL) { -@@ -1820,6 +2230,13 @@ +@@ -1831,6 +2241,13 @@ /* failure is harmless */ } #endif @@ -744,7 +726,7 @@ while ((cnt = read(filefd, buf, size)) > 0 && write(netfd, buf, cnt) == cnt) byte_count += cnt; -@@ -1878,6 +2295,16 @@ +@@ -1889,6 +2306,16 @@ case TYPE_L: signal (SIGALRM, lostconn); @@ -761,7 +743,7 @@ do { (void) alarm ((unsigned) timeout); cnt = read(fileno(instr), buf, sizeof(buf)); -@@ -1889,6 +2316,7 @@ +@@ -1900,6 +2327,7 @@ byte_count += cnt; } } while (cnt > 0); @@ -769,7 +751,7 @@ if (cnt < 0) goto data_err; transflag = 0; -@@ -1900,14 +2328,14 @@ +@@ -1911,14 +2339,14 @@ return (-1); case TYPE_A: @@ -786,7 +768,7 @@ (void) putc ('\r', outstr); if (c == '\0' || c == EOF) goto contin2; -@@ -2056,12 +2484,33 @@ +@@ -2067,12 +2495,33 @@ reply(int n, char *fmt, va_dcl va_alist) #endif { @@ -820,7 +802,7 @@ (void)printf("%d ", n); (void)vprintf(fmt, ap); (void)printf("\r\n"); -@@ -2077,6 +2526,8 @@ +@@ -2088,6 +2537,8 @@ vsyslog(LOG_FTP | LOG_DEBUG, fmt, ap); va_end(ap); } @@ -829,7 +811,7 @@ } void -@@ -2089,12 +2540,34 @@ +@@ -2100,12 +2551,34 @@ va_dcl #endif { @@ -864,7 +846,7 @@ (void)printf("%d- ", n); (void)vprintf(fmt, ap); (void)printf("\r\n"); -@@ -2110,6 +2583,8 @@ +@@ -2121,6 +2594,8 @@ vsyslog(LOG_FTP | LOG_DEBUG, fmt, ap); va_end(ap); } @@ -873,7 +855,7 @@ } static void ack(const char *s) -@@ -2582,6 +3057,7 @@ +@@ -2593,6 +3068,7 @@ volatile int simple = 0; volatile int freeglob = 0; glob_t gl; @@ -881,7 +863,7 @@ /* XXX: should the { go away if __linux__? */ if (strpbrk(whichf, "~{[*?") != NULL) { -@@ -2642,8 +3118,14 @@ +@@ -2653,8 +3129,14 @@ goto out; transflag++; } @@ -897,7 +879,7 @@ byte_count += strlen(dirname) + 1; continue; } else if (!S_ISDIR(st.st_mode)) -@@ -2685,11 +3167,17 @@ +@@ -2696,11 +3178,17 @@ transflag++; } if (nbuf[0] == '.' && nbuf[1] == '/') @@ -917,7 +899,7 @@ byte_count += strlen(nbuf) + 1; } } -@@ -2704,8 +3193,16 @@ +@@ -2715,8 +3203,16 @@ reply(226, "Transfer complete."); transflag = 0; @@ -935,7 +917,7 @@ data = -1; pdata = -1; out: -@@ -2792,3 +3287,223 @@ +@@ -2803,3 +3299,223 @@ } #endif /* TCPWRAPPERS */ @@ -1159,10 +1141,8 @@ +} + +#endif /* USE_SSL */ -Index: linux-ftpd-ssl/ftpd/ssl_port.h -=================================================================== ---- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ linux-ftpd-ssl/ftpd/ssl_port.h 2010-06-09 01:19:24.000000000 +0100 +--- /dev/null ++++ b/ftpd/ssl_port.h @@ -0,0 +1,85 @@ +/* ssl_port.h - standard porting things + * @@ -1249,10 +1229,8 @@ +#endif /* USE_SSL */ + +#endif /* HEADER_SSL_PORT_H */ -Index: linux-ftpd-ssl/ftpd/sslapp.c -=================================================================== ---- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ linux-ftpd-ssl/ftpd/sslapp.c 2010-06-09 01:19:24.000000000 +0100 +--- /dev/null ++++ b/ftpd/sslapp.c @@ -0,0 +1,186 @@ +/* sslapp.c - ssl application code */ + @@ -1440,10 +1418,8 @@ + +#endif /* USE_SSL */ + -Index: linux-ftpd-ssl/ftpd/sslapp.h -=================================================================== ---- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ linux-ftpd-ssl/ftpd/sslapp.h 2010-06-08 19:16:05.000000000 +0100 +--- /dev/null ++++ b/ftpd/sslapp.h @@ -0,0 +1,63 @@ +/* sslapp.h - ssl application code */ + diff -Nru linux-ftpd-ssl-0.17.36+0.3/debian/patches/series linux-ftpd-ssl-0.17.36+0.3/debian/patches/series --- linux-ftpd-ssl-0.17.36+0.3/debian/patches/series 2017-01-16 22:30:20.000000000 +0100 +++ linux-ftpd-ssl-0.17.36+0.3/debian/patches/series 2019-02-24 14:39:30.000000000 +0100 @@ -5,13 +5,11 @@ 002-from_sarge.diff 003-from_etch.diff 010-ftpd_csrf.diff -014-adjust_infrastruct.diff 016-family_independence.diff 020-support_ipv6.diff 024-failing_va_list.diff 026-support_glibc_bsd_and_gnu.diff 030-manpage_typos.diff -040-refine_config.diff 044-support_gnu_hurd.diff # # Private patches @@ -29,3 +27,6 @@ # Upgrading of legacy SSL code. # 600-better_conformity.diff + +use-cmake-as-buildsystem.patch +use-cmake-as-buildsystem-debian-extras.patch diff -Nru linux-ftpd-ssl-0.17.36+0.3/debian/patches/use-cmake-as-buildsystem-debian-extras.patch linux-ftpd-ssl-0.17.36+0.3/debian/patches/use-cmake-as-buildsystem-debian-extras.patch --- linux-ftpd-ssl-0.17.36+0.3/debian/patches/use-cmake-as-buildsystem-debian-extras.patch 1970-01-01 01:00:00.000000000 +0100 +++ linux-ftpd-ssl-0.17.36+0.3/debian/patches/use-cmake-as-buildsystem-debian-extras.patch 2019-02-24 14:39:30.000000000 +0100 @@ -0,0 +1,40 @@ +Description: Debian-specific changes to the cmake build system +Author: Christoph Biedl <debian.a...@manchmal.in-ulm.de> +Forwarded: not-needed +Last-Update: 2019-02-24 + +--- a/ftpd/CMakeLists.txt ++++ b/ftpd/CMakeLists.txt +@@ -1,4 +1,6 @@ + ++set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DHASSETPROCTITLE -DUSE_SSL") ++ + include_directories( + BEFORE + "../support/" +@@ -18,6 +20,8 @@ + in.ftpd + crypt + support ++ ssl ++ crypto + ) + install( + TARGETS in.ftpd +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -5,6 +5,14 @@ + set(MAN_DIR "${CMAKE_INSTALL_PREFIX}/share/man") + + find_library(USE_CRYPT crypt REQUIRED) ++find_library(USE_PAM pam) ++ ++if(USE_PAM) ++ set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DUSE_PAM=1") ++ set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -lpam") ++endif() ++ ++set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -D_FILE_OFFSET_BITS=64") + + add_subdirectory(ftpd) + add_subdirectory(support) diff -Nru linux-ftpd-ssl-0.17.36+0.3/debian/patches/use-cmake-as-buildsystem.patch linux-ftpd-ssl-0.17.36+0.3/debian/patches/use-cmake-as-buildsystem.patch --- linux-ftpd-ssl-0.17.36+0.3/debian/patches/use-cmake-as-buildsystem.patch 1970-01-01 01:00:00.000000000 +0100 +++ linux-ftpd-ssl-0.17.36+0.3/debian/patches/use-cmake-as-buildsystem.patch 2019-02-24 14:39:30.000000000 +0100 @@ -0,0 +1,85 @@ +Description: Use cmake as build system +Author: Christoph Biedl <debian.a...@manchmal.in-ulm.de> +Bug-Debian: https://bugs.debian.org/912123 +Last-Update: 2019-02-24 + +--- /dev/null ++++ b/CMakeLists.txt +@@ -0,0 +1,10 @@ ++cmake_minimum_required(VERSION 3.7) ++project(linux-ftpd-ssl) ++ ++set(SBIN_DIR "${CMAKE_INSTALL_PREFIX}/sbin") ++set(MAN_DIR "${CMAKE_INSTALL_PREFIX}/share/man") ++ ++find_library(USE_CRYPT crypt REQUIRED) ++ ++add_subdirectory(ftpd) ++add_subdirectory(support) +--- /dev/null ++++ b/ftpd/CMakeLists.txt +@@ -0,0 +1,52 @@ ++ ++include_directories( ++ BEFORE ++ "../support/" ++ ${CMAKE_CURRENT_SOURCE_DIR} ++) ++ ++add_executable( ++ in.ftpd ++ ftpd.c ++ logutmp.c ++ logwtmp.c ++ popen.c ++ extern.h ++ ftpcmd.c ++) ++target_link_libraries( ++ in.ftpd ++ crypt ++ support ++) ++install( ++ TARGETS in.ftpd ++ DESTINATION ${SBIN_DIR} ++) ++ ++add_custom_command( ++ COMMENT "Creating y.tab.c" ++ OUTPUT y.tab.c ++ COMMAND ++ yacc ${CMAKE_CURRENT_SOURCE_DIR}/ftpcmd.y ++ DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/ftpcmd.y ++) ++add_custom_command( ++ COMMENT "Creating ftpcmd.c" ++ OUTPUT ftpcmd.c ++ COMMAND ++ ${CMAKE_COMMAND} -E rename ++ y.tab.c ftpcmd.c ++ DEPENDS y.tab.c ++) ++ ++install( ++ FILES ftpd.8 ++ DESTINATION ${MAN_DIR}/man8/ ++ RENAME in.ftpd.8 ++) ++ ++install( ++ FILES ftpusers.5 ++ DESTINATION ${MAN_DIR}/man5/ ++) +--- /dev/null ++++ b/support/CMakeLists.txt +@@ -0,0 +1,9 @@ ++ ++set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DHASSETPROCTITLE") ++ ++add_library( ++ support ++ isexpired.c ++ setproctitle.c ++ vis.c ++) diff -Nru linux-ftpd-ssl-0.17.36+0.3/debian/rules linux-ftpd-ssl-0.17.36+0.3/debian/rules --- linux-ftpd-ssl-0.17.36+0.3/debian/rules 2016-12-25 23:06:10.000000000 +0100 +++ linux-ftpd-ssl-0.17.36+0.3/debian/rules 2019-02-24 14:39:30.000000000 +0100 @@ -1,80 +1,4 @@ #!/usr/bin/make -f -# Sample debian/rules that uses debhelper. GNU copyright 1997 by Joey Hess. -# Uncomment this to turn on verbose mode. -#export DH_VERBOSE=1 - -ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS))) - CONFIGUREARGS=--with-debug -else - CONFIGUREARGS= -endif - -CDEFS := -D_FILE_OFFSET_BITS=64 -g -LDDEFS := -Wl,-z,defs -Wl,--as-needed - -build: build-arch build-indep -build-arch: build-stamp -build-indep: build-stamp -build-stamp: - dh_testdir - - if [ ! -f MCONFIG ]; then \ - USE_PAM=1 ./configure $(CONFIGUREARGS); \ - sed -e 's/^CFLAGS=\(.*\)$$/CFLAGS=$(CDEFS) \1 -fno-strict-aliasing/' \ - -e 's/^LDFLAGS=\(.*\)$$/LDFLAGS=$(LDDEFS) \1/' \ - MCONFIG > MCONFIG.new; \ - mv MCONFIG.new MCONFIG; \ - echo CFLAGS+=-DUSE_PAM=1 \ - `dpkg-buildflags --get CFLAGS` -fPIE -pie \ - `dpkg-buildflags --get CPPFLAGS` >> MCONFIG; \ - echo LIBS+=-lpam `dpkg-buildflags --get LDFLAGS` -Wl,-z,now >> MCONFIG; \ - fi - $(MAKE) - touch build-stamp - -clean: - dh_testdir - dh_testroot - rm -f build-stamp - - [ ! -f MCONFIG ] || $(MAKE) distclean - - dh_clean - -install: build - dh_testdir - dh_testroot - dh_prep - dh_installdirs - - cp ftpd/ftpd debian/ftpd-ssl/usr/sbin/in.ftpd - cp ftpd/ftpd.8 debian/ftpd-ssl/usr/share/man/man8/in.ftpd.8 - cp ftpd/*.5 debian/*.5 debian/ftpd-ssl/usr/share/man/man5 - ln -sf in.ftpd.8 debian/ftpd-ssl/usr/share/man/man8/ftpd.8 - cp debian/ftpchroot debian/ftpusers debian/ftpd-ssl/etc - cp debian/pam.d/ftp debian/ftpd-ssl/etc/pam.d - cp debian/openssl.cnf debian/ftpd-ssl/etc/ftpd-ssl/ - -# 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_installexamples - dh_installchangelogs ChangeLog - 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 +%: + dh $@ --buildsystem=cmake --no-parallel
signature.asc
Description: PGP signature