From 8f050e3ba15bc8b9f498aba8997117ba07a038c5 Mon Sep 17 00:00:00 2001 From: Colin Booth Date: Sat, 29 May 2021 20:44:54 -0700 Subject: [PATCH] twoftpd: fix license, distfiles, mark as nocross, vsed MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sgn: increase opt level, patch for log2 Co-authored-by: Đoàn Trần Công Danh Close: #31214 --- srcpkgs/twoftpd/patches/log2-conflict.patch | 62 +++++++++++++++++++++ srcpkgs/twoftpd/template | 15 +++-- 2 files changed, 69 insertions(+), 8 deletions(-) create mode 100644 srcpkgs/twoftpd/patches/log2-conflict.patch diff --git a/srcpkgs/twoftpd/patches/log2-conflict.patch b/srcpkgs/twoftpd/patches/log2-conflict.patch new file mode 100644 index 0000000000..b3a8079def --- /dev/null +++ b/srcpkgs/twoftpd/patches/log2-conflict.patch @@ -0,0 +1,62 @@ + log2 is declared in math.h +Index: twoftpd-1.43/log.c +=================================================================== +--- twoftpd-1.43.orig/log.c ++++ twoftpd-1.43/log.c +@@ -32,14 +32,14 @@ void log_start(void) + obuf_puts(&errbuf, "]: "); + } + +-void log1(const char* a) ++void twoftpd_log1(const char* a) + { + log_start(); + log_str(a); + log_end(); + } + +-void log2(const char* a, const char* b) ++void twoftpd_log2(const char* a, const char* b) + { + log_start(); + log_str(a); +Index: twoftpd-1.43/log.h +=================================================================== +--- twoftpd-1.43.orig/log.h ++++ twoftpd-1.43/log.h +@@ -8,7 +8,7 @@ extern void log_start(void); + #define log_uint(U) obuf_putu(&errbuf, U) + #define log_end() obuf_putsflush(&errbuf, "\n") + +-extern void log1(const char*); +-extern void log2(const char*, const char*); ++extern void twoftpd_log1(const char*); ++extern void twoftpd_log2(const char*, const char*); + + #endif +Index: twoftpd-1.43/main.c +=================================================================== +--- twoftpd-1.43.orig/main.c ++++ twoftpd-1.43/main.c +@@ -171,18 +171,18 @@ static int dispatch_request(const comman + cmd = find_command(table1); + if (!cmd && table2) cmd = find_command(table2); + if (!cmd) { +- if (log) log2(request, req_param ? req_param : "(no parameter)"); ++ if (log) twoftpd_log2(request, req_param ? req_param : "(no parameter)"); + return respond(502, 1, "Command not supported."); + } + + if (req_param) { +- if (log) log2(cmd->name, cmd->hideparam ? "XXXXXXXX" : req_param); ++ if (log) twoftpd_log2(cmd->name, cmd->hideparam ? "XXXXXXXX" : req_param); + if (cmd->fn1) + return cmd->fn1(); + return respond(501, 1, "Command requires no parameter"); + } + else { +- if (log) log1(cmd->name); ++ if (log) twoftpd_log1(cmd->name); + if (cmd->fn0) + return cmd->fn0(); + return respond(504, 1, "Command requires a parameter"); diff --git a/srcpkgs/twoftpd/template b/srcpkgs/twoftpd/template index ad63211f57..babd76ec6f 100644 --- a/srcpkgs/twoftpd/template +++ b/srcpkgs/twoftpd/template @@ -1,33 +1,32 @@ # Template file for 'twoftpd' pkgname=twoftpd version=1.43 -revision=4 +revision=5 build_style=gnu-makefile -depends="sv-helper ucspi-tcp" makedepends="bglibs-devel cvm-devel" +depends="sv-helper ucspi-tcp" short_desc="Simple secure efficient FTP server" maintainer="bougyman " -license="GPL-2" +license="GPL-2.0-or-later" homepage="http://untroubled.org/twoftpd/" -distfiles="http://untroubled.org/twoftpd/twoftpd-1.43.tar.gz" +distfiles="http://untroubled.org/twoftpd/twoftpd-${version}.tar.gz" checksum=ed77d2f3020bdbbe1a0a7d9a84780f3525431300e5000901e95a982873e24dc3 system_accounts="ftp" ftp_pgroup="nogroup" +nocross="deps are nocross" -pre_build() { +do_configure() { echo '/usr/bin' > conf-bin echo '/usr/share/man' > conf-man echo '/usr/include' > conf-include echo '/usr/lib' > conf-lib echo "$CC $LDFLAGS" > conf-ld - sed -e 's|/usr/local/include|/usr/include|' -e "s|gcc|$CC $CFLAGS|" \ - -i conf-cc + echo "$CC $CFLAGS" >conf-cc } do_install() { make install install_prefix=${DESTDIR} vsv twoftpd-anon - vlicense COPYING vdoc README vdoc NEWS vdoc ANNOUNCEMENT